apify-client 2.17.1-beta.2 → 2.17.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -53424,7 +53424,7 @@ var asn1 = __webpack_require__("./node_modules/parse-asn1/asn1.js");
53424
53424
  var aesid = __webpack_require__("./node_modules/parse-asn1/aesid.json");
53425
53425
  var fixProc = __webpack_require__("./node_modules/parse-asn1/fixProc.js");
53426
53426
  var ciphers = __webpack_require__("./node_modules/browserify-aes/browser.js");
53427
- var compat = __webpack_require__("./node_modules/pbkdf2/browser.js");
53427
+ var pbkdf2Sync = (__webpack_require__("./node_modules/pbkdf2/browser.js")/* .pbkdf2Sync */.pbkdf2Sync);
53428
53428
  var Buffer = (__webpack_require__("./node_modules/safe-buffer/index.js")/* .Buffer */.Buffer);
53429
53429
 
53430
53430
  function decrypt(data, password) {
@@ -53434,7 +53434,7 @@ function decrypt(data, password) {
53434
53434
  var iv = data.algorithm.decrypt.cipher.iv;
53435
53435
  var cipherText = data.subjectPrivateKey;
53436
53436
  var keylen = parseInt(algo.split('-')[1], 10) / 8;
53437
- var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1');
53437
+ var key = pbkdf2Sync(password, salt, iters, keylen, 'sha1');
53438
53438
  var cipher = ciphers.createDecipheriv(algo, key, iv);
53439
53439
  var out = [];
53440
53440
  out.push(cipher.update(cipherText));
@@ -53718,8 +53718,8 @@ module.exports = function (iterations, keylen) {
53718
53718
  "use strict";
53719
53719
 
53720
53720
 
53721
- var md5 = __webpack_require__("./node_modules/pbkdf2/node_modules/create-hash/md5.js");
53722
- var RIPEMD160 = __webpack_require__("./node_modules/pbkdf2/node_modules/ripemd160/index.js");
53721
+ var md5 = __webpack_require__("./node_modules/create-hash/md5.js");
53722
+ var RIPEMD160 = __webpack_require__("./node_modules/ripemd160/index.js");
53723
53723
  var sha = __webpack_require__("./node_modules/sha.js/index.js");
53724
53724
  var Buffer = (__webpack_require__("./node_modules/safe-buffer/index.js")/* .Buffer */.Buffer);
53725
53725
 
@@ -53874,584 +53874,6 @@ module.exports = function (thing, encoding, name) {
53874
53874
  };
53875
53875
 
53876
53876
 
53877
- }),
53878
- "./node_modules/pbkdf2/node_modules/create-hash/make-hash.js": (function (module, __unused_webpack_exports, __webpack_require__) {
53879
- "use strict";
53880
- /* provided dependency */ var Buffer = __webpack_require__("./node_modules/buffer/index.js")["Buffer"];
53881
-
53882
- var intSize = 4
53883
- var zeroBuffer = new Buffer(intSize)
53884
- zeroBuffer.fill(0)
53885
-
53886
- var charSize = 8
53887
- var hashSize = 16
53888
-
53889
- function toArray (buf) {
53890
- if ((buf.length % intSize) !== 0) {
53891
- var len = buf.length + (intSize - (buf.length % intSize))
53892
- buf = Buffer.concat([buf, zeroBuffer], len)
53893
- }
53894
-
53895
- var arr = new Array(buf.length >>> 2)
53896
- for (var i = 0, j = 0; i < buf.length; i += intSize, j++) {
53897
- arr[j] = buf.readInt32LE(i)
53898
- }
53899
-
53900
- return arr
53901
- }
53902
-
53903
- module.exports = function hash (buf, fn) {
53904
- var arr = fn(toArray(buf), buf.length * charSize)
53905
- buf = new Buffer(hashSize)
53906
- for (var i = 0; i < arr.length; i++) {
53907
- buf.writeInt32LE(arr[i], i << 2, true)
53908
- }
53909
- return buf
53910
- }
53911
-
53912
-
53913
- }),
53914
- "./node_modules/pbkdf2/node_modules/create-hash/md5.js": (function (module, __unused_webpack_exports, __webpack_require__) {
53915
- "use strict";
53916
-
53917
- /*
53918
- * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
53919
- * Digest Algorithm, as defined in RFC 1321.
53920
- * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
53921
- * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
53922
- * Distributed under the BSD License
53923
- * See http://pajhome.org.uk/crypt/md5 for more info.
53924
- */
53925
-
53926
- var makeHash = __webpack_require__("./node_modules/pbkdf2/node_modules/create-hash/make-hash.js")
53927
-
53928
- /*
53929
- * Calculate the MD5 of an array of little-endian words, and a bit length
53930
- */
53931
- function core_md5 (x, len) {
53932
- /* append padding */
53933
- x[len >> 5] |= 0x80 << ((len) % 32)
53934
- x[(((len + 64) >>> 9) << 4) + 14] = len
53935
-
53936
- var a = 1732584193
53937
- var b = -271733879
53938
- var c = -1732584194
53939
- var d = 271733878
53940
-
53941
- for (var i = 0; i < x.length; i += 16) {
53942
- var olda = a
53943
- var oldb = b
53944
- var oldc = c
53945
- var oldd = d
53946
-
53947
- a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)
53948
- d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)
53949
- c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)
53950
- b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)
53951
- a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)
53952
- d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)
53953
- c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)
53954
- b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)
53955
- a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)
53956
- d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)
53957
- c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)
53958
- b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)
53959
- a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)
53960
- d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)
53961
- c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)
53962
- b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)
53963
-
53964
- a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)
53965
- d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)
53966
- c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)
53967
- b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)
53968
- a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)
53969
- d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)
53970
- c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)
53971
- b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)
53972
- a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)
53973
- d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)
53974
- c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)
53975
- b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)
53976
- a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)
53977
- d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)
53978
- c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)
53979
- b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)
53980
-
53981
- a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)
53982
- d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)
53983
- c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)
53984
- b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)
53985
- a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)
53986
- d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)
53987
- c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)
53988
- b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)
53989
- a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)
53990
- d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)
53991
- c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)
53992
- b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)
53993
- a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)
53994
- d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)
53995
- c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)
53996
- b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)
53997
-
53998
- a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)
53999
- d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)
54000
- c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)
54001
- b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)
54002
- a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)
54003
- d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)
54004
- c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)
54005
- b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)
54006
- a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)
54007
- d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)
54008
- c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)
54009
- b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)
54010
- a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)
54011
- d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)
54012
- c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)
54013
- b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)
54014
-
54015
- a = safe_add(a, olda)
54016
- b = safe_add(b, oldb)
54017
- c = safe_add(c, oldc)
54018
- d = safe_add(d, oldd)
54019
- }
54020
-
54021
- return [a, b, c, d]
54022
- }
54023
-
54024
- /*
54025
- * These functions implement the four basic operations the algorithm uses.
54026
- */
54027
- function md5_cmn (q, a, b, x, s, t) {
54028
- return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)
54029
- }
54030
-
54031
- function md5_ff (a, b, c, d, x, s, t) {
54032
- return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t)
54033
- }
54034
-
54035
- function md5_gg (a, b, c, d, x, s, t) {
54036
- return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t)
54037
- }
54038
-
54039
- function md5_hh (a, b, c, d, x, s, t) {
54040
- return md5_cmn(b ^ c ^ d, a, b, x, s, t)
54041
- }
54042
-
54043
- function md5_ii (a, b, c, d, x, s, t) {
54044
- return md5_cmn(c ^ (b | (~d)), a, b, x, s, t)
54045
- }
54046
-
54047
- /*
54048
- * Add integers, wrapping at 2^32. This uses 16-bit operations internally
54049
- * to work around bugs in some JS interpreters.
54050
- */
54051
- function safe_add (x, y) {
54052
- var lsw = (x & 0xFFFF) + (y & 0xFFFF)
54053
- var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
54054
- return (msw << 16) | (lsw & 0xFFFF)
54055
- }
54056
-
54057
- /*
54058
- * Bitwise rotate a 32-bit number to the left.
54059
- */
54060
- function bit_rol (num, cnt) {
54061
- return (num << cnt) | (num >>> (32 - cnt))
54062
- }
54063
-
54064
- module.exports = function md5 (buf) {
54065
- return makeHash(buf, core_md5)
54066
- }
54067
-
54068
-
54069
- }),
54070
- "./node_modules/pbkdf2/node_modules/hash-base/index.js": (function (module, __unused_webpack_exports, __webpack_require__) {
54071
- "use strict";
54072
- /* provided dependency */ var Buffer = __webpack_require__("./node_modules/buffer/index.js")["Buffer"];
54073
-
54074
- var Transform = (__webpack_require__("./node_modules/stream-browserify/index.js")/* .Transform */.Transform)
54075
- var inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js")
54076
-
54077
- function HashBase (blockSize) {
54078
- Transform.call(this)
54079
-
54080
- this._block = new Buffer(blockSize)
54081
- this._blockSize = blockSize
54082
- this._blockOffset = 0
54083
- this._length = [0, 0, 0, 0]
54084
-
54085
- this._finalized = false
54086
- }
54087
-
54088
- inherits(HashBase, Transform)
54089
-
54090
- HashBase.prototype._transform = function (chunk, encoding, callback) {
54091
- var error = null
54092
- try {
54093
- if (encoding !== 'buffer') chunk = new Buffer(chunk, encoding)
54094
- this.update(chunk)
54095
- } catch (err) {
54096
- error = err
54097
- }
54098
-
54099
- callback(error)
54100
- }
54101
-
54102
- HashBase.prototype._flush = function (callback) {
54103
- var error = null
54104
- try {
54105
- this.push(this._digest())
54106
- } catch (err) {
54107
- error = err
54108
- }
54109
-
54110
- callback(error)
54111
- }
54112
-
54113
- HashBase.prototype.update = function (data, encoding) {
54114
- if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
54115
- if (this._finalized) throw new Error('Digest already called')
54116
- if (!Buffer.isBuffer(data)) data = new Buffer(data, encoding || 'binary')
54117
-
54118
- // consume data
54119
- var block = this._block
54120
- var offset = 0
54121
- while (this._blockOffset + data.length - offset >= this._blockSize) {
54122
- for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
54123
- this._update()
54124
- this._blockOffset = 0
54125
- }
54126
- while (offset < data.length) block[this._blockOffset++] = data[offset++]
54127
-
54128
- // update length
54129
- for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
54130
- this._length[j] += carry
54131
- carry = (this._length[j] / 0x0100000000) | 0
54132
- if (carry > 0) this._length[j] -= 0x0100000000 * carry
54133
- }
54134
-
54135
- return this
54136
- }
54137
-
54138
- HashBase.prototype._update = function (data) {
54139
- throw new Error('_update is not implemented')
54140
- }
54141
-
54142
- HashBase.prototype.digest = function (encoding) {
54143
- if (this._finalized) throw new Error('Digest already called')
54144
- this._finalized = true
54145
-
54146
- var digest = this._digest()
54147
- if (encoding !== undefined) digest = digest.toString(encoding)
54148
- return digest
54149
- }
54150
-
54151
- HashBase.prototype._digest = function () {
54152
- throw new Error('_digest is not implemented')
54153
- }
54154
-
54155
- module.exports = HashBase
54156
-
54157
-
54158
- }),
54159
- "./node_modules/pbkdf2/node_modules/ripemd160/index.js": (function (module, __unused_webpack_exports, __webpack_require__) {
54160
- "use strict";
54161
- /* provided dependency */ var Buffer = __webpack_require__("./node_modules/buffer/index.js")["Buffer"];
54162
-
54163
- var inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js")
54164
- var HashBase = __webpack_require__("./node_modules/pbkdf2/node_modules/hash-base/index.js")
54165
-
54166
- function RIPEMD160 () {
54167
- HashBase.call(this, 64)
54168
-
54169
- // state
54170
- this._a = 0x67452301
54171
- this._b = 0xefcdab89
54172
- this._c = 0x98badcfe
54173
- this._d = 0x10325476
54174
- this._e = 0xc3d2e1f0
54175
- }
54176
-
54177
- inherits(RIPEMD160, HashBase)
54178
-
54179
- RIPEMD160.prototype._update = function () {
54180
- var m = new Array(16)
54181
- for (var i = 0; i < 16; ++i) m[i] = this._block.readInt32LE(i * 4)
54182
-
54183
- var al = this._a
54184
- var bl = this._b
54185
- var cl = this._c
54186
- var dl = this._d
54187
- var el = this._e
54188
-
54189
- // Mj = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
54190
- // K = 0x00000000
54191
- // Sj = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8
54192
- al = fn1(al, bl, cl, dl, el, m[0], 0x00000000, 11); cl = rotl(cl, 10)
54193
- el = fn1(el, al, bl, cl, dl, m[1], 0x00000000, 14); bl = rotl(bl, 10)
54194
- dl = fn1(dl, el, al, bl, cl, m[2], 0x00000000, 15); al = rotl(al, 10)
54195
- cl = fn1(cl, dl, el, al, bl, m[3], 0x00000000, 12); el = rotl(el, 10)
54196
- bl = fn1(bl, cl, dl, el, al, m[4], 0x00000000, 5); dl = rotl(dl, 10)
54197
- al = fn1(al, bl, cl, dl, el, m[5], 0x00000000, 8); cl = rotl(cl, 10)
54198
- el = fn1(el, al, bl, cl, dl, m[6], 0x00000000, 7); bl = rotl(bl, 10)
54199
- dl = fn1(dl, el, al, bl, cl, m[7], 0x00000000, 9); al = rotl(al, 10)
54200
- cl = fn1(cl, dl, el, al, bl, m[8], 0x00000000, 11); el = rotl(el, 10)
54201
- bl = fn1(bl, cl, dl, el, al, m[9], 0x00000000, 13); dl = rotl(dl, 10)
54202
- al = fn1(al, bl, cl, dl, el, m[10], 0x00000000, 14); cl = rotl(cl, 10)
54203
- el = fn1(el, al, bl, cl, dl, m[11], 0x00000000, 15); bl = rotl(bl, 10)
54204
- dl = fn1(dl, el, al, bl, cl, m[12], 0x00000000, 6); al = rotl(al, 10)
54205
- cl = fn1(cl, dl, el, al, bl, m[13], 0x00000000, 7); el = rotl(el, 10)
54206
- bl = fn1(bl, cl, dl, el, al, m[14], 0x00000000, 9); dl = rotl(dl, 10)
54207
- al = fn1(al, bl, cl, dl, el, m[15], 0x00000000, 8); cl = rotl(cl, 10)
54208
-
54209
- // Mj = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8
54210
- // K = 0x5a827999
54211
- // Sj = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12
54212
- el = fn2(el, al, bl, cl, dl, m[7], 0x5a827999, 7); bl = rotl(bl, 10)
54213
- dl = fn2(dl, el, al, bl, cl, m[4], 0x5a827999, 6); al = rotl(al, 10)
54214
- cl = fn2(cl, dl, el, al, bl, m[13], 0x5a827999, 8); el = rotl(el, 10)
54215
- bl = fn2(bl, cl, dl, el, al, m[1], 0x5a827999, 13); dl = rotl(dl, 10)
54216
- al = fn2(al, bl, cl, dl, el, m[10], 0x5a827999, 11); cl = rotl(cl, 10)
54217
- el = fn2(el, al, bl, cl, dl, m[6], 0x5a827999, 9); bl = rotl(bl, 10)
54218
- dl = fn2(dl, el, al, bl, cl, m[15], 0x5a827999, 7); al = rotl(al, 10)
54219
- cl = fn2(cl, dl, el, al, bl, m[3], 0x5a827999, 15); el = rotl(el, 10)
54220
- bl = fn2(bl, cl, dl, el, al, m[12], 0x5a827999, 7); dl = rotl(dl, 10)
54221
- al = fn2(al, bl, cl, dl, el, m[0], 0x5a827999, 12); cl = rotl(cl, 10)
54222
- el = fn2(el, al, bl, cl, dl, m[9], 0x5a827999, 15); bl = rotl(bl, 10)
54223
- dl = fn2(dl, el, al, bl, cl, m[5], 0x5a827999, 9); al = rotl(al, 10)
54224
- cl = fn2(cl, dl, el, al, bl, m[2], 0x5a827999, 11); el = rotl(el, 10)
54225
- bl = fn2(bl, cl, dl, el, al, m[14], 0x5a827999, 7); dl = rotl(dl, 10)
54226
- al = fn2(al, bl, cl, dl, el, m[11], 0x5a827999, 13); cl = rotl(cl, 10)
54227
- el = fn2(el, al, bl, cl, dl, m[8], 0x5a827999, 12); bl = rotl(bl, 10)
54228
-
54229
- // Mj = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12
54230
- // K = 0x6ed9eba1
54231
- // Sj = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5
54232
- dl = fn3(dl, el, al, bl, cl, m[3], 0x6ed9eba1, 11); al = rotl(al, 10)
54233
- cl = fn3(cl, dl, el, al, bl, m[10], 0x6ed9eba1, 13); el = rotl(el, 10)
54234
- bl = fn3(bl, cl, dl, el, al, m[14], 0x6ed9eba1, 6); dl = rotl(dl, 10)
54235
- al = fn3(al, bl, cl, dl, el, m[4], 0x6ed9eba1, 7); cl = rotl(cl, 10)
54236
- el = fn3(el, al, bl, cl, dl, m[9], 0x6ed9eba1, 14); bl = rotl(bl, 10)
54237
- dl = fn3(dl, el, al, bl, cl, m[15], 0x6ed9eba1, 9); al = rotl(al, 10)
54238
- cl = fn3(cl, dl, el, al, bl, m[8], 0x6ed9eba1, 13); el = rotl(el, 10)
54239
- bl = fn3(bl, cl, dl, el, al, m[1], 0x6ed9eba1, 15); dl = rotl(dl, 10)
54240
- al = fn3(al, bl, cl, dl, el, m[2], 0x6ed9eba1, 14); cl = rotl(cl, 10)
54241
- el = fn3(el, al, bl, cl, dl, m[7], 0x6ed9eba1, 8); bl = rotl(bl, 10)
54242
- dl = fn3(dl, el, al, bl, cl, m[0], 0x6ed9eba1, 13); al = rotl(al, 10)
54243
- cl = fn3(cl, dl, el, al, bl, m[6], 0x6ed9eba1, 6); el = rotl(el, 10)
54244
- bl = fn3(bl, cl, dl, el, al, m[13], 0x6ed9eba1, 5); dl = rotl(dl, 10)
54245
- al = fn3(al, bl, cl, dl, el, m[11], 0x6ed9eba1, 12); cl = rotl(cl, 10)
54246
- el = fn3(el, al, bl, cl, dl, m[5], 0x6ed9eba1, 7); bl = rotl(bl, 10)
54247
- dl = fn3(dl, el, al, bl, cl, m[12], 0x6ed9eba1, 5); al = rotl(al, 10)
54248
-
54249
- // Mj = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2
54250
- // K = 0x8f1bbcdc
54251
- // Sj = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12
54252
- cl = fn4(cl, dl, el, al, bl, m[1], 0x8f1bbcdc, 11); el = rotl(el, 10)
54253
- bl = fn4(bl, cl, dl, el, al, m[9], 0x8f1bbcdc, 12); dl = rotl(dl, 10)
54254
- al = fn4(al, bl, cl, dl, el, m[11], 0x8f1bbcdc, 14); cl = rotl(cl, 10)
54255
- el = fn4(el, al, bl, cl, dl, m[10], 0x8f1bbcdc, 15); bl = rotl(bl, 10)
54256
- dl = fn4(dl, el, al, bl, cl, m[0], 0x8f1bbcdc, 14); al = rotl(al, 10)
54257
- cl = fn4(cl, dl, el, al, bl, m[8], 0x8f1bbcdc, 15); el = rotl(el, 10)
54258
- bl = fn4(bl, cl, dl, el, al, m[12], 0x8f1bbcdc, 9); dl = rotl(dl, 10)
54259
- al = fn4(al, bl, cl, dl, el, m[4], 0x8f1bbcdc, 8); cl = rotl(cl, 10)
54260
- el = fn4(el, al, bl, cl, dl, m[13], 0x8f1bbcdc, 9); bl = rotl(bl, 10)
54261
- dl = fn4(dl, el, al, bl, cl, m[3], 0x8f1bbcdc, 14); al = rotl(al, 10)
54262
- cl = fn4(cl, dl, el, al, bl, m[7], 0x8f1bbcdc, 5); el = rotl(el, 10)
54263
- bl = fn4(bl, cl, dl, el, al, m[15], 0x8f1bbcdc, 6); dl = rotl(dl, 10)
54264
- al = fn4(al, bl, cl, dl, el, m[14], 0x8f1bbcdc, 8); cl = rotl(cl, 10)
54265
- el = fn4(el, al, bl, cl, dl, m[5], 0x8f1bbcdc, 6); bl = rotl(bl, 10)
54266
- dl = fn4(dl, el, al, bl, cl, m[6], 0x8f1bbcdc, 5); al = rotl(al, 10)
54267
- cl = fn4(cl, dl, el, al, bl, m[2], 0x8f1bbcdc, 12); el = rotl(el, 10)
54268
-
54269
- // Mj = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
54270
- // K = 0xa953fd4e
54271
- // Sj = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
54272
- bl = fn5(bl, cl, dl, el, al, m[4], 0xa953fd4e, 9); dl = rotl(dl, 10)
54273
- al = fn5(al, bl, cl, dl, el, m[0], 0xa953fd4e, 15); cl = rotl(cl, 10)
54274
- el = fn5(el, al, bl, cl, dl, m[5], 0xa953fd4e, 5); bl = rotl(bl, 10)
54275
- dl = fn5(dl, el, al, bl, cl, m[9], 0xa953fd4e, 11); al = rotl(al, 10)
54276
- cl = fn5(cl, dl, el, al, bl, m[7], 0xa953fd4e, 6); el = rotl(el, 10)
54277
- bl = fn5(bl, cl, dl, el, al, m[12], 0xa953fd4e, 8); dl = rotl(dl, 10)
54278
- al = fn5(al, bl, cl, dl, el, m[2], 0xa953fd4e, 13); cl = rotl(cl, 10)
54279
- el = fn5(el, al, bl, cl, dl, m[10], 0xa953fd4e, 12); bl = rotl(bl, 10)
54280
- dl = fn5(dl, el, al, bl, cl, m[14], 0xa953fd4e, 5); al = rotl(al, 10)
54281
- cl = fn5(cl, dl, el, al, bl, m[1], 0xa953fd4e, 12); el = rotl(el, 10)
54282
- bl = fn5(bl, cl, dl, el, al, m[3], 0xa953fd4e, 13); dl = rotl(dl, 10)
54283
- al = fn5(al, bl, cl, dl, el, m[8], 0xa953fd4e, 14); cl = rotl(cl, 10)
54284
- el = fn5(el, al, bl, cl, dl, m[11], 0xa953fd4e, 11); bl = rotl(bl, 10)
54285
- dl = fn5(dl, el, al, bl, cl, m[6], 0xa953fd4e, 8); al = rotl(al, 10)
54286
- cl = fn5(cl, dl, el, al, bl, m[15], 0xa953fd4e, 5); el = rotl(el, 10)
54287
- bl = fn5(bl, cl, dl, el, al, m[13], 0xa953fd4e, 6); dl = rotl(dl, 10)
54288
-
54289
- var ar = this._a
54290
- var br = this._b
54291
- var cr = this._c
54292
- var dr = this._d
54293
- var er = this._e
54294
-
54295
- // M'j = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12
54296
- // K' = 0x50a28be6
54297
- // S'j = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6
54298
- ar = fn5(ar, br, cr, dr, er, m[5], 0x50a28be6, 8); cr = rotl(cr, 10)
54299
- er = fn5(er, ar, br, cr, dr, m[14], 0x50a28be6, 9); br = rotl(br, 10)
54300
- dr = fn5(dr, er, ar, br, cr, m[7], 0x50a28be6, 9); ar = rotl(ar, 10)
54301
- cr = fn5(cr, dr, er, ar, br, m[0], 0x50a28be6, 11); er = rotl(er, 10)
54302
- br = fn5(br, cr, dr, er, ar, m[9], 0x50a28be6, 13); dr = rotl(dr, 10)
54303
- ar = fn5(ar, br, cr, dr, er, m[2], 0x50a28be6, 15); cr = rotl(cr, 10)
54304
- er = fn5(er, ar, br, cr, dr, m[11], 0x50a28be6, 15); br = rotl(br, 10)
54305
- dr = fn5(dr, er, ar, br, cr, m[4], 0x50a28be6, 5); ar = rotl(ar, 10)
54306
- cr = fn5(cr, dr, er, ar, br, m[13], 0x50a28be6, 7); er = rotl(er, 10)
54307
- br = fn5(br, cr, dr, er, ar, m[6], 0x50a28be6, 7); dr = rotl(dr, 10)
54308
- ar = fn5(ar, br, cr, dr, er, m[15], 0x50a28be6, 8); cr = rotl(cr, 10)
54309
- er = fn5(er, ar, br, cr, dr, m[8], 0x50a28be6, 11); br = rotl(br, 10)
54310
- dr = fn5(dr, er, ar, br, cr, m[1], 0x50a28be6, 14); ar = rotl(ar, 10)
54311
- cr = fn5(cr, dr, er, ar, br, m[10], 0x50a28be6, 14); er = rotl(er, 10)
54312
- br = fn5(br, cr, dr, er, ar, m[3], 0x50a28be6, 12); dr = rotl(dr, 10)
54313
- ar = fn5(ar, br, cr, dr, er, m[12], 0x50a28be6, 6); cr = rotl(cr, 10)
54314
-
54315
- // M'j = 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2
54316
- // K' = 0x5c4dd124
54317
- // S'j = 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11
54318
- er = fn4(er, ar, br, cr, dr, m[6], 0x5c4dd124, 9); br = rotl(br, 10)
54319
- dr = fn4(dr, er, ar, br, cr, m[11], 0x5c4dd124, 13); ar = rotl(ar, 10)
54320
- cr = fn4(cr, dr, er, ar, br, m[3], 0x5c4dd124, 15); er = rotl(er, 10)
54321
- br = fn4(br, cr, dr, er, ar, m[7], 0x5c4dd124, 7); dr = rotl(dr, 10)
54322
- ar = fn4(ar, br, cr, dr, er, m[0], 0x5c4dd124, 12); cr = rotl(cr, 10)
54323
- er = fn4(er, ar, br, cr, dr, m[13], 0x5c4dd124, 8); br = rotl(br, 10)
54324
- dr = fn4(dr, er, ar, br, cr, m[5], 0x5c4dd124, 9); ar = rotl(ar, 10)
54325
- cr = fn4(cr, dr, er, ar, br, m[10], 0x5c4dd124, 11); er = rotl(er, 10)
54326
- br = fn4(br, cr, dr, er, ar, m[14], 0x5c4dd124, 7); dr = rotl(dr, 10)
54327
- ar = fn4(ar, br, cr, dr, er, m[15], 0x5c4dd124, 7); cr = rotl(cr, 10)
54328
- er = fn4(er, ar, br, cr, dr, m[8], 0x5c4dd124, 12); br = rotl(br, 10)
54329
- dr = fn4(dr, er, ar, br, cr, m[12], 0x5c4dd124, 7); ar = rotl(ar, 10)
54330
- cr = fn4(cr, dr, er, ar, br, m[4], 0x5c4dd124, 6); er = rotl(er, 10)
54331
- br = fn4(br, cr, dr, er, ar, m[9], 0x5c4dd124, 15); dr = rotl(dr, 10)
54332
- ar = fn4(ar, br, cr, dr, er, m[1], 0x5c4dd124, 13); cr = rotl(cr, 10)
54333
- er = fn4(er, ar, br, cr, dr, m[2], 0x5c4dd124, 11); br = rotl(br, 10)
54334
-
54335
- // M'j = 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13
54336
- // K' = 0x6d703ef3
54337
- // S'j = 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5
54338
- dr = fn3(dr, er, ar, br, cr, m[15], 0x6d703ef3, 9); ar = rotl(ar, 10)
54339
- cr = fn3(cr, dr, er, ar, br, m[5], 0x6d703ef3, 7); er = rotl(er, 10)
54340
- br = fn3(br, cr, dr, er, ar, m[1], 0x6d703ef3, 15); dr = rotl(dr, 10)
54341
- ar = fn3(ar, br, cr, dr, er, m[3], 0x6d703ef3, 11); cr = rotl(cr, 10)
54342
- er = fn3(er, ar, br, cr, dr, m[7], 0x6d703ef3, 8); br = rotl(br, 10)
54343
- dr = fn3(dr, er, ar, br, cr, m[14], 0x6d703ef3, 6); ar = rotl(ar, 10)
54344
- cr = fn3(cr, dr, er, ar, br, m[6], 0x6d703ef3, 6); er = rotl(er, 10)
54345
- br = fn3(br, cr, dr, er, ar, m[9], 0x6d703ef3, 14); dr = rotl(dr, 10)
54346
- ar = fn3(ar, br, cr, dr, er, m[11], 0x6d703ef3, 12); cr = rotl(cr, 10)
54347
- er = fn3(er, ar, br, cr, dr, m[8], 0x6d703ef3, 13); br = rotl(br, 10)
54348
- dr = fn3(dr, er, ar, br, cr, m[12], 0x6d703ef3, 5); ar = rotl(ar, 10)
54349
- cr = fn3(cr, dr, er, ar, br, m[2], 0x6d703ef3, 14); er = rotl(er, 10)
54350
- br = fn3(br, cr, dr, er, ar, m[10], 0x6d703ef3, 13); dr = rotl(dr, 10)
54351
- ar = fn3(ar, br, cr, dr, er, m[0], 0x6d703ef3, 13); cr = rotl(cr, 10)
54352
- er = fn3(er, ar, br, cr, dr, m[4], 0x6d703ef3, 7); br = rotl(br, 10)
54353
- dr = fn3(dr, er, ar, br, cr, m[13], 0x6d703ef3, 5); ar = rotl(ar, 10)
54354
-
54355
- // M'j = 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14
54356
- // K' = 0x7a6d76e9
54357
- // S'j = 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8
54358
- cr = fn2(cr, dr, er, ar, br, m[8], 0x7a6d76e9, 15); er = rotl(er, 10)
54359
- br = fn2(br, cr, dr, er, ar, m[6], 0x7a6d76e9, 5); dr = rotl(dr, 10)
54360
- ar = fn2(ar, br, cr, dr, er, m[4], 0x7a6d76e9, 8); cr = rotl(cr, 10)
54361
- er = fn2(er, ar, br, cr, dr, m[1], 0x7a6d76e9, 11); br = rotl(br, 10)
54362
- dr = fn2(dr, er, ar, br, cr, m[3], 0x7a6d76e9, 14); ar = rotl(ar, 10)
54363
- cr = fn2(cr, dr, er, ar, br, m[11], 0x7a6d76e9, 14); er = rotl(er, 10)
54364
- br = fn2(br, cr, dr, er, ar, m[15], 0x7a6d76e9, 6); dr = rotl(dr, 10)
54365
- ar = fn2(ar, br, cr, dr, er, m[0], 0x7a6d76e9, 14); cr = rotl(cr, 10)
54366
- er = fn2(er, ar, br, cr, dr, m[5], 0x7a6d76e9, 6); br = rotl(br, 10)
54367
- dr = fn2(dr, er, ar, br, cr, m[12], 0x7a6d76e9, 9); ar = rotl(ar, 10)
54368
- cr = fn2(cr, dr, er, ar, br, m[2], 0x7a6d76e9, 12); er = rotl(er, 10)
54369
- br = fn2(br, cr, dr, er, ar, m[13], 0x7a6d76e9, 9); dr = rotl(dr, 10)
54370
- ar = fn2(ar, br, cr, dr, er, m[9], 0x7a6d76e9, 12); cr = rotl(cr, 10)
54371
- er = fn2(er, ar, br, cr, dr, m[7], 0x7a6d76e9, 5); br = rotl(br, 10)
54372
- dr = fn2(dr, er, ar, br, cr, m[10], 0x7a6d76e9, 15); ar = rotl(ar, 10)
54373
- cr = fn2(cr, dr, er, ar, br, m[14], 0x7a6d76e9, 8); er = rotl(er, 10)
54374
-
54375
- // M'j = 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
54376
- // K' = 0x00000000
54377
- // S'j = 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
54378
- br = fn1(br, cr, dr, er, ar, m[12], 0x00000000, 8); dr = rotl(dr, 10)
54379
- ar = fn1(ar, br, cr, dr, er, m[15], 0x00000000, 5); cr = rotl(cr, 10)
54380
- er = fn1(er, ar, br, cr, dr, m[10], 0x00000000, 12); br = rotl(br, 10)
54381
- dr = fn1(dr, er, ar, br, cr, m[4], 0x00000000, 9); ar = rotl(ar, 10)
54382
- cr = fn1(cr, dr, er, ar, br, m[1], 0x00000000, 12); er = rotl(er, 10)
54383
- br = fn1(br, cr, dr, er, ar, m[5], 0x00000000, 5); dr = rotl(dr, 10)
54384
- ar = fn1(ar, br, cr, dr, er, m[8], 0x00000000, 14); cr = rotl(cr, 10)
54385
- er = fn1(er, ar, br, cr, dr, m[7], 0x00000000, 6); br = rotl(br, 10)
54386
- dr = fn1(dr, er, ar, br, cr, m[6], 0x00000000, 8); ar = rotl(ar, 10)
54387
- cr = fn1(cr, dr, er, ar, br, m[2], 0x00000000, 13); er = rotl(er, 10)
54388
- br = fn1(br, cr, dr, er, ar, m[13], 0x00000000, 6); dr = rotl(dr, 10)
54389
- ar = fn1(ar, br, cr, dr, er, m[14], 0x00000000, 5); cr = rotl(cr, 10)
54390
- er = fn1(er, ar, br, cr, dr, m[0], 0x00000000, 15); br = rotl(br, 10)
54391
- dr = fn1(dr, er, ar, br, cr, m[3], 0x00000000, 13); ar = rotl(ar, 10)
54392
- cr = fn1(cr, dr, er, ar, br, m[9], 0x00000000, 11); er = rotl(er, 10)
54393
- br = fn1(br, cr, dr, er, ar, m[11], 0x00000000, 11); dr = rotl(dr, 10)
54394
-
54395
- // change state
54396
- var t = (this._b + cl + dr) | 0
54397
- this._b = (this._c + dl + er) | 0
54398
- this._c = (this._d + el + ar) | 0
54399
- this._d = (this._e + al + br) | 0
54400
- this._e = (this._a + bl + cr) | 0
54401
- this._a = t
54402
- }
54403
-
54404
- RIPEMD160.prototype._digest = function () {
54405
- // create padding and handle blocks
54406
- this._block[this._blockOffset++] = 0x80
54407
- if (this._blockOffset > 56) {
54408
- this._block.fill(0, this._blockOffset, 64)
54409
- this._update()
54410
- this._blockOffset = 0
54411
- }
54412
-
54413
- this._block.fill(0, this._blockOffset, 56)
54414
- this._block.writeUInt32LE(this._length[0], 56)
54415
- this._block.writeUInt32LE(this._length[1], 60)
54416
- this._update()
54417
-
54418
- // produce result
54419
- var buffer = new Buffer(20)
54420
- buffer.writeInt32LE(this._a, 0)
54421
- buffer.writeInt32LE(this._b, 4)
54422
- buffer.writeInt32LE(this._c, 8)
54423
- buffer.writeInt32LE(this._d, 12)
54424
- buffer.writeInt32LE(this._e, 16)
54425
- return buffer
54426
- }
54427
-
54428
- function rotl (x, n) {
54429
- return (x << n) | (x >>> (32 - n))
54430
- }
54431
-
54432
- function fn1 (a, b, c, d, e, m, k, s) {
54433
- return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0
54434
- }
54435
-
54436
- function fn2 (a, b, c, d, e, m, k, s) {
54437
- return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0
54438
- }
54439
-
54440
- function fn3 (a, b, c, d, e, m, k, s) {
54441
- return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0
54442
- }
54443
-
54444
- function fn4 (a, b, c, d, e, m, k, s) {
54445
- return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0
54446
- }
54447
-
54448
- function fn5 (a, b, c, d, e, m, k, s) {
54449
- return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0
54450
- }
54451
-
54452
- module.exports = RIPEMD160
54453
-
54454
-
54455
53877
  }),
