(self["webpackChunkpatch_based_motion_synthesis"]=self["webpackChunkpatch_based_motion_synthesis"]||[]).push([[681],{206:function(t,e,i){var r=i(1702);t.exports=r([].slice)},9363:function(t){t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},6833:function(t,e,i){var r=i(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:function(t,e,i){var r=i(6027),n=i(4326);t.exports="undefined"!=typeof r&&"process"==n(r)},2104:function(t,e,i){var r=i(4374),n=Function.prototype,o=n.apply,s=n.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(o):function(){return s.apply(o,arguments)})},9974:function(t,e,i){var r=i(1470),n=i(9662),o=i(4374),s=r(r.bind);t.exports=function(t,e){return n(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},1470:function(t,e,i){var r=i(4326),n=i(1702);t.exports=function(t){if("Function"===r(t))return n(t)}},490:function(t,e,i){var r=i(5005);t.exports=r("document","documentElement")},7152:function(t,e,i){"use strict";var r=i(7854),n=i(2104),o=i(614),s=i(9363),a=i(8113),h=i(206),u=i(8053),f=r.Function,l=/MSIE .\./.test(a)||s&&function(){var t=r.Bun.version.split(".");return t.length<3||0==t[0]&&(t[1]<3||3==t[1]&&0==t[2])}();t.exports=function(t,e){var i=e?2:1;return l?function(r,s){var a=u(arguments.length,1)>i,l=o(r)?r:f(r),d=a?h(arguments,i):[],c=a?function(){n(l,this,d)}:l;return e?t(c,s):t(c)}:t}},261:function(t,e,i){var r,n,o,s,a=i(7854),h=i(2104),u=i(9974),f=i(614),l=i(2597),d=i(7293),c=i(490),p=i(206),m=i(317),b=i(8053),g=i(6833),v=i(5268),y=a.setImmediate,w=a.clearImmediate,_=a.process,M=a.Dispatch,S=a.Function,k=a.MessageChannel,E=a.String,x=0,A={},R="onreadystatechange";d((function(){r=a.location}));var T=function(t){if(l(A,t)){var e=A[t];delete A[t],e()}},I=function(t){return function(){T(t)}},L=function(t){T(t.data)},B=function(t){a.postMessage(E(t),r.protocol+"//"+r.host)};y&&w||(y=function(t){b(arguments.length,1);var e=f(t)?t:S(t),i=p(arguments,1);return A[++x]=function(){h(e,void 0,i)},n(x),x},w=function(t){delete A[t]},v?n=function(t){_.nextTick(I(t))}:M&&M.now?n=function(t){M.now(I(t))}:k&&!g?(o=new k,s=o.port2,o.port1.onmessage=L,n=u(s.postMessage,s)):a.addEventListener&&f(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!d(B)?(n=B,a.addEventListener("message",L,!1)):n=R in m("script")?function(t){c.appendChild(m("script"))[R]=function(){c.removeChild(this),T(t)}}:function(t){setTimeout(I(t),0)}),t.exports={set:y,clear:w}},8053:function(t){var e=TypeError;t.exports=function(t,i){if(t>6],n=0===(32&i);if(31===(31&i)){let r=i;i=0;while(128===(128&r)){if(r=t.readUInt8(e),t.isError(r))return r;i<<=7,i|=127&r}}else i&=31;const o=a.tag[i];return{cls:r,primitive:n,tag:i,tagStr:o}}function l(t,e,i){let r=t.readUInt8(i);if(t.isError(r))return r;if(!e&&128===r)return null;if(0===(128&r))return r;const n=127&r;if(n>4)return t.error("length octect is too long");r=0;for(let o=0;o=31?r.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=s.tagClassByName[i||"universal"]<<6,n)}t.exports=a,a.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(h,o),h.prototype._encodeComposite=function(t,e,i,r){const o=f(t,e,i,this.reporter);if(r.length<128){const t=n.alloc(2);return t[0]=o,t[1]=r.length,this._createEncoderBuffer([t,r])}let s=1;for(let n=r.length;n>=256;n>>=8)s++;const a=n.alloc(2+s);a[0]=o,a[1]=128|s;for(let n=1+s,h=r.length;h>0;n--,h>>=8)a[n]=255&h;return this._createEncoderBuffer([a,r])},h.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=n.alloc(2*t.length);for(let i=0;i=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let r=0;for(let n=0;n=128;e>>=7)r++}const o=n.alloc(r);let s=o.length-1;for(let n=t.length-1;n>=0;n--){let e=t[n];o[s--]=127&e;while((e>>=7)>0)o[s--]=128|127&e}return this._createEncoderBuffer(o)},h.prototype._encodeTime=function(t,e){let i;const r=new Date(t);return"gentime"===e?i=[u(r.getUTCFullYear()),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?i=[u(r.getUTCFullYear()%100),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(i,"octstr")},h.prototype._encodeNull=function(){return this._createEncoderBuffer("")},h.prototype._encodeInt=function(t,e){if("string"===typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!==typeof t&&!n.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=n.from(e)}if(n.isBuffer(t)){let e=t.length;0===t.length&&e++;const i=n.alloc(e);return t.copy(i),0===t.length&&(i[0]=0),this._createEncoderBuffer(i)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let i=1;for(let n=t;n>=256;n>>=8)i++;const r=new Array(i);for(let n=r.length-1;n>=0;n--)r[n]=255&t,t>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(n.from(r))},h.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},h.prototype._use=function(t,e){return"function"===typeof t&&(t=t(e)),t._getEncoder("der").tree},h.prototype._skipDefault=function(t,e,i){const r=this._baseState;let n;if(null===r["default"])return!1;const o=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r["default"],e,i).join()),o.length!==r.defaultBuffer.length)return!1;for(n=0;n=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=a(t,i);return i-1>=e&&(r|=a(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"===typeof t)return this._initNumber(t,e,i);if("object"===typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var n=0;"-"===t[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=h(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else{var a=t.length-e;for(r=a%2===0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8}this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,a=Math.min(o,o-s)+i,h=0,f=i;f1&&0===this.words[this.length-1])this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","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"],l=[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],d=[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];function c(t){for(var e=new Array(t.bitLength()),i=0;i>>n}return e}function p(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;i.words[0]=a;for(var u=1;u>>26,l=67108863&h,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;n=0|t.words[p],o=0|e.words[c],s=n*o+l,f+=s/67108864|0,l=67108863&s}i.words[u]=0|l,h=0|f}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(t=t||10,e=0|e||1,16===t||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215,i=0!==o||s!==this.length-1?f[6-h.length]+h+i:h+i,n+=2,n>=26&&(n-=26,s--)}0!==o&&(i=o.toString(16)+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],c=d[t];i="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(c).toString(t);p=p.idivn(c),i=p.isZero()?m+i:f[u-m.length]+m+i}this.isZero()&&(i="0"+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0===(8191&e)&&(i+=13,e>>>=13),0===(127&e)&&(i+=7,e>>>=7),0===(15&e)&&(i+=4,e>>>=4),0===(3&e)&&(i+=2,e>>>=2),0===(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,c=0|s[1],p=8191&c,m=c>>>13,b=0|s[2],g=8191&b,v=b>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,k=M>>>13,E=0|s[5],x=8191&E,A=E>>>13,R=0|s[6],T=8191&R,I=R>>>13,L=0|s[7],B=8191&L,O=L>>>13,N=0|s[8],C=8191&N,P=N>>>13,j=0|s[9],D=8191&j,q=j>>>13,U=0|a[0],z=8191&U,F=U>>>13,Z=0|a[1],W=8191&Z,H=Z>>>13,K=0|a[2],V=8191&K,G=K>>>13,X=0|a[3],Y=8191&X,$=X>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],it=8191&et,rt=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,dt=ft>>>13,ct=0|a[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19,r=Math.imul(l,z),n=Math.imul(l,F),n=n+Math.imul(d,z)|0,o=Math.imul(d,F);var bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(p,z),n=Math.imul(p,F),n=n+Math.imul(m,z)|0,o=Math.imul(m,F),r=r+Math.imul(l,W)|0,n=n+Math.imul(l,H)|0,n=n+Math.imul(d,W)|0,o=o+Math.imul(d,H)|0;var gt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,z),n=Math.imul(g,F),n=n+Math.imul(v,z)|0,o=Math.imul(v,F),r=r+Math.imul(p,W)|0,n=n+Math.imul(p,H)|0,n=n+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,r=r+Math.imul(l,V)|0,n=n+Math.imul(l,G)|0,n=n+Math.imul(d,V)|0,o=o+Math.imul(d,G)|0;var vt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),n=Math.imul(w,F),n=n+Math.imul(_,z)|0,o=Math.imul(_,F),r=r+Math.imul(g,W)|0,n=n+Math.imul(g,H)|0,n=n+Math.imul(v,W)|0,o=o+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,n=n+Math.imul(p,G)|0,n=n+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,r=r+Math.imul(l,Y)|0,n=n+Math.imul(l,$)|0,n=n+Math.imul(d,Y)|0,o=o+Math.imul(d,$)|0;var yt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=Math.imul(S,F),n=n+Math.imul(k,z)|0,o=Math.imul(k,F),r=r+Math.imul(w,W)|0,n=n+Math.imul(w,H)|0,n=n+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,r=r+Math.imul(g,V)|0,n=n+Math.imul(g,G)|0,n=n+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,Y)|0,n=n+Math.imul(p,$)|0,n=n+Math.imul(m,Y)|0,o=o+Math.imul(m,$)|0,r=r+Math.imul(l,Q)|0,n=n+Math.imul(l,tt)|0,n=n+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,z),n=Math.imul(x,F),n=n+Math.imul(A,z)|0,o=Math.imul(A,F),r=r+Math.imul(S,W)|0,n=n+Math.imul(S,H)|0,n=n+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(w,V)|0,n=n+Math.imul(w,G)|0,n=n+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(g,Y)|0,n=n+Math.imul(g,$)|0,n=n+Math.imul(v,Y)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Q)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(l,it)|0,n=n+Math.imul(l,rt)|0,n=n+Math.imul(d,it)|0,o=o+Math.imul(d,rt)|0;var _t=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,z),n=Math.imul(T,F),n=n+Math.imul(I,z)|0,o=Math.imul(I,F),r=r+Math.imul(x,W)|0,n=n+Math.imul(x,H)|0,n=n+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,r=r+Math.imul(S,V)|0,n=n+Math.imul(S,G)|0,n=n+Math.imul(k,V)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,Y)|0,n=n+Math.imul(w,$)|0,n=n+Math.imul(_,Y)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(g,Q)|0,n=n+Math.imul(g,tt)|0,n=n+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,it)|0,n=n+Math.imul(p,rt)|0,n=n+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(l,ot)|0,n=n+Math.imul(l,st)|0,n=n+Math.imul(d,ot)|0,o=o+Math.imul(d,st)|0;var Mt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,z),n=Math.imul(B,F),n=n+Math.imul(O,z)|0,o=Math.imul(O,F),r=r+Math.imul(T,W)|0,n=n+Math.imul(T,H)|0,n=n+Math.imul(I,W)|0,o=o+Math.imul(I,H)|0,r=r+Math.imul(x,V)|0,n=n+Math.imul(x,G)|0,n=n+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(S,Y)|0,n=n+Math.imul(S,$)|0,n=n+Math.imul(k,Y)|0,o=o+Math.imul(k,$)|0,r=r+Math.imul(w,Q)|0,n=n+Math.imul(w,tt)|0,n=n+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(g,it)|0,n=n+Math.imul(g,rt)|0,n=n+Math.imul(v,it)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,n=n+Math.imul(p,st)|0,n=n+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(l,ht)|0,n=n+Math.imul(l,ut)|0,n=n+Math.imul(d,ht)|0,o=o+Math.imul(d,ut)|0;var St=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(C,z),n=Math.imul(C,F),n=n+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(B,W)|0,n=n+Math.imul(B,H)|0,n=n+Math.imul(O,W)|0,o=o+Math.imul(O,H)|0,r=r+Math.imul(T,V)|0,n=n+Math.imul(T,G)|0,n=n+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,Y)|0,n=n+Math.imul(x,$)|0,n=n+Math.imul(A,Y)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(S,Q)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,it)|0,n=n+Math.imul(w,rt)|0,n=n+Math.imul(_,it)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(g,ot)|0,n=n+Math.imul(g,st)|0,n=n+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,r=r+Math.imul(p,ht)|0,n=n+Math.imul(p,ut)|0,n=n+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0,r=r+Math.imul(l,lt)|0,n=n+Math.imul(l,dt)|0,n=n+Math.imul(d,lt)|0,o=o+Math.imul(d,dt)|0;var kt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(D,z),n=Math.imul(D,F),n=n+Math.imul(q,z)|0,o=Math.imul(q,F),r=r+Math.imul(C,W)|0,n=n+Math.imul(C,H)|0,n=n+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(B,V)|0,n=n+Math.imul(B,G)|0,n=n+Math.imul(O,V)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(T,Y)|0,n=n+Math.imul(T,$)|0,n=n+Math.imul(I,Y)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(x,Q)|0,n=n+Math.imul(x,tt)|0,n=n+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(S,it)|0,n=n+Math.imul(S,rt)|0,n=n+Math.imul(k,it)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,n=n+Math.imul(w,st)|0,n=n+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(g,ht)|0,n=n+Math.imul(g,ut)|0,n=n+Math.imul(v,ht)|0,o=o+Math.imul(v,ut)|0,r=r+Math.imul(p,lt)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0,r=r+Math.imul(l,pt)|0,n=n+Math.imul(l,mt)|0,n=n+Math.imul(d,pt)|0,o=o+Math.imul(d,mt)|0;var Et=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(D,W),n=Math.imul(D,H),n=n+Math.imul(q,W)|0,o=Math.imul(q,H),r=r+Math.imul(C,V)|0,n=n+Math.imul(C,G)|0,n=n+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(B,Y)|0,n=n+Math.imul(B,$)|0,n=n+Math.imul(O,Y)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(T,Q)|0,n=n+Math.imul(T,tt)|0,n=n+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,it)|0,n=n+Math.imul(x,rt)|0,n=n+Math.imul(A,it)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(S,ot)|0,n=n+Math.imul(S,st)|0,n=n+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,r=r+Math.imul(w,ht)|0,n=n+Math.imul(w,ut)|0,n=n+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,r=r+Math.imul(g,lt)|0,n=n+Math.imul(g,dt)|0,n=n+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0,r=r+Math.imul(p,pt)|0,n=n+Math.imul(p,mt)|0,n=n+Math.imul(m,pt)|0,o=o+Math.imul(m,mt)|0;var xt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(D,V),n=Math.imul(D,G),n=n+Math.imul(q,V)|0,o=Math.imul(q,G),r=r+Math.imul(C,Y)|0,n=n+Math.imul(C,$)|0,n=n+Math.imul(P,Y)|0,o=o+Math.imul(P,$)|0,r=r+Math.imul(B,Q)|0,n=n+Math.imul(B,tt)|0,n=n+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(T,it)|0,n=n+Math.imul(T,rt)|0,n=n+Math.imul(I,it)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,n=n+Math.imul(x,st)|0,n=n+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,r=r+Math.imul(S,ht)|0,n=n+Math.imul(S,ut)|0,n=n+Math.imul(k,ht)|0,o=o+Math.imul(k,ut)|0,r=r+Math.imul(w,lt)|0,n=n+Math.imul(w,dt)|0,n=n+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0,r=r+Math.imul(g,pt)|0,n=n+Math.imul(g,mt)|0,n=n+Math.imul(v,pt)|0,o=o+Math.imul(v,mt)|0;var At=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(D,Y),n=Math.imul(D,$),n=n+Math.imul(q,Y)|0,o=Math.imul(q,$),r=r+Math.imul(C,Q)|0,n=n+Math.imul(C,tt)|0,n=n+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(B,it)|0,n=n+Math.imul(B,rt)|0,n=n+Math.imul(O,it)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(T,ot)|0,n=n+Math.imul(T,st)|0,n=n+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(x,ht)|0,n=n+Math.imul(x,ut)|0,n=n+Math.imul(A,ht)|0,o=o+Math.imul(A,ut)|0,r=r+Math.imul(S,lt)|0,n=n+Math.imul(S,dt)|0,n=n+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0,r=r+Math.imul(w,pt)|0,n=n+Math.imul(w,mt)|0,n=n+Math.imul(_,pt)|0,o=o+Math.imul(_,mt)|0;var Rt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(D,Q),n=Math.imul(D,tt),n=n+Math.imul(q,Q)|0,o=Math.imul(q,tt),r=r+Math.imul(C,it)|0,n=n+Math.imul(C,rt)|0,n=n+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(B,ot)|0,n=n+Math.imul(B,st)|0,n=n+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(T,ht)|0,n=n+Math.imul(T,ut)|0,n=n+Math.imul(I,ht)|0,o=o+Math.imul(I,ut)|0,r=r+Math.imul(x,lt)|0,n=n+Math.imul(x,dt)|0,n=n+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0,r=r+Math.imul(S,pt)|0,n=n+Math.imul(S,mt)|0,n=n+Math.imul(k,pt)|0,o=o+Math.imul(k,mt)|0;var Tt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(D,it),n=Math.imul(D,rt),n=n+Math.imul(q,it)|0,o=Math.imul(q,rt),r=r+Math.imul(C,ot)|0,n=n+Math.imul(C,st)|0,n=n+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(B,ht)|0,n=n+Math.imul(B,ut)|0,n=n+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,r=r+Math.imul(T,lt)|0,n=n+Math.imul(T,dt)|0,n=n+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0,r=r+Math.imul(x,pt)|0,n=n+Math.imul(x,mt)|0,n=n+Math.imul(A,pt)|0,o=o+Math.imul(A,mt)|0;var It=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(D,ot),n=Math.imul(D,st),n=n+Math.imul(q,ot)|0,o=Math.imul(q,st),r=r+Math.imul(C,ht)|0,n=n+Math.imul(C,ut)|0,n=n+Math.imul(P,ht)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(B,lt)|0,n=n+Math.imul(B,dt)|0,n=n+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0,r=r+Math.imul(T,pt)|0,n=n+Math.imul(T,mt)|0,n=n+Math.imul(I,pt)|0,o=o+Math.imul(I,mt)|0;var Lt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(D,ht),n=Math.imul(D,ut),n=n+Math.imul(q,ht)|0,o=Math.imul(q,ut),r=r+Math.imul(C,lt)|0,n=n+Math.imul(C,dt)|0,n=n+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0,r=r+Math.imul(B,pt)|0,n=n+Math.imul(B,mt)|0,n=n+Math.imul(O,pt)|0,o=o+Math.imul(O,mt)|0;var Bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(D,lt),n=Math.imul(D,dt),n=n+Math.imul(q,lt)|0,o=Math.imul(q,dt),r=r+Math.imul(C,pt)|0,n=n+Math.imul(C,mt)|0,n=n+Math.imul(P,pt)|0,o=o+Math.imul(P,mt)|0;var Ot=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(D,pt),n=Math.imul(D,mt),n=n+Math.imul(q,pt)|0,o=Math.imul(q,mt);var Nt=(u+r|0)+((8191&n)<<13)|0;return u=(o+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=bt,h[1]=gt,h[2]=vt,h[3]=yt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=kt,h[9]=Et,h[10]=xt,h[11]=At,h[12]=Rt,h[13]=Tt,h[14]=It,h[15]=Lt,h[16]=Bt,h[17]=Ot,h[18]=Nt,0!==u&&(h[19]=u,i.length++),i};function b(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0,n+=s>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}function g(t,e,i){var r=new v;return r.mulp(t,e,i)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?b(this,t,e):g(this,t,e),i},v.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r>=1;return r},v.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=c(t);if(0===e.length)return new o(1);for(var i=this,r=0;r=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=this.length-t.length,r=this.clone(),n=t,s=0|n.words[n.length-1],a=this._countBits(s);i=26-a,0!==i&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var h,u=r.length-n.length;if("mod"!==e){h=new o(null),h.length=u+1,h.words=new Array(h.length);for(var f=0;f=0;d--){var c=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,d);while(0!==r.negative)c--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);h&&(h.words[d]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n=new o(1),s=new o(0),a=new o(0),h=new o(1),u=0;while(e.isEven()&&i.isEven())e.iushrn(1),i.iushrn(1),++u;var f=i.clone(),l=e.clone();while(!e.isZero()){for(var d=0,c=1;0===(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0){e.iushrn(d);while(d-- >0)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1)}for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0){i.iushrn(p);while(p-- >0)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1)}e.cmp(i)>=0?(e.isub(i),n.isub(a),s.isub(h)):(i.isub(e),a.isub(n),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n,s=new o(1),a=new o(0),h=i.clone();while(e.cmpn(1)>0&&i.cmpn(1)>0){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0){e.iushrn(u);while(u-- >0)s.isOdd()&&s.iadd(h),s.iushrn(1)}for(var l=0,d=1;0===(i.words[0]&d)&&l<26;++l,d<<=1);if(l>0){i.iushrn(l);while(l-- >0)a.isOdd()&&a.iadd(h),a.iushrn(1)}e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return n=0===e.cmpn(1)?s:a,n.cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);do{while(e.isEven())e.iushrn(1);while(i.isEven())i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}while(1);return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){rn&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),e=i.bitLength()}while(e>this.n);var r=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},n(_,w),_.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new M;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return y[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}var n=this.m.subn(1),s=0;while(!n.isZero()&&0===n.andln(1))s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new o(2*f*f).toRed(this);while(0!==this.pow(f,u).cmp(h))f.redIAdd(h);var l=this.pow(f,n),d=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=s;while(0!==c.cmp(a)){for(var m=c,b=0;0!==m.cmp(a);b++)m=m.redSqr();r(b=0;n--){for(var f=e.words[n],l=u-1;l>=0;l--){var d=f>>l&1;s!==r[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,h++,(h===i||0===n&&0===l)&&(s=this.mul(s,r[a]),h=0,a=0)):h=0}u=26}return s},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},n(x,E),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(t,this)},2396:function(t,e,i){t=i.nmd(t),function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:i(6601).Buffer}catch(I){}function a(t,e){var i=t.charCodeAt(e);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void r(!1,"Invalid character in "+t)}function h(t,e,i){var r=a(t,i);return i-1>=e&&(r|=a(t,i-1)<<4),r}function u(t,e,i,n){for(var o=0,s=0,a=Math.min(t.length,i),h=e;h=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"===typeof t)return this._initNumber(t,e,i);if("object"===typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var n=0;"-"===t[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=h(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else{var a=t.length-e;for(r=a%2===0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8}this._strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,a=Math.min(o,o-s)+i,h=0,f=i;f1&&0===this.words[this.length-1])this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(I){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}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"],c=[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],p=[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];o.prototype.toString=function(t,e){var i;if(t=t||10,e=0|e||1,16===t||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215,n+=2,n>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?d[6-h.length]+h+i:h+i}0!==o&&(i=o.toString(16)+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=c[t],f=p[t];i="";var l=this.clone();l.negative=0;while(!l.isZero()){var m=l.modrn(f).toString(t);l=l.idivn(f),i=l.isZero()?m+i:d[u-m.length]+m+i}this.isZero()&&(i="0"+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};var m=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)};function b(t){for(var e=new Array(t.bitLength()),i=0;i>>n&1}return e}function g(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;i.words[0]=a;for(var u=1;u>>26,l=67108863&h,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;n=0|t.words[p],o=0|e.words[c],s=n*o+l,f+=s/67108864|0,l=67108863&s}i.words[u]=0|l,h=0|f}return 0!==h?i.words[u]=0|h:i.length--,i._strip()}o.prototype.toArrayLike=function(t,e,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=m(t,o),a="le"===e?"LE":"BE";return this["_toArrayLike"+a](s,n),s},o.prototype._toArrayLikeLE=function(t,e){for(var i=0,r=0,n=0,o=0;n>8&255),i>16&255),6===o?(i>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i=0&&(t[i--]=s>>8&255),i>=0&&(t[i--]=s>>16&255),6===o?(i>=0&&(t[i--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i>=0){t[i--]=r;while(i>=0)t[i--]=0}},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0===(8191&e)&&(i+=13,e>>>=13),0===(127&e)&&(i+=7,e>>>=7),0===(15&e)&&(i+=4,e>>>=4),0===(3&e)&&(i+=2,e>>>=2),0===(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,c=0|s[1],p=8191&c,m=c>>>13,b=0|s[2],g=8191&b,v=b>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,k=M>>>13,E=0|s[5],x=8191&E,A=E>>>13,R=0|s[6],T=8191&R,I=R>>>13,L=0|s[7],B=8191&L,O=L>>>13,N=0|s[8],C=8191&N,P=N>>>13,j=0|s[9],D=8191&j,q=j>>>13,U=0|a[0],z=8191&U,F=U>>>13,Z=0|a[1],W=8191&Z,H=Z>>>13,K=0|a[2],V=8191&K,G=K>>>13,X=0|a[3],Y=8191&X,$=X>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],it=8191&et,rt=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,dt=ft>>>13,ct=0|a[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19,r=Math.imul(l,z),n=Math.imul(l,F),n=n+Math.imul(d,z)|0,o=Math.imul(d,F);var bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(p,z),n=Math.imul(p,F),n=n+Math.imul(m,z)|0,o=Math.imul(m,F),r=r+Math.imul(l,W)|0,n=n+Math.imul(l,H)|0,n=n+Math.imul(d,W)|0,o=o+Math.imul(d,H)|0;var gt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,z),n=Math.imul(g,F),n=n+Math.imul(v,z)|0,o=Math.imul(v,F),r=r+Math.imul(p,W)|0,n=n+Math.imul(p,H)|0,n=n+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,r=r+Math.imul(l,V)|0,n=n+Math.imul(l,G)|0,n=n+Math.imul(d,V)|0,o=o+Math.imul(d,G)|0;var vt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),n=Math.imul(w,F),n=n+Math.imul(_,z)|0,o=Math.imul(_,F),r=r+Math.imul(g,W)|0,n=n+Math.imul(g,H)|0,n=n+Math.imul(v,W)|0,o=o+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,n=n+Math.imul(p,G)|0,n=n+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,r=r+Math.imul(l,Y)|0,n=n+Math.imul(l,$)|0,n=n+Math.imul(d,Y)|0,o=o+Math.imul(d,$)|0;var yt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=Math.imul(S,F),n=n+Math.imul(k,z)|0,o=Math.imul(k,F),r=r+Math.imul(w,W)|0,n=n+Math.imul(w,H)|0,n=n+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,r=r+Math.imul(g,V)|0,n=n+Math.imul(g,G)|0,n=n+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,Y)|0,n=n+Math.imul(p,$)|0,n=n+Math.imul(m,Y)|0,o=o+Math.imul(m,$)|0,r=r+Math.imul(l,Q)|0,n=n+Math.imul(l,tt)|0,n=n+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,z),n=Math.imul(x,F),n=n+Math.imul(A,z)|0,o=Math.imul(A,F),r=r+Math.imul(S,W)|0,n=n+Math.imul(S,H)|0,n=n+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(w,V)|0,n=n+Math.imul(w,G)|0,n=n+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(g,Y)|0,n=n+Math.imul(g,$)|0,n=n+Math.imul(v,Y)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Q)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(l,it)|0,n=n+Math.imul(l,rt)|0,n=n+Math.imul(d,it)|0,o=o+Math.imul(d,rt)|0;var _t=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,z),n=Math.imul(T,F),n=n+Math.imul(I,z)|0,o=Math.imul(I,F),r=r+Math.imul(x,W)|0,n=n+Math.imul(x,H)|0,n=n+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,r=r+Math.imul(S,V)|0,n=n+Math.imul(S,G)|0,n=n+Math.imul(k,V)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,Y)|0,n=n+Math.imul(w,$)|0,n=n+Math.imul(_,Y)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(g,Q)|0,n=n+Math.imul(g,tt)|0,n=n+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,it)|0,n=n+Math.imul(p,rt)|0,n=n+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(l,ot)|0,n=n+Math.imul(l,st)|0,n=n+Math.imul(d,ot)|0,o=o+Math.imul(d,st)|0;var Mt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,z),n=Math.imul(B,F),n=n+Math.imul(O,z)|0,o=Math.imul(O,F),r=r+Math.imul(T,W)|0,n=n+Math.imul(T,H)|0,n=n+Math.imul(I,W)|0,o=o+Math.imul(I,H)|0,r=r+Math.imul(x,V)|0,n=n+Math.imul(x,G)|0,n=n+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(S,Y)|0,n=n+Math.imul(S,$)|0,n=n+Math.imul(k,Y)|0,o=o+Math.imul(k,$)|0,r=r+Math.imul(w,Q)|0,n=n+Math.imul(w,tt)|0,n=n+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(g,it)|0,n=n+Math.imul(g,rt)|0,n=n+Math.imul(v,it)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,n=n+Math.imul(p,st)|0,n=n+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(l,ht)|0,n=n+Math.imul(l,ut)|0,n=n+Math.imul(d,ht)|0,o=o+Math.imul(d,ut)|0;var St=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(C,z),n=Math.imul(C,F),n=n+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(B,W)|0,n=n+Math.imul(B,H)|0,n=n+Math.imul(O,W)|0,o=o+Math.imul(O,H)|0,r=r+Math.imul(T,V)|0,n=n+Math.imul(T,G)|0,n=n+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,Y)|0,n=n+Math.imul(x,$)|0,n=n+Math.imul(A,Y)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(S,Q)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,it)|0,n=n+Math.imul(w,rt)|0,n=n+Math.imul(_,it)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(g,ot)|0,n=n+Math.imul(g,st)|0,n=n+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,r=r+Math.imul(p,ht)|0,n=n+Math.imul(p,ut)|0,n=n+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0,r=r+Math.imul(l,lt)|0,n=n+Math.imul(l,dt)|0,n=n+Math.imul(d,lt)|0,o=o+Math.imul(d,dt)|0;var kt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(D,z),n=Math.imul(D,F),n=n+Math.imul(q,z)|0,o=Math.imul(q,F),r=r+Math.imul(C,W)|0,n=n+Math.imul(C,H)|0,n=n+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(B,V)|0,n=n+Math.imul(B,G)|0,n=n+Math.imul(O,V)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(T,Y)|0,n=n+Math.imul(T,$)|0,n=n+Math.imul(I,Y)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(x,Q)|0,n=n+Math.imul(x,tt)|0,n=n+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(S,it)|0,n=n+Math.imul(S,rt)|0,n=n+Math.imul(k,it)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,n=n+Math.imul(w,st)|0,n=n+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(g,ht)|0,n=n+Math.imul(g,ut)|0,n=n+Math.imul(v,ht)|0,o=o+Math.imul(v,ut)|0,r=r+Math.imul(p,lt)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0,r=r+Math.imul(l,pt)|0,n=n+Math.imul(l,mt)|0,n=n+Math.imul(d,pt)|0,o=o+Math.imul(d,mt)|0;var Et=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(D,W),n=Math.imul(D,H),n=n+Math.imul(q,W)|0,o=Math.imul(q,H),r=r+Math.imul(C,V)|0,n=n+Math.imul(C,G)|0,n=n+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(B,Y)|0,n=n+Math.imul(B,$)|0,n=n+Math.imul(O,Y)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(T,Q)|0,n=n+Math.imul(T,tt)|0,n=n+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,it)|0,n=n+Math.imul(x,rt)|0,n=n+Math.imul(A,it)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(S,ot)|0,n=n+Math.imul(S,st)|0,n=n+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,r=r+Math.imul(w,ht)|0,n=n+Math.imul(w,ut)|0,n=n+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,r=r+Math.imul(g,lt)|0,n=n+Math.imul(g,dt)|0,n=n+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0,r=r+Math.imul(p,pt)|0,n=n+Math.imul(p,mt)|0,n=n+Math.imul(m,pt)|0,o=o+Math.imul(m,mt)|0;var xt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(D,V),n=Math.imul(D,G),n=n+Math.imul(q,V)|0,o=Math.imul(q,G),r=r+Math.imul(C,Y)|0,n=n+Math.imul(C,$)|0,n=n+Math.imul(P,Y)|0,o=o+Math.imul(P,$)|0,r=r+Math.imul(B,Q)|0,n=n+Math.imul(B,tt)|0,n=n+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(T,it)|0,n=n+Math.imul(T,rt)|0,n=n+Math.imul(I,it)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,n=n+Math.imul(x,st)|0,n=n+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,r=r+Math.imul(S,ht)|0,n=n+Math.imul(S,ut)|0,n=n+Math.imul(k,ht)|0,o=o+Math.imul(k,ut)|0,r=r+Math.imul(w,lt)|0,n=n+Math.imul(w,dt)|0,n=n+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0,r=r+Math.imul(g,pt)|0,n=n+Math.imul(g,mt)|0,n=n+Math.imul(v,pt)|0,o=o+Math.imul(v,mt)|0;var At=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(D,Y),n=Math.imul(D,$),n=n+Math.imul(q,Y)|0,o=Math.imul(q,$),r=r+Math.imul(C,Q)|0,n=n+Math.imul(C,tt)|0,n=n+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(B,it)|0,n=n+Math.imul(B,rt)|0,n=n+Math.imul(O,it)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(T,ot)|0,n=n+Math.imul(T,st)|0,n=n+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(x,ht)|0,n=n+Math.imul(x,ut)|0,n=n+Math.imul(A,ht)|0,o=o+Math.imul(A,ut)|0,r=r+Math.imul(S,lt)|0,n=n+Math.imul(S,dt)|0,n=n+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0,r=r+Math.imul(w,pt)|0,n=n+Math.imul(w,mt)|0,n=n+Math.imul(_,pt)|0,o=o+Math.imul(_,mt)|0;var Rt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(D,Q),n=Math.imul(D,tt),n=n+Math.imul(q,Q)|0,o=Math.imul(q,tt),r=r+Math.imul(C,it)|0,n=n+Math.imul(C,rt)|0,n=n+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(B,ot)|0,n=n+Math.imul(B,st)|0,n=n+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(T,ht)|0,n=n+Math.imul(T,ut)|0,n=n+Math.imul(I,ht)|0,o=o+Math.imul(I,ut)|0,r=r+Math.imul(x,lt)|0,n=n+Math.imul(x,dt)|0,n=n+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0,r=r+Math.imul(S,pt)|0,n=n+Math.imul(S,mt)|0,n=n+Math.imul(k,pt)|0,o=o+Math.imul(k,mt)|0;var Tt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(D,it),n=Math.imul(D,rt),n=n+Math.imul(q,it)|0,o=Math.imul(q,rt),r=r+Math.imul(C,ot)|0,n=n+Math.imul(C,st)|0,n=n+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(B,ht)|0,n=n+Math.imul(B,ut)|0,n=n+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,r=r+Math.imul(T,lt)|0,n=n+Math.imul(T,dt)|0,n=n+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0,r=r+Math.imul(x,pt)|0,n=n+Math.imul(x,mt)|0,n=n+Math.imul(A,pt)|0,o=o+Math.imul(A,mt)|0;var It=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(D,ot),n=Math.imul(D,st),n=n+Math.imul(q,ot)|0,o=Math.imul(q,st),r=r+Math.imul(C,ht)|0,n=n+Math.imul(C,ut)|0,n=n+Math.imul(P,ht)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(B,lt)|0,n=n+Math.imul(B,dt)|0,n=n+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0,r=r+Math.imul(T,pt)|0,n=n+Math.imul(T,mt)|0,n=n+Math.imul(I,pt)|0,o=o+Math.imul(I,mt)|0;var Lt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(D,ht),n=Math.imul(D,ut),n=n+Math.imul(q,ht)|0,o=Math.imul(q,ut),r=r+Math.imul(C,lt)|0,n=n+Math.imul(C,dt)|0,n=n+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0,r=r+Math.imul(B,pt)|0,n=n+Math.imul(B,mt)|0,n=n+Math.imul(O,pt)|0,o=o+Math.imul(O,mt)|0;var Bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(D,lt),n=Math.imul(D,dt),n=n+Math.imul(q,lt)|0,o=Math.imul(q,dt),r=r+Math.imul(C,pt)|0,n=n+Math.imul(C,mt)|0,n=n+Math.imul(P,pt)|0,o=o+Math.imul(P,mt)|0;var Ot=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(D,pt),n=Math.imul(D,mt),n=n+Math.imul(q,pt)|0,o=Math.imul(q,mt);var Nt=(u+r|0)+((8191&n)<<13)|0;return u=(o+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=bt,h[1]=gt,h[2]=vt,h[3]=yt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=kt,h[9]=Et,h[10]=xt,h[11]=At,h[12]=Rt,h[13]=Tt,h[14]=It,h[15]=Lt,h[16]=Bt,h[17]=Ot,h[18]=Nt,0!==u&&(h[19]=u,i.length++),i};function y(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0,n+=s>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function w(t,e,i){return y(t,e,i)}function _(t,e){this.x=t,this.y=e}Math.imul||(v=g),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?v(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):w(this,t,e),i},_.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r>=1;return r},_.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,i+=o/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=b(t);if(0===e.length)return new o(1);for(var i=this,r=0;r=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var i=this.length-t.length,r=this.clone(),n=t,s=0|n.words[n.length-1],a=this._countBits(s);i=26-a,0!==i&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var h,u=r.length-n.length;if("mod"!==e){h=new o(null),h.length=u+1,h.words=new Array(h.length);for(var f=0;f=0;d--){var c=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,d);while(0!==r.negative)c--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);h&&(h.words[d]=c)}return h&&h._strip(),r._strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var i=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(i*n+(0|this.words[o]))%t;return e?-n:n},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*i;this.words[n]=o/t|0,i=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n=new o(1),s=new o(0),a=new o(0),h=new o(1),u=0;while(e.isEven()&&i.isEven())e.iushrn(1),i.iushrn(1),++u;var f=i.clone(),l=e.clone();while(!e.isZero()){for(var d=0,c=1;0===(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0){e.iushrn(d);while(d-- >0)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1)}for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0){i.iushrn(p);while(p-- >0)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1)}e.cmp(i)>=0?(e.isub(i),n.isub(a),s.isub(h)):(i.isub(e),a.isub(n),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n,s=new o(1),a=new o(0),h=i.clone();while(e.cmpn(1)>0&&i.cmpn(1)>0){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0){e.iushrn(u);while(u-- >0)s.isOdd()&&s.iadd(h),s.iushrn(1)}for(var l=0,d=1;0===(i.words[0]&d)&&l<26;++l,d<<=1);if(l>0){i.iushrn(l);while(l-- >0)a.isOdd()&&a.iadd(h),a.iushrn(1)}e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return n=0===e.cmpn(1)?s:a,n.cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);do{while(e.isEven())e.iushrn(1);while(i.isEven())i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}while(1);return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){rn&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new R(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var M={k256:null,p224:null,p192:null,p25519:null};function S(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function T(t){R.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}S.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},S.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),e=i.bitLength()}while(e>this.n);var r=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},S.prototype.split=function(t,e){t.iushrn(this.n,0,e)},S.prototype.imulK=function(t){return t.imul(this.k)},n(k,S),k.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},k.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(M[t])return M[t];var e;if("k256"===t)e=new k;else if("p224"===t)e=new E;else if("p192"===t)e=new x;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return M[t]=e,e},R.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},R.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},R.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},R.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},R.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},R.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},R.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},R.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},R.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},R.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},R.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},R.prototype.isqr=function(t){return this.imul(t,t.clone())},R.prototype.sqr=function(t){return this.mul(t,t)},R.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}var n=this.m.subn(1),s=0;while(!n.isZero()&&0===n.andln(1))s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new o(2*f*f).toRed(this);while(0!==this.pow(f,u).cmp(h))f.redIAdd(h);var l=this.pow(f,n),d=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=s;while(0!==c.cmp(a)){for(var m=c,b=0;0!==m.cmp(a);b++)m=m.redSqr();r(b=0;n--){for(var f=e.words[n],l=u-1;l>=0;l--){var d=f>>l&1;s!==r[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,h++,(h===i||0===n&&0===l)&&(s=this.mul(s,r[a]),h=0,a=0)):h=0}u=26}return s},R.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},R.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new T(t)},n(T,R),T.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},T.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},T.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(t,this)},1482:function(t,e,i){var r;function n(t){this.rand=t}if(i(1439),i(7585),i(5315),t.exports=function(t){return r||(r=new n(null)),r.generate(t)},t.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},n.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),i=0;i>>24]^f[p>>>16&255]^l[m>>>8&255]^d[255&b]^e[g++],s=u[p>>>24]^f[m>>>16&255]^l[b>>>8&255]^d[255&c]^e[g++],a=u[m>>>24]^f[b>>>16&255]^l[c>>>8&255]^d[255&p]^e[g++],h=u[b>>>24]^f[c>>>16&255]^l[p>>>8&255]^d[255&m]^e[g++],c=o,p=s,m=a,b=h;return o=(r[c>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&b])^e[g++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[b>>>8&255]<<8|r[255&c])^e[g++],a=(r[m>>>24]<<24|r[b>>>16&255]<<16|r[c>>>8&255]<<8|r[255&p])^e[g++],h=(r[b>>>24]<<24|r[c>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[g++],o>>>=0,s>>>=0,a>>>=0,h>>>=0,[o,s,a,h]}var a=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,h=0;h<256;++h){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,i[s]=u,r[u]=s;var f=t[s],l=t[f],d=t[l],c=257*t[u]^16843008*u;n[0][s]=c<<24|c>>>8,n[1][s]=c<<16|c>>>16,n[2][s]=c<<8|c>>>24,n[3][s]=c,c=16843009*d^65537*l^257*f^16843008*s,o[0][u]=c<<24|c>>>8,o[1][u]=c<<16|c>>>16,o[2][u]=c<<8|c>>>24,o[3][u]=c,0===s?s=a=1:(s=f^t[t[t[d^f]]],a^=t[t[a]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function u(t){this._key=n(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,i=e+6,r=4*(i+1),n=[],o=0;o>>24,s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e===4&&(s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s]),n[o]=n[o-e]^s}for(var u=[],f=0;f>>24]]^h.INV_SUB_MIX[1][h.SBOX[d>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[d>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&d]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return t=n(t),s(t,this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),i=r.allocUnsafe(16);return i.writeUInt32BE(e[0],0),i.writeUInt32BE(e[1],4),i.writeUInt32BE(e[2],8),i.writeUInt32BE(e[3],12),i},u.prototype.decryptBlock=function(t){t=n(t);var e=t[1];t[1]=t[3],t[3]=e;var i=s(t,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(i[0],0),o.writeUInt32BE(i[3],4),o.writeUInt32BE(i[2],8),o.writeUInt32BE(i[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=u},9043:function(t,e,i){var r=i(8970),n=i(6779).Buffer,o=i(1414),s=i(1923),a=i(2789),h=i(6662),u=i(306);function f(t,e){var i=0;t.length!==e.length&&i++;for(var r=Math.min(t.length,e.length),n=0;n16)throw new Error("unable to decrypt data");var i=-1;while(++i16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=m,e.createDecipheriv=p},4213:function(t,e,i){i(7658);var r=i(5612),n=i(9043),o=i(6779).Buffer,s=i(5248),a=i(1414),h=i(8970),u=i(3692),f=i(1923);function l(t,e,i){a.call(this),this._cache=new c,this._cipher=new h.AES(e),this._prev=o.from(i),this._mode=t,this._autopadding=!0}f(l,a),l.prototype._update=function(t){var e,i;this._cache.add(t);var r=[];while(e=this._cache.get())i=this._mode.encrypt(this,e),r.push(i);return o.concat(r)};var d=o.alloc(16,16);function c(){this.cache=o.allocUnsafe(0)}function p(t,e,i){var a=r[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"===typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"===typeof i&&(i=o.from(i)),"GCM"!==a.mode&&i.length!==a.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===a.type?new s(a.module,e,i):"auth"===a.type?new n(a.module,e,i):new l(a.module,e,i)}function m(t,e){var i=r[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var n=u(e,!1,i.key,i.iv);return p(t,n.key,n.iv)}l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},c.prototype.add=function(t){this.cache=o.concat([this.cache,t])},c.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},c.prototype.flush=function(){var t=16-this.cache.length,e=o.allocUnsafe(t),i=-1;while(++i>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(t){var e=-1;while(++e0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=s(n)},a.prototype.update=function(t){var e;this.cache=r.concat([this.cache,t]);while(this.cache.length>=16)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(s([0,t,0,e])),this.state},t.exports=a},306:function(t){function e(t){var e,i=t.length;while(i--){if(e=t.readUInt8(i),255!==e){e++,t.writeUInt8(e,i);break}t.writeUInt8(0,i)}}t.exports=e},6151:function(t,e,i){var r=i(6662);e.encrypt=function(t,e){var i=r(e,t._prev);return t._prev=t._cipher.encryptBlock(i),t._prev},e.decrypt=function(t,e){var i=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return r(n,i)}},6557:function(t,e,i){var r=i(6779).Buffer,n=i(6662);function o(t,e,i){var o=e.length,s=n(e,t._cache);return t._cache=t._cache.slice(o),t._prev=r.concat([t._prev,i?e:s]),s}e.encrypt=function(t,e,i){var n,s=r.allocUnsafe(0);while(e.length){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=r.allocUnsafe(0)),!(t._cache.length<=e.length)){s=r.concat([s,o(t,e,i)]);break}n=t._cache.length,s=r.concat([s,o(t,e.slice(0,n),i)]),e=e.slice(n)}return s}},9210:function(t,e,i){var r=i(6779).Buffer;function n(t,e,i){var r,n,s,a=-1,h=8,u=0;while(++a>a%8,t._prev=o(t._prev,i?n:s);return u}function o(t,e){var i=t.length,n=-1,o=r.allocUnsafe(t.length);t=r.concat([t,r.from([e])]);while(++n>7;return o}e.encrypt=function(t,e,i){var o=e.length,s=r.allocUnsafe(o),a=-1;while(++a=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function h(t,e){var i=s(e),o=e.modulus.byteLength(),a=new n(t).mul(i.blinder).umod(e.modulus),h=a.toRed(n.mont(e.prime1)),u=a.toRed(n.mont(e.prime2)),f=e.coefficient,l=e.prime1,d=e.prime2,c=h.redPow(e.exponent1).fromRed(),p=u.redPow(e.exponent2).fromRed(),m=c.isub(p).imul(f).umod(l).imul(d);return p.iadd(m).imul(i.unblinder).umod(e.modulus).toArrayLike(r,"be",o)}h.getr=a,t.exports=h},2481:function(t,e,i){t.exports=i(5207)},8130:function(t,e,i){var r=i(6779).Buffer,n=i(5443),o=i(2375),s=i(1923),a=i(6528),h=i(2170),u=i(5207);function f(t){o.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){o.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function d(t){return new f(t)}function c(t){return new l(t)}Object.keys(u).forEach((function(t){u[t].id=r.from(u[t].id,"hex"),u[t.toLowerCase()]=u[t]})),s(f,o.Writable),f.prototype._write=function(t,e,i){this._hash.update(t),i()},f.prototype.update=function(t,e){return"string"===typeof t&&(t=r.from(t,e)),this._hash.update(t),this},f.prototype.sign=function(t,e){this.end();var i=this._hash.digest(),r=a(i,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},s(l,o.Writable),l.prototype._write=function(t,e,i){this._hash.update(t),i()},l.prototype.update=function(t,e){return"string"===typeof t&&(t=r.from(t,e)),this._hash.update(t),this},l.prototype.verify=function(t,e,i){"string"===typeof e&&(e=r.from(e,i)),this.end();var n=this._hash.digest();return h(e,n,t,this._signType,this._tag)},t.exports={Sign:d,Verify:c,createSign:d,createVerify:c}},6528:function(t,e,i){i(7658);var r=i(6779).Buffer,n=i(4868),o=i(8593),s=i(2127).ec,a=i(2396),h=i(2616),u=i(1308);function f(t,e,i,n,s){var a=h(e);if(a.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");return l(t,a)}if("dsa"===a.type){if("dsa"!==n)throw new Error("wrong private key type");return d(t,a,i)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");t=r.concat([s,t]);var u=a.modulus.byteLength(),f=[0,1];while(t.length+f.length+10&&i.ishrn(r),i}function b(t,e){t=m(t,e),t=t.mod(e);var i=r.from(t.toArray());if(i.length=e)throw new Error("invalid sig")}t.exports=h},511:function(t){"use strict";function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var i={};function r(t,r,n){function o(t,e,i){return"string"===typeof r?r:r(t,e,i)}n||(n=Error);var s=function(t){function i(e,i,r){return t.call(this,o(e,i,r))||this}return e(i,t),i}(n);s.prototype.name=n.name,s.prototype.code=t,i[t]=s}function n(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map((function(t){return String(t)})),i>2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}function o(t,e,i){return t.substr(!i||i<0?0:+i,e.length)===e}function s(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}function a(t,e,i){return"number"!==typeof i&&(i=0),!(i+e.length>t.length)&&-1!==t.indexOf(e,i)}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,h;if("string"===typeof e&&o(e,"not ")?(r="must not be",e=e.replace(/^not /,"")):r="must be",s(t," argument"))h="The ".concat(t," ").concat(r," ").concat(n(e,"type"));else{var u=a(t,".")?"property":"argument";h='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(n(e,"type"))}return h+=". Received type ".concat(typeof i),h}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=i},1742:function(t,e,i){"use strict";var r=i(6027);i(7658);var n=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};t.exports=f;var o=i(3980),s=i(895);i(1923)(f,o);for(var a=n(s.prototype),h=0;h0)if("string"===typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=u(e)),r)s.endEmitted?E(t,new k):L(t,s,e,!0);else if(s.ended)E(t,new M);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(e=s.decoder.write(e),s.objectMode||0!==e.length?L(t,s,e,!1):q(t,s)):L(t,s,e,!1)}else r||(s.reading=!1,q(t,s));return!s.ended&&(s.length=O?t=O:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function C(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=N(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function P(t,e){if(l("onEofChunk"),!e.ended){if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,e.sync?j(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,D(t)))}}function j(t){var e=t._readableState;l("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(D,t))}function D(t){var e=t._readableState;l("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,K(t)}function q(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(U,t,e))}function U(t,e){while(!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Z(t){l("readable nexttick read 0"),t.read(0)}function W(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(H,t,e))}function H(t,e){l("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),K(t),e.flowing&&!e.reading&&t.read(0)}function K(t){var e=t._readableState;l("flow",e.flowing);while(e.flowing&&null!==t.read());}function V(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function G(t){var e=t._readableState;l("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(X,e,t))}function X(t,e){if(l("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function Y(t,e){for(var i=0,r=t.length;i=e.highWaterMark:e.length>0)||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?G(this):j(this),null;if(t=C(t,e),0===t&&e.ended)return 0===e.length&&G(this),null;var r,n=e.needReadable;return l("need readable",n),(0===e.length||e.length-t0?V(t,e):null,null===r?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&G(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(t){E(this,new S("_read()"))},T.prototype.pipe=function(t,e){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t);break}r.pipesCount+=1,l("pipe count=%d opts=%j",r.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr,a=s?u:v;function h(t,e){l("onunpipe"),t===i&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,c())}function u(){l("onend"),t.end()}r.endEmitted?n.nextTick(a):i.once("end",a),t.on("unpipe",h);var f=z(i);t.on("drain",f);var d=!1;function c(){l("cleanup"),t.removeListener("close",b),t.removeListener("finish",g),t.removeListener("drain",f),t.removeListener("error",m),t.removeListener("unpipe",h),i.removeListener("end",u),i.removeListener("end",v),i.removeListener("data",p),d=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||f()}function p(e){l("ondata");var n=t.write(e);l("dest.write",n),!1===n&&((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==Y(r.pipes,t))&&!d&&(l("false write response, pause",r.awaitDrain),r.awaitDrain++),i.pause())}function m(e){l("onerror",e),v(),t.removeListener("error",m),0===o(t,"error")&&E(t,e)}function b(){t.removeListener("finish",g),v()}function g(){l("onfinish"),t.removeListener("close",b),v()}function v(){l("unpipe"),i.unpipe(t)}return i.on("data",p),A(t,"error",m),t.once("close",b),t.once("finish",g),t.emit("pipe",i),r.flowing||(l("pipe resume"),i.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==r.flowing&&this.resume()):"readable"===t&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,l("on readable",r.length,r.reading),r.length?j(this):r.reading||n.nextTick(Z,this))),i},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var i=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(F,this),i},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(F,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!t.readableListening,W(this,t)),t.paused=!1,this},T.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(l("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){if(l("wrapped data"),i.decoder&&(n=i.decoder.write(n)),(!i.objectMode||null!==n&&void 0!==n)&&(i.objectMode||n&&n.length)){var o=e.push(n);o||(r=!0,t.pause())}})),t)void 0===this[n]&&"function"===typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var o=0;o-1))throw new k(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(t,e,i){i(new v("_write()"))},R.prototype._writev=null,R.prototype.end=function(t,e,i){var r=this._writableState;return"function"===typeof t?(i=t,t=null,e=null):"function"===typeof e&&(i=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||W(this,r,i),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),R.prototype.destroy=c.destroy,R.prototype._undestroy=c.undestroy,R.prototype._destroy=function(t,e){e(t)}},6765:function(t,e,i){"use strict";var r,n=i(6027);function o(t,e,i){return e=s(e),e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t){var e=a(t,"string");return"symbol"===typeof e?e:String(e)}function a(t,e){if("object"!==typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var h=i(1707),u=Symbol("lastResolve"),f=Symbol("lastReject"),l=Symbol("error"),d=Symbol("ended"),c=Symbol("lastPromise"),p=Symbol("handlePromise"),m=Symbol("stream");function b(t,e){return{value:t,done:e}}function g(t){var e=t[u];if(null!==e){var i=t[m].read();null!==i&&(t[c]=null,t[u]=null,t[f]=null,e(b(i,!1)))}}function v(t){n.nextTick(g,t)}function y(t,e){return function(i,r){t.then((function(){e[d]?i(b(void 0,!0)):e[p](i,r)}),r)}}var w=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((r={get stream(){return this[m]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[d])return Promise.resolve(b(void 0,!0));if(this[m].destroyed)return new Promise((function(e,i){n.nextTick((function(){t[l]?i(t[l]):e(b(void 0,!0))}))}));var i,r=this[c];if(r)i=new Promise(y(r,this));else{var o=this[m].read();if(null!==o)return Promise.resolve(b(o,!1));i=new Promise(this[p])}return this[c]=i,i}},o(r,Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var t=this;return new Promise((function(e,i){t[m].destroy(null,(function(t){t?i(t):e(b(void 0,!0))}))}))})),r),w),M=function(t){var e,i=Object.create(_,(e={},o(e,m,{value:t,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,f,{value:null,writable:!0}),o(e,l,{value:null,writable:!0}),o(e,d,{value:t._readableState.endEmitted,writable:!0}),o(e,p,{value:function(t,e){var r=i[m].read();r?(i[c]=null,i[u]=null,i[f]=null,t(b(r,!1))):(i[u]=t,i[f]=e)},writable:!0}),e));return i[c]=null,h(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=i[f];return null!==e&&(i[c]=null,i[u]=null,i[f]=null,e(t)),void(i[l]=t)}var r=i[u];null!==r&&(i[c]=null,i[u]=null,i[f]=null,r(b(void 0,!0))),i[d]=!0})),t.on("readable",v.bind(null,i)),i};t.exports=M},8708:function(t,e,i){"use strict";function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function n(t){for(var e=1;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";var e=this.head,i=""+e.data;while(e=e.next)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return d.alloc(0);var e=d.allocUnsafe(t>>>0),i=this.head,r=0;while(i)b(i.data,e,r),r+=i.data.length,i=i.next;return e}},{key:"consume",value:function(t,e){var i;return tn.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),t-=o,0===t){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=d.allocUnsafe(t),i=this.head,r=1;i.data.copy(e),t-=i.data.length;while(i=i.next){var n=i.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),t-=o,0===t){o===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(o));break}++r}return this.length-=r,e}},{key:m,value:function(t,e){return p(this,n(n({},e),{},{depth:0,customInspect:!1}))}}]),t}()},2343:function(t,e,i){"use strict";var r=i(6027);function n(t,e){var i=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(h,this,t)):r.nextTick(h,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?i._writableState?i._writableState.errorEmitted?r.nextTick(s,i):(i._writableState.errorEmitted=!0,r.nextTick(o,i,t)):r.nextTick(o,i,t):e?(r.nextTick(s,i),e(t)):r.nextTick(s,i)})),this)}function o(t,e){h(t,e),s(t)}function s(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function a(){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 h(t,e){t.emit("error",e)}function u(t,e){var i=t._readableState,r=t._writableState;i&&i.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}t.exports={destroy:n,undestroy:a,errorOrDestroy:u}},1707:function(t,e,i){"use strict";var r=i(511).q.ERR_STREAM_PREMATURE_CLOSE;function n(t){var e=!1;return function(){if(!e){e=!0;for(var i=arguments.length,r=new Array(i),n=0;n0;return f(t,s,a,(function(t){r||(r=t),t&&o.forEach(l),s||(o.forEach(l),n(r))}))}));return e.reduce(d)}t.exports=p},8315:function(t,e,i){"use strict";var r=i(511).q.ERR_INVALID_OPT_VALUE;function n(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}function o(t,e,i,o){var s=n(e,o,i);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0){var a=o?i:"highWaterMark";throw new r(a,s)}return Math.floor(s)}return t.objectMode?16:16384}t.exports={getHighWaterMark:o}},6997:function(t,e,i){t.exports=i(3793).EventEmitter},2375:function(t,e,i){e=t.exports=i(3980),e.Stream=e,e.Readable=e,e.Writable=i(895),e.Duplex=i(1742),e.Transform=i(9969),e.PassThrough=i(4126),e.finished=i(1707),e.pipeline=i(3606)},8138:function(t,e,i){"use strict";var r=i(5361)["Buffer"],n=i(6027),o=i(5130),s=i(9731),a=i(1672),h=i(669),u=i(3300);for(var f in u)e[f]=u[f];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;var l=31,d=139;function c(t){if("number"!==typeof t||te.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?a.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||h.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},c.prototype.write=function(t,e,i,r,n,o,s){return this._write(!0,t,e,i,r,n,o,s)},c.prototype.writeSync=function(t,e,i,r,n,o,s){return this._write(!1,t,e,i,r,n,o,s)},c.prototype._write=function(t,i,s,a,h,u,f,l){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==e.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===i,"must provide flush value"),this.write_in_progress=!0,i!==e.Z_NO_FLUSH&&i!==e.Z_PARTIAL_FLUSH&&i!==e.Z_SYNC_FLUSH&&i!==e.Z_FULL_FLUSH&&i!==e.Z_FINISH&&i!==e.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=r.alloc(0),h=0,a=0),this.strm.avail_in=h,this.strm.input=s,this.strm.next_in=a,this.strm.avail_out=l,this.strm.output=u,this.strm.next_out=f,this.flush=i,!t)return this._process(),this._checkError()?this._afterSync():void 0;var d=this;return n.nextTick((function(){d._process(),d._after()})),this},c.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},c.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=a.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(this.strm.input[t]!==l){this.mode=e.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;this.strm.input[t]===d?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:this.err=h.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=h.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=h.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));while(this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&0!==this.strm.next_in[0])this.reset(),this.err=h.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},c.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(t,i,r,n,s){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(t>=8&&t<=15,"invalid windowBits"),o(i>=-1&&i<=9,"invalid compression level"),o(r>=1&&r<=9,"invalid memlevel"),o(n===e.Z_FILTERED||n===e.Z_HUFFMAN_ONLY||n===e.Z_RLE||n===e.Z_FIXED||n===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(i,t,r,n,s),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(t,i,r,n,o){switch(this.level=t,this.windowBits=i,this.memLevel=r,this.strategy=n,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new s,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=a.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=h.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=o,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=a.deflateSetDictionary(this.strm,this.dictionary);break;default:break}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=a.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=h.inflateReset(this.strm);break;default:break}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=c},5:function(t,e,i){"use strict";var r=i(6027);i(7658);var n=i(5361).Buffer,o=i(8091).Transform,s=i(8138),a=i(9242),h=i(5130).ok,u=i(5361).kMaxLength,f="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";s.Z_MIN_WINDOWBITS=8,s.Z_MAX_WINDOWBITS=15,s.Z_DEFAULT_WINDOWBITS=15,s.Z_MIN_CHUNK=64,s.Z_MAX_CHUNK=1/0,s.Z_DEFAULT_CHUNK=16384,s.Z_MIN_MEMLEVEL=1,s.Z_MAX_MEMLEVEL=9,s.Z_DEFAULT_MEMLEVEL=8,s.Z_MIN_LEVEL=-1,s.Z_MAX_LEVEL=9,s.Z_DEFAULT_LEVEL=s.Z_DEFAULT_COMPRESSION;for(var l=Object.keys(s),d=0;d=u?s=new RangeError(f):e=n.concat(r,o),r=[],t.close(),i(s,e)}t.on("error",a),t.on("end",h),t.end(e),s()}function y(t,e){if("string"===typeof e&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Not a string or buffer");var i=t._finishFlushFlag;return t._processChunk(e,i)}function w(t){if(!(this instanceof w))return new w(t);R.call(this,t,s.DEFLATE)}function _(t){if(!(this instanceof _))return new _(t);R.call(this,t,s.INFLATE)}function M(t){if(!(this instanceof M))return new M(t);R.call(this,t,s.GZIP)}function S(t){if(!(this instanceof S))return new S(t);R.call(this,t,s.GUNZIP)}function k(t){if(!(this instanceof k))return new k(t);R.call(this,t,s.DEFLATERAW)}function E(t){if(!(this instanceof E))return new E(t);R.call(this,t,s.INFLATERAW)}function x(t){if(!(this instanceof x))return new x(t);R.call(this,t,s.UNZIP)}function A(t){return t===s.Z_NO_FLUSH||t===s.Z_PARTIAL_FLUSH||t===s.Z_SYNC_FLUSH||t===s.Z_FULL_FLUSH||t===s.Z_FINISH||t===s.Z_BLOCK}function R(t,i){var r=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,o.call(this,t),t.flush&&!A(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!A(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||s.Z_NO_FLUSH,this._finishFlushFlag="undefined"!==typeof t.finishFlush?t.finishFlush:s.Z_FINISH,t.chunkSize&&(t.chunkSizee.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBitse.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.levele.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevele.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!n.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new s.Zlib(i);var a=this;this._hadError=!1,this._handle.onerror=function(t,i){T(a),a._hadError=!0;var r=new Error(t);r.errno=i,r.code=e.codes[i],a.emit("error",r)};var h=e.Z_DEFAULT_COMPRESSION;"number"===typeof t.level&&(h=t.level);var u=e.Z_DEFAULT_STRATEGY;"number"===typeof t.strategy&&(u=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,h,t.memLevel||e.Z_DEFAULT_MEMLEVEL,u,t.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=h,this._strategy=u,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!r._handle},configurable:!0,enumerable:!0})}function T(t,e){e&&r.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function I(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),e.Deflate=w,e.Inflate=_,e.Gzip=M,e.Gunzip=S,e.DeflateRaw=k,e.InflateRaw=E,e.Unzip=x,e.createDeflate=function(t){return new w(t)},e.createInflate=function(t){return new _(t)},e.createDeflateRaw=function(t){return new k(t)},e.createInflateRaw=function(t){return new E(t)},e.createGzip=function(t){return new M(t)},e.createGunzip=function(t){return new S(t)},e.createUnzip=function(t){return new x(t)},e.deflate=function(t,e,i){return"function"===typeof e&&(i=e,e={}),v(new w(e),t,i)},e.deflateSync=function(t,e){return y(new w(e),t)},e.gzip=function(t,e,i){return"function"===typeof e&&(i=e,e={}),v(new M(e),t,i)},e.gzipSync=function(t,e){return y(new M(e),t)},e.deflateRaw=function(t,e,i){return"function"===typeof e&&(i=e,e={}),v(new k(e),t,i)},e.deflateRawSync=function(t,e){return y(new k(e),t)},e.unzip=function(t,e,i){return"function"===typeof e&&(i=e,e={}),v(new x(e),t,i)},e.unzipSync=function(t,e){return y(new x(e),t)},e.inflate=function(t,e,i){return"function"===typeof e&&(i=e,e={}),v(new _(e),t,i)},e.inflateSync=function(t,e){return y(new _(e),t)},e.gunzip=function(t,e,i){return"function"===typeof e&&(i=e,e={}),v(new S(e),t,i)},e.gunzipSync=function(t,e){return y(new S(e),t)},e.inflateRaw=function(t,e,i){return"function"===typeof e&&(i=e,e={}),v(new E(e),t,i)},e.inflateRawSync=function(t,e){return y(new E(e),t)},a.inherits(R,o),R.prototype.params=function(t,i,n){if(te.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(i!=e.Z_FILTERED&&i!=e.Z_HUFFMAN_ONLY&&i!=e.Z_RLE&&i!=e.Z_FIXED&&i!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+i);if(this._level!==t||this._strategy!==i){var o=this;this.flush(s.Z_SYNC_FLUSH,(function(){h(o._handle,"zlib binding closed"),o._handle.params(t,i),o._hadError||(o._level=t,o._strategy=i,n&&n())}))}else r.nextTick(n)},R.prototype.reset=function(){return h(this._handle,"zlib binding closed"),this._handle.reset()},R.prototype._flush=function(t){this._transform(n.alloc(0),"",t)},R.prototype.flush=function(t,e){var i=this,o=this._writableState;("function"===typeof t||void 0===t&&!e)&&(e=t,t=s.Z_FULL_FLUSH),o.ended?e&&r.nextTick(e):o.ending?e&&this.once("end",e):o.needDrain?e&&this.once("drain",(function(){return i.flush(t,e)})):(this._flushFlag=t,this.write(n.alloc(0),"",e))},R.prototype.close=function(t){T(this,t),r.nextTick(I,this)},R.prototype._transform=function(t,e,i){var r,o=this._writableState,a=o.ending||o.ended,h=a&&(!t||o.length===t.length);return null===t||n.isBuffer(t)?this._handle?(h?r=this._finishFlushFlag:(r=this._flushFlag,t.length>=o.length&&(this._flushFlag=this._opts.flush||s.Z_NO_FLUSH)),void this._processChunk(t,r,i)):i(new Error("zlib binding closed")):i(new Error("invalid input"))},R.prototype._processChunk=function(t,e,i){var r=t&&t.length,o=this._chunkSize-this._offset,s=0,a=this,l="function"===typeof i;if(!l){var d,c=[],p=0;this.on("error",(function(t){d=t})),h(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(e,t,s,r,this._buffer,this._offset,o)}while(!this._hadError&&v(m[0],m[1]));if(this._hadError)throw d;if(p>=u)throw T(this),new RangeError(f);var b=n.concat(c,p);return T(this),b}h(this._handle,"zlib binding closed");var g=this._handle.write(e,t,s,r,this._buffer,this._offset,o);function v(u,f){if(this&&(this.buffer=null,this.callback=null),!a._hadError){var d=o-f;if(h(d>=0,"have should not go down"),d>0){var m=a._buffer.slice(a._offset,a._offset+d);a._offset+=d,l?a.push(m):(c.push(m),p+=m.length)}if((0===f||a._offset>=a._chunkSize)&&(o=a._chunkSize,a._offset=0,a._buffer=n.allocUnsafe(a._chunkSize)),0===f){if(s+=r-u,r=u,!l)return!0;var b=a._handle.write(e,t,s,r,a._buffer,a._offset,a._chunkSize);return b.callback=v,void(b.buffer=t)}if(!l)return!1;i()}}g.buffer=t,g.callback=v},a.inherits(w,R),a.inherits(_,R),a.inherits(M,R),a.inherits(S,R),a.inherits(k,R),a.inherits(E,R),a.inherits(x,R)},6662:function(t,e,i){var r=i(5361)["Buffer"];t.exports=function(t,e){for(var i=Math.min(t.length,e.length),n=new r(i),o=0;o=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=a(t,i);return i-1>=e&&(r|=a(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"===typeof t)return this._initNumber(t,e,i);if("object"===typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var n=0;"-"===t[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=h(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else{var a=t.length-e;for(r=a%2===0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8}this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,a=Math.min(o,o-s)+i,h=0,f=i;f1&&0===this.words[this.length-1])this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","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"],l=[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],d=[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];function c(t){for(var e=new Array(t.bitLength()),i=0;i>>n}return e}function p(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;i.words[0]=a;for(var u=1;u>>26,l=67108863&h,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;n=0|t.words[p],o=0|e.words[c],s=n*o+l,f+=s/67108864|0,l=67108863&s}i.words[u]=0|l,h=0|f}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(t=t||10,e=0|e||1,16===t||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215,i=0!==o||s!==this.length-1?f[6-h.length]+h+i:h+i,n+=2,n>=26&&(n-=26,s--)}0!==o&&(i=o.toString(16)+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],c=d[t];i="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(c).toString(t);p=p.idivn(c),i=p.isZero()?m+i:f[u-m.length]+m+i}this.isZero()&&(i="0"+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0===(8191&e)&&(i+=13,e>>>=13),0===(127&e)&&(i+=7,e>>>=7),0===(15&e)&&(i+=4,e>>>=4),0===(3&e)&&(i+=2,e>>>=2),0===(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,c=0|s[1],p=8191&c,m=c>>>13,b=0|s[2],g=8191&b,v=b>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,k=M>>>13,E=0|s[5],x=8191&E,A=E>>>13,R=0|s[6],T=8191&R,I=R>>>13,L=0|s[7],B=8191&L,O=L>>>13,N=0|s[8],C=8191&N,P=N>>>13,j=0|s[9],D=8191&j,q=j>>>13,U=0|a[0],z=8191&U,F=U>>>13,Z=0|a[1],W=8191&Z,H=Z>>>13,K=0|a[2],V=8191&K,G=K>>>13,X=0|a[3],Y=8191&X,$=X>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],it=8191&et,rt=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,dt=ft>>>13,ct=0|a[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19,r=Math.imul(l,z),n=Math.imul(l,F),n=n+Math.imul(d,z)|0,o=Math.imul(d,F);var bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(p,z),n=Math.imul(p,F),n=n+Math.imul(m,z)|0,o=Math.imul(m,F),r=r+Math.imul(l,W)|0,n=n+Math.imul(l,H)|0,n=n+Math.imul(d,W)|0,o=o+Math.imul(d,H)|0;var gt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,z),n=Math.imul(g,F),n=n+Math.imul(v,z)|0,o=Math.imul(v,F),r=r+Math.imul(p,W)|0,n=n+Math.imul(p,H)|0,n=n+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,r=r+Math.imul(l,V)|0,n=n+Math.imul(l,G)|0,n=n+Math.imul(d,V)|0,o=o+Math.imul(d,G)|0;var vt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),n=Math.imul(w,F),n=n+Math.imul(_,z)|0,o=Math.imul(_,F),r=r+Math.imul(g,W)|0,n=n+Math.imul(g,H)|0,n=n+Math.imul(v,W)|0,o=o+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,n=n+Math.imul(p,G)|0,n=n+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,r=r+Math.imul(l,Y)|0,n=n+Math.imul(l,$)|0,n=n+Math.imul(d,Y)|0,o=o+Math.imul(d,$)|0;var yt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=Math.imul(S,F),n=n+Math.imul(k,z)|0,o=Math.imul(k,F),r=r+Math.imul(w,W)|0,n=n+Math.imul(w,H)|0,n=n+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,r=r+Math.imul(g,V)|0,n=n+Math.imul(g,G)|0,n=n+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,Y)|0,n=n+Math.imul(p,$)|0,n=n+Math.imul(m,Y)|0,o=o+Math.imul(m,$)|0,r=r+Math.imul(l,Q)|0,n=n+Math.imul(l,tt)|0,n=n+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,z),n=Math.imul(x,F),n=n+Math.imul(A,z)|0,o=Math.imul(A,F),r=r+Math.imul(S,W)|0,n=n+Math.imul(S,H)|0,n=n+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(w,V)|0,n=n+Math.imul(w,G)|0,n=n+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(g,Y)|0,n=n+Math.imul(g,$)|0,n=n+Math.imul(v,Y)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Q)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(l,it)|0,n=n+Math.imul(l,rt)|0,n=n+Math.imul(d,it)|0,o=o+Math.imul(d,rt)|0;var _t=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,z),n=Math.imul(T,F),n=n+Math.imul(I,z)|0,o=Math.imul(I,F),r=r+Math.imul(x,W)|0,n=n+Math.imul(x,H)|0,n=n+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,r=r+Math.imul(S,V)|0,n=n+Math.imul(S,G)|0,n=n+Math.imul(k,V)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,Y)|0,n=n+Math.imul(w,$)|0,n=n+Math.imul(_,Y)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(g,Q)|0,n=n+Math.imul(g,tt)|0,n=n+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,it)|0,n=n+Math.imul(p,rt)|0,n=n+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(l,ot)|0,n=n+Math.imul(l,st)|0,n=n+Math.imul(d,ot)|0,o=o+Math.imul(d,st)|0;var Mt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,z),n=Math.imul(B,F),n=n+Math.imul(O,z)|0,o=Math.imul(O,F),r=r+Math.imul(T,W)|0,n=n+Math.imul(T,H)|0,n=n+Math.imul(I,W)|0,o=o+Math.imul(I,H)|0,r=r+Math.imul(x,V)|0,n=n+Math.imul(x,G)|0,n=n+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(S,Y)|0,n=n+Math.imul(S,$)|0,n=n+Math.imul(k,Y)|0,o=o+Math.imul(k,$)|0,r=r+Math.imul(w,Q)|0,n=n+Math.imul(w,tt)|0,n=n+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(g,it)|0,n=n+Math.imul(g,rt)|0,n=n+Math.imul(v,it)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,n=n+Math.imul(p,st)|0,n=n+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(l,ht)|0,n=n+Math.imul(l,ut)|0,n=n+Math.imul(d,ht)|0,o=o+Math.imul(d,ut)|0;var St=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(C,z),n=Math.imul(C,F),n=n+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(B,W)|0,n=n+Math.imul(B,H)|0,n=n+Math.imul(O,W)|0,o=o+Math.imul(O,H)|0,r=r+Math.imul(T,V)|0,n=n+Math.imul(T,G)|0,n=n+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,Y)|0,n=n+Math.imul(x,$)|0,n=n+Math.imul(A,Y)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(S,Q)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,it)|0,n=n+Math.imul(w,rt)|0,n=n+Math.imul(_,it)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(g,ot)|0,n=n+Math.imul(g,st)|0,n=n+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,r=r+Math.imul(p,ht)|0,n=n+Math.imul(p,ut)|0,n=n+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0,r=r+Math.imul(l,lt)|0,n=n+Math.imul(l,dt)|0,n=n+Math.imul(d,lt)|0,o=o+Math.imul(d,dt)|0;var kt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(D,z),n=Math.imul(D,F),n=n+Math.imul(q,z)|0,o=Math.imul(q,F),r=r+Math.imul(C,W)|0,n=n+Math.imul(C,H)|0,n=n+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(B,V)|0,n=n+Math.imul(B,G)|0,n=n+Math.imul(O,V)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(T,Y)|0,n=n+Math.imul(T,$)|0,n=n+Math.imul(I,Y)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(x,Q)|0,n=n+Math.imul(x,tt)|0,n=n+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(S,it)|0,n=n+Math.imul(S,rt)|0,n=n+Math.imul(k,it)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,n=n+Math.imul(w,st)|0,n=n+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(g,ht)|0,n=n+Math.imul(g,ut)|0,n=n+Math.imul(v,ht)|0,o=o+Math.imul(v,ut)|0,r=r+Math.imul(p,lt)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0,r=r+Math.imul(l,pt)|0,n=n+Math.imul(l,mt)|0,n=n+Math.imul(d,pt)|0,o=o+Math.imul(d,mt)|0;var Et=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(D,W),n=Math.imul(D,H),n=n+Math.imul(q,W)|0,o=Math.imul(q,H),r=r+Math.imul(C,V)|0,n=n+Math.imul(C,G)|0,n=n+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(B,Y)|0,n=n+Math.imul(B,$)|0,n=n+Math.imul(O,Y)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(T,Q)|0,n=n+Math.imul(T,tt)|0,n=n+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,it)|0,n=n+Math.imul(x,rt)|0,n=n+Math.imul(A,it)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(S,ot)|0,n=n+Math.imul(S,st)|0,n=n+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,r=r+Math.imul(w,ht)|0,n=n+Math.imul(w,ut)|0,n=n+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,r=r+Math.imul(g,lt)|0,n=n+Math.imul(g,dt)|0,n=n+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0,r=r+Math.imul(p,pt)|0,n=n+Math.imul(p,mt)|0,n=n+Math.imul(m,pt)|0,o=o+Math.imul(m,mt)|0;var xt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(D,V),n=Math.imul(D,G),n=n+Math.imul(q,V)|0,o=Math.imul(q,G),r=r+Math.imul(C,Y)|0,n=n+Math.imul(C,$)|0,n=n+Math.imul(P,Y)|0,o=o+Math.imul(P,$)|0,r=r+Math.imul(B,Q)|0,n=n+Math.imul(B,tt)|0,n=n+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(T,it)|0,n=n+Math.imul(T,rt)|0,n=n+Math.imul(I,it)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,n=n+Math.imul(x,st)|0,n=n+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,r=r+Math.imul(S,ht)|0,n=n+Math.imul(S,ut)|0,n=n+Math.imul(k,ht)|0,o=o+Math.imul(k,ut)|0,r=r+Math.imul(w,lt)|0,n=n+Math.imul(w,dt)|0,n=n+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0,r=r+Math.imul(g,pt)|0,n=n+Math.imul(g,mt)|0,n=n+Math.imul(v,pt)|0,o=o+Math.imul(v,mt)|0;var At=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(D,Y),n=Math.imul(D,$),n=n+Math.imul(q,Y)|0,o=Math.imul(q,$),r=r+Math.imul(C,Q)|0,n=n+Math.imul(C,tt)|0,n=n+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(B,it)|0,n=n+Math.imul(B,rt)|0,n=n+Math.imul(O,it)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(T,ot)|0,n=n+Math.imul(T,st)|0,n=n+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(x,ht)|0,n=n+Math.imul(x,ut)|0,n=n+Math.imul(A,ht)|0,o=o+Math.imul(A,ut)|0,r=r+Math.imul(S,lt)|0,n=n+Math.imul(S,dt)|0,n=n+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0,r=r+Math.imul(w,pt)|0,n=n+Math.imul(w,mt)|0,n=n+Math.imul(_,pt)|0,o=o+Math.imul(_,mt)|0;var Rt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(D,Q),n=Math.imul(D,tt),n=n+Math.imul(q,Q)|0,o=Math.imul(q,tt),r=r+Math.imul(C,it)|0,n=n+Math.imul(C,rt)|0,n=n+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(B,ot)|0,n=n+Math.imul(B,st)|0,n=n+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(T,ht)|0,n=n+Math.imul(T,ut)|0,n=n+Math.imul(I,ht)|0,o=o+Math.imul(I,ut)|0,r=r+Math.imul(x,lt)|0,n=n+Math.imul(x,dt)|0,n=n+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0,r=r+Math.imul(S,pt)|0,n=n+Math.imul(S,mt)|0,n=n+Math.imul(k,pt)|0,o=o+Math.imul(k,mt)|0;var Tt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(D,it),n=Math.imul(D,rt),n=n+Math.imul(q,it)|0,o=Math.imul(q,rt),r=r+Math.imul(C,ot)|0,n=n+Math.imul(C,st)|0,n=n+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(B,ht)|0,n=n+Math.imul(B,ut)|0,n=n+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,r=r+Math.imul(T,lt)|0,n=n+Math.imul(T,dt)|0,n=n+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0,r=r+Math.imul(x,pt)|0,n=n+Math.imul(x,mt)|0,n=n+Math.imul(A,pt)|0,o=o+Math.imul(A,mt)|0;var It=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(D,ot),n=Math.imul(D,st),n=n+Math.imul(q,ot)|0,o=Math.imul(q,st),r=r+Math.imul(C,ht)|0,n=n+Math.imul(C,ut)|0,n=n+Math.imul(P,ht)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(B,lt)|0,n=n+Math.imul(B,dt)|0,n=n+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0,r=r+Math.imul(T,pt)|0,n=n+Math.imul(T,mt)|0,n=n+Math.imul(I,pt)|0,o=o+Math.imul(I,mt)|0;var Lt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(D,ht),n=Math.imul(D,ut),n=n+Math.imul(q,ht)|0,o=Math.imul(q,ut),r=r+Math.imul(C,lt)|0,n=n+Math.imul(C,dt)|0,n=n+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0,r=r+Math.imul(B,pt)|0,n=n+Math.imul(B,mt)|0,n=n+Math.imul(O,pt)|0,o=o+Math.imul(O,mt)|0;var Bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(D,lt),n=Math.imul(D,dt),n=n+Math.imul(q,lt)|0,o=Math.imul(q,dt),r=r+Math.imul(C,pt)|0,n=n+Math.imul(C,mt)|0,n=n+Math.imul(P,pt)|0,o=o+Math.imul(P,mt)|0;var Ot=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(D,pt),n=Math.imul(D,mt),n=n+Math.imul(q,pt)|0,o=Math.imul(q,mt);var Nt=(u+r|0)+((8191&n)<<13)|0;return u=(o+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=bt,h[1]=gt,h[2]=vt,h[3]=yt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=kt,h[9]=Et,h[10]=xt,h[11]=At,h[12]=Rt,h[13]=Tt,h[14]=It,h[15]=Lt,h[16]=Bt,h[17]=Ot,h[18]=Nt,0!==u&&(h[19]=u,i.length++),i};function b(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0,n+=s>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}function g(t,e,i){var r=new v;return r.mulp(t,e,i)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?b(this,t,e):g(this,t,e),i},v.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r>=1;return r},v.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=c(t);if(0===e.length)return new o(1);for(var i=this,r=0;r=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=this.length-t.length,r=this.clone(),n=t,s=0|n.words[n.length-1],a=this._countBits(s);i=26-a,0!==i&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var h,u=r.length-n.length;if("mod"!==e){h=new o(null),h.length=u+1,h.words=new Array(h.length);for(var f=0;f=0;d--){var c=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,d);while(0!==r.negative)c--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);h&&(h.words[d]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n=new o(1),s=new o(0),a=new o(0),h=new o(1),u=0;while(e.isEven()&&i.isEven())e.iushrn(1),i.iushrn(1),++u;var f=i.clone(),l=e.clone();while(!e.isZero()){for(var d=0,c=1;0===(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0){e.iushrn(d);while(d-- >0)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1)}for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0){i.iushrn(p);while(p-- >0)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1)}e.cmp(i)>=0?(e.isub(i),n.isub(a),s.isub(h)):(i.isub(e),a.isub(n),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n,s=new o(1),a=new o(0),h=i.clone();while(e.cmpn(1)>0&&i.cmpn(1)>0){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0){e.iushrn(u);while(u-- >0)s.isOdd()&&s.iadd(h),s.iushrn(1)}for(var l=0,d=1;0===(i.words[0]&d)&&l<26;++l,d<<=1);if(l>0){i.iushrn(l);while(l-- >0)a.isOdd()&&a.iadd(h),a.iushrn(1)}e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return n=0===e.cmpn(1)?s:a,n.cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);do{while(e.isEven())e.iushrn(1);while(i.isEven())i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}while(1);return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){rn&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),e=i.bitLength()}while(e>this.n);var r=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},n(_,w),_.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new M;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return y[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}var n=this.m.subn(1),s=0;while(!n.isZero()&&0===n.andln(1))s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new o(2*f*f).toRed(this);while(0!==this.pow(f,u).cmp(h))f.redIAdd(h);var l=this.pow(f,n),d=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=s;while(0!==c.cmp(a)){for(var m=c,b=0;0!==m.cmp(a);b++)m=m.redSqr();r(b=0;n--){for(var f=e.words[n],l=u-1;l>=0;l--){var d=f>>l&1;s!==r[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,h++,(h===i||0===n&&0===l)&&(s=this.mul(s,r[a]),h=0,a=0)):h=0}u=26}return s},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},n(x,E),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(t,this)},5443:function(t,e,i){"use strict";var r=i(1923),n=i(4993),o=i(3128),s=i(1720),a=i(1414);function h(t){a.call(this,"digest"),this._hash=t}r(h,a),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return t=t.toLowerCase(),"md5"===t?new n:"rmd160"===t||"ripemd160"===t?new o:new h(s(t))}},6515:function(t,e,i){var r=i(4993);t.exports=function(t){return(new r).update(t).digest()}},4868:function(t,e,i){"use strict";var r=i(1923),n=i(5797),o=i(1414),s=i(6779).Buffer,a=i(6515),h=i(3128),u=i(1720),f=s.alloc(128);function l(t,e){o.call(this,"digest"),"string"===typeof e&&(e=s.from(e));var i="sha512"===t||"sha384"===t?128:64;if(this._alg=t,this._key=e,e.length>i){var r="rmd160"===t?new h:u(t);e=r.update(e).digest()}else e.lengtha?e=t(e):e.length0;r--)e+=this._buffer(t,e),i+=this._flushBuffer(n,i);return e+=this._buffer(t,e),n},n.prototype.final=function(t){var e,i;return t&&(e=this.update(t)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(i):i},n.prototype._pad=function(t,e){if(0===e)return!1;while(e>>1];i=o.r28shl(i,a),n=o.r28shl(n,a),o.pc2(i,n,t.keys,s)}},h.prototype._update=function(t,e,i,r){var n=this._desState,s=o.readUInt32BE(t,e),a=o.readUInt32BE(t,e+4);o.ip(s,a,n.tmp,0),s=n.tmp[0],a=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,a,n.tmp,0):this._decrypt(n,s,a,n.tmp,0),s=n.tmp[0],a=n.tmp[1],o.writeUInt32BE(i,s,r),o.writeUInt32BE(i,a,r+4)},h.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var i=t.length-e,r=e;r>>0,s=c}o.rip(a,s,r,n)},h.prototype._decrypt=function(t,e,i,r,n){for(var s=i,a=e,h=t.keys.length-2;h>=0;h-=2){var u=t.keys[h],f=t.keys[h+1];o.expand(s,t.tmp,0),u^=t.tmp[0],f^=t.tmp[1];var l=o.substitute(u,f),d=o.permute(l),c=s;s=(a^d)>>>0,a=c}o.rip(s,a,r,n)}},3040:function(t,e,i){"use strict";var r=i(4961),n=i(1923),o=i(6224),s=i(7853);function a(t,e){r.equal(e.length,24,"Invalid key length");var i=e.slice(0,8),n=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i})]}function h(t){o.call(this,t);var e=new a(this.type,this.options.key);this._edeState=e}n(h,o),t.exports=h,h.create=function(t){return new h(t)},h.prototype._update=function(t,e,i,r){var n=this._edeState;n.ciphers[0]._update(t,e,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},h.prototype._pad=s.prototype._pad,h.prototype._unpad=s.prototype._unpad},9379:function(t,e,i){"use strict";i(7658),e.readUInt32BE=function(t,e){var i=t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e];return i>>>0},e.writeUInt32BE=function(t,e,i){t[0+i]=e>>>24,t[1+i]=e>>>16&255,t[2+i]=e>>>8&255,t[3+i]=255&e},e.ip=function(t,e,i,r){for(var n=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)n<<=1,n|=e>>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}i[r+0]=n>>>0,i[r+1]=o>>>0},e.rip=function(t,e,i,r){for(var n=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)n<<=1,n|=e>>>a+s&1,n<<=1,n|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},e.pc1=function(t,e,i,r){for(var n=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)n<<=1,n|=e>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=t>>a+s&1}for(a=0;a<=24;a+=8)n<<=1,n|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var r=[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];e.pc2=function(t,e,i,n){for(var o=0,s=0,a=r.length>>>1,h=0;h>>r[h]&1;for(h=a;h>>r[h]&1;i[n+0]=o>>>0,i[n+1]=s>>>0},e.expand=function(t,e,i){var r=0,n=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[i+0]=r>>>0,e[i+1]=n>>>0};var n=[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];e.substitute=function(t,e){for(var i=0,r=0;r<4;r++){var o=t>>>18-6*r&63,s=n[64*r+o];i<<=4,i|=s}for(r=0;r<4;r++){o=e>>>18-6*r&63,s=n[256+64*r+o];i<<=4,i|=s}return i>>>0};var o=[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];e.permute=function(t){for(var e=0,i=0;i>>o[i]&1;return e>>>0},e.padSplit=function(t,e,i){var r=t.toString(2);while(r.lengtht)i.ishrn(1);if(i.isEven()&&i.iadd(h),i.testn(1)||i.iadd(u),e.cmp(u)){if(!e.cmp(f))while(i.mod(l).cmp(d))i.iadd(p)}else while(i.mod(o).cmp(c))i.iadd(p);if(s=i.shrn(1),g(s)&&g(i)&&v(s)&&v(i)&&a.test(s)&&a.test(i))return i}}},8178:function(t,e,i){t=i.nmd(t),function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:i(7748).Buffer}catch(A){}function a(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=a(t,i);return i-1>=e&&(r|=a(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"===typeof t)return this._initNumber(t,e,i);if("object"===typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var n=0;"-"===t[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=h(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else{var a=t.length-e;for(r=a%2===0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8}this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,a=Math.min(o,o-s)+i,h=0,f=i;f1&&0===this.words[this.length-1])this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","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"],l=[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],d=[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];function c(t){for(var e=new Array(t.bitLength()),i=0;i>>n}return e}function p(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;i.words[0]=a;for(var u=1;u>>26,l=67108863&h,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;n=0|t.words[p],o=0|e.words[c],s=n*o+l,f+=s/67108864|0,l=67108863&s}i.words[u]=0|l,h=0|f}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(t=t||10,e=0|e||1,16===t||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215,i=0!==o||s!==this.length-1?f[6-h.length]+h+i:h+i,n+=2,n>=26&&(n-=26,s--)}0!==o&&(i=o.toString(16)+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],c=d[t];i="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(c).toString(t);p=p.idivn(c),i=p.isZero()?m+i:f[u-m.length]+m+i}this.isZero()&&(i="0"+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0===(8191&e)&&(i+=13,e>>>=13),0===(127&e)&&(i+=7,e>>>=7),0===(15&e)&&(i+=4,e>>>=4),0===(3&e)&&(i+=2,e>>>=2),0===(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,c=0|s[1],p=8191&c,m=c>>>13,b=0|s[2],g=8191&b,v=b>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,k=M>>>13,E=0|s[5],x=8191&E,A=E>>>13,R=0|s[6],T=8191&R,I=R>>>13,L=0|s[7],B=8191&L,O=L>>>13,N=0|s[8],C=8191&N,P=N>>>13,j=0|s[9],D=8191&j,q=j>>>13,U=0|a[0],z=8191&U,F=U>>>13,Z=0|a[1],W=8191&Z,H=Z>>>13,K=0|a[2],V=8191&K,G=K>>>13,X=0|a[3],Y=8191&X,$=X>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],it=8191&et,rt=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,dt=ft>>>13,ct=0|a[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19,r=Math.imul(l,z),n=Math.imul(l,F),n=n+Math.imul(d,z)|0,o=Math.imul(d,F);var bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(p,z),n=Math.imul(p,F),n=n+Math.imul(m,z)|0,o=Math.imul(m,F),r=r+Math.imul(l,W)|0,n=n+Math.imul(l,H)|0,n=n+Math.imul(d,W)|0,o=o+Math.imul(d,H)|0;var gt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,z),n=Math.imul(g,F),n=n+Math.imul(v,z)|0,o=Math.imul(v,F),r=r+Math.imul(p,W)|0,n=n+Math.imul(p,H)|0,n=n+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,r=r+Math.imul(l,V)|0,n=n+Math.imul(l,G)|0,n=n+Math.imul(d,V)|0,o=o+Math.imul(d,G)|0;var vt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),n=Math.imul(w,F),n=n+Math.imul(_,z)|0,o=Math.imul(_,F),r=r+Math.imul(g,W)|0,n=n+Math.imul(g,H)|0,n=n+Math.imul(v,W)|0,o=o+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,n=n+Math.imul(p,G)|0,n=n+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,r=r+Math.imul(l,Y)|0,n=n+Math.imul(l,$)|0,n=n+Math.imul(d,Y)|0,o=o+Math.imul(d,$)|0;var yt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=Math.imul(S,F),n=n+Math.imul(k,z)|0,o=Math.imul(k,F),r=r+Math.imul(w,W)|0,n=n+Math.imul(w,H)|0,n=n+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,r=r+Math.imul(g,V)|0,n=n+Math.imul(g,G)|0,n=n+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,Y)|0,n=n+Math.imul(p,$)|0,n=n+Math.imul(m,Y)|0,o=o+Math.imul(m,$)|0,r=r+Math.imul(l,Q)|0,n=n+Math.imul(l,tt)|0,n=n+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,z),n=Math.imul(x,F),n=n+Math.imul(A,z)|0,o=Math.imul(A,F),r=r+Math.imul(S,W)|0,n=n+Math.imul(S,H)|0,n=n+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(w,V)|0,n=n+Math.imul(w,G)|0,n=n+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(g,Y)|0,n=n+Math.imul(g,$)|0,n=n+Math.imul(v,Y)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Q)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(l,it)|0,n=n+Math.imul(l,rt)|0,n=n+Math.imul(d,it)|0,o=o+Math.imul(d,rt)|0;var _t=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,z),n=Math.imul(T,F),n=n+Math.imul(I,z)|0,o=Math.imul(I,F),r=r+Math.imul(x,W)|0,n=n+Math.imul(x,H)|0,n=n+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,r=r+Math.imul(S,V)|0,n=n+Math.imul(S,G)|0,n=n+Math.imul(k,V)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,Y)|0,n=n+Math.imul(w,$)|0,n=n+Math.imul(_,Y)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(g,Q)|0,n=n+Math.imul(g,tt)|0,n=n+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,it)|0,n=n+Math.imul(p,rt)|0,n=n+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(l,ot)|0,n=n+Math.imul(l,st)|0,n=n+Math.imul(d,ot)|0,o=o+Math.imul(d,st)|0;var Mt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,z),n=Math.imul(B,F),n=n+Math.imul(O,z)|0,o=Math.imul(O,F),r=r+Math.imul(T,W)|0,n=n+Math.imul(T,H)|0,n=n+Math.imul(I,W)|0,o=o+Math.imul(I,H)|0,r=r+Math.imul(x,V)|0,n=n+Math.imul(x,G)|0,n=n+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(S,Y)|0,n=n+Math.imul(S,$)|0,n=n+Math.imul(k,Y)|0,o=o+Math.imul(k,$)|0,r=r+Math.imul(w,Q)|0,n=n+Math.imul(w,tt)|0,n=n+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(g,it)|0,n=n+Math.imul(g,rt)|0,n=n+Math.imul(v,it)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,n=n+Math.imul(p,st)|0,n=n+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(l,ht)|0,n=n+Math.imul(l,ut)|0,n=n+Math.imul(d,ht)|0,o=o+Math.imul(d,ut)|0;var St=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(C,z),n=Math.imul(C,F),n=n+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(B,W)|0,n=n+Math.imul(B,H)|0,n=n+Math.imul(O,W)|0,o=o+Math.imul(O,H)|0,r=r+Math.imul(T,V)|0,n=n+Math.imul(T,G)|0,n=n+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,Y)|0,n=n+Math.imul(x,$)|0,n=n+Math.imul(A,Y)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(S,Q)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,it)|0,n=n+Math.imul(w,rt)|0,n=n+Math.imul(_,it)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(g,ot)|0,n=n+Math.imul(g,st)|0,n=n+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,r=r+Math.imul(p,ht)|0,n=n+Math.imul(p,ut)|0,n=n+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0,r=r+Math.imul(l,lt)|0,n=n+Math.imul(l,dt)|0,n=n+Math.imul(d,lt)|0,o=o+Math.imul(d,dt)|0;var kt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(D,z),n=Math.imul(D,F),n=n+Math.imul(q,z)|0,o=Math.imul(q,F),r=r+Math.imul(C,W)|0,n=n+Math.imul(C,H)|0,n=n+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(B,V)|0,n=n+Math.imul(B,G)|0,n=n+Math.imul(O,V)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(T,Y)|0,n=n+Math.imul(T,$)|0,n=n+Math.imul(I,Y)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(x,Q)|0,n=n+Math.imul(x,tt)|0,n=n+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(S,it)|0,n=n+Math.imul(S,rt)|0,n=n+Math.imul(k,it)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,n=n+Math.imul(w,st)|0,n=n+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(g,ht)|0,n=n+Math.imul(g,ut)|0,n=n+Math.imul(v,ht)|0,o=o+Math.imul(v,ut)|0,r=r+Math.imul(p,lt)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0,r=r+Math.imul(l,pt)|0,n=n+Math.imul(l,mt)|0,n=n+Math.imul(d,pt)|0,o=o+Math.imul(d,mt)|0;var Et=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(D,W),n=Math.imul(D,H),n=n+Math.imul(q,W)|0,o=Math.imul(q,H),r=r+Math.imul(C,V)|0,n=n+Math.imul(C,G)|0,n=n+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(B,Y)|0,n=n+Math.imul(B,$)|0,n=n+Math.imul(O,Y)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(T,Q)|0,n=n+Math.imul(T,tt)|0,n=n+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,it)|0,n=n+Math.imul(x,rt)|0,n=n+Math.imul(A,it)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(S,ot)|0,n=n+Math.imul(S,st)|0,n=n+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,r=r+Math.imul(w,ht)|0,n=n+Math.imul(w,ut)|0,n=n+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,r=r+Math.imul(g,lt)|0,n=n+Math.imul(g,dt)|0,n=n+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0,r=r+Math.imul(p,pt)|0,n=n+Math.imul(p,mt)|0,n=n+Math.imul(m,pt)|0,o=o+Math.imul(m,mt)|0;var xt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(D,V),n=Math.imul(D,G),n=n+Math.imul(q,V)|0,o=Math.imul(q,G),r=r+Math.imul(C,Y)|0,n=n+Math.imul(C,$)|0,n=n+Math.imul(P,Y)|0,o=o+Math.imul(P,$)|0,r=r+Math.imul(B,Q)|0,n=n+Math.imul(B,tt)|0,n=n+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(T,it)|0,n=n+Math.imul(T,rt)|0,n=n+Math.imul(I,it)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,n=n+Math.imul(x,st)|0,n=n+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,r=r+Math.imul(S,ht)|0,n=n+Math.imul(S,ut)|0,n=n+Math.imul(k,ht)|0,o=o+Math.imul(k,ut)|0,r=r+Math.imul(w,lt)|0,n=n+Math.imul(w,dt)|0,n=n+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0,r=r+Math.imul(g,pt)|0,n=n+Math.imul(g,mt)|0,n=n+Math.imul(v,pt)|0,o=o+Math.imul(v,mt)|0;var At=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(D,Y),n=Math.imul(D,$),n=n+Math.imul(q,Y)|0,o=Math.imul(q,$),r=r+Math.imul(C,Q)|0,n=n+Math.imul(C,tt)|0,n=n+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(B,it)|0,n=n+Math.imul(B,rt)|0,n=n+Math.imul(O,it)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(T,ot)|0,n=n+Math.imul(T,st)|0,n=n+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(x,ht)|0,n=n+Math.imul(x,ut)|0,n=n+Math.imul(A,ht)|0,o=o+Math.imul(A,ut)|0,r=r+Math.imul(S,lt)|0,n=n+Math.imul(S,dt)|0,n=n+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0,r=r+Math.imul(w,pt)|0,n=n+Math.imul(w,mt)|0,n=n+Math.imul(_,pt)|0,o=o+Math.imul(_,mt)|0;var Rt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(D,Q),n=Math.imul(D,tt),n=n+Math.imul(q,Q)|0,o=Math.imul(q,tt),r=r+Math.imul(C,it)|0,n=n+Math.imul(C,rt)|0,n=n+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(B,ot)|0,n=n+Math.imul(B,st)|0,n=n+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(T,ht)|0,n=n+Math.imul(T,ut)|0,n=n+Math.imul(I,ht)|0,o=o+Math.imul(I,ut)|0,r=r+Math.imul(x,lt)|0,n=n+Math.imul(x,dt)|0,n=n+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0,r=r+Math.imul(S,pt)|0,n=n+Math.imul(S,mt)|0,n=n+Math.imul(k,pt)|0,o=o+Math.imul(k,mt)|0;var Tt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(D,it),n=Math.imul(D,rt),n=n+Math.imul(q,it)|0,o=Math.imul(q,rt),r=r+Math.imul(C,ot)|0,n=n+Math.imul(C,st)|0,n=n+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(B,ht)|0,n=n+Math.imul(B,ut)|0,n=n+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,r=r+Math.imul(T,lt)|0,n=n+Math.imul(T,dt)|0,n=n+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0,r=r+Math.imul(x,pt)|0,n=n+Math.imul(x,mt)|0,n=n+Math.imul(A,pt)|0,o=o+Math.imul(A,mt)|0;var It=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(D,ot),n=Math.imul(D,st),n=n+Math.imul(q,ot)|0,o=Math.imul(q,st),r=r+Math.imul(C,ht)|0,n=n+Math.imul(C,ut)|0,n=n+Math.imul(P,ht)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(B,lt)|0,n=n+Math.imul(B,dt)|0,n=n+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0,r=r+Math.imul(T,pt)|0,n=n+Math.imul(T,mt)|0,n=n+Math.imul(I,pt)|0,o=o+Math.imul(I,mt)|0;var Lt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(D,ht),n=Math.imul(D,ut),n=n+Math.imul(q,ht)|0,o=Math.imul(q,ut),r=r+Math.imul(C,lt)|0,n=n+Math.imul(C,dt)|0,n=n+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0,r=r+Math.imul(B,pt)|0,n=n+Math.imul(B,mt)|0,n=n+Math.imul(O,pt)|0,o=o+Math.imul(O,mt)|0;var Bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(D,lt),n=Math.imul(D,dt),n=n+Math.imul(q,lt)|0,o=Math.imul(q,dt),r=r+Math.imul(C,pt)|0,n=n+Math.imul(C,mt)|0,n=n+Math.imul(P,pt)|0,o=o+Math.imul(P,mt)|0;var Ot=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(D,pt),n=Math.imul(D,mt),n=n+Math.imul(q,pt)|0,o=Math.imul(q,mt);var Nt=(u+r|0)+((8191&n)<<13)|0;return u=(o+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=bt,h[1]=gt,h[2]=vt,h[3]=yt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=kt,h[9]=Et,h[10]=xt,h[11]=At,h[12]=Rt,h[13]=Tt,h[14]=It,h[15]=Lt,h[16]=Bt,h[17]=Ot,h[18]=Nt,0!==u&&(h[19]=u,i.length++),i};function b(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0,n+=s>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}function g(t,e,i){var r=new v;return r.mulp(t,e,i)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?b(this,t,e):g(this,t,e),i},v.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r>=1;return r},v.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=c(t);if(0===e.length)return new o(1);for(var i=this,r=0;r=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=this.length-t.length,r=this.clone(),n=t,s=0|n.words[n.length-1],a=this._countBits(s);i=26-a,0!==i&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var h,u=r.length-n.length;if("mod"!==e){h=new o(null),h.length=u+1,h.words=new Array(h.length);for(var f=0;f=0;d--){var c=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,d);while(0!==r.negative)c--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);h&&(h.words[d]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n=new o(1),s=new o(0),a=new o(0),h=new o(1),u=0;while(e.isEven()&&i.isEven())e.iushrn(1),i.iushrn(1),++u;var f=i.clone(),l=e.clone();while(!e.isZero()){for(var d=0,c=1;0===(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0){e.iushrn(d);while(d-- >0)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1)}for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0){i.iushrn(p);while(p-- >0)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1)}e.cmp(i)>=0?(e.isub(i),n.isub(a),s.isub(h)):(i.isub(e),a.isub(n),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n,s=new o(1),a=new o(0),h=i.clone();while(e.cmpn(1)>0&&i.cmpn(1)>0){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0){e.iushrn(u);while(u-- >0)s.isOdd()&&s.iadd(h),s.iushrn(1)}for(var l=0,d=1;0===(i.words[0]&d)&&l<26;++l,d<<=1);if(l>0){i.iushrn(l);while(l-- >0)a.isOdd()&&a.iadd(h),a.iushrn(1)}e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return n=0===e.cmpn(1)?s:a,n.cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);do{while(e.isEven())e.iushrn(1);while(i.isEven())i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}while(1);return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){rn&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),e=i.bitLength()}while(e>this.n);var r=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},n(_,w),_.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new M;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return y[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}var n=this.m.subn(1),s=0;while(!n.isZero()&&0===n.andln(1))s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new o(2*f*f).toRed(this);while(0!==this.pow(f,u).cmp(h))f.redIAdd(h);var l=this.pow(f,n),d=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=s;while(0!==c.cmp(a)){for(var m=c,b=0;0!==m.cmp(a);b++)m=m.redSqr();r(b=0;n--){for(var f=e.words[n],l=u-1;l>=0;l--){var d=f>>l&1;s!==r[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,h++,(h===i||0===n&&0===l)&&(s=this.mul(s,r[a]),h=0,a=0)):h=0}u=26}return s},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},n(x,E),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(t,this)},2127:function(t,e,i){"use strict";var r=e;r.version=i(8597).i8,r.utils=i(7913),r.rand=i(1482),r.curve=i(1626),r.curves=i(9474),r.ec=i(8082),r.eddsa=i(9322)},7661:function(t,e,i){"use strict";i(7658);var r=i(1646),n=i(7913),o=n.getNAF,s=n.getJSF,a=n.assert;function h(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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 i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=h,h.prototype.point=function(){throw new Error("Not implemented")},h.prototype.validate=function(){throw new Error("Not implemented")},h.prototype._fixedNafMul=function(t,e){a(t.precomputed);var i=t._getDoubles(),r=o(e,1,this._bitLength),n=(1<=s;f--)h=(h<<1)+r[f];u.push(h)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),c=n;c>0;c--){for(s=0;s=0;u--){for(var f=0;u>=0&&0===s[u];u--)f++;if(u>=0&&f++,h=h.dblp(f),u<0)break;var l=s[u];a(0!==l),h="affine"===t.type?l>0?h.mixedAdd(n[l-1>>1]):h.mixedAdd(n[-l-1>>1].neg()):l>0?h.add(n[l-1>>1]):h.add(n[-l-1>>1].neg())}return"affine"===t.type?h.toP():h},h.prototype._wnafMulAdd=function(t,e,i,r,n){var a,h,u,f=this._wnafT1,l=this._wnafT2,d=this._wnafT3,c=0;for(a=0;a=1;a-=2){var m=a-1,b=a;if(1===f[m]&&1===f[b]){var g=[e[m],null,null,e[b]];0===e[m].y.cmp(e[b].y)?(g[1]=e[m].add(e[b]),g[2]=e[m].toJ().mixedAdd(e[b].neg())):0===e[m].y.cmp(e[b].y.redNeg())?(g[1]=e[m].toJ().mixedAdd(e[b]),g[2]=e[m].add(e[b].neg())):(g[1]=e[m].toJ().mixedAdd(e[b]),g[2]=e[m].toJ().mixedAdd(e[b].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=s(i[m],i[b]);for(c=Math.max(y[0].length,c),d[m]=new Array(c),d[b]=new Array(c),h=0;h=0;a--){var k=0;while(a>=0){var E=!0;for(h=0;h=0&&k++,M=M.dblp(k),a<0)break;for(h=0;h0?u=l[h][x-1>>1]:x<0&&(u=l[h][-x-1>>1].neg()),M="affine"===u.type?M.mixedAdd(u):M.add(u))}}for(a=0;a=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),s=o.redSub(i),a=r.redSub(e),h=n.redMul(s),u=o.redMul(a),f=n.redMul(a),l=s.redMul(o);return this.curve.point(h,u,l,f)},u.prototype._projDbl=function(){var t,e,i,r,n,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),h=this.y.redSqr();if(this.curve.twisted){r=this.curve._mulA(a);var u=r.redAdd(h);this.zOne?(t=s.redSub(a).redSub(h).redMul(u.redSub(this.curve.two)),e=u.redMul(r.redSub(h)),i=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),o=u.redSub(n).redISub(n),t=s.redSub(a).redISub(h).redMul(o),e=u.redMul(r.redSub(h)),i=u.redMul(o))}else r=a.redAdd(h),n=this.curve._mulC(this.z).redSqr(),o=r.redSub(n).redSub(n),t=this.curve._mulC(s.redISub(r)).redMul(o),e=this.curve._mulC(r).redMul(a.redISub(h)),i=r.redMul(o);return this.curve.point(t,e,i)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=i.redSub(e),s=n.redSub(r),a=n.redAdd(r),h=i.redAdd(e),u=o.redMul(s),f=a.redMul(h),l=o.redMul(h),d=s.redMul(a);return this.curve.point(u,f,d,l)},u.prototype._projAdd=function(t){var e,i,r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),h=n.redSub(a),u=n.redAdd(a),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=r.redMul(h).redMul(f);return this.curve.twisted?(e=r.redMul(u).redMul(s.redSub(this.curve._mulA(o))),i=h.redMul(u)):(e=r.redMul(u).redMul(s.redSub(o)),i=this.curve._mulC(h).redMul(u)),this.curve.point(l,e,i)},u.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},u.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!1)},u.prototype.jmulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},u.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var i=t.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},1626:function(t,e,i){"use strict";var r=e;r.base=i(7661),r.short=i(8441),r.mont=i(6433),r.edwards=i(6014)},6433:function(t,e,i){"use strict";i(7658);var r=i(1646),n=i(1923),o=i(7661),s=i(7913);function a(t){o.call(this,"mont",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(t.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function h(t,e,i){o.BasePoint.call(this,t,"projective"),null===e&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(e,16),this.z=new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,i=e.redSqr(),r=i.redMul(e).redAdd(i.redMul(this.a)).redAdd(e),n=r.redSqrt();return 0===n.redSqr().cmp(r)},n(h,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new h(this,t,e)},a.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},h.prototype.precompute=function(){},h.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},h.fromJSON=function(t,e){return new h(t,e[0],e[1]||t.one)},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},h.prototype.dbl=function(){var t=this.x.redAdd(this.z),e=t.redSqr(),i=this.x.redSub(this.z),r=i.redSqr(),n=e.redSub(r),o=e.redMul(r),s=n.redMul(r.redAdd(this.curve.a24.redMul(n)));return this.curve.point(o,s)},h.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.diffAdd=function(t,e){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z),s=o.redMul(i),a=n.redMul(r),h=e.z.redMul(s.redAdd(a).redSqr()),u=e.x.redMul(s.redISub(a).redSqr());return this.curve.point(h,u)},h.prototype.mul=function(t){for(var e=t.clone(),i=this,r=this.curve.point(null,null),n=this,o=[];0!==e.cmpn(0);e.iushrn(1))o.push(e.andln(1));for(var s=o.length-1;s>=0;s--)0===o[s]?(i=i.diffAdd(r,n),r=r.dbl()):(r=i.diffAdd(r,n),i=i.dbl());return r},h.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},h.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},8441:function(t,e,i){"use strict";var r=i(7913),n=i(1646),o=i(1923),s=i(7661),a=r.assert;function h(t){s.call(this,"short",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(t,e,i,r){s.BasePoint.call(this,t,"affine"),null===e&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(e,16),this.y=new n(i,16),r&&(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)}function f(t,e,i,r){s.BasePoint.call(this,t,"jacobian"),null===e&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(e,16),this.y=new n(i,16),this.z=new n(r,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}o(h,s),t.exports=h,h.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,i,r;if(t.beta)e=new n(t.beta,16).toRed(this.red);else{var o=this._getEndoRoots(this.p);e=o[0].cmp(o[1])<0?o[0]:o[1],e=e.toRed(this.red)}if(t.lambda)i=new n(t.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(e))?i=s[0]:(i=s[1],a(0===this.g.mul(i).x.cmp(this.g.x.redMul(e))))}return r=t.basis?t.basis.map((function(t){return{a:new n(t.a,16),b:new n(t.b,16)}})):this._getEndoBasis(i),{beta:e,lambda:i,basis:r}}},h.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:n.mont(t),i=new n(2).toRed(e).redInvm(),r=i.redNeg(),o=new n(3).toRed(e).redNeg().redSqrt().redMul(i),s=r.redAdd(o).fromRed(),a=r.redSub(o).fromRed();return[s,a]},h.prototype._getEndoBasis=function(t){var e,i,r,o,s,a,h,u,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,c=this.n.clone(),p=new n(1),m=new n(0),b=new n(0),g=new n(1),v=0;while(0!==d.cmpn(0)){var y=c.div(d);u=c.sub(y.mul(d)),f=b.sub(y.mul(p));var w=g.sub(y.mul(m));if(!r&&u.cmp(l)<0)e=h.neg(),i=p,r=u.neg(),o=f;else if(r&&2===++v)break;h=u,c=d,d=u,b=p,p=f,g=m,m=w}s=u.neg(),a=f;var _=r.sqr().add(o.sqr()),M=s.sqr().add(a.sqr());return M.cmp(_)>=0&&(s=e,a=i),r.negative&&(r=r.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:r,b:o},{a:s,b:a}]},h.prototype._endoSplit=function(t){var e=this.endo.basis,i=e[0],r=e[1],n=r.b.mul(t).divRound(this.n),o=i.b.neg().mul(t).divRound(this.n),s=n.mul(i.a),a=o.mul(r.a),h=n.mul(i.b),u=o.mul(r.b),f=t.sub(s).sub(a),l=h.add(u).neg();return{k1:f,k2:l}},h.prototype.pointFromX=function(t,e){t=new n(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var o=r.fromRed().isOdd();return(e&&!o||!e&&o)&&(r=r.redNeg()),this.point(t,r)},h.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,i=t.y,r=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},h.prototype._endoWnafMulAdd=function(t,e,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var i=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,i=this.x.redSqr(),r=t.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(e).redMul(r),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new n(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},u.prototype.jmulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return e},u.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t},o(f,s.BasePoint),h.prototype.jpoint=function(t,e,i){return new f(this,t,e,i)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),i=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(i,r)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(e),n=t.x.redMul(i),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(i.redMul(this.z)),a=r.redSub(n),h=o.redSub(s);if(0===a.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),f=u.redMul(a),l=r.redMul(u),d=h.redSqr().redIAdd(f).redISub(l).redISub(l),c=h.redMul(l.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(d,c,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),i=this.x,r=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),s=i.redSub(r),a=n.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=s.redSqr(),u=h.redMul(s),f=i.redMul(h),l=a.redSqr().redIAdd(u).redISub(f).redISub(f),d=a.redMul(f.redISub(l)).redISub(n.redMul(u)),c=this.z.redMul(s);return this.curve.jpoint(l,d,c)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var i=this;for(e=0;e=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},9474:function(t,e,i){"use strict";var r,n=e,o=i(8730),s=i(1626),a=i(7913),h=a.assert;function u(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,h(this.g.validate(),"Invalid curve"),h(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var i=new u(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:i}),i}})}n.PresetCurve=u,f("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:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("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:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("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:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("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:o.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"]}),f("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:o.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"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=i(5802)}catch(l){r=void 0}f("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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},8082:function(t,e,i){"use strict";var r=i(1646),n=i(2570),o=i(7913),s=i(9474),a=i(1482),h=o.assert,u=i(6964),f=i(4958);function l(t){if(!(this instanceof l))return new l(t);"string"===typeof t&&(h(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new u(this,t)},l.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new n({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),o=this.n.sub(new r(2));;){var s=new r(e.generate(i));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},l.prototype._truncateToN=function(t,e){var i=8*t.byteLength()-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,i,o){"object"===typeof i&&(o=i,i=null),o||(o={}),e=this.keyFromPrivate(e,i),t=this._truncateToN(new r(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),h=t.toArray("be",s),u=new n({hash:this.hash,entropy:a,nonce:h,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new r(1)),d=0;;d++){var c=o.k?o.k(d):new r(u.generate(this.n.byteLength()));if(c=this._truncateToN(c,!0),!(c.cmpn(1)<=0||c.cmp(l)>=0)){var p=this.g.mul(c);if(!p.isInfinity()){var m=p.getX(),b=m.umod(this.n);if(0!==b.cmpn(0)){var g=c.invm(this.n).mul(b.mul(e.getPrivate()).iadd(t));if(g=g.umod(this.n),0!==g.cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==m.cmp(b)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),v^=1),new f({r:b,s:g,recoveryParam:v})}}}}}},l.prototype.verify=function(t,e,i,n){t=this._truncateToN(new r(t,16)),i=this.keyFromPublic(i,n),e=new f(e,"hex");var o=e.r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,h=s.invm(this.n),u=h.mul(t).umod(this.n),l=h.mul(o).umod(this.n);return this.curve._maxwellTrick?(a=this.g.jmulAdd(u,i.getPublic(),l),!a.isInfinity()&&a.eqXToP(o)):(a=this.g.mulAdd(u,i.getPublic(),l),!a.isInfinity()&&0===a.getX().umod(this.n).cmp(o))},l.prototype.recoverPubKey=function(t,e,i,n){h((3&i)===i,"The recovery param is more than two bits"),e=new f(e,n);var o=this.n,s=new r(t),a=e.r,u=e.s,l=1&i,d=i>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),l):this.curve.pointFromX(a,l);var c=e.r.invm(o),p=o.sub(s).mul(c).umod(o),m=u.mul(c).umod(o);return this.g.mulAdd(p,a,m)},l.prototype.getKeyRecoveryParam=function(t,e,i,r){if(e=new f(e,r),null!==e.recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(i))return n}throw new Error("Unable to find valid recovery factor")}},6964:function(t,e,i){"use strict";var r=i(1646),n=i(7913),o=n.assert;function s(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=s,s.fromPublic=function(t,e,i){return e instanceof s?e:new s(t,{pub:e,pubEnc:i})},s.fromPrivate=function(t,e,i){return e instanceof s?e:new s(t,{priv:e,privEnc:i})},s.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.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"}},s.prototype.getPublic=function(t,e){return"string"===typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},s.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(t,e){this.priv=new r(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?o(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||o(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},s.prototype.derive=function(t){return t.validate()||o(t.validate(),"public point not validated"),t.mul(this.priv).getX()},s.prototype.sign=function(t,e,i){return this.ec.sign(t,this,e,i)},s.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},s.prototype.inspect=function(){return""}},4958:function(t,e,i){"use strict";i(7658);var r=i(1646),n=i(7913),o=n.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new r(t.r,16),this.s=new r(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function h(t,e){var i=t[e.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,o=0,s=e.place;o>>=0;return!(n<=127)&&(e.place=s,n)}function u(t){var e=0,i=t.length-1;while(!t[e]&&!(128&t[e+1])&&e>>3);t.push(128|i);while(--i)t.push(e>>>(i<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=n.toArray(t,e);var i=new a;if(48!==t[i.place++])return!1;var o=h(t,i);if(!1===o)return!1;if(o+i.place!==t.length)return!1;if(2!==t[i.place++])return!1;var s=h(t,i);if(!1===s)return!1;var u=t.slice(i.place,s+i.place);if(i.place+=s,2!==t[i.place++])return!1;var f=h(t,i);if(!1===f)return!1;if(t.length!==f+i.place)return!1;var l=t.slice(i.place,f+i.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new r(u),this.s=new r(l),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),i=this.s.toArray();128&e[0]&&(e=[0].concat(e)),128&i[0]&&(i=[0].concat(i)),e=u(e),i=u(i);while(!i[0]&&!(128&i[1]))i=i.slice(1);var r=[2];f(r,e.length),r=r.concat(e),r.push(2),f(r,i.length);var o=r.concat(i),s=[48];return f(s,o.length),s=s.concat(o),n.encode(s,t)}},9322:function(t,e,i){"use strict";var r=i(8730),n=i(9474),o=i(7913),s=o.assert,a=o.parseBytes,h=i(4586),u=i(6717);function f(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=n[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=r.sha512}t.exports=f,f.prototype.sign=function(t,e){t=a(t);var i=this.keyFromSecret(e),r=this.hashInt(i.messagePrefix(),t),n=this.g.mul(r),o=this.encodePoint(n),s=this.hashInt(o,i.pubBytes(),t).mul(i.priv()),h=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:h,Rencoded:o})},f.prototype.verify=function(t,e,i){t=a(t),e=this.makeSignature(e);var r=this.keyFromPublic(i),n=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S()),s=e.R().add(r.pub().mul(n));return s.eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e(n>>1)-1?(n>>1)-h:h,o.isubn(a)):a=0,r[s]=a,o.iushrn(1)}return r}function h(t,e){var i=[[],[]];t=t.clone(),e=e.clone();var r,n=0,o=0;while(t.cmpn(-n)>0||e.cmpn(-o)>0){var s,a,h=t.andln(3)+n&3,u=e.andln(3)+o&3;3===h&&(h=-1),3===u&&(u=-1),0===(1&h)?s=0:(r=t.andln(7)+n&7,s=3!==r&&5!==r||2!==u?h:-h),i[0].push(s),0===(1&u)?a=0:(r=e.andln(7)+o&7,a=3!==r&&5!==r||2!==h?u:-u),i[1].push(a),2*n===s+1&&(n=1-n),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return i}function u(t,e,i){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}}function f(t){return"string"===typeof t?r.toArray(t,"hex"):t}function l(t){return new n(t,"hex","le")}r.assert=o,r.toArray=s.toArray,r.zero2=s.zero2,r.toHex=s.toHex,r.encode=s.encode,r.getNAF=a,r.getJSF=h,r.cachedProperty=u,r.parseBytes=f,r.intFromLE=l},1646:function(t,e,i){t=i.nmd(t),function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:i(5568).Buffer}catch(A){}function a(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=a(t,i);return i-1>=e&&(r|=a(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"===typeof t)return this._initNumber(t,e,i);if("object"===typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var n=0;"-"===t[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=h(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else{var a=t.length-e;for(r=a%2===0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8}this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,a=Math.min(o,o-s)+i,h=0,f=i;f1&&0===this.words[this.length-1])this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","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"],l=[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],d=[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];function c(t){for(var e=new Array(t.bitLength()),i=0;i>>n}return e}function p(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;i.words[0]=a;for(var u=1;u>>26,l=67108863&h,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;n=0|t.words[p],o=0|e.words[c],s=n*o+l,f+=s/67108864|0,l=67108863&s}i.words[u]=0|l,h=0|f}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(t=t||10,e=0|e||1,16===t||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215,i=0!==o||s!==this.length-1?f[6-h.length]+h+i:h+i,n+=2,n>=26&&(n-=26,s--)}0!==o&&(i=o.toString(16)+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],c=d[t];i="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(c).toString(t);p=p.idivn(c),i=p.isZero()?m+i:f[u-m.length]+m+i}this.isZero()&&(i="0"+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0===(8191&e)&&(i+=13,e>>>=13),0===(127&e)&&(i+=7,e>>>=7),0===(15&e)&&(i+=4,e>>>=4),0===(3&e)&&(i+=2,e>>>=2),0===(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,c=0|s[1],p=8191&c,m=c>>>13,b=0|s[2],g=8191&b,v=b>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,k=M>>>13,E=0|s[5],x=8191&E,A=E>>>13,R=0|s[6],T=8191&R,I=R>>>13,L=0|s[7],B=8191&L,O=L>>>13,N=0|s[8],C=8191&N,P=N>>>13,j=0|s[9],D=8191&j,q=j>>>13,U=0|a[0],z=8191&U,F=U>>>13,Z=0|a[1],W=8191&Z,H=Z>>>13,K=0|a[2],V=8191&K,G=K>>>13,X=0|a[3],Y=8191&X,$=X>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],it=8191&et,rt=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,dt=ft>>>13,ct=0|a[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19,r=Math.imul(l,z),n=Math.imul(l,F),n=n+Math.imul(d,z)|0,o=Math.imul(d,F);var bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(p,z),n=Math.imul(p,F),n=n+Math.imul(m,z)|0,o=Math.imul(m,F),r=r+Math.imul(l,W)|0,n=n+Math.imul(l,H)|0,n=n+Math.imul(d,W)|0,o=o+Math.imul(d,H)|0;var gt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,z),n=Math.imul(g,F),n=n+Math.imul(v,z)|0,o=Math.imul(v,F),r=r+Math.imul(p,W)|0,n=n+Math.imul(p,H)|0,n=n+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,r=r+Math.imul(l,V)|0,n=n+Math.imul(l,G)|0,n=n+Math.imul(d,V)|0,o=o+Math.imul(d,G)|0;var vt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),n=Math.imul(w,F),n=n+Math.imul(_,z)|0,o=Math.imul(_,F),r=r+Math.imul(g,W)|0,n=n+Math.imul(g,H)|0,n=n+Math.imul(v,W)|0,o=o+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,n=n+Math.imul(p,G)|0,n=n+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,r=r+Math.imul(l,Y)|0,n=n+Math.imul(l,$)|0,n=n+Math.imul(d,Y)|0,o=o+Math.imul(d,$)|0;var yt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=Math.imul(S,F),n=n+Math.imul(k,z)|0,o=Math.imul(k,F),r=r+Math.imul(w,W)|0,n=n+Math.imul(w,H)|0,n=n+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,r=r+Math.imul(g,V)|0,n=n+Math.imul(g,G)|0,n=n+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,Y)|0,n=n+Math.imul(p,$)|0,n=n+Math.imul(m,Y)|0,o=o+Math.imul(m,$)|0,r=r+Math.imul(l,Q)|0,n=n+Math.imul(l,tt)|0,n=n+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,z),n=Math.imul(x,F),n=n+Math.imul(A,z)|0,o=Math.imul(A,F),r=r+Math.imul(S,W)|0,n=n+Math.imul(S,H)|0,n=n+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(w,V)|0,n=n+Math.imul(w,G)|0,n=n+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(g,Y)|0,n=n+Math.imul(g,$)|0,n=n+Math.imul(v,Y)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Q)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(l,it)|0,n=n+Math.imul(l,rt)|0,n=n+Math.imul(d,it)|0,o=o+Math.imul(d,rt)|0;var _t=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,z),n=Math.imul(T,F),n=n+Math.imul(I,z)|0,o=Math.imul(I,F),r=r+Math.imul(x,W)|0,n=n+Math.imul(x,H)|0,n=n+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,r=r+Math.imul(S,V)|0,n=n+Math.imul(S,G)|0,n=n+Math.imul(k,V)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,Y)|0,n=n+Math.imul(w,$)|0,n=n+Math.imul(_,Y)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(g,Q)|0,n=n+Math.imul(g,tt)|0,n=n+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,it)|0,n=n+Math.imul(p,rt)|0,n=n+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(l,ot)|0,n=n+Math.imul(l,st)|0,n=n+Math.imul(d,ot)|0,o=o+Math.imul(d,st)|0;var Mt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,z),n=Math.imul(B,F),n=n+Math.imul(O,z)|0,o=Math.imul(O,F),r=r+Math.imul(T,W)|0,n=n+Math.imul(T,H)|0,n=n+Math.imul(I,W)|0,o=o+Math.imul(I,H)|0,r=r+Math.imul(x,V)|0,n=n+Math.imul(x,G)|0,n=n+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(S,Y)|0,n=n+Math.imul(S,$)|0,n=n+Math.imul(k,Y)|0,o=o+Math.imul(k,$)|0,r=r+Math.imul(w,Q)|0,n=n+Math.imul(w,tt)|0,n=n+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(g,it)|0,n=n+Math.imul(g,rt)|0,n=n+Math.imul(v,it)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,n=n+Math.imul(p,st)|0,n=n+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(l,ht)|0,n=n+Math.imul(l,ut)|0,n=n+Math.imul(d,ht)|0,o=o+Math.imul(d,ut)|0;var St=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(C,z),n=Math.imul(C,F),n=n+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(B,W)|0,n=n+Math.imul(B,H)|0,n=n+Math.imul(O,W)|0,o=o+Math.imul(O,H)|0,r=r+Math.imul(T,V)|0,n=n+Math.imul(T,G)|0,n=n+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,Y)|0,n=n+Math.imul(x,$)|0,n=n+Math.imul(A,Y)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(S,Q)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,it)|0,n=n+Math.imul(w,rt)|0,n=n+Math.imul(_,it)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(g,ot)|0,n=n+Math.imul(g,st)|0,n=n+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,r=r+Math.imul(p,ht)|0,n=n+Math.imul(p,ut)|0,n=n+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0,r=r+Math.imul(l,lt)|0,n=n+Math.imul(l,dt)|0,n=n+Math.imul(d,lt)|0,o=o+Math.imul(d,dt)|0;var kt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(D,z),n=Math.imul(D,F),n=n+Math.imul(q,z)|0,o=Math.imul(q,F),r=r+Math.imul(C,W)|0,n=n+Math.imul(C,H)|0,n=n+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(B,V)|0,n=n+Math.imul(B,G)|0,n=n+Math.imul(O,V)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(T,Y)|0,n=n+Math.imul(T,$)|0,n=n+Math.imul(I,Y)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(x,Q)|0,n=n+Math.imul(x,tt)|0,n=n+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(S,it)|0,n=n+Math.imul(S,rt)|0,n=n+Math.imul(k,it)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,n=n+Math.imul(w,st)|0,n=n+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(g,ht)|0,n=n+Math.imul(g,ut)|0,n=n+Math.imul(v,ht)|0,o=o+Math.imul(v,ut)|0,r=r+Math.imul(p,lt)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0,r=r+Math.imul(l,pt)|0,n=n+Math.imul(l,mt)|0,n=n+Math.imul(d,pt)|0,o=o+Math.imul(d,mt)|0;var Et=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(D,W),n=Math.imul(D,H),n=n+Math.imul(q,W)|0,o=Math.imul(q,H),r=r+Math.imul(C,V)|0,n=n+Math.imul(C,G)|0,n=n+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(B,Y)|0,n=n+Math.imul(B,$)|0,n=n+Math.imul(O,Y)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(T,Q)|0,n=n+Math.imul(T,tt)|0,n=n+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,it)|0,n=n+Math.imul(x,rt)|0,n=n+Math.imul(A,it)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(S,ot)|0,n=n+Math.imul(S,st)|0,n=n+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,r=r+Math.imul(w,ht)|0,n=n+Math.imul(w,ut)|0,n=n+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,r=r+Math.imul(g,lt)|0,n=n+Math.imul(g,dt)|0,n=n+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0,r=r+Math.imul(p,pt)|0,n=n+Math.imul(p,mt)|0,n=n+Math.imul(m,pt)|0,o=o+Math.imul(m,mt)|0;var xt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(D,V),n=Math.imul(D,G),n=n+Math.imul(q,V)|0,o=Math.imul(q,G),r=r+Math.imul(C,Y)|0,n=n+Math.imul(C,$)|0,n=n+Math.imul(P,Y)|0,o=o+Math.imul(P,$)|0,r=r+Math.imul(B,Q)|0,n=n+Math.imul(B,tt)|0,n=n+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(T,it)|0,n=n+Math.imul(T,rt)|0,n=n+Math.imul(I,it)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,n=n+Math.imul(x,st)|0,n=n+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,r=r+Math.imul(S,ht)|0,n=n+Math.imul(S,ut)|0,n=n+Math.imul(k,ht)|0,o=o+Math.imul(k,ut)|0,r=r+Math.imul(w,lt)|0,n=n+Math.imul(w,dt)|0,n=n+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0,r=r+Math.imul(g,pt)|0,n=n+Math.imul(g,mt)|0,n=n+Math.imul(v,pt)|0,o=o+Math.imul(v,mt)|0;var At=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(D,Y),n=Math.imul(D,$),n=n+Math.imul(q,Y)|0,o=Math.imul(q,$),r=r+Math.imul(C,Q)|0,n=n+Math.imul(C,tt)|0,n=n+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(B,it)|0,n=n+Math.imul(B,rt)|0,n=n+Math.imul(O,it)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(T,ot)|0,n=n+Math.imul(T,st)|0,n=n+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(x,ht)|0,n=n+Math.imul(x,ut)|0,n=n+Math.imul(A,ht)|0,o=o+Math.imul(A,ut)|0,r=r+Math.imul(S,lt)|0,n=n+Math.imul(S,dt)|0,n=n+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0,r=r+Math.imul(w,pt)|0,n=n+Math.imul(w,mt)|0,n=n+Math.imul(_,pt)|0,o=o+Math.imul(_,mt)|0;var Rt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(D,Q),n=Math.imul(D,tt),n=n+Math.imul(q,Q)|0,o=Math.imul(q,tt),r=r+Math.imul(C,it)|0,n=n+Math.imul(C,rt)|0,n=n+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(B,ot)|0,n=n+Math.imul(B,st)|0,n=n+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(T,ht)|0,n=n+Math.imul(T,ut)|0,n=n+Math.imul(I,ht)|0,o=o+Math.imul(I,ut)|0,r=r+Math.imul(x,lt)|0,n=n+Math.imul(x,dt)|0,n=n+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0,r=r+Math.imul(S,pt)|0,n=n+Math.imul(S,mt)|0,n=n+Math.imul(k,pt)|0,o=o+Math.imul(k,mt)|0;var Tt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(D,it),n=Math.imul(D,rt),n=n+Math.imul(q,it)|0,o=Math.imul(q,rt),r=r+Math.imul(C,ot)|0,n=n+Math.imul(C,st)|0,n=n+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(B,ht)|0,n=n+Math.imul(B,ut)|0,n=n+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,r=r+Math.imul(T,lt)|0,n=n+Math.imul(T,dt)|0,n=n+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0,r=r+Math.imul(x,pt)|0,n=n+Math.imul(x,mt)|0,n=n+Math.imul(A,pt)|0,o=o+Math.imul(A,mt)|0;var It=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(D,ot),n=Math.imul(D,st),n=n+Math.imul(q,ot)|0,o=Math.imul(q,st),r=r+Math.imul(C,ht)|0,n=n+Math.imul(C,ut)|0,n=n+Math.imul(P,ht)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(B,lt)|0,n=n+Math.imul(B,dt)|0,n=n+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0,r=r+Math.imul(T,pt)|0,n=n+Math.imul(T,mt)|0,n=n+Math.imul(I,pt)|0,o=o+Math.imul(I,mt)|0;var Lt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(D,ht),n=Math.imul(D,ut),n=n+Math.imul(q,ht)|0,o=Math.imul(q,ut),r=r+Math.imul(C,lt)|0,n=n+Math.imul(C,dt)|0,n=n+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0,r=r+Math.imul(B,pt)|0,n=n+Math.imul(B,mt)|0,n=n+Math.imul(O,pt)|0,o=o+Math.imul(O,mt)|0;var Bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(D,lt),n=Math.imul(D,dt),n=n+Math.imul(q,lt)|0,o=Math.imul(q,dt),r=r+Math.imul(C,pt)|0,n=n+Math.imul(C,mt)|0,n=n+Math.imul(P,pt)|0,o=o+Math.imul(P,mt)|0;var Ot=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(D,pt),n=Math.imul(D,mt),n=n+Math.imul(q,pt)|0,o=Math.imul(q,mt);var Nt=(u+r|0)+((8191&n)<<13)|0;return u=(o+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=bt,h[1]=gt,h[2]=vt,h[3]=yt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=kt,h[9]=Et,h[10]=xt,h[11]=At,h[12]=Rt,h[13]=Tt,h[14]=It,h[15]=Lt,h[16]=Bt,h[17]=Ot,h[18]=Nt,0!==u&&(h[19]=u,i.length++),i};function b(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0,n+=s>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}function g(t,e,i){var r=new v;return r.mulp(t,e,i)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?b(this,t,e):g(this,t,e),i},v.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r>=1;return r},v.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=c(t);if(0===e.length)return new o(1);for(var i=this,r=0;r=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=this.length-t.length,r=this.clone(),n=t,s=0|n.words[n.length-1],a=this._countBits(s);i=26-a,0!==i&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var h,u=r.length-n.length;if("mod"!==e){h=new o(null),h.length=u+1,h.words=new Array(h.length);for(var f=0;f=0;d--){var c=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,d);while(0!==r.negative)c--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);h&&(h.words[d]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n=new o(1),s=new o(0),a=new o(0),h=new o(1),u=0;while(e.isEven()&&i.isEven())e.iushrn(1),i.iushrn(1),++u;var f=i.clone(),l=e.clone();while(!e.isZero()){for(var d=0,c=1;0===(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0){e.iushrn(d);while(d-- >0)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1)}for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0){i.iushrn(p);while(p-- >0)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1)}e.cmp(i)>=0?(e.isub(i),n.isub(a),s.isub(h)):(i.isub(e),a.isub(n),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n,s=new o(1),a=new o(0),h=i.clone();while(e.cmpn(1)>0&&i.cmpn(1)>0){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0){e.iushrn(u);while(u-- >0)s.isOdd()&&s.iadd(h),s.iushrn(1)}for(var l=0,d=1;0===(i.words[0]&d)&&l<26;++l,d<<=1);if(l>0){i.iushrn(l);while(l-- >0)a.isOdd()&&a.iadd(h),a.iushrn(1)}e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return n=0===e.cmpn(1)?s:a,n.cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);do{while(e.isEven())e.iushrn(1);while(i.isEven())i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}while(1);return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){rn&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),e=i.bitLength()}while(e>this.n);var r=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},n(_,w),_.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new M;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return y[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}var n=this.m.subn(1),s=0;while(!n.isZero()&&0===n.andln(1))s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new o(2*f*f).toRed(this);while(0!==this.pow(f,u).cmp(h))f.redIAdd(h);var l=this.pow(f,n),d=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=s;while(0!==c.cmp(a)){for(var m=c,b=0;0!==m.cmp(a);b++)m=m.redSqr();r(b=0;n--){for(var f=e.words[n],l=u-1;l>=0;l--){var d=f>>l&1;s!==r[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,h++,(h===i||0===n&&0===l)&&(s=this.mul(s,r[a]),h=0,a=0)):h=0}u=26}return s},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},n(x,E),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(t,this)},2901:function(t,e,i){function r(t){if(t)return n(t)}function n(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}i(7658),t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},r.prototype.once=function(t,e){var i=this;function r(){i.off(t,r),e.apply(this,arguments)}return this._callbacks=this._callbacks||{},r.fn=e,this.on(t,r),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,r=this._callbacks[t];if(!r)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var n=0;n0&&s.length>n&&!s.warned){s.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=s.length,a(h)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(t,e,i){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},n=p.bind(r);return n.listener=i,r.wrapFn=n,n}function b(t,e,i){var r=t._events;if(void 0===r)return[];var n=r[e];return void 0===n?[]:"function"===typeof n?i?[n.listener||n]:[n]:i?w(n):v(n,n.length)}function g(t){var e=this._events;if(void 0!==e){var i=e[t];if("function"===typeof i)return 1;if(void 0!==i)return i.length}return 0}function v(t,e){for(var i=new Array(e),r=0;r0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var h=n[t];if(void 0===h)return!1;if("function"===typeof h)s(h,this,e);else{var u=h.length,f=v(h,u);for(i=0;i=0;o--)if(i[o]===e||i[o].listener===e){s=i[o].listener,n=o;break}if(n<0)return this;0===n?i.shift():y(i,n),1===i.length&&(r[t]=i[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(t){var e,i,r;if(i=this._events,void 0===i)return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete i[t]),this;if(0===arguments.length){var n,o=Object.keys(i);for(r=0;r=0;r--)this.removeListener(t,e[r]);return this},u.prototype.listeners=function(t){return b(this,t,!0)},u.prototype.rawListeners=function(t){return b(this,t,!1)},u.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},u.prototype.listenerCount=g,u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},3692:function(t,e,i){var r=i(6779).Buffer,n=i(4993);function o(t,e,i,o){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");var s=i/8,a=r.alloc(s),h=r.alloc(o||0),u=r.alloc(0);while(s>0||o>0){var f=new n;f.update(u),f.update(t),e&&f.update(e),u=f.digest();var l=0;if(s>0){var d=a.length-s;l=Math.min(s,u.length),u.copy(a,d,0,l),s-=l}if(l0){var c=h.length-o,p=Math.min(o,u.length-l);u.copy(h,c,l,l+p),o-=p}}return u.fill(0),{key:a,iv:h}}t.exports=o},761:function(t,e,i){"use strict";i(7658);var r=i(6779).Buffer,n=i(1295).Transform,o=i(1923);function s(t,e){if(!r.isBuffer(t)&&"string"!==typeof t)throw new TypeError(e+" must be a string or a buffer")}function a(t){n.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}o(a,n),a.prototype._transform=function(t,e,i){var r=null;try{this.update(t,e)}catch(n){r=n}i(r)},a.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(i){e=i}t(e)},a.prototype.update=function(t,e){if(s(t,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=r.from(t,e));var i=this._block,n=0;while(this._blockOffset+t.length-n>=this._blockSize){for(var o=this._blockOffset;o0;++a)this._length[a]+=h,h=this._length[a]/4294967296|0,h>0&&(this._length[a]-=4294967296*h);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},9937:function(t){"use strict";function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var i={};function r(t,r,n){function o(t,e,i){return"string"===typeof r?r:r(t,e,i)}n||(n=Error);var s=function(t){function i(e,i,r){return t.call(this,o(e,i,r))||this}return e(i,t),i}(n);s.prototype.name=n.name,s.prototype.code=t,i[t]=s}function n(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map((function(t){return String(t)})),i>2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}function o(t,e,i){return t.substr(!i||i<0?0:+i,e.length)===e}function s(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}function a(t,e,i){return"number"!==typeof i&&(i=0),!(i+e.length>t.length)&&-1!==t.indexOf(e,i)}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,h;if("string"===typeof e&&o(e,"not ")?(r="must not be",e=e.replace(/^not /,"")):r="must be",s(t," argument"))h="The ".concat(t," ").concat(r," ").concat(n(e,"type"));else{var u=a(t,".")?"property":"argument";h='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(n(e,"type"))}return h+=". Received type ".concat(typeof i),h}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=i},1557:function(t,e,i){"use strict";var r=i(6027);i(7658);var n=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};t.exports=f;var o=i(719),s=i(1603);i(1923)(f,o);for(var a=n(s.prototype),h=0;h0)if("string"===typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=u(e)),r)s.endEmitted?E(t,new k):L(t,s,e,!0);else if(s.ended)E(t,new M);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(e=s.decoder.write(e),s.objectMode||0!==e.length?L(t,s,e,!1):q(t,s)):L(t,s,e,!1)}else r||(s.reading=!1,q(t,s));return!s.ended&&(s.length=O?t=O:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function C(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=N(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function P(t,e){if(l("onEofChunk"),!e.ended){if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,e.sync?j(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,D(t)))}}function j(t){var e=t._readableState;l("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(D,t))}function D(t){var e=t._readableState;l("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,K(t)}function q(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(U,t,e))}function U(t,e){while(!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Z(t){l("readable nexttick read 0"),t.read(0)}function W(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(H,t,e))}function H(t,e){l("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),K(t),e.flowing&&!e.reading&&t.read(0)}function K(t){var e=t._readableState;l("flow",e.flowing);while(e.flowing&&null!==t.read());}function V(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function G(t){var e=t._readableState;l("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(X,e,t))}function X(t,e){if(l("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function Y(t,e){for(var i=0,r=t.length;i=e.highWaterMark:e.length>0)||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?G(this):j(this),null;if(t=C(t,e),0===t&&e.ended)return 0===e.length&&G(this),null;var r,n=e.needReadable;return l("need readable",n),(0===e.length||e.length-t0?V(t,e):null,null===r?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&G(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(t){E(this,new S("_read()"))},T.prototype.pipe=function(t,e){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t);break}r.pipesCount+=1,l("pipe count=%d opts=%j",r.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr,a=s?u:v;function h(t,e){l("onunpipe"),t===i&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,c())}function u(){l("onend"),t.end()}r.endEmitted?n.nextTick(a):i.once("end",a),t.on("unpipe",h);var f=z(i);t.on("drain",f);var d=!1;function c(){l("cleanup"),t.removeListener("close",b),t.removeListener("finish",g),t.removeListener("drain",f),t.removeListener("error",m),t.removeListener("unpipe",h),i.removeListener("end",u),i.removeListener("end",v),i.removeListener("data",p),d=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||f()}function p(e){l("ondata");var n=t.write(e);l("dest.write",n),!1===n&&((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==Y(r.pipes,t))&&!d&&(l("false write response, pause",r.awaitDrain),r.awaitDrain++),i.pause())}function m(e){l("onerror",e),v(),t.removeListener("error",m),0===o(t,"error")&&E(t,e)}function b(){t.removeListener("finish",g),v()}function g(){l("onfinish"),t.removeListener("close",b),v()}function v(){l("unpipe"),i.unpipe(t)}return i.on("data",p),A(t,"error",m),t.once("close",b),t.once("finish",g),t.emit("pipe",i),r.flowing||(l("pipe resume"),i.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==r.flowing&&this.resume()):"readable"===t&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,l("on readable",r.length,r.reading),r.length?j(this):r.reading||n.nextTick(Z,this))),i},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var i=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(F,this),i},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(F,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!t.readableListening,W(this,t)),t.paused=!1,this},T.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(l("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){if(l("wrapped data"),i.decoder&&(n=i.decoder.write(n)),(!i.objectMode||null!==n&&void 0!==n)&&(i.objectMode||n&&n.length)){var o=e.push(n);o||(r=!0,t.pause())}})),t)void 0===this[n]&&"function"===typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var o=0;o-1))throw new k(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(t,e,i){i(new v("_write()"))},R.prototype._writev=null,R.prototype.end=function(t,e,i){var r=this._writableState;return"function"===typeof t?(i=t,t=null,e=null):"function"===typeof e&&(i=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||W(this,r,i),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),R.prototype.destroy=c.destroy,R.prototype._undestroy=c.undestroy,R.prototype._destroy=function(t,e){e(t)}},8972:function(t,e,i){"use strict";var r,n=i(6027);function o(t,e,i){return e=s(e),e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t){var e=a(t,"string");return"symbol"===typeof e?e:String(e)}function a(t,e){if("object"!==typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var h=i(7930),u=Symbol("lastResolve"),f=Symbol("lastReject"),l=Symbol("error"),d=Symbol("ended"),c=Symbol("lastPromise"),p=Symbol("handlePromise"),m=Symbol("stream");function b(t,e){return{value:t,done:e}}function g(t){var e=t[u];if(null!==e){var i=t[m].read();null!==i&&(t[c]=null,t[u]=null,t[f]=null,e(b(i,!1)))}}function v(t){n.nextTick(g,t)}function y(t,e){return function(i,r){t.then((function(){e[d]?i(b(void 0,!0)):e[p](i,r)}),r)}}var w=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((r={get stream(){return this[m]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[d])return Promise.resolve(b(void 0,!0));if(this[m].destroyed)return new Promise((function(e,i){n.nextTick((function(){t[l]?i(t[l]):e(b(void 0,!0))}))}));var i,r=this[c];if(r)i=new Promise(y(r,this));else{var o=this[m].read();if(null!==o)return Promise.resolve(b(o,!1));i=new Promise(this[p])}return this[c]=i,i}},o(r,Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var t=this;return new Promise((function(e,i){t[m].destroy(null,(function(t){t?i(t):e(b(void 0,!0))}))}))})),r),w),M=function(t){var e,i=Object.create(_,(e={},o(e,m,{value:t,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,f,{value:null,writable:!0}),o(e,l,{value:null,writable:!0}),o(e,d,{value:t._readableState.endEmitted,writable:!0}),o(e,p,{value:function(t,e){var r=i[m].read();r?(i[c]=null,i[u]=null,i[f]=null,t(b(r,!1))):(i[u]=t,i[f]=e)},writable:!0}),e));return i[c]=null,h(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=i[f];return null!==e&&(i[c]=null,i[u]=null,i[f]=null,e(t)),void(i[l]=t)}var r=i[u];null!==r&&(i[c]=null,i[u]=null,i[f]=null,r(b(void 0,!0))),i[d]=!0})),t.on("readable",v.bind(null,i)),i};t.exports=M},7754:function(t,e,i){"use strict";function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function n(t){for(var e=1;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";var e=this.head,i=""+e.data;while(e=e.next)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return d.alloc(0);var e=d.allocUnsafe(t>>>0),i=this.head,r=0;while(i)b(i.data,e,r),r+=i.data.length,i=i.next;return e}},{key:"consume",value:function(t,e){var i;return tn.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),t-=o,0===t){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=d.allocUnsafe(t),i=this.head,r=1;i.data.copy(e),t-=i.data.length;while(i=i.next){var n=i.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),t-=o,0===t){o===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(o));break}++r}return this.length-=r,e}},{key:m,value:function(t,e){return p(this,n(n({},e),{},{depth:0,customInspect:!1}))}}]),t}()},7772:function(t,e,i){"use strict";var r=i(6027);function n(t,e){var i=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(h,this,t)):r.nextTick(h,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?i._writableState?i._writableState.errorEmitted?r.nextTick(s,i):(i._writableState.errorEmitted=!0,r.nextTick(o,i,t)):r.nextTick(o,i,t):e?(r.nextTick(s,i),e(t)):r.nextTick(s,i)})),this)}function o(t,e){h(t,e),s(t)}function s(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function a(){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 h(t,e){t.emit("error",e)}function u(t,e){var i=t._readableState,r=t._writableState;i&&i.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}t.exports={destroy:n,undestroy:a,errorOrDestroy:u}},7930:function(t,e,i){"use strict";var r=i(9937).q.ERR_STREAM_PREMATURE_CLOSE;function n(t){var e=!1;return function(){if(!e){e=!0;for(var i=arguments.length,r=new Array(i),n=0;n0;return f(t,s,a,(function(t){r||(r=t),t&&o.forEach(l),s||(o.forEach(l),n(r))}))}));return e.reduce(d)}t.exports=p},2781:function(t,e,i){"use strict";var r=i(9937).q.ERR_INVALID_OPT_VALUE;function n(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}function o(t,e,i,o){var s=n(e,o,i);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0){var a=o?i:"highWaterMark";throw new r(a,s)}return Math.floor(s)}return t.objectMode?16:16384}t.exports={getHighWaterMark:o}},6072:function(t,e,i){t.exports=i(3793).EventEmitter},1295:function(t,e,i){e=t.exports=i(719),e.Stream=e,e.Readable=e,e.Writable=i(1603),e.Duplex=i(1557),e.Transform=i(2610),e.PassThrough=i(2885),e.finished=i(7930),e.pipeline=i(5920)},8730:function(t,e,i){var r=e;r.utils=i(3610),r.common=i(9291),r.sha=i(2762),r.ripemd=i(97),r.hmac=i(4133),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},9291:function(t,e,i){"use strict";var r=i(3610),n=i(4961);function o(){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}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.length%this._delta8;this.pending=t.slice(t.length-i,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-i,this.endian);for(var n=0;n>>24&255,r[n++]=t>>>16&255,r[n++]=t>>>8&255,r[n++]=255&t}else for(r[n++]=255&t,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,o=8;othis.blockSize&&(t=(new this.Hash).update(t).digest()),n(t.length<=this.blockSize);for(var e=t.length;e>>3}function d(t){return n(t,17)^n(t,19)^t>>>10}e.ft_1=o,e.ch32=s,e.maj32=a,e.p32=h,e.s0_256=u,e.s1_256=f,e.g0_256=l,e.g1_256=d},3610:function(t,e,i){"use strict";i(7658);var r=i(4961),n=i(1923);function o(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function s(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"===typeof t)if(e){if("hex"===e)for(t=t.replace(/[^a-z0-9]+/gi,""),t.length%2!==0&&(t="0"+t),n=0;n>6|192,i[r++]=63&s|128):o(t,n)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++n)),i[r++]=s>>18|240,i[r++]=s>>12&63|128,i[r++]=s>>6&63|128,i[r++]=63&s|128):(i[r++]=s>>12|224,i[r++]=s>>6&63|128,i[r++]=63&s|128)}else for(n=0;n>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24;return e>>>0}function u(t,e){for(var i="",r=0;r>>0}return s}function c(t,e){for(var i=new Array(4*t.length),r=0,n=0;r>>24,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=255&o):(i[n+3]=o>>>24,i[n+2]=o>>>16&255,i[n+1]=o>>>8&255,i[n]=255&o)}return i}function p(t,e){return t>>>e|t<<32-e}function m(t,e){return t<>>32-e}function b(t,e){return t+e>>>0}function g(t,e,i){return t+e+i>>>0}function v(t,e,i,r){return t+e+i+r>>>0}function y(t,e,i,r,n){return t+e+i+r+n>>>0}function w(t,e,i,r){var n=t[e],o=t[e+1],s=r+o>>>0,a=(s>>0,t[e+1]=s}function _(t,e,i,r){var n=e+r>>>0,o=(n>>0}function M(t,e,i,r){var n=e+r;return n>>>0}function S(t,e,i,r,n,o,s,a){var h=0,u=e;u=u+r>>>0,h+=u>>0,h+=u>>0,h+=u>>0}function k(t,e,i,r,n,o,s,a){var h=e+r+o+a;return h>>>0}function E(t,e,i,r,n,o,s,a,h,u){var f=0,l=e;l=l+r>>>0,f+=l>>0,f+=l>>0,f+=l>>0,f+=l>>0}function x(t,e,i,r,n,o,s,a,h,u){var f=e+r+o+a+u;return f>>>0}function A(t,e,i){var r=e<<32-i|t>>>i;return r>>>0}function R(t,e,i){var r=t<<32-i|e>>>i;return r>>>0}function T(t,e,i){return t>>>i}function I(t,e,i){var r=t<<32-i|e>>>i;return r>>>0}e.inherits=n,e.toArray=s,e.toHex=a,e.htonl=h,e.toHex32=u,e.zero2=f,e.zero8=l,e.join32=d,e.split32=c,e.rotr32=p,e.rotl32=m,e.sum32=b,e.sum32_3=g,e.sum32_4=v,e.sum32_5=y,e.sum64=w,e.sum64_hi=_,e.sum64_lo=M,e.sum64_4_hi=S,e.sum64_4_lo=k,e.sum64_5_hi=E,e.sum64_5_lo=x,e.rotr64_hi=A,e.rotr64_lo=R,e.shr64_hi=T,e.shr64_lo=I},2570:function(t,e,i){"use strict";var r=i(8730),n=i(6605),o=i(4961);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=n.toArray(t.entropy,t.entropyEnc||"hex"),i=n.toArray(t.nonce,t.nonceEnc||"hex"),r=n.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,i,r)}t.exports=s,s.prototype._init=function(t,e,i){var r=t.concat(e).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1},s.prototype.generate=function(t,e,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(r=i,i=e,e=null),i&&(i=n.toArray(i,r||"hex"),this._update(i));var o=[];while(o.length>>32-e}function u(t,e,i,r,n,o,s){return h(t+(e&i|~e&r)+n+o|0,s)+e|0}function f(t,e,i,r,n,o,s){return h(t+(e&r|i&~r)+n+o|0,s)+e|0}function l(t,e,i,r,n,o,s){return h(t+(e^i^r)+n+o|0,s)+e|0}function d(t,e,i,r,n,o,s){return h(t+(i^(e|~r))+n+o|0,s)+e|0}r(a,n),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var i=this._a,r=this._b,n=this._c,o=this._d;i=u(i,r,n,o,t[0],3614090360,7),o=u(o,i,r,n,t[1],3905402710,12),n=u(n,o,i,r,t[2],606105819,17),r=u(r,n,o,i,t[3],3250441966,22),i=u(i,r,n,o,t[4],4118548399,7),o=u(o,i,r,n,t[5],1200080426,12),n=u(n,o,i,r,t[6],2821735955,17),r=u(r,n,o,i,t[7],4249261313,22),i=u(i,r,n,o,t[8],1770035416,7),o=u(o,i,r,n,t[9],2336552879,12),n=u(n,o,i,r,t[10],4294925233,17),r=u(r,n,o,i,t[11],2304563134,22),i=u(i,r,n,o,t[12],1804603682,7),o=u(o,i,r,n,t[13],4254626195,12),n=u(n,o,i,r,t[14],2792965006,17),r=u(r,n,o,i,t[15],1236535329,22),i=f(i,r,n,o,t[1],4129170786,5),o=f(o,i,r,n,t[6],3225465664,9),n=f(n,o,i,r,t[11],643717713,14),r=f(r,n,o,i,t[0],3921069994,20),i=f(i,r,n,o,t[5],3593408605,5),o=f(o,i,r,n,t[10],38016083,9),n=f(n,o,i,r,t[15],3634488961,14),r=f(r,n,o,i,t[4],3889429448,20),i=f(i,r,n,o,t[9],568446438,5),o=f(o,i,r,n,t[14],3275163606,9),n=f(n,o,i,r,t[3],4107603335,14),r=f(r,n,o,i,t[8],1163531501,20),i=f(i,r,n,o,t[13],2850285829,5),o=f(o,i,r,n,t[2],4243563512,9),n=f(n,o,i,r,t[7],1735328473,14),r=f(r,n,o,i,t[12],2368359562,20),i=l(i,r,n,o,t[5],4294588738,4),o=l(o,i,r,n,t[8],2272392833,11),n=l(n,o,i,r,t[11],1839030562,16),r=l(r,n,o,i,t[14],4259657740,23),i=l(i,r,n,o,t[1],2763975236,4),o=l(o,i,r,n,t[4],1272893353,11),n=l(n,o,i,r,t[7],4139469664,16),r=l(r,n,o,i,t[10],3200236656,23),i=l(i,r,n,o,t[13],681279174,4),o=l(o,i,r,n,t[0],3936430074,11),n=l(n,o,i,r,t[3],3572445317,16),r=l(r,n,o,i,t[6],76029189,23),i=l(i,r,n,o,t[9],3654602809,4),o=l(o,i,r,n,t[12],3873151461,11),n=l(n,o,i,r,t[15],530742520,16),r=l(r,n,o,i,t[2],3299628645,23),i=d(i,r,n,o,t[0],4096336452,6),o=d(o,i,r,n,t[7],1126891415,10),n=d(n,o,i,r,t[14],2878612391,15),r=d(r,n,o,i,t[5],4237533241,21),i=d(i,r,n,o,t[12],1700485571,6),o=d(o,i,r,n,t[3],2399980690,10),n=d(n,o,i,r,t[10],4293915773,15),r=d(r,n,o,i,t[1],2240044497,21),i=d(i,r,n,o,t[8],1873313359,6),o=d(o,i,r,n,t[15],4264355552,10),n=d(n,o,i,r,t[6],2734768916,15),r=d(r,n,o,i,t[13],1309151649,21),i=d(i,r,n,o,t[4],4149444226,6),o=d(o,i,r,n,t[11],3174756917,10),n=d(n,o,i,r,t[2],718787259,15),r=d(r,n,o,i,t[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+o|0},a.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 t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},8529:function(t,e,i){var r=i(1863),n=i(1482);function o(t){this.rand=t||new n.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),i=Math.ceil(e/8);do{var n=new r(this.rand.generate(i))}while(n.cmp(t)>=0);return n},o.prototype._randrange=function(t,e){var i=e.sub(t);return t.add(this._randbelow(i))},o.prototype.test=function(t,e,i){var n=t.bitLength(),o=r.mont(t),s=new r(1).toRed(o);e||(e=Math.max(1,n/48|0));for(var a=t.subn(1),h=0;!a.testn(h);h++);for(var u=t.shrn(h),f=a.toRed(o),l=!0;e>0;e--){var d=this._randrange(new r(2),a);i&&i(d);var c=d.toRed(o).redPow(u);if(0!==c.cmp(s)&&0!==c.cmp(f)){for(var p=1;p0;e--){var f=this._randrange(new r(2),s),l=t.gcd(f);if(0!==l.cmpn(1))return l;var d=f.toRed(n).redPow(h);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var c=1;c=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=a(t,i);return i-1>=e&&(r|=a(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"===typeof t)return this._initNumber(t,e,i);if("object"===typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var n=0;"-"===t[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=h(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else{var a=t.length-e;for(r=a%2===0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8}this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,a=Math.min(o,o-s)+i,h=0,f=i;f1&&0===this.words[this.length-1])this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","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"],l=[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],d=[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];function c(t){for(var e=new Array(t.bitLength()),i=0;i>>n}return e}function p(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;i.words[0]=a;for(var u=1;u>>26,l=67108863&h,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;n=0|t.words[p],o=0|e.words[c],s=n*o+l,f+=s/67108864|0,l=67108863&s}i.words[u]=0|l,h=0|f}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(t=t||10,e=0|e||1,16===t||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215,i=0!==o||s!==this.length-1?f[6-h.length]+h+i:h+i,n+=2,n>=26&&(n-=26,s--)}0!==o&&(i=o.toString(16)+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],c=d[t];i="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(c).toString(t);p=p.idivn(c),i=p.isZero()?m+i:f[u-m.length]+m+i}this.isZero()&&(i="0"+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0===(8191&e)&&(i+=13,e>>>=13),0===(127&e)&&(i+=7,e>>>=7),0===(15&e)&&(i+=4,e>>>=4),0===(3&e)&&(i+=2,e>>>=2),0===(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,c=0|s[1],p=8191&c,m=c>>>13,b=0|s[2],g=8191&b,v=b>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,k=M>>>13,E=0|s[5],x=8191&E,A=E>>>13,R=0|s[6],T=8191&R,I=R>>>13,L=0|s[7],B=8191&L,O=L>>>13,N=0|s[8],C=8191&N,P=N>>>13,j=0|s[9],D=8191&j,q=j>>>13,U=0|a[0],z=8191&U,F=U>>>13,Z=0|a[1],W=8191&Z,H=Z>>>13,K=0|a[2],V=8191&K,G=K>>>13,X=0|a[3],Y=8191&X,$=X>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],it=8191&et,rt=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,dt=ft>>>13,ct=0|a[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19,r=Math.imul(l,z),n=Math.imul(l,F),n=n+Math.imul(d,z)|0,o=Math.imul(d,F);var bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(p,z),n=Math.imul(p,F),n=n+Math.imul(m,z)|0,o=Math.imul(m,F),r=r+Math.imul(l,W)|0,n=n+Math.imul(l,H)|0,n=n+Math.imul(d,W)|0,o=o+Math.imul(d,H)|0;var gt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,z),n=Math.imul(g,F),n=n+Math.imul(v,z)|0,o=Math.imul(v,F),r=r+Math.imul(p,W)|0,n=n+Math.imul(p,H)|0,n=n+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,r=r+Math.imul(l,V)|0,n=n+Math.imul(l,G)|0,n=n+Math.imul(d,V)|0,o=o+Math.imul(d,G)|0;var vt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),n=Math.imul(w,F),n=n+Math.imul(_,z)|0,o=Math.imul(_,F),r=r+Math.imul(g,W)|0,n=n+Math.imul(g,H)|0,n=n+Math.imul(v,W)|0,o=o+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,n=n+Math.imul(p,G)|0,n=n+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,r=r+Math.imul(l,Y)|0,n=n+Math.imul(l,$)|0,n=n+Math.imul(d,Y)|0,o=o+Math.imul(d,$)|0;var yt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=Math.imul(S,F),n=n+Math.imul(k,z)|0,o=Math.imul(k,F),r=r+Math.imul(w,W)|0,n=n+Math.imul(w,H)|0,n=n+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,r=r+Math.imul(g,V)|0,n=n+Math.imul(g,G)|0,n=n+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,Y)|0,n=n+Math.imul(p,$)|0,n=n+Math.imul(m,Y)|0,o=o+Math.imul(m,$)|0,r=r+Math.imul(l,Q)|0,n=n+Math.imul(l,tt)|0,n=n+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,z),n=Math.imul(x,F),n=n+Math.imul(A,z)|0,o=Math.imul(A,F),r=r+Math.imul(S,W)|0,n=n+Math.imul(S,H)|0,n=n+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(w,V)|0,n=n+Math.imul(w,G)|0,n=n+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(g,Y)|0,n=n+Math.imul(g,$)|0,n=n+Math.imul(v,Y)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Q)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(l,it)|0,n=n+Math.imul(l,rt)|0,n=n+Math.imul(d,it)|0,o=o+Math.imul(d,rt)|0;var _t=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,z),n=Math.imul(T,F),n=n+Math.imul(I,z)|0,o=Math.imul(I,F),r=r+Math.imul(x,W)|0,n=n+Math.imul(x,H)|0,n=n+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,r=r+Math.imul(S,V)|0,n=n+Math.imul(S,G)|0,n=n+Math.imul(k,V)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,Y)|0,n=n+Math.imul(w,$)|0,n=n+Math.imul(_,Y)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(g,Q)|0,n=n+Math.imul(g,tt)|0,n=n+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,it)|0,n=n+Math.imul(p,rt)|0,n=n+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(l,ot)|0,n=n+Math.imul(l,st)|0,n=n+Math.imul(d,ot)|0,o=o+Math.imul(d,st)|0;var Mt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,z),n=Math.imul(B,F),n=n+Math.imul(O,z)|0,o=Math.imul(O,F),r=r+Math.imul(T,W)|0,n=n+Math.imul(T,H)|0,n=n+Math.imul(I,W)|0,o=o+Math.imul(I,H)|0,r=r+Math.imul(x,V)|0,n=n+Math.imul(x,G)|0,n=n+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(S,Y)|0,n=n+Math.imul(S,$)|0,n=n+Math.imul(k,Y)|0,o=o+Math.imul(k,$)|0,r=r+Math.imul(w,Q)|0,n=n+Math.imul(w,tt)|0,n=n+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(g,it)|0,n=n+Math.imul(g,rt)|0,n=n+Math.imul(v,it)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,n=n+Math.imul(p,st)|0,n=n+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(l,ht)|0,n=n+Math.imul(l,ut)|0,n=n+Math.imul(d,ht)|0,o=o+Math.imul(d,ut)|0;var St=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(C,z),n=Math.imul(C,F),n=n+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(B,W)|0,n=n+Math.imul(B,H)|0,n=n+Math.imul(O,W)|0,o=o+Math.imul(O,H)|0,r=r+Math.imul(T,V)|0,n=n+Math.imul(T,G)|0,n=n+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,Y)|0,n=n+Math.imul(x,$)|0,n=n+Math.imul(A,Y)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(S,Q)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,it)|0,n=n+Math.imul(w,rt)|0,n=n+Math.imul(_,it)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(g,ot)|0,n=n+Math.imul(g,st)|0,n=n+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,r=r+Math.imul(p,ht)|0,n=n+Math.imul(p,ut)|0,n=n+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0,r=r+Math.imul(l,lt)|0,n=n+Math.imul(l,dt)|0,n=n+Math.imul(d,lt)|0,o=o+Math.imul(d,dt)|0;var kt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(D,z),n=Math.imul(D,F),n=n+Math.imul(q,z)|0,o=Math.imul(q,F),r=r+Math.imul(C,W)|0,n=n+Math.imul(C,H)|0,n=n+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(B,V)|0,n=n+Math.imul(B,G)|0,n=n+Math.imul(O,V)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(T,Y)|0,n=n+Math.imul(T,$)|0,n=n+Math.imul(I,Y)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(x,Q)|0,n=n+Math.imul(x,tt)|0,n=n+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(S,it)|0,n=n+Math.imul(S,rt)|0,n=n+Math.imul(k,it)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,n=n+Math.imul(w,st)|0,n=n+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(g,ht)|0,n=n+Math.imul(g,ut)|0,n=n+Math.imul(v,ht)|0,o=o+Math.imul(v,ut)|0,r=r+Math.imul(p,lt)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0,r=r+Math.imul(l,pt)|0,n=n+Math.imul(l,mt)|0,n=n+Math.imul(d,pt)|0,o=o+Math.imul(d,mt)|0;var Et=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(D,W),n=Math.imul(D,H),n=n+Math.imul(q,W)|0,o=Math.imul(q,H),r=r+Math.imul(C,V)|0,n=n+Math.imul(C,G)|0,n=n+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(B,Y)|0,n=n+Math.imul(B,$)|0,n=n+Math.imul(O,Y)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(T,Q)|0,n=n+Math.imul(T,tt)|0,n=n+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,it)|0,n=n+Math.imul(x,rt)|0,n=n+Math.imul(A,it)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(S,ot)|0,n=n+Math.imul(S,st)|0,n=n+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,r=r+Math.imul(w,ht)|0,n=n+Math.imul(w,ut)|0,n=n+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,r=r+Math.imul(g,lt)|0,n=n+Math.imul(g,dt)|0,n=n+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0,r=r+Math.imul(p,pt)|0,n=n+Math.imul(p,mt)|0,n=n+Math.imul(m,pt)|0,o=o+Math.imul(m,mt)|0;var xt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(D,V),n=Math.imul(D,G),n=n+Math.imul(q,V)|0,o=Math.imul(q,G),r=r+Math.imul(C,Y)|0,n=n+Math.imul(C,$)|0,n=n+Math.imul(P,Y)|0,o=o+Math.imul(P,$)|0,r=r+Math.imul(B,Q)|0,n=n+Math.imul(B,tt)|0,n=n+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(T,it)|0,n=n+Math.imul(T,rt)|0,n=n+Math.imul(I,it)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,n=n+Math.imul(x,st)|0,n=n+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,r=r+Math.imul(S,ht)|0,n=n+Math.imul(S,ut)|0,n=n+Math.imul(k,ht)|0,o=o+Math.imul(k,ut)|0,r=r+Math.imul(w,lt)|0,n=n+Math.imul(w,dt)|0,n=n+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0,r=r+Math.imul(g,pt)|0,n=n+Math.imul(g,mt)|0,n=n+Math.imul(v,pt)|0,o=o+Math.imul(v,mt)|0;var At=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(D,Y),n=Math.imul(D,$),n=n+Math.imul(q,Y)|0,o=Math.imul(q,$),r=r+Math.imul(C,Q)|0,n=n+Math.imul(C,tt)|0,n=n+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(B,it)|0,n=n+Math.imul(B,rt)|0,n=n+Math.imul(O,it)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(T,ot)|0,n=n+Math.imul(T,st)|0,n=n+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(x,ht)|0,n=n+Math.imul(x,ut)|0,n=n+Math.imul(A,ht)|0,o=o+Math.imul(A,ut)|0,r=r+Math.imul(S,lt)|0,n=n+Math.imul(S,dt)|0,n=n+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0,r=r+Math.imul(w,pt)|0,n=n+Math.imul(w,mt)|0,n=n+Math.imul(_,pt)|0,o=o+Math.imul(_,mt)|0;var Rt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(D,Q),n=Math.imul(D,tt),n=n+Math.imul(q,Q)|0,o=Math.imul(q,tt),r=r+Math.imul(C,it)|0,n=n+Math.imul(C,rt)|0,n=n+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(B,ot)|0,n=n+Math.imul(B,st)|0,n=n+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(T,ht)|0,n=n+Math.imul(T,ut)|0,n=n+Math.imul(I,ht)|0,o=o+Math.imul(I,ut)|0,r=r+Math.imul(x,lt)|0,n=n+Math.imul(x,dt)|0,n=n+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0,r=r+Math.imul(S,pt)|0,n=n+Math.imul(S,mt)|0,n=n+Math.imul(k,pt)|0,o=o+Math.imul(k,mt)|0;var Tt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(D,it),n=Math.imul(D,rt),n=n+Math.imul(q,it)|0,o=Math.imul(q,rt),r=r+Math.imul(C,ot)|0,n=n+Math.imul(C,st)|0,n=n+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(B,ht)|0,n=n+Math.imul(B,ut)|0,n=n+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,r=r+Math.imul(T,lt)|0,n=n+Math.imul(T,dt)|0,n=n+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0,r=r+Math.imul(x,pt)|0,n=n+Math.imul(x,mt)|0,n=n+Math.imul(A,pt)|0,o=o+Math.imul(A,mt)|0;var It=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(D,ot),n=Math.imul(D,st),n=n+Math.imul(q,ot)|0,o=Math.imul(q,st),r=r+Math.imul(C,ht)|0,n=n+Math.imul(C,ut)|0,n=n+Math.imul(P,ht)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(B,lt)|0,n=n+Math.imul(B,dt)|0,n=n+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0,r=r+Math.imul(T,pt)|0,n=n+Math.imul(T,mt)|0,n=n+Math.imul(I,pt)|0,o=o+Math.imul(I,mt)|0;var Lt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(D,ht),n=Math.imul(D,ut),n=n+Math.imul(q,ht)|0,o=Math.imul(q,ut),r=r+Math.imul(C,lt)|0,n=n+Math.imul(C,dt)|0,n=n+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0,r=r+Math.imul(B,pt)|0,n=n+Math.imul(B,mt)|0,n=n+Math.imul(O,pt)|0,o=o+Math.imul(O,mt)|0;var Bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(D,lt),n=Math.imul(D,dt),n=n+Math.imul(q,lt)|0,o=Math.imul(q,dt),r=r+Math.imul(C,pt)|0,n=n+Math.imul(C,mt)|0,n=n+Math.imul(P,pt)|0,o=o+Math.imul(P,mt)|0;var Ot=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(D,pt),n=Math.imul(D,mt),n=n+Math.imul(q,pt)|0,o=Math.imul(q,mt);var Nt=(u+r|0)+((8191&n)<<13)|0;return u=(o+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=bt,h[1]=gt,h[2]=vt,h[3]=yt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=kt,h[9]=Et,h[10]=xt,h[11]=At,h[12]=Rt,h[13]=Tt,h[14]=It,h[15]=Lt,h[16]=Bt,h[17]=Ot,h[18]=Nt,0!==u&&(h[19]=u,i.length++),i};function b(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0,n+=s>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}function g(t,e,i){var r=new v;return r.mulp(t,e,i)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?b(this,t,e):g(this,t,e),i},v.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r>=1;return r},v.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=c(t);if(0===e.length)return new o(1);for(var i=this,r=0;r=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=this.length-t.length,r=this.clone(),n=t,s=0|n.words[n.length-1],a=this._countBits(s);i=26-a,0!==i&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var h,u=r.length-n.length;if("mod"!==e){h=new o(null),h.length=u+1,h.words=new Array(h.length);for(var f=0;f=0;d--){var c=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,d);while(0!==r.negative)c--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);h&&(h.words[d]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n=new o(1),s=new o(0),a=new o(0),h=new o(1),u=0;while(e.isEven()&&i.isEven())e.iushrn(1),i.iushrn(1),++u;var f=i.clone(),l=e.clone();while(!e.isZero()){for(var d=0,c=1;0===(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0){e.iushrn(d);while(d-- >0)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1)}for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0){i.iushrn(p);while(p-- >0)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1)}e.cmp(i)>=0?(e.isub(i),n.isub(a),s.isub(h)):(i.isub(e),a.isub(n),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n,s=new o(1),a=new o(0),h=i.clone();while(e.cmpn(1)>0&&i.cmpn(1)>0){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0){e.iushrn(u);while(u-- >0)s.isOdd()&&s.iadd(h),s.iushrn(1)}for(var l=0,d=1;0===(i.words[0]&d)&&l<26;++l,d<<=1);if(l>0){i.iushrn(l);while(l-- >0)a.isOdd()&&a.iadd(h),a.iushrn(1)}e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return n=0===e.cmpn(1)?s:a,n.cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);do{while(e.isEven())e.iushrn(1);while(i.isEven())i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}while(1);return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){rn&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),e=i.bitLength()}while(e>this.n);var r=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},n(_,w),_.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new M;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return y[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}var n=this.m.subn(1),s=0;while(!n.isZero()&&0===n.andln(1))s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new o(2*f*f).toRed(this);while(0!==this.pow(f,u).cmp(h))f.redIAdd(h);var l=this.pow(f,n),d=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=s;while(0!==c.cmp(a)){for(var m=c,b=0;0!==m.cmp(a);b++)m=m.redSqr();r(b=0;n--){for(var f=e.words[n],l=u-1;l>=0;l--){var d=f>>l&1;s!==r[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,h++,(h===i||0===n&&0===l)&&(s=this.mul(s,r[a]),h=0,a=0)):h=0}u=26}return s},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},n(x,E),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(t,this)},4961:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,i){if(t!=e)throw new Error(i||"Assertion failed: "+t+" != "+e)}},6605:function(t,e,i){"use strict";i(7658);var r=e;function n(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"!==typeof t){for(var r=0;r>8,s=255&n;o?i.push(o,s):i.push(s)}return i}function o(t){return 1===t.length?"0"+t:t}function s(t){for(var e="",i=0;i>>16&65535|0,s=0;while(0!==i){s=i>2e3?2e3:i,i-=s;do{n=n+e[r++]|0,o=o+n|0}while(--s);n%=65521,o%=65521}return n|o<<16|0}t.exports=e},3300:function(t){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},5906:function(t){"use strict";function e(){for(var t,e=[],i=0;i<256;i++){t=i;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[i]=t}return e}var i=e();function r(t,e,r,n){var o=i,s=n+r;t^=-1;for(var a=n;a>>8^o[255&(t^e[a])];return-1^t}t.exports=r},1672:function(t,e,i){"use strict";var r,n=i(8746),o=i(4191),s=i(5942),a=i(5906),h=i(7675),u=0,f=1,l=3,d=4,c=5,p=0,m=1,b=-2,g=-3,v=-5,y=-1,w=1,_=2,M=3,S=4,k=0,E=2,x=8,A=9,R=15,T=8,I=29,L=256,B=L+1+I,O=30,N=19,C=2*B+1,P=15,j=3,D=258,q=D+j+1,U=32,z=42,F=69,Z=73,W=91,H=103,K=113,V=666,G=1,X=2,Y=3,$=4,J=3;function Q(t,e){return t.msg=h[e],e}function tt(t){return(t<<1)-(t>4?9:0)}function et(t){var e=t.length;while(--e>=0)t[e]=0}function it(t){var e=t.state,i=e.pending;i>t.avail_out&&(i=t.avail_out),0!==i&&(n.arraySet(t.output,e.pending_buf,e.pending_out,i,t.next_out),t.next_out+=i,e.pending_out+=i,t.total_out+=i,t.avail_out-=i,e.pending-=i,0===e.pending&&(e.pending_out=0))}function rt(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,it(t.strm)}function nt(t,e){t.pending_buf[t.pending++]=e}function ot(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function st(t,e,i,r){var o=t.avail_in;return o>r&&(o=r),0===o?0:(t.avail_in-=o,n.arraySet(e,t.input,t.next_in,o,i),1===t.state.wrap?t.adler=s(t.adler,e,o,i):2===t.state.wrap&&(t.adler=a(t.adler,e,o,i)),t.next_in+=o,t.total_in+=o,o)}function at(t,e){var i,r,n=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,h=t.strstart>t.w_size-q?t.strstart-(t.w_size-q):0,u=t.window,f=t.w_mask,l=t.prev,d=t.strstart+D,c=u[o+s-1],p=u[o+s];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(i=e,u[i+s]===p&&u[i+s-1]===c&&u[i]===u[o]&&u[++i]===u[o+1]){o+=2,i++;do{}while(u[++o]===u[++i]&&u[++o]===u[++i]&&u[++o]===u[++i]&&u[++o]===u[++i]&&u[++o]===u[++i]&&u[++o]===u[++i]&&u[++o]===u[++i]&&u[++o]===u[++i]&&os){if(t.match_start=e,s=r,r>=a)break;c=u[o+s-1],p=u[o+s]}}}while((e=l[e&f])>h&&0!==--n);return s<=t.lookahead?s:t.lookahead}function ht(t){var e,i,r,o,s,a=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-q)){n.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,i=t.hash_size,e=i;do{r=t.head[--e],t.head[e]=r>=a?r-a:0}while(--i);i=a,e=i;do{r=t.prev[--e],t.prev[e]=r>=a?r-a:0}while(--i);o+=a}if(0===t.strm.avail_in)break;if(i=st(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=i,t.lookahead+t.insert>=j){s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ht(t),0===t.lookahead&&e===u)return G;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+i;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,rt(t,!1),0===t.strm.avail_out))return G;if(t.strstart-t.block_start>=t.w_size-q&&(rt(t,!1),0===t.strm.avail_out))return G}return t.insert=0,e===d?(rt(t,!0),0===t.strm.avail_out?Y:$):(t.strstart>t.block_start&&(rt(t,!1),t.strm.avail_out),G)}function ft(t,e){for(var i,r;;){if(t.lookahead=j&&(t.ins_h=(t.ins_h<=j)if(r=o._tr_tally(t,t.strstart-t.match_start,t.match_length-j),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=j){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=j&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=j-1)),t.prev_length>=j&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-j,r=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-j),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=(t.ins_h<=j&&t.strstart>0&&(n=t.strstart-1,r=a[n],r===a[++n]&&r===a[++n]&&r===a[++n])){s=t.strstart+D;do{}while(r===a[++n]&&r===a[++n]&&r===a[++n]&&r===a[++n]&&r===a[++n]&&r===a[++n]&&r===a[++n]&&r===a[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=j?(i=o._tr_tally(t,1,t.match_length-j),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(rt(t,!1),0===t.strm.avail_out))return G}return t.insert=0,e===d?(rt(t,!0),0===t.strm.avail_out?Y:$):t.last_lit&&(rt(t,!1),0===t.strm.avail_out)?G:X}function ct(t,e){for(var i;;){if(0===t.lookahead&&(ht(t),0===t.lookahead)){if(e===u)return G;break}if(t.match_length=0,i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(rt(t,!1),0===t.strm.avail_out))return G}return t.insert=0,e===d?(rt(t,!0),0===t.strm.avail_out?Y:$):t.last_lit&&(rt(t,!1),0===t.strm.avail_out)?G:X}function pt(t,e,i,r,n){this.good_length=t,this.max_lazy=e,this.nice_length=i,this.max_chain=r,this.func=n}function mt(t){t.window_size=2*t.w_size,et(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=j-1,t.match_available=0,t.ins_h=0}function bt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new n.Buf16(2*C),this.dyn_dtree=new n.Buf16(2*(2*O+1)),this.bl_tree=new n.Buf16(2*(2*N+1)),et(this.dyn_ltree),et(this.dyn_dtree),et(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(P+1),this.heap=new n.Buf16(2*B+1),et(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(2*B+1),et(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function gt(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=E,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?z:K,t.adler=2===e.wrap?0:1,e.last_flush=u,o._tr_init(e),p):Q(t,b)}function vt(t){var e=gt(t);return e===p&&mt(t.state),e}function yt(t,e){return t&&t.state?2!==t.state.wrap?b:(t.state.gzhead=e,p):b}function wt(t,e,i,r,o,s){if(!t)return b;var a=1;if(e===y&&(e=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),o<1||o>A||i!==x||r<8||r>15||e<0||e>9||s<0||s>S)return Q(t,b);8===r&&(r=9);var h=new bt;return t.state=h,h.strm=t,h.wrap=a,h.gzhead=null,h.w_bits=r,h.w_size=1<c||e<0)return t?Q(t,b):b;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||n.status===V&&e!==d)return Q(t,0===t.avail_out?v:b);if(n.strm=t,i=n.last_flush,n.last_flush=e,n.status===z)if(2===n.wrap)t.adler=0,nt(n,31),nt(n,139),nt(n,8),n.gzhead?(nt(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),nt(n,255&n.gzhead.time),nt(n,n.gzhead.time>>8&255),nt(n,n.gzhead.time>>16&255),nt(n,n.gzhead.time>>24&255),nt(n,9===n.level?2:n.strategy>=_||n.level<2?4:0),nt(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(nt(n,255&n.gzhead.extra.length),nt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=a(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=F):(nt(n,0),nt(n,0),nt(n,0),nt(n,0),nt(n,0),nt(n,9===n.level?2:n.strategy>=_||n.level<2?4:0),nt(n,J),n.status=K);else{var g=x+(n.w_bits-8<<4)<<8,y=-1;y=n.strategy>=_||n.level<2?0:n.level<6?1:6===n.level?2:3,g|=y<<6,0!==n.strstart&&(g|=U),g+=31-g%31,n.status=K,ot(n,g),0!==n.strstart&&(ot(n,t.adler>>>16),ot(n,65535&t.adler)),t.adler=1}if(n.status===F)if(n.gzhead.extra){s=n.pending;while(n.gzindex<(65535&n.gzhead.extra.length)){if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>s&&(t.adler=a(t.adler,n.pending_buf,n.pending-s,s)),it(t),s=n.pending,n.pending===n.pending_buf_size))break;nt(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++}n.gzhead.hcrc&&n.pending>s&&(t.adler=a(t.adler,n.pending_buf,n.pending-s,s)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Z)}else n.status=Z;if(n.status===Z)if(n.gzhead.name){s=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>s&&(t.adler=a(t.adler,n.pending_buf,n.pending-s,s)),it(t),s=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindexs&&(t.adler=a(t.adler,n.pending_buf,n.pending-s,s)),0===h&&(n.gzindex=0,n.status=W)}else n.status=W;if(n.status===W)if(n.gzhead.comment){s=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>s&&(t.adler=a(t.adler,n.pending_buf,n.pending-s,s)),it(t),s=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindexs&&(t.adler=a(t.adler,n.pending_buf,n.pending-s,s)),0===h&&(n.status=H)}else n.status=H;if(n.status===H&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&it(t),n.pending+2<=n.pending_buf_size&&(nt(n,255&t.adler),nt(n,t.adler>>8&255),t.adler=0,n.status=K)):n.status=K),0!==n.pending){if(it(t),0===t.avail_out)return n.last_flush=-1,p}else if(0===t.avail_in&&tt(e)<=tt(i)&&e!==d)return Q(t,v);if(n.status===V&&0!==t.avail_in)return Q(t,v);if(0!==t.avail_in||0!==n.lookahead||e!==u&&n.status!==V){var w=n.strategy===_?ct(n,e):n.strategy===M?dt(n,e):r[n.level].func(n,e);if(w!==Y&&w!==$||(n.status=V),w===G||w===Y)return 0===t.avail_out&&(n.last_flush=-1),p;if(w===X&&(e===f?o._tr_align(n):e!==c&&(o._tr_stored_block(n,0,0,!1),e===l&&(et(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),it(t),0===t.avail_out))return n.last_flush=-1,p}return e!==d?p:n.wrap<=0?m:(2===n.wrap?(nt(n,255&t.adler),nt(n,t.adler>>8&255),nt(n,t.adler>>16&255),nt(n,t.adler>>24&255),nt(n,255&t.total_in),nt(n,t.total_in>>8&255),nt(n,t.total_in>>16&255),nt(n,t.total_in>>24&255)):(ot(n,t.adler>>>16),ot(n,65535&t.adler)),it(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?p:m)}function St(t){var e;return t&&t.state?(e=t.state.status,e!==z&&e!==F&&e!==Z&&e!==W&&e!==H&&e!==K&&e!==V?Q(t,b):(t.state=null,e===K?Q(t,g):p)):b}function kt(t,e){var i,r,o,a,h,u,f,l,d=e.length;if(!t||!t.state)return b;if(i=t.state,a=i.wrap,2===a||1===a&&i.status!==z||i.lookahead)return b;1===a&&(t.adler=s(t.adler,e,d,0)),i.wrap=0,d>=i.w_size&&(0===a&&(et(i.head),i.strstart=0,i.block_start=0,i.insert=0),l=new n.Buf8(i.w_size),n.arraySet(l,e,d-i.w_size,i.w_size,0),e=l,d=i.w_size),h=t.avail_in,u=t.next_in,f=t.input,t.avail_in=d,t.next_in=0,t.input=e,ht(i);while(i.lookahead>=j){r=i.strstart,o=i.lookahead-(j-1);do{i.ins_h=(i.ins_h<>>24,m>>>=M,b-=M,M=_>>>16&255,0===M)R[a++]=65535&_;else{if(!(16&M)){if(0===(64&M)){_=g[(65535&_)+(m&(1<>>=M,b-=M),b<15&&(m+=A[o++]<>>24,m>>>=M,b-=M,M=_>>>16&255,!(16&M)){if(0===(64&M)){_=v[(65535&_)+(m&(1<f){t.msg="invalid distance too far back",n.mode=e;break t}if(m>>>=M,b-=M,M=a-h,k>M){if(M=k-M,M>d&&n.sane){t.msg="invalid distance too far back",n.mode=e;break t}if(E=0,x=p,0===c){if(E+=l-M,M2)R[a++]=x[E++],R[a++]=x[E++],R[a++]=x[E++],S-=3;S&&(R[a++]=x[E++],S>1&&(R[a++]=x[E++]))}else{E=a-k;do{R[a++]=R[E++],R[a++]=R[E++],R[a++]=R[E++],S-=3}while(S>2);S&&(R[a++]=R[E++],S>1&&(R[a++]=R[E++]))}break}}break}}while(o>3,o-=S,b-=S<<3,m&=(1<>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function ot(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function st(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=M,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new r.Buf32(tt),e.distcode=e.distdyn=new r.Buf32(et),e.sane=1,e.back=-1,p):g}function at(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,st(t)):g}function ht(t,e){var i,r;return t&&t.state?(r=t.state,e<0?(i=0,e=-e):(i=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?g:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=i,r.wbits=e,at(t))):g}function ut(t,e){var i,r;return t?(r=new ot,t.state=r,r.window=null,i=ht(t,e),i!==p&&(t.state=null),i):g}function ft(t){return ut(t,rt)}var lt,dt,ct=!0;function pt(t){if(ct){var e;lt=new r.Buf32(512),dt=new r.Buf32(32),e=0;while(e<144)t.lens[e++]=8;while(e<256)t.lens[e++]=9;while(e<280)t.lens[e++]=7;while(e<288)t.lens[e++]=8;a(u,t.lens,0,288,lt,0,t.work,{bits:9}),e=0;while(e<32)t.lens[e++]=5;a(f,t.lens,0,32,dt,0,t.work,{bits:5}),ct=!1}t.lencode=lt,t.lenbits=9,t.distcode=dt,t.distbits=5}function mt(t,e,i,n){var o,s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(r.arraySet(s.window,e,i-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(o=s.wsize-s.wnext,o>n&&(o=n),r.arraySet(s.window,e,i-n,o,s.wnext),n-=o,n?(r.arraySet(s.window,e,i-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,i.check=o(i.check,At,2,0),at=0,ht=0,i.mode=S;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&at)<<8)+(at>>8))%31){t.msg="incorrect header check",i.mode=$;break}if((15&at)!==_){t.msg="unknown compression method",i.mode=$;break}if(at>>>=4,ht-=4,Mt=8+(15&at),0===i.wbits)i.wbits=Mt;else if(Mt>i.wbits){t.msg="invalid window size",i.mode=$;break}i.dmax=1<>8&1),512&i.flags&&(At[0]=255&at,At[1]=at>>>8&255,i.check=o(i.check,At,2,0)),at=0,ht=0,i.mode=k;case k:while(ht<32){if(0===ot)break t;ot--,at+=tt[it++]<>>8&255,At[2]=at>>>16&255,At[3]=at>>>24&255,i.check=o(i.check,At,4,0)),at=0,ht=0,i.mode=E;case E:while(ht<16){if(0===ot)break t;ot--,at+=tt[it++]<>8),512&i.flags&&(At[0]=255&at,At[1]=at>>>8&255,i.check=o(i.check,At,2,0)),at=0,ht=0,i.mode=x;case x:if(1024&i.flags){while(ht<16){if(0===ot)break t;ot--,at+=tt[it++]<>>8&255,i.check=o(i.check,At,2,0)),at=0,ht=0}else i.head&&(i.head.extra=null);i.mode=A;case A:if(1024&i.flags&&(lt=i.length,lt>ot&&(lt=ot),lt&&(i.head&&(Mt=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),r.arraySet(i.head.extra,tt,it,lt,Mt)),512&i.flags&&(i.check=o(i.check,tt,lt,it)),ot-=lt,it+=lt,i.length-=lt),i.length))break t;i.length=0,i.mode=R;case R:if(2048&i.flags){if(0===ot)break t;lt=0;do{Mt=tt[it+lt++],i.head&&Mt&&i.length<65536&&(i.head.name+=String.fromCharCode(Mt))}while(Mt&<>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=O;break;case L:while(ht<32){if(0===ot)break t;ot--,at+=tt[it++]<>>=7&ht,ht-=7&ht,i.mode=G;break}while(ht<3){if(0===ot)break t;ot--,at+=tt[it++]<>>=1,ht-=1,3&at){case 0:i.mode=C;break;case 1:if(pt(i),i.mode=z,e===c){at>>>=2,ht-=2;break t}break;case 2:i.mode=D;break;case 3:t.msg="invalid block type",i.mode=$}at>>>=2,ht-=2;break;case C:at>>>=7&ht,ht-=7&ht;while(ht<32){if(0===ot)break t;ot--,at+=tt[it++]<>>16^65535)){t.msg="invalid stored block lengths",i.mode=$;break}if(i.length=65535&at,at=0,ht=0,i.mode=P,e===c)break t;case P:i.mode=j;case j:if(lt=i.length,lt){if(lt>ot&&(lt=ot),lt>st&&(lt=st),0===lt)break t;r.arraySet(et,tt,it,lt,rt),ot-=lt,it+=lt,st-=lt,rt+=lt,i.length-=lt;break}i.mode=O;break;case D:while(ht<14){if(0===ot)break t;ot--,at+=tt[it++]<>>=5,ht-=5,i.ndist=1+(31&at),at>>>=5,ht-=5,i.ncode=4+(15&at),at>>>=4,ht-=4,i.nlen>286||i.ndist>30){t.msg="too many length or distance symbols",i.mode=$;break}i.have=0,i.mode=q;case q:while(i.have>>=3,ht-=3}while(i.have<19)i.lens[Rt[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,kt={bits:i.lenbits},St=a(h,i.lens,0,19,i.lencode,0,i.work,kt),i.lenbits=kt.bits,St){t.msg="invalid code lengths set",i.mode=$;break}i.have=0,i.mode=U;case U:while(i.have>>24,gt=xt>>>16&255,vt=65535&xt,bt<=ht)break;if(0===ot)break t;ot--,at+=tt[it++]<>>=bt,ht-=bt,i.lens[i.have++]=vt;else{if(16===vt){Et=bt+2;while(ht>>=bt,ht-=bt,0===i.have){t.msg="invalid bit length repeat",i.mode=$;break}Mt=i.lens[i.have-1],lt=3+(3&at),at>>>=2,ht-=2}else if(17===vt){Et=bt+3;while(ht>>=bt,ht-=bt,Mt=0,lt=3+(7&at),at>>>=3,ht-=3}else{Et=bt+7;while(ht>>=bt,ht-=bt,Mt=0,lt=11+(127&at),at>>>=7,ht-=7}if(i.have+lt>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=$;break}while(lt--)i.lens[i.have++]=Mt}}if(i.mode===$)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=$;break}if(i.lenbits=9,kt={bits:i.lenbits},St=a(u,i.lens,0,i.nlen,i.lencode,0,i.work,kt),i.lenbits=kt.bits,St){t.msg="invalid literal/lengths set",i.mode=$;break}if(i.distbits=6,i.distcode=i.distdyn,kt={bits:i.distbits},St=a(f,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,kt),i.distbits=kt.bits,St){t.msg="invalid distances set",i.mode=$;break}if(i.mode=z,e===c)break t;case z:i.mode=F;case F:if(ot>=6&&st>=258){t.next_out=rt,t.avail_out=st,t.next_in=it,t.avail_in=ot,i.hold=at,i.bits=ht,s(t,ft),rt=t.next_out,et=t.output,st=t.avail_out,it=t.next_in,tt=t.input,ot=t.avail_in,at=i.hold,ht=i.bits,i.mode===O&&(i.back=-1);break}for(i.back=0;;){if(xt=i.lencode[at&(1<>>24,gt=xt>>>16&255,vt=65535&xt,bt<=ht)break;if(0===ot)break t;ot--,at+=tt[it++]<>yt)],bt=xt>>>24,gt=xt>>>16&255,vt=65535&xt,yt+bt<=ht)break;if(0===ot)break t;ot--,at+=tt[it++]<>>=yt,ht-=yt,i.back+=yt}if(at>>>=bt,ht-=bt,i.back+=bt,i.length=vt,0===gt){i.mode=V;break}if(32>){i.back=-1,i.mode=O;break}if(64>){t.msg="invalid literal/length code",i.mode=$;break}i.extra=15>,i.mode=Z;case Z:if(i.extra){Et=i.extra;while(ht>>=i.extra,ht-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=W;case W:for(;;){if(xt=i.distcode[at&(1<>>24,gt=xt>>>16&255,vt=65535&xt,bt<=ht)break;if(0===ot)break t;ot--,at+=tt[it++]<>yt)],bt=xt>>>24,gt=xt>>>16&255,vt=65535&xt,yt+bt<=ht)break;if(0===ot)break t;ot--,at+=tt[it++]<>>=yt,ht-=yt,i.back+=yt}if(at>>>=bt,ht-=bt,i.back+=bt,64>){t.msg="invalid distance code",i.mode=$;break}i.offset=vt,i.extra=15>,i.mode=H;case H:if(i.extra){Et=i.extra;while(ht>>=i.extra,ht-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=$;break}i.mode=K;case K:if(0===st)break t;if(lt=ft-st,i.offset>lt){if(lt=i.offset-lt,lt>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=$;break}lt>i.wnext?(lt-=i.wnext,dt=i.wsize-lt):dt=i.wnext-lt,lt>i.length&&(lt=i.length),ct=i.window}else ct=et,dt=rt-i.offset,lt=i.length;lt>st&&(lt=st),st-=lt,i.length-=lt;do{et[rt++]=ct[dt++]}while(--lt);0===i.length&&(i.mode=F);break;case V:if(0===st)break t;et[rt++]=i.length,st--,i.mode=F;break;case G:if(i.wrap){while(ht<32){if(0===ot)break t;ot--,at|=tt[it++]<=1;B--)if(0!==z[B])break;if(O>B&&(O=B),0===B)return m[b++]=20971520,m[b++]=20971520,v.bits=1,0;for(L=1;L0&&(t===a||1!==B))return-1;for(F[1]=0,T=1;To||t===u&&j>s)return 1;for(;;){E=T-C,g[I]k?(x=Z[W+g[I]],A=q[U+g[I]]):(x=96,A=0),y=1<>C)+w]=E<<24|x<<16|A|0}while(0!==w);y=1<>=1;if(0!==y?(D&=y-1,D+=y):D=0,I++,0===--z[T]){if(T===B)break;T=e[i+g[I]]}if(T>O&&(D&M)!==_){0===C&&(C=O),S+=L,N=T-C,P=1<o||t===u&&j>s)return 1;_=D&M,m[_]=O<<24|N<<16|S-b|0}}return 0!==D&&(m[S+D]=T-C<<24|64<<16|0),v.bits=O,0}},7675:function(t){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},4191:function(t,e,i){"use strict";var r=i(8746),n=4,o=0,s=1,a=2;function h(t){var e=t.length;while(--e>=0)t[e]=0}var u=0,f=1,l=2,d=3,c=258,p=29,m=256,b=m+1+p,g=30,v=19,y=2*b+1,w=15,_=16,M=7,S=256,k=16,E=17,x=18,A=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L=512,B=new Array(2*(b+2));h(B);var O=new Array(2*g);h(O);var N=new Array(L);h(N);var C=new Array(c-d+1);h(C);var P=new Array(p);h(P);var j,D,q,U=new Array(g);function z(t,e,i,r,n){this.static_tree=t,this.extra_bits=e,this.extra_base=i,this.elems=r,this.max_length=n,this.has_stree=t&&t.length}function F(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function Z(t){return t<256?N[t]:N[256+(t>>>7)]}function W(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function H(t,e,i){t.bi_valid>_-i?(t.bi_buf|=e<>_-t.bi_valid,t.bi_valid+=i-_):(t.bi_buf|=e<>>=1,i<<=1}while(--e>0);return i>>>1}function G(t){16===t.bi_valid?(W(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function X(t,e){var i,r,n,o,s,a,h=e.dyn_tree,u=e.max_code,f=e.stat_desc.static_tree,l=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(o=0;o<=w;o++)t.bl_count[o]=0;for(h[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;ip&&(o=p,m++),h[2*r+1]=o,r>u||(t.bl_count[o]++,s=0,r>=c&&(s=d[r-c]),a=h[2*r],t.opt_len+=a*(o+s),l&&(t.static_len+=a*(f[2*r+1]+s)));if(0!==m){do{o=p-1;while(0===t.bl_count[o])o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(o=p;0!==o;o--){r=t.bl_count[o];while(0!==r)n=t.heap[--i],n>u||(h[2*n+1]!==o&&(t.opt_len+=(o-h[2*n+1])*h[2*n],h[2*n+1]=o),r--)}}}function Y(t,e,i){var r,n,o=new Array(w+1),s=0;for(r=1;r<=w;r++)o[r]=s=s+i[r-1]<<1;for(n=0;n<=e;n++){var a=t[2*n+1];0!==a&&(t[2*n]=V(o[a]++,a))}}function $(){var t,e,i,r,n,o=new Array(w+1);for(i=0,r=0;r>=7;r8?W(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function tt(t,e,i,n){Q(t),n&&(W(t,i),W(t,~i)),r.arraySet(t.pending_buf,t.window,e,i,t.pending),t.pending+=i}function et(t,e,i,r){var n=2*e,o=2*i;return t[n]>1;i>=1;i--)it(t,o,i);n=h;do{i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],it(t,o,1),r=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=r,o[2*n]=o[2*i]+o[2*r],t.depth[n]=(t.depth[i]>=t.depth[r]?t.depth[i]:t.depth[r])+1,o[2*i+1]=o[2*r+1]=n,t.heap[1]=n++,it(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],X(t,e),Y(o,u,t.bl_count)}function ot(t,e,i){var r,n,o=-1,s=e[1],a=0,h=7,u=4;for(0===s&&(h=138,u=3),e[2*(i+1)+1]=65535,r=0;r<=i;r++)n=s,s=e[2*(r+1)+1],++a=3;e--)if(0!==t.bl_tree[2*I[e]+1])break;return t.opt_len+=3*(e+1)+5+5+4,e}function ht(t,e,i,r){var n;for(H(t,e-257,5),H(t,i-1,5),H(t,r-4,4),n=0;n>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return s;for(e=32;e0?(t.strm.data_type===a&&(t.strm.data_type=ut(t)),nt(t,t.l_desc),nt(t,t.d_desc),h=at(t),o=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=o&&(o=s)):o=s=i+5,i+4<=o&&-1!==e?dt(t,e,i,r):t.strategy===n||s===o?(H(t,(f<<1)+(r?1:0),3),rt(t,B,O)):(H(t,(l<<1)+(r?1:0),3),ht(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),rt(t,t.dyn_ltree,t.dyn_dtree)),J(t),r&&Q(t)}function mt(t,e,i){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(C[i]+m+1)]++,t.dyn_dtree[2*Z(e)]++),t.last_lit===t.lit_bufsize-1}e._tr_init=lt,e._tr_stored_block=dt,e._tr_flush_block=pt,e._tr_tally=mt,e._tr_align=ct},9731:function(t){"use strict";function e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=e},5678:function(t,e,i){"use strict";var r=i(8625);e.certificate=i(9866);var n=r.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())}));e.RSAPrivateKey=n;var o=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var s=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));e.PublicKey=s;var a=r.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())})),h=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=h;var u=r.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())}));e.EncryptedPrivateKey=u;var f=r.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())}));e.DSAPrivateKey=f,e.DSAparam=r.define("DSAparam",(function(){this.int()}));var l=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=l;var d=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},9866:function(t,e,i){"use strict";var r=i(8625),n=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),h=r.define("RelativeDistinguishedName",(function(){this.setof(o)})),u=r.define("RDNSequence",(function(){this.seqof(h)})),f=r.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),l=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),d=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),c=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),p=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(c),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=p},3311:function(t,e,i){i(7658);var r=/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,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=i(3692),a=i(4699),h=i(6779).Buffer;t.exports=function(t,e){var i,u=t.toString(),f=u.match(r);if(f){var l="aes"+f[1],d=h.from(f[2],"hex"),c=h.from(f[3].replace(/[\r\n]/g,""),"base64"),p=s(e,d.slice(0,8),parseInt(f[1],10)).key,m=[],b=a.createDecipheriv(l,p,d);m.push(b.update(c)),m.push(b.final()),i=h.concat(m)}else{var g=u.match(o);i=h.from(g[2].replace(/[\r\n]/g,""),"base64")}var v=u.match(n)[1];return{tag:v,data:i}}},2616:function(t,e,i){i(7658);var r=i(5678),n=i(2562),o=i(3311),s=i(4699),a=i(5043),h=i(6779).Buffer;function u(t){var e;"object"!==typeof t||h.isBuffer(t)||(e=t.passphrase,t=t.key),"string"===typeof t&&(t=h.from(t));var i,n,s=o(t,e),a=s.tag,u=s.data;switch(a){case"CERTIFICATE":n=r.certificate.decode(u,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(n||(n=r.PublicKey.decode(u,"der")),i=n.algorithm.algorithm.join("."),i){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(n.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return n.subjectPrivateKey=n.subjectPublicKey,{type:"ec",data:n};case"1.2.840.10040.4.1":return n.algorithm.params.pub_key=r.DSAparam.decode(n.subjectPublicKey.data,"der"),{type:"dsa",data:n.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":u=r.EncryptedPrivateKey.decode(u,"der"),u=f(u,e);case"PRIVATE KEY":switch(n=r.PrivateKey.decode(u,"der"),i=n.algorithm.algorithm.join("."),i){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(n.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:n.algorithm.curve,privateKey:r.ECPrivateKey.decode(n.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return n.algorithm.params.priv_key=r.DSAparam.decode(n.subjectPrivateKey,"der"),{type:"dsa",params:n.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(u,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(u,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(u,"der")};case"EC PRIVATE KEY":return u=r.ECPrivateKey.decode(u,"der"),{curve:u.parameters.value,privateKey:u.privateKey};default:throw new Error("unknown key type "+a)}}function f(t,e){var i=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=n[t.algorithm.decrypt.cipher.algo.join(".")],u=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,d=a.pbkdf2Sync(e,i,r,l,"sha1"),c=s.createDecipheriv(o,d,u),p=[];return p.push(c.update(f)),p.push(c.final()),h.concat(p)}t.exports=u,u.signature=r.signature},5043:function(t,e,i){e.pbkdf2=i(809),e.pbkdf2Sync=i(6560)},809:function(t,e,i){i(8309);var r,n,o=i(6779).Buffer,s=i(8369),a=i(3677),h=i(6560),u=i(6816),f=i.g.crypto&&i.g.crypto.subtle,l={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"},d=[];function c(t){if(i.g.process&&!i.g.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==d[t])return d[t];r=r||o.alloc(8);var e=m(r,r,10,128,t).then((function(){return!0})).catch((function(){return!1}));return d[t]=e,e}function p(){return n||(n=i.g.process&&i.g.process.nextTick?i.g.process.nextTick:i.g.queueMicrotask?i.g.queueMicrotask:i.g.setImmediate?i.g.setImmediate:i.g.setTimeout,n)}function m(t,e,i,r,n){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:i,hash:{name:n}},t,r<<3)})).then((function(t){return o.from(t)}))}function b(t,e){t.then((function(t){p()((function(){e(null,t)}))}),(function(t){p()((function(){e(t)}))}))}t.exports=function(t,e,r,n,o,f){"function"===typeof o&&(f=o,o=void 0),o=o||"sha1";var d=l[o.toLowerCase()];if(d&&"function"===typeof i.g.Promise){if(s(r,n),t=u(t,a,"Password"),e=u(e,a,"Salt"),"function"!==typeof f)throw new Error("No callback provided to pbkdf2");b(c(d).then((function(i){return i?m(t,e,r,n,d):h(t,e,r,n,o)})),f)}else p()((function(){var i;try{i=h(t,e,r,n,o)}catch(s){return f(s)}f(null,i)}))}},3677:function(t,e,i){var r,n=i(6027);if(i.g.process&&i.g.process.browser)r="utf-8";else if(i.g.process&&i.g.process.version){var o=parseInt(n.version.split(".")[0].slice(1),10);r=o>=6?"utf-8":"binary"}else r="utf-8";t.exports=r},8369:function(t){var e=Math.pow(2,30)-1;t.exports=function(t,i){if("number"!==typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!==typeof i)throw new TypeError("Key length not a number");if(i<0||i>e||i!==i)throw new TypeError("Bad key length")}},6560:function(t,e,i){var r=i(6515),n=i(3128),o=i(1720),s=i(6779).Buffer,a=i(8369),h=i(3677),u=i(6816),f=s.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(t,e,i){var r=c(t),n="sha512"===t||"sha384"===t?128:64;e.length>n?e=r(e):e.length=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=a(t,i);return i-1>=e&&(r|=a(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"===typeof t)return this._initNumber(t,e,i);if("object"===typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var n=0;"-"===t[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=h(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else{var a=t.length-e;for(r=a%2===0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8}this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,a=Math.min(o,o-s)+i,h=0,f=i;f1&&0===this.words[this.length-1])this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","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"],l=[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],d=[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];function c(t){for(var e=new Array(t.bitLength()),i=0;i>>n}return e}function p(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;i.words[0]=a;for(var u=1;u>>26,l=67108863&h,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;n=0|t.words[p],o=0|e.words[c],s=n*o+l,f+=s/67108864|0,l=67108863&s}i.words[u]=0|l,h=0|f}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(t=t||10,e=0|e||1,16===t||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215,i=0!==o||s!==this.length-1?f[6-h.length]+h+i:h+i,n+=2,n>=26&&(n-=26,s--)}0!==o&&(i=o.toString(16)+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],c=d[t];i="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(c).toString(t);p=p.idivn(c),i=p.isZero()?m+i:f[u-m.length]+m+i}this.isZero()&&(i="0"+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0===(8191&e)&&(i+=13,e>>>=13),0===(127&e)&&(i+=7,e>>>=7),0===(15&e)&&(i+=4,e>>>=4),0===(3&e)&&(i+=2,e>>>=2),0===(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,c=0|s[1],p=8191&c,m=c>>>13,b=0|s[2],g=8191&b,v=b>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,k=M>>>13,E=0|s[5],x=8191&E,A=E>>>13,R=0|s[6],T=8191&R,I=R>>>13,L=0|s[7],B=8191&L,O=L>>>13,N=0|s[8],C=8191&N,P=N>>>13,j=0|s[9],D=8191&j,q=j>>>13,U=0|a[0],z=8191&U,F=U>>>13,Z=0|a[1],W=8191&Z,H=Z>>>13,K=0|a[2],V=8191&K,G=K>>>13,X=0|a[3],Y=8191&X,$=X>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],it=8191&et,rt=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,dt=ft>>>13,ct=0|a[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19,r=Math.imul(l,z),n=Math.imul(l,F),n=n+Math.imul(d,z)|0,o=Math.imul(d,F);var bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(p,z),n=Math.imul(p,F),n=n+Math.imul(m,z)|0,o=Math.imul(m,F),r=r+Math.imul(l,W)|0,n=n+Math.imul(l,H)|0,n=n+Math.imul(d,W)|0,o=o+Math.imul(d,H)|0;var gt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,z),n=Math.imul(g,F),n=n+Math.imul(v,z)|0,o=Math.imul(v,F),r=r+Math.imul(p,W)|0,n=n+Math.imul(p,H)|0,n=n+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0,r=r+Math.imul(l,V)|0,n=n+Math.imul(l,G)|0,n=n+Math.imul(d,V)|0,o=o+Math.imul(d,G)|0;var vt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),n=Math.imul(w,F),n=n+Math.imul(_,z)|0,o=Math.imul(_,F),r=r+Math.imul(g,W)|0,n=n+Math.imul(g,H)|0,n=n+Math.imul(v,W)|0,o=o+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,n=n+Math.imul(p,G)|0,n=n+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,r=r+Math.imul(l,Y)|0,n=n+Math.imul(l,$)|0,n=n+Math.imul(d,Y)|0,o=o+Math.imul(d,$)|0;var yt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=Math.imul(S,F),n=n+Math.imul(k,z)|0,o=Math.imul(k,F),r=r+Math.imul(w,W)|0,n=n+Math.imul(w,H)|0,n=n+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,r=r+Math.imul(g,V)|0,n=n+Math.imul(g,G)|0,n=n+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,Y)|0,n=n+Math.imul(p,$)|0,n=n+Math.imul(m,Y)|0,o=o+Math.imul(m,$)|0,r=r+Math.imul(l,Q)|0,n=n+Math.imul(l,tt)|0,n=n+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,z),n=Math.imul(x,F),n=n+Math.imul(A,z)|0,o=Math.imul(A,F),r=r+Math.imul(S,W)|0,n=n+Math.imul(S,H)|0,n=n+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(w,V)|0,n=n+Math.imul(w,G)|0,n=n+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(g,Y)|0,n=n+Math.imul(g,$)|0,n=n+Math.imul(v,Y)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Q)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(l,it)|0,n=n+Math.imul(l,rt)|0,n=n+Math.imul(d,it)|0,o=o+Math.imul(d,rt)|0;var _t=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,z),n=Math.imul(T,F),n=n+Math.imul(I,z)|0,o=Math.imul(I,F),r=r+Math.imul(x,W)|0,n=n+Math.imul(x,H)|0,n=n+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,r=r+Math.imul(S,V)|0,n=n+Math.imul(S,G)|0,n=n+Math.imul(k,V)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,Y)|0,n=n+Math.imul(w,$)|0,n=n+Math.imul(_,Y)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(g,Q)|0,n=n+Math.imul(g,tt)|0,n=n+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,it)|0,n=n+Math.imul(p,rt)|0,n=n+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(l,ot)|0,n=n+Math.imul(l,st)|0,n=n+Math.imul(d,ot)|0,o=o+Math.imul(d,st)|0;var Mt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,z),n=Math.imul(B,F),n=n+Math.imul(O,z)|0,o=Math.imul(O,F),r=r+Math.imul(T,W)|0,n=n+Math.imul(T,H)|0,n=n+Math.imul(I,W)|0,o=o+Math.imul(I,H)|0,r=r+Math.imul(x,V)|0,n=n+Math.imul(x,G)|0,n=n+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(S,Y)|0,n=n+Math.imul(S,$)|0,n=n+Math.imul(k,Y)|0,o=o+Math.imul(k,$)|0,r=r+Math.imul(w,Q)|0,n=n+Math.imul(w,tt)|0,n=n+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(g,it)|0,n=n+Math.imul(g,rt)|0,n=n+Math.imul(v,it)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,n=n+Math.imul(p,st)|0,n=n+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(l,ht)|0,n=n+Math.imul(l,ut)|0,n=n+Math.imul(d,ht)|0,o=o+Math.imul(d,ut)|0;var St=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(C,z),n=Math.imul(C,F),n=n+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(B,W)|0,n=n+Math.imul(B,H)|0,n=n+Math.imul(O,W)|0,o=o+Math.imul(O,H)|0,r=r+Math.imul(T,V)|0,n=n+Math.imul(T,G)|0,n=n+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,Y)|0,n=n+Math.imul(x,$)|0,n=n+Math.imul(A,Y)|0,o=o+Math.imul(A,$)|0,r=r+Math.imul(S,Q)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,it)|0,n=n+Math.imul(w,rt)|0,n=n+Math.imul(_,it)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(g,ot)|0,n=n+Math.imul(g,st)|0,n=n+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,r=r+Math.imul(p,ht)|0,n=n+Math.imul(p,ut)|0,n=n+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0,r=r+Math.imul(l,lt)|0,n=n+Math.imul(l,dt)|0,n=n+Math.imul(d,lt)|0,o=o+Math.imul(d,dt)|0;var kt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(D,z),n=Math.imul(D,F),n=n+Math.imul(q,z)|0,o=Math.imul(q,F),r=r+Math.imul(C,W)|0,n=n+Math.imul(C,H)|0,n=n+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(B,V)|0,n=n+Math.imul(B,G)|0,n=n+Math.imul(O,V)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(T,Y)|0,n=n+Math.imul(T,$)|0,n=n+Math.imul(I,Y)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(x,Q)|0,n=n+Math.imul(x,tt)|0,n=n+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(S,it)|0,n=n+Math.imul(S,rt)|0,n=n+Math.imul(k,it)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,n=n+Math.imul(w,st)|0,n=n+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(g,ht)|0,n=n+Math.imul(g,ut)|0,n=n+Math.imul(v,ht)|0,o=o+Math.imul(v,ut)|0,r=r+Math.imul(p,lt)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0,r=r+Math.imul(l,pt)|0,n=n+Math.imul(l,mt)|0,n=n+Math.imul(d,pt)|0,o=o+Math.imul(d,mt)|0;var Et=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(D,W),n=Math.imul(D,H),n=n+Math.imul(q,W)|0,o=Math.imul(q,H),r=r+Math.imul(C,V)|0,n=n+Math.imul(C,G)|0,n=n+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(B,Y)|0,n=n+Math.imul(B,$)|0,n=n+Math.imul(O,Y)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(T,Q)|0,n=n+Math.imul(T,tt)|0,n=n+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,it)|0,n=n+Math.imul(x,rt)|0,n=n+Math.imul(A,it)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(S,ot)|0,n=n+Math.imul(S,st)|0,n=n+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,r=r+Math.imul(w,ht)|0,n=n+Math.imul(w,ut)|0,n=n+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,r=r+Math.imul(g,lt)|0,n=n+Math.imul(g,dt)|0,n=n+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0,r=r+Math.imul(p,pt)|0,n=n+Math.imul(p,mt)|0,n=n+Math.imul(m,pt)|0,o=o+Math.imul(m,mt)|0;var xt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(D,V),n=Math.imul(D,G),n=n+Math.imul(q,V)|0,o=Math.imul(q,G),r=r+Math.imul(C,Y)|0,n=n+Math.imul(C,$)|0,n=n+Math.imul(P,Y)|0,o=o+Math.imul(P,$)|0,r=r+Math.imul(B,Q)|0,n=n+Math.imul(B,tt)|0,n=n+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(T,it)|0,n=n+Math.imul(T,rt)|0,n=n+Math.imul(I,it)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,n=n+Math.imul(x,st)|0,n=n+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,r=r+Math.imul(S,ht)|0,n=n+Math.imul(S,ut)|0,n=n+Math.imul(k,ht)|0,o=o+Math.imul(k,ut)|0,r=r+Math.imul(w,lt)|0,n=n+Math.imul(w,dt)|0,n=n+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0,r=r+Math.imul(g,pt)|0,n=n+Math.imul(g,mt)|0,n=n+Math.imul(v,pt)|0,o=o+Math.imul(v,mt)|0;var At=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(D,Y),n=Math.imul(D,$),n=n+Math.imul(q,Y)|0,o=Math.imul(q,$),r=r+Math.imul(C,Q)|0,n=n+Math.imul(C,tt)|0,n=n+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(B,it)|0,n=n+Math.imul(B,rt)|0,n=n+Math.imul(O,it)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(T,ot)|0,n=n+Math.imul(T,st)|0,n=n+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(x,ht)|0,n=n+Math.imul(x,ut)|0,n=n+Math.imul(A,ht)|0,o=o+Math.imul(A,ut)|0,r=r+Math.imul(S,lt)|0,n=n+Math.imul(S,dt)|0,n=n+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0,r=r+Math.imul(w,pt)|0,n=n+Math.imul(w,mt)|0,n=n+Math.imul(_,pt)|0,o=o+Math.imul(_,mt)|0;var Rt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(D,Q),n=Math.imul(D,tt),n=n+Math.imul(q,Q)|0,o=Math.imul(q,tt),r=r+Math.imul(C,it)|0,n=n+Math.imul(C,rt)|0,n=n+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(B,ot)|0,n=n+Math.imul(B,st)|0,n=n+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(T,ht)|0,n=n+Math.imul(T,ut)|0,n=n+Math.imul(I,ht)|0,o=o+Math.imul(I,ut)|0,r=r+Math.imul(x,lt)|0,n=n+Math.imul(x,dt)|0,n=n+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0,r=r+Math.imul(S,pt)|0,n=n+Math.imul(S,mt)|0,n=n+Math.imul(k,pt)|0,o=o+Math.imul(k,mt)|0;var Tt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(D,it),n=Math.imul(D,rt),n=n+Math.imul(q,it)|0,o=Math.imul(q,rt),r=r+Math.imul(C,ot)|0,n=n+Math.imul(C,st)|0,n=n+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(B,ht)|0,n=n+Math.imul(B,ut)|0,n=n+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,r=r+Math.imul(T,lt)|0,n=n+Math.imul(T,dt)|0,n=n+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0,r=r+Math.imul(x,pt)|0,n=n+Math.imul(x,mt)|0,n=n+Math.imul(A,pt)|0,o=o+Math.imul(A,mt)|0;var It=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(D,ot),n=Math.imul(D,st),n=n+Math.imul(q,ot)|0,o=Math.imul(q,st),r=r+Math.imul(C,ht)|0,n=n+Math.imul(C,ut)|0,n=n+Math.imul(P,ht)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(B,lt)|0,n=n+Math.imul(B,dt)|0,n=n+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0,r=r+Math.imul(T,pt)|0,n=n+Math.imul(T,mt)|0,n=n+Math.imul(I,pt)|0,o=o+Math.imul(I,mt)|0;var Lt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(D,ht),n=Math.imul(D,ut),n=n+Math.imul(q,ht)|0,o=Math.imul(q,ut),r=r+Math.imul(C,lt)|0,n=n+Math.imul(C,dt)|0,n=n+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0,r=r+Math.imul(B,pt)|0,n=n+Math.imul(B,mt)|0,n=n+Math.imul(O,pt)|0,o=o+Math.imul(O,mt)|0;var Bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(D,lt),n=Math.imul(D,dt),n=n+Math.imul(q,lt)|0,o=Math.imul(q,dt),r=r+Math.imul(C,pt)|0,n=n+Math.imul(C,mt)|0,n=n+Math.imul(P,pt)|0,o=o+Math.imul(P,mt)|0;var Ot=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(D,pt),n=Math.imul(D,mt),n=n+Math.imul(q,pt)|0,o=Math.imul(q,mt);var Nt=(u+r|0)+((8191&n)<<13)|0;return u=(o+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=bt,h[1]=gt,h[2]=vt,h[3]=yt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=kt,h[9]=Et,h[10]=xt,h[11]=At,h[12]=Rt,h[13]=Tt,h[14]=It,h[15]=Lt,h[16]=Bt,h[17]=Ot,h[18]=Nt,0!==u&&(h[19]=u,i.length++),i};function b(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0,n+=s>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}function g(t,e,i){var r=new v;return r.mulp(t,e,i)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?b(this,t,e):g(this,t,e),i},v.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r>=1;return r},v.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=c(t);if(0===e.length)return new o(1);for(var i=this,r=0;r=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=this.length-t.length,r=this.clone(),n=t,s=0|n.words[n.length-1],a=this._countBits(s);i=26-a,0!==i&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var h,u=r.length-n.length;if("mod"!==e){h=new o(null),h.length=u+1,h.words=new Array(h.length);for(var f=0;f=0;d--){var c=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,d);while(0!==r.negative)c--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);h&&(h.words[d]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n=new o(1),s=new o(0),a=new o(0),h=new o(1),u=0;while(e.isEven()&&i.isEven())e.iushrn(1),i.iushrn(1),++u;var f=i.clone(),l=e.clone();while(!e.isZero()){for(var d=0,c=1;0===(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0){e.iushrn(d);while(d-- >0)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1)}for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0){i.iushrn(p);while(p-- >0)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1)}e.cmp(i)>=0?(e.isub(i),n.isub(a),s.isub(h)):(i.isub(e),a.isub(n),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n,s=new o(1),a=new o(0),h=i.clone();while(e.cmpn(1)>0&&i.cmpn(1)>0){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0){e.iushrn(u);while(u-- >0)s.isOdd()&&s.iadd(h),s.iushrn(1)}for(var l=0,d=1;0===(i.words[0]&d)&&l<26;++l,d<<=1);if(l>0){i.iushrn(l);while(l-- >0)a.isOdd()&&a.iadd(h),a.iushrn(1)}e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return n=0===e.cmpn(1)?s:a,n.cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);do{while(e.isEven())e.iushrn(1);while(i.isEven())i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}while(1);return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){rn&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),e=i.bitLength()}while(e>this.n);var r=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},n(_,w),_.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new M;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return y[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}var n=this.m.subn(1),s=0;while(!n.isZero()&&0===n.andln(1))s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new o(2*f*f).toRed(this);while(0!==this.pow(f,u).cmp(h))f.redIAdd(h);var l=this.pow(f,n),d=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=s;while(0!==c.cmp(a)){for(var m=c,b=0;0!==m.cmp(a);b++)m=m.redSqr();r(b=0;n--){for(var f=e.words[n],l=u-1;l>=0;l--){var d=f>>l&1;s!==r[0]&&(s=this.sqr(s)),0!==d||0!==a?(a<<=1,a|=d,h++,(h===i||0===n&&0===l)&&(s=this.mul(s,r[a]),h=0,a=0)):h=0}u=26}return s},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},n(x,E),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(t,this)},5723:function(t,e,i){var r=i(2616),n=i(6884),o=i(8479),s=i(6670),a=i(8593),h=i(5443),u=i(4466),f=i(6779).Buffer;function l(t,e){var i=t.modulus.byteLength(),r=h("sha1").update(f.alloc(0)).digest(),s=r.length;if(0!==e[0])throw new Error("decryption error");var a=e.slice(1,s+1),u=e.slice(s+1),l=o(a,n(u,s)),d=o(u,n(l,i-s-1));if(c(r,d.slice(0,s)))throw new Error("decryption error");var p=s;while(0===d[p])p++;if(1!==d[p++])throw new Error("decryption error");return d.slice(p)}function d(t,e,i){var r=e.slice(0,2),n=2,o=0;while(0!==e[n++])if(n>=e.length){o++;break}var s=e.slice(2,n-1);if(("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return e.slice(n)}function c(t,e){t=f.from(t),e=f.from(e);var i=0,r=t.length;t.length!==e.length&&(i++,r=Math.min(t.length,e.length));var n=-1;while(++nc||new s(e).cmp(h.modulus)>=0)throw new Error("decryption error");o=i?u(new s(e),h):a(e,h);var p=f.alloc(c-o.length);if(o=f.concat([p,o],c),4===n)return l(h,o);if(1===n)return d(h,o,i);if(3===n)return o;throw new Error("unknown padding")}},8936:function(t,e,i){var r=i(2616),n=i(7602),o=i(5443),s=i(6884),a=i(8479),h=i(6670),u=i(4466),f=i(8593),l=i(6779).Buffer;function d(t,e){var i=t.modulus.byteLength(),r=e.length,u=o("sha1").update(l.alloc(0)).digest(),f=u.length,d=2*f;if(r>i-d-2)throw new Error("message too long");var c=l.alloc(i-r-d-2),p=i-f-1,m=n(f),b=a(l.concat([u,c,l.alloc(1,1),e],p),s(m,p)),g=a(m,s(b,f));return new h(l.concat([l.alloc(1),g,b],i))}function c(t,e,i){var r,n=e.length,o=t.modulus.byteLength();if(n>o-11)throw new Error("message too long");return r=i?l.alloc(o-n-3,255):p(o-n-3),new h(l.concat([l.from([0,i?1:2]),r,l.alloc(1),e],o))}function p(t){var e,i=l.allocUnsafe(t),r=0,o=n(2*t),s=0;while(r=0)throw new Error("data too long for modulus")}return i?f(o,s):u(o,s)}},4466:function(t,e,i){var r=i(6670),n=i(6779).Buffer;function o(t,e){return n.from(t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed().toArray())}t.exports=o},8479:function(t){t.exports=function(t,e){var i=t.length,r=-1;while(++r0&&h>a&&(h=a);for(var u=0;u=0?(f=p.substr(0,m),l=p.substr(m+1)):(f=p,l=""),d=decodeURIComponent(f),c=decodeURIComponent(l),r(o,d)?Array.isArray(o[d])?o[d].push(c):o[d]=[o[d],c]:o[d]=c}return o}},8292:function(t){"use strict";var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,i,r,n){return i=i||"&",r=r||"=",null===t&&(t=void 0),"object"===typeof t?Object.keys(t).map((function(n){var o=encodeURIComponent(e(n))+r;return Array.isArray(t[n])?t[n].map((function(t){return o+encodeURIComponent(e(t))})).join(i):o+encodeURIComponent(e(t[n]))})).join(i):n?encodeURIComponent(e(n))+r+encodeURIComponent(e(t)):""}},8736:function(t,e,i){"use strict";e.decode=e.parse=i(1538),e.encode=e.stringify=i(8292)},7602:function(t,e,i){"use strict";var r=i(6027),n=65536,o=4294967295;function s(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var a=i(6779).Buffer,h=i.g.crypto||i.g.msCrypto;function u(t,e){if(t>o)throw new RangeError("requested too many random bytes");var i=a.allocUnsafe(t);if(t>0)if(t>n)for(var s=0;sf||t<0)throw new TypeError("offset must be a uint32");if(t>h||t>e)throw new RangeError("offset out of range")}function d(t,e,i){if("number"!==typeof t||t!==t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>i||t>h)throw new RangeError("buffer too small")}function c(t,e,r,n){if(!a.isBuffer(t)&&!(t instanceof i.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof e)n=e,e=0,r=t.length;else if("function"===typeof r)n=r,r=t.length-e;else if("function"!==typeof n)throw new TypeError('"cb" argument must be a function');return l(e,t.length),d(r,e,t.length),p(t,e,r,n)}function p(t,e,i,n){if(r.browser){var o=t.buffer,a=new Uint8Array(o,e,i);return u.getRandomValues(a),n?void r.nextTick((function(){n(null,t)})):t}if(!n){var h=s(i);return h.copy(t,e),t}s(i,(function(i,r){if(i)return n(i);r.copy(t,e),n(null,t)}))}function m(t,e,r){if("undefined"===typeof e&&(e=0),!a.isBuffer(t)&&!(t instanceof i.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return l(e,t.length),void 0===r&&(r=t.length-e),d(r,e,t.length),p(t,e,r)}u&&u.getRandomValues||!r.browser?(e.randomFill=c,e.randomFillSync=m):(e.randomFill=n,e.randomFillSync=n)},3128:function(t,e,i){"use strict";var r=i(5361).Buffer,n=i(1923),o=i(761),s=new Array(16),a=[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],h=[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],u=[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],f=[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],l=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function c(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<>>32-e}function m(t,e,i,r,n,o,s,a){return p(t+(e^i^r)+o+s|0,a)+n|0}function b(t,e,i,r,n,o,s,a){return p(t+(e&i|~e&r)+o+s|0,a)+n|0}function g(t,e,i,r,n,o,s,a){return p(t+((e|~i)^r)+o+s|0,a)+n|0}function v(t,e,i,r,n,o,s,a){return p(t+(e&r|i&~r)+o+s|0,a)+n|0}function y(t,e,i,r,n,o,s,a){return p(t+(e^(i|~r))+o+s|0,a)+n|0}n(c,o),c.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,c=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,S=0|this._d,k=0|this._e,E=0;E<80;E+=1){var x,A;E<16?(x=m(i,r,n,o,c,t[a[E]],l[0],u[E]),A=y(w,_,M,S,k,t[h[E]],d[0],f[E])):E<32?(x=b(i,r,n,o,c,t[a[E]],l[1],u[E]),A=v(w,_,M,S,k,t[h[E]],d[1],f[E])):E<48?(x=g(i,r,n,o,c,t[a[E]],l[2],u[E]),A=g(w,_,M,S,k,t[h[E]],d[2],f[E])):E<64?(x=v(i,r,n,o,c,t[a[E]],l[3],u[E]),A=b(w,_,M,S,k,t[h[E]],d[3],f[E])):(x=y(i,r,n,o,c,t[a[E]],l[4],u[E]),A=m(w,_,M,S,k,t[h[E]],d[4],f[E])),i=c,c=o,o=p(n,10),n=r,r=x,w=k,k=S,S=p(M,10),M=_,_=A}var R=this._b+n+S|0;this._b=this._c+o+k|0,this._c=this._d+c+w|0,this._d=this._e+i+_|0,this._e=this._a+r+M|0,this._a=R},c.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 t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=c},6779:function(t,e,i){ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var r=i(5361),n=r.Buffer;function o(t,e){for(var i in t)e[i]=t[i]}function s(t,e,i){return n(t,e,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),s.prototype=Object.create(n.prototype),o(n,s),s.from=function(t,e,i){if("number"===typeof t)throw new TypeError("Argument must not be a number");return n(t,e,i)},s.alloc=function(t,e,i){if("number"!==typeof t)throw new TypeError("Argument must be a number");var r=n(t);return void 0!==e?"string"===typeof i?r.fill(e,i):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},5330:function(t,e,i){"use strict";var r=i(6027);i(1439),i(7585),i(5315);var n,o=i(5361),s=o.Buffer,a={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(a[n]=o[n]);var h=a.Buffer={};for(n in s)s.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(h[n]=s[n]);if(a.Buffer.prototype=s.prototype,h.from&&h.from!==Uint8Array.from||(h.from=function(t,e,i){if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&"undefined"===typeof t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return s(t,e,i)}),h.alloc||(h.alloc=function(t,e,i){if("number"!==typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=s(t);return e&&0!==e.length?"string"===typeof i?r.fill(e,i):r.fill(e):r.fill(0),r}),!a.kStringMaxLength)try{a.kStringMaxLength=r.binding("buffer").kStringMaxLength}catch(u){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a},7833:function(t,e,i){var r=i(6779).Buffer;function n(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}n.prototype.update=function(t,e){"string"===typeof t&&(e=e||"utf8",t=r.from(t,e));for(var i=this._block,n=this._blockSize,o=t.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},1720:function(t,e,i){var r=t.exports=function(t){t=t.toLowerCase();var e=r[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};r.sha=i(6664),r.sha1=i(8272),r.sha224=i(2935),r.sha256=i(872),r.sha384=i(6461),r.sha512=i(2522)},6664:function(t,e,i){var r=i(1923),n=i(7833),o=i(6779).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function h(){this.init(),this._w=a,n.call(this,64,56)}function u(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}r(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e=this._w,i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,a=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=e[h-3]^e[h-8]^e[h-14]^e[h-16];for(var d=0;d<80;++d){var c=~~(d/20),p=u(i)+l(c,r,n,o)+a+e[d]+s[c]|0;a=o,o=n,n=f(r),r=i,i=p}this._a=i+this._a|0,this._b=r+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},h.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},8272:function(t,e,i){var r=i(1923),n=i(7833),o=i(6779).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function h(){this.init(),this._w=a,n.call(this,64,56)}function u(t){return t<<1|t>>>31}function f(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function d(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}r(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e=this._w,i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,a=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=u(e[h-3]^e[h-8]^e[h-14]^e[h-16]);for(var c=0;c<80;++c){var p=~~(c/20),m=f(i)+d(p,r,n,o)+a+e[c]+s[p]|0;a=o,o=n,n=l(r),r=i,i=m}this._a=i+this._a|0,this._b=r+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},h.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},2935:function(t,e,i){var r=i(1923),n=i(872),o=i(7833),s=i(6779).Buffer,a=new Array(64);function h(){this.init(),this._w=a,o.call(this,64,56)}r(h,n),h.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},h.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=h},872:function(t,e,i){var r=i(1923),n=i(7833),o=i(6779).Buffer,s=[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],a=new Array(64);function h(){this.init(),this._w=a,n.call(this,64,56)}function u(t,e,i){return i^t&(e^i)}function f(t,e,i){return t&e|i&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function d(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function c(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}r(h,n),h.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},h.prototype._update=function(t){for(var e=this._w,i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,a=0|this._e,h=0|this._f,m=0|this._g,b=0|this._h,g=0;g<16;++g)e[g]=t.readInt32BE(4*g);for(;g<64;++g)e[g]=p(e[g-2])+e[g-7]+c(e[g-15])+e[g-16]|0;for(var v=0;v<64;++v){var y=b+d(a)+u(a,h,m)+s[v]+e[v]|0,w=l(i)+f(i,r,n)|0;b=m,m=h,h=a,a=o+y|0,o=n,n=r,r=i,i=y+w|0}this._a=i+this._a|0,this._b=r+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=h+this._f|0,this._g=m+this._g|0,this._h=b+this._h|0},h.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=h},6461:function(t,e,i){var r=i(1923),n=i(2522),o=i(7833),s=i(6779).Buffer,a=new Array(160);function h(){this.init(),this._w=a,o.call(this,128,112)}r(h,n),h.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},h.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=h},2522:function(t,e,i){var r=i(1923),n=i(7833),o=i(6779).Buffer,s=[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],a=new Array(160);function h(){this.init(),this._w=a,n.call(this,128,112)}function u(t,e,i){return i^t&(e^i)}function f(t,e,i){return t&e|i&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function d(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function c(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function b(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function g(t,e){return t>>>0>>0?1:0}r(h,n),h.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},h.prototype._update=function(t){for(var e=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,o=0|this._dh,a=0|this._eh,h=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,S=0|this._dl,k=0|this._el,E=0|this._fl,x=0|this._gl,A=0|this._hl,R=0;R<32;R+=2)e[R]=t.readInt32BE(4*R),e[R+1]=t.readInt32BE(4*R+4);for(;R<160;R+=2){var T=e[R-30],I=e[R-30+1],L=c(T,I),B=p(I,T);T=e[R-4],I=e[R-4+1];var O=m(T,I),N=b(I,T),C=e[R-14],P=e[R-14+1],j=e[R-32],D=e[R-32+1],q=B+P|0,U=L+C+g(q,B)|0;q=q+N|0,U=U+O+g(q,N)|0,q=q+D|0,U=U+j+g(q,D)|0,e[R]=U,e[R+1]=q}for(var z=0;z<160;z+=2){U=e[z],q=e[z+1];var F=f(i,r,n),Z=f(w,_,M),W=l(i,w),H=l(w,i),K=d(a,k),V=d(k,a),G=s[z],X=s[z+1],Y=u(a,h,v),$=u(k,E,x),J=A+V|0,Q=y+K+g(J,A)|0;J=J+$|0,Q=Q+Y+g(J,$)|0,J=J+X|0,Q=Q+G+g(J,X)|0,J=J+q|0,Q=Q+U+g(J,q)|0;var tt=H+Z|0,et=W+F+g(tt,H)|0;y=v,A=x,v=h,x=E,h=a,E=k,k=S+J|0,a=o+Q+g(k,S)|0,o=n,S=M,n=r,M=_,r=i,_=w,w=J+tt|0,i=Q+et+g(w,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+S|0,this._el=this._el+k|0,this._fl=this._fl+E|0,this._gl=this._gl+x|0,this._hl=this._hl+A|0,this._ah=this._ah+i+g(this._al,w)|0,this._bh=this._bh+r+g(this._bl,_)|0,this._ch=this._ch+n+g(this._cl,M)|0,this._dh=this._dh+o+g(this._dl,S)|0,this._eh=this._eh+a+g(this._el,k)|0,this._fh=this._fh+h+g(this._fl,E)|0,this._gh=this._gh+v+g(this._gl,x)|0,this._hh=this._hh+y+g(this._hl,A)|0},h.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=h},34:function(t,e,i){var r=i(6611),n=i(5086),o=i(7636),s=i(1543),a=i(4030),h=e;h.request=function(t,e){t="string"===typeof t?a.parse(t):o(t);var n=-1===i.g.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||n,h=t.hostname||t.host,u=t.port,f=t.path||"/";h&&-1!==h.indexOf(":")&&(h="["+h+"]"),t.url=(h?s+"//"+h:"")+(u?":"+u:"")+f,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var l=new r(t);return e&&l.on("response",e),l},h.get=function(t,e){var i=h.request(t,e);return i.end(),i},h.ClientRequest=r,h.IncomingMessage=n.IncomingMessage,h.Agent=function(){},h.Agent.defaultMaxSockets=4,h.globalAgent=new h.Agent,h.STATUS_CODES=s,h.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},7433:function(t,e,i){var r;function n(){if(void 0!==r)return r;if(i.g.XMLHttpRequest){r=new i.g.XMLHttpRequest;try{r.open("GET",i.g.XDomainRequest?"/":"https://example.com")}catch(t){r=null}}else r=null;return r}function o(t){var e=n();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(i){}return!1}function s(t){return"function"===typeof t}e.fetch=s(i.g.fetch)&&s(i.g.ReadableStream),e.writableStream=s(i.g.WritableStream),e.abortController=s(i.g.AbortController),e.arraybuffer=e.fetch||o("arraybuffer"),e.msstream=!e.fetch&&o("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!n()&&s(n().overrideMimeType),r=null},6611:function(t,e,i){var r=i(5361)["Buffer"],n=i(6027);i(7658);var o=i(7433),s=i(1923),a=i(5086),h=i(6380),u=a.IncomingMessage,f=a.readyStates;function l(t,e){return o.fetch&&e?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&t?"arraybuffer":"text"}var d=t.exports=function(t){var e,i=this;h.Writable.call(i),i._opts=t,i._body=[],i._headers={},t.auth&&i.setHeader("Authorization","Basic "+r.from(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){i.setHeader(e,t.headers[e])}));var n=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!o.abortController)n=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!o.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}i._mode=l(e,n),i._fetchTimer=null,i._socketTimeout=null,i._socketTimer=null,i.on("finish",(function(){i._onFinish()}))};function c(t){try{var e=t.status;return null!==e&&0!==e}catch(i){return!1}}s(d,h.Writable),d.prototype.setHeader=function(t,e){var i=this,r=t.toLowerCase();-1===p.indexOf(r)&&(i._headers[r]={name:t,value:e})},d.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},d.prototype.removeHeader=function(t){var e=this;delete e._headers[t.toLowerCase()]},d.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&0!==e.timeout&&t.setTimeout(e.timeout);var r=t._headers,s=null;"GET"!==e.method&&"HEAD"!==e.method&&(s=new Blob(t._body,{type:(r["content-type"]||{}).value||""}));var a=[];if(Object.keys(r).forEach((function(t){var e=r[t].name,i=r[t].value;Array.isArray(i)?i.forEach((function(t){a.push([e,t])})):a.push([e,i])})),"fetch"===t._mode){var h=null;if(o.abortController){var u=new AbortController;h=u.signal,t._fetchAbortController=u,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=i.g.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),e.requestTimeout))}i.g.fetch(t._opts.url,{method:t._opts.method,headers:a,body:s||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:h}).then((function(e){t._fetchResponse=e,t._resetTimers(!1),t._connect()}),(function(e){t._resetTimers(!0),t._destroyed||t.emit("error",e)}))}else{var l=t._xhr=new i.g.XMLHttpRequest;try{l.open(t._opts.method,t._opts.url,!0)}catch(d){return void n.nextTick((function(){t.emit("error",d)}))}"responseType"in l&&(l.responseType=t._mode),"withCredentials"in l&&(l.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(l.timeout=e.requestTimeout,l.ontimeout=function(){t.emit("requestTimeout")}),a.forEach((function(t){l.setRequestHeader(t[0],t[1])})),t._response=null,l.onreadystatechange=function(){switch(l.readyState){case f.LOADING:case f.DONE:t._onXHRProgress();break}},"moz-chunked-arraybuffer"===t._mode&&(l.onprogress=function(){t._onXHRProgress()}),l.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{l.send(s)}catch(d){return void n.nextTick((function(){t.emit("error",d)}))}}}},d.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),c(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)))},d.prototype._connect=function(){var t=this;t._destroyed||(t._response=new u(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},d.prototype._write=function(t,e,i){var r=this;r._body.push(t),i()},d.prototype._resetTimers=function(t){var e=this;i.g.clearTimeout(e._socketTimer),e._socketTimer=null,t?(i.g.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=i.g.setTimeout((function(){e.emit("timeout")}),e._socketTimeout))},d.prototype.abort=d.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t)},d.prototype.end=function(t,e,i){var r=this;"function"===typeof t&&(i=t,t=void 0),h.Writable.prototype.end.call(r,t,e,i)},d.prototype.setTimeout=function(t,e){var i=this;e&&i.once("timeout",e),i._socketTimeout=t,i._resetTimers(!1)},d.prototype.flushHeaders=function(){},d.prototype.setNoDelay=function(){},d.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},5086:function(t,e,i){var r=i(6027),n=i(5361)["Buffer"];i(7658),i(1439),i(7585),i(5315);var o=i(7433),s=i(1923),a=i(6380),h=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=e.IncomingMessage=function(t,e,i,s){var h=this;if(a.Readable.call(h),h._mode=i,h.headers={},h.rawHeaders=[],h.trailers={},h.rawTrailers=[],h.on("end",(function(){r.nextTick((function(){h.emit("close")}))})),"fetch"===i){if(h._fetchResponse=e,h.url=e.url,h.statusCode=e.status,h.statusMessage=e.statusText,e.headers.forEach((function(t,e){h.headers[e.toLowerCase()]=t,h.rawHeaders.push(e,t)})),o.writableStream){var u=new WritableStream({write:function(t){return s(!1),new Promise((function(e,i){h._destroyed?i():h.push(n.from(t))?e():h._resumeFetch=e}))},close:function(){s(!0),h._destroyed||h.push(null)},abort:function(t){s(!0),h._destroyed||h.emit("error",t)}});try{return void e.body.pipeTo(u).catch((function(t){s(!0),h._destroyed||h.emit("error",t)}))}catch(m){}}var f=e.body.getReader();function l(){f.read().then((function(t){h._destroyed||(s(t.done),t.done?h.push(null):(h.push(n.from(t.value)),l()))})).catch((function(t){s(!0),h._destroyed||h.emit("error",t)}))}l()}else{h._xhr=t,h._pos=0,h.url=t.responseURL,h.statusCode=t.status,h.statusMessage=t.statusText;var d=t.getAllResponseHeaders().split(/\r?\n/);if(d.forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var i=e[1].toLowerCase();"set-cookie"===i?(void 0===h.headers[i]&&(h.headers[i]=[]),h.headers[i].push(e[2])):void 0!==h.headers[i]?h.headers[i]+=", "+e[2]:h.headers[i]=e[2],h.rawHeaders.push(e[1],e[2])}})),h._charset="x-user-defined",!o.overrideMimeType){var c=h.rawHeaders["mime-type"];if(c){var p=c.match(/;\s*charset=([^;])(;|$)/);p&&(h._charset=p[1].toLowerCase())}h._charset||(h._charset="utf-8")}}};s(u,a.Readable),u.prototype._read=function(){var t=this,e=t._resumeFetch;e&&(t._resumeFetch=null,e())},u.prototype._onXHRProgress=function(t){var e=this,r=e._xhr,o=null;switch(e._mode){case"text":if(o=r.responseText,o.length>e._pos){var s=o.substr(e._pos);if("x-user-defined"===e._charset){for(var a=n.alloc(s.length),u=0;ue._pos&&(e.push(n.from(new Uint8Array(f.result.slice(e._pos)))),e._pos=f.result.byteLength)},f.onload=function(){t(!0),e.push(null)},f.readAsArrayBuffer(o);break}e._xhr.readyState===h.DONE&&"ms-stream"!==e._mode&&(t(!0),e.push(null))}},7722:function(t){"use strict";function e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var i={};function r(t,r,n){function o(t,e,i){return"string"===typeof r?r:r(t,e,i)}n||(n=Error);var s=function(t){function i(e,i,r){return t.call(this,o(e,i,r))||this}return e(i,t),i}(n);s.prototype.name=n.name,s.prototype.code=t,i[t]=s}function n(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map((function(t){return String(t)})),i>2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}function o(t,e,i){return t.substr(!i||i<0?0:+i,e.length)===e}function s(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}function a(t,e,i){return"number"!==typeof i&&(i=0),!(i+e.length>t.length)&&-1!==t.indexOf(e,i)}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,h;if("string"===typeof e&&o(e,"not ")?(r="must not be",e=e.replace(/^not /,"")):r="must be",s(t," argument"))h="The ".concat(t," ").concat(r," ").concat(n(e,"type"));else{var u=a(t,".")?"property":"argument";h='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(n(e,"type"))}return h+=". Received type ".concat(typeof i),h}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=i},996:function(t,e,i){"use strict";var r=i(6027);i(7658);var n=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};t.exports=f;var o=i(3611),s=i(5831);i(1923)(f,o);for(var a=n(s.prototype),h=0;h0)if("string"===typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=u(e)),r)s.endEmitted?E(t,new k):L(t,s,e,!0);else if(s.ended)E(t,new M);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(e=s.decoder.write(e),s.objectMode||0!==e.length?L(t,s,e,!1):q(t,s)):L(t,s,e,!1)}else r||(s.reading=!1,q(t,s));return!s.ended&&(s.length=O?t=O:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function C(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=N(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function P(t,e){if(l("onEofChunk"),!e.ended){if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,e.sync?j(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,D(t)))}}function j(t){var e=t._readableState;l("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(D,t))}function D(t){var e=t._readableState;l("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,K(t)}function q(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(U,t,e))}function U(t,e){while(!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Z(t){l("readable nexttick read 0"),t.read(0)}function W(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(H,t,e))}function H(t,e){l("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),K(t),e.flowing&&!e.reading&&t.read(0)}function K(t){var e=t._readableState;l("flow",e.flowing);while(e.flowing&&null!==t.read());}function V(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function G(t){var e=t._readableState;l("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(X,e,t))}function X(t,e){if(l("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function Y(t,e){for(var i=0,r=t.length;i=e.highWaterMark:e.length>0)||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?G(this):j(this),null;if(t=C(t,e),0===t&&e.ended)return 0===e.length&&G(this),null;var r,n=e.needReadable;return l("need readable",n),(0===e.length||e.length-t0?V(t,e):null,null===r?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&G(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(t){E(this,new S("_read()"))},T.prototype.pipe=function(t,e){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t);break}r.pipesCount+=1,l("pipe count=%d opts=%j",r.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr,a=s?u:v;function h(t,e){l("onunpipe"),t===i&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,c())}function u(){l("onend"),t.end()}r.endEmitted?n.nextTick(a):i.once("end",a),t.on("unpipe",h);var f=z(i);t.on("drain",f);var d=!1;function c(){l("cleanup"),t.removeListener("close",b),t.removeListener("finish",g),t.removeListener("drain",f),t.removeListener("error",m),t.removeListener("unpipe",h),i.removeListener("end",u),i.removeListener("end",v),i.removeListener("data",p),d=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||f()}function p(e){l("ondata");var n=t.write(e);l("dest.write",n),!1===n&&((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==Y(r.pipes,t))&&!d&&(l("false write response, pause",r.awaitDrain),r.awaitDrain++),i.pause())}function m(e){l("onerror",e),v(),t.removeListener("error",m),0===o(t,"error")&&E(t,e)}function b(){t.removeListener("finish",g),v()}function g(){l("onfinish"),t.removeListener("close",b),v()}function v(){l("unpipe"),i.unpipe(t)}return i.on("data",p),A(t,"error",m),t.once("close",b),t.once("finish",g),t.emit("pipe",i),r.flowing||(l("pipe resume"),i.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==r.flowing&&this.resume()):"readable"===t&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,l("on readable",r.length,r.reading),r.length?j(this):r.reading||n.nextTick(Z,this))),i},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var i=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(F,this),i},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(F,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!t.readableListening,W(this,t)),t.paused=!1,this},T.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(l("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){if(l("wrapped data"),i.decoder&&(n=i.decoder.write(n)),(!i.objectMode||null!==n&&void 0!==n)&&(i.objectMode||n&&n.length)){var o=e.push(n);o||(r=!0,t.pause())}})),t)void 0===this[n]&&"function"===typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var o=0;o-1))throw new k(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(t,e,i){i(new v("_write()"))},R.prototype._writev=null,R.prototype.end=function(t,e,i){var r=this._writableState;return"function"===typeof t?(i=t,t=null,e=null):"function"===typeof e&&(i=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||W(this,r,i),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),R.prototype.destroy=c.destroy,R.prototype._undestroy=c.undestroy,R.prototype._destroy=function(t,e){e(t)}},3409:function(t,e,i){"use strict";var r,n=i(6027);function o(t,e,i){return e=s(e),e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t){var e=a(t,"string");return"symbol"===typeof e?e:String(e)}function a(t,e){if("object"!==typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var h=i(7810),u=Symbol("lastResolve"),f=Symbol("lastReject"),l=Symbol("error"),d=Symbol("ended"),c=Symbol("lastPromise"),p=Symbol("handlePromise"),m=Symbol("stream");function b(t,e){return{value:t,done:e}}function g(t){var e=t[u];if(null!==e){var i=t[m].read();null!==i&&(t[c]=null,t[u]=null,t[f]=null,e(b(i,!1)))}}function v(t){n.nextTick(g,t)}function y(t,e){return function(i,r){t.then((function(){e[d]?i(b(void 0,!0)):e[p](i,r)}),r)}}var w=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((r={get stream(){return this[m]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[d])return Promise.resolve(b(void 0,!0));if(this[m].destroyed)return new Promise((function(e,i){n.nextTick((function(){t[l]?i(t[l]):e(b(void 0,!0))}))}));var i,r=this[c];if(r)i=new Promise(y(r,this));else{var o=this[m].read();if(null!==o)return Promise.resolve(b(o,!1));i=new Promise(this[p])}return this[c]=i,i}},o(r,Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var t=this;return new Promise((function(e,i){t[m].destroy(null,(function(t){t?i(t):e(b(void 0,!0))}))}))})),r),w),M=function(t){var e,i=Object.create(_,(e={},o(e,m,{value:t,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,f,{value:null,writable:!0}),o(e,l,{value:null,writable:!0}),o(e,d,{value:t._readableState.endEmitted,writable:!0}),o(e,p,{value:function(t,e){var r=i[m].read();r?(i[c]=null,i[u]=null,i[f]=null,t(b(r,!1))):(i[u]=t,i[f]=e)},writable:!0}),e));return i[c]=null,h(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=i[f];return null!==e&&(i[c]=null,i[u]=null,i[f]=null,e(t)),void(i[l]=t)}var r=i[u];null!==r&&(i[c]=null,i[u]=null,i[f]=null,r(b(void 0,!0))),i[d]=!0})),t.on("readable",v.bind(null,i)),i};t.exports=M},805:function(t,e,i){"use strict";function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function n(t){for(var e=1;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";var e=this.head,i=""+e.data;while(e=e.next)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return d.alloc(0);var e=d.allocUnsafe(t>>>0),i=this.head,r=0;while(i)b(i.data,e,r),r+=i.data.length,i=i.next;return e}},{key:"consume",value:function(t,e){var i;return tn.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),t-=o,0===t){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=d.allocUnsafe(t),i=this.head,r=1;i.data.copy(e),t-=i.data.length;while(i=i.next){var n=i.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),t-=o,0===t){o===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(o));break}++r}return this.length-=r,e}},{key:m,value:function(t,e){return p(this,n(n({},e),{},{depth:0,customInspect:!1}))}}]),t}()},1670:function(t,e,i){"use strict";var r=i(6027);function n(t,e){var i=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(h,this,t)):r.nextTick(h,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?i._writableState?i._writableState.errorEmitted?r.nextTick(s,i):(i._writableState.errorEmitted=!0,r.nextTick(o,i,t)):r.nextTick(o,i,t):e?(r.nextTick(s,i),e(t)):r.nextTick(s,i)})),this)}function o(t,e){h(t,e),s(t)}function s(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function a(){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 h(t,e){t.emit("error",e)}function u(t,e){var i=t._readableState,r=t._writableState;i&&i.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}t.exports={destroy:n,undestroy:a,errorOrDestroy:u}},7810:function(t,e,i){"use strict";var r=i(7722).q.ERR_STREAM_PREMATURE_CLOSE;function n(t){var e=!1;return function(){if(!e){e=!0;for(var i=arguments.length,r=new Array(i),n=0;n0;return f(t,s,a,(function(t){r||(r=t),t&&o.forEach(l),s||(o.forEach(l),n(r))}))}));return e.reduce(d)}t.exports=p},8385:function(t,e,i){"use strict";var r=i(7722).q.ERR_INVALID_OPT_VALUE;function n(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}function o(t,e,i,o){var s=n(e,o,i);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0){var a=o?i:"highWaterMark";throw new r(a,s)}return Math.floor(s)}return t.objectMode?16:16384}t.exports={getHighWaterMark:o}},9081:function(t,e,i){t.exports=i(3793).EventEmitter},6380:function(t,e,i){e=t.exports=i(3611),e.Stream=e,e.Readable=e,e.Writable=i(5831),e.Duplex=i(996),e.Transform=i(738),e.PassThrough=i(3685),e.finished=i(7810),e.pipeline=i(7254)},8091:function(t,e,i){var r=i(2901);function n(){r.call(this)}n.prototype=new r,t.exports=n,n.Stream=n,n.prototype.pipe=function(t,e){var i=this;function r(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),t.on("drain",n),t._isStdio||e&&!1===e.end||(i.on("end",s),i.on("close",a));var o=!1;function s(){o||(o=!0,t.end())}function a(){o||(o=!0,"function"===typeof t.destroy&&t.destroy())}function h(t){if(u(),!this.hasListeners("error"))throw t}function u(){i.off("data",r),t.off("drain",n),i.off("end",s),i.off("close",a),i.off("error",h),t.off("error",h),i.off("end",u),i.off("close",u),t.off("end",u),t.off("close",u)}return i.on("error",h),t.on("error",h),i.on("end",u),i.on("close",u),t.on("end",u),t.on("close",u),t.emit("pipe",i),t}},5605:function(t,e,i){"use strict";var r=i(6779).Buffer,n=r.isEncoding||function(t){switch(t=""+t,t&&t.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 o(t){if(!t)return"utf8";var e;while(1)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function s(t){var e=o(t);if("string"!==typeof e&&(r.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}function a(t){var e;switch(this.encoding=s(t),this.encoding){case"utf16le":this.text=p,this.end=m,e=4;break;case"utf8":this.fillLast=l,e=4;break;case"base64":this.text=b,this.end=g,e=3;break;default:return this.write=v,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function h(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function u(t,e,i){var r=e.length-1;if(r=0?(n>0&&(t.lastNeed=n-1),n):--r=0?(n>0&&(t.lastNeed=n-2),n):--r=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0))}function f(t,e,i){if(128!==(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"�"}}function l(t){var e=this.lastTotal-this.lastNeed,i=f(this,t,e);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function d(t,e){var i=u(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=i;var r=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function p(t,e){if((t.length-e)%2===0){var i=t.toString("utf16le",e);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function m(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function b(t,e){var i=(t.length-e)%3;return 0===i?t.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-i))}function g(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function v(t){return t.toString(this.encoding)}function y(t){return t&&t.length?this.write(t):""}e.s=a,a.prototype.write=function(t){if(0===t.length)return"";var e,i;if(this.lastNeed){if(e=this.fillLast(t),void 0===e)return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0:e.isEnumerableObject(t))},e.isEnumerableObject=function(t){for(var e in t)return!0;return!1},e.isEmpty=function(t){return e.isObject(t)?!e.isEnumerableObject(t):!e.isEnumerable(t)},e.isFiniteNumber=function(t){return e.isNumber(t)&&isFinite(t)},e.isInteger=function(t){return e.isFiniteNumber(t)&&Math.floor(t)===t},e.isVague=function(t){return t&&"object"===typeof t},e.isList=function(t){return e.isVague(t)&&e.isInteger(t.length)&&t.length>=0},e.isNaN=isNaN,e.nativeTypeOf=function(t){var e=t.toString(t);return e.substring(8,e.length-1)},e.typeOf=function(t){return e.isObject(t)?t.constructor.name||"Object":e.nativeTypeOf(t)},e.safeApply=function(t,i,r){return e.isFunction(t)?t.apply(r||this,i):void 0},e.enumerate=function(t,i,r,n){if(!t)return t;if(r=r||this,!n&&e.isFunction(t.forEach))return t.forEach(i,r);var o=0,s=t.length;if(e.isString(t))for(;oe||e>=r}))):void 0}},9127:function(t,e,i){var r;t=i.nmd(t),i(7658),function(n){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof i.g&&i.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,h=36,u=1,f=26,l=38,d=700,c=72,p=128,m="-",b=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=h-u,_=Math.floor,M=String.fromCharCode;function S(t){throw RangeError(y[t])}function k(t,e){var i=t.length,r=[];while(i--)r[i]=e(t[i]);return r}function E(t,e){var i=t.split("@"),r="";i.length>1&&(r=i[0]+"@",t=i[1]),t=t.replace(v,".");var n=t.split("."),o=k(n,e).join(".");return r+o}function x(t){var e,i,r=[],n=0,o=t.length;while(n=55296&&e<=56319&&n65535&&(t-=65536,e+=M(t>>>10&1023|55296),t=56320|1023&t),e+=M(t),e})).join("")}function R(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:h}function T(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function I(t,e,i){var r=0;for(t=i?_(t/d):t>>1,t+=_(t/e);t>w*f>>1;r+=h)t=_(t/w);return _(r+(w+1)*t/(t+l))}function L(t){var e,i,r,n,o,s,l,d,b,g,v=[],y=t.length,w=0,M=p,k=c;for(i=t.lastIndexOf(m),i<0&&(i=0),r=0;r=128&&S("not-basic"),v.push(t.charCodeAt(r));for(n=i>0?i+1:0;n=y&&S("invalid-input"),d=R(t.charCodeAt(n++)),(d>=h||d>_((a-w)/s))&&S("overflow"),w+=d*s,b=l<=k?u:l>=k+f?f:l-k,d_(a/g)&&S("overflow"),s*=g}e=v.length+1,k=I(w-o,e,0==o),_(w/e)>a-M&&S("overflow"),M+=_(w/e),w%=e,v.splice(w++,0,M)}return A(v)}function B(t){var e,i,r,n,o,s,l,d,b,g,v,y,w,k,E,A=[];for(t=x(t),y=t.length,e=p,i=0,o=c,s=0;s=e&&v_((a-i)/w)&&S("overflow"),i+=(l-e)*w,e=l,s=0;sa&&S("overflow"),v==e){for(d=i,b=h;;b+=h){if(g=b<=o?u:b>=o+f?f:b-o,d",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(u),l=["'"].concat(f),d=["%","/","?",";","#"].concat(l),c=["/","?","#"],p=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=i(8736);function _(t,e,i){if(t&&n.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,i),r}function M(t){return n.isString(t)&&(t=_(t)),t instanceof o?t.format():o.prototype.format.call(t)}function S(t,e){return _(t,!1,!0).resolve(e)}function k(t,e){return t?_(t,!1,!0).resolveObject(e):e}o.prototype.parse=function(t,e,i){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o127?C+="x":C+=N[P];if(!C.match(m)){var D=B.slice(0,T),q=B.slice(T+1),U=N.match(b);U&&(D.push(U[1]),q.unshift(U[2])),q.length&&(_="/"+q.join(".")+_),this.hostname=D.join(".");break}}}this.hostname.length>p?this.hostname="":this.hostname=this.hostname.toLowerCase(),L||(this.hostname=r.toASCII(this.hostname));var z=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+z,this.href+=this.host,L&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!g[k])for(T=0,O=l.length;T0)&&i.host.split("@");E&&(i.auth=E.shift(),i.host=i.hostname=E.shift())}return i.search=t.search,i.query=t.query,n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!S.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var x=S.slice(-1)[0],A=(i.host||t.host||S.length>1)&&("."===x||".."===x)||""===x,R=0,T=S.length;T>=0;T--)x=S[T],"."===x?S.splice(T,1):".."===x?(S.splice(T,1),R++):R&&(S.splice(T,1),R--);if(!_&&!M)for(;R--;R)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),A&&"/"!==S.join("/").substr(-1)&&S.push("");var I=""===S[0]||S[0]&&"/"===S[0].charAt(0);if(k){i.hostname=i.host=I?"":S.length?S.shift():"";E=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@");E&&(i.auth=E.shift(),i.host=i.hostname=E.shift())}return _=_||i.host&&S.length,_&&!I&&S.unshift(""),S.length?i.pathname=S.join("/"):(i.pathname=null,i.path=null),n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=t.auth||i.auth,i.slashes=i.slashes||t.slashes,i.href=i.format(),i},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},7497:function(t){"use strict";t.exports={isString:function(t){return"string"===typeof t},isObject:function(t){return"object"===typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},4633:function(t,e,i){var r=i(5941);function n(t,e){if(o("noDeprecation"))return t;var i=!1;function n(){if(!i){if(o("throwDeprecation"))throw new Error(e);o("traceDeprecation")?r.trace(e):r.warn(e),i=!0}return t.apply(this,arguments)}return n}function o(t){try{if(!i.g.localStorage)return!1}catch(r){return!1}var e=i.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=n},7636:function(t){t.exports=i;var e=Object.prototype.hasOwnProperty;function i(){for(var t={},i=0;i{}};const{EMPTY_BUFFER:x}=E,A=p[Symbol.species];function R(t,e){if(0===t.length)return x;if(1===t.length)return t[0];const i=p.allocUnsafe(e);let r=0;for(let n=0;n{this.pending--,this[N]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[N]()}[N](){if(this.pending!==this.concurrency&&this.jobs.length){const t=this.jobs.shift();this.pending++,t(this[O])}}};var P=C;const j=n,D=S,q=P,{kStatusCode:U}=E,z=p[Symbol.species],F=p.from([0,0,255,255]),Z=Symbol("permessage-deflate"),W=Symbol("total-length"),H=Symbol("callback"),K=Symbol("buffers"),V=Symbol("error");let G,X=class{constructor(t,e,i){if(this._maxPayload=0|i,this._options=t||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!e,this._deflate=null,this._inflate=null,this.params=null,!G){const t=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;G=new q(t)}}static get extensionName(){return"permessage-deflate"}offer(){const t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const t=this._deflate[H];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){const e=this._options,i=t.find((t=>!(!1===e.serverNoContextTakeover&&t.server_no_context_takeover||t.server_max_window_bits&&(!1===e.serverMaxWindowBits||"number"===typeof e.serverMaxWindowBits&&e.serverMaxWindowBits>t.server_max_window_bits)||"number"===typeof e.clientMaxWindowBits&&!t.client_max_window_bits)));if(!i)throw new Error("None of the extension offers can be accepted");return e.serverNoContextTakeover&&(i.server_no_context_takeover=!0),e.clientNoContextTakeover&&(i.client_no_context_takeover=!0),"number"===typeof e.serverMaxWindowBits&&(i.server_max_window_bits=e.serverMaxWindowBits),"number"===typeof e.clientMaxWindowBits?i.client_max_window_bits=e.clientMaxWindowBits:!0!==i.client_max_window_bits&&!1!==e.clientMaxWindowBits||delete i.client_max_window_bits,i}acceptAsClient(t){const e=t[0];if(!1===this._options.clientNoContextTakeover&&e.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(e.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"===typeof this._options.clientMaxWindowBits&&e.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"===typeof this._options.clientMaxWindowBits&&(e.client_max_window_bits=this._options.clientMaxWindowBits);return e}normalizeParams(t){return t.forEach((t=>{Object.keys(t).forEach((e=>{let i=t[e];if(i.length>1)throw new Error(`Parameter "${e}" must have only a single value`);if(i=i[0],"client_max_window_bits"===e){if(!0!==i){const t=+i;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${i}`);i=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${e}": ${i}`)}else if("server_max_window_bits"===e){const t=+i;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${i}`);i=t}else{if("client_no_context_takeover"!==e&&"server_no_context_takeover"!==e)throw new Error(`Unknown parameter "${e}"`);if(!0!==i)throw new TypeError(`Invalid value for parameter "${e}": ${i}`)}t[e]=i}))})),t}decompress(t,e,i){G.add((r=>{this._decompress(t,e,((t,e)=>{r(),i(t,e)}))}))}compress(t,e,i){G.add((r=>{this._compress(t,e,((t,e)=>{r(),i(t,e)}))}))}_decompress(t,e,i){const r=this._isServer?"client":"server";if(!this._inflate){const t=`${r}_max_window_bits`,e="number"!==typeof this.params[t]?j.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=j.createInflateRaw({...this._options.zlibInflateOptions,windowBits:e}),this._inflate[Z]=this,this._inflate[W]=0,this._inflate[K]=[],this._inflate.on("error",Q),this._inflate.on("data",J)}this._inflate[H]=i,this._inflate.write(t),e&&this._inflate.write(F),this._inflate.flush((()=>{const t=this._inflate[V];if(t)return this._inflate.close(),this._inflate=null,void i(t);const n=D.concat(this._inflate[K],this._inflate[W]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[W]=0,this._inflate[K]=[],e&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),i(null,n)}))}_compress(t,e,i){const r=this._isServer?"server":"client";if(!this._deflate){const t=`${r}_max_window_bits`,e="number"!==typeof this.params[t]?j.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=j.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:e}),this._deflate[W]=0,this._deflate[K]=[],this._deflate.on("data",$)}this._deflate[H]=i,this._deflate.write(t),this._deflate.flush(j.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let t=D.concat(this._deflate[K],this._deflate[W]);e&&(t=new z(t.buffer,t.byteOffset,t.length-4)),this._deflate[H]=null,this._deflate[W]=0,this._deflate[K]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),i(null,t)}))}};var Y=X;function $(t){this[K].push(t),this[W]+=t.length}function J(t){this[W]+=t.length,this[Z]._maxPayload<1||this[W]<=this[Z]._maxPayload?this[K].push(t):(this[V]=new RangeError("Max payload size exceeded"),this[V].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[V][U]=1009,this.removeListener("data",J),this.reset())}function Q(t){this[Z]._inflate=null,t[U]=1007,this[H](t)}var tt={},et={get exports(){return tt},set exports(t){tt=t}};const it={},rt=Object.freeze(Object.defineProperty({__proto__:null,default:it},Symbol.toStringTag,{value:"Module"})),nt=m(rt);const{isUtf8:ot}=o,st=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function at(t){return t>=1e3&&t<=1014&&1004!==t&&1005!==t&&1006!==t||t>=3e3&&t<=4999}function ht(t){const e=t.length;let i=0;while(i=e||128!==(192&t[i+1])||128!==(192&t[i+2])||224===t[i]&&128===(224&t[i+1])||237===t[i]&&160===(224&t[i+1]))return!1;i+=3}else{if(240!==(248&t[i]))return!1;if(i+3>=e||128!==(192&t[i+1])||128!==(192&t[i+2])||128!==(192&t[i+3])||240===t[i]&&128===(240&t[i+1])||244===t[i]&&t[i+1]>143||t[i]>244)return!1;i+=4}return!0}if(et.exports={isValidStatusCode:at,isValidUTF8:ht,tokenChars:st},ot)tt.isValidUTF8=function(t){return t.length<24?ht(t):ot(t)};else if(!{NODE_ENV:"production",BASE_URL:"/"}.WS_NO_UTF_8_VALIDATE)try{const t=nt;tt.isValidUTF8=function(e){return e.length<32?ht(e):t(e)}}catch(Ii){}const{Writable:ut}=r,ft=Y,{BINARY_TYPES:lt,EMPTY_BUFFER:dt,kStatusCode:ct,kWebSocket:pt}=E,{concat:mt,toArrayBuffer:bt,unmask:gt}=S,{isValidStatusCode:vt,isValidUTF8:yt}=tt,wt=p[Symbol.species],_t=0,Mt=1,St=2,kt=3,Et=4,xt=5;let At=class extends ut{constructor(t={}){super(),this._binaryType=t.binaryType||lt[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=0|t.maxPayload,this._skipUTF8Validation=!!t.skipUTF8Validation,this[pt]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=_t,this._loop=!1}_write(t,e,i){if(8===this._opcode&&this._state==_t)return i();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(i)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t=i.length?e.set(this._buffers.shift(),r):(e.set(new Uint8Array(i.buffer,i.byteOffset,t),r),this._buffers[0]=new wt(i.buffer,i.byteOffset+t,i.length-t)),t-=i.length}while(t>0);return e}startLoop(t){let e;this._loop=!0;do{switch(this._state){case _t:e=this.getInfo();break;case Mt:e=this.getPayloadLength16();break;case St:e=this.getPayloadLength64();break;case kt:this.getMask();break;case Et:e=this.getData(t);break;default:return void(this._loop=!1)}}while(this._loop);t(e)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(0!==(48&t[0]))return this._loop=!1,Tt(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const e=64===(64&t[0]);if(e&&!this._extensions[ft.extensionName])return this._loop=!1,Tt(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128===(128&t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(e)return this._loop=!1,Tt(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Tt(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,Tt(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=e}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,Tt(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,Tt(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(e)return this._loop=!1,Tt(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return this._loop=!1,Tt(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128===(128&t[1]),this._isServer){if(!this._masked)return this._loop=!1,Tt(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Tt(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=Mt;else{if(127!==this._payloadLength)return this.haveLength();this._state=St}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),e=t.readUInt32BE(0);return e>Math.pow(2,21)-1?(this._loop=!1,Tt(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=e*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Tt(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=kt:this._state=Et}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=Et)}getData(t){let e=dt;if(this._payloadLength){if(this._bufferedBytes7?this.controlMessage(e):this._compressed?(this._state=xt,void this.decompress(e,t)):(e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage())}decompress(t,e){const i=this._extensions[ft.extensionName];i.decompress(t,this._fin,((t,i)=>{if(t)return e(t);if(i.length){if(this._messageLength+=i.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return e(Tt(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(i)}const r=this.dataMessage();if(r)return e(r);this.startLoop(e)}))}dataMessage(){if(this._fin){const t=this._messageLength,e=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let i;i="nodebuffer"===this._binaryType?mt(e,t):"arraybuffer"===this._binaryType?bt(mt(e,t)):e,this.emit("message",i,!0)}else{const i=mt(e,t);if(!this._skipUTF8Validation&&!yt(i))return this._loop=!1,Tt(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",i,!1)}}this._state=_t}controlMessage(t){if(8===this._opcode)if(this._loop=!1,0===t.length)this.emit("conclude",1005,dt),this.end();else{const e=t.readUInt16BE(0);if(!vt(e))return Tt(RangeError,`invalid status code ${e}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const i=new wt(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!yt(i))return Tt(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",e,i),this.end()}else 9===this._opcode?this.emit("ping",t):this.emit("pong",t);this._state=_t}};var Rt=At;function Tt(t,e,i,r,n){const o=new t(i?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(o,Tt),o.code=n,o[ct]=r,o}const It=Rt,{randomFillSync:Lt}=h,Bt=Y,{EMPTY_BUFFER:Ot}=E,{isValidStatusCode:Nt}=tt,{mask:Ct,toBuffer:Pt}=S,jt=Symbol("kByteLength"),Dt=p.alloc(4);let qt=class t{constructor(t,e,i){this._extensions=e||{},i&&(this._generateMask=i,this._maskBuffer=p.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,e){let i,r,n=!1,o=2,s=!1;e.mask&&(i=e.maskBuffer||Dt,e.generateMask?e.generateMask(i):Lt(i,0,4),s=0===(i[0]|i[1]|i[2]|i[3]),o=6),"string"===typeof t?e.mask&&!s||void 0===e[jt]?(t=p.from(t),r=t.length):r=e[jt]:(r=t.length,n=e.mask&&e.readOnly&&!s);let a=r;r>=65536?(o+=8,a=127):r>125&&(o+=2,a=126);const h=p.allocUnsafe(n?r+o:o);return h[0]=e.fin?128|e.opcode:e.opcode,e.rsv1&&(h[0]|=64),h[1]=a,126===a?h.writeUInt16BE(r,2):127===a&&(h[2]=h[3]=0,h.writeUIntBE(r,4,6)),e.mask?(h[1]|=128,h[o-4]=i[0],h[o-3]=i[1],h[o-2]=i[2],h[o-1]=i[3],s?[h,t]:n?(Ct(t,i,h,o,r),[h]):(Ct(t,i,t,0,r),[h,t])):[h,t]}close(e,i,r,n){let o;if(void 0===e)o=Ot;else{if("number"!==typeof e||!Nt(e))throw new TypeError("First argument must be a valid error code number");if(void 0!==i&&i.length){const t=p.byteLength(i);if(t>123)throw new RangeError("The message must not be greater than 123 bytes");o=p.allocUnsafe(2+t),o.writeUInt16BE(e,0),"string"===typeof i?o.write(i,2):o.set(i,2)}else o=p.allocUnsafe(2),o.writeUInt16BE(e,0)}const s={[jt]:o.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,s,n]):this.sendFrame(t.frame(o,s),n)}ping(e,i,r){let n,o;if("string"===typeof e?(n=p.byteLength(e),o=!1):(e=Pt(e),n=e.length,o=Pt.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");const s={[jt]:n,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,s,r]):this.sendFrame(t.frame(e,s),r)}pong(e,i,r){let n,o;if("string"===typeof e?(n=p.byteLength(e),o=!1):(e=Pt(e),n=e.length,o=Pt.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");const s={[jt]:n,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,s,r]):this.sendFrame(t.frame(e,s),r)}send(e,i,r){const n=this._extensions[Bt.extensionName];let o,s,a=i.binary?2:1,h=i.compress;if("string"===typeof e?(o=p.byteLength(e),s=!1):(e=Pt(e),o=e.length,s=Pt.readOnly),this._firstFragment?(this._firstFragment=!1,h&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(h=o>=n._threshold),this._compress=h):(h=!1,a=0),i.fin&&(this._firstFragment=!0),n){const t={[jt]:o,fin:i.fin,generateMask:this._generateMask,mask:i.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:s,rsv1:h};this._deflating?this.enqueue([this.dispatch,e,this._compress,t,r]):this.dispatch(e,this._compress,t,r)}else this.sendFrame(t.frame(e,{[jt]:o,fin:i.fin,generateMask:this._generateMask,mask:i.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:s,rsv1:!1}),r)}dispatch(e,i,r,n){if(!i)return void this.sendFrame(t.frame(e,r),n);const o=this._extensions[Bt.extensionName];this._bufferedBytes+=r[jt],this._deflating=!0,o.compress(e,r.fin,((e,i)=>{if(this._socket.destroyed){const t=new Error("The socket was closed while data was being compressed");"function"===typeof n&&n(t);for(let e=0;e{let i=t[e];return Array.isArray(i)||(i=[i]),i.map((t=>[e].concat(Object.keys(t).map((e=>{let i=t[e];return Array.isArray(i)||(i=[i]),i.map((t=>!0===t?e:`${e}=${t}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")}var ue={format:he,parse:ae};const fe=u,le=f,de=l,ce=s,pe=a,{randomBytes:me,createHash:be}=h,{URL:ge}=d,ve=Y,ye=Rt,we=Ut,{BINARY_TYPES:_e,EMPTY_BUFFER:Me,GUID:Se,kForOnEventAttribute:ke,kListener:Ee,kStatusCode:xe,kWebSocket:Ae,NOOP:Re}=E,{EventTarget:{addEventListener:Te,removeEventListener:Ie}}=re,{format:Le,parse:Be}=ue,{toBuffer:Oe}=S,Ne=3e4,Ce=Symbol("kAborted"),Pe=[8,13],je=["CONNECTING","OPEN","CLOSING","CLOSED"],De=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;let qe=class t extends fe{constructor(e,i,r){super(),this._binaryType=_e[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Me,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===i?i=[]:Array.isArray(i)||("object"===typeof i&&null!==i?(r=i,i=[]):i=[i]),ze(this,e,i,r)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(t){_e.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,i,r){const n=new ye({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation});this._sender=new we(e,this._extensions,r.generateMask),this._receiver=n,this._socket=e,n[Ae]=this,e[Ae]=this,n.on("conclude",Ve),n.on("drain",Ge),n.on("error",Xe),n.on("message",$e),n.on("ping",Je),n.on("pong",Qe),e.setTimeout(0),e.setNoDelay(),i.length>0&&e.unshift(i),e.on("close",ei),e.on("data",ii),e.on("end",ri),e.on("error",ni),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=t.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[ve.extensionName]&&this._extensions[ve.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,i){if(this.readyState!==t.CLOSED)if(this.readyState!==t.CONNECTING)this.readyState!==t.CLOSING?(this._readyState=t.CLOSING,this._sender.close(e,i,!this._isServer,(t=>{t||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),Ne)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const t="WebSocket was closed before the connection was established";He(this,this._req,t)}}pause(){this.readyState!==t.CONNECTING&&this.readyState!==t.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,i,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"===typeof e?(r=e,e=i=void 0):"function"===typeof i&&(r=i,i=void 0),"number"===typeof e&&(e=e.toString()),this.readyState===t.OPEN?(void 0===i&&(i=!this._isServer),this._sender.ping(e||Me,i,r)):Ke(this,e,r)}pong(e,i,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"===typeof e?(r=e,e=i=void 0):"function"===typeof i&&(r=i,i=void 0),"number"===typeof e&&(e=e.toString()),this.readyState===t.OPEN?(void 0===i&&(i=!this._isServer),this._sender.pong(e||Me,i,r)):Ke(this,e,r)}resume(){this.readyState!==t.CONNECTING&&this.readyState!==t.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,i,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"===typeof i&&(r=i,i={}),"number"===typeof e&&(e=e.toString()),this.readyState!==t.OPEN)return void Ke(this,e,r);const n={binary:"string"!==typeof e,mask:!this._isServer,compress:!0,fin:!0,...i};this._extensions[ve.extensionName]||(n.compress=!1),this._sender.send(e||Me,n,r)}terminate(){if(this.readyState!==t.CLOSED)if(this.readyState!==t.CONNECTING)this._socket&&(this._readyState=t.CLOSING,this._socket.destroy());else{const t="WebSocket was closed before the connection was established";He(this,this._req,t)}}};Object.defineProperty(qe,"CONNECTING",{enumerable:!0,value:je.indexOf("CONNECTING")}),Object.defineProperty(qe.prototype,"CONNECTING",{enumerable:!0,value:je.indexOf("CONNECTING")}),Object.defineProperty(qe,"OPEN",{enumerable:!0,value:je.indexOf("OPEN")}),Object.defineProperty(qe.prototype,"OPEN",{enumerable:!0,value:je.indexOf("OPEN")}),Object.defineProperty(qe,"CLOSING",{enumerable:!0,value:je.indexOf("CLOSING")}),Object.defineProperty(qe.prototype,"CLOSING",{enumerable:!0,value:je.indexOf("CLOSING")}),Object.defineProperty(qe,"CLOSED",{enumerable:!0,value:je.indexOf("CLOSED")}),Object.defineProperty(qe.prototype,"CLOSED",{enumerable:!0,value:je.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((t=>{Object.defineProperty(qe.prototype,t,{enumerable:!0})})),["open","error","close","message"].forEach((t=>{Object.defineProperty(qe.prototype,`on${t}`,{enumerable:!0,get(){for(const e of this.listeners(t))if(e[ke])return e[Ee];return null},set(e){for(const i of this.listeners(t))if(i[ke]){this.removeListener(t,i);break}"function"===typeof e&&this.addEventListener(t,e,{[ke]:!0})}})})),qe.prototype.addEventListener=Te,qe.prototype.removeEventListener=Ie;var Ue=qe;function ze(t,e,i,r){const n={protocolVersion:Pe[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!Pe.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${Pe.join(", ")})`);let o;if(e instanceof ge)o=e,t._url=e.href;else{try{o=new ge(e)}catch(Ii){throw new SyntaxError(`Invalid URL: ${e}`)}t._url=e}const s="wss:"===o.protocol,a="ws+unix:"===o.protocol;let h;if("ws:"===o.protocol||s||a?a&&!o.pathname?h="The URL's pathname is empty":o.hash&&(h="The URL contains a fragment identifier"):h='The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"',h){const e=new SyntaxError(h);if(0===t._redirects)throw e;return void Fe(t,e)}const u=s?443:80,f=me(16).toString("base64"),l=s?le.request:de.request,d=new Set;let c,m;if(n.createConnection=s?We:Ze,n.defaultPort=n.defaultPort||u,n.port=o.port||u,n.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":f,Connection:"Upgrade",Upgrade:"websocket"},n.path=o.pathname+o.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(c=new ve(!0!==n.perMessageDeflate?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=Le({[ve.extensionName]:c.offer()})),i.length){for(const t of i){if("string"!==typeof t||!De.test(t)||d.has(t))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(t)}n.headers["Sec-WebSocket-Protocol"]=i.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(o.username||o.password)&&(n.auth=`${o.username}:${o.password}`),a){const t=n.path.split(":");n.socketPath=t[0],n.path=t[1]}if(n.followRedirects){if(0===t._redirects){t._originalIpc=a,t._originalSecure=s,t._originalHostOrSocketPath=a?n.socketPath:o.host;const e=r&&r.headers;if(r={...r,headers:{}},e)for(const[t,i]of Object.entries(e))r.headers[t.toLowerCase()]=i}else if(0===t.listenerCount("redirect")){const e=a?!!t._originalIpc&&n.socketPath===t._originalHostOrSocketPath:!t._originalIpc&&o.host===t._originalHostOrSocketPath;(!e||t._originalSecure&&!s)&&(delete n.headers.authorization,delete n.headers.cookie,e||delete n.headers.host,n.auth=void 0)}n.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+p.from(n.auth).toString("base64")),m=t._req=l(n),t._redirects&&t.emit("redirect",t.url,m)}else m=t._req=l(n);n.timeout&&m.on("timeout",(()=>{He(t,m,"Opening handshake has timed out")})),m.on("error",(e=>{null===m||m[Ce]||(m=t._req=null,Fe(t,e))})),m.on("response",(o=>{const s=o.headers.location,a=o.statusCode;if(s&&n.followRedirects&&a>=300&&a<400){if(++t._redirects>n.maxRedirects)return void He(t,m,"Maximum redirects exceeded");let o;m.abort();try{o=new ge(s,e)}catch(Ii){const i=new SyntaxError(`Invalid URL: ${s}`);return void Fe(t,i)}ze(t,o,i,r)}else t.emit("unexpected-response",m,o)||He(t,m,`Unexpected server response: ${o.statusCode}`)})),m.on("upgrade",((e,i,r)=>{if(t.emit("upgrade",e),t.readyState!==qe.CONNECTING)return;if(m=t._req=null,"websocket"!==e.headers.upgrade.toLowerCase())return void He(t,i,"Invalid Upgrade header");const o=be("sha1").update(f+Se).digest("base64");if(e.headers["sec-websocket-accept"]!==o)return void He(t,i,"Invalid Sec-WebSocket-Accept header");const s=e.headers["sec-websocket-protocol"];let a;if(void 0!==s?d.size?d.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":d.size&&(a="Server sent no subprotocol"),a)return void He(t,i,a);s&&(t._protocol=s);const h=e.headers["sec-websocket-extensions"];if(void 0!==h){if(!c){const e="Server sent a Sec-WebSocket-Extensions header but no extension was requested";return void He(t,i,e)}let e;try{e=Be(h)}catch(u){const e="Invalid Sec-WebSocket-Extensions header";return void He(t,i,e)}const r=Object.keys(e);if(1!==r.length||r[0]!==ve.extensionName){const e="Server indicated an extension that was not requested";return void He(t,i,e)}try{c.accept(e[ve.extensionName])}catch(u){const e="Invalid Sec-WebSocket-Extensions header";return void He(t,i,e)}t._extensions[ve.extensionName]=c}t.setSocket(i,r,{generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})})),n.finishRequest?n.finishRequest(m,t):m.end()}function Fe(t,e){t._readyState=qe.CLOSING,t.emit("error",e),t.emitClose()}function Ze(t){return t.path=t.socketPath,ce.connect(t)}function We(t){return t.path=void 0,t.servername||""===t.servername||(t.servername=ce.isIP(t.host)?"":t.host),pe.connect(t)}function He(t,e,i){t._readyState=qe.CLOSING;const r=new Error(i);Error.captureStackTrace(r,He),e.setHeader?(e[Ce]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),c.nextTick(Fe,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Ke(t,e,i){if(e){const i=Oe(e).length;t._socket?t._sender._bufferedBytes+=i:t._bufferedAmount+=i}if(i){const e=new Error(`WebSocket is not open: readyState ${t.readyState} (${je[t.readyState]})`);c.nextTick(i,e)}}function Ve(t,e){const i=this[Ae];i._closeFrameReceived=!0,i._closeMessage=e,i._closeCode=t,void 0!==i._socket[Ae]&&(i._socket.removeListener("data",ii),c.nextTick(ti,i._socket),1005===t?i.close():i.close(t,e))}function Ge(){const t=this[Ae];t.isPaused||t._socket.resume()}function Xe(t){const e=this[Ae];void 0!==e._socket[Ae]&&(e._socket.removeListener("data",ii),c.nextTick(ti,e._socket),e.close(t[xe])),e.emit("error",t)}function Ye(){this[Ae].emitClose()}function $e(t,e){this[Ae].emit("message",t,e)}function Je(t){const e=this[Ae];e.pong(t,!e._isServer,Re),e.emit("ping",t)}function Qe(t){this[Ae].emit("pong",t)}function ti(t){t.resume()}function ei(){const t=this[Ae];let e;this.removeListener("close",ei),this.removeListener("data",ii),this.removeListener("end",ri),t._readyState=qe.CLOSING,this._readableState.endEmitted||t._closeFrameReceived||t._receiver._writableState.errorEmitted||null===(e=t._socket.read())||t._receiver.write(e),t._receiver.end(),this[Ae]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",Ye),t._receiver.on("finish",Ye))}function ii(t){this[Ae]._receiver.write(t)||this.pause()}function ri(){const t=this[Ae];t._readyState=qe.CLOSING,t._receiver.end(),this.end()}function ni(){const t=this[Ae];this.removeListener("error",ni),this.on("error",Re),t&&(t._readyState=qe.CLOSING,this.destroy())}const oi=Ue,{tokenChars:si}=tt;function ai(t){const e=new Set;let i=-1,r=-1,n=0;for(n;n{const i=fi.STATUS_CODES[426];e.writeHead(426,{"Content-Length":i.length,"Content-Type":"text/plain"}),e.end(i)})),this._server.listen(t.port,t.host,t.backlog,e)):t.server&&(this._server=t.server),this._server){const t=this.emit.bind(this,"connection");this._removeListeners=ki(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(e,i,r)=>{this.handleUpgrade(e,i,r,t)}})}!0===t.perMessageDeflate&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=yi}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===_i)return t&&this.once("close",(()=>{t(new Error("The server is not running"))})),void c.nextTick(Ei,this);if(t&&this.once("close",t),this._state!==wi)if(this._state=wi,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:c.nextTick(Ei,this);else{const t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close((()=>{Ei(this)}))}}shouldHandle(t){if(this.options.path){const e=t.url.indexOf("?"),i=-1!==e?t.url.slice(0,e):t.url;if(i!==this.options.path)return!1}return!0}handleUpgrade(t,e,i,r){e.on("error",xi);const n=t.headers["sec-websocket-key"],o=+t.headers["sec-websocket-version"];if("GET"!==t.method){const i="Invalid HTTP method";return void Ri(this,t,e,405,i)}if("websocket"!==t.headers.upgrade.toLowerCase()){const i="Invalid Upgrade header";return void Ri(this,t,e,400,i)}if(!n||!vi.test(n)){const i="Missing or invalid Sec-WebSocket-Key header";return void Ri(this,t,e,400,i)}if(8!==o&&13!==o){const i="Missing or invalid Sec-WebSocket-Version header";return void Ri(this,t,e,400,i)}if(!this.shouldHandle(t))return void Ai(e,400);const s=t.headers["sec-websocket-protocol"];let a=new Set;if(void 0!==s)try{a=pi.parse(s)}catch(f){const i="Invalid Sec-WebSocket-Protocol header";return void Ri(this,t,e,400,i)}const h=t.headers["sec-websocket-extensions"],u={};if(this.options.perMessageDeflate&&void 0!==h){const i=new ci(this.options.perMessageDeflate,!0,this.options.maxPayload);try{const t=di.parse(h);t[ci.extensionName]&&(i.accept(t[ci.extensionName]),u[ci.extensionName]=i)}catch(f){const i="Invalid or unacceptable Sec-WebSocket-Extensions header";return void Ri(this,t,e,400,i)}}if(this.options.verifyClient){const s={origin:t.headers[""+(8===o?"sec-websocket-origin":"origin")],secure:!(!t.socket.authorized&&!t.socket.encrypted),req:t};if(2===this.options.verifyClient.length)return void this.options.verifyClient(s,((o,s,h,f)=>{if(!o)return Ai(e,s||401,h,f);this.completeUpgrade(u,n,a,t,e,i,r)}));if(!this.options.verifyClient(s))return Ai(e,401)}this.completeUpgrade(u,n,a,t,e,i,r)}completeUpgrade(t,e,i,r,n,o,s){if(!n.readable||!n.writable)return n.destroy();if(n[gi])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>yi)return Ai(n,503);const a=li("sha1").update(e+bi).digest("base64"),h=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${a}`],u=new this.options.WebSocket(null);if(i.size){const t=this.options.handleProtocols?this.options.handleProtocols(i,r):i.values().next().value;t&&(h.push(`Sec-WebSocket-Protocol: ${t}`),u._protocol=t)}if(t[ci.extensionName]){const e=t[ci.extensionName].params,i=di.format({[ci.extensionName]:[e]});h.push(`Sec-WebSocket-Extensions: ${i}`),u._extensions=t}this.emit("headers",h,r),n.write(h.concat("\r\n").join("\r\n")),n.removeListener("error",xi),u.setSocket(n,o,{maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",(()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&c.nextTick(Ei,this)}))),s(u,r)}}var Si=Mi;function ki(t,e){for(const i of Object.keys(e))t.on(i,e[i]);return function(){for(const i of Object.keys(e))t.removeListener(i,e[i])}}function Ei(t){t._state=_i,t.emit("close")}function xi(){this.destroy()}function Ai(t,e,i,r){i=i||fi.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":p.byteLength(i),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${fi.STATUS_CODES[e]}\r\n`+Object.keys(r).map((t=>`${t}: ${r[t]}`)).join("\r\n")+"\r\n\r\n"+i)}function Ri(t,e,i,r,n){if(t.listenerCount("wsClientError")){const r=new Error(n);Error.captureStackTrace(r,Ri),t.emit("wsClientError",r,i,e)}else Ai(i,r,n)}const Ti=Si},4946:function(t){"use strict";t.exports=JSON.parse('{"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":{"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"},"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"}}')},5207:function(t){"use strict";t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"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":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"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":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:function(t){"use strict";t.exports=JSON.parse('{"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"}')},9799:function(t){"use strict";t.exports=JSON.parse('{"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"}}')},8597:function(t){"use strict";t.exports={i8:"6.5.4"}},2562:function(t){"use strict";t.exports=JSON.parse('{"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"}')}}]); //# sourceMappingURL=681.3863b0a5.js.map