vzcode 2.29.0 → 2.30.0

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,687 +0,0 @@
1
- (function(){"use strict";var sa="4.55.1",Hu=44,wm=59,Sm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wu=new Uint8Array(64),Gu=new Uint8Array(128);for(let t=0;t<64;t++){const e=Sm.charCodeAt(t);Wu[t]=e,Gu[e]=t}function Us(t,e){let n=0,s=0,i=0;do{const a=t.next();i=Gu[a],n|=(31&i)<<s,s+=5}while(32&i);const r=1&n;return n>>>=1,r&&(n=-2147483648|-n),e+n}function qs(t,e,n){let s=e-n;s=s<0?-s<<1|1:s<<1;do{let i=31&s;s>>>=5,s>0&&(i|=32),t.write(Wu[i])}while(s>0);return e}function Xu(t,e){return!(t.pos>=e)&&t.peek()!==Hu}var Ku=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode:t=>Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}:{decode(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}},Im=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:n}=this;n[this.pos++]=e,this.pos===16384&&(this.out+=Ku.decode(n),this.pos=0)}flush(){const{buffer:e,out:n,pos:s}=this;return s>0?n+Ku.decode(e.subarray(0,s)):n}},vm=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:n,pos:s}=this,i=n.indexOf(e,s);return i===-1?n.length:i}};function _m(t){t.sort(Pm)}function Pm(t,e){return t[0]-e[0]}function Ju(t){const e=new Im;let n=0,s=0,i=0,r=0;for(let a=0;a<t.length;a++){const l=t[a];if(a>0&&e.write(wm),l.length===0)continue;let c=0;for(let u=0;u<l.length;u++){const d=l[u];u>0&&e.write(Hu),c=qs(e,d[0],c),d.length!==1&&(n=qs(e,d[1],n),s=qs(e,d[2],s),i=qs(e,d[3],i),d.length!==4&&(r=qs(e,d[4],r)))}}return e.flush()}class Zi{constructor(e){this.bits=e instanceof Zi?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let Yu=class qu{constructor(e,n,s){this.start=e,this.end=n,this.original=s,this.intro="",this.outro="",this.content=s,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new qu(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let n=this;for(;n;)e(n),n=n.next}eachPrevious(e){let n=this;for(;n;)e(n),n=n.previous}edit(e,n,s){return this.content=e,s||(this.intro="",this.outro=""),this.storeName=n,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){const n=e-this.start,s=this.original.slice(0,n),i=this.original.slice(n);this.original=s;const r=new qu(e,this.end,i);return r.outro=this.outro,this.outro="",this.end=e,this.edited?(r.edit("",!1),this.content=""):this.content=s,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const n=this.content.replace(e,"");return n.length?(n!==this.content&&(this.split(this.start+n.length).edit("",void 0,!0),this.edited&&this.edit(n,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const n=this.content.replace(e,"");if(n.length){if(n!==this.content){const s=this.split(this.end-n.length);this.edited&&s.edit(n,this.storeName,!0),this.edit("",void 0,!0)}return!0}return this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0}};function Nm(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const $m=Nm();class er{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Ju(e.mappings),e.x_google_ignoreList!==void 0&&(this.x_google_ignoreList=e.x_google_ignoreList),e.debugId!==void 0&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+$m(this.toString())}}function Qu(t,e){const n=t.split(/[/\\]/),s=e.split(/[/\\]/);for(n.pop();n[0]===s[0];)n.shift(),s.shift();if(n.length){let i=n.length;for(;i--;)n[i]=".."}return n.concat(s).join("/")}const Cm=Object.prototype.toString;function Zu(t){return Cm.call(t)==="[object Object]"}function ia(t){const e=t.split(`
2
- `),n=[];for(let s=0,i=0;s<e.length;s++)n.push(i),i+=e[s].length+1;return function(s){let i=0,r=n.length;for(;i<r;){const l=i+r>>1;s<n[l]?r=l:i=l+1}const a=i-1;return{line:a,column:s-n[a]}}}const Tm=/\w/;let eh=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,n,s,i){if(n.length){const r=n.length-1;let a=n.indexOf(`
3
- `,0),l=-1;for(;a>=0&&r>a;){const u=[this.generatedCodeColumn,e,s.line,s.column];i>=0&&u.push(i),this.rawSegments.push(u),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=a,a=n.indexOf(`
4
- `,a+1)}const c=[this.generatedCodeColumn,e,s.line,s.column];i>=0&&c.push(i),this.rawSegments.push(c),this.advance(n.slice(l+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null}addUneditedChunk(e,n,s,i,r){let a=n.start,l=!0,c=!1;for(;a<n.end;){if(s[a]===`
5
- `)i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=!0,c=!1;else{if(this.hires||l||r.has(a)){const u=[this.generatedCodeColumn,e,i.line,i.column];this.hires==="boundary"?Tm.test(s[a])?c||(this.rawSegments.push(u),c=!0):(this.rawSegments.push(u),c=!1):this.rawSegments.push(u)}i.column+=1,this.generatedCodeColumn+=1,l=!1}a+=1}this.pending=null}advance(e){if(!e)return;const n=e.split(`
6
- `);if(n.length>1){for(let s=0;s<n.length-1;s++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=n[n.length-1].length}};const Hs=`
7
- `,us={insertLeft:!1,insertRight:!1,storeName:!1};let Ws=class Em{constructor(e,n={}){const s=new Yu(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:s},lastChunk:{writable:!0,value:s},lastSearchedChunk:{writable:!0,value:s},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:n.filename},indentExclusionRanges:{writable:!0,value:n.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new Zi},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:n.ignoreList},offset:{writable:!0,value:n.offset||0}}),this.byStart[0]=s,this.byEnd[e.length]=s}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,n){if(e+=this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.appendLeft(n):this.intro+=n,this}appendRight(e,n){if(e+=this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.appendRight(n):this.outro+=n,this}clone(){const e=new Em(this.original,{filename:this.filename,offset:this.offset});let n=this.firstChunk,s=e.firstChunk=e.lastSearchedChunk=n.clone();for(;n;){e.byStart[s.start]=s,e.byEnd[s.end]=s;const i=n.next,r=i&&i.clone();r&&(s.next=r,r.previous=s,s=r),n=i}return e.lastChunk=s,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new Zi(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const n=Object.keys(this.storedNames),s=new eh(e.hires),i=ia(this.original);return this.intro&&s.advance(this.intro),this.firstChunk.eachNext(r=>{const a=i(r.start);r.intro.length&&s.advance(r.intro),r.edited?s.addEdit(0,r.content,a,r.storeName?n.indexOf(r.original):-1):s.addUneditedChunk(0,r,this.original,a,this.sourcemapLocations),r.outro.length&&s.advance(r.outro)}),this.outro&&s.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?Qu(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:n,mappings:s.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new er(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=(function(e){const n=e.split(`
8
- `),s=n.filter(a=>/^\t+/.test(a)),i=n.filter(a=>/^ {2,}/.test(a));if(s.length===0&&i.length===0)return null;if(s.length>=i.length)return" ";const r=i.reduce((a,l)=>{const c=/^ +/.exec(l)[0].length;return Math.min(c,a)},1/0);return new Array(r+1).join(" ")})(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,n){const s=/^[^\r\n]/gm;if(Zu(e)&&(n=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;const i={};(n=n||{}).exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(u=>{for(let d=u[0];d<u[1];d+=1)i[d]=!0});let r=n.indentStart!==!1;const a=u=>r?`${e}${u}`:(r=!0,u);this.intro=this.intro.replace(s,a);let l=0,c=this.firstChunk;for(;c;){const u=c.end;if(c.edited)i[l]||(c.content=c.content.replace(s,a),c.content.length&&(r=c.content[c.content.length-1]===`
9
- `));else for(l=c.start;l<u;){if(!i[l]){const d=this.original[l];d===`
10
- `?r=!0:d!=="\r"&&r&&(r=!1,l===c.start||(this._splitChunk(c,l),c=c.next),c.prependRight(e))}l+=1}l=c.end,c=c.next}return this.outro=this.outro.replace(s,a),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,n){return us.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),us.insertLeft=!0),this.appendLeft(e,n)}insertRight(e,n){return us.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),us.insertRight=!0),this.prependRight(e,n)}move(e,n,s){if(e+=this.offset,n+=this.offset,(s+=this.offset)>=e&&s<=n)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(n),this._split(s);const i=this.byStart[e],r=this.byEnd[n],a=i.previous,l=r.next,c=this.byStart[s];if(!c&&r===this.lastChunk)return this;const u=c?c.previous:this.lastChunk;return a&&(a.next=l),l&&(l.previous=a),u&&(u.next=i),c&&(c.previous=r),i.previous||(this.firstChunk=r.next),r.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=u,r.next=c||null,u||(this.firstChunk=i),c||(this.lastChunk=r),this}overwrite(e,n,s,i){return i=i||{},this.update(e,n,s,{...i,overwrite:!i.contentOnly})}update(e,n,s,i){if(e+=this.offset,n+=this.offset,typeof s!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(n>this.original.length)throw new Error("end is out of bounds");if(e===n)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(n),i===!0&&(us.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),us.storeName=!0),i={storeName:!0});const r=i!==void 0&&i.storeName,a=i!==void 0&&i.overwrite;if(r){const u=this.original.slice(e,n);Object.defineProperty(this.storedNames,u,{writable:!0,value:!0,enumerable:!0})}const l=this.byStart[e],c=this.byEnd[n];if(l){let u=l;for(;u!==c;){if(u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");u=u.next,u.edit("",!1)}l.edit(s,r,!a)}else{const u=new Yu(e,n,"").edit(s,r);c.next=u,u.previous=c}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,n){if(e+=this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.prependLeft(n):this.intro=n+this.intro,this}prependRight(e,n){if(e+=this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.prependRight(n):this.outro=n+this.outro,this}remove(e,n){if(e+=this.offset,n+=this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let s=this.byStart[e];for(;s;)s.intro="",s.outro="",s.edit(""),s=n>s.end?this.byStart[s.end]:null;return this}reset(e,n){if(e+=this.offset,n+=this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let s=this.byStart[e];for(;s;)s.reset(),s=n>s.end?this.byStart[s.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(Hs);if(e!==-1)return this.outro.substr(e+1);let n=this.outro,s=this.lastChunk;do{if(s.outro.length>0){if(e=s.outro.lastIndexOf(Hs),e!==-1)return s.outro.substr(e+1)+n;n=s.outro+n}if(s.content.length>0){if(e=s.content.lastIndexOf(Hs),e!==-1)return s.content.substr(e+1)+n;n=s.content+n}if(s.intro.length>0){if(e=s.intro.lastIndexOf(Hs),e!==-1)return s.intro.substr(e+1)+n;n=s.intro+n}}while(s=s.previous);return e=this.intro.lastIndexOf(Hs),e!==-1?this.intro.substr(e+1)+n:this.intro+n}slice(e=0,n=this.original.length-this.offset){if(e+=this.offset,n+=this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}let s="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start<n&&i.end>=n)return s;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const r=i;for(;i;){!i.intro||r===i&&i.start!==e||(s+=i.intro);const a=i.start<n&&i.end>=n;if(a&&i.edited&&i.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);const l=r===i?e-i.start:0,c=a?i.content.length+n-i.end:i.content.length;if(s+=i.content.slice(l,c),!i.outro||a&&i.end!==n||(s+=i.outro),a)break;i=i.next}return s}snip(e,n){const s=this.clone();return s.remove(0,e),s.remove(n,s.original.length),s}_split(e){if(this.byStart[e]||this.byEnd[e])return;let n=this.lastSearchedChunk,s=n;const i=e>n.end;for(;n;){if(n.contains(e))return this._splitChunk(n,e);if(n=i?this.byStart[n.end]:this.byEnd[n.start],n===s)return;s=n}}_splitChunk(e,n){if(e.edited&&e.content.length){const i=ia(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} – "${e.original}")`)}const s=e.split(n);return this.byEnd[n]=e,this.byStart[n]=s,this.byEnd[s.end]=s,e===this.lastChunk&&(this.lastChunk=s),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,n=this.firstChunk;for(;n;)e+=n.toString(),n=n.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,n=0;do n+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const n=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return!0;let s=this.lastChunk;do{const i=s.end,r=s.trimEnd(n);if(s.end!==i&&(this.lastChunk===s&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),r)return!0;s=s.previous}while(s);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const n=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return!0;let s=this.firstChunk;do{const i=s.end,r=s.trimStart(n);if(s.end!==i&&(s===this.lastChunk&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),r)return!0;s=s.next}while(s);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,n){function s(i,r){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(a,l)=>l==="$"?"$":l==="&"?i[0]:+l<i.length?i[+l]:`$${l}`):n(...i,i.index,r,i.groups)}if(e.global)(function(i,r){let a;const l=[];for(;a=i.exec(r);)l.push(a);return l})(e,this.original).forEach(i=>{if(i.index!=null){const r=s(i,this.original);r!==i[0]&&this.overwrite(i.index,i.index+i[0].length,r)}});else{const i=this.original.match(e);if(i&&i.index!=null){const r=s(i,this.original);r!==i[0]&&this.overwrite(i.index,i.index+i[0].length,r)}}return this}_replaceString(e,n){const{original:s}=this,i=s.indexOf(e);return i!==-1&&(typeof n=="function"&&(n=n(e,i,s)),e!==n&&this.overwrite(i,i+e.length,n)),this}replace(e,n){return typeof e=="string"?this._replaceString(e,n):this._replaceRegexp(e,n)}_replaceAllString(e,n){const{original:s}=this,i=e.length;for(let r=s.indexOf(e);r!==-1;r=s.indexOf(e,r+i)){const a=s.slice(r,r+i);let l=n;typeof n=="function"&&(l=n(a,r,s)),a!==l&&this.overwrite(r,r+i,l)}return this}replaceAll(e,n){if(typeof e=="string")return this._replaceAllString(e,n);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,n)}};const th=Object.prototype.hasOwnProperty;let Rm=class Am{constructor(e={}){this.intro=e.intro||"",this.separator=e.separator!==void 0?e.separator:`
11
- `,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof Ws)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!Zu(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(n=>{th.call(e,n)||(e[n]=e.content[n])}),e.separator===void 0&&(e.separator=this.separator),e.filename)if(th.call(this.uniqueSourceIndexByFilename,e.filename)){const n=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==n.content)throw new Error(`Illegal source: same filename (${e.filename}), different contents`)}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this}append(e,n){return this.addSource({content:new Ws(e),separator:n&&n.separator||""}),this}clone(){const e=new Am({intro:this.intro,separator:this.separator});return this.sources.forEach(n=>{e.addSource({filename:n.filename,content:n.content.clone(),separator:n.separator})}),e}generateDecodedMap(e={}){const n=[];let s;this.sources.forEach(r=>{Object.keys(r.content.storedNames).forEach(a=>{~n.indexOf(a)||n.push(a)})});const i=new eh(e.hires);return this.intro&&i.advance(this.intro),this.sources.forEach((r,a)=>{a>0&&i.advance(this.separator);const l=r.filename?this.uniqueSourceIndexByFilename[r.filename]:-1,c=r.content,u=ia(c.original);c.intro&&i.advance(c.intro),c.firstChunk.eachNext(d=>{const m=u(d.start);d.intro.length&&i.advance(d.intro),r.filename?d.edited?i.addEdit(l,d.content,m,d.storeName?n.indexOf(d.original):-1):i.addUneditedChunk(l,d,c.original,m,c.sourcemapLocations):i.advance(d.content),d.outro.length&&i.advance(d.outro)}),c.outro&&i.advance(c.outro),r.ignoreList&&l!==-1&&(s===void 0&&(s=[]),s.push(l))}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(r=>e.file?Qu(e.file,r.filename):r.filename),sourcesContent:this.uniqueSources.map(r=>e.includeContent?r.content:null),names:n,mappings:i.raw,x_google_ignoreList:s}}generateMap(e){return new er(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach(n=>{const s=n.content._getRawIndentString();s!==null&&(e[s]||(e[s]=0),e[s]+=1)}),Object.keys(e).sort((n,s)=>e[n]-e[s])[0]||" "}indent(e){if(arguments.length||(e=this.getIndentString()),e==="")return this;let n=!this.intro||this.intro.slice(-1)===`
12
- `;return this.sources.forEach((s,i)=>{const r=s.separator!==void 0?s.separator:this.separator,a=n||i>0&&/\r?\n$/.test(r);s.content.indent(e,{exclude:s.indentExclusionRanges,indentStart:a}),n=s.content.lastChar()===`
13
- `}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,(s,i)=>i>0?e+s:s)),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map((n,s)=>{const i=n.separator!==void 0?n.separator:this.separator;return(s>0?i:"")+n.content.toString()}).join("");return this.intro+e}isEmpty(){return(!this.intro.length||!this.intro.trim())&&!this.sources.some(e=>!e.content.isEmpty())}length(){return this.sources.reduce((e,n)=>e+n.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const n=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(n,""),!this.intro){let s,i=0;do if(s=this.sources[i++],!s)break;while(!s.content.trimStartAborted(e))}return this}trimEnd(e){const n=new RegExp((e||"\\s")+"+$");let s,i=this.sources.length-1;do if(s=this.sources[i--],!s){this.intro=this.intro.replace(n,"");break}while(!s.content.trimEndAborted(e));return this}};const Dm=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,Om=/^\.?\.\//,Lm=/\\/g,hs=/[/\\]/,Mm=/\.[^.]+$/;function Wt(t){return Dm.test(t)}function ra(t){return Om.test(t)}function ln(t){return t.replace(Lm,"/")}function Gt(t){return t.split(hs).pop()||""}function cn(t){const e=/[/\\][^/\\]*$/.exec(t);return e?t.slice(0,-e[0].length)||"/":"."}function En(t){const e=Mm.exec(Gt(t));return e?e[0]:""}function Dn(t,e){const n=t.split(hs).filter(Boolean),s=e.split(hs).filter(Boolean);for(n[0]==="."&&n.shift(),s[0]==="."&&s.shift();n[0]&&s[0]&&n[0]===s[0];)n.shift(),s.shift();for(;s[0]===".."&&n.length>0;)s.shift(),n.pop();for(;n.pop();)s.unshift("..");return s.join("/")}function St(...t){const e=t.shift();if(!e)return"/";let n=e.split(hs);for(const s of t)if(Wt(s))n=s.split(hs);else{const i=s.split(hs);for(;i[0]==="."||i[0]==="..";)i.shift()===".."&&n.pop();n.push(...i)}return n.join("/")}function ds(t,e,n,s){e.remove(n,s),t.removeAnnotations(e)}const On={isNoStatement:!0};function ht(t,e,n=0){let s,i;for(s=t.indexOf(e,n);;){if((n=t.indexOf("/",n))===-1||n>=s)return s;i=t.charCodeAt(++n),++n,(n=i===47?t.indexOf(`
14
- `,n)+1:t.indexOf("*/",n)+2)>s&&(s=t.indexOf(e,n))}}const nh=/\S/g;function An(t,e){return nh.lastIndex=e,nh.exec(t).index}const Fm=/\s/;function Gs(t){let e,n,s=0;for(e=t.indexOf(`
15
- `,s);;){if(s=t.indexOf("/",s),s===-1||s>e)return[e,e+1];if(n=t.charCodeAt(s+1),n===47)return[s,e+1];s=t.indexOf("*/",s+2)+2,s>e&&(e=t.indexOf(`
16
- `,s))}}function Xs(t,e,n,s,i){let r,a,l,c,u=t[0],d=!u.included||u.needsBoundaries;d&&(c=n+Gs(e.original.slice(n,u.start))[1]);for(let m=1;m<=t.length;m++)r=u,a=c,l=d,u=t[m],d=u!==void 0&&(!u.included||u.needsBoundaries),l||d?(c=r.end+Gs(e.original.slice(r.end,u===void 0?s:u.start))[1],r.included?l?r.render(e,i,{end:c,start:a}):r.render(e,i):ds(r,e,a,c)):r.render(e,i)}function tr(t,e,n,s){const i=[];let r,a,l,c,u=n-1;for(const d of t){for(r!==void 0&&(u=r.end+ht(e.original.slice(r.end,d.start),",")),a=l=u+1+Gs(e.original.slice(u+1,d.start))[1];c=e.original.charCodeAt(a),c===32||c===9||c===10||c===13;)a++;r!==void 0&&i.push({contentEnd:l,end:a,node:r,separator:u,start:n}),r=d,n=a}return i.push({contentEnd:s,end:s,node:r,separator:null,start:n}),i}function nr(t,e,n){for(;;){const[s,i]=Gs(t.original.slice(e,n));if(s===-1)break;t.remove(e+s,e+=i)}}function Ln(t,{exportNamesByVariable:e,snippets:{_:n,getObject:s,getPropertyAccess:i}},r=""){if(t.length===1&&e.get(t[0]).length===1){const a=t[0];return`exports(${JSON.stringify(e.get(a)[0])},${n}${a.getName(i)}${r})`}{const a=[];for(const l of t)for(const c of e.get(l))a.push([c,l.getName(i)+r]);return`exports(${s(a,{lineBreakIndent:null})})`}}function oa(t,e,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(e,`exports(${JSON.stringify(i.get(t)[0])},${r}`),s.appendLeft(n,")")}function sh(t,e,n,s,i,r){const{_:a,getPropertyAccess:l}=r.snippets;i.appendLeft(n,`,${a}${Ln([t],r)},${a}${t.getName(l)}`),s&&(i.prependRight(e,"("),i.appendLeft(n,")"))}const pt=Object.freeze(Object.create(null)),ft=Object.freeze({}),Qe=Object.freeze([]),ih=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function bt(t,e,n){const s=t.get(e);if(s!==void 0)return s;const i=n();return t.set(e,i),i}function wn(){return new Set}function aa(){return[]}const Ie=Symbol("Unknown Key"),sr=Symbol("Unknown Non-Accessor Key"),ps=Symbol("Unknown Integer"),la=Symbol("Unknown Well-Known"),ca=Symbol("Symbol.toStringTag"),ir=Symbol("Symbol.asyncDispose"),rr=Symbol("Symbol.dispose"),or=Symbol("Symbol.hasInstance"),ua=new Set([ca,ir,rr,or]),ha=t=>ua.has(t)||t===la,Bm=new Set([or,ir,rr]),Mt=t=>typeof t=="string"||ua.has(t),ae=[],ie=[Ie],jm=[sr],da=[ps],zm=[or],fs=Symbol("Entities");let ms=class{constructor(){this.entityPaths=Object.create(null,{[fs]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,n){const s=this.getEntities(e);return!!s.has(n)||(s.add(n),!1)}withTrackedEntityAtPath(e,n,s,i){const r=this.getEntities(e);if(r.has(n))return i;r.add(n);const a=s();return r.delete(n),a}getEntities(e){let n=this.entityPaths;for(const s of e)n=n[s]||=Object.create(null,{[fs]:{value:new Set}});return n[fs]}};const qe=new ms;let rh=class{constructor(){this.entityPaths=Object.create(null,{[fs]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,n,s){let i=this.entityPaths;for(const a of e)i=i[a]||=Object.create(null,{[fs]:{value:new Map}});const r=bt(i[fs],n,wn);return!!r.has(s)||(r.add(s),!1)}};const Vm=Object.freeze({[Ie]:ft});let Um=class{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let n=!0,s=this,i="includedPaths",r=this.includedPaths||=(n=!1,Object.create(null));for(const a of e){if(r[Ie])return!0;if(!Mt(a))return s[i]=Vm,!1;s=r,i=a,r=r[a]||=(n=!1,Object.create(null))}return n}};const qm=Object.freeze({[Ie]:!0});let Hm=class{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let n=!0;const s=this.includedPaths||=(n=!1,Object.create(null));if(s[Ie])return!0;const[i,r]=e;return i?Mt(i)?r?s[i]===Ie||(s[i]=Ie,!1):!!s[i]||(s[i]=!0,!1):(this.includedPaths=qm,!1):n}includeAllPaths(e,n,s){const{includedPaths:i}=this;if(i)if(i[Ie])e.includePath([...s,Ie],n);else{const r=Object.entries(i);if(r.length===0)e.includePath(s,n);else for(const[a,l]of r)e.includePath(l===Ie?[...s,a,Ie]:[...s,a],n)}}};function oh(t,e){if(t.type==="MemberExpression")return!t.computed&&oh(t.object,t);if(t.type!=="Identifier")return!1;switch(e?.type){case"MemberExpression":return e.computed||t===e.object;case"MethodDefinition":return e.computed;case"MetaProperty":return e.meta===t;case"PropertyDefinition":case"Property":return e.computed||t===e.value;case"ExportSpecifier":case"ImportSpecifier":return t===e.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}function Ft(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function gs(){return{accessed:new ms,assigned:new ms,brokenFlow:!1,called:new rh,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new rh,replacedVariableInits:new Map}}function Oe(t,e){return(t&e)!==0}function Le(t,e,n){return t&~e|-n&e}const Ce=Symbol("Unknown Value"),ar=Symbol("Unknown Truthy Value"),lr=Symbol("Unknown Falsy Value");let Pt=class{constructor(){this.flags=0}get included(){return Oe(this.flags,1)}set included(e){this.flags=Le(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){Sn(e)}deoptimizePath(e){}getLiteralValueAtPath(e,n,s){return Ce}getReturnExpressionWhenCalledAtPath(e,n,s,i){return rt}hasEffectsOnInteractionAtPath(e,n,s){return!0}include(e,n,s){this.included||this.includeNode(e)}includeNode(e){this.included=!0}includePath(e,n){this.included||this.includeNode(n)}includeCallArguments(e,n){pa(e,n)}shouldBeIncluded(e){return!0}};const ve=new class extends Pt{},rt=[ve,!1],Sn=t=>{for(const e of t.args)e?.deoptimizePath(ie)},pa=(t,e)=>{t.args[0]?.includePath(ie,e),ah(t,e)},ah=({args:t},e)=>{for(let n=1;n<t.length;n++){const s=t[n];s&&(s.includePath(ie,e),s.include(e,!1))}},Mn={args:[null],type:0},fa={args:[null,ve],type:1},Ks={args:[null],type:2,withNew:!1},ma="ArrowFunctionExpression",Js="CallExpression",lh="ExportDefaultDeclaration",Xt="ExpressionStatement",ga="Identifier",cr="Program",ch="Property";function Wm(t,e){return t.start<=e&&e<t.end}function ya(t,e,n){return(function(s,i={}){const{offsetLine:r=0,offsetColumn:a=0}=i;let l=0;const c=s.split(`
17
- `).map((d,m)=>{const f=l+d.length+1,g={start:l,end:f,line:m};return l=f,g});let u=0;return function(d,m){if(typeof d=="string"&&(d=s.indexOf(d,m??0)),d===-1)return;let f=c[u];const g=d>=f.end?1:-1;for(;f;){if(Wm(f,d))return{line:r+f.line,column:a+d-f.start,character:d};u+=g,f=c[u]}}})(t,n)(e,n&&n.startIndex)}function ba(t){return t.replace(/^\t+/,e=>e.split(" ").join(" "))}const Gm="...";function uh(t,e,n){let s=t.split(`
18
- `);if(e>s.length)return"";const i=Math.max(ba(s[e-1].slice(0,n)).length+10+3,120),r=Math.max(0,e-3);let a=Math.min(e+2,s.length);for(s=s.slice(r,a);!/\S/.test(s[s.length-1]);)s.pop(),a-=1;const l=String(a).length;return s.map((c,u)=>{const d=r+u+1===e;let m=String(u+r+1);for(;m.length<l;)m=` ${m}`;let f=ba(c);if(f.length>i&&(f=`${f.slice(0,i-3)}${Gm}`),d){const g=(function(E){let x="";for(;E--;)x+=" ";return x})(l+2+ba(c.slice(0,n)).length)+"^";return`${m}: ${f}
19
- ${g}`}return`${m}: ${f}`}).join(`
20
- `)}const Xm="silent",ye="warn",Fn="info",Ys="debug",Bn={[Ys]:0,[Fn]:1,[Xm]:3,[ye]:2};function un(t,e){const n=t.length<=1,s=t.map(r=>`"${r}"`);let i=n?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;return e&&(i+=` ${n?e[0]:e[1]}`),i}function xa(t){const e=Gt(t);return e.slice(0,Math.max(0,e.length-En(t).length))}function xe(t){return Wt(t)?Dn(St(),t):t}function ur(t){return t[0]==="/"||t[0]==="."&&(t[1]==="/"||t[1]===".")||Wt(t)}const Km=/^(\.\.\/)*\.\.$/;function hh(t,e,n,s){for(;e.startsWith("../");)e=e.slice(3),t="_/"+t;let i=ln(Dn(cn(t),e));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(i==="")return"../"+Gt(e);if(Km.test(i))return[...i.split("/"),"..",Gt(e)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function ot(t){return`https://rollupjs.org/${t}`}const dh="troubleshooting/#error-name-is-not-exported-by-module",hr="configuration-options/#jsx",ph="configuration-options/#output-amd-id",Qs="configuration-options/#output-dir",ka="configuration-options/#output-exports",fh="configuration-options/#output-format",mh="configuration-options/#output-inlinedynamicimports",Ea="configuration-options/#output-interop",gh="configuration-options/#output-manualchunks",yh="configuration-options/#output-name",Jm="configuration-options/#output-sourcemapfile",ys="plugin-development/#generatebundle";function re(t){throw t instanceof Error?t:bs(t)}function bs(t){xh(t);const e=Object.assign(new Error(t.message),t);return Object.defineProperty(e,"name",{value:"RollupError",writable:!0}),e}function dr(t,e,n,s){if(typeof e=="object"){const{line:i,column:r}=e;t.loc={column:r,file:s,line:i}}else{t.pos=e;const i=ya(n,e,{offsetLine:1});if(!i)return;const{line:r,column:a}=i;t.loc={column:a,file:s,line:r}}if(t.frame===void 0){const{line:i,column:r}=t.loc;t.frame=uh(n,i,r)}}const bh=Symbol("augmented");function xh(t){if(!t.plugin&&!t.loc||t[bh])return;t[bh]=!0;let e="";t.plugin&&(e+=`[plugin ${t.plugin}] `);const n=t.id||t.loc?.file;if(n){const i=t.loc?` (${t.loc.line}:${t.loc.column})`:"";e+=`${xe(n)}${i}: `}const s=t.message;t.message=e+t.message,Rh(t,s)}const kh="INVALID_EXPORT_OPTION",Eh="INVALID_IMPORT_ATTRIBUTE",Ah="INVALID_PLUGIN_HOOK",wh="MISSING_EXPORT",Aa="MISSING_IMPLICIT_DEPENDANT",Sh="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Ih="PARSE_ERROR",vh="SOURCEMAP_BROKEN",_h="UNEXPECTED_NAMED_IMPORT",Ph="UNRESOLVED_ENTRY",Nh="UNRESOLVED_IMPORT";function Ym(t){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t}" - no asset source set.`}}function $h(t){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${t}").`}}function Qm({fileName:t,code:e},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${t}" is not valid JavaScript: ${s}.`};return dr(i,n,e,t),i}function Zm(t){return{code:"CIRCULAR_DEPENDENCY",ids:t,message:`Circular dependency: ${t.map(xe).join(" -> ")}`}}function eg(t,e,n,s,i){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:e,id:s,message:`Export "${t}" of module "${xe(e)}" was reexported through module "${xe(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.
21
- Either change the import in "${xe(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 tg(t,e,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${xe(e)} is at (${n}:${s})
22
- ${uh(t,n,s)}`}}function Ch(t,e){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${t}" in "${xe(e)}".`}}function pr(t,e,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${xe(s)}" tried to import "${xe(n)}" with ${Th(e)} attributes, but it was already imported elsewhere with ${Th(t)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const Th=t=>{const e=Object.entries(t);return e.length===0?"no":e.map(([n,s])=>`"${n}": "${s}"`).join(", ")};function ng(t,e,n){return{code:"INVALID_ANNOTATION",id:e,message:`A comment
23
-
24
- "${t}"
25
-
26
- in "${xe(e)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:ot(n==="noSideEffects"?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function sg(t,e){return{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${e}" hook used by the output plugin ${t} 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 Rh(t,e){return t.stack&&(t.stack=t.stack.replace(e,t.message)),t}function Dh(t,e,n){return{code:kh,message:`"${t}" was specified for "output.exports", but entry module "${xe(n)}" has the following exports: ${un(e)}`,url:ot(ka)}}function Oh(t){return{code:Eh,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${xe(t)}". Import attributes need to have string keys and values.`}}function nt(t,e,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${s===void 0?"":`${JSON.stringify(s)} `}for option "${t}" - ${n}.`,url:ot(e)}}function ig(t,e){return{binding:t,code:wh,exporter:e,message:`Exported variable "${t}" is not defined in "${xe(e)}".`,url:ot(dh)}}function fr(t,e,n,s){const i={binding:t,code:wh,exporter:n,id:e,url:ot(dh)};if(s)return{...i,message:`Exported variable "${t}" is not defined in "${xe(n)}", but it is imported by "${xe(e)}".`};const r=En(n)===".json";return{...i,message:`"${t}" is not exported by "${xe(n)}", imported by "${xe(e)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function rg(t){const e=[...t.implicitlyLoadedBefore].map(n=>xe(n.id)).sort();return{code:Aa,message:`Module "${xe(t.id)}" that should be implicitly loaded before ${un(e)} 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 Lh(t,e,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are
27
- ${t} chunks, of which
28
- ${e} are below minChunkSize.`}}function mr(t,e){return{code:Ih,message:t,pos:e}}function xs(t){return{code:"REDECLARATION_ERROR",message:`Identifier "${t}" has already been declared`}}function Mh(t){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${t}"`}}function wa(t,e){let n=t.message.replace(/ \(\d+:\d+\)$/,"");return e.endsWith(".json")?n+=" (Note that you need @rollup/plugin-json to import JSON files)":e.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),Rh({cause:t,code:Ih,id:e,message:n,stack:t.stack},t.message)}function Zs(t,e,{hook:n,id:s}={}){const i=t.code;return t.pluginCode||i==null||typeof i=="string"&&i.startsWith("PLUGIN_")||(t.pluginCode=i),t.code="PLUGIN_ERROR",t.plugin=e,n&&(t.hook=n),s&&(t.id=s),t}function og(t){return{code:vh,message:`Multiple conflicting contents for sourcemap source ${t}`}}function Fh(t,e,n){const s=n?"reexport":"import";return{code:_h,exporter:t,message:`The named export "${e}" was ${s}ed from the external module "${xe(t)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:ot(Ea)}}function ag(t){return{code:_h,exporter:t,message:`There was a namespace "*" reexport from the external module "${xe(t)}" 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:ot(Ea)}}function It(t){return{code:"VALIDATION_ERROR",message:t}}function jn(t,e,n,s,i){(function(r,a,l,c,u){if(l||u){const d=(function(m,f){return{code:"DEPRECATED_FEATURE",message:m,url:ot(f)}})(r,a);if(u)return re(d);c(ye,d)}})(t,e,n,s.onLog,s.strictDeprecations)}const Sa=Symbol("PureFunction");class zn extends Pt{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===Js&&e.parent.callee===e||e.parent.type===lh||(this.onlyFunctionCallUsed=!1)}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,n){if(this.globalName)return this.globalName;if(n?.(this))return this.name;if(this.renderedLikeHoisted)return this.renderedLikeHoisted.getName(e,n);const s=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(s)}`:s}hasEffectsOnInteractionAtPath(e,{type:n},s){return n!==0||e.length>0}includePath(e,n){this.included=!0,this.renderedLikeHoisted?.includePath(e,n)}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,n){this.renderBaseName=e,this.renderName=n}}class ei extends zn{constructor(e,n){super(n),this.referenced=!1,this.module=e,this.isNamespace=n==="*"}addReference(e){this.referenced=!0,this.name!=="default"&&this.name!=="*"||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:n}){return n!==0||e.length>(this.isNamespace?1:0)}includePath(e,n){super.includePath(e,n),this.module.used=!0}}function Bh(t,e){for(const n of e){const s=Object.getOwnPropertyDescriptor(t,n).get;Object.defineProperty(t,n,{get(){const i=s.call(t);return Object.defineProperty(t,n,{value:i}),i}})}}const gr=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","exports","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"]),jh=/[^\w$]/g,zh=t=>(e=>/\d/.test(e[0]))(t)||gr.has(t)||t==="arguments";function yr(t){return t=t.replace(/-(\w)/g,(e,n)=>n.toUpperCase()).replace(jh,"_"),zh(t)&&(t=`_${t}`),t||"_"}const br=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,lg=/^(?:0|[1-9]\d*)$/;function xr(t){return br.test(t)?t==="__proto__"?'["__proto__"]':t:lg.test(t)&&+t<=Number.MAX_SAFE_INTEGER?t:JSON.stringify(t)}function ks(t){return br.test(t)?t:JSON.stringify(t)}class Ze{constructor(e,n,s,i,r,a){this.options=e,this.id=n,this.renormalizeRenderPath=r,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=yr(n.split(/[/\\]/).pop());const{importers:l,dynamicImporters:c}=this;this.info={ast:null,attributes:a,code:null,dynamicallyImportedIdResolutions:Qe,dynamicallyImportedIds:Qe,get dynamicImporters(){return c.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:n,implicitlyLoadedAfterOneOf:Qe,implicitlyLoadedBefore:Qe,importedIdResolutions:Qe,importedIds:Qe,get importers(){return l.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:i,moduleSideEffects:s,safeVariableNames:null,syntheticNamedExports:!1}}cacheInfoGetters(){Bh(this.info,["dynamicImporters","importers"])}getVariableForExportName(e,{importChain:n}){const s=this.declarations.get(e);for(const r of n)bt(this.importersByExportedName,e,wn).add(r);if(s)return[s];const i=new ei(this,e);return this.declarations.set(e,i),this.exportedVariables.set(i,e),[i]}suggestName(e){const n=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,n),n>this.mostCommonSuggestion&&(this.mostCommonSuggestion=n,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter(([l,c])=>l!=="*"&&!c.included&&!this.reexported&&!c.referenced).map(([l])=>l);if(e.length===0)return;const n=new Set;for(const l of e){const c=this.importersByExportedName.get(l);for(const u of this.importers)c?.has(u)&&n.add(u)}const s=[...n];var i,r,a;this.options.onLog(ye,{code:"UNUSED_EXTERNAL_IMPORT",exporter:i=this.id,ids:a=s,message:`${un(r=e,["is","are"])} imported from external module "${i}" but never used in ${un(a.map(l=>xe(l)))}.`,names:r})}}function Es(t){t.isExecuted=!0;const e=[t],n=new Set;for(const s of e)for(const i of[...s.dependencies,...s.implicitlyLoadedBefore])i instanceof Ze||i.isExecuted||!i.info.moduleSideEffects&&!s.implicitlyLoadedBefore.has(i)||n.has(i.id)||(i.isExecuted=!0,n.add(i.id),e.push(i))}const Rt=()=>{};var yt=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const As="_rollupAnnotations",Vh="_rollupRemoved",Dt=(t,e)=>{if(t===0)return Qe;const n=e[t++],s=new Array(n);for(let i=0;i<n;i++)s[i]=cg(e[t++],e);return s},cg=(t,e)=>{const n=e[t++];return{end:e[t++],start:n,type:yt[e[t]]}},Vn={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"]},Uh="variables",Kt=Symbol("IS_SKIPPED_CHAIN");class Z extends Pt{get deoptimized(){return Oe(this.flags,2)}set deoptimized(e){this.flags=Le(this.flags,2,e)}constructor(e,n){super(),this.parent=e,this.scope=n,this.createScope(n)}addExportedVariables(e,n){}bind(){for(const e of Vn[this.type]){const n=this[e];if(Array.isArray(n))for(const s of n)s?.bind();else n&&n.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const n of Vn[this.type]){const s=this[n];if(s!==null){if(Array.isArray(s)){for(const i of s)if(i?.hasEffects(e))return!0}else if(s.hasEffects(e))return!0}}return!1}hasEffectsAsAssignmentTarget(e,n){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(ae,this.assignmentInteraction,e)}include(e,n,s){this.included||this.includeNode(e);for(const i of Vn[this.type]){const r=this[i];if(r!==null)if(Array.isArray(r))for(const a of r)a?.include(e,n);else r.include(e,n)}}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const n of Vn[this.type]){const s=this[n];if(s!==null)if(Array.isArray(s))for(const i of s)i?.includePath(ie,e);else s.includePath(ie,e)}}includeAsAssignmentTarget(e,n,s){this.include(e,n)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}parseNode(e){for(const[n,s]of Object.entries(e))if(!this.hasOwnProperty(n))if(n.charCodeAt(0)===95)n===As?this.annotations=s:n===Vh&&(this.invalidAnnotations=s);else if(typeof s!="object"||s===null)this[n]=s;else if(Array.isArray(s)){this[n]=new Array(s.length);let i=0;for(const r of s)this[n][i++]=r===null?null:new(this.scope.context.getNodeConstructor(r.type))(this,this.scope).parseNode(r)}else this[n]=new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s);return Vn[e.type]||=(function(n){return Object.keys(n).filter(s=>typeof n[s]=="object"&&s.charCodeAt(0)!==95)})(e),this.initialise(),this}removeAnnotations(e){if(this.annotations)for(const n of this.annotations)e.remove(n.start,n.end)}render(e,n){for(const s of Vn[this.type]){const i=this[s];if(i!==null)if(Array.isArray(i))for(const r of i)r?.render(e,n);else i.render(e,n)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(gs())}applyDeoptimizations(){this.deoptimized=!0;for(const e of Vn[this.type]){const n=this[e];if(n!==null)if(Array.isArray(n))for(const s of n)s?.deoptimizePath(ie);else n.deoptimizePath(ie)}this.scope.context.requestTreeshakingPass()}}function dt(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function ze(){this.included=!0}function Te(){this.deoptimized=!0}function ug(t){return t instanceof Z&&t.type===ma}function hg(t){return t instanceof Z&&t.type==="FunctionExpression"}function dg(t){return t instanceof Z&&t.type===Js}function pg(t){return t instanceof Z&&t.type==="MemberExpression"}function Ia(t){return t instanceof Z&&t.type==="ImportExpression"}function fg(t){return t instanceof Z&&t.type===ga}function ti(t,e=null){return Object.create(e,t)}const hn=new class extends Pt{getLiteralValueAtPath(t){return t.length>0?Ce:void 0}},Un={value:{hasEffectsWhenCalled:null,returns:ve}},va=new class extends Pt{getReturnExpressionWhenCalledAtPath(t){return t.length===1?ii(Pa,t[0]):rt}hasEffectsOnInteractionAtPath(t,e,n){return e.type===0?t.length>1:e.type!==2||t.length!==1||si(Pa,t[0],e,n)}},In={value:{hasEffectsWhenCalled:null,returns:va}},ws=new class extends Pt{getReturnExpressionWhenCalledAtPath(t){return t.length===1?ii(Na,t[0]):rt}hasEffectsOnInteractionAtPath(t,e,n){return e.type===0?t.length>1:e.type!==2||t.length!==1||si(Na,t[0],e,n)}},Ss={value:{hasEffectsWhenCalled:null,returns:ws}},_a=new class extends Pt{getReturnExpressionWhenCalledAtPath(t){return t.length===1?ii(ni,t[0]):rt}hasEffectsOnInteractionAtPath(t,e,n){return e.type===0?t.length>1:e.type!==2||t.length!==1||si(ni,t[0],e,n)}},Re={value:{hasEffectsWhenCalled:null,returns:_a}},qh={value:{hasEffectsWhenCalled({args:t},e){const n=t[2];return t.length<3||typeof n.getLiteralValueAtPath(ae,qe,{deoptimizeCache(){}})=="symbol"&&n.hasEffectsOnInteractionAtPath(ae,Ks,e)},returns:_a}},kr=ti({hasOwnProperty:In,isPrototypeOf:In,propertyIsEnumerable:In,toLocaleString:Re,toString:Re,valueOf:Un}),Pa=ti({valueOf:In},kr),Na=ti({toExponential:Re,toFixed:Re,toLocaleString:Re,toPrecision:Re,valueOf:Ss},kr),mg=ti({exec:Un,test:In},kr),ni=ti({anchor:Re,at:Un,big:Re,blink:Re,bold:Re,charAt:Re,charCodeAt:Ss,codePointAt:Un,concat:Re,endsWith:In,fixed:Re,fontcolor:Re,fontsize:Re,includes:In,indexOf:Ss,italics:Re,lastIndexOf:Ss,link:Re,localeCompare:Ss,match:Un,matchAll:Un,normalize:Re,padEnd:Re,padStart:Re,repeat:Re,replace:qh,replaceAll:qh,search:Ss,slice:Re,small:Re,split:Un,startsWith:In,strike:Re,sub:Re,substr:Re,substring:Re,sup:Re,toLocaleLowerCase:Re,toLocaleUpperCase:Re,toLowerCase:Re,toString:Re,toUpperCase:Re,trim:Re,trimEnd:Re,trimLeft:Re,trimRight:Re,trimStart:Re,valueOf:Re},kr);function si(t,e,n,s){return typeof e!="string"||!t[e]||t[e].hasEffectsWhenCalled?.(n,s)||!1}function ii(t,e){return typeof e=="string"&&t[e]?[t[e].returns,!1]:rt}class xt extends Pt{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:n},s){if(n===2&&s.length===0&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(da),this.description.mutatesArgs))for(let i=1;i<e.length;i++)e[i].deoptimizePath(ie)}getReturnExpressionWhenCalledAtPath(e,{args:n}){return e.length>0?rt:[this.description.returnsPrimitive||(this.description.returns==="self"?n[0]||ve:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,{args:n,type:s},i){if(e.length>(s===0?1:0))return!0;if(s===2){if(this.description.mutatesSelfAsArray===!0&&n[0]?.hasEffectsOnInteractionAtPath(da,fa,i))return!0;if(this.description.callsArgs){for(const r of this.description.callsArgs)if(n[r+1]?.hasEffectsOnInteractionAtPath(ae,Ks,i))return!0}}return!1}}const Er=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:va})],ri=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:_a})],Hh=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ws})],Wh=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ve})],oi=/^\d+$/;class Nt extends Pt{get hasLostTrack(){return Oe(this.flags,2048)}set hasLostTrack(e){this.flags=Le(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return Oe(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=Le(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return Oe(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=Le(this.flags,8192,e)}constructor(e,n,s=!1){if(super(),this.prototypeExpression=n,this.immutable=s,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 i of e.values())this.allProperties.push(...i)}}deoptimizeAllProperties(e){const n=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!n){for(const s of[...this.propertiesAndGettersByKey.values(),...this.settersByKey.values()])for(const i of s)i.deoptimizePath(ie);this.prototypeExpression?.deoptimizePath([Ie,Ie]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,n,s){const[i,...r]=n,{args:a,type:l}=e;if(this.hasLostTrack||(l===2||n.length>1)&&(this.hasUnknownDeoptimizedProperty||Mt(i)&&this.deoptimizedPaths.get(i)))return void Sn(e);const[c,u,d]=l===2||n.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:l===0?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(Mt(i)){if(c.get(i)){const m=u.get(i);if(m)for(const f of m)f.deoptimizeArgumentsOnInteractionAtPath(e,r,s);if(!this.immutable)for(const f of a)f&&this.additionalExpressionsToBeDeoptimized.add(f);return}for(const m of d)m.deoptimizeArgumentsOnInteractionAtPath(e,r,s);if(typeof i=="string"&&oi.test(i))for(const m of this.unknownIntegerProps)m.deoptimizeArgumentsOnInteractionAtPath(e,r,s)}else{for(const m of[...u.values(),d])for(const f of m)f.deoptimizeArgumentsOnInteractionAtPath(e,r,s);for(const m of this.unknownIntegerProps)m.deoptimizeArgumentsOnInteractionAtPath(e,r,s)}if(!this.immutable)for(const m of a)m&&this.additionalExpressionsToBeDeoptimized.add(m);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,n]of this.propertiesAndGettersByKey.entries())if(typeof e=="string"&&oi.test(e))for(const s of n)s.deoptimizePath(ie);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const n=e[0];if(e.length===1){if(n===ps)return this.deoptimizeIntegerProperties();if(!Mt(n))return this.deoptimizeAllProperties(n===sr);if(!this.deoptimizedPaths.get(n)){this.deoptimizedPaths.set(n,!0);const i=this.expressionsToBeDeoptimizedByKey.get(n);if(i)for(const r of i)r.deoptimizeCache()}}const s=e.length===1?ie:e.slice(1);for(const i of Mt(n)?[...this.propertiesAndGettersByKey.get(n)||this.unmatchablePropertiesAndGetters,...this.settersByKey.get(n)||this.unmatchableSetters]:this.allProperties)i.deoptimizePath(s);this.prototypeExpression?.deoptimizePath(e.length===1?[e[0],Ie]:e)}getLiteralValueAtPath(e,n,s){if(e.length===0)return Ce;const i=e[0],r=this.getMemberExpressionAndTrackDeopt(i,s);return r?r.getLiteralValueAtPath(e.slice(1),n,s):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,n,s):e.length!==1?Ce:void 0}getReturnExpressionWhenCalledAtPath(e,n,s,i){if(e.length===0)return rt;const[r,...a]=e,l=this.getMemberExpressionAndTrackDeopt(r,i);return l?l.getReturnExpressionWhenCalledAtPath(a,n,s,i):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,n,s,i):rt}hasEffectsOnInteractionAtPath(e,n,s){const[i,...r]=e;if(r.length>0||n.type===2){const u=this.getMemberExpression(i);return u?u.hasEffectsOnInteractionAtPath(r,n,s):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,n,s)}if(i===sr)return!1;if(this.hasLostTrack)return!0;const[a,l,c]=n.type===0?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(Mt(i)){if(a.get(i)){const u=l.get(i);if(u){for(const d of u)if(d.hasEffectsOnInteractionAtPath(r,n,s))return!0}return!1}for(const u of c)if(u.hasEffectsOnInteractionAtPath(r,n,s))return!0}else for(const u of[...l.values(),c])for(const d of u)if(d.hasEffectsOnInteractionAtPath(r,n,s))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,n,s)}include(e,n){this.included=!0;for(const s of this.allProperties)(n||s.shouldBeIncluded(e)||this.alwaysIncludedProperties.has(s))&&s.include(e,n);this.prototypeExpression?.include(e,n)}includePath(e,n){this.included=!0;for(const l of this.alwaysIncludedProperties)l.includePath(ie,n);if(e.length===0)return;const[s,...i]=e,[r,a]=Mt(s)?[new Set([...this.propertiesAndGettersByKey.get(s)||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey.get(s)||this.unmatchablePropertiesAndSetters]),i]:[this.allProperties,ie];for(const l of r)l.includePath(a,n);this.prototypeExpression?.includePath(e,n)}buildPropertyMaps(e){const{allProperties:n,alwaysIncludedProperties:s,propertiesAndGettersByKey:i,propertiesAndSettersByKey:r,settersByKey:a,gettersByKey:l,unknownIntegerProps:c,unmatchablePropertiesAndGetters:u,unmatchablePropertiesAndSetters:d,unmatchableGetters:m,unmatchableSetters:f}=this;for(let g=e.length-1;g>=0;g--){const{key:E,kind:x,property:A}=e[g];if(n.push(A),!ha(E)||Bm.has(E)||(s.add(A),E!==la))if(Mt(E))x==="set"?r.has(E)||(r.set(E,[A,...d]),a.set(E,[A,...f])):x==="get"?i.has(E)||(i.set(E,[A,...u]),l.set(E,[A,...m])):(r.has(E)||r.set(E,[A,...d]),i.has(E)||i.set(E,[A,...u]));else{if(E===ps){c.push(A);continue}x==="set"&&f.push(A),x==="get"&&m.push(A),x!=="get"&&d.push(A),x!=="set"&&u.push(A)}}}deoptimizeCachedEntities(){for(const e of this.expressionsToBeDeoptimizedByKey.values())for(const n of e)n.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(ie)}deoptimizeCachedIntegerEntities(){for(const[e,n]of this.expressionsToBeDeoptimizedByKey.entries())if(typeof e=="string"&&oi.test(e))for(const s of n)s.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(da)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!Mt(e)||this.hasUnknownDeoptimizedInteger&&typeof e=="string"&&oi.test(e)||this.deoptimizedPaths.get(e))return ve;const n=this.propertiesAndGettersByKey.get(e);return n?.length===1?n[0]:n||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&typeof e=="string"&&oi.test(e)?ve:null}getMemberExpressionAndTrackDeopt(e,n){if(!Mt(e))return ve;const s=this.getMemberExpression(e);if(s!==ve&&!this.immutable){let i=this.expressionsToBeDeoptimizedByKey.get(e);i||this.expressionsToBeDeoptimizedByKey.set(e,i=[]),i.push(n)}return s}}const Gh=t=>typeof t=="string"&&/^\d+$/.test(t),gg=new class extends Pt{deoptimizeArgumentsOnInteractionAtPath(t,e){t.type!==2||e.length!==1||Gh(e[0])||Sn(t)}getLiteralValueAtPath(t){return t.length===1&&Gh(t[0])?void 0:Ce}hasEffectsOnInteractionAtPath(t,{type:e}){return t.length>1||e===2}},vn=new Nt(new Map([["hasOwnProperty",Er],["isPrototypeOf",Er],["propertyIsEnumerable",Er],["toLocaleString",ri],["toString",ri],["valueOf",Wh]]),gg,!0),$a=[{key:ps,kind:"init",property:ve},{key:"length",kind:"init",property:ws}],Xh=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:va})],Kh=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ws})],yg=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new Nt($a,wr),returnsPrimitive:null})],Ar=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Nt($a,wr),returnsPrimitive:null})],Ca=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Nt($a,wr),returnsPrimitive:null})],Jh=[new xt({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ws})],Yh=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ve})],Qh=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ve})],ai=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ve})],Ta=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],bg=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],wr=new Nt(new Map([["at",Qh],["concat",Ar],["copyWithin",Ta],["entries",Ar],["every",Xh],["fill",Ta],["filter",Ca],["find",ai],["findIndex",Kh],["findLast",ai],["findLastIndex",Kh],["flat",Ar],["flatMap",Ca],["forEach",ai],["includes",Er],["indexOf",Hh],["join",ri],["keys",Wh],["lastIndexOf",Hh],["map",Ca],["pop",Yh],["push",Jh],["reduce",ai],["reduceRight",ai],["reverse",Ta],["shift",Yh],["slice",Ar],["some",Xh],["sort",bg],["splice",yg],["toLocaleString",ri],["toString",ri],["unshift",Jh],["values",Qh]]),vn,!0);class qn extends Z{deoptimizeArgumentsOnInteractionAtPath(e,n,s){n.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,ie,s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:n}=this.scope.context.options.treeshake;return this.argument.hasEffects(e)||n&&(n==="always"||this.argument.hasEffectsOnInteractionAtPath(ie,Mn,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(ie,e)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([Ie,Ie]),this.scope.context.requestTreeshakingPass()}}class Ra extends Z{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,n,s){return this.getObjectEntity().getLiteralValueAtPath(e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,n,s,i)}hasEffectsOnInteractionAtPath(e,n,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,n,s)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const n of this.elements)n&&n?.includePath(ie,e)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];s&&(e||s instanceof qn)&&(e=!0,s.deoptimizePath(ie))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;const e=[{key:"length",kind:"init",property:ws}];let n=!1;for(let s=0;s<this.elements.length;s++){const i=this.elements[s];n||i instanceof qn?i&&(n=!0,e.unshift({key:ps,kind:"init",property:i})):i?e.push({key:String(s),kind:"init",property:i}):e.push({key:String(s),kind:"init",property:hn})}return this.objectEntity=new Nt(e,wr)}}const Ke=Symbol("Value Properties"),Hn=()=>Ce,Zh=()=>!1,Sr=()=>!0,Ir=t=>({__proto__:null,[Ke]:{deoptimizeArgumentsOnCall:Rt,getLiteralValue:()=>t,hasEffectsWhenCalled:Sr}}),Jt={deoptimizeArgumentsOnCall:Rt,getLiteralValue:Hn,hasEffectsWhenCalled:Zh},dn={deoptimizeArgumentsOnCall:Rt,getLiteralValue:Hn,hasEffectsWhenCalled:Sr},xg={deoptimizeArgumentsOnCall:Rt,getLiteralValue:Hn,hasEffectsWhenCalled:({args:t})=>t.length>1&&!(t[1]instanceof Ra)},kg={deoptimizeArgumentsOnCall:Rt,getLiteralValue:Hn,hasEffectsWhenCalled({args:t},e){const[n,s]=t;return!(s instanceof Pt)||s.hasEffectsOnInteractionAtPath(ie,Mn,e)}},q={__proto__:null,[Ke]:dn},ce={__proto__:null,[Ke]:Jt},ed={__proto__:null,[Ke]:kg},Da={__proto__:null,[Ke]:{deoptimizeArgumentsOnCall({args:[,t]}){t?.deoptimizePath(ie)},getLiteralValue:Hn,hasEffectsWhenCalled:({args:t},e)=>t.length<=1||t[1].hasEffectsOnInteractionAtPath(jm,fa,e)}},p={__proto__:null,[Ke]:dn,prototype:q},Bt={__proto__:null,[Ke]:Jt,prototype:q},li={__proto__:null,[Ke]:xg,prototype:q},pn={__proto__:null,[Ke]:Jt,from:q,of:ce,prototype:q},fn={__proto__:null,[Ke]:Jt,supportedLocalesOf:Bt},Eg={deoptimizeArgumentsOnCall:Rt,getLiteralValue:()=>la,hasEffectsWhenCalled:Sr},Oa={global:q,globalThis:q,self:q,window:q,__proto__:null,[Ke]:dn,Array:{__proto__:null,[Ke]:dn,from:q,isArray:ce,of:ce,prototype:q},ArrayBuffer:{__proto__:null,[Ke]:Jt,isView:ce,prototype:q},AggregateError:li,Atomics:q,BigInt:p,BigInt64Array:p,BigUint64Array:p,Boolean:Bt,constructor:p,DataView:Bt,Date:{__proto__:null,[Ke]:Jt,now:ce,parse:ce,prototype:q,UTC:ce},decodeURI:ce,decodeURIComponent:ce,encodeURI:ce,encodeURIComponent:ce,Error:Bt,escape:ce,eval:q,EvalError:Bt,FinalizationRegistry:p,Float32Array:pn,Float64Array:pn,Function:p,hasOwnProperty:q,Infinity:q,Int16Array:pn,Int32Array:pn,Int8Array:pn,isFinite:ce,isNaN:ce,isPrototypeOf:q,JSON:q,Map:li,Math:{__proto__:null,[Ke]:dn,abs:ce,acos:ce,acosh:ce,asin:ce,asinh:ce,atan:ce,atan2:ce,atanh:ce,cbrt:ce,ceil:ce,clz32:ce,cos:ce,cosh:ce,exp:ce,expm1:ce,floor:ce,fround:ce,hypot:ce,imul:ce,log:ce,log10:ce,log1p:ce,log2:ce,max:ce,min:ce,pow:ce,random:ce,round:ce,sign:ce,sin:ce,sinh:ce,sqrt:ce,tan:ce,tanh:ce,trunc:ce},NaN:q,Number:{__proto__:null,[Ke]:Jt,isFinite:ce,isInteger:ce,isNaN:ce,isSafeInteger:ce,parseFloat:ce,parseInt:ce,prototype:q},Object:{__proto__:null,[Ke]:Jt,create:ce,defineProperty:Da,defineProperties:Da,freeze:Da,getOwnPropertyDescriptor:ce,getOwnPropertyDescriptors:ce,getOwnPropertyNames:ce,getOwnPropertySymbols:ce,getPrototypeOf:ce,hasOwn:ce,is:ce,isExtensible:ce,isFrozen:ce,isSealed:ce,keys:ce,fromEntries:q,entries:ed,values:ed,prototype:q},parseFloat:ce,parseInt:ce,Promise:{__proto__:null,[Ke]:dn,all:q,allSettled:q,any:q,prototype:q,race:q,reject:q,resolve:q},propertyIsEnumerable:q,Proxy:{__proto__:null,[Ke]:{deoptimizeArgumentsOnCall:({args:[,t,e]})=>{if((n=e)instanceof Z&&n.type==="ObjectExpression"&&!e.properties.some(i=>!(function(r){return r instanceof Z&&r.type===ch})(i))){for(const i of e.properties)i.deoptimizeArgumentsOnInteractionAtPath({args:[null,t],type:2,withNew:!1},ae,qe);return}var n;t.deoptimizePath(ie)},getLiteralValue:Hn,hasEffectsWhenCalled:Sr}},RangeError:Bt,ReferenceError:Bt,Reflect:q,RegExp:Bt,Set:li,SharedArrayBuffer:p,String:{__proto__:null,[Ke]:Jt,fromCharCode:ce,fromCodePoint:ce,prototype:q,raw:ce},Symbol:{__proto__:null,[Ke]:Jt,for:ce,keyFor:ce,prototype:q,asyncDispose:Ir(rr),dispose:Ir(ir),hasInstance:Ir(or),toStringTag:Ir(ca)},SyntaxError:Bt,toLocaleString:q,toString:q,TypeError:Bt,Uint16Array:pn,Uint32Array:pn,Uint8Array:pn,Uint8ClampedArray:pn,unescape:ce,URIError:Bt,valueOf:q,WeakMap:li,WeakRef:p,WeakSet:li,clearInterval:p,clearTimeout:p,console:{__proto__:null,[Ke]:dn,assert:p,clear:p,count:p,countReset:p,debug:p,dir:p,dirxml:p,error:p,exception:p,group:p,groupCollapsed:p,groupEnd:p,info:p,log:p,table:p,time:p,timeEnd:p,timeLog:p,trace:p,warn:p},Intl:{__proto__:null,[Ke]:dn,Collator:fn,DateTimeFormat:fn,DisplayNames:fn,ListFormat:fn,Locale:fn,NumberFormat:fn,PluralRules:fn,RelativeTimeFormat:fn,Segmenter:fn},setInterval:p,setTimeout:p,TextDecoder:p,TextEncoder:p,URL:{__proto__:null,[Ke]:dn,prototype:q,canParse:ce},URLSearchParams:p,AbortController:p,AbortSignal:p,addEventListener:q,alert:q,AnalyserNode:p,Animation:p,AnimationEvent:p,applicationCache:q,ApplicationCache:p,ApplicationCacheErrorEvent:p,atob:q,Attr:p,Audio:p,AudioBuffer:p,AudioBufferSourceNode:p,AudioContext:p,AudioDestinationNode:p,AudioListener:p,AudioNode:p,AudioParam:p,AudioProcessingEvent:p,AudioScheduledSourceNode:p,AudioWorkletNode:p,BarProp:p,BaseAudioContext:p,BatteryManager:p,BeforeUnloadEvent:p,BiquadFilterNode:p,Blob:p,BlobEvent:p,blur:q,BroadcastChannel:p,btoa:q,ByteLengthQueuingStrategy:p,Cache:p,caches:q,CacheStorage:p,cancelAnimationFrame:q,cancelIdleCallback:q,CanvasCaptureMediaStreamTrack:p,CanvasGradient:p,CanvasPattern:p,CanvasRenderingContext2D:p,ChannelMergerNode:p,ChannelSplitterNode:p,CharacterData:p,clientInformation:q,ClipboardEvent:p,close:q,closed:q,CloseEvent:p,Comment:p,CompositionEvent:p,confirm:q,ConstantSourceNode:p,ConvolverNode:p,CountQueuingStrategy:p,createImageBitmap:q,Credential:p,CredentialsContainer:p,crypto:q,Crypto:p,CryptoKey:p,CSS:p,CSSConditionRule:p,CSSFontFaceRule:p,CSSGroupingRule:p,CSSImportRule:p,CSSKeyframeRule:p,CSSKeyframesRule:p,CSSMediaRule:p,CSSNamespaceRule:p,CSSPageRule:p,CSSRule:p,CSSRuleList:p,CSSStyleDeclaration:p,CSSStyleRule:p,CSSStyleSheet:p,CSSSupportsRule:p,CustomElementRegistry:p,customElements:q,CustomEvent:{__proto__:null,[Ke]:{deoptimizeArgumentsOnCall({args:t}){t[2]?.deoptimizePath(["detail"])},getLiteralValue:Hn,hasEffectsWhenCalled:Zh},prototype:q},DataTransfer:p,DataTransferItem:p,DataTransferItemList:p,defaultstatus:q,defaultStatus:q,DelayNode:p,DeviceMotionEvent:p,DeviceOrientationEvent:p,devicePixelRatio:q,dispatchEvent:q,document:q,Document:p,DocumentFragment:p,DocumentType:p,DOMError:p,DOMException:p,DOMImplementation:p,DOMMatrix:p,DOMMatrixReadOnly:p,DOMParser:p,DOMPoint:p,DOMPointReadOnly:p,DOMQuad:p,DOMRect:p,DOMRectReadOnly:p,DOMStringList:p,DOMStringMap:p,DOMTokenList:p,DragEvent:p,DynamicsCompressorNode:p,Element:p,ErrorEvent:p,Event:p,EventSource:p,EventTarget:p,external:q,fetch:q,File:p,FileList:p,FileReader:p,find:q,focus:q,FocusEvent:p,FontFace:p,FontFaceSetLoadEvent:p,FormData:p,frames:q,GainNode:p,Gamepad:p,GamepadButton:p,GamepadEvent:p,getComputedStyle:q,getSelection:q,HashChangeEvent:p,Headers:p,history:q,History:p,HTMLAllCollection:p,HTMLAnchorElement:p,HTMLAreaElement:p,HTMLAudioElement:p,HTMLBaseElement:p,HTMLBodyElement:p,HTMLBRElement:p,HTMLButtonElement:p,HTMLCanvasElement:p,HTMLCollection:p,HTMLContentElement:p,HTMLDataElement:p,HTMLDataListElement:p,HTMLDetailsElement:p,HTMLDialogElement:p,HTMLDirectoryElement:p,HTMLDivElement:p,HTMLDListElement:p,HTMLDocument:p,HTMLElement:p,HTMLEmbedElement:p,HTMLFieldSetElement:p,HTMLFontElement:p,HTMLFormControlsCollection:p,HTMLFormElement:p,HTMLFrameElement:p,HTMLFrameSetElement:p,HTMLHeadElement:p,HTMLHeadingElement:p,HTMLHRElement:p,HTMLHtmlElement:p,HTMLIFrameElement:p,HTMLImageElement:p,HTMLInputElement:p,HTMLLabelElement:p,HTMLLegendElement:p,HTMLLIElement:p,HTMLLinkElement:p,HTMLMapElement:p,HTMLMarqueeElement:p,HTMLMediaElement:p,HTMLMenuElement:p,HTMLMetaElement:p,HTMLMeterElement:p,HTMLModElement:p,HTMLObjectElement:p,HTMLOListElement:p,HTMLOptGroupElement:p,HTMLOptionElement:p,HTMLOptionsCollection:p,HTMLOutputElement:p,HTMLParagraphElement:p,HTMLParamElement:p,HTMLPictureElement:p,HTMLPreElement:p,HTMLProgressElement:p,HTMLQuoteElement:p,HTMLScriptElement:p,HTMLSelectElement:p,HTMLShadowElement:p,HTMLSlotElement:p,HTMLSourceElement:p,HTMLSpanElement:p,HTMLStyleElement:p,HTMLTableCaptionElement:p,HTMLTableCellElement:p,HTMLTableColElement:p,HTMLTableElement:p,HTMLTableRowElement:p,HTMLTableSectionElement:p,HTMLTemplateElement:p,HTMLTextAreaElement:p,HTMLTimeElement:p,HTMLTitleElement:p,HTMLTrackElement:p,HTMLUListElement:p,HTMLUnknownElement:p,HTMLVideoElement:p,IDBCursor:p,IDBCursorWithValue:p,IDBDatabase:p,IDBFactory:p,IDBIndex:p,IDBKeyRange:p,IDBObjectStore:p,IDBOpenDBRequest:p,IDBRequest:p,IDBTransaction:p,IDBVersionChangeEvent:p,IdleDeadline:p,IIRFilterNode:p,Image:p,ImageBitmap:p,ImageBitmapRenderingContext:p,ImageCapture:p,ImageData:p,indexedDB:q,innerHeight:q,innerWidth:q,InputEvent:p,IntersectionObserver:p,IntersectionObserverEntry:p,isSecureContext:q,KeyboardEvent:p,KeyframeEffect:p,length:q,localStorage:q,location:q,Location:p,locationbar:q,matchMedia:q,MediaDeviceInfo:p,MediaDevices:p,MediaElementAudioSourceNode:p,MediaEncryptedEvent:p,MediaError:p,MediaKeyMessageEvent:p,MediaKeySession:p,MediaKeyStatusMap:p,MediaKeySystemAccess:p,MediaList:p,MediaQueryList:p,MediaQueryListEvent:p,MediaRecorder:p,MediaSettingsRange:p,MediaSource:p,MediaStream:p,MediaStreamAudioDestinationNode:p,MediaStreamAudioSourceNode:p,MediaStreamEvent:p,MediaStreamTrack:p,MediaStreamTrackEvent:p,menubar:q,MessageChannel:p,MessageEvent:p,MessagePort:p,MIDIAccess:p,MIDIConnectionEvent:p,MIDIInput:p,MIDIInputMap:p,MIDIMessageEvent:p,MIDIOutput:p,MIDIOutputMap:p,MIDIPort:p,MimeType:p,MimeTypeArray:p,MouseEvent:p,moveBy:q,moveTo:q,MutationEvent:p,MutationObserver:p,MutationRecord:p,name:q,NamedNodeMap:p,NavigationPreloadManager:p,navigator:q,Navigator:p,NetworkInformation:p,Node:p,NodeFilter:q,NodeIterator:p,NodeList:p,Notification:p,OfflineAudioCompletionEvent:p,OfflineAudioContext:p,offscreenBuffering:q,OffscreenCanvas:p,open:q,openDatabase:q,Option:p,origin:q,OscillatorNode:p,outerHeight:q,outerWidth:q,PageTransitionEvent:p,pageXOffset:q,pageYOffset:q,PannerNode:p,parent:q,Path2D:p,PaymentAddress:p,PaymentRequest:p,PaymentRequestUpdateEvent:p,PaymentResponse:p,performance:q,Performance:p,PerformanceEntry:p,PerformanceLongTaskTiming:p,PerformanceMark:p,PerformanceMeasure:p,PerformanceNavigation:p,PerformanceNavigationTiming:p,PerformanceObserver:p,PerformanceObserverEntryList:p,PerformancePaintTiming:p,PerformanceResourceTiming:p,PerformanceTiming:p,PeriodicWave:p,Permissions:p,PermissionStatus:p,personalbar:q,PhotoCapabilities:p,Plugin:p,PluginArray:p,PointerEvent:p,PopStateEvent:p,postMessage:q,Presentation:p,PresentationAvailability:p,PresentationConnection:p,PresentationConnectionAvailableEvent:p,PresentationConnectionCloseEvent:p,PresentationConnectionList:p,PresentationReceiver:p,PresentationRequest:p,print:q,ProcessingInstruction:p,ProgressEvent:p,PromiseRejectionEvent:p,prompt:q,PushManager:p,PushSubscription:p,PushSubscriptionOptions:p,queueMicrotask:q,RadioNodeList:p,Range:p,ReadableStream:p,RemotePlayback:p,removeEventListener:q,Request:p,requestAnimationFrame:q,requestIdleCallback:q,resizeBy:q,ResizeObserver:p,ResizeObserverEntry:p,resizeTo:q,Response:p,RTCCertificate:p,RTCDataChannel:p,RTCDataChannelEvent:p,RTCDtlsTransport:p,RTCIceCandidate:p,RTCIceTransport:p,RTCPeerConnection:p,RTCPeerConnectionIceEvent:p,RTCRtpReceiver:p,RTCRtpSender:p,RTCSctpTransport:p,RTCSessionDescription:p,RTCStatsReport:p,RTCTrackEvent:p,screen:q,Screen:p,screenLeft:q,ScreenOrientation:p,screenTop:q,screenX:q,screenY:q,ScriptProcessorNode:p,scroll:q,scrollbars:q,scrollBy:q,scrollTo:q,scrollX:q,scrollY:q,SecurityPolicyViolationEvent:p,Selection:p,ServiceWorker:p,ServiceWorkerContainer:p,ServiceWorkerRegistration:p,sessionStorage:q,ShadowRoot:p,SharedWorker:p,SourceBuffer:p,SourceBufferList:p,speechSynthesis:q,SpeechSynthesisEvent:p,SpeechSynthesisUtterance:p,StaticRange:p,status:q,statusbar:q,StereoPannerNode:p,stop:q,Storage:p,StorageEvent:p,StorageManager:p,styleMedia:q,StyleSheet:p,StyleSheetList:p,SubtleCrypto:p,SVGAElement:p,SVGAngle:p,SVGAnimatedAngle:p,SVGAnimatedBoolean:p,SVGAnimatedEnumeration:p,SVGAnimatedInteger:p,SVGAnimatedLength:p,SVGAnimatedLengthList:p,SVGAnimatedNumber:p,SVGAnimatedNumberList:p,SVGAnimatedPreserveAspectRatio:p,SVGAnimatedRect:p,SVGAnimatedString:p,SVGAnimatedTransformList:p,SVGAnimateElement:p,SVGAnimateMotionElement:p,SVGAnimateTransformElement:p,SVGAnimationElement:p,SVGCircleElement:p,SVGClipPathElement:p,SVGComponentTransferFunctionElement:p,SVGDefsElement:p,SVGDescElement:p,SVGDiscardElement:p,SVGElement:p,SVGEllipseElement:p,SVGFEBlendElement:p,SVGFEColorMatrixElement:p,SVGFEComponentTransferElement:p,SVGFECompositeElement:p,SVGFEConvolveMatrixElement:p,SVGFEDiffuseLightingElement:p,SVGFEDisplacementMapElement:p,SVGFEDistantLightElement:p,SVGFEDropShadowElement:p,SVGFEFloodElement:p,SVGFEFuncAElement:p,SVGFEFuncBElement:p,SVGFEFuncGElement:p,SVGFEFuncRElement:p,SVGFEGaussianBlurElement:p,SVGFEImageElement:p,SVGFEMergeElement:p,SVGFEMergeNodeElement:p,SVGFEMorphologyElement:p,SVGFEOffsetElement:p,SVGFEPointLightElement:p,SVGFESpecularLightingElement:p,SVGFESpotLightElement:p,SVGFETileElement:p,SVGFETurbulenceElement:p,SVGFilterElement:p,SVGForeignObjectElement:p,SVGGElement:p,SVGGeometryElement:p,SVGGradientElement:p,SVGGraphicsElement:p,SVGImageElement:p,SVGLength:p,SVGLengthList:p,SVGLinearGradientElement:p,SVGLineElement:p,SVGMarkerElement:p,SVGMaskElement:p,SVGMatrix:p,SVGMetadataElement:p,SVGMPathElement:p,SVGNumber:p,SVGNumberList:p,SVGPathElement:p,SVGPatternElement:p,SVGPoint:p,SVGPointList:p,SVGPolygonElement:p,SVGPolylineElement:p,SVGPreserveAspectRatio:p,SVGRadialGradientElement:p,SVGRect:p,SVGRectElement:p,SVGScriptElement:p,SVGSetElement:p,SVGStopElement:p,SVGStringList:p,SVGStyleElement:p,SVGSVGElement:p,SVGSwitchElement:p,SVGSymbolElement:p,SVGTextContentElement:p,SVGTextElement:p,SVGTextPathElement:p,SVGTextPositioningElement:p,SVGTitleElement:p,SVGTransform:p,SVGTransformList:p,SVGTSpanElement:p,SVGUnitTypes:p,SVGUseElement:p,SVGViewElement:p,TaskAttributionTiming:p,Text:p,TextEvent:p,TextMetrics:p,TextTrack:p,TextTrackCue:p,TextTrackCueList:p,TextTrackList:p,TimeRanges:p,toolbar:q,top:q,Touch:p,TouchEvent:p,TouchList:p,TrackEvent:p,TransitionEvent:p,TreeWalker:p,UIEvent:p,ValidityState:p,visualViewport:q,VisualViewport:p,VTTCue:p,WaveShaperNode:p,WebAssembly:q,WebGL2RenderingContext:p,WebGLActiveInfo:p,WebGLBuffer:p,WebGLContextEvent:p,WebGLFramebuffer:p,WebGLProgram:p,WebGLQuery:p,WebGLRenderbuffer:p,WebGLRenderingContext:p,WebGLSampler:p,WebGLShader:p,WebGLShaderPrecisionFormat:p,WebGLSync:p,WebGLTexture:p,WebGLTransformFeedback:p,WebGLUniformLocation:p,WebGLVertexArrayObject:p,WebSocket:p,WheelEvent:p,Window:p,Worker:p,WritableStream:p,XMLDocument:p,XMLHttpRequest:p,XMLHttpRequestEventTarget:p,XMLHttpRequestUpload:p,XMLSerializer:p,XPathEvaluator:p,XPathExpression:p,XPathResult:p,XSLTProcessor:p};for(const t of["window","global","self","globalThis"])Oa[t]=Oa;function Is(t){let e=Oa;for(const n of t){if(typeof n!="string")return null;if(e=e[n],!e)return t[0]==="Symbol"&&t.length===2?Eg:null}return e[Ke]}class La extends zn{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,n,s){switch(e.type){case 0:case 1:return void(Is([this.name,...n].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,n,s));case 2:{const i=Is([this.name,...n]);return void(i?i.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,n,s))}}}getLiteralValueAtPath(e,n,s){const i=Is([this.name,...e]);return i?i.getLiteralValue():Ce}hasEffectsOnInteractionAtPath(e,n,s){switch(n.type){case 0:return e.length===0?this.name!=="undefined"&&!Is([this.name]):!Is([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const i=Is([this.name,...e]);return!i||i.hasEffectsWhenCalled(n,s)}}}}const td=(t,e)=>{const{length:n}=t,{length:s}=e;return n===0?e:s===0?t:n+s>6?[...t,...e.slice(0,5-t.length),"UnknownKey"]:[...t,...e]};class Ot extends zn{constructor(e,n,s,i,r,a){super(e),this.init=s,this.initPath=i,this.kind=a,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.includedPathTracker=new Um,this.expressionsToBeDeoptimized=[],this.declarations=n?[n]:[],this.deoptimizationTracker=r.deoptimizationTracker,this.module=r.module}addDeclaration(e,n){this.declarations.push(e),this.markInitializersForDeoptimization().push(n)}consolidateInitializers(){if(this.additionalInitializers)for(const e of this.additionalInitializers)e.deoptimizePath(ie)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.isReassigned||n.length+this.initPath.length>6?Sn(e):s.withTrackedEntityAtPath(n,this.init,()=>{this.init.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...n],s)},void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(e.length===0){this.markReassigned();const n=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=Qe;for(const s of n)s.deoptimizeCache();this.init.deoptimizePath([...this.initPath,Ie])}else this.init.deoptimizePath(td(this.initPath,e))}getLiteralValueAtPath(e,n,s){return this.isReassigned||e.length+this.initPath.length>6?Ce:n.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(s),this.init.getLiteralValueAtPath([...this.initPath,...e],n,s)),Ce)}getReturnExpressionWhenCalledAtPath(e,n,s,i){return this.isReassigned||e.length+this.initPath.length>6?rt:s.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(i),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],n,s,i)),rt)}hasEffectsOnInteractionAtPath(e,n,s){if(e.length+this.initPath.length>6)return!0;switch(n.type){case 0:return!!this.isReassigned||!s.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],n,s);case 1:return!!this.included||e.length!==0&&(!!this.isReassigned||!s.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],n,s));case 2:return!!this.isReassigned||!(n.withNew?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,n.args,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],n,s)}}includePath(e,n){if(!this.includedPathTracker.includePathAndGetIfIncluded(e)){this.module.scope.context.requestTreeshakingPass(),this.included||this.module.scope.context.newlyIncludedVariableInits.add(this.init),super.includePath(e,n);for(const s of this.declarations){s.included||s.include(n,!1);let i=s.parent;for(;!i.included&&(i.includeNode(n),i.type!==cr);)i=i.parent;this.kind==="parameter"&&(ug(s.parent)||hg(s.parent))&&dg(s.parent.parent)&&pg(s.parent.parent.callee)&&fg(s.parent.parent.callee.property)&&s.parent.parent.callee.property.name==="then"&&Ia(s.parent.parent.callee.object)&&s.parent.parent.callee.object.includePath(e,n)}e.length>0&&(this.init.includePath(td(this.initPath,e),n),this.additionalInitializers?.forEach(s=>s.includePath(ie,n)))}}includeCallArguments(e,n){this.isReassigned||n.includedCallArguments.has(this.init)||this.initPath.length>0?pa(e,n):(n.includedCallArguments.add(this.init),this.init.includeCallArguments(e,n),n.includedCallArguments.delete(this.init))}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return this.additionalInitializers===null&&(this.additionalInitializers=[this.init],this.init=ve,this.markReassigned()),this.additionalInitializers}}const Ag=new Set(["class","const","let","var","using","await using"]);class nd extends Z{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return Oe(this.flags,4)?Oe(this.flags,8):null}set isTDZAccess(e){this.flags=Le(this.flags,4,!0),this.flags=Le(this.flags,8,e)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizePath(e){e.length!==0||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,n,s){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,i){const[r,a]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,n,s,i);return[r,a||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||this.variable.kind==="var")||this.scope.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof La&&!this.isPureFunction(ae)&&this.variable.hasEffectsOnInteractionAtPath(ae,Mn,e)}hasEffectsOnInteractionAtPath(e,n,s){switch(n.type){case 0:return this.variable!==null&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,n,s);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,n,s);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,n,s)}}include(e,n){this.included||this.includeNode(e),n&&this.variable?.includePath(ie,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable!==null&&this.scope.context.includeVariableInModule(this.variable,ae,e)}includePath(e,n){this.included?e.length>0&&this.variable?.includePath(e,n):(this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable!==null&&this.scope.context.includeVariableInModule(this.variable,e,n))}includeCallArguments(e,n){this.variable.includeCallArguments(e,n)}isPossibleTDZ(){const e=this.isTDZAccess;if(e!==null)return e;if(!(this.variable instanceof Ot&&this.variable.kind&&Ag.has(this.variable.kind)&&this.variable.module.hasTreeShakingPassStarted))return this.isTDZAccess=!1;let n;return this.variable.declarations&&this.variable.declarations.length===1&&(n=this.variable.declarations[0])&&this.start<n.start&&sd(this)===sd(n)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof Ot&&(this.variable.module.isExecuted||Es(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(Ch(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?ve:this.variable}isPureFunction(e){let n=this.scope.context.manualPureFunctions[this.name];for(const s of e){if(!n)return!1;if(n[Sa])return!0;n=n[s]}return n?.[Sa]}}function sd(t){for(;t&&!/^Program|Function/.test(t.type);)t=t.parent;return t}class id extends Pt{constructor(e,n){super(),this.object=e,this.path=n}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[...this.path,...n],s)}deoptimizePath(e){this.object.deoptimizePath([...this.path,...e])}getLiteralValueAtPath(e,n,s){return this.object.getLiteralValueAtPath([...this.path,...e],n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,i){return this.object.getReturnExpressionWhenCalledAtPath([...this.path,...e],n,s,i)}hasEffectsOnInteractionAtPath(e,n,s){return this.object.hasEffectsOnInteractionAtPath([...this.path,...e],n,s)}}class Fe extends nd{constructor(){super(...arguments),this.variable=null}get isDestructuringDeoptimized(){return Oe(this.flags,16777216)}set isDestructuringDeoptimized(e){this.flags=Le(this.flags,16777216,e)}addExportedVariables(e,n){n.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&oh(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0)}declare(e,n,s){let i;const{treeshake:r}=this.scope.context.options;return e==="parameter"?i=this.scope.addParameterDeclaration(this,n):(i=this.scope.addDeclaration(this,this.scope.context,s,n,e),e==="var"&&r&&r.correctVarValueBeforeDeclaration&&i.markInitializersForDeoptimization()),[this.variable=i]}deoptimizeAssignment(e,n){this.deoptimizePath(ae),n.deoptimizePath([...e,Ie])}hasEffectsWhenDestructuring(e,n,s){return n.length>0&&s.hasEffectsOnInteractionAtPath(n,Mn,e)}includeDestructuredIfNecessary(e,n,s){n.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,s.deoptimizeArgumentsOnInteractionAtPath({args:[new id(s,n.slice(0,-1))],type:0},n,qe));const{propertyReadSideEffects:i}=this.scope.context.options.treeshake;let r=this.included;return(r||=n.length>0&&!e.brokenFlow&&i&&(i==="always"||s.hasEffectsOnInteractionAtPath(n,Mn,gs())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,ae,e),s.includePath(n,e)),!this.included&&r&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:n},useOriginalName:s},{renderedParentType:i,isCalleeOfRenderedParent:r,isShorthandProperty:a}=pt){if(this.variable){const l=this.variable.getName(n,s);l!==this.name&&(e.overwrite(this.start,this.end,l,{contentOnly:!0,storeName:!0}),a&&e.prependRight(this.start,`${this.name}: `)),l==="eval"&&i===Js&&r&&e.appendRight(this.start,"0, ")}}}function vr(t){let e="";do{const n=t%64;t=t/64|0,e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+e}while(t!==0);return e}function Yt(t,e,n){let s=t,i=1;for(;e.has(s)||gr.has(s)||n?.has(s);)s=`${t}$${vr(i++)}`;return e.add(s),s}class rd{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,n,s,i,r){const a=e.name,l=this.hoistedVariables?.get(a)||this.variables.get(a);if(l){if(r==="var"&&l.kind==="var")return l.addDeclaration(e,s),l;n.error(xs(a),e.start)}const c=new Ot(e.name,e,s,i,n,r);return this.variables.set(a,c),c}addHoistedVariable(e,n){(this.hoistedVariables||=new Map).set(e,n)}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class vt extends rd{constructor(e,n){super(),this.parent=e,this.context=n,this.accessedOutsideVariables=new Map,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof vt&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,n){const s=n.get(this)||new Set;for(const i of e)s.add(i);n.set(this,s),this.parent instanceof vt&&this.parent.addAccessedGlobals(e,n)}addNamespaceMemberAccess(e,n){this.accessedOutsideVariables.set(e,n),this.parent.addNamespaceMemberAccess(e,n)}addReturnExpression(e){this.parent instanceof vt&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,n){for(const i of this.accessedOutsideVariables.values())i.included&&e.add(i.getBaseVariableName());const s=n.get(this);if(s)for(const i of s)e.add(i)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,n,s){const i=new Set;if(this.addUsedOutsideNames(i,s),this.accessedDynamicImports)for(const r of this.accessedDynamicImports)r.inlineNamespace&&i.add(r.inlineNamespace.getBaseVariableName());for(const[r,a]of this.variables)(a.included||a.alwaysRendered)&&a.setRenderNames(null,Yt(r,i,a.forbiddenNames));for(const r of this.children)r.deconflict(e,n,s)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findGlobal(e){const n=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,n),n}findVariable(e){const n=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(n)return n;const s=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,s),s}}function Ma(t,e){for(const n of t)if(n.hasEffects(e))return!0;return!1}class _r extends Z{constructor(){super(...arguments),this.accessedValue=null}get computed(){return Oe(this.flags,1024)}set computed(e){this.flags=Le(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){return e.type===0&&this.kind==="get"&&n.length===0||e.type===1&&this.kind==="set"&&n.length===0?this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:2,withNew:!1},ae,s):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,n,s){return this.getAccessedValue()[0].getLiteralValueAtPath(e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,i){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,n,s,i)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,n,s){return this.kind==="get"&&n.type===0&&e.length===0||this.kind==="set"&&n.type===1?this.value.hasEffectsOnInteractionAtPath(ae,{args:n.args,type:2,withNew:!1},s):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,n,s)}getAccessedValue(){return this.accessedValue===null?this.kind==="get"?(this.accessedValue=rt,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(ae,Ks,qe,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}_r.prototype.includeNode=ze,_r.prototype.applyDeoptimizations=Te;class Pr extends _r{hasEffects(e){return super.hasEffects(e)||Ma(this.decorators,e)}}class Wn extends vt{constructor(e){super(e,e.context)}addDeclaration(e,n,s,i,r){if(r==="var"){const a=e.name,l=this.hoistedVariables?.get(a)||this.variables.get(a);if(l)return l.kind==="var"||r==="var"&&l.kind==="parameter"?(l.addDeclaration(e,s),l):n.error(xs(a),e.start);const c=this.parent.addDeclaration(e,n,s,i,r);return c.markInitializersForDeoptimization(),this.addHoistedVariable(a,c),c}return super.addDeclaration(e,n,s,i,r)}}class Nr extends Z{createScope(e){this.scope=new Wn(e)}hasEffects(e){for(const n of this.body)if(n.hasEffects(e))return!0;return!1}include(e,n){this.included=!0;for(const s of this.body)(n||s.shouldBeIncluded(e))&&s.include(e,n)}render(e,n){if(this.body.length>0){const s=ht(e.original.slice(this.start,this.end),"{")+1;Xs(this.body,e,this.start+s,this.end-1,n)}else super.render(e,n)}}function od(t){return t.type==="StaticBlock"}Nr.prototype.includeNode=ze,Nr.prototype.applyDeoptimizations=Te;class Fa extends Z{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new vt(e,e.context)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,n,s){return this.getObjectEntity().getLiteralValueAtPath(e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,n,s,i)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const n=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),n||super.hasEffects(e)||Ma(this.decorators,e)}hasEffectsOnInteractionAtPath(e,n,s){return n.type===2&&e.length===0?!n.withNew||(this.classConstructor===null?this.superClass?.hasEffectsOnInteractionAtPath(e,n,s):this.classConstructor.hasEffectsOnInteractionAtPath(e,n,s))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,n,s)}include(e,n){this.included||this.includeNode(e),this.superClass?.include(e,n),this.body.include(e,n);for(const s of this.decorators)s.include(e,n);this.id&&(this.id.markDeclarationReached(),this.id.include(e,n))}initialise(){super.initialise(),this.id?.declare("class",ae,this);for(const e of this.body.body)if(e instanceof Pr&&e.kind==="constructor")return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)od(e)||e.static||e instanceof Pr&&e.kind==="constructor"||e.deoptimizePath(ie);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;const e=[],n=[];for(const s of this.body.body){if(od(s))continue;const i=s.static?e:n,r=s.kind;if(i===n&&!r)continue;const a=r==="set"||r==="get"?r:"init";let l;if(s.computed){const c=s.key.getLiteralValueAtPath(ae,qe,this);if(typeof c=="symbol"){i.push({key:ha(c)?c:Ie,kind:a,property:s});continue}l=String(c)}else l=s.key instanceof Fe?s.key.name:String(s.key.value);i.push({key:l,kind:a,property:s})}return e.unshift({key:"prototype",kind:"init",property:new Nt(n,this.superClass?new id(this.superClass,["prototype"]):vn)}),this.objectEntity=new Nt(e,this.superClass||vn)}}Fa.prototype.includeNode=dt;class vs extends Fa{initialise(){super.initialise(),this.id!==null&&(this.id.variable.isId=!0)}parseNode(e){return e.id!==null&&(this.id=new Fe(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}render(e,n){const{exportNamesByVariable:s,format:i,snippets:{_:r,getPropertyAccess:a}}=n;if(this.id){const{variable:l,name:c}=this.id;i==="system"&&s.has(l)&&e.appendLeft(this.end,`${r}${Ln([l],n)};`);const u=l.getName(a);if(u!==c)return this.decorators.map(d=>d.render(e,n)),this.superClass?.render(e,n),this.body.render(e,{...n,useOriginalName:d=>d===l}),e.prependRight(this.start,`let ${u}${r}=${r}`),void e.prependLeft(this.end,";")}super.render(e,n)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:n}=this;if(e){const{name:s,variable:i}=e;for(const r of n.accessedOutsideVariables.values())r!==i&&r.forbidName(s)}}}class wg extends Ot{constructor(e){super("arguments",null,ve,ae,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=Sg}hasEffectsOnInteractionAtPath(e,{type:n}){return n!==0||e.length>1}includePath(e,n){super.includePath(e,n);for(const s of this.deoptimizedArguments)s.deoptimizePath(ie);this.deoptimizedArguments.length=0}}function Sg(t){this.included?t.deoptimizePath(ie):this.deoptimizedArguments?.push(t)}const ad=Qe,Ig=new Set([Ie]),vg=new ms,_g=new Set([ve]);class ld extends Ot{constructor(e,n,s,i){super(e,n,ve,s,i,"parameter"),this.includedPathTracker=new Hm,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new ms,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=Ce}addArgumentForDeoptimization(e){if(this.updateKnownValue(e),e===ve){if(!this.argumentsToBeDeoptimized.has(ve)){this.argumentsToBeDeoptimized.add(ve);for(const{interaction:n}of this.deoptimizationInteractions)Sn(n);this.deoptimizationInteractions=ad}}else if(this.deoptimizedFields.has(Ie))e.deoptimizePath([...this.initPath,Ie]);else if(!this.argumentsToBeDeoptimized.has(e)){this.argumentsToBeDeoptimized.add(e);for(const n of this.deoptimizedFields)e.deoptimizePath([...this.initPath,n]);for(const{interaction:n,path:s}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(n,[...this.initPath,...s],qe)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=Qe}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(this.knownValue===null)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,qe,this));if(this.knownValue===e||this.knownValue instanceof Fe&&e instanceof Fe&&this.knownValue.variable===e.variable)return;const{knownValueLiteral:n}=this;typeof n!="symbol"&&e.getLiteralValueAtPath(this.initPath,qe,this)===n||this.markReassigned()}getKnownValue(){return this.knownValue||ve}getLiteralValueAtPath(e,n,s){if(this.isReassigned||e.length+this.initPath.length>6)return Ce;const i=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(s),n.withTrackedEntityAtPath(e,i,()=>i.getLiteralValueAtPath([...this.initPath,...e],n,s),Ce)}hasEffectsOnInteractionAtPath(e,n,s){const{type:i}=n;return this.isReassigned||i===1||e.length+this.initPath.length>6?super.hasEffectsOnInteractionAtPath(e,n,s):!(i===2?(n.withNew?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,n.args,this):s.accessed.trackEntityAtPathAndGetIfTracked(e,this))&&this.getKnownValue().hasEffectsOnInteractionAtPath([...this.initPath,...e],n,s)}deoptimizeArgumentsOnInteractionAtPath(e,n){if(n.length>=2||this.argumentsToBeDeoptimized.has(ve)||this.deoptimizationInteractions.length>=20||n.length===1&&(this.deoptimizedFields.has(Ie)||e.type===2&&this.deoptimizedFields.has(n[0]))||this.initPath.length+n.length>6)Sn(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(n,e.args)){for(const s of this.argumentsToBeDeoptimized)s.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...n],qe);this.argumentsToBeDeoptimized.has(ve)||this.deoptimizationInteractions.push({interaction:e,path:n})}}deoptimizePath(e){if(e.length===0)return void this.markReassigned();if(this.deoptimizedFields.has(Ie))return;const n=e[0];if(!this.deoptimizedFields.has(n)){this.deoptimizedFields.add(n);for(const s of this.argumentsToBeDeoptimized)s.deoptimizePath([...this.initPath,n]);n===Ie&&(this.deoptimizationInteractions=ad,this.deoptimizations=vg,this.deoptimizedFields=Ig,this.argumentsToBeDeoptimized=_g)}}getReturnExpressionWhenCalledAtPath(e){return e.length===0?this.deoptimizePath(ie):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),rt}includeArgumentPaths(e,n){this.includedPathTracker.includeAllPaths(e,n,this.initPath)}}class cd extends ld{constructor(e){super("this",null,ae,e)}hasEffectsOnInteractionAtPath(e,n,s){return(s.replacedVariableInits.get(this)||ve).hasEffectsOnInteractionAtPath(e,n,s)}}class Pg extends vt{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,n,s,i,r){if(r==="var"){const a=e.name,l=this.hoistedVariables?.get(a)||this.variables.get(a);if(l){const u=l.kind;if(u==="parameter"&&l.declarations[0].parent.type==="CatchClause"){const d=this.parent.parent.addDeclaration(e,n,hn,i,r);return l.renderLikeHoisted(d),this.addHoistedVariable(a,d),d}return u==="var"?(l.addDeclaration(e,s),l):n.error(xs(a),e.start)}const c=this.parent.parent.addDeclaration(e,n,s,i,r);return c.markInitializersForDeoptimization(),this.addHoistedVariable(a,c),c}return super.addDeclaration(e,n,s,i,r)}}class Ng extends vt{constructor(e){super(e,e.context)}addDeclaration(e,n,s,i,r){const a=e.name,l=this.hoistedVariables?.get(a)||this.variables.get(a);if(l){const u=l.kind;if(!(r!=="var"&&r!=="function"||u!=="var"&&u!=="function"&&u!=="parameter"))return l.addDeclaration(e,s),l;n.error(xs(a),e.start)}const c=new Ot(e.name,e,s,i,n,r);return this.variables.set(a,c),c}}class ud extends vt{constructor(e,n){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=n?new Pg(this):new Ng(this)}addParameterDeclaration(e,n){const{name:s,start:i}=e;if(this.variables.get(s))return this.context.error((function(a){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${a}"`}})(s),i);const r=new ld(s,e,n,this.context);return this.variables.set(s,r),this.bodyScope.addHoistedVariable(s,r),r}addParameterVariables(e,n){this.parameters=e;for(const s of e)for(const i of s)i.alwaysRendered=!0;this.hasRest=n}includeCallArguments({args:e},n){let s=!1,i=!1;const r=this.hasRest&&this.parameters[this.parameters.length-1];let a=e.length-1;for(let l=1;l<e.length;l++){const c=e[l];c instanceof qn&&!i&&(i=!0,a=l-1),i&&(c.includePath(ie,n),c.include(n,!1))}for(let l=a;l>=1;l--){const c=this.parameters[l-1]||r,u=e[l];if(c)if(s=!1,c.length===0)i=!0;else for(const d of c)d.calledFromTryStatement&&(s=!0),d.included&&(i=!0,s?u.include(n,!0):(d.includeArgumentPaths(u,n),u.include(n,!1)));(i||u.shouldBeIncluded(n))&&(i=!0,u.include(n,s))}}}class hd extends ud{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}deoptimizeArgumentsOnCall({args:e}){const{parameters:n}=this;let s=0;for(;s<e.length-1;s++){const r=e[s+1];if(r instanceof qn){for(;s<n.length;s++){e[s+1]?.deoptimizePath(ie);for(const a of n[s])a.markReassigned()}break}if(this.hasRest&&s>=n.length-1)r.deoptimizePath(ie);else{const a=n[s];if(a)for(const l of a)l.addArgumentForDeoptimization(r);this.addArgumentToBeDeoptimized(r)}}const i=this.hasRest?n.length-1:n.length;for(;s<i;s++)for(const r of n[s])r.addArgumentForDeoptimization(hn)}getReturnExpression(){return this.returnExpression===null&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const n of e)n.deoptimizePath(ie),n.markReassigned()}reassignAllParameters(){for(const e of this.parameters)for(const n of e)n.markReassigned()}addArgumentToBeDeoptimized(e){}updateReturnExpression(){if(this.returnExpressions.length===1)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=ve;for(const e of this.returnExpressions)e.deoptimizePath(ie)}}}class dd extends hd{constructor(e,n){super(e,!1),this.functionNode=n;const{context:s}=e;this.variables.set("arguments",this.argumentsVariable=new wg(s)),this.variables.set("this",this.thisVariable=new cd(s))}findLexicalBoundary(){return this}includeCallArguments(e,n){if(super.includeCallArguments(e,n),this.argumentsVariable.included){const{args:s}=e;for(let i=1;i<s.length;i++){const r=s[i];r&&(r.includePath(ie,n),r.include(n,!1))}}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class jt extends Z{initialise(){var e,n;super.initialise(),this.directive&&this.directive!=="use strict"&&this.parent.type===cr&&this.scope.context.log(ye,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:n=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${xe(n)}" was ignored.`}),this.start)}removeAnnotations(e){this.expression.removeAnnotations(e)}render(e,n){super.render(e,n),e.original[this.end-1]!==";"&&e.appendRight(this.end,";")}shouldBeIncluded(e){return this.directive&&this.directive!=="use strict"?this.parent.type!==cr:super.shouldBeIncluded(e)}}jt.prototype.includeNode=ze,jt.prototype.applyDeoptimizations=Te;class Gn extends Z{get deoptimizeBody(){return Oe(this.flags,32768)}set deoptimizeBody(e){this.flags=Le(this.flags,32768,e)}get directlyIncluded(){return Oe(this.flags,16384)}set directlyIncluded(e){this.flags=Le(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&e.type==="ReturnStatement"||this.scope.addReturnExpression(ve)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new Wn(e)}hasEffects(e){if(this.deoptimizeBody)return!0;for(const n of this.body){if(e.brokenFlow)break;if(n.hasEffects(e))return!0}return!1}include(e,n){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(n=!0);for(const s of this.body)(n||s.shouldBeIncluded(e))&&s.include(e,n)}}initialise(){super.initialise(),this.scope.context.magicString.addSourcemapLocation(this.end-1);const e=this.body[0];this.deoptimizeBody=e instanceof jt&&e.directive==="use asm"}render(e,n){this.body.length>0?Xs(this.body,e,this.start+1,this.end-1,n):super.render(e,n)}}Gn.prototype.includeNode=ze,Gn.prototype.applyDeoptimizations=Te;class Xn extends Z{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,n){this.argument.addExportedVariables(e,n)}declare(e,n,s){return this.declarationInit=s,this.argument.declare(e,$r(n),s)}deoptimizeAssignment(e,n){this.argument.deoptimizeAssignment($r(e),n)}deoptimizePath(e){e.length===0&&this.argument.deoptimizePath(ae)}hasEffectsOnInteractionAtPath(e,n,s){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(ae,n,s)}hasEffectsWhenDestructuring(e,n,s){return this.argument.hasEffectsWhenDestructuring(e,$r(n),s)}includeDestructuredIfNecessary(e,n,s){const i=this.argument.includeDestructuredIfNecessary(e,$r(n),s);return!this.included&&i&&this.includeNode(e),this.included}include(e,n){this.included||this.includeNode(e),this.argument.include(e,n)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,this.declarationInit!==null&&(this.declarationInit.deoptimizePath([Ie,Ie]),this.scope.context.requestTreeshakingPass())}}Xn.prototype.includeNode=dt;const $r=t=>t.at(-1)===Ie?t:[...t,Ie];class ci extends Z{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1,this.includeCallArguments=this.scope.includeCallArguments.bind(this.scope)}get async(){return Oe(this.flags,256)}set async(e){this.flags=Le(this.flags,256,e)}get deoptimizedReturn(){return Oe(this.flags,512)}set deoptimizedReturn(e){this.flags=Le(this.flags,512,e)}get generator(){return Oe(this.flags,4194304)}set generator(e){this.flags=Le(this.flags,4194304,e)}get hasCachedEffects(){return Oe(this.flags,67108864)}set hasCachedEffects(e){this.flags=Le(this.flags,67108864,e)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){e.type===2&&n.length===0?this.scope.deoptimizeArgumentsOnCall(e):this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e),e.length===1&&e[0]===Ie&&(this.scope.getReturnExpression().deoptimizePath(ie),this.scope.deoptimizeAllParameters())}getLiteralValueAtPath(e,n,s){return this.getObjectEntity().getLiteralValueAtPath(e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,i){return e.length>0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,n,s,i):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(ie),this.scope.context.requestTreeshakingPass()),rt):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,n,s){if(e.length>0||n.type!==2)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,n,s);if(this.hasCachedEffects)return!0;if(this.async){const{propertyReadSideEffects:r}=this.scope.context.options.treeshake,a=this.scope.getReturnExpression();if(a.hasEffectsOnInteractionAtPath(["then"],Ks,s)||r&&(r==="always"||a.hasEffectsOnInteractionAtPath(["then"],Mn,s)))return this.hasCachedEffects=!0,!0}const{propertyReadSideEffects:i}=this.scope.context.options.treeshake;for(let r=0;r<this.params.length;r++){const a=this.params[r];if(a.hasEffects(s)||i&&a.hasEffectsWhenDestructuring(s,ae,n.args[r+1]||hn))return this.hasCachedEffects=!0,!0}return!1}onlyFunctionCallUsed(){let e=null;return this.parent.type==="VariableDeclarator"&&(e=this.parent.id.variable??null),this.parent.type===lh&&(e=this.parent.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,n){this.included||this.includeNode(e),this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.scope.reassignAllParameters());const{brokenFlow:s}=e;e.brokenFlow=!1,this.body.include(e,n),e.brokenFlow=s}initialise(){super.initialise(),this.body instanceof Gn?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationNoSideEffects=this.annotations.some(e=>e.type==="noSideEffects"))}parseNode(e){const{body:n,params:s}=e,{scope:i}=this,{bodyScope:r,context:a}=i,l=this.params=s.map(c=>new(a.getNodeConstructor(c.type))(this,i).parseNode(c));return i.addParameterVariables(l.map(c=>c.declare("parameter",ae,ve)),l[l.length-1]instanceof Xn),this.body=new(a.getNodeConstructor(n.type))(this,r).parseNode(n),super.parseNode(e)}}ci.prototype.preventChildBlockScope=!0,ci.prototype.includeNode=ze,ci.prototype.applyDeoptimizations=Te;class Ba extends ci{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new dd(e,this),this.constructedEntity=new Nt(new Map,vn),this.scope.thisVariable.addArgumentForDeoptimization(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){super.deoptimizeArgumentsOnInteractionAtPath(e,n,s),e.type===2&&n.length===0&&e.args[0]&&this.scope.thisVariable.addArgumentForDeoptimization(e.args[0])}hasEffects(e){return!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,n,s){if(this.annotationNoSideEffects&&e.length===0&&n.type===2)return!1;if(super.hasEffectsOnInteractionAtPath(e,n,s))return!0;if(e.length===0&&n.type===2){const i=s.replacedVariableInits.get(this.scope.thisVariable);s.replacedVariableInits.set(this.scope.thisVariable,n.withNew?this.constructedEntity:ve);const{brokenFlow:r,ignore:a,replacedVariableInits:l}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:n.withNew},this.body.hasEffects(s))return this.hasCachedEffects=!0,!0;s.brokenFlow=r,i?l.set(this.scope.thisVariable,i):l.delete(this.scope.thisVariable),s.ignore=a}return!1}include(e,n){super.include(e,n),this.id?.include(e,n);const s=this.scope.argumentsVariable.included;for(const i of this.params)i instanceof Fe&&!s||i.include(e,n)}includeNode(e){this.included=!0;const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof Fe&&!n||s.includePath(ie,e)}initialise(){super.initialise(),this.id?.declare("function",ae,this)}getObjectEntity(){return this.objectEntity!==null?this.objectEntity:this.objectEntity=new Nt([{key:"prototype",kind:"init",property:new Nt([],vn)}],vn)}}class _s extends Ba{initialise(){super.initialise(),this.id!==null&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}parseNode(e){return e.id!==null&&(this.id=new Fe(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class Kn extends Z{bind(){super.bind();const e=this.declarationName||this.scope.context.getModuleName();this.variable.name=this.scope.variables.get(e)?`${e}_default`:e}include(e,n){this.included=!0,this.declaration.include(e,n),n&&this.scope.context.includeVariableInModule(this.variable,ie,e)}includePath(e,n){this.included=!0,this.declaration.includePath(e,n)}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,n,s){const{start:i,end:r}=s,a=(function(l,c){return An(l,ht(l,"default",c)+7)})(e.original,this.start);if(this.declaration instanceof _s)this.renderNamedDeclaration(e,a,this.declaration.id===null?(function(l,c){const u=ht(l,"function",c)+8;l=l.slice(u,ht(l,"(",u));const d=ht(l,"*");return d===-1?u:u+d+1})(e.original,a):null,n);else if(this.declaration instanceof vs)this.renderNamedDeclaration(e,a,this.declaration.id===null?ht(e.original,"class",i)+5:null,n);else{if(this.variable.getOriginalVariable()!==this.variable)return void ds(this,e,i,r);if(!this.variable.included)return e.remove(this.start,a),this.declaration.render(e,n,{renderedSurroundingElement:Xt}),void(e.original[this.end-1]!==";"&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,a,n)}this.declaration.render(e,n)}renderNamedDeclaration(e,n,s,i){const{exportNamesByVariable:r,format:a,snippets:{getPropertyAccess:l}}=i,c=this.variable.getName(l);e.remove(this.start,n),s!==null&&e.appendLeft(s,` ${c}`),a==="system"&&this.declaration instanceof vs&&r.has(this.variable)&&e.appendLeft(this.end,` ${Ln([this.variable],i)};`)}renderVariableDeclaration(e,n,{format:s,exportNamesByVariable:i,snippets:{cnst:r,getPropertyAccess:a}}){const l=e.original.charCodeAt(this.end-1)===59,c=s==="system"&&i.get(this.variable);c?(e.overwrite(this.start,n,`${r} ${this.variable.getName(a)} = exports(${JSON.stringify(c[0])}, `),e.appendRight(l?this.end-1:this.end,")"+(l?"":";"))):(e.overwrite(this.start,n,`${r} ${this.variable.getName(a)} = `),l||e.appendLeft(this.end,";"))}}Kn.prototype.needsBoundaries=!0,Kn.prototype.includeNode=ze,Kn.prototype.applyDeoptimizations=Te;const $g=/[\n\r'\\\u2028\u2029]/,Cg=/([\n\r'\u2028\u2029])/g,Tg=/\\/g;function _n(t){return $g.test(t)?t.replace(Tg,"\\\\").replace(Cg,"\\$1"):t}const ja="_interopDefault",za="_interopDefaultCompat",Cr="_interopNamespace",Tr="_interopNamespaceCompat",Jn="_interopNamespaceDefault",ui="_interopNamespaceDefaultOnly",Rr="_mergeNamespaces",mn="_documentCurrentScript",Dr={auto:ja,compat:za,default:null,defaultOnly:null,esModule:null},Or=(t,e)=>t==="esModule"||e&&(t==="auto"||t==="compat"),hi={auto:Cr,compat:Tr,default:Jn,defaultOnly:ui,esModule:null},Rg=(t,e)=>t!=="esModule"&&Or(t,e),Va=(t,e,n,s,i,r,a)=>{const l=new Set(t);for(const c of Wa)e.has(c)&&l.add(c);return Wa.map(c=>l.has(c)?pd[c](n,s,i,r,a,l):"").join("")},pd={[mn]:(t,{_:e,n})=>`var ${mn}${e}=${e}typeof document${e}!==${e}'undefined'${e}?${e}document.currentScript${e}:${e}null;${n}`,[za](t,e,n){const{_:s,getDirectReturnFunction:i,n:r}=e,[a,l]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:za});return`${a}${Ua(e)}${s}?${s}${n?fd(e):md(e)}${l}${r}${r}`},[ja](t,e,n){const{_:s,getDirectReturnFunction:i,n:r}=e,[a,l]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:ja});return`${a}e${s}&&${s}e.__esModule${s}?${s}${n?fd(e):md(e)}${l}${r}${r}`},[Tr](t,e,n,s,i,r){const{_:a,getDirectReturnFunction:l,n:c}=e;if(r.has(Jn)){const[u,d]=l(["e"],{functionReturn:!0,lineBreakIndent:null,name:Tr});return`${u}${Ua(e)}${a}?${a}e${a}:${a}${Jn}(e)${d}${c}${c}`}return`function ${Tr}(e)${a}{${c}${t}if${a}(${Ua(e)})${a}return e;${c}`+qa(t,t,e,n,s,i)+`}${c}${c}`},[ui](t,e,n,s,i){const{getDirectReturnFunction:r,getObject:a,n:l,_:c}=e,[u,d]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:ui});return`${u}${Ha(s,bd(i,a([[null,`__proto__:${c}null`],["default","e"]],{lineBreakIndent:null}),e))}${d}${l}${l}`},[Jn](t,e,n,s,i){const{_:r,n:a}=e;return`function ${Jn}(e)${r}{${a}`+qa(t,t,e,n,s,i)+`}${a}${a}`},[Cr](t,e,n,s,i,r){const{_:a,getDirectReturnFunction:l,n:c}=e;if(r.has(Jn)){const[u,d]=l(["e"],{functionReturn:!0,lineBreakIndent:null,name:Cr});return`${u}e${a}&&${a}e.__esModule${a}?${a}e${a}:${a}${Jn}(e)${d}${c}${c}`}return`function ${Cr}(e)${a}{${c}${t}if${a}(e${a}&&${a}e.__esModule)${a}return e;${c}`+qa(t,t,e,n,s,i)+`}${c}${c}`},[Rr](t,e,n,s,i){const{_:r,cnst:a,n:l}=e,c=a==="var"&&n;return`function ${Rr}(n, m)${r}{${l}${t}${Og(`{${l}${t}${t}${t}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${l}`+(n?c?gd:Mg:yd)(t,t+t+t+t,e)+`${t}${t}${t}}${l}${t}${t}}`,c,t,e)}${l}${t}return ${Ha(s,bd(i,"n",e))};${l}}${l}${l}`}},fd=({_:t,getObject:e})=>`e${t}:${t}${e([["default","e"]],{lineBreakIndent:null})}`,md=({_:t,getPropertyAccess:e})=>`e${e("default")}${t}:${t}e`,Ua=({_:t})=>`e${t}&&${t}typeof e${t}===${t}'object'${t}&&${t}'default'${t}in e`,qa=(t,e,n,s,i,r)=>{const{_:a,cnst:l,getObject:c,getPropertyAccess:u,n:d,s:m}=n,f=`{${d}`+(s?Lg:yd)(t,e+t+t,n)+`${e}${t}}`;return`${e}${l} n${a}=${a}Object.create(null${r?`,${a}{${a}[Symbol.toStringTag]:${a}${di(c)}${a}}`:""});${d}${e}if${a}(e)${a}{${d}${e}${t}${Dg(f,!s,n)}${d}${e}}${d}${e}n${u("default")}${a}=${a}e;${d}${e}return ${Ha(i,"n")}${m}${d}`},Dg=(t,e,{_:n,cnst:s,getFunctionIntro:i,s:r})=>s!=="var"||e?`for${n}(${s} k in e)${n}${t}`:`Object.keys(e).forEach(${i(["k"],{isAsync:!1,name:null})}${t})${r}`,Og=(t,e,n,{_:s,cnst:i,getDirectReturnFunction:r,getFunctionIntro:a,n:l})=>{if(e){const[c,u]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:n,t:n},name:null});return`m.forEach(${c}e${s}&&${s}typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e)${s}&&${s}Object.keys(e).forEach(${a(["k"],{isAsync:!1,name:null})}${t})${u});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${l}${n}${n}${i} e${s}=${s}m[i];${l}${n}${n}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${i} k in e)${s}${t}${s}}${l}${n}}`},Lg=(t,e,n)=>{const{_:s,n:i}=n;return`${e}if${s}(k${s}!==${s}'default')${s}{${i}`+gd(t,e+t,n)+`${e}}${i}`},gd=(t,e,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[a,l]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${e}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${e}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${e}${t}enumerable:${n}true,${r}${e}${t}get:${n}${a}e[k]${l}${r}${e}});${r}`},Mg=(t,e,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[a,l]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${e}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${e}if${n}(d)${n}{${r}${e}${t}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${e}${t}${t}enumerable:${n}true,${r}${e}${t}${t}get:${n}${a}e[k]${l}${r}${e}${t}});${r}${e}}${r}`},yd=(t,e,{_:n,n:s})=>`${e}n[k]${n}=${n}e[k];${s}`,Ha=(t,e)=>t?`Object.freeze(${e})`:e,bd=(t,e,{_:n,getObject:s})=>t?`Object.defineProperty(${e},${n}Symbol.toStringTag,${n}${di(s)})`:e,Wa=Object.keys(pd);function di(t){return t([["value","'Module'"]],{lineBreakIndent:null})}class kt extends Z{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||this.value===null&&this.scope.context.code.charCodeAt(this.start)!==110||typeof this.value=="bigint"||this.scope.context.code.charCodeAt(this.start)===47?Ce:this.value}getReturnExpressionWhenCalledAtPath(e){return e.length!==1?rt:ii(this.members,e[0])}hasEffectsOnInteractionAtPath(e,n,s){switch(n.type){case 0:return e.length>(this.value===null?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||e.length!==1||si(this.members,e[0],n,s)}}initialise(){super.initialise(),this.members=(function(e){if(e instanceof RegExp)return mg;switch(typeof e){case"boolean":return Pa;case"number":return Na;case"string":return ni}return Object.create(null)})(this.value)}parseNode(e){return this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(e){typeof this.value=="string"&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function xd(t,e,n,s,i){if("getLiteralValueAtPathAsChainElement"in e){const r=e.getLiteralValueAtPathAsChainElement(ae,qe,i);if(r===Kt||t.optional&&r==null)return Kt}else if(t.optional&&e.getLiteralValueAtPath(ae,qe,i)==null)return Kt;return t.getLiteralValueAtPath(n,s,i)}function Fg(t){return t.computed?(function(e){return e instanceof kt?String(e.value):null})(t.property):t.property.name}function kd(t){const e=t.propertyKey,n=t.object;if(typeof e=="string"){if(n instanceof Fe)return[{key:n.name,pos:n.start},{key:e,pos:t.property.start}];if(n instanceof gn){const s=kd(n);return s&&[...s,{key:e,pos:t.property.start}]}}return null}kt.prototype.includeNode=dt;class gn extends Z{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return Oe(this.flags,1024)}set computed(e){this.flags=Le(this.flags,1024,e)}get optional(){return Oe(this.flags,128)}set optional(e){this.flags=Le(this.flags,128,e)}get assignmentDeoptimized(){return Oe(this.flags,16)}set assignmentDeoptimized(e){this.flags=Le(this.flags,16,e)}get bound(){return Oe(this.flags,32)}set bound(e){this.flags=Le(this.flags,32,e)}get isUndefined(){return Oe(this.flags,64)}set isUndefined(e){this.flags=Le(this.flags,64,e)}bind(){this.bound=!0;const e=kd(this),n=e&&this.scope.findVariable(e[0].key);if(n?.isNamespace){const s=Ed(n,e.slice(1),this.scope.context);s?s==="undefined"?this.isUndefined=!0:(this.variable=s,this.scope.addNamespaceMemberAccess((function(i){let r=i[0].key;for(let a=1;a<i.length;a++)r+="."+i[a].key;return r})(e),s)):super.bind()}else super.bind()}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,n,s):this.isUndefined||(n.length<6?this.object.deoptimizeArgumentsOnInteractionAtPath(e,this.propertyKey===Ie?ie:[this.propertyKey,...n],s):Sn(e))}deoptimizeAssignment(e,n){this.deoptimizePath(ae),n.deoptimizePath([...e,Ie])}deoptimizeCache(){if(this.propertyKey===this.dynamicPropertyKey)return;const{expressionsToBeDeoptimized:e,object:n}=this;this.expressionsToBeDeoptimized=Qe,this.dynamicPropertyKey=this.propertyKey,n.deoptimizePath(ie),this.included&&n.includePath(ie,Ft());for(const s of e)s.deoptimizeCache()}deoptimizePath(e){if(e.length===0&&this.disallowNamespaceReassignment(),this.variable)this.variable.deoptimizePath(e);else if(!this.isUndefined){const{propertyKey:n}=this;this.object.deoptimizePath([n===Ie?sr:n,...e.length<6?e:[...e.slice(0,6),Ie]])}}getLiteralValueAtPath(e,n,s){if(this.variable)return this.variable.getLiteralValueAtPath(e,n,s);if(this.isUndefined)return;const i=this.getDynamicPropertyKey();return i!==Ie&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getLiteralValueAtPath([i,...e],n,s)):Ce}getLiteralValueAtPathAsChainElement(e,n,s){return this.variable?this.variable.getLiteralValueAtPath(e,n,s):this.isUndefined?void 0:xd(this,this.object,e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,i){if(this.variable)return this.variable.getReturnExpressionWhenCalledAtPath(e,n,s,i);if(this.isUndefined)return[hn,!1];const r=this.getDynamicPropertyKey();return r!==Ie&&e.length<6?(r!==this.propertyKey&&this.expressionsToBeDeoptimized.push(i),this.object.getReturnExpressionWhenCalledAtPath([r,...e],n,s,i)):rt}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 n="hasEffectsAsChainElement"in this.object?this.object.hasEffectsAsChainElement(e):this.object.hasEffects(e);return n===Kt?Kt:this.optional&&this.object.getLiteralValueAtPath(ae,qe,this)==null?n||Kt:(this.deoptimized||this.applyDeoptimizations(),n||this.property.hasEffects(e)||this.hasAccessEffect(e))}hasEffectsAsAssignmentTarget(e,n){return n&&!this.deoptimized&&this.applyDeoptimizations(),this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.property.hasEffects(e)||this.object.hasEffects(e)||n&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath(ae,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,n,s){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,n,s):!!this.isUndefined||!(e.length<6)||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey(),...e],n,s)}hasEffectsWhenDestructuring(e,n,s){return n.length>0&&s.hasEffectsOnInteractionAtPath(n,Mn,e)}include(e,n){this.included||this.includeNode(e),this.object.include(e,n),this.property.include(e,n),n&&this.variable?.includePath(ie,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,ae,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,ae,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includePath(e,n){this.included||this.includeNode(n),this.variable?this.variable?.includePath(e,n):this.isUndefined||this.object.includePath([this.propertyKey,...e.length<6?e:[...e.slice(0,6),Ie]],n)}includeAsAssignmentTarget(e,n,s){this.included||this.includeNodeAsAssignmentTarget(e),s&&!this.deoptimized&&this.applyDeoptimizations(),this.object.include(e,n),this.property.include(e,n)}includeCallArguments(e,n){var s;this.variable?this.variable.includeCallArguments(e,n):Ia(this.object)||this.object.variable&&!this.object.variable.isReassigned&&this.object.variable instanceof Ot&&(s=this.object.variable.init)instanceof Z&&s.type==="AwaitExpression"&&Ia(this.object.variable.init.argument)?ah(e,n):pa(e,n)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=Fg(this),this.propertyKey=this.dynamicPropertyKey===null?Ie:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,n,{renderedParentType:s,isCalleeOfRenderedParent:i,renderedSurroundingElement:r}=pt){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:a}}=n;let l=this.variable?this.variable.getName(a):"undefined";s&&i&&(l="0, "+l),e.overwrite(this.start,this.end,l,{contentOnly:!0,storeName:!0})}else s&&i&&e.appendRight(this.start,"0, "),this.object.render(e,n,{renderedSurroundingElement:r}),this.property.render(e,n)}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.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[this.propertyKey],qe),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],qe),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){this.object instanceof Fe&&this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable,ie,Ft()),this.scope.context.log(ye,Ch(this.object.name,this.scope.context.module.id),this.start))}getDynamicPropertyKey(){if(this.dynamicPropertyKey===null){this.dynamicPropertyKey=this.propertyKey;const e=this.property.getLiteralValueAtPath(ae,qe,this);return this.dynamicPropertyKey=typeof e=="symbol"?ua.has(e)?e:Ie:String(e)}return this.dynamicPropertyKey}hasAccessEffect(e){const{propertyReadSideEffects:n}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&n&&(n==="always"||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey()],this.accessInteraction,e))}}function Ed(t,e,n){if(e.length===0)return t;if(!t.isNamespace||t instanceof ei)return null;const s=e[0].key,[i,r]=t.context.traceExport(s);if(!i){if(e.length===1){const a=t.context.fileName;return n.log(ye,fr(s,n.module.id,a,!!r?.missingButExportExists),e[0].pos),"undefined"}return null}return Ed(i,e.slice(1),n)}const Ga="ROLLUP_FILE_URL_",Lr="ROLLUP_FILE_URL_OBJ_",Xa="import";class Ad extends Z{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:n},metaProperty:s}=this;if(n===Xa){if(s?.startsWith(Lr))return e.getFileName(s.slice(20));if(s?.startsWith(Ga))return e.getFileName(s.slice(16))}return null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:n}){return e.length>1||n!==0}include(){this.included||this.includeNode()}includeNode(){if(this.included=!0,this.meta.name===Xa){this.scope.context.addImportMeta(this);const e=this.parent,n=this.metaProperty=e instanceof gn&&typeof e.propertyKey=="string"?e.propertyKey:null;n?.startsWith(Lr)?this.referenceId=n.slice(20):n?.startsWith(Ga)&&(this.referenceId=n.slice(16))}}render(e,n){const{format:s,pluginDriver:i,snippets:r}=n,{scope:{context:{module:a}},meta:{name:l},metaProperty:c,parent:u,preliminaryChunkId:d,referenceId:m,start:f,end:g}=this,{id:E}=a;if(l!==Xa)return;const x=d;if(m){const S=i.getFileName(m),k=ln(Dn(cn(x),S)),v=!!c?.startsWith(Lr),I=i.hookFirstSync("resolveFileUrl",[{chunkId:x,fileName:S,format:s,moduleId:E,referenceId:m,relativePath:k}])||zg[s](k,v);return void e.overwrite(u.start,u.end,I,{contentOnly:!0})}let A=i.hookFirstSync("resolveImportMeta",[c,{chunkId:x,format:s,moduleId:E}]);A||(A=Vg[s]?.(c,{chunkId:x,snippets:r}),n.accessedDocumentCurrentScript||=wd.includes(s)&&A!=="undefined"),typeof A=="string"&&(u instanceof gn?e.overwrite(u.start,u.end,A,{contentOnly:!0}):e.overwrite(f,g,A,{contentOnly:!0}))}setResolution(e,n,s){this.preliminaryChunkId=s;const i=(this.metaProperty?.startsWith(Ga)||this.metaProperty?.startsWith(Lr)?jg:Bg)[e];i.length>0&&this.scope.addAccessedGlobals(i,n)}}const wd=["cjs","iife","umd"],Bg={amd:["document","module","URL"],cjs:["document","require","URL",mn],es:[],iife:["document","URL",mn],system:["module"],umd:["document","require","URL",mn]},jg={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},pi=(t,e,n="URL")=>`new ${n}(${t})${e?"":".href"}`,Ka=(t,e,n=!1)=>pi(`'${_n(t)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,e),Mr=t=>(e,{chunkId:n})=>{const s=t(n);return e===null?`({ url: ${s} })`:e==="url"?s:"undefined"},Ja=(t,e)=>`require('u' + 'rl').pathToFileURL(${t})${e?"":".href"}`,Sd=(t,e)=>Ja(`__dirname + '/${_n(t)}'`,e),Ya=(t,e=!1)=>`${e?"typeof document === 'undefined' ? location.href : ":""}(${mn} && ${mn}.tagName.toUpperCase() === 'SCRIPT' && ${mn}.src || new URL('${_n(t)}', document.baseURI).href)`,zg={amd:(t,e)=>(t[0]!=="."&&(t="./"+t),pi(`require.toUrl('${_n(t)}'), document.baseURI`,e)),cjs:(t,e)=>`(typeof document === 'undefined' ? ${Sd(t,e)} : ${Ka(t,e)})`,es:(t,e)=>pi(`'${_n(t)}', import.meta.url`,e),iife:(t,e)=>Ka(t,e),system:(t,e)=>pi(`'${_n(t)}', module.meta.url`,e),umd:(t,e)=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Sd(t,e)} : ${Ka(t,e,!0)})`},Vg={amd:Mr(()=>pi("module.uri, document.baseURI",!1)),cjs:Mr(t=>`(typeof document === 'undefined' ? ${Ja("__filename",!1)} : ${Ya(t)})`),iife:Mr(t=>Ya(t)),system:(t,{snippets:{getPropertyAccess:e}})=>t===null?"module.meta":`module.meta${e(t)}`,umd:Mr(t=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Ja("__filename",!1)} : ${Ya(t,!0)})`)};class Id extends zn{constructor(){super("undefined")}getLiteralValueAtPath(){}}class Qt extends Ot{constructor(e,n){super("default",e,e.declaration,ae,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const s=e.declaration;(s instanceof _s||s instanceof vs)&&s.id?(this.hasId=!0,this.originalId=s.id):s instanceof Fe&&(this.originalId=s)}addReference(e){this.hasId||(this.name=e.name)}addUsedPlace(e){const n=this.getOriginalVariable();n===this?super.addUsedPlace(e):n.addUsedPlace(e)}forbidName(e){const n=this.getOriginalVariable();n===this?super.forbidName(e):n.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 Id||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(e){const n=this.getOriginalVariable();return n===this?super.getName(e):n.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e,n=this;const s=new Set;do s.add(n),e=n,n=e.getDirectOriginalVariable();while(n instanceof Qt&&!s.has(n));return this.originalVariable=n||e}}class Yn extends zn{constructor(e){super(e.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module}addReference(e){this.references.push(e),this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,n,s){if(n.length>1||n.length===1&&e.type===2){const i=n[0];typeof i=="string"?this.getMemberVariables()[i]?.deoptimizeArgumentsOnInteractionAtPath(e,n.slice(1),s):Sn(e)}}deoptimizePath(e){if(e.length>1){const n=e[0];typeof n=="string"&&this.getMemberVariables()[n]?.deoptimizePath(e.slice(1))}}getLiteralValueAtPath(e){return e[0]===ca?"Module":Ce}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),n=[...this.context.getExports(),...this.context.getReexports()].sort();for(const s of n)if(s[0]!=="*"&&s!==this.module.info.syntheticNamedExports){const[i]=this.context.traceExport(s);i&&(e[s]=i)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,n,s){const{type:i}=n;if(e.length===0)return!0;if(e.length===1&&i!==2)return i===1;const r=e[0];if(typeof r!="string")return!0;const a=this.getMemberVariables()[r];return!a||a.hasEffectsOnInteractionAtPath(e.slice(1),n,s)}includePath(e,n){super.includePath(e,n),this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([Rr],e)}renderBlock(e){const{exportNamesByVariable:n,format:s,freeze:i,indent:r,symbols:a,snippets:{_:l,cnst:c,getObject:u,getPropertyAccess:d,n:m,s:f}}=e,g=this.getMemberVariables(),E=Object.entries(g).filter(([A,S])=>S.included).map(([A,S])=>this.referencedEarly||S.isReassigned||S===this?[null,`get ${xr(A)}${l}()${l}{${l}return ${S.getName(d)}${f}${l}}`]:[A,S.getName(d)]);E.unshift([null,`__proto__:${l}null`]);let x=u(E,{lineBreakIndent:{base:"",t:r}});if(this.mergedNamespaces.length>0){const A=this.mergedNamespaces.map(S=>S.getName(d));x=`/*#__PURE__*/${Rr}(${x},${l}[${A.join(`,${l}`)}])`}else a&&(x=`/*#__PURE__*/Object.defineProperty(${x},${l}Symbol.toStringTag,${l}${di(u)})`),i&&(x=`/*#__PURE__*/Object.freeze(${x})`);return x=`${c} ${this.getName(d)}${l}=${l}${x};`,s==="system"&&n.has(this)&&(x+=`${m}${Ln([this],e)};`),x}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const n=this.context.getModuleExecIndex();for(const s of this.references){const{context:i}=s.scope;if(i.getModuleExecIndex()<=n){this.referencedEarly=!0;break}}}}Yn.prototype.isNamespace=!0;class Et extends zn{constructor(e,n,s){super(n),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=s}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof Qt||e instanceof Et;){if(e instanceof Qt){const n=e.getOriginalVariable();if(n===e)break;e=n}e instanceof Et&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}includePath(e,n){super.includePath(e,n),this.context.includeVariableInModule(this.syntheticNamespace,e,n)}setRenderNames(e,n){super.setRenderNames(e,n)}}class Qn{constructor(e,n,s){this.options=n,this.inputBase=s,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAttributes=null,this.id=e.id,this.moduleInfo=e.info,this.renormalizeRenderPath=e.renormalizeRenderPath,this.suggestedVariableName=e.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options;return this.fileName=(typeof e=="function"?e(this.id):e[this.id])||(this.renormalizeRenderPath?ln(Dn(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=vd(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return _n(this.renormalizeRenderPath?hh(e,this.getFileName(),this.options.format==="amd",!1):this.getFileName())}}function vd(t,{getObject:e}){if(!t)return null;const n=Object.entries(t).map(([s,i])=>[s,`'${i}'`]);return n.length>0?e(n,{lineBreakIndent:null}):null}function _d(t){return t.endsWith(".js")?t.slice(0,-3):t}function Pd(t,e){return t.autoId?`${t.basePath?t.basePath+"/":""}${_d(e)}`:t.id??""}function Fr(t,e,n,s,i,r,a,l,c="return "){const{_:u,getDirectReturnFunction:d,getFunctionIntro:m,getPropertyAccess:f,n:g,s:E}=i;if(!n)return`${g}${g}${c}${(function(A,S,k,v,I){if(A.length>0)return A[0].local;for(const{defaultVariableName:P,importPath:F,isChunk:N,name:R,namedExportsMode:B,namespaceVariableName:$,reexports:T}of S)if(T)return Nd(R,T[0].imported,B,N,P,$,k,F,v,I)})(t,e,s,a,f)};`;let x="";if(n){for(const{defaultVariableName:A,importPath:S,isChunk:k,name:v,namedExportsMode:I,namespaceVariableName:P,reexports:F}of e)if(F){for(const N of F)if(N.reexported!=="*"){const R=Nd(v,N.imported,I,k,A,P,s,S,a,f);if(x&&(x+=g),N.imported!=="*"&&N.needsLiveBinding){const[B,$]=d([],{functionReturn:!0,lineBreakIndent:null,name:null});x+=`Object.defineProperty(exports,${u}${JSON.stringify(N.reexported)},${u}{${g}${r}enumerable:${u}true,${g}${r}get:${u}${B}${R}${$}${g}});`}else N.reexported==="__proto__"?x+=`Object.defineProperty(exports,${u}"__proto__",${u}{${g}${r}enumerable:${u}true,${g}${r}value:${u}${R}${g}});`:x+=`exports${f(N.reexported)}${u}=${u}${R};`}}}for(const{exported:A,local:S}of t){const k=`exports${f(A)}`;k!==S&&(x&&(x+=g),x+=A==="__proto__"?`Object.defineProperty(exports,${u}"__proto__",${u}{${g}${r}enumerable:${u}true,${g}${r}value:${u}${S}${g}});`:`${k}${u}=${u}${S};`)}if(n){for(const{name:A,reexports:S}of e)if(S){for(const k of S)if(k.reexported==="*"){if(x&&(x+=g),!k.needsLiveBinding&&l){const I="'__proto__'";x+=`Object.prototype.hasOwnProperty.call(${A},${u}${I})${u}&&${g}${r}!Object.prototype.hasOwnProperty.call(exports,${u}${I})${u}&&${g}${r}Object.defineProperty(exports,${u}${I},${u}{${g}${r}${r}enumerable:${u}true,${g}${r}${r}value:${u}${A}[${I}]${g}${r}});${g}${g}`}const v=`{${g}${r}if${u}(k${u}!==${u}'default'${u}&&${u}!Object.prototype.hasOwnProperty.call(exports,${u}k))${u}${Ug(A,k.needsLiveBinding,r,i)}${E}${g}}`;x+=`Object.keys(${A}).forEach(${m(["k"],{isAsync:!1,name:null})}${v});`}}}return x?`${g}${g}${x}`:""}function Nd(t,e,n,s,i,r,a,l,c,u){if(e==="default"){if(!s){const d=a(l),m=Dr[d]?i:t;return Or(d,c)?`${m}${u("default")}`:m}return n?`${t}${u("default")}`:t}return e==="*"?(s?!n:hi[a(l)])?r:t:`${t}${u(e)}`}function $d(t){return t([["value","true"]],{lineBreakIndent:null})}function Br(t,e,n,{_:s,getObject:i}){if(t){if(e)return n?`Object.defineProperties(exports,${s}${i([["__esModule",$d(i)],[null,`[Symbol.toStringTag]:${s}${di(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${$d(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${di(i)});`}return""}const Ug=(t,e,n,{_:s,getDirectReturnFunction:i,n:r})=>{if(e){const[a,l]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${r}${n}${n}enumerable:${s}true,${r}${n}${n}get:${s}${a}${t}[k]${l}${r}${n}})`}return`exports[k]${s}=${s}${t}[k]`};function jr(t,e,n,s,i,r,a,l){const{_:c,cnst:u,n:d}=l,m=new Set,f=[],g=(E,x,A)=>{m.add(x),f.push(`${u} ${E}${c}=${c}/*#__PURE__*/${x}(${A});`)};for(const{defaultVariableName:E,imports:x,importPath:A,isChunk:S,name:k,namedExportsMode:v,namespaceVariableName:I,reexports:P}of t)if(S){for(const{imported:F,reexported:N}of[...x||[],...P||[]])if(F==="*"&&N!=="*"){v||g(I,ui,k);break}}else{const F=e(A);let N=!1,R=!1;for(const{imported:B,reexported:$}of[...x||[],...P||[]]){let T,j;B==="default"?N||(N=!0,E!==I&&(j=E,T=Dr[F])):B!=="*"||$==="*"||R||(R=!0,T=hi[F],j=I),T&&g(j,T,k)}}return`${Va(m,r,a,l,n,s,i)}${f.length>0?`${f.join(d)}${d}${d}`:""}`}function Cd(t,e){return t[0]!=="."?t:e?(n=t).endsWith(".js")?n:n+".js":_d(t);var n}const qg=new Set(["node:assert","assert","node:assert/strict","assert/strict","node:async_hooks","async_hooks","node:buffer","buffer","node:child_process","child_process","node:cluster","cluster","node:console","console","node:constants","constants","node:crypto","crypto","node:dgram","dgram","node:diagnostics_channel","diagnostics_channel","node:dns","dns","node:dns/promises","dns/promises","node:domain","domain","node:events","events","node:fs","fs","node:fs/promises","fs/promises","node:http","http","node:http2","http2","node:https","https","node:inspector","inspector","node:inspector/promises","inspector/promises","node:module","module","node:net","net","node:os","os","node:path","path","node:path/posix","path/posix","node:path/win32","path/win32","node:perf_hooks","perf_hooks","node:process","process","node:querystring","querystring","node:quic","node:readline","readline","node:readline/promises","readline/promises","node:repl","repl","node:sea","node:sqlite","node:stream","stream","node:stream/consumers","stream/consumers","node:stream/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:vm","vm","node:wasi","wasi","node:worker_threads","worker_threads","node:zlib","zlib"]);function Qa(t,e){const n=e.map(({importPath:s})=>s).filter(s=>qg.has(s)||s.startsWith("node:"));n.length!==0&&t(ye,(function(s){return{code:"MISSING_NODE_BUILTINS",ids:s,message:`Creating a browser bundle that depends on Node.js built-in modules (${un(s)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}})(n))}const zr=(t,e)=>t.split(".").map(e).join("");function Za(t,e,n,s,{_:i,getPropertyAccess:r},a){const l=t.split("."),c=l[0]in Object.prototype;a&&c&&a(ye,Mh(l[0])),l[0]=(typeof n=="function"?n(l[0]):c?l[0]:n[l[0]])||l[0];const u=l.pop();let d=e,m=[...l.map(f=>(d+=r(f),`${d}${i}=${i}${d}${i}||${i}{}`)),`${d}${r(u)}`].join(`,${i}`)+`${i}=${i}${s}`;return l.length>0&&(m=`(${m})`),m}function Td(t){let e=t.length;for(;e--;){const{imports:n,reexports:s}=t[e];if(n||s)return t.slice(0,e+1)}return[]}const Ps="_missingExportShim",Hg=({dependencies:t,exports:e})=>{const n=new Set(e.map(s=>s.exported));n.add("default");for(const{reexports:s}of t)if(s)for(const i of s)i.reexported!=="*"&&n.add(i.reexported);return n},Wg=(t,e,{_:n,cnst:s,getObject:i,n:r})=>{if(t){const a=[...t].map(l=>[l,"1"]);return a.unshift([null,`__proto__:${n}null`]),`${r}${e}${s} _starExcludes${n}=${n}${i(a,{lineBreakIndent:{base:e,t:e}})};`}return""},Gg=(t,e,{_:n,n:s})=>t.length>0?`${s}${e}var ${t.join(`,${n}`)};`:"",Xg=(t,e,n)=>el(t.filter(s=>s.hoisted).map(s=>({name:s.exported,value:s.local})),e,n);function el(t,e,{_:n,n:s}){return t.length===0?"":t.length===1?`exports(${JSON.stringify(t[0].name)},${n}${t[0].value});${s}${s}`:`exports({${s}`+t.map(({name:i,value:r})=>`${e}${xr(i)}:${n}${r}`).join(`,${s}`)+`${s}});${s}${s}`}const Kg=(t,e,n)=>el(t.filter(s=>s.expression).map(s=>({name:s.exported,value:s.local})),e,n),Jg=(t,e,n)=>el(t.filter(s=>s.local===Ps).map(s=>({name:s.exported,value:Ps})),e,n);function tl(t,e,n){return t?`${e}${zr(t,n)}`:"null"}var Yg={amd:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:a,indent:l,intro:c,isEntryFacade:u,isModuleFacade:d,namedExportsMode:m,log:f,outro:g,snippets:E},{amd:x,esModule:A,externalLiveBindings:S,freeze:k,generatedCode:{symbols:v},interop:I,reexportProtoFromExternal:P,strict:F}){Qa(f,n);const N=n.map(X=>`'${Cd(X.importPath,x.forceJsExtensionForImports)}'`),R=n.map(X=>X.name),{n:B,getNonArrowFunctionIntro:$,_:T}=E;r&&(m||s[0]?.local==="exports.default")&&(R.unshift("exports"),N.unshift("'exports'")),e.has("require")&&(R.unshift("require"),N.unshift("'require'")),e.has("module")&&(R.unshift("module"),N.unshift("'module'"));const j=Pd(x,a),le=(j?`'${j}',${T}`:"")+(N.length>0?`[${N.join(`,${T}`)}],${T}`:""),ue=F?`${T}'use strict';`:"";t.prepend(`${c}${jr(n,I,S,k,v,e,l,E)}`);const U=Fr(s,n,m,I,E,l,S,P);let K=Br(m&&r,u&&(A===!0||A==="if-default-prop"&&i),d&&v,E);K&&(K=B+B+K),t.append(`${U}${K}${g}`).indent(l).prepend(`${x.define}(${le}(${$(R,{isAsync:!1,name:null})}{${ue}${B}${B}`).append(`${B}${B}}));`)},cjs:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,outro:m,snippets:f},{compact:g,esModule:E,externalLiveBindings:x,freeze:A,interop:S,generatedCode:{symbols:k},reexportProtoFromExternal:v,strict:I}){const{_:P,n:F}=f,N=I?`'use strict';${F}${F}`:"";let R=Br(d&&r,c&&(E===!0||E==="if-default-prop"&&i),u&&k,f);R&&(R+=F+F);const B=(function(j,{_:le,cnst:ue,n:U},K){let X="",Y=!1;for(const{importPath:de,name:C,reexports:fe,imports:ne}of j)fe||ne?(X+=K&&Y?",":`${X?`;${U}`:""}${ue} `,Y=!0,X+=`${C}${le}=${le}require('${de}')`):(X&&(X+=K&&!Y?",":`;${U}`),Y=!1,X+=`require('${de}')`);return X?`${X};${U}${U}`:""})(n,f,g),$=jr(n,S,x,A,k,e,a,f);t.prepend(`${N}${l}${R}${B}${$}`);const T=Fr(s,n,d,S,f,a,x,v,`module.exports${P}=${P}`);t.append(`${T}${m}`)},es:function(t,{accessedGlobals:e,indent:n,intro:s,outro:i,dependencies:r,exports:a,snippets:l},{externalLiveBindings:c,freeze:u,generatedCode:{symbols:d},importAttributesKey:m}){const{n:f}=l,g=(function(x,A,{_:S}){const k=[];for(const{importPath:v,reexports:I,imports:P,name:F,attributes:N}of x){const R=`'${v}'${N?`${S}${A}${S}${N}`:""};`;if(I||P){if(P){let B=null,$=null;const T=[];for(const j of P)j.imported==="default"?B=j:j.imported==="*"?$=j:T.push(j);$&&k.push(`import${S}*${S}as ${$.local} from${S}${R}`),B&&T.length===0?k.push(`import ${B.local} from${S}${R}`):T.length>0&&k.push(`import ${B?`${B.local},${S}`:""}{${S}${T.map(j=>j.imported===j.local?j.imported:`${ks(j.imported)} as ${j.local}`).join(`,${S}`)}${S}}${S}from${S}${R}`)}if(I){let B=null;const $=[],T=[];for(const j of I)j.reexported==="*"?B=j:j.imported==="*"?$.push(j):T.push(j);if(B&&k.push(`export${S}*${S}from${S}${R}`),$.length>0){P&&P.some(j=>j.imported==="*"&&j.local===F)||k.push(`import${S}*${S}as ${F} from${S}${R}`);for(const j of $)k.push(`export${S}{${S}${F===j.reexported?F:`${F} as ${ks(j.reexported)}`} };`)}T.length>0&&k.push(`export${S}{${S}${T.map(j=>j.imported===j.reexported?ks(j.imported):`${ks(j.imported)} as ${ks(j.reexported)}`).join(`,${S}`)}${S}}${S}from${S}${R}`)}}else k.push(`import${S}${R}`)}return k})(r,m,l);g.length>0&&(s+=g.join(f)+f+f),(s+=Va(null,e,n,l,c,u,d))&&t.prepend(s);const E=(function(x,{_:A,cnst:S}){const k=[],v=new Array(x.length);let I=0;for(const P of x)P.expression&&k.push(`${S} ${P.local}${A}=${A}${P.expression};`),v[I++]=P.exported===P.local?P.local:`${P.local} as ${ks(P.exported)}`;return v.length>0&&k.push(`export${A}{${A}${v.join(`,${A}`)}${A}};`),k})(a,l);E.length>0&&t.append(f+f+E.join(f).trim()),i&&t.append(i),t.trim()},iife:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:m},{compact:f,esModule:g,extend:E,freeze:x,externalLiveBindings:A,reexportProtoFromExternal:S,globals:k,interop:v,name:I,generatedCode:{symbols:P},strict:F}){const{_:N,getNonArrowFunctionIntro:R,getPropertyAccess:B,n:$}=m,T=I&&I.includes("."),j=!E&&!T;if(I&&j&&(zh(le=I)||jh.test(le)))return re((function(be){return{code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${be}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:ot("configuration-options/#output-extend")}})(I));var le;Qa(u,n);const ue=Td(n),U=ue.map(be=>be.globalName||"null"),K=ue.map(be=>be.name);r&&!I&&u(ye,{code:Sh,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:ot(yh)}),r&&(c||s[0]?.local==="exports.default")&&(E?(U.unshift(`this${zr(I,B)}${N}=${N}this${zr(I,B)}${N}||${N}{}`),K.unshift("exports")):(U.unshift("{}"),K.unshift("exports")));const X=F?`${a}'use strict';${$}`:"",Y=jr(n,v,A,x,P,e,a,m);t.prepend(`${l}${Y}`);let de=`(${R(K,{isAsync:!1,name:null})}{${$}${X}${$}`;r&&(!I||E&&c||(de=(j?`var ${I}`:`this${zr(I,B)}`)+`${N}=${N}${de}`),T&&(de=(function(be,M,b,{_:O,getPropertyAccess:D,s:H},Q,oe){const se=be.split("."),Ne=se[0]in Object.prototype;oe&&Ne&&oe(ye,Mh(se[0])),se[0]=(typeof b=="function"?b(se[0]):Ne?se[0]:b[se[0]])||se[0],se.pop();let $e=M;return se.map(Ae=>($e+=D(Ae),`${$e}${O}=${O}${$e}${O}||${O}{}${H}`)).join(Q?",":`
29
- `)+(Q&&se.length>0?";":`
30
- `)})(I,"this",k,m,f,u)+de));let C=`${$}${$}})(${U.join(`,${N}`)});`;r&&!E&&c&&(C=`${$}${$}${a}return exports;${C}`);const fe=Fr(s,n,c,v,m,a,A,S);let ne=Br(c&&r,g===!0||g==="if-default-prop"&&i,P,m);ne&&(ne=$+$+ne),t.append(`${fe}${ne}${d}`).indent(a).prepend(de).append(C)},system:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasExports:i,indent:r,intro:a,snippets:l,outro:c,usesTopLevelAwait:u},{externalLiveBindings:d,freeze:m,name:f,generatedCode:{symbols:g},strict:E,systemNullSetters:x}){const{_:A,getFunctionIntro:S,getNonArrowFunctionIntro:k,n:v,s:I}=l,{importBindings:P,setters:F,starExcludes:N}=(function(j,le,ue,{_:U,cnst:K,getObject:X,getPropertyAccess:Y,n:de}){const C=[],fe=[];let ne=null;for(const{imports:be,reexports:M}of j){const b=[];if(be)for(const O of be)C.push(O.local),O.imported==="*"?b.push(`${O.local}${U}=${U}module;`):b.push(`${O.local}${U}=${U}module${Y(O.imported)};`);if(M){const O=[];let D=!1;for(const{imported:H,reexported:Q}of M)Q==="*"?D=!0:O.push([Q,H==="*"?"module":`module${Y(H)}`]);if(O.length>1||D)if(D){ne||(ne=Hg({dependencies:j,exports:le})),O.unshift([null,`__proto__:${U}null`]);const H=X(O,{lineBreakIndent:null});b.push(`${K} setter${U}=${U}${H};`,`for${U}(${K} name in module)${U}{`,`${ue}if${U}(!_starExcludes[name])${U}setter[name]${U}=${U}module[name];`,"}","exports(setter);")}else{const H=X(O,{lineBreakIndent:null});b.push(`exports(${H});`)}else{const[H,Q]=O[0];b.push(`exports(${JSON.stringify(H)},${U}${Q});`)}}fe.push(b.join(`${de}${ue}${ue}${ue}`))}return{importBindings:C,setters:fe,starExcludes:ne}})(n,s,r,l),R=f?`'${f}',${A}`:"",B=e.has("module")?["exports","module"]:i?["exports"]:[];let $=`System.register(${R}[`+n.map(({importPath:j})=>`'${j}'`).join(`,${A}`)+`],${A}(${k(B,{isAsync:!1,name:null})}{${v}${r}${E?"'use strict';":""}`+Wg(N,r,l)+Gg(P,r,l)+`${v}${r}return${A}{${F.length>0?`${v}${r}${r}setters:${A}[${F.map(j=>j?`${S(["module"],{isAsync:!1,name:null})}{${v}${r}${r}${r}${j}${v}${r}${r}}`:x?"null":`${S([],{isAsync:!1,name:null})}{}`).join(`,${A}`)}],`:""}${v}`;$+=`${r}${r}execute:${A}(${k([],{isAsync:u,name:null})}{${v}${v}`;const T=`${r}${r}})${v}${r}}${I}${v}}));`;t.prepend(a+Va(null,e,r,l,d,m,g)+Xg(s,r,l)).append(`${c}${v}${v}`+Kg(s,r,l)+Jg(s,r,l)).indent(`${r}${r}${r}`).append(T).prepend($)},umd:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:a,indent:l,intro:c,namedExportsMode:u,log:d,outro:m,snippets:f},{amd:g,compact:E,esModule:x,extend:A,externalLiveBindings:S,freeze:k,interop:v,name:I,generatedCode:{symbols:P},globals:F,noConflict:N,reexportProtoFromExternal:R,strict:B}){const{_:$,cnst:T,getFunctionIntro:j,getNonArrowFunctionIntro:le,getPropertyAccess:ue,n:U,s:K}=f,X=E?"f":"factory",Y=E?"g":"global";if(r&&!I)return re({code:Sh,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:ot(yh)});Qa(d,n);const de=n.map(J=>`'${Cd(J.importPath,g.forceJsExtensionForImports)}'`),C=n.map(J=>`require('${J.importPath}')`),fe=Td(n),ne=fe.map(J=>tl(J.globalName,Y,ue)),be=fe.map(J=>J.name);(r||N)&&(u||r&&s[0]?.local==="exports.default")&&(de.unshift("'exports'"),C.unshift("exports"),ne.unshift(Za(I,Y,F,(A?`${tl(I,Y,ue)}${$}||${$}`:"")+"{}",f,d)),be.unshift("exports"));const M=Pd(g,a),b=(M?`'${M}',${$}`:"")+(de.length>0?`[${de.join(`,${$}`)}],${$}`:""),O=g.define,D=!u&&r?`module.exports${$}=${$}`:"",H=B?`${$}'use strict';${U}`:"";let Q;if(N){const J=E?"e":"exports";let Ee;!u&&r?Ee=`${T} ${J}${$}=${$}${Za(I,Y,F,`${X}(${ne.join(`,${$}`)})`,f,d)};`:Ee=`${T} ${J}${$}=${$}${ne.shift()};${U}${l}${l}${X}(${[J,...ne].join(`,${$}`)});`,Q=`(${j([],{isAsync:!1,name:null})}{${U}${l}${l}${T} current${$}=${$}${(function(Xe,lt,{_:Ye,getPropertyAccess:kn}){let an=lt;return Xe.split(".").map(Qi=>an+=kn(Qi)).join(`${Ye}&&${Ye}`)})(I,Y,f)};${U}${l}${l}${Ee}${U}${l}${l}${J}.noConflict${$}=${$}${j([],{isAsync:!1,name:null})}{${$}${tl(I,Y,ue)}${$}=${$}current;${$}return ${J}${K}${$}};${U}${l}})()`}else Q=`${X}(${ne.join(`,${$}`)})`,!u&&r&&(Q=Za(I,Y,F,Q,f,d));const oe=r||N&&u||ne.length>0,se=[X];oe&&se.unshift(Y);const Ne=oe?`this,${$}`:"",$e=oe?`(${Y}${$}=${$}typeof globalThis${$}!==${$}'undefined'${$}?${$}globalThis${$}:${$}${Y}${$}||${$}self,${$}`:"",Ae=oe?")":"",he=oe?`${l}typeof exports${$}===${$}'object'${$}&&${$}typeof module${$}!==${$}'undefined'${$}?${$}${D}${X}(${C.join(`,${$}`)})${$}:${U}`:"",Me=`(${le(se,{isAsync:!1,name:null})}{${U}`+he+`${l}typeof ${O}${$}===${$}'function'${$}&&${$}${O}.amd${$}?${$}${O}(${b}${X})${$}:${U}${l}${$e}${Q}${Ae};${U}})(${Ne}(${le(be,{isAsync:!1,name:null})}{${H}${U}`,Ge=U+U+"}));";t.prepend(`${c}${jr(n,v,S,k,P,e,l,f)}`);const ee=Fr(s,n,u,v,f,l,S,R);let ke=Br(u&&r,x===!0||x==="if-default-prop"&&i,P,f);ke&&(ke=U+U+ke),t.append(`${ee}${ke}${m}`).trim().indent(l).append(Ge).prepend(Me)}};function Qg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nl,Rd,Dd,sl,Od,Ld,Md,Fd,Bd,jd,zd,Vd={};function Vr(){if(Rd)return nl;Rd=1;const t="\\\\/",e=`[^${t}]`,n="\\.",s="\\/",i="[^/]",r=`(?:${s}|$)`,a=`(?:^|${s})`,l=`${n}{1,2}${r}`,c={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:r,DOTS_SLASH:l,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${a}${l})`,NO_DOT_SLASH:`(?!${n}{0,1}${r})`,NO_DOTS_SLASH:`(?!${l})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:a,SEP:"/"},u={...c,SLASH_LITERAL:`[${t}]`,QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"};return nl={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{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:d=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${d.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:d=>d===!0?u:c},nl}function Ur(){return Dd||(Dd=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=Vr();t.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),t.hasRegexChars=r=>s.test(r),t.isRegexChar=r=>r.length===1&&t.hasRegexChars(r),t.escapeRegex=r=>r.replace(i,"\\$1"),t.toPosixSlashes=r=>r.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const r=navigator.platform.toLowerCase();return r==="win32"||r==="windows"}return!(typeof process>"u"||!process.platform)&&process.platform==="win32"},t.removeBackslashes=r=>r.replace(n,a=>a==="\\"?"":a),t.escapeLast=(r,a,l)=>{const c=r.lastIndexOf(a,l);return c===-1?r:r[c-1]==="\\"?t.escapeLast(r,a,c-1):`${r.slice(0,c)}\\${r.slice(c)}`},t.removePrefix=(r,a={})=>{let l=r;return l.startsWith("./")&&(l=l.slice(2),a.prefix="./"),l},t.wrapOutput=(r,a={},l={})=>{let c=`${l.contains?"":"^"}(?:${r})${l.contains?"":"$"}`;return a.negated===!0&&(c=`(?:^(?!${c}).*$)`),c},t.basename=(r,{windows:a}={})=>{const l=r.split(a?/[\\/]/:"/"),c=l[l.length-1];return c===""?l[l.length-2]:c}})(Vd)),Vd}function Zg(){if(Od)return sl;Od=1;const t=Ur(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:i,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:m,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:x}=Vr(),A=k=>k===l||k===s,S=k=>{k.isPrefix!==!0&&(k.depth=k.isGlobstar?1/0:1)};return sl=(k,v)=>{const I=v||{},P=k.length-1,F=I.parts===!0||I.scanToEnd===!0,N=[],R=[],B=[];let $,T,j=k,le=-1,ue=0,U=0,K=!1,X=!1,Y=!1,de=!1,C=!1,fe=!1,ne=!1,be=!1,M=!1,b=!1,O=0,D={value:"",depth:0,isGlob:!1};const H=()=>le>=P,Q=()=>j.charCodeAt(le+1),oe=()=>($=T,j.charCodeAt(++le));for(;le<P;){let he;if(T=oe(),T!==s){if(fe===!0||T===c){for(O++;H()!==!0&&(T=oe());)if(T!==s)if(T!==c){if(fe!==!0&&T===r&&(T=oe())===r){if(K=D.isBrace=!0,Y=D.isGlob=!0,b=!0,F===!0)continue;break}if(fe!==!0&&T===i){if(K=D.isBrace=!0,Y=D.isGlob=!0,b=!0,F===!0)continue;break}if(T===g&&(O--,O===0)){fe=!1,K=D.isBrace=!0,b=!0;break}}else O++;else ne=D.backslashes=!0,oe();if(F===!0)continue;break}if(T!==l){if(I.noext!==!0&&(T===m||T===n||T===e||T===f||T===a)&&Q()===u){if(Y=D.isGlob=!0,de=D.isExtglob=!0,b=!0,T===a&&le===ue&&(M=!0),F===!0){for(;H()!==!0&&(T=oe());)if(T!==s){if(T===E){Y=D.isGlob=!0,b=!0;break}}else ne=D.backslashes=!0,T=oe();continue}break}if(T===e){if($===e&&(C=D.isGlobstar=!0),Y=D.isGlob=!0,b=!0,F===!0)continue;break}if(T===f){if(Y=D.isGlob=!0,b=!0,F===!0)continue;break}if(T===d){for(;H()!==!0&&(he=oe());)if(he!==s){if(he===x){X=D.isBracket=!0,Y=D.isGlob=!0,b=!0;break}}else ne=D.backslashes=!0,oe();if(F===!0)continue;break}if(I.nonegate===!0||T!==a||le!==ue){if(I.noparen!==!0&&T===u){if(Y=D.isGlob=!0,F===!0){for(;H()!==!0&&(T=oe());)if(T!==u){if(T===E){b=!0;break}}else ne=D.backslashes=!0,T=oe();continue}break}if(Y===!0){if(b=!0,F===!0)continue;break}}else be=D.negated=!0,ue++}else{if(N.push(le),R.push(D),D={value:"",depth:0,isGlob:!1},b===!0)continue;if($===r&&le===ue+1){ue+=2;continue}U=le+1}}else ne=D.backslashes=!0,T=oe(),T===c&&(fe=!0)}I.noext===!0&&(de=!1,Y=!1);let se=j,Ne="",$e="";ue>0&&(Ne=j.slice(0,ue),j=j.slice(ue),U-=ue),se&&Y===!0&&U>0?(se=j.slice(0,U),$e=j.slice(U)):Y===!0?(se="",$e=j):se=j,se&&se!==""&&se!=="/"&&se!==j&&A(se.charCodeAt(se.length-1))&&(se=se.slice(0,-1)),I.unescape===!0&&($e&&($e=t.removeBackslashes($e)),se&&ne===!0&&(se=t.removeBackslashes(se)));const Ae={prefix:Ne,input:k,start:ue,base:se,glob:$e,isBrace:K,isBracket:X,isGlob:Y,isExtglob:de,isGlobstar:C,negated:be,negatedExtglob:M};if(I.tokens===!0&&(Ae.maxDepth=0,A(T)||R.push(D),Ae.tokens=R),I.parts===!0||I.tokens===!0){let he;for(let Me=0;Me<N.length;Me++){const Ge=he?he+1:ue,ee=N[Me],ke=k.slice(Ge,ee);I.tokens&&(Me===0&&ue!==0?(R[Me].isPrefix=!0,R[Me].value=Ne):R[Me].value=ke,S(R[Me]),Ae.maxDepth+=R[Me].depth),Me===0&&ke===""||B.push(ke),he=ee}if(he&&he+1<k.length){const Me=k.slice(he+1);B.push(Me),I.tokens&&(R[R.length-1].value=Me,S(R[R.length-1]),Ae.maxDepth+=R[R.length-1].depth)}Ae.slashes=N,Ae.parts=B}return Ae},sl}function ey(){if(Md)return Ld;Md=1;const t=Vr(),e=Ur(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:a}=t,l=(d,m)=>typeof m.expandRange=="function"?m.expandRange(...d,m):(d.sort(),`[${d.join("-")}]`),c=(d,m)=>`Missing ${d}: "${m}" - use "\\\\${m}" to match literal characters`,u=(d,m)=>{if(typeof d!="string")throw new TypeError("Expected a string");d=a[d]||d;const f={...m},g=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n;let E=d.length;if(E>g)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${g}`);const x={type:"bos",value:"",output:f.prepend||""},A=[x],S=f.capture?"":"?:",k=t.globChars(f.windows),v=t.extglobChars(k),{DOT_LITERAL:I,PLUS_LITERAL:P,SLASH_LITERAL:F,ONE_CHAR:N,DOTS_SLASH:R,NO_DOT:B,NO_DOT_SLASH:$,NO_DOTS_SLASH:T,QMARK:j,QMARK_NO_DOT:le,STAR:ue,START_ANCHOR:U}=k,K=ee=>`(${S}(?:(?!${U}${ee.dot?R:I}).)*?)`,X=f.dot?"":B,Y=f.dot?j:le;let de=f.bash===!0?K(f):ue;f.capture&&(de=`(${de})`),typeof f.noext=="boolean"&&(f.noextglob=f.noext);const C={input:d,index:-1,start:0,dot:f.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:A};d=e.removePrefix(d,C),E=d.length;const fe=[],ne=[],be=[];let M,b=x;const O=()=>C.index===E-1,D=C.peek=(ee=1)=>d[C.index+ee],H=C.advance=()=>d[++C.index]||"",Q=()=>d.slice(C.index+1),oe=(ee="",ke=0)=>{C.consumed+=ee,C.index+=ke},se=ee=>{C.output+=ee.output!=null?ee.output:ee.value,oe(ee.value)},Ne=()=>{let ee=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)H(),C.start++,ee++;return ee%2!=0&&(C.negated=!0,C.start++,!0)},$e=ee=>{C[ee]++,be.push(ee)},Ae=ee=>{C[ee]--,be.pop()},he=ee=>{if(b.type==="globstar"){const ke=C.braces>0&&(ee.type==="comma"||ee.type==="brace"),J=ee.extglob===!0||fe.length&&(ee.type==="pipe"||ee.type==="paren");ee.type==="slash"||ee.type==="paren"||ke||J||(C.output=C.output.slice(0,-b.output.length),b.type="star",b.value="*",b.output=de,C.output+=b.output)}if(fe.length&&ee.type!=="paren"&&(fe[fe.length-1].inner+=ee.value),(ee.value||ee.output)&&se(ee),b&&b.type==="text"&&ee.type==="text")return b.output=(b.output||b.value)+ee.value,void(b.value+=ee.value);ee.prev=b,A.push(ee),b=ee},Me=(ee,ke)=>{const J={...v[ke],conditions:1,inner:""};J.prev=b,J.parens=C.parens,J.output=C.output;const Ee=(f.capture?"(":"")+J.open;$e("parens"),he({type:ee,value:ke,output:C.output?"":N}),he({type:"paren",extglob:!0,value:H(),output:Ee}),fe.push(J)},Ge=ee=>{let ke,J=ee.close+(f.capture?")":"");if(ee.type==="negate"){let Ee=de;if(ee.inner&&ee.inner.length>1&&ee.inner.includes("/")&&(Ee=K(f)),(Ee!==de||O()||/^\)+$/.test(Q()))&&(J=ee.close=`)$))${Ee}`),ee.inner.includes("*")&&(ke=Q())&&/^\.[^\\/.]+$/.test(ke)){const Xe=u(ke,{...m,fastpaths:!1}).output;J=ee.close=`)${Xe})${Ee})`}ee.prev.type==="bos"&&(C.negatedExtglob=!0)}he({type:"paren",extglob:!0,value:M,output:J}),Ae("parens")};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(d)){let ee=!1,ke=d.replace(r,(J,Ee,Xe,lt,Ye,kn)=>lt==="\\"?(ee=!0,J):lt==="?"?Ee?Ee+lt+(Ye?j.repeat(Ye.length):""):kn===0?Y+(Ye?j.repeat(Ye.length):""):j.repeat(Xe.length):lt==="."?I.repeat(Xe.length):lt==="*"?Ee?Ee+lt+(Ye?de:""):de:Ee?J:`\\${J}`);return ee===!0&&(ke=f.unescape===!0?ke.replace(/\\/g,""):ke.replace(/\\+/g,J=>J.length%2==0?"\\\\":J?"\\":"")),ke===d&&f.contains===!0?(C.output=d,C):(C.output=e.wrapOutput(ke,C,m),C)}for(;!O();){if(M=H(),M==="\0")continue;if(M==="\\"){const J=D();if(J==="/"&&f.bash!==!0||J==="."||J===";")continue;if(!J){M+="\\",he({type:"text",value:M});continue}const Ee=/^\\+/.exec(Q());let Xe=0;if(Ee&&Ee[0].length>2&&(Xe=Ee[0].length,C.index+=Xe,Xe%2!=0&&(M+="\\")),f.unescape===!0?M=H():M+=H(),C.brackets===0){he({type:"text",value:M});continue}}if(C.brackets>0&&(M!=="]"||b.value==="["||b.value==="[^")){if(f.posix!==!1&&M===":"){const J=b.value.slice(1);if(J.includes("[")&&(b.posix=!0,J.includes(":"))){const Ee=b.value.lastIndexOf("["),Xe=b.value.slice(0,Ee),lt=b.value.slice(Ee+2),Ye=s[lt];if(Ye){b.value=Xe+Ye,C.backtrack=!0,H(),x.output||A.indexOf(b)!==1||(x.output=N);continue}}}(M==="["&&D()!==":"||M==="-"&&D()==="]")&&(M=`\\${M}`),M!=="]"||b.value!=="["&&b.value!=="[^"||(M=`\\${M}`),f.posix===!0&&M==="!"&&b.value==="["&&(M="^"),b.value+=M,se({value:M});continue}if(C.quotes===1&&M!=='"'){M=e.escapeRegex(M),b.value+=M,se({value:M});continue}if(M==='"'){C.quotes=C.quotes===1?0:1,f.keepQuotes===!0&&he({type:"text",value:M});continue}if(M==="("){$e("parens"),he({type:"paren",value:M});continue}if(M===")"){if(C.parens===0&&f.strictBrackets===!0)throw new SyntaxError(c("opening","("));const J=fe[fe.length-1];if(J&&C.parens===J.parens+1){Ge(fe.pop());continue}he({type:"paren",value:M,output:C.parens?")":"\\)"}),Ae("parens");continue}if(M==="["){if(f.nobracket!==!0&&Q().includes("]"))$e("brackets");else{if(f.nobracket!==!0&&f.strictBrackets===!0)throw new SyntaxError(c("closing","]"));M=`\\${M}`}he({type:"bracket",value:M});continue}if(M==="]"){if(f.nobracket===!0||b&&b.type==="bracket"&&b.value.length===1){he({type:"text",value:M,output:`\\${M}`});continue}if(C.brackets===0){if(f.strictBrackets===!0)throw new SyntaxError(c("opening","["));he({type:"text",value:M,output:`\\${M}`});continue}Ae("brackets");const J=b.value.slice(1);if(b.posix===!0||J[0]!=="^"||J.includes("/")||(M=`/${M}`),b.value+=M,se({value:M}),f.literalBrackets===!1||e.hasRegexChars(J))continue;const Ee=e.escapeRegex(b.value);if(C.output=C.output.slice(0,-b.value.length),f.literalBrackets===!0){C.output+=Ee,b.value=Ee;continue}b.value=`(${S}${Ee}|${b.value})`,C.output+=b.value;continue}if(M==="{"&&f.nobrace!==!0){$e("braces");const J={type:"brace",value:M,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};ne.push(J),he(J);continue}if(M==="}"){const J=ne[ne.length-1];if(f.nobrace===!0||!J){he({type:"text",value:M,output:M});continue}let Ee=")";if(J.dots===!0){const Xe=A.slice(),lt=[];for(let Ye=Xe.length-1;Ye>=0&&(A.pop(),Xe[Ye].type!=="brace");Ye--)Xe[Ye].type!=="dots"&&lt.unshift(Xe[Ye].value);Ee=l(lt,f),C.backtrack=!0}if(J.comma!==!0&&J.dots!==!0){const Xe=C.output.slice(0,J.outputIndex),lt=C.tokens.slice(J.tokensIndex);J.value=J.output="\\{",M=Ee="\\}",C.output=Xe;for(const Ye of lt)C.output+=Ye.output||Ye.value}he({type:"brace",value:M,output:Ee}),Ae("braces"),ne.pop();continue}if(M==="|"){fe.length>0&&fe[fe.length-1].conditions++,he({type:"text",value:M});continue}if(M===","){let J=M;const Ee=ne[ne.length-1];Ee&&be[be.length-1]==="braces"&&(Ee.comma=!0,J="|"),he({type:"comma",value:M,output:J});continue}if(M==="/"){if(b.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",A.pop(),b=x;continue}he({type:"slash",value:M,output:F});continue}if(M==="."){if(C.braces>0&&b.type==="dot"){b.value==="."&&(b.output=I);const J=ne[ne.length-1];b.type="dots",b.output+=M,b.value+=M,J.dots=!0;continue}if(C.braces+C.parens===0&&b.type!=="bos"&&b.type!=="slash"){he({type:"text",value:M,output:I});continue}he({type:"dot",value:M,output:I});continue}if(M==="?"){if(!(b&&b.value==="(")&&f.noextglob!==!0&&D()==="("&&D(2)!=="?"){Me("qmark",M);continue}if(b&&b.type==="paren"){const J=D();let Ee=M;(b.value==="("&&!/[!=<:]/.test(J)||J==="<"&&!/<([!=]|\w+>)/.test(Q()))&&(Ee=`\\${M}`),he({type:"text",value:M,output:Ee});continue}if(f.dot!==!0&&(b.type==="slash"||b.type==="bos")){he({type:"qmark",value:M,output:le});continue}he({type:"qmark",value:M,output:j});continue}if(M==="!"){if(f.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){Me("negate",M);continue}if(f.nonegate!==!0&&C.index===0){Ne();continue}}if(M==="+"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){Me("plus",M);continue}if(b&&b.value==="("||f.regex===!1){he({type:"plus",value:M,output:P});continue}if(b&&(b.type==="bracket"||b.type==="paren"||b.type==="brace")||C.parens>0){he({type:"plus",value:M});continue}he({type:"plus",value:P});continue}if(M==="@"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){he({type:"at",extglob:!0,value:M,output:""});continue}he({type:"text",value:M});continue}if(M!=="*"){M!=="$"&&M!=="^"||(M=`\\${M}`);const J=i.exec(Q());J&&(M+=J[0],C.index+=J[0].length),he({type:"text",value:M});continue}if(b&&(b.type==="globstar"||b.star===!0)){b.type="star",b.star=!0,b.value+=M,b.output=de,C.backtrack=!0,C.globstar=!0,oe(M);continue}let ee=Q();if(f.noextglob!==!0&&/^\([^?]/.test(ee)){Me("star",M);continue}if(b.type==="star"){if(f.noglobstar===!0){oe(M);continue}const J=b.prev,Ee=J.prev,Xe=J.type==="slash"||J.type==="bos",lt=Ee&&(Ee.type==="star"||Ee.type==="globstar");if(f.bash===!0&&(!Xe||ee[0]&&ee[0]!=="/")){he({type:"star",value:M,output:""});continue}const Ye=C.braces>0&&(J.type==="comma"||J.type==="brace"),kn=fe.length&&(J.type==="pipe"||J.type==="paren");if(!Xe&&J.type!=="paren"&&!Ye&&!kn){he({type:"star",value:M,output:""});continue}for(;ee.slice(0,3)==="/**";){const an=d[C.index+4];if(an&&an!=="/")break;ee=ee.slice(3),oe("/**",3)}if(J.type==="bos"&&O()){b.type="globstar",b.value+=M,b.output=K(f),C.output=b.output,C.globstar=!0,oe(M);continue}if(J.type==="slash"&&J.prev.type!=="bos"&&!lt&&O()){C.output=C.output.slice(0,-(J.output+b.output).length),J.output=`(?:${J.output}`,b.type="globstar",b.output=K(f)+(f.strictSlashes?")":"|$)"),b.value+=M,C.globstar=!0,C.output+=J.output+b.output,oe(M);continue}if(J.type==="slash"&&J.prev.type!=="bos"&&ee[0]==="/"){const an=ee[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(J.output+b.output).length),J.output=`(?:${J.output}`,b.type="globstar",b.output=`${K(f)}${F}|${F}${an})`,b.value+=M,C.output+=J.output+b.output,C.globstar=!0,oe(M+H()),he({type:"slash",value:"/",output:""});continue}if(J.type==="bos"&&ee[0]==="/"){b.type="globstar",b.value+=M,b.output=`(?:^|${F}|${K(f)}${F})`,C.output=b.output,C.globstar=!0,oe(M+H()),he({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-b.output.length),b.type="globstar",b.output=K(f),b.value+=M,C.output+=b.output,C.globstar=!0,oe(M);continue}const ke={type:"star",value:M,output:de};f.bash!==!0?!b||b.type!=="bracket"&&b.type!=="paren"||f.regex!==!0?(C.index!==C.start&&b.type!=="slash"&&b.type!=="dot"||(b.type==="dot"?(C.output+=$,b.output+=$):f.dot===!0?(C.output+=T,b.output+=T):(C.output+=X,b.output+=X),D()!=="*"&&(C.output+=N,b.output+=N)),he(ke)):(ke.output=M,he(ke)):(ke.output=".*?",b.type!=="bos"&&b.type!=="slash"||(ke.output=X+ke.output),he(ke))}for(;C.brackets>0;){if(f.strictBrackets===!0)throw new SyntaxError(c("closing","]"));C.output=e.escapeLast(C.output,"["),Ae("brackets")}for(;C.parens>0;){if(f.strictBrackets===!0)throw new SyntaxError(c("closing",")"));C.output=e.escapeLast(C.output,"("),Ae("parens")}for(;C.braces>0;){if(f.strictBrackets===!0)throw new SyntaxError(c("closing","}"));C.output=e.escapeLast(C.output,"{"),Ae("braces")}if(f.strictSlashes===!0||b.type!=="star"&&b.type!=="bracket"||he({type:"maybe_slash",value:"",output:`${F}?`}),C.backtrack===!0){C.output="";for(const ee of C.tokens)C.output+=ee.output!=null?ee.output:ee.value,ee.suffix&&(C.output+=ee.suffix)}return C};return u.fastpaths=(d,m)=>{const f={...m},g=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n,E=d.length;if(E>g)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${g}`);d=a[d]||d;const{DOT_LITERAL:x,SLASH_LITERAL:A,ONE_CHAR:S,DOTS_SLASH:k,NO_DOT:v,NO_DOTS:I,NO_DOTS_SLASH:P,STAR:F,START_ANCHOR:N}=t.globChars(f.windows),R=f.dot?I:v,B=f.dot?P:v,$=f.capture?"":"?:";let T=f.bash===!0?".*?":F;f.capture&&(T=`(${T})`);const j=K=>K.noglobstar===!0?T:`(${$}(?:(?!${N}${K.dot?k:x}).)*?)`,le=K=>{switch(K){case"*":return`${R}${S}${T}`;case".*":return`${x}${S}${T}`;case"*.*":return`${R}${T}${x}${S}${T}`;case"*/*":return`${R}${T}${A}${S}${B}${T}`;case"**":return R+j(f);case"**/*":return`(?:${R}${j(f)}${A})?${B}${S}${T}`;case"**/*.*":return`(?:${R}${j(f)}${A})?${B}${T}${x}${S}${T}`;case"**/.*":return`(?:${R}${j(f)}${A})?${x}${S}${T}`;default:{const X=/^(.*?)\.(\w+)$/.exec(K);if(!X)return;const Y=le(X[1]);return Y?Y+x+X[2]:void 0}}},ue=e.removePrefix(d,{negated:!1,prefix:""});let U=le(ue);return U&&f.strictSlashes!==!0&&(U+=`${A}?`),U},Ld=u}function ty(){if(Bd)return Fd;Bd=1;const t=Zg(),e=ey(),n=Ur(),s=Vr(),i=(r,a,l=!1)=>{if(Array.isArray(r)){const A=r.map(k=>i(k,a,l));return k=>{for(const v of A){const I=v(k);if(I)return I}return!1}}const c=(u=r)&&typeof u=="object"&&!Array.isArray(u)&&r.tokens&&r.input;var u;if(r===""||typeof r!="string"&&!c)throw new TypeError("Expected pattern to be a non-empty string");const d=a||{},m=d.windows,f=c?i.compileRe(r,a):i.makeRe(r,a,!1,!0),g=f.state;delete f.state;let E=()=>!1;if(d.ignore){const A={...a,ignore:null,onMatch:null,onResult:null};E=i(d.ignore,A,l)}const x=(A,S=!1)=>{const{isMatch:k,match:v,output:I}=i.test(A,f,a,{glob:r,posix:m}),P={glob:r,state:g,regex:f,posix:m,input:A,output:I,match:v,isMatch:k};return typeof d.onResult=="function"&&d.onResult(P),k===!1?(P.isMatch=!1,!!S&&P):E(A)?(typeof d.onIgnore=="function"&&d.onIgnore(P),P.isMatch=!1,!!S&&P):(typeof d.onMatch=="function"&&d.onMatch(P),!S||P)};return l&&(x.state=g),x};return i.test=(r,a,l,{glob:c,posix:u}={})=>{if(typeof r!="string")throw new TypeError("Expected input to be a string");if(r==="")return{isMatch:!1,output:""};const d=l||{},m=d.format||(u?n.toPosixSlashes:null);let f=r===c,g=f&&m?m(r):r;return f===!1&&(g=m?m(r):r,f=g===c),f!==!1&&d.capture!==!0||(f=d.matchBase===!0||d.basename===!0?i.matchBase(r,a,l,u):a.exec(g)),{isMatch:!!f,match:f,output:g}},i.matchBase=(r,a,l)=>(a instanceof RegExp?a:i.makeRe(a,l)).test(n.basename(r)),i.isMatch=(r,a,l)=>i(a,l)(r),i.parse=(r,a)=>Array.isArray(r)?r.map(l=>i.parse(l,a)):e(r,{...a,fastpaths:!1}),i.scan=(r,a)=>t(r,a),i.compileRe=(r,a,l=!1,c=!1)=>{if(l===!0)return r.output;const u=a||{},d=u.contains?"":"^",m=u.contains?"":"$";let f=`${d}(?:${r.output})${m}`;r&&r.negated===!0&&(f=`^(?!${f}).*$`);const g=i.toRegex(f,a);return c===!0&&(g.state=r),g},i.makeRe=(r,a={},l=!1,c=!1)=>{if(!r||typeof r!="string")throw new TypeError("Expected a non-empty string");let u={negated:!1,fastpaths:!0};return a.fastpaths===!1||r[0]!=="."&&r[0]!=="*"||(u.output=e.fastpaths(r,a)),u.output||(u=e(r,a)),i.compileRe(u,a,l,c)},i.toRegex=(r,a)=>{try{const l=a||{};return new RegExp(r,l.flags||(l.nocase?"i":""))}catch(l){if(a&&a.debug===!0)throw l;return/$^/}},i.constants=s,Fd=i}function ny(){if(zd)return jd;zd=1;const t=ty(),e=Ur();function n(s,i,r=!1){return!i||i.windows!==null&&i.windows!==void 0||(i={...i,windows:e.isWindows()}),t(s,i,r)}return Object.assign(n,t),jd=n}var sy=Qg(ny());const Ns={ArrayPattern(t,e){for(const n of e.elements)n&&Ns[n.type](t,n)},AssignmentPattern(t,e){Ns[e.left.type](t,e.left)},Identifier(t,e){t.push(e.name)},MemberExpression(){},ObjectPattern(t,e){for(const n of e.properties)n.type==="RestElement"?Ns.RestElement(t,n):Ns[n.value.type](t,n.value)},RestElement(t,e){Ns[e.argument.type](t,e.argument)}},iy=function(t){const e=[];return Ns[t.type](e,t),e};let He;function qr(t){yi===yn.length&&yn.push(yn.length+1);const e=yi;return yi=yn[e],yn[e]=t,e}function Ud(t,e){return t>>>=0,gi().subarray(t/1,t/1+e)}new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");let Zn=null;function Zt(){return(Zn===null||Zn.buffer.detached===!0||Zn.buffer.detached===void 0&&Zn.buffer!==He.memory.buffer)&&(Zn=new DataView(He.memory.buffer)),Zn}function fi(t,e){return(function(n,s){return il+=s,il>=oy&&(Wr=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Wr.decode(),il=s),Wr.decode(gi().subarray(n,n+s))})(t>>>=0,e)}let mi=null;function gi(){return mi!==null&&mi.byteLength!==0||(mi=new Uint8Array(He.memory.buffer)),mi}function Hr(t){return yn[t]}let yn=new Array(128).fill(void 0);yn.push(void 0,null,!0,!1);let yi=yn.length;function qd(t,e,n){if(n===void 0){const l=bi.encode(t),c=e(l.length,1)>>>0;return gi().subarray(c,c+l.length).set(l),Gr=l.length,c}let s=t.length,i=e(s,1)>>>0;const r=gi();let a=0;for(;a<s;a++){const l=t.charCodeAt(a);if(l>127)break;r[i+a]=l}if(a!==s){a!==0&&(t=t.slice(a)),i=n(i,s,s=a+3*t.length,1)>>>0;const l=gi().subarray(i+a,i+s);a+=bi.encodeInto(t,l).written,i=n(i,s,a,1)>>>0}return Gr=a,i}function ry(t){const e=Hr(t);return(function(n){n<132||(yn[n]=yi,yi=n)})(t),e}let Wr=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Wr.decode();const oy=2146435072;let il=0;const bi=new TextEncoder;"encodeInto"in bi||(bi.encodeInto=function(t,e){const n=bi.encode(t);return e.set(n),{read:t.length,written:n.length}});let Gr=0;function Hd(t,e,n){try{const a=He.__wbindgen_add_to_stack_pointer(-16),l=qd(t,He.__wbindgen_export2,He.__wbindgen_export3),c=Gr;He.parse(a,l,c,e,n);var s=Zt().getInt32(a+0,!0),i=Zt().getInt32(a+4,!0),r=Ud(s,i).slice();return He.__wbindgen_export(s,1*i,1),r}finally{He.__wbindgen_add_to_stack_pointer(16)}}const ay=new Set(["basic","cors","default"]);async function Wd(t){if(He!==void 0)return He;t!==void 0&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),t===void 0&&(t=new URL("/assets/bindings_wasm_bg--2fP_mkJ.wasm",self.location.href));const e=(function(){const i={wbg:{}};return i.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(r,a){throw new Error(fi(r,a))},i.wbg.__wbg_error_7534b8e9a36f1ab4=function(r,a){let l,c;try{l=r,c=a,console.error(fi(r,a))}finally{He.__wbindgen_export(l,c,1)}},i.wbg.__wbg_length_22ac23eaec9d8053=function(r){return Hr(r).length},i.wbg.__wbg_new_8a6f238a6ece86ea=function(){return qr(new Error)},i.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd=function(r,a,l){Uint8Array.prototype.set.call(Ud(r,a),Hr(l))},i.wbg.__wbg_stack_0ed75d68575b0f3c=function(r,a){const l=qd(Hr(a).stack,He.__wbindgen_export2,He.__wbindgen_export3),c=Gr;Zt().setInt32(r+4,c,!0),Zt().setInt32(r+0,l,!0)},i.wbg.__wbindgen_object_drop_ref=function(r){ry(r)},i})();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:s}=await(async function(i,r){if(typeof Response=="function"&&i instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(i,r)}catch(l){if(!i.ok||!ay.has(i.type)||i.headers.get("Content-Type")==="application/wasm")throw l;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",l)}const a=await i.arrayBuffer();return await WebAssembly.instantiate(a,r)}{const a=await WebAssembly.instantiate(i,r);return a instanceof WebAssembly.Instance?{instance:a,module:i}:a}})(await t,e);return(function(i,r){return He=i.exports,Wd.__wbindgen_wasm_module=r,Zn=null,mi=null,He})(n,s)}const ly=[function(t,e){return{type:"PanicError",start:e[t],end:e[t+1],message:e.convertString(e[t+2])}},function(t,e){return{type:"ParseError",start:e[t],end:e[t+1],message:e.convertString(e[t+2])}},function(t,e){return{type:"ArrayExpression",start:e[t],end:e[t+1],elements:Ve(e[t+2],e)}},function(t,e){return{type:"ArrayPattern",start:e[t],end:e[t+1],elements:Ve(e[t+2],e)}},function(t,e){const n=e[t+2],s=Dt(e[t+3],e);return{type:"ArrowFunctionExpression",start:e[t],end:e[t+1],async:!(1&~n),expression:!(2&~n),generator:!(4&~n),...s.length>0?{[As]:s}:{},params:Ve(e[t+4],e),body:W(e[t+5],e),id:null}},function(t,e){return{type:"AssignmentExpression",start:e[t],end:e[t+1],operator:yt[e[t+2]],left:W(e[t+3],e),right:W(e[t+4],e)}},function(t,e){return{type:"AssignmentPattern",start:e[t],end:e[t+1],left:W(e[t+2],e),right:W(e[t+3],e)}},function(t,e){return{type:"AwaitExpression",start:e[t],end:e[t+1],argument:W(e[t+2],e)}},function(t,e){return{type:"BinaryExpression",start:e[t],end:e[t+1],operator:yt[e[t+2]],left:W(e[t+3],e),right:W(e[t+4],e)}},function(t,e){return{type:"BlockStatement",start:e[t],end:e[t+1],body:Ve(e[t+2],e)}},function(t,e){const n=e[t+2];return{type:"BreakStatement",start:e[t],end:e[t+1],label:n===0?null:W(n,e)}},function(t,e){const n=e[t+2],s=Dt(e[t+3],e);return{type:"CallExpression",start:e[t],end:e[t+1],optional:!(1&~n),...s.length>0?{[As]:s}:{},callee:W(e[t+4],e),arguments:Ve(e[t+5],e)}},function(t,e){const n=e[t+2];return{type:"CatchClause",start:e[t],end:e[t+1],param:n===0?null:W(n,e),body:W(e[t+3],e)}},function(t,e){return{type:"ChainExpression",start:e[t],end:e[t+1],expression:W(e[t+2],e)}},function(t,e){return{type:"ClassBody",start:e[t],end:e[t+1],body:Ve(e[t+2],e)}},function(t,e){const n=e[t+3],s=e[t+4];return{type:"ClassDeclaration",start:e[t],end:e[t+1],decorators:Ve(e[t+2],e),id:n===0?null:W(n,e),superClass:s===0?null:W(s,e),body:W(e[t+5],e)}},function(t,e){const n=e[t+3],s=e[t+4];return{type:"ClassExpression",start:e[t],end:e[t+1],decorators:Ve(e[t+2],e),id:n===0?null:W(n,e),superClass:s===0?null:W(s,e),body:W(e[t+5],e)}},function(t,e){return{type:"ConditionalExpression",start:e[t],end:e[t+1],test:W(e[t+2],e),consequent:W(e[t+3],e),alternate:W(e[t+4],e)}},function(t,e){const n=e[t+2];return{type:"ContinueStatement",start:e[t],end:e[t+1],label:n===0?null:W(n,e)}},function(t,e){return{type:"DebuggerStatement",start:e[t],end:e[t+1]}},function(t,e){return{type:"Decorator",start:e[t],end:e[t+1],expression:W(e[t+2],e)}},function(t,e){return{type:"ExpressionStatement",start:e[t],end:e[t+1],directive:e.convertString(e[t+2]),expression:W(e[t+3],e)}},function(t,e){return{type:"DoWhileStatement",start:e[t],end:e[t+1],body:W(e[t+2],e),test:W(e[t+3],e)}},function(t,e){return{type:"EmptyStatement",start:e[t],end:e[t+1]}},function(t,e){const n=e[t+2];return{type:"ExportAllDeclaration",start:e[t],end:e[t+1],exported:n===0?null:W(n,e),source:W(e[t+3],e),attributes:Ve(e[t+4],e)}},function(t,e){return{type:"ExportDefaultDeclaration",start:e[t],end:e[t+1],declaration:W(e[t+2],e)}},function(t,e){const n=e[t+3],s=e[t+5];return{type:"ExportNamedDeclaration",start:e[t],end:e[t+1],specifiers:Ve(e[t+2],e),source:n===0?null:W(n,e),attributes:Ve(e[t+4],e),declaration:s===0?null:W(s,e)}},function(t,e){const n=W(e[t+2],e),s=e[t+3];return{type:"ExportSpecifier",start:e[t],end:e[t+1],local:n,exported:s===0?{...n}:W(s,e)}},function(t,e){return{type:"ExpressionStatement",start:e[t],end:e[t+1],expression:W(e[t+2],e)}},function(t,e){return{type:"ForInStatement",start:e[t],end:e[t+1],left:W(e[t+2],e),right:W(e[t+3],e),body:W(e[t+4],e)}},function(t,e){const n=e[t+2];return{type:"ForOfStatement",start:e[t],end:e[t+1],await:!(1&~n),left:W(e[t+3],e),right:W(e[t+4],e),body:W(e[t+5],e)}},function(t,e){const n=e[t+2],s=e[t+3],i=e[t+4];return{type:"ForStatement",start:e[t],end:e[t+1],init:n===0?null:W(n,e),test:s===0?null:W(s,e),update:i===0?null:W(i,e),body:W(e[t+5],e)}},function(t,e){const n=e[t+2],s=Dt(e[t+3],e),i=e[t+4];return{type:"FunctionDeclaration",start:e[t],end:e[t+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[As]:s}:{},id:i===0?null:W(i,e),params:Ve(e[t+5],e),body:W(e[t+6],e),expression:!1}},function(t,e){const n=e[t+2],s=Dt(e[t+3],e),i=e[t+4];return{type:"FunctionExpression",start:e[t],end:e[t+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[As]:s}:{},id:i===0?null:W(i,e),params:Ve(e[t+5],e),body:W(e[t+6],e),expression:!1}},function(t,e){return{type:"Identifier",start:e[t],end:e[t+1],name:e.convertString(e[t+2])}},function(t,e){const n=e[t+4];return{type:"IfStatement",start:e[t],end:e[t+1],test:W(e[t+2],e),consequent:W(e[t+3],e),alternate:n===0?null:W(n,e)}},function(t,e){return{type:"ImportAttribute",start:e[t],end:e[t+1],key:W(e[t+2],e),value:W(e[t+3],e)}},function(t,e){return{type:"ImportDeclaration",start:e[t],end:e[t+1],specifiers:Ve(e[t+2],e),source:W(e[t+3],e),attributes:Ve(e[t+4],e)}},function(t,e){return{type:"ImportDefaultSpecifier",start:e[t],end:e[t+1],local:W(e[t+2],e)}},function(t,e){const n=e[t+3];return{type:"ImportExpression",start:e[t],end:e[t+1],source:W(e[t+2],e),options:n===0?null:W(n,e)}},function(t,e){return{type:"ImportNamespaceSpecifier",start:e[t],end:e[t+1],local:W(e[t+2],e)}},function(t,e){const n=e[t+2],s=W(e[t+3],e);return{type:"ImportSpecifier",start:e[t],end:e[t+1],imported:n===0?{...s}:W(n,e),local:s}},function(t,e){const n=e[t+3];return{type:"JSXAttribute",start:e[t],end:e[t+1],name:W(e[t+2],e),value:n===0?null:W(n,e)}},function(t,e){return{type:"JSXClosingElement",start:e[t],end:e[t+1],name:W(e[t+2],e)}},function(t,e){return{type:"JSXClosingFragment",start:e[t],end:e[t+1]}},function(t,e){const n=e[t+4];return{type:"JSXElement",start:e[t],end:e[t+1],openingElement:W(e[t+2],e),children:Ve(e[t+3],e),closingElement:n===0?null:W(n,e)}},function(t,e){return{type:"JSXEmptyExpression",start:e[t],end:e[t+1]}},function(t,e){return{type:"JSXExpressionContainer",start:e[t],end:e[t+1],expression:W(e[t+2],e)}},function(t,e){return{type:"JSXFragment",start:e[t],end:e[t+1],openingFragment:W(e[t+2],e),children:Ve(e[t+3],e),closingFragment:W(e[t+4],e)}},function(t,e){return{type:"JSXIdentifier",start:e[t],end:e[t+1],name:e.convertString(e[t+2])}},function(t,e){return{type:"JSXMemberExpression",start:e[t],end:e[t+1],object:W(e[t+2],e),property:W(e[t+3],e)}},function(t,e){return{type:"JSXNamespacedName",start:e[t],end:e[t+1],namespace:W(e[t+2],e),name:W(e[t+3],e)}},function(t,e){const n=e[t+2];return{type:"JSXOpeningElement",start:e[t],end:e[t+1],selfClosing:!(1&~n),name:W(e[t+3],e),attributes:Ve(e[t+4],e)}},function(t,e){return{type:"JSXOpeningFragment",start:e[t],end:e[t+1],attributes:[],selfClosing:!1}},function(t,e){return{type:"JSXSpreadAttribute",start:e[t],end:e[t+1],argument:W(e[t+2],e)}},function(t,e){return{type:"JSXSpreadChild",start:e[t],end:e[t+1],expression:W(e[t+2],e)}},function(t,e){return{type:"JSXText",start:e[t],end:e[t+1],value:e.convertString(e[t+2]),raw:e.convertString(e[t+3])}},function(t,e){return{type:"LabeledStatement",start:e[t],end:e[t+1],label:W(e[t+2],e),body:W(e[t+3],e)}},function(t,e){const n=e.convertString(e[t+2]);return{type:"Literal",start:e[t],end:e[t+1],bigint:n,raw:e.convertString(e[t+3]),value:BigInt(n)}},function(t,e){const n=!(1&~e[t+2]);return{type:"Literal",start:e[t],end:e[t+1],value:n,raw:n?"true":"false"}},function(t,e){return{type:"Literal",start:e[t],end:e[t+1],raw:"null",value:null}},function(t,e){const n=e[t+2];return{type:"Literal",start:e[t],end:e[t+1],raw:n===0?void 0:e.convertString(n),value:new DataView(e.buffer).getFloat64(t+3<<2,!0)}},function(t,e){const n=e.convertString(e[t+2]),s=e.convertString(e[t+3]);return{type:"Literal",start:e[t],end:e[t+1],raw:`/${s}/${n}`,regex:{flags:n,pattern:s},value:new RegExp(s,n)}},function(t,e){const n=e[t+3];return{type:"Literal",start:e[t],end:e[t+1],value:e.convertString(e[t+2]),raw:n===0?void 0:e.convertString(n)}},function(t,e){return{type:"LogicalExpression",start:e[t],end:e[t+1],operator:yt[e[t+2]],left:W(e[t+3],e),right:W(e[t+4],e)}},function(t,e){const n=e[t+2];return{type:"MemberExpression",start:e[t],end:e[t+1],computed:!(1&~n),optional:!(2&~n),object:W(e[t+3],e),property:W(e[t+4],e)}},function(t,e){return{type:"MetaProperty",start:e[t],end:e[t+1],meta:W(e[t+2],e),property:W(e[t+3],e)}},function(t,e){const n=e[t+2];return{type:"MethodDefinition",start:e[t],end:e[t+1],static:!(1&~n),computed:!(2&~n),decorators:Ve(e[t+3],e),key:W(e[t+4],e),value:W(e[t+5],e),kind:yt[e[t+6]]}},function(t,e){const n=Dt(e[t+2],e);return{type:"NewExpression",start:e[t],end:e[t+1],...n.length>0?{[As]:n}:{},callee:W(e[t+3],e),arguments:Ve(e[t+4],e)}},function(t,e){return{type:"ObjectExpression",start:e[t],end:e[t+1],properties:Ve(e[t+2],e)}},function(t,e){return{type:"ObjectPattern",start:e[t],end:e[t+1],properties:Ve(e[t+2],e)}},function(t,e){return{type:"PrivateIdentifier",start:e[t],end:e[t+1],name:e.convertString(e[t+2])}},function(t,e){const n=Dt(e[t+3],e);return{type:"Program",start:e[t],end:e[t+1],body:Ve(e[t+2],e),...n.length>0?{[Vh]:n}:{},sourceType:"module"}},function(t,e){const n=e[t+2],s=e[t+3],i=W(e[t+4],e);return{type:"Property",start:e[t],end:e[t+1],method:!(1&~n),shorthand:!(2&~n),computed:!(4&~n),key:s===0?{...i}:W(s,e),value:i,kind:yt[e[t+5]]}},function(t,e){const n=e[t+2],s=e[t+5];return{type:"PropertyDefinition",start:e[t],end:e[t+1],static:!(1&~n),computed:!(2&~n),decorators:Ve(e[t+3],e),key:W(e[t+4],e),value:s===0?null:W(s,e)}},function(t,e){return{type:"RestElement",start:e[t],end:e[t+1],argument:W(e[t+2],e)}},function(t,e){const n=e[t+2];return{type:"ReturnStatement",start:e[t],end:e[t+1],argument:n===0?null:W(n,e)}},function(t,e){return{type:"SequenceExpression",start:e[t],end:e[t+1],expressions:Ve(e[t+2],e)}},function(t,e){return{type:"SpreadElement",start:e[t],end:e[t+1],argument:W(e[t+2],e)}},function(t,e){return{type:"StaticBlock",start:e[t],end:e[t+1],body:Ve(e[t+2],e)}},function(t,e){return{type:"Super",start:e[t],end:e[t+1]}},function(t,e){const n=e[t+2];return{type:"SwitchCase",start:e[t],end:e[t+1],test:n===0?null:W(n,e),consequent:Ve(e[t+3],e)}},function(t,e){return{type:"SwitchStatement",start:e[t],end:e[t+1],discriminant:W(e[t+2],e),cases:Ve(e[t+3],e)}},function(t,e){return{type:"TaggedTemplateExpression",start:e[t],end:e[t+1],tag:W(e[t+2],e),quasi:W(e[t+3],e)}},function(t,e){const n=e[t+2],s=e[t+3],i=s===0?null:e.convertString(s),r=e.convertString(e[t+4]);return{type:"TemplateElement",start:e[t],end:e[t+1],tail:!(1&~n),value:{cooked:i,raw:r}}},function(t,e){return{type:"TemplateLiteral",start:e[t],end:e[t+1],quasis:Ve(e[t+2],e),expressions:Ve(e[t+3],e)}},function(t,e){return{type:"ThisExpression",start:e[t],end:e[t+1]}},function(t,e){return{type:"ThrowStatement",start:e[t],end:e[t+1],argument:W(e[t+2],e)}},function(t,e){const n=e[t+3],s=e[t+4];return{type:"TryStatement",start:e[t],end:e[t+1],block:W(e[t+2],e),handler:n===0?null:W(n,e),finalizer:s===0?null:W(s,e)}},function(t,e){return{type:"UnaryExpression",start:e[t],end:e[t+1],operator:yt[e[t+2]],argument:W(e[t+3],e),prefix:!0}},function(t,e){const n=e[t+2];return{type:"UpdateExpression",start:e[t],end:e[t+1],prefix:!(1&~n),operator:yt[e[t+3]],argument:W(e[t+4],e)}},function(t,e){return{type:"VariableDeclaration",start:e[t],end:e[t+1],kind:yt[e[t+2]],declarations:Ve(e[t+3],e)}},function(t,e){const n=e[t+3];return{type:"VariableDeclarator",start:e[t],end:e[t+1],id:W(e[t+2],e),init:n===0?null:W(n,e)}},function(t,e){return{type:"WhileStatement",start:e[t],end:e[t+1],test:W(e[t+2],e),body:W(e[t+3],e)}},function(t,e){const n=e[t+2],s=e[t+3];return{type:"YieldExpression",start:e[t],end:e[t+1],delegate:!(1&~n),argument:s===0?null:W(s,e)}}];function W(t,e){const n=e[t],s=ly[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(t+1,e)}function Ve(t,e){if(t===0)return Qe;const n=e[t++],s=new Array(n);for(let i=0;i<n;i++){const r=e[t++];s[i]=r?W(r,e):null}return s}function Gd(t){const e=new Uint32Array(t.buffer);let n;if(typeof Buffer<"u"&&t instanceof Buffer)n=s=>{const i=e[s++],r=s<<2;return t.toString("utf8",r,r+i)};else{const s=new TextDecoder;n=i=>{const r=e[i++],a=i<<2;return s.decode(t.subarray(a,a+r))}}return Object.assign(e,{convertString:n})}class Xr extends Z{addExportedVariables(e,n){for(const s of this.elements)s?.addExportedVariables(e,n)}declare(e,n,s){const i=[],r=Kr(n);for(const a of this.elements)a!==null&&i.push(...a.declare(e,r,s));return i}deoptimizeAssignment(e,n){const s=Kr(e);for(const i of this.elements)i?.deoptimizeAssignment(s,n)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(ae)}hasEffectsWhenDestructuring(e,n,s){const i=Kr(n);for(const r of this.elements)if(r?.hasEffectsWhenDestructuring(e,i,s))return!0;return!1}hasEffectsOnInteractionAtPath(e,n,s){for(const i of this.elements)if(i?.hasEffectsOnInteractionAtPath(ae,n,s))return!0;return!1}includeDestructuredIfNecessary(e,n,s){let i=!1;const r=Kr(n);for(const a of[...this.elements].reverse())a&&(i&&!a.included&&a.includeNode(e),i=a.includeDestructuredIfNecessary(e,r,s)||i);return!this.included&&i&&this.includeNode(e),this.included}render(e,n){let s=this.start+1;for(const i of this.elements)if(i){if(!i.included){e.remove(s,this.end-1);break}i.render(e,n),s=i.end}}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}Xr.prototype.includeNode=dt;const Kr=t=>t.at(-1)===Ie?t:[...t,ps];class Jr extends ci{constructor(){super(...arguments),this.objectEntity=null}get expression(){return Oe(this.flags,8388608)}set expression(e){this.flags=Le(this.flags,8388608,e)}createScope(e){this.scope=new hd(e,!1)}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,n,s){if(this.annotationNoSideEffects&&e.length===0&&n.type===2)return!1;if(super.hasEffectsOnInteractionAtPath(e,n,s))return!0;if(n.type===2){const{ignore:i,brokenFlow:r}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(s))return!0;s.ignore=i,s.brokenFlow=r}return!1}onlyFunctionCallUsed(){return this.parent.type===Js&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,n){super.include(e,n);for(const s of this.params)s instanceof Fe||s.include(e,n)}includeNode(e){this.included=!0,this.body.includePath(ie,e);for(const n of this.params)n instanceof Fe||n.includePath(ie,e)}getObjectEntity(){return this.objectEntity!==null?this.objectEntity:this.objectEntity=new Nt([],vn)}}class Pn extends Z{addExportedVariables(e,n){for(const s of this.properties)s.type===ch?s.value.addExportedVariables(e,n):s.argument.addExportedVariables(e,n)}declare(e,n,s){const i=[];for(const r of this.properties)i.push(...r.declare(e,n,s));return i}deoptimizeAssignment(e,n){for(const s of this.properties)s.deoptimizeAssignment(e,n)}deoptimizePath(e){if(e.length===0)for(const n of this.properties)n.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,n,s){for(const i of this.properties)if(i.hasEffectsOnInteractionAtPath(ae,n,s))return!0;return!1}hasEffectsWhenDestructuring(e,n,s){for(const i of this.properties)if(i.hasEffectsWhenDestructuring(e,n,s))return!0;return!1}includeDestructuredIfNecessary(e,n,s){if(!this.properties.length)return this.included;const i=this.properties.at(-1);let r=i.includeDestructuredIfNecessary(e,n,s);const a=i.type==="RestElement";for(const l of this.properties.slice(0,-1))a&&r&&!l.included&&l.includeNode(e),r=l.includeDestructuredIfNecessary(e,n,s)||r;return!this.included&&r&&this.includeNode(e),this.included}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}render(e,n){if(this.properties.length>0){const s=tr(this.properties,e,this.start+1,this.end-1);let i=null;for(const{node:r,separator:a,start:l,end:c}of s)r.included?(i=a,r.render(e,n)):ds(r,e,l,c);i&&e.remove(i,this.end-1)}}}Pn.prototype.includeNode=ze,Pn.prototype.applyDeoptimizations=Te;class Xd extends Z{constructor(){super(...arguments),this.isConstReassignment=!1}hasEffects(e){const{deoptimized:n,isConstReassignment:s,left:i,operator:r,right:a}=this;return n||this.applyDeoptimizations(),s||a.hasEffects(e)||i.hasEffectsAsAssignmentTarget(e,r!=="=")||this.left.hasEffectsWhenDestructuring?.(e,ae,a)}hasEffectsOnInteractionAtPath(e,n,s){return n.type===1&&this.left.included||this.right.hasEffectsOnInteractionAtPath(e,n,s)}include(e,n){const{deoptimized:s,isConstReassignment:i,left:r,right:a,operator:l}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e);const c=gs();(n||i||l!=="="||r.included||r.hasEffectsAsAssignmentTarget(c,!1)||r.hasEffectsWhenDestructuring?.(c,ae,a))&&r.includeAsAssignmentTarget(e,n,l!=="="),a.include(e,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ie,e)}initialise(){super.initialise(),this.left instanceof Fe&&this.scope.variables.get(this.left.name)?.kind==="const"&&(this.isConstReassignment=!0,this.scope.context.log(ye,{code:"CONST_REASSIGN",message:"Cannot reassign a variable declared with `const`"},this.left.start)),this.left.setAssignedValue(this.right)}render(e,n,{preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=pt){const{left:a,right:l,start:c,end:u,parent:d}=this;if(a.included)a.render(e,n),l.render(e,n);else{const m=An(e.original,ht(e.original,"=",a.end)+1);e.remove(c,m),s&&nr(e,m,l.start),l.render(e,n,{renderedParentType:i||d.type,renderedSurroundingElement:r||d.type})}if(n.format==="system")if(a instanceof Fe){const m=a.variable,f=n.exportNamesByVariable.get(m);if(f)return void(f.length===1?oa(m,c,u,e,n):sh(m,c,u,d.type!==Xt,e,n))}else{const m=[];if(a.addExportedVariables(m,n.exportNamesByVariable),m.length>0)return void(function(f,g,E,x,A,S){const{_:k,getDirectReturnIifeLeft:v}=S.snippets;A.prependRight(g,v(["v"],`${Ln(f,S)},${k}v`,{needsArrowReturnParens:!0,needsWrappedFunction:x})),A.appendLeft(E,")")})(m,c,u,r===Xt,e,n)}a.included&&a instanceof Pn&&(r===Xt||r===ma)&&(e.appendRight(c,"("),e.prependLeft(u,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(ae,this.right),this.scope.context.requestTreeshakingPass()}}class Kd extends Z{addExportedVariables(e,n){this.left.addExportedVariables(e,n)}declare(e,n,s){return this.left.declare(e,n,s)}deoptimizeAssignment(e,n){this.left.deoptimizeAssignment(e,n)}deoptimizePath(e){e.length===0&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,n,s){return e.length>0||this.left.hasEffectsOnInteractionAtPath(ae,n,s)}hasEffectsWhenDestructuring(e,n,s){return this.left.hasEffectsWhenDestructuring(e,n,s)}includeDestructuredIfNecessary(e,n,s){let i=this.left.includeDestructuredIfNecessary(e,n,s)||this.included;return(i||=this.right.shouldBeIncluded(e))&&(this.right.include(e,!1),this.left.included||(this.left.includeNode(e),this.left.includeDestructuredIfNecessary(e,n,s))),!this.included&&i&&this.includeNode(e),this.included}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ie,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,n,{isShorthandProperty:s}=pt){this.left.render(e,n,{isShorthandProperty:s}),this.right.render(e,n)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(ae),this.right.deoptimizePath(ie),this.scope.context.requestTreeshakingPass()}}class rl extends Z{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise();let e=this.parent;do if(e instanceof Ba||e instanceof Jr)return;while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}include(e,n){this.included||this.includeNode(e),this.argument.include(e,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(cy,e)}includePath(e,n){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(n),this.argument.includePath(e,n)}}const cy=["then"];function Jd(t){return t===void 0?"void 0":typeof t=="boolean"?String(t):typeof t=="string"?JSON.stringify(t):typeof t=="number"?(function(e){if(Object.is(-0,e))return"-0";const n=e.toExponential(),[s,i]=n.split("e"),r=s.split(".")[1]?.length||0,a=`${s.replace(".","")}e${parseInt(i)-r}`,l=String(e).replace("+","");return a.length<l.length?a:l})(t):Ce}const uy={"!=":(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|e},Yd=Symbol("Unassigned");class ol extends Z{constructor(){super(...arguments),this.renderedLiteralValue=Yd}deoptimizeCache(){this.renderedLiteralValue=Ce}getLiteralValueAtPath(e,n,s){if(e.length>0)return Ce;const i=this.left.getLiteralValueAtPath(ae,n,s);if(typeof i=="symbol")return Ce;if(this.operator==="in"&&this.right.variable instanceof Yn){const[l]=this.right.variable.context.traceExport(String(i));return l instanceof ei||l instanceof Et?Ce:!!l}const r=this.right.getLiteralValueAtPath(ae,n,s);if(typeof r=="symbol")return Ce;const a=uy[this.operator];return a?a(i,r):Ce}getRenderedLiteralValue(){return this.operator==="in"&&this.right.variable instanceof Yn?this.renderedLiteralValue!==Yd?this.renderedLiteralValue:this.renderedLiteralValue=Jd(this.getLiteralValueAtPath(ae,qe,this)):Ce}hasEffects(e){return this.operator==="+"&&this.parent instanceof jt&&this.left.getLiteralValueAtPath(ae,qe,this)===""||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:n}){return n!==0||e.length>1}include(e,n,s){this.included||this.includeNode(e),typeof this.getRenderedLiteralValue()=="symbol"&&(this.left.include(e,n,s),this.right.include(e,n,s),this.operator==="instanceof"&&this.right.includePath(zm,e))}includeNode(e){this.included=!0,this.operator==="in"&&typeof this.getRenderedLiteralValue()=="symbol"&&this.right.includePath(ie,e)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,n,{renderedSurroundingElement:s}=pt){const i=this.getRenderedLiteralValue();typeof i!="symbol"?e.overwrite(this.start,this.end,i):(this.left.render(e,n,{renderedSurroundingElement:s}),this.right.render(e,n))}}ol.prototype.applyDeoptimizations=Te;class Yr extends Z{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,n){this.included=!0,this.label?(this.label.include(e,n),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function Qd(t,e,n){if(n.arguments.length>0)if(n.arguments[n.arguments.length-1].included)for(const s of n.arguments)s.render(t,e);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(t,e);t.remove(ht(t.original,",",n.arguments[s].end),n.end-1)}else t.remove(ht(t.original,"(",n.callee.end)+1,n.end-1)}}Yr.prototype.includeNode=ze,Yr.prototype.applyDeoptimizations=Te;class Zd extends Z{constructor(){super(...arguments),this.returnExpression=null,this.deoptimizableDependentExpressions=[],this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(e,n,s){const{args:i}=e,[r,a]=this.getReturnExpression(s);if(a)return;const l=i.filter(c=>!!c&&c!==ve);if(l.length!==0)if(r===ve)for(const c of l)c.deoptimizePath(ie);else s.withTrackedEntityAtPath(n,r,()=>{for(const c of l)this.expressionsToBeDeoptimized.add(c);r.deoptimizeArgumentsOnInteractionAtPath(e,n,s)},null)}deoptimizeCache(){if(this.returnExpression?.[0]!==ve){this.returnExpression=rt;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=ih,this.deoptimizableDependentExpressions=Qe;for(const s of e)s.deoptimizeCache();for(const s of n)s.deoptimizePath(ie)}}deoptimizePath(e){if(e.length===0||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[n]=this.getReturnExpression();n!==ve&&n.deoptimizePath(e)}getLiteralValueAtPath(e,n,s){const[i]=this.getReturnExpression(n);return i===ve?Ce:n.withTrackedEntityAtPath(e,i,()=>(this.deoptimizableDependentExpressions.push(s),i.getLiteralValueAtPath(e,n,s)),Ce)}getReturnExpressionWhenCalledAtPath(e,n,s,i){const r=this.getReturnExpression(s);return r[0]===ve?r:s.withTrackedEntityAtPath(e,r,()=>{this.deoptimizableDependentExpressions.push(i);const[a,l]=r[0].getReturnExpressionWhenCalledAtPath(e,n,s,i);return[a,l||r[1]]},rt)}hasEffectsOnInteractionAtPath(e,n,s){const{type:i}=n;if(i===2){const{args:l,withNew:c}=n;if((c?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,l,this))return!1}else if((i===1?s.assigned:s.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[r,a]=this.getReturnExpression();return(i===1||!a)&&r.hasEffectsOnInteractionAtPath(e,n,s)}}class al extends Zd{get hasCheckedForWarnings(){return Oe(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=Le(this.flags,134217728,e)}get optional(){return Oe(this.flags,128)}set optional(e){this.flags=Le(this.flags,128,e)}bind(){super.bind(),this.interaction={args:[this.callee instanceof gn&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,n,s){return xd(this,this.callee,e,n,s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const n of this.arguments)if(n.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(ae,this.interaction,e))}hasEffectsAsChainElement(e){const n="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(n===Kt)return Kt;if(this.optional&&this.callee.getLiteralValueAtPath(ae,qe,this)==null)return!this.annotationPure&&n||Kt;this.deoptimized||this.applyDeoptimizations();for(const s of this.arguments)if(s.hasEffects(e))return!0;return!this.annotationPure&&(n||this.callee.hasEffectsOnInteractionAtPath(ae,this.interaction,e))}include(e,n){this.included||this.includeNode(e),n?(super.include(e,!0),n===Uh&&this.callee instanceof Fe&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(ie,e)}initialise(){super.initialise(),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>e.type==="pure"))}render(e,n,{renderedSurroundingElement:s}=pt){this.callee.render(e,n,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:s}),Qd(e,n,this),this.callee instanceof Fe&&!this.hasCheckedForWarnings&&(this.hasCheckedForWarnings=!0,this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(ye,$h(this.callee.name),this.start),this.callee.name==="eval"&&this.scope.context.log(ye,{code:"EVAL",id:i=this.scope.context.module.id,message:`Use of eval in "${xe(i)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:ot("troubleshooting/#avoiding-eval")},this.start));var i}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,ae,qe),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=qe){return this.returnExpression===null?(this.returnExpression=rt,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(ae,this.interaction,e,this)):this.returnExpression}}class Qr extends Z{createScope(e){this.scope=new ud(e,!0)}parseNode(e){const{body:n,param:s,type:i}=e;return this.type=i,s&&(this.param=new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s),this.param.declare("parameter",ae,ve)),this.body=new Gn(this,this.scope.bodyScope).parseNode(n),super.parseNode(e)}}Qr.prototype.preventChildBlockScope=!0,Qr.prototype.includeNode=dt;class Zr extends Z{deoptimizeCache(){}getLiteralValueAtPath(e,n,s){const i=this.expression.getLiteralValueAtPathAsChainElement(e,n,s);return i===Kt?void 0:i}hasEffects(e){return this.expression.hasEffectsAsChainElement(e)===!0}includePath(e,n){this.included=!0,this.expression.includePath(e,n)}removeAnnotations(e){this.expression.removeAnnotations(e)}}Zr.prototype.includeNode=ze,Zr.prototype.applyDeoptimizations=Te;class hy extends vt{constructor(e,n){const{context:s}=e;super(e,s),this.variables.set("this",this.thisVariable=new Ot("this",null,n,ae,s,"other")),this.instanceScope=new vt(this,s),this.instanceScope.variables.set("this",new cd(s))}findLexicalBoundary(){return this}}class eo extends Z{createScope(e){this.scope=new hy(e,this.parent)}include(e,n){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,ie,e);for(const s of this.body)s.include(e,n)}parseNode(e){const n=this.body=new Array(e.body.length);let s=0;for(const i of e.body)n[s++]=new(this.scope.context.getNodeConstructor(i.type))(this,i.static?this.scope:this.scope.instanceScope).parseNode(i);return super.parseNode(e)}}eo.prototype.includeNode=ze,eo.prototype.applyDeoptimizations=Te;class to extends Fa{render(e,n,{renderedSurroundingElement:s}=pt){super.render(e,n),s===Xt&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}function $s(t){return typeof t=="symbol"?t!==lr&&(t===ar||Ce):!!t}class no extends Pt{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const n of this.expressions)n.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,n,s,i){return[new no(this.expressions.map(r=>r.getReturnExpressionWhenCalledAtPath(e,n,s,i)[0])),!1]}hasEffectsOnInteractionAtPath(e,n,s){for(const i of this.expressions)if(i.hasEffectsOnInteractionAtPath(e,n,s))return!0;return!1}}class so extends Z{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Oe(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Le(this.flags,65536,e)}get hasDeoptimizedCache(){return Oe(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Le(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,n,s),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizeCache(){if(!this.hasDeoptimizedCache&&(this.hasDeoptimizedCache=!0,this.usedBranch!==null)){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(ie),this.included&&e.includePath(ie,Ft());const{expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=Qe;for(const s of n)s.deoptimizeCache()}}deoptimizePath(e){const n=this.getUsedBranch();n?n.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,n,s){const i=this.getUsedBranch();if(!i){if(this.hasDeoptimizedCache)return Ce;const r=this.consequent.getLiteralValueAtPath(e,n,s),a=$s(r);if(a===Ce)return Ce;const l=this.alternate.getLiteralValueAtPath(e,n,s);return a!==$s(l)?Ce:(this.expressionsToBeDeoptimized.push(s),r!==l?a?ar:lr:r)}return this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,i){const r=this.getUsedBranch();return r?(this.expressionsToBeDeoptimized.push(i),r.getReturnExpressionWhenCalledAtPath(e,n,s,i)):[new no([this.consequent.getReturnExpressionWhenCalledAtPath(e,n,s,i)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,n,s,i)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const n=this.getUsedBranch();return n?n.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,n,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,n,s):this.consequent.hasEffectsOnInteractionAtPath(e,n,s)||this.alternate.hasEffectsOnInteractionAtPath(e,n,s)}include(e,n){this.included=!0;const s=this.getUsedBranch();s===null||n||this.test.shouldBeIncluded(e)?(this.test.include(e,n),this.consequent.include(e,n),this.alternate.include(e,n)):s.include(e,n)}includePath(e,n){this.included=!0;const s=this.getUsedBranch();s===null||this.test.shouldBeIncluded(n)?(this.consequent.includePath(e,n),this.alternate.includePath(e,n)):s.includePath(e,n)}includeCallArguments(e,n){const s=this.getUsedBranch();s?s.includeCallArguments(e,n):(this.consequent.includeCallArguments(e,n),this.alternate.includeCallArguments(e,n))}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,n,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:r,renderedSurroundingElement:a}=pt){if(this.test.included)this.test.render(e,n,{renderedSurroundingElement:a}),this.consequent.render(e,n),this.alternate.render(e,n);else{const l=this.getUsedBranch(),c=ht(e.original,":",this.consequent.end),u=An(e.original,(this.consequent.included?ht(e.original,"?",this.test.end):c)+1);i&&nr(e,u,l.start),e.remove(this.start,u),this.consequent.included&&e.remove(c,this.end),this.test.removeAnnotations(e),l.render(e,n,{isCalleeOfRenderedParent:s,preventASI:!0,renderedParentType:r||this.parent.type,renderedSurroundingElement:a||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=$s(this.test.getLiteralValueAtPath(ae,qe,this));return typeof e=="symbol"?null:this.usedBranch=e?this.consequent:this.alternate}}so.prototype.includeNode=ze,so.prototype.applyDeoptimizations=Te;class io extends Z{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,n){this.included=!0,this.label?(this.label.include(e,n),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}io.prototype.includeNode=ze,io.prototype.applyDeoptimizations=Te;class ll extends Z{hasEffects(){return!0}}ll.prototype.includeNode=dt;class cl extends Z{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(ae,Ks,e)}}function ro(t,e){const{brokenFlow:n,hasBreak:s,hasContinue:i,ignore:r}=t,{breaks:a,continues:l}=r;return r.breaks=!0,r.continues=!0,t.hasBreak=!1,t.hasContinue=!1,!!e.hasEffects(t)||(r.breaks=a,r.continues=l,t.hasBreak=s,t.hasContinue=i,t.brokenFlow=n,!1)}function xi(t,e,n){const{brokenFlow:s,hasBreak:i,hasContinue:r}=t;t.hasBreak=!1,t.hasContinue=!1,e.include(t,n,{asSingleStatement:!0}),t.hasBreak=i,t.hasContinue=r,t.brokenFlow=s}cl.prototype.includeNode=dt;class oo extends Z{hasEffects(e){return!!this.test.hasEffects(e)||ro(e,this.body)}include(e,n){this.included=!0,this.test.include(e,n),xi(e,this.body,n)}}oo.prototype.includeNode=ze,oo.prototype.applyDeoptimizations=Te;class ul extends Z{hasEffects(){return!1}}ul.prototype.includeNode=dt;class Cs extends Z{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,n,s){e.remove(s.start,s.end)}}Cs.prototype.needsBoundaries=!0,Cs.prototype.includeNode=ze,Cs.prototype.applyDeoptimizations=Te;class ki extends Z{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,n,s){const{start:i,end:r}=s;if(this.declaration===null)e.remove(i,r);else{let a=this.declaration.start;if(this.declaration instanceof vs){const l=this.declaration.decorators;for(const c of l)a=Math.min(a,c.start);a<=this.start&&(a=this.declaration.start)}e.remove(this.start,a),this.declaration.render(e,n,{end:r,start:i})}}}ki.prototype.needsBoundaries=!0,ki.prototype.includeNode=ze,ki.prototype.applyDeoptimizations=Te;class ao extends Z{}ao.prototype.includeNode=ze,ao.prototype.applyDeoptimizations=Te;class ep extends Z{createScope(e){this.scope=new Wn(e)}hasEffects(e){const{body:n,deoptimized:s,left:i,right:r}=this;return s||this.applyDeoptimizations(),!(!i.hasEffectsAsAssignmentTarget(e,!1)&&!r.hasEffects(e))||ro(e,n)}include(e,n){const{body:s,deoptimized:i,left:r,right:a}=this;i||this.applyDeoptimizations(),this.included||this.includeNode(e),r.includeAsAssignmentTarget(e,n||!0,!1),a.include(e,n),xi(e,s,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ie,e)}initialise(){super.initialise(),this.left.setAssignedValue(ve)}render(e,n){this.left.render(e,n,On),this.right.render(e,n,On),e.original.charCodeAt(this.right.start-1)===110&&e.prependLeft(this.right.start," "),this.body.render(e,n)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(ae),this.scope.context.requestTreeshakingPass()}}class tp extends Z{get await(){return Oe(this.flags,131072)}set await(e){this.flags=Le(this.flags,131072,e)}createScope(e){this.scope=new Wn(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,n){const{body:s,deoptimized:i,left:r,right:a}=this;i||this.applyDeoptimizations(),this.included||this.includeNode(e),r.includeAsAssignmentTarget(e,n||!0,!1),a.include(e,n),xi(e,s,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ie,e)}initialise(){super.initialise(),this.left.setAssignedValue(ve)}render(e,n){this.left.render(e,n,On),this.right.render(e,n,On),e.original.charCodeAt(this.right.start-1)===102&&e.prependLeft(this.right.start," "),this.body.render(e,n)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(ae),this.right.deoptimizePath(ie),this.scope.context.requestTreeshakingPass()}}class lo extends Z{createScope(e){this.scope=new Wn(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||ro(e,this.body)}include(e,n){this.included=!0,this.init?.include(e,n,{asSingleStatement:!0}),this.test?.include(e,n),this.update?.include(e,n),xi(e,this.body,n)}render(e,n){this.init?.render(e,n,On),this.test?.render(e,n,On),this.update?.render(e,n,On),this.body.render(e,n)}}lo.prototype.includeNode=ze,lo.prototype.applyDeoptimizations=Te;class hl extends Ba{createScope(e){super.createScope(this.idScope=new vt(e,e.context))}parseNode(e){return e.id!==null&&(this.id=new Fe(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===Js&&this.parent.callee===this&&(this.id===null||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,n,{renderedSurroundingElement:s}=pt){super.render(e,n),s===Xt&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class co extends Wn{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,n,s,i,r){return this.hoistedDeclarations.push(e),super.addDeclaration(e,n,s,i,r)}}const np=Symbol("unset");class Ts extends Z{constructor(){super(...arguments),this.testValue=np}deoptimizeCache(){this.testValue=Ce}hasEffects(e){if(this.test.hasEffects(e))return!0;const n=this.getTestValue();if(typeof n=="symbol"){const{brokenFlow:s}=e;if(this.consequent.hasEffects(e))return!0;const i=e.brokenFlow;return e.brokenFlow=s,this.alternate===null?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&i,!1)}return n?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,n){if(this.included=!0,n)this.includeRecursively(n,e);else{const s=this.getTestValue();typeof s=="symbol"?this.includeUnknownTest(e):this.includeKnownTest(e,s)}}parseNode(e){return this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(this,this.consequentScope=new co(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new co(this.scope)).parseNode(e.alternate)),super.parseNode(e)}render(e,n){const{snippets:{getPropertyAccess:s}}=n,i=this.getTestValue(),r=[],a=this.test.included,l=!this.scope.context.options.treeshake;a?this.test.render(e,n):e.remove(this.start,this.consequent.start),this.consequent.included&&(l||typeof i=="symbol"||i)?this.consequent.render(e,n):(e.overwrite(this.consequent.start,this.consequent.end,a?";":""),r.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!l&&typeof i!="symbol"&&i?(a&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),r.push(...this.alternateScope.hoistedDeclarations)):(a?e.original.charCodeAt(this.alternate.start-1)===101&&e.prependLeft(this.alternate.start," "):e.remove(this.consequent.end,this.alternate.start),this.alternate.render(e,n))),this.renderHoistedDeclarations(r,e,s)}getTestValue(){return this.testValue===np?this.testValue=$s(this.test.getLiteralValueAtPath(ae,qe,this)):this.testValue}includeKnownTest(e,n){this.test.shouldBeIncluded(e)&&this.test.include(e,!1),n&&this.consequent.shouldBeIncluded(e)&&this.consequent.include(e,!1,{asSingleStatement:!0}),!n&&this.alternate?.shouldBeIncluded(e)&&this.alternate.include(e,!1,{asSingleStatement:!0})}includeRecursively(e,n){this.test.include(n,e),this.consequent.include(n,e),this.alternate?.include(n,e)}includeUnknownTest(e){this.test.include(e,!1);const{brokenFlow:n}=e;let s=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),s=e.brokenFlow,e.brokenFlow=n),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&s)}renderHoistedDeclarations(e,n,s){const i=[...new Set(e.map(r=>{const a=r.variable;return a.included?a.getName(s):""}))].filter(Boolean).join(", ");if(i){const r=this.parent.type,a=r!==cr&&r!=="BlockStatement";n.prependRight(this.start,`${a?"{ ":""}var ${i}; `),a&&n.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Ts&&e.alternate)return!0;if(e instanceof Gn)return!1;e=e.parent}while(e);return!1}}Ts.prototype.includeNode=ze,Ts.prototype.applyDeoptimizations=Te;class sp extends Z{}class Ei extends Z{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,n,s){e.remove(s.start,s.end)}}Ei.prototype.needsBoundaries=!0,Ei.prototype.includeNode=ze,Ei.prototype.applyDeoptimizations=Te;class Ai extends Z{}function ip(t,e){return t.renderBaseName!==null&&e.has(t)&&t.isReassigned}Ai.prototype.includeNode=ze,Ai.prototype.applyDeoptimizations=Te;class uo extends Z{declareDeclarator(e){this.isUsingDeclaration=e==="using",this.isAsyncUsingDeclaration=e==="await using",this.id.declare(e,ae,this.init||hn)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){const n=this.init?.hasEffects(e);return this.id.markDeclarationReached(),n||this.isUsingDeclaration||this.isAsyncUsingDeclaration||this.id.hasEffects(e)||this.scope.context.options.treeshake.propertyReadSideEffects&&this.id.hasEffectsWhenDestructuring(e,ae,this.init||hn)}include(e,n){const{id:s,init:i}=this;this.included||this.includeNode(e),i?.include(e,n),s.markDeclarationReached(),n?s.include(e,n):s.includeDestructuredIfNecessary(e,ae,i||hn)}removeAnnotations(e){this.init?.removeAnnotations(e)}render(e,n){const{exportNamesByVariable:s,snippets:{_:i,getPropertyAccess:r}}=n,{end:a,id:l,init:c,start:u}=this,d=l.included||this.isUsingDeclaration||this.isAsyncUsingDeclaration;if(d)l.render(e,n);else{const m=ht(e.original,"=",l.end);e.remove(u,An(e.original,m+1))}c?(l instanceof Fe&&c instanceof to&&!c.id&&l.variable.getName(r)!==l.name&&e.appendLeft(c.start+5,` ${l.name}`),c.render(e,n,d?pt:{renderedSurroundingElement:Xt})):l instanceof Fe&&ip(l.variable,s)&&e.appendLeft(a,`${i}=${i}void 0`)}includeNode(e){this.included=!0;const{id:n,init:s}=this;if(s&&(this.isUsingDeclaration?s.includePath(dy,e):this.isAsyncUsingDeclaration&&s.includePath(py,e),n instanceof Fe&&s instanceof to&&!s.id)){const{name:i,variable:r}=n;for(const a of s.scope.accessedOutsideVariables.values())a!==r&&a.forbidName(i)}}}uo.prototype.applyDeoptimizations=Te;const dy=[ir],py=[rr];function rp(t){return{fileName:t.getFileName(),...t.getPreRenderedChunkInfo()}}class dl extends Z{constructor(){super(...arguments),this.inlineNamespace=null,this.hasUnknownAccessedKey=!1,this.accessedPropKey=new Set,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}get shouldIncludeDynamicAttributes(){return Oe(this.flags,268435456)}set shouldIncludeDynamicAttributes(e){this.flags=Le(this.flags,268435456,e)}bind(){this.source.bind(),this.options?.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof jt)return Qe;if(e instanceof rl){const n=e.parent;if(n instanceof jt)return Qe;if(n instanceof uo){const s=n.id;if(s instanceof Fe)return this.hasUnknownAccessedKey?void 0:[...this.accessedPropKey];if(s instanceof Pn)return ap(s)}if(n instanceof gn){const s=n.property;if(!n.computed&&s instanceof Fe)return[s.name]}return}if(e instanceof gn){const n=e.parent,s=e.property;if(!(n instanceof al&&s instanceof Fe))return;const i=s.name;if(n.parent instanceof jt&&["catch","finally"].includes(i))return Qe;if(i!=="then")return;if(n.arguments.length===0)return Qe;const r=n.arguments[0];if(n.arguments.length!==1||!(r instanceof Jr||r instanceof hl))return;if(r.params.length===0)return Qe;const a=r.params[0];return r.params.length===1&&a instanceof Pn?ap(a):this.hasUnknownAccessedKey?void 0:[...this.accessedPropKey]}}hasEffects(){return!0}include(e,n){this.included||this.includeNode(e),this.source.include(e,n),this.shouldIncludeDynamicAttributes&&this.options?.include(e,n)}includeNode(e){this.included=!0,this.shouldIncludeDynamicAttributes&&this.options?.includePath(ie,e),this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)}includePath(e,n){this.included||this.includeNode(n),this.hasUnknownAccessedKey||(e[0]===Ie?this.hasUnknownAccessedKey=!0:typeof e[0]=="string"&&this.accessedPropKey.add(e[0]),this.scope.context.includeDynamicImport(this))}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,n){const{snippets:{_:s,getDirectReturnFunction:i,getObject:r,getPropertyAccess:a},importAttributesKey:l}=n;if(this.inlineNamespace){const[c,u]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return void e.overwrite(this.start,this.end,`Promise.resolve().then(${c}${this.inlineNamespace.getName(a)}${u})`)}if(this.mechanism&&(e.overwrite(this.start,ht(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[c,u]=i(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${c}n.${this.namespaceExportName}${u})`)}}else this.source.render(e,n);this.attributes!==!0&&(this.options&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.attributes&&e.appendLeft(this.end-1,`,${s}${r([[l,this.attributes]],{lineBreakIndent:null})}`))}setExternalResolution(e,n,s,i,r,a,l,c,u,d,m){const{format:f}=s;this.inlineNamespace=null,this.resolution=n,this.resolutionString=l,this.namespaceExportName=c,this.attributes=u;const g=[...fy[f]||[]];let E;({helper:E,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(n,e,s,i,r,d,m)),E&&g.push(E),g.length>0&&this.scope.addAccessedGlobals(g,a)}setInternalResolution(e){this.inlineNamespace=e}getDynamicImportMechanismAndHelper(e,n,{compact:s,dynamicImportInCjs:i,format:r,generatedCode:{arrowFunctions:a},interop:l},{_:c,getDirectReturnFunction:u,getDirectReturnIifeLeft:d},m,f,g){const E=m.hookFirstSync("renderDynamicImport",[{chunk:rp(f),customResolution:typeof this.resolution=="string"?this.resolution:null,format:r,getTargetChunkImports(){if(g===null)return null;const A=[],S=f.getFileName();for(const k of g.dependencies){const v=`'${k.getImportPath(S)}'`;k instanceof Qn?A.push({fileName:k.getFileName(),resolvedImportPath:v,type:"external"}):A.push({chunk:k.getPreRenderedChunkInfo(),fileName:k.getFileName(),resolvedImportPath:v,type:"internal"})}return A},moduleId:this.scope.context.module.id,targetChunk:g?rp(g):null,targetModuleId:this.resolution&&typeof this.resolution!="string"?this.resolution.id:null}]);if(E)return{helper:null,mechanism:E};const x=!this.resolution||typeof this.resolution=="string";switch(r){case"cjs":{if(i&&(!e||typeof e=="string"||e instanceof Ze))return{helper:null,mechanism:null};const A=op(e,n,l);let S="require(",k=")";A&&(S=`/*#__PURE__*/${A}(${S}`,k+=")");const[v,I]=u([],{functionReturn:!0,lineBreakIndent:null,name:null});return S=`Promise.resolve().then(${v}${S}`,k+=`${I})`,!a&&x&&(S=d(["t"],`${S}t${k}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),k=")"),{helper:A,mechanism:{left:S,right:k}}}case"amd":{const A=s?"c":"resolve",S=s?"e":"reject",k=op(e,n,l),[v,I]=u(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),P=k?`${v}${A}(/*#__PURE__*/${k}(m))${I}`:A,[F,N]=u([A,S],{functionReturn:!1,lineBreakIndent:null,name:null});let R=`new Promise(${F}require([`,B=`],${c}${P},${c}${S})${N})`;return!a&&x&&(R=d(["t"],`${R}t${B}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),B=")"),{helper:k,mechanism:{left:R,right:B}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function op(t,e,n){return e==="external"?hi[n(t instanceof Ze?t.id:null)]:e==="default"?ui:null}dl.prototype.applyDeoptimizations=Te;const fy={amd:["require"],cjs:["require"],system:["module"]};function ap(t){const e=[];for(const n of t.properties){if(n.type==="RestElement"||n.computed||n.key.type!=="Identifier")return;e.push(n.key.name)}return e}class wi extends Z{}wi.prototype.includeNode=ze,wi.prototype.applyDeoptimizations=Te;class ho extends Z{}ho.prototype.includeNode=ze,ho.prototype.applyDeoptimizations=Te;class pl extends nd{constructor(){super(...arguments),this.isNativeElement=!1}bind(){const e=this.getType();e===0?(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)):e===1&&(this.isNativeElement=!0)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable!==null&&this.scope.context.includeVariableInModule(this.variable,ae,e)}includePath(e,n){this.included?e.length>0&&this.variable?.includePath(e,n):(this.included=!0,this.variable!==null&&this.scope.context.includeVariableInModule(this.variable,e,n))}render(e,{snippets:{getPropertyAccess:n},useOriginalName:s}){if(this.variable){const i=this.variable.getName(n,s);i!==this.name&&e.overwrite(this.start,this.end,i,{contentOnly:!0,storeName:!0})}else this.isNativeElement&&this.scope.context.options.jsx.mode!=="preserve"&&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 po extends Z{render(e,n,{jsxMode:s}=pt){if(super.render(e,n),["classic","automatic"].includes(s)){const{name:i,value:r}=this,a=i instanceof pl?i.name:`${i.namespace.name}:${i.name.name}`;if(s!=="automatic"||a!=="key"){const l=xr(a);a!==l&&e.overwrite(i.start,i.end,l,{contentOnly:!0}),r?(e.overwrite(i.end,r.start,": ",{contentOnly:!0}),r instanceof kt&&typeof r.value=="string"&&r.value.includes(`
31
- `)&&e.overwrite(r.start,r.end,JSON.stringify(r.value),{contentOnly:!0})):e.appendLeft(i.end,": true")}}}}po.prototype.includeNode=dt;class fl extends Z{render(e,n){const{mode:s}=this.scope.context.options.jsx;s!=="preserve"?e.overwrite(this.start,this.end,")",{contentOnly:!0}):super.render(e,n)}}fl.prototype.includeNode=dt;class lp extends fl{}class cp extends fl{}class fo extends Z{render(e,n){this.argument.render(e,n);const{mode:s}=this.scope.context.options.jsx;s!=="preserve"&&(e.overwrite(this.start,this.argument.start,"",{contentOnly:!0}),e.overwrite(this.argument.end,this.end,"",{contentOnly:!0}))}}class Si extends Z{}Si.prototype.includeNode=dt;class mo extends Z{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(ie,e)}render(e,n){const{mode:s}=this.scope.context.options.jsx;s!=="preserve"&&(e.remove(this.start,this.expression.start),e.remove(this.expression.end,this.end)),this.expression.render(e,n)}}const my=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,gy=/[ \t]*\r?\n[ \t\r\n]*/g;class Ii extends Z{shouldRender(){return!!this.getRenderedText()}render(e){const{mode:n}=this.scope.context.options.jsx;n!=="preserve"&&e.overwrite(this.start,this.end,JSON.stringify(this.getRenderedText()),{contentOnly:!0})}getRenderedText(){return this.renderedText===void 0&&(this.renderedText=this.value.replace(my,"").replace(gy," ")),this.renderedText}}function yy(t){let e=0;for(const n of t)n instanceof mo&&n.expression instanceof Si||n instanceof Ii&&!n.shouldRender()||e++;return e}function ml(t,e,n,s,i){const[r,a]=t.split(".");let l;return n?(l=s.scope.context.getImportedJsxFactoryVariable(a?"default":r,s.start,n),e&&(s.scope.findGlobal(r).includePath(ie,i),l.globalName=r)):l=s.scope.findGlobal(r),s.scope.context.includeVariableInModule(l,ie,i),l instanceof Ot&&(l.consolidateInitializers(),l.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),l}Ii.prototype.includeNode=dt;class gl extends Z{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,n){this.included||this.includeNode(e);for(const s of this.children)s.include(e,n)}includeNode(e){this.included=!0;const{factory:n,importSource:s,mode:i}=this.jsxMode;n&&(this.factory=n,this.factoryVariable=ml(n,i==="preserve",s,this,e))}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:n,factory:s,importSource:i}=e;return n==="automatic"?{factory:yy(this.children)>1?"jsxs":"jsx",importSource:e.jsxImportSource,mode:n}:{factory:s,importSource:i,mode:n}}renderChildren(e,n,s){const{children:i}=this;let r=!1,a=s,l=null;for(const c of i)c instanceof mo&&c.expression instanceof Si||c instanceof Ii&&!c.shouldRender()?e.remove(a,c.end):(e.appendLeft(a,", "),c.render(e,n),l?r=!0:l=c),a=c.end;return{childrenEnd:a,firstChild:l,hasMultipleChildren:r}}}gl.prototype.applyDeoptimizations=Te;class up extends gl{include(e,n){super.include(e,n),this.openingElement.include(e,n),this.closingElement?.include(e,n)}render(e,n){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,n);break;case"automatic":this.renderAutomaticMode(e,n);break;default:super.render(e,n)}}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:n,factory:s,importSource:i}=e;if(n==="automatic"){let r=!1;for(const a of this.openingElement.attributes)if(a instanceof fo)r=!0;else if(r&&a.name.name==="key")return{factory:s,importSource:i,mode:"classic"}}return super.getRenderingMode()}renderClassicMode(e,n){const{snippets:{getPropertyAccess:s},useOriginalName:i}=n,{closingElement:r,end:a,factory:l,factoryVariable:c,openingElement:{end:u,selfClosing:d}}=this,[,...m]=l.split("."),{firstAttribute:f,hasAttributes:g,hasSpread:E,inObject:x,previousEnd:A}=this.renderAttributes(e,n,[c.getName(s,i),...m].join("."),!1);this.wrapAttributes(e,x,g,E,f,"null",A),this.renderChildren(e,n,u),d?e.appendLeft(a,")"):r.render(e,n)}renderAutomaticMode(e,n){const{snippets:{getPropertyAccess:s},useOriginalName:i}=n,{closingElement:r,end:a,factoryVariable:l,openingElement:{end:c,selfClosing:u}}=this;let{firstAttribute:d,hasAttributes:m,hasSpread:f,inObject:g,keyAttribute:E,previousEnd:x}=this.renderAttributes(e,n,l.getName(s,i),!0);const{firstChild:A,hasMultipleChildren:S,childrenEnd:k}=this.renderChildren(e,n,c);if(A&&(e.prependRight(A.start,"children: "+(S?"[":"")),g||(e.prependRight(A.start,"{ "),g=!0),x=r.start,S&&e.appendLeft(x,"]")),this.wrapAttributes(e,g,m||!!A,f,d||A,"{}",k),E){const{value:v}=E;e.appendLeft(k,", "),v?e.move(v.start,v.end,k):e.appendLeft(k,"true")}u?e.appendLeft(E?.value?.end||a,")"):r.render(e,n)}renderAttributes(e,n,s,i){const{jsxMode:{mode:r},openingElement:a}=this,{attributes:l,end:c,start:u,name:{start:d,end:m}}=a;e.update(u,d,`/*#__PURE__*/${s}(`),a.render(e,n,{jsxMode:r});let f=null,g=!1,E=!1,x=m,A=!1,S=null;for(const k of l){if(k instanceof po){if(i&&k.name.name==="key"){f=k,e.remove(x,k.value?.start||k.end);continue}e.appendLeft(x,","),E||(e.prependRight(k.start,"{ "),E=!0),A=!0}else E?(A&&e.appendLeft(x," "),e.appendLeft(x,"},"),E=!1):e.appendLeft(x,","),g=!0;x=k.end,S||(S=k)}return e.remove(l.at(-1)?.end||x,c),{firstAttribute:S,hasAttributes:A,hasSpread:g,inObject:E,keyAttribute:f,previousEnd:x}}wrapAttributes(e,n,s,i,r,a,l){if(n&&e.appendLeft(l," }"),i){if(s){const{start:c}=r;r instanceof fo&&e.prependRight(c,"{}, "),e.prependRight(c,"Object.assign("),e.appendLeft(l,")")}}else s||e.appendLeft(l,`, ${a}`)}}class hp extends gl{include(e,n){super.include(e,n),this.openingFragment.include(e,n),this.closingFragment.include(e,n)}render(e,n){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,n);break;case"automatic":this.renderAutomaticMode(e,n);break;default:super.render(e,n)}}renderClassicMode(e,n){const{snippets:{getPropertyAccess:s},useOriginalName:i}=n,{closingFragment:r,factory:a,factoryVariable:l,openingFragment:c,start:u}=this,[,...d]=a.split(".");c.render(e,n),e.prependRight(u,`/*#__PURE__*/${[l.getName(s,i),...d].join(".")}(`),e.appendLeft(c.end,", null"),this.renderChildren(e,n,c.end),r.render(e,n)}renderAutomaticMode(e,n){const{snippets:{getPropertyAccess:s},useOriginalName:i}=n,{closingFragment:r,factoryVariable:a,openingFragment:l,start:c}=this;l.render(e,n),e.prependRight(c,`/*#__PURE__*/${a.getName(s,i)}(`);const{firstChild:u,hasMultipleChildren:d,childrenEnd:m}=this.renderChildren(e,n,l.end);u?(e.prependRight(u.start,"{ children: "+(d?"[":"")),d&&e.appendLeft(r.start,"]"),e.appendLeft(m," }")):e.appendLeft(l.end,", {}"),r.render(e,n)}}class dp extends Z{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.object.includePath([this.property.name],e)}includePath(e,n){this.included||this.includeNode(n),this.object.includePath([this.property.name,...e],n)}}class yl extends Z{}yl.prototype.includeNode=dt;class bl extends Z{render(e,n,{jsxMode:s=this.scope.context.options.jsx.mode}={}){this.name.render(e,n);for(const i of this.attributes)i.render(e,n,{jsxMode:s})}}bl.prototype.includeNode=dt;class pp extends Z{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();const n=this.scope.context.options.jsx;if(n.mode==="automatic")this.fragment="Fragment",this.fragmentVariable=ml("Fragment",!1,n.jsxImportSource,this,e);else{const{fragment:s,importSource:i,mode:r}=n;s!=null&&(this.fragment=s,this.fragmentVariable=ml(s,r==="preserve",i,this,e))}}render(e,n){const{mode:s}=this.scope.context.options.jsx;if(s!=="preserve"){const{snippets:{getPropertyAccess:i},useOriginalName:r}=n,[,...a]=this.fragment.split("."),l=[this.fragmentVariable.getName(i,r),...a].join(".");e.update(this.start,this.end,l)}}}class fp extends Z{render(e,n){super.render(e,n);const{mode:s}=this.scope.context.options.jsx;s!=="preserve"&&(e.overwrite(this.start,this.expression.start,"...",{contentOnly:!0}),e.overwrite(this.expression.end,this.end,"",{contentOnly:!0}))}}class xl extends Z{hasEffects(e){const{brokenFlow:n,includedLabels:s}=e;e.ignore.labels.add(this.label.name),e.includedLabels=new Set;let i=!1;return this.body.hasEffects(e)?i=!0:(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=n)),e.includedLabels=new Set([...s,...e.includedLabels]),i}include(e,n){this.included||this.includeNode(e);const{brokenFlow:s,includedLabels:i}=e;e.includedLabels=new Set,this.body.include(e,n),(n||e.includedLabels.has(this.label.name))&&(this.label.include(e,n),e.includedLabels.delete(this.label.name),e.brokenFlow=s),e.includedLabels=new Set([...i,...e.includedLabels])}includeNode(e){this.included=!0,this.body.includePath(ie,e)}render(e,n){this.label.included?this.label.render(e,n):e.remove(this.start,An(e.original,ht(e.original,":",this.label.end)+1)),this.body.render(e,n)}}xl.prototype.applyDeoptimizations=Te;class go extends Z{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Oe(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Le(this.flags,65536,e)}get hasDeoptimizedCache(){return Oe(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Le(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.left.deoptimizeArgumentsOnInteractionAtPath(e,n,s),this.right.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizeCache(){if(this.hasDeoptimizedCache)return;if(this.hasDeoptimizedCache=!0,this.usedBranch){const s=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,s.deoptimizePath(ie),this.included&&s.includePath(ie,Ft())}const{scope:{context:e},expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=Qe;for(const s of n)s.deoptimizeCache();e.requestTreeshakingPass()}deoptimizePath(e){const n=this.getUsedBranch();n?n.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,n,s){if(s===this)return Ce;const i=this.getUsedBranch();if(i)return this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,n,s);if(!this.hasDeoptimizedCache&&!e.length){const r=$s(this.right.getLiteralValueAtPath(e,n,s));if(typeof r!="symbol"){if(!r&&this.operator==="&&")return this.expressionsToBeDeoptimized.push(s),lr;if(r&&this.operator==="||")return this.expressionsToBeDeoptimized.push(s),ar}}return Ce}getReturnExpressionWhenCalledAtPath(e,n,s,i){const r=this.getUsedBranch();return r?(this.expressionsToBeDeoptimized.push(i),r.getReturnExpressionWhenCalledAtPath(e,n,s,i)):[new no([this.left.getReturnExpressionWhenCalledAtPath(e,n,s,i)[0],this.right.getReturnExpressionWhenCalledAtPath(e,n,s,i)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,n,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,n,s):this.left.hasEffectsOnInteractionAtPath(e,n,s)||this.right.hasEffectsOnInteractionAtPath(e,n,s)}include(e,n){this.included=!0;const s=this.getUsedBranch();n||!s||s===this.right&&this.left.shouldBeIncluded(e)?(this.left.include(e,n),this.right.include(e,n)):s.include(e,n)}includePath(e,n){this.included=!0;const s=this.getUsedBranch();!s||s===this.right&&this.left.shouldBeIncluded(n)?(this.left.includePath(e,n),this.right.includePath(e,n)):s.includePath(e,n)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,n,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:r,renderedSurroundingElement:a}=pt){if(this.left.included&&this.right.included)this.left.render(e,n,{preventASI:i,renderedSurroundingElement:a}),this.right.render(e,n);else{const l=ht(e.original,this.operator,this.left.end);if(this.right.included){const c=An(e.original,l+2);e.remove(this.start,c),i&&nr(e,c,this.right.start),this.left.removeAnnotations(e)}else e.remove((function(c,u,d){for(;;){if(u>=d||!Fm.test(c[d-1]))return d;d--}})(e.original,this.left.end,l),this.end);this.getUsedBranch().render(e,n,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:r||this.parent.type,renderedSurroundingElement:a||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(ae,qe,this),n=$s(e);if(typeof n=="symbol"||this.operator==="??"&&typeof e=="symbol")return null;this.usedBranch=this.operator==="||"&&n||this.operator==="&&"&&!n||this.operator==="??"&&e!=null?this.left:this.right}return this.usedBranch}}go.prototype.includeNode=ze,go.prototype.applyDeoptimizations=Te;class mp extends Z{hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const n of this.arguments)if(n.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(ae,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:n}){return e.length>0||n!==0}include(e,n){this.included||this.includeNode(e),n?super.include(e,!0):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(ie,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=>e.type==="pure"))}render(e,n){this.callee.render(e,n),Qd(e,n,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,ae,qe),this.scope.context.requestTreeshakingPass()}}class Rs extends Z{constructor(){super(...arguments),this.objectEntity=null,this.protoProp=null}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,n,s){return this.getObjectEntity().getLiteralValueAtPath(e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,n,s,i)}hasEffectsOnInteractionAtPath(e,n,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,n,s)}include(e,n){this.included||this.includeNode(e),this.getObjectEntity().include(e,n),this.protoProp?.include(e,n)}includeNode(e){this.included=!0,this.protoProp?.includePath(ie,e)}includePath(e,n){this.included||this.includeNode(n),this.getObjectEntity().includePath(e,n)}render(e,n,{renderedSurroundingElement:s}=pt){if(s!==Xt&&s!==ma||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const i=tr(this.properties,e,this.start+1,this.end-1);let r=null;for(const{node:a,separator:l,start:c,end:u}of i)a.included?(r=l,a.render(e,n)):ds(a,e,c,u);r&&e.remove(r,this.end-1)}}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;let e=vn;const n=[];for(const s of this.properties){if(s instanceof qn){n.push({key:Ie,kind:"init",property:s});continue}let i;if(s.computed){const r=s.key.getLiteralValueAtPath(ae,qe,this);if(typeof r=="symbol"){n.push({key:ha(r)?r:Ie,kind:s.kind,property:s});continue}i=String(r)}else if(i=s.key instanceof Fe?s.key.name:String(s.key.value),i==="__proto__"&&s.kind==="init"){this.protoProp=s,e=s.value instanceof kt&&s.value.value===null?null:s.value;continue}n.push({key:i,kind:s.kind,property:s})}return this.objectEntity=new Nt(n,e)}}Rs.prototype.applyDeoptimizations=Te;class gp extends Z{initialise(){const e=this.scope.context.module.id;return re(wa(bs(mr(this.message)),e))}}class yp extends Z{initialise(){const e=this.start,n=this.scope.context.module.id,s=wa(bs(mr(this.message,e)),n);this.scope.context.error(s,e)}}class kl extends Z{}kl.prototype.includeNode=dt;class yo extends Z{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(this.hasCachedEffect===null?this.hasCachedEffect=this.hasEffects(gs()):this.hasCachedEffect)}hasEffects(e){for(const n of this.body)if(n.hasEffects(e)){if(this.scope.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:s,log:i,module:r}=this.scope.context;i(Fn,tg(s,r.id,ya(s,n.start,{offsetLine:1})),n.start)}return this.hasCachedEffect=!0}return!1}include(e,n){this.included=!0;for(const s of this.body)(n||s.shouldBeIncluded(e))&&s.include(e,n)}initialise(){if(super.initialise(),this.invalidAnnotations)for(const{start:e,end:n,type:s}of this.invalidAnnotations)this.scope.context.magicString.remove(e,n),s!=="pure"&&s!=="noSideEffects"||this.scope.context.log(ye,ng(this.scope.context.code.slice(e,n),this.scope.context.module.id,s),e)}render(e,n){let s=this.start;if(e.original.startsWith("#!")&&(s=Math.min(e.original.indexOf(`
32
- `)+1,this.end),e.remove(0,s)),this.body.length>0){for(;e.original[s]==="/"&&/[*/]/.test(e.original[s+1]);){const i=Gs(e.original.slice(s,this.body[0].start));if(i[0]===-1)break;s+=i[1]}Xs(this.body,e,s,this.end,n)}else super.render(e,n)}}yo.prototype.includeNode=ze,yo.prototype.applyDeoptimizations=Te;class vi extends _r{get method(){return Oe(this.flags,262144)}set method(e){this.flags=Le(this.flags,262144,e)}get shorthand(){return Oe(this.flags,524288)}set shorthand(e){this.flags=Le(this.flags,524288,e)}declare(e,n,s){return this.value.declare(e,this.getPathInProperty(n),s)}deoptimizeAssignment(e,n){this.value.deoptimizeAssignment?.(this.getPathInProperty(e),n)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenDestructuring(e,n,s){return this.value.hasEffectsWhenDestructuring?.(e,this.getPathInProperty(n),s)}includeDestructuredIfNecessary(e,n,s){const i=this.getPathInProperty(n);let r=this.value.includeDestructuredIfNecessary(e,i,s)||this.included;return(r||=this.key.hasEffects(gs()))&&(this.key.include(e,!1),this.value.included||(this.value.includeNode(e),this.value.includeDestructuredIfNecessary(e,i,s))),!this.included&&r&&this.includeNode(e),this.included}include(e,n){this.included=!0,this.key.include(e,n),this.value.include(e,n)}includePath(e,n){this.included=!0,this.value.includePath(e,n)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,n){this.shorthand||this.key.render(e,n),this.value.render(e,n,{isShorthandProperty:this.shorthand})}getPathInProperty(e){return e.at(-1)===Ie?e:this.computed?[...e,Ie]:this.key instanceof Fe?[...e,this.key.name]:[...e,String(this.key.value)]}}vi.prototype.includeNode=ze,vi.prototype.applyDeoptimizations=Te;class El extends Z{get computed(){return Oe(this.flags,1024)}set computed(e){this.flags=Le(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,n,s){return this.value?this.value.getLiteralValueAtPath(e,n,s):Ce}getReturnExpressionWhenCalledAtPath(e,n,s,i){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,n,s,i):rt}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||Ma(this.decorators,e)}hasEffectsOnInteractionAtPath(e,n,s){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,n,s)}includeNode(e){this.included=!0,this.value?.includePath(ie,e);for(const n of this.decorators)n.includePath(ie,e)}}El.prototype.applyDeoptimizations=Te;class Al extends Z{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,n){this.included||this.includeNode(e),this.argument?.include(e,n),e.brokenFlow=!0}includeNode(e){this.included=!0,this.argument?.includePath(ie,e)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||ve)}render(e,n){this.argument&&(this.argument.render(e,n,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}Al.prototype.applyDeoptimizations=Te;class bo extends Z{deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,n,s){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,n,s)}hasEffects(e){for(const n of this.expressions)if(n.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,n,s){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,n,s)}include(e,n){this.included=!0;const s=this.expressions[this.expressions.length-1];for(const i of this.expressions)(n||i===s&&!(this.parent instanceof jt)||i.shouldBeIncluded(e))&&i.include(e,n)}includePath(e,n){this.included=!0,this.expressions[this.expressions.length-1].includePath(e,n)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,n,{renderedParentType:s,isCalleeOfRenderedParent:i,preventASI:r}=pt){let a=0,l=null;const c=this.expressions[this.expressions.length-1];for(const{node:u,separator:d,start:m,end:f}of tr(this.expressions,e,this.start,this.end))if(u.included)if(a++,l=d,a===1&&r&&nr(e,m,u.start),a===1){const g=s||this.parent.type;u.render(e,n,{isCalleeOfRenderedParent:i&&u===c,renderedParentType:g,renderedSurroundingElement:g})}else u.render(e,n);else ds(u,e,m,f);l&&e.remove(l,this.end)}}bo.prototype.includeNode=ze,bo.prototype.applyDeoptimizations=Te;class bp extends Z{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}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,ae,e)}}class _i extends Z{hasEffects(e){if(this.test?.hasEffects(e))return!0;for(const n of this.consequent){if(e.brokenFlow)break;if(n.hasEffects(e))return!0}return!1}include(e,n){this.included=!0,this.test?.include(e,n);for(const s of this.consequent)(n||s.shouldBeIncluded(e))&&s.include(e,n)}render(e,n,s){if(this.test&&(this.test.render(e,n),this.test.start===this.start+4&&e.prependLeft(this.test.start," ")),this.consequent.length>0){const i=this.test?this.test.end:ht(e.original,"default",this.start)+7,r=ht(e.original,":",i)+1;Xs(this.consequent,e,r,s.end,n)}}}_i.prototype.needsBoundaries=!0,_i.prototype.includeNode=ze,_i.prototype.applyDeoptimizations=Te;class xo extends Z{createScope(e){this.parentScope=e,this.scope=new Wn(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:n,hasBreak:s,ignore:i}=e,{breaks:r}=i;i.breaks=!0,e.hasBreak=!1;let a=!0;for(const l of this.cases){if(l.hasEffects(e))return!0;a&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=n}return this.defaultCase!==null&&(e.brokenFlow=a),i.breaks=r,e.hasBreak=s,!1}include(e,n){this.included=!0,this.discriminant.include(e,n);const{brokenFlow:s,hasBreak:i}=e;e.hasBreak=!1;let r=!0,a=n||this.defaultCase!==null&&this.defaultCase<this.cases.length-1;for(let l=this.cases.length-1;l>=0;l--){const c=this.cases[l];if(c.included&&(a=!0),!a){const u=gs();u.ignore.breaks=!0,a=c.hasEffects(u)}a?(c.include(e,n),r&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=s):r=s}a&&this.defaultCase!==null&&(e.brokenFlow=r),e.hasBreak=i}initialise(){super.initialise();for(let e=0;e<this.cases.length;e++)if(this.cases[e].test===null)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,n){this.discriminant.render(e,n),this.cases.length>0&&Xs(this.cases,e,this.cases[0].start,this.end-1,n)}}xo.prototype.includeNode=ze,xo.prototype.applyDeoptimizations=Te;class wl extends Zd{get hasCheckedForWarnings(){return Oe(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=Le(this.flags,134217728,e)}bind(){super.bind()}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const n of this.quasi.expressions)if(n.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(ae,this.interaction,e)}include(e,n){this.included||this.includeNode(e),n?super.include(e,!0):(this.quasi.include(e,!1),this.tag.include(e,!1),this.tag.includeCallArguments(this.interaction,e))}initialise(){super.initialise(),this.args=[ve,...this.quasi.expressions],this.interaction={args:[this.tag instanceof gn&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,n){if(this.tag.render(e,n,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,n),!this.hasCheckedForWarnings&&this.tag.type===ga){this.hasCheckedForWarnings=!0;const s=this.tag.name;this.scope.findVariable(s).isNamespace&&this.scope.context.log(ye,$h(s),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,ae,qe),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=qe){return this.returnExpression===null?(this.returnExpression=rt,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(ae,this.interaction,e,this)):this.returnExpression}}wl.prototype.includeNode=dt;class Sl extends Z{get tail(){return Oe(this.flags,1048576)}set tail(e){this.flags=Le(this.flags,1048576,e)}bind(){}hasEffects(){return!1}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}Sl.prototype.includeNode=dt;class xp extends Z{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||this.quasis.length!==1?Ce:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return e.length!==1?rt:ii(ni,e[0])}hasEffectsOnInteractionAtPath(e,n,s){return n.type===0?e.length>1:n.type!==2||e.length!==1||si(ni,e[0],n,s)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const n of this.expressions)n.includePath(ie,e)}render(e,n){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,n)}}class kp extends vt{constructor(e,n){super(e,n),this.variables.set("this",new Ot("this",null,hn,ae,n,"other"))}addDeclaration(e,n,s,i,r){return this.context.module.importDescriptions.has(e.name)&&n.error(xs(e.name),e.start),super.addDeclaration(e,n,s,i,r)}addExportDefaultDeclaration(e,n){const s=new Qt(e,n);return this.variables.set("default",s),s}addNamespaceMemberAccess(){}deconflict(e,n,s){for(const i of this.children)i.deconflict(e,n,s)}findLexicalBoundary(){return this}findVariable(e){const n=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(n)return n;const s=this.context.traceVariable(e)||this.parent.findVariable(e);return s instanceof La&&this.accessedOutsideVariables.set(e,s),s}}class Ep extends Z{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,n,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,n,s){return e.length===0?n.type!==0:this.variable.hasEffectsOnInteractionAtPath(e,n,s)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,ae,e)}includePath(e,n){this.included?e.length>0&&this.variable.includePath(e,n):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,e,n));const s=(function(i,r){for(;!(i instanceof dd&&i.thisVariable===r);){if(!(i instanceof vt))return null;i=i.parent}return i})(this.scope,this.variable);s&&s.functionNode.parent instanceof vi&&s.functionNode.parent.parent instanceof Rs&&s.functionNode.parent.parent.includePath(e,n)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof kp?this.scope.context.moduleContext:null,this.alias==="undefined"&&this.scope.context.log(ye,{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:ot("troubleshooting/#error-this-is-undefined")},this.start)}render(e){this.alias!==null&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}}class Ap extends Z{hasEffects(){return!0}include(e,n){this.included||this.includeNode(e),this.argument.include(e,n),e.brokenFlow=!0}includeNode(e){this.included||(this.included=!0,this.argument.includePath(ie,e))}render(e,n){this.argument.render(e,n,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class ko extends Z{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,n){const s=this.scope.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:i,includedLabels:r}=e;if(this.directlyIncluded&&s){if(this.includedLabelsAfterBlock)for(const a of this.includedLabelsAfterBlock)r.add(a)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,s?Uh:n),r.size>0&&(this.includedLabelsAfterBlock=[...r]),e.brokenFlow=i;this.handler!==null&&(this.handler.include(e,n),e.brokenFlow=i),this.finalizer?.include(e,n)}}ko.prototype.includeNode=ze,ko.prototype.applyDeoptimizations=Te;const by={"!":t=>!t,"+":t=>+t,"-":t=>-t,delete:()=>Ce,typeof:t=>typeof t,void:()=>{},"~":t=>~t},wp=Symbol("Unassigned");class Il extends Z{constructor(){super(...arguments),this.renderedLiteralValue=wp}get prefix(){return Oe(this.flags,2097152)}set prefix(e){this.flags=Le(this.flags,2097152,e)}deoptimizeCache(){this.renderedLiteralValue=Ce}getLiteralValueAtPath(e,n,s){if(e.length>0)return Ce;const i=this.argument.getLiteralValueAtPath(ae,n,s);if(typeof i=="symbol"){if(this.operator==="void")return;if(this.operator==="!"){if(i===lr)return!0;if(i===ar)return!1}return Ce}return by[this.operator](i)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(this.operator==="typeof"&&this.argument instanceof Fe)&&(this.argument.hasEffects(e)||this.operator==="delete"&&this.argument.hasEffectsOnInteractionAtPath(ae,fa,e))}hasEffectsOnInteractionAtPath(e,{type:n}){return n!==0||e.length>(this.operator==="void"?0:1)}applyDeoptimizations(){this.deoptimized=!0,this.operator==="delete"&&(this.argument.deoptimizePath(ae),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(e){return this.renderedLiteralValue!==wp?this.renderedLiteralValue:this.renderedLiteralValue=e?Ce:Jd(this.getLiteralValueAtPath(ae,qe,this))}include(e,n,s){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const i=this.argument instanceof Fe&&this.argument.variable?.included;(typeof this.getRenderedLiteralValue(n)=="symbol"||this.argument.shouldBeIncluded(e)||i)&&(this.argument.include(e,n),this.renderedLiteralValue=Ce)}render(e,n){if(typeof this.renderedLiteralValue=="symbol")super.render(e,n);else{let s=this.renderedLiteralValue;xy.test(e.original[this.start-1])||(s=` ${s}`),e.overwrite(this.start,this.end,s)}}}const xy=/[\s([=%&*+-/<>^|,?:;]/;Il.prototype.includeNode=dt;class vl extends Z{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:n}){return e.length>1||n!==0}include(e,n){this.included||this.includeNode(e),this.argument.includeAsAssignmentTarget(e,n,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(ve)}render(e,n){const{exportNamesByVariable:s,format:i,snippets:{_:r}}=n;if(this.argument.render(e,n),i==="system"){const a=this.argument.variable,l=s.get(a);if(l)if(this.prefix)l.length===1?oa(a,this.start,this.end,e,n):sh(a,this.start,this.end,this.parent.type!==Xt,e,n);else{const c=this.operator[0];(function(u,d,m,f,g,E,x){const{_:A}=E.snippets;g.prependRight(d,`${Ln([u],E,x)},${A}`),f&&(g.prependRight(d,"("),g.appendLeft(m,")"))})(a,this.start,this.end,this.parent.type!==Xt,e,n,`${r}${c}${r}1`)}}}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath(ae),this.argument instanceof Fe&&this.scope.findVariable(this.argument.name).markReassigned(),this.scope.context.requestTreeshakingPass()}}vl.prototype.includeNode=dt;class Pi extends Z{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(ae)}hasEffectsOnInteractionAtPath(){return!1}include(e,n,{asSingleStatement:s}=pt){this.included=!0;for(const i of this.declarations){(n||i.shouldBeIncluded(e))&&i.include(e,n);const{id:r,init:a}=i;s&&r.include(e,n),a&&r.included&&!a.included&&(r instanceof Pn||r instanceof Xr)&&a.include(e,n)}}initialise(){super.initialise();for(const e of this.declarations)e.declareDeclarator(this.kind)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,n,s=pt){if(this.areAllDeclarationsIncludedAndNotExported(n.exportNamesByVariable)){for(const i of this.declarations)i.render(e,n);s.isNoStatement||e.original.charCodeAt(this.end-1)===59||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,n)}renderDeclarationEnd(e,n,s,i,r,a,l){e.original.charCodeAt(this.end-1)===59&&e.remove(this.end-1,this.end),n+=";",s===null?e.appendLeft(r,n):(e.original.charCodeAt(i-1)!==10||e.original.charCodeAt(this.end)!==10&&e.original.charCodeAt(this.end)!==13||(i--,e.original.charCodeAt(i)===13&&i--),i===s+1?e.overwrite(s,r,n):(e.overwrite(s,s+1,n),e.remove(i,r))),a.length>0&&e.appendLeft(r,` ${Ln(a,l)};`)}renderReplacedDeclarations(e,n){const s=tr(this.declarations,e,this.start+this.kind.length,this.end-(e.original.charCodeAt(this.end-1)===59?1:0));let i,r;r=An(e.original,this.start+this.kind.length);let a=r-1;e.remove(this.start,a);let l,c=!1,u=!1,d="";const m=[],f=(function(g,E,x){let A=null;if(E.format==="system"){for(const{node:S}of g)S.id instanceof Fe&&S.init&&x.length===0&&E.exportNamesByVariable.get(S.id.variable)?.length===1?(A=S.id.variable,x.push(A)):S.id.addExportedVariables(x,E.exportNamesByVariable);x.length>1?A=null:A&&(x.length=0)}return A})(s,n,m);for(const{node:g,start:E,separator:x,contentEnd:A,end:S}of s)if(g.included){if(g.render(e,n),l="",!g.id.included||g.id instanceof Fe&&ip(g.id.variable,n.exportNamesByVariable))u&&(d+=";"),c=!1;else{if(f&&f===g.id.variable){const k=ht(e.original,"=",g.id.end);oa(f,An(e.original,k+1),x===null?A:x,e,n)}c?d+=",":(u&&(d+=";"),l+=`${this.kind} `,c=!0)}r===a+1?e.overwrite(a,r,d+l):(e.overwrite(a,a+1,d),e.appendLeft(r,l)),i=A,r=S,u=!0,a=x,d=""}else ds(g,e,E,S);this.renderDeclarationEnd(e,d,a,i,r,m,n)}areAllDeclarationsIncludedAndNotExported(e){if(this.kind==="await using"||this.kind==="using")return!0;for(const n of this.declarations){if(!n.id.included)return!1;if(n.id.type===ga){if(e.has(n.id.variable))return!1}else{const s=[];if(n.id.addExportedVariables(s,e),s.length>0)return!1}}return!0}}Pi.prototype.includeNode=ze,Pi.prototype.applyDeoptimizations=Te;class Eo extends Z{hasEffects(e){return!!this.test.hasEffects(e)||ro(e,this.body)}include(e,n){this.included=!0,this.test.include(e,n),xi(e,this.body,n)}}Eo.prototype.includeNode=ze,Eo.prototype.applyDeoptimizations=Te;class Sp extends Z{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(ie)}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(ie,e)}render(e,n){this.argument&&(this.argument.render(e,n,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}const ky=["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"],Ey=[gp,yp,Ra,Xr,Jr,Xd,Kd,rl,ol,Gn,Yr,al,Qr,Zr,eo,vs,to,so,io,ll,cl,jt,oo,ul,Cs,Kn,ki,ao,jt,ep,tp,lo,_s,hl,Fe,Ts,sp,Ei,Ai,dl,wi,ho,po,lp,cp,up,Si,mo,hp,pl,dp,yl,bl,pp,fo,fp,Ii,xl,kt,kt,kt,kt,kt,kt,go,gn,Ad,Pr,mp,Rs,Pn,kl,yo,vi,El,Xn,Al,bo,qn,Nr,bp,_i,xo,wl,Sl,xp,Ep,Ap,ko,Il,vl,Pi,uo,Eo,Sp],Ay=[function(t,e,n){t.message=n.convertString(n[e])},function(t,e,n){t.message=n.convertString(n[e])},function(t,e,n){const{scope:s}=t;t.elements=Ue(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.elements=Ue(t,s,n[e],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.async=!(1&~i),t.expression=!(2&~i),t.generator=!(4&~i);const r=t.annotations=Dt(n[e+1],n);t.annotationNoSideEffects=r.some(l=>l.type==="noSideEffects");const a=t.params=Ue(t,s,n[e+2],n);s.addParameterVariables(a.map(l=>l.declare("parameter",ae,ve)),a[a.length-1]instanceof Xn),t.body=G(t,s.bodyScope,n[e+3],n)},function(t,e,n){const{scope:s}=t;t.operator=yt[n[e]],t.left=G(t,s,n[e+1],n),t.right=G(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t;t.left=G(t,s,n[e],n),t.right=G(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.argument=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.operator=yt[n[e]],t.left=G(t,s,n[e+1],n),t.right=G(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t;t.body=Ue(t,s,n[e],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.label=i===0?null:G(t,s,i,n)},function(t,e,n){const{scope:s}=t,i=n[e];t.optional=!(1&~i),t.annotations=Dt(n[e+1],n),t.callee=G(t,s,n[e+2],n),t.arguments=Ue(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t,i=n[e];(t.param=i===0?null:G(t,s,i,n))?.declare("parameter",ae,ve),t.body=G(t,s.bodyScope,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.expression=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t,i=n[e];if(i){const r=n[i],a=t.body=new Array(r);for(let l=0;l<r;l++){const c=n[i+1+l];a[l]=G(t,n[c]===79||1&n[c+3]?s:s.instanceScope,c,n)}}else t.body=[]},function(t,e,n){const{scope:s}=t;t.decorators=Ue(t,s,n[e],n);const i=n[e+1];t.id=i===0?null:G(t,s.parent,i,n);const r=n[e+2];t.superClass=r===0?null:G(t,s,r,n),t.body=G(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t;t.decorators=Ue(t,s,n[e],n);const i=n[e+1];t.id=i===0?null:G(t,s,i,n);const r=n[e+2];t.superClass=r===0?null:G(t,s,r,n),t.body=G(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t;t.test=G(t,s,n[e],n),t.consequent=G(t,s,n[e+1],n),t.alternate=G(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.label=i===0?null:G(t,s,i,n)},function(){},function(t,e,n){const{scope:s}=t;t.expression=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.directive=n.convertString(n[e]),t.expression=G(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.body=G(t,s,n[e],n),t.test=G(t,s,n[e+1],n)},function(){},function(t,e,n){const{scope:s}=t,i=n[e];t.exported=i===0?null:G(t,s,i,n),t.source=G(t,s,n[e+1],n),t.attributes=Ue(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t;t.declaration=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.specifiers=Ue(t,s,n[e],n);const i=n[e+1];t.source=i===0?null:G(t,s,i,n),t.attributes=Ue(t,s,n[e+2],n);const r=n[e+3];t.declaration=r===0?null:G(t,s,r,n)},function(t,e,n){const{scope:s}=t;t.local=G(t,s,n[e],n);const i=n[e+1];t.exported=i===0?t.local:G(t,s,i,n)},function(t,e,n){const{scope:s}=t;t.expression=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.left=G(t,s,n[e],n),t.right=G(t,s,n[e+1],n),t.body=G(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.await=!(1&~i),t.left=G(t,s,n[e+1],n),t.right=G(t,s,n[e+2],n),t.body=G(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.init=i===0?null:G(t,s,i,n);const r=n[e+1];t.test=r===0?null:G(t,s,r,n);const a=n[e+2];t.update=a===0?null:G(t,s,a,n),t.body=G(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.async=!(1&~i),t.generator=!(2&~i);const r=t.annotations=Dt(n[e+1],n);t.annotationNoSideEffects=r.some(c=>c.type==="noSideEffects");const a=n[e+2];t.id=a===0?null:G(t,s.parent,a,n);const l=t.params=Ue(t,s,n[e+3],n);s.addParameterVariables(l.map(c=>c.declare("parameter",ae,ve)),l[l.length-1]instanceof Xn),t.body=G(t,s.bodyScope,n[e+4],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.async=!(1&~i),t.generator=!(2&~i);const r=t.annotations=Dt(n[e+1],n);t.annotationNoSideEffects=r.some(c=>c.type==="noSideEffects");const a=n[e+2];t.id=a===0?null:G(t,t.idScope,a,n);const l=t.params=Ue(t,s,n[e+3],n);s.addParameterVariables(l.map(c=>c.declare("parameter",ae,ve)),l[l.length-1]instanceof Xn),t.body=G(t,s.bodyScope,n[e+4],n)},function(t,e,n){t.name=n.convertString(n[e])},function(t,e,n){const{scope:s}=t;t.test=G(t,s,n[e],n),t.consequent=G(t,t.consequentScope=new co(s),n[e+1],n);const i=n[e+2];t.alternate=i===0?null:G(t,t.alternateScope=new co(s),i,n)},function(t,e,n){const{scope:s}=t;t.key=G(t,s,n[e],n),t.value=G(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.specifiers=Ue(t,s,n[e],n),t.source=G(t,s,n[e+1],n),t.attributes=Ue(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t;t.local=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.source=G(t,s,n[e],n),t.sourceAstNode=W(n[e],n);const i=n[e+1];t.options=i===0?null:G(t,s,i,n)},function(t,e,n){const{scope:s}=t;t.local=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.local=G(t,s,n[e+1],n),t.imported=i===0?t.local:G(t,s,i,n)},function(t,e,n){const{scope:s}=t;t.name=G(t,s,n[e],n);const i=n[e+1];t.value=i===0?null:G(t,s,i,n)},function(t,e,n){const{scope:s}=t;t.name=G(t,s,n[e],n)},function(){},function(t,e,n){const{scope:s}=t;t.openingElement=G(t,s,n[e],n),t.children=Ue(t,s,n[e+1],n);const i=n[e+2];t.closingElement=i===0?null:G(t,s,i,n)},function(){},function(t,e,n){const{scope:s}=t;t.expression=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.openingFragment=G(t,s,n[e],n),t.children=Ue(t,s,n[e+1],n),t.closingFragment=G(t,s,n[e+2],n)},function(t,e,n){t.name=n.convertString(n[e])},function(t,e,n){const{scope:s}=t;t.object=G(t,s,n[e],n),t.property=G(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.namespace=G(t,s,n[e],n),t.name=G(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.selfClosing=!(1&~i),t.name=G(t,s,n[e+1],n),t.attributes=Ue(t,s,n[e+2],n)},function(t){t.attributes=[],t.selfClosing=!1},function(t,e,n){const{scope:s}=t;t.argument=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.expression=G(t,s,n[e],n)},function(t,e,n){t.value=n.convertString(n[e]),t.raw=n.convertString(n[e+1])},function(t,e,n){const{scope:s}=t;t.label=G(t,s,n[e],n),t.body=G(t,s,n[e+1],n)},function(t,e,n){const s=t.bigint=n.convertString(n[e]);t.raw=n.convertString(n[e+1]),t.value=BigInt(s)},function(t,e,n){const s=n[e],i=t.value=!(1&~s);t.raw=i?"true":"false"},function(t){t.value=null},function(t,e,n){const s=n[e];t.raw=s===0?void 0:n.convertString(s),t.value=new DataView(n.buffer).getFloat64(e+1<<2,!0)},function(t,e,n){const s=n.convertString(n[e]),i=n.convertString(n[e+1]);t.raw=`/${i}/${s}`,t.regex={flags:s,pattern:i},t.value=new RegExp(i,s)},function(t,e,n){t.value=n.convertString(n[e]);const s=n[e+1];t.raw=s===0?void 0:n.convertString(s)},function(t,e,n){const{scope:s}=t;t.operator=yt[n[e]],t.left=G(t,s,n[e+1],n),t.right=G(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.computed=!(1&~i),t.optional=!(2&~i),t.object=G(t,s,n[e+1],n),t.property=G(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t;t.meta=G(t,s,n[e],n),t.property=G(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.static=!(1&~i),t.computed=!(2&~i),t.decorators=Ue(t,s,n[e+1],n),t.key=G(t,s,n[e+2],n),t.value=G(t,s,n[e+3],n),t.kind=yt[n[e+4]]},function(t,e,n){const{scope:s}=t;t.annotations=Dt(n[e],n),t.callee=G(t,s,n[e+1],n),t.arguments=Ue(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t;t.properties=Ue(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.properties=Ue(t,s,n[e],n)},function(t,e,n){t.name=n.convertString(n[e])},function(t,e,n){const{scope:s}=t;t.body=Ue(t,s,n[e],n),t.invalidAnnotations=Dt(n[e+1],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.method=!(1&~i),t.shorthand=!(2&~i),t.computed=!(4&~i);const r=n[e+1];t.value=G(t,s,n[e+2],n),t.kind=yt[n[e+3]],t.key=r===0?t.value:G(t,s,r,n)},function(t,e,n){const{scope:s}=t,i=n[e];t.static=!(1&~i),t.computed=!(2&~i),t.decorators=Ue(t,s,n[e+1],n),t.key=G(t,s,n[e+2],n);const r=n[e+3];t.value=r===0?null:G(t,s,r,n)},function(t,e,n){const{scope:s}=t;t.argument=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.argument=i===0?null:G(t,s,i,n)},function(t,e,n){const{scope:s}=t;t.expressions=Ue(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.argument=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.body=Ue(t,s,n[e],n)},function(){},function(t,e,n){const{scope:s}=t,i=n[e];t.test=i===0?null:G(t,s,i,n),t.consequent=Ue(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.discriminant=G(t,t.parentScope,n[e],n),t.cases=Ue(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.tag=G(t,s,n[e],n),t.quasi=G(t,s,n[e+1],n)},function(t,e,n){const s=n[e];t.tail=!(1&~s);const i=n[e+1],r=i===0?null:n.convertString(i),a=n.convertString(n[e+2]);t.value={cooked:r,raw:a}},function(t,e,n){const{scope:s}=t;t.quasis=Ue(t,s,n[e],n),t.expressions=Ue(t,s,n[e+1],n)},function(){},function(t,e,n){const{scope:s}=t;t.argument=G(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.block=G(t,s,n[e],n);const i=n[e+1];t.handler=i===0?null:G(t,s,i,n);const r=n[e+2];t.finalizer=r===0?null:G(t,s,r,n)},function(t,e,n){const{scope:s}=t;t.operator=yt[n[e]],t.argument=G(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.prefix=!(1&~i),t.operator=yt[n[e+1]],t.argument=G(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t;t.kind=yt[n[e]],t.declarations=Ue(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.id=G(t,s,n[e],n);const i=n[e+1];t.init=i===0?null:G(t,s,i,n)},function(t,e,n){const{scope:s}=t;t.test=G(t,s,n[e],n),t.body=G(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t,i=n[e];t.delegate=!(1&~i);const r=n[e+1];t.argument=r===0?null:G(t,s,r,n)}];function G(t,e,n,s){const i=s[n],r=Ey[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const a=new r(t,e);return a.type=ky[i],a.start=s[n+1],a.end=s[n+2],Ay[i](a,n+3,s),a.initialise(),a}function Ue(t,e,n,s){if(n===0)return Qe;const i=s[n++],r=new Array(i);for(let a=0;a<i;a++){const l=s[n++];r[a]=l?G(t,e,l,s):null}return r}const _l={ArrayExpression:Ra,ArrayPattern:Xr,ArrowFunctionExpression:Jr,AssignmentExpression:Xd,AssignmentPattern:Kd,AwaitExpression:rl,BinaryExpression:ol,BlockStatement:Gn,BreakStatement:Yr,CallExpression:al,CatchClause:Qr,ChainExpression:Zr,ClassBody:eo,ClassDeclaration:vs,ClassExpression:to,ConditionalExpression:so,ContinueStatement:io,DebuggerStatement:ll,Decorator:cl,DoWhileStatement:oo,EmptyStatement:ul,ExportAllDeclaration:Cs,ExportDefaultDeclaration:Kn,ExportNamedDeclaration:ki,ExportSpecifier:ao,ExpressionStatement:jt,ForInStatement:ep,ForOfStatement:tp,ForStatement:lo,FunctionDeclaration:_s,FunctionExpression:hl,Identifier:Fe,IfStatement:Ts,ImportAttribute:sp,ImportDeclaration:Ei,ImportDefaultSpecifier:Ai,ImportExpression:dl,ImportNamespaceSpecifier:wi,ImportSpecifier:ho,JSXAttribute:po,JSXClosingElement:lp,JSXClosingFragment:cp,JSXElement:up,JSXEmptyExpression:Si,JSXExpressionContainer:mo,JSXFragment:hp,JSXIdentifier:pl,JSXMemberExpression:dp,JSXNamespacedName:yl,JSXOpeningElement:bl,JSXOpeningFragment:pp,JSXSpreadAttribute:fo,JSXSpreadChild:fp,JSXText:Ii,LabeledStatement:xl,Literal:kt,LogicalExpression:go,MemberExpression:gn,MetaProperty:Ad,MethodDefinition:Pr,NewExpression:mp,ObjectExpression:Rs,ObjectPattern:Pn,PanicError:gp,ParseError:yp,PrivateIdentifier:kl,Program:yo,Property:vi,PropertyDefinition:El,RestElement:Xn,ReturnStatement:Al,SequenceExpression:bo,SpreadElement:qn,StaticBlock:Nr,Super:bp,SwitchCase:_i,SwitchStatement:xo,TaggedTemplateExpression:wl,TemplateElement:Sl,TemplateLiteral:xp,ThisExpression:Ep,ThrowStatement:Ap,TryStatement:ko,UnaryExpression:Il,UnknownNode:class extends Z{hasEffects(){return!0}include(t){super.include(t,!0)}},UpdateExpression:vl,VariableDeclaration:Pi,VariableDeclarator:uo,WhileStatement:Eo,YieldExpression:Sp};class wy extends zn{constructor(e){super(Ps),this.module=e}includePath(e,n){super.includePath(e,n),this.module.needsExportShim=!0}}var es;(function(t){t[t.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",t[t.ANALYSE=1]="ANALYSE",t[t.GENERATE=2]="GENERATE"})(es||(es={}));const Ip=new WeakMap;function Pl(t,e){if(t){const n=Ip.get(t);n&&(function(s){s.encodedMappings===void 0&&s.decodedMappings&&(s.encodedMappings=Ju(s.decodedMappings)),s.decodedMappings=void 0})(n)}if(e)for(const n of e)n.missing||Pl(n)}function Ds(t){if(!t)return null;if(typeof t=="string"&&(t=JSON.parse(t)),!t.mappings)return{mappings:[],names:[],sources:[],version:3};const e=t.mappings,n=Array.isArray(e),s={decodedMappings:n?e:void 0,encodedMappings:n?void 0:e},i={...t,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?(function(r){const{length:a}=r,l=new vm(r),c=[];let u=0,d=0,m=0,f=0,g=0;do{const E=l.indexOf(";"),x=[];let A=!0,S=0;for(u=0;l.pos<E;){let k;u=Us(l,u),u<S&&(A=!1),S=u,Xu(l,E)?(d=Us(l,d),m=Us(l,m),f=Us(l,f),Xu(l,E)?(g=Us(l,g),k=[u,d,m,f,g]):k=[u,d,m,f]):k=[u],x.push(k),l.pos++}A||_m(x),c.push(x),l.pos=E+1}while(l.pos<=a);return c})(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return Ip.set(i,s),i}function Nl(t){return t.id}const $l=(t,{allowReturnOutsideFunction:e=!1,jsx:n=!1}={})=>(function(s){const i=W(0,s);switch(i.type){case"PanicError":return re(bs(mr(i.message)));case"ParseError":return re(bs(mr(i.message,i.start)));default:return i}})(Gd(Hd(t,e,n))),Sy=new Set(["assert","with"]);function vp(t){const{scope:{context:e},options:n,start:s}=t;if(!(n instanceof Rs))return n&&e.module.log(ye,Oh(e.module.id),s),ft;const i=n.properties.find(l=>Sy.has(Cl(l)))?.value;if(!i)return ft;if(!(i instanceof Rs))return e.module.log(ye,(r=e.module.id,{code:Eh,message:`Rollup could not statically analyze the options argument of a dynamic import in "${xe(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),ft;var r;const a=i.properties.map(l=>{const c=Cl(l);return typeof c=="string"&&typeof l.value.value=="string"?[c,l.value.value]:(e.module.log(ye,Oh(e.module.id),l.start),null)}).filter(l=>!!l);return a.length>0?Object.fromEntries(a):ft}const Cl=t=>{const e=t.key;return e&&!t.computed&&(e.name||e.value)};function Ao(t,e){const n=Object.keys(t);return n.length!==Object.keys(e).length||n.some(s=>t[s]!==e[s])}var _p="performance"in(typeof globalThis>"u"?typeof window>"u"?{}:window:globalThis)?performance:{now:()=>0},Pp={memoryUsage:()=>({heapUsed:0})};let Ni=new Map;function Np(t,e){switch(e){case 1:return`# ${t}`;case 2:return`## ${t}`;case 3:return t;default:return`- ${t}`}}function Iy(t,e=3){t=Np(t,e);const n=Pp.memoryUsage().heapUsed,s=_p.now(),i=Ni.get(t);i===void 0?Ni.set(t,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function vy(t,e=3){t=Np(t,e);const n=Ni.get(t);if(n!==void 0){const s=Pp.memoryUsage().heapUsed;n.memory+=s-n.startMemory,n.time+=_p.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,s)}}function _y(){const t={};for(const[e,{memory:n,time:s,totalMemory:i}]of Ni)t[e]=[s,n,i];return t}let ct=Rt,at=Rt;const Py=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function Ny(t,e){if(t._hasTimer)return t;t._hasTimer=!0;for(const n of Py)if(n in t){let s=`plugin ${e}`;t.name&&(s+=` (${t.name})`),s+=` - ${n}`;const i=function(...a){ct(s,4);const l=r.apply(this,a);return at(s,4),l};let r;typeof t[n].handler=="function"?(r=t[n].handler,t[n].handler=i):(r=t[n],t[n]=i)}return t}const $p={identifier:null,localName:Ps};function Tl(t,e,n,s,i=new Map,r){const a=i.get(e);if(a){if(a.has(t))return s?[null]:re((l=e,{code:"CIRCULAR_REEXPORT",exporter:c=t.id,message:`"${l}" cannot be exported from "${xe(c)}" as it is a reexport that references itself.`}));a.add(t)}else i.set(e,new Set([t]));var l,c;return t.getVariableForExportName(e,{importChain:r,importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i})}function Cp(t,e){const n=bt(e.sideEffectDependenciesByVariable,t,wn);let s=t;const i=new Set([s]);for(;;){const r=s.module;if(s=s instanceof Qt?s.getDirectOriginalVariable():s instanceof Et?s.syntheticNamespace:null,!s||i.has(s))break;i.add(s),n.add(r);const a=r.sideEffectDependenciesByVariable.get(s);if(a)for(const l of a)n.add(l)}return n}class st{constructor(e,n,s,i,r,a,l,c){this.graph=e,this.id=n,this.options=s,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.sourcesWithAttributes=new Map,this.allExportNames=null,this.allExportsIncluded=!1,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new wy(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(n),this.context=s.moduleContext(n),this.preserveSignature=this.options.preserveEntrySignatures;const u=this,{dynamicImports:d,dynamicImporters:m,exportAllSources:f,exports:g,implicitlyLoadedAfter:E,implicitlyLoadedBefore:x,importers:A,reexportDescriptions:S,sourcesWithAttributes:k}=this;this.info={ast:null,attributes:c,code:null,get dynamicallyImportedIdResolutions(){return d.map(({argument:v})=>typeof v=="string"&&u.resolvedIds[v]).filter(Boolean)},get dynamicallyImportedIds(){return d.map(({id:v})=>v).filter(v=>v!=null)},get dynamicImporters(){return m.sort()},get exportedBindings(){const v={".":[...g.keys()]};for(const[I,{source:P}]of S)(v[P]??=[]).push(I);for(const I of f)(v[I]??=[]).push("*");return v},get exports(){return[...g.keys(),...S.keys(),...[...f].map(()=>"*")]},get hasDefaultExport(){return u.ast?u.exports.has("default")||S.has("default"):null},id:n,get implicitlyLoadedAfterOneOf(){return Array.from(E,Nl).sort()},get implicitlyLoadedBefore(){return Array.from(x,Nl).sort()},get importedIdResolutions(){return Array.from(k.keys(),v=>u.resolvedIds[v]).filter(Boolean)},get importedIds(){return Array.from(k.keys(),v=>u.resolvedIds[v]?.id).filter(Boolean)},get importers(){return A.sort()},isEntry:i,isExternal:!1,get isIncluded(){return e.phase!==es.GENERATE?null:u.isIncluded()},meta:{...l},moduleSideEffects:r,safeVariableNames:null,syntheticNamedExports:a}}basename(){const e=Gt(this.id),n=En(this.id);return yr(n?e.slice(0,-n.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){Bh(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,n){return n!==void 0&&this.addLocationToLogProps(e,n),re(e)}estimateSize(){let e=0;for(const n of this.ast.body)n.included&&(e+=n.end-n.start);return e}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules)if(e instanceof Ze)this.allExportNames.add(`*${e.id}`);else for(const n of e.getAllExportNames())n!=="default"&&this.allExportNames.add(n);return typeof this.info.syntheticNamedExports=="string"&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set,n=new Set,s=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const i of[...this.getReexports(),...this.getExports()]){const[r]=this.getVariableForExportName(i);r?.included&&s.add(r)}for(let i of s){const r=this.sideEffectDependenciesByVariable.get(i);if(r)for(const a of r)n.add(a);i instanceof Et?i=i.getBaseVariable():i instanceof Qt&&(i=i.getOriginalVariable()),e.add(i.module)}if(this.options.treeshake&&this.info.moduleSideEffects!=="no-treeshake")this.addRelevantSideEffectDependencies(this.relevantDependencies,e,n);else for(const i of this.dependencies)this.relevantDependencies.add(i);for(const i of e)this.relevantDependencies.add(i);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const n of this.getAllExportNames()){let[s]=this.getVariableForExportName(n);if(s instanceof Qt&&(s=s.getOriginalVariable()),!s||!(s.included||s instanceof ei))continue;const i=e.get(s);i?i.push(n):e.set(s,[n])}return this.exportNamesByVariable=e}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const n of this.exportAllModules)if(n instanceof Ze)e.add(`*${n.id}`);else for(const s of[...n.getReexports(),...n.getExports()])s!=="default"&&e.add(s);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],n=[];for(const s of this.exports.keys()){const[i]=this.getVariableForExportName(s);(i?.included?e:n).push(s)}return{removedExports:n,renderedExports:e}}getSyntheticNamespace(){return this.syntheticNamespace===null&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName(typeof this.info.syntheticNamedExports=="string"?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:re((e=this.id,n=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${xe(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(n)}\` needs ${typeof n=="string"&&n!=="default"?`an explicit export named "${n}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var e,n}getVariableForExportName(e,{importerForSideEffects:n,importChain:s=[],isExportAllSearch:i,onlyExplicit:r,searchedNamesAndModules:a}=ft){if(e[0]==="*")return e.length===1?[this.namespace]:this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*",{importChain:[...s,this.id]});const l=this.reexportDescriptions.get(e);if(l){const[u,d]=Tl(l.module,l.localName,n,!1,a,[...s,this.id]);return u?(n&&(Tp(u,n,this),this.info.moduleSideEffects&&bt(n.sideEffectDependenciesByVariable,u,wn).add(this)),[u]):this.error(fr(l.localName,this.id,l.module.id,!!d?.missingButExportExists),l.start)}const c=this.exports.get(e);if(c){if(c===$p)return[this.exportShimVariable];const u=c.localName,d=this.traceVariable(u,{importerForSideEffects:n,searchedNamesAndModules:a});return d?(n&&(Tp(d,n,this),bt(n.sideEffectDependenciesByVariable,d,wn).add(this)),[d]):[null,{missingButExportExists:!0}]}if(r)return[null];if(e!=="default"){const u=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,n,a,[...s,this.id]);if(this.namespaceReexportsByName.set(e,u),u[0])return u}return this.info.syntheticNamedExports?[bt(this.syntheticExports,e,()=>new Et(this.astContext,e,this.getSyntheticNamespace()))]:!i&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return this.info.moduleSideEffects==="no-treeshake"||this.ast.hasCachedEffects()}include(){const e=Ft();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){if(e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces()),this.allExportsIncluded)return;this.allExportsIncluded=!0,this.isExecuted||(Es(this),this.graph.needsTreeshakingPass=!0);const n=Ft();for(const s of this.exports.keys())if(e||s!==this.info.syntheticNamedExports){const i=this.getVariableForExportName(s)[0];if(!i)return re(ig(s,this.id));this.includeVariable(i,ie,n),i.deoptimizePath(ie)}for(const s of this.getReexports()){const[i]=this.getVariableForExportName(s);i&&(i.deoptimizePath(ie),this.includeVariable(i,ie,n),i instanceof ei&&(i.module.reexported=!0))}}includeAllInBundle(){this.ast.include(Ft(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(Es(this),this.graph.needsTreeshakingPass=!0);let n=!1;const s=Ft();for(const i of e){const r=this.getVariableForExportName(i)[0];r&&(r.deoptimizePath(ie),this.includeVariable(r,ie,s)),this.exports.has(i)||this.reexportDescriptions.has(i)||(n=!0)}n&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const n of this.exportAllSources){const s=this.graph.modulesById.get(this.resolvedIds[n].id);s instanceof Ze?e.push(s):this.exportAllModules.push(s)}this.exportAllModules.push(...e)}log(e,n,s){this.addLocationToLogProps(n,s),this.options.onLog(e,n)}render(e){const n=this.magicString.clone();this.ast.render(n,e),n.trim();const{usesTopLevelAwait:s}=this.astContext;return s&&e.format!=="es"&&e.format!=="system"?re((i=this.id,r=e.format,{code:"INVALID_TLA_FORMAT",id:i,message:`Module format "${r}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:n,usesTopLevelAwait:s};var i,r}async setSource({ast:e,code:n,customTransformCache:s,originalCode:i,originalSourcemap:r,resolvedIds:a,sourcemapChain:l,transformDependencies:c,transformFiles:u,safeVariableNames:d,...m}){if(ct("generate ast",3),n.startsWith("#!")){const S=n.indexOf(`
33
- `);this.shebang=n.slice(2,S)}this.info.code=n,this.info.safeVariableNames=d,this.originalCode=i,this.originalSourcemap=Ds(r),this.sourcemapChain=l.map(S=>S.missing?S:Ds(S)),Pl(this.originalSourcemap,this.sourcemapChain),u&&(this.transformFiles=u),this.transformDependencies=c,this.customTransformCache=s,this.updateOptions(m),this.resolvedIds=a??Object.create(null);const f=this.id;this.magicString=new Ws(n,{filename:this.excludeFromSourcemap?null:f,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),addImportSource:this.addImportSource.bind(this),code:n,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:f,getExports:this.getExports.bind(this),getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:S=>_l[S]||_l.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,newlyIncludedVariableInits:this.graph.newlyIncludedVariableInits,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:S=>this.getVariableForExportName(S),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new kp(this.graph.scope,this.astContext),this.namespace=new Yn(this.astContext);const g={context:this.astContext,type:"Module"};if(e)this.ast=new _l[e.type](g,this.scope).parseNode(e),this.info.ast=e;else{at("generate ast",3);const S=await(async function(k,v,I){return Hd(k,v,I)})(n,!1,this.options.jsx!==!1);ct("generate ast",3),this.ast=(E=S,x=g,A=this.scope,G(x,A,0,Gd(E))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(f))return this.graph.astLru.get(f);{const k=this.tryParse();return this.options.cache!==!1?(Object.defineProperty(this.info,"ast",{value:k}),k):(this.graph.astLru.set(f,k),k)}}})}var E,x,A;at("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,Nl),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:n,isExportAllSearch:s,searchedNamesAndModules:i}=ft){const r=this.scope.variables.get(e);if(r)return r;const a=this.importDescriptions.get(e);if(a){const l=a.module;if(l instanceof st&&a.name==="*")return l.namespace;const[c,u]=Tl(l,a.name,n||this,s,i,[this.id]);return c||this.error(fr(a.name,this.id,l.id,!!u?.missingButExportExists),a.start)}return null}updateOptions({meta:e,moduleSideEffects:n,syntheticNamedExports:s}){n!=null&&(this.info.moduleSideEffects=n),s!=null&&(this.info.syntheticNamedExports=s),e!=null&&Object.assign(this.info.meta,e)}addDynamicImport(e){let n=e.sourceAstNode;n.type==="TemplateLiteral"?n.quasis.length===1&&typeof n.quasis[0].value.cooked=="string"&&(n=n.quasis[0].value.cooked):n.type==="Literal"&&typeof n.value=="string"&&(n=n.value),this.dynamicImports.push({argument:n,id:null,node:e,resolution:null})}assertUniqueExportName(e,n){(this.exports.has(e)||this.reexportDescriptions.has(e))&&this.error((function(s){return{code:"DUPLICATE_EXPORT",message:`Duplicate export "${s}"`}})(e),n)}addExport(e){if(e instanceof Kn)this.assertUniqueExportName("default",e.start),this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Cs){const n=e.source.value;if(this.addSource(n,e),e.exported){const s=e.exported instanceof kt?e.exported.value:e.exported.name;this.assertUniqueExportName(s,e.exported.start),this.reexportDescriptions.set(s,{localName:"*",module:null,source:n,start:e.start})}else this.exportAllSources.add(n)}else if(e.source instanceof kt){const n=e.source.value;this.addSource(n,e);for(const{exported:s,local:i,start:r}of e.specifiers){const a=s instanceof kt?s.value:s.name;this.assertUniqueExportName(a,r),this.reexportDescriptions.set(a,{localName:i instanceof kt?i.value:i.name,module:null,source:n,start:r})}}else if(e.declaration){const n=e.declaration;if(n instanceof Pi)for(const s of n.declarations)for(const i of iy(s.id))this.assertUniqueExportName(i,s.id.start),this.exports.set(i,{identifier:null,localName:i});else{const s=n.id.name;this.assertUniqueExportName(s,n.id.start),this.exports.set(s,{identifier:null,localName:s})}}else for(const{local:n,exported:s}of e.specifiers){const i=n.name,r=s instanceof Fe?s.name:s.value;this.assertUniqueExportName(r,s.start),this.exports.set(r,{identifier:null,localName:i})}}addImport(e){const n=e.source.value;this.addSource(n,e);for(const s of e.specifiers){const i=s.local.name;(this.scope.variables.has(i)||this.importDescriptions.has(i))&&this.error(xs(i),s.local.start);const r=s instanceof Ai?"default":s instanceof wi?"*":s.imported instanceof Fe?s.imported.name:s.imported.value;this.importDescriptions.set(i,{module:null,name:r,source:n,start:s.start})}}addImportSource(e){e&&!this.sourcesWithAttributes.has(e)&&this.sourcesWithAttributes.set(e,ft)}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,n){e.id=this.id,e.pos=n;let s=this.info.code;const i=ya(s,n,{offsetLine:1});if(i){let{column:r,line:a}=i;try{({column:r,line:a}=(function(l,c){const u=l.filter(d=>!d.missing);e:for(;u.length>0;){const d=u.pop().mappings[c.line-1];if(d){const m=d.filter(E=>E.length>1),f=m[m.length-1];let g=m[0];for(let E of m){if(E[0]>=c.column||E===f){E=E[0]!==c.column?g:E,c={column:E[3],line:E[2]+1};continue e}g=E}}throw new Error("Can't resolve original location of error.")}return c})(this.sourcemapChain,{column:r,line:a})),s=this.originalCode}catch(l){this.options.onLog(ye,(function(c,u,d,m,f){return{cause:c,code:"SOURCEMAP_ERROR",id:u,loc:{column:d,file:u,line:m},message:`Error when using sourcemap for reporting an error: ${c.message}`,pos:f}})(l,this.id,r,a,n))}dr(e,{column:r,line:a},s,this.id)}}addModulesToImportDescriptions(e){for(const n of e.values()){const{id:s}=this.resolvedIds[n.source];n.module=this.graph.modulesById.get(s)}}addRelevantSideEffectDependencies(e,n,s){const i=new Set,r=a=>{for(const l of a)i.has(l)||(i.add(l),n.has(l)?e.add(l):(l.info.moduleSideEffects||s.has(l))&&(l instanceof Ze||l.hasEffects()?e.add(l):r(l.dependencies)))};r(this.dependencies),r(s)}addSource(e,n){const s=(i=n.attributes,i?.length?Object.fromEntries(i.map(a=>[Cl(a),a.value.value])):ft);var i;const r=this.sourcesWithAttributes.get(e);r?Ao(r,s)&&this.log(ye,pr(r,s,e,this.id),n.start):this.sourcesWithAttributes.set(e,s)}getImportedJsxFactoryVariable(e,n,s){const{id:i}=this.resolvedIds[s],r=this.graph.modulesById.get(i),[a]=r.getVariableForExportName(e,{importChain:[this.id]});return a||this.error((l=e,c=i,u=this.id,{code:"MISSING_JSX_EXPORT",exporter:c,id:u,message:`Export "${l}" is not defined in module "${xe(c)}" even though it is needed in "${xe(u)}" to provide JSX syntax. Please check your "jsx" option.`,names:[l],url:ot(hr)}),n);var l,c,u}getVariableFromNamespaceReexports(e,n,s,i){let r=null;const a=new Map,l=new Set;for(const m of this.exportAllModules){if(m.info.syntheticNamedExports===e)continue;const[f,g]=Tl(m,e,n,!0,$y(s),i);m instanceof Ze||g?.indirectExternal?l.add(f):f instanceof Et?r||(r=f):f&&a.set(f,m)}if(a.size>0){const m=[...a],f=m[0][0];return m.length===1?[f]:(this.options.onLog(ye,(c=e,u=this.id,d=m.map(([,g])=>g.id),{binding:c,code:"NAMESPACE_CONFLICT",ids:d,message:`Conflicting namespaces: "${xe(u)}" re-exports "${c}" from one of the modules ${un(d.map(g=>xe(g)))} (will be ignored).`,reexporter:u})),[null])}var c,u,d;if(l.size>0){const m=[...l],f=m[0];return m.length>1&&this.options.onLog(ye,(function(g,E,x,A){return{binding:g,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:A,message:`Ambiguous external namespace resolution: "${xe(E)}" re-exports "${g}" from one of the external modules ${un(A.map(S=>xe(S)))}, guessing "${xe(x)}".`,reexporter:E}})(e,this.id,f.module.id,m.map(g=>g.module.id))),[f,{indirectExternal:!0}]}return r?[r]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,n=new Set;for(const s of[this,...this.exportAllModules])if(s instanceof Ze){const[i]=s.getVariableForExportName("*",{importChain:[this.id]});i.includePath(ie,Ft()),this.includedImports.add(i),e.add(i)}else if(s.info.syntheticNamedExports){const i=s.getSyntheticNamespace();i.includePath(ie,Ft()),this.includedImports.add(i),n.add(i)}return[...n,...e]}includeDynamicImport(e){const n=this.dynamicImports.find(s=>s.node===e).resolution;if(n instanceof st){n.includedDynamicImporters.includes(this)||(n.includedDynamicImporters.push(this),this.astContext.usesTopLevelAwait&&n.includedTopLevelAwaitingDynamicImporters.add(this));const s=this.options.treeshake?e.getDeterministicImportedNames():void 0;s?n.includeExportsByNames(s):n.includeAllExports(!0)}}includeVariable(e,n,s){const{included:i,module:r}=e;if(e.includePath(n,s),i)r instanceof st&&r!==this&&Cp(e,this);else if(this.graph.needsTreeshakingPass=!0,r instanceof st&&(r.isExecuted||Es(r),r!==this)){const a=Cp(e,this);for(const l of a)l.isExecuted||Es(l)}}includeVariableInModule(e,n,s){this.includeVariable(e,n,s);const i=e.module;i&&i!==this&&this.includedImports.add(e)}shimMissingExport(e){var n,s;this.options.onLog(ye,(n=this.id,{binding:s=e,code:"SHIMMED_EXPORT",exporter:n,message:`Missing export "${s}" has been shimmed in module "${xe(n)}".`})),this.exports.set(e,$p)}tryParse(){try{return $l(this.info.code,{jsx:this.options.jsx!==!1})}catch(e){return this.error(wa(e,this.id),e.pos)}}}function Tp(t,e,n){if(t.module instanceof st&&t.module!==n){const s=t.module.cycles;if(s.size>0){const i=n.cycles;for(const r of i)if(s.has(r)){e.alternativeReexportModules.set(t,n);break}}}}const $y=t=>t&&new Map(Array.from(t,([e,n])=>[e,new Set(n)])),Rp=(t,e)=>e?`${t}
34
- ${e}`:t,Dp=(t,e)=>e?`${t}
35
-
36
- ${e}`:t,Cy={amd:wo,cjs:wo,es:Op,iife:wo,system:Op,umd:wo};function Ty(t,e,n,s,i,r,a,l,c,u,d,m,f,g){const E=[...t].reverse();for(const x of E)x.scope.addUsedOutsideNames(s,f);(function(x,A,S){for(const k of A){k.info.safeVariableNames||={};for(const v of k.scope.variables.values())if(v.included&&!(v.renderBaseName||v instanceof Qt&&v.getOriginalVariable()!==v)){const I=Object.getOwnPropertyDescriptor(k.info.safeVariableNames,v.name)?.value;if(I&&!x.has(I)){x.add(I),v.setRenderNames(null,I);continue}v.setRenderNames(null,Yt(v.name,x,v.forbiddenNames)),k.info.safeVariableNames[v.name]=v.renderName}if(S.has(k)){const v=k.namespace;v.setRenderNames(null,Yt(v.name,x,v.forbiddenNames))}}})(s,E,g),Cy[i](s,n,e,r,a,l,c,u,d);for(const x of E)x.scope.deconflict(i,m,f)}function Op(t,e,n,s,i,r,a,l,c){for(const u of n.dependencies)(i||u instanceof Qn)&&(u.variableName=Yt(u.suggestedVariableName,t,null));for(const u of e){const d=u.module,m=u.name;u.isNamespace&&(i||d instanceof Ze)?u.setRenderNames(null,(d instanceof Ze?l.get(d):a.get(d)).variableName):d instanceof Ze&&m==="default"?u.setRenderNames(null,Yt([...d.exportedVariables].some(([f,g])=>g==="*"&&f.included)?d.suggestedVariableName+"__default":d.suggestedVariableName,t,u.forbiddenNames)):u.setRenderNames(null,Yt(yr(m),t,u.forbiddenNames))}for(const u of c)u.setRenderNames(null,Yt(u.name,t,u.forbiddenNames))}function wo(t,e,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,a,l,c,u){for(const d of i)d.variableName=Yt(d.suggestedVariableName,t,null);for(const d of s)d.namespaceVariableName=Yt(`${d.suggestedVariableName}__namespace`,t,null);for(const d of n)d.defaultVariableName=s.has(d)&&Rg(r(d.id),l)?d.namespaceVariableName:Yt(`${d.suggestedVariableName}__default`,t,null);for(const d of e){const m=d.module;if(m instanceof Ze){const f=u.get(m),g=d.name;if(g==="default"){const E=r(m.id),x=Dr[E]?f.defaultVariableName:f.variableName;Or(E,l)?d.setRenderNames(x,"default"):d.setRenderNames(null,x)}else g==="*"?d.setRenderNames(null,hi[r(m.id)]?f.namespaceVariableName:f.variableName):d.setRenderNames(f.variableName,null)}else{const f=c.get(m);a&&d.isNamespace?d.setRenderNames(null,f.exportMode==="default"?f.namespaceVariableName:f.variableName):f.exportMode==="default"?d.setRenderNames(null,f.variableName):d.setRenderNames(f.variableName,f.getVariableExportName(d))}}}function Ry(t,{exports:e,name:n,format:s},i,r){const a=t.getExportNames();if(e==="default"){if(a.length!==1||a[0]!=="default")return re(Dh("default",a,i))}else if(e==="none"&&a.length>0)return re(Dh("none",a,i));return e==="auto"&&(a.length===0?e="none":a.length===1&&a[0]==="default"?e="default":(s!=="es"&&s!=="system"&&a.includes("default")&&r(ye,(function(l,c){return{code:"MIXED_EXPORTS",id:l,message:`Entry module "${xe(l)}" is using named and default exports together. Consumers of your bundle will have to use \`${c||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:ot(ka)}})(i,n)),e="named")),e}function Dy(t){const e=t.split(`
37
- `),n=e.filter(r=>/^\t+/.test(r)),s=e.filter(r=>/^ {2,}/.test(r));if(n.length===0&&s.length===0)return null;if(n.length>=s.length)return" ";const i=s.reduce((r,a)=>{const l=/^ +/.exec(a)[0].length;return Math.min(l,r)},1/0);return" ".repeat(i)}function Lp(t,e,n,s,i,r){const a=t.getDependenciesToBeIncluded();for(const l of a){if(l instanceof Ze){e.push(r.get(l));continue}const c=i.get(l);c===s?n.has(l)||(n.add(l),Lp(l,e,n,s,i,r)):e.push(c)}}const Rl="!~{",Dl="}~",Ol=new RegExp(`${Rl}[0-9a-zA-Z_$]{1,16}${Dl}`,"g"),ts=(t,e)=>t.replace(Ol,n=>e.get(n)||n),Oy=(t,e,n)=>t.replace(Ol,s=>s===e?n:s),So=Symbol("bundleKeys"),Ll={type:"placeholder"};function Ml(t,e,n){return ur(t)?re(It(`Invalid pattern "${t}" for "${e}", 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.`)):t.replace(/\[(\w+)(:\d+)?]/g,(s,i,r)=>{if(!n.hasOwnProperty(i)||r&&i!=="hash")return re(It(`"[${i}${r||""}]" is not a valid placeholder in the "${e}" pattern.`));const a=n[i](r&&Number.parseInt(r.slice(1)));return ur(a)?re(It(`Invalid substitution "${a}" for placeholder "[${i}]" in "${e}" pattern, can be neither absolute nor relative path.`)):a})}function Fl(t,{[So]:e}){if(!e.has(t.toLowerCase()))return t;const n=En(t);t=t.slice(0,Math.max(0,t.length-n.length));let s,i=1;for(;e.has((s=t+ ++i+n).toLowerCase()););return s}const Ly=["Object","Promise","module","exports","require","__filename","__dirname",...Wa],My=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Fy(t,e,n,s){return(typeof e=="function"?e(t.id):e[t.id])||(n?(s(ye,(r=t.id,a=t.variableName,{code:"MISSING_GLOBAL_NAME",id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${a}".`,names:[a],url:ot("configuration-options/#output-globals")})),t.variableName):void 0);var r,a}class bn{constructor(e,n,s,i,r,a,l,c,u,d,m,f,g,E,x){this.orderedModules=e,this.inputOptions=n,this.outputOptions=s,this.unsetOptions=i,this.pluginDriver=r,this.modulesById=a,this.chunkByModule=l,this.externalChunkByModule=c,this.facadeChunkByModule=u,this.includedNamespaces=d,this.manualChunkAlias=m,this.getPlaceholder=f,this.bundle=g,this.inputBase=E,this.snippets=x,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 A=new Set(e);for(const S of e){l.set(S,this),S.namespace.included&&!s.preserveModules&&d.add(S),this.isEmpty&&S.isIncluded()&&(this.isEmpty=!1),(S.info.isEntry||s.preserveModules)&&this.entryModules.push(S);for(const k of S.includedDynamicImporters)A.has(k)||(this.dynamicEntryModules.push(S),S.info.syntheticNamedExports&&(d.add(S),this.exports.add(S.namespace)));S.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(S)}this.suggestedVariableName=yr(this.generateVariableName()),this.isManualChunk=m!==null}static generateFacade(e,n,s,i,r,a,l,c,u,d,m,f,g,E,x){const A=new bn([],e,n,s,i,r,a,l,c,u,null,f,g,E,x);A.assignFacadeName(m,d),c.has(d)||c.set(d,A);for(const S of d.getDependenciesToBeIncluded())A.dependencies.add(S instanceof st?a.get(S):l.get(S));return!A.dependencies.has(a.get(d))&&d.info.moduleSideEffects&&d.hasEffects()&&A.dependencies.add(a.get(d)),A.ensureReexportsAreAvailableForModule(d),A.facadeModule=d,A.strictFacade=!0,A}canModuleBeFacade(e,n){const s=e.getExportNamesByVariable();for(const i of this.exports)if(!s.has(i))return!1;for(const i of n)if(!(i.module===e||s.has(i)||i instanceof Et&&s.has(i.getBaseVariable())))return!1;return!0}finalizeChunk(e,n,s,i){const r=this.getRenderedChunkInfo(),a=u=>ts(u,i),l=r.fileName,c=this.fileName=a(l);return{...r,code:e,dynamicImports:r.dynamicImports.map(a),fileName:c,implicitlyLoadedBefore:r.implicitlyLoadedBefore.map(a),importedBindings:Object.fromEntries(Object.entries(r.importedBindings).map(([u,d])=>[a(u),d])),imports:r.imports.map(a),map:n,preliminaryFileName:l,referencedFiles:r.referencedFiles.map(a),sourcemapFileName:s}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(this.facadeModule!==null&&(this.facadeModule.preserveSignature!==!1||this.strictFacade)){const n=this.facadeModule.getExportNamesByVariable();for(const[s,i]of n){this.exportNamesByVariable.set(s,[...i]);for(const r of i)this.exportsByName.set(r,s);e.delete(s)}}for(const n of this.allowExtensionModules){const s=n.getExportNamesByVariable();for(const[i,r]of s){this.exportNamesByVariable.set(i,[...r]);for(const a of r)this.exportsByName.set(a,i);e.delete(i)}}this.outputOptions.minifyInternalExports?(function(n,s,i){let r=0;for(const a of n){let[l]=a.name;if(s.has(l))do l=vr(++r),l.charCodeAt(0)===49&&(r+=9*64**(l.length-1),l=vr(r));while(gr.has(l)||s.has(l));s.set(l,a),i.set(a,[l])}})(e,this.exportsByName,this.exportNamesByVariable):(function(n,s,i){for(const r of n){let a=0,l=r.name;for(;s.has(l);)l=r.name+"$"+ ++a;s.set(l,r),i.set(r,[l])}})(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Ry(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],n=new Set([...this.entryModules,...this.implicitEntryModules]),s=new Set(this.dynamicEntryModules.map(({namespace:i})=>i));for(const i of n){if(i.preserveSignature==="allow-extension"&&this.canPreserveModuleExports(i)&&!i.chunkFileNames.size&&i.chunkNames.every(({isUserDefined:a})=>!a)){this.allowExtensionModules.add(i),this.facadeModule||(this.facadeModule=i,this.strictFacade=!1,this.assignFacadeName({},i,this.outputOptions.preserveModules)),this.facadeChunkByModule.set(i,this);continue}const r=Array.from(new Set(i.chunkNames.filter(({isUserDefined:a})=>a).map(({name:a})=>a)),a=>({name:a}));if(r.length===0&&i.isUserDefinedEntryPoint&&r.push({}),r.push(...Array.from(i.chunkFileNames,a=>({fileName:a}))),r.length===0&&r.push({}),!this.facadeModule){const a=!this.outputOptions.preserveModules&&(i.preserveSignature==="strict"||i.preserveSignature==="exports-only"&&i.getExportNamesByVariable().size>0);a&&!this.canModuleBeFacade(i,s)||(this.facadeModule=i,this.facadeChunkByModule.set(i,this),i.preserveSignature&&(this.strictFacade=a),this.assignFacadeName(r.shift(),i,this.outputOptions.preserveModules))}for(const a of r)e.push(bn.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,i,a,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const i of this.dynamicEntryModules)i.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(i,s)?(this.facadeModule=i,this.facadeChunkByModule.set(i,this),this.strictFacade=!0,this.dynamicName=Bl(i)):this.facadeModule===i&&!this.strictFacade&&this.canModuleBeFacade(i,s)?this.strictFacade=!0:this.facadeChunkByModule.get(i)?.strictFacade||(this.includedNamespaces.add(i),this.exports.add(i.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}canPreserveModuleExports(e){const n=e.getExportNamesByVariable();for(const[s,i]of n)for(const r of i){const a=this.exportsByName.get(r);if(a&&a!==s)return!1}for(const[s,i]of n)for(const r of i)this.exportsByName.set(r,s);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 _n(hh(e,this.getFileName(),this.outputOptions.format==="amd"&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let e,n=null;const{chunkFileNames:s,entryFileNames:i,file:r,format:a,preserveModules:l}=this.outputOptions;if(r)e=Gt(r);else if(this.fileName===null){const[c,u]=l||this.facadeModule?.isUserDefinedEntryPoint?[i,"output.entryFileNames"]:[s,"output.chunkFileNames"];e=Ml(typeof c=="function"?c(this.getPreRenderedChunkInfo()):c,u,{format:()=>a,hash:d=>n||(n=this.getPlaceholder(u,d||8)),name:()=>this.getChunkName()}),n||(e=Fl(e,this.bundle))}else e=this.fileName;return n||(this.bundle[e]=Ll),this.preliminaryFileName={fileName:e,hashPlaceholder:n}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;let e=null,n=null;const{sourcemapFileNames:s,format:i}=this.outputOptions;if(!s)return null;{const[r,a]=[s,"output.sourcemapFileNames"];e=Ml(typeof r=="function"?r(this.getPreRenderedChunkInfo()):r,a,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>i,hash:l=>n||(n=this.getPlaceholder(a,l||8)),name:()=>this.getChunkName()}),n||(e=Fl(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:n}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Io),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Io),importedBindings:By(this.getRenderedDependencies(),Io),imports:Array.from(this.dependencies,Io),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof Yn?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=(function(e,n,s,i){const r=[],a=new Set;for(let c=n.length-1;c>=0;c--){const u=n[c];if(!a.has(u)){const d=[];Lp(u,d,a,e,s,i),r.unshift(d)}}const l=new Set;for(const c of r)for(const u of c)l.add(u);return l})(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const e of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(e),this.setUpChunkImportsAndExportsForModule(e)}inlineTransitiveImports(){const{facadeModule:e,dependencies:n,outputOptions:s}=this,{hoistTransitiveImports:i,preserveModules:r}=s;if(i&&!r&&e!==null)for(const a of n)a instanceof bn&&this.inlineChunkDependencies(a)}async render(){const{exportMode:e,facadeModule:n,inputOptions:{onLog:s},outputOptions:i,pluginDriver:r,snippets:a}=this,{format:l,preserveModules:c}=i,u=this.getPreliminaryFileName(),d=this.getPreliminarySourcemapFileName(),{accessedGlobals:m,indent:f,magicString:g,renderedSource:E,usedModules:x,usesTopLevelAwait:A}=this.renderModules(u.fileName),S=[...this.getRenderedDependencies().values()],k=e==="none"?[]:this.getChunkExportDeclarations(l);let v=k.length>0,I=!1;for(const B of S){const{reexports:$}=B;$?.length&&(v=!0,!I&&$.some(T=>T.reexported==="default")&&(I=!0),l==="es"&&(B.reexports=$.filter(({reexported:T})=>!k.find(({exported:j})=>j===T))))}if(!I){for(const{exported:B}of k)if(B==="default"){I=!0;break}}const{intro:P,outro:F,banner:N,footer:R}=await(async function(B,$,T){try{let[le,ue,U,K]=await Promise.all([$.hookReduceValue("banner",B.banner(T),[T],Rp),$.hookReduceValue("footer",B.footer(T),[T],Rp),$.hookReduceValue("intro",B.intro(T),[T],Dp),$.hookReduceValue("outro",B.outro(T),[T],Dp)]);return U&&(U+=`
38
-
39
- `),K&&(K=`
40
-
41
- ${K}`),le&&(le+=`
42
- `),ue&&(ue=`
43
- `+ue),{banner:le,footer:ue,intro:U,outro:K}}catch(le){return re((j=le.message,{code:"ADDON_ERROR",message:`Could not retrieve "${le.hook}". Check configuration of plugin "${le.plugin}".
44
- Error Message: ${j}`}))}var j})(i,r,this.getRenderedChunkInfo());if(Yg[l](E,{accessedGlobals:m,dependencies:S,exports:k,hasDefaultExport:I,hasExports:v,id:u.fileName,indent:f,intro:P,isEntryFacade:c||n!==null&&n.info.isEntry,isModuleFacade:n!==null,log:s,namedExportsMode:e!=="default",outro:F,snippets:a,usesTopLevelAwait:A},i),N&&g.prepend(N),l==="es"||l==="cjs"){const B=n!==null&&n.info.isEntry&&n.shebang;B&&g.prepend(`#!${B}
45
- `)}return R&&g.append(R),{chunk:this,magicString:g,preliminaryFileName:u,preliminarySourcemapFileName:d,usedModules:x}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:n,implicitlyLoadedBefore:s}=this;for(const i of e.implicitlyLoadedBefore){const r=n.get(i);r&&r!==this&&s.add(r)}}addNecessaryImportsForFacades(){for(const[e,n]of this.includedReexportsByModule)if(this.includedNamespaces.has(e))for(const s of n)this.imports.add(s)}assignFacadeName({fileName:e,name:n},s,i){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(n||(i?this.getPreserveModulesChunkNameFromModule(s):Bl(s)))}checkCircularDependencyImport(e,n){const s=e.module;if(s instanceof st){const i=this.chunkByModule.get(s);let r;do r=n.alternativeReexportModules.get(e),r&&(this.chunkByModule.get(r)!==i&&this.inputOptions.onLog(ye,eg(s.getExportNamesByVariable().get(e)?.[0]||"*",s.id,r.id,n.id,this.outputOptions.preserveModules)),n=r);while(r)}}ensureReexportsAreAvailableForModule(e){const n=[],s=e.getExportNamesByVariable();for(const i of s.keys()){const r=i instanceof Et,a=r?i.getBaseVariable():i;if(this.checkCircularDependencyImport(a,e),!(a instanceof Yn&&this.outputOptions.preserveModules)){const l=a.module;if(l instanceof st){const c=this.chunkByModule.get(l);c&&c!==this&&(c.exports.add(a),n.push(a),r&&this.imports.add(a))}}}n.length>0&&this.includedReexportsByModule.set(e,n)}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?Bl(e):"chunk"}getChunkExportDeclarations(e){const n=[];for(const s of this.getExportNames()){if(s[0]==="*")continue;const i=this.exportsByName.get(s);if(!(i instanceof Et)){const c=i.module;if(c){const u=this.chunkByModule.get(c);if(u!==this){if(!u||e!=="es")continue;const d=this.renderedDependencies.get(u);if(!d)continue;const{imports:m,reexports:f}=d,g=f?.find(({reexported:x})=>x===s);if(!m?.find(({imported:x})=>x===g?.imported))continue}}}let r=null,a=!1,l=i.getName(this.snippets.getPropertyAccess);if(i instanceof Ot){for(const c of i.declarations)if(c.parent instanceof _s||c instanceof Kn&&c.declaration instanceof _s){a=!0;break}}else i instanceof Et&&(r=l,e==="es"&&(l=i.renderName));n.push({exported:s,expression:r,hoisted:a,local:l})}return n}getDependenciesToBeDeconflicted(e,n,s){const i=new Set,r=new Set,a=new Set;for(const l of[...this.exportNamesByVariable.keys(),...this.imports])if(e||l.isNamespace){const c=l.module;if(c instanceof Ze){const u=this.externalChunkByModule.get(c);i.add(u),e&&(l.name==="default"?Dr[s(c.id)]&&r.add(u):l.isNamespace&&hi[s(c.id)]&&(this.imports.has(l)||!this.exportNamesByVariable.get(l)?.every(d=>d[0]==="*"))&&a.add(u))}else{const u=this.chunkByModule.get(c);u!==this&&(i.add(u),e&&u.exportMode==="default"&&l.isNamespace&&a.add(u))}}if(n)for(const l of this.dependencies)i.add(l);return{deconflictedDefault:r,deconflictedNamespace:a,dependencies:i}}getDynamicDependencies(){return this.getIncludedDynamicImports().map(e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution).filter(e=>e!==this&&(e instanceof bn||e instanceof Qn))}getDynamicImportStringAndAttributes(e,n,s){const{externalImportAttributes:i}=this.outputOptions,r=["es","cjs"].includes(this.outputOptions.format)&&i;if(e instanceof Ze){const l=this.externalChunkByModule.get(e),c=l.getImportAttributes(this.snippets);return[`'${l.getImportPath(n)}'`,c||!!r||null]}let a=null;if(r){const l=vp(s);a=l===ft||vd(l,this.snippets)}return[e||"",a]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?xa(this.fileName):xa(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,n=new Map;for(const s of this.imports){const i=s.module;let r,a;if(i instanceof Ze){if(r=this.externalChunkByModule.get(i),a=s.name,a!=="default"&&a!=="*"&&e(i.id)==="defaultOnly")return re(Fh(i.id,a,!1))}else r=this.chunkByModule.get(i),a=r.getVariableExportName(s);bt(n,r,aa).push({imported:a,local:s.getName(this.snippets.getPropertyAccess)})}return n}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const n of this.orderedModules)for(const{node:s,resolution:i}of n.dynamicImports)s.included&&e.push(i instanceof st?{chunk:this.chunkByModule.get(i),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(i),node:s,resolution:i}:i instanceof Ze?{chunk:null,externalChunk:this.externalChunkByModule.get(i),facadeChunk:null,node:s,resolution:i}:{chunk:null,externalChunk:null,facadeChunk:null,node:s,resolution:i});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:n,implicitEntryModules:s,orderedModules:i}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:n&&n.id,isDynamicEntry:e.length>0,isEntry:!!n?.info.isEntry,isImplicitEntry:s.length>0,moduleIds:i.map(({id:r})=>r),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const n=Mp(e);if(n)return n;const{preserveModulesRoot:s,sanitizeFileName:i}=this.outputOptions,r=i(ln(e.id.split(jy,1)[0])),a=En(r),l=My.has(a)?r.slice(0,-a.length):r;return Wt(l)?s&&St(l).startsWith(s)?l.slice(s.length).replace(/^[/\\]/,""):this.inputBase==="/"&&l[0]!=="/"?Dn(this.inputBase,l.replace(/^[a-zA-Z]:[/\\]/,"/")):Dn(this.inputBase,l):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+Gt(l)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:n}=this.outputOptions,s=new Map;for(let i of this.getExportNames()){let r,a,l=!1;if(i[0]==="*"){const c=i.slice(1);n(c)==="defaultOnly"&&this.inputOptions.onLog(ye,ag(c)),l=e,r=this.externalChunkByModule.get(this.modulesById.get(c)),a=i="*"}else{const c=this.exportsByName.get(i);if(c instanceof Et)continue;const u=c.module;if(u instanceof st){if(r=this.chunkByModule.get(u),r===this)continue;a=r.getVariableExportName(c),l=c.isReassigned}else{if(r=this.externalChunkByModule.get(u),a=c.name,a!=="default"&&a!=="*"&&n(u.id)==="defaultOnly")return re(Fh(u.id,a,!0));l=e&&(a!=="default"||Or(n(u.id),!0))}}bt(s,r,aa).push({imported:a,needsLiveBinding:l,reexported:i})}return s}getReferencedFiles(){const e=new Set;for(const n of this.orderedModules)for(const s of n.importMetas){const i=s.getReferencedFileName(this.pluginDriver);i&&e.add(i)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),n=this.getReexportSpecifiers(),s=new Map,i=this.getFileName();for(const r of this.dependencies){const a=e.get(r)||null,l=n.get(r)||null,c=r instanceof Qn||r.exportMode!=="default",u=r.getImportPath(i);s.set(r,{attributes:r instanceof Qn?r.getImportAttributes(this.snippets):null,defaultVariableName:r.defaultVariableName,globalName:r instanceof Qn&&(this.outputOptions.format==="umd"||this.outputOptions.format==="iife")&&Fy(r,this.outputOptions.globals,(a||l)!==null,this.inputOptions.onLog),importPath:u,imports:a,isChunk:r instanceof bn,name:r.variableName,namedExportsMode:c,namespaceVariableName:r.namespaceVariableName,reexports:l})}return this.renderedDependencies=s}inlineChunkDependencies(e){for(const n of e.dependencies)this.dependencies.has(n)||(this.dependencies.add(n),n instanceof bn&&this.inlineChunkDependencies(n))}renderModules(e){const{accessedGlobalsByScope:n,dependencies:s,exportNamesByVariable:i,includedNamespaces:r,inputOptions:{onLog:a},isEmpty:l,orderedModules:c,outputOptions:u,pluginDriver:d,renderedModules:m,snippets:f}=this,{compact:g,format:E,freeze:x,generatedCode:{symbols:A},importAttributesKey:S}=u,{_:k,cnst:v,n:I}=f;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const P=new Rm({separator:`${I}${I}`}),F=(function(U,K){if(K.indent!==!0)return K.indent;for(const X of U){const Y=Dy(X.originalCode);if(Y!==null)return Y}return" "})(c,u),N=[];let R="";const B=new Set,$=new Map,T={accessedDocumentCurrentScript:!1,exportNamesByVariable:i,format:E,freeze:x,importAttributesKey:S,indent:F,pluginDriver:d,snippets:f,symbols:A,useOriginalName:null};let j=!1;for(const U of c){let K,X=0;if(U.isIncluded()||r.has(U)){const C=U.render(T);!T.accessedDocumentCurrentScript&&wd.includes(E)&&this.accessedGlobalsByScope.get(U.scope)?.delete(mn),T.accessedDocumentCurrentScript=!1,{source:K}=C,j||=C.usesTopLevelAwait,X=K.length(),X&&(g&&K.lastLine().includes("//")&&K.append(`
46
- `),$.set(U,K),P.addSource(K),N.push(U));const fe=U.namespace;if(r.has(U)){const be=fe.renderBlock(T);fe.renderFirst()?R+=I+be:P.addSource(new Ws(be))}const ne=n.get(U.scope);if(ne)for(const be of ne)B.add(be)}const{renderedExports:Y,removedExports:de}=U.getRenderedExports();m[U.id]={get code(){return K?.toString()??null},originalLength:U.originalCode.length,removedExports:de,renderedExports:Y,renderedLength:X}}R&&P.prepend(R+I+I),this.needsExportsShim&&P.prepend(`${I}${v} ${Ps}${k}=${k}void 0;${I}${I}`);const le=g?P:P.trim();var ue;return l&&this.getExportNames().length===0&&s.size===0&&a(ye,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${ue=this.getChunkName()}".`,names:[ue]}),{accessedGlobals:B,indent:F,magicString:P,renderedSource:le,usedModules:N,usesTopLevelAwait:j}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:n,outputOptions:s,pluginDriver:i,snippets:r}=this;for(const a of this.getIncludedDynamicImports())if(a.chunk){const{chunk:l,facadeChunk:c,node:u,resolution:d}=a;l===this?u.setInternalResolution(d.namespace):u.setExternalResolution((c||l).exportMode,d,s,r,i,n,`'${(c||l).getImportPath(e)}'`,!c?.strictFacade&&l.exportNamesByVariable.get(d.namespace)[0],null,this,c||l)}else{const{node:l,resolution:c}=a,[u,d]=this.getDynamicImportStringAndAttributes(c,e,l);l.setExternalResolution("external",c,s,r,i,n,u,!1,d,this,null)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:n},interop:s,preserveModules:i,externalLiveBindings:r}=this.outputOptions,a=new Set;for(const c of this.getExportNames()){const u=this.exportsByName.get(c);e!=="es"&&e!=="system"&&u.isReassigned&&!u.isId?u.setRenderNames("exports",c):u instanceof Et?a.add(u):u.setRenderNames(null,null)}for(const c of this.orderedModules)if(c.needsExportShim){this.needsExportsShim=!0;break}const l=new Set(Ly);this.needsExportsShim&&l.add(Ps),n&&l.add("Symbol"),Ty(this.orderedModules,this.getDependenciesToBeDeconflicted(e!=="es"&&e!=="system",e==="amd"||e==="umd"||e==="iife",s),this.imports,l,e,s,i,r,this.chunkByModule,this.externalChunkByModule,a,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:n,includedNamespaces:s,orderedModules:i,outputOptions:{format:r}}=this;for(const a of i){for(const l of a.importMetas)l.setResolution(r,n,e);s.has(a)&&a.namespace.prepare(n)}}setUpChunkImportsAndExportsForModule(e){const n=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const s=e.namespace.getMemberVariables();for(const i of Object.values(s))i.included&&n.add(i)}for(let s of n){s instanceof Qt&&(s=s.getOriginalVariable()),s instanceof Et&&(s=s.getBaseVariable());const i=this.chunkByModule.get(s.module);i!==this&&(this.imports.add(s),s.module instanceof st&&(this.checkCircularDependencyImport(s,e),s instanceof Yn&&this.outputOptions.preserveModules||i.exports.add(s)))}(this.includedNamespaces.has(e)||e.info.isEntry&&e.preserveSignature!==!1||e.includedDynamicImporters.some(s=>this.chunkByModule.get(s)!==this))&&this.ensureReexportsAreAvailableForModule(e);for(const{node:s,resolution:i}of e.dynamicImports)s.included&&i instanceof st&&this.chunkByModule.get(i)===this&&!this.includedNamespaces.has(i)&&(this.includedNamespaces.add(i),this.ensureReexportsAreAvailableForModule(i))}}function Bl(t){return Mp(t)??xa(t.id)}function Mp(t){return t.chunkNames.find(({isUserDefined:e})=>e)?.name??t.chunkNames[0]?.name}function By(t,e){const n={};for(const[s,i]of t){const r=new Set;if(i.imports)for(const{imported:a}of i.imports)r.add(a);if(i.reexports)for(const{imported:a}of i.reexports)r.add(a);n[e(s)]=[...r]}return n}const jy=/[#?]/,Io=t=>t.getFileName();function*Fp(t){for(const e of t)yield*e}function zy(t,e,n,s,i,r){const{chunkDefinitions:a,modulesInManualChunks:l}=(function(I,P,F){const N=new Set(I.keys()),R=Object.create(null);for(const[j,le]of I)P&&F?(R[le]||=[]).push(j):Vy(j,R[le]||=[],N);const B=Object.entries(R),$=new Array(B.length);let T=0;for(const[j,le]of B)$[T++]={alias:j,modules:le};return{chunkDefinitions:$,modulesInManualChunks:N}})(e,i,r),{allEntries:c,dependentEntriesByModule:u,dynamicallyDependentEntriesByDynamicEntry:d,dynamicImportsByEntry:m,dynamicallyDependentEntriesByAwaitedDynamicEntry:f,awaitedDynamicImportsByEntry:g}=(function(I){const P=new Set,F=new Set,N=new Map,R=new Set(I),B=new Array(R.size),$=new Array(R.size);let T=0;for(const X of R){const Y=new Set,de=new Set;B[T]=Y,$[T]=de;const C=new Set([X]);for(const fe of C){bt(N,fe,wn).add(T);for(const ne of fe.getDependenciesToBeIncluded())ne instanceof Ze||C.add(ne);for(const{resolution:ne}of fe.dynamicImports)if(ne instanceof st&&ne.includedDynamicImporters.length>0&&!R.has(ne)){P.add(ne),R.add(ne),Y.add(ne);for(const be of ne.includedTopLevelAwaitingDynamicImporters)if(C.has(be)){F.add(ne),de.add(ne);break}}for(const ne of fe.implicitlyLoadedBefore)R.has(ne)||(P.add(ne),R.add(ne))}T++}const j=[...R],{awaitedDynamicEntries:le,awaitedDynamicImportsByEntry:ue,dynamicEntries:U,dynamicImportsByEntry:K}=(function(X,Y,de,C,fe){const ne=new Map,be=new Set,M=new Set;for(const[D,H]of X.entries())ne.set(H,D),Y.has(H)&&be.add(D),C.has(H)&&M.add(D);const b=Bp(de,ne),O=Bp(fe,ne);return{awaitedDynamicEntries:M,awaitedDynamicImportsByEntry:O,dynamicEntries:be,dynamicImportsByEntry:b}})(j,P,B,F,$);return{allEntries:j,awaitedDynamicImportsByEntry:ue,dependentEntriesByModule:N,dynamicallyDependentEntriesByAwaitedDynamicEntry:jp(N,le,j,X=>X.includedTopLevelAwaitingDynamicImporters),dynamicallyDependentEntriesByDynamicEntry:jp(N,U,j,X=>X.includedDynamicImporters),dynamicImportsByEntry:K}})(t),E=(function(I){const P=Object.create(null);for(const{dependentEntries:F,modules:N}of I){let R=0n;for(const B of F)R|=1n<<BigInt(B);(P[String(R)]||={dependentEntries:new Set(F),modules:[]}).modules.push(...N)}return Object.values(P)})((function*(I,P,F){for(const[N,R]of I)if(!P.has(N)){if(N.cycles.size>0&&N.includedTopLevelAwaitingDynamicImporters.size>0){F.push({alias:null,modules:[N]});continue}yield{dependentEntries:R,modules:[N]}}})(u,l,a)),x=(function(I,P){const F=I.map(()=>0n);let N=1n;for(const{dependentEntries:R}of P){for(const B of R)F[B]|=N;N<<=1n}return F})(c,E),A=zp(x,d,m,c);(function(I,P,F){let N=1n;for(const{dependentEntries:R}of I){for(const B of R)(P[B]&N)===N&&(F[B]&N)===0n&&R.delete(B);N<<=1n}})(E,A,zp(x,f,g,c));const{chunks:S,sideEffectAtoms:k,sizeByAtom:v}=(function(I,P,F,N){const R=Object.create(null),B=new Map,$=new Array(I.length);let T=0n,j=1n,le=0;for(const{dependentEntries:U,modules:K}of I){let X=0n,Y=-1n;for(const ne of U)X|=1n<<BigInt(ne),Y&=P[ne]|F[ne];const de=R[String(X)]||={containedAtoms:0n,correlatedAtoms:Y,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(U),modules:[],pure:!0,size:0};let C=0,fe=!0;for(const ne of K)B.set(ne,de),ne.isIncluded()&&(fe&&=!ne.hasEffects(),C+=N>1?ne.estimateSize():1);fe||(T|=j),$[le++]=C,de.containedAtoms|=j,de.modules.push(...K),de.pure&&=fe,de.size+=C,j<<=1n}const ue=Object.values(R);return T|=(function(U,K,X){const Y=new Map;let de=0n;for(const C of U){const{dependencies:fe,modules:ne}=C;for(const be of ne)for(const M of be.getDependenciesToBeIncluded())if(M instanceof Ze){if(M.info.moduleSideEffects){const b=bt(Y,M,()=>{const O=X;return X<<=1n,de|=O,O});C.containedAtoms|=b,C.correlatedAtoms|=b}}else{const b=K.get(M);b&&b!==C&&(fe.add(b),b.dependentChunks.add(C))}}return de})(ue,B,j),{chunks:ue,sideEffectAtoms:T,sizeByAtom:$}})(E,x,A,n);return a.push(...(function(I,P,F,N,R){ct("optimize chunks",3);const B=(function($,T){const j=[],le=[];for(const ue of $)(ue.size<T?j:le).push(ue);return j.length===0?null:(j.sort(Vp),le.sort(Vp),{big:new Set(le),small:new Set(j)})})(I,P);return B?(P>1&&R("info",Lh(I.length,B.small.size,"Initially")),(function($,T,j,le){const{small:ue}=$;for(const U of ue){const K=Uy(U,$,j,le,T<=1?1:1/0);if(K){const{containedAtoms:X,correlatedAtoms:Y,modules:de,pure:C,size:fe}=U;ue.delete(U),qp(K,T,$).delete(K),K.modules.push(...de),K.size+=fe,K.pure&&=C;const{dependencies:ne,dependentChunks:be,dependentEntries:M}=K;K.correlatedAtoms&=Y,K.containedAtoms|=X;for(const b of U.dependentEntries)M.add(b);for(const b of U.dependencies)ne.add(b),b.dependentChunks.delete(U),b.dependentChunks.add(K);for(const b of U.dependentChunks)be.add(b),b.dependencies.delete(U),b.dependencies.add(K);ne.delete(K),be.delete(K),qp(K,T,$).add(K)}}})(B,P,F,N),P>1&&R("info",Lh(B.small.size+B.big.size,B.small.size,"After merging chunks")),at("optimize chunks",3),[...B.small,...B.big]):(at("optimize chunks",3),I)})(S,n,k,v,s).map(({modules:I})=>({alias:null,modules:I}))),a}function Vy(t,e,n){const s=new Set([t]);for(const i of s){n.add(i),e.push(i);for(const r of i.dependencies)r instanceof Ze||n.has(r)||s.add(r)}}function Bp(t,e){const n=new Array(t.length);let s=0;for(const i of t){const r=new Set;for(const a of i)r.add(e.get(a));n[s++]=r}return n}function jp(t,e,n,s){const i=new Map;for(const r of e){const a=bt(i,r,wn),l=n[r];for(const c of Fp([s(l),l.implicitlyLoadedAfter]))for(const u of t.get(c))a.add(u)}return i}function zp(t,e,n,s){const i=s.map((r,a)=>e.has(a)?-1n:0n);for(const[r,a]of e){e.delete(r);const l=i[r];let c=l;for(const u of a)c&=t[u]|i[u];if(c!==l){i[r]=c;for(const u of n[r])bt(e,u,wn).add(r)}}return i}function Vp({size:t},{size:e}){return t-e}function Uy(t,{big:e,small:n},s,i,r){let a=null;for(const l of Fp([n,e])){if(t===l)continue;const c=qy(t,l,r,s,i);if(c<r){if(a=l,c===0)break;r=c}}return a}function qy(t,e,n,s,i){const r=Up(t,e,n,s,i);return r<n?r+Up(e,t,n-r,s,i):1/0}function Up(t,e,n,s,i){const{correlatedAtoms:r}=e;let a=t.containedAtoms;const l=a&s;if((r&l)!==l)return 1/0;const c=new Set(t.dependencies);for(const{dependencies:u,containedAtoms:d}of c){a|=d;const m=d&s;if((r&m)!==m)return 1/0;for(const f of u){if(f===e)return 1/0;c.add(f)}}return(function(u,d,m){let f=0,g=0,E=1n;const{length:x}=m;for(;g<x;g++)if((u&E)===E&&(f+=m[g]),E<<=1n,f>=d)return 1/0;return f})(a&~r,n,i)}function qp(t,e,n){return t.size<e?n.small:n.big}const Hy=(t,e)=>t.execIndex>e.execIndex?1:-1;function Wy(t){t.sort(Hy)}function Gy(t){let e=0;const n=[],s=new Set,i=new Set,r=new Map,a=[],l=(u,d)=>{r.has(u)?s.has(u)||n.push((function(m,f,g){const E=Symbol(m.id),x=[m.id];let A=f;for(m.cycles.add(E);A!==m;)A.cycles.add(E),x.push(A.id),A=g.get(A);return x.push(x[0]),x.reverse(),x})(u,d,r)):(r.set(u,d),c(u))},c=u=>{if(u instanceof st){for(const d of u.dependencies)l(d,u);for(const d of u.implicitlyLoadedBefore)i.add(d);for(const{resolution:d,node:m}of u.dynamicImports)d instanceof st&&(m.scope.context.usesTopLevelAwait?l(d,u):i.add(d));a.push(u)}u.execIndex=e++,s.add(u)};for(const u of t)r.has(u)||(r.set(u,null),c(u));for(const u of i)r.has(u)||(r.set(u,null),c(u));return{cyclePaths:n,orderedModules:a}}const Hp=(t,e)=>e?`(${t})`:t;class Wp{constructor(e,n){this.isOriginal=!0,this.filename=e,this.content=n}traceSegment(e,n,s){return{column:n,line:e,name:s,source:this}}}class vo{constructor(e,n){this.sources=n,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],n=new Map,s=[],i=[],r=new Map,a=[];for(const l of this.mappings){const c=[];for(const u of l){if(u.length===1)continue;const d=this.sources[u[1]];if(!d)continue;const m=d.traceSegment(u[2],u[3],u.length===5?this.names[u[4]]:"");if(m){const{column:f,line:g,name:E,source:{content:x,filename:A}}=m;let S=n.get(A);if(S===void 0)S=e.length,e.push(A),n.set(A,S),s[S]=x;else if(s[S]==null)s[S]=x;else if(x!=null&&s[S]!==x)return re(og(A));const k=[u[0],S,g,f];if(E){let v=r.get(E);v===void 0&&(v=i.length,i.push(E),r.set(E,v)),k[4]=v}c.push(k)}}a.push(c)}return{mappings:a,names:i,sources:e,sourcesContent:s}}traceSegment(e,n,s){const i=this.mappings[e];if(!i)return null;let r=0,a=i.length-1;for(;r<=a;){const l=r+a>>1;let c=i[l];if(c[0]!==n&&r===a&&(c=i[i[r][0]>n?Math.max(0,r-1):r]),c[0]===n||r===a){if(c.length==1)return null;const u=this.sources[c[1]];return u?u.traceSegment(c[2],c[3],c.length===5?this.names[c[4]]:s):null}c[0]>n?a=l-1:r=l+1}return null}}function Gp(t){return function(e,n){return n.missing?(t(ye,(s=n.plugin,{code:vh,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:ot("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new vo({mappings:[],names:[]},[e])):new vo(n,[e]);var s}}function Xp(t,e,n,s,i){let r;if(n){const a=n.sources,l=n.sourcesContent||[],c=cn(t)||".",u=n.sourceRoot||".",d=a.map((m,f)=>new Wp(St(c,u,m),l[f]));r=new vo(n,d)}else r=new Wp(t,e);return s.reduce(i,r)}let Kp;const Jp=t=>(function(e){let n,s;try{const a=He.__wbindgen_add_to_stack_pointer(-16);He.xxhashBase64Url(a,qr(e));var i=Zt().getInt32(a+0,!0),r=Zt().getInt32(a+4,!0);return n=i,s=r,fi(i,r)}finally{He.__wbindgen_add_to_stack_pointer(16),He.__wbindgen_export(n,s,1)}})(zl(t)),jl={base36:t=>(function(e){let n,s;try{const a=He.__wbindgen_add_to_stack_pointer(-16);He.xxhashBase36(a,qr(e));var i=Zt().getInt32(a+0,!0),r=Zt().getInt32(a+4,!0);return n=i,s=r,fi(i,r)}finally{He.__wbindgen_add_to_stack_pointer(16),He.__wbindgen_export(n,s,1)}})(zl(t)),base64:Jp,hex:t=>(function(e){let n,s;try{const a=He.__wbindgen_add_to_stack_pointer(-16);He.xxhashBase16(a,qr(e));var i=Zt().getInt32(a+0,!0),r=Zt().getInt32(a+4,!0);return n=i,s=r,fi(i,r)}finally{He.__wbindgen_add_to_stack_pointer(16),He.__wbindgen_export(n,s,1)}})(zl(t))};function zl(t){return typeof t=="string"?typeof Buffer>"u"?(Kp??=new TextEncoder,Kp.encode(t)):Buffer.from(t):t}async function Xy(t,e,n,s,i){ct("render chunks",2),(function(E){for(const x of E)x.facadeModule&&x.facadeModule.isUserDefinedEntryPoint&&x.getPreliminaryFileName()})(t);const r=await Promise.all(t.map(E=>E.render()));at("render chunks",2),ct("transform chunks",2);const a=jl[s.hashCharacters],l=(function(E){return Object.fromEntries(E.map(x=>{const A=x.getRenderedChunkInfo();return[A.fileName,A]}))})(t),{hashDependenciesByPlaceholder:c,initialHashesByPlaceholder:u,nonHashedChunksWithPlaceholders:d,placeholders:m,renderedChunksByPlaceholder:f}=await(async function(E,x,A,S,k,v){const I=[],P=new Map,F=new Map,N=new Map,R=new Set;for(const{preliminaryFileName:{hashPlaceholder:B}}of E)B&&R.add(B);return await Promise.all(E.map(async({chunk:B,preliminaryFileName:{fileName:$,hashPlaceholder:T},preliminarySourcemapFileName:j,magicString:le,usedModules:ue})=>{const U={chunk:B,fileName:$,sourcemapFileName:j?.fileName??null,...await Ky(le,$,ue,x,A,S,v)},{code:K,map:X}=U;if(T){const{containedPlaceholders:de,transformedCode:C}=((be,M)=>{const b=new Set,O=be.replace(Ol,D=>M.has(D)?(b.add(D),`${Rl}${"0".repeat(D.length-5)}${Dl}`):D);return{containedPlaceholders:b,transformedCode:O}})(K,R);let fe=C;const ne=S.hookReduceValueSync("augmentChunkHash","",[B.getRenderedChunkInfo()],(be,M)=>(M&&(be+=M),be));ne&&(fe+=ne),P.set(T,U),F.set(T,{containedPlaceholders:de,contentHash:k(fe)})}else I.push(U);const Y=j?.hashPlaceholder;X&&Y&&N.set(j.hashPlaceholder,k(X.toString()).slice(0,j.hashPlaceholder.length))})),{hashDependenciesByPlaceholder:F,initialHashesByPlaceholder:N,nonHashedChunksWithPlaceholders:I,placeholders:R,renderedChunksByPlaceholder:P}})(r,l,s,n,a,i),g=(function(E,x,A,S,k,v){const I=new Map(A);for(const P of S){const{fileName:F}=E.get(P);let N="";const R=new Set([P]);for(const T of R){const{containedPlaceholders:j,contentHash:le}=x.get(T);N+=le;for(const ue of j)R.add(ue)}let B,$;do $&&(N=$),$=v(N).slice(0,P.length),B=Oy(F,P,$);while(k[So].has(B.toLowerCase()));k[B]=Ll,I.set(P,$)}return I})(f,c,u,m,e,a);(function(E,x,A,S,k,v){for(const{chunk:I,code:P,fileName:F,sourcemapFileName:N,map:R}of E.values()){let B=ts(P,x);const $=ts(F,x);let T=null;R&&(v.sourcemapDebugIds&&(B+=Qp(B,R)),T=N?ts(N,x):`${$}.map`,R.file=ts(R.file,x),B+=Yp(T,R,k,v)),A[$]=I.finalizeChunk(B,R,T,x)}for(const{chunk:I,code:P,fileName:F,sourcemapFileName:N,map:R}of S){let B=x.size>0?ts(P,x):P,$=null;R&&(v.sourcemapDebugIds&&(B+=Qp(B,R)),$=N?ts(N,x):`${F}.map`,B+=Yp($,R,k,v)),A[F]=I.finalizeChunk(B,R,$,x)}})(f,g,e,d,n,s),at("transform chunks",2)}async function Ky(t,e,n,s,i,r,a){let l=null;const c=[];let u=await r.hookReduceArg0("renderChunk",[t.toString(),s[e],i,{chunks:s}],(k,v,I)=>{if(v==null)return k;if(typeof v=="string"&&(v={code:v,map:void 0}),v.map!==null){const P=Ds(v.map);c.push(P||{missing:!0,plugin:I.name})}return v.code});const{compact:d,dir:m,file:f,sourcemap:g,sourcemapExcludeSources:E,sourcemapFile:x,sourcemapPathTransform:A,sourcemapIgnoreList:S}=i;if(d||u[u.length-1]===`
47
- `||(u+=`
48
- `),g){let k;ct("sourcemaps",3),k=f?St(x||f):m?St(m,e):St(e),l=(function(v,I,P,F,N,R){const B=Gp(R),$=P.filter(X=>!X.excludeFromSourcemap).map(X=>Xp(X.id,X.originalCode,X.originalSourcemap,X.sourcemapChain,B)),T=new vo(I,$),j=F.reduce(B,T);let{sources:le,sourcesContent:ue,names:U,mappings:K}=j.traceMappings();if(v){const X=cn(v);le=le.map(Y=>Dn(X,Y)),v=Gt(v)}for(const X of P)Pl(X.originalSourcemap,X.sourcemapChain);return new er({file:v,mappings:K,names:U,sources:le,sourcesContent:N?void 0:ue})})(k,t.generateDecodedMap({}),n,c,E,a);for(let v=0;v<l.sources.length;++v){let I=l.sources[v];const P=`${k}.map`,F=S(I,P);typeof F!="boolean"&&re(It("sourcemapIgnoreList function must return a boolean.")),F&&(l.x_google_ignoreList===void 0&&(l.x_google_ignoreList=[]),l.x_google_ignoreList.includes(v)||l.x_google_ignoreList.push(v)),A&&(I=A(I,P),typeof I!="string"&&re(It("sourcemapPathTransform function must return a string."))),l.sources[v]=ln(I)}at("sourcemaps",3)}return{code:u,map:l}}function Yp(t,e,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if(s==="inline")r=e.toUrl();else{const a=Gt(t);r=i?new URL(a,i).toString():a,n.emitFile({fileName:t,originalFileName:null,source:e.toString(),type:"asset"})}return s==="hidden"?"":`//# sourceMappingURL=${r}
49
- `}function Qp(t,e){const n=jl.hex(t),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 e.debugId=s,"//# debugId="+s+`
50
- `}class Jy{constructor(e,n,s,i,r){this.outputOptions=e,this.unsetOptions=n,this.inputOptions=s,this.pluginDriver=i,this.graph=r,this.facadeChunkByModule=new Map,this.includedNamespaces=new Set}async generate(e){ct("GENERATE",1);const n=Object.create(null),s=(i=>{const r=new Set;return new Proxy(i,{deleteProperty:(a,l)=>(typeof l=="string"&&r.delete(l.toLowerCase()),Reflect.deleteProperty(a,l)),get:(a,l)=>l===So?r:Reflect.get(a,l),set:(a,l,c)=>(typeof l=="string"&&r.add(l.toLowerCase()),Reflect.set(a,l,c))})})(n);this.pluginDriver.setOutputBundle(s,this.outputOptions);try{ct("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),at("initialize render",2),ct("generate chunks",2);const i=(()=>{let a=0;return(l,c)=>{if(c>21)return re(It(`Hashes cannot be longer than 21 characters, received ${c}. Check the "${l}" option.`));const u=`${Rl}${vr(++a).padStart(c-5,"0")}${Dl}`;return u.length>c?re(It(`To generate hashes for this number of chunks (currently ${a}), you need a minimum hash size of ${u.length}, received ${c}. Check the "${l}" option.`)):u}})(),r=await this.generateChunks(s,i);r.length>1&&(function(a,l){if(a.format==="umd"||a.format==="iife")return re(nt("output.format",fh,"UMD and IIFE output formats are not supported for code-splitting builds",a.format));if(typeof a.file=="string")return re(nt("output.file",Qs,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(a.sourcemapFile)return re(nt("output.sourcemapFile",Jm,'"output.sourcemapFile" is only supported for single-file builds'));!a.amd.autoId&&a.amd.id&&l(ye,nt("output.amd.id",ph,'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 a of r)a.generateExports(),a.inlineTransitiveImports();at("generate chunks",2),await Xy(r,s,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(i){throw await this.pluginDriver.hookParallel("renderError",[i]),i}return(i=>{const r=new Set,a=Object.values(i);for(const l of a)l.type==="asset"&&l.needsCodeReference&&r.add(l.fileName);for(const l of a)if(l.type==="chunk")for(const c of l.referencedFiles)r.has(c)&&r.delete(c);for(const l of r)delete i[l]})(s),ct("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,s,e]),this.finaliseAssets(s),at("generate bundle",2),at("GENERATE",1),n}async addManualChunks(e){const n=new Map,s=await Promise.all(Object.entries(e).map(async([i,r])=>({alias:i,entries:await this.graph.moduleLoader.addAdditionalModules(r,!0)})));for(const{alias:i,entries:r}of s)for(const a of r)Zp(i,a,n);return n}assignManualChunks(e){const n=[],s={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const r of this.graph.modulesById.values())if(r instanceof st){const a=e(r.id,s);typeof a=="string"&&n.push([a,r])}n.sort(([r],[a])=>r>a?1:r<a?-1:0);const i=new Map;for(const[r,a]of n)Zp(r,a,i);return i}finaliseAssets(e){if(this.outputOptions.validate){for(const n of Object.values(e))if("code"in n)try{$l(n.code,{jsx:this.inputOptions.jsx!==!1})}catch(s){this.inputOptions.onLog(ye,Qm(n,s))}}this.pluginDriver.finaliseAssets()}async generateChunks(e,n){const{experimentalMinChunkSize:s,inlineDynamicImports:i,manualChunks:r,preserveModules:a,onlyExplicitManualChunks:l}=this.outputOptions,c=typeof r=="object"?await this.addManualChunks(r):this.assignManualChunks(r),u=(function({compact:k,generatedCode:{arrowFunctions:v,constBindings:I,objectShorthand:P,reservedNamesAsProps:F}}){const{_:N,n:R,s:B}=k?{_:"",n:"",s:""}:{_:" ",n:`
51
- `,s:";"},$=I?"const":"var",T=(U,{isAsync:K,name:X})=>`${K?"async ":""}function${X?` ${X}`:""}${N}(${U.join(`,${N}`)})${N}`,j=v?(U,{isAsync:K,name:X})=>{const Y=U.length===1;return`${X?`${$} ${X}${N}=${N}`:""}${K?`async${Y?" ":N}`:""}${Y?U[0]:`(${U.join(`,${N}`)})`}${N}=>${N}`}:T,le=(U,{functionReturn:K,lineBreakIndent:X,name:Y})=>[`${j(U,{isAsync:!1,name:Y})}${v?X?`${R}${X.base}${X.t}`:"":`{${X?`${R}${X.base}${X.t}`:N}${K?"return ":""}`}`,v?`${Y?";":""}${X?`${R}${X.base}`:""}`:`${B}${X?`${R}${X.base}`:N}}`],ue=F?U=>br.test(U):U=>!gr.has(U)&&br.test(U);return{_:N,cnst:$,getDirectReturnFunction:le,getDirectReturnIifeLeft:(U,K,{needsArrowReturnParens:X,needsWrappedFunction:Y})=>{const[de,C]=le(U,{functionReturn:!0,lineBreakIndent:null,name:null});return`${Hp(`${de}${Hp(K,v&&X)}${C}`,v||Y)}(`},getFunctionIntro:j,getNonArrowFunctionIntro:T,getObject(U,{lineBreakIndent:K}){const X=K?`${R}${K.base}${K.t}`:N;return`{${U.map(([Y,de])=>{if(Y===null)return`${X}${de}`;const C=xr(Y);return Y===de&&P&&Y===C?X+Y:`${X}${C}:${N}${de}`}).join(",")}${U.length===0?"":K?`${R}${K.base}`:N}}`},getPropertyAccess:U=>ue(U)?`.${U}`:`[${JSON.stringify(U)}]`,n:R,s:B}})(this.outputOptions),d=(function(k){const v=[];for(const I of k.values())I instanceof st&&(I.isIncluded()||I.info.isEntry||I.includedDynamicImporters.length>0)&&v.push(I);return v})(this.graph.modulesById),m=(function(k){if(k.length===0)return"/";if(k.length===1)return cn(k[0]);const v=k.slice(1).reduce((I,P)=>{const F=P.split(/\/+|\\+/);let N;for(N=0;I[N]===F[N]&&N<Math.min(I.length,F.length);N++);return I.slice(0,N)},k[0].split(/\/+|\\+/));return v.length>1?v.join("/"):"/"})((function(k,v){const I=[];for(const P of k)(P.info.isEntry||v)&&Wt(P.id)&&I.push(P.id);return I})(d,a)),f=(function(k,v,I){const P=new Map;for(const F of k.values())F instanceof Ze&&P.set(F,new Qn(F,v,I));return P})(this.graph.modulesById,this.outputOptions,m),g=i?[{alias:null,modules:d}]:a?d.map(k=>({alias:null,modules:[k]})):zy(this.graph.entryModules,c,s,this.inputOptions.onLog,typeof r=="function",l),E=new Array(g.length),x=new Map;let A=0;for(const{alias:k,modules:v}of g){Wy(v);const I=new bn(v,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,x,f,this.facadeChunkByModule,this.includedNamespaces,k,n,e,m,u);E[A++]=I}for(const k of E)k.link();i||a||this.checkCircularChunks(E);const S=[];for(const k of E)S.push(...k.generateFacades());return[...E,...S]}checkCircularChunks(e){const n=new Set,s=new Map,i=(a,l)=>{if(s.has(a)){if(!n.has(a)){const c=[a.getChunkName()];let u=a.isManualChunk,d=l;for(;d!==a&&d;)c.push(d.getChunkName()),u&&=d.isManualChunk,d=s.get(d);c.push(c[0]),c.reverse(),this.inputOptions.onLog(ye,(function(m,f){return{code:"CIRCULAR_CHUNK",ids:m,message:`Circular chunk: ${m.join(" -> ")}. ${f?"Please adjust the manual chunk logic for these chunks.":`Consider disabling the "output.onlyExplicitManualChunks" option, as enabling it causes the static dependencies of the manual chunk "${m.at(-2)}" to be bundled into the chunk "${m.at(-1)}".`}`}})(c,u))}}else s.set(a,l),r(a)},r=a=>{for(const l of a.dependencies)l instanceof bn&&i(l,a);n.add(a)};for(const a of e)s.has(a)||r(a)}}function Zp(t,e,n){const s=n.get(e);if(typeof s=="string"&&s!==t)return re((i=e.id,r=t,a=s,{code:"INVALID_CHUNK",message:`Cannot assign "${xe(i)}" to the "${r}" chunk as it is already in the "${a}" chunk.`}));var i,r,a;n.set(e,t)}class Yy extends rd{constructor(){super(),this.parent=null,this.variables.set("undefined",new Id)}findVariable(e){let n=this.variables.get(e);return n||(n=new La(e),this.variables.set(e,n)),n}}async function e1(t,e,n,s,i,r,a,l,c,u){const d=await(function(m,f,g,E,x,A,S,k){let v=null,I=null;if(x){v=new Set;for(const P of x)m===P.source&&f===P.importer&&v.add(P.plugin);I=(P,F)=>({...P,resolve:(N,R,{attributes:B,custom:$,isEntry:T,skipSelf:j}=pt)=>(j??=!0,j&&x.findIndex(le=>le.plugin===F&&le.source===N&&le.importer===R)!==-1?Promise.resolve(null):E(N,R,$,T,B||ft,j?[...x,{importer:R,plugin:F,source:N}]:x))})}return g.hookFirstAndGetPlugin("resolveId",[m,f,{attributes:k,custom:A,isEntry:S}],I,v)})(t,e,s,i,r,a,l,c);if(d!=null){const[m,f]=d;return typeof m!="object"||m.resolvedBy?typeof m=="string"?{id:m,resolvedBy:f.name}:m:{...m,resolvedBy:f.name}}return e===void 0||Wt(t)||t[0]==="."?(async function(m,f,g){return await _o(m,f,g)??await _o(m+".mjs",f,g)??await _o(m+".js",f,g)})(e?St(cn(e),t):St(t),n,u):null}async function _o(t,e,n){try{const s=await n.lstat(t);if(!e&&s.isSymbolicLink())return await _o(await n.realpath(t),e,n);if(e&&s.isSymbolicLink()||s.isFile()){const i=Gt(t);if((await n.readdir(cn(t))).includes(i))return t}}catch{}}function t1(t){return t.charCodeAt(0)===65279?t1(t.slice(1)):t}const Vl="at position ",Ul="at output position ",Qy={delete:()=>!1,get(){},has:()=>!1,set(){}};function Po(t){return t.startsWith(Vl)||t.startsWith(Ul)?re({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):re({code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${t} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const n1=(t,e,n=eb)=>{const{onwarn:s,onLog:i}=t,r=Zy(n,s);if(i){const a=Bn[e];return(l,c)=>i(l,s1(c),(u,d)=>{if(u==="error")return re(en(d));Bn[u]>=a&&r(u,en(d))})}return r},Zy=(t,e)=>e?(n,s)=>{n===ye?e(s1(s),i=>t(ye,en(i))):t(n,s)}:t,s1=t=>(Object.defineProperty(t,"toString",{value:()=>t.message,writable:!0}),t),en=t=>typeof t=="string"?{message:t}:typeof t=="function"?en(t()):t,eb=(t,{message:e})=>{switch(t){case ye:return console.warn(e);case Ys:return console.debug(e);default:return console.info(e)}};function i1(t,e,n,s,i=/$./){const r=new Set(e),a=Object.keys(t).filter(l=>!(r.has(l)||i.test(l)));a.length>0&&s(ye,(function(l,c,u){return{code:"UNKNOWN_OPTION",message:`Unknown ${l}: ${c.join(", ")}. Allowed options: ${u.join(", ")}`}})(n,a,[...r].sort()))}const tb={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Qe,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:Qe,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Qe,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},nb={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"}},sb={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},ql=(t,e,n,s,i)=>{const r=t?.preset;if(r){const a=e[r];if(a)return{...a,...t};re(nt(`${n}.preset`,s,`valid values are ${un(Object.keys(e))}`,r))}return((a,l,c,u)=>d=>{if(typeof d=="string"){const m=a[d];if(m)return m;re(nt(l,c,`valid values are ${u}${un(Object.keys(a))}. You can also supply an object for more fine-grained control`,d))}return(m=>m&&typeof m=="object"?m:{})(d)})(e,n,s,i)(t)},No=async t=>(await(async function(e){do e=(await Promise.all(e)).flat(1/0);while(e.some(n=>n?.then));return e})([t])).filter(Boolean);async function ib(t,e,n,s){const i=e.id,r=[];let a=t.map===null?null:Ds(t.map);const l=t.code;let c=t.ast;const u=[],d=[];let m=!1;const f=()=>m=!0;let g="",E=t.code;const x=S=>(k,v)=>{k=en(k),v&&dr(k,v,E,i),k.id=i,k.hook="transform",S(k)};let A;try{A=await n.hookReduceArg0("transform",[E,i],function(S,k,v){let I,P;if(typeof k=="string")I=k;else{if(!k||typeof k!="object")return S;if(e.updateOptions(k),k.code==null)return(k.map||k.ast)&&s(ye,(function(F){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${F}" returned a "map" or "ast" without returning a "code". This will be ignored.`}})(v.name)),S;({code:I,map:P,ast:c}=k)}return P!==null&&r.push(Ds(typeof P=="string"?JSON.parse(P):P)||{missing:!0,plugin:v.name}),E=I,I},(S,k)=>{return g=k.name,{...S,addWatchFile(P){u.push(P),S.addWatchFile(P)},cache:m?S.cache:(v=S.cache,I=f,{delete:P=>(I(),v.delete(P)),get:P=>(I(),v.get(P)),has:P=>(I(),v.has(P)),set:(P,F)=>(I(),v.set(P,F))}),debug:x(S.debug),emitFile:P=>(d.push(P),n.emitFile(P)),error:(P,F)=>(typeof P=="string"&&(P={message:P}),F&&dr(P,F,E,i),P.id=i,P.hook="transform",S.error(P)),getCombinedSourcemap(){const P=(function(F,N,R,B,$){return B.length===0?R:Ds({version:3,...Xp(F,N,R,B,Gp($)).traceMappings()})})(i,l,a,r,s);return P?(a!==P&&(a=P,r.length=0),new er({...P,file:null,sourcesContent:P.sourcesContent})):new Ws(l).generateMap({hires:!0,includeContent:!0,source:i})},info:x(S.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:x(S.warn)};var v,I})}catch(S){return re(Zs(S,g,{hook:"transform",id:i}))}return!m&&d.length>0&&(e.transformFiles=d),{ast:c,code:A,customTransformCache:m,originalCode:l,originalSourcemap:a,safeVariableNames:null,sourcemapChain:r,transformDependencies:u}}const Hl="resolveDependencies";class rb{constructor(e,n,s,i){this.graph=e,this.modulesById=n,this.options=s,this.pluginDriver=i,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(r,a,l,c,u,d=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(r,a,!1)&&await e1(r,a,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,d,l,typeof c=="boolean"?c:!a,u,this.options.fs),a,r),u),this.hasModuleSideEffects=s.treeshake?s.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,n){const s=this.extendLoadModulesPromise(Promise.all(e.map(i=>this.loadEntryModule(i,!1,void 0,null,n))));return await this.awaitLoadModulesPromise(),s}async addEntryModules(e,n){const s=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const i=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const r=await this.extendLoadModulesPromise(Promise.all(e.map(({id:a,importer:l})=>this.loadEntryModule(a,!0,l,null))).then(a=>{for(const[l,c]of a.entries()){c.isUserDefinedEntryPoint=c.isUserDefinedEntryPoint||n,o1(c,e[l],n,i+l);const u=this.indexedEntryModules.find(d=>d.module===c);u?u.index=Math.min(u.index,s+l):this.indexedEntryModules.push({index:s+l,module:c})}return this.indexedEntryModules.sort(({index:l},{index:c})=>l>c?1:-1),a}));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map(({module:a})=>a),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:r}}async emitChunk({fileName:e,id:n,importer:s,name:i,implicitlyLoadedAfterOneOf:r,preserveSignature:a}){const l={fileName:e||null,id:n,importer:s,name:i||null},c=r?await this.addEntryWithImplicitDependants(l,r):(await this.addEntryModules([l],!1)).newEntryModules[0];return a!=null&&(c.preserveSignature=a),c}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,ft),void 0,!1,!e.resolveDependencies||Hl)).info}addEntryWithImplicitDependants(e,n){const s=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then(async i=>{if(o1(i,e,!1,s),!i.info.isEntry){const r=await Promise.all(n.map(a=>this.loadEntryModule(a,!1,e.importer,i.id)));if(!i.info.isEntry){this.implicitEntryModules.add(i);for(const a of r)i.implicitlyLoadedAfter.add(a);for(const a of i.implicitlyLoadedAfter)a.implicitlyLoadedBefore.add(i)}}return i}))}async addModuleSource(e,n,s){let i;try{i=await this.graph.fileOperationQueue.run(async()=>{const l=await this.pluginDriver.hookFirst("load",[e]);return l!==null?l:(this.graph.watchFiles[e]=!0,await this.options.fs.readFile(e,{encoding:"utf8"}))})}catch(l){let c=`Could not load ${e}`;throw n&&(c+=` (imported by ${xe(n)})`),c+=`: ${l.message}`,l.message=c,l}const r=typeof i=="string"?{code:i}:i!=null&&typeof i=="object"&&typeof i.code=="string"?i:re((function(l){return{code:"BAD_LOADER",message:`Error loading "${xe(l)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}})(e));r.code=t1(r.code);const a=this.graph.cachedModules.get(e);if(!a||a.customTransformCache||a.originalCode!==r.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:a.ast,code:a.code,id:a.id,meta:a.meta,moduleSideEffects:a.moduleSideEffects,resolvedSources:a.resolvedIds,syntheticNamedExports:a.syntheticNamedExports}]))s.updateOptions(r),await s.setSource(await ib(r,s,this.pluginDriver,this.options.onLog));else{if(a.transformFiles)for(const l of a.transformFiles)this.pluginDriver.emitFile(l);await s.setSource(a)}}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,n){const s=await Promise.all(n.map(i=>i.then(async([r,a])=>a===null?null:typeof a=="string"?(r.resolution=a,null):r.resolution=await this.fetchResolvedDependency(xe(a.id),e.id,a))));for(const i of s)i&&(e.dynamicDependencies.add(i),i.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:n,meta:s,moduleSideEffects:i,syntheticNamedExports:r},a,l,c){const u=this.modulesById.get(n);if(u instanceof st)return a&&Ao(e,u.info.attributes)&&this.options.onLog(ye,pr(u.info.attributes,e,n,a)),await this.handleExistingModule(u,l,c),u;if(u instanceof Ze)return re({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${u.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 d=new st(this.graph,n,this.options,l,i,r,s,e);this.modulesById.set(n,d);const m=this.addModuleSource(n,a,d).then(()=>[this.getResolveStaticDependencyPromises(d),this.getResolveDynamicImportPromises(d),f]),f=a1(m).then(()=>this.pluginDriver.hookParallel("moduleParsed",[d.info]));f.catch(()=>{}),this.moduleLoadPromises.set(d,m);const g=await m;return c?c===Hl&&await f:await this.fetchModuleDependencies(d,...g),d}async fetchModuleDependencies(e,n,s,i){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,n),this.fetchDynamicDependencies(e,s)]),e.linkImports(),await i)}fetchResolvedDependency(e,n,s){if(s.external){const{attributes:i,external:r,id:a,moduleSideEffects:l,meta:c}=s;let u=this.modulesById.get(a);if(u){if(!(u instanceof Ze))return re((function(d,m){return{code:"INVALID_EXTERNAL_ID",message:`"${d}" is imported as an external by "${xe(m)}", but is already an existing non-external module id.`}})(e,n));Ao(u.info.attributes,i)&&this.options.onLog(ye,pr(u.info.attributes,i,e,n))}else u=new Ze(this.options,a,l,c,r!=="absolute"&&Wt(a),i),this.modulesById.set(a,u);return Promise.resolve(u)}return this.fetchModule(s,n,!1,!1)}async fetchStaticDependencies(e,n){for(const s of await Promise.all(n.map(i=>i.then(([r,a])=>this.fetchResolvedDependency(r,e.id,a)))))e.dependencies.add(s),s.importers.push(e.id);if(!this.options.treeshake||e.info.moduleSideEffects==="no-treeshake")for(const s of e.dependencies)s instanceof st&&(s.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,n,s){const{makeAbsoluteExternalsRelative:i}=this.options;if(e){if(typeof e=="object"){const l=e.external||this.options.external(e.id,n,!0);return{...e,external:l&&(l==="relative"||!Wt(e.id)||l===!0&&Wl(e.id,s,i)||"absolute")}}const a=this.options.external(e,n,!0);return{external:a&&(Wl(e,s,i)||"absolute"),id:a&&i?r1(e,n):e}}const r=i?r1(s,n):s;return e===!1||this.options.external(r,n,!0)?{external:Wl(r,s,i)||"absolute",id:r}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map(async n=>{const s=await this.resolveDynamicImport(e,n.argument,e.id,vp(n.node));return s&&typeof s!="string"?(n.node.shouldIncludeDynamicAttributes=!!s.external,n.id=s.id):n.node.shouldIncludeDynamicAttributes=!0,[n,s]})}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAttributes,async([n,s])=>[n,e.resolvedIds[n]=e.resolvedIds[n]||this.handleInvalidResolvedId(await this.resolveId(n,e.id,ft,!1,s),n,e.id,s)])}getResolvedIdWithDefaults(e,n){if(!e)return null;const s=e.external||!1;return{attributes:e.attributes||n,external:s,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!s),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,n,s){const i=this.moduleLoadPromises.get(e);if(s)return s===Hl?a1(i):i;if(n){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const r of e.implicitlyLoadedAfter)r.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await i)}handleInvalidResolvedId(e,n,s,i){return e===null?ra(n)?re((function(r,a){return{code:Nh,exporter:r,id:a,message:`Could not resolve "${r}" from "${xe(a)}"`}})(n,s)):(this.options.onLog(ye,(function(r,a){return{code:Nh,exporter:r,id:a,message:`"${r}" is imported by "${xe(a)}", but could not be resolved – treating it as an external dependency.`,url:ot("troubleshooting/#warning-treating-module-as-external-dependency")}})(n,s)),{attributes:i,external:!0,id:n,meta:{},moduleSideEffects:this.hasModuleSideEffects(n,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(ye,(function(r,a){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:r,message:`External "${r}" cannot have "syntheticNamedExports" enabled (imported by "${xe(a)}").`}})(n,s)),e)}async loadEntryModule(e,n,s,i,r=!1){const a=await e1(e,s,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,ft,!0,ft,this.options.fs);if(a==null)return re(i===null?(function(c){return{code:Ph,message:`Could not resolve entry module "${xe(c)}".`}})(e):(function(c,u){return{code:Aa,message:`Module "${xe(c)}" that should be implicitly loaded before "${xe(u)}" could not be resolved.`}})(e,i));const l=typeof a=="object"&&a.external;return a===!1||l?re(i===null?l&&r?{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(c){return{code:Ph,message:`Entry module "${xe(c)}" cannot be external.`}})(e):(function(c,u){return{code:Aa,message:`Module "${xe(c)}" that should be implicitly loaded before "${xe(u)}" cannot be external.`}})(e,i)):this.fetchModule(this.getResolvedIdWithDefaults(typeof a=="object"?a:{id:a},ft),void 0,n,!1)}async resolveDynamicImport(e,n,s,i){const r=await this.pluginDriver.hookFirst("resolveDynamicImport",[n,s,{attributes:i}]);if(typeof n!="string")return typeof r=="string"?r:r?this.getResolvedIdWithDefaults(r,i):null;if(r==null){const a=e.resolvedIds[n];return a?(Ao(a.attributes,i)&&this.options.onLog(ye,pr(a.attributes,i,n,s)),a):e.resolvedIds[n]=this.handleInvalidResolvedId(await this.resolveId(n,e.id,ft,!1,i),n,e.id,i)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(r,s,n),i),n,s,i)}}function r1(t,e){return ra(t)?e?St(e,"..",t):St(t):t}function o1(t,{fileName:e,name:n},s,i){if(e!==null)t.chunkFileNames.add(e);else if(n!==null){let r=0;for(;t.chunkNames[r]?.priority<i;)r++;t.chunkNames.splice(r,0,{isUserDefined:s,name:n,priority:i})}}function Wl(t,e,n){return n===!0||n==="ifRelativeSource"&&ra(e)||!Wt(t)}async function a1(t){const[e,n]=await t;return Promise.all([...e,...n])}function l1(t,e,n,s,i,r,a,l,c){const u=a.sanitizeFileName(t||"asset");return Fl(Ml(typeof a.assetFileNames=="function"?a.assetFileNames({get name(){return jn('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',ys,!1,c),t},names:e,get originalFileName(){return jn('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',ys,!1,c),s},originalFileNames:i,source:n,type:"asset"}):a.assetFileNames,"output.assetFileNames",{ext:()=>En(u).slice(1),extname:()=>En(u),hash:d=>r.slice(0,Math.min(Math.max(0,d||8),21)),name:()=>u.slice(0,Math.max(0,u.length-En(u).length))}),l)}function c1(t,{bundle:e},n){e[So].has(t.toLowerCase())?n(ye,(function(s){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${s}" overwrites a previously emitted file of the same name.`}})(t)):e[t]=Ll}const ob=new Set(["chunk","asset","prebuilt-chunk"]);function u1(t,e,n){if(!(typeof t=="string"||t instanceof Uint8Array)){const s=e.fileName||e.name||n;return re(It(`Could not set source for ${typeof s=="string"?`asset "${s}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return t}class ab{constructor(e,n,s){this.graph=e,this.options=n,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=i=>(function(r){return!!(r&&ob.has(r.type))})(i)?i.type==="prebuilt-chunk"?this.emitPrebuiltChunk(i):(function(r){const a=r.fileName||r.name;return!a||typeof a=="string"&&!ur(a)})(i)?i.type==="chunk"?this.emitChunk(i):this.emitAsset(i):re(It(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${i.fileName||i.name}".`)):re(It(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${i&&i.type}".`)),this.finaliseAssets=()=>{for(const[i,r]of this.filesByReferenceId)if(r.type==="asset"&&typeof r.fileName!="string")return re(Ym(r.name||i))},this.getFileName=i=>{const r=this.filesByReferenceId.get(i);return r?r.type==="chunk"?(a=r,l=this.facadeChunkByModule,a.fileName?a.fileName:l?l.get(a.module).getFileName():re({code:"CHUNK_NOT_GENERATED",message:`Plugin error - Unable to get file name for emitted chunk "${a.fileName||a.name}". You can only get file names once chunks have been generated after the "renderStart" hook.`})):r.type==="prebuilt-chunk"?r.fileName:(function(c,u){return typeof c.fileName!="string"?re({code:"ASSET_NOT_FINALISED",message:`Plugin error - Unable to get file name for asset "${c.name||u}". 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.`}):c.fileName})(r,i):re({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${i}".`});var a,l},this.setAssetSource=(i,r)=>{const a=this.filesByReferenceId.get(i);if(!a)return re({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${i}".`});if(a.type!=="asset")return re(It(`Asset sources can only be set for emitted assets but "${i}" is an emitted chunk.`));if(a.source!==void 0)return re({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${a.name||i}", source already set.`});const l=u1(r,a,i);if(this.output)this.finalizeAdditionalAsset(a,l,this.output);else{a.source=l;for(const c of this.outputFileEmitters)c.finalizeAdditionalAsset(a,l,c.output)}},this.setChunkInformation=i=>{this.facadeChunkByModule=i},this.setOutputBundle=(i,r)=>{const a=jl[r.hashCharacters],l=this.output={bundle:i,fileNamesBySourceHash:new Map,getHash:a,outputOptions:r};for(const u of this.filesByReferenceId.values())u.fileName&&c1(u.fileName,l,this.options.onLog);const c=new Map;for(const u of this.filesByReferenceId.values())u.type==="asset"&&u.source!==void 0?u.fileName?this.finalizeAdditionalAsset(u,u.source,l):bt(c,a(u.source),aa).push(u):u.type==="prebuilt-chunk"&&(this.output.bundle[u.fileName]=this.createPrebuiltChunk(u));for(const[u,d]of c)this.finalizeAssetsWithSameSource(d,u,l)},this.filesByReferenceId=s?new Map(s.filesByReferenceId):new Map,s?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,n){let s=n;do s=Jp(s).slice(0,8).replaceAll("-","$");while(this.filesByReferenceId.has(s)||this.outputFileEmitters.some(({filesByReferenceId:i})=>i.has(s)));e.referenceId=s,this.filesByReferenceId.set(s,e);for(const{filesByReferenceId:i}of this.outputFileEmitters)i.set(s,e);return s}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 n=e.source===void 0?void 0:u1(e.source,e,null),s=e.originalFileName||null;typeof s=="string"&&(this.graph.watchFiles[s]=!0);const i={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,originalFileName:s,referenceId:"",source:n,type:"asset"},r=this.assignReferenceId(i,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(i,this.output);else for(const a of this.outputFileEmitters)a.emitAssetWithReferenceId(i,a.output);return r}emitAssetWithReferenceId(e,n){const{fileName:s,source:i}=e;s&&c1(s,n,this.options.onLog),i!==void 0&&this.finalizeAdditionalAsset(e,i,n)}emitChunk(e){if(this.graph.phase>es.LOAD_AND_PARSE)return re({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if(typeof e.id!="string")return re(It(`Emitted chunks need to have a valid string id, received "${e.id}"`));const n={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then(s=>n.module=s).catch(()=>{}),this.assignReferenceId(n,e.id)}emitPrebuiltChunk(e){if(typeof e.code!="string")return re(It(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if(typeof e.fileName!="string"||ur(e.fileName))return re(It(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const n={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},s=this.assignReferenceId(n,n.fileName);return this.output&&(this.output.bundle[n.fileName]=this.createPrebuiltChunk(n)),s}finalizeAdditionalAsset(e,n,{bundle:s,fileNamesBySourceHash:i,getHash:r,outputOptions:a}){let{fileName:l,name:c,needsCodeReference:u,originalFileName:d,referenceId:m}=e;if(!l){const E=r(n);l=i.get(E),l||(l=l1(c,c?[c]:[],n,d,d?[d]:[],E,a,s,this.options),i.set(E,l))}const f={...e,fileName:l,source:n};this.filesByReferenceId.set(m,f);const g=s[l];if(g?.type==="asset")g.needsCodeReference&&=u,c&&g.names.push(c),d&&g.originalFileNames.push(d);else{const{options:E}=this;s[l]={fileName:l,get name(){return jn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',ys,!1,E),c},names:c?[c]:[],needsCodeReference:u,get originalFileName(){return jn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',ys,!1,E),d},originalFileNames:d?[d]:[],source:n,type:"asset"}}}finalizeAssetsWithSameSource(e,n,{bundle:s,fileNamesBySourceHash:i,outputOptions:r}){const{names:a,originalFileNames:l}=(function(f){const g=[],E=[];for(const{name:x,originalFileName:A}of f)typeof x=="string"&&g.push(x),A&&E.push(A);return E.sort(),g.sort((x,A)=>x.length-A.length||(x>A?1:x===A?0:-1)),{names:g,originalFileNames:E}})(e);let c,u="",d=!0;for(const f of e){d&&=f.needsCodeReference;const g=l1(f.name,a,f.source,f.originalFileName,l,n,r,s,this.options);(!u||g.length<u.length||g.length===u.length&&g<u)&&(u=g,c=f)}i.set(n,u);for(const f of e){const g={...f,fileName:u};this.filesByReferenceId.set(f.referenceId,g)}const{options:m}=this;s[u]={fileName:u,get name(){return jn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',ys,!1,m),c.name},names:a,needsCodeReference:d,get originalFileName(){return jn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',ys,!1,m),c.originalFileName},originalFileNames:l,source:c.source,type:"asset"}}}function Os(t,e,n,s,i){return Bn[t]<Bn[i]?Rt:(r,a)=>{a!=null&&n(ye,{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.`}),(r=en(r)).code&&!r.pluginCode&&(r.pluginCode=r.code),r.code=e,r.plugin=s,n(t,r)}}function lb(t,e,n,s,i,r){const{logLevel:a,onLog:l}=s;let c,u=!0;if(typeof t.cacheKey!="string"&&(t.name.startsWith(Vl)||t.name.startsWith(Ul)||r.has(t.name)?u=!1:r.add(t.name)),e)if(u){const f=t.cacheKey||t.name;m=e[f]||(e[f]=Object.create(null)),c={delete:g=>delete m[g],get(g){const E=m[g];if(E)return E[0]=0,E[1]},has(g){const E=m[g];return!!E&&(E[0]=0,!0)},set(g,E){m[g]=[0,E]}}}else d=t.name,c={delete:()=>Po(d),get:()=>Po(d),has:()=>Po(d),set:()=>Po(d)};else c=Qy;var d,m;return{addWatchFile(f){n.watchFiles[f]=!0},cache:c,debug:Os(Ys,"PLUGIN_LOG",l,t.name,a),emitFile:i.emitFile.bind(i),error:f=>re(Zs(en(f),t.name)),fs:s.fs,getFileName:i.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:Os(Fn,"PLUGIN_LOG",l,t.name,a),load:f=>n.moduleLoader.preloadModule(f),meta:{rollupVersion:sa,watchMode:n.watchMode},parse:$l,resolve:(f,g,{attributes:E,custom:x,isEntry:A,skipSelf:S}=pt)=>(S??=!0,n.moduleLoader.resolveId(f,g,x,A,E||ft,S?[{importer:g,plugin:t,source:f}]:null)),setAssetSource:i.setAssetSource,warn:Os(ye,"PLUGIN_WARNING",l,t.name,a)}}function Gl(t){return Array.isArray(t)?t.filter(Boolean):t?[t]:[]}function h1(t){if(t instanceof RegExp)return i=>{const r=ln(i),a=t.test(r);return t.lastIndex=0,a};const e=process.cwd(),n=(function(i,r){return i.startsWith("**")||Wt(i)?ln(i):ln(St(r,i))})(t,e),s=sy(n,{dot:!0});return i=>{const r=ln(i);return s(r)}}function d1(t){return t instanceof RegExp?e=>{const n=t.test(e);return t.lastIndex=0,n}:e=>e.includes(t)}function p1(t,e){if(t||e)return n=>!t?.some(s=>s(n))&&(!!e?.some(s=>s(n))||!(e&&e.length>0))}function f1(t){return typeof t=="string"||t instanceof RegExp?{include:[t]}:Array.isArray(t)?{include:t}:{exclude:t.exclude?Gl(t.exclude):void 0,include:t.include?Gl(t.include):void 0}}function m1(t){if(!t)return;const{exclude:e,include:n}=f1(t),s=e?.map(h1),i=n?.map(h1);return p1(s,i)}function cb(t,e){if(!t&&!e)return;const n=m1(t),s=(function(i){if(!i)return;const{exclude:r,include:a}=f1(i),l=r?.map(d1),c=a?.map(d1);return p1(l,c)})(e);return(i,r)=>{let a=!0;return n&&(a&&=n(i)),!!a&&(s&&(a&&=s(r)),a)}}const ub=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 Xl{constructor(e,n,s,i,r){this.graph=e,this.options=n,this.pluginCache=i,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.compiledPluginFilters={idOnlyFilter:new WeakMap,transformFilter:new WeakMap},this.fileEmitter=new ab(e,n,r&&r.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=[...r?r.plugins:[],...s];const a=new Set;if(this.pluginContexts=new Map(this.plugins.map(l=>[l,lb(l,i,e,n,this.fileEmitter,a)])),r)for(const l of s)for(const c of ub)c in l&&n.onLog(ye,sg(l.name,c))}createOutputPluginDriver(e){return new Xl(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,n,s,i){return this.hookFirstAndGetPlugin(e,n,s,i).then(r=>r&&r[0])}async hookFirstAndGetPlugin(e,n,s,i){for(const r of this.getSortedPlugins(e)){if(i?.has(r))continue;const a=await this.runHook(e,n,r,s);if(a!=null)return[a,r]}return null}hookFirstSync(e,n,s){for(const i of this.getSortedPlugins(e)){const r=this.runHookSync(e,n,i,s);if(r!=null)return r}return null}async hookParallel(e,n,s){const i=[];for(const r of this.getSortedPlugins(e))r[e].sequential?(await Promise.all(i),i.length=0,await this.runHook(e,n,r,s)):i.push(this.runHook(e,n,r,s));await Promise.all(i)}hookReduceArg0(e,[n,...s],i,r){let a=Promise.resolve(n);for(const l of this.getSortedPlugins(e))a=a.then(c=>this.runHook(e,[c,...s],l,r).then(u=>i.call(this.pluginContexts.get(l),c,u,l)));return a}hookReduceArg0Sync(e,[n,...s],i,r){for(const a of this.getSortedPlugins(e)){const l=[n,...s],c=this.runHookSync(e,l,a,r);n=i.call(this.pluginContexts.get(a),n,c,a)}return n}async hookReduceValue(e,n,s,i){const r=[],a=[];for(const l of this.getSortedPlugins(e,db))l[e].sequential?(r.push(...await Promise.all(a)),a.length=0,r.push(await this.runHook(e,s,l))):a.push(this.runHook(e,s,l));return r.push(...await Promise.all(a)),r.reduce(i,await n)}hookReduceValueSync(e,n,s,i,r){let a=n;for(const l of this.getSortedPlugins(e)){const c=this.runHookSync(e,s,l,r);a=i.call(this.pluginContexts.get(l),a,c,l)}return a}hookSeq(e,n,s){let i=Promise.resolve();for(const r of this.getSortedPlugins(e))i=i.then(()=>this.runHook(e,n,r,s));return i.then(pb)}getSortedPlugins(e,n){return bt(this.sortedPlugins,e,()=>Kl(e,this.plugins,n))}runHook(e,n,s,i){const r=s[e],a=typeof r=="object"?r.handler:r;if(typeof r=="object"&&"filter"in r&&r.filter){if(e==="transform"){const u=r.filter,d=n,m=bt(this.compiledPluginFilters.transformFilter,u,()=>cb(u.id,u.code));if(m&&!m(d[1],d[0]))return Promise.resolve()}else if(e==="resolveId"||e==="load"){const u=r.filter,d=n,m=bt(this.compiledPluginFilters.idOnlyFilter,u,()=>(function(f){const g=m1(f);return g?E=>!!g(E):void 0})(u.id));if(m&&!m(d[0]))return Promise.resolve()}}let l=this.pluginContexts.get(s);i&&(l=i(l,s));let c=null;return Promise.resolve().then(()=>{if(typeof a!="function")return a;const u=a.apply(l,n);return u?.then?(c=[s.name,e,n],this.unfulfilledActions.add(c),Promise.resolve(u).then(d=>(this.unfulfilledActions.delete(c),d))):u}).catch(u=>(c!==null&&this.unfulfilledActions.delete(c),re(Zs(u,s.name,{hook:e}))))}runHookSync(e,n,s,i){const r=s[e],a=typeof r=="object"?r.handler:r;let l=this.pluginContexts.get(s);i&&(l=i(l,s));try{return a.apply(l,n)}catch(c){return re(Zs(c,s.name,{hook:e}))}}}function Kl(t,e,n=hb){const s=[],i=[],r=[];for(const a of e){const l=a[t];if(l){if(typeof l=="object"){if(n(l.handler,t,a),l.order==="pre"){s.push(a);continue}if(l.order==="post"){r.push(a);continue}}else n(l,t,a);i.push(a)}}return[...s,...i,...r]}function hb(t,e,n){typeof t!="function"&&re((function(s,i){return{code:Ah,hook:s,message:`Error running plugin hook "${s}" for plugin "${i}", expected a function hook or an object with a "handler" function.`,plugin:i}})(e,n.name))}function db(t,e,n){if(typeof t!="string"&&typeof t!="function")return re((function(s,i){return{code:Ah,hook:s,message:`Error running plugin hook "${s}" for plugin "${i}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:i}})(e,n.name))}function pb(){}class fb{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise((n,s)=>{this.queue.push({reject:s,resolve:n,task:e}),this.work()})}async work(){if(this.workerCount>=this.maxParallel)return;let e;for(this.workerCount++;e=this.queue.shift();){const{reject:n,resolve:s,task:i}=e;try{s(await i())}catch(r){n(r)}}this.workerCount--}}class mb{constructor(e,n){if(this.options=e,this.astLru=(function(s){var i,r,a,l=s;function c(d,m){++i>l&&(a=r,u(1),++i),r[d]=m}function u(d){i=0,r=Object.create(null),d||(a=Object.create(null))}return u(),{clear:u,has:function(d){return r[d]!==void 0||a[d]!==void 0},get:function(d){var m=r[d];return m!==void 0?m:(m=a[d])!==void 0?(c(d,m),m):void 0},set:function(d,m){r[d]!==void 0?r[d]=m:c(d,m)}}})(5),this.cachedModules=new Map,this.deoptimizationTracker=new ms,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=es.LOAD_AND_PARSE,this.scope=new Yy,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=s=>{const i=this.modulesById.get(s);return i?i.info:null},e.cache!==!1){if(e.cache?.modules)for(const s of e.cache.modules)this.cachedModules.set(s.id,s);this.pluginCache=e.cache?.plugins||Object.create(null);for(const s in this.pluginCache){const i=this.pluginCache[s];for(const r of Object.values(i))r[0]++}}if(n){this.watchMode=!0;const s=(...r)=>this.pluginDriver.hookParallel("watchChange",r),i=()=>this.pluginDriver.hookParallel("closeWatcher",[]);n.onCurrentRun("change",s),n.onCurrentRun("close",i)}this.pluginDriver=new Xl(this,e,e.plugins,this.pluginCache),this.moduleLoader=new rb(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new fb(e.maxParallelFileOps),this.pureFunctions=(({treeshake:s})=>{const i=Object.create(null);for(const r of s?s.manualPureFunctions:[]){let a=i;for(const l of r.split("."))a=a[l]||=Object.create(null);a[Sa]=!0}return i})(e)}async build(){ct("generate module graph",2),await this.generateModuleGraph(),at("generate module graph",2),ct("sort and bind modules",2),this.phase=es.ANALYSE,this.sortModules(),at("sort and bind modules",2),ct("mark included statements",2),this.includeStatements(),at("mark included statements",2),this.phase=es.GENERATE}getCache(){for(const e in this.pluginCache){const n=this.pluginCache[e];let s=!0;for(const[i,r]of Object.entries(n))r[0]>=this.options.experimentalCacheExpiry?delete n[i]:s=!1;s&&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(n=>({fileName:null,id:n,implicitlyLoadedAfter:[],importer:void 0,name:null})):Object.entries(e).map(([n,s])=>({fileName:null,id:s,implicitlyLoadedAfter:[],importer:void 0,name:n}))),!0),this.entryModules.length===0)throw new Error("You must supply options.input to rollup");for(const n of this.modulesById.values())n.cacheInfoGetters(),n instanceof st?this.modules.push(n):this.externalModules.push(n)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const n of e)Es(n);if(this.options.treeshake){let n=1;this.newlyIncludedVariableInits.clear();do{ct(`treeshaking pass ${n}`,3),this.needsTreeshakingPass=!1;for(const s of this.modules)if(s.isExecuted){s.hasTreeShakingPassStarted=!0,s.info.moduleSideEffects==="no-treeshake"?s.includeAllInBundle():s.include();for(const i of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(i),i.include(Ft(),!1)}if(n===1)for(const s of e)s.preserveSignature!==!1&&(s.includeAllExports(!1),this.needsTreeshakingPass=!0);at("treeshaking pass "+n++,3)}while(this.needsTreeshakingPass)}else for(const n of this.modules)n.includeAllInBundle();for(const n of this.externalModules)n.warnUnusedImports();for(const n of this.implicitEntryModules)for(const s of n.implicitlyLoadedAfter)s.info.isEntry||s.isIncluded()||re(rg(s))}sortModules(){const{orderedModules:e,cyclePaths:n}=Gy(this.entryModules);for(const s of n)this.options.onLog(ye,Zm(s));this.modules=e;for(const s of this.modules)s.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const n of e.importDescriptions.values())if(n.name!=="*"){const[s,i]=n.module.getVariableForExportName(n.name,{importChain:[e.id]});s||e.log(ye,fr(n.name,e.id,n.module.id,!!i?.missingButExportExists),n.start)}}}function g1(t,e){return e()}function y1(t,e,n,s){t=Kl("onLog",t);const i=Bn[s],r=(a,l,c=ih)=>{if(xh(l),!(Bn[a]<i)){for(const u of t){if(c.has(u))continue;const{onLog:d}=u,m=f=>Bn[f]<i?Rt:g=>r(f,en(g),new Set(c).add(u));if(("handler"in d?d.handler:d).call({debug:m(Ys),error:f=>re(en(f)),info:m(Fn),meta:{rollupVersion:sa,watchMode:n},warn:m(ye)},a,l)===!1)return}e(a,l)}};return r}const $t=t=>()=>re((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:ot("plugin-development/#a-simple-example")}})(t)),gb=$t("fs.appendFile"),yb=$t("fs.copyFile"),bb=$t("fs.mkdir"),xb=$t("fs.mkdtemp"),kb=$t("fs.readdir"),Eb=$t("fs.readFile"),Ab=$t("fs.realpath"),wb=$t("fs.rename"),Sb=$t("fs.rmdir"),Ib=$t("fs.stat"),vb=$t("fs.lstat"),_b=$t("fs.unlink"),Pb=$t("fs.writeFile");var Nb=Object.freeze({__proto__:null,appendFile:gb,copyFile:yb,lstat:vb,mkdir:bb,mkdtemp:xb,readFile:Eb,readdir:kb,realpath:Ab,rename:wb,rmdir:Sb,stat:Ib,unlink:_b,writeFile:Pb});const $b=t=>t.cache===!0?void 0:t.cache?.cache||t.cache,Cb=t=>{if(t===!0)return()=>!0;if(typeof t=="function")return(e,...n)=>e[0]!=="\0"&&t(e,...n)||!1;if(t){const e=new Set,n=[];for(const s of Gl(t))s instanceof RegExp?n.push(s):e.add(s);return(s,...i)=>e.has(s)||n.some(r=>r.test(s))}return()=>!1},Tb=t=>{const e=t.input;return e==null?[]:typeof e=="string"?[e]:e},Rb=t=>{const e=t.jsx;if(!e)return!1;const n=ql(e,nb,"jsx",hr,"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||re(nt("jsx",hr,"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&&r!=="classic"&&re(nt("jsx.mode",hr,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},Db=t=>{const e=t.maxParallelFileOps;return typeof e=="number"?e<=0?1/0:e:1e3},Ob=(t,e)=>{const n=t.moduleContext;if(typeof n=="function")return s=>n(s)??e;if(n){const s=Object.create(null);for(const[i,r]of Object.entries(n))s[St(i)]=r;return i=>s[i]??e}return()=>e},Lb=t=>{if(t.treeshake===!1)return!1;const e=ql(t.treeshake,tb,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:e.annotations!==!1,correctVarValueBeforeDeclaration:e.correctVarValueBeforeDeclaration===!0,manualPureFunctions:e.manualPureFunctions??Qe,moduleSideEffects:Mb(e.moduleSideEffects),propertyReadSideEffects:e.propertyReadSideEffects==="always"?"always":e.propertyReadSideEffects!==!1,tryCatchDeoptimization:e.tryCatchDeoptimization!==!1,unknownGlobalSideEffects:e.unknownGlobalSideEffects!==!1}},Mb=t=>{if(typeof t=="boolean")return()=>t;if(t==="no-external")return(e,n)=>!n;if(typeof t=="function")return(e,n)=>e[0]==="\0"||t(e,n)!==!1;if(Array.isArray(t)){const e=new Set(t);return n=>e.has(n)}return t&&re(nt("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Fb=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,Bb=/^[a-z]:/i;function jb(t){const e=Bb.exec(t),n=e?e[0]:"";return n+t.slice(n.length).replace(Fb,"_")}const zb=(t,e,n)=>{const{file:s}=t;if(typeof s=="string"){if(e)return re(nt("output.file",Qs,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return re(nt("output.file",Qs,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},Vb=t=>{const e=t.format;switch(e){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 e;default:return re(nt("output.format",fh,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',e))}},Ub=(t,e)=>{const n=t.inlineDynamicImports||!1,{input:s}=e;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?re(nt("output.inlineDynamicImports",mh,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},qb=(t,e,n)=>{const s=t.preserveModules||!1;if(s){if(e)return re(nt("output.inlineDynamicImports",mh,'this option is not supported for "output.preserveModules"'));if(n.preserveEntrySignatures===!1)return re(nt("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},Hb=t=>{const{preserveModulesRoot:e}=t;if(e!=null)return St(e)},Wb=t=>{const e={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...t.amd};return(e.autoId||e.basePath)&&e.id?re(nt("output.amd.id",ph,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):e.basePath&&!e.autoId?re(nt("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):e.autoId?{autoId:!0,basePath:e.basePath,define:e.define,forceJsExtensionForImports:e.forceJsExtensionForImports}:{autoId:!1,define:e.define,forceJsExtensionForImports:e.forceJsExtensionForImports,id:e.id}},$o=(t,e)=>{const n=t[e];return typeof n=="function"?n:()=>n||""},Gb=(t,e)=>{const{dir:n}=t;return typeof n=="string"&&typeof e=="string"?re(nt("output.dir",Qs,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},Xb=(t,e)=>{const n=t.entryFileNames;return n==null&&e.add("entryFileNames"),n??"[name].js"};function Kb(t,e){const n=t.exports;if(n==null)e.add("exports");else if(!["default","named","none","auto"].includes(n))return re({code:kh,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:ot(ka)});return n||"auto"}const Jb=(t,e)=>(t.externalImportAssertions!=null&&jn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,e),t.externalImportAttributes??t.externalImportAssertions??!0),Yb=t=>{const e=ql(t.generatedCode,sb,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:e.arrowFunctions===!0,constBindings:e.constBindings===!0,objectShorthand:e.objectShorthand===!0,reservedNamesAsProps:e.reservedNamesAsProps!==!1,symbols:e.symbols===!0}},Qb=(t,e)=>{if(e)return"";const n=t.indent;return n===!1?"":n??!0},b1=new Set(["compat","auto","esModule","default","defaultOnly"]),Zb=t=>{const e=t.interop;if(typeof e=="function"){const n=Object.create(null);let s=null;return i=>i===null?s||Jl(s=e(i)):i in n?n[i]:Jl(n[i]=e(i))}return e===void 0?()=>"default":()=>Jl(e)},Jl=t=>b1.has(t)?t:re(nt("output.interop",Ea,`use one of ${Array.from(b1,e=>JSON.stringify(e)).join(", ")}`,t)),ex=(t,e,n)=>{const s=t.manualChunks;if(s){if(e)return re(nt("output.manualChunks",gh,'this option is not supported for "output.inlineDynamicImports"'));if(n)return re(nt("output.manualChunks",gh,'this option is not supported for "output.preserveModules"'))}return s||{}},tx=(t,e,n)=>t.minifyInternalExports??(n||e==="es"||e==="system"),nx=(t,e)=>{const n=t.sourcemapFileNames;return n==null&&e.add("sourcemapFileNames"),n},sx=t=>{const{sourcemapBaseUrl:e}=t;if(e)return(function(s){try{new URL(s)}catch{return!1}return!0})(e)?(n=e).endsWith("/")?n:n+"/":re(nt("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(e)}`));var n};function ix(t){return(async function(e,n){const{options:s,unsetOptions:i}=await(async function(c,u){if(!c)throw new Error("You must supply an options object to rollup");const d=await(async function(g,E){const x=Kl("options",await No(g.plugins)),A=g.logLevel||Fn,S=y1(x,n1(g,A),E,A);for(const k of x){const{name:v,options:I}=k,P="handler"in I?I.handler:I,F=await P.call({debug:Os(Ys,"PLUGIN_LOG",S,v,A),error:N=>re(Zs(en(N),v,{hook:"onLog"})),info:Os(Fn,"PLUGIN_LOG",S,v,A),meta:{rollupVersion:sa,watchMode:E},warn:Os(ye,"PLUGIN_WARNING",S,v,A)},g);F&&(g=F)}return g})(c,u),{options:m,unsetOptions:f}=await(async function(g,E){const x=new Set,A=g.context??"undefined",S=await No(g.plugins),k=g.logLevel||Fn,v=y1(S,n1(g,k),E,k),I=g.strictDeprecations||!1,P=Db(g),F={cache:$b(g),context:A,experimentalCacheExpiry:g.experimentalCacheExpiry??10,experimentalLogSideEffects:g.experimentalLogSideEffects||!1,external:Cb(g.external),fs:g.fs??Nb,input:Tb(g),jsx:Rb(g),logLevel:k,makeAbsoluteExternalsRelative:g.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:P,moduleContext:Ob(g,A),onLog:v,perf:g.perf||!1,plugins:S,preserveEntrySignatures:g.preserveEntrySignatures??"exports-only",preserveSymlinks:g.preserveSymlinks||!1,shimMissingExports:g.shimMissingExports||!1,strictDeprecations:I,treeshake:Lb(g)};return i1(g,[...Object.keys(F),"onwarn","watch"],"input options",v,/^(output)$/),{options:F,unsetOptions:x}})(d,u);return x1(m.plugins,Vl),{options:m,unsetOptions:f}})(e,n!==null);(function(c){c.perf?(Ni=new Map,ct=Iy,at=vy,c.plugins=c.plugins.map(Ny)):(ct=Rt,at=Rt)})(s),await(async function(){await Wd()})();const r=new mb(s,n),a=e.cache!==!1;e.cache&&(s.cache=void 0,e.cache=void 0),ct("BUILD",1),await g1(r.pluginDriver,async()=>{try{ct("initialize",2),await r.pluginDriver.hookParallel("buildStart",[s]),at("initialize",2),await r.build()}catch(c){const u=Object.keys(r.watchFiles);u.length>0&&(c.watchFiles=u);try{await r.pluginDriver.hookParallel("buildEnd",[c])}catch(d){const m=bs({...c,message:`There was an error during the build:
52
- ${c.message}
53
- Additionally, handling the error in the 'buildEnd' hook caused the following error:
54
- ${d.message}`});throw await r.pluginDriver.hookParallel("closeBundle",[m]),m}throw await r.pluginDriver.hookParallel("closeBundle",[c]),c}try{await r.pluginDriver.hookParallel("buildEnd",[])}catch(c){throw await r.pluginDriver.hookParallel("closeBundle",[c]),c}}),at("BUILD",1);const l={get cache(){return a?r.getCache():void 0},async close(){l.closed||(l.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async c=>l.closed?re({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):k1(!1,s,i,c,r),get watchFiles(){return Object.keys(r.watchFiles)},write:async c=>l.closed?re({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):k1(!0,s,i,c,r)};return s.perf&&(l.getTimings=_y),l})(t,null)}function x1(t,e){for(const[n,s]of t.entries())s.name||(s.name=`${e}${n+1}`)}async function k1(t,e,n,s,i){const{options:r,outputPluginDriver:a,unsetOptions:l}=await(async function(c,u,d,m){if(!c)throw new Error("You must supply an options object");const f=await No(c.plugins);x1(f,Ul);const g=u.createOutputPluginDriver(f);return{...await rx(d,m,c,g),outputPluginDriver:g}})(s,i.pluginDriver,e,n);return g1(0,async()=>{const c=new Jy(r,l,e,a,i),u=await c.generate(t);if(t){if(ct("WRITE",1),!r.dir&&!r.file)return re({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:ot(Qs)});await Promise.all(Object.values(u).map(m=>i.fileOperationQueue.run(()=>(async function(f,g,{fs:{mkdir:E,writeFile:x}}){const A=St(g.dir||cn(g.file),f.fileName);return await E(cn(A),{recursive:!0}),x(A,f.type==="asset"?f.source:f.code)})(m,r,e)))),await a.hookParallel("writeBundle",[r,u]),at("WRITE",1)}return d=u,{output:Object.values(d).filter(m=>Object.keys(m).length>0).sort((m,f)=>E1(m)-E1(f))};var d})}function rx(t,e,n,s){return(async function(i,r,a){const l=new Set(a),c=i.compact||!1,u=Vb(i),d=Ub(i,r),m=qb(i,d,r),f=zb(i,m,r),g=Yb(i),E=Jb(i,r),x={amd:Wb(i),assetFileNames:i.assetFileNames??"assets/[name]-[hash][extname]",banner:$o(i,"banner"),chunkFileNames:i.chunkFileNames??"[name]-[hash].js",compact:c,dir:Gb(i,f),dynamicImportInCjs:i.dynamicImportInCjs??!0,entryFileNames:Xb(i,l),esModule:i.esModule??"if-default-prop",experimentalMinChunkSize:i.experimentalMinChunkSize??1,exports:Kb(i,l),extend:i.extend||!1,externalImportAssertions:E,externalImportAttributes:E,externalLiveBindings:i.externalLiveBindings??!0,file:f,footer:$o(i,"footer"),format:u,freeze:i.freeze??!0,generatedCode:g,globals:i.globals||{},hashCharacters:i.hashCharacters??"base64",hoistTransitiveImports:i.hoistTransitiveImports??!0,importAttributesKey:i.importAttributesKey??"assert",indent:Qb(i,c),inlineDynamicImports:d,interop:Zb(i),intro:$o(i,"intro"),manualChunks:ex(i,d,m),minifyInternalExports:tx(i,u,c),name:i.name,noConflict:i.noConflict||!1,onlyExplicitManualChunks:i.onlyExplicitManualChunks||!1,outro:$o(i,"outro"),paths:i.paths||{},plugins:await No(i.plugins),preserveModules:m,preserveModulesRoot:Hb(i),reexportProtoFromExternal:i.reexportProtoFromExternal??!0,sanitizeFileName:typeof i.sanitizeFileName=="function"?i.sanitizeFileName:i.sanitizeFileName===!1?A=>A:jb,sourcemap:i.sourcemap||!1,sourcemapBaseUrl:sx(i),sourcemapDebugIds:i.sourcemapDebugIds||!1,sourcemapExcludeSources:i.sourcemapExcludeSources||!1,sourcemapFile:i.sourcemapFile,sourcemapFileNames:nx(i,l),sourcemapIgnoreList:typeof i.sourcemapIgnoreList=="function"?i.sourcemapIgnoreList:i.sourcemapIgnoreList===!1?()=>!1:A=>A.includes("node_modules"),sourcemapPathTransform:i.sourcemapPathTransform,strict:i.strict??!0,systemNullSetters:i.systemNullSetters??!0,validate:i.validate||!1,virtualDirname:i.virtualDirname||"_virtual"};return i1(i,Object.keys(x),"output options",r.onLog),{options:x,unsetOptions:l}})(s.hookReduceArg0Sync("outputOptions",[n],(i,r)=>r||i,i=>{const r=()=>i.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{...i,emitFile:r,setAssetSource:r}}),t,e)}var $i;function E1(t){return t.type==="asset"?$i.ASSET:t.isEntry?$i.ENTRY_CHUNK:$i.SECONDARY_CHUNK}Symbol.asyncDispose??=Symbol("Symbol.asyncDispose"),(function(t){t[t.ENTRY_CHUNK=0]="ENTRY_CHUNK",t[t.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",t[t.ASSET=2]="ASSET"})($i||($i={}));const ox=t=>t.length!==32||!/^[0-9a-f]{32}$/i.test(t)?!1:t[12]==="4",ax=()=>typeof globalThis.crypto<"u"?globalThis.crypto:require("node:crypto").webcrypto,lx=ax(),A1=()=>{const t=new Uint8Array(16);return lx.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")},cx=()=>A1().substring(0,8),ux=(t,e)=>{if(t&&t.files){for(const n of Object.keys(t.files))if(t.files[n].name===e)return n}return null},w1=(t,e)=>{const n=ux(t,e);return n&&t&&t.files?t.files[n].text:null},hx=t=>{const e={};if(!t)return e;for(const n of Object.values(t))e[n.name]=n.text;return e},dx=t=>Object.entries(t).reduce((e,[n,s])=>(e[cx()]={name:n,text:s},e),{});var w;(function(t){t[t.NONE=0]="NONE";const n=1;t[t._abstract=n]="_abstract";const s=n+1;t[t._accessor=s]="_accessor";const i=s+1;t[t._as=i]="_as";const r=i+1;t[t._assert=r]="_assert";const a=r+1;t[t._asserts=a]="_asserts";const l=a+1;t[t._async=l]="_async";const c=l+1;t[t._await=c]="_await";const u=c+1;t[t._checks=u]="_checks";const d=u+1;t[t._constructor=d]="_constructor";const m=d+1;t[t._declare=m]="_declare";const f=m+1;t[t._enum=f]="_enum";const g=f+1;t[t._exports=g]="_exports";const E=g+1;t[t._from=E]="_from";const x=E+1;t[t._get=x]="_get";const A=x+1;t[t._global=A]="_global";const S=A+1;t[t._implements=S]="_implements";const k=S+1;t[t._infer=k]="_infer";const v=k+1;t[t._interface=v]="_interface";const I=v+1;t[t._is=I]="_is";const P=I+1;t[t._keyof=P]="_keyof";const F=P+1;t[t._mixins=F]="_mixins";const N=F+1;t[t._module=N]="_module";const R=N+1;t[t._namespace=R]="_namespace";const B=R+1;t[t._of=B]="_of";const $=B+1;t[t._opaque=$]="_opaque";const T=$+1;t[t._out=T]="_out";const j=T+1;t[t._override=j]="_override";const le=j+1;t[t._private=le]="_private";const ue=le+1;t[t._protected=ue]="_protected";const U=ue+1;t[t._proto=U]="_proto";const K=U+1;t[t._public=K]="_public";const X=K+1;t[t._readonly=X]="_readonly";const Y=X+1;t[t._require=Y]="_require";const de=Y+1;t[t._satisfies=de]="_satisfies";const C=de+1;t[t._set=C]="_set";const fe=C+1;t[t._static=fe]="_static";const ne=fe+1;t[t._symbol=ne]="_symbol";const be=ne+1;t[t._type=be]="_type";const M=be+1;t[t._unique=M]="_unique";const b=M+1;t[t._using=b]="_using"})(w||(w={}));var o;(function(t){t[t.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";const n=16;t[t.IS_KEYWORD=n]="IS_KEYWORD";const s=32;t[t.IS_ASSIGN=s]="IS_ASSIGN";const i=64;t[t.IS_RIGHT_ASSOCIATIVE=i]="IS_RIGHT_ASSOCIATIVE";const r=128;t[t.IS_PREFIX=r]="IS_PREFIX";const a=256;t[t.IS_POSTFIX=a]="IS_POSTFIX";const l=512;t[t.IS_EXPRESSION_START=l]="IS_EXPRESSION_START";const c=512;t[t.num=c]="num";const u=1536;t[t.bigint=u]="bigint";const d=2560;t[t.decimal=d]="decimal";const m=3584;t[t.regexp=m]="regexp";const f=4608;t[t.string=f]="string";const g=5632;t[t.name=g]="name";const E=6144;t[t.eof=E]="eof";const x=7680;t[t.bracketL=x]="bracketL";const A=8192;t[t.bracketR=A]="bracketR";const S=9728;t[t.braceL=S]="braceL";const k=10752;t[t.braceBarL=k]="braceBarL";const v=11264;t[t.braceR=v]="braceR";const I=12288;t[t.braceBarR=I]="braceBarR";const P=13824;t[t.parenL=P]="parenL";const F=14336;t[t.parenR=F]="parenR";const N=15360;t[t.comma=N]="comma";const R=16384;t[t.semi=R]="semi";const B=17408;t[t.colon=B]="colon";const $=18432;t[t.doubleColon=$]="doubleColon";const T=19456;t[t.dot=T]="dot";const j=20480;t[t.question=j]="question";const le=21504;t[t.questionDot=le]="questionDot";const ue=22528;t[t.arrow=ue]="arrow";const U=23552;t[t.template=U]="template";const K=24576;t[t.ellipsis=K]="ellipsis";const X=25600;t[t.backQuote=X]="backQuote";const Y=27136;t[t.dollarBraceL=Y]="dollarBraceL";const de=27648;t[t.at=de]="at";const C=29184;t[t.hash=C]="hash";const fe=29728;t[t.eq=fe]="eq";const ne=30752;t[t.assign=ne]="assign";const be=32640;t[t.preIncDec=be]="preIncDec";const M=33664;t[t.postIncDec=M]="postIncDec";const b=34432;t[t.bang=b]="bang";const O=35456;t[t.tilde=O]="tilde";const D=35841;t[t.pipeline=D]="pipeline";const H=36866;t[t.nullishCoalescing=H]="nullishCoalescing";const Q=37890;t[t.logicalOR=Q]="logicalOR";const oe=38915;t[t.logicalAND=oe]="logicalAND";const se=39940;t[t.bitwiseOR=se]="bitwiseOR";const Ne=40965;t[t.bitwiseXOR=Ne]="bitwiseXOR";const $e=41990;t[t.bitwiseAND=$e]="bitwiseAND";const Ae=43015;t[t.equality=Ae]="equality";const he=44040;t[t.lessThan=he]="lessThan";const Me=45064;t[t.greaterThan=Me]="greaterThan";const Ge=46088;t[t.relationalOrEqual=Ge]="relationalOrEqual";const ee=47113;t[t.bitShiftL=ee]="bitShiftL";const ke=48137;t[t.bitShiftR=ke]="bitShiftR";const J=49802;t[t.plus=J]="plus";const Ee=50826;t[t.minus=Ee]="minus";const Xe=51723;t[t.modulo=Xe]="modulo";const lt=52235;t[t.star=lt]="star";const Ye=53259;t[t.slash=Ye]="slash";const kn=54348;t[t.exponent=kn]="exponent";const an=55296;t[t.jsxName=an]="jsxName";const Qi=56320;t[t.jsxText=Qi]="jsxText";const su=57344;t[t.jsxEmptyText=su]="jsxEmptyText";const iu=58880;t[t.jsxTagStart=iu]="jsxTagStart";const ru=59392;t[t.jsxTagEnd=ru]="jsxTagEnd";const ou=60928;t[t.typeParameterStart=ou]="typeParameterStart";const au=61440;t[t.nonNullAssertion=au]="nonNullAssertion";const lu=62480;t[t._break=lu]="_break";const cu=63504;t[t._case=cu]="_case";const uu=64528;t[t._catch=uu]="_catch";const hu=65552;t[t._continue=hu]="_continue";const du=66576;t[t._debugger=du]="_debugger";const pu=67600;t[t._default=pu]="_default";const fu=68624;t[t._do=fu]="_do";const mu=69648;t[t._else=mu]="_else";const gu=70672;t[t._finally=gu]="_finally";const yu=71696;t[t._for=yu]="_for";const bu=73232;t[t._function=bu]="_function";const xu=73744;t[t._if=xu]="_if";const ku=74768;t[t._return=ku]="_return";const Eu=75792;t[t._switch=Eu]="_switch";const Au=77456;t[t._throw=Au]="_throw";const wu=77840;t[t._try=wu]="_try";const Su=78864;t[t._var=Su]="_var";const Iu=79888;t[t._let=Iu]="_let";const vu=80912;t[t._const=vu]="_const";const _u=81936;t[t._while=_u]="_while";const Pu=82960;t[t._with=Pu]="_with";const Nu=84496;t[t._new=Nu]="_new";const $u=85520;t[t._this=$u]="_this";const Cu=86544;t[t._super=Cu]="_super";const Tu=87568;t[t._class=Tu]="_class";const Ru=88080;t[t._extends=Ru]="_extends";const Du=89104;t[t._export=Du]="_export";const Ou=90640;t[t._import=Ou]="_import";const Lu=91664;t[t._yield=Lu]="_yield";const Mu=92688;t[t._null=Mu]="_null";const Fu=93712;t[t._true=Fu]="_true";const Bu=94736;t[t._false=Bu]="_false";const ju=95256;t[t._in=ju]="_in";const zu=96280;t[t._instanceof=zu]="_instanceof";const Vu=97936;t[t._typeof=Vu]="_typeof";const Uu=98960;t[t._void=Uu]="_void";const cI=99984;t[t._delete=cI]="_delete";const uI=100880;t[t._async=uI]="_async";const hI=101904;t[t._get=hI]="_get";const dI=102928;t[t._set=dI]="_set";const pI=103952;t[t._declare=pI]="_declare";const fI=104976;t[t._readonly=fI]="_readonly";const mI=106e3;t[t._abstract=mI]="_abstract";const gI=107024;t[t._static=gI]="_static";const yI=107536;t[t._public=yI]="_public";const bI=108560;t[t._private=bI]="_private";const xI=109584;t[t._protected=xI]="_protected";const kI=110608;t[t._override=kI]="_override";const EI=112144;t[t._as=EI]="_as";const AI=113168;t[t._enum=AI]="_enum";const wI=114192;t[t._type=wI]="_type";const SI=115216;t[t._implements=SI]="_implements"})(o||(o={}));function px(t){switch(t){case o.num:return"num";case o.bigint:return"bigint";case o.decimal:return"decimal";case o.regexp:return"regexp";case o.string:return"string";case o.name:return"name";case o.eof:return"eof";case o.bracketL:return"[";case o.bracketR:return"]";case o.braceL:return"{";case o.braceBarL:return"{|";case o.braceR:return"}";case o.braceBarR:return"|}";case o.parenL:return"(";case o.parenR:return")";case o.comma:return",";case o.semi:return";";case o.colon:return":";case o.doubleColon:return"::";case o.dot:return".";case o.question:return"?";case o.questionDot:return"?.";case o.arrow:return"=>";case o.template:return"template";case o.ellipsis:return"...";case o.backQuote:return"`";case o.dollarBraceL:return"${";case o.at:return"@";case o.hash:return"#";case o.eq:return"=";case o.assign:return"_=";case o.preIncDec:return"++/--";case o.postIncDec:return"++/--";case o.bang:return"!";case o.tilde:return"~";case o.pipeline:return"|>";case o.nullishCoalescing:return"??";case o.logicalOR:return"||";case o.logicalAND:return"&&";case o.bitwiseOR:return"|";case o.bitwiseXOR:return"^";case o.bitwiseAND:return"&";case o.equality:return"==/!=";case o.lessThan:return"<";case o.greaterThan:return">";case o.relationalOrEqual:return"<=/>=";case o.bitShiftL:return"<<";case o.bitShiftR:return">>/>>>";case o.plus:return"+";case o.minus:return"-";case o.modulo:return"%";case o.star:return"*";case o.slash:return"/";case o.exponent:return"**";case o.jsxName:return"jsxName";case o.jsxText:return"jsxText";case o.jsxEmptyText:return"jsxEmptyText";case o.jsxTagStart:return"jsxTagStart";case o.jsxTagEnd:return"jsxTagEnd";case o.typeParameterStart:return"typeParameterStart";case o.nonNullAssertion:return"nonNullAssertion";case o._break:return"break";case o._case:return"case";case o._catch:return"catch";case o._continue:return"continue";case o._debugger:return"debugger";case o._default:return"default";case o._do:return"do";case o._else:return"else";case o._finally:return"finally";case o._for:return"for";case o._function:return"function";case o._if:return"if";case o._return:return"return";case o._switch:return"switch";case o._throw:return"throw";case o._try:return"try";case o._var:return"var";case o._let:return"let";case o._const:return"const";case o._while:return"while";case o._with:return"with";case o._new:return"new";case o._this:return"this";case o._super:return"super";case o._class:return"class";case o._extends:return"extends";case o._export:return"export";case o._import:return"import";case o._yield:return"yield";case o._null:return"null";case o._true:return"true";case o._false:return"false";case o._in:return"in";case o._instanceof:return"instanceof";case o._typeof:return"typeof";case o._void:return"void";case o._delete:return"delete";case o._async:return"async";case o._get:return"get";case o._set:return"set";case o._declare:return"declare";case o._readonly:return"readonly";case o._abstract:return"abstract";case o._static:return"static";case o._public:return"public";case o._private:return"private";case o._protected:return"protected";case o._override:return"override";case o._as:return"as";case o._enum:return"enum";case o._type:return"type";case o._implements:return"implements";default:return""}}class tn{constructor(e,n,s){this.startTokenIndex=e,this.endTokenIndex=n,this.isFunctionScope=s}}class fx{constructor(e,n,s,i,r,a,l,c,u,d,m,f,g){this.potentialArrowAt=e,this.noAnonFunctionType=n,this.inDisallowConditionalTypesContext=s,this.tokensLength=i,this.scopesLength=r,this.pos=a,this.type=l,this.contextualKeyword=c,this.start=u,this.end=d,this.isType=m,this.scopeDepth=f,this.error=g}}class At{constructor(){At.prototype.__init.call(this),At.prototype.__init2.call(this),At.prototype.__init3.call(this),At.prototype.__init4.call(this),At.prototype.__init5.call(this),At.prototype.__init6.call(this),At.prototype.__init7.call(this),At.prototype.__init8.call(this),At.prototype.__init9.call(this),At.prototype.__init10.call(this),At.prototype.__init11.call(this),At.prototype.__init12.call(this),At.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=o.eof}__init8(){this.contextualKeyword=w.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new fx(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.inDisallowConditionalTypesContext=e.inDisallowConditionalTypesContext,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}}var _;(function(t){t[t.backSpace=8]="backSpace";const n=10;t[t.lineFeed=n]="lineFeed";const s=9;t[t.tab=s]="tab";const i=13;t[t.carriageReturn=i]="carriageReturn";const r=14;t[t.shiftOut=r]="shiftOut";const a=32;t[t.space=a]="space";const l=33;t[t.exclamationMark=l]="exclamationMark";const c=34;t[t.quotationMark=c]="quotationMark";const u=35;t[t.numberSign=u]="numberSign";const d=36;t[t.dollarSign=d]="dollarSign";const m=37;t[t.percentSign=m]="percentSign";const f=38;t[t.ampersand=f]="ampersand";const g=39;t[t.apostrophe=g]="apostrophe";const E=40;t[t.leftParenthesis=E]="leftParenthesis";const x=41;t[t.rightParenthesis=x]="rightParenthesis";const A=42;t[t.asterisk=A]="asterisk";const S=43;t[t.plusSign=S]="plusSign";const k=44;t[t.comma=k]="comma";const v=45;t[t.dash=v]="dash";const I=46;t[t.dot=I]="dot";const P=47;t[t.slash=P]="slash";const F=48;t[t.digit0=F]="digit0";const N=49;t[t.digit1=N]="digit1";const R=50;t[t.digit2=R]="digit2";const B=51;t[t.digit3=B]="digit3";const $=52;t[t.digit4=$]="digit4";const T=53;t[t.digit5=T]="digit5";const j=54;t[t.digit6=j]="digit6";const le=55;t[t.digit7=le]="digit7";const ue=56;t[t.digit8=ue]="digit8";const U=57;t[t.digit9=U]="digit9";const K=58;t[t.colon=K]="colon";const X=59;t[t.semicolon=X]="semicolon";const Y=60;t[t.lessThan=Y]="lessThan";const de=61;t[t.equalsTo=de]="equalsTo";const C=62;t[t.greaterThan=C]="greaterThan";const fe=63;t[t.questionMark=fe]="questionMark";const ne=64;t[t.atSign=ne]="atSign";const be=65;t[t.uppercaseA=be]="uppercaseA";const M=66;t[t.uppercaseB=M]="uppercaseB";const b=67;t[t.uppercaseC=b]="uppercaseC";const O=68;t[t.uppercaseD=O]="uppercaseD";const D=69;t[t.uppercaseE=D]="uppercaseE";const H=70;t[t.uppercaseF=H]="uppercaseF";const Q=71;t[t.uppercaseG=Q]="uppercaseG";const oe=72;t[t.uppercaseH=oe]="uppercaseH";const se=73;t[t.uppercaseI=se]="uppercaseI";const Ne=74;t[t.uppercaseJ=Ne]="uppercaseJ";const $e=75;t[t.uppercaseK=$e]="uppercaseK";const Ae=76;t[t.uppercaseL=Ae]="uppercaseL";const he=77;t[t.uppercaseM=he]="uppercaseM";const Me=78;t[t.uppercaseN=Me]="uppercaseN";const Ge=79;t[t.uppercaseO=Ge]="uppercaseO";const ee=80;t[t.uppercaseP=ee]="uppercaseP";const ke=81;t[t.uppercaseQ=ke]="uppercaseQ";const J=82;t[t.uppercaseR=J]="uppercaseR";const Ee=83;t[t.uppercaseS=Ee]="uppercaseS";const Xe=84;t[t.uppercaseT=Xe]="uppercaseT";const lt=85;t[t.uppercaseU=lt]="uppercaseU";const Ye=86;t[t.uppercaseV=Ye]="uppercaseV";const kn=87;t[t.uppercaseW=kn]="uppercaseW";const an=88;t[t.uppercaseX=an]="uppercaseX";const Qi=89;t[t.uppercaseY=Qi]="uppercaseY";const su=90;t[t.uppercaseZ=su]="uppercaseZ";const iu=91;t[t.leftSquareBracket=iu]="leftSquareBracket";const ru=92;t[t.backslash=ru]="backslash";const ou=93;t[t.rightSquareBracket=ou]="rightSquareBracket";const au=94;t[t.caret=au]="caret";const lu=95;t[t.underscore=lu]="underscore";const cu=96;t[t.graveAccent=cu]="graveAccent";const uu=97;t[t.lowercaseA=uu]="lowercaseA";const hu=98;t[t.lowercaseB=hu]="lowercaseB";const du=99;t[t.lowercaseC=du]="lowercaseC";const pu=100;t[t.lowercaseD=pu]="lowercaseD";const fu=101;t[t.lowercaseE=fu]="lowercaseE";const mu=102;t[t.lowercaseF=mu]="lowercaseF";const gu=103;t[t.lowercaseG=gu]="lowercaseG";const yu=104;t[t.lowercaseH=yu]="lowercaseH";const bu=105;t[t.lowercaseI=bu]="lowercaseI";const xu=106;t[t.lowercaseJ=xu]="lowercaseJ";const ku=107;t[t.lowercaseK=ku]="lowercaseK";const Eu=108;t[t.lowercaseL=Eu]="lowercaseL";const Au=109;t[t.lowercaseM=Au]="lowercaseM";const wu=110;t[t.lowercaseN=wu]="lowercaseN";const Su=111;t[t.lowercaseO=Su]="lowercaseO";const Iu=112;t[t.lowercaseP=Iu]="lowercaseP";const vu=113;t[t.lowercaseQ=vu]="lowercaseQ";const _u=114;t[t.lowercaseR=_u]="lowercaseR";const Pu=115;t[t.lowercaseS=Pu]="lowercaseS";const Nu=116;t[t.lowercaseT=Nu]="lowercaseT";const $u=117;t[t.lowercaseU=$u]="lowercaseU";const Cu=118;t[t.lowercaseV=Cu]="lowercaseV";const Tu=119;t[t.lowercaseW=Tu]="lowercaseW";const Ru=120;t[t.lowercaseX=Ru]="lowercaseX";const Du=121;t[t.lowercaseY=Du]="lowercaseY";const Ou=122;t[t.lowercaseZ=Ou]="lowercaseZ";const Lu=123;t[t.leftCurlyBrace=Lu]="leftCurlyBrace";const Mu=124;t[t.verticalBar=Mu]="verticalBar";const Fu=125;t[t.rightCurlyBrace=Fu]="rightCurlyBrace";const Bu=126;t[t.tilde=Bu]="tilde";const ju=160;t[t.nonBreakingSpace=ju]="nonBreakingSpace";const zu=5760;t[t.oghamSpaceMark=zu]="oghamSpaceMark";const Vu=8232;t[t.lineSeparator=Vu]="lineSeparator";const Uu=8233;t[t.paragraphSeparator=Uu]="paragraphSeparator"})(_||(_={}));let Co,De,Be,h,te,S1;function Ci(){return S1++}function mx(t){if("pos"in t){const e=yx(t.pos);t.message+=` (${e.line}:${e.column})`,t.loc=e}return t}class gx{constructor(e,n){this.line=e,this.column=n}}function yx(t){let e=1,n=1;for(let s=0;s<t;s++)te.charCodeAt(s)===_.lineFeed?(e++,n=1):n++;return new gx(e,n)}function bx(t,e,n,s){te=t,h=new At,S1=1,Co=e,De=n,Be=s}function pe(t){return h.contextualKeyword===t}function Yl(t){const e=Ri();return e.type===o.name&&e.contextualKeyword===t}function ut(t){return h.contextualKeyword===t&&L(o.name)}function it(t){ut(t)||we()}function Ct(){return y(o.eof)||y(o.braceR)||wt()}function wt(){const t=h.tokens[h.tokens.length-1],e=t?t.end:0;for(let n=e;n<h.start;n++){const s=te.charCodeAt(n);if(s===_.lineFeed||s===_.carriageReturn||s===8232||s===8233)return!0}return!1}function I1(){const t=Ql();for(let e=h.end;e<t;e++){const n=te.charCodeAt(e);if(n===_.lineFeed||n===_.carriageReturn||n===8232||n===8233)return!0}return!1}function nn(){return L(o.semi)||Ct()}function Je(){nn()||we('Unexpected token, expected ";"')}function z(t){L(t)||we(`Unexpected token, expected "${px(t)}"`)}function we(t="Unexpected token",e=h.start){if(h.error)return;const n=new SyntaxError(t);n.pos=e,h.error=n,h.pos=te.length,Se(o.eof)}const v1=[9,11,12,_.space,_.nonBreakingSpace,_.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],_1=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,P1=new Uint8Array(65536);for(const t of v1)P1[t]=1;function xx(t){if(t<48)return t===36;if(t<58)return!0;if(t<65)return!1;if(t<91)return!0;if(t<97)return t===95;if(t<123)return!0;if(t<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const zt=new Uint8Array(65536);for(let t=0;t<128;t++)zt[t]=xx(t)?1:0;for(let t=128;t<65536;t++)zt[t]=1;for(const t of v1)zt[t]=0;zt[8232]=0,zt[8233]=0;const Ti=zt.slice();for(let t=_.digit0;t<=_.digit9;t++)Ti[t]=0;const N1=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,w._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,w._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,w._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,w._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,w._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,w._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(o._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(o._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,w._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(o._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(o._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(o._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,w._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(o._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(o._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(o._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,w._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(o._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,w._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(o._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,w._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(o._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,w._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(o._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,w._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,w._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,w._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,w._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,w._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(o._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(o._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(o._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,w._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,(o._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(o._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function kx(){let t=0,e=0,n=h.pos;for(;n<te.length&&(e=te.charCodeAt(n),!(e<_.lowercaseA||e>_.lowercaseZ));){const i=N1[t+(e-_.lowercaseA)+1];if(i===-1)break;t=i,n++}const s=N1[t];if(s>-1&&!zt[e]){h.pos=n,s&1?Se(s>>>1):Se(o.name,s>>>1);return}for(;n<te.length;){const i=te.charCodeAt(n);if(zt[i])n++;else if(i===_.backslash){if(n+=2,te.charCodeAt(n)===_.leftCurlyBrace){for(;n<te.length&&te.charCodeAt(n)!==_.rightCurlyBrace;)n++;n++}}else if(i===_.atSign&&te.charCodeAt(n+1)===_.atSign)n+=2;else break}h.pos=n,Se(o.name)}var me;(function(t){t[t.Access=0]="Access";const n=1;t[t.ExportAccess=n]="ExportAccess";const s=n+1;t[t.TopLevelDeclaration=s]="TopLevelDeclaration";const i=s+1;t[t.FunctionScopedDeclaration=i]="FunctionScopedDeclaration";const r=i+1;t[t.BlockScopedDeclaration=r]="BlockScopedDeclaration";const a=r+1;t[t.ObjectShorthandTopLevelDeclaration=a]="ObjectShorthandTopLevelDeclaration";const l=a+1;t[t.ObjectShorthandFunctionScopedDeclaration=l]="ObjectShorthandFunctionScopedDeclaration";const c=l+1;t[t.ObjectShorthandBlockScopedDeclaration=c]="ObjectShorthandBlockScopedDeclaration";const u=c+1;t[t.ObjectShorthand=u]="ObjectShorthand";const d=u+1;t[t.ImportDeclaration=d]="ImportDeclaration";const m=d+1;t[t.ObjectKey=m]="ObjectKey";const f=m+1;t[t.ImportAccess=f]="ImportAccess"})(me||(me={}));var Vt;(function(t){t[t.NoChildren=0]="NoChildren";const n=1;t[t.OneChild=n]="OneChild";const s=n+1;t[t.StaticChildren=s]="StaticChildren";const i=s+1;t[t.KeyAfterPropSpread=i]="KeyAfterPropSpread"})(Vt||(Vt={}));function $1(t){const e=t.identifierRole;return e===me.TopLevelDeclaration||e===me.FunctionScopedDeclaration||e===me.BlockScopedDeclaration||e===me.ObjectShorthandTopLevelDeclaration||e===me.ObjectShorthandFunctionScopedDeclaration||e===me.ObjectShorthandBlockScopedDeclaration}function Ex(t){const e=t.identifierRole;return e===me.FunctionScopedDeclaration||e===me.BlockScopedDeclaration||e===me.ObjectShorthandFunctionScopedDeclaration||e===me.ObjectShorthandBlockScopedDeclaration}function C1(t){const e=t.identifierRole;return e===me.TopLevelDeclaration||e===me.ObjectShorthandTopLevelDeclaration||e===me.ImportDeclaration}function Ax(t){const e=t.identifierRole;return e===me.TopLevelDeclaration||e===me.BlockScopedDeclaration||e===me.ObjectShorthandTopLevelDeclaration||e===me.ObjectShorthandBlockScopedDeclaration}function wx(t){const e=t.identifierRole;return e===me.FunctionScopedDeclaration||e===me.ObjectShorthandFunctionScopedDeclaration}function Sx(t){return t.identifierRole===me.ObjectShorthandTopLevelDeclaration||t.identifierRole===me.ObjectShorthandBlockScopedDeclaration||t.identifierRole===me.ObjectShorthandFunctionScopedDeclaration}class To{constructor(){this.type=h.type,this.contextualKeyword=h.contextualKeyword,this.start=h.start,this.end=h.end,this.scopeDepth=h.scopeDepth,this.isType=h.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}}function V(){h.tokens.push(new To),O1()}function Nn(){h.tokens.push(new To),h.start=h.pos,zx()}function Ix(){h.type===o.assign&&--h.pos,Fx()}function Pe(t){for(let n=h.tokens.length-t;n<h.tokens.length;n++)h.tokens[n].isType=!0;const e=h.isType;return h.isType=!0,e}function _e(t){h.isType=t}function L(t){return y(t)?(V(),!0):!1}function T1(t){const e=h.isType;h.isType=!0,L(t),h.isType=e}function y(t){return h.type===t}function et(){const t=h.snapshot();V();const e=h.type;return h.restoreFromSnapshot(t),e}class vx{constructor(e,n){this.type=e,this.contextualKeyword=n}}function Ri(){const t=h.snapshot();V();const e=h.type,n=h.contextualKeyword;return h.restoreFromSnapshot(t),new vx(e,n)}function Ql(){return R1(h.pos)}function R1(t){_1.lastIndex=t;const e=_1.exec(te);return t+e[0].length}function D1(){return te.charCodeAt(Ql())}function O1(){if(M1(),h.start=h.pos,h.pos>=te.length){const t=h.tokens;t.length>=2&&t[t.length-1].start>=te.length&&t[t.length-2].start>=te.length&&we("Unexpectedly reached the end of input."),Se(o.eof);return}_x(te.charCodeAt(h.pos))}function _x(t){Ti[t]||t===_.backslash||t===_.atSign&&te.charCodeAt(h.pos+1)===_.atSign?kx():j1(t)}function Px(){for(;te.charCodeAt(h.pos)!==_.asterisk||te.charCodeAt(h.pos+1)!==_.slash;)if(h.pos++,h.pos>te.length){we("Unterminated comment",h.pos-2);return}h.pos+=2}function L1(t){let e=te.charCodeAt(h.pos+=t);if(h.pos<te.length)for(;e!==_.lineFeed&&e!==_.carriageReturn&&e!==_.lineSeparator&&e!==_.paragraphSeparator&&++h.pos<te.length;)e=te.charCodeAt(h.pos)}function M1(){for(;h.pos<te.length;){const t=te.charCodeAt(h.pos);switch(t){case _.carriageReturn:te.charCodeAt(h.pos+1)===_.lineFeed&&++h.pos;case _.lineFeed:case _.lineSeparator:case _.paragraphSeparator:++h.pos;break;case _.slash:switch(te.charCodeAt(h.pos+1)){case _.asterisk:h.pos+=2,Px();break;case _.slash:L1(2);break;default:return}break;default:if(P1[t])++h.pos;else return}}}function Se(t,e=w.NONE){h.end=h.pos,h.type=t,h.contextualKeyword=e}function Nx(){const t=te.charCodeAt(h.pos+1);if(t>=_.digit0&&t<=_.digit9){z1(!0);return}t===_.dot&&te.charCodeAt(h.pos+2)===_.dot?(h.pos+=3,Se(o.ellipsis)):(++h.pos,Se(o.dot))}function $x(){te.charCodeAt(h.pos+1)===_.equalsTo?je(o.assign,2):je(o.slash,1)}function Cx(t){let e=t===_.asterisk?o.star:o.modulo,n=1,s=te.charCodeAt(h.pos+1);t===_.asterisk&&s===_.asterisk&&(n++,s=te.charCodeAt(h.pos+2),e=o.exponent),s===_.equalsTo&&te.charCodeAt(h.pos+2)!==_.greaterThan&&(n++,e=o.assign),je(e,n)}function Tx(t){const e=te.charCodeAt(h.pos+1);if(e===t){te.charCodeAt(h.pos+2)===_.equalsTo?je(o.assign,3):je(t===_.verticalBar?o.logicalOR:o.logicalAND,2);return}if(t===_.verticalBar){if(e===_.greaterThan){je(o.pipeline,2);return}else if(e===_.rightCurlyBrace&&Be){je(o.braceBarR,2);return}}if(e===_.equalsTo){je(o.assign,2);return}je(t===_.verticalBar?o.bitwiseOR:o.bitwiseAND,1)}function Rx(){te.charCodeAt(h.pos+1)===_.equalsTo?je(o.assign,2):je(o.bitwiseXOR,1)}function Dx(t){const e=te.charCodeAt(h.pos+1);if(e===t){je(o.preIncDec,2);return}e===_.equalsTo?je(o.assign,2):t===_.plusSign?je(o.plus,1):je(o.minus,1)}function Ox(){const t=te.charCodeAt(h.pos+1);if(t===_.lessThan){if(te.charCodeAt(h.pos+2)===_.equalsTo){je(o.assign,3);return}h.isType?je(o.lessThan,1):je(o.bitShiftL,2);return}t===_.equalsTo?je(o.relationalOrEqual,2):je(o.lessThan,1)}function F1(){if(h.isType){je(o.greaterThan,1);return}const t=te.charCodeAt(h.pos+1);if(t===_.greaterThan){const e=te.charCodeAt(h.pos+2)===_.greaterThan?3:2;if(te.charCodeAt(h.pos+e)===_.equalsTo){je(o.assign,e+1);return}je(o.bitShiftR,e);return}t===_.equalsTo?je(o.relationalOrEqual,2):je(o.greaterThan,1)}function B1(){h.type===o.greaterThan&&(h.pos-=1,F1())}function Lx(t){const e=te.charCodeAt(h.pos+1);if(e===_.equalsTo){je(o.equality,te.charCodeAt(h.pos+2)===_.equalsTo?3:2);return}if(t===_.equalsTo&&e===_.greaterThan){h.pos+=2,Se(o.arrow);return}je(t===_.equalsTo?o.eq:o.bang,1)}function Mx(){const t=te.charCodeAt(h.pos+1),e=te.charCodeAt(h.pos+2);t===_.questionMark&&!(Be&&h.isType)?e===_.equalsTo?je(o.assign,3):je(o.nullishCoalescing,2):t===_.dot&&!(e>=_.digit0&&e<=_.digit9)?(h.pos+=2,Se(o.questionDot)):(++h.pos,Se(o.question))}function j1(t){switch(t){case _.numberSign:++h.pos,Se(o.hash);return;case _.dot:Nx();return;case _.leftParenthesis:++h.pos,Se(o.parenL);return;case _.rightParenthesis:++h.pos,Se(o.parenR);return;case _.semicolon:++h.pos,Se(o.semi);return;case _.comma:++h.pos,Se(o.comma);return;case _.leftSquareBracket:++h.pos,Se(o.bracketL);return;case _.rightSquareBracket:++h.pos,Se(o.bracketR);return;case _.leftCurlyBrace:Be&&te.charCodeAt(h.pos+1)===_.verticalBar?je(o.braceBarL,2):(++h.pos,Se(o.braceL));return;case _.rightCurlyBrace:++h.pos,Se(o.braceR);return;case _.colon:te.charCodeAt(h.pos+1)===_.colon?je(o.doubleColon,2):(++h.pos,Se(o.colon));return;case _.questionMark:Mx();return;case _.atSign:++h.pos,Se(o.at);return;case _.graveAccent:++h.pos,Se(o.backQuote);return;case _.digit0:{const e=te.charCodeAt(h.pos+1);if(e===_.lowercaseX||e===_.uppercaseX||e===_.lowercaseO||e===_.uppercaseO||e===_.lowercaseB||e===_.uppercaseB){Bx();return}}case _.digit1:case _.digit2:case _.digit3:case _.digit4:case _.digit5:case _.digit6:case _.digit7:case _.digit8:case _.digit9:z1(!1);return;case _.quotationMark:case _.apostrophe:jx(t);return;case _.slash:$x();return;case _.percentSign:case _.asterisk:Cx(t);return;case _.verticalBar:case _.ampersand:Tx(t);return;case _.caret:Rx();return;case _.plusSign:case _.dash:Dx(t);return;case _.lessThan:Ox();return;case _.greaterThan:F1();return;case _.equalsTo:case _.exclamationMark:Lx(t);return;case _.tilde:je(o.tilde,1);return}we(`Unexpected character '${String.fromCharCode(t)}'`,h.pos)}function je(t,e){h.pos+=e,Se(t)}function Fx(){const t=h.pos;let e=!1,n=!1;for(;;){if(h.pos>=te.length){we("Unterminated regular expression",t);return}const s=te.charCodeAt(h.pos);if(e)e=!1;else{if(s===_.leftSquareBracket)n=!0;else if(s===_.rightSquareBracket&&n)n=!1;else if(s===_.slash&&!n)break;e=s===_.backslash}++h.pos}++h.pos,Vx(),Se(o.regexp)}function Zl(){for(;;){const t=te.charCodeAt(h.pos);if(t>=_.digit0&&t<=_.digit9||t===_.underscore)h.pos++;else break}}function Bx(){for(h.pos+=2;;){const e=te.charCodeAt(h.pos);if(e>=_.digit0&&e<=_.digit9||e>=_.lowercaseA&&e<=_.lowercaseF||e>=_.uppercaseA&&e<=_.uppercaseF||e===_.underscore)h.pos++;else break}te.charCodeAt(h.pos)===_.lowercaseN?(++h.pos,Se(o.bigint)):Se(o.num)}function z1(t){let e=!1,n=!1;t||Zl();let s=te.charCodeAt(h.pos);if(s===_.dot&&(++h.pos,Zl(),s=te.charCodeAt(h.pos)),(s===_.uppercaseE||s===_.lowercaseE)&&(s=te.charCodeAt(++h.pos),(s===_.plusSign||s===_.dash)&&++h.pos,Zl(),s=te.charCodeAt(h.pos)),s===_.lowercaseN?(++h.pos,e=!0):s===_.lowercaseM&&(++h.pos,n=!0),e){Se(o.bigint);return}if(n){Se(o.decimal);return}Se(o.num)}function jx(t){for(h.pos++;;){if(h.pos>=te.length){we("Unterminated string constant");return}const e=te.charCodeAt(h.pos);if(e===_.backslash)h.pos++;else if(e===t)break;h.pos++}h.pos++,Se(o.string)}function zx(){for(;;){if(h.pos>=te.length){we("Unterminated template");return}const t=te.charCodeAt(h.pos);if(t===_.graveAccent||t===_.dollarSign&&te.charCodeAt(h.pos+1)===_.leftCurlyBrace){if(h.pos===h.start&&y(o.template))if(t===_.dollarSign){h.pos+=2,Se(o.dollarBraceL);return}else{++h.pos,Se(o.backQuote);return}Se(o.template);return}t===_.backslash&&h.pos++,h.pos++}}function Vx(){for(;h.pos<te.length;){const t=te.charCodeAt(h.pos);if(zt[t])h.pos++;else if(t===_.backslash){if(h.pos+=2,te.charCodeAt(h.pos)===_.leftCurlyBrace){for(;h.pos<te.length&&te.charCodeAt(h.pos)!==_.rightCurlyBrace;)h.pos++;h.pos++}}else break}}function Di(t,e=t.currentIndex()){let n=e+1;if(Ro(t,n)){const s=t.identifierNameAtIndex(e);return{isType:!1,leftName:s,rightName:s,endIndex:n}}if(n++,Ro(t,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,Ro(t,n))return{isType:!1,leftName:t.identifierNameAtIndex(e),rightName:t.identifierNameAtIndex(e+2),endIndex:n};if(n++,Ro(t,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw new Error(`Unexpected import/export specifier at ${e}`)}function Ro(t,e){const n=t.tokens[e];return n.type===o.braceR||n.type===o.comma}var Ux=new Map([["quot",'"'],["amp","&"],["apos","'"],["lt","<"],["gt",">"],["nbsp"," "],["iexcl","¡"],["cent","¢"],["pound","£"],["curren","¤"],["yen","¥"],["brvbar","¦"],["sect","§"],["uml","¨"],["copy","©"],["ordf","ª"],["laquo","«"],["not","¬"],["shy","­"],["reg","®"],["macr","¯"],["deg","°"],["plusmn","±"],["sup2","²"],["sup3","³"],["acute","´"],["micro","µ"],["para","¶"],["middot","·"],["cedil","¸"],["sup1","¹"],["ordm","º"],["raquo","»"],["frac14","¼"],["frac12","½"],["frac34","¾"],["iquest","¿"],["Agrave","À"],["Aacute","Á"],["Acirc","Â"],["Atilde","Ã"],["Auml","Ä"],["Aring","Å"],["AElig","Æ"],["Ccedil","Ç"],["Egrave","È"],["Eacute","É"],["Ecirc","Ê"],["Euml","Ë"],["Igrave","Ì"],["Iacute","Í"],["Icirc","Î"],["Iuml","Ï"],["ETH","Ð"],["Ntilde","Ñ"],["Ograve","Ò"],["Oacute","Ó"],["Ocirc","Ô"],["Otilde","Õ"],["Ouml","Ö"],["times","×"],["Oslash","Ø"],["Ugrave","Ù"],["Uacute","Ú"],["Ucirc","Û"],["Uuml","Ü"],["Yacute","Ý"],["THORN","Þ"],["szlig","ß"],["agrave","à"],["aacute","á"],["acirc","â"],["atilde","ã"],["auml","ä"],["aring","å"],["aelig","æ"],["ccedil","ç"],["egrave","è"],["eacute","é"],["ecirc","ê"],["euml","ë"],["igrave","ì"],["iacute","í"],["icirc","î"],["iuml","ï"],["eth","ð"],["ntilde","ñ"],["ograve","ò"],["oacute","ó"],["ocirc","ô"],["otilde","õ"],["ouml","ö"],["divide","÷"],["oslash","ø"],["ugrave","ù"],["uacute","ú"],["ucirc","û"],["uuml","ü"],["yacute","ý"],["thorn","þ"],["yuml","ÿ"],["OElig","Œ"],["oelig","œ"],["Scaron","Š"],["scaron","š"],["Yuml","Ÿ"],["fnof","ƒ"],["circ","ˆ"],["tilde","˜"],["Alpha","Α"],["Beta","Β"],["Gamma","Γ"],["Delta","Δ"],["Epsilon","Ε"],["Zeta","Ζ"],["Eta","Η"],["Theta","Θ"],["Iota","Ι"],["Kappa","Κ"],["Lambda","Λ"],["Mu","Μ"],["Nu","Ν"],["Xi","Ξ"],["Omicron","Ο"],["Pi","Π"],["Rho","Ρ"],["Sigma","Σ"],["Tau","Τ"],["Upsilon","Υ"],["Phi","Φ"],["Chi","Χ"],["Psi","Ψ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["iota","ι"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["omicron","ο"],["pi","π"],["rho","ρ"],["sigmaf","ς"],["sigma","σ"],["tau","τ"],["upsilon","υ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"],["thetasym","ϑ"],["upsih","ϒ"],["piv","ϖ"],["ensp"," "],["emsp"," "],["thinsp"," "],["zwnj","‌"],["zwj","‍"],["lrm","‎"],["rlm","‏"],["ndash","–"],["mdash","—"],["lsquo","‘"],["rsquo","’"],["sbquo","‚"],["ldquo","“"],["rdquo","”"],["bdquo","„"],["dagger","†"],["Dagger","‡"],["bull","•"],["hellip","…"],["permil","‰"],["prime","′"],["Prime","″"],["lsaquo","‹"],["rsaquo","›"],["oline","‾"],["frasl","⁄"],["euro","€"],["image","ℑ"],["weierp","℘"],["real","ℜ"],["trade","™"],["alefsym","ℵ"],["larr","←"],["uarr","↑"],["rarr","→"],["darr","↓"],["harr","↔"],["crarr","↵"],["lArr","⇐"],["uArr","⇑"],["rArr","⇒"],["dArr","⇓"],["hArr","⇔"],["forall","∀"],["part","∂"],["exist","∃"],["empty","∅"],["nabla","∇"],["isin","∈"],["notin","∉"],["ni","∋"],["prod","∏"],["sum","∑"],["minus","−"],["lowast","∗"],["radic","√"],["prop","∝"],["infin","∞"],["ang","∠"],["and","∧"],["or","∨"],["cap","∩"],["cup","∪"],["int","∫"],["there4","∴"],["sim","∼"],["cong","≅"],["asymp","≈"],["ne","≠"],["equiv","≡"],["le","≤"],["ge","≥"],["sub","⊂"],["sup","⊃"],["nsub","⊄"],["sube","⊆"],["supe","⊇"],["oplus","⊕"],["otimes","⊗"],["perp","⊥"],["sdot","⋅"],["lceil","⌈"],["rceil","⌉"],["lfloor","⌊"],["rfloor","⌋"],["lang","〈"],["rang","〉"],["loz","◊"],["spades","♠"],["clubs","♣"],["hearts","♥"],["diams","♦"]]);function V1(t){const[e,n]=U1(t.jsxPragma||"React.createElement"),[s,i]=U1(t.jsxFragmentPragma||"React.Fragment");return{base:e,suffix:n,fragmentBase:s,fragmentSuffix:i}}function U1(t){let e=t.indexOf(".");return e===-1&&(e=t.length),[t.slice(0,e),t.slice(e)]}class Ut{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}class ns extends Ut{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(e,n,s,i,r){super(),this.rootTransformer=e,this.tokens=n,this.importProcessor=s,this.nameManager=i,this.options=r,ns.prototype.__init.call(this),ns.prototype.__init2.call(this),ns.prototype.__init3.call(this),ns.prototype.__init4.call(this),ns.prototype.__init5.call(this),this.jsxPragmaInfo=V1(r),this.isAutomaticRuntime=r.jsxRuntime==="automatic",this.jsxImportSource=r.jsxImportSource||"react"}process(){return this.tokens.matches1(o.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let e="";if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`),this.isAutomaticRuntime)if(this.importProcessor)for(const[n,s]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${s} = require("${n}");`;else{const{createElement:n,...s}=this.esmAutomaticImportNameResolutions;n&&(e+=`import {createElement as ${n}} from "${this.jsxImportSource}";`);const i=Object.entries(s).map(([r,a])=>`${r} as ${a}`).join(", ");if(i){const r=this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime");e+=`import {${i}} from "${r}";`}}return e}processJSXTag(){const{jsxRole:e,start:n}=this.tokens.currentToken(),s=this.options.production?null:this.getElementLocationCode(n);this.isAutomaticRuntime&&e!==Vt.KeyAfterPropSpread?this.transformTagToJSXFunc(s,e):this.transformTagToCreateElement(s)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){const n=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<n.length;)n[this.lastIndex]===`
55
- `&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(e,n){const s=n===Vt.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(s));let i=null;if(this.tokens.matches1(o.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(n);else{if(this.processTagIntro(),this.tokens.appendCode(", {"),i=this.processProps(!0),this.tokens.matches2(o.slash,o.jsxTagEnd))this.tokens.appendCode("}");else if(this.tokens.matches1(o.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(n);else throw new Error("Expected either /> or > at the end of the tag.");i&&this.tokens.appendCode(`, ${i}`)}for(this.options.production||(i===null&&this.tokens.appendCode(", void 0"),this.tokens.appendCode(`, ${s}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(o.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(o.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),!this.tokens.matches2(o.slash,o.jsxTagEnd))if(this.tokens.matches1(o.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw new Error("Expected either /> or > at the end of the tag.");for(this.tokens.removeInitialToken();!this.tokens.matches1(o.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation("jsxs","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsx","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsxDEV","/jsx-dev-runtime")}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation("createElement","");{const{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName("Fragment",this.options.production?"/jsx-runtime":"/jsx-dev-runtime");{const{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,n){const s=this.claimAutoImportedName(e,n);return this.importProcessor?`${s}.call(void 0, `:`${s}(`}claimAutoImportedName(e,n){if(this.importProcessor){const s=this.jsxImportSource+n;return this.cjsAutomaticModuleNameResolutions[s]||(this.cjsAutomaticModuleNameResolutions[s]=this.importProcessor.getFreeIdentifierForPath(s)),`${this.cjsAutomaticModuleNameResolutions[s]}.${e}`}else return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,o.jsxName,o.jsxName)&&!this.tokens.matches2AtIndex(e-1,o.greaterThan,o.jsxName)&&!this.tokens.matches1AtIndex(e,o.braceL)&&!this.tokens.matches1AtIndex(e,o.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,o.slash,o.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){const n=this.tokens.identifierName();q1(n)&&this.tokens.replaceToken(`'${n}'`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(e){const n=this.options.production?"":`__self: this, __source: ${this.getDevSource(e)}`;if(!this.tokens.matches1(o.jsxName)&&!this.tokens.matches1(o.braceL)){n?this.tokens.appendCode(`, {${n}}`):this.tokens.appendCode(", null");return}this.tokens.appendCode(", {"),this.processProps(!1),n?this.tokens.appendCode(` ${n}}`):this.tokens.appendCode("}")}processProps(e){let n=null;for(;;){if(this.tokens.matches2(o.jsxName,o.eq)){const s=this.tokens.identifierName();if(e&&s==="key"){n!==null&&this.tokens.appendCode(n.replace(/[^\n]/g,"")),this.tokens.removeToken(),this.tokens.removeToken();const i=this.tokens.snapshot();this.processPropValue(),n=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(i);continue}else this.processPropName(s),this.tokens.replaceToken(": "),this.processPropValue()}else if(this.tokens.matches1(o.jsxName)){const s=this.tokens.identifierName();this.processPropName(s),this.tokens.appendCode(": true")}else if(this.tokens.matches1(o.braceL))this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("");else break;this.tokens.appendCode(",")}return n}processPropName(e){e.includes("-")?this.tokens.replaceToken(`'${e}'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(o.braceL)?(this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")):this.tokens.matches1(o.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){const e=this.tokens.currentToken(),n=this.tokens.code.slice(e.start+1,e.end-1),s=H1(n),i=Hx(n);this.tokens.replaceToken(i+s)}processAutomaticChildrenAndEndProps(e){e===Vt.StaticChildren?(this.tokens.appendCode(" children: ["),this.processChildren(!1),this.tokens.appendCode("]}")):(e===Vt.OneChild&&this.tokens.appendCode(" children: "),this.processChildren(!1),this.tokens.appendCode("}"))}processChildren(e){let n=e;for(;;){if(this.tokens.matches2(o.jsxTagStart,o.slash))return;let s=!1;if(this.tokens.matches1(o.braceL))this.tokens.matches2(o.braceL,o.braceR)?(this.tokens.replaceToken(""),this.tokens.replaceToken("")):(this.tokens.replaceToken(n?", ":""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(""),s=!0);else if(this.tokens.matches1(o.jsxTagStart))this.tokens.appendCode(n?", ":""),this.processJSXTag(),s=!0;else if(this.tokens.matches1(o.jsxText)||this.tokens.matches1(o.jsxEmptyText))s=this.processChildTextElement(n);else throw new Error("Unexpected token when processing JSX children.");s&&(n=!0)}}processChildTextElement(e){const n=this.tokens.currentToken(),s=this.tokens.code.slice(n.start,n.end),i=H1(s),r=qx(s);return r==='""'?(this.tokens.replaceToken(i),!1):(this.tokens.replaceToken(`${e?", ":""}${r}${i}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}}function q1(t){const e=t.charCodeAt(0);return e>=_.lowercaseA&&e<=_.lowercaseZ}function qx(t){let e="",n="",s=!1,i=!1;for(let r=0;r<t.length;r++){const a=t[r];if(a===" "||a===" "||a==="\r")s||(n+=a);else if(a===`
56
- `)n="",s=!0;else{if(i&&s&&(e+=" "),e+=n,n="",a==="&"){const{entity:l,newI:c}=W1(t,r+1);r=c-1,e+=l}else e+=a;i=!0,s=!1}}return s||(e+=n),JSON.stringify(e)}function H1(t){let e=0,n=0;for(const s of t)s===`
57
- `?(e++,n=0):s===" "&&n++;return`
58
- `.repeat(e)+" ".repeat(n)}function Hx(t){let e="";for(let n=0;n<t.length;n++){const s=t[n];if(s===`
59
- `)if(/\s/.test(t[n+1]))for(e+=" ";n<t.length&&/\s/.test(t[n+1]);)n++;else e+=`
60
- `;else if(s==="&"){const{entity:i,newI:r}=W1(t,n+1);e+=i,n=r-1}else e+=s}return JSON.stringify(e)}function W1(t,e){let n="",s=0,i,r=e;if(t[r]==="#"){let a=10;r++;let l;if(t[r]==="x")for(a=16,r++,l=r;r<t.length&&Gx(t.charCodeAt(r));)r++;else for(l=r;r<t.length&&Wx(t.charCodeAt(r));)r++;if(t[r]===";"){const c=t.slice(l,r);c&&(r++,i=String.fromCodePoint(parseInt(c,a)))}}else for(;r<t.length&&s++<10;){const a=t[r];if(r++,a===";"){i=Ux.get(n);break}n+=a}return i?{entity:i,newI:r}:{entity:"&",newI:e}}function Wx(t){return t>=_.digit0&&t<=_.digit9}function Gx(t){return t>=_.digit0&&t<=_.digit9||t>=_.lowercaseA&&t<=_.lowercaseF||t>=_.uppercaseA&&t<=_.uppercaseF}function G1(t,e){const n=V1(e),s=new Set;for(let i=0;i<t.tokens.length;i++){const r=t.tokens[i];if(r.type===o.name&&!r.isType&&(r.identifierRole===me.Access||r.identifierRole===me.ObjectShorthand||r.identifierRole===me.ExportAccess)&&!r.shadowsGlobal&&s.add(t.identifierNameForToken(r)),r.type===o.jsxTagStart&&s.add(n.base),r.type===o.jsxTagStart&&i+1<t.tokens.length&&t.tokens[i+1].type===o.jsxTagEnd&&(s.add(n.base),s.add(n.fragmentBase)),r.type===o.jsxName&&r.identifierRole===me.Access){const a=t.identifierNameForToken(r);(!q1(a)||t.tokens[i+1].type===o.dot)&&s.add(t.identifierNameForToken(r))}}return s}class ss{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(e,n,s,i,r,a,l){this.nameManager=e,this.tokens=n,this.enableLegacyTypeScriptModuleInterop=s,this.options=i,this.isTypeScriptTransformEnabled=r,this.keepUnusedImports=a,this.helperManager=l,ss.prototype.__init.call(this),ss.prototype.__init2.call(this),ss.prototype.__init3.call(this),ss.prototype.__init4.call(this),ss.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,o._import)&&!this.tokens.matches3AtIndex(e,o._import,o.name,o.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,o._export)&&!this.tokens.matches2AtIndex(e,o._export,o.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=G1(this.tokens,this.options);for(const[e,n]of this.importInfoByPath.entries()){if(n.hasBareImport||n.hasStarExport||n.exportStarNames.length>0||n.namedExports.length>0)continue;[...n.defaultNames,...n.wildcardNames,...n.namedImports.map(({localName:i})=>i)].every(i=>this.shouldAutomaticallyElideImportedName(i))&&this.importsToReplace.set(e,"")}}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(const[e,n]of this.importInfoByPath.entries()){const{defaultNames:s,wildcardNames:i,namedImports:r,namedExports:a,exportStarNames:l,hasStarExport:c}=n;if(s.length===0&&i.length===0&&r.length===0&&a.length===0&&l.length===0&&!c){this.importsToReplace.set(e,`require('${e}');`);continue}const u=this.getFreeIdentifierForPath(e);let d;this.enableLegacyTypeScriptModuleInterop?d=u:d=i.length>0?i[0]:this.getFreeIdentifierForPath(e);let m=`var ${u} = require('${e}');`;if(i.length>0)for(const f of i){const g=this.enableLegacyTypeScriptModuleInterop?u:`${this.helperManager.getHelperName("interopRequireWildcard")}(${u})`;m+=` var ${f} = ${g};`}else l.length>0&&d!==u?m+=` var ${d} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${u});`:s.length>0&&d!==u&&(m+=` var ${d} = ${this.helperManager.getHelperName("interopRequireDefault")}(${u});`);for(const{importedName:f,localName:g}of a)m+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${u}, '${g}', '${f}');`;for(const f of l)m+=` exports.${f} = ${d};`;c&&(m+=` ${this.helperManager.getHelperName("createStarExport")}(${u});`),this.importsToReplace.set(e,m);for(const f of s)this.identifierReplacements.set(f,`${d}.default`);for(const{importedName:f,localName:g}of r)this.identifierReplacements.set(g,`${u}.${f}`)}}getFreeIdentifierForPath(e){const n=e.split("/"),i=n[n.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${i}`)}preprocessImportAtIndex(e){const n=[],s=[],i=[];if(e++,(this.tokens.matchesContextualAtIndex(e,w._type)||this.tokens.matches1AtIndex(e,o._typeof))&&!this.tokens.matches1AtIndex(e+1,o.comma)&&!this.tokens.matchesContextualAtIndex(e+1,w._from)||this.tokens.matches1AtIndex(e,o.parenL))return;if(this.tokens.matches1AtIndex(e,o.name)&&(n.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,o.comma)&&e++),this.tokens.matches1AtIndex(e,o.star)&&(e+=2,s.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,o.braceL)){const l=this.getNamedImports(e+1);e=l.newIndex;for(const c of l.namedImports)c.importedName==="default"?n.push(c.localName):i.push(c)}if(this.tokens.matchesContextualAtIndex(e,w._from)&&e++,!this.tokens.matches1AtIndex(e,o.string))throw new Error("Expected string token at the end of import statement.");const r=this.tokens.stringValueAtIndex(e),a=this.getImportInfo(r);a.defaultNames.push(...n),a.wildcardNames.push(...s),a.namedImports.push(...i),n.length===0&&s.length===0&&i.length===0&&(a.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,o._export,o._var)||this.tokens.matches2AtIndex(e,o._export,o._let)||this.tokens.matches2AtIndex(e,o._export,o._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,o._export,o._function)||this.tokens.matches2AtIndex(e,o._export,o._class)){const n=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(n,n)}else if(this.tokens.matches3AtIndex(e,o._export,o.name,o._function)){const n=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(n,n)}else this.tokens.matches2AtIndex(e,o._export,o.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,o._export,o.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let n=0;for(let s=e+2;;s++)if(this.tokens.matches1AtIndex(s,o.braceL)||this.tokens.matches1AtIndex(s,o.dollarBraceL)||this.tokens.matches1AtIndex(s,o.bracketL))n++;else if(this.tokens.matches1AtIndex(s,o.braceR)||this.tokens.matches1AtIndex(s,o.bracketR))n--;else{if(n===0&&!this.tokens.matches1AtIndex(s,o.name))break;if(this.tokens.matches1AtIndex(1,o.eq)){const i=this.tokens.currentToken().rhsEndIndex;if(i==null)throw new Error("Expected = token with an end index.");s=i-1}else{const i=this.tokens.tokens[s];if($1(i)){const r=this.tokens.identifierNameAtIndex(s);this.identifierReplacements.set(r,`exports.${r}`)}}}}preprocessNamedExportAtIndex(e){e+=2;const{newIndex:n,namedImports:s}=this.getNamedImports(e);if(e=n,this.tokens.matchesContextualAtIndex(e,w._from))e++;else{for(const{importedName:a,localName:l}of s)this.addExportBinding(a,l);return}if(!this.tokens.matches1AtIndex(e,o.string))throw new Error("Expected string token at the end of import statement.");const i=this.tokens.stringValueAtIndex(e);this.getImportInfo(i).namedExports.push(...s)}preprocessExportStarAtIndex(e){let n=null;if(this.tokens.matches3AtIndex(e,o._export,o.star,o._as)?(e+=3,n=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,o.string))throw new Error("Expected string token at the end of star export statement.");const s=this.tokens.stringValueAtIndex(e),i=this.getImportInfo(s);n!==null?i.exportStarNames.push(n):i.hasStarExport=!0}getNamedImports(e){const n=[];for(;;){if(this.tokens.matches1AtIndex(e,o.braceR)){e++;break}const s=Di(this.tokens,e);if(e=s.endIndex,s.isType||n.push({importedName:s.leftName,localName:s.rightName}),this.tokens.matches2AtIndex(e,o.comma,o.braceR)){e+=2;break}else if(this.tokens.matches1AtIndex(e,o.braceR)){e++;break}else if(this.tokens.matches1AtIndex(e,o.comma))e++;else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`)}return{newIndex:e,namedImports:n}}getImportInfo(e){const n=this.importInfoByPath.get(e);if(n)return n;const s={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,s),s}addExportBinding(e,n){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(n)}claimImportCode(e){const n=this.importsToReplace.get(e);return this.importsToReplace.set(e,""),n||""}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){const n=this.exportBindingsByLocalName.get(e);return!n||n.length===0?null:n.map(s=>`exports.${s}`).join(" = ")}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}var Xx=44,Kx=59,X1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K1=new Uint8Array(64),Jx=new Uint8Array(128);for(let t=0;t<X1.length;t++){const e=X1.charCodeAt(t);K1[t]=e,Jx[e]=t}function Oi(t,e,n){let s=e-n;s=s<0?-s<<1|1:s<<1;do{let i=s&31;s>>>=5,s>0&&(i|=32),t.write(K1[i])}while(s>0);return e}var J1=1024*16,Y1=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}},Yx=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(J1)}write(t){const{buffer:e}=this;e[this.pos++]=t,this.pos===J1&&(this.out+=Y1.decode(e),this.pos=0)}flush(){const{buffer:t,out:e,pos:n}=this;return n>0?e+Y1.decode(t.subarray(0,n)):e}};function Qx(t){const e=new Yx;let n=0,s=0,i=0,r=0;for(let a=0;a<t.length;a++){const l=t[a];if(a>0&&e.write(Kx),l.length===0)continue;let c=0;for(let u=0;u<l.length;u++){const d=l[u];u>0&&e.write(Xx),c=Oi(e,d[0],c),d.length!==1&&(n=Oi(e,d[1],n),s=Oi(e,d[2],s),i=Oi(e,d[3],i),d.length!==4&&(r=Oi(e,d[4],r)))}}return e.flush()}var Do={exports:{}},Zx=Do.exports,Q1;function ek(){return Q1||(Q1=1,(function(t,e){(function(n,s){t.exports=s()})(Zx,(function(){const n=/^[\w+.-]+:\/\//,s=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,i=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function r(k){return n.test(k)}function a(k){return k.startsWith("//")}function l(k){return k.startsWith("/")}function c(k){return k.startsWith("file:")}function u(k){return/^[.?#]/.test(k)}function d(k){const v=s.exec(k);return f(v[1],v[2]||"",v[3],v[4]||"",v[5]||"/",v[6]||"",v[7]||"")}function m(k){const v=i.exec(k),I=v[2];return f("file:","",v[1]||"","",l(I)?I:"/"+I,v[3]||"",v[4]||"")}function f(k,v,I,P,F,N,R){return{scheme:k,user:v,host:I,port:P,path:F,query:N,hash:R,type:7}}function g(k){if(a(k)){const I=d("http:"+k);return I.scheme="",I.type=6,I}if(l(k)){const I=d("http://foo.com"+k);return I.scheme="",I.host="",I.type=5,I}if(c(k))return m(k);if(r(k))return d(k);const v=d("http://foo.com/"+k);return v.scheme="",v.host="",v.type=k?k.startsWith("?")?3:k.startsWith("#")?2:4:1,v}function E(k){if(k.endsWith("/.."))return k;const v=k.lastIndexOf("/");return k.slice(0,v+1)}function x(k,v){A(v,v.type),k.path==="/"?k.path=v.path:k.path=E(v.path)+k.path}function A(k,v){const I=v<=4,P=k.path.split("/");let F=1,N=0,R=!1;for(let $=1;$<P.length;$++){const T=P[$];if(!T){R=!0;continue}if(R=!1,T!=="."){if(T===".."){N?(R=!0,N--,F--):I&&(P[F++]=T);continue}P[F++]=T,N++}}let B="";for(let $=1;$<F;$++)B+="/"+P[$];(!B||R&&!B.endsWith("/.."))&&(B+="/"),k.path=B}function S(k,v){if(!k&&!v)return"";const I=g(k);let P=I.type;if(v&&P!==7){const N=g(v),R=N.type;switch(P){case 1:I.hash=N.hash;case 2:I.query=N.query;case 3:case 4:x(I,N);case 5:I.user=N.user,I.host=N.host,I.port=N.port;case 6:I.scheme=N.scheme}R>P&&(P=R)}A(I,P);const F=I.query+I.hash;switch(P){case 2:case 3:return F;case 4:{const N=I.path.slice(1);return N?u(v||k)&&!u(N)?"./"+N+F:N+F:F||"."}case 5:return I.path+F;default:return I.scheme+"//"+I.user+I.host+I.port+I.path+F}}return S}))})(Do)),Do.exports}ek();var ec=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function II(t){return t}function tk(t,e){return t._indexes[e]}function nk(t,e){const n=tk(t,e);if(n!==void 0)return n;const{array:s,_indexes:i}=t,r=s.push(e);return i[e]=r-1}var sk=0,ik=1,rk=2,ok=3,ak=4,Z1=-1,lk=class{constructor({file:t,sourceRoot:e}={}){this._names=new ec,this._sources=new ec,this._sourcesContent=[],this._mappings=[],this.file=t,this.sourceRoot=e,this._ignoreList=new ec}};function vI(t){return t}var tc=(t,e,n,s,i,r,a,l)=>hk(!0,t,e,n,s,i,r);function ck(t){const{_mappings:e,_sources:n,_sourcesContent:s,_names:i,_ignoreList:r}=t;return fk(e),{version:3,file:t.file||void 0,names:i.array,sourceRoot:t.sourceRoot||void 0,sources:n.array,sourcesContent:s,mappings:e,ignoreList:r.array}}function uk(t){const e=ck(t);return Object.assign({},e,{mappings:Qx(e.mappings)})}function hk(t,e,n,s,i,r,a,l,c){const{_mappings:u,_sources:d,_sourcesContent:m,_names:f}=e,g=dk(u,n),E=pk(g,s);if(!i)return mk(g,E)?void 0:ef(g,E,[s]);const x=nk(d,i),A=Z1;if(x===m.length&&(m[x]=null),!gk(g,E,x,r,a,A))return ef(g,E,[s,x,r,a])}function dk(t,e){for(let n=t.length;n<=e;n++)t[n]=[];return t[e]}function pk(t,e){let n=t.length;for(let s=n-1;s>=0;n=s--){const i=t[s];if(e>=i[sk])break}return n}function ef(t,e,n){for(let s=t.length;s>e;s--)t[s]=t[s-1];t[e]=n}function fk(t){const{length:e}=t;let n=e;for(let s=n-1;s>=0&&!(t[s].length>0);n=s,s--);n<e&&(t.length=n)}function mk(t,e){return e===0?!0:t[e-1].length===1}function gk(t,e,n,s,i,r){if(e===0)return!1;const a=t[e-1];return a.length===1?!1:n===a[ik]&&s===a[rk]&&i===a[ok]&&r===(a.length===5?a[ak]:Z1)}function yk({code:t,mappings:e},n,s,i,r){const a=bk(i,r),l=new lk({file:s.compiledFilename});let c=0,u=e[0];for(;u===void 0&&c<e.length-1;)c++,u=e[c];let d=0,m=0;u!==m&&tc(l,d,0,n,d,0);for(let x=0;x<t.length;x++){if(x===u){const A=u-m,S=a[c];for(tc(l,d,A,n,d,S);(u===x||u===void 0)&&c<e.length-1;)c++,u=e[c]}t.charCodeAt(x)===_.lineFeed&&(d++,m=x+1,u!==m&&tc(l,d,0,n,d,0))}const{sourceRoot:f,sourcesContent:g,...E}=uk(l);return E}function bk(t,e){const n=new Array(e.length);let s=0,i=e[s].start,r=0;for(let a=0;a<t.length;a++)a===i&&(n[s]=i-r,s++,i=e[s].start),t.charCodeAt(a)===_.lineFeed&&(r=a+1);return n}const xk={require:`
61
- import {createRequire as CREATE_REQUIRE_NAME} from "module";
62
- const require = CREATE_REQUIRE_NAME(import.meta.url);
63
- `,interopRequireWildcard:`
64
- function interopRequireWildcard(obj) {
65
- if (obj && obj.__esModule) {
66
- return obj;
67
- } else {
68
- var newObj = {};
69
- if (obj != null) {
70
- for (var key in obj) {
71
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
72
- newObj[key] = obj[key];
73
- }
74
- }
75
- }
76
- newObj.default = obj;
77
- return newObj;
78
- }
79
- }
80
- `,interopRequireDefault:`
81
- function interopRequireDefault(obj) {
82
- return obj && obj.__esModule ? obj : { default: obj };
83
- }
84
- `,createNamedExportFrom:`
85
- function createNamedExportFrom(obj, localName, importedName) {
86
- Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});
87
- }
88
- `,createStarExport:`
89
- function createStarExport(obj) {
90
- Object.keys(obj)
91
- .filter((key) => key !== "default" && key !== "__esModule")
92
- .forEach((key) => {
93
- if (exports.hasOwnProperty(key)) {
94
- return;
95
- }
96
- Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});
97
- });
98
- }
99
- `,nullishCoalesce:`
100
- function nullishCoalesce(lhs, rhsFn) {
101
- if (lhs != null) {
102
- return lhs;
103
- } else {
104
- return rhsFn();
105
- }
106
- }
107
- `,asyncNullishCoalesce:`
108
- async function asyncNullishCoalesce(lhs, rhsFn) {
109
- if (lhs != null) {
110
- return lhs;
111
- } else {
112
- return await rhsFn();
113
- }
114
- }
115
- `,optionalChain:`
116
- function optionalChain(ops) {
117
- let lastAccessLHS = undefined;
118
- let value = ops[0];
119
- let i = 1;
120
- while (i < ops.length) {
121
- const op = ops[i];
122
- const fn = ops[i + 1];
123
- i += 2;
124
- if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
125
- return undefined;
126
- }
127
- if (op === 'access' || op === 'optionalAccess') {
128
- lastAccessLHS = value;
129
- value = fn(value);
130
- } else if (op === 'call' || op === 'optionalCall') {
131
- value = fn((...args) => value.call(lastAccessLHS, ...args));
132
- lastAccessLHS = undefined;
133
- }
134
- }
135
- return value;
136
- }
137
- `,asyncOptionalChain:`
138
- async function asyncOptionalChain(ops) {
139
- let lastAccessLHS = undefined;
140
- let value = ops[0];
141
- let i = 1;
142
- while (i < ops.length) {
143
- const op = ops[i];
144
- const fn = ops[i + 1];
145
- i += 2;
146
- if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
147
- return undefined;
148
- }
149
- if (op === 'access' || op === 'optionalAccess') {
150
- lastAccessLHS = value;
151
- value = await fn(value);
152
- } else if (op === 'call' || op === 'optionalCall') {
153
- value = await fn((...args) => value.call(lastAccessLHS, ...args));
154
- lastAccessLHS = undefined;
155
- }
156
- }
157
- return value;
158
- }
159
- `,optionalChainDelete:`
160
- function optionalChainDelete(ops) {
161
- const result = OPTIONAL_CHAIN_NAME(ops);
162
- return result == null ? true : result;
163
- }
164
- `,asyncOptionalChainDelete:`
165
- async function asyncOptionalChainDelete(ops) {
166
- const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
167
- return result == null ? true : result;
168
- }
169
- `};class Oo{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(e){this.nameManager=e,Oo.prototype.__init.call(this),Oo.prototype.__init2.call(this)}getHelperName(e){let n=this.helperNames[e];return n||(n=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=n,n)}emitHelpers(){let e="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[n,s]of Object.entries(xk)){const i=this.helperNames[n];let r=s;n==="optionalChainDelete"?r=r.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):n==="asyncOptionalChainDelete"?r=r.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):n==="require"&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),r=r.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),i&&(e+=" ",e+=r.replace(n,i).replace(/\s+/g," ").trim())}return e}}function tf(t,e,n){kk(t,n)&&Ek(t,e,n)}function kk(t,e){for(const n of t.tokens)if(n.type===o.name&&!n.isType&&Ex(n)&&e.has(t.identifierNameForToken(n)))return!0;return!1}function Ek(t,e,n){const s=[];let i=e.length-1;for(let r=t.tokens.length-1;;r--){for(;s.length>0&&s[s.length-1].startTokenIndex===r+1;)s.pop();for(;i>=0&&e[i].endTokenIndex===r+1;)s.push(e[i]),i--;if(r<0)break;const a=t.tokens[r],l=t.identifierNameForToken(a);if(s.length>1&&!a.isType&&a.type===o.name&&n.has(l)){if(Ax(a))nf(s[s.length-1],t,l);else if(wx(a)){let c=s.length-1;for(;c>0&&!s[c].isFunctionScope;)c--;if(c<0)throw new Error("Did not find parent function scope.");nf(s[c],t,l)}}}if(s.length>0)throw new Error("Expected empty scope stack after processing file.")}function nf(t,e,n){for(let s=t.startTokenIndex;s<t.endTokenIndex;s++){const i=e.tokens[s];(i.type===o.name||i.type===o.jsxName)&&e.identifierNameForToken(i)===n&&(i.shadowsGlobal=!0)}}function Ak(t,e){const n=[];for(const s of e)s.type===o.name&&n.push(t.slice(s.start,s.end));return n}class nc{__init(){this.usedNames=new Set}constructor(e,n){nc.prototype.__init.call(this),this.usedNames=new Set(Ak(e,n))}claimFreeName(e){const n=this.findFreeName(e);return this.usedNames.add(n),n}findFreeName(e){if(!this.usedNames.has(e))return e;let n=2;for(;this.usedNames.has(e+String(n));)n++;return e+String(n)}}var Li={},Mi={},qt={},sf;function sc(){if(sf)return qt;sf=1;var t=qt&&qt.__extends||(function(){var r=function(a,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var d in u)u.hasOwnProperty(d)&&(c[d]=u[d])},r(a,l)};return function(a,l){r(a,l);function c(){this.constructor=a}a.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(qt,"__esModule",{value:!0}),qt.DetailContext=qt.NoopContext=qt.VError=void 0;var e=(function(r){t(a,r);function a(l,c){var u=r.call(this,c)||this;return u.path=l,Object.setPrototypeOf(u,a.prototype),u}return a})(Error);qt.VError=e;var n=(function(){function r(){}return r.prototype.fail=function(a,l,c){return!1},r.prototype.unionResolver=function(){return this},r.prototype.createContext=function(){return this},r.prototype.resolveUnion=function(a){},r})();qt.NoopContext=n;var s=(function(){function r(){this._propNames=[""],this._messages=[null],this._score=0}return r.prototype.fail=function(a,l,c){return this._propNames.push(a),this._messages.push(l),this._score+=c,!1},r.prototype.unionResolver=function(){return new i},r.prototype.resolveUnion=function(a){for(var l,c,u=a,d=null,m=0,f=u.contexts;m<f.length;m++){var g=f[m];(!d||g._score>=d._score)&&(d=g)}d&&d._score>0&&((l=this._propNames).push.apply(l,d._propNames),(c=this._messages).push.apply(c,d._messages))},r.prototype.getError=function(a){for(var l=[],c=this._propNames.length-1;c>=0;c--){var u=this._propNames[c];a+=typeof u=="number"?"["+u+"]":u?"."+u:"";var d=this._messages[c];d&&l.push(a+" "+d)}return new e(a,l.join("; "))},r.prototype.getErrorDetail=function(a){for(var l=[],c=this._propNames.length-1;c>=0;c--){var u=this._propNames[c];a+=typeof u=="number"?"["+u+"]":u?"."+u:"";var d=this._messages[c];d&&l.push({path:a,message:d})}for(var m=null,c=l.length-1;c>=0;c--)m&&(l[c].nested=[m]),m=l[c];return m},r})();qt.DetailContext=s;var i=(function(){function r(){this.contexts=[]}return r.prototype.createContext=function(){var a=new s;return this.contexts.push(a),a},r})();return qt}var rf;function of(){return rf||(rf=1,(function(t){var e=Mi&&Mi.__extends||(function(){var b=function(O,D){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(H,Q){H.__proto__=Q}||function(H,Q){for(var oe in Q)Q.hasOwnProperty(oe)&&(H[oe]=Q[oe])},b(O,D)};return function(O,D){b(O,D);function H(){this.constructor=O}O.prototype=D===null?Object.create(D):(H.prototype=D.prototype,new H)}})();Object.defineProperty(t,"__esModule",{value:!0}),t.basicTypes=t.BasicType=t.TParamList=t.TParam=t.param=t.TFunc=t.func=t.TProp=t.TOptional=t.opt=t.TIface=t.iface=t.TEnumLiteral=t.enumlit=t.TEnumType=t.enumtype=t.TIntersection=t.intersection=t.TUnion=t.union=t.TTuple=t.tuple=t.TArray=t.array=t.TLiteral=t.lit=t.TName=t.name=t.TType=void 0;var n=sc(),s=(function(){function b(){}return b})();t.TType=s;function i(b){return typeof b=="string"?a(b):b}function r(b,O){var D=b[O];if(!D)throw new Error("Unknown type "+O);return D}function a(b){return new l(b)}t.name=a;var l=(function(b){e(O,b);function O(D){var H=b.call(this)||this;return H.name=D,H._failMsg="is not a "+D,H}return O.prototype.getChecker=function(D,H,Q){var oe=this,se=r(D,this.name),Ne=se.getChecker(D,H,Q);return se instanceof Y||se instanceof O?Ne:function($e,Ae){return Ne($e,Ae)?!0:Ae.fail(null,oe._failMsg,0)}},O})(s);t.TName=l;function c(b){return new u(b)}t.lit=c;var u=(function(b){e(O,b);function O(D){var H=b.call(this)||this;return H.value=D,H.name=JSON.stringify(D),H._failMsg="is not "+H.name,H}return O.prototype.getChecker=function(D,H){var Q=this;return function(oe,se){return oe===Q.value?!0:se.fail(null,Q._failMsg,-1)}},O})(s);t.TLiteral=u;function d(b){return new m(i(b))}t.array=d;var m=(function(b){e(O,b);function O(D){var H=b.call(this)||this;return H.ttype=D,H}return O.prototype.getChecker=function(D,H){var Q=this.ttype.getChecker(D,H);return function(oe,se){if(!Array.isArray(oe))return se.fail(null,"is not an array",0);for(var Ne=0;Ne<oe.length;Ne++){var $e=Q(oe[Ne],se);if(!$e)return se.fail(Ne,null,1)}return!0}},O})(s);t.TArray=m;function f(){for(var b=[],O=0;O<arguments.length;O++)b[O]=arguments[O];return new g(b.map(function(D){return i(D)}))}t.tuple=f;var g=(function(b){e(O,b);function O(D){var H=b.call(this)||this;return H.ttypes=D,H}return O.prototype.getChecker=function(D,H){var Q=this.ttypes.map(function(se){return se.getChecker(D,H)}),oe=function(se,Ne){if(!Array.isArray(se))return Ne.fail(null,"is not an array",0);for(var $e=0;$e<Q.length;$e++){var Ae=Q[$e](se[$e],Ne);if(!Ae)return Ne.fail($e,null,1)}return!0};return H?function(se,Ne){return oe(se,Ne)?se.length<=Q.length?!0:Ne.fail(Q.length,"is extraneous",2):!1}:oe},O})(s);t.TTuple=g;function E(){for(var b=[],O=0;O<arguments.length;O++)b[O]=arguments[O];return new x(b.map(function(D){return i(D)}))}t.union=E;var x=(function(b){e(O,b);function O(D){var H=b.call(this)||this;H.ttypes=D;var Q=D.map(function(se){return se instanceof l||se instanceof u?se.name:null}).filter(function(se){return se}),oe=D.length-Q.length;return Q.length?(oe>0&&Q.push(oe+" more"),H._failMsg="is none of "+Q.join(", ")):H._failMsg="is none of "+oe+" types",H}return O.prototype.getChecker=function(D,H){var Q=this,oe=this.ttypes.map(function(se){return se.getChecker(D,H)});return function(se,Ne){for(var $e=Ne.unionResolver(),Ae=0;Ae<oe.length;Ae++){var he=oe[Ae](se,$e.createContext());if(he)return!0}return Ne.resolveUnion($e),Ne.fail(null,Q._failMsg,0)}},O})(s);t.TUnion=x;function A(){for(var b=[],O=0;O<arguments.length;O++)b[O]=arguments[O];return new S(b.map(function(D){return i(D)}))}t.intersection=A;var S=(function(b){e(O,b);function O(D){var H=b.call(this)||this;return H.ttypes=D,H}return O.prototype.getChecker=function(D,H){var Q=new Set,oe=this.ttypes.map(function(se){return se.getChecker(D,H,Q)});return function(se,Ne){var $e=oe.every(function(Ae){return Ae(se,Ne)});return $e?!0:Ne.fail(null,null,0)}},O})(s);t.TIntersection=S;function k(b){return new v(b)}t.enumtype=k;var v=(function(b){e(O,b);function O(D){var H=b.call(this)||this;return H.members=D,H.validValues=new Set,H._failMsg="is not a valid enum value",H.validValues=new Set(Object.keys(D).map(function(Q){return D[Q]})),H}return O.prototype.getChecker=function(D,H){var Q=this;return function(oe,se){return Q.validValues.has(oe)?!0:se.fail(null,Q._failMsg,0)}},O})(s);t.TEnumType=v;function I(b,O){return new P(b,O)}t.enumlit=I;var P=(function(b){e(O,b);function O(D,H){var Q=b.call(this)||this;return Q.enumName=D,Q.prop=H,Q._failMsg="is not "+D+"."+H,Q}return O.prototype.getChecker=function(D,H){var Q=this,oe=r(D,this.enumName);if(!(oe instanceof v))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var se=oe.members[this.prop];if(!oe.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(Ne,$e){return Ne===se?!0:$e.fail(null,Q._failMsg,-1)}},O})(s);t.TEnumLiteral=P;function F(b){return Object.keys(b).map(function(O){return N(O,b[O])})}function N(b,O){return O instanceof T?new j(b,O.ttype,!0):new j(b,i(O),!1)}function R(b,O){return new B(b,F(O))}t.iface=R;var B=(function(b){e(O,b);function O(D,H){var Q=b.call(this)||this;return Q.bases=D,Q.props=H,Q.propSet=new Set(H.map(function(oe){return oe.name})),Q}return O.prototype.getChecker=function(D,H,Q){var oe=this,se=this.bases.map(function(Ge){return r(D,Ge).getChecker(D,H)}),Ne=this.props.map(function(Ge){return Ge.ttype.getChecker(D,H)}),$e=new n.NoopContext,Ae=this.props.map(function(Ge,ee){return!Ge.isOpt&&!Ne[ee](void 0,$e)}),he=function(Ge,ee){if(typeof Ge!="object"||Ge===null)return ee.fail(null,"is not an object",0);for(var ke=0;ke<se.length;ke++)if(!se[ke](Ge,ee))return!1;for(var ke=0;ke<Ne.length;ke++){var J=oe.props[ke].name,Ee=Ge[J];if(Ee===void 0){if(Ae[ke])return ee.fail(J,"is missing",1)}else{var Xe=Ne[ke](Ee,ee);if(!Xe)return ee.fail(J,null,1)}}return!0};if(!H)return he;var Me=this.propSet;return Q&&(this.propSet.forEach(function(Ge){return Q.add(Ge)}),Me=Q),function(Ge,ee){if(!he(Ge,ee))return!1;for(var ke in Ge)if(!Me.has(ke))return ee.fail(ke,"is extraneous",2);return!0}},O})(s);t.TIface=B;function $(b){return new T(i(b))}t.opt=$;var T=(function(b){e(O,b);function O(D){var H=b.call(this)||this;return H.ttype=D,H}return O.prototype.getChecker=function(D,H){var Q=this.ttype.getChecker(D,H);return function(oe,se){return oe===void 0||Q(oe,se)}},O})(s);t.TOptional=T;var j=(function(){function b(O,D,H){this.name=O,this.ttype=D,this.isOpt=H}return b})();t.TProp=j;function le(b){for(var O=[],D=1;D<arguments.length;D++)O[D-1]=arguments[D];return new ue(new X(O),i(b))}t.func=le;var ue=(function(b){e(O,b);function O(D,H){var Q=b.call(this)||this;return Q.paramList=D,Q.result=H,Q}return O.prototype.getChecker=function(D,H){return function(Q,oe){return typeof Q=="function"?!0:oe.fail(null,"is not a function",0)}},O})(s);t.TFunc=ue;function U(b,O,D){return new K(b,i(O),!!D)}t.param=U;var K=(function(){function b(O,D,H){this.name=O,this.ttype=D,this.isOpt=H}return b})();t.TParam=K;var X=(function(b){e(O,b);function O(D){var H=b.call(this)||this;return H.params=D,H}return O.prototype.getChecker=function(D,H){var Q=this,oe=this.params.map(function(Ae){return Ae.ttype.getChecker(D,H)}),se=new n.NoopContext,Ne=this.params.map(function(Ae,he){return!Ae.isOpt&&!oe[he](void 0,se)}),$e=function(Ae,he){if(!Array.isArray(Ae))return he.fail(null,"is not an array",0);for(var Me=0;Me<oe.length;Me++){var Ge=Q.params[Me];if(Ae[Me]===void 0){if(Ne[Me])return he.fail(Ge.name,"is missing",1)}else{var ee=oe[Me](Ae[Me],he);if(!ee)return he.fail(Ge.name,null,1)}}return!0};return H?function(Ae,he){return $e(Ae,he)?Ae.length<=oe.length?!0:he.fail(oe.length,"is extraneous",2):!1}:$e},O})(s);t.TParamList=X;var Y=(function(b){e(O,b);function O(D,H){var Q=b.call(this)||this;return Q.validator=D,Q.message=H,Q}return O.prototype.getChecker=function(D,H){var Q=this;return function(oe,se){return Q.validator(oe)?!0:se.fail(null,Q.message,0)}},O})(s);t.BasicType=Y,t.basicTypes={any:new Y(function(b){return!0},"is invalid"),number:new Y(function(b){return typeof b=="number"},"is not a number"),object:new Y(function(b){return typeof b=="object"&&b},"is not an object"),boolean:new Y(function(b){return typeof b=="boolean"},"is not a boolean"),string:new Y(function(b){return typeof b=="string"},"is not a string"),symbol:new Y(function(b){return typeof b=="symbol"},"is not a symbol"),void:new Y(function(b){return b==null},"is not void"),undefined:new Y(function(b){return b===void 0},"is not undefined"),null:new Y(function(b){return b===null},"is not null"),never:new Y(function(b){return!1},"is unexpected"),Date:new Y(C("[object Date]"),"is not a Date"),RegExp:new Y(C("[object RegExp]"),"is not a RegExp")};var de=Object.prototype.toString;function C(b){return function(O){return typeof O=="object"&&O&&de.call(O)===b}}typeof Buffer<"u"&&(t.basicTypes.Buffer=new Y(function(b){return Buffer.isBuffer(b)},"is not a Buffer"));for(var fe=function(b){t.basicTypes[b.name]=new Y(function(O){return O instanceof b},"is not a "+b.name)},ne=0,be=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];ne<be.length;ne++){var M=be[ne];fe(M)}})(Mi)),Mi}var af;function wk(){return af||(af=1,(function(t){var e=Li&&Li.__spreadArrays||function(){for(var c=0,u=0,d=arguments.length;u<d;u++)c+=arguments[u].length;for(var m=Array(c),f=0,u=0;u<d;u++)for(var g=arguments[u],E=0,x=g.length;E<x;E++,f++)m[f]=g[E];return m};Object.defineProperty(t,"__esModule",{value:!0}),t.Checker=t.createCheckers=void 0;var n=of(),s=sc(),i=of();Object.defineProperty(t,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(t,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(t,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(t,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(t,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(t,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(t,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(t,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(t,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(t,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(t,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(t,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(t,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(t,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(t,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(t,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(t,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(t,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(t,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(t,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(t,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(t,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(t,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(t,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(t,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(t,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(t,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(t,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var r=sc();Object.defineProperty(t,"VError",{enumerable:!0,get:function(){return r.VError}});function a(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];for(var d=Object.assign.apply(Object,e([{},n.basicTypes],c)),m={},f=0,g=c;f<g.length;f++)for(var E=g[f],x=0,A=Object.keys(E);x<A.length;x++){var S=A[x];m[S]=new l(d,E[S])}return m}t.createCheckers=a;var l=(function(){function c(u,d,m){if(m===void 0&&(m="value"),this.suite=u,this.ttype=d,this._path=m,this.props=new Map,d instanceof n.TIface)for(var f=0,g=d.props;f<g.length;f++){var E=g[f];this.props.set(E.name,E.ttype)}this.checkerPlain=this.ttype.getChecker(u,!1),this.checkerStrict=this.ttype.getChecker(u,!0)}return c.prototype.setReportedPath=function(u){this._path=u},c.prototype.check=function(u){return this._doCheck(this.checkerPlain,u)},c.prototype.test=function(u){return this.checkerPlain(u,new s.NoopContext)},c.prototype.validate=function(u){return this._doValidate(this.checkerPlain,u)},c.prototype.strictCheck=function(u){return this._doCheck(this.checkerStrict,u)},c.prototype.strictTest=function(u){return this.checkerStrict(u,new s.NoopContext)},c.prototype.strictValidate=function(u){return this._doValidate(this.checkerStrict,u)},c.prototype.getProp=function(u){var d=this.props.get(u);if(!d)throw new Error("Type has no property "+u);return new c(this.suite,d,this._path+"."+u)},c.prototype.methodArgs=function(u){var d=this._getMethod(u);return new c(this.suite,d.paramList)},c.prototype.methodResult=function(u){var d=this._getMethod(u);return new c(this.suite,d.result)},c.prototype.getArgs=function(){if(!(this.ttype instanceof n.TFunc))throw new Error("getArgs() applied to non-function");return new c(this.suite,this.ttype.paramList)},c.prototype.getResult=function(){if(!(this.ttype instanceof n.TFunc))throw new Error("getResult() applied to non-function");return new c(this.suite,this.ttype.result)},c.prototype.getType=function(){return this.ttype},c.prototype._doCheck=function(u,d){var m=new s.NoopContext;if(!u(d,m)){var f=new s.DetailContext;throw u(d,f),f.getError(this._path)}},c.prototype._doValidate=function(u,d){var m=new s.NoopContext;if(u(d,m))return null;var f=new s.DetailContext;return u(d,f),f.getErrorDetail(this._path)},c.prototype._getMethod=function(u){var d=this.props.get(u);if(!d)throw new Error("Type has no property "+u);if(!(d instanceof n.TFunc))throw new Error("Property "+u+" is not a method");return d},c})();t.Checker=l})(Li)),Li}var We=wk();const Sk=We.union(We.lit("jsx"),We.lit("typescript"),We.lit("flow"),We.lit("imports"),We.lit("react-hot-loader"),We.lit("jest")),Ik=We.iface([],{compiledFilename:"string"}),vk=We.iface([],{transforms:We.array("Transform"),disableESTransforms:We.opt("boolean"),jsxRuntime:We.opt(We.union(We.lit("classic"),We.lit("automatic"),We.lit("preserve"))),production:We.opt("boolean"),jsxImportSource:We.opt("string"),jsxPragma:We.opt("string"),jsxFragmentPragma:We.opt("string"),keepUnusedImports:We.opt("boolean"),preserveDynamicImport:We.opt("boolean"),injectCreateRequireForImportRequire:We.opt("boolean"),enableLegacyTypeScriptModuleInterop:We.opt("boolean"),enableLegacyBabel5ModuleInterop:We.opt("boolean"),sourceMapOptions:We.opt("SourceMapOptions"),filePath:We.opt("string")}),_k={Transform:Sk,SourceMapOptions:Ik,Options:vk},{Options:Pk}=We.createCheckers(_k);function Nk(t){Pk.strictCheck(t)}function lf(){V(),gt(!1)}function cf(t){V(),Mo(t)}function $n(t){ge(),ic(t)}function Lo(){ge(),h.tokens[h.tokens.length-1].identifierRole=me.ImportDeclaration}function ic(t){let e;h.scopeDepth===0?e=me.TopLevelDeclaration:t?e=me.BlockScopedDeclaration:e=me.FunctionScopedDeclaration,h.tokens[h.tokens.length-1].identifierRole=e}function Mo(t){switch(h.type){case o._this:{const e=Pe(0);V(),_e(e);return}case o._yield:case o.name:{h.type=o.name,$n(t);return}case o.bracketL:{V(),rc(o.bracketR,t,!0);return}case o.braceL:wc(!0,t);return;default:we()}}function rc(t,e,n=!1,s=!1,i=0){let r=!0,a=!1;const l=h.tokens.length;for(;!L(t)&&!h.error;)if(r?r=!1:(z(o.comma),h.tokens[h.tokens.length-1].contextId=i,!a&&h.tokens[l].isType&&(h.tokens[h.tokens.length-1].isType=!0,a=!0)),!(n&&y(o.comma))){if(L(t))break;if(y(o.ellipsis)){cf(e),uf(),L(o.comma),z(t);break}else $k(s,e)}}function $k(t,e){t&&ac([w._public,w._protected,w._private,w._readonly,w._override]),Fo(e),uf(),Fo(e,!0)}function uf(){Be?XA():De&&FE()}function Fo(t,e=!1){if(e||Mo(t),!L(o.eq))return;const n=h.tokens.length-1;gt(),h.tokens[n].rhsEndIndex=h.tokens.length}function oc(){return y(o.name)}function Ck(){return y(o.name)||!!(h.type&o.IS_KEYWORD)||y(o.string)||y(o.num)||y(o.bigint)||y(o.decimal)}function hf(){const t=h.snapshot();return V(),(y(o.bracketL)||y(o.braceL)||y(o.star)||y(o.ellipsis)||y(o.hash)||Ck())&&!wt()?!0:(h.restoreFromSnapshot(t),!1)}function ac(t){for(;df(t)!==null;);}function df(t){if(!y(o.name))return null;const e=h.contextualKeyword;if(t.indexOf(e)!==-1&&hf()){switch(e){case w._readonly:h.tokens[h.tokens.length-1].type=o._readonly;break;case w._abstract:h.tokens[h.tokens.length-1].type=o._abstract;break;case w._static:h.tokens[h.tokens.length-1].type=o._static;break;case w._public:h.tokens[h.tokens.length-1].type=o._public;break;case w._private:h.tokens[h.tokens.length-1].type=o._private;break;case w._protected:h.tokens[h.tokens.length-1].type=o._protected;break;case w._override:h.tokens[h.tokens.length-1].type=o._override;break;case w._declare:h.tokens[h.tokens.length-1].type=o._declare;break}return e}return null}function Fi(){for(ge();L(o.dot);)ge()}function Tk(){Fi(),!wt()&&y(o.lessThan)&&Fs()}function Rk(){V(),ji()}function Dk(){V()}function Ok(){z(o._typeof),y(o._import)?pf():Fi(),!wt()&&y(o.lessThan)&&Fs()}function pf(){z(o._import),z(o.parenL),z(o.string),z(o.parenR),L(o.dot)&&Fi(),y(o.lessThan)&&Fs()}function Lk(){L(o._const);const t=L(o._in),e=ut(w._out);L(o._const),(t||e)&&!y(o.name)?h.tokens[h.tokens.length-1].type=o.name:ge(),L(o._extends)&&tt(),L(o.eq)&&tt()}function is(){y(o.lessThan)&&Bo()}function Bo(){const t=Pe(0);for(y(o.lessThan)||y(o.typeParameterStart)?V():we();!L(o.greaterThan)&&!h.error;)Lk(),L(o.comma);_e(t)}function lc(t){const e=t===o.arrow;is(),z(o.parenL),h.scopeDepth++,Mk(!1),h.scopeDepth--,(e||y(t))&&Bi(t)}function Mk(t){rc(o.parenR,t)}function jo(){L(o.comma)||Je()}function ff(){lc(o.colon),jo()}function Fk(){const t=h.snapshot();V();const e=L(o.name)&&y(o.colon);return h.restoreFromSnapshot(t),e}function mf(){if(!(y(o.bracketL)&&Fk()))return!1;const t=Pe(0);return z(o.bracketL),ge(),ji(),z(o.bracketR),Ls(),jo(),_e(t),!0}function gf(t){L(o.question),!t&&(y(o.parenL)||y(o.lessThan))?(lc(o.colon),jo()):(Ls(),jo())}function Bk(){if(y(o.parenL)||y(o.lessThan)){ff();return}if(y(o._new)){V(),y(o.parenL)||y(o.lessThan)?ff():gf(!1);return}const t=!!df([w._readonly]);mf()||((pe(w._get)||pe(w._set))&&hf(),Vi(-1),gf(t))}function jk(){yf()}function yf(){for(z(o.braceL);!L(o.braceR)&&!h.error;)Bk()}function zk(){const t=h.snapshot(),e=Vk();return h.restoreFromSnapshot(t),e}function Vk(){return V(),L(o.plus)||L(o.minus)?pe(w._readonly):(pe(w._readonly)&&V(),!y(o.bracketL)||(V(),!oc())?!1:(V(),y(o._in)))}function Uk(){ge(),z(o._in),tt()}function qk(){z(o.braceL),y(o.plus)||y(o.minus)?(V(),it(w._readonly)):ut(w._readonly),z(o.bracketL),Uk(),ut(w._as)&&tt(),z(o.bracketR),y(o.plus)||y(o.minus)?(V(),z(o.question)):L(o.question),iE(),Je(),z(o.braceR)}function Hk(){for(z(o.bracketL);!L(o.bracketR)&&!h.error;)Wk(),L(o.comma)}function Wk(){L(o.ellipsis)?tt():(tt(),L(o.question)),L(o.colon)&&tt()}function Gk(){z(o.parenL),tt(),z(o.parenR)}function Xk(){for(Nn(),Nn();!y(o.backQuote)&&!h.error;)z(o.dollarBraceL),tt(),Nn(),Nn();V()}var Cn;(function(t){t[t.TSFunctionType=0]="TSFunctionType";const n=1;t[t.TSConstructorType=n]="TSConstructorType";const s=n+1;t[t.TSAbstractConstructorType=s]="TSAbstractConstructorType"})(Cn||(Cn={}));function cc(t){t===Cn.TSAbstractConstructorType&&it(w._abstract),(t===Cn.TSConstructorType||t===Cn.TSAbstractConstructorType)&&z(o._new);const e=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!1,lc(o.arrow),h.inDisallowConditionalTypesContext=e}function Kk(){switch(h.type){case o.name:Tk();return;case o._void:case o._null:V();return;case o.string:case o.num:case o.bigint:case o.decimal:case o._true:case o._false:js();return;case o.minus:V(),js();return;case o._this:{Dk(),pe(w._is)&&!wt()&&Rk();return}case o._typeof:Ok();return;case o._import:pf();return;case o.braceL:zk()?qk():jk();return;case o.bracketL:Hk();return;case o.parenL:Gk();return;case o.backQuote:Xk();return;default:if(h.type&o.IS_KEYWORD){V(),h.tokens[h.tokens.length-1].type=o.name;return}break}we()}function Jk(){for(Kk();!wt()&&L(o.bracketL);)L(o.bracketR)||(tt(),z(o.bracketR))}function Yk(){if(it(w._infer),ge(),y(o._extends)){const t=h.snapshot();z(o._extends);const e=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!0,tt(),h.inDisallowConditionalTypesContext=e,(h.error||!h.inDisallowConditionalTypesContext&&y(o.question))&&h.restoreFromSnapshot(t)}}function uc(){if(pe(w._keyof)||pe(w._unique)||pe(w._readonly))V(),uc();else if(pe(w._infer))Yk();else{const t=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!1,Jk(),h.inDisallowConditionalTypesContext=t}}function bf(){if(L(o.bitwiseAND),uc(),y(o.bitwiseAND))for(;L(o.bitwiseAND);)uc()}function Qk(){if(L(o.bitwiseOR),bf(),y(o.bitwiseOR))for(;L(o.bitwiseOR);)bf()}function Zk(){return y(o.lessThan)?!0:y(o.parenL)&&tE()}function eE(){if(y(o.name)||y(o._this))return V(),!0;if(y(o.braceL)||y(o.bracketL)){let t=1;for(V();t>0&&!h.error;)y(o.braceL)||y(o.bracketL)?t++:(y(o.braceR)||y(o.bracketR))&&t--,V();return!0}return!1}function tE(){const t=h.snapshot(),e=nE();return h.restoreFromSnapshot(t),e}function nE(){return V(),!!(y(o.parenR)||y(o.ellipsis)||eE()&&(y(o.colon)||y(o.comma)||y(o.question)||y(o.eq)||y(o.parenR)&&(V(),y(o.arrow))))}function Bi(t){const e=Pe(0);z(t),rE()||tt(),_e(e)}function sE(){y(o.colon)&&Bi(o.colon)}function Ls(){y(o.colon)&&ji()}function iE(){L(o.colon)&&tt()}function rE(){const t=h.snapshot();return pe(w._asserts)?(V(),ut(w._is)?(tt(),!0):oc()||y(o._this)?(V(),ut(w._is)&&tt(),!0):(h.restoreFromSnapshot(t),!1)):oc()||y(o._this)?(V(),pe(w._is)&&!wt()?(V(),tt(),!0):(h.restoreFromSnapshot(t),!1)):!1}function ji(){const t=Pe(0);z(o.colon),tt(),_e(t)}function tt(){if(xf(),h.inDisallowConditionalTypesContext||wt()||!L(o._extends))return;const t=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!0,xf(),h.inDisallowConditionalTypesContext=t,z(o.question),tt(),z(o.colon),tt()}function oE(){return pe(w._abstract)&&et()===o._new}function xf(){if(Zk()){cc(Cn.TSFunctionType);return}if(y(o._new)){cc(Cn.TSConstructorType);return}else if(oE()){cc(Cn.TSAbstractConstructorType);return}Qk()}function aE(){const t=Pe(1);tt(),z(o.greaterThan),_e(t),zi()}function lE(){if(L(o.jsxTagStart)){h.tokens[h.tokens.length-1].type=o.typeParameterStart;const t=Pe(1);for(;!y(o.greaterThan)&&!h.error;)tt(),L(o.comma);Lt(),_e(t)}}function kf(){for(;!y(o.braceL)&&!h.error;)cE(),L(o.comma)}function cE(){Fi(),y(o.lessThan)&&Fs()}function uE(){$n(!1),is(),L(o._extends)&&kf(),yf()}function hE(){$n(!1),is(),z(o.eq),tt(),Je()}function dE(){if(y(o.string)?js():ge(),L(o.eq)){const t=h.tokens.length-1;gt(),h.tokens[t].rhsEndIndex=h.tokens.length}}function hc(){for($n(!1),z(o.braceL);!L(o.braceR)&&!h.error;)dE(),L(o.comma)}function dc(){z(o.braceL),Jo(o.braceR)}function pc(){$n(!1),L(o.dot)?pc():dc()}function Ef(){pe(w._global)?ge():y(o.string)?xn():we(),y(o.braceL)?dc():Je()}function fc(){Lo(),z(o.eq),fE(),Je()}function pE(){return pe(w._require)&&et()===o.parenL}function fE(){pE()?mE():Fi()}function mE(){it(w._require),z(o.parenL),y(o.string)||we(),js(),z(o.parenR)}function gE(){if(nn())return!1;switch(h.type){case o._function:{const t=Pe(1);V();const e=h.start;return as(e,!0),_e(t),!0}case o._class:{const t=Pe(1);return ls(!0,!1),_e(t),!0}case o._const:if(y(o._const)&&Yl(w._enum)){const t=Pe(1);return z(o._const),it(w._enum),h.tokens[h.tokens.length-1].type=o._enum,hc(),_e(t),!0}case o._var:case o._let:{const t=Pe(1);return Ko(h.type!==o._var),_e(t),!0}case o.name:{const t=Pe(1),e=h.contextualKeyword;let n=!1;return e===w._global?(Ef(),n=!0):n=zo(e,!0),_e(t),n}default:return!1}}function Af(){return zo(h.contextualKeyword,!0)}function yE(t){switch(t){case w._declare:{const e=h.tokens.length-1;if(gE())return h.tokens[e].type=o._declare,!0;break}case w._global:if(y(o.braceL))return dc(),!0;break;default:return zo(t,!1)}return!1}function zo(t,e){switch(t){case w._abstract:if(Ms(e)&&y(o._class))return h.tokens[h.tokens.length-1].type=o._abstract,ls(!0,!1),!0;break;case w._enum:if(Ms(e)&&y(o.name))return h.tokens[h.tokens.length-1].type=o._enum,hc(),!0;break;case w._interface:if(Ms(e)&&y(o.name)){const n=Pe(e?2:1);return uE(),_e(n),!0}break;case w._module:if(Ms(e)){if(y(o.string)){const n=Pe(e?2:1);return Ef(),_e(n),!0}else if(y(o.name)){const n=Pe(e?2:1);return pc(),_e(n),!0}}break;case w._namespace:if(Ms(e)&&y(o.name)){const n=Pe(e?2:1);return pc(),_e(n),!0}break;case w._type:if(Ms(e)&&y(o.name)){const n=Pe(e?2:1);return hE(),_e(n),!0}break}return!1}function Ms(t){return t?(V(),!0):!nn()}function bE(){const t=h.snapshot();return Bo(),zs(),sE(),z(o.arrow),h.error?(h.restoreFromSnapshot(t),!1):(qi(!0),!0)}function mc(){h.type===o.bitShiftL&&(h.pos-=1,Se(o.lessThan)),Fs()}function Fs(){const t=Pe(0);for(z(o.lessThan);!y(o.greaterThan)&&!h.error;)tt(),L(o.comma);t?(z(o.greaterThan),_e(t)):(_e(t),B1(),z(o.greaterThan),h.tokens[h.tokens.length-1].isType=!0)}function wf(){if(y(o.name))switch(h.contextualKeyword){case w._abstract:case w._declare:case w._enum:case w._interface:case w._module:case w._namespace:case w._type:return!0}return!1}function xE(t,e){if(y(o.colon)&&Bi(o.colon),!y(o.braceL)&&nn()){let n=h.tokens.length-1;for(;n>=0&&(h.tokens[n].start>=t||h.tokens[n].type===o._default||h.tokens[n].type===o._export);)h.tokens[n].isType=!0,n--;return}qi(!1,e)}function kE(t,e,n){if(!wt()&&L(o.bang)){h.tokens[h.tokens.length-1].type=o.nonNullAssertion;return}if(y(o.lessThan)||y(o.bitShiftL)){const s=h.snapshot();if(!e&&Cf()&&bE())return;if(mc(),!e&&L(o.parenL)?(h.tokens[h.tokens.length-1].subscriptStartIndex=t,Tn()):y(o.backQuote)?Ac():(h.type===o.greaterThan||h.type!==o.parenL&&h.type&o.IS_EXPRESSION_START&&!wt())&&we(),h.error)h.restoreFromSnapshot(s);else return}else!e&&y(o.questionDot)&&et()===o.lessThan&&(V(),h.tokens[t].isOptionalChainStart=!0,h.tokens[h.tokens.length-1].subscriptStartIndex=t,Fs(),z(o.parenL),Tn());bc(t,e,n)}function EE(){if(L(o._import))return pe(w._type)&&et()!==o.eq&&it(w._type),fc(),!0;if(L(o.eq))return mt(),Je(),!0;if(ut(w._as))return it(w._namespace),ge(),Je(),!0;if(pe(w._type)){const t=et();(t===o.braceL||t===o.star)&&V()}return!1}function AE(){if(ge(),y(o.comma)||y(o.braceR)){h.tokens[h.tokens.length-1].identifierRole=me.ImportDeclaration;return}if(ge(),y(o.comma)||y(o.braceR)){h.tokens[h.tokens.length-1].identifierRole=me.ImportDeclaration,h.tokens[h.tokens.length-2].isType=!0,h.tokens[h.tokens.length-1].isType=!0;return}if(ge(),y(o.comma)||y(o.braceR)){h.tokens[h.tokens.length-3].identifierRole=me.ImportAccess,h.tokens[h.tokens.length-1].identifierRole=me.ImportDeclaration;return}ge(),h.tokens[h.tokens.length-3].identifierRole=me.ImportAccess,h.tokens[h.tokens.length-1].identifierRole=me.ImportDeclaration,h.tokens[h.tokens.length-4].isType=!0,h.tokens[h.tokens.length-3].isType=!0,h.tokens[h.tokens.length-2].isType=!0,h.tokens[h.tokens.length-1].isType=!0}function wE(){if(ge(),y(o.comma)||y(o.braceR)){h.tokens[h.tokens.length-1].identifierRole=me.ExportAccess;return}if(ge(),y(o.comma)||y(o.braceR)){h.tokens[h.tokens.length-1].identifierRole=me.ExportAccess,h.tokens[h.tokens.length-2].isType=!0,h.tokens[h.tokens.length-1].isType=!0;return}if(ge(),y(o.comma)||y(o.braceR)){h.tokens[h.tokens.length-3].identifierRole=me.ExportAccess;return}ge(),h.tokens[h.tokens.length-3].identifierRole=me.ExportAccess,h.tokens[h.tokens.length-4].isType=!0,h.tokens[h.tokens.length-3].isType=!0,h.tokens[h.tokens.length-2].isType=!0,h.tokens[h.tokens.length-1].isType=!0}function SE(){if(pe(w._abstract)&&et()===o._class)return h.type=o._abstract,V(),ls(!0,!0),!0;if(pe(w._interface)){const t=Pe(2);return zo(w._interface,!0),_e(t),!0}return!1}function IE(){if(h.type===o._const){const t=Ri();if(t.type===o.name&&t.contextualKeyword===w._enum)return z(o._const),it(w._enum),h.tokens[h.tokens.length-1].type=o._enum,hc(),!0}return!1}function vE(t){const e=h.tokens.length;ac([w._abstract,w._readonly,w._declare,w._static,w._override]);const n=h.tokens.length;if(mf()){const i=t?e-1:e;for(let r=i;r<n;r++)h.tokens[r].isType=!0;return!0}return!1}function _E(t){yE(t)||Je()}function PE(){const t=ut(w._declare);t&&(h.tokens[h.tokens.length-1].type=o._declare);let e=!1;if(y(o.name))if(t){const n=Pe(2);e=Af(),_e(n)}else e=Af();if(!e)if(t){const n=Pe(2);Tt(!0),_e(n)}else Tt(!0)}function NE(t){if(t&&(y(o.lessThan)||y(o.bitShiftL))&&mc(),ut(w._implements)){h.tokens[h.tokens.length-1].type=o._implements;const e=Pe(1);kf(),_e(e)}}function $E(){is()}function CE(){is()}function TE(){const t=Pe(0);wt()||L(o.bang),Ls(),_e(t)}function RE(){y(o.colon)&&ji()}function DE(t,e){return Co?OE(t,e):LE(t,e)}function OE(t,e){if(!y(o.lessThan))return sn(t,e);const n=h.snapshot();let s=sn(t,e);if(h.error)h.restoreFromSnapshot(n);else return s;return h.type=o.typeParameterStart,Bo(),s=sn(t,e),s||we(),s}function LE(t,e){if(!y(o.lessThan))return sn(t,e);const n=h.snapshot();Bo();const s=sn(t,e);if(s||we(),h.error)h.restoreFromSnapshot(n);else return s;return sn(t,e)}function ME(){if(y(o.colon)){const t=h.snapshot();Bi(o.colon),Ct()&&we(),y(o.arrow)||we(),h.error&&h.restoreFromSnapshot(t)}return L(o.arrow)}function FE(){const t=Pe(0);L(o.question),Ls(),_e(t)}function BE(){(y(o.lessThan)||y(o.bitShiftL))&&mc(),Wf()}function jE(){let t=!1,e=!1;for(;;){if(h.pos>=te.length){we("Unterminated JSX contents");return}const n=te.charCodeAt(h.pos);if(n===_.lessThan||n===_.leftCurlyBrace){if(h.pos===h.start){if(n===_.lessThan){h.pos++,Se(o.jsxTagStart);return}j1(n);return}Se(t&&!e?o.jsxEmptyText:o.jsxText);return}n===_.lineFeed?t=!0:n!==_.space&&n!==_.carriageReturn&&n!==_.tab&&(e=!0),h.pos++}}function zE(t){for(h.pos++;;){if(h.pos>=te.length){we("Unterminated string constant");return}if(te.charCodeAt(h.pos)===t){h.pos++;break}h.pos++}Se(o.string)}function VE(){let t;do{if(h.pos>te.length){we("Unexpectedly reached the end of input.");return}t=te.charCodeAt(++h.pos)}while(zt[t]||t===_.dash);Se(o.jsxName)}function gc(){Lt()}function Sf(t){if(gc(),!L(o.colon)){h.tokens[h.tokens.length-1].identifierRole=t;return}gc()}function If(){const t=h.tokens.length;Sf(me.Access);let e=!1;for(;y(o.dot);)e=!0,Lt(),gc();if(!e){const n=h.tokens[t],s=te.charCodeAt(n.start);s>=_.lowercaseA&&s<=_.lowercaseZ&&(n.identifierRole=null)}}function UE(){switch(h.type){case o.braceL:V(),mt(),Lt();return;case o.jsxTagStart:_f(),Lt();return;case o.string:Lt();return;default:we("JSX value should be either an expression or a quoted JSX text")}}function qE(){z(o.ellipsis),mt()}function HE(t){if(y(o.jsxTagEnd))return!1;If(),De&&lE();let e=!1;for(;!y(o.slash)&&!y(o.jsxTagEnd)&&!h.error;){if(L(o.braceL)){e=!0,z(o.ellipsis),gt(),Lt();continue}e&&h.end-h.start===3&&te.charCodeAt(h.start)===_.lowercaseK&&te.charCodeAt(h.start+1)===_.lowercaseE&&te.charCodeAt(h.start+2)===_.lowercaseY&&(h.tokens[t].jsxRole=Vt.KeyAfterPropSpread),Sf(me.ObjectKey),y(o.eq)&&(Lt(),UE())}const n=y(o.slash);return n&&Lt(),n}function WE(){y(o.jsxTagEnd)||If()}function vf(){const t=h.tokens.length-1;h.tokens[t].jsxRole=Vt.NoChildren;let e=0;if(!HE(t))for(Bs();;)switch(h.type){case o.jsxTagStart:if(Lt(),y(o.slash)){Lt(),WE(),h.tokens[t].jsxRole!==Vt.KeyAfterPropSpread&&(e===1?h.tokens[t].jsxRole=Vt.OneChild:e>1&&(h.tokens[t].jsxRole=Vt.StaticChildren));return}e++,vf(),Bs();break;case o.jsxText:e++,Bs();break;case o.jsxEmptyText:Bs();break;case o.braceL:V(),y(o.ellipsis)?(qE(),Bs(),e+=2):(y(o.braceR)||(e++,mt()),Bs());break;default:we();return}}function _f(){Lt(),vf()}function Lt(){h.tokens.push(new To),M1(),h.start=h.pos;const t=te.charCodeAt(h.pos);if(Ti[t])VE();else if(t===_.quotationMark||t===_.apostrophe)zE(t);else switch(++h.pos,t){case _.greaterThan:Se(o.jsxTagEnd);break;case _.lessThan:Se(o.jsxTagStart);break;case _.slash:Se(o.slash);break;case _.equalsTo:Se(o.eq);break;case _.leftCurlyBrace:Se(o.braceL);break;case _.dot:Se(o.dot);break;case _.colon:Se(o.colon);break;default:we()}}function Bs(){h.tokens.push(new To),h.start=h.pos,jE()}function GE(t){if(y(o.question)){const e=et();if(e===o.colon||e===o.comma||e===o.parenR)return}Pf(t)}function XE(){T1(o.question),y(o.colon)&&(De?ji():Be&&os())}class KE{constructor(e){this.stop=e}}function mt(t=!1){if(gt(t),y(o.comma))for(;L(o.comma);)gt(t)}function gt(t=!1,e=!1){return De?DE(t,e):Be?ew(t,e):sn(t,e)}function sn(t,e){if(y(o._yield))return hA(),!1;(y(o.parenL)||y(o.name)||y(o._yield))&&(h.potentialArrowAt=h.start);const n=JE(t);return e&&Ec(),h.type&o.IS_ASSIGN?(V(),gt(t),!1):n}function JE(t){return QE(t)?!0:(YE(t),!1)}function YE(t){De||Be?GE(t):Pf(t)}function Pf(t){L(o.question)&&(gt(),z(o.colon),gt(t))}function QE(t){const e=h.tokens.length;return zi()?!0:(Vo(e,-1,t),!1)}function Vo(t,e,n){if(De&&(o._in&o.PRECEDENCE_MASK)>e&&!wt()&&(ut(w._as)||ut(w._satisfies))){const i=Pe(1);tt(),_e(i),B1(),Vo(t,e,n);return}const s=h.type&o.PRECEDENCE_MASK;if(s>0&&(!n||!y(o._in))&&s>e){const i=h.type;V(),i===o.nullishCoalescing&&(h.tokens[h.tokens.length-1].nullishStartIndex=t);const r=h.tokens.length;zi(),Vo(r,i&o.IS_RIGHT_ASSOCIATIVE?s-1:s,n),i===o.nullishCoalescing&&(h.tokens[t].numNullishCoalesceStarts++,h.tokens[h.tokens.length-1].numNullishCoalesceEnds++),Vo(t,e,n)}}function zi(){if(De&&!Co&&L(o.lessThan))return aE(),!1;if(pe(w._module)&&D1()===_.leftCurlyBrace&&!I1())return dA(),!1;if(h.type&o.IS_PREFIX)return V(),zi(),!1;if(Nf())return!0;for(;h.type&o.IS_POSTFIX&&!Ct();)h.type===o.preIncDec&&(h.type=o.postIncDec),V();return!1}function Nf(){const t=h.tokens.length;return xn()?!0:(yc(t),h.tokens.length>t&&h.tokens[t].isOptionalChainStart&&(h.tokens[h.tokens.length-1].isOptionalChainEnd=!0),!1)}function yc(t,e=!1){Be?nw(t,e):$f(t,e)}function $f(t,e=!1){const n=new KE(!1);do ZE(t,e,n);while(!n.stop&&!h.error)}function ZE(t,e,n){De?kE(t,e,n):Be?LA(t,e,n):bc(t,e,n)}function bc(t,e,n){if(!e&&L(o.doubleColon))xc(),n.stop=!0,yc(t,e);else if(y(o.questionDot)){if(h.tokens[t].isOptionalChainStart=!0,e&&et()===o.parenL){n.stop=!0;return}V(),h.tokens[h.tokens.length-1].subscriptStartIndex=t,L(o.bracketL)?(mt(),z(o.bracketR)):L(o.parenL)?Tn():Uo()}else if(L(o.dot))h.tokens[h.tokens.length-1].subscriptStartIndex=t,Uo();else if(L(o.bracketL))h.tokens[h.tokens.length-1].subscriptStartIndex=t,mt(),z(o.bracketR);else if(!e&&y(o.parenL))if(Cf()){const s=h.snapshot(),i=h.tokens.length;V(),h.tokens[h.tokens.length-1].subscriptStartIndex=t;const r=Ci();h.tokens[h.tokens.length-1].contextId=r,Tn(),h.tokens[h.tokens.length-1].contextId=r,eA()&&(h.restoreFromSnapshot(s),n.stop=!0,h.scopeDepth++,zs(),tA(i))}else{V(),h.tokens[h.tokens.length-1].subscriptStartIndex=t;const s=Ci();h.tokens[h.tokens.length-1].contextId=s,Tn(),h.tokens[h.tokens.length-1].contextId=s}else y(o.backQuote)?Ac():n.stop=!0}function Cf(){return h.tokens[h.tokens.length-1].contextualKeyword===w._async&&!Ct()}function Tn(){let t=!0;for(;!L(o.parenR)&&!h.error;){if(t)t=!1;else if(z(o.comma),L(o.parenR))break;Of(!1)}}function eA(){return y(o.colon)||y(o.arrow)}function tA(t){De?RE():Be&&ZA(),z(o.arrow),Ui(t)}function xc(){const t=h.tokens.length;xn(),yc(t,!0)}function xn(){if(L(o.modulo))return ge(),!1;if(y(o.jsxText)||y(o.jsxEmptyText))return js(),!1;if(y(o.lessThan)&&Co)return h.type=o.jsxTagStart,_f(),V(),!1;const t=h.potentialArrowAt===h.start;switch(h.type){case o.slash:case o.assign:Ix();case o._super:case o._this:case o.regexp:case o.num:case o.bigint:case o.decimal:case o.string:case o._null:case o._true:case o._false:return V(),!1;case o._import:return V(),y(o.dot)&&(h.tokens[h.tokens.length-1].type=o.name,V(),ge()),!1;case o.name:{const e=h.tokens.length,n=h.start,s=h.contextualKeyword;return ge(),s===w._await?(uA(),!1):s===w._async&&y(o._function)&&!Ct()?(V(),as(n,!1),!1):t&&s===w._async&&!Ct()&&y(o.name)?(h.scopeDepth++,$n(!1),z(o.arrow),Ui(e),!0):y(o._do)&&!Ct()?(V(),Rn(),!1):t&&!Ct()&&y(o.arrow)?(h.scopeDepth++,ic(!1),z(o.arrow),Ui(e),!0):(h.tokens[h.tokens.length-1].identifierRole=me.Access,!1)}case o._do:return V(),Rn(),!1;case o.parenL:return Tf(t);case o.bracketL:return V(),Df(o.bracketR,!0),!1;case o.braceL:return wc(!1,!1),!1;case o._function:return nA(),!1;case o.at:Oc();case o._class:return ls(!1),!1;case o._new:return iA(),!1;case o.backQuote:return Ac(),!1;case o.doubleColon:return V(),xc(),!1;case o.hash:{const e=D1();return Ti[e]||e===_.backslash?Uo():V(),!1}default:return we(),!1}}function Uo(){L(o.hash),ge()}function nA(){const t=h.start;ge(),L(o.dot)&&ge(),as(t,!1)}function js(){V()}function qo(){z(o.parenL),mt(),z(o.parenR)}function Tf(t){const e=h.snapshot(),n=h.tokens.length;z(o.parenL);let s=!0;for(;!y(o.parenR)&&!h.error;){if(s)s=!1;else if(z(o.comma),y(o.parenR))break;if(y(o.ellipsis)){cf(!1),Ec();break}else gt(!1,!0)}return z(o.parenR),t&&sA()&&kc()?(h.restoreFromSnapshot(e),h.scopeDepth++,zs(),kc(),Ui(n),h.error?(h.restoreFromSnapshot(e),Tf(!1),!1):!0):!1}function sA(){return y(o.colon)||!Ct()}function kc(){return De?ME():Be?tw():L(o.arrow)}function Ec(){(De||Be)&&XE()}function iA(){if(z(o._new),L(o.dot)){ge();return}rA(),Be&&MA(),L(o.parenL)&&Df(o.parenR)}function rA(){xc(),L(o.questionDot)}function Ac(){for(Nn(),Nn();!y(o.backQuote)&&!h.error;)z(o.dollarBraceL),mt(),Nn(),Nn();V()}function wc(t,e){const n=Ci();let s=!0;for(V(),h.tokens[h.tokens.length-1].contextId=n;!L(o.braceR)&&!h.error;){if(s)s=!1;else if(z(o.comma),L(o.braceR))break;let i=!1;if(y(o.ellipsis)){const r=h.tokens.length;if(lf(),t&&(h.tokens.length===r+2&&ic(e),L(o.braceR)))break;continue}t||(i=L(o.star)),!t&&pe(w._async)?(i&&we(),ge(),y(o.colon)||y(o.parenL)||y(o.braceR)||y(o.eq)||y(o.comma)||(y(o.star)&&(V(),i=!0),Vi(n))):Vi(n),cA(t,e,n)}h.tokens[h.tokens.length-1].contextId=n}function oA(t){return!t&&(y(o.string)||y(o.num)||y(o.bracketL)||y(o.name)||!!(h.type&o.IS_KEYWORD))}function aA(t,e){const n=h.start;return y(o.parenL)?(t&&we(),Sc(n,!1),!0):oA(t)?(Vi(e),Sc(n,!1),!0):!1}function lA(t,e){if(L(o.colon)){t?Fo(e):gt(!1);return}let n;t?h.scopeDepth===0?n=me.ObjectShorthandTopLevelDeclaration:e?n=me.ObjectShorthandBlockScopedDeclaration:n=me.ObjectShorthandFunctionScopedDeclaration:n=me.ObjectShorthand,h.tokens[h.tokens.length-1].identifierRole=n,Fo(e,!0)}function cA(t,e,n){De?$E():Be&&GA(),aA(t,n)||lA(t,e)}function Vi(t){Be&&Dc(),L(o.bracketL)?(h.tokens[h.tokens.length-1].contextId=t,gt(),z(o.bracketR),h.tokens[h.tokens.length-1].contextId=t):(y(o.num)||y(o.string)||y(o.bigint)||y(o.decimal)?xn():Uo(),h.tokens[h.tokens.length-1].identifierRole=me.ObjectKey,h.tokens[h.tokens.length-1].contextId=t)}function Sc(t,e){const n=Ci();h.scopeDepth++;const s=h.tokens.length;zs(e,n),Rf(t,n);const r=h.tokens.length;h.scopes.push(new tn(s,r,!0)),h.scopeDepth--}function Ui(t){qi(!0);const e=h.tokens.length;h.scopes.push(new tn(t,e,!0)),h.scopeDepth--}function Rf(t,e=0){De?xE(t,e):Be?OA(e):qi(!1,e)}function qi(t,e=0){t&&!y(o.braceL)?gt():Rn(!0,e)}function Df(t,e=!1){let n=!0;for(;!L(t)&&!h.error;){if(n)n=!1;else if(z(o.comma),L(t))break;Of(e)}}function Of(t){t&&y(o.comma)||(y(o.ellipsis)?(lf(),Ec()):y(o.question)?V():gt(!1,!0))}function ge(){V(),h.tokens[h.tokens.length-1].type=o.name}function uA(){zi()}function hA(){V(),!y(o.semi)&&!Ct()&&(L(o.star),gt())}function dA(){it(w._module),z(o.braceL),Jo(o.braceR)}function pA(t){return(t.type===o.name||!!(t.type&o.IS_KEYWORD))&&t.contextualKeyword!==w._from}function rn(t){const e=Pe(0);z(t||o.colon),_t(),_e(e)}function Lf(){z(o.modulo),it(w._checks),L(o.parenL)&&(mt(),z(o.parenR))}function Ic(){const t=Pe(0);z(o.colon),y(o.modulo)?Lf():(_t(),y(o.modulo)&&Lf()),_e(t)}function fA(){V(),_c(!0)}function mA(){V(),ge(),y(o.lessThan)&&Ht(),z(o.parenL),Rc(),z(o.parenR),Ic(),Je()}function vc(){y(o._class)?fA():y(o._function)?mA():y(o._var)?gA():ut(w._module)?L(o.dot)?xA():yA():pe(w._type)?kA():pe(w._opaque)?EA():pe(w._interface)?AA():y(o._export)?bA():we()}function gA(){V(),Vf(),Je()}function yA(){for(y(o.string)?xn():ge(),z(o.braceL);!y(o.braceR)&&!h.error;)y(o._import)?(V(),em()):we();z(o.braceR)}function bA(){z(o._export),L(o._default)?y(o._function)||y(o._class)?vc():(_t(),Je()):y(o._var)||y(o._function)||y(o._class)||pe(w._opaque)?vc():y(o.star)||y(o.braceL)||pe(w._interface)||pe(w._type)||pe(w._opaque)?Qf():we()}function xA(){it(w._exports),os(),Je()}function kA(){V(),Nc()}function EA(){V(),$c(!0)}function AA(){V(),_c()}function _c(t=!1){if(Wo(),y(o.lessThan)&&Ht(),L(o._extends))do Ho();while(!t&&L(o.comma));if(pe(w._mixins)){V();do Ho();while(L(o.comma))}if(pe(w._implements)){V();do Ho();while(L(o.comma))}Go(t,!1,t)}function Ho(){Mf(!1),y(o.lessThan)&&rs()}function Pc(){_c()}function Wo(){ge()}function Nc(){Wo(),y(o.lessThan)&&Ht(),rn(o.eq),Je()}function $c(t){it(w._type),Wo(),y(o.lessThan)&&Ht(),y(o.colon)&&rn(o.colon),t||rn(o.eq),Je()}function wA(){Dc(),Vf(),L(o.eq)&&_t()}function Ht(){const t=Pe(0);y(o.lessThan)||y(o.typeParameterStart)?V():we();do wA(),y(o.greaterThan)||z(o.comma);while(!y(o.greaterThan)&&!h.error);z(o.greaterThan),_e(t)}function rs(){const t=Pe(0);for(z(o.lessThan);!y(o.greaterThan)&&!h.error;)_t(),y(o.greaterThan)||z(o.comma);z(o.greaterThan),_e(t)}function SA(){if(it(w._interface),L(o._extends))do Ho();while(L(o.comma));Go(!1,!1,!1)}function Cc(){y(o.num)||y(o.string)?xn():ge()}function IA(){et()===o.colon?(Cc(),rn()):_t(),z(o.bracketR),rn()}function vA(){Cc(),z(o.bracketR),z(o.bracketR),y(o.lessThan)||y(o.parenL)?Tc():(L(o.question),rn())}function Tc(){for(y(o.lessThan)&&Ht(),z(o.parenL);!y(o.parenR)&&!y(o.ellipsis)&&!h.error;)Xo(),y(o.parenR)||z(o.comma);L(o.ellipsis)&&Xo(),z(o.parenR),rn()}function _A(){Tc()}function Go(t,e,n){let s;for(e&&y(o.braceBarL)?(z(o.braceBarL),s=o.braceBarR):(z(o.braceL),s=o.braceR);!y(s)&&!h.error;){if(n&&pe(w._proto)){const i=et();i!==o.colon&&i!==o.question&&(V(),t=!1)}if(t&&pe(w._static)){const i=et();i!==o.colon&&i!==o.question&&V()}if(Dc(),L(o.bracketL))L(o.bracketL)?vA():IA();else if(y(o.parenL)||y(o.lessThan))_A();else{if(pe(w._get)||pe(w._set)){const i=et();(i===o.name||i===o.string||i===o.num)&&V()}PA()}NA()}z(s)}function PA(){if(y(o.ellipsis)){if(z(o.ellipsis),L(o.comma)||L(o.semi),y(o.braceR))return;_t()}else Cc(),y(o.lessThan)||y(o.parenL)?Tc():(L(o.question),rn())}function NA(){!L(o.semi)&&!L(o.comma)&&!y(o.braceR)&&!y(o.braceBarR)&&we()}function Mf(t){for(t||ge();L(o.dot);)ge()}function $A(){Mf(!0),y(o.lessThan)&&rs()}function CA(){z(o._typeof),Ff()}function TA(){for(z(o.bracketL);h.pos<te.length&&!y(o.bracketR)&&(_t(),!y(o.bracketR));)z(o.comma);z(o.bracketR)}function Xo(){const t=et();t===o.colon||t===o.question?(ge(),L(o.question),rn()):_t()}function Rc(){for(;!y(o.parenR)&&!y(o.ellipsis)&&!h.error;)Xo(),y(o.parenR)||z(o.comma);L(o.ellipsis)&&Xo()}function Ff(){let t=!1;const e=h.noAnonFunctionType;switch(h.type){case o.name:{if(pe(w._interface)){SA();return}ge(),$A();return}case o.braceL:Go(!1,!1,!1);return;case o.braceBarL:Go(!1,!0,!1);return;case o.bracketL:TA();return;case o.lessThan:Ht(),z(o.parenL),Rc(),z(o.parenR),z(o.arrow),_t();return;case o.parenL:if(V(),!y(o.parenR)&&!y(o.ellipsis))if(y(o.name)){const n=et();t=n!==o.question&&n!==o.colon}else t=!0;if(t)if(h.noAnonFunctionType=!1,_t(),h.noAnonFunctionType=e,h.noAnonFunctionType||!(y(o.comma)||y(o.parenR)&&et()===o.arrow)){z(o.parenR);return}else L(o.comma);Rc(),z(o.parenR),z(o.arrow),_t();return;case o.minus:V(),js();return;case o.string:case o.num:case o._true:case o._false:case o._null:case o._this:case o._void:case o.star:V();return;default:if(h.type===o._typeof){CA();return}else if(h.type&o.IS_KEYWORD){V(),h.tokens[h.tokens.length-1].type=o.name;return}}we()}function RA(){for(Ff();!Ct()&&(y(o.bracketL)||y(o.questionDot));)L(o.questionDot),z(o.bracketL),L(o.bracketR)||(_t(),z(o.bracketR))}function Bf(){L(o.question)?Bf():RA()}function jf(){Bf(),!h.noAnonFunctionType&&L(o.arrow)&&_t()}function zf(){for(L(o.bitwiseAND),jf();L(o.bitwiseAND);)jf()}function DA(){for(L(o.bitwiseOR),zf();L(o.bitwiseOR);)zf()}function _t(){DA()}function os(){rn()}function Vf(){ge(),y(o.colon)&&os()}function Dc(){(y(o.plus)||y(o.minus))&&(V(),h.tokens[h.tokens.length-1].isType=!0)}function OA(t){y(o.colon)&&Ic(),qi(!1,t)}function LA(t,e,n){if(y(o.questionDot)&&et()===o.lessThan){if(e){n.stop=!0;return}V(),rs(),z(o.parenL),Tn();return}else if(!e&&y(o.lessThan)){const s=h.snapshot();if(rs(),z(o.parenL),Tn(),h.error)h.restoreFromSnapshot(s);else return}bc(t,e,n)}function MA(){if(y(o.lessThan)){const t=h.snapshot();rs(),h.error&&h.restoreFromSnapshot(t)}}function FA(){if(y(o.name)&&h.contextualKeyword===w._interface){const t=Pe(0);return V(),Pc(),_e(t),!0}else if(pe(w._enum))return Uf(),!0;return!1}function BA(){return pe(w._enum)?(Uf(),!0):!1}function jA(t){if(t===w._declare){if(y(o._class)||y(o.name)||y(o._function)||y(o._var)||y(o._export)){const e=Pe(1);vc(),_e(e)}}else if(y(o.name)){if(t===w._interface){const e=Pe(1);Pc(),_e(e)}else if(t===w._type){const e=Pe(1);Nc(),_e(e)}else if(t===w._opaque){const e=Pe(1);$c(!1),_e(e)}}Je()}function zA(){return pe(w._type)||pe(w._interface)||pe(w._opaque)||pe(w._enum)}function VA(){return y(o.name)&&(h.contextualKeyword===w._type||h.contextualKeyword===w._interface||h.contextualKeyword===w._opaque||h.contextualKeyword===w._enum)}function UA(){if(pe(w._type)){const t=Pe(1);V(),y(o.braceL)?(Fc(),Gi()):Nc(),_e(t)}else if(pe(w._opaque)){const t=Pe(1);V(),$c(!1),_e(t)}else if(pe(w._interface)){const t=Pe(1);V(),Pc(),_e(t)}else Tt(!0)}function qA(){return y(o.star)||pe(w._type)&&et()===o.star}function HA(){if(ut(w._type)){const t=Pe(2);Mc(),_e(t)}else Mc()}function WA(t){if(t&&y(o.lessThan)&&rs(),pe(w._implements)){const e=Pe(0);V(),h.tokens[h.tokens.length-1].type=o._implements;do Wo(),y(o.lessThan)&&rs();while(L(o.comma));_e(e)}}function GA(){y(o.lessThan)&&(Ht(),y(o.parenL)||we())}function XA(){const t=Pe(0);L(o.question),y(o.colon)&&os(),_e(t)}function KA(){if(y(o._typeof)||pe(w._type)){const t=Ri();(pA(t)||t.type===o.braceL||t.type===o.star)&&V()}}function JA(){const t=h.contextualKeyword===w._type||h.type===o._typeof;t?V():ge(),pe(w._as)&&!Yl(w._as)?(ge(),t&&!y(o.name)&&!(h.type&o.IS_KEYWORD)||ge()):(t&&(y(o.name)||h.type&o.IS_KEYWORD)&&ge(),ut(w._as)&&ge())}function YA(){if(y(o.lessThan)){const t=Pe(0);Ht(),_e(t)}}function QA(){y(o.colon)&&os()}function ZA(){if(y(o.colon)){const t=h.noAnonFunctionType;h.noAnonFunctionType=!0,os(),h.noAnonFunctionType=t}}function ew(t,e){if(y(o.lessThan)){const n=h.snapshot();let s=sn(t,e);if(h.error)h.restoreFromSnapshot(n),h.type=o.typeParameterStart;else return s;const i=Pe(0);if(Ht(),_e(i),s=sn(t,e),s)return!0;we()}return sn(t,e)}function tw(){if(y(o.colon)){const t=Pe(0),e=h.snapshot(),n=h.noAnonFunctionType;h.noAnonFunctionType=!0,Ic(),h.noAnonFunctionType=n,Ct()&&we(),y(o.arrow)||we(),h.error&&h.restoreFromSnapshot(e),_e(t)}return L(o.arrow)}function nw(t,e=!1){if(h.tokens[h.tokens.length-1].contextualKeyword===w._async&&y(o.lessThan)){const n=h.snapshot();if(sw()&&!h.error)return;h.restoreFromSnapshot(n)}$f(t,e)}function sw(){h.scopeDepth++;const t=h.tokens.length;return zs(),kc()?(Ui(t),!0):!1}function Uf(){it(w._enum),h.tokens[h.tokens.length-1].type=o._enum,ge(),iw()}function iw(){ut(w._of)&&V(),z(o.braceL),rw(),z(o.braceR)}function rw(){for(;!y(o.braceR)&&!h.error&&!L(o.ellipsis);)ow(),y(o.braceR)||z(o.comma)}function ow(){ge(),L(o.eq)&&V()}function aw(){if(Jo(o.eof),h.scopes.push(new tn(0,h.tokens.length,!0)),h.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${h.scopeDepth}`);return new Gw(h.tokens,h.scopes)}function Tt(t){Be&&FA()||(y(o.at)&&Oc(),lw(t))}function lw(t){if(De&&IE())return;const e=h.type;switch(e){case o._break:case o._continue:uw();return;case o._debugger:hw();return;case o._do:dw();return;case o._for:pw();return;case o._function:if(et()===o.dot)break;t||we(),gw();return;case o._class:t||we(),ls(!0);return;case o._if:yw();return;case o._return:bw();return;case o._switch:xw();return;case o._throw:kw();return;case o._try:Aw();return;case o._let:case o._const:t||we();case o._var:Ko(e!==o._var);return;case o._while:ww();return;case o.braceL:Rn();return;case o.semi:Sw();return;case o._export:case o._import:{const i=et();if(i===o.parenL||i===o.dot)break;V(),e===o._import?em():Qf();return}case o.name:if(h.contextualKeyword===w._async){const i=h.start,r=h.snapshot();if(V(),y(o._function)&&!Ct()){z(o._function),as(i,!0);return}else h.restoreFromSnapshot(r)}else if(h.contextualKeyword===w._using&&!I1()&&et()===o.name){Ko(!0);return}else if(qf()){it(w._await),Ko(!0);return}}const n=h.tokens.length;mt();let s=null;if(h.tokens.length===n+1){const i=h.tokens[h.tokens.length-1];i.type===o.name&&(s=i.contextualKeyword)}if(s==null){Je();return}L(o.colon)?Iw():vw(s)}function qf(){if(!pe(w._await))return!1;const t=h.snapshot();return V(),!pe(w._using)||wt()||(V(),!y(o.name)||wt())?(h.restoreFromSnapshot(t),!1):(h.restoreFromSnapshot(t),!0)}function Oc(){for(;y(o.at);)Hf()}function Hf(){if(V(),L(o.parenL))mt(),z(o.parenR);else{for(ge();L(o.dot);)ge();cw()}}function cw(){De?BE():Wf()}function Wf(){L(o.parenL)&&Tn()}function uw(){V(),nn()||(ge(),Je())}function hw(){V(),Je()}function dw(){V(),Tt(!1),z(o._while),qo(),L(o.semi)}function pw(){h.scopeDepth++;const t=h.tokens.length;mw();const e=h.tokens.length;h.scopes.push(new tn(t,e,!1)),h.scopeDepth--}function fw(){return!(!pe(w._using)||Yl(w._of))}function mw(){V();let t=!1;if(pe(w._await)&&(t=!0,V()),z(o.parenL),y(o.semi)){t&&we(),Lc();return}const e=qf();if(e||y(o._var)||y(o._let)||y(o._const)||fw()){if(e&&it(w._await),V(),Xf(!0,h.type!==o._var),y(o._in)||pe(w._of)){Gf(t);return}Lc();return}if(mt(!0),y(o._in)||pe(w._of)){Gf(t);return}t&&we(),Lc()}function gw(){const t=h.start;V(),as(t,!0)}function yw(){V(),qo(),Tt(!1),L(o._else)&&Tt(!1)}function bw(){V(),nn()||(mt(),Je())}function xw(){V(),qo(),h.scopeDepth++;const t=h.tokens.length;for(z(o.braceL);!y(o.braceR)&&!h.error;)if(y(o._case)||y(o._default)){const n=y(o._case);V(),n&&mt(),z(o.colon)}else Tt(!0);V();const e=h.tokens.length;h.scopes.push(new tn(t,e,!1)),h.scopeDepth--}function kw(){V(),mt(),Je()}function Ew(){Mo(!0),De&&Ls()}function Aw(){if(V(),Rn(),y(o._catch)){V();let t=null;if(y(o.parenL)&&(h.scopeDepth++,t=h.tokens.length,z(o.parenL),Ew(),z(o.parenR)),Rn(),t!=null){const e=h.tokens.length;h.scopes.push(new tn(t,e,!1)),h.scopeDepth--}}L(o._finally)&&Rn()}function Ko(t){V(),Xf(!1,t),Je()}function ww(){V(),qo(),Tt(!1)}function Sw(){V()}function Iw(){Tt(!0)}function vw(t){De?_E(t):Be?jA(t):Je()}function Rn(t=!1,e=0){const n=h.tokens.length;h.scopeDepth++,z(o.braceL),e&&(h.tokens[h.tokens.length-1].contextId=e),Jo(o.braceR),e&&(h.tokens[h.tokens.length-1].contextId=e);const s=h.tokens.length;h.scopes.push(new tn(n,s,t)),h.scopeDepth--}function Jo(t){for(;!L(t)&&!h.error;)Tt(!0)}function Lc(){z(o.semi),y(o.semi)||mt(),z(o.semi),y(o.parenR)||mt(),z(o.parenR),Tt(!1)}function Gf(t){t?ut(w._of):V(),mt(),z(o.parenR),Tt(!1)}function Xf(t,e){for(;;){if(_w(e),L(o.eq)){const n=h.tokens.length-1;gt(t),h.tokens[n].rhsEndIndex=h.tokens.length}if(!L(o.comma))break}}function _w(t){Mo(t),De?TE():Be&&QA()}function as(t,e,n=!1){y(o.star)&&V(),e&&!n&&!y(o.name)&&!y(o._yield)&&we();let s=null;y(o.name)&&(e||(s=h.tokens.length,h.scopeDepth++),$n(!1));const i=h.tokens.length;h.scopeDepth++,zs(),Rf(t);const r=h.tokens.length;h.scopes.push(new tn(i,r,!0)),h.scopeDepth--,s!==null&&(h.scopes.push(new tn(s,r,!0)),h.scopeDepth--)}function zs(t=!1,e=0){De?CE():Be&&YA(),z(o.parenL),e&&(h.tokens[h.tokens.length-1].contextId=e),rc(o.parenR,!1,!1,t,e),e&&(h.tokens[h.tokens.length-1].contextId=e)}function ls(t,e=!1){const n=Ci();V(),h.tokens[h.tokens.length-1].contextId=n,h.tokens[h.tokens.length-1].isExpression=!t;let s=null;t||(s=h.tokens.length,h.scopeDepth++),Cw(t,e),Tw();const i=h.tokens.length;if(Pw(n),!h.error&&(h.tokens[i].contextId=n,h.tokens[h.tokens.length-1].contextId=n,s!==null)){const r=h.tokens.length;h.scopes.push(new tn(s,r,!1)),h.scopeDepth--}}function Kf(){return y(o.eq)||y(o.semi)||y(o.braceR)||y(o.bang)||y(o.colon)}function Jf(){return y(o.parenL)||y(o.lessThan)}function Pw(t){for(z(o.braceL);!L(o.braceR)&&!h.error;){if(L(o.semi))continue;if(y(o.at)){Hf();continue}const e=h.start;Nw(e,t)}}function Nw(t,e){De&&ac([w._declare,w._public,w._protected,w._private,w._override]);let n=!1;if(y(o.name)&&h.contextualKeyword===w._static){if(ge(),Jf()){Hi(t,!1);return}else if(Kf()){Yo();return}if(h.tokens[h.tokens.length-1].type=o._static,n=!0,y(o.braceL)){h.tokens[h.tokens.length-1].contextId=e,Rn();return}}$w(t,n,e)}function $w(t,e,n){if(De&&vE(e))return;if(L(o.star)){Wi(n),Hi(t,!1);return}Wi(n);let s=!1;const i=h.tokens[h.tokens.length-1];i.contextualKeyword===w._constructor&&(s=!0),Yf(),Jf()?Hi(t,s):Kf()?Yo():i.contextualKeyword===w._async&&!nn()?(h.tokens[h.tokens.length-1].type=o._async,y(o.star)&&V(),Wi(n),Yf(),Hi(t,!1)):(i.contextualKeyword===w._get||i.contextualKeyword===w._set)&&!(nn()&&y(o.star))?(i.contextualKeyword===w._get?h.tokens[h.tokens.length-1].type=o._get:h.tokens[h.tokens.length-1].type=o._set,Wi(n),Hi(t,!1)):i.contextualKeyword===w._accessor&&!nn()?(Wi(n),Yo()):nn()?Yo():we()}function Hi(t,e){De?is():Be&&y(o.lessThan)&&Ht(),Sc(t,e)}function Wi(t){Vi(t)}function Yf(){if(De){const t=Pe(0);L(o.question),_e(t)}}function Yo(){if(De?(T1(o.bang),Ls()):Be&&y(o.colon)&&os(),y(o.eq)){const t=h.tokens.length;V(),gt(),h.tokens[t].rhsEndIndex=h.tokens.length}Je()}function Cw(t,e=!1){De&&(!t||e)&&pe(w._implements)||(y(o.name)&&$n(!0),De?is():Be&&y(o.lessThan)&&Ht())}function Tw(){let t=!1;L(o._extends)?(Nf(),t=!0):t=!1,De?NE(t):Be&&WA(t)}function Qf(){const t=h.tokens.length-1;De&&EE()||(Lw()?Mw():Ow()?(ge(),y(o.comma)&&et()===o.star?(z(o.comma),z(o.star),it(w._as),ge()):Zf(),Gi()):L(o._default)?Rw():Bw()?Dw():(Fc(),Gi()),h.tokens[t].rhsEndIndex=h.tokens.length)}function Rw(){if(De&&SE()||Be&&BA())return;const t=h.start;L(o._function)?as(t,!0,!0):pe(w._async)&&et()===o._function?(ut(w._async),L(o._function),as(t,!0,!0)):y(o._class)?ls(!0,!0):y(o.at)?(Oc(),ls(!0,!0)):(gt(),Je())}function Dw(){De?PE():Be?UA():Tt(!0)}function Ow(){if(De&&wf())return!1;if(Be&&VA())return!1;if(y(o.name))return h.contextualKeyword!==w._async;if(!y(o._default))return!1;const t=Ql(),e=Ri(),n=e.type===o.name&&e.contextualKeyword===w._from;if(e.type===o.comma)return!0;if(n){const s=te.charCodeAt(R1(t+4));return s===_.quotationMark||s===_.apostrophe}return!1}function Zf(){L(o.comma)&&Fc()}function Gi(){ut(w._from)&&(xn(),nm()),Je()}function Lw(){return Be?qA():y(o.star)}function Mw(){Be?HA():Mc()}function Mc(){z(o.star),pe(w._as)?Fw():Gi()}function Fw(){V(),h.tokens[h.tokens.length-1].type=o._as,ge(),Zf(),Gi()}function Bw(){return De&&wf()||Be&&zA()||h.type===o._var||h.type===o._const||h.type===o._let||h.type===o._function||h.type===o._class||pe(w._async)||y(o.at)}function Fc(){let t=!0;for(z(o.braceL);!L(o.braceR)&&!h.error;){if(t)t=!1;else if(z(o.comma),L(o.braceR))break;jw()}}function jw(){if(De){wE();return}ge(),h.tokens[h.tokens.length-1].identifierRole=me.ExportAccess,ut(w._as)&&ge()}function zw(){const t=h.snapshot();return it(w._module),ut(w._from)?pe(w._from)?(h.restoreFromSnapshot(t),!0):(h.restoreFromSnapshot(t),!1):y(o.comma)?(h.restoreFromSnapshot(t),!1):(h.restoreFromSnapshot(t),!0)}function Vw(){pe(w._module)&&zw()&&V()}function em(){if(De&&y(o.name)&&et()===o.eq){fc();return}if(De&&pe(w._type)){const t=Ri();if(t.type===o.name&&t.contextualKeyword!==w._from){if(it(w._type),et()===o.eq){fc();return}}else(t.type===o.star||t.type===o.braceL)&&it(w._type)}y(o.string)||(Vw(),qw(),it(w._from)),xn(),nm(),Je()}function Uw(){return y(o.name)}function tm(){Lo()}function qw(){Be&&KA();let t=!0;if(!(Uw()&&(tm(),!L(o.comma)))){if(y(o.star)){V(),it(w._as),tm();return}for(z(o.braceL);!L(o.braceR)&&!h.error;){if(t)t=!1;else if(L(o.colon)&&we("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),z(o.comma),L(o.braceR))break;Hw()}}}function Hw(){if(De){AE();return}if(Be){JA();return}Lo(),pe(w._as)&&(h.tokens[h.tokens.length-1].identifierRole=me.ImportAccess,V(),Lo())}function nm(){(y(o._with)||pe(w._assert)&&!wt())&&(V(),wc(!1,!1))}function Ww(){return h.pos===0&&te.charCodeAt(0)===_.numberSign&&te.charCodeAt(1)===_.exclamationMark&&L1(2),O1(),aw()}class Gw{constructor(e,n){this.tokens=e,this.scopes=n}}function Xw(t,e,n,s){if(s&&n)throw new Error("Cannot combine flow and typescript plugins.");bx(t,e,n,s);const i=Ww();if(h.error)throw mx(h.error);return i}function Kw(t){let e=t.currentIndex(),n=0;const s=t.currentToken();do{const i=t.tokens[e];if(i.isOptionalChainStart&&n++,i.isOptionalChainEnd&&n--,n+=i.numNullishCoalesceStarts,n-=i.numNullishCoalesceEnds,i.contextualKeyword===w._await&&i.identifierRole==null&&i.scopeDepth===s.scopeDepth)return!0;e+=1}while(n>0&&e<t.tokens.length);return!1}class Xi{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(e,n,s,i,r){this.code=e,this.tokens=n,this.isFlowEnabled=s,this.disableESTransforms=i,this.helperManager=r,Xi.prototype.__init.call(this),Xi.prototype.__init2.call(this),Xi.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(e){const n=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,n}reset(){this.resultCode="",this.resultMappings=new Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(e,n){return this.matches1AtIndex(e,o.name)&&this.tokens[e].contextualKeyword===n}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e])}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(e){return this.code.slice(e.start,e.end)}rawCodeForToken(e){return this.code.slice(e.start,e.end)}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1)}matches1AtIndex(e,n){return this.tokens[e].type===n}matches2AtIndex(e,n,s){return this.tokens[e].type===n&&this.tokens[e+1].type===s}matches3AtIndex(e,n,s,i){return this.tokens[e].type===n&&this.tokens[e+1].type===s&&this.tokens[e+2].type===i}matches1(e){return this.tokens[this.tokenIndex].type===e}matches2(e,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===n}matches3(e,n,s){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===n&&this.tokens[this.tokenIndex+2].type===s}matches4(e,n,s,i){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===n&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i}matches5(e,n,s,i,r){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===n&&this.tokens[this.tokenIndex+2].type===s&&this.tokens[this.tokenIndex+3].type===i&&this.tokens[this.tokenIndex+4].type===r}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e)}matchesContextIdAndLabel(e,n){return this.matches1(e)&&this.currentToken().contextId===n}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,"")),e}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(o.braceL))e++;else if(this.matches1(o.braceR)){if(e===0)return;e--}this.removeToken()}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw new Error(`Expected token ${e}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){const e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=Kw(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let n=0;n<e.numNullishCoalesceStarts;n++)e.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===o._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let n=0;n<e.numNullishCoalesceEnds;n++)this.resultCode+="))"}appendCode(e){this.resultCode+=e}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){const e=this.currentToken();return this.code.slice(e.start,e.end)}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}}function Jw(t,e,n,s){const i=e.snapshot(),r=Yw(e);let a=[];const l=[],c=[];let u=null;const d=[],m=[],f=e.currentToken().contextId;if(f==null)throw new Error("Expected non-null class context ID on class open-brace.");for(e.nextToken();!e.matchesContextIdAndLabel(o.braceR,f);)if(e.matchesContextual(w._constructor)&&!e.currentToken().isType)({constructorInitializerStatements:a,constructorInsertPos:u}=sm(e));else if(e.matches1(o.semi))s||m.push({start:e.currentIndex(),end:e.currentIndex()+1}),e.nextToken();else if(e.currentToken().isType)e.nextToken();else{const g=e.currentIndex();let E=!1,x=!1,A=!1;for(;Qo(e.currentToken());)e.matches1(o._static)&&(E=!0),e.matches1(o.hash)&&(x=!0),(e.matches1(o._declare)||e.matches1(o._abstract))&&(A=!0),e.nextToken();if(E&&e.matches1(o.braceL)){Bc(e,f);continue}if(x){Bc(e,f);continue}if(e.matchesContextual(w._constructor)&&!e.currentToken().isType){({constructorInitializerStatements:a,constructorInsertPos:u}=sm(e));continue}const S=e.currentIndex();if(Qw(e),e.matches1(o.lessThan)||e.matches1(o.parenL)){Bc(e,f);continue}for(;e.currentToken().isType;)e.nextToken();if(e.matches1(o.eq)){const k=e.currentIndex(),v=e.currentToken().rhsEndIndex;if(v==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(e.nextToken();e.currentIndex()<v;)t.processToken();let I;E?(I=n.claimFreeName("__initStatic"),c.push(I)):(I=n.claimFreeName("__init"),l.push(I)),d.push({initializerName:I,equalsIndex:k,start:S,end:e.currentIndex()})}else(!s||A)&&m.push({start:g,end:e.currentIndex()})}return e.restoreToSnapshot(i),s?{headerInfo:r,constructorInitializerStatements:a,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:u,fields:[],rangesToRemove:m}:{headerInfo:r,constructorInitializerStatements:a,instanceInitializerNames:l,staticInitializerNames:c,constructorInsertPos:u,fields:d,rangesToRemove:m}}function Bc(t,e){for(t.nextToken();t.currentToken().contextId!==e;)t.nextToken();for(;Qo(t.tokenAtRelativeIndex(-1));)t.previousToken()}function Yw(t){const e=t.currentToken(),n=e.contextId;if(n==null)throw new Error("Expected context ID on class token.");const s=e.isExpression;if(s==null)throw new Error("Expected isExpression on class token.");let i=null,r=!1;for(t.nextToken(),t.matches1(o.name)&&(i=t.identifierName());!t.matchesContextIdAndLabel(o.braceL,n);)t.matches1(o._extends)&&!t.currentToken().isType&&(r=!0),t.nextToken();return{isExpression:s,className:i,hasSuperclass:r}}function sm(t){const e=[];t.nextToken();const n=t.currentToken().contextId;if(n==null)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!t.matchesContextIdAndLabel(o.parenR,n);)if(t.currentToken().contextId===n){if(t.nextToken(),Qo(t.currentToken())){for(t.nextToken();Qo(t.currentToken());)t.nextToken();const r=t.currentToken();if(r.type!==o.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const a=t.identifierNameForToken(r);e.push(`this.${a} = ${a}`)}}else t.nextToken();for(t.nextToken();t.currentToken().isType;)t.nextToken();let s=t.currentIndex(),i=!1;for(;!t.matchesContextIdAndLabel(o.braceR,n);){if(!i&&t.matches2(o._super,o.parenL)){t.nextToken();const r=t.currentToken().contextId;if(r==null)throw new Error("Expected a context ID on the super call");for(;!t.matchesContextIdAndLabel(o.parenR,r);)t.nextToken();s=t.currentIndex(),i=!0}t.nextToken()}return t.nextToken(),{constructorInitializerStatements:e,constructorInsertPos:s}}function Qo(t){return[o._async,o._get,o._set,o.plus,o.minus,o._readonly,o._static,o._public,o._private,o._protected,o._override,o._abstract,o.star,o._declare,o.hash].includes(t.type)}function Qw(t){if(t.matches1(o.bracketL)){const n=t.currentToken().contextId;if(n==null)throw new Error("Expected class context ID on computed name open bracket.");for(;!t.matchesContextIdAndLabel(o.bracketR,n);)t.nextToken();t.nextToken()}else t.nextToken()}function im(t){if(t.removeInitialToken(),t.removeToken(),t.removeToken(),t.removeToken(),t.matches1(o.parenL))t.removeToken(),t.removeToken(),t.removeToken();else for(;t.matches1(o.dot);)t.removeToken(),t.removeToken()}const rm={typeDeclarations:new Set,valueDeclarations:new Set};function om(t){const e=new Set,n=new Set;for(let s=0;s<t.tokens.length;s++){const i=t.tokens[s];i.type===o.name&&C1(i)&&(i.isType?e.add(t.identifierNameForToken(i)):n.add(t.identifierNameForToken(i)))}return{typeDeclarations:e,valueDeclarations:n}}function am(t){let e=t.currentIndex();for(;!t.matches1AtIndex(e,o.braceR);)e++;return t.matchesContextualAtIndex(e+1,w._from)&&t.matches1AtIndex(e+2,o.string)}function cs(t){(t.matches2(o._with,o.braceL)||t.matches2(o.name,o.braceL)&&t.matchesContextual(w._assert))&&(t.removeToken(),t.removeToken(),t.removeBalancedCode(),t.removeToken())}function lm(t,e,n,s){if(!t||e)return!1;const i=n.currentToken();if(i.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");const r=i.rhsEndIndex-n.currentIndex();if(r!==3&&!(r===4&&n.matches1AtIndex(i.rhsEndIndex-1,o.semi)))return!1;const a=n.tokenAtRelativeIndex(2);if(a.type!==o.name)return!1;const l=n.identifierNameForToken(a);return s.typeDeclarations.has(l)&&!s.valueDeclarations.has(l)}class Ki extends Ut{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(e,n,s,i,r,a,l,c,u,d,m,f){super(),this.rootTransformer=e,this.tokens=n,this.importProcessor=s,this.nameManager=i,this.helperManager=r,this.reactHotLoaderTransformer=a,this.enableLegacyBabel5ModuleInterop=l,this.enableLegacyTypeScriptModuleInterop=c,this.isTypeScriptTransformEnabled=u,this.isFlowTransformEnabled=d,this.preserveDynamicImport=m,this.keepUnusedImports=f,Ki.prototype.__init.call(this),Ki.prototype.__init2.call(this),Ki.prototype.__init3.call(this),this.declarationInfo=u?om(n):rm}getPrefixCode(){let e="";return this.hadExport&&(e+='Object.defineProperty(exports, "__esModule", {value: true});'),e}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
170
- module.exports = exports.default;
171
- `:""}process(){return this.tokens.matches3(o._import,o.name,o.eq)?this.processImportEquals():this.tokens.matches1(o._import)?(this.processImport(),!0):this.tokens.matches2(o._export,o.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(o._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(o.name,o.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(o.name)||this.tokens.matches1(o.jsxName)?this.processIdentifier():this.tokens.matches1(o.eq)?this.processAssignment():this.tokens.matches1(o.assign)?this.processComplexAssignment():this.tokens.matches1(o.preIncDec)?this.processPreIncDec():!1}processImportEquals(){const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?im(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(o._import,o.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}const n=this.enableLegacyTypeScriptModuleInterop?"":`${this.helperManager.getHelperName("interopRequireWildcard")}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${n}require`);const s=this.tokens.currentToken().contextId;if(s==null)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(o.parenR,s);)this.rootTransformer.processToken();this.tokens.replaceToken(n?")))":"))");return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{const n=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(n)),this.tokens.appendCode(this.importProcessor.claimImportCode(n))}cs(this.tokens),this.tokens.matches1(o.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(w._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,o.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,w._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(o.name)||this.tokens.matches1(o.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(o.string))return!1;let e=!1,n=!1;for(;!this.tokens.matches1(o.string);)(!e&&this.tokens.matches1(o.braceL)||this.tokens.matches1(o.comma))&&(this.tokens.removeToken(),this.tokens.matches1(o.braceR)||(n=!0),(this.tokens.matches2(o.name,o.comma)||this.tokens.matches2(o.name,o.braceR)||this.tokens.matches4(o.name,o.name,o.name,o.comma)||this.tokens.matches4(o.name,o.name,o.name,o.braceR))&&(e=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?n&&!e:!1}removeRemainingImport(){for(;!this.tokens.matches1(o.string);)this.tokens.removeToken()}processIdentifier(){const e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===me.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==me.Access)return!1;const n=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!n)return!1;let s=this.tokens.currentIndex()+1;for(;s<this.tokens.tokens.length&&this.tokens.tokens[s].type===o.parenR;)s++;return this.tokens.tokens[s].type===o.parenL?this.tokens.tokenAtRelativeIndex(1).type===o.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==o._new?(this.tokens.replaceToken(`${n}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(o.parenR)):this.tokens.replaceToken(`(0, ${n})`):this.tokens.replaceToken(n),!0}processObjectShorthand(){const e=this.tokens.identifierName(),n=this.importProcessor.getIdentifierReplacement(e);return n?(this.tokens.replaceToken(`${e}: ${n}`),!0):!1}processExport(){if(this.tokens.matches2(o._export,o._enum)||this.tokens.matches3(o._export,o._const,o._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(o._export,o._default))return this.tokens.matches3(o._export,o._default,o._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(o._export,o.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(o._export,o.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,w._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(o.braceL)){for(;!this.tokens.matches1(o.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(o._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(w._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,o.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),cs(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(o._export,o._var)||this.tokens.matches2(o._export,o._let)||this.tokens.matches2(o._export,o._const))return this.processExportVar(),!0;if(this.tokens.matches2(o._export,o._function)||this.tokens.matches3(o._export,o.name,o._function))return this.processExportFunction(),!0;if(this.tokens.matches2(o._export,o._class)||this.tokens.matches3(o._export,o._abstract,o._class)||this.tokens.matches2(o._export,o.at))return this.processExportClass(),!0;if(this.tokens.matches2(o._export,o.star))return this.processExportStar(),!0;throw new Error("Unrecognized export syntax.")}processAssignment(){const e=this.tokens.currentIndex(),n=this.tokens.tokens[e-1];if(n.isType||n.type!==o.name||n.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,o.dot)||e>=2&&[o._var,o._let,o._const].includes(this.tokens.tokens[e-2].type))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(n));return s?(this.tokens.copyToken(),this.tokens.appendCode(` ${s} =`),!0):!1}processComplexAssignment(){const e=this.tokens.currentIndex(),n=this.tokens.tokens[e-1];if(n.type!==o.name||n.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,o.dot))return!1;const s=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(n));return s?(this.tokens.appendCode(` = ${s}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){const e=this.tokens.currentIndex(),n=this.tokens.tokens[e+1];if(n.type!==o.name||n.shadowsGlobal||e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,o.dot)||this.tokens.matches1AtIndex(e+2,o.bracketL)||this.tokens.matches1AtIndex(e+2,o.parenL)))return!1;const s=this.tokens.identifierNameForToken(n),i=this.importProcessor.resolveExportBinding(s);return i?(this.tokens.appendCode(`${i} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){const e=this.tokens.currentIndex(),n=this.tokens.tokens[e],s=this.tokens.tokens[e+1];if(n.type!==o.name||n.shadowsGlobal||e>=1&&this.tokens.matches1AtIndex(e-1,o.dot))return!1;const i=this.tokens.identifierNameForToken(n),r=this.importProcessor.resolveExportBinding(i);if(!r)return!1;const a=this.tokens.rawCodeForToken(s),l=this.importProcessor.getIdentifierReplacement(i)||i;if(a==="++")this.tokens.replaceToken(`(${l} = ${r} = ${l} + 1, ${l} - 1)`);else if(a==="--")this.tokens.replaceToken(`(${l} = ${r} = ${l} - 1, ${l} + 1)`);else throw new Error(`Unexpected operator: ${a}`);return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(o._export,o._default,o._function,o.name)||this.tokens.matches5(o._export,o._default,o.name,o._function,o.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,w._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const n=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${n};`)}else if(this.tokens.matches4(o._export,o._default,o._class,o.name)||this.tokens.matches5(o._export,o._default,o._abstract,o._class,o.name)||this.tokens.matches3(o._export,o._default,o.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(o._abstract)&&this.tokens.removeToken();const n=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${n};`)}else if(lm(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const n=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${n}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${n} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(n)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =");e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(o.at);)if(this.tokens.copyToken(),this.tokens.matches1(o.parenL))this.tokens.copyExpectedToken(o.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(o.parenR);else{for(this.tokens.copyExpectedToken(o.name);this.tokens.matches1(o.dot);)this.tokens.copyExpectedToken(o.dot),this.tokens.copyExpectedToken(o.name);this.tokens.matches1(o.parenL)&&(this.tokens.copyExpectedToken(o.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(o.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,o.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,o.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();const e=this.tokens.identifierName();for(;!this.tokens.matches1(o.eq);)this.rootTransformer.processToken();const n=this.tokens.currentToken().rhsEndIndex;if(n==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<n;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.tokens.matches1(o.braceL);e&&this.tokens.appendCode("(");let n=0;for(;;)if(this.tokens.matches1(o.braceL)||this.tokens.matches1(o.dollarBraceL)||this.tokens.matches1(o.bracketL))n++,this.tokens.copyToken();else if(this.tokens.matches1(o.braceR)||this.tokens.matches1(o.bracketR))n--,this.tokens.copyToken();else{if(n===0&&!this.tokens.matches1(o.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(o.eq)){const s=this.tokens.currentToken().rhsEndIndex;if(s==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<s;)this.rootTransformer.processToken()}else{const s=this.tokens.currentToken();if($1(s)){const i=this.tokens.identifierName();let r=this.importProcessor.getIdentifierReplacement(i);if(r===null)throw new Error(`Expected a replacement for ${i} in \`export var\` syntax.`);Sx(s)&&(r=`${i}: ${r}`),this.tokens.replaceToken(r)}else this.rootTransformer.processToken()}}if(e){const s=this.tokens.currentToken().rhsEndIndex;if(s==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<s;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");const e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`)}processNamedFunction(){if(this.tokens.matches1(o._function))this.tokens.copyToken();else if(this.tokens.matches2(o.name,o._function)){if(!this.tokens.matchesContextual(w._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(o.star)&&this.tokens.copyToken(),!this.tokens.matches1(o.name))throw new Error("Expected identifier for exported function name.");const e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(o.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(o.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(o.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(o.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(o._abstract)&&this.tokens.removeToken();const e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=am(this.tokens),n=[];for(;;){if(this.tokens.matches1(o.braceR)){this.tokens.removeToken();break}const s=Di(this.tokens);for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();if(!(s.isType||!e&&this.shouldElideExportedIdentifier(s.leftName))){const r=s.rightName;r==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;const a=s.leftName,l=this.importProcessor.getIdentifierReplacement(a);n.push(`exports.${r} = ${l||a};`)}if(this.tokens.matches1(o.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(o.comma,o.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(o.comma))this.tokens.removeToken();else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(w._from)){this.tokens.removeToken();const s=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(s)),cs(this.tokens)}else this.tokens.appendCode(n.join(" "));this.tokens.matches1(o.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(o.string);)this.tokens.removeToken();const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),cs(this.tokens),this.tokens.matches1(o.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}}class Zw extends Ut{constructor(e,n,s,i,r,a,l,c){super(),this.tokens=e,this.nameManager=n,this.helperManager=s,this.reactHotLoaderTransformer=i,this.isTypeScriptTransformEnabled=r,this.isFlowTransformEnabled=a,this.keepUnusedImports=l,this.nonTypeIdentifiers=r&&!l?G1(e,c):new Set,this.declarationInfo=r&&!l?om(e):rm,this.injectCreateRequireForImportRequire=!!c.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(o._import,o.name,o.eq))return this.processImportEquals();if(this.tokens.matches4(o._import,o.name,o.name,o.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,w._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(o._export,o.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(o._export,o._import,o.name,o.name,o.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,w._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(o._import))return this.processImport();if(this.tokens.matches2(o._export,o._default))return this.processExportDefault();if(this.tokens.matches2(o._export,o.braceL))return this.processNamedExports();if(this.tokens.matches2(o._export,o.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,w._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(o.braceL)){for(;!this.tokens.matches1(o.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(o._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(w._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,o.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),cs(this.tokens)),!0}return!1}processImportEquals(){const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?im(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(o._import,o.parenL))return!1;const e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(o.string);)this.tokens.removeToken();this.tokens.removeToken(),cs(this.tokens),this.tokens.matches1(o.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(o._import),this.tokens.matchesContextual(w._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,o.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,w._from))return!0;if(this.tokens.matches1(o.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(w._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,w._from)&&this.tokens.copyToken();let e=!1,n=!1,s=!1;if(this.tokens.matches1(o.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(o.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(o.comma)&&(s=!0,this.tokens.removeToken()))),this.tokens.matches1(o.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(s&&this.tokens.appendCode(","),e=!0,this.tokens.copyExpectedToken(o.star),this.tokens.copyExpectedToken(o.name),this.tokens.copyExpectedToken(o.name));else if(this.tokens.matches1(o.braceL)){for(s&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(o.braceR);){n=!0;const i=Di(this.tokens);if(i.isType||this.shouldAutomaticallyElideImportedName(i.rightName)){for(;this.tokens.currentIndex()<i.endIndex;)this.tokens.removeToken();this.tokens.matches1(o.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<i.endIndex;)this.tokens.copyToken();this.tokens.matches1(o.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(o.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?n&&!e:!1}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(lm(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(o._export,o._default,o._function,o.name)||this.tokens.matches5(o._export,o._default,o.name,o._function,o.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,w._async)||this.tokens.matches4(o._export,o._default,o._class,o.name)||this.tokens.matches5(o._export,o._default,o._abstract,o._class,o.name))&&this.reactHotLoaderTransformer){const n=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${n}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(n),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(o._export),this.tokens.copyExpectedToken(o.braceL);const e=am(this.tokens);let n=!1;for(;!this.tokens.matches1(o.braceR);){const s=Di(this.tokens);if(s.isType||!e&&this.shouldElideExportedName(s.leftName)){for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();this.tokens.matches1(o.comma)&&this.tokens.removeToken()}else{for(n=!0;this.tokens.currentIndex()<s.endIndex;)this.tokens.copyToken();this.tokens.matches1(o.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(o.braceR),!this.keepUnusedImports&&e&&!n&&(this.tokens.removeToken(),this.tokens.removeToken(),cs(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}}class eS extends Ut{constructor(e,n,s){super(),this.rootTransformer=e,this.tokens=n,this.isImportsTransformEnabled=s}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(o._enum)?(this.processEnum(),!0):this.tokens.matches2(o._export,o._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(o._export,o._default,o._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();const e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`)}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(o.name);let e=!1;this.tokens.matchesContextual(w._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(w._symbol),this.tokens.removeToken());const n=this.tokens.matches3(o.braceL,o.name,o.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');const s=!e&&!n;for(this.tokens.replaceTokenTrimmingLeftWhitespace(s?".Mirrored([":"({");!this.tokens.matches1(o.braceR);){if(this.tokens.matches1(o.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(e,n),this.tokens.matches1(o.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(s?"]);":"});")}processEnumElement(e,n){if(e){const s=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${s}")`)}else n?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}}function tS(t){let e,n=t[0],s=1;for(;s<t.length;){const i=t[s],r=t[s+1];if(s+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(e=n,n=r(n)):(i==="call"||i==="optionalCall")&&(n=r((...a)=>n.call(e,...a)),e=void 0)}return n}const Zo="jest",nS=["mock","unmock","enableAutomock","disableAutomock"];class jc extends Ut{__init(){this.hoistedFunctionNames=[]}constructor(e,n,s,i){super(),this.rootTransformer=e,this.tokens=n,this.nameManager=s,this.importProcessor=i,jc.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(o.name,o.dot,o.name,o.parenL)&&this.tokens.identifierName()===Zo?tS([this,"access",e=>e.importProcessor,"optionalAccess",e=>e.getGlobalNames,"call",e=>e(),"optionalAccess",e=>e.has,"call",e=>e(Zo)])?!1:this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(o.dot,o.name,o.parenL);){const n=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(nS.includes(n)){const i=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(i),this.tokens.replaceToken(`function ${i}(){${Zo}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(o.parenR),this.tokens.appendCode(";}"),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${Zo}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(o.parenR),e=!0}return!0}}class sS extends Ut{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(o.num)){const e=this.tokens.currentTokenCode();if(e.includes("_"))return this.tokens.replaceToken(e.replace(/_/g,"")),!0}return!1}}class iS extends Ut{constructor(e,n){super(),this.tokens=e,this.nameManager=n}process(){return this.tokens.matches2(o._catch,o.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0):!1}}class rS extends Ut{constructor(e,n){super(),this.tokens=e,this.nameManager=n}process(){if(this.tokens.matches1(o.nullishCoalescing)){const s=this.tokens.currentToken();return this.tokens.tokens[s.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(o._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;const n=this.tokens.currentToken().subscriptStartIndex;if(n!=null&&this.tokens.tokens[n].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==o._super){const s=this.nameManager.claimFreeName("_");let i;if(n>0&&this.tokens.matches1AtIndex(n-1,o._delete)&&this.isLastSubscriptInChain()?i=`${s} => delete ${s}`:i=`${s} => ${s}`,this.tokens.tokens[n].isAsyncOperation&&(i=`async ${i}`),this.tokens.matches2(o.questionDot,o.parenL)||this.tokens.matches2(o.questionDot,o.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${i}`);else if(this.tokens.matches2(o.questionDot,o.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${i}`);else if(this.tokens.matches1(o.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${i}.`);else if(this.tokens.matches1(o.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${i}.`);else if(this.tokens.matches1(o.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${i}[`);else if(this.tokens.matches1(o.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${i}(`);else throw new Error("Unexpected subscript operator in optional chain.");return!0}return!1}isLastSubscriptInChain(){let e=0;for(let n=this.tokens.currentIndex()+1;;n++){if(n>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[n].isOptionalChainStart?e++:this.tokens.tokens[n].isOptionalChainEnd&&e--,e<0)return!0;if(e===0&&this.tokens.tokens[n].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let e=0,n=this.tokens.currentIndex()-1;for(;;){if(n<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[n].isOptionalChainStart?e--:this.tokens.tokens[n].isOptionalChainEnd&&e++,e<0)return!1;if(e===0&&this.tokens.tokens[n].subscriptStartIndex!=null)return this.tokens.tokens[n-1].type===o._super;n--}}}class oS extends Ut{constructor(e,n,s,i){super(),this.rootTransformer=e,this.tokens=n,this.importProcessor=s,this.options=i}process(){const e=this.tokens.currentIndex();if(this.tokens.identifierName()==="createReactClass"){const n=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return n?this.tokens.replaceToken(`(0, ${n})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(o.name,o.dot,o.name)&&this.tokens.identifierName()==="React"&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)==="createClass"){const n=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return this.tokens.replaceToken(n),this.tokens.copyToken(),this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){const n=this.findDisplayName(e);n&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(o.parenL),this.tokens.copyExpectedToken(o.braceL),this.tokens.appendCode(`displayName: '${n}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(o.braceR),this.tokens.copyExpectedToken(o.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,o.name,o.eq)?this.tokens.identifierNameAtIndex(e-2):e>=2&&this.tokens.tokens[e-2].identifierRole===me.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,o._export,o._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const n=(this.options.filePath||"unknown").split("/"),s=n[n.length-1],i=s.lastIndexOf("."),r=i===-1?s:s.slice(0,i);return r==="index"&&n[n.length-2]?n[n.length-2]:r}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(o.parenL,o.braceL))return!1;const n=e+1,s=this.tokens.tokens[n].contextId;if(s==null)throw new Error("Expected non-null context ID on object open-brace.");for(;e<this.tokens.tokens.length;e++){const i=this.tokens.tokens[e];if(i.type===o.braceR&&i.contextId===s){e++;break}if(this.tokens.identifierNameAtIndex(e)==="displayName"&&this.tokens.tokens[e].identifierRole===me.ObjectKey&&i.contextId===s)return!1}if(e===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(e,o.parenR)||this.tokens.matches2AtIndex(e,o.comma,o.parenR)}}class zc extends Ut{__init(){this.extractedDefaultExportName=null}constructor(e,n){super(),this.tokens=e,this.filePath=n,zc.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return`
172
- (function () {
173
- var enterModule = require('react-hot-loader').enterModule;
174
- enterModule && enterModule(module);
175
- })();`.replace(/\s+/g," ").trim()}getSuffixCode(){const e=new Set;for(const s of this.tokens.tokens)!s.isType&&C1(s)&&s.identifierRole!==me.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(s));const n=Array.from(e).map(s=>({variableName:s,uniqueLocalName:s}));return this.extractedDefaultExportName&&n.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`
176
- ;(function () {
177
- var reactHotLoader = require('react-hot-loader').default;
178
- var leaveModule = require('react-hot-loader').leaveModule;
179
- if (!reactHotLoader) {
180
- return;
181
- }
182
- ${n.map(({variableName:s,uniqueLocalName:i})=>` reactHotLoader.register(${s}, "${i}", ${JSON.stringify(this.filePath||"")});`).join(`
183
- `)}
184
- leaveModule(module);
185
- })();`}process(){return!1}}const aS=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function cm(t){if(t.length===0||!Ti[t.charCodeAt(0)])return!1;for(let e=1;e<t.length;e++)if(!zt[t.charCodeAt(e)])return!1;return!aS.has(t)}class lS extends Ut{constructor(e,n,s){super(),this.rootTransformer=e,this.tokens=n,this.isImportsTransformEnabled=s}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(o._public)||this.tokens.matches1(o._protected)||this.tokens.matches1(o._private)||this.tokens.matches1(o._abstract)||this.tokens.matches1(o._readonly)||this.tokens.matches1(o._override)||this.tokens.matches1(o.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(o._enum)||this.tokens.matches2(o._const,o._enum)?(this.processEnum(),!0):this.tokens.matches2(o._export,o._enum)||this.tokens.matches3(o._export,o._const,o._enum)?(this.processEnum(!0),!0):!1}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(o._const)||this.tokens.matches1(o._enum);)this.tokens.removeToken();const n=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${n}; (function (${n})`),this.tokens.copyExpectedToken(o.braceL),this.processEnumBody(n),this.tokens.copyExpectedToken(o.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${n} || (exports.${n} = ${n} = {}));`):this.tokens.appendCode(`)(${n} || (${n} = {}));`)}processEnumBody(e){let n=null;for(;!this.tokens.matches1(o.braceR);){const{nameStringCode:s,variableName:i}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(o.eq,o.string,o.comma)||this.tokens.matches3(o.eq,o.string,o.braceR)?this.processStringLiteralEnumMember(e,s,i):this.tokens.matches1(o.eq)?this.processExplicitValueEnumMember(e,s,i):this.processImplicitValueEnumMember(e,s,i,n),this.tokens.matches1(o.comma)&&this.tokens.removeToken(),i!=null?n=i:n=`${e}[${s}]`}}extractEnumKeyInfo(e){if(e.type===o.name){const n=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${n}"`,variableName:cm(n)?n:null}}else if(e.type===o.string){const n=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:cm(n)?n:null}}else throw new Error("Expected name or string at beginning of enum element.")}processStringLiteralEnumMember(e,n,s){s!=null?(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${n}] = ${s};`)):(this.tokens.appendCode(`${e}[${n}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"))}processExplicitValueEnumMember(e,n,s){const i=this.tokens.currentToken().rhsEndIndex;if(i==null)throw new Error("Expected rhsEndIndex on enum assign.");if(s!=null){for(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${n}] = ${s}] = ${n};`)}else{for(this.tokens.appendCode(`${e}[${e}[${n}]`),this.tokens.copyToken();this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${n};`)}}processImplicitValueEnumMember(e,n,s,i){let r=i!=null?`${i} + 1`:"0";s!=null&&(this.tokens.appendCode(`const ${s} = ${r}; `),r=s),this.tokens.appendCode(`${e}[${e}[${n}] = ${r}] = ${n};`)}}class ea{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(e,n,s,i){ea.prototype.__init.call(this),ea.prototype.__init2.call(this),this.nameManager=e.nameManager,this.helperManager=e.helperManager;const{tokenProcessor:r,importProcessor:a}=e;this.tokens=r,this.isImportsTransformEnabled=n.includes("imports"),this.isReactHotLoaderTransformEnabled=n.includes("react-hot-loader"),this.disableESTransforms=!!i.disableESTransforms,i.disableESTransforms||(this.transformers.push(new rS(r,this.nameManager)),this.transformers.push(new sS(r)),this.transformers.push(new iS(r,this.nameManager))),n.includes("jsx")&&(i.jsxRuntime!=="preserve"&&this.transformers.push(new ns(this,r,a,this.nameManager,i)),this.transformers.push(new oS(this,r,a,i)));let l=null;if(n.includes("react-hot-loader")){if(!i.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");l=new zc(r,i.filePath),this.transformers.push(l)}if(n.includes("imports")){if(a===null)throw new Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new Ki(this,r,a,this.nameManager,this.helperManager,l,s,!!i.enableLegacyTypeScriptModuleInterop,n.includes("typescript"),n.includes("flow"),!!i.preserveDynamicImport,!!i.keepUnusedImports))}else this.transformers.push(new Zw(r,this.nameManager,this.helperManager,l,n.includes("typescript"),n.includes("flow"),!!i.keepUnusedImports,i));n.includes("flow")&&this.transformers.push(new eS(this,r,n.includes("imports"))),n.includes("typescript")&&this.transformers.push(new lS(this,r,n.includes("imports"))),n.includes("jest")&&this.transformers.push(new jc(this,r,this.nameManager,a))}transform(){this.tokens.reset(),this.processBalancedCode();let n=this.isImportsTransformEnabled?'"use strict";':"";for(const a of this.transformers)n+=a.getPrefixCode();n+=this.helperManager.emitHelpers(),n+=this.generatedVariables.map(a=>` var ${a};`).join("");for(const a of this.transformers)n+=a.getHoistedCode();let s="";for(const a of this.transformers)s+=a.getSuffixCode();const i=this.tokens.finish();let{code:r}=i;if(r.startsWith("#!")){let a=r.indexOf(`
186
- `);return a===-1&&(a=r.length,r+=`
187
- `),{code:r.slice(0,a+1)+n+r.slice(a+1)+s,mappings:this.shiftMappings(i.mappings,n.length)}}else return{code:n+r+s,mappings:this.shiftMappings(i.mappings,n.length)}}processBalancedCode(){let e=0,n=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(o.braceL)||this.tokens.matches1(o.dollarBraceL))e++;else if(this.tokens.matches1(o.braceR)){if(e===0)return;e--}if(this.tokens.matches1(o.parenL))n++;else if(this.tokens.matches1(o.parenR)){if(n===0)return;n--}this.processToken()}}processToken(){if(this.tokens.matches1(o._class)){this.processClass();return}for(const e of this.transformers)if(e.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(o._class,o.name))throw new Error("Expected identifier for exported class name.");const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){const e=Jw(this,this.tokens,this.nameManager,this.disableESTransforms),n=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0;let s=e.headerInfo.className;n&&(s=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(s),this.tokens.appendCode(` (${s} =`));const r=this.tokens.currentToken().contextId;if(r==null)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(o._class);!this.tokens.matchesContextIdAndLabel(o.braceL,r);)this.processToken();this.processClassBody(e,s);const a=e.staticInitializerNames.map(l=>`${s}.${l}()`);n?this.tokens.appendCode(`, ${a.map(l=>`${l}, `).join("")}${s})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${a.map(l=>`${l};`).join(" ")}`)}processClassBody(e,n){const{headerInfo:s,constructorInsertPos:i,constructorInitializerStatements:r,fields:a,instanceInitializerNames:l,rangesToRemove:c}=e;let u=0,d=0;const m=this.tokens.currentToken().contextId;if(m==null)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(o.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");const f=r.length+l.length>0;if(i===null&&f){const g=this.makeConstructorInitCode(r,l,n);if(s.hasSuperclass){const E=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${E}) { super(...${E}); ${g}; }`)}else this.tokens.appendCode(`constructor() { ${g}; }`)}for(;!this.tokens.matchesContextIdAndLabel(o.braceR,m);)if(u<a.length&&this.tokens.currentIndex()===a[u].start){let g=!1;for(this.tokens.matches1(o.bracketL)?this.tokens.copyTokenWithPrefix(`${a[u].initializerName}() {this`):this.tokens.matches1(o.string)||this.tokens.matches1(o.num)?(this.tokens.copyTokenWithPrefix(`${a[u].initializerName}() {this[`),g=!0):this.tokens.copyTokenWithPrefix(`${a[u].initializerName}() {this.`);this.tokens.currentIndex()<a[u].end;)g&&this.tokens.currentIndex()===a[u].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),u++}else if(d<c.length&&this.tokens.currentIndex()>=c[d].start){for(this.tokens.currentIndex()<c[d].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<c[d].end;)this.tokens.removeToken();d++}else this.tokens.currentIndex()===i?(this.tokens.copyToken(),f&&this.tokens.appendCode(`;${this.makeConstructorInitCode(r,l,n)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(o.braceR)}makeConstructorInitCode(e,n,s){return[...e,...n.map(i=>`${s}.prototype.${i}.call(this)`)].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(o.parenR,o.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,o.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(w._async)&&!this.tokens.matches1(o._async))return!1;const e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==o.lessThan||!e.isType)return!1;let n=this.tokens.currentIndex()+1;for(;this.tokens.tokens[n].isType;)n++;if(this.tokens.matches1AtIndex(n,o.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<n;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(e,n){for(let s=0;s<e.length;s++){const i=e[s];i!==void 0&&(e[s]=i+n)}return e}}var Vc={},um;function cS(){return um||(um=1,(function(t){t.__esModule=!0,t.LinesAndColumns=void 0;var e=`
188
- `,n="\r",s=(function(){function i(r){this.string=r;for(var a=[0],l=0;l<r.length;)switch(r[l]){case e:l+=e.length,a.push(l);break;case n:l+=n.length,r[l]===e&&(l+=e.length),a.push(l);break;default:l++;break}this.offsets=a}return i.prototype.locationForIndex=function(r){if(r<0||r>this.string.length)return null;for(var a=0,l=this.offsets;l[a+1]<=r;)a++;var c=r-l[a];return{line:a,column:c}},i.prototype.indexForLocation=function(r){var a=r.line,l=r.column;return a<0||a>=this.offsets.length||l<0||l>this.lengthOfLine(a)?null:this.offsets[a]+l},i.prototype.lengthOfLine=function(r){var a=this.offsets[r],l=r===this.offsets.length-1?this.string.length:this.offsets[r+1];return l-a},i})();t.LinesAndColumns=s,t.default=s})(Vc)),Vc}cS();function uS(t){const e=new Set;for(let n=0;n<t.tokens.length;n++)t.matches1AtIndex(n,o._import)&&!t.matches3AtIndex(n,o._import,o.name,o.eq)&&hS(t,n,e);return e}function hS(t,e,n){e++,!t.matches1AtIndex(e,o.parenL)&&(t.matches1AtIndex(e,o.name)&&(n.add(t.identifierNameAtIndex(e)),e++,t.matches1AtIndex(e,o.comma)&&e++),t.matches1AtIndex(e,o.star)&&(e+=2,n.add(t.identifierNameAtIndex(e)),e++),t.matches1AtIndex(e,o.braceL)&&(e++,dS(t,e,n)))}function dS(t,e,n){for(;;){if(t.matches1AtIndex(e,o.braceR))return;const s=Di(t,e);if(e=s.endIndex,s.isType||n.add(s.rightName),t.matches2AtIndex(e,o.comma,o.braceR))return;if(t.matches1AtIndex(e,o.braceR))return;if(t.matches1AtIndex(e,o.comma))e++;else throw new Error(`Unexpected token: ${JSON.stringify(t.tokens[e])}`)}}function pS(t,e){Nk(e);try{const n=fS(t,e),i=new ea(n,e.transforms,!!e.enableLegacyBabel5ModuleInterop,e).transform();let r={code:i.code};if(e.sourceMapOptions){if(!e.filePath)throw new Error("filePath must be specified when generating a source map.");r={...r,sourceMap:yk(i,e.filePath,e.sourceMapOptions,t,n.tokenProcessor.tokens)}}return r}catch(n){throw e.filePath&&(n.message=`Error transforming ${e.filePath}: ${n.message}`),n}}function fS(t,e){const n=e.transforms.includes("jsx"),s=e.transforms.includes("typescript"),i=e.transforms.includes("flow"),r=e.disableESTransforms===!0,a=Xw(t,n,s,i),l=a.tokens,c=a.scopes,u=new nc(t,l),d=new Oo(u),m=new Xi(t,l,i,r,d),f=!!e.enableLegacyTypeScriptModuleInterop;let g=null;return e.transforms.includes("imports")?(g=new ss(u,m,f,e,e.transforms.includes("typescript"),!!e.keepUnusedImports,d),g.preprocessTokens(),tf(m,c,g.getGlobalNames()),e.transforms.includes("typescript")&&!e.keepUnusedImports&&g.pruneTypeOnlyImports()):e.transforms.includes("typescript")&&!e.keepUnusedImports&&tf(m,c,uS(m)),{tokenProcessor:m,scopes:c,nameManager:u,importProcessor:g,helperManager:d}}function mS(t){return t=t.replace(/<link.*?href=["']\/\/.*?["'].*?>/g,e=>e.replace("//","https://")),t=t.replace(/<script.*?src=["']\/\/.*?["'].*?>/g,e=>e.replace("//","https://")),t}function gS(t,e){return`<script>
189
- (function() {
190
- // Store file data for interception
191
- const __filesURI = "${e}";
192
- const __files = JSON.parse(decodeURIComponent(__filesURI));
193
- const __fileNames = ${JSON.stringify(t)};
194
-
195
- // Override XMLHttpRequest
196
- const OriginalXHR = window.XMLHttpRequest;
197
- window.XMLHttpRequest = function() {
198
- this.xhr = new OriginalXHR();
199
- return this;
200
- };
201
-
202
- // Override open method to intercept file requests
203
- window.XMLHttpRequest.prototype.open = function(method, url, async, user, password) {
204
- // Normalize relative URLs by removing './' prefix
205
- let normalizedUrl = url;
206
- if (typeof url === 'string' && url.startsWith('./')) {
207
- normalizedUrl = url.substring(2);
208
- }
209
-
210
- if (__fileNames.includes(normalizedUrl)) {
211
- this.file = normalizedUrl;
212
- this.responseText = __files[normalizedUrl];
213
-
214
- // Handle XML files
215
- if (normalizedUrl.endsWith(".xml")) {
216
- try {
217
- const parser = new DOMParser();
218
- this.responseXML = parser.parseFromString(this.responseText, "text/xml");
219
- } catch (e) {}
220
- }
221
-
222
- // Mark as completed
223
- this.readyState = 4;
224
- this.status = 200;
225
- } else {
226
- // Pass through to real XHR
227
- this.xhr.open(method, url, async, user, password);
228
- }
229
- };
230
-
231
- // Implement other XHR methods
232
- window.XMLHttpRequest.prototype.setRequestHeader = function(header, value) {
233
- if (this.file) return;
234
- return this.xhr.setRequestHeader(header, value);
235
- };
236
-
237
- window.XMLHttpRequest.prototype.abort = function() {
238
- return this.xhr.abort();
239
- };
240
-
241
- window.XMLHttpRequest.prototype.getAllResponseHeaders = function() {
242
- return this.xhr.getAllResponseHeaders();
243
- };
244
-
245
- window.XMLHttpRequest.prototype.getResponseHeader = function(header) {
246
- return this.xhr.getResponseHeader(header);
247
- };
248
-
249
- window.XMLHttpRequest.prototype.overrideMimeType = function(mime) {
250
- return this.xhr.overrideMimeType(mime);
251
- };
252
-
253
- window.XMLHttpRequest.prototype.send = function(data) {
254
- const that = this;
255
-
256
- // Process in next tick to support libraries that attach handlers after send
257
- setTimeout(() => {
258
- // Wire up event handlers
259
- that.xhr.onerror = that.onerror;
260
- that.xhr.onprogress = that.onprogress;
261
-
262
- if (that.responseType || that.responseType === '') {
263
- that.xhr.responseType = that.responseType;
264
- }
265
-
266
- // Handle onload
267
- if (that.onload) {
268
- const onload = that.onload;
269
- that.xhr.onload = that.onload = function() {
270
- try {
271
- that.response = this.response;
272
- that.readyState = this.readyState;
273
- that.status = this.status;
274
- that.statusText = this.statusText;
275
- } catch (e) {}
276
-
277
- try {
278
- if (that.responseType === '') {
279
- that.responseXML = this.responseXML;
280
- that.responseText = this.responseText;
281
- }
282
- if (that.responseType === 'text') {
283
- that.responseText = this.responseText;
284
- }
285
- } catch (e) {}
286
-
287
- onload();
288
- };
289
- }
290
-
291
- // Handle onreadystatechange
292
- if (that.onreadystatechange) {
293
- const ready = that.onreadystatechange;
294
- that.xhr.onreadystatechange = function() {
295
- try {
296
- that.readyState = this.readyState;
297
- that.responseText = this.responseText;
298
- that.responseXML = this.responseXML;
299
- that.responseType = this.responseType;
300
- that.status = this.status;
301
- that.statusText = this.statusText;
302
- } catch (e) {}
303
-
304
- ready();
305
- };
306
- }
307
-
308
- // For local files, trigger callbacks directly
309
- if (that.file) {
310
- if (that.onreadystatechange) {
311
- return that.onreadystatechange();
312
- }
313
- if (that.onload) {
314
- return that.onload();
315
- }
316
- }
317
-
318
- // For real requests, pass through
319
- that.xhr.send(data);
320
- }, 0);
321
- };
322
-
323
- // Override fetch API
324
- const originalFetch = window.fetch;
325
- window.fetch = function(input, init) {
326
- let url = input;
327
-
328
- if (input instanceof Request) {
329
- url = input.url;
330
- }
331
-
332
- // Fix blob:// protocol issues
333
- if (typeof url === 'string') {
334
- url = url.replace('blob://', 'http://');
335
- }
336
-
337
- // Normalize relative URLs by removing './' prefix
338
- let normalizedUrl = url;
339
- if (typeof url === 'string' && url.startsWith('./')) {
340
- normalizedUrl = url.substring(2);
341
- }
342
-
343
- // Intercept requests for local files
344
- if (__fileNames.includes(normalizedUrl)) {
345
- const responseText = __files[normalizedUrl];
346
-
347
- return Promise.resolve({
348
- ok: true,
349
- status: 200,
350
- statusText: 'ok',
351
- url: url,
352
- text: () => Promise.resolve(responseText),
353
- json: () => Promise.resolve(JSON.parse(responseText)),
354
- blob: () => Promise.resolve(new Blob([responseText])),
355
- arrayBuffer: () => {
356
- const buffer = new ArrayBuffer(responseText.length * 2);
357
- const bufferView = new Uint16Array(buffer);
358
-
359
- for (let i = 0; i < responseText.length; i++) {
360
- bufferView[i] = responseText.charCodeAt(i);
361
- }
362
-
363
- return Promise.resolve(buffer);
364
- }
365
- });
366
- }
367
-
368
- // Pass through to original fetch
369
- return originalFetch(input, init);
370
- };
371
- })();
372
- <\/script>`}function hm(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Uc(t){let e=t["index.html"]||"";const{"index.html":n,...s}=t;e=mS(e);const i={};for(const[m,f]of Object.entries(s))if(f){if(m.endsWith(".js")){const g=new RegExp(`<script(.*?)src=["']${hm(m)}["'](.*?)>[\\s\\S]*?<\\/script>`,"g");if(e.match(g)){const E=f.replace(/\$/g,"$$$$");e=e.replace(g,`<script$1$2>${E}<\/script>`);continue}}if(m.endsWith(".css")){const g=new RegExp(`<link.*?href=["']${hm(m)}["'].*?>`,"g");if(e.match(g)){e=e.replace(g,`<style>${f}</style>`);continue}}m.endsWith(".html")||(i[m]=f)}const r=Object.keys(i),a=encodeURIComponent(JSON.stringify(i)),c=`<meta charset="utf-8">${gS(r,a)}`;let u="";const d=e.match(/<!DOCTYPE[^>]*>/i);if(d&&(u=d[0],e=e.replace(d[0],"")),e.includes("<head>"))e=e.replace("<head>",`<head>${c}`);else if(e.includes("<html>"))e=e.replace("<html>",`<html><head>${c}</head>`);else return`${u}<html><head>${c}</head><body>${e}</body></html>`;return`${u}${e}`}const yS=()=>(Math.random()+"").slice(2);function qc(t={}){return{name:"sucrase",transform(e,n){if(!n.match(/\.(?:js|[jt]sx)$/))return null;const s=pS(e,{transforms:["jsx","typescript"],filePath:n,sourceMapOptions:{compiledFilename:"bundle.js"},production:!0,...t});return{code:s.code,map:s.sourceMap}}}}const dm={dependencies:{},vizhub:{},license:"MIT"},bS=!1,ta=t=>{const e=t["package.json"];try{const n=e?JSON.parse(e):dm;return bS&&console.log("[packageJSON] pkg:",JSON.stringify(n,null,2)),n}catch{return dm}},Hc=t=>ta(t).dependencies||{},Wc=t=>(ta(t).vizhub||{}).libraries||{},Gc=({name:t,version:e},n,s="jsdelivr")=>{const i=n[t]&&n[t].path||"";return s==="jsdelivr"?`https://cdn.jsdelivr.net/npm/${t}@${e}${i}`:`https://unpkg.com/${t}@${e}${i}`},xS=t=>{const e=t?.vizhub?.libraries;return e?Object.entries(e).reduce((n,[s,i])=>(i.global&&(n[s]=i.global),n),{}):{}},kS={d3:"d3",react:"React","react-dom":"ReactDOM"},pm=t=>{const e=xS(t);return{...kS,...e}},Ji=t=>{const[e,...n]=t.split("/"),s=n.join("/");return{vizId:e,fileName:s}},ES=`var EOL = {},
373
- EOF = {},
374
- QUOTE = 34,
375
- NEWLINE = 10,
376
- RETURN = 13;
377
-
378
- function objectConverter(columns) {
379
- return new Function(
380
- 'd',
381
- 'return {' +
382
- columns
383
- .map(function (name, i) {
384
- return (
385
- JSON.stringify(name) + ': d[' + i + '] || ""'
386
- );
387
- })
388
- .join(',') +
389
- '}',
390
- );
391
- }
392
-
393
- function customConverter(columns, f) {
394
- var object = objectConverter(columns);
395
- return function (row, i) {
396
- return f(object(row), i, columns);
397
- };
398
- }
399
-
400
- function dsv(delimiter) {
401
- var DELIMITER = delimiter.charCodeAt(0);
402
-
403
- function parse(text, f) {
404
- var convert,
405
- columns,
406
- rows = parseRows(text, function (row, i) {
407
- if (convert) return convert(row, i - 1);
408
- (columns = row),
409
- (convert = f
410
- ? customConverter(row, f)
411
- : objectConverter(row));
412
- });
413
- rows.columns = columns || [];
414
- return rows;
415
- }
416
-
417
- function parseRows(text, f) {
418
- var rows = [], // output rows
419
- N = text.length,
420
- I = 0, // current character index
421
- n = 0, // current line number
422
- t, // current token
423
- eof = N <= 0, // current token followed by EOF?
424
- eol = false; // current token followed by EOL?
425
-
426
- // Strip the trailing newline.
427
- if (text.charCodeAt(N - 1) === NEWLINE) --N;
428
- if (text.charCodeAt(N - 1) === RETURN) --N;
429
-
430
- function token() {
431
- if (eof) return EOF;
432
- if (eol) return (eol = false), EOL;
433
-
434
- // Unescape quotes.
435
- var i,
436
- j = I,
437
- c;
438
- if (text.charCodeAt(j) === QUOTE) {
439
- while (
440
- (I++ < N && text.charCodeAt(I) !== QUOTE) ||
441
- text.charCodeAt(++I) === QUOTE
442
- );
443
- if ((i = I) >= N) eof = true;
444
- else if ((c = text.charCodeAt(I++)) === NEWLINE)
445
- eol = true;
446
- else if (c === RETURN) {
447
- eol = true;
448
- if (text.charCodeAt(I) === NEWLINE) ++I;
449
- }
450
- return text.slice(j + 1, i - 1).replace(/""/g, '"');
451
- }
452
-
453
- // Find next delimiter or newline.
454
- while (I < N) {
455
- if ((c = text.charCodeAt((i = I++))) === NEWLINE)
456
- eol = true;
457
- else if (c === RETURN) {
458
- eol = true;
459
- if (text.charCodeAt(I) === NEWLINE) ++I;
460
- } else if (c !== DELIMITER) continue;
461
- return text.slice(j, i);
462
- }
463
-
464
- // Return last token before EOF.
465
- return (eof = true), text.slice(j, N);
466
- }
467
-
468
- while ((t = token()) !== EOF) {
469
- var row = [];
470
- while (t !== EOL && t !== EOF)
471
- row.push(t), (t = token());
472
- if (f && (row = f(row, n++)) == null) continue;
473
- rows.push(row);
474
- }
475
-
476
- return rows;
477
- }
478
-
479
- return {
480
- parse: parse,
481
- };
482
- }
483
-
484
- var csv = dsv(',');
485
-
486
- var csvParse = csv.parse;
487
-
488
- var tsv = dsv(' ');
489
-
490
- var tsvParse = tsv.parse;
491
-
492
- export { csvParse, tsvParse };`,AS=t=>t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),wS=()=>({name:"transformDSV",transform:async(t,e)=>{const{fileName:n}=Ji(e),s=n.endsWith(".csv"),i=n.endsWith(".tsv");if(s||i)return{code:`
493
- ${ES}
494
- const data = ${s?"csvParse":"tsvParse"}(\`${AS(t)}\`);
495
- export default data;
496
- `,map:{mappings:""}}}}),SS=t=>{const e=/^@([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)$/,n=t.match(e);return n?{userName:n[1],idOrSlug:n[2]}:null},IS=({vizId:t,slugCache:e})=>({name:"vizResolve",resolveId:async(n,s)=>{if(n.startsWith("./")&&!s?.startsWith("https://")){let r=n.substring(2);if(!r.endsWith(".js")&&!r.endsWith(".css")&&!r.endsWith(".csv")&&!r.endsWith(".svelte")&&!r.endsWith(".png")&&!r.endsWith(".jpg")&&!r.endsWith(".jpeg")&&!r.endsWith(".gif")&&!r.endsWith(".svg")&&!r.endsWith(".webp")&&!r.endsWith(".bmp")&&(r+=".js"),s){const{vizId:a,fileName:l}=Ji(s),c=l.split("/").slice(0,-1).join("/"),u=c?`${c}/${r}`:r;return`${a}/${u}`}return t+"/"+r}const i=SS(n);if(i){let r;if(ox(i.idOrSlug))r=i.idOrSlug;else{if(!e)throw new Error("slugCache is required to import by slug in v3 runtime");r=await e.get(`${i.userName}/${i.idOrSlug}`)}return r+"/index.js"}}}),vS=[".jpg",".jpeg",".png",".gif",".svg",".webp",".bmp"],Xc=t=>{const e=t.toLowerCase().split(".").pop();return e?vS.includes(`.${e}`):!1},_S=t=>{switch(t.toLowerCase().split(".").pop()){case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"svg":return"image/svg+xml";case"webp":return"image/webp";case"bmp":return"image/bmp";default:return"image/png"}},PS=t=>{const e=t.replace(/\s/g,"");return/^[A-Za-z0-9+/]*={0,2}$/.test(e)},Kc=(t,e)=>{const n=_S(t);return t.toLowerCase().split(".").pop()==="svg"&&!PS(e)?`data:${n};utf8,${encodeURIComponent(e)}`:`data:${n};base64,${e}`},NS=(t,e)=>t.replace(/<img([^>]*)\s+src=["']([^"']+)["']([^>]*)>/gi,(n,s,i,r)=>{if(e[i]!==void 0&&Xc(i)){const a=Kc(i,e[i]);return`<img${s} src="${a}"${r}>`}return n}),$S=({vizCache:t,trackCSSImport:e,vizId:n,files:s})=>({name:"vizLoad",load:async i=>{const r=Ji(i),a=r.vizId,l=r.fileName;if(l.endsWith(".css"))return e(i),"";let c=null;if(a===n&&s)c=s[l]||null;else{const u=await t.get(a);c=w1(u,l)}if(c===null)throw new Error(`Imported file "${l}" not found.`);return Xc(l)?`export default "${Kc(l,c)}";`:c}}),fm=new Map,Jc=new Map;let Yc;const Vs="https://cdn.jsdelivr.net/npm/svelte@5.37.1",CS=`${Vs}/compiler/index.js`;async function mm(t){const e=Jc.get(t);if(e)return e;const n=[".js","/index.js"];for(const i of n){const r=`${t}${i}`;try{if((await fetch(r,{method:"HEAD"})).ok)return Jc.set(t,r),r}catch{continue}}const s=`${t}.js`;return Jc.set(t,s),s}const TS=({getSvelteCompiler:t})=>({name:"transformSvelte",load:async e=>{if(e==="virtual:esm-env")return`
497
- export const BROWSER = true;
498
- export const DEV = true;
499
- export const NODE = false;
500
- export const PROD = false;
501
- `;if(!e.startsWith(Vs))return;const n=fm.get(e);if(n)return n;const s=await fetch(e).then(i=>i.text());return fm.set(e,s),s},resolveId:async(e,n)=>{if(e==="esm-env")return"virtual:esm-env";if(e==="svelte")return`${Vs}/src/index-client.js`;if(e.startsWith("svelte/")){const s=e.slice(7),i=`${Vs}/src/${s}`;return await mm(i)}if(e.startsWith("#client/")){const s=e.slice(8),i=`${Vs}/src/internal/client/${s}`;return await mm(i)}if(/^https?:/.test(e))return e;if(e.startsWith(".")&&n&&n.startsWith(Vs)){const s=new URL(e,n).href;return new URL(e,n).href,s}},transform:async(e,n)=>{const{fileName:s}=Ji(n);if(s.endsWith(".svelte")){if(!Yc){if(!t)throw new Error("Svelte compiler not available");Yc=await t()}const i=Yc(e,{filename:s,generate:"client",css:"external",dev:!1});let r=i.js.code;return i.css&&i.css.code&&(r=`
502
- // Auto-inject CSS for Svelte component
503
- (function() {
504
- if (typeof document !== 'undefined') {
505
- const style = document.createElement('style');
506
- style.textContent = ${JSON.stringify(i.css.code)};
507
- document.head.appendChild(style);
508
- }
509
- })();
510
- `+r),r}}}),RS=async({files:t,rollup:e,enableSourcemap:n=!0,vizCache:s,vizId:i,slugCache:r,getSvelteCompiler:a})=>{const l=new Set,c=x=>{l.add(x)};if(!t["index.js"])throw new Error("Missing index.js");const u={name:"replace",transform(x,A){let S=!1,k=x;return k.includes("process.env.NODE_ENV")&&(k=k.replace(/\bprocess\.env\.NODE_ENV\b/g,JSON.stringify("production")),S=!0),S?{code:k,map:null}:null}},d={input:"./index.js",plugins:[...i?[IS({vizId:i,slugCache:r})]:[],wS(),qc(),TS({getSvelteCompiler:a}),u,...s?[$S({vizCache:s,trackCSSImport:c,vizId:i,files:t})]:[]],onwarn(x,A){x.code!=="UNRESOLVED_IMPORT"&&A(x)}},m={format:"umd",name:"Viz",sourcemap:!!n,compact:!0},f=ta(t);if(f){const x=pm(f);x&&(d.external=Object.keys(x),m.globals=x)}d.external||(d.external=[]),m.globals||(m.globals={}),Array.isArray(d.external)&&(d.external=d.external.filter(x=>typeof x=="string"&&!x.startsWith("#client/")));const g=await e(d),{output:E}=await g.generate(m);return{src:E[0].code,cssFiles:Array.from(l)}},DS=t=>{if(t instanceof Error){const e=t.stack||"",n=t.message||"Unknown error";return`${t.name||"Error"}: ${n}
511
- ${e}`}else if("error"in t&&t.error instanceof Error){const e=t.error,n=e.stack||"",s=e.message||"Unknown error",i="filename"in t?t.filename:"",r="lineno"in t?t.lineno:"",a="colno"in t?t.colno:"";let l="";return i&&r&&(l=` at ${i}:${r}`,a&&(l+=`:${a}`)),`${e.name||"Error"}: ${s}${l}
512
- ${n}`}else if("reason"in t){const e=t.reason;if(e instanceof Error){const n=e.stack||"",s=e.message||"Unknown error";return`Unhandled Promise Rejection - ${e.name||"Error"}: ${s}
513
- ${n}`}else return`Unhandled Promise Rejection: ${String(e)}`}else return`Unknown runtime error: ${String(t)}`},na=()=>`
514
- // Global error handling for runtime errors
515
- (() => {
516
- const formatRuntimeError = ${DS.toString()};
517
-
518
- // Handle uncaught JavaScript errors
519
- window.addEventListener('error', (event) => {
520
- const formattedErrorMessage = formatRuntimeError(event);
521
- parent.postMessage({
522
- type: 'runtimeError',
523
- formattedErrorMessage
524
- }, "*");
525
- });
526
-
527
- // Handle unhandled promise rejections
528
- window.addEventListener('unhandledrejection', (event) => {
529
- const formattedErrorMessage = formatRuntimeError(event);
530
- parent.postMessage({
531
- type: 'runtimeError',
532
- formattedErrorMessage
533
- }, "*");
534
- });
535
- })();
536
- `;function OS(){return Math.random().toString().slice(2,7)}const LS=({cdn:t,src:e,styles:n})=>{const s=`viz-container-${OS()}`;return`<!DOCTYPE html>
537
- <html>
538
- <head>
539
- <meta charset="utf-8">${t}${n}
540
- <style>
541
- body {
542
- margin: 0;
543
- overflow: hidden;
544
- }
545
- #${s} {
546
- height: 100vh;
547
- }
548
- </style>
549
- </head>
550
- <body>
551
- <div id="${s}"></div>
552
- <script>${na()}<\/script>
553
- <script id="injected-script">${e}<\/script>
554
- <script>
555
- (() => {
556
- let cleanup;
557
- const render = () => {
558
- const container = document.getElementById('${s}');
559
- typeof cleanup === 'function' && cleanup();
560
- cleanup = (Viz.viz || Viz.main)(container, { state: window.state, setState, writeFile });
561
- };
562
- const setState = (next) => {
563
- window.state = next(window.state);
564
- render();
565
- };
566
- const writeFile = (fileName, content) => {
567
- parent.postMessage({ type: 'writeFile', fileName, content }, "*");
568
- };
569
- const run = () => {
570
- try {
571
- setState((state) => state || {});
572
- } catch (error) {
573
- console.error(error);
574
- parent.postMessage({ type: 'runError', error }, "*");
575
- }
576
- }
577
- run();
578
- const runJS = (src) => {
579
- document.getElementById('injected-script')?.remove();
580
- const script = document.createElement('script');
581
- script.textContent = src;
582
- script.id = 'injected-script';
583
- document.body.appendChild(script);
584
- run();
585
- };
586
- const runCSS = (css) => {
587
- let style = document.getElementById('injected-style');
588
- if (!style) {
589
- style = document.createElement('style');
590
- style.type = 'text/css';
591
- style.id = 'injected-style';
592
- document.head.appendChild(style);
593
- }
594
- style.textContent = css;
595
- };
596
- onmessage = (message) => {
597
- switch (message.data.type) {
598
- case 'runJS':
599
- runJS(message.data.js);
600
- parent.postMessage({ type: 'runDone' }, "*");
601
- break;
602
- case 'runCSS':
603
- runCSS(message.data.css);
604
- break;
605
- case 'ping':
606
- parent.postMessage({ type: 'pong' }, "*");
607
- break;
608
- default:
609
- break;
610
- }
611
- }
612
- })();
613
- <\/script>
614
- </body>
615
- </html>`},MS=async({files:t,rollup:e,enableSourcemap:n=!0,vizCache:s,vizId:i,slugCache:r,getSvelteCompiler:a})=>{const{src:l,cssFiles:c}=await RS({files:t,rollup:e,enableSourcemap:n,vizCache:s,vizId:i,slugCache:r,getSvelteCompiler:a});let u=[];if(c.length>0)for(let E=0;E<c.length;E++){const x=c[E],A=Ji(x),S=A.vizId,k=A.fileName;let v=null;if(S===i&&t)v=t[k]||null;else{const I=await s.get(S);v=w1(I,k)}v&&u.push(v)}const d=u.join(`
616
- `),m=`
617
- <style id="injected-style">${d}</style>`;let f="";const g=Object.entries(Hc(t));if(g.length>0){const E=Wc(t);f=g.map(([x,A],S)=>{const k=Gc({name:x,version:A},E);return`${S>0?" ":`
618
- `}<script src="${k}"><\/script>`}).join("")}return{html:LS({cdn:f,src:l,styles:m}),css:d,js:l,runtimeVersion:"v3"}},gm=({initialContents:t,handleCacheMiss:e})=>{const n=new Map(t.map(s=>[s.id,s]));return{get:async s=>{const i=n.get(s);if(i!==void 0)return i;if(!e)throw new Error(`Unresolved import from vizId ${s}, cache miss handler not provided.`);const r=await e(s);if(r)return n.set(s,r),r;throw new Error(`Unresolved import from vizId ${s}`)},set:s=>{n.set(s.id,s)},invalidate:s=>{n.delete(s)}}},FS=({initialMappings:t={},handleCacheMiss:e})=>({get:async n=>{const s=t[n];if(s!==void 0)return s;if(!e)throw new Error(`Unresolved slug ${n}, cache miss handler not provided.`);const i=await e(n);if(i)return t[n]=i,i;throw new Error(`Unresolved slug ${n}`)},set:(n,s)=>{t[n]=s},invalidate:n=>{delete t[n]}}),BS=(t,e="Sample Content for Exporting",n=A1())=>({id:n,files:dx(t),title:e}),jS=t=>{if(Object.keys(t).length===0)return null;const e="index.html"in t,n="index.js"in t,s="index.jsx"in t;return e?t["index.html"].includes('type="module"')?"v4":n||s?"v2":"v1":!e&&n?"v3":null},Qc=(t,e)=>new RegExp(`<${e}\\b`,"i").test(t)&&new RegExp(`</${e}>`,"i").test(t),zS=t=>{const e=t.trim();return Qc(e,"html")&&Qc(e,"head")&&Qc(e,"body")?e:`<html><head></head><body>${e}</body></html>`},VS=(t,e)=>t.replace(new RegExp(`<script[^>]*src=["'][^"']*${e.source}[^"']*["'][^>]*>\\s*<\/script>`,"gi"),""),Zc=(t,e,n)=>t.replace(new RegExp(e,"i"),`${n}${e}`),US=(t,e)=>{let n=zS(t);const s=Object.entries(Hc(e));if(s.length){const r=Wc(e);s.forEach(([l])=>{n=VS(n,new RegExp(`${l}@`))});const a=s.map(([l,c])=>Gc({name:l,version:c},r)).map(l=>`<script src="${l}"><\/script>`).join(`
619
- `);n=Zc(n,"</head>",a+`
620
- `)}if(e["bundle.js"]!==void 0||e["index.js"]!==void 0){const r='<script src="bundle.js"><\/script>',a=/<script\b[^>]*\bsrc=["']bundle\.js["'][^>]*>\s*<\/script>/gi,l=[...n.matchAll(a)];l.length===1&&(()=>{const c=l[0].index??-1;if(c===-1)return!1;const u=n.search(/<body\b[^>]*>/i),d=n.search(/<\/body>/i);return u!==-1&&d!==-1&&c>u&&c<d})()||(n=n.replace(a,""),n=Zc(n,"</body>",r))}const i=`<script>${na()}<\/script>
621
- `;return n=Zc(n,"</head>",i),/^\s*<!DOCTYPE/i.test(n)?n:`<!DOCTYPE html>${n}`},qS=t=>{const e=t["index.html"];return!e&&!t["index.js"]&&!t["bundle.js"]?"":US(e||"<!DOCTYPE html><html><head></head><body></body></html>",t)};function HS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ym,bm;function WS(){return bm||(bm=1,ym={d3:"d3","d3-array":"d3","d3-axis":"d3","d3-brush":"d3","d3-chord":"d3","d3-collection":"d3","d3-color":"d3","d3-contour":"d3","d3-dispatch":"d3","d3-drag":"d3","d3-dsv":"d3","d3-ease":"d3","d3-fetch":"d3","d3-force":"d3","d3-format":"d3","d3-geo":"d3","d3-hierarchy":"d3","d3-interpolate":"d3","d3-path":"d3","d3-polygon":"d3","d3-quadtree":"d3","d3-random":"d3","d3-scale":"d3","d3-scale-chromatic":"d3","d3-selection":"d3","d3-shape":"d3","d3-tile":"d3","d3-time":"d3","d3-time-format":"d3","d3-timer":"d3","d3-transition":"d3","d3-voronoi":"d3","d3-zoom":"d3",react:"React","react-dom":"ReactDOM","react-dropdown-browser":"ReactDropdown","react-dropdown":"ReactDropdown",three:"THREE",vega:"vega","vega-embed":"vegaEmbed","vega-lite":"vegaLite","vega-lite-api":"vl","vega-tooltip":"vegaTooltip","vega-themes":"vegaThemes","vizhub-vega-lite-config":"vizhubVegaLiteConfig",semiotic:"Semiotic","viz.js":"Viz"}),ym}var GS=WS();const XS=HS(GS),on="\0virtual:",KS=t=>{let e=t.replace(/^\.\//,"");return e=e.replace(/\/+/g,"/"),e=e.replace(/\/$/,""),e},JS=(t,e)=>{const n=t.includes("/")?t.slice(0,t.lastIndexOf("/")):"",s=e.split("/"),i=n?n.split("/"):[];for(const r of s)r===".."?i.pop():r!=="."&&r!==""&&i.push(r);return i.join("/")},xm=t=>({name:"virtual-file-system",resolveId(e,n){const s=n?.startsWith(on)?n.slice(on.length):n;if(e.startsWith("./")||e.startsWith("../")){const r=KS(s?JS(s,e):e);if(t[r])return on+r;const a=[".js",".jsx",".ts",".tsx"];for(const l of a){const c=r+l;if(t[c])return on+c}}if(t[e])return on+e;const i=[".js",".jsx",".ts",".tsx"];for(const r of i){const a=e+r;if(t[a])return on+a}return null},load(e){if(e.startsWith(on)){const n=e.slice(on.length);if(t[n])return Xc(n)?`export default "${Kc(n,t[n])}";`:t[n]}return null}}),YS=async({files:t,rollup:e,enableSourcemap:n=!0})=>{let s="index.js";if(!t[s]&&(s="index.jsx",!t[s]))throw new Error("Missing entry point, can't find index.js or index.jsx");const i={input:"./"+s,plugins:[xm(t),qc()],onwarn(u,d){u.code!=="UNRESOLVED_IMPORT"&&d(u)}},r={format:"iife",sourcemap:n},a=ta(t);if(a){const u={...XS,...pm(a)};u&&(i.external=Object.keys(u),r.globals=u)}const l=await e(i),{output:c}=await l.generate(r);return c[0].code},QS=async({files:t,rollup:e,enableSourcemap:n})=>({...t,"bundle.js":await YS({files:t,rollup:e,enableSourcemap:n}),"index.html":qS(t)}),ZS=t=>{const e=[],n=[],s=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi;let i,r=0;for(;(i=s.exec(t))!==null;){const a=i[1],l=i[2];if(!/\btype\s*=\s*["']module["']/i.test(a))continue;const c=a.match(/\bsrc\s*=\s*["']([^"']+)["']/i);if(c)e.push(c[1]);else if(l.trim()){const u=`__inline_script_${r++}.js`;n.push({id:u,content:l.trim()}),e.push(u)}}return{entryPoints:e,inlineScripts:n}},eI=()=>({name:"catch-all-prevent-fs",resolveId(t,e){return{id:t,external:!0}}}),tI=async({entryPoint:t,files:e,rollup:n,enableSourcemap:s=!0})=>{const i={input:t.startsWith("./")?t:`./${t}`,plugins:[xm(e),qc({jsxRuntime:"automatic"}),eI()],onwarn(l,c){}},r=await n(i),{output:a}=await r.generate({format:"es",sourcemap:s});return a[0].code},eu=(t,e)=>new RegExp(`<${e}\\b`,"i").test(t)&&new RegExp(`</${e}>`,"i").test(t),nI=t=>{const e=t.trim();return eu(e,"html")&&eu(e,"head")&&eu(e,"body")?e:`<html><head></head><body>${e}</body></html>`},km=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),tu=(t,e,n)=>t.replace(new RegExp(e,"i"),`${n}${e}`),sI=t=>{const e=Hc(t);if(Object.keys(e).length===0)return null;const n=Wc(t),s={};for(const[i,r]of Object.entries(e))s[i]=Gc({name:i,version:r},n);return JSON.stringify({imports:s},null,2)},iI=()=>`
622
- // V4 Hot Reloading Support
623
- (() => {
624
- const runJS = (js) => {
625
- // Remove all existing bundled module scripts
626
- const existingScripts = document.querySelectorAll('script[type="module"]');
627
- existingScripts.forEach(script => {
628
- // Only remove scripts that contain bundled code (not import maps or external scripts)
629
- if (script.textContent && script.textContent.trim()) {
630
- script.remove();
631
- }
632
- });
633
-
634
- // Create new script with updated bundled code
635
- const script = document.createElement('script');
636
- script.type = 'module';
637
- script.textContent = js;
638
- document.body.appendChild(script);
639
- };
640
-
641
- const runCSS = (css) => {
642
- let style = document.getElementById('v4-injected-style');
643
- if (!style) {
644
- style = document.createElement('style');
645
- style.type = 'text/css';
646
- style.id = 'v4-injected-style';
647
- document.head.appendChild(style);
648
- }
649
- style.textContent = css;
650
- };
651
-
652
- // Listen for hot reload messages
653
- window.addEventListener('message', (message) => {
654
- switch (message.data.type) {
655
- case 'runJS':
656
- try {
657
- runJS(message.data.js);
658
- parent.postMessage({ type: 'runDone' }, "*");
659
- } catch (error) {
660
- console.error('V4 Hot reload error:', error);
661
- parent.postMessage({ type: 'runError', error }, "*");
662
- }
663
- break;
664
- case 'runCSS':
665
- runCSS(message.data.css);
666
- break;
667
- case 'ping':
668
- parent.postMessage({ type: 'pong' }, "*");
669
- break;
670
- default:
671
- break;
672
- }
673
- });
674
- })();
675
- `,rI=(t,e,n=[],s=!1)=>{if(!t["index.html"])return"";let i=nI(t["index.html"]);e.forEach((l,c)=>{if(n.some(u=>u.id===c)){const u=n.find(f=>f.id===c)?.content||"",d=km(u),m=new RegExp(`<script\\b[^>]*\\btype=["']module["'][^>]*>\\s*${d}\\s*<\/script>`,"gi");i=i.replace(m,`<script type="module">
676
- ${l}
677
- <\/script>`)}else{const u=new RegExp(`<script\\b[^>]*\\bsrc=["']${km(c)}["'][^>]*>[^<]*<\/script>`,"gi");i=i.replace(u,`<script type="module">
678
- ${l}
679
- <\/script>`)}});const r=sI(t);if(r&&!/<script\b[^>]*type=["']importmap["'][^>]*>/i.test(i)){const l=`<script type="importmap">
680
- ${r}
681
- <\/script>
682
- `;i=tu(i,"</head>",l)}const a=`<script>${na()}<\/script>
683
- `;if(i=tu(i,"</head>",a),s){const l=`<script>${iI()}<\/script>
684
- `;i=tu(i,"</body>",l)}return/^\s*<!DOCTYPE/i.test(i)?i:`<!DOCTYPE html>${i}`},oI=async({files:t,rollup:e,enableSourcemap:n=!0})=>{const s=t["index.html"]||"",{entryPoints:i,inlineScripts:r}=ZS(s);if(i.length===0)return{files:t,bundledJS:""};const a={...t};for(const m of r)a[m.id]=m.content;const l=new Map,c=[];for(const m of i){const f=await tI({entryPoint:m,files:a,rollup:e,enableSourcemap:n});l.set(m,f),c.push(f)}const u=rI(a,l,r,!0),d=c.join(`
685
- `);return{files:{...t,"index.html":u},bundledJS:d}},Yi=!1,aI=t=>{const e=`<script>${na()}<\/script>`;return t.includes("</head>")?t.replace("</head>",`${e}
686
- </head>`):t.includes("</body>")?t.replace("</body>",`${e}
687
- </body>`):t+e},nu=t=>{const e={...t};for(const[n,s]of Object.entries(e))n.toLowerCase().endsWith(".html")&&(e[n]=NS(s,t));return e},lI=async({files:t,rollup:e,enableSourcemap:n=!0,vizCache:s,vizId:i,slugCache:r,getSvelteCompiler:a})=>{try{if(Yi&&console.log("[build] files:",t?JSON.stringify(t).substring(0,100):void 0),Yi&&console.log("[build] vizCache:",s),Yi&&console.log("[build] vizId:",i),!t&&!s)throw new Error("Either files or vizCache is required");if(!t&&s&&!i)throw new Error("vizId is required when using vizCache");if(!t&&s&&i&&(t=hx((await s.get(i))?.files)),!t)throw new Error("Upable to extract viz files");const l=jS(t);if(Yi&&console.log("[build] version:",l),l==="v1"){const c=nu(t);return{html:aI(Uc(c)),runtimeVersion:l}}if(l==="v2"){if(!e)throw new Error("Rollup is required for v2 runtime");const c=await QS({files:t,rollup:e,enableSourcemap:n}),u=nu(c);return{html:Uc(u),runtimeVersion:l}}if(l==="v3"){if(!e)throw new Error("Rollup is required for v3 runtime");if(!s&&!i){const c=BS(t);i=c.id,s=gm({initialContents:[c],handleCacheMiss:async()=>{throw new Error("Cache miss handler not implemented")}})}if(!s)throw new Error("vizCache is required for v3 runtime");if(!i)throw new Error("vizId is required for v3 runtime if vizCache is provided");return await MS({files:t,rollup:e,vizCache:s,vizId:i,slugCache:r,getSvelteCompiler:a})}if(l==="v4"){if(!e)throw new Error("Rollup is required for v4 runtime");Yi&&console.log("[build] v4Build",{files:t,rollup:e,enableSourcemap:n});const c=await oI({files:t,rollup:e,enableSourcemap:n}),u=nu(c.files);return{html:Uc(u),js:c.bundledJS,runtimeVersion:l}}throw new Error(`Unsupported runtime version: ${l}`)}catch(l){throw l instanceof Error&&l.message.indexOf(on)&&(l.message=l.message.replace(on,"")),l}};(()=>{const t=async()=>{const r=await fetch(CS).then(a=>a.text());return(0,eval)(r),self.svelte.compile},e=new Map,n=new Map,s=gm({initialContents:[],handleCacheMiss:async r=>(postMessage({type:"contentRequest",vizId:r}),new Promise(a=>{e.set(r,a)}))}),i=FS({initialMappings:{},handleCacheMiss:async r=>{const a=yS();return postMessage({type:"resolveSlugRequest",slugKey:r,requestId:a}),new Promise(l=>{n.set(a,l)})}});addEventListener("message",async r=>{const a=r.data;switch(a.type){case"buildRequest":{const{files:l,enableSourcemap:c,requestId:u,vizId:d}=a;try{const m={type:"buildResponse",buildResult:await lI({files:l,enableSourcemap:c,rollup:ix,getSvelteCompiler:t,vizCache:s,vizId:d,slugCache:i}),requestId:u};postMessage(m)}catch(m){const f={type:"buildResponse",error:""+m,requestId:u};postMessage(f)}break}case"contentResponse":{const l=e.get(a.vizId);l&&(l(a.content),e.delete(a.vizId));break}case"invalidateVizCacheRequest":{const{changedVizIds:l}=a;for(const c of l)s.invalidate(c);postMessage({type:"invalidateVizCacheResponse"});break}case"resolveSlugResponse":{const l=n.get(a.requestId);l&&(l(a.vizId),n.delete(a.requestId));break}}})})()})();