@es-js/vite-plugin-eshtml
Version:
Vite plugin for EsHTML
48 lines (43 loc) • 3.38 MB
JavaScript
import fs$1 from 'fs/promises';
import template from 'lodash/template';
import path from 'path';
function getPage(options, pageName) {
if (pageName === "index") {
return options?.paginas?.indice ?? options?.paginas?.index;
}
return options?.paginas?.[pageName];
}
function generatePagesInput(input, options) {
const newInput = { ...input };
for (const pageName of Object.keys(options?.paginas || {})) {
const page = getPage(options, pageName);
if (page && !newInput[pageName]) {
const pagePath = `${pageName}.html`;
newInput[pageName] = pagePath;
}
}
return newInput;
}
function getEntryScripts(html) {
const matches = html.match(/<script.*?src="(.+?\.esjs)".*?><\/script>/g);
if (!matches) {
return /* @__PURE__ */ new Map();
}
const entryScripts = /* @__PURE__ */ new Map();
for (const match of matches) {
const src = match.match(/<script.*?src="(.+?\.esjs)".*?><\/script>/)?.[1];
if (src) {
entryScripts.set(src.replace(".esjs", ".js"), src);
}
}
return entryScripts;
}
function replaceEntryScript(html, scriptType = "module") {
return html.replace(/<script.*?src="(.+?\.esjs)".*?><\/script>/g, (m, p1) => {
return `<script src="${p1.replace(
".esjs",
".js"
)}" type="${scriptType}"><\/script>`;
});
}
var A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}function t(A){if(A.__esModule)return A;var e=A.default;if("function"==typeof e){var t=function A(){return this instanceof A?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype;}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(A).forEach((function(e){var i=Object.getOwnPropertyDescriptor(A,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:function(){return A[e]}});})),t}var i$1={exports:{}},r="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}var o=n,s=a;function g$2(A){if(o===setTimeout)return setTimeout(A,0);if((o===n||!o)&&setTimeout)return o=setTimeout,setTimeout(A,0);try{return o(A,0)}catch(e){try{return o.call(null,A,0)}catch(e){return o.call(this,A,0)}}}"function"==typeof r.setTimeout&&(o=setTimeout),"function"==typeof r.clearTimeout&&(s=clearTimeout);var I$1,C$1=[],c=!1,u=-1;function l$1(){c&&I$1&&(c=!1,I$1.length?C$1=I$1.concat(C$1):u=-1,C$1.length&&B$1());}function B$1(){if(!c){var A=g$2(l$1);c=!0;for(var e=C$1.length;e;){for(I$1=C$1,C$1=[];++u<e;)I$1&&I$1[u].run();u=-1,e=C$1.length;}I$1=null,c=!1,function(A){if(s===clearTimeout)return clearTimeout(A);if((s===a||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(A);try{return s(A)}catch(e){try{return s.call(null,A)}catch(e){return s.call(this,A)}}}(A);}}function E$1(A,e){this.fun=A,this.array=e;}E$1.prototype.run=function(){this.fun.apply(null,this.array);};function Q(){}var h$1=Q,p=Q,d$1=Q,f=Q,y$1=Q,m=Q,D$1=Q;var S$1=r.performance||{},w$1=S$1.now||S$1.mozNow||S$1.msNow||S$1.oNow||S$1.webkitNow||function(){return (new Date).getTime()};var N$1=new Date;var k={nextTick:function(A){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];C$1.push(new E$1(A,e)),1!==C$1.length||c||g$2(B$1);},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:h$1,addListener:p,once:d$1,off:f,removeListener:y$1,removeAllListeners:m,emit:D$1,binding:function(A){throw new Error("process.binding is not supported")},cwd:function(){return "/"},chdir:function(A){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(A){var e=.001*w$1.call(S$1),t=Math.floor(e),i=Math.floor(e%1*1e9);return A&&(t-=A[0],(i-=A[1])<0&&(t--,i+=1e9)),[t,i]},platform:"browser",release:{},config:{},uptime:function(){return (new Date-N$1)/1e3}},v$1=[],x=[],b$1="undefined"!=typeof Uint8Array?Uint8Array:Array,F=!1;function R$2(){F=!0;for(var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)v$1[e]=A[e],x[A.charCodeAt(e)]=e;x["-".charCodeAt(0)]=62,x["_".charCodeAt(0)]=63;}function G(A,e,t){for(var i,r,n=[],a=e;a<t;a+=3)i=(A[a]<<16)+(A[a+1]<<8)+A[a+2],n.push(v$1[(r=i)>>18&63]+v$1[r>>12&63]+v$1[r>>6&63]+v$1[63&r]);return n.join("")}function T(A){var e;F||R$2();for(var t=A.length,i=t%3,r="",n=[],a=16383,o=0,s=t-i;o<s;o+=a)n.push(G(A,o,o+a>s?s:o+a));return 1===i?(e=A[t-1],r+=v$1[e>>2],r+=v$1[e<<4&63],r+="=="):2===i&&(e=(A[t-2]<<8)+A[t-1],r+=v$1[e>>10],r+=v$1[e>>4&63],r+=v$1[e<<2&63],r+="="),n.push(r),n.join("")}function M(A,e,t,i,r){var n,a,o=8*r-i-1,s=(1<<o)-1,g=s>>1,I=-7,C=t?r-1:0,c=t?-1:1,u=A[e+C];for(C+=c,n=u&(1<<-I)-1,u>>=-I,I+=o;I>0;n=256*n+A[e+C],C+=c,I-=8);for(a=n&(1<<-I)-1,n>>=-I,I+=i;I>0;a=256*a+A[e+C],C+=c,I-=8);if(0===n)n=1-g;else {if(n===s)return a?NaN:1/0*(u?-1:1);a+=Math.pow(2,i),n-=g;}return (u?-1:1)*a*Math.pow(2,n-i)}function Y(A,e,t,i,r,n){var a,o,s,g=8*n-r-1,I=(1<<g)-1,C=I>>1,c=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,u=i?0:n-1,l=i?1:-1,B=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=I):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+C>=1?c/s:c*Math.pow(2,1-C))*s>=2&&(a++,s/=2),a+C>=I?(o=0,a=I):a+C>=1?(o=(e*s-1)*Math.pow(2,r),a+=C):(o=e*Math.pow(2,C-1)*Math.pow(2,r),a=0));r>=8;A[t+u]=255&o,u+=l,o/=256,r-=8);for(a=a<<r|o,g+=r;g>0;A[t+u]=255&a,u+=l,a/=256,g-=8);A[t+u-l]|=128*B;}var L$2={}.toString,U$1=Array.isArray||function(A){return "[object Array]"==L$2.call(A)};function P(){return K.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function J(A,e){if(P()<e)throw new RangeError("Invalid typed array length");return K.TYPED_ARRAY_SUPPORT?(A=new Uint8Array(e)).__proto__=K.prototype:(null===A&&(A=new K(e)),A.length=e),A}function K(A,e,t){if(!(K.TYPED_ARRAY_SUPPORT||this instanceof K))return new K(A,e,t);if("number"==typeof A){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return _$1(this,A)}return H(this,A,e,t)}function H(A,e,t,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return "undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(A,e,t,i){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(i||0))throw new RangeError("'length' is out of bounds");e=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i);K.TYPED_ARRAY_SUPPORT?(A=e).__proto__=K.prototype:A=j$2(A,e);return A}(A,e,t,i):"string"==typeof e?function(A,e,t){"string"==typeof t&&""!==t||(t="utf8");if(!K.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var i=0|V(e,t);A=J(A,i);var r=A.write(e,t);r!==i&&(A=A.slice(0,r));return A}(A,e,t):function(A,e){if(z$1(e)){var t=0|q$1(e.length);return 0===(A=J(A,t)).length||e.copy(A,0,0,t),A}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return "number"!=typeof e.length||(i=e.length)!=i?J(A,0):j$2(A,e);if("Buffer"===e.type&&U$1(e.data))return j$2(A,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(A,e)}function O$1(A){if("number"!=typeof A)throw new TypeError('"size" argument must be a number');if(A<0)throw new RangeError('"size" argument must not be negative')}function _$1(A,e){if(O$1(e),A=J(A,e<0?0:0|q$1(e)),!K.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)A[t]=0;return A}function j$2(A,e){var t=e.length<0?0:0|q$1(e.length);A=J(A,t);for(var i=0;i<t;i+=1)A[i]=255&e[i];return A}function q$1(A){if(A>=P())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P().toString(16)+" bytes");return 0|A}function z$1(A){return !(null==A||!A._isBuffer)}function V(A,e){if(z$1(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return yA(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return mA(A).length;default:if(i)return yA(A).length;e=(""+e).toLowerCase(),i=!0;}}function W(A,e,t){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return "";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return "";if((t>>>=0)<=(e>>>=0))return "";for(A||(A="utf8");;)switch(A){case"hex":return CA(this,e,t);case"utf8":case"utf-8":return oA(this,e,t);case"ascii":return gA(this,e,t);case"latin1":case"binary":return IA(this,e,t);case"base64":return aA(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cA(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),i=!0;}}function Z(A,e,t){var i=A[e];A[e]=A[t],A[t]=i;}function X(A,e,t,i,r){if(0===A.length)return -1;if("string"==typeof t?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=r?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(r)return -1;t=A.length-1;}else if(t<0){if(!r)return -1;t=0;}if("string"==typeof e&&(e=K.from(e,i)),z$1(e))return 0===e.length?-1:$$1(A,e,t,i,r);if("number"==typeof e)return e&=255,K.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(A,e,t):Uint8Array.prototype.lastIndexOf.call(A,e,t):$$1(A,[e],t,i,r);throw new TypeError("val must be string, number or Buffer")}function $$1(A,e,t,i,r){var n,a=1,o=A.length,s=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(A.length<2||e.length<2)return -1;a=2,o/=2,s/=2,t/=2;}function g(A,e){return 1===a?A[e]:A.readUInt16BE(e*a)}if(r){var I=-1;for(n=t;n<o;n++)if(g(A,n)===g(e,-1===I?0:n-I)){if(-1===I&&(I=n),n-I+1===s)return I*a}else -1!==I&&(n-=n-I),I=-1;}else for(t+s>o&&(t=o-s),n=t;n>=0;n--){for(var C=!0,c=0;c<s;c++)if(g(A,n+c)!==g(e,c)){C=!1;break}if(C)return n}return -1}function AA(A,e,t,i){t=Number(t)||0;var r=A.length-t;i?(i=Number(i))>r&&(i=r):i=r;var n=e.length;if(n%2!=0)throw new TypeError("Invalid hex string");i>n/2&&(i=n/2);for(var a=0;a<i;++a){var o=parseInt(e.substr(2*a,2),16);if(isNaN(o))return a;A[t+a]=o;}return a}function eA(A,e,t,i){return DA(yA(e,A.length-t),A,t,i)}function tA(A,e,t,i){return DA(function(A){for(var e=[],t=0;t<A.length;++t)e.push(255&A.charCodeAt(t));return e}(e),A,t,i)}function iA(A,e,t,i){return tA(A,e,t,i)}function rA(A,e,t,i){return DA(mA(e),A,t,i)}function nA(A,e,t,i){return DA(function(A,e){for(var t,i,r,n=[],a=0;a<A.length&&!((e-=2)<0);++a)i=(t=A.charCodeAt(a))>>8,r=t%256,n.push(r),n.push(i);return n}(e,A.length-t),A,t,i)}function aA(A,e,t){return 0===e&&t===A.length?T(A):T(A.slice(e,t))}function oA(A,e,t){t=Math.min(A.length,t);for(var i=[],r=e;r<t;){var n,a,o,s,g=A[r],I=null,C=g>239?4:g>223?3:g>191?2:1;if(r+C<=t)switch(C){case 1:g<128&&(I=g);break;case 2:128==(192&(n=A[r+1]))&&(s=(31&g)<<6|63&n)>127&&(I=s);break;case 3:n=A[r+1],a=A[r+2],128==(192&n)&&128==(192&a)&&(s=(15&g)<<12|(63&n)<<6|63&a)>2047&&(s<55296||s>57343)&&(I=s);break;case 4:n=A[r+1],a=A[r+2],o=A[r+3],128==(192&n)&&128==(192&a)&&128==(192&o)&&(s=(15&g)<<18|(63&n)<<12|(63&a)<<6|63&o)>65535&&s<1114112&&(I=s);}null===I?(I=65533,C=1):I>65535&&(I-=65536,i.push(I>>>10&1023|55296),I=56320|1023&I),i.push(I),r+=C;}return function(A){var e=A.length;if(e<=sA)return String.fromCharCode.apply(String,A);var t="",i=0;for(;i<e;)t+=String.fromCharCode.apply(String,A.slice(i,i+=sA));return t}(i)}K.TYPED_ARRAY_SUPPORT=void 0===r.TYPED_ARRAY_SUPPORT||r.TYPED_ARRAY_SUPPORT,P(),K.poolSize=8192,K._augment=function(A){return A.__proto__=K.prototype,A},K.from=function(A,e,t){return H(null,A,e,t)},K.TYPED_ARRAY_SUPPORT&&(K.prototype.__proto__=Uint8Array.prototype,K.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&K[Symbol.species]),K.alloc=function(A,e,t){return function(A,e,t,i){return O$1(e),e<=0?J(A,e):void 0!==t?"string"==typeof i?J(A,e).fill(t,i):J(A,e).fill(t):J(A,e)}(null,A,e,t)},K.allocUnsafe=function(A){return _$1(null,A)},K.allocUnsafeSlow=function(A){return _$1(null,A)},K.isBuffer=function(A){return null!=A&&(!!A._isBuffer||SA(A)||function(A){return "function"==typeof A.readFloatLE&&"function"==typeof A.slice&&SA(A.slice(0,0))}(A))},K.compare=function(A,e){if(!z$1(A)||!z$1(e))throw new TypeError("Arguments must be Buffers");if(A===e)return 0;for(var t=A.length,i=e.length,r=0,n=Math.min(t,i);r<n;++r)if(A[r]!==e[r]){t=A[r],i=e[r];break}return t<i?-1:i<t?1:0},K.isEncoding=function(A){switch(String(A).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return !0;default:return !1}},K.concat=function(A,e){if(!U$1(A))throw new TypeError('"list" argument must be an Array of Buffers');if(0===A.length)return K.alloc(0);var t;if(void 0===e)for(e=0,t=0;t<A.length;++t)e+=A[t].length;var i=K.allocUnsafe(e),r=0;for(t=0;t<A.length;++t){var n=A[t];if(!z$1(n))throw new TypeError('"list" argument must be an Array of Buffers');n.copy(i,r),r+=n.length;}return i},K.byteLength=V,K.prototype._isBuffer=!0,K.prototype.swap16=function(){var A=this.length;if(A%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<A;e+=2)Z(this,e,e+1);return this},K.prototype.swap32=function(){var A=this.length;if(A%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<A;e+=4)Z(this,e,e+3),Z(this,e+1,e+2);return this},K.prototype.swap64=function(){var A=this.length;if(A%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<A;e+=8)Z(this,e,e+7),Z(this,e+1,e+6),Z(this,e+2,e+5),Z(this,e+3,e+4);return this},K.prototype.toString=function(){var A=0|this.length;return 0===A?"":0===arguments.length?oA(this,0,A):W.apply(this,arguments)},K.prototype.equals=function(A){if(!z$1(A))throw new TypeError("Argument must be a Buffer");return this===A||0===K.compare(this,A)},K.prototype.inspect=function(){var A="";return this.length>0&&(A=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(A+=" ... ")),"<Buffer "+A+">"},K.prototype.compare=function(A,e,t,i,r){if(!z$1(A))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===t&&(t=A?A.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||t>A.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=t)return 0;if(i>=r)return -1;if(e>=t)return 1;if(this===A)return 0;for(var n=(r>>>=0)-(i>>>=0),a=(t>>>=0)-(e>>>=0),o=Math.min(n,a),s=this.slice(i,r),g=A.slice(e,t),I=0;I<o;++I)if(s[I]!==g[I]){n=s[I],a=g[I];break}return n<a?-1:a<n?1:0},K.prototype.includes=function(A,e,t){return -1!==this.indexOf(A,e,t)},K.prototype.indexOf=function(A,e,t){return X(this,A,e,t,!0)},K.prototype.lastIndexOf=function(A,e,t){return X(this,A,e,t,!1)},K.prototype.write=function(A,e,t,i){if(void 0===e)i="utf8",t=this.length,e=0;else if(void 0===t&&"string"==typeof e)i=e,t=this.length,e=0;else {if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(t)?(t|=0,void 0===i&&(i="utf8")):(i=t,t=void 0);}var r=this.length-e;if((void 0===t||t>r)&&(t=r),A.length>0&&(t<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var n=!1;;)switch(i){case"hex":return AA(this,A,e,t);case"utf8":case"utf-8":return eA(this,A,e,t);case"ascii":return tA(this,A,e,t);case"latin1":case"binary":return iA(this,A,e,t);case"base64":return rA(this,A,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nA(this,A,e,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),n=!0;}},K.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var sA=4096;function gA(A,e,t){var i="";t=Math.min(A.length,t);for(var r=e;r<t;++r)i+=String.fromCharCode(127&A[r]);return i}function IA(A,e,t){var i="";t=Math.min(A.length,t);for(var r=e;r<t;++r)i+=String.fromCharCode(A[r]);return i}function CA(A,e,t){var i=A.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);for(var r="",n=e;n<t;++n)r+=fA(A[n]);return r}function cA(A,e,t){for(var i=A.slice(e,t),r="",n=0;n<i.length;n+=2)r+=String.fromCharCode(i[n]+256*i[n+1]);return r}function uA(A,e,t){if(A%1!=0||A<0)throw new RangeError("offset is not uint");if(A+e>t)throw new RangeError("Trying to access beyond buffer length")}function lA(A,e,t,i,r,n){if(!z$1(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<n)throw new RangeError('"value" argument is out of bounds');if(t+i>A.length)throw new RangeError("Index out of range")}function BA(A,e,t,i){e<0&&(e=65535+e+1);for(var r=0,n=Math.min(A.length-t,2);r<n;++r)A[t+r]=(e&255<<8*(i?r:1-r))>>>8*(i?r:1-r);}function EA(A,e,t,i){e<0&&(e=4294967295+e+1);for(var r=0,n=Math.min(A.length-t,4);r<n;++r)A[t+r]=e>>>8*(i?r:3-r)&255;}function QA(A,e,t,i,r,n){if(t+i>A.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function hA(A,e,t,i,r){return r||QA(A,0,t,4),Y(A,e,t,i,23,4),t+4}function pA(A,e,t,i,r){return r||QA(A,0,t,8),Y(A,e,t,i,52,8),t+8}K.prototype.slice=function(A,e){var t,i=this.length;if((A=~~A)<0?(A+=i)<0&&(A=0):A>i&&(A=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<A&&(e=A),K.TYPED_ARRAY_SUPPORT)(t=this.subarray(A,e)).__proto__=K.prototype;else {var r=e-A;t=new K(r,void 0);for(var n=0;n<r;++n)t[n]=this[n+A];}return t},K.prototype.readUIntLE=function(A,e,t){A|=0,e|=0,t||uA(A,e,this.length);for(var i=this[A],r=1,n=0;++n<e&&(r*=256);)i+=this[A+n]*r;return i},K.prototype.readUIntBE=function(A,e,t){A|=0,e|=0,t||uA(A,e,this.length);for(var i=this[A+--e],r=1;e>0&&(r*=256);)i+=this[A+--e]*r;return i},K.prototype.readUInt8=function(A,e){return e||uA(A,1,this.length),this[A]},K.prototype.readUInt16LE=function(A,e){return e||uA(A,2,this.length),this[A]|this[A+1]<<8},K.prototype.readUInt16BE=function(A,e){return e||uA(A,2,this.length),this[A]<<8|this[A+1]},K.prototype.readUInt32LE=function(A,e){return e||uA(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},K.prototype.readUInt32BE=function(A,e){return e||uA(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},K.prototype.readIntLE=function(A,e,t){A|=0,e|=0,t||uA(A,e,this.length);for(var i=this[A],r=1,n=0;++n<e&&(r*=256);)i+=this[A+n]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},K.prototype.readIntBE=function(A,e,t){A|=0,e|=0,t||uA(A,e,this.length);for(var i=e,r=1,n=this[A+--i];i>0&&(r*=256);)n+=this[A+--i]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*e)),n},K.prototype.readInt8=function(A,e){return e||uA(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},K.prototype.readInt16LE=function(A,e){e||uA(A,2,this.length);var t=this[A]|this[A+1]<<8;return 32768&t?4294901760|t:t},K.prototype.readInt16BE=function(A,e){e||uA(A,2,this.length);var t=this[A+1]|this[A]<<8;return 32768&t?4294901760|t:t},K.prototype.readInt32LE=function(A,e){return e||uA(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},K.prototype.readInt32BE=function(A,e){return e||uA(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},K.prototype.readFloatLE=function(A,e){return e||uA(A,4,this.length),M(this,A,!0,23,4)},K.prototype.readFloatBE=function(A,e){return e||uA(A,4,this.length),M(this,A,!1,23,4)},K.prototype.readDoubleLE=function(A,e){return e||uA(A,8,this.length),M(this,A,!0,52,8)},K.prototype.readDoubleBE=function(A,e){return e||uA(A,8,this.length),M(this,A,!1,52,8)},K.prototype.writeUIntLE=function(A,e,t,i){(A=+A,e|=0,t|=0,i)||lA(this,A,e,t,Math.pow(2,8*t)-1,0);var r=1,n=0;for(this[e]=255&A;++n<t&&(r*=256);)this[e+n]=A/r&255;return e+t},K.prototype.writeUIntBE=function(A,e,t,i){(A=+A,e|=0,t|=0,i)||lA(this,A,e,t,Math.pow(2,8*t)-1,0);var r=t-1,n=1;for(this[e+r]=255&A;--r>=0&&(n*=256);)this[e+r]=A/n&255;return e+t},K.prototype.writeUInt8=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,1,255,0),K.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),this[e]=255&A,e+1},K.prototype.writeUInt16LE=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,2,65535,0),K.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):BA(this,A,e,!0),e+2},K.prototype.writeUInt16BE=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,2,65535,0),K.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):BA(this,A,e,!1),e+2},K.prototype.writeUInt32LE=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,4,4294967295,0),K.TYPED_ARRAY_SUPPORT?(this[e+3]=A>>>24,this[e+2]=A>>>16,this[e+1]=A>>>8,this[e]=255&A):EA(this,A,e,!0),e+4},K.prototype.writeUInt32BE=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,4,4294967295,0),K.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):EA(this,A,e,!1),e+4},K.prototype.writeIntLE=function(A,e,t,i){if(A=+A,e|=0,!i){var r=Math.pow(2,8*t-1);lA(this,A,e,t,r-1,-r);}var n=0,a=1,o=0;for(this[e]=255&A;++n<t&&(a*=256);)A<0&&0===o&&0!==this[e+n-1]&&(o=1),this[e+n]=(A/a|0)-o&255;return e+t},K.prototype.writeIntBE=function(A,e,t,i){if(A=+A,e|=0,!i){var r=Math.pow(2,8*t-1);lA(this,A,e,t,r-1,-r);}var n=t-1,a=1,o=0;for(this[e+n]=255&A;--n>=0&&(a*=256);)A<0&&0===o&&0!==this[e+n+1]&&(o=1),this[e+n]=(A/a|0)-o&255;return e+t},K.prototype.writeInt8=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,1,127,-128),K.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),A<0&&(A=255+A+1),this[e]=255&A,e+1},K.prototype.writeInt16LE=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,2,32767,-32768),K.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):BA(this,A,e,!0),e+2},K.prototype.writeInt16BE=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,2,32767,-32768),K.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):BA(this,A,e,!1),e+2},K.prototype.writeInt32LE=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,4,2147483647,-2147483648),K.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8,this[e+2]=A>>>16,this[e+3]=A>>>24):EA(this,A,e,!0),e+4},K.prototype.writeInt32BE=function(A,e,t){return A=+A,e|=0,t||lA(this,A,e,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),K.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):EA(this,A,e,!1),e+4},K.prototype.writeFloatLE=function(A,e,t){return hA(this,A,e,!0,t)},K.prototype.writeFloatBE=function(A,e,t){return hA(this,A,e,!1,t)},K.prototype.writeDoubleLE=function(A,e,t){return pA(this,A,e,!0,t)},K.prototype.writeDoubleBE=function(A,e,t){return pA(this,A,e,!1,t)},K.prototype.copy=function(A,e,t,i){if(t||(t=0),i||0===i||(i=this.length),e>=A.length&&(e=A.length),e||(e=0),i>0&&i<t&&(i=t),i===t)return 0;if(0===A.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),A.length-e<i-t&&(i=A.length-e+t);var r,n=i-t;if(this===A&&t<e&&e<i)for(r=n-1;r>=0;--r)A[r+e]=this[r+t];else if(n<1e3||!K.TYPED_ARRAY_SUPPORT)for(r=0;r<n;++r)A[r+e]=this[r+t];else Uint8Array.prototype.set.call(A,this.subarray(t,t+n),e);return n},K.prototype.fill=function(A,e,t,i){if("string"==typeof A){if("string"==typeof e?(i=e,e=0,t=this.length):"string"==typeof t&&(i=t,t=this.length),1===A.length){var r=A.charCodeAt(0);r<256&&(A=r);}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!K.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else "number"==typeof A&&(A&=255);if(e<0||this.length<e||this.length<t)throw new RangeError("Out of range index");if(t<=e)return this;var n;if(e>>>=0,t=void 0===t?this.length:t>>>0,A||(A=0),"number"==typeof A)for(n=e;n<t;++n)this[n]=A;else {var a=z$1(A)?A:yA(new K(A,i).toString()),o=a.length;for(n=0;n<t-e;++n)this[n+e]=a[n%o];}return this};var dA=/[^+\/0-9A-Za-z-_]/g;function fA(A){return A<16?"0"+A.toString(16):A.toString(16)}function yA(A,e){var t;e=e||1/0;for(var i=A.length,r=null,n=[],a=0;a<i;++a){if((t=A.charCodeAt(a))>55295&&t<57344){if(!r){if(t>56319){(e-=3)>-1&&n.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&n.push(239,191,189);continue}r=t;continue}if(t<56320){(e-=3)>-1&&n.push(239,191,189),r=t;continue}t=65536+(r-55296<<10|t-56320);}else r&&(e-=3)>-1&&n.push(239,191,189);if(r=null,t<128){if((e-=1)<0)break;n.push(t);}else if(t<2048){if((e-=2)<0)break;n.push(t>>6|192,63&t|128);}else if(t<65536){if((e-=3)<0)break;n.push(t>>12|224,t>>6&63|128,63&t|128);}else {if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;n.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128);}}return n}function mA(A){return function(A){var e,t,i,r,n,a;F||R$2();var o=A.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");n="="===A[o-2]?2:"="===A[o-1]?1:0,a=new b$1(3*o/4-n),i=n>0?o-4:o;var s=0;for(e=0,t=0;e<i;e+=4,t+=3)r=x[A.charCodeAt(e)]<<18|x[A.charCodeAt(e+1)]<<12|x[A.charCodeAt(e+2)]<<6|x[A.charCodeAt(e+3)],a[s++]=r>>16&255,a[s++]=r>>8&255,a[s++]=255&r;return 2===n?(r=x[A.charCodeAt(e)]<<2|x[A.charCodeAt(e+1)]>>4,a[s++]=255&r):1===n&&(r=x[A.charCodeAt(e)]<<10|x[A.charCodeAt(e+1)]<<4|x[A.charCodeAt(e+2)]>>2,a[s++]=r>>8&255,a[s++]=255&r),a}(function(A){if((A=function(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")}(A).replace(dA,"")).length<2)return "";for(;A.length%4!=0;)A+="=";return A}(A))}function DA(A,e,t,i){for(var r=0;r<i&&!(r+t>=e.length||r>=A.length);++r)e[r+t]=A[r];return r}function SA(A){return !!A.constructor&&"function"==typeof A.constructor.isBuffer&&A.constructor.isBuffer(A)}function wA(A){throw new Error('Could not dynamically require "'+A+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function NA(){return !1}function kA(){throw new Error("tty.ReadStream is not implemented")}function vA(){throw new Error("tty.ReadStream is not implemented")}var xA,bA={isatty:NA,ReadStream:kA,WriteStream:vA},FA=t(Object.freeze({__proto__:null,ReadStream:kA,WriteStream:vA,default:bA,isatty:NA}));function RA(){if(void 0===xA){var A=new ArrayBuffer(2),e=new Uint8Array(A),t=new Uint16Array(A);if(e[0]=1,e[1]=2,258===t[0])xA="BE";else {if(513!==t[0])throw new Error("unable to figure out endianess");xA="LE";}}return xA}function GA(){return void 0!==r.location?r.location.hostname:""}function TA(){return []}function MA(){return 0}function YA(){return Number.MAX_VALUE}function LA(){return Number.MAX_VALUE}function UA(){return []}function PA(){return "Browser"}function JA(){return void 0!==r.navigator?r.navigator.appVersion:""}function KA(){return {}}function HA(){return {}}function OA(){return "javascript"}function _A(){return "browser"}function jA(){return "/tmp"}var qA=jA;function zA(){return "$HOME"}var VA={homedir:zA,EOL:"\n",arch:OA,platform:_A,tmpdir:qA,tmpDir:jA,networkInterfaces:KA,getNetworkInterfaces:HA,release:JA,type:PA,cpus:UA,totalmem:LA,freemem:YA,uptime:MA,loadavg:TA,hostname:GA,endianness:RA},WA=t(Object.freeze({__proto__:null,EOL:"\n",arch:OA,cpus:UA,default:VA,endianness:RA,freemem:YA,getNetworkInterfaces:HA,homedir:zA,hostname:GA,loadavg:TA,networkInterfaces:KA,platform:_A,release:JA,tmpDir:jA,tmpdir:qA,totalmem:LA,type:PA,uptime:MA})),ZA="function"==typeof Object.create?function(A,e){A.super_=e,A.prototype=Object.create(e.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}});}:function(A,e){A.super_=e;var t=function(){};t.prototype=e.prototype,A.prototype=new t,A.prototype.constructor=A;},XA=Object.getOwnPropertyDescriptors||function(A){for(var e=Object.keys(A),t={},i=0;i<e.length;i++)t[e[i]]=Object.getOwnPropertyDescriptor(A,e[i]);return t},$A=/%[sdj%]/g;function Ae(A){if(!Ee(A)){for(var e=[],t=0;t<arguments.length;t++)e.push(ne(arguments[t]));return e.join(" ")}t=1;for(var i=arguments,r=i.length,n=String(A).replace($A,(function(A){if("%%"===A)return "%";if(t>=r)return A;switch(A){case"%s":return String(i[t++]);case"%d":return Number(i[t++]);case"%j":try{return JSON.stringify(i[t++])}catch(A){return "[Circular]"}default:return A}})),a=i[t];t<r;a=i[++t])ue(a)||!de(a)?n+=" "+a:n+=" "+ne(a);return n}function ee(A,e){if(he(r.process))return function(){return ee(A,e).apply(this,arguments)};if(!0===k.noDeprecation)return A;var t=!1;return function(){if(!t){if(k.throwDeprecation)throw new Error(e);k.traceDeprecation?console.trace(e):console.error(e),t=!0;}return A.apply(this,arguments)}}var te,ie={};function re(A){if(he(te)&&(te=k.env.NODE_DEBUG||""),A=A.toUpperCase(),!ie[A])if(new RegExp("\\b"+A+"\\b","i").test(te)){ie[A]=function(){var e=Ae.apply(null,arguments);console.error("%s %d: %s",A,0,e);};}else ie[A]=function(){};return ie[A]}function ne(A,e){var t={seen:[],stylize:oe};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),ce(e)?t.showHidden=e:e&&xe(t,e),he(t.showHidden)&&(t.showHidden=!1),he(t.depth)&&(t.depth=2),he(t.colors)&&(t.colors=!1),he(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=ae),se(t,A,t.depth)}function ae(A,e){var t=ne.styles[e];return t?"["+ne.colors[t][0]+"m"+A+"["+ne.colors[t][1]+"m":A}function oe(A,e){return A}function se(A,e,t){if(A.customInspect&&e&&me(e.inspect)&&e.inspect!==ne&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(t,A);return Ee(i)||(i=se(A,i,t)),i}var r=function(A,e){if(he(e))return A.stylize("undefined","undefined");if(Ee(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(t,"string")}if(Be(e))return A.stylize(""+e,"number");if(ce(e))return A.stylize(""+e,"boolean");if(ue(e))return A.stylize("null","null")}(A,e);if(r)return r;var n=Object.keys(e),a=function(A){var e={};return A.forEach((function(A,t){e[A]=!0;})),e}(n);if(A.showHidden&&(n=Object.getOwnPropertyNames(e)),ye(e)&&(n.indexOf("message")>=0||n.indexOf("description")>=0))return ge(e);if(0===n.length){if(me(e)){var o=e.name?": "+e.name:"";return A.stylize("[Function"+o+"]","special")}if(pe(e))return A.stylize(RegExp.prototype.toString.call(e),"regexp");if(fe(e))return A.stylize(Date.prototype.toString.call(e),"date");if(ye(e))return ge(e)}var s,g="",I=!1,C=["{","}"];(Ce(e)&&(I=!0,C=["[","]"]),me(e))&&(g=" [Function"+(e.name?": "+e.name:"")+"]");return pe(e)&&(g=" "+RegExp.prototype.toString.call(e)),fe(e)&&(g=" "+Date.prototype.toUTCString.call(e)),ye(e)&&(g=" "+ge(e)),0!==n.length||I&&0!=e.length?t<0?pe(e)?A.stylize(RegExp.prototype.toString.call(e),"regexp"):A.stylize("[Object]","special"):(A.seen.push(e),s=I?function(A,e,t,i,r){for(var n=[],a=0,o=e.length;a<o;++a)be(e,String(a))?n.push(Ie(A,e,t,i,String(a),!0)):n.push("");return r.forEach((function(r){r.match(/^\d+$/)||n.push(Ie(A,e,t,i,r,!0));})),n}(A,e,t,a,n):n.map((function(i){return Ie(A,e,t,a,i,I)})),A.seen.pop(),function(A,e,t){var i=A.reduce((function(A,e){return e.indexOf("\n"),A+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(i>60)return t[0]+(""===e?"":e+"\n ")+" "+A.join(",\n ")+" "+t[1];return t[0]+e+" "+A.join(", ")+" "+t[1]}(s,g,C)):C[0]+g+C[1]}function ge(A){return "["+Error.prototype.toString.call(A)+"]"}function Ie(A,e,t,i,r,n){var a,o,s;if((s=Object.getOwnPropertyDescriptor(e,r)||{value:e[r]}).get?o=s.set?A.stylize("[Getter/Setter]","special"):A.stylize("[Getter]","special"):s.set&&(o=A.stylize("[Setter]","special")),be(i,r)||(a="["+r+"]"),o||(A.seen.indexOf(s.value)<0?(o=ue(t)?se(A,s.value,null):se(A,s.value,t-1)).indexOf("\n")>-1&&(o=n?o.split("\n").map((function(A){return " "+A})).join("\n").substr(2):"\n"+o.split("\n").map((function(A){return " "+A})).join("\n")):o=A.stylize("[Circular]","special")),he(a)){if(n&&r.match(/^\d+$/))return o;(a=JSON.stringify(""+r)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=A.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=A.stylize(a,"string"));}return a+": "+o}function Ce(A){return Array.isArray(A)}function ce(A){return "boolean"==typeof A}function ue(A){return null===A}function le(A){return null==A}function Be(A){return "number"==typeof A}function Ee(A){return "string"==typeof A}function Qe(A){return "symbol"==typeof A}function he(A){return void 0===A}function pe(A){return de(A)&&"[object RegExp]"===we(A)}function de(A){return "object"==typeof A&&null!==A}function fe(A){return de(A)&&"[object Date]"===we(A)}function ye(A){return de(A)&&("[object Error]"===we(A)||A instanceof Error)}function me(A){return "function"==typeof A}function De(A){return null===A||"boolean"==typeof A||"number"==typeof A||"string"==typeof A||"symbol"==typeof A||void 0===A}function Se(A){return K.isBuffer(A)}function we(A){return Object.prototype.toString.call(A)}function Ne(A){return A<10?"0"+A.toString(10):A.toString(10)}ne.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ne.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var ke=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ve(){var A,e;console.log("%s - %s",(A=new Date,e=[Ne(A.getHours()),Ne(A.getMinutes()),Ne(A.getSeconds())].join(":"),[A.getDate(),ke[A.getMonth()],e].join(" ")),Ae.apply(null,arguments));}function xe(A,e){if(!e||!de(e))return A;for(var t=Object.keys(e),i=t.length;i--;)A[t[i]]=e[t[i]];return A}function be(A,e){return Object.prototype.hasOwnProperty.call(A,e)}var Fe="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function Re(A){if("function"!=typeof A)throw new TypeError('The "original" argument must be of type Function');if(Fe&&A[Fe]){var e;if("function"!=typeof(e=A[Fe]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,Fe,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,t,i=new Promise((function(A,i){e=A,t=i;})),r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);r.push((function(A,i){A?t(A):e(i);}));try{A.apply(this,r);}catch(A){t(A);}return i}return Object.setPrototypeOf(e,Object.getPrototypeOf(A)),Fe&&Object.defineProperty(e,Fe,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,XA(A))}function Ge(A,e){if(!A){var t=new Error("Promise was rejected with a falsy value");t.reason=A,A=t;}return e(A)}function Te(A){if("function"!=typeof A)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);var i=e.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var r=this,n=function(){return i.apply(r,arguments)};A.apply(this,e).then((function(A){k.nextTick(n.bind(null,null,A));}),(function(A){k.nextTick(Ge.bind(null,A,n));}));}return Object.setPrototypeOf(e,Object.getPrototypeOf(A)),Object.defineProperties(e,XA(A)),e}Re.custom=Fe;var Me={inherits:ZA,_extend:xe,log:ve,isBuffer:Se,isPrimitive:De,isFunction:me,isError:ye,isDate:fe,isObject:de,isRegExp:pe,isUndefined:he,isSymbol:Qe,isString:Ee,isNumber:Be,isNullOrUndefined:le,isNull:ue,isBoolean:ce,isArray:Ce,inspect:ne,deprecate:ee,format:Ae,debuglog:re,promisify:Re,callbackify:Te},Ye=t(Object.freeze({__proto__:null,_extend:xe,callbackify:Te,debuglog:re,default:Me,deprecate:ee,format:Ae,inherits:ZA,inspect:ne,isArray:Ce,isBoolean:ce,isBuffer:Se,isDate:fe,isError:ye,isFunction:me,isNull:ue,isNullOrUndefined:le,isNumber:Be,isObject:de,isPrimitive:De,isRegExp:pe,isString:Ee,isSymbol:Qe,isUndefined:he,log:ve,promisify:Re}));function Le(A,e){(null==e||e>A.length)&&(e=A.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=A[t];return i}function Ue(A){if(void 0===A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function Pe(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function Je(A,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(A,i.key,i);}}function Ke(A,e,t){return e&&Je(A.prototype,e),t&&Je(A,t),A}function He(A,e,t){return e in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}function Oe(A,e,t){return Oe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(A,e,t){var i=function(A,e){for(;!Object.prototype.hasOwnProperty.call(A,e)&&null!==(A=_e(A)););return A}(A,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(t||A):r.value}},Oe(A,e,t||A)}function _e(A){return _e=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)},_e(A)}function je(A,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(e&&e.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),e&&ze(A,e);}function qe(A,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](A):A instanceof e}function ze(A,e){return ze=Object.setPrototypeOf||function(A,e){return A.__proto__=e,A},ze(A,e)}function Ve(A,e){return function(A){if(Array.isArray(A))return A}(A)||function(A,e){var t=null==A?null:"undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(null!=t){var i,r,n=[],a=!0,o=!1;try{for(t=t.call(A);!(a=(i=t.next()).done)&&(n.push(i.value),!e||n.length!==e);a=!0);}catch(A){o=!0,r=A;}finally{try{a||null==t.return||t.return();}finally{if(o)throw r}}return n}}(A,e)||$e(A,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(A,e){return e||(e=A.slice(0)),Object.freeze(Object.defineProperties(A,{raw:{value:Object.freeze(e)}}))}function Ze(A){return function(A){if(Array.isArray(A))return Le(A)}(A)||function(A){if("undefined"!=typeof Symbol&&null!=A[Symbol.iterator]||null!=A["@@iterator"])return Array.from(A)}(A)||$e(A)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(A){return A&&"undefined"!=typeof Symbol&&A.constructor===Symbol?"symbol":typeof A}function $e(A,e){if(A){if("string"==typeof A)return Le(A,e);var t=Object.prototype.toString.call(A).slice(8,-1);return "Object"===t&&A.constructor&&(t=A.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Le(A,e):void 0}}function At(A){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return !1}}();return function(){var t,i=_e(A);if(e){var r=_e(this).constructor;t=Reflect.construct(i,arguments,r);}else t=i.apply(this,arguments);return function(A,e){return !e||"object"!==Xe(e)&&"function"!=typeof e?Ue(A):e}(this,t)}}function et(A,e){var t,i,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,i&&(r=2&n[0]?i.return:n[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,n[1])).done)return r;switch(i=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,i=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(A,a);}catch(A){n=[6,A],i=0;}finally{t=r=0;}if(5&n[0])throw n[1];return {value:n[0]?n[1]:void 0,done:!0}}([n,o])}}}function tt(){var A=We(["pipelineOperator"]);return tt=function(){return A},A}function it(){var A=We(["flow"]);return it=function(){return A},A}function rt(){var A=We(["jsx"]);return rt=function(){return A},A}function nt(){var A=We(["typescript"]);return nt=function(){return A},A}function at(){var A=We(["placeholders"]);return at=function(){return A},A}var ot=Object.create,st=Object.defineProperty,gt=Object.getOwnPropertyDescriptor,It=Object.getOwnPropertyNames,Ct=Object.getPrototypeOf,ct=Object.prototype.hasOwnProperty,ut=function(A,e){return function(){return e||(0, A[It(A)[0]])((e={exports:{}}).exports,e),e.exports}},lt=function(A,e){for(var t in e)st(A,t,{get:e[t],enumerable:!0});},Bt=function(A,e,t,i){if(e&&"object"===(void 0===e?"undefined":Xe(e))||"function"==typeof e){var r=!0,n=!1,a=void 0;try{for(var o,s=function(){var r=o.value;ct.call(A,r)||r===t||st(A,r,{get:function(){return e[r]},enumerable:!(i=gt(e,r))||i.enumerable});},g=It(e)[Symbol.iterator]();!(r=(o=g.next()).done);r=!0)s();}catch(A){n=!0,a=A;}finally{try{r||null==g.return||g.return();}finally{if(n)throw a}}}return A},Et=function(A,e,t){return t=null!=A?ot(Ct(A)):{},Bt(st(t,"default",{value:A,enumerable:!0}),A)},Qt=function(A,e,t){return function(A,e,t){return e in A?st(A,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):A[e]=t}(A,"symbol"!==(void 0===e?"undefined":Xe(e))?e+"":e,t)},ht=ut({"node_modules/to-fast-properties/index.js":function(A,e){var t=null;function i(A){if(null!==t&&Xe(t.property)){var e=t;return t=i.prototype=null,e}return t=i.prototype=null==A?Object.create(null):A,new i}for(var r=0;r<=10;r++)i();e.exports=function(A){return i(A)};}}),pt=ut({"node_modules/@babel/highlight/node_modules/js-tokens/index.js":function(A,e){var t,i,r,n,a,o,s,g,I,C,c,u,l,B,E,Q,h,p,d;l=RegExp("\\/(?![*\\/])(?:\\[(?:[^\\]\\\\\\n\\r\\u2028\\u2029]+|\\\\.)*\\]|[^\\/\\\\\\n\\r\\u2028\\u2029]+|\\\\.)*(\\/[$_\\u200C\\u200D\\p{ID_Continue}]*|\\\\)?","yu"),u=RegExp("--|\\+\\+|=>|\\.{3}|\\??\\.(?!\\d)|(?:&&|\\|\\||\\?\\?|[+\\-%&|^]|\\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\\/(?![\\/*]))=?|[?~,:;[\\](){}]","y"),t=RegExp("(\\x23?)(?=[$_\\p{ID_Start}\\\\])(?:[$_\\u200C\\u200D\\p{ID_Continue}]+|\\\\u[\\da-fA-F]{4}|\\\\u\\{[\\da-fA-F]+\\})+","yu"),E=RegExp("(['\"])(?:[^'\"\\\\\\n\\r]+|(?!\\1)['\"]|\\\\(?:\\r\\n|[^]))*(\\1)?","y"),c=RegExp("(?:0[xX][\\da-fA-F](?:_?[\\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\\d)*n|(?:(?:0(?!\\d)|0\\d*[89]\\d*|[1-9](?:_?\\d)*)(?:\\.(?:\\d(?:_?\\d)*)?)?|\\.\\d(?:_?\\d)*)(?:[eE][+-]?\\d(?:_?\\d)*)?|0[0-7]+","y"),Q=RegExp("[`}](?:[^`\\\\$]+|\\\\[^]|\\$(?!\\{))*(`|\\$\\{)?","y"),d=RegExp("[\\t\\v\\f\\ufeff\\p{Zs}]+","yu"),g=RegExp("\\r?\\n|[\\r\\u2028\\u2029]","y"),I=RegExp("\\/\\*(?:[^*]+|\\*(?!\\/))*(\\*\\/)?","y"),B=RegExp("\\/\\/.*","y"),r=RegExp("[<>.:={}]|\\/(?![\\/*])","y"),i=RegExp("[$_\\p{ID_Start}][$_\\u200C\\u200D\\p{ID_Continue}-]*","yu"),n=RegExp("(['\"])(?:[^'\"]+|(?!\\1)['\"])*(\\1)?","y"),a=RegExp("[^<>{}]+","y"),p=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,h=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,o=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,s=/^(?:return|throw|yield)$/,C=RegExp(g.source),e.exports=function(A){var e,f,y,m,D,S,w,N,k,v,x,b,F,R,G,T,M=arguments;return et(this,(function(Y){switch(Y.label){case 0:e=(M.length>1&&void 0!==M[1]?M[1]:{}).jsx,f=void 0!==e&&e,N=A.length,S=0,w="",T=[{tag:"JS"}],y=[],F=0,R=!1,Y.label=1;case 1:if(!(S<N))return [3,62];switch(v=T[T.length-1],v.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":return [3,2];case"JSXTag":case"JSXTagEnd":return [3,38];case"JSXChildren":return [3,45]}return [3,52];case 2:return "/"!==A[S]||!p.test(w)&&!o.test(w)?[3,4]:(l.lastIndex=S,(k=l.exec(A))?(S=l.lastIndex,w=k[0],R=!0,[4,{type:"RegularExpressionLiteral",value:k[0],closed:void 0!==k[1]&&"\\"!==k[1]}]):[3,4]);case 3:return Y.sent(),[3,1];case 4:if(u.lastIndex=S,!(k=u.exec(A)))return [3,26];switch(G=k[0],x=u.lastIndex,b=G,G){case"(":return [3,5];case")":return [3,6];case"{":return [3,7];case"}":return [3,8];case"]":return [3,18];case"++":case"--":return [3,19];case"<":return [3,20]}return [3,23];case 5:return "?NonExpressionParenKeyword"===w&&T.push({tag:"JSNonExpressionParen",nesting:F}),F++,R=!1,[3,24];case 6:return F--,R=!0,"JSNonExpressionParen"===v.tag&&F===v.nesting&&(T.pop(),b="?NonExpressionParenEnd",R=!1),[3,24];case 7:return u.lastIndex=0,D=!h.test(w)&&(p.test(w)||o.test(w)),y.push(D),R=!1,[3,24];case 8:switch(v.tag){case"InterpolationInTemplate":return [3,9];case"InterpolationInJSX":return [3,15]}return [3,17];case 9:return y.length!==v.nesting?[3,14]:(Q.lastIndex=S,k=Q.exec(A),S=Q.lastIndex,w=k[0],"${"!==k[1]?[3,11]:(w="?InterpolationInTemplate",R=!1,[4,{type:"TemplateMiddle",value:k[0]}]));case 10:return Y.sent(),[3,13];case 11:return T.pop(),R=!0,[4,{type:"TemplateTail",value:k[0],closed:"`"===k[1]}];case 12:Y.sent(),Y.label=13;case 13:return [3,1];case 14:return [3,17];case 15:return y.length!==v.nesting?[3,17]:(T.pop(),S+=1,w="}",[4,{type:"JSXPunctuator",value:"}"}]);case 16:return Y.sent(),[3,1];case 17:return R=y.pop(),b=R?"?ExpressionBraceEnd":"}",[3,24];case 18:return R=!0,[3,24];case 19:return b=R?"?PostfixIncDec":"?UnaryIncDec",[3,24];case 20:return f&&(p.test(w)||o.test(w))?(T.push({tag:"JSXTag"}),S+=1,w="<",[4,{type:"JSXPunctuator",value:G}]):[3,22];case 21:return Y.sent(),[3,1];case 22:return R=!1,[3,24];case 23:R=!1,Y.label=24;case 24:return S=x,w=b,[4,{type:"Punctuator",value:G}];case 25:return Y.sent(),[3,1];case 26:if(t.lastIndex=S,!(k=t.exec(A)))return [3,28];switch(S=t.lastIndex,b=k[0],k[0]){case"for":case"if":case"while":case"with":"."!==w&&"?."!==w&&(b="?NonExpressionParenKeyword");}return w=b,R=!o.test(k[0]),[4,{type:"#"===k[1]?"PrivateIdentifier":"IdentifierName",value:k[0]}];case 27:return Y.sent(),[3,1];case 28:return E.lastIndex=S,(k=E.exec(A))?(S=E.lastIndex,w=k[0],R=!0,[4,{type:"StringLiteral",value:k[0],closed:void 0!==k[2]}]):[3,30];case 29:return Y.sent(),[3,1];case 30:return c.lastIndex=S,(k=c.exec(A))?(S=c.lastIndex,w=k[0],R=!0,[4,{type:"NumericLiteral",value:k[0]}]):[3,32];case 31:return Y.sent(),[3,1];case 32:return Q.lastIndex=S,(k=Q.exec(A))?(S=Q.lastIndex,w=k[0],"${"!==k[1]?[3,34]:(w="?InterpolationInTemplate",T.push({tag:"InterpolationInTemplate",nesting:y.length}),R=!1,[4,{type:"TemplateHead",value:k[0]}])):[3,37];case 33:return Y.sent(),[3,36];case 34:return R=!0,[4,{type:"NoSubstitutionTemplate",value:k[0],closed:"`"===k[1]}];case 35:Y.sent(),Y.label=36;case 36:return [3,1];case 37:return [3,52];case 38:if(r.lastIndex=S,!(k=r.exec(A)))return [3,40];switch(S=r.lastIndex,b=k[0],k[0]){case"<":T.push({tag:"JSXTag"});break;case">":T.pop(),"/"===w||"JSXTagEnd"===v.tag?(b="?JSX",R=!0):T.push({tag:"JSXChildren"});break;case"{":T.push({tag:"InterpolationInJSX",nesting:y.length}),b="?InterpolationInJSX",R=!1;break;case"/":"<"===w&&(T.pop(),"JSXChildren"===T[T.length-1].tag&&T.pop(),T.push({tag:"JSXTagEnd"}));}return w=b,[4,{type:"JSXPunctuator",value:k[0]}];case 39:return Y.sent(),[3,1];case 40:return i.lastIndex=S,(k=i.exec(A))?(S=i.lastIndex,w=k[0],[4,{type:"JSXIdentifier",value:k[0]}]):[3,42];case 41:return Y.sent(),[3,1];case 42:return n.lastIndex=S,(k=n.exec(A))?(S=n.lastIndex,w=k[0],[4,{type:"JSXString",value:k[0],closed:void 0!==k[2]}]):[3,44];case 43:return Y.sent(),[3,1];case 44:return [3,52];case 45:return a.lastIndex=S,(k=a.exec(A))?(S=a.lastIndex,w=k[0],[4,{type:"JSXText",value:k[0]}]):[3,47];case 46:return Y.sent(),[3,1];case 47:switch(A[S]){case"<":return [3,48];case"{":return [3,50]}return [3,52];case 48:return T.push({tag:"JSXTag"}),S++,w="<",[4,{type:"JSXPunctuator",value:"<"}];case 49:return Y.sent(),[3,1];case 50:return T.push({tag:"InterpolationInJSX",nesting:y.length}),S++,w="?InterpolationInJSX",R=!1,[4,{type:"JSXPunctuator",value:"{"}];case 51:return Y.sent(),[3,1];case 52:return d.lastIndex=S,(k=d.exec(A))?(S=d.lastIndex,[4,{type:"WhiteSpace",value:k[0]}]):[3,54];case 53:return Y.sent(),[3,1];case 54:return g.lastIndex=S,(k=g.exec(A))?(S=g.lastIndex,R=!1,s.test(w)&&(w="?NoLineTerminatorHere"),[4,{type:"LineTerminatorSequence",value:k[0]}]):[3,56];case 55:return Y.sent(),[3,1];case 56:return I.lastIndex=S,(k=I.exec(A))?(S=I.lastIndex,C.test(k[0])&&(R=!1,s.test(w)&&(w="?NoLineTerminatorHere")),[4,{type:"MultiLineComment",value:k[0],closed:void 0!==k[1]}]):[3,58];case 57:return Y.sent(),[3,1];case 58:return B.lastIndex=S,(k=B.exec(A))?(S=B.lastIndex,R=!1,[4,{type:"SingleLineComment",value:k[0]}]):[3,60];case 59:return Y.sent(),[3,1];case 60:return m=String.fromCodePoint(A.codePointAt(S)),S+=m.length,w=m,R=!1,[4,{type:v.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:m}];case 61:return Y.sent(),[3,1];case 62:return [2,void 0]}}))};}}),dt=ut({"node_modules/picocolors/picocolors.js":function(A,e){var t=k.argv||[],i={},r=!("NO_COLOR"in i||t.includes("--no-color"))&&("FORCE_COLOR"in i||t.includes("--color")||null!=wA&&FA.isatty(1)&&"dumb"!==i.TERM||"CI"in i),n=function(A,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A;return function(i){var r=""+i,n=r.indexOf(e,A.length);return ~n?A+a(r,e,t,n)+e:A+r+e}},a=function(A,e,t,i){var r="",n=0;do{r+=A.substring(n,i)+t,n=i+e.length,i=A.indexOf(e,n);}while(~i);return r+A.substring(n)},o=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,e=A?n