UNPKG

mqtt

Version:

A library for the MQTT protocol

2 lines 312 kB
var hs=Object.defineProperty;var Wg=Object.getOwnPropertyDescriptor;var $g=Object.getOwnPropertyNames;var Hg=Object.prototype.hasOwnProperty;var Ae=(t,e)=>()=>(t&&(e=t(t=0)),e);var O=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ir=(t,e)=>{for(var r in e)hs(t,r,{get:e[r],enumerable:!0})},Vg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $g(e))!Hg.call(t,n)&&n!==r&&hs(t,n,{get:()=>e[n],enumerable:!(i=Wg(e,n))||i.enumerable});return t};var Q=t=>Vg(hs({},"__esModule",{value:!0}),t);var _=Ae(()=>{});var R={};Ir(R,{_debugEnd:()=>cu,_debugProcess:()=>uu,_events:()=>Tu,_eventsCount:()=>Ru,_exiting:()=>Ha,_fatalExceptions:()=>su,_getActiveHandles:()=>Ga,_getActiveRequests:()=>Ka,_kill:()=>Ya,_linkedBinding:()=>Wa,_maxListeners:()=>Iu,_preload_modules:()=>Eu,_rawDebug:()=>ja,_startProfilerIdleNotifier:()=>fu,_stopProfilerIdleNotifier:()=>hu,_tickCallback:()=>au,abort:()=>bu,addListener:()=>Cu,allowedNodeEnvironmentFlags:()=>ru,arch:()=>Ra,argv:()=>ka,argv0:()=>vu,assert:()=>iu,binding:()=>La,chdir:()=>Na,config:()=>Va,cpuUsage:()=>Di,cwd:()=>Ua,debugPort:()=>mu,default:()=>Uu,dlopen:()=>za,domain:()=>$a,emit:()=>Ou,emitWarning:()=>Ma,env:()=>Pa,execArgv:()=>Ba,execPath:()=>_u,exit:()=>eu,features:()=>nu,hasUncaughtExceptionCaptureCallback:()=>lu,hrtime:()=>Ni,kill:()=>Za,listeners:()=>qu,memoryUsage:()=>Xa,moduleLoadList:()=>Fa,nextTick:()=>Aa,off:()=>ku,on:()=>gt,once:()=>Pu,openStdin:()=>tu,pid:()=>yu,platform:()=>Ca,ppid:()=>wu,prependListener:()=>Mu,prependOnceListener:()=>Lu,reallyExit:()=>Qa,release:()=>Da,removeAllListeners:()=>xu,removeListener:()=>Bu,resourceUsage:()=>Ja,setSourceMapsEnabled:()=>Su,setUncaughtExceptionCaptureCallback:()=>ou,stderr:()=>pu,stdin:()=>gu,stdout:()=>du,title:()=>Ta,umask:()=>qa,uptime:()=>Au,version:()=>xa,versions:()=>Oa});function gs(t){throw new Error("Node.js process "+t+" is not supported by JSPM core outside of Node.js")}function zg(){!Tr||!Gt||(Tr=!1,Gt.length?pt=Gt.concat(pt):Ui=-1,pt.length&&Sa())}function Sa(){if(!Tr){var t=setTimeout(zg,0);Tr=!0;for(var e=pt.length;e;){for(Gt=pt,pt=[];++Ui<e;)Gt&&Gt[Ui].run();Ui=-1,e=pt.length}Gt=null,Tr=!1,clearTimeout(t)}}function Aa(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];pt.push(new Ia(t,e)),pt.length===1&&!Tr&&setTimeout(Sa,0)}function Ia(t,e){this.fun=t,this.array=e}function _e(){}function Wa(t){gs("_linkedBinding")}function za(t){gs("dlopen")}function Ka(){return[]}function Ga(){return[]}function iu(t,e){if(!t)throw new Error(e||"assertion error")}function lu(){return!1}function Au(){return kt.now()/1e3}function Ni(t){var e=Math.floor((Date.now()-kt.now())*.001),r=kt.now()*.001,i=Math.floor(r)+e,n=Math.floor(r%1*1e9);return t&&(i=i-t[0],n=n-t[1],n<0&&(i--,n+=ps)),[i,n]}function gt(){return Uu}function qu(t){return[]}var pt,Tr,Gt,Ui,Ta,Ra,Ca,Pa,ka,Ba,xa,Oa,Ma,La,qa,Ua,Na,Da,ja,Fa,$a,Ha,Va,Qa,Ya,Di,Ja,Xa,Za,eu,tu,ru,nu,su,ou,au,uu,cu,fu,hu,du,pu,gu,bu,yu,wu,_u,mu,vu,Eu,Su,kt,ds,ps,Iu,Tu,Ru,Cu,Pu,ku,Bu,xu,Ou,Mu,Lu,Uu,Nu=Ae(()=>{_();v();m();pt=[],Tr=!1,Ui=-1;Ia.prototype.run=function(){this.fun.apply(null,this.array)};Ta="browser",Ra="x64",Ca="browser",Pa={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},ka=["/usr/bin/node"],Ba=[],xa="v16.8.0",Oa={},Ma=function(t,e){console.warn((e?e+": ":"")+t)},La=function(t){gs("binding")},qa=function(t){return 0},Ua=function(){return"/"},Na=function(t){},Da={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};ja=_e,Fa=[];$a={},Ha=!1,Va={};Qa=_e,Ya=_e,Di=function(){return{}},Ja=Di,Xa=Di,Za=_e,eu=_e,tu=_e,ru={};nu={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},su=_e,ou=_e;au=_e,uu=_e,cu=_e,fu=_e,hu=_e,du=void 0,pu=void 0,gu=void 0,bu=_e,yu=2,wu=1,_u="/bin/usr/node",mu=9229,vu="node",Eu=[],Su=_e,kt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};kt.now===void 0&&(ds=Date.now(),kt.timing&&kt.timing.navigationStart&&(ds=kt.timing.navigationStart),kt.now=()=>Date.now()-ds);ps=1e9;Ni.bigint=function(t){var e=Ni(t);return typeof BigInt>"u"?e[0]*ps+e[1]:BigInt(e[0]*ps)+BigInt(e[1])};Iu=10,Tu={},Ru=0;Cu=gt,Pu=gt,ku=gt,Bu=gt,xu=gt,Ou=_e,Mu=gt,Lu=gt;Uu={version:xa,versions:Oa,arch:Ra,platform:Ca,release:Da,_rawDebug:ja,moduleLoadList:Fa,binding:La,_linkedBinding:Wa,_events:Tu,_eventsCount:Ru,_maxListeners:Iu,on:gt,addListener:Cu,once:Pu,off:ku,removeListener:Bu,removeAllListeners:xu,emit:Ou,prependListener:Mu,prependOnceListener:Lu,listeners:qu,domain:$a,_exiting:Ha,config:Va,dlopen:za,uptime:Au,_getActiveRequests:Ka,_getActiveHandles:Ga,reallyExit:Qa,_kill:Ya,cpuUsage:Di,resourceUsage:Ja,memoryUsage:Xa,kill:Za,exit:eu,openStdin:tu,allowedNodeEnvironmentFlags:ru,assert:iu,features:nu,_fatalExceptions:su,setUncaughtExceptionCaptureCallback:ou,hasUncaughtExceptionCaptureCallback:lu,emitWarning:Ma,nextTick:Aa,_tickCallback:au,_debugProcess:uu,_debugEnd:cu,_startProfilerIdleNotifier:fu,_stopProfilerIdleNotifier:hu,stdout:du,stdin:gu,stderr:pu,abort:bu,umask:qa,chdir:Na,cwd:Ua,env:Pa,title:Ta,argv:ka,execArgv:Ba,pid:yu,ppid:wu,execPath:_u,debugPort:mu,hrtime:Ni,argv0:vu,_preload_modules:Eu,setSourceMapsEnabled:Su}});var m=Ae(()=>{Nu()});var ye={};Ir(ye,{Buffer:()=>x,INSPECT_MAX_BYTES:()=>Yg,default:()=>Bt,kMaxLength:()=>Jg});function Kg(){if(Du)return oi;Du=!0,oi.byteLength=l,oi.toByteArray=f,oi.fromByteArray=g;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)t[n]=i[n],e[i.charCodeAt(n)]=n;e[45]=62,e[95]=63;function s(b){var E=b.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=b.indexOf("=");w===-1&&(w=E);var S=w===E?0:4-w%4;return[w,S]}function l(b){var E=s(b),w=E[0],S=E[1];return(w+S)*3/4-S}function u(b,E,w){return(E+w)*3/4-w}function f(b){var E,w=s(b),S=w[0],I=w[1],C=new r(u(b,S,I)),k=0,M=I>0?S-4:S,q;for(q=0;q<M;q+=4)E=e[b.charCodeAt(q)]<<18|e[b.charCodeAt(q+1)]<<12|e[b.charCodeAt(q+2)]<<6|e[b.charCodeAt(q+3)],C[k++]=E>>16&255,C[k++]=E>>8&255,C[k++]=E&255;return I===2&&(E=e[b.charCodeAt(q)]<<2|e[b.charCodeAt(q+1)]>>4,C[k++]=E&255),I===1&&(E=e[b.charCodeAt(q)]<<10|e[b.charCodeAt(q+1)]<<4|e[b.charCodeAt(q+2)]>>2,C[k++]=E>>8&255,C[k++]=E&255),C}function d(b){return t[b>>18&63]+t[b>>12&63]+t[b>>6&63]+t[b&63]}function h(b,E,w){for(var S,I=[],C=E;C<w;C+=3)S=(b[C]<<16&16711680)+(b[C+1]<<8&65280)+(b[C+2]&255),I.push(d(S));return I.join("")}function g(b){for(var E,w=b.length,S=w%3,I=[],C=16383,k=0,M=w-S;k<M;k+=C)I.push(h(b,k,k+C>M?M:k+C));return S===1?(E=b[w-1],I.push(t[E>>2]+t[E<<4&63]+"==")):S===2&&(E=(b[w-2]<<8)+b[w-1],I.push(t[E>>10]+t[E>>4&63]+t[E<<2&63]+"=")),I.join("")}return oi}function Gg(){if(ju)return ji;ju=!0;return ji.read=function(t,e,r,i,n){var o,s,l=n*8-i-1,u=(1<<l)-1,f=u>>1,d=-7,h=r?n-1:0,g=r?-1:1,b=t[e+h];for(h+=g,o=b&(1<<-d)-1,b>>=-d,d+=l;d>0;o=o*256+t[e+h],h+=g,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=i;d>0;s=s*256+t[e+h],h+=g,d-=8);if(o===0)o=1-f;else{if(o===u)return s?NaN:(b?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-f}return(b?-1:1)*s*Math.pow(2,o-i)},ji.write=function(t,e,r,i,n,o){var s,l,u,f=o*8-n-1,d=(1<<f)-1,h=d>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=i?0:o-1,E=i?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,s=d):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+h>=1?e+=g/u:e+=g*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=d?(l=0,s=d):s+h>=1?(l=(e*u-1)*Math.pow(2,n),s=s+h):(l=e*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;t[r+b]=l&255,b+=E,l/=256,n-=8);for(s=s<<n|l,f+=n;f>0;t[r+b]=s&255,b+=E,s/=256,f-=8);t[r+b-E]|=w*128},ji}function Qg(){if(Fu)return Qt;Fu=!0;let t=Kg(),e=Gg(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Qt.Buffer=s,Qt.SlowBuffer=I,Qt.INSPECT_MAX_BYTES=50;let i=2147483647;Qt.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=n(),!s.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 n(){try{let p=new Uint8Array(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,Uint8Array.prototype),Object.setPrototypeOf(p,a),p.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');let a=new Uint8Array(p);return Object.setPrototypeOf(a,s.prototype),a}function s(p,a,c){if(typeof p=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(p)}return l(p,a,c)}s.poolSize=8192;function l(p,a,c){if(typeof p=="string")return h(p,a);if(ArrayBuffer.isView(p))return b(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(Ge(p,ArrayBuffer)||p&&Ge(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ge(p,SharedArrayBuffer)||p&&Ge(p.buffer,SharedArrayBuffer)))return E(p,a,c);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let y=p.valueOf&&p.valueOf();if(y!=null&&y!==p)return s.from(y,a,c);let A=w(p);if(A)return A;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return s.from(p[Symbol.toPrimitive]("string"),a,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}s.from=function(p,a,c){return l(p,a,c)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function f(p,a,c){return u(p),p<=0?o(p):a!==void 0?typeof c=="string"?o(p).fill(a,c):o(p).fill(a):o(p)}s.alloc=function(p,a,c){return f(p,a,c)};function d(p){return u(p),o(p<0?0:S(p)|0)}s.allocUnsafe=function(p){return d(p)},s.allocUnsafeSlow=function(p){return d(p)};function h(p,a){if((typeof a!="string"||a==="")&&(a="utf8"),!s.isEncoding(a))throw new TypeError("Unknown encoding: "+a);let c=C(p,a)|0,y=o(c),A=y.write(p,a);return A!==c&&(y=y.slice(0,A)),y}function g(p){let a=p.length<0?0:S(p.length)|0,c=o(a);for(let y=0;y<a;y+=1)c[y]=p[y]&255;return c}function b(p){if(Ge(p,Uint8Array)){let a=new Uint8Array(p);return E(a.buffer,a.byteOffset,a.byteLength)}return g(p)}function E(p,a,c){if(a<0||p.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<a+(c||0))throw new RangeError('"length" is outside of buffer bounds');let y;return a===void 0&&c===void 0?y=new Uint8Array(p):c===void 0?y=new Uint8Array(p,a):y=new Uint8Array(p,a,c),Object.setPrototypeOf(y,s.prototype),y}function w(p){if(s.isBuffer(p)){let a=S(p.length)|0,c=o(a);return c.length===0||p.copy(c,0,0,a),c}if(p.length!==void 0)return typeof p.length!="number"||fs(p.length)?o(0):g(p);if(p.type==="Buffer"&&Array.isArray(p.data))return g(p.data)}function S(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function I(p){return+p!=p&&(p=0),s.alloc(+p)}s.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==s.prototype},s.compare=function(a,c){if(Ge(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),Ge(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(a)||!s.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===c)return 0;let y=a.length,A=c.length;for(let T=0,P=Math.min(y,A);T<P;++T)if(a[T]!==c[T]){y=a[T],A=c[T];break}return y<A?-1:A<y?1:0},s.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}},s.concat=function(a,c){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return s.alloc(0);let y;if(c===void 0)for(c=0,y=0;y<a.length;++y)c+=a[y].length;let A=s.allocUnsafe(c),T=0;for(y=0;y<a.length;++y){let P=a[y];if(Ge(P,Uint8Array))T+P.length>A.length?(s.isBuffer(P)||(P=s.from(P)),P.copy(A,T)):Uint8Array.prototype.set.call(A,P,T);else if(s.isBuffer(P))P.copy(A,T);else throw new TypeError('"list" argument must be an Array of Buffers');T+=P.length}return A};function C(p,a){if(s.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Ge(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);let c=p.length,y=arguments.length>2&&arguments[2]===!0;if(!y&&c===0)return 0;let A=!1;for(;;)switch(a){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return cs(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return Ea(p).length;default:if(A)return y?-1:cs(p).length;a=(""+a).toLowerCase(),A=!0}}s.byteLength=C;function k(p,a,c){let y=!1;if((a===void 0||a<0)&&(a=0),a>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,a>>>=0,c<=a))return"";for(p||(p="utf8");;)switch(p){case"hex":return Og(this,a,c);case"utf8":case"utf-8":return Se(this,a,c);case"ascii":return as(this,a,c);case"latin1":case"binary":return xg(this,a,c);case"base64":return Fe(this,a,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mg(this,a,c);default:if(y)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),y=!0}}s.prototype._isBuffer=!0;function M(p,a,c){let y=p[a];p[a]=p[c],p[c]=y}s.prototype.swap16=function(){let a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let c=0;c<a;c+=2)M(this,c,c+1);return this},s.prototype.swap32=function(){let a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let c=0;c<a;c+=4)M(this,c,c+3),M(this,c+1,c+2);return this},s.prototype.swap64=function(){let a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let c=0;c<a;c+=8)M(this,c,c+7),M(this,c+1,c+6),M(this,c+2,c+5),M(this,c+3,c+4);return this},s.prototype.toString=function(){let a=this.length;return a===0?"":arguments.length===0?Se(this,0,a):k.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(a){if(!s.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:s.compare(this,a)===0},s.prototype.inspect=function(){let a="",c=Qt.INSPECT_MAX_BYTES;return a=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(a+=" ... "),"<Buffer "+a+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(a,c,y,A,T){if(Ge(a,Uint8Array)&&(a=s.from(a,a.offset,a.byteLength)),!s.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof a);if(c===void 0&&(c=0),y===void 0&&(y=a?a.length:0),A===void 0&&(A=0),T===void 0&&(T=this.length),c<0||y>a.length||A<0||T>this.length)throw new RangeError("out of range index");if(A>=T&&c>=y)return 0;if(A>=T)return-1;if(c>=y)return 1;if(c>>>=0,y>>>=0,A>>>=0,T>>>=0,this===a)return 0;let P=T-A,W=y-c,le=Math.min(P,W),re=this.slice(A,T),ae=a.slice(c,y);for(let J=0;J<le;++J)if(re[J]!==ae[J]){P=re[J],W=ae[J];break}return P<W?-1:W<P?1:0};function q(p,a,c,y,A){if(p.length===0)return-1;if(typeof c=="string"?(y=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,fs(c)&&(c=A?0:p.length-1),c<0&&(c=p.length+c),c>=p.length){if(A)return-1;c=p.length-1}else if(c<0)if(A)c=0;else return-1;if(typeof a=="string"&&(a=s.from(a,y)),s.isBuffer(a))return a.length===0?-1:G(p,a,c,y,A);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?A?Uint8Array.prototype.indexOf.call(p,a,c):Uint8Array.prototype.lastIndexOf.call(p,a,c):G(p,[a],c,y,A);throw new TypeError("val must be string, number or Buffer")}function G(p,a,c,y,A){let T=1,P=p.length,W=a.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(p.length<2||a.length<2)return-1;T=2,P/=2,W/=2,c/=2}function le(ae,J){return T===1?ae[J]:ae.readUInt16BE(J*T)}let re;if(A){let ae=-1;for(re=c;re<P;re++)if(le(p,re)===le(a,ae===-1?0:re-ae)){if(ae===-1&&(ae=re),re-ae+1===W)return ae*T}else ae!==-1&&(re-=re-ae),ae=-1}else for(c+W>P&&(c=P-W),re=c;re>=0;re--){let ae=!0;for(let J=0;J<W;J++)if(le(p,re+J)!==le(a,J)){ae=!1;break}if(ae)return re}return-1}s.prototype.includes=function(a,c,y){return this.indexOf(a,c,y)!==-1},s.prototype.indexOf=function(a,c,y){return q(this,a,c,y,!0)},s.prototype.lastIndexOf=function(a,c,y){return q(this,a,c,y,!1)};function F(p,a,c,y){c=Number(c)||0;let A=p.length-c;y?(y=Number(y),y>A&&(y=A)):y=A;let T=a.length;y>T/2&&(y=T/2);let P;for(P=0;P<y;++P){let W=parseInt(a.substr(P*2,2),16);if(fs(W))return P;p[c+P]=W}return P}function K(p,a,c,y){return qi(cs(a,p.length-c),p,c,y)}function $(p,a,c,y){return qi(Ng(a),p,c,y)}function te(p,a,c,y){return qi(Ea(a),p,c,y)}function dt(p,a,c,y){return qi(Dg(a,p.length-c),p,c,y)}s.prototype.write=function(a,c,y,A){if(c===void 0)A="utf8",y=this.length,c=0;else if(y===void 0&&typeof c=="string")A=c,y=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(y)?(y=y>>>0,A===void 0&&(A="utf8")):(A=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let T=this.length-c;if((y===void 0||y>T)&&(y=T),a.length>0&&(y<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");let P=!1;for(;;)switch(A){case"hex":return F(this,a,c,y);case"utf8":case"utf-8":return K(this,a,c,y);case"ascii":case"latin1":case"binary":return $(this,a,c,y);case"base64":return te(this,a,c,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(this,a,c,y);default:if(P)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),P=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Fe(p,a,c){return a===0&&c===p.length?t.fromByteArray(p):t.fromByteArray(p.slice(a,c))}function Se(p,a,c){c=Math.min(p.length,c);let y=[],A=a;for(;A<c;){let T=p[A],P=null,W=T>239?4:T>223?3:T>191?2:1;if(A+W<=c){let le,re,ae,J;switch(W){case 1:T<128&&(P=T);break;case 2:le=p[A+1],(le&192)===128&&(J=(T&31)<<6|le&63,J>127&&(P=J));break;case 3:le=p[A+1],re=p[A+2],(le&192)===128&&(re&192)===128&&(J=(T&15)<<12|(le&63)<<6|re&63,J>2047&&(J<55296||J>57343)&&(P=J));break;case 4:le=p[A+1],re=p[A+2],ae=p[A+3],(le&192)===128&&(re&192)===128&&(ae&192)===128&&(J=(T&15)<<18|(le&63)<<12|(re&63)<<6|ae&63,J>65535&&J<1114112&&(P=J))}}P===null?(P=65533,W=1):P>65535&&(P-=65536,y.push(P>>>10&1023|55296),P=56320|P&1023),y.push(P),A+=W}return Er(y)}let vr=4096;function Er(p){let a=p.length;if(a<=vr)return String.fromCharCode.apply(String,p);let c="",y=0;for(;y<a;)c+=String.fromCharCode.apply(String,p.slice(y,y+=vr));return c}function as(p,a,c){let y="";c=Math.min(p.length,c);for(let A=a;A<c;++A)y+=String.fromCharCode(p[A]&127);return y}function xg(p,a,c){let y="";c=Math.min(p.length,c);for(let A=a;A<c;++A)y+=String.fromCharCode(p[A]);return y}function Og(p,a,c){let y=p.length;(!a||a<0)&&(a=0),(!c||c<0||c>y)&&(c=y);let A="";for(let T=a;T<c;++T)A+=jg[p[T]];return A}function Mg(p,a,c){let y=p.slice(a,c),A="";for(let T=0;T<y.length-1;T+=2)A+=String.fromCharCode(y[T]+y[T+1]*256);return A}s.prototype.slice=function(a,c){let y=this.length;a=~~a,c=c===void 0?y:~~c,a<0?(a+=y,a<0&&(a=0)):a>y&&(a=y),c<0?(c+=y,c<0&&(c=0)):c>y&&(c=y),c<a&&(c=a);let A=this.subarray(a,c);return Object.setPrototypeOf(A,s.prototype),A};function be(p,a,c){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+a>c)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(a,c,y){a=a>>>0,c=c>>>0,y||be(a,c,this.length);let A=this[a],T=1,P=0;for(;++P<c&&(T*=256);)A+=this[a+P]*T;return A},s.prototype.readUintBE=s.prototype.readUIntBE=function(a,c,y){a=a>>>0,c=c>>>0,y||be(a,c,this.length);let A=this[a+--c],T=1;for(;c>0&&(T*=256);)A+=this[a+--c]*T;return A},s.prototype.readUint8=s.prototype.readUInt8=function(a,c){return a=a>>>0,c||be(a,1,this.length),this[a]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(a,c){return a=a>>>0,c||be(a,2,this.length),this[a]|this[a+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(a,c){return a=a>>>0,c||be(a,2,this.length),this[a]<<8|this[a+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(a,c){return a=a>>>0,c||be(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(a,c){return a=a>>>0,c||be(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},s.prototype.readBigUInt64LE=Pt(function(a){a=a>>>0,Ar(a,"offset");let c=this[a],y=this[a+7];(c===void 0||y===void 0)&&si(a,this.length-8);let A=c+this[++a]*2**8+this[++a]*2**16+this[++a]*2**24,T=this[++a]+this[++a]*2**8+this[++a]*2**16+y*2**24;return BigInt(A)+(BigInt(T)<<BigInt(32))}),s.prototype.readBigUInt64BE=Pt(function(a){a=a>>>0,Ar(a,"offset");let c=this[a],y=this[a+7];(c===void 0||y===void 0)&&si(a,this.length-8);let A=c*2**24+this[++a]*2**16+this[++a]*2**8+this[++a],T=this[++a]*2**24+this[++a]*2**16+this[++a]*2**8+y;return(BigInt(A)<<BigInt(32))+BigInt(T)}),s.prototype.readIntLE=function(a,c,y){a=a>>>0,c=c>>>0,y||be(a,c,this.length);let A=this[a],T=1,P=0;for(;++P<c&&(T*=256);)A+=this[a+P]*T;return T*=128,A>=T&&(A-=Math.pow(2,8*c)),A},s.prototype.readIntBE=function(a,c,y){a=a>>>0,c=c>>>0,y||be(a,c,this.length);let A=c,T=1,P=this[a+--A];for(;A>0&&(T*=256);)P+=this[a+--A]*T;return T*=128,P>=T&&(P-=Math.pow(2,8*c)),P},s.prototype.readInt8=function(a,c){return a=a>>>0,c||be(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},s.prototype.readInt16LE=function(a,c){a=a>>>0,c||be(a,2,this.length);let y=this[a]|this[a+1]<<8;return y&32768?y|4294901760:y},s.prototype.readInt16BE=function(a,c){a=a>>>0,c||be(a,2,this.length);let y=this[a+1]|this[a]<<8;return y&32768?y|4294901760:y},s.prototype.readInt32LE=function(a,c){return a=a>>>0,c||be(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},s.prototype.readInt32BE=function(a,c){return a=a>>>0,c||be(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},s.prototype.readBigInt64LE=Pt(function(a){a=a>>>0,Ar(a,"offset");let c=this[a],y=this[a+7];(c===void 0||y===void 0)&&si(a,this.length-8);let A=this[a+4]+this[a+5]*2**8+this[a+6]*2**16+(y<<24);return(BigInt(A)<<BigInt(32))+BigInt(c+this[++a]*2**8+this[++a]*2**16+this[++a]*2**24)}),s.prototype.readBigInt64BE=Pt(function(a){a=a>>>0,Ar(a,"offset");let c=this[a],y=this[a+7];(c===void 0||y===void 0)&&si(a,this.length-8);let A=(c<<24)+this[++a]*2**16+this[++a]*2**8+this[++a];return(BigInt(A)<<BigInt(32))+BigInt(this[++a]*2**24+this[++a]*2**16+this[++a]*2**8+y)}),s.prototype.readFloatLE=function(a,c){return a=a>>>0,c||be(a,4,this.length),e.read(this,a,!0,23,4)},s.prototype.readFloatBE=function(a,c){return a=a>>>0,c||be(a,4,this.length),e.read(this,a,!1,23,4)},s.prototype.readDoubleLE=function(a,c){return a=a>>>0,c||be(a,8,this.length),e.read(this,a,!0,52,8)},s.prototype.readDoubleBE=function(a,c){return a=a>>>0,c||be(a,8,this.length),e.read(this,a,!1,52,8)};function Ce(p,a,c,y,A,T){if(!s.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>A||a<T)throw new RangeError('"value" argument is out of bounds');if(c+y>p.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(a,c,y,A){if(a=+a,c=c>>>0,y=y>>>0,!A){let W=Math.pow(2,8*y)-1;Ce(this,a,c,y,W,0)}let T=1,P=0;for(this[c]=a&255;++P<y&&(T*=256);)this[c+P]=a/T&255;return c+y},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(a,c,y,A){if(a=+a,c=c>>>0,y=y>>>0,!A){let W=Math.pow(2,8*y)-1;Ce(this,a,c,y,W,0)}let T=y-1,P=1;for(this[c+T]=a&255;--T>=0&&(P*=256);)this[c+T]=a/P&255;return c+y},s.prototype.writeUint8=s.prototype.writeUInt8=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,1,255,0),this[c]=a&255,c+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,2,65535,0),this[c]=a&255,this[c+1]=a>>>8,c+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,2,65535,0),this[c]=a>>>8,this[c+1]=a&255,c+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,4,4294967295,0),this[c+3]=a>>>24,this[c+2]=a>>>16,this[c+1]=a>>>8,this[c]=a&255,c+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,4,4294967295,0),this[c]=a>>>24,this[c+1]=a>>>16,this[c+2]=a>>>8,this[c+3]=a&255,c+4};function ga(p,a,c,y,A){va(a,y,A,p,c,7);let T=Number(a&BigInt(4294967295));p[c++]=T,T=T>>8,p[c++]=T,T=T>>8,p[c++]=T,T=T>>8,p[c++]=T;let P=Number(a>>BigInt(32)&BigInt(4294967295));return p[c++]=P,P=P>>8,p[c++]=P,P=P>>8,p[c++]=P,P=P>>8,p[c++]=P,c}function ba(p,a,c,y,A){va(a,y,A,p,c,7);let T=Number(a&BigInt(4294967295));p[c+7]=T,T=T>>8,p[c+6]=T,T=T>>8,p[c+5]=T,T=T>>8,p[c+4]=T;let P=Number(a>>BigInt(32)&BigInt(4294967295));return p[c+3]=P,P=P>>8,p[c+2]=P,P=P>>8,p[c+1]=P,P=P>>8,p[c]=P,c+8}s.prototype.writeBigUInt64LE=Pt(function(a,c=0){return ga(this,a,c,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Pt(function(a,c=0){return ba(this,a,c,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(a,c,y,A){if(a=+a,c=c>>>0,!A){let le=Math.pow(2,8*y-1);Ce(this,a,c,y,le-1,-le)}let T=0,P=1,W=0;for(this[c]=a&255;++T<y&&(P*=256);)a<0&&W===0&&this[c+T-1]!==0&&(W=1),this[c+T]=(a/P>>0)-W&255;return c+y},s.prototype.writeIntBE=function(a,c,y,A){if(a=+a,c=c>>>0,!A){let le=Math.pow(2,8*y-1);Ce(this,a,c,y,le-1,-le)}let T=y-1,P=1,W=0;for(this[c+T]=a&255;--T>=0&&(P*=256);)a<0&&W===0&&this[c+T+1]!==0&&(W=1),this[c+T]=(a/P>>0)-W&255;return c+y},s.prototype.writeInt8=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,1,127,-128),a<0&&(a=255+a+1),this[c]=a&255,c+1},s.prototype.writeInt16LE=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,2,32767,-32768),this[c]=a&255,this[c+1]=a>>>8,c+2},s.prototype.writeInt16BE=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,2,32767,-32768),this[c]=a>>>8,this[c+1]=a&255,c+2},s.prototype.writeInt32LE=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,4,2147483647,-2147483648),this[c]=a&255,this[c+1]=a>>>8,this[c+2]=a>>>16,this[c+3]=a>>>24,c+4},s.prototype.writeInt32BE=function(a,c,y){return a=+a,c=c>>>0,y||Ce(this,a,c,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[c]=a>>>24,this[c+1]=a>>>16,this[c+2]=a>>>8,this[c+3]=a&255,c+4},s.prototype.writeBigInt64LE=Pt(function(a,c=0){return ga(this,a,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Pt(function(a,c=0){return ba(this,a,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ya(p,a,c,y,A,T){if(c+y>p.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function wa(p,a,c,y,A){return a=+a,c=c>>>0,A||ya(p,a,c,4),e.write(p,a,c,y,23,4),c+4}s.prototype.writeFloatLE=function(a,c,y){return wa(this,a,c,!0,y)},s.prototype.writeFloatBE=function(a,c,y){return wa(this,a,c,!1,y)};function _a(p,a,c,y,A){return a=+a,c=c>>>0,A||ya(p,a,c,8),e.write(p,a,c,y,52,8),c+8}s.prototype.writeDoubleLE=function(a,c,y){return _a(this,a,c,!0,y)},s.prototype.writeDoubleBE=function(a,c,y){return _a(this,a,c,!1,y)},s.prototype.copy=function(a,c,y,A){if(!s.isBuffer(a))throw new TypeError("argument should be a Buffer");if(y||(y=0),!A&&A!==0&&(A=this.length),c>=a.length&&(c=a.length),c||(c=0),A>0&&A<y&&(A=y),A===y||a.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),a.length-c<A-y&&(A=a.length-c+y);let T=A-y;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,y,A):Uint8Array.prototype.set.call(a,this.subarray(y,A),c),T},s.prototype.fill=function(a,c,y,A){if(typeof a=="string"){if(typeof c=="string"?(A=c,c=0,y=this.length):typeof y=="string"&&(A=y,y=this.length),A!==void 0&&typeof A!="string")throw new TypeError("encoding must be a string");if(typeof A=="string"&&!s.isEncoding(A))throw new TypeError("Unknown encoding: "+A);if(a.length===1){let P=a.charCodeAt(0);(A==="utf8"&&P<128||A==="latin1")&&(a=P)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(c<0||this.length<c||this.length<y)throw new RangeError("Out of range index");if(y<=c)return this;c=c>>>0,y=y===void 0?this.length:y>>>0,a||(a=0);let T;if(typeof a=="number")for(T=c;T<y;++T)this[T]=a;else{let P=s.isBuffer(a)?a:s.from(a,A),W=P.length;if(W===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(T=0;T<y-c;++T)this[T+c]=P[T%W]}return this};let Sr={};function us(p,a,c){Sr[p]=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:a.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(A){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:A,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}us("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),us("ERR_INVALID_ARG_TYPE",function(p,a){return`The "${p}" argument must be of type number. Received type ${typeof a}`},TypeError),us("ERR_OUT_OF_RANGE",function(p,a,c){let y=`The value of "${p}" is out of range.`,A=c;return Number.isInteger(c)&&Math.abs(c)>2**32?A=ma(String(c)):typeof c=="bigint"&&(A=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(A=ma(A)),A+="n"),y+=` It must be ${a}. Received ${A}`,y},RangeError);function ma(p){let a="",c=p.length,y=p[0]==="-"?1:0;for(;c>=y+4;c-=3)a=`_${p.slice(c-3,c)}${a}`;return`${p.slice(0,c)}${a}`}function Lg(p,a,c){Ar(a,"offset"),(p[a]===void 0||p[a+c]===void 0)&&si(a,p.length-(c+1))}function va(p,a,c,y,A,T){if(p>c||p<a){let P=typeof a=="bigint"?"n":"",W;throw T>3?a===0||a===BigInt(0)?W=`>= 0${P} and < 2${P} ** ${(T+1)*8}${P}`:W=`>= -(2${P} ** ${(T+1)*8-1}${P}) and < 2 ** ${(T+1)*8-1}${P}`:W=`>= ${a}${P} and <= ${c}${P}`,new Sr.ERR_OUT_OF_RANGE("value",W,p)}Lg(y,A,T)}function Ar(p,a){if(typeof p!="number")throw new Sr.ERR_INVALID_ARG_TYPE(a,"number",p)}function si(p,a,c){throw Math.floor(p)!==p?(Ar(p,c),new Sr.ERR_OUT_OF_RANGE(c||"offset","an integer",p)):a<0?new Sr.ERR_BUFFER_OUT_OF_BOUNDS:new Sr.ERR_OUT_OF_RANGE(c||"offset",`>= ${c?1:0} and <= ${a}`,p)}let qg=/[^+/0-9A-Za-z-_]/g;function Ug(p){if(p=p.split("=")[0],p=p.trim().replace(qg,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function cs(p,a){a=a||1/0;let c,y=p.length,A=null,T=[];for(let P=0;P<y;++P){if(c=p.charCodeAt(P),c>55295&&c<57344){if(!A){if(c>56319){(a-=3)>-1&&T.push(239,191,189);continue}else if(P+1===y){(a-=3)>-1&&T.push(239,191,189);continue}A=c;continue}if(c<56320){(a-=3)>-1&&T.push(239,191,189),A=c;continue}c=(A-55296<<10|c-56320)+65536}else A&&(a-=3)>-1&&T.push(239,191,189);if(A=null,c<128){if((a-=1)<0)break;T.push(c)}else if(c<2048){if((a-=2)<0)break;T.push(c>>6|192,c&63|128)}else if(c<65536){if((a-=3)<0)break;T.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((a-=4)<0)break;T.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return T}function Ng(p){let a=[];for(let c=0;c<p.length;++c)a.push(p.charCodeAt(c)&255);return a}function Dg(p,a){let c,y,A,T=[];for(let P=0;P<p.length&&!((a-=2)<0);++P)c=p.charCodeAt(P),y=c>>8,A=c%256,T.push(A),T.push(y);return T}function Ea(p){return t.toByteArray(Ug(p))}function qi(p,a,c,y){let A;for(A=0;A<y&&!(A+c>=a.length||A>=p.length);++A)a[A+c]=p[A];return A}function Ge(p,a){return p instanceof a||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===a.name}function fs(p){return p!==p}let jg=function(){let p="0123456789abcdef",a=new Array(256);for(let c=0;c<16;++c){let y=c*16;for(let A=0;A<16;++A)a[y+A]=p[c]+p[A]}return a}();function Pt(p){return typeof BigInt>"u"?Fg:p}function Fg(){throw new Error("BigInt not supported")}return Qt}var oi,Du,ji,ju,Qt,Fu,Bt,x,Yg,Jg,he=Ae(()=>{_();v();m();oi={},Du=!1;ji={},ju=!1;Qt={},Fu=!1;Bt=Qg();Bt.Buffer;Bt.SlowBuffer;Bt.INSPECT_MAX_BYTES;Bt.kMaxLength;x=Bt.Buffer,Yg=Bt.INSPECT_MAX_BYTES,Jg=Bt.kMaxLength});var v=Ae(()=>{he()});var Wu=O(ys=>{"use strict";_();v();m();Object.defineProperty(ys,"__esModule",{value:!0});var bs=class{constructor(e){this.aliasToTopic={},this.max=e}put(e,r){return r===0||r>this.max?!1:(this.aliasToTopic[r]=e,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(e){return this.aliasToTopic[e]}clear(){this.aliasToTopic={}}};ys.default=bs});var ie=O((VA,$u)=>{"use strict";_();v();m();var ws=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r="";for(let i=0;i<e.length;i++)r+=` ${e[i].stack} `;super(r),this.name="AggregateError",this.errors=e}};$u.exports={AggregateError:ws,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var _s=O((tI,Hu)=>{"use strict";_();v();m();Hu.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,i]){let n=e.shift();return i==="f"?n.toFixed(6):i==="j"?JSON.stringify(n):i==="s"&&typeof n=="object"?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var me=O((fI,Ku)=>{"use strict";_();v();m();var{format:Xg,inspect:Fi}=_s(),{AggregateError:Zg}=ie(),eb=globalThis.AggregateError||Zg,tb=Symbol("kIsNodeError"),rb=["string","function","number","object","Function","Object","boolean","bigint","symbol"],ib=/^([A-Z][a-z0-9]*)+$/,nb="__node_internal_",Wi={};function Yt(t,e){if(!t)throw new Wi.ERR_INTERNAL_ASSERTION(e)}function Vu(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function sb(t,e,r){if(typeof e=="function")return Yt(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let i=(e.match(/%[dfijoOs]/g)||[]).length;return Yt(i===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),r.length===0?e:Xg(e,...r)}function we(t,e,r){r||(r=Error);class i extends r{constructor(...o){super(sb(t,e,o))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=t,i.prototype[tb]=!0,Wi[t]=i}function zu(t){let e=nb+t.name;return Object.defineProperty(t,"name",{value:e}),t}function ob(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new eb([e,t],e.message);return r.code=e.code,r}return t||e}var ms=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Wi.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};we("ERR_ASSERTION","%s",Error);we("ERR_INVALID_ARG_TYPE",(t,e,r)=>{Yt(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let i="The ";t.endsWith(" argument")?i+=`${t} `:i+=`"${t}" ${t.includes(".")?"property":"argument"} `,i+="must be ";let n=[],o=[],s=[];for(let u of e)Yt(typeof u=="string","All expected entries have to be of type string"),rb.includes(u)?n.push(u.toLowerCase()):ib.test(u)?o.push(u):(Yt(u!=="object",'The value "object" should be written as "Object"'),s.push(u));if(o.length>0){let u=n.indexOf("object");u!==-1&&(n.splice(n,u,1),o.push("Object"))}if(n.length>0){switch(n.length){case 1:i+=`of type ${n[0]}`;break;case 2:i+=`one of type ${n[0]} or ${n[1]}`;break;default:{let u=n.pop();i+=`one of type ${n.join(", ")}, or ${u}`}}(o.length>0||s.length>0)&&(i+=" or ")}if(o.length>0){switch(o.length){case 1:i+=`an instance of ${o[0]}`;break;case 2:i+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let u=o.pop();i+=`an instance of ${o.join(", ")}, or ${u}`}}s.length>0&&(i+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(i+="an "),i+=`${s[0]}`;break;case 2:i+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();i+=`one of ${s.join(", ")}, or ${u}`}}if(r==null)i+=`. Received ${r}`;else if(typeof r=="function"&&r.name)i+=`. Received function ${r.name}`;else if(typeof r=="object"){var l;if((l=r.constructor)!==null&&l!==void 0&&l.name)i+=`. Received an instance of ${r.constructor.name}`;else{let u=Fi(r,{depth:-1});i+=`. Received ${u}`}}else{let u=Fi(r,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),i+=`. Received type ${typeof r} (${u})`}return i},TypeError);we("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let i=Fi(e);return i.length>128&&(i=i.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${i}`},TypeError);we("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var i;let n=r!=null&&(i=r.constructor)!==null&&i!==void 0&&i.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${n}.`},TypeError);we("ERR_MISSING_ARGS",(...t)=>{Yt(t.length>0,"At least one arg needs to be specified");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(i=>`"${i}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let i=t.pop();e+=`The ${t.join(", ")}, and ${i} arguments`}break}return`${e} must be specified`},TypeError);we("ERR_OUT_OF_RANGE",(t,e,r)=>{Yt(e,'Missing "range" argument');let i;if(Number.isInteger(r)&&Math.abs(r)>2**32)i=Vu(String(r));else if(typeof r=="bigint"){i=String(r);let n=BigInt(2)**BigInt(32);(r>n||r<-n)&&(i=Vu(i)),i+="n"}else i=Fi(r);return`The value of "${t}" is out of range. It must be ${e}. Received ${i}`},RangeError);we("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);we("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);we("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);we("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);we("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);we("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);we("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);we("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);we("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);we("ERR_STREAM_WRITE_AFTER_END","write after end",Error);we("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);Ku.exports={AbortError:ms,aggregateTwoErrors:zu(ob),hideStackFrames:zu,codes:Wi}});var Rr=O((vI,$i)=>{"use strict";_();v();m();var{AbortController:Gu,AbortSignal:lb}=typeof self<"u"?self:typeof window<"u"?window:void 0;$i.exports=Gu;$i.exports.AbortSignal=lb;$i.exports.default=Gu});function Y(){Y.init.call(this)}function Hi(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function nc(t){return t._maxListeners===void 0?Y.defaultMaxListeners:t._maxListeners}function Xu(t,e,r,i){var n,o,s,l;if(Hi(r),(o=t._events)===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),s===void 0)s=o[e]=r,++t._eventsCount;else if(typeof s=="function"?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=nc(t))>0&&s.length>n&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}return t}function ab(){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 Zu(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=ab.bind(i);return n.listener=r,i.wrapFn=n,n}function ec(t,e,r){var i=t._events;if(i===void 0)return[];var n=i[e];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?function(o){for(var s=new Array(o.length),l=0;l<s.length;++l)s[l]=o[l].listener||o[l];return s}(n):sc(n,n.length)}function tc(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}function sc(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}var rc,ic,Cr,Qu,Yu,Ju,Pe,vs=Ae(()=>{_();v();m();Cr=typeof Reflect=="object"?Reflect:null,Qu=Cr&&typeof Cr.apply=="function"?Cr.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};ic=Cr&&typeof Cr.ownKeys=="function"?Cr.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};Yu=Number.isNaN||function(t){return t!=t};rc=Y,Y.EventEmitter=Y,Y.prototype._events=void 0,Y.prototype._eventsCount=0,Y.prototype._maxListeners=void 0;Ju=10;Object.defineProperty(Y,"defaultMaxListeners",{enumerable:!0,get:function(){return Ju},set:function(t){if(typeof t!="number"||t<0||Yu(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Ju=t}}),Y.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},Y.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Yu(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},Y.prototype.getMaxListeners=function(){return nc(this)},Y.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i=t==="error",n=this._events;if(n!==void 0)i=i&&n.error===void 0;else if(!i)return!1;if(i){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=n[t];if(l===void 0)return!1;if(typeof l=="function")Qu(l,this,e);else{var u=l.length,f=sc(l,u);for(r=0;r<u;++r)Qu(f[r],this,e)}return!0},Y.prototype.addListener=function(t,e){return Xu(this,t,e,!1)},Y.prototype.on=Y.prototype.addListener,Y.prototype.prependListener=function(t,e){return Xu(this,t,e,!0)},Y.prototype.once=function(t,e){return Hi(e),this.on(t,Zu(this,t,e)),this},Y.prototype.prependOnceListener=function(t,e){return Hi(e),this.prependListener(t,Zu(this,t,e)),this},Y.prototype.removeListener=function(t,e){var r,i,n,o,s;if(Hi(e),(i=this._events)===void 0)return this;if((r=i[t])===void 0)return this;if(r===e||r.listener===e)--this._eventsCount==0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():function(l,u){for(;u+1<l.length;u++)l[u]=l[u+1];l.pop()}(r,n),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||e)}return this},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(t){var e,r,i;if((r=this._events)===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var n,o=Object.keys(r);for(i=0;i<o.length;++i)(n=o[i])!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(e=r[t])=="function")this.removeListener(t,e);else if(e!==void 0)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},Y.prototype.listeners=function(t){return ec(this,t,!0)},Y.prototype.rawListeners=function(t){return ec(this,t,!1)},Y.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):tc.call(t,e)},Y.prototype.listenerCount=tc,Y.prototype.eventNames=function(){return this._eventsCount>0?ic(this._events):[]};Pe=rc;Pe.EventEmitter;Pe.defaultMaxListeners;Pe.init;Pe.listenerCount;Pe.EventEmitter;Pe.defaultMaxListeners;Pe.init;Pe.listenerCount});var xt={};Ir(xt,{EventEmitter:()=>ub,default:()=>Pe,defaultMaxListeners:()=>cb,init:()=>fb,listenerCount:()=>hb,on:()=>db,once:()=>pb});var ub,cb,fb,hb,db,pb,Ot=Ae(()=>{_();v();m();vs();vs();Pe.once=function(t,e){return new Promise((r,i)=>{function n(...s){o!==void 0&&t.removeListener("error",o),r(s)}let o;e!=="error"&&(o=s=>{t.removeListener(name,n),i(s)},t.once("error",o)),t.once(e,n)})};Pe.on=function(t,e){let r=[],i=[],n=null,o=!1,s={async next(){let f=r.shift();if(f)return createIterResult(f,!1);if(n){let d=Promise.reject(n);return n=null,d}return o?createIterResult(void 0,!0):new Promise((d,h)=>i.push({resolve:d,reject:h}))},async return(){t.removeListener(e,l),t.removeListener("error",u),o=!0;for(let f of i)f.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(f){n=f,t.removeListener(e,l),t.removeListener("error",u)},[Symbol.asyncIterator](){return this}};return t.on(e,l),t.on("error",u),s;function l(...f){let d=i.shift();d?d.resolve(createIterResult(f,!1)):r.push(f)}function u(f){o=!0;let d=i.shift();d?d.reject(f):n=f,s.return()}};({EventEmitter:ub,defaultMaxListeners:cb,init:fb,listenerCount:hb,on:db,once:pb}=Pe)});var Ie=O((XI,Ss)=>{"use strict";_();v();m();var gb=(he(),Q(ye)),{format:bb,inspect:yb}=_s(),{codes:{ERR_INVALID_ARG_TYPE:Es}}=me(),{kResistStopPropagation:wb,AggregateError:_b,SymbolDispose:mb}=ie(),vb=globalThis.AbortSignal||Rr().AbortSignal,Eb=globalThis.AbortController||Rr().AbortController,Sb=Object.getPrototypeOf(async function(){}).constructor,oc=globalThis.Blob||gb.Blob,Ab=typeof oc<"u"?function(e){return e instanceof oc}:function(e){return!1},lc=(t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new Es(e,"AbortSignal",t)},Ib=(t,e)=>{if(typeof t!="function")throw new Es(e,"Function",t)};Ss.exports={AggregateError:_b,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((i,n)=>{t=i,e=n}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((i,...n)=>i?r(i):e(...n))})},debuglog(){return function(){}},format:bb,inspect:yb,types:{isAsyncFunction(t){return t instanceof Sb},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:Ab,deprecate(t,e){return t},addAbortListener:(Ot(),Q(xt)).addAbortListener||function(e,r){if(e===void 0)throw new Es("signal","AbortSignal",e);lc(e,"signal"),Ib(r,"listener");let i;return e.aborted?queueMicrotask(()=>r()):(e.addEventListener("abort",r,{__prot