54456
53878
  "./node_modules/possible-typed-array-names/index.js": (function (module) {
54457
53879
  "use strict";
@@ -58854,193 +58276,3081 @@ RetryOperation.prototype.mainError = function() {
58854
58276
  return null;
58855
58277
  }
58856
58278
 
58857
- var counts = {};
58858
- var mainError = null;
58859
- var mainErrorCount = 0;
58860
-
58861
- for (var i = 0; i < this._errors.length; i++) {
58862
- var error = this._errors[i];
58863
- var message = error.message;
58864
- var count = (counts[message] || 0) + 1;
58865
-
58866
- counts[message] = count;
58867
-
58868
- if (count >= mainErrorCount) {
58869
- mainError = error;
58870
- mainErrorCount = count;
58279
+ var counts = {};
58280
+ var mainError = null;
58281
+ var mainErrorCount = 0;
58282
+
58283
+ for (var i = 0; i < this._errors.length; i++) {
58284
+ var error = this._errors[i];
58285
+ var message = error.message;
58286
+ var count = (counts[message] || 0) + 1;
58287
+
58288
+ counts[message] = count;
58289
+
58290
+ if (count >= mainErrorCount) {
58291
+ mainError = error;
58292
+ mainErrorCount = count;
58293
+ }
58294
+ }
58295
+
58296
+ return mainError;
58297
+ };
58298
+
58299
+
58300
+ }),
58301
+ "./node_modules/ripemd160/index.js": (function (module, __unused_webpack_exports, __webpack_require__) {
58302
+ "use strict";
58303
+
58304
+
58305
+ var Buffer = (__webpack_require__("./node_modules/buffer/index.js")/* .Buffer */.Buffer);
58306
+ var inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
58307
+ var HashBase = __webpack_require__("./node_modules/ripemd160/node_modules/hash-base/index.js");
58308
+
58309
+ var ARRAY16 = new Array(16);
58310
+
58311
+ var zl = [
58312
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
58313
+ 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
58314
+ 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
58315
+ 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
58316
+ 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
58317
+ ];
58318
+
58319
+ var zr = [
58320
+ 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
58321
+ 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
58322
+ 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
58323
+ 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
58324
+ 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
58325
+ ];
58326
+
58327
+ var sl = [
58328
+ 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
58329
+ 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
58330
+ 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
58331
+ 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
58332
+ 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
58333
+ ];
58334
+
58335
+ var sr = [
58336
+ 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
58337
+ 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
58338
+ 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
58339
+ 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
58340
+ 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
58341
+ ];
58342
+
58343
+ var hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e];
58344
+ var hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000];
58345
+
58346
+ function rotl(x, n) {
58347
+ return (x << n) | (x >>> (32 - n));
58348
+ }
58349
+
58350
+ function fn1(a, b, c, d, e, m, k, s) {
58351
+ return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0;
58352
+ }
58353
+
58354
+ function fn2(a, b, c, d, e, m, k, s) {
58355
+ return (rotl((a + ((b & c) | (~b & d)) + m + k) | 0, s) + e) | 0;
58356
+ }
58357
+
58358
+ function fn3(a, b, c, d, e, m, k, s) {
58359
+ return (rotl((a + ((b | ~c) ^ d) + m + k) | 0, s) + e) | 0;
58360
+ }
58361
+
58362
+ function fn4(a, b, c, d, e, m, k, s) {
58363
+ return (rotl((a + ((b & d) | (c & ~d)) + m + k) | 0, s) + e) | 0;
58364
+ }
58365
+
58366
+ function fn5(a, b, c, d, e, m, k, s) {
58367
+ return (rotl((a + (b ^ (c | ~d)) + m + k) | 0, s) + e) | 0;
58368
+ }
58369
+
58370
+ function RIPEMD160() {
58371
+ HashBase.call(this, 64);
58372
+
58373
+ // state
58374
+ this._a = 0x67452301;
58375
+ this._b = 0xefcdab89;
58376
+ this._c = 0x98badcfe;
58377
+ this._d = 0x10325476;
58378
+ this._e = 0xc3d2e1f0;
58379
+ }
58380
+
58381
+ inherits(RIPEMD160, HashBase);
58382
+
58383
+ RIPEMD160.prototype._update = function () {
58384
+ var words = ARRAY16;
58385
+ for (var j = 0; j < 16; ++j) {
58386
+ words[j] = this._block.readInt32LE(j * 4);
58387
+ }
58388
+
58389
+ var al = this._a | 0;
58390
+ var bl = this._b | 0;
58391
+ var cl = this._c | 0;
58392
+ var dl = this._d | 0;
58393
+ var el = this._e | 0;
58394
+
58395
+ var ar = this._a | 0;
58396
+ var br = this._b | 0;
58397
+ var cr = this._c | 0;
58398
+ var dr = this._d | 0;
58399
+ var er = this._e | 0;
58400
+
58401
+ // computation
58402
+ for (var i = 0; i < 80; i += 1) {
58403
+ var tl;
58404
+ var tr;
58405
+ if (i < 16) {
58406
+ tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i]);
58407
+ tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i]);
58408
+ } else if (i < 32) {
58409
+ tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i]);
58410
+ tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i]);
58411
+ } else if (i < 48) {
58412
+ tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i]);
58413
+ tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i]);
58414
+ } else if (i < 64) {
58415
+ tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i]);
58416
+ tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i]);
58417
+ } else { // if (i<80) {
58418
+ tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i]);
58419
+ tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i]);
58420
+ }
58421
+
58422
+ al = el;
58423
+ el = dl;
58424
+ dl = rotl(cl, 10);
58425
+ cl = bl;
58426
+ bl = tl;
58427
+
58428
+ ar = er;
58429
+ er = dr;
58430
+ dr = rotl(cr, 10);
58431
+ cr = br;
58432
+ br = tr;
58433
+ }
58434
+
58435
+ // update state
58436
+ var t = (this._b + cl + dr) | 0;
58437
+ this._b = (this._c + dl + er) | 0;
58438
+ this._c = (this._d + el + ar) | 0;
58439
+ this._d = (this._e + al + br) | 0;
58440
+ this._e = (this._a + bl + cr) | 0;
58441
+ this._a = t;
58442
+ };
58443
+
58444
+ RIPEMD160.prototype._digest = function () {
58445
+ // create padding and handle blocks
58446
+ this._block[this._blockOffset] = 0x80;
58447
+ this._blockOffset += 1;
58448
+ if (this._blockOffset > 56) {
58449
+ this._block.fill(0, this._blockOffset, 64);
58450
+ this._update();
58451
+ this._blockOffset = 0;
58452
+ }
58453
+
58454
+ this._block.fill(0, this._blockOffset, 56);
58455
+ this._block.writeUInt32LE(this._length[0], 56);
58456
+ this._block.writeUInt32LE(this._length[1], 60);
58457
+ this._update();
58458
+
58459
+ // produce result
58460
+ var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20); // eslint-disable-line no-buffer-constructor
58461
+ buffer.writeInt32LE(this._a, 0);
58462
+ buffer.writeInt32LE(this._b, 4);
58463
+ buffer.writeInt32LE(this._c, 8);
58464
+ buffer.writeInt32LE(this._d, 12);
58465
+ buffer.writeInt32LE(this._e, 16);
58466
+ return buffer;
58467
+ };
58468
+
58469
+ module.exports = RIPEMD160;
58470
+
58471
+
58472
+ }),
58473
+ "./node_modules/ripemd160/node_modules/hash-base/index.js": (function (module, __unused_webpack_exports, __webpack_require__) {
58474
+ "use strict";
58475
+
58476
+
58477
+ var Buffer = (__webpack_require__("./node_modules/safe-buffer/index.js")/* .Buffer */.Buffer);
58478
+ var toBuffer = __webpack_require__("./node_modules/ripemd160/node_modules/hash-base/to-buffer.js");
58479
+ var Transform = (__webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/readable-browser.js")/* .Transform */.Transform);
58480
+ var inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
58481
+
58482
+ function HashBase(blockSize) {
58483
+ Transform.call(this);
58484
+
58485
+ this._block = Buffer.allocUnsafe(blockSize);
58486
+ this._blockSize = blockSize;
58487
+ this._blockOffset = 0;
58488
+ this._length = [0, 0, 0, 0];
58489
+
58490
+ this._finalized = false;
58491
+ }
58492
+
58493
+ inherits(HashBase, Transform);
58494
+
58495
+ HashBase.prototype._transform = function (chunk, encoding, callback) {
58496
+ var error = null;
58497
+ try {
58498
+ this.update(chunk, encoding);
58499
+ } catch (err) {
58500
+ error = err;
58501
+ }
58502
+
58503
+ callback(error);
58504
+ };
58505
+
58506
+ HashBase.prototype._flush = function (callback) {
58507
+ var error = null;
58508
+ try {
58509
+ this.push(this.digest());
58510
+ } catch (err) {
58511
+ error = err;
58512
+ }
58513
+
58514
+ callback(error);
58515
+ };
58516
+
58517
+ HashBase.prototype.update = function (data, encoding) {
58518
+ if (this._finalized) {
58519
+ throw new Error('Digest already called');
58520
+ }
58521
+
58522
+ var dataBuffer = toBuffer(data, encoding); // asserts correct input type
58523
+
58524
+ // consume data
58525
+ var block = this._block;
58526
+ var offset = 0;
58527
+ while (this._blockOffset + dataBuffer.length - offset >= this._blockSize) {
58528
+ for (var i = this._blockOffset; i < this._blockSize;) {
58529
+ block[i] = dataBuffer[offset];
58530
+ i += 1;
58531
+ offset += 1;
58532
+ }
58533
+ this._update();
58534
+ this._blockOffset = 0;
58535
+ }
58536
+ while (offset < dataBuffer.length) {
58537
+ block[this._blockOffset] = dataBuffer[offset];
58538
+ this._blockOffset += 1;
58539
+ offset += 1;
58540
+ }
58541
+
58542
+ // update length
58543
+ for (var j = 0, carry = dataBuffer.length * 8; carry > 0; ++j) {
58544
+ this._length[j] += carry;
58545
+ carry = (this._length[j] / 0x0100000000) | 0;
58546
+ if (carry > 0) {
58547
+ this._length[j] -= 0x0100000000 * carry;
58548
+ }
58549
+ }
58550
+
58551
+ return this;
58552
+ };
58553
+
58554
+ HashBase.prototype._update = function () {
58555
+ throw new Error('_update is not implemented');
58556
+ };
58557
+
58558
+ HashBase.prototype.digest = function (encoding) {
58559
+ if (this._finalized) {
58560
+ throw new Error('Digest already called');
58561
+ }
58562
+ this._finalized = true;
58563
+
58564
+ var digest = this._digest();
58565
+ if (encoding !== undefined) {
58566
+ digest = digest.toString(encoding);
58567
+ }
58568
+
58569
+ // reset state
58570
+ this._block.fill(0);
58571
+ this._blockOffset = 0;
58572
+ for (var i = 0; i < 4; ++i) {
58573
+ this._length[i] = 0;
58574
+ }
58575
+
58576
+ return digest;
58577
+ };
58578
+
58579
+ HashBase.prototype._digest = function () {
58580
+ throw new Error('_digest is not implemented');
58581
+ };
58582
+
58583
+ module.exports = HashBase;
58584
+
58585
+
58586
+ }),
58587
+ "./node_modules/ripemd160/node_modules/hash-base/to-buffer.js": (function (module, __unused_webpack_exports, __webpack_require__) {
58588
+ "use strict";
58589
+
58590
+
58591
+ var Buffer = (__webpack_require__("./node_modules/safe-buffer/index.js")/* .Buffer */.Buffer);
58592
+ var toBuffer = __webpack_require__("./node_modules/to-buffer/index.js");
58593
+
58594
+ var useUint8Array = typeof Uint8Array !== 'undefined';
58595
+ var useArrayBuffer = useUint8Array && typeof ArrayBuffer !== 'undefined';
58596
+ var isView = useArrayBuffer && ArrayBuffer.isView;
58597
+
58598
+ module.exports = function (thing, encoding) {
58599
+ if (
58600
+ typeof thing === 'string'
58601
+ || Buffer.isBuffer(thing)
58602
+ || (useUint8Array && thing instanceof Uint8Array)
58603
+ || (isView && isView(thing))
58604
+ ) {
58605
+ return toBuffer(thing, encoding);
58606
+ }
58607
+ throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView');
58608
+ };
58609
+
58610
+
58611
+ }),
58612
+ "./node_modules/ripemd160/node_modules/isarray/index.js": (function (module) {
58613
+ var toString = {}.toString;
58614
+
58615
+ module.exports = Array.isArray || function (arr) {
58616
+ return toString.call(arr) == '[object Array]';
58617
+ };
58618
+
58619
+
58620
+ }),
58621
+ "./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_duplex.js": (function (module, __unused_webpack_exports, __webpack_require__) {
58622
+ "use strict";
58623
+ // Copyright Joyent, Inc. and other Node contributors.
58624
+ //
58625
+ // Permission is hereby granted, free of charge, to any person obtaining a
58626
+ // copy of this software and associated documentation files (the
58627
+ // "Software"), to deal in the Software without restriction, including
58628
+ // without limitation the rights to use, copy, modify, merge, publish,
58629
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
58630
+ // persons to whom the Software is furnished to do so, subject to the
58631
+ // following conditions:
58632
+ //
58633
+ // The above copyright notice and this permission notice shall be included
58634
+ // in all copies or substantial portions of the Software.
58635
+ //
58636
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
58637
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
58638
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
58639
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
58640
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
58641
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
58642
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
58643
+
58644
+ // a duplex stream is just a stream that is both readable and writable.
58645
+ // Since JS doesn't have multiple prototypal inheritance, this class
58646
+ // prototypally inherits from Readable, and then parasitically from
58647
+ // Writable.
58648
+
58649
+
58650
+
58651
+ /*<replacement>*/
58652
+
58653
+ var pna = __webpack_require__("./node_modules/process-nextick-args/index.js");
58654
+ /*</replacement>*/
58655
+
58656
+ /*<replacement>*/
58657
+ var objectKeys = Object.keys || function (obj) {
58658
+ var keys = [];
58659
+ for (var key in obj) {
58660
+ keys.push(key);
58661
+ }return keys;
58662
+ };
58663
+ /*</replacement>*/
58664
+
58665
+ module.exports = Duplex;
58666
+
58667
+ /*<replacement>*/
58668
+ var util = Object.create(__webpack_require__("./node_modules/core-util-is/lib/util.js"));
58669
+ util.inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
58670
+ /*</replacement>*/
58671
+
58672
+ var Readable = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_readable.js");
58673
+ var Writable = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_writable.js");
58674
+
58675
+ util.inherits(Duplex, Readable);
58676
+
58677
+ {
58678
+ // avoid scope creep, the keys array can then be collected
58679
+ var keys = objectKeys(Writable.prototype);
58680
+ for (var v = 0; v < keys.length; v++) {
58681
+ var method = keys[v];
58682
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
58683
+ }
58684
+ }
58685
+
58686
+ function Duplex(options) {
58687
+ if (!(this instanceof Duplex)) return new Duplex(options);
58688
+
58689
+ Readable.call(this, options);
58690
+ Writable.call(this, options);
58691
+
58692
+ if (options && options.readable === false) this.readable = false;
58693
+
58694
+ if (options && options.writable === false) this.writable = false;
58695
+
58696
+ this.allowHalfOpen = true;
58697
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
58698
+
58699
+ this.once('end', onend);
58700
+ }
58701
+
58702
+ Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
58703
+ // making it explicit this property is not enumerable
58704
+ // because otherwise some prototype manipulation in
58705
+ // userland will fail
58706
+ enumerable: false,
58707
+ get: function () {
58708
+ return this._writableState.highWaterMark;
58709
+ }
58710
+ });
58711
+
58712
+ // the no-half-open enforcer
58713
+ function onend() {
58714
+ // if we allow half-open state, or if the writable side ended,
58715
+ // then we're ok.
58716
+ if (this.allowHalfOpen || this._writableState.ended) return;
58717
+
58718
+ // no more data can be written.
58719
+ // But allow more writes to happen in this tick.
58720
+ pna.nextTick(onEndNT, this);
58721
+ }
58722
+
58723
+ function onEndNT(self) {
58724
+ self.end();
58725
+ }
58726
+
58727
+ Object.defineProperty(Duplex.prototype, 'destroyed', {
58728
+ get: function () {
58729
+ if (this._readableState === undefined || this._writableState === undefined) {
58730
+ return false;
58731
+ }
58732
+ return this._readableState.destroyed && this._writableState.destroyed;
58733
+ },
58734
+ set: function (value) {
58735
+ // we ignore the value if the stream
58736
+ // has not been initialized yet
58737
+ if (this._readableState === undefined || this._writableState === undefined) {
58738
+ return;
58739
+ }
58740
+
58741
+ // backward compatibility, the user is explicitly
58742
+ // managing destroyed
58743
+ this._readableState.destroyed = value;
58744
+ this._writableState.destroyed = value;
58745
+ }
58746
+ });
58747
+
58748
+ Duplex.prototype._destroy = function (err, cb) {
58749
+ this.push(null);
58750
+ this.end();
58751
+
58752
+ pna.nextTick(cb, err);
58753
+ };
58754
+
58755
+ }),
58756
+ "./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_passthrough.js": (function (module, __unused_webpack_exports, __webpack_require__) {
58757
+ "use strict";
58758
+ // Copyright Joyent, Inc. and other Node contributors.
58759
+ //
58760
+ // Permission is hereby granted, free of charge, to any person obtaining a
58761
+ // copy of this software and associated documentation files (the
58762
+ // "Software"), to deal in the Software without restriction, including
58763
+ // without limitation the rights to use, copy, modify, merge, publish,
58764
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
58765
+ // persons to whom the Software is furnished to do so, subject to the
58766
+ // following conditions:
58767
+ //
58768
+ // The above copyright notice and this permission notice shall be included
58769
+ // in all copies or substantial portions of the Software.
58770
+ //
58771
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
58772
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
58773
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
58774
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
58775
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
58776
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
58777
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
58778
+
58779
+ // a passthrough stream.
58780
+ // basically just the most minimal sort of Transform stream.
58781
+ // Every written chunk gets output as-is.
58782
+
58783
+
58784
+
58785
+ module.exports = PassThrough;
58786
+
58787
+ var Transform = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_transform.js");
58788
+
58789
+ /*<replacement>*/
58790
+ var util = Object.create(__webpack_require__("./node_modules/core-util-is/lib/util.js"));
58791
+ util.inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
58792
+ /*</replacement>*/
58793
+
58794
+ util.inherits(PassThrough, Transform);
58795
+
58796
+ function PassThrough(options) {
58797
+ if (!(this instanceof PassThrough)) return new PassThrough(options);
58798
+
58799
+ Transform.call(this, options);
58800
+ }
58801
+
58802
+ PassThrough.prototype._transform = function (chunk, encoding, cb) {
58803
+ cb(null, chunk);
58804
+ };
58805
+
58806
+ }),
58807
+ "./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_readable.js": (function (module, __unused_webpack_exports, __webpack_require__) {
58808
+ "use strict";
58809
+ /* provided dependency */ var process = __webpack_require__("./node_modules/process/browser.js");
58810
+ // Copyright Joyent, Inc. and other Node contributors.
58811
+ //
58812
+ // Permission is hereby granted, free of charge, to any person obtaining a
58813
+ // copy of this software and associated documentation files (the
58814
+ // "Software"), to deal in the Software without restriction, including
58815
+ // without limitation the rights to use, copy, modify, merge, publish,
58816
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
58817
+ // persons to whom the Software is furnished to do so, subject to the
58818
+ // following conditions:
58819
+ //
58820
+ // The above copyright notice and this permission notice shall be included
58821
+ // in all copies or substantial portions of the Software.
58822
+ //
58823
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
58824
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
58825
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
58826
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
58827
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
58828
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
58829
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
58830
+
58831
+
58832
+
58833
+ /*<replacement>*/
58834
+
58835
+ var pna = __webpack_require__("./node_modules/process-nextick-args/index.js");
58836
+ /*</replacement>*/
58837
+
58838
+ module.exports = Readable;
58839
+
58840
+ /*<replacement>*/
58841
+ var isArray = __webpack_require__("./node_modules/ripemd160/node_modules/isarray/index.js");
58842
+ /*</replacement>*/
58843
+
58844
+ /*<replacement>*/
58845
+ var Duplex;
58846
+ /*</replacement>*/
58847
+
58848
+ Readable.ReadableState = ReadableState;
58849
+
58850
+ /*<replacement>*/
58851
+ var EE = (__webpack_require__("./node_modules/events/events.js")/* .EventEmitter */.EventEmitter);
58852
+
58853
+ var EElistenerCount = function (emitter, type) {
58854
+ return emitter.listeners(type).length;
58855
+ };
58856
+ /*</replacement>*/
58857
+
58858
+ /*<replacement>*/
58859
+ var Stream = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/internal/streams/stream-browser.js");
58860
+ /*</replacement>*/
58861
+
58862
+ /*<replacement>*/
58863
+
58864
+ var Buffer = (__webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/node_modules/safe-buffer/index.js")/* .Buffer */.Buffer);
58865
+ var OurUint8Array = (typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};
58866
+ function _uint8ArrayToBuffer(chunk) {
58867
+ return Buffer.from(chunk);
58868
+ }
58869
+ function _isUint8Array(obj) {
58870
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
58871
+ }
58872
+
58873
+ /*</replacement>*/
58874
+
58875
+ /*<replacement>*/
58876
+ var util = Object.create(__webpack_require__("./node_modules/core-util-is/lib/util.js"));
58877
+ util.inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
58878
+ /*</replacement>*/
58879
+
58880
+ /*<replacement>*/
58881
+ var debugUtil = __webpack_require__("?5084");
58882
+ var debug = void 0;
58883
+ if (debugUtil && debugUtil.debuglog) {
58884
+ debug = debugUtil.debuglog('stream');
58885
+ } else {
58886
+ debug = function () {};
58887
+ }
58888
+ /*</replacement>*/
58889
+
58890
+ var BufferList = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/internal/streams/BufferList.js");
58891
+ var destroyImpl = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/internal/streams/destroy.js");
58892
+ var StringDecoder;
58893
+
58894
+ util.inherits(Readable, Stream);
58895
+
58896
+ var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
58897
+
58898
+ function prependListener(emitter, event, fn) {
58899
+ // Sadly this is not cacheable as some libraries bundle their own
58900
+ // event emitter implementation with them.
58901
+ if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
58902
+
58903
+ // This is a hack to make sure that our error handler is attached before any
58904
+ // userland ones. NEVER DO THIS. This is here only because this code needs
58905
+ // to continue to work with older versions of Node.js that do not include
58906
+ // the prependListener() method. The goal is to eventually remove this hack.
58907
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
58908
+ }
58909
+
58910
+ function ReadableState(options, stream) {
58911
+ Duplex = Duplex || __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_duplex.js");
58912
+
58913
+ options = options || {};
58914
+
58915
+ // Duplex streams are both readable and writable, but share
58916
+ // the same options object.
58917
+ // However, some cases require setting options to different
58918
+ // values for the readable and the writable sides of the duplex stream.
58919
+ // These options can be provided separately as readableXXX and writableXXX.
58920
+ var isDuplex = stream instanceof Duplex;
58921
+
58922
+ // object stream flag. Used to make read(n) ignore n and to
58923
+ // make all the buffer merging and length checks go away
58924
+ this.objectMode = !!options.objectMode;
58925
+
58926
+ if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
58927
+
58928
+ // the point at which it stops calling _read() to fill the buffer
58929
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
58930
+ var hwm = options.highWaterMark;
58931
+ var readableHwm = options.readableHighWaterMark;
58932
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
58933
+
58934
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
58935
+
58936
+ // cast to ints.
58937
+ this.highWaterMark = Math.floor(this.highWaterMark);
58938
+
58939
+ // A linked list is used to store data chunks instead of an array because the
58940
+ // linked list can remove elements from the beginning faster than
58941
+ // array.shift()
58942
+ this.buffer = new BufferList();
58943
+ this.length = 0;
58944
+ this.pipes = null;
58945
+ this.pipesCount = 0;
58946
+ this.flowing = null;
58947
+ this.ended = false;
58948
+ this.endEmitted = false;
58949
+ this.reading = false;
58950
+
58951
+ // a flag to be able to tell if the event 'readable'/'data' is emitted
58952
+ // immediately, or on a later tick. We set this to true at first, because
58953
+ // any actions that shouldn't happen until "later" should generally also
58954
+ // not happen before the first read call.
58955
+ this.sync = true;
58956
+
58957
+ // whenever we return null, then we set a flag to say
58958
+ // that we're awaiting a 'readable' event emission.
58959
+ this.needReadable = false;
58960
+ this.emittedReadable = false;
58961
+ this.readableListening = false;
58962
+ this.resumeScheduled = false;
58963
+
58964
+ // has it been destroyed
58965
+ this.destroyed = false;
58966
+
58967
+ // Crypto is kind of old and crusty. Historically, its default string
58968
+ // encoding is 'binary' so we have to make this configurable.
58969
+ // Everything else in the universe uses 'utf8', though.
58970
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
58971
+
58972
+ // the number of writers that are awaiting a drain event in .pipe()s
58973
+ this.awaitDrain = 0;
58974
+
58975
+ // if true, a maybeReadMore has been scheduled
58976
+ this.readingMore = false;
58977
+
58978
+ this.decoder = null;
58979
+ this.encoding = null;
58980
+ if (options.encoding) {
58981
+ if (!StringDecoder) StringDecoder = (__webpack_require__("./node_modules/ripemd160/node_modules/string_decoder/lib/string_decoder.js")/* .StringDecoder */.StringDecoder);
58982
+ this.decoder = new StringDecoder(options.encoding);
58983
+ this.encoding = options.encoding;
58984
+ }
58985
+ }
58986
+
58987
+ function Readable(options) {
58988
+ Duplex = Duplex || __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_duplex.js");
58989
+
58990
+ if (!(this instanceof Readable)) return new Readable(options);
58991
+
58992
+ this._readableState = new ReadableState(options, this);
58993
+
58994
+ // legacy
58995
+ this.readable = true;
58996
+
58997
+ if (options) {
58998
+ if (typeof options.read === 'function') this._read = options.read;
58999
+
59000
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
59001
+ }
59002
+
59003
+ Stream.call(this);
59004
+ }
59005
+
59006
+ Object.defineProperty(Readable.prototype, 'destroyed', {
59007
+ get: function () {
59008
+ if (this._readableState === undefined) {
59009
+ return false;
59010
+ }
59011
+ return this._readableState.destroyed;
59012
+ },
59013
+ set: function (value) {
59014
+ // we ignore the value if the stream
59015
+ // has not been initialized yet
59016
+ if (!this._readableState) {
59017
+ return;
59018
+ }
59019
+
59020
+ // backward compatibility, the user is explicitly
59021
+ // managing destroyed
59022
+ this._readableState.destroyed = value;
59023
+ }
59024
+ });
59025
+
59026
+ Readable.prototype.destroy = destroyImpl.destroy;
59027
+ Readable.prototype._undestroy = destroyImpl.undestroy;
59028
+ Readable.prototype._destroy = function (err, cb) {
59029
+ this.push(null);
59030
+ cb(err);
59031
+ };
59032
+
59033
+ // Manually shove something into the read() buffer.
59034
+ // This returns true if the highWaterMark has not been hit yet,
59035
+ // similar to how Writable.write() returns true if you should
59036
+ // write() some more.
59037
+ Readable.prototype.push = function (chunk, encoding) {
59038
+ var state = this._readableState;
59039
+ var skipChunkCheck;
59040
+
59041
+ if (!state.objectMode) {
59042
+ if (typeof chunk === 'string') {
59043
+ encoding = encoding || state.defaultEncoding;
59044
+ if (encoding !== state.encoding) {
59045
+ chunk = Buffer.from(chunk, encoding);
59046
+ encoding = '';
59047
+ }
59048
+ skipChunkCheck = true;
59049
+ }
59050
+ } else {
59051
+ skipChunkCheck = true;
59052
+ }
59053
+
59054
+ return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
59055
+ };
59056
+
59057
+ // Unshift should *always* be something directly out of read()
59058
+ Readable.prototype.unshift = function (chunk) {
59059
+ return readableAddChunk(this, chunk, null, true, false);
59060
+ };
59061
+
59062
+ function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
59063
+ var state = stream._readableState;
59064
+ if (chunk === null) {
59065
+ state.reading = false;
59066
+ onEofChunk(stream, state);
59067
+ } else {
59068
+ var er;
59069
+ if (!skipChunkCheck) er = chunkInvalid(state, chunk);
59070
+ if (er) {
59071
+ stream.emit('error', er);
59072
+ } else if (state.objectMode || chunk && chunk.length > 0) {
59073
+ if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
59074
+ chunk = _uint8ArrayToBuffer(chunk);
59075
+ }
59076
+
59077
+ if (addToFront) {
59078
+ if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
59079
+ } else if (state.ended) {
59080
+ stream.emit('error', new Error('stream.push() after EOF'));
59081
+ } else {
59082
+ state.reading = false;
59083
+ if (state.decoder && !encoding) {
59084
+ chunk = state.decoder.write(chunk);
59085
+ if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
59086
+ } else {
59087
+ addChunk(stream, state, chunk, false);
59088
+ }
59089
+ }
59090
+ } else if (!addToFront) {
59091
+ state.reading = false;
59092
+ }
59093
+ }
59094
+
59095
+ return needMoreData(state);
59096
+ }
59097
+
59098
+ function addChunk(stream, state, chunk, addToFront) {
59099
+ if (state.flowing && state.length === 0 && !state.sync) {
59100
+ stream.emit('data', chunk);
59101
+ stream.read(0);
59102
+ } else {
59103
+ // update the buffer info.
59104
+ state.length += state.objectMode ? 1 : chunk.length;
59105
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
59106
+
59107
+ if (state.needReadable) emitReadable(stream);
59108
+ }
59109
+ maybeReadMore(stream, state);
59110
+ }
59111
+
59112
+ function chunkInvalid(state, chunk) {
59113
+ var er;
59114
+ if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
59115
+ er = new TypeError('Invalid non-string/buffer chunk');
59116
+ }
59117
+ return er;
59118
+ }
59119
+
59120
+ // if it's past the high water mark, we can push in some more.
59121
+ // Also, if we have no data yet, we can stand some
59122
+ // more bytes. This is to work around cases where hwm=0,
59123
+ // such as the repl. Also, if the push() triggered a
59124
+ // readable event, and the user called read(largeNumber) such that
59125
+ // needReadable was set, then we ought to push more, so that another
59126
+ // 'readable' event will be triggered.
59127
+ function needMoreData(state) {
59128
+ return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
59129
+ }
59130
+
59131
+ Readable.prototype.isPaused = function () {
59132
+ return this._readableState.flowing === false;
59133
+ };
59134
+
59135
+ // backwards compatibility.
59136
+ Readable.prototype.setEncoding = function (enc) {
59137
+ if (!StringDecoder) StringDecoder = (__webpack_require__("./node_modules/ripemd160/node_modules/string_decoder/lib/string_decoder.js")/* .StringDecoder */.StringDecoder);
59138
+ this._readableState.decoder = new StringDecoder(enc);
59139
+ this._readableState.encoding = enc;
59140
+ return this;
59141
+ };
59142
+
59143
+ // Don't raise the hwm > 8MB
59144
+ var MAX_HWM = 0x800000;
59145
+ function computeNewHighWaterMark(n) {
59146
+ if (n >= MAX_HWM) {
59147
+ n = MAX_HWM;
59148
+ } else {
59149
+ // Get the next highest power of 2 to prevent increasing hwm excessively in
59150
+ // tiny amounts
59151
+ n--;
59152
+ n |= n >>> 1;
59153
+ n |= n >>> 2;
59154
+ n |= n >>> 4;
59155
+ n |= n >>> 8;
59156
+ n |= n >>> 16;
59157
+ n++;
59158
+ }
59159
+ return n;
59160
+ }
59161
+
59162
+ // This function is designed to be inlinable, so please take care when making
59163
+ // changes to the function body.
59164
+ function howMuchToRead(n, state) {
59165
+ if (n <= 0 || state.length === 0 && state.ended) return 0;
59166
+ if (state.objectMode) return 1;
59167
+ if (n !== n) {
59168
+ // Only flow one buffer at a time
59169
+ if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
59170
+ }
59171
+ // If we're asking for more than the current hwm, then raise the hwm.
59172
+ if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
59173
+ if (n <= state.length) return n;
59174
+ // Don't have enough
59175
+ if (!state.ended) {
59176
+ state.needReadable = true;
59177
+ return 0;
59178
+ }
59179
+ return state.length;
59180
+ }
59181
+
59182
+ // you can override either this method, or the async _read(n) below.
59183
+ Readable.prototype.read = function (n) {
59184
+ debug('read', n);
59185
+ n = parseInt(n, 10);
59186
+ var state = this._readableState;
59187
+ var nOrig = n;
59188
+
59189
+ if (n !== 0) state.emittedReadable = false;
59190
+
59191
+ // if we're doing read(0) to trigger a readable event, but we
59192
+ // already have a bunch of data in the buffer, then just trigger
59193
+ // the 'readable' event and move on.
59194
+ if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
59195
+ debug('read: emitReadable', state.length, state.ended);
59196
+ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
59197
+ return null;
59198
+ }
59199
+
59200
+ n = howMuchToRead(n, state);
59201
+
59202
+ // if we've ended, and we're now clear, then finish it up.
59203
+ if (n === 0 && state.ended) {
59204
+ if (state.length === 0) endReadable(this);
59205
+ return null;
59206
+ }
59207
+
59208
+ // All the actual chunk generation logic needs to be
59209
+ // *below* the call to _read. The reason is that in certain
59210
+ // synthetic stream cases, such as passthrough streams, _read
59211
+ // may be a completely synchronous operation which may change
59212
+ // the state of the read buffer, providing enough data when
59213
+ // before there was *not* enough.
59214
+ //
59215
+ // So, the steps are:
59216
+ // 1. Figure out what the state of things will be after we do
59217
+ // a read from the buffer.
59218
+ //
59219
+ // 2. If that resulting state will trigger a _read, then call _read.
59220
+ // Note that this may be asynchronous, or synchronous. Yes, it is
59221
+ // deeply ugly to write APIs this way, but that still doesn't mean
59222
+ // that the Readable class should behave improperly, as streams are
59223
+ // designed to be sync/async agnostic.
59224
+ // Take note if the _read call is sync or async (ie, if the read call
59225
+ // has returned yet), so that we know whether or not it's safe to emit
59226
+ // 'readable' etc.
59227
+ //
59228
+ // 3. Actually pull the requested chunks out of the buffer and return.
59229
+
59230
+ // if we need a readable event, then we need to do some reading.
59231
+ var doRead = state.needReadable;
59232
+ debug('need readable', doRead);
59233
+
59234
+ // if we currently have less than the highWaterMark, then also read some
59235
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
59236
+ doRead = true;
59237
+ debug('length less than watermark', doRead);
59238
+ }
59239
+
59240
+ // however, if we've ended, then there's no point, and if we're already
59241
+ // reading, then it's unnecessary.
59242
+ if (state.ended || state.reading) {
59243
+ doRead = false;
59244
+ debug('reading or ended', doRead);
59245
+ } else if (doRead) {
59246
+ debug('do read');
59247
+ state.reading = true;
59248
+ state.sync = true;
59249
+ // if the length is currently zero, then we *need* a readable event.
59250
+ if (state.length === 0) state.needReadable = true;
59251
+ // call internal read method
59252
+ this._read(state.highWaterMark);
59253
+ state.sync = false;
59254
+ // If _read pushed data synchronously, then `reading` will be false,
59255
+ // and we need to re-evaluate how much data we can return to the user.
59256
+ if (!state.reading) n = howMuchToRead(nOrig, state);
59257
+ }
59258
+
59259
+ var ret;
59260
+ if (n > 0) ret = fromList(n, state);else ret = null;
59261
+
59262
+ if (ret === null) {
59263
+ state.needReadable = true;
59264
+ n = 0;
59265
+ } else {
59266
+ state.length -= n;
59267
+ }
59268
+
59269
+ if (state.length === 0) {
59270
+ // If we have nothing in the buffer, then we want to know
59271
+ // as soon as we *do* get something into the buffer.
59272
+ if (!state.ended) state.needReadable = true;
59273
+
59274
+ // If we tried to read() past the EOF, then emit end on the next tick.
59275
+ if (nOrig !== n && state.ended) endReadable(this);
59276
+ }
59277
+
59278
+ if (ret !== null) this.emit('data', ret);
59279
+
59280
+ return ret;
59281
+ };
59282
+
59283
+ function onEofChunk(stream, state) {
59284
+ if (state.ended) return;
59285
+ if (state.decoder) {
59286
+ var chunk = state.decoder.end();
59287
+ if (chunk && chunk.length) {
59288
+ state.buffer.push(chunk);
59289
+ state.length += state.objectMode ? 1 : chunk.length;
59290
+ }
59291
+ }
59292
+ state.ended = true;
59293
+
59294
+ // emit 'readable' now to make sure it gets picked up.
59295
+ emitReadable(stream);
59296
+ }
59297
+
59298
+ // Don't emit readable right away in sync mode, because this can trigger
59299
+ // another read() call => stack overflow. This way, it might trigger
59300
+ // a nextTick recursion warning, but that's not so bad.
59301
+ function emitReadable(stream) {
59302
+ var state = stream._readableState;
59303
+ state.needReadable = false;
59304
+ if (!state.emittedReadable) {
59305
+ debug('emitReadable', state.flowing);
59306
+ state.emittedReadable = true;
59307
+ if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
59308
+ }
59309
+ }
59310
+
59311
+ function emitReadable_(stream) {
59312
+ debug('emit readable');
59313
+ stream.emit('readable');
59314
+ flow(stream);
59315
+ }
59316
+
59317
+ // at this point, the user has presumably seen the 'readable' event,
59318
+ // and called read() to consume some data. that may have triggered
59319
+ // in turn another _read(n) call, in which case reading = true if
59320
+ // it's in progress.
59321
+ // However, if we're not ended, or reading, and the length < hwm,
59322
+ // then go ahead and try to read some more preemptively.
59323
+ function maybeReadMore(stream, state) {
59324
+ if (!state.readingMore) {
59325
+ state.readingMore = true;
59326
+ pna.nextTick(maybeReadMore_, stream, state);
59327
+ }
59328
+ }
59329
+
59330
+ function maybeReadMore_(stream, state) {
59331
+ var len = state.length;
59332
+ while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
59333
+ debug('maybeReadMore read 0');
59334
+ stream.read(0);
59335
+ if (len === state.length)
59336
+ // didn't get any data, stop spinning.
59337
+ break;else len = state.length;
59338
+ }
59339
+ state.readingMore = false;
59340
+ }
59341
+
59342
+ // abstract method. to be overridden in specific implementation classes.
59343
+ // call cb(er, data) where data is <= n in length.
59344
+ // for virtual (non-string, non-buffer) streams, "length" is somewhat
59345
+ // arbitrary, and perhaps not very meaningful.
59346
+ Readable.prototype._read = function (n) {
59347
+ this.emit('error', new Error('_read() is not implemented'));
59348
+ };
59349
+
59350
+ Readable.prototype.pipe = function (dest, pipeOpts) {
59351
+ var src = this;
59352
+ var state = this._readableState;
59353
+
59354
+ switch (state.pipesCount) {
59355
+ case 0:
59356
+ state.pipes = dest;
59357
+ break;
59358
+ case 1:
59359
+ state.pipes = [state.pipes, dest];
59360
+ break;
59361
+ default:
59362
+ state.pipes.push(dest);
59363
+ break;
59364
+ }
59365
+ state.pipesCount += 1;
59366
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
59367
+
59368
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
59369
+
59370
+ var endFn = doEnd ? onend : unpipe;
59371
+ if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
59372
+
59373
+ dest.on('unpipe', onunpipe);
59374
+ function onunpipe(readable, unpipeInfo) {
59375
+ debug('onunpipe');
59376
+ if (readable === src) {
59377
+ if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
59378
+ unpipeInfo.hasUnpiped = true;
59379
+ cleanup();
59380
+ }
59381
+ }
59382
+ }
59383
+
59384
+ function onend() {
59385
+ debug('onend');
59386
+ dest.end();
59387
+ }
59388
+
59389
+ // when the dest drains, it reduces the awaitDrain counter
59390
+ // on the source. This would be more elegant with a .once()
59391
+ // handler in flow(), but adding and removing repeatedly is
59392
+ // too slow.
59393
+ var ondrain = pipeOnDrain(src);
59394
+ dest.on('drain', ondrain);
59395
+
59396
+ var cleanedUp = false;
59397
+ function cleanup() {
59398
+ debug('cleanup');
59399
+ // cleanup event handlers once the pipe is broken
59400
+ dest.removeListener('close', onclose);
59401
+ dest.removeListener('finish', onfinish);
59402
+ dest.removeListener('drain', ondrain);
59403
+ dest.removeListener('error', onerror);
59404
+ dest.removeListener('unpipe', onunpipe);
59405
+ src.removeListener('end', onend);
59406
+ src.removeListener('end', unpipe);
59407
+ src.removeListener('data', ondata);
59408
+
59409
+ cleanedUp = true;
59410
+
59411
+ // if the reader is waiting for a drain event from this
59412
+ // specific writer, then it would cause it to never start
59413
+ // flowing again.
59414
+ // So, if this is awaiting a drain, then we just call it now.
59415
+ // If we don't know, then assume that we are waiting for one.
59416
+ if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
59417
+ }
59418
+
59419
+ // If the user pushes more data while we're writing to dest then we'll end up
59420
+ // in ondata again. However, we only want to increase awaitDrain once because
59421
+ // dest will only emit one 'drain' event for the multiple writes.
59422
+ // => Introduce a guard on increasing awaitDrain.
59423
+ var increasedAwaitDrain = false;
59424
+ src.on('data', ondata);
59425
+ function ondata(chunk) {
59426
+ debug('ondata');
59427
+ increasedAwaitDrain = false;
59428
+ var ret = dest.write(chunk);
59429
+ if (false === ret && !increasedAwaitDrain) {
59430
+ // If the user unpiped during `dest.write()`, it is possible
59431
+ // to get stuck in a permanently paused state if that write
59432
+ // also returned false.
59433
+ // => Check whether `dest` is still a piping destination.
59434
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
59435
+ debug('false write response, pause', state.awaitDrain);
59436
+ state.awaitDrain++;
59437
+ increasedAwaitDrain = true;
59438
+ }
59439
+ src.pause();
59440
+ }
59441
+ }
59442
+
59443
+ // if the dest has an error, then stop piping into it.
59444
+ // however, don't suppress the throwing behavior for this.
59445
+ function onerror(er) {
59446
+ debug('onerror', er);
59447
+ unpipe();
59448
+ dest.removeListener('error', onerror);
59449
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
59450
+ }
59451
+
59452
+ // Make sure our error handler is attached before userland ones.
59453
+ prependListener(dest, 'error', onerror);
59454
+
59455
+ // Both close and finish should trigger unpipe, but only once.
59456
+ function onclose() {
59457
+ dest.removeListener('finish', onfinish);
59458
+ unpipe();
59459
+ }
59460
+ dest.once('close', onclose);
59461
+ function onfinish() {
59462
+ debug('onfinish');
59463
+ dest.removeListener('close', onclose);
59464
+ unpipe();
59465
+ }
59466
+ dest.once('finish', onfinish);
59467
+
59468
+ function unpipe() {
59469
+ debug('unpipe');
59470
+ src.unpipe(dest);
59471
+ }
59472
+
59473
+ // tell the dest that it's being piped to
59474
+ dest.emit('pipe', src);
59475
+
59476
+ // start the flow if it hasn't been started already.
59477
+ if (!state.flowing) {
59478
+ debug('pipe resume');
59479
+ src.resume();
59480
+ }
59481
+
59482
+ return dest;
59483
+ };
59484
+
59485
+ function pipeOnDrain(src) {
59486
+ return function () {
59487
+ var state = src._readableState;
59488
+ debug('pipeOnDrain', state.awaitDrain);
59489
+ if (state.awaitDrain) state.awaitDrain--;
59490
+ if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
59491
+ state.flowing = true;
59492
+ flow(src);
59493
+ }
59494
+ };
59495
+ }
59496
+
59497
+ Readable.prototype.unpipe = function (dest) {
59498
+ var state = this._readableState;
59499
+ var unpipeInfo = { hasUnpiped: false };
59500
+
59501
+ // if we're not piping anywhere, then do nothing.
59502
+ if (state.pipesCount === 0) return this;
59503
+
59504
+ // just one destination. most common case.
59505
+ if (state.pipesCount === 1) {
59506
+ // passed in one, but it's not the right one.
59507
+ if (dest && dest !== state.pipes) return this;
59508
+
59509
+ if (!dest) dest = state.pipes;
59510
+
59511
+ // got a match.
59512
+ state.pipes = null;
59513
+ state.pipesCount = 0;
59514
+ state.flowing = false;
59515
+ if (dest) dest.emit('unpipe', this, unpipeInfo);
59516
+ return this;
59517
+ }
59518
+
59519
+ // slow case. multiple pipe destinations.
59520
+
59521
+ if (!dest) {
59522
+ // remove all.
59523
+ var dests = state.pipes;
59524
+ var len = state.pipesCount;
59525
+ state.pipes = null;
59526
+ state.pipesCount = 0;
59527
+ state.flowing = false;
59528
+
59529
+ for (var i = 0; i < len; i++) {
59530
+ dests[i].emit('unpipe', this, { hasUnpiped: false });
59531
+ }return this;
59532
+ }
59533
+
59534
+ // try to find the right one.
59535
+ var index = indexOf(state.pipes, dest);
59536
+ if (index === -1) return this;
59537
+
59538
+ state.pipes.splice(index, 1);
59539
+ state.pipesCount -= 1;
59540
+ if (state.pipesCount === 1) state.pipes = state.pipes[0];
59541
+
59542
+ dest.emit('unpipe', this, unpipeInfo);
59543
+
59544
+ return this;
59545
+ };
59546
+
59547
+ // set up data events if they are asked for
59548
+ // Ensure readable listeners eventually get something
59549
+ Readable.prototype.on = function (ev, fn) {
59550
+ var res = Stream.prototype.on.call(this, ev, fn);
59551
+
59552
+ if (ev === 'data') {
59553
+ // Start flowing on next tick if stream isn't explicitly paused
59554
+ if (this._readableState.flowing !== false) this.resume();
59555
+ } else if (ev === 'readable') {
59556
+ var state = this._readableState;
59557
+ if (!state.endEmitted && !state.readableListening) {
59558
+ state.readableListening = state.needReadable = true;
59559
+ state.emittedReadable = false;
59560
+ if (!state.reading) {
59561
+ pna.nextTick(nReadingNextTick, this);
59562
+ } else if (state.length) {
59563
+ emitReadable(this);
59564
+ }
59565
+ }
59566
+ }
59567
+
59568
+ return res;
59569
+ };
59570
+ Readable.prototype.addListener = Readable.prototype.on;
59571
+
59572
+ function nReadingNextTick(self) {
59573
+ debug('readable nexttick read 0');
59574
+ self.read(0);
59575
+ }
59576
+
59577
+ // pause() and resume() are remnants of the legacy readable stream API
59578
+ // If the user uses them, then switch into old mode.
59579
+ Readable.prototype.resume = function () {
59580
+ var state = this._readableState;
59581
+ if (!state.flowing) {
59582
+ debug('resume');
59583
+ state.flowing = true;
59584
+ resume(this, state);
59585
+ }
59586
+ return this;
59587
+ };
59588
+
59589
+ function resume(stream, state) {
59590
+ if (!state.resumeScheduled) {
59591
+ state.resumeScheduled = true;
59592
+ pna.nextTick(resume_, stream, state);
59593
+ }
59594
+ }
59595
+
59596
+ function resume_(stream, state) {
59597
+ if (!state.reading) {
59598
+ debug('resume read 0');
59599
+ stream.read(0);
59600
+ }
59601
+
59602
+ state.resumeScheduled = false;
59603
+ state.awaitDrain = 0;
59604
+ stream.emit('resume');
59605
+ flow(stream);
59606
+ if (state.flowing && !state.reading) stream.read(0);
59607
+ }
59608
+
59609
+ Readable.prototype.pause = function () {
59610
+ debug('call pause flowing=%j', this._readableState.flowing);
59611
+ if (false !== this._readableState.flowing) {
59612
+ debug('pause');
59613
+ this._readableState.flowing = false;
59614
+ this.emit('pause');
59615
+ }
59616
+ return this;
59617
+ };
59618
+
59619
+ function flow(stream) {
59620
+ var state = stream._readableState;
59621
+ debug('flow', state.flowing);
59622
+ while (state.flowing && stream.read() !== null) {}
59623
+ }
59624
+
59625
+ // wrap an old-style stream as the async data source.
59626
+ // This is *not* part of the readable stream interface.
59627
+ // It is an ugly unfortunate mess of history.
59628
+ Readable.prototype.wrap = function (stream) {
59629
+ var _this = this;
59630
+
59631
+ var state = this._readableState;
59632
+ var paused = false;
59633
+
59634
+ stream.on('end', function () {
59635
+ debug('wrapped end');
59636
+ if (state.decoder && !state.ended) {
59637
+ var chunk = state.decoder.end();
59638
+ if (chunk && chunk.length) _this.push(chunk);
59639
+ }
59640
+
59641
+ _this.push(null);
59642
+ });
59643
+
59644
+ stream.on('data', function (chunk) {
59645
+ debug('wrapped data');
59646
+ if (state.decoder) chunk = state.decoder.write(chunk);
59647
+
59648
+ // don't skip over falsy values in objectMode
59649
+ if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
59650
+
59651
+ var ret = _this.push(chunk);
59652
+ if (!ret) {
59653
+ paused = true;
59654
+ stream.pause();
59655
+ }
59656
+ });
59657
+
59658
+ // proxy all the other methods.
59659
+ // important when wrapping filters and duplexes.
59660
+ for (var i in stream) {
59661
+ if (this[i] === undefined && typeof stream[i] === 'function') {
59662
+ this[i] = function (method) {
59663
+ return function () {
59664
+ return stream[method].apply(stream, arguments);
59665
+ };
59666
+ }(i);
59667
+ }
59668
+ }
59669
+
59670
+ // proxy certain important events.
59671
+ for (var n = 0; n < kProxyEvents.length; n++) {
59672
+ stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
59673
+ }
59674
+
59675
+ // when we try to consume some more bytes, simply unpause the
59676
+ // underlying stream.
59677
+ this._read = function (n) {
59678
+ debug('wrapped _read', n);
59679
+ if (paused) {
59680
+ paused = false;
59681
+ stream.resume();
59682
+ }
59683
+ };
59684
+
59685
+ return this;
59686
+ };
59687
+
59688
+ Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
59689
+ // making it explicit this property is not enumerable
59690
+ // because otherwise some prototype manipulation in
59691
+ // userland will fail
59692
+ enumerable: false,
59693
+ get: function () {
59694
+ return this._readableState.highWaterMark;
59695
+ }
59696
+ });
59697
+
59698
+ // exposed for testing purposes only.
59699
+ Readable._fromList = fromList;
59700
+
59701
+ // Pluck off n bytes from an array of buffers.
59702
+ // Length is the combined lengths of all the buffers in the list.
59703
+ // This function is designed to be inlinable, so please take care when making
59704
+ // changes to the function body.
59705
+ function fromList(n, state) {
59706
+ // nothing buffered
59707
+ if (state.length === 0) return null;
59708
+
59709
+ var ret;
59710
+ if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
59711
+ // read it all, truncate the list
59712
+ if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
59713
+ state.buffer.clear();
59714
+ } else {
59715
+ // read part of list
59716
+ ret = fromListPartial(n, state.buffer, state.decoder);
59717
+ }
59718
+
59719
+ return ret;
59720
+ }
59721
+
59722
+ // Extracts only enough buffered data to satisfy the amount requested.
59723
+ // This function is designed to be inlinable, so please take care when making
59724
+ // changes to the function body.
59725
+ function fromListPartial(n, list, hasStrings) {
59726
+ var ret;
59727
+ if (n < list.head.data.length) {
59728
+ // slice is the same for buffers and strings
59729
+ ret = list.head.data.slice(0, n);
59730
+ list.head.data = list.head.data.slice(n);
59731
+ } else if (n === list.head.data.length) {
59732
+ // first chunk is a perfect match
59733
+ ret = list.shift();
59734
+ } else {
59735
+ // result spans more than one buffer
59736
+ ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
59737
+ }
59738
+ return ret;
59739
+ }
59740
+
59741
+ // Copies a specified amount of characters from the list of buffered data
59742
+ // chunks.
59743
+ // This function is designed to be inlinable, so please take care when making
59744
+ // changes to the function body.
59745
+ function copyFromBufferString(n, list) {
59746
+ var p = list.head;
59747
+ var c = 1;
59748
+ var ret = p.data;
59749
+ n -= ret.length;
59750
+ while (p = p.next) {
59751
+ var str = p.data;
59752
+ var nb = n > str.length ? str.length : n;
59753
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
59754
+ n -= nb;
59755
+ if (n === 0) {
59756
+ if (nb === str.length) {
59757
+ ++c;
59758
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
59759
+ } else {
59760
+ list.head = p;
59761
+ p.data = str.slice(nb);
59762
+ }
59763
+ break;
59764
+ }
59765
+ ++c;
59766
+ }
59767
+ list.length -= c;
59768
+ return ret;
59769
+ }
59770
+
59771
+ // Copies a specified amount of bytes from the list of buffered data chunks.
59772
+ // This function is designed to be inlinable, so please take care when making
59773
+ // changes to the function body.
59774
+ function copyFromBuffer(n, list) {
59775
+ var ret = Buffer.allocUnsafe(n);
59776
+ var p = list.head;
59777
+ var c = 1;
59778
+ p.data.copy(ret);
59779
+ n -= p.data.length;
59780
+ while (p = p.next) {
59781
+ var buf = p.data;
59782
+ var nb = n > buf.length ? buf.length : n;
59783
+ buf.copy(ret, ret.length - n, 0, nb);
59784
+ n -= nb;
59785
+ if (n === 0) {
59786
+ if (nb === buf.length) {
59787
+ ++c;
59788
+ if (p.next) list.head = p.next;else list.head = list.tail = null;
59789
+ } else {
59790
+ list.head = p;
59791
+ p.data = buf.slice(nb);
59792
+ }
59793
+ break;
59794
+ }
59795
+ ++c;
59796
+ }
59797
+ list.length -= c;
59798
+ return ret;
59799
+ }
59800
+
59801
+ function endReadable(stream) {
59802
+ var state = stream._readableState;
59803
+
59804
+ // If we get here before consuming all the bytes, then that is a
59805
+ // bug in node. Should never happen.
59806
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
59807
+
59808
+ if (!state.endEmitted) {
59809
+ state.ended = true;
59810
+ pna.nextTick(endReadableNT, state, stream);
59811
+ }
59812
+ }
59813
+
59814
+ function endReadableNT(state, stream) {
59815
+ // Check that we didn't get one last unshift.
59816
+ if (!state.endEmitted && state.length === 0) {
59817
+ state.endEmitted = true;
59818
+ stream.readable = false;
59819
+ stream.emit('end');
59820
+ }
59821
+ }
59822
+
59823
+ function indexOf(xs, x) {
59824
+ for (var i = 0, l = xs.length; i < l; i++) {
59825
+ if (xs[i] === x) return i;
59826
+ }
59827
+ return -1;
59828
+ }
59829
+
59830
+ }),
59831
+ "./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_transform.js": (function (module, __unused_webpack_exports, __webpack_require__) {
59832
+ "use strict";
59833
+ // Copyright Joyent, Inc. and other Node contributors.
59834
+ //
59835
+ // Permission is hereby granted, free of charge, to any person obtaining a
59836
+ // copy of this software and associated documentation files (the
59837
+ // "Software"), to deal in the Software without restriction, including
59838
+ // without limitation the rights to use, copy, modify, merge, publish,
59839
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
59840
+ // persons to whom the Software is furnished to do so, subject to the
59841
+ // following conditions:
59842
+ //
59843
+ // The above copyright notice and this permission notice shall be included
59844
+ // in all copies or substantial portions of the Software.
59845
+ //
59846
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
59847
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
59848
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
59849
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
59850
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
59851
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
59852
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
59853
+
59854
+ // a transform stream is a readable/writable stream where you do
59855
+ // something with the data. Sometimes it's called a "filter",
59856
+ // but that's not a great name for it, since that implies a thing where
59857
+ // some bits pass through, and others are simply ignored. (That would
59858
+ // be a valid example of a transform, of course.)
59859
+ //
59860
+ // While the output is causally related to the input, it's not a
59861
+ // necessarily symmetric or synchronous transformation. For example,
59862
+ // a zlib stream might take multiple plain-text writes(), and then
59863
+ // emit a single compressed chunk some time in the future.
59864
+ //
59865
+ // Here's how this works:
59866
+ //
59867
+ // The Transform stream has all the aspects of the readable and writable
59868
+ // stream classes. When you write(chunk), that calls _write(chunk,cb)
59869
+ // internally, and returns false if there's a lot of pending writes
59870
+ // buffered up. When you call read(), that calls _read(n) until
59871
+ // there's enough pending readable data buffered up.
59872
+ //
59873
+ // In a transform stream, the written data is placed in a buffer. When
59874
+ // _read(n) is called, it transforms the queued up data, calling the
59875
+ // buffered _write cb's as it consumes chunks. If consuming a single
59876
+ // written chunk would result in multiple output chunks, then the first
59877
+ // outputted bit calls the readcb, and subsequent chunks just go into
59878
+ // the read buffer, and will cause it to emit 'readable' if necessary.
59879
+ //
59880
+ // This way, back-pressure is actually determined by the reading side,
59881
+ // since _read has to be called to start processing a new chunk. However,
59882
+ // a pathological inflate type of transform can cause excessive buffering
59883
+ // here. For example, imagine a stream where every byte of input is
59884
+ // interpreted as an integer from 0-255, and then results in that many
59885
+ // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
59886
+ // 1kb of data being output. In this case, you could write a very small
59887
+ // amount of input, and end up with a very large amount of output. In
59888
+ // such a pathological inflating mechanism, there'd be no way to tell
59889
+ // the system to stop doing the transform. A single 4MB write could
59890
+ // cause the system to run out of memory.
59891
+ //
59892
+ // However, even in such a pathological case, only a single written chunk
59893
+ // would be consumed, and then the rest would wait (un-transformed) until
59894
+ // the results of the previous transformed chunk were consumed.
59895
+
59896
+
59897
+
59898
+ module.exports = Transform;
59899
+
59900
+ var Duplex = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_duplex.js");
59901
+
59902
+ /*<replacement>*/
59903
+ var util = Object.create(__webpack_require__("./node_modules/core-util-is/lib/util.js"));
59904
+ util.inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
59905
+ /*</replacement>*/
59906
+
59907
+ util.inherits(Transform, Duplex);
59908
+
59909
+ function afterTransform(er, data) {
59910
+ var ts = this._transformState;
59911
+ ts.transforming = false;
59912
+
59913
+ var cb = ts.writecb;
59914
+
59915
+ if (!cb) {
59916
+ return this.emit('error', new Error('write callback called multiple times'));
59917
+ }
59918
+
59919
+ ts.writechunk = null;
59920
+ ts.writecb = null;
59921
+
59922
+ if (data != null) // single equals check for both `null` and `undefined`
59923
+ this.push(data);
59924
+
59925
+ cb(er);
59926
+
59927
+ var rs = this._readableState;
59928
+ rs.reading = false;
59929
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
59930
+ this._read(rs.highWaterMark);
59931
+ }
59932
+ }
59933
+
59934
+ function Transform(options) {
59935
+ if (!(this instanceof Transform)) return new Transform(options);
59936
+
59937
+ Duplex.call(this, options);
59938
+
59939
+ this._transformState = {
59940
+ afterTransform: afterTransform.bind(this),
59941
+ needTransform: false,
59942
+ transforming: false,
59943
+ writecb: null,
59944
+ writechunk: null,
59945
+ writeencoding: null
59946
+ };
59947
+
59948
+ // start out asking for a readable event once data is transformed.
59949
+ this._readableState.needReadable = true;
59950
+
59951
+ // we have implemented the _read method, and done the other things
59952
+ // that Readable wants before the first _read call, so unset the
59953
+ // sync guard flag.
59954
+ this._readableState.sync = false;
59955
+
59956
+ if (options) {
59957
+ if (typeof options.transform === 'function') this._transform = options.transform;
59958
+
59959
+ if (typeof options.flush === 'function') this._flush = options.flush;
59960
+ }
59961
+
59962
+ // When the writable side finishes, then flush out anything remaining.
59963
+ this.on('prefinish', prefinish);
59964
+ }
59965
+
59966
+ function prefinish() {
59967
+ var _this = this;
59968
+
59969
+ if (typeof this._flush === 'function') {
59970
+ this._flush(function (er, data) {
59971
+ done(_this, er, data);
59972
+ });
59973
+ } else {
59974
+ done(this, null, null);
59975
+ }
59976
+ }
59977
+
59978
+ Transform.prototype.push = function (chunk, encoding) {
59979
+ this._transformState.needTransform = false;
59980
+ return Duplex.prototype.push.call(this, chunk, encoding);
59981
+ };
59982
+
59983
+ // This is the part where you do stuff!
59984
+ // override this function in implementation classes.
59985
+ // 'chunk' is an input chunk.
59986
+ //
59987
+ // Call `push(newChunk)` to pass along transformed output
59988
+ // to the readable side. You may call 'push' zero or more times.
59989
+ //
59990
+ // Call `cb(err)` when you are done with this chunk. If you pass
59991
+ // an error, then that'll put the hurt on the whole operation. If you
59992
+ // never call cb(), then you'll never get another chunk.
59993
+ Transform.prototype._transform = function (chunk, encoding, cb) {
59994
+ throw new Error('_transform() is not implemented');
59995
+ };
59996
+
59997
+ Transform.prototype._write = function (chunk, encoding, cb) {
59998
+ var ts = this._transformState;
59999
+ ts.writecb = cb;
60000
+ ts.writechunk = chunk;
60001
+ ts.writeencoding = encoding;
60002
+ if (!ts.transforming) {
60003
+ var rs = this._readableState;
60004
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
60005
+ }
60006
+ };
60007
+
60008
+ // Doesn't matter what the args are here.
60009
+ // _transform does all the work.
60010
+ // That we got here means that the readable side wants more data.
60011
+ Transform.prototype._read = function (n) {
60012
+ var ts = this._transformState;
60013
+
60014
+ if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
60015
+ ts.transforming = true;
60016
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
60017
+ } else {
60018
+ // mark that we need a transform, so that any data that comes in
60019
+ // will get processed, now that we've asked for it.
60020
+ ts.needTransform = true;
60021
+ }
60022
+ };
60023
+
60024
+ Transform.prototype._destroy = function (err, cb) {
60025
+ var _this2 = this;
60026
+
60027
+ Duplex.prototype._destroy.call(this, err, function (err2) {
60028
+ cb(err2);
60029
+ _this2.emit('close');
60030
+ });
60031
+ };
60032
+
60033
+ function done(stream, er, data) {
60034
+ if (er) return stream.emit('error', er);
60035
+
60036
+ if (data != null) // single equals check for both `null` and `undefined`
60037
+ stream.push(data);
60038
+
60039
+ // if there's nothing in the write buffer, then that means
60040
+ // that nothing more will ever be provided
60041
+ if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
60042
+
60043
+ if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
60044
+
60045
+ return stream.push(null);
60046
+ }
60047
+
60048
+ }),
60049
+ "./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_writable.js": (function (module, __unused_webpack_exports, __webpack_require__) {
60050
+ "use strict";
60051
+ /* provided dependency */ var process = __webpack_require__("./node_modules/process/browser.js");
60052
+ // Copyright Joyent, Inc. and other Node contributors.
60053
+ //
60054
+ // Permission is hereby granted, free of charge, to any person obtaining a
60055
+ // copy of this software and associated documentation files (the
60056
+ // "Software"), to deal in the Software without restriction, including
60057
+ // without limitation the rights to use, copy, modify, merge, publish,
60058
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
60059
+ // persons to whom the Software is furnished to do so, subject to the
60060
+ // following conditions:
60061
+ //
60062
+ // The above copyright notice and this permission notice shall be included
60063
+ // in all copies or substantial portions of the Software.
60064
+ //
60065
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
60066
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
60067
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
60068
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
60069
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
60070
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
60071
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
60072
+
60073
+ // A bit simpler than readable streams.
60074
+ // Implement an async ._write(chunk, encoding, cb), and it'll handle all
60075
+ // the drain event emission and buffering.
60076
+
60077
+
60078
+
60079
+ /*<replacement>*/
60080
+
60081
+ var pna = __webpack_require__("./node_modules/process-nextick-args/index.js");
60082
+ /*</replacement>*/
60083
+
60084
+ module.exports = Writable;
60085
+
60086
+ /* <replacement> */
60087
+ function WriteReq(chunk, encoding, cb) {
60088
+ this.chunk = chunk;
60089
+ this.encoding = encoding;
60090
+ this.callback = cb;
60091
+ this.next = null;
60092
+ }
60093
+
60094
+ // It seems a linked list but it is not
60095
+ // there will be only 2 of these for each stream
60096
+ function CorkedRequest(state) {
60097
+ var _this = this;
60098
+
60099
+ this.next = null;
60100
+ this.entry = null;
60101
+ this.finish = function () {
60102
+ onCorkedFinish(_this, state);
60103
+ };
60104
+ }
60105
+ /* </replacement> */
60106
+
60107
+ /*<replacement>*/
60108
+ var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
60109
+ /*</replacement>*/
60110
+
60111
+ /*<replacement>*/
60112
+ var Duplex;
60113
+ /*</replacement>*/
60114
+
60115
+ Writable.WritableState = WritableState;
60116
+
60117
+ /*<replacement>*/
60118
+ var util = Object.create(__webpack_require__("./node_modules/core-util-is/lib/util.js"));
60119
+ util.inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js");
60120
+ /*</replacement>*/
60121
+
60122
+ /*<replacement>*/
60123
+ var internalUtil = {
60124
+ deprecate: __webpack_require__("./node_modules/util-deprecate/browser.js")
60125
+ };
60126
+ /*</replacement>*/
60127
+
60128
+ /*<replacement>*/
60129
+ var Stream = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/internal/streams/stream-browser.js");
60130
+ /*</replacement>*/
60131
+
60132
+ /*<replacement>*/
60133
+
60134
+ var Buffer = (__webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/node_modules/safe-buffer/index.js")/* .Buffer */.Buffer);
60135
+ var OurUint8Array = (typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};
60136
+ function _uint8ArrayToBuffer(chunk) {
60137
+ return Buffer.from(chunk);
60138
+ }
60139
+ function _isUint8Array(obj) {
60140
+ return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
60141
+ }
60142
+
60143
+ /*</replacement>*/
60144
+
60145
+ var destroyImpl = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/internal/streams/destroy.js");
60146
+
60147
+ util.inherits(Writable, Stream);
60148
+
60149
+ function nop() {}
60150
+
60151
+ function WritableState(options, stream) {
60152
+ Duplex = Duplex || __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_duplex.js");
60153
+
60154
+ options = options || {};
60155
+
60156
+ // Duplex streams are both readable and writable, but share
60157
+ // the same options object.
60158
+ // However, some cases require setting options to different
60159
+ // values for the readable and the writable sides of the duplex stream.
60160
+ // These options can be provided separately as readableXXX and writableXXX.
60161
+ var isDuplex = stream instanceof Duplex;
60162
+
60163
+ // object stream flag to indicate whether or not this stream
60164
+ // contains buffers or objects.
60165
+ this.objectMode = !!options.objectMode;
60166
+
60167
+ if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
60168
+
60169
+ // the point at which write() starts returning false
60170
+ // Note: 0 is a valid value, means that we always return false if
60171
+ // the entire buffer is not flushed immediately on write()
60172
+ var hwm = options.highWaterMark;
60173
+ var writableHwm = options.writableHighWaterMark;
60174
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
60175
+
60176
+ if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
60177
+
60178
+ // cast to ints.
60179
+ this.highWaterMark = Math.floor(this.highWaterMark);
60180
+
60181
+ // if _final has been called
60182
+ this.finalCalled = false;
60183
+
60184
+ // drain event flag.
60185
+ this.needDrain = false;
60186
+ // at the start of calling end()
60187
+ this.ending = false;
60188
+ // when end() has been called, and returned
60189
+ this.ended = false;
60190
+ // when 'finish' is emitted
60191
+ this.finished = false;
60192
+
60193
+ // has it been destroyed
60194
+ this.destroyed = false;
60195
+
60196
+ // should we decode strings into buffers before passing to _write?
60197
+ // this is here so that some node-core streams can optimize string
60198
+ // handling at a lower level.
60199
+ var noDecode = options.decodeStrings === false;
60200
+ this.decodeStrings = !noDecode;
60201
+
60202
+ // Crypto is kind of old and crusty. Historically, its default string
60203
+ // encoding is 'binary' so we have to make this configurable.
60204
+ // Everything else in the universe uses 'utf8', though.
60205
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
60206
+
60207
+ // not an actual buffer we keep track of, but a measurement
60208
+ // of how much we're waiting to get pushed to some underlying
60209
+ // socket or file.
60210
+ this.length = 0;
60211
+
60212
+ // a flag to see when we're in the middle of a write.
60213
+ this.writing = false;
60214
+
60215
+ // when true all writes will be buffered until .uncork() call
60216
+ this.corked = 0;
60217
+
60218
+ // a flag to be able to tell if the onwrite cb is called immediately,
60219
+ // or on a later tick. We set this to true at first, because any
60220
+ // actions that shouldn't happen until "later" should generally also
60221
+ // not happen before the first write call.
60222
+ this.sync = true;
60223
+
60224
+ // a flag to know if we're processing previously buffered items, which
60225
+ // may call the _write() callback in the same tick, so that we don't
60226
+ // end up in an overlapped onwrite situation.
60227
+ this.bufferProcessing = false;
60228
+
60229
+ // the callback that's passed to _write(chunk,cb)
60230
+ this.onwrite = function (er) {
60231
+ onwrite(stream, er);
60232
+ };
60233
+
60234
+ // the callback that the user supplies to write(chunk,encoding,cb)
60235
+ this.writecb = null;
60236
+
60237
+ // the amount that is being written when _write is called.
60238
+ this.writelen = 0;
60239
+
60240
+ this.bufferedRequest = null;
60241
+ this.lastBufferedRequest = null;
60242
+
60243
+ // number of pending user-supplied write callbacks
60244
+ // this must be 0 before 'finish' can be emitted
60245
+ this.pendingcb = 0;
60246
+
60247
+ // emit prefinish if the only thing we're waiting for is _write cbs
60248
+ // This is relevant for synchronous Transform streams
60249
+ this.prefinished = false;
60250
+
60251
+ // True if the error was already emitted and should not be thrown again
60252
+ this.errorEmitted = false;
60253
+
60254
+ // count buffered requests
60255
+ this.bufferedRequestCount = 0;
60256
+
60257
+ // allocate the first CorkedRequest, there is always
60258
+ // one allocated and free to use, and we maintain at most two
60259
+ this.corkedRequestsFree = new CorkedRequest(this);
60260
+ }
60261
+
60262
+ WritableState.prototype.getBuffer = function getBuffer() {
60263
+ var current = this.bufferedRequest;
60264
+ var out = [];
60265
+ while (current) {
60266
+ out.push(current);
60267
+ current = current.next;
60268
+ }
60269
+ return out;
60270
+ };
60271
+
60272
+ (function () {
60273
+ try {
60274
+ Object.defineProperty(WritableState.prototype, 'buffer', {
60275
+ get: internalUtil.deprecate(function () {
60276
+ return this.getBuffer();
60277
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
60278
+ });
60279
+ } catch (_) {}
60280
+ })();
60281
+
60282
+ // Test _writableState for inheritance to account for Duplex streams,
60283
+ // whose prototype chain only points to Readable.
60284
+ var realHasInstance;
60285
+ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
60286
+ realHasInstance = Function.prototype[Symbol.hasInstance];
60287
+ Object.defineProperty(Writable, Symbol.hasInstance, {
60288
+ value: function (object) {
60289
+ if (realHasInstance.call(this, object)) return true;
60290
+ if (this !== Writable) return false;
60291
+
60292
+ return object && object._writableState instanceof WritableState;
60293
+ }
60294
+ });
60295
+ } else {
60296
+ realHasInstance = function (object) {
60297
+ return object instanceof this;
60298
+ };
60299
+ }
60300
+
60301
+ function Writable(options) {
60302
+ Duplex = Duplex || __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_duplex.js");
60303
+
60304
+ // Writable ctor is applied to Duplexes, too.
60305
+ // `realHasInstance` is necessary because using plain `instanceof`
60306
+ // would return false, as no `_writableState` property is attached.
60307
+
60308
+ // Trying to use the custom `instanceof` for Writable here will also break the
60309
+ // Node.js LazyTransform implementation, which has a non-trivial getter for
60310
+ // `_writableState` that would lead to infinite recursion.
60311
+ if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
60312
+ return new Writable(options);
60313
+ }
60314
+
60315
+ this._writableState = new WritableState(options, this);
60316
+
60317
+ // legacy.
60318
+ this.writable = true;
60319
+
60320
+ if (options) {
60321
+ if (typeof options.write === 'function') this._write = options.write;
60322
+
60323
+ if (typeof options.writev === 'function') this._writev = options.writev;
60324
+
60325
+ if (typeof options.destroy === 'function') this._destroy = options.destroy;
60326
+
60327
+ if (typeof options.final === 'function') this._final = options.final;
60328
+ }
60329
+
60330
+ Stream.call(this);
60331
+ }
60332
+
60333
+ // Otherwise people can pipe Writable streams, which is just wrong.
60334
+ Writable.prototype.pipe = function () {
60335
+ this.emit('error', new Error('Cannot pipe, not readable'));
60336
+ };
60337
+
60338
+ function writeAfterEnd(stream, cb) {
60339
+ var er = new Error('write after end');
60340
+ // TODO: defer error events consistently everywhere, not just the cb
60341
+ stream.emit('error', er);
60342
+ pna.nextTick(cb, er);
60343
+ }
60344
+
60345
+ // Checks that a user-supplied chunk is valid, especially for the particular
60346
+ // mode the stream is in. Currently this means that `null` is never accepted
60347
+ // and undefined/non-string values are only allowed in object mode.
60348
+ function validChunk(stream, state, chunk, cb) {
60349
+ var valid = true;
60350
+ var er = false;
60351
+
60352
+ if (chunk === null) {
60353
+ er = new TypeError('May not write null values to stream');
60354
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
60355
+ er = new TypeError('Invalid non-string/buffer chunk');
60356
+ }
60357
+ if (er) {
60358
+ stream.emit('error', er);
60359
+ pna.nextTick(cb, er);
60360
+ valid = false;
60361
+ }
60362
+ return valid;
60363
+ }
60364
+
60365
+ Writable.prototype.write = function (chunk, encoding, cb) {
60366
+ var state = this._writableState;
60367
+ var ret = false;
60368
+ var isBuf = !state.objectMode && _isUint8Array(chunk);
60369
+
60370
+ if (isBuf && !Buffer.isBuffer(chunk)) {
60371
+ chunk = _uint8ArrayToBuffer(chunk);
60372
+ }
60373
+
60374
+ if (typeof encoding === 'function') {
60375
+ cb = encoding;
60376
+ encoding = null;
60377
+ }
60378
+
60379
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
60380
+
60381
+ if (typeof cb !== 'function') cb = nop;
60382
+
60383
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
60384
+ state.pendingcb++;
60385
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
60386
+ }
60387
+
60388
+ return ret;
60389
+ };
60390
+
60391
+ Writable.prototype.cork = function () {
60392
+ var state = this._writableState;
60393
+
60394
+ state.corked++;
60395
+ };
60396
+
60397
+ Writable.prototype.uncork = function () {
60398
+ var state = this._writableState;
60399
+
60400
+ if (state.corked) {
60401
+ state.corked--;
60402
+
60403
+ if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
60404
+ }
60405
+ };
60406
+
60407
+ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
60408
+ // node::ParseEncoding() requires lower case.
60409
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
60410
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
60411
+ this._writableState.defaultEncoding = encoding;
60412
+ return this;
60413
+ };
60414
+
60415
+ function decodeChunk(state, chunk, encoding) {
60416
+ if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
60417
+ chunk = Buffer.from(chunk, encoding);
60418
+ }
60419
+ return chunk;
60420
+ }
60421
+
60422
+ Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
60423
+ // making it explicit this property is not enumerable
60424
+ // because otherwise some prototype manipulation in
60425
+ // userland will fail
60426
+ enumerable: false,
60427
+ get: function () {
60428
+ return this._writableState.highWaterMark;
60429
+ }
60430
+ });
60431
+
60432
+ // if we're already writing something, then just put this
60433
+ // in the queue, and wait our turn. Otherwise, call _write
60434
+ // If we return false, then we need a drain event, so set that flag.
60435
+ function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
60436
+ if (!isBuf) {
60437
+ var newChunk = decodeChunk(state, chunk, encoding);
60438
+ if (chunk !== newChunk) {
60439
+ isBuf = true;
60440
+ encoding = 'buffer';
60441
+ chunk = newChunk;
60442
+ }
60443
+ }
60444
+ var len = state.objectMode ? 1 : chunk.length;
60445
+
60446
+ state.length += len;
60447
+
60448
+ var ret = state.length < state.highWaterMark;
60449
+ // we must ensure that previous needDrain will not be reset to false.
60450
+ if (!ret) state.needDrain = true;
60451
+
60452
+ if (state.writing || state.corked) {
60453
+ var last = state.lastBufferedRequest;
60454
+ state.lastBufferedRequest = {
60455
+ chunk: chunk,
60456
+ encoding: encoding,
60457
+ isBuf: isBuf,
60458
+ callback: cb,
60459
+ next: null
60460
+ };
60461
+ if (last) {
60462
+ last.next = state.lastBufferedRequest;
60463
+ } else {
60464
+ state.bufferedRequest = state.lastBufferedRequest;
60465
+ }
60466
+ state.bufferedRequestCount += 1;
60467
+ } else {
60468
+ doWrite(stream, state, false, len, chunk, encoding, cb);
60469
+ }
60470
+
60471
+ return ret;
60472
+ }
60473
+
60474
+ function doWrite(stream, state, writev, len, chunk, encoding, cb) {
60475
+ state.writelen = len;
60476
+ state.writecb = cb;
60477
+ state.writing = true;
60478
+ state.sync = true;
60479
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
60480
+ state.sync = false;
60481
+ }
60482
+
60483
+ function onwriteError(stream, state, sync, er, cb) {
60484
+ --state.pendingcb;
60485
+
60486
+ if (sync) {
60487
+ // defer the callback if we are being called synchronously
60488
+ // to avoid piling up things on the stack
60489
+ pna.nextTick(cb, er);
60490
+ // this can emit finish, and it will always happen
60491
+ // after error
60492
+ pna.nextTick(finishMaybe, stream, state);
60493
+ stream._writableState.errorEmitted = true;
60494
+ stream.emit('error', er);
60495
+ } else {
60496
+ // the caller expect this to happen before if
60497
+ // it is async
60498
+ cb(er);
60499
+ stream._writableState.errorEmitted = true;
60500
+ stream.emit('error', er);
60501
+ // this can emit finish, but finish must
60502
+ // always follow error
60503
+ finishMaybe(stream, state);
60504
+ }
60505
+ }
60506
+
60507
+ function onwriteStateUpdate(state) {
60508
+ state.writing = false;
60509
+ state.writecb = null;
60510
+ state.length -= state.writelen;
60511
+ state.writelen = 0;
60512
+ }
60513
+
60514
+ function onwrite(stream, er) {
60515
+ var state = stream._writableState;
60516
+ var sync = state.sync;
60517
+ var cb = state.writecb;
60518
+
60519
+ onwriteStateUpdate(state);
60520
+
60521
+ if (er) onwriteError(stream, state, sync, er, cb);else {
60522
+ // Check if we're actually ready to finish, but don't emit yet
60523
+ var finished = needFinish(state);
60524
+
60525
+ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
60526
+ clearBuffer(stream, state);
60527
+ }
60528
+
60529
+ if (sync) {
60530
+ /*<replacement>*/
60531
+ asyncWrite(afterWrite, stream, state, finished, cb);
60532
+ /*</replacement>*/
60533
+ } else {
60534
+ afterWrite(stream, state, finished, cb);
60535
+ }
60536
+ }
60537
+ }
60538
+
60539
+ function afterWrite(stream, state, finished, cb) {
60540
+ if (!finished) onwriteDrain(stream, state);
60541
+ state.pendingcb--;
60542
+ cb();
60543
+ finishMaybe(stream, state);
60544
+ }
60545
+
60546
+ // Must force callback to be called on nextTick, so that we don't
60547
+ // emit 'drain' before the write() consumer gets the 'false' return
60548
+ // value, and has a chance to attach a 'drain' listener.
60549
+ function onwriteDrain(stream, state) {
60550
+ if (state.length === 0 && state.needDrain) {
60551
+ state.needDrain = false;
60552
+ stream.emit('drain');
60553
+ }
60554
+ }
60555
+
60556
+ // if there's something in the buffer waiting, then process it
60557
+ function clearBuffer(stream, state) {
60558
+ state.bufferProcessing = true;
60559
+ var entry = state.bufferedRequest;
60560
+
60561
+ if (stream._writev && entry && entry.next) {
60562
+ // Fast case, write everything using _writev()
60563
+ var l = state.bufferedRequestCount;
60564
+ var buffer = new Array(l);
60565
+ var holder = state.corkedRequestsFree;
60566
+ holder.entry = entry;
60567
+
60568
+ var count = 0;
60569
+ var allBuffers = true;
60570
+ while (entry) {
60571
+ buffer[count] = entry;
60572
+ if (!entry.isBuf) allBuffers = false;
60573
+ entry = entry.next;
60574
+ count += 1;
60575
+ }
60576
+ buffer.allBuffers = allBuffers;
60577
+
60578
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
60579
+
60580
+ // doWrite is almost always async, defer these to save a bit of time
60581
+ // as the hot path ends with doWrite
60582
+ state.pendingcb++;
60583
+ state.lastBufferedRequest = null;
60584
+ if (holder.next) {
60585
+ state.corkedRequestsFree = holder.next;
60586
+ holder.next = null;
60587
+ } else {
60588
+ state.corkedRequestsFree = new CorkedRequest(state);
60589
+ }
60590
+ state.bufferedRequestCount = 0;
60591
+ } else {
60592
+ // Slow case, write chunks one-by-one
60593
+ while (entry) {
60594
+ var chunk = entry.chunk;
60595
+ var encoding = entry.encoding;
60596
+ var cb = entry.callback;
60597
+ var len = state.objectMode ? 1 : chunk.length;
60598
+
60599
+ doWrite(stream, state, false, len, chunk, encoding, cb);
60600
+ entry = entry.next;
60601
+ state.bufferedRequestCount--;
60602
+ // if we didn't call the onwrite immediately, then
60603
+ // it means that we need to wait until it does.
60604
+ // also, that means that the chunk and cb are currently
60605
+ // being processed, so move the buffer counter past them.
60606
+ if (state.writing) {
60607
+ break;
60608
+ }
60609
+ }
60610
+
60611
+ if (entry === null) state.lastBufferedRequest = null;
60612
+ }
60613
+
60614
+ state.bufferedRequest = entry;
60615
+ state.bufferProcessing = false;
60616
+ }
60617
+
60618
+ Writable.prototype._write = function (chunk, encoding, cb) {
60619
+ cb(new Error('_write() is not implemented'));
60620
+ };
60621
+
60622
+ Writable.prototype._writev = null;
60623
+
60624
+ Writable.prototype.end = function (chunk, encoding, cb) {
60625
+ var state = this._writableState;
60626
+
60627
+ if (typeof chunk === 'function') {
60628
+ cb = chunk;
60629
+ chunk = null;
60630
+ encoding = null;
60631
+ } else if (typeof encoding === 'function') {
60632
+ cb = encoding;
60633
+ encoding = null;
60634
+ }
60635
+
60636
+ if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
60637
+
60638
+ // .end() fully uncorks
60639
+ if (state.corked) {
60640
+ state.corked = 1;
60641
+ this.uncork();
60642
+ }
60643
+
60644
+ // ignore unnecessary end() calls.
60645
+ if (!state.ending) endWritable(this, state, cb);
60646
+ };
60647
+
60648
+ function needFinish(state) {
60649
+ return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
60650
+ }
60651
+ function callFinal(stream, state) {
60652
+ stream._final(function (err) {
60653
+ state.pendingcb--;
60654
+ if (err) {
60655
+ stream.emit('error', err);
60656
+ }
60657
+ state.prefinished = true;
60658
+ stream.emit('prefinish');
60659
+ finishMaybe(stream, state);
60660
+ });
60661
+ }
60662
+ function prefinish(stream, state) {
60663
+ if (!state.prefinished && !state.finalCalled) {
60664
+ if (typeof stream._final === 'function') {
60665
+ state.pendingcb++;
60666
+ state.finalCalled = true;
60667
+ pna.nextTick(callFinal, stream, state);
60668
+ } else {
60669
+ state.prefinished = true;
60670
+ stream.emit('prefinish');
60671
+ }
60672
+ }
60673
+ }
60674
+
60675
+ function finishMaybe(stream, state) {
60676
+ var need = needFinish(state);
60677
+ if (need) {
60678
+ prefinish(stream, state);
60679
+ if (state.pendingcb === 0) {
60680
+ state.finished = true;
60681
+ stream.emit('finish');
60682
+ }
60683
+ }
60684
+ return need;
60685
+ }
60686
+
60687
+ function endWritable(stream, state, cb) {
60688
+ state.ending = true;
60689
+ finishMaybe(stream, state);
60690
+ if (cb) {
60691
+ if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
60692
+ }
60693
+ state.ended = true;
60694
+ stream.writable = false;
60695
+ }
60696
+
60697
+ function onCorkedFinish(corkReq, state, err) {
60698
+ var entry = corkReq.entry;
60699
+ corkReq.entry = null;
60700
+ while (entry) {
60701
+ var cb = entry.callback;
60702
+ state.pendingcb--;
60703
+ cb(err);
60704
+ entry = entry.next;
60705
+ }
60706
+
60707
+ // reuse the free corkReq.
60708
+ state.corkedRequestsFree.next = corkReq;
60709
+ }
60710
+
60711
+ Object.defineProperty(Writable.prototype, 'destroyed', {
60712
+ get: function () {
60713
+ if (this._writableState === undefined) {
60714
+ return false;
60715
+ }
60716
+ return this._writableState.destroyed;
60717
+ },
60718
+ set: function (value) {
60719
+ // we ignore the value if the stream
60720
+ // has not been initialized yet
60721
+ if (!this._writableState) {
60722
+ return;
60723
+ }
60724
+
60725
+ // backward compatibility, the user is explicitly
60726
+ // managing destroyed
60727
+ this._writableState.destroyed = value;
60728
+ }
60729
+ });
60730
+
60731
+ Writable.prototype.destroy = destroyImpl.destroy;
60732
+ Writable.prototype._undestroy = destroyImpl.undestroy;
60733
+ Writable.prototype._destroy = function (err, cb) {
60734
+ this.end();
60735
+ cb(err);
60736
+ };
60737
+
60738
+ }),
60739
+ "./node_modules/ripemd160/node_modules/readable-stream/lib/internal/streams/BufferList.js": (function (module, __unused_webpack_exports, __webpack_require__) {
60740
+ "use strict";
60741
+
60742
+
60743
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
60744
+
60745
+ var Buffer = (__webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/node_modules/safe-buffer/index.js")/* .Buffer */.Buffer);
60746
+ var util = __webpack_require__("?5c48");
60747
+
60748
+ function copyBuffer(src, target, offset) {
60749
+ src.copy(target, offset);
60750
+ }
60751
+
60752
+ module.exports = function () {
60753
+ function BufferList() {
60754
+ _classCallCheck(this, BufferList);
60755
+
60756
+ this.head = null;
60757
+ this.tail = null;
60758
+ this.length = 0;
60759
+ }
60760
+
60761
+ BufferList.prototype.push = function push(v) {
60762
+ var entry = { data: v, next: null };
60763
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
60764
+ this.tail = entry;
60765
+ ++this.length;
60766
+ };
60767
+
60768
+ BufferList.prototype.unshift = function unshift(v) {
60769
+ var entry = { data: v, next: this.head };
60770
+ if (this.length === 0) this.tail = entry;
60771
+ this.head = entry;
60772
+ ++this.length;
60773
+ };
60774
+
60775
+ BufferList.prototype.shift = function shift() {
60776
+ if (this.length === 0) return;
60777
+ var ret = this.head.data;
60778
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
60779
+ --this.length;
60780
+ return ret;
60781
+ };
60782
+
60783
+ BufferList.prototype.clear = function clear() {
60784
+ this.head = this.tail = null;
60785
+ this.length = 0;
60786
+ };
60787
+
60788
+ BufferList.prototype.join = function join(s) {
60789
+ if (this.length === 0) return '';
60790
+ var p = this.head;
60791
+ var ret = '' + p.data;
60792
+ while (p = p.next) {
60793
+ ret += s + p.data;
60794
+ }return ret;
60795
+ };
60796
+
60797
+ BufferList.prototype.concat = function concat(n) {
60798
+ if (this.length === 0) return Buffer.alloc(0);
60799
+ var ret = Buffer.allocUnsafe(n >>> 0);
60800
+ var p = this.head;
60801
+ var i = 0;
60802
+ while (p) {
60803
+ copyBuffer(p.data, ret, i);
60804
+ i += p.data.length;
60805
+ p = p.next;
60806
+ }
60807
+ return ret;
60808
+ };
60809
+
60810
+ return BufferList;
60811
+ }();
60812
+
60813
+ if (util && util.inspect && util.inspect.custom) {
60814
+ module.exports.prototype[util.inspect.custom] = function () {
60815
+ var obj = util.inspect({ length: this.length });
60816
+ return this.constructor.name + ' ' + obj;
60817
+ };
60818
+ }
60819
+
60820
+ }),
60821
+ "./node_modules/ripemd160/node_modules/readable-stream/lib/internal/streams/destroy.js": (function (module, __unused_webpack_exports, __webpack_require__) {
60822
+ "use strict";
60823
+
60824
+
60825
+ /*<replacement>*/
60826
+
60827
+ var pna = __webpack_require__("./node_modules/process-nextick-args/index.js");
60828
+ /*</replacement>*/
60829
+
60830
+ // undocumented cb() API, needed for core, not for public API
60831
+ function destroy(err, cb) {
60832
+ var _this = this;
60833
+
60834
+ var readableDestroyed = this._readableState && this._readableState.destroyed;
60835
+ var writableDestroyed = this._writableState && this._writableState.destroyed;
60836
+
60837
+ if (readableDestroyed || writableDestroyed) {
60838
+ if (cb) {
60839
+ cb(err);
60840
+ } else if (err) {
60841
+ if (!this._writableState) {
60842
+ pna.nextTick(emitErrorNT, this, err);
60843
+ } else if (!this._writableState.errorEmitted) {
60844
+ this._writableState.errorEmitted = true;
60845
+ pna.nextTick(emitErrorNT, this, err);
60846
+ }
60847
+ }
60848
+
60849
+ return this;
60850
+ }
60851
+
60852
+ // we set destroyed to true before firing error callbacks in order
60853
+ // to make it re-entrance safe in case destroy() is called within callbacks
60854
+
60855
+ if (this._readableState) {
60856
+ this._readableState.destroyed = true;
60857
+ }
60858
+
60859
+ // if this is a duplex stream mark the writable part as destroyed as well
60860
+ if (this._writableState) {
60861
+ this._writableState.destroyed = true;
60862
+ }
60863
+
60864
+ this._destroy(err || null, function (err) {
60865
+ if (!cb && err) {
60866
+ if (!_this._writableState) {
60867
+ pna.nextTick(emitErrorNT, _this, err);
60868
+ } else if (!_this._writableState.errorEmitted) {
60869
+ _this._writableState.errorEmitted = true;
60870
+ pna.nextTick(emitErrorNT, _this, err);
60871
+ }
60872
+ } else if (cb) {
60873
+ cb(err);
60874
+ }
60875
+ });
60876
+
60877
+ return this;
60878
+ }
60879
+
60880
+ function undestroy() {
60881
+ if (this._readableState) {
60882
+ this._readableState.destroyed = false;
60883
+ this._readableState.reading = false;
60884
+ this._readableState.ended = false;
60885
+ this._readableState.endEmitted = false;
60886
+ }
60887
+
60888
+ if (this._writableState) {
60889
+ this._writableState.destroyed = false;
60890
+ this._writableState.ended = false;
60891
+ this._writableState.ending = false;
60892
+ this._writableState.finalCalled = false;
60893
+ this._writableState.prefinished = false;
60894
+ this._writableState.finished = false;
60895
+ this._writableState.errorEmitted = false;
60896
+ }
60897
+ }
60898
+
60899
+ function emitErrorNT(self, err) {
60900
+ self.emit('error', err);
60901
+ }
60902
+
60903
+ module.exports = {
60904
+ destroy: destroy,
60905
+ undestroy: undestroy
60906
+ };
60907
+
60908
+ }),
60909
+ "./node_modules/ripemd160/node_modules/readable-stream/lib/internal/streams/stream-browser.js": (function (module, __unused_webpack_exports, __webpack_require__) {
60910
+ module.exports = (__webpack_require__("./node_modules/events/events.js")/* .EventEmitter */.EventEmitter);
60911
+
60912
+
60913
+ }),
60914
+ "./node_modules/ripemd160/node_modules/readable-stream/node_modules/safe-buffer/index.js": (function (module, exports, __webpack_require__) {
60915
+ /* eslint-disable node/no-deprecated-api */
60916
+ var buffer = __webpack_require__("./node_modules/buffer/index.js")
60917
+ var Buffer = buffer.Buffer
60918
+
60919
+ // alternative to using Object.keys for old browsers
60920
+ function copyProps (src, dst) {
60921
+ for (var key in src) {
60922
+ dst[key] = src[key]
60923
+ }
60924
+ }
60925
+ if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
60926
+ module.exports = buffer
60927
+ } else {
60928
+ // Copy properties from require('buffer')
60929
+ copyProps(buffer, exports)
60930
+ exports.Buffer = SafeBuffer
60931
+ }
60932
+
60933
+ function SafeBuffer (arg, encodingOrOffset, length) {
60934
+ return Buffer(arg, encodingOrOffset, length)
60935
+ }
60936
+
60937
+ // Copy static methods from Buffer
60938
+ copyProps(Buffer, SafeBuffer)
60939
+
60940
+ SafeBuffer.from = function (arg, encodingOrOffset, length) {
60941
+ if (typeof arg === 'number') {
60942
+ throw new TypeError('Argument must not be a number')
60943
+ }
60944
+ return Buffer(arg, encodingOrOffset, length)
60945
+ }
60946
+
60947
+ SafeBuffer.alloc = function (size, fill, encoding) {
60948
+ if (typeof size !== 'number') {
60949
+ throw new TypeError('Argument must be a number')
60950
+ }
60951
+ var buf = Buffer(size)
60952
+ if (fill !== undefined) {
60953
+ if (typeof encoding === 'string') {
60954
+ buf.fill(fill, encoding)
60955
+ } else {
60956
+ buf.fill(fill)
60957
+ }
60958
+ } else {
60959
+ buf.fill(0)
60960
+ }
60961
+ return buf
60962
+ }
60963
+
60964
+ SafeBuffer.allocUnsafe = function (size) {
60965
+ if (typeof size !== 'number') {
60966
+ throw new TypeError('Argument must be a number')
60967
+ }
60968
+ return Buffer(size)
60969
+ }
60970
+
60971
+ SafeBuffer.allocUnsafeSlow = function (size) {
60972
+ if (typeof size !== 'number') {
60973
+ throw new TypeError('Argument must be a number')
60974
+ }
60975
+ return buffer.SlowBuffer(size)
60976
+ }
60977
+
60978
+
60979
+ }),
60980
+ "./node_modules/ripemd160/node_modules/readable-stream/readable-browser.js": (function (module, exports, __webpack_require__) {
60981
+ exports = module.exports = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_readable.js");
60982
+ exports.Stream = exports;
60983
+ exports.Readable = exports;
60984
+ exports.Writable = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_writable.js");
60985
+ exports.Duplex = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_duplex.js");
60986
+ exports.Transform = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_transform.js");
60987
+ exports.PassThrough = __webpack_require__("./node_modules/ripemd160/node_modules/readable-stream/lib/_stream_passthrough.js");
60988
+
60989
+
60990
+ }),
60991
+ "./node_modules/ripemd160/node_modules/string_decoder/lib/string_decoder.js": (function (__unused_webpack_module, exports, __webpack_require__) {
60992
+ "use strict";
60993
+ // Copyright Joyent, Inc. and other Node contributors.
60994
+ //
60995
+ // Permission is hereby granted, free of charge, to any person obtaining a
60996
+ // copy of this software and associated documentation files (the
60997
+ // "Software"), to deal in the Software without restriction, including
60998
+ // without limitation the rights to use, copy, modify, merge, publish,
60999
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
61000
+ // persons to whom the Software is furnished to do so, subject to the
61001
+ // following conditions:
61002
+ //
61003
+ // The above copyright notice and this permission notice shall be included
61004
+ // in all copies or substantial portions of the Software.
61005
+ //
61006
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
61007
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
61008
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
61009
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
61010
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
61011
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
61012
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
61013
+
61014
+
61015
+
61016
+ /*<replacement>*/
61017
+
61018
+ var Buffer = (__webpack_require__("./node_modules/ripemd160/node_modules/string_decoder/node_modules/safe-buffer/index.js")/* .Buffer */.Buffer);
61019
+ /*</replacement>*/
61020
+
61021
+ var isEncoding = Buffer.isEncoding || function (encoding) {
61022
+ encoding = '' + encoding;
61023
+ switch (encoding && encoding.toLowerCase()) {
61024
+ 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':
61025
+ return true;
61026
+ default:
61027
+ return false;
61028
+ }
61029
+ };
61030
+
61031
+ function _normalizeEncoding(enc) {
61032
+ if (!enc) return 'utf8';
61033
+ var retried;
61034
+ while (true) {
61035
+ switch (enc) {
61036
+ case 'utf8':
61037
+ case 'utf-8':
61038
+ return 'utf8';
61039
+ case 'ucs2':
61040
+ case 'ucs-2':
61041
+ case 'utf16le':
61042
+ case 'utf-16le':
61043
+ return 'utf16le';
61044
+ case 'latin1':
61045
+ case 'binary':
61046
+ return 'latin1';
61047
+ case 'base64':
61048
+ case 'ascii':
61049
+ case 'hex':
61050
+ return enc;
61051
+ default:
61052
+ if (retried) return; // undefined
61053
+ enc = ('' + enc).toLowerCase();
61054
+ retried = true;
61055
+ }
61056
+ }
61057
+ };
61058
+
61059
+ // Do not cache `Buffer.isEncoding` when checking encoding names as some
61060
+ // modules monkey-patch it to support additional encodings
61061
+ function normalizeEncoding(enc) {
61062
+ var nenc = _normalizeEncoding(enc);
61063
+ if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
61064
+ return nenc || enc;
61065
+ }
61066
+
61067
+ // StringDecoder provides an interface for efficiently splitting a series of
61068
+ // buffers into a series of JS strings without breaking apart multi-byte
61069
+ // characters.
61070
+ exports.StringDecoder = StringDecoder;
61071
+ function StringDecoder(encoding) {
61072
+ this.encoding = normalizeEncoding(encoding);
61073
+ var nb;
61074
+ switch (this.encoding) {
61075
+ case 'utf16le':
61076
+ this.text = utf16Text;
61077
+ this.end = utf16End;
61078
+ nb = 4;
61079
+ break;
61080
+ case 'utf8':
61081
+ this.fillLast = utf8FillLast;
61082
+ nb = 4;
61083
+ break;
61084
+ case 'base64':
61085
+ this.text = base64Text;
61086
+ this.end = base64End;
61087
+ nb = 3;
61088
+ break;
61089
+ default:
61090
+ this.write = simpleWrite;
61091
+ this.end = simpleEnd;
61092
+ return;
61093
+ }
61094
+ this.lastNeed = 0;
61095
+ this.lastTotal = 0;
61096
+ this.lastChar = Buffer.allocUnsafe(nb);
61097
+ }
61098
+
61099
+ StringDecoder.prototype.write = function (buf) {
61100
+ if (buf.length === 0) return '';
61101
+ var r;
61102
+ var i;
61103
+ if (this.lastNeed) {
61104
+ r = this.fillLast(buf);
61105
+ if (r === undefined) return '';
61106
+ i = this.lastNeed;
61107
+ this.lastNeed = 0;
61108
+ } else {
61109
+ i = 0;
61110
+ }
61111
+ if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
61112
+ return r || '';
61113
+ };
61114
+
61115
+ StringDecoder.prototype.end = utf8End;
61116
+
61117
+ // Returns only complete characters in a Buffer
61118
+ StringDecoder.prototype.text = utf8Text;
61119
+
61120
+ // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
61121
+ StringDecoder.prototype.fillLast = function (buf) {
61122
+ if (this.lastNeed <= buf.length) {
61123
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
61124
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
61125
+ }
61126
+ buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
61127
+ this.lastNeed -= buf.length;
61128
+ };
61129
+
61130
+ // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
61131
+ // continuation byte. If an invalid byte is detected, -2 is returned.
61132
+ function utf8CheckByte(byte) {
61133
+ if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
61134
+ return byte >> 6 === 0x02 ? -1 : -2;
61135
+ }
61136
+
61137
+ // Checks at most 3 bytes at the end of a Buffer in order to detect an
61138
+ // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
61139
+ // needed to complete the UTF-8 character (if applicable) are returned.
61140
+ function utf8CheckIncomplete(self, buf, i) {
61141
+ var j = buf.length - 1;
61142
+ if (j < i) return 0;
61143
+ var nb = utf8CheckByte(buf[j]);
61144
+ if (nb >= 0) {
61145
+ if (nb > 0) self.lastNeed = nb - 1;
61146
+ return nb;
61147
+ }
61148
+ if (--j < i || nb === -2) return 0;
61149
+ nb = utf8CheckByte(buf[j]);
61150
+ if (nb >= 0) {
61151
+ if (nb > 0) self.lastNeed = nb - 2;
61152
+ return nb;
61153
+ }
61154
+ if (--j < i || nb === -2) return 0;
61155
+ nb = utf8CheckByte(buf[j]);
61156
+ if (nb >= 0) {
61157
+ if (nb > 0) {
61158
+ if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
61159
+ }
61160
+ return nb;
61161
+ }
61162
+ return 0;
61163
+ }
61164
+
61165
+ // Validates as many continuation bytes for a multi-byte UTF-8 character as
61166
+ // needed or are available. If we see a non-continuation byte where we expect
61167
+ // one, we "replace" the validated continuation bytes we've seen so far with
61168
+ // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
61169
+ // behavior. The continuation byte check is included three times in the case
61170
+ // where all of the continuation bytes for a character exist in the same buffer.
61171
+ // It is also done this way as a slight performance increase instead of using a
61172
+ // loop.
61173
+ function utf8CheckExtraBytes(self, buf, p) {
61174
+ if ((buf[0] & 0xC0) !== 0x80) {
61175
+ self.lastNeed = 0;
61176
+ return '\ufffd';
61177
+ }
61178
+ if (self.lastNeed > 1 && buf.length > 1) {
61179
+ if ((buf[1] & 0xC0) !== 0x80) {
61180
+ self.lastNeed = 1;
61181
+ return '\ufffd';
61182
+ }
61183
+ if (self.lastNeed > 2 && buf.length > 2) {
61184
+ if ((buf[2] & 0xC0) !== 0x80) {
61185
+ self.lastNeed = 2;
61186
+ return '\ufffd';
61187
+ }
58871
61188
  }
58872
61189
  }
61190
+ }
58873
61191
 
58874
- return mainError;
58875
- };
58876
-
58877
-
58878
- }),
58879
- "./node_modules/ripemd160/index.js": (function (module, __unused_webpack_exports, __webpack_require__) {
58880
- "use strict";
58881
-
58882
- var Buffer = (__webpack_require__("./node_modules/buffer/index.js")/* .Buffer */.Buffer)
58883
- var inherits = __webpack_require__("./node_modules/inherits/inherits_browser.js")
58884
- var HashBase = __webpack_require__("./node_modules/hash-base/index.js")
58885
-
58886
- var ARRAY16 = new Array(16)
58887
-
58888
- var zl = [
58889
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
58890
- 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
58891
- 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
58892
- 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
58893
- 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
58894
- ]
58895
-
58896
- var zr = [
58897
- 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
58898
- 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
58899
- 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
58900
- 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
58901
- 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
58902
- ]
58903
-
58904
- var sl = [
58905
- 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
58906
- 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
58907
- 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
58908
- 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
58909
- 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
58910
- ]
58911
-
58912
- var sr = [
58913
- 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
58914
- 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
58915
- 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
58916
- 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
58917
- 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
58918
- ]
58919
-
58920
- var hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]
58921
- var hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]
61192
+ // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
61193
+ function utf8FillLast(buf) {
61194
+ var p = this.lastTotal - this.lastNeed;
61195
+ var r = utf8CheckExtraBytes(this, buf, p);
61196
+ if (r !== undefined) return r;
61197
+ if (this.lastNeed <= buf.length) {
61198
+ buf.copy(this.lastChar, p, 0, this.lastNeed);
61199
+ return this.lastChar.toString(this.encoding, 0, this.lastTotal);
61200
+ }
61201
+ buf.copy(this.lastChar, p, 0, buf.length);
61202
+ this.lastNeed -= buf.length;
61203
+ }
58922
61204
 
