lesca-node-bunnycdn 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs CHANGED
@@ -1,17 +1,17 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function getDefaultExportFromCjs(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}var browser$c={exports:{}},process=browser$c.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(_){if(cachedSetTimeout===setTimeout)return setTimeout(_,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(_,0);try{return cachedSetTimeout(_,0)}catch{try{return cachedSetTimeout.call(null,_,0)}catch{return cachedSetTimeout.call(this,_,0)}}}function runClearTimeout(_){if(cachedClearTimeout===clearTimeout)return clearTimeout(_);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(_);try{return cachedClearTimeout(_)}catch{try{return cachedClearTimeout.call(null,_)}catch{return cachedClearTimeout.call(this,_)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var _=runTimeout(cleanUpNextTick);draining=!0;for(var S=queue.length;S;){for(currentQueue=queue,queue=[];++queueIndex<S;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,S=queue.length}currentQueue=null,draining=!1,runClearTimeout(_)}}process.nextTick=function(_){var S=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)S[I-1]=arguments[I];queue.push(new Item(_,S)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(_,S){this.fun=_,this.array=S}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=!0;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(_){return[]};process.binding=function(_){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(_){throw new Error("process.chdir is not supported")};process.umask=function(){return 0};var browserExports=browser$c.exports;const process$1=getDefaultExportFromCjs(browserExports);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},cryptoBrowserify={},browser$b={exports:{}},safeBuffer$2={exports:{}},dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,(function(_){Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var S={},I={};I.byteLength=d,I.toByteArray=M,I.fromByteArray=A;for(var p=[],R=[],f=typeof Uint8Array<"u"?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,v=w.length;m<v;++m)p[m]=w[m],R[w.charCodeAt(m)]=m;R[45]=62,R[95]=63;function y($){var H=$.length;if(H%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var N=$.indexOf("=");N===-1&&(N=H);var V=N===H?0:4-N%4;return[N,V]}function d($){var H=y($),N=H[0],V=H[1];return(N+V)*3/4-V}function g($,H,N){return(H+N)*3/4-N}function M($){var H,N=y($),V=N[0],Q=N[1],ne=new f(g($,V,Q)),ae=0,ee=Q>0?V-4:V,le;for(le=0;le<ee;le+=4)H=R[$.charCodeAt(le)]<<18|R[$.charCodeAt(le+1)]<<12|R[$.charCodeAt(le+2)]<<6|R[$.charCodeAt(le+3)],ne[ae++]=H>>16&255,ne[ae++]=H>>8&255,ne[ae++]=H&255;return Q===2&&(H=R[$.charCodeAt(le)]<<2|R[$.charCodeAt(le+1)]>>4,ne[ae++]=H&255),Q===1&&(H=R[$.charCodeAt(le)]<<10|R[$.charCodeAt(le+1)]<<4|R[$.charCodeAt(le+2)]>>2,ne[ae++]=H>>8&255,ne[ae++]=H&255),ne}function x($){return p[$>>18&63]+p[$>>12&63]+p[$>>6&63]+p[$&63]}function B($,H,N){for(var V,Q=[],ne=H;ne<N;ne+=3)V=($[ne]<<16&16711680)+($[ne+1]<<8&65280)+($[ne+2]&255),Q.push(x(V));return Q.join("")}function A($){for(var H,N=$.length,V=N%3,Q=[],ne=16383,ae=0,ee=N-V;ae<ee;ae+=ne)Q.push(B($,ae,ae+ne>ee?ee:ae+ne));return V===1?(H=$[N-1],Q.push(p[H>>2]+p[H<<4&63]+"==")):V===2&&(H=($[N-2]<<8)+$[N-1],Q.push(p[H>>10]+p[H>>4&63]+p[H<<2&63]+"=")),Q.join("")}var D={};D.read=function($,H,N,V,Q){var ne,ae,ee=Q*8-V-1,le=(1<<ee)-1,c=le>>1,e=-7,t=N?Q-1:0,n=N?-1:1,a=$[H+t];for(t+=n,ne=a&(1<<-e)-1,a>>=-e,e+=ee;e>0;ne=ne*256+$[H+t],t+=n,e-=8);for(ae=ne&(1<<-e)-1,ne>>=-e,e+=V;e>0;ae=ae*256+$[H+t],t+=n,e-=8);if(ne===0)ne=1-c;else{if(ne===le)return ae?NaN:(a?-1:1)*(1/0);ae=ae+Math.pow(2,V),ne=ne-c}return(a?-1:1)*ae*Math.pow(2,ne-V)},D.write=function($,H,N,V,Q,ne){var ae,ee,le,c=ne*8-Q-1,e=(1<<c)-1,t=e>>1,n=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=V?0:ne-1,s=V?1:-1,u=H<0||H===0&&1/H<0?1:0;for(H=Math.abs(H),isNaN(H)||H===1/0?(ee=isNaN(H)?1:0,ae=e):(ae=Math.floor(Math.log(H)/Math.LN2),H*(le=Math.pow(2,-ae))<1&&(ae--,le*=2),ae+t>=1?H+=n/le:H+=n*Math.pow(2,1-t),H*le>=2&&(ae++,le/=2),ae+t>=e?(ee=0,ae=e):ae+t>=1?(ee=(H*le-1)*Math.pow(2,Q),ae=ae+t):(ee=H*Math.pow(2,t-1)*Math.pow(2,Q),ae=0));Q>=8;$[N+a]=ee&255,a+=s,ee/=256,Q-=8);for(ae=ae<<Q|ee,c+=Q;c>0;$[N+a]=ae&255,a+=s,ae/=256,c-=8);$[N+a-s]|=u*128};(function($){const H=I,N=D,V=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$.Buffer=e,$.SlowBuffer=E,$.INSPECT_MAX_BYTES=50;const Q=2147483647;$.kMaxLength=Q;const{Uint8Array:ne,ArrayBuffer:ae,SharedArrayBuffer:ee}=globalThis;e.TYPED_ARRAY_SUPPORT=le(),!e.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 le(){try{const z=new ne(1),T={foo:function(){return 42}};return Object.setPrototypeOf(T,ne.prototype),Object.setPrototypeOf(z,T),z.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function c(z){if(z>Q)throw new RangeError('The value "'+z+'" is invalid for option "size"');const T=new ne(z);return Object.setPrototypeOf(T,e.prototype),T}function e(z,T,F){if(typeof z=="number"){if(typeof T=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(z)}return t(z,T,F)}e.poolSize=8192;function t(z,T,F){if(typeof z=="string")return u(z,T);if(ae.isView(z))return o(z);if(z==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z);if(ke(z,ae)||z&&ke(z.buffer,ae)||typeof ee<"u"&&(ke(z,ee)||z&&ke(z.buffer,ee)))return r(z,T,F);if(typeof z=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z=z.valueOf&&z.valueOf();if(Z!=null&&Z!==z)return e.from(Z,T,F);const ie=h(z);if(ie)return ie;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof z[Symbol.toPrimitive]=="function")return e.from(z[Symbol.toPrimitive]("string"),T,F);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z)}e.from=function(z,T,F){return t(z,T,F)},Object.setPrototypeOf(e.prototype,ne.prototype),Object.setPrototypeOf(e,ne);function n(z){if(typeof z!="number")throw new TypeError('"size" argument must be of type number');if(z<0)throw new RangeError('The value "'+z+'" is invalid for option "size"')}function a(z,T,F){return n(z),z<=0?c(z):T!==void 0?typeof F=="string"?c(z).fill(T,F):c(z).fill(T):c(z)}e.alloc=function(z,T,F){return a(z,T,F)};function s(z){return n(z),c(z<0?0:b(z)|0)}e.allocUnsafe=function(z){return s(z)},e.allocUnsafeSlow=function(z){return s(z)};function u(z,T){if((typeof T!="string"||T==="")&&(T="utf8"),!e.isEncoding(T))throw new TypeError("Unknown encoding: "+T);const F=L(z,T)|0;let Z=c(F);const ie=Z.write(z,T);return ie!==F&&(Z=Z.slice(0,ie)),Z}function l(z){const T=z.length<0?0:b(z.length)|0,F=c(T);for(let Z=0;Z<T;Z+=1)F[Z]=z[Z]&255;return F}function o(z){if(ke(z,ne)){const T=new ne(z);return r(T.buffer,T.byteOffset,T.byteLength)}return l(z)}function r(z,T,F){if(T<0||z.byteLength<T)throw new RangeError('"offset" is outside of buffer bounds');if(z.byteLength<T+(F||0))throw new RangeError('"length" is outside of buffer bounds');let Z;return T===void 0&&F===void 0?Z=new ne(z):F===void 0?Z=new ne(z,T):Z=new ne(z,T,F),Object.setPrototypeOf(Z,e.prototype),Z}function h(z){if(e.isBuffer(z)){const T=b(z.length)|0,F=c(T);return F.length===0||z.copy(F,0,0,T),F}if(z.length!==void 0)return typeof z.length!="number"||We(z.length)?c(0):l(z);if(z.type==="Buffer"&&Array.isArray(z.data))return l(z.data)}function b(z){if(z>=Q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q.toString(16)+" bytes");return z|0}function E(z){return+z!=z&&(z=0),e.alloc(+z)}e.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==e.prototype},e.compare=function(T,F){if(ke(T,ne)&&(T=e.from(T,T.offset,T.byteLength)),ke(F,ne)&&(F=e.from(F,F.offset,F.byteLength)),!e.isBuffer(T)||!e.isBuffer(F))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===F)return 0;let Z=T.length,ie=F.length;for(let ve=0,oe=Math.min(Z,ie);ve<oe;++ve)if(T[ve]!==F[ve]){Z=T[ve],ie=F[ve];break}return Z<ie?-1:ie<Z?1:0},e.isEncoding=function(T){switch(String(T).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(T,F){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return e.alloc(0);let Z;if(F===void 0)for(F=0,Z=0;Z<T.length;++Z)F+=T[Z].length;const ie=e.allocUnsafe(F);let ve=0;for(Z=0;Z<T.length;++Z){let oe=T[Z];if(ke(oe,ne))ve+oe.length>ie.length?(e.isBuffer(oe)||(oe=e.from(oe)),oe.copy(ie,ve)):ne.prototype.set.call(ie,oe,ve);else if(e.isBuffer(oe))oe.copy(ie,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=oe.length}return ie};function L(z,T){if(e.isBuffer(z))return z.length;if(ae.isView(z)||ke(z,ae))return z.byteLength;if(typeof z!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof z);const F=z.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&F===0)return 0;let ie=!1;for(;;)switch(T){case"ascii":case"latin1":case"binary":return F;case"utf8":case"utf-8":return Ne(z).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F*2;case"hex":return F>>>1;case"base64":return Oe(z).length;default:if(ie)return Z?-1:Ne(z).length;T=(""+T).toLowerCase(),ie=!0}}e.byteLength=L;function Y(z,T,F){let Z=!1;if((T===void 0||T<0)&&(T=0),T>this.length||((F===void 0||F>this.length)&&(F=this.length),F<=0)||(F>>>=0,T>>>=0,F<=T))return"";for(z||(z="utf8");;)switch(z){case"hex":return De(this,T,F);case"utf8":case"utf-8":return ue(this,T,F);case"ascii":return me(this,T,F);case"latin1":case"binary":return se(this,T,F);case"base64":return Ie(this,T,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,T,F);default:if(Z)throw new TypeError("Unknown encoding: "+z);z=(z+"").toLowerCase(),Z=!0}}e.prototype._isBuffer=!0;function K(z,T,F){const Z=z[T];z[T]=z[F],z[F]=Z}e.prototype.swap16=function(){const T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let F=0;F<T;F+=2)K(this,F,F+1);return this},e.prototype.swap32=function(){const T=this.length;if(T%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let F=0;F<T;F+=4)K(this,F,F+3),K(this,F+1,F+2);return this},e.prototype.swap64=function(){const T=this.length;if(T%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let F=0;F<T;F+=8)K(this,F,F+7),K(this,F+1,F+6),K(this,F+2,F+5),K(this,F+3,F+4);return this},e.prototype.toString=function(){const T=this.length;return T===0?"":arguments.length===0?ue(this,0,T):Y.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(T){if(!e.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T?!0:e.compare(this,T)===0},e.prototype.inspect=function(){let T="";const F=$.INSPECT_MAX_BYTES;return T=this.toString("hex",0,F).replace(/(.{2})/g,"$1 ").trim(),this.length>F&&(T+=" ... "),"<Buffer "+T+">"},V&&(e.prototype[V]=e.prototype.inspect),e.prototype.compare=function(T,F,Z,ie,ve){if(ke(T,ne)&&(T=e.from(T,T.offset,T.byteLength)),!e.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(F===void 0&&(F=0),Z===void 0&&(Z=T?T.length:0),ie===void 0&&(ie=0),ve===void 0&&(ve=this.length),F<0||Z>T.length||ie<0||ve>this.length)throw new RangeError("out of range index");if(ie>=ve&&F>=Z)return 0;if(ie>=ve)return-1;if(F>=Z)return 1;if(F>>>=0,Z>>>=0,ie>>>=0,ve>>>=0,this===T)return 0;let oe=ve-ie,Me=Z-F;const Le=Math.min(oe,Me),ge=this.slice(ie,ve),Be=T.slice(F,Z);for(let Fe=0;Fe<Le;++Fe)if(ge[Fe]!==Be[Fe]){oe=ge[Fe],Me=Be[Fe];break}return oe<Me?-1:Me<oe?1:0};function q(z,T,F,Z,ie){if(z.length===0)return-1;if(typeof F=="string"?(Z=F,F=0):F>2147483647?F=2147483647:F<-2147483648&&(F=-2147483648),F=+F,We(F)&&(F=ie?0:z.length-1),F<0&&(F=z.length+F),F>=z.length){if(ie)return-1;F=z.length-1}else if(F<0)if(ie)F=0;else return-1;if(typeof T=="string"&&(T=e.from(T,Z)),e.isBuffer(T))return T.length===0?-1:P(z,T,F,Z,ie);if(typeof T=="number")return T=T&255,typeof ne.prototype.indexOf=="function"?ie?ne.prototype.indexOf.call(z,T,F):ne.prototype.lastIndexOf.call(z,T,F):P(z,[T],F,Z,ie);throw new TypeError("val must be string, number or Buffer")}function P(z,T,F,Z,ie){let ve=1,oe=z.length,Me=T.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(z.length<2||T.length<2)return-1;ve=2,oe/=2,Me/=2,F/=2}function Le(Be,Fe){return ve===1?Be[Fe]:Be.readUInt16BE(Fe*ve)}let ge;if(ie){let Be=-1;for(ge=F;ge<oe;ge++)if(Le(z,ge)===Le(T,Be===-1?0:ge-Be)){if(Be===-1&&(Be=ge),ge-Be+1===Me)return Be*ve}else Be!==-1&&(ge-=ge-Be),Be=-1}else for(F+Me>oe&&(F=oe-Me),ge=F;ge>=0;ge--){let Be=!0;for(let Fe=0;Fe<Me;Fe++)if(Le(z,ge+Fe)!==Le(T,Fe)){Be=!1;break}if(Be)return ge}return-1}e.prototype.includes=function(T,F,Z){return this.indexOf(T,F,Z)!==-1},e.prototype.indexOf=function(T,F,Z){return q(this,T,F,Z,!0)},e.prototype.lastIndexOf=function(T,F,Z){return q(this,T,F,Z,!1)};function W(z,T,F,Z){F=Number(F)||0;const ie=z.length-F;Z?(Z=Number(Z),Z>ie&&(Z=ie)):Z=ie;const ve=T.length;Z>ve/2&&(Z=ve/2);let oe;for(oe=0;oe<Z;++oe){const Me=parseInt(T.substr(oe*2,2),16);if(We(Me))return oe;z[F+oe]=Me}return oe}function J(z,T,F,Z){return qe(Ne(T,z.length-F),z,F,Z)}function X(z,T,F,Z){return qe(be(T),z,F,Z)}function U(z,T,F,Z){return qe(Oe(T),z,F,Z)}function re(z,T,F,Z){return qe(Se(T,z.length-F),z,F,Z)}e.prototype.write=function(T,F,Z,ie){if(F===void 0)ie="utf8",Z=this.length,F=0;else if(Z===void 0&&typeof F=="string")ie=F,Z=this.length,F=0;else if(isFinite(F))F=F>>>0,isFinite(Z)?(Z=Z>>>0,ie===void 0&&(ie="utf8")):(ie=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ve=this.length-F;if((Z===void 0||Z>ve)&&(Z=ve),T.length>0&&(Z<0||F<0)||F>this.length)throw new RangeError("Attempt to write outside buffer bounds");ie||(ie="utf8");let oe=!1;for(;;)switch(ie){case"hex":return W(this,T,F,Z);case"utf8":case"utf-8":return J(this,T,F,Z);case"ascii":case"latin1":case"binary":return X(this,T,F,Z);case"base64":return U(this,T,F,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,T,F,Z);default:if(oe)throw new TypeError("Unknown encoding: "+ie);ie=(""+ie).toLowerCase(),oe=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ie(z,T,F){return T===0&&F===z.length?H.fromByteArray(z):H.fromByteArray(z.slice(T,F))}function ue(z,T,F){F=Math.min(z.length,F);const Z=[];let ie=T;for(;ie<F;){const ve=z[ie];let oe=null,Me=ve>239?4:ve>223?3:ve>191?2:1;if(ie+Me<=F){let Le,ge,Be,Fe;switch(Me){case 1:ve<128&&(oe=ve);break;case 2:Le=z[ie+1],(Le&192)===128&&(Fe=(ve&31)<<6|Le&63,Fe>127&&(oe=Fe));break;case 3:Le=z[ie+1],ge=z[ie+2],(Le&192)===128&&(ge&192)===128&&(Fe=(ve&15)<<12|(Le&63)<<6|ge&63,Fe>2047&&(Fe<55296||Fe>57343)&&(oe=Fe));break;case 4:Le=z[ie+1],ge=z[ie+2],Be=z[ie+3],(Le&192)===128&&(ge&192)===128&&(Be&192)===128&&(Fe=(ve&15)<<18|(Le&63)<<12|(ge&63)<<6|Be&63,Fe>65535&&Fe<1114112&&(oe=Fe))}}oe===null?(oe=65533,Me=1):oe>65535&&(oe-=65536,Z.push(oe>>>10&1023|55296),oe=56320|oe&1023),Z.push(oe),ie+=Me}return $e(Z)}const he=4096;function $e(z){const T=z.length;if(T<=he)return String.fromCharCode.apply(String,z);let F="",Z=0;for(;Z<T;)F+=String.fromCharCode.apply(String,z.slice(Z,Z+=he));return F}function me(z,T,F){let Z="";F=Math.min(z.length,F);for(let ie=T;ie<F;++ie)Z+=String.fromCharCode(z[ie]&127);return Z}function se(z,T,F){let Z="";F=Math.min(z.length,F);for(let ie=T;ie<F;++ie)Z+=String.fromCharCode(z[ie]);return Z}function De(z,T,F){const Z=z.length;(!T||T<0)&&(T=0),(!F||F<0||F>Z)&&(F=Z);let ie="";for(let ve=T;ve<F;++ve)ie+=Re[z[ve]];return ie}function de(z,T,F){const Z=z.slice(T,F);let ie="";for(let ve=0;ve<Z.length-1;ve+=2)ie+=String.fromCharCode(Z[ve]+Z[ve+1]*256);return ie}e.prototype.slice=function(T,F){const Z=this.length;T=~~T,F=F===void 0?Z:~~F,T<0?(T+=Z,T<0&&(T=0)):T>Z&&(T=Z),F<0?(F+=Z,F<0&&(F=0)):F>Z&&(F=Z),F<T&&(F=T);const ie=this.subarray(T,F);return Object.setPrototypeOf(ie,e.prototype),ie};function ye(z,T,F){if(z%1!==0||z<0)throw new RangeError("offset is not uint");if(z+T>F)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=this[T],ve=1,oe=0;for(;++oe<F&&(ve*=256);)ie+=this[T+oe]*ve;return ie},e.prototype.readUintBE=e.prototype.readUIntBE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=this[T+--F],ve=1;for(;F>0&&(ve*=256);)ie+=this[T+--F]*ve;return ie},e.prototype.readUint8=e.prototype.readUInt8=function(T,F){return T=T>>>0,F||ye(T,1,this.length),this[T]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(T,F){return T=T>>>0,F||ye(T,2,this.length),this[T]|this[T+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(T,F){return T=T>>>0,F||ye(T,2,this.length),this[T]<<8|this[T+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},e.prototype.readBigUInt64LE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=F+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24,ve=this[++T]+this[++T]*2**8+this[++T]*2**16+Z*2**24;return BigInt(ie)+(BigInt(ve)<<BigInt(32))}),e.prototype.readBigUInt64BE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=F*2**24+this[++T]*2**16+this[++T]*2**8+this[++T],ve=this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+Z;return(BigInt(ie)<<BigInt(32))+BigInt(ve)}),e.prototype.readIntLE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=this[T],ve=1,oe=0;for(;++oe<F&&(ve*=256);)ie+=this[T+oe]*ve;return ve*=128,ie>=ve&&(ie-=Math.pow(2,8*F)),ie},e.prototype.readIntBE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=F,ve=1,oe=this[T+--ie];for(;ie>0&&(ve*=256);)oe+=this[T+--ie]*ve;return ve*=128,oe>=ve&&(oe-=Math.pow(2,8*F)),oe},e.prototype.readInt8=function(T,F){return T=T>>>0,F||ye(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},e.prototype.readInt16LE=function(T,F){T=T>>>0,F||ye(T,2,this.length);const Z=this[T]|this[T+1]<<8;return Z&32768?Z|4294901760:Z},e.prototype.readInt16BE=function(T,F){T=T>>>0,F||ye(T,2,this.length);const Z=this[T+1]|this[T]<<8;return Z&32768?Z|4294901760:Z},e.prototype.readInt32LE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},e.prototype.readInt32BE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},e.prototype.readBigInt64LE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=this[T+4]+this[T+5]*2**8+this[T+6]*2**16+(Z<<24);return(BigInt(ie)<<BigInt(32))+BigInt(F+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24)}),e.prototype.readBigInt64BE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=(F<<24)+this[++T]*2**16+this[++T]*2**8+this[++T];return(BigInt(ie)<<BigInt(32))+BigInt(this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+Z)}),e.prototype.readFloatLE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),N.read(this,T,!0,23,4)},e.prototype.readFloatBE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),N.read(this,T,!1,23,4)},e.prototype.readDoubleLE=function(T,F){return T=T>>>0,F||ye(T,8,this.length),N.read(this,T,!0,52,8)},e.prototype.readDoubleBE=function(T,F){return T=T>>>0,F||ye(T,8,this.length),N.read(this,T,!1,52,8)};function Ce(z,T,F,Z,ie,ve){if(!e.isBuffer(z))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>ie||T<ve)throw new RangeError('"value" argument is out of bounds');if(F+Z>z.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(T,F,Z,ie){if(T=+T,F=F>>>0,Z=Z>>>0,!ie){const Me=Math.pow(2,8*Z)-1;Ce(this,T,F,Z,Me,0)}let ve=1,oe=0;for(this[F]=T&255;++oe<Z&&(ve*=256);)this[F+oe]=T/ve&255;return F+Z},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(T,F,Z,ie){if(T=+T,F=F>>>0,Z=Z>>>0,!ie){const Me=Math.pow(2,8*Z)-1;Ce(this,T,F,Z,Me,0)}let ve=Z-1,oe=1;for(this[F+ve]=T&255;--ve>=0&&(oe*=256);)this[F+ve]=T/oe&255;return F+Z},e.prototype.writeUint8=e.prototype.writeUInt8=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,1,255,0),this[F]=T&255,F+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,65535,0),this[F]=T&255,this[F+1]=T>>>8,F+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,65535,0),this[F]=T>>>8,this[F+1]=T&255,F+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,4294967295,0),this[F+3]=T>>>24,this[F+2]=T>>>16,this[F+1]=T>>>8,this[F]=T&255,F+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,4294967295,0),this[F]=T>>>24,this[F+1]=T>>>16,this[F+2]=T>>>8,this[F+3]=T&255,F+4};function pe(z,T,F,Z,ie){G(T,Z,ie,z,F,7);let ve=Number(T&BigInt(4294967295));z[F++]=ve,ve=ve>>8,z[F++]=ve,ve=ve>>8,z[F++]=ve,ve=ve>>8,z[F++]=ve;let oe=Number(T>>BigInt(32)&BigInt(4294967295));return z[F++]=oe,oe=oe>>8,z[F++]=oe,oe=oe>>8,z[F++]=oe,oe=oe>>8,z[F++]=oe,F}function _e(z,T,F,Z,ie){G(T,Z,ie,z,F,7);let ve=Number(T&BigInt(4294967295));z[F+7]=ve,ve=ve>>8,z[F+6]=ve,ve=ve>>8,z[F+5]=ve,ve=ve>>8,z[F+4]=ve;let oe=Number(T>>BigInt(32)&BigInt(4294967295));return z[F+3]=oe,oe=oe>>8,z[F+2]=oe,oe=oe>>8,z[F+1]=oe,oe=oe>>8,z[F]=oe,F+8}e.prototype.writeBigUInt64LE=Te(function(T,F=0){return pe(this,T,F,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=Te(function(T,F=0){return _e(this,T,F,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(T,F,Z,ie){if(T=+T,F=F>>>0,!ie){const Le=Math.pow(2,8*Z-1);Ce(this,T,F,Z,Le-1,-Le)}let ve=0,oe=1,Me=0;for(this[F]=T&255;++ve<Z&&(oe*=256);)T<0&&Me===0&&this[F+ve-1]!==0&&(Me=1),this[F+ve]=(T/oe>>0)-Me&255;return F+Z},e.prototype.writeIntBE=function(T,F,Z,ie){if(T=+T,F=F>>>0,!ie){const Le=Math.pow(2,8*Z-1);Ce(this,T,F,Z,Le-1,-Le)}let ve=Z-1,oe=1,Me=0;for(this[F+ve]=T&255;--ve>=0&&(oe*=256);)T<0&&Me===0&&this[F+ve+1]!==0&&(Me=1),this[F+ve]=(T/oe>>0)-Me&255;return F+Z},e.prototype.writeInt8=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,1,127,-128),T<0&&(T=255+T+1),this[F]=T&255,F+1},e.prototype.writeInt16LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,32767,-32768),this[F]=T&255,this[F+1]=T>>>8,F+2},e.prototype.writeInt16BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,32767,-32768),this[F]=T>>>8,this[F+1]=T&255,F+2},e.prototype.writeInt32LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,2147483647,-2147483648),this[F]=T&255,this[F+1]=T>>>8,this[F+2]=T>>>16,this[F+3]=T>>>24,F+4},e.prototype.writeInt32BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[F]=T>>>24,this[F+1]=T>>>16,this[F+2]=T>>>8,this[F+3]=T&255,F+4},e.prototype.writeBigInt64LE=Te(function(T,F=0){return pe(this,T,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=Te(function(T,F=0){return _e(this,T,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ue(z,T,F,Z,ie,ve){if(F+Z>z.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("Index out of range")}function xe(z,T,F,Z,ie){return T=+T,F=F>>>0,ie||Ue(z,T,F,4),N.write(z,T,F,Z,23,4),F+4}e.prototype.writeFloatLE=function(T,F,Z){return xe(this,T,F,!0,Z)},e.prototype.writeFloatBE=function(T,F,Z){return xe(this,T,F,!1,Z)};function Ae(z,T,F,Z,ie){return T=+T,F=F>>>0,ie||Ue(z,T,F,8),N.write(z,T,F,Z,52,8),F+8}e.prototype.writeDoubleLE=function(T,F,Z){return Ae(this,T,F,!0,Z)},e.prototype.writeDoubleBE=function(T,F,Z){return Ae(this,T,F,!1,Z)},e.prototype.copy=function(T,F,Z,ie){if(!e.isBuffer(T))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!ie&&ie!==0&&(ie=this.length),F>=T.length&&(F=T.length),F||(F=0),ie>0&&ie<Z&&(ie=Z),ie===Z||T.length===0||this.length===0)return 0;if(F<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("sourceEnd out of bounds");ie>this.length&&(ie=this.length),T.length-F<ie-Z&&(ie=T.length-F+Z);const ve=ie-Z;return this===T&&typeof ne.prototype.copyWithin=="function"?this.copyWithin(F,Z,ie):ne.prototype.set.call(T,this.subarray(Z,ie),F),ve},e.prototype.fill=function(T,F,Z,ie){if(typeof T=="string"){if(typeof F=="string"?(ie=F,F=0,Z=this.length):typeof Z=="string"&&(ie=Z,Z=this.length),ie!==void 0&&typeof ie!="string")throw new TypeError("encoding must be a string");if(typeof ie=="string"&&!e.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);if(T.length===1){const oe=T.charCodeAt(0);(ie==="utf8"&&oe<128||ie==="latin1")&&(T=oe)}}else typeof T=="number"?T=T&255:typeof T=="boolean"&&(T=Number(T));if(F<0||this.length<F||this.length<Z)throw new RangeError("Out of range index");if(Z<=F)return this;F=F>>>0,Z=Z===void 0?this.length:Z>>>0,T||(T=0);let ve;if(typeof T=="number")for(ve=F;ve<Z;++ve)this[ve]=T;else{const oe=e.isBuffer(T)?T:e.from(T,ie),Me=oe.length;if(Me===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(ve=0;ve<Z-F;++ve)this[ve+F]=oe[ve%Me]}return this};const je={};function j(z,T,F){je[z]=class extends F{constructor(){super(),Object.defineProperty(this,"message",{value:T.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${z}]`,this.stack,delete this.name}get code(){return z}set code(ie){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ie,writable:!0})}toString(){return`${this.name} [${z}]: ${this.message}`}}}j("ERR_BUFFER_OUT_OF_BOUNDS",function(z){return z?`${z} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(z,T){return`The "${z}" argument must be of type number. Received type ${typeof T}`},TypeError),j("ERR_OUT_OF_RANGE",function(z,T,F){let Z=`The value of "${z}" is out of range.`,ie=F;return Number.isInteger(F)&&Math.abs(F)>2**32?ie=k(String(F)):typeof F=="bigint"&&(ie=String(F),(F>BigInt(2)**BigInt(32)||F<-(BigInt(2)**BigInt(32)))&&(ie=k(ie)),ie+="n"),Z+=` It must be ${T}. Received ${ie}`,Z},RangeError);function k(z){let T="",F=z.length;const Z=z[0]==="-"?1:0;for(;F>=Z+4;F-=3)T=`_${z.slice(F-3,F)}${T}`;return`${z.slice(0,F)}${T}`}function O(z,T,F){te(T,"offset"),(z[T]===void 0||z[T+F]===void 0)&&ce(T,z.length-(F+1))}function G(z,T,F,Z,ie,ve){if(z>F||z<T){const oe=typeof T=="bigint"?"n":"";let Me;throw T===0||T===BigInt(0)?Me=`>= 0${oe} and < 2${oe} ** ${(ve+1)*8}${oe}`:Me=`>= -(2${oe} ** ${(ve+1)*8-1}${oe}) and < 2 ** ${(ve+1)*8-1}${oe}`,new je.ERR_OUT_OF_RANGE("value",Me,z)}O(Z,ie,ve)}function te(z,T){if(typeof z!="number")throw new je.ERR_INVALID_ARG_TYPE(T,"number",z)}function ce(z,T,F){throw Math.floor(z)!==z?(te(z,F),new je.ERR_OUT_OF_RANGE("offset","an integer",z)):T<0?new je.ERR_BUFFER_OUT_OF_BOUNDS:new je.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${T}`,z)}const fe=/[^+/0-9A-Za-z-_]/g;function we(z){if(z=z.split("=")[0],z=z.trim().replace(fe,""),z.length<2)return"";for(;z.length%4!==0;)z=z+"=";return z}function Ne(z,T){T=T||1/0;let F;const Z=z.length;let ie=null;const ve=[];for(let oe=0;oe<Z;++oe){if(F=z.charCodeAt(oe),F>55295&&F<57344){if(!ie){if(F>56319){(T-=3)>-1&&ve.push(239,191,189);continue}else if(oe+1===Z){(T-=3)>-1&&ve.push(239,191,189);continue}ie=F;continue}if(F<56320){(T-=3)>-1&&ve.push(239,191,189),ie=F;continue}F=(ie-55296<<10|F-56320)+65536}else ie&&(T-=3)>-1&&ve.push(239,191,189);if(ie=null,F<128){if((T-=1)<0)break;ve.push(F)}else if(F<2048){if((T-=2)<0)break;ve.push(F>>6|192,F&63|128)}else if(F<65536){if((T-=3)<0)break;ve.push(F>>12|224,F>>6&63|128,F&63|128)}else if(F<1114112){if((T-=4)<0)break;ve.push(F>>18|240,F>>12&63|128,F>>6&63|128,F&63|128)}else throw new Error("Invalid code point")}return ve}function be(z){const T=[];for(let F=0;F<z.length;++F)T.push(z.charCodeAt(F)&255);return T}function Se(z,T){let F,Z,ie;const ve=[];for(let oe=0;oe<z.length&&!((T-=2)<0);++oe)F=z.charCodeAt(oe),Z=F>>8,ie=F%256,ve.push(ie),ve.push(Z);return ve}function Oe(z){return H.toByteArray(we(z))}function qe(z,T,F,Z){let ie;for(ie=0;ie<Z&&!(ie+F>=T.length||ie>=z.length);++ie)T[ie+F]=z[ie];return ie}function ke(z,T){return z instanceof T||z!=null&&z.constructor!=null&&z.constructor.name!=null&&z.constructor.name===T.name}function We(z){return z!==z}const Re=(function(){const z="0123456789abcdef",T=new Array(256);for(let F=0;F<16;++F){const Z=F*16;for(let ie=0;ie<16;++ie)T[Z+ie]=z[F]+z[ie]}return T})();function Te(z){return typeof BigInt>"u"?Ke:z}function Ke(){throw new Error("BigInt not supported")}})(S);const C=S.Buffer;_.Blob=S.Blob,_.BlobOptions=S.BlobOptions,_.Buffer=S.Buffer,_.File=S.File,_.FileOptions=S.FileOptions,_.INSPECT_MAX_BYTES=S.INSPECT_MAX_BYTES,_.SlowBuffer=S.SlowBuffer,_.TranscodeEncoding=S.TranscodeEncoding,_.atob=S.atob,_.btoa=S.btoa,_.constants=S.constants,_.default=C,_.isAscii=S.isAscii,_.isUtf8=S.isUtf8,_.kMaxLength=S.kMaxLength,_.kStringMaxLength=S.kStringMaxLength,_.resolveObjectURL=S.resolveObjectURL,_.transcode=S.transcode})(dist)),dist}var hasRequiredSafeBuffer$2;function requireSafeBuffer$2(){return hasRequiredSafeBuffer$2||(hasRequiredSafeBuffer$2=1,(function(_,S){var I=requireDist(),p=I.Buffer;function R(w,m){for(var v in w)m[v]=w[v]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?_.exports=I:(R(I,S),S.Buffer=f);function f(w,m,v){return p(w,m,v)}f.prototype=Object.create(p.prototype),R(p,f),f.from=function(w,m,v){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,m,v)},f.alloc=function(w,m,v){if(typeof w!="number")throw new TypeError("Argument must be a number");var y=p(w);return m!==void 0?typeof v=="string"?y.fill(m,v):y.fill(m):y.fill(0),y},f.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},f.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(w)}})(safeBuffer$2,safeBuffer$2.exports)),safeBuffer$2.exports}var hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b.exports;hasRequiredBrowser$b=1;var _=65536,S=4294967295;function I(){throw new Error(`Secure random number generation is not supported by this browser.
2
- Use Chrome, Firefox or Internet Explorer 11`)}var p=requireSafeBuffer$2().Buffer,R=commonjsGlobal.crypto||commonjsGlobal.msCrypto;R&&R.getRandomValues?browser$b.exports=f:browser$b.exports=I;function f(w,m){if(w>S)throw new RangeError("requested too many random bytes");var v=p.allocUnsafe(w);if(w>0)if(w>_)for(var y=0;y<w;y+=_)R.getRandomValues(v.slice(y,y+_));else R.getRandomValues(v);return typeof m=="function"?process$1.nextTick(function(){m(null,v)}):v}return browser$b.exports}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(S,I){I&&(S.super_=I,S.prototype=Object.create(I.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(S,I){if(I){S.super_=I;var p=function(){};p.prototype=I.prototype,S.prototype=new p,S.prototype.constructor=S}}),inherits_browser.exports}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var _=typeof Reflect=="object"?Reflect:null,S=_&&typeof _.apply=="function"?_.apply:function(V,Q,ne){return Function.prototype.apply.call(V,Q,ne)},I;_&&typeof _.ownKeys=="function"?I=_.ownKeys:Object.getOwnPropertySymbols?I=function(V){return Object.getOwnPropertyNames(V).concat(Object.getOwnPropertySymbols(V))}:I=function(V){return Object.getOwnPropertyNames(V)};function p(N){console&&console.warn&&console.warn(N)}var R=Number.isNaN||function(V){return V!==V};function f(){f.init.call(this)}events.exports=f,events.exports.once=C,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var w=10;function m(N){if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N)}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return w},set:function(N){if(typeof N!="number"||N<0||R(N))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+N+".");w=N}}),f.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(V){if(typeof V!="number"||V<0||R(V))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+V+".");return this._maxListeners=V,this};function v(N){return N._maxListeners===void 0?f.defaultMaxListeners:N._maxListeners}f.prototype.getMaxListeners=function(){return v(this)},f.prototype.emit=function(V){for(var Q=[],ne=1;ne<arguments.length;ne++)Q.push(arguments[ne]);var ae=V==="error",ee=this._events;if(ee!==void 0)ae=ae&&ee.error===void 0;else if(!ae)return!1;if(ae){var le;if(Q.length>0&&(le=Q[0]),le instanceof Error)throw le;var c=new Error("Unhandled error."+(le?" ("+le.message+")":""));throw c.context=le,c}var e=ee[V];if(e===void 0)return!1;if(typeof e=="function")S(e,this,Q);else for(var t=e.length,n=B(e,t),ne=0;ne<t;++ne)S(n[ne],this,Q);return!0};function y(N,V,Q,ne){var ae,ee,le;if(m(Q),ee=N._events,ee===void 0?(ee=N._events=Object.create(null),N._eventsCount=0):(ee.newListener!==void 0&&(N.emit("newListener",V,Q.listener?Q.listener:Q),ee=N._events),le=ee[V]),le===void 0)le=ee[V]=Q,++N._eventsCount;else if(typeof le=="function"?le=ee[V]=ne?[Q,le]:[le,Q]:ne?le.unshift(Q):le.push(Q),ae=v(N),ae>0&&le.length>ae&&!le.warned){le.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+le.length+" "+String(V)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=N,c.type=V,c.count=le.length,p(c)}return N}f.prototype.addListener=function(V,Q){return y(this,V,Q,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(V,Q){return y(this,V,Q,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(N,V,Q){var ne={fired:!1,wrapFn:void 0,target:N,type:V,listener:Q},ae=d.bind(ne);return ae.listener=Q,ne.wrapFn=ae,ae}f.prototype.once=function(V,Q){return m(Q),this.on(V,g(this,V,Q)),this},f.prototype.prependOnceListener=function(V,Q){return m(Q),this.prependListener(V,g(this,V,Q)),this},f.prototype.removeListener=function(V,Q){var ne,ae,ee,le,c;if(m(Q),ae=this._events,ae===void 0)return this;if(ne=ae[V],ne===void 0)return this;if(ne===Q||ne.listener===Q)--this._eventsCount===0?this._events=Object.create(null):(delete ae[V],ae.removeListener&&this.emit("removeListener",V,ne.listener||Q));else if(typeof ne!="function"){for(ee=-1,le=ne.length-1;le>=0;le--)if(ne[le]===Q||ne[le].listener===Q){c=ne[le].listener,ee=le;break}if(ee<0)return this;ee===0?ne.shift():A(ne,ee),ne.length===1&&(ae[V]=ne[0]),ae.removeListener!==void 0&&this.emit("removeListener",V,c||Q)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(V){var Q,ne,ae;if(ne=this._events,ne===void 0)return this;if(ne.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ne[V]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ne[V]),this;if(arguments.length===0){var ee=Object.keys(ne),le;for(ae=0;ae<ee.length;++ae)le=ee[ae],le!=="removeListener"&&this.removeAllListeners(le);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Q=ne[V],typeof Q=="function")this.removeListener(V,Q);else if(Q!==void 0)for(ae=Q.length-1;ae>=0;ae--)this.removeListener(V,Q[ae]);return this};function M(N,V,Q){var ne=N._events;if(ne===void 0)return[];var ae=ne[V];return ae===void 0?[]:typeof ae=="function"?Q?[ae.listener||ae]:[ae]:Q?D(ae):B(ae,ae.length)}f.prototype.listeners=function(V){return M(this,V,!0)},f.prototype.rawListeners=function(V){return M(this,V,!1)},f.listenerCount=function(N,V){return typeof N.listenerCount=="function"?N.listenerCount(V):x.call(N,V)},f.prototype.listenerCount=x;function x(N){var V=this._events;if(V!==void 0){var Q=V[N];if(typeof Q=="function")return 1;if(Q!==void 0)return Q.length}return 0}f.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};function B(N,V){for(var Q=new Array(V),ne=0;ne<V;++ne)Q[ne]=N[ne];return Q}function A(N,V){for(;V+1<N.length;V++)N[V]=N[V+1];N.pop()}function D(N){for(var V=new Array(N.length),Q=0;Q<V.length;++Q)V[Q]=N[Q].listener||N[Q];return V}function C(N,V){return new Promise(function(Q,ne){function ae(le){N.removeListener(V,ee),ne(le)}function ee(){typeof N.removeListener=="function"&&N.removeListener("error",ae),Q([].slice.call(arguments))}H(N,V,ee,{once:!0}),V!=="error"&&$(N,ae,{once:!0})})}function $(N,V,Q){typeof N.on=="function"&&H(N,"error",V,Q)}function H(N,V,Q,ne){if(typeof N.on=="function")ne.once?N.once(V,Q):N.on(V,Q);else if(typeof N.addEventListener=="function")N.addEventListener(V,function ae(ee){ne.once&&N.removeEventListener(V,ae),Q(ee)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof N)}return events.exports}var streamBrowser$2,hasRequiredStreamBrowser$2;function requireStreamBrowser$2(){return hasRequiredStreamBrowser$2||(hasRequiredStreamBrowser$2=1,streamBrowser$2=requireEvents().EventEmitter),streamBrowser$2}var util$1={},types={},shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var S={},I=Symbol("test"),p=Object(I);if(typeof I=="string"||Object.prototype.toString.call(I)!=="[object Symbol]"||Object.prototype.toString.call(p)!=="[object Symbol]")return!1;var R=42;S[I]=R;for(var f in S)return!1;if(typeof Object.keys=="function"&&Object.keys(S).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(S).length!==0)return!1;var w=Object.getOwnPropertySymbols(S);if(w.length!==1||w[0]!==I||!Object.prototype.propertyIsEnumerable.call(S,I))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var m=Object.getOwnPropertyDescriptor(S,I);if(m.value!==R||m.enumerable!==!0)return!1}return!0}),shams$1}var shams,hasRequiredShams;function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var _=requireShams$1();return shams=function(){return _()&&!!Symbol.toStringTag},shams}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max,hasRequiredMax;function requireMax(){return hasRequiredMax||(hasRequiredMax=1,max=Math.max),max}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow=Math.pow),pow}var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(S){return S!==S}),_isNaN}var sign$1,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1;var _=require_isNaN();return sign$1=function(I){return _(I)||I===0?I:I<0?-1:1},sign$1}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var _=requireGOPD();if(_)try{_([],"length")}catch{_=null}return gopd=_,gopd}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var _=Object.defineProperty||!1;if(_)try{_({},"a",{value:1})}catch{_=!1}return esDefineProperty=_,esDefineProperty}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var _=typeof Symbol<"u"&&Symbol,S=requireShams$1();return hasSymbols=function(){return typeof _!="function"||typeof Symbol!="function"||typeof _("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:S()},hasSymbols}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var _=requireEsObjectAtoms();return Object_getPrototypeOf=_.getPrototypeOf||null,Object_getPrototypeOf}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var _="Function.prototype.bind called on incompatible ",S=Object.prototype.toString,I=Math.max,p="[object Function]",R=function(v,y){for(var d=[],g=0;g<v.length;g+=1)d[g]=v[g];for(var M=0;M<y.length;M+=1)d[M+v.length]=y[M];return d},f=function(v,y){for(var d=[],g=y,M=0;g<v.length;g+=1,M+=1)d[M]=v[g];return d},w=function(m,v){for(var y="",d=0;d<m.length;d+=1)y+=m[d],d+1<m.length&&(y+=v);return y};return implementation=function(v){var y=this;if(typeof y!="function"||S.apply(y)!==p)throw new TypeError(_+y);for(var d=f(arguments,1),g,M=function(){if(this instanceof g){var C=y.apply(this,R(d,arguments));return Object(C)===C?C:this}return y.apply(v,R(d,arguments))},x=I(0,y.length-d.length),B=[],A=0;A<x;A++)B[A]="$"+A;if(g=Function("binder","return function ("+w(B,",")+"){ return binder.apply(this,arguments); }")(M),y.prototype){var D=function(){};D.prototype=y.prototype,g.prototype=new D,D.prototype=null}return g},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var _=requireImplementation();return functionBind=Function.prototype.bind||_,functionBind}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){return hasRequiredFunctionCall||(hasRequiredFunctionCall=1,functionCall=Function.prototype.call),functionCall}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply||(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply),functionApply}var reflectApply,hasRequiredReflectApply;function requireReflectApply(){return hasRequiredReflectApply||(hasRequiredReflectApply=1,reflectApply=typeof Reflect<"u"&&Reflect&&Reflect.apply),reflectApply}var actualApply,hasRequiredActualApply;function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var _=requireFunctionBind(),S=requireFunctionApply(),I=requireFunctionCall(),p=requireReflectApply();return actualApply=p||_.call(I,S),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var _=requireFunctionBind(),S=requireType(),I=requireFunctionCall(),p=requireActualApply();return callBindApplyHelpers=function(f){if(f.length<1||typeof f[0]!="function")throw new S("a function is required");return p(_,I,f)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var _=requireCallBindApplyHelpers(),S=requireGopd(),I;try{I=[].__proto__===Array.prototype}catch(w){if(!w||typeof w!="object"||!("code"in w)||w.code!=="ERR_PROTO_ACCESS")throw w}var p=!!I&&S&&S(Object.prototype,"__proto__"),R=Object,f=R.getPrototypeOf;return get=p&&typeof p.get=="function"?_([p.get]):typeof f=="function"?function(m){return f(m==null?m:R(m))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var _=requireReflect_getPrototypeOf(),S=requireObject_getPrototypeOf(),I=requireGet();return getProto=_?function(R){return _(R)}:S?function(R){if(!R||typeof R!="object"&&typeof R!="function")throw new TypeError("getProto: not an object");return S(R)}:I?function(R){return I(R)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var _=Function.prototype.call,S=Object.prototype.hasOwnProperty,I=requireFunctionBind();return hasown=I.call(_,S),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var _,S=requireEsObjectAtoms(),I=requireEsErrors(),p=require_eval(),R=requireRange(),f=requireRef(),w=requireSyntax(),m=requireType(),v=requireUri(),y=requireAbs(),d=requireFloor(),g=requireMax(),M=requireMin(),x=requirePow(),B=requireRound(),A=requireSign$1(),D=Function,C=function(W){try{return D('"use strict"; return ('+W+").constructor;")()}catch{}},$=requireGopd(),H=requireEsDefineProperty(),N=function(){throw new m},V=$?(function(){try{return arguments.callee,N}catch{try{return $(arguments,"callee").get}catch{return N}}})():N,Q=requireHasSymbols()(),ne=requireGetProto(),ae=requireObject_getPrototypeOf(),ee=requireReflect_getPrototypeOf(),le=requireFunctionApply(),c=requireFunctionCall(),e={},t=typeof Uint8Array>"u"||!ne?_:ne(Uint8Array),n={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?_:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?_:ArrayBuffer,"%ArrayIteratorPrototype%":Q&&ne?ne([][Symbol.iterator]()):_,"%AsyncFromSyncIteratorPrototype%":_,"%AsyncFunction%":e,"%AsyncGenerator%":e,"%AsyncGeneratorFunction%":e,"%AsyncIteratorPrototype%":e,"%Atomics%":typeof Atomics>"u"?_:Atomics,"%BigInt%":typeof BigInt>"u"?_:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?_:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?_:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?_:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":I,"%eval%":eval,"%EvalError%":p,"%Float16Array%":typeof Float16Array>"u"?_:Float16Array,"%Float32Array%":typeof Float32Array>"u"?_:Float32Array,"%Float64Array%":typeof Float64Array>"u"?_:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?_:FinalizationRegistry,"%Function%":D,"%GeneratorFunction%":e,"%Int8Array%":typeof Int8Array>"u"?_:Int8Array,"%Int16Array%":typeof Int16Array>"u"?_:Int16Array,"%Int32Array%":typeof Int32Array>"u"?_:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Q&&ne?ne(ne([][Symbol.iterator]())):_,"%JSON%":typeof JSON=="object"?JSON:_,"%Map%":typeof Map>"u"?_:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Q||!ne?_:ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":S,"%Object.getOwnPropertyDescriptor%":$,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?_:Promise,"%Proxy%":typeof Proxy>"u"?_:Proxy,"%RangeError%":R,"%ReferenceError%":f,"%Reflect%":typeof Reflect>"u"?_:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?_:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Q||!ne?_:ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?_:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Q&&ne?ne(""[Symbol.iterator]()):_,"%Symbol%":Q?Symbol:_,"%SyntaxError%":w,"%ThrowTypeError%":V,"%TypedArray%":t,"%TypeError%":m,"%Uint8Array%":typeof Uint8Array>"u"?_:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?_:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?_:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?_:Uint32Array,"%URIError%":v,"%WeakMap%":typeof WeakMap>"u"?_:WeakMap,"%WeakRef%":typeof WeakRef>"u"?_:WeakRef,"%WeakSet%":typeof WeakSet>"u"?_:WeakSet,"%Function.prototype.call%":c,"%Function.prototype.apply%":le,"%Object.defineProperty%":H,"%Object.getPrototypeOf%":ae,"%Math.abs%":y,"%Math.floor%":d,"%Math.max%":g,"%Math.min%":M,"%Math.pow%":x,"%Math.round%":B,"%Math.sign%":A,"%Reflect.getPrototypeOf%":ee};if(ne)try{null.error}catch(W){var a=ne(ne(W));n["%Error.prototype%"]=a}var s=function W(J){var X;if(J==="%AsyncFunction%")X=C("async function () {}");else if(J==="%GeneratorFunction%")X=C("function* () {}");else if(J==="%AsyncGeneratorFunction%")X=C("async function* () {}");else if(J==="%AsyncGenerator%"){var U=W("%AsyncGeneratorFunction%");U&&(X=U.prototype)}else if(J==="%AsyncIteratorPrototype%"){var re=W("%AsyncGenerator%");re&&ne&&(X=ne(re.prototype))}return n[J]=X,X},u={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},l=requireFunctionBind(),o=requireHasown(),r=l.call(c,Array.prototype.concat),h=l.call(le,Array.prototype.splice),b=l.call(c,String.prototype.replace),E=l.call(c,String.prototype.slice),L=l.call(c,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,q=function(J){var X=E(J,0,1),U=E(J,-1);if(X==="%"&&U!=="%")throw new w("invalid intrinsic syntax, expected closing `%`");if(U==="%"&&X!=="%")throw new w("invalid intrinsic syntax, expected opening `%`");var re=[];return b(J,Y,function(Ie,ue,he,$e){re[re.length]=he?b($e,K,"$1"):ue||Ie}),re},P=function(J,X){var U=J,re;if(o(u,U)&&(re=u[U],U="%"+re[0]+"%"),o(n,U)){var Ie=n[U];if(Ie===e&&(Ie=s(U)),typeof Ie>"u"&&!X)throw new m("intrinsic "+J+" exists, but is not available. Please file an issue!");return{alias:re,name:U,value:Ie}}throw new w("intrinsic "+J+" does not exist!")};return getIntrinsic=function(J,X){if(typeof J!="string"||J.length===0)throw new m("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof X!="boolean")throw new m('"allowMissing" argument must be a boolean');if(L(/^%?[^%]*%?$/,J)===null)throw new w("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var U=q(J),re=U.length>0?U[0]:"",Ie=P("%"+re+"%",X),ue=Ie.name,he=Ie.value,$e=!1,me=Ie.alias;me&&(re=me[0],h(U,r([0,1],me)));for(var se=1,De=!0;se<U.length;se+=1){var de=U[se],ye=E(de,0,1),Ce=E(de,-1);if((ye==='"'||ye==="'"||ye==="`"||Ce==='"'||Ce==="'"||Ce==="`")&&ye!==Ce)throw new w("property names with quotes must have matching quotes");if((de==="constructor"||!De)&&($e=!0),re+="."+de,ue="%"+re+"%",o(n,ue))he=n[ue];else if(he!=null){if(!(de in he)){if(!X)throw new m("base intrinsic for "+J+" exists, but the property is not available.");return}if($&&se+1>=U.length){var pe=$(he,de);De=!!pe,De&&"get"in pe&&!("originalValue"in pe.get)?he=pe.get:he=he[de]}else De=o(he,de),he=he[de];De&&!$e&&(n[ue]=he)}}return he},getIntrinsic}var callBound,hasRequiredCallBound;function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var _=requireGetIntrinsic(),S=requireCallBindApplyHelpers(),I=S([_("%String.prototype.indexOf%")]);return callBound=function(R,f){var w=_(R,!!f);return typeof w=="function"&&I(R,".prototype.")>-1?S([w]):w},callBound}var isArguments,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var _=requireShams()(),S=requireCallBound(),I=S("Object.prototype.toString"),p=function(m){return _&&m&&typeof m=="object"&&Symbol.toStringTag in m?!1:I(m)==="[object Arguments]"},R=function(m){return p(m)?!0:m!==null&&typeof m=="object"&&"length"in m&&typeof m.length=="number"&&m.length>=0&&I(m)!=="[object Array]"&&"callee"in m&&I(m.callee)==="[object Function]"},f=(function(){return p(arguments)})();return p.isLegacyArguments=R,isArguments=f?p:R,isArguments}var isRegex,hasRequiredIsRegex;function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var _=requireCallBound(),S=requireShams()(),I=requireHasown(),p=requireGopd(),R;if(S){var f=_("RegExp.prototype.exec"),w={},m=function(){throw w},v={toString:m,valueOf:m};typeof Symbol.toPrimitive=="symbol"&&(v[Symbol.toPrimitive]=m),R=function(M){if(!M||typeof M!="object")return!1;var x=p(M,"lastIndex"),B=x&&I(x,"value");if(!B)return!1;try{f(M,v)}catch(A){return A===w}}}else{var y=_("Object.prototype.toString"),d="[object RegExp]";R=function(M){return!M||typeof M!="object"&&typeof M!="function"?!1:y(M)===d}}return isRegex=R,isRegex}var safeRegexTest,hasRequiredSafeRegexTest;function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var _=requireCallBound(),S=requireIsRegex(),I=_("RegExp.prototype.exec"),p=requireType();return safeRegexTest=function(f){if(!S(f))throw new p("`regex` must be a RegExp");return function(m){return I(f,m)!==null}},safeRegexTest}var generatorFunction,hasRequiredGeneratorFunction;function requireGeneratorFunction(){if(hasRequiredGeneratorFunction)return generatorFunction;hasRequiredGeneratorFunction=1;const _=(function*(){}).constructor;return generatorFunction=()=>_,generatorFunction}var isGeneratorFunction,hasRequiredIsGeneratorFunction;function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var _=requireCallBound(),S=requireSafeRegexTest(),I=S(/^\s*(?:function)?\*/),p=requireShams()(),R=requireGetProto(),f=_("Object.prototype.toString"),w=_("Function.prototype.toString"),m=requireGeneratorFunction();return isGeneratorFunction=function(y){if(typeof y!="function")return!1;if(I(w(y)))return!0;if(!p){var d=f(y);return d==="[object GeneratorFunction]"}if(!R)return!1;var g=m();return g&&R(y)===g.prototype},isGeneratorFunction}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var _=Function.prototype.toString,S=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,I,p;if(typeof S=="function"&&typeof Object.defineProperty=="function")try{I=Object.defineProperty({},"length",{get:function(){throw p}}),p={},S(function(){throw 42},null,I)}catch($){$!==p&&(S=null)}else S=null;var R=/^\s*class\b/,f=function(H){try{var N=_.call(H);return R.test(N)}catch{return!1}},w=function(H){try{return f(H)?!1:(_.call(H),!0)}catch{return!1}},m=Object.prototype.toString,v="[object Object]",y="[object Function]",d="[object GeneratorFunction]",g="[object HTMLAllCollection]",M="[object HTML document.all class]",x="[object HTMLCollection]",B=typeof Symbol=="function"&&!!Symbol.toStringTag,A=!(0 in[,]),D=function(){return!1};if(typeof document=="object"){var C=document.all;m.call(C)===m.call(document.all)&&(D=function(H){if((A||!H)&&(typeof H>"u"||typeof H=="object"))try{var N=m.call(H);return(N===g||N===M||N===x||N===v)&&H("")==null}catch{}return!1})}return isCallable=S?function(H){if(D(H))return!0;if(!H||typeof H!="function"&&typeof H!="object")return!1;try{S(H,null,I)}catch(N){if(N!==p)return!1}return!f(H)&&w(H)}:function(H){if(D(H))return!0;if(!H||typeof H!="function"&&typeof H!="object")return!1;if(B)return w(H);if(f(H))return!1;var N=m.call(H);return N!==y&&N!==d&&!/^\[object HTML/.test(N)?!1:w(H)},isCallable}var forEach,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var _=requireIsCallable(),S=Object.prototype.toString,I=Object.prototype.hasOwnProperty,p=function(v,y,d){for(var g=0,M=v.length;g<M;g++)I.call(v,g)&&(d==null?y(v[g],g,v):y.call(d,v[g],g,v))},R=function(v,y,d){for(var g=0,M=v.length;g<M;g++)d==null?y(v.charAt(g),g,v):y.call(d,v.charAt(g),g,v)},f=function(v,y,d){for(var g in v)I.call(v,g)&&(d==null?y(v[g],g,v):y.call(d,v[g],g,v))};function w(m){return S.call(m)==="[object Array]"}return forEach=function(v,y,d){if(!_(y))throw new TypeError("iterator must be a function");var g;arguments.length>=3&&(g=d),w(v)?p(v,y,g):typeof v=="string"?R(v,y,g):f(v,y,g)},forEach}var possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames;function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames||(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),possibleTypedArrayNames}var availableTypedArrays,hasRequiredAvailableTypedArrays;function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var _=requirePossibleTypedArrayNames(),S=typeof globalThis>"u"?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var p=[],R=0;R<_.length;R++)typeof S[_[R]]=="function"&&(p[p.length]=_[R]);return p},availableTypedArrays}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var _=requireEsDefineProperty(),S=requireSyntax(),I=requireType(),p=requireGopd();return defineDataProperty=function(f,w,m){if(!f||typeof f!="object"&&typeof f!="function")throw new I("`obj` must be an object or a function`");if(typeof w!="string"&&typeof w!="symbol")throw new I("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new I("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new I("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new I("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new I("`loose`, if provided, must be a boolean");var v=arguments.length>3?arguments[3]:null,y=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,M=!!p&&p(f,w);if(_)_(f,w,{configurable:d===null&&M?M.configurable:!d,enumerable:v===null&&M?M.enumerable:!v,value:m,writable:y===null&&M?M.writable:!y});else if(g||!v&&!y&&!d)f[w]=m;else throw new S("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var _=requireEsDefineProperty(),S=function(){return!!_};return S.hasArrayLengthDefineBug=function(){if(!_)return null;try{return _([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=S,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var _=requireGetIntrinsic(),S=requireDefineDataProperty(),I=requireHasPropertyDescriptors()(),p=requireGopd(),R=requireType(),f=_("%Math.floor%");return setFunctionLength=function(m,v){if(typeof m!="function")throw new R("`fn` is not a function");if(typeof v!="number"||v<0||v>4294967295||f(v)!==v)throw new R("`length` must be a positive 32-bit integer");var y=arguments.length>2&&!!arguments[2],d=!0,g=!0;if("length"in m&&p){var M=p(m,"length");M&&!M.configurable&&(d=!1),M&&!M.writable&&(g=!1)}return(d||g||!y)&&(I?S(m,"length",v,!0,!0):S(m,"length",v)),m},setFunctionLength}var applyBind,hasRequiredApplyBind;function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var _=requireFunctionBind(),S=requireFunctionApply(),I=requireActualApply();return applyBind=function(){return I(_,S,arguments)},applyBind}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,(function(_){var S=requireSetFunctionLength(),I=requireEsDefineProperty(),p=requireCallBindApplyHelpers(),R=requireApplyBind();_.exports=function(w){var m=p(arguments),v=w.length-(arguments.length-1);return S(m,1+(v>0?v:0),!0)},I?I(_.exports,"apply",{value:R}):_.exports.apply=R})(callBind)),callBind.exports}var whichTypedArray,hasRequiredWhichTypedArray;function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var _=requireForEach(),S=requireAvailableTypedArrays(),I=requireCallBind(),p=requireCallBound(),R=requireGopd(),f=requireGetProto(),w=p("Object.prototype.toString"),m=requireShams()(),v=typeof globalThis>"u"?commonjsGlobal:globalThis,y=S(),d=p("String.prototype.slice"),g=p("Array.prototype.indexOf",!0)||function(D,C){for(var $=0;$<D.length;$+=1)if(D[$]===C)return $;return-1},M={__proto__:null};m&&R&&f?_(y,function(A){var D=new v[A];if(Symbol.toStringTag in D&&f){var C=f(D),$=R(C,Symbol.toStringTag);if(!$&&C){var H=f(C);$=R(H,Symbol.toStringTag)}if($&&$.get){var N=I($.get);M["$"+A]=N}}}):_(y,function(A){var D=new v[A],C=D.slice||D.set;if(C){var $=I(C);M["$"+A]=$}});var x=function(D){var C=!1;return _(M,function($,H){if(!C)try{"$"+$(D)===H&&(C=d(H,1))}catch{}}),C},B=function(D){var C=!1;return _(M,function($,H){if(!C)try{$(D),C=d(H,1)}catch{}}),C};return whichTypedArray=function(D){if(!D||typeof D!="object")return!1;if(!m){var C=d(w(D),8,-1);return g(y,C)>-1?C:C!=="Object"?!1:B(D)}return R?x(D):null},whichTypedArray}var isTypedArray,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var _=requireWhichTypedArray();return isTypedArray=function(I){return!!_(I)},isTypedArray}var hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,(function(_){var S=requireIsArguments(),I=requireIsGeneratorFunction(),p=requireWhichTypedArray(),R=requireIsTypedArray();function f(se){return se.call.bind(se)}var w=typeof BigInt<"u",m=typeof Symbol<"u",v=f(Object.prototype.toString),y=f(Number.prototype.valueOf),d=f(String.prototype.valueOf),g=f(Boolean.prototype.valueOf);if(w)var M=f(BigInt.prototype.valueOf);if(m)var x=f(Symbol.prototype.valueOf);function B(se,De){if(typeof se!="object")return!1;try{return De(se),!0}catch{return!1}}_.isArgumentsObject=S,_.isGeneratorFunction=I,_.isTypedArray=R;function A(se){return typeof Promise<"u"&&se instanceof Promise||se!==null&&typeof se=="object"&&typeof se.then=="function"&&typeof se.catch=="function"}_.isPromise=A;function D(se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(se):R(se)||E(se)}_.isArrayBufferView=D;function C(se){return p(se)==="Uint8Array"}_.isUint8Array=C;function $(se){return p(se)==="Uint8ClampedArray"}_.isUint8ClampedArray=$;function H(se){return p(se)==="Uint16Array"}_.isUint16Array=H;function N(se){return p(se)==="Uint32Array"}_.isUint32Array=N;function V(se){return p(se)==="Int8Array"}_.isInt8Array=V;function Q(se){return p(se)==="Int16Array"}_.isInt16Array=Q;function ne(se){return p(se)==="Int32Array"}_.isInt32Array=ne;function ae(se){return p(se)==="Float32Array"}_.isFloat32Array=ae;function ee(se){return p(se)==="Float64Array"}_.isFloat64Array=ee;function le(se){return p(se)==="BigInt64Array"}_.isBigInt64Array=le;function c(se){return p(se)==="BigUint64Array"}_.isBigUint64Array=c;function e(se){return v(se)==="[object Map]"}e.working=typeof Map<"u"&&e(new Map);function t(se){return typeof Map>"u"?!1:e.working?e(se):se instanceof Map}_.isMap=t;function n(se){return v(se)==="[object Set]"}n.working=typeof Set<"u"&&n(new Set);function a(se){return typeof Set>"u"?!1:n.working?n(se):se instanceof Set}_.isSet=a;function s(se){return v(se)==="[object WeakMap]"}s.working=typeof WeakMap<"u"&&s(new WeakMap);function u(se){return typeof WeakMap>"u"?!1:s.working?s(se):se instanceof WeakMap}_.isWeakMap=u;function l(se){return v(se)==="[object WeakSet]"}l.working=typeof WeakSet<"u"&&l(new WeakSet);function o(se){return l(se)}_.isWeakSet=o;function r(se){return v(se)==="[object ArrayBuffer]"}r.working=typeof ArrayBuffer<"u"&&r(new ArrayBuffer);function h(se){return typeof ArrayBuffer>"u"?!1:r.working?r(se):se instanceof ArrayBuffer}_.isArrayBuffer=h;function b(se){return v(se)==="[object DataView]"}b.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&b(new DataView(new ArrayBuffer(1),0,1));function E(se){return typeof DataView>"u"?!1:b.working?b(se):se instanceof DataView}_.isDataView=E;var L=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Y(se){return v(se)==="[object SharedArrayBuffer]"}function K(se){return typeof L>"u"?!1:(typeof Y.working>"u"&&(Y.working=Y(new L)),Y.working?Y(se):se instanceof L)}_.isSharedArrayBuffer=K;function q(se){return v(se)==="[object AsyncFunction]"}_.isAsyncFunction=q;function P(se){return v(se)==="[object Map Iterator]"}_.isMapIterator=P;function W(se){return v(se)==="[object Set Iterator]"}_.isSetIterator=W;function J(se){return v(se)==="[object Generator]"}_.isGeneratorObject=J;function X(se){return v(se)==="[object WebAssembly.Module]"}_.isWebAssemblyCompiledModule=X;function U(se){return B(se,y)}_.isNumberObject=U;function re(se){return B(se,d)}_.isStringObject=re;function Ie(se){return B(se,g)}_.isBooleanObject=Ie;function ue(se){return w&&B(se,M)}_.isBigIntObject=ue;function he(se){return m&&B(se,x)}_.isSymbolObject=he;function $e(se){return U(se)||re(se)||Ie(se)||ue(se)||he(se)}_.isBoxedPrimitive=$e;function me(se){return typeof Uint8Array<"u"&&(h(se)||K(se))}_.isAnyArrayBuffer=me,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(se){Object.defineProperty(_,se,{enumerable:!1,value:function(){throw new Error(se+" is not supported in userland")}})})})(types)),types}var isBufferBrowser,hasRequiredIsBufferBrowser;function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser||(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(S){return S&&typeof S=="object"&&typeof S.copy=="function"&&typeof S.fill=="function"&&typeof S.readUInt8=="function"}),isBufferBrowser}var hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,(function(_){var S=Object.getOwnPropertyDescriptors||function(E){for(var L=Object.keys(E),Y={},K=0;K<L.length;K++)Y[L[K]]=Object.getOwnPropertyDescriptor(E,L[K]);return Y},I=/%[sdj%]/g;_.format=function(b){if(!V(b)){for(var E=[],L=0;L<arguments.length;L++)E.push(w(arguments[L]));return E.join(" ")}for(var L=1,Y=arguments,K=Y.length,q=String(b).replace(I,function(W){if(W==="%%")return"%";if(L>=K)return W;switch(W){case"%s":return String(Y[L++]);case"%d":return Number(Y[L++]);case"%j":try{return JSON.stringify(Y[L++])}catch{return"[Circular]"}default:return W}}),P=Y[L];L<K;P=Y[++L])$(P)||!ee(P)?q+=" "+P:q+=" "+w(P);return q},_.deprecate=function(b,E){if(typeof process$1<"u"&&process$1.noDeprecation===!0)return b;if(typeof process$1>"u")return function(){return _.deprecate(b,E).apply(this,arguments)};var L=!1;function Y(){if(!L){if(process$1.throwDeprecation)throw new Error(E);process$1.traceDeprecation?console.trace(E):console.error(E),L=!0}return b.apply(this,arguments)}return Y};var p={},R=/^$/;if(process$1.env.NODE_DEBUG){var f=process$1.env.NODE_DEBUG;f=f.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),R=new RegExp("^"+f+"$","i")}_.debuglog=function(b){if(b=b.toUpperCase(),!p[b])if(R.test(b)){var E=process$1.pid;p[b]=function(){var L=_.format.apply(_,arguments);console.error("%s %d: %s",b,E,L)}}else p[b]=function(){};return p[b]};function w(b,E){var L={seen:[],stylize:v};return arguments.length>=3&&(L.depth=arguments[2]),arguments.length>=4&&(L.colors=arguments[3]),C(E)?L.showHidden=E:E&&_._extend(L,E),ne(L.showHidden)&&(L.showHidden=!1),ne(L.depth)&&(L.depth=2),ne(L.colors)&&(L.colors=!1),ne(L.customInspect)&&(L.customInspect=!0),L.colors&&(L.stylize=m),d(L,b,L.depth)}_.inspect=w,w.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},w.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function m(b,E){var L=w.styles[E];return L?"\x1B["+w.colors[L][0]+"m"+b+"\x1B["+w.colors[L][1]+"m":b}function v(b,E){return b}function y(b){var E={};return b.forEach(function(L,Y){E[L]=!0}),E}function d(b,E,L){if(b.customInspect&&E&&e(E.inspect)&&E.inspect!==_.inspect&&!(E.constructor&&E.constructor.prototype===E)){var Y=E.inspect(L,b);return V(Y)||(Y=d(b,Y,L)),Y}var K=g(b,E);if(K)return K;var q=Object.keys(E),P=y(q);if(b.showHidden&&(q=Object.getOwnPropertyNames(E)),c(E)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return M(E);if(q.length===0){if(e(E)){var W=E.name?": "+E.name:"";return b.stylize("[Function"+W+"]","special")}if(ae(E))return b.stylize(RegExp.prototype.toString.call(E),"regexp");if(le(E))return b.stylize(Date.prototype.toString.call(E),"date");if(c(E))return M(E)}var J="",X=!1,U=["{","}"];if(D(E)&&(X=!0,U=["[","]"]),e(E)){var re=E.name?": "+E.name:"";J=" [Function"+re+"]"}if(ae(E)&&(J=" "+RegExp.prototype.toString.call(E)),le(E)&&(J=" "+Date.prototype.toUTCString.call(E)),c(E)&&(J=" "+M(E)),q.length===0&&(!X||E.length==0))return U[0]+J+U[1];if(L<0)return ae(E)?b.stylize(RegExp.prototype.toString.call(E),"regexp"):b.stylize("[Object]","special");b.seen.push(E);var Ie;return X?Ie=x(b,E,L,P,q):Ie=q.map(function(ue){return B(b,E,L,P,ue,X)}),b.seen.pop(),A(Ie,J,U)}function g(b,E){if(ne(E))return b.stylize("undefined","undefined");if(V(E)){var L="'"+JSON.stringify(E).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return b.stylize(L,"string")}if(N(E))return b.stylize(""+E,"number");if(C(E))return b.stylize(""+E,"boolean");if($(E))return b.stylize("null","null")}function M(b){return"["+Error.prototype.toString.call(b)+"]"}function x(b,E,L,Y,K){for(var q=[],P=0,W=E.length;P<W;++P)l(E,String(P))?q.push(B(b,E,L,Y,String(P),!0)):q.push("");return K.forEach(function(J){J.match(/^\d+$/)||q.push(B(b,E,L,Y,J,!0))}),q}function B(b,E,L,Y,K,q){var P,W,J;if(J=Object.getOwnPropertyDescriptor(E,K)||{value:E[K]},J.get?J.set?W=b.stylize("[Getter/Setter]","special"):W=b.stylize("[Getter]","special"):J.set&&(W=b.stylize("[Setter]","special")),l(Y,K)||(P="["+K+"]"),W||(b.seen.indexOf(J.value)<0?($(L)?W=d(b,J.value,null):W=d(b,J.value,L-1),W.indexOf(`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function getDefaultExportFromCjs(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}var browser$c={exports:{}},process=browser$c.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(_){if(cachedSetTimeout===setTimeout)return setTimeout(_,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(_,0);try{return cachedSetTimeout(_,0)}catch{try{return cachedSetTimeout.call(null,_,0)}catch{return cachedSetTimeout.call(this,_,0)}}}function runClearTimeout(_){if(cachedClearTimeout===clearTimeout)return clearTimeout(_);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(_);try{return cachedClearTimeout(_)}catch{try{return cachedClearTimeout.call(null,_)}catch{return cachedClearTimeout.call(this,_)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var _=runTimeout(cleanUpNextTick);draining=!0;for(var S=queue.length;S;){for(currentQueue=queue,queue=[];++queueIndex<S;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,S=queue.length}currentQueue=null,draining=!1,runClearTimeout(_)}}process.nextTick=function(_){var S=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)S[I-1]=arguments[I];queue.push(new Item(_,S)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(_,S){this.fun=_,this.array=S}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=!0;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(_){return[]};process.binding=function(_){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(_){throw new Error("process.chdir is not supported")};process.umask=function(){return 0};var browserExports=browser$c.exports;const process$1=getDefaultExportFromCjs(browserExports);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},cryptoBrowserify={},browser$b={exports:{}},safeBuffer$2={exports:{}},dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,(function(_){Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var S={},I={};I.byteLength=d,I.toByteArray=M,I.fromByteArray=A;for(var p=[],R=[],f=typeof Uint8Array<"u"?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,v=w.length;m<v;++m)p[m]=w[m],R[w.charCodeAt(m)]=m;R[45]=62,R[95]=63;function y(P){var H=P.length;if(H%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var N=P.indexOf("=");N===-1&&(N=H);var V=N===H?0:4-N%4;return[N,V]}function d(P){var H=y(P),N=H[0],V=H[1];return(N+V)*3/4-V}function g(P,H,N){return(H+N)*3/4-N}function M(P){var H,N=y(P),V=N[0],Q=N[1],ne=new f(g(P,V,Q)),ae=0,ee=Q>0?V-4:V,le;for(le=0;le<ee;le+=4)H=R[P.charCodeAt(le)]<<18|R[P.charCodeAt(le+1)]<<12|R[P.charCodeAt(le+2)]<<6|R[P.charCodeAt(le+3)],ne[ae++]=H>>16&255,ne[ae++]=H>>8&255,ne[ae++]=H&255;return Q===2&&(H=R[P.charCodeAt(le)]<<2|R[P.charCodeAt(le+1)]>>4,ne[ae++]=H&255),Q===1&&(H=R[P.charCodeAt(le)]<<10|R[P.charCodeAt(le+1)]<<4|R[P.charCodeAt(le+2)]>>2,ne[ae++]=H>>8&255,ne[ae++]=H&255),ne}function x(P){return p[P>>18&63]+p[P>>12&63]+p[P>>6&63]+p[P&63]}function B(P,H,N){for(var V,Q=[],ne=H;ne<N;ne+=3)V=(P[ne]<<16&16711680)+(P[ne+1]<<8&65280)+(P[ne+2]&255),Q.push(x(V));return Q.join("")}function A(P){for(var H,N=P.length,V=N%3,Q=[],ne=16383,ae=0,ee=N-V;ae<ee;ae+=ne)Q.push(B(P,ae,ae+ne>ee?ee:ae+ne));return V===1?(H=P[N-1],Q.push(p[H>>2]+p[H<<4&63]+"==")):V===2&&(H=(P[N-2]<<8)+P[N-1],Q.push(p[H>>10]+p[H>>4&63]+p[H<<2&63]+"=")),Q.join("")}var D={};D.read=function(P,H,N,V,Q){var ne,ae,ee=Q*8-V-1,le=(1<<ee)-1,c=le>>1,e=-7,t=N?Q-1:0,n=N?-1:1,a=P[H+t];for(t+=n,ne=a&(1<<-e)-1,a>>=-e,e+=ee;e>0;ne=ne*256+P[H+t],t+=n,e-=8);for(ae=ne&(1<<-e)-1,ne>>=-e,e+=V;e>0;ae=ae*256+P[H+t],t+=n,e-=8);if(ne===0)ne=1-c;else{if(ne===le)return ae?NaN:(a?-1:1)*(1/0);ae=ae+Math.pow(2,V),ne=ne-c}return(a?-1:1)*ae*Math.pow(2,ne-V)},D.write=function(P,H,N,V,Q,ne){var ae,ee,le,c=ne*8-Q-1,e=(1<<c)-1,t=e>>1,n=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=V?0:ne-1,s=V?1:-1,u=H<0||H===0&&1/H<0?1:0;for(H=Math.abs(H),isNaN(H)||H===1/0?(ee=isNaN(H)?1:0,ae=e):(ae=Math.floor(Math.log(H)/Math.LN2),H*(le=Math.pow(2,-ae))<1&&(ae--,le*=2),ae+t>=1?H+=n/le:H+=n*Math.pow(2,1-t),H*le>=2&&(ae++,le/=2),ae+t>=e?(ee=0,ae=e):ae+t>=1?(ee=(H*le-1)*Math.pow(2,Q),ae=ae+t):(ee=H*Math.pow(2,t-1)*Math.pow(2,Q),ae=0));Q>=8;P[N+a]=ee&255,a+=s,ee/=256,Q-=8);for(ae=ae<<Q|ee,c+=Q;c>0;P[N+a]=ae&255,a+=s,ae/=256,c-=8);P[N+a-s]|=u*128};(function(P){const H=I,N=D,V=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;P.Buffer=e,P.SlowBuffer=E,P.INSPECT_MAX_BYTES=50;const Q=2147483647;P.kMaxLength=Q;const{Uint8Array:ne,ArrayBuffer:ae,SharedArrayBuffer:ee}=globalThis;e.TYPED_ARRAY_SUPPORT=le(),!e.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 le(){try{const z=new ne(1),T={foo:function(){return 42}};return Object.setPrototypeOf(T,ne.prototype),Object.setPrototypeOf(z,T),z.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function c(z){if(z>Q)throw new RangeError('The value "'+z+'" is invalid for option "size"');const T=new ne(z);return Object.setPrototypeOf(T,e.prototype),T}function e(z,T,F){if(typeof z=="number"){if(typeof T=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(z)}return t(z,T,F)}e.poolSize=8192;function t(z,T,F){if(typeof z=="string")return u(z,T);if(ae.isView(z))return o(z);if(z==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z);if(ke(z,ae)||z&&ke(z.buffer,ae)||typeof ee<"u"&&(ke(z,ee)||z&&ke(z.buffer,ee)))return r(z,T,F);if(typeof z=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z=z.valueOf&&z.valueOf();if(Z!=null&&Z!==z)return e.from(Z,T,F);const ie=h(z);if(ie)return ie;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof z[Symbol.toPrimitive]=="function")return e.from(z[Symbol.toPrimitive]("string"),T,F);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z)}e.from=function(z,T,F){return t(z,T,F)},Object.setPrototypeOf(e.prototype,ne.prototype),Object.setPrototypeOf(e,ne);function n(z){if(typeof z!="number")throw new TypeError('"size" argument must be of type number');if(z<0)throw new RangeError('The value "'+z+'" is invalid for option "size"')}function a(z,T,F){return n(z),z<=0?c(z):T!==void 0?typeof F=="string"?c(z).fill(T,F):c(z).fill(T):c(z)}e.alloc=function(z,T,F){return a(z,T,F)};function s(z){return n(z),c(z<0?0:b(z)|0)}e.allocUnsafe=function(z){return s(z)},e.allocUnsafeSlow=function(z){return s(z)};function u(z,T){if((typeof T!="string"||T==="")&&(T="utf8"),!e.isEncoding(T))throw new TypeError("Unknown encoding: "+T);const F=L(z,T)|0;let Z=c(F);const ie=Z.write(z,T);return ie!==F&&(Z=Z.slice(0,ie)),Z}function l(z){const T=z.length<0?0:b(z.length)|0,F=c(T);for(let Z=0;Z<T;Z+=1)F[Z]=z[Z]&255;return F}function o(z){if(ke(z,ne)){const T=new ne(z);return r(T.buffer,T.byteOffset,T.byteLength)}return l(z)}function r(z,T,F){if(T<0||z.byteLength<T)throw new RangeError('"offset" is outside of buffer bounds');if(z.byteLength<T+(F||0))throw new RangeError('"length" is outside of buffer bounds');let Z;return T===void 0&&F===void 0?Z=new ne(z):F===void 0?Z=new ne(z,T):Z=new ne(z,T,F),Object.setPrototypeOf(Z,e.prototype),Z}function h(z){if(e.isBuffer(z)){const T=b(z.length)|0,F=c(T);return F.length===0||z.copy(F,0,0,T),F}if(z.length!==void 0)return typeof z.length!="number"||We(z.length)?c(0):l(z);if(z.type==="Buffer"&&Array.isArray(z.data))return l(z.data)}function b(z){if(z>=Q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q.toString(16)+" bytes");return z|0}function E(z){return+z!=z&&(z=0),e.alloc(+z)}e.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==e.prototype},e.compare=function(T,F){if(ke(T,ne)&&(T=e.from(T,T.offset,T.byteLength)),ke(F,ne)&&(F=e.from(F,F.offset,F.byteLength)),!e.isBuffer(T)||!e.isBuffer(F))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===F)return 0;let Z=T.length,ie=F.length;for(let ve=0,oe=Math.min(Z,ie);ve<oe;++ve)if(T[ve]!==F[ve]){Z=T[ve],ie=F[ve];break}return Z<ie?-1:ie<Z?1:0},e.isEncoding=function(T){switch(String(T).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(T,F){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return e.alloc(0);let Z;if(F===void 0)for(F=0,Z=0;Z<T.length;++Z)F+=T[Z].length;const ie=e.allocUnsafe(F);let ve=0;for(Z=0;Z<T.length;++Z){let oe=T[Z];if(ke(oe,ne))ve+oe.length>ie.length?(e.isBuffer(oe)||(oe=e.from(oe)),oe.copy(ie,ve)):ne.prototype.set.call(ie,oe,ve);else if(e.isBuffer(oe))oe.copy(ie,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=oe.length}return ie};function L(z,T){if(e.isBuffer(z))return z.length;if(ae.isView(z)||ke(z,ae))return z.byteLength;if(typeof z!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof z);const F=z.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&F===0)return 0;let ie=!1;for(;;)switch(T){case"ascii":case"latin1":case"binary":return F;case"utf8":case"utf-8":return Ne(z).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F*2;case"hex":return F>>>1;case"base64":return Oe(z).length;default:if(ie)return Z?-1:Ne(z).length;T=(""+T).toLowerCase(),ie=!0}}e.byteLength=L;function Y(z,T,F){let Z=!1;if((T===void 0||T<0)&&(T=0),T>this.length||((F===void 0||F>this.length)&&(F=this.length),F<=0)||(F>>>=0,T>>>=0,F<=T))return"";for(z||(z="utf8");;)switch(z){case"hex":return De(this,T,F);case"utf8":case"utf-8":return ue(this,T,F);case"ascii":return me(this,T,F);case"latin1":case"binary":return se(this,T,F);case"base64":return Ie(this,T,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,T,F);default:if(Z)throw new TypeError("Unknown encoding: "+z);z=(z+"").toLowerCase(),Z=!0}}e.prototype._isBuffer=!0;function K(z,T,F){const Z=z[T];z[T]=z[F],z[F]=Z}e.prototype.swap16=function(){const T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let F=0;F<T;F+=2)K(this,F,F+1);return this},e.prototype.swap32=function(){const T=this.length;if(T%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let F=0;F<T;F+=4)K(this,F,F+3),K(this,F+1,F+2);return this},e.prototype.swap64=function(){const T=this.length;if(T%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let F=0;F<T;F+=8)K(this,F,F+7),K(this,F+1,F+6),K(this,F+2,F+5),K(this,F+3,F+4);return this},e.prototype.toString=function(){const T=this.length;return T===0?"":arguments.length===0?ue(this,0,T):Y.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(T){if(!e.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T?!0:e.compare(this,T)===0},e.prototype.inspect=function(){let T="";const F=P.INSPECT_MAX_BYTES;return T=this.toString("hex",0,F).replace(/(.{2})/g,"$1 ").trim(),this.length>F&&(T+=" ... "),"<Buffer "+T+">"},V&&(e.prototype[V]=e.prototype.inspect),e.prototype.compare=function(T,F,Z,ie,ve){if(ke(T,ne)&&(T=e.from(T,T.offset,T.byteLength)),!e.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(F===void 0&&(F=0),Z===void 0&&(Z=T?T.length:0),ie===void 0&&(ie=0),ve===void 0&&(ve=this.length),F<0||Z>T.length||ie<0||ve>this.length)throw new RangeError("out of range index");if(ie>=ve&&F>=Z)return 0;if(ie>=ve)return-1;if(F>=Z)return 1;if(F>>>=0,Z>>>=0,ie>>>=0,ve>>>=0,this===T)return 0;let oe=ve-ie,Me=Z-F;const Le=Math.min(oe,Me),ge=this.slice(ie,ve),Be=T.slice(F,Z);for(let Fe=0;Fe<Le;++Fe)if(ge[Fe]!==Be[Fe]){oe=ge[Fe],Me=Be[Fe];break}return oe<Me?-1:Me<oe?1:0};function q(z,T,F,Z,ie){if(z.length===0)return-1;if(typeof F=="string"?(Z=F,F=0):F>2147483647?F=2147483647:F<-2147483648&&(F=-2147483648),F=+F,We(F)&&(F=ie?0:z.length-1),F<0&&(F=z.length+F),F>=z.length){if(ie)return-1;F=z.length-1}else if(F<0)if(ie)F=0;else return-1;if(typeof T=="string"&&(T=e.from(T,Z)),e.isBuffer(T))return T.length===0?-1:$(z,T,F,Z,ie);if(typeof T=="number")return T=T&255,typeof ne.prototype.indexOf=="function"?ie?ne.prototype.indexOf.call(z,T,F):ne.prototype.lastIndexOf.call(z,T,F):$(z,[T],F,Z,ie);throw new TypeError("val must be string, number or Buffer")}function $(z,T,F,Z,ie){let ve=1,oe=z.length,Me=T.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(z.length<2||T.length<2)return-1;ve=2,oe/=2,Me/=2,F/=2}function Le(Be,Fe){return ve===1?Be[Fe]:Be.readUInt16BE(Fe*ve)}let ge;if(ie){let Be=-1;for(ge=F;ge<oe;ge++)if(Le(z,ge)===Le(T,Be===-1?0:ge-Be)){if(Be===-1&&(Be=ge),ge-Be+1===Me)return Be*ve}else Be!==-1&&(ge-=ge-Be),Be=-1}else for(F+Me>oe&&(F=oe-Me),ge=F;ge>=0;ge--){let Be=!0;for(let Fe=0;Fe<Me;Fe++)if(Le(z,ge+Fe)!==Le(T,Fe)){Be=!1;break}if(Be)return ge}return-1}e.prototype.includes=function(T,F,Z){return this.indexOf(T,F,Z)!==-1},e.prototype.indexOf=function(T,F,Z){return q(this,T,F,Z,!0)},e.prototype.lastIndexOf=function(T,F,Z){return q(this,T,F,Z,!1)};function W(z,T,F,Z){F=Number(F)||0;const ie=z.length-F;Z?(Z=Number(Z),Z>ie&&(Z=ie)):Z=ie;const ve=T.length;Z>ve/2&&(Z=ve/2);let oe;for(oe=0;oe<Z;++oe){const Me=parseInt(T.substr(oe*2,2),16);if(We(Me))return oe;z[F+oe]=Me}return oe}function J(z,T,F,Z){return qe(Ne(T,z.length-F),z,F,Z)}function X(z,T,F,Z){return qe(be(T),z,F,Z)}function U(z,T,F,Z){return qe(Oe(T),z,F,Z)}function re(z,T,F,Z){return qe(Se(T,z.length-F),z,F,Z)}e.prototype.write=function(T,F,Z,ie){if(F===void 0)ie="utf8",Z=this.length,F=0;else if(Z===void 0&&typeof F=="string")ie=F,Z=this.length,F=0;else if(isFinite(F))F=F>>>0,isFinite(Z)?(Z=Z>>>0,ie===void 0&&(ie="utf8")):(ie=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ve=this.length-F;if((Z===void 0||Z>ve)&&(Z=ve),T.length>0&&(Z<0||F<0)||F>this.length)throw new RangeError("Attempt to write outside buffer bounds");ie||(ie="utf8");let oe=!1;for(;;)switch(ie){case"hex":return W(this,T,F,Z);case"utf8":case"utf-8":return J(this,T,F,Z);case"ascii":case"latin1":case"binary":return X(this,T,F,Z);case"base64":return U(this,T,F,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,T,F,Z);default:if(oe)throw new TypeError("Unknown encoding: "+ie);ie=(""+ie).toLowerCase(),oe=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ie(z,T,F){return T===0&&F===z.length?H.fromByteArray(z):H.fromByteArray(z.slice(T,F))}function ue(z,T,F){F=Math.min(z.length,F);const Z=[];let ie=T;for(;ie<F;){const ve=z[ie];let oe=null,Me=ve>239?4:ve>223?3:ve>191?2:1;if(ie+Me<=F){let Le,ge,Be,Fe;switch(Me){case 1:ve<128&&(oe=ve);break;case 2:Le=z[ie+1],(Le&192)===128&&(Fe=(ve&31)<<6|Le&63,Fe>127&&(oe=Fe));break;case 3:Le=z[ie+1],ge=z[ie+2],(Le&192)===128&&(ge&192)===128&&(Fe=(ve&15)<<12|(Le&63)<<6|ge&63,Fe>2047&&(Fe<55296||Fe>57343)&&(oe=Fe));break;case 4:Le=z[ie+1],ge=z[ie+2],Be=z[ie+3],(Le&192)===128&&(ge&192)===128&&(Be&192)===128&&(Fe=(ve&15)<<18|(Le&63)<<12|(ge&63)<<6|Be&63,Fe>65535&&Fe<1114112&&(oe=Fe))}}oe===null?(oe=65533,Me=1):oe>65535&&(oe-=65536,Z.push(oe>>>10&1023|55296),oe=56320|oe&1023),Z.push(oe),ie+=Me}return Pe(Z)}const he=4096;function Pe(z){const T=z.length;if(T<=he)return String.fromCharCode.apply(String,z);let F="",Z=0;for(;Z<T;)F+=String.fromCharCode.apply(String,z.slice(Z,Z+=he));return F}function me(z,T,F){let Z="";F=Math.min(z.length,F);for(let ie=T;ie<F;++ie)Z+=String.fromCharCode(z[ie]&127);return Z}function se(z,T,F){let Z="";F=Math.min(z.length,F);for(let ie=T;ie<F;++ie)Z+=String.fromCharCode(z[ie]);return Z}function De(z,T,F){const Z=z.length;(!T||T<0)&&(T=0),(!F||F<0||F>Z)&&(F=Z);let ie="";for(let ve=T;ve<F;++ve)ie+=Re[z[ve]];return ie}function de(z,T,F){const Z=z.slice(T,F);let ie="";for(let ve=0;ve<Z.length-1;ve+=2)ie+=String.fromCharCode(Z[ve]+Z[ve+1]*256);return ie}e.prototype.slice=function(T,F){const Z=this.length;T=~~T,F=F===void 0?Z:~~F,T<0?(T+=Z,T<0&&(T=0)):T>Z&&(T=Z),F<0?(F+=Z,F<0&&(F=0)):F>Z&&(F=Z),F<T&&(F=T);const ie=this.subarray(T,F);return Object.setPrototypeOf(ie,e.prototype),ie};function ye(z,T,F){if(z%1!==0||z<0)throw new RangeError("offset is not uint");if(z+T>F)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=this[T],ve=1,oe=0;for(;++oe<F&&(ve*=256);)ie+=this[T+oe]*ve;return ie},e.prototype.readUintBE=e.prototype.readUIntBE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=this[T+--F],ve=1;for(;F>0&&(ve*=256);)ie+=this[T+--F]*ve;return ie},e.prototype.readUint8=e.prototype.readUInt8=function(T,F){return T=T>>>0,F||ye(T,1,this.length),this[T]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(T,F){return T=T>>>0,F||ye(T,2,this.length),this[T]|this[T+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(T,F){return T=T>>>0,F||ye(T,2,this.length),this[T]<<8|this[T+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},e.prototype.readBigUInt64LE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=F+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24,ve=this[++T]+this[++T]*2**8+this[++T]*2**16+Z*2**24;return BigInt(ie)+(BigInt(ve)<<BigInt(32))}),e.prototype.readBigUInt64BE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=F*2**24+this[++T]*2**16+this[++T]*2**8+this[++T],ve=this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+Z;return(BigInt(ie)<<BigInt(32))+BigInt(ve)}),e.prototype.readIntLE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=this[T],ve=1,oe=0;for(;++oe<F&&(ve*=256);)ie+=this[T+oe]*ve;return ve*=128,ie>=ve&&(ie-=Math.pow(2,8*F)),ie},e.prototype.readIntBE=function(T,F,Z){T=T>>>0,F=F>>>0,Z||ye(T,F,this.length);let ie=F,ve=1,oe=this[T+--ie];for(;ie>0&&(ve*=256);)oe+=this[T+--ie]*ve;return ve*=128,oe>=ve&&(oe-=Math.pow(2,8*F)),oe},e.prototype.readInt8=function(T,F){return T=T>>>0,F||ye(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},e.prototype.readInt16LE=function(T,F){T=T>>>0,F||ye(T,2,this.length);const Z=this[T]|this[T+1]<<8;return Z&32768?Z|4294901760:Z},e.prototype.readInt16BE=function(T,F){T=T>>>0,F||ye(T,2,this.length);const Z=this[T+1]|this[T]<<8;return Z&32768?Z|4294901760:Z},e.prototype.readInt32LE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},e.prototype.readInt32BE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},e.prototype.readBigInt64LE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=this[T+4]+this[T+5]*2**8+this[T+6]*2**16+(Z<<24);return(BigInt(ie)<<BigInt(32))+BigInt(F+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24)}),e.prototype.readBigInt64BE=Te(function(T){T=T>>>0,te(T,"offset");const F=this[T],Z=this[T+7];(F===void 0||Z===void 0)&&ce(T,this.length-8);const ie=(F<<24)+this[++T]*2**16+this[++T]*2**8+this[++T];return(BigInt(ie)<<BigInt(32))+BigInt(this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+Z)}),e.prototype.readFloatLE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),N.read(this,T,!0,23,4)},e.prototype.readFloatBE=function(T,F){return T=T>>>0,F||ye(T,4,this.length),N.read(this,T,!1,23,4)},e.prototype.readDoubleLE=function(T,F){return T=T>>>0,F||ye(T,8,this.length),N.read(this,T,!0,52,8)},e.prototype.readDoubleBE=function(T,F){return T=T>>>0,F||ye(T,8,this.length),N.read(this,T,!1,52,8)};function Ce(z,T,F,Z,ie,ve){if(!e.isBuffer(z))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>ie||T<ve)throw new RangeError('"value" argument is out of bounds');if(F+Z>z.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(T,F,Z,ie){if(T=+T,F=F>>>0,Z=Z>>>0,!ie){const Me=Math.pow(2,8*Z)-1;Ce(this,T,F,Z,Me,0)}let ve=1,oe=0;for(this[F]=T&255;++oe<Z&&(ve*=256);)this[F+oe]=T/ve&255;return F+Z},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(T,F,Z,ie){if(T=+T,F=F>>>0,Z=Z>>>0,!ie){const Me=Math.pow(2,8*Z)-1;Ce(this,T,F,Z,Me,0)}let ve=Z-1,oe=1;for(this[F+ve]=T&255;--ve>=0&&(oe*=256);)this[F+ve]=T/oe&255;return F+Z},e.prototype.writeUint8=e.prototype.writeUInt8=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,1,255,0),this[F]=T&255,F+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,65535,0),this[F]=T&255,this[F+1]=T>>>8,F+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,65535,0),this[F]=T>>>8,this[F+1]=T&255,F+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,4294967295,0),this[F+3]=T>>>24,this[F+2]=T>>>16,this[F+1]=T>>>8,this[F]=T&255,F+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,4294967295,0),this[F]=T>>>24,this[F+1]=T>>>16,this[F+2]=T>>>8,this[F+3]=T&255,F+4};function pe(z,T,F,Z,ie){G(T,Z,ie,z,F,7);let ve=Number(T&BigInt(4294967295));z[F++]=ve,ve=ve>>8,z[F++]=ve,ve=ve>>8,z[F++]=ve,ve=ve>>8,z[F++]=ve;let oe=Number(T>>BigInt(32)&BigInt(4294967295));return z[F++]=oe,oe=oe>>8,z[F++]=oe,oe=oe>>8,z[F++]=oe,oe=oe>>8,z[F++]=oe,F}function _e(z,T,F,Z,ie){G(T,Z,ie,z,F,7);let ve=Number(T&BigInt(4294967295));z[F+7]=ve,ve=ve>>8,z[F+6]=ve,ve=ve>>8,z[F+5]=ve,ve=ve>>8,z[F+4]=ve;let oe=Number(T>>BigInt(32)&BigInt(4294967295));return z[F+3]=oe,oe=oe>>8,z[F+2]=oe,oe=oe>>8,z[F+1]=oe,oe=oe>>8,z[F]=oe,F+8}e.prototype.writeBigUInt64LE=Te(function(T,F=0){return pe(this,T,F,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=Te(function(T,F=0){return _e(this,T,F,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(T,F,Z,ie){if(T=+T,F=F>>>0,!ie){const Le=Math.pow(2,8*Z-1);Ce(this,T,F,Z,Le-1,-Le)}let ve=0,oe=1,Me=0;for(this[F]=T&255;++ve<Z&&(oe*=256);)T<0&&Me===0&&this[F+ve-1]!==0&&(Me=1),this[F+ve]=(T/oe>>0)-Me&255;return F+Z},e.prototype.writeIntBE=function(T,F,Z,ie){if(T=+T,F=F>>>0,!ie){const Le=Math.pow(2,8*Z-1);Ce(this,T,F,Z,Le-1,-Le)}let ve=Z-1,oe=1,Me=0;for(this[F+ve]=T&255;--ve>=0&&(oe*=256);)T<0&&Me===0&&this[F+ve+1]!==0&&(Me=1),this[F+ve]=(T/oe>>0)-Me&255;return F+Z},e.prototype.writeInt8=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,1,127,-128),T<0&&(T=255+T+1),this[F]=T&255,F+1},e.prototype.writeInt16LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,32767,-32768),this[F]=T&255,this[F+1]=T>>>8,F+2},e.prototype.writeInt16BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,2,32767,-32768),this[F]=T>>>8,this[F+1]=T&255,F+2},e.prototype.writeInt32LE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,2147483647,-2147483648),this[F]=T&255,this[F+1]=T>>>8,this[F+2]=T>>>16,this[F+3]=T>>>24,F+4},e.prototype.writeInt32BE=function(T,F,Z){return T=+T,F=F>>>0,Z||Ce(this,T,F,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[F]=T>>>24,this[F+1]=T>>>16,this[F+2]=T>>>8,this[F+3]=T&255,F+4},e.prototype.writeBigInt64LE=Te(function(T,F=0){return pe(this,T,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=Te(function(T,F=0){return _e(this,T,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ue(z,T,F,Z,ie,ve){if(F+Z>z.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("Index out of range")}function xe(z,T,F,Z,ie){return T=+T,F=F>>>0,ie||Ue(z,T,F,4),N.write(z,T,F,Z,23,4),F+4}e.prototype.writeFloatLE=function(T,F,Z){return xe(this,T,F,!0,Z)},e.prototype.writeFloatBE=function(T,F,Z){return xe(this,T,F,!1,Z)};function Ae(z,T,F,Z,ie){return T=+T,F=F>>>0,ie||Ue(z,T,F,8),N.write(z,T,F,Z,52,8),F+8}e.prototype.writeDoubleLE=function(T,F,Z){return Ae(this,T,F,!0,Z)},e.prototype.writeDoubleBE=function(T,F,Z){return Ae(this,T,F,!1,Z)},e.prototype.copy=function(T,F,Z,ie){if(!e.isBuffer(T))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!ie&&ie!==0&&(ie=this.length),F>=T.length&&(F=T.length),F||(F=0),ie>0&&ie<Z&&(ie=Z),ie===Z||T.length===0||this.length===0)return 0;if(F<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("sourceEnd out of bounds");ie>this.length&&(ie=this.length),T.length-F<ie-Z&&(ie=T.length-F+Z);const ve=ie-Z;return this===T&&typeof ne.prototype.copyWithin=="function"?this.copyWithin(F,Z,ie):ne.prototype.set.call(T,this.subarray(Z,ie),F),ve},e.prototype.fill=function(T,F,Z,ie){if(typeof T=="string"){if(typeof F=="string"?(ie=F,F=0,Z=this.length):typeof Z=="string"&&(ie=Z,Z=this.length),ie!==void 0&&typeof ie!="string")throw new TypeError("encoding must be a string");if(typeof ie=="string"&&!e.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);if(T.length===1){const oe=T.charCodeAt(0);(ie==="utf8"&&oe<128||ie==="latin1")&&(T=oe)}}else typeof T=="number"?T=T&255:typeof T=="boolean"&&(T=Number(T));if(F<0||this.length<F||this.length<Z)throw new RangeError("Out of range index");if(Z<=F)return this;F=F>>>0,Z=Z===void 0?this.length:Z>>>0,T||(T=0);let ve;if(typeof T=="number")for(ve=F;ve<Z;++ve)this[ve]=T;else{const oe=e.isBuffer(T)?T:e.from(T,ie),Me=oe.length;if(Me===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(ve=0;ve<Z-F;++ve)this[ve+F]=oe[ve%Me]}return this};const je={};function j(z,T,F){je[z]=class extends F{constructor(){super(),Object.defineProperty(this,"message",{value:T.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${z}]`,this.stack,delete this.name}get code(){return z}set code(ie){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ie,writable:!0})}toString(){return`${this.name} [${z}]: ${this.message}`}}}j("ERR_BUFFER_OUT_OF_BOUNDS",function(z){return z?`${z} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(z,T){return`The "${z}" argument must be of type number. Received type ${typeof T}`},TypeError),j("ERR_OUT_OF_RANGE",function(z,T,F){let Z=`The value of "${z}" is out of range.`,ie=F;return Number.isInteger(F)&&Math.abs(F)>2**32?ie=k(String(F)):typeof F=="bigint"&&(ie=String(F),(F>BigInt(2)**BigInt(32)||F<-(BigInt(2)**BigInt(32)))&&(ie=k(ie)),ie+="n"),Z+=` It must be ${T}. Received ${ie}`,Z},RangeError);function k(z){let T="",F=z.length;const Z=z[0]==="-"?1:0;for(;F>=Z+4;F-=3)T=`_${z.slice(F-3,F)}${T}`;return`${z.slice(0,F)}${T}`}function O(z,T,F){te(T,"offset"),(z[T]===void 0||z[T+F]===void 0)&&ce(T,z.length-(F+1))}function G(z,T,F,Z,ie,ve){if(z>F||z<T){const oe=typeof T=="bigint"?"n":"";let Me;throw T===0||T===BigInt(0)?Me=`>= 0${oe} and < 2${oe} ** ${(ve+1)*8}${oe}`:Me=`>= -(2${oe} ** ${(ve+1)*8-1}${oe}) and < 2 ** ${(ve+1)*8-1}${oe}`,new je.ERR_OUT_OF_RANGE("value",Me,z)}O(Z,ie,ve)}function te(z,T){if(typeof z!="number")throw new je.ERR_INVALID_ARG_TYPE(T,"number",z)}function ce(z,T,F){throw Math.floor(z)!==z?(te(z,F),new je.ERR_OUT_OF_RANGE("offset","an integer",z)):T<0?new je.ERR_BUFFER_OUT_OF_BOUNDS:new je.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${T}`,z)}const fe=/[^+/0-9A-Za-z-_]/g;function we(z){if(z=z.split("=")[0],z=z.trim().replace(fe,""),z.length<2)return"";for(;z.length%4!==0;)z=z+"=";return z}function Ne(z,T){T=T||1/0;let F;const Z=z.length;let ie=null;const ve=[];for(let oe=0;oe<Z;++oe){if(F=z.charCodeAt(oe),F>55295&&F<57344){if(!ie){if(F>56319){(T-=3)>-1&&ve.push(239,191,189);continue}else if(oe+1===Z){(T-=3)>-1&&ve.push(239,191,189);continue}ie=F;continue}if(F<56320){(T-=3)>-1&&ve.push(239,191,189),ie=F;continue}F=(ie-55296<<10|F-56320)+65536}else ie&&(T-=3)>-1&&ve.push(239,191,189);if(ie=null,F<128){if((T-=1)<0)break;ve.push(F)}else if(F<2048){if((T-=2)<0)break;ve.push(F>>6|192,F&63|128)}else if(F<65536){if((T-=3)<0)break;ve.push(F>>12|224,F>>6&63|128,F&63|128)}else if(F<1114112){if((T-=4)<0)break;ve.push(F>>18|240,F>>12&63|128,F>>6&63|128,F&63|128)}else throw new Error("Invalid code point")}return ve}function be(z){const T=[];for(let F=0;F<z.length;++F)T.push(z.charCodeAt(F)&255);return T}function Se(z,T){let F,Z,ie;const ve=[];for(let oe=0;oe<z.length&&!((T-=2)<0);++oe)F=z.charCodeAt(oe),Z=F>>8,ie=F%256,ve.push(ie),ve.push(Z);return ve}function Oe(z){return H.toByteArray(we(z))}function qe(z,T,F,Z){let ie;for(ie=0;ie<Z&&!(ie+F>=T.length||ie>=z.length);++ie)T[ie+F]=z[ie];return ie}function ke(z,T){return z instanceof T||z!=null&&z.constructor!=null&&z.constructor.name!=null&&z.constructor.name===T.name}function We(z){return z!==z}const Re=(function(){const z="0123456789abcdef",T=new Array(256);for(let F=0;F<16;++F){const Z=F*16;for(let ie=0;ie<16;++ie)T[Z+ie]=z[F]+z[ie]}return T})();function Te(z){return typeof BigInt>"u"?Ke:z}function Ke(){throw new Error("BigInt not supported")}})(S);const C=S.Buffer;_.Blob=S.Blob,_.BlobOptions=S.BlobOptions,_.Buffer=S.Buffer,_.File=S.File,_.FileOptions=S.FileOptions,_.INSPECT_MAX_BYTES=S.INSPECT_MAX_BYTES,_.SlowBuffer=S.SlowBuffer,_.TranscodeEncoding=S.TranscodeEncoding,_.atob=S.atob,_.btoa=S.btoa,_.constants=S.constants,_.default=C,_.isAscii=S.isAscii,_.isUtf8=S.isUtf8,_.kMaxLength=S.kMaxLength,_.kStringMaxLength=S.kStringMaxLength,_.resolveObjectURL=S.resolveObjectURL,_.transcode=S.transcode})(dist)),dist}var hasRequiredSafeBuffer$2;function requireSafeBuffer$2(){return hasRequiredSafeBuffer$2||(hasRequiredSafeBuffer$2=1,(function(_,S){var I=requireDist(),p=I.Buffer;function R(w,m){for(var v in w)m[v]=w[v]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?_.exports=I:(R(I,S),S.Buffer=f);function f(w,m,v){return p(w,m,v)}f.prototype=Object.create(p.prototype),R(p,f),f.from=function(w,m,v){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,m,v)},f.alloc=function(w,m,v){if(typeof w!="number")throw new TypeError("Argument must be a number");var y=p(w);return m!==void 0?typeof v=="string"?y.fill(m,v):y.fill(m):y.fill(0),y},f.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},f.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(w)}})(safeBuffer$2,safeBuffer$2.exports)),safeBuffer$2.exports}var hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b.exports;hasRequiredBrowser$b=1;var _=65536,S=4294967295;function I(){throw new Error(`Secure random number generation is not supported by this browser.
2
+ Use Chrome, Firefox or Internet Explorer 11`)}var p=requireSafeBuffer$2().Buffer,R=commonjsGlobal.crypto||commonjsGlobal.msCrypto;R&&R.getRandomValues?browser$b.exports=f:browser$b.exports=I;function f(w,m){if(w>S)throw new RangeError("requested too many random bytes");var v=p.allocUnsafe(w);if(w>0)if(w>_)for(var y=0;y<w;y+=_)R.getRandomValues(v.slice(y,y+_));else R.getRandomValues(v);return typeof m=="function"?process$1.nextTick(function(){m(null,v)}):v}return browser$b.exports}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(S,I){I&&(S.super_=I,S.prototype=Object.create(I.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(S,I){if(I){S.super_=I;var p=function(){};p.prototype=I.prototype,S.prototype=new p,S.prototype.constructor=S}}),inherits_browser.exports}var events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var _=typeof Reflect=="object"?Reflect:null,S=_&&typeof _.apply=="function"?_.apply:function(V,Q,ne){return Function.prototype.apply.call(V,Q,ne)},I;_&&typeof _.ownKeys=="function"?I=_.ownKeys:Object.getOwnPropertySymbols?I=function(V){return Object.getOwnPropertyNames(V).concat(Object.getOwnPropertySymbols(V))}:I=function(V){return Object.getOwnPropertyNames(V)};function p(N){console&&console.warn&&console.warn(N)}var R=Number.isNaN||function(V){return V!==V};function f(){f.init.call(this)}events.exports=f,events.exports.once=C,f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var w=10;function m(N){if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N)}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return w},set:function(N){if(typeof N!="number"||N<0||R(N))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+N+".");w=N}}),f.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(V){if(typeof V!="number"||V<0||R(V))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+V+".");return this._maxListeners=V,this};function v(N){return N._maxListeners===void 0?f.defaultMaxListeners:N._maxListeners}f.prototype.getMaxListeners=function(){return v(this)},f.prototype.emit=function(V){for(var Q=[],ne=1;ne<arguments.length;ne++)Q.push(arguments[ne]);var ae=V==="error",ee=this._events;if(ee!==void 0)ae=ae&&ee.error===void 0;else if(!ae)return!1;if(ae){var le;if(Q.length>0&&(le=Q[0]),le instanceof Error)throw le;var c=new Error("Unhandled error."+(le?" ("+le.message+")":""));throw c.context=le,c}var e=ee[V];if(e===void 0)return!1;if(typeof e=="function")S(e,this,Q);else for(var t=e.length,n=B(e,t),ne=0;ne<t;++ne)S(n[ne],this,Q);return!0};function y(N,V,Q,ne){var ae,ee,le;if(m(Q),ee=N._events,ee===void 0?(ee=N._events=Object.create(null),N._eventsCount=0):(ee.newListener!==void 0&&(N.emit("newListener",V,Q.listener?Q.listener:Q),ee=N._events),le=ee[V]),le===void 0)le=ee[V]=Q,++N._eventsCount;else if(typeof le=="function"?le=ee[V]=ne?[Q,le]:[le,Q]:ne?le.unshift(Q):le.push(Q),ae=v(N),ae>0&&le.length>ae&&!le.warned){le.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+le.length+" "+String(V)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=N,c.type=V,c.count=le.length,p(c)}return N}f.prototype.addListener=function(V,Q){return y(this,V,Q,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(V,Q){return y(this,V,Q,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(N,V,Q){var ne={fired:!1,wrapFn:void 0,target:N,type:V,listener:Q},ae=d.bind(ne);return ae.listener=Q,ne.wrapFn=ae,ae}f.prototype.once=function(V,Q){return m(Q),this.on(V,g(this,V,Q)),this},f.prototype.prependOnceListener=function(V,Q){return m(Q),this.prependListener(V,g(this,V,Q)),this},f.prototype.removeListener=function(V,Q){var ne,ae,ee,le,c;if(m(Q),ae=this._events,ae===void 0)return this;if(ne=ae[V],ne===void 0)return this;if(ne===Q||ne.listener===Q)--this._eventsCount===0?this._events=Object.create(null):(delete ae[V],ae.removeListener&&this.emit("removeListener",V,ne.listener||Q));else if(typeof ne!="function"){for(ee=-1,le=ne.length-1;le>=0;le--)if(ne[le]===Q||ne[le].listener===Q){c=ne[le].listener,ee=le;break}if(ee<0)return this;ee===0?ne.shift():A(ne,ee),ne.length===1&&(ae[V]=ne[0]),ae.removeListener!==void 0&&this.emit("removeListener",V,c||Q)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(V){var Q,ne,ae;if(ne=this._events,ne===void 0)return this;if(ne.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ne[V]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ne[V]),this;if(arguments.length===0){var ee=Object.keys(ne),le;for(ae=0;ae<ee.length;++ae)le=ee[ae],le!=="removeListener"&&this.removeAllListeners(le);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Q=ne[V],typeof Q=="function")this.removeListener(V,Q);else if(Q!==void 0)for(ae=Q.length-1;ae>=0;ae--)this.removeListener(V,Q[ae]);return this};function M(N,V,Q){var ne=N._events;if(ne===void 0)return[];var ae=ne[V];return ae===void 0?[]:typeof ae=="function"?Q?[ae.listener||ae]:[ae]:Q?D(ae):B(ae,ae.length)}f.prototype.listeners=function(V){return M(this,V,!0)},f.prototype.rawListeners=function(V){return M(this,V,!1)},f.listenerCount=function(N,V){return typeof N.listenerCount=="function"?N.listenerCount(V):x.call(N,V)},f.prototype.listenerCount=x;function x(N){var V=this._events;if(V!==void 0){var Q=V[N];if(typeof Q=="function")return 1;if(Q!==void 0)return Q.length}return 0}f.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};function B(N,V){for(var Q=new Array(V),ne=0;ne<V;++ne)Q[ne]=N[ne];return Q}function A(N,V){for(;V+1<N.length;V++)N[V]=N[V+1];N.pop()}function D(N){for(var V=new Array(N.length),Q=0;Q<V.length;++Q)V[Q]=N[Q].listener||N[Q];return V}function C(N,V){return new Promise(function(Q,ne){function ae(le){N.removeListener(V,ee),ne(le)}function ee(){typeof N.removeListener=="function"&&N.removeListener("error",ae),Q([].slice.call(arguments))}H(N,V,ee,{once:!0}),V!=="error"&&P(N,ae,{once:!0})})}function P(N,V,Q){typeof N.on=="function"&&H(N,"error",V,Q)}function H(N,V,Q,ne){if(typeof N.on=="function")ne.once?N.once(V,Q):N.on(V,Q);else if(typeof N.addEventListener=="function")N.addEventListener(V,function ae(ee){ne.once&&N.removeEventListener(V,ae),Q(ee)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof N)}return events.exports}var streamBrowser$2,hasRequiredStreamBrowser$2;function requireStreamBrowser$2(){return hasRequiredStreamBrowser$2||(hasRequiredStreamBrowser$2=1,streamBrowser$2=requireEvents().EventEmitter),streamBrowser$2}var util$1={},types={},shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var S={},I=Symbol("test"),p=Object(I);if(typeof I=="string"||Object.prototype.toString.call(I)!=="[object Symbol]"||Object.prototype.toString.call(p)!=="[object Symbol]")return!1;var R=42;S[I]=R;for(var f in S)return!1;if(typeof Object.keys=="function"&&Object.keys(S).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(S).length!==0)return!1;var w=Object.getOwnPropertySymbols(S);if(w.length!==1||w[0]!==I||!Object.prototype.propertyIsEnumerable.call(S,I))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var m=Object.getOwnPropertyDescriptor(S,I);if(m.value!==R||m.enumerable!==!0)return!1}return!0}),shams$1}var shams,hasRequiredShams;function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var _=requireShams$1();return shams=function(){return _()&&!!Symbol.toStringTag},shams}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max,hasRequiredMax;function requireMax(){return hasRequiredMax||(hasRequiredMax=1,max=Math.max),max}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow=Math.pow),pow}var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(S){return S!==S}),_isNaN}var sign$1,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1;var _=require_isNaN();return sign$1=function(I){return _(I)||I===0?I:I<0?-1:1},sign$1}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var _=requireGOPD();if(_)try{_([],"length")}catch{_=null}return gopd=_,gopd}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var _=Object.defineProperty||!1;if(_)try{_({},"a",{value:1})}catch{_=!1}return esDefineProperty=_,esDefineProperty}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var _=typeof Symbol<"u"&&Symbol,S=requireShams$1();return hasSymbols=function(){return typeof _!="function"||typeof Symbol!="function"||typeof _("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:S()},hasSymbols}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var _=requireEsObjectAtoms();return Object_getPrototypeOf=_.getPrototypeOf||null,Object_getPrototypeOf}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var _="Function.prototype.bind called on incompatible ",S=Object.prototype.toString,I=Math.max,p="[object Function]",R=function(v,y){for(var d=[],g=0;g<v.length;g+=1)d[g]=v[g];for(var M=0;M<y.length;M+=1)d[M+v.length]=y[M];return d},f=function(v,y){for(var d=[],g=y,M=0;g<v.length;g+=1,M+=1)d[M]=v[g];return d},w=function(m,v){for(var y="",d=0;d<m.length;d+=1)y+=m[d],d+1<m.length&&(y+=v);return y};return implementation=function(v){var y=this;if(typeof y!="function"||S.apply(y)!==p)throw new TypeError(_+y);for(var d=f(arguments,1),g,M=function(){if(this instanceof g){var C=y.apply(this,R(d,arguments));return Object(C)===C?C:this}return y.apply(v,R(d,arguments))},x=I(0,y.length-d.length),B=[],A=0;A<x;A++)B[A]="$"+A;if(g=Function("binder","return function ("+w(B,",")+"){ return binder.apply(this,arguments); }")(M),y.prototype){var D=function(){};D.prototype=y.prototype,g.prototype=new D,D.prototype=null}return g},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var _=requireImplementation();return functionBind=Function.prototype.bind||_,functionBind}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){return hasRequiredFunctionCall||(hasRequiredFunctionCall=1,functionCall=Function.prototype.call),functionCall}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply||(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply),functionApply}var reflectApply,hasRequiredReflectApply;function requireReflectApply(){return hasRequiredReflectApply||(hasRequiredReflectApply=1,reflectApply=typeof Reflect<"u"&&Reflect&&Reflect.apply),reflectApply}var actualApply,hasRequiredActualApply;function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var _=requireFunctionBind(),S=requireFunctionApply(),I=requireFunctionCall(),p=requireReflectApply();return actualApply=p||_.call(I,S),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var _=requireFunctionBind(),S=requireType(),I=requireFunctionCall(),p=requireActualApply();return callBindApplyHelpers=function(f){if(f.length<1||typeof f[0]!="function")throw new S("a function is required");return p(_,I,f)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var _=requireCallBindApplyHelpers(),S=requireGopd(),I;try{I=[].__proto__===Array.prototype}catch(w){if(!w||typeof w!="object"||!("code"in w)||w.code!=="ERR_PROTO_ACCESS")throw w}var p=!!I&&S&&S(Object.prototype,"__proto__"),R=Object,f=R.getPrototypeOf;return get=p&&typeof p.get=="function"?_([p.get]):typeof f=="function"?function(m){return f(m==null?m:R(m))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var _=requireReflect_getPrototypeOf(),S=requireObject_getPrototypeOf(),I=requireGet();return getProto=_?function(R){return _(R)}:S?function(R){if(!R||typeof R!="object"&&typeof R!="function")throw new TypeError("getProto: not an object");return S(R)}:I?function(R){return I(R)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var _=Function.prototype.call,S=Object.prototype.hasOwnProperty,I=requireFunctionBind();return hasown=I.call(_,S),hasown}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var _,S=requireEsObjectAtoms(),I=requireEsErrors(),p=require_eval(),R=requireRange(),f=requireRef(),w=requireSyntax(),m=requireType(),v=requireUri(),y=requireAbs(),d=requireFloor(),g=requireMax(),M=requireMin(),x=requirePow(),B=requireRound(),A=requireSign$1(),D=Function,C=function(W){try{return D('"use strict"; return ('+W+").constructor;")()}catch{}},P=requireGopd(),H=requireEsDefineProperty(),N=function(){throw new m},V=P?(function(){try{return arguments.callee,N}catch{try{return P(arguments,"callee").get}catch{return N}}})():N,Q=requireHasSymbols()(),ne=requireGetProto(),ae=requireObject_getPrototypeOf(),ee=requireReflect_getPrototypeOf(),le=requireFunctionApply(),c=requireFunctionCall(),e={},t=typeof Uint8Array>"u"||!ne?_:ne(Uint8Array),n={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?_:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?_:ArrayBuffer,"%ArrayIteratorPrototype%":Q&&ne?ne([][Symbol.iterator]()):_,"%AsyncFromSyncIteratorPrototype%":_,"%AsyncFunction%":e,"%AsyncGenerator%":e,"%AsyncGeneratorFunction%":e,"%AsyncIteratorPrototype%":e,"%Atomics%":typeof Atomics>"u"?_:Atomics,"%BigInt%":typeof BigInt>"u"?_:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?_:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?_:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?_:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":I,"%eval%":eval,"%EvalError%":p,"%Float16Array%":typeof Float16Array>"u"?_:Float16Array,"%Float32Array%":typeof Float32Array>"u"?_:Float32Array,"%Float64Array%":typeof Float64Array>"u"?_:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?_:FinalizationRegistry,"%Function%":D,"%GeneratorFunction%":e,"%Int8Array%":typeof Int8Array>"u"?_:Int8Array,"%Int16Array%":typeof Int16Array>"u"?_:Int16Array,"%Int32Array%":typeof Int32Array>"u"?_:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Q&&ne?ne(ne([][Symbol.iterator]())):_,"%JSON%":typeof JSON=="object"?JSON:_,"%Map%":typeof Map>"u"?_:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Q||!ne?_:ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":S,"%Object.getOwnPropertyDescriptor%":P,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?_:Promise,"%Proxy%":typeof Proxy>"u"?_:Proxy,"%RangeError%":R,"%ReferenceError%":f,"%Reflect%":typeof Reflect>"u"?_:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?_:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Q||!ne?_:ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?_:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Q&&ne?ne(""[Symbol.iterator]()):_,"%Symbol%":Q?Symbol:_,"%SyntaxError%":w,"%ThrowTypeError%":V,"%TypedArray%":t,"%TypeError%":m,"%Uint8Array%":typeof Uint8Array>"u"?_:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?_:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?_:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?_:Uint32Array,"%URIError%":v,"%WeakMap%":typeof WeakMap>"u"?_:WeakMap,"%WeakRef%":typeof WeakRef>"u"?_:WeakRef,"%WeakSet%":typeof WeakSet>"u"?_:WeakSet,"%Function.prototype.call%":c,"%Function.prototype.apply%":le,"%Object.defineProperty%":H,"%Object.getPrototypeOf%":ae,"%Math.abs%":y,"%Math.floor%":d,"%Math.max%":g,"%Math.min%":M,"%Math.pow%":x,"%Math.round%":B,"%Math.sign%":A,"%Reflect.getPrototypeOf%":ee};if(ne)try{null.error}catch(W){var a=ne(ne(W));n["%Error.prototype%"]=a}var s=function W(J){var X;if(J==="%AsyncFunction%")X=C("async function () {}");else if(J==="%GeneratorFunction%")X=C("function* () {}");else if(J==="%AsyncGeneratorFunction%")X=C("async function* () {}");else if(J==="%AsyncGenerator%"){var U=W("%AsyncGeneratorFunction%");U&&(X=U.prototype)}else if(J==="%AsyncIteratorPrototype%"){var re=W("%AsyncGenerator%");re&&ne&&(X=ne(re.prototype))}return n[J]=X,X},u={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},l=requireFunctionBind(),o=requireHasown(),r=l.call(c,Array.prototype.concat),h=l.call(le,Array.prototype.splice),b=l.call(c,String.prototype.replace),E=l.call(c,String.prototype.slice),L=l.call(c,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,q=function(J){var X=E(J,0,1),U=E(J,-1);if(X==="%"&&U!=="%")throw new w("invalid intrinsic syntax, expected closing `%`");if(U==="%"&&X!=="%")throw new w("invalid intrinsic syntax, expected opening `%`");var re=[];return b(J,Y,function(Ie,ue,he,Pe){re[re.length]=he?b(Pe,K,"$1"):ue||Ie}),re},$=function(J,X){var U=J,re;if(o(u,U)&&(re=u[U],U="%"+re[0]+"%"),o(n,U)){var Ie=n[U];if(Ie===e&&(Ie=s(U)),typeof Ie>"u"&&!X)throw new m("intrinsic "+J+" exists, but is not available. Please file an issue!");return{alias:re,name:U,value:Ie}}throw new w("intrinsic "+J+" does not exist!")};return getIntrinsic=function(J,X){if(typeof J!="string"||J.length===0)throw new m("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof X!="boolean")throw new m('"allowMissing" argument must be a boolean');if(L(/^%?[^%]*%?$/,J)===null)throw new w("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var U=q(J),re=U.length>0?U[0]:"",Ie=$("%"+re+"%",X),ue=Ie.name,he=Ie.value,Pe=!1,me=Ie.alias;me&&(re=me[0],h(U,r([0,1],me)));for(var se=1,De=!0;se<U.length;se+=1){var de=U[se],ye=E(de,0,1),Ce=E(de,-1);if((ye==='"'||ye==="'"||ye==="`"||Ce==='"'||Ce==="'"||Ce==="`")&&ye!==Ce)throw new w("property names with quotes must have matching quotes");if((de==="constructor"||!De)&&(Pe=!0),re+="."+de,ue="%"+re+"%",o(n,ue))he=n[ue];else if(he!=null){if(!(de in he)){if(!X)throw new m("base intrinsic for "+J+" exists, but the property is not available.");return}if(P&&se+1>=U.length){var pe=P(he,de);De=!!pe,De&&"get"in pe&&!("originalValue"in pe.get)?he=pe.get:he=he[de]}else De=o(he,de),he=he[de];De&&!Pe&&(n[ue]=he)}}return he},getIntrinsic}var callBound,hasRequiredCallBound;function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var _=requireGetIntrinsic(),S=requireCallBindApplyHelpers(),I=S([_("%String.prototype.indexOf%")]);return callBound=function(R,f){var w=_(R,!!f);return typeof w=="function"&&I(R,".prototype.")>-1?S([w]):w},callBound}var isArguments,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var _=requireShams()(),S=requireCallBound(),I=S("Object.prototype.toString"),p=function(m){return _&&m&&typeof m=="object"&&Symbol.toStringTag in m?!1:I(m)==="[object Arguments]"},R=function(m){return p(m)?!0:m!==null&&typeof m=="object"&&"length"in m&&typeof m.length=="number"&&m.length>=0&&I(m)!=="[object Array]"&&"callee"in m&&I(m.callee)==="[object Function]"},f=(function(){return p(arguments)})();return p.isLegacyArguments=R,isArguments=f?p:R,isArguments}var isRegex,hasRequiredIsRegex;function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var _=requireCallBound(),S=requireShams()(),I=requireHasown(),p=requireGopd(),R;if(S){var f=_("RegExp.prototype.exec"),w={},m=function(){throw w},v={toString:m,valueOf:m};typeof Symbol.toPrimitive=="symbol"&&(v[Symbol.toPrimitive]=m),R=function(M){if(!M||typeof M!="object")return!1;var x=p(M,"lastIndex"),B=x&&I(x,"value");if(!B)return!1;try{f(M,v)}catch(A){return A===w}}}else{var y=_("Object.prototype.toString"),d="[object RegExp]";R=function(M){return!M||typeof M!="object"&&typeof M!="function"?!1:y(M)===d}}return isRegex=R,isRegex}var safeRegexTest,hasRequiredSafeRegexTest;function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var _=requireCallBound(),S=requireIsRegex(),I=_("RegExp.prototype.exec"),p=requireType();return safeRegexTest=function(f){if(!S(f))throw new p("`regex` must be a RegExp");return function(m){return I(f,m)!==null}},safeRegexTest}var generatorFunction,hasRequiredGeneratorFunction;function requireGeneratorFunction(){if(hasRequiredGeneratorFunction)return generatorFunction;hasRequiredGeneratorFunction=1;const _=(function*(){}).constructor;return generatorFunction=()=>_,generatorFunction}var isGeneratorFunction,hasRequiredIsGeneratorFunction;function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var _=requireCallBound(),S=requireSafeRegexTest(),I=S(/^\s*(?:function)?\*/),p=requireShams()(),R=requireGetProto(),f=_("Object.prototype.toString"),w=_("Function.prototype.toString"),m=requireGeneratorFunction();return isGeneratorFunction=function(y){if(typeof y!="function")return!1;if(I(w(y)))return!0;if(!p){var d=f(y);return d==="[object GeneratorFunction]"}if(!R)return!1;var g=m();return g&&R(y)===g.prototype},isGeneratorFunction}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var _=Function.prototype.toString,S=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,I,p;if(typeof S=="function"&&typeof Object.defineProperty=="function")try{I=Object.defineProperty({},"length",{get:function(){throw p}}),p={},S(function(){throw 42},null,I)}catch(P){P!==p&&(S=null)}else S=null;var R=/^\s*class\b/,f=function(H){try{var N=_.call(H);return R.test(N)}catch{return!1}},w=function(H){try{return f(H)?!1:(_.call(H),!0)}catch{return!1}},m=Object.prototype.toString,v="[object Object]",y="[object Function]",d="[object GeneratorFunction]",g="[object HTMLAllCollection]",M="[object HTML document.all class]",x="[object HTMLCollection]",B=typeof Symbol=="function"&&!!Symbol.toStringTag,A=!(0 in[,]),D=function(){return!1};if(typeof document=="object"){var C=document.all;m.call(C)===m.call(document.all)&&(D=function(H){if((A||!H)&&(typeof H>"u"||typeof H=="object"))try{var N=m.call(H);return(N===g||N===M||N===x||N===v)&&H("")==null}catch{}return!1})}return isCallable=S?function(H){if(D(H))return!0;if(!H||typeof H!="function"&&typeof H!="object")return!1;try{S(H,null,I)}catch(N){if(N!==p)return!1}return!f(H)&&w(H)}:function(H){if(D(H))return!0;if(!H||typeof H!="function"&&typeof H!="object")return!1;if(B)return w(H);if(f(H))return!1;var N=m.call(H);return N!==y&&N!==d&&!/^\[object HTML/.test(N)?!1:w(H)},isCallable}var forEach,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var _=requireIsCallable(),S=Object.prototype.toString,I=Object.prototype.hasOwnProperty,p=function(v,y,d){for(var g=0,M=v.length;g<M;g++)I.call(v,g)&&(d==null?y(v[g],g,v):y.call(d,v[g],g,v))},R=function(v,y,d){for(var g=0,M=v.length;g<M;g++)d==null?y(v.charAt(g),g,v):y.call(d,v.charAt(g),g,v)},f=function(v,y,d){for(var g in v)I.call(v,g)&&(d==null?y(v[g],g,v):y.call(d,v[g],g,v))};function w(m){return S.call(m)==="[object Array]"}return forEach=function(v,y,d){if(!_(y))throw new TypeError("iterator must be a function");var g;arguments.length>=3&&(g=d),w(v)?p(v,y,g):typeof v=="string"?R(v,y,g):f(v,y,g)},forEach}var possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames;function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames||(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),possibleTypedArrayNames}var availableTypedArrays,hasRequiredAvailableTypedArrays;function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var _=requirePossibleTypedArrayNames(),S=typeof globalThis>"u"?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var p=[],R=0;R<_.length;R++)typeof S[_[R]]=="function"&&(p[p.length]=_[R]);return p},availableTypedArrays}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var _=requireEsDefineProperty(),S=requireSyntax(),I=requireType(),p=requireGopd();return defineDataProperty=function(f,w,m){if(!f||typeof f!="object"&&typeof f!="function")throw new I("`obj` must be an object or a function`");if(typeof w!="string"&&typeof w!="symbol")throw new I("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new I("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new I("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new I("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new I("`loose`, if provided, must be a boolean");var v=arguments.length>3?arguments[3]:null,y=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,M=!!p&&p(f,w);if(_)_(f,w,{configurable:d===null&&M?M.configurable:!d,enumerable:v===null&&M?M.enumerable:!v,value:m,writable:y===null&&M?M.writable:!y});else if(g||!v&&!y&&!d)f[w]=m;else throw new S("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var _=requireEsDefineProperty(),S=function(){return!!_};return S.hasArrayLengthDefineBug=function(){if(!_)return null;try{return _([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=S,hasPropertyDescriptors_1}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var _=requireGetIntrinsic(),S=requireDefineDataProperty(),I=requireHasPropertyDescriptors()(),p=requireGopd(),R=requireType(),f=_("%Math.floor%");return setFunctionLength=function(m,v){if(typeof m!="function")throw new R("`fn` is not a function");if(typeof v!="number"||v<0||v>4294967295||f(v)!==v)throw new R("`length` must be a positive 32-bit integer");var y=arguments.length>2&&!!arguments[2],d=!0,g=!0;if("length"in m&&p){var M=p(m,"length");M&&!M.configurable&&(d=!1),M&&!M.writable&&(g=!1)}return(d||g||!y)&&(I?S(m,"length",v,!0,!0):S(m,"length",v)),m},setFunctionLength}var applyBind,hasRequiredApplyBind;function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var _=requireFunctionBind(),S=requireFunctionApply(),I=requireActualApply();return applyBind=function(){return I(_,S,arguments)},applyBind}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,(function(_){var S=requireSetFunctionLength(),I=requireEsDefineProperty(),p=requireCallBindApplyHelpers(),R=requireApplyBind();_.exports=function(w){var m=p(arguments),v=w.length-(arguments.length-1);return S(m,1+(v>0?v:0),!0)},I?I(_.exports,"apply",{value:R}):_.exports.apply=R})(callBind)),callBind.exports}var whichTypedArray,hasRequiredWhichTypedArray;function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var _=requireForEach(),S=requireAvailableTypedArrays(),I=requireCallBind(),p=requireCallBound(),R=requireGopd(),f=requireGetProto(),w=p("Object.prototype.toString"),m=requireShams()(),v=typeof globalThis>"u"?commonjsGlobal:globalThis,y=S(),d=p("String.prototype.slice"),g=p("Array.prototype.indexOf",!0)||function(D,C){for(var P=0;P<D.length;P+=1)if(D[P]===C)return P;return-1},M={__proto__:null};m&&R&&f?_(y,function(A){var D=new v[A];if(Symbol.toStringTag in D&&f){var C=f(D),P=R(C,Symbol.toStringTag);if(!P&&C){var H=f(C);P=R(H,Symbol.toStringTag)}if(P&&P.get){var N=I(P.get);M["$"+A]=N}}}):_(y,function(A){var D=new v[A],C=D.slice||D.set;if(C){var P=I(C);M["$"+A]=P}});var x=function(D){var C=!1;return _(M,function(P,H){if(!C)try{"$"+P(D)===H&&(C=d(H,1))}catch{}}),C},B=function(D){var C=!1;return _(M,function(P,H){if(!C)try{P(D),C=d(H,1)}catch{}}),C};return whichTypedArray=function(D){if(!D||typeof D!="object")return!1;if(!m){var C=d(w(D),8,-1);return g(y,C)>-1?C:C!=="Object"?!1:B(D)}return R?x(D):null},whichTypedArray}var isTypedArray,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var _=requireWhichTypedArray();return isTypedArray=function(I){return!!_(I)},isTypedArray}var hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,(function(_){var S=requireIsArguments(),I=requireIsGeneratorFunction(),p=requireWhichTypedArray(),R=requireIsTypedArray();function f(se){return se.call.bind(se)}var w=typeof BigInt<"u",m=typeof Symbol<"u",v=f(Object.prototype.toString),y=f(Number.prototype.valueOf),d=f(String.prototype.valueOf),g=f(Boolean.prototype.valueOf);if(w)var M=f(BigInt.prototype.valueOf);if(m)var x=f(Symbol.prototype.valueOf);function B(se,De){if(typeof se!="object")return!1;try{return De(se),!0}catch{return!1}}_.isArgumentsObject=S,_.isGeneratorFunction=I,_.isTypedArray=R;function A(se){return typeof Promise<"u"&&se instanceof Promise||se!==null&&typeof se=="object"&&typeof se.then=="function"&&typeof se.catch=="function"}_.isPromise=A;function D(se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(se):R(se)||E(se)}_.isArrayBufferView=D;function C(se){return p(se)==="Uint8Array"}_.isUint8Array=C;function P(se){return p(se)==="Uint8ClampedArray"}_.isUint8ClampedArray=P;function H(se){return p(se)==="Uint16Array"}_.isUint16Array=H;function N(se){return p(se)==="Uint32Array"}_.isUint32Array=N;function V(se){return p(se)==="Int8Array"}_.isInt8Array=V;function Q(se){return p(se)==="Int16Array"}_.isInt16Array=Q;function ne(se){return p(se)==="Int32Array"}_.isInt32Array=ne;function ae(se){return p(se)==="Float32Array"}_.isFloat32Array=ae;function ee(se){return p(se)==="Float64Array"}_.isFloat64Array=ee;function le(se){return p(se)==="BigInt64Array"}_.isBigInt64Array=le;function c(se){return p(se)==="BigUint64Array"}_.isBigUint64Array=c;function e(se){return v(se)==="[object Map]"}e.working=typeof Map<"u"&&e(new Map);function t(se){return typeof Map>"u"?!1:e.working?e(se):se instanceof Map}_.isMap=t;function n(se){return v(se)==="[object Set]"}n.working=typeof Set<"u"&&n(new Set);function a(se){return typeof Set>"u"?!1:n.working?n(se):se instanceof Set}_.isSet=a;function s(se){return v(se)==="[object WeakMap]"}s.working=typeof WeakMap<"u"&&s(new WeakMap);function u(se){return typeof WeakMap>"u"?!1:s.working?s(se):se instanceof WeakMap}_.isWeakMap=u;function l(se){return v(se)==="[object WeakSet]"}l.working=typeof WeakSet<"u"&&l(new WeakSet);function o(se){return l(se)}_.isWeakSet=o;function r(se){return v(se)==="[object ArrayBuffer]"}r.working=typeof ArrayBuffer<"u"&&r(new ArrayBuffer);function h(se){return typeof ArrayBuffer>"u"?!1:r.working?r(se):se instanceof ArrayBuffer}_.isArrayBuffer=h;function b(se){return v(se)==="[object DataView]"}b.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&b(new DataView(new ArrayBuffer(1),0,1));function E(se){return typeof DataView>"u"?!1:b.working?b(se):se instanceof DataView}_.isDataView=E;var L=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Y(se){return v(se)==="[object SharedArrayBuffer]"}function K(se){return typeof L>"u"?!1:(typeof Y.working>"u"&&(Y.working=Y(new L)),Y.working?Y(se):se instanceof L)}_.isSharedArrayBuffer=K;function q(se){return v(se)==="[object AsyncFunction]"}_.isAsyncFunction=q;function $(se){return v(se)==="[object Map Iterator]"}_.isMapIterator=$;function W(se){return v(se)==="[object Set Iterator]"}_.isSetIterator=W;function J(se){return v(se)==="[object Generator]"}_.isGeneratorObject=J;function X(se){return v(se)==="[object WebAssembly.Module]"}_.isWebAssemblyCompiledModule=X;function U(se){return B(se,y)}_.isNumberObject=U;function re(se){return B(se,d)}_.isStringObject=re;function Ie(se){return B(se,g)}_.isBooleanObject=Ie;function ue(se){return w&&B(se,M)}_.isBigIntObject=ue;function he(se){return m&&B(se,x)}_.isSymbolObject=he;function Pe(se){return U(se)||re(se)||Ie(se)||ue(se)||he(se)}_.isBoxedPrimitive=Pe;function me(se){return typeof Uint8Array<"u"&&(h(se)||K(se))}_.isAnyArrayBuffer=me,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(se){Object.defineProperty(_,se,{enumerable:!1,value:function(){throw new Error(se+" is not supported in userland")}})})})(types)),types}var isBufferBrowser,hasRequiredIsBufferBrowser;function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser||(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(S){return S&&typeof S=="object"&&typeof S.copy=="function"&&typeof S.fill=="function"&&typeof S.readUInt8=="function"}),isBufferBrowser}var hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,(function(_){var S=Object.getOwnPropertyDescriptors||function(E){for(var L=Object.keys(E),Y={},K=0;K<L.length;K++)Y[L[K]]=Object.getOwnPropertyDescriptor(E,L[K]);return Y},I=/%[sdj%]/g;_.format=function(b){if(!V(b)){for(var E=[],L=0;L<arguments.length;L++)E.push(w(arguments[L]));return E.join(" ")}for(var L=1,Y=arguments,K=Y.length,q=String(b).replace(I,function(W){if(W==="%%")return"%";if(L>=K)return W;switch(W){case"%s":return String(Y[L++]);case"%d":return Number(Y[L++]);case"%j":try{return JSON.stringify(Y[L++])}catch{return"[Circular]"}default:return W}}),$=Y[L];L<K;$=Y[++L])P($)||!ee($)?q+=" "+$:q+=" "+w($);return q},_.deprecate=function(b,E){if(typeof process$1<"u"&&process$1.noDeprecation===!0)return b;if(typeof process$1>"u")return function(){return _.deprecate(b,E).apply(this,arguments)};var L=!1;function Y(){if(!L){if(process$1.throwDeprecation)throw new Error(E);process$1.traceDeprecation?console.trace(E):console.error(E),L=!0}return b.apply(this,arguments)}return Y};var p={},R=/^$/;if(process$1.env.NODE_DEBUG){var f=process$1.env.NODE_DEBUG;f=f.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),R=new RegExp("^"+f+"$","i")}_.debuglog=function(b){if(b=b.toUpperCase(),!p[b])if(R.test(b)){var E=process$1.pid;p[b]=function(){var L=_.format.apply(_,arguments);console.error("%s %d: %s",b,E,L)}}else p[b]=function(){};return p[b]};function w(b,E){var L={seen:[],stylize:v};return arguments.length>=3&&(L.depth=arguments[2]),arguments.length>=4&&(L.colors=arguments[3]),C(E)?L.showHidden=E:E&&_._extend(L,E),ne(L.showHidden)&&(L.showHidden=!1),ne(L.depth)&&(L.depth=2),ne(L.colors)&&(L.colors=!1),ne(L.customInspect)&&(L.customInspect=!0),L.colors&&(L.stylize=m),d(L,b,L.depth)}_.inspect=w,w.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},w.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function m(b,E){var L=w.styles[E];return L?"\x1B["+w.colors[L][0]+"m"+b+"\x1B["+w.colors[L][1]+"m":b}function v(b,E){return b}function y(b){var E={};return b.forEach(function(L,Y){E[L]=!0}),E}function d(b,E,L){if(b.customInspect&&E&&e(E.inspect)&&E.inspect!==_.inspect&&!(E.constructor&&E.constructor.prototype===E)){var Y=E.inspect(L,b);return V(Y)||(Y=d(b,Y,L)),Y}var K=g(b,E);if(K)return K;var q=Object.keys(E),$=y(q);if(b.showHidden&&(q=Object.getOwnPropertyNames(E)),c(E)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return M(E);if(q.length===0){if(e(E)){var W=E.name?": "+E.name:"";return b.stylize("[Function"+W+"]","special")}if(ae(E))return b.stylize(RegExp.prototype.toString.call(E),"regexp");if(le(E))return b.stylize(Date.prototype.toString.call(E),"date");if(c(E))return M(E)}var J="",X=!1,U=["{","}"];if(D(E)&&(X=!0,U=["[","]"]),e(E)){var re=E.name?": "+E.name:"";J=" [Function"+re+"]"}if(ae(E)&&(J=" "+RegExp.prototype.toString.call(E)),le(E)&&(J=" "+Date.prototype.toUTCString.call(E)),c(E)&&(J=" "+M(E)),q.length===0&&(!X||E.length==0))return U[0]+J+U[1];if(L<0)return ae(E)?b.stylize(RegExp.prototype.toString.call(E),"regexp"):b.stylize("[Object]","special");b.seen.push(E);var Ie;return X?Ie=x(b,E,L,$,q):Ie=q.map(function(ue){return B(b,E,L,$,ue,X)}),b.seen.pop(),A(Ie,J,U)}function g(b,E){if(ne(E))return b.stylize("undefined","undefined");if(V(E)){var L="'"+JSON.stringify(E).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return b.stylize(L,"string")}if(N(E))return b.stylize(""+E,"number");if(C(E))return b.stylize(""+E,"boolean");if(P(E))return b.stylize("null","null")}function M(b){return"["+Error.prototype.toString.call(b)+"]"}function x(b,E,L,Y,K){for(var q=[],$=0,W=E.length;$<W;++$)l(E,String($))?q.push(B(b,E,L,Y,String($),!0)):q.push("");return K.forEach(function(J){J.match(/^\d+$/)||q.push(B(b,E,L,Y,J,!0))}),q}function B(b,E,L,Y,K,q){var $,W,J;if(J=Object.getOwnPropertyDescriptor(E,K)||{value:E[K]},J.get?J.set?W=b.stylize("[Getter/Setter]","special"):W=b.stylize("[Getter]","special"):J.set&&(W=b.stylize("[Setter]","special")),l(Y,K)||($="["+K+"]"),W||(b.seen.indexOf(J.value)<0?(P(L)?W=d(b,J.value,null):W=d(b,J.value,L-1),W.indexOf(`
3
3
  `)>-1&&(q?W=W.split(`
4
4
  `).map(function(X){return" "+X}).join(`
5
5
  `).slice(2):W=`
6
6
  `+W.split(`
7
7
  `).map(function(X){return" "+X}).join(`
8
- `))):W=b.stylize("[Circular]","special")),ne(P)){if(q&&K.match(/^\d+$/))return W;P=JSON.stringify(""+K),P.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(P=P.slice(1,-1),P=b.stylize(P,"name")):(P=P.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),P=b.stylize(P,"string"))}return P+": "+W}function A(b,E,L){var Y=b.reduce(function(K,q){return q.indexOf(`
8
+ `))):W=b.stylize("[Circular]","special")),ne($)){if(q&&K.match(/^\d+$/))return W;$=JSON.stringify(""+K),$.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?($=$.slice(1,-1),$=b.stylize($,"name")):($=$.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),$=b.stylize($,"string"))}return $+": "+W}function A(b,E,L){var Y=b.reduce(function(K,q){return q.indexOf(`
9
9
  `)>=0,K+q.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Y>60?L[0]+(E===""?"":E+`
10
10
  `)+" "+b.join(`,
11
- `)+" "+L[1]:L[0]+E+" "+b.join(", ")+" "+L[1]}_.types=requireTypes();function D(b){return Array.isArray(b)}_.isArray=D;function C(b){return typeof b=="boolean"}_.isBoolean=C;function $(b){return b===null}_.isNull=$;function H(b){return b==null}_.isNullOrUndefined=H;function N(b){return typeof b=="number"}_.isNumber=N;function V(b){return typeof b=="string"}_.isString=V;function Q(b){return typeof b=="symbol"}_.isSymbol=Q;function ne(b){return b===void 0}_.isUndefined=ne;function ae(b){return ee(b)&&n(b)==="[object RegExp]"}_.isRegExp=ae,_.types.isRegExp=ae;function ee(b){return typeof b=="object"&&b!==null}_.isObject=ee;function le(b){return ee(b)&&n(b)==="[object Date]"}_.isDate=le,_.types.isDate=le;function c(b){return ee(b)&&(n(b)==="[object Error]"||b instanceof Error)}_.isError=c,_.types.isNativeError=c;function e(b){return typeof b=="function"}_.isFunction=e;function t(b){return b===null||typeof b=="boolean"||typeof b=="number"||typeof b=="string"||typeof b=="symbol"||typeof b>"u"}_.isPrimitive=t,_.isBuffer=requireIsBufferBrowser();function n(b){return Object.prototype.toString.call(b)}function a(b){return b<10?"0"+b.toString(10):b.toString(10)}var s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u(){var b=new Date,E=[a(b.getHours()),a(b.getMinutes()),a(b.getSeconds())].join(":");return[b.getDate(),s[b.getMonth()],E].join(" ")}_.log=function(){console.log("%s - %s",u(),_.format.apply(_,arguments))},_.inherits=requireInherits_browser(),_._extend=function(b,E){if(!E||!ee(E))return b;for(var L=Object.keys(E),Y=L.length;Y--;)b[L[Y]]=E[L[Y]];return b};function l(b,E){return Object.prototype.hasOwnProperty.call(b,E)}var o=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;_.promisify=function(E){if(typeof E!="function")throw new TypeError('The "original" argument must be of type Function');if(o&&E[o]){var L=E[o];if(typeof L!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(L,o,{value:L,enumerable:!1,writable:!1,configurable:!0}),L}function L(){for(var Y,K,q=new Promise(function(J,X){Y=J,K=X}),P=[],W=0;W<arguments.length;W++)P.push(arguments[W]);P.push(function(J,X){J?K(J):Y(X)});try{E.apply(this,P)}catch(J){K(J)}return q}return Object.setPrototypeOf(L,Object.getPrototypeOf(E)),o&&Object.defineProperty(L,o,{value:L,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(L,S(E))},_.promisify.custom=o;function r(b,E){if(!b){var L=new Error("Promise was rejected with a falsy value");L.reason=b,b=L}return E(b)}function h(b){if(typeof b!="function")throw new TypeError('The "original" argument must be of type Function');function E(){for(var L=[],Y=0;Y<arguments.length;Y++)L.push(arguments[Y]);var K=L.pop();if(typeof K!="function")throw new TypeError("The last argument must be of type Function");var q=this,P=function(){return K.apply(q,arguments)};b.apply(this,L).then(function(W){process$1.nextTick(P.bind(null,null,W))},function(W){process$1.nextTick(r.bind(null,W,P))})}return Object.setPrototypeOf(E,Object.getPrototypeOf(b)),Object.defineProperties(E,S(b)),E}_.callbackify=h})(util$1)),util$1}var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function _(B,A){var D=Object.keys(B);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(B);A&&(C=C.filter(function($){return Object.getOwnPropertyDescriptor(B,$).enumerable})),D.push.apply(D,C)}return D}function S(B){for(var A=1;A<arguments.length;A++){var D=arguments[A]!=null?arguments[A]:{};A%2?_(Object(D),!0).forEach(function(C){I(B,C,D[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(B,Object.getOwnPropertyDescriptors(D)):_(Object(D)).forEach(function(C){Object.defineProperty(B,C,Object.getOwnPropertyDescriptor(D,C))})}return B}function I(B,A,D){return A=w(A),A in B?Object.defineProperty(B,A,{value:D,enumerable:!0,configurable:!0,writable:!0}):B[A]=D,B}function p(B,A){if(!(B instanceof A))throw new TypeError("Cannot call a class as a function")}function R(B,A){for(var D=0;D<A.length;D++){var C=A[D];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(B,w(C.key),C)}}function f(B,A,D){return A&&R(B.prototype,A),Object.defineProperty(B,"prototype",{writable:!1}),B}function w(B){var A=m(B,"string");return typeof A=="symbol"?A:String(A)}function m(B,A){if(typeof B!="object"||B===null)return B;var D=B[Symbol.toPrimitive];if(D!==void 0){var C=D.call(B,A);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(B)}var v=requireDist(),y=v.Buffer,d=requireUtil$1(),g=d.inspect,M=g&&g.custom||"inspect";function x(B,A,D){y.prototype.copy.call(B,A,D)}return buffer_list=(function(){function B(){p(this,B),this.head=null,this.tail=null,this.length=0}return f(B,[{key:"push",value:function(D){var C={data:D,next:null};this.length>0?this.tail.next=C:this.head=C,this.tail=C,++this.length}},{key:"unshift",value:function(D){var C={data:D,next:this.head};this.length===0&&(this.tail=C),this.head=C,++this.length}},{key:"shift",value:function(){if(this.length!==0){var D=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,D}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(D){if(this.length===0)return"";for(var C=this.head,$=""+C.data;C=C.next;)$+=D+C.data;return $}},{key:"concat",value:function(D){if(this.length===0)return y.alloc(0);for(var C=y.allocUnsafe(D>>>0),$=this.head,H=0;$;)x($.data,C,H),H+=$.data.length,$=$.next;return C}},{key:"consume",value:function(D,C){var $;return D<this.head.data.length?($=this.head.data.slice(0,D),this.head.data=this.head.data.slice(D)):D===this.head.data.length?$=this.shift():$=C?this._getString(D):this._getBuffer(D),$}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(D){var C=this.head,$=1,H=C.data;for(D-=H.length;C=C.next;){var N=C.data,V=D>N.length?N.length:D;if(V===N.length?H+=N:H+=N.slice(0,D),D-=V,D===0){V===N.length?(++$,C.next?this.head=C.next:this.head=this.tail=null):(this.head=C,C.data=N.slice(V));break}++$}return this.length-=$,H}},{key:"_getBuffer",value:function(D){var C=y.allocUnsafe(D),$=this.head,H=1;for($.data.copy(C),D-=$.data.length;$=$.next;){var N=$.data,V=D>N.length?N.length:D;if(N.copy(C,C.length-D,0,V),D-=V,D===0){V===N.length?(++H,$.next?this.head=$.next:this.head=this.tail=null):(this.head=$,$.data=N.slice(V));break}++H}return this.length-=H,C}},{key:M,value:function(D,C){return g(this,S(S({},C),{},{depth:0,customInspect:!1}))}}]),B})(),buffer_list}var destroy_1$2,hasRequiredDestroy$2;function requireDestroy$2(){if(hasRequiredDestroy$2)return destroy_1$2;hasRequiredDestroy$2=1;function _(w,m){var v=this,y=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return y||d?(m?m(w):w&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(R,this,w)):process$1.nextTick(R,this,w)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(w||null,function(g){!m&&g?v._writableState?v._writableState.errorEmitted?process$1.nextTick(I,v):(v._writableState.errorEmitted=!0,process$1.nextTick(S,v,g)):process$1.nextTick(S,v,g):m?(process$1.nextTick(I,v),m(g)):process$1.nextTick(I,v)}),this)}function S(w,m){R(w,m),I(w)}function I(w){w._writableState&&!w._writableState.emitClose||w._readableState&&!w._readableState.emitClose||w.emit("close")}function p(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function R(w,m){w.emit("error",m)}function f(w,m){var v=w._readableState,y=w._writableState;v&&v.autoDestroy||y&&y.autoDestroy?w.destroy(m):w.emit("error",m)}return destroy_1$2={destroy:_,undestroy:p,errorOrDestroy:f},destroy_1$2}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function _(m,v){m.prototype=Object.create(v.prototype),m.prototype.constructor=m,m.__proto__=v}var S={};function I(m,v,y){y||(y=Error);function d(M,x,B){return typeof v=="string"?v:v(M,x,B)}var g=(function(M){_(x,M);function x(B,A,D){return M.call(this,d(B,A,D))||this}return x})(y);g.prototype.name=y.name,g.prototype.code=m,S[m]=g}function p(m,v){if(Array.isArray(m)){var y=m.length;return m=m.map(function(d){return String(d)}),y>2?"one of ".concat(v," ").concat(m.slice(0,y-1).join(", "),", or ")+m[y-1]:y===2?"one of ".concat(v," ").concat(m[0]," or ").concat(m[1]):"of ".concat(v," ").concat(m[0])}else return"of ".concat(v," ").concat(String(m))}function R(m,v,y){return m.substr(0,v.length)===v}function f(m,v,y){return(y===void 0||y>m.length)&&(y=m.length),m.substring(y-v.length,y)===v}function w(m,v,y){return typeof y!="number"&&(y=0),y+v.length>m.length?!1:m.indexOf(v,y)!==-1}return I("ERR_INVALID_OPT_VALUE",function(m,v){return'The value "'+v+'" is invalid for option "'+m+'"'},TypeError),I("ERR_INVALID_ARG_TYPE",function(m,v,y){var d;typeof v=="string"&&R(v,"not ")?(d="must not be",v=v.replace(/^not /,"")):d="must be";var g;if(f(m," argument"))g="The ".concat(m," ").concat(d," ").concat(p(v,"type"));else{var M=w(m,".")?"property":"argument";g='The "'.concat(m,'" ').concat(M," ").concat(d," ").concat(p(v,"type"))}return g+=". Received type ".concat(typeof y),g},TypeError),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),I("ERR_METHOD_NOT_IMPLEMENTED",function(m){return"The "+m+" method is not implemented"}),I("ERR_STREAM_PREMATURE_CLOSE","Premature close"),I("ERR_STREAM_DESTROYED",function(m){return"Cannot call "+m+" after a stream was destroyed"}),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),I("ERR_STREAM_WRITE_AFTER_END","write after end"),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_UNKNOWN_ENCODING",function(m){return"Unknown encoding: "+m},TypeError),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=S,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var _=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function S(p,R,f){return p.highWaterMark!=null?p.highWaterMark:R?p[f]:null}function I(p,R,f,w){var m=S(R,w,f);if(m!=null){if(!(isFinite(m)&&Math.floor(m)===m)||m<0){var v=w?f:"highWaterMark";throw new _(v,m)}return Math.floor(m)}return p.objectMode?16:16*1024}return state={getHighWaterMark:I},state}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1,browser$a=_;function _(I,p){if(S("noDeprecation"))return I;var R=!1;function f(){if(!R){if(S("throwDeprecation"))throw new Error(p);S("traceDeprecation")?console.trace(p):console.warn(p),R=!0}return I.apply(this,arguments)}return f}function S(I){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var p=commonjsGlobal.localStorage[I];return p==null?!1:String(p).toLowerCase()==="true"}return browser$a}var _stream_writable$2,hasRequired_stream_writable$2;function require_stream_writable$2(){if(hasRequired_stream_writable$2)return _stream_writable$2;hasRequired_stream_writable$2=1,_stream_writable$2=ae;function _(K){var q=this;this.next=null,this.entry=null,this.finish=function(){Y(q,K)}}var S;ae.WritableState=Q;var I={deprecate:requireBrowser$a()},p=requireStreamBrowser$2(),R=requireDist().Buffer,f=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function w(K){return R.from(K)}function m(K){return R.isBuffer(K)||K instanceof f}var v=requireDestroy$2(),y=requireState(),d=y.getHighWaterMark,g=requireErrorsBrowser().codes,M=g.ERR_INVALID_ARG_TYPE,x=g.ERR_METHOD_NOT_IMPLEMENTED,B=g.ERR_MULTIPLE_CALLBACK,A=g.ERR_STREAM_CANNOT_PIPE,D=g.ERR_STREAM_DESTROYED,C=g.ERR_STREAM_NULL_VALUES,$=g.ERR_STREAM_WRITE_AFTER_END,H=g.ERR_UNKNOWN_ENCODING,N=v.errorOrDestroy;requireInherits_browser()(ae,p);function V(){}function Q(K,q,P){S=S||require_stream_duplex$2(),K=K||{},typeof P!="boolean"&&(P=q instanceof S),this.objectMode=!!K.objectMode,P&&(this.objectMode=this.objectMode||!!K.writableObjectMode),this.highWaterMark=d(this,K,"writableHighWaterMark",P),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var W=K.decodeStrings===!1;this.decodeStrings=!W,this.defaultEncoding=K.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(J){s(q,J)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=K.emitClose!==!1,this.autoDestroy=!!K.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new _(this)}Q.prototype.getBuffer=function(){for(var q=this.bufferedRequest,P=[];q;)P.push(q),q=q.next;return P},(function(){try{Object.defineProperty(Q.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ne;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ne=Function.prototype[Symbol.hasInstance],Object.defineProperty(ae,Symbol.hasInstance,{value:function(q){return ne.call(this,q)?!0:this!==ae?!1:q&&q._writableState instanceof Q}})):ne=function(q){return q instanceof this};function ae(K){S=S||require_stream_duplex$2();var q=this instanceof S;if(!q&&!ne.call(ae,this))return new ae(K);this._writableState=new Q(K,this,q),this.writable=!0,K&&(typeof K.write=="function"&&(this._write=K.write),typeof K.writev=="function"&&(this._writev=K.writev),typeof K.destroy=="function"&&(this._destroy=K.destroy),typeof K.final=="function"&&(this._final=K.final)),p.call(this)}ae.prototype.pipe=function(){N(this,new A)};function ee(K,q){var P=new $;N(K,P),process$1.nextTick(q,P)}function le(K,q,P,W){var J;return P===null?J=new C:typeof P!="string"&&!q.objectMode&&(J=new M("chunk",["string","Buffer"],P)),J?(N(K,J),process$1.nextTick(W,J),!1):!0}ae.prototype.write=function(K,q,P){var W=this._writableState,J=!1,X=!W.objectMode&&m(K);return X&&!R.isBuffer(K)&&(K=w(K)),typeof q=="function"&&(P=q,q=null),X?q="buffer":q||(q=W.defaultEncoding),typeof P!="function"&&(P=V),W.ending?ee(this,P):(X||le(this,W,K,P))&&(W.pendingcb++,J=e(this,W,X,K,q,P)),J},ae.prototype.cork=function(){this._writableState.corked++},ae.prototype.uncork=function(){var K=this._writableState;K.corked&&(K.corked--,!K.writing&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&o(this,K))},ae.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((q+"").toLowerCase())>-1))throw new H(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(ae.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function c(K,q,P){return!K.objectMode&&K.decodeStrings!==!1&&typeof q=="string"&&(q=R.from(q,P)),q}Object.defineProperty(ae.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function e(K,q,P,W,J,X){if(!P){var U=c(q,W,J);W!==U&&(P=!0,J="buffer",W=U)}var re=q.objectMode?1:W.length;q.length+=re;var Ie=q.length<q.highWaterMark;if(Ie||(q.needDrain=!0),q.writing||q.corked){var ue=q.lastBufferedRequest;q.lastBufferedRequest={chunk:W,encoding:J,isBuf:P,callback:X,next:null},ue?ue.next=q.lastBufferedRequest:q.bufferedRequest=q.lastBufferedRequest,q.bufferedRequestCount+=1}else t(K,q,!1,re,W,J,X);return Ie}function t(K,q,P,W,J,X,U){q.writelen=W,q.writecb=U,q.writing=!0,q.sync=!0,q.destroyed?q.onwrite(new D("write")):P?K._writev(J,q.onwrite):K._write(J,X,q.onwrite),q.sync=!1}function n(K,q,P,W,J){--q.pendingcb,P?(process$1.nextTick(J,W),process$1.nextTick(E,K,q),K._writableState.errorEmitted=!0,N(K,W)):(J(W),K._writableState.errorEmitted=!0,N(K,W),E(K,q))}function a(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}function s(K,q){var P=K._writableState,W=P.sync,J=P.writecb;if(typeof J!="function")throw new B;if(a(P),q)n(K,P,W,q,J);else{var X=r(P)||K.destroyed;!X&&!P.corked&&!P.bufferProcessing&&P.bufferedRequest&&o(K,P),W?process$1.nextTick(u,K,P,X,J):u(K,P,X,J)}}function u(K,q,P,W){P||l(K,q),q.pendingcb--,W(),E(K,q)}function l(K,q){q.length===0&&q.needDrain&&(q.needDrain=!1,K.emit("drain"))}function o(K,q){q.bufferProcessing=!0;var P=q.bufferedRequest;if(K._writev&&P&&P.next){var W=q.bufferedRequestCount,J=new Array(W),X=q.corkedRequestsFree;X.entry=P;for(var U=0,re=!0;P;)J[U]=P,P.isBuf||(re=!1),P=P.next,U+=1;J.allBuffers=re,t(K,q,!0,q.length,J,"",X.finish),q.pendingcb++,q.lastBufferedRequest=null,X.next?(q.corkedRequestsFree=X.next,X.next=null):q.corkedRequestsFree=new _(q),q.bufferedRequestCount=0}else{for(;P;){var Ie=P.chunk,ue=P.encoding,he=P.callback,$e=q.objectMode?1:Ie.length;if(t(K,q,!1,$e,Ie,ue,he),P=P.next,q.bufferedRequestCount--,q.writing)break}P===null&&(q.lastBufferedRequest=null)}q.bufferedRequest=P,q.bufferProcessing=!1}ae.prototype._write=function(K,q,P){P(new x("_write()"))},ae.prototype._writev=null,ae.prototype.end=function(K,q,P){var W=this._writableState;return typeof K=="function"?(P=K,K=null,q=null):typeof q=="function"&&(P=q,q=null),K!=null&&this.write(K,q),W.corked&&(W.corked=1,this.uncork()),W.ending||L(this,W,P),this},Object.defineProperty(ae.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function r(K){return K.ending&&K.length===0&&K.bufferedRequest===null&&!K.finished&&!K.writing}function h(K,q){K._final(function(P){q.pendingcb--,P&&N(K,P),q.prefinished=!0,K.emit("prefinish"),E(K,q)})}function b(K,q){!q.prefinished&&!q.finalCalled&&(typeof K._final=="function"&&!q.destroyed?(q.pendingcb++,q.finalCalled=!0,process$1.nextTick(h,K,q)):(q.prefinished=!0,K.emit("prefinish")))}function E(K,q){var P=r(q);if(P&&(b(K,q),q.pendingcb===0&&(q.finished=!0,K.emit("finish"),q.autoDestroy))){var W=K._readableState;(!W||W.autoDestroy&&W.endEmitted)&&K.destroy()}return P}function L(K,q,P){q.ending=!0,E(K,q),P&&(q.finished?process$1.nextTick(P):K.once("finish",P)),q.ended=!0,K.writable=!1}function Y(K,q,P){var W=K.entry;for(K.entry=null;W;){var J=W.callback;q.pendingcb--,J(P),W=W.next}q.corkedRequestsFree.next=K}return Object.defineProperty(ae.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),ae.prototype.destroy=v.destroy,ae.prototype._undestroy=v.undestroy,ae.prototype._destroy=function(K,q){q(K)},_stream_writable$2}var _stream_duplex$2,hasRequired_stream_duplex$2;function require_stream_duplex$2(){if(hasRequired_stream_duplex$2)return _stream_duplex$2;hasRequired_stream_duplex$2=1;var _=Object.keys||function(y){var d=[];for(var g in y)d.push(g);return d};_stream_duplex$2=w;var S=require_stream_readable$2(),I=require_stream_writable$2();requireInherits_browser()(w,S);for(var p=_(I.prototype),R=0;R<p.length;R++){var f=p[R];w.prototype[f]||(w.prototype[f]=I.prototype[f])}function w(y){if(!(this instanceof w))return new w(y);S.call(this,y),I.call(this,y),this.allowHalfOpen=!0,y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",m)))}Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function m(){this._writableState.ended||process$1.nextTick(v,this)}function v(y){y.end()}return Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),_stream_duplex$2}var string_decoder={},hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var _=requireSafeBuffer$2().Buffer,S=_.isEncoding||function(C){switch(C=""+C,C&&C.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function I(C){if(!C)return"utf8";for(var $;;)switch(C){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return C;default:if($)return;C=(""+C).toLowerCase(),$=!0}}function p(C){var $=I(C);if(typeof $!="string"&&(_.isEncoding===S||!S(C)))throw new Error("Unknown encoding: "+C);return $||C}string_decoder.StringDecoder=R;function R(C){this.encoding=p(C);var $;switch(this.encoding){case"utf16le":this.text=g,this.end=M,$=4;break;case"utf8":this.fillLast=v,$=4;break;case"base64":this.text=x,this.end=B,$=3;break;default:this.write=A,this.end=D;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe($)}R.prototype.write=function(C){if(C.length===0)return"";var $,H;if(this.lastNeed){if($=this.fillLast(C),$===void 0)return"";H=this.lastNeed,this.lastNeed=0}else H=0;return H<C.length?$?$+this.text(C,H):this.text(C,H):$||""},R.prototype.end=d,R.prototype.text=y,R.prototype.fillLast=function(C){if(this.lastNeed<=C.length)return C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,C.length),this.lastNeed-=C.length};function f(C){return C<=127?0:C>>5===6?2:C>>4===14?3:C>>3===30?4:C>>6===2?-1:-2}function w(C,$,H){var N=$.length-1;if(N<H)return 0;var V=f($[N]);return V>=0?(V>0&&(C.lastNeed=V-1),V):--N<H||V===-2?0:(V=f($[N]),V>=0?(V>0&&(C.lastNeed=V-2),V):--N<H||V===-2?0:(V=f($[N]),V>=0?(V>0&&(V===2?V=0:C.lastNeed=V-3),V):0))}function m(C,$,H){if(($[0]&192)!==128)return C.lastNeed=0,"�";if(C.lastNeed>1&&$.length>1){if(($[1]&192)!==128)return C.lastNeed=1,"�";if(C.lastNeed>2&&$.length>2&&($[2]&192)!==128)return C.lastNeed=2,"�"}}function v(C){var $=this.lastTotal-this.lastNeed,H=m(this,C);if(H!==void 0)return H;if(this.lastNeed<=C.length)return C.copy(this.lastChar,$,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,$,0,C.length),this.lastNeed-=C.length}function y(C,$){var H=w(this,C,$);if(!this.lastNeed)return C.toString("utf8",$);this.lastTotal=H;var N=C.length-(H-this.lastNeed);return C.copy(this.lastChar,0,N),C.toString("utf8",$,N)}function d(C){var $=C&&C.length?this.write(C):"";return this.lastNeed?$+"�":$}function g(C,$){if((C.length-$)%2===0){var H=C.toString("utf16le",$);if(H){var N=H.charCodeAt(H.length-1);if(N>=55296&&N<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1],H.slice(0,-1)}return H}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=C[C.length-1],C.toString("utf16le",$,C.length-1)}function M(C){var $=C&&C.length?this.write(C):"";if(this.lastNeed){var H=this.lastTotal-this.lastNeed;return $+this.lastChar.toString("utf16le",0,H)}return $}function x(C,$){var H=(C.length-$)%3;return H===0?C.toString("base64",$):(this.lastNeed=3-H,this.lastTotal=3,H===1?this.lastChar[0]=C[C.length-1]:(this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1]),C.toString("base64",$,C.length-H))}function B(C){var $=C&&C.length?this.write(C):"";return this.lastNeed?$+this.lastChar.toString("base64",0,3-this.lastNeed):$}function A(C){return C.toString(this.encoding)}function D(C){return C&&C.length?this.write(C):""}return string_decoder}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var _=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function S(f){var w=!1;return function(){if(!w){w=!0;for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];f.apply(this,v)}}}function I(){}function p(f){return f.setHeader&&typeof f.abort=="function"}function R(f,w,m){if(typeof w=="function")return R(f,null,w);w||(w={}),m=S(m||I);var v=w.readable||w.readable!==!1&&f.readable,y=w.writable||w.writable!==!1&&f.writable,d=function(){f.writable||M()},g=f._writableState&&f._writableState.finished,M=function(){y=!1,g=!0,v||m.call(f)},x=f._readableState&&f._readableState.endEmitted,B=function(){v=!1,x=!0,y||m.call(f)},A=function(H){m.call(f,H)},D=function(){var H;if(v&&!x)return(!f._readableState||!f._readableState.ended)&&(H=new _),m.call(f,H);if(y&&!g)return(!f._writableState||!f._writableState.ended)&&(H=new _),m.call(f,H)},C=function(){f.req.on("finish",M)};return p(f)?(f.on("complete",M),f.on("abort",D),f.req?C():f.on("request",C)):y&&!f._writableState&&(f.on("end",d),f.on("close",d)),f.on("end",B),f.on("finish",M),w.error!==!1&&f.on("error",A),f.on("close",D),function(){f.removeListener("complete",M),f.removeListener("abort",D),f.removeListener("request",C),f.req&&f.req.removeListener("finish",M),f.removeListener("end",d),f.removeListener("close",d),f.removeListener("finish",M),f.removeListener("end",B),f.removeListener("error",A),f.removeListener("close",D)}}return endOfStream=R,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var _;function S(H,N,V){return N=I(N),N in H?Object.defineProperty(H,N,{value:V,enumerable:!0,configurable:!0,writable:!0}):H[N]=V,H}function I(H){var N=p(H,"string");return typeof N=="symbol"?N:String(N)}function p(H,N){if(typeof H!="object"||H===null)return H;var V=H[Symbol.toPrimitive];if(V!==void 0){var Q=V.call(H,N);if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(H)}var R=requireEndOfStream(),f=Symbol("lastResolve"),w=Symbol("lastReject"),m=Symbol("error"),v=Symbol("ended"),y=Symbol("lastPromise"),d=Symbol("handlePromise"),g=Symbol("stream");function M(H,N){return{value:H,done:N}}function x(H){var N=H[f];if(N!==null){var V=H[g].read();V!==null&&(H[y]=null,H[f]=null,H[w]=null,N(M(V,!1)))}}function B(H){process$1.nextTick(x,H)}function A(H,N){return function(V,Q){H.then(function(){if(N[v]){V(M(void 0,!0));return}N[d](V,Q)},Q)}}var D=Object.getPrototypeOf(function(){}),C=Object.setPrototypeOf((_={get stream(){return this[g]},next:function(){var N=this,V=this[m];if(V!==null)return Promise.reject(V);if(this[v])return Promise.resolve(M(void 0,!0));if(this[g].destroyed)return new Promise(function(ee,le){process$1.nextTick(function(){N[m]?le(N[m]):ee(M(void 0,!0))})});var Q=this[y],ne;if(Q)ne=new Promise(A(Q,this));else{var ae=this[g].read();if(ae!==null)return Promise.resolve(M(ae,!1));ne=new Promise(this[d])}return this[y]=ne,ne}},S(_,Symbol.asyncIterator,function(){return this}),S(_,"return",function(){var N=this;return new Promise(function(V,Q){N[g].destroy(null,function(ne){if(ne){Q(ne);return}V(M(void 0,!0))})})}),_),D),$=function(N){var V,Q=Object.create(C,(V={},S(V,g,{value:N,writable:!0}),S(V,f,{value:null,writable:!0}),S(V,w,{value:null,writable:!0}),S(V,m,{value:null,writable:!0}),S(V,v,{value:N._readableState.endEmitted,writable:!0}),S(V,d,{value:function(ae,ee){var le=Q[g].read();le?(Q[y]=null,Q[f]=null,Q[w]=null,ae(M(le,!1))):(Q[f]=ae,Q[w]=ee)},writable:!0}),V));return Q[y]=null,R(N,function(ne){if(ne&&ne.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ae=Q[w];ae!==null&&(Q[y]=null,Q[f]=null,Q[w]=null,ae(ne)),Q[m]=ne;return}var ee=Q[f];ee!==null&&(Q[y]=null,Q[f]=null,Q[w]=null,ee(M(void 0,!0))),Q[v]=!0}),N.on("readable",B.bind(null,Q)),Q};return async_iterator=$,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$2,hasRequired_stream_readable$2;function require_stream_readable$2(){if(hasRequired_stream_readable$2)return _stream_readable$2;hasRequired_stream_readable$2=1,_stream_readable$2=ee;var _;ee.ReadableState=ae,requireEvents().EventEmitter;var S=function(U,re){return U.listeners(re).length},I=requireStreamBrowser$2(),p=requireDist().Buffer,R=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(X){return p.from(X)}function w(X){return p.isBuffer(X)||X instanceof R}var m=requireUtil$1(),v;m&&m.debuglog?v=m.debuglog("stream"):v=function(){};var y=requireBuffer_list(),d=requireDestroy$2(),g=requireState(),M=g.getHighWaterMark,x=requireErrorsBrowser().codes,B=x.ERR_INVALID_ARG_TYPE,A=x.ERR_STREAM_PUSH_AFTER_EOF,D=x.ERR_METHOD_NOT_IMPLEMENTED,C=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,$,H,N;requireInherits_browser()(ee,I);var V=d.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ne(X,U,re){if(typeof X.prependListener=="function")return X.prependListener(U,re);!X._events||!X._events[U]?X.on(U,re):Array.isArray(X._events[U])?X._events[U].unshift(re):X._events[U]=[re,X._events[U]]}function ae(X,U,re){_=_||require_stream_duplex$2(),X=X||{},typeof re!="boolean"&&(re=U instanceof _),this.objectMode=!!X.objectMode,re&&(this.objectMode=this.objectMode||!!X.readableObjectMode),this.highWaterMark=M(this,X,"readableHighWaterMark",re),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=X.emitClose!==!1,this.autoDestroy=!!X.autoDestroy,this.destroyed=!1,this.defaultEncoding=X.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,X.encoding&&($||($=requireString_decoder().StringDecoder),this.decoder=new $(X.encoding),this.encoding=X.encoding)}function ee(X){if(_=_||require_stream_duplex$2(),!(this instanceof ee))return new ee(X);var U=this instanceof _;this._readableState=new ae(X,this,U),this.readable=!0,X&&(typeof X.read=="function"&&(this._read=X.read),typeof X.destroy=="function"&&(this._destroy=X.destroy)),I.call(this)}Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(U){this._readableState&&(this._readableState.destroyed=U)}}),ee.prototype.destroy=d.destroy,ee.prototype._undestroy=d.undestroy,ee.prototype._destroy=function(X,U){U(X)},ee.prototype.push=function(X,U){var re=this._readableState,Ie;return re.objectMode?Ie=!0:typeof X=="string"&&(U=U||re.defaultEncoding,U!==re.encoding&&(X=p.from(X,U),U=""),Ie=!0),le(this,X,U,!1,Ie)},ee.prototype.unshift=function(X){return le(this,X,null,!0,!1)};function le(X,U,re,Ie,ue){v("readableAddChunk",U);var he=X._readableState;if(U===null)he.reading=!1,s(X,he);else{var $e;if(ue||($e=e(he,U)),$e)V(X,$e);else if(he.objectMode||U&&U.length>0)if(typeof U!="string"&&!he.objectMode&&Object.getPrototypeOf(U)!==p.prototype&&(U=f(U)),Ie)he.endEmitted?V(X,new C):c(X,he,U,!0);else if(he.ended)V(X,new A);else{if(he.destroyed)return!1;he.reading=!1,he.decoder&&!re?(U=he.decoder.write(U),he.objectMode||U.length!==0?c(X,he,U,!1):o(X,he)):c(X,he,U,!1)}else Ie||(he.reading=!1,o(X,he))}return!he.ended&&(he.length<he.highWaterMark||he.length===0)}function c(X,U,re,Ie){U.flowing&&U.length===0&&!U.sync?(U.awaitDrain=0,X.emit("data",re)):(U.length+=U.objectMode?1:re.length,Ie?U.buffer.unshift(re):U.buffer.push(re),U.needReadable&&u(X)),o(X,U)}function e(X,U){var re;return!w(U)&&typeof U!="string"&&U!==void 0&&!X.objectMode&&(re=new B("chunk",["string","Buffer","Uint8Array"],U)),re}ee.prototype.isPaused=function(){return this._readableState.flowing===!1},ee.prototype.setEncoding=function(X){$||($=requireString_decoder().StringDecoder);var U=new $(X);this._readableState.decoder=U,this._readableState.encoding=this._readableState.decoder.encoding;for(var re=this._readableState.buffer.head,Ie="";re!==null;)Ie+=U.write(re.data),re=re.next;return this._readableState.buffer.clear(),Ie!==""&&this._readableState.buffer.push(Ie),this._readableState.length=Ie.length,this};var t=1073741824;function n(X){return X>=t?X=t:(X--,X|=X>>>1,X|=X>>>2,X|=X>>>4,X|=X>>>8,X|=X>>>16,X++),X}function a(X,U){return X<=0||U.length===0&&U.ended?0:U.objectMode?1:X!==X?U.flowing&&U.length?U.buffer.head.data.length:U.length:(X>U.highWaterMark&&(U.highWaterMark=n(X)),X<=U.length?X:U.ended?U.length:(U.needReadable=!0,0))}ee.prototype.read=function(X){v("read",X),X=parseInt(X,10);var U=this._readableState,re=X;if(X!==0&&(U.emittedReadable=!1),X===0&&U.needReadable&&((U.highWaterMark!==0?U.length>=U.highWaterMark:U.length>0)||U.ended))return v("read: emitReadable",U.length,U.ended),U.length===0&&U.ended?P(this):u(this),null;if(X=a(X,U),X===0&&U.ended)return U.length===0&&P(this),null;var Ie=U.needReadable;v("need readable",Ie),(U.length===0||U.length-X<U.highWaterMark)&&(Ie=!0,v("length less than watermark",Ie)),U.ended||U.reading?(Ie=!1,v("reading or ended",Ie)):Ie&&(v("do read"),U.reading=!0,U.sync=!0,U.length===0&&(U.needReadable=!0),this._read(U.highWaterMark),U.sync=!1,U.reading||(X=a(re,U)));var ue;return X>0?ue=q(X,U):ue=null,ue===null?(U.needReadable=U.length<=U.highWaterMark,X=0):(U.length-=X,U.awaitDrain=0),U.length===0&&(U.ended||(U.needReadable=!0),re!==X&&U.ended&&P(this)),ue!==null&&this.emit("data",ue),ue};function s(X,U){if(v("onEofChunk"),!U.ended){if(U.decoder){var re=U.decoder.end();re&&re.length&&(U.buffer.push(re),U.length+=U.objectMode?1:re.length)}U.ended=!0,U.sync?u(X):(U.needReadable=!1,U.emittedReadable||(U.emittedReadable=!0,l(X)))}}function u(X){var U=X._readableState;v("emitReadable",U.needReadable,U.emittedReadable),U.needReadable=!1,U.emittedReadable||(v("emitReadable",U.flowing),U.emittedReadable=!0,process$1.nextTick(l,X))}function l(X){var U=X._readableState;v("emitReadable_",U.destroyed,U.length,U.ended),!U.destroyed&&(U.length||U.ended)&&(X.emit("readable"),U.emittedReadable=!1),U.needReadable=!U.flowing&&!U.ended&&U.length<=U.highWaterMark,K(X)}function o(X,U){U.readingMore||(U.readingMore=!0,process$1.nextTick(r,X,U))}function r(X,U){for(;!U.reading&&!U.ended&&(U.length<U.highWaterMark||U.flowing&&U.length===0);){var re=U.length;if(v("maybeReadMore read 0"),X.read(0),re===U.length)break}U.readingMore=!1}ee.prototype._read=function(X){V(this,new D("_read()"))},ee.prototype.pipe=function(X,U){var re=this,Ie=this._readableState;switch(Ie.pipesCount){case 0:Ie.pipes=X;break;case 1:Ie.pipes=[Ie.pipes,X];break;default:Ie.pipes.push(X);break}Ie.pipesCount+=1,v("pipe count=%d opts=%j",Ie.pipesCount,U);var ue=(!U||U.end!==!1)&&X!==process$1.stdout&&X!==process$1.stderr,he=ue?me:Ue;Ie.endEmitted?process$1.nextTick(he):re.once("end",he),X.on("unpipe",$e);function $e(xe,Ae){v("onunpipe"),xe===re&&Ae&&Ae.hasUnpiped===!1&&(Ae.hasUnpiped=!0,de())}function me(){v("onend"),X.end()}var se=h(re);X.on("drain",se);var De=!1;function de(){v("cleanup"),X.removeListener("close",pe),X.removeListener("finish",_e),X.removeListener("drain",se),X.removeListener("error",Ce),X.removeListener("unpipe",$e),re.removeListener("end",me),re.removeListener("end",Ue),re.removeListener("data",ye),De=!0,Ie.awaitDrain&&(!X._writableState||X._writableState.needDrain)&&se()}re.on("data",ye);function ye(xe){v("ondata");var Ae=X.write(xe);v("dest.write",Ae),Ae===!1&&((Ie.pipesCount===1&&Ie.pipes===X||Ie.pipesCount>1&&J(Ie.pipes,X)!==-1)&&!De&&(v("false write response, pause",Ie.awaitDrain),Ie.awaitDrain++),re.pause())}function Ce(xe){v("onerror",xe),Ue(),X.removeListener("error",Ce),S(X,"error")===0&&V(X,xe)}ne(X,"error",Ce);function pe(){X.removeListener("finish",_e),Ue()}X.once("close",pe);function _e(){v("onfinish"),X.removeListener("close",pe),Ue()}X.once("finish",_e);function Ue(){v("unpipe"),re.unpipe(X)}return X.emit("pipe",re),Ie.flowing||(v("pipe resume"),re.resume()),X};function h(X){return function(){var re=X._readableState;v("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&S(X,"data")&&(re.flowing=!0,K(X))}}ee.prototype.unpipe=function(X){var U=this._readableState,re={hasUnpiped:!1};if(U.pipesCount===0)return this;if(U.pipesCount===1)return X&&X!==U.pipes?this:(X||(X=U.pipes),U.pipes=null,U.pipesCount=0,U.flowing=!1,X&&X.emit("unpipe",this,re),this);if(!X){var Ie=U.pipes,ue=U.pipesCount;U.pipes=null,U.pipesCount=0,U.flowing=!1;for(var he=0;he<ue;he++)Ie[he].emit("unpipe",this,{hasUnpiped:!1});return this}var $e=J(U.pipes,X);return $e===-1?this:(U.pipes.splice($e,1),U.pipesCount-=1,U.pipesCount===1&&(U.pipes=U.pipes[0]),X.emit("unpipe",this,re),this)},ee.prototype.on=function(X,U){var re=I.prototype.on.call(this,X,U),Ie=this._readableState;return X==="data"?(Ie.readableListening=this.listenerCount("readable")>0,Ie.flowing!==!1&&this.resume()):X==="readable"&&!Ie.endEmitted&&!Ie.readableListening&&(Ie.readableListening=Ie.needReadable=!0,Ie.flowing=!1,Ie.emittedReadable=!1,v("on readable",Ie.length,Ie.reading),Ie.length?u(this):Ie.reading||process$1.nextTick(E,this)),re},ee.prototype.addListener=ee.prototype.on,ee.prototype.removeListener=function(X,U){var re=I.prototype.removeListener.call(this,X,U);return X==="readable"&&process$1.nextTick(b,this),re},ee.prototype.removeAllListeners=function(X){var U=I.prototype.removeAllListeners.apply(this,arguments);return(X==="readable"||X===void 0)&&process$1.nextTick(b,this),U};function b(X){var U=X._readableState;U.readableListening=X.listenerCount("readable")>0,U.resumeScheduled&&!U.paused?U.flowing=!0:X.listenerCount("data")>0&&X.resume()}function E(X){v("readable nexttick read 0"),X.read(0)}ee.prototype.resume=function(){var X=this._readableState;return X.flowing||(v("resume"),X.flowing=!X.readableListening,L(this,X)),X.paused=!1,this};function L(X,U){U.resumeScheduled||(U.resumeScheduled=!0,process$1.nextTick(Y,X,U))}function Y(X,U){v("resume",U.reading),U.reading||X.read(0),U.resumeScheduled=!1,X.emit("resume"),K(X),U.flowing&&!U.reading&&X.read(0)}ee.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function K(X){var U=X._readableState;for(v("flow",U.flowing);U.flowing&&X.read()!==null;);}ee.prototype.wrap=function(X){var U=this,re=this._readableState,Ie=!1;X.on("end",function(){if(v("wrapped end"),re.decoder&&!re.ended){var $e=re.decoder.end();$e&&$e.length&&U.push($e)}U.push(null)}),X.on("data",function($e){if(v("wrapped data"),re.decoder&&($e=re.decoder.write($e)),!(re.objectMode&&$e==null)&&!(!re.objectMode&&(!$e||!$e.length))){var me=U.push($e);me||(Ie=!0,X.pause())}});for(var ue in X)this[ue]===void 0&&typeof X[ue]=="function"&&(this[ue]=(function(me){return function(){return X[me].apply(X,arguments)}})(ue));for(var he=0;he<Q.length;he++)X.on(Q[he],this.emit.bind(this,Q[he]));return this._read=function($e){v("wrapped _read",$e),Ie&&(Ie=!1,X.resume())},this},typeof Symbol=="function"&&(ee.prototype[Symbol.asyncIterator]=function(){return H===void 0&&(H=requireAsync_iterator()),H(this)}),Object.defineProperty(ee.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ee.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ee.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(U){this._readableState&&(this._readableState.flowing=U)}}),ee._fromList=q,Object.defineProperty(ee.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function q(X,U){if(U.length===0)return null;var re;return U.objectMode?re=U.buffer.shift():!X||X>=U.length?(U.decoder?re=U.buffer.join(""):U.buffer.length===1?re=U.buffer.first():re=U.buffer.concat(U.length),U.buffer.clear()):re=U.buffer.consume(X,U.decoder),re}function P(X){var U=X._readableState;v("endReadable",U.endEmitted),U.endEmitted||(U.ended=!0,process$1.nextTick(W,U,X))}function W(X,U){if(v("endReadableNT",X.endEmitted,X.length),!X.endEmitted&&X.length===0&&(X.endEmitted=!0,U.readable=!1,U.emit("end"),X.autoDestroy)){var re=U._writableState;(!re||re.autoDestroy&&re.finished)&&U.destroy()}}typeof Symbol=="function"&&(ee.from=function(X,U){return N===void 0&&(N=requireFromBrowser()),N(ee,X,U)});function J(X,U){for(var re=0,Ie=X.length;re<Ie;re++)if(X[re]===U)return re;return-1}return _stream_readable$2}var _stream_transform$2,hasRequired_stream_transform$2;function require_stream_transform$2(){if(hasRequired_stream_transform$2)return _stream_transform$2;hasRequired_stream_transform$2=1,_stream_transform$2=m;var _=requireErrorsBrowser().codes,S=_.ERR_METHOD_NOT_IMPLEMENTED,I=_.ERR_MULTIPLE_CALLBACK,p=_.ERR_TRANSFORM_ALREADY_TRANSFORMING,R=_.ERR_TRANSFORM_WITH_LENGTH_0,f=require_stream_duplex$2();requireInherits_browser()(m,f);function w(d,g){var M=this._transformState;M.transforming=!1;var x=M.writecb;if(x===null)return this.emit("error",new I);M.writechunk=null,M.writecb=null,g!=null&&this.push(g),x(d);var B=this._readableState;B.reading=!1,(B.needReadable||B.length<B.highWaterMark)&&this._read(B.highWaterMark)}function m(d){if(!(this instanceof m))return new m(d);f.call(this,d),this._transformState={afterTransform:w.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",v)}function v(){var d=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(g,M){y(d,g,M)}):y(this,null,null)}m.prototype.push=function(d,g){return this._transformState.needTransform=!1,f.prototype.push.call(this,d,g)},m.prototype._transform=function(d,g,M){M(new S("_transform()"))},m.prototype._write=function(d,g,M){var x=this._transformState;if(x.writecb=M,x.writechunk=d,x.writeencoding=g,!x.transforming){var B=this._readableState;(x.needTransform||B.needReadable||B.length<B.highWaterMark)&&this._read(B.highWaterMark)}},m.prototype._read=function(d){var g=this._transformState;g.writechunk!==null&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},m.prototype._destroy=function(d,g){f.prototype._destroy.call(this,d,function(M){g(M)})};function y(d,g,M){if(g)return d.emit("error",g);if(M!=null&&d.push(M),d._writableState.length)throw new R;if(d._transformState.transforming)throw new p;return d.push(null)}return _stream_transform$2}var _stream_passthrough$2,hasRequired_stream_passthrough$2;function require_stream_passthrough$2(){if(hasRequired_stream_passthrough$2)return _stream_passthrough$2;hasRequired_stream_passthrough$2=1,_stream_passthrough$2=S;var _=require_stream_transform$2();requireInherits_browser()(S,_);function S(I){if(!(this instanceof S))return new S(I);_.call(this,I)}return S.prototype._transform=function(I,p,R){R(null,I)},_stream_passthrough$2}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var _;function S(M){var x=!1;return function(){x||(x=!0,M.apply(void 0,arguments))}}var I=requireErrorsBrowser().codes,p=I.ERR_MISSING_ARGS,R=I.ERR_STREAM_DESTROYED;function f(M){if(M)throw M}function w(M){return M.setHeader&&typeof M.abort=="function"}function m(M,x,B,A){A=S(A);var D=!1;M.on("close",function(){D=!0}),_===void 0&&(_=requireEndOfStream()),_(M,{readable:x,writable:B},function($){if($)return A($);D=!0,A()});var C=!1;return function($){if(!D&&!C){if(C=!0,w(M))return M.abort();if(typeof M.destroy=="function")return M.destroy();A($||new R("pipe"))}}}function v(M){M()}function y(M,x){return M.pipe(x)}function d(M){return!M.length||typeof M[M.length-1]!="function"?f:M.pop()}function g(){for(var M=arguments.length,x=new Array(M),B=0;B<M;B++)x[B]=arguments[B];var A=d(x);if(Array.isArray(x[0])&&(x=x[0]),x.length<2)throw new p("streams");var D,C=x.map(function($,H){var N=H<x.length-1,V=H>0;return m($,N,V,function(Q){D||(D=Q),Q&&C.forEach(v),!N&&(C.forEach(v),A(D))})});return x.reduce(y)}return pipeline_1=g,pipeline_1}var streamBrowserify,hasRequiredStreamBrowserify;function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=I;var _=requireEvents().EventEmitter,S=requireInherits_browser();S(I,_),I.Readable=require_stream_readable$2(),I.Writable=require_stream_writable$2(),I.Duplex=require_stream_duplex$2(),I.Transform=require_stream_transform$2(),I.PassThrough=require_stream_passthrough$2(),I.finished=requireEndOfStream(),I.pipeline=requirePipeline(),I.Stream=I;function I(){_.call(this)}return I.prototype.pipe=function(p,R){var f=this;function w(x){p.writable&&p.write(x)===!1&&f.pause&&f.pause()}f.on("data",w);function m(){f.readable&&f.resume&&f.resume()}p.on("drain",m),!p._isStdio&&(!R||R.end!==!1)&&(f.on("end",y),f.on("close",d));var v=!1;function y(){v||(v=!0,p.end())}function d(){v||(v=!0,typeof p.destroy=="function"&&p.destroy())}function g(x){if(M(),_.listenerCount(this,"error")===0)throw x}f.on("error",g),p.on("error",g);function M(){f.removeListener("data",w),p.removeListener("drain",m),f.removeListener("end",y),f.removeListener("close",d),f.removeListener("error",g),p.removeListener("error",g),f.removeListener("end",M),f.removeListener("close",M),p.removeListener("close",M)}return f.on("end",M),f.on("close",M),p.on("close",M),p.emit("pipe",f),p},streamBrowserify}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var _=requireSafeBuffer$2().Buffer,S=requireStreamBrowserify().Transform,I=requireInherits_browser();function p(m){S.call(this),this._block=_.allocUnsafe(m),this._blockSize=m,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}I(p,S),p.prototype._transform=function(m,v,y){var d=null;try{this.update(m,v)}catch(g){d=g}y(d)},p.prototype._flush=function(m){var v=null;try{this.push(this.digest())}catch(y){v=y}m(v)};var R=typeof Uint8Array<"u",f=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(_.prototype instanceof Uint8Array||_.TYPED_ARRAY_SUPPORT);function w(m,v){if(m instanceof _)return m;if(typeof m=="string")return _.from(m,v);if(f&&ArrayBuffer.isView(m)){if(m.byteLength===0)return _.alloc(0);var y=_.from(m.buffer,m.byteOffset,m.byteLength);if(y.byteLength===m.byteLength)return y}if(R&&m instanceof Uint8Array||_.isBuffer(m)&&m.constructor&&typeof m.constructor.isBuffer=="function"&&m.constructor.isBuffer(m))return _.from(m);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return p.prototype.update=function(m,v){if(this._finalized)throw new Error("Digest already called");m=w(m,v);for(var y=this._block,d=0;this._blockOffset+m.length-d>=this._blockSize;){for(var g=this._blockOffset;g<this._blockSize;)y[g++]=m[d++];this._update(),this._blockOffset=0}for(;d<m.length;)y[this._blockOffset++]=m[d++];for(var M=0,x=m.length*8;x>0;++M)this._length[M]+=x,x=this._length[M]/4294967296|0,x>0&&(this._length[M]-=4294967296*x);return this},p.prototype._update=function(){throw new Error("_update is not implemented")},p.prototype.digest=function(m){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var v=this._digest();m!==void 0&&(v=v.toString(m)),this._block.fill(0),this._blockOffset=0;for(var y=0;y<4;++y)this._length[y]=0;return v},p.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=p,hashBase$1}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var _=requireInherits_browser(),S=requireHashBase$1(),I=requireSafeBuffer$2().Buffer,p=new Array(16);function R(){S.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}_(R,S),R.prototype._update=function(){for(var d=p,g=0;g<16;++g)d[g]=this._block.readInt32LE(g*4);var M=this._a,x=this._b,B=this._c,A=this._d;M=w(M,x,B,A,d[0],3614090360,7),A=w(A,M,x,B,d[1],3905402710,12),B=w(B,A,M,x,d[2],606105819,17),x=w(x,B,A,M,d[3],3250441966,22),M=w(M,x,B,A,d[4],4118548399,7),A=w(A,M,x,B,d[5],1200080426,12),B=w(B,A,M,x,d[6],2821735955,17),x=w(x,B,A,M,d[7],4249261313,22),M=w(M,x,B,A,d[8],1770035416,7),A=w(A,M,x,B,d[9],2336552879,12),B=w(B,A,M,x,d[10],4294925233,17),x=w(x,B,A,M,d[11],2304563134,22),M=w(M,x,B,A,d[12],1804603682,7),A=w(A,M,x,B,d[13],4254626195,12),B=w(B,A,M,x,d[14],2792965006,17),x=w(x,B,A,M,d[15],1236535329,22),M=m(M,x,B,A,d[1],4129170786,5),A=m(A,M,x,B,d[6],3225465664,9),B=m(B,A,M,x,d[11],643717713,14),x=m(x,B,A,M,d[0],3921069994,20),M=m(M,x,B,A,d[5],3593408605,5),A=m(A,M,x,B,d[10],38016083,9),B=m(B,A,M,x,d[15],3634488961,14),x=m(x,B,A,M,d[4],3889429448,20),M=m(M,x,B,A,d[9],568446438,5),A=m(A,M,x,B,d[14],3275163606,9),B=m(B,A,M,x,d[3],4107603335,14),x=m(x,B,A,M,d[8],1163531501,20),M=m(M,x,B,A,d[13],2850285829,5),A=m(A,M,x,B,d[2],4243563512,9),B=m(B,A,M,x,d[7],1735328473,14),x=m(x,B,A,M,d[12],2368359562,20),M=v(M,x,B,A,d[5],4294588738,4),A=v(A,M,x,B,d[8],2272392833,11),B=v(B,A,M,x,d[11],1839030562,16),x=v(x,B,A,M,d[14],4259657740,23),M=v(M,x,B,A,d[1],2763975236,4),A=v(A,M,x,B,d[4],1272893353,11),B=v(B,A,M,x,d[7],4139469664,16),x=v(x,B,A,M,d[10],3200236656,23),M=v(M,x,B,A,d[13],681279174,4),A=v(A,M,x,B,d[0],3936430074,11),B=v(B,A,M,x,d[3],3572445317,16),x=v(x,B,A,M,d[6],76029189,23),M=v(M,x,B,A,d[9],3654602809,4),A=v(A,M,x,B,d[12],3873151461,11),B=v(B,A,M,x,d[15],530742520,16),x=v(x,B,A,M,d[2],3299628645,23),M=y(M,x,B,A,d[0],4096336452,6),A=y(A,M,x,B,d[7],1126891415,10),B=y(B,A,M,x,d[14],2878612391,15),x=y(x,B,A,M,d[5],4237533241,21),M=y(M,x,B,A,d[12],1700485571,6),A=y(A,M,x,B,d[3],2399980690,10),B=y(B,A,M,x,d[10],4293915773,15),x=y(x,B,A,M,d[1],2240044497,21),M=y(M,x,B,A,d[8],1873313359,6),A=y(A,M,x,B,d[15],4264355552,10),B=y(B,A,M,x,d[6],2734768916,15),x=y(x,B,A,M,d[13],1309151649,21),M=y(M,x,B,A,d[4],4149444226,6),A=y(A,M,x,B,d[11],3174756917,10),B=y(B,A,M,x,d[2],718787259,15),x=y(x,B,A,M,d[9],3951481745,21),this._a=this._a+M|0,this._b=this._b+x|0,this._c=this._c+B|0,this._d=this._d+A|0},R.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var d=I.allocUnsafe(16);return d.writeInt32LE(this._a,0),d.writeInt32LE(this._b,4),d.writeInt32LE(this._c,8),d.writeInt32LE(this._d,12),d};function f(d,g){return d<<g|d>>>32-g}function w(d,g,M,x,B,A,D){return f(d+(g&M|~g&x)+B+A|0,D)+g|0}function m(d,g,M,x,B,A,D){return f(d+(g&x|M&~x)+B+A|0,D)+g|0}function v(d,g,M,x,B,A,D){return f(d+(g^M^x)+B+A|0,D)+g|0}function y(d,g,M,x,B,A,D){return f(d+(M^(g|~x))+B+A|0,D)+g|0}return md5_js=R,md5_js}var isarray$2,hasRequiredIsarray$2;function requireIsarray$2(){if(hasRequiredIsarray$2)return isarray$2;hasRequiredIsarray$2=1;var _={}.toString;return isarray$2=Array.isArray||function(S){return _.call(S)=="[object Array]"},isarray$2}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var _=requireType(),S=requireCallBound(),I=S("TypedArray.prototype.buffer",!0),p=requireIsTypedArray();return typedArrayBuffer=I||function(f){if(!p(f))throw new _("Not a Typed Array");return f.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$2;function requireToBuffer$2(){if(hasRequiredToBuffer$2)return toBuffer;hasRequiredToBuffer$2=1;var _=requireSafeBuffer$2().Buffer,S=requireIsarray$2(),I=requireTypedArrayBuffer(),p=ArrayBuffer.isView||function(v){try{return I(v),!0}catch{return!1}},R=typeof Uint8Array<"u",f=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",w=f&&(_.prototype instanceof Uint8Array||_.TYPED_ARRAY_SUPPORT);return toBuffer=function(v,y){if(_.isBuffer(v))return v.constructor&&!("isBuffer"in v)?_.from(v):v;if(typeof v=="string")return _.from(v,y);if(f&&p(v)){if(v.byteLength===0)return _.alloc(0);if(w){var d=_.from(v.buffer,v.byteOffset,v.byteLength);if(d.byteLength===v.byteLength)return d}var g=v instanceof Uint8Array?v:new Uint8Array(v.buffer,v.byteOffset,v.byteLength),M=_.from(g);if(M.length===v.byteLength)return M}if(R&&v instanceof Uint8Array)return _.from(v);var x=S(v);if(x)for(var B=0;B<v.length;B+=1){var A=v[B];if(typeof A!="number"||A<0||A>255||~~A!==A)throw new RangeError("Array items must be numbers in the range 0-255.")}if(x||_.isBuffer(v)&&v.constructor&&typeof v.constructor.isBuffer=="function"&&v.constructor.isBuffer(v))return _.from(v);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},toBuffer}var toBuffer_1$1,hasRequiredToBuffer$1;function requireToBuffer$1(){if(hasRequiredToBuffer$1)return toBuffer_1$1;hasRequiredToBuffer$1=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$2(),I=typeof Uint8Array<"u",p=I&&typeof ArrayBuffer<"u",R=p&&ArrayBuffer.isView;return toBuffer_1$1=function(f,w){if(typeof f=="string"||_.isBuffer(f)||I&&f instanceof Uint8Array||R&&R(f))return S(f,w);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')},toBuffer_1$1}var readableBrowser$1={exports:{}},processNextickArgs={exports:{}},hasRequiredProcessNextickArgs;function requireProcessNextickArgs(){if(hasRequiredProcessNextickArgs)return processNextickArgs.exports;hasRequiredProcessNextickArgs=1,typeof process$1>"u"||!process$1.version||process$1.version.indexOf("v0.")===0||process$1.version.indexOf("v1.")===0&&process$1.version.indexOf("v1.8.")!==0?processNextickArgs.exports={nextTick:_}:processNextickArgs.exports=process$1;function _(S,I,p,R){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var f=arguments.length,w,m;switch(f){case 0:case 1:return process$1.nextTick(S);case 2:return process$1.nextTick(function(){S.call(null,I)});case 3:return process$1.nextTick(function(){S.call(null,I,p)});case 4:return process$1.nextTick(function(){S.call(null,I,p,R)});default:for(w=new Array(f-1),m=0;m<w.length;)w[m++]=arguments[m];return process$1.nextTick(function(){S.apply(null,w)})}}return processNextickArgs.exports}var isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var _={}.toString;return isarray$1=Array.isArray||function(S){return _.call(S)=="[object Array]"},isarray$1}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}var safeBuffer$1={exports:{}},hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,(function(_,S){var I=requireDist(),p=I.Buffer;function R(w,m){for(var v in w)m[v]=w[v]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?_.exports=I:(R(I,S),S.Buffer=f);function f(w,m,v){return p(w,m,v)}R(p,f),f.from=function(w,m,v){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,m,v)},f.alloc=function(w,m,v){if(typeof w!="number")throw new TypeError("Argument must be a number");var y=p(w);return m!==void 0?typeof v=="string"?y.fill(m,v):y.fill(m):y.fill(0),y},f.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},f.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(w)}})(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1;function _(A){return Array.isArray?Array.isArray(A):B(A)==="[object Array]"}util.isArray=_;function S(A){return typeof A=="boolean"}util.isBoolean=S;function I(A){return A===null}util.isNull=I;function p(A){return A==null}util.isNullOrUndefined=p;function R(A){return typeof A=="number"}util.isNumber=R;function f(A){return typeof A=="string"}util.isString=f;function w(A){return typeof A=="symbol"}util.isSymbol=w;function m(A){return A===void 0}util.isUndefined=m;function v(A){return B(A)==="[object RegExp]"}util.isRegExp=v;function y(A){return typeof A=="object"&&A!==null}util.isObject=y;function d(A){return B(A)==="[object Date]"}util.isDate=d;function g(A){return B(A)==="[object Error]"||A instanceof Error}util.isError=g;function M(A){return typeof A=="function"}util.isFunction=M;function x(A){return A===null||typeof A=="boolean"||typeof A=="number"||typeof A=="string"||typeof A=="symbol"||typeof A>"u"}util.isPrimitive=x,util.isBuffer=requireDist().Buffer.isBuffer;function B(A){return Object.prototype.toString.call(A)}return util}var BufferList$1={exports:{}},hasRequiredBufferList$1;function requireBufferList$1(){return hasRequiredBufferList$1||(hasRequiredBufferList$1=1,(function(_){function S(f,w){if(!(f instanceof w))throw new TypeError("Cannot call a class as a function")}var I=requireSafeBuffer$1().Buffer,p=requireUtil$1();function R(f,w,m){f.copy(w,m)}_.exports=(function(){function f(){S(this,f),this.head=null,this.tail=null,this.length=0}return f.prototype.push=function(m){var v={data:m,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length},f.prototype.unshift=function(m){var v={data:m,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length},f.prototype.shift=function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}},f.prototype.clear=function(){this.head=this.tail=null,this.length=0},f.prototype.join=function(m){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=m+v.data;return y},f.prototype.concat=function(m){if(this.length===0)return I.alloc(0);for(var v=I.allocUnsafe(m>>>0),y=this.head,d=0;y;)R(y.data,v,d),d+=y.data.length,y=y.next;return v},f})(),p&&p.inspect&&p.inspect.custom&&(_.exports.prototype[p.inspect.custom]=function(){var f=p.inspect({length:this.length});return this.constructor.name+" "+f})})(BufferList$1)),BufferList$1.exports}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;var _=requireProcessNextickArgs();function S(R,f){var w=this,m=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return m||v?(f?f(R):R&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_.nextTick(p,this,R)):_.nextTick(p,this,R)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(R||null,function(y){!f&&y?w._writableState?w._writableState.errorEmitted||(w._writableState.errorEmitted=!0,_.nextTick(p,w,y)):_.nextTick(p,w,y):f&&f(y)}),this)}function I(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(R,f){R.emit("error",f)}return destroy_1$1={destroy:S,undestroy:I},destroy_1$1}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1;var _=requireProcessNextickArgs();_stream_writable$1=A;function S(u){var l=this;this.next=null,this.entry=null,this.finish=function(){s(l,u)}}var I=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:_.nextTick,p;A.WritableState=x;var R=Object.create(requireUtil());R.inherits=requireInherits_browser();var f={deprecate:requireBrowser$a()},w=requireStreamBrowser$1(),m=requireSafeBuffer$1().Buffer,v=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function y(u){return m.from(u)}function d(u){return m.isBuffer(u)||u instanceof v}var g=requireDestroy$1();R.inherits(A,w);function M(){}function x(u,l){p=p||require_stream_duplex$1(),u=u||{};var o=l instanceof p;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,b=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=b,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var E=u.decodeStrings===!1;this.decodeStrings=!E,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){ne(l,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this)}x.prototype.getBuffer=function(){for(var l=this.bufferedRequest,o=[];l;)o.push(l),l=l.next;return o},(function(){try{Object.defineProperty(x.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(u){return B.call(this,u)?!0:this!==A?!1:u&&u._writableState instanceof x}})):B=function(u){return u instanceof this};function A(u){if(p=p||require_stream_duplex$1(),!B.call(A,this)&&!(this instanceof p))return new A(u);this._writableState=new x(u,this),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),w.call(this)}A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function D(u,l){var o=new Error("write after end");u.emit("error",o),_.nextTick(l,o)}function C(u,l,o,r){var h=!0,b=!1;return o===null?b=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!l.objectMode&&(b=new TypeError("Invalid non-string/buffer chunk")),b&&(u.emit("error",b),_.nextTick(r,b),h=!1),h}A.prototype.write=function(u,l,o){var r=this._writableState,h=!1,b=!r.objectMode&&d(u);return b&&!m.isBuffer(u)&&(u=y(u)),typeof l=="function"&&(o=l,l=null),b?l="buffer":l||(l=r.defaultEncoding),typeof o!="function"&&(o=M),r.ended?D(this,o):(b||C(this,r,u,o))&&(r.pendingcb++,h=H(this,r,b,u,l,o)),h},A.prototype.cork=function(){var u=this._writableState;u.corked++},A.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&le(this,u))},A.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this};function $(u,l,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof l=="string"&&(l=m.from(l,o)),l}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(u,l,o,r,h,b){if(!o){var E=$(l,r,h);r!==E&&(o=!0,h="buffer",r=E)}var L=l.objectMode?1:r.length;l.length+=L;var Y=l.length<l.highWaterMark;if(Y||(l.needDrain=!0),l.writing||l.corked){var K=l.lastBufferedRequest;l.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:b,next:null},K?K.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else N(u,l,!1,L,r,h,b);return Y}function N(u,l,o,r,h,b,E){l.writelen=r,l.writecb=E,l.writing=!0,l.sync=!0,o?u._writev(h,l.onwrite):u._write(h,b,l.onwrite),l.sync=!1}function V(u,l,o,r,h){--l.pendingcb,o?(_.nextTick(h,r),_.nextTick(n,u,l),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,l))}function Q(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function ne(u,l){var o=u._writableState,r=o.sync,h=o.writecb;if(Q(o),l)V(u,o,r,l,h);else{var b=c(o);!b&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&le(u,o),r?I(ae,u,o,b,h):ae(u,o,b,h)}}function ae(u,l,o,r){o||ee(u,l),l.pendingcb--,r(),n(u,l)}function ee(u,l){l.length===0&&l.needDrain&&(l.needDrain=!1,u.emit("drain"))}function le(u,l){l.bufferProcessing=!0;var o=l.bufferedRequest;if(u._writev&&o&&o.next){var r=l.bufferedRequestCount,h=new Array(r),b=l.corkedRequestsFree;b.entry=o;for(var E=0,L=!0;o;)h[E]=o,o.isBuf||(L=!1),o=o.next,E+=1;h.allBuffers=L,N(u,l,!0,l.length,h,"",b.finish),l.pendingcb++,l.lastBufferedRequest=null,b.next?(l.corkedRequestsFree=b.next,b.next=null):l.corkedRequestsFree=new S(l),l.bufferedRequestCount=0}else{for(;o;){var Y=o.chunk,K=o.encoding,q=o.callback,P=l.objectMode?1:Y.length;if(N(u,l,!1,P,Y,K,q),o=o.next,l.bufferedRequestCount--,l.writing)break}o===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=o,l.bufferProcessing=!1}A.prototype._write=function(u,l,o){o(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(u,l,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,l=null):typeof l=="function"&&(o=l,l=null),u!=null&&this.write(u,l),r.corked&&(r.corked=1,this.uncork()),r.ending||a(this,r,o)};function c(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,l){u._final(function(o){l.pendingcb--,o&&u.emit("error",o),l.prefinished=!0,u.emit("prefinish"),n(u,l)})}function t(u,l){!l.prefinished&&!l.finalCalled&&(typeof u._final=="function"?(l.pendingcb++,l.finalCalled=!0,_.nextTick(e,u,l)):(l.prefinished=!0,u.emit("prefinish")))}function n(u,l){var o=c(l);return o&&(t(u,l),l.pendingcb===0&&(l.finished=!0,u.emit("finish"))),o}function a(u,l,o){l.ending=!0,n(u,l),o&&(l.finished?_.nextTick(o):u.once("finish",o)),l.ended=!0,u.writable=!1}function s(u,l,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;l.pendingcb--,h(o),r=r.next}l.corkedRequestsFree.next=u}return Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(u,l){this.end(),l(u)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var _=requireProcessNextickArgs(),S=Object.keys||function(g){var M=[];for(var x in g)M.push(x);return M};_stream_duplex$1=v;var I=Object.create(requireUtil());I.inherits=requireInherits_browser();var p=require_stream_readable$1(),R=require_stream_writable$1();I.inherits(v,p);for(var f=S(R.prototype),w=0;w<f.length;w++){var m=f[w];v.prototype[m]||(v.prototype[m]=R.prototype[m])}function v(g){if(!(this instanceof v))return new v(g);p.call(this,g),R.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",y)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function y(){this.allowHalfOpen||this._writableState.ended||_.nextTick(d,this)}function d(g){g.end()}return Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),v.prototype._destroy=function(g,M){this.push(null),this.end(),_.nextTick(M,g)},_stream_duplex$1}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1;var _=requireProcessNextickArgs();_stream_readable$1=$;var S=requireIsarray$1(),I;$.ReadableState=C,requireEvents().EventEmitter;var p=function(q,P){return q.listeners(P).length},R=requireStreamBrowser$1(),f=requireSafeBuffer$1().Buffer,w=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m(q){return f.from(q)}function v(q){return f.isBuffer(q)||q instanceof w}var y=Object.create(requireUtil());y.inherits=requireInherits_browser();var d=requireUtil$1(),g=void 0;d&&d.debuglog?g=d.debuglog("stream"):g=function(){};var M=requireBufferList$1(),x=requireDestroy$1(),B;y.inherits($,R);var A=["error","close","destroy","pause","resume"];function D(q,P,W){if(typeof q.prependListener=="function")return q.prependListener(P,W);!q._events||!q._events[P]?q.on(P,W):S(q._events[P])?q._events[P].unshift(W):q._events[P]=[W,q._events[P]]}function C(q,P){I=I||require_stream_duplex$1(),q=q||{};var W=P instanceof I;this.objectMode=!!q.objectMode,W&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var J=q.highWaterMark,X=q.readableHighWaterMark,U=this.objectMode?16:16*1024;J||J===0?this.highWaterMark=J:W&&(X||X===0)?this.highWaterMark=X:this.highWaterMark=U,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new M,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(B||(B=requireString_decoder().StringDecoder),this.decoder=new B(q.encoding),this.encoding=q.encoding)}function $(q){if(I=I||require_stream_duplex$1(),!(this instanceof $))return new $(q);this._readableState=new C(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),R.call(this)}Object.defineProperty($.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(q){this._readableState&&(this._readableState.destroyed=q)}}),$.prototype.destroy=x.destroy,$.prototype._undestroy=x.undestroy,$.prototype._destroy=function(q,P){this.push(null),P(q)},$.prototype.push=function(q,P){var W=this._readableState,J;return W.objectMode?J=!0:typeof q=="string"&&(P=P||W.defaultEncoding,P!==W.encoding&&(q=f.from(q,P),P=""),J=!0),H(this,q,P,!1,J)},$.prototype.unshift=function(q){return H(this,q,null,!0,!1)};function H(q,P,W,J,X){var U=q._readableState;if(P===null)U.reading=!1,le(q,U);else{var re;X||(re=V(U,P)),re?q.emit("error",re):U.objectMode||P&&P.length>0?(typeof P!="string"&&!U.objectMode&&Object.getPrototypeOf(P)!==f.prototype&&(P=m(P)),J?U.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):N(q,U,P,!0):U.ended?q.emit("error",new Error("stream.push() after EOF")):(U.reading=!1,U.decoder&&!W?(P=U.decoder.write(P),U.objectMode||P.length!==0?N(q,U,P,!1):t(q,U)):N(q,U,P,!1))):J||(U.reading=!1)}return Q(U)}function N(q,P,W,J){P.flowing&&P.length===0&&!P.sync?(q.emit("data",W),q.read(0)):(P.length+=P.objectMode?1:W.length,J?P.buffer.unshift(W):P.buffer.push(W),P.needReadable&&c(q)),t(q,P)}function V(q,P){var W;return!v(P)&&typeof P!="string"&&P!==void 0&&!q.objectMode&&(W=new TypeError("Invalid non-string/buffer chunk")),W}function Q(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}$.prototype.isPaused=function(){return this._readableState.flowing===!1},$.prototype.setEncoding=function(q){return B||(B=requireString_decoder().StringDecoder),this._readableState.decoder=new B(q),this._readableState.encoding=q,this};var ne=8388608;function ae(q){return q>=ne?q=ne:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function ee(q,P){return q<=0||P.length===0&&P.ended?0:P.objectMode?1:q!==q?P.flowing&&P.length?P.buffer.head.data.length:P.length:(q>P.highWaterMark&&(P.highWaterMark=ae(q)),q<=P.length?q:P.ended?P.length:(P.needReadable=!0,0))}$.prototype.read=function(q){g("read",q),q=parseInt(q,10);var P=this._readableState,W=q;if(q!==0&&(P.emittedReadable=!1),q===0&&P.needReadable&&(P.length>=P.highWaterMark||P.ended))return g("read: emitReadable",P.length,P.ended),P.length===0&&P.ended?L(this):c(this),null;if(q=ee(q,P),q===0&&P.ended)return P.length===0&&L(this),null;var J=P.needReadable;g("need readable",J),(P.length===0||P.length-q<P.highWaterMark)&&(J=!0,g("length less than watermark",J)),P.ended||P.reading?(J=!1,g("reading or ended",J)):J&&(g("do read"),P.reading=!0,P.sync=!0,P.length===0&&(P.needReadable=!0),this._read(P.highWaterMark),P.sync=!1,P.reading||(q=ee(W,P)));var X;return q>0?X=r(q,P):X=null,X===null?(P.needReadable=!0,q=0):P.length-=q,P.length===0&&(P.ended||(P.needReadable=!0),W!==q&&P.ended&&L(this)),X!==null&&this.emit("data",X),X};function le(q,P){if(!P.ended){if(P.decoder){var W=P.decoder.end();W&&W.length&&(P.buffer.push(W),P.length+=P.objectMode?1:W.length)}P.ended=!0,c(q)}}function c(q){var P=q._readableState;P.needReadable=!1,P.emittedReadable||(g("emitReadable",P.flowing),P.emittedReadable=!0,P.sync?_.nextTick(e,q):e(q))}function e(q){g("emit readable"),q.emit("readable"),o(q)}function t(q,P){P.readingMore||(P.readingMore=!0,_.nextTick(n,q,P))}function n(q,P){for(var W=P.length;!P.reading&&!P.flowing&&!P.ended&&P.length<P.highWaterMark&&(g("maybeReadMore read 0"),q.read(0),W!==P.length);)W=P.length;P.readingMore=!1}$.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},$.prototype.pipe=function(q,P){var W=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=q;break;case 1:J.pipes=[J.pipes,q];break;default:J.pipes.push(q);break}J.pipesCount+=1,g("pipe count=%d opts=%j",J.pipesCount,P);var X=(!P||P.end!==!1)&&q!==process$1.stdout&&q!==process$1.stderr,U=X?Ie:Ce;J.endEmitted?_.nextTick(U):W.once("end",U),q.on("unpipe",re);function re(pe,_e){g("onunpipe"),pe===W&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,$e())}function Ie(){g("onend"),q.end()}var ue=a(W);q.on("drain",ue);var he=!1;function $e(){g("cleanup"),q.removeListener("close",de),q.removeListener("finish",ye),q.removeListener("drain",ue),q.removeListener("error",De),q.removeListener("unpipe",re),W.removeListener("end",Ie),W.removeListener("end",Ce),W.removeListener("data",se),he=!0,J.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ue()}var me=!1;W.on("data",se);function se(pe){g("ondata"),me=!1;var _e=q.write(pe);_e===!1&&!me&&((J.pipesCount===1&&J.pipes===q||J.pipesCount>1&&K(J.pipes,q)!==-1)&&!he&&(g("false write response, pause",J.awaitDrain),J.awaitDrain++,me=!0),W.pause())}function De(pe){g("onerror",pe),Ce(),q.removeListener("error",De),p(q,"error")===0&&q.emit("error",pe)}D(q,"error",De);function de(){q.removeListener("finish",ye),Ce()}q.once("close",de);function ye(){g("onfinish"),q.removeListener("close",de),Ce()}q.once("finish",ye);function Ce(){g("unpipe"),W.unpipe(q)}return q.emit("pipe",W),J.flowing||(g("pipe resume"),W.resume()),q};function a(q){return function(){var P=q._readableState;g("pipeOnDrain",P.awaitDrain),P.awaitDrain&&P.awaitDrain--,P.awaitDrain===0&&p(q,"data")&&(P.flowing=!0,o(q))}}$.prototype.unpipe=function(q){var P=this._readableState,W={hasUnpiped:!1};if(P.pipesCount===0)return this;if(P.pipesCount===1)return q&&q!==P.pipes?this:(q||(q=P.pipes),P.pipes=null,P.pipesCount=0,P.flowing=!1,q&&q.emit("unpipe",this,W),this);if(!q){var J=P.pipes,X=P.pipesCount;P.pipes=null,P.pipesCount=0,P.flowing=!1;for(var U=0;U<X;U++)J[U].emit("unpipe",this,{hasUnpiped:!1});return this}var re=K(P.pipes,q);return re===-1?this:(P.pipes.splice(re,1),P.pipesCount-=1,P.pipesCount===1&&(P.pipes=P.pipes[0]),q.emit("unpipe",this,W),this)},$.prototype.on=function(q,P){var W=R.prototype.on.call(this,q,P);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var J=this._readableState;!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.emittedReadable=!1,J.reading?J.length&&c(this):_.nextTick(s,this))}return W},$.prototype.addListener=$.prototype.on;function s(q){g("readable nexttick read 0"),q.read(0)}$.prototype.resume=function(){var q=this._readableState;return q.flowing||(g("resume"),q.flowing=!0,u(this,q)),this};function u(q,P){P.resumeScheduled||(P.resumeScheduled=!0,_.nextTick(l,q,P))}function l(q,P){P.reading||(g("resume read 0"),q.read(0)),P.resumeScheduled=!1,P.awaitDrain=0,q.emit("resume"),o(q),P.flowing&&!P.reading&&q.read(0)}$.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(q){var P=q._readableState;for(g("flow",P.flowing);P.flowing&&q.read()!==null;);}$.prototype.wrap=function(q){var P=this,W=this._readableState,J=!1;q.on("end",function(){if(g("wrapped end"),W.decoder&&!W.ended){var re=W.decoder.end();re&&re.length&&P.push(re)}P.push(null)}),q.on("data",function(re){if(g("wrapped data"),W.decoder&&(re=W.decoder.write(re)),!(W.objectMode&&re==null)&&!(!W.objectMode&&(!re||!re.length))){var Ie=P.push(re);Ie||(J=!0,q.pause())}});for(var X in q)this[X]===void 0&&typeof q[X]=="function"&&(this[X]=(function(re){return function(){return q[re].apply(q,arguments)}})(X));for(var U=0;U<A.length;U++)q.on(A[U],this.emit.bind(this,A[U]));return this._read=function(re){g("wrapped _read",re),J&&(J=!1,q.resume())},this},Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),$._fromList=r;function r(q,P){if(P.length===0)return null;var W;return P.objectMode?W=P.buffer.shift():!q||q>=P.length?(P.decoder?W=P.buffer.join(""):P.buffer.length===1?W=P.buffer.head.data:W=P.buffer.concat(P.length),P.buffer.clear()):W=h(q,P.buffer,P.decoder),W}function h(q,P,W){var J;return q<P.head.data.length?(J=P.head.data.slice(0,q),P.head.data=P.head.data.slice(q)):q===P.head.data.length?J=P.shift():J=W?b(q,P):E(q,P),J}function b(q,P){var W=P.head,J=1,X=W.data;for(q-=X.length;W=W.next;){var U=W.data,re=q>U.length?U.length:q;if(re===U.length?X+=U:X+=U.slice(0,q),q-=re,q===0){re===U.length?(++J,W.next?P.head=W.next:P.head=P.tail=null):(P.head=W,W.data=U.slice(re));break}++J}return P.length-=J,X}function E(q,P){var W=f.allocUnsafe(q),J=P.head,X=1;for(J.data.copy(W),q-=J.data.length;J=J.next;){var U=J.data,re=q>U.length?U.length:q;if(U.copy(W,W.length-q,0,re),q-=re,q===0){re===U.length?(++X,J.next?P.head=J.next:P.head=P.tail=null):(P.head=J,J.data=U.slice(re));break}++X}return P.length-=X,W}function L(q){var P=q._readableState;if(P.length>0)throw new Error('"endReadable()" called on non-empty stream');P.endEmitted||(P.ended=!0,_.nextTick(Y,P,q))}function Y(q,P){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,P.readable=!1,P.emit("end"))}function K(q,P){for(var W=0,J=q.length;W<J;W++)if(q[W]===P)return W;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=p;var _=require_stream_duplex$1(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(p,_);function I(w,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(!y)return this.emit("error",new Error("write callback called multiple times"));v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(w);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function p(w){if(!(this instanceof p))return new p(w);_.call(this,w),this._transformState={afterTransform:I.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",R)}function R(){var w=this;typeof this._flush=="function"?this._flush(function(m,v){f(w,m,v)}):f(this,null,null)}p.prototype.push=function(w,m){return this._transformState.needTransform=!1,_.prototype.push.call(this,w,m)},p.prototype._transform=function(w,m,v){throw new Error("_transform() is not implemented")},p.prototype._write=function(w,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=w,y.writeencoding=m,!y.transforming){var d=this._readableState;(y.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},p.prototype._read=function(w){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},p.prototype._destroy=function(w,m){var v=this;_.prototype._destroy.call(this,w,function(y){m(y),v.emit("close")})};function f(w,m,v){if(m)return w.emit("error",m);if(v!=null&&w.push(v),w._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(w._transformState.transforming)throw new Error("Calling transform done when still transforming");return w.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=I;var _=require_stream_transform$1(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(I,_);function I(p){if(!(this instanceof I))return new I(p);_.call(this,p)}return I.prototype._transform=function(p,R,f){f(null,p)},_stream_passthrough$1}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,(function(_,S){S=_.exports=require_stream_readable$1(),S.Stream=S,S.Readable=S,S.Writable=require_stream_writable$1(),S.Duplex=require_stream_duplex$1(),S.Transform=require_stream_transform$1(),S.PassThrough=require_stream_passthrough$1()})(readableBrowser$1,readableBrowser$1.exports)),readableBrowser$1.exports}var hashBase,hasRequiredHashBase;function requireHashBase(){if(hasRequiredHashBase)return hashBase;hasRequiredHashBase=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$1(),I=requireReadableBrowser$1().Transform,p=requireInherits_browser();function R(f){I.call(this),this._block=_.allocUnsafe(f),this._blockSize=f,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return p(R,I),R.prototype._transform=function(f,w,m){var v=null;try{this.update(f,w)}catch(y){v=y}m(v)},R.prototype._flush=function(f){var w=null;try{this.push(this.digest())}catch(m){w=m}f(w)},R.prototype.update=function(f,w){if(this._finalized)throw new Error("Digest already called");for(var m=S(f,w),v=this._block,y=0;this._blockOffset+m.length-y>=this._blockSize;){for(var d=this._blockOffset;d<this._blockSize;)v[d]=m[y],d+=1,y+=1;this._update(),this._blockOffset=0}for(;y<m.length;)v[this._blockOffset]=m[y],this._blockOffset+=1,y+=1;for(var g=0,M=m.length*8;M>0;++g)this._length[g]+=M,M=this._length[g]/4294967296|0,M>0&&(this._length[g]-=4294967296*M);return this},R.prototype._update=function(){throw new Error("_update is not implemented")},R.prototype.digest=function(f){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var w=this._digest();f!==void 0&&(w=w.toString(f)),this._block.fill(0),this._blockOffset=0;for(var m=0;m<4;++m)this._length[m]=0;return w},R.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase=R,hashBase}var ripemd160,hasRequiredRipemd160;function requireRipemd160(){if(hasRequiredRipemd160)return ripemd160;hasRequiredRipemd160=1;var _=requireDist().Buffer,S=requireInherits_browser(),I=requireHashBase(),p=new Array(16),R=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],w=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],v=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];function d(C,$){return C<<$|C>>>32-$}function g(C,$,H,N,V,Q,ne,ae){return d(C+($^H^N)+Q+ne|0,ae)+V|0}function M(C,$,H,N,V,Q,ne,ae){return d(C+($&H|~$&N)+Q+ne|0,ae)+V|0}function x(C,$,H,N,V,Q,ne,ae){return d(C+(($|~H)^N)+Q+ne|0,ae)+V|0}function B(C,$,H,N,V,Q,ne,ae){return d(C+($&N|H&~N)+Q+ne|0,ae)+V|0}function A(C,$,H,N,V,Q,ne,ae){return d(C+($^(H|~N))+Q+ne|0,ae)+V|0}function D(){I.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}return S(D,I),D.prototype._update=function(){for(var C=p,$=0;$<16;++$)C[$]=this._block.readInt32LE($*4);for(var H=this._a|0,N=this._b|0,V=this._c|0,Q=this._d|0,ne=this._e|0,ae=this._a|0,ee=this._b|0,le=this._c|0,c=this._d|0,e=this._e|0,t=0;t<80;t+=1){var n,a;t<16?(n=g(H,N,V,Q,ne,C[R[t]],v[0],w[t]),a=A(ae,ee,le,c,e,C[f[t]],y[0],m[t])):t<32?(n=M(H,N,V,Q,ne,C[R[t]],v[1],w[t]),a=B(ae,ee,le,c,e,C[f[t]],y[1],m[t])):t<48?(n=x(H,N,V,Q,ne,C[R[t]],v[2],w[t]),a=x(ae,ee,le,c,e,C[f[t]],y[2],m[t])):t<64?(n=B(H,N,V,Q,ne,C[R[t]],v[3],w[t]),a=M(ae,ee,le,c,e,C[f[t]],y[3],m[t])):(n=A(H,N,V,Q,ne,C[R[t]],v[4],w[t]),a=g(ae,ee,le,c,e,C[f[t]],y[4],m[t])),H=ne,ne=Q,Q=d(V,10),V=N,N=n,ae=e,e=c,c=d(le,10),le=ee,ee=a}var s=this._b+V+c|0;this._b=this._c+Q+e|0,this._c=this._d+ne+ae|0,this._d=this._e+H+ee|0,this._e=this._a+N+le|0,this._a=s},D.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var C=_.alloc?_.alloc(20):new _(20);return C.writeInt32LE(this._a,0),C.writeInt32LE(this._b,4),C.writeInt32LE(this._c,8),C.writeInt32LE(this._d,12),C.writeInt32LE(this._e,16),C},ripemd160=D,ripemd160}var sha_js={exports:{}},hash$1,hasRequiredHash$1;function requireHash$1(){if(hasRequiredHash$1)return hash$1;hasRequiredHash$1=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$2();function I(p,R){this._block=_.alloc(p),this._finalSize=R,this._blockSize=p,this._len=0}return I.prototype.update=function(p,R){p=S(p,R||"utf8");for(var f=this._block,w=this._blockSize,m=p.length,v=this._len,y=0;y<m;){for(var d=v%w,g=Math.min(m-y,w-d),M=0;M<g;M++)f[d+M]=p[y+M];v+=g,y+=g,v%w===0&&this._update(f)}return this._len+=m,this},I.prototype.digest=function(p){var R=this._len%this._blockSize;this._block[R]=128,this._block.fill(0,R+1),R>=this._finalSize&&(this._update(this._block),this._block.fill(0));var f=this._len*8;if(f<=4294967295)this._block.writeUInt32BE(f,this._blockSize-4);else{var w=(f&4294967295)>>>0,m=(f-w)/4294967296;this._block.writeUInt32BE(m,this._blockSize-8),this._block.writeUInt32BE(w,this._blockSize-4)}this._update(this._block);var v=this._hash();return p?v.toString(p):v},I.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$1=I,hash$1}var sha$1,hasRequiredSha$1;function requireSha$1(){if(hasRequiredSha$1)return sha$1;hasRequiredSha$1=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1518500249,1859775393,-1894007588,-899497514],R=new Array(80);function f(){this.init(),this._w=R,S.call(this,64,56)}_(f,S),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function w(y){return y<<5|y>>>27}function m(y){return y<<30|y>>>2}function v(y,d,g,M){return y===0?d&g|~d&M:y===2?d&g|d&M|g&M:d^g^M}return f.prototype._update=function(y){for(var d=this._w,g=this._a|0,M=this._b|0,x=this._c|0,B=this._d|0,A=this._e|0,D=0;D<16;++D)d[D]=y.readInt32BE(D*4);for(;D<80;++D)d[D]=d[D-3]^d[D-8]^d[D-14]^d[D-16];for(var C=0;C<80;++C){var $=~~(C/20),H=w(g)+v($,M,x,B)+A+d[C]+p[$]|0;A=B,B=x,x=m(M),M=g,g=H}this._a=g+this._a|0,this._b=M+this._b|0,this._c=x+this._c|0,this._d=B+this._d|0,this._e=A+this._e|0},f.prototype._hash=function(){var y=I.allocUnsafe(20);return y.writeInt32BE(this._a|0,0),y.writeInt32BE(this._b|0,4),y.writeInt32BE(this._c|0,8),y.writeInt32BE(this._d|0,12),y.writeInt32BE(this._e|0,16),y},sha$1=f,sha$1}var sha1,hasRequiredSha1;function requireSha1(){if(hasRequiredSha1)return sha1;hasRequiredSha1=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1518500249,1859775393,-1894007588,-899497514],R=new Array(80);function f(){this.init(),this._w=R,S.call(this,64,56)}_(f,S),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function w(d){return d<<1|d>>>31}function m(d){return d<<5|d>>>27}function v(d){return d<<30|d>>>2}function y(d,g,M,x){return d===0?g&M|~g&x:d===2?g&M|g&x|M&x:g^M^x}return f.prototype._update=function(d){for(var g=this._w,M=this._a|0,x=this._b|0,B=this._c|0,A=this._d|0,D=this._e|0,C=0;C<16;++C)g[C]=d.readInt32BE(C*4);for(;C<80;++C)g[C]=w(g[C-3]^g[C-8]^g[C-14]^g[C-16]);for(var $=0;$<80;++$){var H=~~($/20),N=m(M)+y(H,x,B,A)+D+g[$]+p[H]|0;D=A,A=B,B=v(x),x=M,M=N}this._a=M+this._a|0,this._b=x+this._b|0,this._c=B+this._c|0,this._d=A+this._d|0,this._e=D+this._e|0},f.prototype._hash=function(){var d=I.allocUnsafe(20);return d.writeInt32BE(this._a|0,0),d.writeInt32BE(this._b|0,4),d.writeInt32BE(this._c|0,8),d.writeInt32BE(this._d|0,12),d.writeInt32BE(this._e|0,16),d},sha1=f,sha1}var sha256$1,hasRequiredSha256;function requireSha256(){if(hasRequiredSha256)return sha256$1;hasRequiredSha256=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[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],R=new Array(64);function f(){this.init(),this._w=R,S.call(this,64,56)}_(f,S),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function w(M,x,B){return B^M&(x^B)}function m(M,x,B){return M&x|B&(M|x)}function v(M){return(M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10)}function y(M){return(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7)}function d(M){return(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3}function g(M){return(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10}return f.prototype._update=function(M){for(var x=this._w,B=this._a|0,A=this._b|0,D=this._c|0,C=this._d|0,$=this._e|0,H=this._f|0,N=this._g|0,V=this._h|0,Q=0;Q<16;++Q)x[Q]=M.readInt32BE(Q*4);for(;Q<64;++Q)x[Q]=g(x[Q-2])+x[Q-7]+d(x[Q-15])+x[Q-16]|0;for(var ne=0;ne<64;++ne){var ae=V+y($)+w($,H,N)+p[ne]+x[ne]|0,ee=v(B)+m(B,A,D)|0;V=N,N=H,H=$,$=C+ae|0,C=D,D=A,A=B,B=ae+ee|0}this._a=B+this._a|0,this._b=A+this._b|0,this._c=D+this._c|0,this._d=C+this._d|0,this._e=$+this._e|0,this._f=H+this._f|0,this._g=N+this._g|0,this._h=V+this._h|0},f.prototype._hash=function(){var M=I.allocUnsafe(32);return M.writeInt32BE(this._a,0),M.writeInt32BE(this._b,4),M.writeInt32BE(this._c,8),M.writeInt32BE(this._d,12),M.writeInt32BE(this._e,16),M.writeInt32BE(this._f,20),M.writeInt32BE(this._g,24),M.writeInt32BE(this._h,28),M},sha256$1=f,sha256$1}var sha224$1,hasRequiredSha224;function requireSha224(){if(hasRequiredSha224)return sha224$1;hasRequiredSha224=1;var _=requireInherits_browser(),S=requireSha256(),I=requireHash$1(),p=requireSafeBuffer$2().Buffer,R=new Array(64);function f(){this.init(),this._w=R,I.call(this,64,56)}return _(f,S),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var w=p.allocUnsafe(28);return w.writeInt32BE(this._a,0),w.writeInt32BE(this._b,4),w.writeInt32BE(this._c,8),w.writeInt32BE(this._d,12),w.writeInt32BE(this._e,16),w.writeInt32BE(this._f,20),w.writeInt32BE(this._g,24),w},sha224$1=f,sha224$1}var sha512$1,hasRequiredSha512;function requireSha512(){if(hasRequiredSha512)return sha512$1;hasRequiredSha512=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],R=new Array(160);function f(){this.init(),this._w=R,S.call(this,128,112)}_(f,S),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function w(A,D,C){return C^A&(D^C)}function m(A,D,C){return A&D|C&(A|D)}function v(A,D){return(A>>>28|D<<4)^(D>>>2|A<<30)^(D>>>7|A<<25)}function y(A,D){return(A>>>14|D<<18)^(A>>>18|D<<14)^(D>>>9|A<<23)}function d(A,D){return(A>>>1|D<<31)^(A>>>8|D<<24)^A>>>7}function g(A,D){return(A>>>1|D<<31)^(A>>>8|D<<24)^(A>>>7|D<<25)}function M(A,D){return(A>>>19|D<<13)^(D>>>29|A<<3)^A>>>6}function x(A,D){return(A>>>19|D<<13)^(D>>>29|A<<3)^(A>>>6|D<<26)}function B(A,D){return A>>>0<D>>>0?1:0}return f.prototype._update=function(A){for(var D=this._w,C=this._ah|0,$=this._bh|0,H=this._ch|0,N=this._dh|0,V=this._eh|0,Q=this._fh|0,ne=this._gh|0,ae=this._hh|0,ee=this._al|0,le=this._bl|0,c=this._cl|0,e=this._dl|0,t=this._el|0,n=this._fl|0,a=this._gl|0,s=this._hl|0,u=0;u<32;u+=2)D[u]=A.readInt32BE(u*4),D[u+1]=A.readInt32BE(u*4+4);for(;u<160;u+=2){var l=D[u-30],o=D[u-30+1],r=d(l,o),h=g(o,l);l=D[u-4],o=D[u-4+1];var b=M(l,o),E=x(o,l),L=D[u-14],Y=D[u-14+1],K=D[u-32],q=D[u-32+1],P=h+Y|0,W=r+L+B(P,h)|0;P=P+E|0,W=W+b+B(P,E)|0,P=P+q|0,W=W+K+B(P,q)|0,D[u]=W,D[u+1]=P}for(var J=0;J<160;J+=2){W=D[J],P=D[J+1];var X=m(C,$,H),U=m(ee,le,c),re=v(C,ee),Ie=v(ee,C),ue=y(V,t),he=y(t,V),$e=p[J],me=p[J+1],se=w(V,Q,ne),De=w(t,n,a),de=s+he|0,ye=ae+ue+B(de,s)|0;de=de+De|0,ye=ye+se+B(de,De)|0,de=de+me|0,ye=ye+$e+B(de,me)|0,de=de+P|0,ye=ye+W+B(de,P)|0;var Ce=Ie+U|0,pe=re+X+B(Ce,Ie)|0;ae=ne,s=a,ne=Q,a=n,Q=V,n=t,t=e+de|0,V=N+ye+B(t,e)|0,N=H,e=c,H=$,c=le,$=C,le=ee,ee=de+Ce|0,C=ye+pe+B(ee,de)|0}this._al=this._al+ee|0,this._bl=this._bl+le|0,this._cl=this._cl+c|0,this._dl=this._dl+e|0,this._el=this._el+t|0,this._fl=this._fl+n|0,this._gl=this._gl+a|0,this._hl=this._hl+s|0,this._ah=this._ah+C+B(this._al,ee)|0,this._bh=this._bh+$+B(this._bl,le)|0,this._ch=this._ch+H+B(this._cl,c)|0,this._dh=this._dh+N+B(this._dl,e)|0,this._eh=this._eh+V+B(this._el,t)|0,this._fh=this._fh+Q+B(this._fl,n)|0,this._gh=this._gh+ne+B(this._gl,a)|0,this._hh=this._hh+ae+B(this._hl,s)|0},f.prototype._hash=function(){var A=I.allocUnsafe(64);function D(C,$,H){A.writeInt32BE(C,H),A.writeInt32BE($,H+4)}return D(this._ah,this._al,0),D(this._bh,this._bl,8),D(this._ch,this._cl,16),D(this._dh,this._dl,24),D(this._eh,this._el,32),D(this._fh,this._fl,40),D(this._gh,this._gl,48),D(this._hh,this._hl,56),A},sha512$1=f,sha512$1}var sha384$1,hasRequiredSha384;function requireSha384(){if(hasRequiredSha384)return sha384$1;hasRequiredSha384=1;var _=requireInherits_browser(),S=requireSha512(),I=requireHash$1(),p=requireSafeBuffer$2().Buffer,R=new Array(160);function f(){this.init(),this._w=R,I.call(this,128,112)}return _(f,S),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var w=p.allocUnsafe(48);function m(v,y,d){w.writeInt32BE(v,d),w.writeInt32BE(y,d+4)}return m(this._ah,this._al,0),m(this._bh,this._bl,8),m(this._ch,this._cl,16),m(this._dh,this._dl,24),m(this._eh,this._el,32),m(this._fh,this._fl,40),w},sha384$1=f,sha384$1}var hasRequiredSha_js;function requireSha_js(){return hasRequiredSha_js||(hasRequiredSha_js=1,(function(_){_.exports=function(I){var p=I.toLowerCase(),R=_.exports[p];if(!R)throw new Error(p+" is not supported (we accept pull requests)");return new R},_.exports.sha=requireSha$1(),_.exports.sha1=requireSha1(),_.exports.sha224=requireSha224(),_.exports.sha256=requireSha256(),_.exports.sha384=requireSha384(),_.exports.sha512=requireSha512()})(sha_js)),sha_js.exports}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var _=requireSafeBuffer$2().Buffer,S=requireStreamBrowserify().Transform,I=requireString_decoder().StringDecoder,p=requireInherits_browser(),R=requireToBuffer$2();function f(w){S.call(this),this.hashMode=typeof w=="string",this.hashMode?this[w]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}return p(f,S),f.prototype.update=function(w,m,v){var y=R(w,m),d=this._update(y);return this.hashMode?this:(v&&(d=this._toString(d,v)),d)},f.prototype.setAutoPadding=function(){},f.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},f.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},f.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},f.prototype._transform=function(w,m,v){var y;try{this.hashMode?this._update(w):this.push(this._update(w))}catch(d){y=d}finally{v(y)}},f.prototype._flush=function(w){var m;try{this.push(this.__final())}catch(v){m=v}w(m)},f.prototype._finalOrDigest=function(w){var m=this.__final()||_.alloc(0);return w&&(m=this._toString(m,w,!0)),m},f.prototype._toString=function(w,m,v){if(this._decoder||(this._decoder=new I(m),this._encoding=m),this._encoding!==m)throw new Error("can’t switch encodings");var y=this._decoder.write(w);return v&&(y+=this._decoder.end()),y},cipherBase=f,cipherBase}var browser$9,hasRequiredBrowser$9;function requireBrowser$9(){if(hasRequiredBrowser$9)return browser$9;hasRequiredBrowser$9=1;var _=requireInherits_browser(),S=requireMd5_js(),I=requireRipemd160(),p=requireSha_js(),R=requireCipherBase();function f(w){R.call(this,"digest"),this._hash=w}return _(f,R),f.prototype._update=function(w){this._hash.update(w)},f.prototype._final=function(){return this._hash.digest()},browser$9=function(m){return m=m.toLowerCase(),m==="md5"?new S:m==="rmd160"||m==="ripemd160"?new I:new f(p(m))},browser$9}var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var _=requireInherits_browser(),S=requireSafeBuffer$2().Buffer,I=requireCipherBase(),p=S.alloc(128),R=64;function f(w,m){I.call(this,"digest"),typeof m=="string"&&(m=S.from(m)),this._alg=w,this._key=m,m.length>R?m=w(m):m.length<R&&(m=S.concat([m,p],R));for(var v=this._ipad=S.allocUnsafe(R),y=this._opad=S.allocUnsafe(R),d=0;d<R;d++)v[d]=m[d]^54,y[d]=m[d]^92;this._hash=[v]}return _(f,I),f.prototype._update=function(w){this._hash.push(w)},f.prototype._final=function(){var w=this._alg(S.concat(this._hash));return this._alg(S.concat([this._opad,w]))},legacy=f,legacy}var md5,hasRequiredMd5;function requireMd5(){if(hasRequiredMd5)return md5;hasRequiredMd5=1;var _=requireMd5_js();return md5=function(S){return new _().update(S).digest()},md5}var browser$8,hasRequiredBrowser$8;function requireBrowser$8(){if(hasRequiredBrowser$8)return browser$8;hasRequiredBrowser$8=1;var _=requireInherits_browser(),S=requireLegacy(),I=requireCipherBase(),p=requireSafeBuffer$2().Buffer,R=requireMd5(),f=requireRipemd160(),w=requireSha_js(),m=p.alloc(128);function v(y,d){I.call(this,"digest"),typeof d=="string"&&(d=p.from(d));var g=y==="sha512"||y==="sha384"?128:64;if(this._alg=y,this._key=d,d.length>g){var M=y==="rmd160"?new f:w(y);d=M.update(d).digest()}else d.length<g&&(d=p.concat([d,m],g));for(var x=this._ipad=p.allocUnsafe(g),B=this._opad=p.allocUnsafe(g),A=0;A<g;A++)x[A]=d[A]^54,B[A]=d[A]^92;this._hash=y==="rmd160"?new f:w(y),this._hash.update(x)}return _(v,I),v.prototype._update=function(y){this._hash.update(y)},v.prototype._final=function(){var y=this._hash.digest(),d=this._alg==="rmd160"?new f:w(this._alg);return d.update(this._opad).update(y).digest()},browser$8=function(d,g){return d=d.toLowerCase(),d==="rmd160"||d==="ripemd160"?new v("rmd160",g):d==="md5"?new S(R,g):new v(d,g)},browser$8}const sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},sha256={sign:"ecdsa",hash:"sha256",id:""},sha224={sign:"ecdsa",hash:"sha224",id:""},sha384={sign:"ecdsa",hash:"sha384",id:""},sha512={sign:"ecdsa",hash:"sha512",id:""},DSA={sign:"dsa",hash:"sha1",id:""},ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},require$$6={sha224WithRSAEncryption,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256,sha224,sha384,sha512,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var algos,hasRequiredAlgos;function requireAlgos(){return hasRequiredAlgos||(hasRequiredAlgos=1,algos=require$$6),algos}var browser$7={},precondition,hasRequiredPrecondition;function requirePrecondition(){if(hasRequiredPrecondition)return precondition;hasRequiredPrecondition=1;var _=isFinite,S=Math.pow(2,30)-1;return precondition=function(I,p){if(typeof I!="number")throw new TypeError("Iterations not a number");if(I<0||!_(I))throw new TypeError("Bad iterations");if(typeof p!="number")throw new TypeError("Key length not a number");if(p<0||p>S||p!==p)throw new TypeError("Bad key length")},precondition}var defaultEncoding_1,hasRequiredDefaultEncoding;function requireDefaultEncoding(){if(hasRequiredDefaultEncoding)return defaultEncoding_1;hasRequiredDefaultEncoding=1;var _;if(commonjsGlobal.process&&commonjsGlobal.process.browser)_="utf-8";else if(commonjsGlobal.process&&commonjsGlobal.process.version){var S=parseInt(process$1.version.split(".")[0].slice(1),10);_=S>=6?"utf-8":"binary"}else _="utf-8";return defaultEncoding_1=_,defaultEncoding_1}var toBuffer_1,hasRequiredToBuffer;function requireToBuffer(){if(hasRequiredToBuffer)return toBuffer_1;hasRequiredToBuffer=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$2(),I=typeof Uint8Array<"u",p=I&&typeof ArrayBuffer<"u",R=p&&ArrayBuffer.isView;return toBuffer_1=function(f,w,m){if(typeof f=="string"||_.isBuffer(f)||I&&f instanceof Uint8Array||R&&R(f))return S(f,w);throw new TypeError(m+" must be a string, a Buffer, a Uint8Array, or a DataView")},toBuffer_1}var syncBrowser,hasRequiredSyncBrowser;function requireSyncBrowser(){if(hasRequiredSyncBrowser)return syncBrowser;hasRequiredSyncBrowser=1;var _=requireMd5(),S=requireRipemd160(),I=requireSha_js(),p=requireSafeBuffer$2().Buffer,R=requirePrecondition(),f=requireDefaultEncoding(),w=requireToBuffer(),m=p.alloc(128),v={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},y={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function d(B){return new S().update(B).digest()}function g(B){function A(D){return I(B).update(D).digest()}return B==="rmd160"||B==="ripemd160"?d:B==="md5"?_:A}function M(B,A,D){var C=g(B),$=B==="sha512"||B==="sha384"?128:64;A.length>$?A=C(A):A.length<$&&(A=p.concat([A,m],$));for(var H=p.allocUnsafe($+v[B]),N=p.allocUnsafe($+v[B]),V=0;V<$;V++)H[V]=A[V]^54,N[V]=A[V]^92;var Q=p.allocUnsafe($+D+4);H.copy(Q,0,0,$),this.ipad1=Q,this.ipad2=H,this.opad=N,this.alg=B,this.blocksize=$,this.hash=C,this.size=v[B]}M.prototype.run=function(B,A){B.copy(A,this.blocksize);var D=this.hash(A);return D.copy(this.opad,this.blocksize),this.hash(this.opad)};function x(B,A,D,C,$){R(D,C),B=w(B,f,"Password"),A=w(A,f,"Salt");var H=($||"sha1").toLowerCase(),N=y[H]||H,V=v[N];if(typeof V!="number"||!V)throw new TypeError("Digest algorithm not supported: "+$);var Q=new M(N,B,A.length),ne=p.allocUnsafe(C),ae=p.allocUnsafe(A.length+4);A.copy(ae,0,0,A.length);for(var ee=0,le=V,c=Math.ceil(C/le),e=1;e<=c;e++){ae.writeUInt32BE(e,A.length);for(var t=Q.run(ae,Q.ipad1),n=t,a=1;a<D;a++){n=Q.run(n,Q.ipad2);for(var s=0;s<le;s++)t[s]^=n[s]}t.copy(ne,ee),ee+=le}return ne}return syncBrowser=x,syncBrowser}var async,hasRequiredAsync;function requireAsync(){if(hasRequiredAsync)return async;hasRequiredAsync=1;var _=requireSafeBuffer$2().Buffer,S=requirePrecondition(),I=requireDefaultEncoding(),p=requireSyncBrowser(),R=requireToBuffer(),f,w=commonjsGlobal.crypto&&commonjsGlobal.crypto.subtle,m={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},v=[],y;function d(){return y||(commonjsGlobal.process&&commonjsGlobal.process.nextTick?y=commonjsGlobal.process.nextTick:commonjsGlobal.queueMicrotask?y=commonjsGlobal.queueMicrotask:commonjsGlobal.setImmediate?y=commonjsGlobal.setImmediate:y=commonjsGlobal.setTimeout,y)}function g(B,A,D,C,$){return w.importKey("raw",B,{name:"PBKDF2"},!1,["deriveBits"]).then(function(H){return w.deriveBits({name:"PBKDF2",salt:A,iterations:D,hash:{name:$}},H,C<<3)}).then(function(H){return _.from(H)})}function M(B){if(commonjsGlobal.process&&!commonjsGlobal.process.browser||!w||!w.importKey||!w.deriveBits)return Promise.resolve(!1);if(v[B]!==void 0)return v[B];f=f||_.alloc(8);var A=g(f,f,10,128,B).then(function(){return!0},function(){return!1});return v[B]=A,A}function x(B,A){B.then(function(D){d()(function(){A(null,D)})},function(D){d()(function(){A(D)})})}return async=function(B,A,D,C,$,H){if(typeof $=="function"&&(H=$,$=void 0),S(D,C),B=R(B,I,"Password"),A=R(A,I,"Salt"),typeof H!="function")throw new Error("No callback provided to pbkdf2");$=$||"sha1";var N=m[$.toLowerCase()];if(!N||typeof commonjsGlobal.Promise!="function"){d()(function(){var V;try{V=p(B,A,D,C,$)}catch(Q){H(Q);return}H(null,V)});return}x(M(N).then(function(V){return V?g(B,A,D,C,N):p(B,A,D,C,$)}),H)},async}var hasRequiredBrowser$7;function requireBrowser$7(){return hasRequiredBrowser$7||(hasRequiredBrowser$7=1,browser$7.pbkdf2=requireAsync(),browser$7.pbkdf2Sync=requireSyncBrowser()),browser$7}var browser$6={},des$1={},utils$3={},hasRequiredUtils$3;function requireUtils$3(){if(hasRequiredUtils$3)return utils$3;hasRequiredUtils$3=1,utils$3.readUInt32BE=function(R,f){var w=R[0+f]<<24|R[1+f]<<16|R[2+f]<<8|R[3+f];return w>>>0},utils$3.writeUInt32BE=function(R,f,w){R[0+w]=f>>>24,R[1+w]=f>>>16&255,R[2+w]=f>>>8&255,R[3+w]=f&255},utils$3.ip=function(R,f,w,m){for(var v=0,y=0,d=6;d>=0;d-=2){for(var g=0;g<=24;g+=8)v<<=1,v|=f>>>g+d&1;for(var g=0;g<=24;g+=8)v<<=1,v|=R>>>g+d&1}for(var d=6;d>=0;d-=2){for(var g=1;g<=25;g+=8)y<<=1,y|=f>>>g+d&1;for(var g=1;g<=25;g+=8)y<<=1,y|=R>>>g+d&1}w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.rip=function(R,f,w,m){for(var v=0,y=0,d=0;d<4;d++)for(var g=24;g>=0;g-=8)v<<=1,v|=f>>>g+d&1,v<<=1,v|=R>>>g+d&1;for(var d=4;d<8;d++)for(var g=24;g>=0;g-=8)y<<=1,y|=f>>>g+d&1,y<<=1,y|=R>>>g+d&1;w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.pc1=function(R,f,w,m){for(var v=0,y=0,d=7;d>=5;d--){for(var g=0;g<=24;g+=8)v<<=1,v|=f>>g+d&1;for(var g=0;g<=24;g+=8)v<<=1,v|=R>>g+d&1}for(var g=0;g<=24;g+=8)v<<=1,v|=f>>g+d&1;for(var d=1;d<=3;d++){for(var g=0;g<=24;g+=8)y<<=1,y|=f>>g+d&1;for(var g=0;g<=24;g+=8)y<<=1,y|=R>>g+d&1}for(var g=0;g<=24;g+=8)y<<=1,y|=R>>g+d&1;w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.r28shl=function(R,f){return R<<f&268435455|R>>>28-f};var _=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];utils$3.pc2=function(R,f,w,m){for(var v=0,y=0,d=_.length>>>1,g=0;g<d;g++)v<<=1,v|=R>>>_[g]&1;for(var g=d;g<_.length;g++)y<<=1,y|=f>>>_[g]&1;w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.expand=function(R,f,w){var m=0,v=0;m=(R&1)<<5|R>>>27;for(var y=23;y>=15;y-=4)m<<=6,m|=R>>>y&63;for(var y=11;y>=3;y-=4)v|=R>>>y&63,v<<=6;v|=(R&31)<<1|R>>>31,f[w+0]=m>>>0,f[w+1]=v>>>0};var S=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];utils$3.substitute=function(R,f){for(var w=0,m=0;m<4;m++){var v=R>>>18-m*6&63,y=S[m*64+v];w<<=4,w|=y}for(var m=0;m<4;m++){var v=f>>>18-m*6&63,y=S[256+m*64+v];w<<=4,w|=y}return w>>>0};var I=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return utils$3.permute=function(R){for(var f=0,w=0;w<I.length;w++)f<<=1,f|=R>>>I[w]&1;return f>>>0},utils$3.padSplit=function(R,f,w){for(var m=R.toString(2);m.length<f;)m="0"+m;for(var v=[],y=0;y<f;y+=w)v.push(m.slice(y,y+w));return v.join(" ")},utils$3}var minimalisticAssert,hasRequiredMinimalisticAssert;function requireMinimalisticAssert(){if(hasRequiredMinimalisticAssert)return minimalisticAssert;hasRequiredMinimalisticAssert=1,minimalisticAssert=_;function _(S,I){if(!S)throw new Error(I||"Assertion failed")}return _.equal=function(I,p,R){if(I!=p)throw new Error(R||"Assertion failed: "+I+" != "+p)},minimalisticAssert}var cipher,hasRequiredCipher;function requireCipher(){if(hasRequiredCipher)return cipher;hasRequiredCipher=1;var _=requireMinimalisticAssert();function S(I){this.options=I,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=I.padding!==!1}return cipher=S,S.prototype._init=function(){},S.prototype.update=function(p){return p.length===0?[]:this.type==="decrypt"?this._updateDecrypt(p):this._updateEncrypt(p)},S.prototype._buffer=function(p,R){for(var f=Math.min(this.buffer.length-this.bufferOff,p.length-R),w=0;w<f;w++)this.buffer[this.bufferOff+w]=p[R+w];return this.bufferOff+=f,f},S.prototype._flushBuffer=function(p,R){return this._update(this.buffer,0,p,R),this.bufferOff=0,this.blockSize},S.prototype._updateEncrypt=function(p){var R=0,f=0,w=(this.bufferOff+p.length)/this.blockSize|0,m=new Array(w*this.blockSize);this.bufferOff!==0&&(R+=this._buffer(p,R),this.bufferOff===this.buffer.length&&(f+=this._flushBuffer(m,f)));for(var v=p.length-(p.length-R)%this.blockSize;R<v;R+=this.blockSize)this._update(p,R,m,f),f+=this.blockSize;for(;R<p.length;R++,this.bufferOff++)this.buffer[this.bufferOff]=p[R];return m},S.prototype._updateDecrypt=function(p){for(var R=0,f=0,w=Math.ceil((this.bufferOff+p.length)/this.blockSize)-1,m=new Array(w*this.blockSize);w>0;w--)R+=this._buffer(p,R),f+=this._flushBuffer(m,f);return R+=this._buffer(p,R),m},S.prototype.final=function(p){var R;p&&(R=this.update(p));var f;return this.type==="encrypt"?f=this._finalEncrypt():f=this._finalDecrypt(),R?R.concat(f):f},S.prototype._pad=function(p,R){if(R===0)return!1;for(;R<p.length;)p[R++]=0;return!0},S.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var p=new Array(this.blockSize);return this._update(this.buffer,0,p,0),p},S.prototype._unpad=function(p){return p},S.prototype._finalDecrypt=function(){_.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var p=new Array(this.blockSize);return this._flushBuffer(p,0),this._unpad(p)},cipher}var des,hasRequiredDes$1;function requireDes$1(){if(hasRequiredDes$1)return des;hasRequiredDes$1=1;var _=requireMinimalisticAssert(),S=requireInherits_browser(),I=requireUtils$3(),p=requireCipher();function R(){this.tmp=new Array(2),this.keys=null}function f(m){p.call(this,m);var v=new R;this._desState=v,this.deriveKeys(v,m.key)}S(f,p),des=f,f.create=function(v){return new f(v)};var w=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return f.prototype.deriveKeys=function(v,y){v.keys=new Array(32),_.equal(y.length,this.blockSize,"Invalid key length");var d=I.readUInt32BE(y,0),g=I.readUInt32BE(y,4);I.pc1(d,g,v.tmp,0),d=v.tmp[0],g=v.tmp[1];for(var M=0;M<v.keys.length;M+=2){var x=w[M>>>1];d=I.r28shl(d,x),g=I.r28shl(g,x),I.pc2(d,g,v.keys,M)}},f.prototype._update=function(v,y,d,g){var M=this._desState,x=I.readUInt32BE(v,y),B=I.readUInt32BE(v,y+4);I.ip(x,B,M.tmp,0),x=M.tmp[0],B=M.tmp[1],this.type==="encrypt"?this._encrypt(M,x,B,M.tmp,0):this._decrypt(M,x,B,M.tmp,0),x=M.tmp[0],B=M.tmp[1],I.writeUInt32BE(d,x,g),I.writeUInt32BE(d,B,g+4)},f.prototype._pad=function(v,y){if(this.padding===!1)return!1;for(var d=v.length-y,g=y;g<v.length;g++)v[g]=d;return!0},f.prototype._unpad=function(v){if(this.padding===!1)return v;for(var y=v[v.length-1],d=v.length-y;d<v.length;d++)_.equal(v[d],y);return v.slice(0,v.length-y)},f.prototype._encrypt=function(v,y,d,g,M){for(var x=y,B=d,A=0;A<v.keys.length;A+=2){var D=v.keys[A],C=v.keys[A+1];I.expand(B,v.tmp,0),D^=v.tmp[0],C^=v.tmp[1];var $=I.substitute(D,C),H=I.permute($),N=B;B=(x^H)>>>0,x=N}I.rip(B,x,g,M)},f.prototype._decrypt=function(v,y,d,g,M){for(var x=d,B=y,A=v.keys.length-2;A>=0;A-=2){var D=v.keys[A],C=v.keys[A+1];I.expand(x,v.tmp,0),D^=v.tmp[0],C^=v.tmp[1];var $=I.substitute(D,C),H=I.permute($),N=x;x=(B^H)>>>0,B=N}I.rip(x,B,g,M)},des}var cbc$1={},hasRequiredCbc$1;function requireCbc$1(){if(hasRequiredCbc$1)return cbc$1;hasRequiredCbc$1=1;var _=requireMinimalisticAssert(),S=requireInherits_browser(),I={};function p(f){_.equal(f.length,8,"Invalid IV length"),this.iv=new Array(8);for(var w=0;w<this.iv.length;w++)this.iv[w]=f[w]}function R(f){function w(d){f.call(this,d),this._cbcInit()}S(w,f);for(var m=Object.keys(I),v=0;v<m.length;v++){var y=m[v];w.prototype[y]=I[y]}return w.create=function(g){return new w(g)},w}return cbc$1.instantiate=R,I._cbcInit=function(){var w=new p(this.options.iv);this._cbcState=w},I._update=function(w,m,v,y){var d=this._cbcState,g=this.constructor.super_.prototype,M=d.iv;if(this.type==="encrypt"){for(var x=0;x<this.blockSize;x++)M[x]^=w[m+x];g._update.call(this,M,0,v,y);for(var x=0;x<this.blockSize;x++)M[x]=v[y+x]}else{g._update.call(this,w,m,v,y);for(var x=0;x<this.blockSize;x++)v[y+x]^=M[x];for(var x=0;x<this.blockSize;x++)M[x]=w[m+x]}},cbc$1}var ede,hasRequiredEde;function requireEde(){if(hasRequiredEde)return ede;hasRequiredEde=1;var _=requireMinimalisticAssert(),S=requireInherits_browser(),I=requireCipher(),p=requireDes$1();function R(w,m){_.equal(m.length,24,"Invalid key length");var v=m.slice(0,8),y=m.slice(8,16),d=m.slice(16,24);w==="encrypt"?this.ciphers=[p.create({type:"encrypt",key:v}),p.create({type:"decrypt",key:y}),p.create({type:"encrypt",key:d})]:this.ciphers=[p.create({type:"decrypt",key:d}),p.create({type:"encrypt",key:y}),p.create({type:"decrypt",key:v})]}function f(w){I.call(this,w);var m=new R(this.type,this.options.key);this._edeState=m}return S(f,I),ede=f,f.create=function(m){return new f(m)},f.prototype._update=function(m,v,y,d){var g=this._edeState;g.ciphers[0]._update(m,v,y,d),g.ciphers[1]._update(y,d,y,d),g.ciphers[2]._update(y,d,y,d)},f.prototype._pad=p.prototype._pad,f.prototype._unpad=p.prototype._unpad,ede}var hasRequiredDes;function requireDes(){return hasRequiredDes||(hasRequiredDes=1,des$1.utils=requireUtils$3(),des$1.Cipher=requireCipher(),des$1.DES=requireDes$1(),des$1.CBC=requireCbc$1(),des$1.EDE=requireEde()),des$1}var browserifyDes,hasRequiredBrowserifyDes;function requireBrowserifyDes(){if(hasRequiredBrowserifyDes)return browserifyDes;hasRequiredBrowserifyDes=1;var _=requireCipherBase(),S=requireDes(),I=requireInherits_browser(),p=requireSafeBuffer$2().Buffer,R={"des-ede3-cbc":S.CBC.instantiate(S.EDE),"des-ede3":S.EDE,"des-ede-cbc":S.CBC.instantiate(S.EDE),"des-ede":S.EDE,"des-cbc":S.CBC.instantiate(S.DES),"des-ecb":S.DES};R.des=R["des-cbc"],R.des3=R["des-ede3-cbc"],browserifyDes=f,I(f,_);function f(w){_.call(this);var m=w.mode.toLowerCase(),v=R[m],y;w.decrypt?y="decrypt":y="encrypt";var d=w.key;p.isBuffer(d)||(d=p.from(d)),(m==="des-ede"||m==="des-ede-cbc")&&(d=p.concat([d,d.slice(0,8)]));var g=w.iv;p.isBuffer(g)||(g=p.from(g)),this._des=v.create({key:d,iv:g,type:y})}return f.prototype._update=function(w){return p.from(this._des.update(w))},f.prototype._final=function(){return p.from(this._des.final())},browserifyDes}var browser$5={},encrypter={},ecb={},hasRequiredEcb;function requireEcb(){return hasRequiredEcb||(hasRequiredEcb=1,ecb.encrypt=function(_,S){return _._cipher.encryptBlock(S)},ecb.decrypt=function(_,S){return _._cipher.decryptBlock(S)}),ecb}var cbc={},buffer$1={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup[45]=62;revLookup[95]=63;function getLens(_){var S=_.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=_.indexOf("=");I===-1&&(I=S);var p=I===S?0:4-I%4;return[I,p]}function byteLength(_){var S=getLens(_),I=S[0],p=S[1];return(I+p)*3/4-p}function _byteLength(_,S,I){return(S+I)*3/4-I}function toByteArray(_){var S,I=getLens(_),p=I[0],R=I[1],f=new Arr(_byteLength(_,p,R)),w=0,m=R>0?p-4:p,v;for(v=0;v<m;v+=4)S=revLookup[_.charCodeAt(v)]<<18|revLookup[_.charCodeAt(v+1)]<<12|revLookup[_.charCodeAt(v+2)]<<6|revLookup[_.charCodeAt(v+3)],f[w++]=S>>16&255,f[w++]=S>>8&255,f[w++]=S&255;return R===2&&(S=revLookup[_.charCodeAt(v)]<<2|revLookup[_.charCodeAt(v+1)]>>4,f[w++]=S&255),R===1&&(S=revLookup[_.charCodeAt(v)]<<10|revLookup[_.charCodeAt(v+1)]<<4|revLookup[_.charCodeAt(v+2)]>>2,f[w++]=S>>8&255,f[w++]=S&255),f}function tripletToBase64(_){return lookup[_>>18&63]+lookup[_>>12&63]+lookup[_>>6&63]+lookup[_&63]}function encodeChunk(_,S,I){for(var p,R=[],f=S;f<I;f+=3)p=(_[f]<<16&16711680)+(_[f+1]<<8&65280)+(_[f+2]&255),R.push(tripletToBase64(p));return R.join("")}function fromByteArray(_){for(var S,I=_.length,p=I%3,R=[],f=16383,w=0,m=I-p;w<m;w+=f)R.push(encodeChunk(_,w,w+f>m?m:w+f));return p===1?(S=_[I-1],R.push(lookup[S>>2]+lookup[S<<4&63]+"==")):p===2&&(S=(_[I-2]<<8)+_[I-1],R.push(lookup[S>>10]+lookup[S>>4&63]+lookup[S<<2&63]+"=")),R.join("")}var ieee754={};ieee754.read=function(_,S,I,p,R){var f,w,m=R*8-p-1,v=(1<<m)-1,y=v>>1,d=-7,g=I?R-1:0,M=I?-1:1,x=_[S+g];for(g+=M,f=x&(1<<-d)-1,x>>=-d,d+=m;d>0;f=f*256+_[S+g],g+=M,d-=8);for(w=f&(1<<-d)-1,f>>=-d,d+=p;d>0;w=w*256+_[S+g],g+=M,d-=8);if(f===0)f=1-y;else{if(f===v)return w?NaN:(x?-1:1)*(1/0);w=w+Math.pow(2,p),f=f-y}return(x?-1:1)*w*Math.pow(2,f-p)};ieee754.write=function(_,S,I,p,R,f){var w,m,v,y=f*8-R-1,d=(1<<y)-1,g=d>>1,M=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=p?0:f-1,B=p?1:-1,A=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(m=isNaN(S)?1:0,w=d):(w=Math.floor(Math.log(S)/Math.LN2),S*(v=Math.pow(2,-w))<1&&(w--,v*=2),w+g>=1?S+=M/v:S+=M*Math.pow(2,1-g),S*v>=2&&(w++,v/=2),w+g>=d?(m=0,w=d):w+g>=1?(m=(S*v-1)*Math.pow(2,R),w=w+g):(m=S*Math.pow(2,g-1)*Math.pow(2,R),w=0));R>=8;_[I+x]=m&255,x+=B,m/=256,R-=8);for(w=w<<R|m,y+=R;y>0;_[I+x]=w&255,x+=B,w/=256,y-=8);_[I+x-B]|=A*128};(function(_){const S=base64Js,I=ieee754,p=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;_.Buffer=d,_.SlowBuffer=V,_.INSPECT_MAX_BYTES=50;const R=2147483647;_.kMaxLength=R;const{Uint8Array:f,ArrayBuffer:w,SharedArrayBuffer:m}=globalThis;d.TYPED_ARRAY_SUPPORT=v(),!d.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 v(){try{const j=new f(1),k={foo:function(){return 42}};return Object.setPrototypeOf(k,f.prototype),Object.setPrototypeOf(j,k),j.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function y(j){if(j>R)throw new RangeError('The value "'+j+'" is invalid for option "size"');const k=new f(j);return Object.setPrototypeOf(k,d.prototype),k}function d(j,k,O){if(typeof j=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(j)}return g(j,k,O)}d.poolSize=8192;function g(j,k,O){if(typeof j=="string")return A(j,k);if(w.isView(j))return C(j);if(j==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j);if(_e(j,w)||j&&_e(j.buffer,w)||typeof m<"u"&&(_e(j,m)||j&&_e(j.buffer,m)))return $(j,k,O);if(typeof j=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=j.valueOf&&j.valueOf();if(G!=null&&G!==j)return d.from(G,k,O);const te=H(j);if(te)return te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof j[Symbol.toPrimitive]=="function")return d.from(j[Symbol.toPrimitive]("string"),k,O);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j)}d.from=function(j,k,O){return g(j,k,O)},Object.setPrototypeOf(d.prototype,f.prototype),Object.setPrototypeOf(d,f);function M(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function x(j,k,O){return M(j),j<=0?y(j):k!==void 0?typeof O=="string"?y(j).fill(k,O):y(j).fill(k):y(j)}d.alloc=function(j,k,O){return x(j,k,O)};function B(j){return M(j),y(j<0?0:N(j)|0)}d.allocUnsafe=function(j){return B(j)},d.allocUnsafeSlow=function(j){return B(j)};function A(j,k){if((typeof k!="string"||k==="")&&(k="utf8"),!d.isEncoding(k))throw new TypeError("Unknown encoding: "+k);const O=Q(j,k)|0;let G=y(O);const te=G.write(j,k);return te!==O&&(G=G.slice(0,te)),G}function D(j){const k=j.length<0?0:N(j.length)|0,O=y(k);for(let G=0;G<k;G+=1)O[G]=j[G]&255;return O}function C(j){if(_e(j,f)){const k=new f(j);return $(k.buffer,k.byteOffset,k.byteLength)}return D(j)}function $(j,k,O){if(k<0||j.byteLength<k)throw new RangeError('"offset" is outside of buffer bounds');if(j.byteLength<k+(O||0))throw new RangeError('"length" is outside of buffer bounds');let G;return k===void 0&&O===void 0?G=new f(j):O===void 0?G=new f(j,k):G=new f(j,k,O),Object.setPrototypeOf(G,d.prototype),G}function H(j){if(d.isBuffer(j)){const k=N(j.length)|0,O=y(k);return O.length===0||j.copy(O,0,0,k),O}if(j.length!==void 0)return typeof j.length!="number"||Ue(j.length)?y(0):D(j);if(j.type==="Buffer"&&Array.isArray(j.data))return D(j.data)}function N(j){if(j>=R)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R.toString(16)+" bytes");return j|0}function V(j){return+j!=j&&(j=0),d.alloc(+j)}d.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==d.prototype},d.compare=function(k,O){if(_e(k,f)&&(k=d.from(k,k.offset,k.byteLength)),_e(O,f)&&(O=d.from(O,O.offset,O.byteLength)),!d.isBuffer(k)||!d.isBuffer(O))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===O)return 0;let G=k.length,te=O.length;for(let ce=0,fe=Math.min(G,te);ce<fe;++ce)if(k[ce]!==O[ce]){G=k[ce],te=O[ce];break}return G<te?-1:te<G?1:0},d.isEncoding=function(k){switch(String(k).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}},d.concat=function(k,O){if(!Array.isArray(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return d.alloc(0);let G;if(O===void 0)for(O=0,G=0;G<k.length;++G)O+=k[G].length;const te=d.allocUnsafe(O);let ce=0;for(G=0;G<k.length;++G){let fe=k[G];if(_e(fe,f))ce+fe.length>te.length?(d.isBuffer(fe)||(fe=d.from(fe)),fe.copy(te,ce)):f.prototype.set.call(te,fe,ce);else if(d.isBuffer(fe))fe.copy(te,ce);else throw new TypeError('"list" argument must be an Array of Buffers');ce+=fe.length}return te};function Q(j,k){if(d.isBuffer(j))return j.length;if(w.isView(j)||_e(j,w))return j.byteLength;if(typeof j!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof j);const O=j.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&O===0)return 0;let te=!1;for(;;)switch(k){case"ascii":case"latin1":case"binary":return O;case"utf8":case"utf-8":return De(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O*2;case"hex":return O>>>1;case"base64":return Ce(j).length;default:if(te)return G?-1:De(j).length;k=(""+k).toLowerCase(),te=!0}}d.byteLength=Q;function ne(j,k,O){let G=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((O===void 0||O>this.length)&&(O=this.length),O<=0)||(O>>>=0,k>>>=0,O<=k))return"";for(j||(j="utf8");;)switch(j){case"hex":return b(this,k,O);case"utf8":case"utf-8":return u(this,k,O);case"ascii":return r(this,k,O);case"latin1":case"binary":return h(this,k,O);case"base64":return s(this,k,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,k,O);default:if(G)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),G=!0}}d.prototype._isBuffer=!0;function ae(j,k,O){const G=j[k];j[k]=j[O],j[O]=G}d.prototype.swap16=function(){const k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let O=0;O<k;O+=2)ae(this,O,O+1);return this},d.prototype.swap32=function(){const k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let O=0;O<k;O+=4)ae(this,O,O+3),ae(this,O+1,O+2);return this},d.prototype.swap64=function(){const k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let O=0;O<k;O+=8)ae(this,O,O+7),ae(this,O+1,O+6),ae(this,O+2,O+5),ae(this,O+3,O+4);return this},d.prototype.toString=function(){const k=this.length;return k===0?"":arguments.length===0?u(this,0,k):ne.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(k){if(!d.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:d.compare(this,k)===0},d.prototype.inspect=function(){let k="";const O=_.INSPECT_MAX_BYTES;return k=this.toString("hex",0,O).replace(/(.{2})/g,"$1 ").trim(),this.length>O&&(k+=" ... "),"<Buffer "+k+">"},p&&(d.prototype[p]=d.prototype.inspect),d.prototype.compare=function(k,O,G,te,ce){if(_e(k,f)&&(k=d.from(k,k.offset,k.byteLength)),!d.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(O===void 0&&(O=0),G===void 0&&(G=k?k.length:0),te===void 0&&(te=0),ce===void 0&&(ce=this.length),O<0||G>k.length||te<0||ce>this.length)throw new RangeError("out of range index");if(te>=ce&&O>=G)return 0;if(te>=ce)return-1;if(O>=G)return 1;if(O>>>=0,G>>>=0,te>>>=0,ce>>>=0,this===k)return 0;let fe=ce-te,we=G-O;const Ne=Math.min(fe,we),be=this.slice(te,ce),Se=k.slice(O,G);for(let Oe=0;Oe<Ne;++Oe)if(be[Oe]!==Se[Oe]){fe=be[Oe],we=Se[Oe];break}return fe<we?-1:we<fe?1:0};function ee(j,k,O,G,te){if(j.length===0)return-1;if(typeof O=="string"?(G=O,O=0):O>2147483647?O=2147483647:O<-2147483648&&(O=-2147483648),O=+O,Ue(O)&&(O=te?0:j.length-1),O<0&&(O=j.length+O),O>=j.length){if(te)return-1;O=j.length-1}else if(O<0)if(te)O=0;else return-1;if(typeof k=="string"&&(k=d.from(k,G)),d.isBuffer(k))return k.length===0?-1:le(j,k,O,G,te);if(typeof k=="number")return k=k&255,typeof f.prototype.indexOf=="function"?te?f.prototype.indexOf.call(j,k,O):f.prototype.lastIndexOf.call(j,k,O):le(j,[k],O,G,te);throw new TypeError("val must be string, number or Buffer")}function le(j,k,O,G,te){let ce=1,fe=j.length,we=k.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(j.length<2||k.length<2)return-1;ce=2,fe/=2,we/=2,O/=2}function Ne(Se,Oe){return ce===1?Se[Oe]:Se.readUInt16BE(Oe*ce)}let be;if(te){let Se=-1;for(be=O;be<fe;be++)if(Ne(j,be)===Ne(k,Se===-1?0:be-Se)){if(Se===-1&&(Se=be),be-Se+1===we)return Se*ce}else Se!==-1&&(be-=be-Se),Se=-1}else for(O+we>fe&&(O=fe-we),be=O;be>=0;be--){let Se=!0;for(let Oe=0;Oe<we;Oe++)if(Ne(j,be+Oe)!==Ne(k,Oe)){Se=!1;break}if(Se)return be}return-1}d.prototype.includes=function(k,O,G){return this.indexOf(k,O,G)!==-1},d.prototype.indexOf=function(k,O,G){return ee(this,k,O,G,!0)},d.prototype.lastIndexOf=function(k,O,G){return ee(this,k,O,G,!1)};function c(j,k,O,G){O=Number(O)||0;const te=j.length-O;G?(G=Number(G),G>te&&(G=te)):G=te;const ce=k.length;G>ce/2&&(G=ce/2);let fe;for(fe=0;fe<G;++fe){const we=parseInt(k.substr(fe*2,2),16);if(Ue(we))return fe;j[O+fe]=we}return fe}function e(j,k,O,G){return pe(De(k,j.length-O),j,O,G)}function t(j,k,O,G){return pe(de(k),j,O,G)}function n(j,k,O,G){return pe(Ce(k),j,O,G)}function a(j,k,O,G){return pe(ye(k,j.length-O),j,O,G)}d.prototype.write=function(k,O,G,te){if(O===void 0)te="utf8",G=this.length,O=0;else if(G===void 0&&typeof O=="string")te=O,G=this.length,O=0;else if(isFinite(O))O=O>>>0,isFinite(G)?(G=G>>>0,te===void 0&&(te="utf8")):(te=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ce=this.length-O;if((G===void 0||G>ce)&&(G=ce),k.length>0&&(G<0||O<0)||O>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");let fe=!1;for(;;)switch(te){case"hex":return c(this,k,O,G);case"utf8":case"utf-8":return e(this,k,O,G);case"ascii":case"latin1":case"binary":return t(this,k,O,G);case"base64":return n(this,k,O,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,k,O,G);default:if(fe)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),fe=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function s(j,k,O){return k===0&&O===j.length?S.fromByteArray(j):S.fromByteArray(j.slice(k,O))}function u(j,k,O){O=Math.min(j.length,O);const G=[];let te=k;for(;te<O;){const ce=j[te];let fe=null,we=ce>239?4:ce>223?3:ce>191?2:1;if(te+we<=O){let Ne,be,Se,Oe;switch(we){case 1:ce<128&&(fe=ce);break;case 2:Ne=j[te+1],(Ne&192)===128&&(Oe=(ce&31)<<6|Ne&63,Oe>127&&(fe=Oe));break;case 3:Ne=j[te+1],be=j[te+2],(Ne&192)===128&&(be&192)===128&&(Oe=(ce&15)<<12|(Ne&63)<<6|be&63,Oe>2047&&(Oe<55296||Oe>57343)&&(fe=Oe));break;case 4:Ne=j[te+1],be=j[te+2],Se=j[te+3],(Ne&192)===128&&(be&192)===128&&(Se&192)===128&&(Oe=(ce&15)<<18|(Ne&63)<<12|(be&63)<<6|Se&63,Oe>65535&&Oe<1114112&&(fe=Oe))}}fe===null?(fe=65533,we=1):fe>65535&&(fe-=65536,G.push(fe>>>10&1023|55296),fe=56320|fe&1023),G.push(fe),te+=we}return o(G)}const l=4096;function o(j){const k=j.length;if(k<=l)return String.fromCharCode.apply(String,j);let O="",G=0;for(;G<k;)O+=String.fromCharCode.apply(String,j.slice(G,G+=l));return O}function r(j,k,O){let G="";O=Math.min(j.length,O);for(let te=k;te<O;++te)G+=String.fromCharCode(j[te]&127);return G}function h(j,k,O){let G="";O=Math.min(j.length,O);for(let te=k;te<O;++te)G+=String.fromCharCode(j[te]);return G}function b(j,k,O){const G=j.length;(!k||k<0)&&(k=0),(!O||O<0||O>G)&&(O=G);let te="";for(let ce=k;ce<O;++ce)te+=xe[j[ce]];return te}function E(j,k,O){const G=j.slice(k,O);let te="";for(let ce=0;ce<G.length-1;ce+=2)te+=String.fromCharCode(G[ce]+G[ce+1]*256);return te}d.prototype.slice=function(k,O){const G=this.length;k=~~k,O=O===void 0?G:~~O,k<0?(k+=G,k<0&&(k=0)):k>G&&(k=G),O<0?(O+=G,O<0&&(O=0)):O>G&&(O=G),O<k&&(O=k);const te=this.subarray(k,O);return Object.setPrototypeOf(te,d.prototype),te};function L(j,k,O){if(j%1!==0||j<0)throw new RangeError("offset is not uint");if(j+k>O)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=this[k],ce=1,fe=0;for(;++fe<O&&(ce*=256);)te+=this[k+fe]*ce;return te},d.prototype.readUintBE=d.prototype.readUIntBE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=this[k+--O],ce=1;for(;O>0&&(ce*=256);)te+=this[k+--O]*ce;return te},d.prototype.readUint8=d.prototype.readUInt8=function(k,O){return k=k>>>0,O||L(k,1,this.length),this[k]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(k,O){return k=k>>>0,O||L(k,2,this.length),this[k]|this[k+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(k,O){return k=k>>>0,O||L(k,2,this.length),this[k]<<8|this[k+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(k,O){return k=k>>>0,O||L(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+this[k+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(k,O){return k=k>>>0,O||L(k,4,this.length),this[k]*16777216+(this[k+1]<<16|this[k+2]<<8|this[k+3])},d.prototype.readBigUInt64LE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&$e(k,this.length-8);const te=O+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24,ce=this[++k]+this[++k]*2**8+this[++k]*2**16+G*2**24;return BigInt(te)+(BigInt(ce)<<BigInt(32))}),d.prototype.readBigUInt64BE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&$e(k,this.length-8);const te=O*2**24+this[++k]*2**16+this[++k]*2**8+this[++k],ce=this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+G;return(BigInt(te)<<BigInt(32))+BigInt(ce)}),d.prototype.readIntLE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=this[k],ce=1,fe=0;for(;++fe<O&&(ce*=256);)te+=this[k+fe]*ce;return ce*=128,te>=ce&&(te-=Math.pow(2,8*O)),te},d.prototype.readIntBE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=O,ce=1,fe=this[k+--te];for(;te>0&&(ce*=256);)fe+=this[k+--te]*ce;return ce*=128,fe>=ce&&(fe-=Math.pow(2,8*O)),fe},d.prototype.readInt8=function(k,O){return k=k>>>0,O||L(k,1,this.length),this[k]&128?(255-this[k]+1)*-1:this[k]},d.prototype.readInt16LE=function(k,O){k=k>>>0,O||L(k,2,this.length);const G=this[k]|this[k+1]<<8;return G&32768?G|4294901760:G},d.prototype.readInt16BE=function(k,O){k=k>>>0,O||L(k,2,this.length);const G=this[k+1]|this[k]<<8;return G&32768?G|4294901760:G},d.prototype.readInt32LE=function(k,O){return k=k>>>0,O||L(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},d.prototype.readInt32BE=function(k,O){return k=k>>>0,O||L(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},d.prototype.readBigInt64LE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&$e(k,this.length-8);const te=this[k+4]+this[k+5]*2**8+this[k+6]*2**16+(G<<24);return(BigInt(te)<<BigInt(32))+BigInt(O+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24)}),d.prototype.readBigInt64BE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&$e(k,this.length-8);const te=(O<<24)+this[++k]*2**16+this[++k]*2**8+this[++k];return(BigInt(te)<<BigInt(32))+BigInt(this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+G)}),d.prototype.readFloatLE=function(k,O){return k=k>>>0,O||L(k,4,this.length),I.read(this,k,!0,23,4)},d.prototype.readFloatBE=function(k,O){return k=k>>>0,O||L(k,4,this.length),I.read(this,k,!1,23,4)},d.prototype.readDoubleLE=function(k,O){return k=k>>>0,O||L(k,8,this.length),I.read(this,k,!0,52,8)},d.prototype.readDoubleBE=function(k,O){return k=k>>>0,O||L(k,8,this.length),I.read(this,k,!1,52,8)};function Y(j,k,O,G,te,ce){if(!d.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>te||k<ce)throw new RangeError('"value" argument is out of bounds');if(O+G>j.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(k,O,G,te){if(k=+k,O=O>>>0,G=G>>>0,!te){const we=Math.pow(2,8*G)-1;Y(this,k,O,G,we,0)}let ce=1,fe=0;for(this[O]=k&255;++fe<G&&(ce*=256);)this[O+fe]=k/ce&255;return O+G},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(k,O,G,te){if(k=+k,O=O>>>0,G=G>>>0,!te){const we=Math.pow(2,8*G)-1;Y(this,k,O,G,we,0)}let ce=G-1,fe=1;for(this[O+ce]=k&255;--ce>=0&&(fe*=256);)this[O+ce]=k/fe&255;return O+G},d.prototype.writeUint8=d.prototype.writeUInt8=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,1,255,0),this[O]=k&255,O+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,65535,0),this[O]=k&255,this[O+1]=k>>>8,O+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,65535,0),this[O]=k>>>8,this[O+1]=k&255,O+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,4294967295,0),this[O+3]=k>>>24,this[O+2]=k>>>16,this[O+1]=k>>>8,this[O]=k&255,O+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,4294967295,0),this[O]=k>>>24,this[O+1]=k>>>16,this[O+2]=k>>>8,this[O+3]=k&255,O+4};function K(j,k,O,G,te){ue(k,G,te,j,O,7);let ce=Number(k&BigInt(4294967295));j[O++]=ce,ce=ce>>8,j[O++]=ce,ce=ce>>8,j[O++]=ce,ce=ce>>8,j[O++]=ce;let fe=Number(k>>BigInt(32)&BigInt(4294967295));return j[O++]=fe,fe=fe>>8,j[O++]=fe,fe=fe>>8,j[O++]=fe,fe=fe>>8,j[O++]=fe,O}function q(j,k,O,G,te){ue(k,G,te,j,O,7);let ce=Number(k&BigInt(4294967295));j[O+7]=ce,ce=ce>>8,j[O+6]=ce,ce=ce>>8,j[O+5]=ce,ce=ce>>8,j[O+4]=ce;let fe=Number(k>>BigInt(32)&BigInt(4294967295));return j[O+3]=fe,fe=fe>>8,j[O+2]=fe,fe=fe>>8,j[O+1]=fe,fe=fe>>8,j[O]=fe,O+8}d.prototype.writeBigUInt64LE=Ae(function(k,O=0){return K(this,k,O,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=Ae(function(k,O=0){return q(this,k,O,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(k,O,G,te){if(k=+k,O=O>>>0,!te){const Ne=Math.pow(2,8*G-1);Y(this,k,O,G,Ne-1,-Ne)}let ce=0,fe=1,we=0;for(this[O]=k&255;++ce<G&&(fe*=256);)k<0&&we===0&&this[O+ce-1]!==0&&(we=1),this[O+ce]=(k/fe>>0)-we&255;return O+G},d.prototype.writeIntBE=function(k,O,G,te){if(k=+k,O=O>>>0,!te){const Ne=Math.pow(2,8*G-1);Y(this,k,O,G,Ne-1,-Ne)}let ce=G-1,fe=1,we=0;for(this[O+ce]=k&255;--ce>=0&&(fe*=256);)k<0&&we===0&&this[O+ce+1]!==0&&(we=1),this[O+ce]=(k/fe>>0)-we&255;return O+G},d.prototype.writeInt8=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,1,127,-128),k<0&&(k=255+k+1),this[O]=k&255,O+1},d.prototype.writeInt16LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,32767,-32768),this[O]=k&255,this[O+1]=k>>>8,O+2},d.prototype.writeInt16BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,32767,-32768),this[O]=k>>>8,this[O+1]=k&255,O+2},d.prototype.writeInt32LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,2147483647,-2147483648),this[O]=k&255,this[O+1]=k>>>8,this[O+2]=k>>>16,this[O+3]=k>>>24,O+4},d.prototype.writeInt32BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[O]=k>>>24,this[O+1]=k>>>16,this[O+2]=k>>>8,this[O+3]=k&255,O+4},d.prototype.writeBigInt64LE=Ae(function(k,O=0){return K(this,k,O,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=Ae(function(k,O=0){return q(this,k,O,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function P(j,k,O,G,te,ce){if(O+G>j.length)throw new RangeError("Index out of range");if(O<0)throw new RangeError("Index out of range")}function W(j,k,O,G,te){return k=+k,O=O>>>0,te||P(j,k,O,4),I.write(j,k,O,G,23,4),O+4}d.prototype.writeFloatLE=function(k,O,G){return W(this,k,O,!0,G)},d.prototype.writeFloatBE=function(k,O,G){return W(this,k,O,!1,G)};function J(j,k,O,G,te){return k=+k,O=O>>>0,te||P(j,k,O,8),I.write(j,k,O,G,52,8),O+8}d.prototype.writeDoubleLE=function(k,O,G){return J(this,k,O,!0,G)},d.prototype.writeDoubleBE=function(k,O,G){return J(this,k,O,!1,G)},d.prototype.copy=function(k,O,G,te){if(!d.isBuffer(k))throw new TypeError("argument should be a Buffer");if(G||(G=0),!te&&te!==0&&(te=this.length),O>=k.length&&(O=k.length),O||(O=0),te>0&&te<G&&(te=G),te===G||k.length===0||this.length===0)return 0;if(O<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),k.length-O<te-G&&(te=k.length-O+G);const ce=te-G;return this===k&&typeof f.prototype.copyWithin=="function"?this.copyWithin(O,G,te):f.prototype.set.call(k,this.subarray(G,te),O),ce},d.prototype.fill=function(k,O,G,te){if(typeof k=="string"){if(typeof O=="string"?(te=O,O=0,G=this.length):typeof G=="string"&&(te=G,G=this.length),te!==void 0&&typeof te!="string")throw new TypeError("encoding must be a string");if(typeof te=="string"&&!d.isEncoding(te))throw new TypeError("Unknown encoding: "+te);if(k.length===1){const fe=k.charCodeAt(0);(te==="utf8"&&fe<128||te==="latin1")&&(k=fe)}}else typeof k=="number"?k=k&255:typeof k=="boolean"&&(k=Number(k));if(O<0||this.length<O||this.length<G)throw new RangeError("Out of range index");if(G<=O)return this;O=O>>>0,G=G===void 0?this.length:G>>>0,k||(k=0);let ce;if(typeof k=="number")for(ce=O;ce<G;++ce)this[ce]=k;else{const fe=d.isBuffer(k)?k:d.from(k,te),we=fe.length;if(we===0)throw new TypeError('The value "'+k+'" is invalid for argument "value"');for(ce=0;ce<G-O;++ce)this[ce+O]=fe[ce%we]}return this};const X={};function U(j,k,O){X[j]=class extends O{constructor(){super(),Object.defineProperty(this,"message",{value:k.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${j}]`,this.stack,delete this.name}get code(){return j}set code(te){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:te,writable:!0})}toString(){return`${this.name} [${j}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(j){return j?`${j} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(j,k){return`The "${j}" argument must be of type number. Received type ${typeof k}`},TypeError),U("ERR_OUT_OF_RANGE",function(j,k,O){let G=`The value of "${j}" is out of range.`,te=O;return Number.isInteger(O)&&Math.abs(O)>2**32?te=re(String(O)):typeof O=="bigint"&&(te=String(O),(O>BigInt(2)**BigInt(32)||O<-(BigInt(2)**BigInt(32)))&&(te=re(te)),te+="n"),G+=` It must be ${k}. Received ${te}`,G},RangeError);function re(j){let k="",O=j.length;const G=j[0]==="-"?1:0;for(;O>=G+4;O-=3)k=`_${j.slice(O-3,O)}${k}`;return`${j.slice(0,O)}${k}`}function Ie(j,k,O){he(k,"offset"),(j[k]===void 0||j[k+O]===void 0)&&$e(k,j.length-(O+1))}function ue(j,k,O,G,te,ce){if(j>O||j<k){const fe=typeof k=="bigint"?"n":"";let we;throw k===0||k===BigInt(0)?we=`>= 0${fe} and < 2${fe} ** ${(ce+1)*8}${fe}`:we=`>= -(2${fe} ** ${(ce+1)*8-1}${fe}) and < 2 ** ${(ce+1)*8-1}${fe}`,new X.ERR_OUT_OF_RANGE("value",we,j)}Ie(G,te,ce)}function he(j,k){if(typeof j!="number")throw new X.ERR_INVALID_ARG_TYPE(k,"number",j)}function $e(j,k,O){throw Math.floor(j)!==j?(he(j,O),new X.ERR_OUT_OF_RANGE("offset","an integer",j)):k<0?new X.ERR_BUFFER_OUT_OF_BOUNDS:new X.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${k}`,j)}const me=/[^+/0-9A-Za-z-_]/g;function se(j){if(j=j.split("=")[0],j=j.trim().replace(me,""),j.length<2)return"";for(;j.length%4!==0;)j=j+"=";return j}function De(j,k){k=k||1/0;let O;const G=j.length;let te=null;const ce=[];for(let fe=0;fe<G;++fe){if(O=j.charCodeAt(fe),O>55295&&O<57344){if(!te){if(O>56319){(k-=3)>-1&&ce.push(239,191,189);continue}else if(fe+1===G){(k-=3)>-1&&ce.push(239,191,189);continue}te=O;continue}if(O<56320){(k-=3)>-1&&ce.push(239,191,189),te=O;continue}O=(te-55296<<10|O-56320)+65536}else te&&(k-=3)>-1&&ce.push(239,191,189);if(te=null,O<128){if((k-=1)<0)break;ce.push(O)}else if(O<2048){if((k-=2)<0)break;ce.push(O>>6|192,O&63|128)}else if(O<65536){if((k-=3)<0)break;ce.push(O>>12|224,O>>6&63|128,O&63|128)}else if(O<1114112){if((k-=4)<0)break;ce.push(O>>18|240,O>>12&63|128,O>>6&63|128,O&63|128)}else throw new Error("Invalid code point")}return ce}function de(j){const k=[];for(let O=0;O<j.length;++O)k.push(j.charCodeAt(O)&255);return k}function ye(j,k){let O,G,te;const ce=[];for(let fe=0;fe<j.length&&!((k-=2)<0);++fe)O=j.charCodeAt(fe),G=O>>8,te=O%256,ce.push(te),ce.push(G);return ce}function Ce(j){return S.toByteArray(se(j))}function pe(j,k,O,G){let te;for(te=0;te<G&&!(te+O>=k.length||te>=j.length);++te)k[te+O]=j[te];return te}function _e(j,k){return j instanceof k||j!=null&&j.constructor!=null&&j.constructor.name!=null&&j.constructor.name===k.name}function Ue(j){return j!==j}const xe=(function(){const j="0123456789abcdef",k=new Array(256);for(let O=0;O<16;++O){const G=O*16;for(let te=0;te<16;++te)k[G+te]=j[O]+j[te]}return k})();function Ae(j){return typeof BigInt>"u"?je:j}function je(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer=buffer$1.Buffer;var bufferXor,hasRequiredBufferXor;function requireBufferXor(){return hasRequiredBufferXor||(hasRequiredBufferXor=1,bufferXor=function(S,I){for(var p=Math.min(S.length,I.length),R=new Buffer(p),f=0;f<p;++f)R[f]=S[f]^I[f];return R}),bufferXor}var hasRequiredCbc;function requireCbc(){if(hasRequiredCbc)return cbc;hasRequiredCbc=1;var _=requireBufferXor();return cbc.encrypt=function(S,I){var p=_(I,S._prev);return S._prev=S._cipher.encryptBlock(p),S._prev},cbc.decrypt=function(S,I){var p=S._prev;S._prev=I;var R=S._cipher.decryptBlock(I);return _(R,p)},cbc}var cfb={},hasRequiredCfb;function requireCfb(){if(hasRequiredCfb)return cfb;hasRequiredCfb=1;var _=requireSafeBuffer$2().Buffer,S=requireBufferXor();function I(p,R,f){var w=R.length,m=S(R,p._cache);return p._cache=p._cache.slice(w),p._prev=_.concat([p._prev,f?R:m]),m}return cfb.encrypt=function(p,R,f){for(var w=_.allocUnsafe(0),m;R.length;)if(p._cache.length===0&&(p._cache=p._cipher.encryptBlock(p._prev),p._prev=_.allocUnsafe(0)),p._cache.length<=R.length)m=p._cache.length,w=_.concat([w,I(p,R.slice(0,m),f)]),R=R.slice(m);else{w=_.concat([w,I(p,R,f)]);break}return w},cfb}var cfb8={},hasRequiredCfb8;function requireCfb8(){if(hasRequiredCfb8)return cfb8;hasRequiredCfb8=1;var _=requireSafeBuffer$2().Buffer;function S(I,p,R){var f=I._cipher.encryptBlock(I._prev),w=f[0]^p;return I._prev=_.concat([I._prev.slice(1),_.from([R?p:w])]),w}return cfb8.encrypt=function(I,p,R){for(var f=p.length,w=_.allocUnsafe(f),m=-1;++m<f;)w[m]=S(I,p[m],R);return w},cfb8}var cfb1={},hasRequiredCfb1;function requireCfb1(){if(hasRequiredCfb1)return cfb1;hasRequiredCfb1=1;var _=requireSafeBuffer$2().Buffer;function S(p,R,f){for(var w,m=-1,v=8,y=0,d,g;++m<v;)w=p._cipher.encryptBlock(p._prev),d=R&1<<7-m?128:0,g=w[0]^d,y+=(g&128)>>m%8,p._prev=I(p._prev,f?d:g);return y}function I(p,R){var f=p.length,w=-1,m=_.allocUnsafe(p.length);for(p=_.concat([p,_.from([R])]);++w<f;)m[w]=p[w]<<1|p[w+1]>>7;return m}return cfb1.encrypt=function(p,R,f){for(var w=R.length,m=_.allocUnsafe(w),v=-1;++v<w;)m[v]=S(p,R[v],f);return m},cfb1}var ofb={},hasRequiredOfb;function requireOfb(){if(hasRequiredOfb)return ofb;hasRequiredOfb=1;var _=requireBufferXor();function S(I){return I._prev=I._cipher.encryptBlock(I._prev),I._prev}return ofb.encrypt=function(I,p){for(;I._cache.length<p.length;)I._cache=Buffer.concat([I._cache,S(I)]);var R=I._cache.slice(0,p.length);return I._cache=I._cache.slice(p.length),_(p,R)},ofb}var ctr={},incr32_1,hasRequiredIncr32;function requireIncr32(){if(hasRequiredIncr32)return incr32_1;hasRequiredIncr32=1;function _(S){for(var I=S.length,p;I--;)if(p=S.readUInt8(I),p===255)S.writeUInt8(0,I);else{p++,S.writeUInt8(p,I);break}}return incr32_1=_,incr32_1}var hasRequiredCtr;function requireCtr(){if(hasRequiredCtr)return ctr;hasRequiredCtr=1;var _=requireBufferXor(),S=requireSafeBuffer$2().Buffer,I=requireIncr32();function p(f){var w=f._cipher.encryptBlockRaw(f._prev);return I(f._prev),w}var R=16;return ctr.encrypt=function(f,w){var m=Math.ceil(w.length/R),v=f._cache.length;f._cache=S.concat([f._cache,S.allocUnsafe(m*R)]);for(var y=0;y<m;y++){var d=p(f),g=v+y*R;f._cache.writeUInt32BE(d[0],g+0),f._cache.writeUInt32BE(d[1],g+4),f._cache.writeUInt32BE(d[2],g+8),f._cache.writeUInt32BE(d[3],g+12)}var M=f._cache.slice(0,w.length);return f._cache=f._cache.slice(w.length),_(w,M)},ctr}const aes128={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},require$$2={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128,aes192,aes256,"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}};var modes_1,hasRequiredModes$1;function requireModes$1(){if(hasRequiredModes$1)return modes_1;hasRequiredModes$1=1;var _={ECB:requireEcb(),CBC:requireCbc(),CFB:requireCfb(),CFB8:requireCfb8(),CFB1:requireCfb1(),OFB:requireOfb(),CTR:requireCtr(),GCM:requireCtr()},S=require$$2;for(var I in S)S[I].module=_[S[I].mode];return modes_1=S,modes_1}var aes={},hasRequiredAes;function requireAes(){if(hasRequiredAes)return aes;hasRequiredAes=1;var _=requireSafeBuffer$2().Buffer;function S(m){_.isBuffer(m)||(m=_.from(m));for(var v=m.length/4|0,y=new Array(v),d=0;d<v;d++)y[d]=m.readUInt32BE(d*4);return y}function I(m){for(var v=0;v<m.length;m++)m[v]=0}function p(m,v,y,d,g){for(var M=y[0],x=y[1],B=y[2],A=y[3],D=m[0]^v[0],C=m[1]^v[1],$=m[2]^v[2],H=m[3]^v[3],N,V,Q,ne,ae=4,ee=1;ee<g;ee++)N=M[D>>>24]^x[C>>>16&255]^B[$>>>8&255]^A[H&255]^v[ae++],V=M[C>>>24]^x[$>>>16&255]^B[H>>>8&255]^A[D&255]^v[ae++],Q=M[$>>>24]^x[H>>>16&255]^B[D>>>8&255]^A[C&255]^v[ae++],ne=M[H>>>24]^x[D>>>16&255]^B[C>>>8&255]^A[$&255]^v[ae++],D=N,C=V,$=Q,H=ne;return N=(d[D>>>24]<<24|d[C>>>16&255]<<16|d[$>>>8&255]<<8|d[H&255])^v[ae++],V=(d[C>>>24]<<24|d[$>>>16&255]<<16|d[H>>>8&255]<<8|d[D&255])^v[ae++],Q=(d[$>>>24]<<24|d[H>>>16&255]<<16|d[D>>>8&255]<<8|d[C&255])^v[ae++],ne=(d[H>>>24]<<24|d[D>>>16&255]<<16|d[C>>>8&255]<<8|d[$&255])^v[ae++],N=N>>>0,V=V>>>0,Q=Q>>>0,ne=ne>>>0,[N,V,Q,ne]}var R=[0,1,2,4,8,16,32,64,128,27,54],f=(function(){for(var m=new Array(256),v=0;v<256;v++)v<128?m[v]=v<<1:m[v]=v<<1^283;for(var y=[],d=[],g=[[],[],[],[]],M=[[],[],[],[]],x=0,B=0,A=0;A<256;++A){var D=B^B<<1^B<<2^B<<3^B<<4;D=D>>>8^D&255^99,y[x]=D,d[D]=x;var C=m[x],$=m[C],H=m[$],N=m[D]*257^D*16843008;g[0][x]=N<<24|N>>>8,g[1][x]=N<<16|N>>>16,g[2][x]=N<<8|N>>>24,g[3][x]=N,N=H*16843009^$*65537^C*257^x*16843008,M[0][D]=N<<24|N>>>8,M[1][D]=N<<16|N>>>16,M[2][D]=N<<8|N>>>24,M[3][D]=N,x===0?x=B=1:(x=C^m[m[m[H^C]]],B^=m[m[B]])}return{SBOX:y,INV_SBOX:d,SUB_MIX:g,INV_SUB_MIX:M}})();function w(m){this._key=S(m),this._reset()}return w.blockSize=16,w.keySize=256/8,w.prototype.blockSize=w.blockSize,w.prototype.keySize=w.keySize,w.prototype._reset=function(){for(var m=this._key,v=m.length,y=v+6,d=(y+1)*4,g=[],M=0;M<v;M++)g[M]=m[M];for(M=v;M<d;M++){var x=g[M-1];M%v===0?(x=x<<8|x>>>24,x=f.SBOX[x>>>24]<<24|f.SBOX[x>>>16&255]<<16|f.SBOX[x>>>8&255]<<8|f.SBOX[x&255],x^=R[M/v|0]<<24):v>6&&M%v===4&&(x=f.SBOX[x>>>24]<<24|f.SBOX[x>>>16&255]<<16|f.SBOX[x>>>8&255]<<8|f.SBOX[x&255]),g[M]=g[M-v]^x}for(var B=[],A=0;A<d;A++){var D=d-A,C=g[D-(A%4?0:4)];A<4||D<=4?B[A]=C:B[A]=f.INV_SUB_MIX[0][f.SBOX[C>>>24]]^f.INV_SUB_MIX[1][f.SBOX[C>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[C>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[C&255]]}this._nRounds=y,this._keySchedule=g,this._invKeySchedule=B},w.prototype.encryptBlockRaw=function(m){return m=S(m),p(m,this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},w.prototype.encryptBlock=function(m){var v=this.encryptBlockRaw(m),y=_.allocUnsafe(16);return y.writeUInt32BE(v[0],0),y.writeUInt32BE(v[1],4),y.writeUInt32BE(v[2],8),y.writeUInt32BE(v[3],12),y},w.prototype.decryptBlock=function(m){m=S(m);var v=m[1];m[1]=m[3],m[3]=v;var y=p(m,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),d=_.allocUnsafe(16);return d.writeUInt32BE(y[0],0),d.writeUInt32BE(y[3],4),d.writeUInt32BE(y[2],8),d.writeUInt32BE(y[1],12),d},w.prototype.scrub=function(){I(this._keySchedule),I(this._invKeySchedule),I(this._key)},aes.AES=w,aes}var ghash,hasRequiredGhash;function requireGhash(){if(hasRequiredGhash)return ghash;hasRequiredGhash=1;var _=requireSafeBuffer$2().Buffer,S=_.alloc(16,0);function I(f){return[f.readUInt32BE(0),f.readUInt32BE(4),f.readUInt32BE(8),f.readUInt32BE(12)]}function p(f){var w=_.allocUnsafe(16);return w.writeUInt32BE(f[0]>>>0,0),w.writeUInt32BE(f[1]>>>0,4),w.writeUInt32BE(f[2]>>>0,8),w.writeUInt32BE(f[3]>>>0,12),w}function R(f){this.h=f,this.state=_.alloc(16,0),this.cache=_.allocUnsafe(0)}return R.prototype.ghash=function(f){for(var w=-1;++w<f.length;)this.state[w]^=f[w];this._multiply()},R.prototype._multiply=function(){for(var f=I(this.h),w=[0,0,0,0],m,v,y,d=-1;++d<128;){for(v=(this.state[~~(d/8)]&1<<7-d%8)!==0,v&&(w[0]^=f[0],w[1]^=f[1],w[2]^=f[2],w[3]^=f[3]),y=(f[3]&1)!==0,m=3;m>0;m--)f[m]=f[m]>>>1|(f[m-1]&1)<<31;f[0]=f[0]>>>1,y&&(f[0]=f[0]^225<<24)}this.state=p(w)},R.prototype.update=function(f){this.cache=_.concat([this.cache,f]);for(var w;this.cache.length>=16;)w=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(w)},R.prototype.final=function(f,w){return this.cache.length&&this.ghash(_.concat([this.cache,S],16)),this.ghash(p([0,f,0,w])),this.state},ghash=R,ghash}var authCipher,hasRequiredAuthCipher;function requireAuthCipher(){if(hasRequiredAuthCipher)return authCipher;hasRequiredAuthCipher=1;var _=requireAes(),S=requireSafeBuffer$2().Buffer,I=requireCipherBase(),p=requireInherits_browser(),R=requireGhash(),f=requireBufferXor(),w=requireIncr32();function m(d,g){var M=0;d.length!==g.length&&M++;for(var x=Math.min(d.length,g.length),B=0;B<x;++B)M+=d[B]^g[B];return M}function v(d,g,M){if(g.length===12)return d._finID=S.concat([g,S.from([0,0,0,1])]),S.concat([g,S.from([0,0,0,2])]);var x=new R(M),B=g.length,A=B%16;x.update(g),A&&(A=16-A,x.update(S.alloc(A,0))),x.update(S.alloc(8,0));var D=B*8,C=S.alloc(8);C.writeUIntBE(D,0,8),x.update(C),d._finID=x.state;var $=S.from(d._finID);return w($),$}function y(d,g,M,x){I.call(this);var B=S.alloc(4,0);this._cipher=new _.AES(g);var A=this._cipher.encryptBlock(B);this._ghash=new R(A),M=v(this,M,A),this._prev=S.from(M),this._cache=S.allocUnsafe(0),this._secCache=S.allocUnsafe(0),this._decrypt=x,this._alen=0,this._len=0,this._mode=d,this._authTag=null,this._called=!1}return p(y,I),y.prototype._update=function(d){if(!this._called&&this._alen){var g=16-this._alen%16;g<16&&(g=S.alloc(g,0),this._ghash.update(g))}this._called=!0;var M=this._mode.encrypt(this,d);return this._decrypt?this._ghash.update(d):this._ghash.update(M),this._len+=d.length,M},y.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var d=f(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&m(d,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=d,this._cipher.scrub()},y.prototype.getAuthTag=function(){if(this._decrypt||!S.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},y.prototype.setAuthTag=function(g){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=g},y.prototype.setAAD=function(g){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(g),this._alen+=g.length},authCipher=y,authCipher}var streamCipher,hasRequiredStreamCipher;function requireStreamCipher(){if(hasRequiredStreamCipher)return streamCipher;hasRequiredStreamCipher=1;var _=requireAes(),S=requireSafeBuffer$2().Buffer,I=requireCipherBase(),p=requireInherits_browser();function R(f,w,m,v){I.call(this),this._cipher=new _.AES(w),this._prev=S.from(m),this._cache=S.allocUnsafe(0),this._secCache=S.allocUnsafe(0),this._decrypt=v,this._mode=f}return p(R,I),R.prototype._update=function(f){return this._mode.encrypt(this,f,this._decrypt)},R.prototype._final=function(){this._cipher.scrub()},streamCipher=R,streamCipher}var evp_bytestokey,hasRequiredEvp_bytestokey;function requireEvp_bytestokey(){if(hasRequiredEvp_bytestokey)return evp_bytestokey;hasRequiredEvp_bytestokey=1;var _=requireSafeBuffer$2().Buffer,S=requireMd5_js();function I(p,R,f,w){if(_.isBuffer(p)||(p=_.from(p,"binary")),R&&(_.isBuffer(R)||(R=_.from(R,"binary")),R.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var m=f/8,v=_.alloc(m),y=_.alloc(w||0),d=_.alloc(0);m>0||w>0;){var g=new S;g.update(d),g.update(p),R&&g.update(R),d=g.digest();var M=0;if(m>0){var x=v.length-m;M=Math.min(m,d.length),d.copy(v,x,0,M),m-=M}if(M<d.length&&w>0){var B=y.length-w,A=Math.min(w,d.length-M);d.copy(y,B,M,M+A),w-=A}}return d.fill(0),{key:v,iv:y}}return evp_bytestokey=I,evp_bytestokey}var hasRequiredEncrypter;function requireEncrypter(){if(hasRequiredEncrypter)return encrypter;hasRequiredEncrypter=1;var _=requireModes$1(),S=requireAuthCipher(),I=requireSafeBuffer$2().Buffer,p=requireStreamCipher(),R=requireCipherBase(),f=requireAes(),w=requireEvp_bytestokey(),m=requireInherits_browser();function v(x,B,A){R.call(this),this._cache=new d,this._cipher=new f.AES(B),this._prev=I.from(A),this._mode=x,this._autopadding=!0}m(v,R),v.prototype._update=function(x){this._cache.add(x);for(var B,A,D=[];B=this._cache.get();)A=this._mode.encrypt(this,B),D.push(A);return I.concat(D)};var y=I.alloc(16,16);v.prototype._final=function(){var x=this._cache.flush();if(this._autopadding)return x=this._mode.encrypt(this,x),this._cipher.scrub(),x;if(!x.equals(y))throw this._cipher.scrub(),new Error("data not multiple of block length")},v.prototype.setAutoPadding=function(x){return this._autopadding=!!x,this};function d(){this.cache=I.allocUnsafe(0)}d.prototype.add=function(x){this.cache=I.concat([this.cache,x])},d.prototype.get=function(){if(this.cache.length>15){var x=this.cache.slice(0,16);return this.cache=this.cache.slice(16),x}return null},d.prototype.flush=function(){for(var x=16-this.cache.length,B=I.allocUnsafe(x),A=-1;++A<x;)B.writeUInt8(x,A);return I.concat([this.cache,B])};function g(x,B,A){var D=_[x.toLowerCase()];if(!D)throw new TypeError("invalid suite type");if(typeof B=="string"&&(B=I.from(B)),B.length!==D.key/8)throw new TypeError("invalid key length "+B.length);if(typeof A=="string"&&(A=I.from(A)),D.mode!=="GCM"&&A.length!==D.iv)throw new TypeError("invalid iv length "+A.length);return D.type==="stream"?new p(D.module,B,A):D.type==="auth"?new S(D.module,B,A):new v(D.module,B,A)}function M(x,B){var A=_[x.toLowerCase()];if(!A)throw new TypeError("invalid suite type");var D=w(B,!1,A.key,A.iv);return g(x,D.key,D.iv)}return encrypter.createCipheriv=g,encrypter.createCipher=M,encrypter}var decrypter={},hasRequiredDecrypter;function requireDecrypter(){if(hasRequiredDecrypter)return decrypter;hasRequiredDecrypter=1;var _=requireAuthCipher(),S=requireSafeBuffer$2().Buffer,I=requireModes$1(),p=requireStreamCipher(),R=requireCipherBase(),f=requireAes(),w=requireEvp_bytestokey(),m=requireInherits_browser();function v(x,B,A){R.call(this),this._cache=new y,this._last=void 0,this._cipher=new f.AES(B),this._prev=S.from(A),this._mode=x,this._autopadding=!0}m(v,R),v.prototype._update=function(x){this._cache.add(x);for(var B,A,D=[];B=this._cache.get(this._autopadding);)A=this._mode.decrypt(this,B),D.push(A);return S.concat(D)},v.prototype._final=function(){var x=this._cache.flush();if(this._autopadding)return d(this._mode.decrypt(this,x));if(x)throw new Error("data not multiple of block length")},v.prototype.setAutoPadding=function(x){return this._autopadding=!!x,this};function y(){this.cache=S.allocUnsafe(0)}y.prototype.add=function(x){this.cache=S.concat([this.cache,x])},y.prototype.get=function(x){var B;if(x){if(this.cache.length>16)return B=this.cache.slice(0,16),this.cache=this.cache.slice(16),B}else if(this.cache.length>=16)return B=this.cache.slice(0,16),this.cache=this.cache.slice(16),B;return null},y.prototype.flush=function(){if(this.cache.length)return this.cache};function d(x){var B=x[15];if(B<1||B>16)throw new Error("unable to decrypt data");for(var A=-1;++A<B;)if(x[A+(16-B)]!==B)throw new Error("unable to decrypt data");if(B!==16)return x.slice(0,16-B)}function g(x,B,A){var D=I[x.toLowerCase()];if(!D)throw new TypeError("invalid suite type");if(typeof A=="string"&&(A=S.from(A)),D.mode!=="GCM"&&A.length!==D.iv)throw new TypeError("invalid iv length "+A.length);if(typeof B=="string"&&(B=S.from(B)),B.length!==D.key/8)throw new TypeError("invalid key length "+B.length);return D.type==="stream"?new p(D.module,B,A,!0):D.type==="auth"?new _(D.module,B,A,!0):new v(D.module,B,A)}function M(x,B){var A=I[x.toLowerCase()];if(!A)throw new TypeError("invalid suite type");var D=w(B,!1,A.key,A.iv);return g(x,D.key,D.iv)}return decrypter.createDecipher=M,decrypter.createDecipheriv=g,decrypter}var hasRequiredBrowser$6;function requireBrowser$6(){if(hasRequiredBrowser$6)return browser$5;hasRequiredBrowser$6=1;var _=requireEncrypter(),S=requireDecrypter(),I=require$$2;function p(){return Object.keys(I)}return browser$5.createCipher=browser$5.Cipher=_.createCipher,browser$5.createCipheriv=browser$5.Cipheriv=_.createCipheriv,browser$5.createDecipher=browser$5.Decipher=S.createDecipher,browser$5.createDecipheriv=browser$5.Decipheriv=S.createDecipheriv,browser$5.listCiphers=browser$5.getCiphers=p,browser$5}var modes={},hasRequiredModes;function requireModes(){return hasRequiredModes||(hasRequiredModes=1,(function(_){_["des-ecb"]={key:8,iv:0},_["des-cbc"]=_.des={key:8,iv:8},_["des-ede3-cbc"]=_.des3={key:24,iv:8},_["des-ede3"]={key:24,iv:0},_["des-ede-cbc"]={key:16,iv:8},_["des-ede"]={key:16,iv:0}})(modes)),modes}var hasRequiredBrowser$5;function requireBrowser$5(){if(hasRequiredBrowser$5)return browser$6;hasRequiredBrowser$5=1;var _=requireBrowserifyDes(),S=requireBrowser$6(),I=requireModes$1(),p=requireModes(),R=requireEvp_bytestokey();function f(d,g){d=d.toLowerCase();var M,x;if(I[d])M=I[d].key,x=I[d].iv;else if(p[d])M=p[d].key*8,x=p[d].iv;else throw new TypeError("invalid suite type");var B=R(g,!1,M,x);return m(d,B.key,B.iv)}function w(d,g){d=d.toLowerCase();var M,x;if(I[d])M=I[d].key,x=I[d].iv;else if(p[d])M=p[d].key*8,x=p[d].iv;else throw new TypeError("invalid suite type");var B=R(g,!1,M,x);return v(d,B.key,B.iv)}function m(d,g,M){if(d=d.toLowerCase(),I[d])return S.createCipheriv(d,g,M);if(p[d])return new _({key:g,iv:M,mode:d});throw new TypeError("invalid suite type")}function v(d,g,M){if(d=d.toLowerCase(),I[d])return S.createDecipheriv(d,g,M);if(p[d])return new _({key:g,iv:M,mode:d,decrypt:!0});throw new TypeError("invalid suite type")}function y(){return Object.keys(p).concat(S.getCiphers())}return browser$6.createCipher=browser$6.Cipher=f,browser$6.createCipheriv=browser$6.Cipheriv=m,browser$6.createDecipher=browser$6.Decipher=w,browser$6.createDecipheriv=browser$6.Decipheriv=v,browser$6.listCiphers=browser$6.getCiphers=y,browser$6}var browser$4={},bn$d={exports:{}},bn$c=bn$d.exports,hasRequiredBn$6;function requireBn$6(){return hasRequiredBn$6||(hasRequiredBn$6=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$c)})(bn$d)),bn$d.exports}var bn$b={exports:{}},bn$a=bn$b.exports,hasRequiredBn$5;function requireBn$5(){return hasRequiredBn$5||(hasRequiredBn$5=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$a)})(bn$b)),bn$b.exports}var brorand={exports:{}},hasRequiredBrorand;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;hasRequiredBrorand=1;var _;brorand.exports=function(R){return _||(_=new S(null)),_.generate(R)};function S(p){this.rand=p}if(brorand.exports.Rand=S,S.prototype.generate=function(R){return this._rand(R)},S.prototype._rand=function(R){if(this.rand.getBytes)return this.rand.getBytes(R);for(var f=new Uint8Array(R),w=0;w<f.length;w++)f[w]=this.rand.getByte();return f},typeof self=="object")self.crypto&&self.crypto.getRandomValues?S.prototype._rand=function(R){var f=new Uint8Array(R);return self.crypto.getRandomValues(f),f}:self.msCrypto&&self.msCrypto.getRandomValues?S.prototype._rand=function(R){var f=new Uint8Array(R);return self.msCrypto.getRandomValues(f),f}:typeof window=="object"&&(S.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var I=requireCryptoBrowserify();if(typeof I.randomBytes!="function")throw new Error("Not supported");S.prototype._rand=function(R){return I.randomBytes(R)}}catch{}return brorand.exports}var mr,hasRequiredMr;function requireMr(){if(hasRequiredMr)return mr;hasRequiredMr=1;var _=requireBn$5(),S=requireBrorand();function I(p){this.rand=p||new S.Rand}return mr=I,I.create=function(R){return new I(R)},I.prototype._randbelow=function(R){var f=R.bitLength(),w=Math.ceil(f/8);do var m=new _(this.rand.generate(w));while(m.cmp(R)>=0);return m},I.prototype._randrange=function(R,f){var w=f.sub(R);return R.add(this._randbelow(w))},I.prototype.test=function(R,f,w){var m=R.bitLength(),v=_.mont(R),y=new _(1).toRed(v);f||(f=Math.max(1,m/48|0));for(var d=R.subn(1),g=0;!d.testn(g);g++);for(var M=R.shrn(g),x=d.toRed(v),B=!0;f>0;f--){var A=this._randrange(new _(2),d);w&&w(A);var D=A.toRed(v).redPow(M);if(!(D.cmp(y)===0||D.cmp(x)===0)){for(var C=1;C<g;C++){if(D=D.redSqr(),D.cmp(y)===0)return!1;if(D.cmp(x)===0)break}if(C===g)return!1}}return B},I.prototype.getDivisor=function(R,f){var w=R.bitLength(),m=_.mont(R),v=new _(1).toRed(m);f||(f=Math.max(1,w/48|0));for(var y=R.subn(1),d=0;!y.testn(d);d++);for(var g=R.shrn(d),M=y.toRed(m);f>0;f--){var x=this._randrange(new _(2),y),B=R.gcd(x);if(B.cmpn(1)!==0)return B;var A=x.toRed(m).redPow(g);if(!(A.cmp(v)===0||A.cmp(M)===0)){for(var D=1;D<d;D++){if(A=A.redSqr(),A.cmp(v)===0)return A.fromRed().subn(1).gcd(R);if(A.cmp(M)===0)break}if(D===d)return A=A.redSqr(),A.fromRed().subn(1).gcd(R)}}return!1},mr}var generatePrime,hasRequiredGeneratePrime;function requireGeneratePrime(){if(hasRequiredGeneratePrime)return generatePrime;hasRequiredGeneratePrime=1;var _=requireBrowser$b();generatePrime=D,D.simpleSieve=B,D.fermatTest=A;var S=requireBn$6(),I=new S(24),p=requireMr(),R=new p,f=new S(1),w=new S(2),m=new S(5);new S(16),new S(8);var v=new S(10),y=new S(3);new S(7);var d=new S(11),g=new S(4);new S(12);var M=null;function x(){if(M!==null)return M;var C=1048576,$=[];$[0]=2;for(var H=1,N=3;N<C;N+=2){for(var V=Math.ceil(Math.sqrt(N)),Q=0;Q<H&&$[Q]<=V&&N%$[Q]!==0;Q++);H!==Q&&$[Q]<=V||($[H++]=N)}return M=$,$}function B(C){for(var $=x(),H=0;H<$.length;H++)if(C.modn($[H])===0)return C.cmpn($[H])===0;return!0}function A(C){var $=S.mont(C);return w.toRed($).redPow(C.subn(1)).fromRed().cmpn(1)===0}function D(C,$){if(C<16)return $===2||$===5?new S([140,123]):new S([140,39]);$=new S($);for(var H,N;;){for(H=new S(_(Math.ceil(C/8)));H.bitLength()>C;)H.ishrn(1);if(H.isEven()&&H.iadd(f),H.testn(1)||H.iadd(w),$.cmp(w)){if(!$.cmp(m))for(;H.mod(v).cmp(y);)H.iadd(g)}else for(;H.mod(I).cmp(d);)H.iadd(g);if(N=H.shrn(1),B(N)&&B(H)&&A(N)&&A(H)&&R.test(N)&&R.test(H))return H}}return generatePrime}const modp1={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},require$$1$1={modp1,modp2,modp5,modp14,modp15,modp16,modp17,modp18};var dh,hasRequiredDh;function requireDh(){if(hasRequiredDh)return dh;hasRequiredDh=1;var _=requireBn$6(),S=requireMr(),I=new S,p=new _(24),R=new _(11),f=new _(10),w=new _(3),m=new _(7),v=requireGeneratePrime(),y=requireBrowser$b();dh=B;function d(D,C){return C=C||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,C)),this._pub=new _(D),this}function g(D,C){return C=C||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,C)),this._priv=new _(D),this}var M={};function x(D,C){var $=C.toString("hex"),H=[$,D.toString(16)].join("_");if(H in M)return M[H];var N=0;if(D.isEven()||!v.simpleSieve||!v.fermatTest(D)||!I.test(D))return N+=1,$==="02"||$==="05"?N+=8:N+=4,M[H]=N,N;I.test(D.shrn(1))||(N+=2);var V;switch($){case"02":D.mod(p).cmp(R)&&(N+=8);break;case"05":V=D.mod(f),V.cmp(w)&&V.cmp(m)&&(N+=8);break;default:N+=4}return M[H]=N,N}function B(D,C,$){this.setGenerator(C),this.__prime=new _(D),this._prime=_.mont(this.__prime),this._primeLen=D.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,$?(this.setPublicKey=d,this.setPrivateKey=g):this._primeCode=8}Object.defineProperty(B.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=x(this.__prime,this.__gen)),this._primeCode}}),B.prototype.generateKeys=function(){return this._priv||(this._priv=new _(y(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},B.prototype.computeSecret=function(D){D=new _(D),D=D.toRed(this._prime);var C=D.redPow(this._priv).fromRed(),$=new Buffer(C.toArray()),H=this.getPrime();if($.length<H.length){var N=new Buffer(H.length-$.length);N.fill(0),$=Buffer.concat([N,$])}return $},B.prototype.getPublicKey=function(C){return A(this._pub,C)},B.prototype.getPrivateKey=function(C){return A(this._priv,C)},B.prototype.getPrime=function(D){return A(this.__prime,D)},B.prototype.getGenerator=function(D){return A(this._gen,D)},B.prototype.setGenerator=function(D,C){return C=C||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,C)),this.__gen=D,this._gen=new _(D),this};function A(D,C){var $=new Buffer(D.toArray());return C?$.toString(C):$}return dh}var hasRequiredBrowser$4;function requireBrowser$4(){if(hasRequiredBrowser$4)return browser$4;hasRequiredBrowser$4=1;var _=requireGeneratePrime(),S=require$$1$1,I=requireDh();function p(w){var m=new Buffer(S[w].prime,"hex"),v=new Buffer(S[w].gen,"hex");return new I(m,v)}var R={binary:!0,hex:!0,base64:!0};function f(w,m,v,y){return Buffer.isBuffer(m)||R[m]===void 0?f(w,"binary",m,v):(m=m||"binary",y=y||"binary",v=v||new Buffer([2]),Buffer.isBuffer(v)||(v=new Buffer(v,y)),typeof w=="number"?new I(_(w,v),v,!0):(Buffer.isBuffer(w)||(w=new Buffer(w,m)),new I(w,v,!0)))}return browser$4.DiffieHellmanGroup=browser$4.createDiffieHellmanGroup=browser$4.getDiffieHellman=p,browser$4.createDiffieHellman=browser$4.DiffieHellman=f,browser$4}var readableBrowser={exports:{}},isarray,hasRequiredIsarray;function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var _={}.toString;return isarray=Array.isArray||function(S){return _.call(S)=="[object Array]"},isarray}var streamBrowser,hasRequiredStreamBrowser;function requireStreamBrowser(){return hasRequiredStreamBrowser||(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter),streamBrowser}var safeBuffer={exports:{}},hasRequiredSafeBuffer;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,(function(_,S){var I=requireDist(),p=I.Buffer;function R(w,m){for(var v in w)m[v]=w[v]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?_.exports=I:(R(I,S),S.Buffer=f);function f(w,m,v){return p(w,m,v)}R(p,f),f.from=function(w,m,v){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,m,v)},f.alloc=function(w,m,v){if(typeof w!="number")throw new TypeError("Argument must be a number");var y=p(w);return m!==void 0?typeof v=="string"?y.fill(m,v):y.fill(m):y.fill(0),y},f.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},f.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(w)}})(safeBuffer,safeBuffer.exports)),safeBuffer.exports}var BufferList={exports:{}},hasRequiredBufferList;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,(function(_){function S(f,w){if(!(f instanceof w))throw new TypeError("Cannot call a class as a function")}var I=requireSafeBuffer().Buffer,p=requireUtil$1();function R(f,w,m){f.copy(w,m)}_.exports=(function(){function f(){S(this,f),this.head=null,this.tail=null,this.length=0}return f.prototype.push=function(m){var v={data:m,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length},f.prototype.unshift=function(m){var v={data:m,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length},f.prototype.shift=function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}},f.prototype.clear=function(){this.head=this.tail=null,this.length=0},f.prototype.join=function(m){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=m+v.data;return y},f.prototype.concat=function(m){if(this.length===0)return I.alloc(0);for(var v=I.allocUnsafe(m>>>0),y=this.head,d=0;y;)R(y.data,v,d),d+=y.data.length,y=y.next;return v},f})(),p&&p.inspect&&p.inspect.custom&&(_.exports.prototype[p.inspect.custom]=function(){var f=p.inspect({length:this.length});return this.constructor.name+" "+f})})(BufferList)),BufferList.exports}var destroy_1,hasRequiredDestroy;function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;var _=requireProcessNextickArgs();function S(R,f){var w=this,m=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return m||v?(f?f(R):R&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_.nextTick(p,this,R)):_.nextTick(p,this,R)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(R||null,function(y){!f&&y?w._writableState?w._writableState.errorEmitted||(w._writableState.errorEmitted=!0,_.nextTick(p,w,y)):_.nextTick(p,w,y):f&&f(y)}),this)}function I(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(R,f){R.emit("error",f)}return destroy_1={destroy:S,undestroy:I},destroy_1}var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var _=requireProcessNextickArgs();_stream_writable=A;function S(u){var l=this;this.next=null,this.entry=null,this.finish=function(){s(l,u)}}var I=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:_.nextTick,p;A.WritableState=x;var R=Object.create(requireUtil());R.inherits=requireInherits_browser();var f={deprecate:requireBrowser$a()},w=requireStreamBrowser(),m=requireSafeBuffer().Buffer,v=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function y(u){return m.from(u)}function d(u){return m.isBuffer(u)||u instanceof v}var g=requireDestroy();R.inherits(A,w);function M(){}function x(u,l){p=p||require_stream_duplex(),u=u||{};var o=l instanceof p;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,b=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=b,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var E=u.decodeStrings===!1;this.decodeStrings=!E,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){ne(l,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this)}x.prototype.getBuffer=function(){for(var l=this.bufferedRequest,o=[];l;)o.push(l),l=l.next;return o},(function(){try{Object.defineProperty(x.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(u){return B.call(this,u)?!0:this!==A?!1:u&&u._writableState instanceof x}})):B=function(u){return u instanceof this};function A(u){if(p=p||require_stream_duplex(),!B.call(A,this)&&!(this instanceof p))return new A(u);this._writableState=new x(u,this),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),w.call(this)}A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function D(u,l){var o=new Error("write after end");u.emit("error",o),_.nextTick(l,o)}function C(u,l,o,r){var h=!0,b=!1;return o===null?b=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!l.objectMode&&(b=new TypeError("Invalid non-string/buffer chunk")),b&&(u.emit("error",b),_.nextTick(r,b),h=!1),h}A.prototype.write=function(u,l,o){var r=this._writableState,h=!1,b=!r.objectMode&&d(u);return b&&!m.isBuffer(u)&&(u=y(u)),typeof l=="function"&&(o=l,l=null),b?l="buffer":l||(l=r.defaultEncoding),typeof o!="function"&&(o=M),r.ended?D(this,o):(b||C(this,r,u,o))&&(r.pendingcb++,h=H(this,r,b,u,l,o)),h},A.prototype.cork=function(){var u=this._writableState;u.corked++},A.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&le(this,u))},A.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this};function $(u,l,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof l=="string"&&(l=m.from(l,o)),l}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(u,l,o,r,h,b){if(!o){var E=$(l,r,h);r!==E&&(o=!0,h="buffer",r=E)}var L=l.objectMode?1:r.length;l.length+=L;var Y=l.length<l.highWaterMark;if(Y||(l.needDrain=!0),l.writing||l.corked){var K=l.lastBufferedRequest;l.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:b,next:null},K?K.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else N(u,l,!1,L,r,h,b);return Y}function N(u,l,o,r,h,b,E){l.writelen=r,l.writecb=E,l.writing=!0,l.sync=!0,o?u._writev(h,l.onwrite):u._write(h,b,l.onwrite),l.sync=!1}function V(u,l,o,r,h){--l.pendingcb,o?(_.nextTick(h,r),_.nextTick(n,u,l),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,l))}function Q(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function ne(u,l){var o=u._writableState,r=o.sync,h=o.writecb;if(Q(o),l)V(u,o,r,l,h);else{var b=c(o);!b&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&le(u,o),r?I(ae,u,o,b,h):ae(u,o,b,h)}}function ae(u,l,o,r){o||ee(u,l),l.pendingcb--,r(),n(u,l)}function ee(u,l){l.length===0&&l.needDrain&&(l.needDrain=!1,u.emit("drain"))}function le(u,l){l.bufferProcessing=!0;var o=l.bufferedRequest;if(u._writev&&o&&o.next){var r=l.bufferedRequestCount,h=new Array(r),b=l.corkedRequestsFree;b.entry=o;for(var E=0,L=!0;o;)h[E]=o,o.isBuf||(L=!1),o=o.next,E+=1;h.allBuffers=L,N(u,l,!0,l.length,h,"",b.finish),l.pendingcb++,l.lastBufferedRequest=null,b.next?(l.corkedRequestsFree=b.next,b.next=null):l.corkedRequestsFree=new S(l),l.bufferedRequestCount=0}else{for(;o;){var Y=o.chunk,K=o.encoding,q=o.callback,P=l.objectMode?1:Y.length;if(N(u,l,!1,P,Y,K,q),o=o.next,l.bufferedRequestCount--,l.writing)break}o===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=o,l.bufferProcessing=!1}A.prototype._write=function(u,l,o){o(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(u,l,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,l=null):typeof l=="function"&&(o=l,l=null),u!=null&&this.write(u,l),r.corked&&(r.corked=1,this.uncork()),r.ending||a(this,r,o)};function c(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,l){u._final(function(o){l.pendingcb--,o&&u.emit("error",o),l.prefinished=!0,u.emit("prefinish"),n(u,l)})}function t(u,l){!l.prefinished&&!l.finalCalled&&(typeof u._final=="function"?(l.pendingcb++,l.finalCalled=!0,_.nextTick(e,u,l)):(l.prefinished=!0,u.emit("prefinish")))}function n(u,l){var o=c(l);return o&&(t(u,l),l.pendingcb===0&&(l.finished=!0,u.emit("finish"))),o}function a(u,l,o){l.ending=!0,n(u,l),o&&(l.finished?_.nextTick(o):u.once("finish",o)),l.ended=!0,u.writable=!1}function s(u,l,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;l.pendingcb--,h(o),r=r.next}l.corkedRequestsFree.next=u}return Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(u,l){this.end(),l(u)},_stream_writable}var _stream_duplex,hasRequired_stream_duplex;function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var _=requireProcessNextickArgs(),S=Object.keys||function(g){var M=[];for(var x in g)M.push(x);return M};_stream_duplex=v;var I=Object.create(requireUtil());I.inherits=requireInherits_browser();var p=require_stream_readable(),R=require_stream_writable();I.inherits(v,p);for(var f=S(R.prototype),w=0;w<f.length;w++){var m=f[w];v.prototype[m]||(v.prototype[m]=R.prototype[m])}function v(g){if(!(this instanceof v))return new v(g);p.call(this,g),R.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",y)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function y(){this.allowHalfOpen||this._writableState.ended||_.nextTick(d,this)}function d(g){g.end()}return Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),v.prototype._destroy=function(g,M){this.push(null),this.end(),_.nextTick(M,g)},_stream_duplex}var _stream_readable,hasRequired_stream_readable;function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var _=requireProcessNextickArgs();_stream_readable=$;var S=requireIsarray(),I;$.ReadableState=C,requireEvents().EventEmitter;var p=function(q,P){return q.listeners(P).length},R=requireStreamBrowser(),f=requireSafeBuffer().Buffer,w=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m(q){return f.from(q)}function v(q){return f.isBuffer(q)||q instanceof w}var y=Object.create(requireUtil());y.inherits=requireInherits_browser();var d=requireUtil$1(),g=void 0;d&&d.debuglog?g=d.debuglog("stream"):g=function(){};var M=requireBufferList(),x=requireDestroy(),B;y.inherits($,R);var A=["error","close","destroy","pause","resume"];function D(q,P,W){if(typeof q.prependListener=="function")return q.prependListener(P,W);!q._events||!q._events[P]?q.on(P,W):S(q._events[P])?q._events[P].unshift(W):q._events[P]=[W,q._events[P]]}function C(q,P){I=I||require_stream_duplex(),q=q||{};var W=P instanceof I;this.objectMode=!!q.objectMode,W&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var J=q.highWaterMark,X=q.readableHighWaterMark,U=this.objectMode?16:16*1024;J||J===0?this.highWaterMark=J:W&&(X||X===0)?this.highWaterMark=X:this.highWaterMark=U,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new M,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(B||(B=requireString_decoder().StringDecoder),this.decoder=new B(q.encoding),this.encoding=q.encoding)}function $(q){if(I=I||require_stream_duplex(),!(this instanceof $))return new $(q);this._readableState=new C(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),R.call(this)}Object.defineProperty($.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(q){this._readableState&&(this._readableState.destroyed=q)}}),$.prototype.destroy=x.destroy,$.prototype._undestroy=x.undestroy,$.prototype._destroy=function(q,P){this.push(null),P(q)},$.prototype.push=function(q,P){var W=this._readableState,J;return W.objectMode?J=!0:typeof q=="string"&&(P=P||W.defaultEncoding,P!==W.encoding&&(q=f.from(q,P),P=""),J=!0),H(this,q,P,!1,J)},$.prototype.unshift=function(q){return H(this,q,null,!0,!1)};function H(q,P,W,J,X){var U=q._readableState;if(P===null)U.reading=!1,le(q,U);else{var re;X||(re=V(U,P)),re?q.emit("error",re):U.objectMode||P&&P.length>0?(typeof P!="string"&&!U.objectMode&&Object.getPrototypeOf(P)!==f.prototype&&(P=m(P)),J?U.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):N(q,U,P,!0):U.ended?q.emit("error",new Error("stream.push() after EOF")):(U.reading=!1,U.decoder&&!W?(P=U.decoder.write(P),U.objectMode||P.length!==0?N(q,U,P,!1):t(q,U)):N(q,U,P,!1))):J||(U.reading=!1)}return Q(U)}function N(q,P,W,J){P.flowing&&P.length===0&&!P.sync?(q.emit("data",W),q.read(0)):(P.length+=P.objectMode?1:W.length,J?P.buffer.unshift(W):P.buffer.push(W),P.needReadable&&c(q)),t(q,P)}function V(q,P){var W;return!v(P)&&typeof P!="string"&&P!==void 0&&!q.objectMode&&(W=new TypeError("Invalid non-string/buffer chunk")),W}function Q(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}$.prototype.isPaused=function(){return this._readableState.flowing===!1},$.prototype.setEncoding=function(q){return B||(B=requireString_decoder().StringDecoder),this._readableState.decoder=new B(q),this._readableState.encoding=q,this};var ne=8388608;function ae(q){return q>=ne?q=ne:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function ee(q,P){return q<=0||P.length===0&&P.ended?0:P.objectMode?1:q!==q?P.flowing&&P.length?P.buffer.head.data.length:P.length:(q>P.highWaterMark&&(P.highWaterMark=ae(q)),q<=P.length?q:P.ended?P.length:(P.needReadable=!0,0))}$.prototype.read=function(q){g("read",q),q=parseInt(q,10);var P=this._readableState,W=q;if(q!==0&&(P.emittedReadable=!1),q===0&&P.needReadable&&(P.length>=P.highWaterMark||P.ended))return g("read: emitReadable",P.length,P.ended),P.length===0&&P.ended?L(this):c(this),null;if(q=ee(q,P),q===0&&P.ended)return P.length===0&&L(this),null;var J=P.needReadable;g("need readable",J),(P.length===0||P.length-q<P.highWaterMark)&&(J=!0,g("length less than watermark",J)),P.ended||P.reading?(J=!1,g("reading or ended",J)):J&&(g("do read"),P.reading=!0,P.sync=!0,P.length===0&&(P.needReadable=!0),this._read(P.highWaterMark),P.sync=!1,P.reading||(q=ee(W,P)));var X;return q>0?X=r(q,P):X=null,X===null?(P.needReadable=!0,q=0):P.length-=q,P.length===0&&(P.ended||(P.needReadable=!0),W!==q&&P.ended&&L(this)),X!==null&&this.emit("data",X),X};function le(q,P){if(!P.ended){if(P.decoder){var W=P.decoder.end();W&&W.length&&(P.buffer.push(W),P.length+=P.objectMode?1:W.length)}P.ended=!0,c(q)}}function c(q){var P=q._readableState;P.needReadable=!1,P.emittedReadable||(g("emitReadable",P.flowing),P.emittedReadable=!0,P.sync?_.nextTick(e,q):e(q))}function e(q){g("emit readable"),q.emit("readable"),o(q)}function t(q,P){P.readingMore||(P.readingMore=!0,_.nextTick(n,q,P))}function n(q,P){for(var W=P.length;!P.reading&&!P.flowing&&!P.ended&&P.length<P.highWaterMark&&(g("maybeReadMore read 0"),q.read(0),W!==P.length);)W=P.length;P.readingMore=!1}$.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},$.prototype.pipe=function(q,P){var W=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=q;break;case 1:J.pipes=[J.pipes,q];break;default:J.pipes.push(q);break}J.pipesCount+=1,g("pipe count=%d opts=%j",J.pipesCount,P);var X=(!P||P.end!==!1)&&q!==process$1.stdout&&q!==process$1.stderr,U=X?Ie:Ce;J.endEmitted?_.nextTick(U):W.once("end",U),q.on("unpipe",re);function re(pe,_e){g("onunpipe"),pe===W&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,$e())}function Ie(){g("onend"),q.end()}var ue=a(W);q.on("drain",ue);var he=!1;function $e(){g("cleanup"),q.removeListener("close",de),q.removeListener("finish",ye),q.removeListener("drain",ue),q.removeListener("error",De),q.removeListener("unpipe",re),W.removeListener("end",Ie),W.removeListener("end",Ce),W.removeListener("data",se),he=!0,J.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ue()}var me=!1;W.on("data",se);function se(pe){g("ondata"),me=!1;var _e=q.write(pe);_e===!1&&!me&&((J.pipesCount===1&&J.pipes===q||J.pipesCount>1&&K(J.pipes,q)!==-1)&&!he&&(g("false write response, pause",J.awaitDrain),J.awaitDrain++,me=!0),W.pause())}function De(pe){g("onerror",pe),Ce(),q.removeListener("error",De),p(q,"error")===0&&q.emit("error",pe)}D(q,"error",De);function de(){q.removeListener("finish",ye),Ce()}q.once("close",de);function ye(){g("onfinish"),q.removeListener("close",de),Ce()}q.once("finish",ye);function Ce(){g("unpipe"),W.unpipe(q)}return q.emit("pipe",W),J.flowing||(g("pipe resume"),W.resume()),q};function a(q){return function(){var P=q._readableState;g("pipeOnDrain",P.awaitDrain),P.awaitDrain&&P.awaitDrain--,P.awaitDrain===0&&p(q,"data")&&(P.flowing=!0,o(q))}}$.prototype.unpipe=function(q){var P=this._readableState,W={hasUnpiped:!1};if(P.pipesCount===0)return this;if(P.pipesCount===1)return q&&q!==P.pipes?this:(q||(q=P.pipes),P.pipes=null,P.pipesCount=0,P.flowing=!1,q&&q.emit("unpipe",this,W),this);if(!q){var J=P.pipes,X=P.pipesCount;P.pipes=null,P.pipesCount=0,P.flowing=!1;for(var U=0;U<X;U++)J[U].emit("unpipe",this,{hasUnpiped:!1});return this}var re=K(P.pipes,q);return re===-1?this:(P.pipes.splice(re,1),P.pipesCount-=1,P.pipesCount===1&&(P.pipes=P.pipes[0]),q.emit("unpipe",this,W),this)},$.prototype.on=function(q,P){var W=R.prototype.on.call(this,q,P);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var J=this._readableState;!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.emittedReadable=!1,J.reading?J.length&&c(this):_.nextTick(s,this))}return W},$.prototype.addListener=$.prototype.on;function s(q){g("readable nexttick read 0"),q.read(0)}$.prototype.resume=function(){var q=this._readableState;return q.flowing||(g("resume"),q.flowing=!0,u(this,q)),this};function u(q,P){P.resumeScheduled||(P.resumeScheduled=!0,_.nextTick(l,q,P))}function l(q,P){P.reading||(g("resume read 0"),q.read(0)),P.resumeScheduled=!1,P.awaitDrain=0,q.emit("resume"),o(q),P.flowing&&!P.reading&&q.read(0)}$.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(q){var P=q._readableState;for(g("flow",P.flowing);P.flowing&&q.read()!==null;);}$.prototype.wrap=function(q){var P=this,W=this._readableState,J=!1;q.on("end",function(){if(g("wrapped end"),W.decoder&&!W.ended){var re=W.decoder.end();re&&re.length&&P.push(re)}P.push(null)}),q.on("data",function(re){if(g("wrapped data"),W.decoder&&(re=W.decoder.write(re)),!(W.objectMode&&re==null)&&!(!W.objectMode&&(!re||!re.length))){var Ie=P.push(re);Ie||(J=!0,q.pause())}});for(var X in q)this[X]===void 0&&typeof q[X]=="function"&&(this[X]=(function(re){return function(){return q[re].apply(q,arguments)}})(X));for(var U=0;U<A.length;U++)q.on(A[U],this.emit.bind(this,A[U]));return this._read=function(re){g("wrapped _read",re),J&&(J=!1,q.resume())},this},Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),$._fromList=r;function r(q,P){if(P.length===0)return null;var W;return P.objectMode?W=P.buffer.shift():!q||q>=P.length?(P.decoder?W=P.buffer.join(""):P.buffer.length===1?W=P.buffer.head.data:W=P.buffer.concat(P.length),P.buffer.clear()):W=h(q,P.buffer,P.decoder),W}function h(q,P,W){var J;return q<P.head.data.length?(J=P.head.data.slice(0,q),P.head.data=P.head.data.slice(q)):q===P.head.data.length?J=P.shift():J=W?b(q,P):E(q,P),J}function b(q,P){var W=P.head,J=1,X=W.data;for(q-=X.length;W=W.next;){var U=W.data,re=q>U.length?U.length:q;if(re===U.length?X+=U:X+=U.slice(0,q),q-=re,q===0){re===U.length?(++J,W.next?P.head=W.next:P.head=P.tail=null):(P.head=W,W.data=U.slice(re));break}++J}return P.length-=J,X}function E(q,P){var W=f.allocUnsafe(q),J=P.head,X=1;for(J.data.copy(W),q-=J.data.length;J=J.next;){var U=J.data,re=q>U.length?U.length:q;if(U.copy(W,W.length-q,0,re),q-=re,q===0){re===U.length?(++X,J.next?P.head=J.next:P.head=P.tail=null):(P.head=J,J.data=U.slice(re));break}++X}return P.length-=X,W}function L(q){var P=q._readableState;if(P.length>0)throw new Error('"endReadable()" called on non-empty stream');P.endEmitted||(P.ended=!0,_.nextTick(Y,P,q))}function Y(q,P){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,P.readable=!1,P.emit("end"))}function K(q,P){for(var W=0,J=q.length;W<J;W++)if(q[W]===P)return W;return-1}return _stream_readable}var _stream_transform,hasRequired_stream_transform;function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=p;var _=require_stream_duplex(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(p,_);function I(w,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(!y)return this.emit("error",new Error("write callback called multiple times"));v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(w);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function p(w){if(!(this instanceof p))return new p(w);_.call(this,w),this._transformState={afterTransform:I.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",R)}function R(){var w=this;typeof this._flush=="function"?this._flush(function(m,v){f(w,m,v)}):f(this,null,null)}p.prototype.push=function(w,m){return this._transformState.needTransform=!1,_.prototype.push.call(this,w,m)},p.prototype._transform=function(w,m,v){throw new Error("_transform() is not implemented")},p.prototype._write=function(w,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=w,y.writeencoding=m,!y.transforming){var d=this._readableState;(y.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},p.prototype._read=function(w){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},p.prototype._destroy=function(w,m){var v=this;_.prototype._destroy.call(this,w,function(y){m(y),v.emit("close")})};function f(w,m,v){if(m)return w.emit("error",m);if(v!=null&&w.push(v),w._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(w._transformState.transforming)throw new Error("Calling transform done when still transforming");return w.push(null)}return _stream_transform}var _stream_passthrough,hasRequired_stream_passthrough;function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=I;var _=require_stream_transform(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(I,_);function I(p){if(!(this instanceof I))return new I(p);_.call(this,p)}return I.prototype._transform=function(p,R,f){f(null,p)},_stream_passthrough}var hasRequiredReadableBrowser;function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,(function(_,S){S=_.exports=require_stream_readable(),S.Stream=S,S.Readable=S,S.Writable=require_stream_writable(),S.Duplex=require_stream_duplex(),S.Transform=require_stream_transform(),S.PassThrough=require_stream_passthrough()})(readableBrowser,readableBrowser.exports)),readableBrowser.exports}var sign={exports:{}},bn$9={exports:{}},bn$8=bn$9.exports,hasRequiredBn$4;function requireBn$4(){return hasRequiredBn$4||(hasRequiredBn$4=1,(function(_){(function(S,I){function p(t,n){if(!t)throw new Error(n||"Assertion failed")}function R(t,n){t.super_=n;var a=function(){};a.prototype=n.prototype,t.prototype=new a,t.prototype.constructor=t}function f(t,n,a){if(f.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,t!==null&&((n==="le"||n==="be")&&(a=n,n=10),this._init(t||0,n||10,a||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(n){return n instanceof f?!0:n!==null&&typeof n=="object"&&n.constructor.wordSize===f.wordSize&&Array.isArray(n.words)},f.max=function(n,a){return n.cmp(a)>0?n:a},f.min=function(n,a){return n.cmp(a)<0?n:a},f.prototype._init=function(n,a,s){if(typeof n=="number")return this._initNumber(n,a,s);if(typeof n=="object")return this._initArray(n,a,s);a==="hex"&&(a=16),p(a===(a|0)&&a>=2&&a<=36),n=n.toString().replace(/\s+/g,"");var u=0;n[0]==="-"&&(u++,this.negative=1),u<n.length&&(a===16?this._parseHex(n,u,s):(this._parseBase(n,a,u),s==="le"&&this._initArray(this.toArray(),a,s)))},f.prototype._initNumber=function(n,a,s){n<0&&(this.negative=1,n=-n),n<67108864?(this.words=[n&67108863],this.length=1):n<4503599627370496?(this.words=[n&67108863,n/67108864&67108863],this.length=2):(p(n<9007199254740992),this.words=[n&67108863,n/67108864&67108863,1],this.length=3),s==="le"&&this._initArray(this.toArray(),a,s)},f.prototype._initArray=function(n,a,s){if(p(typeof n.length=="number"),n.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(n.length/3),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l,o,r=0;if(s==="be")for(u=n.length-1,l=0;u>=0;u-=3)o=n[u]|n[u-1]<<8|n[u-2]<<16,this.words[l]|=o<<r&67108863,this.words[l+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,l++);else if(s==="le")for(u=0,l=0;u<n.length;u+=3)o=n[u]|n[u+1]<<8|n[u+2]<<16,this.words[l]|=o<<r&67108863,this.words[l+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,l++);return this._strip()};function m(t,n){var a=t.charCodeAt(n);if(a>=48&&a<=57)return a-48;if(a>=65&&a<=70)return a-55;if(a>=97&&a<=102)return a-87;p(!1,"Invalid character in "+t)}function v(t,n,a){var s=m(t,a);return a-1>=n&&(s|=m(t,a-1)<<4),s}f.prototype._parseHex=function(n,a,s){this.length=Math.ceil((n.length-a)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,o=0,r;if(s==="be")for(u=n.length-1;u>=a;u-=2)r=v(n,a,u)<<l,this.words[o]|=r&67108863,l>=18?(l-=18,o+=1,this.words[o]|=r>>>26):l+=8;else{var h=n.length-a;for(u=h%2===0?a+1:a;u<n.length;u+=2)r=v(n,a,u)<<l,this.words[o]|=r&67108863,l>=18?(l-=18,o+=1,this.words[o]|=r>>>26):l+=8}this._strip()};function y(t,n,a,s){for(var u=0,l=0,o=Math.min(t.length,a),r=n;r<o;r++){var h=t.charCodeAt(r)-48;u*=s,h>=49?l=h-49+10:h>=17?l=h-17+10:l=h,p(h>=0&&l<s,"Invalid character"),u+=l}return u}f.prototype._parseBase=function(n,a,s){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=a)u++;u--,l=l/a|0;for(var o=n.length-s,r=o%u,h=Math.min(o,o-r)+s,b=0,E=s;E<h;E+=u)b=y(n,E,E+u,a),this.imuln(l),this.words[0]+b<67108864?this.words[0]+=b:this._iaddn(b);if(r!==0){var L=1;for(b=y(n,E,n.length,a),E=0;E<r;E++)L*=a;this.imuln(L),this.words[0]+b<67108864?this.words[0]+=b:this._iaddn(b)}this._strip()},f.prototype.copy=function(n){n.words=new Array(this.length);for(var a=0;a<this.length;a++)n.words[a]=this.words[a];n.length=this.length,n.negative=this.negative,n.red=this.red};function d(t,n){t.words=n.words,t.length=n.length,t.negative=n.negative,t.red=n.red}if(f.prototype._move=function(n){d(n,this)},f.prototype.clone=function(){var n=new f(null);return this.copy(n),n},f.prototype._expand=function(n){for(;this.length<n;)this.words[this.length++]=0;return this},f.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{f.prototype[Symbol.for("nodejs.util.inspect.custom")]=g}catch{f.prototype.inspect=g}else f.prototype.inspect=g;function g(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var M=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],x=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],B=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(n,a){n=n||10,a=a|0||1;var s;if(n===16||n==="hex"){s="";for(var u=0,l=0,o=0;o<this.length;o++){var r=this.words[o],h=((r<<u|l)&16777215).toString(16);l=r>>>24-u&16777215,u+=2,u>=26&&(u-=26,o--),l!==0||o!==this.length-1?s=M[6-h.length]+h+s:s=h+s}for(l!==0&&(s=l.toString(16)+s);s.length%a!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}if(n===(n|0)&&n>=2&&n<=36){var b=x[n],E=B[n];s="";var L=this.clone();for(L.negative=0;!L.isZero();){var Y=L.modrn(E).toString(n);L=L.idivn(E),L.isZero()?s=Y+s:s=M[b-Y.length]+Y+s}for(this.isZero()&&(s="0"+s);s.length%a!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var n=this.words[0];return this.length===2?n+=this.words[1]*67108864:this.length===3&&this.words[2]===1?n+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-n:n},f.prototype.toJSON=function(){return this.toString(16,2)},w&&(f.prototype.toBuffer=function(n,a){return this.toArrayLike(w,n,a)}),f.prototype.toArray=function(n,a){return this.toArrayLike(Array,n,a)};var A=function(n,a){return n.allocUnsafe?n.allocUnsafe(a):new n(a)};f.prototype.toArrayLike=function(n,a,s){this._strip();var u=this.byteLength(),l=s||Math.max(1,u);p(u<=l,"byte array longer than desired length"),p(l>0,"Requested array length <= 0");var o=A(n,l),r=a==="le"?"LE":"BE";return this["_toArrayLike"+r](o,u),o},f.prototype._toArrayLikeLE=function(n,a){for(var s=0,u=0,l=0,o=0;l<this.length;l++){var r=this.words[l]<<o|u;n[s++]=r&255,s<n.length&&(n[s++]=r>>8&255),s<n.length&&(n[s++]=r>>16&255),o===6?(s<n.length&&(n[s++]=r>>24&255),u=0,o=0):(u=r>>>24,o+=2)}if(s<n.length)for(n[s++]=u;s<n.length;)n[s++]=0},f.prototype._toArrayLikeBE=function(n,a){for(var s=n.length-1,u=0,l=0,o=0;l<this.length;l++){var r=this.words[l]<<o|u;n[s--]=r&255,s>=0&&(n[s--]=r>>8&255),s>=0&&(n[s--]=r>>16&255),o===6?(s>=0&&(n[s--]=r>>24&255),u=0,o=0):(u=r>>>24,o+=2)}if(s>=0)for(n[s--]=u;s>=0;)n[s--]=0},Math.clz32?f.prototype._countBits=function(n){return 32-Math.clz32(n)}:f.prototype._countBits=function(n){var a=n,s=0;return a>=4096&&(s+=13,a>>>=13),a>=64&&(s+=7,a>>>=7),a>=8&&(s+=4,a>>>=4),a>=2&&(s+=2,a>>>=2),s+a},f.prototype._zeroBits=function(n){if(n===0)return 26;var a=n,s=0;return(a&8191)===0&&(s+=13,a>>>=13),(a&127)===0&&(s+=7,a>>>=7),(a&15)===0&&(s+=4,a>>>=4),(a&3)===0&&(s+=2,a>>>=2),(a&1)===0&&s++,s},f.prototype.bitLength=function(){var n=this.words[this.length-1],a=this._countBits(n);return(this.length-1)*26+a};function D(t){for(var n=new Array(t.bitLength()),a=0;a<n.length;a++){var s=a/26|0,u=a%26;n[a]=t.words[s]>>>u&1}return n}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var n=0,a=0;a<this.length;a++){var s=this._zeroBits(this.words[a]);if(n+=s,s!==26)break}return n},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(n){return this.negative!==0?this.abs().inotn(n).iaddn(1):this.clone()},f.prototype.fromTwos=function(n){return this.testn(n-1)?this.notn(n).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(n){for(;this.length<n.length;)this.words[this.length++]=0;for(var a=0;a<n.length;a++)this.words[a]=this.words[a]|n.words[a];return this._strip()},f.prototype.ior=function(n){return p((this.negative|n.negative)===0),this.iuor(n)},f.prototype.or=function(n){return this.length>n.length?this.clone().ior(n):n.clone().ior(this)},f.prototype.uor=function(n){return this.length>n.length?this.clone().iuor(n):n.clone().iuor(this)},f.prototype.iuand=function(n){var a;this.length>n.length?a=n:a=this;for(var s=0;s<a.length;s++)this.words[s]=this.words[s]&n.words[s];return this.length=a.length,this._strip()},f.prototype.iand=function(n){return p((this.negative|n.negative)===0),this.iuand(n)},f.prototype.and=function(n){return this.length>n.length?this.clone().iand(n):n.clone().iand(this)},f.prototype.uand=function(n){return this.length>n.length?this.clone().iuand(n):n.clone().iuand(this)},f.prototype.iuxor=function(n){var a,s;this.length>n.length?(a=this,s=n):(a=n,s=this);for(var u=0;u<s.length;u++)this.words[u]=a.words[u]^s.words[u];if(this!==a)for(;u<a.length;u++)this.words[u]=a.words[u];return this.length=a.length,this._strip()},f.prototype.ixor=function(n){return p((this.negative|n.negative)===0),this.iuxor(n)},f.prototype.xor=function(n){return this.length>n.length?this.clone().ixor(n):n.clone().ixor(this)},f.prototype.uxor=function(n){return this.length>n.length?this.clone().iuxor(n):n.clone().iuxor(this)},f.prototype.inotn=function(n){p(typeof n=="number"&&n>=0);var a=Math.ceil(n/26)|0,s=n%26;this._expand(a),s>0&&a--;for(var u=0;u<a;u++)this.words[u]=~this.words[u]&67108863;return s>0&&(this.words[u]=~this.words[u]&67108863>>26-s),this._strip()},f.prototype.notn=function(n){return this.clone().inotn(n)},f.prototype.setn=function(n,a){p(typeof n=="number"&&n>=0);var s=n/26|0,u=n%26;return this._expand(s+1),a?this.words[s]=this.words[s]|1<<u:this.words[s]=this.words[s]&~(1<<u),this._strip()},f.prototype.iadd=function(n){var a;if(this.negative!==0&&n.negative===0)return this.negative=0,a=this.isub(n),this.negative^=1,this._normSign();if(this.negative===0&&n.negative!==0)return n.negative=0,a=this.isub(n),n.negative=1,a._normSign();var s,u;this.length>n.length?(s=this,u=n):(s=n,u=this);for(var l=0,o=0;o<u.length;o++)a=(s.words[o]|0)+(u.words[o]|0)+l,this.words[o]=a&67108863,l=a>>>26;for(;l!==0&&o<s.length;o++)a=(s.words[o]|0)+l,this.words[o]=a&67108863,l=a>>>26;if(this.length=s.length,l!==0)this.words[this.length]=l,this.length++;else if(s!==this)for(;o<s.length;o++)this.words[o]=s.words[o];return this},f.prototype.add=function(n){var a;return n.negative!==0&&this.negative===0?(n.negative=0,a=this.sub(n),n.negative^=1,a):n.negative===0&&this.negative!==0?(this.negative=0,a=n.sub(this),this.negative=1,a):this.length>n.length?this.clone().iadd(n):n.clone().iadd(this)},f.prototype.isub=function(n){if(n.negative!==0){n.negative=0;var a=this.iadd(n);return n.negative=1,a._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(n),this.negative=1,this._normSign();var s=this.cmp(n);if(s===0)return this.negative=0,this.length=1,this.words[0]=0,this;var u,l;s>0?(u=this,l=n):(u=n,l=this);for(var o=0,r=0;r<l.length;r++)a=(u.words[r]|0)-(l.words[r]|0)+o,o=a>>26,this.words[r]=a&67108863;for(;o!==0&&r<u.length;r++)a=(u.words[r]|0)+o,o=a>>26,this.words[r]=a&67108863;if(o===0&&r<u.length&&u!==this)for(;r<u.length;r++)this.words[r]=u.words[r];return this.length=Math.max(this.length,r),u!==this&&(this.negative=1),this._strip()},f.prototype.sub=function(n){return this.clone().isub(n)};function C(t,n,a){a.negative=n.negative^t.negative;var s=t.length+n.length|0;a.length=s,s=s-1|0;var u=t.words[0]|0,l=n.words[0]|0,o=u*l,r=o&67108863,h=o/67108864|0;a.words[0]=r;for(var b=1;b<s;b++){for(var E=h>>>26,L=h&67108863,Y=Math.min(b,n.length-1),K=Math.max(0,b-t.length+1);K<=Y;K++){var q=b-K|0;u=t.words[q]|0,l=n.words[K]|0,o=u*l+L,E+=o/67108864|0,L=o&67108863}a.words[b]=L|0,h=E|0}return h!==0?a.words[b]=h|0:a.length--,a._strip()}var $=function(n,a,s){var u=n.words,l=a.words,o=s.words,r=0,h,b,E,L=u[0]|0,Y=L&8191,K=L>>>13,q=u[1]|0,P=q&8191,W=q>>>13,J=u[2]|0,X=J&8191,U=J>>>13,re=u[3]|0,Ie=re&8191,ue=re>>>13,he=u[4]|0,$e=he&8191,me=he>>>13,se=u[5]|0,De=se&8191,de=se>>>13,ye=u[6]|0,Ce=ye&8191,pe=ye>>>13,_e=u[7]|0,Ue=_e&8191,xe=_e>>>13,Ae=u[8]|0,je=Ae&8191,j=Ae>>>13,k=u[9]|0,O=k&8191,G=k>>>13,te=l[0]|0,ce=te&8191,fe=te>>>13,we=l[1]|0,Ne=we&8191,be=we>>>13,Se=l[2]|0,Oe=Se&8191,qe=Se>>>13,ke=l[3]|0,We=ke&8191,Re=ke>>>13,Te=l[4]|0,Ke=Te&8191,z=Te>>>13,T=l[5]|0,F=T&8191,Z=T>>>13,ie=l[6]|0,ve=ie&8191,oe=ie>>>13,Me=l[7]|0,Le=Me&8191,ge=Me>>>13,Be=l[8]|0,Fe=Be&8191,Ee=Be>>>13,Pe=l[9]|0,He=Pe&8191,ze=Pe>>>13;s.negative=n.negative^a.negative,s.length=19,h=Math.imul(Y,ce),b=Math.imul(Y,fe),b=b+Math.imul(K,ce)|0,E=Math.imul(K,fe);var Ge=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,h=Math.imul(P,ce),b=Math.imul(P,fe),b=b+Math.imul(W,ce)|0,E=Math.imul(W,fe),h=h+Math.imul(Y,Ne)|0,b=b+Math.imul(Y,be)|0,b=b+Math.imul(K,Ne)|0,E=E+Math.imul(K,be)|0;var Ze=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,h=Math.imul(X,ce),b=Math.imul(X,fe),b=b+Math.imul(U,ce)|0,E=Math.imul(U,fe),h=h+Math.imul(P,Ne)|0,b=b+Math.imul(P,be)|0,b=b+Math.imul(W,Ne)|0,E=E+Math.imul(W,be)|0,h=h+Math.imul(Y,Oe)|0,b=b+Math.imul(Y,qe)|0,b=b+Math.imul(K,Oe)|0,E=E+Math.imul(K,qe)|0;var Ve=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,h=Math.imul(Ie,ce),b=Math.imul(Ie,fe),b=b+Math.imul(ue,ce)|0,E=Math.imul(ue,fe),h=h+Math.imul(X,Ne)|0,b=b+Math.imul(X,be)|0,b=b+Math.imul(U,Ne)|0,E=E+Math.imul(U,be)|0,h=h+Math.imul(P,Oe)|0,b=b+Math.imul(P,qe)|0,b=b+Math.imul(W,Oe)|0,E=E+Math.imul(W,qe)|0,h=h+Math.imul(Y,We)|0,b=b+Math.imul(Y,Re)|0,b=b+Math.imul(K,We)|0,E=E+Math.imul(K,Re)|0;var Xe=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,h=Math.imul($e,ce),b=Math.imul($e,fe),b=b+Math.imul(me,ce)|0,E=Math.imul(me,fe),h=h+Math.imul(Ie,Ne)|0,b=b+Math.imul(Ie,be)|0,b=b+Math.imul(ue,Ne)|0,E=E+Math.imul(ue,be)|0,h=h+Math.imul(X,Oe)|0,b=b+Math.imul(X,qe)|0,b=b+Math.imul(U,Oe)|0,E=E+Math.imul(U,qe)|0,h=h+Math.imul(P,We)|0,b=b+Math.imul(P,Re)|0,b=b+Math.imul(W,We)|0,E=E+Math.imul(W,Re)|0,h=h+Math.imul(Y,Ke)|0,b=b+Math.imul(Y,z)|0,b=b+Math.imul(K,Ke)|0,E=E+Math.imul(K,z)|0;var Je=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Je>>>26)|0,Je&=67108863,h=Math.imul(De,ce),b=Math.imul(De,fe),b=b+Math.imul(de,ce)|0,E=Math.imul(de,fe),h=h+Math.imul($e,Ne)|0,b=b+Math.imul($e,be)|0,b=b+Math.imul(me,Ne)|0,E=E+Math.imul(me,be)|0,h=h+Math.imul(Ie,Oe)|0,b=b+Math.imul(Ie,qe)|0,b=b+Math.imul(ue,Oe)|0,E=E+Math.imul(ue,qe)|0,h=h+Math.imul(X,We)|0,b=b+Math.imul(X,Re)|0,b=b+Math.imul(U,We)|0,E=E+Math.imul(U,Re)|0,h=h+Math.imul(P,Ke)|0,b=b+Math.imul(P,z)|0,b=b+Math.imul(W,Ke)|0,E=E+Math.imul(W,z)|0,h=h+Math.imul(Y,F)|0,b=b+Math.imul(Y,Z)|0,b=b+Math.imul(K,F)|0,E=E+Math.imul(K,Z)|0;var Ye=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,h=Math.imul(Ce,ce),b=Math.imul(Ce,fe),b=b+Math.imul(pe,ce)|0,E=Math.imul(pe,fe),h=h+Math.imul(De,Ne)|0,b=b+Math.imul(De,be)|0,b=b+Math.imul(de,Ne)|0,E=E+Math.imul(de,be)|0,h=h+Math.imul($e,Oe)|0,b=b+Math.imul($e,qe)|0,b=b+Math.imul(me,Oe)|0,E=E+Math.imul(me,qe)|0,h=h+Math.imul(Ie,We)|0,b=b+Math.imul(Ie,Re)|0,b=b+Math.imul(ue,We)|0,E=E+Math.imul(ue,Re)|0,h=h+Math.imul(X,Ke)|0,b=b+Math.imul(X,z)|0,b=b+Math.imul(U,Ke)|0,E=E+Math.imul(U,z)|0,h=h+Math.imul(P,F)|0,b=b+Math.imul(P,Z)|0,b=b+Math.imul(W,F)|0,E=E+Math.imul(W,Z)|0,h=h+Math.imul(Y,ve)|0,b=b+Math.imul(Y,oe)|0,b=b+Math.imul(K,ve)|0,E=E+Math.imul(K,oe)|0;var Qe=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,h=Math.imul(Ue,ce),b=Math.imul(Ue,fe),b=b+Math.imul(xe,ce)|0,E=Math.imul(xe,fe),h=h+Math.imul(Ce,Ne)|0,b=b+Math.imul(Ce,be)|0,b=b+Math.imul(pe,Ne)|0,E=E+Math.imul(pe,be)|0,h=h+Math.imul(De,Oe)|0,b=b+Math.imul(De,qe)|0,b=b+Math.imul(de,Oe)|0,E=E+Math.imul(de,qe)|0,h=h+Math.imul($e,We)|0,b=b+Math.imul($e,Re)|0,b=b+Math.imul(me,We)|0,E=E+Math.imul(me,Re)|0,h=h+Math.imul(Ie,Ke)|0,b=b+Math.imul(Ie,z)|0,b=b+Math.imul(ue,Ke)|0,E=E+Math.imul(ue,z)|0,h=h+Math.imul(X,F)|0,b=b+Math.imul(X,Z)|0,b=b+Math.imul(U,F)|0,E=E+Math.imul(U,Z)|0,h=h+Math.imul(P,ve)|0,b=b+Math.imul(P,oe)|0,b=b+Math.imul(W,ve)|0,E=E+Math.imul(W,oe)|0,h=h+Math.imul(Y,Le)|0,b=b+Math.imul(Y,ge)|0,b=b+Math.imul(K,Le)|0,E=E+Math.imul(K,ge)|0;var er=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(er>>>26)|0,er&=67108863,h=Math.imul(je,ce),b=Math.imul(je,fe),b=b+Math.imul(j,ce)|0,E=Math.imul(j,fe),h=h+Math.imul(Ue,Ne)|0,b=b+Math.imul(Ue,be)|0,b=b+Math.imul(xe,Ne)|0,E=E+Math.imul(xe,be)|0,h=h+Math.imul(Ce,Oe)|0,b=b+Math.imul(Ce,qe)|0,b=b+Math.imul(pe,Oe)|0,E=E+Math.imul(pe,qe)|0,h=h+Math.imul(De,We)|0,b=b+Math.imul(De,Re)|0,b=b+Math.imul(de,We)|0,E=E+Math.imul(de,Re)|0,h=h+Math.imul($e,Ke)|0,b=b+Math.imul($e,z)|0,b=b+Math.imul(me,Ke)|0,E=E+Math.imul(me,z)|0,h=h+Math.imul(Ie,F)|0,b=b+Math.imul(Ie,Z)|0,b=b+Math.imul(ue,F)|0,E=E+Math.imul(ue,Z)|0,h=h+Math.imul(X,ve)|0,b=b+Math.imul(X,oe)|0,b=b+Math.imul(U,ve)|0,E=E+Math.imul(U,oe)|0,h=h+Math.imul(P,Le)|0,b=b+Math.imul(P,ge)|0,b=b+Math.imul(W,Le)|0,E=E+Math.imul(W,ge)|0,h=h+Math.imul(Y,Fe)|0,b=b+Math.imul(Y,Ee)|0,b=b+Math.imul(K,Fe)|0,E=E+Math.imul(K,Ee)|0;var rr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(rr>>>26)|0,rr&=67108863,h=Math.imul(O,ce),b=Math.imul(O,fe),b=b+Math.imul(G,ce)|0,E=Math.imul(G,fe),h=h+Math.imul(je,Ne)|0,b=b+Math.imul(je,be)|0,b=b+Math.imul(j,Ne)|0,E=E+Math.imul(j,be)|0,h=h+Math.imul(Ue,Oe)|0,b=b+Math.imul(Ue,qe)|0,b=b+Math.imul(xe,Oe)|0,E=E+Math.imul(xe,qe)|0,h=h+Math.imul(Ce,We)|0,b=b+Math.imul(Ce,Re)|0,b=b+Math.imul(pe,We)|0,E=E+Math.imul(pe,Re)|0,h=h+Math.imul(De,Ke)|0,b=b+Math.imul(De,z)|0,b=b+Math.imul(de,Ke)|0,E=E+Math.imul(de,z)|0,h=h+Math.imul($e,F)|0,b=b+Math.imul($e,Z)|0,b=b+Math.imul(me,F)|0,E=E+Math.imul(me,Z)|0,h=h+Math.imul(Ie,ve)|0,b=b+Math.imul(Ie,oe)|0,b=b+Math.imul(ue,ve)|0,E=E+Math.imul(ue,oe)|0,h=h+Math.imul(X,Le)|0,b=b+Math.imul(X,ge)|0,b=b+Math.imul(U,Le)|0,E=E+Math.imul(U,ge)|0,h=h+Math.imul(P,Fe)|0,b=b+Math.imul(P,Ee)|0,b=b+Math.imul(W,Fe)|0,E=E+Math.imul(W,Ee)|0,h=h+Math.imul(Y,He)|0,b=b+Math.imul(Y,ze)|0,b=b+Math.imul(K,He)|0,E=E+Math.imul(K,ze)|0;var tr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(tr>>>26)|0,tr&=67108863,h=Math.imul(O,Ne),b=Math.imul(O,be),b=b+Math.imul(G,Ne)|0,E=Math.imul(G,be),h=h+Math.imul(je,Oe)|0,b=b+Math.imul(je,qe)|0,b=b+Math.imul(j,Oe)|0,E=E+Math.imul(j,qe)|0,h=h+Math.imul(Ue,We)|0,b=b+Math.imul(Ue,Re)|0,b=b+Math.imul(xe,We)|0,E=E+Math.imul(xe,Re)|0,h=h+Math.imul(Ce,Ke)|0,b=b+Math.imul(Ce,z)|0,b=b+Math.imul(pe,Ke)|0,E=E+Math.imul(pe,z)|0,h=h+Math.imul(De,F)|0,b=b+Math.imul(De,Z)|0,b=b+Math.imul(de,F)|0,E=E+Math.imul(de,Z)|0,h=h+Math.imul($e,ve)|0,b=b+Math.imul($e,oe)|0,b=b+Math.imul(me,ve)|0,E=E+Math.imul(me,oe)|0,h=h+Math.imul(Ie,Le)|0,b=b+Math.imul(Ie,ge)|0,b=b+Math.imul(ue,Le)|0,E=E+Math.imul(ue,ge)|0,h=h+Math.imul(X,Fe)|0,b=b+Math.imul(X,Ee)|0,b=b+Math.imul(U,Fe)|0,E=E+Math.imul(U,Ee)|0,h=h+Math.imul(P,He)|0,b=b+Math.imul(P,ze)|0,b=b+Math.imul(W,He)|0,E=E+Math.imul(W,ze)|0;var ir=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(ir>>>26)|0,ir&=67108863,h=Math.imul(O,Oe),b=Math.imul(O,qe),b=b+Math.imul(G,Oe)|0,E=Math.imul(G,qe),h=h+Math.imul(je,We)|0,b=b+Math.imul(je,Re)|0,b=b+Math.imul(j,We)|0,E=E+Math.imul(j,Re)|0,h=h+Math.imul(Ue,Ke)|0,b=b+Math.imul(Ue,z)|0,b=b+Math.imul(xe,Ke)|0,E=E+Math.imul(xe,z)|0,h=h+Math.imul(Ce,F)|0,b=b+Math.imul(Ce,Z)|0,b=b+Math.imul(pe,F)|0,E=E+Math.imul(pe,Z)|0,h=h+Math.imul(De,ve)|0,b=b+Math.imul(De,oe)|0,b=b+Math.imul(de,ve)|0,E=E+Math.imul(de,oe)|0,h=h+Math.imul($e,Le)|0,b=b+Math.imul($e,ge)|0,b=b+Math.imul(me,Le)|0,E=E+Math.imul(me,ge)|0,h=h+Math.imul(Ie,Fe)|0,b=b+Math.imul(Ie,Ee)|0,b=b+Math.imul(ue,Fe)|0,E=E+Math.imul(ue,Ee)|0,h=h+Math.imul(X,He)|0,b=b+Math.imul(X,ze)|0,b=b+Math.imul(U,He)|0,E=E+Math.imul(U,ze)|0;var nr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(nr>>>26)|0,nr&=67108863,h=Math.imul(O,We),b=Math.imul(O,Re),b=b+Math.imul(G,We)|0,E=Math.imul(G,Re),h=h+Math.imul(je,Ke)|0,b=b+Math.imul(je,z)|0,b=b+Math.imul(j,Ke)|0,E=E+Math.imul(j,z)|0,h=h+Math.imul(Ue,F)|0,b=b+Math.imul(Ue,Z)|0,b=b+Math.imul(xe,F)|0,E=E+Math.imul(xe,Z)|0,h=h+Math.imul(Ce,ve)|0,b=b+Math.imul(Ce,oe)|0,b=b+Math.imul(pe,ve)|0,E=E+Math.imul(pe,oe)|0,h=h+Math.imul(De,Le)|0,b=b+Math.imul(De,ge)|0,b=b+Math.imul(de,Le)|0,E=E+Math.imul(de,ge)|0,h=h+Math.imul($e,Fe)|0,b=b+Math.imul($e,Ee)|0,b=b+Math.imul(me,Fe)|0,E=E+Math.imul(me,Ee)|0,h=h+Math.imul(Ie,He)|0,b=b+Math.imul(Ie,ze)|0,b=b+Math.imul(ue,He)|0,E=E+Math.imul(ue,ze)|0;var ar=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(ar>>>26)|0,ar&=67108863,h=Math.imul(O,Ke),b=Math.imul(O,z),b=b+Math.imul(G,Ke)|0,E=Math.imul(G,z),h=h+Math.imul(je,F)|0,b=b+Math.imul(je,Z)|0,b=b+Math.imul(j,F)|0,E=E+Math.imul(j,Z)|0,h=h+Math.imul(Ue,ve)|0,b=b+Math.imul(Ue,oe)|0,b=b+Math.imul(xe,ve)|0,E=E+Math.imul(xe,oe)|0,h=h+Math.imul(Ce,Le)|0,b=b+Math.imul(Ce,ge)|0,b=b+Math.imul(pe,Le)|0,E=E+Math.imul(pe,ge)|0,h=h+Math.imul(De,Fe)|0,b=b+Math.imul(De,Ee)|0,b=b+Math.imul(de,Fe)|0,E=E+Math.imul(de,Ee)|0,h=h+Math.imul($e,He)|0,b=b+Math.imul($e,ze)|0,b=b+Math.imul(me,He)|0,E=E+Math.imul(me,ze)|0;var fr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(fr>>>26)|0,fr&=67108863,h=Math.imul(O,F),b=Math.imul(O,Z),b=b+Math.imul(G,F)|0,E=Math.imul(G,Z),h=h+Math.imul(je,ve)|0,b=b+Math.imul(je,oe)|0,b=b+Math.imul(j,ve)|0,E=E+Math.imul(j,oe)|0,h=h+Math.imul(Ue,Le)|0,b=b+Math.imul(Ue,ge)|0,b=b+Math.imul(xe,Le)|0,E=E+Math.imul(xe,ge)|0,h=h+Math.imul(Ce,Fe)|0,b=b+Math.imul(Ce,Ee)|0,b=b+Math.imul(pe,Fe)|0,E=E+Math.imul(pe,Ee)|0,h=h+Math.imul(De,He)|0,b=b+Math.imul(De,ze)|0,b=b+Math.imul(de,He)|0,E=E+Math.imul(de,ze)|0;var or=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(or>>>26)|0,or&=67108863,h=Math.imul(O,ve),b=Math.imul(O,oe),b=b+Math.imul(G,ve)|0,E=Math.imul(G,oe),h=h+Math.imul(je,Le)|0,b=b+Math.imul(je,ge)|0,b=b+Math.imul(j,Le)|0,E=E+Math.imul(j,ge)|0,h=h+Math.imul(Ue,Fe)|0,b=b+Math.imul(Ue,Ee)|0,b=b+Math.imul(xe,Fe)|0,E=E+Math.imul(xe,Ee)|0,h=h+Math.imul(Ce,He)|0,b=b+Math.imul(Ce,ze)|0,b=b+Math.imul(pe,He)|0,E=E+Math.imul(pe,ze)|0;var sr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(sr>>>26)|0,sr&=67108863,h=Math.imul(O,Le),b=Math.imul(O,ge),b=b+Math.imul(G,Le)|0,E=Math.imul(G,ge),h=h+Math.imul(je,Fe)|0,b=b+Math.imul(je,Ee)|0,b=b+Math.imul(j,Fe)|0,E=E+Math.imul(j,Ee)|0,h=h+Math.imul(Ue,He)|0,b=b+Math.imul(Ue,ze)|0,b=b+Math.imul(xe,He)|0,E=E+Math.imul(xe,ze)|0;var hr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(hr>>>26)|0,hr&=67108863,h=Math.imul(O,Fe),b=Math.imul(O,Ee),b=b+Math.imul(G,Fe)|0,E=Math.imul(G,Ee),h=h+Math.imul(je,He)|0,b=b+Math.imul(je,ze)|0,b=b+Math.imul(j,He)|0,E=E+Math.imul(j,ze)|0;var ur=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(ur>>>26)|0,ur&=67108863,h=Math.imul(O,He),b=Math.imul(O,ze),b=b+Math.imul(G,He)|0,E=Math.imul(G,ze);var lr=(r+h|0)+((b&8191)<<13)|0;return r=(E+(b>>>13)|0)+(lr>>>26)|0,lr&=67108863,o[0]=Ge,o[1]=Ze,o[2]=Ve,o[3]=Xe,o[4]=Je,o[5]=Ye,o[6]=Qe,o[7]=er,o[8]=rr,o[9]=tr,o[10]=ir,o[11]=nr,o[12]=ar,o[13]=fr,o[14]=or,o[15]=sr,o[16]=hr,o[17]=ur,o[18]=lr,r!==0&&(o[19]=r,s.length++),s};Math.imul||($=C);function H(t,n,a){a.negative=n.negative^t.negative,a.length=t.length+n.length;for(var s=0,u=0,l=0;l<a.length-1;l++){var o=u;u=0;for(var r=s&67108863,h=Math.min(l,n.length-1),b=Math.max(0,l-t.length+1);b<=h;b++){var E=l-b,L=t.words[E]|0,Y=n.words[b]|0,K=L*Y,q=K&67108863;o=o+(K/67108864|0)|0,q=q+r|0,r=q&67108863,o=o+(q>>>26)|0,u+=o>>>26,o&=67108863}a.words[l]=r,s=o,o=u}return s!==0?a.words[l]=s:a.length--,a._strip()}function N(t,n,a){return H(t,n,a)}f.prototype.mulTo=function(n,a){var s,u=this.length+n.length;return this.length===10&&n.length===10?s=$(this,n,a):u<63?s=C(this,n,a):u<1024?s=H(this,n,a):s=N(this,n,a),s},f.prototype.mul=function(n){var a=new f(null);return a.words=new Array(this.length+n.length),this.mulTo(n,a)},f.prototype.mulf=function(n){var a=new f(null);return a.words=new Array(this.length+n.length),N(this,n,a)},f.prototype.imul=function(n){return this.clone().mulTo(n,this)},f.prototype.imuln=function(n){var a=n<0;a&&(n=-n),p(typeof n=="number"),p(n<67108864);for(var s=0,u=0;u<this.length;u++){var l=(this.words[u]|0)*n,o=(l&67108863)+(s&67108863);s>>=26,s+=l/67108864|0,s+=o>>>26,this.words[u]=o&67108863}return s!==0&&(this.words[u]=s,this.length++),this.length=n===0?1:this.length,a?this.ineg():this},f.prototype.muln=function(n){return this.clone().imuln(n)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(n){var a=D(n);if(a.length===0)return new f(1);for(var s=this,u=0;u<a.length&&a[u]===0;u++,s=s.sqr());if(++u<a.length)for(var l=s.sqr();u<a.length;u++,l=l.sqr())a[u]!==0&&(s=s.mul(l));return s},f.prototype.iushln=function(n){p(typeof n=="number"&&n>=0);var a=n%26,s=(n-a)/26,u=67108863>>>26-a<<26-a,l;if(a!==0){var o=0;for(l=0;l<this.length;l++){var r=this.words[l]&u,h=(this.words[l]|0)-r<<a;this.words[l]=h|o,o=r>>>26-a}o&&(this.words[l]=o,this.length++)}if(s!==0){for(l=this.length-1;l>=0;l--)this.words[l+s]=this.words[l];for(l=0;l<s;l++)this.words[l]=0;this.length+=s}return this._strip()},f.prototype.ishln=function(n){return p(this.negative===0),this.iushln(n)},f.prototype.iushrn=function(n,a,s){p(typeof n=="number"&&n>=0);var u;a?u=(a-a%26)/26:u=0;var l=n%26,o=Math.min((n-l)/26,this.length),r=67108863^67108863>>>l<<l,h=s;if(u-=o,u=Math.max(0,u),h){for(var b=0;b<o;b++)h.words[b]=this.words[b];h.length=o}if(o!==0)if(this.length>o)for(this.length-=o,b=0;b<this.length;b++)this.words[b]=this.words[b+o];else this.words[0]=0,this.length=1;var E=0;for(b=this.length-1;b>=0&&(E!==0||b>=u);b--){var L=this.words[b]|0;this.words[b]=E<<26-l|L>>>l,E=L&r}return h&&E!==0&&(h.words[h.length++]=E),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},f.prototype.ishrn=function(n,a,s){return p(this.negative===0),this.iushrn(n,a,s)},f.prototype.shln=function(n){return this.clone().ishln(n)},f.prototype.ushln=function(n){return this.clone().iushln(n)},f.prototype.shrn=function(n){return this.clone().ishrn(n)},f.prototype.ushrn=function(n){return this.clone().iushrn(n)},f.prototype.testn=function(n){p(typeof n=="number"&&n>=0);var a=n%26,s=(n-a)/26,u=1<<a;if(this.length<=s)return!1;var l=this.words[s];return!!(l&u)},f.prototype.imaskn=function(n){p(typeof n=="number"&&n>=0);var a=n%26,s=(n-a)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=s)return this;if(a!==0&&s++,this.length=Math.min(s,this.length),a!==0){var u=67108863^67108863>>>a<<a;this.words[this.length-1]&=u}return this._strip()},f.prototype.maskn=function(n){return this.clone().imaskn(n)},f.prototype.iaddn=function(n){return p(typeof n=="number"),p(n<67108864),n<0?this.isubn(-n):this.negative!==0?this.length===1&&(this.words[0]|0)<=n?(this.words[0]=n-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(n),this.negative=1,this):this._iaddn(n)},f.prototype._iaddn=function(n){this.words[0]+=n;for(var a=0;a<this.length&&this.words[a]>=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},f.prototype.isubn=function(n){if(p(typeof n=="number"),p(n<67108864),n<0)return this.iaddn(-n);if(this.negative!==0)return this.negative=0,this.iaddn(n),this.negative=1,this;if(this.words[0]-=n,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a<this.length&&this.words[a]<0;a++)this.words[a]+=67108864,this.words[a+1]-=1;return this._strip()},f.prototype.addn=function(n){return this.clone().iaddn(n)},f.prototype.subn=function(n){return this.clone().isubn(n)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(n,a,s){var u=n.length+s,l;this._expand(u);var o,r=0;for(l=0;l<n.length;l++){o=(this.words[l+s]|0)+r;var h=(n.words[l]|0)*a;o-=h&67108863,r=(o>>26)-(h/67108864|0),this.words[l+s]=o&67108863}for(;l<this.length-s;l++)o=(this.words[l+s]|0)+r,r=o>>26,this.words[l+s]=o&67108863;if(r===0)return this._strip();for(p(r===-1),r=0,l=0;l<this.length;l++)o=-(this.words[l]|0)+r,r=o>>26,this.words[l]=o&67108863;return this.negative=1,this._strip()},f.prototype._wordDiv=function(n,a){var s=this.length-n.length,u=this.clone(),l=n,o=l.words[l.length-1]|0,r=this._countBits(o);s=26-r,s!==0&&(l=l.ushln(s),u.iushln(s),o=l.words[l.length-1]|0);var h=u.length-l.length,b;if(a!=="mod"){b=new f(null),b.length=h+1,b.words=new Array(b.length);for(var E=0;E<b.length;E++)b.words[E]=0}var L=u.clone()._ishlnsubmul(l,1,h);L.negative===0&&(u=L,b&&(b.words[h]=1));for(var Y=h-1;Y>=0;Y--){var K=(u.words[l.length+Y]|0)*67108864+(u.words[l.length+Y-1]|0);for(K=Math.min(K/o|0,67108863),u._ishlnsubmul(l,K,Y);u.negative!==0;)K--,u.negative=0,u._ishlnsubmul(l,1,Y),u.isZero()||(u.negative^=1);b&&(b.words[Y]=K)}return b&&b._strip(),u._strip(),a!=="div"&&s!==0&&u.iushrn(s),{div:b||null,mod:u}},f.prototype.divmod=function(n,a,s){if(p(!n.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var u,l,o;return this.negative!==0&&n.negative===0?(o=this.neg().divmod(n,a),a!=="mod"&&(u=o.div.neg()),a!=="div"&&(l=o.mod.neg(),s&&l.negative!==0&&l.iadd(n)),{div:u,mod:l}):this.negative===0&&n.negative!==0?(o=this.divmod(n.neg(),a),a!=="mod"&&(u=o.div.neg()),{div:u,mod:o.mod}):(this.negative&n.negative)!==0?(o=this.neg().divmod(n.neg(),a),a!=="div"&&(l=o.mod.neg(),s&&l.negative!==0&&l.isub(n)),{div:o.div,mod:l}):n.length>this.length||this.cmp(n)<0?{div:new f(0),mod:this}:n.length===1?a==="div"?{div:this.divn(n.words[0]),mod:null}:a==="mod"?{div:null,mod:new f(this.modrn(n.words[0]))}:{div:this.divn(n.words[0]),mod:new f(this.modrn(n.words[0]))}:this._wordDiv(n,a)},f.prototype.div=function(n){return this.divmod(n,"div",!1).div},f.prototype.mod=function(n){return this.divmod(n,"mod",!1).mod},f.prototype.umod=function(n){return this.divmod(n,"mod",!0).mod},f.prototype.divRound=function(n){var a=this.divmod(n);if(a.mod.isZero())return a.div;var s=a.div.negative!==0?a.mod.isub(n):a.mod,u=n.ushrn(1),l=n.andln(1),o=s.cmp(u);return o<0||l===1&&o===0?a.div:a.div.negative!==0?a.div.isubn(1):a.div.iaddn(1)},f.prototype.modrn=function(n){var a=n<0;a&&(n=-n),p(n<=67108863);for(var s=(1<<26)%n,u=0,l=this.length-1;l>=0;l--)u=(s*u+(this.words[l]|0))%n;return a?-u:u},f.prototype.modn=function(n){return this.modrn(n)},f.prototype.idivn=function(n){var a=n<0;a&&(n=-n),p(n<=67108863);for(var s=0,u=this.length-1;u>=0;u--){var l=(this.words[u]|0)+s*67108864;this.words[u]=l/n|0,s=l%n}return this._strip(),a?this.ineg():this},f.prototype.divn=function(n){return this.clone().idivn(n)},f.prototype.egcd=function(n){p(n.negative===0),p(!n.isZero());var a=this,s=n.clone();a.negative!==0?a=a.umod(n):a=a.clone();for(var u=new f(1),l=new f(0),o=new f(0),r=new f(1),h=0;a.isEven()&&s.isEven();)a.iushrn(1),s.iushrn(1),++h;for(var b=s.clone(),E=a.clone();!a.isZero();){for(var L=0,Y=1;(a.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(a.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(b),l.isub(E)),u.iushrn(1),l.iushrn(1);for(var K=0,q=1;(s.words[0]&q)===0&&K<26;++K,q<<=1);if(K>0)for(s.iushrn(K);K-- >0;)(o.isOdd()||r.isOdd())&&(o.iadd(b),r.isub(E)),o.iushrn(1),r.iushrn(1);a.cmp(s)>=0?(a.isub(s),u.isub(o),l.isub(r)):(s.isub(a),o.isub(u),r.isub(l))}return{a:o,b:r,gcd:s.iushln(h)}},f.prototype._invmp=function(n){p(n.negative===0),p(!n.isZero());var a=this,s=n.clone();a.negative!==0?a=a.umod(n):a=a.clone();for(var u=new f(1),l=new f(0),o=s.clone();a.cmpn(1)>0&&s.cmpn(1)>0;){for(var r=0,h=1;(a.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(a.iushrn(r);r-- >0;)u.isOdd()&&u.iadd(o),u.iushrn(1);for(var b=0,E=1;(s.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(s.iushrn(b);b-- >0;)l.isOdd()&&l.iadd(o),l.iushrn(1);a.cmp(s)>=0?(a.isub(s),u.isub(l)):(s.isub(a),l.isub(u))}var L;return a.cmpn(1)===0?L=u:L=l,L.cmpn(0)<0&&L.iadd(n),L},f.prototype.gcd=function(n){if(this.isZero())return n.abs();if(n.isZero())return this.abs();var a=this.clone(),s=n.clone();a.negative=0,s.negative=0;for(var u=0;a.isEven()&&s.isEven();u++)a.iushrn(1),s.iushrn(1);do{for(;a.isEven();)a.iushrn(1);for(;s.isEven();)s.iushrn(1);var l=a.cmp(s);if(l<0){var o=a;a=s,s=o}else if(l===0||s.cmpn(1)===0)break;a.isub(s)}while(!0);return s.iushln(u)},f.prototype.invm=function(n){return this.egcd(n).a.umod(n)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(n){return this.words[0]&n},f.prototype.bincn=function(n){p(typeof n=="number");var a=n%26,s=(n-a)/26,u=1<<a;if(this.length<=s)return this._expand(s+1),this.words[s]|=u,this;for(var l=u,o=s;l!==0&&o<this.length;o++){var r=this.words[o]|0;r+=l,l=r>>>26,r&=67108863,this.words[o]=r}return l!==0&&(this.words[o]=l,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(n){var a=n<0;if(this.negative!==0&&!a)return-1;if(this.negative===0&&a)return 1;this._strip();var s;if(this.length>1)s=1;else{a&&(n=-n),p(n<=67108863,"Number is too big");var u=this.words[0]|0;s=u===n?0:u<n?-1:1}return this.negative!==0?-s|0:s},f.prototype.cmp=function(n){if(this.negative!==0&&n.negative===0)return-1;if(this.negative===0&&n.negative!==0)return 1;var a=this.ucmp(n);return this.negative!==0?-a|0:a},f.prototype.ucmp=function(n){if(this.length>n.length)return 1;if(this.length<n.length)return-1;for(var a=0,s=this.length-1;s>=0;s--){var u=this.words[s]|0,l=n.words[s]|0;if(u!==l){u<l?a=-1:u>l&&(a=1);break}}return a},f.prototype.gtn=function(n){return this.cmpn(n)===1},f.prototype.gt=function(n){return this.cmp(n)===1},f.prototype.gten=function(n){return this.cmpn(n)>=0},f.prototype.gte=function(n){return this.cmp(n)>=0},f.prototype.ltn=function(n){return this.cmpn(n)===-1},f.prototype.lt=function(n){return this.cmp(n)===-1},f.prototype.lten=function(n){return this.cmpn(n)<=0},f.prototype.lte=function(n){return this.cmp(n)<=0},f.prototype.eqn=function(n){return this.cmpn(n)===0},f.prototype.eq=function(n){return this.cmp(n)===0},f.red=function(n){return new c(n)},f.prototype.toRed=function(n){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),n.convertTo(this)._forceRed(n)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(n){return this.red=n,this},f.prototype.forceRed=function(n){return p(!this.red,"Already a number in reduction context"),this._forceRed(n)},f.prototype.redAdd=function(n){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,n)},f.prototype.redIAdd=function(n){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,n)},f.prototype.redSub=function(n){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,n)},f.prototype.redISub=function(n){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,n)},f.prototype.redShl=function(n){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,n)},f.prototype.redMul=function(n){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.mul(this,n)},f.prototype.redIMul=function(n){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.imul(this,n)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(n){return p(this.red&&!n.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,n)};var V={k256:null,p224:null,p192:null,p25519:null};function Q(t,n){this.name=t,this.p=new f(n,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Q.prototype._tmp=function(){var n=new f(null);return n.words=new Array(Math.ceil(this.n/13)),n},Q.prototype.ireduce=function(n){var a=n,s;do this.split(a,this.tmp),a=this.imulK(a),a=a.iadd(this.tmp),s=a.bitLength();while(s>this.n);var u=s<this.n?-1:a.ucmp(this.p);return u===0?(a.words[0]=0,a.length=1):u>0?a.isub(this.p):a.strip!==void 0?a.strip():a._strip(),a},Q.prototype.split=function(n,a){n.iushrn(this.n,0,a)},Q.prototype.imulK=function(n){return n.imul(this.k)};function ne(){Q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(ne,Q),ne.prototype.split=function(n,a){for(var s=4194303,u=Math.min(n.length,9),l=0;l<u;l++)a.words[l]=n.words[l];if(a.length=u,n.length<=9){n.words[0]=0,n.length=1;return}var o=n.words[9];for(a.words[a.length++]=o&s,l=10;l<n.length;l++){var r=n.words[l]|0;n.words[l-10]=(r&s)<<4|o>>>22,o=r}o>>>=22,n.words[l-10]=o,o===0&&n.length>10?n.length-=10:n.length-=9},ne.prototype.imulK=function(n){n.words[n.length]=0,n.words[n.length+1]=0,n.length+=2;for(var a=0,s=0;s<n.length;s++){var u=n.words[s]|0;a+=u*977,n.words[s]=a&67108863,a=u*64+(a/67108864|0)}return n.words[n.length-1]===0&&(n.length--,n.words[n.length-1]===0&&n.length--),n};function ae(){Q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(ae,Q);function ee(){Q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ee,Q);function le(){Q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(le,Q),le.prototype.imulK=function(n){for(var a=0,s=0;s<n.length;s++){var u=(n.words[s]|0)*19+a,l=u&67108863;u>>>=26,n.words[s]=l,a=u}return a!==0&&(n.words[n.length++]=a),n},f._prime=function(n){if(V[n])return V[n];var a;if(n==="k256")a=new ne;else if(n==="p224")a=new ae;else if(n==="p192")a=new ee;else if(n==="p25519")a=new le;else throw new Error("Unknown prime "+n);return V[n]=a,a};function c(t){if(typeof t=="string"){var n=f._prime(t);this.m=n.p,this.prime=n}else p(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}c.prototype._verify1=function(n){p(n.negative===0,"red works only with positives"),p(n.red,"red works only with red numbers")},c.prototype._verify2=function(n,a){p((n.negative|a.negative)===0,"red works only with positives"),p(n.red&&n.red===a.red,"red works only with red numbers")},c.prototype.imod=function(n){return this.prime?this.prime.ireduce(n)._forceRed(this):(d(n,n.umod(this.m)._forceRed(this)),n)},c.prototype.neg=function(n){return n.isZero()?n.clone():this.m.sub(n)._forceRed(this)},c.prototype.add=function(n,a){this._verify2(n,a);var s=n.add(a);return s.cmp(this.m)>=0&&s.isub(this.m),s._forceRed(this)},c.prototype.iadd=function(n,a){this._verify2(n,a);var s=n.iadd(a);return s.cmp(this.m)>=0&&s.isub(this.m),s},c.prototype.sub=function(n,a){this._verify2(n,a);var s=n.sub(a);return s.cmpn(0)<0&&s.iadd(this.m),s._forceRed(this)},c.prototype.isub=function(n,a){this._verify2(n,a);var s=n.isub(a);return s.cmpn(0)<0&&s.iadd(this.m),s},c.prototype.shl=function(n,a){return this._verify1(n),this.imod(n.ushln(a))},c.prototype.imul=function(n,a){return this._verify2(n,a),this.imod(n.imul(a))},c.prototype.mul=function(n,a){return this._verify2(n,a),this.imod(n.mul(a))},c.prototype.isqr=function(n){return this.imul(n,n.clone())},c.prototype.sqr=function(n){return this.mul(n,n)},c.prototype.sqrt=function(n){if(n.isZero())return n.clone();var a=this.m.andln(3);if(p(a%2===1),a===3){var s=this.m.add(new f(1)).iushrn(2);return this.pow(n,s)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);p(!u.isZero());var o=new f(1).toRed(this),r=o.redNeg(),h=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new f(2*b*b).toRed(this);this.pow(b,h).cmp(r)!==0;)b.redIAdd(r);for(var E=this.pow(b,u),L=this.pow(n,u.addn(1).iushrn(1)),Y=this.pow(n,u),K=l;Y.cmp(o)!==0;){for(var q=Y,P=0;q.cmp(o)!==0;P++)q=q.redSqr();p(P<K);var W=this.pow(E,new f(1).iushln(K-P-1));L=L.redMul(W),E=W.redSqr(),Y=Y.redMul(E),K=P}return L},c.prototype.invm=function(n){var a=n._invmp(this.m);return a.negative!==0?(a.negative=0,this.imod(a).redNeg()):this.imod(a)},c.prototype.pow=function(n,a){if(a.isZero())return new f(1).toRed(this);if(a.cmpn(1)===0)return n.clone();var s=4,u=new Array(1<<s);u[0]=new f(1).toRed(this),u[1]=n;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],n);var o=u[0],r=0,h=0,b=a.bitLength()%26;for(b===0&&(b=26),l=a.length-1;l>=0;l--){for(var E=a.words[l],L=b-1;L>=0;L--){var Y=E>>L&1;if(o!==u[0]&&(o=this.sqr(o)),Y===0&&r===0){h=0;continue}r<<=1,r|=Y,h++,!(h!==s&&(l!==0||L!==0))&&(o=this.mul(o,u[r]),h=0,r=0)}b=26}return o},c.prototype.convertTo=function(n){var a=n.umod(this.m);return a===n?a.clone():a},c.prototype.convertFrom=function(n){var a=n.clone();return a.red=null,a},f.mont=function(n){return new e(n)};function e(t){c.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(e,c),e.prototype.convertTo=function(n){return this.imod(n.ushln(this.shift))},e.prototype.convertFrom=function(n){var a=this.imod(n.mul(this.rinv));return a.red=null,a},e.prototype.imul=function(n,a){if(n.isZero()||a.isZero())return n.words[0]=0,n.length=1,n;var s=n.imul(a),u=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=s.isub(u).iushrn(this.shift),o=l;return l.cmp(this.m)>=0?o=l.isub(this.m):l.cmpn(0)<0&&(o=l.iadd(this.m)),o._forceRed(this)},e.prototype.mul=function(n,a){if(n.isZero()||a.isZero())return new f(0)._forceRed(this);var s=n.mul(a),u=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=s.isub(u).iushrn(this.shift),o=l;return l.cmp(this.m)>=0?o=l.isub(this.m):l.cmpn(0)<0&&(o=l.iadd(this.m)),o._forceRed(this)},e.prototype.invm=function(n){var a=this.imod(n._invmp(this.m).mul(this.r2));return a._forceRed(this)}})(_,bn$8)})(bn$9)),bn$9.exports}var browserifyRsa,hasRequiredBrowserifyRsa;function requireBrowserifyRsa(){if(hasRequiredBrowserifyRsa)return browserifyRsa;hasRequiredBrowserifyRsa=1;var _=requireBn$4(),S=requireBrowser$b(),I=requireSafeBuffer$2().Buffer;function p(w){var m=w.modulus.byteLength(),v;do v=new _(S(m));while(v.cmp(w.modulus)>=0||!v.umod(w.prime1)||!v.umod(w.prime2));return v}function R(w){var m=p(w),v=m.toRed(_.mont(w.modulus)).redPow(new _(w.publicExponent)).fromRed();return{blinder:v,unblinder:m.invm(w.modulus)}}function f(w,m){var v=R(m),y=m.modulus.byteLength(),d=new _(w).mul(v.blinder).umod(m.modulus),g=d.toRed(_.mont(m.prime1)),M=d.toRed(_.mont(m.prime2)),x=m.coefficient,B=m.prime1,A=m.prime2,D=g.redPow(m.exponent1).fromRed(),C=M.redPow(m.exponent2).fromRed(),$=D.isub(C).imul(x).umod(B).imul(A);return C.iadd($).imul(v.unblinder).umod(m.modulus).toArrayLike(I,"be",y)}return f.getr=p,browserifyRsa=f,browserifyRsa}var elliptic={};const version="6.6.1",require$$0={version};var utils$2={},bn$7={exports:{}},bn$6=bn$7.exports,hasRequiredBn$3;function requireBn$3(){return hasRequiredBn$3||(hasRequiredBn$3=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$6)})(bn$7)),bn$7.exports}var utils$1={},hasRequiredUtils$2;function requireUtils$2(){return hasRequiredUtils$2||(hasRequiredUtils$2=1,(function(_){var S=_;function I(f,w){if(Array.isArray(f))return f.slice();if(!f)return[];var m=[];if(typeof f!="string"){for(var v=0;v<f.length;v++)m[v]=f[v]|0;return m}if(w==="hex"){f=f.replace(/[^a-z0-9]+/ig,""),f.length%2!==0&&(f="0"+f);for(var v=0;v<f.length;v+=2)m.push(parseInt(f[v]+f[v+1],16))}else for(var v=0;v<f.length;v++){var y=f.charCodeAt(v),d=y>>8,g=y&255;d?m.push(d,g):m.push(g)}return m}S.toArray=I;function p(f){return f.length===1?"0"+f:f}S.zero2=p;function R(f){for(var w="",m=0;m<f.length;m++)w+=p(f[m].toString(16));return w}S.toHex=R,S.encode=function(w,m){return m==="hex"?R(w):w}})(utils$1)),utils$1}var hasRequiredUtils$1;function requireUtils$1(){return hasRequiredUtils$1||(hasRequiredUtils$1=1,(function(_){var S=_,I=requireBn$3(),p=requireMinimalisticAssert(),R=requireUtils$2();S.assert=p,S.toArray=R.toArray,S.zero2=R.zero2,S.toHex=R.toHex,S.encode=R.encode;function f(d,g,M){var x=new Array(Math.max(d.bitLength(),M)+1),B;for(B=0;B<x.length;B+=1)x[B]=0;var A=1<<g+1,D=d.clone();for(B=0;B<x.length;B++){var C,$=D.andln(A-1);D.isOdd()?($>(A>>1)-1?C=(A>>1)-$:C=$,D.isubn(C)):C=0,x[B]=C,D.iushrn(1)}return x}S.getNAF=f;function w(d,g){var M=[[],[]];d=d.clone(),g=g.clone();for(var x=0,B=0,A;d.cmpn(-x)>0||g.cmpn(-B)>0;){var D=d.andln(3)+x&3,C=g.andln(3)+B&3;D===3&&(D=-1),C===3&&(C=-1);var $;(D&1)===0?$=0:(A=d.andln(7)+x&7,(A===3||A===5)&&C===2?$=-D:$=D),M[0].push($);var H;(C&1)===0?H=0:(A=g.andln(7)+B&7,(A===3||A===5)&&D===2?H=-C:H=C),M[1].push(H),2*x===$+1&&(x=1-x),2*B===H+1&&(B=1-B),d.iushrn(1),g.iushrn(1)}return M}S.getJSF=w;function m(d,g,M){var x="_"+g;d.prototype[g]=function(){return this[x]!==void 0?this[x]:this[x]=M.call(this)}}S.cachedProperty=m;function v(d){return typeof d=="string"?S.toArray(d,"hex"):d}S.parseBytes=v;function y(d){return new I(d,"hex","le")}S.intFromLE=y})(utils$2)),utils$2}var curve={},base$1,hasRequiredBase$1;function requireBase$1(){if(hasRequiredBase$1)return base$1;hasRequiredBase$1=1;var _=requireBn$3(),S=requireUtils$1(),I=S.getNAF,p=S.getJSF,R=S.assert;function f(m,v){this.type=m,this.p=new _(v.p,16),this.red=v.prime?_.red(v.prime):_.mont(this.p),this.zero=new _(0).toRed(this.red),this.one=new _(1).toRed(this.red),this.two=new _(2).toRed(this.red),this.n=v.n&&new _(v.n,16),this.g=v.g&&this.pointFromJSON(v.g,v.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var y=this.n&&this.p.div(this.n);!y||y.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}base$1=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(v,y){R(v.precomputed);var d=v._getDoubles(),g=I(y,1,this._bitLength),M=(1<<d.step+1)-(d.step%2===0?2:1);M/=3;var x=[],B,A;for(B=0;B<g.length;B+=d.step){A=0;for(var D=B+d.step-1;D>=B;D--)A=(A<<1)+g[D];x.push(A)}for(var C=this.jpoint(null,null,null),$=this.jpoint(null,null,null),H=M;H>0;H--){for(B=0;B<x.length;B++)A=x[B],A===H?$=$.mixedAdd(d.points[B]):A===-H&&($=$.mixedAdd(d.points[B].neg()));C=C.add($)}return C.toP()},f.prototype._wnafMul=function(v,y){var d=4,g=v._getNAFPoints(d);d=g.wnd;for(var M=g.points,x=I(y,d,this._bitLength),B=this.jpoint(null,null,null),A=x.length-1;A>=0;A--){for(var D=0;A>=0&&x[A]===0;A--)D++;if(A>=0&&D++,B=B.dblp(D),A<0)break;var C=x[A];R(C!==0),v.type==="affine"?C>0?B=B.mixedAdd(M[C-1>>1]):B=B.mixedAdd(M[-C-1>>1].neg()):C>0?B=B.add(M[C-1>>1]):B=B.add(M[-C-1>>1].neg())}return v.type==="affine"?B.toP():B},f.prototype._wnafMulAdd=function(v,y,d,g,M){var x=this._wnafT1,B=this._wnafT2,A=this._wnafT3,D=0,C,$,H;for(C=0;C<g;C++){H=y[C];var N=H._getNAFPoints(v);x[C]=N.wnd,B[C]=N.points}for(C=g-1;C>=1;C-=2){var V=C-1,Q=C;if(x[V]!==1||x[Q]!==1){A[V]=I(d[V],x[V],this._bitLength),A[Q]=I(d[Q],x[Q],this._bitLength),D=Math.max(A[V].length,D),D=Math.max(A[Q].length,D);continue}var ne=[y[V],null,null,y[Q]];y[V].y.cmp(y[Q].y)===0?(ne[1]=y[V].add(y[Q]),ne[2]=y[V].toJ().mixedAdd(y[Q].neg())):y[V].y.cmp(y[Q].y.redNeg())===0?(ne[1]=y[V].toJ().mixedAdd(y[Q]),ne[2]=y[V].add(y[Q].neg())):(ne[1]=y[V].toJ().mixedAdd(y[Q]),ne[2]=y[V].toJ().mixedAdd(y[Q].neg()));var ae=[-3,-1,-5,-7,0,7,5,1,3],ee=p(d[V],d[Q]);for(D=Math.max(ee[0].length,D),A[V]=new Array(D),A[Q]=new Array(D),$=0;$<D;$++){var le=ee[0][$]|0,c=ee[1][$]|0;A[V][$]=ae[(le+1)*3+(c+1)],A[Q][$]=0,B[V]=ne}}var e=this.jpoint(null,null,null),t=this._wnafT4;for(C=D;C>=0;C--){for(var n=0;C>=0;){var a=!0;for($=0;$<g;$++)t[$]=A[$][C]|0,t[$]!==0&&(a=!1);if(!a)break;n++,C--}if(C>=0&&n++,e=e.dblp(n),C<0)break;for($=0;$<g;$++){var s=t[$];s!==0&&(s>0?H=B[$][s-1>>1]:s<0&&(H=B[$][-s-1>>1].neg()),H.type==="affine"?e=e.mixedAdd(H):e=e.add(H))}}for(C=0;C<g;C++)B[C]=null;return M?e:e.toP()};function w(m,v){this.curve=m,this.type=v,this.precomputed=null}return f.BasePoint=w,w.prototype.eq=function(){throw new Error("Not implemented")},w.prototype.validate=function(){return this.curve.validate(this)},f.prototype.decodePoint=function(v,y){v=S.toArray(v,y);var d=this.p.byteLength();if((v[0]===4||v[0]===6||v[0]===7)&&v.length-1===2*d){v[0]===6?R(v[v.length-1]%2===0):v[0]===7&&R(v[v.length-1]%2===1);var g=this.point(v.slice(1,1+d),v.slice(1+d,1+2*d));return g}else if((v[0]===2||v[0]===3)&&v.length-1===d)return this.pointFromX(v.slice(1,1+d),v[0]===3);throw new Error("Unknown point format")},w.prototype.encodeCompressed=function(v){return this.encode(v,!0)},w.prototype._encode=function(v){var y=this.curve.p.byteLength(),d=this.getX().toArray("be",y);return v?[this.getY().isEven()?2:3].concat(d):[4].concat(d,this.getY().toArray("be",y))},w.prototype.encode=function(v,y){return S.encode(this._encode(y),v)},w.prototype.precompute=function(v){if(this.precomputed)return this;var y={doubles:null,naf:null,beta:null};return y.naf=this._getNAFPoints(8),y.doubles=this._getDoubles(4,v),y.beta=this._getBeta(),this.precomputed=y,this},w.prototype._hasDoubles=function(v){if(!this.precomputed)return!1;var y=this.precomputed.doubles;return y?y.points.length>=Math.ceil((v.bitLength()+1)/y.step):!1},w.prototype._getDoubles=function(v,y){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var d=[this],g=this,M=0;M<y;M+=v){for(var x=0;x<v;x++)g=g.dbl();d.push(g)}return{step:v,points:d}},w.prototype._getNAFPoints=function(v){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var y=[this],d=(1<<v)-1,g=d===1?null:this.dbl(),M=1;M<d;M++)y[M]=y[M-1].add(g);return{wnd:v,points:y}},w.prototype._getBeta=function(){return null},w.prototype.dblp=function(v){for(var y=this,d=0;d<v;d++)y=y.dbl();return y},base$1}var short,hasRequiredShort;function requireShort(){if(hasRequiredShort)return short;hasRequiredShort=1;var _=requireUtils$1(),S=requireBn$3(),I=requireInherits_browser(),p=requireBase$1(),R=_.assert;function f(v){p.call(this,"short",v),this.a=new S(v.a,16).toRed(this.red),this.b=new S(v.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(v),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}I(f,p),short=f,f.prototype._getEndomorphism=function(y){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var d,g;if(y.beta)d=new S(y.beta,16).toRed(this.red);else{var M=this._getEndoRoots(this.p);d=M[0].cmp(M[1])<0?M[0]:M[1],d=d.toRed(this.red)}if(y.lambda)g=new S(y.lambda,16);else{var x=this._getEndoRoots(this.n);this.g.mul(x[0]).x.cmp(this.g.x.redMul(d))===0?g=x[0]:(g=x[1],R(this.g.mul(g).x.cmp(this.g.x.redMul(d))===0))}var B;return y.basis?B=y.basis.map(function(A){return{a:new S(A.a,16),b:new S(A.b,16)}}):B=this._getEndoBasis(g),{beta:d,lambda:g,basis:B}}},f.prototype._getEndoRoots=function(y){var d=y===this.p?this.red:S.mont(y),g=new S(2).toRed(d).redInvm(),M=g.redNeg(),x=new S(3).toRed(d).redNeg().redSqrt().redMul(g),B=M.redAdd(x).fromRed(),A=M.redSub(x).fromRed();return[B,A]},f.prototype._getEndoBasis=function(y){for(var d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),g=y,M=this.n.clone(),x=new S(1),B=new S(0),A=new S(0),D=new S(1),C,$,H,N,V,Q,ne,ae=0,ee,le;g.cmpn(0)!==0;){var c=M.div(g);ee=M.sub(c.mul(g)),le=A.sub(c.mul(x));var e=D.sub(c.mul(B));if(!H&&ee.cmp(d)<0)C=ne.neg(),$=x,H=ee.neg(),N=le;else if(H&&++ae===2)break;ne=ee,M=g,g=ee,A=x,x=le,D=B,B=e}V=ee.neg(),Q=le;var t=H.sqr().add(N.sqr()),n=V.sqr().add(Q.sqr());return n.cmp(t)>=0&&(V=C,Q=$),H.negative&&(H=H.neg(),N=N.neg()),V.negative&&(V=V.neg(),Q=Q.neg()),[{a:H,b:N},{a:V,b:Q}]},f.prototype._endoSplit=function(y){var d=this.endo.basis,g=d[0],M=d[1],x=M.b.mul(y).divRound(this.n),B=g.b.neg().mul(y).divRound(this.n),A=x.mul(g.a),D=B.mul(M.a),C=x.mul(g.b),$=B.mul(M.b),H=y.sub(A).sub(D),N=C.add($).neg();return{k1:H,k2:N}},f.prototype.pointFromX=function(y,d){y=new S(y,16),y.red||(y=y.toRed(this.red));var g=y.redSqr().redMul(y).redIAdd(y.redMul(this.a)).redIAdd(this.b),M=g.redSqrt();if(M.redSqr().redSub(g).cmp(this.zero)!==0)throw new Error("invalid point");var x=M.fromRed().isOdd();return(d&&!x||!d&&x)&&(M=M.redNeg()),this.point(y,M)},f.prototype.validate=function(y){if(y.inf)return!0;var d=y.x,g=y.y,M=this.a.redMul(d),x=d.redSqr().redMul(d).redIAdd(M).redIAdd(this.b);return g.redSqr().redISub(x).cmpn(0)===0},f.prototype._endoWnafMulAdd=function(y,d,g){for(var M=this._endoWnafT1,x=this._endoWnafT2,B=0;B<y.length;B++){var A=this._endoSplit(d[B]),D=y[B],C=D._getBeta();A.k1.negative&&(A.k1.ineg(),D=D.neg(!0)),A.k2.negative&&(A.k2.ineg(),C=C.neg(!0)),M[B*2]=D,M[B*2+1]=C,x[B*2]=A.k1,x[B*2+1]=A.k2}for(var $=this._wnafMulAdd(1,M,x,B*2,g),H=0;H<B*2;H++)M[H]=null,x[H]=null;return $};function w(v,y,d,g){p.BasePoint.call(this,v,"affine"),y===null&&d===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new S(y,16),this.y=new S(d,16),g&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}I(w,p.BasePoint),f.prototype.point=function(y,d,g){return new w(this,y,d,g)},f.prototype.pointFromJSON=function(y,d){return w.fromJSON(this,y,d)},w.prototype._getBeta=function(){if(this.curve.endo){var y=this.precomputed;if(y&&y.beta)return y.beta;var d=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(y){var g=this.curve,M=function(x){return g.point(x.x.redMul(g.endo.beta),x.y)};y.beta=d,d.precomputed={beta:null,naf:y.naf&&{wnd:y.naf.wnd,points:y.naf.points.map(M)},doubles:y.doubles&&{step:y.doubles.step,points:y.doubles.points.map(M)}}}return d}},w.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},w.fromJSON=function(y,d,g){typeof d=="string"&&(d=JSON.parse(d));var M=y.point(d[0],d[1],g);if(!d[2])return M;function x(A){return y.point(A[0],A[1],g)}var B=d[2];return M.precomputed={beta:null,doubles:B.doubles&&{step:B.doubles.step,points:[M].concat(B.doubles.points.map(x))},naf:B.naf&&{wnd:B.naf.wnd,points:[M].concat(B.naf.points.map(x))}},M},w.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},w.prototype.isInfinity=function(){return this.inf},w.prototype.add=function(y){if(this.inf)return y;if(y.inf)return this;if(this.eq(y))return this.dbl();if(this.neg().eq(y))return this.curve.point(null,null);if(this.x.cmp(y.x)===0)return this.curve.point(null,null);var d=this.y.redSub(y.y);d.cmpn(0)!==0&&(d=d.redMul(this.x.redSub(y.x).redInvm()));var g=d.redSqr().redISub(this.x).redISub(y.x),M=d.redMul(this.x.redSub(g)).redISub(this.y);return this.curve.point(g,M)},w.prototype.dbl=function(){if(this.inf)return this;var y=this.y.redAdd(this.y);if(y.cmpn(0)===0)return this.curve.point(null,null);var d=this.curve.a,g=this.x.redSqr(),M=y.redInvm(),x=g.redAdd(g).redIAdd(g).redIAdd(d).redMul(M),B=x.redSqr().redISub(this.x.redAdd(this.x)),A=x.redMul(this.x.redSub(B)).redISub(this.y);return this.curve.point(B,A)},w.prototype.getX=function(){return this.x.fromRed()},w.prototype.getY=function(){return this.y.fromRed()},w.prototype.mul=function(y){return y=new S(y,16),this.isInfinity()?this:this._hasDoubles(y)?this.curve._fixedNafMul(this,y):this.curve.endo?this.curve._endoWnafMulAdd([this],[y]):this.curve._wnafMul(this,y)},w.prototype.mulAdd=function(y,d,g){var M=[this,d],x=[y,g];return this.curve.endo?this.curve._endoWnafMulAdd(M,x):this.curve._wnafMulAdd(1,M,x,2)},w.prototype.jmulAdd=function(y,d,g){var M=[this,d],x=[y,g];return this.curve.endo?this.curve._endoWnafMulAdd(M,x,!0):this.curve._wnafMulAdd(1,M,x,2,!0)},w.prototype.eq=function(y){return this===y||this.inf===y.inf&&(this.inf||this.x.cmp(y.x)===0&&this.y.cmp(y.y)===0)},w.prototype.neg=function(y){if(this.inf)return this;var d=this.curve.point(this.x,this.y.redNeg());if(y&&this.precomputed){var g=this.precomputed,M=function(x){return x.neg()};d.precomputed={naf:g.naf&&{wnd:g.naf.wnd,points:g.naf.points.map(M)},doubles:g.doubles&&{step:g.doubles.step,points:g.doubles.points.map(M)}}}return d},w.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var y=this.curve.jpoint(this.x,this.y,this.curve.one);return y};function m(v,y,d,g){p.BasePoint.call(this,v,"jacobian"),y===null&&d===null&&g===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new S(0)):(this.x=new S(y,16),this.y=new S(d,16),this.z=new S(g,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return I(m,p.BasePoint),f.prototype.jpoint=function(y,d,g){return new m(this,y,d,g)},m.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var y=this.z.redInvm(),d=y.redSqr(),g=this.x.redMul(d),M=this.y.redMul(d).redMul(y);return this.curve.point(g,M)},m.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},m.prototype.add=function(y){if(this.isInfinity())return y;if(y.isInfinity())return this;var d=y.z.redSqr(),g=this.z.redSqr(),M=this.x.redMul(d),x=y.x.redMul(g),B=this.y.redMul(d.redMul(y.z)),A=y.y.redMul(g.redMul(this.z)),D=M.redSub(x),C=B.redSub(A);if(D.cmpn(0)===0)return C.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var $=D.redSqr(),H=$.redMul(D),N=M.redMul($),V=C.redSqr().redIAdd(H).redISub(N).redISub(N),Q=C.redMul(N.redISub(V)).redISub(B.redMul(H)),ne=this.z.redMul(y.z).redMul(D);return this.curve.jpoint(V,Q,ne)},m.prototype.mixedAdd=function(y){if(this.isInfinity())return y.toJ();if(y.isInfinity())return this;var d=this.z.redSqr(),g=this.x,M=y.x.redMul(d),x=this.y,B=y.y.redMul(d).redMul(this.z),A=g.redSub(M),D=x.redSub(B);if(A.cmpn(0)===0)return D.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var C=A.redSqr(),$=C.redMul(A),H=g.redMul(C),N=D.redSqr().redIAdd($).redISub(H).redISub(H),V=D.redMul(H.redISub(N)).redISub(x.redMul($)),Q=this.z.redMul(A);return this.curve.jpoint(N,V,Q)},m.prototype.dblp=function(y){if(y===0)return this;if(this.isInfinity())return this;if(!y)return this.dbl();var d;if(this.curve.zeroA||this.curve.threeA){var g=this;for(d=0;d<y;d++)g=g.dbl();return g}var M=this.curve.a,x=this.curve.tinv,B=this.x,A=this.y,D=this.z,C=D.redSqr().redSqr(),$=A.redAdd(A);for(d=0;d<y;d++){var H=B.redSqr(),N=$.redSqr(),V=N.redSqr(),Q=H.redAdd(H).redIAdd(H).redIAdd(M.redMul(C)),ne=B.redMul(N),ae=Q.redSqr().redISub(ne.redAdd(ne)),ee=ne.redISub(ae),le=Q.redMul(ee);le=le.redIAdd(le).redISub(V);var c=$.redMul(D);d+1<y&&(C=C.redMul(V)),B=ae,D=c,$=le}return this.curve.jpoint(B,$.redMul(x),D)},m.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},m.prototype._zeroDbl=function(){var y,d,g;if(this.zOne){var M=this.x.redSqr(),x=this.y.redSqr(),B=x.redSqr(),A=this.x.redAdd(x).redSqr().redISub(M).redISub(B);A=A.redIAdd(A);var D=M.redAdd(M).redIAdd(M),C=D.redSqr().redISub(A).redISub(A),$=B.redIAdd(B);$=$.redIAdd($),$=$.redIAdd($),y=C,d=D.redMul(A.redISub(C)).redISub($),g=this.y.redAdd(this.y)}else{var H=this.x.redSqr(),N=this.y.redSqr(),V=N.redSqr(),Q=this.x.redAdd(N).redSqr().redISub(H).redISub(V);Q=Q.redIAdd(Q);var ne=H.redAdd(H).redIAdd(H),ae=ne.redSqr(),ee=V.redIAdd(V);ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),y=ae.redISub(Q).redISub(Q),d=ne.redMul(Q.redISub(y)).redISub(ee),g=this.y.redMul(this.z),g=g.redIAdd(g)}return this.curve.jpoint(y,d,g)},m.prototype._threeDbl=function(){var y,d,g;if(this.zOne){var M=this.x.redSqr(),x=this.y.redSqr(),B=x.redSqr(),A=this.x.redAdd(x).redSqr().redISub(M).redISub(B);A=A.redIAdd(A);var D=M.redAdd(M).redIAdd(M).redIAdd(this.curve.a),C=D.redSqr().redISub(A).redISub(A);y=C;var $=B.redIAdd(B);$=$.redIAdd($),$=$.redIAdd($),d=D.redMul(A.redISub(C)).redISub($),g=this.y.redAdd(this.y)}else{var H=this.z.redSqr(),N=this.y.redSqr(),V=this.x.redMul(N),Q=this.x.redSub(H).redMul(this.x.redAdd(H));Q=Q.redAdd(Q).redIAdd(Q);var ne=V.redIAdd(V);ne=ne.redIAdd(ne);var ae=ne.redAdd(ne);y=Q.redSqr().redISub(ae),g=this.y.redAdd(this.z).redSqr().redISub(N).redISub(H);var ee=N.redSqr();ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),d=Q.redMul(ne.redISub(y)).redISub(ee)}return this.curve.jpoint(y,d,g)},m.prototype._dbl=function(){var y=this.curve.a,d=this.x,g=this.y,M=this.z,x=M.redSqr().redSqr(),B=d.redSqr(),A=g.redSqr(),D=B.redAdd(B).redIAdd(B).redIAdd(y.redMul(x)),C=d.redAdd(d);C=C.redIAdd(C);var $=C.redMul(A),H=D.redSqr().redISub($.redAdd($)),N=$.redISub(H),V=A.redSqr();V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V);var Q=D.redMul(N).redISub(V),ne=g.redAdd(g).redMul(M);return this.curve.jpoint(H,Q,ne)},m.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var y=this.x.redSqr(),d=this.y.redSqr(),g=this.z.redSqr(),M=d.redSqr(),x=y.redAdd(y).redIAdd(y),B=x.redSqr(),A=this.x.redAdd(d).redSqr().redISub(y).redISub(M);A=A.redIAdd(A),A=A.redAdd(A).redIAdd(A),A=A.redISub(B);var D=A.redSqr(),C=M.redIAdd(M);C=C.redIAdd(C),C=C.redIAdd(C),C=C.redIAdd(C);var $=x.redIAdd(A).redSqr().redISub(B).redISub(D).redISub(C),H=d.redMul($);H=H.redIAdd(H),H=H.redIAdd(H);var N=this.x.redMul(D).redISub(H);N=N.redIAdd(N),N=N.redIAdd(N);var V=this.y.redMul($.redMul(C.redISub($)).redISub(A.redMul(D)));V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V);var Q=this.z.redAdd(A).redSqr().redISub(g).redISub(D);return this.curve.jpoint(N,V,Q)},m.prototype.mul=function(y,d){return y=new S(y,d),this.curve._wnafMul(this,y)},m.prototype.eq=function(y){if(y.type==="affine")return this.eq(y.toJ());if(this===y)return!0;var d=this.z.redSqr(),g=y.z.redSqr();if(this.x.redMul(g).redISub(y.x.redMul(d)).cmpn(0)!==0)return!1;var M=d.redMul(this.z),x=g.redMul(y.z);return this.y.redMul(x).redISub(y.y.redMul(M)).cmpn(0)===0},m.prototype.eqXToP=function(y){var d=this.z.redSqr(),g=y.toRed(this.curve.red).redMul(d);if(this.x.cmp(g)===0)return!0;for(var M=y.clone(),x=this.curve.redN.redMul(d);;){if(M.iadd(this.curve.n),M.cmp(this.curve.p)>=0)return!1;if(g.redIAdd(x),this.x.cmp(g)===0)return!0}},m.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},m.prototype.isInfinity=function(){return this.z.cmpn(0)===0},short}var mont,hasRequiredMont;function requireMont(){if(hasRequiredMont)return mont;hasRequiredMont=1;var _=requireBn$3(),S=requireInherits_browser(),I=requireBase$1(),p=requireUtils$1();function R(w){I.call(this,"mont",w),this.a=new _(w.a,16).toRed(this.red),this.b=new _(w.b,16).toRed(this.red),this.i4=new _(4).toRed(this.red).redInvm(),this.two=new _(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}S(R,I),mont=R,R.prototype.validate=function(m){var v=m.normalize().x,y=v.redSqr(),d=y.redMul(v).redAdd(y.redMul(this.a)).redAdd(v),g=d.redSqrt();return g.redSqr().cmp(d)===0};function f(w,m,v){I.BasePoint.call(this,w,"projective"),m===null&&v===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new _(m,16),this.z=new _(v,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return S(f,I.BasePoint),R.prototype.decodePoint=function(m,v){return this.point(p.toArray(m,v),1)},R.prototype.point=function(m,v){return new f(this,m,v)},R.prototype.pointFromJSON=function(m){return f.fromJSON(this,m)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(m,v){return new f(m,v[0],v[1]||m.one)},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.z.cmpn(0)===0},f.prototype.dbl=function(){var m=this.x.redAdd(this.z),v=m.redSqr(),y=this.x.redSub(this.z),d=y.redSqr(),g=v.redSub(d),M=v.redMul(d),x=g.redMul(d.redAdd(this.curve.a24.redMul(g)));return this.curve.point(M,x)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(m,v){var y=this.x.redAdd(this.z),d=this.x.redSub(this.z),g=m.x.redAdd(m.z),M=m.x.redSub(m.z),x=M.redMul(y),B=g.redMul(d),A=v.z.redMul(x.redAdd(B).redSqr()),D=v.x.redMul(x.redISub(B).redSqr());return this.curve.point(A,D)},f.prototype.mul=function(m){for(var v=m.clone(),y=this,d=this.curve.point(null,null),g=this,M=[];v.cmpn(0)!==0;v.iushrn(1))M.push(v.andln(1));for(var x=M.length-1;x>=0;x--)M[x]===0?(y=y.diffAdd(d,g),d=d.dbl()):(d=y.diffAdd(d,g),y=y.dbl());return d},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(m){return this.getX().cmp(m.getX())===0},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},mont}var edwards,hasRequiredEdwards;function requireEdwards(){if(hasRequiredEdwards)return edwards;hasRequiredEdwards=1;var _=requireUtils$1(),S=requireBn$3(),I=requireInherits_browser(),p=requireBase$1(),R=_.assert;function f(m){this.twisted=(m.a|0)!==1,this.mOneA=this.twisted&&(m.a|0)===-1,this.extended=this.mOneA,p.call(this,"edwards",m),this.a=new S(m.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new S(m.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new S(m.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),R(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(m.c|0)===1}I(f,p),edwards=f,f.prototype._mulA=function(v){return this.mOneA?v.redNeg():this.a.redMul(v)},f.prototype._mulC=function(v){return this.oneC?v:this.c.redMul(v)},f.prototype.jpoint=function(v,y,d,g){return this.point(v,y,d,g)},f.prototype.pointFromX=function(v,y){v=new S(v,16),v.red||(v=v.toRed(this.red));var d=v.redSqr(),g=this.c2.redSub(this.a.redMul(d)),M=this.one.redSub(this.c2.redMul(this.d).redMul(d)),x=g.redMul(M.redInvm()),B=x.redSqrt();if(B.redSqr().redSub(x).cmp(this.zero)!==0)throw new Error("invalid point");var A=B.fromRed().isOdd();return(y&&!A||!y&&A)&&(B=B.redNeg()),this.point(v,B)},f.prototype.pointFromY=function(v,y){v=new S(v,16),v.red||(v=v.toRed(this.red));var d=v.redSqr(),g=d.redSub(this.c2),M=d.redMul(this.d).redMul(this.c2).redSub(this.a),x=g.redMul(M.redInvm());if(x.cmp(this.zero)===0){if(y)throw new Error("invalid point");return this.point(this.zero,v)}var B=x.redSqrt();if(B.redSqr().redSub(x).cmp(this.zero)!==0)throw new Error("invalid point");return B.fromRed().isOdd()!==y&&(B=B.redNeg()),this.point(B,v)},f.prototype.validate=function(v){if(v.isInfinity())return!0;v.normalize();var y=v.x.redSqr(),d=v.y.redSqr(),g=y.redMul(this.a).redAdd(d),M=this.c2.redMul(this.one.redAdd(this.d.redMul(y).redMul(d)));return g.cmp(M)===0};function w(m,v,y,d,g){p.BasePoint.call(this,m,"projective"),v===null&&y===null&&d===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new S(v,16),this.y=new S(y,16),this.z=d?new S(d,16):this.curve.one,this.t=g&&new S(g,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return I(w,p.BasePoint),f.prototype.pointFromJSON=function(v){return w.fromJSON(this,v)},f.prototype.point=function(v,y,d,g){return new w(this,v,y,d,g)},w.fromJSON=function(v,y){return new w(v,y[0],y[1],y[2])},w.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},w.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},w.prototype._extDbl=function(){var v=this.x.redSqr(),y=this.y.redSqr(),d=this.z.redSqr();d=d.redIAdd(d);var g=this.curve._mulA(v),M=this.x.redAdd(this.y).redSqr().redISub(v).redISub(y),x=g.redAdd(y),B=x.redSub(d),A=g.redSub(y),D=M.redMul(B),C=x.redMul(A),$=M.redMul(A),H=B.redMul(x);return this.curve.point(D,C,H,$)},w.prototype._projDbl=function(){var v=this.x.redAdd(this.y).redSqr(),y=this.x.redSqr(),d=this.y.redSqr(),g,M,x,B,A,D;if(this.curve.twisted){B=this.curve._mulA(y);var C=B.redAdd(d);this.zOne?(g=v.redSub(y).redSub(d).redMul(C.redSub(this.curve.two)),M=C.redMul(B.redSub(d)),x=C.redSqr().redSub(C).redSub(C)):(A=this.z.redSqr(),D=C.redSub(A).redISub(A),g=v.redSub(y).redISub(d).redMul(D),M=C.redMul(B.redSub(d)),x=C.redMul(D))}else B=y.redAdd(d),A=this.curve._mulC(this.z).redSqr(),D=B.redSub(A).redSub(A),g=this.curve._mulC(v.redISub(B)).redMul(D),M=this.curve._mulC(B).redMul(y.redISub(d)),x=B.redMul(D);return this.curve.point(g,M,x)},w.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},w.prototype._extAdd=function(v){var y=this.y.redSub(this.x).redMul(v.y.redSub(v.x)),d=this.y.redAdd(this.x).redMul(v.y.redAdd(v.x)),g=this.t.redMul(this.curve.dd).redMul(v.t),M=this.z.redMul(v.z.redAdd(v.z)),x=d.redSub(y),B=M.redSub(g),A=M.redAdd(g),D=d.redAdd(y),C=x.redMul(B),$=A.redMul(D),H=x.redMul(D),N=B.redMul(A);return this.curve.point(C,$,N,H)},w.prototype._projAdd=function(v){var y=this.z.redMul(v.z),d=y.redSqr(),g=this.x.redMul(v.x),M=this.y.redMul(v.y),x=this.curve.d.redMul(g).redMul(M),B=d.redSub(x),A=d.redAdd(x),D=this.x.redAdd(this.y).redMul(v.x.redAdd(v.y)).redISub(g).redISub(M),C=y.redMul(B).redMul(D),$,H;return this.curve.twisted?($=y.redMul(A).redMul(M.redSub(this.curve._mulA(g))),H=B.redMul(A)):($=y.redMul(A).redMul(M.redSub(g)),H=this.curve._mulC(B).redMul(A)),this.curve.point(C,$,H)},w.prototype.add=function(v){return this.isInfinity()?v:v.isInfinity()?this:this.curve.extended?this._extAdd(v):this._projAdd(v)},w.prototype.mul=function(v){return this._hasDoubles(v)?this.curve._fixedNafMul(this,v):this.curve._wnafMul(this,v)},w.prototype.mulAdd=function(v,y,d){return this.curve._wnafMulAdd(1,[this,y],[v,d],2,!1)},w.prototype.jmulAdd=function(v,y,d){return this.curve._wnafMulAdd(1,[this,y],[v,d],2,!0)},w.prototype.normalize=function(){if(this.zOne)return this;var v=this.z.redInvm();return this.x=this.x.redMul(v),this.y=this.y.redMul(v),this.t&&(this.t=this.t.redMul(v)),this.z=this.curve.one,this.zOne=!0,this},w.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},w.prototype.getX=function(){return this.normalize(),this.x.fromRed()},w.prototype.getY=function(){return this.normalize(),this.y.fromRed()},w.prototype.eq=function(v){return this===v||this.getX().cmp(v.getX())===0&&this.getY().cmp(v.getY())===0},w.prototype.eqXToP=function(v){var y=v.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(y)===0)return!0;for(var d=v.clone(),g=this.curve.redN.redMul(this.z);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return!1;if(y.redIAdd(g),this.x.cmp(y)===0)return!0}},w.prototype.toP=w.prototype.normalize,w.prototype.mixedAdd=w.prototype.add,edwards}var hasRequiredCurve;function requireCurve(){return hasRequiredCurve||(hasRequiredCurve=1,(function(_){var S=_;S.base=requireBase$1(),S.short=requireShort(),S.mont=requireMont(),S.edwards=requireEdwards()})(curve)),curve}var curves={},hash={},utils={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var _=requireMinimalisticAssert(),S=requireInherits_browser();utils.inherits=S;function I(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function p(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),s=0;s<e.length;s+=2)n.push(parseInt(e[s]+e[s+1],16))}else for(var a=0,s=0;s<e.length;s++){var u=e.charCodeAt(s);u<128?n[a++]=u:u<2048?(n[a++]=u>>6|192,n[a++]=u&63|128):I(e,s)?(u=65536+((u&1023)<<10)+(e.charCodeAt(++s)&1023),n[a++]=u>>18|240,n[a++]=u>>12&63|128,n[a++]=u>>6&63|128,n[a++]=u&63|128):(n[a++]=u>>12|224,n[a++]=u>>6&63|128,n[a++]=u&63|128)}else for(s=0;s<e.length;s++)n[s]=e[s]|0;return n}utils.toArray=p;function R(e){for(var t="",n=0;n<e.length;n++)t+=m(e[n].toString(16));return t}utils.toHex=R;function f(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}utils.htonl=f;function w(e,t){for(var n="",a=0;a<e.length;a++){var s=e[a];t==="little"&&(s=f(s)),n+=v(s.toString(16))}return n}utils.toHex32=w;function m(e){return e.length===1?"0"+e:e}utils.zero2=m;function v(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}utils.zero8=v;function y(e,t,n,a){var s=n-t;_(s%4===0);for(var u=new Array(s/4),l=0,o=t;l<u.length;l++,o+=4){var r;a==="big"?r=e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3]:r=e[o+3]<<24|e[o+2]<<16|e[o+1]<<8|e[o],u[l]=r>>>0}return u}utils.join32=y;function d(e,t){for(var n=new Array(e.length*4),a=0,s=0;a<e.length;a++,s+=4){var u=e[a];t==="big"?(n[s]=u>>>24,n[s+1]=u>>>16&255,n[s+2]=u>>>8&255,n[s+3]=u&255):(n[s+3]=u>>>24,n[s+2]=u>>>16&255,n[s+1]=u>>>8&255,n[s]=u&255)}return n}utils.split32=d;function g(e,t){return e>>>t|e<<32-t}utils.rotr32=g;function M(e,t){return e<<t|e>>>32-t}utils.rotl32=M;function x(e,t){return e+t>>>0}utils.sum32=x;function B(e,t,n){return e+t+n>>>0}utils.sum32_3=B;function A(e,t,n,a){return e+t+n+a>>>0}utils.sum32_4=A;function D(e,t,n,a,s){return e+t+n+a+s>>>0}utils.sum32_5=D;function C(e,t,n,a){var s=e[t],u=e[t+1],l=a+u>>>0,o=(l<a?1:0)+n+s;e[t]=o>>>0,e[t+1]=l}utils.sum64=C;function $(e,t,n,a){var s=t+a>>>0,u=(s<t?1:0)+e+n;return u>>>0}utils.sum64_hi=$;function H(e,t,n,a){var s=t+a;return s>>>0}utils.sum64_lo=H;function N(e,t,n,a,s,u,l,o){var r=0,h=t;h=h+a>>>0,r+=h<t?1:0,h=h+u>>>0,r+=h<u?1:0,h=h+o>>>0,r+=h<o?1:0;var b=e+n+s+l+r;return b>>>0}utils.sum64_4_hi=N;function V(e,t,n,a,s,u,l,o){var r=t+a+u+o;return r>>>0}utils.sum64_4_lo=V;function Q(e,t,n,a,s,u,l,o,r,h){var b=0,E=t;E=E+a>>>0,b+=E<t?1:0,E=E+u>>>0,b+=E<u?1:0,E=E+o>>>0,b+=E<o?1:0,E=E+h>>>0,b+=E<h?1:0;var L=e+n+s+l+r+b;return L>>>0}utils.sum64_5_hi=Q;function ne(e,t,n,a,s,u,l,o,r,h){var b=t+a+u+o+h;return b>>>0}utils.sum64_5_lo=ne;function ae(e,t,n){var a=t<<32-n|e>>>n;return a>>>0}utils.rotr64_hi=ae;function ee(e,t,n){var a=e<<32-n|t>>>n;return a>>>0}utils.rotr64_lo=ee;function le(e,t,n){return e>>>n}utils.shr64_hi=le;function c(e,t,n){var a=e<<32-n|t>>>n;return a>>>0}return utils.shr64_lo=c,utils}var common$1={},hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;var _=requireUtils(),S=requireMinimalisticAssert();function I(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return common$1.BlockHash=I,I.prototype.update=function(R,f){if(R=_.toArray(R,f),this.pending?this.pending=this.pending.concat(R):this.pending=R,this.pendingTotal+=R.length,this.pending.length>=this._delta8){R=this.pending;var w=R.length%this._delta8;this.pending=R.slice(R.length-w,R.length),this.pending.length===0&&(this.pending=null),R=_.join32(R,0,R.length-w,this.endian);for(var m=0;m<R.length;m+=this._delta32)this._update(R,m,m+this._delta32)}return this},I.prototype.digest=function(R){return this.update(this._pad()),S(this.pending===null),this._digest(R)},I.prototype._pad=function(){var R=this.pendingTotal,f=this._delta8,w=f-(R+this.padLength)%f,m=new Array(w+this.padLength);m[0]=128;for(var v=1;v<w;v++)m[v]=0;if(R<<=3,this.endian==="big"){for(var y=8;y<this.padLength;y++)m[v++]=0;m[v++]=0,m[v++]=0,m[v++]=0,m[v++]=0,m[v++]=R>>>24&255,m[v++]=R>>>16&255,m[v++]=R>>>8&255,m[v++]=R&255}else for(m[v++]=R&255,m[v++]=R>>>8&255,m[v++]=R>>>16&255,m[v++]=R>>>24&255,m[v++]=0,m[v++]=0,m[v++]=0,m[v++]=0,y=8;y<this.padLength;y++)m[v++]=0;return m},common$1}var sha={},common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;var _=requireUtils(),S=_.rotr32;function I(d,g,M,x){if(d===0)return p(g,M,x);if(d===1||d===3)return f(g,M,x);if(d===2)return R(g,M,x)}common.ft_1=I;function p(d,g,M){return d&g^~d&M}common.ch32=p;function R(d,g,M){return d&g^d&M^g&M}common.maj32=R;function f(d,g,M){return d^g^M}common.p32=f;function w(d){return S(d,2)^S(d,13)^S(d,22)}common.s0_256=w;function m(d){return S(d,6)^S(d,11)^S(d,25)}common.s1_256=m;function v(d){return S(d,7)^S(d,18)^d>>>3}common.g0_256=v;function y(d){return S(d,17)^S(d,19)^d>>>10}return common.g1_256=y,common}var _1,hasRequired_1;function require_1(){if(hasRequired_1)return _1;hasRequired_1=1;var _=requireUtils(),S=requireCommon$1(),I=requireCommon(),p=_.rotl32,R=_.sum32,f=_.sum32_5,w=I.ft_1,m=S.BlockHash,v=[1518500249,1859775393,2400959708,3395469782];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return _.inherits(y,m),_1=y,y.blockSize=512,y.outSize=160,y.hmacStrength=80,y.padLength=64,y.prototype._update=function(g,M){for(var x=this.W,B=0;B<16;B++)x[B]=g[M+B];for(;B<x.length;B++)x[B]=p(x[B-3]^x[B-8]^x[B-14]^x[B-16],1);var A=this.h[0],D=this.h[1],C=this.h[2],$=this.h[3],H=this.h[4];for(B=0;B<x.length;B++){var N=~~(B/20),V=f(p(A,5),w(N,D,C,$),H,x[B],v[N]);H=$,$=C,C=p(D,30),D=A,A=V}this.h[0]=R(this.h[0],A),this.h[1]=R(this.h[1],D),this.h[2]=R(this.h[2],C),this.h[3]=R(this.h[3],$),this.h[4]=R(this.h[4],H)},y.prototype._digest=function(g){return g==="hex"?_.toHex32(this.h,"big"):_.split32(this.h,"big")},_1}var _256,hasRequired_256;function require_256(){if(hasRequired_256)return _256;hasRequired_256=1;var _=requireUtils(),S=requireCommon$1(),I=requireCommon(),p=requireMinimalisticAssert(),R=_.sum32,f=_.sum32_4,w=_.sum32_5,m=I.ch32,v=I.maj32,y=I.s0_256,d=I.s1_256,g=I.g0_256,M=I.g1_256,x=S.BlockHash,B=[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 A(){if(!(this instanceof A))return new A;x.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=B,this.W=new Array(64)}return _.inherits(A,x),_256=A,A.blockSize=512,A.outSize=256,A.hmacStrength=192,A.padLength=64,A.prototype._update=function(C,$){for(var H=this.W,N=0;N<16;N++)H[N]=C[$+N];for(;N<H.length;N++)H[N]=f(M(H[N-2]),H[N-7],g(H[N-15]),H[N-16]);var V=this.h[0],Q=this.h[1],ne=this.h[2],ae=this.h[3],ee=this.h[4],le=this.h[5],c=this.h[6],e=this.h[7];for(p(this.k.length===H.length),N=0;N<H.length;N++){var t=w(e,d(ee),m(ee,le,c),this.k[N],H[N]),n=R(y(V),v(V,Q,ne));e=c,c=le,le=ee,ee=R(ae,t),ae=ne,ne=Q,Q=V,V=R(t,n)}this.h[0]=R(this.h[0],V),this.h[1]=R(this.h[1],Q),this.h[2]=R(this.h[2],ne),this.h[3]=R(this.h[3],ae),this.h[4]=R(this.h[4],ee),this.h[5]=R(this.h[5],le),this.h[6]=R(this.h[6],c),this.h[7]=R(this.h[7],e)},A.prototype._digest=function(C){return C==="hex"?_.toHex32(this.h,"big"):_.split32(this.h,"big")},_256}var _224,hasRequired_224;function require_224(){if(hasRequired_224)return _224;hasRequired_224=1;var _=requireUtils(),S=require_256();function I(){if(!(this instanceof I))return new I;S.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return _.inherits(I,S),_224=I,I.blockSize=512,I.outSize=224,I.hmacStrength=192,I.padLength=64,I.prototype._digest=function(R){return R==="hex"?_.toHex32(this.h.slice(0,7),"big"):_.split32(this.h.slice(0,7),"big")},_224}var _512,hasRequired_512;function require_512(){if(hasRequired_512)return _512;hasRequired_512=1;var _=requireUtils(),S=requireCommon$1(),I=requireMinimalisticAssert(),p=_.rotr64_hi,R=_.rotr64_lo,f=_.shr64_hi,w=_.shr64_lo,m=_.sum64,v=_.sum64_hi,y=_.sum64_lo,d=_.sum64_4_hi,g=_.sum64_4_lo,M=_.sum64_5_hi,x=_.sum64_5_lo,B=S.BlockHash,A=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function D(){if(!(this instanceof D))return new D;B.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=A,this.W=new Array(160)}_.inherits(D,B),_512=D,D.blockSize=1024,D.outSize=512,D.hmacStrength=192,D.padLength=128,D.prototype._prepareBlock=function(n,a){for(var s=this.W,u=0;u<32;u++)s[u]=n[a+u];for(;u<s.length;u+=2){var l=c(s[u-4],s[u-3]),o=e(s[u-4],s[u-3]),r=s[u-14],h=s[u-13],b=ee(s[u-30],s[u-29]),E=le(s[u-30],s[u-29]),L=s[u-32],Y=s[u-31];s[u]=d(l,o,r,h,b,E,L,Y),s[u+1]=g(l,o,r,h,b,E,L,Y)}},D.prototype._update=function(n,a){this._prepareBlock(n,a);var s=this.W,u=this.h[0],l=this.h[1],o=this.h[2],r=this.h[3],h=this.h[4],b=this.h[5],E=this.h[6],L=this.h[7],Y=this.h[8],K=this.h[9],q=this.h[10],P=this.h[11],W=this.h[12],J=this.h[13],X=this.h[14],U=this.h[15];I(this.k.length===s.length);for(var re=0;re<s.length;re+=2){var Ie=X,ue=U,he=ne(Y,K),$e=ae(Y,K),me=C(Y,K,q,P,W),se=$(Y,K,q,P,W,J),De=this.k[re],de=this.k[re+1],ye=s[re],Ce=s[re+1],pe=M(Ie,ue,he,$e,me,se,De,de,ye,Ce),_e=x(Ie,ue,he,$e,me,se,De,de,ye,Ce);Ie=V(u,l),ue=Q(u,l),he=H(u,l,o,r,h),$e=N(u,l,o,r,h,b);var Ue=v(Ie,ue,he,$e),xe=y(Ie,ue,he,$e);X=W,U=J,W=q,J=P,q=Y,P=K,Y=v(E,L,pe,_e),K=y(L,L,pe,_e),E=h,L=b,h=o,b=r,o=u,r=l,u=v(pe,_e,Ue,xe),l=y(pe,_e,Ue,xe)}m(this.h,0,u,l),m(this.h,2,o,r),m(this.h,4,h,b),m(this.h,6,E,L),m(this.h,8,Y,K),m(this.h,10,q,P),m(this.h,12,W,J),m(this.h,14,X,U)},D.prototype._digest=function(n){return n==="hex"?_.toHex32(this.h,"big"):_.split32(this.h,"big")};function C(t,n,a,s,u){var l=t&a^~t&u;return l<0&&(l+=4294967296),l}function $(t,n,a,s,u,l){var o=n&s^~n&l;return o<0&&(o+=4294967296),o}function H(t,n,a,s,u){var l=t&a^t&u^a&u;return l<0&&(l+=4294967296),l}function N(t,n,a,s,u,l){var o=n&s^n&l^s&l;return o<0&&(o+=4294967296),o}function V(t,n){var a=p(t,n,28),s=p(n,t,2),u=p(n,t,7),l=a^s^u;return l<0&&(l+=4294967296),l}function Q(t,n){var a=R(t,n,28),s=R(n,t,2),u=R(n,t,7),l=a^s^u;return l<0&&(l+=4294967296),l}function ne(t,n){var a=p(t,n,14),s=p(t,n,18),u=p(n,t,9),l=a^s^u;return l<0&&(l+=4294967296),l}function ae(t,n){var a=R(t,n,14),s=R(t,n,18),u=R(n,t,9),l=a^s^u;return l<0&&(l+=4294967296),l}function ee(t,n){var a=p(t,n,1),s=p(t,n,8),u=f(t,n,7),l=a^s^u;return l<0&&(l+=4294967296),l}function le(t,n){var a=R(t,n,1),s=R(t,n,8),u=w(t,n,7),l=a^s^u;return l<0&&(l+=4294967296),l}function c(t,n){var a=p(t,n,19),s=p(n,t,29),u=f(t,n,6),l=a^s^u;return l<0&&(l+=4294967296),l}function e(t,n){var a=R(t,n,19),s=R(n,t,29),u=w(t,n,6),l=a^s^u;return l<0&&(l+=4294967296),l}return _512}var _384,hasRequired_384;function require_384(){if(hasRequired_384)return _384;hasRequired_384=1;var _=requireUtils(),S=require_512();function I(){if(!(this instanceof I))return new I;S.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return _.inherits(I,S),_384=I,I.blockSize=1024,I.outSize=384,I.hmacStrength=192,I.padLength=128,I.prototype._digest=function(R){return R==="hex"?_.toHex32(this.h.slice(0,12),"big"):_.split32(this.h.slice(0,12),"big")},_384}var hasRequiredSha;function requireSha(){return hasRequiredSha||(hasRequiredSha=1,sha.sha1=require_1(),sha.sha224=require_224(),sha.sha256=require_256(),sha.sha384=require_384(),sha.sha512=require_512()),sha}var ripemd={},hasRequiredRipemd;function requireRipemd(){if(hasRequiredRipemd)return ripemd;hasRequiredRipemd=1;var _=requireUtils(),S=requireCommon$1(),I=_.rotl32,p=_.sum32,R=_.sum32_3,f=_.sum32_4,w=S.BlockHash;function m(){if(!(this instanceof m))return new m;w.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}_.inherits(m,w),ripemd.ripemd160=m,m.blockSize=512,m.outSize=160,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(D,C){for(var $=this.h[0],H=this.h[1],N=this.h[2],V=this.h[3],Q=this.h[4],ne=$,ae=H,ee=N,le=V,c=Q,e=0;e<80;e++){var t=p(I(f($,v(e,H,N,V),D[g[e]+C],y(e)),x[e]),Q);$=Q,Q=V,V=I(N,10),N=H,H=t,t=p(I(f(ne,v(79-e,ae,ee,le),D[M[e]+C],d(e)),B[e]),c),ne=c,c=le,le=I(ee,10),ee=ae,ae=t}t=R(this.h[1],N,le),this.h[1]=R(this.h[2],V,c),this.h[2]=R(this.h[3],Q,ne),this.h[3]=R(this.h[4],$,ae),this.h[4]=R(this.h[0],H,ee),this.h[0]=t},m.prototype._digest=function(D){return D==="hex"?_.toHex32(this.h,"little"):_.split32(this.h,"little")};function v(A,D,C,$){return A<=15?D^C^$:A<=31?D&C|~D&$:A<=47?(D|~C)^$:A<=63?D&$|C&~$:D^(C|~$)}function y(A){return A<=15?0:A<=31?1518500249:A<=47?1859775393:A<=63?2400959708:2840853838}function d(A){return A<=15?1352829926:A<=31?1548603684:A<=47?1836072691:A<=63?2053994217:0}var g=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],M=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],x=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],B=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return ripemd}var hmac,hasRequiredHmac;function requireHmac(){if(hasRequiredHmac)return hmac;hasRequiredHmac=1;var _=requireUtils(),S=requireMinimalisticAssert();function I(p,R,f){if(!(this instanceof I))return new I(p,R,f);this.Hash=p,this.blockSize=p.blockSize/8,this.outSize=p.outSize/8,this.inner=null,this.outer=null,this._init(_.toArray(R,f))}return hmac=I,I.prototype._init=function(R){R.length>this.blockSize&&(R=new this.Hash().update(R).digest()),S(R.length<=this.blockSize);for(var f=R.length;f<this.blockSize;f++)R.push(0);for(f=0;f<R.length;f++)R[f]^=54;for(this.inner=new this.Hash().update(R),f=0;f<R.length;f++)R[f]^=106;this.outer=new this.Hash().update(R)},I.prototype.update=function(R,f){return this.inner.update(R,f),this},I.prototype.digest=function(R){return this.outer.update(this.inner.digest()),this.outer.digest(R)},hmac}var hasRequiredHash;function requireHash(){return hasRequiredHash||(hasRequiredHash=1,(function(_){var S=_;S.utils=requireUtils(),S.common=requireCommon$1(),S.sha=requireSha(),S.ripemd=requireRipemd(),S.hmac=requireHmac(),S.sha1=S.sha.sha1,S.sha256=S.sha.sha256,S.sha224=S.sha.sha224,S.sha384=S.sha.sha384,S.sha512=S.sha.sha512,S.ripemd160=S.ripemd.ripemd160})(hash)),hash}var secp256k1,hasRequiredSecp256k1;function requireSecp256k1(){return hasRequiredSecp256k1||(hasRequiredSecp256k1=1,secp256k1={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),secp256k1}var hasRequiredCurves;function requireCurves(){return hasRequiredCurves||(hasRequiredCurves=1,(function(_){var S=_,I=requireHash(),p=requireCurve(),R=requireUtils$1(),f=R.assert;function w(y){y.type==="short"?this.curve=new p.short(y):y.type==="edwards"?this.curve=new p.edwards(y):this.curve=new p.mont(y),this.g=this.curve.g,this.n=this.curve.n,this.hash=y.hash,f(this.g.validate(),"Invalid curve"),f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}S.PresetCurve=w;function m(y,d){Object.defineProperty(S,y,{configurable:!0,enumerable:!0,get:function(){var g=new w(d);return Object.defineProperty(S,y,{configurable:!0,enumerable:!0,value:g}),g}})}m("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:I.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),m("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:I.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),m("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:I.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),m("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:I.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),m("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:I.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),m("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:I.sha256,gRed:!1,g:["9"]}),m("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:I.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var v;try{v=requireSecp256k1()}catch{v=void 0}m("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:I.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",v]})})(curves)),curves}var hmacDrbg,hasRequiredHmacDrbg;function requireHmacDrbg(){if(hasRequiredHmacDrbg)return hmacDrbg;hasRequiredHmacDrbg=1;var _=requireHash(),S=requireUtils$2(),I=requireMinimalisticAssert();function p(R){if(!(this instanceof p))return new p(R);this.hash=R.hash,this.predResist=!!R.predResist,this.outLen=this.hash.outSize,this.minEntropy=R.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var f=S.toArray(R.entropy,R.entropyEnc||"hex"),w=S.toArray(R.nonce,R.nonceEnc||"hex"),m=S.toArray(R.pers,R.persEnc||"hex");I(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(f,w,m)}return hmacDrbg=p,p.prototype._init=function(f,w,m){var v=f.concat(w).concat(m);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var y=0;y<this.V.length;y++)this.K[y]=0,this.V[y]=1;this._update(v),this._reseed=1,this.reseedInterval=281474976710656},p.prototype._hmac=function(){return new _.hmac(this.hash,this.K)},p.prototype._update=function(f){var w=this._hmac().update(this.V).update([0]);f&&(w=w.update(f)),this.K=w.digest(),this.V=this._hmac().update(this.V).digest(),f&&(this.K=this._hmac().update(this.V).update([1]).update(f).digest(),this.V=this._hmac().update(this.V).digest())},p.prototype.reseed=function(f,w,m,v){typeof w!="string"&&(v=m,m=w,w=null),f=S.toArray(f,w),m=S.toArray(m,v),I(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(f.concat(m||[])),this._reseed=1},p.prototype.generate=function(f,w,m,v){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof w!="string"&&(v=m,m=w,w=null),m&&(m=S.toArray(m,v||"hex"),this._update(m));for(var y=[];y.length<f;)this.V=this._hmac().update(this.V).digest(),y=y.concat(this.V);var d=y.slice(0,f);return this._update(m),this._reseed++,S.encode(d,w)},hmacDrbg}var key$1,hasRequiredKey$1;function requireKey$1(){if(hasRequiredKey$1)return key$1;hasRequiredKey$1=1;var _=requireBn$3(),S=requireUtils$1(),I=S.assert;function p(R,f){this.ec=R,this.priv=null,this.pub=null,f.priv&&this._importPrivate(f.priv,f.privEnc),f.pub&&this._importPublic(f.pub,f.pubEnc)}return key$1=p,p.fromPublic=function(f,w,m){return w instanceof p?w:new p(f,{pub:w,pubEnc:m})},p.fromPrivate=function(f,w,m){return w instanceof p?w:new p(f,{priv:w,privEnc:m})},p.prototype.validate=function(){var f=this.getPublic();return f.isInfinity()?{result:!1,reason:"Invalid public key"}:f.validate()?f.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},p.prototype.getPublic=function(f,w){return typeof f=="string"&&(w=f,f=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),w?this.pub.encode(w,f):this.pub},p.prototype.getPrivate=function(f){return f==="hex"?this.priv.toString(16,2):this.priv},p.prototype._importPrivate=function(f,w){this.priv=new _(f,w||16),this.priv=this.priv.umod(this.ec.curve.n)},p.prototype._importPublic=function(f,w){if(f.x||f.y){this.ec.curve.type==="mont"?I(f.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&I(f.x&&f.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(f.x,f.y);return}this.pub=this.ec.curve.decodePoint(f,w)},p.prototype.derive=function(f){return f.validate()||I(f.validate(),"public point not validated"),f.mul(this.priv).getX()},p.prototype.sign=function(f,w,m){return this.ec.sign(f,this,w,m)},p.prototype.verify=function(f,w,m){return this.ec.verify(f,w,this,void 0,m)},p.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},key$1}var signature$1,hasRequiredSignature$1;function requireSignature$1(){if(hasRequiredSignature$1)return signature$1;hasRequiredSignature$1=1;var _=requireBn$3(),S=requireUtils$1(),I=S.assert;function p(v,y){if(v instanceof p)return v;this._importDER(v,y)||(I(v.r&&v.s,"Signature without r or s"),this.r=new _(v.r,16),this.s=new _(v.s,16),v.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=v.recoveryParam)}signature$1=p;function R(){this.place=0}function f(v,y){var d=v[y.place++];if(!(d&128))return d;var g=d&15;if(g===0||g>4||v[y.place]===0)return!1;for(var M=0,x=0,B=y.place;x<g;x++,B++)M<<=8,M|=v[B],M>>>=0;return M<=127?!1:(y.place=B,M)}function w(v){for(var y=0,d=v.length-1;!v[y]&&!(v[y+1]&128)&&y<d;)y++;return y===0?v:v.slice(y)}p.prototype._importDER=function(y,d){y=S.toArray(y,d);var g=new R;if(y[g.place++]!==48)return!1;var M=f(y,g);if(M===!1||M+g.place!==y.length||y[g.place++]!==2)return!1;var x=f(y,g);if(x===!1||(y[g.place]&128)!==0)return!1;var B=y.slice(g.place,x+g.place);if(g.place+=x,y[g.place++]!==2)return!1;var A=f(y,g);if(A===!1||y.length!==A+g.place||(y[g.place]&128)!==0)return!1;var D=y.slice(g.place,A+g.place);if(B[0]===0)if(B[1]&128)B=B.slice(1);else return!1;if(D[0]===0)if(D[1]&128)D=D.slice(1);else return!1;return this.r=new _(B),this.s=new _(D),this.recoveryParam=null,!0};function m(v,y){if(y<128){v.push(y);return}var d=1+(Math.log(y)/Math.LN2>>>3);for(v.push(d|128);--d;)v.push(y>>>(d<<3)&255);v.push(y)}return p.prototype.toDER=function(y){var d=this.r.toArray(),g=this.s.toArray();for(d[0]&128&&(d=[0].concat(d)),g[0]&128&&(g=[0].concat(g)),d=w(d),g=w(g);!g[0]&&!(g[1]&128);)g=g.slice(1);var M=[2];m(M,d.length),M=M.concat(d),M.push(2),m(M,g.length);var x=M.concat(g),B=[48];return m(B,x.length),B=B.concat(x),S.encode(B,y)},signature$1}var ec,hasRequiredEc;function requireEc(){if(hasRequiredEc)return ec;hasRequiredEc=1;var _=requireBn$3(),S=requireHmacDrbg(),I=requireUtils$1(),p=requireCurves(),R=requireBrorand(),f=I.assert,w=requireKey$1(),m=requireSignature$1();function v(y){if(!(this instanceof v))return new v(y);typeof y=="string"&&(f(Object.prototype.hasOwnProperty.call(p,y),"Unknown curve "+y),y=p[y]),y instanceof p.PresetCurve&&(y={curve:y}),this.curve=y.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=y.curve.g,this.g.precompute(y.curve.n.bitLength()+1),this.hash=y.hash||y.curve.hash}return ec=v,v.prototype.keyPair=function(d){return new w(this,d)},v.prototype.keyFromPrivate=function(d,g){return w.fromPrivate(this,d,g)},v.prototype.keyFromPublic=function(d,g){return w.fromPublic(this,d,g)},v.prototype.genKeyPair=function(d){d||(d={});for(var g=new S({hash:this.hash,pers:d.pers,persEnc:d.persEnc||"utf8",entropy:d.entropy||R(this.hash.hmacStrength),entropyEnc:d.entropy&&d.entropyEnc||"utf8",nonce:this.n.toArray()}),M=this.n.byteLength(),x=this.n.sub(new _(2));;){var B=new _(g.generate(M));if(!(B.cmp(x)>0))return B.iaddn(1),this.keyFromPrivate(B)}},v.prototype._truncateToN=function(d,g,M){var x;if(_.isBN(d)||typeof d=="number")d=new _(d,16),x=d.byteLength();else if(typeof d=="object")x=d.length,d=new _(d,16);else{var B=d.toString();x=B.length+1>>>1,d=new _(B,16)}typeof M!="number"&&(M=x*8);var A=M-this.n.bitLength();return A>0&&(d=d.ushrn(A)),!g&&d.cmp(this.n)>=0?d.sub(this.n):d},v.prototype.sign=function(d,g,M,x){if(typeof M=="object"&&(x=M,M=null),x||(x={}),typeof d!="string"&&typeof d!="number"&&!_.isBN(d)){f(typeof d=="object"&&d&&typeof d.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),f(d.length>>>0===d.length);for(var B=0;B<d.length;B++)f((d[B]&255)===d[B])}g=this.keyFromPrivate(g,M),d=this._truncateToN(d,!1,x.msgBitLength),f(!d.isNeg(),"Can not sign a negative message");var A=this.n.byteLength(),D=g.getPrivate().toArray("be",A),C=d.toArray("be",A);f(new _(C).eq(d),"Can not sign message");for(var $=new S({hash:this.hash,entropy:D,nonce:C,pers:x.pers,persEnc:x.persEnc||"utf8"}),H=this.n.sub(new _(1)),N=0;;N++){var V=x.k?x.k(N):new _($.generate(this.n.byteLength()));if(V=this._truncateToN(V,!0),!(V.cmpn(1)<=0||V.cmp(H)>=0)){var Q=this.g.mul(V);if(!Q.isInfinity()){var ne=Q.getX(),ae=ne.umod(this.n);if(ae.cmpn(0)!==0){var ee=V.invm(this.n).mul(ae.mul(g.getPrivate()).iadd(d));if(ee=ee.umod(this.n),ee.cmpn(0)!==0){var le=(Q.getY().isOdd()?1:0)|(ne.cmp(ae)!==0?2:0);return x.canonical&&ee.cmp(this.nh)>0&&(ee=this.n.sub(ee),le^=1),new m({r:ae,s:ee,recoveryParam:le})}}}}}},v.prototype.verify=function(d,g,M,x,B){B||(B={}),d=this._truncateToN(d,!1,B.msgBitLength),M=this.keyFromPublic(M,x),g=new m(g,"hex");var A=g.r,D=g.s;if(A.cmpn(1)<0||A.cmp(this.n)>=0||D.cmpn(1)<0||D.cmp(this.n)>=0)return!1;var C=D.invm(this.n),$=C.mul(d).umod(this.n),H=C.mul(A).umod(this.n),N;return this.curve._maxwellTrick?(N=this.g.jmulAdd($,M.getPublic(),H),N.isInfinity()?!1:N.eqXToP(A)):(N=this.g.mulAdd($,M.getPublic(),H),N.isInfinity()?!1:N.getX().umod(this.n).cmp(A)===0)},v.prototype.recoverPubKey=function(y,d,g,M){f((3&g)===g,"The recovery param is more than two bits"),d=new m(d,M);var x=this.n,B=new _(y),A=d.r,D=d.s,C=g&1,$=g>>1;if(A.cmp(this.curve.p.umod(this.curve.n))>=0&&$)throw new Error("Unable to find sencond key candinate");$?A=this.curve.pointFromX(A.add(this.curve.n),C):A=this.curve.pointFromX(A,C);var H=d.r.invm(x),N=x.sub(B).mul(H).umod(x),V=D.mul(H).umod(x);return this.g.mulAdd(N,A,V)},v.prototype.getKeyRecoveryParam=function(y,d,g,M){if(d=new m(d,M),d.recoveryParam!==null)return d.recoveryParam;for(var x=0;x<4;x++){var B;try{B=this.recoverPubKey(y,d,x)}catch{continue}if(B.eq(g))return x}throw new Error("Unable to find valid recovery factor")},ec}var key,hasRequiredKey;function requireKey(){if(hasRequiredKey)return key;hasRequiredKey=1;var _=requireUtils$1(),S=_.assert,I=_.parseBytes,p=_.cachedProperty;function R(f,w){this.eddsa=f,this._secret=I(w.secret),f.isPoint(w.pub)?this._pub=w.pub:this._pubBytes=I(w.pub)}return R.fromPublic=function(w,m){return m instanceof R?m:new R(w,{pub:m})},R.fromSecret=function(w,m){return m instanceof R?m:new R(w,{secret:m})},R.prototype.secret=function(){return this._secret},p(R,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),p(R,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),p(R,"privBytes",function(){var w=this.eddsa,m=this.hash(),v=w.encodingLength-1,y=m.slice(0,w.encodingLength);return y[0]&=248,y[v]&=127,y[v]|=64,y}),p(R,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),p(R,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),p(R,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),R.prototype.sign=function(w){return S(this._secret,"KeyPair can only verify"),this.eddsa.sign(w,this)},R.prototype.verify=function(w,m){return this.eddsa.verify(w,m,this)},R.prototype.getSecret=function(w){return S(this._secret,"KeyPair is public only"),_.encode(this.secret(),w)},R.prototype.getPublic=function(w){return _.encode(this.pubBytes(),w)},key=R,key}var signature,hasRequiredSignature;function requireSignature(){if(hasRequiredSignature)return signature;hasRequiredSignature=1;var _=requireBn$3(),S=requireUtils$1(),I=S.assert,p=S.cachedProperty,R=S.parseBytes;function f(w,m){this.eddsa=w,typeof m!="object"&&(m=R(m)),Array.isArray(m)&&(I(m.length===w.encodingLength*2,"Signature has invalid size"),m={R:m.slice(0,w.encodingLength),S:m.slice(w.encodingLength)}),I(m.R&&m.S,"Signature without R or S"),w.isPoint(m.R)&&(this._R=m.R),m.S instanceof _&&(this._S=m.S),this._Rencoded=Array.isArray(m.R)?m.R:m.Rencoded,this._Sencoded=Array.isArray(m.S)?m.S:m.Sencoded}return p(f,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),p(f,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),p(f,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),p(f,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return S.encode(this.toBytes(),"hex").toUpperCase()},signature=f,signature}var eddsa,hasRequiredEddsa;function requireEddsa(){if(hasRequiredEddsa)return eddsa;hasRequiredEddsa=1;var _=requireHash(),S=requireCurves(),I=requireUtils$1(),p=I.assert,R=I.parseBytes,f=requireKey(),w=requireSignature();function m(v){if(p(v==="ed25519","only tested with ed25519 so far"),!(this instanceof m))return new m(v);v=S[v].curve,this.curve=v,this.g=v.g,this.g.precompute(v.n.bitLength()+1),this.pointClass=v.point().constructor,this.encodingLength=Math.ceil(v.n.bitLength()/8),this.hash=_.sha512}return eddsa=m,m.prototype.sign=function(y,d){y=R(y);var g=this.keyFromSecret(d),M=this.hashInt(g.messagePrefix(),y),x=this.g.mul(M),B=this.encodePoint(x),A=this.hashInt(B,g.pubBytes(),y).mul(g.priv()),D=M.add(A).umod(this.curve.n);return this.makeSignature({R:x,S:D,Rencoded:B})},m.prototype.verify=function(y,d,g){if(y=R(y),d=this.makeSignature(d),d.S().gte(d.eddsa.curve.n)||d.S().isNeg())return!1;var M=this.keyFromPublic(g),x=this.hashInt(d.Rencoded(),M.pubBytes(),y),B=this.g.mul(d.S()),A=d.R().add(M.pub().mul(x));return A.eq(B)},m.prototype.hashInt=function(){for(var y=this.hash(),d=0;d<arguments.length;d++)y.update(arguments[d]);return I.intFromLE(y.digest()).umod(this.curve.n)},m.prototype.keyFromPublic=function(y){return f.fromPublic(this,y)},m.prototype.keyFromSecret=function(y){return f.fromSecret(this,y)},m.prototype.makeSignature=function(y){return y instanceof w?y:new w(this,y)},m.prototype.encodePoint=function(y){var d=y.getY().toArray("le",this.encodingLength);return d[this.encodingLength-1]|=y.getX().isOdd()?128:0,d},m.prototype.decodePoint=function(y){y=I.parseBytes(y);var d=y.length-1,g=y.slice(0,d).concat(y[d]&-129),M=(y[d]&128)!==0,x=I.intFromLE(g);return this.curve.pointFromY(x,M)},m.prototype.encodeInt=function(y){return y.toArray("le",this.encodingLength)},m.prototype.decodeInt=function(y){return I.intFromLE(y)},m.prototype.isPoint=function(y){return y instanceof this.pointClass},eddsa}var hasRequiredElliptic;function requireElliptic(){return hasRequiredElliptic||(hasRequiredElliptic=1,(function(_){var S=_;S.version=require$$0.version,S.utils=requireUtils$1(),S.rand=requireBrorand(),S.curve=requireCurve(),S.curves=requireCurves(),S.ec=requireEc(),S.eddsa=requireEddsa()})(elliptic)),elliptic}var asn1$1={},asn1={},bn$5={exports:{}},bn$4=bn$5.exports,hasRequiredBn$2;function requireBn$2(){return hasRequiredBn$2||(hasRequiredBn$2=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$4)})(bn$5)),bn$5.exports}var api={},vmBrowserify={},hasRequiredVmBrowserify;function requireVmBrowserify(){return hasRequiredVmBrowserify||(hasRequiredVmBrowserify=1,(function(exports$1){var indexOf=function(_,S){if(_.indexOf)return _.indexOf(S);for(var I=0;I<_.length;I++)if(_[I]===S)return I;return-1},Object_keys=function(_){if(Object.keys)return Object.keys(_);var S=[];for(var I in _)S.push(I);return S},forEach=function(_,S){if(_.forEach)return _.forEach(S);for(var I=0;I<_.length;I++)S(_[I],I,_)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(_,S,I){Object.defineProperty(_,S,{writable:!0,enumerable:!1,configurable:!0,value:I})}}catch{return function(S,I,p){S[I]=p}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports$1.Script=function(S){if(!(this instanceof Script))return new Script(S);this.code=S};Script.prototype.runInContext=function(_){if(!(_ instanceof Context))throw new TypeError("needs a 'context' argument.");var S=document.createElement("iframe");S.style||(S.style={}),S.style.display="none",document.body.appendChild(S);var I=S.contentWindow,p=I.eval,R=I.execScript;!p&&R&&(R.call(I,"null"),p=I.eval),forEach(Object_keys(_),function(m){I[m]=_[m]}),forEach(globals,function(m){_[m]&&(I[m]=_[m])});var f=Object_keys(I),w=p.call(I,this.code);return forEach(Object_keys(I),function(m){(m in _||indexOf(f,m)===-1)&&(_[m]=I[m])}),forEach(globals,function(m){m in _||defineProp(_,m,I[m])}),document.body.removeChild(S),w},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(_){var S=Script.createContext(_),I=this.runInContext(S);return _&&forEach(Object_keys(S),function(p){_[p]=S[p]}),I},forEach(Object_keys(Script.prototype),function(_){exports$1[_]=Script[_]=function(S){var I=Script(S);return I[_].apply(I,[].slice.call(arguments,1))}}),exports$1.isContext=function(_){return _ instanceof Context},exports$1.createScript=function(_){return exports$1.Script(_)},exports$1.createContext=Script.createContext=function(_){var S=new Context;return typeof _=="object"&&forEach(Object_keys(_),function(I){S[I]=_[I]}),S}})(vmBrowserify)),vmBrowserify}var hasRequiredApi;function requireApi(){return hasRequiredApi||(hasRequiredApi=1,(function(_){var S=requireAsn1$1(),I=requireInherits_browser(),p=_;p.define=function(w,m){return new R(w,m)};function R(f,w){this.name=f,this.body=w,this.decoders={},this.encoders={}}R.prototype._createNamed=function(w){var m;try{m=requireVmBrowserify().runInThisContext("(function "+this.name+`(entity) {
11
+ `)+" "+L[1]:L[0]+E+" "+b.join(", ")+" "+L[1]}_.types=requireTypes();function D(b){return Array.isArray(b)}_.isArray=D;function C(b){return typeof b=="boolean"}_.isBoolean=C;function P(b){return b===null}_.isNull=P;function H(b){return b==null}_.isNullOrUndefined=H;function N(b){return typeof b=="number"}_.isNumber=N;function V(b){return typeof b=="string"}_.isString=V;function Q(b){return typeof b=="symbol"}_.isSymbol=Q;function ne(b){return b===void 0}_.isUndefined=ne;function ae(b){return ee(b)&&n(b)==="[object RegExp]"}_.isRegExp=ae,_.types.isRegExp=ae;function ee(b){return typeof b=="object"&&b!==null}_.isObject=ee;function le(b){return ee(b)&&n(b)==="[object Date]"}_.isDate=le,_.types.isDate=le;function c(b){return ee(b)&&(n(b)==="[object Error]"||b instanceof Error)}_.isError=c,_.types.isNativeError=c;function e(b){return typeof b=="function"}_.isFunction=e;function t(b){return b===null||typeof b=="boolean"||typeof b=="number"||typeof b=="string"||typeof b=="symbol"||typeof b>"u"}_.isPrimitive=t,_.isBuffer=requireIsBufferBrowser();function n(b){return Object.prototype.toString.call(b)}function a(b){return b<10?"0"+b.toString(10):b.toString(10)}var s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u(){var b=new Date,E=[a(b.getHours()),a(b.getMinutes()),a(b.getSeconds())].join(":");return[b.getDate(),s[b.getMonth()],E].join(" ")}_.log=function(){console.log("%s - %s",u(),_.format.apply(_,arguments))},_.inherits=requireInherits_browser(),_._extend=function(b,E){if(!E||!ee(E))return b;for(var L=Object.keys(E),Y=L.length;Y--;)b[L[Y]]=E[L[Y]];return b};function l(b,E){return Object.prototype.hasOwnProperty.call(b,E)}var o=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;_.promisify=function(E){if(typeof E!="function")throw new TypeError('The "original" argument must be of type Function');if(o&&E[o]){var L=E[o];if(typeof L!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(L,o,{value:L,enumerable:!1,writable:!1,configurable:!0}),L}function L(){for(var Y,K,q=new Promise(function(J,X){Y=J,K=X}),$=[],W=0;W<arguments.length;W++)$.push(arguments[W]);$.push(function(J,X){J?K(J):Y(X)});try{E.apply(this,$)}catch(J){K(J)}return q}return Object.setPrototypeOf(L,Object.getPrototypeOf(E)),o&&Object.defineProperty(L,o,{value:L,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(L,S(E))},_.promisify.custom=o;function r(b,E){if(!b){var L=new Error("Promise was rejected with a falsy value");L.reason=b,b=L}return E(b)}function h(b){if(typeof b!="function")throw new TypeError('The "original" argument must be of type Function');function E(){for(var L=[],Y=0;Y<arguments.length;Y++)L.push(arguments[Y]);var K=L.pop();if(typeof K!="function")throw new TypeError("The last argument must be of type Function");var q=this,$=function(){return K.apply(q,arguments)};b.apply(this,L).then(function(W){process$1.nextTick($.bind(null,null,W))},function(W){process$1.nextTick(r.bind(null,W,$))})}return Object.setPrototypeOf(E,Object.getPrototypeOf(b)),Object.defineProperties(E,S(b)),E}_.callbackify=h})(util$1)),util$1}var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function _(B,A){var D=Object.keys(B);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(B);A&&(C=C.filter(function(P){return Object.getOwnPropertyDescriptor(B,P).enumerable})),D.push.apply(D,C)}return D}function S(B){for(var A=1;A<arguments.length;A++){var D=arguments[A]!=null?arguments[A]:{};A%2?_(Object(D),!0).forEach(function(C){I(B,C,D[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(B,Object.getOwnPropertyDescriptors(D)):_(Object(D)).forEach(function(C){Object.defineProperty(B,C,Object.getOwnPropertyDescriptor(D,C))})}return B}function I(B,A,D){return A=w(A),A in B?Object.defineProperty(B,A,{value:D,enumerable:!0,configurable:!0,writable:!0}):B[A]=D,B}function p(B,A){if(!(B instanceof A))throw new TypeError("Cannot call a class as a function")}function R(B,A){for(var D=0;D<A.length;D++){var C=A[D];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(B,w(C.key),C)}}function f(B,A,D){return A&&R(B.prototype,A),Object.defineProperty(B,"prototype",{writable:!1}),B}function w(B){var A=m(B,"string");return typeof A=="symbol"?A:String(A)}function m(B,A){if(typeof B!="object"||B===null)return B;var D=B[Symbol.toPrimitive];if(D!==void 0){var C=D.call(B,A);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(B)}var v=requireDist(),y=v.Buffer,d=requireUtil$1(),g=d.inspect,M=g&&g.custom||"inspect";function x(B,A,D){y.prototype.copy.call(B,A,D)}return buffer_list=(function(){function B(){p(this,B),this.head=null,this.tail=null,this.length=0}return f(B,[{key:"push",value:function(D){var C={data:D,next:null};this.length>0?this.tail.next=C:this.head=C,this.tail=C,++this.length}},{key:"unshift",value:function(D){var C={data:D,next:this.head};this.length===0&&(this.tail=C),this.head=C,++this.length}},{key:"shift",value:function(){if(this.length!==0){var D=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,D}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(D){if(this.length===0)return"";for(var C=this.head,P=""+C.data;C=C.next;)P+=D+C.data;return P}},{key:"concat",value:function(D){if(this.length===0)return y.alloc(0);for(var C=y.allocUnsafe(D>>>0),P=this.head,H=0;P;)x(P.data,C,H),H+=P.data.length,P=P.next;return C}},{key:"consume",value:function(D,C){var P;return D<this.head.data.length?(P=this.head.data.slice(0,D),this.head.data=this.head.data.slice(D)):D===this.head.data.length?P=this.shift():P=C?this._getString(D):this._getBuffer(D),P}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(D){var C=this.head,P=1,H=C.data;for(D-=H.length;C=C.next;){var N=C.data,V=D>N.length?N.length:D;if(V===N.length?H+=N:H+=N.slice(0,D),D-=V,D===0){V===N.length?(++P,C.next?this.head=C.next:this.head=this.tail=null):(this.head=C,C.data=N.slice(V));break}++P}return this.length-=P,H}},{key:"_getBuffer",value:function(D){var C=y.allocUnsafe(D),P=this.head,H=1;for(P.data.copy(C),D-=P.data.length;P=P.next;){var N=P.data,V=D>N.length?N.length:D;if(N.copy(C,C.length-D,0,V),D-=V,D===0){V===N.length?(++H,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=N.slice(V));break}++H}return this.length-=H,C}},{key:M,value:function(D,C){return g(this,S(S({},C),{},{depth:0,customInspect:!1}))}}]),B})(),buffer_list}var destroy_1$2,hasRequiredDestroy$2;function requireDestroy$2(){if(hasRequiredDestroy$2)return destroy_1$2;hasRequiredDestroy$2=1;function _(w,m){var v=this,y=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return y||d?(m?m(w):w&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(R,this,w)):process$1.nextTick(R,this,w)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(w||null,function(g){!m&&g?v._writableState?v._writableState.errorEmitted?process$1.nextTick(I,v):(v._writableState.errorEmitted=!0,process$1.nextTick(S,v,g)):process$1.nextTick(S,v,g):m?(process$1.nextTick(I,v),m(g)):process$1.nextTick(I,v)}),this)}function S(w,m){R(w,m),I(w)}function I(w){w._writableState&&!w._writableState.emitClose||w._readableState&&!w._readableState.emitClose||w.emit("close")}function p(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function R(w,m){w.emit("error",m)}function f(w,m){var v=w._readableState,y=w._writableState;v&&v.autoDestroy||y&&y.autoDestroy?w.destroy(m):w.emit("error",m)}return destroy_1$2={destroy:_,undestroy:p,errorOrDestroy:f},destroy_1$2}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function _(m,v){m.prototype=Object.create(v.prototype),m.prototype.constructor=m,m.__proto__=v}var S={};function I(m,v,y){y||(y=Error);function d(M,x,B){return typeof v=="string"?v:v(M,x,B)}var g=(function(M){_(x,M);function x(B,A,D){return M.call(this,d(B,A,D))||this}return x})(y);g.prototype.name=y.name,g.prototype.code=m,S[m]=g}function p(m,v){if(Array.isArray(m)){var y=m.length;return m=m.map(function(d){return String(d)}),y>2?"one of ".concat(v," ").concat(m.slice(0,y-1).join(", "),", or ")+m[y-1]:y===2?"one of ".concat(v," ").concat(m[0]," or ").concat(m[1]):"of ".concat(v," ").concat(m[0])}else return"of ".concat(v," ").concat(String(m))}function R(m,v,y){return m.substr(0,v.length)===v}function f(m,v,y){return(y===void 0||y>m.length)&&(y=m.length),m.substring(y-v.length,y)===v}function w(m,v,y){return typeof y!="number"&&(y=0),y+v.length>m.length?!1:m.indexOf(v,y)!==-1}return I("ERR_INVALID_OPT_VALUE",function(m,v){return'The value "'+v+'" is invalid for option "'+m+'"'},TypeError),I("ERR_INVALID_ARG_TYPE",function(m,v,y){var d;typeof v=="string"&&R(v,"not ")?(d="must not be",v=v.replace(/^not /,"")):d="must be";var g;if(f(m," argument"))g="The ".concat(m," ").concat(d," ").concat(p(v,"type"));else{var M=w(m,".")?"property":"argument";g='The "'.concat(m,'" ').concat(M," ").concat(d," ").concat(p(v,"type"))}return g+=". Received type ".concat(typeof y),g},TypeError),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),I("ERR_METHOD_NOT_IMPLEMENTED",function(m){return"The "+m+" method is not implemented"}),I("ERR_STREAM_PREMATURE_CLOSE","Premature close"),I("ERR_STREAM_DESTROYED",function(m){return"Cannot call "+m+" after a stream was destroyed"}),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),I("ERR_STREAM_WRITE_AFTER_END","write after end"),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_UNKNOWN_ENCODING",function(m){return"Unknown encoding: "+m},TypeError),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=S,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var _=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function S(p,R,f){return p.highWaterMark!=null?p.highWaterMark:R?p[f]:null}function I(p,R,f,w){var m=S(R,w,f);if(m!=null){if(!(isFinite(m)&&Math.floor(m)===m)||m<0){var v=w?f:"highWaterMark";throw new _(v,m)}return Math.floor(m)}return p.objectMode?16:16*1024}return state={getHighWaterMark:I},state}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1,browser$a=_;function _(I,p){if(S("noDeprecation"))return I;var R=!1;function f(){if(!R){if(S("throwDeprecation"))throw new Error(p);S("traceDeprecation")?console.trace(p):console.warn(p),R=!0}return I.apply(this,arguments)}return f}function S(I){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var p=commonjsGlobal.localStorage[I];return p==null?!1:String(p).toLowerCase()==="true"}return browser$a}var _stream_writable$2,hasRequired_stream_writable$2;function require_stream_writable$2(){if(hasRequired_stream_writable$2)return _stream_writable$2;hasRequired_stream_writable$2=1,_stream_writable$2=ae;function _(K){var q=this;this.next=null,this.entry=null,this.finish=function(){Y(q,K)}}var S;ae.WritableState=Q;var I={deprecate:requireBrowser$a()},p=requireStreamBrowser$2(),R=requireDist().Buffer,f=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function w(K){return R.from(K)}function m(K){return R.isBuffer(K)||K instanceof f}var v=requireDestroy$2(),y=requireState(),d=y.getHighWaterMark,g=requireErrorsBrowser().codes,M=g.ERR_INVALID_ARG_TYPE,x=g.ERR_METHOD_NOT_IMPLEMENTED,B=g.ERR_MULTIPLE_CALLBACK,A=g.ERR_STREAM_CANNOT_PIPE,D=g.ERR_STREAM_DESTROYED,C=g.ERR_STREAM_NULL_VALUES,P=g.ERR_STREAM_WRITE_AFTER_END,H=g.ERR_UNKNOWN_ENCODING,N=v.errorOrDestroy;requireInherits_browser()(ae,p);function V(){}function Q(K,q,$){S=S||require_stream_duplex$2(),K=K||{},typeof $!="boolean"&&($=q instanceof S),this.objectMode=!!K.objectMode,$&&(this.objectMode=this.objectMode||!!K.writableObjectMode),this.highWaterMark=d(this,K,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var W=K.decodeStrings===!1;this.decodeStrings=!W,this.defaultEncoding=K.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(J){s(q,J)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=K.emitClose!==!1,this.autoDestroy=!!K.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new _(this)}Q.prototype.getBuffer=function(){for(var q=this.bufferedRequest,$=[];q;)$.push(q),q=q.next;return $},(function(){try{Object.defineProperty(Q.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ne;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ne=Function.prototype[Symbol.hasInstance],Object.defineProperty(ae,Symbol.hasInstance,{value:function(q){return ne.call(this,q)?!0:this!==ae?!1:q&&q._writableState instanceof Q}})):ne=function(q){return q instanceof this};function ae(K){S=S||require_stream_duplex$2();var q=this instanceof S;if(!q&&!ne.call(ae,this))return new ae(K);this._writableState=new Q(K,this,q),this.writable=!0,K&&(typeof K.write=="function"&&(this._write=K.write),typeof K.writev=="function"&&(this._writev=K.writev),typeof K.destroy=="function"&&(this._destroy=K.destroy),typeof K.final=="function"&&(this._final=K.final)),p.call(this)}ae.prototype.pipe=function(){N(this,new A)};function ee(K,q){var $=new P;N(K,$),process$1.nextTick(q,$)}function le(K,q,$,W){var J;return $===null?J=new C:typeof $!="string"&&!q.objectMode&&(J=new M("chunk",["string","Buffer"],$)),J?(N(K,J),process$1.nextTick(W,J),!1):!0}ae.prototype.write=function(K,q,$){var W=this._writableState,J=!1,X=!W.objectMode&&m(K);return X&&!R.isBuffer(K)&&(K=w(K)),typeof q=="function"&&($=q,q=null),X?q="buffer":q||(q=W.defaultEncoding),typeof $!="function"&&($=V),W.ending?ee(this,$):(X||le(this,W,K,$))&&(W.pendingcb++,J=e(this,W,X,K,q,$)),J},ae.prototype.cork=function(){this._writableState.corked++},ae.prototype.uncork=function(){var K=this._writableState;K.corked&&(K.corked--,!K.writing&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&o(this,K))},ae.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((q+"").toLowerCase())>-1))throw new H(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(ae.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function c(K,q,$){return!K.objectMode&&K.decodeStrings!==!1&&typeof q=="string"&&(q=R.from(q,$)),q}Object.defineProperty(ae.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function e(K,q,$,W,J,X){if(!$){var U=c(q,W,J);W!==U&&($=!0,J="buffer",W=U)}var re=q.objectMode?1:W.length;q.length+=re;var Ie=q.length<q.highWaterMark;if(Ie||(q.needDrain=!0),q.writing||q.corked){var ue=q.lastBufferedRequest;q.lastBufferedRequest={chunk:W,encoding:J,isBuf:$,callback:X,next:null},ue?ue.next=q.lastBufferedRequest:q.bufferedRequest=q.lastBufferedRequest,q.bufferedRequestCount+=1}else t(K,q,!1,re,W,J,X);return Ie}function t(K,q,$,W,J,X,U){q.writelen=W,q.writecb=U,q.writing=!0,q.sync=!0,q.destroyed?q.onwrite(new D("write")):$?K._writev(J,q.onwrite):K._write(J,X,q.onwrite),q.sync=!1}function n(K,q,$,W,J){--q.pendingcb,$?(process$1.nextTick(J,W),process$1.nextTick(E,K,q),K._writableState.errorEmitted=!0,N(K,W)):(J(W),K._writableState.errorEmitted=!0,N(K,W),E(K,q))}function a(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}function s(K,q){var $=K._writableState,W=$.sync,J=$.writecb;if(typeof J!="function")throw new B;if(a($),q)n(K,$,W,q,J);else{var X=r($)||K.destroyed;!X&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest&&o(K,$),W?process$1.nextTick(u,K,$,X,J):u(K,$,X,J)}}function u(K,q,$,W){$||l(K,q),q.pendingcb--,W(),E(K,q)}function l(K,q){q.length===0&&q.needDrain&&(q.needDrain=!1,K.emit("drain"))}function o(K,q){q.bufferProcessing=!0;var $=q.bufferedRequest;if(K._writev&&$&&$.next){var W=q.bufferedRequestCount,J=new Array(W),X=q.corkedRequestsFree;X.entry=$;for(var U=0,re=!0;$;)J[U]=$,$.isBuf||(re=!1),$=$.next,U+=1;J.allBuffers=re,t(K,q,!0,q.length,J,"",X.finish),q.pendingcb++,q.lastBufferedRequest=null,X.next?(q.corkedRequestsFree=X.next,X.next=null):q.corkedRequestsFree=new _(q),q.bufferedRequestCount=0}else{for(;$;){var Ie=$.chunk,ue=$.encoding,he=$.callback,Pe=q.objectMode?1:Ie.length;if(t(K,q,!1,Pe,Ie,ue,he),$=$.next,q.bufferedRequestCount--,q.writing)break}$===null&&(q.lastBufferedRequest=null)}q.bufferedRequest=$,q.bufferProcessing=!1}ae.prototype._write=function(K,q,$){$(new x("_write()"))},ae.prototype._writev=null,ae.prototype.end=function(K,q,$){var W=this._writableState;return typeof K=="function"?($=K,K=null,q=null):typeof q=="function"&&($=q,q=null),K!=null&&this.write(K,q),W.corked&&(W.corked=1,this.uncork()),W.ending||L(this,W,$),this},Object.defineProperty(ae.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function r(K){return K.ending&&K.length===0&&K.bufferedRequest===null&&!K.finished&&!K.writing}function h(K,q){K._final(function($){q.pendingcb--,$&&N(K,$),q.prefinished=!0,K.emit("prefinish"),E(K,q)})}function b(K,q){!q.prefinished&&!q.finalCalled&&(typeof K._final=="function"&&!q.destroyed?(q.pendingcb++,q.finalCalled=!0,process$1.nextTick(h,K,q)):(q.prefinished=!0,K.emit("prefinish")))}function E(K,q){var $=r(q);if($&&(b(K,q),q.pendingcb===0&&(q.finished=!0,K.emit("finish"),q.autoDestroy))){var W=K._readableState;(!W||W.autoDestroy&&W.endEmitted)&&K.destroy()}return $}function L(K,q,$){q.ending=!0,E(K,q),$&&(q.finished?process$1.nextTick($):K.once("finish",$)),q.ended=!0,K.writable=!1}function Y(K,q,$){var W=K.entry;for(K.entry=null;W;){var J=W.callback;q.pendingcb--,J($),W=W.next}q.corkedRequestsFree.next=K}return Object.defineProperty(ae.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),ae.prototype.destroy=v.destroy,ae.prototype._undestroy=v.undestroy,ae.prototype._destroy=function(K,q){q(K)},_stream_writable$2}var _stream_duplex$2,hasRequired_stream_duplex$2;function require_stream_duplex$2(){if(hasRequired_stream_duplex$2)return _stream_duplex$2;hasRequired_stream_duplex$2=1;var _=Object.keys||function(y){var d=[];for(var g in y)d.push(g);return d};_stream_duplex$2=w;var S=require_stream_readable$2(),I=require_stream_writable$2();requireInherits_browser()(w,S);for(var p=_(I.prototype),R=0;R<p.length;R++){var f=p[R];w.prototype[f]||(w.prototype[f]=I.prototype[f])}function w(y){if(!(this instanceof w))return new w(y);S.call(this,y),I.call(this,y),this.allowHalfOpen=!0,y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",m)))}Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function m(){this._writableState.ended||process$1.nextTick(v,this)}function v(y){y.end()}return Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),_stream_duplex$2}var string_decoder={},hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var _=requireSafeBuffer$2().Buffer,S=_.isEncoding||function(C){switch(C=""+C,C&&C.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function I(C){if(!C)return"utf8";for(var P;;)switch(C){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return C;default:if(P)return;C=(""+C).toLowerCase(),P=!0}}function p(C){var P=I(C);if(typeof P!="string"&&(_.isEncoding===S||!S(C)))throw new Error("Unknown encoding: "+C);return P||C}string_decoder.StringDecoder=R;function R(C){this.encoding=p(C);var P;switch(this.encoding){case"utf16le":this.text=g,this.end=M,P=4;break;case"utf8":this.fillLast=v,P=4;break;case"base64":this.text=x,this.end=B,P=3;break;default:this.write=A,this.end=D;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe(P)}R.prototype.write=function(C){if(C.length===0)return"";var P,H;if(this.lastNeed){if(P=this.fillLast(C),P===void 0)return"";H=this.lastNeed,this.lastNeed=0}else H=0;return H<C.length?P?P+this.text(C,H):this.text(C,H):P||""},R.prototype.end=d,R.prototype.text=y,R.prototype.fillLast=function(C){if(this.lastNeed<=C.length)return C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,C.length),this.lastNeed-=C.length};function f(C){return C<=127?0:C>>5===6?2:C>>4===14?3:C>>3===30?4:C>>6===2?-1:-2}function w(C,P,H){var N=P.length-1;if(N<H)return 0;var V=f(P[N]);return V>=0?(V>0&&(C.lastNeed=V-1),V):--N<H||V===-2?0:(V=f(P[N]),V>=0?(V>0&&(C.lastNeed=V-2),V):--N<H||V===-2?0:(V=f(P[N]),V>=0?(V>0&&(V===2?V=0:C.lastNeed=V-3),V):0))}function m(C,P,H){if((P[0]&192)!==128)return C.lastNeed=0,"�";if(C.lastNeed>1&&P.length>1){if((P[1]&192)!==128)return C.lastNeed=1,"�";if(C.lastNeed>2&&P.length>2&&(P[2]&192)!==128)return C.lastNeed=2,"�"}}function v(C){var P=this.lastTotal-this.lastNeed,H=m(this,C);if(H!==void 0)return H;if(this.lastNeed<=C.length)return C.copy(this.lastChar,P,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,P,0,C.length),this.lastNeed-=C.length}function y(C,P){var H=w(this,C,P);if(!this.lastNeed)return C.toString("utf8",P);this.lastTotal=H;var N=C.length-(H-this.lastNeed);return C.copy(this.lastChar,0,N),C.toString("utf8",P,N)}function d(C){var P=C&&C.length?this.write(C):"";return this.lastNeed?P+"�":P}function g(C,P){if((C.length-P)%2===0){var H=C.toString("utf16le",P);if(H){var N=H.charCodeAt(H.length-1);if(N>=55296&&N<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1],H.slice(0,-1)}return H}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=C[C.length-1],C.toString("utf16le",P,C.length-1)}function M(C){var P=C&&C.length?this.write(C):"";if(this.lastNeed){var H=this.lastTotal-this.lastNeed;return P+this.lastChar.toString("utf16le",0,H)}return P}function x(C,P){var H=(C.length-P)%3;return H===0?C.toString("base64",P):(this.lastNeed=3-H,this.lastTotal=3,H===1?this.lastChar[0]=C[C.length-1]:(this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1]),C.toString("base64",P,C.length-H))}function B(C){var P=C&&C.length?this.write(C):"";return this.lastNeed?P+this.lastChar.toString("base64",0,3-this.lastNeed):P}function A(C){return C.toString(this.encoding)}function D(C){return C&&C.length?this.write(C):""}return string_decoder}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var _=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function S(f){var w=!1;return function(){if(!w){w=!0;for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];f.apply(this,v)}}}function I(){}function p(f){return f.setHeader&&typeof f.abort=="function"}function R(f,w,m){if(typeof w=="function")return R(f,null,w);w||(w={}),m=S(m||I);var v=w.readable||w.readable!==!1&&f.readable,y=w.writable||w.writable!==!1&&f.writable,d=function(){f.writable||M()},g=f._writableState&&f._writableState.finished,M=function(){y=!1,g=!0,v||m.call(f)},x=f._readableState&&f._readableState.endEmitted,B=function(){v=!1,x=!0,y||m.call(f)},A=function(H){m.call(f,H)},D=function(){var H;if(v&&!x)return(!f._readableState||!f._readableState.ended)&&(H=new _),m.call(f,H);if(y&&!g)return(!f._writableState||!f._writableState.ended)&&(H=new _),m.call(f,H)},C=function(){f.req.on("finish",M)};return p(f)?(f.on("complete",M),f.on("abort",D),f.req?C():f.on("request",C)):y&&!f._writableState&&(f.on("end",d),f.on("close",d)),f.on("end",B),f.on("finish",M),w.error!==!1&&f.on("error",A),f.on("close",D),function(){f.removeListener("complete",M),f.removeListener("abort",D),f.removeListener("request",C),f.req&&f.req.removeListener("finish",M),f.removeListener("end",d),f.removeListener("close",d),f.removeListener("finish",M),f.removeListener("end",B),f.removeListener("error",A),f.removeListener("close",D)}}return endOfStream=R,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var _;function S(H,N,V){return N=I(N),N in H?Object.defineProperty(H,N,{value:V,enumerable:!0,configurable:!0,writable:!0}):H[N]=V,H}function I(H){var N=p(H,"string");return typeof N=="symbol"?N:String(N)}function p(H,N){if(typeof H!="object"||H===null)return H;var V=H[Symbol.toPrimitive];if(V!==void 0){var Q=V.call(H,N);if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(H)}var R=requireEndOfStream(),f=Symbol("lastResolve"),w=Symbol("lastReject"),m=Symbol("error"),v=Symbol("ended"),y=Symbol("lastPromise"),d=Symbol("handlePromise"),g=Symbol("stream");function M(H,N){return{value:H,done:N}}function x(H){var N=H[f];if(N!==null){var V=H[g].read();V!==null&&(H[y]=null,H[f]=null,H[w]=null,N(M(V,!1)))}}function B(H){process$1.nextTick(x,H)}function A(H,N){return function(V,Q){H.then(function(){if(N[v]){V(M(void 0,!0));return}N[d](V,Q)},Q)}}var D=Object.getPrototypeOf(function(){}),C=Object.setPrototypeOf((_={get stream(){return this[g]},next:function(){var N=this,V=this[m];if(V!==null)return Promise.reject(V);if(this[v])return Promise.resolve(M(void 0,!0));if(this[g].destroyed)return new Promise(function(ee,le){process$1.nextTick(function(){N[m]?le(N[m]):ee(M(void 0,!0))})});var Q=this[y],ne;if(Q)ne=new Promise(A(Q,this));else{var ae=this[g].read();if(ae!==null)return Promise.resolve(M(ae,!1));ne=new Promise(this[d])}return this[y]=ne,ne}},S(_,Symbol.asyncIterator,function(){return this}),S(_,"return",function(){var N=this;return new Promise(function(V,Q){N[g].destroy(null,function(ne){if(ne){Q(ne);return}V(M(void 0,!0))})})}),_),D),P=function(N){var V,Q=Object.create(C,(V={},S(V,g,{value:N,writable:!0}),S(V,f,{value:null,writable:!0}),S(V,w,{value:null,writable:!0}),S(V,m,{value:null,writable:!0}),S(V,v,{value:N._readableState.endEmitted,writable:!0}),S(V,d,{value:function(ae,ee){var le=Q[g].read();le?(Q[y]=null,Q[f]=null,Q[w]=null,ae(M(le,!1))):(Q[f]=ae,Q[w]=ee)},writable:!0}),V));return Q[y]=null,R(N,function(ne){if(ne&&ne.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ae=Q[w];ae!==null&&(Q[y]=null,Q[f]=null,Q[w]=null,ae(ne)),Q[m]=ne;return}var ee=Q[f];ee!==null&&(Q[y]=null,Q[f]=null,Q[w]=null,ee(M(void 0,!0))),Q[v]=!0}),N.on("readable",B.bind(null,Q)),Q};return async_iterator=P,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$2,hasRequired_stream_readable$2;function require_stream_readable$2(){if(hasRequired_stream_readable$2)return _stream_readable$2;hasRequired_stream_readable$2=1,_stream_readable$2=ee;var _;ee.ReadableState=ae,requireEvents().EventEmitter;var S=function(U,re){return U.listeners(re).length},I=requireStreamBrowser$2(),p=requireDist().Buffer,R=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(X){return p.from(X)}function w(X){return p.isBuffer(X)||X instanceof R}var m=requireUtil$1(),v;m&&m.debuglog?v=m.debuglog("stream"):v=function(){};var y=requireBuffer_list(),d=requireDestroy$2(),g=requireState(),M=g.getHighWaterMark,x=requireErrorsBrowser().codes,B=x.ERR_INVALID_ARG_TYPE,A=x.ERR_STREAM_PUSH_AFTER_EOF,D=x.ERR_METHOD_NOT_IMPLEMENTED,C=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,P,H,N;requireInherits_browser()(ee,I);var V=d.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ne(X,U,re){if(typeof X.prependListener=="function")return X.prependListener(U,re);!X._events||!X._events[U]?X.on(U,re):Array.isArray(X._events[U])?X._events[U].unshift(re):X._events[U]=[re,X._events[U]]}function ae(X,U,re){_=_||require_stream_duplex$2(),X=X||{},typeof re!="boolean"&&(re=U instanceof _),this.objectMode=!!X.objectMode,re&&(this.objectMode=this.objectMode||!!X.readableObjectMode),this.highWaterMark=M(this,X,"readableHighWaterMark",re),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=X.emitClose!==!1,this.autoDestroy=!!X.autoDestroy,this.destroyed=!1,this.defaultEncoding=X.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,X.encoding&&(P||(P=requireString_decoder().StringDecoder),this.decoder=new P(X.encoding),this.encoding=X.encoding)}function ee(X){if(_=_||require_stream_duplex$2(),!(this instanceof ee))return new ee(X);var U=this instanceof _;this._readableState=new ae(X,this,U),this.readable=!0,X&&(typeof X.read=="function"&&(this._read=X.read),typeof X.destroy=="function"&&(this._destroy=X.destroy)),I.call(this)}Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(U){this._readableState&&(this._readableState.destroyed=U)}}),ee.prototype.destroy=d.destroy,ee.prototype._undestroy=d.undestroy,ee.prototype._destroy=function(X,U){U(X)},ee.prototype.push=function(X,U){var re=this._readableState,Ie;return re.objectMode?Ie=!0:typeof X=="string"&&(U=U||re.defaultEncoding,U!==re.encoding&&(X=p.from(X,U),U=""),Ie=!0),le(this,X,U,!1,Ie)},ee.prototype.unshift=function(X){return le(this,X,null,!0,!1)};function le(X,U,re,Ie,ue){v("readableAddChunk",U);var he=X._readableState;if(U===null)he.reading=!1,s(X,he);else{var Pe;if(ue||(Pe=e(he,U)),Pe)V(X,Pe);else if(he.objectMode||U&&U.length>0)if(typeof U!="string"&&!he.objectMode&&Object.getPrototypeOf(U)!==p.prototype&&(U=f(U)),Ie)he.endEmitted?V(X,new C):c(X,he,U,!0);else if(he.ended)V(X,new A);else{if(he.destroyed)return!1;he.reading=!1,he.decoder&&!re?(U=he.decoder.write(U),he.objectMode||U.length!==0?c(X,he,U,!1):o(X,he)):c(X,he,U,!1)}else Ie||(he.reading=!1,o(X,he))}return!he.ended&&(he.length<he.highWaterMark||he.length===0)}function c(X,U,re,Ie){U.flowing&&U.length===0&&!U.sync?(U.awaitDrain=0,X.emit("data",re)):(U.length+=U.objectMode?1:re.length,Ie?U.buffer.unshift(re):U.buffer.push(re),U.needReadable&&u(X)),o(X,U)}function e(X,U){var re;return!w(U)&&typeof U!="string"&&U!==void 0&&!X.objectMode&&(re=new B("chunk",["string","Buffer","Uint8Array"],U)),re}ee.prototype.isPaused=function(){return this._readableState.flowing===!1},ee.prototype.setEncoding=function(X){P||(P=requireString_decoder().StringDecoder);var U=new P(X);this._readableState.decoder=U,this._readableState.encoding=this._readableState.decoder.encoding;for(var re=this._readableState.buffer.head,Ie="";re!==null;)Ie+=U.write(re.data),re=re.next;return this._readableState.buffer.clear(),Ie!==""&&this._readableState.buffer.push(Ie),this._readableState.length=Ie.length,this};var t=1073741824;function n(X){return X>=t?X=t:(X--,X|=X>>>1,X|=X>>>2,X|=X>>>4,X|=X>>>8,X|=X>>>16,X++),X}function a(X,U){return X<=0||U.length===0&&U.ended?0:U.objectMode?1:X!==X?U.flowing&&U.length?U.buffer.head.data.length:U.length:(X>U.highWaterMark&&(U.highWaterMark=n(X)),X<=U.length?X:U.ended?U.length:(U.needReadable=!0,0))}ee.prototype.read=function(X){v("read",X),X=parseInt(X,10);var U=this._readableState,re=X;if(X!==0&&(U.emittedReadable=!1),X===0&&U.needReadable&&((U.highWaterMark!==0?U.length>=U.highWaterMark:U.length>0)||U.ended))return v("read: emitReadable",U.length,U.ended),U.length===0&&U.ended?$(this):u(this),null;if(X=a(X,U),X===0&&U.ended)return U.length===0&&$(this),null;var Ie=U.needReadable;v("need readable",Ie),(U.length===0||U.length-X<U.highWaterMark)&&(Ie=!0,v("length less than watermark",Ie)),U.ended||U.reading?(Ie=!1,v("reading or ended",Ie)):Ie&&(v("do read"),U.reading=!0,U.sync=!0,U.length===0&&(U.needReadable=!0),this._read(U.highWaterMark),U.sync=!1,U.reading||(X=a(re,U)));var ue;return X>0?ue=q(X,U):ue=null,ue===null?(U.needReadable=U.length<=U.highWaterMark,X=0):(U.length-=X,U.awaitDrain=0),U.length===0&&(U.ended||(U.needReadable=!0),re!==X&&U.ended&&$(this)),ue!==null&&this.emit("data",ue),ue};function s(X,U){if(v("onEofChunk"),!U.ended){if(U.decoder){var re=U.decoder.end();re&&re.length&&(U.buffer.push(re),U.length+=U.objectMode?1:re.length)}U.ended=!0,U.sync?u(X):(U.needReadable=!1,U.emittedReadable||(U.emittedReadable=!0,l(X)))}}function u(X){var U=X._readableState;v("emitReadable",U.needReadable,U.emittedReadable),U.needReadable=!1,U.emittedReadable||(v("emitReadable",U.flowing),U.emittedReadable=!0,process$1.nextTick(l,X))}function l(X){var U=X._readableState;v("emitReadable_",U.destroyed,U.length,U.ended),!U.destroyed&&(U.length||U.ended)&&(X.emit("readable"),U.emittedReadable=!1),U.needReadable=!U.flowing&&!U.ended&&U.length<=U.highWaterMark,K(X)}function o(X,U){U.readingMore||(U.readingMore=!0,process$1.nextTick(r,X,U))}function r(X,U){for(;!U.reading&&!U.ended&&(U.length<U.highWaterMark||U.flowing&&U.length===0);){var re=U.length;if(v("maybeReadMore read 0"),X.read(0),re===U.length)break}U.readingMore=!1}ee.prototype._read=function(X){V(this,new D("_read()"))},ee.prototype.pipe=function(X,U){var re=this,Ie=this._readableState;switch(Ie.pipesCount){case 0:Ie.pipes=X;break;case 1:Ie.pipes=[Ie.pipes,X];break;default:Ie.pipes.push(X);break}Ie.pipesCount+=1,v("pipe count=%d opts=%j",Ie.pipesCount,U);var ue=(!U||U.end!==!1)&&X!==process$1.stdout&&X!==process$1.stderr,he=ue?me:Ue;Ie.endEmitted?process$1.nextTick(he):re.once("end",he),X.on("unpipe",Pe);function Pe(xe,Ae){v("onunpipe"),xe===re&&Ae&&Ae.hasUnpiped===!1&&(Ae.hasUnpiped=!0,de())}function me(){v("onend"),X.end()}var se=h(re);X.on("drain",se);var De=!1;function de(){v("cleanup"),X.removeListener("close",pe),X.removeListener("finish",_e),X.removeListener("drain",se),X.removeListener("error",Ce),X.removeListener("unpipe",Pe),re.removeListener("end",me),re.removeListener("end",Ue),re.removeListener("data",ye),De=!0,Ie.awaitDrain&&(!X._writableState||X._writableState.needDrain)&&se()}re.on("data",ye);function ye(xe){v("ondata");var Ae=X.write(xe);v("dest.write",Ae),Ae===!1&&((Ie.pipesCount===1&&Ie.pipes===X||Ie.pipesCount>1&&J(Ie.pipes,X)!==-1)&&!De&&(v("false write response, pause",Ie.awaitDrain),Ie.awaitDrain++),re.pause())}function Ce(xe){v("onerror",xe),Ue(),X.removeListener("error",Ce),S(X,"error")===0&&V(X,xe)}ne(X,"error",Ce);function pe(){X.removeListener("finish",_e),Ue()}X.once("close",pe);function _e(){v("onfinish"),X.removeListener("close",pe),Ue()}X.once("finish",_e);function Ue(){v("unpipe"),re.unpipe(X)}return X.emit("pipe",re),Ie.flowing||(v("pipe resume"),re.resume()),X};function h(X){return function(){var re=X._readableState;v("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&S(X,"data")&&(re.flowing=!0,K(X))}}ee.prototype.unpipe=function(X){var U=this._readableState,re={hasUnpiped:!1};if(U.pipesCount===0)return this;if(U.pipesCount===1)return X&&X!==U.pipes?this:(X||(X=U.pipes),U.pipes=null,U.pipesCount=0,U.flowing=!1,X&&X.emit("unpipe",this,re),this);if(!X){var Ie=U.pipes,ue=U.pipesCount;U.pipes=null,U.pipesCount=0,U.flowing=!1;for(var he=0;he<ue;he++)Ie[he].emit("unpipe",this,{hasUnpiped:!1});return this}var Pe=J(U.pipes,X);return Pe===-1?this:(U.pipes.splice(Pe,1),U.pipesCount-=1,U.pipesCount===1&&(U.pipes=U.pipes[0]),X.emit("unpipe",this,re),this)},ee.prototype.on=function(X,U){var re=I.prototype.on.call(this,X,U),Ie=this._readableState;return X==="data"?(Ie.readableListening=this.listenerCount("readable")>0,Ie.flowing!==!1&&this.resume()):X==="readable"&&!Ie.endEmitted&&!Ie.readableListening&&(Ie.readableListening=Ie.needReadable=!0,Ie.flowing=!1,Ie.emittedReadable=!1,v("on readable",Ie.length,Ie.reading),Ie.length?u(this):Ie.reading||process$1.nextTick(E,this)),re},ee.prototype.addListener=ee.prototype.on,ee.prototype.removeListener=function(X,U){var re=I.prototype.removeListener.call(this,X,U);return X==="readable"&&process$1.nextTick(b,this),re},ee.prototype.removeAllListeners=function(X){var U=I.prototype.removeAllListeners.apply(this,arguments);return(X==="readable"||X===void 0)&&process$1.nextTick(b,this),U};function b(X){var U=X._readableState;U.readableListening=X.listenerCount("readable")>0,U.resumeScheduled&&!U.paused?U.flowing=!0:X.listenerCount("data")>0&&X.resume()}function E(X){v("readable nexttick read 0"),X.read(0)}ee.prototype.resume=function(){var X=this._readableState;return X.flowing||(v("resume"),X.flowing=!X.readableListening,L(this,X)),X.paused=!1,this};function L(X,U){U.resumeScheduled||(U.resumeScheduled=!0,process$1.nextTick(Y,X,U))}function Y(X,U){v("resume",U.reading),U.reading||X.read(0),U.resumeScheduled=!1,X.emit("resume"),K(X),U.flowing&&!U.reading&&X.read(0)}ee.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function K(X){var U=X._readableState;for(v("flow",U.flowing);U.flowing&&X.read()!==null;);}ee.prototype.wrap=function(X){var U=this,re=this._readableState,Ie=!1;X.on("end",function(){if(v("wrapped end"),re.decoder&&!re.ended){var Pe=re.decoder.end();Pe&&Pe.length&&U.push(Pe)}U.push(null)}),X.on("data",function(Pe){if(v("wrapped data"),re.decoder&&(Pe=re.decoder.write(Pe)),!(re.objectMode&&Pe==null)&&!(!re.objectMode&&(!Pe||!Pe.length))){var me=U.push(Pe);me||(Ie=!0,X.pause())}});for(var ue in X)this[ue]===void 0&&typeof X[ue]=="function"&&(this[ue]=(function(me){return function(){return X[me].apply(X,arguments)}})(ue));for(var he=0;he<Q.length;he++)X.on(Q[he],this.emit.bind(this,Q[he]));return this._read=function(Pe){v("wrapped _read",Pe),Ie&&(Ie=!1,X.resume())},this},typeof Symbol=="function"&&(ee.prototype[Symbol.asyncIterator]=function(){return H===void 0&&(H=requireAsync_iterator()),H(this)}),Object.defineProperty(ee.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ee.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ee.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(U){this._readableState&&(this._readableState.flowing=U)}}),ee._fromList=q,Object.defineProperty(ee.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function q(X,U){if(U.length===0)return null;var re;return U.objectMode?re=U.buffer.shift():!X||X>=U.length?(U.decoder?re=U.buffer.join(""):U.buffer.length===1?re=U.buffer.first():re=U.buffer.concat(U.length),U.buffer.clear()):re=U.buffer.consume(X,U.decoder),re}function $(X){var U=X._readableState;v("endReadable",U.endEmitted),U.endEmitted||(U.ended=!0,process$1.nextTick(W,U,X))}function W(X,U){if(v("endReadableNT",X.endEmitted,X.length),!X.endEmitted&&X.length===0&&(X.endEmitted=!0,U.readable=!1,U.emit("end"),X.autoDestroy)){var re=U._writableState;(!re||re.autoDestroy&&re.finished)&&U.destroy()}}typeof Symbol=="function"&&(ee.from=function(X,U){return N===void 0&&(N=requireFromBrowser()),N(ee,X,U)});function J(X,U){for(var re=0,Ie=X.length;re<Ie;re++)if(X[re]===U)return re;return-1}return _stream_readable$2}var _stream_transform$2,hasRequired_stream_transform$2;function require_stream_transform$2(){if(hasRequired_stream_transform$2)return _stream_transform$2;hasRequired_stream_transform$2=1,_stream_transform$2=m;var _=requireErrorsBrowser().codes,S=_.ERR_METHOD_NOT_IMPLEMENTED,I=_.ERR_MULTIPLE_CALLBACK,p=_.ERR_TRANSFORM_ALREADY_TRANSFORMING,R=_.ERR_TRANSFORM_WITH_LENGTH_0,f=require_stream_duplex$2();requireInherits_browser()(m,f);function w(d,g){var M=this._transformState;M.transforming=!1;var x=M.writecb;if(x===null)return this.emit("error",new I);M.writechunk=null,M.writecb=null,g!=null&&this.push(g),x(d);var B=this._readableState;B.reading=!1,(B.needReadable||B.length<B.highWaterMark)&&this._read(B.highWaterMark)}function m(d){if(!(this instanceof m))return new m(d);f.call(this,d),this._transformState={afterTransform:w.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",v)}function v(){var d=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(g,M){y(d,g,M)}):y(this,null,null)}m.prototype.push=function(d,g){return this._transformState.needTransform=!1,f.prototype.push.call(this,d,g)},m.prototype._transform=function(d,g,M){M(new S("_transform()"))},m.prototype._write=function(d,g,M){var x=this._transformState;if(x.writecb=M,x.writechunk=d,x.writeencoding=g,!x.transforming){var B=this._readableState;(x.needTransform||B.needReadable||B.length<B.highWaterMark)&&this._read(B.highWaterMark)}},m.prototype._read=function(d){var g=this._transformState;g.writechunk!==null&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},m.prototype._destroy=function(d,g){f.prototype._destroy.call(this,d,function(M){g(M)})};function y(d,g,M){if(g)return d.emit("error",g);if(M!=null&&d.push(M),d._writableState.length)throw new R;if(d._transformState.transforming)throw new p;return d.push(null)}return _stream_transform$2}var _stream_passthrough$2,hasRequired_stream_passthrough$2;function require_stream_passthrough$2(){if(hasRequired_stream_passthrough$2)return _stream_passthrough$2;hasRequired_stream_passthrough$2=1,_stream_passthrough$2=S;var _=require_stream_transform$2();requireInherits_browser()(S,_);function S(I){if(!(this instanceof S))return new S(I);_.call(this,I)}return S.prototype._transform=function(I,p,R){R(null,I)},_stream_passthrough$2}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var _;function S(M){var x=!1;return function(){x||(x=!0,M.apply(void 0,arguments))}}var I=requireErrorsBrowser().codes,p=I.ERR_MISSING_ARGS,R=I.ERR_STREAM_DESTROYED;function f(M){if(M)throw M}function w(M){return M.setHeader&&typeof M.abort=="function"}function m(M,x,B,A){A=S(A);var D=!1;M.on("close",function(){D=!0}),_===void 0&&(_=requireEndOfStream()),_(M,{readable:x,writable:B},function(P){if(P)return A(P);D=!0,A()});var C=!1;return function(P){if(!D&&!C){if(C=!0,w(M))return M.abort();if(typeof M.destroy=="function")return M.destroy();A(P||new R("pipe"))}}}function v(M){M()}function y(M,x){return M.pipe(x)}function d(M){return!M.length||typeof M[M.length-1]!="function"?f:M.pop()}function g(){for(var M=arguments.length,x=new Array(M),B=0;B<M;B++)x[B]=arguments[B];var A=d(x);if(Array.isArray(x[0])&&(x=x[0]),x.length<2)throw new p("streams");var D,C=x.map(function(P,H){var N=H<x.length-1,V=H>0;return m(P,N,V,function(Q){D||(D=Q),Q&&C.forEach(v),!N&&(C.forEach(v),A(D))})});return x.reduce(y)}return pipeline_1=g,pipeline_1}var streamBrowserify,hasRequiredStreamBrowserify;function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=I;var _=requireEvents().EventEmitter,S=requireInherits_browser();S(I,_),I.Readable=require_stream_readable$2(),I.Writable=require_stream_writable$2(),I.Duplex=require_stream_duplex$2(),I.Transform=require_stream_transform$2(),I.PassThrough=require_stream_passthrough$2(),I.finished=requireEndOfStream(),I.pipeline=requirePipeline(),I.Stream=I;function I(){_.call(this)}return I.prototype.pipe=function(p,R){var f=this;function w(x){p.writable&&p.write(x)===!1&&f.pause&&f.pause()}f.on("data",w);function m(){f.readable&&f.resume&&f.resume()}p.on("drain",m),!p._isStdio&&(!R||R.end!==!1)&&(f.on("end",y),f.on("close",d));var v=!1;function y(){v||(v=!0,p.end())}function d(){v||(v=!0,typeof p.destroy=="function"&&p.destroy())}function g(x){if(M(),_.listenerCount(this,"error")===0)throw x}f.on("error",g),p.on("error",g);function M(){f.removeListener("data",w),p.removeListener("drain",m),f.removeListener("end",y),f.removeListener("close",d),f.removeListener("error",g),p.removeListener("error",g),f.removeListener("end",M),f.removeListener("close",M),p.removeListener("close",M)}return f.on("end",M),f.on("close",M),p.on("close",M),p.emit("pipe",f),p},streamBrowserify}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var _=requireSafeBuffer$2().Buffer,S=requireStreamBrowserify().Transform,I=requireInherits_browser();function p(m){S.call(this),this._block=_.allocUnsafe(m),this._blockSize=m,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}I(p,S),p.prototype._transform=function(m,v,y){var d=null;try{this.update(m,v)}catch(g){d=g}y(d)},p.prototype._flush=function(m){var v=null;try{this.push(this.digest())}catch(y){v=y}m(v)};var R=typeof Uint8Array<"u",f=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(_.prototype instanceof Uint8Array||_.TYPED_ARRAY_SUPPORT);function w(m,v){if(m instanceof _)return m;if(typeof m=="string")return _.from(m,v);if(f&&ArrayBuffer.isView(m)){if(m.byteLength===0)return _.alloc(0);var y=_.from(m.buffer,m.byteOffset,m.byteLength);if(y.byteLength===m.byteLength)return y}if(R&&m instanceof Uint8Array||_.isBuffer(m)&&m.constructor&&typeof m.constructor.isBuffer=="function"&&m.constructor.isBuffer(m))return _.from(m);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return p.prototype.update=function(m,v){if(this._finalized)throw new Error("Digest already called");m=w(m,v);for(var y=this._block,d=0;this._blockOffset+m.length-d>=this._blockSize;){for(var g=this._blockOffset;g<this._blockSize;)y[g++]=m[d++];this._update(),this._blockOffset=0}for(;d<m.length;)y[this._blockOffset++]=m[d++];for(var M=0,x=m.length*8;x>0;++M)this._length[M]+=x,x=this._length[M]/4294967296|0,x>0&&(this._length[M]-=4294967296*x);return this},p.prototype._update=function(){throw new Error("_update is not implemented")},p.prototype.digest=function(m){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var v=this._digest();m!==void 0&&(v=v.toString(m)),this._block.fill(0),this._blockOffset=0;for(var y=0;y<4;++y)this._length[y]=0;return v},p.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=p,hashBase$1}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var _=requireInherits_browser(),S=requireHashBase$1(),I=requireSafeBuffer$2().Buffer,p=new Array(16);function R(){S.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}_(R,S),R.prototype._update=function(){for(var d=p,g=0;g<16;++g)d[g]=this._block.readInt32LE(g*4);var M=this._a,x=this._b,B=this._c,A=this._d;M=w(M,x,B,A,d[0],3614090360,7),A=w(A,M,x,B,d[1],3905402710,12),B=w(B,A,M,x,d[2],606105819,17),x=w(x,B,A,M,d[3],3250441966,22),M=w(M,x,B,A,d[4],4118548399,7),A=w(A,M,x,B,d[5],1200080426,12),B=w(B,A,M,x,d[6],2821735955,17),x=w(x,B,A,M,d[7],4249261313,22),M=w(M,x,B,A,d[8],1770035416,7),A=w(A,M,x,B,d[9],2336552879,12),B=w(B,A,M,x,d[10],4294925233,17),x=w(x,B,A,M,d[11],2304563134,22),M=w(M,x,B,A,d[12],1804603682,7),A=w(A,M,x,B,d[13],4254626195,12),B=w(B,A,M,x,d[14],2792965006,17),x=w(x,B,A,M,d[15],1236535329,22),M=m(M,x,B,A,d[1],4129170786,5),A=m(A,M,x,B,d[6],3225465664,9),B=m(B,A,M,x,d[11],643717713,14),x=m(x,B,A,M,d[0],3921069994,20),M=m(M,x,B,A,d[5],3593408605,5),A=m(A,M,x,B,d[10],38016083,9),B=m(B,A,M,x,d[15],3634488961,14),x=m(x,B,A,M,d[4],3889429448,20),M=m(M,x,B,A,d[9],568446438,5),A=m(A,M,x,B,d[14],3275163606,9),B=m(B,A,M,x,d[3],4107603335,14),x=m(x,B,A,M,d[8],1163531501,20),M=m(M,x,B,A,d[13],2850285829,5),A=m(A,M,x,B,d[2],4243563512,9),B=m(B,A,M,x,d[7],1735328473,14),x=m(x,B,A,M,d[12],2368359562,20),M=v(M,x,B,A,d[5],4294588738,4),A=v(A,M,x,B,d[8],2272392833,11),B=v(B,A,M,x,d[11],1839030562,16),x=v(x,B,A,M,d[14],4259657740,23),M=v(M,x,B,A,d[1],2763975236,4),A=v(A,M,x,B,d[4],1272893353,11),B=v(B,A,M,x,d[7],4139469664,16),x=v(x,B,A,M,d[10],3200236656,23),M=v(M,x,B,A,d[13],681279174,4),A=v(A,M,x,B,d[0],3936430074,11),B=v(B,A,M,x,d[3],3572445317,16),x=v(x,B,A,M,d[6],76029189,23),M=v(M,x,B,A,d[9],3654602809,4),A=v(A,M,x,B,d[12],3873151461,11),B=v(B,A,M,x,d[15],530742520,16),x=v(x,B,A,M,d[2],3299628645,23),M=y(M,x,B,A,d[0],4096336452,6),A=y(A,M,x,B,d[7],1126891415,10),B=y(B,A,M,x,d[14],2878612391,15),x=y(x,B,A,M,d[5],4237533241,21),M=y(M,x,B,A,d[12],1700485571,6),A=y(A,M,x,B,d[3],2399980690,10),B=y(B,A,M,x,d[10],4293915773,15),x=y(x,B,A,M,d[1],2240044497,21),M=y(M,x,B,A,d[8],1873313359,6),A=y(A,M,x,B,d[15],4264355552,10),B=y(B,A,M,x,d[6],2734768916,15),x=y(x,B,A,M,d[13],1309151649,21),M=y(M,x,B,A,d[4],4149444226,6),A=y(A,M,x,B,d[11],3174756917,10),B=y(B,A,M,x,d[2],718787259,15),x=y(x,B,A,M,d[9],3951481745,21),this._a=this._a+M|0,this._b=this._b+x|0,this._c=this._c+B|0,this._d=this._d+A|0},R.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var d=I.allocUnsafe(16);return d.writeInt32LE(this._a,0),d.writeInt32LE(this._b,4),d.writeInt32LE(this._c,8),d.writeInt32LE(this._d,12),d};function f(d,g){return d<<g|d>>>32-g}function w(d,g,M,x,B,A,D){return f(d+(g&M|~g&x)+B+A|0,D)+g|0}function m(d,g,M,x,B,A,D){return f(d+(g&x|M&~x)+B+A|0,D)+g|0}function v(d,g,M,x,B,A,D){return f(d+(g^M^x)+B+A|0,D)+g|0}function y(d,g,M,x,B,A,D){return f(d+(M^(g|~x))+B+A|0,D)+g|0}return md5_js=R,md5_js}var isarray$2,hasRequiredIsarray$2;function requireIsarray$2(){if(hasRequiredIsarray$2)return isarray$2;hasRequiredIsarray$2=1;var _={}.toString;return isarray$2=Array.isArray||function(S){return _.call(S)=="[object Array]"},isarray$2}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var _=requireType(),S=requireCallBound(),I=S("TypedArray.prototype.buffer",!0),p=requireIsTypedArray();return typedArrayBuffer=I||function(f){if(!p(f))throw new _("Not a Typed Array");return f.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$2;function requireToBuffer$2(){if(hasRequiredToBuffer$2)return toBuffer;hasRequiredToBuffer$2=1;var _=requireSafeBuffer$2().Buffer,S=requireIsarray$2(),I=requireTypedArrayBuffer(),p=ArrayBuffer.isView||function(v){try{return I(v),!0}catch{return!1}},R=typeof Uint8Array<"u",f=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",w=f&&(_.prototype instanceof Uint8Array||_.TYPED_ARRAY_SUPPORT);return toBuffer=function(v,y){if(_.isBuffer(v))return v.constructor&&!("isBuffer"in v)?_.from(v):v;if(typeof v=="string")return _.from(v,y);if(f&&p(v)){if(v.byteLength===0)return _.alloc(0);if(w){var d=_.from(v.buffer,v.byteOffset,v.byteLength);if(d.byteLength===v.byteLength)return d}var g=v instanceof Uint8Array?v:new Uint8Array(v.buffer,v.byteOffset,v.byteLength),M=_.from(g);if(M.length===v.byteLength)return M}if(R&&v instanceof Uint8Array)return _.from(v);var x=S(v);if(x)for(var B=0;B<v.length;B+=1){var A=v[B];if(typeof A!="number"||A<0||A>255||~~A!==A)throw new RangeError("Array items must be numbers in the range 0-255.")}if(x||_.isBuffer(v)&&v.constructor&&typeof v.constructor.isBuffer=="function"&&v.constructor.isBuffer(v))return _.from(v);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},toBuffer}var toBuffer_1$1,hasRequiredToBuffer$1;function requireToBuffer$1(){if(hasRequiredToBuffer$1)return toBuffer_1$1;hasRequiredToBuffer$1=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$2(),I=typeof Uint8Array<"u",p=I&&typeof ArrayBuffer<"u",R=p&&ArrayBuffer.isView;return toBuffer_1$1=function(f,w){if(typeof f=="string"||_.isBuffer(f)||I&&f instanceof Uint8Array||R&&R(f))return S(f,w);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')},toBuffer_1$1}var readableBrowser$1={exports:{}},processNextickArgs={exports:{}},hasRequiredProcessNextickArgs;function requireProcessNextickArgs(){if(hasRequiredProcessNextickArgs)return processNextickArgs.exports;hasRequiredProcessNextickArgs=1,typeof process$1>"u"||!process$1.version||process$1.version.indexOf("v0.")===0||process$1.version.indexOf("v1.")===0&&process$1.version.indexOf("v1.8.")!==0?processNextickArgs.exports={nextTick:_}:processNextickArgs.exports=process$1;function _(S,I,p,R){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var f=arguments.length,w,m;switch(f){case 0:case 1:return process$1.nextTick(S);case 2:return process$1.nextTick(function(){S.call(null,I)});case 3:return process$1.nextTick(function(){S.call(null,I,p)});case 4:return process$1.nextTick(function(){S.call(null,I,p,R)});default:for(w=new Array(f-1),m=0;m<w.length;)w[m++]=arguments[m];return process$1.nextTick(function(){S.apply(null,w)})}}return processNextickArgs.exports}var isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var _={}.toString;return isarray$1=Array.isArray||function(S){return _.call(S)=="[object Array]"},isarray$1}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}var safeBuffer$1={exports:{}},hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,(function(_,S){var I=requireDist(),p=I.Buffer;function R(w,m){for(var v in w)m[v]=w[v]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?_.exports=I:(R(I,S),S.Buffer=f);function f(w,m,v){return p(w,m,v)}R(p,f),f.from=function(w,m,v){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,m,v)},f.alloc=function(w,m,v){if(typeof w!="number")throw new TypeError("Argument must be a number");var y=p(w);return m!==void 0?typeof v=="string"?y.fill(m,v):y.fill(m):y.fill(0),y},f.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},f.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(w)}})(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1;function _(A){return Array.isArray?Array.isArray(A):B(A)==="[object Array]"}util.isArray=_;function S(A){return typeof A=="boolean"}util.isBoolean=S;function I(A){return A===null}util.isNull=I;function p(A){return A==null}util.isNullOrUndefined=p;function R(A){return typeof A=="number"}util.isNumber=R;function f(A){return typeof A=="string"}util.isString=f;function w(A){return typeof A=="symbol"}util.isSymbol=w;function m(A){return A===void 0}util.isUndefined=m;function v(A){return B(A)==="[object RegExp]"}util.isRegExp=v;function y(A){return typeof A=="object"&&A!==null}util.isObject=y;function d(A){return B(A)==="[object Date]"}util.isDate=d;function g(A){return B(A)==="[object Error]"||A instanceof Error}util.isError=g;function M(A){return typeof A=="function"}util.isFunction=M;function x(A){return A===null||typeof A=="boolean"||typeof A=="number"||typeof A=="string"||typeof A=="symbol"||typeof A>"u"}util.isPrimitive=x,util.isBuffer=requireDist().Buffer.isBuffer;function B(A){return Object.prototype.toString.call(A)}return util}var BufferList$1={exports:{}},hasRequiredBufferList$1;function requireBufferList$1(){return hasRequiredBufferList$1||(hasRequiredBufferList$1=1,(function(_){function S(f,w){if(!(f instanceof w))throw new TypeError("Cannot call a class as a function")}var I=requireSafeBuffer$1().Buffer,p=requireUtil$1();function R(f,w,m){f.copy(w,m)}_.exports=(function(){function f(){S(this,f),this.head=null,this.tail=null,this.length=0}return f.prototype.push=function(m){var v={data:m,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length},f.prototype.unshift=function(m){var v={data:m,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length},f.prototype.shift=function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}},f.prototype.clear=function(){this.head=this.tail=null,this.length=0},f.prototype.join=function(m){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=m+v.data;return y},f.prototype.concat=function(m){if(this.length===0)return I.alloc(0);for(var v=I.allocUnsafe(m>>>0),y=this.head,d=0;y;)R(y.data,v,d),d+=y.data.length,y=y.next;return v},f})(),p&&p.inspect&&p.inspect.custom&&(_.exports.prototype[p.inspect.custom]=function(){var f=p.inspect({length:this.length});return this.constructor.name+" "+f})})(BufferList$1)),BufferList$1.exports}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;var _=requireProcessNextickArgs();function S(R,f){var w=this,m=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return m||v?(f?f(R):R&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_.nextTick(p,this,R)):_.nextTick(p,this,R)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(R||null,function(y){!f&&y?w._writableState?w._writableState.errorEmitted||(w._writableState.errorEmitted=!0,_.nextTick(p,w,y)):_.nextTick(p,w,y):f&&f(y)}),this)}function I(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(R,f){R.emit("error",f)}return destroy_1$1={destroy:S,undestroy:I},destroy_1$1}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1;var _=requireProcessNextickArgs();_stream_writable$1=A;function S(u){var l=this;this.next=null,this.entry=null,this.finish=function(){s(l,u)}}var I=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:_.nextTick,p;A.WritableState=x;var R=Object.create(requireUtil());R.inherits=requireInherits_browser();var f={deprecate:requireBrowser$a()},w=requireStreamBrowser$1(),m=requireSafeBuffer$1().Buffer,v=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function y(u){return m.from(u)}function d(u){return m.isBuffer(u)||u instanceof v}var g=requireDestroy$1();R.inherits(A,w);function M(){}function x(u,l){p=p||require_stream_duplex$1(),u=u||{};var o=l instanceof p;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,b=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=b,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var E=u.decodeStrings===!1;this.decodeStrings=!E,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){ne(l,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this)}x.prototype.getBuffer=function(){for(var l=this.bufferedRequest,o=[];l;)o.push(l),l=l.next;return o},(function(){try{Object.defineProperty(x.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(u){return B.call(this,u)?!0:this!==A?!1:u&&u._writableState instanceof x}})):B=function(u){return u instanceof this};function A(u){if(p=p||require_stream_duplex$1(),!B.call(A,this)&&!(this instanceof p))return new A(u);this._writableState=new x(u,this),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),w.call(this)}A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function D(u,l){var o=new Error("write after end");u.emit("error",o),_.nextTick(l,o)}function C(u,l,o,r){var h=!0,b=!1;return o===null?b=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!l.objectMode&&(b=new TypeError("Invalid non-string/buffer chunk")),b&&(u.emit("error",b),_.nextTick(r,b),h=!1),h}A.prototype.write=function(u,l,o){var r=this._writableState,h=!1,b=!r.objectMode&&d(u);return b&&!m.isBuffer(u)&&(u=y(u)),typeof l=="function"&&(o=l,l=null),b?l="buffer":l||(l=r.defaultEncoding),typeof o!="function"&&(o=M),r.ended?D(this,o):(b||C(this,r,u,o))&&(r.pendingcb++,h=H(this,r,b,u,l,o)),h},A.prototype.cork=function(){var u=this._writableState;u.corked++},A.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&le(this,u))},A.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this};function P(u,l,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof l=="string"&&(l=m.from(l,o)),l}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(u,l,o,r,h,b){if(!o){var E=P(l,r,h);r!==E&&(o=!0,h="buffer",r=E)}var L=l.objectMode?1:r.length;l.length+=L;var Y=l.length<l.highWaterMark;if(Y||(l.needDrain=!0),l.writing||l.corked){var K=l.lastBufferedRequest;l.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:b,next:null},K?K.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else N(u,l,!1,L,r,h,b);return Y}function N(u,l,o,r,h,b,E){l.writelen=r,l.writecb=E,l.writing=!0,l.sync=!0,o?u._writev(h,l.onwrite):u._write(h,b,l.onwrite),l.sync=!1}function V(u,l,o,r,h){--l.pendingcb,o?(_.nextTick(h,r),_.nextTick(n,u,l),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,l))}function Q(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function ne(u,l){var o=u._writableState,r=o.sync,h=o.writecb;if(Q(o),l)V(u,o,r,l,h);else{var b=c(o);!b&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&le(u,o),r?I(ae,u,o,b,h):ae(u,o,b,h)}}function ae(u,l,o,r){o||ee(u,l),l.pendingcb--,r(),n(u,l)}function ee(u,l){l.length===0&&l.needDrain&&(l.needDrain=!1,u.emit("drain"))}function le(u,l){l.bufferProcessing=!0;var o=l.bufferedRequest;if(u._writev&&o&&o.next){var r=l.bufferedRequestCount,h=new Array(r),b=l.corkedRequestsFree;b.entry=o;for(var E=0,L=!0;o;)h[E]=o,o.isBuf||(L=!1),o=o.next,E+=1;h.allBuffers=L,N(u,l,!0,l.length,h,"",b.finish),l.pendingcb++,l.lastBufferedRequest=null,b.next?(l.corkedRequestsFree=b.next,b.next=null):l.corkedRequestsFree=new S(l),l.bufferedRequestCount=0}else{for(;o;){var Y=o.chunk,K=o.encoding,q=o.callback,$=l.objectMode?1:Y.length;if(N(u,l,!1,$,Y,K,q),o=o.next,l.bufferedRequestCount--,l.writing)break}o===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=o,l.bufferProcessing=!1}A.prototype._write=function(u,l,o){o(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(u,l,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,l=null):typeof l=="function"&&(o=l,l=null),u!=null&&this.write(u,l),r.corked&&(r.corked=1,this.uncork()),r.ending||a(this,r,o)};function c(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,l){u._final(function(o){l.pendingcb--,o&&u.emit("error",o),l.prefinished=!0,u.emit("prefinish"),n(u,l)})}function t(u,l){!l.prefinished&&!l.finalCalled&&(typeof u._final=="function"?(l.pendingcb++,l.finalCalled=!0,_.nextTick(e,u,l)):(l.prefinished=!0,u.emit("prefinish")))}function n(u,l){var o=c(l);return o&&(t(u,l),l.pendingcb===0&&(l.finished=!0,u.emit("finish"))),o}function a(u,l,o){l.ending=!0,n(u,l),o&&(l.finished?_.nextTick(o):u.once("finish",o)),l.ended=!0,u.writable=!1}function s(u,l,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;l.pendingcb--,h(o),r=r.next}l.corkedRequestsFree.next=u}return Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(u,l){this.end(),l(u)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var _=requireProcessNextickArgs(),S=Object.keys||function(g){var M=[];for(var x in g)M.push(x);return M};_stream_duplex$1=v;var I=Object.create(requireUtil());I.inherits=requireInherits_browser();var p=require_stream_readable$1(),R=require_stream_writable$1();I.inherits(v,p);for(var f=S(R.prototype),w=0;w<f.length;w++){var m=f[w];v.prototype[m]||(v.prototype[m]=R.prototype[m])}function v(g){if(!(this instanceof v))return new v(g);p.call(this,g),R.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",y)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function y(){this.allowHalfOpen||this._writableState.ended||_.nextTick(d,this)}function d(g){g.end()}return Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),v.prototype._destroy=function(g,M){this.push(null),this.end(),_.nextTick(M,g)},_stream_duplex$1}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1;var _=requireProcessNextickArgs();_stream_readable$1=P;var S=requireIsarray$1(),I;P.ReadableState=C,requireEvents().EventEmitter;var p=function(q,$){return q.listeners($).length},R=requireStreamBrowser$1(),f=requireSafeBuffer$1().Buffer,w=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m(q){return f.from(q)}function v(q){return f.isBuffer(q)||q instanceof w}var y=Object.create(requireUtil());y.inherits=requireInherits_browser();var d=requireUtil$1(),g=void 0;d&&d.debuglog?g=d.debuglog("stream"):g=function(){};var M=requireBufferList$1(),x=requireDestroy$1(),B;y.inherits(P,R);var A=["error","close","destroy","pause","resume"];function D(q,$,W){if(typeof q.prependListener=="function")return q.prependListener($,W);!q._events||!q._events[$]?q.on($,W):S(q._events[$])?q._events[$].unshift(W):q._events[$]=[W,q._events[$]]}function C(q,$){I=I||require_stream_duplex$1(),q=q||{};var W=$ instanceof I;this.objectMode=!!q.objectMode,W&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var J=q.highWaterMark,X=q.readableHighWaterMark,U=this.objectMode?16:16*1024;J||J===0?this.highWaterMark=J:W&&(X||X===0)?this.highWaterMark=X:this.highWaterMark=U,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new M,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(B||(B=requireString_decoder().StringDecoder),this.decoder=new B(q.encoding),this.encoding=q.encoding)}function P(q){if(I=I||require_stream_duplex$1(),!(this instanceof P))return new P(q);this._readableState=new C(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),R.call(this)}Object.defineProperty(P.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(q){this._readableState&&(this._readableState.destroyed=q)}}),P.prototype.destroy=x.destroy,P.prototype._undestroy=x.undestroy,P.prototype._destroy=function(q,$){this.push(null),$(q)},P.prototype.push=function(q,$){var W=this._readableState,J;return W.objectMode?J=!0:typeof q=="string"&&($=$||W.defaultEncoding,$!==W.encoding&&(q=f.from(q,$),$=""),J=!0),H(this,q,$,!1,J)},P.prototype.unshift=function(q){return H(this,q,null,!0,!1)};function H(q,$,W,J,X){var U=q._readableState;if($===null)U.reading=!1,le(q,U);else{var re;X||(re=V(U,$)),re?q.emit("error",re):U.objectMode||$&&$.length>0?(typeof $!="string"&&!U.objectMode&&Object.getPrototypeOf($)!==f.prototype&&($=m($)),J?U.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):N(q,U,$,!0):U.ended?q.emit("error",new Error("stream.push() after EOF")):(U.reading=!1,U.decoder&&!W?($=U.decoder.write($),U.objectMode||$.length!==0?N(q,U,$,!1):t(q,U)):N(q,U,$,!1))):J||(U.reading=!1)}return Q(U)}function N(q,$,W,J){$.flowing&&$.length===0&&!$.sync?(q.emit("data",W),q.read(0)):($.length+=$.objectMode?1:W.length,J?$.buffer.unshift(W):$.buffer.push(W),$.needReadable&&c(q)),t(q,$)}function V(q,$){var W;return!v($)&&typeof $!="string"&&$!==void 0&&!q.objectMode&&(W=new TypeError("Invalid non-string/buffer chunk")),W}function Q(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(q){return B||(B=requireString_decoder().StringDecoder),this._readableState.decoder=new B(q),this._readableState.encoding=q,this};var ne=8388608;function ae(q){return q>=ne?q=ne:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function ee(q,$){return q<=0||$.length===0&&$.ended?0:$.objectMode?1:q!==q?$.flowing&&$.length?$.buffer.head.data.length:$.length:(q>$.highWaterMark&&($.highWaterMark=ae(q)),q<=$.length?q:$.ended?$.length:($.needReadable=!0,0))}P.prototype.read=function(q){g("read",q),q=parseInt(q,10);var $=this._readableState,W=q;if(q!==0&&($.emittedReadable=!1),q===0&&$.needReadable&&($.length>=$.highWaterMark||$.ended))return g("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?L(this):c(this),null;if(q=ee(q,$),q===0&&$.ended)return $.length===0&&L(this),null;var J=$.needReadable;g("need readable",J),($.length===0||$.length-q<$.highWaterMark)&&(J=!0,g("length less than watermark",J)),$.ended||$.reading?(J=!1,g("reading or ended",J)):J&&(g("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(q=ee(W,$)));var X;return q>0?X=r(q,$):X=null,X===null?($.needReadable=!0,q=0):$.length-=q,$.length===0&&($.ended||($.needReadable=!0),W!==q&&$.ended&&L(this)),X!==null&&this.emit("data",X),X};function le(q,$){if(!$.ended){if($.decoder){var W=$.decoder.end();W&&W.length&&($.buffer.push(W),$.length+=$.objectMode?1:W.length)}$.ended=!0,c(q)}}function c(q){var $=q._readableState;$.needReadable=!1,$.emittedReadable||(g("emitReadable",$.flowing),$.emittedReadable=!0,$.sync?_.nextTick(e,q):e(q))}function e(q){g("emit readable"),q.emit("readable"),o(q)}function t(q,$){$.readingMore||($.readingMore=!0,_.nextTick(n,q,$))}function n(q,$){for(var W=$.length;!$.reading&&!$.flowing&&!$.ended&&$.length<$.highWaterMark&&(g("maybeReadMore read 0"),q.read(0),W!==$.length);)W=$.length;$.readingMore=!1}P.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},P.prototype.pipe=function(q,$){var W=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=q;break;case 1:J.pipes=[J.pipes,q];break;default:J.pipes.push(q);break}J.pipesCount+=1,g("pipe count=%d opts=%j",J.pipesCount,$);var X=(!$||$.end!==!1)&&q!==process$1.stdout&&q!==process$1.stderr,U=X?Ie:Ce;J.endEmitted?_.nextTick(U):W.once("end",U),q.on("unpipe",re);function re(pe,_e){g("onunpipe"),pe===W&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,Pe())}function Ie(){g("onend"),q.end()}var ue=a(W);q.on("drain",ue);var he=!1;function Pe(){g("cleanup"),q.removeListener("close",de),q.removeListener("finish",ye),q.removeListener("drain",ue),q.removeListener("error",De),q.removeListener("unpipe",re),W.removeListener("end",Ie),W.removeListener("end",Ce),W.removeListener("data",se),he=!0,J.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ue()}var me=!1;W.on("data",se);function se(pe){g("ondata"),me=!1;var _e=q.write(pe);_e===!1&&!me&&((J.pipesCount===1&&J.pipes===q||J.pipesCount>1&&K(J.pipes,q)!==-1)&&!he&&(g("false write response, pause",J.awaitDrain),J.awaitDrain++,me=!0),W.pause())}function De(pe){g("onerror",pe),Ce(),q.removeListener("error",De),p(q,"error")===0&&q.emit("error",pe)}D(q,"error",De);function de(){q.removeListener("finish",ye),Ce()}q.once("close",de);function ye(){g("onfinish"),q.removeListener("close",de),Ce()}q.once("finish",ye);function Ce(){g("unpipe"),W.unpipe(q)}return q.emit("pipe",W),J.flowing||(g("pipe resume"),W.resume()),q};function a(q){return function(){var $=q._readableState;g("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&p(q,"data")&&($.flowing=!0,o(q))}}P.prototype.unpipe=function(q){var $=this._readableState,W={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return q&&q!==$.pipes?this:(q||(q=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,q&&q.emit("unpipe",this,W),this);if(!q){var J=$.pipes,X=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var U=0;U<X;U++)J[U].emit("unpipe",this,{hasUnpiped:!1});return this}var re=K($.pipes,q);return re===-1?this:($.pipes.splice(re,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),q.emit("unpipe",this,W),this)},P.prototype.on=function(q,$){var W=R.prototype.on.call(this,q,$);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var J=this._readableState;!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.emittedReadable=!1,J.reading?J.length&&c(this):_.nextTick(s,this))}return W},P.prototype.addListener=P.prototype.on;function s(q){g("readable nexttick read 0"),q.read(0)}P.prototype.resume=function(){var q=this._readableState;return q.flowing||(g("resume"),q.flowing=!0,u(this,q)),this};function u(q,$){$.resumeScheduled||($.resumeScheduled=!0,_.nextTick(l,q,$))}function l(q,$){$.reading||(g("resume read 0"),q.read(0)),$.resumeScheduled=!1,$.awaitDrain=0,q.emit("resume"),o(q),$.flowing&&!$.reading&&q.read(0)}P.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(q){var $=q._readableState;for(g("flow",$.flowing);$.flowing&&q.read()!==null;);}P.prototype.wrap=function(q){var $=this,W=this._readableState,J=!1;q.on("end",function(){if(g("wrapped end"),W.decoder&&!W.ended){var re=W.decoder.end();re&&re.length&&$.push(re)}$.push(null)}),q.on("data",function(re){if(g("wrapped data"),W.decoder&&(re=W.decoder.write(re)),!(W.objectMode&&re==null)&&!(!W.objectMode&&(!re||!re.length))){var Ie=$.push(re);Ie||(J=!0,q.pause())}});for(var X in q)this[X]===void 0&&typeof q[X]=="function"&&(this[X]=(function(re){return function(){return q[re].apply(q,arguments)}})(X));for(var U=0;U<A.length;U++)q.on(A[U],this.emit.bind(this,A[U]));return this._read=function(re){g("wrapped _read",re),J&&(J=!1,q.resume())},this},Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),P._fromList=r;function r(q,$){if($.length===0)return null;var W;return $.objectMode?W=$.buffer.shift():!q||q>=$.length?($.decoder?W=$.buffer.join(""):$.buffer.length===1?W=$.buffer.head.data:W=$.buffer.concat($.length),$.buffer.clear()):W=h(q,$.buffer,$.decoder),W}function h(q,$,W){var J;return q<$.head.data.length?(J=$.head.data.slice(0,q),$.head.data=$.head.data.slice(q)):q===$.head.data.length?J=$.shift():J=W?b(q,$):E(q,$),J}function b(q,$){var W=$.head,J=1,X=W.data;for(q-=X.length;W=W.next;){var U=W.data,re=q>U.length?U.length:q;if(re===U.length?X+=U:X+=U.slice(0,q),q-=re,q===0){re===U.length?(++J,W.next?$.head=W.next:$.head=$.tail=null):($.head=W,W.data=U.slice(re));break}++J}return $.length-=J,X}function E(q,$){var W=f.allocUnsafe(q),J=$.head,X=1;for(J.data.copy(W),q-=J.data.length;J=J.next;){var U=J.data,re=q>U.length?U.length:q;if(U.copy(W,W.length-q,0,re),q-=re,q===0){re===U.length?(++X,J.next?$.head=J.next:$.head=$.tail=null):($.head=J,J.data=U.slice(re));break}++X}return $.length-=X,W}function L(q){var $=q._readableState;if($.length>0)throw new Error('"endReadable()" called on non-empty stream');$.endEmitted||($.ended=!0,_.nextTick(Y,$,q))}function Y(q,$){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,$.readable=!1,$.emit("end"))}function K(q,$){for(var W=0,J=q.length;W<J;W++)if(q[W]===$)return W;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=p;var _=require_stream_duplex$1(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(p,_);function I(w,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(!y)return this.emit("error",new Error("write callback called multiple times"));v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(w);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function p(w){if(!(this instanceof p))return new p(w);_.call(this,w),this._transformState={afterTransform:I.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",R)}function R(){var w=this;typeof this._flush=="function"?this._flush(function(m,v){f(w,m,v)}):f(this,null,null)}p.prototype.push=function(w,m){return this._transformState.needTransform=!1,_.prototype.push.call(this,w,m)},p.prototype._transform=function(w,m,v){throw new Error("_transform() is not implemented")},p.prototype._write=function(w,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=w,y.writeencoding=m,!y.transforming){var d=this._readableState;(y.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},p.prototype._read=function(w){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},p.prototype._destroy=function(w,m){var v=this;_.prototype._destroy.call(this,w,function(y){m(y),v.emit("close")})};function f(w,m,v){if(m)return w.emit("error",m);if(v!=null&&w.push(v),w._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(w._transformState.transforming)throw new Error("Calling transform done when still transforming");return w.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=I;var _=require_stream_transform$1(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(I,_);function I(p){if(!(this instanceof I))return new I(p);_.call(this,p)}return I.prototype._transform=function(p,R,f){f(null,p)},_stream_passthrough$1}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,(function(_,S){S=_.exports=require_stream_readable$1(),S.Stream=S,S.Readable=S,S.Writable=require_stream_writable$1(),S.Duplex=require_stream_duplex$1(),S.Transform=require_stream_transform$1(),S.PassThrough=require_stream_passthrough$1()})(readableBrowser$1,readableBrowser$1.exports)),readableBrowser$1.exports}var hashBase,hasRequiredHashBase;function requireHashBase(){if(hasRequiredHashBase)return hashBase;hasRequiredHashBase=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$1(),I=requireReadableBrowser$1().Transform,p=requireInherits_browser();function R(f){I.call(this),this._block=_.allocUnsafe(f),this._blockSize=f,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return p(R,I),R.prototype._transform=function(f,w,m){var v=null;try{this.update(f,w)}catch(y){v=y}m(v)},R.prototype._flush=function(f){var w=null;try{this.push(this.digest())}catch(m){w=m}f(w)},R.prototype.update=function(f,w){if(this._finalized)throw new Error("Digest already called");for(var m=S(f,w),v=this._block,y=0;this._blockOffset+m.length-y>=this._blockSize;){for(var d=this._blockOffset;d<this._blockSize;)v[d]=m[y],d+=1,y+=1;this._update(),this._blockOffset=0}for(;y<m.length;)v[this._blockOffset]=m[y],this._blockOffset+=1,y+=1;for(var g=0,M=m.length*8;M>0;++g)this._length[g]+=M,M=this._length[g]/4294967296|0,M>0&&(this._length[g]-=4294967296*M);return this},R.prototype._update=function(){throw new Error("_update is not implemented")},R.prototype.digest=function(f){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var w=this._digest();f!==void 0&&(w=w.toString(f)),this._block.fill(0),this._blockOffset=0;for(var m=0;m<4;++m)this._length[m]=0;return w},R.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase=R,hashBase}var ripemd160,hasRequiredRipemd160;function requireRipemd160(){if(hasRequiredRipemd160)return ripemd160;hasRequiredRipemd160=1;var _=requireDist().Buffer,S=requireInherits_browser(),I=requireHashBase(),p=new Array(16),R=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],w=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],v=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];function d(C,P){return C<<P|C>>>32-P}function g(C,P,H,N,V,Q,ne,ae){return d(C+(P^H^N)+Q+ne|0,ae)+V|0}function M(C,P,H,N,V,Q,ne,ae){return d(C+(P&H|~P&N)+Q+ne|0,ae)+V|0}function x(C,P,H,N,V,Q,ne,ae){return d(C+((P|~H)^N)+Q+ne|0,ae)+V|0}function B(C,P,H,N,V,Q,ne,ae){return d(C+(P&N|H&~N)+Q+ne|0,ae)+V|0}function A(C,P,H,N,V,Q,ne,ae){return d(C+(P^(H|~N))+Q+ne|0,ae)+V|0}function D(){I.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}return S(D,I),D.prototype._update=function(){for(var C=p,P=0;P<16;++P)C[P]=this._block.readInt32LE(P*4);for(var H=this._a|0,N=this._b|0,V=this._c|0,Q=this._d|0,ne=this._e|0,ae=this._a|0,ee=this._b|0,le=this._c|0,c=this._d|0,e=this._e|0,t=0;t<80;t+=1){var n,a;t<16?(n=g(H,N,V,Q,ne,C[R[t]],v[0],w[t]),a=A(ae,ee,le,c,e,C[f[t]],y[0],m[t])):t<32?(n=M(H,N,V,Q,ne,C[R[t]],v[1],w[t]),a=B(ae,ee,le,c,e,C[f[t]],y[1],m[t])):t<48?(n=x(H,N,V,Q,ne,C[R[t]],v[2],w[t]),a=x(ae,ee,le,c,e,C[f[t]],y[2],m[t])):t<64?(n=B(H,N,V,Q,ne,C[R[t]],v[3],w[t]),a=M(ae,ee,le,c,e,C[f[t]],y[3],m[t])):(n=A(H,N,V,Q,ne,C[R[t]],v[4],w[t]),a=g(ae,ee,le,c,e,C[f[t]],y[4],m[t])),H=ne,ne=Q,Q=d(V,10),V=N,N=n,ae=e,e=c,c=d(le,10),le=ee,ee=a}var s=this._b+V+c|0;this._b=this._c+Q+e|0,this._c=this._d+ne+ae|0,this._d=this._e+H+ee|0,this._e=this._a+N+le|0,this._a=s},D.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var C=_.alloc?_.alloc(20):new _(20);return C.writeInt32LE(this._a,0),C.writeInt32LE(this._b,4),C.writeInt32LE(this._c,8),C.writeInt32LE(this._d,12),C.writeInt32LE(this._e,16),C},ripemd160=D,ripemd160}var sha_js={exports:{}},hash$1,hasRequiredHash$1;function requireHash$1(){if(hasRequiredHash$1)return hash$1;hasRequiredHash$1=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$2();function I(p,R){this._block=_.alloc(p),this._finalSize=R,this._blockSize=p,this._len=0}return I.prototype.update=function(p,R){p=S(p,R||"utf8");for(var f=this._block,w=this._blockSize,m=p.length,v=this._len,y=0;y<m;){for(var d=v%w,g=Math.min(m-y,w-d),M=0;M<g;M++)f[d+M]=p[y+M];v+=g,y+=g,v%w===0&&this._update(f)}return this._len+=m,this},I.prototype.digest=function(p){var R=this._len%this._blockSize;this._block[R]=128,this._block.fill(0,R+1),R>=this._finalSize&&(this._update(this._block),this._block.fill(0));var f=this._len*8;if(f<=4294967295)this._block.writeUInt32BE(f,this._blockSize-4);else{var w=(f&4294967295)>>>0,m=(f-w)/4294967296;this._block.writeUInt32BE(m,this._blockSize-8),this._block.writeUInt32BE(w,this._blockSize-4)}this._update(this._block);var v=this._hash();return p?v.toString(p):v},I.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$1=I,hash$1}var sha$1,hasRequiredSha$1;function requireSha$1(){if(hasRequiredSha$1)return sha$1;hasRequiredSha$1=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1518500249,1859775393,-1894007588,-899497514],R=new Array(80);function f(){this.init(),this._w=R,S.call(this,64,56)}_(f,S),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function w(y){return y<<5|y>>>27}function m(y){return y<<30|y>>>2}function v(y,d,g,M){return y===0?d&g|~d&M:y===2?d&g|d&M|g&M:d^g^M}return f.prototype._update=function(y){for(var d=this._w,g=this._a|0,M=this._b|0,x=this._c|0,B=this._d|0,A=this._e|0,D=0;D<16;++D)d[D]=y.readInt32BE(D*4);for(;D<80;++D)d[D]=d[D-3]^d[D-8]^d[D-14]^d[D-16];for(var C=0;C<80;++C){var P=~~(C/20),H=w(g)+v(P,M,x,B)+A+d[C]+p[P]|0;A=B,B=x,x=m(M),M=g,g=H}this._a=g+this._a|0,this._b=M+this._b|0,this._c=x+this._c|0,this._d=B+this._d|0,this._e=A+this._e|0},f.prototype._hash=function(){var y=I.allocUnsafe(20);return y.writeInt32BE(this._a|0,0),y.writeInt32BE(this._b|0,4),y.writeInt32BE(this._c|0,8),y.writeInt32BE(this._d|0,12),y.writeInt32BE(this._e|0,16),y},sha$1=f,sha$1}var sha1,hasRequiredSha1;function requireSha1(){if(hasRequiredSha1)return sha1;hasRequiredSha1=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1518500249,1859775393,-1894007588,-899497514],R=new Array(80);function f(){this.init(),this._w=R,S.call(this,64,56)}_(f,S),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function w(d){return d<<1|d>>>31}function m(d){return d<<5|d>>>27}function v(d){return d<<30|d>>>2}function y(d,g,M,x){return d===0?g&M|~g&x:d===2?g&M|g&x|M&x:g^M^x}return f.prototype._update=function(d){for(var g=this._w,M=this._a|0,x=this._b|0,B=this._c|0,A=this._d|0,D=this._e|0,C=0;C<16;++C)g[C]=d.readInt32BE(C*4);for(;C<80;++C)g[C]=w(g[C-3]^g[C-8]^g[C-14]^g[C-16]);for(var P=0;P<80;++P){var H=~~(P/20),N=m(M)+y(H,x,B,A)+D+g[P]+p[H]|0;D=A,A=B,B=v(x),x=M,M=N}this._a=M+this._a|0,this._b=x+this._b|0,this._c=B+this._c|0,this._d=A+this._d|0,this._e=D+this._e|0},f.prototype._hash=function(){var d=I.allocUnsafe(20);return d.writeInt32BE(this._a|0,0),d.writeInt32BE(this._b|0,4),d.writeInt32BE(this._c|0,8),d.writeInt32BE(this._d|0,12),d.writeInt32BE(this._e|0,16),d},sha1=f,sha1}var sha256$1,hasRequiredSha256;function requireSha256(){if(hasRequiredSha256)return sha256$1;hasRequiredSha256=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[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],R=new Array(64);function f(){this.init(),this._w=R,S.call(this,64,56)}_(f,S),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function w(M,x,B){return B^M&(x^B)}function m(M,x,B){return M&x|B&(M|x)}function v(M){return(M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10)}function y(M){return(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7)}function d(M){return(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3}function g(M){return(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10}return f.prototype._update=function(M){for(var x=this._w,B=this._a|0,A=this._b|0,D=this._c|0,C=this._d|0,P=this._e|0,H=this._f|0,N=this._g|0,V=this._h|0,Q=0;Q<16;++Q)x[Q]=M.readInt32BE(Q*4);for(;Q<64;++Q)x[Q]=g(x[Q-2])+x[Q-7]+d(x[Q-15])+x[Q-16]|0;for(var ne=0;ne<64;++ne){var ae=V+y(P)+w(P,H,N)+p[ne]+x[ne]|0,ee=v(B)+m(B,A,D)|0;V=N,N=H,H=P,P=C+ae|0,C=D,D=A,A=B,B=ae+ee|0}this._a=B+this._a|0,this._b=A+this._b|0,this._c=D+this._c|0,this._d=C+this._d|0,this._e=P+this._e|0,this._f=H+this._f|0,this._g=N+this._g|0,this._h=V+this._h|0},f.prototype._hash=function(){var M=I.allocUnsafe(32);return M.writeInt32BE(this._a,0),M.writeInt32BE(this._b,4),M.writeInt32BE(this._c,8),M.writeInt32BE(this._d,12),M.writeInt32BE(this._e,16),M.writeInt32BE(this._f,20),M.writeInt32BE(this._g,24),M.writeInt32BE(this._h,28),M},sha256$1=f,sha256$1}var sha224$1,hasRequiredSha224;function requireSha224(){if(hasRequiredSha224)return sha224$1;hasRequiredSha224=1;var _=requireInherits_browser(),S=requireSha256(),I=requireHash$1(),p=requireSafeBuffer$2().Buffer,R=new Array(64);function f(){this.init(),this._w=R,I.call(this,64,56)}return _(f,S),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var w=p.allocUnsafe(28);return w.writeInt32BE(this._a,0),w.writeInt32BE(this._b,4),w.writeInt32BE(this._c,8),w.writeInt32BE(this._d,12),w.writeInt32BE(this._e,16),w.writeInt32BE(this._f,20),w.writeInt32BE(this._g,24),w},sha224$1=f,sha224$1}var sha512$1,hasRequiredSha512;function requireSha512(){if(hasRequiredSha512)return sha512$1;hasRequiredSha512=1;var _=requireInherits_browser(),S=requireHash$1(),I=requireSafeBuffer$2().Buffer,p=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],R=new Array(160);function f(){this.init(),this._w=R,S.call(this,128,112)}_(f,S),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function w(A,D,C){return C^A&(D^C)}function m(A,D,C){return A&D|C&(A|D)}function v(A,D){return(A>>>28|D<<4)^(D>>>2|A<<30)^(D>>>7|A<<25)}function y(A,D){return(A>>>14|D<<18)^(A>>>18|D<<14)^(D>>>9|A<<23)}function d(A,D){return(A>>>1|D<<31)^(A>>>8|D<<24)^A>>>7}function g(A,D){return(A>>>1|D<<31)^(A>>>8|D<<24)^(A>>>7|D<<25)}function M(A,D){return(A>>>19|D<<13)^(D>>>29|A<<3)^A>>>6}function x(A,D){return(A>>>19|D<<13)^(D>>>29|A<<3)^(A>>>6|D<<26)}function B(A,D){return A>>>0<D>>>0?1:0}return f.prototype._update=function(A){for(var D=this._w,C=this._ah|0,P=this._bh|0,H=this._ch|0,N=this._dh|0,V=this._eh|0,Q=this._fh|0,ne=this._gh|0,ae=this._hh|0,ee=this._al|0,le=this._bl|0,c=this._cl|0,e=this._dl|0,t=this._el|0,n=this._fl|0,a=this._gl|0,s=this._hl|0,u=0;u<32;u+=2)D[u]=A.readInt32BE(u*4),D[u+1]=A.readInt32BE(u*4+4);for(;u<160;u+=2){var l=D[u-30],o=D[u-30+1],r=d(l,o),h=g(o,l);l=D[u-4],o=D[u-4+1];var b=M(l,o),E=x(o,l),L=D[u-14],Y=D[u-14+1],K=D[u-32],q=D[u-32+1],$=h+Y|0,W=r+L+B($,h)|0;$=$+E|0,W=W+b+B($,E)|0,$=$+q|0,W=W+K+B($,q)|0,D[u]=W,D[u+1]=$}for(var J=0;J<160;J+=2){W=D[J],$=D[J+1];var X=m(C,P,H),U=m(ee,le,c),re=v(C,ee),Ie=v(ee,C),ue=y(V,t),he=y(t,V),Pe=p[J],me=p[J+1],se=w(V,Q,ne),De=w(t,n,a),de=s+he|0,ye=ae+ue+B(de,s)|0;de=de+De|0,ye=ye+se+B(de,De)|0,de=de+me|0,ye=ye+Pe+B(de,me)|0,de=de+$|0,ye=ye+W+B(de,$)|0;var Ce=Ie+U|0,pe=re+X+B(Ce,Ie)|0;ae=ne,s=a,ne=Q,a=n,Q=V,n=t,t=e+de|0,V=N+ye+B(t,e)|0,N=H,e=c,H=P,c=le,P=C,le=ee,ee=de+Ce|0,C=ye+pe+B(ee,de)|0}this._al=this._al+ee|0,this._bl=this._bl+le|0,this._cl=this._cl+c|0,this._dl=this._dl+e|0,this._el=this._el+t|0,this._fl=this._fl+n|0,this._gl=this._gl+a|0,this._hl=this._hl+s|0,this._ah=this._ah+C+B(this._al,ee)|0,this._bh=this._bh+P+B(this._bl,le)|0,this._ch=this._ch+H+B(this._cl,c)|0,this._dh=this._dh+N+B(this._dl,e)|0,this._eh=this._eh+V+B(this._el,t)|0,this._fh=this._fh+Q+B(this._fl,n)|0,this._gh=this._gh+ne+B(this._gl,a)|0,this._hh=this._hh+ae+B(this._hl,s)|0},f.prototype._hash=function(){var A=I.allocUnsafe(64);function D(C,P,H){A.writeInt32BE(C,H),A.writeInt32BE(P,H+4)}return D(this._ah,this._al,0),D(this._bh,this._bl,8),D(this._ch,this._cl,16),D(this._dh,this._dl,24),D(this._eh,this._el,32),D(this._fh,this._fl,40),D(this._gh,this._gl,48),D(this._hh,this._hl,56),A},sha512$1=f,sha512$1}var sha384$1,hasRequiredSha384;function requireSha384(){if(hasRequiredSha384)return sha384$1;hasRequiredSha384=1;var _=requireInherits_browser(),S=requireSha512(),I=requireHash$1(),p=requireSafeBuffer$2().Buffer,R=new Array(160);function f(){this.init(),this._w=R,I.call(this,128,112)}return _(f,S),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var w=p.allocUnsafe(48);function m(v,y,d){w.writeInt32BE(v,d),w.writeInt32BE(y,d+4)}return m(this._ah,this._al,0),m(this._bh,this._bl,8),m(this._ch,this._cl,16),m(this._dh,this._dl,24),m(this._eh,this._el,32),m(this._fh,this._fl,40),w},sha384$1=f,sha384$1}var hasRequiredSha_js;function requireSha_js(){return hasRequiredSha_js||(hasRequiredSha_js=1,(function(_){_.exports=function(I){var p=I.toLowerCase(),R=_.exports[p];if(!R)throw new Error(p+" is not supported (we accept pull requests)");return new R},_.exports.sha=requireSha$1(),_.exports.sha1=requireSha1(),_.exports.sha224=requireSha224(),_.exports.sha256=requireSha256(),_.exports.sha384=requireSha384(),_.exports.sha512=requireSha512()})(sha_js)),sha_js.exports}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var _=requireSafeBuffer$2().Buffer,S=requireStreamBrowserify().Transform,I=requireString_decoder().StringDecoder,p=requireInherits_browser(),R=requireToBuffer$2();function f(w){S.call(this),this.hashMode=typeof w=="string",this.hashMode?this[w]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}return p(f,S),f.prototype.update=function(w,m,v){var y=R(w,m),d=this._update(y);return this.hashMode?this:(v&&(d=this._toString(d,v)),d)},f.prototype.setAutoPadding=function(){},f.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},f.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},f.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},f.prototype._transform=function(w,m,v){var y;try{this.hashMode?this._update(w):this.push(this._update(w))}catch(d){y=d}finally{v(y)}},f.prototype._flush=function(w){var m;try{this.push(this.__final())}catch(v){m=v}w(m)},f.prototype._finalOrDigest=function(w){var m=this.__final()||_.alloc(0);return w&&(m=this._toString(m,w,!0)),m},f.prototype._toString=function(w,m,v){if(this._decoder||(this._decoder=new I(m),this._encoding=m),this._encoding!==m)throw new Error("can’t switch encodings");var y=this._decoder.write(w);return v&&(y+=this._decoder.end()),y},cipherBase=f,cipherBase}var browser$9,hasRequiredBrowser$9;function requireBrowser$9(){if(hasRequiredBrowser$9)return browser$9;hasRequiredBrowser$9=1;var _=requireInherits_browser(),S=requireMd5_js(),I=requireRipemd160(),p=requireSha_js(),R=requireCipherBase();function f(w){R.call(this,"digest"),this._hash=w}return _(f,R),f.prototype._update=function(w){this._hash.update(w)},f.prototype._final=function(){return this._hash.digest()},browser$9=function(m){return m=m.toLowerCase(),m==="md5"?new S:m==="rmd160"||m==="ripemd160"?new I:new f(p(m))},browser$9}var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var _=requireInherits_browser(),S=requireSafeBuffer$2().Buffer,I=requireCipherBase(),p=S.alloc(128),R=64;function f(w,m){I.call(this,"digest"),typeof m=="string"&&(m=S.from(m)),this._alg=w,this._key=m,m.length>R?m=w(m):m.length<R&&(m=S.concat([m,p],R));for(var v=this._ipad=S.allocUnsafe(R),y=this._opad=S.allocUnsafe(R),d=0;d<R;d++)v[d]=m[d]^54,y[d]=m[d]^92;this._hash=[v]}return _(f,I),f.prototype._update=function(w){this._hash.push(w)},f.prototype._final=function(){var w=this._alg(S.concat(this._hash));return this._alg(S.concat([this._opad,w]))},legacy=f,legacy}var md5,hasRequiredMd5;function requireMd5(){if(hasRequiredMd5)return md5;hasRequiredMd5=1;var _=requireMd5_js();return md5=function(S){return new _().update(S).digest()},md5}var browser$8,hasRequiredBrowser$8;function requireBrowser$8(){if(hasRequiredBrowser$8)return browser$8;hasRequiredBrowser$8=1;var _=requireInherits_browser(),S=requireLegacy(),I=requireCipherBase(),p=requireSafeBuffer$2().Buffer,R=requireMd5(),f=requireRipemd160(),w=requireSha_js(),m=p.alloc(128);function v(y,d){I.call(this,"digest"),typeof d=="string"&&(d=p.from(d));var g=y==="sha512"||y==="sha384"?128:64;if(this._alg=y,this._key=d,d.length>g){var M=y==="rmd160"?new f:w(y);d=M.update(d).digest()}else d.length<g&&(d=p.concat([d,m],g));for(var x=this._ipad=p.allocUnsafe(g),B=this._opad=p.allocUnsafe(g),A=0;A<g;A++)x[A]=d[A]^54,B[A]=d[A]^92;this._hash=y==="rmd160"?new f:w(y),this._hash.update(x)}return _(v,I),v.prototype._update=function(y){this._hash.update(y)},v.prototype._final=function(){var y=this._hash.digest(),d=this._alg==="rmd160"?new f:w(this._alg);return d.update(this._opad).update(y).digest()},browser$8=function(d,g){return d=d.toLowerCase(),d==="rmd160"||d==="ripemd160"?new v("rmd160",g):d==="md5"?new S(R,g):new v(d,g)},browser$8}const sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},sha256={sign:"ecdsa",hash:"sha256",id:""},sha224={sign:"ecdsa",hash:"sha224",id:""},sha384={sign:"ecdsa",hash:"sha384",id:""},sha512={sign:"ecdsa",hash:"sha512",id:""},DSA={sign:"dsa",hash:"sha1",id:""},ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},require$$6={sha224WithRSAEncryption,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256,sha224,sha384,sha512,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var algos,hasRequiredAlgos;function requireAlgos(){return hasRequiredAlgos||(hasRequiredAlgos=1,algos=require$$6),algos}var browser$7={},precondition,hasRequiredPrecondition;function requirePrecondition(){if(hasRequiredPrecondition)return precondition;hasRequiredPrecondition=1;var _=isFinite,S=Math.pow(2,30)-1;return precondition=function(I,p){if(typeof I!="number")throw new TypeError("Iterations not a number");if(I<0||!_(I))throw new TypeError("Bad iterations");if(typeof p!="number")throw new TypeError("Key length not a number");if(p<0||p>S||p!==p)throw new TypeError("Bad key length")},precondition}var defaultEncoding_1,hasRequiredDefaultEncoding;function requireDefaultEncoding(){if(hasRequiredDefaultEncoding)return defaultEncoding_1;hasRequiredDefaultEncoding=1;var _;if(commonjsGlobal.process&&commonjsGlobal.process.browser)_="utf-8";else if(commonjsGlobal.process&&commonjsGlobal.process.version){var S=parseInt(process$1.version.split(".")[0].slice(1),10);_=S>=6?"utf-8":"binary"}else _="utf-8";return defaultEncoding_1=_,defaultEncoding_1}var toBuffer_1,hasRequiredToBuffer;function requireToBuffer(){if(hasRequiredToBuffer)return toBuffer_1;hasRequiredToBuffer=1;var _=requireSafeBuffer$2().Buffer,S=requireToBuffer$2(),I=typeof Uint8Array<"u",p=I&&typeof ArrayBuffer<"u",R=p&&ArrayBuffer.isView;return toBuffer_1=function(f,w,m){if(typeof f=="string"||_.isBuffer(f)||I&&f instanceof Uint8Array||R&&R(f))return S(f,w);throw new TypeError(m+" must be a string, a Buffer, a Uint8Array, or a DataView")},toBuffer_1}var syncBrowser,hasRequiredSyncBrowser;function requireSyncBrowser(){if(hasRequiredSyncBrowser)return syncBrowser;hasRequiredSyncBrowser=1;var _=requireMd5(),S=requireRipemd160(),I=requireSha_js(),p=requireSafeBuffer$2().Buffer,R=requirePrecondition(),f=requireDefaultEncoding(),w=requireToBuffer(),m=p.alloc(128),v={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},y={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function d(B){return new S().update(B).digest()}function g(B){function A(D){return I(B).update(D).digest()}return B==="rmd160"||B==="ripemd160"?d:B==="md5"?_:A}function M(B,A,D){var C=g(B),P=B==="sha512"||B==="sha384"?128:64;A.length>P?A=C(A):A.length<P&&(A=p.concat([A,m],P));for(var H=p.allocUnsafe(P+v[B]),N=p.allocUnsafe(P+v[B]),V=0;V<P;V++)H[V]=A[V]^54,N[V]=A[V]^92;var Q=p.allocUnsafe(P+D+4);H.copy(Q,0,0,P),this.ipad1=Q,this.ipad2=H,this.opad=N,this.alg=B,this.blocksize=P,this.hash=C,this.size=v[B]}M.prototype.run=function(B,A){B.copy(A,this.blocksize);var D=this.hash(A);return D.copy(this.opad,this.blocksize),this.hash(this.opad)};function x(B,A,D,C,P){R(D,C),B=w(B,f,"Password"),A=w(A,f,"Salt");var H=(P||"sha1").toLowerCase(),N=y[H]||H,V=v[N];if(typeof V!="number"||!V)throw new TypeError("Digest algorithm not supported: "+P);var Q=new M(N,B,A.length),ne=p.allocUnsafe(C),ae=p.allocUnsafe(A.length+4);A.copy(ae,0,0,A.length);for(var ee=0,le=V,c=Math.ceil(C/le),e=1;e<=c;e++){ae.writeUInt32BE(e,A.length);for(var t=Q.run(ae,Q.ipad1),n=t,a=1;a<D;a++){n=Q.run(n,Q.ipad2);for(var s=0;s<le;s++)t[s]^=n[s]}t.copy(ne,ee),ee+=le}return ne}return syncBrowser=x,syncBrowser}var async,hasRequiredAsync;function requireAsync(){if(hasRequiredAsync)return async;hasRequiredAsync=1;var _=requireSafeBuffer$2().Buffer,S=requirePrecondition(),I=requireDefaultEncoding(),p=requireSyncBrowser(),R=requireToBuffer(),f,w=commonjsGlobal.crypto&&commonjsGlobal.crypto.subtle,m={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},v=[],y;function d(){return y||(commonjsGlobal.process&&commonjsGlobal.process.nextTick?y=commonjsGlobal.process.nextTick:commonjsGlobal.queueMicrotask?y=commonjsGlobal.queueMicrotask:commonjsGlobal.setImmediate?y=commonjsGlobal.setImmediate:y=commonjsGlobal.setTimeout,y)}function g(B,A,D,C,P){return w.importKey("raw",B,{name:"PBKDF2"},!1,["deriveBits"]).then(function(H){return w.deriveBits({name:"PBKDF2",salt:A,iterations:D,hash:{name:P}},H,C<<3)}).then(function(H){return _.from(H)})}function M(B){if(commonjsGlobal.process&&!commonjsGlobal.process.browser||!w||!w.importKey||!w.deriveBits)return Promise.resolve(!1);if(v[B]!==void 0)return v[B];f=f||_.alloc(8);var A=g(f,f,10,128,B).then(function(){return!0},function(){return!1});return v[B]=A,A}function x(B,A){B.then(function(D){d()(function(){A(null,D)})},function(D){d()(function(){A(D)})})}return async=function(B,A,D,C,P,H){if(typeof P=="function"&&(H=P,P=void 0),S(D,C),B=R(B,I,"Password"),A=R(A,I,"Salt"),typeof H!="function")throw new Error("No callback provided to pbkdf2");P=P||"sha1";var N=m[P.toLowerCase()];if(!N||typeof commonjsGlobal.Promise!="function"){d()(function(){var V;try{V=p(B,A,D,C,P)}catch(Q){H(Q);return}H(null,V)});return}x(M(N).then(function(V){return V?g(B,A,D,C,N):p(B,A,D,C,P)}),H)},async}var hasRequiredBrowser$7;function requireBrowser$7(){return hasRequiredBrowser$7||(hasRequiredBrowser$7=1,browser$7.pbkdf2=requireAsync(),browser$7.pbkdf2Sync=requireSyncBrowser()),browser$7}var browser$6={},des$1={},utils$3={},hasRequiredUtils$3;function requireUtils$3(){if(hasRequiredUtils$3)return utils$3;hasRequiredUtils$3=1,utils$3.readUInt32BE=function(R,f){var w=R[0+f]<<24|R[1+f]<<16|R[2+f]<<8|R[3+f];return w>>>0},utils$3.writeUInt32BE=function(R,f,w){R[0+w]=f>>>24,R[1+w]=f>>>16&255,R[2+w]=f>>>8&255,R[3+w]=f&255},utils$3.ip=function(R,f,w,m){for(var v=0,y=0,d=6;d>=0;d-=2){for(var g=0;g<=24;g+=8)v<<=1,v|=f>>>g+d&1;for(var g=0;g<=24;g+=8)v<<=1,v|=R>>>g+d&1}for(var d=6;d>=0;d-=2){for(var g=1;g<=25;g+=8)y<<=1,y|=f>>>g+d&1;for(var g=1;g<=25;g+=8)y<<=1,y|=R>>>g+d&1}w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.rip=function(R,f,w,m){for(var v=0,y=0,d=0;d<4;d++)for(var g=24;g>=0;g-=8)v<<=1,v|=f>>>g+d&1,v<<=1,v|=R>>>g+d&1;for(var d=4;d<8;d++)for(var g=24;g>=0;g-=8)y<<=1,y|=f>>>g+d&1,y<<=1,y|=R>>>g+d&1;w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.pc1=function(R,f,w,m){for(var v=0,y=0,d=7;d>=5;d--){for(var g=0;g<=24;g+=8)v<<=1,v|=f>>g+d&1;for(var g=0;g<=24;g+=8)v<<=1,v|=R>>g+d&1}for(var g=0;g<=24;g+=8)v<<=1,v|=f>>g+d&1;for(var d=1;d<=3;d++){for(var g=0;g<=24;g+=8)y<<=1,y|=f>>g+d&1;for(var g=0;g<=24;g+=8)y<<=1,y|=R>>g+d&1}for(var g=0;g<=24;g+=8)y<<=1,y|=R>>g+d&1;w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.r28shl=function(R,f){return R<<f&268435455|R>>>28-f};var _=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];utils$3.pc2=function(R,f,w,m){for(var v=0,y=0,d=_.length>>>1,g=0;g<d;g++)v<<=1,v|=R>>>_[g]&1;for(var g=d;g<_.length;g++)y<<=1,y|=f>>>_[g]&1;w[m+0]=v>>>0,w[m+1]=y>>>0},utils$3.expand=function(R,f,w){var m=0,v=0;m=(R&1)<<5|R>>>27;for(var y=23;y>=15;y-=4)m<<=6,m|=R>>>y&63;for(var y=11;y>=3;y-=4)v|=R>>>y&63,v<<=6;v|=(R&31)<<1|R>>>31,f[w+0]=m>>>0,f[w+1]=v>>>0};var S=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];utils$3.substitute=function(R,f){for(var w=0,m=0;m<4;m++){var v=R>>>18-m*6&63,y=S[m*64+v];w<<=4,w|=y}for(var m=0;m<4;m++){var v=f>>>18-m*6&63,y=S[256+m*64+v];w<<=4,w|=y}return w>>>0};var I=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return utils$3.permute=function(R){for(var f=0,w=0;w<I.length;w++)f<<=1,f|=R>>>I[w]&1;return f>>>0},utils$3.padSplit=function(R,f,w){for(var m=R.toString(2);m.length<f;)m="0"+m;for(var v=[],y=0;y<f;y+=w)v.push(m.slice(y,y+w));return v.join(" ")},utils$3}var minimalisticAssert,hasRequiredMinimalisticAssert;function requireMinimalisticAssert(){if(hasRequiredMinimalisticAssert)return minimalisticAssert;hasRequiredMinimalisticAssert=1,minimalisticAssert=_;function _(S,I){if(!S)throw new Error(I||"Assertion failed")}return _.equal=function(I,p,R){if(I!=p)throw new Error(R||"Assertion failed: "+I+" != "+p)},minimalisticAssert}var cipher,hasRequiredCipher;function requireCipher(){if(hasRequiredCipher)return cipher;hasRequiredCipher=1;var _=requireMinimalisticAssert();function S(I){this.options=I,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=I.padding!==!1}return cipher=S,S.prototype._init=function(){},S.prototype.update=function(p){return p.length===0?[]:this.type==="decrypt"?this._updateDecrypt(p):this._updateEncrypt(p)},S.prototype._buffer=function(p,R){for(var f=Math.min(this.buffer.length-this.bufferOff,p.length-R),w=0;w<f;w++)this.buffer[this.bufferOff+w]=p[R+w];return this.bufferOff+=f,f},S.prototype._flushBuffer=function(p,R){return this._update(this.buffer,0,p,R),this.bufferOff=0,this.blockSize},S.prototype._updateEncrypt=function(p){var R=0,f=0,w=(this.bufferOff+p.length)/this.blockSize|0,m=new Array(w*this.blockSize);this.bufferOff!==0&&(R+=this._buffer(p,R),this.bufferOff===this.buffer.length&&(f+=this._flushBuffer(m,f)));for(var v=p.length-(p.length-R)%this.blockSize;R<v;R+=this.blockSize)this._update(p,R,m,f),f+=this.blockSize;for(;R<p.length;R++,this.bufferOff++)this.buffer[this.bufferOff]=p[R];return m},S.prototype._updateDecrypt=function(p){for(var R=0,f=0,w=Math.ceil((this.bufferOff+p.length)/this.blockSize)-1,m=new Array(w*this.blockSize);w>0;w--)R+=this._buffer(p,R),f+=this._flushBuffer(m,f);return R+=this._buffer(p,R),m},S.prototype.final=function(p){var R;p&&(R=this.update(p));var f;return this.type==="encrypt"?f=this._finalEncrypt():f=this._finalDecrypt(),R?R.concat(f):f},S.prototype._pad=function(p,R){if(R===0)return!1;for(;R<p.length;)p[R++]=0;return!0},S.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var p=new Array(this.blockSize);return this._update(this.buffer,0,p,0),p},S.prototype._unpad=function(p){return p},S.prototype._finalDecrypt=function(){_.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var p=new Array(this.blockSize);return this._flushBuffer(p,0),this._unpad(p)},cipher}var des,hasRequiredDes$1;function requireDes$1(){if(hasRequiredDes$1)return des;hasRequiredDes$1=1;var _=requireMinimalisticAssert(),S=requireInherits_browser(),I=requireUtils$3(),p=requireCipher();function R(){this.tmp=new Array(2),this.keys=null}function f(m){p.call(this,m);var v=new R;this._desState=v,this.deriveKeys(v,m.key)}S(f,p),des=f,f.create=function(v){return new f(v)};var w=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return f.prototype.deriveKeys=function(v,y){v.keys=new Array(32),_.equal(y.length,this.blockSize,"Invalid key length");var d=I.readUInt32BE(y,0),g=I.readUInt32BE(y,4);I.pc1(d,g,v.tmp,0),d=v.tmp[0],g=v.tmp[1];for(var M=0;M<v.keys.length;M+=2){var x=w[M>>>1];d=I.r28shl(d,x),g=I.r28shl(g,x),I.pc2(d,g,v.keys,M)}},f.prototype._update=function(v,y,d,g){var M=this._desState,x=I.readUInt32BE(v,y),B=I.readUInt32BE(v,y+4);I.ip(x,B,M.tmp,0),x=M.tmp[0],B=M.tmp[1],this.type==="encrypt"?this._encrypt(M,x,B,M.tmp,0):this._decrypt(M,x,B,M.tmp,0),x=M.tmp[0],B=M.tmp[1],I.writeUInt32BE(d,x,g),I.writeUInt32BE(d,B,g+4)},f.prototype._pad=function(v,y){if(this.padding===!1)return!1;for(var d=v.length-y,g=y;g<v.length;g++)v[g]=d;return!0},f.prototype._unpad=function(v){if(this.padding===!1)return v;for(var y=v[v.length-1],d=v.length-y;d<v.length;d++)_.equal(v[d],y);return v.slice(0,v.length-y)},f.prototype._encrypt=function(v,y,d,g,M){for(var x=y,B=d,A=0;A<v.keys.length;A+=2){var D=v.keys[A],C=v.keys[A+1];I.expand(B,v.tmp,0),D^=v.tmp[0],C^=v.tmp[1];var P=I.substitute(D,C),H=I.permute(P),N=B;B=(x^H)>>>0,x=N}I.rip(B,x,g,M)},f.prototype._decrypt=function(v,y,d,g,M){for(var x=d,B=y,A=v.keys.length-2;A>=0;A-=2){var D=v.keys[A],C=v.keys[A+1];I.expand(x,v.tmp,0),D^=v.tmp[0],C^=v.tmp[1];var P=I.substitute(D,C),H=I.permute(P),N=x;x=(B^H)>>>0,B=N}I.rip(x,B,g,M)},des}var cbc$1={},hasRequiredCbc$1;function requireCbc$1(){if(hasRequiredCbc$1)return cbc$1;hasRequiredCbc$1=1;var _=requireMinimalisticAssert(),S=requireInherits_browser(),I={};function p(f){_.equal(f.length,8,"Invalid IV length"),this.iv=new Array(8);for(var w=0;w<this.iv.length;w++)this.iv[w]=f[w]}function R(f){function w(d){f.call(this,d),this._cbcInit()}S(w,f);for(var m=Object.keys(I),v=0;v<m.length;v++){var y=m[v];w.prototype[y]=I[y]}return w.create=function(g){return new w(g)},w}return cbc$1.instantiate=R,I._cbcInit=function(){var w=new p(this.options.iv);this._cbcState=w},I._update=function(w,m,v,y){var d=this._cbcState,g=this.constructor.super_.prototype,M=d.iv;if(this.type==="encrypt"){for(var x=0;x<this.blockSize;x++)M[x]^=w[m+x];g._update.call(this,M,0,v,y);for(var x=0;x<this.blockSize;x++)M[x]=v[y+x]}else{g._update.call(this,w,m,v,y);for(var x=0;x<this.blockSize;x++)v[y+x]^=M[x];for(var x=0;x<this.blockSize;x++)M[x]=w[m+x]}},cbc$1}var ede,hasRequiredEde;function requireEde(){if(hasRequiredEde)return ede;hasRequiredEde=1;var _=requireMinimalisticAssert(),S=requireInherits_browser(),I=requireCipher(),p=requireDes$1();function R(w,m){_.equal(m.length,24,"Invalid key length");var v=m.slice(0,8),y=m.slice(8,16),d=m.slice(16,24);w==="encrypt"?this.ciphers=[p.create({type:"encrypt",key:v}),p.create({type:"decrypt",key:y}),p.create({type:"encrypt",key:d})]:this.ciphers=[p.create({type:"decrypt",key:d}),p.create({type:"encrypt",key:y}),p.create({type:"decrypt",key:v})]}function f(w){I.call(this,w);var m=new R(this.type,this.options.key);this._edeState=m}return S(f,I),ede=f,f.create=function(m){return new f(m)},f.prototype._update=function(m,v,y,d){var g=this._edeState;g.ciphers[0]._update(m,v,y,d),g.ciphers[1]._update(y,d,y,d),g.ciphers[2]._update(y,d,y,d)},f.prototype._pad=p.prototype._pad,f.prototype._unpad=p.prototype._unpad,ede}var hasRequiredDes;function requireDes(){return hasRequiredDes||(hasRequiredDes=1,des$1.utils=requireUtils$3(),des$1.Cipher=requireCipher(),des$1.DES=requireDes$1(),des$1.CBC=requireCbc$1(),des$1.EDE=requireEde()),des$1}var browserifyDes,hasRequiredBrowserifyDes;function requireBrowserifyDes(){if(hasRequiredBrowserifyDes)return browserifyDes;hasRequiredBrowserifyDes=1;var _=requireCipherBase(),S=requireDes(),I=requireInherits_browser(),p=requireSafeBuffer$2().Buffer,R={"des-ede3-cbc":S.CBC.instantiate(S.EDE),"des-ede3":S.EDE,"des-ede-cbc":S.CBC.instantiate(S.EDE),"des-ede":S.EDE,"des-cbc":S.CBC.instantiate(S.DES),"des-ecb":S.DES};R.des=R["des-cbc"],R.des3=R["des-ede3-cbc"],browserifyDes=f,I(f,_);function f(w){_.call(this);var m=w.mode.toLowerCase(),v=R[m],y;w.decrypt?y="decrypt":y="encrypt";var d=w.key;p.isBuffer(d)||(d=p.from(d)),(m==="des-ede"||m==="des-ede-cbc")&&(d=p.concat([d,d.slice(0,8)]));var g=w.iv;p.isBuffer(g)||(g=p.from(g)),this._des=v.create({key:d,iv:g,type:y})}return f.prototype._update=function(w){return p.from(this._des.update(w))},f.prototype._final=function(){return p.from(this._des.final())},browserifyDes}var browser$5={},encrypter={},ecb={},hasRequiredEcb;function requireEcb(){return hasRequiredEcb||(hasRequiredEcb=1,ecb.encrypt=function(_,S){return _._cipher.encryptBlock(S)},ecb.decrypt=function(_,S){return _._cipher.decryptBlock(S)}),ecb}var cbc={},buffer$1={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup[45]=62;revLookup[95]=63;function getLens(_){var S=_.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=_.indexOf("=");I===-1&&(I=S);var p=I===S?0:4-I%4;return[I,p]}function byteLength(_){var S=getLens(_),I=S[0],p=S[1];return(I+p)*3/4-p}function _byteLength(_,S,I){return(S+I)*3/4-I}function toByteArray(_){var S,I=getLens(_),p=I[0],R=I[1],f=new Arr(_byteLength(_,p,R)),w=0,m=R>0?p-4:p,v;for(v=0;v<m;v+=4)S=revLookup[_.charCodeAt(v)]<<18|revLookup[_.charCodeAt(v+1)]<<12|revLookup[_.charCodeAt(v+2)]<<6|revLookup[_.charCodeAt(v+3)],f[w++]=S>>16&255,f[w++]=S>>8&255,f[w++]=S&255;return R===2&&(S=revLookup[_.charCodeAt(v)]<<2|revLookup[_.charCodeAt(v+1)]>>4,f[w++]=S&255),R===1&&(S=revLookup[_.charCodeAt(v)]<<10|revLookup[_.charCodeAt(v+1)]<<4|revLookup[_.charCodeAt(v+2)]>>2,f[w++]=S>>8&255,f[w++]=S&255),f}function tripletToBase64(_){return lookup[_>>18&63]+lookup[_>>12&63]+lookup[_>>6&63]+lookup[_&63]}function encodeChunk(_,S,I){for(var p,R=[],f=S;f<I;f+=3)p=(_[f]<<16&16711680)+(_[f+1]<<8&65280)+(_[f+2]&255),R.push(tripletToBase64(p));return R.join("")}function fromByteArray(_){for(var S,I=_.length,p=I%3,R=[],f=16383,w=0,m=I-p;w<m;w+=f)R.push(encodeChunk(_,w,w+f>m?m:w+f));return p===1?(S=_[I-1],R.push(lookup[S>>2]+lookup[S<<4&63]+"==")):p===2&&(S=(_[I-2]<<8)+_[I-1],R.push(lookup[S>>10]+lookup[S>>4&63]+lookup[S<<2&63]+"=")),R.join("")}var ieee754={};ieee754.read=function(_,S,I,p,R){var f,w,m=R*8-p-1,v=(1<<m)-1,y=v>>1,d=-7,g=I?R-1:0,M=I?-1:1,x=_[S+g];for(g+=M,f=x&(1<<-d)-1,x>>=-d,d+=m;d>0;f=f*256+_[S+g],g+=M,d-=8);for(w=f&(1<<-d)-1,f>>=-d,d+=p;d>0;w=w*256+_[S+g],g+=M,d-=8);if(f===0)f=1-y;else{if(f===v)return w?NaN:(x?-1:1)*(1/0);w=w+Math.pow(2,p),f=f-y}return(x?-1:1)*w*Math.pow(2,f-p)};ieee754.write=function(_,S,I,p,R,f){var w,m,v,y=f*8-R-1,d=(1<<y)-1,g=d>>1,M=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=p?0:f-1,B=p?1:-1,A=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(m=isNaN(S)?1:0,w=d):(w=Math.floor(Math.log(S)/Math.LN2),S*(v=Math.pow(2,-w))<1&&(w--,v*=2),w+g>=1?S+=M/v:S+=M*Math.pow(2,1-g),S*v>=2&&(w++,v/=2),w+g>=d?(m=0,w=d):w+g>=1?(m=(S*v-1)*Math.pow(2,R),w=w+g):(m=S*Math.pow(2,g-1)*Math.pow(2,R),w=0));R>=8;_[I+x]=m&255,x+=B,m/=256,R-=8);for(w=w<<R|m,y+=R;y>0;_[I+x]=w&255,x+=B,w/=256,y-=8);_[I+x-B]|=A*128};(function(_){const S=base64Js,I=ieee754,p=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;_.Buffer=d,_.SlowBuffer=V,_.INSPECT_MAX_BYTES=50;const R=2147483647;_.kMaxLength=R;const{Uint8Array:f,ArrayBuffer:w,SharedArrayBuffer:m}=globalThis;d.TYPED_ARRAY_SUPPORT=v(),!d.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 v(){try{const j=new f(1),k={foo:function(){return 42}};return Object.setPrototypeOf(k,f.prototype),Object.setPrototypeOf(j,k),j.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function y(j){if(j>R)throw new RangeError('The value "'+j+'" is invalid for option "size"');const k=new f(j);return Object.setPrototypeOf(k,d.prototype),k}function d(j,k,O){if(typeof j=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(j)}return g(j,k,O)}d.poolSize=8192;function g(j,k,O){if(typeof j=="string")return A(j,k);if(w.isView(j))return C(j);if(j==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j);if(_e(j,w)||j&&_e(j.buffer,w)||typeof m<"u"&&(_e(j,m)||j&&_e(j.buffer,m)))return P(j,k,O);if(typeof j=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=j.valueOf&&j.valueOf();if(G!=null&&G!==j)return d.from(G,k,O);const te=H(j);if(te)return te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof j[Symbol.toPrimitive]=="function")return d.from(j[Symbol.toPrimitive]("string"),k,O);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof j)}d.from=function(j,k,O){return g(j,k,O)},Object.setPrototypeOf(d.prototype,f.prototype),Object.setPrototypeOf(d,f);function M(j){if(typeof j!="number")throw new TypeError('"size" argument must be of type number');if(j<0)throw new RangeError('The value "'+j+'" is invalid for option "size"')}function x(j,k,O){return M(j),j<=0?y(j):k!==void 0?typeof O=="string"?y(j).fill(k,O):y(j).fill(k):y(j)}d.alloc=function(j,k,O){return x(j,k,O)};function B(j){return M(j),y(j<0?0:N(j)|0)}d.allocUnsafe=function(j){return B(j)},d.allocUnsafeSlow=function(j){return B(j)};function A(j,k){if((typeof k!="string"||k==="")&&(k="utf8"),!d.isEncoding(k))throw new TypeError("Unknown encoding: "+k);const O=Q(j,k)|0;let G=y(O);const te=G.write(j,k);return te!==O&&(G=G.slice(0,te)),G}function D(j){const k=j.length<0?0:N(j.length)|0,O=y(k);for(let G=0;G<k;G+=1)O[G]=j[G]&255;return O}function C(j){if(_e(j,f)){const k=new f(j);return P(k.buffer,k.byteOffset,k.byteLength)}return D(j)}function P(j,k,O){if(k<0||j.byteLength<k)throw new RangeError('"offset" is outside of buffer bounds');if(j.byteLength<k+(O||0))throw new RangeError('"length" is outside of buffer bounds');let G;return k===void 0&&O===void 0?G=new f(j):O===void 0?G=new f(j,k):G=new f(j,k,O),Object.setPrototypeOf(G,d.prototype),G}function H(j){if(d.isBuffer(j)){const k=N(j.length)|0,O=y(k);return O.length===0||j.copy(O,0,0,k),O}if(j.length!==void 0)return typeof j.length!="number"||Ue(j.length)?y(0):D(j);if(j.type==="Buffer"&&Array.isArray(j.data))return D(j.data)}function N(j){if(j>=R)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R.toString(16)+" bytes");return j|0}function V(j){return+j!=j&&(j=0),d.alloc(+j)}d.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==d.prototype},d.compare=function(k,O){if(_e(k,f)&&(k=d.from(k,k.offset,k.byteLength)),_e(O,f)&&(O=d.from(O,O.offset,O.byteLength)),!d.isBuffer(k)||!d.isBuffer(O))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===O)return 0;let G=k.length,te=O.length;for(let ce=0,fe=Math.min(G,te);ce<fe;++ce)if(k[ce]!==O[ce]){G=k[ce],te=O[ce];break}return G<te?-1:te<G?1:0},d.isEncoding=function(k){switch(String(k).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}},d.concat=function(k,O){if(!Array.isArray(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return d.alloc(0);let G;if(O===void 0)for(O=0,G=0;G<k.length;++G)O+=k[G].length;const te=d.allocUnsafe(O);let ce=0;for(G=0;G<k.length;++G){let fe=k[G];if(_e(fe,f))ce+fe.length>te.length?(d.isBuffer(fe)||(fe=d.from(fe)),fe.copy(te,ce)):f.prototype.set.call(te,fe,ce);else if(d.isBuffer(fe))fe.copy(te,ce);else throw new TypeError('"list" argument must be an Array of Buffers');ce+=fe.length}return te};function Q(j,k){if(d.isBuffer(j))return j.length;if(w.isView(j)||_e(j,w))return j.byteLength;if(typeof j!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof j);const O=j.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&O===0)return 0;let te=!1;for(;;)switch(k){case"ascii":case"latin1":case"binary":return O;case"utf8":case"utf-8":return De(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O*2;case"hex":return O>>>1;case"base64":return Ce(j).length;default:if(te)return G?-1:De(j).length;k=(""+k).toLowerCase(),te=!0}}d.byteLength=Q;function ne(j,k,O){let G=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((O===void 0||O>this.length)&&(O=this.length),O<=0)||(O>>>=0,k>>>=0,O<=k))return"";for(j||(j="utf8");;)switch(j){case"hex":return b(this,k,O);case"utf8":case"utf-8":return u(this,k,O);case"ascii":return r(this,k,O);case"latin1":case"binary":return h(this,k,O);case"base64":return s(this,k,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,k,O);default:if(G)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),G=!0}}d.prototype._isBuffer=!0;function ae(j,k,O){const G=j[k];j[k]=j[O],j[O]=G}d.prototype.swap16=function(){const k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let O=0;O<k;O+=2)ae(this,O,O+1);return this},d.prototype.swap32=function(){const k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let O=0;O<k;O+=4)ae(this,O,O+3),ae(this,O+1,O+2);return this},d.prototype.swap64=function(){const k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let O=0;O<k;O+=8)ae(this,O,O+7),ae(this,O+1,O+6),ae(this,O+2,O+5),ae(this,O+3,O+4);return this},d.prototype.toString=function(){const k=this.length;return k===0?"":arguments.length===0?u(this,0,k):ne.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(k){if(!d.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:d.compare(this,k)===0},d.prototype.inspect=function(){let k="";const O=_.INSPECT_MAX_BYTES;return k=this.toString("hex",0,O).replace(/(.{2})/g,"$1 ").trim(),this.length>O&&(k+=" ... "),"<Buffer "+k+">"},p&&(d.prototype[p]=d.prototype.inspect),d.prototype.compare=function(k,O,G,te,ce){if(_e(k,f)&&(k=d.from(k,k.offset,k.byteLength)),!d.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(O===void 0&&(O=0),G===void 0&&(G=k?k.length:0),te===void 0&&(te=0),ce===void 0&&(ce=this.length),O<0||G>k.length||te<0||ce>this.length)throw new RangeError("out of range index");if(te>=ce&&O>=G)return 0;if(te>=ce)return-1;if(O>=G)return 1;if(O>>>=0,G>>>=0,te>>>=0,ce>>>=0,this===k)return 0;let fe=ce-te,we=G-O;const Ne=Math.min(fe,we),be=this.slice(te,ce),Se=k.slice(O,G);for(let Oe=0;Oe<Ne;++Oe)if(be[Oe]!==Se[Oe]){fe=be[Oe],we=Se[Oe];break}return fe<we?-1:we<fe?1:0};function ee(j,k,O,G,te){if(j.length===0)return-1;if(typeof O=="string"?(G=O,O=0):O>2147483647?O=2147483647:O<-2147483648&&(O=-2147483648),O=+O,Ue(O)&&(O=te?0:j.length-1),O<0&&(O=j.length+O),O>=j.length){if(te)return-1;O=j.length-1}else if(O<0)if(te)O=0;else return-1;if(typeof k=="string"&&(k=d.from(k,G)),d.isBuffer(k))return k.length===0?-1:le(j,k,O,G,te);if(typeof k=="number")return k=k&255,typeof f.prototype.indexOf=="function"?te?f.prototype.indexOf.call(j,k,O):f.prototype.lastIndexOf.call(j,k,O):le(j,[k],O,G,te);throw new TypeError("val must be string, number or Buffer")}function le(j,k,O,G,te){let ce=1,fe=j.length,we=k.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(j.length<2||k.length<2)return-1;ce=2,fe/=2,we/=2,O/=2}function Ne(Se,Oe){return ce===1?Se[Oe]:Se.readUInt16BE(Oe*ce)}let be;if(te){let Se=-1;for(be=O;be<fe;be++)if(Ne(j,be)===Ne(k,Se===-1?0:be-Se)){if(Se===-1&&(Se=be),be-Se+1===we)return Se*ce}else Se!==-1&&(be-=be-Se),Se=-1}else for(O+we>fe&&(O=fe-we),be=O;be>=0;be--){let Se=!0;for(let Oe=0;Oe<we;Oe++)if(Ne(j,be+Oe)!==Ne(k,Oe)){Se=!1;break}if(Se)return be}return-1}d.prototype.includes=function(k,O,G){return this.indexOf(k,O,G)!==-1},d.prototype.indexOf=function(k,O,G){return ee(this,k,O,G,!0)},d.prototype.lastIndexOf=function(k,O,G){return ee(this,k,O,G,!1)};function c(j,k,O,G){O=Number(O)||0;const te=j.length-O;G?(G=Number(G),G>te&&(G=te)):G=te;const ce=k.length;G>ce/2&&(G=ce/2);let fe;for(fe=0;fe<G;++fe){const we=parseInt(k.substr(fe*2,2),16);if(Ue(we))return fe;j[O+fe]=we}return fe}function e(j,k,O,G){return pe(De(k,j.length-O),j,O,G)}function t(j,k,O,G){return pe(de(k),j,O,G)}function n(j,k,O,G){return pe(Ce(k),j,O,G)}function a(j,k,O,G){return pe(ye(k,j.length-O),j,O,G)}d.prototype.write=function(k,O,G,te){if(O===void 0)te="utf8",G=this.length,O=0;else if(G===void 0&&typeof O=="string")te=O,G=this.length,O=0;else if(isFinite(O))O=O>>>0,isFinite(G)?(G=G>>>0,te===void 0&&(te="utf8")):(te=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ce=this.length-O;if((G===void 0||G>ce)&&(G=ce),k.length>0&&(G<0||O<0)||O>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");let fe=!1;for(;;)switch(te){case"hex":return c(this,k,O,G);case"utf8":case"utf-8":return e(this,k,O,G);case"ascii":case"latin1":case"binary":return t(this,k,O,G);case"base64":return n(this,k,O,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a(this,k,O,G);default:if(fe)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),fe=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function s(j,k,O){return k===0&&O===j.length?S.fromByteArray(j):S.fromByteArray(j.slice(k,O))}function u(j,k,O){O=Math.min(j.length,O);const G=[];let te=k;for(;te<O;){const ce=j[te];let fe=null,we=ce>239?4:ce>223?3:ce>191?2:1;if(te+we<=O){let Ne,be,Se,Oe;switch(we){case 1:ce<128&&(fe=ce);break;case 2:Ne=j[te+1],(Ne&192)===128&&(Oe=(ce&31)<<6|Ne&63,Oe>127&&(fe=Oe));break;case 3:Ne=j[te+1],be=j[te+2],(Ne&192)===128&&(be&192)===128&&(Oe=(ce&15)<<12|(Ne&63)<<6|be&63,Oe>2047&&(Oe<55296||Oe>57343)&&(fe=Oe));break;case 4:Ne=j[te+1],be=j[te+2],Se=j[te+3],(Ne&192)===128&&(be&192)===128&&(Se&192)===128&&(Oe=(ce&15)<<18|(Ne&63)<<12|(be&63)<<6|Se&63,Oe>65535&&Oe<1114112&&(fe=Oe))}}fe===null?(fe=65533,we=1):fe>65535&&(fe-=65536,G.push(fe>>>10&1023|55296),fe=56320|fe&1023),G.push(fe),te+=we}return o(G)}const l=4096;function o(j){const k=j.length;if(k<=l)return String.fromCharCode.apply(String,j);let O="",G=0;for(;G<k;)O+=String.fromCharCode.apply(String,j.slice(G,G+=l));return O}function r(j,k,O){let G="";O=Math.min(j.length,O);for(let te=k;te<O;++te)G+=String.fromCharCode(j[te]&127);return G}function h(j,k,O){let G="";O=Math.min(j.length,O);for(let te=k;te<O;++te)G+=String.fromCharCode(j[te]);return G}function b(j,k,O){const G=j.length;(!k||k<0)&&(k=0),(!O||O<0||O>G)&&(O=G);let te="";for(let ce=k;ce<O;++ce)te+=xe[j[ce]];return te}function E(j,k,O){const G=j.slice(k,O);let te="";for(let ce=0;ce<G.length-1;ce+=2)te+=String.fromCharCode(G[ce]+G[ce+1]*256);return te}d.prototype.slice=function(k,O){const G=this.length;k=~~k,O=O===void 0?G:~~O,k<0?(k+=G,k<0&&(k=0)):k>G&&(k=G),O<0?(O+=G,O<0&&(O=0)):O>G&&(O=G),O<k&&(O=k);const te=this.subarray(k,O);return Object.setPrototypeOf(te,d.prototype),te};function L(j,k,O){if(j%1!==0||j<0)throw new RangeError("offset is not uint");if(j+k>O)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=this[k],ce=1,fe=0;for(;++fe<O&&(ce*=256);)te+=this[k+fe]*ce;return te},d.prototype.readUintBE=d.prototype.readUIntBE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=this[k+--O],ce=1;for(;O>0&&(ce*=256);)te+=this[k+--O]*ce;return te},d.prototype.readUint8=d.prototype.readUInt8=function(k,O){return k=k>>>0,O||L(k,1,this.length),this[k]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(k,O){return k=k>>>0,O||L(k,2,this.length),this[k]|this[k+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(k,O){return k=k>>>0,O||L(k,2,this.length),this[k]<<8|this[k+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(k,O){return k=k>>>0,O||L(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+this[k+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(k,O){return k=k>>>0,O||L(k,4,this.length),this[k]*16777216+(this[k+1]<<16|this[k+2]<<8|this[k+3])},d.prototype.readBigUInt64LE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&Pe(k,this.length-8);const te=O+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24,ce=this[++k]+this[++k]*2**8+this[++k]*2**16+G*2**24;return BigInt(te)+(BigInt(ce)<<BigInt(32))}),d.prototype.readBigUInt64BE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&Pe(k,this.length-8);const te=O*2**24+this[++k]*2**16+this[++k]*2**8+this[++k],ce=this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+G;return(BigInt(te)<<BigInt(32))+BigInt(ce)}),d.prototype.readIntLE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=this[k],ce=1,fe=0;for(;++fe<O&&(ce*=256);)te+=this[k+fe]*ce;return ce*=128,te>=ce&&(te-=Math.pow(2,8*O)),te},d.prototype.readIntBE=function(k,O,G){k=k>>>0,O=O>>>0,G||L(k,O,this.length);let te=O,ce=1,fe=this[k+--te];for(;te>0&&(ce*=256);)fe+=this[k+--te]*ce;return ce*=128,fe>=ce&&(fe-=Math.pow(2,8*O)),fe},d.prototype.readInt8=function(k,O){return k=k>>>0,O||L(k,1,this.length),this[k]&128?(255-this[k]+1)*-1:this[k]},d.prototype.readInt16LE=function(k,O){k=k>>>0,O||L(k,2,this.length);const G=this[k]|this[k+1]<<8;return G&32768?G|4294901760:G},d.prototype.readInt16BE=function(k,O){k=k>>>0,O||L(k,2,this.length);const G=this[k+1]|this[k]<<8;return G&32768?G|4294901760:G},d.prototype.readInt32LE=function(k,O){return k=k>>>0,O||L(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},d.prototype.readInt32BE=function(k,O){return k=k>>>0,O||L(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},d.prototype.readBigInt64LE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&Pe(k,this.length-8);const te=this[k+4]+this[k+5]*2**8+this[k+6]*2**16+(G<<24);return(BigInt(te)<<BigInt(32))+BigInt(O+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24)}),d.prototype.readBigInt64BE=Ae(function(k){k=k>>>0,he(k,"offset");const O=this[k],G=this[k+7];(O===void 0||G===void 0)&&Pe(k,this.length-8);const te=(O<<24)+this[++k]*2**16+this[++k]*2**8+this[++k];return(BigInt(te)<<BigInt(32))+BigInt(this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+G)}),d.prototype.readFloatLE=function(k,O){return k=k>>>0,O||L(k,4,this.length),I.read(this,k,!0,23,4)},d.prototype.readFloatBE=function(k,O){return k=k>>>0,O||L(k,4,this.length),I.read(this,k,!1,23,4)},d.prototype.readDoubleLE=function(k,O){return k=k>>>0,O||L(k,8,this.length),I.read(this,k,!0,52,8)},d.prototype.readDoubleBE=function(k,O){return k=k>>>0,O||L(k,8,this.length),I.read(this,k,!1,52,8)};function Y(j,k,O,G,te,ce){if(!d.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>te||k<ce)throw new RangeError('"value" argument is out of bounds');if(O+G>j.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(k,O,G,te){if(k=+k,O=O>>>0,G=G>>>0,!te){const we=Math.pow(2,8*G)-1;Y(this,k,O,G,we,0)}let ce=1,fe=0;for(this[O]=k&255;++fe<G&&(ce*=256);)this[O+fe]=k/ce&255;return O+G},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(k,O,G,te){if(k=+k,O=O>>>0,G=G>>>0,!te){const we=Math.pow(2,8*G)-1;Y(this,k,O,G,we,0)}let ce=G-1,fe=1;for(this[O+ce]=k&255;--ce>=0&&(fe*=256);)this[O+ce]=k/fe&255;return O+G},d.prototype.writeUint8=d.prototype.writeUInt8=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,1,255,0),this[O]=k&255,O+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,65535,0),this[O]=k&255,this[O+1]=k>>>8,O+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,65535,0),this[O]=k>>>8,this[O+1]=k&255,O+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,4294967295,0),this[O+3]=k>>>24,this[O+2]=k>>>16,this[O+1]=k>>>8,this[O]=k&255,O+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,4294967295,0),this[O]=k>>>24,this[O+1]=k>>>16,this[O+2]=k>>>8,this[O+3]=k&255,O+4};function K(j,k,O,G,te){ue(k,G,te,j,O,7);let ce=Number(k&BigInt(4294967295));j[O++]=ce,ce=ce>>8,j[O++]=ce,ce=ce>>8,j[O++]=ce,ce=ce>>8,j[O++]=ce;let fe=Number(k>>BigInt(32)&BigInt(4294967295));return j[O++]=fe,fe=fe>>8,j[O++]=fe,fe=fe>>8,j[O++]=fe,fe=fe>>8,j[O++]=fe,O}function q(j,k,O,G,te){ue(k,G,te,j,O,7);let ce=Number(k&BigInt(4294967295));j[O+7]=ce,ce=ce>>8,j[O+6]=ce,ce=ce>>8,j[O+5]=ce,ce=ce>>8,j[O+4]=ce;let fe=Number(k>>BigInt(32)&BigInt(4294967295));return j[O+3]=fe,fe=fe>>8,j[O+2]=fe,fe=fe>>8,j[O+1]=fe,fe=fe>>8,j[O]=fe,O+8}d.prototype.writeBigUInt64LE=Ae(function(k,O=0){return K(this,k,O,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=Ae(function(k,O=0){return q(this,k,O,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(k,O,G,te){if(k=+k,O=O>>>0,!te){const Ne=Math.pow(2,8*G-1);Y(this,k,O,G,Ne-1,-Ne)}let ce=0,fe=1,we=0;for(this[O]=k&255;++ce<G&&(fe*=256);)k<0&&we===0&&this[O+ce-1]!==0&&(we=1),this[O+ce]=(k/fe>>0)-we&255;return O+G},d.prototype.writeIntBE=function(k,O,G,te){if(k=+k,O=O>>>0,!te){const Ne=Math.pow(2,8*G-1);Y(this,k,O,G,Ne-1,-Ne)}let ce=G-1,fe=1,we=0;for(this[O+ce]=k&255;--ce>=0&&(fe*=256);)k<0&&we===0&&this[O+ce+1]!==0&&(we=1),this[O+ce]=(k/fe>>0)-we&255;return O+G},d.prototype.writeInt8=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,1,127,-128),k<0&&(k=255+k+1),this[O]=k&255,O+1},d.prototype.writeInt16LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,32767,-32768),this[O]=k&255,this[O+1]=k>>>8,O+2},d.prototype.writeInt16BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,2,32767,-32768),this[O]=k>>>8,this[O+1]=k&255,O+2},d.prototype.writeInt32LE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,2147483647,-2147483648),this[O]=k&255,this[O+1]=k>>>8,this[O+2]=k>>>16,this[O+3]=k>>>24,O+4},d.prototype.writeInt32BE=function(k,O,G){return k=+k,O=O>>>0,G||Y(this,k,O,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[O]=k>>>24,this[O+1]=k>>>16,this[O+2]=k>>>8,this[O+3]=k&255,O+4},d.prototype.writeBigInt64LE=Ae(function(k,O=0){return K(this,k,O,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=Ae(function(k,O=0){return q(this,k,O,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function $(j,k,O,G,te,ce){if(O+G>j.length)throw new RangeError("Index out of range");if(O<0)throw new RangeError("Index out of range")}function W(j,k,O,G,te){return k=+k,O=O>>>0,te||$(j,k,O,4),I.write(j,k,O,G,23,4),O+4}d.prototype.writeFloatLE=function(k,O,G){return W(this,k,O,!0,G)},d.prototype.writeFloatBE=function(k,O,G){return W(this,k,O,!1,G)};function J(j,k,O,G,te){return k=+k,O=O>>>0,te||$(j,k,O,8),I.write(j,k,O,G,52,8),O+8}d.prototype.writeDoubleLE=function(k,O,G){return J(this,k,O,!0,G)},d.prototype.writeDoubleBE=function(k,O,G){return J(this,k,O,!1,G)},d.prototype.copy=function(k,O,G,te){if(!d.isBuffer(k))throw new TypeError("argument should be a Buffer");if(G||(G=0),!te&&te!==0&&(te=this.length),O>=k.length&&(O=k.length),O||(O=0),te>0&&te<G&&(te=G),te===G||k.length===0||this.length===0)return 0;if(O<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),k.length-O<te-G&&(te=k.length-O+G);const ce=te-G;return this===k&&typeof f.prototype.copyWithin=="function"?this.copyWithin(O,G,te):f.prototype.set.call(k,this.subarray(G,te),O),ce},d.prototype.fill=function(k,O,G,te){if(typeof k=="string"){if(typeof O=="string"?(te=O,O=0,G=this.length):typeof G=="string"&&(te=G,G=this.length),te!==void 0&&typeof te!="string")throw new TypeError("encoding must be a string");if(typeof te=="string"&&!d.isEncoding(te))throw new TypeError("Unknown encoding: "+te);if(k.length===1){const fe=k.charCodeAt(0);(te==="utf8"&&fe<128||te==="latin1")&&(k=fe)}}else typeof k=="number"?k=k&255:typeof k=="boolean"&&(k=Number(k));if(O<0||this.length<O||this.length<G)throw new RangeError("Out of range index");if(G<=O)return this;O=O>>>0,G=G===void 0?this.length:G>>>0,k||(k=0);let ce;if(typeof k=="number")for(ce=O;ce<G;++ce)this[ce]=k;else{const fe=d.isBuffer(k)?k:d.from(k,te),we=fe.length;if(we===0)throw new TypeError('The value "'+k+'" is invalid for argument "value"');for(ce=0;ce<G-O;++ce)this[ce+O]=fe[ce%we]}return this};const X={};function U(j,k,O){X[j]=class extends O{constructor(){super(),Object.defineProperty(this,"message",{value:k.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${j}]`,this.stack,delete this.name}get code(){return j}set code(te){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:te,writable:!0})}toString(){return`${this.name} [${j}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(j){return j?`${j} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(j,k){return`The "${j}" argument must be of type number. Received type ${typeof k}`},TypeError),U("ERR_OUT_OF_RANGE",function(j,k,O){let G=`The value of "${j}" is out of range.`,te=O;return Number.isInteger(O)&&Math.abs(O)>2**32?te=re(String(O)):typeof O=="bigint"&&(te=String(O),(O>BigInt(2)**BigInt(32)||O<-(BigInt(2)**BigInt(32)))&&(te=re(te)),te+="n"),G+=` It must be ${k}. Received ${te}`,G},RangeError);function re(j){let k="",O=j.length;const G=j[0]==="-"?1:0;for(;O>=G+4;O-=3)k=`_${j.slice(O-3,O)}${k}`;return`${j.slice(0,O)}${k}`}function Ie(j,k,O){he(k,"offset"),(j[k]===void 0||j[k+O]===void 0)&&Pe(k,j.length-(O+1))}function ue(j,k,O,G,te,ce){if(j>O||j<k){const fe=typeof k=="bigint"?"n":"";let we;throw k===0||k===BigInt(0)?we=`>= 0${fe} and < 2${fe} ** ${(ce+1)*8}${fe}`:we=`>= -(2${fe} ** ${(ce+1)*8-1}${fe}) and < 2 ** ${(ce+1)*8-1}${fe}`,new X.ERR_OUT_OF_RANGE("value",we,j)}Ie(G,te,ce)}function he(j,k){if(typeof j!="number")throw new X.ERR_INVALID_ARG_TYPE(k,"number",j)}function Pe(j,k,O){throw Math.floor(j)!==j?(he(j,O),new X.ERR_OUT_OF_RANGE("offset","an integer",j)):k<0?new X.ERR_BUFFER_OUT_OF_BOUNDS:new X.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${k}`,j)}const me=/[^+/0-9A-Za-z-_]/g;function se(j){if(j=j.split("=")[0],j=j.trim().replace(me,""),j.length<2)return"";for(;j.length%4!==0;)j=j+"=";return j}function De(j,k){k=k||1/0;let O;const G=j.length;let te=null;const ce=[];for(let fe=0;fe<G;++fe){if(O=j.charCodeAt(fe),O>55295&&O<57344){if(!te){if(O>56319){(k-=3)>-1&&ce.push(239,191,189);continue}else if(fe+1===G){(k-=3)>-1&&ce.push(239,191,189);continue}te=O;continue}if(O<56320){(k-=3)>-1&&ce.push(239,191,189),te=O;continue}O=(te-55296<<10|O-56320)+65536}else te&&(k-=3)>-1&&ce.push(239,191,189);if(te=null,O<128){if((k-=1)<0)break;ce.push(O)}else if(O<2048){if((k-=2)<0)break;ce.push(O>>6|192,O&63|128)}else if(O<65536){if((k-=3)<0)break;ce.push(O>>12|224,O>>6&63|128,O&63|128)}else if(O<1114112){if((k-=4)<0)break;ce.push(O>>18|240,O>>12&63|128,O>>6&63|128,O&63|128)}else throw new Error("Invalid code point")}return ce}function de(j){const k=[];for(let O=0;O<j.length;++O)k.push(j.charCodeAt(O)&255);return k}function ye(j,k){let O,G,te;const ce=[];for(let fe=0;fe<j.length&&!((k-=2)<0);++fe)O=j.charCodeAt(fe),G=O>>8,te=O%256,ce.push(te),ce.push(G);return ce}function Ce(j){return S.toByteArray(se(j))}function pe(j,k,O,G){let te;for(te=0;te<G&&!(te+O>=k.length||te>=j.length);++te)k[te+O]=j[te];return te}function _e(j,k){return j instanceof k||j!=null&&j.constructor!=null&&j.constructor.name!=null&&j.constructor.name===k.name}function Ue(j){return j!==j}const xe=(function(){const j="0123456789abcdef",k=new Array(256);for(let O=0;O<16;++O){const G=O*16;for(let te=0;te<16;++te)k[G+te]=j[O]+j[te]}return k})();function Ae(j){return typeof BigInt>"u"?je:j}function je(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer=buffer$1.Buffer;var bufferXor,hasRequiredBufferXor;function requireBufferXor(){return hasRequiredBufferXor||(hasRequiredBufferXor=1,bufferXor=function(S,I){for(var p=Math.min(S.length,I.length),R=new Buffer(p),f=0;f<p;++f)R[f]=S[f]^I[f];return R}),bufferXor}var hasRequiredCbc;function requireCbc(){if(hasRequiredCbc)return cbc;hasRequiredCbc=1;var _=requireBufferXor();return cbc.encrypt=function(S,I){var p=_(I,S._prev);return S._prev=S._cipher.encryptBlock(p),S._prev},cbc.decrypt=function(S,I){var p=S._prev;S._prev=I;var R=S._cipher.decryptBlock(I);return _(R,p)},cbc}var cfb={},hasRequiredCfb;function requireCfb(){if(hasRequiredCfb)return cfb;hasRequiredCfb=1;var _=requireSafeBuffer$2().Buffer,S=requireBufferXor();function I(p,R,f){var w=R.length,m=S(R,p._cache);return p._cache=p._cache.slice(w),p._prev=_.concat([p._prev,f?R:m]),m}return cfb.encrypt=function(p,R,f){for(var w=_.allocUnsafe(0),m;R.length;)if(p._cache.length===0&&(p._cache=p._cipher.encryptBlock(p._prev),p._prev=_.allocUnsafe(0)),p._cache.length<=R.length)m=p._cache.length,w=_.concat([w,I(p,R.slice(0,m),f)]),R=R.slice(m);else{w=_.concat([w,I(p,R,f)]);break}return w},cfb}var cfb8={},hasRequiredCfb8;function requireCfb8(){if(hasRequiredCfb8)return cfb8;hasRequiredCfb8=1;var _=requireSafeBuffer$2().Buffer;function S(I,p,R){var f=I._cipher.encryptBlock(I._prev),w=f[0]^p;return I._prev=_.concat([I._prev.slice(1),_.from([R?p:w])]),w}return cfb8.encrypt=function(I,p,R){for(var f=p.length,w=_.allocUnsafe(f),m=-1;++m<f;)w[m]=S(I,p[m],R);return w},cfb8}var cfb1={},hasRequiredCfb1;function requireCfb1(){if(hasRequiredCfb1)return cfb1;hasRequiredCfb1=1;var _=requireSafeBuffer$2().Buffer;function S(p,R,f){for(var w,m=-1,v=8,y=0,d,g;++m<v;)w=p._cipher.encryptBlock(p._prev),d=R&1<<7-m?128:0,g=w[0]^d,y+=(g&128)>>m%8,p._prev=I(p._prev,f?d:g);return y}function I(p,R){var f=p.length,w=-1,m=_.allocUnsafe(p.length);for(p=_.concat([p,_.from([R])]);++w<f;)m[w]=p[w]<<1|p[w+1]>>7;return m}return cfb1.encrypt=function(p,R,f){for(var w=R.length,m=_.allocUnsafe(w),v=-1;++v<w;)m[v]=S(p,R[v],f);return m},cfb1}var ofb={},hasRequiredOfb;function requireOfb(){if(hasRequiredOfb)return ofb;hasRequiredOfb=1;var _=requireBufferXor();function S(I){return I._prev=I._cipher.encryptBlock(I._prev),I._prev}return ofb.encrypt=function(I,p){for(;I._cache.length<p.length;)I._cache=Buffer.concat([I._cache,S(I)]);var R=I._cache.slice(0,p.length);return I._cache=I._cache.slice(p.length),_(p,R)},ofb}var ctr={},incr32_1,hasRequiredIncr32;function requireIncr32(){if(hasRequiredIncr32)return incr32_1;hasRequiredIncr32=1;function _(S){for(var I=S.length,p;I--;)if(p=S.readUInt8(I),p===255)S.writeUInt8(0,I);else{p++,S.writeUInt8(p,I);break}}return incr32_1=_,incr32_1}var hasRequiredCtr;function requireCtr(){if(hasRequiredCtr)return ctr;hasRequiredCtr=1;var _=requireBufferXor(),S=requireSafeBuffer$2().Buffer,I=requireIncr32();function p(f){var w=f._cipher.encryptBlockRaw(f._prev);return I(f._prev),w}var R=16;return ctr.encrypt=function(f,w){var m=Math.ceil(w.length/R),v=f._cache.length;f._cache=S.concat([f._cache,S.allocUnsafe(m*R)]);for(var y=0;y<m;y++){var d=p(f),g=v+y*R;f._cache.writeUInt32BE(d[0],g+0),f._cache.writeUInt32BE(d[1],g+4),f._cache.writeUInt32BE(d[2],g+8),f._cache.writeUInt32BE(d[3],g+12)}var M=f._cache.slice(0,w.length);return f._cache=f._cache.slice(w.length),_(w,M)},ctr}const aes128={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},require$$2={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128,aes192,aes256,"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}};var modes_1,hasRequiredModes$1;function requireModes$1(){if(hasRequiredModes$1)return modes_1;hasRequiredModes$1=1;var _={ECB:requireEcb(),CBC:requireCbc(),CFB:requireCfb(),CFB8:requireCfb8(),CFB1:requireCfb1(),OFB:requireOfb(),CTR:requireCtr(),GCM:requireCtr()},S=require$$2;for(var I in S)S[I].module=_[S[I].mode];return modes_1=S,modes_1}var aes={},hasRequiredAes;function requireAes(){if(hasRequiredAes)return aes;hasRequiredAes=1;var _=requireSafeBuffer$2().Buffer;function S(m){_.isBuffer(m)||(m=_.from(m));for(var v=m.length/4|0,y=new Array(v),d=0;d<v;d++)y[d]=m.readUInt32BE(d*4);return y}function I(m){for(var v=0;v<m.length;m++)m[v]=0}function p(m,v,y,d,g){for(var M=y[0],x=y[1],B=y[2],A=y[3],D=m[0]^v[0],C=m[1]^v[1],P=m[2]^v[2],H=m[3]^v[3],N,V,Q,ne,ae=4,ee=1;ee<g;ee++)N=M[D>>>24]^x[C>>>16&255]^B[P>>>8&255]^A[H&255]^v[ae++],V=M[C>>>24]^x[P>>>16&255]^B[H>>>8&255]^A[D&255]^v[ae++],Q=M[P>>>24]^x[H>>>16&255]^B[D>>>8&255]^A[C&255]^v[ae++],ne=M[H>>>24]^x[D>>>16&255]^B[C>>>8&255]^A[P&255]^v[ae++],D=N,C=V,P=Q,H=ne;return N=(d[D>>>24]<<24|d[C>>>16&255]<<16|d[P>>>8&255]<<8|d[H&255])^v[ae++],V=(d[C>>>24]<<24|d[P>>>16&255]<<16|d[H>>>8&255]<<8|d[D&255])^v[ae++],Q=(d[P>>>24]<<24|d[H>>>16&255]<<16|d[D>>>8&255]<<8|d[C&255])^v[ae++],ne=(d[H>>>24]<<24|d[D>>>16&255]<<16|d[C>>>8&255]<<8|d[P&255])^v[ae++],N=N>>>0,V=V>>>0,Q=Q>>>0,ne=ne>>>0,[N,V,Q,ne]}var R=[0,1,2,4,8,16,32,64,128,27,54],f=(function(){for(var m=new Array(256),v=0;v<256;v++)v<128?m[v]=v<<1:m[v]=v<<1^283;for(var y=[],d=[],g=[[],[],[],[]],M=[[],[],[],[]],x=0,B=0,A=0;A<256;++A){var D=B^B<<1^B<<2^B<<3^B<<4;D=D>>>8^D&255^99,y[x]=D,d[D]=x;var C=m[x],P=m[C],H=m[P],N=m[D]*257^D*16843008;g[0][x]=N<<24|N>>>8,g[1][x]=N<<16|N>>>16,g[2][x]=N<<8|N>>>24,g[3][x]=N,N=H*16843009^P*65537^C*257^x*16843008,M[0][D]=N<<24|N>>>8,M[1][D]=N<<16|N>>>16,M[2][D]=N<<8|N>>>24,M[3][D]=N,x===0?x=B=1:(x=C^m[m[m[H^C]]],B^=m[m[B]])}return{SBOX:y,INV_SBOX:d,SUB_MIX:g,INV_SUB_MIX:M}})();function w(m){this._key=S(m),this._reset()}return w.blockSize=16,w.keySize=256/8,w.prototype.blockSize=w.blockSize,w.prototype.keySize=w.keySize,w.prototype._reset=function(){for(var m=this._key,v=m.length,y=v+6,d=(y+1)*4,g=[],M=0;M<v;M++)g[M]=m[M];for(M=v;M<d;M++){var x=g[M-1];M%v===0?(x=x<<8|x>>>24,x=f.SBOX[x>>>24]<<24|f.SBOX[x>>>16&255]<<16|f.SBOX[x>>>8&255]<<8|f.SBOX[x&255],x^=R[M/v|0]<<24):v>6&&M%v===4&&(x=f.SBOX[x>>>24]<<24|f.SBOX[x>>>16&255]<<16|f.SBOX[x>>>8&255]<<8|f.SBOX[x&255]),g[M]=g[M-v]^x}for(var B=[],A=0;A<d;A++){var D=d-A,C=g[D-(A%4?0:4)];A<4||D<=4?B[A]=C:B[A]=f.INV_SUB_MIX[0][f.SBOX[C>>>24]]^f.INV_SUB_MIX[1][f.SBOX[C>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[C>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[C&255]]}this._nRounds=y,this._keySchedule=g,this._invKeySchedule=B},w.prototype.encryptBlockRaw=function(m){return m=S(m),p(m,this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},w.prototype.encryptBlock=function(m){var v=this.encryptBlockRaw(m),y=_.allocUnsafe(16);return y.writeUInt32BE(v[0],0),y.writeUInt32BE(v[1],4),y.writeUInt32BE(v[2],8),y.writeUInt32BE(v[3],12),y},w.prototype.decryptBlock=function(m){m=S(m);var v=m[1];m[1]=m[3],m[3]=v;var y=p(m,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),d=_.allocUnsafe(16);return d.writeUInt32BE(y[0],0),d.writeUInt32BE(y[3],4),d.writeUInt32BE(y[2],8),d.writeUInt32BE(y[1],12),d},w.prototype.scrub=function(){I(this._keySchedule),I(this._invKeySchedule),I(this._key)},aes.AES=w,aes}var ghash,hasRequiredGhash;function requireGhash(){if(hasRequiredGhash)return ghash;hasRequiredGhash=1;var _=requireSafeBuffer$2().Buffer,S=_.alloc(16,0);function I(f){return[f.readUInt32BE(0),f.readUInt32BE(4),f.readUInt32BE(8),f.readUInt32BE(12)]}function p(f){var w=_.allocUnsafe(16);return w.writeUInt32BE(f[0]>>>0,0),w.writeUInt32BE(f[1]>>>0,4),w.writeUInt32BE(f[2]>>>0,8),w.writeUInt32BE(f[3]>>>0,12),w}function R(f){this.h=f,this.state=_.alloc(16,0),this.cache=_.allocUnsafe(0)}return R.prototype.ghash=function(f){for(var w=-1;++w<f.length;)this.state[w]^=f[w];this._multiply()},R.prototype._multiply=function(){for(var f=I(this.h),w=[0,0,0,0],m,v,y,d=-1;++d<128;){for(v=(this.state[~~(d/8)]&1<<7-d%8)!==0,v&&(w[0]^=f[0],w[1]^=f[1],w[2]^=f[2],w[3]^=f[3]),y=(f[3]&1)!==0,m=3;m>0;m--)f[m]=f[m]>>>1|(f[m-1]&1)<<31;f[0]=f[0]>>>1,y&&(f[0]=f[0]^225<<24)}this.state=p(w)},R.prototype.update=function(f){this.cache=_.concat([this.cache,f]);for(var w;this.cache.length>=16;)w=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(w)},R.prototype.final=function(f,w){return this.cache.length&&this.ghash(_.concat([this.cache,S],16)),this.ghash(p([0,f,0,w])),this.state},ghash=R,ghash}var authCipher,hasRequiredAuthCipher;function requireAuthCipher(){if(hasRequiredAuthCipher)return authCipher;hasRequiredAuthCipher=1;var _=requireAes(),S=requireSafeBuffer$2().Buffer,I=requireCipherBase(),p=requireInherits_browser(),R=requireGhash(),f=requireBufferXor(),w=requireIncr32();function m(d,g){var M=0;d.length!==g.length&&M++;for(var x=Math.min(d.length,g.length),B=0;B<x;++B)M+=d[B]^g[B];return M}function v(d,g,M){if(g.length===12)return d._finID=S.concat([g,S.from([0,0,0,1])]),S.concat([g,S.from([0,0,0,2])]);var x=new R(M),B=g.length,A=B%16;x.update(g),A&&(A=16-A,x.update(S.alloc(A,0))),x.update(S.alloc(8,0));var D=B*8,C=S.alloc(8);C.writeUIntBE(D,0,8),x.update(C),d._finID=x.state;var P=S.from(d._finID);return w(P),P}function y(d,g,M,x){I.call(this);var B=S.alloc(4,0);this._cipher=new _.AES(g);var A=this._cipher.encryptBlock(B);this._ghash=new R(A),M=v(this,M,A),this._prev=S.from(M),this._cache=S.allocUnsafe(0),this._secCache=S.allocUnsafe(0),this._decrypt=x,this._alen=0,this._len=0,this._mode=d,this._authTag=null,this._called=!1}return p(y,I),y.prototype._update=function(d){if(!this._called&&this._alen){var g=16-this._alen%16;g<16&&(g=S.alloc(g,0),this._ghash.update(g))}this._called=!0;var M=this._mode.encrypt(this,d);return this._decrypt?this._ghash.update(d):this._ghash.update(M),this._len+=d.length,M},y.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var d=f(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&m(d,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=d,this._cipher.scrub()},y.prototype.getAuthTag=function(){if(this._decrypt||!S.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},y.prototype.setAuthTag=function(g){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=g},y.prototype.setAAD=function(g){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(g),this._alen+=g.length},authCipher=y,authCipher}var streamCipher,hasRequiredStreamCipher;function requireStreamCipher(){if(hasRequiredStreamCipher)return streamCipher;hasRequiredStreamCipher=1;var _=requireAes(),S=requireSafeBuffer$2().Buffer,I=requireCipherBase(),p=requireInherits_browser();function R(f,w,m,v){I.call(this),this._cipher=new _.AES(w),this._prev=S.from(m),this._cache=S.allocUnsafe(0),this._secCache=S.allocUnsafe(0),this._decrypt=v,this._mode=f}return p(R,I),R.prototype._update=function(f){return this._mode.encrypt(this,f,this._decrypt)},R.prototype._final=function(){this._cipher.scrub()},streamCipher=R,streamCipher}var evp_bytestokey,hasRequiredEvp_bytestokey;function requireEvp_bytestokey(){if(hasRequiredEvp_bytestokey)return evp_bytestokey;hasRequiredEvp_bytestokey=1;var _=requireSafeBuffer$2().Buffer,S=requireMd5_js();function I(p,R,f,w){if(_.isBuffer(p)||(p=_.from(p,"binary")),R&&(_.isBuffer(R)||(R=_.from(R,"binary")),R.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var m=f/8,v=_.alloc(m),y=_.alloc(w||0),d=_.alloc(0);m>0||w>0;){var g=new S;g.update(d),g.update(p),R&&g.update(R),d=g.digest();var M=0;if(m>0){var x=v.length-m;M=Math.min(m,d.length),d.copy(v,x,0,M),m-=M}if(M<d.length&&w>0){var B=y.length-w,A=Math.min(w,d.length-M);d.copy(y,B,M,M+A),w-=A}}return d.fill(0),{key:v,iv:y}}return evp_bytestokey=I,evp_bytestokey}var hasRequiredEncrypter;function requireEncrypter(){if(hasRequiredEncrypter)return encrypter;hasRequiredEncrypter=1;var _=requireModes$1(),S=requireAuthCipher(),I=requireSafeBuffer$2().Buffer,p=requireStreamCipher(),R=requireCipherBase(),f=requireAes(),w=requireEvp_bytestokey(),m=requireInherits_browser();function v(x,B,A){R.call(this),this._cache=new d,this._cipher=new f.AES(B),this._prev=I.from(A),this._mode=x,this._autopadding=!0}m(v,R),v.prototype._update=function(x){this._cache.add(x);for(var B,A,D=[];B=this._cache.get();)A=this._mode.encrypt(this,B),D.push(A);return I.concat(D)};var y=I.alloc(16,16);v.prototype._final=function(){var x=this._cache.flush();if(this._autopadding)return x=this._mode.encrypt(this,x),this._cipher.scrub(),x;if(!x.equals(y))throw this._cipher.scrub(),new Error("data not multiple of block length")},v.prototype.setAutoPadding=function(x){return this._autopadding=!!x,this};function d(){this.cache=I.allocUnsafe(0)}d.prototype.add=function(x){this.cache=I.concat([this.cache,x])},d.prototype.get=function(){if(this.cache.length>15){var x=this.cache.slice(0,16);return this.cache=this.cache.slice(16),x}return null},d.prototype.flush=function(){for(var x=16-this.cache.length,B=I.allocUnsafe(x),A=-1;++A<x;)B.writeUInt8(x,A);return I.concat([this.cache,B])};function g(x,B,A){var D=_[x.toLowerCase()];if(!D)throw new TypeError("invalid suite type");if(typeof B=="string"&&(B=I.from(B)),B.length!==D.key/8)throw new TypeError("invalid key length "+B.length);if(typeof A=="string"&&(A=I.from(A)),D.mode!=="GCM"&&A.length!==D.iv)throw new TypeError("invalid iv length "+A.length);return D.type==="stream"?new p(D.module,B,A):D.type==="auth"?new S(D.module,B,A):new v(D.module,B,A)}function M(x,B){var A=_[x.toLowerCase()];if(!A)throw new TypeError("invalid suite type");var D=w(B,!1,A.key,A.iv);return g(x,D.key,D.iv)}return encrypter.createCipheriv=g,encrypter.createCipher=M,encrypter}var decrypter={},hasRequiredDecrypter;function requireDecrypter(){if(hasRequiredDecrypter)return decrypter;hasRequiredDecrypter=1;var _=requireAuthCipher(),S=requireSafeBuffer$2().Buffer,I=requireModes$1(),p=requireStreamCipher(),R=requireCipherBase(),f=requireAes(),w=requireEvp_bytestokey(),m=requireInherits_browser();function v(x,B,A){R.call(this),this._cache=new y,this._last=void 0,this._cipher=new f.AES(B),this._prev=S.from(A),this._mode=x,this._autopadding=!0}m(v,R),v.prototype._update=function(x){this._cache.add(x);for(var B,A,D=[];B=this._cache.get(this._autopadding);)A=this._mode.decrypt(this,B),D.push(A);return S.concat(D)},v.prototype._final=function(){var x=this._cache.flush();if(this._autopadding)return d(this._mode.decrypt(this,x));if(x)throw new Error("data not multiple of block length")},v.prototype.setAutoPadding=function(x){return this._autopadding=!!x,this};function y(){this.cache=S.allocUnsafe(0)}y.prototype.add=function(x){this.cache=S.concat([this.cache,x])},y.prototype.get=function(x){var B;if(x){if(this.cache.length>16)return B=this.cache.slice(0,16),this.cache=this.cache.slice(16),B}else if(this.cache.length>=16)return B=this.cache.slice(0,16),this.cache=this.cache.slice(16),B;return null},y.prototype.flush=function(){if(this.cache.length)return this.cache};function d(x){var B=x[15];if(B<1||B>16)throw new Error("unable to decrypt data");for(var A=-1;++A<B;)if(x[A+(16-B)]!==B)throw new Error("unable to decrypt data");if(B!==16)return x.slice(0,16-B)}function g(x,B,A){var D=I[x.toLowerCase()];if(!D)throw new TypeError("invalid suite type");if(typeof A=="string"&&(A=S.from(A)),D.mode!=="GCM"&&A.length!==D.iv)throw new TypeError("invalid iv length "+A.length);if(typeof B=="string"&&(B=S.from(B)),B.length!==D.key/8)throw new TypeError("invalid key length "+B.length);return D.type==="stream"?new p(D.module,B,A,!0):D.type==="auth"?new _(D.module,B,A,!0):new v(D.module,B,A)}function M(x,B){var A=I[x.toLowerCase()];if(!A)throw new TypeError("invalid suite type");var D=w(B,!1,A.key,A.iv);return g(x,D.key,D.iv)}return decrypter.createDecipher=M,decrypter.createDecipheriv=g,decrypter}var hasRequiredBrowser$6;function requireBrowser$6(){if(hasRequiredBrowser$6)return browser$5;hasRequiredBrowser$6=1;var _=requireEncrypter(),S=requireDecrypter(),I=require$$2;function p(){return Object.keys(I)}return browser$5.createCipher=browser$5.Cipher=_.createCipher,browser$5.createCipheriv=browser$5.Cipheriv=_.createCipheriv,browser$5.createDecipher=browser$5.Decipher=S.createDecipher,browser$5.createDecipheriv=browser$5.Decipheriv=S.createDecipheriv,browser$5.listCiphers=browser$5.getCiphers=p,browser$5}var modes={},hasRequiredModes;function requireModes(){return hasRequiredModes||(hasRequiredModes=1,(function(_){_["des-ecb"]={key:8,iv:0},_["des-cbc"]=_.des={key:8,iv:8},_["des-ede3-cbc"]=_.des3={key:24,iv:8},_["des-ede3"]={key:24,iv:0},_["des-ede-cbc"]={key:16,iv:8},_["des-ede"]={key:16,iv:0}})(modes)),modes}var hasRequiredBrowser$5;function requireBrowser$5(){if(hasRequiredBrowser$5)return browser$6;hasRequiredBrowser$5=1;var _=requireBrowserifyDes(),S=requireBrowser$6(),I=requireModes$1(),p=requireModes(),R=requireEvp_bytestokey();function f(d,g){d=d.toLowerCase();var M,x;if(I[d])M=I[d].key,x=I[d].iv;else if(p[d])M=p[d].key*8,x=p[d].iv;else throw new TypeError("invalid suite type");var B=R(g,!1,M,x);return m(d,B.key,B.iv)}function w(d,g){d=d.toLowerCase();var M,x;if(I[d])M=I[d].key,x=I[d].iv;else if(p[d])M=p[d].key*8,x=p[d].iv;else throw new TypeError("invalid suite type");var B=R(g,!1,M,x);return v(d,B.key,B.iv)}function m(d,g,M){if(d=d.toLowerCase(),I[d])return S.createCipheriv(d,g,M);if(p[d])return new _({key:g,iv:M,mode:d});throw new TypeError("invalid suite type")}function v(d,g,M){if(d=d.toLowerCase(),I[d])return S.createDecipheriv(d,g,M);if(p[d])return new _({key:g,iv:M,mode:d,decrypt:!0});throw new TypeError("invalid suite type")}function y(){return Object.keys(p).concat(S.getCiphers())}return browser$6.createCipher=browser$6.Cipher=f,browser$6.createCipheriv=browser$6.Cipheriv=m,browser$6.createDecipher=browser$6.Decipher=w,browser$6.createDecipheriv=browser$6.Decipheriv=v,browser$6.listCiphers=browser$6.getCiphers=y,browser$6}var browser$4={},bn$d={exports:{}},bn$c=bn$d.exports,hasRequiredBn$6;function requireBn$6(){return hasRequiredBn$6||(hasRequiredBn$6=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,$=a[2]|0,W=$&8191,J=$>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,Pe=a[5]|0,me=Pe&8191,se=Pe>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,$e=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,$e)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,$e)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,$e)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,$e)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,$e)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,$e)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,$e)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,$e)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,$e)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,$e)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,$e)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,$e)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,$e)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,$e)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,$e)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,$e),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,$e);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new P;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function P(c,e){this.x=c,this.y=e}P.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},P.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},P.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},P.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],$=n[b+Y+l],W=a[b+Y+l],J=E*$-L*W;W=E*W+L*$,$=J,n[b+Y]=K+$,a[b+Y]=q+W,n[b+Y+l]=K-$,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},P.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},P.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},P.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},P.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},P.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},P.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$c)})(bn$d)),bn$d.exports}var bn$b={exports:{}},bn$a=bn$b.exports,hasRequiredBn$5;function requireBn$5(){return hasRequiredBn$5||(hasRequiredBn$5=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,$=a[2]|0,W=$&8191,J=$>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,Pe=a[5]|0,me=Pe&8191,se=Pe>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,$e=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,$e)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,$e)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,$e)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,$e)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,$e)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,$e)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,$e)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,$e)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,$e)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,$e)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,$e)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,$e)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,$e)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,$e)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,$e)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,$e),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,$e);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new P;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function P(c,e){this.x=c,this.y=e}P.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},P.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},P.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},P.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],$=n[b+Y+l],W=a[b+Y+l],J=E*$-L*W;W=E*W+L*$,$=J,n[b+Y]=K+$,a[b+Y]=q+W,n[b+Y+l]=K-$,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},P.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},P.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},P.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},P.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},P.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},P.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$a)})(bn$b)),bn$b.exports}var brorand={exports:{}},hasRequiredBrorand;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;hasRequiredBrorand=1;var _;brorand.exports=function(R){return _||(_=new S(null)),_.generate(R)};function S(p){this.rand=p}if(brorand.exports.Rand=S,S.prototype.generate=function(R){return this._rand(R)},S.prototype._rand=function(R){if(this.rand.getBytes)return this.rand.getBytes(R);for(var f=new Uint8Array(R),w=0;w<f.length;w++)f[w]=this.rand.getByte();return f},typeof self=="object")self.crypto&&self.crypto.getRandomValues?S.prototype._rand=function(R){var f=new Uint8Array(R);return self.crypto.getRandomValues(f),f}:self.msCrypto&&self.msCrypto.getRandomValues?S.prototype._rand=function(R){var f=new Uint8Array(R);return self.msCrypto.getRandomValues(f),f}:typeof window=="object"&&(S.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var I=requireCryptoBrowserify();if(typeof I.randomBytes!="function")throw new Error("Not supported");S.prototype._rand=function(R){return I.randomBytes(R)}}catch{}return brorand.exports}var mr,hasRequiredMr;function requireMr(){if(hasRequiredMr)return mr;hasRequiredMr=1;var _=requireBn$5(),S=requireBrorand();function I(p){this.rand=p||new S.Rand}return mr=I,I.create=function(R){return new I(R)},I.prototype._randbelow=function(R){var f=R.bitLength(),w=Math.ceil(f/8);do var m=new _(this.rand.generate(w));while(m.cmp(R)>=0);return m},I.prototype._randrange=function(R,f){var w=f.sub(R);return R.add(this._randbelow(w))},I.prototype.test=function(R,f,w){var m=R.bitLength(),v=_.mont(R),y=new _(1).toRed(v);f||(f=Math.max(1,m/48|0));for(var d=R.subn(1),g=0;!d.testn(g);g++);for(var M=R.shrn(g),x=d.toRed(v),B=!0;f>0;f--){var A=this._randrange(new _(2),d);w&&w(A);var D=A.toRed(v).redPow(M);if(!(D.cmp(y)===0||D.cmp(x)===0)){for(var C=1;C<g;C++){if(D=D.redSqr(),D.cmp(y)===0)return!1;if(D.cmp(x)===0)break}if(C===g)return!1}}return B},I.prototype.getDivisor=function(R,f){var w=R.bitLength(),m=_.mont(R),v=new _(1).toRed(m);f||(f=Math.max(1,w/48|0));for(var y=R.subn(1),d=0;!y.testn(d);d++);for(var g=R.shrn(d),M=y.toRed(m);f>0;f--){var x=this._randrange(new _(2),y),B=R.gcd(x);if(B.cmpn(1)!==0)return B;var A=x.toRed(m).redPow(g);if(!(A.cmp(v)===0||A.cmp(M)===0)){for(var D=1;D<d;D++){if(A=A.redSqr(),A.cmp(v)===0)return A.fromRed().subn(1).gcd(R);if(A.cmp(M)===0)break}if(D===d)return A=A.redSqr(),A.fromRed().subn(1).gcd(R)}}return!1},mr}var generatePrime,hasRequiredGeneratePrime;function requireGeneratePrime(){if(hasRequiredGeneratePrime)return generatePrime;hasRequiredGeneratePrime=1;var _=requireBrowser$b();generatePrime=D,D.simpleSieve=B,D.fermatTest=A;var S=requireBn$6(),I=new S(24),p=requireMr(),R=new p,f=new S(1),w=new S(2),m=new S(5);new S(16),new S(8);var v=new S(10),y=new S(3);new S(7);var d=new S(11),g=new S(4);new S(12);var M=null;function x(){if(M!==null)return M;var C=1048576,P=[];P[0]=2;for(var H=1,N=3;N<C;N+=2){for(var V=Math.ceil(Math.sqrt(N)),Q=0;Q<H&&P[Q]<=V&&N%P[Q]!==0;Q++);H!==Q&&P[Q]<=V||(P[H++]=N)}return M=P,P}function B(C){for(var P=x(),H=0;H<P.length;H++)if(C.modn(P[H])===0)return C.cmpn(P[H])===0;return!0}function A(C){var P=S.mont(C);return w.toRed(P).redPow(C.subn(1)).fromRed().cmpn(1)===0}function D(C,P){if(C<16)return P===2||P===5?new S([140,123]):new S([140,39]);P=new S(P);for(var H,N;;){for(H=new S(_(Math.ceil(C/8)));H.bitLength()>C;)H.ishrn(1);if(H.isEven()&&H.iadd(f),H.testn(1)||H.iadd(w),P.cmp(w)){if(!P.cmp(m))for(;H.mod(v).cmp(y);)H.iadd(g)}else for(;H.mod(I).cmp(d);)H.iadd(g);if(N=H.shrn(1),B(N)&&B(H)&&A(N)&&A(H)&&R.test(N)&&R.test(H))return H}}return generatePrime}const modp1={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},require$$1$1={modp1,modp2,modp5,modp14,modp15,modp16,modp17,modp18};var dh,hasRequiredDh;function requireDh(){if(hasRequiredDh)return dh;hasRequiredDh=1;var _=requireBn$6(),S=requireMr(),I=new S,p=new _(24),R=new _(11),f=new _(10),w=new _(3),m=new _(7),v=requireGeneratePrime(),y=requireBrowser$b();dh=B;function d(D,C){return C=C||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,C)),this._pub=new _(D),this}function g(D,C){return C=C||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,C)),this._priv=new _(D),this}var M={};function x(D,C){var P=C.toString("hex"),H=[P,D.toString(16)].join("_");if(H in M)return M[H];var N=0;if(D.isEven()||!v.simpleSieve||!v.fermatTest(D)||!I.test(D))return N+=1,P==="02"||P==="05"?N+=8:N+=4,M[H]=N,N;I.test(D.shrn(1))||(N+=2);var V;switch(P){case"02":D.mod(p).cmp(R)&&(N+=8);break;case"05":V=D.mod(f),V.cmp(w)&&V.cmp(m)&&(N+=8);break;default:N+=4}return M[H]=N,N}function B(D,C,P){this.setGenerator(C),this.__prime=new _(D),this._prime=_.mont(this.__prime),this._primeLen=D.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,P?(this.setPublicKey=d,this.setPrivateKey=g):this._primeCode=8}Object.defineProperty(B.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=x(this.__prime,this.__gen)),this._primeCode}}),B.prototype.generateKeys=function(){return this._priv||(this._priv=new _(y(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},B.prototype.computeSecret=function(D){D=new _(D),D=D.toRed(this._prime);var C=D.redPow(this._priv).fromRed(),P=new Buffer(C.toArray()),H=this.getPrime();if(P.length<H.length){var N=new Buffer(H.length-P.length);N.fill(0),P=Buffer.concat([N,P])}return P},B.prototype.getPublicKey=function(C){return A(this._pub,C)},B.prototype.getPrivateKey=function(C){return A(this._priv,C)},B.prototype.getPrime=function(D){return A(this.__prime,D)},B.prototype.getGenerator=function(D){return A(this._gen,D)},B.prototype.setGenerator=function(D,C){return C=C||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,C)),this.__gen=D,this._gen=new _(D),this};function A(D,C){var P=new Buffer(D.toArray());return C?P.toString(C):P}return dh}var hasRequiredBrowser$4;function requireBrowser$4(){if(hasRequiredBrowser$4)return browser$4;hasRequiredBrowser$4=1;var _=requireGeneratePrime(),S=require$$1$1,I=requireDh();function p(w){var m=new Buffer(S[w].prime,"hex"),v=new Buffer(S[w].gen,"hex");return new I(m,v)}var R={binary:!0,hex:!0,base64:!0};function f(w,m,v,y){return Buffer.isBuffer(m)||R[m]===void 0?f(w,"binary",m,v):(m=m||"binary",y=y||"binary",v=v||new Buffer([2]),Buffer.isBuffer(v)||(v=new Buffer(v,y)),typeof w=="number"?new I(_(w,v),v,!0):(Buffer.isBuffer(w)||(w=new Buffer(w,m)),new I(w,v,!0)))}return browser$4.DiffieHellmanGroup=browser$4.createDiffieHellmanGroup=browser$4.getDiffieHellman=p,browser$4.createDiffieHellman=browser$4.DiffieHellman=f,browser$4}var readableBrowser={exports:{}},isarray,hasRequiredIsarray;function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var _={}.toString;return isarray=Array.isArray||function(S){return _.call(S)=="[object Array]"},isarray}var streamBrowser,hasRequiredStreamBrowser;function requireStreamBrowser(){return hasRequiredStreamBrowser||(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter),streamBrowser}var safeBuffer={exports:{}},hasRequiredSafeBuffer;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,(function(_,S){var I=requireDist(),p=I.Buffer;function R(w,m){for(var v in w)m[v]=w[v]}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?_.exports=I:(R(I,S),S.Buffer=f);function f(w,m,v){return p(w,m,v)}R(p,f),f.from=function(w,m,v){if(typeof w=="number")throw new TypeError("Argument must not be a number");return p(w,m,v)},f.alloc=function(w,m,v){if(typeof w!="number")throw new TypeError("Argument must be a number");var y=p(w);return m!==void 0?typeof v=="string"?y.fill(m,v):y.fill(m):y.fill(0),y},f.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return p(w)},f.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(w)}})(safeBuffer,safeBuffer.exports)),safeBuffer.exports}var BufferList={exports:{}},hasRequiredBufferList;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,(function(_){function S(f,w){if(!(f instanceof w))throw new TypeError("Cannot call a class as a function")}var I=requireSafeBuffer().Buffer,p=requireUtil$1();function R(f,w,m){f.copy(w,m)}_.exports=(function(){function f(){S(this,f),this.head=null,this.tail=null,this.length=0}return f.prototype.push=function(m){var v={data:m,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length},f.prototype.unshift=function(m){var v={data:m,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length},f.prototype.shift=function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}},f.prototype.clear=function(){this.head=this.tail=null,this.length=0},f.prototype.join=function(m){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=m+v.data;return y},f.prototype.concat=function(m){if(this.length===0)return I.alloc(0);for(var v=I.allocUnsafe(m>>>0),y=this.head,d=0;y;)R(y.data,v,d),d+=y.data.length,y=y.next;return v},f})(),p&&p.inspect&&p.inspect.custom&&(_.exports.prototype[p.inspect.custom]=function(){var f=p.inspect({length:this.length});return this.constructor.name+" "+f})})(BufferList)),BufferList.exports}var destroy_1,hasRequiredDestroy;function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;var _=requireProcessNextickArgs();function S(R,f){var w=this,m=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return m||v?(f?f(R):R&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,_.nextTick(p,this,R)):_.nextTick(p,this,R)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(R||null,function(y){!f&&y?w._writableState?w._writableState.errorEmitted||(w._writableState.errorEmitted=!0,_.nextTick(p,w,y)):_.nextTick(p,w,y):f&&f(y)}),this)}function I(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function p(R,f){R.emit("error",f)}return destroy_1={destroy:S,undestroy:I},destroy_1}var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var _=requireProcessNextickArgs();_stream_writable=A;function S(u){var l=this;this.next=null,this.entry=null,this.finish=function(){s(l,u)}}var I=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:_.nextTick,p;A.WritableState=x;var R=Object.create(requireUtil());R.inherits=requireInherits_browser();var f={deprecate:requireBrowser$a()},w=requireStreamBrowser(),m=requireSafeBuffer().Buffer,v=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function y(u){return m.from(u)}function d(u){return m.isBuffer(u)||u instanceof v}var g=requireDestroy();R.inherits(A,w);function M(){}function x(u,l){p=p||require_stream_duplex(),u=u||{};var o=l instanceof p;this.objectMode=!!u.objectMode,o&&(this.objectMode=this.objectMode||!!u.writableObjectMode);var r=u.highWaterMark,h=u.writableHighWaterMark,b=this.objectMode?16:16*1024;r||r===0?this.highWaterMark=r:o&&(h||h===0)?this.highWaterMark=h:this.highWaterMark=b,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var E=u.decodeStrings===!1;this.decodeStrings=!E,this.defaultEncoding=u.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){ne(l,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new S(this)}x.prototype.getBuffer=function(){for(var l=this.bufferedRequest,o=[];l;)o.push(l),l=l.next;return o},(function(){try{Object.defineProperty(x.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(u){return B.call(this,u)?!0:this!==A?!1:u&&u._writableState instanceof x}})):B=function(u){return u instanceof this};function A(u){if(p=p||require_stream_duplex(),!B.call(A,this)&&!(this instanceof p))return new A(u);this._writableState=new x(u,this),this.writable=!0,u&&(typeof u.write=="function"&&(this._write=u.write),typeof u.writev=="function"&&(this._writev=u.writev),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.final=="function"&&(this._final=u.final)),w.call(this)}A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function D(u,l){var o=new Error("write after end");u.emit("error",o),_.nextTick(l,o)}function C(u,l,o,r){var h=!0,b=!1;return o===null?b=new TypeError("May not write null values to stream"):typeof o!="string"&&o!==void 0&&!l.objectMode&&(b=new TypeError("Invalid non-string/buffer chunk")),b&&(u.emit("error",b),_.nextTick(r,b),h=!1),h}A.prototype.write=function(u,l,o){var r=this._writableState,h=!1,b=!r.objectMode&&d(u);return b&&!m.isBuffer(u)&&(u=y(u)),typeof l=="function"&&(o=l,l=null),b?l="buffer":l||(l=r.defaultEncoding),typeof o!="function"&&(o=M),r.ended?D(this,o):(b||C(this,r,u,o))&&(r.pendingcb++,h=H(this,r,b,u,l,o)),h},A.prototype.cork=function(){var u=this._writableState;u.corked++},A.prototype.uncork=function(){var u=this._writableState;u.corked&&(u.corked--,!u.writing&&!u.corked&&!u.bufferProcessing&&u.bufferedRequest&&le(this,u))},A.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this};function P(u,l,o){return!u.objectMode&&u.decodeStrings!==!1&&typeof l=="string"&&(l=m.from(l,o)),l}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(u,l,o,r,h,b){if(!o){var E=P(l,r,h);r!==E&&(o=!0,h="buffer",r=E)}var L=l.objectMode?1:r.length;l.length+=L;var Y=l.length<l.highWaterMark;if(Y||(l.needDrain=!0),l.writing||l.corked){var K=l.lastBufferedRequest;l.lastBufferedRequest={chunk:r,encoding:h,isBuf:o,callback:b,next:null},K?K.next=l.lastBufferedRequest:l.bufferedRequest=l.lastBufferedRequest,l.bufferedRequestCount+=1}else N(u,l,!1,L,r,h,b);return Y}function N(u,l,o,r,h,b,E){l.writelen=r,l.writecb=E,l.writing=!0,l.sync=!0,o?u._writev(h,l.onwrite):u._write(h,b,l.onwrite),l.sync=!1}function V(u,l,o,r,h){--l.pendingcb,o?(_.nextTick(h,r),_.nextTick(n,u,l),u._writableState.errorEmitted=!0,u.emit("error",r)):(h(r),u._writableState.errorEmitted=!0,u.emit("error",r),n(u,l))}function Q(u){u.writing=!1,u.writecb=null,u.length-=u.writelen,u.writelen=0}function ne(u,l){var o=u._writableState,r=o.sync,h=o.writecb;if(Q(o),l)V(u,o,r,l,h);else{var b=c(o);!b&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&le(u,o),r?I(ae,u,o,b,h):ae(u,o,b,h)}}function ae(u,l,o,r){o||ee(u,l),l.pendingcb--,r(),n(u,l)}function ee(u,l){l.length===0&&l.needDrain&&(l.needDrain=!1,u.emit("drain"))}function le(u,l){l.bufferProcessing=!0;var o=l.bufferedRequest;if(u._writev&&o&&o.next){var r=l.bufferedRequestCount,h=new Array(r),b=l.corkedRequestsFree;b.entry=o;for(var E=0,L=!0;o;)h[E]=o,o.isBuf||(L=!1),o=o.next,E+=1;h.allBuffers=L,N(u,l,!0,l.length,h,"",b.finish),l.pendingcb++,l.lastBufferedRequest=null,b.next?(l.corkedRequestsFree=b.next,b.next=null):l.corkedRequestsFree=new S(l),l.bufferedRequestCount=0}else{for(;o;){var Y=o.chunk,K=o.encoding,q=o.callback,$=l.objectMode?1:Y.length;if(N(u,l,!1,$,Y,K,q),o=o.next,l.bufferedRequestCount--,l.writing)break}o===null&&(l.lastBufferedRequest=null)}l.bufferedRequest=o,l.bufferProcessing=!1}A.prototype._write=function(u,l,o){o(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(u,l,o){var r=this._writableState;typeof u=="function"?(o=u,u=null,l=null):typeof l=="function"&&(o=l,l=null),u!=null&&this.write(u,l),r.corked&&(r.corked=1,this.uncork()),r.ending||a(this,r,o)};function c(u){return u.ending&&u.length===0&&u.bufferedRequest===null&&!u.finished&&!u.writing}function e(u,l){u._final(function(o){l.pendingcb--,o&&u.emit("error",o),l.prefinished=!0,u.emit("prefinish"),n(u,l)})}function t(u,l){!l.prefinished&&!l.finalCalled&&(typeof u._final=="function"?(l.pendingcb++,l.finalCalled=!0,_.nextTick(e,u,l)):(l.prefinished=!0,u.emit("prefinish")))}function n(u,l){var o=c(l);return o&&(t(u,l),l.pendingcb===0&&(l.finished=!0,u.emit("finish"))),o}function a(u,l,o){l.ending=!0,n(u,l),o&&(l.finished?_.nextTick(o):u.once("finish",o)),l.ended=!0,u.writable=!1}function s(u,l,o){var r=u.entry;for(u.entry=null;r;){var h=r.callback;l.pendingcb--,h(o),r=r.next}l.corkedRequestsFree.next=u}return Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(u){this._writableState&&(this._writableState.destroyed=u)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(u,l){this.end(),l(u)},_stream_writable}var _stream_duplex,hasRequired_stream_duplex;function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var _=requireProcessNextickArgs(),S=Object.keys||function(g){var M=[];for(var x in g)M.push(x);return M};_stream_duplex=v;var I=Object.create(requireUtil());I.inherits=requireInherits_browser();var p=require_stream_readable(),R=require_stream_writable();I.inherits(v,p);for(var f=S(R.prototype),w=0;w<f.length;w++){var m=f[w];v.prototype[m]||(v.prototype[m]=R.prototype[m])}function v(g){if(!(this instanceof v))return new v(g);p.call(this,g),R.call(this,g),g&&g.readable===!1&&(this.readable=!1),g&&g.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,g&&g.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",y)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function y(){this.allowHalfOpen||this._writableState.ended||_.nextTick(d,this)}function d(g){g.end()}return Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=g,this._writableState.destroyed=g)}}),v.prototype._destroy=function(g,M){this.push(null),this.end(),_.nextTick(M,g)},_stream_duplex}var _stream_readable,hasRequired_stream_readable;function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var _=requireProcessNextickArgs();_stream_readable=P;var S=requireIsarray(),I;P.ReadableState=C,requireEvents().EventEmitter;var p=function(q,$){return q.listeners($).length},R=requireStreamBrowser(),f=requireSafeBuffer().Buffer,w=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m(q){return f.from(q)}function v(q){return f.isBuffer(q)||q instanceof w}var y=Object.create(requireUtil());y.inherits=requireInherits_browser();var d=requireUtil$1(),g=void 0;d&&d.debuglog?g=d.debuglog("stream"):g=function(){};var M=requireBufferList(),x=requireDestroy(),B;y.inherits(P,R);var A=["error","close","destroy","pause","resume"];function D(q,$,W){if(typeof q.prependListener=="function")return q.prependListener($,W);!q._events||!q._events[$]?q.on($,W):S(q._events[$])?q._events[$].unshift(W):q._events[$]=[W,q._events[$]]}function C(q,$){I=I||require_stream_duplex(),q=q||{};var W=$ instanceof I;this.objectMode=!!q.objectMode,W&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var J=q.highWaterMark,X=q.readableHighWaterMark,U=this.objectMode?16:16*1024;J||J===0?this.highWaterMark=J:W&&(X||X===0)?this.highWaterMark=X:this.highWaterMark=U,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new M,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(B||(B=requireString_decoder().StringDecoder),this.decoder=new B(q.encoding),this.encoding=q.encoding)}function P(q){if(I=I||require_stream_duplex(),!(this instanceof P))return new P(q);this._readableState=new C(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),R.call(this)}Object.defineProperty(P.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(q){this._readableState&&(this._readableState.destroyed=q)}}),P.prototype.destroy=x.destroy,P.prototype._undestroy=x.undestroy,P.prototype._destroy=function(q,$){this.push(null),$(q)},P.prototype.push=function(q,$){var W=this._readableState,J;return W.objectMode?J=!0:typeof q=="string"&&($=$||W.defaultEncoding,$!==W.encoding&&(q=f.from(q,$),$=""),J=!0),H(this,q,$,!1,J)},P.prototype.unshift=function(q){return H(this,q,null,!0,!1)};function H(q,$,W,J,X){var U=q._readableState;if($===null)U.reading=!1,le(q,U);else{var re;X||(re=V(U,$)),re?q.emit("error",re):U.objectMode||$&&$.length>0?(typeof $!="string"&&!U.objectMode&&Object.getPrototypeOf($)!==f.prototype&&($=m($)),J?U.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):N(q,U,$,!0):U.ended?q.emit("error",new Error("stream.push() after EOF")):(U.reading=!1,U.decoder&&!W?($=U.decoder.write($),U.objectMode||$.length!==0?N(q,U,$,!1):t(q,U)):N(q,U,$,!1))):J||(U.reading=!1)}return Q(U)}function N(q,$,W,J){$.flowing&&$.length===0&&!$.sync?(q.emit("data",W),q.read(0)):($.length+=$.objectMode?1:W.length,J?$.buffer.unshift(W):$.buffer.push(W),$.needReadable&&c(q)),t(q,$)}function V(q,$){var W;return!v($)&&typeof $!="string"&&$!==void 0&&!q.objectMode&&(W=new TypeError("Invalid non-string/buffer chunk")),W}function Q(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(q){return B||(B=requireString_decoder().StringDecoder),this._readableState.decoder=new B(q),this._readableState.encoding=q,this};var ne=8388608;function ae(q){return q>=ne?q=ne:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function ee(q,$){return q<=0||$.length===0&&$.ended?0:$.objectMode?1:q!==q?$.flowing&&$.length?$.buffer.head.data.length:$.length:(q>$.highWaterMark&&($.highWaterMark=ae(q)),q<=$.length?q:$.ended?$.length:($.needReadable=!0,0))}P.prototype.read=function(q){g("read",q),q=parseInt(q,10);var $=this._readableState,W=q;if(q!==0&&($.emittedReadable=!1),q===0&&$.needReadable&&($.length>=$.highWaterMark||$.ended))return g("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?L(this):c(this),null;if(q=ee(q,$),q===0&&$.ended)return $.length===0&&L(this),null;var J=$.needReadable;g("need readable",J),($.length===0||$.length-q<$.highWaterMark)&&(J=!0,g("length less than watermark",J)),$.ended||$.reading?(J=!1,g("reading or ended",J)):J&&(g("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(q=ee(W,$)));var X;return q>0?X=r(q,$):X=null,X===null?($.needReadable=!0,q=0):$.length-=q,$.length===0&&($.ended||($.needReadable=!0),W!==q&&$.ended&&L(this)),X!==null&&this.emit("data",X),X};function le(q,$){if(!$.ended){if($.decoder){var W=$.decoder.end();W&&W.length&&($.buffer.push(W),$.length+=$.objectMode?1:W.length)}$.ended=!0,c(q)}}function c(q){var $=q._readableState;$.needReadable=!1,$.emittedReadable||(g("emitReadable",$.flowing),$.emittedReadable=!0,$.sync?_.nextTick(e,q):e(q))}function e(q){g("emit readable"),q.emit("readable"),o(q)}function t(q,$){$.readingMore||($.readingMore=!0,_.nextTick(n,q,$))}function n(q,$){for(var W=$.length;!$.reading&&!$.flowing&&!$.ended&&$.length<$.highWaterMark&&(g("maybeReadMore read 0"),q.read(0),W!==$.length);)W=$.length;$.readingMore=!1}P.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},P.prototype.pipe=function(q,$){var W=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=q;break;case 1:J.pipes=[J.pipes,q];break;default:J.pipes.push(q);break}J.pipesCount+=1,g("pipe count=%d opts=%j",J.pipesCount,$);var X=(!$||$.end!==!1)&&q!==process$1.stdout&&q!==process$1.stderr,U=X?Ie:Ce;J.endEmitted?_.nextTick(U):W.once("end",U),q.on("unpipe",re);function re(pe,_e){g("onunpipe"),pe===W&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,Pe())}function Ie(){g("onend"),q.end()}var ue=a(W);q.on("drain",ue);var he=!1;function Pe(){g("cleanup"),q.removeListener("close",de),q.removeListener("finish",ye),q.removeListener("drain",ue),q.removeListener("error",De),q.removeListener("unpipe",re),W.removeListener("end",Ie),W.removeListener("end",Ce),W.removeListener("data",se),he=!0,J.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ue()}var me=!1;W.on("data",se);function se(pe){g("ondata"),me=!1;var _e=q.write(pe);_e===!1&&!me&&((J.pipesCount===1&&J.pipes===q||J.pipesCount>1&&K(J.pipes,q)!==-1)&&!he&&(g("false write response, pause",J.awaitDrain),J.awaitDrain++,me=!0),W.pause())}function De(pe){g("onerror",pe),Ce(),q.removeListener("error",De),p(q,"error")===0&&q.emit("error",pe)}D(q,"error",De);function de(){q.removeListener("finish",ye),Ce()}q.once("close",de);function ye(){g("onfinish"),q.removeListener("close",de),Ce()}q.once("finish",ye);function Ce(){g("unpipe"),W.unpipe(q)}return q.emit("pipe",W),J.flowing||(g("pipe resume"),W.resume()),q};function a(q){return function(){var $=q._readableState;g("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&p(q,"data")&&($.flowing=!0,o(q))}}P.prototype.unpipe=function(q){var $=this._readableState,W={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return q&&q!==$.pipes?this:(q||(q=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,q&&q.emit("unpipe",this,W),this);if(!q){var J=$.pipes,X=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var U=0;U<X;U++)J[U].emit("unpipe",this,{hasUnpiped:!1});return this}var re=K($.pipes,q);return re===-1?this:($.pipes.splice(re,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),q.emit("unpipe",this,W),this)},P.prototype.on=function(q,$){var W=R.prototype.on.call(this,q,$);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var J=this._readableState;!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.emittedReadable=!1,J.reading?J.length&&c(this):_.nextTick(s,this))}return W},P.prototype.addListener=P.prototype.on;function s(q){g("readable nexttick read 0"),q.read(0)}P.prototype.resume=function(){var q=this._readableState;return q.flowing||(g("resume"),q.flowing=!0,u(this,q)),this};function u(q,$){$.resumeScheduled||($.resumeScheduled=!0,_.nextTick(l,q,$))}function l(q,$){$.reading||(g("resume read 0"),q.read(0)),$.resumeScheduled=!1,$.awaitDrain=0,q.emit("resume"),o(q),$.flowing&&!$.reading&&q.read(0)}P.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function o(q){var $=q._readableState;for(g("flow",$.flowing);$.flowing&&q.read()!==null;);}P.prototype.wrap=function(q){var $=this,W=this._readableState,J=!1;q.on("end",function(){if(g("wrapped end"),W.decoder&&!W.ended){var re=W.decoder.end();re&&re.length&&$.push(re)}$.push(null)}),q.on("data",function(re){if(g("wrapped data"),W.decoder&&(re=W.decoder.write(re)),!(W.objectMode&&re==null)&&!(!W.objectMode&&(!re||!re.length))){var Ie=$.push(re);Ie||(J=!0,q.pause())}});for(var X in q)this[X]===void 0&&typeof q[X]=="function"&&(this[X]=(function(re){return function(){return q[re].apply(q,arguments)}})(X));for(var U=0;U<A.length;U++)q.on(A[U],this.emit.bind(this,A[U]));return this._read=function(re){g("wrapped _read",re),J&&(J=!1,q.resume())},this},Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),P._fromList=r;function r(q,$){if($.length===0)return null;var W;return $.objectMode?W=$.buffer.shift():!q||q>=$.length?($.decoder?W=$.buffer.join(""):$.buffer.length===1?W=$.buffer.head.data:W=$.buffer.concat($.length),$.buffer.clear()):W=h(q,$.buffer,$.decoder),W}function h(q,$,W){var J;return q<$.head.data.length?(J=$.head.data.slice(0,q),$.head.data=$.head.data.slice(q)):q===$.head.data.length?J=$.shift():J=W?b(q,$):E(q,$),J}function b(q,$){var W=$.head,J=1,X=W.data;for(q-=X.length;W=W.next;){var U=W.data,re=q>U.length?U.length:q;if(re===U.length?X+=U:X+=U.slice(0,q),q-=re,q===0){re===U.length?(++J,W.next?$.head=W.next:$.head=$.tail=null):($.head=W,W.data=U.slice(re));break}++J}return $.length-=J,X}function E(q,$){var W=f.allocUnsafe(q),J=$.head,X=1;for(J.data.copy(W),q-=J.data.length;J=J.next;){var U=J.data,re=q>U.length?U.length:q;if(U.copy(W,W.length-q,0,re),q-=re,q===0){re===U.length?(++X,J.next?$.head=J.next:$.head=$.tail=null):($.head=J,J.data=U.slice(re));break}++X}return $.length-=X,W}function L(q){var $=q._readableState;if($.length>0)throw new Error('"endReadable()" called on non-empty stream');$.endEmitted||($.ended=!0,_.nextTick(Y,$,q))}function Y(q,$){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,$.readable=!1,$.emit("end"))}function K(q,$){for(var W=0,J=q.length;W<J;W++)if(q[W]===$)return W;return-1}return _stream_readable}var _stream_transform,hasRequired_stream_transform;function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=p;var _=require_stream_duplex(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(p,_);function I(w,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(!y)return this.emit("error",new Error("write callback called multiple times"));v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(w);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function p(w){if(!(this instanceof p))return new p(w);_.call(this,w),this._transformState={afterTransform:I.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,w&&(typeof w.transform=="function"&&(this._transform=w.transform),typeof w.flush=="function"&&(this._flush=w.flush)),this.on("prefinish",R)}function R(){var w=this;typeof this._flush=="function"?this._flush(function(m,v){f(w,m,v)}):f(this,null,null)}p.prototype.push=function(w,m){return this._transformState.needTransform=!1,_.prototype.push.call(this,w,m)},p.prototype._transform=function(w,m,v){throw new Error("_transform() is not implemented")},p.prototype._write=function(w,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=w,y.writeencoding=m,!y.transforming){var d=this._readableState;(y.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},p.prototype._read=function(w){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},p.prototype._destroy=function(w,m){var v=this;_.prototype._destroy.call(this,w,function(y){m(y),v.emit("close")})};function f(w,m,v){if(m)return w.emit("error",m);if(v!=null&&w.push(v),w._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(w._transformState.transforming)throw new Error("Calling transform done when still transforming");return w.push(null)}return _stream_transform}var _stream_passthrough,hasRequired_stream_passthrough;function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=I;var _=require_stream_transform(),S=Object.create(requireUtil());S.inherits=requireInherits_browser(),S.inherits(I,_);function I(p){if(!(this instanceof I))return new I(p);_.call(this,p)}return I.prototype._transform=function(p,R,f){f(null,p)},_stream_passthrough}var hasRequiredReadableBrowser;function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,(function(_,S){S=_.exports=require_stream_readable(),S.Stream=S,S.Readable=S,S.Writable=require_stream_writable(),S.Duplex=require_stream_duplex(),S.Transform=require_stream_transform(),S.PassThrough=require_stream_passthrough()})(readableBrowser,readableBrowser.exports)),readableBrowser.exports}var sign={exports:{}},bn$9={exports:{}},bn$8=bn$9.exports,hasRequiredBn$4;function requireBn$4(){return hasRequiredBn$4||(hasRequiredBn$4=1,(function(_){(function(S,I){function p(t,n){if(!t)throw new Error(n||"Assertion failed")}function R(t,n){t.super_=n;var a=function(){};a.prototype=n.prototype,t.prototype=new a,t.prototype.constructor=t}function f(t,n,a){if(f.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,t!==null&&((n==="le"||n==="be")&&(a=n,n=10),this._init(t||0,n||10,a||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(n){return n instanceof f?!0:n!==null&&typeof n=="object"&&n.constructor.wordSize===f.wordSize&&Array.isArray(n.words)},f.max=function(n,a){return n.cmp(a)>0?n:a},f.min=function(n,a){return n.cmp(a)<0?n:a},f.prototype._init=function(n,a,s){if(typeof n=="number")return this._initNumber(n,a,s);if(typeof n=="object")return this._initArray(n,a,s);a==="hex"&&(a=16),p(a===(a|0)&&a>=2&&a<=36),n=n.toString().replace(/\s+/g,"");var u=0;n[0]==="-"&&(u++,this.negative=1),u<n.length&&(a===16?this._parseHex(n,u,s):(this._parseBase(n,a,u),s==="le"&&this._initArray(this.toArray(),a,s)))},f.prototype._initNumber=function(n,a,s){n<0&&(this.negative=1,n=-n),n<67108864?(this.words=[n&67108863],this.length=1):n<4503599627370496?(this.words=[n&67108863,n/67108864&67108863],this.length=2):(p(n<9007199254740992),this.words=[n&67108863,n/67108864&67108863,1],this.length=3),s==="le"&&this._initArray(this.toArray(),a,s)},f.prototype._initArray=function(n,a,s){if(p(typeof n.length=="number"),n.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(n.length/3),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l,o,r=0;if(s==="be")for(u=n.length-1,l=0;u>=0;u-=3)o=n[u]|n[u-1]<<8|n[u-2]<<16,this.words[l]|=o<<r&67108863,this.words[l+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,l++);else if(s==="le")for(u=0,l=0;u<n.length;u+=3)o=n[u]|n[u+1]<<8|n[u+2]<<16,this.words[l]|=o<<r&67108863,this.words[l+1]=o>>>26-r&67108863,r+=24,r>=26&&(r-=26,l++);return this._strip()};function m(t,n){var a=t.charCodeAt(n);if(a>=48&&a<=57)return a-48;if(a>=65&&a<=70)return a-55;if(a>=97&&a<=102)return a-87;p(!1,"Invalid character in "+t)}function v(t,n,a){var s=m(t,a);return a-1>=n&&(s|=m(t,a-1)<<4),s}f.prototype._parseHex=function(n,a,s){this.length=Math.ceil((n.length-a)/6),this.words=new Array(this.length);for(var u=0;u<this.length;u++)this.words[u]=0;var l=0,o=0,r;if(s==="be")for(u=n.length-1;u>=a;u-=2)r=v(n,a,u)<<l,this.words[o]|=r&67108863,l>=18?(l-=18,o+=1,this.words[o]|=r>>>26):l+=8;else{var h=n.length-a;for(u=h%2===0?a+1:a;u<n.length;u+=2)r=v(n,a,u)<<l,this.words[o]|=r&67108863,l>=18?(l-=18,o+=1,this.words[o]|=r>>>26):l+=8}this._strip()};function y(t,n,a,s){for(var u=0,l=0,o=Math.min(t.length,a),r=n;r<o;r++){var h=t.charCodeAt(r)-48;u*=s,h>=49?l=h-49+10:h>=17?l=h-17+10:l=h,p(h>=0&&l<s,"Invalid character"),u+=l}return u}f.prototype._parseBase=function(n,a,s){this.words=[0],this.length=1;for(var u=0,l=1;l<=67108863;l*=a)u++;u--,l=l/a|0;for(var o=n.length-s,r=o%u,h=Math.min(o,o-r)+s,b=0,E=s;E<h;E+=u)b=y(n,E,E+u,a),this.imuln(l),this.words[0]+b<67108864?this.words[0]+=b:this._iaddn(b);if(r!==0){var L=1;for(b=y(n,E,n.length,a),E=0;E<r;E++)L*=a;this.imuln(L),this.words[0]+b<67108864?this.words[0]+=b:this._iaddn(b)}this._strip()},f.prototype.copy=function(n){n.words=new Array(this.length);for(var a=0;a<this.length;a++)n.words[a]=this.words[a];n.length=this.length,n.negative=this.negative,n.red=this.red};function d(t,n){t.words=n.words,t.length=n.length,t.negative=n.negative,t.red=n.red}if(f.prototype._move=function(n){d(n,this)},f.prototype.clone=function(){var n=new f(null);return this.copy(n),n},f.prototype._expand=function(n){for(;this.length<n;)this.words[this.length++]=0;return this},f.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{f.prototype[Symbol.for("nodejs.util.inspect.custom")]=g}catch{f.prototype.inspect=g}else f.prototype.inspect=g;function g(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var M=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],x=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],B=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(n,a){n=n||10,a=a|0||1;var s;if(n===16||n==="hex"){s="";for(var u=0,l=0,o=0;o<this.length;o++){var r=this.words[o],h=((r<<u|l)&16777215).toString(16);l=r>>>24-u&16777215,u+=2,u>=26&&(u-=26,o--),l!==0||o!==this.length-1?s=M[6-h.length]+h+s:s=h+s}for(l!==0&&(s=l.toString(16)+s);s.length%a!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}if(n===(n|0)&&n>=2&&n<=36){var b=x[n],E=B[n];s="";var L=this.clone();for(L.negative=0;!L.isZero();){var Y=L.modrn(E).toString(n);L=L.idivn(E),L.isZero()?s=Y+s:s=M[b-Y.length]+Y+s}for(this.isZero()&&(s="0"+s);s.length%a!==0;)s="0"+s;return this.negative!==0&&(s="-"+s),s}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var n=this.words[0];return this.length===2?n+=this.words[1]*67108864:this.length===3&&this.words[2]===1?n+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-n:n},f.prototype.toJSON=function(){return this.toString(16,2)},w&&(f.prototype.toBuffer=function(n,a){return this.toArrayLike(w,n,a)}),f.prototype.toArray=function(n,a){return this.toArrayLike(Array,n,a)};var A=function(n,a){return n.allocUnsafe?n.allocUnsafe(a):new n(a)};f.prototype.toArrayLike=function(n,a,s){this._strip();var u=this.byteLength(),l=s||Math.max(1,u);p(u<=l,"byte array longer than desired length"),p(l>0,"Requested array length <= 0");var o=A(n,l),r=a==="le"?"LE":"BE";return this["_toArrayLike"+r](o,u),o},f.prototype._toArrayLikeLE=function(n,a){for(var s=0,u=0,l=0,o=0;l<this.length;l++){var r=this.words[l]<<o|u;n[s++]=r&255,s<n.length&&(n[s++]=r>>8&255),s<n.length&&(n[s++]=r>>16&255),o===6?(s<n.length&&(n[s++]=r>>24&255),u=0,o=0):(u=r>>>24,o+=2)}if(s<n.length)for(n[s++]=u;s<n.length;)n[s++]=0},f.prototype._toArrayLikeBE=function(n,a){for(var s=n.length-1,u=0,l=0,o=0;l<this.length;l++){var r=this.words[l]<<o|u;n[s--]=r&255,s>=0&&(n[s--]=r>>8&255),s>=0&&(n[s--]=r>>16&255),o===6?(s>=0&&(n[s--]=r>>24&255),u=0,o=0):(u=r>>>24,o+=2)}if(s>=0)for(n[s--]=u;s>=0;)n[s--]=0},Math.clz32?f.prototype._countBits=function(n){return 32-Math.clz32(n)}:f.prototype._countBits=function(n){var a=n,s=0;return a>=4096&&(s+=13,a>>>=13),a>=64&&(s+=7,a>>>=7),a>=8&&(s+=4,a>>>=4),a>=2&&(s+=2,a>>>=2),s+a},f.prototype._zeroBits=function(n){if(n===0)return 26;var a=n,s=0;return(a&8191)===0&&(s+=13,a>>>=13),(a&127)===0&&(s+=7,a>>>=7),(a&15)===0&&(s+=4,a>>>=4),(a&3)===0&&(s+=2,a>>>=2),(a&1)===0&&s++,s},f.prototype.bitLength=function(){var n=this.words[this.length-1],a=this._countBits(n);return(this.length-1)*26+a};function D(t){for(var n=new Array(t.bitLength()),a=0;a<n.length;a++){var s=a/26|0,u=a%26;n[a]=t.words[s]>>>u&1}return n}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var n=0,a=0;a<this.length;a++){var s=this._zeroBits(this.words[a]);if(n+=s,s!==26)break}return n},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(n){return this.negative!==0?this.abs().inotn(n).iaddn(1):this.clone()},f.prototype.fromTwos=function(n){return this.testn(n-1)?this.notn(n).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(n){for(;this.length<n.length;)this.words[this.length++]=0;for(var a=0;a<n.length;a++)this.words[a]=this.words[a]|n.words[a];return this._strip()},f.prototype.ior=function(n){return p((this.negative|n.negative)===0),this.iuor(n)},f.prototype.or=function(n){return this.length>n.length?this.clone().ior(n):n.clone().ior(this)},f.prototype.uor=function(n){return this.length>n.length?this.clone().iuor(n):n.clone().iuor(this)},f.prototype.iuand=function(n){var a;this.length>n.length?a=n:a=this;for(var s=0;s<a.length;s++)this.words[s]=this.words[s]&n.words[s];return this.length=a.length,this._strip()},f.prototype.iand=function(n){return p((this.negative|n.negative)===0),this.iuand(n)},f.prototype.and=function(n){return this.length>n.length?this.clone().iand(n):n.clone().iand(this)},f.prototype.uand=function(n){return this.length>n.length?this.clone().iuand(n):n.clone().iuand(this)},f.prototype.iuxor=function(n){var a,s;this.length>n.length?(a=this,s=n):(a=n,s=this);for(var u=0;u<s.length;u++)this.words[u]=a.words[u]^s.words[u];if(this!==a)for(;u<a.length;u++)this.words[u]=a.words[u];return this.length=a.length,this._strip()},f.prototype.ixor=function(n){return p((this.negative|n.negative)===0),this.iuxor(n)},f.prototype.xor=function(n){return this.length>n.length?this.clone().ixor(n):n.clone().ixor(this)},f.prototype.uxor=function(n){return this.length>n.length?this.clone().iuxor(n):n.clone().iuxor(this)},f.prototype.inotn=function(n){p(typeof n=="number"&&n>=0);var a=Math.ceil(n/26)|0,s=n%26;this._expand(a),s>0&&a--;for(var u=0;u<a;u++)this.words[u]=~this.words[u]&67108863;return s>0&&(this.words[u]=~this.words[u]&67108863>>26-s),this._strip()},f.prototype.notn=function(n){return this.clone().inotn(n)},f.prototype.setn=function(n,a){p(typeof n=="number"&&n>=0);var s=n/26|0,u=n%26;return this._expand(s+1),a?this.words[s]=this.words[s]|1<<u:this.words[s]=this.words[s]&~(1<<u),this._strip()},f.prototype.iadd=function(n){var a;if(this.negative!==0&&n.negative===0)return this.negative=0,a=this.isub(n),this.negative^=1,this._normSign();if(this.negative===0&&n.negative!==0)return n.negative=0,a=this.isub(n),n.negative=1,a._normSign();var s,u;this.length>n.length?(s=this,u=n):(s=n,u=this);for(var l=0,o=0;o<u.length;o++)a=(s.words[o]|0)+(u.words[o]|0)+l,this.words[o]=a&67108863,l=a>>>26;for(;l!==0&&o<s.length;o++)a=(s.words[o]|0)+l,this.words[o]=a&67108863,l=a>>>26;if(this.length=s.length,l!==0)this.words[this.length]=l,this.length++;else if(s!==this)for(;o<s.length;o++)this.words[o]=s.words[o];return this},f.prototype.add=function(n){var a;return n.negative!==0&&this.negative===0?(n.negative=0,a=this.sub(n),n.negative^=1,a):n.negative===0&&this.negative!==0?(this.negative=0,a=n.sub(this),this.negative=1,a):this.length>n.length?this.clone().iadd(n):n.clone().iadd(this)},f.prototype.isub=function(n){if(n.negative!==0){n.negative=0;var a=this.iadd(n);return n.negative=1,a._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(n),this.negative=1,this._normSign();var s=this.cmp(n);if(s===0)return this.negative=0,this.length=1,this.words[0]=0,this;var u,l;s>0?(u=this,l=n):(u=n,l=this);for(var o=0,r=0;r<l.length;r++)a=(u.words[r]|0)-(l.words[r]|0)+o,o=a>>26,this.words[r]=a&67108863;for(;o!==0&&r<u.length;r++)a=(u.words[r]|0)+o,o=a>>26,this.words[r]=a&67108863;if(o===0&&r<u.length&&u!==this)for(;r<u.length;r++)this.words[r]=u.words[r];return this.length=Math.max(this.length,r),u!==this&&(this.negative=1),this._strip()},f.prototype.sub=function(n){return this.clone().isub(n)};function C(t,n,a){a.negative=n.negative^t.negative;var s=t.length+n.length|0;a.length=s,s=s-1|0;var u=t.words[0]|0,l=n.words[0]|0,o=u*l,r=o&67108863,h=o/67108864|0;a.words[0]=r;for(var b=1;b<s;b++){for(var E=h>>>26,L=h&67108863,Y=Math.min(b,n.length-1),K=Math.max(0,b-t.length+1);K<=Y;K++){var q=b-K|0;u=t.words[q]|0,l=n.words[K]|0,o=u*l+L,E+=o/67108864|0,L=o&67108863}a.words[b]=L|0,h=E|0}return h!==0?a.words[b]=h|0:a.length--,a._strip()}var P=function(n,a,s){var u=n.words,l=a.words,o=s.words,r=0,h,b,E,L=u[0]|0,Y=L&8191,K=L>>>13,q=u[1]|0,$=q&8191,W=q>>>13,J=u[2]|0,X=J&8191,U=J>>>13,re=u[3]|0,Ie=re&8191,ue=re>>>13,he=u[4]|0,Pe=he&8191,me=he>>>13,se=u[5]|0,De=se&8191,de=se>>>13,ye=u[6]|0,Ce=ye&8191,pe=ye>>>13,_e=u[7]|0,Ue=_e&8191,xe=_e>>>13,Ae=u[8]|0,je=Ae&8191,j=Ae>>>13,k=u[9]|0,O=k&8191,G=k>>>13,te=l[0]|0,ce=te&8191,fe=te>>>13,we=l[1]|0,Ne=we&8191,be=we>>>13,Se=l[2]|0,Oe=Se&8191,qe=Se>>>13,ke=l[3]|0,We=ke&8191,Re=ke>>>13,Te=l[4]|0,Ke=Te&8191,z=Te>>>13,T=l[5]|0,F=T&8191,Z=T>>>13,ie=l[6]|0,ve=ie&8191,oe=ie>>>13,Me=l[7]|0,Le=Me&8191,ge=Me>>>13,Be=l[8]|0,Fe=Be&8191,Ee=Be>>>13,$e=l[9]|0,He=$e&8191,ze=$e>>>13;s.negative=n.negative^a.negative,s.length=19,h=Math.imul(Y,ce),b=Math.imul(Y,fe),b=b+Math.imul(K,ce)|0,E=Math.imul(K,fe);var Ge=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,h=Math.imul($,ce),b=Math.imul($,fe),b=b+Math.imul(W,ce)|0,E=Math.imul(W,fe),h=h+Math.imul(Y,Ne)|0,b=b+Math.imul(Y,be)|0,b=b+Math.imul(K,Ne)|0,E=E+Math.imul(K,be)|0;var Ze=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,h=Math.imul(X,ce),b=Math.imul(X,fe),b=b+Math.imul(U,ce)|0,E=Math.imul(U,fe),h=h+Math.imul($,Ne)|0,b=b+Math.imul($,be)|0,b=b+Math.imul(W,Ne)|0,E=E+Math.imul(W,be)|0,h=h+Math.imul(Y,Oe)|0,b=b+Math.imul(Y,qe)|0,b=b+Math.imul(K,Oe)|0,E=E+Math.imul(K,qe)|0;var Ve=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,h=Math.imul(Ie,ce),b=Math.imul(Ie,fe),b=b+Math.imul(ue,ce)|0,E=Math.imul(ue,fe),h=h+Math.imul(X,Ne)|0,b=b+Math.imul(X,be)|0,b=b+Math.imul(U,Ne)|0,E=E+Math.imul(U,be)|0,h=h+Math.imul($,Oe)|0,b=b+Math.imul($,qe)|0,b=b+Math.imul(W,Oe)|0,E=E+Math.imul(W,qe)|0,h=h+Math.imul(Y,We)|0,b=b+Math.imul(Y,Re)|0,b=b+Math.imul(K,We)|0,E=E+Math.imul(K,Re)|0;var Xe=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,h=Math.imul(Pe,ce),b=Math.imul(Pe,fe),b=b+Math.imul(me,ce)|0,E=Math.imul(me,fe),h=h+Math.imul(Ie,Ne)|0,b=b+Math.imul(Ie,be)|0,b=b+Math.imul(ue,Ne)|0,E=E+Math.imul(ue,be)|0,h=h+Math.imul(X,Oe)|0,b=b+Math.imul(X,qe)|0,b=b+Math.imul(U,Oe)|0,E=E+Math.imul(U,qe)|0,h=h+Math.imul($,We)|0,b=b+Math.imul($,Re)|0,b=b+Math.imul(W,We)|0,E=E+Math.imul(W,Re)|0,h=h+Math.imul(Y,Ke)|0,b=b+Math.imul(Y,z)|0,b=b+Math.imul(K,Ke)|0,E=E+Math.imul(K,z)|0;var Je=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Je>>>26)|0,Je&=67108863,h=Math.imul(De,ce),b=Math.imul(De,fe),b=b+Math.imul(de,ce)|0,E=Math.imul(de,fe),h=h+Math.imul(Pe,Ne)|0,b=b+Math.imul(Pe,be)|0,b=b+Math.imul(me,Ne)|0,E=E+Math.imul(me,be)|0,h=h+Math.imul(Ie,Oe)|0,b=b+Math.imul(Ie,qe)|0,b=b+Math.imul(ue,Oe)|0,E=E+Math.imul(ue,qe)|0,h=h+Math.imul(X,We)|0,b=b+Math.imul(X,Re)|0,b=b+Math.imul(U,We)|0,E=E+Math.imul(U,Re)|0,h=h+Math.imul($,Ke)|0,b=b+Math.imul($,z)|0,b=b+Math.imul(W,Ke)|0,E=E+Math.imul(W,z)|0,h=h+Math.imul(Y,F)|0,b=b+Math.imul(Y,Z)|0,b=b+Math.imul(K,F)|0,E=E+Math.imul(K,Z)|0;var Ye=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,h=Math.imul(Ce,ce),b=Math.imul(Ce,fe),b=b+Math.imul(pe,ce)|0,E=Math.imul(pe,fe),h=h+Math.imul(De,Ne)|0,b=b+Math.imul(De,be)|0,b=b+Math.imul(de,Ne)|0,E=E+Math.imul(de,be)|0,h=h+Math.imul(Pe,Oe)|0,b=b+Math.imul(Pe,qe)|0,b=b+Math.imul(me,Oe)|0,E=E+Math.imul(me,qe)|0,h=h+Math.imul(Ie,We)|0,b=b+Math.imul(Ie,Re)|0,b=b+Math.imul(ue,We)|0,E=E+Math.imul(ue,Re)|0,h=h+Math.imul(X,Ke)|0,b=b+Math.imul(X,z)|0,b=b+Math.imul(U,Ke)|0,E=E+Math.imul(U,z)|0,h=h+Math.imul($,F)|0,b=b+Math.imul($,Z)|0,b=b+Math.imul(W,F)|0,E=E+Math.imul(W,Z)|0,h=h+Math.imul(Y,ve)|0,b=b+Math.imul(Y,oe)|0,b=b+Math.imul(K,ve)|0,E=E+Math.imul(K,oe)|0;var Qe=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,h=Math.imul(Ue,ce),b=Math.imul(Ue,fe),b=b+Math.imul(xe,ce)|0,E=Math.imul(xe,fe),h=h+Math.imul(Ce,Ne)|0,b=b+Math.imul(Ce,be)|0,b=b+Math.imul(pe,Ne)|0,E=E+Math.imul(pe,be)|0,h=h+Math.imul(De,Oe)|0,b=b+Math.imul(De,qe)|0,b=b+Math.imul(de,Oe)|0,E=E+Math.imul(de,qe)|0,h=h+Math.imul(Pe,We)|0,b=b+Math.imul(Pe,Re)|0,b=b+Math.imul(me,We)|0,E=E+Math.imul(me,Re)|0,h=h+Math.imul(Ie,Ke)|0,b=b+Math.imul(Ie,z)|0,b=b+Math.imul(ue,Ke)|0,E=E+Math.imul(ue,z)|0,h=h+Math.imul(X,F)|0,b=b+Math.imul(X,Z)|0,b=b+Math.imul(U,F)|0,E=E+Math.imul(U,Z)|0,h=h+Math.imul($,ve)|0,b=b+Math.imul($,oe)|0,b=b+Math.imul(W,ve)|0,E=E+Math.imul(W,oe)|0,h=h+Math.imul(Y,Le)|0,b=b+Math.imul(Y,ge)|0,b=b+Math.imul(K,Le)|0,E=E+Math.imul(K,ge)|0;var er=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(er>>>26)|0,er&=67108863,h=Math.imul(je,ce),b=Math.imul(je,fe),b=b+Math.imul(j,ce)|0,E=Math.imul(j,fe),h=h+Math.imul(Ue,Ne)|0,b=b+Math.imul(Ue,be)|0,b=b+Math.imul(xe,Ne)|0,E=E+Math.imul(xe,be)|0,h=h+Math.imul(Ce,Oe)|0,b=b+Math.imul(Ce,qe)|0,b=b+Math.imul(pe,Oe)|0,E=E+Math.imul(pe,qe)|0,h=h+Math.imul(De,We)|0,b=b+Math.imul(De,Re)|0,b=b+Math.imul(de,We)|0,E=E+Math.imul(de,Re)|0,h=h+Math.imul(Pe,Ke)|0,b=b+Math.imul(Pe,z)|0,b=b+Math.imul(me,Ke)|0,E=E+Math.imul(me,z)|0,h=h+Math.imul(Ie,F)|0,b=b+Math.imul(Ie,Z)|0,b=b+Math.imul(ue,F)|0,E=E+Math.imul(ue,Z)|0,h=h+Math.imul(X,ve)|0,b=b+Math.imul(X,oe)|0,b=b+Math.imul(U,ve)|0,E=E+Math.imul(U,oe)|0,h=h+Math.imul($,Le)|0,b=b+Math.imul($,ge)|0,b=b+Math.imul(W,Le)|0,E=E+Math.imul(W,ge)|0,h=h+Math.imul(Y,Fe)|0,b=b+Math.imul(Y,Ee)|0,b=b+Math.imul(K,Fe)|0,E=E+Math.imul(K,Ee)|0;var rr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(rr>>>26)|0,rr&=67108863,h=Math.imul(O,ce),b=Math.imul(O,fe),b=b+Math.imul(G,ce)|0,E=Math.imul(G,fe),h=h+Math.imul(je,Ne)|0,b=b+Math.imul(je,be)|0,b=b+Math.imul(j,Ne)|0,E=E+Math.imul(j,be)|0,h=h+Math.imul(Ue,Oe)|0,b=b+Math.imul(Ue,qe)|0,b=b+Math.imul(xe,Oe)|0,E=E+Math.imul(xe,qe)|0,h=h+Math.imul(Ce,We)|0,b=b+Math.imul(Ce,Re)|0,b=b+Math.imul(pe,We)|0,E=E+Math.imul(pe,Re)|0,h=h+Math.imul(De,Ke)|0,b=b+Math.imul(De,z)|0,b=b+Math.imul(de,Ke)|0,E=E+Math.imul(de,z)|0,h=h+Math.imul(Pe,F)|0,b=b+Math.imul(Pe,Z)|0,b=b+Math.imul(me,F)|0,E=E+Math.imul(me,Z)|0,h=h+Math.imul(Ie,ve)|0,b=b+Math.imul(Ie,oe)|0,b=b+Math.imul(ue,ve)|0,E=E+Math.imul(ue,oe)|0,h=h+Math.imul(X,Le)|0,b=b+Math.imul(X,ge)|0,b=b+Math.imul(U,Le)|0,E=E+Math.imul(U,ge)|0,h=h+Math.imul($,Fe)|0,b=b+Math.imul($,Ee)|0,b=b+Math.imul(W,Fe)|0,E=E+Math.imul(W,Ee)|0,h=h+Math.imul(Y,He)|0,b=b+Math.imul(Y,ze)|0,b=b+Math.imul(K,He)|0,E=E+Math.imul(K,ze)|0;var tr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(tr>>>26)|0,tr&=67108863,h=Math.imul(O,Ne),b=Math.imul(O,be),b=b+Math.imul(G,Ne)|0,E=Math.imul(G,be),h=h+Math.imul(je,Oe)|0,b=b+Math.imul(je,qe)|0,b=b+Math.imul(j,Oe)|0,E=E+Math.imul(j,qe)|0,h=h+Math.imul(Ue,We)|0,b=b+Math.imul(Ue,Re)|0,b=b+Math.imul(xe,We)|0,E=E+Math.imul(xe,Re)|0,h=h+Math.imul(Ce,Ke)|0,b=b+Math.imul(Ce,z)|0,b=b+Math.imul(pe,Ke)|0,E=E+Math.imul(pe,z)|0,h=h+Math.imul(De,F)|0,b=b+Math.imul(De,Z)|0,b=b+Math.imul(de,F)|0,E=E+Math.imul(de,Z)|0,h=h+Math.imul(Pe,ve)|0,b=b+Math.imul(Pe,oe)|0,b=b+Math.imul(me,ve)|0,E=E+Math.imul(me,oe)|0,h=h+Math.imul(Ie,Le)|0,b=b+Math.imul(Ie,ge)|0,b=b+Math.imul(ue,Le)|0,E=E+Math.imul(ue,ge)|0,h=h+Math.imul(X,Fe)|0,b=b+Math.imul(X,Ee)|0,b=b+Math.imul(U,Fe)|0,E=E+Math.imul(U,Ee)|0,h=h+Math.imul($,He)|0,b=b+Math.imul($,ze)|0,b=b+Math.imul(W,He)|0,E=E+Math.imul(W,ze)|0;var ir=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(ir>>>26)|0,ir&=67108863,h=Math.imul(O,Oe),b=Math.imul(O,qe),b=b+Math.imul(G,Oe)|0,E=Math.imul(G,qe),h=h+Math.imul(je,We)|0,b=b+Math.imul(je,Re)|0,b=b+Math.imul(j,We)|0,E=E+Math.imul(j,Re)|0,h=h+Math.imul(Ue,Ke)|0,b=b+Math.imul(Ue,z)|0,b=b+Math.imul(xe,Ke)|0,E=E+Math.imul(xe,z)|0,h=h+Math.imul(Ce,F)|0,b=b+Math.imul(Ce,Z)|0,b=b+Math.imul(pe,F)|0,E=E+Math.imul(pe,Z)|0,h=h+Math.imul(De,ve)|0,b=b+Math.imul(De,oe)|0,b=b+Math.imul(de,ve)|0,E=E+Math.imul(de,oe)|0,h=h+Math.imul(Pe,Le)|0,b=b+Math.imul(Pe,ge)|0,b=b+Math.imul(me,Le)|0,E=E+Math.imul(me,ge)|0,h=h+Math.imul(Ie,Fe)|0,b=b+Math.imul(Ie,Ee)|0,b=b+Math.imul(ue,Fe)|0,E=E+Math.imul(ue,Ee)|0,h=h+Math.imul(X,He)|0,b=b+Math.imul(X,ze)|0,b=b+Math.imul(U,He)|0,E=E+Math.imul(U,ze)|0;var nr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(nr>>>26)|0,nr&=67108863,h=Math.imul(O,We),b=Math.imul(O,Re),b=b+Math.imul(G,We)|0,E=Math.imul(G,Re),h=h+Math.imul(je,Ke)|0,b=b+Math.imul(je,z)|0,b=b+Math.imul(j,Ke)|0,E=E+Math.imul(j,z)|0,h=h+Math.imul(Ue,F)|0,b=b+Math.imul(Ue,Z)|0,b=b+Math.imul(xe,F)|0,E=E+Math.imul(xe,Z)|0,h=h+Math.imul(Ce,ve)|0,b=b+Math.imul(Ce,oe)|0,b=b+Math.imul(pe,ve)|0,E=E+Math.imul(pe,oe)|0,h=h+Math.imul(De,Le)|0,b=b+Math.imul(De,ge)|0,b=b+Math.imul(de,Le)|0,E=E+Math.imul(de,ge)|0,h=h+Math.imul(Pe,Fe)|0,b=b+Math.imul(Pe,Ee)|0,b=b+Math.imul(me,Fe)|0,E=E+Math.imul(me,Ee)|0,h=h+Math.imul(Ie,He)|0,b=b+Math.imul(Ie,ze)|0,b=b+Math.imul(ue,He)|0,E=E+Math.imul(ue,ze)|0;var ar=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(ar>>>26)|0,ar&=67108863,h=Math.imul(O,Ke),b=Math.imul(O,z),b=b+Math.imul(G,Ke)|0,E=Math.imul(G,z),h=h+Math.imul(je,F)|0,b=b+Math.imul(je,Z)|0,b=b+Math.imul(j,F)|0,E=E+Math.imul(j,Z)|0,h=h+Math.imul(Ue,ve)|0,b=b+Math.imul(Ue,oe)|0,b=b+Math.imul(xe,ve)|0,E=E+Math.imul(xe,oe)|0,h=h+Math.imul(Ce,Le)|0,b=b+Math.imul(Ce,ge)|0,b=b+Math.imul(pe,Le)|0,E=E+Math.imul(pe,ge)|0,h=h+Math.imul(De,Fe)|0,b=b+Math.imul(De,Ee)|0,b=b+Math.imul(de,Fe)|0,E=E+Math.imul(de,Ee)|0,h=h+Math.imul(Pe,He)|0,b=b+Math.imul(Pe,ze)|0,b=b+Math.imul(me,He)|0,E=E+Math.imul(me,ze)|0;var fr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(fr>>>26)|0,fr&=67108863,h=Math.imul(O,F),b=Math.imul(O,Z),b=b+Math.imul(G,F)|0,E=Math.imul(G,Z),h=h+Math.imul(je,ve)|0,b=b+Math.imul(je,oe)|0,b=b+Math.imul(j,ve)|0,E=E+Math.imul(j,oe)|0,h=h+Math.imul(Ue,Le)|0,b=b+Math.imul(Ue,ge)|0,b=b+Math.imul(xe,Le)|0,E=E+Math.imul(xe,ge)|0,h=h+Math.imul(Ce,Fe)|0,b=b+Math.imul(Ce,Ee)|0,b=b+Math.imul(pe,Fe)|0,E=E+Math.imul(pe,Ee)|0,h=h+Math.imul(De,He)|0,b=b+Math.imul(De,ze)|0,b=b+Math.imul(de,He)|0,E=E+Math.imul(de,ze)|0;var or=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(or>>>26)|0,or&=67108863,h=Math.imul(O,ve),b=Math.imul(O,oe),b=b+Math.imul(G,ve)|0,E=Math.imul(G,oe),h=h+Math.imul(je,Le)|0,b=b+Math.imul(je,ge)|0,b=b+Math.imul(j,Le)|0,E=E+Math.imul(j,ge)|0,h=h+Math.imul(Ue,Fe)|0,b=b+Math.imul(Ue,Ee)|0,b=b+Math.imul(xe,Fe)|0,E=E+Math.imul(xe,Ee)|0,h=h+Math.imul(Ce,He)|0,b=b+Math.imul(Ce,ze)|0,b=b+Math.imul(pe,He)|0,E=E+Math.imul(pe,ze)|0;var sr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(sr>>>26)|0,sr&=67108863,h=Math.imul(O,Le),b=Math.imul(O,ge),b=b+Math.imul(G,Le)|0,E=Math.imul(G,ge),h=h+Math.imul(je,Fe)|0,b=b+Math.imul(je,Ee)|0,b=b+Math.imul(j,Fe)|0,E=E+Math.imul(j,Ee)|0,h=h+Math.imul(Ue,He)|0,b=b+Math.imul(Ue,ze)|0,b=b+Math.imul(xe,He)|0,E=E+Math.imul(xe,ze)|0;var hr=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(hr>>>26)|0,hr&=67108863,h=Math.imul(O,Fe),b=Math.imul(O,Ee),b=b+Math.imul(G,Fe)|0,E=Math.imul(G,Ee),h=h+Math.imul(je,He)|0,b=b+Math.imul(je,ze)|0,b=b+Math.imul(j,He)|0,E=E+Math.imul(j,ze)|0;var ur=(r+h|0)+((b&8191)<<13)|0;r=(E+(b>>>13)|0)+(ur>>>26)|0,ur&=67108863,h=Math.imul(O,He),b=Math.imul(O,ze),b=b+Math.imul(G,He)|0,E=Math.imul(G,ze);var lr=(r+h|0)+((b&8191)<<13)|0;return r=(E+(b>>>13)|0)+(lr>>>26)|0,lr&=67108863,o[0]=Ge,o[1]=Ze,o[2]=Ve,o[3]=Xe,o[4]=Je,o[5]=Ye,o[6]=Qe,o[7]=er,o[8]=rr,o[9]=tr,o[10]=ir,o[11]=nr,o[12]=ar,o[13]=fr,o[14]=or,o[15]=sr,o[16]=hr,o[17]=ur,o[18]=lr,r!==0&&(o[19]=r,s.length++),s};Math.imul||(P=C);function H(t,n,a){a.negative=n.negative^t.negative,a.length=t.length+n.length;for(var s=0,u=0,l=0;l<a.length-1;l++){var o=u;u=0;for(var r=s&67108863,h=Math.min(l,n.length-1),b=Math.max(0,l-t.length+1);b<=h;b++){var E=l-b,L=t.words[E]|0,Y=n.words[b]|0,K=L*Y,q=K&67108863;o=o+(K/67108864|0)|0,q=q+r|0,r=q&67108863,o=o+(q>>>26)|0,u+=o>>>26,o&=67108863}a.words[l]=r,s=o,o=u}return s!==0?a.words[l]=s:a.length--,a._strip()}function N(t,n,a){return H(t,n,a)}f.prototype.mulTo=function(n,a){var s,u=this.length+n.length;return this.length===10&&n.length===10?s=P(this,n,a):u<63?s=C(this,n,a):u<1024?s=H(this,n,a):s=N(this,n,a),s},f.prototype.mul=function(n){var a=new f(null);return a.words=new Array(this.length+n.length),this.mulTo(n,a)},f.prototype.mulf=function(n){var a=new f(null);return a.words=new Array(this.length+n.length),N(this,n,a)},f.prototype.imul=function(n){return this.clone().mulTo(n,this)},f.prototype.imuln=function(n){var a=n<0;a&&(n=-n),p(typeof n=="number"),p(n<67108864);for(var s=0,u=0;u<this.length;u++){var l=(this.words[u]|0)*n,o=(l&67108863)+(s&67108863);s>>=26,s+=l/67108864|0,s+=o>>>26,this.words[u]=o&67108863}return s!==0&&(this.words[u]=s,this.length++),this.length=n===0?1:this.length,a?this.ineg():this},f.prototype.muln=function(n){return this.clone().imuln(n)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(n){var a=D(n);if(a.length===0)return new f(1);for(var s=this,u=0;u<a.length&&a[u]===0;u++,s=s.sqr());if(++u<a.length)for(var l=s.sqr();u<a.length;u++,l=l.sqr())a[u]!==0&&(s=s.mul(l));return s},f.prototype.iushln=function(n){p(typeof n=="number"&&n>=0);var a=n%26,s=(n-a)/26,u=67108863>>>26-a<<26-a,l;if(a!==0){var o=0;for(l=0;l<this.length;l++){var r=this.words[l]&u,h=(this.words[l]|0)-r<<a;this.words[l]=h|o,o=r>>>26-a}o&&(this.words[l]=o,this.length++)}if(s!==0){for(l=this.length-1;l>=0;l--)this.words[l+s]=this.words[l];for(l=0;l<s;l++)this.words[l]=0;this.length+=s}return this._strip()},f.prototype.ishln=function(n){return p(this.negative===0),this.iushln(n)},f.prototype.iushrn=function(n,a,s){p(typeof n=="number"&&n>=0);var u;a?u=(a-a%26)/26:u=0;var l=n%26,o=Math.min((n-l)/26,this.length),r=67108863^67108863>>>l<<l,h=s;if(u-=o,u=Math.max(0,u),h){for(var b=0;b<o;b++)h.words[b]=this.words[b];h.length=o}if(o!==0)if(this.length>o)for(this.length-=o,b=0;b<this.length;b++)this.words[b]=this.words[b+o];else this.words[0]=0,this.length=1;var E=0;for(b=this.length-1;b>=0&&(E!==0||b>=u);b--){var L=this.words[b]|0;this.words[b]=E<<26-l|L>>>l,E=L&r}return h&&E!==0&&(h.words[h.length++]=E),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},f.prototype.ishrn=function(n,a,s){return p(this.negative===0),this.iushrn(n,a,s)},f.prototype.shln=function(n){return this.clone().ishln(n)},f.prototype.ushln=function(n){return this.clone().iushln(n)},f.prototype.shrn=function(n){return this.clone().ishrn(n)},f.prototype.ushrn=function(n){return this.clone().iushrn(n)},f.prototype.testn=function(n){p(typeof n=="number"&&n>=0);var a=n%26,s=(n-a)/26,u=1<<a;if(this.length<=s)return!1;var l=this.words[s];return!!(l&u)},f.prototype.imaskn=function(n){p(typeof n=="number"&&n>=0);var a=n%26,s=(n-a)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=s)return this;if(a!==0&&s++,this.length=Math.min(s,this.length),a!==0){var u=67108863^67108863>>>a<<a;this.words[this.length-1]&=u}return this._strip()},f.prototype.maskn=function(n){return this.clone().imaskn(n)},f.prototype.iaddn=function(n){return p(typeof n=="number"),p(n<67108864),n<0?this.isubn(-n):this.negative!==0?this.length===1&&(this.words[0]|0)<=n?(this.words[0]=n-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(n),this.negative=1,this):this._iaddn(n)},f.prototype._iaddn=function(n){this.words[0]+=n;for(var a=0;a<this.length&&this.words[a]>=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},f.prototype.isubn=function(n){if(p(typeof n=="number"),p(n<67108864),n<0)return this.iaddn(-n);if(this.negative!==0)return this.negative=0,this.iaddn(n),this.negative=1,this;if(this.words[0]-=n,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a<this.length&&this.words[a]<0;a++)this.words[a]+=67108864,this.words[a+1]-=1;return this._strip()},f.prototype.addn=function(n){return this.clone().iaddn(n)},f.prototype.subn=function(n){return this.clone().isubn(n)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(n,a,s){var u=n.length+s,l;this._expand(u);var o,r=0;for(l=0;l<n.length;l++){o=(this.words[l+s]|0)+r;var h=(n.words[l]|0)*a;o-=h&67108863,r=(o>>26)-(h/67108864|0),this.words[l+s]=o&67108863}for(;l<this.length-s;l++)o=(this.words[l+s]|0)+r,r=o>>26,this.words[l+s]=o&67108863;if(r===0)return this._strip();for(p(r===-1),r=0,l=0;l<this.length;l++)o=-(this.words[l]|0)+r,r=o>>26,this.words[l]=o&67108863;return this.negative=1,this._strip()},f.prototype._wordDiv=function(n,a){var s=this.length-n.length,u=this.clone(),l=n,o=l.words[l.length-1]|0,r=this._countBits(o);s=26-r,s!==0&&(l=l.ushln(s),u.iushln(s),o=l.words[l.length-1]|0);var h=u.length-l.length,b;if(a!=="mod"){b=new f(null),b.length=h+1,b.words=new Array(b.length);for(var E=0;E<b.length;E++)b.words[E]=0}var L=u.clone()._ishlnsubmul(l,1,h);L.negative===0&&(u=L,b&&(b.words[h]=1));for(var Y=h-1;Y>=0;Y--){var K=(u.words[l.length+Y]|0)*67108864+(u.words[l.length+Y-1]|0);for(K=Math.min(K/o|0,67108863),u._ishlnsubmul(l,K,Y);u.negative!==0;)K--,u.negative=0,u._ishlnsubmul(l,1,Y),u.isZero()||(u.negative^=1);b&&(b.words[Y]=K)}return b&&b._strip(),u._strip(),a!=="div"&&s!==0&&u.iushrn(s),{div:b||null,mod:u}},f.prototype.divmod=function(n,a,s){if(p(!n.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var u,l,o;return this.negative!==0&&n.negative===0?(o=this.neg().divmod(n,a),a!=="mod"&&(u=o.div.neg()),a!=="div"&&(l=o.mod.neg(),s&&l.negative!==0&&l.iadd(n)),{div:u,mod:l}):this.negative===0&&n.negative!==0?(o=this.divmod(n.neg(),a),a!=="mod"&&(u=o.div.neg()),{div:u,mod:o.mod}):(this.negative&n.negative)!==0?(o=this.neg().divmod(n.neg(),a),a!=="div"&&(l=o.mod.neg(),s&&l.negative!==0&&l.isub(n)),{div:o.div,mod:l}):n.length>this.length||this.cmp(n)<0?{div:new f(0),mod:this}:n.length===1?a==="div"?{div:this.divn(n.words[0]),mod:null}:a==="mod"?{div:null,mod:new f(this.modrn(n.words[0]))}:{div:this.divn(n.words[0]),mod:new f(this.modrn(n.words[0]))}:this._wordDiv(n,a)},f.prototype.div=function(n){return this.divmod(n,"div",!1).div},f.prototype.mod=function(n){return this.divmod(n,"mod",!1).mod},f.prototype.umod=function(n){return this.divmod(n,"mod",!0).mod},f.prototype.divRound=function(n){var a=this.divmod(n);if(a.mod.isZero())return a.div;var s=a.div.negative!==0?a.mod.isub(n):a.mod,u=n.ushrn(1),l=n.andln(1),o=s.cmp(u);return o<0||l===1&&o===0?a.div:a.div.negative!==0?a.div.isubn(1):a.div.iaddn(1)},f.prototype.modrn=function(n){var a=n<0;a&&(n=-n),p(n<=67108863);for(var s=(1<<26)%n,u=0,l=this.length-1;l>=0;l--)u=(s*u+(this.words[l]|0))%n;return a?-u:u},f.prototype.modn=function(n){return this.modrn(n)},f.prototype.idivn=function(n){var a=n<0;a&&(n=-n),p(n<=67108863);for(var s=0,u=this.length-1;u>=0;u--){var l=(this.words[u]|0)+s*67108864;this.words[u]=l/n|0,s=l%n}return this._strip(),a?this.ineg():this},f.prototype.divn=function(n){return this.clone().idivn(n)},f.prototype.egcd=function(n){p(n.negative===0),p(!n.isZero());var a=this,s=n.clone();a.negative!==0?a=a.umod(n):a=a.clone();for(var u=new f(1),l=new f(0),o=new f(0),r=new f(1),h=0;a.isEven()&&s.isEven();)a.iushrn(1),s.iushrn(1),++h;for(var b=s.clone(),E=a.clone();!a.isZero();){for(var L=0,Y=1;(a.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(a.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(b),l.isub(E)),u.iushrn(1),l.iushrn(1);for(var K=0,q=1;(s.words[0]&q)===0&&K<26;++K,q<<=1);if(K>0)for(s.iushrn(K);K-- >0;)(o.isOdd()||r.isOdd())&&(o.iadd(b),r.isub(E)),o.iushrn(1),r.iushrn(1);a.cmp(s)>=0?(a.isub(s),u.isub(o),l.isub(r)):(s.isub(a),o.isub(u),r.isub(l))}return{a:o,b:r,gcd:s.iushln(h)}},f.prototype._invmp=function(n){p(n.negative===0),p(!n.isZero());var a=this,s=n.clone();a.negative!==0?a=a.umod(n):a=a.clone();for(var u=new f(1),l=new f(0),o=s.clone();a.cmpn(1)>0&&s.cmpn(1)>0;){for(var r=0,h=1;(a.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(a.iushrn(r);r-- >0;)u.isOdd()&&u.iadd(o),u.iushrn(1);for(var b=0,E=1;(s.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(s.iushrn(b);b-- >0;)l.isOdd()&&l.iadd(o),l.iushrn(1);a.cmp(s)>=0?(a.isub(s),u.isub(l)):(s.isub(a),l.isub(u))}var L;return a.cmpn(1)===0?L=u:L=l,L.cmpn(0)<0&&L.iadd(n),L},f.prototype.gcd=function(n){if(this.isZero())return n.abs();if(n.isZero())return this.abs();var a=this.clone(),s=n.clone();a.negative=0,s.negative=0;for(var u=0;a.isEven()&&s.isEven();u++)a.iushrn(1),s.iushrn(1);do{for(;a.isEven();)a.iushrn(1);for(;s.isEven();)s.iushrn(1);var l=a.cmp(s);if(l<0){var o=a;a=s,s=o}else if(l===0||s.cmpn(1)===0)break;a.isub(s)}while(!0);return s.iushln(u)},f.prototype.invm=function(n){return this.egcd(n).a.umod(n)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(n){return this.words[0]&n},f.prototype.bincn=function(n){p(typeof n=="number");var a=n%26,s=(n-a)/26,u=1<<a;if(this.length<=s)return this._expand(s+1),this.words[s]|=u,this;for(var l=u,o=s;l!==0&&o<this.length;o++){var r=this.words[o]|0;r+=l,l=r>>>26,r&=67108863,this.words[o]=r}return l!==0&&(this.words[o]=l,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(n){var a=n<0;if(this.negative!==0&&!a)return-1;if(this.negative===0&&a)return 1;this._strip();var s;if(this.length>1)s=1;else{a&&(n=-n),p(n<=67108863,"Number is too big");var u=this.words[0]|0;s=u===n?0:u<n?-1:1}return this.negative!==0?-s|0:s},f.prototype.cmp=function(n){if(this.negative!==0&&n.negative===0)return-1;if(this.negative===0&&n.negative!==0)return 1;var a=this.ucmp(n);return this.negative!==0?-a|0:a},f.prototype.ucmp=function(n){if(this.length>n.length)return 1;if(this.length<n.length)return-1;for(var a=0,s=this.length-1;s>=0;s--){var u=this.words[s]|0,l=n.words[s]|0;if(u!==l){u<l?a=-1:u>l&&(a=1);break}}return a},f.prototype.gtn=function(n){return this.cmpn(n)===1},f.prototype.gt=function(n){return this.cmp(n)===1},f.prototype.gten=function(n){return this.cmpn(n)>=0},f.prototype.gte=function(n){return this.cmp(n)>=0},f.prototype.ltn=function(n){return this.cmpn(n)===-1},f.prototype.lt=function(n){return this.cmp(n)===-1},f.prototype.lten=function(n){return this.cmpn(n)<=0},f.prototype.lte=function(n){return this.cmp(n)<=0},f.prototype.eqn=function(n){return this.cmpn(n)===0},f.prototype.eq=function(n){return this.cmp(n)===0},f.red=function(n){return new c(n)},f.prototype.toRed=function(n){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),n.convertTo(this)._forceRed(n)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(n){return this.red=n,this},f.prototype.forceRed=function(n){return p(!this.red,"Already a number in reduction context"),this._forceRed(n)},f.prototype.redAdd=function(n){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,n)},f.prototype.redIAdd=function(n){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,n)},f.prototype.redSub=function(n){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,n)},f.prototype.redISub=function(n){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,n)},f.prototype.redShl=function(n){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,n)},f.prototype.redMul=function(n){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.mul(this,n)},f.prototype.redIMul=function(n){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.imul(this,n)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(n){return p(this.red&&!n.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,n)};var V={k256:null,p224:null,p192:null,p25519:null};function Q(t,n){this.name=t,this.p=new f(n,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Q.prototype._tmp=function(){var n=new f(null);return n.words=new Array(Math.ceil(this.n/13)),n},Q.prototype.ireduce=function(n){var a=n,s;do this.split(a,this.tmp),a=this.imulK(a),a=a.iadd(this.tmp),s=a.bitLength();while(s>this.n);var u=s<this.n?-1:a.ucmp(this.p);return u===0?(a.words[0]=0,a.length=1):u>0?a.isub(this.p):a.strip!==void 0?a.strip():a._strip(),a},Q.prototype.split=function(n,a){n.iushrn(this.n,0,a)},Q.prototype.imulK=function(n){return n.imul(this.k)};function ne(){Q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(ne,Q),ne.prototype.split=function(n,a){for(var s=4194303,u=Math.min(n.length,9),l=0;l<u;l++)a.words[l]=n.words[l];if(a.length=u,n.length<=9){n.words[0]=0,n.length=1;return}var o=n.words[9];for(a.words[a.length++]=o&s,l=10;l<n.length;l++){var r=n.words[l]|0;n.words[l-10]=(r&s)<<4|o>>>22,o=r}o>>>=22,n.words[l-10]=o,o===0&&n.length>10?n.length-=10:n.length-=9},ne.prototype.imulK=function(n){n.words[n.length]=0,n.words[n.length+1]=0,n.length+=2;for(var a=0,s=0;s<n.length;s++){var u=n.words[s]|0;a+=u*977,n.words[s]=a&67108863,a=u*64+(a/67108864|0)}return n.words[n.length-1]===0&&(n.length--,n.words[n.length-1]===0&&n.length--),n};function ae(){Q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(ae,Q);function ee(){Q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ee,Q);function le(){Q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(le,Q),le.prototype.imulK=function(n){for(var a=0,s=0;s<n.length;s++){var u=(n.words[s]|0)*19+a,l=u&67108863;u>>>=26,n.words[s]=l,a=u}return a!==0&&(n.words[n.length++]=a),n},f._prime=function(n){if(V[n])return V[n];var a;if(n==="k256")a=new ne;else if(n==="p224")a=new ae;else if(n==="p192")a=new ee;else if(n==="p25519")a=new le;else throw new Error("Unknown prime "+n);return V[n]=a,a};function c(t){if(typeof t=="string"){var n=f._prime(t);this.m=n.p,this.prime=n}else p(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}c.prototype._verify1=function(n){p(n.negative===0,"red works only with positives"),p(n.red,"red works only with red numbers")},c.prototype._verify2=function(n,a){p((n.negative|a.negative)===0,"red works only with positives"),p(n.red&&n.red===a.red,"red works only with red numbers")},c.prototype.imod=function(n){return this.prime?this.prime.ireduce(n)._forceRed(this):(d(n,n.umod(this.m)._forceRed(this)),n)},c.prototype.neg=function(n){return n.isZero()?n.clone():this.m.sub(n)._forceRed(this)},c.prototype.add=function(n,a){this._verify2(n,a);var s=n.add(a);return s.cmp(this.m)>=0&&s.isub(this.m),s._forceRed(this)},c.prototype.iadd=function(n,a){this._verify2(n,a);var s=n.iadd(a);return s.cmp(this.m)>=0&&s.isub(this.m),s},c.prototype.sub=function(n,a){this._verify2(n,a);var s=n.sub(a);return s.cmpn(0)<0&&s.iadd(this.m),s._forceRed(this)},c.prototype.isub=function(n,a){this._verify2(n,a);var s=n.isub(a);return s.cmpn(0)<0&&s.iadd(this.m),s},c.prototype.shl=function(n,a){return this._verify1(n),this.imod(n.ushln(a))},c.prototype.imul=function(n,a){return this._verify2(n,a),this.imod(n.imul(a))},c.prototype.mul=function(n,a){return this._verify2(n,a),this.imod(n.mul(a))},c.prototype.isqr=function(n){return this.imul(n,n.clone())},c.prototype.sqr=function(n){return this.mul(n,n)},c.prototype.sqrt=function(n){if(n.isZero())return n.clone();var a=this.m.andln(3);if(p(a%2===1),a===3){var s=this.m.add(new f(1)).iushrn(2);return this.pow(n,s)}for(var u=this.m.subn(1),l=0;!u.isZero()&&u.andln(1)===0;)l++,u.iushrn(1);p(!u.isZero());var o=new f(1).toRed(this),r=o.redNeg(),h=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new f(2*b*b).toRed(this);this.pow(b,h).cmp(r)!==0;)b.redIAdd(r);for(var E=this.pow(b,u),L=this.pow(n,u.addn(1).iushrn(1)),Y=this.pow(n,u),K=l;Y.cmp(o)!==0;){for(var q=Y,$=0;q.cmp(o)!==0;$++)q=q.redSqr();p($<K);var W=this.pow(E,new f(1).iushln(K-$-1));L=L.redMul(W),E=W.redSqr(),Y=Y.redMul(E),K=$}return L},c.prototype.invm=function(n){var a=n._invmp(this.m);return a.negative!==0?(a.negative=0,this.imod(a).redNeg()):this.imod(a)},c.prototype.pow=function(n,a){if(a.isZero())return new f(1).toRed(this);if(a.cmpn(1)===0)return n.clone();var s=4,u=new Array(1<<s);u[0]=new f(1).toRed(this),u[1]=n;for(var l=2;l<u.length;l++)u[l]=this.mul(u[l-1],n);var o=u[0],r=0,h=0,b=a.bitLength()%26;for(b===0&&(b=26),l=a.length-1;l>=0;l--){for(var E=a.words[l],L=b-1;L>=0;L--){var Y=E>>L&1;if(o!==u[0]&&(o=this.sqr(o)),Y===0&&r===0){h=0;continue}r<<=1,r|=Y,h++,!(h!==s&&(l!==0||L!==0))&&(o=this.mul(o,u[r]),h=0,r=0)}b=26}return o},c.prototype.convertTo=function(n){var a=n.umod(this.m);return a===n?a.clone():a},c.prototype.convertFrom=function(n){var a=n.clone();return a.red=null,a},f.mont=function(n){return new e(n)};function e(t){c.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(e,c),e.prototype.convertTo=function(n){return this.imod(n.ushln(this.shift))},e.prototype.convertFrom=function(n){var a=this.imod(n.mul(this.rinv));return a.red=null,a},e.prototype.imul=function(n,a){if(n.isZero()||a.isZero())return n.words[0]=0,n.length=1,n;var s=n.imul(a),u=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=s.isub(u).iushrn(this.shift),o=l;return l.cmp(this.m)>=0?o=l.isub(this.m):l.cmpn(0)<0&&(o=l.iadd(this.m)),o._forceRed(this)},e.prototype.mul=function(n,a){if(n.isZero()||a.isZero())return new f(0)._forceRed(this);var s=n.mul(a),u=s.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=s.isub(u).iushrn(this.shift),o=l;return l.cmp(this.m)>=0?o=l.isub(this.m):l.cmpn(0)<0&&(o=l.iadd(this.m)),o._forceRed(this)},e.prototype.invm=function(n){var a=this.imod(n._invmp(this.m).mul(this.r2));return a._forceRed(this)}})(_,bn$8)})(bn$9)),bn$9.exports}var browserifyRsa,hasRequiredBrowserifyRsa;function requireBrowserifyRsa(){if(hasRequiredBrowserifyRsa)return browserifyRsa;hasRequiredBrowserifyRsa=1;var _=requireBn$4(),S=requireBrowser$b(),I=requireSafeBuffer$2().Buffer;function p(w){var m=w.modulus.byteLength(),v;do v=new _(S(m));while(v.cmp(w.modulus)>=0||!v.umod(w.prime1)||!v.umod(w.prime2));return v}function R(w){var m=p(w),v=m.toRed(_.mont(w.modulus)).redPow(new _(w.publicExponent)).fromRed();return{blinder:v,unblinder:m.invm(w.modulus)}}function f(w,m){var v=R(m),y=m.modulus.byteLength(),d=new _(w).mul(v.blinder).umod(m.modulus),g=d.toRed(_.mont(m.prime1)),M=d.toRed(_.mont(m.prime2)),x=m.coefficient,B=m.prime1,A=m.prime2,D=g.redPow(m.exponent1).fromRed(),C=M.redPow(m.exponent2).fromRed(),P=D.isub(C).imul(x).umod(B).imul(A);return C.iadd(P).imul(v.unblinder).umod(m.modulus).toArrayLike(I,"be",y)}return f.getr=p,browserifyRsa=f,browserifyRsa}var elliptic={};const version="6.6.1",require$$0={version};var utils$2={},bn$7={exports:{}},bn$6=bn$7.exports,hasRequiredBn$3;function requireBn$3(){return hasRequiredBn$3||(hasRequiredBn$3=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,$=a[2]|0,W=$&8191,J=$>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,Pe=a[5]|0,me=Pe&8191,se=Pe>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,$e=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,$e)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,$e)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,$e)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,$e)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,$e)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,$e)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,$e)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,$e)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,$e)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,$e)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,$e)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,$e)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,$e)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,$e)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,$e)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,$e),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,$e);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new P;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function P(c,e){this.x=c,this.y=e}P.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},P.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},P.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},P.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],$=n[b+Y+l],W=a[b+Y+l],J=E*$-L*W;W=E*W+L*$,$=J,n[b+Y]=K+$,a[b+Y]=q+W,n[b+Y+l]=K-$,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},P.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},P.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},P.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},P.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},P.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},P.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$6)})(bn$7)),bn$7.exports}var utils$1={},hasRequiredUtils$2;function requireUtils$2(){return hasRequiredUtils$2||(hasRequiredUtils$2=1,(function(_){var S=_;function I(f,w){if(Array.isArray(f))return f.slice();if(!f)return[];var m=[];if(typeof f!="string"){for(var v=0;v<f.length;v++)m[v]=f[v]|0;return m}if(w==="hex"){f=f.replace(/[^a-z0-9]+/ig,""),f.length%2!==0&&(f="0"+f);for(var v=0;v<f.length;v+=2)m.push(parseInt(f[v]+f[v+1],16))}else for(var v=0;v<f.length;v++){var y=f.charCodeAt(v),d=y>>8,g=y&255;d?m.push(d,g):m.push(g)}return m}S.toArray=I;function p(f){return f.length===1?"0"+f:f}S.zero2=p;function R(f){for(var w="",m=0;m<f.length;m++)w+=p(f[m].toString(16));return w}S.toHex=R,S.encode=function(w,m){return m==="hex"?R(w):w}})(utils$1)),utils$1}var hasRequiredUtils$1;function requireUtils$1(){return hasRequiredUtils$1||(hasRequiredUtils$1=1,(function(_){var S=_,I=requireBn$3(),p=requireMinimalisticAssert(),R=requireUtils$2();S.assert=p,S.toArray=R.toArray,S.zero2=R.zero2,S.toHex=R.toHex,S.encode=R.encode;function f(d,g,M){var x=new Array(Math.max(d.bitLength(),M)+1),B;for(B=0;B<x.length;B+=1)x[B]=0;var A=1<<g+1,D=d.clone();for(B=0;B<x.length;B++){var C,P=D.andln(A-1);D.isOdd()?(P>(A>>1)-1?C=(A>>1)-P:C=P,D.isubn(C)):C=0,x[B]=C,D.iushrn(1)}return x}S.getNAF=f;function w(d,g){var M=[[],[]];d=d.clone(),g=g.clone();for(var x=0,B=0,A;d.cmpn(-x)>0||g.cmpn(-B)>0;){var D=d.andln(3)+x&3,C=g.andln(3)+B&3;D===3&&(D=-1),C===3&&(C=-1);var P;(D&1)===0?P=0:(A=d.andln(7)+x&7,(A===3||A===5)&&C===2?P=-D:P=D),M[0].push(P);var H;(C&1)===0?H=0:(A=g.andln(7)+B&7,(A===3||A===5)&&D===2?H=-C:H=C),M[1].push(H),2*x===P+1&&(x=1-x),2*B===H+1&&(B=1-B),d.iushrn(1),g.iushrn(1)}return M}S.getJSF=w;function m(d,g,M){var x="_"+g;d.prototype[g]=function(){return this[x]!==void 0?this[x]:this[x]=M.call(this)}}S.cachedProperty=m;function v(d){return typeof d=="string"?S.toArray(d,"hex"):d}S.parseBytes=v;function y(d){return new I(d,"hex","le")}S.intFromLE=y})(utils$2)),utils$2}var curve={},base$1,hasRequiredBase$1;function requireBase$1(){if(hasRequiredBase$1)return base$1;hasRequiredBase$1=1;var _=requireBn$3(),S=requireUtils$1(),I=S.getNAF,p=S.getJSF,R=S.assert;function f(m,v){this.type=m,this.p=new _(v.p,16),this.red=v.prime?_.red(v.prime):_.mont(this.p),this.zero=new _(0).toRed(this.red),this.one=new _(1).toRed(this.red),this.two=new _(2).toRed(this.red),this.n=v.n&&new _(v.n,16),this.g=v.g&&this.pointFromJSON(v.g,v.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var y=this.n&&this.p.div(this.n);!y||y.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}base$1=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(v,y){R(v.precomputed);var d=v._getDoubles(),g=I(y,1,this._bitLength),M=(1<<d.step+1)-(d.step%2===0?2:1);M/=3;var x=[],B,A;for(B=0;B<g.length;B+=d.step){A=0;for(var D=B+d.step-1;D>=B;D--)A=(A<<1)+g[D];x.push(A)}for(var C=this.jpoint(null,null,null),P=this.jpoint(null,null,null),H=M;H>0;H--){for(B=0;B<x.length;B++)A=x[B],A===H?P=P.mixedAdd(d.points[B]):A===-H&&(P=P.mixedAdd(d.points[B].neg()));C=C.add(P)}return C.toP()},f.prototype._wnafMul=function(v,y){var d=4,g=v._getNAFPoints(d);d=g.wnd;for(var M=g.points,x=I(y,d,this._bitLength),B=this.jpoint(null,null,null),A=x.length-1;A>=0;A--){for(var D=0;A>=0&&x[A]===0;A--)D++;if(A>=0&&D++,B=B.dblp(D),A<0)break;var C=x[A];R(C!==0),v.type==="affine"?C>0?B=B.mixedAdd(M[C-1>>1]):B=B.mixedAdd(M[-C-1>>1].neg()):C>0?B=B.add(M[C-1>>1]):B=B.add(M[-C-1>>1].neg())}return v.type==="affine"?B.toP():B},f.prototype._wnafMulAdd=function(v,y,d,g,M){var x=this._wnafT1,B=this._wnafT2,A=this._wnafT3,D=0,C,P,H;for(C=0;C<g;C++){H=y[C];var N=H._getNAFPoints(v);x[C]=N.wnd,B[C]=N.points}for(C=g-1;C>=1;C-=2){var V=C-1,Q=C;if(x[V]!==1||x[Q]!==1){A[V]=I(d[V],x[V],this._bitLength),A[Q]=I(d[Q],x[Q],this._bitLength),D=Math.max(A[V].length,D),D=Math.max(A[Q].length,D);continue}var ne=[y[V],null,null,y[Q]];y[V].y.cmp(y[Q].y)===0?(ne[1]=y[V].add(y[Q]),ne[2]=y[V].toJ().mixedAdd(y[Q].neg())):y[V].y.cmp(y[Q].y.redNeg())===0?(ne[1]=y[V].toJ().mixedAdd(y[Q]),ne[2]=y[V].add(y[Q].neg())):(ne[1]=y[V].toJ().mixedAdd(y[Q]),ne[2]=y[V].toJ().mixedAdd(y[Q].neg()));var ae=[-3,-1,-5,-7,0,7,5,1,3],ee=p(d[V],d[Q]);for(D=Math.max(ee[0].length,D),A[V]=new Array(D),A[Q]=new Array(D),P=0;P<D;P++){var le=ee[0][P]|0,c=ee[1][P]|0;A[V][P]=ae[(le+1)*3+(c+1)],A[Q][P]=0,B[V]=ne}}var e=this.jpoint(null,null,null),t=this._wnafT4;for(C=D;C>=0;C--){for(var n=0;C>=0;){var a=!0;for(P=0;P<g;P++)t[P]=A[P][C]|0,t[P]!==0&&(a=!1);if(!a)break;n++,C--}if(C>=0&&n++,e=e.dblp(n),C<0)break;for(P=0;P<g;P++){var s=t[P];s!==0&&(s>0?H=B[P][s-1>>1]:s<0&&(H=B[P][-s-1>>1].neg()),H.type==="affine"?e=e.mixedAdd(H):e=e.add(H))}}for(C=0;C<g;C++)B[C]=null;return M?e:e.toP()};function w(m,v){this.curve=m,this.type=v,this.precomputed=null}return f.BasePoint=w,w.prototype.eq=function(){throw new Error("Not implemented")},w.prototype.validate=function(){return this.curve.validate(this)},f.prototype.decodePoint=function(v,y){v=S.toArray(v,y);var d=this.p.byteLength();if((v[0]===4||v[0]===6||v[0]===7)&&v.length-1===2*d){v[0]===6?R(v[v.length-1]%2===0):v[0]===7&&R(v[v.length-1]%2===1);var g=this.point(v.slice(1,1+d),v.slice(1+d,1+2*d));return g}else if((v[0]===2||v[0]===3)&&v.length-1===d)return this.pointFromX(v.slice(1,1+d),v[0]===3);throw new Error("Unknown point format")},w.prototype.encodeCompressed=function(v){return this.encode(v,!0)},w.prototype._encode=function(v){var y=this.curve.p.byteLength(),d=this.getX().toArray("be",y);return v?[this.getY().isEven()?2:3].concat(d):[4].concat(d,this.getY().toArray("be",y))},w.prototype.encode=function(v,y){return S.encode(this._encode(y),v)},w.prototype.precompute=function(v){if(this.precomputed)return this;var y={doubles:null,naf:null,beta:null};return y.naf=this._getNAFPoints(8),y.doubles=this._getDoubles(4,v),y.beta=this._getBeta(),this.precomputed=y,this},w.prototype._hasDoubles=function(v){if(!this.precomputed)return!1;var y=this.precomputed.doubles;return y?y.points.length>=Math.ceil((v.bitLength()+1)/y.step):!1},w.prototype._getDoubles=function(v,y){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var d=[this],g=this,M=0;M<y;M+=v){for(var x=0;x<v;x++)g=g.dbl();d.push(g)}return{step:v,points:d}},w.prototype._getNAFPoints=function(v){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var y=[this],d=(1<<v)-1,g=d===1?null:this.dbl(),M=1;M<d;M++)y[M]=y[M-1].add(g);return{wnd:v,points:y}},w.prototype._getBeta=function(){return null},w.prototype.dblp=function(v){for(var y=this,d=0;d<v;d++)y=y.dbl();return y},base$1}var short,hasRequiredShort;function requireShort(){if(hasRequiredShort)return short;hasRequiredShort=1;var _=requireUtils$1(),S=requireBn$3(),I=requireInherits_browser(),p=requireBase$1(),R=_.assert;function f(v){p.call(this,"short",v),this.a=new S(v.a,16).toRed(this.red),this.b=new S(v.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(v),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}I(f,p),short=f,f.prototype._getEndomorphism=function(y){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var d,g;if(y.beta)d=new S(y.beta,16).toRed(this.red);else{var M=this._getEndoRoots(this.p);d=M[0].cmp(M[1])<0?M[0]:M[1],d=d.toRed(this.red)}if(y.lambda)g=new S(y.lambda,16);else{var x=this._getEndoRoots(this.n);this.g.mul(x[0]).x.cmp(this.g.x.redMul(d))===0?g=x[0]:(g=x[1],R(this.g.mul(g).x.cmp(this.g.x.redMul(d))===0))}var B;return y.basis?B=y.basis.map(function(A){return{a:new S(A.a,16),b:new S(A.b,16)}}):B=this._getEndoBasis(g),{beta:d,lambda:g,basis:B}}},f.prototype._getEndoRoots=function(y){var d=y===this.p?this.red:S.mont(y),g=new S(2).toRed(d).redInvm(),M=g.redNeg(),x=new S(3).toRed(d).redNeg().redSqrt().redMul(g),B=M.redAdd(x).fromRed(),A=M.redSub(x).fromRed();return[B,A]},f.prototype._getEndoBasis=function(y){for(var d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),g=y,M=this.n.clone(),x=new S(1),B=new S(0),A=new S(0),D=new S(1),C,P,H,N,V,Q,ne,ae=0,ee,le;g.cmpn(0)!==0;){var c=M.div(g);ee=M.sub(c.mul(g)),le=A.sub(c.mul(x));var e=D.sub(c.mul(B));if(!H&&ee.cmp(d)<0)C=ne.neg(),P=x,H=ee.neg(),N=le;else if(H&&++ae===2)break;ne=ee,M=g,g=ee,A=x,x=le,D=B,B=e}V=ee.neg(),Q=le;var t=H.sqr().add(N.sqr()),n=V.sqr().add(Q.sqr());return n.cmp(t)>=0&&(V=C,Q=P),H.negative&&(H=H.neg(),N=N.neg()),V.negative&&(V=V.neg(),Q=Q.neg()),[{a:H,b:N},{a:V,b:Q}]},f.prototype._endoSplit=function(y){var d=this.endo.basis,g=d[0],M=d[1],x=M.b.mul(y).divRound(this.n),B=g.b.neg().mul(y).divRound(this.n),A=x.mul(g.a),D=B.mul(M.a),C=x.mul(g.b),P=B.mul(M.b),H=y.sub(A).sub(D),N=C.add(P).neg();return{k1:H,k2:N}},f.prototype.pointFromX=function(y,d){y=new S(y,16),y.red||(y=y.toRed(this.red));var g=y.redSqr().redMul(y).redIAdd(y.redMul(this.a)).redIAdd(this.b),M=g.redSqrt();if(M.redSqr().redSub(g).cmp(this.zero)!==0)throw new Error("invalid point");var x=M.fromRed().isOdd();return(d&&!x||!d&&x)&&(M=M.redNeg()),this.point(y,M)},f.prototype.validate=function(y){if(y.inf)return!0;var d=y.x,g=y.y,M=this.a.redMul(d),x=d.redSqr().redMul(d).redIAdd(M).redIAdd(this.b);return g.redSqr().redISub(x).cmpn(0)===0},f.prototype._endoWnafMulAdd=function(y,d,g){for(var M=this._endoWnafT1,x=this._endoWnafT2,B=0;B<y.length;B++){var A=this._endoSplit(d[B]),D=y[B],C=D._getBeta();A.k1.negative&&(A.k1.ineg(),D=D.neg(!0)),A.k2.negative&&(A.k2.ineg(),C=C.neg(!0)),M[B*2]=D,M[B*2+1]=C,x[B*2]=A.k1,x[B*2+1]=A.k2}for(var P=this._wnafMulAdd(1,M,x,B*2,g),H=0;H<B*2;H++)M[H]=null,x[H]=null;return P};function w(v,y,d,g){p.BasePoint.call(this,v,"affine"),y===null&&d===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new S(y,16),this.y=new S(d,16),g&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}I(w,p.BasePoint),f.prototype.point=function(y,d,g){return new w(this,y,d,g)},f.prototype.pointFromJSON=function(y,d){return w.fromJSON(this,y,d)},w.prototype._getBeta=function(){if(this.curve.endo){var y=this.precomputed;if(y&&y.beta)return y.beta;var d=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(y){var g=this.curve,M=function(x){return g.point(x.x.redMul(g.endo.beta),x.y)};y.beta=d,d.precomputed={beta:null,naf:y.naf&&{wnd:y.naf.wnd,points:y.naf.points.map(M)},doubles:y.doubles&&{step:y.doubles.step,points:y.doubles.points.map(M)}}}return d}},w.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},w.fromJSON=function(y,d,g){typeof d=="string"&&(d=JSON.parse(d));var M=y.point(d[0],d[1],g);if(!d[2])return M;function x(A){return y.point(A[0],A[1],g)}var B=d[2];return M.precomputed={beta:null,doubles:B.doubles&&{step:B.doubles.step,points:[M].concat(B.doubles.points.map(x))},naf:B.naf&&{wnd:B.naf.wnd,points:[M].concat(B.naf.points.map(x))}},M},w.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},w.prototype.isInfinity=function(){return this.inf},w.prototype.add=function(y){if(this.inf)return y;if(y.inf)return this;if(this.eq(y))return this.dbl();if(this.neg().eq(y))return this.curve.point(null,null);if(this.x.cmp(y.x)===0)return this.curve.point(null,null);var d=this.y.redSub(y.y);d.cmpn(0)!==0&&(d=d.redMul(this.x.redSub(y.x).redInvm()));var g=d.redSqr().redISub(this.x).redISub(y.x),M=d.redMul(this.x.redSub(g)).redISub(this.y);return this.curve.point(g,M)},w.prototype.dbl=function(){if(this.inf)return this;var y=this.y.redAdd(this.y);if(y.cmpn(0)===0)return this.curve.point(null,null);var d=this.curve.a,g=this.x.redSqr(),M=y.redInvm(),x=g.redAdd(g).redIAdd(g).redIAdd(d).redMul(M),B=x.redSqr().redISub(this.x.redAdd(this.x)),A=x.redMul(this.x.redSub(B)).redISub(this.y);return this.curve.point(B,A)},w.prototype.getX=function(){return this.x.fromRed()},w.prototype.getY=function(){return this.y.fromRed()},w.prototype.mul=function(y){return y=new S(y,16),this.isInfinity()?this:this._hasDoubles(y)?this.curve._fixedNafMul(this,y):this.curve.endo?this.curve._endoWnafMulAdd([this],[y]):this.curve._wnafMul(this,y)},w.prototype.mulAdd=function(y,d,g){var M=[this,d],x=[y,g];return this.curve.endo?this.curve._endoWnafMulAdd(M,x):this.curve._wnafMulAdd(1,M,x,2)},w.prototype.jmulAdd=function(y,d,g){var M=[this,d],x=[y,g];return this.curve.endo?this.curve._endoWnafMulAdd(M,x,!0):this.curve._wnafMulAdd(1,M,x,2,!0)},w.prototype.eq=function(y){return this===y||this.inf===y.inf&&(this.inf||this.x.cmp(y.x)===0&&this.y.cmp(y.y)===0)},w.prototype.neg=function(y){if(this.inf)return this;var d=this.curve.point(this.x,this.y.redNeg());if(y&&this.precomputed){var g=this.precomputed,M=function(x){return x.neg()};d.precomputed={naf:g.naf&&{wnd:g.naf.wnd,points:g.naf.points.map(M)},doubles:g.doubles&&{step:g.doubles.step,points:g.doubles.points.map(M)}}}return d},w.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var y=this.curve.jpoint(this.x,this.y,this.curve.one);return y};function m(v,y,d,g){p.BasePoint.call(this,v,"jacobian"),y===null&&d===null&&g===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new S(0)):(this.x=new S(y,16),this.y=new S(d,16),this.z=new S(g,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return I(m,p.BasePoint),f.prototype.jpoint=function(y,d,g){return new m(this,y,d,g)},m.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var y=this.z.redInvm(),d=y.redSqr(),g=this.x.redMul(d),M=this.y.redMul(d).redMul(y);return this.curve.point(g,M)},m.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},m.prototype.add=function(y){if(this.isInfinity())return y;if(y.isInfinity())return this;var d=y.z.redSqr(),g=this.z.redSqr(),M=this.x.redMul(d),x=y.x.redMul(g),B=this.y.redMul(d.redMul(y.z)),A=y.y.redMul(g.redMul(this.z)),D=M.redSub(x),C=B.redSub(A);if(D.cmpn(0)===0)return C.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var P=D.redSqr(),H=P.redMul(D),N=M.redMul(P),V=C.redSqr().redIAdd(H).redISub(N).redISub(N),Q=C.redMul(N.redISub(V)).redISub(B.redMul(H)),ne=this.z.redMul(y.z).redMul(D);return this.curve.jpoint(V,Q,ne)},m.prototype.mixedAdd=function(y){if(this.isInfinity())return y.toJ();if(y.isInfinity())return this;var d=this.z.redSqr(),g=this.x,M=y.x.redMul(d),x=this.y,B=y.y.redMul(d).redMul(this.z),A=g.redSub(M),D=x.redSub(B);if(A.cmpn(0)===0)return D.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var C=A.redSqr(),P=C.redMul(A),H=g.redMul(C),N=D.redSqr().redIAdd(P).redISub(H).redISub(H),V=D.redMul(H.redISub(N)).redISub(x.redMul(P)),Q=this.z.redMul(A);return this.curve.jpoint(N,V,Q)},m.prototype.dblp=function(y){if(y===0)return this;if(this.isInfinity())return this;if(!y)return this.dbl();var d;if(this.curve.zeroA||this.curve.threeA){var g=this;for(d=0;d<y;d++)g=g.dbl();return g}var M=this.curve.a,x=this.curve.tinv,B=this.x,A=this.y,D=this.z,C=D.redSqr().redSqr(),P=A.redAdd(A);for(d=0;d<y;d++){var H=B.redSqr(),N=P.redSqr(),V=N.redSqr(),Q=H.redAdd(H).redIAdd(H).redIAdd(M.redMul(C)),ne=B.redMul(N),ae=Q.redSqr().redISub(ne.redAdd(ne)),ee=ne.redISub(ae),le=Q.redMul(ee);le=le.redIAdd(le).redISub(V);var c=P.redMul(D);d+1<y&&(C=C.redMul(V)),B=ae,D=c,P=le}return this.curve.jpoint(B,P.redMul(x),D)},m.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},m.prototype._zeroDbl=function(){var y,d,g;if(this.zOne){var M=this.x.redSqr(),x=this.y.redSqr(),B=x.redSqr(),A=this.x.redAdd(x).redSqr().redISub(M).redISub(B);A=A.redIAdd(A);var D=M.redAdd(M).redIAdd(M),C=D.redSqr().redISub(A).redISub(A),P=B.redIAdd(B);P=P.redIAdd(P),P=P.redIAdd(P),y=C,d=D.redMul(A.redISub(C)).redISub(P),g=this.y.redAdd(this.y)}else{var H=this.x.redSqr(),N=this.y.redSqr(),V=N.redSqr(),Q=this.x.redAdd(N).redSqr().redISub(H).redISub(V);Q=Q.redIAdd(Q);var ne=H.redAdd(H).redIAdd(H),ae=ne.redSqr(),ee=V.redIAdd(V);ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),y=ae.redISub(Q).redISub(Q),d=ne.redMul(Q.redISub(y)).redISub(ee),g=this.y.redMul(this.z),g=g.redIAdd(g)}return this.curve.jpoint(y,d,g)},m.prototype._threeDbl=function(){var y,d,g;if(this.zOne){var M=this.x.redSqr(),x=this.y.redSqr(),B=x.redSqr(),A=this.x.redAdd(x).redSqr().redISub(M).redISub(B);A=A.redIAdd(A);var D=M.redAdd(M).redIAdd(M).redIAdd(this.curve.a),C=D.redSqr().redISub(A).redISub(A);y=C;var P=B.redIAdd(B);P=P.redIAdd(P),P=P.redIAdd(P),d=D.redMul(A.redISub(C)).redISub(P),g=this.y.redAdd(this.y)}else{var H=this.z.redSqr(),N=this.y.redSqr(),V=this.x.redMul(N),Q=this.x.redSub(H).redMul(this.x.redAdd(H));Q=Q.redAdd(Q).redIAdd(Q);var ne=V.redIAdd(V);ne=ne.redIAdd(ne);var ae=ne.redAdd(ne);y=Q.redSqr().redISub(ae),g=this.y.redAdd(this.z).redSqr().redISub(N).redISub(H);var ee=N.redSqr();ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),ee=ee.redIAdd(ee),d=Q.redMul(ne.redISub(y)).redISub(ee)}return this.curve.jpoint(y,d,g)},m.prototype._dbl=function(){var y=this.curve.a,d=this.x,g=this.y,M=this.z,x=M.redSqr().redSqr(),B=d.redSqr(),A=g.redSqr(),D=B.redAdd(B).redIAdd(B).redIAdd(y.redMul(x)),C=d.redAdd(d);C=C.redIAdd(C);var P=C.redMul(A),H=D.redSqr().redISub(P.redAdd(P)),N=P.redISub(H),V=A.redSqr();V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V);var Q=D.redMul(N).redISub(V),ne=g.redAdd(g).redMul(M);return this.curve.jpoint(H,Q,ne)},m.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var y=this.x.redSqr(),d=this.y.redSqr(),g=this.z.redSqr(),M=d.redSqr(),x=y.redAdd(y).redIAdd(y),B=x.redSqr(),A=this.x.redAdd(d).redSqr().redISub(y).redISub(M);A=A.redIAdd(A),A=A.redAdd(A).redIAdd(A),A=A.redISub(B);var D=A.redSqr(),C=M.redIAdd(M);C=C.redIAdd(C),C=C.redIAdd(C),C=C.redIAdd(C);var P=x.redIAdd(A).redSqr().redISub(B).redISub(D).redISub(C),H=d.redMul(P);H=H.redIAdd(H),H=H.redIAdd(H);var N=this.x.redMul(D).redISub(H);N=N.redIAdd(N),N=N.redIAdd(N);var V=this.y.redMul(P.redMul(C.redISub(P)).redISub(A.redMul(D)));V=V.redIAdd(V),V=V.redIAdd(V),V=V.redIAdd(V);var Q=this.z.redAdd(A).redSqr().redISub(g).redISub(D);return this.curve.jpoint(N,V,Q)},m.prototype.mul=function(y,d){return y=new S(y,d),this.curve._wnafMul(this,y)},m.prototype.eq=function(y){if(y.type==="affine")return this.eq(y.toJ());if(this===y)return!0;var d=this.z.redSqr(),g=y.z.redSqr();if(this.x.redMul(g).redISub(y.x.redMul(d)).cmpn(0)!==0)return!1;var M=d.redMul(this.z),x=g.redMul(y.z);return this.y.redMul(x).redISub(y.y.redMul(M)).cmpn(0)===0},m.prototype.eqXToP=function(y){var d=this.z.redSqr(),g=y.toRed(this.curve.red).redMul(d);if(this.x.cmp(g)===0)return!0;for(var M=y.clone(),x=this.curve.redN.redMul(d);;){if(M.iadd(this.curve.n),M.cmp(this.curve.p)>=0)return!1;if(g.redIAdd(x),this.x.cmp(g)===0)return!0}},m.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},m.prototype.isInfinity=function(){return this.z.cmpn(0)===0},short}var mont,hasRequiredMont;function requireMont(){if(hasRequiredMont)return mont;hasRequiredMont=1;var _=requireBn$3(),S=requireInherits_browser(),I=requireBase$1(),p=requireUtils$1();function R(w){I.call(this,"mont",w),this.a=new _(w.a,16).toRed(this.red),this.b=new _(w.b,16).toRed(this.red),this.i4=new _(4).toRed(this.red).redInvm(),this.two=new _(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}S(R,I),mont=R,R.prototype.validate=function(m){var v=m.normalize().x,y=v.redSqr(),d=y.redMul(v).redAdd(y.redMul(this.a)).redAdd(v),g=d.redSqrt();return g.redSqr().cmp(d)===0};function f(w,m,v){I.BasePoint.call(this,w,"projective"),m===null&&v===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new _(m,16),this.z=new _(v,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return S(f,I.BasePoint),R.prototype.decodePoint=function(m,v){return this.point(p.toArray(m,v),1)},R.prototype.point=function(m,v){return new f(this,m,v)},R.prototype.pointFromJSON=function(m){return f.fromJSON(this,m)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(m,v){return new f(m,v[0],v[1]||m.one)},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.z.cmpn(0)===0},f.prototype.dbl=function(){var m=this.x.redAdd(this.z),v=m.redSqr(),y=this.x.redSub(this.z),d=y.redSqr(),g=v.redSub(d),M=v.redMul(d),x=g.redMul(d.redAdd(this.curve.a24.redMul(g)));return this.curve.point(M,x)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(m,v){var y=this.x.redAdd(this.z),d=this.x.redSub(this.z),g=m.x.redAdd(m.z),M=m.x.redSub(m.z),x=M.redMul(y),B=g.redMul(d),A=v.z.redMul(x.redAdd(B).redSqr()),D=v.x.redMul(x.redISub(B).redSqr());return this.curve.point(A,D)},f.prototype.mul=function(m){for(var v=m.clone(),y=this,d=this.curve.point(null,null),g=this,M=[];v.cmpn(0)!==0;v.iushrn(1))M.push(v.andln(1));for(var x=M.length-1;x>=0;x--)M[x]===0?(y=y.diffAdd(d,g),d=d.dbl()):(d=y.diffAdd(d,g),y=y.dbl());return d},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(m){return this.getX().cmp(m.getX())===0},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},mont}var edwards,hasRequiredEdwards;function requireEdwards(){if(hasRequiredEdwards)return edwards;hasRequiredEdwards=1;var _=requireUtils$1(),S=requireBn$3(),I=requireInherits_browser(),p=requireBase$1(),R=_.assert;function f(m){this.twisted=(m.a|0)!==1,this.mOneA=this.twisted&&(m.a|0)===-1,this.extended=this.mOneA,p.call(this,"edwards",m),this.a=new S(m.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new S(m.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new S(m.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),R(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(m.c|0)===1}I(f,p),edwards=f,f.prototype._mulA=function(v){return this.mOneA?v.redNeg():this.a.redMul(v)},f.prototype._mulC=function(v){return this.oneC?v:this.c.redMul(v)},f.prototype.jpoint=function(v,y,d,g){return this.point(v,y,d,g)},f.prototype.pointFromX=function(v,y){v=new S(v,16),v.red||(v=v.toRed(this.red));var d=v.redSqr(),g=this.c2.redSub(this.a.redMul(d)),M=this.one.redSub(this.c2.redMul(this.d).redMul(d)),x=g.redMul(M.redInvm()),B=x.redSqrt();if(B.redSqr().redSub(x).cmp(this.zero)!==0)throw new Error("invalid point");var A=B.fromRed().isOdd();return(y&&!A||!y&&A)&&(B=B.redNeg()),this.point(v,B)},f.prototype.pointFromY=function(v,y){v=new S(v,16),v.red||(v=v.toRed(this.red));var d=v.redSqr(),g=d.redSub(this.c2),M=d.redMul(this.d).redMul(this.c2).redSub(this.a),x=g.redMul(M.redInvm());if(x.cmp(this.zero)===0){if(y)throw new Error("invalid point");return this.point(this.zero,v)}var B=x.redSqrt();if(B.redSqr().redSub(x).cmp(this.zero)!==0)throw new Error("invalid point");return B.fromRed().isOdd()!==y&&(B=B.redNeg()),this.point(B,v)},f.prototype.validate=function(v){if(v.isInfinity())return!0;v.normalize();var y=v.x.redSqr(),d=v.y.redSqr(),g=y.redMul(this.a).redAdd(d),M=this.c2.redMul(this.one.redAdd(this.d.redMul(y).redMul(d)));return g.cmp(M)===0};function w(m,v,y,d,g){p.BasePoint.call(this,m,"projective"),v===null&&y===null&&d===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new S(v,16),this.y=new S(y,16),this.z=d?new S(d,16):this.curve.one,this.t=g&&new S(g,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return I(w,p.BasePoint),f.prototype.pointFromJSON=function(v){return w.fromJSON(this,v)},f.prototype.point=function(v,y,d,g){return new w(this,v,y,d,g)},w.fromJSON=function(v,y){return new w(v,y[0],y[1],y[2])},w.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},w.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},w.prototype._extDbl=function(){var v=this.x.redSqr(),y=this.y.redSqr(),d=this.z.redSqr();d=d.redIAdd(d);var g=this.curve._mulA(v),M=this.x.redAdd(this.y).redSqr().redISub(v).redISub(y),x=g.redAdd(y),B=x.redSub(d),A=g.redSub(y),D=M.redMul(B),C=x.redMul(A),P=M.redMul(A),H=B.redMul(x);return this.curve.point(D,C,H,P)},w.prototype._projDbl=function(){var v=this.x.redAdd(this.y).redSqr(),y=this.x.redSqr(),d=this.y.redSqr(),g,M,x,B,A,D;if(this.curve.twisted){B=this.curve._mulA(y);var C=B.redAdd(d);this.zOne?(g=v.redSub(y).redSub(d).redMul(C.redSub(this.curve.two)),M=C.redMul(B.redSub(d)),x=C.redSqr().redSub(C).redSub(C)):(A=this.z.redSqr(),D=C.redSub(A).redISub(A),g=v.redSub(y).redISub(d).redMul(D),M=C.redMul(B.redSub(d)),x=C.redMul(D))}else B=y.redAdd(d),A=this.curve._mulC(this.z).redSqr(),D=B.redSub(A).redSub(A),g=this.curve._mulC(v.redISub(B)).redMul(D),M=this.curve._mulC(B).redMul(y.redISub(d)),x=B.redMul(D);return this.curve.point(g,M,x)},w.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},w.prototype._extAdd=function(v){var y=this.y.redSub(this.x).redMul(v.y.redSub(v.x)),d=this.y.redAdd(this.x).redMul(v.y.redAdd(v.x)),g=this.t.redMul(this.curve.dd).redMul(v.t),M=this.z.redMul(v.z.redAdd(v.z)),x=d.redSub(y),B=M.redSub(g),A=M.redAdd(g),D=d.redAdd(y),C=x.redMul(B),P=A.redMul(D),H=x.redMul(D),N=B.redMul(A);return this.curve.point(C,P,N,H)},w.prototype._projAdd=function(v){var y=this.z.redMul(v.z),d=y.redSqr(),g=this.x.redMul(v.x),M=this.y.redMul(v.y),x=this.curve.d.redMul(g).redMul(M),B=d.redSub(x),A=d.redAdd(x),D=this.x.redAdd(this.y).redMul(v.x.redAdd(v.y)).redISub(g).redISub(M),C=y.redMul(B).redMul(D),P,H;return this.curve.twisted?(P=y.redMul(A).redMul(M.redSub(this.curve._mulA(g))),H=B.redMul(A)):(P=y.redMul(A).redMul(M.redSub(g)),H=this.curve._mulC(B).redMul(A)),this.curve.point(C,P,H)},w.prototype.add=function(v){return this.isInfinity()?v:v.isInfinity()?this:this.curve.extended?this._extAdd(v):this._projAdd(v)},w.prototype.mul=function(v){return this._hasDoubles(v)?this.curve._fixedNafMul(this,v):this.curve._wnafMul(this,v)},w.prototype.mulAdd=function(v,y,d){return this.curve._wnafMulAdd(1,[this,y],[v,d],2,!1)},w.prototype.jmulAdd=function(v,y,d){return this.curve._wnafMulAdd(1,[this,y],[v,d],2,!0)},w.prototype.normalize=function(){if(this.zOne)return this;var v=this.z.redInvm();return this.x=this.x.redMul(v),this.y=this.y.redMul(v),this.t&&(this.t=this.t.redMul(v)),this.z=this.curve.one,this.zOne=!0,this},w.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},w.prototype.getX=function(){return this.normalize(),this.x.fromRed()},w.prototype.getY=function(){return this.normalize(),this.y.fromRed()},w.prototype.eq=function(v){return this===v||this.getX().cmp(v.getX())===0&&this.getY().cmp(v.getY())===0},w.prototype.eqXToP=function(v){var y=v.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(y)===0)return!0;for(var d=v.clone(),g=this.curve.redN.redMul(this.z);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return!1;if(y.redIAdd(g),this.x.cmp(y)===0)return!0}},w.prototype.toP=w.prototype.normalize,w.prototype.mixedAdd=w.prototype.add,edwards}var hasRequiredCurve;function requireCurve(){return hasRequiredCurve||(hasRequiredCurve=1,(function(_){var S=_;S.base=requireBase$1(),S.short=requireShort(),S.mont=requireMont(),S.edwards=requireEdwards()})(curve)),curve}var curves={},hash={},utils={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var _=requireMinimalisticAssert(),S=requireInherits_browser();utils.inherits=S;function I(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function p(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),s=0;s<e.length;s+=2)n.push(parseInt(e[s]+e[s+1],16))}else for(var a=0,s=0;s<e.length;s++){var u=e.charCodeAt(s);u<128?n[a++]=u:u<2048?(n[a++]=u>>6|192,n[a++]=u&63|128):I(e,s)?(u=65536+((u&1023)<<10)+(e.charCodeAt(++s)&1023),n[a++]=u>>18|240,n[a++]=u>>12&63|128,n[a++]=u>>6&63|128,n[a++]=u&63|128):(n[a++]=u>>12|224,n[a++]=u>>6&63|128,n[a++]=u&63|128)}else for(s=0;s<e.length;s++)n[s]=e[s]|0;return n}utils.toArray=p;function R(e){for(var t="",n=0;n<e.length;n++)t+=m(e[n].toString(16));return t}utils.toHex=R;function f(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}utils.htonl=f;function w(e,t){for(var n="",a=0;a<e.length;a++){var s=e[a];t==="little"&&(s=f(s)),n+=v(s.toString(16))}return n}utils.toHex32=w;function m(e){return e.length===1?"0"+e:e}utils.zero2=m;function v(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}utils.zero8=v;function y(e,t,n,a){var s=n-t;_(s%4===0);for(var u=new Array(s/4),l=0,o=t;l<u.length;l++,o+=4){var r;a==="big"?r=e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3]:r=e[o+3]<<24|e[o+2]<<16|e[o+1]<<8|e[o],u[l]=r>>>0}return u}utils.join32=y;function d(e,t){for(var n=new Array(e.length*4),a=0,s=0;a<e.length;a++,s+=4){var u=e[a];t==="big"?(n[s]=u>>>24,n[s+1]=u>>>16&255,n[s+2]=u>>>8&255,n[s+3]=u&255):(n[s+3]=u>>>24,n[s+2]=u>>>16&255,n[s+1]=u>>>8&255,n[s]=u&255)}return n}utils.split32=d;function g(e,t){return e>>>t|e<<32-t}utils.rotr32=g;function M(e,t){return e<<t|e>>>32-t}utils.rotl32=M;function x(e,t){return e+t>>>0}utils.sum32=x;function B(e,t,n){return e+t+n>>>0}utils.sum32_3=B;function A(e,t,n,a){return e+t+n+a>>>0}utils.sum32_4=A;function D(e,t,n,a,s){return e+t+n+a+s>>>0}utils.sum32_5=D;function C(e,t,n,a){var s=e[t],u=e[t+1],l=a+u>>>0,o=(l<a?1:0)+n+s;e[t]=o>>>0,e[t+1]=l}utils.sum64=C;function P(e,t,n,a){var s=t+a>>>0,u=(s<t?1:0)+e+n;return u>>>0}utils.sum64_hi=P;function H(e,t,n,a){var s=t+a;return s>>>0}utils.sum64_lo=H;function N(e,t,n,a,s,u,l,o){var r=0,h=t;h=h+a>>>0,r+=h<t?1:0,h=h+u>>>0,r+=h<u?1:0,h=h+o>>>0,r+=h<o?1:0;var b=e+n+s+l+r;return b>>>0}utils.sum64_4_hi=N;function V(e,t,n,a,s,u,l,o){var r=t+a+u+o;return r>>>0}utils.sum64_4_lo=V;function Q(e,t,n,a,s,u,l,o,r,h){var b=0,E=t;E=E+a>>>0,b+=E<t?1:0,E=E+u>>>0,b+=E<u?1:0,E=E+o>>>0,b+=E<o?1:0,E=E+h>>>0,b+=E<h?1:0;var L=e+n+s+l+r+b;return L>>>0}utils.sum64_5_hi=Q;function ne(e,t,n,a,s,u,l,o,r,h){var b=t+a+u+o+h;return b>>>0}utils.sum64_5_lo=ne;function ae(e,t,n){var a=t<<32-n|e>>>n;return a>>>0}utils.rotr64_hi=ae;function ee(e,t,n){var a=e<<32-n|t>>>n;return a>>>0}utils.rotr64_lo=ee;function le(e,t,n){return e>>>n}utils.shr64_hi=le;function c(e,t,n){var a=e<<32-n|t>>>n;return a>>>0}return utils.shr64_lo=c,utils}var common$1={},hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;var _=requireUtils(),S=requireMinimalisticAssert();function I(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return common$1.BlockHash=I,I.prototype.update=function(R,f){if(R=_.toArray(R,f),this.pending?this.pending=this.pending.concat(R):this.pending=R,this.pendingTotal+=R.length,this.pending.length>=this._delta8){R=this.pending;var w=R.length%this._delta8;this.pending=R.slice(R.length-w,R.length),this.pending.length===0&&(this.pending=null),R=_.join32(R,0,R.length-w,this.endian);for(var m=0;m<R.length;m+=this._delta32)this._update(R,m,m+this._delta32)}return this},I.prototype.digest=function(R){return this.update(this._pad()),S(this.pending===null),this._digest(R)},I.prototype._pad=function(){var R=this.pendingTotal,f=this._delta8,w=f-(R+this.padLength)%f,m=new Array(w+this.padLength);m[0]=128;for(var v=1;v<w;v++)m[v]=0;if(R<<=3,this.endian==="big"){for(var y=8;y<this.padLength;y++)m[v++]=0;m[v++]=0,m[v++]=0,m[v++]=0,m[v++]=0,m[v++]=R>>>24&255,m[v++]=R>>>16&255,m[v++]=R>>>8&255,m[v++]=R&255}else for(m[v++]=R&255,m[v++]=R>>>8&255,m[v++]=R>>>16&255,m[v++]=R>>>24&255,m[v++]=0,m[v++]=0,m[v++]=0,m[v++]=0,y=8;y<this.padLength;y++)m[v++]=0;return m},common$1}var sha={},common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;var _=requireUtils(),S=_.rotr32;function I(d,g,M,x){if(d===0)return p(g,M,x);if(d===1||d===3)return f(g,M,x);if(d===2)return R(g,M,x)}common.ft_1=I;function p(d,g,M){return d&g^~d&M}common.ch32=p;function R(d,g,M){return d&g^d&M^g&M}common.maj32=R;function f(d,g,M){return d^g^M}common.p32=f;function w(d){return S(d,2)^S(d,13)^S(d,22)}common.s0_256=w;function m(d){return S(d,6)^S(d,11)^S(d,25)}common.s1_256=m;function v(d){return S(d,7)^S(d,18)^d>>>3}common.g0_256=v;function y(d){return S(d,17)^S(d,19)^d>>>10}return common.g1_256=y,common}var _1,hasRequired_1;function require_1(){if(hasRequired_1)return _1;hasRequired_1=1;var _=requireUtils(),S=requireCommon$1(),I=requireCommon(),p=_.rotl32,R=_.sum32,f=_.sum32_5,w=I.ft_1,m=S.BlockHash,v=[1518500249,1859775393,2400959708,3395469782];function y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return _.inherits(y,m),_1=y,y.blockSize=512,y.outSize=160,y.hmacStrength=80,y.padLength=64,y.prototype._update=function(g,M){for(var x=this.W,B=0;B<16;B++)x[B]=g[M+B];for(;B<x.length;B++)x[B]=p(x[B-3]^x[B-8]^x[B-14]^x[B-16],1);var A=this.h[0],D=this.h[1],C=this.h[2],P=this.h[3],H=this.h[4];for(B=0;B<x.length;B++){var N=~~(B/20),V=f(p(A,5),w(N,D,C,P),H,x[B],v[N]);H=P,P=C,C=p(D,30),D=A,A=V}this.h[0]=R(this.h[0],A),this.h[1]=R(this.h[1],D),this.h[2]=R(this.h[2],C),this.h[3]=R(this.h[3],P),this.h[4]=R(this.h[4],H)},y.prototype._digest=function(g){return g==="hex"?_.toHex32(this.h,"big"):_.split32(this.h,"big")},_1}var _256,hasRequired_256;function require_256(){if(hasRequired_256)return _256;hasRequired_256=1;var _=requireUtils(),S=requireCommon$1(),I=requireCommon(),p=requireMinimalisticAssert(),R=_.sum32,f=_.sum32_4,w=_.sum32_5,m=I.ch32,v=I.maj32,y=I.s0_256,d=I.s1_256,g=I.g0_256,M=I.g1_256,x=S.BlockHash,B=[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 A(){if(!(this instanceof A))return new A;x.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=B,this.W=new Array(64)}return _.inherits(A,x),_256=A,A.blockSize=512,A.outSize=256,A.hmacStrength=192,A.padLength=64,A.prototype._update=function(C,P){for(var H=this.W,N=0;N<16;N++)H[N]=C[P+N];for(;N<H.length;N++)H[N]=f(M(H[N-2]),H[N-7],g(H[N-15]),H[N-16]);var V=this.h[0],Q=this.h[1],ne=this.h[2],ae=this.h[3],ee=this.h[4],le=this.h[5],c=this.h[6],e=this.h[7];for(p(this.k.length===H.length),N=0;N<H.length;N++){var t=w(e,d(ee),m(ee,le,c),this.k[N],H[N]),n=R(y(V),v(V,Q,ne));e=c,c=le,le=ee,ee=R(ae,t),ae=ne,ne=Q,Q=V,V=R(t,n)}this.h[0]=R(this.h[0],V),this.h[1]=R(this.h[1],Q),this.h[2]=R(this.h[2],ne),this.h[3]=R(this.h[3],ae),this.h[4]=R(this.h[4],ee),this.h[5]=R(this.h[5],le),this.h[6]=R(this.h[6],c),this.h[7]=R(this.h[7],e)},A.prototype._digest=function(C){return C==="hex"?_.toHex32(this.h,"big"):_.split32(this.h,"big")},_256}var _224,hasRequired_224;function require_224(){if(hasRequired_224)return _224;hasRequired_224=1;var _=requireUtils(),S=require_256();function I(){if(!(this instanceof I))return new I;S.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return _.inherits(I,S),_224=I,I.blockSize=512,I.outSize=224,I.hmacStrength=192,I.padLength=64,I.prototype._digest=function(R){return R==="hex"?_.toHex32(this.h.slice(0,7),"big"):_.split32(this.h.slice(0,7),"big")},_224}var _512,hasRequired_512;function require_512(){if(hasRequired_512)return _512;hasRequired_512=1;var _=requireUtils(),S=requireCommon$1(),I=requireMinimalisticAssert(),p=_.rotr64_hi,R=_.rotr64_lo,f=_.shr64_hi,w=_.shr64_lo,m=_.sum64,v=_.sum64_hi,y=_.sum64_lo,d=_.sum64_4_hi,g=_.sum64_4_lo,M=_.sum64_5_hi,x=_.sum64_5_lo,B=S.BlockHash,A=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function D(){if(!(this instanceof D))return new D;B.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=A,this.W=new Array(160)}_.inherits(D,B),_512=D,D.blockSize=1024,D.outSize=512,D.hmacStrength=192,D.padLength=128,D.prototype._prepareBlock=function(n,a){for(var s=this.W,u=0;u<32;u++)s[u]=n[a+u];for(;u<s.length;u+=2){var l=c(s[u-4],s[u-3]),o=e(s[u-4],s[u-3]),r=s[u-14],h=s[u-13],b=ee(s[u-30],s[u-29]),E=le(s[u-30],s[u-29]),L=s[u-32],Y=s[u-31];s[u]=d(l,o,r,h,b,E,L,Y),s[u+1]=g(l,o,r,h,b,E,L,Y)}},D.prototype._update=function(n,a){this._prepareBlock(n,a);var s=this.W,u=this.h[0],l=this.h[1],o=this.h[2],r=this.h[3],h=this.h[4],b=this.h[5],E=this.h[6],L=this.h[7],Y=this.h[8],K=this.h[9],q=this.h[10],$=this.h[11],W=this.h[12],J=this.h[13],X=this.h[14],U=this.h[15];I(this.k.length===s.length);for(var re=0;re<s.length;re+=2){var Ie=X,ue=U,he=ne(Y,K),Pe=ae(Y,K),me=C(Y,K,q,$,W),se=P(Y,K,q,$,W,J),De=this.k[re],de=this.k[re+1],ye=s[re],Ce=s[re+1],pe=M(Ie,ue,he,Pe,me,se,De,de,ye,Ce),_e=x(Ie,ue,he,Pe,me,se,De,de,ye,Ce);Ie=V(u,l),ue=Q(u,l),he=H(u,l,o,r,h),Pe=N(u,l,o,r,h,b);var Ue=v(Ie,ue,he,Pe),xe=y(Ie,ue,he,Pe);X=W,U=J,W=q,J=$,q=Y,$=K,Y=v(E,L,pe,_e),K=y(L,L,pe,_e),E=h,L=b,h=o,b=r,o=u,r=l,u=v(pe,_e,Ue,xe),l=y(pe,_e,Ue,xe)}m(this.h,0,u,l),m(this.h,2,o,r),m(this.h,4,h,b),m(this.h,6,E,L),m(this.h,8,Y,K),m(this.h,10,q,$),m(this.h,12,W,J),m(this.h,14,X,U)},D.prototype._digest=function(n){return n==="hex"?_.toHex32(this.h,"big"):_.split32(this.h,"big")};function C(t,n,a,s,u){var l=t&a^~t&u;return l<0&&(l+=4294967296),l}function P(t,n,a,s,u,l){var o=n&s^~n&l;return o<0&&(o+=4294967296),o}function H(t,n,a,s,u){var l=t&a^t&u^a&u;return l<0&&(l+=4294967296),l}function N(t,n,a,s,u,l){var o=n&s^n&l^s&l;return o<0&&(o+=4294967296),o}function V(t,n){var a=p(t,n,28),s=p(n,t,2),u=p(n,t,7),l=a^s^u;return l<0&&(l+=4294967296),l}function Q(t,n){var a=R(t,n,28),s=R(n,t,2),u=R(n,t,7),l=a^s^u;return l<0&&(l+=4294967296),l}function ne(t,n){var a=p(t,n,14),s=p(t,n,18),u=p(n,t,9),l=a^s^u;return l<0&&(l+=4294967296),l}function ae(t,n){var a=R(t,n,14),s=R(t,n,18),u=R(n,t,9),l=a^s^u;return l<0&&(l+=4294967296),l}function ee(t,n){var a=p(t,n,1),s=p(t,n,8),u=f(t,n,7),l=a^s^u;return l<0&&(l+=4294967296),l}function le(t,n){var a=R(t,n,1),s=R(t,n,8),u=w(t,n,7),l=a^s^u;return l<0&&(l+=4294967296),l}function c(t,n){var a=p(t,n,19),s=p(n,t,29),u=f(t,n,6),l=a^s^u;return l<0&&(l+=4294967296),l}function e(t,n){var a=R(t,n,19),s=R(n,t,29),u=w(t,n,6),l=a^s^u;return l<0&&(l+=4294967296),l}return _512}var _384,hasRequired_384;function require_384(){if(hasRequired_384)return _384;hasRequired_384=1;var _=requireUtils(),S=require_512();function I(){if(!(this instanceof I))return new I;S.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return _.inherits(I,S),_384=I,I.blockSize=1024,I.outSize=384,I.hmacStrength=192,I.padLength=128,I.prototype._digest=function(R){return R==="hex"?_.toHex32(this.h.slice(0,12),"big"):_.split32(this.h.slice(0,12),"big")},_384}var hasRequiredSha;function requireSha(){return hasRequiredSha||(hasRequiredSha=1,sha.sha1=require_1(),sha.sha224=require_224(),sha.sha256=require_256(),sha.sha384=require_384(),sha.sha512=require_512()),sha}var ripemd={},hasRequiredRipemd;function requireRipemd(){if(hasRequiredRipemd)return ripemd;hasRequiredRipemd=1;var _=requireUtils(),S=requireCommon$1(),I=_.rotl32,p=_.sum32,R=_.sum32_3,f=_.sum32_4,w=S.BlockHash;function m(){if(!(this instanceof m))return new m;w.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}_.inherits(m,w),ripemd.ripemd160=m,m.blockSize=512,m.outSize=160,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(D,C){for(var P=this.h[0],H=this.h[1],N=this.h[2],V=this.h[3],Q=this.h[4],ne=P,ae=H,ee=N,le=V,c=Q,e=0;e<80;e++){var t=p(I(f(P,v(e,H,N,V),D[g[e]+C],y(e)),x[e]),Q);P=Q,Q=V,V=I(N,10),N=H,H=t,t=p(I(f(ne,v(79-e,ae,ee,le),D[M[e]+C],d(e)),B[e]),c),ne=c,c=le,le=I(ee,10),ee=ae,ae=t}t=R(this.h[1],N,le),this.h[1]=R(this.h[2],V,c),this.h[2]=R(this.h[3],Q,ne),this.h[3]=R(this.h[4],P,ae),this.h[4]=R(this.h[0],H,ee),this.h[0]=t},m.prototype._digest=function(D){return D==="hex"?_.toHex32(this.h,"little"):_.split32(this.h,"little")};function v(A,D,C,P){return A<=15?D^C^P:A<=31?D&C|~D&P:A<=47?(D|~C)^P:A<=63?D&P|C&~P:D^(C|~P)}function y(A){return A<=15?0:A<=31?1518500249:A<=47?1859775393:A<=63?2400959708:2840853838}function d(A){return A<=15?1352829926:A<=31?1548603684:A<=47?1836072691:A<=63?2053994217:0}var g=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],M=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],x=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],B=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return ripemd}var hmac,hasRequiredHmac;function requireHmac(){if(hasRequiredHmac)return hmac;hasRequiredHmac=1;var _=requireUtils(),S=requireMinimalisticAssert();function I(p,R,f){if(!(this instanceof I))return new I(p,R,f);this.Hash=p,this.blockSize=p.blockSize/8,this.outSize=p.outSize/8,this.inner=null,this.outer=null,this._init(_.toArray(R,f))}return hmac=I,I.prototype._init=function(R){R.length>this.blockSize&&(R=new this.Hash().update(R).digest()),S(R.length<=this.blockSize);for(var f=R.length;f<this.blockSize;f++)R.push(0);for(f=0;f<R.length;f++)R[f]^=54;for(this.inner=new this.Hash().update(R),f=0;f<R.length;f++)R[f]^=106;this.outer=new this.Hash().update(R)},I.prototype.update=function(R,f){return this.inner.update(R,f),this},I.prototype.digest=function(R){return this.outer.update(this.inner.digest()),this.outer.digest(R)},hmac}var hasRequiredHash;function requireHash(){return hasRequiredHash||(hasRequiredHash=1,(function(_){var S=_;S.utils=requireUtils(),S.common=requireCommon$1(),S.sha=requireSha(),S.ripemd=requireRipemd(),S.hmac=requireHmac(),S.sha1=S.sha.sha1,S.sha256=S.sha.sha256,S.sha224=S.sha.sha224,S.sha384=S.sha.sha384,S.sha512=S.sha.sha512,S.ripemd160=S.ripemd.ripemd160})(hash)),hash}var secp256k1,hasRequiredSecp256k1;function requireSecp256k1(){return hasRequiredSecp256k1||(hasRequiredSecp256k1=1,secp256k1={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),secp256k1}var hasRequiredCurves;function requireCurves(){return hasRequiredCurves||(hasRequiredCurves=1,(function(_){var S=_,I=requireHash(),p=requireCurve(),R=requireUtils$1(),f=R.assert;function w(y){y.type==="short"?this.curve=new p.short(y):y.type==="edwards"?this.curve=new p.edwards(y):this.curve=new p.mont(y),this.g=this.curve.g,this.n=this.curve.n,this.hash=y.hash,f(this.g.validate(),"Invalid curve"),f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}S.PresetCurve=w;function m(y,d){Object.defineProperty(S,y,{configurable:!0,enumerable:!0,get:function(){var g=new w(d);return Object.defineProperty(S,y,{configurable:!0,enumerable:!0,value:g}),g}})}m("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:I.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),m("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:I.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),m("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:I.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),m("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:I.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),m("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:I.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),m("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:I.sha256,gRed:!1,g:["9"]}),m("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:I.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var v;try{v=requireSecp256k1()}catch{v=void 0}m("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:I.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",v]})})(curves)),curves}var hmacDrbg,hasRequiredHmacDrbg;function requireHmacDrbg(){if(hasRequiredHmacDrbg)return hmacDrbg;hasRequiredHmacDrbg=1;var _=requireHash(),S=requireUtils$2(),I=requireMinimalisticAssert();function p(R){if(!(this instanceof p))return new p(R);this.hash=R.hash,this.predResist=!!R.predResist,this.outLen=this.hash.outSize,this.minEntropy=R.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var f=S.toArray(R.entropy,R.entropyEnc||"hex"),w=S.toArray(R.nonce,R.nonceEnc||"hex"),m=S.toArray(R.pers,R.persEnc||"hex");I(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(f,w,m)}return hmacDrbg=p,p.prototype._init=function(f,w,m){var v=f.concat(w).concat(m);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var y=0;y<this.V.length;y++)this.K[y]=0,this.V[y]=1;this._update(v),this._reseed=1,this.reseedInterval=281474976710656},p.prototype._hmac=function(){return new _.hmac(this.hash,this.K)},p.prototype._update=function(f){var w=this._hmac().update(this.V).update([0]);f&&(w=w.update(f)),this.K=w.digest(),this.V=this._hmac().update(this.V).digest(),f&&(this.K=this._hmac().update(this.V).update([1]).update(f).digest(),this.V=this._hmac().update(this.V).digest())},p.prototype.reseed=function(f,w,m,v){typeof w!="string"&&(v=m,m=w,w=null),f=S.toArray(f,w),m=S.toArray(m,v),I(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(f.concat(m||[])),this._reseed=1},p.prototype.generate=function(f,w,m,v){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof w!="string"&&(v=m,m=w,w=null),m&&(m=S.toArray(m,v||"hex"),this._update(m));for(var y=[];y.length<f;)this.V=this._hmac().update(this.V).digest(),y=y.concat(this.V);var d=y.slice(0,f);return this._update(m),this._reseed++,S.encode(d,w)},hmacDrbg}var key$1,hasRequiredKey$1;function requireKey$1(){if(hasRequiredKey$1)return key$1;hasRequiredKey$1=1;var _=requireBn$3(),S=requireUtils$1(),I=S.assert;function p(R,f){this.ec=R,this.priv=null,this.pub=null,f.priv&&this._importPrivate(f.priv,f.privEnc),f.pub&&this._importPublic(f.pub,f.pubEnc)}return key$1=p,p.fromPublic=function(f,w,m){return w instanceof p?w:new p(f,{pub:w,pubEnc:m})},p.fromPrivate=function(f,w,m){return w instanceof p?w:new p(f,{priv:w,privEnc:m})},p.prototype.validate=function(){var f=this.getPublic();return f.isInfinity()?{result:!1,reason:"Invalid public key"}:f.validate()?f.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},p.prototype.getPublic=function(f,w){return typeof f=="string"&&(w=f,f=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),w?this.pub.encode(w,f):this.pub},p.prototype.getPrivate=function(f){return f==="hex"?this.priv.toString(16,2):this.priv},p.prototype._importPrivate=function(f,w){this.priv=new _(f,w||16),this.priv=this.priv.umod(this.ec.curve.n)},p.prototype._importPublic=function(f,w){if(f.x||f.y){this.ec.curve.type==="mont"?I(f.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&I(f.x&&f.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(f.x,f.y);return}this.pub=this.ec.curve.decodePoint(f,w)},p.prototype.derive=function(f){return f.validate()||I(f.validate(),"public point not validated"),f.mul(this.priv).getX()},p.prototype.sign=function(f,w,m){return this.ec.sign(f,this,w,m)},p.prototype.verify=function(f,w,m){return this.ec.verify(f,w,this,void 0,m)},p.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},key$1}var signature$1,hasRequiredSignature$1;function requireSignature$1(){if(hasRequiredSignature$1)return signature$1;hasRequiredSignature$1=1;var _=requireBn$3(),S=requireUtils$1(),I=S.assert;function p(v,y){if(v instanceof p)return v;this._importDER(v,y)||(I(v.r&&v.s,"Signature without r or s"),this.r=new _(v.r,16),this.s=new _(v.s,16),v.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=v.recoveryParam)}signature$1=p;function R(){this.place=0}function f(v,y){var d=v[y.place++];if(!(d&128))return d;var g=d&15;if(g===0||g>4||v[y.place]===0)return!1;for(var M=0,x=0,B=y.place;x<g;x++,B++)M<<=8,M|=v[B],M>>>=0;return M<=127?!1:(y.place=B,M)}function w(v){for(var y=0,d=v.length-1;!v[y]&&!(v[y+1]&128)&&y<d;)y++;return y===0?v:v.slice(y)}p.prototype._importDER=function(y,d){y=S.toArray(y,d);var g=new R;if(y[g.place++]!==48)return!1;var M=f(y,g);if(M===!1||M+g.place!==y.length||y[g.place++]!==2)return!1;var x=f(y,g);if(x===!1||(y[g.place]&128)!==0)return!1;var B=y.slice(g.place,x+g.place);if(g.place+=x,y[g.place++]!==2)return!1;var A=f(y,g);if(A===!1||y.length!==A+g.place||(y[g.place]&128)!==0)return!1;var D=y.slice(g.place,A+g.place);if(B[0]===0)if(B[1]&128)B=B.slice(1);else return!1;if(D[0]===0)if(D[1]&128)D=D.slice(1);else return!1;return this.r=new _(B),this.s=new _(D),this.recoveryParam=null,!0};function m(v,y){if(y<128){v.push(y);return}var d=1+(Math.log(y)/Math.LN2>>>3);for(v.push(d|128);--d;)v.push(y>>>(d<<3)&255);v.push(y)}return p.prototype.toDER=function(y){var d=this.r.toArray(),g=this.s.toArray();for(d[0]&128&&(d=[0].concat(d)),g[0]&128&&(g=[0].concat(g)),d=w(d),g=w(g);!g[0]&&!(g[1]&128);)g=g.slice(1);var M=[2];m(M,d.length),M=M.concat(d),M.push(2),m(M,g.length);var x=M.concat(g),B=[48];return m(B,x.length),B=B.concat(x),S.encode(B,y)},signature$1}var ec,hasRequiredEc;function requireEc(){if(hasRequiredEc)return ec;hasRequiredEc=1;var _=requireBn$3(),S=requireHmacDrbg(),I=requireUtils$1(),p=requireCurves(),R=requireBrorand(),f=I.assert,w=requireKey$1(),m=requireSignature$1();function v(y){if(!(this instanceof v))return new v(y);typeof y=="string"&&(f(Object.prototype.hasOwnProperty.call(p,y),"Unknown curve "+y),y=p[y]),y instanceof p.PresetCurve&&(y={curve:y}),this.curve=y.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=y.curve.g,this.g.precompute(y.curve.n.bitLength()+1),this.hash=y.hash||y.curve.hash}return ec=v,v.prototype.keyPair=function(d){return new w(this,d)},v.prototype.keyFromPrivate=function(d,g){return w.fromPrivate(this,d,g)},v.prototype.keyFromPublic=function(d,g){return w.fromPublic(this,d,g)},v.prototype.genKeyPair=function(d){d||(d={});for(var g=new S({hash:this.hash,pers:d.pers,persEnc:d.persEnc||"utf8",entropy:d.entropy||R(this.hash.hmacStrength),entropyEnc:d.entropy&&d.entropyEnc||"utf8",nonce:this.n.toArray()}),M=this.n.byteLength(),x=this.n.sub(new _(2));;){var B=new _(g.generate(M));if(!(B.cmp(x)>0))return B.iaddn(1),this.keyFromPrivate(B)}},v.prototype._truncateToN=function(d,g,M){var x;if(_.isBN(d)||typeof d=="number")d=new _(d,16),x=d.byteLength();else if(typeof d=="object")x=d.length,d=new _(d,16);else{var B=d.toString();x=B.length+1>>>1,d=new _(B,16)}typeof M!="number"&&(M=x*8);var A=M-this.n.bitLength();return A>0&&(d=d.ushrn(A)),!g&&d.cmp(this.n)>=0?d.sub(this.n):d},v.prototype.sign=function(d,g,M,x){if(typeof M=="object"&&(x=M,M=null),x||(x={}),typeof d!="string"&&typeof d!="number"&&!_.isBN(d)){f(typeof d=="object"&&d&&typeof d.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),f(d.length>>>0===d.length);for(var B=0;B<d.length;B++)f((d[B]&255)===d[B])}g=this.keyFromPrivate(g,M),d=this._truncateToN(d,!1,x.msgBitLength),f(!d.isNeg(),"Can not sign a negative message");var A=this.n.byteLength(),D=g.getPrivate().toArray("be",A),C=d.toArray("be",A);f(new _(C).eq(d),"Can not sign message");for(var P=new S({hash:this.hash,entropy:D,nonce:C,pers:x.pers,persEnc:x.persEnc||"utf8"}),H=this.n.sub(new _(1)),N=0;;N++){var V=x.k?x.k(N):new _(P.generate(this.n.byteLength()));if(V=this._truncateToN(V,!0),!(V.cmpn(1)<=0||V.cmp(H)>=0)){var Q=this.g.mul(V);if(!Q.isInfinity()){var ne=Q.getX(),ae=ne.umod(this.n);if(ae.cmpn(0)!==0){var ee=V.invm(this.n).mul(ae.mul(g.getPrivate()).iadd(d));if(ee=ee.umod(this.n),ee.cmpn(0)!==0){var le=(Q.getY().isOdd()?1:0)|(ne.cmp(ae)!==0?2:0);return x.canonical&&ee.cmp(this.nh)>0&&(ee=this.n.sub(ee),le^=1),new m({r:ae,s:ee,recoveryParam:le})}}}}}},v.prototype.verify=function(d,g,M,x,B){B||(B={}),d=this._truncateToN(d,!1,B.msgBitLength),M=this.keyFromPublic(M,x),g=new m(g,"hex");var A=g.r,D=g.s;if(A.cmpn(1)<0||A.cmp(this.n)>=0||D.cmpn(1)<0||D.cmp(this.n)>=0)return!1;var C=D.invm(this.n),P=C.mul(d).umod(this.n),H=C.mul(A).umod(this.n),N;return this.curve._maxwellTrick?(N=this.g.jmulAdd(P,M.getPublic(),H),N.isInfinity()?!1:N.eqXToP(A)):(N=this.g.mulAdd(P,M.getPublic(),H),N.isInfinity()?!1:N.getX().umod(this.n).cmp(A)===0)},v.prototype.recoverPubKey=function(y,d,g,M){f((3&g)===g,"The recovery param is more than two bits"),d=new m(d,M);var x=this.n,B=new _(y),A=d.r,D=d.s,C=g&1,P=g>>1;if(A.cmp(this.curve.p.umod(this.curve.n))>=0&&P)throw new Error("Unable to find sencond key candinate");P?A=this.curve.pointFromX(A.add(this.curve.n),C):A=this.curve.pointFromX(A,C);var H=d.r.invm(x),N=x.sub(B).mul(H).umod(x),V=D.mul(H).umod(x);return this.g.mulAdd(N,A,V)},v.prototype.getKeyRecoveryParam=function(y,d,g,M){if(d=new m(d,M),d.recoveryParam!==null)return d.recoveryParam;for(var x=0;x<4;x++){var B;try{B=this.recoverPubKey(y,d,x)}catch{continue}if(B.eq(g))return x}throw new Error("Unable to find valid recovery factor")},ec}var key,hasRequiredKey;function requireKey(){if(hasRequiredKey)return key;hasRequiredKey=1;var _=requireUtils$1(),S=_.assert,I=_.parseBytes,p=_.cachedProperty;function R(f,w){this.eddsa=f,this._secret=I(w.secret),f.isPoint(w.pub)?this._pub=w.pub:this._pubBytes=I(w.pub)}return R.fromPublic=function(w,m){return m instanceof R?m:new R(w,{pub:m})},R.fromSecret=function(w,m){return m instanceof R?m:new R(w,{secret:m})},R.prototype.secret=function(){return this._secret},p(R,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),p(R,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),p(R,"privBytes",function(){var w=this.eddsa,m=this.hash(),v=w.encodingLength-1,y=m.slice(0,w.encodingLength);return y[0]&=248,y[v]&=127,y[v]|=64,y}),p(R,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),p(R,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),p(R,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),R.prototype.sign=function(w){return S(this._secret,"KeyPair can only verify"),this.eddsa.sign(w,this)},R.prototype.verify=function(w,m){return this.eddsa.verify(w,m,this)},R.prototype.getSecret=function(w){return S(this._secret,"KeyPair is public only"),_.encode(this.secret(),w)},R.prototype.getPublic=function(w){return _.encode(this.pubBytes(),w)},key=R,key}var signature,hasRequiredSignature;function requireSignature(){if(hasRequiredSignature)return signature;hasRequiredSignature=1;var _=requireBn$3(),S=requireUtils$1(),I=S.assert,p=S.cachedProperty,R=S.parseBytes;function f(w,m){this.eddsa=w,typeof m!="object"&&(m=R(m)),Array.isArray(m)&&(I(m.length===w.encodingLength*2,"Signature has invalid size"),m={R:m.slice(0,w.encodingLength),S:m.slice(w.encodingLength)}),I(m.R&&m.S,"Signature without R or S"),w.isPoint(m.R)&&(this._R=m.R),m.S instanceof _&&(this._S=m.S),this._Rencoded=Array.isArray(m.R)?m.R:m.Rencoded,this._Sencoded=Array.isArray(m.S)?m.S:m.Sencoded}return p(f,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),p(f,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),p(f,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),p(f,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return S.encode(this.toBytes(),"hex").toUpperCase()},signature=f,signature}var eddsa,hasRequiredEddsa;function requireEddsa(){if(hasRequiredEddsa)return eddsa;hasRequiredEddsa=1;var _=requireHash(),S=requireCurves(),I=requireUtils$1(),p=I.assert,R=I.parseBytes,f=requireKey(),w=requireSignature();function m(v){if(p(v==="ed25519","only tested with ed25519 so far"),!(this instanceof m))return new m(v);v=S[v].curve,this.curve=v,this.g=v.g,this.g.precompute(v.n.bitLength()+1),this.pointClass=v.point().constructor,this.encodingLength=Math.ceil(v.n.bitLength()/8),this.hash=_.sha512}return eddsa=m,m.prototype.sign=function(y,d){y=R(y);var g=this.keyFromSecret(d),M=this.hashInt(g.messagePrefix(),y),x=this.g.mul(M),B=this.encodePoint(x),A=this.hashInt(B,g.pubBytes(),y).mul(g.priv()),D=M.add(A).umod(this.curve.n);return this.makeSignature({R:x,S:D,Rencoded:B})},m.prototype.verify=function(y,d,g){if(y=R(y),d=this.makeSignature(d),d.S().gte(d.eddsa.curve.n)||d.S().isNeg())return!1;var M=this.keyFromPublic(g),x=this.hashInt(d.Rencoded(),M.pubBytes(),y),B=this.g.mul(d.S()),A=d.R().add(M.pub().mul(x));return A.eq(B)},m.prototype.hashInt=function(){for(var y=this.hash(),d=0;d<arguments.length;d++)y.update(arguments[d]);return I.intFromLE(y.digest()).umod(this.curve.n)},m.prototype.keyFromPublic=function(y){return f.fromPublic(this,y)},m.prototype.keyFromSecret=function(y){return f.fromSecret(this,y)},m.prototype.makeSignature=function(y){return y instanceof w?y:new w(this,y)},m.prototype.encodePoint=function(y){var d=y.getY().toArray("le",this.encodingLength);return d[this.encodingLength-1]|=y.getX().isOdd()?128:0,d},m.prototype.decodePoint=function(y){y=I.parseBytes(y);var d=y.length-1,g=y.slice(0,d).concat(y[d]&-129),M=(y[d]&128)!==0,x=I.intFromLE(g);return this.curve.pointFromY(x,M)},m.prototype.encodeInt=function(y){return y.toArray("le",this.encodingLength)},m.prototype.decodeInt=function(y){return I.intFromLE(y)},m.prototype.isPoint=function(y){return y instanceof this.pointClass},eddsa}var hasRequiredElliptic;function requireElliptic(){return hasRequiredElliptic||(hasRequiredElliptic=1,(function(_){var S=_;S.version=require$$0.version,S.utils=requireUtils$1(),S.rand=requireBrorand(),S.curve=requireCurve(),S.curves=requireCurves(),S.ec=requireEc(),S.eddsa=requireEddsa()})(elliptic)),elliptic}var asn1$1={},asn1={},bn$5={exports:{}},bn$4=bn$5.exports,hasRequiredBn$2;function requireBn$2(){return hasRequiredBn$2||(hasRequiredBn$2=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,$=a[2]|0,W=$&8191,J=$>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,Pe=a[5]|0,me=Pe&8191,se=Pe>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,$e=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,$e)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,$e)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,$e)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,$e)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,$e)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,$e)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,$e)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,$e)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,$e)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,$e)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,$e)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,$e)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,$e)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,$e)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,$e)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,$e),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,$e);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new P;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function P(c,e){this.x=c,this.y=e}P.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},P.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},P.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},P.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],$=n[b+Y+l],W=a[b+Y+l],J=E*$-L*W;W=E*W+L*$,$=J,n[b+Y]=K+$,a[b+Y]=q+W,n[b+Y+l]=K-$,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},P.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},P.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},P.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},P.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},P.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},P.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$4)})(bn$5)),bn$5.exports}var api={},vmBrowserify={},hasRequiredVmBrowserify;function requireVmBrowserify(){return hasRequiredVmBrowserify||(hasRequiredVmBrowserify=1,(function(exports$1){var indexOf=function(_,S){if(_.indexOf)return _.indexOf(S);for(var I=0;I<_.length;I++)if(_[I]===S)return I;return-1},Object_keys=function(_){if(Object.keys)return Object.keys(_);var S=[];for(var I in _)S.push(I);return S},forEach=function(_,S){if(_.forEach)return _.forEach(S);for(var I=0;I<_.length;I++)S(_[I],I,_)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(_,S,I){Object.defineProperty(_,S,{writable:!0,enumerable:!1,configurable:!0,value:I})}}catch{return function(S,I,p){S[I]=p}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports$1.Script=function(S){if(!(this instanceof Script))return new Script(S);this.code=S};Script.prototype.runInContext=function(_){if(!(_ instanceof Context))throw new TypeError("needs a 'context' argument.");var S=document.createElement("iframe");S.style||(S.style={}),S.style.display="none",document.body.appendChild(S);var I=S.contentWindow,p=I.eval,R=I.execScript;!p&&R&&(R.call(I,"null"),p=I.eval),forEach(Object_keys(_),function(m){I[m]=_[m]}),forEach(globals,function(m){_[m]&&(I[m]=_[m])});var f=Object_keys(I),w=p.call(I,this.code);return forEach(Object_keys(I),function(m){(m in _||indexOf(f,m)===-1)&&(_[m]=I[m])}),forEach(globals,function(m){m in _||defineProp(_,m,I[m])}),document.body.removeChild(S),w},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(_){var S=Script.createContext(_),I=this.runInContext(S);return _&&forEach(Object_keys(S),function(p){_[p]=S[p]}),I},forEach(Object_keys(Script.prototype),function(_){exports$1[_]=Script[_]=function(S){var I=Script(S);return I[_].apply(I,[].slice.call(arguments,1))}}),exports$1.isContext=function(_){return _ instanceof Context},exports$1.createScript=function(_){return exports$1.Script(_)},exports$1.createContext=Script.createContext=function(_){var S=new Context;return typeof _=="object"&&forEach(Object_keys(_),function(I){S[I]=_[I]}),S}})(vmBrowserify)),vmBrowserify}var hasRequiredApi;function requireApi(){return hasRequiredApi||(hasRequiredApi=1,(function(_){var S=requireAsn1$1(),I=requireInherits_browser(),p=_;p.define=function(w,m){return new R(w,m)};function R(f,w){this.name=f,this.body=w,this.decoders={},this.encoders={}}R.prototype._createNamed=function(w){var m;try{m=requireVmBrowserify().runInThisContext("(function "+this.name+`(entity) {
12
12
  this._initNamed(entity);
13
- })`)}catch{m=function(y){this._initNamed(y)}}return I(m,w),m.prototype._initNamed=function(y){w.call(this,y)},new m(this)},R.prototype._getDecoder=function(w){return w=w||"der",this.decoders.hasOwnProperty(w)||(this.decoders[w]=this._createNamed(S.decoders[w])),this.decoders[w]},R.prototype.decode=function(w,m,v){return this._getDecoder(m).decode(w,v)},R.prototype._getEncoder=function(w){return w=w||"der",this.encoders.hasOwnProperty(w)||(this.encoders[w]=this._createNamed(S.encoders[w])),this.encoders[w]},R.prototype.encode=function(w,m,v){return this._getEncoder(m).encode(w,v)}})(api)),api}var base={},reporter={},hasRequiredReporter;function requireReporter(){if(hasRequiredReporter)return reporter;hasRequiredReporter=1;var _=requireInherits_browser();function S(p){this._reporterState={obj:null,path:[],options:p||{},errors:[]}}reporter.Reporter=S,S.prototype.isError=function(R){return R instanceof I},S.prototype.save=function(){var R=this._reporterState;return{obj:R.obj,pathLen:R.path.length}},S.prototype.restore=function(R){var f=this._reporterState;f.obj=R.obj,f.path=f.path.slice(0,R.pathLen)},S.prototype.enterKey=function(R){return this._reporterState.path.push(R)},S.prototype.exitKey=function(R){var f=this._reporterState;f.path=f.path.slice(0,R-1)},S.prototype.leaveKey=function(R,f,w){var m=this._reporterState;this.exitKey(R),m.obj!==null&&(m.obj[f]=w)},S.prototype.path=function(){return this._reporterState.path.join("/")},S.prototype.enterObject=function(){var R=this._reporterState,f=R.obj;return R.obj={},f},S.prototype.leaveObject=function(R){var f=this._reporterState,w=f.obj;return f.obj=R,w},S.prototype.error=function(R){var f,w=this._reporterState,m=R instanceof I;if(m?f=R:f=new I(w.path.map(function(v){return"["+JSON.stringify(v)+"]"}).join(""),R.message||R,R.stack),!w.options.partial)throw f;return m||w.errors.push(f),f},S.prototype.wrapResult=function(R){var f=this._reporterState;return f.options.partial?{result:this.isError(R)?null:R,errors:f.errors}:R};function I(p,R){this.path=p,this.rethrow(R)}return _(I,Error),I.prototype.rethrow=function(R){if(this.message=R+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,I),!this.stack)try{throw new Error(this.message)}catch(f){this.stack=f.stack}return this},reporter}var buffer={},hasRequiredBuffer;function requireBuffer(){if(hasRequiredBuffer)return buffer;hasRequiredBuffer=1;var _=requireInherits_browser(),S=requireBase().Reporter,I=requireDist().Buffer;function p(f,w){if(S.call(this,w),!I.isBuffer(f)){this.error("Input not Buffer");return}this.base=f,this.offset=0,this.length=f.length}_(p,S),buffer.DecoderBuffer=p,p.prototype.save=function(){return{offset:this.offset,reporter:S.prototype.save.call(this)}},p.prototype.restore=function(w){var m=new p(this.base);return m.offset=w.offset,m.length=this.offset,this.offset=w.offset,S.prototype.restore.call(this,w.reporter),m},p.prototype.isEmpty=function(){return this.offset===this.length},p.prototype.readUInt8=function(w){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(w||"DecoderBuffer overrun")},p.prototype.skip=function(w,m){if(!(this.offset+w<=this.length))return this.error(m||"DecoderBuffer overrun");var v=new p(this.base);return v._reporterState=this._reporterState,v.offset=this.offset,v.length=this.offset+w,this.offset+=w,v},p.prototype.raw=function(w){return this.base.slice(w?w.offset:this.offset,this.length)};function R(f,w){if(Array.isArray(f))this.length=0,this.value=f.map(function(m){return m instanceof R||(m=new R(m,w)),this.length+=m.length,m},this);else if(typeof f=="number"){if(!(0<=f&&f<=255))return w.error("non-byte EncoderBuffer value");this.value=f,this.length=1}else if(typeof f=="string")this.value=f,this.length=I.byteLength(f);else if(I.isBuffer(f))this.value=f,this.length=f.length;else return w.error("Unsupported type: "+typeof f)}return buffer.EncoderBuffer=R,R.prototype.join=function(w,m){return w||(w=new I(this.length)),m||(m=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(v){v.join(w,m),m+=v.length}):(typeof this.value=="number"?w[m]=this.value:typeof this.value=="string"?w.write(this.value,m):I.isBuffer(this.value)&&this.value.copy(w,m),m+=this.length)),w},buffer}var node,hasRequiredNode;function requireNode(){if(hasRequiredNode)return node;hasRequiredNode=1;var _=requireBase().Reporter,S=requireBase().EncoderBuffer,I=requireBase().DecoderBuffer,p=requireMinimalisticAssert(),R=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(R),w=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function m(y,d){var g={};this._baseState=g,g.enc=y,g.parent=d||null,g.children=null,g.tag=null,g.args=null,g.reverseArgs=null,g.choice=null,g.optional=!1,g.any=!1,g.obj=!1,g.use=null,g.useDecoder=null,g.key=null,g.default=null,g.explicit=null,g.implicit=null,g.contains=null,g.parent||(g.children=[],this._wrap())}node=m;var v=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return m.prototype.clone=function(){var d=this._baseState,g={};v.forEach(function(x){g[x]=d[x]});var M=new this.constructor(g.parent);return M._baseState=g,M},m.prototype._wrap=function(){var d=this._baseState;f.forEach(function(g){this[g]=function(){var x=new this.constructor(this);return d.children.push(x),x[g].apply(x,arguments)}},this)},m.prototype._init=function(d){var g=this._baseState;p(g.parent===null),d.call(this),g.children=g.children.filter(function(M){return M._baseState.parent===this},this),p.equal(g.children.length,1,"Root node can have only one child")},m.prototype._useArgs=function(d){var g=this._baseState,M=d.filter(function(x){return x instanceof this.constructor},this);d=d.filter(function(x){return!(x instanceof this.constructor)},this),M.length!==0&&(p(g.children===null),g.children=M,M.forEach(function(x){x._baseState.parent=this},this)),d.length!==0&&(p(g.args===null),g.args=d,g.reverseArgs=d.map(function(x){if(typeof x!="object"||x.constructor!==Object)return x;var B={};return Object.keys(x).forEach(function(A){A==(A|0)&&(A|=0);var D=x[A];B[D]=A}),B}))},w.forEach(function(y){m.prototype[y]=function(){var g=this._baseState;throw new Error(y+" not implemented for encoding: "+g.enc)}}),R.forEach(function(y){m.prototype[y]=function(){var g=this._baseState,M=Array.prototype.slice.call(arguments);return p(g.tag===null),g.tag=y,this._useArgs(M),this}}),m.prototype.use=function(d){p(d);var g=this._baseState;return p(g.use===null),g.use=d,this},m.prototype.optional=function(){var d=this._baseState;return d.optional=!0,this},m.prototype.def=function(d){var g=this._baseState;return p(g.default===null),g.default=d,g.optional=!0,this},m.prototype.explicit=function(d){var g=this._baseState;return p(g.explicit===null&&g.implicit===null),g.explicit=d,this},m.prototype.implicit=function(d){var g=this._baseState;return p(g.explicit===null&&g.implicit===null),g.implicit=d,this},m.prototype.obj=function(){var d=this._baseState,g=Array.prototype.slice.call(arguments);return d.obj=!0,g.length!==0&&this._useArgs(g),this},m.prototype.key=function(d){var g=this._baseState;return p(g.key===null),g.key=d,this},m.prototype.any=function(){var d=this._baseState;return d.any=!0,this},m.prototype.choice=function(d){var g=this._baseState;return p(g.choice===null),g.choice=d,this._useArgs(Object.keys(d).map(function(M){return d[M]})),this},m.prototype.contains=function(d){var g=this._baseState;return p(g.use===null),g.contains=d,this},m.prototype._decode=function(d,g){var M=this._baseState;if(M.parent===null)return d.wrapResult(M.children[0]._decode(d,g));var x=M.default,B=!0,A=null;if(M.key!==null&&(A=d.enterKey(M.key)),M.optional){var D=null;if(M.explicit!==null?D=M.explicit:M.implicit!==null?D=M.implicit:M.tag!==null&&(D=M.tag),D===null&&!M.any){var C=d.save();try{M.choice===null?this._decodeGeneric(M.tag,d,g):this._decodeChoice(d,g),B=!0}catch{B=!1}d.restore(C)}else if(B=this._peekTag(d,D,M.any),d.isError(B))return B}var $;if(M.obj&&B&&($=d.enterObject()),B){if(M.explicit!==null){var H=this._decodeTag(d,M.explicit);if(d.isError(H))return H;d=H}var N=d.offset;if(M.use===null&&M.choice===null){if(M.any)var C=d.save();var V=this._decodeTag(d,M.implicit!==null?M.implicit:M.tag,M.any);if(d.isError(V))return V;M.any?x=d.raw(C):d=V}if(g&&g.track&&M.tag!==null&&g.track(d.path(),N,d.length,"tagged"),g&&g.track&&M.tag!==null&&g.track(d.path(),d.offset,d.length,"content"),M.any?x=x:M.choice===null?x=this._decodeGeneric(M.tag,d,g):x=this._decodeChoice(d,g),d.isError(x))return x;if(!M.any&&M.choice===null&&M.children!==null&&M.children.forEach(function(ae){ae._decode(d,g)}),M.contains&&(M.tag==="octstr"||M.tag==="bitstr")){var Q=new I(x);x=this._getUse(M.contains,d._reporterState.obj)._decode(Q,g)}}return M.obj&&B&&(x=d.leaveObject($)),M.key!==null&&(x!==null||B===!0)?d.leaveKey(A,M.key,x):A!==null&&d.exitKey(A),x},m.prototype._decodeGeneric=function(d,g,M){var x=this._baseState;return d==="seq"||d==="set"?null:d==="seqof"||d==="setof"?this._decodeList(g,d,x.args[0],M):/str$/.test(d)?this._decodeStr(g,d,M):d==="objid"&&x.args?this._decodeObjid(g,x.args[0],x.args[1],M):d==="objid"?this._decodeObjid(g,null,null,M):d==="gentime"||d==="utctime"?this._decodeTime(g,d,M):d==="null_"?this._decodeNull(g,M):d==="bool"?this._decodeBool(g,M):d==="objDesc"?this._decodeStr(g,d,M):d==="int"||d==="enum"?this._decodeInt(g,x.args&&x.args[0],M):x.use!==null?this._getUse(x.use,g._reporterState.obj)._decode(g,M):g.error("unknown tag: "+d)},m.prototype._getUse=function(d,g){var M=this._baseState;return M.useDecoder=this._use(d,g),p(M.useDecoder._baseState.parent===null),M.useDecoder=M.useDecoder._baseState.children[0],M.implicit!==M.useDecoder._baseState.implicit&&(M.useDecoder=M.useDecoder.clone(),M.useDecoder._baseState.implicit=M.implicit),M.useDecoder},m.prototype._decodeChoice=function(d,g){var M=this._baseState,x=null,B=!1;return Object.keys(M.choice).some(function(A){var D=d.save(),C=M.choice[A];try{var $=C._decode(d,g);if(d.isError($))return!1;x={type:A,value:$},B=!0}catch{return d.restore(D),!1}return!0},this),B?x:d.error("Choice not matched")},m.prototype._createEncoderBuffer=function(d){return new S(d,this.reporter)},m.prototype._encode=function(d,g,M){var x=this._baseState;if(!(x.default!==null&&x.default===d)){var B=this._encodeValue(d,g,M);if(B!==void 0&&!this._skipDefault(B,g,M))return B}},m.prototype._encodeValue=function(d,g,M){var x=this._baseState;if(x.parent===null)return x.children[0]._encode(d,g||new _);var C=null;if(this.reporter=g,x.optional&&d===void 0)if(x.default!==null)d=x.default;else return;var B=null,A=!1;if(x.any)C=this._createEncoderBuffer(d);else if(x.choice)C=this._encodeChoice(d,g);else if(x.contains)B=this._getUse(x.contains,M)._encode(d,g),A=!0;else if(x.children)B=x.children.map(function(N){if(N._baseState.tag==="null_")return N._encode(null,g,d);if(N._baseState.key===null)return g.error("Child should have a key");var V=g.enterKey(N._baseState.key);if(typeof d!="object")return g.error("Child expected, but input is not object");var Q=N._encode(d[N._baseState.key],g,d);return g.leaveKey(V),Q},this).filter(function(N){return N}),B=this._createEncoderBuffer(B);else if(x.tag==="seqof"||x.tag==="setof"){if(!(x.args&&x.args.length===1))return g.error("Too many args for : "+x.tag);if(!Array.isArray(d))return g.error("seqof/setof, but data is not Array");var D=this.clone();D._baseState.implicit=null,B=this._createEncoderBuffer(d.map(function(N){var V=this._baseState;return this._getUse(V.args[0],d)._encode(N,g)},D))}else x.use!==null?C=this._getUse(x.use,M)._encode(d,g):(B=this._encodePrimitive(x.tag,d),A=!0);var C;if(!x.any&&x.choice===null){var $=x.implicit!==null?x.implicit:x.tag,H=x.implicit===null?"universal":"context";$===null?x.use===null&&g.error("Tag could be omitted only for .use()"):x.use===null&&(C=this._encodeComposite($,A,H,B))}return x.explicit!==null&&(C=this._encodeComposite(x.explicit,!1,"context",C)),C},m.prototype._encodeChoice=function(d,g){var M=this._baseState,x=M.choice[d.type];return x||p(!1,d.type+" not found in "+JSON.stringify(Object.keys(M.choice))),x._encode(d.value,g)},m.prototype._encodePrimitive=function(d,g){var M=this._baseState;if(/str$/.test(d))return this._encodeStr(g,d);if(d==="objid"&&M.args)return this._encodeObjid(g,M.reverseArgs[0],M.args[1]);if(d==="objid")return this._encodeObjid(g,null,null);if(d==="gentime"||d==="utctime")return this._encodeTime(g,d);if(d==="null_")return this._encodeNull();if(d==="int"||d==="enum")return this._encodeInt(g,M.args&&M.reverseArgs[0]);if(d==="bool")return this._encodeBool(g);if(d==="objDesc")return this._encodeStr(g,d);throw new Error("Unsupported tag: "+d)},m.prototype._isNumstr=function(d){return/^[0-9 ]*$/.test(d)},m.prototype._isPrintstr=function(d){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(d)},node}var hasRequiredBase;function requireBase(){return hasRequiredBase||(hasRequiredBase=1,(function(_){var S=_;S.Reporter=requireReporter().Reporter,S.DecoderBuffer=requireBuffer().DecoderBuffer,S.EncoderBuffer=requireBuffer().EncoderBuffer,S.Node=requireNode()})(base)),base}var constants={},der={},hasRequiredDer$2;function requireDer$2(){return hasRequiredDer$2||(hasRequiredDer$2=1,(function(_){var S=requireConstants();_.tagClass={0:"universal",1:"application",2:"context",3:"private"},_.tagClassByName=S._reverse(_.tagClass),_.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},_.tagByName=S._reverse(_.tag)})(der)),der}var hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,(function(_){var S=_;S._reverse=function(p){var R={};return Object.keys(p).forEach(function(f){(f|0)==f&&(f=f|0);var w=p[f];R[w]=f}),R},S.der=requireDer$2()})(constants)),constants}var decoders={},der_1$1,hasRequiredDer$1;function requireDer$1(){if(hasRequiredDer$1)return der_1$1;hasRequiredDer$1=1;var _=requireInherits_browser(),S=requireAsn1$1(),I=S.base,p=S.bignum,R=S.constants.der;function f(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new w,this.tree._init(y.body)}der_1$1=f,f.prototype.decode=function(d,g){return d instanceof I.DecoderBuffer||(d=new I.DecoderBuffer(d,g)),this.tree._decode(d,g)};function w(y){I.Node.call(this,"der",y)}_(w,I.Node),w.prototype._peekTag=function(d,g,M){if(d.isEmpty())return!1;var x=d.save(),B=m(d,'Failed to peek tag: "'+g+'"');return d.isError(B)?B:(d.restore(x),B.tag===g||B.tagStr===g||B.tagStr+"of"===g||M)},w.prototype._decodeTag=function(d,g,M){var x=m(d,'Failed to decode tag of "'+g+'"');if(d.isError(x))return x;var B=v(d,x.primitive,'Failed to get length of "'+g+'"');if(d.isError(B))return B;if(!M&&x.tag!==g&&x.tagStr!==g&&x.tagStr+"of"!==g)return d.error('Failed to match tag: "'+g+'"');if(x.primitive||B!==null)return d.skip(B,'Failed to match body of: "'+g+'"');var A=d.save(),D=this._skipUntilEnd(d,'Failed to skip indefinite length body: "'+this.tag+'"');return d.isError(D)?D:(B=d.offset-A.offset,d.restore(A),d.skip(B,'Failed to match body of: "'+g+'"'))},w.prototype._skipUntilEnd=function(d,g){for(;;){var M=m(d,g);if(d.isError(M))return M;var x=v(d,M.primitive,g);if(d.isError(x))return x;var B;if(M.primitive||x!==null?B=d.skip(x):B=this._skipUntilEnd(d,g),d.isError(B))return B;if(M.tagStr==="end")break}},w.prototype._decodeList=function(d,g,M,x){for(var B=[];!d.isEmpty();){var A=this._peekTag(d,"end");if(d.isError(A))return A;var D=M.decode(d,"der",x);if(d.isError(D)&&A)break;B.push(D)}return B},w.prototype._decodeStr=function(d,g){if(g==="bitstr"){var M=d.readUInt8();return d.isError(M)?M:{unused:M,data:d.raw()}}else if(g==="bmpstr"){var x=d.raw();if(x.length%2===1)return d.error("Decoding of string type: bmpstr length mismatch");for(var B="",A=0;A<x.length/2;A++)B+=String.fromCharCode(x.readUInt16BE(A*2));return B}else if(g==="numstr"){var D=d.raw().toString("ascii");return this._isNumstr(D)?D:d.error("Decoding of string type: numstr unsupported characters")}else{if(g==="octstr")return d.raw();if(g==="objDesc")return d.raw();if(g==="printstr"){var C=d.raw().toString("ascii");return this._isPrintstr(C)?C:d.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(g)?d.raw().toString():d.error("Decoding of string type: "+g+" unsupported")}},w.prototype._decodeObjid=function(d,g,M){for(var x,B=[],A=0;!d.isEmpty();){var D=d.readUInt8();A<<=7,A|=D&127,(D&128)===0&&(B.push(A),A=0)}D&128&&B.push(A);var C=B[0]/40|0,$=B[0]%40;if(M?x=B:x=[C,$].concat(B.slice(1)),g){var H=g[x.join(" ")];H===void 0&&(H=g[x.join(".")]),H!==void 0&&(x=H)}return x},w.prototype._decodeTime=function(d,g){var M=d.raw().toString();if(g==="gentime")var x=M.slice(0,4)|0,B=M.slice(4,6)|0,A=M.slice(6,8)|0,D=M.slice(8,10)|0,C=M.slice(10,12)|0,$=M.slice(12,14)|0;else if(g==="utctime"){var x=M.slice(0,2)|0,B=M.slice(2,4)|0,A=M.slice(4,6)|0,D=M.slice(6,8)|0,C=M.slice(8,10)|0,$=M.slice(10,12)|0;x<70?x=2e3+x:x=1900+x}else return d.error("Decoding "+g+" time is not supported yet");return Date.UTC(x,B-1,A,D,C,$,0)},w.prototype._decodeNull=function(d){return null},w.prototype._decodeBool=function(d){var g=d.readUInt8();return d.isError(g)?g:g!==0},w.prototype._decodeInt=function(d,g){var M=d.raw(),x=new p(M);return g&&(x=g[x.toString(10)]||x),x},w.prototype._use=function(d,g){return typeof d=="function"&&(d=d(g)),d._getDecoder("der").tree};function m(y,d){var g=y.readUInt8(d);if(y.isError(g))return g;var M=R.tagClass[g>>6],x=(g&32)===0;if((g&31)===31){var B=g;for(g=0;(B&128)===128;){if(B=y.readUInt8(d),y.isError(B))return B;g<<=7,g|=B&127}}else g&=31;var A=R.tag[g];return{cls:M,primitive:x,tag:g,tagStr:A}}function v(y,d,g){var M=y.readUInt8(g);if(y.isError(M))return M;if(!d&&M===128)return null;if((M&128)===0)return M;var x=M&127;if(x>4)return y.error("length octect is too long");M=0;for(var B=0;B<x;B++){M<<=8;var A=y.readUInt8(g);if(y.isError(A))return A;M|=A}return M}return der_1$1}var pem$1,hasRequiredPem$1;function requirePem$1(){if(hasRequiredPem$1)return pem$1;hasRequiredPem$1=1;var _=requireInherits_browser(),S=requireDist().Buffer,I=requireDer$1();function p(R){I.call(this,R),this.enc="pem"}return _(p,I),pem$1=p,p.prototype.decode=function(f,w){for(var m=f.toString().split(/[\r\n]+/g),v=w.label.toUpperCase(),y=/^-----(BEGIN|END) ([^-]+)-----$/,d=-1,g=-1,M=0;M<m.length;M++){var x=m[M].match(y);if(x!==null&&x[2]===v)if(d===-1){if(x[1]!=="BEGIN")break;d=M}else{if(x[1]!=="END")break;g=M;break}}if(d===-1||g===-1)throw new Error("PEM section not found for: "+v);var B=m.slice(d+1,g).join("");B.replace(/[^a-z0-9\+\/=]+/gi,"");var A=new S(B,"base64");return I.prototype.decode.call(this,A,w)},pem$1}var hasRequiredDecoders;function requireDecoders(){return hasRequiredDecoders||(hasRequiredDecoders=1,(function(_){var S=_;S.der=requireDer$1(),S.pem=requirePem$1()})(decoders)),decoders}var encoders={},der_1,hasRequiredDer;function requireDer(){if(hasRequiredDer)return der_1;hasRequiredDer=1;var _=requireInherits_browser(),S=requireDist().Buffer,I=requireAsn1$1(),p=I.base,R=I.constants.der;function f(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new w,this.tree._init(y.body)}der_1=f,f.prototype.encode=function(d,g){return this.tree._encode(d,g).join()};function w(y){p.Node.call(this,"der",y)}_(w,p.Node),w.prototype._encodeComposite=function(d,g,M,x){var B=v(d,g,M,this.reporter);if(x.length<128){var C=new S(2);return C[0]=B,C[1]=x.length,this._createEncoderBuffer([C,x])}for(var A=1,D=x.length;D>=256;D>>=8)A++;var C=new S(2+A);C[0]=B,C[1]=128|A;for(var D=1+A,$=x.length;$>0;D--,$>>=8)C[D]=$&255;return this._createEncoderBuffer([C,x])},w.prototype._encodeStr=function(d,g){if(g==="bitstr")return this._createEncoderBuffer([d.unused|0,d.data]);if(g==="bmpstr"){for(var M=new S(d.length*2),x=0;x<d.length;x++)M.writeUInt16BE(d.charCodeAt(x),x*2);return this._createEncoderBuffer(M)}else return g==="numstr"?this._isNumstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: numstr supports only digits and space"):g==="printstr"?this._isPrintstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(g)?this._createEncoderBuffer(d):g==="objDesc"?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: "+g+" unsupported")},w.prototype._encodeObjid=function(d,g,M){if(typeof d=="string"){if(!g)return this.reporter.error("string objid given, but no values map found");if(!g.hasOwnProperty(d))return this.reporter.error("objid not found in values map");d=g[d].split(/[\s\.]+/g);for(var x=0;x<d.length;x++)d[x]|=0}else if(Array.isArray(d)){d=d.slice();for(var x=0;x<d.length;x++)d[x]|=0}if(!Array.isArray(d))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(d));if(!M){if(d[1]>=40)return this.reporter.error("Second objid identifier OOB");d.splice(0,2,d[0]*40+d[1])}for(var B=0,x=0;x<d.length;x++){var A=d[x];for(B++;A>=128;A>>=7)B++}for(var D=new S(B),C=D.length-1,x=d.length-1;x>=0;x--){var A=d[x];for(D[C--]=A&127;(A>>=7)>0;)D[C--]=128|A&127}return this._createEncoderBuffer(D)};function m(y){return y<10?"0"+y:y}w.prototype._encodeTime=function(d,g){var M,x=new Date(d);return g==="gentime"?M=[m(x.getFullYear()),m(x.getUTCMonth()+1),m(x.getUTCDate()),m(x.getUTCHours()),m(x.getUTCMinutes()),m(x.getUTCSeconds()),"Z"].join(""):g==="utctime"?M=[m(x.getFullYear()%100),m(x.getUTCMonth()+1),m(x.getUTCDate()),m(x.getUTCHours()),m(x.getUTCMinutes()),m(x.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+g+" time is not supported yet"),this._encodeStr(M,"octstr")},w.prototype._encodeNull=function(){return this._createEncoderBuffer("")},w.prototype._encodeInt=function(d,g){if(typeof d=="string"){if(!g)return this.reporter.error("String int or enum given, but no values map");if(!g.hasOwnProperty(d))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(d));d=g[d]}if(typeof d!="number"&&!S.isBuffer(d)){var M=d.toArray();!d.sign&&M[0]&128&&M.unshift(0),d=new S(M)}if(S.isBuffer(d)){var x=d.length;d.length===0&&x++;var A=new S(x);return d.copy(A),d.length===0&&(A[0]=0),this._createEncoderBuffer(A)}if(d<128)return this._createEncoderBuffer(d);if(d<256)return this._createEncoderBuffer([0,d]);for(var x=1,B=d;B>=256;B>>=8)x++;for(var A=new Array(x),B=A.length-1;B>=0;B--)A[B]=d&255,d>>=8;return A[0]&128&&A.unshift(0),this._createEncoderBuffer(new S(A))},w.prototype._encodeBool=function(d){return this._createEncoderBuffer(d?255:0)},w.prototype._use=function(d,g){return typeof d=="function"&&(d=d(g)),d._getEncoder("der").tree},w.prototype._skipDefault=function(d,g,M){var x=this._baseState,B;if(x.default===null)return!1;var A=d.join();if(x.defaultBuffer===void 0&&(x.defaultBuffer=this._encodeValue(x.default,g,M).join()),A.length!==x.defaultBuffer.length)return!1;for(B=0;B<A.length;B++)if(A[B]!==x.defaultBuffer[B])return!1;return!0};function v(y,d,g,M){var x;if(y==="seqof"?y="seq":y==="setof"&&(y="set"),R.tagByName.hasOwnProperty(y))x=R.tagByName[y];else if(typeof y=="number"&&(y|0)===y)x=y;else return M.error("Unknown tag: "+y);return x>=31?M.error("Multi-octet tag encoding unsupported"):(d||(x|=32),x|=R.tagClassByName[g||"universal"]<<6,x)}return der_1}var pem,hasRequiredPem;function requirePem(){if(hasRequiredPem)return pem;hasRequiredPem=1;var _=requireInherits_browser(),S=requireDer();function I(p){S.call(this,p),this.enc="pem"}return _(I,S),pem=I,I.prototype.encode=function(R,f){for(var w=S.prototype.encode.call(this,R),m=w.toString("base64"),v=["-----BEGIN "+f.label+"-----"],y=0;y<m.length;y+=64)v.push(m.slice(y,y+64));return v.push("-----END "+f.label+"-----"),v.join(`
14
- `)},pem}var hasRequiredEncoders;function requireEncoders(){return hasRequiredEncoders||(hasRequiredEncoders=1,(function(_){var S=_;S.der=requireDer(),S.pem=requirePem()})(encoders)),encoders}var hasRequiredAsn1$1;function requireAsn1$1(){return hasRequiredAsn1$1||(hasRequiredAsn1$1=1,(function(_){var S=_;S.bignum=requireBn$2(),S.define=requireApi().define,S.base=requireBase(),S.constants=requireConstants(),S.decoders=requireDecoders(),S.encoders=requireEncoders()})(asn1)),asn1}var certificate,hasRequiredCertificate;function requireCertificate(){if(hasRequiredCertificate)return certificate;hasRequiredCertificate=1;var _=requireAsn1$1(),S=_.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),I=_.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),p=_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),R=_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())}),f=_.define("RelativeDistinguishedName",function(){this.setof(I)}),w=_.define("RDNSequence",function(){this.seqof(f)}),m=_.define("Name",function(){this.choice({rdnSequence:this.use(w)})}),v=_.define("Validity",function(){this.seq().obj(this.key("notBefore").use(S),this.key("notAfter").use(S))}),y=_.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=_.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(p),this.key("issuer").use(m),this.key("validity").use(v),this.key("subject").use(m),this.key("subjectPublicKeyInfo").use(R),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(y).optional())}),g=_.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(p),this.key("signatureValue").bitstr())});return certificate=g,certificate}var hasRequiredAsn1;function requireAsn1(){if(hasRequiredAsn1)return asn1$1;hasRequiredAsn1=1;var _=requireAsn1$1();asn1$1.certificate=requireCertificate();var S=_.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});asn1$1.RSAPrivateKey=S;var I=_.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});asn1$1.RSAPublicKey=I;var p=_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),R=_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())});asn1$1.PublicKey=R;var f=_.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(p),this.key("subjectPrivateKey").octstr())});asn1$1.PrivateKey=f;var w=_.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});asn1$1.EncryptedPrivateKey=w;var m=_.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});asn1$1.DSAPrivateKey=m,asn1$1.DSAparam=_.define("DSAparam",function(){this.int()});var v=_.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),y=_.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(v),this.key("publicKey").optional().explicit(1).bitstr())});return asn1$1.ECPrivateKey=y,asn1$1.signature=_.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}),asn1$1}const require$$1={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"};var fixProc,hasRequiredFixProc;function requireFixProc(){if(hasRequiredFixProc)return fixProc;hasRequiredFixProc=1;var _=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,S=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,I=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,p=requireEvp_bytestokey(),R=requireBrowser$6(),f=requireSafeBuffer$2().Buffer;return fixProc=function(w,m){var v=w.toString(),y=v.match(_),d;if(y){var M="aes"+y[1],x=f.from(y[2],"hex"),B=f.from(y[3].replace(/[\r\n]/g,""),"base64"),A=p(m,x.slice(0,8),parseInt(y[1],10)).key,D=[],C=R.createDecipheriv(M,A,x);D.push(C.update(B)),D.push(C.final()),d=f.concat(D)}else{var g=v.match(I);d=f.from(g[2].replace(/[\r\n]/g,""),"base64")}var $=v.match(S)[1];return{tag:$,data:d}},fixProc}var parseAsn1,hasRequiredParseAsn1;function requireParseAsn1(){if(hasRequiredParseAsn1)return parseAsn1;hasRequiredParseAsn1=1;var _=requireAsn1(),S=require$$1,I=requireFixProc(),p=requireBrowser$6(),R=requireBrowser$7().pbkdf2Sync,f=requireSafeBuffer$2().Buffer;function w(v,y){var d=v.algorithm.decrypt.kde.kdeparams.salt,g=parseInt(v.algorithm.decrypt.kde.kdeparams.iters.toString(),10),M=S[v.algorithm.decrypt.cipher.algo.join(".")],x=v.algorithm.decrypt.cipher.iv,B=v.subjectPrivateKey,A=parseInt(M.split("-")[1],10)/8,D=R(y,d,g,A,"sha1"),C=p.createDecipheriv(M,D,x),$=[];return $.push(C.update(B)),$.push(C.final()),f.concat($)}function m(v){var y;typeof v=="object"&&!f.isBuffer(v)&&(y=v.passphrase,v=v.key),typeof v=="string"&&(v=f.from(v));var d=I(v,y),g=d.tag,M=d.data,x,B;switch(g){case"CERTIFICATE":B=_.certificate.decode(M,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(B||(B=_.PublicKey.decode(M,"der")),x=B.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return _.RSAPublicKey.decode(B.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return B.subjectPrivateKey=B.subjectPublicKey,{type:"ec",data:B};case"1.2.840.10040.4.1":return B.algorithm.params.pub_key=_.DSAparam.decode(B.subjectPublicKey.data,"der"),{type:"dsa",data:B.algorithm.params};default:throw new Error("unknown key id "+x)}case"ENCRYPTED PRIVATE KEY":M=_.EncryptedPrivateKey.decode(M,"der"),M=w(M,y);case"PRIVATE KEY":switch(B=_.PrivateKey.decode(M,"der"),x=B.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return _.RSAPrivateKey.decode(B.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:B.algorithm.curve,privateKey:_.ECPrivateKey.decode(B.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return B.algorithm.params.priv_key=_.DSAparam.decode(B.subjectPrivateKey,"der"),{type:"dsa",params:B.algorithm.params};default:throw new Error("unknown key id "+x)}case"RSA PUBLIC KEY":return _.RSAPublicKey.decode(M,"der");case"RSA PRIVATE KEY":return _.RSAPrivateKey.decode(M,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:_.DSAPrivateKey.decode(M,"der")};case"EC PRIVATE KEY":return M=_.ECPrivateKey.decode(M,"der"),{curve:M.parameters.value,privateKey:M.privateKey};default:throw new Error("unknown key type "+g)}}return m.signature=_.signature,parseAsn1=m,parseAsn1}const require$$4={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};var hasRequiredSign;function requireSign(){if(hasRequiredSign)return sign.exports;hasRequiredSign=1;var _=requireSafeBuffer$2().Buffer,S=requireBrowser$8(),I=requireBrowserifyRsa(),p=requireElliptic().ec,R=requireBn$4(),f=requireParseAsn1(),w=require$$4,m=1;function v(C,$,H,N,V){var Q=f($);if(Q.curve){if(N!=="ecdsa"&&N!=="ecdsa/rsa")throw new Error("wrong private key type");return y(C,Q)}else if(Q.type==="dsa"){if(N!=="dsa")throw new Error("wrong private key type");return d(C,Q,H)}if(N!=="rsa"&&N!=="ecdsa/rsa")throw new Error("wrong private key type");if($.padding!==void 0&&$.padding!==m)throw new Error("illegal or unsupported padding mode");C=_.concat([V,C]);for(var ne=Q.modulus.byteLength(),ae=[0,1];C.length+ae.length+1<ne;)ae.push(255);ae.push(0);for(var ee=-1;++ee<C.length;)ae.push(C[ee]);var le=I(ae,Q);return le}function y(C,$){var H=w[$.curve.join(".")];if(!H)throw new Error("unknown curve "+$.curve.join("."));var N=new p(H),V=N.keyFromPrivate($.privateKey),Q=V.sign(C);return _.from(Q.toDER())}function d(C,$,H){for(var N=$.params.priv_key,V=$.params.p,Q=$.params.q,ne=$.params.g,ae=new R(0),ee,le=x(C,Q).mod(Q),c=!1,e=M(N,Q,C,H);c===!1;)ee=A(Q,e,H),ae=D(ne,ee,V,Q),c=ee.invm(Q).imul(le.add(N.mul(ae))).mod(Q),c.cmpn(0)===0&&(c=!1,ae=new R(0));return g(ae,c)}function g(C,$){C=C.toArray(),$=$.toArray(),C[0]&128&&(C=[0].concat(C)),$[0]&128&&($=[0].concat($));var H=C.length+$.length+4,N=[48,H,2,C.length];return N=N.concat(C,[2,$.length],$),_.from(N)}function M(C,$,H,N){if(C=_.from(C.toArray()),C.length<$.byteLength()){var V=_.alloc($.byteLength()-C.length);C=_.concat([V,C])}var Q=H.length,ne=B(H,$),ae=_.alloc(Q);ae.fill(1);var ee=_.alloc(Q);return ee=S(N,ee).update(ae).update(_.from([0])).update(C).update(ne).digest(),ae=S(N,ee).update(ae).digest(),ee=S(N,ee).update(ae).update(_.from([1])).update(C).update(ne).digest(),ae=S(N,ee).update(ae).digest(),{k:ee,v:ae}}function x(C,$){var H=new R(C),N=(C.length<<3)-$.bitLength();return N>0&&H.ishrn(N),H}function B(C,$){C=x(C,$),C=C.mod($);var H=_.from(C.toArray());if(H.length<$.byteLength()){var N=_.alloc($.byteLength()-H.length);H=_.concat([N,H])}return H}function A(C,$,H){var N,V;do{for(N=_.alloc(0);N.length*8<C.bitLength();)$.v=S(H,$.k).update($.v).digest(),N=_.concat([N,$.v]);V=x(N,C),$.k=S(H,$.k).update($.v).update(_.from([0])).digest(),$.v=S(H,$.k).update($.v).digest()}while(V.cmp(C)!==-1);return V}function D(C,$,H,N){return C.toRed(R.mont(H)).redPow($).fromRed().mod(N)}return sign.exports=v,sign.exports.getKey=M,sign.exports.makeKey=A,sign.exports}var verify_1,hasRequiredVerify;function requireVerify(){if(hasRequiredVerify)return verify_1;hasRequiredVerify=1;var _=requireSafeBuffer$2().Buffer,S=requireBn$4(),I=requireElliptic().ec,p=requireParseAsn1(),R=require$$4;function f(y,d,g,M,x){var B=p(g);if(B.type==="ec"){if(M!=="ecdsa"&&M!=="ecdsa/rsa")throw new Error("wrong public key type");return w(y,d,B)}else if(B.type==="dsa"){if(M!=="dsa")throw new Error("wrong public key type");return m(y,d,B)}if(M!=="rsa"&&M!=="ecdsa/rsa")throw new Error("wrong public key type");d=_.concat([x,d]);for(var A=B.modulus.byteLength(),D=[1],C=0;d.length+D.length+2<A;)D.push(255),C+=1;D.push(0);for(var $=-1;++$<d.length;)D.push(d[$]);D=_.from(D);var H=S.mont(B.modulus);y=new S(y).toRed(H),y=y.redPow(new S(B.publicExponent)),y=_.from(y.fromRed().toArray());var N=C<8?1:0;for(A=Math.min(y.length,D.length),y.length!==D.length&&(N=1),$=-1;++$<A;)N|=y[$]^D[$];return N===0}function w(y,d,g){var M=R[g.data.algorithm.curve.join(".")];if(!M)throw new Error("unknown curve "+g.data.algorithm.curve.join("."));var x=new I(M),B=g.data.subjectPrivateKey.data;return x.verify(d,y,B)}function m(y,d,g){var M=g.data.p,x=g.data.q,B=g.data.g,A=g.data.pub_key,D=p.signature.decode(y,"der"),C=D.s,$=D.r;v(C,x),v($,x);var H=S.mont(M),N=C.invm(x),V=B.toRed(H).redPow(new S(d).mul(N).mod(x)).fromRed().mul(A.toRed(H).redPow($.mul(N).mod(x)).fromRed()).mod(M).mod(x);return V.cmp($)===0}function v(y,d){if(y.cmpn(0)<=0)throw new Error("invalid sig");if(y.cmp(d)>=0)throw new Error("invalid sig")}return verify_1=f,verify_1}var browser$3,hasRequiredBrowser$3;function requireBrowser$3(){if(hasRequiredBrowser$3)return browser$3;hasRequiredBrowser$3=1;var _=requireSafeBuffer$2().Buffer,S=requireBrowser$9(),I=requireReadableBrowser(),p=requireInherits_browser(),R=requireSign(),f=requireVerify(),w=require$$6;Object.keys(w).forEach(function(g){w[g].id=_.from(w[g].id,"hex"),w[g.toLowerCase()]=w[g]});function m(g){I.Writable.call(this);var M=w[g];if(!M)throw new Error("Unknown message digest");this._hashType=M.hash,this._hash=S(M.hash),this._tag=M.id,this._signType=M.sign}p(m,I.Writable),m.prototype._write=function(M,x,B){this._hash.update(M),B()},m.prototype.update=function(M,x){return this._hash.update(typeof M=="string"?_.from(M,x):M),this},m.prototype.sign=function(M,x){this.end();var B=this._hash.digest(),A=R(B,M,this._hashType,this._signType,this._tag);return x?A.toString(x):A};function v(g){I.Writable.call(this);var M=w[g];if(!M)throw new Error("Unknown message digest");this._hash=S(M.hash),this._tag=M.id,this._signType=M.sign}p(v,I.Writable),v.prototype._write=function(M,x,B){this._hash.update(M),B()},v.prototype.update=function(M,x){return this._hash.update(typeof M=="string"?_.from(M,x):M),this},v.prototype.verify=function(M,x,B){var A=typeof x=="string"?_.from(x,B):x;this.end();var D=this._hash.digest();return f(A,D,M,this._signType,this._tag)};function y(g){return new m(g)}function d(g){return new v(g)}return browser$3={Sign:y,Verify:d,createSign:y,createVerify:d},browser$3}var bn$3={exports:{}},bn$2=bn$3.exports,hasRequiredBn$1;function requireBn$1(){return hasRequiredBn$1||(hasRequiredBn$1=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$2)})(bn$3)),bn$3.exports}var browser$2,hasRequiredBrowser$2;function requireBrowser$2(){if(hasRequiredBrowser$2)return browser$2;hasRequiredBrowser$2=1;var _=requireElliptic(),S=requireBn$1();browser$2=function(w){return new p(w)};var I={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};I.p224=I.secp224r1,I.p256=I.secp256r1=I.prime256v1,I.p192=I.secp192r1=I.prime192v1,I.p384=I.secp384r1,I.p521=I.secp521r1;function p(f){this.curveType=I[f],this.curveType||(this.curveType={name:f}),this.curve=new _.ec(this.curveType.name),this.keys=void 0}p.prototype.generateKeys=function(f,w){return this.keys=this.curve.genKeyPair(),this.getPublicKey(f,w)},p.prototype.computeSecret=function(f,w,m){w=w||"utf8",Buffer.isBuffer(f)||(f=new Buffer(f,w));var v=this.curve.keyFromPublic(f).getPublic(),y=v.mul(this.keys.getPrivate()).getX();return R(y,m,this.curveType.byteLength)},p.prototype.getPublicKey=function(f,w){var m=this.keys.getPublic(w==="compressed",!0);return w==="hybrid"&&(m[m.length-1]%2?m[0]=7:m[0]=6),R(m,f)},p.prototype.getPrivateKey=function(f){return R(this.keys.getPrivate(),f)},p.prototype.setPublicKey=function(f,w){return w=w||"utf8",Buffer.isBuffer(f)||(f=new Buffer(f,w)),this.keys._importPublic(f),this},p.prototype.setPrivateKey=function(f,w){w=w||"utf8",Buffer.isBuffer(f)||(f=new Buffer(f,w));var m=new S(f);return m=m.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(m),this};function R(f,w,m){Array.isArray(f)||(f=f.toArray());var v=new Buffer(f);if(m&&v.length<m){var y=new Buffer(m-v.length);y.fill(0),v=Buffer.concat([y,v])}return w?v.toString(w):v}return browser$2}var browser$1={},mgf,hasRequiredMgf;function requireMgf(){if(hasRequiredMgf)return mgf;hasRequiredMgf=1;var _=requireBrowser$9(),S=requireSafeBuffer$2().Buffer;mgf=function(p,R){for(var f=S.alloc(0),w=0,m;f.length<R;)m=I(w++),f=S.concat([f,_("sha1").update(p).update(m).digest()]);return f.slice(0,R)};function I(p){var R=S.allocUnsafe(4);return R.writeUInt32BE(p,0),R}return mgf}var xor,hasRequiredXor;function requireXor(){return hasRequiredXor||(hasRequiredXor=1,xor=function(S,I){for(var p=S.length,R=-1;++R<p;)S[R]^=I[R];return S}),xor}var bn$1={exports:{}},bn=bn$1.exports,hasRequiredBn;function requireBn(){return hasRequiredBn||(hasRequiredBn=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,P=a[2]|0,W=P&8191,J=P>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,$e=a[5]|0,me=$e&8191,se=$e>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,Pe=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,Pe)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,Pe)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,Pe)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,Pe)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,Pe)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,Pe)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,Pe)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,Pe)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,Pe)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,Pe)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,Pe)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,Pe)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,Pe)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,Pe)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,Pe)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,Pe)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,Pe)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,Pe)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,Pe),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,Pe);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new $;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function $(c,e){this.x=c,this.y=e}$.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},$.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},$.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},$.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],P=n[b+Y+l],W=a[b+Y+l],J=E*P-L*W;W=E*W+L*P,P=J,n[b+Y]=K+P,a[b+Y]=q+W,n[b+Y+l]=K-P,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},$.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},$.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},$.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},$.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},$.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},$.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn)})(bn$1)),bn$1.exports}var withPublic_1,hasRequiredWithPublic;function requireWithPublic(){if(hasRequiredWithPublic)return withPublic_1;hasRequiredWithPublic=1;var _=requireBn(),S=requireSafeBuffer$2().Buffer;function I(p,R){return S.from(p.toRed(_.mont(R.modulus)).redPow(new _(R.publicExponent)).fromRed().toArray())}return withPublic_1=I,withPublic_1}var publicEncrypt,hasRequiredPublicEncrypt;function requirePublicEncrypt(){if(hasRequiredPublicEncrypt)return publicEncrypt;hasRequiredPublicEncrypt=1;var _=requireParseAsn1(),S=requireBrowser$b(),I=requireBrowser$9(),p=requireMgf(),R=requireXor(),f=requireBn(),w=requireWithPublic(),m=requireBrowserifyRsa(),v=requireSafeBuffer$2().Buffer;publicEncrypt=function(x,B,A){var D;x.padding?D=x.padding:A?D=1:D=4;var C=_(x),$;if(D===4)$=y(C,B);else if(D===1)$=d(C,B,A);else if(D===3){if($=new f(B),$.cmp(C.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return A?m($,C):w($,C)};function y(M,x){var B=M.modulus.byteLength(),A=x.length,D=I("sha1").update(v.alloc(0)).digest(),C=D.length,$=2*C;if(A>B-$-2)throw new Error("message too long");var H=v.alloc(B-A-$-2),N=B-C-1,V=S(C),Q=R(v.concat([D,H,v.alloc(1,1),x],N),p(V,N)),ne=R(V,p(Q,C));return new f(v.concat([v.alloc(1),ne,Q],B))}function d(M,x,B){var A=x.length,D=M.modulus.byteLength();if(A>D-11)throw new Error("message too long");var C;return B?C=v.alloc(D-A-3,255):C=g(D-A-3),new f(v.concat([v.from([0,B?1:2]),C,v.alloc(1),x],D))}function g(M){for(var x=v.allocUnsafe(M),B=0,A=S(M*2),D=0,C;B<M;)D===A.length&&(A=S(M*2),D=0),C=A[D++],C&&(x[B++]=C);return x}return publicEncrypt}var privateDecrypt,hasRequiredPrivateDecrypt;function requirePrivateDecrypt(){if(hasRequiredPrivateDecrypt)return privateDecrypt;hasRequiredPrivateDecrypt=1;var _=requireParseAsn1(),S=requireMgf(),I=requireXor(),p=requireBn(),R=requireBrowserifyRsa(),f=requireBrowser$9(),w=requireWithPublic(),m=requireSafeBuffer$2().Buffer;privateDecrypt=function(M,x,B){var A;M.padding?A=M.padding:B?A=1:A=4;var D=_(M),C=D.modulus.byteLength();if(x.length>C||new p(x).cmp(D.modulus)>=0)throw new Error("decryption error");var $;B?$=w(new p(x),D):$=R(x,D);var H=m.alloc(C-$.length);if($=m.concat([H,$],C),A===4)return v(D,$);if(A===1)return y(D,$,B);if(A===3)return $;throw new Error("unknown padding")};function v(g,M){var x=g.modulus.byteLength(),B=f("sha1").update(m.alloc(0)).digest(),A=B.length;if(M[0]!==0)throw new Error("decryption error");var D=M.slice(1,A+1),C=M.slice(A+1),$=I(D,S(C,A)),H=I(C,S($,x-A-1));if(d(B,H.slice(0,A)))throw new Error("decryption error");for(var N=A;H[N]===0;)N++;if(H[N++]!==1)throw new Error("decryption error");return H.slice(N)}function y(g,M,x){for(var B=M.slice(0,2),A=2,D=0;M[A++]!==0;)if(A>=M.length){D++;break}var C=M.slice(2,A-1);if((B.toString("hex")!=="0002"&&!x||B.toString("hex")!=="0001"&&x)&&D++,C.length<8&&D++,D)throw new Error("decryption error");return M.slice(A)}function d(g,M){g=m.from(g),M=m.from(M);var x=0,B=g.length;g.length!==M.length&&(x++,B=Math.min(g.length,M.length));for(var A=-1;++A<B;)x+=g[A]^M[A];return x}return privateDecrypt}var hasRequiredBrowser$1;function requireBrowser$1(){return hasRequiredBrowser$1||(hasRequiredBrowser$1=1,(function(_){_.publicEncrypt=requirePublicEncrypt(),_.privateDecrypt=requirePrivateDecrypt(),_.privateEncrypt=function(I,p){return _.publicEncrypt(I,p,!0)},_.publicDecrypt=function(I,p){return _.privateDecrypt(I,p,!0)}})(browser$1)),browser$1}var browser={},hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser;hasRequiredBrowser=1;function _(){throw new Error(`secure random number generation not supported by this browser
15
- use chrome, FireFox or Internet Explorer 11`)}var S=requireSafeBuffer$2(),I=requireBrowser$b(),p=S.Buffer,R=S.kMaxLength,f=commonjsGlobal.crypto||commonjsGlobal.msCrypto,w=Math.pow(2,32)-1;function m(M,x){if(typeof M!="number"||M!==M)throw new TypeError("offset must be a number");if(M>w||M<0)throw new TypeError("offset must be a uint32");if(M>R||M>x)throw new RangeError("offset out of range")}function v(M,x,B){if(typeof M!="number"||M!==M)throw new TypeError("size must be a number");if(M>w||M<0)throw new TypeError("size must be a uint32");if(M+x>B||M>R)throw new RangeError("buffer too small")}f&&f.getRandomValues||!process$1.browser?(browser.randomFill=y,browser.randomFillSync=g):(browser.randomFill=_,browser.randomFillSync=_);function y(M,x,B,A){if(!p.isBuffer(M)&&!(M instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof x=="function")A=x,x=0,B=M.length;else if(typeof B=="function")A=B,B=M.length-x;else if(typeof A!="function")throw new TypeError('"cb" argument must be a function');return m(x,M.length),v(B,x,M.length),d(M,x,B,A)}function d(M,x,B,A){if(process$1.browser){var D=M.buffer,C=new Uint8Array(D,x,B);if(f.getRandomValues(C),A){process$1.nextTick(function(){A(null,M)});return}return M}if(A){I(B,function(H,N){if(H)return A(H);N.copy(M,x),A(null,M)});return}var $=I(B);return $.copy(M,x),M}function g(M,x,B){if(typeof x>"u"&&(x=0),!p.isBuffer(M)&&!(M instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return m(x,M.length),B===void 0&&(B=M.length-x),v(B,x,M.length),d(M,x,B)}return browser}var hasRequiredCryptoBrowserify;function requireCryptoBrowserify(){if(hasRequiredCryptoBrowserify)return cryptoBrowserify;hasRequiredCryptoBrowserify=1,cryptoBrowserify.randomBytes=cryptoBrowserify.rng=cryptoBrowserify.pseudoRandomBytes=cryptoBrowserify.prng=requireBrowser$b(),cryptoBrowserify.createHash=cryptoBrowserify.Hash=requireBrowser$9(),cryptoBrowserify.createHmac=cryptoBrowserify.Hmac=requireBrowser$8();var _=requireAlgos(),S=Object.keys(_),I=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(S);cryptoBrowserify.getHashes=function(){return I};var p=requireBrowser$7();cryptoBrowserify.pbkdf2=p.pbkdf2,cryptoBrowserify.pbkdf2Sync=p.pbkdf2Sync;var R=requireBrowser$5();cryptoBrowserify.Cipher=R.Cipher,cryptoBrowserify.createCipher=R.createCipher,cryptoBrowserify.Cipheriv=R.Cipheriv,cryptoBrowserify.createCipheriv=R.createCipheriv,cryptoBrowserify.Decipher=R.Decipher,cryptoBrowserify.createDecipher=R.createDecipher,cryptoBrowserify.Decipheriv=R.Decipheriv,cryptoBrowserify.createDecipheriv=R.createDecipheriv,cryptoBrowserify.getCiphers=R.getCiphers,cryptoBrowserify.listCiphers=R.listCiphers;var f=requireBrowser$4();cryptoBrowserify.DiffieHellmanGroup=f.DiffieHellmanGroup,cryptoBrowserify.createDiffieHellmanGroup=f.createDiffieHellmanGroup,cryptoBrowserify.getDiffieHellman=f.getDiffieHellman,cryptoBrowserify.createDiffieHellman=f.createDiffieHellman,cryptoBrowserify.DiffieHellman=f.DiffieHellman;var w=requireBrowser$3();cryptoBrowserify.createSign=w.createSign,cryptoBrowserify.Sign=w.Sign,cryptoBrowserify.createVerify=w.createVerify,cryptoBrowserify.Verify=w.Verify,cryptoBrowserify.createECDH=requireBrowser$2();var m=requireBrowser$1();cryptoBrowserify.publicEncrypt=m.publicEncrypt,cryptoBrowserify.privateEncrypt=m.privateEncrypt,cryptoBrowserify.publicDecrypt=m.publicDecrypt,cryptoBrowserify.privateDecrypt=m.privateDecrypt;var v=requireBrowser();return cryptoBrowserify.randomFill=v.randomFill,cryptoBrowserify.randomFillSync=v.randomFillSync,cryptoBrowserify.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
13
+ })`)}catch{m=function(y){this._initNamed(y)}}return I(m,w),m.prototype._initNamed=function(y){w.call(this,y)},new m(this)},R.prototype._getDecoder=function(w){return w=w||"der",this.decoders.hasOwnProperty(w)||(this.decoders[w]=this._createNamed(S.decoders[w])),this.decoders[w]},R.prototype.decode=function(w,m,v){return this._getDecoder(m).decode(w,v)},R.prototype._getEncoder=function(w){return w=w||"der",this.encoders.hasOwnProperty(w)||(this.encoders[w]=this._createNamed(S.encoders[w])),this.encoders[w]},R.prototype.encode=function(w,m,v){return this._getEncoder(m).encode(w,v)}})(api)),api}var base={},reporter={},hasRequiredReporter;function requireReporter(){if(hasRequiredReporter)return reporter;hasRequiredReporter=1;var _=requireInherits_browser();function S(p){this._reporterState={obj:null,path:[],options:p||{},errors:[]}}reporter.Reporter=S,S.prototype.isError=function(R){return R instanceof I},S.prototype.save=function(){var R=this._reporterState;return{obj:R.obj,pathLen:R.path.length}},S.prototype.restore=function(R){var f=this._reporterState;f.obj=R.obj,f.path=f.path.slice(0,R.pathLen)},S.prototype.enterKey=function(R){return this._reporterState.path.push(R)},S.prototype.exitKey=function(R){var f=this._reporterState;f.path=f.path.slice(0,R-1)},S.prototype.leaveKey=function(R,f,w){var m=this._reporterState;this.exitKey(R),m.obj!==null&&(m.obj[f]=w)},S.prototype.path=function(){return this._reporterState.path.join("/")},S.prototype.enterObject=function(){var R=this._reporterState,f=R.obj;return R.obj={},f},S.prototype.leaveObject=function(R){var f=this._reporterState,w=f.obj;return f.obj=R,w},S.prototype.error=function(R){var f,w=this._reporterState,m=R instanceof I;if(m?f=R:f=new I(w.path.map(function(v){return"["+JSON.stringify(v)+"]"}).join(""),R.message||R,R.stack),!w.options.partial)throw f;return m||w.errors.push(f),f},S.prototype.wrapResult=function(R){var f=this._reporterState;return f.options.partial?{result:this.isError(R)?null:R,errors:f.errors}:R};function I(p,R){this.path=p,this.rethrow(R)}return _(I,Error),I.prototype.rethrow=function(R){if(this.message=R+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,I),!this.stack)try{throw new Error(this.message)}catch(f){this.stack=f.stack}return this},reporter}var buffer={},hasRequiredBuffer;function requireBuffer(){if(hasRequiredBuffer)return buffer;hasRequiredBuffer=1;var _=requireInherits_browser(),S=requireBase().Reporter,I=requireDist().Buffer;function p(f,w){if(S.call(this,w),!I.isBuffer(f)){this.error("Input not Buffer");return}this.base=f,this.offset=0,this.length=f.length}_(p,S),buffer.DecoderBuffer=p,p.prototype.save=function(){return{offset:this.offset,reporter:S.prototype.save.call(this)}},p.prototype.restore=function(w){var m=new p(this.base);return m.offset=w.offset,m.length=this.offset,this.offset=w.offset,S.prototype.restore.call(this,w.reporter),m},p.prototype.isEmpty=function(){return this.offset===this.length},p.prototype.readUInt8=function(w){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(w||"DecoderBuffer overrun")},p.prototype.skip=function(w,m){if(!(this.offset+w<=this.length))return this.error(m||"DecoderBuffer overrun");var v=new p(this.base);return v._reporterState=this._reporterState,v.offset=this.offset,v.length=this.offset+w,this.offset+=w,v},p.prototype.raw=function(w){return this.base.slice(w?w.offset:this.offset,this.length)};function R(f,w){if(Array.isArray(f))this.length=0,this.value=f.map(function(m){return m instanceof R||(m=new R(m,w)),this.length+=m.length,m},this);else if(typeof f=="number"){if(!(0<=f&&f<=255))return w.error("non-byte EncoderBuffer value");this.value=f,this.length=1}else if(typeof f=="string")this.value=f,this.length=I.byteLength(f);else if(I.isBuffer(f))this.value=f,this.length=f.length;else return w.error("Unsupported type: "+typeof f)}return buffer.EncoderBuffer=R,R.prototype.join=function(w,m){return w||(w=new I(this.length)),m||(m=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(v){v.join(w,m),m+=v.length}):(typeof this.value=="number"?w[m]=this.value:typeof this.value=="string"?w.write(this.value,m):I.isBuffer(this.value)&&this.value.copy(w,m),m+=this.length)),w},buffer}var node,hasRequiredNode;function requireNode(){if(hasRequiredNode)return node;hasRequiredNode=1;var _=requireBase().Reporter,S=requireBase().EncoderBuffer,I=requireBase().DecoderBuffer,p=requireMinimalisticAssert(),R=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(R),w=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function m(y,d){var g={};this._baseState=g,g.enc=y,g.parent=d||null,g.children=null,g.tag=null,g.args=null,g.reverseArgs=null,g.choice=null,g.optional=!1,g.any=!1,g.obj=!1,g.use=null,g.useDecoder=null,g.key=null,g.default=null,g.explicit=null,g.implicit=null,g.contains=null,g.parent||(g.children=[],this._wrap())}node=m;var v=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return m.prototype.clone=function(){var d=this._baseState,g={};v.forEach(function(x){g[x]=d[x]});var M=new this.constructor(g.parent);return M._baseState=g,M},m.prototype._wrap=function(){var d=this._baseState;f.forEach(function(g){this[g]=function(){var x=new this.constructor(this);return d.children.push(x),x[g].apply(x,arguments)}},this)},m.prototype._init=function(d){var g=this._baseState;p(g.parent===null),d.call(this),g.children=g.children.filter(function(M){return M._baseState.parent===this},this),p.equal(g.children.length,1,"Root node can have only one child")},m.prototype._useArgs=function(d){var g=this._baseState,M=d.filter(function(x){return x instanceof this.constructor},this);d=d.filter(function(x){return!(x instanceof this.constructor)},this),M.length!==0&&(p(g.children===null),g.children=M,M.forEach(function(x){x._baseState.parent=this},this)),d.length!==0&&(p(g.args===null),g.args=d,g.reverseArgs=d.map(function(x){if(typeof x!="object"||x.constructor!==Object)return x;var B={};return Object.keys(x).forEach(function(A){A==(A|0)&&(A|=0);var D=x[A];B[D]=A}),B}))},w.forEach(function(y){m.prototype[y]=function(){var g=this._baseState;throw new Error(y+" not implemented for encoding: "+g.enc)}}),R.forEach(function(y){m.prototype[y]=function(){var g=this._baseState,M=Array.prototype.slice.call(arguments);return p(g.tag===null),g.tag=y,this._useArgs(M),this}}),m.prototype.use=function(d){p(d);var g=this._baseState;return p(g.use===null),g.use=d,this},m.prototype.optional=function(){var d=this._baseState;return d.optional=!0,this},m.prototype.def=function(d){var g=this._baseState;return p(g.default===null),g.default=d,g.optional=!0,this},m.prototype.explicit=function(d){var g=this._baseState;return p(g.explicit===null&&g.implicit===null),g.explicit=d,this},m.prototype.implicit=function(d){var g=this._baseState;return p(g.explicit===null&&g.implicit===null),g.implicit=d,this},m.prototype.obj=function(){var d=this._baseState,g=Array.prototype.slice.call(arguments);return d.obj=!0,g.length!==0&&this._useArgs(g),this},m.prototype.key=function(d){var g=this._baseState;return p(g.key===null),g.key=d,this},m.prototype.any=function(){var d=this._baseState;return d.any=!0,this},m.prototype.choice=function(d){var g=this._baseState;return p(g.choice===null),g.choice=d,this._useArgs(Object.keys(d).map(function(M){return d[M]})),this},m.prototype.contains=function(d){var g=this._baseState;return p(g.use===null),g.contains=d,this},m.prototype._decode=function(d,g){var M=this._baseState;if(M.parent===null)return d.wrapResult(M.children[0]._decode(d,g));var x=M.default,B=!0,A=null;if(M.key!==null&&(A=d.enterKey(M.key)),M.optional){var D=null;if(M.explicit!==null?D=M.explicit:M.implicit!==null?D=M.implicit:M.tag!==null&&(D=M.tag),D===null&&!M.any){var C=d.save();try{M.choice===null?this._decodeGeneric(M.tag,d,g):this._decodeChoice(d,g),B=!0}catch{B=!1}d.restore(C)}else if(B=this._peekTag(d,D,M.any),d.isError(B))return B}var P;if(M.obj&&B&&(P=d.enterObject()),B){if(M.explicit!==null){var H=this._decodeTag(d,M.explicit);if(d.isError(H))return H;d=H}var N=d.offset;if(M.use===null&&M.choice===null){if(M.any)var C=d.save();var V=this._decodeTag(d,M.implicit!==null?M.implicit:M.tag,M.any);if(d.isError(V))return V;M.any?x=d.raw(C):d=V}if(g&&g.track&&M.tag!==null&&g.track(d.path(),N,d.length,"tagged"),g&&g.track&&M.tag!==null&&g.track(d.path(),d.offset,d.length,"content"),M.any?x=x:M.choice===null?x=this._decodeGeneric(M.tag,d,g):x=this._decodeChoice(d,g),d.isError(x))return x;if(!M.any&&M.choice===null&&M.children!==null&&M.children.forEach(function(ae){ae._decode(d,g)}),M.contains&&(M.tag==="octstr"||M.tag==="bitstr")){var Q=new I(x);x=this._getUse(M.contains,d._reporterState.obj)._decode(Q,g)}}return M.obj&&B&&(x=d.leaveObject(P)),M.key!==null&&(x!==null||B===!0)?d.leaveKey(A,M.key,x):A!==null&&d.exitKey(A),x},m.prototype._decodeGeneric=function(d,g,M){var x=this._baseState;return d==="seq"||d==="set"?null:d==="seqof"||d==="setof"?this._decodeList(g,d,x.args[0],M):/str$/.test(d)?this._decodeStr(g,d,M):d==="objid"&&x.args?this._decodeObjid(g,x.args[0],x.args[1],M):d==="objid"?this._decodeObjid(g,null,null,M):d==="gentime"||d==="utctime"?this._decodeTime(g,d,M):d==="null_"?this._decodeNull(g,M):d==="bool"?this._decodeBool(g,M):d==="objDesc"?this._decodeStr(g,d,M):d==="int"||d==="enum"?this._decodeInt(g,x.args&&x.args[0],M):x.use!==null?this._getUse(x.use,g._reporterState.obj)._decode(g,M):g.error("unknown tag: "+d)},m.prototype._getUse=function(d,g){var M=this._baseState;return M.useDecoder=this._use(d,g),p(M.useDecoder._baseState.parent===null),M.useDecoder=M.useDecoder._baseState.children[0],M.implicit!==M.useDecoder._baseState.implicit&&(M.useDecoder=M.useDecoder.clone(),M.useDecoder._baseState.implicit=M.implicit),M.useDecoder},m.prototype._decodeChoice=function(d,g){var M=this._baseState,x=null,B=!1;return Object.keys(M.choice).some(function(A){var D=d.save(),C=M.choice[A];try{var P=C._decode(d,g);if(d.isError(P))return!1;x={type:A,value:P},B=!0}catch{return d.restore(D),!1}return!0},this),B?x:d.error("Choice not matched")},m.prototype._createEncoderBuffer=function(d){return new S(d,this.reporter)},m.prototype._encode=function(d,g,M){var x=this._baseState;if(!(x.default!==null&&x.default===d)){var B=this._encodeValue(d,g,M);if(B!==void 0&&!this._skipDefault(B,g,M))return B}},m.prototype._encodeValue=function(d,g,M){var x=this._baseState;if(x.parent===null)return x.children[0]._encode(d,g||new _);var C=null;if(this.reporter=g,x.optional&&d===void 0)if(x.default!==null)d=x.default;else return;var B=null,A=!1;if(x.any)C=this._createEncoderBuffer(d);else if(x.choice)C=this._encodeChoice(d,g);else if(x.contains)B=this._getUse(x.contains,M)._encode(d,g),A=!0;else if(x.children)B=x.children.map(function(N){if(N._baseState.tag==="null_")return N._encode(null,g,d);if(N._baseState.key===null)return g.error("Child should have a key");var V=g.enterKey(N._baseState.key);if(typeof d!="object")return g.error("Child expected, but input is not object");var Q=N._encode(d[N._baseState.key],g,d);return g.leaveKey(V),Q},this).filter(function(N){return N}),B=this._createEncoderBuffer(B);else if(x.tag==="seqof"||x.tag==="setof"){if(!(x.args&&x.args.length===1))return g.error("Too many args for : "+x.tag);if(!Array.isArray(d))return g.error("seqof/setof, but data is not Array");var D=this.clone();D._baseState.implicit=null,B=this._createEncoderBuffer(d.map(function(N){var V=this._baseState;return this._getUse(V.args[0],d)._encode(N,g)},D))}else x.use!==null?C=this._getUse(x.use,M)._encode(d,g):(B=this._encodePrimitive(x.tag,d),A=!0);var C;if(!x.any&&x.choice===null){var P=x.implicit!==null?x.implicit:x.tag,H=x.implicit===null?"universal":"context";P===null?x.use===null&&g.error("Tag could be omitted only for .use()"):x.use===null&&(C=this._encodeComposite(P,A,H,B))}return x.explicit!==null&&(C=this._encodeComposite(x.explicit,!1,"context",C)),C},m.prototype._encodeChoice=function(d,g){var M=this._baseState,x=M.choice[d.type];return x||p(!1,d.type+" not found in "+JSON.stringify(Object.keys(M.choice))),x._encode(d.value,g)},m.prototype._encodePrimitive=function(d,g){var M=this._baseState;if(/str$/.test(d))return this._encodeStr(g,d);if(d==="objid"&&M.args)return this._encodeObjid(g,M.reverseArgs[0],M.args[1]);if(d==="objid")return this._encodeObjid(g,null,null);if(d==="gentime"||d==="utctime")return this._encodeTime(g,d);if(d==="null_")return this._encodeNull();if(d==="int"||d==="enum")return this._encodeInt(g,M.args&&M.reverseArgs[0]);if(d==="bool")return this._encodeBool(g);if(d==="objDesc")return this._encodeStr(g,d);throw new Error("Unsupported tag: "+d)},m.prototype._isNumstr=function(d){return/^[0-9 ]*$/.test(d)},m.prototype._isPrintstr=function(d){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(d)},node}var hasRequiredBase;function requireBase(){return hasRequiredBase||(hasRequiredBase=1,(function(_){var S=_;S.Reporter=requireReporter().Reporter,S.DecoderBuffer=requireBuffer().DecoderBuffer,S.EncoderBuffer=requireBuffer().EncoderBuffer,S.Node=requireNode()})(base)),base}var constants={},der={},hasRequiredDer$2;function requireDer$2(){return hasRequiredDer$2||(hasRequiredDer$2=1,(function(_){var S=requireConstants();_.tagClass={0:"universal",1:"application",2:"context",3:"private"},_.tagClassByName=S._reverse(_.tagClass),_.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},_.tagByName=S._reverse(_.tag)})(der)),der}var hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,(function(_){var S=_;S._reverse=function(p){var R={};return Object.keys(p).forEach(function(f){(f|0)==f&&(f=f|0);var w=p[f];R[w]=f}),R},S.der=requireDer$2()})(constants)),constants}var decoders={},der_1$1,hasRequiredDer$1;function requireDer$1(){if(hasRequiredDer$1)return der_1$1;hasRequiredDer$1=1;var _=requireInherits_browser(),S=requireAsn1$1(),I=S.base,p=S.bignum,R=S.constants.der;function f(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new w,this.tree._init(y.body)}der_1$1=f,f.prototype.decode=function(d,g){return d instanceof I.DecoderBuffer||(d=new I.DecoderBuffer(d,g)),this.tree._decode(d,g)};function w(y){I.Node.call(this,"der",y)}_(w,I.Node),w.prototype._peekTag=function(d,g,M){if(d.isEmpty())return!1;var x=d.save(),B=m(d,'Failed to peek tag: "'+g+'"');return d.isError(B)?B:(d.restore(x),B.tag===g||B.tagStr===g||B.tagStr+"of"===g||M)},w.prototype._decodeTag=function(d,g,M){var x=m(d,'Failed to decode tag of "'+g+'"');if(d.isError(x))return x;var B=v(d,x.primitive,'Failed to get length of "'+g+'"');if(d.isError(B))return B;if(!M&&x.tag!==g&&x.tagStr!==g&&x.tagStr+"of"!==g)return d.error('Failed to match tag: "'+g+'"');if(x.primitive||B!==null)return d.skip(B,'Failed to match body of: "'+g+'"');var A=d.save(),D=this._skipUntilEnd(d,'Failed to skip indefinite length body: "'+this.tag+'"');return d.isError(D)?D:(B=d.offset-A.offset,d.restore(A),d.skip(B,'Failed to match body of: "'+g+'"'))},w.prototype._skipUntilEnd=function(d,g){for(;;){var M=m(d,g);if(d.isError(M))return M;var x=v(d,M.primitive,g);if(d.isError(x))return x;var B;if(M.primitive||x!==null?B=d.skip(x):B=this._skipUntilEnd(d,g),d.isError(B))return B;if(M.tagStr==="end")break}},w.prototype._decodeList=function(d,g,M,x){for(var B=[];!d.isEmpty();){var A=this._peekTag(d,"end");if(d.isError(A))return A;var D=M.decode(d,"der",x);if(d.isError(D)&&A)break;B.push(D)}return B},w.prototype._decodeStr=function(d,g){if(g==="bitstr"){var M=d.readUInt8();return d.isError(M)?M:{unused:M,data:d.raw()}}else if(g==="bmpstr"){var x=d.raw();if(x.length%2===1)return d.error("Decoding of string type: bmpstr length mismatch");for(var B="",A=0;A<x.length/2;A++)B+=String.fromCharCode(x.readUInt16BE(A*2));return B}else if(g==="numstr"){var D=d.raw().toString("ascii");return this._isNumstr(D)?D:d.error("Decoding of string type: numstr unsupported characters")}else{if(g==="octstr")return d.raw();if(g==="objDesc")return d.raw();if(g==="printstr"){var C=d.raw().toString("ascii");return this._isPrintstr(C)?C:d.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(g)?d.raw().toString():d.error("Decoding of string type: "+g+" unsupported")}},w.prototype._decodeObjid=function(d,g,M){for(var x,B=[],A=0;!d.isEmpty();){var D=d.readUInt8();A<<=7,A|=D&127,(D&128)===0&&(B.push(A),A=0)}D&128&&B.push(A);var C=B[0]/40|0,P=B[0]%40;if(M?x=B:x=[C,P].concat(B.slice(1)),g){var H=g[x.join(" ")];H===void 0&&(H=g[x.join(".")]),H!==void 0&&(x=H)}return x},w.prototype._decodeTime=function(d,g){var M=d.raw().toString();if(g==="gentime")var x=M.slice(0,4)|0,B=M.slice(4,6)|0,A=M.slice(6,8)|0,D=M.slice(8,10)|0,C=M.slice(10,12)|0,P=M.slice(12,14)|0;else if(g==="utctime"){var x=M.slice(0,2)|0,B=M.slice(2,4)|0,A=M.slice(4,6)|0,D=M.slice(6,8)|0,C=M.slice(8,10)|0,P=M.slice(10,12)|0;x<70?x=2e3+x:x=1900+x}else return d.error("Decoding "+g+" time is not supported yet");return Date.UTC(x,B-1,A,D,C,P,0)},w.prototype._decodeNull=function(d){return null},w.prototype._decodeBool=function(d){var g=d.readUInt8();return d.isError(g)?g:g!==0},w.prototype._decodeInt=function(d,g){var M=d.raw(),x=new p(M);return g&&(x=g[x.toString(10)]||x),x},w.prototype._use=function(d,g){return typeof d=="function"&&(d=d(g)),d._getDecoder("der").tree};function m(y,d){var g=y.readUInt8(d);if(y.isError(g))return g;var M=R.tagClass[g>>6],x=(g&32)===0;if((g&31)===31){var B=g;for(g=0;(B&128)===128;){if(B=y.readUInt8(d),y.isError(B))return B;g<<=7,g|=B&127}}else g&=31;var A=R.tag[g];return{cls:M,primitive:x,tag:g,tagStr:A}}function v(y,d,g){var M=y.readUInt8(g);if(y.isError(M))return M;if(!d&&M===128)return null;if((M&128)===0)return M;var x=M&127;if(x>4)return y.error("length octect is too long");M=0;for(var B=0;B<x;B++){M<<=8;var A=y.readUInt8(g);if(y.isError(A))return A;M|=A}return M}return der_1$1}var pem$1,hasRequiredPem$1;function requirePem$1(){if(hasRequiredPem$1)return pem$1;hasRequiredPem$1=1;var _=requireInherits_browser(),S=requireDist().Buffer,I=requireDer$1();function p(R){I.call(this,R),this.enc="pem"}return _(p,I),pem$1=p,p.prototype.decode=function(f,w){for(var m=f.toString().split(/[\r\n]+/g),v=w.label.toUpperCase(),y=/^-----(BEGIN|END) ([^-]+)-----$/,d=-1,g=-1,M=0;M<m.length;M++){var x=m[M].match(y);if(x!==null&&x[2]===v)if(d===-1){if(x[1]!=="BEGIN")break;d=M}else{if(x[1]!=="END")break;g=M;break}}if(d===-1||g===-1)throw new Error("PEM section not found for: "+v);var B=m.slice(d+1,g).join("");B.replace(/[^a-z0-9\+\/=]+/gi,"");var A=new S(B,"base64");return I.prototype.decode.call(this,A,w)},pem$1}var hasRequiredDecoders;function requireDecoders(){return hasRequiredDecoders||(hasRequiredDecoders=1,(function(_){var S=_;S.der=requireDer$1(),S.pem=requirePem$1()})(decoders)),decoders}var encoders={},der_1,hasRequiredDer;function requireDer(){if(hasRequiredDer)return der_1;hasRequiredDer=1;var _=requireInherits_browser(),S=requireDist().Buffer,I=requireAsn1$1(),p=I.base,R=I.constants.der;function f(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new w,this.tree._init(y.body)}der_1=f,f.prototype.encode=function(d,g){return this.tree._encode(d,g).join()};function w(y){p.Node.call(this,"der",y)}_(w,p.Node),w.prototype._encodeComposite=function(d,g,M,x){var B=v(d,g,M,this.reporter);if(x.length<128){var C=new S(2);return C[0]=B,C[1]=x.length,this._createEncoderBuffer([C,x])}for(var A=1,D=x.length;D>=256;D>>=8)A++;var C=new S(2+A);C[0]=B,C[1]=128|A;for(var D=1+A,P=x.length;P>0;D--,P>>=8)C[D]=P&255;return this._createEncoderBuffer([C,x])},w.prototype._encodeStr=function(d,g){if(g==="bitstr")return this._createEncoderBuffer([d.unused|0,d.data]);if(g==="bmpstr"){for(var M=new S(d.length*2),x=0;x<d.length;x++)M.writeUInt16BE(d.charCodeAt(x),x*2);return this._createEncoderBuffer(M)}else return g==="numstr"?this._isNumstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: numstr supports only digits and space"):g==="printstr"?this._isPrintstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(g)?this._createEncoderBuffer(d):g==="objDesc"?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: "+g+" unsupported")},w.prototype._encodeObjid=function(d,g,M){if(typeof d=="string"){if(!g)return this.reporter.error("string objid given, but no values map found");if(!g.hasOwnProperty(d))return this.reporter.error("objid not found in values map");d=g[d].split(/[\s\.]+/g);for(var x=0;x<d.length;x++)d[x]|=0}else if(Array.isArray(d)){d=d.slice();for(var x=0;x<d.length;x++)d[x]|=0}if(!Array.isArray(d))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(d));if(!M){if(d[1]>=40)return this.reporter.error("Second objid identifier OOB");d.splice(0,2,d[0]*40+d[1])}for(var B=0,x=0;x<d.length;x++){var A=d[x];for(B++;A>=128;A>>=7)B++}for(var D=new S(B),C=D.length-1,x=d.length-1;x>=0;x--){var A=d[x];for(D[C--]=A&127;(A>>=7)>0;)D[C--]=128|A&127}return this._createEncoderBuffer(D)};function m(y){return y<10?"0"+y:y}w.prototype._encodeTime=function(d,g){var M,x=new Date(d);return g==="gentime"?M=[m(x.getFullYear()),m(x.getUTCMonth()+1),m(x.getUTCDate()),m(x.getUTCHours()),m(x.getUTCMinutes()),m(x.getUTCSeconds()),"Z"].join(""):g==="utctime"?M=[m(x.getFullYear()%100),m(x.getUTCMonth()+1),m(x.getUTCDate()),m(x.getUTCHours()),m(x.getUTCMinutes()),m(x.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+g+" time is not supported yet"),this._encodeStr(M,"octstr")},w.prototype._encodeNull=function(){return this._createEncoderBuffer("")},w.prototype._encodeInt=function(d,g){if(typeof d=="string"){if(!g)return this.reporter.error("String int or enum given, but no values map");if(!g.hasOwnProperty(d))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(d));d=g[d]}if(typeof d!="number"&&!S.isBuffer(d)){var M=d.toArray();!d.sign&&M[0]&128&&M.unshift(0),d=new S(M)}if(S.isBuffer(d)){var x=d.length;d.length===0&&x++;var A=new S(x);return d.copy(A),d.length===0&&(A[0]=0),this._createEncoderBuffer(A)}if(d<128)return this._createEncoderBuffer(d);if(d<256)return this._createEncoderBuffer([0,d]);for(var x=1,B=d;B>=256;B>>=8)x++;for(var A=new Array(x),B=A.length-1;B>=0;B--)A[B]=d&255,d>>=8;return A[0]&128&&A.unshift(0),this._createEncoderBuffer(new S(A))},w.prototype._encodeBool=function(d){return this._createEncoderBuffer(d?255:0)},w.prototype._use=function(d,g){return typeof d=="function"&&(d=d(g)),d._getEncoder("der").tree},w.prototype._skipDefault=function(d,g,M){var x=this._baseState,B;if(x.default===null)return!1;var A=d.join();if(x.defaultBuffer===void 0&&(x.defaultBuffer=this._encodeValue(x.default,g,M).join()),A.length!==x.defaultBuffer.length)return!1;for(B=0;B<A.length;B++)if(A[B]!==x.defaultBuffer[B])return!1;return!0};function v(y,d,g,M){var x;if(y==="seqof"?y="seq":y==="setof"&&(y="set"),R.tagByName.hasOwnProperty(y))x=R.tagByName[y];else if(typeof y=="number"&&(y|0)===y)x=y;else return M.error("Unknown tag: "+y);return x>=31?M.error("Multi-octet tag encoding unsupported"):(d||(x|=32),x|=R.tagClassByName[g||"universal"]<<6,x)}return der_1}var pem,hasRequiredPem;function requirePem(){if(hasRequiredPem)return pem;hasRequiredPem=1;var _=requireInherits_browser(),S=requireDer();function I(p){S.call(this,p),this.enc="pem"}return _(I,S),pem=I,I.prototype.encode=function(R,f){for(var w=S.prototype.encode.call(this,R),m=w.toString("base64"),v=["-----BEGIN "+f.label+"-----"],y=0;y<m.length;y+=64)v.push(m.slice(y,y+64));return v.push("-----END "+f.label+"-----"),v.join(`
14
+ `)},pem}var hasRequiredEncoders;function requireEncoders(){return hasRequiredEncoders||(hasRequiredEncoders=1,(function(_){var S=_;S.der=requireDer(),S.pem=requirePem()})(encoders)),encoders}var hasRequiredAsn1$1;function requireAsn1$1(){return hasRequiredAsn1$1||(hasRequiredAsn1$1=1,(function(_){var S=_;S.bignum=requireBn$2(),S.define=requireApi().define,S.base=requireBase(),S.constants=requireConstants(),S.decoders=requireDecoders(),S.encoders=requireEncoders()})(asn1)),asn1}var certificate,hasRequiredCertificate;function requireCertificate(){if(hasRequiredCertificate)return certificate;hasRequiredCertificate=1;var _=requireAsn1$1(),S=_.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),I=_.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),p=_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),R=_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())}),f=_.define("RelativeDistinguishedName",function(){this.setof(I)}),w=_.define("RDNSequence",function(){this.seqof(f)}),m=_.define("Name",function(){this.choice({rdnSequence:this.use(w)})}),v=_.define("Validity",function(){this.seq().obj(this.key("notBefore").use(S),this.key("notAfter").use(S))}),y=_.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=_.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(p),this.key("issuer").use(m),this.key("validity").use(v),this.key("subject").use(m),this.key("subjectPublicKeyInfo").use(R),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(y).optional())}),g=_.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(p),this.key("signatureValue").bitstr())});return certificate=g,certificate}var hasRequiredAsn1;function requireAsn1(){if(hasRequiredAsn1)return asn1$1;hasRequiredAsn1=1;var _=requireAsn1$1();asn1$1.certificate=requireCertificate();var S=_.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});asn1$1.RSAPrivateKey=S;var I=_.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});asn1$1.RSAPublicKey=I;var p=_.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),R=_.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())});asn1$1.PublicKey=R;var f=_.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(p),this.key("subjectPrivateKey").octstr())});asn1$1.PrivateKey=f;var w=_.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});asn1$1.EncryptedPrivateKey=w;var m=_.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});asn1$1.DSAPrivateKey=m,asn1$1.DSAparam=_.define("DSAparam",function(){this.int()});var v=_.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),y=_.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(v),this.key("publicKey").optional().explicit(1).bitstr())});return asn1$1.ECPrivateKey=y,asn1$1.signature=_.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}),asn1$1}const require$$1={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"};var fixProc,hasRequiredFixProc;function requireFixProc(){if(hasRequiredFixProc)return fixProc;hasRequiredFixProc=1;var _=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,S=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,I=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,p=requireEvp_bytestokey(),R=requireBrowser$6(),f=requireSafeBuffer$2().Buffer;return fixProc=function(w,m){var v=w.toString(),y=v.match(_),d;if(y){var M="aes"+y[1],x=f.from(y[2],"hex"),B=f.from(y[3].replace(/[\r\n]/g,""),"base64"),A=p(m,x.slice(0,8),parseInt(y[1],10)).key,D=[],C=R.createDecipheriv(M,A,x);D.push(C.update(B)),D.push(C.final()),d=f.concat(D)}else{var g=v.match(I);d=f.from(g[2].replace(/[\r\n]/g,""),"base64")}var P=v.match(S)[1];return{tag:P,data:d}},fixProc}var parseAsn1,hasRequiredParseAsn1;function requireParseAsn1(){if(hasRequiredParseAsn1)return parseAsn1;hasRequiredParseAsn1=1;var _=requireAsn1(),S=require$$1,I=requireFixProc(),p=requireBrowser$6(),R=requireBrowser$7().pbkdf2Sync,f=requireSafeBuffer$2().Buffer;function w(v,y){var d=v.algorithm.decrypt.kde.kdeparams.salt,g=parseInt(v.algorithm.decrypt.kde.kdeparams.iters.toString(),10),M=S[v.algorithm.decrypt.cipher.algo.join(".")],x=v.algorithm.decrypt.cipher.iv,B=v.subjectPrivateKey,A=parseInt(M.split("-")[1],10)/8,D=R(y,d,g,A,"sha1"),C=p.createDecipheriv(M,D,x),P=[];return P.push(C.update(B)),P.push(C.final()),f.concat(P)}function m(v){var y;typeof v=="object"&&!f.isBuffer(v)&&(y=v.passphrase,v=v.key),typeof v=="string"&&(v=f.from(v));var d=I(v,y),g=d.tag,M=d.data,x,B;switch(g){case"CERTIFICATE":B=_.certificate.decode(M,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(B||(B=_.PublicKey.decode(M,"der")),x=B.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return _.RSAPublicKey.decode(B.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return B.subjectPrivateKey=B.subjectPublicKey,{type:"ec",data:B};case"1.2.840.10040.4.1":return B.algorithm.params.pub_key=_.DSAparam.decode(B.subjectPublicKey.data,"der"),{type:"dsa",data:B.algorithm.params};default:throw new Error("unknown key id "+x)}case"ENCRYPTED PRIVATE KEY":M=_.EncryptedPrivateKey.decode(M,"der"),M=w(M,y);case"PRIVATE KEY":switch(B=_.PrivateKey.decode(M,"der"),x=B.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return _.RSAPrivateKey.decode(B.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:B.algorithm.curve,privateKey:_.ECPrivateKey.decode(B.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return B.algorithm.params.priv_key=_.DSAparam.decode(B.subjectPrivateKey,"der"),{type:"dsa",params:B.algorithm.params};default:throw new Error("unknown key id "+x)}case"RSA PUBLIC KEY":return _.RSAPublicKey.decode(M,"der");case"RSA PRIVATE KEY":return _.RSAPrivateKey.decode(M,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:_.DSAPrivateKey.decode(M,"der")};case"EC PRIVATE KEY":return M=_.ECPrivateKey.decode(M,"der"),{curve:M.parameters.value,privateKey:M.privateKey};default:throw new Error("unknown key type "+g)}}return m.signature=_.signature,parseAsn1=m,parseAsn1}const require$$4={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};var hasRequiredSign;function requireSign(){if(hasRequiredSign)return sign.exports;hasRequiredSign=1;var _=requireSafeBuffer$2().Buffer,S=requireBrowser$8(),I=requireBrowserifyRsa(),p=requireElliptic().ec,R=requireBn$4(),f=requireParseAsn1(),w=require$$4,m=1;function v(C,P,H,N,V){var Q=f(P);if(Q.curve){if(N!=="ecdsa"&&N!=="ecdsa/rsa")throw new Error("wrong private key type");return y(C,Q)}else if(Q.type==="dsa"){if(N!=="dsa")throw new Error("wrong private key type");return d(C,Q,H)}if(N!=="rsa"&&N!=="ecdsa/rsa")throw new Error("wrong private key type");if(P.padding!==void 0&&P.padding!==m)throw new Error("illegal or unsupported padding mode");C=_.concat([V,C]);for(var ne=Q.modulus.byteLength(),ae=[0,1];C.length+ae.length+1<ne;)ae.push(255);ae.push(0);for(var ee=-1;++ee<C.length;)ae.push(C[ee]);var le=I(ae,Q);return le}function y(C,P){var H=w[P.curve.join(".")];if(!H)throw new Error("unknown curve "+P.curve.join("."));var N=new p(H),V=N.keyFromPrivate(P.privateKey),Q=V.sign(C);return _.from(Q.toDER())}function d(C,P,H){for(var N=P.params.priv_key,V=P.params.p,Q=P.params.q,ne=P.params.g,ae=new R(0),ee,le=x(C,Q).mod(Q),c=!1,e=M(N,Q,C,H);c===!1;)ee=A(Q,e,H),ae=D(ne,ee,V,Q),c=ee.invm(Q).imul(le.add(N.mul(ae))).mod(Q),c.cmpn(0)===0&&(c=!1,ae=new R(0));return g(ae,c)}function g(C,P){C=C.toArray(),P=P.toArray(),C[0]&128&&(C=[0].concat(C)),P[0]&128&&(P=[0].concat(P));var H=C.length+P.length+4,N=[48,H,2,C.length];return N=N.concat(C,[2,P.length],P),_.from(N)}function M(C,P,H,N){if(C=_.from(C.toArray()),C.length<P.byteLength()){var V=_.alloc(P.byteLength()-C.length);C=_.concat([V,C])}var Q=H.length,ne=B(H,P),ae=_.alloc(Q);ae.fill(1);var ee=_.alloc(Q);return ee=S(N,ee).update(ae).update(_.from([0])).update(C).update(ne).digest(),ae=S(N,ee).update(ae).digest(),ee=S(N,ee).update(ae).update(_.from([1])).update(C).update(ne).digest(),ae=S(N,ee).update(ae).digest(),{k:ee,v:ae}}function x(C,P){var H=new R(C),N=(C.length<<3)-P.bitLength();return N>0&&H.ishrn(N),H}function B(C,P){C=x(C,P),C=C.mod(P);var H=_.from(C.toArray());if(H.length<P.byteLength()){var N=_.alloc(P.byteLength()-H.length);H=_.concat([N,H])}return H}function A(C,P,H){var N,V;do{for(N=_.alloc(0);N.length*8<C.bitLength();)P.v=S(H,P.k).update(P.v).digest(),N=_.concat([N,P.v]);V=x(N,C),P.k=S(H,P.k).update(P.v).update(_.from([0])).digest(),P.v=S(H,P.k).update(P.v).digest()}while(V.cmp(C)!==-1);return V}function D(C,P,H,N){return C.toRed(R.mont(H)).redPow(P).fromRed().mod(N)}return sign.exports=v,sign.exports.getKey=M,sign.exports.makeKey=A,sign.exports}var verify_1,hasRequiredVerify;function requireVerify(){if(hasRequiredVerify)return verify_1;hasRequiredVerify=1;var _=requireSafeBuffer$2().Buffer,S=requireBn$4(),I=requireElliptic().ec,p=requireParseAsn1(),R=require$$4;function f(y,d,g,M,x){var B=p(g);if(B.type==="ec"){if(M!=="ecdsa"&&M!=="ecdsa/rsa")throw new Error("wrong public key type");return w(y,d,B)}else if(B.type==="dsa"){if(M!=="dsa")throw new Error("wrong public key type");return m(y,d,B)}if(M!=="rsa"&&M!=="ecdsa/rsa")throw new Error("wrong public key type");d=_.concat([x,d]);for(var A=B.modulus.byteLength(),D=[1],C=0;d.length+D.length+2<A;)D.push(255),C+=1;D.push(0);for(var P=-1;++P<d.length;)D.push(d[P]);D=_.from(D);var H=S.mont(B.modulus);y=new S(y).toRed(H),y=y.redPow(new S(B.publicExponent)),y=_.from(y.fromRed().toArray());var N=C<8?1:0;for(A=Math.min(y.length,D.length),y.length!==D.length&&(N=1),P=-1;++P<A;)N|=y[P]^D[P];return N===0}function w(y,d,g){var M=R[g.data.algorithm.curve.join(".")];if(!M)throw new Error("unknown curve "+g.data.algorithm.curve.join("."));var x=new I(M),B=g.data.subjectPrivateKey.data;return x.verify(d,y,B)}function m(y,d,g){var M=g.data.p,x=g.data.q,B=g.data.g,A=g.data.pub_key,D=p.signature.decode(y,"der"),C=D.s,P=D.r;v(C,x),v(P,x);var H=S.mont(M),N=C.invm(x),V=B.toRed(H).redPow(new S(d).mul(N).mod(x)).fromRed().mul(A.toRed(H).redPow(P.mul(N).mod(x)).fromRed()).mod(M).mod(x);return V.cmp(P)===0}function v(y,d){if(y.cmpn(0)<=0)throw new Error("invalid sig");if(y.cmp(d)>=0)throw new Error("invalid sig")}return verify_1=f,verify_1}var browser$3,hasRequiredBrowser$3;function requireBrowser$3(){if(hasRequiredBrowser$3)return browser$3;hasRequiredBrowser$3=1;var _=requireSafeBuffer$2().Buffer,S=requireBrowser$9(),I=requireReadableBrowser(),p=requireInherits_browser(),R=requireSign(),f=requireVerify(),w=require$$6;Object.keys(w).forEach(function(g){w[g].id=_.from(w[g].id,"hex"),w[g.toLowerCase()]=w[g]});function m(g){I.Writable.call(this);var M=w[g];if(!M)throw new Error("Unknown message digest");this._hashType=M.hash,this._hash=S(M.hash),this._tag=M.id,this._signType=M.sign}p(m,I.Writable),m.prototype._write=function(M,x,B){this._hash.update(M),B()},m.prototype.update=function(M,x){return this._hash.update(typeof M=="string"?_.from(M,x):M),this},m.prototype.sign=function(M,x){this.end();var B=this._hash.digest(),A=R(B,M,this._hashType,this._signType,this._tag);return x?A.toString(x):A};function v(g){I.Writable.call(this);var M=w[g];if(!M)throw new Error("Unknown message digest");this._hash=S(M.hash),this._tag=M.id,this._signType=M.sign}p(v,I.Writable),v.prototype._write=function(M,x,B){this._hash.update(M),B()},v.prototype.update=function(M,x){return this._hash.update(typeof M=="string"?_.from(M,x):M),this},v.prototype.verify=function(M,x,B){var A=typeof x=="string"?_.from(x,B):x;this.end();var D=this._hash.digest();return f(A,D,M,this._signType,this._tag)};function y(g){return new m(g)}function d(g){return new v(g)}return browser$3={Sign:y,Verify:d,createSign:y,createVerify:d},browser$3}var bn$3={exports:{}},bn$2=bn$3.exports,hasRequiredBn$1;function requireBn$1(){return hasRequiredBn$1||(hasRequiredBn$1=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,$=a[2]|0,W=$&8191,J=$>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,Pe=a[5]|0,me=Pe&8191,se=Pe>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,$e=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,$e)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,$e)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,$e)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,$e)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,$e)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,$e)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,$e)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,$e)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,$e)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,$e)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,$e)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,$e)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,$e)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,$e)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,$e)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,$e),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,$e);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new P;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function P(c,e){this.x=c,this.y=e}P.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},P.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},P.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},P.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],$=n[b+Y+l],W=a[b+Y+l],J=E*$-L*W;W=E*W+L*$,$=J,n[b+Y]=K+$,a[b+Y]=q+W,n[b+Y+l]=K-$,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},P.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},P.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},P.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},P.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},P.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},P.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn$2)})(bn$3)),bn$3.exports}var browser$2,hasRequiredBrowser$2;function requireBrowser$2(){if(hasRequiredBrowser$2)return browser$2;hasRequiredBrowser$2=1;var _=requireElliptic(),S=requireBn$1();browser$2=function(w){return new p(w)};var I={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};I.p224=I.secp224r1,I.p256=I.secp256r1=I.prime256v1,I.p192=I.secp192r1=I.prime192v1,I.p384=I.secp384r1,I.p521=I.secp521r1;function p(f){this.curveType=I[f],this.curveType||(this.curveType={name:f}),this.curve=new _.ec(this.curveType.name),this.keys=void 0}p.prototype.generateKeys=function(f,w){return this.keys=this.curve.genKeyPair(),this.getPublicKey(f,w)},p.prototype.computeSecret=function(f,w,m){w=w||"utf8",Buffer.isBuffer(f)||(f=new Buffer(f,w));var v=this.curve.keyFromPublic(f).getPublic(),y=v.mul(this.keys.getPrivate()).getX();return R(y,m,this.curveType.byteLength)},p.prototype.getPublicKey=function(f,w){var m=this.keys.getPublic(w==="compressed",!0);return w==="hybrid"&&(m[m.length-1]%2?m[0]=7:m[0]=6),R(m,f)},p.prototype.getPrivateKey=function(f){return R(this.keys.getPrivate(),f)},p.prototype.setPublicKey=function(f,w){return w=w||"utf8",Buffer.isBuffer(f)||(f=new Buffer(f,w)),this.keys._importPublic(f),this},p.prototype.setPrivateKey=function(f,w){w=w||"utf8",Buffer.isBuffer(f)||(f=new Buffer(f,w));var m=new S(f);return m=m.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(m),this};function R(f,w,m){Array.isArray(f)||(f=f.toArray());var v=new Buffer(f);if(m&&v.length<m){var y=new Buffer(m-v.length);y.fill(0),v=Buffer.concat([y,v])}return w?v.toString(w):v}return browser$2}var browser$1={},mgf,hasRequiredMgf;function requireMgf(){if(hasRequiredMgf)return mgf;hasRequiredMgf=1;var _=requireBrowser$9(),S=requireSafeBuffer$2().Buffer;mgf=function(p,R){for(var f=S.alloc(0),w=0,m;f.length<R;)m=I(w++),f=S.concat([f,_("sha1").update(p).update(m).digest()]);return f.slice(0,R)};function I(p){var R=S.allocUnsafe(4);return R.writeUInt32BE(p,0),R}return mgf}var xor,hasRequiredXor;function requireXor(){return hasRequiredXor||(hasRequiredXor=1,xor=function(S,I){for(var p=S.length,R=-1;++R<p;)S[R]^=I[R];return S}),xor}var bn$1={exports:{}},bn=bn$1.exports,hasRequiredBn;function requireBn(){return hasRequiredBn||(hasRequiredBn=1,(function(_){(function(S,I){function p(c,e){if(!c)throw new Error(e||"Assertion failed")}function R(c,e){c.super_=e;var t=function(){};t.prototype=e.prototype,c.prototype=new t,c.prototype.constructor=c}function f(c,e,t){if(f.isBN(c))return c;this.negative=0,this.words=null,this.length=0,this.red=null,c!==null&&((e==="le"||e==="be")&&(t=e,e=10),this._init(c||0,e||10,t||"be"))}typeof S=="object"?S.exports=f:I.BN=f,f.BN=f,f.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=requireDist().Buffer}catch{}f.isBN=function(e){return e instanceof f?!0:e!==null&&typeof e=="object"&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return e.cmp(t)>0?e:t},f.min=function(e,t){return e.cmp(t)<0?e:t},f.prototype._init=function(e,t,n){if(typeof e=="number")return this._initNumber(e,t,n);if(typeof e=="object")return this._initArray(e,t,n);t==="hex"&&(t=16),p(t===(t|0)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var a=0;e[0]==="-"&&(a++,this.negative=1),a<e.length&&(t===16?this._parseHex(e,a,n):(this._parseBase(e,t,a),n==="le"&&this._initArray(this.toArray(),t,n)))},f.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[e&67108863],this.length=1):e<4503599627370496?(this.words=[e&67108863,e/67108864&67108863],this.length=2):(p(e<9007199254740992),this.words=[e&67108863,e/67108864&67108863,1],this.length=3),n==="le"&&this._initArray(this.toArray(),t,n)},f.prototype._initArray=function(e,t,n){if(p(typeof e.length=="number"),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s,u,l=0;if(n==="be")for(a=e.length-1,s=0;a>=0;a-=3)u=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);else if(n==="le")for(a=0,s=0;a<e.length;a+=3)u=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[s]|=u<<l&67108863,this.words[s+1]=u>>>26-l&67108863,l+=24,l>=26&&(l-=26,s++);return this.strip()};function m(c,e){var t=c.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function v(c,e,t){var n=m(c,t);return t-1>=e&&(n|=m(c,t-1)<<4),n}f.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var s=0,u=0,l;if(n==="be")for(a=e.length-1;a>=t;a-=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8;else{var o=e.length-t;for(a=o%2===0?t+1:t;a<e.length;a+=2)l=v(e,t,a)<<s,this.words[u]|=l&67108863,s>=18?(s-=18,u+=1,this.words[u]|=l>>>26):s+=8}this.strip()};function y(c,e,t,n){for(var a=0,s=Math.min(c.length,t),u=e;u<s;u++){var l=c.charCodeAt(u)-48;a*=n,l>=49?a+=l-49+10:l>=17?a+=l-17+10:a+=l}return a}f.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var a=0,s=1;s<=67108863;s*=t)a++;a--,s=s/t|0;for(var u=e.length-n,l=u%a,o=Math.min(u,u-l)+n,r=0,h=n;h<o;h+=a)r=y(e,h,h+a,t),this.imuln(s),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(l!==0){var b=1;for(r=y(e,h,e.length,t),h=0;h<l;h++)b*=t;this.imuln(b),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},f.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},f.prototype.clone=function(){var e=new f(null);return this.copy(e),e},f.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=t|0||1;var n;if(e===16||e==="hex"){n="";for(var a=0,s=0,u=0;u<this.length;u++){var l=this.words[u],o=((l<<a|s)&16777215).toString(16);s=l>>>24-a&16777215,a+=2,a>=26&&(a-=26,u--),s!==0||u!==this.length-1?n=d[6-o.length]+o+n:n=o+n}for(s!==0&&(n=s.toString(16)+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}if(e===(e|0)&&e>=2&&e<=36){var r=g[e],h=M[e];n="";var b=this.clone();for(b.negative=0;!b.isZero();){var E=b.modn(h).toString(e);b=b.idivn(h),b.isZero()?n=E+n:n=d[r-E.length]+E+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.negative!==0&&(n="-"+n),n}p(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return this.length===2?e+=this.words[1]*67108864:this.length===3&&this.words[2]===1?e+=4503599627370496+this.words[1]*67108864:this.length>2&&p(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-e:e},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(e,t){return p(typeof w<"u"),this.toArrayLike(w,e,t)},f.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},f.prototype.toArrayLike=function(e,t,n){var a=this.byteLength(),s=n||Math.max(1,a);p(a<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0"),this.strip();var u=t==="le",l=new e(s),o,r,h=this.clone();if(u){for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[r]=o;for(;r<s;r++)l[r]=0}else{for(r=0;r<s-a;r++)l[r]=0;for(r=0;!h.isZero();r++)o=h.andln(255),h.iushrn(8),l[s-r-1]=o}return l},Math.clz32?f.prototype._countBits=function(e){return 32-Math.clz32(e)}:f.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},f.prototype._zeroBits=function(e){if(e===0)return 26;var t=e,n=0;return(t&8191)===0&&(n+=13,t>>>=13),(t&127)===0&&(n+=7,t>>>=7),(t&15)===0&&(n+=4,t>>>=4),(t&3)===0&&(n+=2,t>>>=2),(t&1)===0&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t};function x(c){for(var e=new Array(c.bitLength()),t=0;t<e.length;t++){var n=t/26|0,a=t%26;e[t]=(c.words[n]&1<<a)>>>a}return e}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,n!==26)break}return e},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(e){return this.negative!==0?this.abs().inotn(e).iaddn(1):this.clone()},f.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},f.prototype.ior=function(e){return p((this.negative|e.negative)===0),this.iuor(e)},f.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t;this.length>e.length?t=e:t=this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},f.prototype.iand=function(e){return p((this.negative|e.negative)===0),this.iuand(e)},f.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var a=0;a<n.length;a++)this.words[a]=t.words[a]^n.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},f.prototype.ixor=function(e){return p((this.negative|e.negative)===0),this.iuxor(e)},f.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){p(typeof e=="number"&&e>=0);var t=Math.ceil(e/26)|0,n=e%26;this._expand(t),n>0&&t--;for(var a=0;a<t;a++)this.words[a]=~this.words[a]&67108863;return n>0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){p(typeof e=="number"&&e>=0);var n=e/26|0,a=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<<a:this.words[n]=this.words[n]&~(1<<a),this.strip()},f.prototype.iadd=function(e){var t;if(this.negative!==0&&e.negative===0)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(this.negative===0&&e.negative!==0)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var n,a;this.length>e.length?(n=this,a=e):(n=e,a=this);for(var s=0,u=0;u<a.length;u++)t=(n.words[u]|0)+(a.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;for(;s!==0&&u<n.length;u++)t=(n.words[u]|0)+s,this.words[u]=t&67108863,s=t>>>26;if(this.length=n.length,s!==0)this.words[this.length]=s,this.length++;else if(n!==this)for(;u<n.length;u++)this.words[u]=n.words[u];return this},f.prototype.add=function(e){var t;return e.negative!==0&&this.negative===0?(e.negative=0,t=this.sub(e),e.negative^=1,t):e.negative===0&&this.negative!==0?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(n===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,s;n>0?(a=this,s=e):(a=e,s=this);for(var u=0,l=0;l<s.length;l++)t=(a.words[l]|0)-(s.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;for(;u!==0&&l<a.length;l++)t=(a.words[l]|0)+u,u=t>>26,this.words[l]=t&67108863;if(u===0&&l<a.length&&a!==this)for(;l<a.length;l++)this.words[l]=a.words[l];return this.length=Math.max(this.length,l),a!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(e){return this.clone().isub(e)};function B(c,e,t){t.negative=e.negative^c.negative;var n=c.length+e.length|0;t.length=n,n=n-1|0;var a=c.words[0]|0,s=e.words[0]|0,u=a*s,l=u&67108863,o=u/67108864|0;t.words[0]=l;for(var r=1;r<n;r++){for(var h=o>>>26,b=o&67108863,E=Math.min(r,e.length-1),L=Math.max(0,r-c.length+1);L<=E;L++){var Y=r-L|0;a=c.words[Y]|0,s=e.words[L]|0,u=a*s+b,h+=u/67108864|0,b=u&67108863}t.words[r]=b|0,o=h|0}return o!==0?t.words[r]=o|0:t.length--,t.strip()}var A=function(e,t,n){var a=e.words,s=t.words,u=n.words,l=0,o,r,h,b=a[0]|0,E=b&8191,L=b>>>13,Y=a[1]|0,K=Y&8191,q=Y>>>13,$=a[2]|0,W=$&8191,J=$>>>13,X=a[3]|0,U=X&8191,re=X>>>13,Ie=a[4]|0,ue=Ie&8191,he=Ie>>>13,Pe=a[5]|0,me=Pe&8191,se=Pe>>>13,De=a[6]|0,de=De&8191,ye=De>>>13,Ce=a[7]|0,pe=Ce&8191,_e=Ce>>>13,Ue=a[8]|0,xe=Ue&8191,Ae=Ue>>>13,je=a[9]|0,j=je&8191,k=je>>>13,O=s[0]|0,G=O&8191,te=O>>>13,ce=s[1]|0,fe=ce&8191,we=ce>>>13,Ne=s[2]|0,be=Ne&8191,Se=Ne>>>13,Oe=s[3]|0,qe=Oe&8191,ke=Oe>>>13,We=s[4]|0,Re=We&8191,Te=We>>>13,Ke=s[5]|0,z=Ke&8191,T=Ke>>>13,F=s[6]|0,Z=F&8191,ie=F>>>13,ve=s[7]|0,oe=ve&8191,Me=ve>>>13,Le=s[8]|0,ge=Le&8191,Be=Le>>>13,Fe=s[9]|0,Ee=Fe&8191,$e=Fe>>>13;n.negative=e.negative^t.negative,n.length=19,o=Math.imul(E,G),r=Math.imul(E,te),r=r+Math.imul(L,G)|0,h=Math.imul(L,te);var He=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(He>>>26)|0,He&=67108863,o=Math.imul(K,G),r=Math.imul(K,te),r=r+Math.imul(q,G)|0,h=Math.imul(q,te),o=o+Math.imul(E,fe)|0,r=r+Math.imul(E,we)|0,r=r+Math.imul(L,fe)|0,h=h+Math.imul(L,we)|0;var ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ze>>>26)|0,ze&=67108863,o=Math.imul(W,G),r=Math.imul(W,te),r=r+Math.imul(J,G)|0,h=Math.imul(J,te),o=o+Math.imul(K,fe)|0,r=r+Math.imul(K,we)|0,r=r+Math.imul(q,fe)|0,h=h+Math.imul(q,we)|0,o=o+Math.imul(E,be)|0,r=r+Math.imul(E,Se)|0,r=r+Math.imul(L,be)|0,h=h+Math.imul(L,Se)|0;var Ge=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,o=Math.imul(U,G),r=Math.imul(U,te),r=r+Math.imul(re,G)|0,h=Math.imul(re,te),o=o+Math.imul(W,fe)|0,r=r+Math.imul(W,we)|0,r=r+Math.imul(J,fe)|0,h=h+Math.imul(J,we)|0,o=o+Math.imul(K,be)|0,r=r+Math.imul(K,Se)|0,r=r+Math.imul(q,be)|0,h=h+Math.imul(q,Se)|0,o=o+Math.imul(E,qe)|0,r=r+Math.imul(E,ke)|0,r=r+Math.imul(L,qe)|0,h=h+Math.imul(L,ke)|0;var Ze=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,o=Math.imul(ue,G),r=Math.imul(ue,te),r=r+Math.imul(he,G)|0,h=Math.imul(he,te),o=o+Math.imul(U,fe)|0,r=r+Math.imul(U,we)|0,r=r+Math.imul(re,fe)|0,h=h+Math.imul(re,we)|0,o=o+Math.imul(W,be)|0,r=r+Math.imul(W,Se)|0,r=r+Math.imul(J,be)|0,h=h+Math.imul(J,Se)|0,o=o+Math.imul(K,qe)|0,r=r+Math.imul(K,ke)|0,r=r+Math.imul(q,qe)|0,h=h+Math.imul(q,ke)|0,o=o+Math.imul(E,Re)|0,r=r+Math.imul(E,Te)|0,r=r+Math.imul(L,Re)|0,h=h+Math.imul(L,Te)|0;var Ve=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,o=Math.imul(me,G),r=Math.imul(me,te),r=r+Math.imul(se,G)|0,h=Math.imul(se,te),o=o+Math.imul(ue,fe)|0,r=r+Math.imul(ue,we)|0,r=r+Math.imul(he,fe)|0,h=h+Math.imul(he,we)|0,o=o+Math.imul(U,be)|0,r=r+Math.imul(U,Se)|0,r=r+Math.imul(re,be)|0,h=h+Math.imul(re,Se)|0,o=o+Math.imul(W,qe)|0,r=r+Math.imul(W,ke)|0,r=r+Math.imul(J,qe)|0,h=h+Math.imul(J,ke)|0,o=o+Math.imul(K,Re)|0,r=r+Math.imul(K,Te)|0,r=r+Math.imul(q,Re)|0,h=h+Math.imul(q,Te)|0,o=o+Math.imul(E,z)|0,r=r+Math.imul(E,T)|0,r=r+Math.imul(L,z)|0,h=h+Math.imul(L,T)|0;var Xe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,o=Math.imul(de,G),r=Math.imul(de,te),r=r+Math.imul(ye,G)|0,h=Math.imul(ye,te),o=o+Math.imul(me,fe)|0,r=r+Math.imul(me,we)|0,r=r+Math.imul(se,fe)|0,h=h+Math.imul(se,we)|0,o=o+Math.imul(ue,be)|0,r=r+Math.imul(ue,Se)|0,r=r+Math.imul(he,be)|0,h=h+Math.imul(he,Se)|0,o=o+Math.imul(U,qe)|0,r=r+Math.imul(U,ke)|0,r=r+Math.imul(re,qe)|0,h=h+Math.imul(re,ke)|0,o=o+Math.imul(W,Re)|0,r=r+Math.imul(W,Te)|0,r=r+Math.imul(J,Re)|0,h=h+Math.imul(J,Te)|0,o=o+Math.imul(K,z)|0,r=r+Math.imul(K,T)|0,r=r+Math.imul(q,z)|0,h=h+Math.imul(q,T)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(L,Z)|0,h=h+Math.imul(L,ie)|0;var Je=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Je>>>26)|0,Je&=67108863,o=Math.imul(pe,G),r=Math.imul(pe,te),r=r+Math.imul(_e,G)|0,h=Math.imul(_e,te),o=o+Math.imul(de,fe)|0,r=r+Math.imul(de,we)|0,r=r+Math.imul(ye,fe)|0,h=h+Math.imul(ye,we)|0,o=o+Math.imul(me,be)|0,r=r+Math.imul(me,Se)|0,r=r+Math.imul(se,be)|0,h=h+Math.imul(se,Se)|0,o=o+Math.imul(ue,qe)|0,r=r+Math.imul(ue,ke)|0,r=r+Math.imul(he,qe)|0,h=h+Math.imul(he,ke)|0,o=o+Math.imul(U,Re)|0,r=r+Math.imul(U,Te)|0,r=r+Math.imul(re,Re)|0,h=h+Math.imul(re,Te)|0,o=o+Math.imul(W,z)|0,r=r+Math.imul(W,T)|0,r=r+Math.imul(J,z)|0,h=h+Math.imul(J,T)|0,o=o+Math.imul(K,Z)|0,r=r+Math.imul(K,ie)|0,r=r+Math.imul(q,Z)|0,h=h+Math.imul(q,ie)|0,o=o+Math.imul(E,oe)|0,r=r+Math.imul(E,Me)|0,r=r+Math.imul(L,oe)|0,h=h+Math.imul(L,Me)|0;var Ye=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,o=Math.imul(xe,G),r=Math.imul(xe,te),r=r+Math.imul(Ae,G)|0,h=Math.imul(Ae,te),o=o+Math.imul(pe,fe)|0,r=r+Math.imul(pe,we)|0,r=r+Math.imul(_e,fe)|0,h=h+Math.imul(_e,we)|0,o=o+Math.imul(de,be)|0,r=r+Math.imul(de,Se)|0,r=r+Math.imul(ye,be)|0,h=h+Math.imul(ye,Se)|0,o=o+Math.imul(me,qe)|0,r=r+Math.imul(me,ke)|0,r=r+Math.imul(se,qe)|0,h=h+Math.imul(se,ke)|0,o=o+Math.imul(ue,Re)|0,r=r+Math.imul(ue,Te)|0,r=r+Math.imul(he,Re)|0,h=h+Math.imul(he,Te)|0,o=o+Math.imul(U,z)|0,r=r+Math.imul(U,T)|0,r=r+Math.imul(re,z)|0,h=h+Math.imul(re,T)|0,o=o+Math.imul(W,Z)|0,r=r+Math.imul(W,ie)|0,r=r+Math.imul(J,Z)|0,h=h+Math.imul(J,ie)|0,o=o+Math.imul(K,oe)|0,r=r+Math.imul(K,Me)|0,r=r+Math.imul(q,oe)|0,h=h+Math.imul(q,Me)|0,o=o+Math.imul(E,ge)|0,r=r+Math.imul(E,Be)|0,r=r+Math.imul(L,ge)|0,h=h+Math.imul(L,Be)|0;var Qe=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,o=Math.imul(j,G),r=Math.imul(j,te),r=r+Math.imul(k,G)|0,h=Math.imul(k,te),o=o+Math.imul(xe,fe)|0,r=r+Math.imul(xe,we)|0,r=r+Math.imul(Ae,fe)|0,h=h+Math.imul(Ae,we)|0,o=o+Math.imul(pe,be)|0,r=r+Math.imul(pe,Se)|0,r=r+Math.imul(_e,be)|0,h=h+Math.imul(_e,Se)|0,o=o+Math.imul(de,qe)|0,r=r+Math.imul(de,ke)|0,r=r+Math.imul(ye,qe)|0,h=h+Math.imul(ye,ke)|0,o=o+Math.imul(me,Re)|0,r=r+Math.imul(me,Te)|0,r=r+Math.imul(se,Re)|0,h=h+Math.imul(se,Te)|0,o=o+Math.imul(ue,z)|0,r=r+Math.imul(ue,T)|0,r=r+Math.imul(he,z)|0,h=h+Math.imul(he,T)|0,o=o+Math.imul(U,Z)|0,r=r+Math.imul(U,ie)|0,r=r+Math.imul(re,Z)|0,h=h+Math.imul(re,ie)|0,o=o+Math.imul(W,oe)|0,r=r+Math.imul(W,Me)|0,r=r+Math.imul(J,oe)|0,h=h+Math.imul(J,Me)|0,o=o+Math.imul(K,ge)|0,r=r+Math.imul(K,Be)|0,r=r+Math.imul(q,ge)|0,h=h+Math.imul(q,Be)|0,o=o+Math.imul(E,Ee)|0,r=r+Math.imul(E,$e)|0,r=r+Math.imul(L,Ee)|0,h=h+Math.imul(L,$e)|0;var er=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(er>>>26)|0,er&=67108863,o=Math.imul(j,fe),r=Math.imul(j,we),r=r+Math.imul(k,fe)|0,h=Math.imul(k,we),o=o+Math.imul(xe,be)|0,r=r+Math.imul(xe,Se)|0,r=r+Math.imul(Ae,be)|0,h=h+Math.imul(Ae,Se)|0,o=o+Math.imul(pe,qe)|0,r=r+Math.imul(pe,ke)|0,r=r+Math.imul(_e,qe)|0,h=h+Math.imul(_e,ke)|0,o=o+Math.imul(de,Re)|0,r=r+Math.imul(de,Te)|0,r=r+Math.imul(ye,Re)|0,h=h+Math.imul(ye,Te)|0,o=o+Math.imul(me,z)|0,r=r+Math.imul(me,T)|0,r=r+Math.imul(se,z)|0,h=h+Math.imul(se,T)|0,o=o+Math.imul(ue,Z)|0,r=r+Math.imul(ue,ie)|0,r=r+Math.imul(he,Z)|0,h=h+Math.imul(he,ie)|0,o=o+Math.imul(U,oe)|0,r=r+Math.imul(U,Me)|0,r=r+Math.imul(re,oe)|0,h=h+Math.imul(re,Me)|0,o=o+Math.imul(W,ge)|0,r=r+Math.imul(W,Be)|0,r=r+Math.imul(J,ge)|0,h=h+Math.imul(J,Be)|0,o=o+Math.imul(K,Ee)|0,r=r+Math.imul(K,$e)|0,r=r+Math.imul(q,Ee)|0,h=h+Math.imul(q,$e)|0;var rr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(rr>>>26)|0,rr&=67108863,o=Math.imul(j,be),r=Math.imul(j,Se),r=r+Math.imul(k,be)|0,h=Math.imul(k,Se),o=o+Math.imul(xe,qe)|0,r=r+Math.imul(xe,ke)|0,r=r+Math.imul(Ae,qe)|0,h=h+Math.imul(Ae,ke)|0,o=o+Math.imul(pe,Re)|0,r=r+Math.imul(pe,Te)|0,r=r+Math.imul(_e,Re)|0,h=h+Math.imul(_e,Te)|0,o=o+Math.imul(de,z)|0,r=r+Math.imul(de,T)|0,r=r+Math.imul(ye,z)|0,h=h+Math.imul(ye,T)|0,o=o+Math.imul(me,Z)|0,r=r+Math.imul(me,ie)|0,r=r+Math.imul(se,Z)|0,h=h+Math.imul(se,ie)|0,o=o+Math.imul(ue,oe)|0,r=r+Math.imul(ue,Me)|0,r=r+Math.imul(he,oe)|0,h=h+Math.imul(he,Me)|0,o=o+Math.imul(U,ge)|0,r=r+Math.imul(U,Be)|0,r=r+Math.imul(re,ge)|0,h=h+Math.imul(re,Be)|0,o=o+Math.imul(W,Ee)|0,r=r+Math.imul(W,$e)|0,r=r+Math.imul(J,Ee)|0,h=h+Math.imul(J,$e)|0;var tr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(tr>>>26)|0,tr&=67108863,o=Math.imul(j,qe),r=Math.imul(j,ke),r=r+Math.imul(k,qe)|0,h=Math.imul(k,ke),o=o+Math.imul(xe,Re)|0,r=r+Math.imul(xe,Te)|0,r=r+Math.imul(Ae,Re)|0,h=h+Math.imul(Ae,Te)|0,o=o+Math.imul(pe,z)|0,r=r+Math.imul(pe,T)|0,r=r+Math.imul(_e,z)|0,h=h+Math.imul(_e,T)|0,o=o+Math.imul(de,Z)|0,r=r+Math.imul(de,ie)|0,r=r+Math.imul(ye,Z)|0,h=h+Math.imul(ye,ie)|0,o=o+Math.imul(me,oe)|0,r=r+Math.imul(me,Me)|0,r=r+Math.imul(se,oe)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(ue,ge)|0,r=r+Math.imul(ue,Be)|0,r=r+Math.imul(he,ge)|0,h=h+Math.imul(he,Be)|0,o=o+Math.imul(U,Ee)|0,r=r+Math.imul(U,$e)|0,r=r+Math.imul(re,Ee)|0,h=h+Math.imul(re,$e)|0;var ir=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ir>>>26)|0,ir&=67108863,o=Math.imul(j,Re),r=Math.imul(j,Te),r=r+Math.imul(k,Re)|0,h=Math.imul(k,Te),o=o+Math.imul(xe,z)|0,r=r+Math.imul(xe,T)|0,r=r+Math.imul(Ae,z)|0,h=h+Math.imul(Ae,T)|0,o=o+Math.imul(pe,Z)|0,r=r+Math.imul(pe,ie)|0,r=r+Math.imul(_e,Z)|0,h=h+Math.imul(_e,ie)|0,o=o+Math.imul(de,oe)|0,r=r+Math.imul(de,Me)|0,r=r+Math.imul(ye,oe)|0,h=h+Math.imul(ye,Me)|0,o=o+Math.imul(me,ge)|0,r=r+Math.imul(me,Be)|0,r=r+Math.imul(se,ge)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(ue,Ee)|0,r=r+Math.imul(ue,$e)|0,r=r+Math.imul(he,Ee)|0,h=h+Math.imul(he,$e)|0;var nr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(nr>>>26)|0,nr&=67108863,o=Math.imul(j,z),r=Math.imul(j,T),r=r+Math.imul(k,z)|0,h=Math.imul(k,T),o=o+Math.imul(xe,Z)|0,r=r+Math.imul(xe,ie)|0,r=r+Math.imul(Ae,Z)|0,h=h+Math.imul(Ae,ie)|0,o=o+Math.imul(pe,oe)|0,r=r+Math.imul(pe,Me)|0,r=r+Math.imul(_e,oe)|0,h=h+Math.imul(_e,Me)|0,o=o+Math.imul(de,ge)|0,r=r+Math.imul(de,Be)|0,r=r+Math.imul(ye,ge)|0,h=h+Math.imul(ye,Be)|0,o=o+Math.imul(me,Ee)|0,r=r+Math.imul(me,$e)|0,r=r+Math.imul(se,Ee)|0,h=h+Math.imul(se,$e)|0;var ar=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(ar>>>26)|0,ar&=67108863,o=Math.imul(j,Z),r=Math.imul(j,ie),r=r+Math.imul(k,Z)|0,h=Math.imul(k,ie),o=o+Math.imul(xe,oe)|0,r=r+Math.imul(xe,Me)|0,r=r+Math.imul(Ae,oe)|0,h=h+Math.imul(Ae,Me)|0,o=o+Math.imul(pe,ge)|0,r=r+Math.imul(pe,Be)|0,r=r+Math.imul(_e,ge)|0,h=h+Math.imul(_e,Be)|0,o=o+Math.imul(de,Ee)|0,r=r+Math.imul(de,$e)|0,r=r+Math.imul(ye,Ee)|0,h=h+Math.imul(ye,$e)|0;var fr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(fr>>>26)|0,fr&=67108863,o=Math.imul(j,oe),r=Math.imul(j,Me),r=r+Math.imul(k,oe)|0,h=Math.imul(k,Me),o=o+Math.imul(xe,ge)|0,r=r+Math.imul(xe,Be)|0,r=r+Math.imul(Ae,ge)|0,h=h+Math.imul(Ae,Be)|0,o=o+Math.imul(pe,Ee)|0,r=r+Math.imul(pe,$e)|0,r=r+Math.imul(_e,Ee)|0,h=h+Math.imul(_e,$e)|0;var or=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(or>>>26)|0,or&=67108863,o=Math.imul(j,ge),r=Math.imul(j,Be),r=r+Math.imul(k,ge)|0,h=Math.imul(k,Be),o=o+Math.imul(xe,Ee)|0,r=r+Math.imul(xe,$e)|0,r=r+Math.imul(Ae,Ee)|0,h=h+Math.imul(Ae,$e)|0;var sr=(l+o|0)+((r&8191)<<13)|0;l=(h+(r>>>13)|0)+(sr>>>26)|0,sr&=67108863,o=Math.imul(j,Ee),r=Math.imul(j,$e),r=r+Math.imul(k,Ee)|0,h=Math.imul(k,$e);var hr=(l+o|0)+((r&8191)<<13)|0;return l=(h+(r>>>13)|0)+(hr>>>26)|0,hr&=67108863,u[0]=He,u[1]=ze,u[2]=Ge,u[3]=Ze,u[4]=Ve,u[5]=Xe,u[6]=Je,u[7]=Ye,u[8]=Qe,u[9]=er,u[10]=rr,u[11]=tr,u[12]=ir,u[13]=nr,u[14]=ar,u[15]=fr,u[16]=or,u[17]=sr,u[18]=hr,l!==0&&(u[19]=l,n.length++),n};Math.imul||(A=B);function D(c,e,t){t.negative=e.negative^c.negative,t.length=c.length+e.length;for(var n=0,a=0,s=0;s<t.length-1;s++){var u=a;a=0;for(var l=n&67108863,o=Math.min(s,e.length-1),r=Math.max(0,s-c.length+1);r<=o;r++){var h=s-r,b=c.words[h]|0,E=e.words[r]|0,L=b*E,Y=L&67108863;u=u+(L/67108864|0)|0,Y=Y+l|0,l=Y&67108863,u=u+(Y>>>26)|0,a+=u>>>26,u&=67108863}t.words[s]=l,n=u,u=a}return n!==0?t.words[s]=n:t.length--,t.strip()}function C(c,e,t){var n=new P;return n.mulp(c,e,t)}f.prototype.mulTo=function(e,t){var n,a=this.length+e.length;return this.length===10&&e.length===10?n=A(this,e,t):a<63?n=B(this,e,t):a<1024?n=D(this,e,t):n=C(this,e,t),n};function P(c,e){this.x=c,this.y=e}P.prototype.makeRBT=function(e){for(var t=new Array(e),n=f.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,n,e);return t},P.prototype.revBin=function(e,t,n){if(e===0||e===n-1)return e;for(var a=0,s=0;s<t;s++)a|=(e&1)<<t-s-1,e>>=1;return a},P.prototype.permute=function(e,t,n,a,s,u){for(var l=0;l<u;l++)a[l]=t[e[l]],s[l]=n[e[l]]},P.prototype.transform=function(e,t,n,a,s,u){this.permute(u,e,t,n,a,s);for(var l=1;l<s;l<<=1)for(var o=l<<1,r=Math.cos(2*Math.PI/o),h=Math.sin(2*Math.PI/o),b=0;b<s;b+=o)for(var E=r,L=h,Y=0;Y<l;Y++){var K=n[b+Y],q=a[b+Y],$=n[b+Y+l],W=a[b+Y+l],J=E*$-L*W;W=E*W+L*$,$=J,n[b+Y]=K+$,a[b+Y]=q+W,n[b+Y+l]=K-$,a[b+Y+l]=q-W,Y!==o&&(J=r*E-h*L,L=r*L+h*E,E=J)}},P.prototype.guessLen13b=function(e,t){var n=Math.max(t,e)|1,a=n&1,s=0;for(n=n/2|0;n;n=n>>>1)s++;return 1<<s+1+a},P.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var a=0;a<n/2;a++){var s=e[a];e[a]=e[n-a-1],e[n-a-1]=s,s=t[a],t[a]=-t[n-a-1],t[n-a-1]=-s}},P.prototype.normalize13b=function(e,t){for(var n=0,a=0;a<t/2;a++){var s=Math.round(e[2*a+1]/t)*8192+Math.round(e[2*a]/t)+n;e[a]=s&67108863,s<67108864?n=0:n=s/67108864|0}return e},P.prototype.convert13b=function(e,t,n,a){for(var s=0,u=0;u<t;u++)s=s+(e[u]|0),n[2*u]=s&8191,s=s>>>13,n[2*u+1]=s&8191,s=s>>>13;for(u=2*t;u<a;++u)n[u]=0;p(s===0),p((s&-8192)===0)},P.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},P.prototype.mulp=function(e,t,n){var a=2*this.guessLen13b(e.length,t.length),s=this.makeRBT(a),u=this.stub(a),l=new Array(a),o=new Array(a),r=new Array(a),h=new Array(a),b=new Array(a),E=new Array(a),L=n.words;L.length=a,this.convert13b(e.words,e.length,l,a),this.convert13b(t.words,t.length,h,a),this.transform(l,u,o,r,a,s),this.transform(h,u,b,E,a,s);for(var Y=0;Y<a;Y++){var K=o[Y]*b[Y]-r[Y]*E[Y];r[Y]=o[Y]*E[Y]+r[Y]*b[Y],o[Y]=K}return this.conjugate(o,r,a),this.transform(o,r,L,u,a,s),this.conjugate(L,u,a),this.normalize13b(L,a),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},f.prototype.mul=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},f.prototype.mulf=function(e){var t=new f(null);return t.words=new Array(this.length+e.length),C(this,e,t)},f.prototype.imul=function(e){return this.clone().mulTo(e,this)},f.prototype.imuln=function(e){p(typeof e=="number"),p(e<67108864);for(var t=0,n=0;n<this.length;n++){var a=(this.words[n]|0)*e,s=(a&67108863)+(t&67108863);t>>=26,t+=a/67108864|0,t+=s>>>26,this.words[n]=s&67108863}return t!==0&&(this.words[n]=t,this.length++),this.length=e===0?1:this.length,this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=x(e);if(t.length===0)return new f(1);for(var n=this,a=0;a<t.length&&t[a]===0;a++,n=n.sqr());if(++a<t.length)for(var s=n.sqr();a<t.length;a++,s=s.sqr())t[a]!==0&&(n=n.mul(s));return n},f.prototype.iushln=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=67108863>>>26-t<<26-t,s;if(t!==0){var u=0;for(s=0;s<this.length;s++){var l=this.words[s]&a,o=(this.words[s]|0)-l<<t;this.words[s]=o|u,u=l>>>26-t}u&&(this.words[s]=u,this.length++)}if(n!==0){for(s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},f.prototype.ishln=function(e){return p(this.negative===0),this.iushln(e)},f.prototype.iushrn=function(e,t,n){p(typeof e=="number"&&e>=0);var a;t?a=(t-t%26)/26:a=0;var s=e%26,u=Math.min((e-s)/26,this.length),l=67108863^67108863>>>s<<s,o=n;if(a-=u,a=Math.max(0,a),o){for(var r=0;r<u;r++)o.words[r]=this.words[r];o.length=u}if(u!==0)if(this.length>u)for(this.length-=u,r=0;r<this.length;r++)this.words[r]=this.words[r+u];else this.words[0]=0,this.length=1;var h=0;for(r=this.length-1;r>=0&&(h!==0||r>=a);r--){var b=this.words[r]|0;this.words[r]=h<<26-s|b>>>s,h=b&l}return o&&h!==0&&(o.words[o.length++]=h),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(e,t,n){return p(this.negative===0),this.iushrn(e,t,n)},f.prototype.shln=function(e){return this.clone().ishln(e)},f.prototype.ushln=function(e){return this.clone().iushln(e)},f.prototype.shrn=function(e){return this.clone().ishrn(e)},f.prototype.ushrn=function(e){return this.clone().iushrn(e)},f.prototype.testn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return!1;var s=this.words[n];return!!(s&a)},f.prototype.imaskn=function(e){p(typeof e=="number"&&e>=0);var t=e%26,n=(e-t)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=n)return this;if(t!==0&&n++,this.length=Math.min(n,this.length),t!==0){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},f.prototype.maskn=function(e){return this.clone().imaskn(e)},f.prototype.iaddn=function(e){return p(typeof e=="number"),p(e<67108864),e<0?this.isubn(-e):this.negative!==0?this.length===1&&(this.words[0]|0)<e?(this.words[0]=e-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},f.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},f.prototype.isubn=function(e){if(p(typeof e=="number"),p(e<67108864),e<0)return this.iaddn(-e);if(this.negative!==0)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,n){var a=e.length+n,s;this._expand(a);var u,l=0;for(s=0;s<e.length;s++){u=(this.words[s+n]|0)+l;var o=(e.words[s]|0)*t;u-=o&67108863,l=(u>>26)-(o/67108864|0),this.words[s+n]=u&67108863}for(;s<this.length-n;s++)u=(this.words[s+n]|0)+l,l=u>>26,this.words[s+n]=u&67108863;if(l===0)return this.strip();for(p(l===-1),l=0,s=0;s<this.length;s++)u=-(this.words[s]|0)+l,l=u>>26,this.words[s]=u&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var n=this.length-e.length,a=this.clone(),s=e,u=s.words[s.length-1]|0,l=this._countBits(u);n=26-l,n!==0&&(s=s.ushln(n),a.iushln(n),u=s.words[s.length-1]|0);var o=a.length-s.length,r;if(t!=="mod"){r=new f(null),r.length=o+1,r.words=new Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var b=a.clone()._ishlnsubmul(s,1,o);b.negative===0&&(a=b,r&&(r.words[o]=1));for(var E=o-1;E>=0;E--){var L=(a.words[s.length+E]|0)*67108864+(a.words[s.length+E-1]|0);for(L=Math.min(L/u|0,67108863),a._ishlnsubmul(s,L,E);a.negative!==0;)L--,a.negative=0,a._ishlnsubmul(s,1,E),a.isZero()||(a.negative^=1);r&&(r.words[E]=L)}return r&&r.strip(),a.strip(),t!=="div"&&n!==0&&a.iushrn(n),{div:r||null,mod:a}},f.prototype.divmod=function(e,t,n){if(p(!e.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var a,s,u;return this.negative!==0&&e.negative===0?(u=this.neg().divmod(e,t),t!=="mod"&&(a=u.div.neg()),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.iadd(e)),{div:a,mod:s}):this.negative===0&&e.negative!==0?(u=this.divmod(e.neg(),t),t!=="mod"&&(a=u.div.neg()),{div:a,mod:u.mod}):(this.negative&e.negative)!==0?(u=this.neg().divmod(e.neg(),t),t!=="div"&&(s=u.mod.neg(),n&&s.negative!==0&&s.isub(e)),{div:u.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new f(0),mod:this}:e.length===1?t==="div"?{div:this.divn(e.words[0]),mod:null}:t==="mod"?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t)},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=t.div.negative!==0?t.mod.isub(e):t.mod,a=e.ushrn(1),s=e.andln(1),u=n.cmp(a);return u<0||s===1&&u===0?t.div:t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)},f.prototype.modn=function(e){p(e<=67108863);for(var t=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(t*n+(this.words[a]|0))%e;return n},f.prototype.idivn=function(e){p(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var a=(this.words[n]|0)+t*67108864;this.words[n]=a/e|0,t=a%e}return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=new f(0),l=new f(1),o=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++o;for(var r=n.clone(),h=t.clone();!t.isZero();){for(var b=0,E=1;(t.words[0]&E)===0&&b<26;++b,E<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(r),s.isub(h)),a.iushrn(1),s.iushrn(1);for(var L=0,Y=1;(n.words[0]&Y)===0&&L<26;++L,Y<<=1);if(L>0)for(n.iushrn(L);L-- >0;)(u.isOdd()||l.isOdd())&&(u.iadd(r),l.isub(h)),u.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u),s.isub(l)):(n.isub(t),u.isub(a),l.isub(s))}return{a:u,b:l,gcd:n.iushln(o)}},f.prototype._invmp=function(e){p(e.negative===0),p(!e.isZero());var t=this,n=e.clone();t.negative!==0?t=t.umod(e):t=t.clone();for(var a=new f(1),s=new f(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,o=1;(t.words[0]&o)===0&&l<26;++l,o<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var r=0,h=1;(n.words[0]&h)===0&&r<26;++r,h<<=1);if(r>0)for(n.iushrn(r);r-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}var b;return t.cmpn(1)===0?b=a:b=s,b.cmpn(0)<0&&b.iadd(e),b},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var a=0;t.isEven()&&n.isEven();a++)t.iushrn(1),n.iushrn(1);do{for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var s=t.cmp(n);if(s<0){var u=t;t=n,n=u}else if(s===0||n.cmpn(1)===0)break;t.isub(n)}while(!0);return n.iushln(a)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){p(typeof e=="number");var t=e%26,n=(e-t)/26,a=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=a,this;for(var s=a,u=n;s!==0&&u<this.length;u++){var l=this.words[u]|0;l+=s,s=l>>>26,l&=67108863,this.words[u]=l}return s!==0&&(this.words[u]=s,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),p(e<=67108863,"Number is too big");var a=this.words[0]|0;n=a===e?0:a<e?-1:1}return this.negative!==0?-n|0:n},f.prototype.cmp=function(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);return this.negative!==0?-t|0:t},f.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var a=this.words[n]|0,s=e.words[n]|0;if(a!==s){a<s?t=-1:a>s&&(t=1);break}}return t},f.prototype.gtn=function(e){return this.cmpn(e)===1},f.prototype.gt=function(e){return this.cmp(e)===1},f.prototype.gten=function(e){return this.cmpn(e)>=0},f.prototype.gte=function(e){return this.cmp(e)>=0},f.prototype.ltn=function(e){return this.cmpn(e)===-1},f.prototype.lt=function(e){return this.cmp(e)===-1},f.prototype.lten=function(e){return this.cmpn(e)<=0},f.prototype.lte=function(e){return this.cmp(e)<=0},f.prototype.eqn=function(e){return this.cmpn(e)===0},f.prototype.eq=function(e){return this.cmp(e)===0},f.red=function(e){return new ee(e)},f.prototype.toRed=function(e){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return p(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return p(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var H={k256:null,p224:null,p192:null,p25519:null};function N(c,e){this.name=c,this.p=new f(e,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var e=new f(null);return e.words=new Array(Math.ceil(this.n/13)),e},N.prototype.ireduce=function(e){var t=e,n;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),n=t.bitLength();while(n>this.n);var a=n<this.n?-1:t.ucmp(this.p);return a===0?(t.words[0]=0,t.length=1):a>0?t.isub(this.p):t.strip!==void 0?t.strip():t._strip(),t},N.prototype.split=function(e,t){e.iushrn(this.n,0,t)},N.prototype.imulK=function(e){return e.imul(this.k)};function V(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(V,N),V.prototype.split=function(e,t){for(var n=4194303,a=Math.min(e.length,9),s=0;s<a;s++)t.words[s]=e.words[s];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var u=e.words[9];for(t.words[t.length++]=u&n,s=10;s<e.length;s++){var l=e.words[s]|0;e.words[s-10]=(l&n)<<4|u>>>22,u=l}u>>>=22,e.words[s-10]=u,u===0&&e.length>10?e.length-=10:e.length-=9},V.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var a=e.words[n]|0;t+=a*977,e.words[n]=t&67108863,t=a*64+(t/67108864|0)}return e.words[e.length-1]===0&&(e.length--,e.words[e.length-1]===0&&e.length--),e};function Q(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(Q,N);function ne(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(ne,N);function ae(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(ae,N),ae.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var a=(e.words[n]|0)*19+t,s=a&67108863;a>>>=26,e.words[n]=s,t=a}return t!==0&&(e.words[e.length++]=t),e},f._prime=function(e){if(H[e])return H[e];var t;if(e==="k256")t=new V;else if(e==="p224")t=new Q;else if(e==="p192")t=new ne;else if(e==="p25519")t=new ae;else throw new Error("Unknown prime "+e);return H[e]=t,t};function ee(c){if(typeof c=="string"){var e=f._prime(c);this.m=e.p,this.prime=e}else p(c.gtn(1),"modulus must be greater than 1"),this.m=c,this.prime=null}ee.prototype._verify1=function(e){p(e.negative===0,"red works only with positives"),p(e.red,"red works only with red numbers")},ee.prototype._verify2=function(e,t){p((e.negative|t.negative)===0,"red works only with positives"),p(e.red&&e.red===t.red,"red works only with red numbers")},ee.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},ee.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},ee.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},ee.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},ee.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},ee.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},ee.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},ee.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},ee.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},ee.prototype.isqr=function(e){return this.imul(e,e.clone())},ee.prototype.sqr=function(e){return this.mul(e,e)},ee.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(p(t%2===1),t===3){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var a=this.m.subn(1),s=0;!a.isZero()&&a.andln(1)===0;)s++,a.iushrn(1);p(!a.isZero());var u=new f(1).toRed(this),l=u.redNeg(),o=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new f(2*r*r).toRed(this);this.pow(r,o).cmp(l)!==0;)r.redIAdd(l);for(var h=this.pow(r,a),b=this.pow(e,a.addn(1).iushrn(1)),E=this.pow(e,a),L=s;E.cmp(u)!==0;){for(var Y=E,K=0;Y.cmp(u)!==0;K++)Y=Y.redSqr();p(K<L);var q=this.pow(h,new f(1).iushln(L-K-1));b=b.redMul(q),h=q.redSqr(),E=E.redMul(h),L=K}return b},ee.prototype.invm=function(e){var t=e._invmp(this.m);return t.negative!==0?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},ee.prototype.pow=function(e,t){if(t.isZero())return new f(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var n=4,a=new Array(1<<n);a[0]=new f(1).toRed(this),a[1]=e;for(var s=2;s<a.length;s++)a[s]=this.mul(a[s-1],e);var u=a[0],l=0,o=0,r=t.bitLength()%26;for(r===0&&(r=26),s=t.length-1;s>=0;s--){for(var h=t.words[s],b=r-1;b>=0;b--){var E=h>>b&1;if(u!==a[0]&&(u=this.sqr(u)),E===0&&l===0){o=0;continue}l<<=1,l|=E,o++,!(o!==n&&(s!==0||b!==0))&&(u=this.mul(u,a[l]),o=0,l=0)}r=26}return u},ee.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},ee.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new le(e)};function le(c){ee.call(this,c),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(le,ee),le.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},le.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},le.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new f(0)._forceRed(this);var n=e.mul(t),a=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=n.isub(a).iushrn(this.shift),u=s;return s.cmp(this.m)>=0?u=s.isub(this.m):s.cmpn(0)<0&&(u=s.iadd(this.m)),u._forceRed(this)},le.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(_,bn)})(bn$1)),bn$1.exports}var withPublic_1,hasRequiredWithPublic;function requireWithPublic(){if(hasRequiredWithPublic)return withPublic_1;hasRequiredWithPublic=1;var _=requireBn(),S=requireSafeBuffer$2().Buffer;function I(p,R){return S.from(p.toRed(_.mont(R.modulus)).redPow(new _(R.publicExponent)).fromRed().toArray())}return withPublic_1=I,withPublic_1}var publicEncrypt,hasRequiredPublicEncrypt;function requirePublicEncrypt(){if(hasRequiredPublicEncrypt)return publicEncrypt;hasRequiredPublicEncrypt=1;var _=requireParseAsn1(),S=requireBrowser$b(),I=requireBrowser$9(),p=requireMgf(),R=requireXor(),f=requireBn(),w=requireWithPublic(),m=requireBrowserifyRsa(),v=requireSafeBuffer$2().Buffer;publicEncrypt=function(x,B,A){var D;x.padding?D=x.padding:A?D=1:D=4;var C=_(x),P;if(D===4)P=y(C,B);else if(D===1)P=d(C,B,A);else if(D===3){if(P=new f(B),P.cmp(C.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return A?m(P,C):w(P,C)};function y(M,x){var B=M.modulus.byteLength(),A=x.length,D=I("sha1").update(v.alloc(0)).digest(),C=D.length,P=2*C;if(A>B-P-2)throw new Error("message too long");var H=v.alloc(B-A-P-2),N=B-C-1,V=S(C),Q=R(v.concat([D,H,v.alloc(1,1),x],N),p(V,N)),ne=R(V,p(Q,C));return new f(v.concat([v.alloc(1),ne,Q],B))}function d(M,x,B){var A=x.length,D=M.modulus.byteLength();if(A>D-11)throw new Error("message too long");var C;return B?C=v.alloc(D-A-3,255):C=g(D-A-3),new f(v.concat([v.from([0,B?1:2]),C,v.alloc(1),x],D))}function g(M){for(var x=v.allocUnsafe(M),B=0,A=S(M*2),D=0,C;B<M;)D===A.length&&(A=S(M*2),D=0),C=A[D++],C&&(x[B++]=C);return x}return publicEncrypt}var privateDecrypt,hasRequiredPrivateDecrypt;function requirePrivateDecrypt(){if(hasRequiredPrivateDecrypt)return privateDecrypt;hasRequiredPrivateDecrypt=1;var _=requireParseAsn1(),S=requireMgf(),I=requireXor(),p=requireBn(),R=requireBrowserifyRsa(),f=requireBrowser$9(),w=requireWithPublic(),m=requireSafeBuffer$2().Buffer;privateDecrypt=function(M,x,B){var A;M.padding?A=M.padding:B?A=1:A=4;var D=_(M),C=D.modulus.byteLength();if(x.length>C||new p(x).cmp(D.modulus)>=0)throw new Error("decryption error");var P;B?P=w(new p(x),D):P=R(x,D);var H=m.alloc(C-P.length);if(P=m.concat([H,P],C),A===4)return v(D,P);if(A===1)return y(D,P,B);if(A===3)return P;throw new Error("unknown padding")};function v(g,M){var x=g.modulus.byteLength(),B=f("sha1").update(m.alloc(0)).digest(),A=B.length;if(M[0]!==0)throw new Error("decryption error");var D=M.slice(1,A+1),C=M.slice(A+1),P=I(D,S(C,A)),H=I(C,S(P,x-A-1));if(d(B,H.slice(0,A)))throw new Error("decryption error");for(var N=A;H[N]===0;)N++;if(H[N++]!==1)throw new Error("decryption error");return H.slice(N)}function y(g,M,x){for(var B=M.slice(0,2),A=2,D=0;M[A++]!==0;)if(A>=M.length){D++;break}var C=M.slice(2,A-1);if((B.toString("hex")!=="0002"&&!x||B.toString("hex")!=="0001"&&x)&&D++,C.length<8&&D++,D)throw new Error("decryption error");return M.slice(A)}function d(g,M){g=m.from(g),M=m.from(M);var x=0,B=g.length;g.length!==M.length&&(x++,B=Math.min(g.length,M.length));for(var A=-1;++A<B;)x+=g[A]^M[A];return x}return privateDecrypt}var hasRequiredBrowser$1;function requireBrowser$1(){return hasRequiredBrowser$1||(hasRequiredBrowser$1=1,(function(_){_.publicEncrypt=requirePublicEncrypt(),_.privateDecrypt=requirePrivateDecrypt(),_.privateEncrypt=function(I,p){return _.publicEncrypt(I,p,!0)},_.publicDecrypt=function(I,p){return _.privateDecrypt(I,p,!0)}})(browser$1)),browser$1}var browser={},hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser;hasRequiredBrowser=1;function _(){throw new Error(`secure random number generation not supported by this browser
15
+ use chrome, FireFox or Internet Explorer 11`)}var S=requireSafeBuffer$2(),I=requireBrowser$b(),p=S.Buffer,R=S.kMaxLength,f=commonjsGlobal.crypto||commonjsGlobal.msCrypto,w=Math.pow(2,32)-1;function m(M,x){if(typeof M!="number"||M!==M)throw new TypeError("offset must be a number");if(M>w||M<0)throw new TypeError("offset must be a uint32");if(M>R||M>x)throw new RangeError("offset out of range")}function v(M,x,B){if(typeof M!="number"||M!==M)throw new TypeError("size must be a number");if(M>w||M<0)throw new TypeError("size must be a uint32");if(M+x>B||M>R)throw new RangeError("buffer too small")}f&&f.getRandomValues||!process$1.browser?(browser.randomFill=y,browser.randomFillSync=g):(browser.randomFill=_,browser.randomFillSync=_);function y(M,x,B,A){if(!p.isBuffer(M)&&!(M instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof x=="function")A=x,x=0,B=M.length;else if(typeof B=="function")A=B,B=M.length-x;else if(typeof A!="function")throw new TypeError('"cb" argument must be a function');return m(x,M.length),v(B,x,M.length),d(M,x,B,A)}function d(M,x,B,A){if(process$1.browser){var D=M.buffer,C=new Uint8Array(D,x,B);if(f.getRandomValues(C),A){process$1.nextTick(function(){A(null,M)});return}return M}if(A){I(B,function(H,N){if(H)return A(H);N.copy(M,x),A(null,M)});return}var P=I(B);return P.copy(M,x),M}function g(M,x,B){if(typeof x>"u"&&(x=0),!p.isBuffer(M)&&!(M instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return m(x,M.length),B===void 0&&(B=M.length-x),v(B,x,M.length),d(M,x,B)}return browser}var hasRequiredCryptoBrowserify;function requireCryptoBrowserify(){if(hasRequiredCryptoBrowserify)return cryptoBrowserify;hasRequiredCryptoBrowserify=1,cryptoBrowserify.randomBytes=cryptoBrowserify.rng=cryptoBrowserify.pseudoRandomBytes=cryptoBrowserify.prng=requireBrowser$b(),cryptoBrowserify.createHash=cryptoBrowserify.Hash=requireBrowser$9(),cryptoBrowserify.createHmac=cryptoBrowserify.Hmac=requireBrowser$8();var _=requireAlgos(),S=Object.keys(_),I=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(S);cryptoBrowserify.getHashes=function(){return I};var p=requireBrowser$7();cryptoBrowserify.pbkdf2=p.pbkdf2,cryptoBrowserify.pbkdf2Sync=p.pbkdf2Sync;var R=requireBrowser$5();cryptoBrowserify.Cipher=R.Cipher,cryptoBrowserify.createCipher=R.createCipher,cryptoBrowserify.Cipheriv=R.Cipheriv,cryptoBrowserify.createCipheriv=R.createCipheriv,cryptoBrowserify.Decipher=R.Decipher,cryptoBrowserify.createDecipher=R.createDecipher,cryptoBrowserify.Decipheriv=R.Decipheriv,cryptoBrowserify.createDecipheriv=R.createDecipheriv,cryptoBrowserify.getCiphers=R.getCiphers,cryptoBrowserify.listCiphers=R.listCiphers;var f=requireBrowser$4();cryptoBrowserify.DiffieHellmanGroup=f.DiffieHellmanGroup,cryptoBrowserify.createDiffieHellmanGroup=f.createDiffieHellmanGroup,cryptoBrowserify.getDiffieHellman=f.getDiffieHellman,cryptoBrowserify.createDiffieHellman=f.createDiffieHellman,cryptoBrowserify.DiffieHellman=f.DiffieHellman;var w=requireBrowser$3();cryptoBrowserify.createSign=w.createSign,cryptoBrowserify.Sign=w.Sign,cryptoBrowserify.createVerify=w.createVerify,cryptoBrowserify.Verify=w.Verify,cryptoBrowserify.createECDH=requireBrowser$2();var m=requireBrowser$1();cryptoBrowserify.publicEncrypt=m.publicEncrypt,cryptoBrowserify.privateEncrypt=m.privateEncrypt,cryptoBrowserify.publicDecrypt=m.publicDecrypt,cryptoBrowserify.privateDecrypt=m.privateDecrypt;var v=requireBrowser();return cryptoBrowserify.randomFill=v.randomFill,cryptoBrowserify.randomFillSync=v.randomFillSync,cryptoBrowserify.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
16
16
  we accept pull requests
17
- https://github.com/browserify/crypto-browserify`)},cryptoBrowserify.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},cryptoBrowserify}var cryptoBrowserifyExports=requireCryptoBrowserify();const getConfig=(_={})=>({region:_.region||process$1.env.BUNNY_REGION||"SG",baseHostName:"storage.bunnycdn.com",folderName:_.folderName||process$1.env.BUNNY_FOLDER_NAME||"",storageZone:_.storageZone||process$1.env.BUNNY_STORAGE_ZONE||"unset",password:_.password||process$1.env.BUNNY_PASSWORD||"unset"}),install=({storageZone:_,password:S,region:I,folderName:p})=>{_&&(process$1.env.BUNNY_STORAGE_ZONE=_),S&&(process$1.env.BUNNY_PASSWORD=S),I&&(process$1.env.BUNNY_REGION=I),p&&(process$1.env.BUNNY_FOLDER_NAME=p)},upload=async({file:_,buffer:S,...I})=>new Promise(async(p,R)=>{try{!S&&!_&&R({res:!1,message:"No file uploaded"});const f=getConfig(I),w=`${cryptoBrowserifyExports.randomUUID()}.webp`,m=S?S.length:_.buffer.length,v={method:"PUT",hostname:f.region?`${f.region}.${f.baseHostName}`:f.baseHostName,port:443,path:`/${f.storageZone}/${f.folderName}/${w}`,headers:{AccessKey:f.password,"Content-Type":"application/octet-stream","Content-Length":m.toString()}},y=await fetch(`https://${v.hostname}${v.path}`,{method:"PUT",headers:v.headers,body:S?new Uint8Array(S):new Uint8Array(_.buffer)});if(y.status===201){const d=f.folderName?`${f.folderName}/`:"",g=`https://${f.storageZone}.b-cdn.net/${d}${w}`;p({res:!0,message:"upload success",url:g})}else R({res:!1,message:"Upload failed",error:await y.text()})}catch{R({res:!1,message:"Server error"})}}),list=async(_={})=>new Promise((S,I)=>{try{const p=getConfig(_),R=p.region?`${p.region}.${p.baseHostName}`:p.baseHostName,f=p.folderName?`${p.folderName}/`:"",w=`https://${R}/${p.storageZone}/${f}`,m={AccessKey:p.password};fetch(w,{headers:m}).then(v=>v.json()).then(v=>{const y=v.map(d=>{const g=`https://${p.storageZone}.b-cdn.net/${f}${d.ObjectName}`;return{...d,Url:g}});S({res:!0,message:"List retrieved successfully",files:y})}).catch(v=>{I({res:!1,message:"Network error",error:v})})}catch{I({res:!1,message:"Server error"})}}),deleteFile=({ObjectName:_,href:S,...I})=>new Promise((p,R)=>{if(!_&&!S){R({res:!1,message:"No file specified for deletion"});return}try{const f=getConfig(I),w=f.region?`${f.region}.${f.baseHostName}`:f.baseHostName,m=S?decodeURIComponent(S.split("/")[S.split("/").length-1]):_;fetch(`https://${w}/${f.storageZone}/${f.folderName}/${m}`,{method:"DELETE",headers:{AccessKey:f.password}}).then(v=>{v.status===200?p({res:!0,message:"File deleted successfully"}):p({res:!1,message:"Failed to delete file"})}).catch(v=>{R({res:!1,message:"Network error",error:v})})}catch{R({res:!1,message:"Server error"})}}),BunnyCDN={install,upload,list,deleteFile};exports.default=BunnyCDN;exports.deleteFile=deleteFile;exports.install=install;exports.list=list;exports.upload=upload;
17
+ https://github.com/browserify/crypto-browserify`)},cryptoBrowserify.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},cryptoBrowserify}var cryptoBrowserifyExports=requireCryptoBrowserify();const getConfig=(_={})=>({region:_.region||process$1.env.BUNNY_REGION||"SG",baseHostName:"storage.bunnycdn.com",folderName:_.folderName||process$1.env.BUNNY_FOLDER_NAME||"",storageZone:_.storageZone||process$1.env.BUNNY_STORAGE_ZONE||"unset",password:_.password||process$1.env.BUNNY_PASSWORD||"unset"}),install=({storageZone:_,password:S,region:I,folderName:p})=>{_&&(process$1.env.BUNNY_STORAGE_ZONE=_),S&&(process$1.env.BUNNY_PASSWORD=S),I&&(process$1.env.BUNNY_REGION=I),p&&(process$1.env.BUNNY_FOLDER_NAME=p)},upload=async({file:_,buffer:S,folder:I,...p})=>new Promise(async(R,f)=>{try{!S&&!_&&f({res:!1,message:"No file uploaded"});const w=getConfig(p),m=S?S.length:_.buffer.length,v=w.folderName?`${w.folderName}/`:"",y=I?`${I}/`:"",d=`${cryptoBrowserifyExports.randomUUID()}.webp`,g={method:"PUT",hostname:w.region?`${w.region}.${w.baseHostName}`:w.baseHostName,port:443,path:`/${w.storageZone}/${v}${y}${d}`,headers:{AccessKey:w.password,"Content-Type":"application/octet-stream","Content-Length":m.toString()}},M=await fetch(`https://${g.hostname}${g.path}`,{method:"PUT",headers:g.headers,body:S?new Uint8Array(S):new Uint8Array(_.buffer)});if(M.status===201){const x=`https://${w.storageZone}.b-cdn.net/${v}${y}${d}`;R({res:!0,message:"upload success",url:x})}else f({res:!1,message:"Upload failed",error:await M.text()})}catch{f({res:!1,message:"Server error"})}}),list=async({folder:_="",configOverrides:S={}}={})=>new Promise((I,p)=>{try{const R=getConfig(S),f=R.region?`${R.region}.${R.baseHostName}`:R.baseHostName,w=R.folderName?`${R.folderName}/`:"",m=_?`${_}/`:"",v=`https://${f}/${R.storageZone}/${w}${m}`,y={AccessKey:R.password};fetch(v,{headers:y}).then(d=>d.json()).then(d=>{const g=d.map(M=>{const x=`https://${R.storageZone}.b-cdn.net/${w}${m}${M.ObjectName}`;return{...M,Url:x}});I({res:!0,message:"List retrieved successfully",files:g})}).catch(d=>{p({res:!1,message:"Network error",error:d})})}catch{p({res:!1,message:"Server error"})}}),deleteFile=({ObjectName:_,href:S,...I})=>new Promise((p,R)=>{if(!_&&!S){R({res:!1,message:"No file specified for deletion"});return}try{const f=getConfig(I),w=f.region?`${f.region}.${f.baseHostName}`:f.baseHostName,m=S?decodeURIComponent(S.split("/")[S.split("/").length-1]):_;fetch(`https://${w}/${f.storageZone}/${f.folderName}/${m}`,{method:"DELETE",headers:{AccessKey:f.password}}).then(v=>{v.status===200?p({res:!0,message:"File deleted successfully"}):p({res:!1,message:"Failed to delete file"})}).catch(v=>{R({res:!1,message:"Network error",error:v})})}catch{R({res:!1,message:"Server error"})}}),BunnyCDN={install,upload,list,deleteFile};exports.default=BunnyCDN;exports.deleteFile=deleteFile;exports.install=install;exports.list=list;exports.upload=upload;