0;A++){const P=D[A];P{"use strict";Object.defineProperty(V,"__esModule",{value:!0}),V.BrowserRandomSource=void 0,V.BrowserRandomSource=class y{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const g=typeof self<"u"?self.crypto||self.msCrypto:null;g&&void 0!==g.getRandomValues&&(this._crypto=g,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(g){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const w=new Uint8Array(g);for(let m=0;m{"use strict";Object.defineProperty(V,"__esModule",{value:!0}),V.NodeRandomSource=void 0;const y=x(5136);V.NodeRandomSource=class u{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const w=x(985);w&&w.randomBytes&&(this._crypto=w,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(w){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let m=this._crypto.randomBytes(w);if(m.length!==w)throw new Error("NodeRandomSource: got fewer bytes than requested");const h=new Uint8Array(w);for(let c=0;c{"use strict";Object.defineProperty(V,"__esModule",{value:!0}),V.SystemRandomSource=void 0;const y=x(6367),u=x(2121);V.SystemRandomSource=class g{constructor(){return this.isAvailable=!1,this.name="",this._source=new y.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new u.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(m){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(m)}}},6632:(q,V,x)=>{"use strict";var u=x(7065),g=x(5136);V.k=32,V.cn=64;var w=function(){function f(){this.digestLength=V.k,this.blockSize=V.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return f.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},f.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},f.prototype.clean=function(){g.wipe(this._buffer),g.wipe(this._temp),this.reset()},f.prototype.update=function(d,b){if(void 0===b&&(b=d.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var I=0;if(this._bytesHashed+=b,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=d[I++],b--;this._bufferLength===this.blockSize&&(h(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(b>=this.blockSize&&(I=h(this._temp,this._state,d,I,b),b%=this.blockSize);b>0;)this._buffer[this._bufferLength++]=d[I++],b--;return this},f.prototype.finish=function(d){if(!this._finished){var b=this._bytesHashed,I=this._bufferLength,E=b/536870912|0,v=b<<3,p=b%64<56?64:128;this._buffer[I]=128;for(var D=I+1;D0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(d){return this._state.set(d.state),this._bufferLength=d.bufferLength,d.buffer&&this._buffer.set(d.buffer),this._bytesHashed=d.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(d){g.wipe(d.state),d.buffer&&g.wipe(d.buffer),d.bufferLength=0,d.bytesHashed=0},f}();V.mE=w;var m=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function h(f,d,b,I,E){for(;E>=64;){for(var v=d[0],p=d[1],D=d[2],A=d[3],P=d[4],S=d[5],T=d[6],M=d[7],k=0;k<16;k++)f[k]=u.readUint32BE(b,I+4*k);for(k=16;k<64;k++){var j=f[k-2];f[k]=((C=(j>>>17|j<<15)^(j>>>19|j<<13)^j>>>10)+f[k-7]|0)+((O=((j=f[k-15])>>>7|j<<25)^(j>>>18|j<<14)^j>>>3)+f[k-16]|0)}for(k=0;k<64;k++){var C=(((P>>>6|P<<26)^(P>>>11|P<<21)^(P>>>25|P<<7))+(P&S^~P&T)|0)+(M+(m[k]+f[k]|0)|0)|0,O=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&p^v&D^p&D)|0;M=T,T=S,S=P,P=A+C|0,A=D,D=p,p=v,v=C+O|0}d[0]+=v,d[1]+=p,d[2]+=D,d[3]+=A,d[4]+=P,d[5]+=S,d[6]+=T,d[7]+=M,I+=64,E-=64}return I}V.vp=function c(f){var d=new w;d.update(f);var b=d.digest();return d.clean(),b}},5136:(q,V)=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0}),V.wipe=function x(y){for(var u=0;u{"use strict";V.gi=V.Au=V._w=V.KS=V.kz=void 0;const u=x(12),g=x(5136);function w(k){const F=new Float64Array(16);if(k)for(let j=0;j=0;--te){const oe=j[te>>>3]>>>(7&te)&1;f(O,H,oe),f(L,K,oe),I(ne,O,L),E(O,O,L),I(L,H,K),E(H,H,K),p(K,ne),p(G,O),v(O,L,O),v(L,H,ne),I(ne,O,L),E(O,O,L),p(H,O),E(L,K,G),v(O,L,h),I(O,O,K),v(L,L,O),v(O,K,G),v(K,H,C),p(H,ne),f(O,H,oe),f(L,K,oe)}for(let te=0;te<16;te++)C[te+16]=O[te],C[te+32]=L[te],C[te+48]=H[te],C[te+64]=K[te];const ee=C.subarray(32),Z=C.subarray(16);(function D(k,F){const j=w();for(let C=0;C<16;C++)j[C]=F[C];for(let C=253;C>=0;C--)p(j,j),2!==C&&4!==C&&v(j,j,F);for(let C=0;C<16;C++)k[C]=j[C]})(ee,ee),v(Z,Z,ee);const W=new Uint8Array(32);return function d(k,F){const j=w(),C=w();for(let O=0;O<16;O++)C[O]=F[O];c(C),c(C),c(C);for(let O=0;O<2;O++){j[0]=C[0]-65517;for(let L=1;L<15;L++)j[L]=C[L]-65535-(j[L-1]>>16&1),j[L-1]&=65535;j[15]=C[15]-32767-(j[14]>>16&1);const H=j[15]>>16&1;j[14]&=65535,f(C,j,1-H)}for(let O=0;O<16;O++)k[2*O]=255&C[O],k[2*O+1]=C[O]>>8}(W,Z),W}function P(k){return A(k,m)}function S(k){if(k.length!==V.KS)throw new Error(`x25519: seed must be ${V.KS} bytes`);const F=new Uint8Array(k);return{publicKey:P(F),secretKey:F}}V._w=S,V.Au=function T(k){const F=(0,u.randomBytes)(32,k),j=S(F);return(0,g.wipe)(F),j},V.gi=function M(k,F,j=!1){if(k.length!==V.kz)throw new Error("X25519: incorrect secret key length");if(F.length!==V.kz)throw new Error("X25519: incorrect public key length");const C=A(k,F);if(j){let O=0;for(let H=0;H{function V(x){const y=new globalThis.AbortController;function u(){y.abort();for(const g of x)!g||!g.removeEventListener||g.removeEventListener("abort",u)}for(const g of x)if(g&&g.addEventListener){if(g.aborted){u();break}g.addEventListener("abort",u)}return y.signal}q.exports=V,q.exports.anySignal=V},4084:(q,V,x)=>{V.formatArgs=function u(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+q.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;c.splice(1,0,f,"color: inherit");let d=0,b=0;c[0].replace(/%[a-zA-Z%]/g,I=>{"%%"!==I&&(d++,"%c"===I&&(b=d))}),c.splice(b,0,f)},V.save=function g(c){try{c?V.storage.setItem("debug",c):V.storage.removeItem("debug")}catch{}},V.load=function w(){let c;try{c=V.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c},V.useColors=function y(){return!(!(typeof window<"u"&&window.process)||"renderer"!==window.process.type&&!window.process.__nwjs)||!(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},V.storage=function m(){try{return localStorage}catch{}}(),V.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),V.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],V.log=console.debug||console.log||(()=>{}),q.exports=x(5851)(V);const{formatters:h}=q.exports;h.j=function(c){try{return JSON.stringify(c)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}},5851:(q,V,x)=>{q.exports=function y(u){function w(E){let v,D,A,p=null;function P(...S){if(!P.enabled)return;const T=P,M=Number(new Date);T.diff=M-(v||M),T.prev=v,T.curr=M,v=M,S[0]=w.coerce(S[0]),"string"!=typeof S[0]&&S.unshift("%O");let F=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(C,O)=>{if("%%"===C)return"%";F++;const H=w.formatters[O];return"function"==typeof H&&(C=H.call(T,S[F]),S.splice(F,1),F--),C}),w.formatArgs.call(T,S),(T.log||w.log).apply(T,S)}return P.namespace=E,P.useColors=w.useColors(),P.color=w.selectColor(E),P.extend=m,P.destroy=w.destroy,Object.defineProperty(P,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==p?p:(D!==w.namespaces&&(D=w.namespaces,A=w.enabled(E)),A),set:S=>{p=S}}),"function"==typeof w.init&&w.init(P),P}function m(E,v){const p=w(this.namespace+(typeof v>"u"?":":v)+E);return p.log=this.log,p}function d(E){return E.toString().substring(2,E.toString().length-2).replace(/\.\*\?$/,"*")}return w.debug=w,w.default=w,w.coerce=function b(E){return E instanceof Error?E.stack||E.message:E},w.disable=function c(){const E=[...w.names.map(d),...w.skips.map(d).map(v=>"-"+v)].join(",");return w.enable(""),E},w.enable=function h(E){let v;w.save(E),w.namespaces=E,w.names=[],w.skips=[];const p=("string"==typeof E?E:"").split(/[\s,]+/),D=p.length;for(v=0;v{w[E]=u[E]}),w.names=[],w.skips=[],w.formatters={},w.selectColor=function g(E){let v=0;for(let p=0;p{"use strict";function V(x,u){u=u||{},this._head=0,this._tail=0,this._capacity=u.capacity,this._capacityMask=3,this._list=new Array(4),Array.isArray(x)&&this._fromArray(x)}V.prototype.peekAt=function(y){var u=y;if(u===(0|u)){var g=this.size();if(!(u>=g||u<-g))return u<0&&(u+=g),this._list[u=this._head+u&this._capacityMask]}},V.prototype.get=function(y){return this.peekAt(y)},V.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},V.prototype.peekFront=function(){return this.peek()},V.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(V.prototype,"length",{get:function(){return this.size()}}),V.prototype.size=function(){return this._head===this._tail?0:this._headthis._capacity&&this.pop(),this._head1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),u}},V.prototype.push=function(y){if(void 0===y)return this.size();var u=this._tail;return this._list[u]=y,this._tail=u+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head1e4&&y<=u>>>2&&this._shrinkArray(),g}},V.prototype.removeOne=function(y){var u=y;if(u===(0|u)&&this._head!==this._tail){var g=this.size(),w=this._list.length;if(!(u>=g||u<-g)){u<0&&(u+=g);var h,m=this._list[u=this._head+u&this._capacityMask];if(y0;h--)this._list[u]=this._list[u=u-1+w&this._capacityMask];this._list[u]=void 0,this._head=this._head+1+w&this._capacityMask}else{for(h=g-1-y;h>0;h--)this._list[u]=this._list[u=u+1+w&this._capacityMask];this._list[u]=void 0,this._tail=this._tail-1+w&this._capacityMask}return m}}},V.prototype.remove=function(y,u){var w,g=y,m=u;if(g===(0|g)&&this._head!==this._tail){var h=this.size(),c=this._list.length;if(!(g>=h||g<-h||u<1)){if(g<0&&(g+=h),1===u||!u)return(w=new Array(1))[0]=this.removeOne(g),w;if(0===g&&g+u>=h)return w=this.toArray(),this.clear(),w;var f;for(g+u>h&&(u=h-g),w=new Array(u),f=0;f0;f--)this._list[g=g+1+c&this._capacityMask]=void 0;return w}if(0===y){for(this._head=this._head+u+c&this._capacityMask,f=u-1;f>0;f--)this._list[g=g+1+c&this._capacityMask]=void 0;return w}if(g0;f--)this.unshift(this._list[g=g-1+c&this._capacityMask]);for(g=this._head-1+c&this._capacityMask;m>0;)this._list[g=g-1+c&this._capacityMask]=void 0,m--;y<0&&(this._tail=g)}else{for(this._tail=g,g=g+u+c&this._capacityMask,f=h-(u+y);f>0;f--)this.push(this._list[g++]);for(g=this._tail;m>0;)this._list[g=g+1+c&this._capacityMask]=void 0,m--}return this._head<2&&this._tail>1e4&&this._tail<=c>>>2&&this._shrinkArray(),w}}},V.prototype.splice=function(y,u){var g=y;if(g===(0|g)){var w=this.size();if(g<0&&(g+=w),!(g>w)){if(arguments.length>2){var m,h,c,f=arguments.length,d=this._list.length,b=2;if(!w||g0&&(this._head=this._head+g+d&this._capacityMask)):(c=this.remove(g,u),this._head=this._head+g+d&this._capacityMask);f>b;)this.unshift(arguments[--f]);for(m=g;m>0;m--)this.unshift(h[m-1])}else{var I=(h=new Array(w-(g+u))).length;for(m=0;mthis._tail){for(m=this._head;m>>=1,this._capacityMask>>>=1},q.exports=V},3069:q=>{"use strict";function V(y,u){for(const g in u)Object.defineProperty(y,g,{value:u[g],enumerable:!0,configurable:!0});return y}q.exports=function x(y,u,g){if(!y||"string"==typeof y)throw new TypeError("Please pass an Error to err-code");g||(g={}),"object"==typeof u&&(g=u,u=""),u&&(g.code=u);try{return V(y,g)}catch{g.message=y.message,g.stack=y.stack;const m=function(){};return m.prototype=Object.create(Object.getPrototypeOf(y)),V(new m,g)}}},3715:(q,V,x)=>{"use strict";const u=x(7663);V.zN=u.EventIterator},7663:(q,V)=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});class x{constructor(){this.pullQueue=[],this.pushQueue=[],this.eventHandlers={},this.isPaused=!1,this.isStopped=!1}push(g){if(this.isStopped)return;const w={value:g,done:!1};if(this.pullQueue.length){const m=this.pullQueue.shift();m&&m.resolve(w)}else this.pushQueue.push(Promise.resolve(w)),void 0!==this.highWaterMark&&this.pushQueue.length>=this.highWaterMark&&!this.isPaused&&(this.isPaused=!0,this.eventHandlers.highWater?this.eventHandlers.highWater():console&&console.warn(`EventIterator queue reached ${this.pushQueue.length} items`))}stop(){if(!this.isStopped){this.isStopped=!0,this.remove();for(const g of this.pullQueue)g.resolve({value:void 0,done:!0});this.pullQueue.length=0}}fail(g){if(!this.isStopped)if(this.isStopped=!0,this.remove(),this.pullQueue.length){for(const w of this.pullQueue)w.reject(g);this.pullQueue.length=0}else{const w=Promise.reject(g);w.catch(()=>{}),this.pushQueue.push(w)}}remove(){Promise.resolve().then(()=>{this.removeCallback&&this.removeCallback()})}[Symbol.asyncIterator](){return{next:g=>{const w=this.pushQueue.shift();return w?(void 0!==this.lowWaterMark&&this.pushQueue.length<=this.lowWaterMark&&this.isPaused&&(this.isPaused=!1,this.eventHandlers.lowWater&&this.eventHandlers.lowWater()),w):this.isStopped?Promise.resolve({value:void 0,done:!0}):new Promise((m,h)=>{this.pullQueue.push({resolve:m,reject:h})})},return:()=>(this.isStopped=!0,this.pushQueue.length=0,this.remove(),Promise.resolve({value:void 0,done:!0}))}}}class y{constructor(g,{highWaterMark:w=100,lowWaterMark:m=1}={}){const h=new x;h.highWaterMark=w,h.lowWaterMark=m,h.removeCallback=g({push:c=>h.push(c),stop:()=>h.stop(),fail:c=>h.fail(c),on:(c,f)=>{h.eventHandlers[c]=f}})||(()=>{}),this[Symbol.asyncIterator]=()=>h[Symbol.asyncIterator](),Object.freeze(this)}}V.EventIterator=y,V.default=y},4818:q=>{"use strict";var V=Object.prototype.hasOwnProperty,x="~";function y(){}function u(h,c,f){this.fn=h,this.context=c,this.once=f||!1}function g(h,c,f,d,b){if("function"!=typeof f)throw new TypeError("The listener must be a function");var I=new u(f,d||h,b),E=x?x+c:c;return h._events[E]?h._events[E].fn?h._events[E]=[h._events[E],I]:h._events[E].push(I):(h._events[E]=I,h._eventsCount++),h}function w(h,c){0==--h._eventsCount?h._events=new y:delete h._events[c]}function m(){this._events=new y,this._eventsCount=0}Object.create&&(y.prototype=Object.create(null),(new y).__proto__||(x=!1)),m.prototype.eventNames=function(){var f,d,c=[];if(0===this._eventsCount)return c;for(d in f=this._events)V.call(f,d)&&c.push(x?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},m.prototype.listeners=function(c){var d=this._events[x?x+c:c];if(!d)return[];if(d.fn)return[d.fn];for(var b=0,I=d.length,E=new Array(I);b{"use strict";var y,V="object"==typeof Reflect?Reflect:null,x=V&&"function"==typeof V.apply?V.apply:function(M,k,F){return Function.prototype.apply.call(M,k,F)};y=V&&"function"==typeof V.ownKeys?V.ownKeys:Object.getOwnPropertySymbols?function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:function(M){return Object.getOwnPropertyNames(M)};var g=Number.isNaN||function(M){return M!=M};function w(){w.init.call(this)}q.exports=w,q.exports.once=function A(T,M){return new Promise(function(k,F){function j(O){T.removeListener(M,C),F(O)}function C(){"function"==typeof T.removeListener&&T.removeListener("error",j),k([].slice.call(arguments))}S(T,M,C,{once:!0}),"error"!==M&&function P(T,M,k){"function"==typeof T.on&&S(T,"error",M,k)}(T,j,{once:!0})})},w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var m=10;function h(T){if("function"!=typeof T)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof T)}function c(T){return void 0===T._maxListeners?w.defaultMaxListeners:T._maxListeners}function f(T,M,k,F){var j,C,O;if(h(k),void 0===(C=T._events)?(C=T._events=Object.create(null),T._eventsCount=0):(void 0!==C.newListener&&(T.emit("newListener",M,k.listener?k.listener:k),C=T._events),O=C[M]),void 0===O)O=C[M]=k,++T._eventsCount;else if("function"==typeof O?O=C[M]=F?[k,O]:[O,k]:F?O.unshift(k):O.push(k),(j=c(T))>0&&O.length>j&&!O.warned){O.warned=!0;var H=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");H.name="MaxListenersExceededWarning",H.emitter=T,H.type=M,H.count=O.length,function u(T){console&&console.warn&&console.warn(T)}(H)}return T}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(T,M,k){var F={fired:!1,wrapFn:void 0,target:T,type:M,listener:k},j=d.bind(F);return j.listener=k,F.wrapFn=j,j}function I(T,M,k){var F=T._events;if(void 0===F)return[];var j=F[M];return void 0===j?[]:"function"==typeof j?k?[j.listener||j]:[j]:k?function D(T){for(var M=new Array(T.length),k=0;k0&&(O=k[0]),O instanceof Error)throw O;var H=new Error("Unhandled error."+(O?" ("+O.message+")":""));throw H.context=O,H}var L=C[M];if(void 0===L)return!1;if("function"==typeof L)x(L,this,k);else{var K=L.length,ne=v(L,K);for(F=0;F=0;O--)if(F[O]===k||F[O].listener===k){H=F[O].listener,C=O;break}if(C<0)return this;0===C?F.shift():function p(T,M){for(;M+1=0;j--)this.removeListener(M,k[j]);return this},w.prototype.listeners=function(M){return I(this,M,!0)},w.prototype.rawListeners=function(M){return I(this,M,!1)},w.listenerCount=function(T,M){return"function"==typeof T.listenerCount?T.listenerCount(M):E.call(T,M)},w.prototype.listenerCount=E,w.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]}},7965:q=>{q.exports=class{constructor(x){if(!(x>0)||0!=(x-1&x))throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(x),this.mask=x-1,this.top=0,this.btm=0,this.next=null}push(x){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=x,this.top=this.top+1&this.mask,!0)}shift(){const x=this.buffer[this.btm];if(void 0!==x)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,x}peek(){return this.buffer[this.btm]}isEmpty(){return void 0===this.buffer[this.btm]}}},4814:(q,V,x)=>{const y=x(7965);q.exports=class{constructor(g){this.hwm=g||16,this.head=new y(this.hwm),this.tail=this.head}push(g){this.head.push(g)||(this.head=this.head.next=new y(2*this.head.buffer.length),this.head.push(g))}shift(){const g=this.tail.shift();if(void 0===g&&this.tail.next){const w=this.tail.next;return this.tail.next=null,this.tail=w,this.tail.shift()}return g}peek(){return this.tail.peek()}isEmpty(){return this.head.isEmpty()}}},4591:q=>{q.exports=function(V){if(!V)throw Error("hashlru must have a max value, of type number, greater than 0");var x=0,y=Object.create(null),u=Object.create(null);function g(w,m){y[w]=m,++x>=V&&(x=0,u=y,y=Object.create(null))}return{has:function(w){return void 0!==y[w]||void 0!==u[w]},remove:function(w){void 0!==y[w]&&(y[w]=void 0),void 0!==u[w]&&(u[w]=void 0)},get:function(w){var m=y[w];return void 0!==m?m:void 0!==(m=u[w])?(g(w,m),m):void 0},set:function(w,m){void 0!==y[w]?y[w]=m:g(w,m)},clear:function(){y=Object.create(null),u=Object.create(null)}}}},5972:q=>{"use strict";const V="[a-fA-F\\d:]",x=f=>f&&f.includeBoundaries?`(?:(?<=\\s|^)(?=${V})|(?<=${V})(?=\\s|$))`:"",y="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",u="[a-fA-F\\d]{1,4}",g=`\n(?:\n(?:${u}:){7}(?:${u}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${u}:){6}(?:${y}|:${u}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${u}:){5}(?::${y}|(?::${u}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${u}:){4}(?:(?::${u}){0,1}:${y}|(?::${u}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${u}:){3}(?:(?::${u}){0,2}:${y}|(?::${u}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${u}:){2}(?:(?::${u}){0,3}:${y}|(?::${u}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${u}:){1}(?:(?::${u}){0,4}:${y}|(?::${u}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${u}){0,5}:${y}|(?::${u}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),w=new RegExp(`(?:^${y}$)|(?:^${g}$)`),m=new RegExp(`^${y}$`),h=new RegExp(`^${g}$`),c=f=>f&&f.exact?w:new RegExp(`(?:${x(f)}${y}${x(f)})|(?:${x(f)}${g}${x(f)})`,"g");c.v4=f=>f&&f.exact?m:new RegExp(`${x(f)}${y}${x(f)}`,"g"),c.v6=f=>f&&f.exact?h:new RegExp(`${x(f)}${g}${x(f)}`,"g"),q.exports=c},2459:function(q){!function(V){"use strict";const x="(0?\\d+|0x[a-f0-9]+)",y={fourOctet:new RegExp(`^${x}\\.${x}\\.${x}\\.${x}$`,"i"),threeOctet:new RegExp(`^${x}\\.${x}\\.${x}$`,"i"),twoOctet:new RegExp(`^${x}\\.${x}$`,"i"),longValue:new RegExp(`^${x}$`,"i")},u=new RegExp("^0[0-7]+$","i"),g=new RegExp("^0x[a-f0-9]+$","i"),w="%[0-9a-z]{1,}",m="(?:[0-9a-f]+::?)+",h={zoneIndex:new RegExp(w,"i"),native:new RegExp(`^(::)?(${m})?([0-9a-f]+)?(::)?(${w})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${x}\\.${x}\\.${x}\\.${x}(${w})?)$`,"i"),transitional:new RegExp(`^((?:${m})|(?:::)(?:${m})?)${x}\\.${x}\\.${x}\\.${x}(${w})?$`,"i")};function c(E,v){if(E.indexOf("::")!==E.lastIndexOf("::"))return null;let P,S,p=0,D=-1,A=(E.match(h.zoneIndex)||[])[0];for(A&&(A=A.substring(1),E=E.replace(/%.+$/,""));(D=E.indexOf(":",D+1))>=0;)p++;if("::"===E.substr(0,2)&&p--,"::"===E.substr(-2,2)&&p--,p>v)return null;for(S=v-p,P=":";S--;)P+="0:";return":"===(E=E.replace("::",P))[0]&&(E=E.slice(1)),":"===E[E.length-1]&&(E=E.slice(0,-1)),{parts:v=function(){const T=E.split(":"),M=[];for(let k=0;k0;){if(P=p-D,P<0&&(P=0),E[A]>>P!=v[A]>>P)return!1;D-=p,A+=1}return!0}function d(E){if(g.test(E))return parseInt(E,16);if("0"===E[0]&&!isNaN(parseInt(E[1],10))){if(u.test(E))return parseInt(E,8);throw new Error(`ipaddr: cannot parse ${E} as octal`)}return parseInt(E,10)}function b(E,v){for(;E.length=0;A-=1){if(P=this.octets[A],!(P in D))return null;if(S=D[P],p&&0!==S)return null;8!==S&&(p=!0),v+=S}return 32-v},E.prototype.range=function(){return I.subnetMatch(this,this.SpecialRanges)},E.prototype.toByteArray=function(){return this.octets.slice(0)},E.prototype.toIPv4MappedAddress=function(){return I.IPv6.parse(`::ffff:${this.toString()}`)},E.prototype.toNormalizedString=function(){return this.toString()},E.prototype.toString=function(){return this.octets.join(".")},E}(),I.IPv4.broadcastAddressFromCIDR=function(E){try{const v=this.parseCIDR(E),p=v[0].toByteArray(),D=this.subnetMaskFromPrefixLength(v[1]).toByteArray(),A=[];let P=0;for(;P<4;)A.push(parseInt(p[P],10)|255^parseInt(D[P],10)),P++;return new this(A)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},I.IPv4.isIPv4=function(E){return null!==this.parser(E)},I.IPv4.isValid=function(E){try{return new this(this.parser(E)),!0}catch{return!1}},I.IPv4.isValidFourPartDecimal=function(E){return!(!I.IPv4.isValid(E)||!E.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},I.IPv4.networkAddressFromCIDR=function(E){let v,p,D,A,P;try{for(v=this.parseCIDR(E),D=v[0].toByteArray(),P=this.subnetMaskFromPrefixLength(v[1]).toByteArray(),A=[],p=0;p<4;)A.push(parseInt(D[p],10)&parseInt(P[p],10)),p++;return new this(A)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},I.IPv4.parse=function(E){const v=this.parser(E);if(null===v)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(v)},I.IPv4.parseCIDR=function(E){let v;if(v=E.match(/^(.+)\/(\d+)$/)){const p=parseInt(v[2]);if(p>=0&&p<=32){const D=[this.parse(v[1]),p];return Object.defineProperty(D,"toString",{value:function(){return this.join("/")}}),D}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},I.IPv4.parser=function(E){let v,p,D;if(v=E.match(y.fourOctet))return function(){const A=v.slice(1,6),P=[];for(let S=0;S4294967295||D<0)throw new Error("ipaddr: address outside defined range");return function(){const A=[];let P;for(P=0;P<=24;P+=8)A.push(D>>P&255);return A}().reverse()}return(v=E.match(y.twoOctet))?function(){const A=v.slice(1,4),P=[];if(D=d(A[1]),D>16777215||D<0)throw new Error("ipaddr: address outside defined range");return P.push(d(A[0])),P.push(D>>16&255),P.push(D>>8&255),P.push(255&D),P}():(v=E.match(y.threeOctet))?function(){const A=v.slice(1,5),P=[];if(D=d(A[2]),D>65535||D<0)throw new Error("ipaddr: address outside defined range");return P.push(d(A[0])),P.push(d(A[1])),P.push(D>>8&255),P.push(255&D),P}():null},I.IPv4.subnetMaskFromPrefixLength=function(E){if((E=parseInt(E))<0||E>32)throw new Error("ipaddr: invalid IPv4 prefix length");const v=[0,0,0,0];let p=0;const D=Math.floor(E/8);for(;p=0;S-=1){if(A=this.parts[S],!(A in D))return null;if(P=D[A],p&&0!==P)return null;16!==P&&(p=!0),v+=P}return 128-v},E.prototype.range=function(){return I.subnetMatch(this,this.SpecialRanges)},E.prototype.toByteArray=function(){let v;const p=[],D=this.parts;for(let A=0;A>8),p.push(255&v);return p},E.prototype.toFixedLengthString=function(){const v=function(){const D=[];for(let A=0;A>8,255&p,D>>8,255&D])},E.prototype.toNormalizedString=function(){const v=function(){const D=[];for(let A=0;AA&&(D=P.index,A=P[0].length);return A<0?p:`${p.substring(0,D)}::${p.substring(D+A)}`},E.prototype.toString=function(){return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/,"::")},E}(),I.IPv6.broadcastAddressFromCIDR=function(E){try{const v=this.parseCIDR(E),p=v[0].toByteArray(),D=this.subnetMaskFromPrefixLength(v[1]).toByteArray(),A=[];let P=0;for(;P<16;)A.push(parseInt(p[P],10)|255^parseInt(D[P],10)),P++;return new this(A)}catch(v){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${v})`)}},I.IPv6.isIPv6=function(E){return null!==this.parser(E)},I.IPv6.isValid=function(E){if("string"==typeof E&&-1===E.indexOf(":"))return!1;try{const v=this.parser(E);return new this(v.parts,v.zoneId),!0}catch{return!1}},I.IPv6.networkAddressFromCIDR=function(E){let v,p,D,A,P;try{for(v=this.parseCIDR(E),D=v[0].toByteArray(),P=this.subnetMaskFromPrefixLength(v[1]).toByteArray(),A=[],p=0;p<16;)A.push(parseInt(D[p],10)&parseInt(P[p],10)),p++;return new this(A)}catch(S){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${S})`)}},I.IPv6.parse=function(E){const v=this.parser(E);if(null===v.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(v.parts,v.zoneId)},I.IPv6.parseCIDR=function(E){let v,p,D;if((p=E.match(/^(.+)\/(\d+)$/))&&(v=parseInt(p[2]),v>=0&&v<=128))return D=[this.parse(p[1]),v],Object.defineProperty(D,"toString",{value:function(){return this.join("/")}}),D;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},I.IPv6.parser=function(E){let v,p,D,A,P,S;if(D=E.match(h.deprecatedTransitional))return this.parser(`::ffff:${D[1]}`);if(h.native.test(E))return c(E,8);if((D=E.match(h.transitional))&&(S=D[6]||"",v=c(D[1].slice(0,-1)+S,6),v.parts)){for(P=[parseInt(D[2]),parseInt(D[3]),parseInt(D[4]),parseInt(D[5])],p=0;p128)throw new Error("ipaddr: invalid IPv6 prefix length");const v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let p=0;const D=Math.floor(E/8);for(;p{q.exports=function V(){return typeof window<"u"&&"object"==typeof window.process&&"renderer"===window.process.type||typeof process<"u"&&"object"==typeof process.versions&&!!process.versions.electron||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0}},4129:(q,V,x)=>{"use strict";const y=x(5972),u=g=>y({exact:!0}).test(g);u.v4=g=>y.v4({exact:!0}).test(g),u.v6=g=>y.v6({exact:!0}).test(g),u.version=g=>u(g)?u.v4(g)?4:6:void 0,q.exports=u},8582:q=>{"use strict";q.exports=V=>{if("[object Object]"!==Object.prototype.toString.call(V))return!1;const x=Object.getPrototypeOf(V);return null===x||x===Object.prototype}},5499:(q,V,x)=>{"use strict";const{URLWithLegacySupport:y,format:u,URLSearchParams:g,defaultBase:w}=x(6876),m=x(7912);q.exports={URL:y,URLSearchParams:g,format:u,relative:m,defaultBase:w}},7912:(q,V,x)=>{"use strict";const{URLWithLegacySupport:y,format:u}=x(6876);q.exports=(g,w={},m={},h)=>{let f,c=w.protocol?w.protocol.replace(":",""):"http";c=(m[c]||h||c)+":";try{f=new y(g)}catch{f={}}const d=Object.assign({},w,{protocol:c||f.protocol,host:w.host||f.host});return new y(g,u(d)).toString()}},6876:q=>{"use strict";const V=typeof navigator<"u"&&"ReactNative"===navigator.product,y=self.URL,u=function x(){return V?"http://localhost":self.location?self.location.protocol+"//"+self.location.host:""}();q.exports={URLWithLegacySupport:class g{constructor(h="",c=u){this.super=new y(h,c),this.path=this.pathname+this.search,this.auth=this.username&&this.password?this.username+":"+this.password:null,this.query=this.search&&this.search.startsWith("?")?this.search.slice(1):null}get hash(){return this.super.hash}get host(){return this.super.host}get hostname(){return this.super.hostname}get href(){return this.super.href}get origin(){return this.super.origin}get password(){return this.super.password}get pathname(){return this.super.pathname}get port(){return this.super.port}get protocol(){return this.super.protocol}get search(){return this.super.search}get searchParams(){return this.super.searchParams}get username(){return this.super.username}set hash(h){this.super.hash=h}set host(h){this.super.host=h}set hostname(h){this.super.hostname=h}set href(h){this.super.href=h}set password(h){this.super.password=h}set pathname(h){this.super.pathname=h}set port(h){this.super.port=h}set protocol(h){this.super.protocol=h}set search(h){this.super.search=h}set username(h){this.super.username=h}static createObjectURL(h){return y.createObjectURL(h)}static revokeObjectURL(h){y.revokeObjectURL(h)}toJSON(){return this.super.toJSON()}toString(){return this.super.toString()}format(){return this.toString()}},URLSearchParams:self.URLSearchParams,defaultBase:u,format:function w(m){if("string"==typeof m)return new y(m).toString();if(!(m instanceof y)){const c=m.auth?m.auth+"@":"",f=m.port?":"+m.port:"",I=m.hostname||"",E=m.search||(m.query?"?"+m.query:""),p=m.pathname||"";return`${m.protocol?m.protocol+"//":""}${(m.username&&m.password?`${m.username}:${m.password}@`:"")||c}${m.host||I+f}${m.path||p+E}${m.hash||""}`}}}},2797:(q,V,x)=>{"use strict";var y=x(411).default,u=x(2508).default;q.exports=function(){var w=y(function*(m){const h=[];var d,c=!1,f=!1;try{for(var I,b=u(m);c=!(I=yield b.next()).done;c=!1)h.push(I.value)}catch(E){f=!0,d=E}finally{try{c&&null!=b.return&&(yield b.return())}finally{if(f)throw d}}return h});return function(h){return w.apply(this,arguments)}}()},363:(q,V,x)=>{"use strict";var y=x(411).default,u=x(2508).default;q.exports=function(){var w=y(function*(m){var f,h=!1,c=!1;try{for(var d=u(m);h=!(yield d.next()).done;h=!1);}catch(I){c=!0,f=I}finally{try{h&&null!=d.return&&(yield d.return())}finally{if(c)throw f}}});return function(h){return w.apply(this,arguments)}}()},8080:(q,V,x)=>{"use strict";var y=x(2449).default,u=x(3683).default,g=x(2508).default;q.exports=function(){var m=u(function*(h,c){var b,f=!1,d=!1;try{for(var E,I=g(h);f=!(E=yield y(I.next())).done;f=!1){const v=E.value;(yield y(c(v)))&&(yield v)}}catch(v){d=!0,b=v}finally{try{f&&null!=I.return&&(yield y(I.return()))}finally{if(d)throw b}}});return function(c,f){return m.apply(this,arguments)}}()},247:(q,V,x)=>{"use strict";var y=x(411).default,u=x(2508).default;q.exports=function(){var w=y(function*(m){var f,h=!1,c=!1;try{for(var b,d=u(m);h=!(b=yield d.next()).done;h=!1)return b.value}catch(I){c=!0,f=I}finally{try{h&&null!=d.return&&(yield d.return())}finally{if(c)throw f}}});return function(h){return w.apply(this,arguments)}}()},7837:(q,V,x)=>{"use strict";var y=x(2449).default,u=x(3683).default,g=x(2508).default;q.exports=function(){var m=u(function*(h,c){var b,f=!1,d=!1;try{for(var E,I=g(h);f=!(E=yield y(I.next())).done;f=!1){const v=E.value;yield y(c(v)),yield v}}catch(v){d=!0,b=v}finally{try{f&&null!=I.return&&(yield y(I.return()))}finally{if(d)throw b}}});return function(c,f){return m.apply(this,arguments)}}()},3412:(q,V,x)=>{"use strict";var y=x(2449).default,u=x(3683).default,g=x(2508).default;q.exports=function(){var m=u(function*(h,c){var b,f=!1,d=!1;try{for(var E,I=g(h);f=!(E=yield y(I.next())).done;f=!1){const v=E.value;yield c(v)}}catch(v){d=!0,b=v}finally{try{f&&null!=I.return&&(yield y(I.return()))}finally{if(d)throw b}}});return function(c,f){return m.apply(this,arguments)}}()},4368:(q,V,x)=>{"use strict";var y=x(411).default,u=x(3683).default,g=x(2449).default,w=x(2508).default,m=x(4670).default;const h=x(8710);q.exports=function(){var f=u(function*(...d){const b=h();setTimeout(y(function*(){try{yield Promise.all(d.map(function(){var I=y(function*(E){var D,v=!1,p=!1;try{for(var P,A=w(E);v=!(P=yield A.next()).done;v=!1)b.push(P.value)}catch(S){p=!0,D=S}finally{try{v&&null!=A.return&&(yield A.return())}finally{if(p)throw D}}});return function(E){return I.apply(this,arguments)}}())),b.end()}catch(I){b.end(I)}}),0),yield*m(w(b),g)});return function(){return f.apply(this,arguments)}}()},8710:(q,V,x)=>{const y=x(4814);q.exports=u=>{let g;"function"==typeof(u=u||{})?(g=u,u={}):g=u.onEnd;let m,h,c,w=new y;const d=A=>h?h(A):(w.push(A),m),I=A=>c?m:d({done:!1,value:A}),E=A=>c?m:(c=!0,A?(A=>(w=new y,h?h({error:A}):(w.push({error:A}),m)))(A):d({done:!0}));if(m={[Symbol.asyncIterator](){return this},next:()=>{if(!w.isEmpty()){if(u.writev){let P;const S=[];for(;!w.isEmpty();){if(P=w.shift(),P.error)throw P.error;S.push(P.value)}return{done:P.done,value:S}}const A=w.shift();if(A.error)throw A.error;return A}return c?{done:!0}:new Promise((A,P)=>{h=S=>(h=null,S.error?P(S.error):A(u.writev&&!S.done?{done:S.done,value:[S.value]}:S),m)})},return:()=>(w=new y,E(),{done:!0}),throw:A=>(E(A),{done:!0}),push:I,end:E},!g)return m;const D=m;return m={[Symbol.asyncIterator](){return this},next:()=>D.next(),throw:A=>(D.throw(A),g&&(g(A),g=null),{done:!0}),return:()=>(D.return(),g&&(g(),g=null),{done:!0}),push:I,end:A=>(D.end(A),g&&(g(A),g=null),m)},m}},9740:(q,V,x)=>{"use strict";var y=x(2449).default,u=x(3683).default,g=x(2508).default;q.exports=function(){var m=u(function*(h,c){let f=0;if(!(c<1)){var I,d=!1,b=!1;try{for(var v,E=g(h);d=!(v=yield y(E.next())).done;d=!1)if(yield v.value,f++,f===c)return}catch(p){b=!0,I=p}finally{try{d&&null!=E.return&&(yield y(E.return()))}finally{if(b)throw I}}}});return function(c,f){return m.apply(this,arguments)}}()},191:function(q,V,x){"use strict";const y=x(8582),{hasOwnProperty:u}=Object.prototype,{propertyIsEnumerable:g}=Object,w=(p,D,A)=>Object.defineProperty(p,D,{value:A,writable:!0,enumerable:!0,configurable:!0}),m=this,h={concatArrays:!1,ignoreUndefined:!1},c=p=>{const D=[];for(const A in p)u.call(p,A)&&D.push(A);if(Object.getOwnPropertySymbols){const A=Object.getOwnPropertySymbols(p);for(const P of A)g.call(p,P)&&D.push(P)}return D};function f(p){return Array.isArray(p)?function d(p){const D=p.slice(0,0);return c(p).forEach(A=>{w(D,A,f(p[A]))}),D}(p):y(p)?function b(p){const D=null===Object.getPrototypeOf(p)?Object.create(null):{};return c(p).forEach(A=>{w(D,A,f(p[A]))}),D}(p):p}const I=(p,D,A,P)=>(A.forEach(S=>{typeof D[S]>"u"&&P.ignoreUndefined||(S in p&&p[S]!==Object.getPrototypeOf(p)?w(p,S,v(p[S],D[S],P)):w(p,S,f(D[S])))}),p);function v(p,D,A){return A.concatArrays&&Array.isArray(p)&&Array.isArray(D)?((p,D,A)=>{let P=p.slice(0,0),S=0;return[p,D].forEach(T=>{const M=[];for(let k=0;k!M.includes(k)),A)}),P})(p,D,A):y(D)&&y(p)?I(p,D,c(D),A):f(D)}q.exports=function(...p){const D=v(f(h),this!==m&&this||{},h);let A={_:{}};for(const P of p)if(void 0!==P){if(!y(P))throw new TypeError("`"+P+"` is not an Option Object");A=v(A,{_:P},D)}return A._}},1663:q=>{var V=1e3,x=60*V,y=60*x,u=24*y;function f(d,b,I,E){var v=b>=1.5*I;return Math.round(d/I)+" "+E+(v?"s":"")}q.exports=function(d,b){b=b||{};var I=typeof d;if("string"===I&&d.length>0)return function m(d){if(!((d=String(d)).length>100)){var b=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(b){var I=parseFloat(b[1]);switch((b[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*I;case"weeks":case"week":case"w":return 6048e5*I;case"days":case"day":case"d":return I*u;case"hours":case"hour":case"hrs":case"hr":case"h":return I*y;case"minutes":case"minute":case"mins":case"min":case"m":return I*x;case"seconds":case"second":case"secs":case"sec":case"s":return I*V;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}(d);if("number"===I&&isFinite(d))return b.long?function c(d){var b=Math.abs(d);return b>=u?f(d,b,u,"day"):b>=y?f(d,b,y,"hour"):b>=x?f(d,b,x,"minute"):b>=V?f(d,b,V,"second"):d+" ms"}(d):function h(d){var b=Math.abs(d);return b>=u?Math.round(d/u)+"d":b>=y?Math.round(d/y)+"h":b>=x?Math.round(d/x)+"m":b>=V?Math.round(d/V)+"s":d+"ms"}(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))}},1343:q=>{var V=1e3,x=60*V,y=60*x,u=24*y;function f(d,b,I,E){var v=b>=1.5*I;return Math.round(d/I)+" "+E+(v?"s":"")}q.exports=function(d,b){b=b||{};var I=typeof d;if("string"===I&&d.length>0)return function m(d){if(!((d=String(d)).length>100)){var b=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(b){var I=parseFloat(b[1]);switch((b[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*I;case"weeks":case"week":case"w":return 6048e5*I;case"days":case"day":case"d":return I*u;case"hours":case"hour":case"hrs":case"hr":case"h":return I*y;case"minutes":case"minute":case"mins":case"min":case"m":return I*x;case"seconds":case"second":case"secs":case"sec":case"s":return I*V;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}(d);if("number"===I&&isFinite(d))return b.long?function c(d){var b=Math.abs(d);return b>=u?f(d,b,u,"day"):b>=y?f(d,b,y,"hour"):b>=x?f(d,b,x,"minute"):b>=V?f(d,b,V,"second"):d+" ms"}(d):function h(d){var b=Math.abs(d);return b>=u?Math.round(d/u)+"d":b>=y?Math.round(d/y)+"h":b>=x?Math.round(d/x)+"m":b>=V?Math.round(d/V)+"s":d+"ms"}(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))}},1626:q=>{"use strict";function V(x){if(Array.isArray(x)){for(var y=0,u=Array(x.length);y>>24,(f&255<<16)>>>16,(65280&f)>>>8,255&f].join(".")},h=function(f){var d,I,E,v,p;for(d=[],I=E=0;E<=3&&0!==f.length;I=++E){if(I>0){if("."!==f[0])throw new Error("Invalid IP");f=f.substring(1)}v=(p=y(f))[0],f=f.substring(p[1]),d.push(v)}if(0!==f.length)throw new Error("Invalid IP");switch(d.length){case 1:if(d[0]>4294967295)throw new Error("Invalid IP");return d[0]>>>0;case 2:if(d[0]>255||d[1]>16777215)throw new Error("Invalid IP");return(d[0]<<24|d[1])>>>0;case 3:if(d[0]>255||d[1]>255||d[2]>65535)throw new Error("Invalid IP");return(d[0]<<24|d[1]<<16|d[2])>>>0;case 4:if(d[0]>255||d[1]>255||d[2]>255||d[3]>255)throw new Error("Invalid IP");return(d[0]<<24|d[1]<<16|d[2]<<8|d[3])>>>0;default:throw new Error("Invalid IP")}},g=(u=function(f){return f.charCodeAt(0)})("0"),m=u("a"),w=u("A"),y=function(f){var d,b,I,E,v;for(E=0,d=10,b="9",I=0,f.length>1&&"0"===f[I]&&("x"===f[I+1]||"X"===f[I+1]?(I+=2,d=16):"0"<=f[I+1]&&f[I+1]<="9"&&(I++,d=8,b="7")),v=I;I>>0;else{if(16!==d)break;if("a"<=f[I]&&f[I]<="f")E=E*d+(10+u(f[I])-m)>>>0;else{if(!("A"<=f[I]&&f[I]<="F"))break;E=E*d+(10+u(f[I])-w)>>>0}}if(E>4294967295)throw new Error("too large");I++}if(I===v)throw new Error("empty octet");return[E,I]},x=function(){function f(d,b){var E,v,p;if("string"!=typeof d)throw new Error("Missing `net' parameter");if(b||(p=d.split("/",2),d=p[0],b=p[1]),b||(b=32),"string"==typeof b&&b.indexOf(".")>-1){try{this.maskLong=h(b)}catch(D){throw new Error("Invalid mask: "+b)}for(E=v=32;v>=0;E=--v)if(this.maskLong===4294967295<<32-E>>>0){this.bitmask=E;break}}else{if(!b&&0!==b)throw new Error("Invalid mask: empty");this.bitmask=parseInt(b,10),this.maskLong=0,this.bitmask>0&&(this.maskLong=4294967295<<32-this.bitmask>>>0)}try{this.netLong=(h(d)&this.maskLong)>>>0}catch(D){throw new Error("Invalid net address: "+d)}if(!(this.bitmask<=32))throw new Error("Invalid mask for ip4: "+b);this.size=Math.pow(2,32-this.bitmask),this.base=c(this.netLong),this.mask=c(this.maskLong),this.hostmask=c(~this.maskLong),this.first=this.bitmask<=30?c(this.netLong+1):this.base,this.last=c(this.bitmask<=30?this.netLong+this.size-2:this.netLong+this.size-1),this.broadcast=this.bitmask<=30?c(this.netLong+this.size-1):void 0}return f.prototype.contains=function(d){return"string"==typeof d&&(d.indexOf("/")>0||4!==d.split(".").length)&&(d=new f(d)),d instanceof f?this.contains(d.base)&&this.contains(d.broadcast||d.last):(h(d)&this.maskLong)>>>0==(this.netLong&this.maskLong)>>>0},f.prototype.next=function(d){return null==d&&(d=1),new f(c(this.netLong+this.size*d),this.mask)},f.prototype.forEach=function(d){var b,I,E;for(E=h(this.first),I=h(this.last),b=0;E<=I;)d(c(E),E,b),b++,E++},f.prototype.toString=function(){return this.base+"/"+this.bitmask},f}(),V.ip2long=h,V.long2ip=c,V.Netmask=x}).call(this)},5841:(q,V,x)=>{var y=x(6608);function u(p,D){y.cipher.registerAlgorithm(p,function(){return new y.aes.Algorithm(p,D)})}x(1101),x(5256),x(8572),q.exports=y.aes=y.aes||{},y.aes.startEncrypting=function(p,D,A,P){var S=v({key:p,output:A,decrypt:!1,mode:P});return S.start(D),S},y.aes.createEncryptionCipher=function(p,D){return v({key:p,output:null,decrypt:!1,mode:D})},y.aes.startDecrypting=function(p,D,A,P){var S=v({key:p,output:A,decrypt:!0,mode:P});return S.start(D),S},y.aes.createDecryptionCipher=function(p,D){return v({key:p,output:null,decrypt:!0,mode:D})},y.aes.Algorithm=function(p,D){g||b();var A=this;A.name=p,A.mode=new D({blockSize:16,cipher:{encrypt:function(P,S){return E(A._w,P,S,!1)},decrypt:function(P,S){return E(A._w,P,S,!0)}}}),A._init=!1},y.aes.Algorithm.prototype.initialize=function(p){if(!this._init){var A,D=p.key;if("string"!=typeof D||16!==D.length&&24!==D.length&&32!==D.length){if(y.util.isArray(D)&&(16===D.length||24===D.length||32===D.length)){A=D,D=y.util.createBuffer();for(var P=0;P>>=2,P=0;P>8^255&k^99,h[k]=A,j=(F=p[k])<<24^k<<16^k<<8^k^F,C=((S=p[A])^(T=p[S])^(M=p[T]))<<24^(A^M)<<16^(A^T^M)<<8^A^S^M;for(var O=0;O<4;++O)f[O][A]=j,d[O][k]=C,j=j<<24|j>>>8,C=C<<24|C>>>8;0===A?A=P=1:(A=S^p[p[p[S^M]]],P^=p[p[P]])}}function I(p,D){for(var P,A=p.slice(0),S=1,T=A.length,k=4*(T+6+1),F=T;F>>16&255]<<24^m[P>>>8&255]<<16^m[255&P]<<8^m[P>>>24]^c[S]<<24,S++):T>6&&F%T==4&&(P=m[P>>>24]<<24^m[P>>>16&255]<<16^m[P>>>8&255]<<8^m[255&P]),A[F]=A[F-T]^P;if(D){for(var j,C=d[0],O=d[1],H=d[2],L=d[3],K=A.slice(0),ne=(F=0,(k=A.length)-4);F>>24]]^O[m[j>>>16&255]]^H[m[j>>>8&255]]^L[m[255&j]];A=K}return A}function E(p,D,A,P){var T,M,k,F,j,C,O,H,L,K,ne,G,S=p.length/4-1;P?(T=d[0],M=d[1],k=d[2],F=d[3],j=h):(T=f[0],M=f[1],k=f[2],F=f[3],j=m),C=D[0]^p[0],O=D[P?3:1]^p[1],H=D[2]^p[2],L=D[P?1:3]^p[3];for(var ee=3,Z=1;Z>>24]^M[O>>>16&255]^k[H>>>8&255]^F[255&L]^p[++ee],ne=T[O>>>24]^M[H>>>16&255]^k[L>>>8&255]^F[255&C]^p[++ee],G=T[H>>>24]^M[L>>>16&255]^k[C>>>8&255]^F[255&O]^p[++ee],L=T[L>>>24]^M[C>>>16&255]^k[O>>>8&255]^F[255&H]^p[++ee],C=K,O=ne,H=G;A[0]=j[C>>>24]<<24^j[O>>>16&255]<<16^j[H>>>8&255]<<8^j[255&L]^p[++ee],A[P?3:1]=j[O>>>24]<<24^j[H>>>16&255]<<16^j[L>>>8&255]<<8^j[255&C]^p[++ee],A[2]=j[H>>>24]<<24^j[L>>>16&255]<<16^j[C>>>8&255]<<8^j[255&O]^p[++ee],A[P?1:3]=j[L>>>24]<<24^j[C>>>16&255]<<16^j[O>>>8&255]<<8^j[255&H]^p[++ee]}function v(p){var P,A="AES-"+((p=p||{}).mode||"CBC").toUpperCase(),S=(P=p.decrypt?y.cipher.createDecipher(A,p.key):y.cipher.createCipher(A,p.key)).start;return P.start=function(T,M){var k=null;M instanceof y.util.ByteBuffer&&(k=M,M={}),(M=M||{}).output=k,M.iv=T,S.call(P,M)},P}},2266:(q,V,x)=>{var y=x(6608);x(8572),x(7565);var u=q.exports=y.asn1=y.asn1||{};function g(c,f,d){if(d>f){var b=new Error("Too few bytes to parse DER.");throw b.available=c.length(),b.remaining=f,b.requested=d,b}}function m(c,f,d,b){var I;g(c,f,2);var E=c.getByte();f--;var v=192&E,p=31&E;I=c.length();var D=function(c,f){var d=c.getByte();if(f--,128!==d){var b;if(128&d){var E=127&d;g(c,f,E),b=c.getInt(E<<3)}else b=d;if(b<0)throw new Error("Negative length: "+b);return b}}(c,f);if(f-=I-c.length(),void 0!==D&&D>f){if(b.strict){var A=new Error("Too few bytes to read ASN.1 value.");throw A.available=c.length(),A.remaining=f,A.requested=D,A}D=f}var P,S,T=32==(32&E);if(T)if(P=[],void 0===D)for(;;){if(g(c,f,2),c.bytes(2)===String.fromCharCode(0,0)){c.getBytes(2),f-=2;break}I=c.length(),P.push(m(c,f,d+1,b)),f-=I-c.length()}else for(;D>0;)I=c.length(),P.push(m(c,D,d+1,b)),f-=I-c.length(),D-=I-c.length();if(void 0===P&&v===u.Class.UNIVERSAL&&p===u.Type.BITSTRING&&(S=c.bytes(D)),void 0===P&&b.decodeBitStrings&&v===u.Class.UNIVERSAL&&p===u.Type.BITSTRING&&D>1){var M=c.read,k=f,F=0;if(p===u.Type.BITSTRING&&(g(c,f,1),F=c.getByte(),f--),0===F)try{I=c.length();var C=m(c,f,d+1,{strict:!0,decodeBitStrings:!0}),O=I-c.length();f-=O,p==u.Type.BITSTRING&&O++;var H=C.tagClass;O===D&&(H===u.Class.UNIVERSAL||H===u.Class.CONTEXT_SPECIFIC)&&(P=[C])}catch{}void 0===P&&(c.read=M,f=k)}if(void 0===P){if(void 0===D){if(b.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");D=f}if(p===u.Type.BMPSTRING)for(P="";D>0;D-=2)g(c,f,2),P+=String.fromCharCode(c.getInt16()),f-=2;else P=c.getBytes(D),f-=D}return u.create(v,p,T,P,void 0===S?null:{bitStringContents:S})}u.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},u.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},u.create=function(c,f,d,b,I){if(y.util.isArray(b)){for(var E=[],v=0;v1&&(0===c.value.charCodeAt(0)&&0==(128&c.value.charCodeAt(1))||255===c.value.charCodeAt(0)&&128==(128&c.value.charCodeAt(1)))?b.putBytes(c.value.substr(1)):b.putBytes(c.value);if(f.putByte(d),b.length()<=127)f.putByte(127&b.length());else{var v=b.length(),p="";do{p+=String.fromCharCode(255&v),v>>>=8}while(v>0);for(f.putByte(128|p.length),E=p.length-1;E>=0;--E)f.putByte(p.charCodeAt(E))}return f.putBuffer(b),f},u.oidToDer=function(c){var f=c.split("."),d=y.util.createBuffer();d.putByte(40*parseInt(f[0],10)+parseInt(f[1],10));for(var b,I,E,v,p=2;p>>=7,b||(v|=128),I.push(v),b=!1}while(E>0);for(var D=I.length-1;D>=0;--D)d.putByte(I[D])}return d},u.derToOid=function(c){var f;"string"==typeof c&&(c=y.util.createBuffer(c));var d=c.getByte();f=Math.floor(d/40)+"."+d%40;for(var b=0;c.length()>0;)b<<=7,128&(d=c.getByte())?b+=127&d:(f+="."+(b+d),b=0);return f},u.utcTimeToDate=function(c){var f=new Date,d=parseInt(c.substr(0,2),10);d=d>=50?1900+d:2e3+d;var b=parseInt(c.substr(2,2),10)-1,I=parseInt(c.substr(4,2),10),E=parseInt(c.substr(6,2),10),v=parseInt(c.substr(8,2),10),p=0;if(c.length>11){var D=c.charAt(10),A=10;"+"!==D&&"-"!==D&&(p=parseInt(c.substr(10,2),10),A+=2)}if(f.setUTCFullYear(d,b,I),f.setUTCHours(E,v,p,0),A&&("+"===(D=c.charAt(A))||"-"===D)){var T=60*parseInt(c.substr(A+1,2),10)+parseInt(c.substr(A+4,2),10);T*=6e4,f.setTime("+"===D?+f-T:+f+T)}return f},u.generalizedTimeToDate=function(c){var f=new Date,d=parseInt(c.substr(0,4),10),b=parseInt(c.substr(4,2),10)-1,I=parseInt(c.substr(6,2),10),E=parseInt(c.substr(8,2),10),v=parseInt(c.substr(10,2),10),p=parseInt(c.substr(12,2),10),D=0,A=0,P=!1;"Z"===c.charAt(c.length-1)&&(P=!0);var S=c.length-5,T=c.charAt(S);return"+"!==T&&"-"!==T||(A=60*parseInt(c.substr(S+1,2),10)+parseInt(c.substr(S+4,2),10),A*=6e4,"+"===T&&(A*=-1),P=!0),"."===c.charAt(14)&&(D=1e3*parseFloat(c.substr(14),10)),P?(f.setUTCFullYear(d,b,I),f.setUTCHours(E,v,p,D),f.setTime(+f+A)):(f.setFullYear(d,b,I),f.setHours(E,v,p,D)),f},u.dateToUtcTime=function(c){if("string"==typeof c)return c;var f="",d=[];d.push((""+c.getUTCFullYear()).substr(2)),d.push(""+(c.getUTCMonth()+1)),d.push(""+c.getUTCDate()),d.push(""+c.getUTCHours()),d.push(""+c.getUTCMinutes()),d.push(""+c.getUTCSeconds());for(var b=0;b=-128&&c<128)return f.putSignedInt(c,8);if(c>=-32768&&c<32768)return f.putSignedInt(c,16);if(c>=-8388608&&c<8388608)return f.putSignedInt(c,24);if(c>=-2147483648&&c<2147483648)return f.putSignedInt(c,32);var d=new Error("Integer too large; max is 32-bits.");throw d.integer=c,d},u.derToInteger=function(c){"string"==typeof c&&(c=y.util.createBuffer(c));var f=8*c.length();if(f>32)throw new Error("Integer too large; max is 32-bits.");return c.getSignedInt(f)},u.validate=function(c,f,d,b){var I=!1;if((c.tagClass===f.tagClass||typeof f.tagClass>"u")&&(c.type===f.type||typeof f.type>"u"))if(c.constructed===f.constructed||typeof f.constructed>"u"){if(I=!0,f.value&&y.util.isArray(f.value))for(var E=0,v=0;I&&v0&&(b+="\n");for(var I="",E=0;E1?"0x"+y.util.bytesToHex(c.value.slice(1)):"(none)",c.value.length>0){var A=c.value.charCodeAt(0);1==A?b+=" (1 unused bit shown)":A>1&&(b+=" ("+A+" unused bits shown)")}}else if(c.type===u.Type.OCTETSTRING)h.test(c.value)||(b+="("+c.value+") "),b+="0x"+y.util.bytesToHex(c.value);else if(c.type===u.Type.UTF8)try{b+=y.util.decodeUtf8(c.value)}catch(P){if("URI malformed"!==P.message)throw P;b+="0x"+y.util.bytesToHex(c.value)+" (malformed UTF8)"}else c.type===u.Type.PRINTABLESTRING||c.type===u.Type.IA5String?b+=c.value:h.test(c.value)?b+="0x"+y.util.bytesToHex(c.value):b+=0===c.value.length?"[null]":c.value}return b}},2486:q=>{var V={};q.exports=V;var x={};V.encode=function(u,g,w){if("string"!=typeof g)throw new TypeError('"alphabet" must be a string.');if(void 0!==w&&"number"!=typeof w)throw new TypeError('"maxline" must be a number.');var m="";if(u instanceof Uint8Array){var h=0,c=g.length,f=g.charAt(0),d=[0];for(h=0;h0;)d.push(I%c),I=I/c|0}for(h=0;0===u[h]&&h=0;--h)m+=g[d[h]]}else m=function y(u,g){var w=0,m=g.length,h=g.charAt(0),c=[0];for(w=0;w0;)c.push(d%m),d=d/m|0}var b="";for(w=0;0===u.at(w)&&w=0;--w)b+=g[c[w]];return b}(u,g);if(w){var E=new RegExp(".{1,"+w+"}","g");m=m.match(E).join("\r\n")}return m},V.decode=function(u,g){if("string"!=typeof u)throw new TypeError('"input" must be a string.');if("string"!=typeof g)throw new TypeError('"alphabet" must be a string.');var w=x[g];if(!w){w=x[g]=[];for(var m=0;m>=8;for(;I>0;)f.push(255&I),I>>=8}for(var E=0;u[E]===c&&E{var y=x(6608);x(8572),q.exports=y.cipher=y.cipher||{},y.cipher.algorithms=y.cipher.algorithms||{},y.cipher.createCipher=function(g,w){var m=g;if("string"==typeof m&&(m=y.cipher.getAlgorithm(m))&&(m=m()),!m)throw new Error("Unsupported algorithm: "+g);return new y.cipher.BlockCipher({algorithm:m,key:w,decrypt:!1})},y.cipher.createDecipher=function(g,w){var m=g;if("string"==typeof m&&(m=y.cipher.getAlgorithm(m))&&(m=m()),!m)throw new Error("Unsupported algorithm: "+g);return new y.cipher.BlockCipher({algorithm:m,key:w,decrypt:!0})},y.cipher.registerAlgorithm=function(g,w){g=g.toUpperCase(),y.cipher.algorithms[g]=w},y.cipher.getAlgorithm=function(g){return(g=g.toUpperCase())in y.cipher.algorithms?y.cipher.algorithms[g]:null};var u=y.cipher.BlockCipher=function(g){this.algorithm=g.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=g.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=g.decrypt,this.algorithm.initialize(g)};u.prototype.start=function(g){g=g||{};var w={};for(var m in g)w[m]=g[m];w.decrypt=this._decrypt,this._finish=!1,this._input=y.util.createBuffer(),this.output=g.output||y.util.createBuffer(),this.mode.start(w)},u.prototype.update=function(g){for(g&&this._input.putBuffer(g);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},u.prototype.finish=function(g){g&&("ECB"===this.mode.name||"CBC"===this.mode.name)&&(this.mode.pad=function(m){return g(this.blockSize,m,!1)},this.mode.unpad=function(m){return g(this.blockSize,m,!0)});var w={};return w.decrypt=this._decrypt,w.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,w)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,w))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,w))}},5256:(q,V,x)=>{var y=x(6608);x(8572),y.cipher=y.cipher||{};var u=q.exports=y.cipher.modes=y.cipher.modes||{};function g(h,c){if("string"==typeof h&&(h=y.util.createBuffer(h)),y.util.isArray(h)&&h.length>4){var f=h;h=y.util.createBuffer();for(var d=0;d0))return!0;for(var d=0;d0))return!0;for(var d=0;d0)return!1;var f=h.length(),d=h.at(f-1);return!(d>this.blockSize<<2||(h.truncate(d),0))},u.cbc=function(h){h=h||{},this.name="CBC",this.cipher=h.cipher,this.blockSize=h.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},u.cbc.prototype.start=function(h){if(null===h.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in h))throw new Error("Invalid IV parameter.");this._iv=g(h.iv,this.blockSize),this._prev=this._iv.slice(0)}},u.cbc.prototype.encrypt=function(h,c,f){if(h.length()0))return!0;for(var d=0;d0))return!0;for(var d=0;d0)return!1;var f=h.length(),d=h.at(f-1);return!(d>this.blockSize<<2||(h.truncate(d),0))},u.cfb=function(h){h=h||{},this.name="CFB",this.cipher=h.cipher,this.blockSize=h.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=y.util.createBuffer(),this._partialBytes=0},u.cfb.prototype.start=function(h){if(!("iv"in h))throw new Error("Invalid IV parameter.");this._iv=g(h.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},u.cfb.prototype.encrypt=function(h,c,f){var d=h.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize)for(var b=0;b0&&(I=this.blockSize-I),this._partialOutput.clear(),b=0;b0)h.read-=this.blockSize;else for(b=0;b0&&this._partialOutput.getBytes(this._partialBytes),I>0&&!f)return c.putBytes(this._partialOutput.getBytes(I-this._partialBytes)),this._partialBytes=I,!0;c.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0}},u.cfb.prototype.decrypt=function(h,c,f){var d=h.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize)for(var b=0;b0&&(I=this.blockSize-I),this._partialOutput.clear(),b=0;b0)h.read-=this.blockSize;else for(b=0;b0&&this._partialOutput.getBytes(this._partialBytes),I>0&&!f)return c.putBytes(this._partialOutput.getBytes(I-this._partialBytes)),this._partialBytes=I,!0;c.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0}},u.ofb=function(h){h=h||{},this.name="OFB",this.cipher=h.cipher,this.blockSize=h.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=y.util.createBuffer(),this._partialBytes=0},u.ofb.prototype.start=function(h){if(!("iv"in h))throw new Error("Invalid IV parameter.");this._iv=g(h.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},u.ofb.prototype.encrypt=function(h,c,f){var d=h.length();if(0===h.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize)for(var b=0;b0&&(I=this.blockSize-I),this._partialOutput.clear(),b=0;b