58923
- function RIPEMD160 () {
58924
- HashBase.call(this, 64)
61205
+ // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
61206
+ // partial character, the character's bytes are buffered until the required
61207
+ // number of bytes are available.
61208
+ function utf8Text(buf, i) {
61209
+ var total = utf8CheckIncomplete(this, buf, i);
61210
+ if (!this.lastNeed) return buf.toString('utf8', i);
61211
+ this.lastTotal = total;
61212
+ var end = buf.length - (total - this.lastNeed);
61213
+ buf.copy(this.lastChar, 0, end);
61214
+ return buf.toString('utf8', i, end);
61215
+ }
58925
61216
 
58926
- // state
58927
- this._a = 0x67452301
58928
- this._b = 0xefcdab89
58929
- this._c = 0x98badcfe
58930
- this._d = 0x10325476
58931
- this._e = 0xc3d2e1f0
61217
+ // For UTF-8, a replacement character is added when ending on a partial
61218
+ // character.
61219
+ function utf8End(buf) {
61220
+ var r = buf && buf.length ? this.write(buf) : '';
61221
+ if (this.lastNeed) return r + '\ufffd';
61222
+ return r;
58932
61223
  }
58933
61224
 
58934
- inherits(RIPEMD160, HashBase)
61225
+ // UTF-16LE typically needs two bytes per character, but even if we have an even
61226
+ // number of bytes available, we need to check if we end on a leading/high
61227
+ // surrogate. In that case, we need to wait for the next two bytes in order to
61228
+ // decode the last character properly.
61229
+ function utf16Text(buf, i) {
61230
+ if ((buf.length - i) % 2 === 0) {
61231
+ var r = buf.toString('utf16le', i);
61232
+ if (r) {
61233
+ var c = r.charCodeAt(r.length - 1);
61234
+ if (c >= 0xD800 && c <= 0xDBFF) {
61235
+ this.lastNeed = 2;
61236
+ this.lastTotal = 4;
61237
+ this.lastChar[0] = buf[buf.length - 2];
61238
+ this.lastChar[1] = buf[buf.length - 1];
61239
+ return r.slice(0, -1);
61240
+ }
61241
+ }
61242
+ return r;
61243
+ }
61244
+ this.lastNeed = 1;
61245
+ this.lastTotal = 2;
61246
+ this.lastChar[0] = buf[buf.length - 1];
61247
+ return buf.toString('utf16le', i, buf.length - 1);
61248
+ }
58935
61249
 
58936
- RIPEMD160.prototype._update = function () {
58937
- var words = ARRAY16
58938
- for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4)
58939
-
58940
- var al = this._a | 0
58941
- var bl = this._b | 0
58942
- var cl = this._c | 0
58943
- var dl = this._d | 0
58944
- var el = this._e | 0
58945
-
58946
- var ar = this._a | 0
58947
- var br = this._b | 0
58948
- var cr = this._c | 0
58949
- var dr = this._d | 0
58950
- var er = this._e | 0
58951
-
58952
- // computation
58953
- for (var i = 0; i < 80; i += 1) {
58954
- var tl
58955
- var tr
58956
- if (i < 16) {
58957
- tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i])
58958
- tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i])
58959
- } else if (i < 32) {
58960
- tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i])
58961
- tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i])
58962
- } else if (i < 48) {
58963
- tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i])
58964
- tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i])
58965
- } else if (i < 64) {
58966
- tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i])
58967
- tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i])
58968
- } else { // if (i<80) {
58969
- tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i])
58970
- tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i])
58971
- }
58972
-
58973
- al = el
58974
- el = dl
58975
- dl = rotl(cl, 10)
58976
- cl = bl
58977
- bl = tl
58978
-
58979
- ar = er
58980
- er = dr
58981
- dr = rotl(cr, 10)
58982
- cr = br
58983
- br = tr
58984
- }
58985
-
58986
- // update state
58987
- var t = (this._b + cl + dr) | 0
58988
- this._b = (this._c + dl + er) | 0
58989
- this._c = (this._d + el + ar) | 0
58990
- this._d = (this._e + al + br) | 0
58991
- this._e = (this._a + bl + cr) | 0
58992
- this._a = t
61250
+ // For UTF-16LE we do not explicitly append special replacement characters if we
61251
+ // end on a partial character, we simply let v8 handle that.
61252
+ function utf16End(buf) {
61253
+ var r = buf && buf.length ? this.write(buf) : '';
61254
+ if (this.lastNeed) {
61255
+ var end = this.lastTotal - this.lastNeed;
61256
+ return r + this.lastChar.toString('utf16le', 0, end);
61257
+ }
61258
+ return r;
58993
61259
  }
