vzcode
Version:
Multiplayer code editor system
36 lines (32 loc) • 649 kB
JavaScript
(function(){"use strict";/*
@license
Rollup.js v4.46.2
Tue, 29 Jul 2025 19:44:27 GMT - commit 4e19badeda6f116a13a2f617ae3c6e1e14606023
https://github.com/rollup/rollup
Released under the MIT License.
*/var Jo="4.46.2",Nu=44,om=59,am="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cu=new Uint8Array(64),Tu=new Uint8Array(128);for(let t=0;t<64;t++){const e=am.charCodeAt(t);Cu[t]=e,Tu[e]=t}function qs(t,e){let n=0,s=0,r=0;do{const a=t.next();r=Tu[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(Cu[r])}while(s>0);return e}function Ru(t,e){return!(t.pos>=e)&&t.peek()!==Nu}var Du=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}},lm=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+=Du.decode(n),this.pos=0)}flush(){const{buffer:e,out:n,pos:s}=this;return s>0?n+Du.decode(e.subarray(0,s)):n}},cm=class{constructor(t){this.pos=0,this.buffer=t}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(t){const{buffer:e,pos:n}=this,s=e.indexOf(t,n);return s===-1?e.length:s}};function um(t){t.sort(hm)}function hm(t,e){return t[0]-e[0]}function Ou(t){const e=new lm;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(om),l.length===0)continue;let c=0;for(let u=0;u<l.length;u++){const d=l[u];u>0&&e.write(Nu),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 Zr{constructor(e){this.bits=e instanceof Zr?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let Lu=class $u{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 $u(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 $u(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 dm(){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 pm=dm();let ei=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Ou(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,"+pm(this.toString())}};function Mu(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 fm=Object.prototype.toString;function Fu(t){return fm.call(t)==="[object Object]"}function Yo(t){const e=t.split(`
`),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 mm=/\w/;let Bu=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(`
`,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(`
`,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]===`
`)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"?mm.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(`
`);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 Gs=`
`,ds={insertLeft:!1,insertRight:!1,storeName:!1};let Ws=class rm{constructor(e,n={}){const s=new Lu(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 Zr},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 rm(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 Zr(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const n=Object.keys(this.storedNames),s=new Bu(e.hires),r=Yo(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?Mu(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 ei(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=function(e){const n=e.split(`
`),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(Fu(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]===`
`));else for(l=c.start;l<u;){if(!r[l]){const d=this.original[l];d===`
`?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 ds.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),ds.insertLeft=!0),this.appendLeft(e,n)}insertRight(e,n){return ds.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),ds.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&&(ds.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),ds.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 Lu(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(Gs);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(Gs),e!==-1)return s.outro.substr(e+1)+n;n=s.outro+n}if(s.content.length>0){if(e=s.content.lastIndexOf(Gs),e!==-1)return s.content.substr(e+1)+n;n=s.content+n}if(s.intro.length>0){if(e=s.intro.lastIndexOf(Gs),e!==-1)return s.intro.substr(e+1)+n;n=s.intro+n}}while(s=s.previous);return e=this.intro.lastIndexOf(Gs),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;const s=e>n.end;for(;n;){if(n.contains(e))return this._splitChunk(n,e);n=s?this.byStart[n.end]:this.byEnd[n.start]}}_splitChunk(e,n){if(e.edited&&e.content.length){const r=Yo(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 ju=Object.prototype.hasOwnProperty;let gm=class im{constructor(e={}){this.intro=e.intro||"",this.separator=e.separator!==void 0?e.separator:`
`,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof Ws)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!Fu(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=>{ju.call(e,n)||(e[n]=e.content[n])}),e.separator===void 0&&(e.separator=this.separator),e.filename)if(ju.call(this.uniqueSourceIndexByFilename,e.filename)){const n=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==n.content)throw new Error(`Illegal source: same filename (${e.filename}), different contents`)}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this}append(e,n){return this.addSource({content:new Ws(e),separator:n&&n.separator||""}),this}clone(){const e=new im({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 Bu(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=Yo(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?Mu(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 ei(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)===`
`;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()===`
`}),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 ym=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,bm=/^\.?\.\//,xm=/\\/g,ps=/[/\\]/,km=/\.[^.]+$/;function Ht(t){return ym.test(t)}function Qo(t){return bm.test(t)}function an(t){return t.replace(xm,"/")}function Gt(t){return t.split(ps).pop()||""}function ln(t){const e=/[/\\][^/\\]*$/.exec(t);return e?t.slice(0,-e[0].length)||"/":"."}function xn(t){const e=km.exec(Gt(t));return e?e[0]:""}function Rn(t,e){const n=t.split(ps).filter(Boolean),s=e.split(ps).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 At(...t){const e=t.shift();if(!e)return"/";let n=e.split(ps);for(const s of t)if(Ht(s))n=s.split(ps);else{const r=s.split(ps);for(;r[0]==="."||r[0]==="..";)r.shift()===".."&&n.pop();n.push(...r)}return n.join("/")}function fs(t,e,n,s){e.remove(n,s),t.removeAnnotations(e)}const Dn={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(`
`,n)+1:t.indexOf("*/",n)+2)>s&&(s=t.indexOf(e,n))}}const zu=/\S/g;function kn(t,e){return zu.lastIndex=e,zu.exec(t).index}const Em=/\s/;function Xs(t){let e,n,s=0;for(e=t.indexOf(`
`,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(`
`,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):fs(i,e,a,c)):i.render(e,r)}function ti(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 ni(t,e,n){for(;;){const[s,r]=Xs(t.original.slice(e,n));if(s===-1)break;t.remove(e+s,e+=r)}}function On(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 Zo(t,e,n,s,{exportNamesByVariable:r,snippets:{_:i}}){s.prependRight(e,`exports(${JSON.stringify(r.get(t)[0])},${i}`),s.appendLeft(n,")")}function Vu(t,e,n,s,r,i){const{_:a,getPropertyAccess:l}=i.snippets;r.appendLeft(n,`,${a}${On([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([]),Uu=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 Ln(){return new Set}function qu(){return[]}const _e=Symbol("Unknown Key"),si=Symbol("Unknown Non-Accessor Key"),ms=Symbol("Unknown Integer"),ea=Symbol("Symbol.toStringTag"),ue=[],le=[_e],Am=[si],ta=[ms],gs=Symbol("Entities");let ys=class{constructor(){this.entityPaths=Object.create(null,{[gs]:{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,{[gs]:{value:new Set}});return n[gs]}};const Ge=new ys;let Hu=class{constructor(){this.entityPaths=Object.create(null,{[gs]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,n,s){let r=this.entityPaths;for(const a of e)r=r[a]||=Object.create(null,{[gs]:{value:new Map}});const i=bt(r[gs],n,Ln);return!!i.has(s)||(i.add(s),!1)}};const wm=Object.freeze({[_e]:ft});let Sm=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[_e])return!0;if(typeof a=="symbol")return s[r]=wm,!1;s=i,r=a,i=i[a]||=(n=!1,Object.create(null))}return n}};const Im=Object.freeze({[_e]:!0});class vm{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let n=!0;const s=this.includedPaths||=(n=!1,Object.create(null));if(s[_e])return!0;const[r,i]=e;return r?typeof r=="symbol"?(this.includedPaths=Im,!1):i?s[r]===_e||(s[r]=_e,!1):!!s[r]||(s[r]=!0,!1):n}includeAllPaths(e,n,s){const{includedPaths:r}=this;if(r)if(r[_e])e.includePath([...s,_e],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===_e?[...s,a,_e]:[...s,a],n)}}}function Gu(t,e){if(t.type==="MemberExpression")return!t.computed&&Gu(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 Mn(){return{accessed:new ys,assigned:new ys,brokenFlow:!1,called:new Hu,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Hu,replacedVariableInits:new Map}}function Le(t,e){return(t&e)!==0}function Me(t,e,n){return t&~e|-n&e}const Ce=Symbol("Unknown Value"),ri=Symbol("Unknown Truthy Value"),ii=Symbol("Unknown Falsy Value");class Pt{constructor(){this.flags=0}get included(){return Le(this.flags,1)}set included(e){this.flags=Me(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){na(e,n)}shouldBeIncluded(e){return!0}}const Pe=new class extends Pt{},it=[Pe,!1],En=t=>{for(const e of t.args)e?.deoptimizePath(le)},na=(t,e)=>{t.args[0]?.includePath(le,e),Wu(t,e)},Wu=({args:t},e)=>{for(let n=1;n<t.length;n++){const s=t[n];s&&(s.includePath(le,e),s.include(e,!1))}},An={args:[null],type:0},sa={args:[null,Pe],type:1},Js={args:[null],type:2,withNew:!1},ra="ArrowFunctionExpression",Ys="CallExpression",Xu="ExportDefaultDeclaration",Wt="ExpressionStatement",ia="Identifier",oi="Program",Ku="Property";function _m(t,e){return t.start<=e&&e<t.end}function oa(t,e,n){return function(s,r={}){const{offsetLine:i=0,offsetColumn:a=0}=r;let l=0;const c=s.split(`
`).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(_m(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 aa(t){return t.replace(/^\t+/,e=>e.split(" ").join(" "))}const Pm="...";function Ju(t,e,n){let s=t.split(`
`);if(e>s.length)return"";const r=Math.max(aa(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=aa(c);if(f.length>r&&(f=`${f.slice(0,r-3)}${Pm}`),d){const g=function(w){let k="";for(;w--;)k+=" ";return k}(l+2+aa(c.slice(0,n)).length)+"^";return`${m}: ${f}
${g}`}return`${m}: ${f}`}).join(`
`)}const $m="silent",Ee="warn",Fn="info",Qs="debug",Bn={[Qs]:0,[Fn]:1,[$m]:3,[Ee]: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 la(t){const e=Gt(t);return e.slice(0,Math.max(0,e.length-xn(t).length))}function Ae(t){return Ht(t)?Rn(At(),t):t}function ai(t){return t[0]==="/"||t[0]==="."&&(t[1]==="/"||t[1]===".")||Ht(t)}const Nm=/^(\.\.\/)*\.\.$/;function Yu(t,e,n,s){for(;e.startsWith("../");)e=e.slice(3),t="_/"+t;let r=an(Rn(ln(t),e));if(n&&r.endsWith(".js")&&(r=r.slice(0,-3)),s){if(r==="")return"../"+Gt(e);if(Nm.test(r))return[...r.split("/"),"..",Gt(e)].join("/")}return r?r.startsWith("..")?r:"./"+r:"."}function ot(t){return`https://rollupjs.org/${t}`}const Qu="troubleshooting/#error-name-is-not-exported-by-module",li="configuration-options/#jsx",Zu="configuration-options/#output-amd-id",Zs="configuration-options/#output-dir",ca="configuration-options/#output-exports",eh="configuration-options/#output-format",th="configuration-options/#output-inlinedynamicimports",ua="configuration-options/#output-interop",nh="configuration-options/#output-manualchunks",sh="configuration-options/#output-name",Cm="configuration-options/#output-sourcemapfile",bs="plugin-development/#generatebundle";function oe(t){throw t instanceof Error?t:xs(t)}function xs(t){ih(t);const e=Object.assign(new Error(t.message),t);return Object.defineProperty(e,"name",{value:"RollupError",writable:!0}),e}function ci(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=oa(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=Ju(n,r,i)}}const rh=Symbol("augmented");function ih(t){if(!t.plugin&&!t.loc||t[rh])return;t[rh]=!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+=`${Ae(n)}${r}: `}const s=t.message;t.message=e+t.message,xh(t,s)}const oh="INVALID_EXPORT_OPTION",ah="INVALID_IMPORT_ATTRIBUTE",lh="INVALID_PLUGIN_HOOK",ch="MISSING_EXPORT",ha="MISSING_IMPLICIT_DEPENDANT",uh="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",hh="PARSE_ERROR",dh="SOURCEMAP_BROKEN",ph="UNEXPECTED_NAMED_IMPORT",fh="UNRESOLVED_ENTRY",mh="UNRESOLVED_IMPORT";function Tm(t){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t}" - no asset source set.`}}function gh(t){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${t}").`}}function Rm({fileName:t,code:e},{pos:n,message:s}){const r={code:"CHUNK_INVALID",message:`Chunk "${t}" is not valid JavaScript: ${s}.`};return ci(r,n,e,t),r}function Dm(t){return{code:"CIRCULAR_DEPENDENCY",ids:t,message:`Circular dependency: ${t.map(Ae).join(" -> ")}`}}function Om(t,e,n,s,r){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:e,id:s,message:`Export "${t}" of module "${Ae(e)}" was reexported through module "${Ae(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.
Either change the import in "${Ae(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 Lm(t,e,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${Ae(e)} is at (${n}:${s})
${Ju(t,n,s)}`}}function yh(t,e){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${t}" in "${Ae(e)}".`}}function ui(t,e,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${Ae(s)}" tried to import "${Ae(n)}" with ${bh(e)} attributes, but it was already imported elsewhere with ${bh(t)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const bh=t=>{const e=Object.entries(t);return e.length===0?"no":e.map(([n,s])=>`"${n}": "${s}"`).join(", ")};function Mm(t,e,n){return{code:"INVALID_ANNOTATION",id:e,message:`A comment
"${t}"
in "${Ae(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 Fm(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 xh(t,e){return t.stack&&(t.stack=t.stack.replace(e,t.message)),t}function kh(t,e,n){return{code:oh,message:`"${t}" was specified for "output.exports", but entry module "${Ae(n)}" has the following exports: ${cn(e)}`,url:ot(ca)}}function Eh(t){return{code:ah,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${Ae(t)}". Import attributes need to have string keys and values. The attribute will be removed.`}}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 Bm(t,e){return{binding:t,code:ch,exporter:e,message:`Exported variable "${t}" is not defined in "${Ae(e)}".`,url:ot(Qu)}}function hi(t,e,n,s){const r={binding:t,code:ch,exporter:n,id:e,url:ot(Qu)};if(s)return{...r,message:`Exported variable "${t}" is not defined in "${Ae(n)}", but it is imported by "${Ae(e)}".`};const i=xn(n)===".json";return{...r,message:`"${t}" is not exported by "${Ae(n)}", imported by "${Ae(e)}".${i?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function jm(t){const e=[...t.implicitlyLoadedBefore].map(n=>Ae(n.id)).sort();return{code:ha,message:`Module "${Ae(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 Ah(t,e,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are
${t} chunks, of which
${e} are below minChunkSize.`}}function di(t,e){return{code:hh,message:t,pos:e}}function ks(t){return{code:"REDECLARATION_ERROR",message:`Identifier "${t}" has already been declared`}}function wh(t){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${t}"`}}function da(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)"),xh({cause:t,code:hh,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 zm(t){return{code:dh,message:`Multiple conflicting contents for sourcemap source ${t}`}}function Sh(t,e,n){const s=n?"reexport":"import";return{code:ph,exporter:t,message:`The named export "${e}" was ${s}ed from the external module "${Ae(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(ua)}}function Vm(t){return{code:ph,exporter:t,message:`There was a namespace "*" reexport from the external module "${Ae(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(ua)}}function wt(t){return{code:"VALIDATION_ERROR",message:t}}function jn(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 oe(d);c(Ee,d)}})(t,e,n,s.onLog,s.strictDeprecations)}const pa=Symbol("PureFunction");class zn extends Pt{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===Ys&&e.parent.callee===e||e.parent.type===Xu||(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 zn{constructor(e,n){super(n),this.referenced=!1,this.module=e,this.isNamespace=n==="*"}addReference(e){this.referenced=!0,this.name!=="default"&&this.name!=="*"||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:n}){return n!==0||e.length>(this.isNamespace?1:0)}includePath(e,n){super.includePath(e,n),this.module.used=!0}}function Ih(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 pi=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"]),vh=/[^\w$]/g,_h=t=>(e=>/\d/.test(e[0]))(t)||pi.has(t)||t==="arguments";function fi(t){return t=t.replace(/-(\w)/g,(e,n)=>n.toUpperCase()).replace(vh,"_"),_h(t)&&(t=`_${t}`),t||"_"}const mi=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,Um=/^(?:0|[1-9]\d*)$/;function gi(t){return mi.test(t)?t==="__proto__"?'["__proto__"]':t:Um.test(t)&&+t<=Number.MAX_SAFE_INTEGER?t:JSON.stringify(t)}function Es(t){return mi.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=fi(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(){Ih(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(Ee,{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=>Ae(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",Ph="_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]=qm(e[t++],e);return s},qm=(t,e)=>{const n=e[t++];return{end:e[t++],start:n,type:yt[e[t]]}},Vn={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],Decorator:["expression"],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["specifiers","source","attributes","declaration"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["decorators","key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PanicError:[],ParseError:[],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["decorators","key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],YieldExpression:["argument"]},$h="variables",Xt=Symbol("IS_SKIPPED_CHAIN");class te extends Pt{get deoptimized(){return Le(this.flags,2)}set deoptimized(e){this.flags=Me(this.flags,2,e)}constructor(e,n){super(),this.parent=e,this.scope=n,this.createScope(n)}addExportedVariables(e,n){}bind(){for(const e of Vn[this.type]){const n=this[e];if(Array.isArray(n))for(const s of n)s?.bind();else n&&n.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const n of Vn[this.type]){const s=this[n];if(s!==null){if(Array.isArray(s)){for(const 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(ue,this.assignmentInteraction,e)}include(e,n,s){this.included||this.includeNode(e);for(const r of Vn[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 Vn[this.type]){const s=this[n];if(s!==null)if(Array.isArray(s))for(const r of s)r?.includePath(le,e);else s.includePath(le,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===Ph&&(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 Vn[e.type]||=function(n){return Object.keys(n).filter(s=>typeof n[s]=="object"&&s.charCodeAt(0)!==95)}(e),this.initialise(),this}removeAnnotations(e){if(this.annotations)for(const n of this.annotations)e.remove(n.start,n.end)}render(e,n){for(const s of Vn[this.type]){const 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(Mn())}applyDeoptimizations(){this.deoptimized=!0;for(const e of Vn[this.type]){const n=this[e];if(n!==null)if(Array.isArray(n))for(const s of n)s?.deoptimizePath(le);else n.deoptimizePath(le)}this.scope.context.requestTreeshakingPass()}}function dt(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function ze(){this.included=!0}function Te(){this.deoptimized=!0}function Hm(t){return t instanceof te&&t.type===ra}function Gm(t){return t instanceof te&&t.type==="FunctionExpression"}func