@servicenow/sdk
Version:
ServiceNow SDK
1 lines • 19.3 MB
JavaScript
var umi=Object.create;var m$e=Object.defineProperty;var pmi=Object.getOwnPropertyDescriptor;var dmi=Object.getOwnPropertyNames;var fmi=Object.getPrototypeOf,_mi=Object.prototype.hasOwnProperty;var t=(n,e)=>m$e(n,"name",{value:e,configurable:!0}),WM=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,a)=>(typeof require<"u"?require:e)[a]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var Bm=(n,e)=>()=>(n&&(e=n(n=0)),e);var at=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),wL=(n,e)=>{for(var a in e)m$e(n,a,{get:e[a],enumerable:!0})},Tvn=(n,e,a,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of dmi(e))!_mi.call(n,u)&&u!==a&&m$e(n,u,{get:()=>e[u],enumerable:!(l=pmi(e,u))||l.enumerable});return n};var toe=(n,e,a)=>(a=n!=null?umi(fmi(n)):{},Tvn(e||!n||!n.__esModule?m$e(a,"default",{value:n,enumerable:!0}):a,n)),up=n=>Tvn(m$e({},"__esModule",{value:!0}),n);var rt,ae=Bm(()=>{rt="/"});function mmi(n,e){this.fun=n,this.array=e}function eEt(){return Jee.now()/1e3}function Ivn(n){var e=Math.floor((Date.now()-Jee.now())*.001),a=Jee.now()*.001,l=Math.floor(a)+e,u=Math.floor(a%1*1e9);return n&&(l=l-n[0],u=u-n[1],u<0&&(l--,u+=Z1t)),[l,u]}var E_s,Jee,Q1t,Z1t,tEt=Bm(()=>{ce();le();ae();oe();se();t(mmi,"Item");mmi.prototype.run=function(){this.fun.apply(null,this.array)};E_s={PATH:"/usr/bin",LANG:typeof Qe<"u"?Qe.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Jee={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};Jee.now===void 0&&(Q1t=Date.now(),Jee.timing&&Jee.timing.navigationStart&&(Q1t=Jee.timing.navigationStart),Jee.now=()=>Date.now()-Q1t);t(eEt,"uptime");Z1t=1e9;t(Ivn,"hrtime");Ivn.bigint=function(n){var e=Ivn(n);return typeof BigInt>"u"?e[0]*Z1t+e[1]:BigInt(e[0]*Z1t)+BigInt(e[1])}});var se=Bm(()=>{tEt()});function gmi(){if(Dvn)return h$e;Dvn=!0,h$e.byteLength=y,h$e.toByteArray=x,h$e.fromByteArray=D;for(var n=[],e=[],a=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,f=l.length;u<f;++u)n[u]=l[u],e[l.charCodeAt(u)]=u;e[45]=62,e[95]=63;function m(k){var F=k.length;if(F%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var U=k.indexOf("=");U===-1&&(U=F);var V=U===F?0:4-U%4;return[U,V]}t(m,"getLens");function y(k){var F=m(k),U=F[0],V=F[1];return(U+V)*3/4-V}t(y,"byteLength");function S(k,F,U){return(F+U)*3/4-U}t(S,"_byteLength");function x(k){var F,U=m(k),V=U[0],G=U[1],X=new a(S(k,V,G)),Z=0,te=G>0?V-4:V,ue;for(ue=0;ue<te;ue+=4)F=e[k.charCodeAt(ue)]<<18|e[k.charCodeAt(ue+1)]<<12|e[k.charCodeAt(ue+2)]<<6|e[k.charCodeAt(ue+3)],X[Z++]=F>>16&255,X[Z++]=F>>8&255,X[Z++]=F&255;return G===2&&(F=e[k.charCodeAt(ue)]<<2|e[k.charCodeAt(ue+1)]>>4,X[Z++]=F&255),G===1&&(F=e[k.charCodeAt(ue)]<<10|e[k.charCodeAt(ue+1)]<<4|e[k.charCodeAt(ue+2)]>>2,X[Z++]=F>>8&255,X[Z++]=F&255),X}t(x,"toByteArray");function w(k){return n[k>>18&63]+n[k>>12&63]+n[k>>6&63]+n[k&63]}t(w,"tripletToBase64");function T(k,F,U){for(var V,G=[],X=F;X<U;X+=3)V=(k[X]<<16&16711680)+(k[X+1]<<8&65280)+(k[X+2]&255),G.push(w(V));return G.join("")}t(T,"encodeChunk");function D(k){for(var F,U=k.length,V=U%3,G=[],X=16383,Z=0,te=U-V;Z<te;Z+=X)G.push(T(k,Z,Z+X>te?te:Z+X));return V===1?(F=k[U-1],G.push(n[F>>2]+n[F<<4&63]+"==")):V===2&&(F=(k[U-2]<<8)+k[U-1],G.push(n[F>>10]+n[F>>4&63]+n[F<<2&63]+"=")),G.join("")}return t(D,"fromByteArray"),h$e}function ymi(){if(Nvn)return O5e;Nvn=!0;return O5e.read=function(n,e,a,l,u){var f,m,y=u*8-l-1,S=(1<<y)-1,x=S>>1,w=-7,T=a?u-1:0,D=a?-1:1,k=n[e+T];for(T+=D,f=k&(1<<-w)-1,k>>=-w,w+=y;w>0;f=f*256+n[e+T],T+=D,w-=8);for(m=f&(1<<-w)-1,f>>=-w,w+=l;w>0;m=m*256+n[e+T],T+=D,w-=8);if(f===0)f=1-x;else{if(f===S)return m?NaN:(k?-1:1)*(1/0);m=m+Math.pow(2,l),f=f-x}return(k?-1:1)*m*Math.pow(2,f-l)},O5e.write=function(n,e,a,l,u,f){var m,y,S,x=f*8-u-1,w=(1<<x)-1,T=w>>1,D=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=l?0:f-1,F=l?1:-1,U=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(y=isNaN(e)?1:0,m=w):(m=Math.floor(Math.log(e)/Math.LN2),e*(S=Math.pow(2,-m))<1&&(m--,S*=2),m+T>=1?e+=D/S:e+=D*Math.pow(2,1-T),e*S>=2&&(m++,S/=2),m+T>=w?(y=0,m=w):m+T>=1?(y=(e*S-1)*Math.pow(2,u),m=m+T):(y=e*Math.pow(2,T-1)*Math.pow(2,u),m=0));u>=8;n[a+k]=y&255,k+=F,y/=256,u-=8);for(m=m<<u|y,x+=u;x>0;n[a+k]=m&255,k+=F,m/=256,x-=8);n[a+k-F]|=U*128},O5e}function pk(){if(Rvn)return noe;Rvn=!0;let n=gmi(),e=ymi(),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;noe.Buffer=m,noe.SlowBuffer=G,noe.INSPECT_MAX_BYTES=50;let l=2147483647;noe.kMaxLength=l,m.TYPED_ARRAY_SUPPORT=u(),!m.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 u(){try{let He=new Uint8Array(1),Ie={foo:t(function(){return 42},"foo")};return Object.setPrototypeOf(Ie,Uint8Array.prototype),Object.setPrototypeOf(He,Ie),He.foo()===42}catch{return!1}}t(u,"typedArraySupport"),Object.defineProperty(m.prototype,"parent",{enumerable:!0,get:t(function(){if(m.isBuffer(this))return this.buffer},"get")}),Object.defineProperty(m.prototype,"offset",{enumerable:!0,get:t(function(){if(m.isBuffer(this))return this.byteOffset},"get")});function f(He){if(He>l)throw new RangeError('The value "'+He+'" is invalid for option "size"');let Ie=new Uint8Array(He);return Object.setPrototypeOf(Ie,m.prototype),Ie}t(f,"createBuffer");function m(He,Ie,Ce){if(typeof He=="number"){if(typeof Ie=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(He)}return y(He,Ie,Ce)}t(m,"Buffer"),m.poolSize=8192;function y(He,Ie,Ce){if(typeof He=="string")return T(He,Ie);if(ArrayBuffer.isView(He))return k(He);if(He==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof He);if(bt(He,ArrayBuffer)||He&&bt(He.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(bt(He,SharedArrayBuffer)||He&&bt(He.buffer,SharedArrayBuffer)))return F(He,Ie,Ce);if(typeof He=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Je=He.valueOf&&He.valueOf();if(Je!=null&&Je!==He)return m.from(Je,Ie,Ce);let Ct=U(He);if(Ct)return Ct;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof He[Symbol.toPrimitive]=="function")return m.from(He[Symbol.toPrimitive]("string"),Ie,Ce);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof He)}t(y,"from"),m.from=function(He,Ie,Ce){return y(He,Ie,Ce)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function S(He){if(typeof He!="number")throw new TypeError('"size" argument must be of type number');if(He<0)throw new RangeError('The value "'+He+'" is invalid for option "size"')}t(S,"assertSize");function x(He,Ie,Ce){return S(He),He<=0?f(He):Ie!==void 0?typeof Ce=="string"?f(He).fill(Ie,Ce):f(He).fill(Ie):f(He)}t(x,"alloc"),m.alloc=function(He,Ie,Ce){return x(He,Ie,Ce)};function w(He){return S(He),f(He<0?0:V(He)|0)}t(w,"allocUnsafe"),m.allocUnsafe=function(He){return w(He)},m.allocUnsafeSlow=function(He){return w(He)};function T(He,Ie){if((typeof Ie!="string"||Ie==="")&&(Ie="utf8"),!m.isEncoding(Ie))throw new TypeError("Unknown encoding: "+Ie);let Ce=X(He,Ie)|0,Je=f(Ce),Ct=Je.write(He,Ie);return Ct!==Ce&&(Je=Je.slice(0,Ct)),Je}t(T,"fromString");function D(He){let Ie=He.length<0?0:V(He.length)|0,Ce=f(Ie);for(let Je=0;Je<Ie;Je+=1)Ce[Je]=He[Je]&255;return Ce}t(D,"fromArrayLike");function k(He){if(bt(He,Uint8Array)){let Ie=new Uint8Array(He);return F(Ie.buffer,Ie.byteOffset,Ie.byteLength)}return D(He)}t(k,"fromArrayView");function F(He,Ie,Ce){if(Ie<0||He.byteLength<Ie)throw new RangeError('"offset" is outside of buffer bounds');if(He.byteLength<Ie+(Ce||0))throw new RangeError('"length" is outside of buffer bounds');let Je;return Ie===void 0&&Ce===void 0?Je=new Uint8Array(He):Ce===void 0?Je=new Uint8Array(He,Ie):Je=new Uint8Array(He,Ie,Ce),Object.setPrototypeOf(Je,m.prototype),Je}t(F,"fromArrayBuffer");function U(He){if(m.isBuffer(He)){let Ie=V(He.length)|0,Ce=f(Ie);return Ce.length===0||He.copy(Ce,0,0,Ie),Ce}if(He.length!==void 0)return typeof He.length!="number"||vt(He.length)?f(0):D(He);if(He.type==="Buffer"&&Array.isArray(He.data))return D(He.data)}t(U,"fromObject");function V(He){if(He>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return He|0}t(V,"checked");function G(He){return+He!=He&&(He=0),m.alloc(+He)}t(G,"SlowBuffer"),m.isBuffer=t(function(Ie){return Ie!=null&&Ie._isBuffer===!0&&Ie!==m.prototype},"isBuffer"),m.compare=t(function(Ie,Ce){if(bt(Ie,Uint8Array)&&(Ie=m.from(Ie,Ie.offset,Ie.byteLength)),bt(Ce,Uint8Array)&&(Ce=m.from(Ce,Ce.offset,Ce.byteLength)),!m.isBuffer(Ie)||!m.isBuffer(Ce))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ie===Ce)return 0;let Je=Ie.length,Ct=Ce.length;for(let pt=0,jt=Math.min(Je,Ct);pt<jt;++pt)if(Ie[pt]!==Ce[pt]){Je=Ie[pt],Ct=Ce[pt];break}return Je<Ct?-1:Ct<Je?1:0},"compare"),m.isEncoding=t(function(Ie){switch(String(Ie).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}},"isEncoding"),m.concat=t(function(Ie,Ce){if(!Array.isArray(Ie))throw new TypeError('"list" argument must be an Array of Buffers');if(Ie.length===0)return m.alloc(0);let Je;if(Ce===void 0)for(Ce=0,Je=0;Je<Ie.length;++Je)Ce+=Ie[Je].length;let Ct=m.allocUnsafe(Ce),pt=0;for(Je=0;Je<Ie.length;++Je){let jt=Ie[Je];if(bt(jt,Uint8Array))pt+jt.length>Ct.length?(m.isBuffer(jt)||(jt=m.from(jt)),jt.copy(Ct,pt)):Uint8Array.prototype.set.call(Ct,jt,pt);else if(m.isBuffer(jt))jt.copy(Ct,pt);else throw new TypeError('"list" argument must be an Array of Buffers');pt+=jt.length}return Ct},"concat");function X(He,Ie){if(m.isBuffer(He))return He.length;if(ArrayBuffer.isView(He)||bt(He,ArrayBuffer))return He.byteLength;if(typeof He!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof He);let Ce=He.length,Je=arguments.length>2&&arguments[2]===!0;if(!Je&&Ce===0)return 0;let Ct=!1;for(;;)switch(Ie){case"ascii":case"latin1":case"binary":return Ce;case"utf8":case"utf-8":return fe(He).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce*2;case"hex":return Ce>>>1;case"base64":return De(He).length;default:if(Ct)return Je?-1:fe(He).length;Ie=(""+Ie).toLowerCase(),Ct=!0}}t(X,"byteLength"),m.byteLength=X;function Z(He,Ie,Ce){let Je=!1;if((Ie===void 0||Ie<0)&&(Ie=0),Ie>this.length||((Ce===void 0||Ce>this.length)&&(Ce=this.length),Ce<=0)||(Ce>>>=0,Ie>>>=0,Ce<=Ie))return"";for(He||(He="utf8");;)switch(He){case"hex":return pe(this,Ie,Ce);case"utf8":case"utf-8":return Pe(this,Ie,Ce);case"ascii":return N(this,Ie,Ce);case"latin1":case"binary":return Xe(this,Ie,Ce);case"base64":return je(this,Ie,Ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,Ie,Ce);default:if(Je)throw new TypeError("Unknown encoding: "+He);He=(He+"").toLowerCase(),Je=!0}}t(Z,"slowToString"),m.prototype._isBuffer=!0;function te(He,Ie,Ce){let Je=He[Ie];He[Ie]=He[Ce],He[Ce]=Je}t(te,"swap"),m.prototype.swap16=t(function(){let Ie=this.length;if(Ie%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Ce=0;Ce<Ie;Ce+=2)te(this,Ce,Ce+1);return this},"swap16"),m.prototype.swap32=t(function(){let Ie=this.length;if(Ie%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Ce=0;Ce<Ie;Ce+=4)te(this,Ce,Ce+3),te(this,Ce+1,Ce+2);return this},"swap32"),m.prototype.swap64=t(function(){let Ie=this.length;if(Ie%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Ce=0;Ce<Ie;Ce+=8)te(this,Ce,Ce+7),te(this,Ce+1,Ce+6),te(this,Ce+2,Ce+5),te(this,Ce+3,Ce+4);return this},"swap64"),m.prototype.toString=t(function(){let Ie=this.length;return Ie===0?"":arguments.length===0?Pe(this,0,Ie):Z.apply(this,arguments)},"toString"),m.prototype.toLocaleString=m.prototype.toString,m.prototype.equals=t(function(Ie){if(!m.isBuffer(Ie))throw new TypeError("Argument must be a Buffer");return this===Ie?!0:m.compare(this,Ie)===0},"equals"),m.prototype.inspect=t(function(){let Ie="",Ce=noe.INSPECT_MAX_BYTES;return Ie=this.toString("hex",0,Ce).replace(/(.{2})/g,"$1 ").trim(),this.length>Ce&&(Ie+=" ... "),"<Buffer "+Ie+">"},"inspect"),a&&(m.prototype[a]=m.prototype.inspect),m.prototype.compare=t(function(Ie,Ce,Je,Ct,pt){if(bt(Ie,Uint8Array)&&(Ie=m.from(Ie,Ie.offset,Ie.byteLength)),!m.isBuffer(Ie))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ie);if(Ce===void 0&&(Ce=0),Je===void 0&&(Je=Ie?Ie.length:0),Ct===void 0&&(Ct=0),pt===void 0&&(pt=this.length),Ce<0||Je>Ie.length||Ct<0||pt>this.length)throw new RangeError("out of range index");if(Ct>=pt&&Ce>=Je)return 0;if(Ct>=pt)return-1;if(Ce>=Je)return 1;if(Ce>>>=0,Je>>>=0,Ct>>>=0,pt>>>=0,this===Ie)return 0;let jt=pt-Ct,Tn=Je-Ce,Dn=Math.min(jt,Tn),fn=this.slice(Ct,pt),hr=Ie.slice(Ce,Je);for(let hn=0;hn<Dn;++hn)if(fn[hn]!==hr[hn]){jt=fn[hn],Tn=hr[hn];break}return jt<Tn?-1:Tn<jt?1:0},"compare");function ue(He,Ie,Ce,Je,Ct){if(He.length===0)return-1;if(typeof Ce=="string"?(Je=Ce,Ce=0):Ce>2147483647?Ce=2147483647:Ce<-2147483648&&(Ce=-2147483648),Ce=+Ce,vt(Ce)&&(Ce=Ct?0:He.length-1),Ce<0&&(Ce=He.length+Ce),Ce>=He.length){if(Ct)return-1;Ce=He.length-1}else if(Ce<0)if(Ct)Ce=0;else return-1;if(typeof Ie=="string"&&(Ie=m.from(Ie,Je)),m.isBuffer(Ie))return Ie.length===0?-1:ge(He,Ie,Ce,Je,Ct);if(typeof Ie=="number")return Ie=Ie&255,typeof Uint8Array.prototype.indexOf=="function"?Ct?Uint8Array.prototype.indexOf.call(He,Ie,Ce):Uint8Array.prototype.lastIndexOf.call(He,Ie,Ce):ge(He,[Ie],Ce,Je,Ct);throw new TypeError("val must be string, number or Buffer")}t(ue,"bidirectionalIndexOf");function ge(He,Ie,Ce,Je,Ct){let pt=1,jt=He.length,Tn=Ie.length;if(Je!==void 0&&(Je=String(Je).toLowerCase(),Je==="ucs2"||Je==="ucs-2"||Je==="utf16le"||Je==="utf-16le")){if(He.length<2||Ie.length<2)return-1;pt=2,jt/=2,Tn/=2,Ce/=2}function Dn(hr,hn){return pt===1?hr[hn]:hr.readUInt16BE(hn*pt)}t(Dn,"read");let fn;if(Ct){let hr=-1;for(fn=Ce;fn<jt;fn++)if(Dn(He,fn)===Dn(Ie,hr===-1?0:fn-hr)){if(hr===-1&&(hr=fn),fn-hr+1===Tn)return hr*pt}else hr!==-1&&(fn-=fn-hr),hr=-1}else for(Ce+Tn>jt&&(Ce=jt-Tn),fn=Ce;fn>=0;fn--){let hr=!0;for(let hn=0;hn<Tn;hn++)if(Dn(He,fn+hn)!==Dn(Ie,hn)){hr=!1;break}if(hr)return fn}return-1}t(ge,"arrayIndexOf"),m.prototype.includes=t(function(Ie,Ce,Je){return this.indexOf(Ie,Ce,Je)!==-1},"includes"),m.prototype.indexOf=t(function(Ie,Ce,Je){return ue(this,Ie,Ce,Je,!0)},"indexOf"),m.prototype.lastIndexOf=t(function(Ie,Ce,Je){return ue(this,Ie,Ce,Je,!1)},"lastIndexOf");function me(He,Ie,Ce,Je){Ce=Number(Ce)||0;let Ct=He.length-Ce;Je?(Je=Number(Je),Je>Ct&&(Je=Ct)):Je=Ct;let pt=Ie.length;Je>pt/2&&(Je=pt/2);let jt;for(jt=0;jt<Je;++jt){let Tn=parseInt(Ie.substr(jt*2,2),16);if(vt(Tn))return jt;He[Ce+jt]=Tn}return jt}t(me,"hexWrite");function Te(He,Ie,Ce,Je){return dt(fe(Ie,He.length-Ce),He,Ce,Je)}t(Te,"utf8Write");function $e(He,Ie,Ce,Je){return dt(he(Ie),He,Ce,Je)}t($e,"asciiWrite");function Oe(He,Ie,Ce,Je){return dt(De(Ie),He,Ce,Je)}t(Oe,"base64Write");function Ge(He,Ie,Ce,Je){return dt(be(Ie,He.length-Ce),He,Ce,Je)}t(Ge,"ucs2Write"),m.prototype.write=t(function(Ie,Ce,Je,Ct){if(Ce===void 0)Ct="utf8",Je=this.length,Ce=0;else if(Je===void 0&&typeof Ce=="string")Ct=Ce,Je=this.length,Ce=0;else if(isFinite(Ce))Ce=Ce>>>0,isFinite(Je)?(Je=Je>>>0,Ct===void 0&&(Ct="utf8")):(Ct=Je,Je=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let pt=this.length-Ce;if((Je===void 0||Je>pt)&&(Je=pt),Ie.length>0&&(Je<0||Ce<0)||Ce>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ct||(Ct="utf8");let jt=!1;for(;;)switch(Ct){case"hex":return me(this,Ie,Ce,Je);case"utf8":case"utf-8":return Te(this,Ie,Ce,Je);case"ascii":case"latin1":case"binary":return $e(this,Ie,Ce,Je);case"base64":return Oe(this,Ie,Ce,Je);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,Ie,Ce,Je);default:if(jt)throw new TypeError("Unknown encoding: "+Ct);Ct=(""+Ct).toLowerCase(),jt=!0}},"write"),m.prototype.toJSON=t(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function je(He,Ie,Ce){return Ie===0&&Ce===He.length?n.fromByteArray(He):n.fromByteArray(He.slice(Ie,Ce))}t(je,"base64Slice");function Pe(He,Ie,Ce){Ce=Math.min(He.length,Ce);let Je=[],Ct=Ie;for(;Ct<Ce;){let pt=He[Ct],jt=null,Tn=pt>239?4:pt>223?3:pt>191?2:1;if(Ct+Tn<=Ce){let Dn,fn,hr,hn;switch(Tn){case 1:pt<128&&(jt=pt);break;case 2:Dn=He[Ct+1],(Dn&192)===128&&(hn=(pt&31)<<6|Dn&63,hn>127&&(jt=hn));break;case 3:Dn=He[Ct+1],fn=He[Ct+2],(Dn&192)===128&&(fn&192)===128&&(hn=(pt&15)<<12|(Dn&63)<<6|fn&63,hn>2047&&(hn<55296||hn>57343)&&(jt=hn));break;case 4:Dn=He[Ct+1],fn=He[Ct+2],hr=He[Ct+3],(Dn&192)===128&&(fn&192)===128&&(hr&192)===128&&(hn=(pt&15)<<18|(Dn&63)<<12|(fn&63)<<6|hr&63,hn>65535&&hn<1114112&&(jt=hn))}}jt===null?(jt=65533,Tn=1):jt>65535&&(jt-=65536,Je.push(jt>>>10&1023|55296),jt=56320|jt&1023),Je.push(jt),Ct+=Tn}return i(Je)}t(Pe,"utf8Slice");let K=4096;function i(He){let Ie=He.length;if(Ie<=K)return String.fromCharCode.apply(String,He);let Ce="",Je=0;for(;Je<Ie;)Ce+=String.fromCharCode.apply(String,He.slice(Je,Je+=K));return Ce}t(i,"decodeCodePointsArray");function N(He,Ie,Ce){let Je="";Ce=Math.min(He.length,Ce);for(let Ct=Ie;Ct<Ce;++Ct)Je+=String.fromCharCode(He[Ct]&127);return Je}t(N,"asciiSlice");function Xe(He,Ie,Ce){let Je="";Ce=Math.min(He.length,Ce);for(let Ct=Ie;Ct<Ce;++Ct)Je+=String.fromCharCode(He[Ct]);return Je}t(Xe,"latin1Slice");function pe(He,Ie,Ce){let Je=He.length;(!Ie||Ie<0)&&(Ie=0),(!Ce||Ce<0||Ce>Je)&&(Ce=Je);let Ct="";for(let pt=Ie;pt<Ce;++pt)Ct+=$t[He[pt]];return Ct}t(pe,"hexSlice");function ht(He,Ie,Ce){let Je=He.slice(Ie,Ce),Ct="";for(let pt=0;pt<Je.length-1;pt+=2)Ct+=String.fromCharCode(Je[pt]+Je[pt+1]*256);return Ct}t(ht,"utf16leSlice"),m.prototype.slice=t(function(Ie,Ce){let Je=this.length;Ie=~~Ie,Ce=Ce===void 0?Je:~~Ce,Ie<0?(Ie+=Je,Ie<0&&(Ie=0)):Ie>Je&&(Ie=Je),Ce<0?(Ce+=Je,Ce<0&&(Ce=0)):Ce>Je&&(Ce=Je),Ce<Ie&&(Ce=Ie);let Ct=this.subarray(Ie,Ce);return Object.setPrototypeOf(Ct,m.prototype),Ct},"slice");function Fe(He,Ie,Ce){if(He%1!==0||He<0)throw new RangeError("offset is not uint");if(He+Ie>Ce)throw new RangeError("Trying to access beyond buffer length")}t(Fe,"checkOffset"),m.prototype.readUintLE=m.prototype.readUIntLE=t(function(Ie,Ce,Je){Ie=Ie>>>0,Ce=Ce>>>0,Je||Fe(Ie,Ce,this.length);let Ct=this[Ie],pt=1,jt=0;for(;++jt<Ce&&(pt*=256);)Ct+=this[Ie+jt]*pt;return Ct},"readUIntLE"),m.prototype.readUintBE=m.prototype.readUIntBE=t(function(Ie,Ce,Je){Ie=Ie>>>0,Ce=Ce>>>0,Je||Fe(Ie,Ce,this.length);let Ct=this[Ie+--Ce],pt=1;for(;Ce>0&&(pt*=256);)Ct+=this[Ie+--Ce]*pt;return Ct},"readUIntBE"),m.prototype.readUint8=m.prototype.readUInt8=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,1,this.length),this[Ie]},"readUInt8"),m.prototype.readUint16LE=m.prototype.readUInt16LE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,2,this.length),this[Ie]|this[Ie+1]<<8},"readUInt16LE"),m.prototype.readUint16BE=m.prototype.readUInt16BE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,2,this.length),this[Ie]<<8|this[Ie+1]},"readUInt16BE"),m.prototype.readUint32LE=m.prototype.readUInt32LE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,4,this.length),(this[Ie]|this[Ie+1]<<8|this[Ie+2]<<16)+this[Ie+3]*16777216},"readUInt32LE"),m.prototype.readUint32BE=m.prototype.readUInt32BE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,4,this.length),this[Ie]*16777216+(this[Ie+1]<<16|this[Ie+2]<<8|this[Ie+3])},"readUInt32BE"),m.prototype.readBigUInt64LE=en(t(function(Ie){Ie=Ie>>>0,B(Ie,"offset");let Ce=this[Ie],Je=this[Ie+7];(Ce===void 0||Je===void 0)&&q(Ie,this.length-8);let Ct=Ce+this[++Ie]*2**8+this[++Ie]*2**16+this[++Ie]*2**24,pt=this[++Ie]+this[++Ie]*2**8+this[++Ie]*2**16+Je*2**24;return BigInt(Ct)+(BigInt(pt)<<BigInt(32))},"readBigUInt64LE")),m.prototype.readBigUInt64BE=en(t(function(Ie){Ie=Ie>>>0,B(Ie,"offset");let Ce=this[Ie],Je=this[Ie+7];(Ce===void 0||Je===void 0)&&q(Ie,this.length-8);let Ct=Ce*2**24+this[++Ie]*2**16+this[++Ie]*2**8+this[++Ie],pt=this[++Ie]*2**24+this[++Ie]*2**16+this[++Ie]*2**8+Je;return(BigInt(Ct)<<BigInt(32))+BigInt(pt)},"readBigUInt64BE")),m.prototype.readIntLE=t(function(Ie,Ce,Je){Ie=Ie>>>0,Ce=Ce>>>0,Je||Fe(Ie,Ce,this.length);let Ct=this[Ie],pt=1,jt=0;for(;++jt<Ce&&(pt*=256);)Ct+=this[Ie+jt]*pt;return pt*=128,Ct>=pt&&(Ct-=Math.pow(2,8*Ce)),Ct},"readIntLE"),m.prototype.readIntBE=t(function(Ie,Ce,Je){Ie=Ie>>>0,Ce=Ce>>>0,Je||Fe(Ie,Ce,this.length);let Ct=Ce,pt=1,jt=this[Ie+--Ct];for(;Ct>0&&(pt*=256);)jt+=this[Ie+--Ct]*pt;return pt*=128,jt>=pt&&(jt-=Math.pow(2,8*Ce)),jt},"readIntBE"),m.prototype.readInt8=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,1,this.length),this[Ie]&128?(255-this[Ie]+1)*-1:this[Ie]},"readInt8"),m.prototype.readInt16LE=t(function(Ie,Ce){Ie=Ie>>>0,Ce||Fe(Ie,2,this.length);let Je=this[Ie]|this[Ie+1]<<8;return Je&32768?Je|4294901760:Je},"readInt16LE"),m.prototype.readInt16BE=t(function(Ie,Ce){Ie=Ie>>>0,Ce||Fe(Ie,2,this.length);let Je=this[Ie+1]|this[Ie]<<8;return Je&32768?Je|4294901760:Je},"readInt16BE"),m.prototype.readInt32LE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,4,this.length),this[Ie]|this[Ie+1]<<8|this[Ie+2]<<16|this[Ie+3]<<24},"readInt32LE"),m.prototype.readInt32BE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,4,this.length),this[Ie]<<24|this[Ie+1]<<16|this[Ie+2]<<8|this[Ie+3]},"readInt32BE"),m.prototype.readBigInt64LE=en(t(function(Ie){Ie=Ie>>>0,B(Ie,"offset");let Ce=this[Ie],Je=this[Ie+7];(Ce===void 0||Je===void 0)&&q(Ie,this.length-8);let Ct=this[Ie+4]+this[Ie+5]*2**8+this[Ie+6]*2**16+(Je<<24);return(BigInt(Ct)<<BigInt(32))+BigInt(Ce+this[++Ie]*2**8+this[++Ie]*2**16+this[++Ie]*2**24)},"readBigInt64LE")),m.prototype.readBigInt64BE=en(t(function(Ie){Ie=Ie>>>0,B(Ie,"offset");let Ce=this[Ie],Je=this[Ie+7];(Ce===void 0||Je===void 0)&&q(Ie,this.length-8);let Ct=(Ce<<24)+this[++Ie]*2**16+this[++Ie]*2**8+this[++Ie];return(BigInt(Ct)<<BigInt(32))+BigInt(this[++Ie]*2**24+this[++Ie]*2**16+this[++Ie]*2**8+Je)},"readBigInt64BE")),m.prototype.readFloatLE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,4,this.length),e.read(this,Ie,!0,23,4)},"readFloatLE"),m.prototype.readFloatBE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,4,this.length),e.read(this,Ie,!1,23,4)},"readFloatBE"),m.prototype.readDoubleLE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,8,this.length),e.read(this,Ie,!0,52,8)},"readDoubleLE"),m.prototype.readDoubleBE=t(function(Ie,Ce){return Ie=Ie>>>0,Ce||Fe(Ie,8,this.length),e.read(this,Ie,!1,52,8)},"readDoubleBE");function j(He,Ie,Ce,Je,Ct,pt){if(!m.isBuffer(He))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ie>Ct||Ie<pt)throw new RangeError('"value" argument is out of bounds');if(Ce+Je>He.length)throw new RangeError("Index out of range")}t(j,"checkInt"),m.prototype.writeUintLE=m.prototype.writeUIntLE=t(function(Ie,Ce,Je,Ct){if(Ie=+Ie,Ce=Ce>>>0,Je=Je>>>0,!Ct){let Tn=Math.pow(2,8*Je)-1;j(this,Ie,Ce,Je,Tn,0)}let pt=1,jt=0;for(this[Ce]=Ie&255;++jt<Je&&(pt*=256);)this[Ce+jt]=Ie/pt&255;return Ce+Je},"writeUIntLE"),m.prototype.writeUintBE=m.prototype.writeUIntBE=t(function(Ie,Ce,Je,Ct){if(Ie=+Ie,Ce=Ce>>>0,Je=Je>>>0,!Ct){let Tn=Math.pow(2,8*Je)-1;j(this,Ie,Ce,Je,Tn,0)}let pt=Je-1,jt=1;for(this[Ce+pt]=Ie&255;--pt>=0&&(jt*=256);)this[Ce+pt]=Ie/jt&255;return Ce+Je},"writeUIntBE"),m.prototype.writeUint8=m.prototype.writeUInt8=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,1,255,0),this[Ce]=Ie&255,Ce+1},"writeUInt8"),m.prototype.writeUint16LE=m.prototype.writeUInt16LE=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,2,65535,0),this[Ce]=Ie&255,this[Ce+1]=Ie>>>8,Ce+2},"writeUInt16LE"),m.prototype.writeUint16BE=m.prototype.writeUInt16BE=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,2,65535,0),this[Ce]=Ie>>>8,this[Ce+1]=Ie&255,Ce+2},"writeUInt16BE"),m.prototype.writeUint32LE=m.prototype.writeUInt32LE=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,4,4294967295,0),this[Ce+3]=Ie>>>24,this[Ce+2]=Ie>>>16,this[Ce+1]=Ie>>>8,this[Ce]=Ie&255,Ce+4},"writeUInt32LE"),m.prototype.writeUint32BE=m.prototype.writeUInt32BE=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,4,4294967295,0),this[Ce]=Ie>>>24,this[Ce+1]=Ie>>>16,this[Ce+2]=Ie>>>8,this[Ce+3]=Ie&255,Ce+4},"writeUInt32BE");function r(He,Ie,Ce,Je,Ct){R(Ie,Je,Ct,He,Ce,7);let pt=Number(Ie&BigInt(4294967295));He[Ce++]=pt,pt=pt>>8,He[Ce++]=pt,pt=pt>>8,He[Ce++]=pt,pt=pt>>8,He[Ce++]=pt;let jt=Number(Ie>>BigInt(32)&BigInt(4294967295));return He[Ce++]=jt,jt=jt>>8,He[Ce++]=jt,jt=jt>>8,He[Ce++]=jt,jt=jt>>8,He[Ce++]=jt,Ce}t(r,"wrtBigUInt64LE");function s(He,Ie,Ce,Je,Ct){R(Ie,Je,Ct,He,Ce,7);let pt=Number(Ie&BigInt(4294967295));He[Ce+7]=pt,pt=pt>>8,He[Ce+6]=pt,pt=pt>>8,He[Ce+5]=pt,pt=pt>>8,He[Ce+4]=pt;let jt=Number(Ie>>BigInt(32)&BigInt(4294967295));return He[Ce+3]=jt,jt=jt>>8,He[Ce+2]=jt,jt=jt>>8,He[Ce+1]=jt,jt=jt>>8,He[Ce]=jt,Ce+8}t(s,"wrtBigUInt64BE"),m.prototype.writeBigUInt64LE=en(t(function(Ie,Ce=0){return r(this,Ie,Ce,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64LE")),m.prototype.writeBigUInt64BE=en(t(function(Ie,Ce=0){return s(this,Ie,Ce,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64BE")),m.prototype.writeIntLE=t(function(Ie,Ce,Je,Ct){if(Ie=+Ie,Ce=Ce>>>0,!Ct){let Dn=Math.pow(2,8*Je-1);j(this,Ie,Ce,Je,Dn-1,-Dn)}let pt=0,jt=1,Tn=0;for(this[Ce]=Ie&255;++pt<Je&&(jt*=256);)Ie<0&&Tn===0&&this[Ce+pt-1]!==0&&(Tn=1),this[Ce+pt]=(Ie/jt>>0)-Tn&255;return Ce+Je},"writeIntLE"),m.prototype.writeIntBE=t(function(Ie,Ce,Je,Ct){if(Ie=+Ie,Ce=Ce>>>0,!Ct){let Dn=Math.pow(2,8*Je-1);j(this,Ie,Ce,Je,Dn-1,-Dn)}let pt=Je-1,jt=1,Tn=0;for(this[Ce+pt]=Ie&255;--pt>=0&&(jt*=256);)Ie<0&&Tn===0&&this[Ce+pt+1]!==0&&(Tn=1),this[Ce+pt]=(Ie/jt>>0)-Tn&255;return Ce+Je},"writeIntBE"),m.prototype.writeInt8=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,1,127,-128),Ie<0&&(Ie=255+Ie+1),this[Ce]=Ie&255,Ce+1},"writeInt8"),m.prototype.writeInt16LE=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,2,32767,-32768),this[Ce]=Ie&255,this[Ce+1]=Ie>>>8,Ce+2},"writeInt16LE"),m.prototype.writeInt16BE=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,2,32767,-32768),this[Ce]=Ie>>>8,this[Ce+1]=Ie&255,Ce+2},"writeInt16BE"),m.prototype.writeInt32LE=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,4,2147483647,-2147483648),this[Ce]=Ie&255,this[Ce+1]=Ie>>>8,this[Ce+2]=Ie>>>16,this[Ce+3]=Ie>>>24,Ce+4},"writeInt32LE"),m.prototype.writeInt32BE=t(function(Ie,Ce,Je){return Ie=+Ie,Ce=Ce>>>0,Je||j(this,Ie,Ce,4,2147483647,-2147483648),Ie<0&&(Ie=4294967295+Ie+1),this[Ce]=Ie>>>24,this[Ce+1]=Ie>>>16,this[Ce+2]=Ie>>>8,this[Ce+3]=Ie&255,Ce+4},"writeInt32BE"),m.prototype.writeBigInt64LE=en(t(function(Ie,Ce=0){return r(this,Ie,Ce,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64LE")),m.prototype.writeBigInt64BE=en(t(function(Ie,Ce=0){return s(this,Ie,Ce,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64BE"));function c(He,Ie,Ce,Je,Ct,pt){if(Ce+Je>He.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("Index out of range")}t(c,"checkIEEE754");function p(He,Ie,Ce,Je,Ct){return Ie=+Ie,Ce=Ce>>>0,Ct||c(He,Ie,Ce,4),e.write(He,Ie,Ce,Je,23,4),Ce+4}t(p,"writeFloat"),m.prototype.writeFloatLE=t(function(Ie,Ce,Je){return p(this,Ie,Ce,!0,Je)},"writeFloatLE"),m.prototype.writeFloatBE=t(function(Ie,Ce,Je){return p(this,Ie,Ce,!1,Je)},"writeFloatBE");function _(He,Ie,Ce,Je,Ct){return Ie=+Ie,Ce=Ce>>>0,Ct||c(He,Ie,Ce,8),e.write(He,Ie,Ce,Je,52,8),Ce+8}t(_,"writeDouble"),m.prototype.writeDoubleLE=t(function(Ie,Ce,Je){return _(this,Ie,Ce,!0,Je)},"writeDoubleLE"),m.prototype.writeDoubleBE=t(function(Ie,Ce,Je){return _(this,Ie,Ce,!1,Je)},"writeDoubleBE"),m.prototype.copy=t(function(Ie,Ce,Je,Ct){if(!m.isBuffer(Ie))throw new TypeError("argument should be a Buffer");if(Je||(Je=0),!Ct&&Ct!==0&&(Ct=this.length),Ce>=Ie.length&&(Ce=Ie.length),Ce||(Ce=0),Ct>0&&Ct<Je&&(Ct=Je),Ct===Je||Ie.length===0||this.length===0)return 0;if(Ce<0)throw new RangeError("targetStart out of bounds");if(Je<0||Je>=this.length)throw new RangeError("Index out of range");if(Ct<0)throw new RangeError("sourceEnd out of bounds");Ct>this.length&&(Ct=this.length),Ie.length-Ce<Ct-Je&&(Ct=Ie.length-Ce+Je);let pt=Ct-Je;return this===Ie&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Ce,Je,Ct):Uint8Array.prototype.set.call(Ie,this.subarray(Je,Ct),Ce),pt},"copy"),m.prototype.fill=t(function(Ie,Ce,Je,Ct){if(typeof Ie=="string"){if(typeof Ce=="string"?(Ct=Ce,Ce=0,Je=this.length):typeof Je=="string"&&(Ct=Je,Je=this.length),Ct!==void 0&&typeof Ct!="string")throw new TypeError("encoding must be a string");if(typeof Ct=="string"&&!m.isEncoding(Ct))throw new TypeError("Unknown encoding: "+Ct);if(Ie.length===1){let jt=Ie.charCodeAt(0);(Ct==="utf8"&&jt<128||Ct==="latin1")&&(Ie=jt)}}else typeof Ie=="number"?Ie=Ie&255:typeof Ie=="boolean"&&(Ie=Number(Ie));if(Ce<0||this.length<Ce||this.length<Je)throw new RangeError("Out of range index");if(Je<=Ce)return this;Ce=Ce>>>0,Je=Je===void 0?this.length:Je>>>0,Ie||(Ie=0);let pt;if(typeof Ie=="number")for(pt=Ce;pt<Je;++pt)this[pt]=Ie;else{let jt=m.isBuffer(Ie)?Ie:m.from(Ie,Ct),Tn=jt.length;if(Tn===0)throw new TypeError('The value "'+Ie+'" is invalid for argument "value"');for(pt=0;pt<Je-Ce;++pt)this[pt+Ce]=jt[pt%Tn]}return this},"fill");let h={};function b(He,Ie,Ce){h[He]=class extends Ce{static{t(this,"NodeError")}constructor(){super(),Object.defineProperty(this,"message",{value:Ie.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${He}]`,this.stack,delete this.name}get code(){return He}set code(Ct){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ct,writable:!0})}toString(){return`${this.name} [${He}]: ${this.message}`}}}t(b,"E"),b("ERR_BUFFER_OUT_OF_BOUNDS",function(He){return He?`${He} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),b("ERR_INVALID_ARG_TYPE",function(He,Ie){return`The "${He}" argument must be of type number. Received type ${typeof Ie}`},TypeError),b("ERR_OUT_OF_RANGE",function(He,Ie,Ce){let Je=`The value of "${He}" is out of range.`,Ct=Ce;return Number.isInteger(Ce)&&Math.abs(Ce)>2**32?Ct=E(String(Ce)):typeof Ce=="bigint"&&(Ct=String(Ce),(Ce>BigInt(2)**BigInt(32)||Ce<-(BigInt(2)**BigInt(32)))&&(Ct=E(Ct)),Ct+="n"),Je+=` It must be ${Ie}. Received ${Ct}`,Je},RangeError);function E(He){let Ie="",Ce=He.length,Je=He[0]==="-"?1:0;for(;Ce>=Je+4;Ce-=3)Ie=`_${He.slice(Ce-3,Ce)}${Ie}`;return`${He.slice(0,Ce)}${Ie}`}t(E,"addNumericalSeparator");function A(He,Ie,Ce){B(Ie,"offset"),(He[Ie]===void 0||He[Ie+Ce]===void 0)&&q(Ie,He.length-(Ce+1))}t(A,"checkBounds");function R(He,Ie,Ce,Je,Ct,pt){if(He>Ce||He<Ie){let jt=typeof Ie=="bigint"?"n":"",Tn;throw Ie===0||Ie===BigInt(0)?Tn=`>= 0${jt} and < 2${jt} ** ${(pt+1)*8}${jt}`:Tn=`>= -(2${jt} ** ${(pt+1)*8-1}${jt}) and < 2 ** ${(pt+1)*8-1}${jt}`,new h.ERR_OUT_OF_RANGE("value",Tn,He)}A(Je,Ct,pt)}t(R,"checkIntBI");function B(He,Ie){if(typeof He!="number")throw new h.ERR_INVALID_ARG_TYPE(Ie,"number",He)}t(B,"validateNumber");function q(He,Ie,Ce){throw Math.floor(He)!==He?(B(He,Ce),new h.ERR_OUT_OF_RANGE("offset","an integer",He)):Ie<0?new h.ERR_BUFFER_OUT_OF_BOUNDS:new h.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Ie}`,He)}t(q,"boundsError");let Y=/[^+/0-9A-Za-z-_]/g;function ie(He){if(He=He.split("=")[0],He=He.trim().replace(Y,""),He.length<2)return"";for(;He.length%4!==0;)He=He+"=";return He}t(ie,"base64clean");function fe(He,Ie){Ie=Ie||1/0;let Ce,Je=He.length,Ct=null,pt=[];for(let jt=0;jt<Je;++jt){if(Ce=He.charCodeAt(jt),Ce>55295&&Ce<57344){if(!Ct){if(Ce>56319){(Ie-=3)>-1&&pt.push(239,191,189);continue}else if(jt+1===Je){(Ie-=3)>-1&&pt.push(239,191,189);continue}Ct=Ce;continue}if(Ce<56320){(Ie-=3)>-1&&pt.push(239,191,189),Ct=Ce;continue}Ce=(Ct-55296<<10|Ce-56320)+65536}else Ct&&(Ie-=3)>-1&&pt.push(239,191,189);if(Ct=null,Ce<128){if((Ie-=1)<0)break;pt.push(Ce)}else if(Ce<2048){if((Ie-=2)<0)break;pt.push(Ce>>6|192,Ce&63|128)}else if(Ce<65536){if((Ie-=3)<0)break;pt.push(Ce>>12|224,Ce>>6&63|128,Ce&63|128)}else if(Ce<1114112){if((Ie-=4)<0)break;pt.push(Ce>>18|240,Ce>>12&63|128,Ce>>6&63|128,Ce&63|128)}else throw new Error("Invalid code point")}return pt}t(fe,"utf8ToBytes");function he(He){let Ie=[];for(let Ce=0;Ce<He.length;++Ce)Ie.push(He.charCodeAt(Ce)&255);return Ie}t(he,"asciiToBytes");function be(He,Ie){let Ce,Je,Ct,pt=[];for(let jt=0;jt<He.length&&!((Ie-=2)<0);++jt)Ce=He.charCodeAt(jt),Je=Ce>>8,Ct=Ce%256,pt.push(Ct),pt.push(Je);return pt}t(be,"utf16leToBytes");function De(He){return n.toByteArray(ie(He))}t(De,"base64ToBytes");function dt(He,Ie,Ce,Je){let Ct;for(Ct=0;Ct<Je&&!(Ct+Ce>=Ie.length||Ct>=He.length);++Ct)Ie[Ct+Ce]=He[Ct];return Ct}t(dt,"blitBuffer");function bt(He,Ie){return He instanceof Ie||He!=null&&He.constructor!=null&&He.constructor.name!=null&&He.constructor.name===Ie.name}t(bt,"isInstance");function vt(He){return He!==He}t(vt,"numberIsNaN");let $t=function(){let He="0123456789abcdef",Ie=new Array(256);for(let Ce=0;Ce<16;++Ce){let Je=Ce*16;for(let Ct=0;Ct<16;++Ct)Ie[Je+Ct]=He[Ce]+He[Ct]}return Ie}();function en(He){return typeof BigInt>"u"?It:He}t(en,"defineBigIntMethod");function It(){throw new Error("BigInt not supported")}return t(It,"BufferBigIntNotDefined"),noe}var h$e,Dvn,O5e,Nvn,noe,Rvn,Kee=Bm(()=>{ce();le();ae();oe();se();h$e={},Dvn=!1;t(gmi,"dew$2");O5e={},Nvn=!1;t(ymi,"dew$1");noe={},Rvn=!1;t(pk,"dew")});var ej={};wL(ej,{Buffer:()=>Ze,INSPECT_MAX_BYTES:()=>vmi,default:()=>Xee,kMaxLength:()=>bmi});var Xee,Ze,vmi,bmi,j6=Bm(()=>{ce();le();ae();oe();se();Kee();Xee=pk();Xee.Buffer;Xee.SlowBuffer;Xee.INSPECT_MAX_BYTES;Xee.kMaxLength;Ze=Xee.Buffer,vmi=Xee.INSPECT_MAX_BYTES,bmi=Xee.kMaxLength});var oe=Bm(()=>{j6()});function j7(n,e,a){return a={path:e,exports:{},require:t(function(l,u){return Smi(l,u??a.path)},"require")},n(a,a.exports),a.exports}function Smi(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var hG,roe=Bm(()=>{ce();le();ae();oe();se();hG=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t(j7,"createCommonjsModule");t(Smi,"commonjsRequire")});function Emi(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}var xmi,g$e,Wme,nEt,ems,F5e,tms,Pvn=Bm(()=>{ce();le();ae();oe();se();roe();t(Emi,"getScope");xmi=Emi(),g$e=xmi[Symbol.for("brodeProcess")],Wme={nextTick(n,...e){if(!(g$e&&g$e.exitCode!==null)){if(typeof n!="function")throw new TypeError("handler is not a function");queueMicrotask(()=>{try{n(...e)}catch(a){if(g$e&&g$e.hasListeners("uncaughtException")){g$e.emit("uncaughtException",a);return}throw a}})}},emitWarning(n){console.warn(n)}},nEt=j7(function(n,e){(function(a){var l=Object.hasOwnProperty,u=Array.isArray?Array.isArray:t(function(ht){return Object.prototype.toString.call(ht)==="[object Array]"},"_isArray"),f=10,m=typeof Wme=="object"&&typeof Wme.nextTick=="function",y=typeof Symbol=="function",S=typeof Reflect=="object",x=typeof setImmediate=="function",w=x?setImmediate:setTimeout,T=y?S&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(pe){var ht=Object.getOwnPropertyNames(pe);return ht.push.apply(ht,Object.getOwnPropertySymbols(pe)),ht}:Object.keys;function D(){this._events={},this._conf&&k.call(this,this._conf)}t(D,"init");function k(pe){pe&&(this._conf=pe,pe.delimiter&&(this.delimiter=pe.delimiter),pe.maxListeners!==a&&(this._maxListeners=pe.maxListeners),pe.wildcard&&(this.wildcard=pe.wildcard),pe.newListener&&(this._newListener=pe.newListener),pe.removeListener&&(this._removeListener=pe.removeListener),pe.verboseMemoryLeak&&(this.verboseMemoryLeak=pe.verboseMemoryLeak),pe.ignoreErrors&&(this.ignoreErrors=pe.ignoreErrors),this.wildcard&&(this.listenerTree={}))}t(k,"configure");function F(pe,ht){var Fe="(node) warning: possible EventEmitter memory leak detected. "+pe+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(Fe+=" Event name: "+ht+"."),typeof Wme<"u"&&Wme.emitWarning){var j=new Error(Fe);j.name="MaxListenersExceededWarning",j.emitter=this,j.count=pe,Wme.emitWarning(j)}else console.error(Fe),console.trace&&console.trace()}t(F,"logPossibleMemoryLeak");var U=t(function(pe,ht,Fe){var j=arguments.length;switch(j){case 0:return[];case 1:return[pe];case 2:return[pe,ht];case 3:return[pe,ht,Fe];default:for(var r=new Array(j);j--;)r[j]=arguments[j];return r}},"toArray");function V(pe,ht){for(var Fe={},j,r=pe.length,s=ht?ht.length:0,c=0;c<r;c++)j=pe[c],Fe[j]=c<s?ht[c]:a;return Fe}t(V,"toObject");function G(pe,ht,Fe){this._emitter=pe,this._target=ht,this._listeners={},this._listenersCount=0;var j,r;if((Fe.on||Fe.off)&&(j=Fe.on,r=Fe.off),ht.addEventListener?(j=ht.addEventListener,r=ht.removeEventListener):ht.addListener?(j=ht.addListener,r=ht.removeListener):ht.on&&(j=ht.on,r=ht.off),!j&&!r)throw Error("target does not implement any known event API");if(typeof j!="function")throw TypeError("on method must be a function");if(typeof r!="function")throw TypeError("off method must be a function");this._on=j,this._off=r;var s=pe._observers;s?s.push(this):pe._observers=[this]}t(G,"TargetObserver"),Object.assign(G.prototype,{subscribe:t(function(pe,ht,Fe){var j=this,r=this._target,s=this._emitter,c=this._listeners,p=t(function(){var _=U.apply(null,arguments),h={data:_,name:ht,original:pe};if(Fe){var b=Fe.call(r,h);b!==!1&&s.emit.apply(s,[h.name].concat(_));return}s.emit.apply(s,[ht].concat(_))},"handler");if(c[pe])throw Error("Event '"+pe+"' is already listening");this._listenersCount++,s._newListener&&s._removeListener&&!j._onNewListener?(this._onNewListener=function(_){_===ht&&c[pe]===null&&(c[pe]=p,j._on.call(r,pe,p))},s.on("newListener",this._onNewListener),this._onRemoveListener=function(_){_===ht&&!s.hasListeners(_)&&c[pe]&&(c[pe]=null,j._off.call(r,pe,p))},c[pe]=null,s.on("removeListener",this._onRemoveListener)):(c[pe]=p,j._on.call(r,pe,p))},"subscribe"),unsubscribe:t(function(pe){var ht=this,Fe=this._listeners,j=this._emitter,r,s,c=this._off,p=this._target,_;if(pe&&typeof pe!="string")throw TypeError("event must be a string");function h(){ht._onNewListener&&(j.off("newListener",ht._onNewListener),j.off("removeListener",ht._onRemoveListener),ht._onNewListener=null,ht._onRemoveListener=null);var b=Te.call(j,ht);j._observers.splice(b,1)}if(t(h,"clearRefs"),pe){if(r=Fe[pe],!r)return;c.call(p,pe,r),delete Fe[pe],--this._listenersCount||h()}else{for(s=T(Fe),_=s.length;_-- >0;)pe=s[_],c.call(p,pe,Fe[pe]);this._listeners={},this._listenersCount=0,h()}},"unsubscribe")});function X(pe,ht,Fe,j){var r=Object.assign({},ht);if(!pe)return r;if(typeof pe!="object")throw TypeError("options must be an object");var s=Object.keys(pe),c=s.length,p,_,h;function b(A){throw Error('Invalid "'+p+'" option value'+(A?". Reason: "+A:""))}t(b,"reject");for(var E=0;E<c;E++){if(p=s[E],!j&&!l.call(ht,p))throw Error('Unknown "'+p+'" option');_=pe[p],_!==a&&(h=Fe[p],r[p]=h?h(_,b):_)}return r}t(X,"resolveOptions");function Z(pe,ht){return(typeof pe!="function"||!pe.hasOwnProperty("prototype"))&&ht("value must be a constructor"),pe}t(Z,"constructorReducer");function te(pe){var ht="value must be type of "+pe.join("|"),Fe=pe.length,j=pe[0],r=pe[1];return Fe===1?function(s,c){if(typeof s===j)return s;c(ht)}:Fe===2?function(s,c){var p=typeof s;if(p===j||p===r)return s;c(ht)}:function(s,c){for(var p=typeof s,_=Fe;_-- >0;)if(p===pe[_])return s;c(ht)}}t(te,"makeTypeReducer");var ue=te(["function"]),ge=te(["object","function"]);function me(pe,ht,Fe){var j,r,s=0,c,p=new pe(function(_,h,b){Fe=X(Fe,{timeout:0,overload:!1},{timeout:t(function(B,q){return B*=1,(typeof B!="number"||B<0||!Number.isFinite(B))&&q("timeout must be a positive number"),B},"timeout")}),j=!Fe.overload&&typeof pe.prototype.cancel=="function"&&typeof b=="function";function E(){r&&(r=null),s&&(clearTimeout(s),s=0)}t(E,"cleanup");var A=t(function(B){E(),_(B)},"_resolve"),R=t(function(B){E(),h(B)},"_reject");j?ht(A,R,b):(r=[function(B){R(B||Error("canceled"))}],ht(A,R,function(B){if(c)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof B!="function")throw TypeError("onCancel callback must be a function");r.push(B)}),c=!0),Fe.timeout>0&&(s=setTimeout(function(){var B=Error("timeout");B.code="ETIMEDOUT",s=0,p.cancel(B),h(B)},Fe.timeout))});return j||(p.cancel=function(_){if(r){for(var h=r.length,b=1;b<h;b++)r[b](_);r[0](_),r=null}}),p}t(me,"makeCancelablePromise");function Te(pe){var ht=this._observers;if(!ht)return-1;for(var Fe=ht.length,j=0;j<Fe;j++)if(ht[j]._target===pe)return j;return-1}t(Te,"findTargetIndex");function $e(pe,ht,Fe,j,r){if(!Fe)return null;if(j===0){var s=typeof ht;if(s==="string"){var c,p,_=0,h=0,b=this.delimiter,E=b.length;if((p=ht.indexOf(b))!==-1){c=new Array(5);do c[_++]=ht.slice(h,p),h=p+E;while((p=ht.indexOf(b,h))!==-1);c[_++]=ht.slice(h),ht=c,r=_}else ht=[ht],r=1}else s==="object"?r=ht.length:(ht=[ht],r=1)}var A=null,R,B,q,Y,ie,fe=ht[j],he=ht[j+1],be,De;if(j===r)Fe._listeners&&(typeof Fe._listeners=="function"?(pe&&pe.push(Fe._listeners),A=[Fe]):(pe&&pe.push.apply(pe,Fe._listeners),A=[Fe]));else if(fe==="*"){for(be=T(Fe),p=be.length;p-- >0;)R=be[p],R!=="_listeners"&&(De=$e(pe,ht,Fe[R],j+1,r),De&&(A?A.push.apply(A,De):A=De));return A}else if(fe==="**"){for(ie=j+1===r||j+2===r&&he==="*",ie&&Fe._listeners&&(A=$e(pe,ht,Fe,r,r)),be=T(Fe),p=be.length;p-- >0;)R=be[p],R!=="_listeners"&&(R==="*"||R==="**"?(Fe[R]._listeners&&!ie&&(De=$e(pe,ht,Fe[R],r,r),De&&(A?A.push.apply(A,De):A=De)),De=$e(pe,ht,Fe[R],j,r)):R===he?De=$e(pe,ht,Fe[R],j+2,r):De=$e(pe,ht,Fe[R],j,r),De&&(A?A.push.apply(A,De):A=De));return A}else Fe[fe]&&(A=$e(pe,ht,Fe[fe],j+1,r));if(B=Fe["*"],B&&$e(pe,ht,B,j+1,r),q=Fe["**"],q)if(j<r)for(q._listeners&&$e(pe,ht,q,r,r),be=T(q),p=be.length;p-- >0;)R=be[p],R!=="_listeners"&&(R===he?$e(pe,ht,q[R],j+2,r):R===fe?$e(pe,ht,q[R],j+1,r):(Y={},Y[R]=q[R],$e(pe,ht,{"**":Y},j+1,r)));else q._listeners?$e(pe,ht,q,r,r):q["*"]&&q["*"]._listeners&&$e(pe,ht,q["*"],r,r);return A}t($e,"searchListenerTree");function Oe(pe,ht,Fe){var j=0,r=0,s,c=this.delimiter,p=c.length,_;if(typeof pe=="string")if((s=pe.indexOf(c))!==-1){_=new Array(5);do _[j++]=pe.slice(r,s),r=s+p;while((s=pe.indexOf(c,r))!==-1);_[j++]=pe.slice(r)}else _=[pe],j=1;else _=pe,j=pe.length;if(j>1){for(s=0;s+1<j;s++)if(_[s]==="**"&&_[s+1]==="**")return}var h=this.listenerTree,b;for(s=0;s<j;s++)if(b=_[s],h=h[b]||(h[b]={}),s===j-1)return h._listeners?(typeof h._listeners=="function"&&(h._listeners=[h._listeners]),Fe?h._listeners.unshift(ht):h._listeners.push(ht),!h._listeners.warned&&this._maxListeners>0&&h._listeners.length>this._maxListeners&&(h._listeners.warned=!0,F.call(this,h._listeners.length,b))):h._listeners=ht,!0;return!0}t(Oe,"growListenerTree");function Ge(pe,ht,Fe,j){for(var r=T(pe),s=r.length,c,p,_,h=pe._listeners,b;s-- >0;)p=r[s],c=pe[p],p==="_listeners"?_=Fe:_=Fe?Fe.concat(p):[p],b=j||typeof p=="symbol",h&&ht.push(b?_:_.join(this.delimiter)),typeof c=="object"&&Ge.call(this,c,ht,_,b);return ht}t(Ge,"collectTreeEvents");function je(pe){for(var ht=T(pe),Fe=ht.length,j,r,s;Fe-- >0;)r=ht[Fe],j=pe[r],j&&(s=!0,r!=="_listeners"&&!je(j)&&delete pe[r]);return s}t(je,"recursivelyGarbageCollect");function Pe(pe,ht,Fe){this.emitter=pe,this.event=ht,this.listener=Fe}t(Pe,"Listener"),Pe.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function K(pe,ht,Fe){if(Fe===!0)r=!0;else if(Fe===!1)j=!0;else{if(!Fe||typeof Fe!="object")throw TypeError("options should be an object or true");var j=Fe.async,r=Fe.promisify,s=Fe.nextTick,c=Fe.objectify}if(j||s||r){var p=ht,_=ht._origin||ht;if(s&&!m)throw Error("process.nextTick is not supported");r===a&&(r=ht.constructor.name==="AsyncFunction"),ht=t(function(){var h=arguments,b=this,E=this.event;return r?s?Promise.resolve():new Promise(function(A){w(A)}).then(function(){return b.event=E,p.apply(b,h)}):(s?Wme.nextTick:w)(function(){b.event=E,p.apply(b,h)})},"listener"),ht._async=!0,ht._origin=_}return[ht,c?new Pe(this,pe,ht):this]}t(K,"setupListener");function i(pe){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,k.call(this,pe)}t(i,"EventEmitter"),i.EventEmitter2=i,i.prototype.listenTo=function(pe,ht,Fe){if(typeof pe!="object")throw TypeError("target musts be an object");var j=this;Fe=X(Fe,{on:a,off:a,reducers:a},{on:ue,off:ue,reducers:ge});function r(s){if(typeof s!="object")throw TypeError("events must be an object");var c=Fe.reducers,p=Te.call(j,pe),_;p===-1?_=new G(j,pe,Fe):_=j._observers[p];for(var h=T(s),b=h.length,E,A=typeof c=="function",R=0;R<b;R++)E=h[R],_.subscribe(E,s[E]||E,A?c:c&&c[E])}return t(r,"listen"),u(ht)?r(V(ht)):r(typeof ht=="string"?V(ht.split(/\s+/)):ht),this},i.prototype.stopListeningTo=function(pe,ht){var Fe=this._observers;if(!Fe)return!1;var j=Fe.length,r,s=!1;if(pe&&typeof pe!="object")throw TypeError("target should be an object");for(;j-- >0;)r=Fe[j],(!pe||r._target===pe)&&(r.unsubscribe(ht),s=!0);return s},i.prototype.delimiter=".",i.prototype.setMaxListeners=function(pe){pe!==a&&(this._maxListeners=pe,this._conf||(this._conf={}),this._conf.maxListeners=pe)},i.prototype.getMaxListeners=function(){return this._maxListeners},i.prototype.event="",i.prototype.once=function(pe,ht,Fe){return this._once(pe,ht,!1,Fe)},i.prototype.prependOnceListener=function(pe,ht,Fe){return this._once(pe,ht,!0,Fe)},i.prototype._once=function(pe,ht,Fe,j){return this._many(pe,1,ht,Fe,j)},i.prototype.many=function(pe,ht,Fe,j){return this._many(pe,ht,Fe,!1,j)},i.prototype.prependMany=function(pe,ht,Fe,j){return this._many(pe,ht,Fe,!0,j)},i.prototype._many=function(pe,ht,Fe,j,r){var s=this;if(typeof Fe!="function")throw new Error("many only accepts instances of Function");function c(){return--ht===0&&s.off(pe,c),Fe.apply(this,arguments)}return t(c,"listener"),c._origin=Fe,this._on(pe,c,j,r)},i.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||D.call(this);var pe=arguments[0],ht,Fe=this.wildcard,j,r,s,c,p;if(pe==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(Fe&&(ht=pe,pe!=="newListener"&&pe!=="removeListener"&&typeof pe=="object")){if(r=pe.length,y){for(s=0;s<r;s++)if(typeof pe[s]=="symbol"){p=!0;break}}p||(pe=pe.join(this.delimiter))}var _=arguments.length,h;if(this._all&&this._all.length)for(h=this._all.slice(),s=0,r=h.length;s<r;s++)switch(this.event=pe,_){case 1:h[s].call(this,pe);break;case 2:h[s].call(this,pe,arguments[1]);break;case 3:h[s].call(this,pe,arguments[1],arguments[2]);break;default:h[s].apply(this,arguments)}if(Fe)h=[],$e.call(this,h,ht,this.listenerTree,0,r);else if(h=this._events[pe],typeof h=="function"){switch(this.event=pe,_){case 1:h.call(this);break;case 2:h.call(this,arguments[1]);break;case 3:h.call(this,arguments[1],arguments[2]);break;default:for(j=new Array(_-1),c=1;c<_;c++)j[c-1]=arguments[c];h.apply(this,j)}return!0}else h&&(h=h.slice());if(h&&h.length){if(_>3)for(j=new Array(_-1),c=1;c<_;c++)j[c-1]=arguments[c];for(s=0,r=h.length;s<r;s++)switch(this.event=pe,_){case 1:h[s].call(this);break;case 2:h[s].call(this,arguments[1]);break;case 3:h[s].call(this,arguments[1],arguments[2]);break;default:h[s].apply(this,j)}return!0}else if(!this.ignoreErrors&&!this._all&&pe==="error")throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},i.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||D.call(this);var pe=arguments[0],ht=this.wildcard,Fe,j,r,s,c,p;if(pe==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(ht&&(Fe=pe,pe!=="newListener"&&pe!=="removeListener"&&typeof pe=="object")){if(s=pe.length,y){for(c=0;c<s;c++)if(typeof pe[c]=="symbol"){j=!0;break}}j||(pe=pe.join(this.delimiter))}var _=[],h=arguments.length,b;if(this._all)for(c=0,s=this._all.length;c<s;c++)switch(this.event=pe,h){case 1:_.push(this._all[c].call(this,pe));break;case 2:_.push(this._all[c].call(this,pe,arguments[1]));break;case 3:_.push(this._all[c].call(this,pe,arguments[1],arguments[2]));break;default:_.push(this._all[c].apply(this,arguments))}if(ht?(b=[],$e.call(this,b,Fe,this.listenerTree,0)):b=this._events[pe],typeof b=="function")switch(this.event=pe,h){case 1:_.push(b.call(this));break;case 2:_.push(b.call(this,arguments[1]));break;case 3:_.push(b.call(this,arguments[1],arguments[2]));break;default:for(r=new Array(h-1),p=1;p<h;p++)r[p-1]=arguments[p];_.push(b.apply(this,r))}else if(b&&b.length){if(b=b.slice(),h>3)for(r=new Array(h-1),p=1;p<h;p++)r[p-1]=arguments[p];for(c=0,s=b.length;c<s;c++)switch(this.event=pe,h){case 1:_.push(b[c].call(this));break;case 2:_.push(b[c].call(this,arguments[1]));break;case 3:_.push(b[c].call(this,arguments[1],arguments[2]));break;default:_.push(b[c].apply(this,r))}}else if(!this.ignoreErrors&&!this._all&&pe==="error")return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(_)},i.prototype.on=function(pe,ht,Fe){return this._on(pe,ht,!1,Fe)},i.prototype.prependListener=function(pe,ht,Fe){return this._on(pe,ht,!0,Fe)},i.prototype.onAny=function(pe){return this._onAny(pe,!1)},i.prototype.prependAny=function(pe){return this._onAny(pe,!0)},i.prototype.addListener=