58994
61260
 
58995
- RIPEMD160.prototype._digest = function () {
58996
- // create padding and handle blocks
58997
- this._block[this._blockOffset++] = 0x80
58998
- if (this._blockOffset > 56) {
58999
- this._block.fill(0, this._blockOffset, 64)
59000
- this._update()
59001
- this._blockOffset = 0
61261
+ function base64Text(buf, i) {
61262
+ var n = (buf.length - i) % 3;
61263
+ if (n === 0) return buf.toString('base64', i);
61264
+ this.lastNeed = 3 - n;
61265
+ this.lastTotal = 3;
61266
+ if (n === 1) {
61267
+ this.lastChar[0] = buf[buf.length - 1];
61268
+ } else {
61269
+ this.lastChar[0] = buf[buf.length - 2];
61270
+ this.lastChar[1] = buf[buf.length - 1];
59002
61271
  }
61272
+ return buf.toString('base64', i, buf.length - n);
61273
+ }
59003
61274
 
59004
- this._block.fill(0, this._blockOffset, 56)
59005
- this._block.writeUInt32LE(this._length[0], 56)
59006
- this._block.writeUInt32LE(this._length[1], 60)
59007
- this._update()
61275
+ function base64End(buf) {
61276
+ var r = buf && buf.length ? this.write(buf) : '';
61277
+ if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
61278
+ return r;
61279
+ }
59008
61280
 
59009
- // produce result
59010
- var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20)
59011
- buffer.writeInt32LE(this._a, 0)
59012
- buffer.writeInt32LE(this._b, 4)
59013
- buffer.writeInt32LE(this._c, 8)
59014
- buffer.writeInt32LE(this._d, 12)
59015
- buffer.writeInt32LE(this._e, 16)
59016
- return buffer
61281
+ // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
61282
+ function simpleWrite(buf) {
61283
+ return buf.toString(this.encoding);
59017
61284
  }
59018
61285
 
59019
- function rotl (x, n) {
59020
- return (x << n) | (x >>> (32 - n))
61286
+ function simpleEnd(buf) {
61287
+ return buf && buf.length ? this.write(buf) : '';
59021
61288
  }
59022
61289
 
59023
- function fn1 (a, b, c, d, e, m, k, s) {
59024
- return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0
61290
+ }),
61291
+ "./node_modules/ripemd160/node_modules/string_decoder/node_modules/safe-buffer/index.js": (function (module, exports, __webpack_require__) {
61292
+ /* eslint-disable node/no-deprecated-api */
61293
+ var buffer = __webpack_require__("./node_modules/buffer/index.js")
61294
+ var Buffer = buffer.Buffer
61295
+
61296
+ // alternative to using Object.keys for old browsers
61297
+ function copyProps (src, dst) {
61298
+ for (var key in src) {
61299
+ dst[key] = src[key]
61300
+ }
61301
+ }
61302
+ if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
61303
+ module.exports = buffer
61304
+ } else {
61305
+ // Copy properties from require('buffer')
61306
+ copyProps(buffer, exports)
61307
+ exports.Buffer = SafeBuffer
59025
61308
  }
59026
61309
 
59027
- function fn2 (a, b, c, d, e, m, k, s) {
59028
- return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0
61310
+ function SafeBuffer (arg, encodingOrOffset, length) {
61311
+ return Buffer(arg, encodingOrOffset, length)
59029
61312
  }
59030
61313
 
59031
- function fn3 (a, b, c, d, e, m, k, s) {
59032
- return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0
61314
+ // Copy static methods from Buffer
61315
+ copyProps(Buffer, SafeBuffer)
61316
+
61317
+ SafeBuffer.from = function (arg, encodingOrOffset, length) {
61318
+ if (typeof arg === 'number') {
61319
+ throw new TypeError('Argument must not be a number')
61320
+ }
61321
+ return Buffer(arg, encodingOrOffset, length)
59033
61322
  }
59034
61323
 
59035
- function fn4 (a, b, c, d, e, m, k, s) {
59036
- return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0
61324
+ SafeBuffer.alloc = function (size, fill, encoding) {
61325
+ if (typeof size !== 'number') {
61326
+ throw new TypeError('Argument must be a number')
61327
+ }
61328
+ var buf = Buffer(size)
61329
+ if (fill !== undefined) {
61330
+ if (typeof encoding === 'string') {
61331
+ buf.fill(fill, encoding)
61332
+ } else {
61333
+ buf.fill(fill)
61334
+ }
61335
+ } else {
61336
+ buf.fill(0)
61337
+ }
61338
+ return buf
59037
61339
  }
59038
61340
 
59039
- function fn5 (a, b, c, d, e, m, k, s) {
59040
- return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0
61341
+ SafeBuffer.allocUnsafe = function (size) {
61342
+ if (typeof size !== 'number') {
61343
+ throw new TypeError('Argument must be a number')
61344
+ }
61345
+ return Buffer(size)
59041
61346
  }
59042
61347
 
59043
- module.exports = RIPEMD160
61348
+ SafeBuffer.allocUnsafeSlow = function (size) {
61349
+ if (typeof size !== 'number') {
61350
+ throw new TypeError('Argument must be a number')
61351
+ }
61352
+ return buffer.SlowBuffer(size)
61353
+ }
59044
61354
 
59045
61355
 
59046
61356
  }),
@@ -69026,7 +71336,7 @@ function isStream(value) {
69026
71336
  function getVersionData() {
69027
71337
  if (true) {
69028
71338
  return {
69029
- version: "2.17.1-beta.2"
71339
+ version: "2.17.1-beta.3"
69030
71340
  };
69031
71341
  }
69032
71342
  // eslint-disable-next-line
@@ -69145,6 +71455,16 @@ function asArray(value) {
69145
71455
  "use strict";
69146
71456
  /* (ignored) */
69147
71457
 
71458
+ }),
71459
+ "?5c48": (function () {
71460
+ "use strict";
71461
+ /* (ignored) */
71462
+
71463
+ }),
71464
+ "?5084": (function () {
71465
+ "use strict";
71466
+ /* (ignored) */
71467
+
69148
71468
  }),
69149
71469
  "?fa3e": (function () {
69150
71470
  "use strict";
@@ -76939,7 +79259,7 @@ module.exports = JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1
76939
79259
  }),
76940
79260
  "./package.json": (function (module) {
76941
79261
  "use strict";
76942
- module.exports = JSON.parse('{"name":"apify-client","version":"2.17.1-beta.2","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"npm run clean && npm run build:node && npm run build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist","test":"npm run build && jest","lint":"eslint","lint:fix":"eslint --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"prettier --write .","format:check":"prettier --check .","build:node":"tsc","build:browser":"rsbuild build"},"dependencies":{"@apify/consts":"^2.42.0","@apify/log":"^2.2.6","@apify/utilities":"^2.18.0","@crawlee/types":"^3.3.0","agentkeepalive":"^4.2.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@babel/cli":"^7.21.0","@babel/core":"^7.21.0","@babel/preset-env":"^7.20.2","@babel/register":"^7.21.0","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/content-type":"^1.1.5","@types/express":"^4.17.17","@types/fs-extra":"^11.0.1","@types/jest":"^29.4.0","@types/node":"^22.0.0","ajv":"^8.17.1","babel-loader":"^10.0.0","body-parser":"^1.20.3","compression":"^1.7.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^4.21.1","fs-extra":"^11.1.0","gen-esm-wrapper":"^1.1.2","globals":"^16.0.0","jest":"^29.4.3","prettier":"^3.5.3","process":"^0.11.10","puppeteer":"^24.0.0","rimraf":"^6.0.0","source-map-support":"^0.5.21","ts-jest":"^29.0.5","ts-loader":"^9.4.2","ts-node":"^10.9.1","typescript":"^5.8.3","typescript-eslint":"^8.29.1"},"packageManager":"npm@10.9.2"}')
79262
+ module.exports = JSON.parse('{"name":"apify-client","version":"2.17.1-beta.3","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"npm run clean && npm run build:node && npm run build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist","test":"npm run build && jest","lint":"eslint","lint:fix":"eslint --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"prettier --write .","format:check":"prettier --check .","build:node":"tsc","build:browser":"rsbuild build"},"dependencies":{"@apify/consts":"^2.42.0","@apify/log":"^2.2.6","@apify/utilities":"^2.18.0","@crawlee/types":"^3.3.0","agentkeepalive":"^4.2.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@babel/cli":"^7.21.0","@babel/core":"^7.21.0","@babel/preset-env":"^7.20.2","@babel/register":"^7.21.0","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/content-type":"^1.1.5","@types/express":"^4.17.17","@types/fs-extra":"^11.0.1","@types/jest":"^29.4.0","@types/node":"^22.0.0","ajv":"^8.17.1","babel-loader":"^10.0.0","body-parser":"^1.20.3","compression":"^1.7.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^4.21.1","fs-extra":"^11.1.0","gen-esm-wrapper":"^1.1.2","globals":"^16.0.0","jest":"^29.4.3","prettier":"^3.5.3","process":"^0.11.10","puppeteer":"^24.0.0","rimraf":"^6.0.0","source-map-support":"^0.5.21","ts-jest":"^29.0.5","ts-loader":"^9.4.2","ts-node":"^10.9.1","typescript":"^5.8.3","typescript-eslint":"^8.29.1"},"packageManager":"npm@10.9.2"}')
76943
79263
 
76944
79264
  }),
76945
79265
 
@@ -76970,7 +79290,8 @@ var execOptions = { id: moduleId, module: module, factory: __webpack_modules__[m
76970
79290
  __webpack_require__.i.forEach(function(handler) { handler(execOptions); });
76971
79291
  module = execOptions.module;
76972
79292
  if (!execOptions.factory) {
76973
- console.error("undefined factory", moduleId)
79293
+ console.error("undefined factory", moduleId);
79294
+ throw Error("RuntimeError: factory is undefined (" + moduleId + ")");
76974
79295
  }
76975
79296
  execOptions.factory.call(module.exports, module, module.exports, execOptions.require);
76976
79297
 
@@ -77033,7 +79354,7 @@ __webpack_require__.hu = (chunkId) => ('' + chunkId + '.' + __webpack_require__.
77033
79354
  })();
77034
79355
  // webpack/runtime/get_full_hash
77035
79356
  (() => {
77036
- __webpack_require__.h = () => ("7d1982862acfd7af")
79357
+ __webpack_require__.h = () => ("751af6949aca6eda")
77037
79358
  })();
77038
79359
  // webpack/runtime/get_main_filename/update manifest
77039
79360
  (() => {