vzcode 2.27.0 → 2.29.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.
- package/dist/assets/bindings_wasm_bg--2fP_mkJ.wasm +0 -0
- package/dist/assets/buildWorker-BV4WiKg8.js +687 -0
- package/dist/assets/index-CCmGeE_1.css +1 -0
- package/dist/assets/index-JcHUw7hN.js +403 -0
- package/dist/assets/worker-AbbeoMbH.js +340 -0
- package/dist/assets/worker-B71kfwKL.js +125 -0
- package/dist/assets/{worker-k7HZ3t-V.js → worker-CoJaqtpi.js} +12 -12
- package/dist/index.html +2 -2
- package/dist/llm-streaming-server/chatOperations.js +38 -0
- package/dist/llm-streaming-server/llmStreaming.js +0 -1
- package/dist/server/aiChatHandler/index.js +44 -8
- package/package.json +38 -38
- package/src/client/VZCodeContext/types.ts +15 -3
- package/src/client/VZCodeContext/useVZCodeState.ts +69 -2
- package/src/client/VZSidebar/aiCopyPaste.ts +18 -21
- package/src/llm-streaming-server/chatOperations.ts +48 -0
- package/src/llm-streaming-server/llmStreaming.ts +3 -1
- package/src/server/aiChatHandler/index.ts +77 -11
- package/src/types.ts +3 -0
- package/dist/assets/bindings_wasm_bg-9w8E-TmY.wasm +0 -0
- package/dist/assets/buildWorker-DylWm2VX.js +0 -687
- package/dist/assets/index-CHCIQbYC.js +0 -403
- package/dist/assets/index-Dyt9tpmu.css +0 -1
- package/dist/assets/worker-BMR_X2Ea.js +0 -346
- package/dist/assets/worker-b9bkZkXK.js +0 -116
|
@@ -1,687 +0,0 @@
|
|
|
1
|
-
(function(){"use strict";var Qo="4.50.1",Ou=44,pm=59,fm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lu=new Uint8Array(64),Mu=new Uint8Array(128);for(let t=0;t<64;t++){const e=fm.charCodeAt(t);Lu[t]=e,Mu[e]=t}function qs(t,e){let n=0,s=0,r=0;do{const a=t.next();r=Mu[a],n|=(31&r)<<s,s+=5}while(32&r);const i=1&n;return n>>>=1,i&&(n=-2147483648|-n),e+n}function Hs(t,e,n){let s=e-n;s=s<0?-s<<1|1:s<<1;do{let r=31&s;s>>>=5,s>0&&(r|=32),t.write(Lu[r])}while(s>0);return e}function Fu(t,e){return!(t.pos>=e)&&t.peek()!==Ou}var Bu=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}},mm=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+=Bu.decode(n),this.pos=0)}flush(){const{buffer:e,out:n,pos:s}=this;return s>0?n+Bu.decode(e.subarray(0,s)):n}},gm=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,r=n.indexOf(e,s);return r===-1?n.length:r}};function ym(t){t.sort(bm)}function bm(t,e){return t[0]-e[0]}function ju(t){const e=new mm;let n=0,s=0,r=0,i=0;for(let a=0;a<t.length;a++){const l=t[a];if(a>0&&e.write(pm),l.length===0)continue;let c=0;for(let u=0;u<l.length;u++){const d=l[u];u>0&&e.write(Ou),c=Hs(e,d[0],c),d.length!==1&&(n=Hs(e,d[1],n),s=Hs(e,d[2],s),r=Hs(e,d[3],r),d.length!==4&&(i=Hs(e,d[4],i)))}}return e.flush()}class ei{constructor(e){this.bits=e instanceof ei?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let zu=class Du{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 Du(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),r=this.original.slice(n);this.original=s;const i=new Du(e,this.end,r);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=s,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}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 xm(){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 km=xm();class ti{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,"+km(this.toString())}}function Vu(t,e){const n=t.split(/[/\\]/),s=e.split(/[/\\]/);for(n.pop();n[0]===s[0];)n.shift(),s.shift();if(n.length){let r=n.length;for(;r--;)n[r]=".."}return n.concat(s).join("/")}const Em=Object.prototype.toString;function Uu(t){return Em.call(t)==="[object Object]"}function Zo(t){const e=t.split(`
|
|
2
|
-
`),n=[];for(let s=0,r=0;s<e.length;s++)n.push(r),r+=e[s].length+1;return function(s){let r=0,i=n.length;for(;r<i;){const l=r+i>>1;s<n[l]?i=l:r=l+1}const a=r-1;return{line:a,column:s-n[a]}}}const Am=/\w/;let qu=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,r){if(n.length){const i=n.length-1;let a=n.indexOf(`
|
|
3
|
-
`,0),l=-1;for(;a>=0&&i>a;){const u=[this.generatedCodeColumn,e,s.line,s.column];r>=0&&u.push(r),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];r>=0&&c.push(r),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,r,i){let a=n.start,l=!0,c=!1;for(;a<n.end;){if(s[a]===`
|
|
5
|
-
`)r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=!0,c=!1;else{if(this.hires||l||i.has(a)){const u=[this.generatedCodeColumn,e,r.line,r.column];this.hires==="boundary"?Am.test(s[a])?c||(this.rawSegments.push(u),c=!0):(this.rawSegments.push(u),c=!1):this.rawSegments.push(u)}r.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 Ws=`
|
|
7
|
-
`,hs={insertLeft:!1,insertRight:!1,storeName:!1};let Gs=class hm{constructor(e,n={}){const s=new zu(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 ei},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 hm(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 r=n.next,i=r&&r.clone();i&&(s.next=i,i.previous=s,s=i),n=r}return e.lastChunk=s,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new ei(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const n=Object.keys(this.storedNames),s=new qu(e.hires),r=Zo(this.original);return this.intro&&s.advance(this.intro),this.firstChunk.eachNext(i=>{const a=r(i.start);i.intro.length&&s.advance(i.intro),i.edited?s.addEdit(0,i.content,a,i.storeName?n.indexOf(i.original):-1):s.addUneditedChunk(0,i,this.original,a,this.sourcemapLocations),i.outro.length&&s.advance(i.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?Vu(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 ti(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=function(e){const n=e.split(`
|
|
8
|
-
`),s=n.filter(a=>/^\t+/.test(a)),r=n.filter(a=>/^ {2,}/.test(a));if(s.length===0&&r.length===0)return null;if(s.length>=r.length)return" ";const i=r.reduce((a,l)=>{const c=/^ +/.exec(l)[0].length;return Math.min(c,a)},1/0);return new Array(i+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(Uu(e)&&(n=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;const r={};(n=n||{}).exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(u=>{for(let d=u[0];d<u[1];d+=1)r[d]=!0});let i=n.indentStart!==!1;const a=u=>i?`${e}${u}`:(i=!0,u);this.intro=this.intro.replace(s,a);let l=0,c=this.firstChunk;for(;c;){const u=c.end;if(c.edited)r[l]||(c.content=c.content.replace(s,a),c.content.length&&(i=c.content[c.content.length-1]===`
|
|
9
|
-
`));else for(l=c.start;l<u;){if(!r[l]){const d=this.original[l];d===`
|
|
10
|
-
`?i=!0:d!=="\r"&&i&&(i=!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 hs.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),hs.insertLeft=!0),this.appendLeft(e,n)}insertRight(e,n){return hs.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),hs.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 r=this.byStart[e],i=this.byEnd[n],a=r.previous,l=i.next,c=this.byStart[s];if(!c&&i===this.lastChunk)return this;const u=c?c.previous:this.lastChunk;return a&&(a.next=l),l&&(l.previous=a),u&&(u.next=r),c&&(c.previous=i),r.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=u,i.next=c||null,u||(this.firstChunk=r),c||(this.lastChunk=i),this}overwrite(e,n,s,r){return r=r||{},this.update(e,n,s,{...r,overwrite:!r.contentOnly})}update(e,n,s,r){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),r===!0&&(hs.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),hs.storeName=!0),r={storeName:!0});const i=r!==void 0&&r.storeName,a=r!==void 0&&r.overwrite;if(i){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,i,!a)}else{const u=new zu(e,n,"").edit(s,i);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(Ws);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(Ws),e!==-1)return s.outro.substr(e+1)+n;n=s.outro+n}if(s.content.length>0){if(e=s.content.lastIndexOf(Ws),e!==-1)return s.content.substr(e+1)+n;n=s.content+n}if(s.intro.length>0){if(e=s.intro.lastIndexOf(Ws),e!==-1)return s.intro.substr(e+1)+n;n=s.intro+n}}while(s=s.previous);return e=this.intro.lastIndexOf(Ws),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="",r=this.firstChunk;for(;r&&(r.start>e||r.end<=e);){if(r.start<n&&r.end>=n)return s;r=r.next}if(r&&r.edited&&r.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const i=r;for(;r;){!r.intro||i===r&&r.start!==e||(s+=r.intro);const a=r.start<n&&r.end>=n;if(a&&r.edited&&r.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);const l=i===r?e-r.start:0,c=a?r.content.length+n-r.end:r.content.length;if(s+=r.content.slice(l,c),!r.outro||a&&r.end!==n||(s+=r.outro),a)break;r=r.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 r=e>n.end;for(;n;){if(n.contains(e))return this._splitChunk(n,e);if(n=r?this.byStart[n.end]:this.byEnd[n.start],n===s)return;s=n}}_splitChunk(e,n){if(e.edited&&e.content.length){const r=Zo(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${r.line}:${r.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 r=s.end,i=s.trimEnd(n);if(s.end!==r&&(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),i)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 r=s.end,i=s.trimStart(n);if(s.end!==r&&(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),i)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(r,i){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(a,l)=>l==="$"?"$":l==="&"?r[0]:+l<r.length?r[+l]:`$${l}`):n(...r,r.index,i,r.groups)}if(e.global)(function(r,i){let a;const l=[];for(;a=r.exec(i);)l.push(a);return l})(e,this.original).forEach(r=>{if(r.index!=null){const i=s(r,this.original);i!==r[0]&&this.overwrite(r.index,r.index+r[0].length,i)}});else{const r=this.original.match(e);if(r&&r.index!=null){const i=s(r,this.original);i!==r[0]&&this.overwrite(r.index,r.index+r[0].length,i)}}return this}_replaceString(e,n){const{original:s}=this,r=s.indexOf(e);return r!==-1&&this.overwrite(r,r+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,r=e.length;for(let i=s.indexOf(e);i!==-1;i=s.indexOf(e,i+r))s.slice(i,i+r)!==n&&this.overwrite(i,i+r,n);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 Hu=Object.prototype.hasOwnProperty;let wm=class dm{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 Gs)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!Uu(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=>{Hu.call(e,n)||(e[n]=e.content[n])}),e.separator===void 0&&(e.separator=this.separator),e.filename)if(Hu.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 Gs(e),separator:n&&n.separator||""}),this}clone(){const e=new dm({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(i=>{Object.keys(i.content.storedNames).forEach(a=>{~n.indexOf(a)||n.push(a)})});const r=new qu(e.hires);return this.intro&&r.advance(this.intro),this.sources.forEach((i,a)=>{a>0&&r.advance(this.separator);const l=i.filename?this.uniqueSourceIndexByFilename[i.filename]:-1,c=i.content,u=Zo(c.original);c.intro&&r.advance(c.intro),c.firstChunk.eachNext(d=>{const m=u(d.start);d.intro.length&&r.advance(d.intro),i.filename?d.edited?r.addEdit(l,d.content,m,d.storeName?n.indexOf(d.original):-1):r.addUneditedChunk(l,d,c.original,m,c.sourcemapLocations):r.advance(d.content),d.outro.length&&r.advance(d.outro)}),c.outro&&r.advance(c.outro),i.ignoreList&&l!==-1&&(s===void 0&&(s=[]),s.push(l))}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(i=>e.file?Vu(e.file,i.filename):i.filename),sourcesContent:this.uniqueSources.map(i=>e.includeContent?i.content:null),names:n,mappings:r.raw,x_google_ignoreList:s}}generateMap(e){return new ti(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,r)=>{const i=s.separator!==void 0?s.separator:this.separator,a=n||r>0&&/\r?\n$/.test(i);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,r)=>r>0?e+s:s)),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map((n,s)=>{const r=n.separator!==void 0?n.separator:this.separator;return(s>0?r:"")+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,r=0;do if(s=this.sources[r++],!s)break;while(!s.content.trimStartAborted(e))}return this}trimEnd(e){const n=new RegExp((e||"\\s")+"+$");let s,r=this.sources.length-1;do if(s=this.sources[r--],!s){this.intro=this.intro.replace(n,"");break}while(!s.content.trimEndAborted(e));return this}};const Sm=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,Im=/^\.?\.\//,vm=/\\/g,ds=/[/\\]/,_m=/\.[^.]+$/;function Ht(t){return Sm.test(t)}function ea(t){return Im.test(t)}function an(t){return t.replace(vm,"/")}function Wt(t){return t.split(ds).pop()||""}function ln(t){const e=/[/\\][^/\\]*$/.exec(t);return e?t.slice(0,-e[0].length)||"/":"."}function xn(t){const e=_m.exec(Wt(t));return e?e[0]:""}function Tn(t,e){const n=t.split(ds).filter(Boolean),s=e.split(ds).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(ds);for(const s of t)if(Ht(s))n=s.split(ds);else{const r=s.split(ds);for(;r[0]==="."||r[0]==="..";)r.shift()===".."&&n.pop();n.push(...r)}return n.join("/")}function ps(t,e,n,s){e.remove(n,s),t.removeAnnotations(e)}const Rn={isNoStatement:!0};function ht(t,e,n=0){let s,r;for(s=t.indexOf(e,n);;){if((n=t.indexOf("/",n))===-1||n>=s)return s;r=t.charCodeAt(++n),++n,(n=r===47?t.indexOf(`
|
|
14
|
-
`,n)+1:t.indexOf("*/",n)+2)>s&&(s=t.indexOf(e,n))}}const Wu=/\S/g;function kn(t,e){return Wu.lastIndex=e,Wu.exec(t).index}const Pm=/\s/;function Xs(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 Ks(t,e,n,s,r){let i,a,l,c,u=t[0],d=!u.included||u.needsBoundaries;d&&(c=n+Xs(e.original.slice(n,u.start))[1]);for(let m=1;m<=t.length;m++)i=u,a=c,l=d,u=t[m],d=u!==void 0&&(!u.included||u.needsBoundaries),l||d?(c=i.end+Xs(e.original.slice(i.end,u===void 0?s:u.start))[1],i.included?l?i.render(e,r,{end:c,start:a}):i.render(e,r):ps(i,e,a,c)):i.render(e,r)}function ni(t,e,n,s){const r=[];let i,a,l,c,u=n-1;for(const d of t){for(i!==void 0&&(u=i.end+ht(e.original.slice(i.end,d.start),",")),a=l=u+1+Xs(e.original.slice(u+1,d.start))[1];c=e.original.charCodeAt(a),c===32||c===9||c===10||c===13;)a++;i!==void 0&&r.push({contentEnd:l,end:a,node:i,separator:u,start:n}),i=d,n=a}return r.push({contentEnd:s,end:s,node:i,separator:null,start:n}),r}function si(t,e,n){for(;;){const[s,r]=Xs(t.original.slice(e,n));if(s===-1)break;t.remove(e+s,e+=r)}}function Dn(t,{exportNamesByVariable:e,snippets:{_:n,getObject:s,getPropertyAccess:r}},i=""){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(r)}${i})`}{const a=[];for(const l of t)for(const c of e.get(l))a.push([c,l.getName(r)+i]);return`exports(${s(a,{lineBreakIndent:null})})`}}function ta(t,e,n,s,{exportNamesByVariable:r,snippets:{_:i}}){s.prependRight(e,`exports(${JSON.stringify(r.get(t)[0])},${i}`),s.appendLeft(n,")")}function Gu(t,e,n,s,r,i){const{_:a,getPropertyAccess:l}=i.snippets;r.appendLeft(n,`,${a}${Dn([t],i)},${a}${t.getName(l)}`),s&&(r.prependRight(e,"("),r.appendLeft(n,")"))}const pt=Object.freeze(Object.create(null)),ft=Object.freeze({}),Qe=Object.freeze([]),Xu=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 r=n();return t.set(e,r),r}function On(){return new Set}function Ku(){return[]}const Ie=Symbol("Unknown Key"),ri=Symbol("Unknown Non-Accessor Key"),fs=Symbol("Unknown Integer"),na=Symbol("Symbol.toStringTag"),ae=[],ie=[Ie],$m=[ri],sa=[fs],ms=Symbol("Entities");let gs=class{constructor(){this.entityPaths=Object.create(null,{[ms]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,n){const s=this.getEntities(e);return!!s.has(n)||(s.add(n),!1)}withTrackedEntityAtPath(e,n,s,r){const i=this.getEntities(e);if(i.has(n))return r;i.add(n);const a=s();return i.delete(n),a}getEntities(e){let n=this.entityPaths;for(const s of e)n=n[s]||=Object.create(null,{[ms]:{value:new Set}});return n[ms]}};const He=new gs;let Ju=class{constructor(){this.entityPaths=Object.create(null,{[ms]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,n,s){let r=this.entityPaths;for(const a of e)r=r[a]||=Object.create(null,{[ms]:{value:new Map}});const i=bt(r[ms],n,On);return!!i.has(s)||(i.add(s),!1)}};const Nm=Object.freeze({[Ie]:ft});let Cm=class{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let n=!0,s=this,r="includedPaths",i=this.includedPaths||=(n=!1,Object.create(null));for(const a of e){if(i[Ie])return!0;if(typeof a=="symbol")return s[r]=Nm,!1;s=i,r=a,i=i[a]||=(n=!1,Object.create(null))}return n}};const Tm=Object.freeze({[Ie]:!0});let Rm=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[r,i]=e;return r?typeof r=="symbol"?(this.includedPaths=Tm,!1):i?s[r]===Ie||(s[r]=Ie,!1):!!s[r]||(s[r]=!0,!1):n}includeAllPaths(e,n,s){const{includedPaths:r}=this;if(r)if(r[Ie])e.includePath([...s,Ie],n);else{const i=Object.entries(r);if(i.length===0)e.includePath(s,n);else for(const[a,l]of i)e.includePath(l===Ie?[...s,a,Ie]:[...s,a],n)}}};function Yu(t,e){if(t.type==="MemberExpression")return!t.computed&&Yu(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 Lt(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function ys(){return{accessed:new gs,assigned:new gs,brokenFlow:!1,called:new Ju,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Ju,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"),ii=Symbol("Unknown Truthy Value"),oi=Symbol("Unknown Falsy Value");class Pt{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){En(e)}deoptimizePath(e){}getLiteralValueAtPath(e,n,s){return Ce}getReturnExpressionWhenCalledAtPath(e,n,s,r){return it}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){ra(e,n)}shouldBeIncluded(e){return!0}}const ve=new class extends Pt{},it=[ve,!1],En=t=>{for(const e of t.args)e?.deoptimizePath(ie)},ra=(t,e)=>{t.args[0]?.includePath(ie,e),Qu(t,e)},Qu=({args:t},e)=>{for(let n=1;n<t.length;n++){const s=t[n];s&&(s.includePath(ie,e),s.include(e,!1))}},Ln={args:[null],type:0},ia={args:[null,ve],type:1},Js={args:[null],type:2,withNew:!1},oa="ArrowFunctionExpression",Ys="CallExpression",Zu="ExportDefaultDeclaration",Gt="ExpressionStatement",aa="Identifier",ai="Program",eh="Property";function Dm(t,e){return t.start<=e&&e<t.end}function la(t,e,n){return function(s,r={}){const{offsetLine:i=0,offsetColumn:a=0}=r;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(Dm(f,d))return{line:i+f.line,column:a+d-f.start,character:d};u+=g,f=c[u]}}}(t,n)(e,n&&n.startIndex)}function ca(t){return t.replace(/^\t+/,e=>e.split(" ").join(" "))}const Om="...";function th(t,e,n){let s=t.split(`
|
|
18
|
-
`);if(e>s.length)return"";const r=Math.max(ca(s[e-1].slice(0,n)).length+10+3,120),i=Math.max(0,e-3);let a=Math.min(e+2,s.length);for(s=s.slice(i,a);!/\S/.test(s[s.length-1]);)s.pop(),a-=1;const l=String(a).length;return s.map((c,u)=>{const d=i+u+1===e;let m=String(u+i+1);for(;m.length<l;)m=` ${m}`;let f=ca(c);if(f.length>r&&(f=`${f.slice(0,r-3)}${Om}`),d){const g=function(S){let x="";for(;S--;)x+=" ";return x}(l+2+ca(c.slice(0,n)).length)+"^";return`${m}: ${f}
|
|
19
|
-
${g}`}return`${m}: ${f}`}).join(`
|
|
20
|
-
`)}const Lm="silent",be="warn",Mn="info",Qs="debug",Fn={[Qs]:0,[Mn]:1,[Lm]:3,[be]:2};function cn(t,e){const n=t.length<=1,s=t.map(i=>`"${i}"`);let r=n?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;return e&&(r+=` ${n?e[0]:e[1]}`),r}function ua(t){const e=Wt(t);return e.slice(0,Math.max(0,e.length-xn(t).length))}function xe(t){return Ht(t)?Tn(St(),t):t}function li(t){return t[0]==="/"||t[0]==="."&&(t[1]==="/"||t[1]===".")||Ht(t)}const Mm=/^(\.\.\/)*\.\.$/;function nh(t,e,n,s){for(;e.startsWith("../");)e=e.slice(3),t="_/"+t;let r=an(Tn(ln(t),e));if(n&&r.endsWith(".js")&&(r=r.slice(0,-3)),s){if(r==="")return"../"+Wt(e);if(Mm.test(r))return[...r.split("/"),"..",Wt(e)].join("/")}return r?r.startsWith("..")?r:"./"+r:"."}function ot(t){return`https://rollupjs.org/${t}`}const sh="troubleshooting/#error-name-is-not-exported-by-module",ci="configuration-options/#jsx",rh="configuration-options/#output-amd-id",Zs="configuration-options/#output-dir",ha="configuration-options/#output-exports",ih="configuration-options/#output-format",oh="configuration-options/#output-inlinedynamicimports",da="configuration-options/#output-interop",ah="configuration-options/#output-manualchunks",lh="configuration-options/#output-name",Fm="configuration-options/#output-sourcemapfile",bs="plugin-development/#generatebundle";function re(t){throw t instanceof Error?t:xs(t)}function xs(t){uh(t);const e=Object.assign(new Error(t.message),t);return Object.defineProperty(e,"name",{value:"RollupError",writable:!0}),e}function ui(t,e,n,s){if(typeof e=="object"){const{line:r,column:i}=e;t.loc={column:i,file:s,line:r}}else{t.pos=e;const r=la(n,e,{offsetLine:1});if(!r)return;const{line:i,column:a}=r;t.loc={column:a,file:s,line:i}}if(t.frame===void 0){const{line:r,column:i}=t.loc;t.frame=th(n,r,i)}}const ch=Symbol("augmented");function uh(t){if(!t.plugin&&!t.loc||t[ch])return;t[ch]=!0;let e="";t.plugin&&(e+=`[plugin ${t.plugin}] `);const n=t.id||t.loc?.file;if(n){const r=t.loc?` (${t.loc.line}:${t.loc.column})`:"";e+=`${xe(n)}${r}: `}const s=t.message;t.message=e+t.message,Sh(t,s)}const hh="INVALID_EXPORT_OPTION",dh="INVALID_IMPORT_ATTRIBUTE",ph="INVALID_PLUGIN_HOOK",fh="MISSING_EXPORT",pa="MISSING_IMPLICIT_DEPENDANT",mh="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",gh="PARSE_ERROR",yh="SOURCEMAP_BROKEN",bh="UNEXPECTED_NAMED_IMPORT",xh="UNRESOLVED_ENTRY",kh="UNRESOLVED_IMPORT";function Bm(t){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t}" - no asset source set.`}}function Eh(t){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${t}").`}}function jm({fileName:t,code:e},{pos:n,message:s}){const r={code:"CHUNK_INVALID",message:`Chunk "${t}" is not valid JavaScript: ${s}.`};return ui(r,n,e,t),r}function zm(t){return{code:"CIRCULAR_DEPENDENCY",ids:t,message:`Circular dependency: ${t.map(xe).join(" -> ")}`}}function Vm(t,e,n,s,r){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 ${r?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:n}}function Um(t,e,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${xe(e)} is at (${n}:${s})
|
|
22
|
-
${th(t,n,s)}`}}function Ah(t,e){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${t}" in "${xe(e)}".`}}function hi(t,e,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${xe(s)}" tried to import "${xe(n)}" with ${wh(e)} attributes, but it was already imported elsewhere with ${wh(t)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const wh=t=>{const e=Object.entries(t);return e.length===0?"no":e.map(([n,s])=>`"${n}": "${s}"`).join(", ")};function qm(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 Hm(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 Sh(t,e){return t.stack&&(t.stack=t.stack.replace(e,t.message)),t}function Ih(t,e,n){return{code:hh,message:`"${t}" was specified for "output.exports", but entry module "${xe(n)}" has the following exports: ${cn(e)}`,url:ot(ha)}}function vh(t){return{code:dh,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 Wm(t,e){return{binding:t,code:fh,exporter:e,message:`Exported variable "${t}" is not defined in "${xe(e)}".`,url:ot(sh)}}function di(t,e,n,s){const r={binding:t,code:fh,exporter:n,id:e,url:ot(sh)};if(s)return{...r,message:`Exported variable "${t}" is not defined in "${xe(n)}", but it is imported by "${xe(e)}".`};const i=xn(n)===".json";return{...r,message:`"${t}" is not exported by "${xe(n)}", imported by "${xe(e)}".${i?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function Gm(t){const e=[...t.implicitlyLoadedBefore].map(n=>xe(n.id)).sort();return{code:pa,message:`Module "${xe(t.id)}" that should be implicitly loaded before ${cn(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 _h(t,e,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are
|
|
27
|
-
${t} chunks, of which
|
|
28
|
-
${e} are below minChunkSize.`}}function pi(t,e){return{code:gh,message:t,pos:e}}function ks(t){return{code:"REDECLARATION_ERROR",message:`Identifier "${t}" has already been declared`}}function Ph(t){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${t}"`}}function fa(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)"),Sh({cause:t,code:gh,id:e,message:n,stack:t.stack},t.message)}function er(t,e,{hook:n,id:s}={}){const r=t.code;return t.pluginCode||r==null||typeof r=="string"&&r.startsWith("PLUGIN_")||(t.pluginCode=r),t.code="PLUGIN_ERROR",t.plugin=e,n&&(t.hook=n),s&&(t.id=s),t}function Xm(t){return{code:yh,message:`Multiple conflicting contents for sourcemap source ${t}`}}function $h(t,e,n){const s=n?"reexport":"import";return{code:bh,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(da)}}function Km(t){return{code:bh,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(da)}}function It(t){return{code:"VALIDATION_ERROR",message:t}}function Bn(t,e,n,s,r){(function(i,a,l,c,u){if(l||u){const d=function(m,f){return{code:"DEPRECATED_FEATURE",message:m,url:ot(f)}}(i,a);if(u)return re(d);c(be,d)}})(t,e,n,s.onLog,s.strictDeprecations)}const ma=Symbol("PureFunction");class jn 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===Ys&&e.parent.callee===e||e.parent.type===Zu||(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 tr extends jn{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 Nh(t,e){for(const n of e){const s=Object.getOwnPropertyDescriptor(t,n).get;Object.defineProperty(t,n,{get(){const r=s.call(t);return Object.defineProperty(t,n,{value:r}),r}})}}const fi=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]),Ch=/[^\w$]/g,Th=t=>(e=>/\d/.test(e[0]))(t)||fi.has(t)||t==="arguments";function mi(t){return t=t.replace(/-(\w)/g,(e,n)=>n.toUpperCase()).replace(Ch,"_"),Th(t)&&(t=`_${t}`),t||"_"}const gi=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,Jm=/^(?:0|[1-9]\d*)$/;function yi(t){return gi.test(t)?t==="__proto__"?'["__proto__"]':t:Jm.test(t)&&+t<=Number.MAX_SAFE_INTEGER?t:JSON.stringify(t)}function Es(t){return gi.test(t)?t:JSON.stringify(t)}class Ze{constructor(e,n,s,r,i,a){this.options=e,this.id=n,this.renormalizeRenderPath=i,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=mi(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:r,moduleSideEffects:s,syntheticNamedExports:!1}}cacheInfoGetters(){Nh(this.info,["dynamicImporters","importers"])}getVariableForExportName(e){const n=this.declarations.get(e);if(n)return[n];const s=new tr(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}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)for(const c of this.declarations.get(l).module.importers)n.add(c);const s=[...n];var r,i,a;this.options.onLog(be,{code:"UNUSED_EXTERNAL_IMPORT",exporter:r=this.id,ids:a=s,message:`${cn(i=e,["is","are"])} imported from external module "${r}" but never used in ${cn(a.map(l=>xe(l)))}.`,names:i})}}function As(t){t.isExecuted=!0;const e=[t],n=new Set;for(const s of e)for(const r of[...s.dependencies,...s.implicitlyLoadedBefore])r instanceof Ze||r.isExecuted||!r.info.moduleSideEffects&&!s.implicitlyLoadedBefore.has(r)||n.has(r.id)||(r.isExecuted=!0,n.add(r.id),e.push(r))}const Mt=()=>{};var yt=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const ws="_rollupAnnotations",Rh="_rollupRemoved",Rt=(t,e)=>{if(t===0)return Qe;const n=e[t++],s=new Array(n);for(let r=0;r<n;r++)s[r]=Ym(e[t++],e);return s},Ym=(t,e)=>{const n=e[t++];return{end:e[t++],start:n,type:yt[e[t]]}},zn={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"]},Dh="variables",Xt=Symbol("IS_SKIPPED_CHAIN");class ee 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 zn[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 zn[this.type]){const s=this[n];if(s!==null){if(Array.isArray(s)){for(const r of s)if(r?.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 r of zn[this.type]){const i=this[r];if(i!==null)if(Array.isArray(i))for(const a of i)a?.include(e,n);else i.include(e,n)}}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const n of zn[this.type]){const s=this[n];if(s!==null)if(Array.isArray(s))for(const r of s)r?.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===ws?this.annotations=s:n===Rh&&(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 r=0;for(const i of s)this[n][r++]=i===null?null:new(this.scope.context.getNodeConstructor(i.type))(this,this.scope).parseNode(i)}else this[n]=new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s);return zn[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 zn[this.type]){const r=this[s];if(r!==null)if(Array.isArray(r))for(const i of r)i?.render(e,n);else r.render(e,n)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(ys())}applyDeoptimizations(){this.deoptimized=!0;for(const e of zn[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 Qm(t){return t instanceof ee&&t.type===oa}function Zm(t){return t instanceof ee&&t.type==="FunctionExpression"}function eg(t){return t instanceof ee&&t.type===Ys}function tg(t){return t instanceof ee&&t.type==="MemberExpression"}function ga(t){return t instanceof ee&&t.type==="ImportExpression"}function ng(t){return t instanceof ee&&t.type===aa}function nr(t,e=null){return Object.create(e,t)}const un=new class extends Pt{getLiteralValueAtPath(t){return t.length>0?Ce:void 0}},Vn={value:{hasEffectsWhenCalled:null,returns:ve}},ya=new class extends Pt{getReturnExpressionWhenCalledAtPath(t){return t.length===1?ir(xa,t[0]):it}hasEffectsOnInteractionAtPath(t,e,n){return e.type===0?t.length>1:e.type!==2||t.length!==1||rr(xa,t[0],e,n)}},An={value:{hasEffectsWhenCalled:null,returns:ya}},Ss=new class extends Pt{getReturnExpressionWhenCalledAtPath(t){return t.length===1?ir(ka,t[0]):it}hasEffectsOnInteractionAtPath(t,e,n){return e.type===0?t.length>1:e.type!==2||t.length!==1||rr(ka,t[0],e,n)}},Is={value:{hasEffectsWhenCalled:null,returns:Ss}},ba=new class extends Pt{getReturnExpressionWhenCalledAtPath(t){return t.length===1?ir(sr,t[0]):it}hasEffectsOnInteractionAtPath(t,e,n){return e.type===0?t.length>1:e.type!==2||t.length!==1||rr(sr,t[0],e,n)}},Re={value:{hasEffectsWhenCalled:null,returns:ba}},Oh={value:{hasEffectsWhenCalled({args:t},e){const n=t[2];return t.length<3||typeof n.getLiteralValueAtPath(ae,He,{deoptimizeCache(){}})=="symbol"&&n.hasEffectsOnInteractionAtPath(ae,Js,e)},returns:ba}},bi=nr({hasOwnProperty:An,isPrototypeOf:An,propertyIsEnumerable:An,toLocaleString:Re,toString:Re,valueOf:Vn}),xa=nr({valueOf:An},bi),ka=nr({toExponential:Re,toFixed:Re,toLocaleString:Re,toPrecision:Re,valueOf:Is},bi),sg=nr({exec:Vn,test:An},bi),sr=nr({anchor:Re,at:Vn,big:Re,blink:Re,bold:Re,charAt:Re,charCodeAt:Is,codePointAt:Vn,concat:Re,endsWith:An,fixed:Re,fontcolor:Re,fontsize:Re,includes:An,indexOf:Is,italics:Re,lastIndexOf:Is,link:Re,localeCompare:Is,match:Vn,matchAll:Vn,normalize:Re,padEnd:Re,padStart:Re,repeat:Re,replace:Oh,replaceAll:Oh,search:Is,slice:Re,small:Re,split:Vn,startsWith:An,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},bi);function rr(t,e,n,s){return typeof e!="string"||!t[e]||t[e].hasEffectsWhenCalled?.(n,s)||!1}function ir(t,e){return typeof e=="string"&&t[e]?[t[e].returns,!1]:it}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(sa),this.description.mutatesArgs))for(let r=1;r<e.length;r++)e[r].deoptimizePath(ie)}getReturnExpressionWhenCalledAtPath(e,{args:n}){return e.length>0?it:[this.description.returnsPrimitive||(this.description.returns==="self"?n[0]||ve:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,{args:n,type:s},r){if(e.length>(s===0?1:0))return!0;if(s===2){if(this.description.mutatesSelfAsArray===!0&&n[0]?.hasEffectsOnInteractionAtPath(sa,ia,r))return!0;if(this.description.callsArgs){for(const i of this.description.callsArgs)if(n[i+1]?.hasEffectsOnInteractionAtPath(ae,Js,r))return!0}}return!1}}const xi=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ya})],or=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ba})],Lh=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ss})],Mh=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ve})],ar=/^\d+$/;class $t 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.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchablePropertiesAndSetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const r of Object.values(e))this.allProperties.push(...r)}}deoptimizeAllProperties(e){const n=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!n){for(const s of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const r of s)r.deoptimizePath(ie);this.prototypeExpression?.deoptimizePath([Ie,Ie]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,n,s){const[r,...i]=n,{args:a,type:l}=e;if(this.hasLostTrack||(l===2||n.length>1)&&(this.hasUnknownDeoptimizedProperty||typeof r=="string"&&this.deoptimizedPaths[r]))return void En(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(typeof r=="string"){if(c[r]){const m=u[r];if(m)for(const f of m)f.deoptimizeArgumentsOnInteractionAtPath(e,i,s);if(!this.immutable)for(const f of a)f&&this.additionalExpressionsToBeDeoptimized.add(f);return}for(const m of d)m.deoptimizeArgumentsOnInteractionAtPath(e,i,s);if(ar.test(r))for(const m of this.unknownIntegerProps)m.deoptimizeArgumentsOnInteractionAtPath(e,i,s)}else{for(const m of[...Object.values(u),d])for(const f of m)f.deoptimizeArgumentsOnInteractionAtPath(e,i,s);for(const m of this.unknownIntegerProps)m.deoptimizeArgumentsOnInteractionAtPath(e,i,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 Object.entries(this.propertiesAndGettersByKey))if(ar.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===fs)return this.deoptimizeIntegerProperties();if(typeof n!="string")return this.deoptimizeAllProperties(n===ri);if(!this.deoptimizedPaths[n]){this.deoptimizedPaths[n]=!0;const r=this.expressionsToBeDeoptimizedByKey[n];if(r)for(const i of r)i.deoptimizeCache()}}const s=e.length===1?ie:e.slice(1);for(const r of typeof n=="string"?[...this.propertiesAndGettersByKey[n]||this.unmatchablePropertiesAndGetters,...this.settersByKey[n]||this.unmatchableSetters]:this.allProperties)r.deoptimizePath(s);this.prototypeExpression?.deoptimizePath(e.length===1?[e[0],Ie]:e)}getLiteralValueAtPath(e,n,s){if(e.length===0)return Ce;const r=e[0],i=this.getMemberExpressionAndTrackDeopt(r,s);return i?i.getLiteralValueAtPath(e.slice(1),n,s):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,n,s):e.length!==1?Ce:void 0}getReturnExpressionWhenCalledAtPath(e,n,s,r){if(e.length===0)return it;const[i,...a]=e,l=this.getMemberExpressionAndTrackDeopt(i,r);return l?l.getReturnExpressionWhenCalledAtPath(a,n,s,r):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,n,s,r):it}hasEffectsOnInteractionAtPath(e,n,s){const[r,...i]=e;if(i.length>0||n.type===2){const u=this.getMemberExpression(r);return u?u.hasEffectsOnInteractionAtPath(i,n,s):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,n,s)}if(r===ri)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(typeof r=="string"){if(a[r]){const u=l[r];if(u){for(const d of u)if(d.hasEffectsOnInteractionAtPath(i,n,s))return!0}return!1}for(const u of c)if(u.hasEffectsOnInteractionAtPath(i,n,s))return!0}else for(const u of[...Object.values(l),c])for(const d of u)if(d.hasEffectsOnInteractionAtPath(i,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))&&s.include(e,n);this.prototypeExpression?.include(e,n)}includePath(e,n){if(this.included=!0,e.length===0)return;const[s,...r]=e,[i,a]=typeof s=="string"?[new Set([...this.propertiesAndGettersByKey[s]||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey[s]||this.unmatchablePropertiesAndSetters]),r]:[this.allProperties,ie];for(const l of i)l.includePath(a,n);this.prototypeExpression?.includePath(e,n)}buildPropertyMaps(e){const{allProperties:n,propertiesAndGettersByKey:s,propertiesAndSettersByKey:r,settersByKey:i,gettersByKey:a,unknownIntegerProps:l,unmatchablePropertiesAndGetters:c,unmatchablePropertiesAndSetters:u,unmatchableGetters:d,unmatchableSetters:m}=this;for(let f=e.length-1;f>=0;f--){const{key:g,kind:S,property:x}=e[f];if(n.push(x),typeof g=="string")S==="set"?r[g]||(r[g]=[x,...u],i[g]=[x,...m]):S==="get"?s[g]||(s[g]=[x,...c],a[g]=[x,...d]):(r[g]||(r[g]=[x,...u]),s[g]||(s[g]=[x,...c]));else{if(g===fs){l.push(x);continue}S==="set"&&m.push(x),S==="get"&&d.push(x),S!=="get"&&u.push(x),S!=="set"&&c.push(x)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey))for(const n of e)n.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(ie)}deoptimizeCachedIntegerEntities(){for(const[e,n]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(ar.test(e))for(const s of n)s.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(sa)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||typeof e!="string"||this.hasUnknownDeoptimizedInteger&&ar.test(e)||this.deoptimizedPaths[e])return ve;const n=this.propertiesAndGettersByKey[e];return n?.length===1?n[0]:n||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&ar.test(e)?ve:null}getMemberExpressionAndTrackDeopt(e,n){if(typeof e!="string")return ve;const s=this.getMemberExpression(e);return s!==ve&&!this.immutable&&(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(n),s}}const Fh=t=>typeof t=="string"&&/^\d+$/.test(t),rg=new class extends Pt{deoptimizeArgumentsOnInteractionAtPath(t,e){t.type!==2||e.length!==1||Fh(e[0])||En(t)}getLiteralValueAtPath(t){return t.length===1&&Fh(t[0])?void 0:Ce}hasEffectsOnInteractionAtPath(t,{type:e}){return t.length>1||e===2}},wn=new $t({__proto__:null,hasOwnProperty:xi,isPrototypeOf:xi,propertyIsEnumerable:xi,toLocaleString:or,toString:or,valueOf:Mh},rg,!0),Ea=[{key:fs,kind:"init",property:ve},{key:"length",kind:"init",property:Ss}],Bh=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ya})],jh=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ss})],ig=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new $t(Ea,Ei),returnsPrimitive:null})],ki=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new $t(Ea,Ei),returnsPrimitive:null})],Aa=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new $t(Ea,Ei),returnsPrimitive:null})],zh=[new xt({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Ss})],Vh=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ve})],Uh=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ve})],lr=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ve})],wa=[new xt({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],og=[new xt({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Ei=new $t({__proto__:null,at:Uh,concat:ki,copyWithin:wa,entries:ki,every:Bh,fill:wa,filter:Aa,find:lr,findIndex:jh,findLast:lr,findLastIndex:jh,flat:ki,flatMap:Aa,forEach:lr,includes:xi,indexOf:Lh,join:or,keys:Mh,lastIndexOf:Lh,map:Aa,pop:Vh,push:zh,reduce:lr,reduceRight:lr,reverse:wa,shift:Vh,slice:ki,some:Bh,sort:og,splice:ig,toLocaleString:or,toString:or,unshift:zh,values:Uh},wn,!0);class Un extends ee{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,Ln,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 Sa extends ee{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,r){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,n,s,r)}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 Un)&&(e=!0,s.deoptimizePath(ie))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;const e=[{key:"length",kind:"init",property:Ss}];let n=!1;for(let s=0;s<this.elements.length;s++){const r=this.elements[s];n||r instanceof Un?r&&(n=!0,e.unshift({key:fs,kind:"init",property:r})):r?e.push({key:String(s),kind:"init",property:r}):e.push({key:String(s),kind:"init",property:un})}return this.objectEntity=new $t(e,Ei)}}const Ke=Symbol("Value Properties"),qn=()=>Ce,qh=()=>!1,Ia=()=>!0,Kt={deoptimizeArgumentsOnCall:Mt,getLiteralValue:qn,hasEffectsWhenCalled:qh},hn={deoptimizeArgumentsOnCall:Mt,getLiteralValue:qn,hasEffectsWhenCalled:Ia},ag={deoptimizeArgumentsOnCall:Mt,getLiteralValue:qn,hasEffectsWhenCalled:({args:t})=>t.length>1&&!(t[1]instanceof Sa)},lg={deoptimizeArgumentsOnCall:Mt,getLiteralValue:qn,hasEffectsWhenCalled({args:t},e){const[n,s]=t;return!(s instanceof Pt)||s.hasEffectsOnInteractionAtPath(ie,Ln,e)}},V={__proto__:null,[Ke]:hn},ce={__proto__:null,[Ke]:Kt},Hh={__proto__:null,[Ke]:lg},va={__proto__:null,[Ke]:{deoptimizeArgumentsOnCall({args:[,t]}){t?.deoptimizePath(ie)},getLiteralValue:qn,hasEffectsWhenCalled:({args:t},e)=>t.length<=1||t[1].hasEffectsOnInteractionAtPath($m,ia,e)}},p={__proto__:null,[Ke]:hn,prototype:V},Ft={__proto__:null,[Ke]:Kt,prototype:V},cr={__proto__:null,[Ke]:ag,prototype:V},dn={__proto__:null,[Ke]:Kt,from:V,of:ce,prototype:V},pn={__proto__:null,[Ke]:Kt,supportedLocalesOf:Ft},_a={global:V,globalThis:V,self:V,window:V,__proto__:null,[Ke]:hn,Array:{__proto__:null,[Ke]:hn,from:V,isArray:ce,of:ce,prototype:V},ArrayBuffer:{__proto__:null,[Ke]:Kt,isView:ce,prototype:V},AggregateError:cr,Atomics:V,BigInt:p,BigInt64Array:p,BigUint64Array:p,Boolean:Ft,constructor:p,DataView:Ft,Date:{__proto__:null,[Ke]:Kt,now:ce,parse:ce,prototype:V,UTC:ce},decodeURI:ce,decodeURIComponent:ce,encodeURI:ce,encodeURIComponent:ce,Error:Ft,escape:ce,eval:V,EvalError:Ft,FinalizationRegistry:p,Float32Array:dn,Float64Array:dn,Function:p,hasOwnProperty:V,Infinity:V,Int16Array:dn,Int32Array:dn,Int8Array:dn,isFinite:ce,isNaN:ce,isPrototypeOf:V,JSON:V,Map:cr,Math:{__proto__:null,[Ke]:hn,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:V,Number:{__proto__:null,[Ke]:Kt,isFinite:ce,isInteger:ce,isNaN:ce,isSafeInteger:ce,parseFloat:ce,parseInt:ce,prototype:V},Object:{__proto__:null,[Ke]:Kt,create:ce,defineProperty:va,defineProperties:va,freeze:va,getOwnPropertyDescriptor:ce,getOwnPropertyDescriptors:ce,getOwnPropertyNames:ce,getOwnPropertySymbols:ce,getPrototypeOf:ce,hasOwn:ce,is:ce,isExtensible:ce,isFrozen:ce,isSealed:ce,keys:ce,fromEntries:V,entries:Hh,values:Hh,prototype:V},parseFloat:ce,parseInt:ce,Promise:{__proto__:null,[Ke]:hn,all:V,allSettled:V,any:V,prototype:V,race:V,reject:V,resolve:V},propertyIsEnumerable:V,Proxy:{__proto__:null,[Ke]:{deoptimizeArgumentsOnCall:({args:[,t,e]})=>{if((n=e)instanceof ee&&n.type==="ObjectExpression"&&!e.properties.some(r=>!function(i){return i instanceof ee&&i.type===eh}(r))){for(const r of e.properties)r.deoptimizeArgumentsOnInteractionAtPath({args:[null,t],type:2,withNew:!1},ae,He);return}var n;t.deoptimizePath(ie)},getLiteralValue:qn,hasEffectsWhenCalled:Ia}},RangeError:Ft,ReferenceError:Ft,Reflect:V,RegExp:Ft,Set:cr,SharedArrayBuffer:p,String:{__proto__:null,[Ke]:Kt,fromCharCode:ce,fromCodePoint:ce,prototype:V,raw:ce},Symbol:{__proto__:null,[Ke]:Kt,for:ce,keyFor:ce,prototype:V,toStringTag:{__proto__:null,[Ke]:{deoptimizeArgumentsOnCall:Mt,getLiteralValue:()=>na,hasEffectsWhenCalled:Ia}}},SyntaxError:Ft,toLocaleString:V,toString:V,TypeError:Ft,Uint16Array:dn,Uint32Array:dn,Uint8Array:dn,Uint8ClampedArray:dn,unescape:ce,URIError:Ft,valueOf:V,WeakMap:cr,WeakRef:p,WeakSet:cr,clearInterval:p,clearTimeout:p,console:{__proto__:null,[Ke]:hn,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]:hn,Collator:pn,DateTimeFormat:pn,DisplayNames:pn,ListFormat:pn,Locale:pn,NumberFormat:pn,PluralRules:pn,RelativeTimeFormat:pn,Segmenter:pn},setInterval:p,setTimeout:p,TextDecoder:p,TextEncoder:p,URL:{__proto__:null,[Ke]:hn,prototype:V,canParse:ce},URLSearchParams:p,AbortController:p,AbortSignal:p,addEventListener:V,alert:V,AnalyserNode:p,Animation:p,AnimationEvent:p,applicationCache:V,ApplicationCache:p,ApplicationCacheErrorEvent:p,atob:V,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:V,BroadcastChannel:p,btoa:V,ByteLengthQueuingStrategy:p,Cache:p,caches:V,CacheStorage:p,cancelAnimationFrame:V,cancelIdleCallback:V,CanvasCaptureMediaStreamTrack:p,CanvasGradient:p,CanvasPattern:p,CanvasRenderingContext2D:p,ChannelMergerNode:p,ChannelSplitterNode:p,CharacterData:p,clientInformation:V,ClipboardEvent:p,close:V,closed:V,CloseEvent:p,Comment:p,CompositionEvent:p,confirm:V,ConstantSourceNode:p,ConvolverNode:p,CountQueuingStrategy:p,createImageBitmap:V,Credential:p,CredentialsContainer:p,crypto:V,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:V,CustomEvent:{__proto__:null,[Ke]:{deoptimizeArgumentsOnCall({args:t}){t[2]?.deoptimizePath(["detail"])},getLiteralValue:qn,hasEffectsWhenCalled:qh},prototype:V},DataTransfer:p,DataTransferItem:p,DataTransferItemList:p,defaultstatus:V,defaultStatus:V,DelayNode:p,DeviceMotionEvent:p,DeviceOrientationEvent:p,devicePixelRatio:V,dispatchEvent:V,document:V,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:V,fetch:V,File:p,FileList:p,FileReader:p,find:V,focus:V,FocusEvent:p,FontFace:p,FontFaceSetLoadEvent:p,FormData:p,frames:V,GainNode:p,Gamepad:p,GamepadButton:p,GamepadEvent:p,getComputedStyle:V,getSelection:V,HashChangeEvent:p,Headers:p,history:V,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:V,innerHeight:V,innerWidth:V,InputEvent:p,IntersectionObserver:p,IntersectionObserverEntry:p,isSecureContext:V,KeyboardEvent:p,KeyframeEffect:p,length:V,localStorage:V,location:V,Location:p,locationbar:V,matchMedia:V,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:V,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:V,moveTo:V,MutationEvent:p,MutationObserver:p,MutationRecord:p,name:V,NamedNodeMap:p,NavigationPreloadManager:p,navigator:V,Navigator:p,NetworkInformation:p,Node:p,NodeFilter:V,NodeIterator:p,NodeList:p,Notification:p,OfflineAudioCompletionEvent:p,OfflineAudioContext:p,offscreenBuffering:V,OffscreenCanvas:p,open:V,openDatabase:V,Option:p,origin:V,OscillatorNode:p,outerHeight:V,outerWidth:V,PageTransitionEvent:p,pageXOffset:V,pageYOffset:V,PannerNode:p,parent:V,Path2D:p,PaymentAddress:p,PaymentRequest:p,PaymentRequestUpdateEvent:p,PaymentResponse:p,performance:V,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:V,PhotoCapabilities:p,Plugin:p,PluginArray:p,PointerEvent:p,PopStateEvent:p,postMessage:V,Presentation:p,PresentationAvailability:p,PresentationConnection:p,PresentationConnectionAvailableEvent:p,PresentationConnectionCloseEvent:p,PresentationConnectionList:p,PresentationReceiver:p,PresentationRequest:p,print:V,ProcessingInstruction:p,ProgressEvent:p,PromiseRejectionEvent:p,prompt:V,PushManager:p,PushSubscription:p,PushSubscriptionOptions:p,queueMicrotask:V,RadioNodeList:p,Range:p,ReadableStream:p,RemotePlayback:p,removeEventListener:V,Request:p,requestAnimationFrame:V,requestIdleCallback:V,resizeBy:V,ResizeObserver:p,ResizeObserverEntry:p,resizeTo:V,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:V,Screen:p,screenLeft:V,ScreenOrientation:p,screenTop:V,screenX:V,screenY:V,ScriptProcessorNode:p,scroll:V,scrollbars:V,scrollBy:V,scrollTo:V,scrollX:V,scrollY:V,SecurityPolicyViolationEvent:p,Selection:p,ServiceWorker:p,ServiceWorkerContainer:p,ServiceWorkerRegistration:p,sessionStorage:V,ShadowRoot:p,SharedWorker:p,SourceBuffer:p,SourceBufferList:p,speechSynthesis:V,SpeechSynthesisEvent:p,SpeechSynthesisUtterance:p,StaticRange:p,status:V,statusbar:V,StereoPannerNode:p,stop:V,Storage:p,StorageEvent:p,StorageManager:p,styleMedia:V,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:V,top:V,Touch:p,TouchEvent:p,TouchList:p,TrackEvent:p,TransitionEvent:p,TreeWalker:p,UIEvent:p,ValidityState:p,visualViewport:V,VisualViewport:p,VTTCue:p,WaveShaperNode:p,WebAssembly:V,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"])_a[t]=_a;function vs(t){let e=_a;for(const n of t)if(typeof n!="string"||(e=e[n],!e))return null;return e[Ke]}class Pa extends jn{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,n,s){switch(e.type){case 0:case 1:return void(vs([this.name,...n].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,n,s));case 2:{const r=vs([this.name,...n]);return void(r?r.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,n,s))}}}getLiteralValueAtPath(e,n,s){const r=vs([this.name,...e]);return r?r.getLiteralValue():Ce}hasEffectsOnInteractionAtPath(e,n,s){switch(n.type){case 0:return e.length===0?this.name!=="undefined"&&!vs([this.name]):!vs([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const r=vs([this.name,...e]);return!r||r.hasEffectsWhenCalled(n,s)}}}}const Wh=(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 Dt extends jn{constructor(e,n,s,r,i,a){super(e),this.init=s,this.initPath=r,this.kind=a,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.includedPathTracker=new Cm,this.expressionsToBeDeoptimized=[],this.declarations=n?[n]:[],this.deoptimizationTracker=i.deoptimizationTracker,this.module=i.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?En(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(Wh(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,r){return this.isReassigned||e.length+this.initPath.length>6?it:s.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(r),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],n,s,r)),it)}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 r=s.parent;for(;!r.included&&(r.includeNode(n),r.type!==ai);)r=r.parent;this.kind==="parameter"&&(Qm(s.parent)||Zm(s.parent))&&eg(s.parent.parent)&&tg(s.parent.parent.callee)&&ng(s.parent.parent.callee.property)&&s.parent.parent.callee.property.name==="then"&&ga(s.parent.parent.callee.object)&&s.parent.parent.callee.object.includePath(e,n)}e.length>0&&(this.init.includePath(Wh(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?ra(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 cg=new Set(["class","const","let","var","using","await using"]);class Gh extends ee{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,r){const[i,a]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,n,s,r);return[i,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 Pa&&!this.isPureFunction(ae)&&this.variable.hasEffectsOnInteractionAtPath(ae,Ln,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 Dt&&this.variable.kind&&cg.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&&Xh(this)===Xh(n)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof Dt&&(this.variable.module.isExecuted||As(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(Ah(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[ma])return!0;n=n[s]}return n?.[ma]}}function Xh(t){for(;t&&!/^Program|Function/.test(t.type);)t=t.parent;return t}class Kh 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,r){return this.object.getReturnExpressionWhenCalledAtPath([...this.path,...e],n,s,r)}hasEffectsOnInteractionAtPath(e,n,s){return this.object.hasEffectsOnInteractionAtPath([...this.path,...e],n,s)}}class Fe extends Gh{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&&Yu(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0)}declare(e,n,s){let r;const{treeshake:i}=this.scope.context.options;return e==="parameter"?r=this.scope.addParameterDeclaration(this,n):(r=this.scope.addDeclaration(this,this.scope.context,s,n,e),e==="var"&&i&&i.correctVarValueBeforeDeclaration&&r.markInitializersForDeoptimization()),[this.variable=r]}deoptimizeAssignment(e,n){this.deoptimizePath(ae),n.deoptimizePath([...e,Ie])}hasEffectsWhenDestructuring(e,n,s){return n.length>0&&s.hasEffectsOnInteractionAtPath(n,Ln,e)}includeDestructuredIfNecessary(e,n,s){n.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,s.deoptimizeArgumentsOnInteractionAtPath({args:[new Kh(s,n.slice(0,-1))],type:0},n,He));const{propertyReadSideEffects:r}=this.scope.context.options.treeshake;let i=this.included;return(i||=n.length>0&&!e.brokenFlow&&r&&(r==="always"||s.hasEffectsOnInteractionAtPath(n,Ln,ys())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,ae,e),s.includePath(n,e)),!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:n},useOriginalName:s},{renderedParentType:r,isCalleeOfRenderedParent:i,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"&&r===Ys&&i&&e.appendRight(this.start,"0, ")}}}function Ai(t){let e="";do{const n=t%64;t=t/64|0,e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+e}while(t!==0);return e}function Jt(t,e,n){let s=t,r=1;for(;e.has(s)||fi.has(s)||n?.has(s);)s=`${t}$${Ai(r++)}`;return e.add(s),s}class Jh{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,n,s,r,i){const a=e.name,l=this.hoistedVariables?.get(a)||this.variables.get(a);if(l){if(i==="var"&&l.kind==="var")return l.addDeclaration(e,s),l;n.error(ks(a),e.start)}const c=new Dt(e.name,e,s,r,n,i);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 Jh{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 r of e)s.add(r);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,s,r){for(const a of this.accessedOutsideVariables.values())a.included&&(e.add(a.getBaseVariableName()),n==="system"&&s.has(a)&&e.add("exports"));const i=r.get(this);if(i)for(const a of i)e.add(a)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,n,s){const r=new Set;if(this.addUsedOutsideNames(r,e,n,s),this.accessedDynamicImports)for(const i of this.accessedDynamicImports)i.inlineNamespace&&r.add(i.inlineNamespace.getBaseVariableName());for(const[i,a]of this.variables)(a.included||a.alwaysRendered)&&a.setRenderNames(null,Jt(i,r,a.forbiddenNames));for(const i of this.children)i.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 $a(t,e){for(const n of t)if(n.hasEffects(e))return!0;return!1}class wi extends ee{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,r){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,n,s,r)}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=it,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(ae,Js,He,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}wi.prototype.includeNode=ze,wi.prototype.applyDeoptimizations=Te;class Si extends wi{hasEffects(e){return super.hasEffects(e)||$a(this.decorators,e)}}class Hn extends vt{constructor(e){super(e,e.context)}addDeclaration(e,n,s,r,i){if(i==="var"){const a=e.name,l=this.hoistedVariables?.get(a)||this.variables.get(a);if(l)return l.kind==="var"||i==="var"&&l.kind==="parameter"?(l.addDeclaration(e,s),l):n.error(ks(a),e.start);const c=this.parent.addDeclaration(e,n,s,r,i);return c.markInitializersForDeoptimization(),this.addHoistedVariable(a,c),c}return super.addDeclaration(e,n,s,r,i)}}class Ii extends ee{createScope(e){this.scope=new Hn(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;Ks(this.body,e,this.start+s,this.end-1,n)}else super.render(e,n)}}function Yh(t){return t.type==="StaticBlock"}Ii.prototype.includeNode=ze,Ii.prototype.applyDeoptimizations=Te;class Na extends ee{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,r){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,n,s,r)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const n=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),n||super.hasEffects(e)||$a(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 Si&&e.kind==="constructor")return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)Yh(e)||e.static||e instanceof Si&&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(Yh(s))continue;const r=s.static?e:n,i=s.kind;if(r===n&&!i)continue;const a=i==="set"||i==="get"?i:"init";let l;if(s.computed){const c=s.key.getLiteralValueAtPath(ae,He,this);if(typeof c=="symbol"){r.push({key:Ie,kind:a,property:s});continue}l=String(c)}else l=s.key instanceof Fe?s.key.name:String(s.key.value);r.push({key:l,kind:a,property:s})}return e.unshift({key:"prototype",kind:"init",property:new $t(n,this.superClass?new Kh(this.superClass,["prototype"]):wn)}),this.objectEntity=new $t(e,this.superClass||wn)}}Na.prototype.includeNode=dt;class _s extends Na{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:r,snippets:{_:i,getPropertyAccess:a}}=n;if(this.id){const{variable:l,name:c}=this.id;r==="system"&&s.has(l)&&e.appendLeft(this.end,`${i}${Dn([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}${i}=${i}`),void e.prependLeft(this.end,";")}super.render(e,n)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:n}=this;if(e){const{name:s,variable:r}=e;for(const i of n.accessedOutsideVariables.values())i!==r&&i.forbidName(s)}}}class ug extends Dt{constructor(e){super("arguments",null,ve,ae,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=hg}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 hg(t){this.included?t.deoptimizePath(ie):this.deoptimizedArguments?.push(t)}const Qh=Qe,dg=new Set([Ie]),pg=new gs,fg=new Set([ve]);class Zh extends Dt{constructor(e,n,s,r){super(e,n,ve,s,r,"parameter"),this.includedPathTracker=new Rm,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new gs,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)En(n);this.deoptimizationInteractions=Qh}}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],He)}}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,He,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,He,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 r=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(s),n.withTrackedEntityAtPath(e,r,()=>r.getLiteralValueAtPath([...this.initPath,...e],n,s),Ce)}hasEffectsOnInteractionAtPath(e,n,s){const{type:r}=n;return this.isReassigned||r===1||e.length+this.initPath.length>6?super.hasEffectsOnInteractionAtPath(e,n,s):!(r===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)En(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(n,e.args)){for(const s of this.argumentsToBeDeoptimized)s.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...n],He);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=Qh,this.deoptimizations=pg,this.deoptimizedFields=dg,this.argumentsToBeDeoptimized=fg)}}getReturnExpressionWhenCalledAtPath(e){return e.length===0?this.deoptimizePath(ie):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),it}includeArgumentPaths(e,n){this.includedPathTracker.includeAllPaths(e,n,this.initPath)}}class ed extends Zh{constructor(e){super("this",null,ae,e)}hasEffectsOnInteractionAtPath(e,n,s){return(s.replacedVariableInits.get(this)||ve).hasEffectsOnInteractionAtPath(e,n,s)}}class mg extends vt{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,n,s,r,i){if(i==="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,un,r,i);return l.renderLikeHoisted(d),this.addHoistedVariable(a,d),d}return u==="var"?(l.addDeclaration(e,s),l):n.error(ks(a),e.start)}const c=this.parent.parent.addDeclaration(e,n,s,r,i);return c.markInitializersForDeoptimization(),this.addHoistedVariable(a,c),c}return super.addDeclaration(e,n,s,r,i)}}class gg extends vt{constructor(e){super(e,e.context)}addDeclaration(e,n,s,r,i){const a=e.name,l=this.hoistedVariables?.get(a)||this.variables.get(a);if(l){const u=l.kind;if(!(i!=="var"&&i!=="function"||u!=="var"&&u!=="function"&&u!=="parameter"))return l.addDeclaration(e,s),l;n.error(ks(a),e.start)}const c=new Dt(e.name,e,s,r,n,i);return this.variables.set(a,c),c}}class td extends vt{constructor(e,n){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=n?new mg(this):new gg(this)}addParameterDeclaration(e,n){const{name:s,start:r}=e;if(this.variables.get(s))return this.context.error(function(a){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${a}"`}}(s),r);const i=new Zh(s,e,n,this.context);return this.variables.set(s,i),this.bodyScope.addHoistedVariable(s,i),i}addParameterVariables(e,n){this.parameters=e;for(const s of e)for(const r of s)r.alwaysRendered=!0;this.hasRest=n}includeCallArguments({args:e},n){let s=!1,r=!1;const i=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 Un&&!r&&(r=!0,a=l-1),r&&(c.includePath(ie,n),c.include(n,!1))}for(let l=a;l>=1;l--){const c=this.parameters[l-1]||i,u=e[l];if(c)if(s=!1,c.length===0)r=!0;else for(const d of c)d.calledFromTryStatement&&(s=!0),d.included&&(r=!0,s?u.include(n,!0):(d.includeArgumentPaths(u,n),u.include(n,!1)));(r||u.shouldBeIncluded(n))&&(r=!0,u.include(n,s))}}}class nd extends td{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 i=e[s+1];if(i instanceof Un){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)i.deoptimizePath(ie);else{const a=n[s];if(a)for(const l of a)l.addArgumentForDeoptimization(i);this.addArgumentToBeDeoptimized(i)}}const r=this.hasRest?n.length-1:n.length;for(;s<r;s++)for(const i of n[s])i.addArgumentForDeoptimization(un)}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 sd extends nd{constructor(e,n){super(e,!1),this.functionNode=n;const{context:s}=e;this.variables.set("arguments",this.argumentsVariable=new ug(s)),this.variables.set("this",this.thisVariable=new ed(s))}findLexicalBoundary(){return this}includeCallArguments(e,n){if(super.includeCallArguments(e,n),this.argumentsVariable.included){const{args:s}=e;for(let r=1;r<s.length;r++){const i=s[r];i&&(i.includePath(ie,n),i.include(n,!1))}}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class Bt extends ee{initialise(){var e,n;super.initialise(),this.directive&&this.directive!=="use strict"&&this.parent.type===ai&&this.scope.context.log(be,(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.appendLeft(this.end,";")}shouldBeIncluded(e){return this.directive&&this.directive!=="use strict"?this.parent.type!==ai:super.shouldBeIncluded(e)}}Bt.prototype.includeNode=ze,Bt.prototype.applyDeoptimizations=Te;class Wn extends ee{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 Hn(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 Bt&&e.directive==="use asm"}render(e,n){this.body.length>0?Ks(this.body,e,this.start+1,this.end-1,n):super.render(e,n)}}Wn.prototype.includeNode=ze,Wn.prototype.applyDeoptimizations=Te;class Gn extends ee{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,vi(n),s)}deoptimizeAssignment(e,n){this.argument.deoptimizeAssignment(vi(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,vi(n),s)}includeDestructuredIfNecessary(e,n,s){const r=this.argument.includeDestructuredIfNecessary(e,vi(n),s);return!this.included&&r&&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())}}Gn.prototype.includeNode=dt;const vi=t=>t.at(-1)===Ie?t:[...t,Ie];class ur extends ee{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,r){return e.length>0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,n,s,r):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(ie),this.scope.context.requestTreeshakingPass()),it):[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:i}=this.scope.context.options.treeshake,a=this.scope.getReturnExpression();if(a.hasEffectsOnInteractionAtPath(["then"],Js,s)||i&&(i==="always"||a.hasEffectsOnInteractionAtPath(["then"],Ln,s)))return this.hasCachedEffects=!0,!0}const{propertyReadSideEffects:r}=this.scope.context.options.treeshake;for(let i=0;i<this.params.length;i++){const a=this.params[i];if(a.hasEffects(s)||r&&a.hasEffectsWhenDestructuring(s,ae,n.args[i+1]||un))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===Zu&&(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 Wn?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:r}=this,{bodyScope:i,context:a}=r,l=this.params=s.map(c=>new(a.getNodeConstructor(c.type))(this,r).parseNode(c));return r.addParameterVariables(l.map(c=>c.declare("parameter",ae,ve)),l[l.length-1]instanceof Gn),this.body=new(a.getNodeConstructor(n.type))(this,i).parseNode(n),super.parseNode(e)}}ur.prototype.preventChildBlockScope=!0,ur.prototype.includeNode=ze,ur.prototype.applyDeoptimizations=Te;class _i extends ur{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new sd(e,this),this.constructedEntity=new $t(Object.create(null),wn),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 r=s.replacedVariableInits.get(this.scope.thisVariable);s.replacedVariableInits.set(this.scope.thisVariable,n.withNew?this.constructedEntity:ve);const{brokenFlow:i,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=i,r?l.set(this.scope.thisVariable,r):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 r of this.params)r instanceof Fe&&!s||r.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 $t([{key:"prototype",kind:"init",property:new $t([],wn)}],wn)}}class Ps extends _i{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 Xn extends ee{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.declarationName||this.scope.context.getModuleName(),this,this.scope.context),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration.removeAnnotations(e)}render(e,n,s){const{start:r,end:i}=s,a=function(l,c){return kn(l,ht(l,"default",c)+7)}(e.original,this.start);if(this.declaration instanceof Ps)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 _s)this.renderNamedDeclaration(e,a,this.declaration.id===null?ht(e.original,"class",r)+5:null,n);else{if(this.variable.getOriginalVariable()!==this.variable)return void ps(this,e,r,i);if(!this.variable.included)return e.remove(this.start,a),this.declaration.render(e,n,{renderedSurroundingElement:Gt}),void(e.original[this.end-1]!==";"&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,a,n)}this.declaration.render(e,n)}renderNamedDeclaration(e,n,s,r){const{exportNamesByVariable:i,format:a,snippets:{getPropertyAccess:l}}=r,c=this.variable.getName(l);e.remove(this.start,n),s!==null&&e.appendLeft(s,` ${c}`),a==="system"&&this.declaration instanceof _s&&i.has(this.variable)&&e.appendLeft(this.end,` ${Dn([this.variable],r)};`)}renderVariableDeclaration(e,n,{format:s,exportNamesByVariable:r,snippets:{cnst:i,getPropertyAccess:a}}){const l=e.original.charCodeAt(this.end-1)===59,c=s==="system"&&r.get(this.variable);c?(e.overwrite(this.start,n,`${i} ${this.variable.getName(a)} = exports(${JSON.stringify(c[0])}, `),e.appendRight(l?this.end-1:this.end,")"+(l?"":";"))):(e.overwrite(this.start,n,`${i} ${this.variable.getName(a)} = `),l||e.appendLeft(this.end,";"))}}Xn.prototype.needsBoundaries=!0,Xn.prototype.includeNode=ze,Xn.prototype.applyDeoptimizations=Te;const yg=/[\n\r'\\\u2028\u2029]/,bg=/([\n\r'\u2028\u2029])/g,xg=/\\/g;function Sn(t){return yg.test(t)?t.replace(xg,"\\\\").replace(bg,"\\$1"):t}const Ca="_interopDefault",Ta="_interopDefaultCompat",Pi="_interopNamespace",$i="_interopNamespaceCompat",Kn="_interopNamespaceDefault",hr="_interopNamespaceDefaultOnly",Ni="_mergeNamespaces",fn="_documentCurrentScript",Ci={auto:Ca,compat:Ta,default:null,defaultOnly:null,esModule:null},Ti=(t,e)=>t==="esModule"||e&&(t==="auto"||t==="compat"),dr={auto:Pi,compat:$i,default:Kn,defaultOnly:hr,esModule:null},kg=(t,e)=>t!=="esModule"&&Ti(t,e),Ra=(t,e,n,s,r,i,a)=>{const l=new Set(t);for(const c of Ma)e.has(c)&&l.add(c);return Ma.map(c=>l.has(c)?rd[c](n,s,r,i,a,l):"").join("")},rd={[fn]:(t,{_:e,n})=>`var ${fn}${e}=${e}typeof document${e}!==${e}'undefined'${e}?${e}document.currentScript${e}:${e}null;${n}`,[Ta](t,e,n){const{_:s,getDirectReturnFunction:r,n:i}=e,[a,l]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ta});return`${a}${Da(e)}${s}?${s}${n?id(e):od(e)}${l}${i}${i}`},[Ca](t,e,n){const{_:s,getDirectReturnFunction:r,n:i}=e,[a,l]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ca});return`${a}e${s}&&${s}e.__esModule${s}?${s}${n?id(e):od(e)}${l}${i}${i}`},[$i](t,e,n,s,r,i){const{_:a,getDirectReturnFunction:l,n:c}=e;if(i.has(Kn)){const[u,d]=l(["e"],{functionReturn:!0,lineBreakIndent:null,name:$i});return`${u}${Da(e)}${a}?${a}e${a}:${a}${Kn}(e)${d}${c}${c}`}return`function ${$i}(e)${a}{${c}${t}if${a}(${Da(e)})${a}return e;${c}`+Oa(t,t,e,n,s,r)+`}${c}${c}`},[hr](t,e,n,s,r){const{getDirectReturnFunction:i,getObject:a,n:l,_:c}=e,[u,d]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:hr});return`${u}${La(s,cd(r,a([[null,`__proto__:${c}null`],["default","e"]],{lineBreakIndent:null}),e))}${d}${l}${l}`},[Kn](t,e,n,s,r){const{_:i,n:a}=e;return`function ${Kn}(e)${i}{${a}`+Oa(t,t,e,n,s,r)+`}${a}${a}`},[Pi](t,e,n,s,r,i){const{_:a,getDirectReturnFunction:l,n:c}=e;if(i.has(Kn)){const[u,d]=l(["e"],{functionReturn:!0,lineBreakIndent:null,name:Pi});return`${u}e${a}&&${a}e.__esModule${a}?${a}e${a}:${a}${Kn}(e)${d}${c}${c}`}return`function ${Pi}(e)${a}{${c}${t}if${a}(e${a}&&${a}e.__esModule)${a}return e;${c}`+Oa(t,t,e,n,s,r)+`}${c}${c}`},[Ni](t,e,n,s,r){const{_:i,cnst:a,n:l}=e,c=a==="var"&&n;return`function ${Ni}(n, m)${i}{${l}${t}${Ag(`{${l}${t}${t}${t}if${i}(k${i}!==${i}'default'${i}&&${i}!(k in n))${i}{${l}`+(n?c?ad:Sg:ld)(t,t+t+t+t,e)+`${t}${t}${t}}${l}${t}${t}}`,c,t,e)}${l}${t}return ${La(s,cd(r,"n",e))};${l}}${l}${l}`}},id=({_:t,getObject:e})=>`e${t}:${t}${e([["default","e"]],{lineBreakIndent:null})}`,od=({_:t,getPropertyAccess:e})=>`e${e("default")}${t}:${t}e`,Da=({_:t})=>`e${t}&&${t}typeof e${t}===${t}'object'${t}&&${t}'default'${t}in e`,Oa=(t,e,n,s,r,i)=>{const{_:a,cnst:l,getObject:c,getPropertyAccess:u,n:d,s:m}=n,f=`{${d}`+(s?wg:ld)(t,e+t+t,n)+`${e}${t}}`;return`${e}${l} n${a}=${a}Object.create(null${i?`,${a}{${a}[Symbol.toStringTag]:${a}${pr(c)}${a}}`:""});${d}${e}if${a}(e)${a}{${d}${e}${t}${Eg(f,!s,n)}${d}${e}}${d}${e}n${u("default")}${a}=${a}e;${d}${e}return ${La(r,"n")}${m}${d}`},Eg=(t,e,{_:n,cnst:s,getFunctionIntro:r,s:i})=>s!=="var"||e?`for${n}(${s} k in e)${n}${t}`:`Object.keys(e).forEach(${r(["k"],{isAsync:!1,name:null})}${t})${i}`,Ag=(t,e,n,{_:s,cnst:r,getDirectReturnFunction:i,getFunctionIntro:a,n:l})=>{if(e){const[c,u]=i(["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}${r} e${s}=${s}m[i];${l}${n}${n}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${r} k in e)${s}${t}${s}}${l}${n}}`},wg=(t,e,n)=>{const{_:s,n:r}=n;return`${e}if${s}(k${s}!==${s}'default')${s}{${r}`+ad(t,e+t,n)+`${e}}${r}`},ad=(t,e,{_:n,cnst:s,getDirectReturnFunction:r,n:i})=>{const[a,l]=r([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${e}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${i}${e}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${i}${e}${t}enumerable:${n}true,${i}${e}${t}get:${n}${a}e[k]${l}${i}${e}});${i}`},Sg=(t,e,{_:n,cnst:s,getDirectReturnFunction:r,n:i})=>{const[a,l]=r([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${e}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${i}${e}if${n}(d)${n}{${i}${e}${t}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${i}${e}${t}${t}enumerable:${n}true,${i}${e}${t}${t}get:${n}${a}e[k]${l}${i}${e}${t}});${i}${e}}${i}`},ld=(t,e,{_:n,n:s})=>`${e}n[k]${n}=${n}e[k];${s}`,La=(t,e)=>t?`Object.freeze(${e})`:e,cd=(t,e,{_:n,getObject:s})=>t?`Object.defineProperty(${e},${n}Symbol.toStringTag,${n}${pr(s)})`:e,Ma=Object.keys(rd);function pr(t){return t([["value","'Module'"]],{lineBreakIndent:null})}class kt extends ee{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?it:ir(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||rr(this.members,e[0],n,s)}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return sg;switch(typeof e){case"boolean":return xa;case"number":return ka;case"string":return sr}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 ud(t,e,n,s,r){if("getLiteralValueAtPathAsChainElement"in e){const i=e.getLiteralValueAtPathAsChainElement(ae,He,r);if(i===Xt||t.optional&&i==null)return Xt}else if(t.optional&&e.getLiteralValueAtPath(ae,He,r)==null)return Xt;return t.getLiteralValueAtPath(n,s,r)}function Ig(t){return t.computed?function(e){return e instanceof kt?String(e.value):null}(t.property):t.property.name}function hd(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 mn){const s=hd(n);return s&&[...s,{key:e,pos:t.property.start}]}}return null}kt.prototype.includeNode=dt;class mn extends ee{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=hd(this),n=e&&this.scope.findVariable(e[0].key);if(n?.isNamespace){const s=dd(n,e.slice(1),this.scope.context);s?s==="undefined"?this.isUndefined=!0:(this.variable=s,this.scope.addNamespaceMemberAccess(function(r){let i=r[0].key;for(let a=1;a<r.length;a++)i+="."+r[a].key;return i}(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):En(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,Lt());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?ri: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 r=this.getDynamicPropertyKey();return r!==Ie&&e.length<6?(r!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getLiteralValueAtPath([r,...e],n,s)):Ce}getLiteralValueAtPathAsChainElement(e,n,s){return this.variable?this.variable.getLiteralValueAtPath(e,n,s):this.isUndefined?void 0:ud(this,this.object,e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,r){if(this.variable)return this.variable.getReturnExpressionWhenCalledAtPath(e,n,s,r);if(this.isUndefined)return[un,!1];const i=this.getDynamicPropertyKey();return i!==Ie&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(r),this.object.getReturnExpressionWhenCalledAtPath([i,...e],n,s,r)):it}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===Xt?Xt:this.optional&&this.object.getLiteralValueAtPath(ae,He,this)==null?n||Xt:(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,Ln,e)}include(e,n){this.included||this.includeNode(e),this.object.include(e,n),this.property.include(e,n)}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):ga(this.object)||this.object.variable&&!this.object.variable.isReassigned&&this.object.variable instanceof Dt&&(s=this.object.variable.init)instanceof ee&&s.type==="AwaitExpression"&&ga(this.object.variable.init.argument)?Qu(e,n):ra(e,n)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=Ig(this),this.propertyKey=this.dynamicPropertyKey===null?Ie:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,n,{renderedParentType:s,isCalleeOfRenderedParent:r,renderedSurroundingElement:i}=pt){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:a}}=n;let l=this.variable?this.variable.getName(a):"undefined";s&&r&&(l="0, "+l),e.overwrite(this.start,this.end,l,{contentOnly:!0,storeName:!0})}else s&&r&&e.appendRight(this.start,"0, "),this.object.render(e,n,{renderedSurroundingElement:i}),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],He),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],He),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,Lt()),this.scope.context.log(be,Ah(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,He,this);return this.dynamicPropertyKey=e===na?e:typeof e=="symbol"?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 dd(t,e,n){if(e.length===0)return t;if(!t.isNamespace||t instanceof tr)return null;const s=e[0].key,[r,i]=t.context.traceExport(s);if(!r){if(e.length===1){const a=t.context.fileName;return n.log(be,di(s,n.module.id,a,!!i?.missingButExportExists),e[0].pos),"undefined"}return null}return dd(r,e.slice(1),n)}const Fa="ROLLUP_FILE_URL_",Ba="import";class pd extends ee{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:n},metaProperty:s}=this;return n===Ba&&s?.startsWith(Fa)?e.getFileName(s.slice(16)):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===Ba){this.scope.context.addImportMeta(this);const e=this.parent,n=this.metaProperty=e instanceof mn&&typeof e.propertyKey=="string"?e.propertyKey:null;n?.startsWith(Fa)&&(this.referenceId=n.slice(16))}}render(e,n){const{format:s,pluginDriver:r,snippets:i}=n,{scope:{context:{module:a}},meta:{name:l},metaProperty:c,parent:u,preliminaryChunkId:d,referenceId:m,start:f,end:g}=this,{id:S}=a;if(l!==Ba)return;const x=d;if(m){const E=r.getFileName(m),b=an(Tn(ln(x),E)),A=r.hookFirstSync("resolveFileUrl",[{chunkId:x,fileName:E,format:s,moduleId:S,referenceId:m,relativePath:b}])||Pg[s](b);return void e.overwrite(u.start,u.end,A,{contentOnly:!0})}let I=r.hookFirstSync("resolveImportMeta",[c,{chunkId:x,format:s,moduleId:S}]);I||(I=$g[s]?.(c,{chunkId:x,snippets:i}),n.accessedDocumentCurrentScript||=fd.includes(s)&&I!=="undefined"),typeof I=="string"&&(u instanceof mn?e.overwrite(u.start,u.end,I,{contentOnly:!0}):e.overwrite(f,g,I,{contentOnly:!0}))}setResolution(e,n,s){this.preliminaryChunkId=s;const r=(this.metaProperty?.startsWith(Fa)?_g:vg)[e];r.length>0&&this.scope.addAccessedGlobals(r,n)}}const fd=["cjs","iife","umd"],vg={amd:["document","module","URL"],cjs:["document","require","URL",fn],es:[],iife:["document","URL",fn],system:["module"],umd:["document","require","URL",fn]},_g={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},fr=(t,e="URL")=>`new ${e}(${t}).href`,ja=(t,e=!1)=>fr(`'${Sn(t)}', ${e?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`),Ri=t=>(e,{chunkId:n})=>{const s=t(n);return e===null?`({ url: ${s} })`:e==="url"?s:"undefined"},za=t=>`require('u' + 'rl').pathToFileURL(${t}).href`,md=t=>za(`__dirname + '/${Sn(t)}'`),Va=(t,e=!1)=>`${e?"typeof document === 'undefined' ? location.href : ":""}(${fn} && ${fn}.tagName.toUpperCase() === 'SCRIPT' && ${fn}.src || new URL('${Sn(t)}', document.baseURI).href)`,Pg={amd:t=>(t[0]!=="."&&(t="./"+t),fr(`require.toUrl('${Sn(t)}'), document.baseURI`)),cjs:t=>`(typeof document === 'undefined' ? ${md(t)} : ${ja(t)})`,es:t=>fr(`'${Sn(t)}', import.meta.url`),iife:t=>ja(t),system:t=>fr(`'${Sn(t)}', module.meta.url`),umd:t=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${md(t)} : ${ja(t,!0)})`},$g={amd:Ri(()=>fr("module.uri, document.baseURI")),cjs:Ri(t=>`(typeof document === 'undefined' ? ${za("__filename")} : ${Va(t)})`),iife:Ri(t=>Va(t)),system:(t,{snippets:{getPropertyAccess:e}})=>t===null?"module.meta":`module.meta${e(t)}`,umd:Ri(t=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${za("__filename")} : ${Va(t,!0)})`)};class gd extends jn{constructor(){super("undefined")}getLiteralValueAtPath(){}}class Yt extends Dt{constructor(e,n,s){super(e,n,n.declaration,ae,s,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const r=n.declaration;(r instanceof Ps||r instanceof _s)&&r.id?(this.hasId=!0,this.originalId=r.id):r instanceof Fe&&(this.originalId=r)}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 gd||"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 Yt&&!s.has(n));return this.originalVariable=n||e}}class Jn extends jn{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 r=n[0];typeof r=="string"?this.getMemberVariables()[r]?.deoptimizeArgumentsOnInteractionAtPath(e,n.slice(1),s):En(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]===na?"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[r]=this.context.traceExport(s);r&&(e[s]=r)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,n,s){const{type:r}=n;if(e.length===0)return!0;if(e.length===1&&r!==2)return r===1;const i=e[0];if(typeof i!="string")return!0;const a=this.getMemberVariables()[i];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([Ni],e)}renderBlock(e){const{exportNamesByVariable:n,format:s,freeze:r,indent:i,symbols:a,snippets:{_:l,cnst:c,getObject:u,getPropertyAccess:d,n:m,s:f}}=e,g=this.getMemberVariables(),S=Object.entries(g).filter(([I,E])=>E.included).map(([I,E])=>this.referencedEarly||E.isReassigned||E===this?[null,`get ${yi(I)}${l}()${l}{${l}return ${E.getName(d)}${f}${l}}`]:[I,E.getName(d)]);S.unshift([null,`__proto__:${l}null`]);let x=u(S,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const I=this.mergedNamespaces.map(E=>E.getName(d));x=`/*#__PURE__*/${Ni}(${x},${l}[${I.join(`,${l}`)}])`}else a&&(x=`/*#__PURE__*/Object.defineProperty(${x},${l}Symbol.toStringTag,${l}${pr(u)})`),r&&(x=`/*#__PURE__*/Object.freeze(${x})`);return x=`${c} ${this.getName(d)}${l}=${l}${x};`,s==="system"&&n.has(this)&&(x+=`${m}${Dn([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:r}=s.scope;if(r.getModuleExecIndex()<=n){this.referencedEarly=!0;break}}}}Jn.prototype.isNamespace=!0;class Et extends jn{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 Yt||e instanceof Et;){if(e instanceof Yt){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 Yn{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?an(Tn(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=yd(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return Sn(this.renormalizeRenderPath?nh(e,this.getFileName(),this.options.format==="amd",!1):this.getFileName())}}function yd(t,{getObject:e}){if(!t)return null;const n=Object.entries(t).map(([s,r])=>[s,`'${r}'`]);return n.length>0?e(n,{lineBreakIndent:null}):null}function bd(t){return t.endsWith(".js")?t.slice(0,-3):t}function xd(t,e){return t.autoId?`${t.basePath?t.basePath+"/":""}${bd(e)}`:t.id??""}function Di(t,e,n,s,r,i,a,l,c="return "){const{_:u,getDirectReturnFunction:d,getFunctionIntro:m,getPropertyAccess:f,n:g,s:S}=r;if(!n)return`${g}${g}${c}${function(I,E,b,A,v){if(I.length>0)return I[0].local;for(const{defaultVariableName:P,importPath:C,isChunk:R,name:F,namedExportsMode:B,namespaceVariableName:N,reexports:T}of E)if(T)return kd(F,T[0].imported,B,R,P,N,b,C,A,v)}(t,e,s,a,f)};`;let x="";if(n){for(const{defaultVariableName:I,importPath:E,isChunk:b,name:A,namedExportsMode:v,namespaceVariableName:P,reexports:C}of e)if(C){for(const R of C)if(R.reexported!=="*"){const F=kd(A,R.imported,v,b,I,P,s,E,a,f);if(x&&(x+=g),R.imported!=="*"&&R.needsLiveBinding){const[B,N]=d([],{functionReturn:!0,lineBreakIndent:null,name:null});x+=`Object.defineProperty(exports,${u}${JSON.stringify(R.reexported)},${u}{${g}${i}enumerable:${u}true,${g}${i}get:${u}${B}${F}${N}${g}});`}else R.reexported==="__proto__"?x+=`Object.defineProperty(exports,${u}"__proto__",${u}{${g}${i}enumerable:${u}true,${g}${i}value:${u}${F}${g}});`:x+=`exports${f(R.reexported)}${u}=${u}${F};`}}}for(const{exported:I,local:E}of t){const b=`exports${f(I)}`;b!==E&&(x&&(x+=g),x+=I==="__proto__"?`Object.defineProperty(exports,${u}"__proto__",${u}{${g}${i}enumerable:${u}true,${g}${i}value:${u}${E}${g}});`:`${b}${u}=${u}${E};`)}if(n){for(const{name:I,reexports:E}of e)if(E){for(const b of E)if(b.reexported==="*"){if(x&&(x+=g),!b.needsLiveBinding&&l){const v="'__proto__'";x+=`Object.prototype.hasOwnProperty.call(${I},${u}${v})${u}&&${g}${i}!Object.prototype.hasOwnProperty.call(exports,${u}${v})${u}&&${g}${i}Object.defineProperty(exports,${u}${v},${u}{${g}${i}${i}enumerable:${u}true,${g}${i}${i}value:${u}${I}[${v}]${g}${i}});${g}${g}`}const A=`{${g}${i}if${u}(k${u}!==${u}'default'${u}&&${u}!Object.prototype.hasOwnProperty.call(exports,${u}k))${u}${Ng(I,b.needsLiveBinding,i,r)}${S}${g}}`;x+=`Object.keys(${I}).forEach(${m(["k"],{isAsync:!1,name:null})}${A});`}}}return x?`${g}${g}${x}`:""}function kd(t,e,n,s,r,i,a,l,c,u){if(e==="default"){if(!s){const d=a(l),m=Ci[d]?r:t;return Ti(d,c)?`${m}${u("default")}`:m}return n?`${t}${u("default")}`:t}return e==="*"?(s?!n:dr[a(l)])?i:t:`${t}${u(e)}`}function Ed(t){return t([["value","true"]],{lineBreakIndent:null})}function Oi(t,e,n,{_:s,getObject:r}){if(t){if(e)return n?`Object.defineProperties(exports,${s}${r([["__esModule",Ed(r)],[null,`[Symbol.toStringTag]:${s}${pr(r)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${Ed(r)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${pr(r)});`}return""}const Ng=(t,e,n,{_:s,getDirectReturnFunction:r,n:i})=>{if(e){const[a,l]=r([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${i}${n}${n}enumerable:${s}true,${i}${n}${n}get:${s}${a}${t}[k]${l}${i}${n}})`}return`exports[k]${s}=${s}${t}[k]`};function Li(t,e,n,s,r,i,a,l){const{_:c,cnst:u,n:d}=l,m=new Set,f=[],g=(S,x,I)=>{m.add(x),f.push(`${u} ${S}${c}=${c}/*#__PURE__*/${x}(${I});`)};for(const{defaultVariableName:S,imports:x,importPath:I,isChunk:E,name:b,namedExportsMode:A,namespaceVariableName:v,reexports:P}of t)if(E){for(const{imported:C,reexported:R}of[...x||[],...P||[]])if(C==="*"&&R!=="*"){A||g(v,hr,b);break}}else{const C=e(I);let R=!1,F=!1;for(const{imported:B,reexported:N}of[...x||[],...P||[]]){let T,U;B==="default"?R||(R=!0,S!==v&&(U=S,T=Ci[C])):B!=="*"||N==="*"||F||(F=!0,T=dr[C],U=v),T&&g(U,T,b)}}return`${Ra(m,i,a,l,n,s,r)}${f.length>0?`${f.join(d)}${d}${d}`:""}`}function Ad(t,e){return t[0]!=="."?t:e?(n=t).endsWith(".js")?n:n+".js":bd(t);var n}const Cg=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 Ua(t,e){const n=e.map(({importPath:s})=>s).filter(s=>Cg.has(s)||s.startsWith("node:"));n.length!==0&&t(be,function(s){return{code:"MISSING_NODE_BUILTINS",ids:s,message:`Creating a browser bundle that depends on Node.js built-in modules (${cn(s)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const Mi=(t,e)=>t.split(".").map(e).join("");function qa(t,e,n,s,{_:r,getPropertyAccess:i},a){const l=t.split("."),c=l[0]in Object.prototype;a&&c&&a(be,Ph(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+=i(f),`${d}${r}=${r}${d}${r}||${r}{}`)),`${d}${i(u)}`].join(`,${r}`)+`${r}=${r}${s}`;return l.length>0&&(m=`(${m})`),m}function wd(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 $s="_missingExportShim",Tg=({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 r of s)r.reexported!=="*"&&n.add(r.reexported);return n},Rg=(t,e,{_:n,cnst:s,getObject:r,n:i})=>{if(t){const a=[...t].map(l=>[l,"1"]);return a.unshift([null,`__proto__:${n}null`]),`${i}${e}${s} _starExcludes${n}=${n}${r(a,{lineBreakIndent:{base:e,t:e}})};`}return""},Dg=(t,e,{_:n,n:s})=>t.length>0?`${s}${e}var ${t.join(`,${n}`)};`:"",Og=(t,e,n)=>Ha(t.filter(s=>s.hoisted).map(s=>({name:s.exported,value:s.local})),e,n);function Ha(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:r,value:i})=>`${e}${yi(r)}:${n}${i}`).join(`,${s}`)+`${s}});${s}${s}`}const Lg=(t,e,n)=>Ha(t.filter(s=>s.expression).map(s=>({name:s.exported,value:s.local})),e,n),Mg=(t,e,n)=>Ha(t.filter(s=>s.local===$s).map(s=>({name:s.exported,value:$s})),e,n);function Wa(t,e,n){return t?`${e}${Mi(t,n)}`:"null"}var Fg={amd:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasDefaultExport:r,hasExports:i,id:a,indent:l,intro:c,isEntryFacade:u,isModuleFacade:d,namedExportsMode:m,log:f,outro:g,snippets:S},{amd:x,esModule:I,externalLiveBindings:E,freeze:b,generatedCode:{symbols:A},interop:v,reexportProtoFromExternal:P,strict:C}){Ua(f,n);const R=n.map(Y=>`'${Ad(Y.importPath,x.forceJsExtensionForImports)}'`),F=n.map(Y=>Y.name),{n:B,getNonArrowFunctionIntro:N,_:T}=S;i&&(m||s[0]?.local==="exports.default")&&(F.unshift("exports"),R.unshift("'exports'")),e.has("require")&&(F.unshift("require"),R.unshift("'require'")),e.has("module")&&(F.unshift("module"),R.unshift("'module'"));const U=xd(x,a),le=(U?`'${U}',${T}`:"")+(R.length>0?`[${R.join(`,${T}`)}],${T}`:""),X=C?`${T}'use strict';`:"";t.prepend(`${c}${Li(n,v,E,b,A,e,l,S)}`);const q=Di(s,n,m,v,S,l,E,P);let J=Oi(m&&i,u&&(I===!0||I==="if-default-prop"&&r),d&&A,S);J&&(J=B+B+J),t.append(`${q}${J}${g}`).indent(l).prepend(`${x.define}(${le}(${N(F,{isAsync:!1,name:null})}{${X}${B}${B}`).append(`${B}${B}}));`)},cjs:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasDefaultExport:r,hasExports:i,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,outro:m,snippets:f},{compact:g,esModule:S,externalLiveBindings:x,freeze:I,interop:E,generatedCode:{symbols:b},reexportProtoFromExternal:A,strict:v}){const{_:P,n:C}=f,R=v?`'use strict';${C}${C}`:"";let F=Oi(d&&i,c&&(S===!0||S==="if-default-prop"&&r),u&&b,f);F&&(F+=C+C);const B=function(U,{_:le,cnst:X,n:q},J){let Y="",Q=!1;for(const{importPath:de,name:$,reexports:ge,imports:fe}of U)ge||fe?(Y+=J&&Q?",":`${Y?`;${q}`:""}${X} `,Q=!0,Y+=`${$}${le}=${le}require('${de}')`):(Y&&(Y+=J&&!Q?",":`;${q}`),Q=!1,Y+=`require('${de}')`);return Y?`${Y};${q}${q}`:""}(n,f,g),N=Li(n,E,x,I,b,e,a,f);t.prepend(`${R}${l}${F}${B}${N}`);const T=Di(s,n,d,E,f,a,x,A,`module.exports${P}=${P}`);t.append(`${T}${m}`)},es:function(t,{accessedGlobals:e,indent:n,intro:s,outro:r,dependencies:i,exports:a,snippets:l},{externalLiveBindings:c,freeze:u,generatedCode:{symbols:d},importAttributesKey:m}){const{n:f}=l,g=function(x,I,{_:E}){const b=[];for(const{importPath:A,reexports:v,imports:P,name:C,attributes:R}of x){const F=`'${A}'${R?`${E}${I}${E}${R}`:""};`;if(v||P){if(P){let B=null,N=null;const T=[];for(const U of P)U.imported==="default"?B=U:U.imported==="*"?N=U:T.push(U);N&&b.push(`import${E}*${E}as ${N.local} from${E}${F}`),B&&T.length===0?b.push(`import ${B.local} from${E}${F}`):T.length>0&&b.push(`import ${B?`${B.local},${E}`:""}{${E}${T.map(U=>U.imported===U.local?U.imported:`${Es(U.imported)} as ${U.local}`).join(`,${E}`)}${E}}${E}from${E}${F}`)}if(v){let B=null;const N=[],T=[];for(const U of v)U.reexported==="*"?B=U:U.imported==="*"?N.push(U):T.push(U);if(B&&b.push(`export${E}*${E}from${E}${F}`),N.length>0){P&&P.some(U=>U.imported==="*"&&U.local===C)||b.push(`import${E}*${E}as ${C} from${E}${F}`);for(const U of N)b.push(`export${E}{${E}${C===U.reexported?C:`${C} as ${Es(U.reexported)}`} };`)}T.length>0&&b.push(`export${E}{${E}${T.map(U=>U.imported===U.reexported?Es(U.imported):`${Es(U.imported)} as ${Es(U.reexported)}`).join(`,${E}`)}${E}}${E}from${E}${F}`)}}else b.push(`import${E}${F}`)}return b}(i,m,l);g.length>0&&(s+=g.join(f)+f+f),(s+=Ra(null,e,n,l,c,u,d))&&t.prepend(s);const S=function(x,{_:I,cnst:E}){const b=[],A=new Array(x.length);let v=0;for(const P of x)P.expression&&b.push(`${E} ${P.local}${I}=${I}${P.expression};`),A[v++]=P.exported===P.local?P.local:`${P.local} as ${Es(P.exported)}`;return A.length>0&&b.push(`export${I}{${I}${A.join(`,${I}`)}${I}};`),b}(a,l);S.length>0&&t.append(f+f+S.join(f).trim()),r&&t.append(r),t.trim()},iife:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasDefaultExport:r,hasExports:i,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:m},{compact:f,esModule:g,extend:S,freeze:x,externalLiveBindings:I,reexportProtoFromExternal:E,globals:b,interop:A,name:v,generatedCode:{symbols:P},strict:C}){const{_:R,getNonArrowFunctionIntro:F,getPropertyAccess:B,n:N}=m,T=v&&v.includes("."),U=!S&&!T;if(v&&U&&(Th(le=v)||Ch.test(le)))return re(function(pe){return{code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${pe}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:ot("configuration-options/#output-extend")}}(v));var le;Ua(u,n);const X=wd(n),q=X.map(pe=>pe.globalName||"null"),J=X.map(pe=>pe.name);i&&!v&&u(be,{code:mh,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:ot(lh)}),i&&(c||s[0]?.local==="exports.default")&&(S?(q.unshift(`this${Mi(v,B)}${R}=${R}this${Mi(v,B)}${R}||${R}{}`),J.unshift("exports")):(q.unshift("{}"),J.unshift("exports")));const Y=C?`${a}'use strict';${N}`:"",Q=Li(n,A,I,x,P,e,a,m);t.prepend(`${l}${Q}`);let de=`(${F(J,{isAsync:!1,name:null})}{${N}${Y}${N}`;i&&(!v||S&&c||(de=(U?`var ${v}`:`this${Mi(v,B)}`)+`${R}=${R}${de}`),T&&(de=function(pe,M,k,{_:D,getPropertyAccess:O,s:G},Z,oe){const se=pe.split("."),$e=se[0]in Object.prototype;oe&&$e&&oe(be,Ph(se[0])),se[0]=(typeof k=="function"?k(se[0]):$e?se[0]:k[se[0]])||se[0],se.pop();let Ne=M;return se.map(Ae=>(Ne+=O(Ae),`${Ne}${D}=${D}${Ne}${D}||${D}{}${G}`)).join(Z?",":`
|
|
29
|
-
`)+(Z&&se.length>0?";":`
|
|
30
|
-
`)}(v,"this",b,m,f,u)+de));let $=`${N}${N}})(${q.join(`,${R}`)});`;i&&!S&&c&&($=`${N}${N}${a}return exports;${$}`);const ge=Di(s,n,c,A,m,a,I,E);let fe=Oi(c&&i,g===!0||g==="if-default-prop"&&r,P,m);fe&&(fe=N+N+fe),t.append(`${ge}${fe}${d}`).indent(a).prepend(de).append($)},system:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasExports:r,indent:i,intro:a,snippets:l,outro:c,usesTopLevelAwait:u},{externalLiveBindings:d,freeze:m,name:f,generatedCode:{symbols:g},strict:S,systemNullSetters:x}){const{_:I,getFunctionIntro:E,getNonArrowFunctionIntro:b,n:A,s:v}=l,{importBindings:P,setters:C,starExcludes:R}=function(U,le,X,{_:q,cnst:J,getObject:Y,getPropertyAccess:Q,n:de}){const $=[],ge=[];let fe=null;for(const{imports:pe,reexports:M}of U){const k=[];if(pe)for(const D of pe)$.push(D.local),D.imported==="*"?k.push(`${D.local}${q}=${q}module;`):k.push(`${D.local}${q}=${q}module${Q(D.imported)};`);if(M){const D=[];let O=!1;for(const{imported:G,reexported:Z}of M)Z==="*"?O=!0:D.push([Z,G==="*"?"module":`module${Q(G)}`]);if(D.length>1||O)if(O){fe||(fe=Tg({dependencies:U,exports:le})),D.unshift([null,`__proto__:${q}null`]);const G=Y(D,{lineBreakIndent:null});k.push(`${J} setter${q}=${q}${G};`,`for${q}(${J} name in module)${q}{`,`${X}if${q}(!_starExcludes[name])${q}setter[name]${q}=${q}module[name];`,"}","exports(setter);")}else{const G=Y(D,{lineBreakIndent:null});k.push(`exports(${G});`)}else{const[G,Z]=D[0];k.push(`exports(${JSON.stringify(G)},${q}${Z});`)}}ge.push(k.join(`${de}${X}${X}${X}`))}return{importBindings:$,setters:ge,starExcludes:fe}}(n,s,i,l),F=f?`'${f}',${I}`:"",B=e.has("module")?["exports","module"]:r?["exports"]:[];let N=`System.register(${F}[`+n.map(({importPath:U})=>`'${U}'`).join(`,${I}`)+`],${I}(${b(B,{isAsync:!1,name:null})}{${A}${i}${S?"'use strict';":""}`+Rg(R,i,l)+Dg(P,i,l)+`${A}${i}return${I}{${C.length>0?`${A}${i}${i}setters:${I}[${C.map(U=>U?`${E(["module"],{isAsync:!1,name:null})}{${A}${i}${i}${i}${U}${A}${i}${i}}`:x?"null":`${E([],{isAsync:!1,name:null})}{}`).join(`,${I}`)}],`:""}${A}`;N+=`${i}${i}execute:${I}(${b([],{isAsync:u,name:null})}{${A}${A}`;const T=`${i}${i}})${A}${i}}${v}${A}}));`;t.prepend(a+Ra(null,e,i,l,d,m,g)+Og(s,i,l)).append(`${c}${A}${A}`+Lg(s,i,l)+Mg(s,i,l)).indent(`${i}${i}${i}`).append(T).prepend(N)},umd:function(t,{accessedGlobals:e,dependencies:n,exports:s,hasDefaultExport:r,hasExports:i,id:a,indent:l,intro:c,namedExportsMode:u,log:d,outro:m,snippets:f},{amd:g,compact:S,esModule:x,extend:I,externalLiveBindings:E,freeze:b,interop:A,name:v,generatedCode:{symbols:P},globals:C,noConflict:R,reexportProtoFromExternal:F,strict:B}){const{_:N,cnst:T,getFunctionIntro:U,getNonArrowFunctionIntro:le,getPropertyAccess:X,n:q,s:J}=f,Y=S?"f":"factory",Q=S?"g":"global";if(i&&!v)return re({code:mh,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(lh)});Ua(d,n);const de=n.map(K=>`'${Ad(K.importPath,g.forceJsExtensionForImports)}'`),$=n.map(K=>`require('${K.importPath}')`),ge=wd(n),fe=ge.map(K=>Wa(K.globalName,Q,X)),pe=ge.map(K=>K.name);(i||R)&&(u||i&&s[0]?.local==="exports.default")&&(de.unshift("'exports'"),$.unshift("exports"),fe.unshift(qa(v,Q,C,(I?`${Wa(v,Q,X)}${N}||${N}`:"")+"{}",f,d)),pe.unshift("exports"));const M=xd(g,a),k=(M?`'${M}',${N}`:"")+(de.length>0?`[${de.join(`,${N}`)}],${N}`:""),D=g.define,O=!u&&i?`module.exports${N}=${N}`:"",G=B?`${N}'use strict';${q}`:"";let Z;if(R){const K=S?"e":"exports";let Ee;!u&&i?Ee=`${T} ${K}${N}=${N}${qa(v,Q,C,`${Y}(${fe.join(`,${N}`)})`,f,d)};`:Ee=`${T} ${K}${N}=${N}${fe.shift()};${q}${l}${l}${Y}(${[K,...fe].join(`,${N}`)});`,Z=`(${U([],{isAsync:!1,name:null})}{${q}${l}${l}${T} current${N}=${N}${function(Xe,lt,{_:Ye,getPropertyAccess:bn}){let on=lt;return Xe.split(".").map(Zr=>on+=bn(Zr)).join(`${Ye}&&${Ye}`)}(v,Q,f)};${q}${l}${l}${Ee}${q}${l}${l}${K}.noConflict${N}=${N}${U([],{isAsync:!1,name:null})}{${N}${Wa(v,Q,X)}${N}=${N}current;${N}return ${K}${J}${N}};${q}${l}})()`}else Z=`${Y}(${fe.join(`,${N}`)})`,!u&&i&&(Z=qa(v,Q,C,Z,f,d));const oe=i||R&&u||fe.length>0,se=[Y];oe&&se.unshift(Q);const $e=oe?`this,${N}`:"",Ne=oe?`(${Q}${N}=${N}typeof globalThis${N}!==${N}'undefined'${N}?${N}globalThis${N}:${N}${Q}${N}||${N}self,${N}`:"",Ae=oe?")":"",ue=oe?`${l}typeof exports${N}===${N}'object'${N}&&${N}typeof module${N}!==${N}'undefined'${N}?${N}${O}${Y}(${$.join(`,${N}`)})${N}:${q}`:"",Me=`(${le(se,{isAsync:!1,name:null})}{${q}`+ue+`${l}typeof ${D}${N}===${N}'function'${N}&&${N}${D}.amd${N}?${N}${D}(${k}${Y})${N}:${q}${l}${Ne}${Z}${Ae};${q}})(${$e}(${le(pe,{isAsync:!1,name:null})}{${G}${q}`,Ge=q+q+"}));";t.prepend(`${c}${Li(n,A,E,b,P,e,l,f)}`);const te=Di(s,n,u,A,f,l,E,F);let ke=Oi(u&&i,x===!0||x==="if-default-prop"&&r,P,f);ke&&(ke=q+q+ke),t.append(`${te}${ke}${m}`).trim().indent(l).append(Ge).prepend(Me)}};function Bg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ga,Sd,Id,Xa,vd,_d,Pd,$d,Nd,Cd,Td,Rd={};function Fi(){if(Sd)return Ga;Sd=1;const t="\\\\/",e=`[^${t}]`,n="\\.",s="\\/",r="[^/]",i=`(?:${s}|$)`,a=`(?:^|${s})`,l=`${n}{1,2}${i}`,c={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:r,END_ANCHOR:i,DOTS_SLASH:l,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${a}${l})`,NO_DOT_SLASH:`(?!${n}{0,1}${i})`,NO_DOTS_SLASH:`(?!${l})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${r}*?`,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 Ga={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},Ga}function Bi(){return Id||(Id=1,function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:r}=Fi();t.isObject=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),t.hasRegexChars=i=>s.test(i),t.isRegexChar=i=>i.length===1&&t.hasRegexChars(i),t.escapeRegex=i=>i.replace(r,"\\$1"),t.toPosixSlashes=i=>i.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const i=navigator.platform.toLowerCase();return i==="win32"||i==="windows"}return!(typeof process>"u"||!process.platform)&&process.platform==="win32"},t.removeBackslashes=i=>i.replace(n,a=>a==="\\"?"":a),t.escapeLast=(i,a,l)=>{const c=i.lastIndexOf(a,l);return c===-1?i:i[c-1]==="\\"?t.escapeLast(i,a,c-1):`${i.slice(0,c)}\\${i.slice(c)}`},t.removePrefix=(i,a={})=>{let l=i;return l.startsWith("./")&&(l=l.slice(2),a.prefix="./"),l},t.wrapOutput=(i,a={},l={})=>{let c=`${l.contains?"":"^"}(?:${i})${l.contains?"":"$"}`;return a.negated===!0&&(c=`(?:^(?!${c}).*$)`),c},t.basename=(i,{windows:a}={})=>{const l=i.split(a?/[\\/]/:"/"),c=l[l.length-1];return c===""?l[l.length-2]:c}}(Rd)),Rd}function jg(){if(vd)return Xa;vd=1;const t=Bi(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:r,CHAR_DOT:i,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:S,CHAR_RIGHT_SQUARE_BRACKET:x}=Fi(),I=b=>b===l||b===s,E=b=>{b.isPrefix!==!0&&(b.depth=b.isGlobstar?1/0:1)};return Xa=(b,A)=>{const v=A||{},P=b.length-1,C=v.parts===!0||v.scanToEnd===!0,R=[],F=[],B=[];let N,T,U=b,le=-1,X=0,q=0,J=!1,Y=!1,Q=!1,de=!1,$=!1,ge=!1,fe=!1,pe=!1,M=!1,k=!1,D=0,O={value:"",depth:0,isGlob:!1};const G=()=>le>=P,Z=()=>U.charCodeAt(le+1),oe=()=>(N=T,U.charCodeAt(++le));for(;le<P;){let ue;if(T=oe(),T!==s){if(ge===!0||T===c){for(D++;G()!==!0&&(T=oe());)if(T!==s)if(T!==c){if(ge!==!0&&T===i&&(T=oe())===i){if(J=O.isBrace=!0,Q=O.isGlob=!0,k=!0,C===!0)continue;break}if(ge!==!0&&T===r){if(J=O.isBrace=!0,Q=O.isGlob=!0,k=!0,C===!0)continue;break}if(T===g&&(D--,D===0)){ge=!1,J=O.isBrace=!0,k=!0;break}}else D++;else fe=O.backslashes=!0,oe();if(C===!0)continue;break}if(T!==l){if(v.noext!==!0&&(T===m||T===n||T===e||T===f||T===a)&&Z()===u){if(Q=O.isGlob=!0,de=O.isExtglob=!0,k=!0,T===a&&le===X&&(M=!0),C===!0){for(;G()!==!0&&(T=oe());)if(T!==s){if(T===S){Q=O.isGlob=!0,k=!0;break}}else fe=O.backslashes=!0,T=oe();continue}break}if(T===e){if(N===e&&($=O.isGlobstar=!0),Q=O.isGlob=!0,k=!0,C===!0)continue;break}if(T===f){if(Q=O.isGlob=!0,k=!0,C===!0)continue;break}if(T===d){for(;G()!==!0&&(ue=oe());)if(ue!==s){if(ue===x){Y=O.isBracket=!0,Q=O.isGlob=!0,k=!0;break}}else fe=O.backslashes=!0,oe();if(C===!0)continue;break}if(v.nonegate===!0||T!==a||le!==X){if(v.noparen!==!0&&T===u){if(Q=O.isGlob=!0,C===!0){for(;G()!==!0&&(T=oe());)if(T!==u){if(T===S){k=!0;break}}else fe=O.backslashes=!0,T=oe();continue}break}if(Q===!0){if(k=!0,C===!0)continue;break}}else pe=O.negated=!0,X++}else{if(R.push(le),F.push(O),O={value:"",depth:0,isGlob:!1},k===!0)continue;if(N===i&&le===X+1){X+=2;continue}q=le+1}}else fe=O.backslashes=!0,T=oe(),T===c&&(ge=!0)}v.noext===!0&&(de=!1,Q=!1);let se=U,$e="",Ne="";X>0&&($e=U.slice(0,X),U=U.slice(X),q-=X),se&&Q===!0&&q>0?(se=U.slice(0,q),Ne=U.slice(q)):Q===!0?(se="",Ne=U):se=U,se&&se!==""&&se!=="/"&&se!==U&&I(se.charCodeAt(se.length-1))&&(se=se.slice(0,-1)),v.unescape===!0&&(Ne&&(Ne=t.removeBackslashes(Ne)),se&&fe===!0&&(se=t.removeBackslashes(se)));const Ae={prefix:$e,input:b,start:X,base:se,glob:Ne,isBrace:J,isBracket:Y,isGlob:Q,isExtglob:de,isGlobstar:$,negated:pe,negatedExtglob:M};if(v.tokens===!0&&(Ae.maxDepth=0,I(T)||F.push(O),Ae.tokens=F),v.parts===!0||v.tokens===!0){let ue;for(let Me=0;Me<R.length;Me++){const Ge=ue?ue+1:X,te=R[Me],ke=b.slice(Ge,te);v.tokens&&(Me===0&&X!==0?(F[Me].isPrefix=!0,F[Me].value=$e):F[Me].value=ke,E(F[Me]),Ae.maxDepth+=F[Me].depth),Me===0&&ke===""||B.push(ke),ue=te}if(ue&&ue+1<b.length){const Me=b.slice(ue+1);B.push(Me),v.tokens&&(F[F.length-1].value=Me,E(F[F.length-1]),Ae.maxDepth+=F[F.length-1].depth)}Ae.slashes=R,Ae.parts=B}return Ae},Xa}function zg(){if(Pd)return _d;Pd=1;const t=Fi(),e=Bi(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_BACKREF:i,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 S=d.length;if(S>g)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${g}`);const x={type:"bos",value:"",output:f.prepend||""},I=[x],E=f.capture?"":"?:",b=t.globChars(f.windows),A=t.extglobChars(b),{DOT_LITERAL:v,PLUS_LITERAL:P,SLASH_LITERAL:C,ONE_CHAR:R,DOTS_SLASH:F,NO_DOT:B,NO_DOT_SLASH:N,NO_DOTS_SLASH:T,QMARK:U,QMARK_NO_DOT:le,STAR:X,START_ANCHOR:q}=b,J=te=>`(${E}(?:(?!${q}${te.dot?F:v}).)*?)`,Y=f.dot?"":B,Q=f.dot?U:le;let de=f.bash===!0?J(f):X;f.capture&&(de=`(${de})`),typeof f.noext=="boolean"&&(f.noextglob=f.noext);const $={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:I};d=e.removePrefix(d,$),S=d.length;const ge=[],fe=[],pe=[];let M,k=x;const D=()=>$.index===S-1,O=$.peek=(te=1)=>d[$.index+te],G=$.advance=()=>d[++$.index]||"",Z=()=>d.slice($.index+1),oe=(te="",ke=0)=>{$.consumed+=te,$.index+=ke},se=te=>{$.output+=te.output!=null?te.output:te.value,oe(te.value)},$e=()=>{let te=1;for(;O()==="!"&&(O(2)!=="("||O(3)==="?");)G(),$.start++,te++;return te%2!=0&&($.negated=!0,$.start++,!0)},Ne=te=>{$[te]++,pe.push(te)},Ae=te=>{$[te]--,pe.pop()},ue=te=>{if(k.type==="globstar"){const ke=$.braces>0&&(te.type==="comma"||te.type==="brace"),K=te.extglob===!0||ge.length&&(te.type==="pipe"||te.type==="paren");te.type==="slash"||te.type==="paren"||ke||K||($.output=$.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=de,$.output+=k.output)}if(ge.length&&te.type!=="paren"&&(ge[ge.length-1].inner+=te.value),(te.value||te.output)&&se(te),k&&k.type==="text"&&te.type==="text")return k.output=(k.output||k.value)+te.value,void(k.value+=te.value);te.prev=k,I.push(te),k=te},Me=(te,ke)=>{const K={...A[ke],conditions:1,inner:""};K.prev=k,K.parens=$.parens,K.output=$.output;const Ee=(f.capture?"(":"")+K.open;Ne("parens"),ue({type:te,value:ke,output:$.output?"":R}),ue({type:"paren",extglob:!0,value:G(),output:Ee}),ge.push(K)},Ge=te=>{let ke,K=te.close+(f.capture?")":"");if(te.type==="negate"){let Ee=de;if(te.inner&&te.inner.length>1&&te.inner.includes("/")&&(Ee=J(f)),(Ee!==de||D()||/^\)+$/.test(Z()))&&(K=te.close=`)$))${Ee}`),te.inner.includes("*")&&(ke=Z())&&/^\.[^\\/.]+$/.test(ke)){const Xe=u(ke,{...m,fastpaths:!1}).output;K=te.close=`)${Xe})${Ee})`}te.prev.type==="bos"&&($.negatedExtglob=!0)}ue({type:"paren",extglob:!0,value:M,output:K}),Ae("parens")};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(d)){let te=!1,ke=d.replace(i,(K,Ee,Xe,lt,Ye,bn)=>lt==="\\"?(te=!0,K):lt==="?"?Ee?Ee+lt+(Ye?U.repeat(Ye.length):""):bn===0?Q+(Ye?U.repeat(Ye.length):""):U.repeat(Xe.length):lt==="."?v.repeat(Xe.length):lt==="*"?Ee?Ee+lt+(Ye?de:""):de:Ee?K:`\\${K}`);return te===!0&&(ke=f.unescape===!0?ke.replace(/\\/g,""):ke.replace(/\\+/g,K=>K.length%2==0?"\\\\":K?"\\":"")),ke===d&&f.contains===!0?($.output=d,$):($.output=e.wrapOutput(ke,$,m),$)}for(;!D();){if(M=G(),M==="\0")continue;if(M==="\\"){const K=O();if(K==="/"&&f.bash!==!0||K==="."||K===";")continue;if(!K){M+="\\",ue({type:"text",value:M});continue}const Ee=/^\\+/.exec(Z());let Xe=0;if(Ee&&Ee[0].length>2&&(Xe=Ee[0].length,$.index+=Xe,Xe%2!=0&&(M+="\\")),f.unescape===!0?M=G():M+=G(),$.brackets===0){ue({type:"text",value:M});continue}}if($.brackets>0&&(M!=="]"||k.value==="["||k.value==="[^")){if(f.posix!==!1&&M===":"){const K=k.value.slice(1);if(K.includes("[")&&(k.posix=!0,K.includes(":"))){const Ee=k.value.lastIndexOf("["),Xe=k.value.slice(0,Ee),lt=k.value.slice(Ee+2),Ye=s[lt];if(Ye){k.value=Xe+Ye,$.backtrack=!0,G(),x.output||I.indexOf(k)!==1||(x.output=R);continue}}}(M==="["&&O()!==":"||M==="-"&&O()==="]")&&(M=`\\${M}`),M!=="]"||k.value!=="["&&k.value!=="[^"||(M=`\\${M}`),f.posix===!0&&M==="!"&&k.value==="["&&(M="^"),k.value+=M,se({value:M});continue}if($.quotes===1&&M!=='"'){M=e.escapeRegex(M),k.value+=M,se({value:M});continue}if(M==='"'){$.quotes=$.quotes===1?0:1,f.keepQuotes===!0&&ue({type:"text",value:M});continue}if(M==="("){Ne("parens"),ue({type:"paren",value:M});continue}if(M===")"){if($.parens===0&&f.strictBrackets===!0)throw new SyntaxError(c("opening","("));const K=ge[ge.length-1];if(K&&$.parens===K.parens+1){Ge(ge.pop());continue}ue({type:"paren",value:M,output:$.parens?")":"\\)"}),Ae("parens");continue}if(M==="["){if(f.nobracket!==!0&&Z().includes("]"))Ne("brackets");else{if(f.nobracket!==!0&&f.strictBrackets===!0)throw new SyntaxError(c("closing","]"));M=`\\${M}`}ue({type:"bracket",value:M});continue}if(M==="]"){if(f.nobracket===!0||k&&k.type==="bracket"&&k.value.length===1){ue({type:"text",value:M,output:`\\${M}`});continue}if($.brackets===0){if(f.strictBrackets===!0)throw new SyntaxError(c("opening","["));ue({type:"text",value:M,output:`\\${M}`});continue}Ae("brackets");const K=k.value.slice(1);if(k.posix===!0||K[0]!=="^"||K.includes("/")||(M=`/${M}`),k.value+=M,se({value:M}),f.literalBrackets===!1||e.hasRegexChars(K))continue;const Ee=e.escapeRegex(k.value);if($.output=$.output.slice(0,-k.value.length),f.literalBrackets===!0){$.output+=Ee,k.value=Ee;continue}k.value=`(${E}${Ee}|${k.value})`,$.output+=k.value;continue}if(M==="{"&&f.nobrace!==!0){Ne("braces");const K={type:"brace",value:M,output:"(",outputIndex:$.output.length,tokensIndex:$.tokens.length};fe.push(K),ue(K);continue}if(M==="}"){const K=fe[fe.length-1];if(f.nobrace===!0||!K){ue({type:"text",value:M,output:M});continue}let Ee=")";if(K.dots===!0){const Xe=I.slice(),lt=[];for(let Ye=Xe.length-1;Ye>=0&&(I.pop(),Xe[Ye].type!=="brace");Ye--)Xe[Ye].type!=="dots"&<.unshift(Xe[Ye].value);Ee=l(lt,f),$.backtrack=!0}if(K.comma!==!0&&K.dots!==!0){const Xe=$.output.slice(0,K.outputIndex),lt=$.tokens.slice(K.tokensIndex);K.value=K.output="\\{",M=Ee="\\}",$.output=Xe;for(const Ye of lt)$.output+=Ye.output||Ye.value}ue({type:"brace",value:M,output:Ee}),Ae("braces"),fe.pop();continue}if(M==="|"){ge.length>0&&ge[ge.length-1].conditions++,ue({type:"text",value:M});continue}if(M===","){let K=M;const Ee=fe[fe.length-1];Ee&&pe[pe.length-1]==="braces"&&(Ee.comma=!0,K="|"),ue({type:"comma",value:M,output:K});continue}if(M==="/"){if(k.type==="dot"&&$.index===$.start+1){$.start=$.index+1,$.consumed="",$.output="",I.pop(),k=x;continue}ue({type:"slash",value:M,output:C});continue}if(M==="."){if($.braces>0&&k.type==="dot"){k.value==="."&&(k.output=v);const K=fe[fe.length-1];k.type="dots",k.output+=M,k.value+=M,K.dots=!0;continue}if($.braces+$.parens===0&&k.type!=="bos"&&k.type!=="slash"){ue({type:"text",value:M,output:v});continue}ue({type:"dot",value:M,output:v});continue}if(M==="?"){if(!(k&&k.value==="(")&&f.noextglob!==!0&&O()==="("&&O(2)!=="?"){Me("qmark",M);continue}if(k&&k.type==="paren"){const K=O();let Ee=M;(k.value==="("&&!/[!=<:]/.test(K)||K==="<"&&!/<([!=]|\w+>)/.test(Z()))&&(Ee=`\\${M}`),ue({type:"text",value:M,output:Ee});continue}if(f.dot!==!0&&(k.type==="slash"||k.type==="bos")){ue({type:"qmark",value:M,output:le});continue}ue({type:"qmark",value:M,output:U});continue}if(M==="!"){if(f.noextglob!==!0&&O()==="("&&(O(2)!=="?"||!/[!=<:]/.test(O(3)))){Me("negate",M);continue}if(f.nonegate!==!0&&$.index===0){$e();continue}}if(M==="+"){if(f.noextglob!==!0&&O()==="("&&O(2)!=="?"){Me("plus",M);continue}if(k&&k.value==="("||f.regex===!1){ue({type:"plus",value:M,output:P});continue}if(k&&(k.type==="bracket"||k.type==="paren"||k.type==="brace")||$.parens>0){ue({type:"plus",value:M});continue}ue({type:"plus",value:P});continue}if(M==="@"){if(f.noextglob!==!0&&O()==="("&&O(2)!=="?"){ue({type:"at",extglob:!0,value:M,output:""});continue}ue({type:"text",value:M});continue}if(M!=="*"){M!=="$"&&M!=="^"||(M=`\\${M}`);const K=r.exec(Z());K&&(M+=K[0],$.index+=K[0].length),ue({type:"text",value:M});continue}if(k&&(k.type==="globstar"||k.star===!0)){k.type="star",k.star=!0,k.value+=M,k.output=de,$.backtrack=!0,$.globstar=!0,oe(M);continue}let te=Z();if(f.noextglob!==!0&&/^\([^?]/.test(te)){Me("star",M);continue}if(k.type==="star"){if(f.noglobstar===!0){oe(M);continue}const K=k.prev,Ee=K.prev,Xe=K.type==="slash"||K.type==="bos",lt=Ee&&(Ee.type==="star"||Ee.type==="globstar");if(f.bash===!0&&(!Xe||te[0]&&te[0]!=="/")){ue({type:"star",value:M,output:""});continue}const Ye=$.braces>0&&(K.type==="comma"||K.type==="brace"),bn=ge.length&&(K.type==="pipe"||K.type==="paren");if(!Xe&&K.type!=="paren"&&!Ye&&!bn){ue({type:"star",value:M,output:""});continue}for(;te.slice(0,3)==="/**";){const on=d[$.index+4];if(on&&on!=="/")break;te=te.slice(3),oe("/**",3)}if(K.type==="bos"&&D()){k.type="globstar",k.value+=M,k.output=J(f),$.output=k.output,$.globstar=!0,oe(M);continue}if(K.type==="slash"&&K.prev.type!=="bos"&&!lt&&D()){$.output=$.output.slice(0,-(K.output+k.output).length),K.output=`(?:${K.output}`,k.type="globstar",k.output=J(f)+(f.strictSlashes?")":"|$)"),k.value+=M,$.globstar=!0,$.output+=K.output+k.output,oe(M);continue}if(K.type==="slash"&&K.prev.type!=="bos"&&te[0]==="/"){const on=te[1]!==void 0?"|$":"";$.output=$.output.slice(0,-(K.output+k.output).length),K.output=`(?:${K.output}`,k.type="globstar",k.output=`${J(f)}${C}|${C}${on})`,k.value+=M,$.output+=K.output+k.output,$.globstar=!0,oe(M+G()),ue({type:"slash",value:"/",output:""});continue}if(K.type==="bos"&&te[0]==="/"){k.type="globstar",k.value+=M,k.output=`(?:^|${C}|${J(f)}${C})`,$.output=k.output,$.globstar=!0,oe(M+G()),ue({type:"slash",value:"/",output:""});continue}$.output=$.output.slice(0,-k.output.length),k.type="globstar",k.output=J(f),k.value+=M,$.output+=k.output,$.globstar=!0,oe(M);continue}const ke={type:"star",value:M,output:de};f.bash!==!0?!k||k.type!=="bracket"&&k.type!=="paren"||f.regex!==!0?($.index!==$.start&&k.type!=="slash"&&k.type!=="dot"||(k.type==="dot"?($.output+=N,k.output+=N):f.dot===!0?($.output+=T,k.output+=T):($.output+=Y,k.output+=Y),O()!=="*"&&($.output+=R,k.output+=R)),ue(ke)):(ke.output=M,ue(ke)):(ke.output=".*?",k.type!=="bos"&&k.type!=="slash"||(ke.output=Y+ke.output),ue(ke))}for(;$.brackets>0;){if(f.strictBrackets===!0)throw new SyntaxError(c("closing","]"));$.output=e.escapeLast($.output,"["),Ae("brackets")}for(;$.parens>0;){if(f.strictBrackets===!0)throw new SyntaxError(c("closing",")"));$.output=e.escapeLast($.output,"("),Ae("parens")}for(;$.braces>0;){if(f.strictBrackets===!0)throw new SyntaxError(c("closing","}"));$.output=e.escapeLast($.output,"{"),Ae("braces")}if(f.strictSlashes===!0||k.type!=="star"&&k.type!=="bracket"||ue({type:"maybe_slash",value:"",output:`${C}?`}),$.backtrack===!0){$.output="";for(const te of $.tokens)$.output+=te.output!=null?te.output:te.value,te.suffix&&($.output+=te.suffix)}return $};return u.fastpaths=(d,m)=>{const f={...m},g=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n,S=d.length;if(S>g)throw new SyntaxError(`Input length: ${S}, exceeds maximum allowed length: ${g}`);d=a[d]||d;const{DOT_LITERAL:x,SLASH_LITERAL:I,ONE_CHAR:E,DOTS_SLASH:b,NO_DOT:A,NO_DOTS:v,NO_DOTS_SLASH:P,STAR:C,START_ANCHOR:R}=t.globChars(f.windows),F=f.dot?v:A,B=f.dot?P:A,N=f.capture?"":"?:";let T=f.bash===!0?".*?":C;f.capture&&(T=`(${T})`);const U=J=>J.noglobstar===!0?T:`(${N}(?:(?!${R}${J.dot?b:x}).)*?)`,le=J=>{switch(J){case"*":return`${F}${E}${T}`;case".*":return`${x}${E}${T}`;case"*.*":return`${F}${T}${x}${E}${T}`;case"*/*":return`${F}${T}${I}${E}${B}${T}`;case"**":return F+U(f);case"**/*":return`(?:${F}${U(f)}${I})?${B}${E}${T}`;case"**/*.*":return`(?:${F}${U(f)}${I})?${B}${T}${x}${E}${T}`;case"**/.*":return`(?:${F}${U(f)}${I})?${x}${E}${T}`;default:{const Y=/^(.*?)\.(\w+)$/.exec(J);if(!Y)return;const Q=le(Y[1]);return Q?Q+x+Y[2]:void 0}}},X=e.removePrefix(d,{negated:!1,prefix:""});let q=le(X);return q&&f.strictSlashes!==!0&&(q+=`${I}?`),q},_d=u}function Vg(){if(Nd)return $d;Nd=1;const t=jg(),e=zg(),n=Bi(),s=Fi(),r=(i,a,l=!1)=>{if(Array.isArray(i)){const I=i.map(b=>r(b,a,l));return b=>{for(const A of I){const v=A(b);if(v)return v}return!1}}const c=(u=i)&&typeof u=="object"&&!Array.isArray(u)&&i.tokens&&i.input;var u;if(i===""||typeof i!="string"&&!c)throw new TypeError("Expected pattern to be a non-empty string");const d=a||{},m=d.windows,f=c?r.compileRe(i,a):r.makeRe(i,a,!1,!0),g=f.state;delete f.state;let S=()=>!1;if(d.ignore){const I={...a,ignore:null,onMatch:null,onResult:null};S=r(d.ignore,I,l)}const x=(I,E=!1)=>{const{isMatch:b,match:A,output:v}=r.test(I,f,a,{glob:i,posix:m}),P={glob:i,state:g,regex:f,posix:m,input:I,output:v,match:A,isMatch:b};return typeof d.onResult=="function"&&d.onResult(P),b===!1?(P.isMatch=!1,!!E&&P):S(I)?(typeof d.onIgnore=="function"&&d.onIgnore(P),P.isMatch=!1,!!E&&P):(typeof d.onMatch=="function"&&d.onMatch(P),!E||P)};return l&&(x.state=g),x};return r.test=(i,a,l,{glob:c,posix:u}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const d=l||{},m=d.format||(u?n.toPosixSlashes:null);let f=i===c,g=f&&m?m(i):i;return f===!1&&(g=m?m(i):i,f=g===c),f!==!1&&d.capture!==!0||(f=d.matchBase===!0||d.basename===!0?r.matchBase(i,a,l,u):a.exec(g)),{isMatch:!!f,match:f,output:g}},r.matchBase=(i,a,l)=>(a instanceof RegExp?a:r.makeRe(a,l)).test(n.basename(i)),r.isMatch=(i,a,l)=>r(a,l)(i),r.parse=(i,a)=>Array.isArray(i)?i.map(l=>r.parse(l,a)):e(i,{...a,fastpaths:!1}),r.scan=(i,a)=>t(i,a),r.compileRe=(i,a,l=!1,c=!1)=>{if(l===!0)return i.output;const u=a||{},d=u.contains?"":"^",m=u.contains?"":"$";let f=`${d}(?:${i.output})${m}`;i&&i.negated===!0&&(f=`^(?!${f}).*$`);const g=r.toRegex(f,a);return c===!0&&(g.state=i),g},r.makeRe=(i,a={},l=!1,c=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let u={negated:!1,fastpaths:!0};return a.fastpaths===!1||i[0]!=="."&&i[0]!=="*"||(u.output=e.fastpaths(i,a)),u.output||(u=e(i,a)),r.compileRe(u,a,l,c)},r.toRegex=(i,a)=>{try{const l=a||{};return new RegExp(i,l.flags||(l.nocase?"i":""))}catch(l){if(a&&a.debug===!0)throw l;return/$^/}},r.constants=s,$d=r}function Ug(){if(Td)return Cd;Td=1;const t=Vg(),e=Bi();function n(s,r,i=!1){return!r||r.windows!==null&&r.windows!==void 0||(r={...r,windows:e.isWindows()}),t(s,r,i)}return Object.assign(n,t),Cd=n}var qg=Bg(Ug());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)}},Hg=function(t){const e=[];return Ns[t.type](e,t),e};let qe;new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");const gn=new Array(128).fill(void 0);function Qn(t){return gn[t]}gn.push(void 0,null,!0,!1);let mr=gn.length;function Zn(t){mr===gn.length&&gn.push(gn.length+1);const e=mr;return mr=gn[e],gn[e]=t,e}let gr=null;function yr(){return gr!==null&&gr.byteLength!==0||(gr=new Uint8Array(qe.memory.buffer)),gr}let ji=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&ji.decode();let Ka=0;function br(t,e){return function(n,s){return Ka+=s,Ka>=2146435072&&(ji=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}},ji.decode(),Ka=s),ji.decode(yr().subarray(n,n+s))}(t>>>=0,e)}let zi=0;const Vi=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Wg=typeof Vi.encodeInto=="function"?function(t,e){return Vi.encodeInto(t,e)}:function(t,e){const n=Vi.encode(t);return e.set(n),{read:t.length,written:n.length}};function Dd(t,e,n){if(n===void 0){const l=Vi.encode(t),c=e(l.length,1)>>>0;return yr().subarray(c,c+l.length).set(l),zi=l.length,c}let s=t.length,r=e(s,1)>>>0;const i=yr();let a=0;for(;a<s;a++){const l=t.charCodeAt(a);if(l>127)break;i[r+a]=l}if(a!==s){a!==0&&(t=t.slice(a)),r=n(r,s,s=a+3*t.length,1)>>>0;const l=yr().subarray(r+a,r+s);a+=Wg(t,l).written,r=n(r,s,a,1)>>>0}return zi=a,r}let es=null;function Qt(){return(es===null||es.buffer.detached===!0||es.buffer.detached===void 0&&es.buffer!==qe.memory.buffer)&&(es=new DataView(qe.memory.buffer)),es}function Gg(t){const e=Qn(t);return function(n){n<132||(gn[n]=mr,mr=n)}(t),e}function Od(t,e,n){try{const c=qe.__wbindgen_add_to_stack_pointer(-16),u=Dd(t,qe.__wbindgen_export_1,qe.__wbindgen_export_2),d=zi;qe.parse(c,u,d,e,n);var s=Qt().getInt32(c+0,!0),r=Qt().getInt32(c+4,!0),i=(a=s,l=r,a>>>=0,yr().subarray(a/1,a/1+l)).slice();return qe.__wbindgen_export_0(s,1*r,1),i}finally{qe.__wbindgen_add_to_stack_pointer(16)}var a,l}const Xg=new Set(["basic","cors","default"]);async function Ld(t){if(qe!==void 0)return qe;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-9w8E-TmY.wasm",self.location.href));const e=function(){const r={wbg:{}};return r.wbg.__wbg_buffer_a1a27a0dfa70165d=function(i){return Zn(Qn(i).buffer)},r.wbg.__wbg_error_7534b8e9a36f1ab4=function(i,a){let l,c;try{l=i,c=a,console.error(br(i,a))}finally{qe.__wbindgen_export_0(l,c,1)}},r.wbg.__wbg_length_ab6d22b5ead75c72=function(i){return Qn(i).length},r.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Zn(new Error)},r.wbg.__wbg_new_e52b3efaaa774f96=function(i){return Zn(new Uint8Array(Qn(i)))},r.wbg.__wbg_set_fe4e79d1ed3b0e9b=function(i,a,l){Qn(i).set(Qn(a),l>>>0)},r.wbg.__wbg_stack_0ed75d68575b0f3c=function(i,a){const l=Dd(Qn(a).stack,qe.__wbindgen_export_1,qe.__wbindgen_export_2),c=zi;Qt().setInt32(i+4,c,!0),Qt().setInt32(i+0,l,!0)},r.wbg.__wbindgen_memory=function(){return Zn(qe.memory)},r.wbg.__wbindgen_object_drop_ref=function(i){Gg(i)},r.wbg.__wbindgen_throw=function(i,a){throw new Error(br(i,a))},r}();(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(r,i){if(typeof Response=="function"&&r instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(r,i)}catch(l){if(!r.ok||!Xg.has(r.type)||r.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 r.arrayBuffer();return await WebAssembly.instantiate(a,i)}{const a=await WebAssembly.instantiate(r,i);return a instanceof WebAssembly.Instance?{instance:a,module:r}:a}}(await t,e);return function(r,i){return qe=r.exports,Ld.__wbindgen_wasm_module=i,es=null,gr=null,qe}(n,s)}const Kg=[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=Rt(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?{[ws]:s}:{},params:Ve(e[t+4],e),body:H(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:H(e[t+3],e),right:H(e[t+4],e)}},function(t,e){return{type:"AssignmentPattern",start:e[t],end:e[t+1],left:H(e[t+2],e),right:H(e[t+3],e)}},function(t,e){return{type:"AwaitExpression",start:e[t],end:e[t+1],argument:H(e[t+2],e)}},function(t,e){return{type:"BinaryExpression",start:e[t],end:e[t+1],operator:yt[e[t+2]],left:H(e[t+3],e),right:H(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:H(n,e)}},function(t,e){const n=e[t+2],s=Rt(e[t+3],e);return{type:"CallExpression",start:e[t],end:e[t+1],optional:!(1&~n),...s.length>0?{[ws]:s}:{},callee:H(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:H(n,e),body:H(e[t+3],e)}},function(t,e){return{type:"ChainExpression",start:e[t],end:e[t+1],expression:H(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:H(n,e),superClass:s===0?null:H(s,e),body:H(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:H(n,e),superClass:s===0?null:H(s,e),body:H(e[t+5],e)}},function(t,e){return{type:"ConditionalExpression",start:e[t],end:e[t+1],test:H(e[t+2],e),consequent:H(e[t+3],e),alternate:H(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:H(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:H(e[t+2],e)}},function(t,e){return{type:"ExpressionStatement",start:e[t],end:e[t+1],directive:e.convertString(e[t+2]),expression:H(e[t+3],e)}},function(t,e){return{type:"DoWhileStatement",start:e[t],end:e[t+1],body:H(e[t+2],e),test:H(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:H(n,e),source:H(e[t+3],e),attributes:Ve(e[t+4],e)}},function(t,e){return{type:"ExportDefaultDeclaration",start:e[t],end:e[t+1],declaration:H(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:H(n,e),attributes:Ve(e[t+4],e),declaration:s===0?null:H(s,e)}},function(t,e){const n=H(e[t+2],e),s=e[t+3];return{type:"ExportSpecifier",start:e[t],end:e[t+1],local:n,exported:s===0?{...n}:H(s,e)}},function(t,e){return{type:"ExpressionStatement",start:e[t],end:e[t+1],expression:H(e[t+2],e)}},function(t,e){return{type:"ForInStatement",start:e[t],end:e[t+1],left:H(e[t+2],e),right:H(e[t+3],e),body:H(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:H(e[t+3],e),right:H(e[t+4],e),body:H(e[t+5],e)}},function(t,e){const n=e[t+2],s=e[t+3],r=e[t+4];return{type:"ForStatement",start:e[t],end:e[t+1],init:n===0?null:H(n,e),test:s===0?null:H(s,e),update:r===0?null:H(r,e),body:H(e[t+5],e)}},function(t,e){const n=e[t+2],s=Rt(e[t+3],e),r=e[t+4];return{type:"FunctionDeclaration",start:e[t],end:e[t+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[ws]:s}:{},id:r===0?null:H(r,e),params:Ve(e[t+5],e),body:H(e[t+6],e),expression:!1}},function(t,e){const n=e[t+2],s=Rt(e[t+3],e),r=e[t+4];return{type:"FunctionExpression",start:e[t],end:e[t+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[ws]:s}:{},id:r===0?null:H(r,e),params:Ve(e[t+5],e),body:H(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:H(e[t+2],e),consequent:H(e[t+3],e),alternate:n===0?null:H(n,e)}},function(t,e){return{type:"ImportAttribute",start:e[t],end:e[t+1],key:H(e[t+2],e),value:H(e[t+3],e)}},function(t,e){return{type:"ImportDeclaration",start:e[t],end:e[t+1],specifiers:Ve(e[t+2],e),source:H(e[t+3],e),attributes:Ve(e[t+4],e)}},function(t,e){return{type:"ImportDefaultSpecifier",start:e[t],end:e[t+1],local:H(e[t+2],e)}},function(t,e){const n=e[t+3];return{type:"ImportExpression",start:e[t],end:e[t+1],source:H(e[t+2],e),options:n===0?null:H(n,e)}},function(t,e){return{type:"ImportNamespaceSpecifier",start:e[t],end:e[t+1],local:H(e[t+2],e)}},function(t,e){const n=e[t+2],s=H(e[t+3],e);return{type:"ImportSpecifier",start:e[t],end:e[t+1],imported:n===0?{...s}:H(n,e),local:s}},function(t,e){const n=e[t+3];return{type:"JSXAttribute",start:e[t],end:e[t+1],name:H(e[t+2],e),value:n===0?null:H(n,e)}},function(t,e){return{type:"JSXClosingElement",start:e[t],end:e[t+1],name:H(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:H(e[t+2],e),children:Ve(e[t+3],e),closingElement:n===0?null:H(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:H(e[t+2],e)}},function(t,e){return{type:"JSXFragment",start:e[t],end:e[t+1],openingFragment:H(e[t+2],e),children:Ve(e[t+3],e),closingFragment:H(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:H(e[t+2],e),property:H(e[t+3],e)}},function(t,e){return{type:"JSXNamespacedName",start:e[t],end:e[t+1],namespace:H(e[t+2],e),name:H(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:H(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:H(e[t+2],e)}},function(t,e){return{type:"JSXSpreadChild",start:e[t],end:e[t+1],expression:H(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:H(e[t+2],e),body:H(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:H(e[t+3],e),right:H(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:H(e[t+3],e),property:H(e[t+4],e)}},function(t,e){return{type:"MetaProperty",start:e[t],end:e[t+1],meta:H(e[t+2],e),property:H(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:H(e[t+4],e),value:H(e[t+5],e),kind:yt[e[t+6]]}},function(t,e){const n=Rt(e[t+2],e);return{type:"NewExpression",start:e[t],end:e[t+1],...n.length>0?{[ws]:n}:{},callee:H(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=Rt(e[t+3],e);return{type:"Program",start:e[t],end:e[t+1],body:Ve(e[t+2],e),...n.length>0?{[Rh]:n}:{},sourceType:"module"}},function(t,e){const n=e[t+2],s=e[t+3],r=H(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?{...r}:H(s,e),value:r,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:H(e[t+4],e),value:s===0?null:H(s,e)}},function(t,e){return{type:"RestElement",start:e[t],end:e[t+1],argument:H(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:H(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:H(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:H(n,e),consequent:Ve(e[t+3],e)}},function(t,e){return{type:"SwitchStatement",start:e[t],end:e[t+1],discriminant:H(e[t+2],e),cases:Ve(e[t+3],e)}},function(t,e){return{type:"TaggedTemplateExpression",start:e[t],end:e[t+1],tag:H(e[t+2],e),quasi:H(e[t+3],e)}},function(t,e){const n=e[t+2],s=e[t+3],r=s===0?void 0:e.convertString(s),i=e.convertString(e[t+4]);return{type:"TemplateElement",start:e[t],end:e[t+1],tail:!(1&~n),value:{cooked:r,raw:i}}},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:H(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:H(e[t+2],e),handler:n===0?null:H(n,e),finalizer:s===0?null:H(s,e)}},function(t,e){return{type:"UnaryExpression",start:e[t],end:e[t+1],operator:yt[e[t+2]],argument:H(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:H(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:H(e[t+2],e),init:n===0?null:H(n,e)}},function(t,e){return{type:"WhileStatement",start:e[t],end:e[t+1],test:H(e[t+2],e),body:H(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:H(s,e)}}];function H(t,e){const n=e[t],s=Kg[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 r=0;r<n;r++){const i=e[t++];s[r]=i?H(i,e):null}return s}function Md(t){const e=new Uint32Array(t.buffer);let n;if(typeof Buffer<"u"&&t instanceof Buffer)n=s=>{const r=e[s++],i=s<<2;return t.toString("utf8",i,i+r)};else{const s=new TextDecoder;n=r=>{const i=e[r++],a=r<<2;return s.decode(t.subarray(a,a+i))}}return Object.assign(e,{convertString:n})}class Ui extends ee{addExportedVariables(e,n){for(const s of this.elements)s?.addExportedVariables(e,n)}declare(e,n,s){const r=[],i=qi(n);for(const a of this.elements)a!==null&&r.push(...a.declare(e,i,s));return r}deoptimizeAssignment(e,n){const s=qi(e);for(const r of this.elements)r?.deoptimizeAssignment(s,n)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(ae)}hasEffectsWhenDestructuring(e,n,s){const r=qi(n);for(const i of this.elements)if(i?.hasEffectsWhenDestructuring(e,r,s))return!0;return!1}hasEffectsOnInteractionAtPath(e,n,s){for(const r of this.elements)if(r?.hasEffectsOnInteractionAtPath(ae,n,s))return!0;return!1}includeDestructuredIfNecessary(e,n,s){let r=!1;const i=qi(n);for(const a of[...this.elements].reverse())a&&(r&&!a.included&&a.includeNode(e),r=a.includeDestructuredIfNecessary(e,i,s)||r);return!this.included&&r&&this.includeNode(e),this.included}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}Ui.prototype.includeNode=dt;const qi=t=>t.at(-1)===Ie?t:[...t,fs];class xr extends ur{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 nd(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:r,brokenFlow:i}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(s))return!0;s.ignore=r,s.brokenFlow=i}return!1}onlyFunctionCallUsed(){return this.parent.type===Ys&&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 $t([],wn)}}class In extends ee{addExportedVariables(e,n){for(const s of this.properties)s.type===eh?s.value.addExportedVariables(e,n):s.argument.addExportedVariables(e,n)}declare(e,n,s){const r=[];for(const i of this.properties)r.push(...i.declare(e,n,s));return r}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 r of this.properties)if(r.hasEffectsOnInteractionAtPath(ae,n,s))return!0;return!1}hasEffectsWhenDestructuring(e,n,s){for(const r of this.properties)if(r.hasEffectsWhenDestructuring(e,n,s))return!0;return!1}includeDestructuredIfNecessary(e,n,s){if(!this.properties.length)return this.included;const r=this.properties.at(-1);let i=r.includeDestructuredIfNecessary(e,n,s);const a=r.type==="RestElement";for(const l of this.properties.slice(0,-1))a&&i&&!l.included&&l.includeNode(e),i=l.includeDestructuredIfNecessary(e,n,s)||i;return!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}render(e,n){if(this.properties.length>0){const s=ni(this.properties,e,this.start+1,this.end-1);let r=null;for(const{node:i,separator:a,start:l,end:c}of s)i.included?(r=a,i.render(e,n)):ps(i,e,l,c);r&&e.remove(r,this.end-1)}}}In.prototype.includeNode=ze,In.prototype.applyDeoptimizations=Te;class Fd extends ee{constructor(){super(...arguments),this.isConstReassignment=!1}hasEffects(e){const{deoptimized:n,isConstReassignment:s,left:r,operator:i,right:a}=this;return n||this.applyDeoptimizations(),s||a.hasEffects(e)||r.hasEffectsAsAssignmentTarget(e,i!=="=")||this.left.hasEffectsWhenDestructuring?.(e,ae,a)}hasEffectsOnInteractionAtPath(e,n,s){return this.right.hasEffectsOnInteractionAtPath(e,n,s)}include(e,n){const{deoptimized:s,isConstReassignment:r,left:i,right:a,operator:l}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e);const c=ys();(n||r||l!=="="||i.included||i.hasEffectsAsAssignmentTarget(c,!1)||i.hasEffectsWhenDestructuring?.(c,ae,a))&&i.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(be,{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:r,renderedSurroundingElement:i}=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=kn(e.original,ht(e.original,"=",a.end)+1);e.remove(c,m),s&&si(e,m,l.start),l.render(e,n,{renderedParentType:r||d.type,renderedSurroundingElement:i||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?ta(m,c,u,e,n):Gu(m,c,u,d.type!==Gt,e,n))}else{const m=[];if(a.addExportedVariables(m,n.exportNamesByVariable),m.length>0)return void function(f,g,S,x,I,E){const{_:b,getDirectReturnIifeLeft:A}=E.snippets;I.prependRight(g,A(["v"],`${Dn(f,E)},${b}v`,{needsArrowReturnParens:!0,needsWrappedFunction:x})),I.appendLeft(S,")")}(m,c,u,i===Gt,e,n)}a.included&&a instanceof In&&(i===Gt||i===oa)&&(e.appendRight(c,"("),e.prependLeft(u,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(ae,this.right),this.scope.context.requestTreeshakingPass()}}class Bd extends ee{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 r=this.left.includeDestructuredIfNecessary(e,n,s)||this.included;return(r||=this.right.shouldBeIncluded(e))&&(this.right.include(e,!1),this.left.included||(this.left.includeNode(e),this.left.includeDestructuredIfNecessary(e,n,s))),!this.included&&r&&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 Hi extends ee{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise();let e=this.parent;do if(e instanceof _i||e instanceof xr)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(Jg,e)}includePath(e,n){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(n),this.argument.includePath(e,n)}}const Jg=["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,r]=n.split("e"),i=s.split(".")[1]?.length||0,a=`${s.replace(".","")}e${parseInt(r)-i}`,l=String(e).replace("+","");return a.length<l.length?a:l}(t):Ce}const Yg={"!=":(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},zd=Symbol("Unassigned");class Ja extends ee{constructor(){super(...arguments),this.renderedLiteralValue=zd}deoptimizeCache(){this.renderedLiteralValue=Ce}getLiteralValueAtPath(e,n,s){if(e.length>0)return Ce;const r=this.left.getLiteralValueAtPath(ae,n,s);if(typeof r=="symbol")return Ce;if(this.operator==="in"&&this.right.variable instanceof Jn){const[l]=this.right.variable.context.traceExport(String(r));return l instanceof tr||l instanceof Et?Ce:!!l}const i=this.right.getLiteralValueAtPath(ae,n,s);if(typeof i=="symbol")return Ce;const a=Yg[this.operator];return a?a(r,i):Ce}getRenderedLiteralValue(){return this.operator==="in"&&this.right.variable instanceof Jn?this.renderedLiteralValue!==zd?this.renderedLiteralValue:this.renderedLiteralValue=jd(this.getLiteralValueAtPath(ae,He,this)):Ce}hasEffects(e){return this.operator==="+"&&this.parent instanceof Bt&&this.left.getLiteralValueAtPath(ae,He,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))}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 r=this.getRenderedLiteralValue();typeof r!="symbol"?e.overwrite(this.start,this.end,r):(this.left.render(e,n,{renderedSurroundingElement:s}),this.right.render(e,n))}}Ja.prototype.applyDeoptimizations=Te;class Wi extends ee{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 Vd(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 r=0;r<=s;r++)n.arguments[r].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)}}Wi.prototype.includeNode=ze,Wi.prototype.applyDeoptimizations=Te;class Ud extends ee{constructor(){super(...arguments),this.returnExpression=null,this.deoptimizableDependentExpressions=[],this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(e,n,s){const{args:r}=e,[i,a]=this.getReturnExpression(s);if(a)return;const l=r.filter(c=>!!c&&c!==ve);if(l.length!==0)if(i===ve)for(const c of l)c.deoptimizePath(ie);else s.withTrackedEntityAtPath(n,i,()=>{for(const c of l)this.expressionsToBeDeoptimized.add(c);i.deoptimizeArgumentsOnInteractionAtPath(e,n,s)},null)}deoptimizeCache(){if(this.returnExpression?.[0]!==ve){this.returnExpression=it;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=Xu,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[r]=this.getReturnExpression(n);return r===ve?Ce:n.withTrackedEntityAtPath(e,r,()=>(this.deoptimizableDependentExpressions.push(s),r.getLiteralValueAtPath(e,n,s)),Ce)}getReturnExpressionWhenCalledAtPath(e,n,s,r){const i=this.getReturnExpression(s);return i[0]===ve?i:s.withTrackedEntityAtPath(e,i,()=>{this.deoptimizableDependentExpressions.push(r);const[a,l]=i[0].getReturnExpressionWhenCalledAtPath(e,n,s,r);return[a,l||i[1]]},it)}hasEffectsOnInteractionAtPath(e,n,s){const{type:r}=n;if(r===2){const{args:l,withNew:c}=n;if((c?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,l,this))return!1}else if((r===1?s.assigned:s.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[i,a]=this.getReturnExpression();return(r===1||!a)&&i.hasEffectsOnInteractionAtPath(e,n,s)}}class Ya extends Ud{get hasCheckedForWarnings(){return Oe(this.flags,268435456)}set hasCheckedForWarnings(e){this.flags=Le(this.flags,268435456,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 mn&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,n,s){return ud(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===Xt)return Xt;if(this.optional&&this.callee.getLiteralValueAtPath(ae,He,this)==null)return!this.annotationPure&&n||Xt;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===Dh&&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}),Vd(e,n,this),this.callee instanceof Fe&&!this.hasCheckedForWarnings&&(this.hasCheckedForWarnings=!0,this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(be,Eh(this.callee.name),this.start),this.callee.name==="eval"&&this.scope.context.log(be,{code:"EVAL",id:r=this.scope.context.module.id,message:`Use of eval in "${xe(r)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:ot("troubleshooting/#avoiding-eval")},this.start));var r}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,ae,He),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=He){return this.returnExpression===null?(this.returnExpression=it,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(ae,this.interaction,e,this)):this.returnExpression}}class Gi extends ee{createScope(e){this.scope=new td(e,!0)}parseNode(e){const{body:n,param:s,type:r}=e;return this.type=r,s&&(this.param=new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s),this.param.declare("parameter",ae,ve)),this.body=new Wn(this,this.scope.bodyScope).parseNode(n),super.parseNode(e)}}Gi.prototype.preventChildBlockScope=!0,Gi.prototype.includeNode=dt;class Xi extends ee{deoptimizeCache(){}getLiteralValueAtPath(e,n,s){const r=this.expression.getLiteralValueAtPathAsChainElement(e,n,s);return r===Xt?void 0:r}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)}}Xi.prototype.includeNode=ze,Xi.prototype.applyDeoptimizations=Te;class Qg extends vt{constructor(e,n){const{context:s}=e;super(e,s),this.variables.set("this",this.thisVariable=new Dt("this",null,n,ae,s,"other")),this.instanceScope=new vt(this,s),this.instanceScope.variables.set("this",new ed(s))}findLexicalBoundary(){return this}}class Ki extends ee{createScope(e){this.scope=new Qg(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 r of e.body)n[s++]=new(this.scope.context.getNodeConstructor(r.type))(this,r.static?this.scope:this.scope.instanceScope).parseNode(r);return super.parseNode(e)}}Ki.prototype.includeNode=ze,Ki.prototype.applyDeoptimizations=Te;class Ji extends Na{render(e,n,{renderedSurroundingElement:s}=pt){super.render(e,n),s===Gt&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}function Cs(t){return typeof t=="symbol"?t!==oi&&(t===ii||Ce):!!t}class Yi extends Pt{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const n of this.expressions)n.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,n,s,r){return[new Yi(this.expressions.map(i=>i.getReturnExpressionWhenCalledAtPath(e,n,s,r)[0])),!1]}hasEffectsOnInteractionAtPath(e,n,s){for(const r of this.expressions)if(r.hasEffectsOnInteractionAtPath(e,n,s))return!0;return!1}}class Qi extends ee{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,Lt());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 r=this.getUsedBranch();if(!r){if(this.hasDeoptimizedCache)return Ce;const i=this.consequent.getLiteralValueAtPath(e,n,s),a=Cs(i);if(a===Ce)return Ce;const l=this.alternate.getLiteralValueAtPath(e,n,s);return a!==Cs(l)?Ce:(this.expressionsToBeDeoptimized.push(s),i!==l?a?ii:oi:i)}return this.expressionsToBeDeoptimized.push(s),r.getLiteralValueAtPath(e,n,s)}getReturnExpressionWhenCalledAtPath(e,n,s,r){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(r),i.getReturnExpressionWhenCalledAtPath(e,n,s,r)):[new Yi([this.consequent.getReturnExpressionWhenCalledAtPath(e,n,s,r)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,n,s,r)[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 r=this.getUsedBranch();return r?r.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:r,renderedParentType:i,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=kn(e.original,(this.consequent.included?ht(e.original,"?",this.test.end):c)+1);r&&si(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:i||this.parent.type,renderedSurroundingElement:a||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=Cs(this.test.getLiteralValueAtPath(ae,He,this));return typeof e=="symbol"?null:this.usedBranch=e?this.consequent:this.alternate}}Qi.prototype.includeNode=ze,Qi.prototype.applyDeoptimizations=Te;class Zi extends ee{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}}Zi.prototype.includeNode=ze,Zi.prototype.applyDeoptimizations=Te;class Qa extends ee{hasEffects(){return!0}}Qa.prototype.includeNode=dt;class Za extends ee{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(ae,Js,e)}}function eo(t,e){const{brokenFlow:n,hasBreak:s,hasContinue:r,ignore:i}=t,{breaks:a,continues:l}=i;return i.breaks=!0,i.continues=!0,t.hasBreak=!1,t.hasContinue=!1,!!e.hasEffects(t)||(i.breaks=a,i.continues=l,t.hasBreak=s,t.hasContinue=r,t.brokenFlow=n,!1)}function kr(t,e,n){const{brokenFlow:s,hasBreak:r,hasContinue:i}=t;t.hasBreak=!1,t.hasContinue=!1,e.include(t,n,{asSingleStatement:!0}),t.hasBreak=r,t.hasContinue=i,t.brokenFlow=s}Za.prototype.includeNode=dt;class to extends ee{hasEffects(e){return!!this.test.hasEffects(e)||eo(e,this.body)}include(e,n){this.included=!0,this.test.include(e,n),kr(e,this.body,n)}}to.prototype.includeNode=ze,to.prototype.applyDeoptimizations=Te;class el extends ee{hasEffects(){return!1}}el.prototype.includeNode=dt;class Ts extends ee{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,n,s){e.remove(s.start,s.end)}}Ts.prototype.needsBoundaries=!0,Ts.prototype.includeNode=ze,Ts.prototype.applyDeoptimizations=Te;class Er extends ee{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:r,end:i}=s;if(this.declaration===null)e.remove(r,i);else{let a=this.declaration.start;if(this.declaration instanceof _s){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:i,start:r})}}}Er.prototype.needsBoundaries=!0,Er.prototype.includeNode=ze,Er.prototype.applyDeoptimizations=Te;class no extends ee{}no.prototype.includeNode=ze,no.prototype.applyDeoptimizations=Te;class qd extends ee{createScope(e){this.scope=new Hn(e)}hasEffects(e){const{body:n,deoptimized:s,left:r,right:i}=this;return s||this.applyDeoptimizations(),!(!r.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||eo(e,n)}include(e,n){const{body:s,deoptimized:r,left:i,right:a}=this;r||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,n||!0,!1),a.include(e,n),kr(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,Rn),this.right.render(e,n,Rn),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 Hd extends ee{get await(){return Oe(this.flags,131072)}set await(e){this.flags=Le(this.flags,131072,e)}createScope(e){this.scope=new Hn(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,n){const{body:s,deoptimized:r,left:i,right:a}=this;r||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,n||!0,!1),a.include(e,n),kr(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,Rn),this.right.render(e,n,Rn),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 so extends ee{createScope(e){this.scope=new Hn(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||eo(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),kr(e,this.body,n)}render(e,n){this.init?.render(e,n,Rn),this.test?.render(e,n,Rn),this.update?.render(e,n,Rn),this.body.render(e,n)}}so.prototype.includeNode=ze,so.prototype.applyDeoptimizations=Te;class tl extends _i{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===Ys&&this.parent.callee===this&&(this.id===null||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,n,{renderedSurroundingElement:s}=pt){super.render(e,n),s===Gt&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class ro extends Hn{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,n,s,r,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,n,s,r,i)}}const Wd=Symbol("unset");class Rs extends ee{constructor(){super(...arguments),this.testValue=Wd}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 r=e.brokenFlow;return e.brokenFlow=s,this.alternate===null?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&r,!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 ro(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new ro(this.scope)).parseNode(e.alternate)),super.parseNode(e)}render(e,n){const{snippets:{getPropertyAccess:s}}=n,r=this.getTestValue(),i=[],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 r=="symbol"||r)?this.consequent.render(e,n):(e.overwrite(this.consequent.start,this.consequent.end,a?";":""),i.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!l&&typeof r!="symbol"&&r?(a&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),i.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(i,e,s)}getTestValue(){return this.testValue===Wd?this.testValue=Cs(this.test.getLiteralValueAtPath(ae,He,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 r=[...new Set(e.map(i=>{const a=i.variable;return a.included?a.getName(s):""}))].filter(Boolean).join(", ");if(r){const i=this.parent.type,a=i!==ai&&i!=="BlockStatement";n.prependRight(this.start,`${a?"{ ":""}var ${r}; `),a&&n.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Rs&&e.alternate)return!0;if(e instanceof Wn)return!1;e=e.parent}while(e);return!1}}Rs.prototype.includeNode=ze,Rs.prototype.applyDeoptimizations=Te;class Gd extends ee{}class Ar extends ee{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,n,s){e.remove(s.start,s.end)}}Ar.prototype.needsBoundaries=!0,Ar.prototype.includeNode=ze,Ar.prototype.applyDeoptimizations=Te;class wr extends ee{}function Xd(t,e){return t.renderBaseName!==null&&e.has(t)&&t.isReassigned}wr.prototype.includeNode=ze,wr.prototype.applyDeoptimizations=Te;class io extends ee{declareDeclarator(e,n){this.isUsingDeclaration=n,this.id.declare(e,ae,this.init||un)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){const n=this.init?.hasEffects(e);return this.id.markDeclarationReached(),n||this.isUsingDeclaration||this.id.hasEffects(e)||this.scope.context.options.treeshake.propertyReadSideEffects&&this.id.hasEffectsWhenDestructuring(e,ae,this.init||un)}include(e,n){const{id:s,init:r}=this;this.included||this.includeNode(),r?.include(e,n),s.markDeclarationReached(),n?s.include(e,n):s.includeDestructuredIfNecessary(e,ae,r||un)}removeAnnotations(e){this.init?.removeAnnotations(e)}render(e,n){const{exportNamesByVariable:s,snippets:{_:r,getPropertyAccess:i}}=n,{end:a,id:l,init:c,start:u}=this,d=l.included||this.isUsingDeclaration;if(d)l.render(e,n);else{const m=ht(e.original,"=",l.end);e.remove(u,kn(e.original,m+1))}c?(l instanceof Fe&&c instanceof Ji&&!c.id&&l.variable.getName(i)!==l.name&&e.appendLeft(c.start+5,` ${l.name}`),c.render(e,n,d?pt:{renderedSurroundingElement:Gt})):l instanceof Fe&&Xd(l.variable,s)&&e.appendLeft(a,`${r}=${r}void 0`)}includeNode(){this.included=!0;const{id:e,init:n}=this;if(n&&e instanceof Fe&&n instanceof Ji&&!n.id){const{name:s,variable:r}=e;for(const i of n.scope.accessedOutsideVariables.values())i!==r&&i.forbidName(s)}}}function Kd(t){return{fileName:t.getFileName(),...t.getPreRenderedChunkInfo()}}io.prototype.applyDeoptimizations=Te;class nl extends ee{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,536870912)}set shouldIncludeDynamicAttributes(e){this.flags=Le(this.flags,536870912,e)}get withinTopLevelAwait(){return Oe(this.flags,134217728)}set withinTopLevelAwait(e){this.flags=Le(this.flags,134217728,e)}bind(){this.source.bind(),this.options?.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof Bt)return Qe;if(e instanceof Hi){const n=e.parent;if(n instanceof Bt)return Qe;if(n instanceof io){const s=n.id;if(s instanceof Fe)return this.hasUnknownAccessedKey?void 0:[...this.accessedPropKey];if(s instanceof In)return Yd(s)}if(n instanceof mn){const s=n.property;if(!n.computed&&s instanceof Fe)return[s.name]}return}if(e instanceof mn){const n=e.parent,s=e.property;if(!(n instanceof Ya&&s instanceof Fe))return;const r=s.name;if(n.parent instanceof Bt&&["catch","finally"].includes(r))return Qe;if(r!=="then")return;if(n.arguments.length===0)return Qe;const i=n.arguments[0];if(n.arguments.length!==1||!(i instanceof xr||i instanceof tl))return;if(i.params.length===0)return Qe;const a=i.params[0];return i.params.length===1&&a instanceof In?Yd(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);let e=this.parent,n=!1,s=!1;do n&&(e instanceof _i||e instanceof xr)&&(s=!1),e instanceof Hi&&(n=!0,s=!0);while(e=e.parent);n&&s&&(this.withinTopLevelAwait=!0)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,n){const{snippets:{_:s,getDirectReturnFunction:r,getObject:i,getPropertyAccess:a},importAttributesKey:l}=n;if(this.inlineNamespace){const[c,u]=r([],{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]=r(["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}${i([[l,this.attributes]],{lineBreakIndent:null})}`))}setExternalResolution(e,n,s,r,i,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=[...Zg[f]||[]];let S;({helper:S,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(n,e,s,r,i,d,m)),S&&g.push(S),g.length>0&&this.scope.addAccessedGlobals(g,a)}setInternalResolution(e){this.inlineNamespace=e}getDynamicImportMechanismAndHelper(e,n,{compact:s,dynamicImportInCjs:r,format:i,generatedCode:{arrowFunctions:a},interop:l},{_:c,getDirectReturnFunction:u,getDirectReturnIifeLeft:d},m,f,g){const S=m.hookFirstSync("renderDynamicImport",[{chunk:Kd(f),customResolution:typeof this.resolution=="string"?this.resolution:null,format:i,getTargetChunkImports(){if(g===null)return null;const I=[],E=f.getFileName();for(const b of g.dependencies){const A=`'${b.getImportPath(E)}'`;b instanceof Yn?I.push({fileName:b.getFileName(),resolvedImportPath:A,type:"external"}):I.push({chunk:b.getPreRenderedChunkInfo(),fileName:b.getFileName(),resolvedImportPath:A,type:"internal"})}return I},moduleId:this.scope.context.module.id,targetChunk:g?Kd(g):null,targetModuleId:this.resolution&&typeof this.resolution!="string"?this.resolution.id:null}]);if(S)return{helper:null,mechanism:S};const x=!this.resolution||typeof this.resolution=="string";switch(i){case"cjs":{if(r&&(!e||typeof e=="string"||e instanceof Ze))return{helper:null,mechanism:null};const I=Jd(e,n,l);let E="require(",b=")";I&&(E=`/*#__PURE__*/${I}(${E}`,b+=")");const[A,v]=u([],{functionReturn:!0,lineBreakIndent:null,name:null});return E=`Promise.resolve().then(${A}${E}`,b+=`${v})`,!a&&x&&(E=d(["t"],`${E}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:I,mechanism:{left:E,right:b}}}case"amd":{const I=s?"c":"resolve",E=s?"e":"reject",b=Jd(e,n,l),[A,v]=u(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),P=b?`${A}${I}(/*#__PURE__*/${b}(m))${v}`:I,[C,R]=u([I,E],{functionReturn:!1,lineBreakIndent:null,name:null});let F=`new Promise(${C}require([`,B=`],${c}${P},${c}${E})${R})`;return!a&&x&&(F=d(["t"],`${F}t${B}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),B=")"),{helper:b,mechanism:{left:F,right:B}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function Jd(t,e,n){return e==="external"?dr[n(t instanceof Ze?t.id:null)]:e==="default"?hr:null}nl.prototype.applyDeoptimizations=Te;const Zg={amd:["require"],cjs:["require"],system:["module"]};function Yd(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 Sr extends ee{}Sr.prototype.includeNode=ze,Sr.prototype.applyDeoptimizations=Te;class oo extends ee{}oo.prototype.includeNode=ze,oo.prototype.applyDeoptimizations=Te;class sl extends Gh{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 r=this.variable.getName(n,s);r!==this.name&&e.overwrite(this.start,this.end,r,{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 ao extends ee{render(e,n,{jsxMode:s}=pt){if(super.render(e,n),["classic","automatic"].includes(s)){const{name:r,value:i}=this,a=r instanceof sl?r.name:`${r.namespace.name}:${r.name.name}`;if(s!=="automatic"||a!=="key"){const l=yi(a);a!==l&&e.overwrite(r.start,r.end,l,{contentOnly:!0}),i?(e.overwrite(r.end,i.start,": ",{contentOnly:!0}),i instanceof kt&&typeof i.value=="string"&&i.value.includes(`
|
|
31
|
-
`)&&e.overwrite(i.start,i.end,JSON.stringify(i.value),{contentOnly:!0})):e.appendLeft(r.end,": true")}}}}ao.prototype.includeNode=dt;class rl extends ee{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)}}rl.prototype.includeNode=dt;class Qd extends rl{}class Zd extends rl{}class lo extends ee{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 Ir extends ee{}Ir.prototype.includeNode=dt;class co extends ee{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 ey=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,ty=/[ \t]*\r?\n[ \t\r\n]*/g;class vr extends ee{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(ey,"").replace(ty," ")),this.renderedText}}function ny(t){let e=0;for(const n of t)n instanceof co&&n.expression instanceof Ir||n instanceof vr&&!n.shouldRender()||e++;return e}function il(t,e,n,s,r){const[i,a]=t.split(".");let l;return n?(l=s.scope.context.getImportedJsxFactoryVariable(a?"default":i,s.start,n),e&&(s.scope.findGlobal(i).includePath(ie,r),l.globalName=i)):l=s.scope.findGlobal(i),s.scope.context.includeVariableInModule(l,ie,r),l instanceof Dt&&(l.consolidateInitializers(),l.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),l}vr.prototype.includeNode=dt;class ol extends ee{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:r}=this.jsxMode;n&&(this.factory=n,this.factoryVariable=il(n,r==="preserve",s,this,e))}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:n,factory:s,importSource:r}=e;return n==="automatic"?{factory:ny(this.children)>1?"jsxs":"jsx",importSource:e.jsxImportSource,mode:n}:{factory:s,importSource:r,mode:n}}renderChildren(e,n,s){const{children:r}=this;let i=!1,a=s,l=null;for(const c of r)c instanceof co&&c.expression instanceof Ir||c instanceof vr&&!c.shouldRender()?e.remove(a,c.end):(e.appendLeft(a,", "),c.render(e,n),l?i=!0:l=c),a=c.end;return{childrenEnd:a,firstChild:l,hasMultipleChildren:i}}}ol.prototype.applyDeoptimizations=Te;class ep extends ol{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:r}=e;if(n==="automatic"){let i=!1;for(const a of this.openingElement.attributes)if(a instanceof lo)i=!0;else if(i&&a.name.name==="key")return{factory:s,importSource:r,mode:"classic"}}return super.getRenderingMode()}renderClassicMode(e,n){const{snippets:{getPropertyAccess:s},useOriginalName:r}=n,{closingElement:i,end:a,factory:l,factoryVariable:c,openingElement:{end:u,selfClosing:d}}=this,[,...m]=l.split("."),{firstAttribute:f,hasAttributes:g,hasSpread:S,inObject:x,previousEnd:I}=this.renderAttributes(e,n,[c.getName(s,r),...m].join("."),!1);this.wrapAttributes(e,x,g,S,f,"null",I),this.renderChildren(e,n,u),d?e.appendLeft(a,")"):i.render(e,n)}renderAutomaticMode(e,n){const{snippets:{getPropertyAccess:s},useOriginalName:r}=n,{closingElement:i,end:a,factoryVariable:l,openingElement:{end:c,selfClosing:u}}=this;let{firstAttribute:d,hasAttributes:m,hasSpread:f,inObject:g,keyAttribute:S,previousEnd:x}=this.renderAttributes(e,n,l.getName(s,r),!0);const{firstChild:I,hasMultipleChildren:E,childrenEnd:b}=this.renderChildren(e,n,c);if(I&&(e.prependRight(I.start,"children: "+(E?"[":"")),g||(e.prependRight(I.start,"{ "),g=!0),x=i.start,E&&e.appendLeft(x,"]")),this.wrapAttributes(e,g,m||!!I,f,d||I,"{}",b),S){const{value:A}=S;e.appendLeft(b,", "),A?e.move(A.start,A.end,b):e.appendLeft(b,"true")}u?e.appendLeft(S?.value?.end||a,")"):i.render(e,n)}renderAttributes(e,n,s,r){const{jsxMode:{mode:i},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:i});let f=null,g=!1,S=!1,x=m,I=!1,E=null;for(const b of l){if(b instanceof ao){if(r&&b.name.name==="key"){f=b,e.remove(x,b.value?.start||b.end);continue}e.appendLeft(x,","),S||(e.prependRight(b.start,"{ "),S=!0),I=!0}else S?(I&&e.appendLeft(x," "),e.appendLeft(x,"},"),S=!1):e.appendLeft(x,","),g=!0;x=b.end,E||(E=b)}return e.remove(l.at(-1)?.end||x,c),{firstAttribute:E,hasAttributes:I,hasSpread:g,inObject:S,keyAttribute:f,previousEnd:x}}wrapAttributes(e,n,s,r,i,a,l){if(n&&e.appendLeft(l," }"),r){if(s){const{start:c}=i;i instanceof lo&&e.prependRight(c,"{}, "),e.prependRight(c,"Object.assign("),e.appendLeft(l,")")}}else s||e.appendLeft(l,`, ${a}`)}}class tp extends ol{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:r}=n,{closingFragment:i,factory:a,factoryVariable:l,openingFragment:c,start:u}=this,[,...d]=a.split(".");c.render(e,n),e.prependRight(u,`/*#__PURE__*/${[l.getName(s,r),...d].join(".")}(`),e.appendLeft(c.end,", null"),this.renderChildren(e,n,c.end),i.render(e,n)}renderAutomaticMode(e,n){const{snippets:{getPropertyAccess:s},useOriginalName:r}=n,{closingFragment:i,factoryVariable:a,openingFragment:l,start:c}=this;l.render(e,n),e.prependRight(c,`/*#__PURE__*/${a.getName(s,r)}(`);const{firstChild:u,hasMultipleChildren:d,childrenEnd:m}=this.renderChildren(e,n,l.end);u?(e.prependRight(u.start,"{ children: "+(d?"[":"")),d&&e.appendLeft(i.start,"]"),e.appendLeft(m," }")):e.appendLeft(l.end,", {}"),i.render(e,n)}}class np extends ee{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 al extends ee{}al.prototype.includeNode=dt;class ll extends ee{render(e,n,{jsxMode:s=this.scope.context.options.jsx.mode}={}){this.name.render(e,n);for(const r of this.attributes)r.render(e,n,{jsxMode:s})}}ll.prototype.includeNode=dt;class sp extends ee{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=il("Fragment",!1,n.jsxImportSource,this,e);else{const{fragment:s,importSource:r,mode:i}=n;s!=null&&(this.fragment=s,this.fragmentVariable=il(s,i==="preserve",r,this,e))}}render(e,n){const{mode:s}=this.scope.context.options.jsx;if(s!=="preserve"){const{snippets:{getPropertyAccess:r},useOriginalName:i}=n,[,...a]=this.fragment.split("."),l=[this.fragmentVariable.getName(r,i),...a].join(".");e.update(this.start,this.end,l)}}}class rp extends ee{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 cl extends ee{hasEffects(e){const{brokenFlow:n,includedLabels:s}=e;e.ignore.labels.add(this.label.name),e.includedLabels=new Set;let r=!1;return this.body.hasEffects(e)?r=!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]),r}include(e,n){this.included||this.includeNode(e);const{brokenFlow:s,includedLabels:r}=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([...r,...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,kn(e.original,ht(e.original,":",this.label.end)+1)),this.body.render(e,n)}}cl.prototype.applyDeoptimizations=Te;class uo extends ee{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,Lt())}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 r=this.getUsedBranch();if(r)return this.expressionsToBeDeoptimized.push(s),r.getLiteralValueAtPath(e,n,s);if(!this.hasDeoptimizedCache&&!e.length){const i=Cs(this.right.getLiteralValueAtPath(e,n,s));if(typeof i!="symbol"){if(!i&&this.operator==="&&")return this.expressionsToBeDeoptimized.push(s),oi;if(i&&this.operator==="||")return this.expressionsToBeDeoptimized.push(s),ii}}return Ce}getReturnExpressionWhenCalledAtPath(e,n,s,r){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(r),i.getReturnExpressionWhenCalledAtPath(e,n,s,r)):[new Yi([this.left.getReturnExpressionWhenCalledAtPath(e,n,s,r)[0],this.right.getReturnExpressionWhenCalledAtPath(e,n,s,r)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,n,s){const r=this.getUsedBranch();return r?r.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:r,renderedParentType:i,renderedSurroundingElement:a}=pt){if(this.left.included&&this.right.included)this.left.render(e,n,{preventASI:r,renderedSurroundingElement:a}),this.right.render(e,n);else{const l=ht(e.original,this.operator,this.left.end);if(this.right.included){const c=kn(e.original,l+2);e.remove(this.start,c),r&&si(e,c,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(c,u,d){for(;;){if(u>=d||!Pm.test(c[d-1]))return d;d--}}(e.original,this.left.end,l),this.end);this.getUsedBranch().render(e,n,{isCalleeOfRenderedParent:s,preventASI:r,renderedParentType:i||this.parent.type,renderedSurroundingElement:a||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(ae,He,this),n=Cs(e);if(typeof n=="symbol")return null;this.usedBranch=this.operator==="||"&&n||this.operator==="&&"&&!n||this.operator==="??"&&e!=null?this.left:this.right}return this.usedBranch}}uo.prototype.includeNode=ze,uo.prototype.applyDeoptimizations=Te;class ip extends ee{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),Vd(e,n,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,ae,He),this.scope.context.requestTreeshakingPass()}}class Ds extends ee{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,r){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,n,s,r)}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!==Gt&&s!==oa||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const r=ni(this.properties,e,this.start+1,this.end-1);let i=null;for(const{node:a,separator:l,start:c,end:u}of r)a.included?(i=l,a.render(e,n)):ps(a,e,c,u);i&&e.remove(i,this.end-1)}}getObjectEntity(){if(this.objectEntity!==null)return this.objectEntity;let e=wn;const n=[];for(const s of this.properties){if(s instanceof Un){n.push({key:Ie,kind:"init",property:s});continue}let r;if(s.computed){const i=s.key.getLiteralValueAtPath(ae,He,this);if(typeof i=="symbol"){n.push({key:Ie,kind:s.kind,property:s});continue}r=String(i)}else if(r=s.key instanceof Fe?s.key.name:String(s.key.value),r==="__proto__"&&s.kind==="init"){this.protoProp=s,e=s.value instanceof kt&&s.value.value===null?null:s.value;continue}n.push({key:r,kind:s.kind,property:s})}return this.objectEntity=new $t(n,e)}}Ds.prototype.applyDeoptimizations=Te;class op extends ee{initialise(){const e=this.scope.context.module.id;return re(fa(xs(pi(this.message)),e))}}class ap extends ee{initialise(){const e=this.start,n=this.scope.context.module.id,s=fa(xs(pi(this.message,e)),n);this.scope.context.error(s,e)}}class ul extends ee{}ul.prototype.includeNode=dt;class ho extends ee{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(this.hasCachedEffect===null?this.hasCachedEffect=this.hasEffects(ys()):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:r,module:i}=this.scope.context;r(Mn,Um(s,i.id,la(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(be,qm(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 r=Xs(e.original.slice(s,this.body[0].start));if(r[0]===-1)break;s+=r[1]}Ks(this.body,e,s,this.end,n)}else super.render(e,n)}}ho.prototype.includeNode=ze,ho.prototype.applyDeoptimizations=Te;class _r extends wi{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 r=this.getPathInProperty(n);let i=this.value.includeDestructuredIfNecessary(e,r,s)||this.included;return(i||=this.key.hasEffects(ys()))&&(this.key.include(e,!1),this.value.included||(this.value.includeNode(e),this.value.includeDestructuredIfNecessary(e,r,s))),!this.included&&i&&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)]}}_r.prototype.includeNode=ze,_r.prototype.applyDeoptimizations=Te;class hl extends ee{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,r){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,n,s,r):it}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||$a(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)}}hl.prototype.applyDeoptimizations=Te;class dl extends ee{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," "))}}dl.prototype.applyDeoptimizations=Te;class po extends ee{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 r of this.expressions)(n||r===s&&!(this.parent instanceof Bt)||r.shouldBeIncluded(e))&&r.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:r,preventASI:i}=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 ni(this.expressions,e,this.start,this.end))if(u.included)if(a++,l=d,a===1&&i&&si(e,m,u.start),a===1){const g=s||this.parent.type;u.render(e,n,{isCalleeOfRenderedParent:r&&u===c,renderedParentType:g,renderedSurroundingElement:g})}else u.render(e,n);else ps(u,e,m,f);l&&e.remove(l,this.end)}}po.prototype.includeNode=ze,po.prototype.applyDeoptimizations=Te;class lp extends ee{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 Pr extends ee{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 r=this.test?this.test.end:ht(e.original,"default",this.start)+7,i=ht(e.original,":",r)+1;Ks(this.consequent,e,i,s.end,n)}}}Pr.prototype.needsBoundaries=!0,Pr.prototype.includeNode=ze,Pr.prototype.applyDeoptimizations=Te;class fo extends ee{createScope(e){this.parentScope=e,this.scope=new Hn(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:n,hasBreak:s,ignore:r}=e,{breaks:i}=r;r.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),r.breaks=i,e.hasBreak=s,!1}include(e,n){this.included=!0,this.discriminant.include(e,n);const{brokenFlow:s,hasBreak:r}=e;e.hasBreak=!1;let i=!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=ys();u.ignore.breaks=!0,a=c.hasEffects(u)}a?(c.include(e,n),i&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=s):i=s}a&&this.defaultCase!==null&&(e.brokenFlow=i),e.hasBreak=r}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&&Ks(this.cases,e,this.cases[0].start,this.end-1,n)}}fo.prototype.includeNode=ze,fo.prototype.applyDeoptimizations=Te;class pl extends Ud{get hasCheckedForWarnings(){return Oe(this.flags,268435456)}set hasCheckedForWarnings(e){this.flags=Le(this.flags,268435456,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 mn&&!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===aa){this.hasCheckedForWarnings=!0;const s=this.tag.name;this.scope.findVariable(s).isNamespace&&this.scope.context.log(be,Eh(s),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,ae,He),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=He){return this.returnExpression===null?(this.returnExpression=it,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(ae,this.interaction,e,this)):this.returnExpression}}pl.prototype.includeNode=dt;class fl extends ee{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(){}}fl.prototype.includeNode=dt;class cp extends ee{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||this.quasis.length!==1?Ce:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return e.length!==1?it:ir(sr,e[0])}hasEffectsOnInteractionAtPath(e,n,s){return n.type===0?e.length>1:n.type!==2||e.length!==1||rr(sr,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 up extends vt{constructor(e,n){super(e,n),this.variables.set("this",new Dt("this",null,un,ae,n,"other"))}addDeclaration(e,n,s,r,i){return this.context.module.importDescriptions.has(e.name)&&n.error(ks(e.name),e.start),super.addDeclaration(e,n,s,r,i)}addExportDefaultDeclaration(e,n,s){const r=new Yt(e,n,s);return this.variables.set("default",r),r}addNamespaceMemberAccess(){}deconflict(e,n,s){for(const r of this.children)r.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 Pa&&this.accessedOutsideVariables.set(e,s),s}}class hp extends ee{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(r,i){for(;!(r instanceof sd&&r.thisVariable===i);){if(!(r instanceof vt))return null;r=r.parent}return r}(this.scope,this.variable);s&&s.functionNode.parent instanceof _r&&s.functionNode.parent.parent instanceof Ds&&s.functionNode.parent.parent.includePath(e,n)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof up?this.scope.context.moduleContext:null,this.alias==="undefined"&&this.scope.context.log(be,{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 dp extends ee{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 mo extends ee{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:r,includedLabels:i}=e;if(this.directlyIncluded&&s){if(this.includedLabelsAfterBlock)for(const a of this.includedLabelsAfterBlock)i.add(a)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,s?Dh:n),i.size>0&&(this.includedLabelsAfterBlock=[...i]),e.brokenFlow=r;this.handler!==null&&(this.handler.include(e,n),e.brokenFlow=r),this.finalizer?.include(e,n)}}mo.prototype.includeNode=ze,mo.prototype.applyDeoptimizations=Te;const sy={"!":t=>!t,"+":t=>+t,"-":t=>-t,delete:()=>Ce,typeof:t=>typeof t,void:()=>{},"~":t=>~t},pp=Symbol("Unassigned");class ml extends ee{constructor(){super(...arguments),this.renderedLiteralValue=pp}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 r=this.argument.getLiteralValueAtPath(ae,n,s);if(typeof r=="symbol"){if(this.operator==="void")return;if(this.operator==="!"){if(r===oi)return!0;if(r===ii)return!1}return Ce}return sy[this.operator](r)}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,ia,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!==pp?this.renderedLiteralValue:this.renderedLiteralValue=e?Ce:jd(this.getLiteralValueAtPath(ae,He,this))}include(e,n,s){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const r=this.argument instanceof Fe&&this.argument.variable?.included;(typeof this.getRenderedLiteralValue(n)=="symbol"||this.argument.shouldBeIncluded(e)||r)&&(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;ry.test(e.original[this.start-1])||(s=` ${s}`),e.overwrite(this.start,this.end,s)}}}const ry=/[\s([=%&*+-/<>^|,?:;]/;ml.prototype.includeNode=dt;class gl extends ee{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:r,snippets:{_:i}}=n;if(this.argument.render(e,n),r==="system"){const a=this.argument.variable,l=s.get(a);if(l)if(this.prefix)l.length===1?ta(a,this.start,this.end,e,n):Gu(a,this.start,this.end,this.parent.type!==Gt,e,n);else{const c=this.operator[0];(function(u,d,m,f,g,S,x){const{_:I}=S.snippets;g.prependRight(d,`${Dn([u],S,x)},${I}`),f&&(g.prependRight(d,"("),g.appendLeft(m,")"))})(a,this.start,this.end,this.parent.type!==Gt,e,n,`${i}${c}${i}1`)}}}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath(ae),this.argument instanceof Fe&&this.scope.findVariable(this.argument.name).markReassigned(),this.scope.context.requestTreeshakingPass()}}gl.prototype.includeNode=dt;class $r extends ee{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(ae)}hasEffectsOnInteractionAtPath(){return!1}include(e,n,{asSingleStatement:s}=pt){this.included=!0;for(const r of this.declarations){(n||r.shouldBeIncluded(e))&&r.include(e,n);const{id:i,init:a}=r;s&&i.include(e,n),a&&i.included&&!a.included&&(i instanceof In||i instanceof Ui)&&a.include(e,n)}}initialise(){super.initialise(),this.isUsingDeclaration=this.kind==="await using"||this.kind==="using";for(const e of this.declarations)e.declareDeclarator(this.kind,this.isUsingDeclaration)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,n,s=pt){if(this.isUsingDeclaration||function(r,i){for(const a of r){if(!a.id.included)return!1;if(a.id.type===aa){if(i.has(a.id.variable))return!1}else{const l=[];if(a.id.addExportedVariables(l,i),l.length>0)return!1}}return!0}(this.declarations,n.exportNamesByVariable)){for(const r of this.declarations)r.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,r,i,a,l){e.original.charCodeAt(this.end-1)===59&&e.remove(this.end-1,this.end),n+=";",s===null?e.appendLeft(i,n):(e.original.charCodeAt(r-1)!==10||e.original.charCodeAt(this.end)!==10&&e.original.charCodeAt(this.end)!==13||(r--,e.original.charCodeAt(r)===13&&r--),r===s+1?e.overwrite(s,i,n):(e.overwrite(s,s+1,n),e.remove(r,i))),a.length>0&&e.appendLeft(i,` ${Dn(a,l)};`)}renderReplacedDeclarations(e,n){const s=ni(this.declarations,e,this.start+this.kind.length,this.end-(e.original.charCodeAt(this.end-1)===59?1:0));let r,i;i=kn(e.original,this.start+this.kind.length);let a=i-1;e.remove(this.start,a);let l,c=!1,u=!1,d="";const m=[],f=function(g,S,x){let I=null;if(S.format==="system"){for(const{node:E}of g)E.id instanceof Fe&&E.init&&x.length===0&&S.exportNamesByVariable.get(E.id.variable)?.length===1?(I=E.id.variable,x.push(I)):E.id.addExportedVariables(x,S.exportNamesByVariable);x.length>1?I=null:I&&(x.length=0)}return I}(s,n,m);for(const{node:g,start:S,separator:x,contentEnd:I,end:E}of s)if(g.included){if(g.render(e,n),l="",!g.id.included||g.id instanceof Fe&&Xd(g.id.variable,n.exportNamesByVariable))u&&(d+=";"),c=!1;else{if(f&&f===g.id.variable){const b=ht(e.original,"=",g.id.end);ta(f,kn(e.original,b+1),x===null?I:x,e,n)}c?d+=",":(u&&(d+=";"),l+=`${this.kind} `,c=!0)}i===a+1?e.overwrite(a,i,d+l):(e.overwrite(a,a+1,d),e.appendLeft(i,l)),r=I,i=E,u=!0,a=x,d=""}else ps(g,e,S,E);this.renderDeclarationEnd(e,d,a,r,i,m,n)}}$r.prototype.includeNode=ze,$r.prototype.applyDeoptimizations=Te;class go extends ee{hasEffects(e){return!!this.test.hasEffects(e)||eo(e,this.body)}include(e,n){this.included=!0,this.test.include(e,n),kr(e,this.body,n)}}go.prototype.includeNode=ze,go.prototype.applyDeoptimizations=Te;class fp extends ee{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 iy=["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"],oy=[op,ap,Sa,Ui,xr,Fd,Bd,Hi,Ja,Wn,Wi,Ya,Gi,Xi,Ki,_s,Ji,Qi,Zi,Qa,Za,Bt,to,el,Ts,Xn,Er,no,Bt,qd,Hd,so,Ps,tl,Fe,Rs,Gd,Ar,wr,nl,Sr,oo,ao,Qd,Zd,ep,Ir,co,tp,sl,np,al,ll,sp,lo,rp,vr,cl,kt,kt,kt,kt,kt,kt,uo,mn,pd,Si,ip,Ds,In,ul,ho,_r,hl,Gn,dl,po,Un,Ii,lp,Pr,fo,pl,fl,cp,hp,dp,mo,ml,gl,$r,io,go,fp],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,r=n[e];t.async=!(1&~r),t.expression=!(2&~r),t.generator=!(4&~r);const i=t.annotations=Rt(n[e+1],n);t.annotationNoSideEffects=i.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 Gn),t.body=W(t,s.bodyScope,n[e+3],n)},function(t,e,n){const{scope:s}=t;t.operator=yt[n[e]],t.left=W(t,s,n[e+1],n),t.right=W(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t;t.left=W(t,s,n[e],n),t.right=W(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.argument=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.operator=yt[n[e]],t.left=W(t,s,n[e+1],n),t.right=W(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,r=n[e];t.label=r===0?null:W(t,s,r,n)},function(t,e,n){const{scope:s}=t,r=n[e];t.optional=!(1&~r),t.annotations=Rt(n[e+1],n),t.callee=W(t,s,n[e+2],n),t.arguments=Ue(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t,r=n[e];(t.param=r===0?null:W(t,s,r,n))?.declare("parameter",ae,ve),t.body=W(t,s.bodyScope,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.expression=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t,r=n[e];if(r){const i=n[r],a=t.body=new Array(i);for(let l=0;l<i;l++){const c=n[r+1+l];a[l]=W(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 r=n[e+1];t.id=r===0?null:W(t,s.parent,r,n);const i=n[e+2];t.superClass=i===0?null:W(t,s,i,n),t.body=W(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t;t.decorators=Ue(t,s,n[e],n);const r=n[e+1];t.id=r===0?null:W(t,s,r,n);const i=n[e+2];t.superClass=i===0?null:W(t,s,i,n),t.body=W(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t;t.test=W(t,s,n[e],n),t.consequent=W(t,s,n[e+1],n),t.alternate=W(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.label=r===0?null:W(t,s,r,n)},function(){},function(t,e,n){const{scope:s}=t;t.expression=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.directive=n.convertString(n[e]),t.expression=W(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.body=W(t,s,n[e],n),t.test=W(t,s,n[e+1],n)},function(){},function(t,e,n){const{scope:s}=t,r=n[e];t.exported=r===0?null:W(t,s,r,n),t.source=W(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=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.specifiers=Ue(t,s,n[e],n);const r=n[e+1];t.source=r===0?null:W(t,s,r,n),t.attributes=Ue(t,s,n[e+2],n);const i=n[e+3];t.declaration=i===0?null:W(t,s,i,n)},function(t,e,n){const{scope:s}=t;t.local=W(t,s,n[e],n);const r=n[e+1];t.exported=r===0?t.local:W(t,s,r,n)},function(t,e,n){const{scope:s}=t;t.expression=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.left=W(t,s,n[e],n),t.right=W(t,s,n[e+1],n),t.body=W(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.await=!(1&~r),t.left=W(t,s,n[e+1],n),t.right=W(t,s,n[e+2],n),t.body=W(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.init=r===0?null:W(t,s,r,n);const i=n[e+1];t.test=i===0?null:W(t,s,i,n);const a=n[e+2];t.update=a===0?null:W(t,s,a,n),t.body=W(t,s,n[e+3],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.async=!(1&~r),t.generator=!(2&~r);const i=t.annotations=Rt(n[e+1],n);t.annotationNoSideEffects=i.some(c=>c.type==="noSideEffects");const a=n[e+2];t.id=a===0?null:W(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 Gn),t.body=W(t,s.bodyScope,n[e+4],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.async=!(1&~r),t.generator=!(2&~r);const i=t.annotations=Rt(n[e+1],n);t.annotationNoSideEffects=i.some(c=>c.type==="noSideEffects");const a=n[e+2];t.id=a===0?null:W(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 Gn),t.body=W(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=W(t,s,n[e],n),t.consequent=W(t,t.consequentScope=new ro(s),n[e+1],n);const r=n[e+2];t.alternate=r===0?null:W(t,t.alternateScope=new ro(s),r,n)},function(t,e,n){const{scope:s}=t;t.key=W(t,s,n[e],n),t.value=W(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.specifiers=Ue(t,s,n[e],n),t.source=W(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=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.source=W(t,s,n[e],n),t.sourceAstNode=H(n[e],n);const r=n[e+1];t.options=r===0?null:W(t,s,r,n)},function(t,e,n){const{scope:s}=t;t.local=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.local=W(t,s,n[e+1],n),t.imported=r===0?t.local:W(t,s,r,n)},function(t,e,n){const{scope:s}=t;t.name=W(t,s,n[e],n);const r=n[e+1];t.value=r===0?null:W(t,s,r,n)},function(t,e,n){const{scope:s}=t;t.name=W(t,s,n[e],n)},function(){},function(t,e,n){const{scope:s}=t;t.openingElement=W(t,s,n[e],n),t.children=Ue(t,s,n[e+1],n);const r=n[e+2];t.closingElement=r===0?null:W(t,s,r,n)},function(){},function(t,e,n){const{scope:s}=t;t.expression=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.openingFragment=W(t,s,n[e],n),t.children=Ue(t,s,n[e+1],n),t.closingFragment=W(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=W(t,s,n[e],n),t.property=W(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.namespace=W(t,s,n[e],n),t.name=W(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.selfClosing=!(1&~r),t.name=W(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=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.expression=W(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=W(t,s,n[e],n),t.body=W(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],r=t.value=!(1&~s);t.raw=r?"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]),r=n.convertString(n[e+1]);t.raw=`/${r}/${s}`,t.regex={flags:s,pattern:r},t.value=new RegExp(r,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=W(t,s,n[e+1],n),t.right=W(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.computed=!(1&~r),t.optional=!(2&~r),t.object=W(t,s,n[e+1],n),t.property=W(t,s,n[e+2],n)},function(t,e,n){const{scope:s}=t;t.meta=W(t,s,n[e],n),t.property=W(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.static=!(1&~r),t.computed=!(2&~r),t.decorators=Ue(t,s,n[e+1],n),t.key=W(t,s,n[e+2],n),t.value=W(t,s,n[e+3],n),t.kind=yt[n[e+4]]},function(t,e,n){const{scope:s}=t;t.annotations=Rt(n[e],n),t.callee=W(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=Rt(n[e+1],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.method=!(1&~r),t.shorthand=!(2&~r),t.computed=!(4&~r);const i=n[e+1];t.value=W(t,s,n[e+2],n),t.kind=yt[n[e+3]],t.key=i===0?t.value:W(t,s,i,n)},function(t,e,n){const{scope:s}=t,r=n[e];t.static=!(1&~r),t.computed=!(2&~r),t.decorators=Ue(t,s,n[e+1],n),t.key=W(t,s,n[e+2],n);const i=n[e+3];t.value=i===0?null:W(t,s,i,n)},function(t,e,n){const{scope:s}=t;t.argument=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.argument=r===0?null:W(t,s,r,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=W(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,r=n[e];t.test=r===0?null:W(t,s,r,n),t.consequent=Ue(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t;t.discriminant=W(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=W(t,s,n[e],n),t.quasi=W(t,s,n[e+1],n)},function(t,e,n){const s=n[e];t.tail=!(1&~s);const r=n[e+1],i=r===0?void 0:n.convertString(r),a=n.convertString(n[e+2]);t.value={cooked:i,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=W(t,s,n[e],n)},function(t,e,n){const{scope:s}=t;t.block=W(t,s,n[e],n);const r=n[e+1];t.handler=r===0?null:W(t,s,r,n);const i=n[e+2];t.finalizer=i===0?null:W(t,s,i,n)},function(t,e,n){const{scope:s}=t;t.operator=yt[n[e]],t.argument=W(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.prefix=!(1&~r),t.operator=yt[n[e+1]],t.argument=W(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=W(t,s,n[e],n);const r=n[e+1];t.init=r===0?null:W(t,s,r,n)},function(t,e,n){const{scope:s}=t;t.test=W(t,s,n[e],n),t.body=W(t,s,n[e+1],n)},function(t,e,n){const{scope:s}=t,r=n[e];t.delegate=!(1&~r);const i=n[e+1];t.argument=i===0?null:W(t,s,i,n)}];function W(t,e,n,s){const r=s[n],i=oy[r];if(!i)throw console.trace(),new Error(`Unknown node type: ${r}`);const a=new i(t,e);return a.type=iy[r],a.start=s[n+1],a.end=s[n+2],ay[r](a,n+3,s),a.initialise(),a}function Ue(t,e,n,s){if(n===0)return Qe;const r=s[n++],i=new Array(r);for(let a=0;a<r;a++){const l=s[n++];i[a]=l?W(t,e,l,s):null}return i}const yl={ArrayExpression:Sa,ArrayPattern:Ui,ArrowFunctionExpression:xr,AssignmentExpression:Fd,AssignmentPattern:Bd,AwaitExpression:Hi,BinaryExpression:Ja,BlockStatement:Wn,BreakStatement:Wi,CallExpression:Ya,CatchClause:Gi,ChainExpression:Xi,ClassBody:Ki,ClassDeclaration:_s,ClassExpression:Ji,ConditionalExpression:Qi,ContinueStatement:Zi,DebuggerStatement:Qa,Decorator:Za,DoWhileStatement:to,EmptyStatement:el,ExportAllDeclaration:Ts,ExportDefaultDeclaration:Xn,ExportNamedDeclaration:Er,ExportSpecifier:no,ExpressionStatement:Bt,ForInStatement:qd,ForOfStatement:Hd,ForStatement:so,FunctionDeclaration:Ps,FunctionExpression:tl,Identifier:Fe,IfStatement:Rs,ImportAttribute:Gd,ImportDeclaration:Ar,ImportDefaultSpecifier:wr,ImportExpression:nl,ImportNamespaceSpecifier:Sr,ImportSpecifier:oo,JSXAttribute:ao,JSXClosingElement:Qd,JSXClosingFragment:Zd,JSXElement:ep,JSXEmptyExpression:Ir,JSXExpressionContainer:co,JSXFragment:tp,JSXIdentifier:sl,JSXMemberExpression:np,JSXNamespacedName:al,JSXOpeningElement:ll,JSXOpeningFragment:sp,JSXSpreadAttribute:lo,JSXSpreadChild:rp,JSXText:vr,LabeledStatement:cl,Literal:kt,LogicalExpression:uo,MemberExpression:mn,MetaProperty:pd,MethodDefinition:Si,NewExpression:ip,ObjectExpression:Ds,ObjectPattern:In,PanicError:op,ParseError:ap,PrivateIdentifier:ul,Program:ho,Property:_r,PropertyDefinition:hl,RestElement:Gn,ReturnStatement:dl,SequenceExpression:po,SpreadElement:Un,StaticBlock:Ii,Super:lp,SwitchCase:Pr,SwitchStatement:fo,TaggedTemplateExpression:pl,TemplateElement:fl,TemplateLiteral:cp,ThisExpression:hp,ThrowStatement:dp,TryStatement:mo,UnaryExpression:ml,UnknownNode:class extends ee{hasEffects(){return!0}include(t){super.include(t,!0)}},UpdateExpression:gl,VariableDeclaration:$r,VariableDeclarator:io,WhileStatement:go,YieldExpression:fp};class ly extends jn{constructor(e){super($s),this.module=e}includePath(e,n){super.includePath(e,n),this.module.needsExportShim=!0}}var ts;(function(t){t[t.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",t[t.ANALYSE=1]="ANALYSE",t[t.GENERATE=2]="GENERATE"})(ts||(ts={}));const mp=new WeakMap;function bl(t,e){if(t){const n=mp.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||bl(n)}function Os(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},r={...t,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?function(i){const{length:a}=i,l=new gm(i),c=[];let u=0,d=0,m=0,f=0,g=0;do{const S=l.indexOf(";"),x=[];let I=!0,E=0;for(u=0;l.pos<S;){let b;u=qs(l,u),u<E&&(I=!1),E=u,Fu(l,S)?(d=qs(l,d),m=qs(l,m),f=qs(l,f),Fu(l,S)?(g=qs(l,g),b=[u,d,m,f,g]):b=[u,d,m,f]):b=[u],x.push(b),l.pos++}I||ym(x),c.push(x),l.pos=S+1}while(l.pos<=a);return c}(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return mp.set(r,s),r}function xl(t){return t.id}const kl=(t,{allowReturnOutsideFunction:e=!1,jsx:n=!1}={})=>function(s){const r=H(0,s);switch(r.type){case"PanicError":return re(xs(pi(r.message)));case"ParseError":return re(xs(pi(r.message,r.start)));default:return r}}(Md(Od(t,e,n))),cy=new Set(["assert","with"]);function gp(t){const{scope:{context:e},options:n,start:s}=t;if(!(n instanceof Ds))return n&&e.module.log(be,vh(e.module.id),s),ft;const r=n.properties.find(l=>cy.has(El(l)))?.value;if(!r)return ft;if(!(r instanceof Ds))return e.module.log(be,(i=e.module.id,{code:dh,message:`Rollup could not statically analyze the options argument of a dynamic import in "${xe(i)}". Dynamic import options need to be an object with a nested attributes object.`}),s),ft;var i;const a=r.properties.map(l=>{const c=El(l);return typeof c=="string"&&typeof l.value.value=="string"?[c,l.value.value]:(e.module.log(be,vh(e.module.id),l.start),null)}).filter(l=>!!l);return a.length>0?Object.fromEntries(a):ft}const El=t=>{const e=t.key;return e&&!t.computed&&(e.name||e.value)};function yo(t,e){const n=Object.keys(t);return n.length!==Object.keys(e).length||n.some(s=>t[s]!==e[s])}var yp="performance"in(typeof globalThis>"u"?typeof window>"u"?{}:window:globalThis)?performance:{now:()=>0},bp={memoryUsage:()=>({heapUsed:0})};let Nr=new Map;function xp(t,e){switch(e){case 1:return`# ${t}`;case 2:return`## ${t}`;case 3:return t;default:return`- ${t}`}}function uy(t,e=3){t=xp(t,e);const n=bp.memoryUsage().heapUsed,s=yp.now(),r=Nr.get(t);r===void 0?Nr.set(t,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(r.startMemory=n,r.startTime=s)}function hy(t,e=3){t=xp(t,e);const n=Nr.get(t);if(n!==void 0){const s=bp.memoryUsage().heapUsed;n.memory+=s-n.startMemory,n.time+=yp.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,s)}}function dy(){const t={};for(const[e,{memory:n,time:s,totalMemory:r}]of Nr)t[e]=[s,n,r];return t}let ct=Mt,at=Mt;const py=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function fy(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 r=function(...a){ct(s,4);const l=i.apply(this,a);return at(s,4),l};let i;typeof t[n].handler=="function"?(i=t[n].handler,t[n].handler=r):(i=t[n],t[n]=r)}return t}const kp={identifier:null,localName:$s};function Al(t,e,n,s,r=new Map){const i=r.get(e);if(i){if(i.has(t))return s?[null]:re((a=e,{code:"CIRCULAR_REEXPORT",exporter:l=t.id,message:`"${a}" cannot be exported from "${xe(l)}" as it is a reexport that references itself.`}));i.add(t)}else r.set(e,new Set([t]));var a,l;return t.getVariableForExportName(e,{importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:r})}function Ep(t,e){const n=bt(e.sideEffectDependenciesByVariable,t,On);let s=t;const r=new Set([s]);for(;;){const i=s.module;if(s=s instanceof Yt?s.getDirectOriginalVariable():s instanceof Et?s.syntheticNamespace:null,!s||r.has(s))break;r.add(s),n.add(i);const a=i.sideEffectDependenciesByVariable.get(s);if(a)for(const l of a)n.add(l)}return n}class st{constructor(e,n,s,r,i,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.includedDirectTopLevelAwaitingDynamicImporters=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 ly(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:S,implicitlyLoadedBefore:x,importers:I,reexportDescriptions:E,sourcesWithAttributes:b}=this;this.info={ast:null,attributes:c,code:null,get dynamicallyImportedIdResolutions(){return d.map(({argument:A})=>typeof A=="string"&&u.resolvedIds[A]).filter(Boolean)},get dynamicallyImportedIds(){return d.map(({id:A})=>A).filter(A=>A!=null)},get dynamicImporters(){return m.sort()},get exportedBindings(){const A={".":[...g.keys()]};for(const[v,{source:P}]of E)(A[P]??=[]).push(v);for(const v of f)(A[v]??=[]).push("*");return A},get exports(){return[...g.keys(),...E.keys(),...[...f].map(()=>"*")]},get hasDefaultExport(){return u.ast?u.exports.has("default")||E.has("default"):null},id:n,get implicitlyLoadedAfterOneOf(){return Array.from(S,xl).sort()},get implicitlyLoadedBefore(){return Array.from(x,xl).sort()},get importedIdResolutions(){return Array.from(b.keys(),A=>u.resolvedIds[A]).filter(Boolean)},get importedIds(){return Array.from(b.keys(),A=>u.resolvedIds[A]?.id).filter(Boolean)},get importers(){return I.sort()},isEntry:r,isExternal:!1,get isIncluded(){return e.phase!==ts.GENERATE?null:u.isIncluded()},meta:{...l},moduleSideEffects:i,syntheticNamedExports:a}}basename(){const e=Wt(this.id),n=xn(this.id);return mi(n?e.slice(0,-n.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){Nh(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 r of[...this.getReexports(),...this.getExports()]){const[i]=this.getVariableForExportName(r);i?.included&&s.add(i)}for(let r of s){const i=this.sideEffectDependenciesByVariable.get(r);if(i)for(const a of i)n.add(a);r instanceof Et?r=r.getBaseVariable():r instanceof Yt&&(r=r.getOriginalVariable()),e.add(r.module)}if(this.options.treeshake&&this.info.moduleSideEffects!=="no-treeshake")this.addRelevantSideEffectDependencies(this.relevantDependencies,e,n);else for(const r of this.dependencies)this.relevantDependencies.add(r);for(const r of e)this.relevantDependencies.add(r);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 Yt&&(s=s.getOriginalVariable()),!s||!(s.included||s instanceof tr))continue;const r=e.get(s);r?r.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[r]=this.getVariableForExportName(s);(r?.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,isExportAllSearch:s,onlyExplicit:r,searchedNamesAndModules:i}=ft){if(e[0]==="*")return e.length===1?[this.namespace]:this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*");const a=this.reexportDescriptions.get(e);if(a){const[c,u]=Al(a.module,a.localName,n,!1,i);return c?(n&&(Ap(c,n,this),this.info.moduleSideEffects&&bt(n.sideEffectDependenciesByVariable,c,On).add(this)),[c]):this.error(di(a.localName,this.id,a.module.id,!!u?.missingButExportExists),a.start)}const l=this.exports.get(e);if(l){if(l===kp)return[this.exportShimVariable];const c=l.localName,u=this.traceVariable(c,{importerForSideEffects:n,searchedNamesAndModules:i});return u?(n&&(Ap(u,n,this),bt(n.sideEffectDependenciesByVariable,u,On).add(this)),[u]):[null,{missingButExportExists:!0}]}if(r)return[null];if(e!=="default"){const c=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,n,i);if(this.namespaceReexportsByName.set(e,c),c[0])return c}return this.info.syntheticNamedExports?[bt(this.syntheticExports,e,()=>new Et(this.astContext,e,this.getSyntheticNamespace()))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return this.info.moduleSideEffects==="no-treeshake"||this.ast.hasCachedEffects()}include(){const e=Lt();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||(As(this),this.graph.needsTreeshakingPass=!0);const n=Lt();for(const s of this.exports.keys())if(e||s!==this.info.syntheticNamedExports){const r=this.getVariableForExportName(s)[0];if(!r)return re(Wm(s,this.id));this.includeVariable(r,ie,n),r.deoptimizePath(ie)}for(const s of this.getReexports()){const[r]=this.getVariableForExportName(s);r&&(r.deoptimizePath(ie),this.includeVariable(r,ie,n),r instanceof tr&&(r.module.reexported=!0))}}includeAllInBundle(){this.ast.include(Lt(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(As(this),this.graph.needsTreeshakingPass=!0);let n=!1;const s=Lt();for(const r of e){const i=this.getVariableForExportName(r)[0];i&&(i.deoptimizePath(ie),this.includeVariable(i,ie,s)),this.exports.has(r)||this.reexportDescriptions.has(r)||(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((r=this.id,i=e.format,{code:"INVALID_TLA_FORMAT",id:r,message:`Module format "${i}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:n,usesTopLevelAwait:s};var r,i}async setSource({ast:e,code:n,customTransformCache:s,originalCode:r,originalSourcemap:i,resolvedIds:a,sourcemapChain:l,transformDependencies:c,transformFiles:u,...d}){if(ct("generate ast",3),n.startsWith("#!")){const I=n.indexOf(`
|
|
33
|
-
`);this.shebang=n.slice(2,I)}this.info.code=n,this.originalCode=r,this.originalSourcemap=Os(i),this.sourcemapChain=l.map(I=>I.missing?I:Os(I)),bl(this.originalSourcemap,this.sourcemapChain),u&&(this.transformFiles=u),this.transformDependencies=c,this.customTransformCache=s,this.updateOptions(d),this.resolvedIds=a??Object.create(null);const m=this.id;this.magicString=new Gs(n,{filename:this.excludeFromSourcemap?null:m,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:m,getExports:this.getExports.bind(this),getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:I=>yl[I]||yl.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:I=>this.getVariableForExportName(I),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new up(this.graph.scope,this.astContext),this.namespace=new Jn(this.astContext);const f={context:this.astContext,type:"Module"};if(e)this.ast=new yl[e.type](f,this.scope).parseNode(e),this.info.ast=e;else{at("generate ast",3);const I=await async function(E,b,A){return Od(E,b,A)}(n,!1,this.options.jsx!==!1);ct("generate ast",3),this.ast=(g=I,S=f,x=this.scope,W(S,x,0,Md(g))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(m))return this.graph.astLru.get(m);{const E=this.tryParse();return this.options.cache!==!1?(Object.defineProperty(this.info,"ast",{value:E}),E):(this.graph.astLru.set(m,E),E)}}})}var g,S,x;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,xl),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:r}=ft){const i=this.scope.variables.get(e);if(i)return i;const a=this.importDescriptions.get(e);if(a){const l=a.module;if(l instanceof st&&a.name==="*")return l.namespace;const[c,u]=Al(l,a.name,n||this,s,r);return c||this.error(di(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 Xn)this.assertUniqueExportName("default",e.start),this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Ts){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:r,start:i}of e.specifiers){const a=s instanceof kt?s.value:s.name;this.assertUniqueExportName(a,i),this.reexportDescriptions.set(a,{localName:r instanceof kt?r.value:r.name,module:null,source:n,start:i})}}else if(e.declaration){const n=e.declaration;if(n instanceof $r)for(const s of n.declarations)for(const r of Hg(s.id))this.assertUniqueExportName(r,s.id.start),this.exports.set(r,{identifier:null,localName:r});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 r=n.name,i=s instanceof Fe?s.name:s.value;this.assertUniqueExportName(i,s.start),this.exports.set(i,{identifier:null,localName:r})}}addImport(e){const n=e.source.value;this.addSource(n,e);for(const s of e.specifiers){const r=s.local.name;(this.scope.variables.has(r)||this.importDescriptions.has(r))&&this.error(ks(r),s.local.start);const i=s instanceof wr?"default":s instanceof Sr?"*":s.imported instanceof Fe?s.imported.name:s.imported.value;this.importDescriptions.set(r,{module:null,name:i,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 r=la(s,n,{offsetLine:1});if(r){let{column:i,line:a}=r;try{({column:i,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(S=>S.length>1),f=m[m.length-1];let g=m[0];for(let S of m){if(S[0]>=c.column||S===f){S=S[0]!==c.column?g:S,c={column:S[3],line:S[2]+1};continue e}g=S}}throw new Error("Can't resolve original location of error.")}return c}(this.sourcemapChain,{column:i,line:a})),s=this.originalCode}catch(l){this.options.onLog(be,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,i,a,n))}ui(e,{column:i,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 r=new Set,i=a=>{for(const l of a)r.has(l)||(r.add(l),n.has(l)?e.add(l):(l.info.moduleSideEffects||s.has(l))&&(l instanceof Ze||l.hasEffects()?e.add(l):i(l.dependencies)))};i(this.dependencies),i(s)}addSource(e,n){const s=(r=n.attributes,r?.length?Object.fromEntries(r.map(a=>[El(a),a.value.value])):ft);var r;const i=this.sourcesWithAttributes.get(e);i?yo(i,s)&&this.log(be,hi(i,s,e,this.id),n.start):this.sourcesWithAttributes.set(e,s)}getImportedJsxFactoryVariable(e,n,s){const{id:r}=this.resolvedIds[s],i=this.graph.modulesById.get(r),[a]=i.getVariableForExportName(e);return a||this.error((l=e,c=r,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(ci)}),n);var l,c,u}getVariableFromNamespaceReexports(e,n,s){let r=null;const i=new Map,a=new Set;for(const d of this.exportAllModules){if(d.info.syntheticNamedExports===e)continue;const[m,f]=Al(d,e,n,!0,my(s));d instanceof Ze||f?.indirectExternal?a.add(m):m instanceof Et?r||(r=m):m&&i.set(m,d)}if(i.size>0){const d=[...i],m=d[0][0];return d.length===1?[m]:(this.options.onLog(be,(l=e,c=this.id,u=d.map(([,f])=>f.id),{binding:l,code:"NAMESPACE_CONFLICT",ids:u,message:`Conflicting namespaces: "${xe(c)}" re-exports "${l}" from one of the modules ${cn(u.map(f=>xe(f)))} (will be ignored).`,reexporter:c})),[null])}var l,c,u;if(a.size>0){const d=[...a],m=d[0];return d.length>1&&this.options.onLog(be,function(f,g,S,x){return{binding:f,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:x,message:`Ambiguous external namespace resolution: "${xe(g)}" re-exports "${f}" from one of the external modules ${cn(x.map(I=>xe(I)))}, guessing "${xe(S)}".`,reexporter:g}}(e,this.id,m.module.id,d.map(f=>f.module.id))),[m,{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[r]=s.getVariableForExportName("*");r.includePath(ie,Lt()),this.includedImports.add(r),e.add(r)}else if(s.info.syntheticNamedExports){const r=s.getSyntheticNamespace();r.includePath(ie,Lt()),this.includedImports.add(r),n.add(r)}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),e.withinTopLevelAwait&&n.includedDirectTopLevelAwaitingDynamicImporters.add(this));const s=this.options.treeshake?e.getDeterministicImportedNames():void 0;s?n.includeExportsByNames(s):n.includeAllExports(!0)}}includeVariable(e,n,s){const{included:r,module:i}=e;if(e.includePath(n,s),r)i instanceof st&&i!==this&&Ep(e,this);else if(this.graph.needsTreeshakingPass=!0,i instanceof st&&(i.isExecuted||As(i),i!==this)){const a=Ep(e,this);for(const l of a)l.isExecuted||As(l)}}includeVariableInModule(e,n,s){this.includeVariable(e,n,s);const r=e.module;r&&r!==this&&this.includedImports.add(e)}shimMissingExport(e){var n,s;this.options.onLog(be,(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,kp)}tryParse(){try{return kl(this.info.code,{jsx:this.options.jsx!==!1})}catch(e){return this.error(fa(e,this.id),e.pos)}}}function Ap(t,e,n){if(t.module instanceof st&&t.module!==n){const s=t.module.cycles;if(s.size>0){const r=n.cycles;for(const i of r)if(s.has(i)){e.alternativeReexportModules.set(t,n);break}}}}const my=t=>t&&new Map(Array.from(t,([e,n])=>[e,new Set(n)])),wp=(t,e)=>e?`${t}
|
|
34
|
-
${e}`:t,Sp=(t,e)=>e?`${t}
|
|
35
|
-
|
|
36
|
-
${e}`:t,gy={amd:bo,cjs:bo,es:Ip,iife:bo,system:Ip,umd:bo};function yy(t,e,n,s,r,i,a,l,c,u,d,m,f,g){const S=[...t].reverse();for(const x of S)x.scope.addUsedOutsideNames(s,r,m,f);(function(x,I,E){for(const b of I){for(const A of b.scope.variables.values())A.included&&!(A.renderBaseName||A instanceof Yt&&A.getOriginalVariable()!==A)&&A.setRenderNames(null,Jt(A.name,x,A.forbiddenNames));if(E.has(b)){const A=b.namespace;A.setRenderNames(null,Jt(A.name,x,A.forbiddenNames))}}})(s,S,g),gy[r](s,n,e,i,a,l,c,u,d);for(const x of S)x.scope.deconflict(r,m,f)}function Ip(t,e,n,s,r,i,a,l,c){for(const u of n.dependencies)(r||u instanceof Yn)&&(u.variableName=Jt(u.suggestedVariableName,t,null));for(const u of e){const d=u.module,m=u.name;u.isNamespace&&(r||d instanceof Ze)?u.setRenderNames(null,(d instanceof Ze?l.get(d):a.get(d)).variableName):d instanceof Ze&&m==="default"?u.setRenderNames(null,Jt([...d.exportedVariables].some(([f,g])=>g==="*"&&f.included)?d.suggestedVariableName+"__default":d.suggestedVariableName,t,u.forbiddenNames)):u.setRenderNames(null,Jt(mi(m),t,u.forbiddenNames))}for(const u of c)u.setRenderNames(null,Jt(u.name,t,u.forbiddenNames))}function bo(t,e,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:r},i,a,l,c,u){for(const d of r)d.variableName=Jt(d.suggestedVariableName,t,null);for(const d of s)d.namespaceVariableName=Jt(`${d.suggestedVariableName}__namespace`,t,null);for(const d of n)d.defaultVariableName=s.has(d)&&kg(i(d.id),l)?d.namespaceVariableName:Jt(`${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 S=i(m.id),x=Ci[S]?f.defaultVariableName:f.variableName;Ti(S,l)?d.setRenderNames(x,"default"):d.setRenderNames(null,x)}else g==="*"?d.setRenderNames(null,dr[i(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 by(t,{exports:e,name:n,format:s},r,i){const a=t.getExportNames();if(e==="default"){if(a.length!==1||a[0]!=="default")return re(Ih("default",a,r))}else if(e==="none"&&a.length>0)return re(Ih("none",a,r));return e==="auto"&&(a.length===0?e="none":a.length===1&&a[0]==="default"?e="default":(s!=="es"&&s!=="system"&&a.includes("default")&&i(be,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(ha)}}(r,n)),e="named")),e}function xy(t){const e=t.split(`
|
|
37
|
-
`),n=e.filter(i=>/^\t+/.test(i)),s=e.filter(i=>/^ {2,}/.test(i));if(n.length===0&&s.length===0)return null;if(n.length>=s.length)return" ";const r=s.reduce((i,a)=>{const l=/^ +/.exec(a)[0].length;return Math.min(l,i)},1/0);return" ".repeat(r)}function vp(t,e,n,s,r,i){const a=t.getDependenciesToBeIncluded();for(const l of a){if(l instanceof Ze){e.push(i.get(l));continue}const c=r.get(l);c===s?n.has(l)||(n.add(l),vp(l,e,n,s,r,i)):e.push(c)}}const wl="!~{",Sl="}~",Il=new RegExp(`${wl}[0-9a-zA-Z_$]{1,16}${Sl}`,"g"),ns=(t,e)=>t.replace(Il,n=>e.get(n)||n),ky=(t,e,n)=>t.replace(Il,s=>s===e?n:s),xo=Symbol("bundleKeys"),vl={type:"placeholder"};function _l(t,e,n){return li(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,r,i)=>{if(!n.hasOwnProperty(r)||i&&r!=="hash")return re(It(`"[${r}${i||""}]" is not a valid placeholder in the "${e}" pattern.`));const a=n[r](i&&Number.parseInt(i.slice(1)));return li(a)?re(It(`Invalid substitution "${a}" for placeholder "[${r}]" in "${e}" pattern, can be neither absolute nor relative path.`)):a})}function Pl(t,{[xo]:e}){if(!e.has(t.toLowerCase()))return t;const n=xn(t);t=t.slice(0,Math.max(0,t.length-n.length));let s,r=1;for(;e.has((s=t+ ++r+n).toLowerCase()););return s}const Ey=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Ay(t,e,n,s){return(typeof e=="function"?e(t.id):e[t.id])||(n?(s(be,(i=t.id,a=t.variableName,{code:"MISSING_GLOBAL_NAME",id:i,message:`No name was provided for external module "${i}" in "output.globals" – guessing "${a}".`,names:[a],url:ot("configuration-options/#output-globals")})),t.variableName):void 0);var i,a}class vn{constructor(e,n,s,r,i,a,l,c,u,d,m,f,g,S,x){this.orderedModules=e,this.inputOptions=n,this.outputOptions=s,this.unsetOptions=r,this.pluginDriver=i,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=S,this.snippets=x,this.dependencies=new Set,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",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 I=new Set(e);for(const E of e){l.set(E,this),E.namespace.included&&!s.preserveModules&&d.add(E),this.isEmpty&&E.isIncluded()&&(this.isEmpty=!1),(E.info.isEntry||s.preserveModules)&&this.entryModules.push(E);for(const b of E.includedDynamicImporters)I.has(b)||(this.dynamicEntryModules.push(E),E.info.syntheticNamedExports&&(d.add(E),this.exports.add(E.namespace)));E.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(E)}this.suggestedVariableName=mi(this.generateVariableName())}static generateFacade(e,n,s,r,i,a,l,c,u,d,m,f,g,S,x){const I=new vn([],e,n,s,r,i,a,l,c,u,null,f,g,S,x);I.assignFacadeName(m,d),c.has(d)||c.set(d,I);for(const E of d.getDependenciesToBeIncluded())I.dependencies.add(E instanceof st?a.get(E):l.get(E));return!I.dependencies.has(a.get(d))&&d.info.moduleSideEffects&&d.hasEffects()&&I.dependencies.add(a.get(d)),I.ensureReexportsAreAvailableForModule(d),I.facadeModule=d,I.strictFacade=!0,I}canModuleBeFacade(e,n){const s=e.getExportNamesByVariable();for(const r of this.exports)if(!s.has(r))return!1;for(const r of n)if(!(r.module===e||s.has(r)||r instanceof Et&&s.has(r.getBaseVariable())))return!1;return!0}finalizeChunk(e,n,s,r){const i=this.getRenderedChunkInfo(),a=u=>ns(u,r),l=i.fileName,c=this.fileName=a(l);return{...i,code:e,dynamicImports:i.dynamicImports.map(a),fileName:c,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(a),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map(([u,d])=>[a(u),d])),imports:i.imports.map(a),map:n,preliminaryFileName:l,referencedFiles:i.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,r]of n){this.exportNamesByVariable.set(s,[...r]);for(const i of r)this.exportsByName.set(i,s);e.delete(s)}}for(const n of this.allowExtensionModules){const s=n.getExportNamesByVariable();for(const[r,i]of s){this.exportNamesByVariable.set(r,[...i]);for(const a of i)this.exportsByName.set(a,r);e.delete(r)}}this.outputOptions.minifyInternalExports?function(n,s,r){let i=0;for(const a of n){let[l]=a.name;if(s.has(l))do l=Ai(++i),l.charCodeAt(0)===49&&(i+=9*64**(l.length-1),l=Ai(i));while(fi.has(l)||s.has(l));s.set(l,a),r.set(a,[l])}}(e,this.exportsByName,this.exportNamesByVariable):function(n,s,r){for(const i of n){let a=0,l=i.name;for(;s.has(l);)l=i.name+"$"+ ++a;s.set(l,i),r.set(i,[l])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=by(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:r})=>r));for(const r of n){if(r.preserveSignature==="allow-extension"&&this.canPreserveModuleExports(r)&&!r.chunkFileNames.size&&r.chunkNames.every(({isUserDefined:a})=>!a)){this.allowExtensionModules.add(r),this.facadeModule||(this.facadeModule=r,this.strictFacade=!1,this.assignFacadeName({},r,this.outputOptions.preserveModules)),this.facadeChunkByModule.set(r,this);continue}const i=Array.from(new Set(r.chunkNames.filter(({isUserDefined:a})=>a).map(({name:a})=>a)),a=>({name:a}));if(i.length===0&&r.isUserDefinedEntryPoint&&i.push({}),i.push(...Array.from(r.chunkFileNames,a=>({fileName:a}))),i.length===0&&i.push({}),!this.facadeModule){const a=!this.outputOptions.preserveModules&&(r.preserveSignature==="strict"||r.preserveSignature==="exports-only"&&r.getExportNamesByVariable().size>0);a&&!this.canModuleBeFacade(r,s)||(this.facadeModule=r,this.facadeChunkByModule.set(r,this),r.preserveSignature&&(this.strictFacade=a),this.assignFacadeName(i.shift(),r,this.outputOptions.preserveModules))}for(const a of i)e.push(vn.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,r,a,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const r of this.dynamicEntryModules)r.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(r,s)?(this.facadeModule=r,this.facadeChunkByModule.set(r,this),this.strictFacade=!0,this.dynamicName=$l(r)):this.facadeModule===r&&!this.strictFacade&&this.canModuleBeFacade(r,s)?this.strictFacade=!0:this.facadeChunkByModule.get(r)?.strictFacade||(this.includedNamespaces.add(r),this.exports.add(r.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}canPreserveModuleExports(e){const n=e.getExportNamesByVariable();for(const[s,r]of n)for(const i of r){const a=this.exportsByName.get(i);if(a&&a!==s)return!1}for(const[s,r]of n)for(const i of r)this.exportsByName.set(i,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 Sn(nh(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:r,file:i,format:a,preserveModules:l}=this.outputOptions;if(i)e=Wt(i);else if(this.fileName===null){const[c,u]=l||this.facadeModule?.isUserDefinedEntryPoint?[r,"output.entryFileNames"]:[s,"output.chunkFileNames"];e=_l(typeof c=="function"?c(this.getPreRenderedChunkInfo()):c,u,{format:()=>a,hash:d=>n||(n=this.getPlaceholder(u,d||8)),name:()=>this.getChunkName()}),n||(e=Pl(e,this.bundle))}else e=this.fileName;return n||(this.bundle[e]=vl),this.preliminaryFileName={fileName:e,hashPlaceholder:n}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;let e=null,n=null;const{sourcemapFileNames:s,format:r}=this.outputOptions;if(!s)return null;{const[i,a]=[s,"output.sourcemapFileNames"];e=_l(typeof i=="function"?i(this.getPreRenderedChunkInfo()):i,a,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>r,hash:l=>n||(n=this.getPlaceholder(a,l||8)),name:()=>this.getChunkName()}),n||(e=Pl(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:n}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(ko),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,ko),importedBindings:wy(this.getRenderedDependencies(),ko),imports:Array.from(this.dependencies,ko),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof Jn?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,n,s,r){const i=[],a=new Set;for(let c=n.length-1;c>=0;c--){const u=n[c];if(!a.has(u)){const d=[];vp(u,d,a,e,s,r),i.unshift(d)}}const l=new Set;for(const c of i)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:r,preserveModules:i}=s;if(r&&!i&&e!==null)for(const a of n)a instanceof vn&&this.inlineChunkDependencies(a)}async render(){const{exportMode:e,facadeModule:n,inputOptions:{onLog:s},outputOptions:r,pluginDriver:i,snippets:a}=this,{format:l,preserveModules:c}=r,u=this.getPreliminaryFileName(),d=this.getPreliminarySourcemapFileName(),{accessedGlobals:m,indent:f,magicString:g,renderedSource:S,usedModules:x,usesTopLevelAwait:I}=this.renderModules(u.fileName),E=[...this.getRenderedDependencies().values()],b=e==="none"?[]:this.getChunkExportDeclarations(l);let A=b.length>0,v=!1;for(const B of E){const{reexports:N}=B;N?.length&&(A=!0,!v&&N.some(T=>T.reexported==="default")&&(v=!0),l==="es"&&(B.reexports=N.filter(({reexported:T})=>!b.find(({exported:U})=>U===T))))}if(!v){for(const{exported:B}of b)if(B==="default"){v=!0;break}}const{intro:P,outro:C,banner:R,footer:F}=await async function(B,N,T){try{let[le,X,q,J]=await Promise.all([N.hookReduceValue("banner",B.banner(T),[T],wp),N.hookReduceValue("footer",B.footer(T),[T],wp),N.hookReduceValue("intro",B.intro(T),[T],Sp),N.hookReduceValue("outro",B.outro(T),[T],Sp)]);return q&&(q+=`
|
|
38
|
-
|
|
39
|
-
`),J&&(J=`
|
|
40
|
-
|
|
41
|
-
${J}`),le&&(le+=`
|
|
42
|
-
`),X&&(X=`
|
|
43
|
-
`+X),{banner:le,footer:X,intro:q,outro:J}}catch(le){return re((U=le.message,{code:"ADDON_ERROR",message:`Could not retrieve "${le.hook}". Check configuration of plugin "${le.plugin}".
|
|
44
|
-
Error Message: ${U}`}))}var U}(r,i,this.getRenderedChunkInfo());if(Fg[l](S,{accessedGlobals:m,dependencies:E,exports:b,hasDefaultExport:v,hasExports:A,id:u.fileName,indent:f,intro:P,isEntryFacade:c||n!==null&&n.info.isEntry,isModuleFacade:n!==null,log:s,namedExportsMode:e!=="default",outro:C,snippets:a,usesTopLevelAwait:I},r),R&&g.prepend(R),l==="es"||l==="cjs"){const B=n!==null&&n.info.isEntry&&n.shebang;B&&g.prepend(`#!${B}
|
|
45
|
-
`)}return F&&g.append(F),{chunk:this,magicString:g,preliminaryFileName:u,preliminarySourcemapFileName:d,usedModules:x}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:n,implicitlyLoadedBefore:s}=this;for(const r of e.implicitlyLoadedBefore){const i=n.get(r);i&&i!==this&&s.add(i)}}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,r){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(n||(r?this.getPreserveModulesChunkNameFromModule(s):$l(s)))}checkCircularDependencyImport(e,n){const s=e.module;if(s instanceof st){const r=this.chunkByModule.get(s);let i;do i=n.alternativeReexportModules.get(e),i&&(this.chunkByModule.get(i)!==r&&this.inputOptions.onLog(be,Vm(s.getExportNamesByVariable().get(e)?.[0]||"*",s.id,i.id,n.id,this.outputOptions.preserveModules)),n=i);while(i)}}ensureReexportsAreAvailableForModule(e){const n=[],s=e.getExportNamesByVariable();for(const r of s.keys()){const i=r instanceof Et,a=i?r.getBaseVariable():r;if(this.checkCircularDependencyImport(a,e),!(a instanceof Jn&&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),i&&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?$l(e):"chunk"}getChunkExportDeclarations(e){const n=[];for(const s of this.getExportNames()){if(s[0]==="*")continue;const r=this.exportsByName.get(s);if(!(r instanceof Et)){const c=r.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 i=null,a=!1,l=r.getName(this.snippets.getPropertyAccess);if(r instanceof Dt){for(const c of r.declarations)if(c.parent instanceof Ps||c instanceof Xn&&c.declaration instanceof Ps){a=!0;break}}else r instanceof Et&&(i=l,e==="es"&&(l=r.renderName));n.push({exported:s,expression:i,hoisted:a,local:l})}return n}getDependenciesToBeDeconflicted(e,n,s){const r=new Set,i=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);r.add(u),e&&(l.name==="default"?Ci[s(c.id)]&&i.add(u):l.isNamespace&&dr[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&&(r.add(u),e&&u.exportMode==="default"&&l.isNamespace&&a.add(u))}}if(n)for(const l of this.dependencies)r.add(l);return{deconflictedDefault:i,deconflictedNamespace:a,dependencies:r}}getDynamicDependencies(){return this.getIncludedDynamicImports().map(e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution).filter(e=>e!==this&&(e instanceof vn||e instanceof Yn))}getDynamicImportStringAndAttributes(e,n,s){const{externalImportAttributes:r}=this.outputOptions,i=["es","cjs"].includes(this.outputOptions.format)&&r;if(e instanceof Ze){const l=this.externalChunkByModule.get(e),c=l.getImportAttributes(this.snippets);return[`'${l.getImportPath(n)}'`,c||!!i||null]}let a=null;if(i){const l=gp(s);a=l===ft||yd(l,this.snippets)}return[e||"",a]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?ua(this.fileName):ua(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,n=new Map;for(const s of this.imports){const r=s.module;let i,a;if(r instanceof Ze){if(i=this.externalChunkByModule.get(r),a=s.name,a!=="default"&&a!=="*"&&e(r.id)==="defaultOnly")return re($h(r.id,a,!1))}else i=this.chunkByModule.get(r),a=i.getVariableExportName(s);bt(n,i,Ku).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:r}of n.dynamicImports)s.included&&e.push(r instanceof st?{chunk:this.chunkByModule.get(r),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(r),node:s,resolution:r}:r instanceof Ze?{chunk:null,externalChunk:this.externalChunkByModule.get(r),facadeChunk:null,node:s,resolution:r}:{chunk:null,externalChunk:null,facadeChunk:null,node:s,resolution:r});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:n,implicitEntryModules:s,orderedModules:r}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:n&&n.id,isDynamicEntry:e.length>0,isEntry:!!n?.info.isEntry,isImplicitEntry:s.length>0,moduleIds:r.map(({id:i})=>i),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const n=_p(e);if(n)return n;const{preserveModulesRoot:s,sanitizeFileName:r}=this.outputOptions,i=r(an(e.id.split(Sy,1)[0])),a=xn(i),l=Ey.has(a)?i.slice(0,-a.length):i;return Ht(l)?s&&St(l).startsWith(s)?l.slice(s.length).replace(/^[/\\]/,""):this.inputBase==="/"&&l[0]!=="/"?Tn(this.inputBase,l.replace(/^[a-zA-Z]:[/\\]/,"/")):Tn(this.inputBase,l):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+Wt(l)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:n}=this.outputOptions,s=new Map;for(let r of this.getExportNames()){let i,a,l=!1;if(r[0]==="*"){const c=r.slice(1);n(c)==="defaultOnly"&&this.inputOptions.onLog(be,Km(c)),l=e,i=this.externalChunkByModule.get(this.modulesById.get(c)),a=r="*"}else{const c=this.exportsByName.get(r);if(c instanceof Et)continue;const u=c.module;if(u instanceof st){if(i=this.chunkByModule.get(u),i===this)continue;a=i.getVariableExportName(c),l=c.isReassigned}else{if(i=this.externalChunkByModule.get(u),a=c.name,a!=="default"&&a!=="*"&&n(u.id)==="defaultOnly")return re($h(u.id,a,!0));l=e&&(a!=="default"||Ti(n(u.id),!0))}}bt(s,i,Ku).push({imported:a,needsLiveBinding:l,reexported:r})}return s}getReferencedFiles(){const e=new Set;for(const n of this.orderedModules)for(const s of n.importMetas){const r=s.getReferencedFileName(this.pluginDriver);r&&e.add(r)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),n=this.getReexportSpecifiers(),s=new Map,r=this.getFileName();for(const i of this.dependencies){const a=e.get(i)||null,l=n.get(i)||null,c=i instanceof Yn||i.exportMode!=="default",u=i.getImportPath(r);s.set(i,{attributes:i instanceof Yn?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof Yn&&(this.outputOptions.format==="umd"||this.outputOptions.format==="iife")&&Ay(i,this.outputOptions.globals,(a||l)!==null,this.inputOptions.onLog),importPath:u,imports:a,isChunk:i instanceof vn,name:i.variableName,namedExportsMode:c,namespaceVariableName:i.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 vn&&this.inlineChunkDependencies(n))}renderModules(e){const{accessedGlobalsByScope:n,dependencies:s,exportNamesByVariable:r,includedNamespaces:i,inputOptions:{onLog:a},isEmpty:l,orderedModules:c,outputOptions:u,pluginDriver:d,renderedModules:m,snippets:f}=this,{compact:g,format:S,freeze:x,generatedCode:{symbols:I},importAttributesKey:E}=u,{_:b,cnst:A,n:v}=f;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const P=new wm({separator:`${v}${v}`}),C=function(q,J){if(J.indent!==!0)return J.indent;for(const Y of q){const Q=xy(Y.originalCode);if(Q!==null)return Q}return" "}(c,u),R=[];let F="";const B=new Set,N=new Map,T={accessedDocumentCurrentScript:!1,exportNamesByVariable:r,format:S,freeze:x,importAttributesKey:E,indent:C,pluginDriver:d,snippets:f,symbols:I,useOriginalName:null};let U=!1;for(const q of c){let J,Y=0;if(q.isIncluded()||i.has(q)){const $=q.render(T);!T.accessedDocumentCurrentScript&&fd.includes(S)&&this.accessedGlobalsByScope.get(q.scope)?.delete(fn),T.accessedDocumentCurrentScript=!1,{source:J}=$,U||=$.usesTopLevelAwait,Y=J.length(),Y&&(g&&J.lastLine().includes("//")&&J.append(`
|
|
46
|
-
`),N.set(q,J),P.addSource(J),R.push(q));const ge=q.namespace;if(i.has(q)){const pe=ge.renderBlock(T);ge.renderFirst()?F+=v+pe:P.addSource(new Gs(pe))}const fe=n.get(q.scope);if(fe)for(const pe of fe)B.add(pe)}const{renderedExports:Q,removedExports:de}=q.getRenderedExports();m[q.id]={get code(){return J?.toString()??null},originalLength:q.originalCode.length,removedExports:de,renderedExports:Q,renderedLength:Y}}F&&P.prepend(F+v+v),this.needsExportsShim&&P.prepend(`${v}${A} ${$s}${b}=${b}void 0;${v}${v}`);const le=g?P:P.trim();var X;return l&&this.getExportNames().length===0&&s.size===0&&a(be,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${X=this.getChunkName()}".`,names:[X]}),{accessedGlobals:B,indent:C,magicString:P,renderedSource:le,usedModules:R,usesTopLevelAwait:U}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:n,outputOptions:s,pluginDriver:r,snippets:i}=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,i,r,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,i,r,n,u,!1,d,this,null)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:n},interop:s,preserveModules:r,externalLiveBindings:i}=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(["Object","Promise"]);switch(this.needsExportsShim&&l.add($s),n&&l.add("Symbol"),e){case"system":l.add("module").add("exports");break;case"es":break;case"cjs":l.add("module").add("require").add("__filename").add("__dirname");default:l.add("exports");for(const c of Ma)l.add(c)}yy(this.orderedModules,this.getDependenciesToBeDeconflicted(e!=="es"&&e!=="system",e==="amd"||e==="umd"||e==="iife",s),this.imports,l,e,s,r,i,this.chunkByModule,this.externalChunkByModule,a,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:n,includedNamespaces:s,orderedModules:r,outputOptions:{format:i}}=this;for(const a of r){for(const l of a.importMetas)l.setResolution(i,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 r of Object.values(s))r.included&&n.add(r)}for(let s of n){s instanceof Yt&&(s=s.getOriginalVariable()),s instanceof Et&&(s=s.getBaseVariable());const r=this.chunkByModule.get(s.module);r!==this&&(this.imports.add(s),s.module instanceof st&&(this.checkCircularDependencyImport(s,e),s instanceof Jn&&this.outputOptions.preserveModules||r.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:r}of e.dynamicImports)s.included&&r instanceof st&&this.chunkByModule.get(r)===this&&!this.includedNamespaces.has(r)&&(this.includedNamespaces.add(r),this.ensureReexportsAreAvailableForModule(r))}}function $l(t){return _p(t)??ua(t.id)}function _p(t){return t.chunkNames.find(({isUserDefined:e})=>e)?.name??t.chunkNames[0]?.name}function wy(t,e){const n={};for(const[s,r]of t){const i=new Set;if(r.imports)for(const{imported:a}of r.imports)i.add(a);if(r.reexports)for(const{imported:a}of r.reexports)i.add(a);n[e(s)]=[...i]}return n}const Sy=/[#?]/,ko=t=>t.getFileName();function*Pp(t){for(const e of t)yield*e}function Iy(t,e,n,s){const{chunkDefinitions:r,modulesInManualChunks:i}=function(b){const A=new Set(b.keys()),v=Object.create(null);for(const[F,B]of b)vy(F,v[B]||=[],A);const P=Object.entries(v),C=new Array(P.length);let R=0;for(const[F,B]of P)C[R++]={alias:F,modules:B};return{chunkDefinitions:C,modulesInManualChunks:A}}(e),{allEntries:a,dependentEntriesByModule:l,dynamicallyDependentEntriesByDynamicEntry:c,dynamicImportsByEntry:u,dynamicallyDependentEntriesByAwaitedDynamicEntry:d,awaitedDynamicImportsByEntry:m}=function(b){const A=new Set,v=new Set,P=new Map,C=new Set(b),R=new Array(C.size),F=new Array(C.size);let B=0;for(const q of C){const J=new Set,Y=new Set;R[B]=J,F[B]=Y;const Q=new Set([q]);for(const de of Q){bt(P,de,On).add(B);for(const $ of de.getDependenciesToBeIncluded())$ instanceof Ze||Q.add($);for(const{resolution:$}of de.dynamicImports)if($ instanceof st&&$.includedDynamicImporters.length>0&&!C.has($)){A.add($),C.add($),J.add($);for(const ge of $.includedDirectTopLevelAwaitingDynamicImporters)if(Q.has(ge)){v.add($),Y.add($);break}}for(const $ of de.implicitlyLoadedBefore)C.has($)||(A.add($),C.add($))}B++}const N=[...C],{awaitedDynamicEntries:T,awaitedDynamicImportsByEntry:U,dynamicEntries:le,dynamicImportsByEntry:X}=function(q,J,Y,Q,de){const $=new Map,ge=new Set,fe=new Set;for(const[k,D]of q.entries())$.set(D,k),J.has(D)&&ge.add(k),Q.has(D)&&fe.add(k);const pe=$p(Y,$),M=$p(de,$);return{awaitedDynamicEntries:fe,awaitedDynamicImportsByEntry:M,dynamicEntries:ge,dynamicImportsByEntry:pe}}(N,A,R,v,F);return{allEntries:N,awaitedDynamicImportsByEntry:U,dependentEntriesByModule:P,dynamicallyDependentEntriesByAwaitedDynamicEntry:Np(P,T,N,q=>q.includedDirectTopLevelAwaitingDynamicImporters),dynamicallyDependentEntriesByDynamicEntry:Np(P,le,N,q=>q.includedDynamicImporters),dynamicImportsByEntry:X}}(t),f=function(b){const A=Object.create(null);for(const{dependentEntries:v,modules:P}of b){let C=0n;for(const R of v)C|=1n<<BigInt(R);(A[String(C)]||={dependentEntries:new Set(v),modules:[]}).modules.push(...P)}return Object.values(A)}(function*(b,A){for(const[v,P]of b)A.has(v)||(yield{dependentEntries:P,modules:[v]})}(l,i)),g=function(b,A){const v=b.map(()=>0n);let P=1n;for(const{dependentEntries:C}of A){for(const R of C)v[R]|=P;P<<=1n}return v}(a,f),S=Cp(g,c,u,a);(function(b,A,v){let P=1n;for(const{dependentEntries:C}of b){for(const R of C)(A[R]&P)===P&&(v[R]&P)===0n&&C.delete(R);P<<=1n}})(f,S,Cp(g,d,m,a));const{chunks:x,sideEffectAtoms:I,sizeByAtom:E}=function(b,A,v,P){const C=Object.create(null),R=new Map,F=new Array(b.length);let B=0n,N=1n,T=0;for(const{dependentEntries:le,modules:X}of b){let q=0n,J=-1n;for(const $ of le)q|=1n<<BigInt($),J&=A[$]|v[$];const Y=C[String(q)]||={containedAtoms:0n,correlatedAtoms:J,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(le),modules:[],pure:!0,size:0};let Q=0,de=!0;for(const $ of X)R.set($,Y),$.isIncluded()&&(de&&=!$.hasEffects(),Q+=P>1?$.estimateSize():1);de||(B|=N),F[T++]=Q,Y.containedAtoms|=N,Y.modules.push(...X),Y.pure&&=de,Y.size+=Q,N<<=1n}const U=Object.values(C);return B|=function(le,X,q){const J=new Map;let Y=0n;for(const Q of le){const{dependencies:de,modules:$}=Q;for(const ge of $)for(const fe of ge.getDependenciesToBeIncluded())if(fe instanceof Ze){if(fe.info.moduleSideEffects){const pe=bt(J,fe,()=>{const M=q;return q<<=1n,Y|=M,M});Q.containedAtoms|=pe,Q.correlatedAtoms|=pe}}else{const pe=X.get(fe);pe&&pe!==Q&&(de.add(pe),pe.dependentChunks.add(Q))}}return Y}(U,R,N),{chunks:U,sideEffectAtoms:B,sizeByAtom:F}}(f,g,S,n);return r.push(...function(b,A,v,P,C){ct("optimize chunks",3);const R=function(F,B){const N=[],T=[];for(const U of F)(U.size<B?N:T).push(U);return N.length===0?null:(N.sort(Tp),T.sort(Tp),{big:new Set(T),small:new Set(N)})}(b,A);return R?(A>1&&C("info",_h(b.length,R.small.size,"Initially")),function(F,B,N,T){const{small:U}=F;for(const le of U){const X=_y(le,F,N,T,B<=1?1:1/0);if(X){const{containedAtoms:q,correlatedAtoms:J,modules:Y,pure:Q,size:de}=le;U.delete(le),Dp(X,B,F).delete(X),X.modules.push(...Y),X.size+=de,X.pure&&=Q;const{dependencies:$,dependentChunks:ge,dependentEntries:fe}=X;X.correlatedAtoms&=J,X.containedAtoms|=q;for(const pe of le.dependentEntries)fe.add(pe);for(const pe of le.dependencies)$.add(pe),pe.dependentChunks.delete(le),pe.dependentChunks.add(X);for(const pe of le.dependentChunks)ge.add(pe),pe.dependencies.delete(le),pe.dependencies.add(X);$.delete(X),ge.delete(X),Dp(X,B,F).add(X)}}}(R,A,v,P),A>1&&C("info",_h(R.small.size+R.big.size,R.small.size,"After merging chunks")),at("optimize chunks",3),[...R.small,...R.big]):(at("optimize chunks",3),b)}(x,n,I,E,s).map(({modules:b})=>({alias:null,modules:b}))),r}function vy(t,e,n){const s=new Set([t]);for(const r of s){n.add(r),e.push(r);for(const i of r.dependencies)i instanceof Ze||n.has(i)||s.add(i)}}function $p(t,e){const n=new Array(t.length);let s=0;for(const r of t){const i=new Set;for(const a of r)i.add(e.get(a));n[s++]=i}return n}function Np(t,e,n,s){const r=new Map;for(const i of e){const a=bt(r,i,On),l=n[i];for(const c of Pp([s(l),l.implicitlyLoadedAfter]))for(const u of t.get(c))a.add(u)}return r}function Cp(t,e,n,s){const r=s.map((i,a)=>e.has(a)?-1n:0n);for(const[i,a]of e){e.delete(i);const l=r[i];let c=l;for(const u of a)c&=t[u]|r[u];if(c!==l){r[i]=c;for(const u of n[i])bt(e,u,On).add(i)}}return r}function Tp({size:t},{size:e}){return t-e}function _y(t,{big:e,small:n},s,r,i){let a=null;for(const l of Pp([n,e])){if(t===l)continue;const c=Py(t,l,i,s,r);if(c<i){if(a=l,c===0)break;i=c}}return a}function Py(t,e,n,s,r){const i=Rp(t,e,n,s,r);return i<n?i+Rp(e,t,n-i,s,r):1/0}function Rp(t,e,n,s,r){const{correlatedAtoms:i}=e;let a=t.containedAtoms;const l=a&s;if((i&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((i&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,S=1n;const{length:x}=m;for(;g<x;g++)if((u&S)===S&&(f+=m[g]),S<<=1n,f>=d)return 1/0;return f}(a&~i,n,r)}function Dp(t,e,n){return t.size<e?n.small:n.big}const $y=(t,e)=>t.execIndex>e.execIndex?1:-1;function Ny(t){t.sort($y)}function Cy(t){let e=0;const n=[],s=new Set,r=new Set,i=new Map,a=[],l=(u,d)=>{i.has(u)?s.has(u)||n.push(function(m,f,g){const S=Symbol(m.id),x=[m.id];let I=f;for(m.cycles.add(S);I!==m;)I.cycles.add(S),x.push(I.id),I=g.get(I);return x.push(x[0]),x.reverse(),x}(u,d,i)):(i.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)r.add(d);for(const{resolution:d,node:m}of u.dynamicImports)d instanceof st&&(m.withinTopLevelAwait?l(d,u):r.add(d));a.push(u)}u.execIndex=e++,s.add(u)};for(const u of t)i.has(u)||(i.set(u,null),c(u));for(const u of r)i.has(u)||(i.set(u,null),c(u));return{cyclePaths:n,orderedModules:a}}const Op=(t,e)=>e?`(${t})`:t;class Lp{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 Eo{constructor(e,n){this.sources=n,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],n=new Map,s=[],r=[],i=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:S,source:{content:x,filename:I}}=m;let E=n.get(I);if(E===void 0)E=e.length,e.push(I),n.set(I,E),s[E]=x;else if(s[E]==null)s[E]=x;else if(x!=null&&s[E]!==x)return re(Xm(I));const b=[u[0],E,g,f];if(S){let A=i.get(S);A===void 0&&(A=r.length,r.push(S),i.set(S,A)),b[4]=A}c.push(b)}}a.push(c)}return{mappings:a,names:r,sources:e,sourcesContent:s}}traceSegment(e,n,s){const r=this.mappings[e];if(!r)return null;let i=0,a=r.length-1;for(;i<=a;){const l=i+a>>1;let c=r[l];if(c[0]!==n&&i===a&&(c=r[r[i][0]>n?Math.max(0,i-1):i]),c[0]===n||i===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:i=l+1}return null}}function Mp(t){return function(e,n){return n.missing?(t(be,(s=n.plugin,{code:yh,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 Eo({mappings:[],names:[]},[e])):new Eo(n,[e]);var s}}function Fp(t,e,n,s,r){let i;if(n){const a=n.sources,l=n.sourcesContent||[],c=ln(t)||".",u=n.sourceRoot||".",d=a.map((m,f)=>new Lp(St(c,u,m),l[f]));i=new Eo(n,d)}else i=new Lp(t,e);return s.reduce(r,i)}let Bp;const jp=t=>function(e){let n,s;try{const a=qe.__wbindgen_add_to_stack_pointer(-16);qe.xxhashBase64Url(a,Zn(e));var r=Qt().getInt32(a+0,!0),i=Qt().getInt32(a+4,!0);return n=r,s=i,br(r,i)}finally{qe.__wbindgen_add_to_stack_pointer(16),qe.__wbindgen_export_0(n,s,1)}}(Cl(t)),Nl={base36:t=>function(e){let n,s;try{const a=qe.__wbindgen_add_to_stack_pointer(-16);qe.xxhashBase36(a,Zn(e));var r=Qt().getInt32(a+0,!0),i=Qt().getInt32(a+4,!0);return n=r,s=i,br(r,i)}finally{qe.__wbindgen_add_to_stack_pointer(16),qe.__wbindgen_export_0(n,s,1)}}(Cl(t)),base64:jp,hex:t=>function(e){let n,s;try{const a=qe.__wbindgen_add_to_stack_pointer(-16);qe.xxhashBase16(a,Zn(e));var r=Qt().getInt32(a+0,!0),i=Qt().getInt32(a+4,!0);return n=r,s=i,br(r,i)}finally{qe.__wbindgen_add_to_stack_pointer(16),qe.__wbindgen_export_0(n,s,1)}}(Cl(t))};function Cl(t){return typeof t=="string"?typeof Buffer>"u"?(Bp??=new TextEncoder,Bp.encode(t)):Buffer.from(t):t}async function Ty(t,e,n,s,r){ct("render chunks",2),function(S){for(const x of S)x.facadeModule&&x.facadeModule.isUserDefinedEntryPoint&&x.getPreliminaryFileName()}(t);const i=await Promise.all(t.map(S=>S.render()));at("render chunks",2),ct("transform chunks",2);const a=Nl[s.hashCharacters],l=function(S){return Object.fromEntries(S.map(x=>{const I=x.getRenderedChunkInfo();return[I.fileName,I]}))}(t),{hashDependenciesByPlaceholder:c,initialHashesByPlaceholder:u,nonHashedChunksWithPlaceholders:d,placeholders:m,renderedChunksByPlaceholder:f}=await async function(S,x,I,E,b,A){const v=[],P=new Map,C=new Map,R=new Map,F=new Set;for(const{preliminaryFileName:{hashPlaceholder:B}}of S)B&&F.add(B);return await Promise.all(S.map(async({chunk:B,preliminaryFileName:{fileName:N,hashPlaceholder:T},preliminarySourcemapFileName:U,magicString:le,usedModules:X})=>{const q={chunk:B,fileName:N,sourcemapFileName:U?.fileName??null,...await Ry(le,N,X,x,I,E,A)},{code:J,map:Y}=q;if(T){const{containedPlaceholders:de,transformedCode:$}=((pe,M)=>{const k=new Set,D=pe.replace(Il,O=>M.has(O)?(k.add(O),`${wl}${"0".repeat(O.length-5)}${Sl}`):O);return{containedPlaceholders:k,transformedCode:D}})(J,F);let ge=$;const fe=E.hookReduceValueSync("augmentChunkHash","",[B.getRenderedChunkInfo()],(pe,M)=>(M&&(pe+=M),pe));fe&&(ge+=fe),P.set(T,q),C.set(T,{containedPlaceholders:de,contentHash:b(ge)})}else v.push(q);const Q=U?.hashPlaceholder;Y&&Q&&R.set(U.hashPlaceholder,b(Y.toString()).slice(0,U.hashPlaceholder.length))})),{hashDependenciesByPlaceholder:C,initialHashesByPlaceholder:R,nonHashedChunksWithPlaceholders:v,placeholders:F,renderedChunksByPlaceholder:P}}(i,l,s,n,a,r),g=function(S,x,I,E,b,A){const v=new Map(I);for(const P of E){const{fileName:C}=S.get(P);let R="";const F=new Set([P]);for(const T of F){const{containedPlaceholders:U,contentHash:le}=x.get(T);R+=le;for(const X of U)F.add(X)}let B,N;do N&&(R=N),N=A(R).slice(0,P.length),B=ky(C,P,N);while(b[xo].has(B.toLowerCase()));b[B]=vl,v.set(P,N)}return v}(f,c,u,m,e,a);(function(S,x,I,E,b,A){for(const{chunk:v,code:P,fileName:C,sourcemapFileName:R,map:F}of S.values()){let B=ns(P,x);const N=ns(C,x);let T=null;F&&(A.sourcemapDebugIds&&(B+=Vp(B,F)),T=R?ns(R,x):`${N}.map`,F.file=ns(F.file,x),B+=zp(T,F,b,A)),I[N]=v.finalizeChunk(B,F,T,x)}for(const{chunk:v,code:P,fileName:C,sourcemapFileName:R,map:F}of E){let B=x.size>0?ns(P,x):P,N=null;F&&(A.sourcemapDebugIds&&(B+=Vp(B,F)),N=R?ns(R,x):`${C}.map`,B+=zp(N,F,b,A)),I[C]=v.finalizeChunk(B,F,N,x)}})(f,g,e,d,n,s),at("transform chunks",2)}async function Ry(t,e,n,s,r,i,a){let l=null;const c=[];let u=await i.hookReduceArg0("renderChunk",[t.toString(),s[e],r,{chunks:s}],(b,A,v)=>{if(A==null)return b;if(typeof A=="string"&&(A={code:A,map:void 0}),A.map!==null){const P=Os(A.map);c.push(P||{missing:!0,plugin:v.name})}return A.code});const{compact:d,dir:m,file:f,sourcemap:g,sourcemapExcludeSources:S,sourcemapFile:x,sourcemapPathTransform:I,sourcemapIgnoreList:E}=r;if(d||u[u.length-1]===`
|
|
47
|
-
`||(u+=`
|
|
48
|
-
`),g){let b;ct("sourcemaps",3),b=f?St(x||f):m?St(m,e):St(e),l=function(A,v,P,C,R,F){const B=Mp(F),N=P.filter(Y=>!Y.excludeFromSourcemap).map(Y=>Fp(Y.id,Y.originalCode,Y.originalSourcemap,Y.sourcemapChain,B)),T=new Eo(v,N),U=C.reduce(B,T);let{sources:le,sourcesContent:X,names:q,mappings:J}=U.traceMappings();if(A){const Y=ln(A);le=le.map(Q=>Tn(Y,Q)),A=Wt(A)}X=R?null:X;for(const Y of P)bl(Y.originalSourcemap,Y.sourcemapChain);return new ti({file:A,mappings:J,names:q,sources:le,sourcesContent:X})}(b,t.generateDecodedMap({}),n,c,S,a);for(let A=0;A<l.sources.length;++A){let v=l.sources[A];const P=`${b}.map`,C=E(v,P);typeof C!="boolean"&&re(It("sourcemapIgnoreList function must return a boolean.")),C&&(l.x_google_ignoreList===void 0&&(l.x_google_ignoreList=[]),l.x_google_ignoreList.includes(A)||l.x_google_ignoreList.push(A)),I&&(v=I(v,P),typeof v!="string"&&re(It("sourcemapPathTransform function must return a string."))),l.sources[A]=an(v)}at("sourcemaps",3)}return{code:u,map:l}}function zp(t,e,n,{sourcemap:s,sourcemapBaseUrl:r}){let i;if(s==="inline")i=e.toUrl();else{const a=Wt(t);i=r?new URL(a,r).toString():a,n.emitFile({fileName:t,originalFileName:null,source:e.toString(),type:"asset"})}return s==="hidden"?"":`//# sourceMappingURL=${i}
|
|
49
|
-
`}function Vp(t,e){const n=Nl.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 Dy{constructor(e,n,s,r,i){this.outputOptions=e,this.unsetOptions=n,this.inputOptions=s,this.pluginDriver=r,this.graph=i,this.facadeChunkByModule=new Map,this.includedNamespaces=new Set}async generate(e){ct("GENERATE",1);const n=Object.create(null),s=(r=>{const i=new Set;return new Proxy(r,{deleteProperty:(a,l)=>(typeof l=="string"&&i.delete(l.toLowerCase()),Reflect.deleteProperty(a,l)),get:(a,l)=>l===xo?i:Reflect.get(a,l),set:(a,l,c)=>(typeof l=="string"&&i.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 r=(()=>{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=`${wl}${Ai(++a).padStart(c-5,"0")}${Sl}`;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}})(),i=await this.generateChunks(s,r);i.length>1&&function(a,l){if(a.format==="umd"||a.format==="iife")return re(nt("output.format",ih,"UMD and IIFE output formats are not supported for code-splitting builds",a.format));if(typeof a.file=="string")return re(nt("output.file",Zs,'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",Fm,'"output.sourcemapFile" is only supported for single-file builds'));!a.amd.autoId&&a.amd.id&&l(be,nt("output.amd.id",rh,'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 i)a.generateExports(),a.inlineTransitiveImports();at("generate chunks",2),await Ty(i,s,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(r){throw await this.pluginDriver.hookParallel("renderError",[r]),r}return(r=>{const i=new Set,a=Object.values(r);for(const l of a)l.type==="asset"&&l.needsCodeReference&&i.add(l.fileName);for(const l of a)if(l.type==="chunk")for(const c of l.referencedFiles)i.has(c)&&i.delete(c);for(const l of i)delete r[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([r,i])=>({alias:r,entries:await this.graph.moduleLoader.addAdditionalModules(i,!0)})));for(const{alias:r,entries:i}of s)for(const a of i)Up(r,a,n);return n}assignManualChunks(e){const n=[],s={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const i of this.graph.modulesById.values())if(i instanceof st){const a=e(i.id,s);typeof a=="string"&&n.push([a,i])}n.sort(([i],[a])=>i>a?1:i<a?-1:0);const r=new Map;for(const[i,a]of n)Up(i,a,r);return r}finaliseAssets(e){if(this.outputOptions.validate){for(const n of Object.values(e))if("code"in n)try{kl(n.code,{jsx:this.inputOptions.jsx!==!1})}catch(s){this.inputOptions.onLog(be,jm(n,s))}}this.pluginDriver.finaliseAssets()}async generateChunks(e,n){const{experimentalMinChunkSize:s,inlineDynamicImports:r,manualChunks:i,preserveModules:a}=this.outputOptions,l=typeof i=="object"?await this.addManualChunks(i):this.assignManualChunks(i),c=function({compact:E,generatedCode:{arrowFunctions:b,constBindings:A,objectShorthand:v,reservedNamesAsProps:P}}){const{_:C,n:R,s:F}=E?{_:"",n:"",s:""}:{_:" ",n:`
|
|
51
|
-
`,s:";"},B=A?"const":"var",N=(X,{isAsync:q,name:J})=>`${q?"async ":""}function${J?` ${J}`:""}${C}(${X.join(`,${C}`)})${C}`,T=b?(X,{isAsync:q,name:J})=>{const Y=X.length===1;return`${J?`${B} ${J}${C}=${C}`:""}${q?`async${Y?" ":C}`:""}${Y?X[0]:`(${X.join(`,${C}`)})`}${C}=>${C}`}:N,U=(X,{functionReturn:q,lineBreakIndent:J,name:Y})=>[`${T(X,{isAsync:!1,name:Y})}${b?J?`${R}${J.base}${J.t}`:"":`{${J?`${R}${J.base}${J.t}`:C}${q?"return ":""}`}`,b?`${Y?";":""}${J?`${R}${J.base}`:""}`:`${F}${J?`${R}${J.base}`:C}}`],le=P?X=>gi.test(X):X=>!fi.has(X)&&gi.test(X);return{_:C,cnst:B,getDirectReturnFunction:U,getDirectReturnIifeLeft:(X,q,{needsArrowReturnParens:J,needsWrappedFunction:Y})=>{const[Q,de]=U(X,{functionReturn:!0,lineBreakIndent:null,name:null});return`${Op(`${Q}${Op(q,b&&J)}${de}`,b||Y)}(`},getFunctionIntro:T,getNonArrowFunctionIntro:N,getObject(X,{lineBreakIndent:q}){const J=q?`${R}${q.base}${q.t}`:C;return`{${X.map(([Y,Q])=>{if(Y===null)return`${J}${Q}`;const de=yi(Y);return Y===Q&&v&&Y===de?J+Y:`${J}${de}:${C}${Q}`}).join(",")}${X.length===0?"":q?`${R}${q.base}`:C}}`},getPropertyAccess:X=>le(X)?`.${X}`:`[${JSON.stringify(X)}]`,n:R,s:F}}(this.outputOptions),u=function(E){const b=[];for(const A of E.values())A instanceof st&&(A.isIncluded()||A.info.isEntry||A.includedDynamicImporters.length>0)&&b.push(A);return b}(this.graph.modulesById),d=function(E){if(E.length===0)return"/";if(E.length===1)return ln(E[0]);const b=E.slice(1).reduce((A,v)=>{const P=v.split(/\/+|\\+/);let C;for(C=0;A[C]===P[C]&&C<Math.min(A.length,P.length);C++);return A.slice(0,C)},E[0].split(/\/+|\\+/));return b.length>1?b.join("/"):"/"}(function(E,b){const A=[];for(const v of E)(v.info.isEntry||b)&&Ht(v.id)&&A.push(v.id);return A}(u,a)),m=function(E,b,A){const v=new Map;for(const P of E.values())P instanceof Ze&&v.set(P,new Yn(P,b,A));return v}(this.graph.modulesById,this.outputOptions,d),f=r?[{alias:null,modules:u}]:a?u.map(E=>({alias:null,modules:[E]})):Iy(this.graph.entryModules,l,s,this.inputOptions.onLog),g=new Array(f.length),S=new Map;let x=0;for(const{alias:E,modules:b}of f){Ny(b);const A=new vn(b,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,S,m,this.facadeChunkByModule,this.includedNamespaces,E,n,e,d,c);g[x++]=A}for(const E of g)E.link();const I=[];for(const E of g)I.push(...E.generateFacades());return[...g,...I]}}function Up(t,e,n){const s=n.get(e);if(typeof s=="string"&&s!==t)return re((r=e.id,i=t,a=s,{code:"INVALID_CHUNK",message:`Cannot assign "${xe(r)}" to the "${i}" chunk as it is already in the "${a}" chunk.`}));var r,i,a;n.set(e,t)}class Oy extends Jh{constructor(){super(),this.parent=null,this.variables.set("undefined",new gd)}findVariable(e){let n=this.variables.get(e);return n||(n=new Pa(e),this.variables.set(e,n)),n}}async function qp(t,e,n,s,r,i,a,l,c,u){const d=await function(m,f,g,S,x,I,E,b){let A=null,v=null;if(x){A=new Set;for(const P of x)m===P.source&&f===P.importer&&A.add(P.plugin);v=(P,C)=>({...P,resolve:(R,F,{attributes:B,custom:N,isEntry:T,skipSelf:U}=pt)=>(U??=!0,U&&x.findIndex(le=>le.plugin===C&&le.source===R&&le.importer===F)!==-1?Promise.resolve(null):S(R,F,N,T,B||ft,U?[...x,{importer:F,plugin:C,source:R}]:x))})}return g.hookFirstAndGetPlugin("resolveId",[m,f,{attributes:b,custom:I,isEntry:E}],v,A)}(t,e,s,r,i,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||Ht(t)||t[0]==="."?async function(m,f,g){return await Ao(m,f,g)??await Ao(m+".mjs",f,g)??await Ao(m+".js",f,g)}(e?St(ln(e),t):St(t),n,u):null}async function Ao(t,e,n){try{const s=await n.lstat(t);if(!e&&s.isSymbolicLink())return await Ao(await n.realpath(t),e,n);if(e&&s.isSymbolicLink()||s.isFile()){const r=Wt(t);if((await n.readdir(ln(t))).includes(r))return t}}catch{}}function Hp(t){return t.charCodeAt(0)===65279?Hp(t.slice(1)):t}const Tl="at position ",Rl="at output position ",Ly={delete:()=>!1,get(){},has:()=>!1,set(){}};function wo(t){return t.startsWith(Tl)||t.startsWith(Rl)?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 Wp=(t,e,n=Fy)=>{const{onwarn:s,onLog:r}=t,i=My(n,s);if(r){const a=Fn[e];return(l,c)=>r(l,Gp(c),(u,d)=>{if(u==="error")return re(Zt(d));Fn[u]>=a&&i(u,Zt(d))})}return i},My=(t,e)=>e?(n,s)=>{n===be?e(Gp(s),r=>t(be,Zt(r))):t(n,s)}:t,Gp=t=>(Object.defineProperty(t,"toString",{value:()=>t.message,writable:!0}),t),Zt=t=>typeof t=="string"?{message:t}:typeof t=="function"?Zt(t()):t,Fy=(t,{message:e})=>{switch(t){case be:return console.warn(e);case Qs:return console.debug(e);default:return console.info(e)}};function Xp(t,e,n,s,r=/$./){const i=new Set(e),a=Object.keys(t).filter(l=>!(i.has(l)||r.test(l)));a.length>0&&s(be,function(l,c,u){return{code:"UNKNOWN_OPTION",message:`Unknown ${l}: ${c.join(", ")}. Allowed options: ${u.join(", ")}`}}(n,a,[...i].sort()))}const By={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}},jy={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"}},zy={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Dl=(t,e,n,s,r)=>{const i=t?.preset;if(i){const a=e[i];if(a)return{...a,...t};re(nt(`${n}.preset`,s,`valid values are ${cn(Object.keys(e))}`,i))}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}${cn(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,r)(t)},So=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 Vy(t,e,n,s){const r=e.id,i=[];let a=t.map===null?null:Os(t.map);const l=t.code;let c=t.ast;const u=[],d=[];let m=!1;const f=()=>m=!0;let g="",S=t.code;const x=E=>(b,A)=>{b=Zt(b),A&&ui(b,A,S,r),b.id=r,b.hook="transform",E(b)};let I;try{I=await n.hookReduceArg0("transform",[S,r],function(E,b,A){let v,P;if(typeof b=="string")v=b;else{if(!b||typeof b!="object")return E;if(e.updateOptions(b),b.code==null)return(b.map||b.ast)&&s(be,function(C){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${C}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(A.name)),E;({code:v,map:P,ast:c}=b)}return P!==null&&i.push(Os(typeof P=="string"?JSON.parse(P):P)||{missing:!0,plugin:A.name}),S=v,v},(E,b)=>{return g=b.name,{...E,addWatchFile(P){u.push(P),E.addWatchFile(P)},cache:m?E.cache:(A=E.cache,v=f,{delete:P=>(v(),A.delete(P)),get:P=>(v(),A.get(P)),has:P=>(v(),A.has(P)),set:(P,C)=>(v(),A.set(P,C))}),debug:x(E.debug),emitFile:P=>(d.push(P),n.emitFile(P)),error:(P,C)=>(typeof P=="string"&&(P={message:P}),C&&ui(P,C,S,r),P.id=r,P.hook="transform",E.error(P)),getCombinedSourcemap(){const P=function(C,R,F,B,N){return B.length===0?F:Os({version:3,...Fp(C,R,F,B,Mp(N)).traceMappings()})}(r,l,a,i,s);return P?(a!==P&&(a=P,i.length=0),new ti({...P,file:null,sourcesContent:P.sourcesContent})):new Gs(l).generateMap({hires:!0,includeContent:!0,source:r})},info:x(E.info),setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:x(E.warn)};var A,v})}catch(E){return re(er(E,g,{hook:"transform",id:r}))}return!m&&d.length>0&&(e.transformFiles=d),{ast:c,code:I,customTransformCache:m,originalCode:l,originalSourcemap:a,sourcemapChain:i,transformDependencies:u}}const Ol="resolveDependencies";class Uy{constructor(e,n,s,r){this.graph=e,this.modulesById=n,this.options=s,this.pluginDriver=r,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(i,a,l,c,u,d=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(i,a,!1)&&await qp(i,a,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,d,l,typeof c=="boolean"?c:!a,u,this.options.fs),a,i),u),this.hasModuleSideEffects=s.treeshake?s.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,n){const s=this.extendLoadModulesPromise(Promise.all(e.map(r=>this.loadEntryModule(r,!1,void 0,null,n))));return await this.awaitLoadModulesPromise(),s}async addEntryModules(e,n){const s=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const r=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const i=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,Jp(c,e[l],n,r+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:i}}async emitChunk({fileName:e,id:n,importer:s,name:r,implicitlyLoadedAfterOneOf:i,preserveSignature:a}){const l={fileName:e||null,id:n,importer:s,name:r||null},c=i?await this.addEntryWithImplicitDependants(l,i):(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||Ol)).info}addEntryWithImplicitDependants(e,n){const s=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then(async r=>{if(Jp(r,e,!1,s),!r.info.isEntry){const i=await Promise.all(n.map(a=>this.loadEntryModule(a,!1,e.importer,r.id)));if(!r.info.isEntry){this.implicitEntryModules.add(r);for(const a of i)r.implicitlyLoadedAfter.add(a);for(const a of r.implicitlyLoadedAfter)a.implicitlyLoadedBefore.add(r)}}return r}))}async addModuleSource(e,n,s){let r;try{r=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 i=typeof r=="string"?{code:r}:r!=null&&typeof r=="object"&&typeof r.code=="string"?r: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));i.code=Hp(i.code);const a=this.graph.cachedModules.get(e);if(!a||a.customTransformCache||a.originalCode!==i.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(i),await s.setSource(await Vy(i,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(r=>r.then(async([i,a])=>a===null?null:typeof a=="string"?(i.resolution=a,null):i.resolution=await this.fetchResolvedDependency(xe(a.id),e.id,a))));for(const r of s)r&&(e.dynamicDependencies.add(r),r.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:n,meta:s,moduleSideEffects:r,syntheticNamedExports:i},a,l,c){const u=this.modulesById.get(n);if(u instanceof st)return a&&yo(e,u.info.attributes)&&this.options.onLog(be,hi(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,r,i,s,e);this.modulesById.set(n,d);const m=this.addModuleSource(n,a,d).then(()=>[this.getResolveStaticDependencyPromises(d),this.getResolveDynamicImportPromises(d),f]),f=Yp(m).then(()=>this.pluginDriver.hookParallel("moduleParsed",[d.info]));f.catch(()=>{}),this.moduleLoadPromises.set(d,m);const g=await m;return c?c===Ol&&await f:await this.fetchModuleDependencies(d,...g),d}async fetchModuleDependencies(e,n,s,r){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,n),this.fetchDynamicDependencies(e,s)]),e.linkImports(),await r)}fetchResolvedDependency(e,n,s){if(s.external){const{attributes:r,external:i,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));yo(u.info.attributes,r)&&this.options.onLog(be,hi(u.info.attributes,r,e,n))}else u=new Ze(this.options,a,l,c,i!=="absolute"&&Ht(a),r),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(r=>r.then(([i,a])=>this.fetchResolvedDependency(i,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:r}=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"||!Ht(e.id)||l===!0&&Ll(e.id,s,r)||"absolute")}}const a=this.options.external(e,n,!0);return{external:a&&(Ll(e,s,r)||"absolute"),id:a&&r?Kp(e,n):e}}const i=r?Kp(s,n):s;return e===!1||this.options.external(i,n,!0)?{external:Ll(i,s,r)||"absolute",id:i}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map(async n=>{const s=await this.resolveDynamicImport(e,n.argument,e.id,gp(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 r=this.moduleLoadPromises.get(e);if(s)return s===Ol?Yp(r):r;if(n){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const i of e.implicitlyLoadedAfter)i.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await r)}handleInvalidResolvedId(e,n,s,r){return e===null?ea(n)?re(function(i,a){return{code:kh,exporter:i,id:a,message:`Could not resolve "${i}" from "${xe(a)}"`}}(n,s)):(this.options.onLog(be,function(i,a){return{code:kh,exporter:i,id:a,message:`"${i}" 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:r,external:!0,id:n,meta:{},moduleSideEffects:this.hasModuleSideEffects(n,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(be,function(i,a){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:i,message:`External "${i}" cannot have "syntheticNamedExports" enabled (imported by "${xe(a)}").`}}(n,s)),e)}async loadEntryModule(e,n,s,r,i=!1){const a=await qp(e,s,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,ft,!0,ft,this.options.fs);if(a==null)return re(r===null?function(c){return{code:xh,message:`Could not resolve entry module "${xe(c)}".`}}(e):function(c,u){return{code:pa,message:`Module "${xe(c)}" that should be implicitly loaded before "${xe(u)}" could not be resolved.`}}(e,r));const l=typeof a=="object"&&a.external;return a===!1||l?re(r===null?l&&i?{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${e}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}:function(c){return{code:xh,message:`Entry module "${xe(c)}" cannot be external.`}}(e):function(c,u){return{code:pa,message:`Module "${xe(c)}" that should be implicitly loaded before "${xe(u)}" cannot be external.`}}(e,r)):this.fetchModule(this.getResolvedIdWithDefaults(typeof a=="object"?a:{id:a},ft),void 0,n,!1)}async resolveDynamicImport(e,n,s,r){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[n,s,{attributes:r}]);if(typeof n!="string")return typeof i=="string"?i:i?this.getResolvedIdWithDefaults(i,r):null;if(i==null){const a=e.resolvedIds[n];return a?(yo(a.attributes,r)&&this.options.onLog(be,hi(a.attributes,r,n,s)),a):e.resolvedIds[n]=this.handleInvalidResolvedId(await this.resolveId(n,e.id,ft,!1,r),n,e.id,r)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,s,n),r),n,s,r)}}function Kp(t,e){return ea(t)?e?St(e,"..",t):St(t):t}function Jp(t,{fileName:e,name:n},s,r){if(e!==null)t.chunkFileNames.add(e);else if(n!==null){let i=0;for(;t.chunkNames[i]?.priority<r;)i++;t.chunkNames.splice(i,0,{isUserDefined:s,name:n,priority:r})}}function Ll(t,e,n){return n===!0||n==="ifRelativeSource"&&ea(e)||!Ht(t)}async function Yp(t){const[e,n]=await t;return Promise.all([...e,...n])}function Qp(t,e,n,s,r,i,a,l,c){const u=a.sanitizeFileName(t||"asset");return Pl(_l(typeof a.assetFileNames=="function"?a.assetFileNames({get name(){return Bn('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',bs,!1,c),t},names:e,get originalFileName(){return Bn('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',bs,!1,c),s},originalFileNames:r,source:n,type:"asset"}):a.assetFileNames,"output.assetFileNames",{ext:()=>xn(u).slice(1),extname:()=>xn(u),hash:d=>i.slice(0,Math.min(Math.max(0,d||8),21)),name:()=>u.slice(0,Math.max(0,u.length-xn(u).length))}),l)}function Zp(t,{bundle:e},n){e[xo].has(t.toLowerCase())?n(be,function(s){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${s}" overwrites a previously emitted file of the same name.`}}(t)):e[t]=vl}const qy=new Set(["chunk","asset","prebuilt-chunk"]);function e1(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 Hy{constructor(e,n,s){this.graph=e,this.options=n,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=r=>function(i){return!!(i&&qy.has(i.type))}(r)?r.type==="prebuilt-chunk"?this.emitPrebuiltChunk(r):function(i){const a=i.fileName||i.name;return!a||typeof a=="string"&&!li(a)}(r)?r.type==="chunk"?this.emitChunk(r):this.emitAsset(r):re(It(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${r.fileName||r.name}".`)):re(It(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${r&&r.type}".`)),this.finaliseAssets=()=>{for(const[r,i]of this.filesByReferenceId)if(i.type==="asset"&&typeof i.fileName!="string")return re(Bm(i.name||r))},this.getFileName=r=>{const i=this.filesByReferenceId.get(r);return i?i.type==="chunk"?(a=i,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.`})):i.type==="prebuilt-chunk"?i.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}(i,r):re({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${r}".`});var a,l},this.setAssetSource=(r,i)=>{const a=this.filesByReferenceId.get(r);if(!a)return re({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${r}".`});if(a.type!=="asset")return re(It(`Asset sources can only be set for emitted assets but "${r}" 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||r}", source already set.`});const l=e1(i,a,r);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=r=>{this.facadeChunkByModule=r},this.setOutputBundle=(r,i)=>{const a=Nl[i.hashCharacters],l=this.output={bundle:r,fileNamesBySourceHash:new Map,getHash:a,outputOptions:i};for(const u of this.filesByReferenceId.values())u.fileName&&Zp(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),()=>[]).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:r})=>r.has(s)));e.referenceId=s,this.filesByReferenceId.set(s,e);for(const{filesByReferenceId:r}of this.outputFileEmitters)r.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:e1(e.source,e,null),s=e.originalFileName||null;typeof s=="string"&&(this.graph.watchFiles[s]=!0);const r={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,originalFileName:s,referenceId:"",source:n,type:"asset"},i=this.assignReferenceId(r,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(r,this.output);else for(const a of this.outputFileEmitters)a.emitAssetWithReferenceId(r,a.output);return i}emitAssetWithReferenceId(e,n){const{fileName:s,source:r}=e;s&&Zp(s,n,this.options.onLog),r!==void 0&&this.finalizeAdditionalAsset(e,r,n)}emitChunk(e){if(this.graph.phase>ts.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"||li(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:r,getHash:i,outputOptions:a}){let{fileName:l,name:c,needsCodeReference:u,originalFileName:d,referenceId:m}=e;if(!l){const S=i(n);l=r.get(S),l||(l=Qp(c,c?[c]:[],n,d,d?[d]:[],S,a,s,this.options),r.set(S,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:S}=this;s[l]={fileName:l,get name(){return Bn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',bs,!1,S),c},names:c?[c]:[],needsCodeReference:u,get originalFileName(){return Bn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',bs,!1,S),d},originalFileNames:d?[d]:[],source:n,type:"asset"}}}finalizeAssetsWithSameSource(e,n,{bundle:s,fileNamesBySourceHash:r,outputOptions:i}){const{names:a,originalFileNames:l}=function(f){const g=[],S=[];for(const{name:x,originalFileName:I}of f)typeof x=="string"&&g.push(x),I&&S.push(I);return S.sort(),g.sort((x,I)=>x.length-I.length||(x>I?1:x===I?0:-1)),{names:g,originalFileNames:S}}(e);let c,u="",d=!0;for(const f of e){d&&=f.needsCodeReference;const g=Qp(f.name,a,f.source,f.originalFileName,l,n,i,s,this.options);(!u||g.length<u.length||g.length===u.length&&g<u)&&(u=g,c=f)}r.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 Bn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',bs,!1,m),c.name},names:a,needsCodeReference:d,get originalFileName(){return Bn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',bs,!1,m),c.originalFileName},originalFileNames:l,source:c.source,type:"asset"}}}function Ls(t,e,n,s,r){return Fn[t]<Fn[r]?Mt:(i,a)=>{a!=null&&n(be,{code:"INVALID_LOG_POSITION",message:`Plugin "${s}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(i=Zt(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=e,i.plugin=s,n(t,i)}}function Wy(t,e,n,s,r,i){const{logLevel:a,onLog:l}=s;let c,u=!0;if(typeof t.cacheKey!="string"&&(t.name.startsWith(Tl)||t.name.startsWith(Rl)||i.has(t.name)?u=!1:i.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 S=m[g];if(S)return S[0]=0,S[1]},has(g){const S=m[g];return!!S&&(S[0]=0,!0)},set(g,S){m[g]=[0,S]}}}else d=t.name,c={delete:()=>wo(d),get:()=>wo(d),has:()=>wo(d),set:()=>wo(d)};else c=Ly;var d,m;return{addWatchFile(f){n.watchFiles[f]=!0},cache:c,debug:Ls(Qs,"PLUGIN_LOG",l,t.name,a),emitFile:r.emitFile.bind(r),error:f=>re(er(Zt(f),t.name)),fs:s.fs,getFileName:r.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:Ls(Mn,"PLUGIN_LOG",l,t.name,a),load:f=>n.moduleLoader.preloadModule(f),meta:{rollupVersion:Qo,watchMode:n.watchMode},parse:kl,resolve:(f,g,{attributes:S,custom:x,isEntry:I,skipSelf:E}=pt)=>(E??=!0,n.moduleLoader.resolveId(f,g,x,I,S||ft,E?[{importer:g,plugin:t,source:f}]:null)),setAssetSource:r.setAssetSource,warn:Ls(be,"PLUGIN_WARNING",l,t.name,a)}}function Ml(t){return Array.isArray(t)?t.filter(Boolean):t?[t]:[]}function t1(t){if(t instanceof RegExp)return r=>{const i=an(r),a=t.test(i);return t.lastIndex=0,a};const e=process.cwd(),n=function(r,i){return r.startsWith("**")||Ht(r)?an(r):an(St(i,r))}(t,e),s=qg(n,{dot:!0});return r=>{const i=an(r);return s(i)}}function n1(t){return t instanceof RegExp?e=>{const n=t.test(e);return t.lastIndex=0,n}:e=>e.includes(t)}function s1(t,e){if(t||e)return n=>!t?.some(s=>s(n))&&(!!e?.some(s=>s(n))||!(e&&e.length>0))}function r1(t){return typeof t=="string"||t instanceof RegExp?{include:[t]}:Array.isArray(t)?{include:t}:{exclude:t.exclude?Ml(t.exclude):void 0,include:t.include?Ml(t.include):void 0}}function i1(t){if(!t)return;const{exclude:e,include:n}=r1(t),s=e?.map(t1),r=n?.map(t1);return s1(s,r)}function Gy(t,e){if(!t&&!e)return;const n=i1(t),s=function(r){if(!r)return;const{exclude:i,include:a}=r1(r),l=i?.map(n1),c=a?.map(n1);return s1(l,c)}(e);return(r,i)=>{let a=!0;return n&&(a&&=n(r)),!!a&&(s&&(a&&=s(i)),a)}}const Xy=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 Fl{constructor(e,n,s,r,i){this.graph=e,this.options=n,this.pluginCache=r,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.compiledPluginFilters={idOnlyFilter:new WeakMap,transformFilter:new WeakMap},this.fileEmitter=new Hy(e,n,i&&i.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...i?i.plugins:[],...s];const a=new Set;if(this.pluginContexts=new Map(this.plugins.map(l=>[l,Wy(l,r,e,n,this.fileEmitter,a)])),i)for(const l of s)for(const c of Xy)c in l&&n.onLog(be,Hm(l.name,c))}createOutputPluginDriver(e){return new Fl(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,n,s,r){return this.hookFirstAndGetPlugin(e,n,s,r).then(i=>i&&i[0])}async hookFirstAndGetPlugin(e,n,s,r){for(const i of this.getSortedPlugins(e)){if(r?.has(i))continue;const a=await this.runHook(e,n,i,s);if(a!=null)return[a,i]}return null}hookFirstSync(e,n,s){for(const r of this.getSortedPlugins(e)){const i=this.runHookSync(e,n,r,s);if(i!=null)return i}return null}async hookParallel(e,n,s){const r=[];for(const i of this.getSortedPlugins(e))i[e].sequential?(await Promise.all(r),r.length=0,await this.runHook(e,n,i,s)):r.push(this.runHook(e,n,i,s));await Promise.all(r)}hookReduceArg0(e,[n,...s],r,i){let a=Promise.resolve(n);for(const l of this.getSortedPlugins(e))a=a.then(c=>this.runHook(e,[c,...s],l,i).then(u=>r.call(this.pluginContexts.get(l),c,u,l)));return a}hookReduceArg0Sync(e,[n,...s],r,i){for(const a of this.getSortedPlugins(e)){const l=[n,...s],c=this.runHookSync(e,l,a,i);n=r.call(this.pluginContexts.get(a),n,c,a)}return n}async hookReduceValue(e,n,s,r){const i=[],a=[];for(const l of this.getSortedPlugins(e,Jy))l[e].sequential?(i.push(...await Promise.all(a)),a.length=0,i.push(await this.runHook(e,s,l))):a.push(this.runHook(e,s,l));return i.push(...await Promise.all(a)),i.reduce(r,await n)}hookReduceValueSync(e,n,s,r,i){let a=n;for(const l of this.getSortedPlugins(e)){const c=this.runHookSync(e,s,l,i);a=r.call(this.pluginContexts.get(l),a,c,l)}return a}hookSeq(e,n,s){let r=Promise.resolve();for(const i of this.getSortedPlugins(e))r=r.then(()=>this.runHook(e,n,i,s));return r.then(Yy)}getSortedPlugins(e,n){return bt(this.sortedPlugins,e,()=>Bl(e,this.plugins,n))}runHook(e,n,s,r){const i=s[e],a=typeof i=="object"?i.handler:i;if(typeof i=="object"&&"filter"in i&&i.filter){if(e==="transform"){const u=i.filter,d=n,m=bt(this.compiledPluginFilters.transformFilter,u,()=>Gy(u.id,u.code));if(m&&!m(d[1],d[0]))return Promise.resolve()}else if(e==="resolveId"||e==="load"){const u=i.filter,d=n,m=bt(this.compiledPluginFilters.idOnlyFilter,u,()=>function(f){const g=i1(f);return g?S=>!!g(S):void 0}(u.id));if(m&&!m(d[0]))return Promise.resolve()}}let l=this.pluginContexts.get(s);r&&(l=r(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(er(u,s.name,{hook:e}))))}runHookSync(e,n,s,r){const i=s[e],a=typeof i=="object"?i.handler:i;let l=this.pluginContexts.get(s);r&&(l=r(l,s));try{return a.apply(l,n)}catch(c){return re(er(c,s.name,{hook:e}))}}}function Bl(t,e,n=Ky){const s=[],r=[],i=[];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"){i.push(a);continue}}else n(l,t,a);r.push(a)}}return[...s,...r,...i]}function Ky(t,e,n){typeof t!="function"&&re(function(s,r){return{code:ph,hook:s,message:`Error running plugin hook "${s}" for plugin "${r}", expected a function hook or an object with a "handler" function.`,plugin:r}}(e,n.name))}function Jy(t,e,n){if(typeof t!="string"&&typeof t!="function")return re(function(s,r){return{code:ph,hook:s,message:`Error running plugin hook "${s}" for plugin "${r}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:r}}(e,n.name))}function Yy(){}class Qy{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:r}=e;try{s(await r())}catch(i){n(i)}}this.workerCount--}}class Zy{constructor(e,n){if(this.options=e,this.astLru=function(s){var r,i,a,l=s;function c(d,m){++r>l&&(a=i,u(1),++r),i[d]=m}function u(d){r=0,i=Object.create(null),d||(a=Object.create(null))}return u(),{clear:u,has:function(d){return i[d]!==void 0||a[d]!==void 0},get:function(d){var m=i[d];return m!==void 0?m:(m=a[d])!==void 0?(c(d,m),m):void 0},set:function(d,m){i[d]!==void 0?i[d]=m:c(d,m)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new gs,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=ts.LOAD_AND_PARSE,this.scope=new Oy,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=s=>{const r=this.modulesById.get(s);return r?r.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 r=this.pluginCache[s];for(const i of Object.values(r))i[0]++}}if(n){this.watchMode=!0;const s=(...i)=>this.pluginDriver.hookParallel("watchChange",i),r=()=>this.pluginDriver.hookParallel("closeWatcher",[]);n.onCurrentRun("change",s),n.onCurrentRun("close",r)}this.pluginDriver=new Fl(this,e,e.plugins,this.pluginCache),this.moduleLoader=new Uy(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Qy(e.maxParallelFileOps),this.pureFunctions=(({treeshake:s})=>{const r=Object.create(null);for(const i of s?s.manualPureFunctions:[]){let a=r;for(const l of i.split("."))a=a[l]||=Object.create(null);a[ma]=!0}return r})(e)}async build(){ct("generate module graph",2),await this.generateModuleGraph(),at("generate module graph",2),ct("sort and bind modules",2),this.phase=ts.ANALYSE,this.sortModules(),at("sort and bind modules",2),ct("mark included statements",2),this.includeStatements(),at("mark included statements",2),this.phase=ts.GENERATE}getCache(){for(const e in this.pluginCache){const n=this.pluginCache[e];let s=!0;for(const[r,i]of Object.entries(n))i[0]>=this.options.experimentalCacheExpiry?delete n[r]: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)As(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 r of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(r),r.include(Lt(),!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(Gm(s))}sortModules(){const{orderedModules:e,cyclePaths:n}=Cy(this.entryModules);for(const s of n)this.options.onLog(be,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,r]=n.module.getVariableForExportName(n.name);s||e.log(be,di(n.name,e.id,n.module.id,!!r?.missingButExportExists),n.start)}}}function o1(t,e){return e()}function a1(t,e,n,s){t=Bl("onLog",t);const r=Fn[s],i=(a,l,c=Xu)=>{if(uh(l),!(Fn[a]<r)){for(const u of t){if(c.has(u))continue;const{onLog:d}=u,m=f=>Fn[f]<r?Mt:g=>i(f,Zt(g),new Set(c).add(u));if(("handler"in d?d.handler:d).call({debug:m(Qs),error:f=>re(Zt(f)),info:m(Mn),meta:{rollupVersion:Qo,watchMode:n},warn:m(be)},a,l)===!1)return}e(a,l)}};return i}const Nt=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)),eb=Nt("fs.appendFile"),tb=Nt("fs.copyFile"),nb=Nt("fs.mkdir"),sb=Nt("fs.mkdtemp"),rb=Nt("fs.readdir"),ib=Nt("fs.readFile"),ob=Nt("fs.realpath"),ab=Nt("fs.rename"),lb=Nt("fs.rmdir"),cb=Nt("fs.stat"),ub=Nt("fs.lstat"),hb=Nt("fs.unlink"),db=Nt("fs.writeFile");var pb=Object.freeze({__proto__:null,appendFile:eb,copyFile:tb,lstat:ub,mkdir:nb,mkdtemp:sb,readFile:ib,readdir:rb,realpath:ob,rename:ab,rmdir:lb,stat:cb,unlink:hb,writeFile:db});const fb=t=>t.cache===!0?void 0:t.cache?.cache||t.cache,mb=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 Ml(t))s instanceof RegExp?n.push(s):e.add(s);return(s,...r)=>e.has(s)||n.some(i=>i.test(s))}return()=>!1},gb=t=>{const e=t.input;return e==null?[]:typeof e=="string"?[e]:e},yb=t=>{const e=t.jsx;if(!e)return!1;const n=Dl(e,jy,"jsx",ci,"false, "),{factory:s,importSource:r,mode:i}=n;switch(i){case"automatic":return{factory:s||"React.createElement",importSource:r||"react",jsxImportSource:n.jsxImportSource||"react/jsx-runtime",mode:"automatic"};case"preserve":return!r||s||n.fragment||re(nt("jsx",ci,"when preserving JSX and specifying an importSource, you also need to specify a factory or fragment")),{factory:s||null,fragment:n.fragment||null,importSource:r||null,mode:"preserve"};default:return i&&i!=="classic"&&re(nt("jsx.mode",ci,'mode must be "automatic", "classic" or "preserve"',i)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:r||null,mode:"classic"}}},bb=t=>{const e=t.maxParallelFileOps;return typeof e=="number"?e<=0?1/0:e:1e3},xb=(t,e)=>{const n=t.moduleContext;if(typeof n=="function")return s=>n(s)??e;if(n){const s=Object.create(null);for(const[r,i]of Object.entries(n))s[St(r)]=i;return r=>s[r]??e}return()=>e},kb=t=>{if(t.treeshake===!1)return!1;const e=Dl(t.treeshake,By,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:e.annotations!==!1,correctVarValueBeforeDeclaration:e.correctVarValueBeforeDeclaration===!0,manualPureFunctions:e.manualPureFunctions??Qe,moduleSideEffects:Eb(e.moduleSideEffects),propertyReadSideEffects:e.propertyReadSideEffects==="always"?"always":e.propertyReadSideEffects!==!1,tryCatchDeoptimization:e.tryCatchDeoptimization!==!1,unknownGlobalSideEffects:e.unknownGlobalSideEffects!==!1}},Eb=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},Ab=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,wb=/^[a-z]:/i;function Sb(t){const e=wb.exec(t),n=e?e[0]:"";return n+t.slice(n.length).replace(Ab,"_")}const Ib=(t,e,n)=>{const{file:s}=t;if(typeof s=="string"){if(e)return re(nt("output.file",Zs,'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",Zs,'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",ih,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',e))}},_b=(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",oh,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},Pb=(t,e,n)=>{const s=t.preserveModules||!1;if(s){if(e)return re(nt("output.inlineDynamicImports",oh,'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},$b=t=>{const{preserveModulesRoot:e}=t;if(e!=null)return St(e)},Nb=t=>{const e={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...t.amd};return(e.autoId||e.basePath)&&e.id?re(nt("output.amd.id",rh,'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}},Io=(t,e)=>{const n=t[e];return typeof n=="function"?n:()=>n||""},Cb=(t,e)=>{const{dir:n}=t;return typeof n=="string"&&typeof e=="string"?re(nt("output.dir",Zs,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},Tb=(t,e)=>{const n=t.entryFileNames;return n==null&&e.add("entryFileNames"),n??"[name].js"};function Rb(t,e){const n=t.exports;if(n==null)e.add("exports");else if(!["default","named","none","auto"].includes(n))return re({code:hh,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:ot(ha)});return n||"auto"}const Db=(t,e)=>(t.externalImportAssertions!=null&&Bn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,e),t.externalImportAttributes??t.externalImportAssertions??!0),Ob=t=>{const e=Dl(t.generatedCode,zy,"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}},Lb=(t,e)=>{if(e)return"";const n=t.indent;return n===!1?"":n??!0},l1=new Set(["compat","auto","esModule","default","defaultOnly"]),Mb=t=>{const e=t.interop;if(typeof e=="function"){const n=Object.create(null);let s=null;return r=>r===null?s||jl(s=e(r)):r in n?n[r]:jl(n[r]=e(r))}return e===void 0?()=>"default":()=>jl(e)},jl=t=>l1.has(t)?t:re(nt("output.interop",da,`use one of ${Array.from(l1,e=>JSON.stringify(e)).join(", ")}`,t)),Fb=(t,e,n)=>{const s=t.manualChunks;if(s){if(e)return re(nt("output.manualChunks",ah,'this option is not supported for "output.inlineDynamicImports"'));if(n)return re(nt("output.manualChunks",ah,'this option is not supported for "output.preserveModules"'))}return s||{}},Bb=(t,e,n)=>t.minifyInternalExports??(n||e==="es"||e==="system"),jb=(t,e)=>{const n=t.sourcemapFileNames;return n==null&&e.add("sourcemapFileNames"),n},zb=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 Vb(t){return async function(e,n){const{options:s,unsetOptions:r}=await async function(c,u){if(!c)throw new Error("You must supply an options object to rollup");const d=await async function(g,S){const x=Bl("options",await So(g.plugins)),I=g.logLevel||Mn,E=a1(x,Wp(g,I),S,I);for(const b of x){const{name:A,options:v}=b,P="handler"in v?v.handler:v,C=await P.call({debug:Ls(Qs,"PLUGIN_LOG",E,A,I),error:R=>re(er(Zt(R),A,{hook:"onLog"})),info:Ls(Mn,"PLUGIN_LOG",E,A,I),meta:{rollupVersion:Qo,watchMode:S},warn:Ls(be,"PLUGIN_WARNING",E,A,I)},g);C&&(g=C)}return g}(c,u),{options:m,unsetOptions:f}=await async function(g,S){const x=new Set,I=g.context??"undefined",E=await So(g.plugins),b=g.logLevel||Mn,A=a1(E,Wp(g,b),S,b),v=g.strictDeprecations||!1,P=bb(g),C={cache:fb(g),context:I,experimentalCacheExpiry:g.experimentalCacheExpiry??10,experimentalLogSideEffects:g.experimentalLogSideEffects||!1,external:mb(g.external),fs:g.fs??pb,input:gb(g),jsx:yb(g),logLevel:b,makeAbsoluteExternalsRelative:g.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:P,moduleContext:xb(g,I),onLog:A,perf:g.perf||!1,plugins:E,preserveEntrySignatures:g.preserveEntrySignatures??"exports-only",preserveSymlinks:g.preserveSymlinks||!1,shimMissingExports:g.shimMissingExports||!1,strictDeprecations:v,treeshake:kb(g)};return Xp(g,[...Object.keys(C),"onwarn","watch"],"input options",A,/^(output)$/),{options:C,unsetOptions:x}}(d,u);return c1(m.plugins,Tl),{options:m,unsetOptions:f}}(e,n!==null);(function(c){c.perf?(Nr=new Map,ct=uy,at=hy,c.plugins=c.plugins.map(fy)):(ct=Mt,at=Mt)})(s),await async function(){await Ld()}();const i=new Zy(s,n),a=e.cache!==!1;e.cache&&(s.cache=void 0,e.cache=void 0),ct("BUILD",1),await o1(i.pluginDriver,async()=>{try{ct("initialize",2),await i.pluginDriver.hookParallel("buildStart",[s]),at("initialize",2),await i.build()}catch(c){const u=Object.keys(i.watchFiles);u.length>0&&(c.watchFiles=u);try{await i.pluginDriver.hookParallel("buildEnd",[c])}catch(d){const m=xs({...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 i.pluginDriver.hookParallel("closeBundle",[m]),m}throw await i.pluginDriver.hookParallel("closeBundle",[c]),c}try{await i.pluginDriver.hookParallel("buildEnd",[])}catch(c){throw await i.pluginDriver.hookParallel("closeBundle",[c]),c}}),at("BUILD",1);const l={cache:a?i.getCache():void 0,async close(){l.closed||(l.closed=!0,await i.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.'}):u1(!1,s,r,c,i),get watchFiles(){return Object.keys(i.watchFiles)},write:async c=>l.closed?re({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):u1(!0,s,r,c,i)};return s.perf&&(l.getTimings=dy),l}(t,null)}function c1(t,e){for(const[n,s]of t.entries())s.name||(s.name=`${e}${n+1}`)}async function u1(t,e,n,s,r){const{options:i,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 So(c.plugins);c1(f,Rl);const g=u.createOutputPluginDriver(f);return{...await Ub(d,m,c,g),outputPluginDriver:g}}(s,r.pluginDriver,e,n);return o1(0,async()=>{const c=new Dy(i,l,e,a,r),u=await c.generate(t);if(t){if(ct("WRITE",1),!i.dir&&!i.file)return re({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:ot(Zs)});await Promise.all(Object.values(u).map(m=>r.fileOperationQueue.run(()=>async function(f,g,{fs:{mkdir:S,writeFile:x}}){const I=St(g.dir||ln(g.file),f.fileName);return await S(ln(I),{recursive:!0}),x(I,f.type==="asset"?f.source:f.code)}(m,i,e)))),await a.hookParallel("writeBundle",[i,u]),at("WRITE",1)}return d=u,{output:Object.values(d).filter(m=>Object.keys(m).length>0).sort((m,f)=>h1(m)-h1(f))};var d})}function Ub(t,e,n,s){return async function(r,i,a){const l=new Set(a),c=r.compact||!1,u=vb(r),d=_b(r,i),m=Pb(r,d,i),f=Ib(r,m,i),g=Ob(r),S=Db(r,i),x={amd:Nb(r),assetFileNames:r.assetFileNames??"assets/[name]-[hash][extname]",banner:Io(r,"banner"),chunkFileNames:r.chunkFileNames??"[name]-[hash].js",compact:c,dir:Cb(r,f),dynamicImportInCjs:r.dynamicImportInCjs??!0,entryFileNames:Tb(r,l),esModule:r.esModule??"if-default-prop",experimentalMinChunkSize:r.experimentalMinChunkSize??1,exports:Rb(r,l),extend:r.extend||!1,externalImportAssertions:S,externalImportAttributes:S,externalLiveBindings:r.externalLiveBindings??!0,file:f,footer:Io(r,"footer"),format:u,freeze:r.freeze??!0,generatedCode:g,globals:r.globals||{},hashCharacters:r.hashCharacters??"base64",hoistTransitiveImports:r.hoistTransitiveImports??!0,importAttributesKey:r.importAttributesKey??"assert",indent:Lb(r,c),inlineDynamicImports:d,interop:Mb(r),intro:Io(r,"intro"),manualChunks:Fb(r,d,m),minifyInternalExports:Bb(r,u,c),name:r.name,noConflict:r.noConflict||!1,outro:Io(r,"outro"),paths:r.paths||{},plugins:await So(r.plugins),preserveModules:m,preserveModulesRoot:$b(r),reexportProtoFromExternal:r.reexportProtoFromExternal??!0,sanitizeFileName:typeof r.sanitizeFileName=="function"?r.sanitizeFileName:r.sanitizeFileName===!1?I=>I:Sb,sourcemap:r.sourcemap||!1,sourcemapBaseUrl:zb(r),sourcemapDebugIds:r.sourcemapDebugIds||!1,sourcemapExcludeSources:r.sourcemapExcludeSources||!1,sourcemapFile:r.sourcemapFile,sourcemapFileNames:jb(r,l),sourcemapIgnoreList:typeof r.sourcemapIgnoreList=="function"?r.sourcemapIgnoreList:r.sourcemapIgnoreList===!1?()=>!1:I=>I.includes("node_modules"),sourcemapPathTransform:r.sourcemapPathTransform,strict:r.strict??!0,systemNullSetters:r.systemNullSetters??!0,validate:r.validate||!1,virtualDirname:r.virtualDirname||"_virtual"};return Xp(r,Object.keys(x),"output options",i.onLog),{options:x,unsetOptions:l}}(s.hookReduceArg0Sync("outputOptions",[n],(r,i)=>i||r,r=>{const i=()=>r.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{...r,emitFile:i,setAssetSource:i}}),t,e)}var Cr;function h1(t){return t.type==="asset"?Cr.ASSET:t.isEntry?Cr.ENTRY_CHUNK:Cr.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"}(Cr||(Cr={}));const qb=t=>t.length!==32||!/^[0-9a-f]{32}$/i.test(t)?!1:t[12]==="4",Hb=()=>typeof globalThis.crypto<"u"?globalThis.crypto:require("node:crypto").webcrypto,Wb=Hb(),d1=()=>{const t=new Uint8Array(16);return Wb.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("")},Gb=()=>d1().substring(0,8),Xb=(t,e)=>{if(t&&t.files){for(const n of Object.keys(t.files))if(t.files[n].name===e)return n}return null},p1=(t,e)=>{const n=Xb(t,e);return n&&t&&t.files?t.files[n].text:null},Kb=t=>{const e={};if(!t)return e;for(const n of Object.values(t))e[n.name]=n.text;return e},Jb=t=>Object.entries(t).reduce((e,[n,s])=>(e[Gb()]={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 r=s+1;t[t._as=r]="_as";const i=r+1;t[t._assert=i]="_assert";const a=i+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 S=g+1;t[t._from=S]="_from";const x=S+1;t[t._get=x]="_get";const I=x+1;t[t._global=I]="_global";const E=I+1;t[t._implements=E]="_implements";const b=E+1;t[t._infer=b]="_infer";const A=b+1;t[t._interface=A]="_interface";const v=A+1;t[t._is=v]="_is";const P=v+1;t[t._keyof=P]="_keyof";const C=P+1;t[t._mixins=C]="_mixins";const R=C+1;t[t._module=R]="_module";const F=R+1;t[t._namespace=F]="_namespace";const B=F+1;t[t._of=B]="_of";const N=B+1;t[t._opaque=N]="_opaque";const T=N+1;t[t._out=T]="_out";const U=T+1;t[t._override=U]="_override";const le=U+1;t[t._private=le]="_private";const X=le+1;t[t._protected=X]="_protected";const q=X+1;t[t._proto=q]="_proto";const J=q+1;t[t._public=J]="_public";const Y=J+1;t[t._readonly=Y]="_readonly";const Q=Y+1;t[t._require=Q]="_require";const de=Q+1;t[t._satisfies=de]="_satisfies";const $=de+1;t[t._set=$]="_set";const ge=$+1;t[t._static=ge]="_static";const fe=ge+1;t[t._symbol=fe]="_symbol";const pe=fe+1;t[t._type=pe]="_type";const M=pe+1;t[t._unique=M]="_unique";const k=M+1;t[t._using=k]="_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 r=64;t[t.IS_RIGHT_ASSOCIATIVE=r]="IS_RIGHT_ASSOCIATIVE";const i=128;t[t.IS_PREFIX=i]="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 S=6144;t[t.eof=S]="eof";const x=7680;t[t.bracketL=x]="bracketL";const I=8192;t[t.bracketR=I]="bracketR";const E=9728;t[t.braceL=E]="braceL";const b=10752;t[t.braceBarL=b]="braceBarL";const A=11264;t[t.braceR=A]="braceR";const v=12288;t[t.braceBarR=v]="braceBarR";const P=13824;t[t.parenL=P]="parenL";const C=14336;t[t.parenR=C]="parenR";const R=15360;t[t.comma=R]="comma";const F=16384;t[t.semi=F]="semi";const B=17408;t[t.colon=B]="colon";const N=18432;t[t.doubleColon=N]="doubleColon";const T=19456;t[t.dot=T]="dot";const U=20480;t[t.question=U]="question";const le=21504;t[t.questionDot=le]="questionDot";const X=22528;t[t.arrow=X]="arrow";const q=23552;t[t.template=q]="template";const J=24576;t[t.ellipsis=J]="ellipsis";const Y=25600;t[t.backQuote=Y]="backQuote";const Q=27136;t[t.dollarBraceL=Q]="dollarBraceL";const de=27648;t[t.at=de]="at";const $=29184;t[t.hash=$]="hash";const ge=29728;t[t.eq=ge]="eq";const fe=30752;t[t.assign=fe]="assign";const pe=32640;t[t.preIncDec=pe]="preIncDec";const M=33664;t[t.postIncDec=M]="postIncDec";const k=34432;t[t.bang=k]="bang";const D=35456;t[t.tilde=D]="tilde";const O=35841;t[t.pipeline=O]="pipeline";const G=36866;t[t.nullishCoalescing=G]="nullishCoalescing";const Z=37890;t[t.logicalOR=Z]="logicalOR";const oe=38915;t[t.logicalAND=oe]="logicalAND";const se=39940;t[t.bitwiseOR=se]="bitwiseOR";const $e=40965;t[t.bitwiseXOR=$e]="bitwiseXOR";const Ne=41990;t[t.bitwiseAND=Ne]="bitwiseAND";const Ae=43015;t[t.equality=Ae]="equality";const ue=44040;t[t.lessThan=ue]="lessThan";const Me=45064;t[t.greaterThan=Me]="greaterThan";const Ge=46088;t[t.relationalOrEqual=Ge]="relationalOrEqual";const te=47113;t[t.bitShiftL=te]="bitShiftL";const ke=48137;t[t.bitShiftR=ke]="bitShiftR";const K=49802;t[t.plus=K]="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 bn=54348;t[t.exponent=bn]="exponent";const on=55296;t[t.jsxName=on]="jsxName";const Zr=56320;t[t.jsxText=Zr]="jsxText";const Gc=57344;t[t.jsxEmptyText=Gc]="jsxEmptyText";const Xc=58880;t[t.jsxTagStart=Xc]="jsxTagStart";const Kc=59392;t[t.jsxTagEnd=Kc]="jsxTagEnd";const Jc=60928;t[t.typeParameterStart=Jc]="typeParameterStart";const Yc=61440;t[t.nonNullAssertion=Yc]="nonNullAssertion";const Qc=62480;t[t._break=Qc]="_break";const Zc=63504;t[t._case=Zc]="_case";const eu=64528;t[t._catch=eu]="_catch";const tu=65552;t[t._continue=tu]="_continue";const nu=66576;t[t._debugger=nu]="_debugger";const su=67600;t[t._default=su]="_default";const ru=68624;t[t._do=ru]="_do";const iu=69648;t[t._else=iu]="_else";const ou=70672;t[t._finally=ou]="_finally";const au=71696;t[t._for=au]="_for";const lu=73232;t[t._function=lu]="_function";const cu=73744;t[t._if=cu]="_if";const uu=74768;t[t._return=uu]="_return";const hu=75792;t[t._switch=hu]="_switch";const du=77456;t[t._throw=du]="_throw";const pu=77840;t[t._try=pu]="_try";const fu=78864;t[t._var=fu]="_var";const mu=79888;t[t._let=mu]="_let";const gu=80912;t[t._const=gu]="_const";const yu=81936;t[t._while=yu]="_while";const bu=82960;t[t._with=bu]="_with";const xu=84496;t[t._new=xu]="_new";const ku=85520;t[t._this=ku]="_this";const Eu=86544;t[t._super=Eu]="_super";const Au=87568;t[t._class=Au]="_class";const wu=88080;t[t._extends=wu]="_extends";const Su=89104;t[t._export=Su]="_export";const Iu=90640;t[t._import=Iu]="_import";const vu=91664;t[t._yield=vu]="_yield";const _u=92688;t[t._null=_u]="_null";const Pu=93712;t[t._true=Pu]="_true";const $u=94736;t[t._false=$u]="_false";const Nu=95256;t[t._in=Nu]="_in";const Cu=96280;t[t._instanceof=Cu]="_instanceof";const Tu=97936;t[t._typeof=Tu]="_typeof";const Ru=98960;t[t._void=Ru]="_void";const GS=99984;t[t._delete=GS]="_delete";const XS=100880;t[t._async=XS]="_async";const KS=101904;t[t._get=KS]="_get";const JS=102928;t[t._set=JS]="_set";const YS=103952;t[t._declare=YS]="_declare";const QS=104976;t[t._readonly=QS]="_readonly";const ZS=106e3;t[t._abstract=ZS]="_abstract";const eI=107024;t[t._static=eI]="_static";const tI=107536;t[t._public=tI]="_public";const nI=108560;t[t._private=nI]="_private";const sI=109584;t[t._protected=sI]="_protected";const rI=110608;t[t._override=rI]="_override";const iI=112144;t[t._as=iI]="_as";const oI=113168;t[t._enum=oI]="_enum";const aI=114192;t[t._type=aI]="_type";const lI=115216;t[t._implements=lI]="_implements"})(o||(o={}));function Yb(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 en{constructor(e,n,s){this.startTokenIndex=e,this.endTokenIndex=n,this.isFunctionScope=s}}class Qb{constructor(e,n,s,r,i,a,l,c,u,d,m,f,g){this.potentialArrowAt=e,this.noAnonFunctionType=n,this.inDisallowConditionalTypesContext=s,this.tokensLength=r,this.scopesLength=i,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 Qb(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 r=13;t[t.carriageReturn=r]="carriageReturn";const i=14;t[t.shiftOut=i]="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 S=40;t[t.leftParenthesis=S]="leftParenthesis";const x=41;t[t.rightParenthesis=x]="rightParenthesis";const I=42;t[t.asterisk=I]="asterisk";const E=43;t[t.plusSign=E]="plusSign";const b=44;t[t.comma=b]="comma";const A=45;t[t.dash=A]="dash";const v=46;t[t.dot=v]="dot";const P=47;t[t.slash=P]="slash";const C=48;t[t.digit0=C]="digit0";const R=49;t[t.digit1=R]="digit1";const F=50;t[t.digit2=F]="digit2";const B=51;t[t.digit3=B]="digit3";const N=52;t[t.digit4=N]="digit4";const T=53;t[t.digit5=T]="digit5";const U=54;t[t.digit6=U]="digit6";const le=55;t[t.digit7=le]="digit7";const X=56;t[t.digit8=X]="digit8";const q=57;t[t.digit9=q]="digit9";const J=58;t[t.colon=J]="colon";const Y=59;t[t.semicolon=Y]="semicolon";const Q=60;t[t.lessThan=Q]="lessThan";const de=61;t[t.equalsTo=de]="equalsTo";const $=62;t[t.greaterThan=$]="greaterThan";const ge=63;t[t.questionMark=ge]="questionMark";const fe=64;t[t.atSign=fe]="atSign";const pe=65;t[t.uppercaseA=pe]="uppercaseA";const M=66;t[t.uppercaseB=M]="uppercaseB";const k=67;t[t.uppercaseC=k]="uppercaseC";const D=68;t[t.uppercaseD=D]="uppercaseD";const O=69;t[t.uppercaseE=O]="uppercaseE";const G=70;t[t.uppercaseF=G]="uppercaseF";const Z=71;t[t.uppercaseG=Z]="uppercaseG";const oe=72;t[t.uppercaseH=oe]="uppercaseH";const se=73;t[t.uppercaseI=se]="uppercaseI";const $e=74;t[t.uppercaseJ=$e]="uppercaseJ";const Ne=75;t[t.uppercaseK=Ne]="uppercaseK";const Ae=76;t[t.uppercaseL=Ae]="uppercaseL";const ue=77;t[t.uppercaseM=ue]="uppercaseM";const Me=78;t[t.uppercaseN=Me]="uppercaseN";const Ge=79;t[t.uppercaseO=Ge]="uppercaseO";const te=80;t[t.uppercaseP=te]="uppercaseP";const ke=81;t[t.uppercaseQ=ke]="uppercaseQ";const K=82;t[t.uppercaseR=K]="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 bn=87;t[t.uppercaseW=bn]="uppercaseW";const on=88;t[t.uppercaseX=on]="uppercaseX";const Zr=89;t[t.uppercaseY=Zr]="uppercaseY";const Gc=90;t[t.uppercaseZ=Gc]="uppercaseZ";const Xc=91;t[t.leftSquareBracket=Xc]="leftSquareBracket";const Kc=92;t[t.backslash=Kc]="backslash";const Jc=93;t[t.rightSquareBracket=Jc]="rightSquareBracket";const Yc=94;t[t.caret=Yc]="caret";const Qc=95;t[t.underscore=Qc]="underscore";const Zc=96;t[t.graveAccent=Zc]="graveAccent";const eu=97;t[t.lowercaseA=eu]="lowercaseA";const tu=98;t[t.lowercaseB=tu]="lowercaseB";const nu=99;t[t.lowercaseC=nu]="lowercaseC";const su=100;t[t.lowercaseD=su]="lowercaseD";const ru=101;t[t.lowercaseE=ru]="lowercaseE";const iu=102;t[t.lowercaseF=iu]="lowercaseF";const ou=103;t[t.lowercaseG=ou]="lowercaseG";const au=104;t[t.lowercaseH=au]="lowercaseH";const lu=105;t[t.lowercaseI=lu]="lowercaseI";const cu=106;t[t.lowercaseJ=cu]="lowercaseJ";const uu=107;t[t.lowercaseK=uu]="lowercaseK";const hu=108;t[t.lowercaseL=hu]="lowercaseL";const du=109;t[t.lowercaseM=du]="lowercaseM";const pu=110;t[t.lowercaseN=pu]="lowercaseN";const fu=111;t[t.lowercaseO=fu]="lowercaseO";const mu=112;t[t.lowercaseP=mu]="lowercaseP";const gu=113;t[t.lowercaseQ=gu]="lowercaseQ";const yu=114;t[t.lowercaseR=yu]="lowercaseR";const bu=115;t[t.lowercaseS=bu]="lowercaseS";const xu=116;t[t.lowercaseT=xu]="lowercaseT";const ku=117;t[t.lowercaseU=ku]="lowercaseU";const Eu=118;t[t.lowercaseV=Eu]="lowercaseV";const Au=119;t[t.lowercaseW=Au]="lowercaseW";const wu=120;t[t.lowercaseX=wu]="lowercaseX";const Su=121;t[t.lowercaseY=Su]="lowercaseY";const Iu=122;t[t.lowercaseZ=Iu]="lowercaseZ";const vu=123;t[t.leftCurlyBrace=vu]="leftCurlyBrace";const _u=124;t[t.verticalBar=_u]="verticalBar";const Pu=125;t[t.rightCurlyBrace=Pu]="rightCurlyBrace";const $u=126;t[t.tilde=$u]="tilde";const Nu=160;t[t.nonBreakingSpace=Nu]="nonBreakingSpace";const Cu=5760;t[t.oghamSpaceMark=Cu]="oghamSpaceMark";const Tu=8232;t[t.lineSeparator=Tu]="lineSeparator";const Ru=8233;t[t.paragraphSeparator=Ru]="paragraphSeparator"})(_||(_={}));let vo,De,Be,h,ne,f1;function Tr(){return f1++}function Zb(t){if("pos"in t){const e=tx(t.pos);t.message+=` (${e.line}:${e.column})`,t.loc=e}return t}class ex{constructor(e,n){this.line=e,this.column=n}}function tx(t){let e=1,n=1;for(let s=0;s<t;s++)ne.charCodeAt(s)===_.lineFeed?(e++,n=1):n++;return new ex(e,n)}function nx(t,e,n,s){ne=t,h=new At,f1=1,vo=e,De=n,Be=s}function he(t){return h.contextualKeyword===t}function zl(t){const e=Dr();return e.type===o.name&&e.contextualKeyword===t}function ut(t){return h.contextualKeyword===t&&L(o.name)}function rt(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=ne.charCodeAt(n);if(s===_.lineFeed||s===_.carriageReturn||s===8232||s===8233)return!0}return!1}function m1(){const t=Vl();for(let e=h.end;e<t;e++){const n=ne.charCodeAt(e);if(n===_.lineFeed||n===_.carriageReturn||n===8232||n===8233)return!0}return!1}function tn(){return L(o.semi)||Ct()}function Je(){tn()||we('Unexpected token, expected ";"')}function j(t){L(t)||we(`Unexpected token, expected "${Yb(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=ne.length,Se(o.eof)}const g1=[9,11,12,_.space,_.nonBreakingSpace,_.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],y1=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,b1=new Uint8Array(65536);for(const t of g1)b1[t]=1;function sx(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 jt=new Uint8Array(65536);for(let t=0;t<128;t++)jt[t]=sx(t)?1:0;for(let t=128;t<65536;t++)jt[t]=1;for(const t of g1)jt[t]=0;jt[8232]=0,jt[8233]=0;const Rr=jt.slice();for(let t=_.digit0;t<=_.digit9;t++)Rr[t]=0;const x1=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 rx(){let t=0,e=0,n=h.pos;for(;n<ne.length&&(e=ne.charCodeAt(n),!(e<_.lowercaseA||e>_.lowercaseZ));){const r=x1[t+(e-_.lowercaseA)+1];if(r===-1)break;t=r,n++}const s=x1[t];if(s>-1&&!jt[e]){h.pos=n,s&1?Se(s>>>1):Se(o.name,s>>>1);return}for(;n<ne.length;){const r=ne.charCodeAt(n);if(jt[r])n++;else if(r===_.backslash){if(n+=2,ne.charCodeAt(n)===_.leftCurlyBrace){for(;n<ne.length&&ne.charCodeAt(n)!==_.rightCurlyBrace;)n++;n++}}else if(r===_.atSign&&ne.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 r=s+1;t[t.FunctionScopedDeclaration=r]="FunctionScopedDeclaration";const i=r+1;t[t.BlockScopedDeclaration=i]="BlockScopedDeclaration";const a=i+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 zt;(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 r=s+1;t[t.KeyAfterPropSpread=r]="KeyAfterPropSpread"})(zt||(zt={}));function k1(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 ix(t){const e=t.identifierRole;return e===me.FunctionScopedDeclaration||e===me.BlockScopedDeclaration||e===me.ObjectShorthandFunctionScopedDeclaration||e===me.ObjectShorthandBlockScopedDeclaration}function E1(t){const e=t.identifierRole;return e===me.TopLevelDeclaration||e===me.ObjectShorthandTopLevelDeclaration||e===me.ImportDeclaration}function ox(t){const e=t.identifierRole;return e===me.TopLevelDeclaration||e===me.BlockScopedDeclaration||e===me.ObjectShorthandTopLevelDeclaration||e===me.ObjectShorthandBlockScopedDeclaration}function ax(t){const e=t.identifierRole;return e===me.FunctionScopedDeclaration||e===me.ObjectShorthandFunctionScopedDeclaration}function lx(t){return t.identifierRole===me.ObjectShorthandTopLevelDeclaration||t.identifierRole===me.ObjectShorthandBlockScopedDeclaration||t.identifierRole===me.ObjectShorthandFunctionScopedDeclaration}class _o{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 z(){h.tokens.push(new _o),I1()}function _n(){h.tokens.push(new _o),h.start=h.pos,Ix()}function cx(){h.type===o.assign&&--h.pos,Ax()}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)?(z(),!0):!1}function A1(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();z();const e=h.type;return h.restoreFromSnapshot(t),e}class ux{constructor(e,n){this.type=e,this.contextualKeyword=n}}function Dr(){const t=h.snapshot();z();const e=h.type,n=h.contextualKeyword;return h.restoreFromSnapshot(t),new ux(e,n)}function Vl(){return w1(h.pos)}function w1(t){y1.lastIndex=t;const e=y1.exec(ne);return t+e[0].length}function S1(){return ne.charCodeAt(Vl())}function I1(){if(_1(),h.start=h.pos,h.pos>=ne.length){const t=h.tokens;t.length>=2&&t[t.length-1].start>=ne.length&&t[t.length-2].start>=ne.length&&we("Unexpectedly reached the end of input."),Se(o.eof);return}hx(ne.charCodeAt(h.pos))}function hx(t){Rr[t]||t===_.backslash||t===_.atSign&&ne.charCodeAt(h.pos+1)===_.atSign?rx():N1(t)}function dx(){for(;ne.charCodeAt(h.pos)!==_.asterisk||ne.charCodeAt(h.pos+1)!==_.slash;)if(h.pos++,h.pos>ne.length){we("Unterminated comment",h.pos-2);return}h.pos+=2}function v1(t){let e=ne.charCodeAt(h.pos+=t);if(h.pos<ne.length)for(;e!==_.lineFeed&&e!==_.carriageReturn&&e!==_.lineSeparator&&e!==_.paragraphSeparator&&++h.pos<ne.length;)e=ne.charCodeAt(h.pos)}function _1(){for(;h.pos<ne.length;){const t=ne.charCodeAt(h.pos);switch(t){case _.carriageReturn:ne.charCodeAt(h.pos+1)===_.lineFeed&&++h.pos;case _.lineFeed:case _.lineSeparator:case _.paragraphSeparator:++h.pos;break;case _.slash:switch(ne.charCodeAt(h.pos+1)){case _.asterisk:h.pos+=2,dx();break;case _.slash:v1(2);break;default:return}break;default:if(b1[t])++h.pos;else return}}}function Se(t,e=w.NONE){h.end=h.pos,h.type=t,h.contextualKeyword=e}function px(){const t=ne.charCodeAt(h.pos+1);if(t>=_.digit0&&t<=_.digit9){C1(!0);return}t===_.dot&&ne.charCodeAt(h.pos+2)===_.dot?(h.pos+=3,Se(o.ellipsis)):(++h.pos,Se(o.dot))}function fx(){ne.charCodeAt(h.pos+1)===_.equalsTo?je(o.assign,2):je(o.slash,1)}function mx(t){let e=t===_.asterisk?o.star:o.modulo,n=1,s=ne.charCodeAt(h.pos+1);t===_.asterisk&&s===_.asterisk&&(n++,s=ne.charCodeAt(h.pos+2),e=o.exponent),s===_.equalsTo&&ne.charCodeAt(h.pos+2)!==_.greaterThan&&(n++,e=o.assign),je(e,n)}function gx(t){const e=ne.charCodeAt(h.pos+1);if(e===t){ne.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 yx(){ne.charCodeAt(h.pos+1)===_.equalsTo?je(o.assign,2):je(o.bitwiseXOR,1)}function bx(t){const e=ne.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 xx(){const t=ne.charCodeAt(h.pos+1);if(t===_.lessThan){if(ne.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 P1(){if(h.isType){je(o.greaterThan,1);return}const t=ne.charCodeAt(h.pos+1);if(t===_.greaterThan){const e=ne.charCodeAt(h.pos+2)===_.greaterThan?3:2;if(ne.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 $1(){h.type===o.greaterThan&&(h.pos-=1,P1())}function kx(t){const e=ne.charCodeAt(h.pos+1);if(e===_.equalsTo){je(o.equality,ne.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 Ex(){const t=ne.charCodeAt(h.pos+1),e=ne.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 N1(t){switch(t){case _.numberSign:++h.pos,Se(o.hash);return;case _.dot:px();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&&ne.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:ne.charCodeAt(h.pos+1)===_.colon?je(o.doubleColon,2):(++h.pos,Se(o.colon));return;case _.questionMark:Ex();return;case _.atSign:++h.pos,Se(o.at);return;case _.graveAccent:++h.pos,Se(o.backQuote);return;case _.digit0:{const e=ne.charCodeAt(h.pos+1);if(e===_.lowercaseX||e===_.uppercaseX||e===_.lowercaseO||e===_.uppercaseO||e===_.lowercaseB||e===_.uppercaseB){wx();return}}case _.digit1:case _.digit2:case _.digit3:case _.digit4:case _.digit5:case _.digit6:case _.digit7:case _.digit8:case _.digit9:C1(!1);return;case _.quotationMark:case _.apostrophe:Sx(t);return;case _.slash:fx();return;case _.percentSign:case _.asterisk:mx(t);return;case _.verticalBar:case _.ampersand:gx(t);return;case _.caret:yx();return;case _.plusSign:case _.dash:bx(t);return;case _.lessThan:xx();return;case _.greaterThan:P1();return;case _.equalsTo:case _.exclamationMark:kx(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 Ax(){const t=h.pos;let e=!1,n=!1;for(;;){if(h.pos>=ne.length){we("Unterminated regular expression",t);return}const s=ne.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 Ul(){for(;;){const t=ne.charCodeAt(h.pos);if(t>=_.digit0&&t<=_.digit9||t===_.underscore)h.pos++;else break}}function wx(){for(h.pos+=2;;){const e=ne.charCodeAt(h.pos);if(e>=_.digit0&&e<=_.digit9||e>=_.lowercaseA&&e<=_.lowercaseF||e>=_.uppercaseA&&e<=_.uppercaseF||e===_.underscore)h.pos++;else break}ne.charCodeAt(h.pos)===_.lowercaseN?(++h.pos,Se(o.bigint)):Se(o.num)}function C1(t){let e=!1,n=!1;t||Ul();let s=ne.charCodeAt(h.pos);if(s===_.dot&&(++h.pos,Ul(),s=ne.charCodeAt(h.pos)),(s===_.uppercaseE||s===_.lowercaseE)&&(s=ne.charCodeAt(++h.pos),(s===_.plusSign||s===_.dash)&&++h.pos,Ul(),s=ne.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 Sx(t){for(h.pos++;;){if(h.pos>=ne.length){we("Unterminated string constant");return}const e=ne.charCodeAt(h.pos);if(e===_.backslash)h.pos++;else if(e===t)break;h.pos++}h.pos++,Se(o.string)}function Ix(){for(;;){if(h.pos>=ne.length){we("Unterminated template");return}const t=ne.charCodeAt(h.pos);if(t===_.graveAccent||t===_.dollarSign&&ne.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<ne.length;){const t=ne.charCodeAt(h.pos);if(jt[t])h.pos++;else if(t===_.backslash){if(h.pos+=2,ne.charCodeAt(h.pos)===_.leftCurlyBrace){for(;h.pos<ne.length&&ne.charCodeAt(h.pos)!==_.rightCurlyBrace;)h.pos++;h.pos++}}else break}}function Or(t,e=t.currentIndex()){let n=e+1;if(Po(t,n)){const s=t.identifierNameAtIndex(e);return{isType:!1,leftName:s,rightName:s,endIndex:n}}if(n++,Po(t,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,Po(t,n))return{isType:!1,leftName:t.identifierNameAtIndex(e),rightName:t.identifierNameAtIndex(e+2),endIndex:n};if(n++,Po(t,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw new Error(`Unexpected import/export specifier at ${e}`)}function Po(t,e){const n=t.tokens[e];return n.type===o.braceR||n.type===o.comma}var _x=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 T1(t){const[e,n]=R1(t.jsxPragma||"React.createElement"),[s,r]=R1(t.jsxFragmentPragma||"React.Fragment");return{base:e,suffix:n,fragmentBase:s,fragmentSuffix:r}}function R1(t){let e=t.indexOf(".");return e===-1&&(e=t.length),[t.slice(0,e),t.slice(e)]}class Vt{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}class ss extends Vt{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(e,n,s,r,i){super(),this.rootTransformer=e,this.tokens=n,this.importProcessor=s,this.nameManager=r,this.options=i,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),this.jsxPragmaInfo=T1(i),this.isAutomaticRuntime=i.jsxRuntime==="automatic",this.jsxImportSource=i.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 r=Object.entries(s).map(([i,a])=>`${i} as ${a}`).join(", ");if(r){const i=this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime");e+=`import {${r}} from "${i}";`}}return e}processJSXTag(){const{jsxRole:e,start:n}=this.tokens.currentToken(),s=this.options.production?null:this.getElementLocationCode(n);this.isAutomaticRuntime&&e!==zt.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===zt.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(s));let r=null;if(this.tokens.matches1(o.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(n);else{if(this.processTagIntro(),this.tokens.appendCode(", {"),r=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.");r&&this.tokens.appendCode(`, ${r}`)}for(this.options.production||(r===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();D1(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 r=this.tokens.snapshot();this.processPropValue(),n=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(r);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=O1(n),r=$x(n);this.tokens.replaceToken(r+s)}processAutomaticChildrenAndEndProps(e){e===zt.StaticChildren?(this.tokens.appendCode(" children: ["),this.processChildren(!1),this.tokens.appendCode("]}")):(e===zt.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),r=O1(s),i=Px(s);return i==='""'?(this.tokens.replaceToken(r),!1):(this.tokens.replaceToken(`${e?", ":""}${i}${r}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}}function D1(t){const e=t.charCodeAt(0);return e>=_.lowercaseA&&e<=_.lowercaseZ}function Px(t){let e="",n="",s=!1,r=!1;for(let i=0;i<t.length;i++){const a=t[i];if(a===" "||a===" "||a==="\r")s||(n+=a);else if(a===`
|
|
56
|
-
`)n="",s=!0;else{if(r&&s&&(e+=" "),e+=n,n="",a==="&"){const{entity:l,newI:c}=L1(t,i+1);i=c-1,e+=l}else e+=a;r=!0,s=!1}}return s||(e+=n),JSON.stringify(e)}function O1(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 $x(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:r,newI:i}=L1(t,n+1);e+=r,n=i-1}else e+=s}return JSON.stringify(e)}function L1(t,e){let n="",s=0,r,i=e;if(t[i]==="#"){let a=10;i++;let l;if(t[i]==="x")for(a=16,i++,l=i;i<t.length&&Cx(t.charCodeAt(i));)i++;else for(l=i;i<t.length&&Nx(t.charCodeAt(i));)i++;if(t[i]===";"){const c=t.slice(l,i);c&&(i++,r=String.fromCodePoint(parseInt(c,a)))}}else for(;i<t.length&&s++<10;){const a=t[i];if(i++,a===";"){r=_x.get(n);break}n+=a}return r?{entity:r,newI:i}:{entity:"&",newI:e}}function Nx(t){return t>=_.digit0&&t<=_.digit9}function Cx(t){return t>=_.digit0&&t<=_.digit9||t>=_.lowercaseA&&t<=_.lowercaseF||t>=_.uppercaseA&&t<=_.uppercaseF}function M1(t,e){const n=T1(e),s=new Set;for(let r=0;r<t.tokens.length;r++){const i=t.tokens[r];if(i.type===o.name&&!i.isType&&(i.identifierRole===me.Access||i.identifierRole===me.ObjectShorthand||i.identifierRole===me.ExportAccess)&&!i.shadowsGlobal&&s.add(t.identifierNameForToken(i)),i.type===o.jsxTagStart&&s.add(n.base),i.type===o.jsxTagStart&&r+1<t.tokens.length&&t.tokens[r+1].type===o.jsxTagEnd&&(s.add(n.base),s.add(n.fragmentBase)),i.type===o.jsxName&&i.identifierRole===me.Access){const a=t.identifierNameForToken(i);(!D1(a)||t.tokens[r+1].type===o.dot)&&s.add(t.identifierNameForToken(i))}}return s}class rs{__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,r,i,a,l){this.nameManager=e,this.tokens=n,this.enableLegacyTypeScriptModuleInterop=s,this.options=r,this.isTypeScriptTransformEnabled=i,this.keepUnusedImports=a,this.helperManager=l,rs.prototype.__init.call(this),rs.prototype.__init2.call(this),rs.prototype.__init3.call(this),rs.prototype.__init4.call(this),rs.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=M1(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:r})=>r)].every(r=>this.shouldAutomaticallyElideImportedName(r))&&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:r,namedImports:i,namedExports:a,exportStarNames:l,hasStarExport:c}=n;if(s.length===0&&r.length===0&&i.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=r.length>0?r[0]:this.getFreeIdentifierForPath(e);let m=`var ${u} = require('${e}');`;if(r.length>0)for(const f of r){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 i)this.identifierReplacements.set(g,`${u}.${f}`)}}getFreeIdentifierForPath(e){const n=e.split("/"),r=n[n.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${r}`)}preprocessImportAtIndex(e){const n=[],s=[],r=[];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):r.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 i=this.tokens.stringValueAtIndex(e),a=this.getImportInfo(i);a.defaultNames.push(...n),a.wildcardNames.push(...s),a.namedImports.push(...r),n.length===0&&s.length===0&&r.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 r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw new Error("Expected = token with an end index.");s=r-1}else{const r=this.tokens.tokens[s];if(k1(r)){const i=this.tokens.identifierNameAtIndex(s);this.identifierReplacements.set(i,`exports.${i}`)}}}}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 r=this.tokens.stringValueAtIndex(e);this.getImportInfo(r).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),r=this.getImportInfo(s);n!==null?r.exportStarNames.push(n):r.hasStarExport=!0}getNamedImports(e){const n=[];for(;;){if(this.tokens.matches1AtIndex(e,o.braceR)){e++;break}const s=Or(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 Tx=44,Rx=59,F1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",B1=new Uint8Array(64),Dx=new Uint8Array(128);for(let t=0;t<F1.length;t++){const e=F1.charCodeAt(t);B1[t]=e,Dx[e]=t}function Lr(t,e,n){let s=e-n;s=s<0?-s<<1|1:s<<1;do{let r=s&31;s>>>=5,s>0&&(r|=32),t.write(B1[r])}while(s>0);return e}var j1=1024*16,z1=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}},Ox=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+=z1.decode(e),this.pos=0)}flush(){const{buffer:t,out:e,pos:n}=this;return n>0?e+z1.decode(t.subarray(0,n)):e}};function Lx(t){const e=new Ox;let n=0,s=0,r=0,i=0;for(let a=0;a<t.length;a++){const l=t[a];if(a>0&&e.write(Rx),l.length===0)continue;let c=0;for(let u=0;u<l.length;u++){const d=l[u];u>0&&e.write(Tx),c=Lr(e,d[0],c),d.length!==1&&(n=Lr(e,d[1],n),s=Lr(e,d[2],s),r=Lr(e,d[3],r),d.length!==4&&(i=Lr(e,d[4],i)))}}return e.flush()}var $o={exports:{}},Mx=$o.exports,V1;function Fx(){return V1||(V1=1,function(t,e){(function(n,s){t.exports=s()})(Mx,function(){const n=/^[\w+.-]+:\/\//,s=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,r=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function i(b){return n.test(b)}function a(b){return b.startsWith("//")}function l(b){return b.startsWith("/")}function c(b){return b.startsWith("file:")}function u(b){return/^[.?#]/.test(b)}function d(b){const A=s.exec(b);return f(A[1],A[2]||"",A[3],A[4]||"",A[5]||"/",A[6]||"",A[7]||"")}function m(b){const A=r.exec(b),v=A[2];return f("file:","",A[1]||"","",l(v)?v:"/"+v,A[3]||"",A[4]||"")}function f(b,A,v,P,C,R,F){return{scheme:b,user:A,host:v,port:P,path:C,query:R,hash:F,type:7}}function g(b){if(a(b)){const v=d("http:"+b);return v.scheme="",v.type=6,v}if(l(b)){const v=d("http://foo.com"+b);return v.scheme="",v.host="",v.type=5,v}if(c(b))return m(b);if(i(b))return d(b);const A=d("http://foo.com/"+b);return A.scheme="",A.host="",A.type=b?b.startsWith("?")?3:b.startsWith("#")?2:4:1,A}function S(b){if(b.endsWith("/.."))return b;const A=b.lastIndexOf("/");return b.slice(0,A+1)}function x(b,A){I(A,A.type),b.path==="/"?b.path=A.path:b.path=S(A.path)+b.path}function I(b,A){const v=A<=4,P=b.path.split("/");let C=1,R=0,F=!1;for(let N=1;N<P.length;N++){const T=P[N];if(!T){F=!0;continue}if(F=!1,T!=="."){if(T===".."){R?(F=!0,R--,C--):v&&(P[C++]=T);continue}P[C++]=T,R++}}let B="";for(let N=1;N<C;N++)B+="/"+P[N];(!B||F&&!B.endsWith("/.."))&&(B+="/"),b.path=B}function E(b,A){if(!b&&!A)return"";const v=g(b);let P=v.type;if(A&&P!==7){const R=g(A),F=R.type;switch(P){case 1:v.hash=R.hash;case 2:v.query=R.query;case 3:case 4:x(v,R);case 5:v.user=R.user,v.host=R.host,v.port=R.port;case 6:v.scheme=R.scheme}F>P&&(P=F)}I(v,P);const C=v.query+v.hash;switch(P){case 2:case 3:return C;case 4:{const R=v.path.slice(1);return R?u(A||b)&&!u(R)?"./"+R+C:R+C:C||"."}case 5:return v.path+C;default:return v.scheme+"//"+v.user+v.host+v.port+v.path+C}}return E})}($o)),$o.exports}Fx();var ql=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function cI(t){return t}function Bx(t,e){return t._indexes[e]}function jx(t,e){const n=Bx(t,e);if(n!==void 0)return n;const{array:s,_indexes:r}=t,i=s.push(e);return r[e]=i-1}var zx=0,Vx=1,Ux=2,qx=3,Hx=4,U1=-1,Wx=class{constructor({file:t,sourceRoot:e}={}){this._names=new ql,this._sources=new ql,this._sourcesContent=[],this._mappings=[],this.file=t,this.sourceRoot=e,this._ignoreList=new ql}};function uI(t){return t}var Hl=(t,e,n,s,r,i,a,l)=>Kx(!0,t,e,n,s,r,i);function Gx(t){const{_mappings:e,_sources:n,_sourcesContent:s,_names:r,_ignoreList:i}=t;return Qx(e),{version:3,file:t.file||void 0,names:r.array,sourceRoot:t.sourceRoot||void 0,sources:n.array,sourcesContent:s,mappings:e,ignoreList:i.array}}function Xx(t){const e=Gx(t);return Object.assign({},e,{mappings:Lx(e.mappings)})}function Kx(t,e,n,s,r,i,a,l,c){const{_mappings:u,_sources:d,_sourcesContent:m,_names:f}=e,g=Jx(u,n),S=Yx(g,s);if(!r)return Zx(g,S)?void 0:q1(g,S,[s]);const x=jx(d,r),I=U1;if(x===m.length&&(m[x]=null),!ek(g,S,x,i,a,I))return q1(g,S,[s,x,i,a])}function Jx(t,e){for(let n=t.length;n<=e;n++)t[n]=[];return t[e]}function Yx(t,e){let n=t.length;for(let s=n-1;s>=0;n=s--){const r=t[s];if(e>=r[zx])break}return n}function q1(t,e,n){for(let s=t.length;s>e;s--)t[s]=t[s-1];t[e]=n}function Qx(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 Zx(t,e){return e===0?!0:t[e-1].length===1}function ek(t,e,n,s,r,i){if(e===0)return!1;const a=t[e-1];return a.length===1?!1:n===a[Vx]&&s===a[Ux]&&r===a[qx]&&i===(a.length===5?a[Hx]:U1)}function tk({code:t,mappings:e},n,s,r,i){const a=nk(r,i),l=new Wx({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&&Hl(l,d,0,n,d,0);for(let x=0;x<t.length;x++){if(x===u){const I=u-m,E=a[c];for(Hl(l,d,I,n,d,E);(u===x||u===void 0)&&c<e.length-1;)c++,u=e[c]}t.charCodeAt(x)===_.lineFeed&&(d++,m=x+1,u!==m&&Hl(l,d,0,n,d,0))}const{sourceRoot:f,sourcesContent:g,...S}=Xx(l);return S}function nk(t,e){const n=new Array(e.length);let s=0,r=e[s].start,i=0;for(let a=0;a<t.length;a++)a===r&&(n[s]=r-i,s++,r=e[s].start),t.charCodeAt(a)===_.lineFeed&&(i=a+1);return n}const sk={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 No{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(e){this.nameManager=e,No.prototype.__init.call(this),No.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(sk)){const r=this.helperNames[n];let i=s;n==="optionalChainDelete"?i=i.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):n==="asyncOptionalChainDelete"?i=i.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):n==="require"&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),i=i.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),r&&(e+=" ",e+=i.replace(n,r).replace(/\s+/g," ").trim())}return e}}function H1(t,e,n){rk(t,n)&&ik(t,e,n)}function rk(t,e){for(const n of t.tokens)if(n.type===o.name&&!n.isType&&ix(n)&&e.has(t.identifierNameForToken(n)))return!0;return!1}function ik(t,e,n){const s=[];let r=e.length-1;for(let i=t.tokens.length-1;;i--){for(;s.length>0&&s[s.length-1].startTokenIndex===i+1;)s.pop();for(;r>=0&&e[r].endTokenIndex===i+1;)s.push(e[r]),r--;if(i<0)break;const a=t.tokens[i],l=t.identifierNameForToken(a);if(s.length>1&&!a.isType&&a.type===o.name&&n.has(l)){if(ox(a))W1(s[s.length-1],t,l);else if(ax(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.");W1(s[c],t,l)}}}if(s.length>0)throw new Error("Expected empty scope stack after processing file.")}function W1(t,e,n){for(let s=t.startTokenIndex;s<t.endTokenIndex;s++){const r=e.tokens[s];(r.type===o.name||r.type===o.jsxName)&&e.identifierNameForToken(r)===n&&(r.shadowsGlobal=!0)}}function ok(t,e){const n=[];for(const s of e)s.type===o.name&&n.push(t.slice(s.start,s.end));return n}class Wl{__init(){this.usedNames=new Set}constructor(e,n){Wl.prototype.__init.call(this),this.usedNames=new Set(ok(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 Mr={},Fr={},Ut={},G1;function Gl(){if(G1)return Ut;G1=1;var t=Ut&&Ut.__extends||function(){var i=function(a,l){return i=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])},i(a,l)};return function(a,l){i(a,l);function c(){this.constructor=a}a.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}}();Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.DetailContext=Ut.NoopContext=Ut.VError=void 0;var e=function(i){t(a,i);function a(l,c){var u=i.call(this,c)||this;return u.path=l,Object.setPrototypeOf(u,a.prototype),u}return a}(Error);Ut.VError=e;var n=function(){function i(){}return i.prototype.fail=function(a,l,c){return!1},i.prototype.unionResolver=function(){return this},i.prototype.createContext=function(){return this},i.prototype.resolveUnion=function(a){},i}();Ut.NoopContext=n;var s=function(){function i(){this._propNames=[""],this._messages=[null],this._score=0}return i.prototype.fail=function(a,l,c){return this._propNames.push(a),this._messages.push(l),this._score+=c,!1},i.prototype.unionResolver=function(){return new r},i.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))},i.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("; "))},i.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},i}();Ut.DetailContext=s;var r=function(){function i(){this.contexts=[]}return i.prototype.createContext=function(){var a=new s;return this.contexts.push(a),a},i}();return Ut}var X1;function K1(){return X1||(X1=1,function(t){var e=Fr&&Fr.__extends||function(){var k=function(D,O){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,Z){G.__proto__=Z}||function(G,Z){for(var oe in Z)Z.hasOwnProperty(oe)&&(G[oe]=Z[oe])},k(D,O)};return function(D,O){k(D,O);function G(){this.constructor=D}D.prototype=O===null?Object.create(O):(G.prototype=O.prototype,new G)}}();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=Gl(),s=function(){function k(){}return k}();t.TType=s;function r(k){return typeof k=="string"?a(k):k}function i(k,D){var O=k[D];if(!O)throw new Error("Unknown type "+D);return O}function a(k){return new l(k)}t.name=a;var l=function(k){e(D,k);function D(O){var G=k.call(this)||this;return G.name=O,G._failMsg="is not a "+O,G}return D.prototype.getChecker=function(O,G,Z){var oe=this,se=i(O,this.name),$e=se.getChecker(O,G,Z);return se instanceof Q||se instanceof D?$e:function(Ne,Ae){return $e(Ne,Ae)?!0:Ae.fail(null,oe._failMsg,0)}},D}(s);t.TName=l;function c(k){return new u(k)}t.lit=c;var u=function(k){e(D,k);function D(O){var G=k.call(this)||this;return G.value=O,G.name=JSON.stringify(O),G._failMsg="is not "+G.name,G}return D.prototype.getChecker=function(O,G){var Z=this;return function(oe,se){return oe===Z.value?!0:se.fail(null,Z._failMsg,-1)}},D}(s);t.TLiteral=u;function d(k){return new m(r(k))}t.array=d;var m=function(k){e(D,k);function D(O){var G=k.call(this)||this;return G.ttype=O,G}return D.prototype.getChecker=function(O,G){var Z=this.ttype.getChecker(O,G);return function(oe,se){if(!Array.isArray(oe))return se.fail(null,"is not an array",0);for(var $e=0;$e<oe.length;$e++){var Ne=Z(oe[$e],se);if(!Ne)return se.fail($e,null,1)}return!0}},D}(s);t.TArray=m;function f(){for(var k=[],D=0;D<arguments.length;D++)k[D]=arguments[D];return new g(k.map(function(O){return r(O)}))}t.tuple=f;var g=function(k){e(D,k);function D(O){var G=k.call(this)||this;return G.ttypes=O,G}return D.prototype.getChecker=function(O,G){var Z=this.ttypes.map(function(se){return se.getChecker(O,G)}),oe=function(se,$e){if(!Array.isArray(se))return $e.fail(null,"is not an array",0);for(var Ne=0;Ne<Z.length;Ne++){var Ae=Z[Ne](se[Ne],$e);if(!Ae)return $e.fail(Ne,null,1)}return!0};return G?function(se,$e){return oe(se,$e)?se.length<=Z.length?!0:$e.fail(Z.length,"is extraneous",2):!1}:oe},D}(s);t.TTuple=g;function S(){for(var k=[],D=0;D<arguments.length;D++)k[D]=arguments[D];return new x(k.map(function(O){return r(O)}))}t.union=S;var x=function(k){e(D,k);function D(O){var G=k.call(this)||this;G.ttypes=O;var Z=O.map(function(se){return se instanceof l||se instanceof u?se.name:null}).filter(function(se){return se}),oe=O.length-Z.length;return Z.length?(oe>0&&Z.push(oe+" more"),G._failMsg="is none of "+Z.join(", ")):G._failMsg="is none of "+oe+" types",G}return D.prototype.getChecker=function(O,G){var Z=this,oe=this.ttypes.map(function(se){return se.getChecker(O,G)});return function(se,$e){for(var Ne=$e.unionResolver(),Ae=0;Ae<oe.length;Ae++){var ue=oe[Ae](se,Ne.createContext());if(ue)return!0}return $e.resolveUnion(Ne),$e.fail(null,Z._failMsg,0)}},D}(s);t.TUnion=x;function I(){for(var k=[],D=0;D<arguments.length;D++)k[D]=arguments[D];return new E(k.map(function(O){return r(O)}))}t.intersection=I;var E=function(k){e(D,k);function D(O){var G=k.call(this)||this;return G.ttypes=O,G}return D.prototype.getChecker=function(O,G){var Z=new Set,oe=this.ttypes.map(function(se){return se.getChecker(O,G,Z)});return function(se,$e){var Ne=oe.every(function(Ae){return Ae(se,$e)});return Ne?!0:$e.fail(null,null,0)}},D}(s);t.TIntersection=E;function b(k){return new A(k)}t.enumtype=b;var A=function(k){e(D,k);function D(O){var G=k.call(this)||this;return G.members=O,G.validValues=new Set,G._failMsg="is not a valid enum value",G.validValues=new Set(Object.keys(O).map(function(Z){return O[Z]})),G}return D.prototype.getChecker=function(O,G){var Z=this;return function(oe,se){return Z.validValues.has(oe)?!0:se.fail(null,Z._failMsg,0)}},D}(s);t.TEnumType=A;function v(k,D){return new P(k,D)}t.enumlit=v;var P=function(k){e(D,k);function D(O,G){var Z=k.call(this)||this;return Z.enumName=O,Z.prop=G,Z._failMsg="is not "+O+"."+G,Z}return D.prototype.getChecker=function(O,G){var Z=this,oe=i(O,this.enumName);if(!(oe instanceof A))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($e,Ne){return $e===se?!0:Ne.fail(null,Z._failMsg,-1)}},D}(s);t.TEnumLiteral=P;function C(k){return Object.keys(k).map(function(D){return R(D,k[D])})}function R(k,D){return D instanceof T?new U(k,D.ttype,!0):new U(k,r(D),!1)}function F(k,D){return new B(k,C(D))}t.iface=F;var B=function(k){e(D,k);function D(O,G){var Z=k.call(this)||this;return Z.bases=O,Z.props=G,Z.propSet=new Set(G.map(function(oe){return oe.name})),Z}return D.prototype.getChecker=function(O,G,Z){var oe=this,se=this.bases.map(function(Ge){return i(O,Ge).getChecker(O,G)}),$e=this.props.map(function(Ge){return Ge.ttype.getChecker(O,G)}),Ne=new n.NoopContext,Ae=this.props.map(function(Ge,te){return!Ge.isOpt&&!$e[te](void 0,Ne)}),ue=function(Ge,te){if(typeof Ge!="object"||Ge===null)return te.fail(null,"is not an object",0);for(var ke=0;ke<se.length;ke++)if(!se[ke](Ge,te))return!1;for(var ke=0;ke<$e.length;ke++){var K=oe.props[ke].name,Ee=Ge[K];if(Ee===void 0){if(Ae[ke])return te.fail(K,"is missing",1)}else{var Xe=$e[ke](Ee,te);if(!Xe)return te.fail(K,null,1)}}return!0};if(!G)return ue;var Me=this.propSet;return Z&&(this.propSet.forEach(function(Ge){return Z.add(Ge)}),Me=Z),function(Ge,te){if(!ue(Ge,te))return!1;for(var ke in Ge)if(!Me.has(ke))return te.fail(ke,"is extraneous",2);return!0}},D}(s);t.TIface=B;function N(k){return new T(r(k))}t.opt=N;var T=function(k){e(D,k);function D(O){var G=k.call(this)||this;return G.ttype=O,G}return D.prototype.getChecker=function(O,G){var Z=this.ttype.getChecker(O,G);return function(oe,se){return oe===void 0||Z(oe,se)}},D}(s);t.TOptional=T;var U=function(){function k(D,O,G){this.name=D,this.ttype=O,this.isOpt=G}return k}();t.TProp=U;function le(k){for(var D=[],O=1;O<arguments.length;O++)D[O-1]=arguments[O];return new X(new Y(D),r(k))}t.func=le;var X=function(k){e(D,k);function D(O,G){var Z=k.call(this)||this;return Z.paramList=O,Z.result=G,Z}return D.prototype.getChecker=function(O,G){return function(Z,oe){return typeof Z=="function"?!0:oe.fail(null,"is not a function",0)}},D}(s);t.TFunc=X;function q(k,D,O){return new J(k,r(D),!!O)}t.param=q;var J=function(){function k(D,O,G){this.name=D,this.ttype=O,this.isOpt=G}return k}();t.TParam=J;var Y=function(k){e(D,k);function D(O){var G=k.call(this)||this;return G.params=O,G}return D.prototype.getChecker=function(O,G){var Z=this,oe=this.params.map(function(Ae){return Ae.ttype.getChecker(O,G)}),se=new n.NoopContext,$e=this.params.map(function(Ae,ue){return!Ae.isOpt&&!oe[ue](void 0,se)}),Ne=function(Ae,ue){if(!Array.isArray(Ae))return ue.fail(null,"is not an array",0);for(var Me=0;Me<oe.length;Me++){var Ge=Z.params[Me];if(Ae[Me]===void 0){if($e[Me])return ue.fail(Ge.name,"is missing",1)}else{var te=oe[Me](Ae[Me],ue);if(!te)return ue.fail(Ge.name,null,1)}}return!0};return G?function(Ae,ue){return Ne(Ae,ue)?Ae.length<=oe.length?!0:ue.fail(oe.length,"is extraneous",2):!1}:Ne},D}(s);t.TParamList=Y;var Q=function(k){e(D,k);function D(O,G){var Z=k.call(this)||this;return Z.validator=O,Z.message=G,Z}return D.prototype.getChecker=function(O,G){var Z=this;return function(oe,se){return Z.validator(oe)?!0:se.fail(null,Z.message,0)}},D}(s);t.BasicType=Q,t.basicTypes={any:new Q(function(k){return!0},"is invalid"),number:new Q(function(k){return typeof k=="number"},"is not a number"),object:new Q(function(k){return typeof k=="object"&&k},"is not an object"),boolean:new Q(function(k){return typeof k=="boolean"},"is not a boolean"),string:new Q(function(k){return typeof k=="string"},"is not a string"),symbol:new Q(function(k){return typeof k=="symbol"},"is not a symbol"),void:new Q(function(k){return k==null},"is not void"),undefined:new Q(function(k){return k===void 0},"is not undefined"),null:new Q(function(k){return k===null},"is not null"),never:new Q(function(k){return!1},"is unexpected"),Date:new Q($("[object Date]"),"is not a Date"),RegExp:new Q($("[object RegExp]"),"is not a RegExp")};var de=Object.prototype.toString;function $(k){return function(D){return typeof D=="object"&&D&&de.call(D)===k}}typeof Buffer<"u"&&(t.basicTypes.Buffer=new Q(function(k){return Buffer.isBuffer(k)},"is not a Buffer"));for(var ge=function(k){t.basicTypes[k.name]=new Q(function(D){return D instanceof k},"is not a "+k.name)},fe=0,pe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];fe<pe.length;fe++){var M=pe[fe];ge(M)}}(Fr)),Fr}var J1;function ak(){return J1||(J1=1,function(t){var e=Mr&&Mr.__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],S=0,x=g.length;S<x;S++,f++)m[f]=g[S];return m};Object.defineProperty(t,"__esModule",{value:!0}),t.Checker=t.createCheckers=void 0;var n=K1(),s=Gl(),r=K1();Object.defineProperty(t,"TArray",{enumerable:!0,get:function(){return r.TArray}}),Object.defineProperty(t,"TEnumType",{enumerable:!0,get:function(){return r.TEnumType}}),Object.defineProperty(t,"TEnumLiteral",{enumerable:!0,get:function(){return r.TEnumLiteral}}),Object.defineProperty(t,"TFunc",{enumerable:!0,get:function(){return r.TFunc}}),Object.defineProperty(t,"TIface",{enumerable:!0,get:function(){return r.TIface}}),Object.defineProperty(t,"TLiteral",{enumerable:!0,get:function(){return r.TLiteral}}),Object.defineProperty(t,"TName",{enumerable:!0,get:function(){return r.TName}}),Object.defineProperty(t,"TOptional",{enumerable:!0,get:function(){return r.TOptional}}),Object.defineProperty(t,"TParam",{enumerable:!0,get:function(){return r.TParam}}),Object.defineProperty(t,"TParamList",{enumerable:!0,get:function(){return r.TParamList}}),Object.defineProperty(t,"TProp",{enumerable:!0,get:function(){return r.TProp}}),Object.defineProperty(t,"TTuple",{enumerable:!0,get:function(){return r.TTuple}}),Object.defineProperty(t,"TType",{enumerable:!0,get:function(){return r.TType}}),Object.defineProperty(t,"TUnion",{enumerable:!0,get:function(){return r.TUnion}}),Object.defineProperty(t,"TIntersection",{enumerable:!0,get:function(){return r.TIntersection}}),Object.defineProperty(t,"array",{enumerable:!0,get:function(){return r.array}}),Object.defineProperty(t,"enumlit",{enumerable:!0,get:function(){return r.enumlit}}),Object.defineProperty(t,"enumtype",{enumerable:!0,get:function(){return r.enumtype}}),Object.defineProperty(t,"func",{enumerable:!0,get:function(){return r.func}}),Object.defineProperty(t,"iface",{enumerable:!0,get:function(){return r.iface}}),Object.defineProperty(t,"lit",{enumerable:!0,get:function(){return r.lit}}),Object.defineProperty(t,"name",{enumerable:!0,get:function(){return r.name}}),Object.defineProperty(t,"opt",{enumerable:!0,get:function(){return r.opt}}),Object.defineProperty(t,"param",{enumerable:!0,get:function(){return r.param}}),Object.defineProperty(t,"tuple",{enumerable:!0,get:function(){return r.tuple}}),Object.defineProperty(t,"union",{enumerable:!0,get:function(){return r.union}}),Object.defineProperty(t,"intersection",{enumerable:!0,get:function(){return r.intersection}}),Object.defineProperty(t,"BasicType",{enumerable:!0,get:function(){return r.BasicType}});var i=Gl();Object.defineProperty(t,"VError",{enumerable:!0,get:function(){return i.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 S=g[f],x=0,I=Object.keys(S);x<I.length;x++){var E=I[x];m[E]=new l(d,S[E])}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 S=g[f];this.props.set(S.name,S.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}(Mr)),Mr}var We=ak();const lk=We.union(We.lit("jsx"),We.lit("typescript"),We.lit("flow"),We.lit("imports"),We.lit("react-hot-loader"),We.lit("jest")),ck=We.iface([],{compiledFilename:"string"}),uk=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")}),hk={Transform:lk,SourceMapOptions:ck,Options:uk},{Options:dk}=We.createCheckers(hk);function pk(t){dk.strictCheck(t)}function Y1(){z(),gt(!1)}function Q1(t){z(),To(t)}function Pn(t){ye(),Xl(t)}function Co(){ye(),h.tokens[h.tokens.length-1].identifierRole=me.ImportDeclaration}function Xl(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 To(t){switch(h.type){case o._this:{const e=Pe(0);z(),_e(e);return}case o._yield:case o.name:{h.type=o.name,Pn(t);return}case o.bracketL:{z(),Kl(o.bracketR,t,!0);return}case o.braceL:pc(!0,t);return;default:we()}}function Kl(t,e,n=!1,s=!1,r=0){let i=!0,a=!1;const l=h.tokens.length;for(;!L(t)&&!h.error;)if(i?i=!1:(j(o.comma),h.tokens[h.tokens.length-1].contextId=r,!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)){Q1(e),Z1(),L(o.comma),j(t);break}else fk(s,e)}}function fk(t,e){t&&Yl([w._public,w._protected,w._private,w._readonly,w._override]),Ro(e),Z1(),Ro(e,!0)}function Z1(){Be?TA():De&&AE()}function Ro(t,e=!1){if(e||To(t),!L(o.eq))return;const n=h.tokens.length-1;gt(),h.tokens[n].rhsEndIndex=h.tokens.length}function Jl(){return y(o.name)}function mk(){return y(o.name)||!!(h.type&o.IS_KEYWORD)||y(o.string)||y(o.num)||y(o.bigint)||y(o.decimal)}function ef(){const t=h.snapshot();return z(),(y(o.bracketL)||y(o.braceL)||y(o.star)||y(o.ellipsis)||y(o.hash)||mk())&&!wt()?!0:(h.restoreFromSnapshot(t),!1)}function Yl(t){for(;tf(t)!==null;);}function tf(t){if(!y(o.name))return null;const e=h.contextualKeyword;if(t.indexOf(e)!==-1&&ef()){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 Br(){for(ye();L(o.dot);)ye()}function gk(){Br(),!wt()&&y(o.lessThan)&&Bs()}function yk(){z(),zr()}function bk(){z()}function xk(){j(o._typeof),y(o._import)?nf():Br(),!wt()&&y(o.lessThan)&&Bs()}function nf(){j(o._import),j(o.parenL),j(o.string),j(o.parenR),L(o.dot)&&Br(),y(o.lessThan)&&Bs()}function kk(){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:ye(),L(o._extends)&&tt(),L(o.eq)&&tt()}function is(){y(o.lessThan)&&Do()}function Do(){const t=Pe(0);for(y(o.lessThan)||y(o.typeParameterStart)?z():we();!L(o.greaterThan)&&!h.error;)kk(),L(o.comma);_e(t)}function Ql(t){const e=t===o.arrow;is(),j(o.parenL),h.scopeDepth++,Ek(!1),h.scopeDepth--,(e||y(t))&&jr(t)}function Ek(t){Kl(o.parenR,t)}function Oo(){L(o.comma)||Je()}function sf(){Ql(o.colon),Oo()}function Ak(){const t=h.snapshot();z();const e=L(o.name)&&y(o.colon);return h.restoreFromSnapshot(t),e}function rf(){if(!(y(o.bracketL)&&Ak()))return!1;const t=Pe(0);return j(o.bracketL),ye(),zr(),j(o.bracketR),Ms(),Oo(),_e(t),!0}function of(t){L(o.question),!t&&(y(o.parenL)||y(o.lessThan))?(Ql(o.colon),Oo()):(Ms(),Oo())}function wk(){if(y(o.parenL)||y(o.lessThan)){sf();return}if(y(o._new)){z(),y(o.parenL)||y(o.lessThan)?sf():of(!1);return}const t=!!tf([w._readonly]);rf()||((he(w._get)||he(w._set))&&ef(),Ur(-1),of(t))}function Sk(){af()}function af(){for(j(o.braceL);!L(o.braceR)&&!h.error;)wk()}function Ik(){const t=h.snapshot(),e=vk();return h.restoreFromSnapshot(t),e}function vk(){return z(),L(o.plus)||L(o.minus)?he(w._readonly):(he(w._readonly)&&z(),!y(o.bracketL)||(z(),!Jl())?!1:(z(),y(o._in)))}function _k(){ye(),j(o._in),tt()}function Pk(){j(o.braceL),y(o.plus)||y(o.minus)?(z(),rt(w._readonly)):ut(w._readonly),j(o.bracketL),_k(),ut(w._as)&&tt(),j(o.bracketR),y(o.plus)||y(o.minus)?(z(),j(o.question)):L(o.question),Vk(),Je(),j(o.braceR)}function $k(){for(j(o.bracketL);!L(o.bracketR)&&!h.error;)Nk(),L(o.comma)}function Nk(){L(o.ellipsis)?tt():(tt(),L(o.question)),L(o.colon)&&tt()}function Ck(){j(o.parenL),tt(),j(o.parenR)}function Tk(){for(_n(),_n();!y(o.backQuote)&&!h.error;)j(o.dollarBraceL),tt(),_n(),_n();z()}var $n;(function(t){t[t.TSFunctionType=0]="TSFunctionType";const n=1;t[t.TSConstructorType=n]="TSConstructorType";const s=n+1;t[t.TSAbstractConstructorType=s]="TSAbstractConstructorType"})($n||($n={}));function Zl(t){t===$n.TSAbstractConstructorType&&rt(w._abstract),(t===$n.TSConstructorType||t===$n.TSAbstractConstructorType)&&j(o._new);const e=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!1,Ql(o.arrow),h.inDisallowConditionalTypesContext=e}function Rk(){switch(h.type){case o.name:gk();return;case o._void:case o._null:z();return;case o.string:case o.num:case o.bigint:case o.decimal:case o._true:case o._false:zs();return;case o.minus:z(),zs();return;case o._this:{bk(),he(w._is)&&!wt()&&yk();return}case o._typeof:xk();return;case o._import:nf();return;case o.braceL:Ik()?Pk():Sk();return;case o.bracketL:$k();return;case o.parenL:Ck();return;case o.backQuote:Tk();return;default:if(h.type&o.IS_KEYWORD){z(),h.tokens[h.tokens.length-1].type=o.name;return}break}we()}function Dk(){for(Rk();!wt()&&L(o.bracketL);)L(o.bracketR)||(tt(),j(o.bracketR))}function Ok(){if(rt(w._infer),ye(),y(o._extends)){const t=h.snapshot();j(o._extends);const e=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!0,tt(),h.inDisallowConditionalTypesContext=e,(h.error||!h.inDisallowConditionalTypesContext&&y(o.question))&&h.restoreFromSnapshot(t)}}function ec(){if(he(w._keyof)||he(w._unique)||he(w._readonly))z(),ec();else if(he(w._infer))Ok();else{const t=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!1,Dk(),h.inDisallowConditionalTypesContext=t}}function lf(){if(L(o.bitwiseAND),ec(),y(o.bitwiseAND))for(;L(o.bitwiseAND);)ec()}function Lk(){if(L(o.bitwiseOR),lf(),y(o.bitwiseOR))for(;L(o.bitwiseOR);)lf()}function Mk(){return y(o.lessThan)?!0:y(o.parenL)&&Bk()}function Fk(){if(y(o.name)||y(o._this))return z(),!0;if(y(o.braceL)||y(o.bracketL)){let t=1;for(z();t>0&&!h.error;)y(o.braceL)||y(o.bracketL)?t++:(y(o.braceR)||y(o.bracketR))&&t--,z();return!0}return!1}function Bk(){const t=h.snapshot(),e=jk();return h.restoreFromSnapshot(t),e}function jk(){return z(),!!(y(o.parenR)||y(o.ellipsis)||Fk()&&(y(o.colon)||y(o.comma)||y(o.question)||y(o.eq)||y(o.parenR)&&(z(),y(o.arrow))))}function jr(t){const e=Pe(0);j(t),Uk()||tt(),_e(e)}function zk(){y(o.colon)&&jr(o.colon)}function Ms(){y(o.colon)&&zr()}function Vk(){L(o.colon)&&tt()}function Uk(){const t=h.snapshot();return he(w._asserts)?(z(),ut(w._is)?(tt(),!0):Jl()||y(o._this)?(z(),ut(w._is)&&tt(),!0):(h.restoreFromSnapshot(t),!1)):Jl()||y(o._this)?(z(),he(w._is)&&!wt()?(z(),tt(),!0):(h.restoreFromSnapshot(t),!1)):!1}function zr(){const t=Pe(0);j(o.colon),tt(),_e(t)}function tt(){if(cf(),h.inDisallowConditionalTypesContext||wt()||!L(o._extends))return;const t=h.inDisallowConditionalTypesContext;h.inDisallowConditionalTypesContext=!0,cf(),h.inDisallowConditionalTypesContext=t,j(o.question),tt(),j(o.colon),tt()}function qk(){return he(w._abstract)&&et()===o._new}function cf(){if(Mk()){Zl($n.TSFunctionType);return}if(y(o._new)){Zl($n.TSConstructorType);return}else if(qk()){Zl($n.TSAbstractConstructorType);return}Lk()}function Hk(){const t=Pe(1);tt(),j(o.greaterThan),_e(t),Vr()}function Wk(){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);Ot(),_e(t)}}function uf(){for(;!y(o.braceL)&&!h.error;)Gk(),L(o.comma)}function Gk(){Br(),y(o.lessThan)&&Bs()}function Xk(){Pn(!1),is(),L(o._extends)&&uf(),af()}function Kk(){Pn(!1),is(),j(o.eq),tt(),Je()}function Jk(){if(y(o.string)?zs():ye(),L(o.eq)){const t=h.tokens.length-1;gt(),h.tokens[t].rhsEndIndex=h.tokens.length}}function tc(){for(Pn(!1),j(o.braceL);!L(o.braceR)&&!h.error;)Jk(),L(o.comma)}function nc(){j(o.braceL),Ho(o.braceR)}function sc(){Pn(!1),L(o.dot)?sc():nc()}function hf(){he(w._global)?ye():y(o.string)?yn():we(),y(o.braceL)?nc():Je()}function rc(){Co(),j(o.eq),Qk(),Je()}function Yk(){return he(w._require)&&et()===o.parenL}function Qk(){Yk()?Zk():Br()}function Zk(){rt(w._require),j(o.parenL),y(o.string)||we(),zs(),j(o.parenR)}function eE(){if(tn())return!1;switch(h.type){case o._function:{const t=Pe(1);z();const e=h.start;return ls(e,!0),_e(t),!0}case o._class:{const t=Pe(1);return cs(!0,!1),_e(t),!0}case o._const:if(y(o._const)&&zl(w._enum)){const t=Pe(1);return j(o._const),rt(w._enum),h.tokens[h.tokens.length-1].type=o._enum,tc(),_e(t),!0}case o._var:case o._let:{const t=Pe(1);return qo(h.type!==o._var),_e(t),!0}case o.name:{const t=Pe(1),e=h.contextualKeyword;let n=!1;return e===w._global?(hf(),n=!0):n=Lo(e,!0),_e(t),n}default:return!1}}function df(){return Lo(h.contextualKeyword,!0)}function tE(t){switch(t){case w._declare:{const e=h.tokens.length-1;if(eE())return h.tokens[e].type=o._declare,!0;break}case w._global:if(y(o.braceL))return nc(),!0;break;default:return Lo(t,!1)}return!1}function Lo(t,e){switch(t){case w._abstract:if(Fs(e)&&y(o._class))return h.tokens[h.tokens.length-1].type=o._abstract,cs(!0,!1),!0;break;case w._enum:if(Fs(e)&&y(o.name))return h.tokens[h.tokens.length-1].type=o._enum,tc(),!0;break;case w._interface:if(Fs(e)&&y(o.name)){const n=Pe(e?2:1);return Xk(),_e(n),!0}break;case w._module:if(Fs(e)){if(y(o.string)){const n=Pe(e?2:1);return hf(),_e(n),!0}else if(y(o.name)){const n=Pe(e?2:1);return sc(),_e(n),!0}}break;case w._namespace:if(Fs(e)&&y(o.name)){const n=Pe(e?2:1);return sc(),_e(n),!0}break;case w._type:if(Fs(e)&&y(o.name)){const n=Pe(e?2:1);return Kk(),_e(n),!0}break}return!1}function Fs(t){return t?(z(),!0):!tn()}function nE(){const t=h.snapshot();return Do(),Vs(),zk(),j(o.arrow),h.error?(h.restoreFromSnapshot(t),!1):(Hr(!0),!0)}function ic(){h.type===o.bitShiftL&&(h.pos-=1,Se(o.lessThan)),Bs()}function Bs(){const t=Pe(0);for(j(o.lessThan);!y(o.greaterThan)&&!h.error;)tt(),L(o.comma);t?(j(o.greaterThan),_e(t)):(_e(t),$1(),j(o.greaterThan),h.tokens[h.tokens.length-1].isType=!0)}function pf(){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 sE(t,e){if(y(o.colon)&&jr(o.colon),!y(o.braceL)&&tn()){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}Hr(!1,e)}function rE(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&&Ef()&&nE())return;if(ic(),!e&&L(o.parenL)?(h.tokens[h.tokens.length-1].subscriptStartIndex=t,Nn()):y(o.backQuote)?dc():(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&&(z(),h.tokens[t].isOptionalChainStart=!0,h.tokens[h.tokens.length-1].subscriptStartIndex=t,Bs(),j(o.parenL),Nn());lc(t,e,n)}function iE(){if(L(o._import))return he(w._type)&&et()!==o.eq&&rt(w._type),rc(),!0;if(L(o.eq))return mt(),Je(),!0;if(ut(w._as))return rt(w._namespace),ye(),Je(),!0;if(he(w._type)){const t=et();(t===o.braceL||t===o.star)&&z()}return!1}function oE(){if(ye(),y(o.comma)||y(o.braceR)){h.tokens[h.tokens.length-1].identifierRole=me.ImportDeclaration;return}if(ye(),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(ye(),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}ye(),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 aE(){if(ye(),y(o.comma)||y(o.braceR)){h.tokens[h.tokens.length-1].identifierRole=me.ExportAccess;return}if(ye(),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(ye(),y(o.comma)||y(o.braceR)){h.tokens[h.tokens.length-3].identifierRole=me.ExportAccess;return}ye(),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 lE(){if(he(w._abstract)&&et()===o._class)return h.type=o._abstract,z(),cs(!0,!0),!0;if(he(w._interface)){const t=Pe(2);return Lo(w._interface,!0),_e(t),!0}return!1}function cE(){if(h.type===o._const){const t=Dr();if(t.type===o.name&&t.contextualKeyword===w._enum)return j(o._const),rt(w._enum),h.tokens[h.tokens.length-1].type=o._enum,tc(),!0}return!1}function uE(t){const e=h.tokens.length;Yl([w._abstract,w._readonly,w._declare,w._static,w._override]);const n=h.tokens.length;if(rf()){const r=t?e-1:e;for(let i=r;i<n;i++)h.tokens[i].isType=!0;return!0}return!1}function hE(t){tE(t)||Je()}function dE(){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=df(),_e(n)}else e=df();if(!e)if(t){const n=Pe(2);Tt(!0),_e(n)}else Tt(!0)}function pE(t){if(t&&(y(o.lessThan)||y(o.bitShiftL))&&ic(),ut(w._implements)){h.tokens[h.tokens.length-1].type=o._implements;const e=Pe(1);uf(),_e(e)}}function fE(){is()}function mE(){is()}function gE(){const t=Pe(0);wt()||L(o.bang),Ms(),_e(t)}function yE(){y(o.colon)&&zr()}function bE(t,e){return vo?xE(t,e):kE(t,e)}function xE(t,e){if(!y(o.lessThan))return nn(t,e);const n=h.snapshot();let s=nn(t,e);if(h.error)h.restoreFromSnapshot(n);else return s;return h.type=o.typeParameterStart,Do(),s=nn(t,e),s||we(),s}function kE(t,e){if(!y(o.lessThan))return nn(t,e);const n=h.snapshot();Do();const s=nn(t,e);if(s||we(),h.error)h.restoreFromSnapshot(n);else return s;return nn(t,e)}function EE(){if(y(o.colon)){const t=h.snapshot();jr(o.colon),Ct()&&we(),y(o.arrow)||we(),h.error&&h.restoreFromSnapshot(t)}return L(o.arrow)}function AE(){const t=Pe(0);L(o.question),Ms(),_e(t)}function wE(){(y(o.lessThan)||y(o.bitShiftL))&&ic(),Lf()}function SE(){let t=!1,e=!1;for(;;){if(h.pos>=ne.length){we("Unterminated JSX contents");return}const n=ne.charCodeAt(h.pos);if(n===_.lessThan||n===_.leftCurlyBrace){if(h.pos===h.start){if(n===_.lessThan){h.pos++,Se(o.jsxTagStart);return}N1(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 IE(t){for(h.pos++;;){if(h.pos>=ne.length){we("Unterminated string constant");return}if(ne.charCodeAt(h.pos)===t){h.pos++;break}h.pos++}Se(o.string)}function vE(){let t;do{if(h.pos>ne.length){we("Unexpectedly reached the end of input.");return}t=ne.charCodeAt(++h.pos)}while(jt[t]||t===_.dash);Se(o.jsxName)}function oc(){Ot()}function ff(t){if(oc(),!L(o.colon)){h.tokens[h.tokens.length-1].identifierRole=t;return}oc()}function mf(){const t=h.tokens.length;ff(me.Access);let e=!1;for(;y(o.dot);)e=!0,Ot(),oc();if(!e){const n=h.tokens[t],s=ne.charCodeAt(n.start);s>=_.lowercaseA&&s<=_.lowercaseZ&&(n.identifierRole=null)}}function _E(){switch(h.type){case o.braceL:z(),mt(),Ot();return;case o.jsxTagStart:yf(),Ot();return;case o.string:Ot();return;default:we("JSX value should be either an expression or a quoted JSX text")}}function PE(){j(o.ellipsis),mt()}function $E(t){if(y(o.jsxTagEnd))return!1;mf(),De&&Wk();let e=!1;for(;!y(o.slash)&&!y(o.jsxTagEnd)&&!h.error;){if(L(o.braceL)){e=!0,j(o.ellipsis),gt(),Ot();continue}e&&h.end-h.start===3&&ne.charCodeAt(h.start)===_.lowercaseK&&ne.charCodeAt(h.start+1)===_.lowercaseE&&ne.charCodeAt(h.start+2)===_.lowercaseY&&(h.tokens[t].jsxRole=zt.KeyAfterPropSpread),ff(me.ObjectKey),y(o.eq)&&(Ot(),_E())}const n=y(o.slash);return n&&Ot(),n}function NE(){y(o.jsxTagEnd)||mf()}function gf(){const t=h.tokens.length-1;h.tokens[t].jsxRole=zt.NoChildren;let e=0;if(!$E(t))for(js();;)switch(h.type){case o.jsxTagStart:if(Ot(),y(o.slash)){Ot(),NE(),h.tokens[t].jsxRole!==zt.KeyAfterPropSpread&&(e===1?h.tokens[t].jsxRole=zt.OneChild:e>1&&(h.tokens[t].jsxRole=zt.StaticChildren));return}e++,gf(),js();break;case o.jsxText:e++,js();break;case o.jsxEmptyText:js();break;case o.braceL:z(),y(o.ellipsis)?(PE(),js(),e+=2):(y(o.braceR)||(e++,mt()),js());break;default:we();return}}function yf(){Ot(),gf()}function Ot(){h.tokens.push(new _o),_1(),h.start=h.pos;const t=ne.charCodeAt(h.pos);if(Rr[t])vE();else if(t===_.quotationMark||t===_.apostrophe)IE(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 js(){h.tokens.push(new _o),h.start=h.pos,SE()}function CE(t){if(y(o.question)){const e=et();if(e===o.colon||e===o.comma||e===o.parenR)return}bf(t)}function TE(){A1(o.question),y(o.colon)&&(De?zr():Be&&as())}class RE{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?bE(t,e):Be?FA(t,e):nn(t,e)}function nn(t,e){if(y(o._yield))return KE(),!1;(y(o.parenL)||y(o.name)||y(o._yield))&&(h.potentialArrowAt=h.start);const n=DE(t);return e&&hc(),h.type&o.IS_ASSIGN?(z(),gt(t),!1):n}function DE(t){return LE(t)?!0:(OE(t),!1)}function OE(t){De||Be?CE(t):bf(t)}function bf(t){L(o.question)&&(gt(),j(o.colon),gt(t))}function LE(t){const e=h.tokens.length;return Vr()?!0:(Mo(e,-1,t),!1)}function Mo(t,e,n){if(De&&(o._in&o.PRECEDENCE_MASK)>e&&!wt()&&(ut(w._as)||ut(w._satisfies))){const r=Pe(1);tt(),_e(r),$1(),Mo(t,e,n);return}const s=h.type&o.PRECEDENCE_MASK;if(s>0&&(!n||!y(o._in))&&s>e){const r=h.type;z(),r===o.nullishCoalescing&&(h.tokens[h.tokens.length-1].nullishStartIndex=t);const i=h.tokens.length;Vr(),Mo(i,r&o.IS_RIGHT_ASSOCIATIVE?s-1:s,n),r===o.nullishCoalescing&&(h.tokens[t].numNullishCoalesceStarts++,h.tokens[h.tokens.length-1].numNullishCoalesceEnds++),Mo(t,e,n)}}function Vr(){if(De&&!vo&&L(o.lessThan))return Hk(),!1;if(he(w._module)&&S1()===_.leftCurlyBrace&&!m1())return JE(),!1;if(h.type&o.IS_PREFIX)return z(),Vr(),!1;if(xf())return!0;for(;h.type&o.IS_POSTFIX&&!Ct();)h.type===o.preIncDec&&(h.type=o.postIncDec),z();return!1}function xf(){const t=h.tokens.length;return yn()?!0:(ac(t),h.tokens.length>t&&h.tokens[t].isOptionalChainStart&&(h.tokens[h.tokens.length-1].isOptionalChainEnd=!0),!1)}function ac(t,e=!1){Be?jA(t,e):kf(t,e)}function kf(t,e=!1){const n=new RE(!1);do ME(t,e,n);while(!n.stop&&!h.error)}function ME(t,e,n){De?rE(t,e,n):Be?kA(t,e,n):lc(t,e,n)}function lc(t,e,n){if(!e&&L(o.doubleColon))cc(),n.stop=!0,ac(t,e);else if(y(o.questionDot)){if(h.tokens[t].isOptionalChainStart=!0,e&&et()===o.parenL){n.stop=!0;return}z(),h.tokens[h.tokens.length-1].subscriptStartIndex=t,L(o.bracketL)?(mt(),j(o.bracketR)):L(o.parenL)?Nn():Fo()}else if(L(o.dot))h.tokens[h.tokens.length-1].subscriptStartIndex=t,Fo();else if(L(o.bracketL))h.tokens[h.tokens.length-1].subscriptStartIndex=t,mt(),j(o.bracketR);else if(!e&&y(o.parenL))if(Ef()){const s=h.snapshot(),r=h.tokens.length;z(),h.tokens[h.tokens.length-1].subscriptStartIndex=t;const i=Tr();h.tokens[h.tokens.length-1].contextId=i,Nn(),h.tokens[h.tokens.length-1].contextId=i,FE()&&(h.restoreFromSnapshot(s),n.stop=!0,h.scopeDepth++,Vs(),BE(r))}else{z(),h.tokens[h.tokens.length-1].subscriptStartIndex=t;const s=Tr();h.tokens[h.tokens.length-1].contextId=s,Nn(),h.tokens[h.tokens.length-1].contextId=s}else y(o.backQuote)?dc():n.stop=!0}function Ef(){return h.tokens[h.tokens.length-1].contextualKeyword===w._async&&!Ct()}function Nn(){let t=!0;for(;!L(o.parenR)&&!h.error;){if(t)t=!1;else if(j(o.comma),L(o.parenR))break;If(!1)}}function FE(){return y(o.colon)||y(o.arrow)}function BE(t){De?yE():Be&&MA(),j(o.arrow),qr(t)}function cc(){const t=h.tokens.length;yn(),ac(t,!0)}function yn(){if(L(o.modulo))return ye(),!1;if(y(o.jsxText)||y(o.jsxEmptyText))return zs(),!1;if(y(o.lessThan)&&vo)return h.type=o.jsxTagStart,yf(),z(),!1;const t=h.potentialArrowAt===h.start;switch(h.type){case o.slash:case o.assign:cx();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 z(),!1;case o._import:return z(),y(o.dot)&&(h.tokens[h.tokens.length-1].type=o.name,z(),ye()),!1;case o.name:{const e=h.tokens.length,n=h.start,s=h.contextualKeyword;return ye(),s===w._await?(XE(),!1):s===w._async&&y(o._function)&&!Ct()?(z(),ls(n,!1),!1):t&&s===w._async&&!Ct()&&y(o.name)?(h.scopeDepth++,Pn(!1),j(o.arrow),qr(e),!0):y(o._do)&&!Ct()?(z(),Cn(),!1):t&&!Ct()&&y(o.arrow)?(h.scopeDepth++,Xl(!1),j(o.arrow),qr(e),!0):(h.tokens[h.tokens.length-1].identifierRole=me.Access,!1)}case o._do:return z(),Cn(),!1;case o.parenL:return Af(t);case o.bracketL:return z(),Sf(o.bracketR,!0),!1;case o.braceL:return pc(!1,!1),!1;case o._function:return jE(),!1;case o.at:Ic();case o._class:return cs(!1),!1;case o._new:return VE(),!1;case o.backQuote:return dc(),!1;case o.doubleColon:return z(),cc(),!1;case o.hash:{const e=S1();return Rr[e]||e===_.backslash?Fo():z(),!1}default:return we(),!1}}function Fo(){L(o.hash),ye()}function jE(){const t=h.start;ye(),L(o.dot)&&ye(),ls(t,!1)}function zs(){z()}function Bo(){j(o.parenL),mt(),j(o.parenR)}function Af(t){const e=h.snapshot(),n=h.tokens.length;j(o.parenL);let s=!0;for(;!y(o.parenR)&&!h.error;){if(s)s=!1;else if(j(o.comma),y(o.parenR))break;if(y(o.ellipsis)){Q1(!1),hc();break}else gt(!1,!0)}return j(o.parenR),t&&zE()&&uc()?(h.restoreFromSnapshot(e),h.scopeDepth++,Vs(),uc(),qr(n),h.error?(h.restoreFromSnapshot(e),Af(!1),!1):!0):!1}function zE(){return y(o.colon)||!Ct()}function uc(){return De?EE():Be?BA():L(o.arrow)}function hc(){(De||Be)&&TE()}function VE(){if(j(o._new),L(o.dot)){ye();return}UE(),Be&&EA(),L(o.parenL)&&Sf(o.parenR)}function UE(){cc(),L(o.questionDot)}function dc(){for(_n(),_n();!y(o.backQuote)&&!h.error;)j(o.dollarBraceL),mt(),_n(),_n();z()}function pc(t,e){const n=Tr();let s=!0;for(z(),h.tokens[h.tokens.length-1].contextId=n;!L(o.braceR)&&!h.error;){if(s)s=!1;else if(j(o.comma),L(o.braceR))break;let r=!1;if(y(o.ellipsis)){const i=h.tokens.length;if(Y1(),t&&(h.tokens.length===i+2&&Xl(e),L(o.braceR)))break;continue}t||(r=L(o.star)),!t&&he(w._async)?(r&&we(),ye(),y(o.colon)||y(o.parenL)||y(o.braceR)||y(o.eq)||y(o.comma)||(y(o.star)&&(z(),r=!0),Ur(n))):Ur(n),GE(t,e,n)}h.tokens[h.tokens.length-1].contextId=n}function qE(t){return!t&&(y(o.string)||y(o.num)||y(o.bracketL)||y(o.name)||!!(h.type&o.IS_KEYWORD))}function HE(t,e){const n=h.start;return y(o.parenL)?(t&&we(),fc(n,!1),!0):qE(t)?(Ur(e),fc(n,!1),!0):!1}function WE(t,e){if(L(o.colon)){t?Ro(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,Ro(e,!0)}function GE(t,e,n){De?fE():Be&&CA(),HE(t,n)||WE(t,e)}function Ur(t){Be&&Sc(),L(o.bracketL)?(h.tokens[h.tokens.length-1].contextId=t,gt(),j(o.bracketR),h.tokens[h.tokens.length-1].contextId=t):(y(o.num)||y(o.string)||y(o.bigint)||y(o.decimal)?yn():Fo(),h.tokens[h.tokens.length-1].identifierRole=me.ObjectKey,h.tokens[h.tokens.length-1].contextId=t)}function fc(t,e){const n=Tr();h.scopeDepth++;const s=h.tokens.length;Vs(e,n),wf(t,n);const i=h.tokens.length;h.scopes.push(new en(s,i,!0)),h.scopeDepth--}function qr(t){Hr(!0);const e=h.tokens.length;h.scopes.push(new en(t,e,!0)),h.scopeDepth--}function wf(t,e=0){De?sE(t,e):Be?xA(e):Hr(!1,e)}function Hr(t,e=0){t&&!y(o.braceL)?gt():Cn(!0,e)}function Sf(t,e=!1){let n=!0;for(;!L(t)&&!h.error;){if(n)n=!1;else if(j(o.comma),L(t))break;If(e)}}function If(t){t&&y(o.comma)||(y(o.ellipsis)?(Y1(),hc()):y(o.question)?z():gt(!1,!0))}function ye(){z(),h.tokens[h.tokens.length-1].type=o.name}function XE(){Vr()}function KE(){z(),!y(o.semi)&&!Ct()&&(L(o.star),gt())}function JE(){rt(w._module),j(o.braceL),Ho(o.braceR)}function YE(t){return(t.type===o.name||!!(t.type&o.IS_KEYWORD))&&t.contextualKeyword!==w._from}function sn(t){const e=Pe(0);j(t||o.colon),_t(),_e(e)}function vf(){j(o.modulo),rt(w._checks),L(o.parenL)&&(mt(),j(o.parenR))}function mc(){const t=Pe(0);j(o.colon),y(o.modulo)?vf():(_t(),y(o.modulo)&&vf()),_e(t)}function QE(){z(),yc(!0)}function ZE(){z(),ye(),y(o.lessThan)&&qt(),j(o.parenL),wc(),j(o.parenR),mc(),Je()}function gc(){y(o._class)?QE():y(o._function)?ZE():y(o._var)?eA():ut(w._module)?L(o.dot)?sA():tA():he(w._type)?rA():he(w._opaque)?iA():he(w._interface)?oA():y(o._export)?nA():we()}function eA(){z(),Tf(),Je()}function tA(){for(y(o.string)?yn():ye(),j(o.braceL);!y(o.braceR)&&!h.error;)y(o._import)?(z(),qf()):we();j(o.braceR)}function nA(){j(o._export),L(o._default)?y(o._function)||y(o._class)?gc():(_t(),Je()):y(o._var)||y(o._function)||y(o._class)||he(w._opaque)?gc():y(o.star)||y(o.braceL)||he(w._interface)||he(w._type)||he(w._opaque)?Vf():we()}function sA(){rt(w._exports),as(),Je()}function rA(){z(),xc()}function iA(){z(),kc(!0)}function oA(){z(),yc()}function yc(t=!1){if(zo(),y(o.lessThan)&&qt(),L(o._extends))do jo();while(!t&&L(o.comma));if(he(w._mixins)){z();do jo();while(L(o.comma))}if(he(w._implements)){z();do jo();while(L(o.comma))}Vo(t,!1,t)}function jo(){_f(!1),y(o.lessThan)&&os()}function bc(){yc()}function zo(){ye()}function xc(){zo(),y(o.lessThan)&&qt(),sn(o.eq),Je()}function kc(t){rt(w._type),zo(),y(o.lessThan)&&qt(),y(o.colon)&&sn(o.colon),t||sn(o.eq),Je()}function aA(){Sc(),Tf(),L(o.eq)&&_t()}function qt(){const t=Pe(0);y(o.lessThan)||y(o.typeParameterStart)?z():we();do aA(),y(o.greaterThan)||j(o.comma);while(!y(o.greaterThan)&&!h.error);j(o.greaterThan),_e(t)}function os(){const t=Pe(0);for(j(o.lessThan);!y(o.greaterThan)&&!h.error;)_t(),y(o.greaterThan)||j(o.comma);j(o.greaterThan),_e(t)}function lA(){if(rt(w._interface),L(o._extends))do jo();while(L(o.comma));Vo(!1,!1,!1)}function Ec(){y(o.num)||y(o.string)?yn():ye()}function cA(){et()===o.colon?(Ec(),sn()):_t(),j(o.bracketR),sn()}function uA(){Ec(),j(o.bracketR),j(o.bracketR),y(o.lessThan)||y(o.parenL)?Ac():(L(o.question),sn())}function Ac(){for(y(o.lessThan)&&qt(),j(o.parenL);!y(o.parenR)&&!y(o.ellipsis)&&!h.error;)Uo(),y(o.parenR)||j(o.comma);L(o.ellipsis)&&Uo(),j(o.parenR),sn()}function hA(){Ac()}function Vo(t,e,n){let s;for(e&&y(o.braceBarL)?(j(o.braceBarL),s=o.braceBarR):(j(o.braceL),s=o.braceR);!y(s)&&!h.error;){if(n&&he(w._proto)){const r=et();r!==o.colon&&r!==o.question&&(z(),t=!1)}if(t&&he(w._static)){const r=et();r!==o.colon&&r!==o.question&&z()}if(Sc(),L(o.bracketL))L(o.bracketL)?uA():cA();else if(y(o.parenL)||y(o.lessThan))hA();else{if(he(w._get)||he(w._set)){const r=et();(r===o.name||r===o.string||r===o.num)&&z()}dA()}pA()}j(s)}function dA(){if(y(o.ellipsis)){if(j(o.ellipsis),L(o.comma)||L(o.semi),y(o.braceR))return;_t()}else Ec(),y(o.lessThan)||y(o.parenL)?Ac():(L(o.question),sn())}function pA(){!L(o.semi)&&!L(o.comma)&&!y(o.braceR)&&!y(o.braceBarR)&&we()}function _f(t){for(t||ye();L(o.dot);)ye()}function fA(){_f(!0),y(o.lessThan)&&os()}function mA(){j(o._typeof),Pf()}function gA(){for(j(o.bracketL);h.pos<ne.length&&!y(o.bracketR)&&(_t(),!y(o.bracketR));)j(o.comma);j(o.bracketR)}function Uo(){const t=et();t===o.colon||t===o.question?(ye(),L(o.question),sn()):_t()}function wc(){for(;!y(o.parenR)&&!y(o.ellipsis)&&!h.error;)Uo(),y(o.parenR)||j(o.comma);L(o.ellipsis)&&Uo()}function Pf(){let t=!1;const e=h.noAnonFunctionType;switch(h.type){case o.name:{if(he(w._interface)){lA();return}ye(),fA();return}case o.braceL:Vo(!1,!1,!1);return;case o.braceBarL:Vo(!1,!0,!1);return;case o.bracketL:gA();return;case o.lessThan:qt(),j(o.parenL),wc(),j(o.parenR),j(o.arrow),_t();return;case o.parenL:if(z(),!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)){j(o.parenR);return}else L(o.comma);wc(),j(o.parenR),j(o.arrow),_t();return;case o.minus:z(),zs();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:z();return;default:if(h.type===o._typeof){mA();return}else if(h.type&o.IS_KEYWORD){z(),h.tokens[h.tokens.length-1].type=o.name;return}}we()}function yA(){for(Pf();!Ct()&&(y(o.bracketL)||y(o.questionDot));)L(o.questionDot),j(o.bracketL),L(o.bracketR)||(_t(),j(o.bracketR))}function $f(){L(o.question)?$f():yA()}function Nf(){$f(),!h.noAnonFunctionType&&L(o.arrow)&&_t()}function Cf(){for(L(o.bitwiseAND),Nf();L(o.bitwiseAND);)Nf()}function bA(){for(L(o.bitwiseOR),Cf();L(o.bitwiseOR);)Cf()}function _t(){bA()}function as(){sn()}function Tf(){ye(),y(o.colon)&&as()}function Sc(){(y(o.plus)||y(o.minus))&&(z(),h.tokens[h.tokens.length-1].isType=!0)}function xA(t){y(o.colon)&&mc(),Hr(!1,t)}function kA(t,e,n){if(y(o.questionDot)&&et()===o.lessThan){if(e){n.stop=!0;return}z(),os(),j(o.parenL),Nn();return}else if(!e&&y(o.lessThan)){const s=h.snapshot();if(os(),j(o.parenL),Nn(),h.error)h.restoreFromSnapshot(s);else return}lc(t,e,n)}function EA(){if(y(o.lessThan)){const t=h.snapshot();os(),h.error&&h.restoreFromSnapshot(t)}}function AA(){if(y(o.name)&&h.contextualKeyword===w._interface){const t=Pe(0);return z(),bc(),_e(t),!0}else if(he(w._enum))return Rf(),!0;return!1}function wA(){return he(w._enum)?(Rf(),!0):!1}function SA(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);gc(),_e(e)}}else if(y(o.name)){if(t===w._interface){const e=Pe(1);bc(),_e(e)}else if(t===w._type){const e=Pe(1);xc(),_e(e)}else if(t===w._opaque){const e=Pe(1);kc(!1),_e(e)}}Je()}function IA(){return he(w._type)||he(w._interface)||he(w._opaque)||he(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 _A(){if(he(w._type)){const t=Pe(1);z(),y(o.braceL)?(Pc(),Xr()):xc(),_e(t)}else if(he(w._opaque)){const t=Pe(1);z(),kc(!1),_e(t)}else if(he(w._interface)){const t=Pe(1);z(),bc(),_e(t)}else Tt(!0)}function PA(){return y(o.star)||he(w._type)&&et()===o.star}function $A(){if(ut(w._type)){const t=Pe(2);_c(),_e(t)}else _c()}function NA(t){if(t&&y(o.lessThan)&&os(),he(w._implements)){const e=Pe(0);z(),h.tokens[h.tokens.length-1].type=o._implements;do zo(),y(o.lessThan)&&os();while(L(o.comma));_e(e)}}function CA(){y(o.lessThan)&&(qt(),y(o.parenL)||we())}function TA(){const t=Pe(0);L(o.question),y(o.colon)&&as(),_e(t)}function RA(){if(y(o._typeof)||he(w._type)){const t=Dr();(YE(t)||t.type===o.braceL||t.type===o.star)&&z()}}function DA(){const t=h.contextualKeyword===w._type||h.type===o._typeof;t?z():ye(),he(w._as)&&!zl(w._as)?(ye(),t&&!y(o.name)&&!(h.type&o.IS_KEYWORD)||ye()):(t&&(y(o.name)||h.type&o.IS_KEYWORD)&&ye(),ut(w._as)&&ye())}function OA(){if(y(o.lessThan)){const t=Pe(0);qt(),_e(t)}}function LA(){y(o.colon)&&as()}function MA(){if(y(o.colon)){const t=h.noAnonFunctionType;h.noAnonFunctionType=!0,as(),h.noAnonFunctionType=t}}function FA(t,e){if(y(o.lessThan)){const n=h.snapshot();let s=nn(t,e);if(h.error)h.restoreFromSnapshot(n),h.type=o.typeParameterStart;else return s;const r=Pe(0);if(qt(),_e(r),s=nn(t,e),s)return!0;we()}return nn(t,e)}function BA(){if(y(o.colon)){const t=Pe(0),e=h.snapshot(),n=h.noAnonFunctionType;h.noAnonFunctionType=!0,mc(),h.noAnonFunctionType=n,Ct()&&we(),y(o.arrow)||we(),h.error&&h.restoreFromSnapshot(e),_e(t)}return L(o.arrow)}function jA(t,e=!1){if(h.tokens[h.tokens.length-1].contextualKeyword===w._async&&y(o.lessThan)){const n=h.snapshot();if(zA()&&!h.error)return;h.restoreFromSnapshot(n)}kf(t,e)}function zA(){h.scopeDepth++;const t=h.tokens.length;return Vs(),uc()?(qr(t),!0):!1}function Rf(){rt(w._enum),h.tokens[h.tokens.length-1].type=o._enum,ye(),VA()}function VA(){ut(w._of)&&z(),j(o.braceL),UA(),j(o.braceR)}function UA(){for(;!y(o.braceR)&&!h.error&&!L(o.ellipsis);)qA(),y(o.braceR)||j(o.comma)}function qA(){ye(),L(o.eq)&&z()}function HA(){if(Ho(o.eof),h.scopes.push(new en(0,h.tokens.length,!0)),h.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${h.scopeDepth}`);return new Cw(h.tokens,h.scopes)}function Tt(t){Be&&AA()||(y(o.at)&&Ic(),WA(t))}function WA(t){if(De&&cE())return;const e=h.type;switch(e){case o._break:case o._continue:XA();return;case o._debugger:KA();return;case o._do:JA();return;case o._for:YA();return;case o._function:if(et()===o.dot)break;t||we(),ew();return;case o._class:t||we(),cs(!0);return;case o._if:tw();return;case o._return:nw();return;case o._switch:sw();return;case o._throw:rw();return;case o._try:ow();return;case o._let:case o._const:t||we();case o._var:qo(e!==o._var);return;case o._while:aw();return;case o.braceL:Cn();return;case o.semi:lw();return;case o._export:case o._import:{const r=et();if(r===o.parenL||r===o.dot)break;z(),e===o._import?qf():Vf();return}case o.name:if(h.contextualKeyword===w._async){const r=h.start,i=h.snapshot();if(z(),y(o._function)&&!Ct()){j(o._function),ls(r,!0);return}else h.restoreFromSnapshot(i)}else if(h.contextualKeyword===w._using&&!m1()&&et()===o.name){qo(!0);return}else if(Df()){rt(w._await),qo(!0);return}}const n=h.tokens.length;mt();let s=null;if(h.tokens.length===n+1){const r=h.tokens[h.tokens.length-1];r.type===o.name&&(s=r.contextualKeyword)}if(s==null){Je();return}L(o.colon)?cw():uw(s)}function Df(){if(!he(w._await))return!1;const t=h.snapshot();return z(),!he(w._using)||wt()||(z(),!y(o.name)||wt())?(h.restoreFromSnapshot(t),!1):(h.restoreFromSnapshot(t),!0)}function Ic(){for(;y(o.at);)Of()}function Of(){if(z(),L(o.parenL))mt(),j(o.parenR);else{for(ye();L(o.dot);)ye();GA()}}function GA(){De?wE():Lf()}function Lf(){L(o.parenL)&&Nn()}function XA(){z(),tn()||(ye(),Je())}function KA(){z(),Je()}function JA(){z(),Tt(!1),j(o._while),Bo(),L(o.semi)}function YA(){h.scopeDepth++;const t=h.tokens.length;ZA();const e=h.tokens.length;h.scopes.push(new en(t,e,!1)),h.scopeDepth--}function QA(){return!(!he(w._using)||zl(w._of))}function ZA(){z();let t=!1;if(he(w._await)&&(t=!0,z()),j(o.parenL),y(o.semi)){t&&we(),vc();return}const e=Df();if(e||y(o._var)||y(o._let)||y(o._const)||QA()){if(e&&rt(w._await),z(),Ff(!0,h.type!==o._var),y(o._in)||he(w._of)){Mf(t);return}vc();return}if(mt(!0),y(o._in)||he(w._of)){Mf(t);return}t&&we(),vc()}function ew(){const t=h.start;z(),ls(t,!0)}function tw(){z(),Bo(),Tt(!1),L(o._else)&&Tt(!1)}function nw(){z(),tn()||(mt(),Je())}function sw(){z(),Bo(),h.scopeDepth++;const t=h.tokens.length;for(j(o.braceL);!y(o.braceR)&&!h.error;)if(y(o._case)||y(o._default)){const n=y(o._case);z(),n&&mt(),j(o.colon)}else Tt(!0);z();const e=h.tokens.length;h.scopes.push(new en(t,e,!1)),h.scopeDepth--}function rw(){z(),mt(),Je()}function iw(){To(!0),De&&Ms()}function ow(){if(z(),Cn(),y(o._catch)){z();let t=null;if(y(o.parenL)&&(h.scopeDepth++,t=h.tokens.length,j(o.parenL),iw(),j(o.parenR)),Cn(),t!=null){const e=h.tokens.length;h.scopes.push(new en(t,e,!1)),h.scopeDepth--}}L(o._finally)&&Cn()}function qo(t){z(),Ff(!1,t),Je()}function aw(){z(),Bo(),Tt(!1)}function lw(){z()}function cw(){Tt(!0)}function uw(t){De?hE(t):Be?SA(t):Je()}function Cn(t=!1,e=0){const n=h.tokens.length;h.scopeDepth++,j(o.braceL),e&&(h.tokens[h.tokens.length-1].contextId=e),Ho(o.braceR),e&&(h.tokens[h.tokens.length-1].contextId=e);const s=h.tokens.length;h.scopes.push(new en(n,s,t)),h.scopeDepth--}function Ho(t){for(;!L(t)&&!h.error;)Tt(!0)}function vc(){j(o.semi),y(o.semi)||mt(),j(o.semi),y(o.parenR)||mt(),j(o.parenR),Tt(!1)}function Mf(t){t?ut(w._of):z(),mt(),j(o.parenR),Tt(!1)}function Ff(t,e){for(;;){if(hw(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 hw(t){To(t),De?gE():Be&&LA()}function ls(t,e,n=!1){y(o.star)&&z(),e&&!n&&!y(o.name)&&!y(o._yield)&&we();let s=null;y(o.name)&&(e||(s=h.tokens.length,h.scopeDepth++),Pn(!1));const r=h.tokens.length;h.scopeDepth++,Vs(),wf(t);const i=h.tokens.length;h.scopes.push(new en(r,i,!0)),h.scopeDepth--,s!==null&&(h.scopes.push(new en(s,i,!0)),h.scopeDepth--)}function Vs(t=!1,e=0){De?mE():Be&&OA(),j(o.parenL),e&&(h.tokens[h.tokens.length-1].contextId=e),Kl(o.parenR,!1,!1,t,e),e&&(h.tokens[h.tokens.length-1].contextId=e)}function cs(t,e=!1){const n=Tr();z(),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++),mw(t,e),gw();const r=h.tokens.length;if(dw(n),!h.error&&(h.tokens[r].contextId=n,h.tokens[h.tokens.length-1].contextId=n,s!==null)){const i=h.tokens.length;h.scopes.push(new en(s,i,!1)),h.scopeDepth--}}function Bf(){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 dw(t){for(j(o.braceL);!L(o.braceR)&&!h.error;){if(L(o.semi))continue;if(y(o.at)){Of();continue}const e=h.start;pw(e,t)}}function pw(t,e){De&&Yl([w._declare,w._public,w._protected,w._private,w._override]);let n=!1;if(y(o.name)&&h.contextualKeyword===w._static){if(ye(),jf()){Wr(t,!1);return}else if(Bf()){Wo();return}if(h.tokens[h.tokens.length-1].type=o._static,n=!0,y(o.braceL)){h.tokens[h.tokens.length-1].contextId=e,Cn();return}}fw(t,n,e)}function fw(t,e,n){if(De&&uE(e))return;if(L(o.star)){Gr(n),Wr(t,!1);return}Gr(n);let s=!1;const r=h.tokens[h.tokens.length-1];r.contextualKeyword===w._constructor&&(s=!0),zf(),jf()?Wr(t,s):Bf()?Wo():r.contextualKeyword===w._async&&!tn()?(h.tokens[h.tokens.length-1].type=o._async,y(o.star)&&z(),Gr(n),zf(),Wr(t,!1)):(r.contextualKeyword===w._get||r.contextualKeyword===w._set)&&!(tn()&&y(o.star))?(r.contextualKeyword===w._get?h.tokens[h.tokens.length-1].type=o._get:h.tokens[h.tokens.length-1].type=o._set,Gr(n),Wr(t,!1)):r.contextualKeyword===w._accessor&&!tn()?(Gr(n),Wo()):tn()?Wo():we()}function Wr(t,e){De?is():Be&&y(o.lessThan)&&qt(),fc(t,e)}function Gr(t){Ur(t)}function zf(){if(De){const t=Pe(0);L(o.question),_e(t)}}function Wo(){if(De?(A1(o.bang),Ms()):Be&&y(o.colon)&&as(),y(o.eq)){const t=h.tokens.length;z(),gt(),h.tokens[t].rhsEndIndex=h.tokens.length}Je()}function mw(t,e=!1){De&&(!t||e)&&he(w._implements)||(y(o.name)&&Pn(!0),De?is():Be&&y(o.lessThan)&&qt())}function gw(){let t=!1;L(o._extends)?(xf(),t=!0):t=!1,De?pE(t):Be&&NA(t)}function Vf(){const t=h.tokens.length-1;De&&iE()||(kw()?Ew():xw()?(ye(),y(o.comma)&&et()===o.star?(j(o.comma),j(o.star),rt(w._as),ye()):Uf(),Xr()):L(o._default)?yw():ww()?bw():(Pc(),Xr()),h.tokens[t].rhsEndIndex=h.tokens.length)}function yw(){if(De&&lE()||Be&&wA())return;const t=h.start;L(o._function)?ls(t,!0,!0):he(w._async)&&et()===o._function?(ut(w._async),L(o._function),ls(t,!0,!0)):y(o._class)?cs(!0,!0):y(o.at)?(Ic(),cs(!0,!0)):(gt(),Je())}function bw(){De?dE():Be?_A():Tt(!0)}function xw(){if(De&&pf())return!1;if(Be&&vA())return!1;if(y(o.name))return h.contextualKeyword!==w._async;if(!y(o._default))return!1;const t=Vl(),e=Dr(),n=e.type===o.name&&e.contextualKeyword===w._from;if(e.type===o.comma)return!0;if(n){const s=ne.charCodeAt(w1(t+4));return s===_.quotationMark||s===_.apostrophe}return!1}function Uf(){L(o.comma)&&Pc()}function Xr(){ut(w._from)&&(yn(),Wf()),Je()}function kw(){return Be?PA():y(o.star)}function Ew(){Be?$A():_c()}function _c(){j(o.star),he(w._as)?Aw():Xr()}function Aw(){z(),h.tokens[h.tokens.length-1].type=o._as,ye(),Uf(),Xr()}function ww(){return De&&pf()||Be&&IA()||h.type===o._var||h.type===o._const||h.type===o._let||h.type===o._function||h.type===o._class||he(w._async)||y(o.at)}function Pc(){let t=!0;for(j(o.braceL);!L(o.braceR)&&!h.error;){if(t)t=!1;else if(j(o.comma),L(o.braceR))break;Sw()}}function Sw(){if(De){aE();return}ye(),h.tokens[h.tokens.length-1].identifierRole=me.ExportAccess,ut(w._as)&&ye()}function Iw(){const t=h.snapshot();return rt(w._module),ut(w._from)?he(w._from)?(h.restoreFromSnapshot(t),!0):(h.restoreFromSnapshot(t),!1):y(o.comma)?(h.restoreFromSnapshot(t),!1):(h.restoreFromSnapshot(t),!0)}function vw(){he(w._module)&&Iw()&&z()}function qf(){if(De&&y(o.name)&&et()===o.eq){rc();return}if(De&&he(w._type)){const t=Dr();if(t.type===o.name&&t.contextualKeyword!==w._from){if(rt(w._type),et()===o.eq){rc();return}}else(t.type===o.star||t.type===o.braceL)&&rt(w._type)}y(o.string)||(vw(),Pw(),rt(w._from)),yn(),Wf(),Je()}function _w(){return y(o.name)}function Hf(){Co()}function Pw(){Be&&RA();let t=!0;if(!(_w()&&(Hf(),!L(o.comma)))){if(y(o.star)){z(),rt(w._as),Hf();return}for(j(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."),j(o.comma),L(o.braceR))break;$w()}}}function $w(){if(De){oE();return}if(Be){DA();return}Co(),he(w._as)&&(h.tokens[h.tokens.length-1].identifierRole=me.ImportAccess,z(),Co())}function Wf(){(y(o._with)||he(w._assert)&&!wt())&&(z(),pc(!1,!1))}function Nw(){return h.pos===0&&ne.charCodeAt(0)===_.numberSign&&ne.charCodeAt(1)===_.exclamationMark&&v1(2),I1(),HA()}class Cw{constructor(e,n){this.tokens=e,this.scopes=n}}function Tw(t,e,n,s){if(s&&n)throw new Error("Cannot combine flow and typescript plugins.");nx(t,e,n,s);const r=Nw();if(h.error)throw Zb(h.error);return r}function Rw(t){let e=t.currentIndex(),n=0;const s=t.currentToken();do{const r=t.tokens[e];if(r.isOptionalChainStart&&n++,r.isOptionalChainEnd&&n--,n+=r.numNullishCoalesceStarts,n-=r.numNullishCoalesceEnds,r.contextualKeyword===w._await&&r.identifierRole==null&&r.scopeDepth===s.scopeDepth)return!0;e+=1}while(n>0&&e<t.tokens.length);return!1}class Kr{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(e,n,s,r,i){this.code=e,this.tokens=n,this.isFlowEnabled=s,this.disableESTransforms=r,this.helperManager=i,Kr.prototype.__init.call(this),Kr.prototype.__init2.call(this),Kr.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,r){return this.tokens[e].type===n&&this.tokens[e+1].type===s&&this.tokens[e+2].type===r}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,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===r}matches5(e,n,s,r,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===r&&this.tokens[this.tokenIndex+4].type===i}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=Rw(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 Dw(t,e,n,s){const r=e.snapshot(),i=Ow(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}=Gf(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 S=!1,x=!1,I=!1;for(;Go(e.currentToken());)e.matches1(o._static)&&(S=!0),e.matches1(o.hash)&&(x=!0),(e.matches1(o._declare)||e.matches1(o._abstract))&&(I=!0),e.nextToken();if(S&&e.matches1(o.braceL)){$c(e,f);continue}if(x){$c(e,f);continue}if(e.matchesContextual(w._constructor)&&!e.currentToken().isType){({constructorInitializerStatements:a,constructorInsertPos:u}=Gf(e));continue}const E=e.currentIndex();if(Lw(e),e.matches1(o.lessThan)||e.matches1(o.parenL)){$c(e,f);continue}for(;e.currentToken().isType;)e.nextToken();if(e.matches1(o.eq)){const b=e.currentIndex(),A=e.currentToken().rhsEndIndex;if(A==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(e.nextToken();e.currentIndex()<A;)t.processToken();let v;S?(v=n.claimFreeName("__initStatic"),c.push(v)):(v=n.claimFreeName("__init"),l.push(v)),d.push({initializerName:v,equalsIndex:b,start:E,end:e.currentIndex()})}else(!s||I)&&m.push({start:g,end:e.currentIndex()})}return e.restoreToSnapshot(r),s?{headerInfo:i,constructorInitializerStatements:a,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:u,fields:[],rangesToRemove:m}:{headerInfo:i,constructorInitializerStatements:a,instanceInitializerNames:l,staticInitializerNames:c,constructorInsertPos:u,fields:d,rangesToRemove:m}}function $c(t,e){for(t.nextToken();t.currentToken().contextId!==e;)t.nextToken();for(;Go(t.tokenAtRelativeIndex(-1));)t.previousToken()}function Ow(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 r=null,i=!1;for(t.nextToken(),t.matches1(o.name)&&(r=t.identifierName());!t.matchesContextIdAndLabel(o.braceL,n);)t.matches1(o._extends)&&!t.currentToken().isType&&(i=!0),t.nextToken();return{isExpression:s,className:r,hasSuperclass:i}}function Gf(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(),Go(t.currentToken())){for(t.nextToken();Go(t.currentToken());)t.nextToken();const i=t.currentToken();if(i.type!==o.name)throw new Error("Expected identifier after access modifiers in constructor arg.");const a=t.identifierNameForToken(i);e.push(`this.${a} = ${a}`)}}else t.nextToken();for(t.nextToken();t.currentToken().isType;)t.nextToken();let s=t.currentIndex(),r=!1;for(;!t.matchesContextIdAndLabel(o.braceR,n);){if(!r&&t.matches2(o._super,o.parenL)){t.nextToken();const i=t.currentToken().contextId;if(i==null)throw new Error("Expected a context ID on the super call");for(;!t.matchesContextIdAndLabel(o.parenR,i);)t.nextToken();s=t.currentIndex(),r=!0}t.nextToken()}return t.nextToken(),{constructorInitializerStatements:e,constructorInsertPos:s}}function Go(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 Lw(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 Xf(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 Kf={typeDeclarations:new Set,valueDeclarations:new Set};function Jf(t){const e=new Set,n=new Set;for(let s=0;s<t.tokens.length;s++){const r=t.tokens[s];r.type===o.name&&E1(r)&&(r.isType?e.add(t.identifierNameForToken(r)):n.add(t.identifierNameForToken(r)))}return{typeDeclarations:e,valueDeclarations:n}}function Yf(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 us(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 Qf(t,e,n,s){if(!t||e)return!1;const r=n.currentToken();if(r.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");const i=r.rhsEndIndex-n.currentIndex();if(i!==3&&!(i===4&&n.matches1AtIndex(r.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 Jr extends Vt{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(e,n,s,r,i,a,l,c,u,d,m,f){super(),this.rootTransformer=e,this.tokens=n,this.importProcessor=s,this.nameManager=r,this.helperManager=i,this.reactHotLoaderTransformer=a,this.enableLegacyBabel5ModuleInterop=l,this.enableLegacyTypeScriptModuleInterop=c,this.isTypeScriptTransformEnabled=u,this.isFlowTransformEnabled=d,this.preserveDynamicImport=m,this.keepUnusedImports=f,Jr.prototype.__init.call(this),Jr.prototype.__init2.call(this),Jr.prototype.__init3.call(this),this.declarationInfo=u?Jf(n):Kf}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)?Xf(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))}us(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(),us(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),r=this.importProcessor.resolveExportBinding(s);return r?(this.tokens.appendCode(`${r} = `),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 r=this.tokens.identifierNameForToken(n),i=this.importProcessor.resolveExportBinding(r);if(!i)return!1;const a=this.tokens.rawCodeForToken(s),l=this.importProcessor.getIdentifierReplacement(r)||r;if(a==="++")this.tokens.replaceToken(`(${l} = ${i} = ${l} + 1, ${l} - 1)`);else if(a==="--")this.tokens.replaceToken(`(${l} = ${i} = ${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(Qf(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(k1(s)){const r=this.tokens.identifierName();let i=this.importProcessor.getIdentifierReplacement(r);if(i===null)throw new Error(`Expected a replacement for ${r} in \`export var\` syntax.`);lx(s)&&(i=`${r}: ${i}`),this.tokens.replaceToken(i)}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=Yf(this.tokens),n=[];for(;;){if(this.tokens.matches1(o.braceR)){this.tokens.removeToken();break}const s=Or(this.tokens);for(;this.tokens.currentIndex()<s.endIndex;)this.tokens.removeToken();if(!(s.isType||!e&&this.shouldElideExportedIdentifier(s.leftName))){const i=s.rightName;i==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;const a=s.leftName,l=this.importProcessor.getIdentifierReplacement(a);n.push(`exports.${i} = ${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)),us(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)),us(this.tokens),this.tokens.matches1(o.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}}class Mw extends Vt{constructor(e,n,s,r,i,a,l,c){super(),this.tokens=e,this.nameManager=n,this.helperManager=s,this.reactHotLoaderTransformer=r,this.isTypeScriptTransformEnabled=i,this.isFlowTransformEnabled=a,this.keepUnusedImports=l,this.nonTypeIdentifiers=i&&!l?M1(e,c):new Set,this.declarationInfo=i&&!l?Jf(e):Kf,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(),us(this.tokens)),!0}return!1}processImportEquals(){const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?Xf(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(),us(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 r=Or(this.tokens);if(r.isType||this.shouldAutomaticallyElideImportedName(r.rightName)){for(;this.tokens.currentIndex()<r.endIndex;)this.tokens.removeToken();this.tokens.matches1(o.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<r.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(Qf(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=Yf(this.tokens);let n=!1;for(;!this.tokens.matches1(o.braceR);){const s=Or(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(),us(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}}class Fw extends Vt{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 Bw(t){let e,n=t[0],s=1;for(;s<t.length;){const r=t[s],i=t[s+1];if(s+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(e=n,n=i(n)):(r==="call"||r==="optionalCall")&&(n=i((...a)=>n.call(e,...a)),e=void 0)}return n}const Xo="jest",jw=["mock","unmock","enableAutomock","disableAutomock"];class Nc extends Vt{__init(){this.hoistedFunctionNames=[]}constructor(e,n,s,r){super(),this.rootTransformer=e,this.tokens=n,this.nameManager=s,this.importProcessor=r,Nc.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()===Xo?Bw([this,"access",e=>e.importProcessor,"optionalAccess",e=>e.getGlobalNames,"call",e=>e(),"optionalAccess",e=>e.has,"call",e=>e(Xo)])?!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(jw.includes(n)){const r=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(r),this.tokens.replaceToken(`function ${r}(){${Xo}.`),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(`${Xo}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(o.parenR),e=!0}return!0}}class zw extends Vt{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 Vw extends Vt{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 Uw extends Vt{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 r;if(n>0&&this.tokens.matches1AtIndex(n-1,o._delete)&&this.isLastSubscriptInChain()?r=`${s} => delete ${s}`:r=`${s} => ${s}`,this.tokens.tokens[n].isAsyncOperation&&(r=`async ${r}`),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', ${r}`);else if(this.tokens.matches2(o.questionDot,o.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${r}`);else if(this.tokens.matches1(o.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${r}.`);else if(this.tokens.matches1(o.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${r}.`);else if(this.tokens.matches1(o.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${r}[`);else if(this.tokens.matches1(o.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${r}(`);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 qw extends Vt{constructor(e,n,s,r){super(),this.rootTransformer=e,this.tokens=n,this.importProcessor=s,this.options=r}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],r=s.lastIndexOf("."),i=r===-1?s:s.slice(0,r);return i==="index"&&n[n.length-2]?n[n.length-2]:i}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 r=this.tokens.tokens[e];if(r.type===o.braceR&&r.contextId===s){e++;break}if(this.tokens.identifierNameAtIndex(e)==="displayName"&&this.tokens.tokens[e].identifierRole===me.ObjectKey&&r.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 Cc extends Vt{__init(){this.extractedDefaultExportName=null}constructor(e,n){super(),this.tokens=e,this.filePath=n,Cc.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&&E1(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:r})=>` reactHotLoader.register(${s}, "${r}", ${JSON.stringify(this.filePath||"")});`).join(`
|
|
183
|
-
`)}
|
|
184
|
-
leaveModule(module);
|
|
185
|
-
})();`}process(){return!1}}const Hw=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 Zf(t){if(t.length===0||!Rr[t.charCodeAt(0)])return!1;for(let e=1;e<t.length;e++)if(!jt[t.charCodeAt(e)])return!1;return!Hw.has(t)}class Ww extends Vt{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:r}=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,r):this.tokens.matches1(o.eq)?this.processExplicitValueEnumMember(e,s,r):this.processImplicitValueEnumMember(e,s,r,n),this.tokens.matches1(o.comma)&&this.tokens.removeToken(),r!=null?n=r:n=`${e}[${s}]`}}extractEnumKeyInfo(e){if(e.type===o.name){const n=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${n}"`,variableName:Zf(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:Zf(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 r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw new Error("Expected rhsEndIndex on enum assign.");if(s!=null){for(this.tokens.appendCode(`const ${s}`),this.tokens.copyToken();this.tokens.currentIndex()<r;)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()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${n};`)}}processImplicitValueEnumMember(e,n,s,r){let i=r!=null?`${r} + 1`:"0";s!=null&&(this.tokens.appendCode(`const ${s} = ${i}; `),i=s),this.tokens.appendCode(`${e}[${e}[${n}] = ${i}] = ${n};`)}}class Ko{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(e,n,s,r){Ko.prototype.__init.call(this),Ko.prototype.__init2.call(this),this.nameManager=e.nameManager,this.helperManager=e.helperManager;const{tokenProcessor:i,importProcessor:a}=e;this.tokens=i,this.isImportsTransformEnabled=n.includes("imports"),this.isReactHotLoaderTransformEnabled=n.includes("react-hot-loader"),this.disableESTransforms=!!r.disableESTransforms,r.disableESTransforms||(this.transformers.push(new Uw(i,this.nameManager)),this.transformers.push(new zw(i)),this.transformers.push(new Vw(i,this.nameManager))),n.includes("jsx")&&(r.jsxRuntime!=="preserve"&&this.transformers.push(new ss(this,i,a,this.nameManager,r)),this.transformers.push(new qw(this,i,a,r)));let l=null;if(n.includes("react-hot-loader")){if(!r.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");l=new Cc(i,r.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 Jr(this,i,a,this.nameManager,this.helperManager,l,s,!!r.enableLegacyTypeScriptModuleInterop,n.includes("typescript"),n.includes("flow"),!!r.preserveDynamicImport,!!r.keepUnusedImports))}else this.transformers.push(new Mw(i,this.nameManager,this.helperManager,l,n.includes("typescript"),n.includes("flow"),!!r.keepUnusedImports,r));n.includes("flow")&&this.transformers.push(new Fw(this,i,n.includes("imports"))),n.includes("typescript")&&this.transformers.push(new Ww(this,i,n.includes("imports"))),n.includes("jest")&&this.transformers.push(new Nc(this,i,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 r=this.tokens.finish();let{code:i}=r;if(i.startsWith("#!")){let a=i.indexOf(`
|
|
186
|
-
`);return a===-1&&(a=i.length,i+=`
|
|
187
|
-
`),{code:i.slice(0,a+1)+n+i.slice(a+1)+s,mappings:this.shiftMappings(r.mappings,n.length)}}else return{code:n+i+s,mappings:this.shiftMappings(r.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=Dw(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 i=this.tokens.currentToken().contextId;if(i==null)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(o._class);!this.tokens.matchesContextIdAndLabel(o.braceL,i);)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:r,constructorInitializerStatements:i,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=i.length+l.length>0;if(r===null&&f){const g=this.makeConstructorInitCode(i,l,n);if(s.hasSuperclass){const S=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${S}) { super(...${S}); ${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()===r?(this.tokens.copyToken(),f&&this.tokens.appendCode(`;${this.makeConstructorInitCode(i,l,n)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(o.braceR)}makeConstructorInitCode(e,n,s){return[...e,...n.map(r=>`${s}.prototype.${r}.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 r=e[s];r!==void 0&&(e[s]=r+n)}return e}}var Tc={},em;function Gw(){return em||(em=1,function(t){t.__esModule=!0,t.LinesAndColumns=void 0;var e=`
|
|
188
|
-
`,n="\r",s=function(){function r(i){this.string=i;for(var a=[0],l=0;l<i.length;)switch(i[l]){case e:l+=e.length,a.push(l);break;case n:l+=n.length,i[l]===e&&(l+=e.length),a.push(l);break;default:l++;break}this.offsets=a}return r.prototype.locationForIndex=function(i){if(i<0||i>this.string.length)return null;for(var a=0,l=this.offsets;l[a+1]<=i;)a++;var c=i-l[a];return{line:a,column:c}},r.prototype.indexForLocation=function(i){var a=i.line,l=i.column;return a<0||a>=this.offsets.length||l<0||l>this.lengthOfLine(a)?null:this.offsets[a]+l},r.prototype.lengthOfLine=function(i){var a=this.offsets[i],l=i===this.offsets.length-1?this.string.length:this.offsets[i+1];return l-a},r}();t.LinesAndColumns=s,t.default=s}(Tc)),Tc}Gw();function Xw(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)&&Kw(t,n,e);return e}function Kw(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++,Jw(t,e,n)))}function Jw(t,e,n){for(;;){if(t.matches1AtIndex(e,o.braceR))return;const s=Or(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 Yw(t,e){pk(e);try{const n=Qw(t,e),r=new Ko(n,e.transforms,!!e.enableLegacyBabel5ModuleInterop,e).transform();let i={code:r.code};if(e.sourceMapOptions){if(!e.filePath)throw new Error("filePath must be specified when generating a source map.");i={...i,sourceMap:tk(r,e.filePath,e.sourceMapOptions,t,n.tokenProcessor.tokens)}}return i}catch(n){throw e.filePath&&(n.message=`Error transforming ${e.filePath}: ${n.message}`),n}}function Qw(t,e){const n=e.transforms.includes("jsx"),s=e.transforms.includes("typescript"),r=e.transforms.includes("flow"),i=e.disableESTransforms===!0,a=Tw(t,n,s,r),l=a.tokens,c=a.scopes,u=new Wl(t,l),d=new No(u),m=new Kr(t,l,r,i,d),f=!!e.enableLegacyTypeScriptModuleInterop;let g=null;return e.transforms.includes("imports")?(g=new rs(u,m,f,e,e.transforms.includes("typescript"),!!e.keepUnusedImports,d),g.preprocessTokens(),H1(m,c,g.getGlobalNames()),e.transforms.includes("typescript")&&!e.keepUnusedImports&&g.pruneTypeOnlyImports()):e.transforms.includes("typescript")&&!e.keepUnusedImports&&H1(m,c,Xw(m)),{tokenProcessor:m,scopes:c,nameManager:u,importProcessor:g,helperManager:d}}function Zw(t){return t=t.replace(/<link.*?href=["']\/\/.*?["'].*?>/g,e=>e.replace("//","https://")),t=t.replace(/<script.*?src=["']\/\/.*?["'].*?>/g,e=>e.replace("//","https://")),t}function eS(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 tm(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Rc(t){let e=t["index.html"]||"";const{"index.html":n,...s}=t;e=Zw(e);const r={};for(const[m,f]of Object.entries(s))if(f){if(m.endsWith(".js")){const g=new RegExp(`<script(.*?)src=["']${tm(m)}["'](.*?)>[\\s\\S]*?<\\/script>`,"g");if(e.match(g)){const S=f.replace(/\$/g,"$$$$");e=e.replace(g,`<script$1$2>${S}<\/script>`);continue}}if(m.endsWith(".css")){const g=new RegExp(`<link.*?href=["']${tm(m)}["'].*?>`,"g");if(e.match(g)){e=e.replace(g,`<style>${f}</style>`);continue}}m.endsWith(".html")||(r[m]=f)}const i=Object.keys(r),a=encodeURIComponent(JSON.stringify(r)),c=`<meta charset="utf-8">${eS(i,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 tS=()=>(Math.random()+"").slice(2);function Dc(t={}){return{name:"sucrase",transform(e,n){if(!n.match(/\.(?:js|[jt]sx)$/))return null;const s=Yw(e,{transforms:["jsx","typescript"],filePath:n,sourceMapOptions:{compiledFilename:"bundle.js"},production:!0,...t});return{code:s.code,map:s.sourceMap}}}}const nm={dependencies:{},vizhub:{},license:"MIT"},nS=!1,Jo=t=>{const e=t["package.json"];try{const n=e?JSON.parse(e):nm;return nS&&console.log("[packageJSON] pkg:",JSON.stringify(n,null,2)),n}catch{return nm}},Oc=t=>Jo(t).dependencies||{},Lc=t=>(Jo(t).vizhub||{}).libraries||{},Mc=({name:t,version:e},n,s="jsdelivr")=>{const r=n[t]&&n[t].path||"";return s==="jsdelivr"?`https://cdn.jsdelivr.net/npm/${t}@${e}${r}`:`https://unpkg.com/${t}@${e}${r}`},sS=t=>{const e=t?.vizhub?.libraries;return e?Object.entries(e).reduce((n,[s,r])=>(r.global&&(n[s]=r.global),n),{}):{}},rS={d3:"d3",react:"React","react-dom":"ReactDOM"},sm=t=>{const e=sS(t);return{...rS,...e}},Yr=t=>{const[e,...n]=t.split("/"),s=n.join("/");return{vizId:e,fileName:s}},iS=`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 };`,oS=t=>t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),aS=()=>({name:"transformDSV",transform:async(t,e)=>{const{fileName:n}=Yr(e),s=n.endsWith(".csv"),r=n.endsWith(".tsv");if(s||r)return{code:`
|
|
493
|
-
${iS}
|
|
494
|
-
const data = ${s?"csvParse":"tsvParse"}(\`${oS(t)}\`);
|
|
495
|
-
export default data;
|
|
496
|
-
`,map:{mappings:""}}}}),lS=t=>{const e=/^@([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)$/,n=t.match(e);return n?{userName:n[1],idOrSlug:n[2]}:null},cS=({vizId:t,slugCache:e})=>({name:"vizResolve",resolveId:async(n,s)=>{if(n.startsWith("./")&&!s?.startsWith("https://")){let i=n.substring(2);if(!i.endsWith(".js")&&!i.endsWith(".css")&&!i.endsWith(".csv")&&!i.endsWith(".svelte")&&!i.endsWith(".png")&&!i.endsWith(".jpg")&&!i.endsWith(".jpeg")&&!i.endsWith(".gif")&&!i.endsWith(".svg")&&!i.endsWith(".webp")&&!i.endsWith(".bmp")&&(i+=".js"),s){const{vizId:a,fileName:l}=Yr(s),c=l.split("/").slice(0,-1).join("/"),u=c?`${c}/${i}`:i;return`${a}/${u}`}return t+"/"+i}const r=lS(n);if(r){let i;if(qb(r.idOrSlug))i=r.idOrSlug;else{if(!e)throw new Error("slugCache is required to import by slug in v3 runtime");i=await e.get(`${r.userName}/${r.idOrSlug}`)}return i+"/index.js"}}}),uS=[".jpg",".jpeg",".png",".gif",".svg",".webp",".bmp"],Fc=t=>{const e=t.toLowerCase().split(".").pop();return e?uS.includes(`.${e}`):!1},hS=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"}},dS=t=>{const e=t.replace(/\s/g,"");return/^[A-Za-z0-9+/]*={0,2}$/.test(e)},Bc=(t,e)=>{const n=hS(t);return t.toLowerCase().split(".").pop()==="svg"&&!dS(e)?`data:${n};utf8,${encodeURIComponent(e)}`:`data:${n};base64,${e}`},pS=(t,e)=>t.replace(/<img([^>]*)\s+src=["']([^"']+)["']([^>]*)>/gi,(n,s,r,i)=>{if(e[r]!==void 0&&Fc(r)){const a=Bc(r,e[r]);return`<img${s} src="${a}"${i}>`}return n}),fS=({vizCache:t,trackCSSImport:e,vizId:n,files:s})=>({name:"vizLoad",load:async r=>{const i=Yr(r),a=i.vizId,l=i.fileName;if(l.endsWith(".css"))return e(r),"";let c=null;if(a===n&&s)c=s[l]||null;else{const u=await t.get(a);c=p1(u,l)}if(c===null)throw new Error(`Imported file "${l}" not found.`);return Fc(l)?`export default "${Bc(l,c)}";`:c}}),rm=new Map,jc=new Map;let zc;const Us="https://cdn.jsdelivr.net/npm/svelte@5.37.1",mS=`${Us}/compiler/index.js`;async function im(t){const e=jc.get(t);if(e)return e;const n=[".js","/index.js"];for(const r of n){const i=`${t}${r}`;try{if((await fetch(i,{method:"HEAD"})).ok)return jc.set(t,i),i}catch{continue}}const s=`${t}.js`;return jc.set(t,s),s}const gS=({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(Us))return;const n=rm.get(e);if(n)return n;const s=await fetch(e).then(r=>r.text());return rm.set(e,s),s},resolveId:async(e,n)=>{if(e==="esm-env")return"virtual:esm-env";if(e==="svelte")return`${Us}/src/index-client.js`;if(e.startsWith("svelte/")){const s=e.slice(7),r=`${Us}/src/${s}`;return await im(r)}if(e.startsWith("#client/")){const s=e.slice(8),r=`${Us}/src/internal/client/${s}`;return await im(r)}if(/^https?:/.test(e))return e;if(e.startsWith(".")&&n&&n.startsWith(Us)){const s=new URL(e,n).href;return new URL(e,n).href,s}},transform:async(e,n)=>{const{fileName:s}=Yr(n);if(s.endsWith(".svelte")){if(!zc){if(!t)throw new Error("Svelte compiler not available");zc=await t()}const r=zc(e,{filename:s,generate:"client",css:"external",dev:!1});let i=r.js.code;return r.css&&r.css.code&&(i=`
|
|
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(r.css.code)};
|
|
507
|
-
document.head.appendChild(style);
|
|
508
|
-
}
|
|
509
|
-
})();
|
|
510
|
-
`+i),i}}}),yS=async({files:t,rollup:e,enableSourcemap:n=!0,vizCache:s,vizId:r,slugCache:i,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,I){let E=!1,b=x;return b.includes("process.env.NODE_ENV")&&(b=b.replace(/\bprocess\.env\.NODE_ENV\b/g,JSON.stringify("production")),E=!0),E?{code:b,map:null}:null}},d={input:"./index.js",plugins:[...r?[cS({vizId:r,slugCache:i})]:[],aS(),Dc(),gS({getSvelteCompiler:a}),u,...s?[fS({vizCache:s,trackCSSImport:c,vizId:r,files:t})]:[]],onwarn(x,I){x.code!=="UNRESOLVED_IMPORT"&&I(x)}},m={format:"umd",name:"Viz",sourcemap:!!n,compact:!0},f=Jo(t);if(f){const x=sm(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:S}=await g.generate(m);return{src:S[0].code,cssFiles:Array.from(l)}},bS=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",r="filename"in t?t.filename:"",i="lineno"in t?t.lineno:"",a="colno"in t?t.colno:"";let l="";return r&&i&&(l=` at ${r}:${i}`,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)}`},Yo=()=>`
|
|
514
|
-
// Global error handling for runtime errors
|
|
515
|
-
(() => {
|
|
516
|
-
const formatRuntimeError = ${bS.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 xS(){return Math.random().toString().slice(2,7)}const kS=({cdn:t,src:e,styles:n})=>{const s=`viz-container-${xS()}`;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>${Yo()}<\/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>`},ES=async({files:t,rollup:e,enableSourcemap:n=!0,vizCache:s,vizId:r,slugCache:i,getSvelteCompiler:a})=>{const{src:l,cssFiles:c}=await yS({files:t,rollup:e,enableSourcemap:n,vizCache:s,vizId:r,slugCache:i,getSvelteCompiler:a});let u=[];if(c.length>0)for(let S=0;S<c.length;S++){const x=c[S],I=Yr(x),E=I.vizId,b=I.fileName;let A=null;if(E===r&&t)A=t[b]||null;else{const v=await s.get(E);A=p1(v,b)}A&&u.push(A)}const d=u.join(`
|
|
616
|
-
`),m=`
|
|
617
|
-
<style id="injected-style">${d}</style>`;let f="";const g=Object.entries(Oc(t));if(g.length>0){const S=Lc(t);f=g.map(([x,I],E)=>{const b=Mc({name:x,version:I},S);return`${E>0?" ":`
|
|
618
|
-
`}<script src="${b}"><\/script>`}).join("")}return{html:kS({cdn:f,src:l,styles:m}),css:d,js:l,runtimeVersion:"v3"}},om=({initialContents:t,handleCacheMiss:e})=>{const n=new Map(t.map(s=>[s.id,s]));return{get:async s=>{const r=n.get(s);if(r!==void 0)return r;if(!e)throw new Error(`Unresolved import from vizId ${s}, cache miss handler not provided.`);const i=await e(s);if(i)return n.set(s,i),i;throw new Error(`Unresolved import from vizId ${s}`)},set:s=>{n.set(s.id,s)},invalidate:s=>{n.delete(s)}}},AS=({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 r=await e(n);if(r)return t[n]=r,r;throw new Error(`Unresolved slug ${n}`)},set:(n,s)=>{t[n]=s},invalidate:n=>{delete t[n]}}),wS=(t,e="Sample Content for Exporting",n=d1())=>({id:n,files:Jb(t),title:e}),SS=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},Vc=(t,e)=>new RegExp(`<${e}\\b`,"i").test(t)&&new RegExp(`</${e}>`,"i").test(t),IS=t=>{const e=t.trim();return Vc(e,"html")&&Vc(e,"head")&&Vc(e,"body")?e:`<html><head></head><body>${e}</body></html>`},vS=(t,e)=>t.replace(new RegExp(`<script[^>]*src=["'][^"']*${e.source}[^"']*["'][^>]*>\\s*<\/script>`,"gi"),""),Uc=(t,e,n)=>t.replace(new RegExp(e,"i"),`${n}${e}`),_S=(t,e)=>{let n=IS(t);const s=Object.entries(Oc(e));if(s.length){const i=Lc(e);s.forEach(([l])=>{n=vS(n,new RegExp(`${l}@`))});const a=s.map(([l,c])=>Mc({name:l,version:c},i)).map(l=>`<script src="${l}"><\/script>`).join(`
|
|
619
|
-
`);n=Uc(n,"</head>",a+`
|
|
620
|
-
`)}if(e["bundle.js"]!==void 0||e["index.js"]!==void 0){const i='<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=Uc(n,"</body>",i))}const r=`<script>${Yo()}<\/script>
|
|
621
|
-
`;return n=Uc(n,"</head>",r),/^\s*<!DOCTYPE/i.test(n)?n:`<!DOCTYPE html>${n}`},PS=t=>{const e=t["index.html"];return!e&&!t["index.js"]&&!t["bundle.js"]?"":_S(e||"<!DOCTYPE html><html><head></head><body></body></html>",t)};function $S(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var am,lm;function NS(){return lm||(lm=1,am={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"}),am}var CS=NS();const TS=$S(CS),rn="\0virtual:",RS=t=>{let e=t.replace(/^\.\//,"");return e=e.replace(/\/+/g,"/"),e=e.replace(/\/$/,""),e},DS=(t,e)=>{const n=t.includes("/")?t.slice(0,t.lastIndexOf("/")):"",s=e.split("/"),r=n?n.split("/"):[];for(const i of s)i===".."?r.pop():i!=="."&&i!==""&&r.push(i);return r.join("/")},cm=t=>({name:"virtual-file-system",resolveId(e,n){const s=n?.startsWith(rn)?n.slice(rn.length):n;if(e.startsWith("./")||e.startsWith("../")){const i=RS(s?DS(s,e):e);if(t[i])return rn+i;const a=[".js",".jsx",".ts",".tsx"];for(const l of a){const c=i+l;if(t[c])return rn+c}}if(t[e])return rn+e;const r=[".js",".jsx",".ts",".tsx"];for(const i of r){const a=e+i;if(t[a])return rn+a}return null},load(e){if(e.startsWith(rn)){const n=e.slice(rn.length);if(t[n])return Fc(n)?`export default "${Bc(n,t[n])}";`:t[n]}return null}}),OS=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 r={input:"./"+s,plugins:[cm(t),Dc()],onwarn(u,d){u.code!=="UNRESOLVED_IMPORT"&&d(u)}},i={format:"iife",sourcemap:n},a=Jo(t);if(a){const u={...TS,...sm(a)};u&&(r.external=Object.keys(u),i.globals=u)}const l=await e(r),{output:c}=await l.generate(i);return c[0].code},LS=async({files:t,rollup:e,enableSourcemap:n})=>({...t,"bundle.js":await OS({files:t,rollup:e,enableSourcemap:n}),"index.html":PS(t)}),MS=t=>{const e=[],n=[],s=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi;let r,i=0;for(;(r=s.exec(t))!==null;){const a=r[1],l=r[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_${i++}.js`;n.push({id:u,content:l.trim()}),e.push(u)}}return{entryPoints:e,inlineScripts:n}},FS=()=>({name:"catch-all-prevent-fs",resolveId(t,e){return{id:t,external:!0}}}),BS=async({entryPoint:t,files:e,rollup:n,enableSourcemap:s=!0})=>{const r={input:t.startsWith("./")?t:`./${t}`,plugins:[cm(e),Dc({jsxRuntime:"automatic"}),FS()],onwarn(l,c){}},i=await n(r),{output:a}=await i.generate({format:"es",sourcemap:s});return a[0].code},qc=(t,e)=>new RegExp(`<${e}\\b`,"i").test(t)&&new RegExp(`</${e}>`,"i").test(t),jS=t=>{const e=t.trim();return qc(e,"html")&&qc(e,"head")&&qc(e,"body")?e:`<html><head></head><body>${e}</body></html>`},um=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Hc=(t,e,n)=>t.replace(new RegExp(e,"i"),`${n}${e}`),zS=t=>{const e=Oc(t);if(Object.keys(e).length===0)return null;const n=Lc(t),s={};for(const[r,i]of Object.entries(e))s[r]=Mc({name:r,version:i},n);return JSON.stringify({imports:s},null,2)},VS=()=>`
|
|
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
|
-
`,US=(t,e,n=[],s=!1)=>{if(!t["index.html"])return"";let r=jS(t["index.html"]);e.forEach((l,c)=>{if(n.some(u=>u.id===c)){const u=n.find(f=>f.id===c)?.content||"",d=um(u),m=new RegExp(`<script\\b[^>]*\\btype=["']module["'][^>]*>\\s*${d}\\s*<\/script>`,"gi");r=r.replace(m,`<script type="module">
|
|
676
|
-
${l}
|
|
677
|
-
<\/script>`)}else{const u=new RegExp(`<script\\b[^>]*\\bsrc=["']${um(c)}["'][^>]*>[^<]*<\/script>`,"gi");r=r.replace(u,`<script type="module">
|
|
678
|
-
${l}
|
|
679
|
-
<\/script>`)}});const i=zS(t);if(i&&!/<script\b[^>]*type=["']importmap["'][^>]*>/i.test(r)){const l=`<script type="importmap">
|
|
680
|
-
${i}
|
|
681
|
-
<\/script>
|
|
682
|
-
`;r=Hc(r,"</head>",l)}const a=`<script>${Yo()}<\/script>
|
|
683
|
-
`;if(r=Hc(r,"</head>",a),s){const l=`<script>${VS()}<\/script>
|
|
684
|
-
`;r=Hc(r,"</body>",l)}return/^\s*<!DOCTYPE/i.test(r)?r:`<!DOCTYPE html>${r}`},qS=async({files:t,rollup:e,enableSourcemap:n=!0})=>{const s=t["index.html"]||"",{entryPoints:r,inlineScripts:i}=MS(s);if(r.length===0)return{files:t,bundledJS:""};const a={...t};for(const m of i)a[m.id]=m.content;const l=new Map,c=[];for(const m of r){const f=await BS({entryPoint:m,files:a,rollup:e,enableSourcemap:n});l.set(m,f),c.push(f)}const u=US(a,l,i,!0),d=c.join(`
|
|
685
|
-
`);return{files:{...t,"index.html":u},bundledJS:d}},Qr=!1,HS=t=>{const e=`<script>${Yo()}<\/script>`;return t.includes("</head>")?t.replace("</head>",`${e}
|
|
686
|
-
</head>`):t.includes("</body>")?t.replace("</body>",`${e}
|
|
687
|
-
</body>`):t+e},Wc=t=>{const e={...t};for(const[n,s]of Object.entries(e))n.toLowerCase().endsWith(".html")&&(e[n]=pS(s,t));return e},WS=async({files:t,rollup:e,enableSourcemap:n=!0,vizCache:s,vizId:r,slugCache:i,getSvelteCompiler:a})=>{try{if(Qr&&console.log("[build] files:",t?JSON.stringify(t).substring(0,100):void 0),Qr&&console.log("[build] vizCache:",s),Qr&&console.log("[build] vizId:",r),!t&&!s)throw new Error("Either files or vizCache is required");if(!t&&s&&!r)throw new Error("vizId is required when using vizCache");if(!t&&s&&r&&(t=Kb((await s.get(r))?.files)),!t)throw new Error("Upable to extract viz files");const l=SS(t);if(Qr&&console.log("[build] version:",l),l==="v1"){const c=Wc(t);return{html:HS(Rc(c)),runtimeVersion:l}}if(l==="v2"){if(!e)throw new Error("Rollup is required for v2 runtime");const c=await LS({files:t,rollup:e,enableSourcemap:n}),u=Wc(c);return{html:Rc(u),runtimeVersion:l}}if(l==="v3"){if(!e)throw new Error("Rollup is required for v3 runtime");if(!s&&!r){const c=wS(t);r=c.id,s=om({initialContents:[c],handleCacheMiss:async()=>{throw new Error("Cache miss handler not implemented")}})}if(!s)throw new Error("vizCache is required for v3 runtime");if(!r)throw new Error("vizId is required for v3 runtime if vizCache is provided");return await ES({files:t,rollup:e,vizCache:s,vizId:r,slugCache:i,getSvelteCompiler:a})}if(l==="v4"){if(!e)throw new Error("Rollup is required for v4 runtime");Qr&&console.log("[build] v4Build",{files:t,rollup:e,enableSourcemap:n});const c=await qS({files:t,rollup:e,enableSourcemap:n}),u=Wc(c.files);return{html:Rc(u),js:c.bundledJS,runtimeVersion:l}}throw new Error(`Unsupported runtime version: ${l}`)}catch(l){throw l instanceof Error&&l.message.indexOf(rn)&&(l.message=l.message.replace(rn,"")),l}};(()=>{const t=async()=>{const i=await fetch(mS).then(a=>a.text());return(0,eval)(i),self.svelte.compile},e=new Map,n=new Map,s=om({initialContents:[],handleCacheMiss:async i=>(postMessage({type:"contentRequest",vizId:i}),new Promise(a=>{e.set(i,a)}))}),r=AS({initialMappings:{},handleCacheMiss:async i=>{const a=tS();return postMessage({type:"resolveSlugRequest",slugKey:i,requestId:a}),new Promise(l=>{n.set(a,l)})}});addEventListener("message",async i=>{const a=i.data;switch(a.type){case"buildRequest":{const{files:l,enableSourcemap:c,requestId:u,vizId:d}=a;try{const m={type:"buildResponse",buildResult:await WS({files:l,enableSourcemap:c,rollup:Vb,getSvelteCompiler:t,vizCache:s,vizId:d,slugCache:r}),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}}})})()})();
|