You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
652 KiB
1 lines
652 KiB
(function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,t.bch=e()}})(function(){var t=Math.LN2,r=Math.log,o=Math.pow,s=Math.abs,e=Math.clz32,f=Math.max,n=String.fromCharCode,p=Math.ceil,d=Math.round,u=Math.min,h=Math.floor,i,a,c;return function d(c,e,t){function r(i,o){if(!e[i]){if(!c[i]){var s="function"==typeof require&&require;if(!o&&s)return s(i,!0);if(n)return n(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var f=e[i]={exports:{}};c[i][0].call(f.exports,function(t){var e=c[i][1][t];return r(e?e:t)},f,f.exports,d,c,e,t)}return e[i].exports}for(var n="function"==typeof require&&require,i=0;i<t.length;i++)r(t[i]);return r}({1:[function(e,t){(function(r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);if(o.isArray(e)&&o.isNumber(t))return i.createMultisig(e,t,r);if(e instanceof i)return e;if(d.checkArgument(e,"First argument is required, please include address data.","guide/address.html"),t&&!c.get(t))throw new TypeError("Second argument must be \"livenet\" or \"testnet\".");if(r&&r!==i.PayToPublicKeyHash&&r!==i.PayToScriptHash)throw new TypeError("Third argument must be \"pubkeyhash\" or \"scripthash\".");var n=this._classifyArguments(e,t,r);return n.network=n.network||c.get(t)||c.defaultNetwork,n.type=n.type||r||i.PayToPublicKeyHash,u.defineImmutable(this,{hashBuffer:n.hashBuffer,network:n.network,type:n.type}),this}var o=e("lodash"),d=e("./util/preconditions"),a=e("cashaddrjs"),s=e("./errors"),f=e("./encoding/base58check"),c=e("./networks"),p=e("./crypto/hash"),u=e("./util/js"),l=e("./publickey"),h=28,b=40;i.prototype._classifyArguments=function(e,t,n){if((e instanceof r||e instanceof Uint8Array)&&20===e.length)return i._transformHash(e);if((e instanceof r||e instanceof Uint8Array)&&21===e.length)return i._transformBuffer(e,t,n);if(e instanceof l)return i._transformPublicKey(e);if(e instanceof g)return i._transformScript(e,t);if("string"==typeof e)return i._transformString(e,t,n,i.DefaultFormat);if(o.isObject(e))return i._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")},i.LegacyFormat="legacy",i.BitpayFormat="bitpay",i.CashAddrFormat="cashaddr",i.DefaultFormat=i.LegacyFormat,i.PayToPublicKeyHash="pubkeyhash",i.PayToScriptHash="scripthash",i._transformHash=function(e){var t={};if(!(e instanceof r)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(20!==e.length)throw new TypeError("Address hashbuffers must be exactly 20 bytes.");return t.hashBuffer=e,t},i._transformObject=function(e){return d.checkArgument(e.hash||e.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),d.checkArgument(e.type,"Must provide a `type` property"),{hashBuffer:e.hash?new r(e.hash,"hex"):e.hashBuffer,network:c.get(e.network)||c.defaultNetwork,type:e.type}},i._classifyFromVersion=function(e){var t={},r=c.get(e[0],"pubkeyhash"),n=c.get(e[0],"scripthash");return r?(t.network=r,t.type=i.PayToPublicKeyHash):n&&(t.network=n,t.type=i.PayToScriptHash),t},i._transformBuffer=function(e,t,n){var o={};if(!(e instanceof r)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(21!==e.length)throw new TypeError("Address buffers must be exactly 21 bytes.");t=c.get(t);var d=i._classifyFromVersion(e);if(!d.network||t&&t!==d.network)throw new TypeError("Address has mismatched network type.");if(!d.type||n&&n!==d.type)throw new TypeError("Address has mismatched type.");return o.hashBuffer=e.slice(1),o.network=d.network,o.type=d.type,o},i._transformPublicKey=function(e){var t={};if(!(e instanceof l))throw new TypeError("Address must be an instance of PublicKey.");return t.hashBuffer=p.sha256ripemd160(e.toBuffer()),t.type=i.PayToPublicKeyHash,t},i._transformScript=function(e,t){d.checkArgument(e instanceof g,"script must be a Script instance");var r=e.getAddressInfo(t);if(!r)throw new s.Script.CantDeriveAddress(e);return r},i.createMultisig=function(e,t,r){return r=r||e[0].network||c.defaultNetwork,i.payingTo(g.buildMultisigOut(e,t),r)},i._transformString=function(e,t,r,n){if("string"!=typeof e)throw new TypeError("data parameter supplied is not a string.");if(e=e.trim(),n===i.LegacyFormat)return i._transformStringLegacy(e,t,r);if(n===i.BitpayFormat)return i._transformStringBitpay(e,t,r);if(n===i.CashAddrFormat)return i._transformStringCashAddr(e,t,r);throw new TypeError("Unrecognized address format.")},i._transformStringLegacy=function(e,t,r){var n=f.decode(e);return i._transformBuffer(n,t,r)},i._transformStringBitpay=function(e,t,r){var n=f.decode(e);return n[0]===h?n[0]=0:n[0]===b&&(n[0]=5),i._transformBuffer(n,t,r)},i._transformStringCashAddr=function(e,t,n){"string"==typeof t||(t=t.toString());var o=a.decode(e);d.checkArgument(!t||"livenet"===t&&"bitcoincash"===o.prefix||"testnet"===t&&"bchtest"===o.prefix,"Invalid network."),d.checkArgument(!n||n===i.PayToPublicKeyHash&&"P2PKH"===o.type||n===i.PayToScriptHash&&"P2SH"===o.type,"Invalid type."),t=c.get(t||("bitcoincash"===o.prefix?"livenet":"testnet")),n=n||("P2PKH"===o.type?i.PayToPublicKeyHash:i.PayToScriptHash);var s=new r([t[n]]),f=new r(o.hash),p=r.concat([s,f]);return i._transformBuffer(p,t,n)},i.fromPublicKey=function(e,t){var r=i._transformPublicKey(e);return t=t||c.defaultNetwork,new i(r.hashBuffer,t,r.type)},i.fromPublicKeyHash=function(e,t){var r=i._transformHash(e);return new i(r.hashBuffer,t,i.PayToPublicKeyHash)},i.fromScriptHash=function(e,t){d.checkArgument(e,"hash parameter is required");var r=i._transformHash(e);return new i(r.hashBuffer,t,i.PayToScriptHash)},i.payingTo=function(e,t){return d.checkArgument(e,"script is required"),d.checkArgument(e instanceof g,"script must be instance of Script"),i.fromScriptHash(p.sha256ripemd160(e.toBuffer()),t)},i.fromScript=function(e,t){d.checkArgument(e instanceof g,"script must be a Script instance");var r=i._transformScript(e,t);return new i(r.hashBuffer,t,r.type)},i.fromBuffer=function(e,t,r){var n=i._transformBuffer(e,t,r);return new i(n.hashBuffer,n.network,n.type)},i.fromString=function(e,t,r,n){n=n||i.DefaultFormat;var o=i._transformString(e,t,r,n);return new i(o.hashBuffer,o.network,o.type)},i.fromObject=function(e){d.checkState(u.isHexa(e.hash),"Unexpected hash property, \""+e.hash+"\", expected to be hex.");var t=new r(e.hash,"hex");return new i(t,e.network,e.type)},i.getValidationError=function(e,t,r){var n;try{new i(e,t,r)}catch(t){n=t}return n},i.isValid=function(e,t,r){return!i.getValidationError(e,t,r)},i.prototype.isPayToPublicKeyHash=function(){return this.type===i.PayToPublicKeyHash},i.prototype.isPayToScriptHash=function(){return this.type===i.PayToScriptHash},i.prototype.toBuffer=function(){var e=new r([this.network[this.type]]),t=r.concat([e,this.hashBuffer]);return t},i.prototype.toObject=i.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}},i.prototype.toString=function(e){if(e=e||i.DefaultFormat,e===i.LegacyFormat)return this._toStringLegacy();if(e===i.BitpayFormat)return this._toStringBitpay();if(e===i.CashAddrFormat)return this._toStringCashAddr();throw new TypeError("Unrecognized address format.")},i.prototype._toStringLegacy=function(){return f.encode(this.toBuffer())},i.prototype._toStringBitpay=function(){var e=this.toBuffer();return"livenet"===this.network.toString()&&(this.type===i.PayToPublicKeyHash?e[0]=h:this.type===i.PayToScriptHash&&(e[0]=b)),f.encode(e)},i.prototype._toStringCashAddr=function(){var e="livenet"===this.network.toString()?"bitcoincash":"bchtest",t=this.type===i.PayToPublicKeyHash?"P2PKH":"P2SH",r=[].concat(n(this.hashBuffer));return a.encode(e,t,r)},i.prototype.inspect=function(){return"<Address: "+this.toString()+", type: "+this.type+", network: "+this.network+">"},t.exports=i;var g=e("./script")}).call(this,e("buffer").Buffer)},{"./crypto/hash":9,"./encoding/base58check":14,"./errors":18,"./networks":22,"./publickey":25,"./script":26,"./util/js":44,"./util/preconditions":45,buffer:115,cashaddrjs:117,lodash:193}],2:[function(e,t){(function(r,n){"use strict";var i=t.exports;i.version="v"+e("../package.json").version,i.versionGuard=function(e){if(e!==void 0){throw new Error("More than one instance of bitcoincashjs found. Please make sure to require bitcoincashjs and check that submodules do not also include their own bitcoincashjs dependency.")}},i.versionGuard(r._bch),r._bch=i.version,i.crypto={},i.crypto.BN=e("./crypto/bn"),i.crypto.ECDSA=e("./crypto/ecdsa"),i.crypto.Hash=e("./crypto/hash"),i.crypto.Random=e("./crypto/random"),i.crypto.Point=e("./crypto/point"),i.crypto.Signature=e("./crypto/signature"),i.encoding={},i.encoding.Base58=e("./encoding/base58"),i.encoding.Base58Check=e("./encoding/base58check"),i.encoding.BufferReader=e("./encoding/bufferreader"),i.encoding.BufferWriter=e("./encoding/bufferwriter"),i.encoding.Varint=e("./encoding/varint"),i.util={},i.util.buffer=e("./util/buffer"),i.util.js=e("./util/js"),i.util.preconditions=e("./util/preconditions"),i.errors=e("./errors"),i.Address=e("./address"),i.Block=e("./block"),i.MerkleBlock=e("./block/merkleblock"),i.BlockHeader=e("./block/blockheader"),i.HDPrivateKey=e("./hdprivatekey.js"),i.HDPublicKey=e("./hdpublickey.js"),i.Networks=e("./networks"),i.Opcode=e("./opcode"),i.PrivateKey=e("./privatekey"),i.PublicKey=e("./publickey"),i.Script=e("./script"),i.Transaction=e("./transaction"),i.URI=e("./uri"),i.Unit=e("./unit"),i.deps={},i.deps.bnjs=e("bn.js"),i.deps.bs58=e("bs58"),i.deps.Buffer=n,i.deps.elliptic=e("elliptic"),i.deps._=e("lodash"),i.Transaction.sighash=e("./transaction/sighash")}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,e("buffer").Buffer)},{"../package.json":257,"./address":1,"./block":5,"./block/blockheader":4,"./block/merkleblock":6,"./crypto/bn":7,"./crypto/ecdsa":8,"./crypto/hash":9,"./crypto/point":10,"./crypto/random":11,"./crypto/signature":12,"./encoding/base58":13,"./encoding/base58check":14,"./encoding/bufferreader":15,"./encoding/bufferwriter":16,"./encoding/varint":17,"./errors":18,"./hdprivatekey.js":20,"./hdpublickey.js":21,"./networks":22,"./opcode":23,"./privatekey":24,"./publickey":25,"./script":26,"./transaction":29,"./transaction/sighash":37,"./unit":41,"./uri":42,"./util/buffer":43,"./util/js":44,"./util/preconditions":45,"bn.js":64,bs58:112,buffer:115,elliptic:157,lodash:193}],3:[function(e,t){(function(r){"use strict";function n(e){return this instanceof n?(i.extend(this,n._from(e)),this):new n(e)}var i=e("lodash"),o=e("./blockheader"),d=e("../crypto/bn"),a=e("../util/buffer"),s=e("../encoding/bufferreader"),f=e("../encoding/bufferwriter"),c=e("../crypto/hash"),p=e("../transaction"),l=e("../util/preconditions");n.MAX_BLOCK_SIZE=1e6,n._from=function(e){var t={};if(a.isBuffer(e))t=n._fromBufferReader(s(e));else if(i.isObject(e))t=n._fromObject(e);else throw new TypeError("Unrecognized argument for Block");return t},n._fromObject=function(e){var t=[];e.transactions.forEach(function(e){e instanceof p?t.push(e):t.push(p().fromObject(e))});var r={header:o.fromObject(e.header),transactions:t};return r},n.fromObject=function(e){var t=n._fromObject(e);return new n(t)},n._fromBufferReader=function(e){var t={};l.checkState(!e.finished(),"No block data received"),t.header=o.fromBufferReader(e);var r=e.readVarintNum();t.transactions=[];for(var n=0;n<r;n++)t.transactions.push(p().fromBufferReader(e));return t},n.fromBufferReader=function(e){l.checkArgument(e,"br is required");var t=n._fromBufferReader(e);return new n(t)},n.fromBuffer=function(e){return n.fromBufferReader(new s(e))},n.fromString=function(e){var t=new r(e,"hex");return n.fromBuffer(t)},n.fromRawBlock=function(e){a.isBuffer(e)||(e=new r(e,"binary"));var t=s(e);t.pos=n.Values.START_OF_BLOCK;var i=n._fromBufferReader(t);return new n(i)},n.prototype.toObject=n.prototype.toJSON=function(){var e=[];return this.transactions.forEach(function(t){e.push(t.toObject())}),{header:this.header.toObject(),transactions:e}},n.prototype.toBuffer=function(){return this.toBufferWriter().concat()},n.prototype.toString=function(){return this.toBuffer().toString("hex")},n.prototype.toBufferWriter=function(e){e||(e=new f),e.write(this.header.toBuffer()),e.writeVarintNum(this.transactions.length);for(var t=0;t<this.transactions.length;t++)this.transactions[t].toBufferWriter(e);return e},n.prototype.getTransactionHashes=function(){var e=[];if(0===this.transactions.length)return[n.Values.NULL_HASH];for(var r=0;r<this.transactions.length;r++)e.push(this.transactions[r]._getHash());return e},n.prototype.getMerkleTree=function(){for(var e=this.getTransactionHashes(),t=0,n=this.transactions.length;1<n;n=h((n+1)/2)){for(var o=0;o<n;o+=2){var i=u(o+1,n-1),d=r.concat([e[t+o],e[t+i]]);e.push(c.sha256sha256(d))}t+=n}return e},n.prototype.getMerkleRoot=function(){var e=this.getMerkleTree();return e[e.length-1]},n.prototype.validMerkleRoot=function(){var e=new d(this.header.merkleRoot.toString("hex"),"hex"),t=new d(this.getMerkleRoot().toString("hex"),"hex");return!(0!==e.cmp(t))},n.prototype._getHash=function(){return this.header._getHash()};var b={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=this.header.id),this._id},set:i.noop};Object.defineProperty(n.prototype,"id",b),Object.defineProperty(n.prototype,"hash",b),n.prototype.inspect=function(){return"<Block "+this.id+">"},n.Values={START_OF_BLOCK:8,NULL_HASH:new r("0000000000000000000000000000000000000000000000000000000000000000","hex")},t.exports=n}).call(this,e("buffer").Buffer)},{"../crypto/bn":7,"../crypto/hash":9,"../encoding/bufferreader":15,"../encoding/bufferwriter":16,"../transaction":29,"../util/buffer":43,"../util/preconditions":45,"./blockheader":4,buffer:115,lodash:193}],4:[function(e,t){(function(r){"use strict";var n=e("lodash"),i=e("../crypto/bn"),o=e("../util/buffer"),a=e("../encoding/bufferreader"),s=e("../encoding/bufferwriter"),f=e("../crypto/hash"),c=e("../util/js"),p=e("../util/preconditions"),u=function e(t){if(!(this instanceof e))return new e(t);var r=e._from(t);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,r.hash&&p.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};u._from=function(e){var t={};if(o.isBuffer(e))t=u._fromBufferReader(a(e));else if(n.isObject(e))t=u._fromObject(e);else throw new TypeError("Unrecognized argument for BlockHeader");return t},u._fromObject=function(e){p.checkArgument(e,"data is required");var t=e.prevHash,i=e.merkleRoot;n.isString(e.prevHash)&&(t=o.reverse(new r(e.prevHash,"hex"))),n.isString(e.merkleRoot)&&(i=o.reverse(new r(e.merkleRoot,"hex")));var d={hash:e.hash,version:e.version,prevHash:t,merkleRoot:i,time:e.time,timestamp:e.time,bits:e.bits,nonce:e.nonce};return d},u.fromObject=function(e){var t=u._fromObject(e);return new u(t)},u.fromRawBlock=function(e){o.isBuffer(e)||(e=new r(e,"binary"));var t=a(e);t.pos=u.Constants.START_OF_HEADER;var n=u._fromBufferReader(t);return new u(n)},u.fromBuffer=function(e){var t=u._fromBufferReader(a(e));return new u(t)},u.fromString=function(e){var t=new r(e,"hex");return u.fromBuffer(t)},u._fromBufferReader=function(e){var t={version:e.readInt32LE(),prevHash:e.read(32),merkleRoot:e.read(32),time:e.readUInt32LE(),bits:e.readUInt32LE(),nonce:e.readUInt32LE()};return t},u.fromBufferReader=function(e){var t=u._fromBufferReader(e);return new u(t)},u.prototype.toObject=u.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:o.reverse(this.prevHash).toString("hex"),merkleRoot:o.reverse(this.merkleRoot).toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}},u.prototype.toBuffer=function(){return this.toBufferWriter().concat()},u.prototype.toString=function(){return this.toBuffer().toString("hex")},u.prototype.toBufferWriter=function(e){return e||(e=new s),e.writeInt32LE(this.version),e.write(this.prevHash),e.write(this.merkleRoot),e.writeUInt32LE(this.time),e.writeUInt32LE(this.bits),e.writeUInt32LE(this.nonce),e},u.prototype.getTargetDifficulty=function(e){e=e||this.bits;for(var t=new i(16777215&e),r=8*((e>>>24)-3);0<r--;)t=t.mul(new i(2));return t},u.prototype.getDifficulty=function(){var e=this.getTargetDifficulty(486604799).mul(new i(100000000)),t=this.getTargetDifficulty(),r=e.div(t).toString(10),n=r.length-8;return r=r.slice(0,n)+"."+r.slice(n),parseFloat(r)},u.prototype._getHash=function(){var e=this.toBuffer();return f.sha256sha256(e)};var l={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=a(this._getHash()).readReverse().toString("hex")),this._id},set:n.noop};Object.defineProperty(u.prototype,"id",l),Object.defineProperty(u.prototype,"hash",l),u.prototype.validTimestamp=function(){var e=d(new Date().getTime()/1e3);return!(this.time>e+u.Constants.MAX_TIME_OFFSET)},u.prototype.validProofOfWork=function(){var e=new i(this.id,"hex"),t=this.getTargetDifficulty();return!(0<e.cmp(t))},u.prototype.inspect=function(){return"<BlockHeader "+this.id+">"},u.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:7200,LARGEST_HASH:new i("10000000000000000000000000000000000000000000000000000000000000000","hex")},t.exports=u}).call(this,e("buffer").Buffer)},{"../crypto/bn":7,"../crypto/hash":9,"../encoding/bufferreader":15,"../encoding/bufferwriter":16,"../util/buffer":43,"../util/js":44,"../util/preconditions":45,buffer:115,lodash:193}],5:[function(e,t){"use strict";t.exports=e("./block"),t.exports.BlockHeader=e("./blockheader"),t.exports.MerkleBlock=e("./merkleblock")},{"./block":3,"./blockheader":4,"./merkleblock":6}],6:[function(e,t){(function(r){"use strict";function n(e){if(!(this instanceof n))return new n(e);var t={};if(d.isBuffer(e))t=n._fromBufferReader(a(e));else if(i.isObject(e)){var r;r=e.header instanceof o?e.header:o.fromObject(e.header),t={header:r,numTransactions:e.numTransactions,hashes:e.hashes,flags:e.flags}}else throw new TypeError("Unrecognized argument for MerkleBlock");return i.extend(this,t),this._flagBitsUsed=0,this._hashesUsed=0,this}var i=e("lodash"),o=e("./blockheader"),d=e("../util/buffer"),a=e("../encoding/bufferreader"),s=e("../encoding/bufferwriter"),f=e("../crypto/hash"),c=e("../util/js"),p=e("../transaction"),u=e("../util/preconditions");n.fromBuffer=function(e){return n.fromBufferReader(a(e))},n.fromBufferReader=function(e){return new n(n._fromBufferReader(e))},n.prototype.toBuffer=function(){return this.toBufferWriter().concat()},n.prototype.toBufferWriter=function(e){e||(e=new s),e.write(this.header.toBuffer()),e.writeUInt32LE(this.numTransactions),e.writeVarintNum(this.hashes.length);for(var t=0;t<this.hashes.length;t++)e.write(new r(this.hashes[t],"hex"));for(e.writeVarintNum(this.flags.length),t=0;t<this.flags.length;t++)e.writeUInt8(this.flags[t]);return e},n.prototype.toObject=n.prototype.toJSON=function(){return{header:this.header.toObject(),numTransactions:this.numTransactions,hashes:this.hashes,flags:this.flags}},n.prototype.validMerkleTree=function(){if(u.checkState(i.isArray(this.flags),"MerkleBlock flags is not an array"),u.checkState(i.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions)return!1;if(8*this.flags.length<this.hashes.length)return!1;var e=this._calcTreeHeight(),t={hashesUsed:0,flagBitsUsed:0},r=this._traverseMerkleTree(e,0,t);return t.hashesUsed===this.hashes.length&&d.equals(r,this.header.merkleRoot)},n.prototype._traverseMerkleTree=function(e,t,n){if(n=n||{},n.txs=n.txs||[],n.flagBitsUsed=n.flagBitsUsed||0,n.hashesUsed=n.hashesUsed||0,n.flagBitsUsed>8*this.flags.length)return null;var i=1&this.flags[n.flagBitsUsed>>3]>>>(7&n.flagBitsUsed++);if(0===e||!i){if(n.hashesUsed>=this.hashes.length)return null;var o=this.hashes[n.hashesUsed++];return 0===e&&i&&n.txs.push(o),new r(o,"hex")}var d=this._traverseMerkleTree(e-1,2*t,n),a=d;return 2*t+1<this._calcTreeWidth(e-1)&&(a=this._traverseMerkleTree(e-1,2*t+1,n)),f.sha256sha256(new r.concat([d,a]))},n.prototype._calcTreeWidth=function(e){return this.numTransactions+(1<<e)-1>>e},n.prototype._calcTreeHeight=function(){for(var e=0;1<this._calcTreeWidth(e);)e++;return e},n.prototype.hasTransaction=function(e){u.checkArgument(!i.isUndefined(e),"tx cannot be undefined"),u.checkArgument(e instanceof p||"string"==typeof e,"Invalid tx given, tx must be a \"string\" or \"Transaction\"");var t=e;e instanceof p&&(t=d.reverse(new r(e.id,"hex")).toString("hex"));var n=[],o=this._calcTreeHeight();return this._traverseMerkleTree(o,0,{txs:n}),-1!==n.indexOf(t)},n._fromBufferReader=function(e){u.checkState(!e.finished(),"No merkleblock data received");var t={header:o.fromBufferReader(e),numTransactions:e.readUInt32LE()},r=e.readVarintNum();t.hashes=[];for(var n=0;n<r;n++)t.hashes.push(e.read(32).toString("hex"));var i=e.readVarintNum();for(t.flags=[],n=0;n<i;n++)t.flags.push(e.readUInt8());return t},n.fromObject=function(e){return new n(e)},t.exports=n}).call(this,e("buffer").Buffer)},{"../crypto/hash":9,"../encoding/bufferreader":15,"../encoding/bufferwriter":16,"../transaction":29,"../util/buffer":43,"../util/js":44,"../util/preconditions":45,"./blockheader":4,buffer:115,lodash:193}],7:[function(e,t){(function(r){"use strict";var i=e("bn.js"),o=e("../util/preconditions"),d=e("lodash"),n=function(e){for(var t=new r(e.length),n=0;n<e.length;n++)t[n]=e[e.length-1-n];return t};i.Zero=new i(0),i.One=new i(1),i.Minus1=new i(-1),i.fromNumber=function(e){return o.checkArgument(d.isNumber(e)),new i(e)},i.fromString=function(e,t){return o.checkArgument(d.isString(e)),new i(e,t)},i.fromBuffer=function(e,t){"undefined"!=typeof t&&"little"===t.endian&&(e=n(e));var r=e.toString("hex"),o=new i(r,16);return o},i.fromSM=function(e,t){var o;if(0===e.length)return i.fromBuffer(new r([0]));var d="big";return t&&(d=t.endian),"little"===d&&(e=n(e)),128&e[0]?(e[0]&=127,o=i.fromBuffer(e),o.neg().copy(o)):o=i.fromBuffer(e),o},i.prototype.toNumber=function(){return parseInt(this.toString(10),10)},i.prototype.toBuffer=function(e){var t,o;if(e&&e.size){o=this.toString(16,2);var d=o.length/2;t=new r(o,"hex"),d===e.size?t=t:d>e.size?t=i.trim(t,d):d<e.size&&(t=i.pad(t,d,e.size))}else o=this.toString(16,2),t=new r(o,"hex");return"undefined"!=typeof e&&"little"===e.endian&&(t=n(t)),t},i.prototype.toSMBigEndian=function(){var e;return-1===this.cmp(i.Zero)?(e=this.neg().toBuffer(),128&e[0]?e=r.concat([new r([128]),e]):e[0]|=128):(e=this.toBuffer(),128&e[0]&&(e=r.concat([new r([0]),e]))),1===e.length&0===e[0]&&(e=new r([])),e},i.prototype.toSM=function(e){var t=e?e.endian:"big",r=this.toSMBigEndian();return"little"===t&&(r=n(r)),r},i.fromScriptNumBuffer=function(e,t,r){if(o.checkArgument(e.length<=(r||4),new Error("script number overflow")),t&&0<e.length&&0==(127&e[e.length-1])&&(1>=e.length||0==(128&e[e.length-2])))throw new Error("non-minimally encoded script number");return i.fromSM(e,{endian:"little"})},i.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})},i.prototype.gt=function(e){return 0<this.cmp(e)},i.prototype.gte=function(e){return 0<=this.cmp(e)},i.prototype.lt=function(e){return 0>this.cmp(e)},i.trim=function(e,t){return e.slice(t-e.length,e.length)},i.pad=function(e,t,n){for(var o=new r(n),d=0;d<e.length;d++)o[o.length-1-d]=e[e.length-1-d];for(d=0;d<n-t;d++)o[d]=0;return o},t.exports=i}).call(this,e("buffer").Buffer)},{"../util/preconditions":45,"bn.js":64,buffer:115,lodash:193}],8:[function(e,t){(function(r){"use strict";var o=e("./bn"),a=e("./point"),n=e("./signature"),d=e("../publickey"),i=e("./random"),s=e("./hash"),f=e("../util/buffer"),c=e("lodash"),p=e("../util/preconditions"),u=function e(t){return this instanceof e?void(t&&this.set(t)):new e(t)};u.prototype.set=function(e){return this.hashbuf=e.hashbuf||this.hashbuf,this.endian=e.endian||this.endian,this.privkey=e.privkey||this.privkey,this.pubkey=e.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),this.sig=e.sig||this.sig,this.k=e.k||this.k,this.verified=e.verified||this.verified,this},u.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()},u.prototype.calci=function(){for(var e=0;4>e;e++){this.sig.i=e;var t;try{t=this.toPublicKey()}catch(t){console.error(t);continue}if(t.point.eq(this.pubkey.point))return this.sig.compressed=this.pubkey.compressed,this}throw this.sig.i=void 0,new Error("Unable to find valid recovery factor")},u.fromString=function(e){var t=JSON.parse(e);return new u(t)},u.prototype.randomK=function(){var e=a.getN(),t;do t=o.fromBuffer(i.getRandomBuffer(32));while(!(t.lt(e)&&t.gt(o.Zero)));return this.k=t,this},u.prototype.deterministicK=function(e){c.isUndefined(e)&&(e=0);var t=new r(32);t.fill(1);var n=new r(32);n.fill(0);var d=this.privkey.bn.toBuffer({size:32}),p="little"===this.endian?f.reverse(this.hashbuf):this.hashbuf;n=s.sha256hmac(r.concat([t,new r([0]),d,p]),n),t=s.sha256hmac(t,n),n=s.sha256hmac(r.concat([t,new r([1]),d,p]),n),t=s.sha256hmac(t,n),t=s.sha256hmac(t,n);for(var u=o.fromBuffer(t),l=a.getN(),h=0;h<e||!(u.lt(l)&&u.gt(o.Zero));h++)n=s.sha256hmac(r.concat([t,new r([0])]),n),t=s.sha256hmac(t,n),t=s.sha256hmac(t,n),u=o.fromBuffer(t);return this.k=u,this},u.prototype.toPublicKey=function(){var t=this.sig.i;p.checkArgument(0===t||1===t||2===t||3===t,new Error("i must be equal to 0, 1, 2, or 3"));var i=o.fromBuffer(this.hashbuf),e=this.sig.r,r=this.sig.s,s=a.getN(),n=a.getG(),f=t>>1?e.add(s):e,c=a.fromX(1&t,f),u=c.mul(s);if(!u.isInfinity())throw new Error("nR is not a valid curve point");var l=i.neg().mod(s),h=e.invm(s),b=c.mul(r).add(n.mul(l)).mul(h),g=d.fromPoint(b,this.sig.compressed);return g},u.prototype.sigError=function(){if(!f.isBuffer(this.hashbuf)||32!==this.hashbuf.length)return"hashbuf must be a 32 byte buffer";var t=this.sig.r,r=this.sig.s;if(!(t.gt(o.Zero)&&t.lt(a.getN()))||!(r.gt(o.Zero)&&r.lt(a.getN())))return"r and s not in range";var i=o.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),e=a.getN(),n=r.invm(e),d=n.mul(i).mod(e),s=n.mul(t).mod(e),c=a.getG().mulAdd(d,this.pubkey.point,s);return c.isInfinity()?"p is infinity":0!==c.getX().mod(e).cmp(t)&&"Invalid signature"},u.toLowS=function(e){return e.gt(o.fromBuffer(new r("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(e=a.getN().sub(e)),e},u.prototype._findSignature=function(t,n){var e=a.getN(),i=a.getG(),d=0,f,c,p,l;do(!this.k||0<d)&&this.deterministicK(d),d++,f=this.k,c=i.mul(f),p=c.x.mod(e),l=f.invm(e).mul(n.add(t.mul(p))).mod(e);while(0>=p.cmp(o.Zero)||0>=l.cmp(o.Zero));return l=u.toLowS(l),{s:l,r:p}},u.prototype.sign=function(){var t=this.hashbuf,r=this.privkey,i=r.bn;p.checkState(t&&r&&i,new Error("invalid parameters")),p.checkState(f.isBuffer(t)&&32===t.length,new Error("hashbuf must be a 32 byte buffer"));var d=o.fromBuffer(t,this.endian?{endian:this.endian}:void 0),e=this._findSignature(i,d);return e.compressed=this.pubkey.compressed,this.sig=new n(e),this},u.prototype.signRandomK=function(){return this.randomK(),this.sign()},u.prototype.toString=function(){var e={};return this.hashbuf&&(e.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(e.privkey=this.privkey.toString()),this.pubkey&&(e.pubkey=this.pubkey.toString()),this.sig&&(e.sig=this.sig.toString()),this.k&&(e.k=this.k.toString()),JSON.stringify(e)},u.prototype.verify=function(){return this.verified=!this.sigError(),this},u.sign=function(e,t,r){return u().set({hashbuf:e,endian:r,privkey:t}).sign().sig},u.verify=function(e,t,r,n){return u().set({hashbuf:e,endian:n,sig:t,pubkey:r}).verify().verified},t.exports=u}).call(this,e("buffer").Buffer)},{"../publickey":25,"../util/buffer":43,"../util/preconditions":45,"./bn":7,"./hash":9,"./point":10,"./random":11,"./signature":12,buffer:115,lodash:193}],9:[function(e,t){(function(r){"use strict";var n=e("crypto"),o=e("../util/buffer"),d=e("../util/preconditions"),i=t.exports;i.sha1=function(e){return d.checkArgument(o.isBuffer(e)),n.createHash("sha1").update(e).digest()},i.sha1.blocksize=512,i.sha256=function(e){return d.checkArgument(o.isBuffer(e)),n.createHash("sha256").update(e).digest()},i.sha256.blocksize=512,i.sha256sha256=function(e){return d.checkArgument(o.isBuffer(e)),i.sha256(i.sha256(e))},i.ripemd160=function(e){return d.checkArgument(o.isBuffer(e)),n.createHash("ripemd160").update(e).digest()},i.sha256ripemd160=function(e){return d.checkArgument(o.isBuffer(e)),i.ripemd160(i.sha256(e))},i.sha512=function(e){return d.checkArgument(o.isBuffer(e)),n.createHash("sha512").update(e).digest()},i.sha512.blocksize=1024,i.hmac=function(e,t,n){d.checkArgument(o.isBuffer(t)),d.checkArgument(o.isBuffer(n)),d.checkArgument(e.blocksize);var a=e.blocksize/8;if(n.length>a)n=e(n);else if(n<a){var s=new r(a);s.fill(0),n.copy(s),n=s}var f=new r(a);f.fill(92);var c=new r(a);c.fill(54);for(var p=new r(a),u=new r(a),l=0;l<a;l++)p[l]=f[l]^n[l],u[l]=c[l]^n[l];return e(r.concat([p,e(r.concat([u,t]))]))},i.sha256hmac=function(e,t){return i.hmac(i.sha256,e,t)},i.sha512hmac=function(e,t){return i.hmac(i.sha512,e,t)}}).call(this,e("buffer").Buffer)},{"../util/buffer":43,"../util/preconditions":45,buffer:115,crypto:145}],10:[function(e,t){(function(r){"use strict";var n=e("./bn"),i=e("../util/buffer"),o=e("elliptic").curves.secp256k1,d=o.curve.point.bind(o.curve),a=o.curve.pointFromX.bind(o.curve),s=function(e,t,r){var n=d(e,t,r);return n.validate(),n};s.prototype=Object.getPrototypeOf(o.curve.point()),s.fromX=function(e,t){var r=a(e,t);return r.validate(),r},s.getG=function(){return o.curve.g},s.getN=function(){return new n(o.curve.n.toArray())},s.prototype._getX=s.prototype.getX,s.prototype.getX=function(){return new n(this._getX().toArray())},s.prototype._getY=s.prototype.getY,s.prototype.getY=function(){return new n(this._getY().toArray())},s.prototype.validate=function(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");if(0===this.getX().cmp(n.Zero)||0===this.getY().cmp(n.Zero))throw new Error("Invalid x,y value for curve, cannot equal 0.");var e=a(this.getY().isOdd(),this.getX());if(0!==e.y.cmp(this.y))throw new Error("Invalid y value for curve.");var t=this.getX().gt(n.Minus1)&&this.getX().lt(s.getN()),r=this.getY().gt(n.Minus1)&&this.getY().lt(s.getN());if(!t||!r)throw new Error("Point does not lie on the curve");if(!this.mul(s.getN()).isInfinity())throw new Error("Point times N must be infinity");return this},s.pointToCompressed=function(e){var t=e.getX().toBuffer({size:32}),n=e.getY().toBuffer({size:32}),o=n[n.length-1]%2,d;return d=o?new r([3]):new r([2]),i.concat([d,t])},t.exports=s}).call(this,e("buffer").Buffer)},{"../util/buffer":43,"./bn":7,buffer:115,elliptic:157}],11:[function(e,t){(function(r,n){"use strict";function i(){}i.getRandomBuffer=function(e){return r.browser?i.getRandomBufferBrowser(e):i.getRandomBufferNode(e)},i.getRandomBufferNode=function(t){var r=e("crypto");return r.randomBytes(t)},i.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");if(window.crypto&&window.crypto.getRandomValues)var t=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)var t=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(e);t.getRandomValues(r);var i=new n(r);return i},i.getPseudoRandomBuffer=function(e){for(var t=new n(e),o=0,i;o<=e;o++){var r=h(o/4),d=o-4*r;0==d?(i=Math.random()*4294967296,t[o]=255&i):t[o]=255&(i>>>=8)}return t},t.exports=i}).call(this,e("_process"),e("buffer").Buffer)},{_process:211,buffer:115,crypto:145}],12:[function(e,t){(function(r){"use strict";var n=e("./bn"),i=e("lodash"),o=e("../util/preconditions"),d=e("../util/buffer"),a=e("../util/js"),s=function e(t,i){if(!(this instanceof e))return new e(t,i);if(t instanceof n)this.set({r:t,s:i});else if(t){this.set(t)}};s.prototype.set=function(e){return this.r=e.r||this.r||void 0,this.s=e.s||this.s||void 0,this.i="undefined"==typeof e.i?this.i:e.i,this.compressed="undefined"==typeof e.compressed?this.compressed:e.compressed,this.nhashtype=e.nhashtype||this.nhashtype||void 0,this},s.fromCompact=function(e){o.checkArgument(d.isBuffer(e),"Argument is expected to be a Buffer");var t=new s,r=!0,a=e.slice(0,1)[0]-27-4;0>a&&(r=!1,a+=4);var i=e.slice(1,33),f=e.slice(33,65);return o.checkArgument(0==a||1==a||2==a||3==a,new Error("i must be 0, 1, 2, or 3")),o.checkArgument(32===i.length,new Error("r must be 32 bytes")),o.checkArgument(32===f.length,new Error("s must be 32 bytes")),t.compressed=r,t.i=a,t.r=n.fromBuffer(i),t.s=n.fromBuffer(f),t},s.fromDER=s.fromBuffer=function(e,t){var r=s.parseDER(e,t),n=new s;return n.r=r.r,n.s=r.s,n},s.fromTxFormat=function(e){var t=e.readUInt8(e.length-1),r=e.slice(0,e.length-1),n=new s.fromDER(r,!1);return n.nhashtype=t,n},s.fromString=function(e){var t=new r(e,"hex");return s.fromDER(t)},s.parseDER=function(e,t){o.checkArgument(d.isBuffer(e),new Error("DER formatted signature should be a buffer")),i.isUndefined(t)&&(t=!0);var a=e[0];o.checkArgument(48===a,new Error("Header byte should be 0x30"));var f=e[1],c=e.slice(2).length;o.checkArgument(!t||f===c,new Error("Length byte should length of what follows")),f=f<c?f:c;var p=e[2];o.checkArgument(2===p,new Error("Integer byte for r should be 0x02"));var u=e[3],l=e.slice(4,4+u),h=n.fromBuffer(l),b=!(0!==e[4]);o.checkArgument(u===l.length,new Error("Length of r incorrect"));var g=e[4+u+0];o.checkArgument(2===g,new Error("Integer byte for s should be 0x02"));var y=e[4+u+1],m=e.slice(4+u+2,4+u+2+y),_=n.fromBuffer(m),S=!(0!==e[4+u+2+2]);o.checkArgument(y===m.length,new Error("Length of s incorrect"));o.checkArgument(f===4+u+2+y-2,new Error("Length of signature incorrect"));var v={header:a,length:f,rheader:p,rlength:u,rneg:b,rbuf:l,r:h,sheader:g,slength:y,sneg:S,sbuf:m,s:_};return v},s.prototype.toCompact=function(e,t){if(e="number"==typeof e?e:this.i,t="boolean"==typeof t?t:this.compressed,0!==e&&1!==e&&2!==e&&3!==e)throw new Error("i must be equal to 0, 1, 2, or 3");var n=e+27+4;!1===t&&(n-=4);var o=new r([n]),d=this.r.toBuffer({size:32}),a=this.s.toBuffer({size:32});return r.concat([o,d,a])},s.prototype.toBuffer=s.prototype.toDER=function(){var e=this.r.toBuffer(),t=this.s.toBuffer(),n=!!(128&e[0]),i=!!(128&t[0]),o=n?r.concat([new r([0]),e]):e,d=i?r.concat([new r([0]),t]):t,a=o.length,s=d.length,f=r.concat([new r([48,2+a+2+s,2,a]),o,new r([2,s]),d]);return f},s.prototype.toString=function(){var e=this.toDER();return e.toString("hex")},s.isTxDER=function(e){if(9>e.length)return!1;if(73<e.length)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var r=e[5+t];if(t+r+7!==e.length)return!1;var n=e.slice(4);if(2!==e[2])return!1;if(0===t)return!1;if(128&n[0])return!1;if(1<t&&0===n[0]&&!(128&n[1]))return!1;var i=e.slice(6+t);return!(2!==e[6+t-2])&&0!==r&&!(128&i[0])&&(1<r&&0===i[0]&&!(128&i[1])?!1:!0)},s.prototype.hasLowS=function(){return this.s.lt(new n(1))||this.s.gt(new n("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex"))?!1:!0},s.prototype.hasDefinedHashtype=function(){if(!a.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&~s.SIGHASH_ANYONECANPAY;return e<s.SIGHASH_ALL||e>s.SIGHASH_SINGLE?!1:!0},s.prototype.toTxFormat=function(){var e=this.toDER(),t=new r(1);return t.writeUInt8(this.nhashtype,0),r.concat([e,t])},s.SIGHASH_ALL=1,s.SIGHASH_NONE=2,s.SIGHASH_SINGLE=3,s.SIGHASH_FORKID=64,s.SIGHASH_ANYONECANPAY=128,t.exports=s}).call(this,e("buffer").Buffer)},{"../util/buffer":43,"../util/js":44,"../util/preconditions":45,"./bn":7,buffer:115,lodash:193}],13:[function(e,t){(function(r){"use strict";var n=e("lodash"),i=e("bs58"),o=e("buffer"),d=["1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],a=function e(t){if(!(this instanceof e))return new e(t);if(r.isBuffer(t)){this.fromBuffer(t)}else if("string"==typeof t){this.fromString(t)}else t&&this.set(t)};a.validCharacters=function(e){return o.Buffer.isBuffer(e)&&(e=e.toString()),n.every(n.map(e,function(e){return n.includes(d,e)}))},a.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this},a.encode=function(e){if(!o.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return i.encode(e)},a.decode=function(e){if("string"!=typeof e)throw new Error("Input should be a string");return new r(i.decode(e))},a.prototype.fromBuffer=function(e){return this.buf=e,this},a.prototype.fromString=function(e){var t=a.decode(e);return this.buf=t,this},a.prototype.toBuffer=function(){return this.buf},a.prototype.toString=function(){return a.encode(this.buf)},t.exports=a}).call(this,e("buffer").Buffer)},{bs58:112,buffer:115,lodash:193}],14:[function(e,t){(function(r){"use strict";var n=e("lodash"),i=e("./base58"),o=e("buffer"),d=e("../crypto/hash").sha256sha256,a=function e(t){if(!(this instanceof e))return new e(t);if(r.isBuffer(t)){this.fromBuffer(t)}else if("string"==typeof t){this.fromString(t)}else t&&this.set(t)};a.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this},a.validChecksum=function(e,t){return n.isString(e)&&(e=new o.Buffer(i.decode(e))),n.isString(t)&&(t=new o.Buffer(i.decode(t))),t||(t=e.slice(-4),e=e.slice(0,-4)),a.checksum(e).toString("hex")===t.toString("hex")},a.decode=function(e){if("string"!=typeof e)throw new Error("Input must be a string");var t=new r(i.decode(e));if(4>t.length)throw new Error("Input string too short");var n=t.slice(0,-4),o=t.slice(-4),a=d(n),f=a.slice(0,4);if(o.toString("hex")!==f.toString("hex"))throw new Error("Checksum mismatch");return n},a.checksum=function(e){return d(e).slice(0,4)},a.encode=function(e){if(!r.isBuffer(e))throw new Error("Input must be a buffer");var t=new r(e.length+4),n=a.checksum(e);return e.copy(t),n.copy(t,e.length),i.encode(t)},a.prototype.fromBuffer=function(e){return this.buf=e,this},a.prototype.fromString=function(e){var t=a.decode(e);return this.buf=t,this},a.prototype.toBuffer=function(){return this.buf},a.prototype.toString=function(){return a.encode(this.buf)},t.exports=a}).call(this,e("buffer").Buffer)},{"../crypto/hash":9,"./base58":13,buffer:115,lodash:193}],15:[function(e,t){(function(r){"use strict";var n=e("lodash"),i=e("../util/preconditions"),o=e("../util/buffer"),d=e("../crypto/bn"),a=function e(t){if(!(this instanceof e))return new e(t);if(!n.isUndefined(t))if(r.isBuffer(t))this.set({buf:t});else if(n.isString(t)){var i=new r(t,"hex");if(2*i.length!=t.length)throw new TypeError("Invalid hex string");this.set({buf:i})}else if(n.isObject(t)){this.set(t)}else throw new TypeError("Unrecognized argument for BufferReader")};a.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this},a.prototype.eof=function(){return this.pos>=this.buf.length},a.prototype.finished=a.prototype.eof,a.prototype.read=function(e){i.checkArgument(!n.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,t},a.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e},a.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return++this.pos,e},a.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos+=2,e},a.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos+=2,e},a.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos+=4,e},a.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos+=4,e},a.prototype.readInt32LE=function(){var e=this.buf.readInt32LE(this.pos);return this.pos+=4,e},a.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=d.fromBuffer(e);return this.pos+=8,t},a.prototype.readUInt64LEBN=function(){var e=this.buf.readUInt32LE(this.pos),t=this.buf.readUInt32LE(this.pos+4),r=4294967296*t+e,n;if(9007199254740991>=r)n=new d(r);else{var i=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);n=new d(i,10,"le")}return this.pos+=8,n},a.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN(),r=t.toNumber();if(9007199254740992>=r)return r;throw new Error("number too large to retain precision - use readVarintBN");break;default:return e;}},a.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return i.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t},a.prototype.readVarintBuf=function(){var e=this.buf.readUInt8(this.pos);return 253===e?this.read(3):254===e?this.read(5):255===e?this.read(9):this.read(1)},a.prototype.readVarintBN=function(){var e=this.readUInt8();return 253===e?new d(this.readUInt16LE()):254===e?new d(this.readUInt32LE()):255===e?this.readUInt64LEBN():new d(e)},a.prototype.reverse=function(){for(var e=new r(this.buf.length),t=0;t<e.length;t++)e[t]=this.buf[this.buf.length-1-t];return this.buf=e,this},a.prototype.readReverse=function(e){n.isUndefined(e)&&(e=this.buf.length);var t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,o.reverse(t)},t.exports=a}).call(this,e("buffer").Buffer)},{"../crypto/bn":7,"../util/buffer":43,"../util/preconditions":45,buffer:115,lodash:193}],16:[function(e,t){(function(r){"use strict";var n=e("../util/buffer"),i=e("assert"),o=function e(t){return this instanceof e?void(t?this.set(t):this.bufs=[]):new e(t)};o.prototype.set=function(e){return this.bufs=e.bufs||this.bufs||[],this},o.prototype.toBuffer=function(){return this.concat()},o.prototype.concat=function(){return r.concat(this.bufs)},o.prototype.write=function(e){return i(n.isBuffer(e)),this.bufs.push(e),this},o.prototype.writeReverse=function(e){return i(n.isBuffer(e)),this.bufs.push(n.reverse(e)),this},o.prototype.writeUInt8=function(e){var t=new r(1);return t.writeUInt8(e,0),this.write(t),this},o.prototype.writeUInt16BE=function(e){var t=new r(2);return t.writeUInt16BE(e,0),this.write(t),this},o.prototype.writeUInt16LE=function(e){var t=new r(2);return t.writeUInt16LE(e,0),this.write(t),this},o.prototype.writeUInt32BE=function(e){var t=new r(4);return t.writeUInt32BE(e,0),this.write(t),this},o.prototype.writeInt32LE=function(e){var t=new r(4);return t.writeInt32LE(e,0),this.write(t),this},o.prototype.writeUInt32LE=function(e){var t=new r(4);return t.writeUInt32LE(e,0),this.write(t),this},o.prototype.writeUInt64BEBN=function(e){var t=e.toBuffer({size:8});return this.write(t),this},o.prototype.writeUInt64LEBN=function(e){var t=e.toBuffer({size:8});return this.writeReverse(t),this},o.prototype.writeVarintNum=function(e){var t=o.varintBufNum(e);return this.write(t),this},o.prototype.writeVarintBN=function(e){var t=o.varintBufBN(e);return this.write(t),this},o.varintBufNum=function(e){var t;return 253>e?(t=new r(1),t.writeUInt8(e,0)):65536>e?(t=new r(3),t.writeUInt8(253,0),t.writeUInt16LE(e,1)):4294967296>e?(t=new r(5),t.writeUInt8(254,0),t.writeUInt32LE(e,1)):(t=new r(9),t.writeUInt8(255,0),t.writeInt32LE(-1&e,1),t.writeUInt32LE(h(e/4294967296),5)),t},o.varintBufBN=function(e){var t=e.toNumber(),n;if(253>t)n=new r(1),n.writeUInt8(t,0);else if(65536>t)n=new r(3),n.writeUInt8(253,0),n.writeUInt16LE(t,1);else if(4294967296>t)n=new r(5),n.writeUInt8(254,0),n.writeUInt32LE(t,1);else{var i=new o;i.writeUInt8(255),i.writeUInt64LEBN(e);var n=i.concat()}return n},t.exports=o}).call(this,e("buffer").Buffer)},{"../util/buffer":43,assert:61,buffer:115}],17:[function(e,t){(function(r){"use strict";var n=e("./bufferwriter"),i=e("./bufferreader"),o=e("../crypto/bn"),d=function e(t){if(!(this instanceof e))return new e(t);if(r.isBuffer(t))this.buf=t;else if("number"==typeof t){this.fromNumber(t)}else if(t instanceof o){this.fromBN(t)}else if(t){this.set(t)}};d.prototype.set=function(e){return this.buf=e.buf||this.buf,this},d.prototype.fromString=function(e){return this.set({buf:new r(e,"hex")}),this},d.prototype.toString=function(){return this.buf.toString("hex")},d.prototype.fromBuffer=function(e){return this.buf=e,this},d.prototype.fromBufferReader=function(e){return this.buf=e.readVarintBuf(),this},d.prototype.fromBN=function(e){return this.buf=n().writeVarintBN(e).concat(),this},d.prototype.fromNumber=function(e){return this.buf=n().writeVarintNum(e).concat(),this},d.prototype.toBuffer=function(){return this.buf},d.prototype.toBN=function(){return i(this.buf).readVarintBN()},d.prototype.toNumber=function(){return i(this.buf).readVarintNum()},t.exports=d}).call(this,e("buffer").Buffer)},{"../crypto/bn":7,"./bufferreader":15,"./bufferwriter":16,buffer:115}],18:[function(e,t){"use strict";function r(e,t){return e.replace("{0}",t[0]).replace("{1}",t[1]).replace("{2}",t[2])}var n=e("lodash"),i=function(e,t){var i=function(){if(n.isString(t.message))this.message=r(t.message,arguments);else if(n.isFunction(t.message))this.message=t.message.apply(null,arguments);else throw new Error("Invalid error definition for "+t.name);this.stack=this.message+"\n"+new Error().stack};return i.prototype=Object.create(e.prototype),i.prototype.name=e.prototype.name+t.name,e[t.name]=i,t.errors&&o(i,t.errors),i},o=function(e,t){n.each(t,function(t){i(e,t)})},d={};d.Error=function(){this.message="Internal error",this.stack=this.message+"\n"+new Error().stack},d.Error.prototype=Object.create(Error.prototype),d.Error.prototype.name="bitcore.Error";var a=e("./spec");(function(e,t){return o(e,t),e})(d.Error,a),t.exports=d.Error,t.exports.extend=function(e){return i(d.Error,e)}},{"./spec":19,lodash:193}],19:[function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:"Invalid network: must be \"livenet\" or \"testnet\", got {0}"},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+"http://bitcore.io/"+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+r(arguments[0])}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:"Invalid entropy: more than 512 bits is non standard, got \"{0}\""},{name:"NotEnoughEntropy",message:"Invalid entropy: at least 128 bits needed, got \"{0}\""}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:"Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got \"{0}\""}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:"Invalid length for xpubkey: got \"{0}\""},{name:"InvalidPath",message:"Invalid derivation path, it should look like: \"m/1/100\", got \"{0}\""},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]},{}],20:[function(e,t){(function(r){"use strict";function n(e){if(e instanceof n)return e;if(!(this instanceof n))return new n(e);if(!e)return this._generateRandomly();if(u.get(e))return this._generateRandomly(e);if(d.isString(e)||m.isBuffer(e)){if(n.isValidSerialized(e))this._buildFromSerialized(e);else if(_.isValidJSON(e))this._buildFromJSON(e);else if(m.isBuffer(e)&&n.isValidSerialized(e.toString()))this._buildFromSerialized(e.toString());else throw n.getSerializedError(e);}else if(d.isObject(e))this._buildFromObject(e);else throw new y.UnrecognizedArgument(e)}var i=e("assert"),o=e("buffer"),d=e("lodash"),a=e("./util/preconditions"),s=e("./crypto/bn"),f=e("./encoding/base58"),c=e("./encoding/base58check"),p=e("./crypto/hash"),u=e("./networks"),l=e("./crypto/point"),h=e("./privatekey"),b=e("./crypto/random"),g=e("./errors"),y=g.HDPrivateKey,m=e("./util/buffer"),_=e("./util/js"),S=1/8;n.isValidPath=function(e,t){if(d.isString(e)){var r=n._getDerivationIndexes(e);return null!==r&&d.every(r,n.isValidPath)}return!!d.isNumber(e)&&(e<n.Hardened&&!0===t&&(e+=n.Hardened),0<=e&&e<n.MaxIndex)},n._getDerivationIndexes=function(e){var t=e.split("/");if(d.includes(n.RootElementAlias,e))return[];if(!d.includes(n.RootElementAlias,t[0]))return null;var r=t.slice(1).map(function(e){var t="'"===e.slice(-1);if(t&&(e=e.slice(0,-1)),!e||"-"===e[0])return NaN;var r=+e;return t&&(r+=n.Hardened),r});return d.some(r,isNaN)?null:r},n.prototype.derive=function(e,t){return this.deriveNonCompliantChild(e,t)},n.prototype.deriveChild=function(e,t){if(d.isNumber(e))return this._deriveWithNumber(e,t);if(d.isString(e))return this._deriveFromString(e);throw new y.InvalidDerivationArgument(e)},n.prototype.deriveNonCompliantChild=function(e,t){if(d.isNumber(e))return this._deriveWithNumber(e,t,!0);if(d.isString(e))return this._deriveFromString(e,!0);throw new y.InvalidDerivationArgument(e)},n.prototype._deriveWithNumber=function(e,t,r){if(!n.isValidPath(e,t))throw new y.InvalidPath(e);t=!!(e>=n.Hardened)||t,e<n.Hardened&&!0===t&&(e+=n.Hardened);var d=m.integerAsBuffer(e),a;if(t&&r){var f=this.privateKey.bn.toBuffer();a=m.concat([new o.Buffer([0]),f,d])}else if(t){var c=this.privateKey.bn.toBuffer({size:32});i(32===c.length,"length of private key buffer is expected to be 32 bytes"),a=m.concat([new o.Buffer([0]),c,d])}else a=m.concat([this.publicKey.toBuffer(),d]);var u=p.sha512hmac(a,this._buffers.chainCode),b=s.fromBuffer(u.slice(0,32),{size:32}),g=u.slice(32,64),_=b.add(this.privateKey.toBigNumber()).mod(l.getN()).toBuffer({size:32});if(!h.isValid(_))return this._deriveWithNumber(e+1,null,r);var S=new n({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:g,privateKey:_});return S},n.prototype._deriveFromString=function(e,t){if(!n.isValidPath(e))throw new y.InvalidPath(e);var r=n._getDerivationIndexes(e),i=r.reduce(function(e,r){return e._deriveWithNumber(r,null,t)},this);return i},n.isValidSerialized=function(e,t){return!n.getSerializedError(e,t)},n.getSerializedError=function(e,t){if(!(d.isString(e)||m.isBuffer(e)))return new y.UnrecognizedArgument("Expected string or buffer");if(!f.validCharacters(e))return new g.InvalidB58Char("(unknown)",e);try{e=c.decode(e)}catch(t){return new g.InvalidB58Checksum(e)}if(e.length!==n.DataLength)return new y.InvalidLength(e);if(!d.isUndefined(t)){var r=n._validateNetwork(e,t);if(r)return r}return null},n._validateNetwork=function(e,t){var r=u.get(t);if(!r)return new g.InvalidNetworkArgument(t);var n=e.slice(0,4);return m.integerFromBuffer(n)===r.xprivkey?null:new g.InvalidNetwork(n)},n.fromString=function(e){return a.checkArgument(d.isString(e),"No valid string was provided"),new n(e)},n.fromObject=function(e){return a.checkArgument(d.isObject(e),"No valid argument was provided"),new n(e)},n.prototype._buildFromJSON=function(e){return this._buildFromObject(JSON.parse(e))},n.prototype._buildFromObject=function(e){var t={version:e.network?m.integerAsBuffer(u.get(e.network).xprivkey):e.version,depth:d.isNumber(e.depth)?m.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:d.isNumber(e.parentFingerPrint)?m.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:d.isNumber(e.childIndex)?m.integerAsBuffer(e.childIndex):e.childIndex,chainCode:d.isString(e.chainCode)?m.hexToBuffer(e.chainCode):e.chainCode,privateKey:d.isString(e.privateKey)&&_.isHexa(e.privateKey)?m.hexToBuffer(e.privateKey):e.privateKey,checksum:e.checksum?e.checksum.length?e.checksum:m.integerAsBuffer(e.checksum):void 0};return this._buildFromBuffers(t)},n.prototype._buildFromSerialized=function(e){var t=c.decode(e),r={version:t.slice(n.VersionStart,n.VersionEnd),depth:t.slice(n.DepthStart,n.DepthEnd),parentFingerPrint:t.slice(n.ParentFingerPrintStart,n.ParentFingerPrintEnd),childIndex:t.slice(n.ChildIndexStart,n.ChildIndexEnd),chainCode:t.slice(n.ChainCodeStart,n.ChainCodeEnd),privateKey:t.slice(n.PrivateKeyStart,n.PrivateKeyEnd),checksum:t.slice(n.ChecksumStart,n.ChecksumEnd),xprivkey:e};return this._buildFromBuffers(r)},n.prototype._generateRandomly=function(e){return n.fromSeed(b.getRandomBuffer(64),e)},n.fromSeed=function(e,t){if(_.isHexaString(e)&&(e=m.hexToBuffer(e)),!r.isBuffer(e))throw new y.InvalidEntropyArgument(e);if(e.length<128*S)throw new y.InvalidEntropyArgument.NotEnoughEntropy(e);if(e.length>512*S)throw new y.InvalidEntropyArgument.TooMuchEntropy(e);var i=p.sha512hmac(e,new o.Buffer("Bitcoin seed"));return new n({network:u.get(t)||u.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:i.slice(0,32),chainCode:i.slice(32,64)})},n.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var t=e("./hdpublickey");this._hdPublicKey=new t(this)}},n.prototype._buildFromBuffers=function(e){n._validateBufferArguments(e),_.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,m.emptyBuffer(1),e.privateKey],i=o.Buffer.concat(t);if(!e.checksum||!e.checksum.length)e.checksum=c.checksum(i);else if(e.checksum.toString()!==c.checksum(i).toString())throw new g.InvalidB58Checksum(i);var d=u.get(m.integerFromBuffer(e.version)),a;a=c.encode(o.Buffer.concat(t)),e.xprivkey=new r(a);var f=new h(s.fromBuffer(e.privateKey),d),l=f.toPublicKey(),b=n.ParentFingerPrintSize,y=p.sha256ripemd160(l.toBuffer()).slice(0,b);return _.defineImmutable(this,{xprivkey:a,network:d,depth:m.integerFromSingleByteBuffer(e.depth),privateKey:f,publicKey:l,fingerPrint:y}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this},n._validateBufferArguments=function(e){var t=function(t,r){var n=e[t];i(m.isBuffer(n),t+" argument is not a buffer"),i(n.length===r,t+" has not the expected size: found "+n.length+", expected "+r)};t("version",n.VersionSize),t("depth",n.DepthSize),t("parentFingerPrint",n.ParentFingerPrintSize),t("childIndex",n.ChildIndexSize),t("chainCode",n.ChainCodeSize),t("privateKey",n.PrivateKeySize),e.checksum&&e.checksum.length&&t("checksum",n.CheckSumSize)},n.prototype.toString=function(){return this.xprivkey},n.prototype.inspect=function(){return"<HDPrivateKey: "+this.xprivkey+">"},n.prototype.toObject=n.prototype.toJSON=function(){return{network:u.get(m.integerFromBuffer(this._buffers.version),"xprivkey").name,depth:m.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:m.integerFromBuffer(this.fingerPrint),parentFingerPrint:m.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:m.integerFromBuffer(this._buffers.childIndex),chainCode:m.bufferToHex(this._buffers.chainCode),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:m.integerFromBuffer(this._buffers.checksum),xprivkey:this.xprivkey}},n.fromBuffer=function(e){return new n(e.toString())},n.prototype.toBuffer=function(){return m.copy(this._buffers.xprivkey)},n.DefaultDepth=0,n.DefaultFingerprint=0,n.DefaultChildIndex=0,n.Hardened=2147483648,n.MaxIndex=2*n.Hardened,n.RootElementAlias=["m","M","m'","M'"],n.VersionSize=4,n.DepthSize=1,n.ParentFingerPrintSize=4,n.ChildIndexSize=4,n.ChainCodeSize=32,n.PrivateKeySize=32,n.CheckSumSize=4,n.DataLength=78,n.SerializedByteSize=82,n.VersionStart=0,n.VersionEnd=n.VersionStart+n.VersionSize,n.DepthStart=n.VersionEnd,n.DepthEnd=n.DepthStart+n.DepthSize,n.ParentFingerPrintStart=n.DepthEnd,n.ParentFingerPrintEnd=n.ParentFingerPrintStart+n.ParentFingerPrintSize,n.ChildIndexStart=n.ParentFingerPrintEnd,n.ChildIndexEnd=n.ChildIndexStart+n.ChildIndexSize,n.ChainCodeStart=n.ChildIndexEnd,n.ChainCodeEnd=n.ChainCodeStart+n.ChainCodeSize,n.PrivateKeyStart=n.ChainCodeEnd+1,n.PrivateKeyEnd=n.PrivateKeyStart+n.PrivateKeySize,n.ChecksumStart=n.PrivateKeyEnd,n.ChecksumEnd=n.ChecksumStart+n.CheckSumSize,i(n.ChecksumEnd===n.SerializedByteSize),t.exports=n}).call(this,e("buffer").Buffer)},{"./crypto/bn":7,"./crypto/hash":9,"./crypto/point":10,"./crypto/random":11,"./encoding/base58":13,"./encoding/base58check":14,"./errors":18,"./hdpublickey":21,"./networks":22,"./privatekey":24,"./util/buffer":43,"./util/js":44,"./util/preconditions":45,assert:61,buffer:115,lodash:193}],21:[function(e,t){(function(r){"use strict";function n(e){if(e instanceof n)return e;if(!(this instanceof n))return new n(e);if(!e)throw new y.MustSupplyArgument;else if(o.isString(e)||S.isBuffer(e)){var t=n.getSerializedError(e);if(!t)return this._buildFromSerialized(e);if(S.isBuffer(e)&&!n.getSerializedError(e.toString()))return this._buildFromSerialized(e.toString());if(t instanceof y.ArgumentIsPrivateExtended)return new p(e).hdPublicKey;throw t}else{if(o.isObject(e))return e instanceof p?this._buildFromPrivate(e):this._buildFromObject(e);throw new y.UnrecognizedArgument(e)}}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("lodash"),d=e("./util/preconditions"),a=e("./crypto/bn"),s=e("./encoding/base58"),f=e("./encoding/base58check"),c=e("./crypto/hash"),p=e("./hdprivatekey"),u=e("./networks"),l=e("./crypto/point"),h=e("./publickey"),b=e("./errors"),g=b,y=b.HDPublicKey,m=e("assert"),_=e("./util/js"),S=e("./util/buffer");n.isValidPath=function(e){if(o.isString(e)){var t=p._getDerivationIndexes(e);return null!==t&&o.every(t,n.isValidPath)}return!!o.isNumber(e)&&0<=e&&e<n.Hardened},n.prototype.derive=function(e,t){return this.deriveChild(e,t)},n.prototype.deriveChild=function(e,t){if(o.isNumber(e))return this._deriveWithNumber(e,t);if(o.isString(e))return this._deriveFromString(e);throw new y.InvalidDerivationArgument(e)},n.prototype._deriveWithNumber=function(e,t){if(e>=n.Hardened||t)throw new y.InvalidIndexCantDeriveHardened;if(0>e)throw new y.InvalidPath(e);var r=S.integerAsBuffer(e),i=S.concat([this.publicKey.toBuffer(),r]),o=c.sha512hmac(i,this._buffers.chainCode),d=a.fromBuffer(o.slice(0,32),{size:32}),s=o.slice(32,64),f;try{f=h.fromPoint(l.getG().mul(d).add(this.publicKey.point))}catch(t){return this._deriveWithNumber(e+1)}var p=new n({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:s,publicKey:f});return p},n.prototype._deriveFromString=function(e){if(o.includes(e,"'"))throw new y.InvalidIndexCantDeriveHardened;else if(!n.isValidPath(e))throw new y.InvalidPath(e);var t=p._getDerivationIndexes(e),r=t.reduce(function(e,t){return e._deriveWithNumber(t)},this);return r},n.isValidSerialized=function(e,t){return o.isNull(n.getSerializedError(e,t))},n.getSerializedError=function(e,t){if(!(o.isString(e)||S.isBuffer(e)))return new y.UnrecognizedArgument("expected buffer or string");if(!s.validCharacters(e))return new g.InvalidB58Char("(unknown)",e);try{e=f.decode(e)}catch(t){return new g.InvalidB58Checksum(e)}if(e.length!==n.DataSize)return new y.InvalidLength(e);if(!o.isUndefined(t)){var r=n._validateNetwork(e,t);if(r)return r}var i=S.integerFromBuffer(e.slice(0,4));return i===u.livenet.xprivkey||i===u.testnet.xprivkey?new y.ArgumentIsPrivateExtended:null},n._validateNetwork=function(e,t){var r=u.get(t);if(!r)return new g.InvalidNetworkArgument(t);var i=e.slice(n.VersionStart,n.VersionEnd);return S.integerFromBuffer(i)===r.xpubkey?null:new g.InvalidNetwork(i)},n.prototype._buildFromPrivate=function(e){var t=o.clone(e._buffers),r=l.getG().mul(a.fromBuffer(t.privateKey));return t.publicKey=l.pointToCompressed(r),t.version=S.integerAsBuffer(u.get(S.integerFromBuffer(t.version)).xpubkey),t.privateKey=void 0,t.checksum=void 0,t.xprivkey=void 0,this._buildFromBuffers(t)},n.prototype._buildFromObject=function(e){var t={version:e.network?S.integerAsBuffer(u.get(e.network).xpubkey):e.version,depth:o.isNumber(e.depth)?S.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:o.isNumber(e.parentFingerPrint)?S.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:o.isNumber(e.childIndex)?S.integerAsBuffer(e.childIndex):e.childIndex,chainCode:o.isString(e.chainCode)?S.hexToBuffer(e.chainCode):e.chainCode,publicKey:o.isString(e.publicKey)?S.hexToBuffer(e.publicKey):S.isBuffer(e.publicKey)?e.publicKey:e.publicKey.toBuffer(),checksum:o.isNumber(e.checksum)?S.integerAsBuffer(e.checksum):e.checksum};return this._buildFromBuffers(t)},n.prototype._buildFromSerialized=function(e){var t=f.decode(e),r={version:t.slice(n.VersionStart,n.VersionEnd),depth:t.slice(n.DepthStart,n.DepthEnd),parentFingerPrint:t.slice(n.ParentFingerPrintStart,n.ParentFingerPrintEnd),childIndex:t.slice(n.ChildIndexStart,n.ChildIndexEnd),chainCode:t.slice(n.ChainCodeStart,n.ChainCodeEnd),publicKey:t.slice(n.PublicKeyStart,n.PublicKeyEnd),checksum:t.slice(n.ChecksumStart,n.ChecksumEnd),xpubkey:e};return this._buildFromBuffers(r)},n.prototype._buildFromBuffers=function(e){n._validateBufferArguments(e),_.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,e.publicKey],i=S.concat(t),o=f.checksum(i);if(!e.checksum||!e.checksum.length)e.checksum=o;else if(e.checksum.toString("hex")!==o.toString("hex"))throw new g.InvalidB58Checksum(i,o);var d=u.get(S.integerFromBuffer(e.version)),a;a=f.encode(S.concat(t)),e.xpubkey=new r(a);var s=new h(e.publicKey,{network:d}),p=n.ParentFingerPrintSize,l=c.sha256ripemd160(s.toBuffer()).slice(0,p);return _.defineImmutable(this,{xpubkey:a,network:d,depth:S.integerFromSingleByteBuffer(e.depth),publicKey:s,fingerPrint:l}),this},n._validateBufferArguments=function(e){var t=function(t,r){var n=e[t];m(S.isBuffer(n),t+" argument is not a buffer, it's "+("undefined"==typeof n?"undefined":i(n))),m(n.length===r,t+" has not the expected size: found "+n.length+", expected "+r)};t("version",n.VersionSize),t("depth",n.DepthSize),t("parentFingerPrint",n.ParentFingerPrintSize),t("childIndex",n.ChildIndexSize),t("chainCode",n.ChainCodeSize),t("publicKey",n.PublicKeySize),e.checksum&&e.checksum.length&&t("checksum",n.CheckSumSize)},n.fromString=function(e){return d.checkArgument(o.isString(e),"No valid string was provided"),new n(e)},n.fromObject=function(e){return d.checkArgument(o.isObject(e),"No valid argument was provided"),new n(e)},n.prototype.toString=function(){return this.xpubkey},n.prototype.inspect=function(){return"<HDPublicKey: "+this.xpubkey+">"},n.prototype.toObject=n.prototype.toJSON=function(){return{network:u.get(S.integerFromBuffer(this._buffers.version)).name,depth:S.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:S.integerFromBuffer(this.fingerPrint),parentFingerPrint:S.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:S.integerFromBuffer(this._buffers.childIndex),chainCode:S.bufferToHex(this._buffers.chainCode),publicKey:this.publicKey.toString(),checksum:S.integerFromBuffer(this._buffers.checksum),xpubkey:this.xpubkey}},n.fromBuffer=function(e){return new n(e)},n.prototype.toBuffer=function(){return S.copy(this._buffers.xpubkey)},n.Hardened=2147483648,n.RootElementAlias=["m","M"],n.VersionSize=4,n.DepthSize=1,n.ParentFingerPrintSize=4,n.ChildIndexSize=4,n.ChainCodeSize=32,n.PublicKeySize=33,n.CheckSumSize=4,n.DataSize=78,n.SerializedByteSize=82,n.VersionStart=0,n.VersionEnd=n.VersionStart+n.VersionSize,n.DepthStart=n.VersionEnd,n.DepthEnd=n.DepthStart+n.DepthSize,n.ParentFingerPrintStart=n.DepthEnd,n.ParentFingerPrintEnd=n.ParentFingerPrintStart+n.ParentFingerPrintSize,n.ChildIndexStart=n.ParentFingerPrintEnd,n.ChildIndexEnd=n.ChildIndexStart+n.ChildIndexSize,n.ChainCodeStart=n.ChildIndexEnd,n.ChainCodeEnd=n.ChainCodeStart+n.ChainCodeSize,n.PublicKeyStart=n.ChainCodeEnd,n.PublicKeyEnd=n.PublicKeyStart+n.PublicKeySize,n.ChecksumStart=n.PublicKeyEnd,n.ChecksumEnd=n.ChecksumStart+n.CheckSumSize,m(n.PublicKeyEnd===n.DataSize),m(n.ChecksumEnd===n.SerializedByteSize),t.exports=n}).call(this,e("buffer").Buffer)},{"./crypto/bn":7,"./crypto/hash":9,"./crypto/point":10,"./encoding/base58":13,"./encoding/base58check":14,"./errors":18,"./hdprivatekey":20,"./networks":22,"./publickey":25,"./util/buffer":43,"./util/js":44,"./util/preconditions":45,assert:61,buffer:115,lodash:193}],22:[function(e,t){"use strict";function r(){}function n(e,t){if(~s.indexOf(e))return e;if(t){o.isArray(t)||(t=[t]);var r=function(t){return s[n][t]===e};for(var n in s)if(o.some(t,r))return s[n];return}return f[e]}function i(e){var t=new r;return a.defineImmutable(t,{name:e.name,alias:e.alias,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,xpubkey:e.xpubkey,xprivkey:e.xprivkey}),e.networkMagic&&a.defineImmutable(t,{networkMagic:d.integerAsBuffer(e.networkMagic)}),e.port&&a.defineImmutable(t,{port:e.port}),e.dnsSeeds&&a.defineImmutable(t,{dnsSeeds:e.dnsSeeds}),o.each(t,function(e){o.isUndefined(e)||o.isObject(e)||(f[e]=t)}),s.push(t),t}var o=e("lodash"),d=e("./util/buffer"),a=e("./util/js"),s=[],f={};r.prototype.toString=function(){return this.name},i({name:"livenet",alias:"mainnet",pubkeyhash:0,privatekey:128,scripthash:5,xpubkey:76067358,xprivkey:76066276,networkMagic:4190024921,port:8333,dnsSeeds:["seed.bitcoin.sipa.be","dnsseed.bluematt.me","dnsseed.bitcoin.dashjr.org","seed.bitcoinstats.com","seed.bitnodes.io","bitseed.xf2.org"]});var c=n("livenet");i({name:"testnet",alias:"regtest",pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956});var p=n("testnet"),u={PORT:18333,NETWORK_MAGIC:d.integerAsBuffer(185665799),DNS_SEEDS:["testnet-seed.bitcoin.petertodd.org","testnet-seed.bluematt.me","testnet-seed.alexykot.me","testnet-seed.bitcoin.schildbach.de"]};for(var l in u)o.isObject(u[l])||(f[u[l]]=p);var h={PORT:18444,NETWORK_MAGIC:d.integerAsBuffer(4206867930),DNS_SEEDS:[]};for(var l in h)o.isObject(h[l])||(f[h[l]]=p);Object.defineProperty(p,"port",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?h.PORT:u.PORT}}),Object.defineProperty(p,"networkMagic",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?h.NETWORK_MAGIC:u.NETWORK_MAGIC}}),Object.defineProperty(p,"dnsSeeds",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?h.DNS_SEEDS:u.DNS_SEEDS}}),t.exports={add:i,remove:function(e){for(var t=0;t<s.length;t++)s[t]===e&&s.splice(t,1);for(var r in f)f[r]===e&&delete f[r]},defaultNetwork:c,livenet:c,mainnet:c,testnet:p,get:n,enableRegtest:function(){p.regtestEnabled=!0},disableRegtest:function(){p.regtestEnabled=!1}}},{"./util/buffer":43,"./util/js":44,lodash:193}],23:[function(e,t){(function(r){"use strict";function i(e){if(!(this instanceof i))return new i(e);var t;if(o.isNumber(e))t=e;else if(o.isString(e))t=i.map[e];else throw new TypeError("Unrecognized num type: \""+("undefined"==typeof e?"undefined":n(e))+"\" for Opcode");return s.defineImmutable(this,{num:t}),this}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("lodash"),d=e("./util/preconditions"),a=e("./util/buffer"),s=e("./util/js");for(var f in i.fromBuffer=function(e){return d.checkArgument(a.isBuffer(e)),new i(+("0x"+e.toString("hex")))},i.fromNumber=function(e){return d.checkArgument(o.isNumber(e)),new i(e)},i.fromString=function(e){d.checkArgument(o.isString(e));var t=i.map[e];if("undefined"==typeof t)throw new TypeError("Invalid opcodestr");return new i(t)},i.prototype.toHex=function(){return this.num.toString(16)},i.prototype.toBuffer=function(){return new r(this.toHex(),"hex")},i.prototype.toNumber=function(){return this.num},i.prototype.toString=function(){var e=i.reverseMap[this.num];if("undefined"==typeof e)throw new Error("Opcode does not have a string representation");return e},i.smallInt=function(e){return d.checkArgument(o.isNumber(e),"Invalid Argument: n should be number"),d.checkArgument(0<=e&&16>=e,"Invalid Argument: n must be between 0 and 16"),0===e?i("OP_0"):new i(i.map.OP_1+e-1)},i.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255},i.reverseMap=[],i.map)i.reverseMap[i.map[f]]=f;o.extend(i,i.map),i.isSmallIntOp=function(e){return e instanceof i&&(e=e.toNumber()),e===i.map.OP_0||e>=i.map.OP_1&&e<=i.map.OP_16},i.prototype.inspect=function(){return"<Opcode: "+this.toString()+", hex: "+this.toHex()+", decimal: "+this.num+">"},t.exports=i}).call(this,e("buffer").Buffer)},{"./util/buffer":43,"./util/js":44,"./util/preconditions":45,buffer:115,lodash:193}],24:[function(e,t){(function(r){"use strict";function n(e,t){if(!(this instanceof n))return new n(e,t);if(e instanceof n)return e;var r=this._classifyArguments(e,t);if(!r.bn||0===r.bn.cmp(new a(0)))throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!r.bn.lt(c.getN()))throw new TypeError("Number must be less than N");if("undefined"==typeof r.network)throw new TypeError("Must specify the network (\"livenet\" or \"testnet\")");return s.defineImmutable(this,{bn:r.bn,compressed:r.compressed,network:r.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}var i=e("lodash"),o=e("./address"),d=e("./encoding/base58check"),a=e("./crypto/bn"),s=e("./util/js"),f=e("./networks"),c=e("./crypto/point"),p=e("./publickey"),u=e("./crypto/random"),l=e("./util/preconditions");n.prototype._classifyArguments=function(e,t){var o={compressed:!0,network:t?f.get(t):f.defaultNetwork};if(i.isUndefined(e)||i.isNull(e))o.bn=n._getRandomBN();else if(e instanceof a)o.bn=e;else if(e instanceof r||e instanceof Uint8Array)o=n._transformBuffer(e,t);else if(e.bn&&e.network)o=n._transformObject(e);else if(!t&&f.get(e))o.bn=n._getRandomBN(),o.network=f.get(e);else if("string"==typeof e)s.isHexa(e)?o.bn=new a(new r(e,"hex")):o=n._transformWIF(e,t);else throw new TypeError("First argument is an unrecognized data type.");return o},n._getRandomBN=function(){var e,t;do{var r=u.getRandomBuffer(32);t=a.fromBuffer(r),e=t.lt(c.getN())}while(!e);return t},n._transformBuffer=function(e,t){var r={};if(32===e.length)return n._transformBNBuffer(e,t);if(r.network=f.get(e[0],"privatekey"),!r.network)throw new Error("Invalid network");if(t&&r.network!==f.get(t))throw new TypeError("Private key network mismatch");if(34===e.length&&1===e[33])r.compressed=!0;else if(33===e.length)r.compressed=!1;else throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");return r.bn=a.fromBuffer(e.slice(1,33)),r},n._transformBNBuffer=function(e,t){var r={network:f.get(t)||f.defaultNetwork,bn:a.fromBuffer(e),compressed:!1};return r},n._transformWIF=function(e,t){return n._transformBuffer(d.decode(e),t)},n.fromBuffer=function(e,t){return new n(e,t)},n._transformObject=function(e){var t=new a(e.bn,"hex"),r=f.get(e.network);return{bn:t,network:r,compressed:e.compressed}},n.fromString=n.fromWIF=function(e){return l.checkArgument(i.isString(e),"First argument is expected to be a string."),new n(e)},n.fromObject=function(e){return l.checkArgument(i.isObject(e),"First argument is expected to be an object."),new n(e)},n.fromRandom=function(e){var t=n._getRandomBN();return new n(t,e)},n.getValidationError=function(e,t){var r;try{new n(e,t)}catch(t){r=t}return r},n.isValid=function(e,t){return!!e&&!n.getValidationError(e,t)},n.prototype.toString=function(){return this.toBuffer().toString("hex")},n.prototype.toWIF=function(){var e=this.network,t=this.compressed,n;return n=t?r.concat([new r([e.privatekey]),this.bn.toBuffer({size:32}),new r([1])]):r.concat([new r([e.privatekey]),this.bn.toBuffer({size:32})]),d.encode(n)},n.prototype.toBigNumber=function(){return this.bn},n.prototype.toBuffer=function(){return this.bn.toBuffer()},n.prototype.toBufferNoPadding=function(){return this.bn.toBuffer()},n.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=p.fromPrivateKey(this)),this._pubkey},n.prototype.toAddress=function(e){var t=this.toPublicKey();return o.fromPublicKey(t,e||this.network)},n.prototype.toObject=n.prototype.toJSON=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}},n.prototype.inspect=function(){var e=this.compressed?"":", uncompressed";return"<PrivateKey: "+this.toString()+", network: "+this.network+e+">"},t.exports=n}).call(this,e("buffer").Buffer)},{"./address":1,"./crypto/bn":7,"./crypto/point":10,"./crypto/random":11,"./encoding/base58check":14,"./networks":22,"./publickey":25,"./util/js":44,"./util/preconditions":45,buffer:115,lodash:193}],25:[function(e,t){(function(r){"use strict";function n(e,t){if(!(this instanceof n))return new n(e,t);if(c.checkArgument(e,"First argument is required, please include public key data."),e instanceof n)return e;t=t||{};var r=this._classifyArgs(e,t);return r.point.validate(),a.defineImmutable(this,{point:r.point,compressed:r.compressed,network:r.network||s.defaultNetwork}),this}var i=e("./crypto/bn"),o=e("./crypto/point"),d=e("./crypto/hash"),a=e("./util/js"),s=e("./networks"),f=e("lodash"),c=e("./util/preconditions");n.prototype._classifyArgs=function(e,t){var i={compressed:f.isUndefined(t.compressed)||t.compressed};if(e instanceof o)i.point=e;else if(e.x&&e.y)i=n._transformObject(e);else if("string"==typeof e)i=n._transformDER(new r(e,"hex"));else if(n._isBuffer(e))i=n._transformDER(e);else if(n._isPrivateKey(e))i=n._transformPrivateKey(e);else throw new TypeError("First argument is an unrecognized data format.");return i.network||(i.network=f.isUndefined(t.network)?void 0:s.get(t.network)),i},n._isPrivateKey=function(t){var r=e("./privatekey");return t instanceof r},n._isBuffer=function(e){return e instanceof r||e instanceof Uint8Array},n._transformPrivateKey=function(e){c.checkArgument(n._isPrivateKey(e),"Must be an instance of PrivateKey");var t={point:o.getG().mul(e.bn),compressed:e.compressed,network:e.network};return t},n._transformDER=function(e,t){c.checkArgument(n._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r={};t=!!f.isUndefined(t)||t;var d,a,s,p;if(4===e[0]||!t&&(6===e[0]||7===e[0])){if(s=e.slice(1,33),p=e.slice(33,65),32!==s.length||32!==p.length||65!==e.length)throw new TypeError("Length of x and y must be 32 bytes");d=new i(s),a=new i(p),r.point=new o(d,a),r.compressed=!1}else if(3===e[0])s=e.slice(1),d=new i(s),r=n._transformX(!0,d),r.compressed=!0;else if(2===e[0])s=e.slice(1),d=new i(s),r=n._transformX(!1,d),r.compressed=!0;else throw new TypeError("Invalid DER format public key");return r},n._transformX=function(e,t){c.checkArgument("boolean"==typeof e,"Must specify whether y is odd or not (true or false)");var r={point:o.fromX(e,t)};return r},n._transformObject=function(e){var t=new i(e.x,"hex"),r=new i(e.y,"hex"),d=new o(t,r);return new n(d,{compressed:e.compressed})},n.fromPrivateKey=function(e){c.checkArgument(n._isPrivateKey(e),"Must be an instance of PrivateKey");var t=n._transformPrivateKey(e);return new n(t.point,{compressed:t.compressed,network:t.network})},n.fromDER=n.fromBuffer=function(e,t){c.checkArgument(n._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r=n._transformDER(e,t);return new n(r.point,{compressed:r.compressed})},n.fromPoint=function(e,t){return c.checkArgument(e instanceof o,"First argument must be an instance of Point."),new n(e,{compressed:t})},n.fromString=function(e,t){var i=new r(e,t||"hex"),o=n._transformDER(i);return new n(o.point,{compressed:o.compressed})},n.fromX=function(e,t){var r=n._transformX(e,t);return new n(r.point,{compressed:r.compressed})},n.getValidationError=function(e){var t;try{new n(e)}catch(r){t=r}return t},n.isValid=function(e){return!n.getValidationError(e)},n.prototype.toObject=n.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}},n.prototype.toBuffer=n.prototype.toDER=function(){var e=this.point.getX(),t=this.point.getY(),n=e.toBuffer({size:32}),i=t.toBuffer({size:32}),o;if(!this.compressed)return o=new r([4]),r.concat([o,n,i]);var d=i[i.length-1]%2;return o=d?new r([3]):new r([2]),r.concat([o,n])},n.prototype._getID=function(){return d.sha256ripemd160(this.toBuffer())},n.prototype.toAddress=function(t){var r=e("./address");return r.fromPublicKey(this,t||this.network)},n.prototype.toString=function(){return this.toDER().toString("hex")},n.prototype.inspect=function(){return"<PublicKey: "+this.toString()+(this.compressed?"":", uncompressed")+">"},t.exports=n}).call(this,e("buffer").Buffer)},{"./address":1,"./crypto/bn":7,"./crypto/hash":9,"./crypto/point":10,"./networks":22,"./privatekey":24,"./util/js":44,"./util/preconditions":45,buffer:115,lodash:193}],26:[function(e,t){"use strict";t.exports=e("./script"),t.exports.Interpreter=e("./interpreter")},{"./interpreter":27,"./script":28}],27:[function(e,t){(function(r){"use strict";var o=e("lodash"),n=e("./script"),d=e("../opcode"),a=e("../crypto/bn"),i=e("../crypto/hash"),s=e("../crypto/signature"),f=e("../publickey"),c=function e(t){return this instanceof e?void(t?(this.initialize(),this.set(t)):this.initialize()):new e(t)};c.prototype.verify=function(t,r,i,d,a){var s=e("../transaction");o.isUndefined(i)&&(i=new s),o.isUndefined(d)&&(d=0),o.isUndefined(a)&&(a=0),this.set({script:t,tx:i,nin:d,flags:a});var f;if(0!=(a&c.SCRIPT_VERIFY_SIGPUSHONLY)&&!t.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;a&c.SCRIPT_VERIFY_P2SH&&(f=this.stack.slice());var p=this.stack;if(this.initialize(),this.set({script:r,stack:p,tx:i,nin:d,flags:a}),!this.evaluate())return!1;if(0===this.stack.length)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var u=this.stack[this.stack.length-1];if(!c.castToBool(u))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;if(a&c.SCRIPT_VERIFY_P2SH&&r.isScriptHashOut()){if(!t.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(0===f.length)throw new Error("internal error - stack copy empty");var l=f[f.length-1],h=n.fromBuffer(l);return f.pop(),this.initialize(),this.set({script:h,stack:f,tx:i,nin:d,flags:a}),!!this.evaluate()&&(0===f.length?(this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1):!!c.castToBool(f[f.length-1])||(this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1))}return!0},t.exports=c,c.prototype.initialize=function(){this.stack=[],this.altstack=[],this.pc=0,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0},c.prototype.set=function(e){this.script=e.script||this.script,this.tx=e.tx||this.tx,this.nin="undefined"==typeof e.nin?this.nin:e.nin,this.stack=e.stack||this.stack,this.altstack=e.altack||this.altstack,this.pc="undefined"==typeof e.pc?this.pc:e.pc,this.pbegincodehash="undefined"==typeof e.pbegincodehash?this.pbegincodehash:e.pbegincodehash,this.nOpCount="undefined"==typeof e.nOpCount?this.nOpCount:e.nOpCount,this.vfExec=e.vfExec||this.vfExec,this.errstr=e.errstr||this.errstr,this.flags="undefined"==typeof e.flags?this.flags:e.flags},c.true=new r([1]),c.false=new r([]),c.MAX_SCRIPT_ELEMENT_SIZE=520,c.LOCKTIME_THRESHOLD=5e8,c.LOCKTIME_THRESHOLD_BN=new a(c.LOCKTIME_THRESHOLD),c.SCRIPT_VERIFY_NONE=0,c.SCRIPT_VERIFY_P2SH=1,c.SCRIPT_VERIFY_STRICTENC=2,c.SCRIPT_VERIFY_DERSIG=4,c.SCRIPT_VERIFY_LOW_S=8,c.SCRIPT_VERIFY_NULLDUMMY=16,c.SCRIPT_VERIFY_SIGPUSHONLY=32,c.SCRIPT_VERIFY_MINIMALDATA=64,c.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128,c.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512,c.castToBool=function(e){for(var t=0;t<e.length;t++)if(0!==e[t])return t===e.length-1&&128===e[t]?!1:!0;return!1},c.prototype.checkSignatureEncoding=function(e){var t;if(0!=(this.flags&(c.SCRIPT_VERIFY_DERSIG|c.SCRIPT_VERIFY_LOW_S|c.SCRIPT_VERIFY_STRICTENC))&&!s.isTxDER(e))return this.errstr="SCRIPT_ERR_SIG_DER_INVALID_FORMAT",!1;if(0!=(this.flags&c.SCRIPT_VERIFY_LOW_S)){if(t=s.fromTxFormat(e),!t.hasLowS())return this.errstr="SCRIPT_ERR_SIG_DER_HIGH_S",!1;}else if(0!=(this.flags&c.SCRIPT_VERIFY_STRICTENC)&&(t=s.fromTxFormat(e),!t.hasDefinedHashtype()))return this.errstr="SCRIPT_ERR_SIG_HASHTYPE",!1;return!0},c.prototype.checkPubkeyEncoding=function(e){return 0==(this.flags&c.SCRIPT_VERIFY_STRICTENC)||f.isValid(e)||(this.errstr="SCRIPT_ERR_PUBKEYTYPE",!1)},c.prototype.evaluate=function(){if(1e4<this.script.toBuffer().length)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc<this.script.chunks.length;){var e=this.step();if(!e)return!1}if(1e3<this.stack.length+this.altstack.length)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}catch(t){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,!1}return!(0<this.vfExec.length)||(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1)},c.prototype.checkLockTime=function(e){return(this.tx.nLockTime<c.LOCKTIME_THRESHOLD&&e.lt(c.LOCKTIME_THRESHOLD_BN)||this.tx.nLockTime>=c.LOCKTIME_THRESHOLD&&e.gte(c.LOCKTIME_THRESHOLD_BN))&&!e.gt(new a(this.tx.nLockTime))&&!!this.tx.inputs[this.nin].isFinal()},c.prototype.step=function(){var e=0!=(this.flags&c.SCRIPT_VERIFY_MINIMALDATA),t=-1===this.vfExec.indexOf(!1),r=this.script.chunks[this.pc],p,u,l,h,b,g,y,m,_,S,v,I,x,A,w,E,P;this.pc++;var B=r.opcodenum;if(o.isUndefined(B))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(r.buf&&r.buf.length>c.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(B>d.OP_16&&201<++this.nOpCount)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(B===d.OP_CAT||B===d.OP_SUBSTR||B===d.OP_LEFT||B===d.OP_RIGHT||B===d.OP_INVERT||B===d.OP_AND||B===d.OP_OR||B===d.OP_XOR||B===d.OP_2MUL||B===d.OP_2DIV||B===d.OP_MUL||B===d.OP_DIV||B===d.OP_MOD||B===d.OP_LSHIFT||B===d.OP_RSHIFT)return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(t&&0<=B&&B<=d.OP_PUSHDATA4){if(e&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(!r.buf)this.stack.push(c.false);else if(r.len!==r.buf.length)throw new Error("Length of push value not equal to length of data");else this.stack.push(r.buf)}else if(t||d.OP_IF<=B&&B<=d.OP_ENDIF)switch(B){case d.OP_1NEGATE:case d.OP_1:case d.OP_2:case d.OP_3:case d.OP_4:case d.OP_5:case d.OP_6:case d.OP_7:case d.OP_8:case d.OP_9:case d.OP_10:case d.OP_11:case d.OP_12:case d.OP_13:case d.OP_14:case d.OP_15:case d.OP_16:b=B-(d.OP_1-1),p=new a(b).toScriptNumBuffer(),this.stack.push(p);break;case d.OP_NOP:break;case d.OP_NOP2:case d.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&c.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&c.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var O=a.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(O.lt(new a(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(O))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case d.OP_NOP1:case d.OP_NOP3:case d.OP_NOP4:case d.OP_NOP5:case d.OP_NOP6:case d.OP_NOP7:case d.OP_NOP8:case d.OP_NOP9:case d.OP_NOP10:if(this.flags&c.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case d.OP_IF:case d.OP_NOTIF:{if(E=!1,t){if(1>this.stack.length)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;p=this.stack.pop(),E=c.castToBool(p),B===d.OP_NOTIF&&(E=!E)}this.vfExec.push(E)}break;case d.OP_ELSE:{if(0===this.vfExec.length)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1]}break;case d.OP_ENDIF:{if(0===this.vfExec.length)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop()}break;case d.OP_VERIFY:{if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(p=this.stack[this.stack.length-1],E=c.castToBool(p),E)this.stack.pop();else return this.errstr="SCRIPT_ERR_VERIFY",!1}break;case d.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;break;case d.OP_TOALTSTACK:{if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop())}break;case d.OP_FROMALTSTACK:{if(1>this.altstack.length)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop())}break;case d.OP_2DROP:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop()}break;case d.OP_2DUP:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;u=this.stack[this.stack.length-2],l=this.stack[this.stack.length-1],this.stack.push(u),this.stack.push(l)}break;case d.OP_3DUP:{if(3>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;u=this.stack[this.stack.length-3],l=this.stack[this.stack.length-2];var R=this.stack[this.stack.length-1];this.stack.push(u),this.stack.push(l),this.stack.push(R)}break;case d.OP_2OVER:{if(4>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;u=this.stack[this.stack.length-4],l=this.stack[this.stack.length-3],this.stack.push(u),this.stack.push(l)}break;case d.OP_2ROT:{if(6>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;h=this.stack.splice(this.stack.length-6,2),this.stack.push(h[0]),this.stack.push(h[1])}break;case d.OP_2SWAP:{if(4>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;h=this.stack.splice(this.stack.length-4,2),this.stack.push(h[0]),this.stack.push(h[1])}break;case d.OP_IFDUP:{if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;p=this.stack[this.stack.length-1],E=c.castToBool(p),E&&this.stack.push(p)}break;case d.OP_DEPTH:p=new a(this.stack.length).toScriptNumBuffer(),this.stack.push(p);break;case d.OP_DROP:{if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop()}break;case d.OP_DUP:{if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1])}break;case d.OP_NIP:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1)}break;case d.OP_OVER:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2])}break;case d.OP_PICK:case d.OP_ROLL:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(p=this.stack[this.stack.length-1],m=a.fromScriptNumBuffer(p,e),b=m.toNumber(),this.stack.pop(),0>b||b>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;p=this.stack[this.stack.length-b-1],B===d.OP_ROLL&&this.stack.splice(this.stack.length-b-1,1),this.stack.push(p)}break;case d.OP_ROT:{if(3>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;g=this.stack[this.stack.length-3],y=this.stack[this.stack.length-2];var T=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=y,this.stack[this.stack.length-2]=T,this.stack[this.stack.length-1]=g}break;case d.OP_SWAP:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;g=this.stack[this.stack.length-2],y=this.stack[this.stack.length-1],this.stack[this.stack.length-2]=y,this.stack[this.stack.length-1]=g}break;case d.OP_TUCK:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1])}break;case d.OP_SIZE:{if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;m=new a(this.stack[this.stack.length-1].length),this.stack.push(m.toScriptNumBuffer())}break;case d.OP_EQUAL:case d.OP_EQUALVERIFY:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;u=this.stack[this.stack.length-2],l=this.stack[this.stack.length-1];var N=u.toString("hex")===l.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(N?c.true:c.false),B===d.OP_EQUALVERIFY)if(N)this.stack.pop();else return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1}break;case d.OP_1ADD:case d.OP_1SUB:case d.OP_NEGATE:case d.OP_ABS:case d.OP_NOT:case d.OP_0NOTEQUAL:{if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;p=this.stack[this.stack.length-1],m=a.fromScriptNumBuffer(p,e),B===d.OP_1ADD?m=m.add(a.One):B===d.OP_1SUB?m=m.sub(a.One):B===d.OP_NEGATE?m=m.neg():B===d.OP_ABS?0>m.cmp(a.Zero)&&(m=m.neg()):B===d.OP_NOT?m=new a((0===m.cmp(a.Zero))+0):B===d.OP_0NOTEQUAL?m=new a((0!==m.cmp(a.Zero))+0):void 0,this.stack.pop(),this.stack.push(m.toScriptNumBuffer())}break;case d.OP_ADD:case d.OP_SUB:case d.OP_BOOLAND:case d.OP_BOOLOR:case d.OP_NUMEQUAL:case d.OP_NUMEQUALVERIFY:case d.OP_NUMNOTEQUAL:case d.OP_LESSTHAN:case d.OP_GREATERTHAN:case d.OP_LESSTHANOREQUAL:case d.OP_GREATERTHANOREQUAL:case d.OP_MIN:case d.OP_MAX:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(_=a.fromScriptNumBuffer(this.stack[this.stack.length-2],e),S=a.fromScriptNumBuffer(this.stack[this.stack.length-1],e),m=new a(0),B===d.OP_ADD?m=_.add(S):B===d.OP_SUB?m=_.sub(S):B===d.OP_BOOLAND?m=new a((0!==_.cmp(a.Zero)&&0!==S.cmp(a.Zero))+0):B===d.OP_BOOLOR?m=new a((0!==_.cmp(a.Zero)||0!==S.cmp(a.Zero))+0):B===d.OP_NUMEQUAL?m=new a((0===_.cmp(S))+0):B===d.OP_NUMEQUALVERIFY?m=new a((0===_.cmp(S))+0):B===d.OP_NUMNOTEQUAL?m=new a((0!==_.cmp(S))+0):B===d.OP_LESSTHAN?m=new a((0>_.cmp(S))+0):B===d.OP_GREATERTHAN?m=new a((0<_.cmp(S))+0):B===d.OP_LESSTHANOREQUAL?m=new a((0>=_.cmp(S))+0):B===d.OP_GREATERTHANOREQUAL?m=new a((0<=_.cmp(S))+0):B===d.OP_MIN?m=0>_.cmp(S)?_:S:B===d.OP_MAX?m=0<_.cmp(S)?_:S:void 0,(this.stack.pop(),this.stack.pop(),this.stack.push(m.toScriptNumBuffer()),B===d.OP_NUMEQUALVERIFY))if(c.castToBool(this.stack[this.stack.length-1]))this.stack.pop();else return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1}break;case d.OP_WITHIN:{if(3>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;_=a.fromScriptNumBuffer(this.stack[this.stack.length-3],e),S=a.fromScriptNumBuffer(this.stack[this.stack.length-2],e);var C=a.fromScriptNumBuffer(this.stack[this.stack.length-1],e);E=0>=S.cmp(_)&&0>_.cmp(C),this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(E?c.true:c.false)}break;case d.OP_RIPEMD160:case d.OP_SHA1:case d.OP_SHA256:case d.OP_HASH160:case d.OP_HASH256:{if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;p=this.stack[this.stack.length-1];var j;B===d.OP_RIPEMD160?j=i.ripemd160(p):B===d.OP_SHA1?j=i.sha1(p):B===d.OP_SHA256?j=i.sha256(p):B===d.OP_HASH160?j=i.sha256ripemd160(p):B===d.OP_HASH256&&(j=i.sha256sha256(p)),this.stack.pop(),this.stack.push(j)}break;case d.OP_CODESEPARATOR:this.pbegincodehash=this.pc;break;case d.OP_CHECKSIG:case d.OP_CHECKSIGVERIFY:{if(2>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;v=this.stack[this.stack.length-2],I=this.stack[this.stack.length-1],x=new n().set({chunks:this.script.chunks.slice(this.pbegincodehash)});var M=new n().add(v);if(x.findAndDelete(M),!this.checkSignatureEncoding(v)||!this.checkPubkeyEncoding(I))return!1;try{A=s.fromTxFormat(v),w=f.fromBuffer(I,!1),P=this.tx.verifySignature(A,w,this.nin,x)}catch(t){P=!1}if(this.stack.pop(),this.stack.pop(),this.stack.push(P?c.true:c.false),B===d.OP_CHECKSIGVERIFY)if(P)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1}break;case d.OP_CHECKMULTISIG:case d.OP_CHECKMULTISIGVERIFY:{var U=1;if(this.stack.length<U)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var L=a.fromScriptNumBuffer(this.stack[this.stack.length-U],e).toNumber();if(0>L||20<L)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=L,201<this.nOpCount)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var D=++U;if(U+=L,this.stack.length<U)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var z=a.fromScriptNumBuffer(this.stack[this.stack.length-U],e).toNumber();if(0>z||z>L)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var H=++U;if(U+=z,this.stack.length<U)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;x=new n().set({chunks:this.script.chunks.slice(this.pbegincodehash)});for(var K=0;K<z;K++)v=this.stack[this.stack.length-H-K],x.findAndDelete(new n().add(v));for(P=!0;P&&0<z;){if(v=this.stack[this.stack.length-H],I=this.stack[this.stack.length-D],!this.checkSignatureEncoding(v)||!this.checkPubkeyEncoding(I))return!1;var k;try{A=s.fromTxFormat(v),w=f.fromBuffer(I,!1),k=this.tx.verifySignature(A,w,this.nin,x)}catch(t){k=!1}k&&(H++,z--),D++,L--,z>L&&(P=!1)}for(;1<U--;)this.stack.pop();if(1>this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&c.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(P?c.true:c.false),B===d.OP_CHECKMULTISIGVERIFY)if(P)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1}break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1;}return!0}}).call(this,e("buffer").Buffer)},{"../crypto/bn":7,"../crypto/hash":9,"../crypto/signature":12,"../opcode":23,"../publickey":25,"../transaction":29,"./script":28,buffer:115,lodash:193}],28:[function(e,t){(function(r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../address"),o=e("../encoding/bufferreader"),d=e("../encoding/bufferwriter"),a=e("../crypto/hash"),f=e("../opcode"),c=e("../publickey"),s=e("../crypto/signature"),p=e("../networks"),u=e("../util/preconditions"),l=e("lodash"),h=e("../errors"),b=e("buffer"),g=e("../util/buffer"),y=e("../util/js"),m=function e(t){return this instanceof e?(this.chunks=[],g.isBuffer(t))?e.fromBuffer(t):t instanceof i?e.fromAddress(t):t instanceof e?e.fromBuffer(t.toBuffer()):"string"==typeof t?e.fromString(t):void("undefined"!=typeof t&&this.set(t)):new e(t)};m.prototype.set=function(e){return this.chunks=e.chunks||this.chunks,this},m.fromBuffer=function(t){var e=new m;e.chunks=[];for(var r=new o(t);!r.finished();)try{var n=r.readUInt8(),i,d;0<n&&n<f.OP_PUSHDATA1?(i=n,e.chunks.push({buf:r.read(i),len:i,opcodenum:n})):n===f.OP_PUSHDATA1?(i=r.readUInt8(),d=r.read(i),e.chunks.push({buf:d,len:i,opcodenum:n})):n===f.OP_PUSHDATA2?(i=r.readUInt16LE(),d=r.read(i),e.chunks.push({buf:d,len:i,opcodenum:n})):n===f.OP_PUSHDATA4?(i=r.readUInt32LE(),d=r.read(i),e.chunks.push({buf:d,len:i,opcodenum:n})):e.chunks.push({opcodenum:n})}catch(r){if(r instanceof RangeError)throw new h.Script.InvalidBuffer(t.toString("hex"));throw r}return e},m.prototype.toBuffer=function(){for(var e=new d,t=0;t<this.chunks.length;t++){var r=this.chunks[t],n=r.opcodenum;e.writeUInt8(r.opcodenum),r.buf&&(n<f.OP_PUSHDATA1?e.write(r.buf):n===f.OP_PUSHDATA1?(e.writeUInt8(r.len),e.write(r.buf)):n===f.OP_PUSHDATA2?(e.writeUInt16LE(r.len),e.write(r.buf)):n===f.OP_PUSHDATA4&&(e.writeUInt32LE(r.len),e.write(r.buf)))}return e.concat()},m.fromASM=function(e){var t=new m;t.chunks=[];for(var n=e.split(" "),o=0;o<n.length;){var i=n[o],d=f(i),a=d.toNumber();if(l.isUndefined(a)){var s=new r(n[o],"hex");t.chunks.push({buf:s,len:s.length,opcodenum:s.length}),++o}else a===f.OP_PUSHDATA1||a===f.OP_PUSHDATA2||a===f.OP_PUSHDATA4?(t.chunks.push({buf:new r(n[o+2],"hex"),len:parseInt(n[o+1]),opcodenum:a}),o+=3):(t.chunks.push({opcodenum:a}),++o)}return t},m.fromHex=function(e){return new m(new b.Buffer(e,"hex"))},m.fromString=function(e){if(y.isHexa(e)||0===e.length)return new m(new b.Buffer(e,"hex"));var t=new m;t.chunks=[];for(var n=e.split(" "),o=0;o<n.length;){var i=n[o],d=f(i),a=d.toNumber();if(l.isUndefined(a)){if(a=parseInt(i),0<a&&a<f.OP_PUSHDATA1)t.chunks.push({buf:new r(n[o+1].slice(2),"hex"),len:a,opcodenum:a}),o+=2;else throw new Error("Invalid script: "+JSON.stringify(e));}else if(a===f.OP_PUSHDATA1||a===f.OP_PUSHDATA2||a===f.OP_PUSHDATA4){if("0x"!==n[o+2].slice(0,2))throw new Error("Pushdata data must start with 0x");t.chunks.push({buf:new r(n[o+2].slice(2),"hex"),len:parseInt(n[o+1]),opcodenum:a}),o+=3}else t.chunks.push({opcodenum:a}),++o}return t},m.prototype._chunkToString=function(e,t){var r=e.opcodenum,n="asm"===t,i="";if(!!e.buf)(r===f.OP_PUSHDATA1||r===f.OP_PUSHDATA2||r===f.OP_PUSHDATA4)&&(i=i+" "+f(r).toString()),0<e.len&&(n?i=i+" "+e.buf.toString("hex"):i=i+" "+e.len+" 0x"+e.buf.toString("hex"));else if("undefined"!=typeof f.reverseMap[r])i=i+" "+f(r).toString();else{var o=r.toString(16);0!=o.length%2&&(o="0"+o),i=n?i+" "+o:i+" 0x"+o}return i},m.prototype.toASM=function(){for(var e="",t=0,r;t<this.chunks.length;t++)r=this.chunks[t],e+=this._chunkToString(r,"asm");return e.substr(1)},m.prototype.toString=function(){for(var e="",t=0,r;t<this.chunks.length;t++)r=this.chunks[t],e+=this._chunkToString(r);return e.substr(1)},m.prototype.toHex=function(){return this.toBuffer().toString("hex")},m.prototype.inspect=function(){return"<Script: "+this.toString()+">"},m.prototype.isPublicKeyHashOut=function(){return!!(5===this.chunks.length&&this.chunks[0].opcodenum===f.OP_DUP&&this.chunks[1].opcodenum===f.OP_HASH160&&this.chunks[2].buf&&20===this.chunks[2].buf.length&&this.chunks[3].opcodenum===f.OP_EQUALVERIFY&&this.chunks[4].opcodenum===f.OP_CHECKSIG)},m.prototype.isPublicKeyHashIn=function(){if(2===this.chunks.length){var e=this.chunks[0].buf,t=this.chunks[1].buf;if(e&&e.length&&48===e[0]&&t&&t.length){var r=t[0];if((4===r||6===r||7===r)&&65===t.length)return!0;if((3===r||2===r)&&33===t.length)return!0}}return!1},m.prototype.getPublicKey=function(){return u.checkState(this.isPublicKeyOut(),"Can't retrieve PublicKey from a non-PK output"),this.chunks[0].buf},m.prototype.getPublicKeyHash=function(){return u.checkState(this.isPublicKeyHashOut(),"Can't retrieve PublicKeyHash from a non-PKH output"),this.chunks[2].buf},m.prototype.isPublicKeyOut=function(){if(2===this.chunks.length&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===f.OP_CHECKSIG){var e=this.chunks[0].buf,t=e[0],r=!1;if((4===t||6===t||7===t)&&65===e.length?r=!0:(3===t||2===t)&&33===e.length&&(r=!0),r)return c.isValid(e)}return!1},m.prototype.isPublicKeyIn=function(){if(1===this.chunks.length){var e=this.chunks[0].buf;if(e&&e.length&&48===e[0])return!0}return!1},m.prototype.isScriptHashOut=function(){var e=this.toBuffer();return 23===e.length&&e[0]===f.OP_HASH160&&20===e[1]&&e[e.length-1]===f.OP_EQUAL},m.prototype.isScriptHashIn=function(){if(1>=this.chunks.length)return!1;var e=this.chunks[this.chunks.length-1],t=e.buf;if(!t)return!1;var r;try{r=m.fromBuffer(t)}catch(t){if(t instanceof h.Script.InvalidBuffer)return!1;throw t}var n=r.classify();return n!==m.types.UNKNOWN},m.prototype.isMultisigOut=function(){return 3<this.chunks.length&&f.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(e){return e.buf&&g.isBuffer(e.buf)})&&f.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===f.OP_CHECKMULTISIG},m.prototype.isMultisigIn=function(){return 2<=this.chunks.length&&0===this.chunks[0].opcodenum&&this.chunks.slice(1,this.chunks.length).every(function(e){return e.buf&&g.isBuffer(e.buf)&&s.isTxDER(e.buf)})},m.prototype.isDataOut=function(){return 1<=this.chunks.length&&this.chunks[0].opcodenum===f.OP_RETURN&&(1===this.chunks.length||2===this.chunks.length&&this.chunks[1].buf&&this.chunks[1].buf.length<=m.OP_RETURN_STANDARD_SIZE&&this.chunks[1].length===this.chunks.len)},m.prototype.getData=function(){if(this.isDataOut()||this.isScriptHashOut())return l.isUndefined(this.chunks[1])?new r(0):new r(this.chunks[1].buf);if(this.isPublicKeyHashOut())return new r(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")},m.prototype.isPushOnly=function(){return l.every(this.chunks,function(e){return e.opcodenum<=f.OP_16})},m.types={},m.types.UNKNOWN="Unknown",m.types.PUBKEY_OUT="Pay to public key",m.types.PUBKEY_IN="Spend from public key",m.types.PUBKEYHASH_OUT="Pay to public key hash",m.types.PUBKEYHASH_IN="Spend from public key hash",m.types.SCRIPTHASH_OUT="Pay to script hash",m.types.SCRIPTHASH_IN="Spend from script hash",m.types.MULTISIG_OUT="Pay to multisig",m.types.MULTISIG_IN="Spend from multisig",m.types.DATA_OUT="Data push",m.OP_RETURN_STANDARD_SIZE=80,m.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var e=this.classifyOutput();return e==m.types.UNKNOWN?this.classifyInput():e},m.outputIdentifiers={},m.outputIdentifiers.PUBKEY_OUT=m.prototype.isPublicKeyOut,m.outputIdentifiers.PUBKEYHASH_OUT=m.prototype.isPublicKeyHashOut,m.outputIdentifiers.MULTISIG_OUT=m.prototype.isMultisigOut,m.outputIdentifiers.SCRIPTHASH_OUT=m.prototype.isScriptHashOut,m.outputIdentifiers.DATA_OUT=m.prototype.isDataOut,m.prototype.classifyOutput=function(){for(var e in m.outputIdentifiers)if(m.outputIdentifiers[e].bind(this)())return m.types[e];return m.types.UNKNOWN},m.inputIdentifiers={},m.inputIdentifiers.PUBKEY_IN=m.prototype.isPublicKeyIn,m.inputIdentifiers.PUBKEYHASH_IN=m.prototype.isPublicKeyHashIn,m.inputIdentifiers.MULTISIG_IN=m.prototype.isMultisigIn,m.inputIdentifiers.SCRIPTHASH_IN=m.prototype.isScriptHashIn,m.prototype.classifyInput=function(){for(var e in m.inputIdentifiers)if(m.inputIdentifiers[e].bind(this)())return m.types[e];return m.types.UNKNOWN},m.prototype.isStandard=function(){return this.classify()!==m.types.UNKNOWN},m.prototype.prepend=function(e){return this._addByType(e,!0),this},m.prototype.equals=function(e){if(u.checkState(e instanceof m,"Must provide another script"),this.chunks.length!==e.chunks.length)return!1;var t;for(t=0;t<this.chunks.length;t++){if(g.isBuffer(this.chunks[t].buf)&&!g.isBuffer(e.chunks[t].buf))return!1;if(g.isBuffer(this.chunks[t].buf)&&!g.equals(this.chunks[t].buf,e.chunks[t].buf))return!1;if(this.chunks[t].opcodenum!==e.chunks[t].opcodenum)return!1}return!0},m.prototype.add=function(e){return this._addByType(e,!1),this},m.prototype._addByType=function(e,t){if("string"==typeof e)this._addOpcode(e,t);else if("number"==typeof e)this._addOpcode(e,t);else if(e instanceof f)this._addOpcode(e,t);else if(g.isBuffer(e))this._addBuffer(e,t);else if(e instanceof m)this.chunks=this.chunks.concat(e.chunks);else if("object"===("undefined"==typeof e?"undefined":n(e)))this._insertAtPosition(e,t);else throw new Error("Invalid script chunk")},m.prototype._insertAtPosition=function(e,t){t?this.chunks.unshift(e):this.chunks.push(e)},m.prototype._addOpcode=function(e,t){var r;return r="number"==typeof e?e:e instanceof f?e.toNumber():f(e).toNumber(),this._insertAtPosition({opcodenum:r},t),this},m.prototype._addBuffer=function(e,t){var r=e.length,n;if(0<=r&&r<f.OP_PUSHDATA1)n=r;else if(256>r)n=f.OP_PUSHDATA1;else if(65536>r)n=f.OP_PUSHDATA2;else if(4294967296>r)n=f.OP_PUSHDATA4;else throw new Error("You can't push that much data");return this._insertAtPosition({buf:e,len:r,opcodenum:n},t),this},m.prototype.removeCodeseparators=function(){for(var e=[],t=0;t<this.chunks.length;t++)this.chunks[t].opcodenum!==f.OP_CODESEPARATOR&&e.push(this.chunks[t]);return this.chunks=e,this},m.buildMultisigOut=function(e,t,r){u.checkArgument(t<=e.length,"Number of required signatures must be less than or equal to the number of public keys"),r=r||{};var n=new m;n.add(f.smallInt(t)),e=l.map(e,c);var o=e;r.noSorting||(o=l.sortBy(e,function(e){return e.toString("hex")}));for(var d=0,i;d<o.length;d++)i=o[d],n.add(i.toBuffer());return n.add(f.smallInt(e.length)),n.add(f.OP_CHECKMULTISIG),n},m.buildMultisigIn=function(e,t,r,n){u.checkArgument(l.isArray(e)),u.checkArgument(l.isNumber(t)),u.checkArgument(l.isArray(r)),n=n||{};var i=new m;return i.add(f.OP_0),l.each(r,function(e){u.checkArgument(g.isBuffer(e),"Signatures must be an array of Buffers"),i.add(e)}),i},m.buildP2SHMultisigIn=function(e,t,r,n){u.checkArgument(l.isArray(e)),u.checkArgument(l.isNumber(t)),u.checkArgument(l.isArray(r)),n=n||{};var i=new m;return i.add(f.OP_0),l.each(r,function(e){u.checkArgument(g.isBuffer(e),"Signatures must be an array of Buffers"),i.add(e)}),i.add((n.cachedMultisig||m.buildMultisigOut(e,t,n)).toBuffer()),i},m.buildPublicKeyHashOut=function(e){u.checkArgument(!l.isUndefined(e)),u.checkArgument(e instanceof c||e instanceof i||l.isString(e)),e instanceof c?e=e.toAddress():l.isString(e)&&(e=new i(e));var t=new m;return t.add(f.OP_DUP).add(f.OP_HASH160).add(e.hashBuffer).add(f.OP_EQUALVERIFY).add(f.OP_CHECKSIG),t._network=e.network,t},m.buildPublicKeyOut=function(e){u.checkArgument(e instanceof c);var t=new m;return t.add(e.toBuffer()).add(f.OP_CHECKSIG),t},m.buildDataOut=function(e,t){u.checkArgument(l.isUndefined(e)||l.isString(e)||g.isBuffer(e)),l.isString(e)&&(e=new r(e,t));var n=new m;return n.add(f.OP_RETURN),l.isUndefined(e)||n.add(e),n},m.buildScriptHashOut=function(e){u.checkArgument(e instanceof m||e instanceof i&&e.isPayToScriptHash());var t=new m;return t.add(f.OP_HASH160).add(e instanceof i?e.hashBuffer:a.sha256ripemd160(e.toBuffer())).add(f.OP_EQUAL),t._network=e._network||e.network,t},m.buildPublicKeyIn=function(e,t){u.checkArgument(e instanceof s||g.isBuffer(e)),u.checkArgument(l.isUndefined(t)||l.isNumber(t)),e instanceof s&&(e=e.toBuffer());var r=new m;return r.add(g.concat([e,g.integerAsSingleByteBuffer(t||s.SIGHASH_ALL)])),r},m.buildPublicKeyHashIn=function(e,t,r){u.checkArgument(t instanceof s||g.isBuffer(t)),u.checkArgument(l.isUndefined(r)||l.isNumber(r)),t instanceof s&&(t=t.toBuffer());var n=new m().add(g.concat([t,g.integerAsSingleByteBuffer(r||s.SIGHASH_ALL)])).add(new c(e).toBuffer());return n},m.empty=function(){return new m},m.prototype.toScriptHashOut=function(){return m.buildScriptHashOut(this)},m.fromAddress=function(e){if(e=i(e),e.isPayToScriptHash())return m.buildScriptHashOut(e);if(e.isPayToPublicKeyHash())return m.buildPublicKeyHashOut(e);throw new h.Script.UnrecognizedAddress(e)},m.prototype.getAddressInfo=function(){if(this._isInput)return this._getInputAddressInfo();if(this._isOutput)return this._getOutputAddressInfo();var e=this._getOutputAddressInfo();return e?e:this._getInputAddressInfo()},m.prototype._getOutputAddressInfo=function(){var e={};if(this.isScriptHashOut())e.hashBuffer=this.getData(),e.type=i.PayToScriptHash;else if(this.isPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=i.PayToPublicKeyHash;else return!1;return e},m.prototype._getInputAddressInfo=function(){var e={};if(this.isPublicKeyHashIn())e.hashBuffer=a.sha256ripemd160(this.chunks[1].buf),e.type=i.PayToPublicKeyHash;else if(this.isScriptHashIn())e.hashBuffer=a.sha256ripemd160(this.chunks[this.chunks.length-1].buf),e.type=i.PayToScriptHash;else return!1;return e},m.prototype.toAddress=function(e){var t=this.getAddressInfo();return!!t&&(t.network=p.get(e)||this._network||p.defaultNetwork,new i(t))},m.prototype.findAndDelete=function(e){for(var t=e.toBuffer(),r=t.toString("hex"),n=0;n<this.chunks.length;n++){var i=m({chunks:[this.chunks[n]]}),o=i.toBuffer(),d=o.toString("hex");r===d&&this.chunks.splice(n,1)}return this},m.prototype.checkMinimalPush=function(e){var t=this.chunks[e],r=t.buf,n=t.opcodenum;if(!r)return!0;return 0===r.length?n===f.OP_0:1===r.length&&1<=r[0]&&16>=r[0]?n===f.OP_1+(r[0]-1):1===r.length&&129===r[0]?n===f.OP_1NEGATE:75>=r.length?n===r.length:255>=r.length?n===f.OP_PUSHDATA1:!(65535>=r.length)||n===f.OP_PUSHDATA2},m.prototype._decodeOP_N=function(e){if(e===f.OP_0)return 0;if(e>=f.OP_1&&e<=f.OP_16)return e-(f.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(e))},m.prototype.getSignatureOperationsCount=function(e){e=!!l.isUndefined(e)||e;var t=this,r=0,n=f.OP_INVALIDOPCODE;return l.each(t.chunks,function(i){var o=i.opcodenum;o==f.OP_CHECKSIG||o==f.OP_CHECKSIGVERIFY?r++:(o==f.OP_CHECKMULTISIG||o==f.OP_CHECKMULTISIGVERIFY)&&(e&&n>=f.OP_1&&n<=f.OP_16?r+=t._decodeOP_N(n):r+=20),n=o}),r},t.exports=m}).call(this,e("buffer").Buffer)},{"../address":1,"../crypto/hash":9,"../crypto/signature":12,"../encoding/bufferreader":15,"../encoding/bufferwriter":16,"../errors":18,"../networks":22,"../opcode":23,"../publickey":25,"../util/buffer":43,"../util/js":44,"../util/preconditions":45,buffer:115,lodash:193}],29:[function(e,t){"use strict";t.exports=e("./transaction"),t.exports.Input=e("./input"),t.exports.Output=e("./output"),t.exports.UnspentOutput=e("./unspentoutput"),t.exports.Signature=e("./signature"),t.exports.Sighash=e("./sighash")},{"./input":30,"./output":36,"./sighash":37,"./signature":38,"./transaction":39,"./unspentoutput":40}],30:[function(e,t){"use strict";t.exports=e("./input"),t.exports.PublicKey=e("./publickey"),t.exports.PublicKeyHash=e("./publickeyhash"),t.exports.MultiSig=e("./multisig.js"),t.exports.MultiSigScriptHash=e("./multisigscripthash.js")},{"./input":31,"./multisig.js":32,"./multisigscripthash.js":33,"./publickey":34,"./publickeyhash":35}],31:[function(e,t){"use strict";function r(e){return this instanceof r?e?this._fromObject(e):void 0:new r(e)}var n=e("lodash"),i=e("../../util/preconditions"),o=e("../../errors"),d=e("../../encoding/bufferwriter"),a=e("buffer"),s=e("../../util/buffer"),f=e("../../util/js"),c=e("../../script"),p=e("../sighash"),u=e("../output"),l=4294967295,h=l;r.MAXINT=l,r.DEFAULT_SEQNUMBER=h,r.DEFAULT_LOCKTIME_SEQNUMBER=l-1,r.DEFAULT_RBF_SEQNUMBER=l-2,Object.defineProperty(r.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new c(this._scriptBuffer),this._script._isInput=!0),this._script)}}),r.fromObject=function(e){i.checkArgument(n.isObject(e));var t=new r;return t._fromObject(e)},r.prototype._fromObject=function(e){var t;if(t=n.isString(e.prevTxId)&&f.isHexa(e.prevTxId)?new a.Buffer(e.prevTxId,"hex"):e.prevTxId,this.output=e.output?e.output instanceof u?e.output:new u(e.output):void 0,this.prevTxId=t||e.txidbuf,this.outputIndex=n.isUndefined(e.outputIndex)?e.txoutnum:e.outputIndex,this.sequenceNumber=n.isUndefined(e.sequenceNumber)?n.isUndefined(e.seqnum)?h:e.seqnum:e.sequenceNumber,n.isUndefined(e.script)&&n.isUndefined(e.scriptBuffer))throw new o.Transaction.Input.MissingScript;return this.setScript(e.scriptBuffer||e.script),this},r.prototype.toObject=r.prototype.toJSON=function(){var e={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(e.scriptString=this.script.toString()),this.output&&(e.output=this.output.toObject()),e},r.fromBufferReader=function(e){var t=new r;return t.prevTxId=e.readReverse(32),t.outputIndex=e.readUInt32LE(),t._scriptBuffer=e.readVarLengthBuffer(),t.sequenceNumber=e.readUInt32LE(),t},r.prototype.toBufferWriter=function(e){e||(e=new d),e.writeReverse(this.prevTxId),e.writeUInt32LE(this.outputIndex);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e.writeUInt32LE(this.sequenceNumber),e},r.prototype.setScript=function(e){if(this._script=null,e instanceof c)this._script=e,this._script._isInput=!0,this._scriptBuffer=e.toBuffer();else if(f.isHexa(e))this._scriptBuffer=new a.Buffer(e,"hex");else if(n.isString(e))this._script=new c(e),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(s.isBuffer(e))this._scriptBuffer=new a.Buffer(e);else throw new TypeError("Invalid argument type: script");return this},r.prototype.getSignatures=function(){throw new o.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))},r.prototype.isFullySigned=function(){throw new o.AbstractMethodInvoked("Input#isFullySigned")},r.prototype.isFinal=function(){return 4294967295!==this.sequenceNumber},r.prototype.addSignature=function(){throw new o.AbstractMethodInvoked("Input#addSignature")},r.prototype.clearSignatures=function(){throw new o.AbstractMethodInvoked("Input#clearSignatures")},r.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,p.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,this.output.satoshisBN)},r.prototype.isNull=function(){return"0000000000000000000000000000000000000000000000000000000000000000"===this.prevTxId.toString("hex")&&4294967295===this.outputIndex},r.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length},t.exports=r},{"../../encoding/bufferwriter":16,"../../errors":18,"../../script":26,"../../util/buffer":43,"../../util/js":44,"../../util/preconditions":45,"../output":36,"../sighash":37,buffer:115,lodash:193}],32:[function(e,t){"use strict";function r(e,t,r,i){d.apply(this,arguments);var o=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,this.publicKeys=n.sortBy(t,function(e){return e.toString("hex")}),s.checkState(f.buildMultisigOut(this.publicKeys,r).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},n.each(this.publicKeys,function(e,t){o.publicKeyIndex[e.toString()]=t}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):Array(this.publicKeys.length)}var n=e("lodash"),i=e("inherits"),o=e("../transaction"),d=e("./input"),a=e("../output"),s=e("../../util/preconditions"),f=e("../../script"),c=e("../../crypto/signature"),p=e("../sighash"),u=e("../../publickey"),l=e("../../util/buffer"),h=e("../signature");i(r,d),r.prototype.toObject=function(){var e=d.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=n.map(this.publicKeys,function(e){return e.toString()}),e.signatures=this._serializeSignatures(),e},r.prototype._deserializeSignatures=function(e){return n.map(e,function(e){return e?new h(e):void 0})},r.prototype._serializeSignatures=function(){return n.map(this.signatures,function(e){return e?e.toObject():void 0})},r.prototype.getSignatures=function(e,t,r,i){s.checkState(this.output instanceof a),i=i||c.SIGHASH_ALL|c.SIGHASH_FORKID;var o=this,d=[];return n.each(this.publicKeys,function(n){n.toString()===t.publicKey.toString()&&d.push(new h({publicKey:t.publicKey,prevTxId:o.prevTxId,outputIndex:o.outputIndex,inputIndex:r,signature:p.sign(e,t,i,r,o.output.script,o.output.satoshisBN),sigtype:i}))}),d},r.prototype.addSignature=function(e,t){return s.checkState(!this.isFullySigned(),"All needed signatures have already been added"),s.checkArgument(!n.isUndefined(this.publicKeyIndex[t.publicKey.toString()]),"Signature has no matching public key"),s.checkState(this.isValidSignature(e,t)),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this},r.prototype._updateScript=function(){return this.setScript(f.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this},r.prototype._createSignatures=function(){return n.map(n.filter(this.signatures,function(e){return!n.isUndefined(e)}),function(e){return l.concat([e.signature.toDER(),l.integerAsSingleByteBuffer(e.sigtype)])})},r.prototype.clearSignatures=function(){this.signatures=Array(this.publicKeys.length),this._updateScript()},r.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold},r.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()},r.prototype.countSignatures=function(){return n.reduce(this.signatures,function(e,t){return e+!!t},0)},r.prototype.publicKeysWithoutSignature=function(){var e=this;return n.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})},r.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,p.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,this.output.satoshisBN)},r.normalizeSignatures=function(e,t,r,n,i){return i.map(function(i){var o=null;return n=n.filter(function(n){if(o)return!0;var d=new h({signature:c.fromTxFormat(n),publicKey:i,prevTxId:t.prevTxId,outputIndex:t.outputIndex,inputIndex:r,sigtype:c.SIGHASH_ALL});d.signature.nhashtype=d.sigtype;var a=p.verify(e,d.signature,d.publicKey,d.inputIndex,t.output.script);return!a||(o=d,!1)}),o?o:null})},r.OPCODES_SIZE=1,r.SIGNATURE_SIZE=73,r.prototype._estimateSize=function(){return r.OPCODES_SIZE+this.threshold*r.SIGNATURE_SIZE},t.exports=r},{"../../crypto/signature":12,"../../publickey":25,"../../script":26,"../../util/buffer":43,"../../util/preconditions":45,"../output":36,"../sighash":37,"../signature":38,"../transaction":39,"./input":31,inherits:190,lodash:193}],33:[function(e,t){"use strict";function r(e,t,r,i){o.apply(this,arguments);var d=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,this.publicKeys=n.sortBy(t,function(e){return e.toString("hex")}),this.redeemScript=s.buildMultisigOut(this.publicKeys,r),a.checkState(s.buildScriptHashOut(this.redeemScript).equals(this.output.script),"Provided public keys don't hash to the provided output"),this.publicKeyIndex={},n.each(this.publicKeys,function(e,t){d.publicKeyIndex[e.toString()]=t}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):Array(this.publicKeys.length)}var n=e("lodash"),i=e("inherits"),o=e("./input"),d=e("../output"),a=e("../../util/preconditions"),s=e("../../script"),f=e("../../crypto/signature"),c=e("../sighash"),p=e("../../publickey"),u=e("../../util/buffer"),l=e("../signature");i(r,o),r.prototype.toObject=function(){var e=o.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=n.map(this.publicKeys,function(e){return e.toString()}),e.signatures=this._serializeSignatures(),e},r.prototype._deserializeSignatures=function(e){return n.map(e,function(e){return e?new l(e):void 0})},r.prototype._serializeSignatures=function(){return n.map(this.signatures,function(e){return e?e.toObject():void 0})},r.prototype.getSignatures=function(e,t,r,i){a.checkState(this.output instanceof d),i=i||f.SIGHASH_ALL|f.SIGHASH_FORKID;var o=this,s=[];return n.each(this.publicKeys,function(n){n.toString()===t.publicKey.toString()&&s.push(new l({publicKey:t.publicKey,prevTxId:o.prevTxId,outputIndex:o.outputIndex,inputIndex:r,signature:c.sign(e,t,i,r,o.redeemScript,o.output.satoshisBN),sigtype:i}))}),s},r.prototype.addSignature=function(e,t){return a.checkState(!this.isFullySigned(),"All needed signatures have already been added"),a.checkArgument(!n.isUndefined(this.publicKeyIndex[t.publicKey.toString()]),"Signature has no matching public key"),a.checkState(this.isValidSignature(e,t)),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this},r.prototype._updateScript=function(){return this.setScript(s.buildP2SHMultisigIn(this.publicKeys,this.threshold,this._createSignatures(),{cachedMultisig:this.redeemScript})),this},r.prototype._createSignatures=function(){return n.map(n.filter(this.signatures,function(e){return!n.isUndefined(e)}),function(e){return u.concat([e.signature.toDER(),u.integerAsSingleByteBuffer(e.sigtype)])})},r.prototype.clearSignatures=function(){this.signatures=Array(this.publicKeys.length),this._updateScript()},r.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold},r.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()},r.prototype.countSignatures=function(){return n.reduce(this.signatures,function(e,t){return e+!!t},0)},r.prototype.publicKeysWithoutSignature=function(){var e=this;return n.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})},r.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,c.verify(e,t.signature,t.publicKey,t.inputIndex,this.redeemScript,this.output.satoshisBN)},r.OPCODES_SIZE=7,r.SIGNATURE_SIZE=74,r.PUBKEY_SIZE=34,r.prototype._estimateSize=function(){return r.OPCODES_SIZE+this.threshold*r.SIGNATURE_SIZE+this.publicKeys.length*r.PUBKEY_SIZE},t.exports=r},{"../../crypto/signature":12,"../../publickey":25,"../../script":26,"../../util/buffer":43,"../../util/preconditions":45,"../output":36,"../sighash":37,"../signature":38,"./input":31,inherits:190,lodash:193}],34:[function(e,t){"use strict";function r(){d.apply(this,arguments)}var n=e("inherits"),i=e("../../util/preconditions"),o=e("../../util/buffer"),d=e("./input"),a=e("../output"),s=e("../sighash"),f=e("../../script"),c=e("../../crypto/signature"),p=e("../signature");n(r,d),r.prototype.getSignatures=function(e,t,r,n){i.checkState(this.output instanceof a),n=n||c.SIGHASH_ALL|c.SIGHASH_FORKID;var o=t.toPublicKey();return o.toString()===this.output.script.getPublicKey().toString("hex")?[new p({publicKey:o,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:s.sign(e,t,n,r,this.output.script,this.output.satoshisBN),sigtype:n})]:[]},r.prototype.addSignature=function(e,t){return i.checkState(this.isValidSignature(e,t),"Signature is invalid"),this.setScript(f.buildPublicKeyIn(t.signature.toDER(),t.sigtype)),this},r.prototype.clearSignatures=function(){return this.setScript(f.empty()),this},r.prototype.isFullySigned=function(){return this.script.isPublicKeyIn()},r.SCRIPT_MAX_SIZE=73,r.prototype._estimateSize=function(){return r.SCRIPT_MAX_SIZE},t.exports=r},{"../../crypto/signature":12,"../../script":26,"../../util/buffer":43,"../../util/preconditions":45,"../output":36,"../sighash":37,"../signature":38,"./input":31,inherits:190}],35:[function(e,t){"use strict";function r(){a.apply(this,arguments)}var n=e("inherits"),i=e("../../util/preconditions"),o=e("../../util/buffer"),d=e("../../crypto/hash"),a=e("./input"),s=e("../output"),f=e("../sighash"),c=e("../../script"),p=e("../../crypto/signature"),u=e("../signature");n(r,a),r.prototype.getSignatures=function(e,t,r,n,a){return i.checkState(this.output instanceof s),a=a||d.sha256ripemd160(t.publicKey.toBuffer()),n=n||p.SIGHASH_ALL|p.SIGHASH_FORKID,o.equals(a,this.output.script.getPublicKeyHash())?[new u({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:f.sign(e,t,n,r,this.output.script,this.output.satoshisBN),sigtype:n})]:[]},r.prototype.addSignature=function(e,t){return i.checkState(this.isValidSignature(e,t),"Signature is invalid"),this.setScript(c.buildPublicKeyHashIn(t.publicKey,t.signature.toDER(),t.sigtype)),this},r.prototype.clearSignatures=function(){return this.setScript(c.empty()),this},r.prototype.isFullySigned=function(){return this.script.isPublicKeyHashIn()},r.SCRIPT_MAX_SIZE=107,r.prototype._estimateSize=function(){return r.SCRIPT_MAX_SIZE},t.exports=r},{"../../crypto/hash":9,"../../crypto/signature":12,"../../script":26,"../../util/buffer":43,"../../util/preconditions":45,"../output":36,"../sighash":37,"../signature":38,"./input":31,inherits:190}],36:[function(e,t){"use strict";function r(e){if(!(this instanceof r))return new r(e);if(!n.isObject(e))throw new TypeError("Unrecognized argument for Output");else if(this.satoshis=e.satoshis,d.isBuffer(e.script))this._scriptBuffer=e.script;else{var t;t=n.isString(e.script)&&a.isHexa(e.script)?new o.Buffer(e.script,"hex"):e.script,this.setScript(t)}}var n=e("lodash"),i=e("../crypto/bn"),o=e("buffer"),d=e("../util/buffer"),a=e("../util/js"),s=e("../encoding/bufferwriter"),f=e("../script"),c=e("../util/preconditions"),p=e("../errors");Object.defineProperty(r.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this._script?this._script:(this.setScriptFromBuffer(this._scriptBuffer),this._script)}}),Object.defineProperty(r.prototype,"satoshis",{configurable:!1,enumerable:!0,get:function(){return this._satoshis},set:function(e){e instanceof i?(this._satoshisBN=e,this._satoshis=e.toNumber()):n.isString(e)?(this._satoshis=parseInt(e),this._satoshisBN=i.fromNumber(this._satoshis)):(c.checkArgument(a.isNaturalNumber(e),"Output satoshis is not a natural number"),this._satoshisBN=i.fromNumber(e),this._satoshis=e),c.checkState(a.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}}),r.prototype.invalidSatoshis=function(){return this._satoshis>9007199254740991?"transaction txout satoshis greater than max safe integer":this._satoshis===this._satoshisBN.toNumber()?!!(0>this._satoshis)&&"transaction txout negative":"transaction txout satoshis has corrupted value"},Object.defineProperty(r.prototype,"satoshisBN",{configurable:!1,enumerable:!0,get:function(){return this._satoshisBN},set:function(e){this._satoshisBN=e,this._satoshis=e.toNumber(),c.checkState(a.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}}),r.prototype.toObject=r.prototype.toJSON=function(){var e={satoshis:this.satoshis,script:this._scriptBuffer.toString("hex")};return e},r.fromObject=function(e){return new r(e)},r.prototype.setScriptFromBuffer=function(e){this._scriptBuffer=e;try{this._script=f.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(t){if(t instanceof p.Script.InvalidBuffer)this._script=null;else throw t}},r.prototype.setScript=function(e){if(e instanceof f)this._scriptBuffer=e.toBuffer(),this._script=e,this._script._isOutput=!0;else if(n.isString(e))this._script=f.fromString(e),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else if(d.isBuffer(e))this.setScriptFromBuffer(e);else throw new TypeError("Invalid argument type: script");return this},r.prototype.inspect=function(){var e;return e=this.script?this.script.inspect():this._scriptBuffer.toString("hex"),"<Output ("+this.satoshis+" sats) "+e+">"},r.fromBufferReader=function(e){var t={satoshis:e.readUInt64LEBN()},n=e.readVarintNum();return t.script=0===n?new o.Buffer([]):e.read(n),new r(t)},r.prototype.toBufferWriter=function(e){e||(e=new s),e.writeUInt64LEBN(this._satoshisBN);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e},t.exports=r},{"../crypto/bn":7,"../encoding/bufferwriter":16,"../errors":18,"../script":26,"../util/buffer":43,"../util/js":44,"../util/preconditions":45,buffer:115,lodash:193}],37:[function(e,t){(function(r){"use strict";var n=e("buffer"),o=e("../crypto/signature"),d=e("../script"),a=e("./output"),s=e("../encoding/bufferreader"),f=e("../encoding/bufferwriter"),c=e("../crypto/bn"),p=e("../crypto/hash"),i=e("../crypto/ecdsa"),u=e("../util/preconditions"),l=e("../util/buffer"),h=e("lodash"),b=function(e,t,r,n,i){function d(e,t){var r=new f;h.isUndefined(t)?h.each(e.outputs,function(e){e.toBufferWriter(r)}):e.outputs[t].toBufferWriter(r);var n=r.toBuffer(),i=p.sha256sha256(n);return i}var a=e.inputs[r];u.checkArgument(i instanceof c,"For ForkId=0 signatures, satoshis or complete input must be provided");var b=l.emptyBuffer(32),g=l.emptyBuffer(32),y=l.emptyBuffer(32);t&o.SIGHASH_ANYONECANPAY||(b=function(e){var t=new f;h.each(e.inputs,function(e){t.writeReverse(e.prevTxId),t.writeUInt32LE(e.outputIndex)});var r=t.toBuffer(),n=p.sha256sha256(r);return n}(e)),t&o.SIGHASH_ANYONECANPAY||(31&t)==o.SIGHASH_SINGLE||(31&t)==o.SIGHASH_NONE||(g=function(e){var t=new f;h.each(e.inputs,function(e){t.writeUInt32LE(e.sequenceNumber)});var r=t.toBuffer(),n=p.sha256sha256(r);return n}(e)),(31&t)!=o.SIGHASH_SINGLE&&(31&t)!=o.SIGHASH_NONE?y=d(e):(31&t)==o.SIGHASH_SINGLE&&r<e.outputs.length&&(y=d(e,r));var m=new f;m.writeInt32LE(e.version),m.write(b),m.write(g),m.writeReverse(a.prevTxId),m.writeUInt32LE(a.outputIndex),m.writeUInt8(n.toBuffer().length),m.write(n.toBuffer()),m.writeUInt64LEBN(i);var _=a.sequenceNumber;m.writeUInt32LE(_),m.write(y),m.writeUInt32LE(e.nLockTime),m.writeUInt32LE(t>>>0);var S=m.toBuffer(),v=p.sha256sha256(S);return v=new s(v).readReverse(),v},g=function(t,u,l,h,g){var y=e("./transaction"),m=e("./input"),_=y.shallowCopy(t);if(h=new d(h),u&o.SIGHASH_FORKID&&!0)return b(_,u,l,h,g);h.removeCodeseparators();var S;for(S=0;S<_.inputs.length;S++)_.inputs[S]=new m(_.inputs[S]).setScript(d.empty());if(_.inputs[l]=new m(_.inputs[l]).setScript(h),(31&u)===o.SIGHASH_NONE||(31&u)===o.SIGHASH_SINGLE)for(S=0;S<_.inputs.length;S++)S!==l&&(_.inputs[S].sequenceNumber=0);if((31&u)===o.SIGHASH_NONE)_.outputs=[];else if((31&u)===o.SIGHASH_SINGLE){if(l>=_.outputs.length)return new r("0000000000000000000000000000000000000000000000000000000000000001","hex");for(_.outputs.length=l+1,S=0;S<l;S++)_.outputs[S]=new a({satoshis:c.fromBuffer(new n.Buffer("ffffffffffffffff","hex")),script:d.empty()})}u&o.SIGHASH_ANYONECANPAY&&(_.inputs=[_.inputs[l]]);var i=new f().write(_.toBuffer()).writeInt32LE(u).toBuffer(),v=p.sha256sha256(i);return v=new s(v).readReverse(),v};t.exports={sighash:g,sign:function(e,t,r,n,o,d){var a=g(e,r,n,o,d),s=i.sign(a,t,"little").set({nhashtype:r});return s},verify:function(e,t,r,n,o,d){u.checkArgument(!h.isUndefined(e)),u.checkArgument(!h.isUndefined(t)&&!h.isUndefined(t.nhashtype));var a=g(e,t.nhashtype,n,o,d);return i.verify(a,t,r,"little")}}}).call(this,e("buffer").Buffer)},{"../crypto/bn":7,"../crypto/ecdsa":8,"../crypto/hash":9,"../crypto/signature":12,"../encoding/bufferreader":15,"../encoding/bufferwriter":16,"../script":26,"../util/buffer":43,"../util/preconditions":45,"./input":30,"./output":36,"./transaction":39,buffer:115,lodash:193}],38:[function(e,t){(function(r){"use strict";function n(e){if(!(this instanceof n))return new n(e);if(e instanceof n)return e;if(i.isObject(e))return this._fromObject(e);throw new c.InvalidArgument("TransactionSignatures must be instantiated from an object")}var i=e("lodash"),o=e("../util/preconditions"),d=e("inherits"),a=e("../util/buffer"),s=e("../util/js"),f=e("../publickey"),c=e("../errors"),p=e("../crypto/signature");d(n,p),n.prototype._fromObject=function(e){return this._checkObjectArgs(e),this.publicKey=new f(e.publicKey),this.prevTxId=a.isBuffer(e.prevTxId)?e.prevTxId:new r(e.prevTxId,"hex"),this.outputIndex=e.outputIndex,this.inputIndex=e.inputIndex,this.signature=e.signature instanceof p?e.signature:a.isBuffer(e.signature)?p.fromBuffer(e.signature):p.fromString(e.signature),this.sigtype=e.sigtype,this},n.prototype._checkObjectArgs=function(e){o.checkArgument(f(e.publicKey),"publicKey"),o.checkArgument(!i.isUndefined(e.inputIndex),"inputIndex"),o.checkArgument(!i.isUndefined(e.outputIndex),"outputIndex"),o.checkState(i.isNumber(e.inputIndex),"inputIndex must be a number"),o.checkState(i.isNumber(e.outputIndex),"outputIndex must be a number"),o.checkArgument(e.signature,"signature"),o.checkArgument(e.prevTxId,"prevTxId"),o.checkState(e.signature instanceof p||a.isBuffer(e.signature)||s.isHexa(e.signature),"signature must be a buffer or hexa value"),o.checkState(a.isBuffer(e.prevTxId)||s.isHexa(e.prevTxId),"prevTxId must be a buffer or hexa value"),o.checkArgument(e.sigtype,"sigtype"),o.checkState(i.isNumber(e.sigtype),"sigtype must be a number")},n.prototype.toObject=n.prototype.toJSON=function(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}},n.fromObject=function(e){return o.checkArgument(e),new n(e)},t.exports=n}).call(this,e("buffer").Buffer)},{"../crypto/signature":12,"../errors":18,"../publickey":25,"../util/buffer":43,"../util/js":44,"../util/preconditions":45,buffer:115,inherits:190,lodash:193}],39:[function(e,t){(function(r){"use strict";function n(e){if(!(this instanceof n))return new n(e);if(this.inputs=[],this.outputs=[],this._inputAmount=void 0,this._outputAmount=void 0,e){if(e instanceof n)return n.shallowCopy(e);if(c.isHexa(e))this.fromString(e);else if(f.isBuffer(e))this.fromBuffer(e);else if(o.isObject(e))this.fromObject(e);else throw new s.InvalidArgument("Must provide an object or string to deserialize a transaction")}else this._newTransaction()}var o=e("lodash"),d=e("../util/preconditions"),i=e("buffer"),a=r.compare||e("buffer-compare"),s=e("../errors"),f=e("../util/buffer"),c=e("../util/js"),u=e("../encoding/bufferreader"),l=e("../encoding/bufferwriter"),b=e("../crypto/hash"),g=e("../crypto/signature"),y=e("./sighash"),m=e("../address"),_=e("./unspentoutput"),S=e("./input"),v=S.PublicKeyHash,k=S.PublicKey,I=S.MultiSigScriptHash,x=S.MultiSig,A=e("./output"),w=e("../script"),E=e("../privatekey"),P=e("../crypto/bn");n.DUST_AMOUNT=546,n.FEE_SECURITY_MARGIN=150,n.MAX_MONEY=2100000000000000,n.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8,n.NLOCKTIME_MAX_VALUE=4294967295,n.FEE_PER_KB=1e5,n.CHANGE_OUTPUT_MAX_SIZE=62,n.MAXIMUM_EXTRA_SIZE=26,n.shallowCopy=function(e){var t=new n(e.toBuffer());return t};var B={configurable:!1,enumerable:!0,get:function(){return new u(this._getHash()).readReverse().toString("hex")}};Object.defineProperty(n.prototype,"hash",B),Object.defineProperty(n.prototype,"id",B);var O={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(n.prototype,"inputAmount",O),O.get=function(){return this._getOutputAmount()},Object.defineProperty(n.prototype,"outputAmount",O),n.prototype._getHash=function(){return b.sha256sha256(this.toBuffer())},n.prototype.serialize=function(e){return!0===e||e&&e.disableAll?this.uncheckedSerialize():this.checkedSerialize(e)},n.prototype.uncheckedSerialize=n.prototype.toString=function(){return this.toBuffer().toString("hex")},n.prototype.checkedSerialize=function(e){var t=this.getSerializationError(e);if(t)throw t.message+=" - For more information please see: https://bitcore.io/api/lib/transaction#serialization-checks",t;return this.uncheckedSerialize()},n.prototype.invalidSatoshis=function(){for(var e=!1,t=0;t<this.outputs.length;t++)this.outputs[t].invalidSatoshis()&&(e=!0);return e},n.prototype.getSerializationError=function(e){if(e=e||{},this.invalidSatoshis())return new s.Transaction.InvalidSatoshis;var t=this._getUnspentValue(),r;return 0>t?!e.disableMoreOutputThanInput&&(r=new s.Transaction.InvalidOutputAmountSum):r=this._hasFeeError(e,t),r||this._hasDustOutputs(e)||this._isMissingSignatures(e)},n.prototype._hasFeeError=function(e,t){if(!o.isUndefined(this._fee)&&this._fee!==t)return new s.Transaction.FeeError.Different("Unspent value is "+t+" but specified fee is "+this._fee);if(!e.disableLargeFees){var r=h(n.FEE_SECURITY_MARGIN*this._estimateFee());if(t>r)return this._missingChange()?new s.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new s.Transaction.FeeError.TooLarge("expected less than "+r+" but got "+t)}if(!e.disableSmallFees){var i=p(this._estimateFee()/n.FEE_SECURITY_MARGIN);if(t<i)return new s.Transaction.FeeError.TooSmall("expected more than "+i+" but got "+t)}},n.prototype._missingChange=function(){return!this._changeScript},n.prototype._hasDustOutputs=function(e){if(!e.disableDustOutputs){var t,r;for(t in this.outputs)if(r=this.outputs[t],r.satoshis<n.DUST_AMOUNT&&!r.script.isDataOut())return new s.Transaction.DustOutputs}},n.prototype._isMissingSignatures=function(e){return e.disableIsFullySigned||this.isFullySigned()?void 0:new s.Transaction.MissingSignatures},n.prototype.inspect=function(){return"<Transaction: "+this.uncheckedSerialize()+">"},n.prototype.toBuffer=function(){var e=new l;return this.toBufferWriter(e).toBuffer()},n.prototype.toBufferWriter=function(e){return e.writeInt32LE(this.version),e.writeVarintNum(this.inputs.length),o.each(this.inputs,function(t){t.toBufferWriter(e)}),e.writeVarintNum(this.outputs.length),o.each(this.outputs,function(t){t.toBufferWriter(e)}),e.writeUInt32LE(this.nLockTime),e},n.prototype.fromBuffer=function(e){var t=new u(e);return this.fromBufferReader(t)},n.prototype.fromBufferReader=function(e){d.checkArgument(!e.finished(),"No transaction data received");var t,r,n;for(this.version=e.readInt32LE(),r=e.readVarintNum(),t=0;t<r;t++){var i=S.fromBufferReader(e);this.inputs.push(i)}for(n=e.readVarintNum(),t=0;t<n;t++)this.outputs.push(A.fromBufferReader(e));return this.nLockTime=e.readUInt32LE(),this},n.prototype.toObject=n.prototype.toJSON=function(){var e=[];this.inputs.forEach(function(t){e.push(t.toObject())});var t=[];this.outputs.forEach(function(e){t.push(e.toObject())});var r={hash:this.hash,version:this.version,inputs:e,outputs:t,nLockTime:this.nLockTime};return this._changeScript&&(r.changeScript=this._changeScript.toString()),o.isUndefined(this._changeIndex)||(r.changeIndex=this._changeIndex),o.isUndefined(this._fee)||(r.fee=this._fee),r},n.prototype.fromObject=function(e){d.checkArgument(o.isObject(e)||e instanceof n);var t=this,r;return r=e instanceof n?r.toObject():e,o.each(r.inputs,function(e){if(!e.output||!e.output.script)return void t.uncheckedAddInput(new S(e));var r=new w(e.output.script),n;if(r.isPublicKeyHashOut())n=new S.PublicKeyHash(e);else if(r.isScriptHashOut()&&e.publicKeys&&e.threshold)n=new S.MultiSigScriptHash(e,e.publicKeys,e.threshold,e.signatures);else if(r.isPublicKeyOut())n=new S.PublicKey(e);else throw new s.Transaction.Input.UnsupportedScript(e.output.script);t.addInput(n)}),o.each(r.outputs,function(e){t.addOutput(new A(e))}),r.changeIndex&&(this._changeIndex=r.changeIndex),r.changeScript&&(this._changeScript=new w(r.changeScript)),r.fee&&(this._fee=r.fee),this.nLockTime=r.nLockTime,this.version=r.version,this._checkConsistency(e),this},n.prototype._checkConsistency=function(e){o.isUndefined(this._changeIndex)||(d.checkState(this._changeScript),d.checkState(this.outputs[this._changeIndex]),d.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString())),e&&e.hash&&d.checkState(e.hash===this.hash,"Hash in object does not match transaction hash")},n.prototype.lockUntilDate=function(e){if(d.checkArgument(e),o.isNumber(e)&&e<n.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new s.Transaction.LockTimeTooEarly;o.isDate(e)&&(e=e.getTime()/1e3);for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===S.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=S.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this},n.prototype.lockUntilBlockHeight=function(e){if(d.checkArgument(o.isNumber(e)),e>=n.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new s.Transaction.BlockHeightTooHigh;if(0>e)throw new s.Transaction.NLockTimeOutOfRange;for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===S.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=S.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this},n.prototype.getLockTime=function(){return this.nLockTime?this.nLockTime<n.NLOCKTIME_BLOCKHEIGHT_LIMIT?this.nLockTime:new Date(1e3*this.nLockTime):null},n.prototype.fromString=function(e){this.fromBuffer(new i.Buffer(e,"hex"))},n.prototype._newTransaction=function(){this.version=1,this.nLockTime=0},n.prototype.from=function(e,t,r){if(o.isArray(e)){var n=this;return o.each(e,function(e){n.from(e,t,r)}),this}var i=o.some(this.inputs,function(t){return t.prevTxId.toString("hex")===e.txId&&t.outputIndex===e.outputIndex});return i?this:(t&&r?this._fromMultisigUtxo(e,t,r):this._fromNonP2SH(e),this)},n.prototype._fromNonP2SH=function(e){var t;e=new _(e),t=e.script.isPublicKeyHashOut()?v:e.script.isPublicKeyOut()?k:S,this.addInput(new t({output:new A({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,script:w.empty()}))},n.prototype._fromMultisigUtxo=function(e,t,r){d.checkArgument(r<=t.length,"Number of required signatures must be greater than the number of public keys");var n;if(e=new _(e),e.script.isMultisigOut())n=x;else if(e.script.isScriptHashOut())n=I;else throw new Error("@TODO");this.addInput(new n({output:new A({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,script:w.empty()},t,r))},n.prototype.addInput=function(e,t,r){if(d.checkArgumentType(e,S,"input"),!e.output&&(o.isUndefined(t)||o.isUndefined(r)))throw new s.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return e.output||!t||o.isUndefined(r)||(t=t instanceof w?t:new w(t),d.checkArgumentType(r,"number","satoshis"),e.output=new A({script:t,satoshis:r})),this.uncheckedAddInput(e)},n.prototype.uncheckedAddInput=function(e){return d.checkArgumentType(e,S,"input"),this.inputs.push(e),this._inputAmount=void 0,this._updateChangeOutput(),this},n.prototype.hasAllUtxoInfo=function(){return o.every(this.inputs.map(function(e){return!!e.output}))},n.prototype.fee=function(e){return d.checkArgument(o.isNumber(e),"amount must be a number"),this._fee=e,this._updateChangeOutput(),this},n.prototype.feePerKb=function(e){return d.checkArgument(o.isNumber(e),"amount must be a number"),this._feePerKb=e,this._updateChangeOutput(),this},n.prototype.change=function(e){return d.checkArgument(e,"address is required"),this._changeScript=w.fromAddress(e),this._updateChangeOutput(),this},n.prototype.getChangeOutput=function(){return o.isUndefined(this._changeIndex)?null:this.outputs[this._changeIndex]},n.prototype.to=function(e,t){if(o.isArray(e)){var r=this;return o.each(e,function(e){r.to(e.address,e.satoshis)}),this}return d.checkArgument(c.isNaturalNumber(t),"Amount is expected to be a positive integer"),this.addOutput(new A({script:w(new m(e)),satoshis:t})),this},n.prototype.addData=function(e){return this.addOutput(new A({script:w.buildDataOut(e),satoshis:0})),this},n.prototype.addOutput=function(e){return d.checkArgumentType(e,A,"output"),this._addOutput(e),this._updateChangeOutput(),this},n.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this},n.prototype._addOutput=function(e){this.outputs.push(e),this._outputAmount=void 0},n.prototype._getOutputAmount=function(){if(o.isUndefined(this._outputAmount)){var e=this;this._outputAmount=0,o.each(this.outputs,function(t){e._outputAmount+=t.satoshis})}return this._outputAmount},n.prototype._getInputAmount=function(){if(o.isUndefined(this._inputAmount)){var e=this;this._inputAmount=0,o.each(this.inputs,function(t){if(o.isUndefined(t.output))throw new s.Transaction.Input.MissingPreviousOutput;e._inputAmount+=t.output.satoshis})}return this._inputAmount},n.prototype._updateChangeOutput=function(){if(this._changeScript){this._clearSignatures(),o.isUndefined(this._changeIndex)||this._removeOutput(this._changeIndex);var e=this._getUnspentValue(),t=this.getFee(),r=e-t;0<r?(this._changeIndex=this.outputs.length,this._addOutput(new A({script:this._changeScript,satoshis:r}))):this._changeIndex=void 0}},n.prototype.getFee=function(){return this.isCoinbase()?0:o.isUndefined(this._fee)?this._changeScript?this._estimateFee():this._getUnspentValue():this._fee},n.prototype._estimateFee=function(){var e=this._estimateSize(),t=this._getUnspentValue();return n._estimateFee(e,t,this._feePerKb)},n.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()},n.prototype._clearSignatures=function(){o.each(this.inputs,function(e){e.clearSignatures()})},n._estimateFee=function(e,t,r){var i=p(e/1e3)*(r||n.FEE_PER_KB);return t>i&&(e+=n.CHANGE_OUTPUT_MAX_SIZE),p(e/1e3)*(r||n.FEE_PER_KB)},n.prototype._estimateSize=function(){var e=n.MAXIMUM_EXTRA_SIZE;return o.each(this.inputs,function(t){e+=t._estimateSize()}),o.each(this.outputs,function(t){e+=t.script.toBuffer().length+9}),e},n.prototype._removeOutput=function(e){var t=this.outputs[e];this.outputs=o.without(this.outputs,t),this._outputAmount=void 0},n.prototype.removeOutput=function(e){this._removeOutput(e),this._updateChangeOutput()},n.prototype.sort=function(){return this.sortInputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(e,t){return a(e.prevTxId,t.prevTxId)||e.outputIndex-t.outputIndex}),t}),this.sortOutputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(e,t){return e.satoshis-t.satoshis||a(e.script.toBuffer(),t.script.toBuffer())}),t}),this},n.prototype.shuffleOutputs=function(){return this.sortOutputs(o.shuffle)},n.prototype.sortOutputs=function(e){var t=e(this.outputs);return this._newOutputOrder(t)},n.prototype.sortInputs=function(e){return this.inputs=e(this.inputs),this._clearSignatures(),this},n.prototype._newOutputOrder=function(e){var t=this.outputs.length!==e.length||0!==o.difference(this.outputs,e).length;if(t)throw new s.Transaction.InvalidSorting;if(!o.isUndefined(this._changeIndex)){var r=this.outputs[this._changeIndex];this._changeIndex=o.findIndex(e,r)}return this.outputs=e,this},n.prototype.removeInput=function(e,t){var r;if(r=!t&&o.isNumber(e)?e:o.findIndex(this.inputs,function(r){return r.prevTxId.toString("hex")===e&&r.outputIndex===t}),0>r||r>=this.inputs.length)throw new s.Transaction.InvalidIndex(r,this.inputs.length);var n=this.inputs[r];this.inputs=o.without(this.inputs,n),this._inputAmount=void 0,this._updateChangeOutput()},n.prototype.sign=function(e,t){d.checkState(this.hasAllUtxoInfo());var r=this;return o.isArray(e)?(o.each(e,function(e){r.sign(e,t)}),this):(o.each(this.getSignatures(e,t),function(e){r.applySignature(e)}),this)},n.prototype.getSignatures=function(e,t){e=new E(e),t=t||g.SIGHASH_ALL|g.SIGHASH_FORKID;var r=this,n=[],i=b.sha256ripemd160(e.publicKey.toBuffer());return o.each(this.inputs,function(d,a){o.each(d.getSignatures(r,e,a,t,i),function(e){n.push(e)})}),n},n.prototype.applySignature=function(e){return this.inputs[e.inputIndex].addSignature(this,e),this},n.prototype.isFullySigned=function(){return o.each(this.inputs,function(e){if(e.isFullySigned===S.prototype.isFullySigned)throw new s.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction")}),o.every(o.map(this.inputs,function(e){return e.isFullySigned()}))},n.prototype.isValidSignature=function(e){var t=this;if(this.inputs[e.inputIndex].isValidSignature===S.prototype.isValidSignature)throw new s.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[e.inputIndex].isValidSignature(t,e)},n.prototype.verifySignature=function(e,t,r,n){return y.verify(this,e,t,r,n)},n.prototype.verify=function(){if(0===this.inputs.length)return"transaction txins empty";if(0===this.outputs.length)return"transaction txouts empty";for(var e=new P(0),t=0,r;t<this.outputs.length;t++){if(r=this.outputs[t],r.invalidSatoshis())return"transaction txout "+t+" satoshis is invalid";if(r._satoshisBN.gt(new P(n.MAX_MONEY,10)))return"transaction txout "+t+" greater than MAX_MONEY";if(e=e.add(r._satoshisBN),e.gt(new P(n.MAX_MONEY)))return"transaction txout "+t+" total output greater than MAX_MONEY"}if(this.toBuffer().length>1e6)return"transaction over the maximum block size";var i={};for(t=0;t<this.inputs.length;t++){var d=this.inputs[t],a=d.prevTxId+":"+d.outputIndex;if(!o.isUndefined(i[a]))return"transaction input "+t+" duplicate input";i[a]=!0}var s=this.isCoinbase();if(s){var f=this.inputs[0]._scriptBuffer;if(2>f.length||100<f.length)return"coinbase transaction script size invalid"}else for(t=0;t<this.inputs.length;t++)if(this.inputs[t].isNull())return"transaction input "+t+" has null input";return!0},n.prototype.isCoinbase=function(){return 1===this.inputs.length&&this.inputs[0].isNull()},n.prototype.isRBF=function(){for(var e=0,t;e<this.inputs.length;e++)if(t=this.inputs[e],t.sequenceNumber<S.MAXINT-1)return!0;return!1},n.prototype.enableRBF=function(){for(var e=0,t;e<this.inputs.length;e++)t=this.inputs[e],t.sequenceNumber>=S.MAXINT-1&&(t.sequenceNumber=S.DEFAULT_RBF_SEQNUMBER);return this},t.exports=n}).call(this,e("buffer").Buffer)},{"../address":1,"../crypto/bn":7,"../crypto/hash":9,"../crypto/signature":12,"../encoding/bufferreader":15,"../encoding/bufferwriter":16,"../errors":18,"../privatekey":24,"../script":26,"../util/buffer":43,"../util/js":44,"../util/preconditions":45,"./input":30,"./output":36,"./sighash":37,"./unspentoutput":40,buffer:115,"buffer-compare":113,lodash:193}],40:[function(e,t){"use strict";function r(e){if(!(this instanceof r))return new r(e);i.checkArgument(n.isObject(e),"Must provide an object from where to extract data");var t=e.address?new a(e.address):void 0,f=e.txid?e.txid:e.txId;if(!f||!o.isHexaString(f)||64<f.length)throw new Error("Invalid TXID in object",e);var c=n.isUndefined(e.vout)?e.outputIndex:e.vout;if(!n.isNumber(c))throw new Error("Invalid outputIndex, received "+c);i.checkArgument(!n.isUndefined(e.scriptPubKey)||!n.isUndefined(e.script),"Must provide the scriptPubKey for that output!");var p=new d(e.scriptPubKey||e.script);i.checkArgument(!n.isUndefined(e.amount)||!n.isUndefined(e.satoshis),"Must provide an amount for the output");var u=n.isUndefined(e.amount)?e.satoshis:new s.fromBTC(e.amount).toSatoshis();i.checkArgument(n.isNumber(u),"Amount must be a number"),o.defineImmutable(this,{address:t,txId:f,outputIndex:c,script:p,satoshis:u})}var n=e("lodash"),i=e("../util/preconditions"),o=e("../util/js"),d=e("../script"),a=e("../address"),s=e("../unit");r.prototype.inspect=function(){return"<UnspentOutput: "+this.txId+":"+this.outputIndex+", satoshis: "+this.satoshis+", address: "+this.address+">"},r.prototype.toString=function(){return this.txId+":"+this.outputIndex},r.fromObject=function(e){return new r(e)},r.prototype.toObject=r.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:s.fromSatoshis(this.satoshis).toBTC()}},t.exports=r},{"../address":1,"../script":26,"../unit":41,"../util/js":44,"../util/preconditions":45,lodash:193}],41:[function(e,t){"use strict";function r(e,t){if(!(this instanceof r))return new r(e,t);if(n.isNumber(t)){if(0>=t)throw new i.Unit.InvalidRate(t);e/=t,t=r.BTC}this._value=this._from(e,t);var o=this;Object.keys(d).forEach(function(e){Object.defineProperty(o,e,{get:function(){return o.to(e)},enumerable:!0})})}var n=e("lodash"),i=e("./errors"),o=e("./util/preconditions"),d={BTC:[100000000,8],mBTC:[100000,5],uBTC:[100,2],bits:[100,2],satoshis:[1,0]};Object.keys(d).forEach(function(e){r[e]=e}),r.fromObject=function(e){return o.checkArgument(n.isObject(e),"Argument is expected to be an object"),new r(e.amount,e.code)},r.fromBTC=function(e){return new r(e,r.BTC)},r.fromMillis=r.fromMilis=function(e){return new r(e,r.mBTC)},r.fromMicros=r.fromBits=function(e){return new r(e,r.bits)},r.fromSatoshis=function(e){return new r(e,r.satoshis)},r.fromFiat=function(e,t){return new r(e,t)},r.prototype._from=function(e,t){if(!d[t])throw new i.Unit.UnknownCode(t);return parseInt((e*d[t][0]).toFixed())},r.prototype.to=function(e){if(n.isNumber(e)){if(0>=e)throw new i.Unit.InvalidRate(e);return parseFloat((this.BTC*e).toFixed(2))}if(!d[e])throw new i.Unit.UnknownCode(e);var t=this._value/d[e][0];return parseFloat(t.toFixed(d[e][1]))},r.prototype.toBTC=function(){return this.to(r.BTC)},r.prototype.toMillis=r.prototype.toMilis=function(){return this.to(r.mBTC)},r.prototype.toMicros=r.prototype.toBits=function(){return this.to(r.bits)},r.prototype.toSatoshis=function(){return this.to(r.satoshis)},r.prototype.atRate=function(e){return this.to(e)},r.prototype.toString=function(){return this.satoshis+" satoshis"},r.prototype.toObject=r.prototype.toJSON=function(){return{amount:this.BTC,code:r.BTC}},r.prototype.inspect=function(){return"<Unit: "+this.toString()+">"},t.exports=r},{"./errors":18,"./util/preconditions":45,lodash:193}],42:[function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=e("lodash"),i=e("url"),o=e("./address"),d=e("./unit"),a=function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.extras={},this.knownParams=n||[],this.address=this.network=this.amount=this.message=null,"string"==typeof t){var i=e.parse(t);i.amount&&(i.amount=this._parseAmount(i.amount)),this._fromObject(i)}else if("object"===("undefined"==typeof t?"undefined":r(t)))this._fromObject(t);else throw new TypeError("Unrecognized data format.")};a.fromString=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return new a(e)},a.fromObject=function(e){return new a(e)},a.isValid=function(e,t){try{new a(e,t)}catch(e){return!1}return!0},a.parse=function(e){var t=i.parse(e,!0);if("bitcoincash:"!==t.protocol)throw new TypeError("Invalid bitcoin cash URI");var r=/[^:]*:\/?\/?([^?]*)/.exec(e);return t.query.address=r&&r[1]||void 0,t.query},a.Members=["address","amount","message","label","r"],a.prototype._fromObject=function(e){if(!o.isValid(e.address))throw new TypeError("Invalid bitcoin address");for(var t in this.address=new o(e.address),this.network=this.address.network,this.amount=e.amount,e)if("address"!=t&&"amount"!=t){if(/^req-/.exec(t)&&-1===this.knownParams.indexOf(t))throw Error("Unknown required argument "+t);var r=-1<a.Members.indexOf(t)?this:this.extras;r[t]=e[t]}},a.prototype._parseAmount=function(e){if(e=+e,isNaN(e))throw new TypeError("Invalid amount");return d.fromBTC(e).toSatoshis()},a.prototype.toObject=a.prototype.toJSON=function(){for(var e={},t=0,r;t<a.Members.length;t++)r=a.Members[t],this.hasOwnProperty(r)&&"undefined"!=typeof this[r]&&(e[r]=this[r].toString());return n.extend(e,this.extras),e},a.prototype.toString=function(){var e={};return this.amount&&(e.amount=d.fromSatoshis(this.amount).toBTC()),this.message&&(e.message=this.message),this.label&&(e.label=this.label),this.r&&(e.r=this.r),n.extend(e,this.extras),i.format({protocol:"bitcoincash:",host:this.address,query:e})},a.prototype.inspect=function(){return"<URI: "+this.toString()+">"},t.exports=a},{"./address":1,"./unit":41,lodash:193,url:251}],43:[function(e,t){(function(r){"use strict";function n(e,t){if(e.length!==t.length)return!1;for(var r=e.length,n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}var o=e("buffer"),i=e("assert"),d=e("./js"),a=e("./preconditions");t.exports={fill:function(e,t){a.checkArgumentType(e,"Buffer","buffer"),a.checkArgumentType(t,"number","value");for(var r=e.length,n=0;n<r;n++)e[n]=t;return e},copy:function(e){var t=new r(e.length);return e.copy(t),t},isBuffer:function(e){return o.Buffer.isBuffer(e)||e instanceof Uint8Array},emptyBuffer:function(e){a.checkArgumentType(e,"number","bytes");for(var t=new o.Buffer(e),r=0;r<e;r++)t.write("\0",r);return t},concat:o.Buffer.concat,equals:n,equal:n,integerAsSingleByteBuffer:function(e){return a.checkArgumentType(e,"number","integer"),new o.Buffer([255&e])},integerAsBuffer:function(e){a.checkArgumentType(e,"number","integer");return new r([255&e>>24,255&e>>16,255&e>>8,255&e])},integerFromBuffer:function(e){return a.checkArgumentType(e,"Buffer","buffer"),e[0]<<24|e[1]<<16|e[2]<<8|e[3]},integerFromSingleByteBuffer:function(e){return a.checkArgumentType(e,"Buffer","buffer"),e[0]},bufferToHex:function(e){return a.checkArgumentType(e,"Buffer","buffer"),e.toString("hex")},reverse:function(e){for(var t=new o.Buffer(e.length),r=0;r<e.length;r++)t[r]=e[e.length-r-1];return t},hexToBuffer:function(e){return i(d.isHexa(e)),new o.Buffer(e,"hex")}},t.exports.NULL_HASH=t.exports.fill(new r(32),0),t.exports.EMPTY_BUFFER=new r(0)}).call(this,e("buffer").Buffer)},{"./js":44,"./preconditions":45,assert:61,buffer:115}],44:[function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=e("lodash"),i=function(e){return!!n.isString(e)&&/^[0-9a-fA-F]+$/.test(e)};t.exports={isValidJSON:function(e){var t;if(!n.isString(e))return!1;try{t=JSON.parse(e)}catch(t){return!1}return!("object"!==("undefined"==typeof t?"undefined":r(t)))},isHexa:i,isHexaString:i,cloneArray:function(e){return[].concat(e)},defineImmutable:function(e,t){return Object.keys(t).forEach(function(r){Object.defineProperty(e,r,{configurable:!1,enumerable:!0,value:t[r]})}),e},isNaturalNumber:function(e){return"number"==typeof e&&isFinite(e)&&h(e)===e&&0<=e}}},{lodash:193}],45:[function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=e("../errors"),i=e("lodash");t.exports={checkState:function(e,t){if(!e)throw new n.InvalidState(t)},checkArgument:function(e,t,r,i){if(!e)throw new n.InvalidArgument(t,r,i)},checkArgumentType:function(t,o,d){if(d=d||"(unknown name)",i.isString(o)){if("Buffer"===o){var a=e("buffer");if(!a.Buffer.isBuffer(t))throw new n.InvalidArgumentType(t,o,d)}else if(("undefined"==typeof t?"undefined":r(t))!==o)throw new n.InvalidArgumentType(t,o,d);}else if(!(t instanceof o))throw new n.InvalidArgumentType(t,o.name,d)}}},{"../errors":18,buffer:115,lodash:193}],46:[function(e,t,r){var n=r;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":47,"./asn1/base":49,"./asn1/constants":53,"./asn1/decoders":55,"./asn1/encoders":58,"bn.js":60}],47:[function(e,t,r){function n(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var i=e("../asn1"),o=e("inherits");r.define=function(e,t){return new n(e,t)};n.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){r=function(e){this._initNamed(e)}}return o(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},n.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i.decoders[e])),this.decoders[e]},n.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},n.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(i.encoders[e])),this.encoders[e]},n.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":46,inherits:190,vm:256}],48:[function(e,t,r){function n(e,t){return d.call(this,t),a.isBuffer(e)?void(this.base=e,this.offset=0,this.length=e.length):void this.error("Input not Buffer")}function i(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof i||(e=new i(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&255>=e))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e);else if(a.isBuffer(e))this.value=e,this.length=e.length;else return t.error("Unsupported type: "+typeof e)}var o=e("inherits"),d=e("../base").Reporter,a=e("buffer").Buffer;o(n,d),r.DecoderBuffer=n,n.prototype.save=function(){return{offset:this.offset,reporter:d.prototype.save.call(this)}},n.prototype.restore=function(e){var t=new n(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,d.prototype.restore.call(this,e.reporter),t},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},n.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new n(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},n.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=i,i.prototype.join=function(e,t){return(e||(e=new a(this.length)),t||(t=0),0===this.length)?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":49,buffer:115,inherits:190}],49:[function(e,t,r){var n=r;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":48,"./node":50,"./reporter":51}],50:[function(e,t){function r(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r["default"]=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var n=e("../base").Reporter,i=e("../base").EncoderBuffer,o=e("../base").DecoderBuffer,d=e("minimalistic-assert"),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);t.exports=r;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];r.prototype.clone=function(){var e=this._baseState,t={};f.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},r.prototype._wrap=function(){var e=this._baseState;s.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},r.prototype._init=function(e){var t=this._baseState;d(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),d.equal(t.children.length,1,"Root node can have only one child")},r.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(d(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(d(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){r.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),a.forEach(function(e){r.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return d(null===t.tag),t.tag=e,this._useArgs(r),this}}),r.prototype.use=function(e){d(e);var t=this._baseState;return d(null===t.use),t.use=e,this},r.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this},r.prototype.def=function(e){var t=this._baseState;return d(null===t["default"]),t["default"]=e,t.optional=!0,this},r.prototype.explicit=function(e){var t=this._baseState;return d(null===t.explicit&&null===t.implicit),t.explicit=e,this},r.prototype.implicit=function(e){var t=this._baseState;return d(null===t.explicit&&null===t.implicit),t.implicit=e,this},r.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},r.prototype.key=function(e){var t=this._baseState;return d(null===t.key),t.key=e,this},r.prototype.any=function(){var e=this._baseState;return e.any=!0,this},r.prototype.choice=function(e){var t=this._baseState;return d(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},r.prototype.contains=function(e){var t=this._baseState;return d(null===t.use),t.contains=e,this},r.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n=r["default"],i=!0,d=null;if(null!==r.key&&(d=e.enterKey(r.key)),r.optional){var a=null;if(null===r.explicit?null===r.implicit?null!==r.tag&&(a=r.tag):a=r.implicit:a=r.explicit,null===a&&!r.any){var s=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),i=!0}catch(t){i=!1}e.restore(s)}else if(i=this._peekTag(e,a,r.any),e.isError(i))return i}var f;if(r.obj&&i&&(f=e.enterObject()),i){if(null!==r.explicit){var c=this._decodeTag(e,r.explicit);if(e.isError(c))return c;e=c}var p=e.offset;if(null===r.use&&null===r.choice){if(r.any)var s=e.save();var u=this._decodeTag(e,null===r.implicit?r.tag:r.implicit,r.any);if(e.isError(u))return u;r.any?n=e.raw(s):e=u}if(t&&t.track&&null!==r.tag&&t.track(e.path(),p,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),n=r.any?n:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var l=new o(n);n=this._getUse(r.contains,e._reporterState.obj)._decode(l,t)}}return r.obj&&i&&(n=e.leaveObject(f)),null!==r.key&&(null!==n||!0===i)?e.leaveKey(d,r.key,n):null!==d&&e.exitKey(d),n},r.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;if("seq"===e||"set"===e)return null;return"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null===n.use?t.error("unknown tag: "+e):this._getUse(n.use,t._reporterState.obj)._decode(t,r)},r.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),d(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},r.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var d=e.save(),a=r.choice[o];try{var s=a._decode(e,t);if(e.isError(s))return!1;n={type:o,value:s},i=!0}catch(t){return e.restore(d),!1}return!0},this),i?n:e.error("Choice not matched")},r.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},r.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n["default"]||n["default"]!==e){var i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i}},r.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var o=null;if(this.reporter=t,i.optional&&void 0===e)if(null!==i["default"])e=i["default"];else return;var d=null,a=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)d=this._getUse(i.contains,r)._encode(e,t),a=!0;else if(i.children)d=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),d=this._createEncoderBuffer(d);else if("seqof"===i.tag||"setof"===i.tag){if(!(i.args&&1===i.args.length))return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,d=this._createEncoderBuffer(e.map(function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},s))}else null===i.use?(d=this._encodePrimitive(i.tag,e),a=!0):o=this._getUse(i.use,r)._encode(e,t);var o;if(!i.any&&null===i.choice){var f=null===i.implicit?i.tag:i.implicit,c=null===i.implicit?"universal":"context";null===f?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(f,a,c,d))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},r.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||d(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},r.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},r.prototype._isNumstr=function(e){return /^[0-9 ]*$/.test(e)},r.prototype._isPrintstr=function(e){return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":49,"minimalistic-assert":198}],51:[function(e,t,r){function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,t){this.path=e,this.rethrow(t)}var o=e("inherits");r.Reporter=n,n.prototype.isError=function(e){return e instanceof i},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},n.prototype.error=function(e){var t=this._reporterState,r=e instanceof i,n;if(n=r?e:new i(t.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!t.options.partial)throw n;return r||t.errors.push(n),n},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e};o(i,Error),i.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},{inherits:190}],52:[function(e,t,r){var n=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=n._reverse(r.tag)},{"../constants":53}],53:[function(e,t,r){var n=r;n._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r}),t},n.der=e("./der")},{"./der":52}],54:[function(e,t){function r(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new i,this.tree._init(e.body)}function i(e){f.Node.call(this,"der",e)}function o(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=p.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;var d=p.tag[r];return{cls:n,primitive:i,tag:r,tagStr:d}}function d(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var o=127&n;if(4<o)return e.error("length octect is too long");n=0;for(var d=0;d<o;d++){n<<=8;var i=e.readUInt8(r);if(e.isError(i))return i;n|=i}return n}var a=e("inherits"),s=e("../../asn1"),f=s.base,c=s.bignum,p=s.constants.der;t.exports=r,r.prototype.decode=function(e,t){return e instanceof f.DecoderBuffer||(e=new f.DecoderBuffer(e,t)),this.tree._decode(e,t)},a(i,f.Node),i.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var n=e.save(),i=o(e,"Failed to peek tag: \""+t+"\"");return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},i.prototype._decodeTag=function(e,t,r){var n=o(e,"Failed to decode tag of \""+t+"\"");if(e.isError(n))return n;var i=d(e,n.primitive,"Failed to get length of \""+t+"\"");if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error("Failed to match tag: \""+t+"\"");if(n.primitive||null!==i)return e.skip(i,"Failed to match body of: \""+t+"\"");var a=e.save(),s=this._skipUntilEnd(e,"Failed to skip indefinite length body: \""+this.tag+"\"");return e.isError(s)?s:(i=e.offset-a.offset,e.restore(a),e.skip(i,"Failed to match body of: \""+t+"\""))},i.prototype._skipUntilEnd=function(e,t){for(;;){var r=o(e,t);if(e.isError(r))return r;var n=d(e,r.primitive,t);if(e.isError(n))return n;var i;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},i.prototype._decodeList=function(e,t,r,n){for(var i=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var d=r.decode(e,"der",n);if(e.isError(d)&&o)break;i.push(d)}return i},i.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var o=e.raw();if(1==o.length%2)return e.error("Decoding of string type: bmpstr length mismatch");for(var d="",a=0;a<o.length/2;a++)d+=n(o.readUInt16BE(2*a));return d}if("numstr"===t){var i=e.raw().toString("ascii");return this._isNumstr(i)?i:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return /str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},i.prototype._decodeObjid=function(e,t,r){for(var n=[],i=0,o,d;!e.isEmpty();)d=e.readUInt8(),i<<=7,i|=127&d,0==(128&d)&&(n.push(i),i=0);128&d&&n.push(i);var a=0|n[0]/40,s=n[0]%40;if(o=r?n:[a,s].concat(n.slice(1)),t){var f=t[o.join(" ")];void 0===f&&(f=t[o.join(".")]),void 0!==f&&(o=f)}return o},i.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),d=0|r.slice(8,10),a=0|r.slice(10,12),s=0|r.slice(12,14);else if("utctime"===t){var n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),d=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12);n=70>n?2e3+n:1900+n}else return e.error("Decoding "+t+" time is not supported yet");return Date.UTC(n,i-1,o,d,a,s,0)},i.prototype._decodeNull=function(){return null},i.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},i.prototype._decodeInt=function(e,t){var r=e.raw(),n=new c(r);return t&&(n=t[n.toString(10)]||n),n},i.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},{"../../asn1":46,inherits:190}],55:[function(e,t,r){var n=r;n.der=e("./der"),n.pem=e("./pem")},{"./der":54,"./pem":56}],56:[function(e,t){function r(e){d.call(this,e),this.enc="pem"}var n=e("inherits"),o=e("buffer").Buffer,d=e("./der");n(r,d),t.exports=r,r.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,f=-1,c=0,i;c<r.length;c++)if(i=r[c].match(a),null!==i&&i[2]===n)if(-1==s){if("BEGIN"!==i[1])break;s=c}else{if("END"!==i[1])break;f=c;break}if(-1===s||-1===f)throw new Error("PEM section not found for: "+n);var p=r.slice(s+1,f).join("");p.replace(/[^a-z0-9\+\/=]+/gi,"");var u=new o(p,"base64");return d.prototype.decode.call(this,u,t)}},{"./der":54,buffer:115,inherits:190}],57:[function(e,t){function r(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new n,this.tree._init(e.body)}function n(e){f.Node.call(this,"der",e)}function i(e){return 10>e?"0"+e:e}function o(e,t,r,n){var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),c.tagByName.hasOwnProperty(e))i=c.tagByName[e];else if("number"==typeof e&&(0|e)===e)i=e;else return n.error("Unknown tag: "+e);return 31<=i?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=c.tagClassByName[r||"universal"]<<6,i)}var d=e("inherits"),a=e("buffer").Buffer,s=e("../../asn1"),f=s.base,c=s.constants.der;t.exports=r,r.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},d(n,f.Node),n.prototype._encodeComposite=function(e,t,r,n){var d=o(e,t,r,this.reporter);if(128>n.length){var s=new a(2);return s[0]=d,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var f=1,c=n.length;256<=c;c>>=8)f++;var s=new a(2+f);s[0]=d,s[1]=128|f;for(var c=1+f,i=n.length;0<i;c--,i>>=8)s[c]=255&i;return this._createEncoderBuffer([s,n])},n.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new a(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},n.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(var n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(40<=e[1])return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var i=0,n=0,o;n<e.length;n++)for(o=e[n],i++;128<=o;o>>=7)i++;for(var d=new a(i),s=d.length-1,n=e.length-1,o;0<=n;n--)for(o=e[n],d[s--]=127&o;0<(o>>=7);)d[s--]=128|127&o;return this._createEncoderBuffer(d)},n.prototype._encodeTime=function(e,t){var r=new Date(e),n;return"gentime"===t?n=[i(r.getFullYear()),i(r.getUTCMonth()+1),i(r.getUTCDate()),i(r.getUTCHours()),i(r.getUTCMinutes()),i(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[i(r.getFullYear()%100),i(r.getUTCMonth()+1),i(r.getUTCDate()),i(r.getUTCHours()),i(r.getUTCMinutes()),i(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},n.prototype._encodeNull=function(){return this._createEncoderBuffer("")},n.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!a.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new a(r)}if(a.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new a(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(128>e)return this._createEncoderBuffer(e);if(256>e)return this._createEncoderBuffer([0,e]);for(var n=1,d=e;256<=d;d>>=8)n++;for(var o=Array(n),d=o.length-1;0<=d;d--)o[d]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new a(o))},n.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},n.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},n.prototype._skipDefault=function(e,t,r){var n=this._baseState,o;if(null===n["default"])return!1;var i=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n["default"],t,r).join()),i.length!==n.defaultBuffer.length)return!1;for(o=0;o<i.length;o++)if(i[o]!==n.defaultBuffer[o])return!1;return!0}},{"../../asn1":46,buffer:115,inherits:190}],58:[function(e,t,r){var n=r;n.der=e("./der"),n.pem=e("./pem")},{"./der":57,"./pem":59}],59:[function(e,t){function r(e){o.call(this,e),this.enc="pem"}var n=e("inherits"),o=e("./der");n(r,o),t.exports=r,r.prototype.encode=function(e,t){for(var r=o.prototype.encode.call(this,e),n=r.toString("base64"),d=["-----BEGIN "+t.label+"-----"],a=0;a<n.length;a+=64)d.push(n.slice(a,a+64));return d.push("-----END "+t.label+"-----"),d.join("\n")}},{"./der":57,inherits:190}],60:[function(t,r){(function(r,n){"use strict";function o(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function h(e,t,r){return h.isBN(e)?e:void(this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be")))}function a(e,t,n){for(var o=0,r=u(e.length,n),d=t,i;d<r;d++)i=e.charCodeAt(d)-48,o<<=4,o|=49<=i&&54>=i?i-49+10:17<=i&&22>=i?i-17+10:15&i;return o}function s(e,t,n,o){for(var d=0,r=u(e.length,n),a=t,i;a<r;a++)i=e.charCodeAt(a)-48,d*=o,d+=49<=i?i-49+10:17<=i?i-17+10:i;return d}function c(e){for(var t=Array(e.bitLength()),r=0;r<t.length;r++){var n=0|r/26,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function l(e,t,n){n.negative=t.negative^e.negative;var o=0|e.length+t.length;n.length=o,o=0|o-1;var d=0|e.words[0],a=0|t.words[0],s=d*a,r=67108863&s,c=0|s/67108864;n.words[0]=r;for(var p=1;p<o;p++){for(var l=c>>>26,h=67108863&c,b=u(p,t.length-1),g=f(0,p-e.length+1),y;g<=b;g++)y=0|p-g,d=0|e.words[y],a=0|t.words[g],s=d*a+h,l+=0|s/67108864,h=67108863&s;n.words[p]=0|h,c=0|l}return 0==c?n.length--:n.words[p]=0|c,n.strip()}function b(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var o=0,d=0,s=0,c;s<n.length-1;s++){c=d,d=0;for(var p=67108863&o,l=u(s,t.length-1),h=f(0,s-e.length+1);h<=l;h++){var g=s-h,i=0|e.words[g],a=0|t.words[h],b=i*a,r=67108863&b;c=0|c+(0|b/67108864),r=0|r+p,p=67108863&r,c=0|c+(r>>>26),d+=c>>>26,c&=67108863}n.words[s]=p,o=c,c=d}return 0==o?n.length--:n.words[s]=o,n.strip()}function g(e,t,r){var n=new y;return n.mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}function m(e,t){this.name=e,this.p=new h(t,16),this.n=this.p.bitLength(),this.k=new h(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(e){if("string"==typeof e){var t=h._prime(e);this.m=t.p,this.prime=t}else o(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){I.call(this,e),this.shift=this.m.bitLength(),0!=this.shift%26&&(this.shift+=26-this.shift%26),this.r=new h(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)}var A=Math.imul;"object"==typeof r?r.exports=h:n.BN=h,h.BN=h,h.wordSize=26;var w;try{w=t("buffer").Buffer}catch(t){}h.isBN=function(e){return!!(e instanceof h)||null!==e&&"object"==typeof e&&e.constructor.wordSize===h.wordSize&&Array.isArray(e.words)},h.max=function(e,t){return 0<e.cmp(t)?e:t},h.min=function(e,t){return 0>e.cmp(t)?e:t},h.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),o(t===(0|t)&&2<=t&&36>=t),e=e.toString().replace(/\s+/g,"");var n=0;"-"===e[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip();"le"!==r||this._initArray(this.toArray(),t,r)},h.prototype._initNumber=function(e,t,r){0>e&&(this.negative=1,e=-e),67108864>e?(this.words=[67108863&e],this.length=1):4503599627370496>e?(this.words=[67108863&e,67108863&e/67108864],this.length=2):(o(9007199254740992>e),this.words=[67108863&e,67108863&e/67108864,1],this.length=3);"le"!==r||this._initArray(this.toArray(),t,r)},h.prototype._initArray=function(e,t,r){if(o("number"==typeof e.length),0>=e.length)return this.words=[0],this.length=1,this;this.length=p(e.length/3),this.words=Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i=0,d,a;if("be"===r)for(n=e.length-1,d=0;0<=n;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[d]|=67108863&a<<i,this.words[d+1]=67108863&a>>>26-i,i+=24,26<=i&&(i-=26,d++);else if("le"===r)for(n=0,d=0;n<e.length;n+=3)a=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[d]|=67108863&a<<i,this.words[d+1]=67108863&a>>>26-i,i+=24,26<=i&&(i-=26,d++);return this.strip()},h.prototype._parseHex=function(e,t){this.length=p((e.length-t)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n=0,i,o;for(r=e.length-6,i=0;r>=t;r-=6)o=a(e,r,r+6),this.words[i]|=67108863&o<<n,this.words[i+1]|=4194303&o>>>26-n,n+=24,26<=n&&(n-=26,i++);r+6!==t&&(o=a(e,t,r+6),this.words[i]|=67108863&o<<n,this.words[i+1]|=4194303&o>>>26-n),this.strip()},h.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,o=1;67108863>=o;o*=t)n++;n--,o=0|o/t;for(var d=e.length-r,a=d%n,f=u(d,d-a)+r,c=0,p=r;p<f;p+=n)c=s(e,p,p+n,t),this.imuln(o),67108864>this.words[0]+c?this.words[0]+=c:this._iaddn(c);if(0!=a){var i=1;for(c=s(e,p,e.length,t),p=0;p<a;p++)i*=t;this.imuln(i),67108864>this.words[0]+c?this.words[0]+=c:this._iaddn(c)}},h.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},h.prototype.clone=function(){var e=new h(null);return this.copy(e),e},h.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},h.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},h.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},h.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var E=["","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"],P=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],B=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,10000000,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];h.prototype.toString=function(e,t){e=e||10,t=0|t||1;var n;if(16===e||"hex"===e){n="";for(var d=0,a=0,s=0;s<this.length;s++){var i=this.words[s],f=(16777215&(i<<d|a)).toString(16);a=16777215&i>>>24-d,n=0!=a||s!==this.length-1?E[6-f.length]+f+n:f+n,d+=2,26<=d&&(d-=26,s--)}for(0!=a&&(n=a.toString(16)+n);0!=n.length%t;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&2<=e&&36>=e){var p=P[e],u=B[e];n="";var l=this.clone();for(l.negative=0;!l.isZero();){var c=l.modn(u).toString(e);l=l.idivn(u),n=l.isZero()?c+n:E[p-c.length]+c+n}for(this.isZero()&&(n="0"+n);0!=n.length%t;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}o(!1,"Base should be between 2 and 36")},h.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2<this.length&&o(!1,"Number can only safely store up to 53 bits"),0===this.negative?e:-e},h.prototype.toJSON=function(){return this.toString(16)},h.prototype.toBuffer=function(e,t){return o("undefined"!=typeof w),this.toArrayLike(w,e,t)},h.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},h.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),d=r||f(1,n);o(n<=d,"byte array longer than desired length"),o(0<d,"Requested array length <= 0"),this.strip();var a=new e(d),s=this.clone(),c,p;if(!("le"===t)){for(p=0;p<d-n;p++)a[p]=0;for(p=0;!s.isZero();p++)c=s.andln(255),s.iushrn(8),a[d-p-1]=c}else{for(p=0;!s.isZero();p++)c=s.andln(255),s.iushrn(8),a[p]=c;for(;p<d;p++)a[p]=0}return a},h.prototype._countBits=e?function(t){return 32-e(t)}:function(e){var n=e,t=0;return 4096<=n&&(t+=13,n>>>=13),64<=n&&(t+=7,n>>>=7),8<=n&&(t+=4,n>>>=4),2<=n&&(t+=2,n>>>=2),t+n},h.prototype._zeroBits=function(e){if(0===e)return 26;var n=e,t=0;return 0==(8191&n)&&(t+=13,n>>>=13),0==(127&n)&&(t+=7,n>>>=7),0==(15&n)&&(t+=4,n>>>=4),0==(3&n)&&(t+=2,n>>>=2),0==(1&n)&&t++,t},h.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},h.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0,r;t<this.length&&(r=this._zeroBits(this.words[t]),e+=r,26===r);t++);return e},h.prototype.byteLength=function(){return p(this.bitLength()/8)},h.prototype.toTwos=function(e){return 0===this.negative?this.clone():this.abs().inotn(e).iaddn(1)},h.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},h.prototype.isNeg=function(){return 0!==this.negative},h.prototype.neg=function(){return this.clone().ineg()},h.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},h.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]|=e.words[t];return this.strip()},h.prototype.ior=function(e){return o(0==(this.negative|e.negative)),this.iuor(e)},h.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},h.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},h.prototype.iuand=function(e){var t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]&=e.words[r];return this.length=t.length,this.strip()},h.prototype.iand=function(e){return o(0==(this.negative|e.negative)),this.iuand(e)},h.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},h.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},h.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},h.prototype.ixor=function(e){return o(0==(this.negative|e.negative)),this.iuxor(e)},h.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},h.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},h.prototype.inotn=function(e){o("number"==typeof e&&0<=e);var t=0|p(e/26),r=e%26;this._expand(t),0<r&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return 0<r&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},h.prototype.notn=function(e){return this.clone().inotn(e)},h.prototype.setn=function(e,t){o("number"==typeof e&&0<=e);var r=0|e/26,n=e%26;return this._expand(r+1),t?this.words[r]|=1<<n:this.words[r]&=~(1<<n),this.strip()},h.prototype.iadd=function(e){var t;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var r,n;this.length>e.length?(r=this,n=e):(r=e,n=this);for(var o=0,d=0;d<n.length;d++)t=(0|r.words[d])+(0|n.words[d])+o,this.words[d]=67108863&t,o=t>>>26;for(;0!=o&&d<r.length;d++)t=(0|r.words[d])+o,this.words[d]=67108863&t,o=t>>>26;if(this.length=r.length,0!=o)this.words[this.length]=o,this.length++;else if(r!==this)for(;d<r.length;d++)this.words[d]=r.words[d];return this},h.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},h.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,o;0<r?(n=this,o=e):(n=e,o=this);for(var d=0,a=0;a<o.length;a++)t=(0|n.words[a])-(0|o.words[a])+d,d=t>>26,this.words[a]=67108863&t;for(;0!=d&&a<n.length;a++)t=(0|n.words[a])+d,d=t>>26,this.words[a]=67108863&t;if(0==d&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=f(this.length,a),n!==this&&(this.negative=1),this.strip()},h.prototype.sub=function(e){return this.clone().isub(e)};var O=function(e,t,r){var n=e.words,i=t.words,d=r.words,o=0,a=0|n[0],s=8191&a,f=a>>>13,c=0|n[1],p=8191&c,u=c>>>13,l=0|n[2],h=8191&l,b=l>>>13,g=0|n[3],y=8191&g,m=g>>>13,_=0|n[4],S=8191&_,v=_>>>13,k=0|n[5],I=8191&k,x=k>>>13,w=0|n[6],E=8191&w,P=w>>>13,B=0|n[7],O=8191&B,R=B>>>13,T=0|n[8],N=8191&T,C=T>>>13,j=0|n[9],M=8191&j,U=j>>>13,L=0|i[0],D=8191&L,z=L>>>13,H=0|i[1],K=8191&H,F=H>>>13,q=0|i[2],V=8191&q,G=q>>>13,W=0|i[3],Y=8191&W,X=W>>>13,Z=0|i[4],J=8191&Z,Q=Z>>>13,$=0|i[5],ee=8191&$,te=$>>>13,re=0|i[6],ne=8191&re,ie=re>>>13,oe=0|i[7],de=8191&oe,ae=oe>>>13,se=0|i[8],fe=8191&se,ce=se>>>13,pe=0|i[9],ue=8191&pe,le=pe>>>13,he,be,ge;r.negative=e.negative^t.negative,r.length=19,he=A(s,D),be=A(s,z),be=0|be+A(f,D),ge=A(f,z);var ye=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(ye>>>26),ye&=67108863,he=A(p,D),be=A(p,z),be=0|be+A(u,D),ge=A(u,z),he=0|he+A(s,K),be=0|be+A(s,F),be=0|be+A(f,K),ge=0|ge+A(f,F);var me=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(me>>>26),me&=67108863,he=A(h,D),be=A(h,z),be=0|be+A(b,D),ge=A(b,z),he=0|he+A(p,K),be=0|be+A(p,F),be=0|be+A(u,K),ge=0|ge+A(u,F),he=0|he+A(s,V),be=0|be+A(s,G),be=0|be+A(f,V),ge=0|ge+A(f,G);var _e=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(_e>>>26),_e&=67108863,he=A(y,D),be=A(y,z),be=0|be+A(m,D),ge=A(m,z),he=0|he+A(h,K),be=0|be+A(h,F),be=0|be+A(b,K),ge=0|ge+A(b,F),he=0|he+A(p,V),be=0|be+A(p,G),be=0|be+A(u,V),ge=0|ge+A(u,G),he=0|he+A(s,Y),be=0|be+A(s,X),be=0|be+A(f,Y),ge=0|ge+A(f,X);var Se=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Se>>>26),Se&=67108863,he=A(S,D),be=A(S,z),be=0|be+A(v,D),ge=A(v,z),he=0|he+A(y,K),be=0|be+A(y,F),be=0|be+A(m,K),ge=0|ge+A(m,F),he=0|he+A(h,V),be=0|be+A(h,G),be=0|be+A(b,V),ge=0|ge+A(b,G),he=0|he+A(p,Y),be=0|be+A(p,X),be=0|be+A(u,Y),ge=0|ge+A(u,X),he=0|he+A(s,J),be=0|be+A(s,Q),be=0|be+A(f,J),ge=0|ge+A(f,Q);var ve=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(ve>>>26),ve&=67108863,he=A(I,D),be=A(I,z),be=0|be+A(x,D),ge=A(x,z),he=0|he+A(S,K),be=0|be+A(S,F),be=0|be+A(v,K),ge=0|ge+A(v,F),he=0|he+A(y,V),be=0|be+A(y,G),be=0|be+A(m,V),ge=0|ge+A(m,G),he=0|he+A(h,Y),be=0|be+A(h,X),be=0|be+A(b,Y),ge=0|ge+A(b,X),he=0|he+A(p,J),be=0|be+A(p,Q),be=0|be+A(u,J),ge=0|ge+A(u,Q),he=0|he+A(s,ee),be=0|be+A(s,te),be=0|be+A(f,ee),ge=0|ge+A(f,te);var ke=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(ke>>>26),ke&=67108863,he=A(E,D),be=A(E,z),be=0|be+A(P,D),ge=A(P,z),he=0|he+A(I,K),be=0|be+A(I,F),be=0|be+A(x,K),ge=0|ge+A(x,F),he=0|he+A(S,V),be=0|be+A(S,G),be=0|be+A(v,V),ge=0|ge+A(v,G),he=0|he+A(y,Y),be=0|be+A(y,X),be=0|be+A(m,Y),ge=0|ge+A(m,X),he=0|he+A(h,J),be=0|be+A(h,Q),be=0|be+A(b,J),ge=0|ge+A(b,Q),he=0|he+A(p,ee),be=0|be+A(p,te),be=0|be+A(u,ee),ge=0|ge+A(u,te),he=0|he+A(s,ne),be=0|be+A(s,ie),be=0|be+A(f,ne),ge=0|ge+A(f,ie);var Ie=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Ie>>>26),Ie&=67108863,he=A(O,D),be=A(O,z),be=0|be+A(R,D),ge=A(R,z),he=0|he+A(E,K),be=0|be+A(E,F),be=0|be+A(P,K),ge=0|ge+A(P,F),he=0|he+A(I,V),be=0|be+A(I,G),be=0|be+A(x,V),ge=0|ge+A(x,G),he=0|he+A(S,Y),be=0|be+A(S,X),be=0|be+A(v,Y),ge=0|ge+A(v,X),he=0|he+A(y,J),be=0|be+A(y,Q),be=0|be+A(m,J),ge=0|ge+A(m,Q),he=0|he+A(h,ee),be=0|be+A(h,te),be=0|be+A(b,ee),ge=0|ge+A(b,te),he=0|he+A(p,ne),be=0|be+A(p,ie),be=0|be+A(u,ne),ge=0|ge+A(u,ie),he=0|he+A(s,de),be=0|be+A(s,ae),be=0|be+A(f,de),ge=0|ge+A(f,ae);var xe=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(xe>>>26),xe&=67108863,he=A(N,D),be=A(N,z),be=0|be+A(C,D),ge=A(C,z),he=0|he+A(O,K),be=0|be+A(O,F),be=0|be+A(R,K),ge=0|ge+A(R,F),he=0|he+A(E,V),be=0|be+A(E,G),be=0|be+A(P,V),ge=0|ge+A(P,G),he=0|he+A(I,Y),be=0|be+A(I,X),be=0|be+A(x,Y),ge=0|ge+A(x,X),he=0|he+A(S,J),be=0|be+A(S,Q),be=0|be+A(v,J),ge=0|ge+A(v,Q),he=0|he+A(y,ee),be=0|be+A(y,te),be=0|be+A(m,ee),ge=0|ge+A(m,te),he=0|he+A(h,ne),be=0|be+A(h,ie),be=0|be+A(b,ne),ge=0|ge+A(b,ie),he=0|he+A(p,de),be=0|be+A(p,ae),be=0|be+A(u,de),ge=0|ge+A(u,ae),he=0|he+A(s,fe),be=0|be+A(s,ce),be=0|be+A(f,fe),ge=0|ge+A(f,ce);var Ae=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Ae>>>26),Ae&=67108863,he=A(M,D),be=A(M,z),be=0|be+A(U,D),ge=A(U,z),he=0|he+A(N,K),be=0|be+A(N,F),be=0|be+A(C,K),ge=0|ge+A(C,F),he=0|he+A(O,V),be=0|be+A(O,G),be=0|be+A(R,V),ge=0|ge+A(R,G),he=0|he+A(E,Y),be=0|be+A(E,X),be=0|be+A(P,Y),ge=0|ge+A(P,X),he=0|he+A(I,J),be=0|be+A(I,Q),be=0|be+A(x,J),ge=0|ge+A(x,Q),he=0|he+A(S,ee),be=0|be+A(S,te),be=0|be+A(v,ee),ge=0|ge+A(v,te),he=0|he+A(y,ne),be=0|be+A(y,ie),be=0|be+A(m,ne),ge=0|ge+A(m,ie),he=0|he+A(h,de),be=0|be+A(h,ae),be=0|be+A(b,de),ge=0|ge+A(b,ae),he=0|he+A(p,fe),be=0|be+A(p,ce),be=0|be+A(u,fe),ge=0|ge+A(u,ce),he=0|he+A(s,ue),be=0|be+A(s,le),be=0|be+A(f,ue),ge=0|ge+A(f,le);var we=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(we>>>26),we&=67108863,he=A(M,K),be=A(M,F),be=0|be+A(U,K),ge=A(U,F),he=0|he+A(N,V),be=0|be+A(N,G),be=0|be+A(C,V),ge=0|ge+A(C,G),he=0|he+A(O,Y),be=0|be+A(O,X),be=0|be+A(R,Y),ge=0|ge+A(R,X),he=0|he+A(E,J),be=0|be+A(E,Q),be=0|be+A(P,J),ge=0|ge+A(P,Q),he=0|he+A(I,ee),be=0|be+A(I,te),be=0|be+A(x,ee),ge=0|ge+A(x,te),he=0|he+A(S,ne),be=0|be+A(S,ie),be=0|be+A(v,ne),ge=0|ge+A(v,ie),he=0|he+A(y,de),be=0|be+A(y,ae),be=0|be+A(m,de),ge=0|ge+A(m,ae),he=0|he+A(h,fe),be=0|be+A(h,ce),be=0|be+A(b,fe),ge=0|ge+A(b,ce),he=0|he+A(p,ue),be=0|be+A(p,le),be=0|be+A(u,ue),ge=0|ge+A(u,le);var Ee=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Ee>>>26),Ee&=67108863,he=A(M,V),be=A(M,G),be=0|be+A(U,V),ge=A(U,G),he=0|he+A(N,Y),be=0|be+A(N,X),be=0|be+A(C,Y),ge=0|ge+A(C,X),he=0|he+A(O,J),be=0|be+A(O,Q),be=0|be+A(R,J),ge=0|ge+A(R,Q),he=0|he+A(E,ee),be=0|be+A(E,te),be=0|be+A(P,ee),ge=0|ge+A(P,te),he=0|he+A(I,ne),be=0|be+A(I,ie),be=0|be+A(x,ne),ge=0|ge+A(x,ie),he=0|he+A(S,de),be=0|be+A(S,ae),be=0|be+A(v,de),ge=0|ge+A(v,ae),he=0|he+A(y,fe),be=0|be+A(y,ce),be=0|be+A(m,fe),ge=0|ge+A(m,ce),he=0|he+A(h,ue),be=0|be+A(h,le),be=0|be+A(b,ue),ge=0|ge+A(b,le);var Pe=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Pe>>>26),Pe&=67108863,he=A(M,Y),be=A(M,X),be=0|be+A(U,Y),ge=A(U,X),he=0|he+A(N,J),be=0|be+A(N,Q),be=0|be+A(C,J),ge=0|ge+A(C,Q),he=0|he+A(O,ee),be=0|be+A(O,te),be=0|be+A(R,ee),ge=0|ge+A(R,te),he=0|he+A(E,ne),be=0|be+A(E,ie),be=0|be+A(P,ne),ge=0|ge+A(P,ie),he=0|he+A(I,de),be=0|be+A(I,ae),be=0|be+A(x,de),ge=0|ge+A(x,ae),he=0|he+A(S,fe),be=0|be+A(S,ce),be=0|be+A(v,fe),ge=0|ge+A(v,ce),he=0|he+A(y,ue),be=0|be+A(y,le),be=0|be+A(m,ue),ge=0|ge+A(m,le);var Be=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Be>>>26),Be&=67108863,he=A(M,J),be=A(M,Q),be=0|be+A(U,J),ge=A(U,Q),he=0|he+A(N,ee),be=0|be+A(N,te),be=0|be+A(C,ee),ge=0|ge+A(C,te),he=0|he+A(O,ne),be=0|be+A(O,ie),be=0|be+A(R,ne),ge=0|ge+A(R,ie),he=0|he+A(E,de),be=0|be+A(E,ae),be=0|be+A(P,de),ge=0|ge+A(P,ae),he=0|he+A(I,fe),be=0|be+A(I,ce),be=0|be+A(x,fe),ge=0|ge+A(x,ce),he=0|he+A(S,ue),be=0|be+A(S,le),be=0|be+A(v,ue),ge=0|ge+A(v,le);var Oe=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Oe>>>26),Oe&=67108863,he=A(M,ee),be=A(M,te),be=0|be+A(U,ee),ge=A(U,te),he=0|he+A(N,ne),be=0|be+A(N,ie),be=0|be+A(C,ne),ge=0|ge+A(C,ie),he=0|he+A(O,de),be=0|be+A(O,ae),be=0|be+A(R,de),ge=0|ge+A(R,ae),he=0|he+A(E,fe),be=0|be+A(E,ce),be=0|be+A(P,fe),ge=0|ge+A(P,ce),he=0|he+A(I,ue),be=0|be+A(I,le),be=0|be+A(x,ue),ge=0|ge+A(x,le);var Re=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Re>>>26),Re&=67108863,he=A(M,ne),be=A(M,ie),be=0|be+A(U,ne),ge=A(U,ie),he=0|he+A(N,de),be=0|be+A(N,ae),be=0|be+A(C,de),ge=0|ge+A(C,ae),he=0|he+A(O,fe),be=0|be+A(O,ce),be=0|be+A(R,fe),ge=0|ge+A(R,ce),he=0|he+A(E,ue),be=0|be+A(E,le),be=0|be+A(P,ue),ge=0|ge+A(P,le);var Te=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Te>>>26),Te&=67108863,he=A(M,de),be=A(M,ae),be=0|be+A(U,de),ge=A(U,ae),he=0|he+A(N,fe),be=0|be+A(N,ce),be=0|be+A(C,fe),ge=0|ge+A(C,ce),he=0|he+A(O,ue),be=0|be+A(O,le),be=0|be+A(R,ue),ge=0|ge+A(R,le);var Ne=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Ne>>>26),Ne&=67108863,he=A(M,fe),be=A(M,ce),be=0|be+A(U,fe),ge=A(U,ce),he=0|he+A(N,ue),be=0|be+A(N,le),be=0|be+A(C,ue),ge=0|ge+A(C,le);var Ce=0|(0|o+he)+((8191&be)<<13);o=0|(0|ge+(be>>>13))+(Ce>>>26),Ce&=67108863,he=A(M,ue),be=A(M,le),be=0|be+A(U,ue),ge=A(U,le);var je=0|(0|o+he)+((8191&be)<<13);return o=0|(0|ge+(be>>>13))+(je>>>26),je&=67108863,d[0]=ye,d[1]=me,d[2]=_e,d[3]=Se,d[4]=ve,d[5]=ke,d[6]=Ie,d[7]=xe,d[8]=Ae,d[9]=we,d[10]=Ee,d[11]=Pe,d[12]=Be,d[13]=Oe,d[14]=Re,d[15]=Te,d[16]=Ne,d[17]=Ce,d[18]=je,0!=o&&(d[19]=o,r.length++),r};A||(O=l),h.prototype.mulTo=function(e,t){var r=this.length+e.length,n;return n=10===this.length&&10===e.length?O(this,e,t):63>r?l(this,e,t):1024>r?b(this,e,t):g(this,e,t),n},y.prototype.makeRBT=function(e){for(var r=Array(e),t=h.prototype._countBits(e)-1,n=0;n<e;n++)r[n]=this.revBin(n,t,e);return r},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,o=0;o<t;o++)n|=(1&e)<<t-o-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,o,d){for(var a=0;a<d;a++)n[a]=t[e[a]],o[a]=r[e[a]]},y.prototype.transform=function(e,t,r,n,i,o){var d=Math.PI;this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,f=Math.cos(2*d/s),c=Math.sin(2*d/s),u=0;u<i;u+=s)for(var p=f,l=c,h=0;h<a;h++){var b=r[u+h],g=n[u+h],y=r[u+h+a],m=n[u+h+a],_=p*y-l*m;m=p*m+l*y,y=_,r[u+h]=b+y,n[u+h]=g+m,r[u+h+a]=b-y,n[u+h+a]=g-m,h!==s&&(_=f*p-c*l,l=f*l+c*p,p=_)}},y.prototype.guessLen13b=function(e,t){var r=1|f(t,e),n=1&r,o=0;for(r=0|r/2;r;r>>>=1)o++;return 1<<o+1+n},y.prototype.conjugate=function(e,r,n){if(!(1>=n))for(var o=0,i;o<n/2;o++)i=e[o],e[o]=e[n-o-1],e[n-o-1]=i,i=r[o],r[o]=-r[n-o-1],r[n-o-1]=-i},y.prototype.normalize13b=function(e,t){for(var r=0,n=0,i;n<t/2;n++)i=8192*d(e[2*n+1]/t)+d(e[2*n]/t)+r,e[n]=67108863&i,r=67108864>i?0:0|i/67108864;return e},y.prototype.convert13b=function(e,t,r,n){for(var d=0,a=0;a<t;a++)d+=0|e[a],r[2*a]=8191&d,d>>>=13,r[2*a+1]=8191&d,d>>>=13;for(a=2*t;a<n;++a)r[a]=0;o(0==d),o(0==(-8192&d))},y.prototype.stub=function(e){for(var t=Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),o=this.makeRBT(n),d=this.stub(n),a=Array(n),s=Array(n),f=Array(n),c=Array(n),p=Array(n),u=Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,d,s,f,n,o),this.transform(c,d,p,u,n,o);for(var h=0,i;h<n;h++)i=s[h]*p[h]-f[h]*u[h],f[h]=s[h]*u[h]+f[h]*p[h],s[h]=i;return this.conjugate(s,f,n),this.transform(s,f,l,d,n,o),this.conjugate(l,d,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},h.prototype.mul=function(e){var t=new h(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},h.prototype.mulf=function(e){var t=new h(null);return t.words=Array(this.length+e.length),g(this,e,t)},h.prototype.imul=function(e){return this.clone().mulTo(e,this)},h.prototype.imuln=function(e){o("number"==typeof e),o(67108864>e);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,i=(67108863&n)+(67108863&t);t>>=26,t+=0|n/67108864,t+=i>>>26,this.words[r]=67108863&i}return 0!=t&&(this.words[r]=t,this.length++),this},h.prototype.muln=function(e){return this.clone().imuln(e)},h.prototype.sqr=function(){return this.mul(this)},h.prototype.isqr=function(){return this.imul(this.clone())},h.prototype.pow=function(e){var t=c(e);if(0===t.length)return new h(1);for(var r=this,n=0;n<t.length&&!(0!==t[n]);n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},h.prototype.iushln=function(e){o("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26,n;if(0!=t){var i=0;for(n=0;n<this.length;n++){var d=this.words[n]&67108863>>>26-t<<26-t,a=(0|this.words[n])-d<<t;this.words[n]=a|i,i=d>>>26-t}i&&(this.words[n]=i,this.length++)}if(0!=r){for(n=this.length-1;0<=n;n--)this.words[n+r]=this.words[n];for(n=0;n<r;n++)this.words[n]=0;this.length+=r}return this.strip()},h.prototype.ishln=function(e){return o(0===this.negative),this.iushln(e)},h.prototype.iushrn=function(e,t,n){o("number"==typeof e&&0<=e);var d=t?(t-t%26)/26:0;var a=e%26,r=u((e-a)/26,this.length),s=n;if(d-=r,d=f(0,d),s){for(var c=0;c<r;c++)s.words[c]=this.words[c];s.length=r}if(0===r);else if(this.length>r)for(this.length-=r,c=0;c<this.length;c++)this.words[c]=this.words[c+r];else this.words[0]=0,this.length=1;var i=0;for(c=this.length-1;0<=c&&(0!=i||c>=d);c--){var p=0|this.words[c];this.words[c]=i<<26-a|p>>>a,i=p&(67108863^67108863>>>a<<a)}return s&&0!=i&&(s.words[s.length++]=i),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},h.prototype.ishrn=function(e,t,r){return o(0===this.negative),this.iushrn(e,t,r)},h.prototype.shln=function(e){return this.clone().ishln(e)},h.prototype.ushln=function(e){return this.clone().iushln(e)},h.prototype.shrn=function(e){return this.clone().ishrn(e)},h.prototype.ushrn=function(e){return this.clone().iushrn(e)},h.prototype.testn=function(e){o("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26;if(this.length<=r)return!1;var n=this.words[r];return!!(n&1<<t)},h.prototype.imaskn=function(e){o("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26;if(o(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!=t&&r++,this.length=u(r,this.length),0!=t){this.words[this.length-1]&=67108863^67108863>>>t<<t}return this.strip()},h.prototype.maskn=function(e){return this.clone().imaskn(e)},h.prototype.iaddn=function(e){return o("number"==typeof e),o(67108864>e),0>e?this.isubn(-e):0===this.negative?this._iaddn(e):1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this)},h.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&67108864<=this.words[t];t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=f(this.length,t+1),this},h.prototype.isubn=function(e){if(o("number"==typeof e),o(67108864>e),0>e)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&0>this.words[t];t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},h.prototype.addn=function(e){return this.clone().iaddn(e)},h.prototype.subn=function(e){return this.clone().isubn(e)},h.prototype.iabs=function(){return this.negative=0,this},h.prototype.abs=function(){return this.clone().iabs()},h.prototype._ishlnsubmul=function(e,t,r){var n=e.length+r,d;this._expand(n);var i=0,a;for(d=0;d<e.length;d++){a=(0|this.words[d+r])+i;var s=(0|e.words[d])*t;a-=67108863&s,i=(a>>26)-(0|s/67108864),this.words[d+r]=67108863&a}for(;d<this.length-r;d++)a=(0|this.words[d+r])+i,i=a>>26,this.words[d+r]=67108863&a;if(0==i)return this.strip();for(o(-1==i),i=0,d=0;d<this.length;d++)a=-(0|this.words[d])+i,i=a>>26,this.words[d]=67108863&a;return this.negative=1,this.strip()},h.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),o=e,d=0|o.words[o.length-1],s=this._countBits(d);r=26-s,0!=r&&(o=o.ushln(r),n.iushln(r),d=0|o.words[o.length-1]);var f=n.length-o.length,c;if("mod"!==t){c=new h(null),c.length=f+1,c.words=Array(c.length);for(var p=0;p<c.length;p++)c.words[p]=0}var i=n.clone()._ishlnsubmul(o,1,f);0===i.negative&&(n=i,c&&(c.words[f]=1));for(var l=f-1,b;0<=l;l--){for(b=67108864*(0|n.words[o.length+l])+(0|n.words[o.length+l-1]),b=u(0|b/d,67108863),n._ishlnsubmul(o,b,l);0!==n.negative;)b--,n.negative=0,n._ishlnsubmul(o,1,l),n.isZero()||(n.negative^=1);c&&(c.words[l]=b)}return c&&c.strip(),n.strip(),"div"!==t&&0!=r&&n.iushrn(r),{div:c||null,mod:n}},h.prototype.divmod=function(e,t,r){if(o(!e.isZero()),this.isZero())return{div:new h(0),mod:new h(0)};var n,i,d;return 0!==this.negative&&0===e.negative?(d=this.neg().divmod(e,t),"mod"!==t&&(n=d.div.neg()),"div"!==t&&(i=d.mod.neg(),r&&0!==i.negative&&i.iadd(e)),{div:n,mod:i}):0===this.negative&&0!==e.negative?(d=this.divmod(e.neg(),t),"mod"!==t&&(n=d.div.neg()),{div:n,mod:d.mod}):0==(this.negative&e.negative)?e.length>this.length||0>this.cmp(e)?{div:new h(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new h(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new h(this.modn(e.words[0]))}:this._wordDiv(e,t):(d=this.neg().divmod(e.neg(),t),"div"!==t&&(i=d.mod.neg(),r&&0!==i.negative&&i.isub(e)),{div:d.div,mod:i})},h.prototype.div=function(e){return this.divmod(e,"div",!1).div},h.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},h.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},h.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0===t.div.negative?t.mod:t.mod.isub(e),n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return 0>o||1===i&&0===o?t.div:0===t.div.negative?t.div.iaddn(1):t.div.isubn(1)},h.prototype.modn=function(e){o(67108863>=e);for(var t=0,r=this.length-1;0<=r;r--)t=(67108864%e*t+(0|this.words[r]))%e;return t},h.prototype.idivn=function(e){o(67108863>=e);for(var t=0,r=this.length-1,n;0<=r;r--)n=(0|this.words[r])+67108864*t,this.words[r]=0|n/e,t=n%e;return this.strip()},h.prototype.divn=function(e){return this.clone().idivn(e)},h.prototype.egcd=function(e){o(0===e.negative),o(!e.isZero());var t=this,r=e.clone();t=0===t.negative?t.clone():t.umod(e);for(var n=new h(1),d=new h(0),a=new h(0),s=new h(1),f=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++f;for(var c=r.clone(),p=t.clone();!t.isZero();){for(var u=0,i=1;0==(t.words[0]&i)&&26>u;++u,i<<=1);if(0<u)for(t.iushrn(u);0<u--;)(n.isOdd()||d.isOdd())&&(n.iadd(c),d.isub(p)),n.iushrn(1),d.iushrn(1);for(var l=0,b=1;0==(r.words[0]&b)&&26>l;++l,b<<=1);if(0<l)for(r.iushrn(l);0<l--;)(a.isOdd()||s.isOdd())&&(a.iadd(c),s.isub(p)),a.iushrn(1),s.iushrn(1);0<=t.cmp(r)?(t.isub(r),n.isub(a),d.isub(s)):(r.isub(t),a.isub(n),s.isub(d))}return{a:a,b:s,gcd:r.iushln(f)}},h.prototype._invmp=function(e){o(0===e.negative),o(!e.isZero());var t=this,r=e.clone();t=0===t.negative?t.clone():t.umod(e);for(var n=new h(1),d=new h(0),a=r.clone();0<t.cmpn(1)&&0<r.cmpn(1);){for(var s=0,i=1;0==(t.words[0]&i)&&26>s;++s,i<<=1);if(0<s)for(t.iushrn(s);0<s--;)n.isOdd()&&n.iadd(a),n.iushrn(1);for(var f=0,c=1;0==(r.words[0]&c)&&26>f;++f,c<<=1);if(0<f)for(r.iushrn(f);0<f--;)d.isOdd()&&d.iadd(a),d.iushrn(1);0<=t.cmp(r)?(t.isub(r),n.isub(d)):(r.isub(t),d.isub(n))}var p;return p=0===t.cmpn(1)?n:d,0>p.cmpn(0)&&p.iadd(e),p},h.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var n=this.clone(),i=e.clone();n.negative=0,i.negative=0;for(var o=0;n.isEven()&&i.isEven();o++)n.iushrn(1),i.iushrn(1);do{for(;n.isEven();)n.iushrn(1);for(;i.isEven();)i.iushrn(1);var d=n.cmp(i);if(0>d){var r=n;n=i,i=r}else if(0===d||0===i.cmpn(1))break;n.isub(i)}while(!0);return i.iushln(o)},h.prototype.invm=function(e){return this.egcd(e).a.umod(e)},h.prototype.isEven=function(){return 0==(1&this.words[0])},h.prototype.isOdd=function(){return 1==(1&this.words[0])},h.prototype.andln=function(e){return this.words[0]&e},h.prototype.bincn=function(e){o("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var d=n,a=r,i;0!=d&&a<this.length;a++)i=0|this.words[a],i+=d,d=i>>>26,i&=67108863,this.words[a]=i;return 0!=d&&(this.words[a]=d,this.length++),this},h.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},h.prototype.cmpn=function(e){var t=0>e;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(1<this.length)r=1;else{t&&(e=-e),o(67108863>=e,"Number is too big");var n=0|this.words[0];r=n===e?0:n<e?-1:1}return 0===this.negative?r:0|-r},h.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0===this.negative?t:0|-t},h.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;0<=r;r--){var n=0|this.words[r],i=0|e.words[r];if(n!=i){n<i?t=-1:n>i&&(t=1);break}}return t},h.prototype.gtn=function(e){return 1===this.cmpn(e)},h.prototype.gt=function(e){return 1===this.cmp(e)},h.prototype.gten=function(e){return 0<=this.cmpn(e)},h.prototype.gte=function(e){return 0<=this.cmp(e)},h.prototype.ltn=function(e){return-1===this.cmpn(e)},h.prototype.lt=function(e){return-1===this.cmp(e)},h.prototype.lten=function(e){return 0>=this.cmpn(e)},h.prototype.lte=function(e){return 0>=this.cmp(e)},h.prototype.eqn=function(e){return 0===this.cmpn(e)},h.prototype.eq=function(e){return 0===this.cmp(e)},h.red=function(e){return new I(e)},h.prototype.toRed=function(e){return o(!this.red,"Already a number in reduction context"),o(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},h.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},h.prototype._forceRed=function(e){return this.red=e,this},h.prototype.forceRed=function(e){return o(!this.red,"Already a number in reduction context"),this._forceRed(e)},h.prototype.redAdd=function(e){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},h.prototype.redIAdd=function(e){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},h.prototype.redSub=function(e){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},h.prototype.redISub=function(e){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},h.prototype.redShl=function(e){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},h.prototype.redMul=function(e){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},h.prototype.redIMul=function(e){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},h.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},h.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},h.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},h.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},h.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},h.prototype.redPow=function(e){return o(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var R={k256:null,p224:null,p192:null,p25519:null};m.prototype._tmp=function(){var e=new h(null);return e.words=Array(p(this.n/13)),e},m.prototype.ireduce=function(e){var t=e,r;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),r=t.bitLength();while(r>this.n);var n=r<this.n?-1:t.ucmp(this.p);return 0===n?(t.words[0]=0,t.length=1):0<n?t.isub(this.p):t.strip(),t},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(_,m),_.prototype.split=function(e,t){for(var r=4194303,n=u(e.length,9),o=0;o<n;o++)t.words[o]=e.words[o];if(t.length=n,9>=e.length)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&r,o=10;o<e.length;o++){var d=0|e.words[o];e.words[o-10]=(d&r)<<4|i>>>22,i=d}i>>>=22,e.words[o-10]=i,e.length-=0===i&&10<e.length?10:9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0,n;r<e.length;r++)n=0|e.words[r],t+=977*n,e.words[r]=67108863&t,t=64*n+(0|t/67108864);return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(S,m),i(v,m),i(k,m),k.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!=t&&(e.words[e.length++]=t),e},h._prime=function(e){if(R[e])return R[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new S;else if("p192"===e)t=new v;else if("p25519"===e)t=new k;else throw new Error("Unknown prime "+e);return R[e]=t,t},I.prototype._verify1=function(e){o(0===e.negative,"red works only with positives"),o(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,t){o(0==(e.negative|t.negative),"red works only with positives"),o(e.red&&e.red===t.red,"red works only with red numbers")},I.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},I.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r},I.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},I.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var n=this.m.andln(3);if(o(1==n%2),3===n){var d=this.m.add(new h(1)).iushrn(2);return this.pow(e,d)}for(var a=this.m.subn(1),f=0;!a.isZero()&&0===a.andln(1);)f++,a.iushrn(1);o(!a.isZero());var s=new h(1).toRed(this),p=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new h(2*l*l).toRed(this);0!==this.pow(l,u).cmp(p);)l.redIAdd(p);for(var g=this.pow(l,a),c=this.pow(e,a.addn(1).iushrn(1)),r=this.pow(e,a),t=f;0!==r.cmp(s);){for(var y=r,m=0;0!==y.cmp(s);m++)y=y.redSqr();o(m<t);var i=this.pow(g,new h(1).iushln(t-m-1));c=c.redMul(i),g=i.redSqr(),r=r.redMul(g),t=m}return c},I.prototype.invm=function(e){var t=e._invmp(this.m);return 0===t.negative?this.imod(t):(t.negative=0,this.imod(t).redNeg())},I.prototype.pow=function(e,t){if(t.isZero())return new h(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=Array(1<<r);n[0]=new h(1).toRed(this),n[1]=e;for(var o=2;o<n.length;o++)n[o]=this.mul(n[o-1],e);var i=n[0],d=0,a=0,s=t.bitLength()%26;for(0==s&&(s=26),o=t.length-1;0<=o;o--){for(var f=t.words[o],c=s-1,p;0<=c;c--){if(p=1&f>>c,i!==n[0]&&(i=this.sqr(i)),0==p&&0==d){a=0;continue}d<<=1,d|=p,a++,a!=r&&(0!==o||0!==c)||(i=this.mul(i,n[d]),a=0,d=0)}s=26}return i},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},h.mont=function(e){return new x(e)},i(x,I),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,r){if(e.isZero()||r.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(r),t=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(t).iushrn(this.shift),o=i;return 0<=i.cmp(this.m)?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,r){if(e.isZero()||r.isZero())return new h(0)._forceRed(this);var n=e.mul(r),t=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(t).iushrn(this.shift),o=i;return 0<=i.cmp(this.m)?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})("undefined"==typeof r||r,this)},{buffer:66}],61:[function(e,t){(function(r){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=u(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}function i(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!!(null!=e&&e._isBuffer)}function o(e){return Object.prototype.toString.call(e)}function d(e){return!i(e)&&!("function"!=typeof r.ArrayBuffer)&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(!!(e instanceof DataView)||e.buffer&&e.buffer instanceof ArrayBuffer))}function a(e){if(v.isFunction(e)){if(x)return e.name;var t=e.toString(),r=t.match(w);return r&&r[1]}}function s(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function f(e){if(x||!v.isFunction(e))return v.inspect(e);var t=a(e),r=t?": "+t:"";return"[Function"+r+"]"}function c(e){return s(f(e.actual),128)+" "+e.operator+" "+s(f(e.expected),128)}function p(e,t,r,n,i){throw new A.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function l(e,t){e||p(e,!0,t,"==",A.ok)}function h(e,t,r,a){if(e===t)return!0;if(i(e)&&i(t))return 0===n(e,t);if(v.isDate(e)&&v.isDate(t))return e.getTime()===t.getTime();if(v.isRegExp(e)&&v.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if((null===e||"object"!=typeof e)&&(null===t||"object"!=typeof t))return r?e==t:e==t;if(d(e)&&d(t)&&o(e)===o(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;a=a||{actual:[],expected:[]};var s=a.actual.indexOf(e);return-1!==s&&s===a.expected.indexOf(t)||(a.actual.push(e),a.expected.push(t),b(e,t,r,a))}function g(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function b(e,t,r,n){if(null===e||e===void 0||null===t||t===void 0)return!1;if(v.isPrimitive(e)||v.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=g(e),d=g(t);if(o&&!d||!o&&d)return!1;if(o)return e=I.call(e),t=I.call(t),h(e,t,r);var a=E(e),s=E(t),f,c;if(a.length!==s.length)return!1;for(a.sort(),s.sort(),c=a.length-1;0<=c;c--)if(a[c]!==s[c])return!1;for(c=a.length-1;0<=c;c--)if(f=a[c],!h(e[f],t[f],r,n))return!1;return!0}function y(e,t,r){h(e,t,!0)&&p(e,t,r,"notDeepStrictEqual",y)}function m(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(t){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function _(e){var t;try{e()}catch(r){t=r}return t}function S(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError("\"block\" argument must be a function");"string"==typeof r&&(n=r,r=null),i=_(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&p(i,r,"Missing expected exception"+n);var o="string"==typeof n,d=!e&&v.isError(i),a=!e&&i&&!r;if((d&&o&&m(i,r)||a)&&p(i,r,"Got unwanted exception"+n),e&&i&&r&&!m(i,r)||!e&&i)throw i}var v=e("util/"),k=Object.prototype.hasOwnProperty,I=Array.prototype.slice,x=function(){return"foo"===function(){}.name}(),A=t.exports=l,w=/\s*function\s+([^\(\s]*)\s*/;A.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=a(t),o=n.indexOf("\n"+i);if(0<=o){var d=n.indexOf("\n",o+1);n=n.substring(d+1)}this.stack=n}}},v.inherits(A.AssertionError,Error),A.fail=p,A.ok=l,A.equal=function(e,t,r){e!=t&&p(e,t,r,"==",A.equal)},A.notEqual=function(e,t,r){e==t&&p(e,t,r,"!=",A.notEqual)},A.deepEqual=function(e,t,r){h(e,t,!1)||p(e,t,r,"deepEqual",A.deepEqual)},A.deepStrictEqual=function(e,t,r){h(e,t,!0)||p(e,t,r,"deepStrictEqual",A.deepStrictEqual)},A.notDeepEqual=function(e,t,r){h(e,t,!1)&&p(e,t,r,"notDeepEqual",A.notDeepEqual)},A.notDeepStrictEqual=y,A.strictEqual=function(e,t,r){e!==t&&p(e,t,r,"===",A.strictEqual)},A.notStrictEqual=function(e,t,r){e===t&&p(e,t,r,"!==",A.notStrictEqual)},A.throws=function(e,t,r){S(!0,e,t,r)},A.doesNotThrow=function(e,t,r){S(!1,e,t,r)},A.ifError=function(e){if(e)throw e};var E=Object.keys||function(e){var t=[];for(var r in e)k.call(e,r)&&t.push(r);return t}}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"util/":255}],62:[function(e,t,r){"use strict";function n(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function o(e){return a[63&e>>18]+a[63&e>>12]+a[63&e>>6]+a[63&e]}function d(e,t,r){for(var n=[],d=t,i;d<r;d+=3)i=(e[d]<<16)+(e[d+1]<<8)+e[d+2],n.push(o(i));return n.join("")}r.byteLength=function(e){return 3*e.length/4-n(e)},r.toByteArray=function(e){var t=e.length,r,i,o,d,a;d=n(e),a=new f(3*t/4-d),i=0<d?t-4:t;var c=0;for(r=0;r<i;r+=4)o=s[e.charCodeAt(r)]<<18|s[e.charCodeAt(r+1)]<<12|s[e.charCodeAt(r+2)]<<6|s[e.charCodeAt(r+3)],a[c++]=255&o>>16,a[c++]=255&o>>8,a[c++]=255&o;return 2===d?(o=s[e.charCodeAt(r)]<<2|s[e.charCodeAt(r+1)]>>4,a[c++]=255&o):1===d&&(o=s[e.charCodeAt(r)]<<10|s[e.charCodeAt(r+1)]<<4|s[e.charCodeAt(r+2)]>>2,a[c++]=255&o>>8,a[c++]=255&o),a},r.fromByteArray=function(e){for(var t=e.length,r=t%3,n="",o=[],s=16383,f=0,i=t-r,c;f<i;f+=s)o.push(d(e,f,f+s>i?i:f+s));return 1==r?(c=e[t-1],n+=a[c>>2],n+=a[63&c<<4],n+="=="):2==r&&(c=(e[t-2]<<8)+e[t-1],n+=a[c>>10],n+=a[63&c>>4],n+=a[63&c<<2],n+="="),o.push(n),o.join("")};for(var a=[],s=[],f="undefined"==typeof Uint8Array?Array:Uint8Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,i=c.length;p<i;++p)a[p]=c[p],s[c.charCodeAt(p)]=p;s[45]=62,s[95]=63},{}],63:[function(e,t){var c=function(){"use strict";function e(t,r){return"undefined"==typeof t?e[0]:"undefined"==typeof r?Y(t):10==+r?Y(t):ie(t,r)}function t(e,t){this.value=e,this.sign=t,this.isSmall=!1}function d(e){this.value=e,this.sign=0>e,this.isSmall=!0}function g(e){return-J<e&&e<J}function l(e){return 1e7>e?[e]:1e14>e?[e%1e7,h(e/1e7)]:[e%1e7,h(e/1e7)%1e7,h(e/1e14)]}function y(e){m(e);var t=e.length;return 4>t&&0>j(e,Q)?0===t?0:1===t?e[0]:2===t?e[0]+e[1]*X:e[0]+(e[1]+e[2]*X)*X:e}function m(e){for(var t=e.length;0===e[--t];);e.length=t+1}function n(e){for(var t=Array(e),r=-1;++r<e;)t[r]=0;return t}function _(e){return 0<e?h(e):p(e)}function S(e,t){var n=e.length,o=t.length,d=Array(n),r=0,a=X,s,f;for(f=0;f<o;f++)s=e[f]+t[f]+r,r=s>=a?1:0,d[f]=s-r*a;for(;f<n;)s=e[f]+r,r=s===a?1:0,d[f++]=s-r*a;return 0<r&&d.push(r),d}function k(e,t){return e.length>=t.length?S(e,t):S(t,e)}function I(e,t){var n=e.length,o=Array(n),r=X,d,a;for(a=0;a<n;a++)d=e[a]-r+t,t=h(d/r),o[a]=d-t*r,t+=1;for(;0<t;)o[a++]=t%r,t=h(t/r);return o}function v(e,t){var n=e.length,o=t.length,d=Array(n),r=0,a=X,s,i;for(s=0;s<o;s++)i=e[s]-r-t[s],0>i?(i+=a,r=1):r=0,d[s]=i;for(s=o;s<n;s++){if(i=e[s]-r,0>i)i+=a;else{d[s++]=i;break}d[s]=i}for(;s<n;s++)d[s]=e[s];return m(d),d}function x(e,r,n){var i;return 0<=j(e,r)?i=v(e,r):(i=v(r,e),n=!n),i=y(i),"number"==typeof i?(n&&(i=-i),new d(i)):new t(i,n)}function A(e,n,o){var a=e.length,s=Array(a),f=-n,c=X,p,i;for(p=0;p<a;p++)i=e[p]+f,f=h(i/c),i%=c,s[p]=0>i?i+c:i;return s=y(s),"number"==typeof s?(o&&(s=-s),new d(s)):new t(s,o)}function w(e,t){var o=e.length,d=t.length,a=n(o+d),r=X,s,f,c,i,p;for(c=0;c<o;++c){i=e[c];for(var u=0;u<d;++u)p=t[u],s=i*p+a[c+u],f=h(s/r),a[c+u]=s-f*r,a[c+u+1]+=f}return m(a),a}function E(e,t){var n=e.length,o=Array(n),r=X,d=0,a,s;for(s=0;s<n;s++)a=e[s]*t+d,d=h(a/r),o[s]=a-d*r;for(;0<d;)o[s++]=d%r,d=h(d/r);return o}function P(e,t){for(var n=[];0<t--;)n.push(0);return n.concat(e)}function B(e,t){var r=f(e.length,t.length);if(30>=r)return w(e,t);r=p(r/2);var n=e.slice(r),i=e.slice(0,r),o=t.slice(r),d=t.slice(0,r),a=B(i,d),s=B(n,o),c=B(k(i,n),k(d,o)),u=k(k(a,P(v(v(c,a),s),r)),P(s,2*r));return m(u),u}function O(e,t){return 0<-0.012*e-0.012*t+1.5e-5*e*t}function b(e,r,n){return e<X?new t(E(r,e),n):new t(w(r,l(e)),n)}function a(e){var t=e.length,o=n(t+t),r=X,d,a,s,i,f;for(s=0;s<t;s++){i=e[s];for(var c=0;c<t;c++)f=e[c],d=i*f+o[s+c],a=h(d/r),o[s+c]=d-a*r,o[s+c+1]+=a}return m(o),o}function R(e,t){var r=e.length,o=t.length,d=X,a=n(t.length),s=t[o-1],f=p(d/(2*s)),c=E(e,f),u=E(t,f),b,g,m,_,S,i,l;for(c.length<=r&&c.push(0),u.push(0),s=u[o-1],g=r-o;0<=g;g--){for(b=d-1,c[g+o]!==s&&(b=h((c[g+o]*d+c[g+o-1])/s)),m=0,_=0,i=u.length,S=0;S<i;S++)m+=b*u[S],l=h(m/d),_+=c[g+S]-(m-l*d),m=l,0>_?(c[g+S]=_+d,_=-1):(c[g+S]=_,_=0);for(;0!==_;){for(b-=1,m=0,S=0;S<i;S++)m+=c[g+S]-d+u[S],0>m?(c[g+S]=m+d,m=0):(c[g+S]=m,m=1);_+=m}a[g]=b}return c=N(c,f)[0],[y(a),y(c)]}function T(e,t){for(var r=e.length,n=t.length,i=[],o=[],d=X,a,s,f,c,u;r;){if(o.unshift(e[--r]),m(o),0>j(o,t)){i.push(0);continue}s=o.length,f=o[s-1]*d+o[s-2],c=t[n-1]*d+t[n-2],s>n&&(f=(f+1)*d),a=p(f/c);do{if(u=E(t,a),0>=j(u,o))break;a--}while(a);i.push(a),o=v(o,u)}return i.reverse(),[y(i),y(o)]}function N(e,t){var r=e.length,o=n(r),d,i,a,s;for(a=0,d=r-1;0<=d;--d)s=a*X+e[d],i=_(s/t),a=s-i*t,o[d]=0|i;return[o,0|a]}function C(r,i){var o=Y(i),n=r.value,a=o.value,f,c;if(0===a)throw new Error("Cannot divide by zero");if(r.isSmall)return o.isSmall?[new d(_(n/a)),new d(n%a)]:[e[0],r];if(o.isSmall){if(1===a)return[r,e[0]];if(-1==a)return[r.negate(),e[0]];var p=s(a);if(p<X){f=N(n,p),c=y(f[0]);var u=f[1];return r.sign&&(u=-u),"number"==typeof c?(r.sign!==o.sign&&(c=-c),[new d(c),new d(u)]):[new t(c,r.sign!==o.sign),new d(u)]}a=l(p)}var h=j(n,a);if(-1===h)return[e[0],r];if(0===h)return[e[r.sign===o.sign?1:-1],e[0]];f=200>=n.length+a.length?R(n,a):T(n,a),c=f[0];var b=r.sign!==o.sign,g=f[1],m=r.sign;return"number"==typeof c?(b&&(c=-c),c=new d(c)):c=new t(c,b),"number"==typeof g?(m&&(g=-g),g=new d(g)):g=new t(g,m),[c,g]}function j(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var r=e.length-1;0<=r;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function M(e){var t=e.abs();return!t.isUnit()&&(t.equals(2)||t.equals(3)||t.equals(5)||(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5)?!1:!!t.lesser(25)||void 0))}function U(e){return("number"==typeof e||"string"==typeof e)&&+s(e)<=X||e instanceof t&&1>=e.value.length}function L(e,t,r){t=Y(t);for(var n=e.isNegative(),o=t.isNegative(),d=n?e.not():e,a=o?t.not():t,s=0,f=0,p=null,u=null,l=[];!d.isZero()||!a.isZero();)p=C(d,te),s=p[1].toJSNumber(),n&&(s=te-1-s),u=C(a,te),f=u[1].toJSNumber(),o&&(f=te-1-f),d=p[0],a=u[0],l.push(r(s,f));for(var h=0===r(n?1:0,o?1:0)?c(0):c(-1),b=l.length-1;0<=b;b-=1)h=h.multiply(te).add(c(l[b]));return h}function D(e){var t=e.value,r="number"==typeof t?t|re:t[0]+t[1]*X|ne;return r&-r}function z(e,t){return e=Y(e),t=Y(t),e.greater(t)?e:t}function H(e,t){return e=Y(e),t=Y(t),e.lesser(t)?e:t}function K(r,n){if(r=Y(r).abs(),n=Y(n).abs(),r.equals(n))return r;if(r.isZero())return n;if(n.isZero())return r;for(var i=e[1],o,d;r.isEven()&&n.isEven();)o=u(D(r),D(n)),r=r.divide(o),n=n.divide(o),i=i.multiply(o);for(;r.isEven();)r=r.divide(D(r));do{for(;n.isEven();)n=n.divide(D(n));r.greater(n)&&(d=n,n=r,r=d),n=n.subtract(r)}while(!n.isZero());return i.isUnit()?r:r.multiply(i)}function F(t,r,n){var o=e[0],d=e[1],a;for(a=t.length-1;0<=a;a--)o=o.add(t[a].times(d)),d=d.times(r);return n?o.negate():o}function q(e){var t=e.value;return"number"==typeof t&&(t=[t]),1===t.length&&35>=t[0]?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t[0]):"<"+t+">"}function V(e,t){if(t=c(t),t.isZero()){if(e.isZero())return"0";throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1))return e.isZero()?"0":e.isNegative()?Array(1-e).join("10"):"1"+Array(+e).join("01");var r="";if(e.isNegative()&&t.isPositive()&&(r="-",e=e.abs()),t.equals(1))return e.isZero()?"0":r+Array(+e+1).join(1);for(var i=[],o=e,d;o.isNegative()||0<=o.compareAbs(t);){d=o.divmod(t),o=d.quotient;var a=d.remainder;a.isNegative()&&(a=t.minus(a).abs(),o=o.next()),i.push(q(a))}return i.push(q(o)),r+i.reverse().join("")}function G(e){if(g(+e)){var n=+e;if(n===_(n))return new d(n);throw"Invalid integer: "+e}var i="-"===e[0];i&&(e=e.slice(1));var o=e.split(/e/i);if(2<o.length)throw new Error("Invalid integer: "+o.join("e"));if(2===o.length){var a=o[1];if("+"===a[0]&&(a=a.slice(1)),a=+a,a!==_(a)||!g(a))throw new Error("Invalid integer: "+a+" is not a valid exponent.");var s=o[0],f=s.indexOf(".");if(0<=f&&(a-=s.length-f-1,s=s.slice(0,f)+s.slice(f+1)),0>a)throw new Error("Cannot include negative exponent part for integers");s+=Array(a+1).join("0"),e=s}var c=/^([0-9][0-9]*)$/.test(e);if(!c)throw new Error("Invalid integer: "+e);for(var p=[],r=e.length,u=Z,l=r-u;0<r;)p.push(+e.slice(l,r)),l-=u,0>l&&(l=0),r-=u;return m(p),new t(p,i)}function W(e){if(g(e)){if(e!==_(e))throw new Error(e+" is not an integer.");return new d(e)}return G(e.toString())}function Y(e){return"number"==typeof e?W(e):"string"==typeof e?G(e):e}var X=1e7,Z=7,J=9007199254740992,Q=l(J);t.prototype=Object.create(e.prototype),d.prototype=Object.create(e.prototype),t.prototype.add=function(e){var r=Y(e);if(this.sign!==r.sign)return this.subtract(r.negate());var n=this.value,i=r.value;return r.isSmall?new t(I(n,s(i)),this.sign):new t(k(n,i),this.sign)},t.prototype.plus=t.prototype.add,d.prototype.add=function(e){var r=Y(e),n=this.value;if(0>n!==r.sign)return this.subtract(r.negate());var i=r.value;if(r.isSmall){if(g(n+i))return new d(n+i);i=l(s(i))}return new t(I(i,s(n)),0>n)},d.prototype.plus=d.prototype.add,t.prototype.subtract=function(e){var t=Y(e);if(this.sign!==t.sign)return this.add(t.negate());var r=this.value,n=t.value;return t.isSmall?A(r,s(n),this.sign):x(r,n,this.sign)},t.prototype.minus=t.prototype.subtract,d.prototype.subtract=function(e){var t=Y(e),r=this.value;if(0>r!==t.sign)return this.add(t.negate());var n=t.value;return t.isSmall?new d(r-n):A(n,s(r),0<=r)},d.prototype.minus=d.prototype.subtract,t.prototype.negate=function(){return new t(this.value,!this.sign)},d.prototype.negate=function(){var e=this.sign,t=new d(-this.value);return t.sign=!e,t},t.prototype.abs=function(){return new t(this.value,!1)},d.prototype.abs=function(){return new d(s(this.value))},t.prototype.multiply=function(r){var i=Y(r),n=this.value,o=i.value,d=this.sign!==i.sign,a;if(i.isSmall){if(0===o)return e[0];if(1===o)return this;if(-1===o)return this.negate();if(a=s(o),a<X)return new t(E(n,a),d);o=l(a)}return O(n.length,o.length)?new t(B(n,o),d):new t(w(n,o),d)},t.prototype.times=t.prototype.multiply,d.prototype._multiplyBySmall=function(e){return g(e.value*this.value)?new d(e.value*this.value):b(s(e.value),l(s(this.value)),this.sign!==e.sign)},t.prototype._multiplyBySmall=function(t){return 0===t.value?e[0]:1===t.value?this:-1===t.value?this.negate():b(s(t.value),this.value,this.sign!==t.sign)},d.prototype.multiply=function(e){return Y(e)._multiplyBySmall(this)},d.prototype.times=d.prototype.multiply,t.prototype.square=function(){return new t(a(this.value),!1)},d.prototype.square=function(){var e=this.value*this.value;return g(e)?new d(e):new t(a(l(s(this.value))),!1)},t.prototype.divmod=function(e){var t=C(this,e);return{quotient:t[0],remainder:t[1]}},d.prototype.divmod=t.prototype.divmod,t.prototype.divide=function(e){return C(this,e)[0]},d.prototype.over=d.prototype.divide=t.prototype.over=t.prototype.divide,t.prototype.mod=function(e){return C(this,e)[1]},d.prototype.remainder=d.prototype.mod=t.prototype.remainder=t.prototype.mod,t.prototype.pow=function(t){var r=Y(t),n=this.value,i=r.value,a,s,f;if(0===i)return e[1];if(0===n)return e[0];if(1===n)return e[1];if(-1===n)return r.isEven()?e[1]:e[-1];if(r.sign)return e[0];if(!r.isSmall)throw new Error("The exponent "+r.toString()+" is too large.");if(this.isSmall&&g(a=o(n,i)))return new d(_(a));for(s=this,f=e[1];!0&i&&(f=f.times(s),--i),0!==i;)i/=2,s=s.square();return f},d.prototype.pow=t.prototype.pow,t.prototype.modPow=function(t,n){if(t=Y(t),n=Y(n),n.isZero())throw new Error("Cannot take modPow with modulus 0");for(var i=e[1],r=this.mod(n);t.isPositive();){if(r.isZero())return e[0];t.isOdd()&&(i=i.multiply(r).mod(n)),t=t.divide(2),r=r.square().mod(n)}return i},d.prototype.modPow=t.prototype.modPow,t.prototype.compareAbs=function(e){var t=Y(e),r=this.value,n=t.value;return t.isSmall?1:j(r,n)},d.prototype.compareAbs=function(e){var t=Y(e),r=s(this.value),n=t.value;return t.isSmall?(n=s(n),r===n?0:r>n?1:-1):-1},t.prototype.compare=function(e){if(e===Infinity)return-1;if(e===-Infinity)return 1;var t=Y(e),r=this.value,n=t.value;return this.sign===t.sign?t.isSmall?this.sign?-1:1:j(r,n)*(this.sign?-1:1):t.sign?1:-1},t.prototype.compareTo=t.prototype.compare,d.prototype.compare=function(e){if(e===Infinity)return-1;if(e===-Infinity)return 1;var t=Y(e),r=this.value,n=t.value;return t.isSmall?r==n?0:r>n?1:-1:0>r===t.sign?0>r?1:-1:0>r?-1:1},d.prototype.compareTo=d.prototype.compare,t.prototype.equals=function(e){return 0===this.compare(e)},d.prototype.eq=d.prototype.equals=t.prototype.eq=t.prototype.equals,t.prototype.notEquals=function(e){return 0!==this.compare(e)},d.prototype.neq=d.prototype.notEquals=t.prototype.neq=t.prototype.notEquals,t.prototype.greater=function(e){return 0<this.compare(e)},d.prototype.gt=d.prototype.greater=t.prototype.gt=t.prototype.greater,t.prototype.lesser=function(e){return 0>this.compare(e)},d.prototype.lt=d.prototype.lesser=t.prototype.lt=t.prototype.lesser,t.prototype.greaterOrEquals=function(e){return 0<=this.compare(e)},d.prototype.geq=d.prototype.greaterOrEquals=t.prototype.geq=t.prototype.greaterOrEquals,t.prototype.lesserOrEquals=function(e){return 0>=this.compare(e)},d.prototype.leq=d.prototype.lesserOrEquals=t.prototype.leq=t.prototype.lesserOrEquals,t.prototype.isEven=function(){return 0==(1&this.value[0])},d.prototype.isEven=function(){return 0==(1&this.value)},t.prototype.isOdd=function(){return 1==(1&this.value[0])},d.prototype.isOdd=function(){return 1==(1&this.value)},t.prototype.isPositive=function(){return!this.sign},d.prototype.isPositive=function(){return 0<this.value},t.prototype.isNegative=function(){return this.sign},d.prototype.isNegative=function(){return 0>this.value},t.prototype.isUnit=function(){return!1},d.prototype.isUnit=function(){return 1===s(this.value)},t.prototype.isZero=function(){return!1},d.prototype.isZero=function(){return 0===this.value},t.prototype.isDivisibleBy=function(t){var r=Y(t),n=r.value;return 0!==n&&(1===n||(2===n?this.isEven():this.mod(r).equals(e[0])))},d.prototype.isDivisibleBy=t.prototype.isDivisibleBy,t.prototype.isPrime=function(){var r=M(this);if(void 0!==r)return r;for(var o=this.abs(),n=o.prev(),s=[2,3,5,7,11,13,17,19],a=n,f,d,t,i;a.isEven();)a=a.divide(2);for(t=0;t<s.length;t++)if(i=c(s[t]).modPow(a,o),!(i.equals(e[1])||i.equals(n))){for(d=!0,f=a;d&&f.lesser(n);f=f.multiply(2))i=i.square().mod(o),i.equals(n)&&(d=!1);if(d)return!1}return!0},d.prototype.isPrime=t.prototype.isPrime,t.prototype.isProbablePrime=function(e){var r=M(this);if(void 0!==r)return r;for(var o=this.abs(),n=void 0===e?5:e,t=0,i;t<n;t++)if(i=c.randBetween(2,o.minus(2)),!i.modPow(o.prev(),o).isUnit())return!1;return!0},d.prototype.isProbablePrime=t.prototype.isProbablePrime,t.prototype.modInv=function(e){for(var n=c.zero,t=c.one,i=Y(e),r=this.abs(),o,d,a;!r.equals(c.zero);)o=i.divide(r),d=n,a=i,n=t,i=r,t=d.subtract(o.multiply(t)),r=a.subtract(o.multiply(r));if(!i.equals(1))throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return-1===n.compare(0)&&(n=n.add(e)),this.isNegative()?n.negate():n},d.prototype.modInv=t.prototype.modInv,t.prototype.next=function(){var e=this.value;return this.sign?A(e,1,this.sign):new t(I(e,1),this.sign)},d.prototype.next=function(){var e=this.value;return e+1<J?new d(e+1):new t(Q,!1)},t.prototype.prev=function(){var e=this.value;return this.sign?new t(I(e,1),!0):A(e,1,this.sign)},d.prototype.prev=function(){var e=this.value;return e-1>-J?new d(e-1):new t(Q,!0)};for(var $=[1];2*$[$.length-1]<=X;)$.push(2*$[$.length-1]);var ee=$.length,te=$[ee-1];t.prototype.shiftLeft=function(e){if(!U(e))throw new Error(e+" is too large for shifting.");if(e=+e,0>e)return this.shiftRight(-e);for(var t=this;e>=ee;)t=t.multiply(te),e-=ee-1;return t.multiply($[e])},d.prototype.shiftLeft=t.prototype.shiftLeft,t.prototype.shiftRight=function(e){var t;if(!U(e))throw new Error(e+" is too large for shifting.");if(e=+e,0>e)return this.shiftLeft(-e);for(var r=this;e>=ee;){if(r.isZero())return r;t=C(r,te),r=t[1].isNegative()?t[0].prev():t[0],e-=ee-1}return t=C(r,$[e]),t[1].isNegative()?t[0].prev():t[0]},d.prototype.shiftRight=t.prototype.shiftRight,t.prototype.not=function(){return this.negate().prev()},d.prototype.not=t.prototype.not,t.prototype.and=function(e){return L(this,e,function(e,t){return e&t})},d.prototype.and=t.prototype.and,t.prototype.or=function(e){return L(this,e,function(e,t){return e|t})},d.prototype.or=t.prototype.or,t.prototype.xor=function(e){return L(this,e,function(e,t){return e^t})},d.prototype.xor=t.prototype.xor;var re=1073741824,ne=(X&-X)*(X&-X)|re,ie=function(e,t){for(var n=e.length,o=s(t),a=0,a,i;a<n;a++)if(i=e[a].toLowerCase(),"-"!==i&&/[a-z0-9]/.test(i))if(/[0-9]/.test(i)&&+i>=o){if("1"===i&&1===o)continue;throw new Error(i+" is not a valid digit in base "+t+".")}else if(i.charCodeAt(0)-87>=o)throw new Error(i+" is not a valid digit in base "+t+".");if(2<=t&&36>=t&&n<=36.7368005696771/r(t)){var f=parseInt(e,t);if(isNaN(f))throw new Error(i+" is not a valid digit in base "+t+".");return new d(parseInt(e,t))}t=Y(t);var p=[],u="-"===e[0];for(a=u?1:0;a<e.length;a++){var i=e[a].toLowerCase(),l=i.charCodeAt(0);if(48<=l&&57>=l)p.push(Y(i));else if(97<=l&&122>=l)p.push(Y(i.charCodeAt(0)-87));else if("<"===i){var h=a;do a++;while(">"!==e[a]);p.push(Y(e.slice(h+1,a)))}else throw new Error(i+" is not a valid character")}return F(p,t,u)};t.prototype.toString=function(e){if(void 0===e&&(e=10),10!==e)return V(this,e);for(var t=this.value,r=t.length,n=t[--r]+"",i;0<=--r;)i=t[r]+"",n+="0000000".slice(i.length)+i;var o=this.sign?"-":"";return o+n},d.prototype.toString=function(e){return void 0===e&&(e=10),10==e?this.value+"":V(this,e)},t.prototype.toJSON=d.prototype.toJSON=function(){return this.toString()},t.prototype.valueOf=function(){return+this.toString()},t.prototype.toJSNumber=t.prototype.valueOf,d.prototype.valueOf=function(){return this.value},d.prototype.toJSNumber=d.prototype.valueOf;for(var oe=0;1e3>oe;oe++)e[oe]=new d(oe),0<oe&&(e[-oe]=new d(-oe));return e.one=e[1],e.zero=e[0],e.minusOne=e[-1],e.max=z,e.min=H,e.gcd=K,e.lcm=function(e,t){return e=Y(e).abs(),t=Y(t).abs(),e.divide(K(e,t)).multiply(t)},e.isInstance=function(e){return e instanceof t||e instanceof d},e.randBetween=function(e,r){e=Y(e),r=Y(r);var n=H(e,r),o=z(e,r),a=o.subtract(n).add(1);if(a.isSmall)return n.add(h(Math.random()*a));for(var s=a.value.length-1,f=[],c=!0,p=s;0<=p;p--){var i=c?a.value[p]:X,u=_(Math.random()*i);f.unshift(u),u<i&&(c=!1)}return f=y(f),n.add("number"==typeof f?new d(f):new t(f,!1))},e.fromArray=function(e,t,r){return F(e.map(Y),Y(t||10),r)},e}();"undefined"!=typeof t&&t.hasOwnProperty("exports")&&(t.exports=c),"function"==typeof i&&i.amd&&i("big-integer",[],function(){return c})},{}],64:[function(t,r){(function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){return null!==e&&"object"==typeof e&&Array.isArray(e.words)?e:void(this.sign=!1,this.words=null,this.length=0,this.red=null,("le"===t||"be"===t)&&(r=t,t=10),null!==e&&this._init(e||0,t||10,r||"be"))}function d(e,t,n){for(var o=0,r=u(e.length,n),d=t,i;d<r;d++)i=e.charCodeAt(d)-48,o<<=4,o|=49<=i&&54>=i?i-49+10:17<=i&&22>=i?i-17+10:15&i;return o}function a(e,t,n,o){for(var d=0,r=u(e.length,n),a=t,i;a<r;a++)i=e.charCodeAt(a)-48,d*=o,d+=49<=i?i-49+10:17<=i?i-17+10:i;return d}function s(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).ishln(this.n).isub(this.p),this.tmp=this._tmp()}function c(){s.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function l(){s.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function h(){s.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function b(){s.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else this.m=e,this.prime=null}function y(e){g.call(this,e),this.shift=this.m.bitLength(),0!=this.shift%26&&(this.shift+=26-this.shift%26),this.r=new o(1).ishln(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.sign=!0,this.minv=this.minv.mod(this.r)}"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26,o.prototype._init=function(e,t,r){if("number"==typeof e)return 0>e&&(this.sign=!0,e=-e),void(67108864>e?(this.words=[67108863&e],this.length=1):4503599627370496>e?(this.words=[67108863&e,67108863&e/67108864],this.length=2):(n(9007199254740992>e),this.words=[67108863&e,67108863&e/67108864,1],this.length=3));if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&2<=t&&36>=t),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.sign=!0),this.strip()},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),0>=e.length)return this.words=[0],this.length=1,this;this.length=p(e.length/3),this.words=Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var i=0;if("be"===r)for(var o=e.length-1,d=0,a;0<=o;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[d]|=67108863&a<<i,this.words[d+1]=67108863&a>>>26-i,i+=24,26<=i&&(i-=26,d++);else if("le"===r)for(var o=0,d=0,a;o<e.length;o+=3)a=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[d]|=67108863&a<<i,this.words[d+1]=67108863&a>>>26-i,i+=24,26<=i&&(i-=26,d++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=p((e.length-t)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;for(var n=0,r=e.length-6,i=0,o;r>=t;r-=6)o=d(e,r,r+6),this.words[i]|=67108863&o<<n,this.words[i+1]|=4194303&o>>>26-n,n+=24,26<=n&&(n-=26,i++);if(r+6!==t){var o=d(e,t,r+6);this.words[i]|=67108863&o<<n,this.words[i+1]|=4194303&o>>>26-n}this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,o=1;67108863>=o;o*=t)n++;n--,o=0|o/t;for(var d=e.length-r,s=d%n,f=u(d,d-s)+r,c=0,p=r;p<f;p+=n)c=a(e,p,p+n,t),this.imuln(o),67108864>this.words[0]+c?this.words[0]+=c:this._iaddn(c);if(0!=s){for(var i=1,c=a(e,p,e.length,t),p=0;p<s;p++)i*=t;this.imuln(i),67108864>this.words[0]+c?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.sign=this.sign,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.sign=!1),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],_=[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],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,10000000,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){if(e=e||10,16===e||"hex"===e){for(var o="",d=0,t=0|t||1,a=0,s=0;s<this.length;s++){var i=this.words[s],f=(16777215&(i<<d|a)).toString(16);a=16777215&i>>>24-d,o=0!=a||s!==this.length-1?m[6-f.length]+f+o:f+o,d+=2,26<=d&&(d-=26,s--)}for(0!=a&&(o=a.toString(16)+o);0!=o.length%t;)o="0"+o;return this.sign&&(o="-"+o),o}if(e===(0|e)&&2<=e&&36>=e){var p=_[e],u=S[e],o="",l=this.clone();for(l.sign=!1;0!==l.cmpn(0);){var c=l.modn(u).toString(e);l=l.idivn(u),o=0===l.cmpn(0)?c+o:m[p-c.length]+c+o}return 0===this.cmpn(0)&&(o="0"+o),this.sign&&(o="-"+o),o}n(!1,"Base should be between 2 and 36")},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toArray=function(){this.strip();var e=Array(this.byteLength());e[0]=0;for(var t=this.clone(),r=0,n;0!==t.cmpn(0);r++)n=t.andln(255),t.ishrn(8),e[e.length-r-1]=n;return e},o.prototype._countBits=e?function(t){return 32-e(t)}:function(e){var n=e,t=0;return 4096<=n&&(t+=13,n>>>=13),64<=n&&(t+=7,n>>>=7),8<=n&&(t+=4,n>>>=4),2<=n&&(t+=2,n>>>=2),t+n},o.prototype._zeroBits=function(e){if(0===e)return 26;var n=e,t=0;return 0==(8191&n)&&(t+=13,n>>>=13),0==(127&n)&&(t+=7,n>>>=7),0==(15&n)&&(t+=4,n>>>=4),0==(3&n)&&(t+=2,n>>>=2),0==(1&n)&&t++,t},o.prototype.bitLength=function(){var e=0,t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(0===this.cmpn(0))return 0;for(var e=0,t=0,r;t<this.length&&(r=this._zeroBits(this.words[t]),e+=r,26===r);t++);return e},o.prototype.byteLength=function(){return p(this.bitLength()/8)},o.prototype.neg=function(){if(0===this.cmpn(0))return this.clone();var e=this.clone();return e.sign=!this.sign,e},o.prototype.ior=function(e){for(this.sign=this.sign||e.sign;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]|=e.words[t];return this.strip()},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.iand=function(e){this.sign=this.sign&&e.sign;var t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]&=e.words[r];return this.length=t.length,this.strip()},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.ixor=function(e){this.sign=this.sign||e.sign;var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.setn=function(e,t){n("number"==typeof e&&0<=e);for(var r=0|e/26,i=e%26;this.length<=r;)this.words[this.length++]=0;return t?this.words[r]|=1<<i:this.words[r]&=~(1<<i),this.strip()},o.prototype.iadd=function(e){if(this.sign&&!e.sign){this.sign=!1;var t=this.isub(e);return this.sign=!this.sign,this._normSign()}if(!this.sign&&e.sign){e.sign=!1;var t=this.isub(e);return e.sign=!0,t._normSign()}var r,n;this.length>e.length?(r=this,n=e):(r=e,n=this);for(var o=0,d=0,t;d<n.length;d++)t=r.words[d]+n.words[d]+o,this.words[d]=67108863&t,o=t>>>26;for(;0!=o&&d<r.length;d++){var t=r.words[d]+o;this.words[d]=67108863&t,o=t>>>26}if(this.length=r.length,0!=o)this.words[this.length]=o,this.length++;else if(r!==this)for(;d<r.length;d++)this.words[d]=r.words[d];return this},o.prototype.add=function(e){if(e.sign&&!this.sign){e.sign=!1;var t=this.sub(e);return e.sign=!0,t}if(!e.sign&&this.sign){this.sign=!1;var t=e.sub(this);return this.sign=!0,t}return this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(e.sign){e.sign=!1;var t=this.iadd(e);return e.sign=!0,t._normSign()}if(this.sign)return this.sign=!1,this.iadd(e),this.sign=!0,this._normSign();var r=this.cmp(e);if(0===r)return this.sign=!1,this.length=1,this.words[0]=0,this;var n,o;0<r?(n=this,o=e):(n=e,o=this);for(var d=0,a=0,t;a<o.length;a++)t=n.words[a]-o.words[a]+d,d=t>>26,this.words[a]=67108863&t;for(;0!=d&&a<n.length;a++){var t=n.words[a]+d;d=t>>26,this.words[a]=67108863&t}if(0==d&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=f(this.length,a),n!==this&&(this.sign=!0),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)},o.prototype._smallMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var n=0,o=0;o<t.length-1;o++){for(var d=n>>>26,s=67108863&n,c=u(o,e.length-1),p=f(0,o-this.length+1);p<=c;p++){var l=o-p,i=0|this.words[l],a=0|e.words[p],h=i*a,r=67108863&h;d=0|d+(0|h/67108864),r=0|r+s,s=67108863&r,d=0|d+(r>>>26)}t.words[o]=s,n=d}return 0==n?t.length--:t.words[o]=n,t.strip()},o.prototype._bigMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var n=0,o=0,d=0,s;d<t.length-1;d++){s=o,o=0;for(var c=67108863&n,p=u(d,e.length-1),l=f(0,d-this.length+1);l<=p;l++){var h=d-l,i=0|this.words[h],a=0|e.words[l],b=i*a,r=67108863&b;s=0|s+(0|b/67108864),r=0|r+c,c=67108863&r,s=0|s+(r>>>26),o+=s>>>26,s&=67108863}t.words[d]=c,n=s,s=o}return 0==n?t.length--:t.words[d]=n,t.strip()},o.prototype.mulTo=function(e,t){var r;return r=63>this.length+e.length?this._smallMulTo(e,t):this._bigMulTo(e,t),r},o.prototype.mul=function(e){var t=new o(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},o.prototype.imul=function(e){if(0===this.cmpn(0)||0===e.cmpn(0))return this.words[0]=0,this.length=1,this;var t=this.length,n=e.length;this.sign=e.sign!==this.sign,this.length+=e.length,this.words[this.length-1]=0;for(var o=this.length-2;0<=o;o--){for(var d=0,s=0,c=u(o,n-1),p=f(0,o-t+1);p<=c;p++){var l=o-p,i=this.words[l],a=e.words[p],h=i*a,r=67108863&h;d+=0|h/67108864,r+=s,s=67108863&r,d+=r>>>26}this.words[o]=s,this.words[o+1]+=d,d=0}for(var d=0,l=1,b;l<this.length;l++)b=this.words[l]+d,this.words[l]=67108863&b,d=b>>>26;return this.strip()},o.prototype.imuln=function(e){n("number"==typeof e);for(var t=0,r=0;r<this.length;r++){var i=this.words[r]*e,o=(67108863&i)+(67108863&t);t>>=26,t+=0|i/67108864,t+=o>>>26,this.words[r]=67108863&o}return 0!=t&&(this.words[r]=t,this.length++),this},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.mul(this)},o.prototype.ishln=function(e){n("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26;if(0!=t){for(var o=0,d=0;d<this.length;d++){var i=this.words[d]&67108863>>>26-t<<26-t,a=this.words[d]-i<<t;this.words[d]=a|o,o=i>>>26-t}o&&(this.words[d]=o,this.length++)}if(0!=r){for(var d=this.length-1;0<=d;d--)this.words[d+r]=this.words[d];for(var d=0;d<r;d++)this.words[d]=0;this.length+=r}return this.strip()},o.prototype.ishrn=function(e,t,o){n("number"==typeof e&&0<=e);var d=t?(t-t%26)/26:0;var a=e%26,r=u((e-a)/26,this.length),s=o;if(d-=r,d=f(0,d),s){for(var c=0;c<r;c++)s.words[c]=this.words[c];s.length=r}if(0===r);else if(this.length>r){this.length-=r;for(var c=0;c<this.length;c++)this.words[c]=this.words[c+r]}else this.words[0]=0,this.length=1;for(var i=0,c=this.length-1,p;0<=c&&(0!=i||c>=d);c--)p=this.words[c],this.words[c]=i<<26-a|p>>>a,i=p&(67108863^67108863>>>a<<a);return s&&0!=i&&(s.words[s.length++]=i),0===this.length&&(this.words[0]=0,this.length=1),this.strip(),this},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26;if(this.length<=r)return!1;var i=this.words[r];return!!(i&1<<t)},o.prototype.imaskn=function(e){n("number"==typeof e&&0<=e);var t=e%26,r=(e-t)/26;if(n(!this.sign,"imaskn works only with positive numbers"),0!=t&&r++,this.length=u(r,this.length),0!=t){this.words[this.length-1]&=67108863^67108863>>>t<<t}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),0>e?this.isubn(-e):this.sign?1===this.length&&this.words[0]<e?(this.words[0]=e-this.words[0],this.sign=!1,this):(this.sign=!1,this.isubn(e),this.sign=!0,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&67108864<=this.words[t];t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=f(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),0>e)return this.iaddn(-e);if(this.sign)return this.sign=!1,this.iaddn(e),this.sign=!0,this;this.words[0]-=e;for(var t=0;t<this.length&&0>this.words[t];t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.sign=!1,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,r,o){var d=e.length+o,a;if(this.words.length<d){for(var i=Array(d),a=0;a<this.length;a++)i[a]=this.words[a];this.words=i}else a=this.length;for(this.length=f(this.length,d);a<this.length;a++)this.words[a]=0;for(var t=0,a=0;a<e.length;a++){var s=this.words[a+o]+t,c=e.words[a]*r;s-=67108863&c,t=(s>>26)-(0|c/67108864),this.words[a+o]=67108863&s}for(;a<this.length-o;a++){var s=this.words[a+o]+t;t=s>>26,this.words[a+o]=67108863&s}if(0==t)return this.strip();n(-1==t),t=0;for(var a=0,s;a<this.length;a++)s=-this.words[a]+t,t=s>>26,this.words[a]=67108863&s;return this.sign=!0,this.strip()},o.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),d=e,s=d.words[d.length-1],f=this._countBits(s);r=26-f,0!=r&&(d=d.shln(r),n.ishln(r),s=d.words[d.length-1]);var c=n.length-d.length,p;if("mod"!==t){p=new o(null),p.length=c+1,p.words=Array(p.length);for(var l=0;l<p.length;l++)p.words[l]=0}var i=n.clone()._ishlnsubmul(d,1,c);i.sign||(n=i,p&&(p.words[c]=1));for(var h=c-1,b;0<=h;h--){for(b=67108864*n.words[d.length+h]+n.words[d.length+h-1],b=u(0|b/s,67108863),n._ishlnsubmul(d,b,h);n.sign;)b--,n.sign=!1,n._ishlnsubmul(d,1,h),0!==n.cmpn(0)&&(n.sign=!n.sign);p&&(p.words[h]=b)}return p&&p.strip(),n.strip(),"div"!==t&&0!=r&&n.ishrn(r),{div:p?p:null,mod:n}},o.prototype.divmod=function(e,t){if(n(0!==e.cmpn(0)),this.sign&&!e.sign){var r=this.neg().divmod(e,t),i,d;return"mod"!==t&&(i=r.div.neg()),"div"!==t&&(d=0===r.mod.cmpn(0)?r.mod:e.sub(r.mod)),{div:i,mod:d}}if(!this.sign&&e.sign){var r=this.divmod(e.neg(),t),i;return"mod"!==t&&(i=r.div.neg()),{div:i,mod:r.mod}}return this.sign&&e.sign?this.neg().divmod(e.neg(),t):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div").div},o.prototype.mod=function(e){return this.divmod(e,"mod").mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(0===t.mod.cmpn(0))return t.div;var r=t.div.sign?t.mod.isub(e):t.mod,n=e.shrn(1),i=e.andln(1),o=r.cmp(n);return 0>o||1===i&&0===o?t.div:t.div.sign?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(67108863>=e);for(var t=0,r=this.length-1;0<=r;r--)t=(67108864%e*t+this.words[r])%e;return t},o.prototype.idivn=function(e){n(67108863>=e);for(var t=0,r=this.length-1,i;0<=r;r--)i=this.words[r]+67108864*t,this.words[r]=0|i/e,t=i%e;return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(!e.sign),n(0!==e.cmpn(0));var t=this,r=e.clone();t=t.sign?t.mod(e):t.clone();for(var i=new o(1),d=new o(0),a=new o(0),s=new o(1),f=0;t.isEven()&&r.isEven();)t.ishrn(1),r.ishrn(1),++f;for(var c=r.clone(),p=t.clone();0!==t.cmpn(0);){for(;t.isEven();)t.ishrn(1),i.isEven()&&d.isEven()?(i.ishrn(1),d.ishrn(1)):(i.iadd(c).ishrn(1),d.isub(p).ishrn(1));for(;r.isEven();)r.ishrn(1),a.isEven()&&s.isEven()?(a.ishrn(1),s.ishrn(1)):(a.iadd(c).ishrn(1),s.isub(p).ishrn(1));0<=t.cmp(r)?(t.isub(r),i.isub(a),d.isub(s)):(r.isub(t),a.isub(i),s.isub(d))}return{a:a,b:s,gcd:r.ishln(f)}},o.prototype._invmp=function(e){n(!e.sign),n(0!==e.cmpn(0));var t=this,r=e.clone();t=t.sign?t.mod(e):t.clone();for(var i=new o(1),d=new o(0),a=r.clone();0<t.cmpn(1)&&0<r.cmpn(1);){for(;t.isEven();)t.ishrn(1),i.isEven()?i.ishrn(1):i.iadd(a).ishrn(1);for(;r.isEven();)r.ishrn(1),d.isEven()?d.ishrn(1):d.iadd(a).ishrn(1);0<=t.cmp(r)?(t.isub(r),i.isub(d)):(r.isub(t),d.isub(i))}return 0===t.cmpn(1)?i:d},o.prototype.gcd=function(e){if(0===this.cmpn(0))return e.clone();if(0===e.cmpn(0))return this.clone();var n=this.clone(),i=e.clone();n.sign=!1,i.sign=!1;for(var o=0;n.isEven()&&i.isEven();o++)n.ishrn(1),i.ishrn(1);do{for(;n.isEven();)n.ishrn(1);for(;i.isEven();)i.ishrn(1);var d=n.cmp(i);if(0>d){var r=n;n=i,i=r}else if(0===d||0===i.cmpn(1))break;n.isub(i)}while(!0);return i.ishln(o)},o.prototype.invm=function(e){return this.egcd(e).a.mod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,o=1<<t;if(this.length<=r){for(var d=this.length;d<r+1;d++)this.words[d]=0;return this.words[r]|=o,this.length=r+1,this}for(var i=o,d=r,a;0!=i&&d<this.length;d++)a=this.words[d],a+=i,i=a>>>26,a&=67108863,this.words[d]=a;return 0!=i&&(this.words[d]=i,this.length++),this},o.prototype.cmpn=function(e){var t=0>e;if(t&&(e=-e),this.sign&&!t)return-1;if(!this.sign&&t)return 1;e&=67108863,this.strip();var r;if(1<this.length)r=1;else{var n=this.words[0];r=n===e?0:n<e?-1:1}return this.sign&&(r=-r),r},o.prototype.cmp=function(e){if(this.sign&&!e.sign)return-1;if(!this.sign&&e.sign)return 1;var t=this.ucmp(e);return this.sign?-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;0<=r;r--){var n=this.words[r],i=e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.red=function(e){return new g(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(!this.sign,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};s.prototype._tmp=function(){var e=new o(null);return e.words=Array(p(this.n/13)),e},s.prototype.ireduce=function(e){var t=e,r;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),r=t.bitLength();while(r>this.n);var n=r<this.n?-1:t.ucmp(this.p);return 0===n?(t.words[0]=0,t.length=1):0<n?t.isub(this.p):t.strip(),t},s.prototype.split=function(e,t){e.ishrn(this.n,0,t)},s.prototype.imulK=function(e){return e.imul(this.k)},i(c,s),c.prototype.split=function(e,t){for(var r=4194303,n=u(e.length,9),o=0;o<n;o++)t.words[o]=e.words[o];if(t.length=n,9>=e.length)return e.words[0]=0,void(e.length=1);var i=e.words[9];t.words[t.length++]=i&r;for(var o=10,d;o<e.length;o++)d=e.words[o],e.words[o-10]=(d&r)<<4|i>>>22,i=d;e.words[o-10]=i>>>22,e.length-=9},c.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0,n,i;r<e.length;r++)i=e.words[r],n=64*i,t+=977*i,n+=0|t/67108864,t&=67108863,e.words[r]=t,t=n;return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(l,s),i(h,s),i(b,s),b.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*e.words[r]+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!=t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new c;else if("p224"===e)t=new l;else if("p192"===e)t=new h;else if("p25519"===e)t=new b;else throw new Error("Unknown prime "+e);return v[e]=t,t},g.prototype._verify1=function(e){n(!e.sign,"red works only with positives"),n(e.red,"red works only with red numbers")},g.prototype._verify2=function(e,t){n(!e.sign&&!t.sign,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},g.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.mod(this.m)._forceRed(this)},g.prototype.neg=function(e){var t=e.clone();return t.sign=!t.sign,t.iadd(this.m)._forceRed(this)},g.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r},g.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},g.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.shln(t))},g.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},g.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},g.prototype.isqr=function(e){return this.imul(e,e)},g.prototype.sqr=function(e){return this.mul(e,e)},g.prototype.sqrt=function(e){if(0===e.cmpn(0))return e.clone();var d=this.m.andln(3);if(n(1==d%2),3===d){var a=this.m.add(new o(1)).ishrn(2),f=this.pow(e,a);return f}for(var r=this.m.subn(1),p=0;0!==r.cmpn(0)&&0===r.andln(1);)p++,r.ishrn(1);n(0!==r.cmpn(0));var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).ishrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var g=this.pow(h,r),f=this.pow(e,r.addn(1).ishrn(1)),c=this.pow(e,r),t=p;0!==c.cmp(s);){for(var y=c,m=0;0!==y.cmp(s);m++)y=y.redSqr();n(m<t);var i=this.pow(g,new o(1).ishln(t-m-1));f=f.redMul(i),g=i.redSqr(),c=c.redMul(g),t=m}return f},g.prototype.invm=function(e){var t=e._invmp(this.m);return t.sign?(t.sign=!1,this.imod(t).redNeg()):this.imod(t)},g.prototype.pow=function(e,t){var r=[];if(0===t.cmpn(0))return new o(1);for(var n=t.clone();0!==n.cmpn(0);)r.push(n.andln(1)),n.ishrn(1);for(var d=e,a=0;a<r.length&&!(0!==r[a]);a++,d=this.sqr(d));if(++a<r.length)for(var n=this.sqr(d);a<r.length;a++,n=this.sqr(n))0!==r[a]&&(d=this.mul(d,n));return d},g.prototype.convertTo=function(e){return e.clone()},g.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new y(e)},i(y,g),y.prototype.convertTo=function(e){return this.imod(e.shln(this.shift))},y.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},y.prototype.imul=function(e,r){if(0===e.cmpn(0)||0===r.cmpn(0))return e.words[0]=0,e.length=1,e;var n=e.imul(r),t=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(t).ishrn(this.shift),o=i;return 0<=i.cmp(this.m)?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},y.prototype.mul=function(e,r){if(0===e.cmpn(0)||0===r.cmpn(0))return new o(0)._forceRed(this);var n=e.mul(r),t=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(t).ishrn(this.shift),d=i;return 0<=i.cmp(this.m)?d=i.isub(this.m):0>i.cmpn(0)&&(d=i.iadd(this.m)),d._forceRed(this)},y.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})("undefined"==typeof r||r,this)},{}],65:[function(e,t){function n(e){this.rand=e}var i;if(t.exports=function(e){return i||(i=new n(null)),i.generate(e)},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var r=e("crypto");if("function"!=typeof r.randomBytes)throw new Error("Not supported");n.prototype._rand=function(e){return r.randomBytes(e)}}catch(t){}},{crypto:66}],66:[function(){},{}],67:[function(e,t){function r(e){d.isBuffer(e)||(e=d.from(e));for(var t=0|e.length/4,r=Array(t),n=0;n<t;n++)r[n]=e.readUInt32BE(4*n);return r}function n(e){for(var t=0;t<e.length;e++)e[t]=0}function i(e,t,r,n,i){for(var o=r[0],d=r[1],a=r[2],s=r[3],f=e[0]^t[0],c=e[1]^t[1],p=e[2]^t[2],u=e[3]^t[3],l=4,h=1,b,g,y,m;h<i;h++)b=o[f>>>24]^d[255&c>>>16]^a[255&p>>>8]^s[255&u]^t[l++],g=o[c>>>24]^d[255&p>>>16]^a[255&u>>>8]^s[255&f]^t[l++],y=o[p>>>24]^d[255&u>>>16]^a[255&f>>>8]^s[255&c]^t[l++],m=o[u>>>24]^d[255&f>>>16]^a[255&c>>>8]^s[255&p]^t[l++],f=b,c=g,p=y,u=m;return b=(n[f>>>24]<<24|n[255&c>>>16]<<16|n[255&p>>>8]<<8|n[255&u])^t[l++],g=(n[c>>>24]<<24|n[255&p>>>16]<<16|n[255&u>>>8]<<8|n[255&f])^t[l++],y=(n[p>>>24]<<24|n[255&u>>>16]<<16|n[255&f>>>8]<<8|n[255&c])^t[l++],m=(n[u>>>24]<<24|n[255&f>>>16]<<16|n[255&c>>>8]<<8|n[255&p])^t[l++],b>>>=0,g>>>=0,y>>>=0,m>>>=0,[b,g,y,m]}function o(e){this._key=r(e),this._reset()}var d=e("safe-buffer").Buffer,a=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var e=Array(256),r=0;256>r;r++)e[r]=128>r?r<<1:283^r<<1;for(var n=[],o=[],d=[[],[],[],[]],a=[[],[],[],[]],s=0,f=0,c=0,i;256>c;++c){i=f^f<<1^f<<2^f<<3^f<<4,i=99^(i>>>8^255&i),n[s]=i,o[i]=s;var p=e[s],u=e[p],l=e[u],h=257*e[i]^16843008*i;d[0][s]=h<<24|h>>>8,d[1][s]=h<<16|h>>>16,d[2][s]=h<<8|h>>>24,d[3][s]=h,h=16843009*l^65537*u^257*p^16843008*s,a[0][i]=h<<24|h>>>8,a[1][i]=h<<16|h>>>16,a[2][i]=h<<8|h>>>24,a[3][i]=h,0==s?s=f=1:(s=p^e[e[e[l^p]]],f^=e[e[f]])}return{SBOX:n,INV_SBOX:o,SUB_MIX:d,INV_SUB_MIX:a}}();o.blockSize=16,o.keySize=32,o.prototype.blockSize=o.blockSize,o.prototype.keySize=o.keySize,o.prototype._reset=function(){for(var e=this._key,r=e.length,n=r+6,i=4*(n+1),o=[],d=0;d<r;d++)o[d]=e[d];for(d=r;d<i;d++){var f=o[d-1];0==d%r?(f=f<<8|f>>>24,f=s.SBOX[f>>>24]<<24|s.SBOX[255&f>>>16]<<16|s.SBOX[255&f>>>8]<<8|s.SBOX[255&f],f^=a[0|d/r]<<24):6<r&&4==d%r&&(f=s.SBOX[f>>>24]<<24|s.SBOX[255&f>>>16]<<16|s.SBOX[255&f>>>8]<<8|s.SBOX[255&f]),o[d]=o[d-r]^f}for(var t=[],c=0;c<i;c++){var p=i-c,u=o[p-(c%4?0:4)];t[c]=4>c||4>=p?u:s.INV_SUB_MIX[0][s.SBOX[u>>>24]]^s.INV_SUB_MIX[1][s.SBOX[255&u>>>16]]^s.INV_SUB_MIX[2][s.SBOX[255&u>>>8]]^s.INV_SUB_MIX[3][s.SBOX[255&u]]}this._nRounds=n,this._keySchedule=o,this._invKeySchedule=t},o.prototype.encryptBlockRaw=function(e){return e=r(e),i(e,this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},o.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=d.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},o.prototype.decryptBlock=function(e){e=r(e);var t=e[1];e[1]=e[3],e[3]=t;var n=i(e,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),o=d.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},o.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},t.exports.AES=o},{"safe-buffer":240}],68:[function(e,t){function r(e,t){var r=0;e.length!==t.length&&r++;for(var n=u(e.length,t.length),o=0;o<n;++o)r+=e[o]^t[o];return r}function n(e,t,r){if(12===t.length)return e._finID=d.concat([t,d.from([0,0,0,1])]),d.concat([t,d.from([0,0,0,2])]);var n=new f(r),i=t.length,o=i%16;n.update(t),o&&(o=16-o,n.update(d.alloc(o,0))),n.update(d.alloc(8,0));var a=d.alloc(8);a.writeUIntBE(8*i,0,8),n.update(a),e._finID=n.state;var s=d.from(e._finID);return p(s),s}function i(e,t,r,i){a.call(this);var s=d.alloc(4,0);this._cipher=new o.AES(t);var c=this._cipher.encryptBlock(s);this._ghash=new f(c),r=n(this,r,c),this._prev=d.from(r),this._cache=d.allocUnsafe(0),this._secCache=d.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}var o=e("./aes"),d=e("safe-buffer").Buffer,a=e("cipher-base"),s=e("inherits"),f=e("./ghash"),c=e("buffer-xor"),p=e("./incr32");s(i,a),i.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;16>t&&(t=d.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},i.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&r(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},i.prototype.getAuthTag=function(){if(this._decrypt||!d.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},i.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},i.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=i},{"./aes":67,"./ghash":72,"./incr32":73,"buffer-xor":114,"cipher-base":120,inherits:190,"safe-buffer":240}],69:[function(e,t,r){var n=e("./encrypter"),i=e("./decrypter"),o=e("./modes/list.json");r.createCipher=r.Cipher=n.createCipher,r.createCipheriv=r.Cipheriv=n.createCipheriv,r.createDecipher=r.Decipher=i.createDecipher,r.createDecipheriv=r.Decipheriv=i.createDecipheriv,r.listCiphers=r.getCiphers=function(){return Object.keys(o)}},{"./decrypter":70,"./encrypter":71,"./modes/list.json":81}],70:[function(e,t,r){function n(e,t,r){p.call(this),this._cache=new i,this._last=void 0,this._cipher=new u.AES(t),this._prev=s.from(r),this._mode=e,this._autopadding=!0}function i(){this.cache=s.allocUnsafe(0)}function o(e){for(var t=e[15],r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");return 16===t?void 0:e.slice(0,16-t)}function d(e,t,r){var i=f[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=s.from(r)),"GCM"!==i.mode&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=s.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===i.type?new c(i.module,t,r,!0):"auth"===i.type?new a(i.module,t,r,!0):new n(i.module,t,r)}var a=e("./authCipher"),s=e("safe-buffer").Buffer,f=e("./modes"),c=e("./streamCipher"),p=e("cipher-base"),u=e("./aes"),l=e("evp_bytestokey"),h=e("inherits");h(n,p),n.prototype._update=function(e){this._cache.add(e);for(var t=[],r,n;r=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,r),t.push(n);return s.concat(t)},n.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return o(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},i.prototype.add=function(e){this.cache=s.concat([this.cache,e])},i.prototype.get=function(e){var t;if(e){if(16<this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;}else if(16<=this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=f[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=l(t,!1,r.key,r.iv);return d(e,n.key,n.iv)},r.createDecipheriv=d},{"./aes":67,"./authCipher":68,"./modes":80,"./streamCipher":83,"cipher-base":120,evp_bytestokey:172,inherits:190,"safe-buffer":240}],71:[function(e,t,r){function n(e,t,r){c.call(this),this._cache=new i,this._cipher=new p.AES(t),this._prev=s.from(r),this._mode=e,this._autopadding=!0}function i(){this.cache=s.allocUnsafe(0)}function o(e,t,r){var i=d[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=s.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=s.from(r)),"GCM"!==i.mode&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===i.type?new f(i.module,t,r):"auth"===i.type?new a(i.module,t,r):new n(i.module,t,r)}var d=e("./modes"),a=e("./authCipher"),s=e("safe-buffer").Buffer,f=e("./streamCipher"),c=e("cipher-base"),p=e("./aes"),u=e("evp_bytestokey"),l=e("inherits");l(n,c),n.prototype._update=function(e){this._cache.add(e);for(var t=[],r,n;r=this._cache.get();)n=this._mode.encrypt(this,r),t.push(n);return s.concat(t)};var h=s.alloc(16,16);n.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},i.prototype.add=function(e){this.cache=s.concat([this.cache,e])},i.prototype.get=function(){if(15<this.cache.length){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},i.prototype.flush=function(){for(var e=16-this.cache.length,t=s.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return s.concat([this.cache,t])},r.createCipheriv=o,r.createCipher=function(e,t){var r=d[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return o(e,n.key,n.iv)}},{"./aes":67,"./authCipher":68,"./modes":80,"./streamCipher":83,"cipher-base":120,evp_bytestokey:172,inherits:190,"safe-buffer":240}],72:[function(e,t){function r(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function n(e){var t=o.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function i(e){this.h=e,this.state=o.alloc(16,0),this.cache=o.allocUnsafe(0)}var o=e("safe-buffer").Buffer,d=o.alloc(16,0);i.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},i.prototype._multiply=function(){for(var e=r(this.h),t=[0,0,0,0],o=-1,i,d,a;128>++o;){for(d=0!=(this.state[~~(o/8)]&1<<7-o%8),d&&(t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3]),a=0!=(1&e[3]),i=3;0<i;i--)e[i]=e[i]>>>1|(1&e[i-1])<<31;e[0]>>>=1,a&&(e[0]^=-520093696)}this.state=n(t)},i.prototype.update=function(e){this.cache=o.concat([this.cache,e]);for(var t;16<=this.cache.length;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},i.prototype.final=function(e,t){return this.cache.length&&this.ghash(o.concat([this.cache,d],16)),this.ghash(n([0,e,0,t])),this.state},t.exports=i},{"safe-buffer":240}],73:[function(e,t){t.exports=function(e){for(var t=e.length,r;t--;)if(r=e.readUInt8(t),255===r)e.writeUInt8(0,t);else{r++,e.writeUInt8(r,t);break}}},{}],74:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},{"buffer-xor":114}],75:[function(e,t,r){function n(e,t,r){var n=t.length,d=o(t,e._cache);return e._cache=e._cache.slice(n),e._prev=i.concat([e._prev,r?t:d]),d}var i=e("safe-buffer").Buffer,o=e("buffer-xor");r.encrypt=function(e,t,r){for(var o=i.allocUnsafe(0),d;t.length;)if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=i.allocUnsafe(0)),e._cache.length<=t.length)d=e._cache.length,o=i.concat([o,n(e,t.slice(0,d),r)]),t=t.slice(d);else{o=i.concat([o,n(e,t,r)]);break}return o}},{"buffer-xor":114,"safe-buffer":240}],76:[function(e,t,r){function n(e,t,r){for(var n=-1,i=0,d,a,s;++n<8;)d=e._cipher.encryptBlock(e._prev),a=t&1<<7-n?128:0,s=d[0]^a,i+=(128&s)>>n%8,e._prev=o(e._prev,r?a:s);return i}function o(e,t){var r=e.length,n=-1,i=d.allocUnsafe(e.length);for(e=d.concat([e,d.from([t])]);++n<r;)i[n]=e[n]<<1|e[n+1]>>7;return i}var d=e("safe-buffer").Buffer;r.encrypt=function(e,t,r){for(var o=t.length,a=d.allocUnsafe(o),s=-1;++s<o;)a[s]=n(e,t[s],r);return a}},{"safe-buffer":240}],77:[function(e,t,r){function n(e,t,r){var n=e._cipher.encryptBlock(e._prev),i=n[0]^t;return e._prev=o.concat([e._prev.slice(1),o.from([r?t:i])]),i}var o=e("safe-buffer").Buffer;r.encrypt=function(e,t,r){for(var d=t.length,a=o.allocUnsafe(d),s=-1;++s<d;)a[s]=n(e,t[s],r);return a}},{"safe-buffer":240}],78:[function(e,t,r){function n(e){var t=e._cipher.encryptBlockRaw(e._prev);return i(e._prev),t}var o=e("buffer-xor"),d=e("safe-buffer").Buffer,i=e("../incr32"),a=16;r.encrypt=function(e,t){var r=p(t.length/a),s=e._cache.length;e._cache=d.concat([e._cache,d.allocUnsafe(r*a)]);for(var f=0;f<r;f++){var i=n(e),c=s+f*a;e._cache.writeUInt32BE(i[0],c+0),e._cache.writeUInt32BE(i[1],c+4),e._cache.writeUInt32BE(i[2],c+8),e._cache.writeUInt32BE(i[3],c+12)}var u=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),o(t,u)}},{"../incr32":73,"buffer-xor":114,"safe-buffer":240}],79:[function(e,t,r){r.encrypt=function(e,t){return e._cipher.encryptBlock(t)},r.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],80:[function(e,t){var r={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},n=e("./list.json");for(var i in n)n[i].module=r[n[i].mode];t.exports=n},{"./cbc":74,"./cfb":75,"./cfb1":76,"./cfb8":77,"./ctr":78,"./ecb":79,"./list.json":81,"./ofb":82}],81:[function(e,t){t.exports={"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"}}},{}],82:[function(e,t,r){(function(t){function n(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}var i=e("buffer-xor");r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,n(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),i(r,o)}}).call(this,e("buffer").Buffer)},{buffer:115,"buffer-xor":114}],83:[function(e,t){function r(e,t,r,d){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=d,this._mode=e}var n=e("./aes"),i=e("safe-buffer").Buffer,o=e("cipher-base"),d=e("inherits");d(r,o),r.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},r.prototype._final=function(){this._cipher.scrub()},t.exports=r},{"./aes":67,"cipher-base":120,inherits:190,"safe-buffer":240}],84:[function(e,t,r){function n(e,t,r){if(e=e.toLowerCase(),f[e])return d.createCipheriv(e,t,r);if(s[e])return new a({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function i(e,t,r){if(e=e.toLowerCase(),f[e])return d.createDecipheriv(e,t,r);if(s[e])return new a({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}var o=e("evp_bytestokey"),d=e("browserify-aes/browser"),a=e("browserify-des"),s=e("browserify-des/modes"),f=e("browserify-aes/modes");r.createCipher=r.Cipher=function(e,t){var r,i;if(e=e.toLowerCase(),f[e])r=f[e].key,i=f[e].iv;else if(s[e])r=8*s[e].key,i=s[e].iv;else throw new TypeError("invalid suite type");var d=o(t,!1,r,i);return n(e,d.key,d.iv)},r.createCipheriv=r.Cipheriv=n,r.createDecipher=r.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),f[e])r=f[e].key,n=f[e].iv;else if(s[e])r=8*s[e].key,n=s[e].iv;else throw new TypeError("invalid suite type");var d=o(t,!1,r,n);return i(e,d.key,d.iv)},r.createDecipheriv=r.Decipheriv=i,r.listCiphers=r.getCiphers=function(){return Object.keys(s).concat(d.getCiphers())}},{"browserify-aes/browser":69,"browserify-aes/modes":80,"browserify-des":85,"browserify-des/modes":86,evp_bytestokey:172}],85:[function(e,t){(function(r){function n(e){i.call(this);var t=e.mode.toLowerCase(),n=a[t],o;o=e.decrypt?"decrypt":"encrypt";var d=e.key;("des-ede"===t||"des-ede-cbc"===t)&&(d=r.concat([d,d.slice(0,8)]));var s=e.iv;this._des=n.create({key:d,iv:s,type:o})}var i=e("cipher-base"),o=e("des.js"),d=e("inherits"),a={"des-ede3-cbc":o.CBC.instantiate(o.EDE),"des-ede3":o.EDE,"des-ede-cbc":o.CBC.instantiate(o.EDE),"des-ede":o.EDE,"des-cbc":o.CBC.instantiate(o.DES),"des-ecb":o.DES};a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],t.exports=n,d(n,i),n.prototype._update=function(e){return new r(this._des.update(e))},n.prototype._final=function(){return new r(this._des.final())}}).call(this,e("buffer").Buffer)},{buffer:115,"cipher-base":120,"des.js":146,inherits:190}],86:[function(e,t,r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},{}],87:[function(e,t){(function(r){function n(e){var t=o(e),r=t.toRed(d.mont(e.modulus)).redPow(new d(e.publicExponent)).fromRed();return{blinder:r,unblinder:t.invm(e.modulus)}}function i(e,t){var i=n(t),o=t.modulus.byteLength(),a=d.mont(t.modulus),s=new d(e).mul(i.blinder).umod(t.modulus),f=s.toRed(d.mont(t.prime1)),c=s.toRed(d.mont(t.prime2)),u=t.coefficient,l=t.prime1,p=t.prime2,b=f.redPow(t.exponent1),g=c.redPow(t.exponent2);b=b.fromRed(),g=g.fromRed();var y=b.isub(g).imul(u).umod(l);return y.imul(p),g.iadd(y),new r(g.imul(i.unblinder).umod(t.modulus).toArray(!1,o))}function o(e){for(var t=e.modulus.byteLength(),n=new d(a(t));0<=n.cmp(e.modulus)||!n.umod(e.prime1)||!n.umod(e.prime2);)n=new d(a(t));return n}var d=e("bn.js"),a=e("randombytes");t.exports=i,i.getr=o}).call(this,e("buffer").Buffer)},{"bn.js":88,buffer:115,randombytes:223}],88:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{buffer:66,dup:60}],89:[function(e,t){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":90}],90:[function(e,t){t.exports={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"}}},{}],91:[function(e,t){t.exports={"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"}},{}],92:[function(e,t){(function(r){function n(e){s.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=a(t.hash),this._tag=t.id,this._signType=t.sign}function i(e){s.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=a(t.hash),this._tag=t.id,this._signType=t.sign}function o(e){return new n(e)}function d(e){return new i(e)}var a=e("create-hash"),s=e("stream"),f=e("inherits"),c=e("./sign"),p=e("./verify"),u=e("./algorithms.json");Object.keys(u).forEach(function(e){u[e].id=new r(u[e].id,"hex"),u[e.toLowerCase()]=u[e]}),f(n,s.Writable),n.prototype._write=function(e,t,r){this._hash.update(e),r()},n.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},n.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=c(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},f(i,s.Writable),i.prototype._write=function(e,t,r){this._hash.update(e),r()},i.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},i.prototype.verify=function(e,t,n){"string"==typeof t&&(t=new r(t,n)),this.end();var i=this._hash.digest();return p(t,i,e,this._signType,this._tag)},t.exports={Sign:o,Verify:d,createSign:o,createVerify:d}}).call(this,e("buffer").Buffer)},{"./algorithms.json":90,"./sign":93,"./verify":94,buffer:115,"create-hash":140,inherits:190,stream:249}],93:[function(e,t){(function(n){function r(e,t){var r=g[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new l(r),o=i.keyFromPrivate(t.privateKey),d=o.sign(e);return new n(d.toDER())}function i(e,t,n){for(var i=t.params.priv_key,u=t.params.p,p=t.params.q,l=t.params.g,b=new h(0),r=a(e,p).mod(p),g=!1,s=d(i,p,e,n),y;!1==g;)y=f(p,s,n),b=c(l,y,u,p),g=y.invm(p).imul(r.add(i.mul(b))).mod(p),0===g.cmpn(0)&&(g=!1,b=new h(0));return o(b,g)}function o(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=e.length+t.length+4,i=[48,r,2,e.length];return i=i.concat(e,[2,t.length],t),new n(i)}function d(e,t,r,i){if(e=new n(e.toArray()),e.length<t.byteLength()){var o=new n(t.byteLength()-e.length);o.fill(0),e=n.concat([o,e])}var d=r.length,a=s(r,t),f=new n(d);f.fill(1);var c=new n(d);return c.fill(0),c=p(i,c).update(f).update(new n([0])).update(e).update(a).digest(),f=p(i,c).update(f).digest(),c=p(i,c).update(f).update(new n([1])).update(e).update(a).digest(),f=p(i,c).update(f).digest(),{k:c,v:f}}function a(e,t){var r=new h(e),n=(e.length<<3)-t.bitLength();return 0<n&&r.ishrn(n),r}function s(e,t){e=a(e,t),e=e.mod(t);var r=new n(e.toArray());if(r.length<t.byteLength()){var i=new n(t.byteLength()-r.length);i.fill(0),r=n.concat([i,r])}return r}function f(e,r,i){var o,t;do{for(o=new n(0);8*o.length<e.bitLength();)r.v=p(i,r.k).update(r.v).digest(),o=n.concat([o,r.v]);t=a(o,e),r.k=p(i,r.k).update(r.v).update(new n([0])).digest(),r.v=p(i,r.k).update(r.v).digest()}while(-1!==t.cmp(e));return t}function c(e,t,r,n){return e.toRed(h.mont(r)).redPow(t).fromRed().mod(n)}var p=e("create-hmac"),u=e("browserify-rsa"),l=e("elliptic").ec,h=e("bn.js"),b=e("parse-asn1"),g=e("./curves.json");t.exports=function(e,t,o,d,a){var s=b(t);if(s.curve){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");return r(e,s)}if("dsa"===s.type){if("dsa"!==d)throw new Error("wrong private key type");return i(e,s,o)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");e=n.concat([a,e]);for(var f=s.modulus.byteLength(),c=[0,1];e.length+c.length+1<f;)c.push(255);c.push(0);for(var p=-1;++p<e.length;)c.push(e[p]);var l=u(c,s);return l},t.exports.getKey=d,t.exports.makeKey=f}).call(this,e("buffer").Buffer)},{"./curves.json":91,"bn.js":95,"browserify-rsa":87,buffer:115,"create-hmac":143,elliptic:96,"parse-asn1":204}],94:[function(e,t){(function(r){function n(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new a(n),o=r.data.subjectPrivateKey.data;return i.verify(t,e,o)}function i(e,t,n){var i=n.data.p,a=n.data.q,c=n.data.g,p=n.data.pub_key,u=f.signature.decode(e,"der"),l=u.s,s=u.r;o(l,a),o(s,a);var r=d.mont(i),h=l.invm(a),b=c.toRed(r).redPow(new d(t).mul(h).mod(a)).fromRed().mul(p.toRed(r).redPow(s.mul(h).mod(a)).fromRed()).mod(i).mod(a);return 0===b.cmp(s)}function o(e,t){if(0>=e.cmpn(0))throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}var d=e("bn.js"),a=e("elliptic").ec,f=e("parse-asn1"),s=e("./curves.json");t.exports=function(e,t,o,a,s){var c=f(o);if("ec"===c.type){if("ecdsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong public key type");return n(e,t,c)}if("dsa"===c.type){if("dsa"!==a)throw new Error("wrong public key type");return i(e,t,c)}if("rsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong public key type");t=r.concat([s,t]);for(var p=c.modulus.byteLength(),l=[1],h=0;t.length+l.length+2<p;)l.push(255),h++;l.push(0);for(var b=-1;++b<t.length;)l.push(t[b]);l=new r(l);var g=d.mont(c.modulus);e=new d(e).toRed(g),e=e.redPow(new d(c.publicExponent)),e=new r(e.fromRed().toArray());var y=8>h?1:0;for(p=u(e.length,l.length),e.length!==l.length&&(y=1),b=-1;++b<p;)y|=e[b]^l[b];return 0==y}}).call(this,e("buffer").Buffer)},{"./curves.json":91,"bn.js":95,buffer:115,elliptic:96,"parse-asn1":204}],95:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{buffer:66,dup:60}],96:[function(e,t,r){"use strict";var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":111,"./elliptic/curve":99,"./elliptic/curves":102,"./elliptic/ec":103,"./elliptic/eddsa":106,"./elliptic/utils":110,brorand:65}],97:[function(e,t){"use strict";function r(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,];var r=this.n&&this.p.div(this.n);!r||0<r.cmpn(100)?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function n(e,t){this.curve=e,this.type=t,this.precomputed=null}var i=e("bn.js"),o=e("../../elliptic"),d=o.utils,s=d.getNAF,c=d.getJSF,u=d.assert;t.exports=r,r.prototype.point=function(){throw new Error("Not implemented")},r.prototype.validate=function(){throw new Error("Not implemented")},r.prototype._fixedNafMul=function(e,t){u(e.precomputed);var r=e._getDoubles(),n=s(t,1),o=(1<<r.step+1)-(0==r.step%2?2:1);o/=3;for(var d=[],f=0,c;f<n.length;f+=r.step){c=0;for(var t=f+r.step-1;t>=f;t--)c=(c<<1)+n[t];d.push(c)}for(var p=this.jpoint(null,null,null),a=this.jpoint(null,null,null),l=o;0<l;l--){for(var f=0,c;f<d.length;f++)c=d[f],c===l?a=a.mixedAdd(r.points[f]):c===-l&&(a=a.mixedAdd(r.points[f].neg()));p=p.add(a)}return p.toP()},r.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var o=n.points,d=s(t,r),a=this.jpoint(null,null,null),f=d.length-1;0<=f;f--){for(var t=0;0<=f&&0===d[f];f--)t++;if(0<=f&&t++,a=a.dblp(t),0>f)break;var i=d[f];u(0!==i),a="affine"===e.type?0<i?a.mixedAdd(o[i-1>>1]):a.mixedAdd(o[-i-1>>1].neg()):0<i?a.add(o[i-1>>1]):a.add(o[-i-1>>1].neg())}return"affine"===e.type?a.toP():a},r.prototype._wnafMulAdd=function(e,t,r,n,o){for(var d=this._wnafT1,u=this._wnafT2,l=this._wnafT3,h=0,g=0;g<n;g++){var i=t[g],p=i._getNAFPoints(e);d[g]=p.wnd,u[g]=p.points}for(var g=n-1;1<=g;g-=2){var y=g-1,a=g;if(1!==d[y]||1!==d[a]){l[y]=s(r[y],d[y]),l[a]=s(r[a],d[a]),h=f(l[y].length,h),h=f(l[a].length,h);continue}var b=[t[y],null,null,t[a]];0===t[y].y.cmp(t[a].y)?(b[1]=t[y].add(t[a]),b[2]=t[y].toJ().mixedAdd(t[a].neg())):0===t[y].y.cmp(t[a].y.redNeg())?(b[1]=t[y].toJ().mixedAdd(t[a]),b[2]=t[y].add(t[a].neg())):(b[1]=t[y].toJ().mixedAdd(t[a]),b[2]=t[y].toJ().mixedAdd(t[a].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],_=c(r[y],r[a]);h=f(_[0].length,h),l[y]=Array(h),l[a]=Array(h);for(var S=0;S<h;S++){var v=0|_[0][S],I=0|_[1][S];l[y][S]=m[3*(v+1)+(I+1)],l[a][S]=0,u[y]=b}}for(var x=this.jpoint(null,null,null),A=this._wnafT4,g=h,w;0<=g;g--){for(w=0;0<=g;){for(var k=!0,S=0;S<n;S++)A[S]=0|l[S][g],0!==A[S]&&(k=!1);if(!k)break;w++,g--}if(0<=g&&w++,x=x.dblp(w),0>g)break;for(var S=0;S<n;S++){var E=A[S],i;if(0===E)continue;else 0<E?i=u[S][E-1>>1]:0>E&&(i=u[S][-E-1>>1].neg());x="affine"===i.type?x.mixedAdd(i):x.add(i)}}for(var g=0;g<n;g++)u[g]=null;return o?x:x.toP()},r.BasePoint=n,n.prototype.eq=function(){throw new Error("Not implemented")},n.prototype.validate=function(){return this.curve.validate(this)},r.prototype.decodePoint=function(e,t){e=d.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r){6===e[0]?u(0==e[e.length-1]%2):7===e[0]&&u(1==e[e.length-1]%2);var n=this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));return n}if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},n.prototype.encodeCompressed=function(e){return this.encode(e,!0)},n.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},n.prototype.encode=function(e,t){return d.encode(this._encode(t),e)},n.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},n.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=p((e.bitLength()+1)/t.step)},n.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,o=0;o<t;o+=e){for(var i=0;i<e;i++)n=n.dbl();r.push(n)}return{step:e,points:r}},n.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1==r?null:this.dbl(),o=1;o<r;o++)t[o]=t[o-1].add(n);return{wnd:e,points:t}},n.prototype._getBeta=function(){return null},n.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},{"../../elliptic":96,"bn.js":95}],98:[function(e,t){"use strict";function r(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new d(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new d(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new d(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),f(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function n(e,r,n,i,o){s.BasePoint.call(this,e,"projective"),null===r&&null===n&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new d(r,16),this.y=new d(n,16),this.z=i?new d(i,16):this.curve.one,this.t=o&&new d(o,16),!this.x.red&&(this.x=this.x.toRed(this.curve.red)),!this.y.red&&(this.y=this.y.toRed(this.curve.red)),!this.z.red&&(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),!this.zOne&&(this.t=this.t.redMul(this.z.redInvm()))))}var i=e("../curve"),o=e("../../elliptic"),d=e("bn.js"),a=e("inherits"),s=i.base,f=o.utils.assert;a(r,s),t.exports=r,r.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},r.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},r.prototype.jpoint=function(e,r,n,i){return this.point(e,r,n,i)},r.prototype.pointFromX=function(e,t){e=new d(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},r.prototype.pointFromY=function(e,t){e=new d(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.one),i=r.redMul(this.d).redAdd(this.one),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero))if(t)throw new Error("invalid point");else return this.point(this.zero,e);var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},r.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},a(n,s.BasePoint),r.prototype.pointFromJSON=function(e){return n.fromJSON(this,e)},r.prototype.point=function(e,r,i,o){return new n(this,e,r,i,o)},n.fromJSON=function(e,t){return new n(e,t[0],t[1],t[2])},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},n.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(t),o=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),e=i.redAdd(r),d=e.redSub(n),a=i.redSub(r),s=o.redMul(d),f=e.redMul(a),c=o.redMul(a),p=d.redMul(e);return this.curve.point(s,f,p,c)},n.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),i,o,d;if(this.curve.twisted){var a=this.curve._mulA(r),e=a.redAdd(n);if(this.zOne)i=t.redSub(r).redSub(n).redMul(e.redSub(this.curve.two)),o=e.redMul(a.redSub(n)),d=e.redSqr().redSub(e).redSub(e);else{var s=this.z.redSqr(),f=e.redSub(s).redISub(s);i=t.redSub(r).redISub(n).redMul(f),o=e.redMul(a.redSub(n)),d=e.redMul(f)}}else{var a=r.redAdd(n),s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=a.redSub(s).redSub(s);i=this.curve._mulC(t.redISub(a)).redMul(f),o=this.curve._mulC(a).redMul(r.redISub(n)),d=a.redMul(f)}return this.curve.point(i,o,d)},n.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},n.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),o=this.z.redMul(t.z.redAdd(t.z)),d=n.redSub(r),e=o.redSub(i),a=o.redAdd(i),s=n.redAdd(r),f=d.redMul(e),c=a.redMul(s),p=d.redMul(s),u=e.redMul(a);return this.curve.point(f,c,u,p)},n.prototype._projAdd=function(t){var r=this.z.redMul(t.z),n=r.redSqr(),i=this.x.redMul(t.x),o=this.y.redMul(t.y),d=this.curve.d.redMul(i).redMul(o),e=n.redSub(d),a=n.redAdd(d),s=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(i).redISub(o),f=r.redMul(e).redMul(s),c,p;return this.curve.twisted?(c=r.redMul(a).redMul(o.redSub(this.curve._mulA(i))),p=e.redMul(a)):(c=r.redMul(a).redMul(o.redSub(i)),p=this.curve._mulC(e).redMul(a)),this.curve.point(f,c,p)},n.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},n.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},n.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},n.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},n.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},n.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()},n.prototype.getY=function(){return this.normalize(),this.y.fromRed()},n.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},n.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),0<=n.cmp(this.curve.p))return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},n.prototype.toP=n.prototype.normalize,n.prototype.mixedAdd=n.prototype.add},{"../../elliptic":96,"../curve":99,"bn.js":95,inherits:190}],99:[function(e,t,r){"use strict";var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":97,"./edwards":98,"./mont":100,"./short":101}],100:[function(e,t){"use strict";function r(e){a.call(this,"mont",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function n(e,t,r){a.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(t,16),this.z=new o(r,16),!this.x.red&&(this.x=this.x.toRed(this.curve.red)),!this.z.red&&(this.z=this.z.toRed(this.curve.red)))}var i=e("../curve"),o=e("bn.js"),d=e("inherits"),a=i.base,s=e("../../elliptic"),f=s.utils;d(r,a),t.exports=r,r.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),i=n.redSqrt();return 0===i.redSqr().cmp(n)},d(n,a.BasePoint),r.prototype.decodePoint=function(e,t){return this.point(f.toArray(e,t),1)},r.prototype.point=function(e,t){return new n(this,e,t)},r.prototype.pointFromJSON=function(e){return n.fromJSON(this,e)},n.prototype.precompute=function(){},n.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},n.fromJSON=function(e,t){return new n(e,t[0],t[1]||e.one)},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},n.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=t.redSub(n),o=t.redMul(n),d=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(o,d)},n.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z),d=o.redMul(r),a=i.redMul(n),s=t.z.redMul(d.redAdd(a).redSqr()),f=t.x.redMul(d.redISub(a).redSqr());return this.curve.point(s,f)},n.prototype.mul=function(e){for(var r=e.clone(),t=this,n=this.curve.point(null,null),o=this,d=[];0!==r.cmpn(0);r.iushrn(1))d.push(r.andln(1));for(var a=d.length-1;0<=a;a--)0===d[a]?(t=t.diffAdd(n,o),n=n.dbl()):(n=t.diffAdd(n,o),t=t.dbl());return n},n.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},n.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":96,"../curve":99,"bn.js":95,inherits:190}],101:[function(e,t){"use strict";function r(e){f.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.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(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function n(e,t,r,n){f.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(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 i(e,t,r,n){f.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,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}var o=e("../curve"),d=e("../../elliptic"),a=e("bn.js"),s=e("inherits"),f=o.base,c=d.utils.assert;s(r,f),t.exports=r,r.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=0>n[0].cmp(n[1])?n[0]:n[1],t=t.toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],c(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var o;return o=e.basis?e.basis.map(function(e){return{a:new a(e.a,16),b:new a(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:o}}},r.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r),o=n.redAdd(i).fromRed(),d=n.redSub(i).fromRed();return[o,d]},r.prototype._getEndoBasis=function(e){for(var t=this.n.ushrn(h(this.n.bitLength()/2)),n=e,o=this.n.clone(),d=new a(1),s=new a(0),f=new a(0),c=new a(1),p=0,i,u,l,b,g,m,_,S,r,v;0!==n.cmpn(0);){v=o.div(n),S=o.sub(v.mul(n)),r=f.sub(v.mul(d));var k=c.sub(v.mul(s));if(!l&&0>S.cmp(t))i=_.neg(),u=d,l=S.neg(),b=r;else if(l&&2==++p)break;_=S,o=n,n=S,f=d,d=r,c=s,s=k}g=S.neg(),m=r;var y=l.sqr().add(b.sqr()),I=g.sqr().add(m.sqr());return 0<=I.cmp(y)&&(g=i,m=u),l.negative&&(l=l.neg(),b=b.neg()),g.negative&&(g=g.neg(),m=m.neg()),[{a:l,b:b},{a:g,b:m}]},r.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),d=i.mul(r.a),a=o.mul(n.a),s=i.mul(r.b),f=o.mul(n.b),c=e.sub(d).sub(a),p=s.add(f).neg();return{k1:c,k2:p}},r.prototype.pointFromX=function(e,t){e=new a(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},r.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},r.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,d=0;d<e.length;d++){var i=this._endoSplit(t[d]),a=e[d],s=a._getBeta();i.k1.negative&&(i.k1.ineg(),a=a.neg(!0)),i.k2.negative&&(i.k2.ineg(),s=s.neg(!0)),n[2*d]=a,n[2*d+1]=s,o[2*d]=i.k1,o[2*d+1]=i.k2}for(var f=this._wnafMulAdd(1,n,o,2*d,r),c=0;c<2*d;c++)n[c]=null,o[c]=null;return f},s(n,f.BasePoint),r.prototype.point=function(e,t,r){return new n(this,e,t,r)},r.prototype.pointFromJSON=function(e,t){return n.fromJSON(this,e,t)},n.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},n.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},n.fromJSON=function(e,t,r){function n(t){return e.point(t[0],t[1],r)}"string"==typeof t&&(t=JSON.parse(t));var i=e.point(t[0],t[1],r);if(!t[2])return i;var o=t[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(n))}},i},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return this.inf},n.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},n.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),d=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,d)},n.prototype.getX=function(){return this.x.fromRed()},n.prototype.getY=function(){return this.y.fromRed()},n.prototype.mul=function(e){return e=new a(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},n.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},n.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},n.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},n.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},n.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},s(i,f.BasePoint),r.prototype.jpoint=function(e,t,r){return new i(this,e,t,r)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},i.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),o=e.x.redMul(n),d=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=i.redSub(o),f=d.redSub(a);if(0===s.cmpn(0))return 0===f.cmpn(0)?this.dbl():this.curve.jpoint(null,null,null);var r=s.redSqr(),c=r.redMul(s),p=i.redMul(r),u=f.redSqr().redIAdd(c).redISub(p).redISub(p),l=f.redMul(p.redISub(u)).redISub(d.redMul(c)),h=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(u,l,h)},i.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),o=this.y,d=e.y.redMul(t).redMul(this.z),a=n.redSub(i),s=o.redSub(d);if(0===a.cmpn(0))return 0===s.cmpn(0)?this.dbl():this.curve.jpoint(null,null,null);var r=a.redSqr(),f=r.redMul(a),c=n.redMul(r),p=s.redSqr().redIAdd(f).redISub(c).redISub(c),u=s.redMul(c.redISub(p)).redISub(o.redMul(f)),l=this.z.redMul(a);return this.curve.jpoint(p,u,l)},i.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}for(var n=this.curve.a,i=this.curve.tinv,o=this.x,d=this.y,a=this.z,s=a.redSqr().redSqr(),f=d.redAdd(d),r=0;r<e;r++){var p=o.redSqr(),u=f.redSqr(),l=u.redSqr(),h=p.redAdd(p).redIAdd(p).redIAdd(n.redMul(s)),c=o.redMul(u),b=h.redSqr().redISub(c.redAdd(c)),g=c.redISub(b),y=h.redMul(g);y=y.redIAdd(y).redISub(l);var m=f.redMul(a);r+1<e&&(s=s.redMul(l)),o=b,a=m,f=y}return this.curve.jpoint(o,f.redMul(i),a)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},i.prototype._zeroDbl=function(){var r,n,i;if(this.zOne){var o=this.x.redSqr(),p=this.y.redSqr(),u=p.redSqr(),l=this.x.redAdd(p).redSqr().redISub(o).redISub(u);l=l.redIAdd(l);var s=o.redAdd(o).redIAdd(o),h=s.redSqr().redISub(l).redISub(l),t=u.redIAdd(u);t=t.redIAdd(t),t=t.redIAdd(t),r=h,n=s.redMul(l.redISub(h)).redISub(t),i=this.y.redAdd(this.y)}else{var g=this.x.redSqr(),a=this.y.redSqr(),b=a.redSqr(),c=this.x.redAdd(a).redSqr().redISub(g).redISub(b);c=c.redIAdd(c);var d=g.redAdd(g).redIAdd(g),e=d.redSqr(),f=b.redIAdd(b);f=f.redIAdd(f),f=f.redIAdd(f),r=e.redISub(c).redISub(c),n=d.redMul(c.redISub(r)).redISub(f),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(r,n,i)},i.prototype._threeDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),d=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(i).redISub(d);a=a.redIAdd(a);var s=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),f=s.redSqr().redISub(a).redISub(a);e=f;var t=d.redIAdd(d);t=t.redIAdd(t),t=t.redIAdd(t),r=s.redMul(a.redISub(f)).redISub(t),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),p=this.y.redSqr(),u=this.x.redMul(p),l=this.x.redSub(c).redMul(this.x.redAdd(c));l=l.redAdd(l).redIAdd(l);var h=u.redIAdd(u);h=h.redIAdd(h);var b=h.redAdd(h);e=l.redSqr().redISub(b),n=this.y.redAdd(this.z).redSqr().redISub(p).redISub(c);var g=p.redSqr();g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g),r=l.redMul(h.redISub(e)).redISub(g)}return this.curve.jpoint(e,r,n)},i.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),d=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),s=t.redAdd(t);s=s.redIAdd(s);var f=s.redMul(d),c=a.redSqr().redISub(f.redAdd(f)),p=f.redISub(c),u=d.redSqr();u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u);var l=a.redMul(p).redISub(u),h=r.redAdd(r).redMul(n);return this.curve.jpoint(c,l,h)},i.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var r=this.x.redSqr(),n=this.y.redSqr(),i=this.z.redSqr(),o=n.redSqr(),d=r.redAdd(r).redIAdd(r),a=d.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s),s=s.redAdd(s).redIAdd(s),s=s.redISub(a);var e=s.redSqr(),f=o.redIAdd(o);f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var t=d.redIAdd(s).redSqr().redISub(a).redISub(e).redISub(f),c=n.redMul(t);c=c.redIAdd(c),c=c.redIAdd(c);var p=this.x.redMul(e).redISub(c);p=p.redIAdd(p),p=p.redIAdd(p);var u=this.y.redMul(t.redMul(f.redISub(t)).redISub(s.redMul(e)));u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u);var l=this.z.redAdd(s).redSqr().redISub(i).redISub(e);return this.curve.jpoint(p,u,l)},i.prototype.mul=function(e,t){return e=new a(e,t),this.curve._wnafMul(this,e)},i.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},i.prototype.eqXToP=function(e){var r=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(r);if(0===this.x.cmp(n))return!0;for(var i=e.clone(),o=this.curve.redN.redMul(r);;){if(i.iadd(this.curve.n),0<=i.cmp(this.curve.p))return!1;if(n.redIAdd(o),0===this.x.cmp(n))return!0}return!1},i.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)+">"},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":96,"../curve":99,"bn.js":95,inherits:190}],102:[function(e,t,r){"use strict";function n(e){this.curve="short"===e.type?new a.curve.short(e):"edwards"===e.type?new a.curve.edwards(e):new a.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var r=new n(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:r}),r}})}var o=r,d=e("hash.js"),a=e("../elliptic"),s=a.utils.assert;o.PresetCurve=n,i("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:d.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:d.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:d.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:d.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"]}),i("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:d.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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:d.sha256,gRed:!1,g:["9"]}),i("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:d.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var f;try{f=e("./precomputed/secp256k1")}catch(t){f=void 0}i("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:d.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",f]})},{"../elliptic":96,"./precomputed/secp256k1":109,"hash.js":174}],103:[function(e,t){"use strict";function r(e){return this instanceof r?void("string"==typeof e&&(a(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash):new r(e)}var i=e("bn.js"),n=e("hmac-drbg"),o=e("../../elliptic"),d=o.utils,a=d.assert,s=e("./key"),f=e("./signature");t.exports=r,r.prototype.keyPair=function(e){return new s(this,e)},r.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},r.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},r.prototype.genKeyPair=function(e){e||(e={});var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),d=this.n.sub(new i(2));do{var a=new i(t.generate(r));if(0<a.cmp(d))continue;return a.iaddn(1),this.keyFromPrivate(a)}while(!0)},r.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return 0<r&&(e=e.ushrn(r)),!t&&0<=e.cmp(this.n)?e.sub(this.n):e},r.prototype.sign=function(e,t,o,d){"object"==typeof o&&(d=o,o=null),d||(d={}),t=this.keyFromPrivate(t,o),e=this._truncateToN(new i(e,16));for(var a=this.n.byteLength(),c=t.getPrivate().toArray("be",a),p=e.toArray("be",a),u=new n({hash:this.hash,entropy:c,nonce:p,pers:d.pers,persEnc:d.persEnc||"utf8"}),l=this.n.sub(new i(1)),h=0,b;;h++)if(b=d.k?d.k(h):new i(u.generate(this.n.byteLength())),b=this._truncateToN(b,!0),!(0>=b.cmpn(1)||0<=b.cmp(l))){var g=this.g.mul(b);if(!g.isInfinity()){var y=g.getX(),m=y.umod(this.n);if(0!==m.cmpn(0)){var _=b.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(_=_.umod(this.n),0!==_.cmpn(0)){var S=(g.getY().isOdd()?1:0)|(0===y.cmp(m)?0:2);return d.canonical&&0<_.cmp(this.nh)&&(_=this.n.sub(_),S^=1),new f({r:m,s:_,recoveryParam:S})}}}}},r.prototype.verify=function(e,t,n,o){e=this._truncateToN(new i(e,16)),n=this.keyFromPublic(n,o),t=new f(t,"hex");var d=t.r,r=t.s;if(0>d.cmpn(1)||0<=d.cmp(this.n))return!1;if(0>r.cmpn(1)||0<=r.cmp(this.n))return!1;var a=r.invm(this.n),s=a.mul(e).umod(this.n),c=a.mul(d).umod(this.n);if(!this.curve._maxwellTrick){var u=this.g.mulAdd(s,n.getPublic(),c);return!u.isInfinity()&&0===u.getX().umod(this.n).cmp(d)}var u=this.g.jmulAdd(s,n.getPublic(),c);return!u.isInfinity()&&u.eqXToP(d)},r.prototype.recoverPubKey=function(t,o,d,c){a((3&d)===d,"The recovery param is more than two bits"),o=new f(o,c);var p=this.n,n=new i(t),e=o.r,r=o.s,s=1&d,u=d>>1;if(0<=e.cmp(this.curve.p.umod(this.curve.n))&&u)throw new Error("Unable to find sencond key candinate");e=u?this.curve.pointFromX(e.add(this.curve.n),s):this.curve.pointFromX(e,s);var l=o.r.invm(p),h=p.sub(n).mul(l).umod(p),b=r.mul(l).umod(p);return this.g.mulAdd(h,e,b)},r.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new f(e,n),null!==e.recoveryParam)return e.recoveryParam;for(var o=0;4>o;o++){var i;try{i=this.recoverPubKey(t,e,o)}catch(t){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":96,"./key":104,"./signature":105,"bn.js":95,"hmac-drbg":187}],104:[function(e,t){"use strict";function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var n=e("bn.js"),i=e("../../elliptic"),o=i.utils,d=o.assert;t.exports=r,r.fromPublic=function(e,t,n){return t instanceof r?t:new r(e,{pub:t,pubEnc:n})},r.fromPrivate=function(e,t,n){return t instanceof r?t:new r(e,{priv:t,privEnc:n})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.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"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){return e.x||e.y?("mont"===this.ec.curve.type?d(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&d(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y))):void(this.pub=this.ec.curve.decodePoint(e,t))},r.prototype.derive=function(e){return e.mul(this.priv).getX()},r.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":96,"bn.js":95}],105:[function(e,n){"use strict";function i(e,t){return e instanceof i?e:void(this._importDER(e,t)||(p(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),this.recoveryParam=void 0===e.recoveryParam?null:e.recoveryParam))}function o(){this.place=0}function d(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=0,o=0,i=t.place;o<(15&r);o++,i++)n<<=8,n|=e[i];return t.place=i,n}function a(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0==t?e:e.slice(t)}function f(e,n){if(128>n)return void e.push(n);var i=1+(r(n)/t>>>3);for(e.push(128|i);--i;)e.push(255&n>>>(i<<3));e.push(n)}var c=e("bn.js"),s=e("../../elliptic"),u=s.utils,p=u.assert;n.exports=i,i.prototype._importDER=function(e,t){e=u.toArray(e,t);var n=new o;if(48!==e[n.place++])return!1;var i=d(e,n);if(i+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var a=d(e,n),f=e.slice(n.place,a+n.place);if(n.place+=a,2!==e[n.place++])return!1;var r=d(e,n);if(e.length!==r+n.place)return!1;var p=e.slice(n.place,r+n.place);return 0===f[0]&&128&f[1]&&(f=f.slice(1)),0===p[0]&&128&p[1]&&(p=p.slice(1)),this.r=new c(f),this.s=new c(p),this.recoveryParam=null,!0},i.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=a(t),r=a(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];f(n,t.length),n=n.concat(t),n.push(2),f(n,r.length);var i=n.concat(r),o=[48];return f(o,i.length),o=o.concat(i),u.encode(o,e)}},{"../../elliptic":96,"bn.js":95}],106:[function(e,t){"use strict";function r(e){if(d("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof r))return new r(e);var e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=p(e.n.bitLength()/8),this.hash=n.sha512}var n=e("hash.js"),i=e("../../elliptic"),o=i.utils,d=o.assert,a=o.parseBytes,s=e("./key"),f=e("./signature");t.exports=r,r.prototype.sign=function(e,t){e=a(e);var n=this.keyFromSecret(t),i=this.hashInt(n.messagePrefix(),e),r=this.g.mul(i),o=this.encodePoint(r),d=this.hashInt(o,n.pubBytes(),e).mul(n.priv()),s=i.add(d).umod(this.curve.n);return this.makeSignature({R:r,S:s,Rencoded:o})},r.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S()),d=t.R().add(n.pub().mul(i));return d.eq(o)},r.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},r.prototype.keyFromPublic=function(e){return s.fromPublic(this,e)},r.prototype.keyFromSecret=function(e){return s.fromSecret(this,e)},r.prototype.makeSignature=function(e){return e instanceof f?e:new f(this,e)},r.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},r.prototype.decodePoint=function(e){e=o.parseBytes(e);var t=e.length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},r.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},r.prototype.decodeInt=function(e){return o.intFromLE(e)},r.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../../elliptic":96,"./key":107,"./signature":108,"hash.js":174}],107:[function(e,t){"use strict";function r(e,t){this.eddsa=e,this._secret=d(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=d(t.pub)}var n=e("../../elliptic"),i=n.utils,o=i.assert,d=i.parseBytes,a=i.cachedProperty;r.fromPublic=function(e,t){return t instanceof r?t:new r(e,{pub:t})},r.fromSecret=function(e,t){return t instanceof r?t:new r(e,{secret:t})},r.prototype.secret=function(){return this._secret},a(r,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(r,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(r,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),a(r,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(r,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(r,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),r.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},r.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},r.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),i.encode(this.secret(),e)},r.prototype.getPublic=function(e){return i.encode(this.pubBytes(),e)},t.exports=r},{"../../elliptic":96}],108:[function(e,t){"use strict";function r(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),d(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}var n=e("bn.js"),i=e("../../elliptic"),o=i.utils,d=o.assert,a=o.cachedProperty,s=o.parseBytes;a(r,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),a(r,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),a(r,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),a(r,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),r.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},r.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},t.exports=r},{"../../elliptic":96,"bn.js":95}],109:[function(e,t){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],110:[function(e,t,r){"use strict";var n=r,i=e("bn.js"),o=e("minimalistic-assert"),d=e("minimalistic-crypto-utils");n.assert=o,n.toArray=d.toArray,n.zero2=d.zero2,n.toHex=d.toHex,n.encode=d.encode,n.getNAF=function(e,t){for(var r=[],n=1<<t+1,o=e.clone();0<=o.cmpn(1);){var d;if(o.isOdd()){var a=o.andln(n-1);d=a>(n>>1)-1?(n>>1)-a:a,o.isubn(d)}else d=0;r.push(d);for(var s=0!==o.cmpn(0)&&0===o.andln(n-1)?t+1:1,f=1;f<s;f++)r.push(0);o.iushrn(s)}return r},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;0<e.cmpn(-n)||0<t.cmpn(-i);){var o=3&e.andln(3)+n,d=3&t.andln(3)+i;3==o&&(o=-1),3==d&&(d=-1);var a;if(0==(1&o))a=0;else{var s=7&e.andln(7)+n;a=(3==s||5==s)&&2==d?-o:o}r[0].push(a);var f;if(0==(1&d))f=0;else{var s=7&t.andln(7)+i;f=(3==s||5==s)&&2==o?-d:d}r[1].push(f),2*n===a+1&&(n=1-n),2*i===f+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return this[n]===void 0?this[n]=r.call(this):this[n]}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},{"bn.js":95,"minimalistic-assert":198,"minimalistic-crypto-utils":199}],111:[function(e,t){t.exports={_from:"elliptic@^6.0.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/browserify-sign/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.0.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.0.0",saveSpec:null,fetchSpec:"^6.0.0"},_requiredBy:["/browserify-sign"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_spec:"elliptic@^6.0.0",_where:"/home/emilio/dev/bitcoincashjs/bitcoincashjs/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],112:[function(e,t){for(var r="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",n={},o=0;o<r.length;o++)n[r.charAt(o)]=o;var i=58;t.exports={encode:function(e){if(0===e.length)return"";var t=[0],n,o;for(n=0;n<e.length;n++){for(o=0;o<t.length;o++)t[o]<<=8;t[0]+=e[n];var d=0;for(o=0;o<t.length;++o)t[o]+=d,d=0|t[o]/i,t[o]%=i;for(;d;)t.push(d%i),d=0|d/i}for(n=0;0===e[n]&&n<e.length-1;n++)t.push(0);return t.reverse().map(function(e){return r[e]}).join("")},decode:function(e){if(0===e.length)return[];var t=[0],r,o;for(r=0;r<e.length;r++){var d=e[r];if(!(d in n))throw new Error("Non-base58 character");for(o=0;o<t.length;o++)t[o]*=i;t[0]+=n[d];var a=0;for(o=0;o<t.length;++o)t[o]+=a,a=t[o]>>8,t[o]&=255;for(;a;)t.push(255&a),a>>=8}for(r=0;"1"===e[r]&&r<e.length-1;r++)t.push(0);return t.reverse()}}},{}],113:[function(e,t){t.exports=function(e,t){for(var r=0,n=0;n<e.length&&n!=t.length&&(r=e[n]<t[n]?-1:e[n]>t[n]?1:0,0==r);++n);return 0==r&&(t.length>e.length?r=-1:e.length>t.length&&(r=1)),r}},{}],114:[function(e,t){(function(e){t.exports=function(t,r){for(var n=u(t.length,r.length),o=new e(n),d=0;d<n;++d)o[d]=t[d]^r[d];return o}}).call(this,e("buffer").Buffer)},{buffer:115}],115:[function(e,t,r){"use strict";function d(e){if(e>Q)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(e)}return i(e,t,r)}function i(e,t,r){if("number"==typeof e)throw new TypeError("\"value\" argument must not be a number");return W(e)?h(e,t,r):"string"==typeof e?p(e,t):b(e)}function a(e){if("number"!=typeof e)throw new TypeError("\"size\" argument must be a number");else if(0>e)throw new RangeError("\"size\" argument must not be negative")}function f(e,t,r){return a(e),0>=e?d(e):void 0===t?d(e):"string"==typeof r?d(e).fill(t,r):d(e).fill(t)}function c(e){return a(e),d(0>e?0:0|g(e))}function p(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw new TypeError("\"encoding\" must be a valid string encoding");var r=0|y(e,t),n=d(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function l(e){for(var t=0>e.length?0:0|g(e.length),r=d(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(0>t||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),n.__proto__=s.prototype,n}function b(e){if(s.isBuffer(e)){var t=0|g(e.length),r=d(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(e){if(Y(e)||"length"in e)return"number"!=typeof e.length||X(e.length)?d(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(e){if(e>=Q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q.toString(16)+" bytes");return 0|e}function y(e,t){if(s.isBuffer(e))return e.length;if(Y(e)||W(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(n)return K(e).length;t=(""+t).toLowerCase(),n=!0;}}function m(e,t,r){var n=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),0>=r)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return B(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return P(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0;}}function _(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function S(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:-2147483648>r&&(r=-2147483648),r=+r,X(r)&&(r=i?0:e.length-1),0>r&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(0>r)if(i)r=0;else return-1;if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,o){function d(e,t){return 1==a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,f=t.length;if(void 0!==n&&(n=(n+"").toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(2>e.length||2>t.length)return-1;a=2,s/=2,f/=2,r/=2}var c;if(o){var i=-1;for(c=r;c<s;c++)if(d(e,c)!==d(t,-1==i?0:c-i))-1!=i&&(c-=c-i),i=-1;else if(-1==i&&(i=c),c-i+1===f)return i*a}else for(r+f>s&&(r=s-f),c=r;0<=c;c--){for(var p=!0,u=0;u<f;u++)if(d(e,c+u)!==d(t,u)){p=!1;break}if(p)return c}return-1}function k(e,t,r,n){r=+r||0;var o=e.length-r;n?(n=+n,n>o&&(n=o)):n=o;var d=t.length;if(0!=d%2)throw new TypeError("Invalid hex string");n>d/2&&(n=d/2);for(var a=0,i;a<n;++a){if(i=parseInt(t.substr(2*a,2),16),X(i))return a;e[r+a]=i}return a}function I(e,t,r,n){return G(K(t,e.length-r),e,r,n)}function x(e,t,r,n){return G(F(t),e,r,n)}function A(e,t,r,n){return x(e,t,r,n)}function w(e,t,r,n){return G(V(t),e,r,n)}function E(e,t,r,n){return G(q(t,e.length-r),e,r,n)}function P(e,t,r){return 0===t&&r===e.length?Z.fromByteArray(e):Z.fromByteArray(e.slice(t,r))}function B(e,t,r){r=u(e.length,r);for(var n=[],o=t;o<r;){var i=e[o],d=null,a=239<i?4:223<i?3:191<i?2:1;if(o+a<=r){var s,f,c,p;1==a?128>i&&(d=i):2==a?(s=e[o+1],128==(192&s)&&(p=(31&i)<<6|63&s,127<p&&(d=p))):3==a?(s=e[o+1],f=e[o+2],128==(192&s)&&128==(192&f)&&(p=(15&i)<<12|(63&s)<<6|63&f,2047<p&&(55296>p||57343<p)&&(d=p))):4==a?(s=e[o+1],f=e[o+2],c=e[o+3],128==(192&s)&&128==(192&f)&&128==(192&c)&&(p=(15&i)<<18|(63&s)<<12|(63&f)<<6|63&c,65535<p&&1114112>p&&(d=p))):void 0}null===d?(d=65533,a=1):65535<d&&(d-=65536,n.push(55296|1023&d>>>10),d=56320|1023&d),n.push(d),o+=a}return O(n)}function O(e){var t=e.length;if(t<=$)return n.apply(String,e);for(var r="",o=0;o<t;)r+=n.apply(String,e.slice(o,o+=$));return r}function R(e,t,r){var o="";r=u(e.length,r);for(var d=t;d<r;++d)o+=n(127&e[d]);return o}function T(e,t,r){var o="";r=u(e.length,r);for(var d=t;d<r;++d)o+=n(e[d]);return o}function N(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var o="",d=t;d<r;++d)o+=H(e[d]);return o}function C(e,t,r){for(var o=e.slice(t,r),d="",a=0;a<o.length;a+=2)d+=n(o[a]+256*o[a+1]);return d}function j(e,t,r){if(0!=e%1||0>e)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>i||t<o)throw new RangeError("\"value\" argument is out of bounds");if(r+n>e.length)throw new RangeError("Index out of range")}function U(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function L(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,r,n,52,8),r+8}function z(e){if(e=e.trim().replace(ee,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function H(e){return 16>e?"0"+e.toString(16):e.toString(16)}function K(e,t){t=t||Infinity;for(var r=e.length,n=null,o=[],d=0,i;d<r;++d){if(i=e.charCodeAt(d),55295<i&&57344>i){if(!n){if(56319<i){-1<(t-=3)&&o.push(239,191,189);continue}else if(d+1===r){-1<(t-=3)&&o.push(239,191,189);continue}n=i;continue}if(56320>i){-1<(t-=3)&&o.push(239,191,189),n=i;continue}i=(n-55296<<10|i-56320)+65536}else n&&-1<(t-=3)&&o.push(239,191,189);if(n=null,128>i){if(0>(t-=1))break;o.push(i)}else if(2048>i){if(0>(t-=2))break;o.push(192|i>>6,128|63&i)}else if(65536>i){if(0>(t-=3))break;o.push(224|i>>12,128|63&i>>6,128|63&i)}else if(1114112>i){if(0>(t-=4))break;o.push(240|i>>18,128|63&i>>12,128|63&i>>6,128|63&i)}else throw new Error("Invalid code point")}return o}function F(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function q(e,t){for(var r=[],n=0,i,o,d;n<e.length&&!(0>(t-=2));++n)i=e.charCodeAt(n),o=i>>8,d=i%256,r.push(d),r.push(o);return r}function V(e){return Z.toByteArray(z(e))}function G(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function W(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function Y(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function X(e){return e!==e}var Z=e("base64-js"),J=e("ieee754");r.Buffer=s,r.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},r.INSPECT_MAX_BYTES=50;var Q=2147483647;r.kMaxLength=Q,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,r){return i(e,t,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,r){return f(e,t,r)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=u(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},s.isEncoding=function(e){switch((e+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1;}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError("\"list\" argument must be an Array of Buffers");if(0===e.length)return s.alloc(0);var r;if(t===void 0)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!s.isBuffer(o))throw new TypeError("\"list\" argument must be an Array of Buffers");o.copy(n,i),i+=o.length}return n},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(0!=e%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)_(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(0!=e%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(0!=e%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?B(this,0,e):m.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,r,n,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),0>t||r>e.length||0>n||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var d=o-n,a=r-t,f=u(d,a),c=this.slice(n,o),p=e.slice(t,r),l=0;l<f;++l)if(c[l]!==p[l]){d=c[l],a=p[l];break}return d<a?-1:a<d?1:0},s.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return S(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return S(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-t;if((void 0===r||r>i)&&(r=i),0<e.length&&(0>r||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return k(this,e,t,r);case"utf8":case"utf-8":return I(this,e,t,r);case"ascii":return x(this,e,t,r);case"latin1":case"binary":return A(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0;}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);for(var n=this[e],o=1,d=0;++d<t&&(o*=256);)n+=this[e+d]*o;return n},s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);for(var n=this[e+--t],i=1;0<t&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);for(var n=this[e],d=1,a=0;++a<t&&(d*=256);)n+=this[e+a]*d;return d*=128,n>=d&&(n-=o(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);for(var n=t,i=1,d=this[e+--n];0<n&&(i*=256);)d+=this[e+--n]*i;return i*=128,d>=i&&(d-=o(2,8*t)),d},s.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||j(e,4,this.length),J.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),J.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),J.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),J.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var d=o(2,8*r)-1;M(this,e,t,r,d,0)}var a=1,s=0;for(this[t]=255&e;++s<r&&(a*=256);)this[t+s]=255&e/a;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var d=o(2,8*r)-1;M(this,e,t,r,d,0)}var a=r-1,i=1;for(this[t+a]=255&e;0<=--a&&(i*=256);)this[t+a]=255&e/i;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var d=o(2,8*r-1);M(this,e,t,r,d-1,-d)}var a=0,i=1,s=0;for(this[t]=255&e;++a<r&&(i*=256);)0>e&&0==s&&0!==this[t+a-1]&&(s=1),this[t+a]=255&(e/i>>0)-s;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var d=o(2,8*r-1);M(this,e,t,r,d-1,-d)}var a=r-1,i=1,s=0;for(this[t+a]=255&e;0<=--a&&(i*=256);)0>e&&0==s&&0!==this[t+a+1]&&(s=1),this[t+a]=255&(e/i>>0)-s;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),0>e&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),0<n&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r,d;if(this===e&&r<t&&t<n)for(d=o-1;0<=d;--d)e[d+t]=this[d+r];else if(1e3>o)for(d=0;d<o;++d)e[d+t]=this[d+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);256>o&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(0>t||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=r===void 0?this.length:r>>>0,e||(e=0);var d;if("number"==typeof e)for(d=t;d<r;++d)this[d]=e;else{var i=s.isBuffer(e)?e:new s(e,n),a=i.length;for(d=0;d<r-t;++d)this[d+t]=i[d%a]}return this};var ee=/[^+/0-9A-Za-z-_]/g},{"base64-js":62,ieee754:188}],116:[function(e,t){const r=e("./ensure"),n={0:15,2:10,3:17,4:21,5:20,6:26,7:30,8:7,9:5,q:0,p:1,z:2,r:3,y:4,x:6,g:8,f:9,t:11,v:12,d:13,w:14,s:16,j:18,n:19,k:22,h:23,c:24,e:25,m:27,u:28,a:29,l:31};t.exports={encode:function(e){r(e instanceof Array,`Invalid data: ${e}.`);let t="";for(const n of e)r(0<=n&&32>n,`Invalid value: ${n}.`),t+="qpzry9x8gf2tvdw0s3jn54khce6mua7l"[n];return t},decode:function(e){r("string"==typeof e,`Invalid base32-encoded string: ${e}.`);let t=[];for(const i of e)r(i in n,`Invalid value: ${i}.`),t.push(n[i]);return t}}},{"./ensure":119}],117:[function(e,t){function r(e){let t=!1,r=!1;for(const n of e)if(t=t||n!==n.toUpperCase(),r=r||n!==n.toLowerCase(),t&&r)return!1;return!0}function n(e){switch(e){case"P2PKH":return 0;case"P2SH":return 8;default:throw new Error(`Invalid type: ${e}.`);}}function i(e){switch(120&e){case 0:return"P2PKH";case 8:return"P2SH";default:throw new Error(`Invalid address type in version byte: ${e}.`);}}function o(e){switch(8*e.length){case 160:return 0;case 192:return 1;case 224:return 2;case 256:return 3;case 320:return 4;case 384:return 5;case 448:return 6;case 512:return 7;default:throw new Error(`Invalid hash size: ${e.length}.`);}}function d(e){switch(7&e){case 0:return 160;case 1:return 192;case 2:return 224;case 3:return 256;case 4:return 320;case 5:return 384;case 6:return 448;case 7:return 512;}}function a(e){const t=[];for(const r of e)t.push(31&r.charCodeAt(0));return t}function s(e){const t=[];for(let r=0;8>r;++r)t.push(e.and(31).toJSNumber()),e=e.shiftRight(5);return t.reverse()}function f(e,t){const r=a(e).concat([0]);return c(r.concat(t)).equals(0)}function c(e){const t=[656907472481,522768456162,1044723512260,748107326120,130178868336];let r=p(1);for(let n of e){let e=r.shiftRight(35);r=r.and(34359738367).shiftLeft(5).xor(n);for(let n=0;n<t.length;++n)e.shiftRight(n).and(1).equals(1)&&(r=r.xor(t[n]))}return r.xor(1)}const p=e("big-integer"),u=e("./ensure"),l=e("./base32"),h=e("./convertBits");t.exports={encode:function(e,t,r){u("string"==typeof e,`Invalid prefix: ${e}.`),u("string"==typeof t,`Invalid type: ${t}.`),u(r instanceof Array,`Invalid hash: ${r}.`);const i=a(e).concat([0]),d=n(t)+o(r),f=h([d].concat(r),8,5),p=i.concat(f).concat(Array(8).fill(0)),b=f.concat(s(c(p)));return`${e}:${l.encode(b)}`},decode:function(e){u("string"==typeof e,`Invalid address: ${e}.`);const t=e.split(":");u(2===t.length,`Missing prefix: ${e}.`);const n=t[0],o=t[1];u(r(o),`Mixed case in address payload: ${o}.`);const a=l.decode(o.toLowerCase());u(f(n,a),`Invalid checksum: ${e}.`);const[s,...c]=h(a.slice(0,-8),5,8,!0);u(d(s)===8*c.length,`Invalid hash size: ${e}.`);const p=i(s);return{prefix:n,type:p,hash:c}}}},{"./base32":116,"./convertBits":118,"./ensure":119,"big-integer":63}],118:[function(e,t){t.exports=(e,t,r,n=!1)=>{let i=0,o=0,d=[];const a=(1<<r)-1;for(const s of e){if(0>s||0!=s>>t)throw new Error(`Invalid value: ${s}.`);for(i=i<<t|s,o+=t;o>=r;)o-=r,d.push(i>>o&a)}if(!n)0<o&&d.push(i<<r-o&a);else if(o>=t||i<<r-o&a)throw new Error("Conversion requires padding but strict mode was used.");return d}},{}],119:[function(e,t){t.exports=(e,t)=>{if(!e)throw new Error(t)}},{}],120:[function(e,t){function r(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}var n=e("safe-buffer").Buffer,i=e("stream").Transform,o=e("string_decoder").StringDecoder,d=e("inherits");d(r,i),r.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},r.prototype.setAutoPadding=function(){},r.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},r.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},r.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},r.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(t){n=t}finally{r(n)}},r.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)},r.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},r.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},t.exports=r},{inherits:190,"safe-buffer":240,stream:249,string_decoder:250}],121:[function(e,t,r){(function(e){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(r){return"[object Error]"===t(r)||r instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":191}],122:[function(e,t){(function(r){function n(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new o.ec(this.curveType.name),this.keys=void 0}function i(e,t,n){Array.isArray(e)||(e=e.toArray());var i=new r(e);if(n&&i.length<n){var o=new r(n-i.length);o.fill(0),i=r.concat([o,i])}return t?i.toString(t):i}var o=e("elliptic"),d=e("bn.js");t.exports=function(e){return new n(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,n.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},n.prototype.computeSecret=function(e,t,n){t=t||"utf8",r.isBuffer(e)||(e=new r(e,t));var o=this.curve.keyFromPublic(e).getPublic(),d=o.mul(this.keys.getPrivate()).getX();return i(d,n,this.curveType.byteLength)},n.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),i(r,e)},n.prototype.getPrivateKey=function(e){return i(this.keys.getPrivate(),e)},n.prototype.setPublicKey=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.keys._importPublic(e),this},n.prototype.setPrivateKey=function(e,t){t=t||"utf8",r.isBuffer(e)||(e=new r(e,t));var n=new d(e);return n=n.toString(16),this.keys._importPrivate(n),this}}).call(this,e("buffer").Buffer)},{"bn.js":123,buffer:115,elliptic:124}],123:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{buffer:66,dup:60}],124:[function(e,t,r){arguments[4][96][0].apply(r,arguments)},{"../package.json":139,"./elliptic/curve":127,"./elliptic/curves":130,"./elliptic/ec":131,"./elliptic/eddsa":134,"./elliptic/utils":138,brorand:65,dup:96}],125:[function(e,t,r){arguments[4][97][0].apply(r,arguments)},{"../../elliptic":124,"bn.js":123,dup:97}],126:[function(e,t,r){arguments[4][98][0].apply(r,arguments)},{"../../elliptic":124,"../curve":127,"bn.js":123,dup:98,inherits:190}],127:[function(e,t,r){arguments[4][99][0].apply(r,arguments)},{"./base":125,"./edwards":126,"./mont":128,"./short":129,dup:99}],128:[function(e,t,r){arguments[4][100][0].apply(r,arguments)},{"../../elliptic":124,"../curve":127,"bn.js":123,dup:100,inherits:190}],129:[function(e,t,r){arguments[4][101][0].apply(r,arguments)},{"../../elliptic":124,"../curve":127,"bn.js":123,dup:101,inherits:190}],130:[function(e,t,r){arguments[4][102][0].apply(r,arguments)},{"../elliptic":124,"./precomputed/secp256k1":137,dup:102,"hash.js":174}],131:[function(e,t,r){arguments[4][103][0].apply(r,arguments)},{"../../elliptic":124,"./key":132,"./signature":133,"bn.js":123,dup:103,"hmac-drbg":187}],132:[function(e,t,r){arguments[4][104][0].apply(r,arguments)},{"../../elliptic":124,"bn.js":123,dup:104}],133:[function(e,t,r){arguments[4][105][0].apply(r,arguments)},{"../../elliptic":124,"bn.js":123,dup:105}],134:[function(e,t,r){arguments[4][106][0].apply(r,arguments)},{"../../elliptic":124,"./key":135,"./signature":136,dup:106,"hash.js":174}],135:[function(e,t,r){arguments[4][107][0].apply(r,arguments)},{"../../elliptic":124,dup:107}],136:[function(e,t,r){arguments[4][108][0].apply(r,arguments)},{"../../elliptic":124,"bn.js":123,dup:108}],137:[function(e,t,r){arguments[4][109][0].apply(r,arguments)},{dup:109}],138:[function(e,t,r){arguments[4][110][0].apply(r,arguments)},{"bn.js":123,dup:110,"minimalistic-assert":198,"minimalistic-crypto-utils":199}],139:[function(e,t){t.exports={_from:"elliptic@^6.0.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/create-ecdh/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.0.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.0.0",saveSpec:null,fetchSpec:"^6.0.0"},_requiredBy:["/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_spec:"elliptic@^6.0.0",_where:"/home/emilio/dev/bitcoincashjs/bitcoincashjs/node_modules/create-ecdh",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],140:[function(e,t){(function(n){"use strict";function r(e){f.call(this,"digest"),this._hash=e,this.buffers=[]}function i(e){f.call(this,"digest"),this._hash=e}var o=e("inherits"),d=e("./md5"),a=e("ripemd160"),s=e("sha.js"),f=e("cipher-base");o(r,f),r.prototype._update=function(e){this.buffers.push(e)},r.prototype._final=function(){var e=n.concat(this.buffers),t=this._hash(e);return this.buffers=null,t},o(i,f),i.prototype._update=function(e){this._hash.update(e)},i.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return e=e.toLowerCase(),"md5"===e?new r(d):"rmd160"===e||"ripemd160"===e?new i(new a()):new i(s(e))}}).call(this,e("buffer").Buffer)},{"./md5":142,buffer:115,"cipher-base":120,inherits:190,ripemd160:239,"sha.js":242}],141:[function(e,t){(function(e){"use strict";function r(t){if(0!=t.length%n){var r=t.length+(n-t.length%n);t=e.concat([t,i],r)}for(var o=Array(t.length>>>2),d=0,a=0;d<t.length;d+=n,a++)o[a]=t.readInt32LE(d);return o}var n=4,i=new e(n);i.fill(0);t.exports=function(t,n){var o=n(r(t),t.length*8);t=new e(16);for(var d=0;d<o.length;d++)t.writeInt32LE(o[d],d<<2,!0);return t}}).call(this,e("buffer").Buffer)},{buffer:115}],142:[function(e,t){"use strict";function r(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,a=-1732584194,c=271733878,d=0;d<e.length;d+=16){var i=r,l=n,h=a,b=c;r=o(r,n,a,c,e[d+0],7,-680876936),c=o(c,r,n,a,e[d+1],12,-389564586),a=o(a,c,r,n,e[d+2],17,606105819),n=o(n,a,c,r,e[d+3],22,-1044525330),r=o(r,n,a,c,e[d+4],7,-176418897),c=o(c,r,n,a,e[d+5],12,1200080426),a=o(a,c,r,n,e[d+6],17,-1473231341),n=o(n,a,c,r,e[d+7],22,-45705983),r=o(r,n,a,c,e[d+8],7,1770035416),c=o(c,r,n,a,e[d+9],12,-1958414417),a=o(a,c,r,n,e[d+10],17,-42063),n=o(n,a,c,r,e[d+11],22,-1990404162),r=o(r,n,a,c,e[d+12],7,1804603682),c=o(c,r,n,a,e[d+13],12,-40341101),a=o(a,c,r,n,e[d+14],17,-1502002290),n=o(n,a,c,r,e[d+15],22,1236535329),r=s(r,n,a,c,e[d+1],5,-165796510),c=s(c,r,n,a,e[d+6],9,-1069501632),a=s(a,c,r,n,e[d+11],14,643717713),n=s(n,a,c,r,e[d+0],20,-373897302),r=s(r,n,a,c,e[d+5],5,-701558691),c=s(c,r,n,a,e[d+10],9,38016083),a=s(a,c,r,n,e[d+15],14,-660478335),n=s(n,a,c,r,e[d+4],20,-405537848),r=s(r,n,a,c,e[d+9],5,568446438),c=s(c,r,n,a,e[d+14],9,-1019803690),a=s(a,c,r,n,e[d+3],14,-187363961),n=s(n,a,c,r,e[d+8],20,1163531501),r=s(r,n,a,c,e[d+13],5,-1444681467),c=s(c,r,n,a,e[d+2],9,-51403784),a=s(a,c,r,n,e[d+7],14,1735328473),n=s(n,a,c,r,e[d+12],20,-1926607734),r=f(r,n,a,c,e[d+5],4,-378558),c=f(c,r,n,a,e[d+8],11,-2022574463),a=f(a,c,r,n,e[d+11],16,1839030562),n=f(n,a,c,r,e[d+14],23,-35309556),r=f(r,n,a,c,e[d+1],4,-1530992060),c=f(c,r,n,a,e[d+4],11,1272893353),a=f(a,c,r,n,e[d+7],16,-155497632),n=f(n,a,c,r,e[d+10],23,-1094730640),r=f(r,n,a,c,e[d+13],4,681279174),c=f(c,r,n,a,e[d+0],11,-358537222),a=f(a,c,r,n,e[d+3],16,-722521979),n=f(n,a,c,r,e[d+6],23,76029189),r=f(r,n,a,c,e[d+9],4,-640364487),c=f(c,r,n,a,e[d+12],11,-421815835),a=f(a,c,r,n,e[d+15],16,530742520),n=f(n,a,c,r,e[d+2],23,-995338651),r=p(r,n,a,c,e[d+0],6,-198630844),c=p(c,r,n,a,e[d+7],10,1126891415),a=p(a,c,r,n,e[d+14],15,-1416354905),n=p(n,a,c,r,e[d+5],21,-57434055),r=p(r,n,a,c,e[d+12],6,1700485571),c=p(c,r,n,a,e[d+3],10,-1894986606),a=p(a,c,r,n,e[d+10],15,-1051523),n=p(n,a,c,r,e[d+1],21,-2054922799),r=p(r,n,a,c,e[d+8],6,1873313359),c=p(c,r,n,a,e[d+15],10,-30611744),a=p(a,c,r,n,e[d+6],15,-1560198380),n=p(n,a,c,r,e[d+13],21,1309151649),r=p(r,n,a,c,e[d+4],6,-145523070),c=p(c,r,n,a,e[d+11],10,-1120210379),a=p(a,c,r,n,e[d+2],15,718787259),n=p(n,a,c,r,e[d+9],21,-343485551),r=u(r,i),n=u(n,l),a=u(a,h),c=u(c,b)}return[r,n,a,c]}function n(e,r,n,o,d,a){return u(i(u(u(r,e),u(o,a)),d),n)}function o(e,r,i,o,d,a,s){return n(r&i|~r&o,e,r,d,a,s)}function s(e,r,i,o,a,f,s){return n(r&o|i&~o,e,r,a,f,s)}function f(e,r,i,o,d,a,s){return n(r^i^o,e,r,d,a,s)}function p(e,r,i,o,a,f,s){return n(i^(r|~o),e,r,a,f,s)}function u(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t){return e<<t|e>>>32-t}var d=e("./make-hash");t.exports=function(e){return d(e,r)}},{"./make-hash":141}],143:[function(e,t){"use strict";function r(e,t){o.call(this,"digest"),"string"==typeof t&&(t=d.from(t));var r="sha512"===e||"sha384"===e?128:64;if(this._alg=e,this._key=t,t.length>r){var n="rmd160"===e?new s:f(e);t=n.update(t).digest()}else t.length<r&&(t=d.concat([t,c],r));for(var a=this._ipad=d.allocUnsafe(r),p=this._opad=d.allocUnsafe(r),u=0;u<r;u++)a[u]=54^t[u],p[u]=92^t[u];this._hash="rmd160"===e?new s:f(e),this._hash.update(a)}var n=e("inherits"),i=e("./legacy"),o=e("cipher-base"),d=e("safe-buffer").Buffer,a=e("create-hash/md5"),s=e("ripemd160"),f=e("sha.js"),c=d.alloc(128);n(r,o),r.prototype._update=function(e){this._hash.update(e)},r.prototype._final=function(){var e=this._hash.digest(),t="rmd160"===this._alg?new s:f(this._alg);return t.update(this._opad).update(e).digest()},t.exports=function(e,t){return e=e.toLowerCase(),"rmd160"===e||"ripemd160"===e?new r("rmd160",t):"md5"===e?new i(a,t):new r(e,t)}},{"./legacy":144,"cipher-base":120,"create-hash/md5":142,inherits:190,ripemd160:239,"safe-buffer":240,"sha.js":242}],144:[function(e,t){"use strict";function r(e,t){d.call(this,"digest"),"string"==typeof t&&(t=o.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=o.concat([t,a],s));for(var r=this._ipad=o.allocUnsafe(s),n=this._opad=o.allocUnsafe(s),f=0;f<s;f++)r[f]=54^t[f],n[f]=92^t[f];this._hash=[r]}var n=e("inherits"),o=e("safe-buffer").Buffer,d=e("cipher-base"),a=o.alloc(128),s=64;n(r,d),r.prototype._update=function(e){this._hash.push(e)},r.prototype._final=function(){var e=this._alg(o.concat(this._hash));return this._alg(o.concat([this._opad,e]))},t.exports=r},{"cipher-base":120,inherits:190,"safe-buffer":240}],145:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var n=e("browserify-sign/algos"),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);r.getHashes=function(){return o};var d=e("pbkdf2");r.pbkdf2=d.pbkdf2,r.pbkdf2Sync=d.pbkdf2Sync;var a=e("browserify-cipher");r.Cipher=a.Cipher,r.createCipher=a.createCipher,r.Cipheriv=a.Cipheriv,r.createCipheriv=a.createCipheriv,r.Decipher=a.Decipher,r.createDecipher=a.createDecipher,r.Decipheriv=a.Decipheriv,r.createDecipheriv=a.createDecipheriv,r.getCiphers=a.getCiphers,r.listCiphers=a.listCiphers;var s=e("diffie-hellman");r.DiffieHellmanGroup=s.DiffieHellmanGroup,r.createDiffieHellmanGroup=s.createDiffieHellmanGroup,r.getDiffieHellman=s.getDiffieHellman,r.createDiffieHellman=s.createDiffieHellman,r.DiffieHellman=s.DiffieHellman;var f=e("browserify-sign");r.createSign=f.createSign,r.Sign=f.Sign,r.createVerify=f.createVerify,r.Verify=f.Verify,r.createECDH=e("create-ecdh");var c=e("public-encrypt");r.publicEncrypt=c.publicEncrypt,r.privateEncrypt=c.privateEncrypt,r.publicDecrypt=c.publicDecrypt,r.privateDecrypt=c.privateDecrypt;var p=e("randomfill");r.randomFill=p.randomFill,r.randomFillSync=p.randomFillSync,r.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/crypto-browserify/crypto-browserify")},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":84,"browserify-sign":92,"browserify-sign/algos":89,"create-ecdh":122,"create-hash":140,"create-hmac":143,"diffie-hellman":152,pbkdf2:205,"public-encrypt":212,randombytes:223,randomfill:224}],146:[function(e,t,r){"use strict";r.utils=e("./des/utils"),r.Cipher=e("./des/cipher"),r.DES=e("./des/des"),r.CBC=e("./des/cbc"),r.EDE=e("./des/ede")},{"./des/cbc":147,"./des/cipher":148,"./des/des":149,"./des/ede":150,"./des/utils":151}],147:[function(e,t,r){"use strict";function n(e){o.equal(e.length,8,"Invalid IV length"),this.iv=Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}var o=e("minimalistic-assert"),d=e("inherits"),a={};r.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}d(t,e);for(var r=Object.keys(a),n=0,i;n<r.length;n++)i=r[n],t.prototype[i]=a[i];return t.create=function(e){return new t(e)},t},a._cbcInit=function(){var e=new n(this.options.iv);this._cbcState=e},a._update=function(e,t,r,n){var o=this._cbcState,d=this.constructor.super_.prototype,a=o.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];d._update.call(this,a,0,r,n);for(var s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{d._update.call(this,e,t,r,n);for(var s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(var s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},{inherits:190,"minimalistic-assert":198}],148:[function(e,t){"use strict";function r(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=Array(this.blockSize),this.bufferOff=0}var n=e("minimalistic-assert");t.exports=r,r.prototype._init=function(){},r.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},r.prototype._buffer=function(e,t){for(var r=u(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},r.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},r.prototype._updateEncrypt=function(e){var t=0,r=0,n=0|(this.bufferOff+e.length)/this.blockSize,i=Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},r.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=p((this.bufferOff+e.length)/this.blockSize)-1,i=Array(n*this.blockSize);0<n;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},r.prototype.final=function(e){var t;e&&(t=this.update(e));var r;return r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},r.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},r.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=Array(this.blockSize);return this._update(this.buffer,0,e,0),e},r.prototype._unpad=function(e){return e},r.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},{"minimalistic-assert":198}],149:[function(e,t){"use strict";function r(){this.tmp=[,,],this.keys=null}function n(e){s.call(this,e);var t=new r;this._desState=t,this.deriveKeys(t,e.key)}var o=e("minimalistic-assert"),i=e("inherits"),d=e("../des"),a=d.utils,s=d.Cipher;i(n,s),t.exports=n,n.create=function(e){return new n(e)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];n.prototype.deriveKeys=function(e,t){e.keys=Array(32),o.equal(t.length,this.blockSize,"Invalid key length");var r=a.readUInt32BE(t,0),n=a.readUInt32BE(t,4);a.pc1(r,n,e.tmp,0),r=e.tmp[0],n=e.tmp[1];for(var d=0,i;d<e.keys.length;d+=2)i=f[d>>>1],r=a.r28shl(r,i),n=a.r28shl(n,i),a.pc2(r,n,e.keys,d)},n.prototype._update=function(e,t,n,i){var o=this._desState,d=a.readUInt32BE(e,t),s=a.readUInt32BE(e,t+4);a.ip(d,s,o.tmp,0),d=o.tmp[0],s=o.tmp[1],"encrypt"===this.type?this._encrypt(o,d,s,o.tmp,0):this._decrypt(o,d,s,o.tmp,0),d=o.tmp[0],s=o.tmp[1],a.writeUInt32BE(n,d,i),a.writeUInt32BE(n,s,i+4)},n.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},n.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)o.equal(e[r],t);return e.slice(0,e.length-t)},n.prototype._encrypt=function(e,n,o,d,c){for(var p=n,u=o,r=0;r<e.keys.length;r+=2){var i=e.keys[r],l=e.keys[r+1];a.expand(u,e.tmp,0),i^=e.tmp[0],l^=e.tmp[1];var h=a.substitute(i,l),s=a.permute(h),f=u;u=(p^s)>>>0,p=f}a.rip(u,p,d,c)},n.prototype._decrypt=function(e,n,o,d,c){for(var p=o,u=n,r=e.keys.length-2;0<=r;r-=2){var i=e.keys[r],l=e.keys[r+1];a.expand(p,e.tmp,0),i^=e.tmp[0],l^=e.tmp[1];var h=a.substitute(i,l),s=a.permute(h),f=p;p=(u^s)>>>0,u=f}a.rip(p,u,d,c)}},{"../des":146,inherits:190,"minimalistic-assert":198}],150:[function(e,t){"use strict";function r(e,t){i.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),n=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),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:r})]}function n(e){a.call(this,e);var t=new r(this.type,this.options.key);this._edeState=t}var i=e("minimalistic-assert"),o=e("inherits"),d=e("../des"),a=d.Cipher,s=d.DES;o(n,a),t.exports=n,n.create=function(e){return new n(e)},n.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},n.prototype._pad=s.prototype._pad,n.prototype._unpad=s.prototype._unpad},{"../des":146,inherits:190,"minimalistic-assert":198}],151:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){var r=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return r>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=255&t>>>16,e[2+r]=255&t>>>8,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var o=0,d=0,a=6;0<=a;a-=2){for(var i=0;24>=i;i+=8)o<<=1,o|=1&t>>>i+a;for(var i=0;24>=i;i+=8)o<<=1,o|=1&e>>>i+a}for(var a=6;0<=a;a-=2){for(var i=1;25>=i;i+=8)d<<=1,d|=1&t>>>i+a;for(var i=1;25>=i;i+=8)d<<=1,d|=1&e>>>i+a}r[n+0]=o>>>0,r[n+1]=d>>>0},r.rip=function(e,t,r,n){for(var o=0,d=0,a=0;4>a;a++)for(var i=24;0<=i;i-=8)o<<=1,o|=1&t>>>i+a,o<<=1,o|=1&e>>>i+a;for(var a=4;8>a;a++)for(var i=24;0<=i;i-=8)d<<=1,d|=1&t>>>i+a,d<<=1,d|=1&e>>>i+a;r[n+0]=o>>>0,r[n+1]=d>>>0},r.pc1=function(e,t,r,n){for(var o=0,d=0,a=7;5<=a;a--){for(var i=0;24>=i;i+=8)o<<=1,o|=1&t>>i+a;for(var i=0;24>=i;i+=8)o<<=1,o|=1&e>>i+a}for(var i=0;24>=i;i+=8)o<<=1,o|=1&t>>i+a;for(var a=1;3>=a;a++){for(var i=0;24>=i;i+=8)d<<=1,d|=1&t>>i+a;for(var i=0;24>=i;i+=8)d<<=1,d|=1&e>>i+a}for(var i=0;24>=i;i+=8)d<<=1,d|=1&e>>i+a;r[n+0]=o>>>0,r[n+1]=d>>>0},r.r28shl=function(e,t){return 268435455&e<<t|e>>>28-t};var n=[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];r.pc2=function(e,t,r,o){for(var d=0,a=0,s=n.length>>>1,f=0;f<s;f++)d<<=1,d|=1&e>>>n[f];for(var f=s;f<n.length;f++)a<<=1,a|=1&t>>>n[f];r[o+0]=d>>>0,r[o+1]=a>>>0},r.expand=function(e,t,r){var n=0,o=0;n=(1&e)<<5|e>>>27;for(var d=23;15<=d;d-=4)n<<=6,n|=63&e>>>d;for(var d=11;3<=d;d-=4)o|=63&e>>>d,o<<=6;o|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=o>>>0};var o=[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];r.substitute=function(e,t){for(var r=0,n=0;4>n;n++){var i=63&e>>>18-6*n,d=o[64*n+i];r<<=4,r|=d}for(var n=0;4>n;n++){var i=63&t>>>18-6*n,d=o[256+64*n+i];r<<=4,r|=d}return r>>>0};var d=[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];r.permute=function(e){for(var t=0,r=0;r<d.length;r++)t<<=1,t|=1&e>>>d[r];return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var o=[],d=0;d<t;d+=r)o.push(n.slice(d,d+r));return o.join(" ")}},{}],152:[function(e,t,r){(function(t){function n(e,r,o,s){return t.isBuffer(r)||void 0===a[r]?n(e,"binary",r,o):(r=r||"binary",s=s||"binary",o=o||new t([2]),t.isBuffer(o)||(o=new t(o,s)),"number"==typeof e)?new d(i(e,o),o,!0):(t.isBuffer(e)||(e=new t(e,r)),new d(e,o,!0))}var i=e("./lib/generatePrime"),o=e("./lib/primes.json"),d=e("./lib/dh"),a={binary:!0,hex:!0,base64:!0};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=function(e){var r=new t(o[e].prime,"hex"),n=new t(o[e].gen,"hex");return new d(r,n)},r.createDiffieHellman=r.DiffieHellman=n}).call(this,e("buffer").Buffer)},{"./lib/dh":153,"./lib/generatePrime":154,"./lib/primes.json":155,buffer:115}],153:[function(e,t){(function(r){function n(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._pub=new s(e),this}function i(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._priv=new s(e),this}function o(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in m)return m[n];var i=0;if(e.isEven()||!g.simpleSieve||!g.fermatTest(e)||!c.test(e))return i+=1,i+="02"===r||"05"===r?8:4,m[n]=i,i;c.test(e.shrn(1))||(i+=2);var o;return"02"===r?e.mod(p).cmp(u)&&(i+=8):"05"===r?(o=e.mod(l),o.cmp(h)&&o.cmp(b)&&(i+=8)):i+=4,m[n]=i,i}function d(e,t,r){this.setGenerator(t),this.__prime=new s(e),this._prime=s.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=n,this.setPrivateKey=i):this._primeCode=8}function a(e,t){var n=new r(e.toArray());return t?n.toString(t):n}var s=e("bn.js"),f=e("miller-rabin"),c=new f,p=new s(24),u=new s(11),l=new s(10),h=new s(3),b=new s(7),g=e("./generatePrime"),y=e("randombytes");t.exports=d;var m={};Object.defineProperty(d.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=o(this.__prime,this.__gen)),this._primeCode}}),d.prototype.generateKeys=function(){return this._priv||(this._priv=new s(y(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},d.prototype.computeSecret=function(e){e=new s(e),e=e.toRed(this._prime);var t=e.redPow(this._priv).fromRed(),n=new r(t.toArray()),i=this.getPrime();if(n.length<i.length){var o=new r(i.length-n.length);o.fill(0),n=r.concat([o,n])}return n},d.prototype.getPublicKey=function(e){return a(this._pub,e)},d.prototype.getPrivateKey=function(e){return a(this._priv,e)},d.prototype.getPrime=function(e){return a(this.__prime,e)},d.prototype.getGenerator=function(e){return a(this._gen,e)},d.prototype.setGenerator=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.__gen=e,this._gen=new s(e),this}}).call(this,e("buffer").Buffer)},{"./generatePrime":154,"bn.js":156,buffer:115,"miller-rabin":196,randombytes:223}],154:[function(e,t){function r(){if(null!=I)return I;var e=[];e[0]=2;for(var t=1,r=3,n;r<1048576;r+=2){n=p(Math.sqrt(r));for(var i=0;i<t&&e[i]<=n&&0!=r%e[i];i++);t!==i&&e[i]<=n||(e[t++]=r)}return I=e,e}function n(e){for(var t=r(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function i(e){var t=a.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function o(e,t){if(16>e)return 2===t||5===t?new a([140,123]):new a([140,39]);t=new a(t);for(var r,o;;){for(r=new a(d(p(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(u),r.testn(1)||r.iadd(l),!t.cmp(l))for(;r.mod(s).cmp(S);)r.iadd(v);else if(!t.cmp(h))for(;r.mod(y).cmp(m);)r.iadd(v);if(o=r.shrn(1),n(o)&&n(r)&&i(o)&&i(r)&&c.test(o)&&c.test(r))return r}}var d=e("randombytes");t.exports=o,o.simpleSieve=n,o.fermatTest=i;var a=e("bn.js"),s=new a(24),f=e("miller-rabin"),c=new f,u=new a(1),l=new a(2),h=new a(5),b=new a(16),g=new a(8),y=new a(10),m=new a(3),_=new a(7),S=new a(11),v=new a(4),k=new a(12),I=null},{"bn.js":156,"miller-rabin":196,randombytes:223}],155:[function(e,t){t.exports={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"}}},{}],156:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{buffer:66,dup:60}],157:[function(e,t,r){"use strict";var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.hmacDRBG=e("./elliptic/hmac-drbg"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec")},{"../package.json":170,"./elliptic/curve":160,"./elliptic/curves":163,"./elliptic/ec":164,"./elliptic/hmac-drbg":167,"./elliptic/utils":169,brorand:65}],158:[function(e,t){"use strict";function r(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,]}function n(e,t){this.curve=e,this.type=t,this.precomputed=null}var i=e("bn.js"),o=e("../../elliptic"),d=o.utils.getNAF,s=o.utils.getJSF,a=o.utils.assert;t.exports=r,r.prototype.point=function(){throw new Error("Not implemented")},r.prototype.validate=function(){throw new Error("Not implemented")},r.prototype._fixedNafMul=function(e,t){var r=e._getDoubles(),n=d(t,1),o=(1<<r.step+1)-(0==r.step%2?2:1);o/=3;for(var s=[],f=0,c;f<n.length;f+=r.step){c=0;for(var t=f+r.step-1;t>=f;t--)c=(c<<1)+n[t];s.push(c)}for(var p=this.jpoint(null,null,null),a=this.jpoint(null,null,null),u=o;0<u;u--){for(var f=0,c;f<s.length;f++)c=s[f],c===u?a=a.mixedAdd(r.points[f]):c===-u&&(a=a.mixedAdd(r.points[f].neg()));p=p.add(a)}return p.toP()},r.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var o=n.points,s=d(t,r),f=this.jpoint(null,null,null),c=s.length-1;0<=c;c--){for(var t=0;0<=c&&0===s[c];c--)t++;if(0<=c&&t++,f=f.dblp(t),0>c)break;var i=s[c];a(0!==i),f="affine"===e.type?0<i?f.mixedAdd(o[i-1>>1]):f.mixedAdd(o[-i-1>>1].neg()):0<i?f.add(o[i-1>>1]):f.add(o[-i-1>>1].neg())}return"affine"===e.type?f.toP():f},r.prototype._wnafMulAdd=function(e,t,r,n){for(var o=this._wnafT1,c=this._wnafT2,u=this._wnafT3,l=0,h=0;h<n;h++){var i=t[h],p=i._getNAFPoints(e);o[h]=p.wnd,c[h]=p.points}for(var h=n-1;1<=h;h-=2){var g=h-1,a=h;if(1!==o[g]||1!==o[a]){u[g]=d(r[g],o[g]),u[a]=d(r[a],o[a]),l=f(u[g].length,l),l=f(u[a].length,l);continue}var b=[t[g],null,null,t[a]];0===t[g].y.cmp(t[a].y)?(b[1]=t[g].add(t[a]),b[2]=t[g].toJ().mixedAdd(t[a].neg())):0===t[g].y.cmp(t[a].y.redNeg())?(b[1]=t[g].toJ().mixedAdd(t[a]),b[2]=t[g].add(t[a].neg())):(b[1]=t[g].toJ().mixedAdd(t[a]),b[2]=t[g].toJ().mixedAdd(t[a].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=s(r[g],r[a]);l=f(m[0].length,l),u[g]=Array(l),u[a]=Array(l);for(var _=0;_<l;_++){var S=0|m[0][_],v=0|m[1][_];u[g][_]=y[3*(S+1)+(v+1)],u[a][_]=0,c[g]=b}}for(var I=this.jpoint(null,null,null),x=this._wnafT4,h=l,A;0<=h;h--){for(A=0;0<=h;){for(var k=!0,_=0;_<n;_++)x[_]=0|u[_][h],0!==x[_]&&(k=!1);if(!k)break;A++,h--}if(0<=h&&A++,I=I.dblp(A),0>h)break;for(var _=0;_<n;_++){var w=x[_],i;if(0===w)continue;else 0<w?i=c[_][w-1>>1]:0>w&&(i=c[_][-w-1>>1].neg());I="affine"===i.type?I.mixedAdd(i):I.add(i)}}for(var h=0;h<n;h++)c[h]=null;return I.toP()},r.BasePoint=n,n.prototype.validate=function(){return this.curve.validate(this)},n.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},n.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,o=0;o<t;o+=e){for(var i=0;i<e;i++)n=n.dbl();r.push(n)}return{step:e,points:r}},n.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1==r?null:this.dbl(),o=1;o<r;o++)t[o]=t[o-1].add(n);return{wnd:e,points:t}},n.prototype._getBeta=function(){return null},n.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},{"../../elliptic":157,"bn.js":64}],159:[function(e,t){"use strict";function r(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new d(e.a,16).mod(this.red.m).toRed(this.red),this.c=new d(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new d(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),f(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function n(e,r,n,i,o){s.BasePoint.call(this,e,"projective"),null===r&&null===n&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new d(r,16),this.y=new d(n,16),this.z=i?new d(i,16):this.curve.one,this.t=o&&new d(o,16),!this.x.red&&(this.x=this.x.toRed(this.curve.red)),!this.y.red&&(this.y=this.y.toRed(this.curve.red)),!this.z.red&&(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),!this.zOne&&(this.t=this.t.redMul(this.z.redInvm()))))}var i=e("../curve"),o=e("../../elliptic"),d=e("bn.js"),a=e("inherits"),s=i.base,f=o.utils.assert;a(r,s),t.exports=r,r.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},r.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},r.prototype.jpoint=function(e,r,n,i){return this.point(e,r,n,i)},r.prototype.pointFromX=function(e,t){t=new d(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()).redSqrt(),s=a.fromRed().isOdd();return(e&&!s||!e&&s)&&(a=a.redNeg()),this.point(t,a,i.one)},r.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},a(n,s.BasePoint),r.prototype.pointFromJSON=function(e){return n.fromJSON(this,e)},r.prototype.point=function(e,r,i,o){return new n(this,e,r,i,o)},n.fromJSON=function(e,t){return new n(e,t[0],t[1],t[2])},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},n.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(t),o=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),e=i.redAdd(r),d=e.redSub(n),a=i.redSub(r),s=o.redMul(d),f=e.redMul(a),c=o.redMul(a),p=d.redMul(e);return this.curve.point(s,f,p,c)},n.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),i,o,d;if(this.curve.twisted){var a=this.curve._mulA(r),e=a.redAdd(n);if(this.zOne)i=t.redSub(r).redSub(n).redMul(e.redSub(this.curve.two)),o=e.redMul(a.redSub(n)),d=e.redSqr().redSub(e).redSub(e);else{var s=this.z.redSqr(),f=e.redSub(s).redISub(s);i=t.redSub(r).redISub(n).redMul(f),o=e.redMul(a.redSub(n)),d=e.redMul(f)}}else{var a=r.redAdd(n),s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=a.redSub(s).redSub(s);i=this.curve._mulC(t.redISub(a)).redMul(f),o=this.curve._mulC(a).redMul(r.redISub(n)),d=a.redMul(f)}return this.curve.point(i,o,d)},n.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},n.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),o=this.z.redMul(t.z.redAdd(t.z)),d=n.redSub(r),e=o.redSub(i),a=o.redAdd(i),s=n.redAdd(r),f=d.redMul(e),c=a.redMul(s),p=d.redMul(s),u=e.redMul(a);return this.curve.point(f,c,u,p)},n.prototype._projAdd=function(t){var r=this.z.redMul(t.z),n=r.redSqr(),i=this.x.redMul(t.x),o=this.y.redMul(t.y),d=this.curve.d.redMul(i).redMul(o),e=n.redSub(d),a=n.redAdd(d),s=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(i).redISub(o),f=r.redMul(e).redMul(s),c,p;return this.curve.twisted?(c=r.redMul(a).redMul(o.redSub(this.curve._mulA(i))),p=e.redMul(a)):(c=r.redMul(a).redMul(o.redSub(i)),p=this.curve._mulC(e).redMul(a)),this.curve.point(f,c,p)},n.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},n.prototype.mul=function(e){return this.precomputed&&this.precomputed.doubles?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},n.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2)},n.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},n.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()},n.prototype.getY=function(){return this.normalize(),this.y.fromRed()},n.prototype.toP=n.prototype.normalize,n.prototype.mixedAdd=n.prototype.add},{"../../elliptic":157,"../curve":160,"bn.js":64,inherits:190}],160:[function(e,t,r){arguments[4][99][0].apply(r,arguments)},{"./base":158,"./edwards":159,"./mont":161,"./short":162,dup:99}],161:[function(e,t){"use strict";function r(e){a.call(this,"mont",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function n(e,t,r){a.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(t,16),this.z=new o(r,16),!this.x.red&&(this.x=this.x.toRed(this.curve.red)),!this.z.red&&(this.z=this.z.toRed(this.curve.red)))}var i=e("../curve"),o=e("bn.js"),d=e("inherits"),a=i.base;d(r,a),t.exports=r,r.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),i=n.redSqrt();return 0===i.redSqr().cmp(n)},d(n,a.BasePoint),r.prototype.point=function(e,t){return new n(this,e,t)},r.prototype.pointFromJSON=function(e){return n.fromJSON(this,e)},n.prototype.precompute=function(){},n.fromJSON=function(e,t){return new n(e,t[0],t[1]||e.one)},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},n.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=t.redSub(n),o=t.redMul(n),d=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(o,d)},n.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z),d=o.redMul(r),a=i.redMul(n),s=t.z.redMul(d.redAdd(a).redSqr()),f=t.x.redMul(d.redISub(a).redSqr());return this.curve.point(s,f)},n.prototype.mul=function(e){for(var r=e.clone(),t=this,n=this.curve.point(null,null),o=this,d=[];0!==r.cmpn(0);r.ishrn(1))d.push(r.andln(1));for(var a=d.length-1;0<=a;a--)0===d[a]?(t=t.diffAdd(n,o),n=n.dbl()):(n=t.diffAdd(n,o),t=t.dbl());return n},n.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../curve":160,"bn.js":64,inherits:190}],162:[function(e,t){"use strict";function r(e){f.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.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(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function n(e,t,r,n){f.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(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 i(e,t,r,n){f.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,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}var o=e("../curve"),d=e("../../elliptic"),a=e("bn.js"),s=e("inherits"),f=o.base,c=d.utils.assert;s(r,f),t.exports=r,r.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=0>n[0].cmp(n[1])?n[0]:n[1],t=t.toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],c(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var o;return o=e.basis?e.basis.map(function(e){return{a:new a(e.a,16),b:new a(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:o}}},r.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r),o=n.redAdd(i).fromRed(),d=n.redSub(i).fromRed();return[o,d]},r.prototype._getEndoBasis=function(e){for(var t=this.n.shrn(h(this.n.bitLength()/2)),n=e,o=this.n.clone(),d=new a(1),s=new a(0),f=new a(0),c=new a(1),p=0,i,u,l,b,g,m,_,S,r,v;0!==n.cmpn(0);){v=o.div(n),S=o.sub(v.mul(n)),r=f.sub(v.mul(d));var k=c.sub(v.mul(s));if(!l&&0>S.cmp(t))i=_.neg(),u=d,l=S.neg(),b=r;else if(l&&2==++p)break;_=S,o=n,n=S,f=d,d=r,c=s,s=k}g=S.neg(),m=r;var y=l.sqr().add(b.sqr()),I=g.sqr().add(m.sqr());return 0<=I.cmp(y)&&(g=i,m=u),l.sign&&(l=l.neg(),b=b.neg()),g.sign&&(g=g.neg(),m=m.neg()),[{a:l,b:b},{a:g,b:m}]},r.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),d=i.mul(r.a),a=o.mul(n.a),s=i.mul(r.b),f=o.mul(n.b),c=e.sub(d).sub(a),p=s.add(f).neg();return{k1:c,k2:p}},r.prototype.pointFromX=function(e,t){t=new a(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt(),i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},r.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},r.prototype._endoWnafMulAdd=function(e,t){for(var r=this._endoWnafT1,n=this._endoWnafT2,o=0;o<e.length;o++){var i=this._endoSplit(t[o]),d=e[o],a=d._getBeta();i.k1.sign&&(i.k1.sign=!i.k1.sign,d=d.neg(!0)),i.k2.sign&&(i.k2.sign=!i.k2.sign,a=a.neg(!0)),r[2*o]=d,r[2*o+1]=a,n[2*o]=i.k1,n[2*o+1]=i.k2}for(var s=this._wnafMulAdd(1,r,n,2*o),f=0;f<2*o;f++)r[f]=null,n[f]=null;return s},s(n,f.BasePoint),r.prototype.point=function(e,t,r){return new n(this,e,t,r)},r.prototype.pointFromJSON=function(e,t){return n.fromJSON(this,e,t)},n.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},n.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},n.fromJSON=function(e,t,r){function n(t){return e.point(t[0],t[1],r)}"string"==typeof t&&(t=JSON.parse(t));var i=e.point(t[0],t[1],r);if(!t[2])return i;var o=t[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(n))}},i},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return this.inf},n.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},n.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),d=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,d)},n.prototype.getX=function(){return this.x.fromRed()},n.prototype.getY=function(){return this.y.fromRed()},n.prototype.mul=function(e){return e=new a(e,16),this.precomputed&&this.precomputed.doubles?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},n.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},n.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},n.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},n.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},s(i,f.BasePoint),r.prototype.jpoint=function(e,t,r){return new i(this,e,t,r)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},i.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),o=e.x.redMul(n),d=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=i.redSub(o),f=d.redSub(a);if(0===s.cmpn(0))return 0===f.cmpn(0)?this.dbl():this.curve.jpoint(null,null,null);var r=s.redSqr(),c=r.redMul(s),p=i.redMul(r),u=f.redSqr().redIAdd(c).redISub(p).redISub(p),l=f.redMul(p.redISub(u)).redISub(d.redMul(c)),h=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(u,l,h)},i.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),o=this.y,d=e.y.redMul(t).redMul(this.z),a=n.redSub(i),s=o.redSub(d);if(0===a.cmpn(0))return 0===s.cmpn(0)?this.dbl():this.curve.jpoint(null,null,null);var r=a.redSqr(),f=r.redMul(a),c=n.redMul(r),p=s.redSqr().redIAdd(f).redISub(c).redISub(c),u=s.redMul(c.redISub(p)).redISub(o.redMul(f)),l=this.z.redMul(a);return this.curve.jpoint(p,u,l)},i.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}for(var n=this.curve.a,i=this.curve.tinv,o=this.x,d=this.y,a=this.z,s=a.redSqr().redSqr(),f=d.redAdd(d),r=0;r<e;r++){var p=o.redSqr(),u=f.redSqr(),l=u.redSqr(),h=p.redAdd(p).redIAdd(p).redIAdd(n.redMul(s)),c=o.redMul(u),b=h.redSqr().redISub(c.redAdd(c)),g=c.redISub(b),y=h.redMul(g);y=y.redIAdd(y).redISub(l);var m=f.redMul(a);r+1<e&&(s=s.redMul(l)),o=b,a=m,f=y}return this.curve.jpoint(o,f.redMul(i),a)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},i.prototype._zeroDbl=function(){var r,n,i;if(this.zOne){var o=this.x.redSqr(),p=this.y.redSqr(),u=p.redSqr(),l=this.x.redAdd(p).redSqr().redISub(o).redISub(u);l=l.redIAdd(l);var s=o.redAdd(o).redIAdd(o),h=s.redSqr().redISub(l).redISub(l),t=u.redIAdd(u);t=t.redIAdd(t),t=t.redIAdd(t),r=h,n=s.redMul(l.redISub(h)).redISub(t),i=this.y.redAdd(this.y)}else{var g=this.x.redSqr(),a=this.y.redSqr(),b=a.redSqr(),c=this.x.redAdd(a).redSqr().redISub(g).redISub(b);c=c.redIAdd(c);var d=g.redAdd(g).redIAdd(g),e=d.redSqr(),f=b.redIAdd(b);f=f.redIAdd(f),f=f.redIAdd(f),r=e.redISub(c).redISub(c),n=d.redMul(c.redISub(r)).redISub(f),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(r,n,i)},i.prototype._threeDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),d=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(i).redISub(d);a=a.redIAdd(a);var s=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),f=s.redSqr().redISub(a).redISub(a);e=f;var t=d.redIAdd(d);t=t.redIAdd(t),t=t.redIAdd(t),r=s.redMul(a.redISub(f)).redISub(t),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),p=this.y.redSqr(),u=this.x.redMul(p),l=this.x.redSub(c).redMul(this.x.redAdd(c));l=l.redAdd(l).redIAdd(l);var h=u.redIAdd(u);h=h.redIAdd(h);var b=h.redAdd(h);e=l.redSqr().redISub(b),n=this.y.redAdd(this.z).redSqr().redISub(p).redISub(c);var g=p.redSqr();g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g),r=l.redMul(h.redISub(e)).redISub(g)}return this.curve.jpoint(e,r,n)},i.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),d=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),s=t.redAdd(t);s=s.redIAdd(s);var f=s.redMul(d),c=a.redSqr().redISub(f.redAdd(f)),p=f.redISub(c),u=d.redSqr();u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u);var l=a.redMul(p).redISub(u),h=r.redAdd(r).redMul(n);return this.curve.jpoint(c,l,h)},i.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var r=this.x.redSqr(),n=this.y.redSqr(),i=this.z.redSqr(),o=n.redSqr(),d=r.redAdd(r).redIAdd(r),a=d.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s),s=s.redAdd(s).redIAdd(s),s=s.redISub(a);var e=s.redSqr(),f=o.redIAdd(o);f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var t=d.redIAdd(s).redSqr().redISub(a).redISub(e).redISub(f),c=n.redMul(t);c=c.redIAdd(c),c=c.redIAdd(c);var p=this.x.redMul(e).redISub(c);p=p.redIAdd(p),p=p.redIAdd(p);var u=this.y.redMul(t.redMul(f.redISub(t)).redISub(s.redMul(e)));u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u);var l=this.z.redAdd(s).redSqr().redISub(i).redISub(e);return this.curve.jpoint(p,u,l)},i.prototype.mul=function(e,t){return e=new a(e,t),this.curve._wnafMul(this,e)},i.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},i.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)+">"},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":157,"../curve":160,"bn.js":64,inherits:190}],163:[function(e,t,r){"use strict";function n(e){this.curve="short"===e.type?new a.curve.short(e):"edwards"===e.type?new a.curve.edwards(e):new a.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var r=new n(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:r}),r}})}var o=r,d=e("hash.js"),a=e("../elliptic"),s=a.utils.assert;o.PresetCurve=n,i("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:d.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:d.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:d.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:d.sha256,gRed:!1,g:["9"]}),i("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:d.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var f;try{f=e("./precomputed/secp256k1")}catch(t){f=void 0}i("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:d.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",f]})},{"../elliptic":157,"./precomputed/secp256k1":168,"hash.js":174}],164:[function(e,t){"use strict";function r(e){return this instanceof r?void("string"==typeof e&&(d(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.shrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash):new r(e)}var n=e("bn.js"),o=e("../../elliptic"),i=o.utils,d=i.assert,a=e("./key"),f=e("./signature");t.exports=r,r.prototype.keyPair=function(e){return new a(this,e)},r.prototype.keyFromPrivate=function(e,t){return a.fromPrivate(this,e,t)},r.prototype.keyFromPublic=function(e,t){return a.fromPublic(this,e,t)},r.prototype.genKeyPair=function(e){e||(e={});var t=new o.hmacDRBG({hash:this.hash,pers:e.pers,entropy:e.entropy||o.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new n(2));do{var d=new n(t.generate(r));if(0<d.cmp(i))continue;return d.iaddn(1),this.keyFromPrivate(d)}while(!0)},r.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return 0<r&&(e=e.shrn(r)),!t&&0<=e.cmp(this.n)?e.sub(this.n):e},r.prototype.sign=function(e,t,d,a){"object"==typeof d&&(a=d,d=null),a||(a={}),t=this.keyFromPrivate(t,d),e=this._truncateToN(new n(e,16));for(var c=this.n.byteLength(),p=t.getPrivate().toArray(),u=p.length;21>u;u++)p.unshift(0);for(var i=e.toArray(),u=i.length;u<c;u++)i.unshift(0);var l=new o.hmacDRBG({hash:this.hash,entropy:p,nonce:i}),h=this.n.sub(new n(1));do{var b=new n(l.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),0>=b.cmpn(1)||0<=b.cmp(h))continue;var g=this.g.mul(b);if(g.isInfinity())continue;var y=g.getX().mod(this.n);if(0===y.cmpn(0))continue;var m=b.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e)).mod(this.n);if(0===m.cmpn(0))continue;return a.canonical&&0<m.cmp(this.nh)&&(m=this.n.sub(m)),new f({r:y,s:m})}while(!0)},r.prototype.verify=function(e,t,i,o){e=this._truncateToN(new n(e,16)),i=this.keyFromPublic(i,o),t=new f(t,"hex");var d=t.r,r=t.s;if(0>d.cmpn(1)||0<=d.cmp(this.n))return!1;if(0>r.cmpn(1)||0<=r.cmp(this.n))return!1;var a=r.invm(this.n),s=a.mul(e).mod(this.n),c=a.mul(d).mod(this.n),u=this.g.mulAdd(s,i.getPublic(),c);return!u.isInfinity()&&0===u.getX().mod(this.n).cmp(d)}},{"../../elliptic":157,"./key":165,"./signature":166,"bn.js":64}],165:[function(e,t){"use strict";function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var n=e("bn.js"),i=e("../../elliptic"),o=i.utils;t.exports=r,r.fromPublic=function(e,t,n){return t instanceof r?t:new r(e,{pub:t,pubEnc:n})},r.fromPrivate=function(e,t,n){return t instanceof r?t:new r(e,{priv:t,privEnc:n})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.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"}},r.prototype.getPublic=function(e,t){if(this.pub||(this.pub=this.ec.g.mul(this.priv)),"string"==typeof e&&(t=e,e=null),!t)return this.pub;for(var r=this.ec.curve.p.byteLength(),n=this.pub.getX().toArray(),d=n.length;d<r;d++)n.unshift(0);var i;if("mont"===this.ec.curve.type)i=n;else if(e)i=[this.pub.getY().isEven()?2:3].concat(n);else{for(var a=this.pub.getY().toArray(),d=a.length;d<r;d++)a.unshift(0);var i=[4].concat(n,a)}return o.encode(i,t)},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.mod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){return e.x||e.y?void(this.pub=this.ec.curve.point(e.x,e.y)):(e=o.toArray(e,t),"mont"===this.ec.curve.type?this._importPublicMont(e):this._importPublicShort(e))},r.prototype._importPublicShort=function(e){var t=this.ec.curve.p.byteLength();4===e[0]&&e.length-1==2*t?this.pub=this.ec.curve.point(e.slice(1,1+t),e.slice(1+t,1+2*t)):(2===e[0]||3===e[0])&&e.length-1===t&&(this.pub=this.ec.curve.pointFromX(3===e[0],e.slice(1,1+t)))},r.prototype._importPublicMont=function(e){this.pub=this.ec.curve.point(e,1)},r.prototype.derive=function(e){return e.mul(this.priv).getX()},r.prototype.sign=function(e){return this.ec.sign(e,this)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":157,"bn.js":64}],166:[function(e,t){"use strict";function r(e,t){return e instanceof r?e:void(this._importDER(e,t)||(d(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16)))}var n=e("bn.js"),i=e("../../elliptic"),o=i.utils,d=o.assert;t.exports=r,r.prototype._importDER=function(e,t){if(e=o.toArray(e,t),6>e.length||48!==e[0]||2!==e[2])return!1;var r=e[1];if(1+r>e.length)return!1;var i=e[3];if(128<=i)return!1;if(4+i+2>=e.length)return!1;if(2!==e[4+i])return!1;var d=e[5+i];return!(128<=d)&&!(4+i+2+d>e.length)&&(this.r=new n(e.slice(4,4+i)),this.s=new n(e.slice(4+i+2,4+i+2+d)),!0)},r.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r));var n=t.length+r.length+4,i=[48,n,2,t.length];return i=i.concat(t,[2,r.length],r),o.encode(i,e)}},{"../../elliptic":157,"bn.js":64}],167:[function(e,t){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc),n=o.toArray(e.nonce,e.nonceEnc),i=o.toArray(e.pers,e.persEnc);d(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,i)}var n=e("hash.js"),i=e("../elliptic"),o=i.utils,d=o.assert;t.exports=r,r.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(n),this.reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest();e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=o.toBuffer(e,t),r=o.toBuffer(r,n),d(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this.reseed=1},r.prototype.generate=function(e,t,r,n){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=o.toArray(r,n),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var d=i.slice(0,e);return this._update(r),this.reseed++,o.encode(d,t)}},{"../elliptic":157,"hash.js":174}],168:[function(e,t,r){arguments[4][109][0].apply(r,arguments)},{dup:109}],169:[function(e,t,r){"use strict";function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}var o=r;o.assert=function(e,t){if(!e)throw new Error(t||"Assertion failed")},o.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if(!t)for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,d=255&i;o?r.push(o,d):r.push(d)}else if("hex"===t){e=e.replace(/[^a-z0-9]+/ig,""),0!=e.length%2&&(e="0"+e);for(var n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}return r},o.zero2=n,o.toHex=i,o.encode=function(e,t){return"hex"===t?i(e):e},o.getNAF=function(e,t){for(var r=[],n=1<<t+1,o=e.clone();0<=o.cmpn(1);){var d;if(o.isOdd()){var a=o.andln(n-1);d=a>(n>>1)-1?(n>>1)-a:a,o.isubn(d)}else d=0;r.push(d);for(var s=0!==o.cmpn(0)&&0===o.andln(n-1)?t+1:1,f=1;f<s;f++)r.push(0);o.ishrn(s)}return r},o.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;0<e.cmpn(-n)||0<t.cmpn(-i);){var o=3&e.andln(3)+n,d=3&t.andln(3)+i;3==o&&(o=-1),3==d&&(d=-1);var a;if(0==(1&o))a=0;else{var s=7&e.andln(7)+n;a=(3==s||5==s)&&2==d?-o:o}r[0].push(a);var f;if(0==(1&d))f=0;else{var s=7&t.andln(7)+i;f=(3==s||5==s)&&2==o?-d:d}r[1].push(f),2*n===a+1&&(n=1-n),2*i===f+1&&(i=1-i),e.ishrn(1),t.ishrn(1)}return r}},{}],170:[function(e,t){t.exports={_from:"elliptic@=3.0.3",_id:"elliptic@3.0.3",_inBundle:!1,_integrity:"sha1-hlybQgv75VAGuflp+XoNLESWZZU=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@=3.0.3",name:"elliptic",escapedName:"elliptic",rawSpec:"=3.0.3",saveSpec:null,fetchSpec:"=3.0.3"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-3.0.3.tgz",_shasum:"865c9b420bfbe55006b9f969f97a0d2c44966595",_spec:"elliptic@=3.0.3",_where:"/home/emilio/dev/bitcoincashjs/bitcoincashjs",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^2.0.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},deprecated:!1,description:"EC cryptography",devDependencies:{browserify:"^3.44.2",jscs:"^1.11.3",jshint:"^2.6.0",mocha:"^2.1.0","uglify-js":"^2.4.13"},homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{test:"make lint && mocha --reporter=spec test/*-test.js"},version:"3.0.3"}},{}],171:[function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function d(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,a,s,f,i;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length))if(t=arguments[1],t instanceof Error)throw t;else{var c=new Error("Uncaught, unspecified \"error\" event. ("+t+")");throw c.context=t,c}if(r=this._events[e],d(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s);}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),i=r.slice(),a=i.length,f=0;f<a;f++)i[f].apply(this,s);return!0},r.prototype.addListener=function(e,t){var i;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(i=d(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&0<i&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,d,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,d=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;0<s--;)if(r[s]===t||r[s].listener&&r[s].listener===t){d=s;break}if(0>d)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(d,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[],t},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],172:[function(e,t){var r=e("safe-buffer").Buffer,n=e("md5.js");t.exports=function(e,t,i,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var d=i/8,a=r.alloc(d),s=r.alloc(o||0),f=r.alloc(0),c;0<d||0<o;){c=new n,c.update(f),c.update(e),t&&c.update(t),f=c.digest();var p=0;if(0<d){var l=a.length-d;p=u(d,f.length),f.copy(a,l,0,p),d-=p}if(p<f.length&&0<o){var h=s.length-o,b=u(o,f.length-p);f.copy(s,h,p,p+b),o-=b}}return f.fill(0),{key:a,iv:s}}},{"md5.js":194,"safe-buffer":240}],173:[function(e,t){(function(r){"use strict";function n(e){i.call(this),this._block=new r(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var i=e("stream").Transform,o=e("inherits");o(n,i),n.prototype._transform=function(e,t,n){var i=null;try{"buffer"!==t&&(e=new r(e,t)),this.update(e)}catch(e){i=e}n(i)},n.prototype._flush=function(e){var t=null;try{this.push(this._digest())}catch(e){t=e}e(t)},n.prototype.update=function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=new r(e,t||"binary"));for(var n=this._block,o=0;this._blockOffset+e.length-o>=this._blockSize;){for(var d=this._blockOffset;d<this._blockSize;)n[d++]=e[o++];this._update(),this._blockOffset=0}for(;o<e.length;)n[this._blockOffset++]=e[o++];for(var i=0,a=8*e.length;0<a;++i)this._length[i]+=a,a=0|this._length[i]/4294967296,0<a&&(this._length[i]-=4294967296*a);return this},n.prototype._update=function(){throw new Error("_update is not implemented")},n.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:115,inherits:190,stream:249}],174:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":175,"./hash/hmac":176,"./hash/ripemd":177,"./hash/sha":178,"./hash/utils":185}],175:[function(e,t,r){"use strict";function n(){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}var o=e("./utils"),i=e("minimalistic-assert");r.BlockHash=n,n.prototype.update=function(e,t){if(e=o.toArray(e,t),this.pending=this.pending?this.pending.concat(e):e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=o.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},n.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},n.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,o=Array(n+this.padLength);o[0]=128;for(var d=1;d<n;d++)o[d]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)o[d++]=0;o[d++]=0,o[d++]=0,o[d++]=0,o[d++]=0,o[d++]=255&e>>>24,o[d++]=255&e>>>16,o[d++]=255&e>>>8,o[d++]=255&e}else for(o[d++]=255&e,o[d++]=255&e>>>8,o[d++]=255&e>>>16,o[d++]=255&e>>>24,o[d++]=0,o[d++]=0,o[d++]=0,o[d++]=0,i=8;i<this.padLength;i++)o[d++]=0;return o}},{"./utils":185,"minimalistic-assert":198}],176:[function(e,t){"use strict";function r(e,t,i){return this instanceof r?void(this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,i))):new r(e,t,i)}var n=e("./utils"),o=e("minimalistic-assert");t.exports=r,r.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=new this.Hash().update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=new this.Hash().update(e)},r.prototype.update=function(e,t){return this.inner.update(e,t),this},r.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"./utils":185,"minimalistic-assert":198}],177:[function(e,t,n){"use strict";function i(){return this instanceof i?void(b.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"):new i}function o(e,t,r,n){return 15>=e?t^r^n:31>=e?t&r|~t&n:47>=e?(t|~r)^n:63>=e?t&n|r&~n:t^(r|~n)}function d(e){return 15>=e?0:31>=e?1518500249:47>=e?1859775393:63>=e?2400959708:2840853838}function a(e){return 15>=e?1352829926:31>=e?1548603684:47>=e?1836072691:63>=e?2053994217:0}var f=e("./utils"),c=e("./common"),p=f.rotl32,u=f.sum32,l=f.sum32_3,h=f.sum32_4,b=c.BlockHash;f.inherits(i,b),n.ripemd160=i,i.blockSize=512,i.outSize=160,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(e,t){for(var n=this.h[0],i=this.h[1],f=this.h[2],c=this.h[3],b=this.h[4],m=n,_=i,S=f,v=c,k=b,I=0,x;80>I;I++)x=u(p(h(n,o(I,i,f,c),e[g[I]+t],d(I)),y[I]),b),n=b,b=c,c=p(f,10),f=i,i=x,x=u(p(h(m,o(79-I,_,S,v),e[r[I]+t],a(I)),s[I]),k),m=k,k=v,v=p(S,10),S=_,_=x;x=l(this.h[1],f,v),this.h[1]=l(this.h[2],c,k),this.h[2]=l(this.h[3],b,m),this.h[3]=l(this.h[4],n,_),this.h[4]=l(this.h[0],i,S),this.h[0]=x},i.prototype._digest=function(e){return"hex"===e?f.toHex32(this.h,"little"):f.split32(this.h,"little")};var g=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],r=[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],y=[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],s=[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]},{"./common":175,"./utils":185}],178:[function(e,t,r){"use strict";r.sha1=e("./sha/1"),r.sha224=e("./sha/224"),r.sha256=e("./sha/256"),r.sha384=e("./sha/384"),r.sha512=e("./sha/512")},{"./sha/1":179,"./sha/224":180,"./sha/256":181,"./sha/384":182,"./sha/512":183}],179:[function(e,t){"use strict";function r(){return this instanceof r?void(d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)):new r}var n=e("../utils"),i=e("../common"),o=e("./common"),f=n.rotl32,p=n.sum32,u=n.sum32_5,l=o.ft_1,d=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];n.inherits(r,d),t.exports=r,r.blockSize=512,r.outSize=160,r.hmacStrength=80,r.padLength=64,r.prototype._update=function(r,n){for(var o=this.W,g=0;16>g;g++)o[g]=r[n+g];for(;g<o.length;g++)o[g]=f(o[g-3]^o[g-8]^o[g-14]^o[g-16],1);var i=this.h[0],a=this.h[1],b=this.h[2],c=this.h[3],d=this.h[4];for(g=0;g<o.length;g++){var e=~~(g/20),s=u(f(i,5),l(e,a,b,c),d,o[g],h[e]);d=c,c=b,b=f(a,30),a=i,i=s}this.h[0]=p(this.h[0],i),this.h[1]=p(this.h[1],a),this.h[2]=p(this.h[2],b),this.h[3]=p(this.h[3],c),this.h[4]=p(this.h[4],d)},r.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":175,"../utils":185,"./common":184}],180:[function(e,t){"use strict";function r(){return this instanceof r?void(i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]):new r}var n=e("../utils"),i=e("./256");n.inherits(r,i),t.exports=r,r.blockSize=512,r.outSize=224,r.hmacStrength=192,r.padLength=64,r.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},{"../utils":185,"./256":181}],181:[function(e,t){"use strict";function r(){return this instanceof r?void(c.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=h,this.W=Array(64)):new r}var n=e("../utils"),i=e("../common"),o=e("./common"),s=e("minimalistic-assert"),p=n.sum32,d=n.sum32_4,u=n.sum32_5,l=o.ch32,y=o.maj32,m=o.s0_256,_=o.s1_256,a=o.g0_256,f=o.g1_256,c=i.BlockHash,h=[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];n.inherits(r,c),t.exports=r,r.blockSize=512,r.outSize=256,r.hmacStrength=192,r.padLength=64,r.prototype._update=function(t,r){for(var n=this.W,o=0;16>o;o++)n[o]=t[r+o];for(;o<n.length;o++)n[o]=d(f(n[o-2]),n[o-7],a(n[o-15]),n[o-16]);var i=this.h[0],S=this.h[1],b=this.h[2],c=this.h[3],v=this.h[4],e=this.h[5],k=this.h[6],g=this.h[7];for(s(this.k.length===n.length),o=0;o<n.length;o++){var h=u(g,_(v),l(v,e,k),this.k[o],n[o]),I=p(m(i),y(i,S,b));g=k,k=e,e=v,v=p(c,h),c=b,b=S,S=i,i=p(h,I)}this.h[0]=p(this.h[0],i),this.h[1]=p(this.h[1],S),this.h[2]=p(this.h[2],b),this.h[3]=p(this.h[3],c),this.h[4]=p(this.h[4],v),this.h[5]=p(this.h[5],e),this.h[6]=p(this.h[6],k),this.h[7]=p(this.h[7],g)},r.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":175,"../utils":185,"./common":184,"minimalistic-assert":198}],182:[function(e,t){"use strict";function r(){return this instanceof r?void(i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]):new r}var n=e("../utils"),i=e("./512");n.inherits(r,i),t.exports=r,r.blockSize=1024,r.outSize=384,r.hmacStrength=192,r.padLength=128,r.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},{"../utils":185,"./512":183}],183:[function(e,t){"use strict";function r(){return this instanceof r?void(B.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=O,this.W=Array(160)):new r}function n(e,t,n,i,o){var d=e&n^~e&o;return 0>d&&(d+=4294967296),d}function o(e,t,n,i,o,d){var a=t&i^~t&d;return 0>a&&(a+=4294967296),a}function d(e,t,n,i,o){var d=e&n^e&o^n&o;return 0>d&&(d+=4294967296),d}function a(e,t,n,i,o,d){var a=t&i^t&d^i&d;return 0>a&&(a+=4294967296),a}function s(e,t){var n=m(e,t,28),i=m(t,e,2),o=m(t,e,7),d=n^i^o;return 0>d&&(d+=4294967296),d}function f(e,t){var n=_(e,t,28),i=_(t,e,2),o=_(t,e,7),d=n^i^o;return 0>d&&(d+=4294967296),d}function c(e,t){var n=m(e,t,14),i=m(e,t,18),o=m(t,e,9),d=n^i^o;return 0>d&&(d+=4294967296),d}function p(e,t){var n=_(e,t,14),i=_(e,t,18),o=_(t,e,9),d=n^i^o;return 0>d&&(d+=4294967296),d}function u(e,t){var n=m(e,t,1),i=m(e,t,8),o=S(e,t,7),d=n^i^o;return 0>d&&(d+=4294967296),d}function l(e,t){var n=_(e,t,1),i=_(e,t,8),o=v(e,t,7),d=n^i^o;return 0>d&&(d+=4294967296),d}function h(e,t){var n=m(e,t,19),i=m(t,e,29),o=S(e,t,6),d=n^i^o;return 0>d&&(d+=4294967296),d}function b(e,t){var n=_(e,t,19),i=_(t,e,29),o=v(e,t,6),d=n^i^o;return 0>d&&(d+=4294967296),d}var i=e("../utils"),g=e("../common"),y=e("minimalistic-assert"),m=i.rotr64_hi,_=i.rotr64_lo,S=i.shr64_hi,v=i.shr64_lo,k=i.sum64,I=i.sum64_hi,x=i.sum64_lo,A=i.sum64_4_hi,w=i.sum64_4_lo,E=i.sum64_5_hi,P=i.sum64_5_lo,B=g.BlockHash,O=[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];i.inherits(r,B),t.exports=r,r.blockSize=1024,r.outSize=512,r.hmacStrength=192,r.padLength=128,r.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;32>n;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=h(r[n-4],r[n-3]),o=b(r[n-4],r[n-3]),d=r[n-14],a=r[n-13],s=u(r[n-30],r[n-29]),f=l(r[n-30],r[n-29]),c=r[n-32],p=r[n-31];r[n]=A(i,o,d,a,s,f,c,p),r[n+1]=w(i,o,d,a,s,f,c,p)}},r.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,u=this.h[0],l=this.h[1],h=this.h[2],b=this.h[3],g=this.h[4],m=this.h[5],_=this.h[6],S=this.h[7],v=this.h[8],A=this.h[9],w=this.h[10],B=this.h[11],O=this.h[12],R=this.h[13],T=this.h[14],N=this.h[15];y(this.k.length===r.length);for(var C=0;C<r.length;C+=2){var i=T,j=N,M=c(v,A),U=p(v,A),L=n(v,A,w,B,O,R),D=o(v,A,w,B,O,R),z=this.k[C],H=this.k[C+1],K=r[C],F=r[C+1],q=E(i,j,M,U,L,D,z,H,K,F),V=P(i,j,M,U,L,D,z,H,K,F);i=s(u,l),j=f(u,l),M=d(u,l,h,b,g,m),U=a(u,l,h,b,g,m);var G=I(i,j,M,U),W=x(i,j,M,U);T=O,N=R,O=w,R=B,w=v,B=A,v=I(_,S,q,V),A=x(S,S,q,V),_=g,S=m,g=h,m=b,h=u,b=l,u=I(q,V,G,W),l=x(q,V,G,W)}k(this.h,0,u,l),k(this.h,2,h,b),k(this.h,4,g,m),k(this.h,6,_,S),k(this.h,8,v,A),k(this.h,10,w,B),k(this.h,12,O,R),k(this.h,14,T,N)},r.prototype._digest=function(e){return"hex"===e?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":175,"../utils":185,"minimalistic-assert":198}],184:[function(e,t,r){"use strict";function n(e,t,r){return e&t^~e&r}function i(e,t,r){return e&t^e&r^t&r}function o(e,t,r){return e^t^r}var d=e("../utils"),a=d.rotr32;r.ft_1=function(e,t,r,d){return 0===e?n(t,r,d):1===e||3===e?o(t,r,d):2===e?i(t,r,d):void 0},r.ch32=n,r.maj32=i,r.p32=o,r.s0_256=function(e){return a(e,2)^a(e,13)^a(e,22)},r.s1_256=function(e){return a(e,6)^a(e,11)^a(e,25)},r.g0_256=function(e){return a(e,7)^a(e,18)^e>>>3},r.g1_256=function(e){return a(e,17)^a(e,19)^e>>>10}},{"../utils":185}],185:[function(e,t,r){"use strict";function n(e){return(e>>>24|65280&e>>>8|16711680&e<<8|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function d(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var a=e("minimalistic-assert"),i=e("inherits");r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(!("string"==typeof e))for(n=0;n<e.length;n++)r[n]=0|e[n];else if(!t)for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,d=255&i;o?r.push(o,d):r.push(d)}else if("hex"===t)for(e=e.replace(/[^a-z0-9]+/ig,""),0!=e.length%2&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));return r},r.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=o(e[r].toString(16));return t},r.htonl=n,r.toHex32=function(e,t){for(var r="",o=0,i;o<e.length;o++)i=e[o],"little"===t&&(i=n(i)),r+=d(i.toString(16));return r},r.zero2=o,r.zero8=d,r.join32=function(e,t,r,n){var o=r-t;a(0==o%4);for(var d=Array(o/4),s=0,i=t;s<d.length;s++,i+=4){var f;f="big"===n?e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]:e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i],d[s]=f>>>0}return d},r.split32=function(e,t){for(var r=Array(4*e.length),n=0,i=0,o;n<e.length;n++,i+=4)o=e[n],"big"===t?(r[i]=o>>>24,r[i+1]=255&o>>>16,r[i+2]=255&o>>>8,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=255&o>>>16,r[i+1]=255&o>>>8,r[i]=255&o);return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<<t|e>>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(t,r,n,i,o){return t+r+n+i+o>>>0},r.sum64=function(e,t,r,n){var i=e[t],o=e[t+1],d=n+o>>>0,a=(d<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=d},r.sum64_hi=function(e,t,r,n){var i=(t+n>>>0<t?1:0)+e+r;return i>>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,o,d,a){var s=0,f=t;f=f+n>>>0,s+=f<t?1:0,f=f+o>>>0,s+=f<o?1:0,f=f+a>>>0,s+=f<a?1:0;var c=e+r+i+d+s;return c>>>0},r.sum64_4_lo=function(e,t,r,n,i,o,d,a){return t+n+o+a>>>0},r.sum64_5_hi=function(e,t,r,n,i,o,d,a,s,f){var c=0,p=t;p=p+n>>>0,c+=p<t?1:0,p=p+o>>>0,c+=p<o?1:0,p=p+a>>>0,c+=p<a?1:0,p=p+f>>>0,c+=p<f?1:0;var u=e+r+i+d+s+c;return u>>>0},r.sum64_5_lo=function(e,t,r,n,i,o,d,a,s,f){return t+n+o+a+f>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:186,"minimalistic-assert":198}],186:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],187:[function(e,t){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex"),d=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,d)}var n=e("hash.js"),i=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");t.exports=r,r.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest();e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},r.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var d=o.slice(0,e);return this._update(r),this._reseed++,i.encode(d,t)}},{"hash.js":174,"minimalistic-assert":198,"minimalistic-crypto-utils":199}],188:[function(e,n,i){i.read=function(t,r,n,a,f){var c=8*f-a-1,p=(1<<c)-1,u=p>>1,l=-7,h=n?f-1:0,i=n?-1:1,d=t[r+h],s,e;for(h+=i,s=d&(1<<-l)-1,d>>=-l,l+=c;0<l;s=256*s+t[r+h],h+=i,l-=8);for(e=s&(1<<-l)-1,s>>=-l,l+=a;0<l;e=256*e+t[r+h],h+=i,l-=8);if(0===s)s=1-u;else{if(s===p)return e?NaN:(d?-1:1)*Infinity;e+=o(2,a),s-=u}return(d?-1:1)*e*o(2,s-a)},i.write=function(n,a,f,p,u,l){var b=8*l-u-1,g=(1<<b)-1,y=g>>1,_=23===u?5.960464477539063e-8-6.617444900424222e-24:0,S=p?0:l-1,i=p?1:-1,d=0>a||0===a&&0>1/a?1:0,v,k,m;for(a=s(a),isNaN(a)||a===Infinity?(k=isNaN(a)?1:0,v=g):(v=h(r(a)/t),1>a*(m=o(2,-v))&&(v--,m*=2),a+=1<=v+y?_/m:_*o(2,1-y),2<=a*m&&(v++,m/=2),v+y>=g?(k=0,v=g):1<=v+y?(k=(a*m-1)*o(2,u),v+=y):(k=a*o(2,y-1)*o(2,u),v=0));8<=u;n[f+S]=255&k,S+=i,k/=256,u-=8);for(v=v<<u|k,b+=u;0<b;n[f+S]=255&v,S+=i,v/=256,b-=8);n[f+S-i]|=128*d}},{}],189:[function(e,t){var r=[].indexOf;t.exports=function(e,t){if(r)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}},{}],190:[function(e,t,r){arguments[4][186][0].apply(r,arguments)},{dup:186}],191:[function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}t.exports=function(e){return null!=e&&(r(e)||n(e)||!!e._isBuffer)}},{}],192:[function(e,t){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],193:[function(e,t,r){(function(e){(function(){function n(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function d(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2]);}return e.apply(t,r)}function a(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var d=e[i];t(n,d,r(d),e)}return n}function s(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!(!1===t(e[r],r,e)););return e}function c(e,t){for(var r=null==e?0:e.length;r--&&!(!1===t(e[r],r,e)););return e}function l(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function b(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var d=e[r];t(d,r,e)&&(o[i++]=d)}return o}function g(e,t){var r=null==e?0:e.length;return!!r&&-1<P(e,t,0)}function y(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function m(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function S(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function v(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function k(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function I(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function x(e){return e.split("")}function A(e){return e.match(Pt)||[]}function w(e,t,r){var n;return r(e,function(e,r,i){if(t(e,r,i))return n=r,!1}),n}function E(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function P(e,t,r){return t===t?te(e,t,r):E(e,O,r)}function B(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function O(e){return e!==e}function R(e,t){var r=null==e?0:e.length;return r?M(e,t)/r:Oe}function T(e){return function(t){return null==t?void 0:t[e]}}function N(e){return function(t){return null==e?void 0:e[t]}}function C(e,t,r,n,i){return i(e,function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)}),r}function j(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}function M(e,t){for(var r=-1,n=e.length,i;++r<n;){var o=t(e[r]);o!==void 0&&(i=i==void 0?o:i+o)}return i}function U(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function L(e,t){return m(t,function(t){return[t,e[t]]})}function D(e){return function(t){return e(t)}}function z(e,t){return m(t,function(t){return e[t]})}function H(e,t){return e.has(t)}function K(e,t){for(var r=-1,n=e.length;++r<n&&-1<P(t,e[r],0););return r}function F(e,t){for(var r=e.length;r--&&-1<P(t,e[r],0););return r}function q(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}function V(e){return"\\"+vr[e]}function G(e,t){return null==e?void 0:e[t]}function W(e){return br.test(e)}function Y(e){return gr.test(e)}function X(e){for(var t=[],r;!(r=e.next()).done;)t.push(r.value);return t}function Z(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function J(e,t){return function(r){return e(t(r))}}function Q(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var d=e[r];(d===t||d===pe)&&(e[r]=pe,o[i++]=r)}return o}function $(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function ee(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}function te(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function re(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}function ne(e){return W(e)?oe(e):Lr(e)}function ie(e){return W(e)?de(e):x(e)}function oe(e){for(var t=lr.lastIndex=0;lr.test(e);)++t;return t}function de(e){return e.match(lr)||[]}function ae(e){return e.match(hr)||[]}var se=200,fe="Expected a function",ce="__lodash_hash_undefined__",pe="__lodash_placeholder__",ue=1,le=2,he=4,be=1,ge=2,ye=1,me=2,_e=4,Se=8,ve=16,ke=32,Ie=64,xe=128,Ae=256,we=512,Ee=1,Pe=1/0,Be=9007199254740991,Oe=0/0,Re=4294967295,Te=[["ary",xe],["bind",ye],["bindKey",me],["curry",Se],["curryRight",ve],["flip",we],["partial",ke],["partialRight",Ie],["rearg",Ae]],Ne="[object Arguments]",Ce="[object Array]",je="[object Boolean]",Me="[object Date]",Ue="[object Error]",Le="[object Function]",De="[object GeneratorFunction]",ze="[object Map]",He="[object Number]",Ke="[object Object]",Fe="[object Promise]",qe="[object RegExp]",Ve="[object Set]",Ge="[object String]",We="[object Symbol]",Ye="[object WeakMap]",Xe="[object ArrayBuffer]",Ze="[object DataView]",Je="[object Float32Array]",Qe="[object Float64Array]",$e="[object Int8Array]",et="[object Int16Array]",tt="[object Int32Array]",rt="[object Uint8Array]",nt="[object Uint8ClampedArray]",it="[object Uint16Array]",ot="[object Uint32Array]",dt=/\b__p \+= '';/g,at=/\b(__p \+=) '' \+/g,st=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ft=/&(?:amp|lt|gt|quot|#39);/g,ct=/[&<>"']/g,pt=RegExp(ft.source),ut=RegExp(ct.source),ht=/<%-([\s\S]+?)%>/g,bt=/<%([\s\S]+?)%>/g,yt=/<%=([\s\S]+?)%>/g,lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gt=/^\w*$/,mt=/^\./,_t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,vt=RegExp(St.source),kt=/^\s+|\s+$/g,It=/^\s+/,xt=/\s+$/,At=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wt=/\{\n\/\* \[wrapped with (.+)\] \*/,Et=/,? & /,Pt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bt=/\\(\\)?/g,Ot=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Rt=/\w*$/,Tt=/^[-+]0x[0-9a-f]+$/i,Nt=/^0b[01]+$/i,Ct=/^\[object .+?Constructor\]$/,jt=/^0o[0-7]+$/i,Mt=/^(?:0|[1-9]\d*)$/,Ut=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Lt=/($^)/,Dt=/['\n\r\u2028\u2029\\]/g,zt="\\ud800-\\udfff",Ht="\\u2700-\\u27bf",Kt="a-z\\xdf-\\xf6\\xf8-\\xff",Ft="A-Z\\xc0-\\xd6\\xd8-\\xde",qt="\\xac\\xb1\\xd7\\xf7"+"\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf"+"\\u2000-\\u206f"+" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vt="['\u2019]",Gt="["+qt+"]",Wt="["+("\\u0300-\\u036f"+"\\ufe20-\\ufe2f"+"\\u20d0-\\u20ff")+"]",Yt="\\d+",Xt="["+Kt+"]",Zt="[^"+zt+qt+Yt+Ht+Kt+Ft+"]",Jt="\\ud83c[\\udffb-\\udfff]",Qt="[^"+zt+"]",$t="(?:\\ud83c[\\udde6-\\uddff]){2}",er="[\\ud800-\\udbff][\\udc00-\\udfff]",tr="["+Ft+"]",rr="(?:"+Xt+"|"+Zt+")",nr="(?:"+Vt+"(?:d|ll|m|re|s|t|ve))?",ir="(?:"+Vt+"(?:D|LL|M|RE|S|T|VE))?",or="(?:"+Wt+"|"+Jt+")"+"?",dr="["+"\\ufe0e\\ufe0f"+"]?",ar="(?:"+"\\u200d"+"(?:"+[Qt,$t,er].join("|")+")"+dr+or+")*",sr=dr+or+ar,fr="(?:"+["["+Ht+"]",$t,er].join("|")+")"+sr,cr="(?:"+[Qt+Wt+"?",Wt,$t,er,"["+zt+"]"].join("|")+")",pr=/['’]/g,ur=/[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]/g,lr=RegExp(Jt+"(?="+Jt+")|"+cr+sr,"g"),hr=RegExp([tr+"?"+Xt+"+"+nr+"(?="+[Gt,tr,"$"].join("|")+")","(?:"+tr+"|"+Zt+")"+"+"+ir+"(?="+[Gt,tr+rr,"$"].join("|")+")",tr+"?"+rr+"+"+nr,tr+"+"+ir,"\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Yt,fr].join("|"),"g"),br=/[\u200d\ud800-\udfff\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff\ufe0e\ufe0f]/,gr=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,yr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mr=-1,_r={};_r[Je]=_r[Qe]=_r[$e]=_r[et]=_r[tt]=_r[rt]=_r[nt]=_r[it]=_r[ot]=!0,_r[Ne]=_r[Ce]=_r[Xe]=_r[je]=_r[Ze]=_r[Me]=_r[Ue]=_r[Le]=_r[ze]=_r[He]=_r[Ke]=_r[qe]=_r[Ve]=_r[Ge]=_r[Ye]=!1;var Sr={};Sr[Ne]=Sr[Ce]=Sr[Xe]=Sr[Ze]=Sr[je]=Sr[Me]=Sr[Je]=Sr[Qe]=Sr[$e]=Sr[et]=Sr[tt]=Sr[ze]=Sr[He]=Sr[Ke]=Sr[qe]=Sr[Ve]=Sr[Ge]=Sr[We]=Sr[rt]=Sr[nt]=Sr[it]=Sr[ot]=!0,Sr[Ue]=Sr[Le]=Sr[Ye]=!1;var vr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kr=parseFloat,Ir=parseInt,xr="object"==typeof e&&e&&e.Object===Object&&e,Ar="object"==typeof self&&self&&self.Object===Object&&self,wr=xr||Ar||Function("return this")(),Er="object"==typeof r&&r&&!r.nodeType&&r,Pr=Er&&"object"==typeof t&&t&&!t.nodeType&&t,Br=Pr&&Pr.exports===Er,Or=Br&&xr.process,Rr=function(){try{return Or&&Or.binding&&Or.binding("util")}catch(t){}}(),Tr=Rr&&Rr.isArrayBuffer,Nr=Rr&&Rr.isDate,Cr=Rr&&Rr.isMap,jr=Rr&&Rr.isRegExp,Mr=Rr&&Rr.isSet,Ur=Rr&&Rr.isTypedArray,Lr=T("length"),Dr=N({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),zr=N({"&":"&","<":"<",">":">",'"':""","'":"'"}),Hr=N({"&":"&","<":"<",">":">",""":"\"","'":"'"}),Kr=function e(t){function r(e){if(Fo(e)&&!Ts(e)&&!(e instanceof x)){if(e instanceof _)return e;if(Nd.call(e,"__wrapped__"))return lo(e)}return new _(e)}function i(){}function _(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function x(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Re,this.__views__=[]}function N(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function de(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new oe;++t<r;)this.add(e[t])}function Pt(e){var t=this.__data__=new te(e);this.size=t.size}function zt(e,t){var r=Ts(e),n=!r&&Rs(e),i=!r&&!n&&Cs(e),o=!r&&!n&&!i&&Ds(e),d=r||n||i||o,a=d?U(e.length,wd):[],s=a.length;for(var f in e)(t||Nd.call(e,f))&&!(d&&("length"==f||i&&("offset"==f||"parent"==f)||o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Vi(f,s)))&&a.push(f);return a}function Ht(e){var t=e.length;return t?e[cn(0,t-1)]:void 0}function Kt(e,t){return fo(Yn(e),Qt(t,0,e.length))}function Ft(e){return fo(Yn(e))}function qt(e,t,r){(void 0===r||jo(e[t],r))&&(void 0!==r||t in e)||Zt(e,t,r)}function Vt(e,t,r){var n=e[t];Nd.call(e,t)&&jo(n,r)&&(void 0!==r||t in e)||Zt(e,t,r)}function Gt(e,t){for(var r=e.length;r--;)if(jo(e[r][0],t))return r;return-1}function Wt(e,t,r,n){return Ra(e,function(e,i,o){t(n,e,r(e),o)}),n}function Yt(e,t){return e&&Xn(t,nd(t),e)}function Xt(e,t){return e&&Xn(t,id(t),e)}function Zt(e,t,r){"__proto__"==t&&Jd?Jd(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Jt(e,t){for(var r=-1,n=t.length,i=_d(n);++r<n;)i[r]=null==e?void 0:td(e,t[r]);return i}function Qt(e,t,r){return e===e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}function $t(e,t,r,n,i,o){var d=t&ue,a=t&le,f;if(r&&(f=i?r(e,n,i,o):r(e)),void 0!==f)return f;if(!Ko(e))return e;var c=Ts(e);if(!c){var p=Ka(e),u=p==Le||p==De;if(Cs(e))return Mn(e,d);if(p!=Ke&&p!=Ne&&(!u||i)){if(!Sr[p])return i?e:{};f=Ki(e,p,$t,d)}else if(f=a||u?{}:Hi(e),!d)return a?Jn(e,Xt(f,e)):Zn(e,Yt(f,e))}else if(f=zi(e),!d)return Yn(e,f);o||(o=new Pt);var l=o.get(e);if(l)return l;o.set(e,f);var h=t&he?a?Bi:Pi:a?id:nd,b=c?void 0:h(e);return s(b||e,function(n,i){b&&(i=n,n=e[i]),Vt(f,i,$t(n,t,r,i,e,o))}),f}function er(e){var t=nd(e);return function(r){return tr(r,e,t)}}function tr(e,t,r){var n=r.length;if(null==e)return!n;for(e=xd(e);n--;){var i=r[n],o=t[i],d=e[i];if(void 0===d&&!(i in e)||!o(d))return!1}return!0}function rr(e,t,r){if("function"!=typeof e)throw new Ed(fe);return Va(function(){e.apply(void 0,r)},t)}function nr(e,t,r,n){var i=-1,o=g,d=!0,a=e.length,s=[],f=t.length;if(!a)return s;r&&(t=m(t,D(r))),n?(o=y,d=!1):t.length>=se&&(o=H,d=!1,t=new de(t));outer:for(;++i<a;){var c=e[i],p=null==r?c:r(c);if(c=n||0!==c?c:0,d&&p===p){for(var u=f;u--;)if(t[u]===p)continue outer;s.push(c)}else o(t,p,n)||s.push(c)}return s}function ir(e,t){var r=!0;return Ra(e,function(e,n,i){return r=!!t(e,n,i),r}),r}function or(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],d=t(o);if(null!=d&&(void 0===a?d===d&&!Wo(d):r(d,a)))var a=d,s=o}return s}function dr(e,t,r,n){var i=e.length;for(r=Zo(r),0>r&&(r=-r>i?0:i+r),n=void 0===n||n>i?i:Zo(n),0>n&&(n+=i),n=r>n?0:Jo(n);r<n;)e[r++]=t;return e}function ar(e,t){var r=[];return Ra(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function sr(e,t,r,n,i){var o=-1,d=e.length;for(r||(r=qi),i||(i=[]);++o<d;){var a=e[o];0<t&&r(a)?1<t?sr(a,t-1,r,n,i):S(i,a):!n&&(i[i.length]=a)}return i}function fr(e,t){return e&&Na(e,t,nd)}function cr(e,t){return e&&Ca(e,t,nd)}function lr(e,t){return b(t,function(t){return Do(e[t])})}function hr(e,t){t=Cn(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[co(t[r++])];return r&&r==n?e:void 0}function br(e,t,r){var n=t(e);return Ts(e)?n:S(n,r(e))}function gr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Zd&&Zd in xd(e)?Mi(e):ro(e)}function vr(e,t){return e>t}function xr(e,t){return null!=e&&Nd.call(e,t)}function Ar(e,t){return null!=e&&t in xd(e)}function Er(e,t,r){return e>=fa(t,r)&&e<sa(t,r)}function Pr(e,t,r){for(var n=r?y:g,i=e[0].length,o=e.length,d=o,a=_d(o),s=Infinity,f=[],c;d--;)c=e[d],d&&t&&(c=m(c,D(t))),s=fa(c.length,s),a[d]=!r&&(t||120<=i&&120<=c.length)?new de(d&&c):void 0;c=e[0];var p=-1,u=a[0];outer:for(;++p<i&&f.length<s;){var l=c[p],h=t?t(l):l;if(l=r||0!==l?l:0,u?!H(u,h):!n(f,h,r)){for(d=o;--d;){var b=a[d];if(b?!H(b,h):!n(e[d],h,r))continue outer}u&&u.push(h),f.push(l)}}return f}function Or(e,t,r,n){return fr(e,function(e,i,o){t(n,r(e),i,o)}),n}function Rr(e,t,r){t=Cn(t,e),e=io(e,t);var n=null==e?e:e[co(mo(t))];return null==n?void 0:d(n,e,r)}function Lr(e){return Fo(e)&&gr(e)==Ne}function Fr(e,t,r,n,i){return e===t||(null!=e&&null!=t&&(Fo(e)||Fo(t))?qr(e,t,r,n,Fr,i):e!==e&&t!==t)}function qr(e,t,r,n,i,o){var d=Ts(e),a=Ts(t),s=d?Ce:Ka(e),f=a?Ce:Ka(t);s=s==Ne?Ke:s,f=f==Ne?Ke:f;var c=s==Ke,p=f==Ke,u=s==f;if(u&&Cs(e)){if(!Cs(t))return!1;d=!0,c=!1}if(u&&!c)return o||(o=new Pt),d||Ds(e)?xi(e,t,r,n,i,o):Ai(e,t,s,r,n,i,o);if(!(r&be)){var l=c&&Nd.call(e,"__wrapped__"),h=p&&Nd.call(t,"__wrapped__");if(l||h){var b=l?e.value():e,g=h?t.value():t;return o||(o=new Pt),i(b,g,r,n,o)}}return!!u&&(o||(o=new Pt),wi(e,t,r,n,i,o))}function Vr(e,t,r,n){var i=r.length,o=i,d=!n;if(null==e)return!o;for(e=xd(e);i--;){var a=r[i];if(d&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var s=a[0],f=e[s],c=a[1];if(!(d&&a[2])){var p=new Pt;if(n)var u=n(f,c,s,e,t,p);if(void 0===u?!Fr(c,f,be|ge,n,p):!u)return!1}else if(void 0===f&&!(s in e))return!1}return!0}function Gr(e){if(!Ko(e)||Zi(e))return!1;var t=Do(e)?Dd:Ct;return t.test(po(e))}function Wr(e){return"function"==typeof e?e:null==e?ud:"object"==typeof e?Ts(e)?$r(e[0],e[1]):Qr(e):gd(e)}function Yr(e){if(!Ji(e))return aa(e);var t=[];for(var r in xd(e))Nd.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Xr(e){if(!Ko(e))return to(e);var t=Ji(e),r=[];for(var n in e)("constructor"!=n||!t&&Nd.call(e,n))&&r.push(n);return r}function Zr(e,t){return e<t}function Jr(e,t){var r=-1,n=Mo(e)?_d(e.length):[];return Ra(e,function(e,i,o){n[++r]=t(e,i,o)}),n}function Qr(e){var t=Ci(e);return 1==t.length&&t[0][2]?$i(t[0][0],t[0][1]):function(r){return r===e||Vr(r,e,t)}}function $r(e,t){return Wi(e)&&Qi(t)?$i(co(e),t):function(r){var n=td(r,e);return void 0===n&&n===t?rd(r,e):Fr(t,n,be|ge)}}function en(e,t,r,n,i){e===t||Na(t,function(o,d){if(Ko(o))i||(i=new Pt),tn(e,t,d,r,en,n,i);else{var a=n?n(e[d],o,d+"",e,t,i):void 0;void 0===a&&(a=o),qt(e,d,a)}},id)}function tn(e,t,r,n,i,o,d){var a=e[r],s=t[r],f=d.get(s);if(f)return void qt(e,r,f);var c=o?o(a,s,r+"",e,t,d):void 0,p=void 0===c;if(p){var u=Ts(s),l=!u&&Cs(s),h=!u&&!l&&Ds(s);c=s,u||l||h?Ts(a)?c=a:Uo(a)?c=Yn(a):l?(p=!1,c=Mn(s,!0)):h?(p=!1,c=Fn(s,!0)):c=[]:Vo(s)||Rs(s)?(c=a,Rs(a)?c=$o(a):(!Ko(a)||n&&Do(a))&&(c=Hi(s))):p=!1}p&&(d.set(s,c),i(c,s,n,o,d),d["delete"](s)),qt(e,r,c)}function rn(e,t){var r=e.length;if(r)return t+=0>t?r:0,Vi(t,r)?e[t]:void 0}function nn(e,t,r){var n=-1;t=m(t.length?t:[ud],D(Ti()));var i=Jr(e,function(e){var r=m(t,function(t){return t(e)});return{criteria:r,index:++n,value:e}});return j(i,function(e,t){return Vn(e,t,r)})}function on(e,t){return dn(e,t,function(t,r){return rd(e,r)})}function dn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var d=t[n],a=hr(e,d);r(a,d)&&gn(o,Cn(d,e),a)}return o}function an(e){return function(t){return hr(t,e)}}function sn(e,t,r,n){var i=n?B:P,o=-1,d=t.length,a=e;for(e===t&&(t=Yn(t)),r&&(a=m(e,D(r)));++o<d;)for(var s=0,f=t[o],c=r?r(f):f;-1<(s=i(a,c,s,n));)a!==e&&Wd.call(a,s,1),Wd.call(e,s,1);return e}function fn(e,t){for(var r=e?t.length:0,n=r-1,i;r--;)if(i=t[r],r==n||i!==o){var o=i;Vi(i)?Wd.call(e,i,1):wn(e,i)}return e}function cn(e,t){return e+ra(ua()*(t-e+1))}function pn(e,t,r,n){for(var i=-1,o=sa(ta((t-e)/(r||1)),0),d=_d(o);o--;)d[n?o:++i]=e,e+=r;return d}function un(e,t){var r="";if(!e||1>t||t>Be)return r;do t%2&&(r+=e),t=ra(t/2),t&&(e+=e);while(t);return r}function ln(e,t){return Ga(no(e,t,ud),e+"")}function hn(e){return Ht(ad(e))}function bn(e,t){var r=ad(e);return fo(r,Qt(t,0,r.length))}function gn(e,t,r,n){if(!Ko(e))return e;t=Cn(t,e);for(var i=-1,o=t.length,d=e;null!=d&&++i<o;){var a=co(t[i]),s=r;if(i!=o-1){var f=d[a];s=n?n(f,a,d):void 0,void 0===s&&(s=Ko(f)?f:Vi(t[i+1])?[]:{})}Vt(d,a,s),d=d[a]}return e}function yn(e){return fo(ad(e))}function mn(e,t,r){var n=-1,i=e.length;0>t&&(t=-t>i?0:i+t),r=r>i?i:r,0>r&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=_d(i);++n<i;)o[n]=e[n+t];return o}function _n(e,t){var r;return Ra(e,function(e,n,i){return r=t(e,n,i),!r}),!!r}function Sn(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t===t&&i<=Re>>>1){for(;n<i;){var o=n+i>>>1,d=e[o];null!==d&&!Wo(d)&&(r?d<=t:d<t)?n=o+1:i=o}return i}return vn(e,t,ud,r)}function vn(e,t,r,n){t=r(t);for(var i=0,o=null==e?0:e.length,d=t!==t,a=null===t,s=Wo(t),f=void 0===t;i<o;){var c=ra((i+o)/2),p=r(e[c]),u=void 0!==p,l=null===p,h=p===p,b=Wo(p);if(d)var g=n||h;else g=f?h&&(n||u):a?h&&u&&(n||!l):s?h&&u&&!l&&(n||!b):l||b?!1:n?p<=t:p<t;g?i=c+1:o=c}return fa(o,Re-1)}function kn(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var d=e[r],a=t?t(d):d;if(!r||!jo(a,s)){var s=a;o[i++]=0===d?0:d}}return o}function In(e){return"number"==typeof e?e:Wo(e)?Oe:+e}function xn(e){if("string"==typeof e)return e;if(Ts(e))return m(e,xn)+"";if(Wo(e))return Ba?Ba.call(e):"";var t=e+"";return"0"==t&&1/e==-Pe?"-0":t}function An(e,t,r){var n=-1,i=g,o=e.length,d=!0,a=[],s=a;if(r)d=!1,i=y;else if(o>=se){var f=t?null:La(e);if(f)return $(f);d=!1,i=H,s=new de}else s=t?[]:a;outer:for(;++n<o;){var c=e[n],p=t?t(c):c;if(c=r||0!==c?c:0,d&&p===p){for(var u=s.length;u--;)if(s[u]===p)continue outer;t&&s.push(p),a.push(c)}else i(s,p,r)||(s!==a&&s.push(p),a.push(c))}return a}function wn(e,t){return t=Cn(t,e),e=io(e,t),null==e||delete e[co(mo(t))]}function En(e,t,r,n){return gn(e,t,r(hr(e,t)),n)}function Pn(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?mn(e,n?0:o,n?o+1:i):mn(e,n?o+1:0,n?i:o)}function Bn(e,t){var r=e;return r instanceof x&&(r=r.value()),v(t,function(e,t){return t.func.apply(t.thisArg,S([e],t.args))},r)}function On(e,t,r){var n=e.length;if(2>n)return n?An(e[0]):[];for(var i=-1,o=_d(n);++i<n;)for(var d=e[i],a=-1;++a<n;)a!=i&&(o[i]=nr(o[i]||d,e[a],t,r));return An(sr(o,1),t,r)}function Rn(e,t,r){for(var n=-1,i=e.length,o=t.length,d={},a;++n<i;)a=n<o?t[n]:void 0,r(d,e[n],a);return d}function Tn(e){return Uo(e)?e:[]}function Nn(e){return"function"==typeof e?e:ud}function Cn(e,t){return Ts(e)?e:Wi(e,t)?[e]:Wa(ed(e))}function jn(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:mn(e,t,r)}function Mn(e,t){if(t)return e.slice();var r=e.length,n=Fd?Fd(r):new e.constructor(r);return e.copy(n),n}function Un(e){var t=new e.constructor(e.byteLength);return new Kd(t).set(new Kd(e)),t}function Ln(e,t){var r=t?Un(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Dn(e,t,r){var i=t?r(Z(e),ue):Z(e);return v(i,n,new e.constructor)}function zn(e){var t=new e.constructor(e.source,Rt.exec(e));return t.lastIndex=e.lastIndex,t}function Hn(e,t,r){var n=t?r($(e),ue):$(e);return v(n,o,new e.constructor)}function Kn(e){return Pa?xd(Pa.call(e)):{}}function Fn(e,t){var r=t?Un(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function qn(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=e===e,o=Wo(e),d=void 0!==t,a=null===t,s=t===t,f=Wo(t);if(!a&&!f&&!o&&e>t||o&&d&&s&&!a&&!f||n&&d&&s||!r&&s||!i)return 1;if(!n&&!o&&!f&&e<t||f&&r&&i&&!n&&!o||a&&r&&i||!d&&i||!s)return-1}return 0}function Vn(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,d=i.length,a=r.length,s;++n<d;)if(s=qn(i[n],o[n]),s){if(n>=a)return s;var f=r[n];return s*("desc"==f?-1:1)}return e.index-t.index}function Gn(e,t,r,n){for(var i=-1,o=e.length,d=r.length,a=-1,s=t.length,f=sa(o-d,0),c=_d(s+f),p=!n;++a<s;)c[a]=t[a];for(;++i<d;)(p||i<o)&&(c[r[i]]=e[i]);for(;f--;)c[a++]=e[i++];return c}function Wn(e,t,r,n){for(var i=-1,o=e.length,d=-1,a=r.length,s=-1,f=t.length,c=sa(o-a,0),p=_d(c+f),u=!n;++i<c;)p[i]=e[i];for(var l=i;++s<f;)p[l+s]=t[s];for(;++d<a;)(u||i<o)&&(p[l+r[d]]=e[i++]);return p}function Yn(e,t){var r=-1,n=e.length;for(t||(t=_d(n));++r<n;)t[r]=e[r];return t}function Xn(e,t,r,n){var i=!r;r||(r={});for(var o=-1,d=t.length;++o<d;){var a=t[o],s=n?n(r[a],e[a],a,r,e):void 0;void 0===s&&(s=e[a]),i?Zt(r,a,s):Vt(r,a,s)}return r}function Zn(e,t){return Xn(e,za(e),t)}function Jn(e,t){return Xn(e,Ha(e),t)}function Qn(e,t){return function(r,n){var i=Ts(r)?a:Wt,o=t?t():{};return i(r,e,Ti(n,2),o)}}function $n(e){return ln(function(t,r){var n=-1,i=r.length,o=1<i?r[i-1]:void 0,d=2<i?r[2]:void 0;for(o=3<e.length&&"function"==typeof o?(i--,o):void 0,d&&Gi(r[0],r[1],d)&&(o=3>i?void 0:o,i=1),t=xd(t);++n<i;){var a=r[n];a&&e(t,a,n,o)}return t})}function ei(e,t){return function(r,n){if(null==r)return r;if(!Mo(r))return e(r,n);for(var i=r.length,o=t?i:-1,d=xd(r);(t?o--:++o<i)&&!1!==n(d[o],o,d););return r}}function ti(e){return function(t,r,n){for(var i=-1,o=xd(t),d=n(t),a=d.length,s;a--&&(s=d[e?a:++i],!1!==r(o[s],s,o)););return t}}function ri(e,t,r){function n(){var t=this&&this!==wr&&this instanceof n?o:e;return t.apply(i?r:this,arguments)}var i=t&ye,o=oi(e);return n}function ni(e){return function(t){t=ed(t);var r=W(t)?ie(t):void 0,n=r?r[0]:t.charAt(0),i=r?jn(r,1).join(""):t.slice(1);return n[e]()+i}}function ii(e){return function(t){return v(cd(fd(t).replace(pr,"")),e,"")}}function oi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);}var r=Oa(e.prototype),n=e.apply(r,t);return Ko(n)?n:r}}function di(e,t,r){function n(){for(var o=arguments.length,a=_d(o),s=o,f=Ri(n);s--;)a[s]=arguments[s];var c=3>o&&a[0]!==f&&a[o-1]!==f?[]:Q(a,f);if(o-=c.length,o<r)return yi(e,t,fi,n.placeholder,void 0,a,c,void 0,void 0,r-o);var p=this&&this!==wr&&this instanceof n?i:e;return d(p,this,a)}var i=oi(e);return n}function ai(e){return function(t,r,n){var i=xd(t);if(!Mo(t)){var o=Ti(r,3);t=nd(t),r=function(e){return o(i[e],e,i)}}var d=e(t,r,n);return-1<d?i[o?t[d]:d]:void 0}}function si(e){return Ei(function(t){var r=t.length,n=r,i=_.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new Ed(fe);if(i&&!d&&"wrapper"==Oi(o))var d=new _([],!0)}for(n=d?n:r;++n<r;){o=t[n];var a=Oi(o),s="wrapper"==a?Da(o):void 0;d=s&&Xi(s[0])&&s[1]==(xe|Se|ke|Ae)&&!s[4].length&&1==s[9]?d[Oi(s[0])].apply(d,s[3]):1==o.length&&Xi(o)?d[a]():d.thru(o)}return function(){var e=arguments,n=e[0];if(d&&1==e.length&&Ts(n))return d.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}})}function fi(e,t,r,n,i,o,d,a,s,f){function c(){for(var y=arguments.length,m=_d(y),_=y;_--;)m[_]=arguments[_];if(h)var S=Ri(c),v=q(m,S);if(n&&(m=Gn(m,n,i,h)),o&&(m=Wn(m,o,d,h)),y-=v,h&&y<f){var k=Q(m,S);return yi(e,t,fi,c.placeholder,r,m,k,a,s,f-y)}var I=u?r:this,x=l?I[e]:e;return y=m.length,a?m=oo(m,a):b&&1<y&&m.reverse(),p&&s<y&&(m.length=s),this&&this!==wr&&this instanceof c&&(x=g||oi(x)),x.apply(I,m)}var p=t&xe,u=t&ye,l=t&me,h=t&(Se|ve),b=t&we,g=l?void 0:oi(e);return c}function ci(e,t){return function(r,n){return Or(r,e,t(n),{})}}function pi(e,t){return function(r,n){var i;if(void 0===r&&void 0===n)return t;if(void 0!==r&&(i=r),void 0!==n){if(void 0===i)return n;"string"==typeof r||"string"==typeof n?(r=xn(r),n=xn(n)):(r=In(r),n=In(n)),i=e(r,n)}return i}}function ui(e){return Ei(function(t){return t=m(t,D(Ti())),ln(function(r){var n=this;return e(t,function(e){return d(e,n,r)})})})}function li(e,t){t=void 0===t?" ":xn(t);var r=t.length;if(2>r)return r?un(t,e):t;var n=un(t,ta(e/ne(t)));return W(t)?jn(ie(n),0,e).join(""):n.slice(0,e)}function hi(e,t,r,n){function i(){for(var t=-1,s=arguments.length,f=-1,c=n.length,p=_d(c+s),u=this&&this!==wr&&this instanceof i?a:e;++f<c;)p[f]=n[f];for(;s--;)p[f++]=arguments[++t];return d(u,o?r:this,p)}var o=t&ye,a=oi(e);return i}function bi(e){return function(t,r,n){return n&&"number"!=typeof n&&Gi(t,r,n)&&(r=n=void 0),t=Xo(t),void 0===r?(r=t,t=0):r=Xo(r),n=void 0===n?t<r?1:-1:Xo(n),pn(t,r,n,e)}}function gi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Qo(t),r=Qo(r)),e(t,r)}}function yi(e,t,r,n,i,o,d,a,s,f){var c=t&Se,p=c?d:void 0,u=c?void 0:d,l=c?o:void 0,h=c?void 0:o;t|=c?ke:Ie,t&=~(c?Ie:ke),t&_e||(t&=~(ye|me));var b=[e,t,i,l,p,h,u,a,s,f],g=r.apply(void 0,b);return Xi(e)&&qa(g,b),g.placeholder=n,ao(g,e,t)}function mi(e){var t=Id[e];return function(e,r){if(e=Qo(e),r=null==r?0:fa(Zo(r),292),r){var n=(ed(e)+"e").split("e"),i=t(n[0]+"e"+(+n[1]+r));return n=(ed(i)+"e").split("e"),+(n[0]+"e"+(+n[1]-r))}return t(e)}}function _i(e){return function(t){var r=Ka(t);return r==ze?Z(t):r==Ve?ee(t):L(t,e(t))}}function Si(e,t,r,n,i,o,d,a){var s=t&me;if(!s&&"function"!=typeof e)throw new Ed(fe);var f=n?n.length:0;if(f||(t&=~(ke|Ie),n=i=void 0),d=void 0===d?d:sa(Zo(d),0),a=void 0===a?a:Zo(a),f-=i?i.length:0,t&Ie){var c=n,p=i;n=i=void 0}var u=s?void 0:Da(e),l=[e,t,r,n,i,c,p,o,d,a];if(u&&eo(l,u),e=l[0],t=l[1],r=l[2],n=l[3],i=l[4],a=l[9]=void 0===l[9]?s?0:e.length:sa(l[9]-f,0),!a&&t&(Se|ve)&&(t&=~(Se|ve)),!t||t==ye)var h=ri(e,t,r);else h=t==Se||t==ve?di(e,t,a):t!=ke&&t!=(ye|ke)||i.length?fi.apply(void 0,l):hi(e,t,r,n);var b=u?ja:qa;return ao(b(h,l),e,t)}function vi(e,t,r,n){return void 0===e||jo(e,Od[r])&&!Nd.call(n,r)?t:e}function ki(e,t,r,n,i,o){return Ko(e)&&Ko(t)&&(o.set(t,e),en(e,t,void 0,ki,o),o["delete"](t)),e}function Ii(e){return Vo(e)?void 0:e}function xi(e,t,r,n,i,o){var d=r&be,a=e.length,s=t.length;if(a!=s&&!(d&&s>a))return!1;var f=o.get(e);if(f&&o.get(t))return f==t;var c=-1,p=!0,u=r&ge?new de:void 0;for(o.set(e,t),o.set(t,e);++c<a;){var l=e[c],h=t[c];if(n)var b=d?n(h,l,c,t,e,o):n(l,h,c,e,t,o);if(void 0!==b){if(b)continue;p=!1;break}if(u){if(!I(t,function(e,t){if(!H(u,t)&&(l===e||i(l,e,r,n,o)))return u.push(t)})){p=!1;break}}else if(!(l===h||i(l,h,r,n,o))){p=!1;break}}return o["delete"](e),o["delete"](t),p}function Ai(e,t,r,n,i,o,d){switch(r){case Ze:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Xe:return e.byteLength==t.byteLength&&o(new Kd(e),new Kd(t));case je:case Me:case He:return jo(+e,+t);case Ue:return e.name==t.name&&e.message==t.message;case qe:case Ge:return e==t+"";case ze:var a=Z;case Ve:var s=n&be;if(a||(a=$),e.size!=t.size&&!s)return!1;var f=d.get(e);if(f)return f==t;n|=ge,d.set(e,t);var c=xi(a(e),a(t),n,i,o,d);return d["delete"](e),c;case We:if(Pa)return Pa.call(e)==Pa.call(t);}return!1}function wi(e,t,r,n,i,o){var d=r&be,a=Pi(e),s=a.length,f=Pi(t),c=f.length;if(s!=c&&!d)return!1;for(var p=s,u;p--;)if(u=a[p],d?!(u in t):!Nd.call(t,u))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var h=!0;o.set(e,t),o.set(t,e);for(var b=d;++p<s;){u=a[p];var g=e[u],y=t[u];if(n)var m=d?n(y,g,u,t,e,o):n(g,y,u,e,t,o);if(void 0===m?!(g===y||i(g,y,r,n,o)):!m){h=!1;break}b||(b="constructor"==u)}if(h&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof S&&S instanceof S)&&(h=!1)}return o["delete"](e),o["delete"](t),h}function Ei(e){return Ga(no(e,void 0,go),e+"")}function Pi(e){return br(e,nd,za)}function Bi(e){return br(e,id,Ha)}function Oi(e){for(var t=e.name+"",r=va[t],n=Nd.call(va,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function Ri(e){var t=Nd.call(r,"placeholder")?r:e;return t.placeholder}function Ti(){var e=r.iteratee||ld;return e=e===ld?Wr:e,arguments.length?e(arguments[0],arguments[1]):e}function Ni(e,t){var r=e.__data__;return Yi(t)?r["string"==typeof t?"string":"hash"]:r.map}function Ci(e){for(var t=nd(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Qi(i)]}return t}function ji(e,t){var r=G(e,t);return Gr(r)?r:void 0}function Mi(e){var t=Nd.call(e,Zd),r=e[Zd];try{e[Zd]=void 0}catch(t){}var n=Md.call(e);return t?e[Zd]=r:delete e[Zd],n}function Ui(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],d=o.size;switch(o.type){case"drop":e+=d;break;case"dropRight":t-=d;break;case"take":t=fa(t,e+d);break;case"takeRight":e=sa(e,t-d);}}return{start:e,end:t}}function Li(e){var t=e.match(wt);return t?t[1].split(Et):[]}function Di(e,t,r){t=Cn(t,e);for(var n=-1,i=t.length,o=!1,d;++n<i&&(d=co(t[n]),!!(o=null!=e&&r(e,d)));)e=e[d];return o||++n!=i?o:(i=null==e?0:e.length,!!i&&Ho(i)&&Vi(d,i)&&(Ts(e)||Rs(e)))}function zi(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&Nd.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Hi(e){return"function"!=typeof e.constructor||Ji(e)?{}:Oa(qd(e))}function Ki(e,t,r,n){var i=e.constructor;return t===Xe?Un(e):t===je||t===Me?new i(+e):t===Ze?Ln(e,n):t===Je||t===Qe||t===$e||t===et||t===tt||t===rt||t===nt||t===it||t===ot?Fn(e,n):t===ze?Dn(e,n,r):t===He||t===Ge?new i(e):t===qe?zn(e):t===Ve?Hn(e,n,r):t===We?Kn(e):void 0}function Fi(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(1<r?"& ":"")+t[n],t=t.join(2<r?", ":" "),e.replace(At,"{\n/* [wrapped with "+t+"] */\n")}function qi(e){return Ts(e)||Rs(e)||!!(Yd&&e&&e[Yd])}function Vi(e,t){return t=null==t?Be:t,!!t&&("number"==typeof e||Mt.test(e))&&-1<e&&0==e%1&&e<t}function Gi(e,t,r){if(!Ko(r))return!1;var n=typeof t;return("number"==n?!!(Mo(r)&&Vi(t,r.length)):!!("string"==n&&t in r))&&jo(r[t],e)}function Wi(e,t){if(Ts(e))return!1;var r=typeof e;return"number"==r||"symbol"==r||"boolean"==r||null==e||Wo(e)||gt.test(e)||!lt.test(e)||null!=t&&e in xd(t)}function Yi(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Xi(e){var t=Oi(e),n=r[t];if("function"!=typeof n||!(t in x.prototype))return!1;if(e===n)return!0;var i=Da(n);return!!i&&e===i[0]}function Zi(e){return!!jd&&jd in e}function Ji(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||Od;return e===r}function Qi(e){return e===e&&!Ko(e)}function $i(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in xd(r))}}function eo(e,t){var r=e[1],n=t[1],i=r|n,o=i<(ye|me|xe),d=n==xe&&r==Se||n==xe&&r==Ae&&e[7].length<=t[8]||n==(xe|Ae)&&t[7].length<=t[8]&&r==Se;if(!(o||d))return e;n&ye&&(e[2]=t[2],i|=r&ye?0:_e);var a=t[3];if(a){var s=e[3];e[3]=s?Gn(s,a,t[4]):a,e[4]=s?Q(e[3],pe):t[4]}return a=t[5],a&&(s=e[5],e[5]=s?Wn(s,a,t[6]):a,e[6]=s?Q(e[5],pe):t[6]),a=t[7],a&&(e[7]=a),n&xe&&(e[8]=null==e[8]?t[8]:fa(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function to(e){var t=[];if(null!=e)for(var r in xd(e))t.push(r);return t}function ro(e){return Md.call(e)}function no(e,t,r){return t=sa(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=sa(n.length-t,0),a=_d(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=_d(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),d(e,this,s)}}function io(e,t){return 2>t.length?e:hr(e,mn(t,0,-1))}function oo(e,t){for(var r=e.length,n=fa(t.length,r),i=Yn(e),o;n--;)o=t[n],e[n]=Vi(o,r)?i[o]:void 0;return e}function ao(e,t,r){var n=t+"";return Ga(e,Fi(n,uo(Li(n),r)))}function so(e){var t=0,r=0;return function(){var n=ca(),i=16-(n-r);if(r=n,!(0<i))t=0;else if(++t>=800)return arguments[0];return e.apply(void 0,arguments)}}function fo(e,t){var r=-1,n=e.length;for(t=void 0===t?n:t;++r<t;){var i=cn(r,n-1),o=e[i];e[i]=e[r],e[r]=o}return e.length=t,e}function co(e){if("string"==typeof e||Wo(e))return e;var t=e+"";return"0"==t&&1/e==-Pe?"-0":t}function po(e){if(null!=e){try{return Td.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function uo(e,t){return s(Te,function(r){var n="_."+r[0];t&r[1]&&!g(e,n)&&e.push(n)}),e.sort()}function lo(e){if(e instanceof x)return e.clone();var t=new _(e.__wrapped__,e.__chain__);return t.__actions__=Yn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function ho(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:Zo(r);return 0>i&&(i=sa(n+i,0)),E(e,Ti(t,3),i)}function bo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return void 0!==r&&(i=Zo(r),i=0>r?sa(n+i,0):fa(i,n-1)),E(e,Ti(t,3),i,!0)}function go(e){var t=null==e?0:e.length;return t?sr(e,1):[]}function yo(e){return e&&e.length?e[0]:void 0}function mo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}function _o(e,t){return e&&e.length&&t&&t.length?sn(e,t):e}function So(e){return null==e?e:la.call(e)}function vo(e){if(!(e&&e.length))return[];var t=0;return e=b(e,function(e){if(Uo(e))return t=sa(e.length,t),!0}),U(t,function(t){return m(e,T(t))})}function ko(e,t){if(!(e&&e.length))return[];var r=vo(e);return null==t?r:m(r,function(e){return d(t,void 0,e)})}function Io(e){var t=r(e);return t.__chain__=!0,t}function xo(e,t){return t(e)}function Ao(e,t){var r=Ts(e)?s:Ra;return r(e,Ti(t,3))}function wo(e,t){var r=Ts(e)?c:Ta;return r(e,Ti(t,3))}function Eo(e,t){var r=Ts(e)?m:Jr;return r(e,Ti(t,3))}function Po(e,t,r){return t=r?void 0:t,t=e&&null==t?e.length:t,Si(e,xe,void 0,void 0,void 0,void 0,t)}function Bo(e,t){var r;if("function"!=typeof t)throw new Ed(fe);return e=Zo(e),function(){return 0<--e&&(r=t.apply(this,arguments)),1>=e&&(t=void 0),r}}function Oo(e,t,r){t=r?void 0:t;var n=Si(e,Se,void 0,void 0,void 0,void 0,void 0,t);return n.placeholder=Oo.placeholder,n}function Ro(e,t,r){t=r?void 0:t;var n=Si(e,ve,void 0,void 0,void 0,void 0,void 0,t);return n.placeholder=Ro.placeholder,n}function To(e,t,r){function n(t){var r=h,n=b;return h=b=void 0,c=t,y=e.apply(n,r),y}function i(e){return c=e,m=Va(a,t),p?n(e):y}function o(e){var r=e-_,n=e-c,i=t-r;return u?fa(i,g-n):i}function d(e){var r=e-_,n=e-c;return void 0==_||r>=t||0>r||u&&n>=g}function a(){var e=Ss();return d(e)?s(e):void(m=Va(a,o(e)))}function s(e){return(m=void 0,l&&h)?n(e):(h=b=void 0,y)}function f(){var e=Ss(),r=d(e);if(h=arguments,b=this,_=e,r){if(void 0===m)return i(_);if(u)return m=Va(a,t),n(_)}return void 0===m&&(m=Va(a,t)),y}var c=0,p=!1,u=!1,l=!0,h,b,g,y,m,_;if("function"!=typeof e)throw new Ed(fe);return t=Qo(t)||0,Ko(r)&&(p=!!r.leading,u="maxWait"in r,g=u?sa(Qo(r.maxWait)||0,t):g,l="trailing"in r?!!r.trailing:l),f.cancel=function(){void 0!==m&&Ua(m),c=0,h=_=b=m=void 0},f.flush=function(){return void 0===m?y:s(Ss())},f}function No(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ed(fe);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var d=e.apply(this,n);return r.cache=o.set(i,d)||o,d};return r.cache=new(No.Cache||oe),r}function Co(e){if("function"!=typeof e)throw new Ed(fe);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2]);}return!e.apply(this,t)}}function jo(e,t){return e===t||e!==e&&t!==t}function Mo(e){return null!=e&&Ho(e.length)&&!Do(e)}function Uo(e){return Fo(e)&&Mo(e)}function Lo(e){if(!Fo(e))return!1;var t=gr(e);return t==Ue||t=="[object DOMException]"||"string"==typeof e.message&&"string"==typeof e.name&&!Vo(e)}function Do(e){if(!Ko(e))return!1;var t=gr(e);return t==Le||t==De||t=="[object AsyncFunction]"||t=="[object Proxy]"}function zo(e){return"number"==typeof e&&e==Zo(e)}function Ho(e){return"number"==typeof e&&-1<e&&0==e%1&&e<=Be}function Ko(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Fo(e){return null!=e&&"object"==typeof e}function qo(e){return"number"==typeof e||Fo(e)&&gr(e)==He}function Vo(e){if(!Fo(e)||gr(e)!=Ke)return!1;var t=qd(e);if(null===t)return!0;var r=Nd.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Td.call(r)==Ud}function Go(e){return"string"==typeof e||!Ts(e)&&Fo(e)&&gr(e)==Ge}function Wo(e){return"symbol"==typeof e||Fo(e)&&gr(e)==We}function Yo(e){if(!e)return[];if(Mo(e))return Go(e)?ie(e):Yn(e);if(Xd&&e[Xd])return X(e[Xd]());var t=Ka(e),r=t==ze?Z:t==Ve?$:ad;return r(e)}function Xo(e){if(!e)return 0===e?e:0;if(e=Qo(e),e===Pe||e===-Pe){var t=0>e?-1:1;return t*1.7976931348623157e308}return e===e?e:0}function Zo(e){var t=Xo(e),r=t%1;return t===t?r?t-r:t:0}function Jo(e){return e?Qt(Zo(e),0,Re):0}function Qo(e){if("number"==typeof e)return e;if(Wo(e))return Oe;if(Ko(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ko(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(kt,"");var r=Nt.test(e);return r||jt.test(e)?Ir(e.slice(2),r?2:8):Tt.test(e)?Oe:+e}function $o(e){return Xn(e,id(e))}function ed(e){return null==e?"":xn(e)}function td(e,t,r){var n=null==e?void 0:hr(e,t);return void 0===n?r:n}function rd(e,t){return null!=e&&Di(e,t,Ar)}function nd(e){return Mo(e)?zt(e):Yr(e)}function id(e){return Mo(e)?zt(e,!0):Xr(e)}function od(e,t){if(null==e)return{};var r=m(Bi(e),function(e){return[e]});return t=Ti(t),dn(e,r,function(e,r){return t(e,r[0])})}function dd(e,t,r){t=Cn(t,e);var n=-1,i=t.length;for(i||(i=1,e=void 0);++n<i;){var o=null==e?void 0:e[co(t[n])];void 0===o&&(n=i,o=r),e=Do(o)?o.call(e):o}return e}function ad(e){return null==e?[]:z(e,nd(e))}function sd(e){return uf(ed(e).toLowerCase())}function fd(e){return e=ed(e),e&&e.replace(Ut,Dr).replace(ur,"")}function cd(e,t,r){return e=ed(e),t=r?void 0:t,void 0===t?Y(e)?ae(e):A(e):e.match(t)||[]}function pd(e){return function(){return e}}function ud(e){return e}function ld(e){return Wr("function"==typeof e?e:$t(e,ue))}function hd(e,t,r){var n=nd(t),i=lr(t,n);null!=r||Ko(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=lr(t,nd(t)));var o=!(Ko(r)&&"chain"in r)||!!r.chain,d=Do(e);return s(i,function(r){var n=t[r];e[r]=n,d&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=Yn(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,S([this.value()],arguments))})}),e}function bd(){}function gd(e){return Wi(e)?T(co(e)):an(e)}function yd(){return[]}function md(){return!1}t=null==t?wr:Kr.defaults(wr.Object(),t,Kr.pick(wr,yr));var _d=t.Array,Sd=t.Date,vd=t.Error,kd=t.Function,Id=t.Math,xd=t.Object,Ad=t.RegExp,wd=t.String,Ed=t.TypeError,Pd=_d.prototype,Bd=kd.prototype,Od=xd.prototype,Rd=t["__core-js_shared__"],Td=Bd.toString,Nd=Od.hasOwnProperty,Cd=0,jd=function(){var e=/[^.]+$/.exec(Rd&&Rd.keys&&Rd.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Md=Od.toString,Ud=Td.call(xd),Ld=wr._,Dd=Ad("^"+Td.call(Nd).replace(St,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zd=Br?t.Buffer:void 0,Hd=t.Symbol,Kd=t.Uint8Array,Fd=zd?zd.allocUnsafe:void 0,qd=J(xd.getPrototypeOf,xd),Vd=xd.create,Gd=Od.propertyIsEnumerable,Wd=Pd.splice,Yd=Hd?Hd.isConcatSpreadable:void 0,Xd=Hd?Hd.iterator:void 0,Zd=Hd?Hd.toStringTag:void 0,Jd=function(){try{var e=ji(xd,"defineProperty");return e({},"",{}),e}catch(t){}}(),Qd=t.clearTimeout!==wr.clearTimeout&&t.clearTimeout,$d=Sd&&Sd.now!==wr.Date.now&&Sd.now,ea=t.setTimeout!==wr.setTimeout&&t.setTimeout,ta=p,ra=h,na=xd.getOwnPropertySymbols,ia=zd?zd.isBuffer:void 0,oa=t.isFinite,da=Pd.join,aa=J(xd.keys,xd),sa=f,fa=u,ca=Sd.now,pa=t.parseInt,ua=Id.random,la=Pd.reverse,ha=ji(t,"DataView"),ba=ji(t,"Map"),ga=ji(t,"Promise"),ya=ji(t,"Set"),ma=ji(t,"WeakMap"),_a=ji(xd,"create"),Sa=ma&&new ma,va={},ka=po(ha),Ia=po(ba),xa=po(ga),Aa=po(ya),wa=po(ma),Ea=Hd?Hd.prototype:void 0,Pa=Ea?Ea.valueOf:void 0,Ba=Ea?Ea.toString:void 0,Oa=function(){function e(){}return function(t){if(!Ko(t))return{};if(Vd)return Vd(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();r.templateSettings={escape:ht,evaluate:bt,interpolate:yt,variable:"",imports:{_:r}},r.prototype=i.prototype,r.prototype.constructor=r,_.prototype=Oa(i.prototype),_.prototype.constructor=_,x.prototype=Oa(i.prototype),x.prototype.constructor=x,N.prototype.clear=function(){this.__data__=_a?_a(null):{},this.size=0},N.prototype["delete"]=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},N.prototype.get=function(e){var t=this.__data__;if(_a){var r=t[e];return r===ce?void 0:r}return Nd.call(t,e)?t[e]:void 0},N.prototype.has=function(e){var t=this.__data__;return _a?void 0!==t[e]:Nd.call(t,e)},N.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_a&&void 0===t?ce:t,this},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype["delete"]=function(e){var t=this.__data__,r=Gt(t,e);if(0>r)return!1;var n=t.length-1;return r==n?t.pop():Wd.call(t,r,1),--this.size,!0},te.prototype.get=function(e){var t=this.__data__,r=Gt(t,e);return 0>r?void 0:t[r][1]},te.prototype.has=function(e){return-1<Gt(this.__data__,e)},te.prototype.set=function(e,t){var r=this.__data__,n=Gt(r,e);return 0>n?(++this.size,r.push([e,t])):r[n][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new N,map:new(ba||te),string:new N}},oe.prototype["delete"]=function(e){var t=Ni(this,e)["delete"](e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return Ni(this,e).get(e)},oe.prototype.has=function(e){return Ni(this,e).has(e)},oe.prototype.set=function(e,t){var r=Ni(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},de.prototype.add=de.prototype.push=function(e){return this.__data__.set(e,ce),this},de.prototype.has=function(e){return this.__data__.has(e)},Pt.prototype.clear=function(){this.__data__=new te,this.size=0},Pt.prototype["delete"]=function(e){var t=this.__data__,r=t["delete"](e);return this.size=t.size,r},Pt.prototype.get=function(e){return this.__data__.get(e)},Pt.prototype.has=function(e){return this.__data__.has(e)},Pt.prototype.set=function(e,t){var r=this.__data__;if(r instanceof te){var n=r.__data__;if(!ba||n.length<se-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new oe(n)}return r.set(e,t),this.size=r.size,this};var Ra=ei(fr),Ta=ei(cr,!0),Na=ti(),Ca=ti(!0),ja=Sa?function(e,t){return Sa.set(e,t),e}:ud,Ma=Jd?function(e,t){return Jd(e,"toString",{configurable:!0,enumerable:!1,value:pd(t),writable:!0})}:ud,Ua=Qd||function(e){return wr.clearTimeout(e)},La=ya&&1/$(new ya([,-0]))[1]==Pe?function(e){return new ya(e)}:bd,Da=Sa?function(e){return Sa.get(e)}:bd,za=na?function(e){return null==e?[]:(e=xd(e),b(na(e),function(t){return Gd.call(e,t)}))}:yd,Ha=na?function(e){for(var t=[];e;)S(t,za(e)),e=qd(e);return t}:yd,Ka=gr;(ha&&Ka(new ha(new ArrayBuffer(1)))!=Ze||ba&&Ka(new ba)!=ze||ga&&Ka(ga.resolve())!=Fe||ya&&Ka(new ya)!=Ve||ma&&Ka(new ma)!=Ye)&&(Ka=function(e){var t=gr(e),r=t==Ke?e.constructor:void 0,n=r?po(r):"";if(n)switch(n){case ka:return Ze;case Ia:return ze;case xa:return Fe;case Aa:return Ve;case wa:return Ye;}return t});var Fa=Rd?Do:md,qa=so(ja),Va=ea||function(e,t){return wr.setTimeout(e,t)},Ga=so(Ma),Wa=function(e){var t=No(e,function(e){return r.size===500&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return mt.test(e)&&t.push(""),e.replace(_t,function(e,r,n,i){t.push(n?i.replace(Bt,"$1"):r||e)}),t}),Ya=ln(function(e,t){return Uo(e)?nr(e,sr(t,1,Uo,!0)):[]}),Xa=ln(function(e,t){var r=mo(t);return Uo(r)&&(r=void 0),Uo(e)?nr(e,sr(t,1,Uo,!0),Ti(r,2)):[]}),Za=ln(function(e,t){var r=mo(t);return Uo(r)&&(r=void 0),Uo(e)?nr(e,sr(t,1,Uo,!0),void 0,r):[]}),Ja=ln(function(e){var t=m(e,Tn);return t.length&&t[0]===e[0]?Pr(t):[]}),Qa=ln(function(e){var t=mo(e),r=m(e,Tn);return t===mo(r)?t=void 0:r.pop(),r.length&&r[0]===e[0]?Pr(r,Ti(t,2)):[]}),$a=ln(function(e){var t=mo(e),r=m(e,Tn);return t="function"==typeof t?t:void 0,t&&r.pop(),r.length&&r[0]===e[0]?Pr(r,void 0,t):[]}),es=ln(_o),ts=Ei(function(e,t){var r=null==e?0:e.length,n=Jt(e,t);return fn(e,m(t,function(e){return Vi(e,r)?+e:e}).sort(qn)),n}),rs=ln(function(e){return An(sr(e,1,Uo,!0))}),ns=ln(function(e){var t=mo(e);return Uo(t)&&(t=void 0),An(sr(e,1,Uo,!0),Ti(t,2))}),is=ln(function(e){var t=mo(e);return t="function"==typeof t?t:void 0,An(sr(e,1,Uo,!0),void 0,t)}),os=ln(function(e,t){return Uo(e)?nr(e,t):[]}),ds=ln(function(e){return On(b(e,Uo))}),as=ln(function(e){var t=mo(e);return Uo(t)&&(t=void 0),On(b(e,Uo),Ti(t,2))}),ss=ln(function(e){var t=mo(e);return t="function"==typeof t?t:void 0,On(b(e,Uo),void 0,t)}),fs=ln(vo),cs=ln(function(e){var t=e.length,r=1<t?e[t-1]:void 0;return r="function"==typeof r?(e.pop(),r):void 0,ko(e,r)}),ps=Ei(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return Jt(t,e)};return 1<t||this.__actions__.length||!(n instanceof x)||!Vi(r)?this.thru(i):(n=n.slice(r,+r+(t?1:0)),n.__actions__.push({func:xo,args:[i],thisArg:void 0}),new _(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e}))}),us=Qn(function(e,t,r){Nd.call(e,r)?++e[r]:Zt(e,r,1)}),ls=ai(ho),hs=ai(bo),bs=Qn(function(e,t,r){Nd.call(e,r)?e[r].push(t):Zt(e,r,[t])}),gs=ln(function(e,t,r){var n=-1,i=Mo(e)?_d(e.length):[];return Ra(e,function(e){i[++n]="function"==typeof t?d(t,e,r):Rr(e,t,r)}),i}),ys=Qn(function(e,t,r){Zt(e,r,t)}),ms=Qn(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]}),_s=ln(function(e,t){if(null==e)return[];var r=t.length;return 1<r&&Gi(e,t[0],t[1])?t=[]:2<r&&Gi(t[0],t[1],t[2])&&(t=[t[0]]),nn(e,sr(t,1),[])}),Ss=$d||function(){return wr.Date.now()},vs=ln(function(e,t,r){var n=ye;if(r.length){var i=Q(r,Ri(vs));n|=ke}return Si(e,n,t,r,i)}),ks=ln(function(e,t,r){var n=ye|me;if(r.length){var i=Q(r,Ri(ks));n|=ke}return Si(t,n,e,r,i)}),Is=ln(function(e,t){return rr(e,1,t)}),xs=ln(function(e,t,r){return rr(e,Qo(t)||0,r)});No.Cache=oe;var As=ln(function(e,t){t=1==t.length&&Ts(t[0])?m(t[0],D(Ti())):m(sr(t,1),D(Ti()));var r=t.length;return ln(function(n){for(var i=-1,o=fa(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return d(e,this,n)})}),ws=ln(function(e,t){var r=Q(t,Ri(ws));return Si(e,ke,void 0,t,r)}),Es=ln(function(e,t){var r=Q(t,Ri(Es));return Si(e,Ie,void 0,t,r)}),Ps=Ei(function(e,t){return Si(e,Ae,void 0,void 0,void 0,t)}),Bs=gi(vr),Os=gi(function(e,t){return e>=t}),Rs=Lr(function(){return arguments}())?Lr:function(e){return Fo(e)&&Nd.call(e,"callee")&&!Gd.call(e,"callee")},Ts=_d.isArray,Ns=Tr?D(Tr):function(e){return Fo(e)&&gr(e)==Xe},Cs=ia||md,js=Nr?D(Nr):function(e){return Fo(e)&&gr(e)==Me},Ms=Cr?D(Cr):function(e){return Fo(e)&&Ka(e)==ze},Us=jr?D(jr):function(e){return Fo(e)&&gr(e)==qe},Ls=Mr?D(Mr):function(e){return Fo(e)&&Ka(e)==Ve},Ds=Ur?D(Ur):function(e){return Fo(e)&&Ho(e.length)&&!!_r[gr(e)]},zs=gi(Zr),Hs=gi(function(e,t){return e<=t}),Ks=$n(function(e,t){if(Ji(t)||Mo(t))return void Xn(t,nd(t),e);for(var r in t)Nd.call(t,r)&&Vt(e,r,t[r])}),Fs=$n(function(e,t){Xn(t,id(t),e)}),qs=$n(function(e,t,r,n){Xn(t,id(t),e,n)}),Vs=$n(function(e,t,r,n){Xn(t,nd(t),e,n)}),Gs=Ei(Jt),Ws=ln(function(e){return e.push(void 0,vi),d(qs,void 0,e)}),Ys=ln(function(e){return e.push(void 0,ki),d($s,void 0,e)}),Xs=ci(function(e,t,r){e[t]=r},pd(ud)),Zs=ci(function(e,t,r){Nd.call(e,t)?e[t].push(r):e[t]=[r]},Ti),Js=ln(Rr),Qs=$n(function(e,t,r){en(e,t,r)}),$s=$n(function(e,t,r,n){en(e,t,r,n)}),ef=Ei(function(e,t){var r={};if(null==e)return r;var n=!1;t=m(t,function(t){return t=Cn(t,e),n||(n=1<t.length),t}),Xn(e,Bi(e),r),n&&(r=$t(r,ue|le|he,Ii));for(var i=t.length;i--;)wn(r,t[i]);return r}),tf=Ei(function(e,t){return null==e?{}:on(e,t)}),rf=_i(nd),nf=_i(id),of=ii(function(e,t,r){return t=t.toLowerCase(),e+(r?sd(t):t)}),df=ii(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),af=ii(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),sf=ni("toLowerCase"),ff=ii(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),cf=ii(function(e,t,r){return e+(r?" ":"")+uf(t)}),pf=ii(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),uf=ni("toUpperCase"),lf=ln(function(e,t){try{return d(e,void 0,t)}catch(t){return Lo(t)?t:new vd(t)}}),hf=Ei(function(e,t){return s(t,function(t){t=co(t),Zt(e,t,vs(e[t],e))}),e}),bf=si(),gf=si(!0),yf=ln(function(e,t){return function(r){return Rr(r,e,t)}}),mf=ln(function(e,t){return function(r){return Rr(e,r,t)}}),_f=ui(m),Sf=ui(l),vf=ui(I),kf=bi(),If=bi(!0),xf=pi(function(e,t){return e+t},0),Af=mi("ceil"),wf=pi(function(e,t){return e/t},1),Ef=mi("floor"),Pf=pi(function(e,t){return e*t},1),Bf=mi("round"),Of=pi(function(e,t){return e-t},0);return r.after=function(e,t){if("function"!=typeof t)throw new Ed(fe);return e=Zo(e),function(){if(1>--e)return t.apply(this,arguments)}},r.ary=Po,r.assign=Ks,r.assignIn=Fs,r.assignInWith=qs,r.assignWith=Vs,r.at=Gs,r.before=Bo,r.bind=vs,r.bindAll=hf,r.bindKey=ks,r.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ts(e)?e:[e]},r.chain=Io,r.chunk=function(e,t,r){t=(r?Gi(e,t,r):void 0===t)?1:sa(Zo(t),0);var n=null==e?0:e.length;if(!n||1>t)return[];for(var i=0,o=0,d=_d(ta(n/t));i<n;)d[o++]=mn(e,i,i+=t);return d},r.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[],o;++t<r;)o=e[t],o&&(i[n++]=o);return i},r.concat=function(){var e=arguments.length;if(!e)return[];for(var t=_d(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return S(Ts(r)?Yn(r):[r],sr(t,1))},r.cond=function(e){var t=null==e?0:e.length,r=Ti();return e=t?m(e,function(e){if("function"!=typeof e[1])throw new Ed(fe);return[r(e[0]),e[1]]}):[],ln(function(r){for(var n=-1,i;++n<t;)if(i=e[n],d(i[0],this,r))return d(i[1],this,r)})},r.conforms=function(e){return er($t(e,ue))},r.constant=pd,r.countBy=us,r.create=function(e,t){var r=Oa(e);return null==t?r:Yt(r,t)},r.curry=Oo,r.curryRight=Ro,r.debounce=To,r.defaults=Ws,r.defaultsDeep=Ys,r.defer=Is,r.delay=xs,r.difference=Ya,r.differenceBy=Xa,r.differenceWith=Za,r.drop=function(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:Zo(t),mn(e,0>t?0:t,n)):[]},r.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:Zo(t),t=n-t,mn(e,0,0>t?0:t)):[]},r.dropRightWhile=function(e,t){return e&&e.length?Pn(e,Ti(t,3),!0,!0):[]},r.dropWhile=function(e,t){return e&&e.length?Pn(e,Ti(t,3),!0):[]},r.fill=function(e,t,r,n){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Gi(e,t,r)&&(r=0,n=i),dr(e,t,r,n)):[]},r.filter=function(e,t){var r=Ts(e)?b:ar;return r(e,Ti(t,3))},r.flatMap=function(e,t){return sr(Eo(e,t),1)},r.flatMapDeep=function(e,t){return sr(Eo(e,t),Pe)},r.flatMapDepth=function(e,t,r){return r=void 0===r?1:Zo(r),sr(Eo(e,t),r)},r.flatten=go,r.flattenDeep=function(e){var t=null==e?0:e.length;return t?sr(e,Pe):[]},r.flattenDepth=function(e,t){var r=null==e?0:e.length;return r?(t=void 0===t?1:Zo(t),sr(e,t)):[]},r.flip=function(e){return Si(e,we)},r.flow=bf,r.flowRight=gf,r.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={},i;++t<r;)i=e[t],n[i[0]]=i[1];return n},r.functions=function(e){return null==e?[]:lr(e,nd(e))},r.functionsIn=function(e){return null==e?[]:lr(e,id(e))},r.groupBy=bs,r.initial=function(e){var t=null==e?0:e.length;return t?mn(e,0,-1):[]},r.intersection=Ja,r.intersectionBy=Qa,r.intersectionWith=$a,r.invert=Xs,r.invertBy=Zs,r.invokeMap=gs,r.iteratee=ld,r.keyBy=ys,r.keys=nd,r.keysIn=id,r.map=Eo,r.mapKeys=function(e,t){var r={};return t=Ti(t,3),fr(e,function(e,n,i){Zt(r,t(e,n,i),e)}),r},r.mapValues=function(e,t){var r={};return t=Ti(t,3),fr(e,function(e,n,i){Zt(r,n,t(e,n,i))}),r},r.matches=function(e){return Qr($t(e,ue))},r.matchesProperty=function(e,t){return $r(e,$t(t,ue))},r.memoize=No,r.merge=Qs,r.mergeWith=$s,r.method=yf,r.methodOf=mf,r.mixin=hd,r.negate=Co,r.nthArg=function(e){return e=Zo(e),ln(function(t){return rn(t,e)})},r.omit=ef,r.omitBy=function(e,t){return od(e,Co(Ti(t)))},r.once=function(e){return Bo(2,e)},r.orderBy=function(e,t,r,n){return null==e?[]:(Ts(t)||(t=null==t?[]:[t]),r=n?void 0:r,Ts(r)||(r=null==r?[]:[r]),nn(e,t,r))},r.over=_f,r.overArgs=As,r.overEvery=Sf,r.overSome=vf,r.partial=ws,r.partialRight=Es,r.partition=ms,r.pick=tf,r.pickBy=od,r.property=gd,r.propertyOf=function(e){return function(t){return null==e?void 0:hr(e,t)}},r.pull=es,r.pullAll=_o,r.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?sn(e,t,Ti(r,2)):e},r.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?sn(e,t,void 0,r):e},r.pullAt=ts,r.range=kf,r.rangeRight=If,r.rearg=Ps,r.reject=function(e,t){var r=Ts(e)?b:ar;return r(e,Co(Ti(t,3)))},r.remove=function(e,t){var r=[];if(!(e&&e.length))return r;var n=-1,i=[],o=e.length;for(t=Ti(t,3);++n<o;){var d=e[n];t(d,n,e)&&(r.push(d),i.push(n))}return fn(e,i),r},r.rest=function(e,t){if("function"!=typeof e)throw new Ed(fe);return t=void 0===t?t:Zo(t),ln(e,t)},r.reverse=So,r.sampleSize=function(e,t,r){t=(r?Gi(e,t,r):void 0===t)?1:Zo(t);var n=Ts(e)?Kt:bn;return n(e,t)},r.set=function(e,t,r){return null==e?e:gn(e,t,r)},r.setWith=function(e,t,r,n){return n="function"==typeof n?n:void 0,null==e?e:gn(e,t,r,n)},r.shuffle=function(e){var t=Ts(e)?Ft:yn;return t(e)},r.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&Gi(e,t,r)?(t=0,r=n):(t=null==t?0:Zo(t),r=void 0===r?n:Zo(r)),mn(e,t,r)):[]},r.sortBy=_s,r.sortedUniq=function(e){return e&&e.length?kn(e):[]},r.sortedUniqBy=function(e,t){return e&&e.length?kn(e,Ti(t,2)):[]},r.split=function(e,t,r){return(r&&"number"!=typeof r&&Gi(e,t,r)&&(t=r=void 0),r=void 0===r?Re:r>>>0,!r)?[]:(e=ed(e),e&&("string"==typeof t||null!=t&&!Us(t))&&(t=xn(t),!t&&W(e))?jn(ie(e),0,r):e.split(t,r))},r.spread=function(e,t){if("function"!=typeof e)throw new Ed(fe);return t=null==t?0:sa(Zo(t),0),ln(function(r){var n=r[t],i=jn(r,0,t);return n&&S(i,n),d(e,this,i)})},r.tail=function(e){var t=null==e?0:e.length;return t?mn(e,1,t):[]},r.take=function(e,t,r){return e&&e.length?(t=r||void 0===t?1:Zo(t),mn(e,0,0>t?0:t)):[]},r.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:Zo(t),t=n-t,mn(e,0>t?0:t,n)):[]},r.takeRightWhile=function(e,t){return e&&e.length?Pn(e,Ti(t,3),!1,!0):[]},r.takeWhile=function(e,t){return e&&e.length?Pn(e,Ti(t,3)):[]},r.tap=function(e,t){return t(e),e},r.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Ed(fe);return Ko(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),To(e,t,{leading:n,maxWait:t,trailing:i})},r.thru=xo,r.toArray=Yo,r.toPairs=rf,r.toPairsIn=nf,r.toPath=function(e){return Ts(e)?m(e,co):Wo(e)?[e]:Yn(Wa(ed(e)))},r.toPlainObject=$o,r.transform=function(e,t,r){var n=Ts(e),i=n||Cs(e)||Ds(e);if(t=Ti(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Ko(e)?Do(o)?Oa(qd(e)):{}:{}}return(i?s:fr)(e,function(e,n,i){return t(r,e,n,i)}),r},r.unary=function(e){return Po(e,1)},r.union=rs,r.unionBy=ns,r.unionWith=is,r.uniq=function(e){return e&&e.length?An(e):[]},r.uniqBy=function(e,t){return e&&e.length?An(e,Ti(t,2)):[]},r.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?An(e,void 0,t):[]},r.unset=function(e,t){return null==e||wn(e,t)},r.unzip=vo,r.unzipWith=ko,r.update=function(e,t,r){return null==e?e:En(e,t,Nn(r))},r.updateWith=function(e,t,r,n){return n="function"==typeof n?n:void 0,null==e?e:En(e,t,Nn(r),n)},r.values=ad,r.valuesIn=function(e){return null==e?[]:z(e,id(e))},r.without=os,r.words=cd,r.wrap=function(e,t){return ws(Nn(t),e)},r.xor=ds,r.xorBy=as,r.xorWith=ss,r.zip=fs,r.zipObject=function(e,t){return Rn(e||[],t||[],Vt)},r.zipObjectDeep=function(e,t){return Rn(e||[],t||[],gn)},r.zipWith=cs,r.entries=rf,r.entriesIn=nf,r.extend=Fs,r.extendWith=qs,hd(r,r),r.add=xf,r.attempt=lf,r.camelCase=of,r.capitalize=sd,r.ceil=Af,r.clamp=function(e,t,r){return void 0===r&&(r=t,t=void 0),void 0!==r&&(r=Qo(r),r=r===r?r:0),void 0!==t&&(t=Qo(t),t=t===t?t:0),Qt(Qo(e),t,r)},r.clone=function(e){return $t(e,he)},r.cloneDeep=function(e){return $t(e,ue|he)},r.cloneDeepWith=function(e,t){return t="function"==typeof t?t:void 0,$t(e,ue|he,t)},r.cloneWith=function(e,t){return t="function"==typeof t?t:void 0,$t(e,he,t)},r.conformsTo=function(e,t){return null==t||tr(e,t,nd(t))},r.deburr=fd,r.defaultTo=function(e,t){return null==e||e!==e?t:e},r.divide=wf,r.endsWith=function(e,t,r){e=ed(e),t=xn(t);var n=e.length;r=void 0===r?n:Qt(Zo(r),0,n);var i=r;return r-=t.length,0<=r&&e.slice(r,i)==t},r.eq=jo,r.escape=function(e){return e=ed(e),e&&ut.test(e)?e.replace(ct,zr):e},r.escapeRegExp=function(e){return e=ed(e),e&&vt.test(e)?e.replace(St,"\\$&"):e},r.every=function(e,t,r){var n=Ts(e)?l:ir;return r&&Gi(e,t,r)&&(t=void 0),n(e,Ti(t,3))},r.find=ls,r.findIndex=ho,r.findKey=function(e,t){return w(e,Ti(t,3),fr)},r.findLast=hs,r.findLastIndex=bo,r.findLastKey=function(e,t){return w(e,Ti(t,3),cr)},r.floor=Ef,r.forEach=Ao,r.forEachRight=wo,r.forIn=function(e,t){return null==e?e:Na(e,Ti(t,3),id)},r.forInRight=function(e,t){return null==e?e:Ca(e,Ti(t,3),id)},r.forOwn=function(e,t){return e&&fr(e,Ti(t,3))},r.forOwnRight=function(e,t){return e&&cr(e,Ti(t,3))},r.get=td,r.gt=Bs,r.gte=Os,r.has=function(e,t){return null!=e&&Di(e,t,xr)},r.hasIn=rd,r.head=yo,r.identity=ud,r.includes=function(e,t,r,n){e=Mo(e)?e:ad(e),r=r&&!n?Zo(r):0;var i=e.length;return 0>r&&(r=sa(i+r,0)),Go(e)?r<=i&&-1<e.indexOf(t,r):!!i&&-1<P(e,t,r)},r.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:Zo(r);return 0>i&&(i=sa(n+i,0)),P(e,t,i)},r.inRange=function(e,t,r){return t=Xo(t),void 0===r?(r=t,t=0):r=Xo(r),e=Qo(e),Er(e,t,r)},r.invoke=Js,r.isArguments=Rs,r.isArray=Ts,r.isArrayBuffer=Ns,r.isArrayLike=Mo,r.isArrayLikeObject=Uo,r.isBoolean=function(e){return!0===e||!1===e||Fo(e)&&gr(e)==je},r.isBuffer=Cs,r.isDate=js,r.isElement=function(e){return Fo(e)&&1===e.nodeType&&!Vo(e)},r.isEmpty=function(e){if(null==e)return!0;if(Mo(e)&&(Ts(e)||"string"==typeof e||"function"==typeof e.splice||Cs(e)||Ds(e)||Rs(e)))return!e.length;var t=Ka(e);if(t==ze||t==Ve)return!e.size;if(Ji(e))return!Yr(e).length;for(var r in e)if(Nd.call(e,r))return!1;return!0},r.isEqual=function(e,t){return Fr(e,t)},r.isEqualWith=function(e,t,r){r="function"==typeof r?r:void 0;var n=r?r(e,t):void 0;return void 0===n?Fr(e,t,void 0,r):!!n},r.isError=Lo,r.isFinite=function(e){return"number"==typeof e&&oa(e)},r.isFunction=Do,r.isInteger=zo,r.isLength=Ho,r.isMap=Ms,r.isMatch=function(e,t){return e===t||Vr(e,t,Ci(t))},r.isMatchWith=function(e,t,r){return r="function"==typeof r?r:void 0,Vr(e,t,Ci(t),r)},r.isNaN=function(e){return qo(e)&&e!=+e},r.isNative=function(e){if(Fa(e))throw new vd("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Gr(e)},r.isNil=function(e){return null==e},r.isNull=function(e){return null===e},r.isNumber=qo,r.isObject=Ko,r.isObjectLike=Fo,r.isPlainObject=Vo,r.isRegExp=Us,r.isSafeInteger=function(e){return zo(e)&&e>=-Be&&e<=Be},r.isSet=Ls,r.isString=Go,r.isSymbol=Wo,r.isTypedArray=Ds,r.isUndefined=function(e){return void 0===e},r.isWeakMap=function(e){return Fo(e)&&Ka(e)==Ye},r.isWeakSet=function(e){return Fo(e)&&gr(e)=="[object WeakSet]"},r.join=function(e,t){return null==e?"":da.call(e,t)},r.kebabCase=df,r.last=mo,r.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return void 0!==r&&(i=Zo(r),i=0>i?sa(n+i,0):fa(i,n-1)),t===t?re(e,t,i):E(e,O,i,!0)},r.lowerCase=af,r.lowerFirst=sf,r.lt=zs,r.lte=Hs,r.max=function(e){return e&&e.length?or(e,ud,vr):void 0},r.maxBy=function(e,t){return e&&e.length?or(e,Ti(t,2),vr):void 0},r.mean=function(e){return R(e,ud)},r.meanBy=function(e,t){return R(e,Ti(t,2))},r.min=function(e){return e&&e.length?or(e,ud,Zr):void 0},r.minBy=function(e,t){return e&&e.length?or(e,Ti(t,2),Zr):void 0},r.stubArray=yd,r.stubFalse=md,r.stubObject=function(){return{}},r.stubString=function(){return""},r.stubTrue=function(){return!0},r.multiply=Pf,r.nth=function(e,t){return e&&e.length?rn(e,Zo(t)):void 0},r.noConflict=function(){return wr._===this&&(wr._=Ld),this},r.noop=bd,r.now=Ss,r.pad=function(e,t,r){e=ed(e),t=Zo(t);var n=t?ne(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return li(ra(i),r)+e+li(ta(i),r)},r.padEnd=function(e,t,r){e=ed(e),t=Zo(t);var n=t?ne(e):0;return t&&n<t?e+li(t-n,r):e},r.padStart=function(e,t,r){e=ed(e),t=Zo(t);var n=t?ne(e):0;return t&&n<t?li(t-n,r)+e:e},r.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),pa(ed(e).replace(It,""),t||0)},r.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Gi(e,t,r)&&(t=r=void 0),void 0===r&&("boolean"==typeof t?(r=t,t=void 0):"boolean"==typeof e&&(r=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=Xo(e),void 0===t?(t=e,e=0):t=Xo(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var i=ua();return fa(e+i*(t-e+kr("1e-"+((i+"").length-1))),t)}return cn(e,t)},r.reduce=function(e,t,r){var n=Ts(e)?v:C,i=3>arguments.length;return n(e,Ti(t,4),r,i,Ra)},r.reduceRight=function(e,t,r){var n=Ts(e)?k:C,i=3>arguments.length;return n(e,Ti(t,4),r,i,Ta)},r.repeat=function(e,t,r){return t=(r?Gi(e,t,r):void 0===t)?1:Zo(t),un(ed(e),t)},r.replace=function(){var e=arguments,t=ed(e[0]);return 3>e.length?t:t.replace(e[1],e[2])},r.result=dd,r.round=Bf,r.runInContext=e,r.sample=function(e){var t=Ts(e)?Ht:hn;return t(e)},r.size=function(e){if(null==e)return 0;if(Mo(e))return Go(e)?ne(e):e.length;var t=Ka(e);return t==ze||t==Ve?e.size:Yr(e).length},r.snakeCase=ff,r.some=function(e,t,r){var n=Ts(e)?I:_n;return r&&Gi(e,t,r)&&(t=void 0),n(e,Ti(t,3))},r.sortedIndex=function(e,t){return Sn(e,t)},r.sortedIndexBy=function(e,t,r){return vn(e,t,Ti(r,2))},r.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=Sn(e,t);if(n<r&&jo(e[n],t))return n}return-1},r.sortedLastIndex=function(e,t){return Sn(e,t,!0)},r.sortedLastIndexBy=function(e,t,r){return vn(e,t,Ti(r,2),!0)},r.sortedLastIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=Sn(e,t,!0)-1;if(jo(e[n],t))return n}return-1},r.startCase=cf,r.startsWith=function(e,t,r){return e=ed(e),r=null==r?0:Qt(Zo(r),0,e.length),t=xn(t),e.slice(r,r+t.length)==t},r.subtract=Of,r.sum=function(e){return e&&e.length?M(e,ud):0},r.sumBy=function(e,t){return e&&e.length?M(e,Ti(t,2)):0},r.template=function(e,t,n){var i=r.templateSettings;n&&Gi(e,t,n)&&(t=void 0),e=ed(e),t=qs({},t,i,vi);var o=qs({},t.imports,i.imports,vi),d=nd(o),a=z(o,d),s=0,f=t.interpolate||Lt,c="__p += '",p=Ad((t.escape||Lt).source+"|"+f.source+"|"+(f===yt?Ot:Lt).source+"|"+(t.evaluate||Lt).source+"|$","g"),u="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++mr+"]")+"\n",l,h;e.replace(p,function(t,r,n,i,o,d){return n||(n=i),c+=e.slice(s,d).replace(Dt,V),r&&(l=!0,c+="' +\n__e("+r+") +\n'"),o&&(h=!0,c+="';\n"+o+";\n__p += '"),n&&(c+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),s=d+t.length,t}),c+="';\n";var b=t.variable;b||(c="with (obj) {\n"+c+"\n}\n"),c=(h?c.replace(dt,""):c).replace(at,"$1").replace(st,"$1;"),c="function("+(b||"obj")+") {\n"+(b?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(l?", __e = _.escape":"")+(h?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+c+"return __p\n}";var g=lf(function(){return kd(d,u+"return "+c).apply(void 0,a)});if(g.source=c,Lo(g))throw g;return g},r.times=function(e,t){if(e=Zo(e),1>e||e>Be)return[];var r=Re,n=fa(e,Re);t=Ti(t),e-=Re;for(var i=U(n,t);++r<e;)t(r);return i},r.toFinite=Xo,r.toInteger=Zo,r.toLength=Jo,r.toLower=function(e){return ed(e).toLowerCase()},r.toNumber=Qo,r.toSafeInteger=function(e){return e?Qt(Zo(e),-Be,Be):0===e?e:0},r.toString=ed,r.toUpper=function(e){return ed(e).toUpperCase()},r.trim=function(e,t,r){if(e=ed(e),e&&(r||void 0===t))return e.replace(kt,"");if(!e||!(t=xn(t)))return e;var n=ie(e),i=ie(t),o=K(n,i),d=F(n,i)+1;return jn(n,o,d).join("")},r.trimEnd=function(e,t,r){if(e=ed(e),e&&(r||void 0===t))return e.replace(xt,"");if(!e||!(t=xn(t)))return e;var n=ie(e),i=F(n,ie(t))+1;return jn(n,0,i).join("")},r.trimStart=function(e,t,r){if(e=ed(e),e&&(r||void 0===t))return e.replace(It,"");if(!e||!(t=xn(t)))return e;var n=ie(e),i=K(n,ie(t));return jn(n,i).join("")},r.truncate=function(e,t){var r=30,n="...";if(Ko(t)){var i="separator"in t?t.separator:i;r="length"in t?Zo(t.length):r,n="omission"in t?xn(t.omission):n}e=ed(e);var o=e.length;if(W(e)){var d=ie(e);o=d.length}if(r>=o)return e;var a=r-ne(n);if(1>a)return n;var s=d?jn(d,0,a).join(""):e.slice(0,a);if(void 0===i)return s+n;if(d&&(a+=s.length-a),Us(i)){if(e.slice(a).search(i)){var f=s,c;for(i.global||(i=Ad(i.source,ed(Rt.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var p=c.index;s=s.slice(0,void 0===p?a:p)}}else if(e.indexOf(xn(i),a)!=a){var u=s.lastIndexOf(i);-1<u&&(s=s.slice(0,u))}return s+n},r.unescape=function(e){return e=ed(e),e&&pt.test(e)?e.replace(ft,Hr):e},r.uniqueId=function(e){var t=++Cd;return ed(e)+t},r.upperCase=pf,r.upperFirst=uf,r.each=Ao,r.eachRight=wo,r.first=yo,hd(r,function(){var e={};return fr(r,function(t,n){Nd.call(r.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),r.VERSION="4.17.4",s(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){r[e].placeholder=r}),s(["drop","take"],function(e,t){x.prototype[e]=function(r){r=void 0===r?1:sa(Zo(r),0);var n=this.__filtered__&&!t?new x(this):this.clone();return n.__filtered__?n.__takeCount__=fa(r,n.__takeCount__):n.__views__.push({size:fa(r,Re),type:e+(0>n.__dir__?"Right":"")}),n},x.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),s(["filter","map","takeWhile"],function(e,t){var r=t+1;x.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ti(e,3),type:r}),t.__filtered__=t.__filtered__||r==Ee||r==3,t}}),s(["head","last"],function(e,t){var r="take"+(t?"Right":"");x.prototype[e]=function(){return this[r](1).value()[0]}}),s(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");x.prototype[e]=function(){return this.__filtered__?new x(this):this[r](1)}}),x.prototype.compact=function(){return this.filter(ud)},x.prototype.find=function(e){return this.filter(e).head()},x.prototype.findLast=function(e){return this.reverse().find(e)},x.prototype.invokeMap=ln(function(e,t){return"function"==typeof e?new x(this):this.map(function(r){return Rr(r,e,t)})}),x.prototype.reject=function(e){return this.filter(Co(Ti(e)))},x.prototype.slice=function(e,t){e=Zo(e);var r=this;return r.__filtered__&&(0<e||0>t)?new x(r):(0>e?r=r.takeRight(-e):e&&(r=r.drop(e)),void 0!==t&&(t=Zo(t),r=0>t?r.dropRight(-t):r.take(t-e)),r)},x.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},x.prototype.toArray=function(){return this.take(Re)},fr(x.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=r[i?"take"+("last"==t?"Right":""):t],d=i||/^find/.test(t);o&&(r.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,s=t instanceof x,f=a[0],c=s||Ts(t),p=function(e){var t=o.apply(r,S([e],a));return i&&u?t[0]:t};c&&n&&"function"==typeof f&&1!=f.length&&(s=c=!1);var u=this.__chain__,l=!!this.__actions__.length,h=d&&!u,b=s&&!l;if(!d&&c){t=b?t:new x(this);var g=e.apply(t,a);return g.__actions__.push({func:xo,args:[p],thisArg:void 0}),new _(g,u)}return h&&b?e.apply(this,a):(g=this.thru(p),h?i?g.value()[0]:g.value():g)})}),s(["pop","push","shift","sort","splice","unshift"],function(e){var t=Pd[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);r.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Ts(r)?r:[],e)}return this[n](function(r){return t.apply(Ts(r)?r:[],e)})}}),fr(x.prototype,function(e,t){var n=r[t];if(n){var i=n.name+"",o=va[i]||(va[i]=[]);o.push({name:t,func:n})}}),va[fi(void 0,me).name]=[{name:"wrapper",func:void 0}],x.prototype.clone=function(){var e=new x(this.__wrapped__);return e.__actions__=Yn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Yn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Yn(this.__views__),e},x.prototype.reverse=function(){if(this.__filtered__){var e=new x(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},x.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ts(e),n=0>t,i=r?e.length:0,o=Ui(0,i,this.__views__),d=o.start,a=o.end,s=a-d,f=n?a:d-1,c=this.__iteratees__,p=c.length,u=0,l=fa(s,this.__takeCount__);if(!r||!n&&i==s&&l==s)return Bn(e,this.__actions__);var h=[];outer:for(;s--&&u<l;){f+=t;for(var b=-1,g=e[f];++b<p;){var y=c[b],m=y.iteratee,_=y.type,S=m(g);if(_==2)g=S;else if(!S)if(_==Ee)continue outer;else break outer}h[u++]=g}return h},r.prototype.at=ps,r.prototype.chain=function(){return Io(this)},r.prototype.commit=function(){return new _(this.value(),this.__chain__)},r.prototype.next=function(){void 0===this.__values__&&(this.__values__=Yo(this.value()));var e=this.__index__>=this.__values__.length,t=e?void 0:this.__values__[this.__index__++];return{done:e,value:t}},r.prototype.plant=function(e){for(var t=this,r,n;t instanceof i;){n=lo(t),n.__index__=0,n.__values__=void 0,r?o.__wrapped__=n:r=n;var o=n;t=t.__wrapped__}return o.__wrapped__=e,r},r.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof x){var t=e;return this.__actions__.length&&(t=new x(this)),t=t.reverse(),t.__actions__.push({func:xo,args:[So],thisArg:void 0}),new _(t,this.__chain__)}return this.thru(So)},r.prototype.toJSON=r.prototype.valueOf=r.prototype.value=function(){return Bn(this.__wrapped__,this.__actions__)},r.prototype.first=r.prototype.head,Xd&&(r.prototype[Xd]=function(){return this}),r}();"function"==typeof i&&"object"==typeof i.amd&&i.amd?(wr._=Kr,i(function(){return Kr})):Pr?((Pr.exports=Kr)._=Kr,Er._=Kr):wr._=Kr}).call(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],194:[function(e,t){(function(r){"use strict";function n(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(e,t){return e<<t|e>>>32-t}function o(e,t,r,n,o,d,a){return 0|i(0|e+(t&r|~t&n)+o+d,a)+t}function s(e,t,r,n,o,a,f){return 0|i(0|e+(t&n|r&~n)+o+a,f)+t}function f(e,t,r,n,o,d,a){return 0|i(0|e+(t^r^n)+o+d,a)+t}function p(e,t,r,n,o,a,f){return 0|i(0|e+(r^(t|~n))+o+a,f)+t}var d=e("inherits"),a=e("hash-base"),c=Array(16);d(n,a),n.prototype._update=function(){for(var e=c,t=0;16>t;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,a=this._d;r=o(r,n,i,a,e[0],3614090360,7),a=o(a,r,n,i,e[1],3905402710,12),i=o(i,a,r,n,e[2],606105819,17),n=o(n,i,a,r,e[3],3250441966,22),r=o(r,n,i,a,e[4],4118548399,7),a=o(a,r,n,i,e[5],1200080426,12),i=o(i,a,r,n,e[6],2821735955,17),n=o(n,i,a,r,e[7],4249261313,22),r=o(r,n,i,a,e[8],1770035416,7),a=o(a,r,n,i,e[9],2336552879,12),i=o(i,a,r,n,e[10],4294925233,17),n=o(n,i,a,r,e[11],2304563134,22),r=o(r,n,i,a,e[12],1804603682,7),a=o(a,r,n,i,e[13],4254626195,12),i=o(i,a,r,n,e[14],2792965006,17),n=o(n,i,a,r,e[15],1236535329,22),r=s(r,n,i,a,e[1],4129170786,5),a=s(a,r,n,i,e[6],3225465664,9),i=s(i,a,r,n,e[11],643717713,14),n=s(n,i,a,r,e[0],3921069994,20),r=s(r,n,i,a,e[5],3593408605,5),a=s(a,r,n,i,e[10],38016083,9),i=s(i,a,r,n,e[15],3634488961,14),n=s(n,i,a,r,e[4],3889429448,20),r=s(r,n,i,a,e[9],568446438,5),a=s(a,r,n,i,e[14],3275163606,9),i=s(i,a,r,n,e[3],4107603335,14),n=s(n,i,a,r,e[8],1163531501,20),r=s(r,n,i,a,e[13],2850285829,5),a=s(a,r,n,i,e[2],4243563512,9),i=s(i,a,r,n,e[7],1735328473,14),n=s(n,i,a,r,e[12],2368359562,20),r=f(r,n,i,a,e[5],4294588738,4),a=f(a,r,n,i,e[8],2272392833,11),i=f(i,a,r,n,e[11],1839030562,16),n=f(n,i,a,r,e[14],4259657740,23),r=f(r,n,i,a,e[1],2763975236,4),a=f(a,r,n,i,e[4],1272893353,11),i=f(i,a,r,n,e[7],4139469664,16),n=f(n,i,a,r,e[10],3200236656,23),r=f(r,n,i,a,e[13],681279174,4),a=f(a,r,n,i,e[0],3936430074,11),i=f(i,a,r,n,e[3],3572445317,16),n=f(n,i,a,r,e[6],76029189,23),r=f(r,n,i,a,e[9],3654602809,4),a=f(a,r,n,i,e[12],3873151461,11),i=f(i,a,r,n,e[15],530742520,16),n=f(n,i,a,r,e[2],3299628645,23),r=p(r,n,i,a,e[0],4096336452,6),a=p(a,r,n,i,e[7],1126891415,10),i=p(i,a,r,n,e[14],2878612391,15),n=p(n,i,a,r,e[5],4237533241,21),r=p(r,n,i,a,e[12],1700485571,6),a=p(a,r,n,i,e[3],2399980690,10),i=p(i,a,r,n,e[10],4293915773,15),n=p(n,i,a,r,e[1],2240044497,21),r=p(r,n,i,a,e[8],1873313359,6),a=p(a,r,n,i,e[15],4264355552,10),i=p(i,a,r,n,e[6],2734768916,15),n=p(n,i,a,r,e[13],1309151649,21),r=p(r,n,i,a,e[4],4149444226,6),a=p(a,r,n,i,e[11],3174756917,10),i=p(i,a,r,n,e[2],718787259,15),n=p(n,i,a,r,e[9],3951481745,21),this._a=0|this._a+r,this._b=0|this._b+n,this._c=0|this._c+i,this._d=0|this._d+a},n.prototype._digest=function(){this._block[this._blockOffset++]=128,56<this._blockOffset&&(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 e=new r(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:115,"hash-base":195,inherits:190}],195:[function(e,t){"use strict";function r(e,t){if(!o.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}function n(e){i.call(this),this._block=o.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var o=e("safe-buffer").Buffer,i=e("stream").Transform,d=e("inherits");d(n,i),n.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},n.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},n.prototype.update=function(e,t){if(r(e,"Data"),this._finalized)throw new Error("Digest already called");o.isBuffer(e)||(e=o.from(e,t));for(var n=this._block,d=0;this._blockOffset+e.length-d>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)n[a++]=e[d++];this._update(),this._blockOffset=0}for(;d<e.length;)n[this._blockOffset++]=e[d++];for(var i=0,s=8*e.length;0<s;++i)this._length[i]+=s,s=0|this._length[i]/4294967296,0<s&&(this._length[i]-=4294967296*s);return this},n.prototype._update=function(){throw new Error("_update is not implemented")},n.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;4>r;++r)this._length[r]=0;return t},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n},{inherits:190,"safe-buffer":240,stream:249}],196:[function(e,t){function r(e){this.rand=e||new n.Rand}var o=e("bn.js"),n=e("brorand");t.exports=r,r.create=function(e){return new r(e)},r.prototype._randbelow=function(e){var t=e.bitLength(),r=p(t/8);do var n=new o(this.rand.generate(r));while(0<=n.cmp(e));return n},r.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},r.prototype.test=function(e,t,r){var n=e.bitLength(),c=o.mont(e),p=new o(1).toRed(c);t||(t=f(1,0|n/48));for(var u=e.subn(1),l=0;!u.testn(l);l++);for(var s=e.shrn(l),d=u.toRed(c),h=!0;0<t;t--){var b=this._randrange(new o(2),u);r&&r(b);var a=b.toRed(c).redPow(s);if(0!==a.cmp(p)&&0!==a.cmp(d)){for(var g=1;g<l;g++){if(a=a.redSqr(),0===a.cmp(p))return!1;if(0===a.cmp(d))break}if(g===l)return!1}}return h},r.prototype.getDivisor=function(e,t){var r=e.bitLength(),n=o.mont(e),c=new o(1).toRed(n);t||(t=f(1,0|r/48));for(var p=e.subn(1),u=0;!p.testn(u);u++);for(var s=e.shrn(u),d=p.toRed(n);0<t;t--){var l=this._randrange(new o(2),p),a=e.gcd(l);if(0!==a.cmpn(1))return a;var h=l.toRed(n).redPow(s);if(0!==h.cmp(c)&&0!==h.cmp(d)){for(var b=1;b<u;b++){if(h=h.redSqr(),0===h.cmp(c))return h.fromRed().subn(1).gcd(e);if(0===h.cmp(d))break}if(b===u)return h=h.redSqr(),h.fromRed().subn(1).gcd(e)}}return!1}},{"bn.js":197,brorand:65}],197:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{buffer:66,dup:60}],198:[function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],199:[function(e,t,r){"use strict";function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}var o=r;o.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){e=e.replace(/[^a-z0-9]+/ig,""),0!=e.length%2&&(e="0"+e);for(var n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,d=255&i;o?r.push(o,d):r.push(d)}return r},o.zero2=n,o.toHex=i,o.encode=function(e,t){return"hex"===t?i(e):e}},{}],200:[function(e,t){t.exports={"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"}},{}],201:[function(e,t,r){"use strict";var n=e("asn1.js");r.certificate=e("./certificate");var i=n.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())});r.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=o;var d=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())});r.PublicKey=d;var a=n.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())}),s=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())});r.PrivateKey=s;var f=n.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())});r.EncryptedPrivateKey=f;var c=n.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())});r.DSAPrivateKey=c,r.DSAparam=n.define("DSAparam",function(){this.int()});var p=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(u),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=p;var u=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":202,"asn1.js":46}],202:[function(e,t){"use strict";var r=e("asn1.js"),n=r.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),i=r.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),d=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),a=r.define("RelativeDistinguishedName",function(){this.setof(i)}),s=r.define("RDNSequence",function(){this.seqof(a)}),f=r.define("Name",function(){this.choice({rdnSequence:this.use(s)})}),c=r.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))}),p=r.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),u=r.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(f),this.key("validity").use(c),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(d),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())}),l=r.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(u),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});t.exports=l},{"asn1.js":46}],203:[function(e,t){(function(r){var n=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,o=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,d=e("evp_bytestokey"),a=e("browserify-aes");t.exports=function(e,t){var s=e.toString(),f=s.match(n),c;if(!f){var p=s.match(o);c=new r(p[2].replace(/\r?\n/g,""),"base64")}else{var u="aes"+f[1],l=new r(f[2],"hex"),h=new r(f[3].replace(/\r?\n/g,""),"base64"),b=d(t,l.slice(0,8),parseInt(f[1],10)).key,g=[],y=a.createDecipheriv(u,b,l);g.push(y.update(h)),g.push(y.final()),c=r.concat(g)}var m=s.match(i)[1];return{tag:m,data:c}}}).call(this,e("buffer").Buffer)},{"browserify-aes":69,buffer:115,evp_bytestokey:172}],204:[function(e,t){(function(r){function n(e){var t;"object"!=typeof e||r.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new r(e));var n=a(e,t),d=n.tag,s=n.data,f,c;switch(d){case"CERTIFICATE":c=o.certificate.decode(s,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=o.PublicKey.decode(s,"der")),f=c.algorithm.algorithm.join("."),f){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=o.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+f);}throw new Error("unknown key type "+d);case"ENCRYPTED PRIVATE KEY":s=o.EncryptedPrivateKey.decode(s,"der"),s=i(s,t);case"PRIVATE KEY":switch(c=o.PrivateKey.decode(s,"der"),f=c.algorithm.algorithm.join("."),f){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:o.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=o.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+f);}throw new Error("unknown key type "+d);case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(s,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(s,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(s,"der")};case"EC PRIVATE KEY":return s=o.ECPrivateKey.decode(s,"der"),{curve:s.parameters.value,privateKey:s.privateKey};default:throw new Error("unknown key type "+d);}}function i(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=d[e.algorithm.decrypt.cipher.algo.join(".")],a=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,p=parseInt(o.split("-")[1],10)/8,u=f.pbkdf2Sync(t,n,i,p),l=s.createDecipheriv(o,u,a),h=[];return h.push(l.update(c)),h.push(l.final()),r.concat(h)}var o=e("./asn1"),d=e("./aesid.json"),a=e("./fixProc"),s=e("browserify-aes"),f=e("pbkdf2");t.exports=n,n.signature=o.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":200,"./asn1":201,"./fixProc":203,"browserify-aes":69,buffer:115,pbkdf2:205}],205:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":206,"./lib/sync":209}],206:[function(e,t){(function(r,n){function i(e){if(n.process&&!n.process.browser)return Promise.resolve(!1);if(!p||!p.importKey||!p.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];h=h||c.alloc(8);var t=o(h,h,10,128,e).then(function(){return!0}).catch(function(){return!1});return l[e]=t,t}function o(e,t,r,n,i){return p.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return p.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)}).then(function(e){return c.from(e)})}function d(e,t){e.then(function(e){r.nextTick(function(){t(null,e)})},function(n){r.nextTick(function(){t(n)})})}var a=e("./precondition"),s=e("./default-encoding"),f=e("./sync"),c=e("safe-buffer").Buffer,p=n.crypto&&n.crypto.subtle,u={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"},l=[],h;t.exports=function(e,t,p,l,h,b){if(c.isBuffer(e)||(e=c.from(e,s)),c.isBuffer(t)||(t=c.from(t,s)),a(p,l),"function"==typeof h&&(b=h,h=void 0),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");h=h||"sha1";var g=u[h.toLowerCase()];return g&&"function"==typeof n.Promise?void d(i(g).then(function(r){return r?o(e,t,p,l,g):f(e,t,p,l,h)}),b):r.nextTick(function(){var r;try{r=f(e,t,p,l,h)}catch(t){return b(t)}b(null,r)})}}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"./default-encoding":207,"./precondition":208,"./sync":209,_process:211,"safe-buffer":240}],207:[function(e,t){(function(e){var r;if(e.browser)r="utf-8";else{var n=parseInt(e.version.split(".")[0].slice(1),10);r=6<=n?"utf-8":"binary"}t.exports=r}).call(this,e("_process"))},{_process:211}],208:[function(e,t){t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(0>e)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(0>t||t>1073741823||t!==t)throw new TypeError("Bad key length")}},{}],209:[function(e,t){function r(e,t,r){var o=n(e),d="sha512"===e||"sha384"===e?128:64;t.length>d?t=o(t):t.length<d&&(t=f.concat([t,c],d));for(var a=f.allocUnsafe(d+u[e]),s=f.allocUnsafe(d+u[e]),p=0;p<d;p++)a[p]=54^t[p],s[p]=92^t[p];var i=f.allocUnsafe(d+r+4);a.copy(i,0,0,d),this.ipad1=i,this.ipad2=a,this.opad=s,this.alg=e,this.blocksize=d,this.hash=o,this.size=u[e]}function n(e){return"rmd160"===e||"ripemd160"===e?o:"md5"===e?i:function(t){return d(e).update(t).digest()}}var i=e("create-hash/md5"),o=e("ripemd160"),d=e("sha.js"),a=e("./precondition"),s=e("./default-encoding"),f=e("safe-buffer").Buffer,c=f.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};r.prototype.run=function(e,t){e.copy(t,this.blocksize);var r=this.hash(t);return r.copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(e,t,n,o,d){f.isBuffer(e)||(e=f.from(e,s)),f.isBuffer(t)||(t=f.from(t,s)),a(n,o),d=d||"sha1";var c=new r(d,e,t.length),h=f.allocUnsafe(o),b=f.allocUnsafe(t.length+4);t.copy(b,0,0,t.length);for(var g=0,y=u[d],m=p(o/y),l=1;l<=m;l++){b.writeUInt32BE(l,t.length);for(var i=c.run(b,c.ipad1),_=i,S=1;S<n;S++){_=c.run(_,c.ipad2);for(var v=0;v<y;v++)i[v]^=_[v]}i.copy(h,g),g+=y}return h}},{"./default-encoding":207,"./precondition":208,"create-hash/md5":142,ripemd160:239,"safe-buffer":240,"sha.js":242}],210:[function(e,t){(function(e){"use strict";t.exports=e.version&&0!==e.version.indexOf("v0.")&&(0!==e.version.indexOf("v1.")||0===e.version.indexOf("v1.8."))?e.nextTick:function(t,r,n,o){if("function"!=typeof t)throw new TypeError("\"callback\" argument must be a function");var d=arguments.length,a,s;switch(d){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,o)});default:for(a=Array(d-1),s=0;s<a.length;)a[s++]=arguments[s];return e.nextTick(function(){t.apply(null,a)});}}}).call(this,e("_process"))},{_process:211}],211:[function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(p===setTimeout)return setTimeout(e,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function i(e){if(u===clearTimeout)return clearTimeout(e);if((u===n||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(e);try{return u(e)}catch(t){try{return u.call(null,e)}catch(t){return u.call(this,e)}}}function d(){h&&g&&(h=!1,g.length?l=g.concat(l):b=-1,l.length&&a())}function a(){if(!h){var e=o(d);h=!0;for(var t=l.length;t;){for(g=l,l=[];++b<t;)g&&g[b].run();b=-1,t=l.length}g=null,h=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function f(){}var c=t.exports={},p,u;(function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(t){p=r}try{u="function"==typeof clearTimeout?clearTimeout:n}catch(t){u=n}})();var l=[],h=!1,b=-1,g;c.nextTick=function(e){var t=Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new s(e,t)),1!==l.length||h||o(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=f,c.addListener=f,c.once=f,c.off=f,c.removeListener=f,c.removeAllListeners=f,c.emit=f,c.prependListener=f,c.prependOnceListener=f,c.listeners=function(){return[]},c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],212:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(e,t){return r.publicEncrypt(e,t,!0)},r.publicDecrypt=function(e,t){return r.privateDecrypt(e,t,!0)}},{"./privateDecrypt":215,"./publicEncrypt":216}],213:[function(e,t){(function(r){function n(e){var t=new r(4);return t.writeUInt32BE(e,0),t}var o=e("create-hash");t.exports=function(e,d){for(var a=new r(""),t=0,i;a.length<d;)i=n(t++),a=r.concat([a,o("sha1").update(e).update(i).digest()]);return a.slice(0,d)}}).call(this,e("buffer").Buffer)},{buffer:115,"create-hash":140}],214:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{buffer:66,dup:60}],215:[function(e,t){(function(r){function n(e,t){var d=e.modulus,n=e.modulus.byteLength(),f=t.length,c=p("sha1").update(new r("")).digest(),u=c.length;if(0!==t[0])throw new Error("decryption error");var l=t.slice(1,u+1),h=t.slice(u+1),b=s(l,a(h,u)),g=s(h,a(b,n-u-1));if(o(c,g.slice(0,u)))throw new Error("decryption error");for(var y=u;0===g[y];)y++;if(1!==g[y++])throw new Error("decryption error");return g.slice(y)}function i(e,t,r){for(var n=t.slice(0,2),o=2,i=0;0!==t[o++];)if(o>=t.length){i++;break}var d=t.slice(2,o-1),a=t.slice(o-1,o);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&i++,8>d.length&&i++,i)throw new Error("decryption error");return t.slice(o)}function o(e,t){e=new r(e),t=new r(t);var n=0,o=e.length;e.length!==t.length&&(n++,o=u(e.length,t.length));for(var d=-1;++d<o;)n+=e[d]^t[d];return n}var d=e("parse-asn1"),a=e("./mgf"),s=e("./xor"),f=e("bn.js"),c=e("browserify-rsa"),p=e("create-hash"),l=e("./withPublic");t.exports=function(e,t,o){var a=e.padding?e.padding:o?1:4;var s=d(e),p=s.modulus.byteLength();if(t.length>p||0<=new f(t).cmp(s.modulus))throw new Error("decryption error");var u=o?l(new f(t),s):c(t,s);var h=new r(p-u.length);if(h.fill(0),u=r.concat([h,u],p),4===a)return n(s,u);if(1===a)return i(s,u,o);if(3===a)return u;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":213,"./withPublic":217,"./xor":218,"bn.js":214,"browserify-rsa":87,buffer:115,"create-hash":140,"parse-asn1":204}],216:[function(e,t){(function(r){function n(e,t){var n=e.modulus.byteLength(),i=t.length,o=s("sha1").update(new r("")).digest(),d=o.length,u=2*d;if(i>n-u-2)throw new Error("message too long");var l=new r(n-i-u-2);l.fill(0);var h=n-d-1,b=a(d),g=c(r.concat([o,l,new r([1]),t],h),f(b,h)),y=c(b,f(g,d));return new p(r.concat([new r([0]),y,g],n))}function i(e,t,n){var i=t.length,d=e.modulus.byteLength();if(i>d-11)throw new Error("message too long");var a;return n?(a=new r(d-i-3),a.fill(255)):a=o(d-i-3),new p(r.concat([new r([0,n?1:2]),a,new r([0]),t],d))}function o(e){for(var t=new r(e),n=0,i=a(2*e),o=0,d;n<e;)o===i.length&&(i=a(2*e),o=0),d=i[o++],d&&(t[n++]=d);return t}var d=e("parse-asn1"),a=e("randombytes"),s=e("create-hash"),f=e("./mgf"),c=e("./xor"),p=e("bn.js"),u=e("./withPublic"),l=e("browserify-rsa");t.exports=function(e,t,r){var o=e.padding?e.padding:r?1:4;var a=d(e),s;if(4===o)s=n(a,t);else if(1===o)s=i(a,t,r);else if(3!==o)throw new Error("unknown padding");else if(s=new p(t),0<=s.cmp(a.modulus))throw new Error("data too long for modulus");return r?l(s,a):u(s,a)}}).call(this,e("buffer").Buffer)},{"./mgf":213,"./withPublic":217,"./xor":218,"bn.js":214,"browserify-rsa":87,buffer:115,"create-hash":140,"parse-asn1":204,randombytes:223}],217:[function(e,t){(function(r){var n=e("bn.js");t.exports=function(e,t){return new r(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}}).call(this,e("buffer").Buffer)},{"bn.js":214,buffer:115}],218:[function(e,t){t.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},{}],219:[function(e,t,r){(function(e){(function(o){function d(e){throw new RangeError(T[e])}function a(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function s(e,t){var r=e.split("@"),n="";1<r.length&&(n=r[0]+"@",e=r[1]),e=e.replace(R,".");var i=e.split("."),o=a(i,t).join(".");return n+o}function f(e){for(var t=[],r=0,n=e.length,i,o;r<n;)i=e.charCodeAt(r++),55296<=i&&56319>=i&&r<n?(o=e.charCodeAt(r++),56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)):t.push(i);return t}function c(e){return a(e,function(e){var t="";return 65535<e&&(e-=65536,t+=M(55296|1023&e>>>10),e=56320|1023&e),t+=M(e),t}).join("")}function p(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:v}function u(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?C(e/w):e>>1,e+=C(e/t);e>N*x>>1;n+=v)e=C(e/N);return C(n+(N+1)*e/(e+A))}function b(e){var r=[],o=e.length,a=0,i=P,n=E,s,f,u,h,b,g,y,m,_,t;for(f=e.lastIndexOf(B),0>f&&(f=0),u=0;u<f;++u)128<=e.charCodeAt(u)&&d("not-basic"),r.push(e.charCodeAt(u));for(h=0<f?f+1:0;h<o;){for(b=a,g=1,y=v;;y+=v){if(h>=o&&d("invalid-input"),m=p(e.charCodeAt(h++)),(m>=v||m>C((S-a)/g))&&d("overflow"),a+=m*g,_=y<=n?I:y>=n+x?x:y-n,m<_)break;t=v-_,g>C(S/t)&&d("overflow"),g*=t}s=r.length+1,n=l(a-b,s,0==b),C(a/s)>S-i&&d("overflow"),i+=C(a/s),a%=s,r.splice(a++,0,i)}return c(r)}function g(e){var r=[],i,n,o,a,s,c,p,h,b,g,t,y,m,_,k;for(e=f(e),y=e.length,i=P,n=0,s=E,c=0;c<y;++c)t=e[c],128>t&&r.push(M(t));for(o=a=r.length,a&&r.push(B);o<y;){for(p=S,c=0;c<y;++c)t=e[c],t>=i&&t<p&&(p=t);for(m=o+1,p-i>C((S-n)/m)&&d("overflow"),n+=(p-i)*m,i=p,c=0;c<y;++c)if(t=e[c],t<i&&++n>S&&d("overflow"),t==i){for(h=n,b=v;;b+=v){if(g=b<=s?I:b>=s+x?x:b-s,h<g)break;k=h-g,_=v-g,r.push(M(u(g+k%_,0))),h=C(k/_)}r.push(M(u(h,0))),s=l(n,m,o==a),n=0,++o}++n,++i}return r.join("")}var y="object"==typeof r&&r&&!r.nodeType&&r,m="object"==typeof t&&t&&!t.nodeType&&t,_="object"==typeof e&&e;(_.global===_||_.window===_||_.self===_)&&(o=_);var S=2147483647,v=36,I=1,x=26,A=38,w=700,E=72,P=128,B="-",k=/^xn--/,O=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=v-I,C=h,M=n,j,U;if(j={version:"1.4.1",ucs2:{decode:f,encode:c},decode:b,encode:g,toASCII:function(e){return s(e,function(e){return O.test(e)?"xn--"+g(e):e})},toUnicode:function(e){return s(e,function(e){return k.test(e)?b(e.slice(4).toLowerCase()):e})}},"function"==typeof i&&"object"==typeof i.amd&&i.amd)i("punycode",function(){return j});else if(!(y&&m))o.punycode=j;else if(t.exports==y)m.exports=j;else for(U in j)j.hasOwnProperty(U)&&(y[U]=j[U])})(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],220:[function(e,t){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,o,d){t=t||"&",o=o||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var f=1e3;d&&"number"==typeof d.maxKeys&&(f=d.maxKeys);var c=e.length;0<f&&c>f&&(c=f);for(var p=0;p<c;++p){var i=e[p].replace(s,"%20"),u=i.indexOf(o),l,h,b,g;0<=u?(l=i.substr(0,u),h=i.substr(u+1)):(l=i,h=""),b=decodeURIComponent(l),g=decodeURIComponent(h),r(a,b)?n(a[b])?a[b].push(g):a[b]=[a[b],g]:a[b]=g}return a};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],221:[function(e,t){"use strict";function r(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return"";}};t.exports=function(e,t,d,a){return t=t||"&",d=d||"=",null===e&&(e=void 0),"object"==typeof e?r(o(e),function(o){var a=encodeURIComponent(n(o))+d;return i(e[o])?r(e[o],function(e){return a+encodeURIComponent(n(e))}).join(t):a+encodeURIComponent(n(e[o]))}).join(t):a?encodeURIComponent(n(a))+d+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],222:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":220,"./encode":221}],223:[function(e,t){(function(r,n){"use strict";var i=e("safe-buffer").Buffer,o=n.crypto||n.msCrypto;t.exports=o&&o.getRandomValues?function(e,t){if(65536<e)throw new Error("requested too many random bytes");var d=new n.Uint8Array(e);0<e&&o.getRandomValues(d);var a=i.from(d.buffer);return"function"==typeof t?r.nextTick(function(){t(null,a)}):a}:function(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{_process:211,"safe-buffer":240}],224:[function(e,t,r){(function(t,n){"use strict";function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function o(e,t){if("number"!=typeof e||e!==e)throw new TypeError("offset must be a number");if(e>l||0>e)throw new TypeError("offset must be a uint32");if(e>p||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!==e)throw new TypeError("size must be a number");if(e>l||0>e)throw new TypeError("size must be a uint32");if(e+t>r||e>p)throw new RangeError("buffer too small")}function a(e,r,n,i){if(t.browser){var o=e.buffer,d=new Uint8Array(o,r,n);return u.getRandomValues(d),i?void t.nextTick(function(){i(null,e)}):e}if(i)return void f(n,function(t,n){return t?i(t):void(n.copy(e,r),i(null,e))});var a=f(n);return a.copy(e,r),e}var s=e("safe-buffer"),f=e("randombytes"),c=s.Buffer,p=s.kMaxLength,u=n.crypto||n.msCrypto,l=4294967295;u&&u.getRandomValues||!t.browser?(r.randomFill=function(e,t,r,i){if(!c.isBuffer(e)&&!(e instanceof n.Uint8Array))throw new TypeError("\"buf\" argument must be a Buffer or Uint8Array");if("function"==typeof t)i=t,t=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-t;else if("function"!=typeof i)throw new TypeError("\"cb\" argument must be a function");return o(t,e.length),d(r,t,e.length),a(e,t,r,i)},r.randomFillSync=function(e,t,r){if("undefined"==typeof t&&(t=0),!c.isBuffer(e)&&!(e instanceof n.Uint8Array))throw new TypeError("\"buf\" argument must be a Buffer or Uint8Array");return o(t,e.length),void 0===r&&(r=e.length-t),d(r,t,e.length),a(e,t,r)}):(r.randomFill=i,r.randomFillSync=i)}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{_process:211,randombytes:223,"safe-buffer":240}],225:[function(e,t){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":226}],226:[function(e,t){"use strict";function r(e){return this instanceof r?void(s.call(this,e),f.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",n)):new r(e)}function n(){this.allowHalfOpen||this._writableState.ended||o(i,this)}function i(e){e.end()}var o=e("process-nextick-args"),d=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=r;var a=e("core-util-is");a.inherits=e("inherits");var s=e("./_stream_readable"),f=e("./_stream_writable");a.inherits(r,s);for(var c=d(f.prototype),p=0,u;p<c.length;p++)u=c[p],r.prototype[u]||(r.prototype[u]=f.prototype[u]);Object.defineProperty(r.prototype,"destroyed",{get:function(){return void 0===this._readableState||void 0===this._writableState?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),r.prototype._destroy=function(e,t){this.push(null),this.end(),o(t,e)}},{"./_stream_readable":228,"./_stream_writable":230,"core-util-is":121,inherits:234,"process-nextick-args":210}],227:[function(e,t){"use strict";function r(e){return this instanceof r?void n.call(this,e):new r(e)}t.exports=r;var n=e("./_stream_transform"),i=e("core-util-is");i.inherits=e("inherits"),i.inherits(r,n),r.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":229,"core-util-is":121,inherits:234}],228:[function(e,t){(function(r,n){"use strict";function i(e){return D.from(e)}function o(e){return D.isBuffer(e)||e instanceof z}function d(e,t,r){return"function"==typeof e.prependListener?e.prependListener(t,r):void(e._events&&e._events[t]?C(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r))}function a(t,r){j=j||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof j&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=h(this.highWaterMark),this.buffer=new q,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(!G&&(G=e("string_decoder/").StringDecoder),this.decoder=new G(t.encoding),this.encoding=t.encoding)}function s(t){return j=j||e("./_stream_duplex"),this instanceof s?void(this._readableState=new a(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),L.call(this)):new s(t)}function f(e,t,r,n,o){var d=e._readableState;if(null===t)d.reading=!1,g(e,d);else{var a;o||(a=p(d,t)),a?e.emit("error",a):d.objectMode||t&&0<t.length?("string"!=typeof t&&!d.objectMode&&Object.getPrototypeOf(t)!==D.prototype&&(t=i(t)),n?d.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):c(e,d,t,!0):d.ended?e.emit("error",new Error("stream.push() after EOF")):(d.reading=!1,d.decoder&&!r?(t=d.decoder.write(t),d.objectMode||0!==t.length?c(e,d,t,!1):_(e,d)):c(e,d,t,!1))):!n&&(d.reading=!1)}return u(d)}function c(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&y(e)),_(e,t)}function p(e,t){var r;return o(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function u(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function l(e){return e>=Y?e=Y:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function b(e,t){return 0>=e||0===t.length&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=l(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}function g(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,y(e)}}function y(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(F("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?N(m,e):m(e))}function m(e){F("emit readable"),e.emit("readable"),A(e)}function _(e,t){t.readingMore||(t.readingMore=!0,N(S,e,t))}function S(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(F("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function v(e){return function(){var t=e._readableState;F("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&U(e,"data")&&(t.flowing=!0,A(e))}}function k(e){F("readable nexttick read 0"),e.read(0)}function I(e,t){t.resumeScheduled||(t.resumeScheduled=!0,N(x,e,t))}function x(e,t){t.reading||(F("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),A(e),t.flowing&&!t.reading&&e.read(0)}function A(e){var t=e._readableState;for(F("flow",t.flowing);t.flowing&&null!==e.read(););}function w(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=E(e,t.buffer,t.decoder),r}function E(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?n=t.shift():n=r?P(e,t):B(e,t),n}function P(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var o=r.data,d=e>o.length?o.length:e;if(i+=d===o.length?o:o.slice(0,e),e-=d,0===e){d===o.length?(++n,t.head=r.next?r.next:t.tail=null):(t.head=r,r.data=o.slice(d));break}++n}return t.length-=n,i}function B(e,t){var r=D.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,d=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,d),e-=d,0===e){d===o.length?(++i,t.head=n.next?n.next:t.tail=null):(t.head=n,n.data=o.slice(d));break}++i}return t.length-=i,r}function O(e){var t=e._readableState;if(0<t.length)throw new Error("\"endReadable()\" called on non-empty stream");t.endEmitted||(t.ended=!0,N(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function T(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}var N=e("process-nextick-args");t.exports=s;var C=e("isarray"),j;s.ReadableState=a;var M=e("events").EventEmitter,U=function(e,t){return e.listeners(t).length},L=e("./internal/streams/stream"),D=e("safe-buffer").Buffer,z=n.Uint8Array||function(){},H=e("core-util-is");H.inherits=e("inherits");var K=e("util"),F;F=K&&K.debuglog?K.debuglog("stream"):function(){};var q=e("./internal/streams/BufferList"),V=e("./internal/streams/destroy"),G;H.inherits(s,L);var W=["error","close","destroy","pause","resume"];Object.defineProperty(s.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),s.prototype.destroy=V.destroy,s.prototype._undestroy=V.undestroy,s.prototype._destroy=function(e,t){this.push(null),t(e)},s.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:"string"==typeof e&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=D.from(e,t),t=""),n=!0),f(this,e,t,!1,n)},s.prototype.unshift=function(e){return f(this,e,null,!0,!1)},s.prototype.isPaused=function(){return!1===this._readableState.flowing},s.prototype.setEncoding=function(t){return G||(G=e("string_decoder/").StringDecoder),this._readableState.decoder=new G(t),this._readableState.encoding=t,this};var Y=8388608;s.prototype.read=function(e){F("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return F("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):y(this),null;if(e=b(e,t),0===e&&t.ended)return 0===t.length&&O(this),null;var n=t.needReadable;F("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&(n=!0,F("length less than watermark",n)),t.ended||t.reading?(n=!1,F("reading or ended",n)):n&&(F("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,!t.reading&&(e=b(r,t)));var i;return i=0<e?w(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(!t.ended&&(t.needReadable=!0),r!==e&&t.ended&&O(this)),null!==i&&this.emit("data",i),i},s.prototype._read=function(){this.emit("error",new Error("_read() is not implemented"))},s.prototype.pipe=function(e,t){function n(e,t){F("onunpipe"),e===u&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,o())}function i(){F("onend"),e.end()}function o(){F("cleanup"),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("drain",g),e.removeListener("error",s),e.removeListener("unpipe",n),u.removeListener("end",i),u.removeListener("end",p),u.removeListener("data",a),y=!0,l.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&g()}function a(t){F("ondata"),m=!1;var r=e.write(t);!1!==r||m||((1===l.pipesCount&&l.pipes===e||1<l.pipesCount&&-1!==T(l.pipes,e))&&!y&&(F("false write response, pause",u._readableState.awaitDrain),u._readableState.awaitDrain++,m=!0),u.pause())}function s(t){F("onerror",t),p(),e.removeListener("error",s),0===U(e,"error")&&e.emit("error",t)}function f(){e.removeListener("finish",c),p()}function c(){F("onfinish"),e.removeListener("close",f),p()}function p(){F("unpipe"),u.unpipe(e)}var u=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=e;break;case 1:l.pipes=[l.pipes,e];break;default:l.pipes.push(e);}l.pipesCount+=1,F("pipe count=%d opts=%j",l.pipesCount,t);var h=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,b=h?i:p;l.endEmitted?N(b):u.once("end",b),e.on("unpipe",n);var g=v(u);e.on("drain",g);var y=!1,m=!1;return u.on("data",a),d(e,"error",s),e.once("close",f),e.once("finish",c),e.emit("pipe",u),l.flowing||(F("pipe resume"),u.resume()),e},s.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var d=0;d<o;d++)n[d].emit("unpipe",this,r);return this}var i=T(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},s.prototype.on=function(e,t){var r=L.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&y(this):N(k,this))}return r},s.prototype.addListener=s.prototype.on,s.prototype.resume=function(){var e=this._readableState;return e.flowing||(F("resume"),e.flowing=!0,I(this,e)),this},s.prototype.pause=function(){return F("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(F("pause"),this._readableState.flowing=!1,this.emit("pause")),this},s.prototype.wrap=function(e){var t=this._readableState,r=!1,o=this;for(var d in e.on("end",function(){if(F("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&o.push(e)}o.push(null)}),e.on("data",function(n){if((F("wrapped data"),t.decoder&&(n=t.decoder.write(n)),!(t.objectMode&&(null===n||void 0===n)))&&(t.objectMode||n&&n.length)){var i=o.push(n);i||(r=!0,e.pause())}}),e)void 0===this[d]&&"function"==typeof e[d]&&(this[d]=function(t){return function(){return e[t].apply(e,arguments)}}(d));for(var i=0;i<W.length;i++)e.on(W[i],o.emit.bind(o,W[i]));return o._read=function(t){F("wrapped _read",t),r&&(r=!1,e.resume())},o},s._fromList=w}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"./_stream_duplex":226,"./internal/streams/BufferList":231,"./internal/streams/destroy":232,"./internal/streams/stream":233,_process:211,"core-util-is":121,events:171,inherits:234,isarray:192,"process-nextick-args":210,"safe-buffer":240,"string_decoder/":250,util:66}],229:[function(e,t){"use strict";function r(e){this.afterTransform=function(t,r){return n(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function n(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!==r&&r!==void 0&&e.push(r),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);d.call(this,e),this._transformState=new r(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,r){o(t,e,r)}):o(t)})}function o(e,t,r){if(t)return e.emit("error",t);null!==r&&r!==void 0&&e.push(r);var n=e._writableState,i=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=i;var d=e("./_stream_duplex"),a=e("core-util-is");a.inherits=e("inherits"),a.inherits(i,d),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,d.prototype.push.call(this,e,t)},i.prototype._transform=function(){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},i.prototype._read=function(){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},i.prototype._destroy=function(e,t){var r=this;d.prototype._destroy.call(this,e,function(e){t(e),r.emit("close")})}},{"./_stream_duplex":226,"core-util-is":121,inherits:234}],230:[function(e,t){(function(r,n){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){E(t,e)}}function o(e){return C.from(e)}function d(e){return C.isBuffer(e)||e instanceof j}function a(){}function s(t,r){O=O||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof O&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:o,this.highWaterMark=h(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){m(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function f(t){return O=O||e("./_stream_duplex"),U.call(f,this)||this instanceof O?void(this._writableState=new s(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),N.call(this)):new f(t)}function c(e,t){var r=new Error("write after end");e.emit("error",r),P(t,r)}function p(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"!=typeof r&&void 0!==r&&!t.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),P(n,o),i=!1),i}function u(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=C.from(t,r)),t}function l(e,t,r,n,i,o){if(!r){var d=u(t,n,i);n!==d&&(r=!0,i="buffer",n=d)}var a=t.objectMode?1:n.length;t.length+=a;var s=t.length<t.highWaterMark;if(s||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,n,i,o);return s}function b(e,t,r,n,i,o,d){t.writelen=n,t.writecb=d,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function g(e,t,r,n,i){--t.pendingcb,r?(P(i,n),P(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),A(e,t))}function y(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function m(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(y(r),t)g(e,r,n,t,i);else{var o=k(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),n?B(_,e,r,o,i):_(e,r,o,i)}}function _(e,t,r,n){r||S(e,t),t.pendingcb--,n(),A(e,t)}function S(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=Array(n),d=t.corkedRequestsFree;d.entry=r;for(var a=0,s=!0;r;)o[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;o.allBuffers=s,b(e,t,!0,t.length,o,"",d.finish),t.pendingcb++,t.lastBufferedRequest=null,d.next?(t.corkedRequestsFree=d.next,d.next=null):t.corkedRequestsFree=new i(t)}else{for(;r;){var f=r.chunk,c=r.encoding,p=r.callback,u=t.objectMode?1:f.length;if(b(e,t,!1,u,f,c,p),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),A(e,t)})}function x(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,P(I,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function A(e,t){var r=k(t);return r&&(x(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}function w(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?P(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function E(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}var P=e("process-nextick-args");t.exports=f;var B=!r.browser&&-1<["v0.10","v0.9."].indexOf(r.version.slice(0,5))?setImmediate:P,O;f.WritableState=s;var R=e("core-util-is");R.inherits=e("inherits");var T={deprecate:e("util-deprecate")},N=e("./internal/streams/stream"),C=e("safe-buffer").Buffer,j=n.Uint8Array||function(){},M=e("./internal/streams/destroy");R.inherits(f,N),s.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(s.prototype,"buffer",{get:T.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var U;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(U=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(e){return!!U.call(this,e)||e&&e._writableState instanceof s}})):U=function(e){return e instanceof this},f.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},f.prototype.write=function(e,t,r){var n=this._writableState,i=!1,s=d(e)&&!n.objectMode;return s&&!C.isBuffer(e)&&(e=o(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":!t&&(t=n.defaultEncoding),"function"!=typeof r&&(r=a),n.ended?c(this,r):(s||p(this,n,e,r))&&(n.pendingcb++,i=l(this,n,s,e,t,r)),i},f.prototype.cork=function(){var e=this._writableState;e.corked++},f.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest&&v(this,e))},f.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},f.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},f.prototype._writev=null,f.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==void 0&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||w(this,n,r)},Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),f.prototype.destroy=M.destroy,f.prototype._undestroy=M.undestroy,f.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"./_stream_duplex":226,"./internal/streams/destroy":232,"./internal/streams/stream":233,_process:211,"core-util-is":121,inherits:234,"process-nextick-args":210,"safe-buffer":240,"util-deprecate":253}],231:[function(e,t){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){e.copy(t,r)}var d=e("safe-buffer").Buffer;t.exports=function(){function e(){r(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};0<this.length?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return d.alloc(0);if(1===this.length)return this.head.data;for(var t=d.allocUnsafe(e>>>0),r=this.head,n=0;r;)o(r.data,t,n),n+=r.data.length,r=r.next;return t},e}()},{"safe-buffer":240}],232:[function(e,t){"use strict";function r(e,t){e.emit("error",t)}var n=e("process-nextick-args");t.exports={destroy:function(e,t){var i=this,o=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return o||d?void(t?t(e):e&&(!this._writableState||!this._writableState.errorEmitted)&&n(r,this,e)):void(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(n(r,i,e),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(e)}))},undestroy:function(){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.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":210}],233:[function(e,t){t.exports=e("events").EventEmitter},{events:171}],234:[function(e,t,r){arguments[4][186][0].apply(r,arguments)},{dup:186}],235:[function(e,t){t.exports=e("./readable").PassThrough},{"./readable":236}],236:[function(e,t,r){r=t.exports=e("./lib/_stream_readable.js"),r.Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":226,"./lib/_stream_passthrough.js":227,"./lib/_stream_readable.js":228,"./lib/_stream_transform.js":229,"./lib/_stream_writable.js":230}],237:[function(e,t){t.exports=e("./readable").Transform},{"./readable":236}],238:[function(e,t){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":230}],239:[function(e,t){(function(r){"use strict";function n(){p.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function o(e,t){return e<<t|e>>>32-t}function d(t,r,n,i,d,e,a,f){return 0|o(0|t+(r^n^i)+e+a,f)+d}function a(t,r,n,i,d,e,a,f){return 0|o(0|t+(r&n|~r&i)+e+a,f)+d}function s(t,r,n,i,d,e,a,f){return 0|o(0|t+((r|~n)^i)+e+a,f)+d}function f(t,r,n,i,a,e,f,c){return 0|o(0|t+(r&i|n&~i)+e+f,c)+a}function c(t,r,n,i,a,e,f,c){return 0|o(0|t+(r^(n|~i))+e+f,c)+a}var i=e("inherits"),p=e("hash-base");i(n,p),n.prototype._update=function(){for(var e=Array(16),r=0;16>r;++r)e[r]=this._block.readInt32LE(4*r);var n=this._a,i=this._b,p=this._c,u=this._d,l=this._e;n=d(n,i,p,u,l,e[0],0,11),p=o(p,10),l=d(l,n,i,p,u,e[1],0,14),i=o(i,10),u=d(u,l,n,i,p,e[2],0,15),n=o(n,10),p=d(p,u,l,n,i,e[3],0,12),l=o(l,10),i=d(i,p,u,l,n,e[4],0,5),u=o(u,10),n=d(n,i,p,u,l,e[5],0,8),p=o(p,10),l=d(l,n,i,p,u,e[6],0,7),i=o(i,10),u=d(u,l,n,i,p,e[7],0,9),n=o(n,10),p=d(p,u,l,n,i,e[8],0,11),l=o(l,10),i=d(i,p,u,l,n,e[9],0,13),u=o(u,10),n=d(n,i,p,u,l,e[10],0,14),p=o(p,10),l=d(l,n,i,p,u,e[11],0,15),i=o(i,10),u=d(u,l,n,i,p,e[12],0,6),n=o(n,10),p=d(p,u,l,n,i,e[13],0,7),l=o(l,10),i=d(i,p,u,l,n,e[14],0,9),u=o(u,10),n=d(n,i,p,u,l,e[15],0,8),p=o(p,10),l=a(l,n,i,p,u,e[7],1518500249,7),i=o(i,10),u=a(u,l,n,i,p,e[4],1518500249,6),n=o(n,10),p=a(p,u,l,n,i,e[13],1518500249,8),l=o(l,10),i=a(i,p,u,l,n,e[1],1518500249,13),u=o(u,10),n=a(n,i,p,u,l,e[10],1518500249,11),p=o(p,10),l=a(l,n,i,p,u,e[6],1518500249,9),i=o(i,10),u=a(u,l,n,i,p,e[15],1518500249,7),n=o(n,10),p=a(p,u,l,n,i,e[3],1518500249,15),l=o(l,10),i=a(i,p,u,l,n,e[12],1518500249,7),u=o(u,10),n=a(n,i,p,u,l,e[0],1518500249,12),p=o(p,10),l=a(l,n,i,p,u,e[9],1518500249,15),i=o(i,10),u=a(u,l,n,i,p,e[5],1518500249,9),n=o(n,10),p=a(p,u,l,n,i,e[2],1518500249,11),l=o(l,10),i=a(i,p,u,l,n,e[14],1518500249,7),u=o(u,10),n=a(n,i,p,u,l,e[11],1518500249,13),p=o(p,10),l=a(l,n,i,p,u,e[8],1518500249,12),i=o(i,10),u=s(u,l,n,i,p,e[3],1859775393,11),n=o(n,10),p=s(p,u,l,n,i,e[10],1859775393,13),l=o(l,10),i=s(i,p,u,l,n,e[14],1859775393,6),u=o(u,10),n=s(n,i,p,u,l,e[4],1859775393,7),p=o(p,10),l=s(l,n,i,p,u,e[9],1859775393,14),i=o(i,10),u=s(u,l,n,i,p,e[15],1859775393,9),n=o(n,10),p=s(p,u,l,n,i,e[8],1859775393,13),l=o(l,10),i=s(i,p,u,l,n,e[1],1859775393,15),u=o(u,10),n=s(n,i,p,u,l,e[2],1859775393,14),p=o(p,10),l=s(l,n,i,p,u,e[7],1859775393,8),i=o(i,10),u=s(u,l,n,i,p,e[0],1859775393,13),n=o(n,10),p=s(p,u,l,n,i,e[6],1859775393,6),l=o(l,10),i=s(i,p,u,l,n,e[13],1859775393,5),u=o(u,10),n=s(n,i,p,u,l,e[11],1859775393,12),p=o(p,10),l=s(l,n,i,p,u,e[5],1859775393,7),i=o(i,10),u=s(u,l,n,i,p,e[12],1859775393,5),n=o(n,10),p=f(p,u,l,n,i,e[1],2400959708,11),l=o(l,10),i=f(i,p,u,l,n,e[9],2400959708,12),u=o(u,10),n=f(n,i,p,u,l,e[11],2400959708,14),p=o(p,10),l=f(l,n,i,p,u,e[10],2400959708,15),i=o(i,10),u=f(u,l,n,i,p,e[0],2400959708,14),n=o(n,10),p=f(p,u,l,n,i,e[8],2400959708,15),l=o(l,10),i=f(i,p,u,l,n,e[12],2400959708,9),u=o(u,10),n=f(n,i,p,u,l,e[4],2400959708,8),p=o(p,10),l=f(l,n,i,p,u,e[13],2400959708,9),i=o(i,10),u=f(u,l,n,i,p,e[3],2400959708,14),n=o(n,10),p=f(p,u,l,n,i,e[7],2400959708,5),l=o(l,10),i=f(i,p,u,l,n,e[15],2400959708,6),u=o(u,10),n=f(n,i,p,u,l,e[14],2400959708,8),p=o(p,10),l=f(l,n,i,p,u,e[5],2400959708,6),i=o(i,10),u=f(u,l,n,i,p,e[6],2400959708,5),n=o(n,10),p=f(p,u,l,n,i,e[2],2400959708,12),l=o(l,10),i=c(i,p,u,l,n,e[4],2840853838,9),u=o(u,10),n=c(n,i,p,u,l,e[0],2840853838,15),p=o(p,10),l=c(l,n,i,p,u,e[5],2840853838,5),i=o(i,10),u=c(u,l,n,i,p,e[9],2840853838,11),n=o(n,10),p=c(p,u,l,n,i,e[7],2840853838,6),l=o(l,10),i=c(i,p,u,l,n,e[12],2840853838,8),u=o(u,10),n=c(n,i,p,u,l,e[2],2840853838,13),p=o(p,10),l=c(l,n,i,p,u,e[10],2840853838,12),i=o(i,10),u=c(u,l,n,i,p,e[14],2840853838,5),n=o(n,10),p=c(p,u,l,n,i,e[1],2840853838,12),l=o(l,10),i=c(i,p,u,l,n,e[3],2840853838,13),u=o(u,10),n=c(n,i,p,u,l,e[8],2840853838,14),p=o(p,10),l=c(l,n,i,p,u,e[11],2840853838,11),i=o(i,10),u=c(u,l,n,i,p,e[6],2840853838,8),n=o(n,10),p=c(p,u,l,n,i,e[15],2840853838,5),l=o(l,10),i=c(i,p,u,l,n,e[13],2840853838,6),u=o(u,10);var h=this._a,b=this._b,g=this._c,y=this._d,m=this._e;h=c(h,b,g,y,m,e[5],1352829926,8),g=o(g,10),m=c(m,h,b,g,y,e[14],1352829926,9),b=o(b,10),y=c(y,m,h,b,g,e[7],1352829926,9),h=o(h,10),g=c(g,y,m,h,b,e[0],1352829926,11),m=o(m,10),b=c(b,g,y,m,h,e[9],1352829926,13),y=o(y,10),h=c(h,b,g,y,m,e[2],1352829926,15),g=o(g,10),m=c(m,h,b,g,y,e[11],1352829926,15),b=o(b,10),y=c(y,m,h,b,g,e[4],1352829926,5),h=o(h,10),g=c(g,y,m,h,b,e[13],1352829926,7),m=o(m,10),b=c(b,g,y,m,h,e[6],1352829926,7),y=o(y,10),h=c(h,b,g,y,m,e[15],1352829926,8),g=o(g,10),m=c(m,h,b,g,y,e[8],1352829926,11),b=o(b,10),y=c(y,m,h,b,g,e[1],1352829926,14),h=o(h,10),g=c(g,y,m,h,b,e[10],1352829926,14),m=o(m,10),b=c(b,g,y,m,h,e[3],1352829926,12),y=o(y,10),h=c(h,b,g,y,m,e[12],1352829926,6),g=o(g,10),m=f(m,h,b,g,y,e[6],1548603684,9),b=o(b,10),y=f(y,m,h,b,g,e[11],1548603684,13),h=o(h,10),g=f(g,y,m,h,b,e[3],1548603684,15),m=o(m,10),b=f(b,g,y,m,h,e[7],1548603684,7),y=o(y,10),h=f(h,b,g,y,m,e[0],1548603684,12),g=o(g,10),m=f(m,h,b,g,y,e[13],1548603684,8),b=o(b,10),y=f(y,m,h,b,g,e[5],1548603684,9),h=o(h,10),g=f(g,y,m,h,b,e[10],1548603684,11),m=o(m,10),b=f(b,g,y,m,h,e[14],1548603684,7),y=o(y,10),h=f(h,b,g,y,m,e[15],1548603684,7),g=o(g,10),m=f(m,h,b,g,y,e[8],1548603684,12),b=o(b,10),y=f(y,m,h,b,g,e[12],1548603684,7),h=o(h,10),g=f(g,y,m,h,b,e[4],1548603684,6),m=o(m,10),b=f(b,g,y,m,h,e[9],1548603684,15),y=o(y,10),h=f(h,b,g,y,m,e[1],1548603684,13),g=o(g,10),m=f(m,h,b,g,y,e[2],1548603684,11),b=o(b,10),y=s(y,m,h,b,g,e[15],1836072691,9),h=o(h,10),g=s(g,y,m,h,b,e[5],1836072691,7),m=o(m,10),b=s(b,g,y,m,h,e[1],1836072691,15),y=o(y,10),h=s(h,b,g,y,m,e[3],1836072691,11),g=o(g,10),m=s(m,h,b,g,y,e[7],1836072691,8),b=o(b,10),y=s(y,m,h,b,g,e[14],1836072691,6),h=o(h,10),g=s(g,y,m,h,b,e[6],1836072691,6),m=o(m,10),b=s(b,g,y,m,h,e[9],1836072691,14),y=o(y,10),h=s(h,b,g,y,m,e[11],1836072691,12),g=o(g,10),m=s(m,h,b,g,y,e[8],1836072691,13),b=o(b,10),y=s(y,m,h,b,g,e[12],1836072691,5),h=o(h,10),g=s(g,y,m,h,b,e[2],1836072691,14),m=o(m,10),b=s(b,g,y,m,h,e[10],1836072691,13),y=o(y,10),h=s(h,b,g,y,m,e[0],1836072691,13),g=o(g,10),m=s(m,h,b,g,y,e[4],1836072691,7),b=o(b,10),y=s(y,m,h,b,g,e[13],1836072691,5),h=o(h,10),g=a(g,y,m,h,b,e[8],2053994217,15),m=o(m,10),b=a(b,g,y,m,h,e[6],2053994217,5),y=o(y,10),h=a(h,b,g,y,m,e[4],2053994217,8),g=o(g,10),m=a(m,h,b,g,y,e[1],2053994217,11),b=o(b,10),y=a(y,m,h,b,g,e[3],2053994217,14),h=o(h,10),g=a(g,y,m,h,b,e[11],2053994217,14),m=o(m,10),b=a(b,g,y,m,h,e[15],2053994217,6),y=o(y,10),h=a(h,b,g,y,m,e[0],2053994217,14),g=o(g,10),m=a(m,h,b,g,y,e[5],2053994217,6),b=o(b,10),y=a(y,m,h,b,g,e[12],2053994217,9),h=o(h,10),g=a(g,y,m,h,b,e[2],2053994217,12),m=o(m,10),b=a(b,g,y,m,h,e[13],2053994217,9),y=o(y,10),h=a(h,b,g,y,m,e[9],2053994217,12),g=o(g,10),m=a(m,h,b,g,y,e[7],2053994217,5),b=o(b,10),y=a(y,m,h,b,g,e[10],2053994217,15),h=o(h,10),g=a(g,y,m,h,b,e[14],2053994217,8),m=o(m,10),b=d(b,g,y,m,h,e[12],0,8),y=o(y,10),h=d(h,b,g,y,m,e[15],0,5),g=o(g,10),m=d(m,h,b,g,y,e[10],0,12),b=o(b,10),y=d(y,m,h,b,g,e[4],0,9),h=o(h,10),g=d(g,y,m,h,b,e[1],0,12),m=o(m,10),b=d(b,g,y,m,h,e[5],0,5),y=o(y,10),h=d(h,b,g,y,m,e[8],0,14),g=o(g,10),m=d(m,h,b,g,y,e[7],0,6),b=o(b,10),y=d(y,m,h,b,g,e[6],0,8),h=o(h,10),g=d(g,y,m,h,b,e[2],0,13),m=o(m,10),b=d(b,g,y,m,h,e[13],0,6),y=o(y,10),h=d(h,b,g,y,m,e[14],0,5),g=o(g,10),m=d(m,h,b,g,y,e[0],0,15),b=o(b,10),y=d(y,m,h,b,g,e[3],0,13),h=o(h,10),g=d(g,y,m,h,b,e[9],0,11),m=o(m,10),b=d(b,g,y,m,h,e[11],0,11),y=o(y,10);var _=0|this._b+p+y;this._b=0|this._c+u+m,this._c=0|this._d+l+h,this._d=0|this._e+n+b,this._e=0|this._a+i+g,this._a=_},n.prototype._digest=function(){this._block[this._blockOffset++]=128,56<this._blockOffset&&(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 e=new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:115,"hash-base":173,inherits:190}],240:[function(e,t,r){function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return d(e,t,r)}var o=e("buffer"),d=o.Buffer;d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?t.exports=o:(n(o,r),r.Buffer=i),n(d,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return d(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=d(e);return void 0===t?n.fill(0):"string"==typeof r?n.fill(t,r):n.fill(t),n},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return d(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}},{buffer:115}],241:[function(e,t){function r(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}var n=e("safe-buffer").Buffer;r.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,o=this._blockSize,d=e.length,a=this._len,s=0;s<d;){for(var f=a%o,c=u(d-s,o-f),p=0;p<c;p++)r[f+p]=e[s+p];a+=c,s+=c,0==a%o&&this._update(r)}return this._len+=d,this},r.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(4294967295>=r)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=4294967295&r;this._block.writeUInt32BE((r-n)/4294967296,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r},{"safe-buffer":240}],242:[function(e,t,r){var r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":243,"./sha1":244,"./sha224":245,"./sha256":246,"./sha384":247,"./sha512":248}],243:[function(e,t){function r(){this.init(),this._w=c,a.call(this,64,56)}function n(e){return e<<5|e>>>27}function i(e){return e<<30|e>>>2}function o(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}var d=e("inherits"),a=e("./hash"),s=e("safe-buffer").Buffer,f=[1518500249,1859775393,-1894007588,-899497514],c=Array(80);d(r,a),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(r){for(var p=this._w,u=0|this._a,a=0|this._b,l=0|this._c,c=0|this._d,d=0|this._e,e=0;16>e;++e)p[e]=r.readInt32BE(4*e);for(;80>e;++e)p[e]=p[e-3]^p[e-8]^p[e-14]^p[e-16];for(var h=0;80>h;++h){var b=~~(h/20),s=0|n(u)+o(b,a,l,c)+d+p[h]+f[b];d=c,c=l,l=i(a),a=u,u=s}this._a=0|u+this._a,this._b=0|a+this._b,this._c=0|l+this._c,this._d=0|c+this._d,this._e=0|d+this._e},r.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=r},{"./hash":241,inherits:190,"safe-buffer":240}],244:[function(e,t){function r(){this.init(),this._w=c,a.call(this,64,56)}function n(e){return e<<1|e>>>31}function i(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}var d=e("inherits"),a=e("./hash"),s=e("safe-buffer").Buffer,p=[1518500249,1859775393,-1894007588,-899497514],c=Array(80);d(r,a),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(r){for(var u=this._w,l=0|this._a,a=0|this._b,h=0|this._c,c=0|this._d,d=0|this._e,e=0;16>e;++e)u[e]=r.readInt32BE(4*e);for(;80>e;++e)u[e]=n(u[e-3]^u[e-8]^u[e-14]^u[e-16]);for(var b=0;80>b;++b){var g=~~(b/20),s=0|i(l)+f(g,a,h,c)+d+u[b]+p[g];d=c,c=h,h=o(a),a=l,l=s}this._a=0|l+this._a,this._b=0|a+this._b,this._c=0|h+this._c,this._d=0|c+this._d,this._e=0|d+this._e},r.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=r},{"./hash":241,inherits:190,"safe-buffer":240}],245:[function(e,t){function r(){this.init(),this._w=a,o.call(this,64,56)}var n=e("inherits"),i=e("./sha256"),o=e("./hash"),d=e("safe-buffer").Buffer,a=Array(64);n(r,i),r.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},r.prototype._hash=function(){var e=d.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=r},{"./hash":241,"./sha256":246,inherits:190,"safe-buffer":240}],246:[function(e,t){function r(){this.init(),this._w=l,c.call(this,64,56)}function n(e,t,r){return r^e&(t^r)}function i(e,t,r){return e&t|r&(e|t)}function o(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function s(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function a(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var f=e("inherits"),c=e("./hash"),p=e("safe-buffer").Buffer,u=[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],l=Array(64);f(r,c),r.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},r.prototype._update=function(t){for(var r=this._w,p=0|this._a,l=0|this._b,b=0|this._c,c=0|this._d,y=0|this._e,e=0|this._f,f=0|this._g,g=0|this._h,h=0;16>h;++h)r[h]=t.readInt32BE(4*h);for(;64>h;++h)r[h]=0|a(r[h-2])+r[h-7]+d(r[h-15])+r[h-16];for(var m=0;64>m;++m){var _=0|g+s(y)+n(y,e,f)+u[m]+r[m],S=0|o(p)+i(p,l,b);g=f,f=e,e=y,y=0|c+_,c=b,b=l,l=p,p=0|_+S}this._a=0|p+this._a,this._b=0|l+this._b,this._c=0|b+this._c,this._d=0|c+this._d,this._e=0|y+this._e,this._f=0|e+this._f,this._g=0|f+this._g,this._h=0|g+this._h},r.prototype._hash=function(){var e=p.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=r},{"./hash":241,inherits:190,"safe-buffer":240}],247:[function(e,t){function r(){this.init(),this._w=a,o.call(this,128,112)}var n=e("inherits"),i=e("./sha512"),o=e("./hash"),d=e("safe-buffer").Buffer,a=Array(160);n(r,i),r.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},r.prototype._hash=function(){function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}var t=d.allocUnsafe(48);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=r},{"./hash":241,"./sha512":248,inherits:190,"safe-buffer":240}],248:[function(e,t){function r(){this.init(),this._w=g,l.call(this,128,112)}function n(e,t,r){return r^e&(t^r)}function i(e,t,r){return e&t|r&(e|t)}function o(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function a(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function s(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function f(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function c(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function p(e,t){return e>>>0<t>>>0?1:0}var u=e("inherits"),l=e("./hash"),h=e("safe-buffer").Buffer,b=[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],g=Array(160);u(r,l),r.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},r.prototype._update=function(e){for(var t=this._w,r=0|this._ah,u=0|this._bh,l=0|this._ch,h=0|this._dh,g=0|this._eh,y=0|this._fh,m=0|this._gh,_=0|this._hh,S=0|this._al,v=0|this._bl,k=0|this._cl,I=0|this._dl,x=0|this._el,A=0|this._fl,w=0|this._gl,E=0|this._hl,P=0;32>P;P+=2)t[P]=e.readInt32BE(4*P),t[P+1]=e.readInt32BE(4*P+4);for(;160>P;P+=2){var B=t[P-30],O=t[P-30+1],R=a(B,O),T=s(O,B);B=t[P-4],O=t[P-4+1];var N=f(B,O),C=c(O,B),M=t[P-14],U=t[P-14+1],L=t[P-32],D=t[P-32+1],z=0|T+U,H=0|R+M+p(z,T);z=0|z+C,H=0|H+N+p(z,C),z=0|z+D,H=0|H+L+p(z,D),t[P]=H,t[P+1]=z}for(var K=0;160>K;K+=2){H=t[K],z=t[K+1];var j=i(r,u,l),F=i(S,v,k),q=o(r,S),V=o(S,r),G=d(g,x),W=d(x,g),Y=b[K],X=b[K+1],Z=n(g,y,m),J=n(x,A,w),Q=0|E+W,$=0|_+G+p(Q,E);Q=0|Q+J,$=0|$+Z+p(Q,J),Q=0|Q+X,$=0|$+Y+p(Q,X),Q=0|Q+z,$=0|$+H+p(Q,z);var ee=0|V+F,te=0|q+j+p(ee,V);_=m,E=w,m=y,w=A,y=g,A=x,x=0|I+Q,g=0|h+$+p(x,I),h=l,I=k,l=u,k=v,u=r,v=S,S=0|Q+ee,r=0|$+te+p(S,Q)}this._al=0|this._al+S,this._bl=0|this._bl+v,this._cl=0|this._cl+k,this._dl=0|this._dl+I,this._el=0|this._el+x,this._fl=0|this._fl+A,this._gl=0|this._gl+w,this._hl=0|this._hl+E,this._ah=0|this._ah+r+p(this._al,S),this._bh=0|this._bh+u+p(this._bl,v),this._ch=0|this._ch+l+p(this._cl,k),this._dh=0|this._dh+h+p(this._dl,I),this._eh=0|this._eh+g+p(this._el,x),this._fh=0|this._fh+y+p(this._fl,A),this._gh=0|this._gh+m+p(this._gl,w),this._hh=0|this._hh+_+p(this._hl,E)},r.prototype._hash=function(){function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}var t=h.allocUnsafe(64);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=r},{"./hash":241,inherits:190,"safe-buffer":240}],249:[function(e,t){function r(){n.call(this)}t.exports=r;var n=e("events").EventEmitter,i=e("inherits");i(r,n),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&f.pause&&f.pause()}function i(){f.readable&&f.resume&&f.resume()}function o(){c||(c=!0,e.end())}function d(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(s(),0===n.listenerCount(this,"error"))throw e}function s(){f.removeListener("data",r),e.removeListener("drain",i),f.removeListener("end",o),f.removeListener("close",d),f.removeListener("error",a),e.removeListener("error",a),f.removeListener("end",s),f.removeListener("close",s),e.removeListener("close",s)}var f=this;f.on("data",r),e.on("drain",i),e._isStdio||t&&!1===t.end||(f.on("end",o),f.on("close",d));var c=!1;return f.on("error",a),e.on("error",a),f.on("end",s),f.on("close",s),e.on("close",s),e.emit("pipe",f),e}},{events:171,inherits:190,"readable-stream/duplex.js":225,"readable-stream/passthrough.js":235,"readable-stream/readable.js":236,"readable-stream/transform.js":237,"readable-stream/writable.js":238}],250:[function(e,t,r){"use strict";function n(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0;}}function i(e){var t=n(e);if("string"!=typeof t&&(g.isEncoding===y||!y(e)))throw new Error("Unknown encoding: "+e);return t||e}function o(e){this.encoding=i(e);var t;switch(this.encoding){case"utf16le":this.text=c,this.end=p,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=u,this.end=l,t=3;break;default:return this.write=h,void(this.end=b);}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(t)}function d(e){if(127>=e)return 0;return 6==e>>5?2:14==e>>4?3:30==e>>3?4:-1}function a(e,t,r){var n=t.length-1;if(n<r)return 0;var i=d(t[n]);return 0<=i?(0<i&&(e.lastNeed=i-1),i):--n<r?0:(i=d(t[n]),0<=i)?(0<i&&(e.lastNeed=i-2),i):--n<r?0:(i=d(t[n]),0<=i?(0<i&&(2===i?i=0:e.lastNeed=i-3),i):0)}function s(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"\uFFFD".repeat(r);if(1<e.lastNeed&&1<t.length){if(128!=(192&t[1]))return e.lastNeed=1,"\uFFFD".repeat(r+1);if(2<e.lastNeed&&2<t.length&&128!=(192&t[2]))return e.lastNeed=2,"\uFFFD".repeat(r+2)}}function f(e){var t=this.lastTotal-this.lastNeed,n=s(this,e,t);return void 0===n?this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length):n}function c(e,t){if(0==(e.length-t)%2){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(55296<=r&&56319>=r)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}var g=e("safe-buffer").Buffer,y=g.isEncoding||function(e){switch(e=""+e,e&&e.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;}};r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD".repeat(this.lastTotal-this.lastNeed):t},o.prototype.text=function(e,t){var r=a(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){return this.lastNeed<=e.length?(e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length)}},{"safe-buffer":240}],251:[function(e,t,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,r){if(e&&d.isObject(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}var o=e("punycode"),d=e("./util");r.parse=i,r.resolve=function(e,t){return i(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?i(e,!1,!0).resolveObject(t):t},r.format=function(e){return d.isString(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)},r.Url=n;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">","\"","`"," ","\r","\n","\t"]),p=["'"].concat(c),u=["%","/","?",";","#"].concat(p),l=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=e("querystring");n.prototype.parse=function(e,t,r){if(!d.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),c=-1!==n&&n<e.indexOf("#")?"?":"#",S=e.split(c),v=/\\/g;S[0]=S[0].replace(v,"/"),e=S.join(c);var I=e;if(I=I.trim(),!r&&1===e.split("#").length){var x=f.exec(I);if(x)return this.path=I,this.href=I,this.pathname=x[1],x[2]?(this.search=x[2],this.query=t?_.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var A=a.exec(I);if(A){A=A[0];var w=A.toLowerCase();this.protocol=w,I=I.substr(A.length)}if(r||A||I.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===I.substr(0,2);E&&!(A&&y[A])&&(I=I.substr(2),this.slashes=!0)}if(!y[A]&&(E||A&&!m[A])){for(var P=-1,B=0,i;B<l.length;B++)i=I.indexOf(l[B]),-1!==i&&(-1==P||i<P)&&(P=i);var O,R;R=-1===P?I.lastIndexOf("@"):I.lastIndexOf("@",P),-1!==R&&(O=I.slice(0,R),I=I.slice(R+1),this.auth=decodeURIComponent(O)),P=-1;for(var B=0,i;B<u.length;B++)i=I.indexOf(u[B]),-1!==i&&(-1===P||i<P)&&(P=i);-1===P&&(P=I.length),this.host=I.slice(0,P),I=I.slice(P),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var N=this.hostname.split(/\./),B=0,C=N.length,M;B<C;B++)if(M=N[B],M&&!M.match(h)){for(var U="",L=0,j=M.length;L<j;L++)U+=127<M.charCodeAt(L)?"x":M[L];if(!U.match(h)){var k=N.slice(0,B),D=N.slice(B+1),z=M.match(b);z&&(k.push(z[1]),D.unshift(z[2])),D.length&&(I="/"+D.join(".")+I),this.hostname=k.join(".");break}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),T||(this.hostname=o.toASCII(this.hostname));var H=this.port?":"+this.port:"",K=this.hostname||"";this.host=K+H,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==I[0]&&(I="/"+I))}if(!g[w])for(var B=0,C=p.length,F;B<C;B++)if(F=p[B],-1!==I.indexOf(F)){var q=encodeURIComponent(F);q===F&&(q=escape(F)),I=I.split(F).join(q)}var V=I.indexOf("#");-1!==V&&(this.hash=I.substr(V),I=I.slice(0,V));var G=I.indexOf("?");if(-1===G?t&&(this.search="",this.query={}):(this.search=I.substr(G),this.query=I.substr(G+1),t&&(this.query=_.parse(this.query)),I=I.slice(0,G)),I&&(this.pathname=I),m[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var H=this.pathname||"",W=this.search||"";this.path=H+W}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&d.isObject(this.query)&&Object.keys(this.query).length&&(o=_.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):!i&&(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),a=a.replace("#","%23"),t+i+r+a+n},n.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(d.isString(e)){var t=new n;t.parse(e,!1,!0),e=t}for(var r=new n,o=Object.keys(this),a=0,f;a<o.length;a++)f=o[a],r[f]=this[f];if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0,l;u<c.length;u++)l=c[u],"protocol"!==l&&(r[l]=e[l]);return m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var h=Object.keys(e),b=0,g;b<h.length;b++)g=h[b],r[g]=e[g];return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!y[e.protocol]){for(var _=(e.pathname||"").split("/");_.length&&!(e.host=_.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==_[0]&&_.unshift(""),2>_.length&&_.unshift(""),r.pathname=_.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var S=r.pathname||"",p=r.search||"";r.path=S+p}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var s=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),k=v||s||r.host&&e.pathname,I=k,x=r.pathname&&r.pathname.split("/")||[],_=e.pathname&&e.pathname.split("/")||[],A=r.protocol&&!m[r.protocol];if(A&&(r.hostname="",r.port=null,r.host&&(""===x[0]?x[0]=r.host:x.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===_[0]?_[0]=e.host:_.unshift(e.host)),e.host=null),k=k&&(""===_[0]||""===x[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,x=_;else if(_.length)x||(x=[]),x.pop(),x=x.concat(_),r.search=e.search,r.query=e.query;else if(!d.isNullOrUndefined(e.search)){if(A){r.hostname=r.host=x.shift();var w=r.host&&0<r.host.indexOf("@")&&r.host.split("@");w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return r.search=e.search,r.query=e.query,d.isNull(r.pathname)&&d.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.path=r.search?"/"+r.search:null,r.href=r.format(),r;for(var E=x.slice(-1)[0],P=(r.host||e.host||1<x.length)&&("."===E||".."===E)||""===E,B=0,O=x.length;0<=O;O--)E=x[O],"."===E?x.splice(O,1):".."===E?(x.splice(O,1),B++):B&&(x.splice(O,1),B--);if(!k&&!I)for(;B--;B)x.unshift("..");k&&""!==x[0]&&(!x[0]||"/"!==x[0].charAt(0))&&x.unshift(""),P&&"/"!==x.join("/").substr(-1)&&x.push("");var i=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(A){r.hostname=r.host=i?"":x.length?x.shift():"";var w=r.host&&0<r.host.indexOf("@")&&r.host.split("@");w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return k=k||r.host&&x.length,k&&!i&&x.unshift(""),x.length?r.pathname=x.join("/"):(r.pathname=null,r.path=null),d.isNull(r.pathname)&&d.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":252,punycode:219,querystring:222}],252:[function(e,t){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],253:[function(e,t){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===(r+"").toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);else r("traceDeprecation")?console.trace(t):console.warn(t);n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],254:[function(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],255:[function(e,t,r){(function(t,n){function o(e,t){var n={seen:[],stylize:d};return 3<=arguments.length&&(n.depth=arguments[2]),4<=arguments.length&&(n.colors=arguments[3]),b(t)?n.showHidden=t:t&&r._extend(n,t),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),s(n,e,n.depth)}function i(e,t){var r=o.styles[t];return r?"\x1B["+o.colors[r][0]+"m"+e+"\x1B["+o.colors[r][1]+"m":e}function d(e){return e}function a(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function s(e,t,i){if(e.customInspect&&t&&x(t.inspect)&&t.inspect!==r.inspect&&!(t.constructor&&t.constructor.prototype===t)){var o=t.inspect(i,e);return m(o)||(o=s(e,o,i)),o}var d=f(e,t);if(d)return d;var b=Object.keys(t),g=a(b);if(e.showHidden&&(b=Object.getOwnPropertyNames(t)),I(t)&&(0<=b.indexOf("message")||0<=b.indexOf("description")))return c(t);if(0===b.length){if(x(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(S(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(k(t))return e.stylize(Date.prototype.toString.call(t),"date");if(I(t))return c(t)}var _="",v=!1,A=["{","}"];if(h(t)&&(v=!0,A=["[","]"]),x(t)){var w=t.name?": "+t.name:"";_=" [Function"+w+"]"}if(S(t)&&(_=" "+RegExp.prototype.toString.call(t)),k(t)&&(_=" "+Date.prototype.toUTCString.call(t)),I(t)&&(_=" "+c(t)),0===b.length&&(!v||0==t.length))return A[0]+_+A[1];if(0>i)return S(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var n;return n=v?p(e,t,i,g,b):b.map(function(r){return u(e,t,i,g,r,v)}),e.seen.pop(),l(n,_,A)}function f(e,t){if(_(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):b(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,o){for(var d=[],a=0,i=t.length;a<i;++a)P(t,a+"")?d.push(u(e,t,r,n,a+"",!0)):d.push("");return o.forEach(function(i){i.match(/^\d+$/)||d.push(u(e,t,r,n,i,!0))}),d}function u(e,t,r,n,i,o){var d,a,f;if(f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},f.get?f.set?a=e.stylize("[Getter/Setter]","special"):a=e.stylize("[Getter]","special"):f.set&&(a=e.stylize("[Setter]","special")),P(n,i)||(d="["+i+"]"),a||(0>e.seen.indexOf(f.value)?(a=g(r)?s(e,f.value,null):s(e,f.value,r-1),-1<a.indexOf("\n")&&(o?a=a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):a="\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),_(d)){if(o&&i.match(/^\d+$/))return a;d=JSON.stringify(""+i),d.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(d=d.substr(1,d.length-2),d=e.stylize(d,"name")):(d=d.replace(/'/g,"\\'").replace(/\\"/g,"\"").replace(/(^"|"$)/g,"'"),d=e.stylize(d,"string"))}return d+": "+a}function l(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,0<=t.indexOf("\n")&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return 60<i?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function h(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function m(e){return"string"==typeof e}function _(e){return void 0===e}function S(e){return v(e)&&"[object RegExp]"===A(e)}function v(e){return"object"==typeof e&&null!==e}function k(e){return v(e)&&"[object Date]"===A(e)}function I(t){return v(t)&&("[object Error]"===A(t)||t instanceof Error)}function x(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function w(e){return 10>e?"0"+e.toString(10):e.toString(10)}function E(){var e=new Date,t=[w(e.getHours()),w(e.getMinutes()),w(e.getSeconds())].join(":");return[e.getDate(),T[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var B=/%[sdj%]/g;r.format=function(e){if(!m(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,d=(e+"").replace(B,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return n[r++]+"";case"%d":return+n[r++];case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e;}}),a=n[r];r<i;a=n[++r])d+=g(a)||!v(a)?" "+a:" "+o(a);return d},r.deprecate=function(e,i){if(_(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(i);else t.traceDeprecation?console.trace(i):console.error(i);o=!0}return e.apply(this,arguments)}};var O={},R;r.debuglog=function(e){if(_(R)&&(R=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!O[e])if(new RegExp("\\b"+e+"\\b","i").test(R)){var n=t.pid;O[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else O[e]=function(){};return O[e]},r.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=b,r.isNull=g,r.isNullOrUndefined=function(e){return null==e},r.isNumber=y,r.isString=m,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=_,r.isRegExp=S,r.isObject=v,r.isDate=k,r.isError=I,r.isFunction=x,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e},r.isBuffer=e("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",E(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"./support/isBuffer":254,_process:211,inherits:190}],256:[function(e,t,r){function n(){}var i=e("indexof"),o=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},d=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},a=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(e,t,r){e[t]=r}}}(),s=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];n.prototype={};var f=r.Script=function(e){return this instanceof f?void(this.code=e):new f(e)};f.prototype.runInContext=function(e){if(!(e instanceof n))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,f=r.eval,c=r.execScript;!f&&c&&(c.call(r,"null"),f=r.eval),d(o(e),function(t){r[t]=e[t]}),d(s,function(t){e[t]&&(r[t]=e[t])});var p=o(r),u=f.call(r,this.code);return d(o(r),function(t){(t in e||-1===i(p,t))&&(e[t]=r[t])}),d(s,function(t){t in e||a(e,t,r[t])}),document.body.removeChild(t),u},f.prototype.runInThisContext=function(){return eval(this.code)},f.prototype.runInNewContext=function(e){var t=f.createContext(e),r=this.runInContext(t);return d(o(t),function(r){e[r]=t[r]}),r},d(o(f.prototype),function(e){r[e]=f[e]=function(t){var r=f(t);return r[e].apply(r,[].slice.call(arguments,1))}}),r.createScript=function(e){return r.Script(e)},r.createContext=f.createContext=function(e){var t=new n;return"object"==typeof e&&d(o(e),function(r){t[r]=e[r]}),t}},{indexof:189}],257:[function(e,t){t.exports={name:"bitcoincashjs",version:"0.1.5",description:"A simple, safe, and powerful JavaScript Bitcoin Cash library.",author:"Emilio Almansi <hi@ealmansi.com>",main:"lib/bitcoincash.js",scripts:{build:"npm install && npx gulp build","build:node":"npm install && npx gulp build:node","build:browser":"npm install && npx gulp build:browser","build:test":"npm install && npx gulp build:test",test:"npm install && npx gulp test","test:all":"npm install && npx gulp test:all","test:node":"npm install && npx gulp test:node","test:browser":"npm install && npx gulp test:browser",lint:"npm install && npx gulp lint",coveralls:"npm install && npx gulp coveralls",preversion:"npm install && npm test",version:"npm install && npx gulp version",postversion:"npm install && npx gulp postversion",bump:"npm version patch -m 'Bump version to %s.'"},keywords:["bitcoin","transaction","address","p2p","ecies","cryptocurrency","blockchain","payment","bip21","bip32","bip37","bip69","bip70","multisig"],repository:{type:"git",url:"https://github.com/bitcoincashjs/bitcoincashjs.git"},browser:{request:"browser-request"},dependencies:{"big-integer":"^1.6.26","bitcore-message":"^1.0.4","bn.js":"=2.0.4",bs58:"=2.0.0","buffer-compare":"=1.0.0",cashaddrjs:"^0.1.4",elliptic:"=3.0.3",inherits:"=2.0.1",lodash:"^4.17.4"},devDependencies:{"babel-core":"^6.26.0","babel-minify":"^0.2.0","babel-preset-env":"^1.6.1",babelify:"^8.0.0",brfs:"^1.4.3",browserify:"^14.5.0",chai:"^1.10.0",coveralls:"^3.0.0",gulp:"^3.8.10","gulp-shell":"^0.6.5",jsdoc:"^3.5.5",jshint:"^2.9.5",karma:"^2.0.0","karma-chrome-launcher":"^2.2.0","karma-detect-browsers":"^2.2.6","karma-firefox-launcher":"^1.1.0","karma-mocha":"^1.3.0",mocha:"^4.1.0",mustache:"^2.3.0",nyc:"^11.4.1","run-sequence":"^2.2.0",sinon:"^1.13.0","uglify-js":"^3.3.4"},license:"MIT"}},{}]},{},[2])(2)});
|