ethers.js/dist/ethers-wallet.min.js

9 lines
299 KiB
JavaScript
Raw Normal View History

!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Wallet=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){(function(c){"use strict";var d=a("rlp"),e=a("scrypt-js"),f=(a("./lib/contract.js"),a("./lib/providers.js")),g=a("./lib/secret-storage.js"),h=a("./lib/randomish.js"),i=a("./lib/signing-key.js"),j=a("./lib/wallet.js"),k=a("./lib/utils.js"),l=k.BN,m={};k.defineProperty(j,"utils",m),k.defineProperty(m,"BN",l),k.defineProperty(m,"Buffer",c),k.defineProperty(m,"sha3",k.sha3),k.defineProperty(m,"sha256",k.sha256),k.defineProperty(m,"getContractAddress",function(a){return i.getAddress("0x"+k.sha3(d.encode([k.hexOrBuffer(k.getAddress(a.from)),k.hexOrBuffer(k.hexlify(a.nonce,"nonce"))])).slice(12).toString("hex"))}),b.exports=j,k.defineProperty(j,"etherSymbol","𝝣"),k.defineProperty(j,"isCrowdsaleWallet",g.isCrowdsaleWallet),k.defineProperty(j,"isValidWallet",g.isValidWallet),k.defineProperty(j,"decryptCrowdsale",function(a,b){return new j(g.decryptCrowdsale(a,b))}),k.defineProperty(j,"decrypt",function(a,b,c){if("function"!=typeof c)throw new Error("invalid callback");g.decrypt(a,b,function(a,b,d){return b?c(a,new j(b),d):c(a,b,d)})}),k.defineProperty(j.prototype,"encrypt",function(a,b,c){if("function"!=typeof b||c||(c=b,b={}),"function"!=typeof c)throw new Error("invalid callback");g.encrypt(this.privateKey,a,b,c)}),k.defineProperty(j,"summonBrainWallet",function(a,b,d){if("function"!=typeof d)throw new Error("invalid callback");e(b,a,1<<18,8,1,32,function(a,b,e){return e?d(a,new j(new c(e)),1):d(a,null,b)})}),k.defineProperty(j,"providers",f),k.defineProperty(j,"randomish",new h),b.exports=j}).call(this,a("buffer").Buffer)},{"./lib/contract.js":4,"./lib/providers.js":5,"./lib/randomish.js":6,"./lib/secret-storage.js":7,"./lib/signing-key.js":8,"./lib/utils.js":9,"./lib/wallet.js":10,buffer:40,rlp:84,"scrypt-js":85}],2:[function(a,b,c){(function(c,d){"use strict";function e(a){if(a<=0||a>1024||parseInt(a)!=a)throw new Error("invalid length");var b=new d(a);return g.getRandomValues(b),b}var f=a("./utils.js"),g=c.crypto||c.msCrypto;g&&g.getRandomValues?console.log("Found strong random number source"):(console.log("WARNING: Missing strong random number source; using weak randomBytes"),g={getRandomValues:function(a){for(var b=0;b<buffer.length;b++)buffer[b]=parseInt(256*Math.random());return buffer},_weakCrypto:!0}),g._weakCrypto===!0&&f.defineProperty(e,"_weakCrypto",!0),b.exports=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer)},{"./utils.js":9,buffer:40}],3:[function(a,b,c){"use strict";try{b.exports.XMLHttpRequest=XMLHttpRequest}catch(d){console.log("Warning: XMLHttpRequest is not defined"),b.exports.XMLHttpRequest=null}},{}],4:[function(a,b,c){(function(c){"use strict";function d(a,b,c){var d=JSON.stringify(c);Object.defineProperty(a,b,{enumerable:!0,get:function(){return JSON.parse(d)}})}function e(a,b){if(!Array.isArray(a))throw new Error("invalid params");for(var c=[],d=0;d<a.length;d++){if("string"!=typeof a[d][b])throw new Error("invalid abi");c.push(a[d][b])}return c}function f(a){if(!a.eq){if("number"!=typeof a)throw new Error("invalid number");a=new o.BN(a)}return a}function g(a,b){return{encode:function(d){return d=f(d),d=d.toTwos(8*a).and(p[a]),b&&(d=d.fromTwos(8*a).toTwos(256)),d.toArrayLike(c,"be",32)},decode:function(c,d){var e=32-a,f=new o.BN(c.slice(d+e,d+32));return f=b?f.fromTwo
g(a)})})}),j.defineProperty(e.prototype,"send",function(a,b,c){if(a=i.getAddress(a),j.BN.isBN(b)&&(b="0x"+j.bnToBuffer(b).toString("hex")),!j.isHexString(b))throw new Error("invalid amountWei");return c||(c={}),this.sendTransaction({to:a,gasLimit:c.gasLimit,gasPrice:c.gasPrice,nonce:c.nonce,value:b})}),j.defineProperty(e.prototype,"getContract",function(a,b){return new g(this,a,new g.Interface(b))}),j.defineProperty(e,"getAddress",i.getAddress),j.defineProperty(e,"getIcapAddress",i.getIcapAddress),j.defineProperty(e,"_Contract",g);var l=new j.BN(0),m=new j.BN((-1)),n=new j.BN("1000000000000000000");j.defineProperty(e,"formatEther",function(a,b){if("number"==typeof a&&(a=new j.BN(a)),b||(b={}),!(a instanceof j.BN))throw new Error("invalid wei");var c=a.lt(l);c&&(a=a.mul(m));for(var d=a.mod(n).toString(10);d.length<18;)d="0"+d;b.pad||(d=d.match(/^([0-9]*[1-9]|0)(0*)/)[1]);var e=a.div(n).toString(10);b.commify&&(e=e.replace(/\B(?=(\d{3})+(?!\d))/g,","));var f=e+"."+d;return c&&(f="-"+f),f}),j.defineProperty(e,"parseEther",function(a){if("string"!=typeof a||!a.match(/^-?[0-9.]+$/))throw new Error("invalid value");var b="-"===a.substring(0,1);if(b&&(a=a.substring(1)),"."===a)throw new Error("invalid value");var c=a.split(".");if(c.length>2)throw new Error("too many decimal points");var d=c[0],e=c[1];if(d||(d="0"),e||(e="0"),e.length>18)throw new Error("too many decimal places");for(;e.length<18;)e+="0";d=new j.BN(d),e=new j.BN(e);var f=d.mul(n).add(e);return b&&(f=f.mul(m)),f}),b.exports=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},a("buffer").Buffer)},{"./contract.js":4,"./providers.js":5,"./signing-key.js":8,"./utils.js":9,buffer:40,rlp:84}],11:[function(b,c,d){(function(b){"use strict";!function(e){function f(a){for(var b=[],c=0;c<a.length;c+=4)b.push(a[c]<<24|a[c+1]<<16|a[c+2]<<8|a[c+3]);return b}var g,h=null,i=null,j=null,k=function(a){if("number"==typeof a){for(var b=[],c=0;c<a;c++)b.push(0);return b}for(var c=0;c<a.length;c++)if(a[c]<0||a[c]>=256||"number"!=typeof a[c])throw new Error("invalid byte ("+a[c]+":"+c+")");if(a.slice)return a.slice(0);for(var b=[],c=0;c<a.length;c++)b.push(a[c]);return b};if("undefined"==typeof b){h=k,i=function(a,b,c,d,e){null==c&&(c=0),null==d&&(d=0),null==e&&(e=a.length);for(var f=d;f<e;f++)b[c++]=a[f]},j=function(a,b){if(null==b||"utf8"==b.toLowerCase().replace(/ |-/g,"")){var c=[],d=0;for(a=encodeURI(a);d<a.length;){var e=a.charCodeAt(d++);37===e?(c.push(parseInt(a.substr(d,2),16)),d+=2):c.push(e)}return c}if("hex"==b.toLowerCase()){for(var c=[],d=0;d<a.length;d+=2)c.push(parseInt(a.substr(d,2),16));return c}return null};var l="0123456789abcdef";g=function(a,b){if(null==b||"utf8"==b.toLowerCase().replace(/ |-/g,"")){for(var c=[],d=0;d<a.length;){var e=a[d];e<128?(c.push(String.fromCharCode(e)),d++):e>191&&e<224?(c.push(String.fromCharCode((31&e)<<6|63&a[d+1])),d+=2):(c.push(String.fromCharCode((15&e)<<12|(63&a[d+1])<<6|63&a[d+2])),d+=3)}return c.join("")}if("hex"==b.toLowerCase()){for(var c=[],d=0;d<a.length;d++){var f=a[d];c.push(l[(240&f)>>4]+l[15&f])}return c.join("")}return c}}else h=function(a){return new b(a)},i=function(a,b,c,d,e){a.copy(b,c,d,e)},j=function(a,c){return new b(a,c)},g=function(a,c){return new b(a).toString(c)};var m={16:10,24:12,32:14},n=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],o=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244
2016-08-03 00:46:38 +03:00
if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.key=h(a),this._prepare()};C.prototype._prepare=function(){var a=m[this.key.length];if(null==a)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var b=0;b<=a;b++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var c,d=4*(a+1),e=this.key.length/4,g=f(this.key),b=0;b<e;b++)c=b>>2,this._Ke[c][b%4]=g[b],this._Kd[a-c][b%4]=g[b];for(var h,i=0,j=e;j<d;){if(h=g[e-1],g[0]^=o[h>>16&255]<<24^o[h>>8&255]<<16^o[255&h]<<8^o[h>>24&255]^n[i]<<24,i+=1,8!=e)for(var b=1;b<e;b++)g[b]^=g[b-1];else{for(var b=1;b<e/2;b++)g[b]^=g[b-1];h=g[e/2-1],g[e/2]^=o[255&h]^o[h>>8&255]<<8^o[h>>16&255]<<16^o[h>>24&255]<<24;for(var b=e/2+1;b<e;b++)g[b]^=g[b-1]}for(var k,l,b=0;b<e&&j<d;)k=j>>2,l=j%4,this._Ke[k][l]=g[b],this._Kd[a-k][l]=g[b++],j++}for(var k=1;k<a;k++)for(var l=0;l<4;l++)h=this._Kd[k][l],this._Kd[k][l]=y[h>>24&255]^z[h>>16&255]^A[h>>8&255]^B[255&h]},C.prototype.encrypt=function(a){if(16!=a.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var b=this._Ke.length-1,c=[0,0,0,0],d=f(a),e=0;e<4;e++)d[e]^=this._Ke[0][e];for(var g=1;g<b;g++){for(var e=0;e<4;e++)c[e]=q[d[e]>>24&255]^r[d[(e+1)%4]>>16&255]^s[d[(e+2)%4]>>8&255]^t[255&d[(e+3)%4]]^this._Ke[g][e];d=c.slice(0)}for(var i,j=h(16),e=0;e<4;e++)i=this._Ke[b][e],j[4*e]=255&(o[d[e]>>24&255]^i>>24),j[4*e+1]=255&(o[d[(e+1)%4]>>16&255]^i>>16),j[4*e+2]=255&(o[d[(e+2)%4]>>8&255]^i>>8),j[4*e+3]=255&(o[255&d[(e+3)%4]]^i);return j},C.prototype.decrypt=function(a){if(16!=a.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var b=this._Kd.length-1,c=[0,0,0,0],d=f(a),e=0;e<4;e++)d[e]^=this._Kd[0][e];for(var g=1;g<b;g++){for(var e=0;e<4;e++)c[e]=u[d[e]>>24&255]^v[d[(e+3)%4]>>16&255]^w[d[(e+2)%4]>>8&255]^x[255&d[(e+1)%4]]^this._Kd[g][e];d=c.slice(0)}for(var i,j=h(16),e=0;e<4;e++)i=this._Kd[b][e],j[4*e]=255&(p[d[e]>>24&255]^i>>24),j[4*e+1]=255&(p[d[(e+3)%4]>>16&255]^i>>16),j[4*e+2]=255&(p[d[(e+2)%4]>>8&255]^i>>8),j[4*e+3]=255&(p[255&d[(e+1)%4]]^i);return j};var D=function(a){if(!(this instanceof D))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new C(a)};D.prototype.encrypt=function(a){return this._aes.encrypt(a)},D.prototype.decrypt=function(a,b){return this._aes.decrypt(a)};var E=function(a,b){if(!(this instanceof E))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",b){if(16!=b.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else b=h([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);this._lastCipherblock=h(b),this._aes=new C(a)};E.prototype.encrypt=function(a){if(16!=a.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var b=h(a),c=0;c<16;c++)b[c]^=this._lastCipherblock[c];return this._lastCipherblock=this._aes.encrypt(b),this._lastCipherblock},E.prototype.decrypt=function(a){if(16!=a.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var b=this._aes.decrypt(a),c=0;c<16;c++)b[c]^=this._lastCipherblock[c];return i(a,this._lastCipherblock),b};var F=function(a,b,c){if(!(this instanceof F))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",b){if(16!=b.length)throw new Error("invalid initialation vector size (must be 16 size)")}else b=h([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);c||(c=1),this.segmentSize=c,this._shiftRegister=h(b),this._aes=new C(a)};F.prototype.encrypt=function(a){if(a.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var b,c=h(a),d=0;d<c.length;d+=this.segmentSize){b=this._aes.encrypt(this._shiftRegister);for(var e=0;e<this.segmentSize;e++)c[d+e]^=b[e];i(this._shiftRegister,this._shiftRegister,0,this.segmentSize),i(c,this._shiftRegister,16-this.segmentSize,d,d+this.segmentSize)}return c},F.prototype.decrypt=function(a){if(a.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var b,c=h(a),d=0;d<c.le
g=g.redIAdd(g),g=g.redAdd(g).redIAdd(g),g=g.redISub(f);var h=g.redSqr(),i=d.redIAdd(d);i=i.redIAdd(i),i=i.redIAdd(i),i=i.redIAdd(i);var j=e.redIAdd(g).redSqr().redISub(f).redISub(h).redISub(i),k=b.redMul(j);k=k.redIAdd(k),k=k.redIAdd(k);var l=this.x.redMul(h).redISub(k);l=l.redIAdd(l),l=l.redIAdd(l);var m=this.y.redMul(j.redMul(i.redISub(j)).redISub(g.redMul(h)));m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m);var n=this.z.redAdd(g).redSqr().redISub(c).redISub(h);return this.curve.jpoint(l,m,n)},f.prototype.mul=function(a,b){return a=new i(a,b),this.curve._wnafMul(this,a)},f.prototype.eq=function(a){if("affine"===a.type)return this.eq(a.toJ());if(this===a)return!0;var b=this.z.redSqr(),c=a.z.redSqr();if(0!==this.x.redMul(c).redISub(a.x.redMul(b)).cmpn(0))return!1;var d=b.redMul(this.z),e=c.redMul(a.z);return 0===this.y.redMul(e).redISub(a.y.redMul(d)).cmpn(0)},f.prototype.eqXToP=function(a){var b=this.z.redSqr(),c=a.toRed(this.curve.red).redMul(b);if(0===this.x.cmp(c))return!0;for(var d=a.clone(),e=this.curve.redN.redMul(b);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return!1;if(c.redIAdd(e),0===this.x.cmp(c))return!0}return!1},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":12,"../curve":15,"bn.js":28,inherits:36}],18:[function(a,b,c){"use strict";function d(a){"short"===a.type?this.curve=new h.curve["short"](a):"edwards"===a.type?this.curve=new h.curve.edwards(a):this.curve=new h.curve.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function e(a,b){Object.defineProperty(f,a,{configurable:!0,enumerable:!0,get:function(){var c=new d(b);return Object.defineProperty(f,a,{configurable:!0,enumerable:!0,value:c}),c}})}var f=c,g=a("hash.js"),h=a("../elliptic"),i=h.utils.assert;f.PresetCurve=d,e("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:g.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),e("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:g.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),e("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:g.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),e("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:g.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 2
2016-07-27 10:03:14 +03:00
}}},{}],27:[function(a,b,c){"use strict";function d(a,b){if(Array.isArray(a))return a.slice();if(!a)return[];var c=[];if("string"!=typeof a){for(var d=0;d<a.length;d++)c[d]=0|a[d];return c}if(b){if("hex"===b){a=a.replace(/[^a-z0-9]+/gi,""),a.length%2!==0&&(a="0"+a);for(var d=0;d<a.length;d+=2)c.push(parseInt(a[d]+a[d+1],16))}}else for(var d=0;d<a.length;d++){var e=a.charCodeAt(d),f=e>>8,g=255&e;f?c.push(f,g):c.push(g)}return c}function e(a){return 1===a.length?"0"+a:a}function f(a){for(var b="",c=0;c<a.length;c++)b+=e(a[c].toString(16));return b}function g(a,b){for(var c=[],d=1<<b+1,e=a.clone();e.cmpn(1)>=0;){var f;if(e.isOdd()){var g=e.andln(d-1);f=g>(d>>1)-1?(d>>1)-g:g,e.isubn(f)}else f=0;c.push(f);for(var h=0!==e.cmpn(0)&&0===e.andln(d-1)?b+1:1,i=1;i<h;i++)c.push(0);e.iushrn(h)}return c}function h(a,b){var c=[[],[]];a=a.clone(),b=b.clone();for(var d=0,e=0;a.cmpn(-d)>0||b.cmpn(-e)>0;){var f=a.andln(3)+d&3,g=b.andln(3)+e&3;3===f&&(f=-1),3===g&&(g=-1);var h;if(0===(1&f))h=0;else{var i=a.andln(7)+d&7;h=3!==i&&5!==i||2!==g?f:-f}c[0].push(h);var j;if(0===(1&g))j=0;else{var i=b.andln(7)+e&7;j=3!==i&&5!==i||2!==f?g:-g}c[1].push(j),2*d===h+1&&(d=1-d),2*e===j+1&&(e=1-e),a.iushrn(1),b.iushrn(1)}return c}function i(a,b,c){var d="_"+b;a.prototype[b]=function(){return void 0!==this[d]?this[d]:this[d]=c.call(this)}}function j(a){return"string"==typeof a?l.toArray(a,"hex"):a}function k(a){return new m(a,"hex","le")}var l=c,m=a("bn.js");l.assert=function(a,b){if(!a)throw new Error(b||"Assertion failed")},l.toArray=d,l.zero2=e,l.toHex=f,l.encode=function(a,b){return"hex"===b?f(a):a},l.getNAF=g,l.getJSF=h,l.cachedProperty=i,l.parseBytes=j,l.intFromLE=k},{"bn.js":28}],28:[function(a,b,c){!function(b,c){"use strict";function d(a,b){if(!a)throw new Error(b||"Assertion failed")}function e(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}function f(a,b,c){return f.isBN(a)?a:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==a&&("le"!==b&&"be"!==b||(c=b,b=10),this._init(a||0,b||10,c||"be"))))}function g(a,b,c){for(var d=0,e=Math.min(a.length,c),f=b;f<e;f++){var g=a.charCodeAt(f)-48;d<<=4,d|=g>=49&&g<=54?g-49+10:g>=17&&g<=22?g-17+10:15&g}return d}function h(a,b,c,d){for(var e=0,f=Math.min(a.length,c),g=b;g<f;g++){var h=a.charCodeAt(g)-48;e*=d,e+=h>=49?h-49+10:h>=17?h-17+10:h}return e}function i(a){for(var b=new Array(a.bitLength()),c=0;c<b.length;c++){var d=c/26|0,e=c%26;b[c]=(a.words[d]&1<<e)>>>e}return b}function j(a,b,c){c.negative=b.negative^a.negative;var d=a.length+b.length|0;c.length=d,d=d-1|0;var e=0|a.words[0],f=0|b.words[0],g=e*f,h=67108863&g,i=g/67108864|0;c.words[0]=h;for(var j=1;j<d;j++){for(var k=i>>>26,l=67108863&i,m=Math.min(j,b.length-1),n=Math.max(0,j-a.length+1);n<=m;n++){var o=j-n|0;e=0|a.words[o],f=0|b.words[n],g=e*f+l,k+=g/67108864|0,l=67108863&g}c.words[j]=0|l,i=0|k}return 0!==i?c.words[j]=0|i:c.length--,c.strip()}function k(a,b,c){c.negative=b.negative^a.negative,c.length=a.length+b.length;for(var d=0,e=0,f=0;f<c.length-1;f++){var g=e;e=0;for(var h=67108863&d,i=Math.min(f,b.length-1),j=Math.max(0,f-a.length+1);j<=i;j++){var k=f-j,l=0|a.words[k],m=0|b.words[j],n=l*m,o=67108863&n;g=g+(n/67108864|0)|0,o=o+h|0,h=67108863&o,g=g+(o>>>26)|0,e+=g>>>26,g&=67108863}c.words[f]=h,d=g,g=e}return 0!==d?c.words[f]=d:c.length--,c.strip()}function l(a,b,c){var d=new m;return d.mulp(a,b,c)}function m(a,b){this.x=a,this.y=b}function n(a,b){this.name=a,this.p=new f(b,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function o(){n.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){n.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function q(){n.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function r(){n.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function s(a){if("string"==typeof a){var b=f._prime(a);this.m=b.p,this.prime=b}else d(a.gtn(1),"modulus must be gre
var i,j=d.length-e.length;if("mod"!==b){i=new f(null),i.length=j+1,i.words=new Array(i.length);for(var k=0;k<i.length;k++)i.words[k]=0}var l=d.clone()._ishlnsubmul(e,1,j);0===l.negative&&(d=l,i&&(i.words[j]=1));for(var m=j-1;m>=0;m--){var n=67108864*(0|d.words[e.length+m])+(0|d.words[e.length+m-1]);for(n=Math.min(n/g|0,67108863),d._ishlnsubmul(e,n,m);0!==d.negative;)n--,d.negative=0,d._ishlnsubmul(e,1,m),d.isZero()||(d.negative^=1);i&&(i.words[m]=n)}return i&&i.strip(),d.strip(),"div"!==b&&0!==c&&d.iushrn(c),{div:i||null,mod:d}},f.prototype.divmod=function(a,b,c){if(d(!a.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var e,g,h;return 0!==this.negative&&0===a.negative?(h=this.neg().divmod(a,b),"mod"!==b&&(e=h.div.neg()),"div"!==b&&(g=h.mod.neg(),c&&0!==g.negative&&g.iadd(a)),{div:e,mod:g}):0===this.negative&&0!==a.negative?(h=this.divmod(a.neg(),b),"mod"!==b&&(e=h.div.neg()),{div:e,mod:h.mod}):0!==(this.negative&a.negative)?(h=this.neg().divmod(a.neg(),b),"div"!==b&&(g=h.mod.neg(),c&&0!==g.negative&&g.isub(a)),{div:h.div,mod:g}):a.length>this.length||this.cmp(a)<0?{div:new f(0),mod:this}:1===a.length?"div"===b?{div:this.divn(a.words[0]),mod:null}:"mod"===b?{div:null,mod:new f(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new f(this.modn(a.words[0]))}:this._wordDiv(a,b)},f.prototype.div=function(a){return this.divmod(a,"div",!1).div},f.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},f.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},f.prototype.divRound=function(a){var b=this.divmod(a);if(b.mod.isZero())return b.div;var c=0!==b.div.negative?b.mod.isub(a):b.mod,d=a.ushrn(1),e=a.andln(1),f=c.cmp(d);return f<0||1===e&&0===f?b.div:0!==b.div.negative?b.div.isubn(1):b.div.iaddn(1)},f.prototype.modn=function(a){d(a<=67108863);for(var b=(1<<26)%a,c=0,e=this.length-1;e>=0;e--)c=(b*c+(0|this.words[e]))%a;return c},f.prototype.idivn=function(a){d(a<=67108863);for(var b=0,c=this.length-1;c>=0;c--){var e=(0|this.words[c])+67108864*b;this.words[c]=e/a|0,b=e%a}return this.strip()},f.prototype.divn=function(a){return this.clone().idivn(a)},f.prototype.egcd=function(a){d(0===a.negative),d(!a.isZero());var b=this,c=a.clone();b=0!==b.negative?b.umod(a):b.clone();for(var e=new f(1),g=new f(0),h=new f(0),i=new f(1),j=0;b.isEven()&&c.isEven();)b.iushrn(1),c.iushrn(1),++j;for(var k=c.clone(),l=b.clone();!b.isZero();){for(var m=0,n=1;0===(b.words[0]&n)&&m<26;++m,n<<=1);if(m>0)for(b.iushrn(m);m-- >0;)(e.isOdd()||g.isOdd())&&(e.iadd(k),g.isub(l)),e.iushrn(1),g.iushrn(1);for(var o=0,p=1;0===(c.words[0]&p)&&o<26;++o,p<<=1);if(o>0)for(c.iushrn(o);o-- >0;)(h.isOdd()||i.isOdd())&&(h.iadd(k),i.isub(l)),h.iushrn(1),i.iushrn(1);b.cmp(c)>=0?(b.isub(c),e.isub(h),g.isub(i)):(c.isub(b),h.isub(e),i.isub(g))}return{a:h,b:i,gcd:c.iushln(j)}},f.prototype._invmp=function(a){d(0===a.negative),d(!a.isZero());var b=this,c=a.clone();b=0!==b.negative?b.umod(a):b.clone();for(var e=new f(1),g=new f(0),h=c.clone();b.cmpn(1)>0&&c.cmpn(1)>0;){for(var i=0,j=1;0===(b.words[0]&j)&&i<26;++i,j<<=1);if(i>0)for(b.iushrn(i);i-- >0;)e.isOdd()&&e.iadd(h),e.iushrn(1);for(var k=0,l=1;0===(c.words[0]&l)&&k<26;++k,l<<=1);if(k>0)for(c.iushrn(k);k-- >0;)g.isOdd()&&g.iadd(h),g.iushrn(1);b.cmp(c)>=0?(b.isub(c),e.isub(g)):(c.isub(b),g.isub(e))}var m;return m=0===b.cmpn(1)?e:g,m.cmpn(0)<0&&m.iadd(a),m},f.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var b=this.clone(),c=a.clone();b.negative=0,c.negative=0;for(var d=0;b.isEven()&&c.isEven();d++)b.iushrn(1),c.iushrn(1);for(;;){for(;b.isEven();)b.iushrn(1);for(;c.isEven();)c.iushrn(1);var e=b.cmp(c);if(e<0){var f=b;b=c,c=f}else if(0===e||0===c.cmpn(1))break;b.isub(c)}return c.iushln(d)},f.prototype.invm=function(a){return this.egcd(a).a.umod(a)},f.prototype.isEven=function(){return 0===(1&this.words[0])},f.prototype.isOdd=function(){return 1===(1&this.words[0])},f.prototype.andln=function(a){return this.words[0]&a},f.prototype.bincn=function(a){d("number"==typeof a);var b=a%26,c=(a-b)/26,e=1<<b;if(this.length<=c)return this._expand(c+1),this.words[c]|=e,th
}function j(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function k(a,b){if(n.isNullOrUndefined(a)||n.isNullOrUndefined(b))return!1;if(a.prototype!==b.prototype)return!1;if(n.isPrimitive(a)||n.isPrimitive(b))return a===b;var c=j(a),d=j(b);if(c&&!d||!c&&d)return!1;if(c)return a=o.call(a),b=o.call(b),i(a,b);var e,f,g=r(a),h=r(b);if(g.length!=h.length)return!1;for(g.sort(),h.sort(),f=g.length-1;f>=0;f--)if(g[f]!=h[f])return!1;for(f=g.length-1;f>=0;f--)if(e=g[f],!i(a[e],b[e]))return!1;return!0}function l(a,b){return!(!a||!b)&&("[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b||b.call({},a)===!0)}function m(a,b,c,d){var e;n.isString(c)&&(d=c,c=null);try{b()}catch(f){e=f}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&g(e,c,"Missing expected exception"+d),!a&&l(e,c)&&g(e,c,"Got unwanted exception"+d),a&&e&&c&&!l(e,c)||!a&&e)throw e}var n=a("util/"),o=Array.prototype.slice,p=Object.prototype.hasOwnProperty,q=b.exports=h;q.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=f(this),this.generatedMessage=!0);var b=a.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,b);else{var c=new Error;if(c.stack){var d=c.stack,e=b.name,h=d.indexOf("\n"+e);if(h>=0){var i=d.indexOf("\n",h+1);d=d.substring(i+1)}this.stack=d}}},n.inherits(q.AssertionError,Error),q.fail=g,q.ok=h,q.equal=function(a,b,c){a!=b&&g(a,b,c,"==",q.equal)},q.notEqual=function(a,b,c){a==b&&g(a,b,c,"!=",q.notEqual)},q.deepEqual=function(a,b,c){i(a,b)||g(a,b,c,"deepEqual",q.deepEqual)},q.notDeepEqual=function(a,b,c){i(a,b)&&g(a,b,c,"notDeepEqual",q.notDeepEqual)},q.strictEqual=function(a,b,c){a!==b&&g(a,b,c,"===",q.strictEqual)},q.notStrictEqual=function(a,b,c){a===b&&g(a,b,c,"!==",q.notStrictEqual)},q["throws"]=function(a,b,c){m.apply(this,[!0].concat(o.call(arguments)))},q.doesNotThrow=function(a,b){m.apply(this,[!1].concat(o.call(arguments)))},q.ifError=function(a){if(a)throw a};var r=Object.keys||function(a){var b=[];for(var c in a)p.call(a,c)&&b.push(c);return b}},{"util/":66}],39:[function(a,b,c){},{}],40:[function(a,b,c){(function(b){"use strict";function d(){try{var a=new Uint8Array(1);return a.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===a.foo()&&"function"==typeof a.subarray&&0===a.subarray(1,1).byteLength}catch(b){return!1}}function e(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(a,b){if(e()<b)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(a=new Uint8Array(b),a.__proto__=g.prototype):(null===a&&(a=new g(b)),a.length=b),a}function g(a,b,c){if(!(g.TYPED_ARRAY_SUPPORT||this instanceof g))return new g(a,b,c);if("number"==typeof a){if("string"==typeof b)throw new Error("If encoding is specified then the first argument must be a string");return k(this,a)}return h(this,a,b,c)}function h(a,b,c,d){if("number"==typeof b)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&b instanceof ArrayBuffer?n(a,b,c,d):"string"==typeof b?l(a,b,c):o(a,b)}function i(a){if("number"!=typeof a)throw new TypeError('"size" argument must be a number')}function j(a,b,c,d){return i(b),b<=0?f(a,b):void 0!==c?"string"==typeof d?f(a,b).fill(c,d):f(a,b).fill(c):f(a,b)}function k(a,b){if(i(b),a=f(a,b<0?0:0|p(b)),!g.TYPED_ARRAY_SUPPORT)for(var c=0;c<b;++c)a[c]=0;return a}function l(a,b,c){if("string"==typeof c&&""!==c||(c="utf8"),!g.isEncoding(c))throw new TypeError('"encoding" must be a valid string encoding');var d=0|r(b,c);return a=f(a,d),a.write(b,c),a}function m(a,b){var c=0|p(b.length);a=f(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function n(a,b,c,d){if(b.byteLength,c<0||b.byteLength<c)throw new RangeError("'offset' is out of bounds");if(b.byteLength<c+(d||0))throw new RangeError("'length' is out of bounds");return b=void 0===c&&void 0===d?new Uint8Array(b):void 0===d?new Uint8Array(b,c):new Uint8Array(b,c,d),g.TYPED_ARRAY_SUPPORT?(a
a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a++),a}function j(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:null===a||isNaN(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:a<=0?0:(a>b.highWaterMark&&(b.highWaterMark=i(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function k(a,b){var c=null;return F.isBuffer(b)||"string"==typeof b||null===b||void 0===b||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function l(a,b){if(!b.ended){if(b.decoder){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,m(a)}}function m(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(J("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?A(n,a):n(a))}function n(a){J("emit readable"),a.emit("readable"),u(a)}function o(a,b){b.readingMore||(b.readingMore=!0,A(p,a,b))}function p(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length<b.highWaterMark&&(J("maybeReadMore read 0"),a.read(0),c!==b.length);)c=b.length;b.readingMore=!1}function q(a){return function(){var b=a._readableState;J("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,0===b.awaitDrain&&E(a,"data")&&(b.flowing=!0,u(a))}}function r(a){J("readable nexttick read 0"),a.read(0)}function s(a,b){b.resumeScheduled||(b.resumeScheduled=!0,A(t,a,b))}function t(a,b){b.reading||(J("resume read 0"),a.read(0)),b.resumeScheduled=!1,a.emit("resume"),u(a),b.flowing&&!b.reading&&a.read(0)}function u(a){var b=a._readableState;if(J("flow",b.flowing),b.flowing)do var c=a.read();while(null!==c&&b.flowing)}function v(a,b){var c,d=b.buffer,e=b.length,f=!!b.decoder,g=!!b.objectMode;if(0===d.length)return null;if(0===e)c=null;else if(g)c=d.shift();else if(!a||a>=e)c=f?d.join(""):1===d.length?d[0]:F.concat(d,e),d.length=0;else if(a<d[0].length){var h=d[0];c=h.slice(0,a),d[0]=h.slice(a)}else if(a===d[0].length)c=d.shift();else{c=f?"":G.allocUnsafe(a);for(var i=0,j=0,k=d.length;j<k&&i<a;j++){var l=d[0],m=Math.min(a-i,l.length);f?c+=l.slice(0,m):l.copy(c,i,0,m),m<l.length?d[0]=l.slice(m):d.shift(),i+=m}}return c}function w(a){var b=a._readableState;if(b.length>0)throw new Error('"endReadable()" called on non-empty stream');b.endEmitted||(b.ended=!0,A(x,b,a))}function x(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function y(a,b){for(var c=0,d=a.length;c<d;c++)b(a[c],c)}function z(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}b.exports=f;var A=a("process-nextick-args"),B=a("isarray");f.ReadableState=e;var C,D=a("events").EventEmitter,E=function(a,b){return a.listeners(b).length};!function(){try{C=a("stream")}catch(b){}finally{C||(C=a("events").EventEmitter)}}();var F=a("buffer").Buffer,G=a("buffer-shims"),H=a("core-util-is");H.inherits=a("inherits");var I=a("util"),J=void 0;J=I&&I.debuglog?I.debuglog("stream"):function(){};var K;H.inherits(f,C);var L,L,M="function"==typeof D.prototype.prependListener;f.prototype.push=function(a,b){var c=this._readableState;return c.objectMode||"string"!=typeof a||(b=b||c.defaultEncoding,b!==c.encoding&&(a=G.from(a,b),b="")),g(this,c,a,b,!1)},f.prototype.unshift=function(a){var b=this._readableState;return g(this,b,a,"",!0)},f.prototype.isPaused=function(){return this._readableState.flowing===!1},f.prototype.setEncoding=function(b){return K||(K=a("string_decoder/").StringDecoder),this._readableState.decoder=new K(b),this._readableState.encoding=b,this};var N=8388608;f.prototype.read=function(a){J("read",a);var b=this._readableState,c=a;if(("number"!=typeof a||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return J("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?w(this):m(this),null;if(a=j(a,b),0===a&&b.ended)return 0===b.length&&w(this),null;var d=b.needReadable;J("need readable",d),(0===b.length||b.length-a<b.highWaterMark)&&(d=!0,J("length less than watermark",d)),(b.ended||b.reading)&&(d=!1,J("reading or ended",d)),d&&(J("do read"),b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1),d&&!b.reading&&(a=j(c,
m=e-(j-1)*i),p.copy(n,0,0,i);for(var q=1;q<d;q++){p=f(h,a).update(p).digest();for(var r=0;r<i;r++)n[r]^=p[r]}var s=(o-1)*i,t=o===j?m:i;n.copy(k,s,0,t)}return k}var f=a("create-hmac"),g=Math.pow(2,30)-1;c.pbkdf2=d,c.pbkdf2Sync=e}).call(this,a("buffer").Buffer)},{buffer:40,"create-hmac":69}],69:[function(a,b,c){(function(c){"use strict";function d(a,b){g.call(this),a=a.toLowerCase(),"string"==typeof b&&(b=new c(b));var d="sha512"===a||"sha384"===a?128:64;this._alg=a,this._key=b,b.length>d?b=e(a).update(b).digest():b.length<d&&(b=c.concat([b,h],d));for(var f=this._ipad=new c(d),i=this._opad=new c(d),j=0;j<d;j++)f[j]=54^b[j],i[j]=92^b[j];this._hash=e(a).update(f)}var e=a("create-hash/browser"),f=a("inherits"),g=a("stream").Transform,h=new c(128);h.fill(0),f(d,g),d.prototype.update=function(a,b){return this._hash.update(a,b),this},d.prototype._transform=function(a,b,c){this._hash.update(a),c()},d.prototype._flush=function(a){this.push(this.digest()),a()},d.prototype.digest=function(a){var b=this._hash.digest();return e(this._alg).update(this._opad).update(b).digest(a)},b.exports=function(a,b){return new d(a,b)}}).call(this,a("buffer").Buffer)},{buffer:40,"create-hash/browser":70,inherits:83,stream:63}],70:[function(a,b,c){(function(c){"use strict";function d(a){j.call(this,"digest"),this._hash=a,this.buffers=[]}function e(a){j.call(this,"digest"),this._hash=a}var f=a("inherits"),g=a("./md5"),h=a("ripemd160"),i=a("sha.js"),j=a("cipher-base");f(d,j),d.prototype._update=function(a){this.buffers.push(a)},d.prototype._final=function(){var a=c.concat(this.buffers),b=this._hash(a);return this.buffers=null,b},f(e,j),e.prototype._update=function(a){this._hash.update(a)},e.prototype._final=function(){return this._hash.digest()},b.exports=function(a){return a=a.toLowerCase(),"md5"===a?new d(g):"rmd160"===a||"ripemd160"===a?new d(h):new e(i(a))}}).call(this,a("buffer").Buffer)},{"./md5":72,buffer:40,"cipher-base":73,inherits:83,ripemd160:74,"sha.js":76}],71:[function(a,b,c){(function(a){"use strict";function b(b,c){if(b.length%f!==0){var d=b.length+(f-b.length%f);b=a.concat([b,g],d)}for(var e=[],h=c?b.readInt32BE:b.readInt32LE,i=0;i<b.length;i+=f)e.push(h.call(b,i));return e}function d(b,c,d){for(var e=new a(c),f=d?e.writeInt32BE:e.writeInt32LE,g=0;g<b.length;g++)f.call(e,b[g],4*g,!0);return e}function e(c,e,f,g){a.isBuffer(c)||(c=new a(c));var i=e(b(c,g),c.length*h);return d(i,f,g)}var f=4,g=new a(f);g.fill(0);var h=8;c.hash=e}).call(this,a("buffer").Buffer)},{buffer:40}],72:[function(a,b,c){"use strict";function d(a,b){a[b>>5]|=128<<b%32,a[(b+64>>>9<<4)+14]=b;for(var c=1732584193,d=-271733879,e=-1732584194,k=271733878,l=0;l<a.length;l+=16){var m=c,n=d,o=e,p=k;c=f(c,d,e,k,a[l+0],7,-680876936),k=f(k,c,d,e,a[l+1],12,-389564586),e=f(e,k,c,d,a[l+2],17,606105819),d=f(d,e,k,c,a[l+3],22,-1044525330),c=f(c,d,e,k,a[l+4],7,-176418897),k=f(k,c,d,e,a[l+5],12,1200080426),e=f(e,k,c,d,a[l+6],17,-1473231341),d=f(d,e,k,c,a[l+7],22,-45705983),c=f(c,d,e,k,a[l+8],7,1770035416),k=f(k,c,d,e,a[l+9],12,-1958414417),e=f(e,k,c,d,a[l+10],17,-42063),d=f(d,e,k,c,a[l+11],22,-1990404162),c=f(c,d,e,k,a[l+12],7,1804603682),k=f(k,c,d,e,a[l+13],12,-40341101),e=f(e,k,c,d,a[l+14],17,-1502002290),d=f(d,e,k,c,a[l+15],22,1236535329),c=g(c,d,e,k,a[l+1],5,-165796510),k=g(k,c,d,e,a[l+6],9,-1069501632),e=g(e,k,c,d,a[l+11],14,643717713),d=g(d,e,k,c,a[l+0],20,-373897302),c=g(c,d,e,k,a[l+5],5,-701558691),k=g(k,c,d,e,a[l+10],9,38016083),e=g(e,k,c,d,a[l+15],14,-660478335),d=g(d,e,k,c,a[l+4],20,-405537848),c=g(c,d,e,k,a[l+9],5,568446438),k=g(k,c,d,e,a[l+14],9,-1019803690),e=g(e,k,c,d,a[l+3],14,-187363961),d=g(d,e,k,c,a[l+8],20,1163531501),c=g(c,d,e,k,a[l+13],5,-1444681467),k=g(k,c,d,e,a[l+2],9,-51403784),e=g(e,k,c,d,a[l+7],14,1735328473),d=g(d,e,k,c,a[l+12],20,-1926607734),c=h(c,d,e,k,a[l+5],4,-378558),k=h(k,c,d,e,a[l+8],11,-2022574463),e=h(e,k,c,d,a[l+11],16,1839030562),d=h(d,e,k,c,a[l+14],23,-35309556),c=h(c,d,e,k,a[l+1],4,-1530992060),k=h(k,c,d,e,a[l+4],11,1272893353),e=h(e,k,c,d,a[l+7],16,-155497632),d=h(d,e,k,c,a[l+10],23,-1094730640),c=h(c,d,e,k,a[l+13],4,681279174),k=h(k,c,d,e,