UNPKG

@conpago/ioredis-mock

Version:

This library emulates ioredis by performing all operations in-memory.

1 lines 1.3 MB
var R$=Object.create;var K_=Object.defineProperty;var O$=Object.getOwnPropertyDescriptor;var T$=Object.getOwnPropertyNames;var I$=Object.getPrototypeOf,N$=Object.prototype.hasOwnProperty;var N4=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var G=(e,t)=>()=>(e&&(t=e(e=0)),t);var N=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),B4=(e,t)=>{for(var r in t)K_(e,r,{get:t[r],enumerable:!0})},B$=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of T$(t))!N$.call(e,i)&&i!==r&&K_(e,i,{get:()=>t[i],enumerable:!(n=O$(t,i))||n.enumerable});return e};var _t=(e,t,r)=>(r=e!=null?R$(I$(e)):{},B$(t||!e||!e.__esModule?K_(r,"default",{value:e,enumerable:!0}):r,e));var U4=N((nCe,C4)=>{b();C4.exports=R||U$;var iu=window.performance||{},C$=iu.now||iu.mozNow||iu.msNow||iu.oNow||iu.webkitNow||function(){return new Date().getTime()};function U$(e){var t=C$.call(iu)*.001,r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r=r-e[0],n=n-e[1],n<0&&(r--,n+=1e9)),[r,n]}});var D4=N(Ap=>{"use strict";b();Ap.byteLength=q$;Ap.toByteArray=F$;Ap.fromByteArray=G$;var gs=[],wi=[],P$=typeof Uint8Array<"u"?Uint8Array:Array,G_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(bl=0,P4=G_.length;bl<P4;++bl)gs[bl]=G_[bl],wi[G_.charCodeAt(bl)]=bl;var bl,P4;wi[45]=62;wi[95]=63;function q4(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function q$(e){var t=q4(e),r=t[0],n=t[1];return(r+n)*3/4-n}function D$(e,t,r){return(t+r)*3/4-r}function F$(e){var t,r=q4(e),n=r[0],i=r[1],o=new P$(D$(e,n,i)),d=0,_=i>0?n-4:n,v;for(v=0;v<_;v+=4)t=wi[e.charCodeAt(v)]<<18|wi[e.charCodeAt(v+1)]<<12|wi[e.charCodeAt(v+2)]<<6|wi[e.charCodeAt(v+3)],o[d++]=t>>16&255,o[d++]=t>>8&255,o[d++]=t&255;return i===2&&(t=wi[e.charCodeAt(v)]<<2|wi[e.charCodeAt(v+1)]>>4,o[d++]=t&255),i===1&&(t=wi[e.charCodeAt(v)]<<10|wi[e.charCodeAt(v+1)]<<4|wi[e.charCodeAt(v+2)]>>2,o[d++]=t>>8&255,o[d++]=t&255),o}function L$(e){return gs[e>>18&63]+gs[e>>12&63]+gs[e>>6&63]+gs[e&63]}function K$(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(L$(n));return i.join("")}function G$(e){for(var t,r=e.length,n=r%3,i=[],o=16383,d=0,_=r-n;d<_;d+=o)i.push(K$(e,d,d+o>_?_:d+o));return n===1?(t=e[r-1],i.push(gs[t>>2]+gs[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(gs[t>>10]+gs[t>>4&63]+gs[t<<2&63]+"=")),i.join("")}});var F4=N(z_=>{b();z_.read=function(e,t,r,n,i){var o,d,_=i*8-n-1,v=(1<<_)-1,w=v>>1,k=-7,A=r?i-1:0,O=r?-1:1,T=e[t+A];for(A+=O,o=T&(1<<-k)-1,T>>=-k,k+=_;k>0;o=o*256+e[t+A],A+=O,k-=8);for(d=o&(1<<-k)-1,o>>=-k,k+=n;k>0;d=d*256+e[t+A],A+=O,k-=8);if(o===0)o=1-w;else{if(o===v)return d?NaN:(T?-1:1)*(1/0);d=d+Math.pow(2,n),o=o-w}return(T?-1:1)*d*Math.pow(2,o-n)};z_.write=function(e,t,r,n,i,o){var d,_,v,w=o*8-i-1,k=(1<<w)-1,A=k>>1,O=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,B=n?1:-1,L=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(_=isNaN(t)?1:0,d=k):(d=Math.floor(Math.log(t)/Math.LN2),t*(v=Math.pow(2,-d))<1&&(d--,v*=2),d+A>=1?t+=O/v:t+=O*Math.pow(2,1-A),t*v>=2&&(d++,v/=2),d+A>=k?(_=0,d=k):d+A>=1?(_=(t*v-1)*Math.pow(2,i),d=d+A):(_=t*Math.pow(2,A-1)*Math.pow(2,i),d=0));i>=8;e[r+T]=_&255,T+=B,_/=256,i-=8);for(d=d<<i|_,w+=i;w>0;e[r+T]=d&255,T+=B,d/=256,w-=8);e[r+T-B]|=L*128}});var ki=N(lu=>{"use strict";b();var H_=D4(),au=F4(),L4=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;lu.Buffer=Ee;lu.SlowBuffer=W$;lu.INSPECT_MAX_BYTES=50;var Sp=2147483647;lu.kMaxLength=Sp;Ee.TYPED_ARRAY_SUPPORT=z$();!Ee.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function z$(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(Ee.prototype,"parent",{enumerable:!0,get:function(){if(Ee.isBuffer(this))return this.buffer}});Object.defineProperty(Ee.prototype,"offset",{enumerable:!0,get:function(){if(Ee.isBuffer(this))return this.byteOffset}});function ia(e){if(e>Sp)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Ee.prototype),t}function Ee(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return W_(e)}return H4(e,t,r)}Ee.poolSize=8192;function H4(e,t,r){if(typeof e=="string")return V$(e,t);if(ArrayBuffer.isView(e))return j$(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(_s(e,ArrayBuffer)||e&&_s(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(_s(e,SharedArrayBuffer)||e&&_s(e.buffer,SharedArrayBuffer)))return j_(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return Ee.from(n,t,r);let i=X$(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ee.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Ee.from=function(e,t,r){return H4(e,t,r)};Object.setPrototypeOf(Ee.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ee,Uint8Array);function V4(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function H$(e,t,r){return V4(e),e<=0?ia(e):t!==void 0?typeof r=="string"?ia(e).fill(t,r):ia(e).fill(t):ia(e)}Ee.alloc=function(e,t,r){return H$(e,t,r)};function W_(e){return V4(e),ia(e<0?0:$_(e)|0)}Ee.allocUnsafe=function(e){return W_(e)};Ee.allocUnsafeSlow=function(e){return W_(e)};function V$(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Ee.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=j4(e,t)|0,n=ia(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function V_(e){let t=e.length<0?0:$_(e.length)|0,r=ia(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function j$(e){if(_s(e,Uint8Array)){let t=new Uint8Array(e);return j_(t.buffer,t.byteOffset,t.byteLength)}return V_(e)}function j_(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,Ee.prototype),n}function X$(e){if(Ee.isBuffer(e)){let t=$_(e.length)|0,r=ia(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||Y_(e.length)?ia(0):V_(e);if(e.type==="Buffer"&&Array.isArray(e.data))return V_(e.data)}function $_(e){if(e>=Sp)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Sp.toString(16)+" bytes");return e|0}function W$(e){return+e!=e&&(e=0),Ee.alloc(+e)}Ee.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Ee.prototype};Ee.compare=function(t,r){if(_s(t,Uint8Array)&&(t=Ee.from(t,t.offset,t.byteLength)),_s(r,Uint8Array)&&(r=Ee.from(r,r.offset,r.byteLength)),!Ee.isBuffer(t)||!Ee.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let o=0,d=Math.min(n,i);o<d;++o)if(t[o]!==r[o]){n=t[o],i=r[o];break}return n<i?-1:i<n?1:0};Ee.isEncoding=function(t){switch(String(t).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}};Ee.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return Ee.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let i=Ee.allocUnsafe(r),o=0;for(n=0;n<t.length;++n){let d=t[n];if(_s(d,Uint8Array))o+d.length>i.length?(Ee.isBuffer(d)||(d=Ee.from(d)),d.copy(i,o)):Uint8Array.prototype.set.call(i,d,o);else if(Ee.isBuffer(d))d.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=d.length}return i};function j4(e,t){if(Ee.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||_s(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return X_(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return tA(e).length;default:if(i)return n?-1:X_(e).length;t=(""+t).toLowerCase(),i=!0}}Ee.byteLength=j4;function $$(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return sZ(this,t,r);case"utf8":case"utf-8":return W4(this,t,r);case"ascii":return nZ(this,t,r);case"latin1":case"binary":return iZ(this,t,r);case"base64":return tZ(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return aZ(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Ee.prototype._isBuffer=!0;function xl(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Ee.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)xl(this,r,r+1);return this};Ee.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)xl(this,r,r+3),xl(this,r+1,r+2);return this};Ee.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)xl(this,r,r+7),xl(this,r+1,r+6),xl(this,r+2,r+5),xl(this,r+3,r+4);return this};Ee.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?W4(this,0,t):$$.apply(this,arguments)};Ee.prototype.toLocaleString=Ee.prototype.toString;Ee.prototype.equals=function(t){if(!Ee.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:Ee.compare(this,t)===0};Ee.prototype.inspect=function(){let t="",r=lu.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};L4&&(Ee.prototype[L4]=Ee.prototype.inspect);Ee.prototype.compare=function(t,r,n,i,o){if(_s(t,Uint8Array)&&(t=Ee.from(t,t.offset,t.byteLength)),!Ee.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;let d=o-i,_=n-r,v=Math.min(d,_),w=this.slice(i,o),k=t.slice(r,n);for(let A=0;A<v;++A)if(w[A]!==k[A]){d=w[A],_=k[A];break}return d<_?-1:_<d?1:0};function X4(e,t,r,n,i){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Y_(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=Ee.from(t,n)),Ee.isBuffer(t))return t.length===0?-1:K4(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):K4(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function K4(e,t,r,n,i){let o=1,d=e.length,_=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,d/=2,_/=2,r/=2}function v(k,A){return o===1?k[A]:k.readUInt16BE(A*o)}let w;if(i){let k=-1;for(w=r;w<d;w++)if(v(e,w)===v(t,k===-1?0:w-k)){if(k===-1&&(k=w),w-k+1===_)return k*o}else k!==-1&&(w-=w-k),k=-1}else for(r+_>d&&(r=d-_),w=r;w>=0;w--){let k=!0;for(let A=0;A<_;A++)if(v(e,w+A)!==v(t,A)){k=!1;break}if(k)return w}return-1}Ee.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};Ee.prototype.indexOf=function(t,r,n){return X4(this,t,r,n,!0)};Ee.prototype.lastIndexOf=function(t,r,n){return X4(this,t,r,n,!1)};function Z$(e,t,r,n){r=Number(r)||0;let i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let d;for(d=0;d<n;++d){let _=parseInt(t.substr(d*2,2),16);if(Y_(_))return d;e[r+d]=_}return d}function Y$(e,t,r,n){return Ep(X_(t,e.length-r),e,r,n)}function J$(e,t,r,n){return Ep(uZ(t),e,r,n)}function Q$(e,t,r,n){return Ep(tA(t),e,r,n)}function eZ(e,t,r,n){return Ep(cZ(t,e.length-r),e,r,n)}Ee.prototype.write=function(t,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-r;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let d=!1;for(;;)switch(i){case"hex":return Z$(this,t,r,n);case"utf8":case"utf-8":return Y$(this,t,r,n);case"ascii":case"latin1":case"binary":return J$(this,t,r,n);case"base64":return Q$(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return eZ(this,t,r,n);default:if(d)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),d=!0}};Ee.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function tZ(e,t,r){return t===0&&r===e.length?H_.fromByteArray(e):H_.fromByteArray(e.slice(t,r))}function W4(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let o=e[i],d=null,_=o>239?4:o>223?3:o>191?2:1;if(i+_<=r){let v,w,k,A;switch(_){case 1:o<128&&(d=o);break;case 2:v=e[i+1],(v&192)===128&&(A=(o&31)<<6|v&63,A>127&&(d=A));break;case 3:v=e[i+1],w=e[i+2],(v&192)===128&&(w&192)===128&&(A=(o&15)<<12|(v&63)<<6|w&63,A>2047&&(A<55296||A>57343)&&(d=A));break;case 4:v=e[i+1],w=e[i+2],k=e[i+3],(v&192)===128&&(w&192)===128&&(k&192)===128&&(A=(o&15)<<18|(v&63)<<12|(w&63)<<6|k&63,A>65535&&A<1114112&&(d=A))}}d===null?(d=65533,_=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|d&1023),n.push(d),i+=_}return rZ(n)}var G4=4096;function rZ(e){let t=e.length;if(t<=G4)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=G4));return r}function nZ(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function iZ(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function sZ(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let o=t;o<r;++o)i+=hZ[e[o]];return i}function aZ(e,t,r){let n=e.slice(t,r),i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}Ee.prototype.slice=function(t,r){let n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);let i=this.subarray(t,r);return Object.setPrototypeOf(i,Ee.prototype),i};function Jr(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}Ee.prototype.readUintLE=Ee.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||Jr(t,r,this.length);let i=this[t],o=1,d=0;for(;++d<r&&(o*=256);)i+=this[t+d]*o;return i};Ee.prototype.readUintBE=Ee.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||Jr(t,r,this.length);let i=this[t+--r],o=1;for(;r>0&&(o*=256);)i+=this[t+--r]*o;return i};Ee.prototype.readUint8=Ee.prototype.readUInt8=function(t,r){return t=t>>>0,r||Jr(t,1,this.length),this[t]};Ee.prototype.readUint16LE=Ee.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Jr(t,2,this.length),this[t]|this[t+1]<<8};Ee.prototype.readUint16BE=Ee.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Jr(t,2,this.length),this[t]<<8|this[t+1]};Ee.prototype.readUint32LE=Ee.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Jr(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Ee.prototype.readUint32BE=Ee.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Jr(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Ee.prototype.readBigUInt64LE=co(function(t){t=t>>>0,ou(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&O0(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,o=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(o)<<BigInt(32))});Ee.prototype.readBigUInt64BE=co(function(t){t=t>>>0,ou(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&O0(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],o=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(o)});Ee.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||Jr(t,r,this.length);let i=this[t],o=1,d=0;for(;++d<r&&(o*=256);)i+=this[t+d]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*r)),i};Ee.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||Jr(t,r,this.length);let i=r,o=1,d=this[t+--i];for(;i>0&&(o*=256);)d+=this[t+--i]*o;return o*=128,d>=o&&(d-=Math.pow(2,8*r)),d};Ee.prototype.readInt8=function(t,r){return t=t>>>0,r||Jr(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Ee.prototype.readInt16LE=function(t,r){t=t>>>0,r||Jr(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Ee.prototype.readInt16BE=function(t,r){t=t>>>0,r||Jr(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Ee.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Jr(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Ee.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Jr(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Ee.prototype.readBigInt64LE=co(function(t){t=t>>>0,ou(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&O0(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});Ee.prototype.readBigInt64BE=co(function(t){t=t>>>0,ou(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&O0(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});Ee.prototype.readFloatLE=function(t,r){return t=t>>>0,r||Jr(t,4,this.length),au.read(this,t,!0,23,4)};Ee.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Jr(t,4,this.length),au.read(this,t,!1,23,4)};Ee.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Jr(t,8,this.length),au.read(this,t,!0,52,8)};Ee.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Jr(t,8,this.length),au.read(this,t,!1,52,8)};function Vn(e,t,r,n,i,o){if(!Ee.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}Ee.prototype.writeUintLE=Ee.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let _=Math.pow(2,8*n)-1;Vn(this,t,r,n,_,0)}let o=1,d=0;for(this[r]=t&255;++d<n&&(o*=256);)this[r+d]=t/o&255;return r+n};Ee.prototype.writeUintBE=Ee.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let _=Math.pow(2,8*n)-1;Vn(this,t,r,n,_,0)}let o=n-1,d=1;for(this[r+o]=t&255;--o>=0&&(d*=256);)this[r+o]=t/d&255;return r+n};Ee.prototype.writeUint8=Ee.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,1,255,0),this[r]=t&255,r+1};Ee.prototype.writeUint16LE=Ee.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Ee.prototype.writeUint16BE=Ee.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Ee.prototype.writeUint32LE=Ee.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};Ee.prototype.writeUint32BE=Ee.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function $4(e,t,r,n,i){eA(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let d=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=d,d=d>>8,e[r++]=d,d=d>>8,e[r++]=d,d=d>>8,e[r++]=d,r}function Z4(e,t,r,n,i){eA(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let d=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=d,d=d>>8,e[r+2]=d,d=d>>8,e[r+1]=d,d=d>>8,e[r]=d,r+8}Ee.prototype.writeBigUInt64LE=co(function(t,r=0){return $4(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ee.prototype.writeBigUInt64BE=co(function(t,r=0){return Z4(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ee.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let v=Math.pow(2,8*n-1);Vn(this,t,r,n,v-1,-v)}let o=0,d=1,_=0;for(this[r]=t&255;++o<n&&(d*=256);)t<0&&_===0&&this[r+o-1]!==0&&(_=1),this[r+o]=(t/d>>0)-_&255;return r+n};Ee.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let v=Math.pow(2,8*n-1);Vn(this,t,r,n,v-1,-v)}let o=n-1,d=1,_=0;for(this[r+o]=t&255;--o>=0&&(d*=256);)t<0&&_===0&&this[r+o+1]!==0&&(_=1),this[r+o]=(t/d>>0)-_&255;return r+n};Ee.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Ee.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Ee.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Ee.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};Ee.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Vn(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};Ee.prototype.writeBigInt64LE=co(function(t,r=0){return $4(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Ee.prototype.writeBigInt64BE=co(function(t,r=0){return Z4(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y4(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function J4(e,t,r,n,i){return t=+t,r=r>>>0,i||Y4(e,t,r,4,34028234663852886e22,-34028234663852886e22),au.write(e,t,r,n,23,4),r+4}Ee.prototype.writeFloatLE=function(t,r,n){return J4(this,t,r,!0,n)};Ee.prototype.writeFloatBE=function(t,r,n){return J4(this,t,r,!1,n)};function Q4(e,t,r,n,i){return t=+t,r=r>>>0,i||Y4(e,t,r,8,17976931348623157e292,-17976931348623157e292),au.write(e,t,r,n,52,8),r+8}Ee.prototype.writeDoubleLE=function(t,r,n){return Q4(this,t,r,!0,n)};Ee.prototype.writeDoubleBE=function(t,r,n){return Q4(this,t,r,!1,n)};Ee.prototype.copy=function(t,r,n,i){if(!Ee.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);let o=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),r),o};Ee.prototype.fill=function(t,r,n,i){if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!Ee.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){let d=t.charCodeAt(0);(i==="utf8"&&d<128||i==="latin1")&&(t=d)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let o;if(typeof t=="number")for(o=r;o<n;++o)this[o]=t;else{let d=Ee.isBuffer(t)?t:Ee.from(t,i),_=d.length;if(_===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-r;++o)this[o+r]=d[o%_]}return this};var su={};function Z_(e,t,r){su[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}Z_("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Z_("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);Z_("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z4(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z4(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function z4(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function oZ(e,t,r){ou(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&O0(t,e.length-(r+1))}function eA(e,t,r,n,i,o){if(e>r||e<t){let d=typeof t=="bigint"?"n":"",_;throw o>3?t===0||t===BigInt(0)?_=`>= 0${d} and < 2${d} ** ${(o+1)*8}${d}`:_=`>= -(2${d} ** ${(o+1)*8-1}${d}) and < 2 ** ${(o+1)*8-1}${d}`:_=`>= ${t}${d} and <= ${r}${d}`,new su.ERR_OUT_OF_RANGE("value",_,e)}oZ(n,i,o)}function ou(e,t){if(typeof e!="number")throw new su.ERR_INVALID_ARG_TYPE(t,"number",e)}function O0(e,t,r){throw Math.floor(e)!==e?(ou(e,r),new su.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new su.ERR_BUFFER_OUT_OF_BOUNDS:new su.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var lZ=/[^+/0-9A-Za-z-_]/g;function fZ(e){if(e=e.split("=")[0],e=e.trim().replace(lZ,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function X_(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let d=0;d<n;++d){if(r=e.charCodeAt(d),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(d+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function uZ(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function cZ(e,t){let r,n,i,o=[];for(let d=0;d<e.length&&!((t-=2)<0);++d)r=e.charCodeAt(d),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function tA(e){return H_.toByteArray(fZ(e))}function Ep(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function _s(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Y_(e){return e!==e}var hZ=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function co(e){return typeof BigInt>"u"?dZ:e}function dZ(){throw new Error("BigInt not supported")}});function E(e){Promise.resolve().then(()=>{e()})}var rA,nA,R,b=G(()=>{rA=_t(U4()),nA=_t(ki());window.Buffer=nA.Buffer;R=rA.default});var ho=N((dCe,J_)=>{"use strict";b();var fu=typeof Reflect=="object"?Reflect:null,iA=fu&&typeof fu.apply=="function"?fu.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Rp;fu&&typeof fu.ownKeys=="function"?Rp=fu.ownKeys:Object.getOwnPropertySymbols?Rp=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Rp=function(t){return Object.getOwnPropertyNames(t)};function pZ(e){console&&console.warn&&console.warn(e)}var aA=Number.isNaN||function(t){return t!==t};function kt(){kt.init.call(this)}J_.exports=kt;J_.exports.once=_Z;kt.EventEmitter=kt;kt.prototype._events=void 0;kt.prototype._eventsCount=0;kt.prototype._maxListeners=void 0;var sA=10;function Op(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(kt,"defaultMaxListeners",{enumerable:!0,get:function(){return sA},set:function(e){if(typeof e!="number"||e<0||aA(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");sA=e}});kt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};kt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||aA(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function oA(e){return e._maxListeners===void 0?kt.defaultMaxListeners:e._maxListeners}kt.prototype.getMaxListeners=function(){return oA(this)};kt.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=t==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var d;if(r.length>0&&(d=r[0]),d instanceof Error)throw d;var _=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw _.context=d,_}var v=o[t];if(v===void 0)return!1;if(typeof v=="function")iA(v,this,r);else for(var w=v.length,k=hA(v,w),n=0;n<w;++n)iA(k[n],this,r);return!0};function lA(e,t,r,n){var i,o,d;if(Op(r),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),d=o[t]),d===void 0)d=o[t]=r,++e._eventsCount;else if(typeof d=="function"?d=o[t]=n?[r,d]:[d,r]:n?d.unshift(r):d.push(r),i=oA(e),i>0&&d.length>i&&!d.warned){d.warned=!0;var _=new Error("Possible EventEmitter memory leak detected. "+d.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");_.name="MaxListenersExceededWarning",_.emitter=e,_.type=t,_.count=d.length,pZ(_)}return e}kt.prototype.addListener=function(t,r){return lA(this,t,r,!1)};kt.prototype.on=kt.prototype.addListener;kt.prototype.prependListener=function(t,r){return lA(this,t,r,!0)};function mZ(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function fA(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=mZ.bind(n);return i.listener=r,n.wrapFn=i,i}kt.prototype.once=function(t,r){return Op(r),this.on(t,fA(this,t,r)),this};kt.prototype.prependOnceListener=function(t,r){return Op(r),this.prependListener(t,fA(this,t,r)),this};kt.prototype.removeListener=function(t,r){var n,i,o,d,_;if(Op(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(o=-1,d=n.length-1;d>=0;d--)if(n[d]===r||n[d].listener===r){_=n[d].listener,o=d;break}if(o<0)return this;o===0?n.shift():yZ(n,o),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,_||r)}return this};kt.prototype.off=kt.prototype.removeListener;kt.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var o=Object.keys(n),d;for(i=0;i<o.length;++i)d=o[i],d!=="removeListener"&&this.removeAllListeners(d);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(t,r[i]);return this};function uA(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?gZ(i):hA(i,i.length)}kt.prototype.listeners=function(t){return uA(this,t,!0)};kt.prototype.rawListeners=function(t){return uA(this,t,!1)};kt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):cA.call(e,t)};kt.prototype.listenerCount=cA;function cA(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}kt.prototype.eventNames=function(){return this._eventsCount>0?Rp(this._events):[]};function hA(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function yZ(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function gZ(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function _Z(e,t){return new Promise(function(r,n){function i(d){e.removeListener(t,o),n(d)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),r([].slice.call(arguments))}dA(e,t,o,{once:!0}),t!=="error"&&vZ(e,i,{once:!0})})}function vZ(e,t,r){typeof e.on=="function"&&dA(e,"error",t,r)}function dA(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var pA=N((uu,cu)=>{b();(function(e){var t=typeof uu=="object"&&uu&&!uu.nodeType&&uu,r=typeof cu=="object"&&cu&&!cu.nodeType&&cu,n=typeof window=="object"&&window;(n.global===n||n.window===n||n.self===n)&&(e=n);var i,o=2147483647,d=36,_=1,v=26,w=38,k=700,A=72,O=128,T="-",B=/^xn--/,L=/[^\x20-\x7E]/,W=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=d-_,K=Math.floor,Ie=String.fromCharCode,Fe;function Ce(h){throw new RangeError(P[h])}function Ge(h,a){for(var p=h.length,M=[];p--;)M[p]=a(h[p]);return M}function z(h,a){var p=h.split("@"),M="";p.length>1&&(M=p[0]+"@",h=p[1]),h=h.replace(W,".");var x=h.split("."),S=Ge(x,a).join(".");return M+S}function Ne(h){for(var a=[],p=0,M=h.length,x,S;p<M;)x=h.charCodeAt(p++),x>=55296&&x<=56319&&p<M?(S=h.charCodeAt(p++),(S&64512)==56320?a.push(((x&1023)<<10)+(S&1023)+65536):(a.push(x),p--)):a.push(x);return a}function y(h){return Ge(h,function(a){var p="";return a>65535&&(a-=65536,p+=Ie(a>>>10&1023|55296),a=56320|a&1023),p+=Ie(a),p}).join("")}function s(h){return h-48<10?h-22:h-65<26?h-65:h-97<26?h-97:d}function l(h,a){return h+22+75*(h<26)-((a!=0)<<5)}function u(h,a,p){var M=0;for(h=p?K(h/k):h>>1,h+=K(h/a);h>$*v>>1;M+=d)h=K(h/$);return K(M+($+1)*h/(h+w))}function f(h){var a=[],p=h.length,M,x=0,S=O,I=A,C,U,Re,q,D,ot,H,V,wt;for(C=h.lastIndexOf(T),C<0&&(C=0),U=0;U<C;++U)h.charCodeAt(U)>=128&&Ce("not-basic"),a.push(h.charCodeAt(U));for(Re=C>0?C+1:0;Re<p;){for(q=x,D=1,ot=d;Re>=p&&Ce("invalid-input"),H=s(h.charCodeAt(Re++)),(H>=d||H>K((o-x)/D))&&Ce("overflow"),x+=H*D,V=ot<=I?_:ot>=I+v?v:ot-I,!(H<V);ot+=d)wt=d-V,D>K(o/wt)&&Ce("overflow"),D*=wt;M=a.length+1,I=u(x-q,M,q==0),K(x/M)>o-S&&Ce("overflow"),S+=K(x/M),x%=M,a.splice(x++,0,S)}return y(a)}function c(h){var a,p,M,x,S,I,C,U,Re,q,D,ot=[],H,V,wt,X;for(h=Ne(h),H=h.length,a=O,p=0,S=A,I=0;I<H;++I)D=h[I],D<128&&ot.push(Ie(D));for(M=x=ot.length,x&&ot.push(T);M<H;){for(C=o,I=0;I<H;++I)D=h[I],D>=a&&D<C&&(C=D);for(V=M+1,C-a>K((o-p)/V)&&Ce("overflow"),p+=(C-a)*V,a=C,I=0;I<H;++I)if(D=h[I],D<a&&++p>o&&Ce("overflow"),D==a){for(U=p,Re=d;q=Re<=S?_:Re>=S+v?v:Re-S,!(U<q);Re+=d)X=U-q,wt=d-q,ot.push(Ie(l(q+X%wt,0))),U=K(X/wt);ot.push(Ie(l(U,0))),S=u(p,V,M==x),p=0,++M}++p,++a}return ot.join("")}function m(h){return z(h,function(a){return B.test(a)?f(a.slice(4).toLowerCase()):a})}function g(h){return z(h,function(a){return L.test(a)?"xn--"+c(a):a})}if(i={version:"1.4.1",ucs2:{decode:Ne,encode:y},decode:f,encode:c,toASCII:g,toUnicode:m},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return i});else if(t&&r)if(cu.exports==t)r.exports=i;else for(Fe in i)i.hasOwnProperty(Fe)&&(t[Fe]=i[Fe]);else e.punycode=i})(uu)});var yA=N((yCe,mA)=>{"use strict";b();mA.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(t,r);if(d.value!==i||d.enumerable!==!0)return!1}return!0}});var vA=N((_Ce,_A)=>{"use strict";b();var gA=typeof Symbol<"u"&&Symbol,bZ=yA();_A.exports=function(){return typeof gA!="function"||typeof Symbol!="function"||typeof gA("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:bZ()}});var wA=N((bCe,xA)=>{"use strict";b();var bA={foo:{}},xZ=Object;xA.exports=function(){return{__proto__:bA}.foo===bA.foo&&!({__proto__:null}instanceof xZ)}});var AA=N((wCe,MA)=>{"use strict";b();var wZ="Function.prototype.bind called on incompatible ",kZ=Object.prototype.toString,MZ=Math.max,AZ="[object Function]",kA=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<r.length;o+=1)n[o+t.length]=r[o];return n},SZ=function(t,r){for(var n=[],i=r||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n},EZ=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};MA.exports=function(t){var r=this;if(typeof r!="function"||kZ.apply(r)!==AZ)throw new TypeError(wZ+r);for(var n=SZ(arguments,1),i,o=function(){if(this instanceof i){var k=r.apply(this,kA(n,arguments));return Object(k)===k?k:this}return r.apply(t,kA(n,arguments))},d=MZ(0,r.length-n.length),_=[],v=0;v<d;v++)_[v]="$"+v;if(i=Function("binder","return function ("+EZ(_,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var w=function(){};w.prototype=r.prototype,i.prototype=new w,w.prototype=null}return i}});var Tp=N((MCe,SA)=>{"use strict";b();var RZ=AA();SA.exports=Function.prototype.bind||RZ});var RA=N((SCe,EA)=>{"use strict";b();var OZ=Tp();EA.exports=OZ.call(Function.call,Object.prototype.hasOwnProperty)});var Bp=N((RCe,BA)=>{"use strict";b();var dt,mu=SyntaxError,NA=Function,pu=TypeError,Q_=function(e){try{return NA('"use strict"; return ('+e+").constructor;")()}catch{}},wl=Object.getOwnPropertyDescriptor;if(wl)try{wl({},"")}catch{wl=null}var ev=function(){throw new pu},TZ=wl?function(){try{return arguments.callee,ev}catch{try{return wl(arguments,"callee").get}catch{return ev}}}():ev,hu=vA()(),IZ=wA()(),Qr=Object.getPrototypeOf||(IZ?function(e){return e.__proto__}:null),du={},NZ=typeof Uint8Array>"u"||!Qr?dt:Qr(Uint8Array),kl={"%AggregateError%":typeof AggregateError>"u"?dt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?dt:ArrayBuffer,"%ArrayIteratorPrototype%":hu&&Qr?Qr([][Symbol.iterator]()):dt,"%AsyncFromSyncIteratorPrototype%":dt,"%AsyncFunction%":du,"%AsyncGenerator%":du,"%AsyncGeneratorFunction%":du,"%AsyncIteratorPrototype%":du,"%Atomics%":typeof Atomics>"u"?dt:Atomics,"%BigInt%":typeof BigInt>"u"?dt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?dt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?dt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?dt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?dt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?dt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?dt:FinalizationRegistry,"%Function%":NA,"%GeneratorFunction%":du,"%Int8Array%":typeof Int8Array>"u"?dt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?dt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?dt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hu&&Qr?Qr(Qr([][Symbol.iterator]())):dt,"%JSON%":typeof JSON=="object"?JSON:dt,"%Map%":typeof Map>"u"?dt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hu||!Qr?dt:Qr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?dt:Promise,"%Proxy%":typeof Proxy>"u"?dt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?dt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?dt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hu||!Qr?dt:Qr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?dt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hu&&Qr?Qr(""[Symbol.iterator]()):dt,"%Symbol%":hu?Symbol:dt,"%SyntaxError%":mu,"%ThrowTypeError%":TZ,"%TypedArray%":NZ,"%TypeError%":pu,"%Uint8Array%":typeof Uint8Array>"u"?dt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?dt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?dt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?dt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?dt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?dt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?dt:WeakSet};if(Qr)try{null.error}catch(e){OA=Qr(Qr(e)),kl["%Error.prototype%"]=OA}var OA,BZ=function e(t){var r;if(t==="%AsyncFunction%")r=Q_("async function () {}");else if(t==="%GeneratorFunction%")r=Q_("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Q_("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Qr&&(r=Qr(i.prototype))}return kl[t]=r,r},TA={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T0=Tp(),Ip=RA(),CZ=T0.call(Function.call,Array.prototype.concat),UZ=T0.call(Function.apply,Array.prototype.splice),IA=T0.call(Function.call,String.prototype.replace),Np=T0.call(Function.call,String.prototype.slice),PZ=T0.call(Function.call,RegExp.prototype.exec),qZ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,DZ=/\\(\\)?/g,FZ=function(t){var r=Np(t,0,1),n=Np(t,-1);if(r==="%"&&n!=="%")throw new mu("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new mu("invalid intrinsic syntax, expected opening `%`");var i=[];return IA(t,qZ,function(o,d,_,v){i[i.length]=_?IA(v,DZ,"$1"):d||o}),i},LZ=function(t,r){var n=t,i;if(Ip(TA,n)&&(i=TA[n],n="%"+i[0]+"%"),Ip(kl,n)){var o=kl[n];if(o===du&&(o=BZ(n)),typeof o>"u"&&!r)throw new pu("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new mu("intrinsic "+t+" does not exist!")};BA.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new pu("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new pu('"allowMissing" argument must be a boolean');if(PZ(/^%?[^%]*%?$/,t)===null)throw new mu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=FZ(t),i=n.length>0?n[0]:"",o=LZ("%"+i+"%",r),d=o.name,_=o.value,v=!1,w=o.alias;w&&(i=w[0],UZ(n,CZ([0,1],w)));for(var k=1,A=!0;k<n.length;k+=1){var O=n[k],T=Np(O,0,1),B=Np(O,-1);if((T==='"'||T==="'"||T==="`"||B==='"'||B==="'"||B==="`")&&T!==B)throw new mu("property names with quotes must have matching quotes");if((O==="constructor"||!A)&&(v=!0),i+="."+O,d="%"+i+"%",Ip(kl,d))_=kl[d];else if(_!=null){if(!(O in _)){if(!r)throw new pu("base intrinsic for "+t+" exists, but the property is not available.");return}if(wl&&k+1>=n.length){var L=wl(_,O);A=!!L,A&&"get"in L&&!("originalValue"in L.get)?_=L.get:_=_[O]}else A=Ip(_,O),_=_[O];A&&!v&&(kl[d]=_)}}return _}});var FA=N((TCe,Cp)=>{"use strict";b();var tv=Tp(),yu=Bp(),PA=yu("%Function.prototype.apply%"),qA=yu("%Function.prototype.call%"),DA=yu("%Reflect.apply%",!0)||tv.call(qA,PA),CA=yu("%Object.getOwnPropertyDescriptor%",!0),Ml=yu("%Object.defineProperty%",!0),KZ=yu("%Math.max%");if(Ml)try{Ml({},"a",{value:1})}catch{Ml=null}Cp.exports=function(t){var r=DA(tv,qA,arguments);if(CA&&Ml){var n=CA(r,"length");n.configurable&&Ml(r,"length",{value:1+KZ(0,t.length-(arguments.length-1))})}return r};var UA=function(){return DA(tv,PA,arguments)};Ml?Ml(Cp.exports,"apply",{value:UA}):Cp.exports.apply=UA});var zA=N((NCe,GA)=>{"use strict";b();var LA=Bp(),KA=FA(),GZ=KA(LA("String.prototype.indexOf"));GA.exports=function(t,r){var n=LA(t,!!r);return typeof n=="function"&&GZ(t,".prototype.")>-1?KA(n):n}});var HA=N(()=>{b()});var u8=N((qCe,f8)=>{b();var cv=typeof Map=="function"&&Map.prototype,rv=Object.getOwnPropertyDescriptor&&cv?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pp=cv&&rv&&typeof rv.get=="function"?rv.get:null,VA=cv&&Map.prototype.forEach,hv=typeof Set=="function"&&Set.prototype,nv=Object.getOwnPropertyDescriptor&&hv?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,qp=hv&&nv&&typeof nv.get=="function"?nv.get:null,jA=hv&&Set.prototype.forEach,zZ=typeof WeakMap=="function"&&WeakMap.prototype,N0=zZ?WeakMap.prototype.has:null,HZ=typeof WeakSet=="function"&&WeakSet.prototype,B0=HZ?WeakSet.prototype.has:null,VZ=typeof WeakRef=="function"&&WeakRef.prototype,XA=VZ?WeakRef.prototype.deref:null,jZ=Boolean.