@elizaos/core 1.5.5-alpha.3 → 1.5.5-alpha.4
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/node/index.node.js +25 -2715
- package/dist/node/index.node.js.map +4 -20
- package/package.json +2 -2
package/dist/node/index.node.js
CHANGED
|
@@ -64644,2720 +64644,11 @@ var require_aesid = __commonJS((exports, module) => {
|
|
|
64644
64644
|
};
|
|
64645
64645
|
});
|
|
64646
64646
|
|
|
64647
|
-
// ../../node_modules/
|
|
64648
|
-
var require_buffer_list = __commonJS((exports, module) => {
|
|
64649
|
-
function ownKeys(object2, enumerableOnly) {
|
|
64650
|
-
var keys2 = Object.keys(object2);
|
|
64651
|
-
if (Object.getOwnPropertySymbols) {
|
|
64652
|
-
var symbols = Object.getOwnPropertySymbols(object2);
|
|
64653
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
64654
|
-
return Object.getOwnPropertyDescriptor(object2, sym).enumerable;
|
|
64655
|
-
})), keys2.push.apply(keys2, symbols);
|
|
64656
|
-
}
|
|
64657
|
-
return keys2;
|
|
64658
|
-
}
|
|
64659
|
-
function _objectSpread(target) {
|
|
64660
|
-
for (var i = 1;i < arguments.length; i++) {
|
|
64661
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
64662
|
-
i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
|
|
64663
|
-
_defineProperty(target, key, source[key]);
|
|
64664
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
64665
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
64666
|
-
});
|
|
64667
|
-
}
|
|
64668
|
-
return target;
|
|
64669
|
-
}
|
|
64670
|
-
function _defineProperty(obj, key, value) {
|
|
64671
|
-
key = _toPropertyKey(key);
|
|
64672
|
-
if (key in obj) {
|
|
64673
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
64674
|
-
} else {
|
|
64675
|
-
obj[key] = value;
|
|
64676
|
-
}
|
|
64677
|
-
return obj;
|
|
64678
|
-
}
|
|
64679
|
-
function _classCallCheck(instance, Constructor) {
|
|
64680
|
-
if (!(instance instanceof Constructor)) {
|
|
64681
|
-
throw new TypeError("Cannot call a class as a function");
|
|
64682
|
-
}
|
|
64683
|
-
}
|
|
64684
|
-
function _defineProperties(target, props) {
|
|
64685
|
-
for (var i = 0;i < props.length; i++) {
|
|
64686
|
-
var descriptor = props[i];
|
|
64687
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
64688
|
-
descriptor.configurable = true;
|
|
64689
|
-
if ("value" in descriptor)
|
|
64690
|
-
descriptor.writable = true;
|
|
64691
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
64692
|
-
}
|
|
64693
|
-
}
|
|
64694
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
64695
|
-
if (protoProps)
|
|
64696
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
64697
|
-
if (staticProps)
|
|
64698
|
-
_defineProperties(Constructor, staticProps);
|
|
64699
|
-
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
64700
|
-
return Constructor;
|
|
64701
|
-
}
|
|
64702
|
-
function _toPropertyKey(arg) {
|
|
64703
|
-
var key = _toPrimitive(arg, "string");
|
|
64704
|
-
return typeof key === "symbol" ? key : String(key);
|
|
64705
|
-
}
|
|
64706
|
-
function _toPrimitive(input, hint) {
|
|
64707
|
-
if (typeof input !== "object" || input === null)
|
|
64708
|
-
return input;
|
|
64709
|
-
var prim = input[Symbol.toPrimitive];
|
|
64710
|
-
if (prim !== undefined) {
|
|
64711
|
-
var res = prim.call(input, hint || "default");
|
|
64712
|
-
if (typeof res !== "object")
|
|
64713
|
-
return res;
|
|
64714
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
64715
|
-
}
|
|
64716
|
-
return (hint === "string" ? String : Number)(input);
|
|
64717
|
-
}
|
|
64718
|
-
var _require = __require("buffer");
|
|
64719
|
-
var Buffer2 = _require.Buffer;
|
|
64720
|
-
var _require2 = __require("util");
|
|
64721
|
-
var inspect = _require2.inspect;
|
|
64722
|
-
var custom = inspect && inspect.custom || "inspect";
|
|
64723
|
-
function copyBuffer(src, target, offset) {
|
|
64724
|
-
Buffer2.prototype.copy.call(src, target, offset);
|
|
64725
|
-
}
|
|
64726
|
-
module.exports = /* @__PURE__ */ function() {
|
|
64727
|
-
function BufferList() {
|
|
64728
|
-
_classCallCheck(this, BufferList);
|
|
64729
|
-
this.head = null;
|
|
64730
|
-
this.tail = null;
|
|
64731
|
-
this.length = 0;
|
|
64732
|
-
}
|
|
64733
|
-
_createClass(BufferList, [{
|
|
64734
|
-
key: "push",
|
|
64735
|
-
value: function push(v) {
|
|
64736
|
-
var entry = {
|
|
64737
|
-
data: v,
|
|
64738
|
-
next: null
|
|
64739
|
-
};
|
|
64740
|
-
if (this.length > 0)
|
|
64741
|
-
this.tail.next = entry;
|
|
64742
|
-
else
|
|
64743
|
-
this.head = entry;
|
|
64744
|
-
this.tail = entry;
|
|
64745
|
-
++this.length;
|
|
64746
|
-
}
|
|
64747
|
-
}, {
|
|
64748
|
-
key: "unshift",
|
|
64749
|
-
value: function unshift(v) {
|
|
64750
|
-
var entry = {
|
|
64751
|
-
data: v,
|
|
64752
|
-
next: this.head
|
|
64753
|
-
};
|
|
64754
|
-
if (this.length === 0)
|
|
64755
|
-
this.tail = entry;
|
|
64756
|
-
this.head = entry;
|
|
64757
|
-
++this.length;
|
|
64758
|
-
}
|
|
64759
|
-
}, {
|
|
64760
|
-
key: "shift",
|
|
64761
|
-
value: function shift() {
|
|
64762
|
-
if (this.length === 0)
|
|
64763
|
-
return;
|
|
64764
|
-
var ret = this.head.data;
|
|
64765
|
-
if (this.length === 1)
|
|
64766
|
-
this.head = this.tail = null;
|
|
64767
|
-
else
|
|
64768
|
-
this.head = this.head.next;
|
|
64769
|
-
--this.length;
|
|
64770
|
-
return ret;
|
|
64771
|
-
}
|
|
64772
|
-
}, {
|
|
64773
|
-
key: "clear",
|
|
64774
|
-
value: function clear() {
|
|
64775
|
-
this.head = this.tail = null;
|
|
64776
|
-
this.length = 0;
|
|
64777
|
-
}
|
|
64778
|
-
}, {
|
|
64779
|
-
key: "join",
|
|
64780
|
-
value: function join(s) {
|
|
64781
|
-
if (this.length === 0)
|
|
64782
|
-
return "";
|
|
64783
|
-
var p = this.head;
|
|
64784
|
-
var ret = "" + p.data;
|
|
64785
|
-
while (p = p.next)
|
|
64786
|
-
ret += s + p.data;
|
|
64787
|
-
return ret;
|
|
64788
|
-
}
|
|
64789
|
-
}, {
|
|
64790
|
-
key: "concat",
|
|
64791
|
-
value: function concat(n) {
|
|
64792
|
-
if (this.length === 0)
|
|
64793
|
-
return Buffer2.alloc(0);
|
|
64794
|
-
var ret = Buffer2.allocUnsafe(n >>> 0);
|
|
64795
|
-
var p = this.head;
|
|
64796
|
-
var i = 0;
|
|
64797
|
-
while (p) {
|
|
64798
|
-
copyBuffer(p.data, ret, i);
|
|
64799
|
-
i += p.data.length;
|
|
64800
|
-
p = p.next;
|
|
64801
|
-
}
|
|
64802
|
-
return ret;
|
|
64803
|
-
}
|
|
64804
|
-
}, {
|
|
64805
|
-
key: "consume",
|
|
64806
|
-
value: function consume(n, hasStrings) {
|
|
64807
|
-
var ret;
|
|
64808
|
-
if (n < this.head.data.length) {
|
|
64809
|
-
ret = this.head.data.slice(0, n);
|
|
64810
|
-
this.head.data = this.head.data.slice(n);
|
|
64811
|
-
} else if (n === this.head.data.length) {
|
|
64812
|
-
ret = this.shift();
|
|
64813
|
-
} else {
|
|
64814
|
-
ret = hasStrings ? this._getString(n) : this._getBuffer(n);
|
|
64815
|
-
}
|
|
64816
|
-
return ret;
|
|
64817
|
-
}
|
|
64818
|
-
}, {
|
|
64819
|
-
key: "first",
|
|
64820
|
-
value: function first() {
|
|
64821
|
-
return this.head.data;
|
|
64822
|
-
}
|
|
64823
|
-
}, {
|
|
64824
|
-
key: "_getString",
|
|
64825
|
-
value: function _getString(n) {
|
|
64826
|
-
var p = this.head;
|
|
64827
|
-
var c = 1;
|
|
64828
|
-
var ret = p.data;
|
|
64829
|
-
n -= ret.length;
|
|
64830
|
-
while (p = p.next) {
|
|
64831
|
-
var str = p.data;
|
|
64832
|
-
var nb = n > str.length ? str.length : n;
|
|
64833
|
-
if (nb === str.length)
|
|
64834
|
-
ret += str;
|
|
64835
|
-
else
|
|
64836
|
-
ret += str.slice(0, n);
|
|
64837
|
-
n -= nb;
|
|
64838
|
-
if (n === 0) {
|
|
64839
|
-
if (nb === str.length) {
|
|
64840
|
-
++c;
|
|
64841
|
-
if (p.next)
|
|
64842
|
-
this.head = p.next;
|
|
64843
|
-
else
|
|
64844
|
-
this.head = this.tail = null;
|
|
64845
|
-
} else {
|
|
64846
|
-
this.head = p;
|
|
64847
|
-
p.data = str.slice(nb);
|
|
64848
|
-
}
|
|
64849
|
-
break;
|
|
64850
|
-
}
|
|
64851
|
-
++c;
|
|
64852
|
-
}
|
|
64853
|
-
this.length -= c;
|
|
64854
|
-
return ret;
|
|
64855
|
-
}
|
|
64856
|
-
}, {
|
|
64857
|
-
key: "_getBuffer",
|
|
64858
|
-
value: function _getBuffer(n) {
|
|
64859
|
-
var ret = Buffer2.allocUnsafe(n);
|
|
64860
|
-
var p = this.head;
|
|
64861
|
-
var c = 1;
|
|
64862
|
-
p.data.copy(ret);
|
|
64863
|
-
n -= p.data.length;
|
|
64864
|
-
while (p = p.next) {
|
|
64865
|
-
var buf = p.data;
|
|
64866
|
-
var nb = n > buf.length ? buf.length : n;
|
|
64867
|
-
buf.copy(ret, ret.length - n, 0, nb);
|
|
64868
|
-
n -= nb;
|
|
64869
|
-
if (n === 0) {
|
|
64870
|
-
if (nb === buf.length) {
|
|
64871
|
-
++c;
|
|
64872
|
-
if (p.next)
|
|
64873
|
-
this.head = p.next;
|
|
64874
|
-
else
|
|
64875
|
-
this.head = this.tail = null;
|
|
64876
|
-
} else {
|
|
64877
|
-
this.head = p;
|
|
64878
|
-
p.data = buf.slice(nb);
|
|
64879
|
-
}
|
|
64880
|
-
break;
|
|
64881
|
-
}
|
|
64882
|
-
++c;
|
|
64883
|
-
}
|
|
64884
|
-
this.length -= c;
|
|
64885
|
-
return ret;
|
|
64886
|
-
}
|
|
64887
|
-
}, {
|
|
64888
|
-
key: custom,
|
|
64889
|
-
value: function value(_, options) {
|
|
64890
|
-
return inspect(this, _objectSpread(_objectSpread({}, options), {}, {
|
|
64891
|
-
depth: 0,
|
|
64892
|
-
customInspect: false
|
|
64893
|
-
}));
|
|
64894
|
-
}
|
|
64895
|
-
}]);
|
|
64896
|
-
return BufferList;
|
|
64897
|
-
}();
|
|
64898
|
-
});
|
|
64899
|
-
|
|
64900
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/internal/streams/destroy.js
|
|
64901
|
-
var require_destroy = __commonJS((exports, module) => {
|
|
64902
|
-
function destroy(err, cb) {
|
|
64903
|
-
var _this = this;
|
|
64904
|
-
var readableDestroyed = this._readableState && this._readableState.destroyed;
|
|
64905
|
-
var writableDestroyed = this._writableState && this._writableState.destroyed;
|
|
64906
|
-
if (readableDestroyed || writableDestroyed) {
|
|
64907
|
-
if (cb) {
|
|
64908
|
-
cb(err);
|
|
64909
|
-
} else if (err) {
|
|
64910
|
-
if (!this._writableState) {
|
|
64911
|
-
process.nextTick(emitErrorNT, this, err);
|
|
64912
|
-
} else if (!this._writableState.errorEmitted) {
|
|
64913
|
-
this._writableState.errorEmitted = true;
|
|
64914
|
-
process.nextTick(emitErrorNT, this, err);
|
|
64915
|
-
}
|
|
64916
|
-
}
|
|
64917
|
-
return this;
|
|
64918
|
-
}
|
|
64919
|
-
if (this._readableState) {
|
|
64920
|
-
this._readableState.destroyed = true;
|
|
64921
|
-
}
|
|
64922
|
-
if (this._writableState) {
|
|
64923
|
-
this._writableState.destroyed = true;
|
|
64924
|
-
}
|
|
64925
|
-
this._destroy(err || null, function(err2) {
|
|
64926
|
-
if (!cb && err2) {
|
|
64927
|
-
if (!_this._writableState) {
|
|
64928
|
-
process.nextTick(emitErrorAndCloseNT, _this, err2);
|
|
64929
|
-
} else if (!_this._writableState.errorEmitted) {
|
|
64930
|
-
_this._writableState.errorEmitted = true;
|
|
64931
|
-
process.nextTick(emitErrorAndCloseNT, _this, err2);
|
|
64932
|
-
} else {
|
|
64933
|
-
process.nextTick(emitCloseNT, _this);
|
|
64934
|
-
}
|
|
64935
|
-
} else if (cb) {
|
|
64936
|
-
process.nextTick(emitCloseNT, _this);
|
|
64937
|
-
cb(err2);
|
|
64938
|
-
} else {
|
|
64939
|
-
process.nextTick(emitCloseNT, _this);
|
|
64940
|
-
}
|
|
64941
|
-
});
|
|
64942
|
-
return this;
|
|
64943
|
-
}
|
|
64944
|
-
function emitErrorAndCloseNT(self2, err) {
|
|
64945
|
-
emitErrorNT(self2, err);
|
|
64946
|
-
emitCloseNT(self2);
|
|
64947
|
-
}
|
|
64948
|
-
function emitCloseNT(self2) {
|
|
64949
|
-
if (self2._writableState && !self2._writableState.emitClose)
|
|
64950
|
-
return;
|
|
64951
|
-
if (self2._readableState && !self2._readableState.emitClose)
|
|
64952
|
-
return;
|
|
64953
|
-
self2.emit("close");
|
|
64954
|
-
}
|
|
64955
|
-
function undestroy() {
|
|
64956
|
-
if (this._readableState) {
|
|
64957
|
-
this._readableState.destroyed = false;
|
|
64958
|
-
this._readableState.reading = false;
|
|
64959
|
-
this._readableState.ended = false;
|
|
64960
|
-
this._readableState.endEmitted = false;
|
|
64961
|
-
}
|
|
64962
|
-
if (this._writableState) {
|
|
64963
|
-
this._writableState.destroyed = false;
|
|
64964
|
-
this._writableState.ended = false;
|
|
64965
|
-
this._writableState.ending = false;
|
|
64966
|
-
this._writableState.finalCalled = false;
|
|
64967
|
-
this._writableState.prefinished = false;
|
|
64968
|
-
this._writableState.finished = false;
|
|
64969
|
-
this._writableState.errorEmitted = false;
|
|
64970
|
-
}
|
|
64971
|
-
}
|
|
64972
|
-
function emitErrorNT(self2, err) {
|
|
64973
|
-
self2.emit("error", err);
|
|
64974
|
-
}
|
|
64975
|
-
function errorOrDestroy(stream, err) {
|
|
64976
|
-
var rState = stream._readableState;
|
|
64977
|
-
var wState = stream._writableState;
|
|
64978
|
-
if (rState && rState.autoDestroy || wState && wState.autoDestroy)
|
|
64979
|
-
stream.destroy(err);
|
|
64980
|
-
else
|
|
64981
|
-
stream.emit("error", err);
|
|
64982
|
-
}
|
|
64983
|
-
module.exports = {
|
|
64984
|
-
destroy,
|
|
64985
|
-
undestroy,
|
|
64986
|
-
errorOrDestroy
|
|
64987
|
-
};
|
|
64988
|
-
});
|
|
64989
|
-
|
|
64990
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/errors.js
|
|
64991
|
-
var require_errors = __commonJS((exports, module) => {
|
|
64992
|
-
var codes = {};
|
|
64993
|
-
function createErrorType(code, message2, Base) {
|
|
64994
|
-
if (!Base) {
|
|
64995
|
-
Base = Error;
|
|
64996
|
-
}
|
|
64997
|
-
function getMessage(arg1, arg2, arg3) {
|
|
64998
|
-
if (typeof message2 === "string") {
|
|
64999
|
-
return message2;
|
|
65000
|
-
} else {
|
|
65001
|
-
return message2(arg1, arg2, arg3);
|
|
65002
|
-
}
|
|
65003
|
-
}
|
|
65004
|
-
|
|
65005
|
-
class NodeError extends Base {
|
|
65006
|
-
constructor(arg1, arg2, arg3) {
|
|
65007
|
-
super(getMessage(arg1, arg2, arg3));
|
|
65008
|
-
}
|
|
65009
|
-
}
|
|
65010
|
-
NodeError.prototype.name = Base.name;
|
|
65011
|
-
NodeError.prototype.code = code;
|
|
65012
|
-
codes[code] = NodeError;
|
|
65013
|
-
}
|
|
65014
|
-
function oneOf(expected, thing) {
|
|
65015
|
-
if (Array.isArray(expected)) {
|
|
65016
|
-
const len = expected.length;
|
|
65017
|
-
expected = expected.map((i) => String(i));
|
|
65018
|
-
if (len > 2) {
|
|
65019
|
-
return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1];
|
|
65020
|
-
} else if (len === 2) {
|
|
65021
|
-
return `one of ${thing} ${expected[0]} or ${expected[1]}`;
|
|
65022
|
-
} else {
|
|
65023
|
-
return `of ${thing} ${expected[0]}`;
|
|
65024
|
-
}
|
|
65025
|
-
} else {
|
|
65026
|
-
return `of ${thing} ${String(expected)}`;
|
|
65027
|
-
}
|
|
65028
|
-
}
|
|
65029
|
-
function startsWith(str, search, pos) {
|
|
65030
|
-
return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
|
|
65031
|
-
}
|
|
65032
|
-
function endsWith(str, search, this_len) {
|
|
65033
|
-
if (this_len === undefined || this_len > str.length) {
|
|
65034
|
-
this_len = str.length;
|
|
65035
|
-
}
|
|
65036
|
-
return str.substring(this_len - search.length, this_len) === search;
|
|
65037
|
-
}
|
|
65038
|
-
function includes(str, search, start) {
|
|
65039
|
-
if (typeof start !== "number") {
|
|
65040
|
-
start = 0;
|
|
65041
|
-
}
|
|
65042
|
-
if (start + search.length > str.length) {
|
|
65043
|
-
return false;
|
|
65044
|
-
} else {
|
|
65045
|
-
return str.indexOf(search, start) !== -1;
|
|
65046
|
-
}
|
|
65047
|
-
}
|
|
65048
|
-
createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) {
|
|
65049
|
-
return 'The value "' + value + '" is invalid for option "' + name + '"';
|
|
65050
|
-
}, TypeError);
|
|
65051
|
-
createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
|
|
65052
|
-
let determiner;
|
|
65053
|
-
if (typeof expected === "string" && startsWith(expected, "not ")) {
|
|
65054
|
-
determiner = "must not be";
|
|
65055
|
-
expected = expected.replace(/^not /, "");
|
|
65056
|
-
} else {
|
|
65057
|
-
determiner = "must be";
|
|
65058
|
-
}
|
|
65059
|
-
let msg;
|
|
65060
|
-
if (endsWith(name, " argument")) {
|
|
65061
|
-
msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`;
|
|
65062
|
-
} else {
|
|
65063
|
-
const type = includes(name, ".") ? "property" : "argument";
|
|
65064
|
-
msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, "type")}`;
|
|
65065
|
-
}
|
|
65066
|
-
msg += `. Received type ${typeof actual}`;
|
|
65067
|
-
return msg;
|
|
65068
|
-
}, TypeError);
|
|
65069
|
-
createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
|
|
65070
|
-
createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
|
|
65071
|
-
return "The " + name + " method is not implemented";
|
|
65072
|
-
});
|
|
65073
|
-
createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
|
|
65074
|
-
createErrorType("ERR_STREAM_DESTROYED", function(name) {
|
|
65075
|
-
return "Cannot call " + name + " after a stream was destroyed";
|
|
65076
|
-
});
|
|
65077
|
-
createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
|
|
65078
|
-
createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
|
|
65079
|
-
createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
|
|
65080
|
-
createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
|
|
65081
|
-
createErrorType("ERR_UNKNOWN_ENCODING", function(arg) {
|
|
65082
|
-
return "Unknown encoding: " + arg;
|
|
65083
|
-
}, TypeError);
|
|
65084
|
-
createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
|
|
65085
|
-
exports.codes = codes;
|
|
65086
|
-
});
|
|
65087
|
-
|
|
65088
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/internal/streams/state.js
|
|
65089
|
-
var require_state = __commonJS((exports, module) => {
|
|
65090
|
-
var ERR_INVALID_OPT_VALUE = require_errors().codes.ERR_INVALID_OPT_VALUE;
|
|
65091
|
-
function highWaterMarkFrom(options, isDuplex, duplexKey) {
|
|
65092
|
-
return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
|
|
65093
|
-
}
|
|
65094
|
-
function getHighWaterMark(state2, options, duplexKey, isDuplex) {
|
|
65095
|
-
var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
|
|
65096
|
-
if (hwm != null) {
|
|
65097
|
-
if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
|
|
65098
|
-
var name = isDuplex ? duplexKey : "highWaterMark";
|
|
65099
|
-
throw new ERR_INVALID_OPT_VALUE(name, hwm);
|
|
65100
|
-
}
|
|
65101
|
-
return Math.floor(hwm);
|
|
65102
|
-
}
|
|
65103
|
-
return state2.objectMode ? 16 : 16 * 1024;
|
|
65104
|
-
}
|
|
65105
|
-
module.exports = {
|
|
65106
|
-
getHighWaterMark
|
|
65107
|
-
};
|
|
65108
|
-
});
|
|
65109
|
-
|
|
65110
|
-
// ../../node_modules/util-deprecate/node.js
|
|
65111
|
-
var require_node12 = __commonJS((exports, module) => {
|
|
65112
|
-
module.exports = __require("util").deprecate;
|
|
65113
|
-
});
|
|
65114
|
-
|
|
65115
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/_stream_writable.js
|
|
65116
|
-
var require__stream_writable = __commonJS((exports, module) => {
|
|
65117
|
-
module.exports = Writable;
|
|
65118
|
-
function CorkedRequest(state2) {
|
|
65119
|
-
var _this = this;
|
|
65120
|
-
this.next = null;
|
|
65121
|
-
this.entry = null;
|
|
65122
|
-
this.finish = function() {
|
|
65123
|
-
onCorkedFinish(_this, state2);
|
|
65124
|
-
};
|
|
65125
|
-
}
|
|
65126
|
-
var Duplex;
|
|
65127
|
-
Writable.WritableState = WritableState;
|
|
65128
|
-
var internalUtil = {
|
|
65129
|
-
deprecate: require_node12()
|
|
65130
|
-
};
|
|
65131
|
-
var Stream = __require("stream");
|
|
65132
|
-
var Buffer2 = __require("buffer").Buffer;
|
|
65133
|
-
var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {};
|
|
65134
|
-
function _uint8ArrayToBuffer(chunk) {
|
|
65135
|
-
return Buffer2.from(chunk);
|
|
65136
|
-
}
|
|
65137
|
-
function _isUint8Array(obj) {
|
|
65138
|
-
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
|
65139
|
-
}
|
|
65140
|
-
var destroyImpl = require_destroy();
|
|
65141
|
-
var _require = require_state();
|
|
65142
|
-
var getHighWaterMark = _require.getHighWaterMark;
|
|
65143
|
-
var _require$codes = require_errors().codes;
|
|
65144
|
-
var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
|
|
65145
|
-
var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
|
|
65146
|
-
var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
|
|
65147
|
-
var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE;
|
|
65148
|
-
var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
|
|
65149
|
-
var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES;
|
|
65150
|
-
var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
|
|
65151
|
-
var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
|
|
65152
|
-
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
65153
|
-
require_inherits()(Writable, Stream);
|
|
65154
|
-
function nop() {}
|
|
65155
|
-
function WritableState(options, stream, isDuplex) {
|
|
65156
|
-
Duplex = Duplex || require__stream_duplex();
|
|
65157
|
-
options = options || {};
|
|
65158
|
-
if (typeof isDuplex !== "boolean")
|
|
65159
|
-
isDuplex = stream instanceof Duplex;
|
|
65160
|
-
this.objectMode = !!options.objectMode;
|
|
65161
|
-
if (isDuplex)
|
|
65162
|
-
this.objectMode = this.objectMode || !!options.writableObjectMode;
|
|
65163
|
-
this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex);
|
|
65164
|
-
this.finalCalled = false;
|
|
65165
|
-
this.needDrain = false;
|
|
65166
|
-
this.ending = false;
|
|
65167
|
-
this.ended = false;
|
|
65168
|
-
this.finished = false;
|
|
65169
|
-
this.destroyed = false;
|
|
65170
|
-
var noDecode = options.decodeStrings === false;
|
|
65171
|
-
this.decodeStrings = !noDecode;
|
|
65172
|
-
this.defaultEncoding = options.defaultEncoding || "utf8";
|
|
65173
|
-
this.length = 0;
|
|
65174
|
-
this.writing = false;
|
|
65175
|
-
this.corked = 0;
|
|
65176
|
-
this.sync = true;
|
|
65177
|
-
this.bufferProcessing = false;
|
|
65178
|
-
this.onwrite = function(er) {
|
|
65179
|
-
onwrite(stream, er);
|
|
65180
|
-
};
|
|
65181
|
-
this.writecb = null;
|
|
65182
|
-
this.writelen = 0;
|
|
65183
|
-
this.bufferedRequest = null;
|
|
65184
|
-
this.lastBufferedRequest = null;
|
|
65185
|
-
this.pendingcb = 0;
|
|
65186
|
-
this.prefinished = false;
|
|
65187
|
-
this.errorEmitted = false;
|
|
65188
|
-
this.emitClose = options.emitClose !== false;
|
|
65189
|
-
this.autoDestroy = !!options.autoDestroy;
|
|
65190
|
-
this.bufferedRequestCount = 0;
|
|
65191
|
-
this.corkedRequestsFree = new CorkedRequest(this);
|
|
65192
|
-
}
|
|
65193
|
-
WritableState.prototype.getBuffer = function getBuffer() {
|
|
65194
|
-
var current = this.bufferedRequest;
|
|
65195
|
-
var out = [];
|
|
65196
|
-
while (current) {
|
|
65197
|
-
out.push(current);
|
|
65198
|
-
current = current.next;
|
|
65199
|
-
}
|
|
65200
|
-
return out;
|
|
65201
|
-
};
|
|
65202
|
-
(function() {
|
|
65203
|
-
try {
|
|
65204
|
-
Object.defineProperty(WritableState.prototype, "buffer", {
|
|
65205
|
-
get: internalUtil.deprecate(function writableStateBufferGetter() {
|
|
65206
|
-
return this.getBuffer();
|
|
65207
|
-
}, "_writableState.buffer is deprecated. Use _writableState.getBuffer " + "instead.", "DEP0003")
|
|
65208
|
-
});
|
|
65209
|
-
} catch (_) {}
|
|
65210
|
-
})();
|
|
65211
|
-
var realHasInstance;
|
|
65212
|
-
if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") {
|
|
65213
|
-
realHasInstance = Function.prototype[Symbol.hasInstance];
|
|
65214
|
-
Object.defineProperty(Writable, Symbol.hasInstance, {
|
|
65215
|
-
value: function value(object2) {
|
|
65216
|
-
if (realHasInstance.call(this, object2))
|
|
65217
|
-
return true;
|
|
65218
|
-
if (this !== Writable)
|
|
65219
|
-
return false;
|
|
65220
|
-
return object2 && object2._writableState instanceof WritableState;
|
|
65221
|
-
}
|
|
65222
|
-
});
|
|
65223
|
-
} else {
|
|
65224
|
-
realHasInstance = function realHasInstance(object2) {
|
|
65225
|
-
return object2 instanceof this;
|
|
65226
|
-
};
|
|
65227
|
-
}
|
|
65228
|
-
function Writable(options) {
|
|
65229
|
-
Duplex = Duplex || require__stream_duplex();
|
|
65230
|
-
var isDuplex = this instanceof Duplex;
|
|
65231
|
-
if (!isDuplex && !realHasInstance.call(Writable, this))
|
|
65232
|
-
return new Writable(options);
|
|
65233
|
-
this._writableState = new WritableState(options, this, isDuplex);
|
|
65234
|
-
this.writable = true;
|
|
65235
|
-
if (options) {
|
|
65236
|
-
if (typeof options.write === "function")
|
|
65237
|
-
this._write = options.write;
|
|
65238
|
-
if (typeof options.writev === "function")
|
|
65239
|
-
this._writev = options.writev;
|
|
65240
|
-
if (typeof options.destroy === "function")
|
|
65241
|
-
this._destroy = options.destroy;
|
|
65242
|
-
if (typeof options.final === "function")
|
|
65243
|
-
this._final = options.final;
|
|
65244
|
-
}
|
|
65245
|
-
Stream.call(this);
|
|
65246
|
-
}
|
|
65247
|
-
Writable.prototype.pipe = function() {
|
|
65248
|
-
errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE);
|
|
65249
|
-
};
|
|
65250
|
-
function writeAfterEnd(stream, cb) {
|
|
65251
|
-
var er = new ERR_STREAM_WRITE_AFTER_END;
|
|
65252
|
-
errorOrDestroy(stream, er);
|
|
65253
|
-
process.nextTick(cb, er);
|
|
65254
|
-
}
|
|
65255
|
-
function validChunk(stream, state2, chunk, cb) {
|
|
65256
|
-
var er;
|
|
65257
|
-
if (chunk === null) {
|
|
65258
|
-
er = new ERR_STREAM_NULL_VALUES;
|
|
65259
|
-
} else if (typeof chunk !== "string" && !state2.objectMode) {
|
|
65260
|
-
er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk);
|
|
65261
|
-
}
|
|
65262
|
-
if (er) {
|
|
65263
|
-
errorOrDestroy(stream, er);
|
|
65264
|
-
process.nextTick(cb, er);
|
|
65265
|
-
return false;
|
|
65266
|
-
}
|
|
65267
|
-
return true;
|
|
65268
|
-
}
|
|
65269
|
-
Writable.prototype.write = function(chunk, encoding, cb) {
|
|
65270
|
-
var state2 = this._writableState;
|
|
65271
|
-
var ret = false;
|
|
65272
|
-
var isBuf = !state2.objectMode && _isUint8Array(chunk);
|
|
65273
|
-
if (isBuf && !Buffer2.isBuffer(chunk)) {
|
|
65274
|
-
chunk = _uint8ArrayToBuffer(chunk);
|
|
65275
|
-
}
|
|
65276
|
-
if (typeof encoding === "function") {
|
|
65277
|
-
cb = encoding;
|
|
65278
|
-
encoding = null;
|
|
65279
|
-
}
|
|
65280
|
-
if (isBuf)
|
|
65281
|
-
encoding = "buffer";
|
|
65282
|
-
else if (!encoding)
|
|
65283
|
-
encoding = state2.defaultEncoding;
|
|
65284
|
-
if (typeof cb !== "function")
|
|
65285
|
-
cb = nop;
|
|
65286
|
-
if (state2.ending)
|
|
65287
|
-
writeAfterEnd(this, cb);
|
|
65288
|
-
else if (isBuf || validChunk(this, state2, chunk, cb)) {
|
|
65289
|
-
state2.pendingcb++;
|
|
65290
|
-
ret = writeOrBuffer(this, state2, isBuf, chunk, encoding, cb);
|
|
65291
|
-
}
|
|
65292
|
-
return ret;
|
|
65293
|
-
};
|
|
65294
|
-
Writable.prototype.cork = function() {
|
|
65295
|
-
this._writableState.corked++;
|
|
65296
|
-
};
|
|
65297
|
-
Writable.prototype.uncork = function() {
|
|
65298
|
-
var state2 = this._writableState;
|
|
65299
|
-
if (state2.corked) {
|
|
65300
|
-
state2.corked--;
|
|
65301
|
-
if (!state2.writing && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest)
|
|
65302
|
-
clearBuffer(this, state2);
|
|
65303
|
-
}
|
|
65304
|
-
};
|
|
65305
|
-
Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
|
|
65306
|
-
if (typeof encoding === "string")
|
|
65307
|
-
encoding = encoding.toLowerCase();
|
|
65308
|
-
if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1))
|
|
65309
|
-
throw new ERR_UNKNOWN_ENCODING(encoding);
|
|
65310
|
-
this._writableState.defaultEncoding = encoding;
|
|
65311
|
-
return this;
|
|
65312
|
-
};
|
|
65313
|
-
Object.defineProperty(Writable.prototype, "writableBuffer", {
|
|
65314
|
-
enumerable: false,
|
|
65315
|
-
get: function get() {
|
|
65316
|
-
return this._writableState && this._writableState.getBuffer();
|
|
65317
|
-
}
|
|
65318
|
-
});
|
|
65319
|
-
function decodeChunk(state2, chunk, encoding) {
|
|
65320
|
-
if (!state2.objectMode && state2.decodeStrings !== false && typeof chunk === "string") {
|
|
65321
|
-
chunk = Buffer2.from(chunk, encoding);
|
|
65322
|
-
}
|
|
65323
|
-
return chunk;
|
|
65324
|
-
}
|
|
65325
|
-
Object.defineProperty(Writable.prototype, "writableHighWaterMark", {
|
|
65326
|
-
enumerable: false,
|
|
65327
|
-
get: function get() {
|
|
65328
|
-
return this._writableState.highWaterMark;
|
|
65329
|
-
}
|
|
65330
|
-
});
|
|
65331
|
-
function writeOrBuffer(stream, state2, isBuf, chunk, encoding, cb) {
|
|
65332
|
-
if (!isBuf) {
|
|
65333
|
-
var newChunk = decodeChunk(state2, chunk, encoding);
|
|
65334
|
-
if (chunk !== newChunk) {
|
|
65335
|
-
isBuf = true;
|
|
65336
|
-
encoding = "buffer";
|
|
65337
|
-
chunk = newChunk;
|
|
65338
|
-
}
|
|
65339
|
-
}
|
|
65340
|
-
var len = state2.objectMode ? 1 : chunk.length;
|
|
65341
|
-
state2.length += len;
|
|
65342
|
-
var ret = state2.length < state2.highWaterMark;
|
|
65343
|
-
if (!ret)
|
|
65344
|
-
state2.needDrain = true;
|
|
65345
|
-
if (state2.writing || state2.corked) {
|
|
65346
|
-
var last = state2.lastBufferedRequest;
|
|
65347
|
-
state2.lastBufferedRequest = {
|
|
65348
|
-
chunk,
|
|
65349
|
-
encoding,
|
|
65350
|
-
isBuf,
|
|
65351
|
-
callback: cb,
|
|
65352
|
-
next: null
|
|
65353
|
-
};
|
|
65354
|
-
if (last) {
|
|
65355
|
-
last.next = state2.lastBufferedRequest;
|
|
65356
|
-
} else {
|
|
65357
|
-
state2.bufferedRequest = state2.lastBufferedRequest;
|
|
65358
|
-
}
|
|
65359
|
-
state2.bufferedRequestCount += 1;
|
|
65360
|
-
} else {
|
|
65361
|
-
doWrite(stream, state2, false, len, chunk, encoding, cb);
|
|
65362
|
-
}
|
|
65363
|
-
return ret;
|
|
65364
|
-
}
|
|
65365
|
-
function doWrite(stream, state2, writev, len, chunk, encoding, cb) {
|
|
65366
|
-
state2.writelen = len;
|
|
65367
|
-
state2.writecb = cb;
|
|
65368
|
-
state2.writing = true;
|
|
65369
|
-
state2.sync = true;
|
|
65370
|
-
if (state2.destroyed)
|
|
65371
|
-
state2.onwrite(new ERR_STREAM_DESTROYED("write"));
|
|
65372
|
-
else if (writev)
|
|
65373
|
-
stream._writev(chunk, state2.onwrite);
|
|
65374
|
-
else
|
|
65375
|
-
stream._write(chunk, encoding, state2.onwrite);
|
|
65376
|
-
state2.sync = false;
|
|
65377
|
-
}
|
|
65378
|
-
function onwriteError(stream, state2, sync, er, cb) {
|
|
65379
|
-
--state2.pendingcb;
|
|
65380
|
-
if (sync) {
|
|
65381
|
-
process.nextTick(cb, er);
|
|
65382
|
-
process.nextTick(finishMaybe, stream, state2);
|
|
65383
|
-
stream._writableState.errorEmitted = true;
|
|
65384
|
-
errorOrDestroy(stream, er);
|
|
65385
|
-
} else {
|
|
65386
|
-
cb(er);
|
|
65387
|
-
stream._writableState.errorEmitted = true;
|
|
65388
|
-
errorOrDestroy(stream, er);
|
|
65389
|
-
finishMaybe(stream, state2);
|
|
65390
|
-
}
|
|
65391
|
-
}
|
|
65392
|
-
function onwriteStateUpdate(state2) {
|
|
65393
|
-
state2.writing = false;
|
|
65394
|
-
state2.writecb = null;
|
|
65395
|
-
state2.length -= state2.writelen;
|
|
65396
|
-
state2.writelen = 0;
|
|
65397
|
-
}
|
|
65398
|
-
function onwrite(stream, er) {
|
|
65399
|
-
var state2 = stream._writableState;
|
|
65400
|
-
var sync = state2.sync;
|
|
65401
|
-
var cb = state2.writecb;
|
|
65402
|
-
if (typeof cb !== "function")
|
|
65403
|
-
throw new ERR_MULTIPLE_CALLBACK;
|
|
65404
|
-
onwriteStateUpdate(state2);
|
|
65405
|
-
if (er)
|
|
65406
|
-
onwriteError(stream, state2, sync, er, cb);
|
|
65407
|
-
else {
|
|
65408
|
-
var finished = needFinish(state2) || stream.destroyed;
|
|
65409
|
-
if (!finished && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) {
|
|
65410
|
-
clearBuffer(stream, state2);
|
|
65411
|
-
}
|
|
65412
|
-
if (sync) {
|
|
65413
|
-
process.nextTick(afterWrite, stream, state2, finished, cb);
|
|
65414
|
-
} else {
|
|
65415
|
-
afterWrite(stream, state2, finished, cb);
|
|
65416
|
-
}
|
|
65417
|
-
}
|
|
65418
|
-
}
|
|
65419
|
-
function afterWrite(stream, state2, finished, cb) {
|
|
65420
|
-
if (!finished)
|
|
65421
|
-
onwriteDrain(stream, state2);
|
|
65422
|
-
state2.pendingcb--;
|
|
65423
|
-
cb();
|
|
65424
|
-
finishMaybe(stream, state2);
|
|
65425
|
-
}
|
|
65426
|
-
function onwriteDrain(stream, state2) {
|
|
65427
|
-
if (state2.length === 0 && state2.needDrain) {
|
|
65428
|
-
state2.needDrain = false;
|
|
65429
|
-
stream.emit("drain");
|
|
65430
|
-
}
|
|
65431
|
-
}
|
|
65432
|
-
function clearBuffer(stream, state2) {
|
|
65433
|
-
state2.bufferProcessing = true;
|
|
65434
|
-
var entry = state2.bufferedRequest;
|
|
65435
|
-
if (stream._writev && entry && entry.next) {
|
|
65436
|
-
var l = state2.bufferedRequestCount;
|
|
65437
|
-
var buffer = new Array(l);
|
|
65438
|
-
var holder = state2.corkedRequestsFree;
|
|
65439
|
-
holder.entry = entry;
|
|
65440
|
-
var count = 0;
|
|
65441
|
-
var allBuffers = true;
|
|
65442
|
-
while (entry) {
|
|
65443
|
-
buffer[count] = entry;
|
|
65444
|
-
if (!entry.isBuf)
|
|
65445
|
-
allBuffers = false;
|
|
65446
|
-
entry = entry.next;
|
|
65447
|
-
count += 1;
|
|
65448
|
-
}
|
|
65449
|
-
buffer.allBuffers = allBuffers;
|
|
65450
|
-
doWrite(stream, state2, true, state2.length, buffer, "", holder.finish);
|
|
65451
|
-
state2.pendingcb++;
|
|
65452
|
-
state2.lastBufferedRequest = null;
|
|
65453
|
-
if (holder.next) {
|
|
65454
|
-
state2.corkedRequestsFree = holder.next;
|
|
65455
|
-
holder.next = null;
|
|
65456
|
-
} else {
|
|
65457
|
-
state2.corkedRequestsFree = new CorkedRequest(state2);
|
|
65458
|
-
}
|
|
65459
|
-
state2.bufferedRequestCount = 0;
|
|
65460
|
-
} else {
|
|
65461
|
-
while (entry) {
|
|
65462
|
-
var chunk = entry.chunk;
|
|
65463
|
-
var encoding = entry.encoding;
|
|
65464
|
-
var cb = entry.callback;
|
|
65465
|
-
var len = state2.objectMode ? 1 : chunk.length;
|
|
65466
|
-
doWrite(stream, state2, false, len, chunk, encoding, cb);
|
|
65467
|
-
entry = entry.next;
|
|
65468
|
-
state2.bufferedRequestCount--;
|
|
65469
|
-
if (state2.writing) {
|
|
65470
|
-
break;
|
|
65471
|
-
}
|
|
65472
|
-
}
|
|
65473
|
-
if (entry === null)
|
|
65474
|
-
state2.lastBufferedRequest = null;
|
|
65475
|
-
}
|
|
65476
|
-
state2.bufferedRequest = entry;
|
|
65477
|
-
state2.bufferProcessing = false;
|
|
65478
|
-
}
|
|
65479
|
-
Writable.prototype._write = function(chunk, encoding, cb) {
|
|
65480
|
-
cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
|
|
65481
|
-
};
|
|
65482
|
-
Writable.prototype._writev = null;
|
|
65483
|
-
Writable.prototype.end = function(chunk, encoding, cb) {
|
|
65484
|
-
var state2 = this._writableState;
|
|
65485
|
-
if (typeof chunk === "function") {
|
|
65486
|
-
cb = chunk;
|
|
65487
|
-
chunk = null;
|
|
65488
|
-
encoding = null;
|
|
65489
|
-
} else if (typeof encoding === "function") {
|
|
65490
|
-
cb = encoding;
|
|
65491
|
-
encoding = null;
|
|
65492
|
-
}
|
|
65493
|
-
if (chunk !== null && chunk !== undefined)
|
|
65494
|
-
this.write(chunk, encoding);
|
|
65495
|
-
if (state2.corked) {
|
|
65496
|
-
state2.corked = 1;
|
|
65497
|
-
this.uncork();
|
|
65498
|
-
}
|
|
65499
|
-
if (!state2.ending)
|
|
65500
|
-
endWritable(this, state2, cb);
|
|
65501
|
-
return this;
|
|
65502
|
-
};
|
|
65503
|
-
Object.defineProperty(Writable.prototype, "writableLength", {
|
|
65504
|
-
enumerable: false,
|
|
65505
|
-
get: function get() {
|
|
65506
|
-
return this._writableState.length;
|
|
65507
|
-
}
|
|
65508
|
-
});
|
|
65509
|
-
function needFinish(state2) {
|
|
65510
|
-
return state2.ending && state2.length === 0 && state2.bufferedRequest === null && !state2.finished && !state2.writing;
|
|
65511
|
-
}
|
|
65512
|
-
function callFinal(stream, state2) {
|
|
65513
|
-
stream._final(function(err) {
|
|
65514
|
-
state2.pendingcb--;
|
|
65515
|
-
if (err) {
|
|
65516
|
-
errorOrDestroy(stream, err);
|
|
65517
|
-
}
|
|
65518
|
-
state2.prefinished = true;
|
|
65519
|
-
stream.emit("prefinish");
|
|
65520
|
-
finishMaybe(stream, state2);
|
|
65521
|
-
});
|
|
65522
|
-
}
|
|
65523
|
-
function prefinish(stream, state2) {
|
|
65524
|
-
if (!state2.prefinished && !state2.finalCalled) {
|
|
65525
|
-
if (typeof stream._final === "function" && !state2.destroyed) {
|
|
65526
|
-
state2.pendingcb++;
|
|
65527
|
-
state2.finalCalled = true;
|
|
65528
|
-
process.nextTick(callFinal, stream, state2);
|
|
65529
|
-
} else {
|
|
65530
|
-
state2.prefinished = true;
|
|
65531
|
-
stream.emit("prefinish");
|
|
65532
|
-
}
|
|
65533
|
-
}
|
|
65534
|
-
}
|
|
65535
|
-
function finishMaybe(stream, state2) {
|
|
65536
|
-
var need = needFinish(state2);
|
|
65537
|
-
if (need) {
|
|
65538
|
-
prefinish(stream, state2);
|
|
65539
|
-
if (state2.pendingcb === 0) {
|
|
65540
|
-
state2.finished = true;
|
|
65541
|
-
stream.emit("finish");
|
|
65542
|
-
if (state2.autoDestroy) {
|
|
65543
|
-
var rState = stream._readableState;
|
|
65544
|
-
if (!rState || rState.autoDestroy && rState.endEmitted) {
|
|
65545
|
-
stream.destroy();
|
|
65546
|
-
}
|
|
65547
|
-
}
|
|
65548
|
-
}
|
|
65549
|
-
}
|
|
65550
|
-
return need;
|
|
65551
|
-
}
|
|
65552
|
-
function endWritable(stream, state2, cb) {
|
|
65553
|
-
state2.ending = true;
|
|
65554
|
-
finishMaybe(stream, state2);
|
|
65555
|
-
if (cb) {
|
|
65556
|
-
if (state2.finished)
|
|
65557
|
-
process.nextTick(cb);
|
|
65558
|
-
else
|
|
65559
|
-
stream.once("finish", cb);
|
|
65560
|
-
}
|
|
65561
|
-
state2.ended = true;
|
|
65562
|
-
stream.writable = false;
|
|
65563
|
-
}
|
|
65564
|
-
function onCorkedFinish(corkReq, state2, err) {
|
|
65565
|
-
var entry = corkReq.entry;
|
|
65566
|
-
corkReq.entry = null;
|
|
65567
|
-
while (entry) {
|
|
65568
|
-
var cb = entry.callback;
|
|
65569
|
-
state2.pendingcb--;
|
|
65570
|
-
cb(err);
|
|
65571
|
-
entry = entry.next;
|
|
65572
|
-
}
|
|
65573
|
-
state2.corkedRequestsFree.next = corkReq;
|
|
65574
|
-
}
|
|
65575
|
-
Object.defineProperty(Writable.prototype, "destroyed", {
|
|
65576
|
-
enumerable: false,
|
|
65577
|
-
get: function get() {
|
|
65578
|
-
if (this._writableState === undefined) {
|
|
65579
|
-
return false;
|
|
65580
|
-
}
|
|
65581
|
-
return this._writableState.destroyed;
|
|
65582
|
-
},
|
|
65583
|
-
set: function set(value) {
|
|
65584
|
-
if (!this._writableState) {
|
|
65585
|
-
return;
|
|
65586
|
-
}
|
|
65587
|
-
this._writableState.destroyed = value;
|
|
65588
|
-
}
|
|
65589
|
-
});
|
|
65590
|
-
Writable.prototype.destroy = destroyImpl.destroy;
|
|
65591
|
-
Writable.prototype._undestroy = destroyImpl.undestroy;
|
|
65592
|
-
Writable.prototype._destroy = function(err, cb) {
|
|
65593
|
-
cb(err);
|
|
65594
|
-
};
|
|
65595
|
-
});
|
|
65596
|
-
|
|
65597
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/_stream_duplex.js
|
|
65598
|
-
var require__stream_duplex = __commonJS((exports, module) => {
|
|
65599
|
-
var objectKeys = Object.keys || function(obj) {
|
|
65600
|
-
var keys3 = [];
|
|
65601
|
-
for (var key in obj)
|
|
65602
|
-
keys3.push(key);
|
|
65603
|
-
return keys3;
|
|
65604
|
-
};
|
|
65605
|
-
module.exports = Duplex;
|
|
65606
|
-
var Readable2 = require__stream_readable();
|
|
65607
|
-
var Writable = require__stream_writable();
|
|
65608
|
-
require_inherits()(Duplex, Readable2);
|
|
65609
|
-
{
|
|
65610
|
-
keys2 = objectKeys(Writable.prototype);
|
|
65611
|
-
for (v = 0;v < keys2.length; v++) {
|
|
65612
|
-
method = keys2[v];
|
|
65613
|
-
if (!Duplex.prototype[method])
|
|
65614
|
-
Duplex.prototype[method] = Writable.prototype[method];
|
|
65615
|
-
}
|
|
65616
|
-
}
|
|
65617
|
-
var keys2;
|
|
65618
|
-
var method;
|
|
65619
|
-
var v;
|
|
65620
|
-
function Duplex(options) {
|
|
65621
|
-
if (!(this instanceof Duplex))
|
|
65622
|
-
return new Duplex(options);
|
|
65623
|
-
Readable2.call(this, options);
|
|
65624
|
-
Writable.call(this, options);
|
|
65625
|
-
this.allowHalfOpen = true;
|
|
65626
|
-
if (options) {
|
|
65627
|
-
if (options.readable === false)
|
|
65628
|
-
this.readable = false;
|
|
65629
|
-
if (options.writable === false)
|
|
65630
|
-
this.writable = false;
|
|
65631
|
-
if (options.allowHalfOpen === false) {
|
|
65632
|
-
this.allowHalfOpen = false;
|
|
65633
|
-
this.once("end", onend);
|
|
65634
|
-
}
|
|
65635
|
-
}
|
|
65636
|
-
}
|
|
65637
|
-
Object.defineProperty(Duplex.prototype, "writableHighWaterMark", {
|
|
65638
|
-
enumerable: false,
|
|
65639
|
-
get: function get() {
|
|
65640
|
-
return this._writableState.highWaterMark;
|
|
65641
|
-
}
|
|
65642
|
-
});
|
|
65643
|
-
Object.defineProperty(Duplex.prototype, "writableBuffer", {
|
|
65644
|
-
enumerable: false,
|
|
65645
|
-
get: function get() {
|
|
65646
|
-
return this._writableState && this._writableState.getBuffer();
|
|
65647
|
-
}
|
|
65648
|
-
});
|
|
65649
|
-
Object.defineProperty(Duplex.prototype, "writableLength", {
|
|
65650
|
-
enumerable: false,
|
|
65651
|
-
get: function get() {
|
|
65652
|
-
return this._writableState.length;
|
|
65653
|
-
}
|
|
65654
|
-
});
|
|
65655
|
-
function onend() {
|
|
65656
|
-
if (this._writableState.ended)
|
|
65657
|
-
return;
|
|
65658
|
-
process.nextTick(onEndNT, this);
|
|
65659
|
-
}
|
|
65660
|
-
function onEndNT(self2) {
|
|
65661
|
-
self2.end();
|
|
65662
|
-
}
|
|
65663
|
-
Object.defineProperty(Duplex.prototype, "destroyed", {
|
|
65664
|
-
enumerable: false,
|
|
65665
|
-
get: function get() {
|
|
65666
|
-
if (this._readableState === undefined || this._writableState === undefined) {
|
|
65667
|
-
return false;
|
|
65668
|
-
}
|
|
65669
|
-
return this._readableState.destroyed && this._writableState.destroyed;
|
|
65670
|
-
},
|
|
65671
|
-
set: function set(value) {
|
|
65672
|
-
if (this._readableState === undefined || this._writableState === undefined) {
|
|
65673
|
-
return;
|
|
65674
|
-
}
|
|
65675
|
-
this._readableState.destroyed = value;
|
|
65676
|
-
this._writableState.destroyed = value;
|
|
65677
|
-
}
|
|
65678
|
-
});
|
|
65679
|
-
});
|
|
65680
|
-
|
|
65681
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js
|
|
65682
|
-
var require_string_decoder = __commonJS((exports) => {
|
|
65683
|
-
var Buffer2 = require_safe_buffer().Buffer;
|
|
65684
|
-
var isEncoding = Buffer2.isEncoding || function(encoding) {
|
|
65685
|
-
encoding = "" + encoding;
|
|
65686
|
-
switch (encoding && encoding.toLowerCase()) {
|
|
65687
|
-
case "hex":
|
|
65688
|
-
case "utf8":
|
|
65689
|
-
case "utf-8":
|
|
65690
|
-
case "ascii":
|
|
65691
|
-
case "binary":
|
|
65692
|
-
case "base64":
|
|
65693
|
-
case "ucs2":
|
|
65694
|
-
case "ucs-2":
|
|
65695
|
-
case "utf16le":
|
|
65696
|
-
case "utf-16le":
|
|
65697
|
-
case "raw":
|
|
65698
|
-
return true;
|
|
65699
|
-
default:
|
|
65700
|
-
return false;
|
|
65701
|
-
}
|
|
65702
|
-
};
|
|
65703
|
-
function _normalizeEncoding(enc) {
|
|
65704
|
-
if (!enc)
|
|
65705
|
-
return "utf8";
|
|
65706
|
-
var retried;
|
|
65707
|
-
while (true) {
|
|
65708
|
-
switch (enc) {
|
|
65709
|
-
case "utf8":
|
|
65710
|
-
case "utf-8":
|
|
65711
|
-
return "utf8";
|
|
65712
|
-
case "ucs2":
|
|
65713
|
-
case "ucs-2":
|
|
65714
|
-
case "utf16le":
|
|
65715
|
-
case "utf-16le":
|
|
65716
|
-
return "utf16le";
|
|
65717
|
-
case "latin1":
|
|
65718
|
-
case "binary":
|
|
65719
|
-
return "latin1";
|
|
65720
|
-
case "base64":
|
|
65721
|
-
case "ascii":
|
|
65722
|
-
case "hex":
|
|
65723
|
-
return enc;
|
|
65724
|
-
default:
|
|
65725
|
-
if (retried)
|
|
65726
|
-
return;
|
|
65727
|
-
enc = ("" + enc).toLowerCase();
|
|
65728
|
-
retried = true;
|
|
65729
|
-
}
|
|
65730
|
-
}
|
|
65731
|
-
}
|
|
65732
|
-
function normalizeEncoding(enc) {
|
|
65733
|
-
var nenc = _normalizeEncoding(enc);
|
|
65734
|
-
if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc)))
|
|
65735
|
-
throw new Error("Unknown encoding: " + enc);
|
|
65736
|
-
return nenc || enc;
|
|
65737
|
-
}
|
|
65738
|
-
exports.StringDecoder = StringDecoder;
|
|
65739
|
-
function StringDecoder(encoding) {
|
|
65740
|
-
this.encoding = normalizeEncoding(encoding);
|
|
65741
|
-
var nb;
|
|
65742
|
-
switch (this.encoding) {
|
|
65743
|
-
case "utf16le":
|
|
65744
|
-
this.text = utf16Text;
|
|
65745
|
-
this.end = utf16End;
|
|
65746
|
-
nb = 4;
|
|
65747
|
-
break;
|
|
65748
|
-
case "utf8":
|
|
65749
|
-
this.fillLast = utf8FillLast;
|
|
65750
|
-
nb = 4;
|
|
65751
|
-
break;
|
|
65752
|
-
case "base64":
|
|
65753
|
-
this.text = base64Text;
|
|
65754
|
-
this.end = base64End;
|
|
65755
|
-
nb = 3;
|
|
65756
|
-
break;
|
|
65757
|
-
default:
|
|
65758
|
-
this.write = simpleWrite;
|
|
65759
|
-
this.end = simpleEnd;
|
|
65760
|
-
return;
|
|
65761
|
-
}
|
|
65762
|
-
this.lastNeed = 0;
|
|
65763
|
-
this.lastTotal = 0;
|
|
65764
|
-
this.lastChar = Buffer2.allocUnsafe(nb);
|
|
65765
|
-
}
|
|
65766
|
-
StringDecoder.prototype.write = function(buf) {
|
|
65767
|
-
if (buf.length === 0)
|
|
65768
|
-
return "";
|
|
65769
|
-
var r;
|
|
65770
|
-
var i;
|
|
65771
|
-
if (this.lastNeed) {
|
|
65772
|
-
r = this.fillLast(buf);
|
|
65773
|
-
if (r === undefined)
|
|
65774
|
-
return "";
|
|
65775
|
-
i = this.lastNeed;
|
|
65776
|
-
this.lastNeed = 0;
|
|
65777
|
-
} else {
|
|
65778
|
-
i = 0;
|
|
65779
|
-
}
|
|
65780
|
-
if (i < buf.length)
|
|
65781
|
-
return r ? r + this.text(buf, i) : this.text(buf, i);
|
|
65782
|
-
return r || "";
|
|
65783
|
-
};
|
|
65784
|
-
StringDecoder.prototype.end = utf8End;
|
|
65785
|
-
StringDecoder.prototype.text = utf8Text;
|
|
65786
|
-
StringDecoder.prototype.fillLast = function(buf) {
|
|
65787
|
-
if (this.lastNeed <= buf.length) {
|
|
65788
|
-
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
|
|
65789
|
-
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
65790
|
-
}
|
|
65791
|
-
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
|
|
65792
|
-
this.lastNeed -= buf.length;
|
|
65793
|
-
};
|
|
65794
|
-
function utf8CheckByte(byte) {
|
|
65795
|
-
if (byte <= 127)
|
|
65796
|
-
return 0;
|
|
65797
|
-
else if (byte >> 5 === 6)
|
|
65798
|
-
return 2;
|
|
65799
|
-
else if (byte >> 4 === 14)
|
|
65800
|
-
return 3;
|
|
65801
|
-
else if (byte >> 3 === 30)
|
|
65802
|
-
return 4;
|
|
65803
|
-
return byte >> 6 === 2 ? -1 : -2;
|
|
65804
|
-
}
|
|
65805
|
-
function utf8CheckIncomplete(self2, buf, i) {
|
|
65806
|
-
var j = buf.length - 1;
|
|
65807
|
-
if (j < i)
|
|
65808
|
-
return 0;
|
|
65809
|
-
var nb = utf8CheckByte(buf[j]);
|
|
65810
|
-
if (nb >= 0) {
|
|
65811
|
-
if (nb > 0)
|
|
65812
|
-
self2.lastNeed = nb - 1;
|
|
65813
|
-
return nb;
|
|
65814
|
-
}
|
|
65815
|
-
if (--j < i || nb === -2)
|
|
65816
|
-
return 0;
|
|
65817
|
-
nb = utf8CheckByte(buf[j]);
|
|
65818
|
-
if (nb >= 0) {
|
|
65819
|
-
if (nb > 0)
|
|
65820
|
-
self2.lastNeed = nb - 2;
|
|
65821
|
-
return nb;
|
|
65822
|
-
}
|
|
65823
|
-
if (--j < i || nb === -2)
|
|
65824
|
-
return 0;
|
|
65825
|
-
nb = utf8CheckByte(buf[j]);
|
|
65826
|
-
if (nb >= 0) {
|
|
65827
|
-
if (nb > 0) {
|
|
65828
|
-
if (nb === 2)
|
|
65829
|
-
nb = 0;
|
|
65830
|
-
else
|
|
65831
|
-
self2.lastNeed = nb - 3;
|
|
65832
|
-
}
|
|
65833
|
-
return nb;
|
|
65834
|
-
}
|
|
65835
|
-
return 0;
|
|
65836
|
-
}
|
|
65837
|
-
function utf8CheckExtraBytes(self2, buf, p) {
|
|
65838
|
-
if ((buf[0] & 192) !== 128) {
|
|
65839
|
-
self2.lastNeed = 0;
|
|
65840
|
-
return "�";
|
|
65841
|
-
}
|
|
65842
|
-
if (self2.lastNeed > 1 && buf.length > 1) {
|
|
65843
|
-
if ((buf[1] & 192) !== 128) {
|
|
65844
|
-
self2.lastNeed = 1;
|
|
65845
|
-
return "�";
|
|
65846
|
-
}
|
|
65847
|
-
if (self2.lastNeed > 2 && buf.length > 2) {
|
|
65848
|
-
if ((buf[2] & 192) !== 128) {
|
|
65849
|
-
self2.lastNeed = 2;
|
|
65850
|
-
return "�";
|
|
65851
|
-
}
|
|
65852
|
-
}
|
|
65853
|
-
}
|
|
65854
|
-
}
|
|
65855
|
-
function utf8FillLast(buf) {
|
|
65856
|
-
var p = this.lastTotal - this.lastNeed;
|
|
65857
|
-
var r = utf8CheckExtraBytes(this, buf, p);
|
|
65858
|
-
if (r !== undefined)
|
|
65859
|
-
return r;
|
|
65860
|
-
if (this.lastNeed <= buf.length) {
|
|
65861
|
-
buf.copy(this.lastChar, p, 0, this.lastNeed);
|
|
65862
|
-
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
65863
|
-
}
|
|
65864
|
-
buf.copy(this.lastChar, p, 0, buf.length);
|
|
65865
|
-
this.lastNeed -= buf.length;
|
|
65866
|
-
}
|
|
65867
|
-
function utf8Text(buf, i) {
|
|
65868
|
-
var total = utf8CheckIncomplete(this, buf, i);
|
|
65869
|
-
if (!this.lastNeed)
|
|
65870
|
-
return buf.toString("utf8", i);
|
|
65871
|
-
this.lastTotal = total;
|
|
65872
|
-
var end = buf.length - (total - this.lastNeed);
|
|
65873
|
-
buf.copy(this.lastChar, 0, end);
|
|
65874
|
-
return buf.toString("utf8", i, end);
|
|
65875
|
-
}
|
|
65876
|
-
function utf8End(buf) {
|
|
65877
|
-
var r = buf && buf.length ? this.write(buf) : "";
|
|
65878
|
-
if (this.lastNeed)
|
|
65879
|
-
return r + "�";
|
|
65880
|
-
return r;
|
|
65881
|
-
}
|
|
65882
|
-
function utf16Text(buf, i) {
|
|
65883
|
-
if ((buf.length - i) % 2 === 0) {
|
|
65884
|
-
var r = buf.toString("utf16le", i);
|
|
65885
|
-
if (r) {
|
|
65886
|
-
var c = r.charCodeAt(r.length - 1);
|
|
65887
|
-
if (c >= 55296 && c <= 56319) {
|
|
65888
|
-
this.lastNeed = 2;
|
|
65889
|
-
this.lastTotal = 4;
|
|
65890
|
-
this.lastChar[0] = buf[buf.length - 2];
|
|
65891
|
-
this.lastChar[1] = buf[buf.length - 1];
|
|
65892
|
-
return r.slice(0, -1);
|
|
65893
|
-
}
|
|
65894
|
-
}
|
|
65895
|
-
return r;
|
|
65896
|
-
}
|
|
65897
|
-
this.lastNeed = 1;
|
|
65898
|
-
this.lastTotal = 2;
|
|
65899
|
-
this.lastChar[0] = buf[buf.length - 1];
|
|
65900
|
-
return buf.toString("utf16le", i, buf.length - 1);
|
|
65901
|
-
}
|
|
65902
|
-
function utf16End(buf) {
|
|
65903
|
-
var r = buf && buf.length ? this.write(buf) : "";
|
|
65904
|
-
if (this.lastNeed) {
|
|
65905
|
-
var end = this.lastTotal - this.lastNeed;
|
|
65906
|
-
return r + this.lastChar.toString("utf16le", 0, end);
|
|
65907
|
-
}
|
|
65908
|
-
return r;
|
|
65909
|
-
}
|
|
65910
|
-
function base64Text(buf, i) {
|
|
65911
|
-
var n = (buf.length - i) % 3;
|
|
65912
|
-
if (n === 0)
|
|
65913
|
-
return buf.toString("base64", i);
|
|
65914
|
-
this.lastNeed = 3 - n;
|
|
65915
|
-
this.lastTotal = 3;
|
|
65916
|
-
if (n === 1) {
|
|
65917
|
-
this.lastChar[0] = buf[buf.length - 1];
|
|
65918
|
-
} else {
|
|
65919
|
-
this.lastChar[0] = buf[buf.length - 2];
|
|
65920
|
-
this.lastChar[1] = buf[buf.length - 1];
|
|
65921
|
-
}
|
|
65922
|
-
return buf.toString("base64", i, buf.length - n);
|
|
65923
|
-
}
|
|
65924
|
-
function base64End(buf) {
|
|
65925
|
-
var r = buf && buf.length ? this.write(buf) : "";
|
|
65926
|
-
if (this.lastNeed)
|
|
65927
|
-
return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed);
|
|
65928
|
-
return r;
|
|
65929
|
-
}
|
|
65930
|
-
function simpleWrite(buf) {
|
|
65931
|
-
return buf.toString(this.encoding);
|
|
65932
|
-
}
|
|
65933
|
-
function simpleEnd(buf) {
|
|
65934
|
-
return buf && buf.length ? this.write(buf) : "";
|
|
65935
|
-
}
|
|
65936
|
-
});
|
|
65937
|
-
|
|
65938
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
|
|
65939
|
-
var require_end_of_stream = __commonJS((exports, module) => {
|
|
65940
|
-
var ERR_STREAM_PREMATURE_CLOSE = require_errors().codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
65941
|
-
function once(callback) {
|
|
65942
|
-
var called = false;
|
|
65943
|
-
return function() {
|
|
65944
|
-
if (called)
|
|
65945
|
-
return;
|
|
65946
|
-
called = true;
|
|
65947
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0;_key < _len; _key++) {
|
|
65948
|
-
args[_key] = arguments[_key];
|
|
65949
|
-
}
|
|
65950
|
-
callback.apply(this, args);
|
|
65951
|
-
};
|
|
65952
|
-
}
|
|
65953
|
-
function noop() {}
|
|
65954
|
-
function isRequest(stream) {
|
|
65955
|
-
return stream.setHeader && typeof stream.abort === "function";
|
|
65956
|
-
}
|
|
65957
|
-
function eos(stream, opts, callback) {
|
|
65958
|
-
if (typeof opts === "function")
|
|
65959
|
-
return eos(stream, null, opts);
|
|
65960
|
-
if (!opts)
|
|
65961
|
-
opts = {};
|
|
65962
|
-
callback = once(callback || noop);
|
|
65963
|
-
var readable = opts.readable || opts.readable !== false && stream.readable;
|
|
65964
|
-
var writable = opts.writable || opts.writable !== false && stream.writable;
|
|
65965
|
-
var onlegacyfinish = function onlegacyfinish() {
|
|
65966
|
-
if (!stream.writable)
|
|
65967
|
-
onfinish();
|
|
65968
|
-
};
|
|
65969
|
-
var writableEnded = stream._writableState && stream._writableState.finished;
|
|
65970
|
-
var onfinish = function onfinish() {
|
|
65971
|
-
writable = false;
|
|
65972
|
-
writableEnded = true;
|
|
65973
|
-
if (!readable)
|
|
65974
|
-
callback.call(stream);
|
|
65975
|
-
};
|
|
65976
|
-
var readableEnded = stream._readableState && stream._readableState.endEmitted;
|
|
65977
|
-
var onend = function onend() {
|
|
65978
|
-
readable = false;
|
|
65979
|
-
readableEnded = true;
|
|
65980
|
-
if (!writable)
|
|
65981
|
-
callback.call(stream);
|
|
65982
|
-
};
|
|
65983
|
-
var onerror = function onerror(err) {
|
|
65984
|
-
callback.call(stream, err);
|
|
65985
|
-
};
|
|
65986
|
-
var onclose = function onclose() {
|
|
65987
|
-
var err;
|
|
65988
|
-
if (readable && !readableEnded) {
|
|
65989
|
-
if (!stream._readableState || !stream._readableState.ended)
|
|
65990
|
-
err = new ERR_STREAM_PREMATURE_CLOSE;
|
|
65991
|
-
return callback.call(stream, err);
|
|
65992
|
-
}
|
|
65993
|
-
if (writable && !writableEnded) {
|
|
65994
|
-
if (!stream._writableState || !stream._writableState.ended)
|
|
65995
|
-
err = new ERR_STREAM_PREMATURE_CLOSE;
|
|
65996
|
-
return callback.call(stream, err);
|
|
65997
|
-
}
|
|
65998
|
-
};
|
|
65999
|
-
var onrequest = function onrequest() {
|
|
66000
|
-
stream.req.on("finish", onfinish);
|
|
66001
|
-
};
|
|
66002
|
-
if (isRequest(stream)) {
|
|
66003
|
-
stream.on("complete", onfinish);
|
|
66004
|
-
stream.on("abort", onclose);
|
|
66005
|
-
if (stream.req)
|
|
66006
|
-
onrequest();
|
|
66007
|
-
else
|
|
66008
|
-
stream.on("request", onrequest);
|
|
66009
|
-
} else if (writable && !stream._writableState) {
|
|
66010
|
-
stream.on("end", onlegacyfinish);
|
|
66011
|
-
stream.on("close", onlegacyfinish);
|
|
66012
|
-
}
|
|
66013
|
-
stream.on("end", onend);
|
|
66014
|
-
stream.on("finish", onfinish);
|
|
66015
|
-
if (opts.error !== false)
|
|
66016
|
-
stream.on("error", onerror);
|
|
66017
|
-
stream.on("close", onclose);
|
|
66018
|
-
return function() {
|
|
66019
|
-
stream.removeListener("complete", onfinish);
|
|
66020
|
-
stream.removeListener("abort", onclose);
|
|
66021
|
-
stream.removeListener("request", onrequest);
|
|
66022
|
-
if (stream.req)
|
|
66023
|
-
stream.req.removeListener("finish", onfinish);
|
|
66024
|
-
stream.removeListener("end", onlegacyfinish);
|
|
66025
|
-
stream.removeListener("close", onlegacyfinish);
|
|
66026
|
-
stream.removeListener("finish", onfinish);
|
|
66027
|
-
stream.removeListener("end", onend);
|
|
66028
|
-
stream.removeListener("error", onerror);
|
|
66029
|
-
stream.removeListener("close", onclose);
|
|
66030
|
-
};
|
|
66031
|
-
}
|
|
66032
|
-
module.exports = eos;
|
|
66033
|
-
});
|
|
66034
|
-
|
|
66035
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/internal/streams/async_iterator.js
|
|
66036
|
-
var require_async_iterator = __commonJS((exports, module) => {
|
|
66037
|
-
var _Object$setPrototypeO;
|
|
66038
|
-
function _defineProperty(obj, key, value) {
|
|
66039
|
-
key = _toPropertyKey(key);
|
|
66040
|
-
if (key in obj) {
|
|
66041
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
66042
|
-
} else {
|
|
66043
|
-
obj[key] = value;
|
|
66044
|
-
}
|
|
66045
|
-
return obj;
|
|
66046
|
-
}
|
|
66047
|
-
function _toPropertyKey(arg) {
|
|
66048
|
-
var key = _toPrimitive(arg, "string");
|
|
66049
|
-
return typeof key === "symbol" ? key : String(key);
|
|
66050
|
-
}
|
|
66051
|
-
function _toPrimitive(input, hint) {
|
|
66052
|
-
if (typeof input !== "object" || input === null)
|
|
66053
|
-
return input;
|
|
66054
|
-
var prim = input[Symbol.toPrimitive];
|
|
66055
|
-
if (prim !== undefined) {
|
|
66056
|
-
var res = prim.call(input, hint || "default");
|
|
66057
|
-
if (typeof res !== "object")
|
|
66058
|
-
return res;
|
|
66059
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
66060
|
-
}
|
|
66061
|
-
return (hint === "string" ? String : Number)(input);
|
|
66062
|
-
}
|
|
66063
|
-
var finished = require_end_of_stream();
|
|
66064
|
-
var kLastResolve = Symbol("lastResolve");
|
|
66065
|
-
var kLastReject = Symbol("lastReject");
|
|
66066
|
-
var kError = Symbol("error");
|
|
66067
|
-
var kEnded = Symbol("ended");
|
|
66068
|
-
var kLastPromise = Symbol("lastPromise");
|
|
66069
|
-
var kHandlePromise = Symbol("handlePromise");
|
|
66070
|
-
var kStream = Symbol("stream");
|
|
66071
|
-
function createIterResult(value, done) {
|
|
66072
|
-
return {
|
|
66073
|
-
value,
|
|
66074
|
-
done
|
|
66075
|
-
};
|
|
66076
|
-
}
|
|
66077
|
-
function readAndResolve(iter) {
|
|
66078
|
-
var resolve3 = iter[kLastResolve];
|
|
66079
|
-
if (resolve3 !== null) {
|
|
66080
|
-
var data2 = iter[kStream].read();
|
|
66081
|
-
if (data2 !== null) {
|
|
66082
|
-
iter[kLastPromise] = null;
|
|
66083
|
-
iter[kLastResolve] = null;
|
|
66084
|
-
iter[kLastReject] = null;
|
|
66085
|
-
resolve3(createIterResult(data2, false));
|
|
66086
|
-
}
|
|
66087
|
-
}
|
|
66088
|
-
}
|
|
66089
|
-
function onReadable(iter) {
|
|
66090
|
-
process.nextTick(readAndResolve, iter);
|
|
66091
|
-
}
|
|
66092
|
-
function wrapForNext(lastPromise, iter) {
|
|
66093
|
-
return function(resolve3, reject) {
|
|
66094
|
-
lastPromise.then(function() {
|
|
66095
|
-
if (iter[kEnded]) {
|
|
66096
|
-
resolve3(createIterResult(undefined, true));
|
|
66097
|
-
return;
|
|
66098
|
-
}
|
|
66099
|
-
iter[kHandlePromise](resolve3, reject);
|
|
66100
|
-
}, reject);
|
|
66101
|
-
};
|
|
66102
|
-
}
|
|
66103
|
-
var AsyncIteratorPrototype = Object.getPrototypeOf(function() {});
|
|
66104
|
-
var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
|
|
66105
|
-
get stream() {
|
|
66106
|
-
return this[kStream];
|
|
66107
|
-
},
|
|
66108
|
-
next: function next() {
|
|
66109
|
-
var _this = this;
|
|
66110
|
-
var error5 = this[kError];
|
|
66111
|
-
if (error5 !== null) {
|
|
66112
|
-
return Promise.reject(error5);
|
|
66113
|
-
}
|
|
66114
|
-
if (this[kEnded]) {
|
|
66115
|
-
return Promise.resolve(createIterResult(undefined, true));
|
|
66116
|
-
}
|
|
66117
|
-
if (this[kStream].destroyed) {
|
|
66118
|
-
return new Promise(function(resolve3, reject) {
|
|
66119
|
-
process.nextTick(function() {
|
|
66120
|
-
if (_this[kError]) {
|
|
66121
|
-
reject(_this[kError]);
|
|
66122
|
-
} else {
|
|
66123
|
-
resolve3(createIterResult(undefined, true));
|
|
66124
|
-
}
|
|
66125
|
-
});
|
|
66126
|
-
});
|
|
66127
|
-
}
|
|
66128
|
-
var lastPromise = this[kLastPromise];
|
|
66129
|
-
var promise2;
|
|
66130
|
-
if (lastPromise) {
|
|
66131
|
-
promise2 = new Promise(wrapForNext(lastPromise, this));
|
|
66132
|
-
} else {
|
|
66133
|
-
var data2 = this[kStream].read();
|
|
66134
|
-
if (data2 !== null) {
|
|
66135
|
-
return Promise.resolve(createIterResult(data2, false));
|
|
66136
|
-
}
|
|
66137
|
-
promise2 = new Promise(this[kHandlePromise]);
|
|
66138
|
-
}
|
|
66139
|
-
this[kLastPromise] = promise2;
|
|
66140
|
-
return promise2;
|
|
66141
|
-
}
|
|
66142
|
-
}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() {
|
|
66143
|
-
return this;
|
|
66144
|
-
}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
|
|
66145
|
-
var _this2 = this;
|
|
66146
|
-
return new Promise(function(resolve3, reject) {
|
|
66147
|
-
_this2[kStream].destroy(null, function(err) {
|
|
66148
|
-
if (err) {
|
|
66149
|
-
reject(err);
|
|
66150
|
-
return;
|
|
66151
|
-
}
|
|
66152
|
-
resolve3(createIterResult(undefined, true));
|
|
66153
|
-
});
|
|
66154
|
-
});
|
|
66155
|
-
}), _Object$setPrototypeO), AsyncIteratorPrototype);
|
|
66156
|
-
var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {
|
|
66157
|
-
var _Object$create;
|
|
66158
|
-
var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
|
|
66159
|
-
value: stream,
|
|
66160
|
-
writable: true
|
|
66161
|
-
}), _defineProperty(_Object$create, kLastResolve, {
|
|
66162
|
-
value: null,
|
|
66163
|
-
writable: true
|
|
66164
|
-
}), _defineProperty(_Object$create, kLastReject, {
|
|
66165
|
-
value: null,
|
|
66166
|
-
writable: true
|
|
66167
|
-
}), _defineProperty(_Object$create, kError, {
|
|
66168
|
-
value: null,
|
|
66169
|
-
writable: true
|
|
66170
|
-
}), _defineProperty(_Object$create, kEnded, {
|
|
66171
|
-
value: stream._readableState.endEmitted,
|
|
66172
|
-
writable: true
|
|
66173
|
-
}), _defineProperty(_Object$create, kHandlePromise, {
|
|
66174
|
-
value: function value(resolve3, reject) {
|
|
66175
|
-
var data2 = iterator[kStream].read();
|
|
66176
|
-
if (data2) {
|
|
66177
|
-
iterator[kLastPromise] = null;
|
|
66178
|
-
iterator[kLastResolve] = null;
|
|
66179
|
-
iterator[kLastReject] = null;
|
|
66180
|
-
resolve3(createIterResult(data2, false));
|
|
66181
|
-
} else {
|
|
66182
|
-
iterator[kLastResolve] = resolve3;
|
|
66183
|
-
iterator[kLastReject] = reject;
|
|
66184
|
-
}
|
|
66185
|
-
},
|
|
66186
|
-
writable: true
|
|
66187
|
-
}), _Object$create));
|
|
66188
|
-
iterator[kLastPromise] = null;
|
|
66189
|
-
finished(stream, function(err) {
|
|
66190
|
-
if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
|
|
66191
|
-
var reject = iterator[kLastReject];
|
|
66192
|
-
if (reject !== null) {
|
|
66193
|
-
iterator[kLastPromise] = null;
|
|
66194
|
-
iterator[kLastResolve] = null;
|
|
66195
|
-
iterator[kLastReject] = null;
|
|
66196
|
-
reject(err);
|
|
66197
|
-
}
|
|
66198
|
-
iterator[kError] = err;
|
|
66199
|
-
return;
|
|
66200
|
-
}
|
|
66201
|
-
var resolve3 = iterator[kLastResolve];
|
|
66202
|
-
if (resolve3 !== null) {
|
|
66203
|
-
iterator[kLastPromise] = null;
|
|
66204
|
-
iterator[kLastResolve] = null;
|
|
66205
|
-
iterator[kLastReject] = null;
|
|
66206
|
-
resolve3(createIterResult(undefined, true));
|
|
66207
|
-
}
|
|
66208
|
-
iterator[kEnded] = true;
|
|
66209
|
-
});
|
|
66210
|
-
stream.on("readable", onReadable.bind(null, iterator));
|
|
66211
|
-
return iterator;
|
|
66212
|
-
};
|
|
66213
|
-
module.exports = createReadableStreamAsyncIterator;
|
|
66214
|
-
});
|
|
66215
|
-
|
|
66216
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/internal/streams/from.js
|
|
66217
|
-
var require_from = __commonJS((exports, module) => {
|
|
66218
|
-
function asyncGeneratorStep(gen, resolve3, reject, _next, _throw, key, arg) {
|
|
66219
|
-
try {
|
|
66220
|
-
var info2 = gen[key](arg);
|
|
66221
|
-
var value = info2.value;
|
|
66222
|
-
} catch (error5) {
|
|
66223
|
-
reject(error5);
|
|
66224
|
-
return;
|
|
66225
|
-
}
|
|
66226
|
-
if (info2.done) {
|
|
66227
|
-
resolve3(value);
|
|
66228
|
-
} else {
|
|
66229
|
-
Promise.resolve(value).then(_next, _throw);
|
|
66230
|
-
}
|
|
66231
|
-
}
|
|
66232
|
-
function _asyncToGenerator(fn) {
|
|
66233
|
-
return function() {
|
|
66234
|
-
var self2 = this, args = arguments;
|
|
66235
|
-
return new Promise(function(resolve3, reject) {
|
|
66236
|
-
var gen = fn.apply(self2, args);
|
|
66237
|
-
function _next(value) {
|
|
66238
|
-
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "next", value);
|
|
66239
|
-
}
|
|
66240
|
-
function _throw(err) {
|
|
66241
|
-
asyncGeneratorStep(gen, resolve3, reject, _next, _throw, "throw", err);
|
|
66242
|
-
}
|
|
66243
|
-
_next(undefined);
|
|
66244
|
-
});
|
|
66245
|
-
};
|
|
66246
|
-
}
|
|
66247
|
-
function ownKeys(object2, enumerableOnly) {
|
|
66248
|
-
var keys2 = Object.keys(object2);
|
|
66249
|
-
if (Object.getOwnPropertySymbols) {
|
|
66250
|
-
var symbols = Object.getOwnPropertySymbols(object2);
|
|
66251
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
66252
|
-
return Object.getOwnPropertyDescriptor(object2, sym).enumerable;
|
|
66253
|
-
})), keys2.push.apply(keys2, symbols);
|
|
66254
|
-
}
|
|
66255
|
-
return keys2;
|
|
66256
|
-
}
|
|
66257
|
-
function _objectSpread(target) {
|
|
66258
|
-
for (var i = 1;i < arguments.length; i++) {
|
|
66259
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
66260
|
-
i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
|
|
66261
|
-
_defineProperty(target, key, source[key]);
|
|
66262
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
66263
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
66264
|
-
});
|
|
66265
|
-
}
|
|
66266
|
-
return target;
|
|
66267
|
-
}
|
|
66268
|
-
function _defineProperty(obj, key, value) {
|
|
66269
|
-
key = _toPropertyKey(key);
|
|
66270
|
-
if (key in obj) {
|
|
66271
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
66272
|
-
} else {
|
|
66273
|
-
obj[key] = value;
|
|
66274
|
-
}
|
|
66275
|
-
return obj;
|
|
66276
|
-
}
|
|
66277
|
-
function _toPropertyKey(arg) {
|
|
66278
|
-
var key = _toPrimitive(arg, "string");
|
|
66279
|
-
return typeof key === "symbol" ? key : String(key);
|
|
66280
|
-
}
|
|
66281
|
-
function _toPrimitive(input, hint) {
|
|
66282
|
-
if (typeof input !== "object" || input === null)
|
|
66283
|
-
return input;
|
|
66284
|
-
var prim = input[Symbol.toPrimitive];
|
|
66285
|
-
if (prim !== undefined) {
|
|
66286
|
-
var res = prim.call(input, hint || "default");
|
|
66287
|
-
if (typeof res !== "object")
|
|
66288
|
-
return res;
|
|
66289
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
66290
|
-
}
|
|
66291
|
-
return (hint === "string" ? String : Number)(input);
|
|
66292
|
-
}
|
|
66293
|
-
var ERR_INVALID_ARG_TYPE = require_errors().codes.ERR_INVALID_ARG_TYPE;
|
|
66294
|
-
function from(Readable2, iterable, opts) {
|
|
66295
|
-
var iterator;
|
|
66296
|
-
if (iterable && typeof iterable.next === "function") {
|
|
66297
|
-
iterator = iterable;
|
|
66298
|
-
} else if (iterable && iterable[Symbol.asyncIterator])
|
|
66299
|
-
iterator = iterable[Symbol.asyncIterator]();
|
|
66300
|
-
else if (iterable && iterable[Symbol.iterator])
|
|
66301
|
-
iterator = iterable[Symbol.iterator]();
|
|
66302
|
-
else
|
|
66303
|
-
throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable);
|
|
66304
|
-
var readable = new Readable2(_objectSpread({
|
|
66305
|
-
objectMode: true
|
|
66306
|
-
}, opts));
|
|
66307
|
-
var reading = false;
|
|
66308
|
-
readable._read = function() {
|
|
66309
|
-
if (!reading) {
|
|
66310
|
-
reading = true;
|
|
66311
|
-
next();
|
|
66312
|
-
}
|
|
66313
|
-
};
|
|
66314
|
-
function next() {
|
|
66315
|
-
return _next2.apply(this, arguments);
|
|
66316
|
-
}
|
|
66317
|
-
function _next2() {
|
|
66318
|
-
_next2 = _asyncToGenerator(function* () {
|
|
66319
|
-
try {
|
|
66320
|
-
var _yield$iterator$next = yield iterator.next(), value = _yield$iterator$next.value, done = _yield$iterator$next.done;
|
|
66321
|
-
if (done) {
|
|
66322
|
-
readable.push(null);
|
|
66323
|
-
} else if (readable.push(yield value)) {
|
|
66324
|
-
next();
|
|
66325
|
-
} else {
|
|
66326
|
-
reading = false;
|
|
66327
|
-
}
|
|
66328
|
-
} catch (err) {
|
|
66329
|
-
readable.destroy(err);
|
|
66330
|
-
}
|
|
66331
|
-
});
|
|
66332
|
-
return _next2.apply(this, arguments);
|
|
66333
|
-
}
|
|
66334
|
-
return readable;
|
|
66335
|
-
}
|
|
66336
|
-
module.exports = from;
|
|
66337
|
-
});
|
|
66338
|
-
|
|
66339
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/_stream_readable.js
|
|
66340
|
-
var require__stream_readable = __commonJS((exports, module) => {
|
|
66341
|
-
module.exports = Readable2;
|
|
66342
|
-
var Duplex;
|
|
66343
|
-
Readable2.ReadableState = ReadableState;
|
|
66344
|
-
var EE = __require("events").EventEmitter;
|
|
66345
|
-
var EElistenerCount = function EElistenerCount(emitter, type) {
|
|
66346
|
-
return emitter.listeners(type).length;
|
|
66347
|
-
};
|
|
66348
|
-
var Stream = __require("stream");
|
|
66349
|
-
var Buffer2 = __require("buffer").Buffer;
|
|
66350
|
-
var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {};
|
|
66351
|
-
function _uint8ArrayToBuffer(chunk) {
|
|
66352
|
-
return Buffer2.from(chunk);
|
|
66353
|
-
}
|
|
66354
|
-
function _isUint8Array(obj) {
|
|
66355
|
-
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
|
66356
|
-
}
|
|
66357
|
-
var debugUtil = __require("util");
|
|
66358
|
-
var debug5;
|
|
66359
|
-
if (debugUtil && debugUtil.debuglog) {
|
|
66360
|
-
debug5 = debugUtil.debuglog("stream");
|
|
66361
|
-
} else {
|
|
66362
|
-
debug5 = function debug() {};
|
|
66363
|
-
}
|
|
66364
|
-
var BufferList = require_buffer_list();
|
|
66365
|
-
var destroyImpl = require_destroy();
|
|
66366
|
-
var _require = require_state();
|
|
66367
|
-
var getHighWaterMark = _require.getHighWaterMark;
|
|
66368
|
-
var _require$codes = require_errors().codes;
|
|
66369
|
-
var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
|
|
66370
|
-
var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF;
|
|
66371
|
-
var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
|
|
66372
|
-
var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
66373
|
-
var StringDecoder;
|
|
66374
|
-
var createReadableStreamAsyncIterator;
|
|
66375
|
-
var from;
|
|
66376
|
-
require_inherits()(Readable2, Stream);
|
|
66377
|
-
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
66378
|
-
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
66379
|
-
function prependListener(emitter, event, fn) {
|
|
66380
|
-
if (typeof emitter.prependListener === "function")
|
|
66381
|
-
return emitter.prependListener(event, fn);
|
|
66382
|
-
if (!emitter._events || !emitter._events[event])
|
|
66383
|
-
emitter.on(event, fn);
|
|
66384
|
-
else if (Array.isArray(emitter._events[event]))
|
|
66385
|
-
emitter._events[event].unshift(fn);
|
|
66386
|
-
else
|
|
66387
|
-
emitter._events[event] = [fn, emitter._events[event]];
|
|
66388
|
-
}
|
|
66389
|
-
function ReadableState(options, stream, isDuplex) {
|
|
66390
|
-
Duplex = Duplex || require__stream_duplex();
|
|
66391
|
-
options = options || {};
|
|
66392
|
-
if (typeof isDuplex !== "boolean")
|
|
66393
|
-
isDuplex = stream instanceof Duplex;
|
|
66394
|
-
this.objectMode = !!options.objectMode;
|
|
66395
|
-
if (isDuplex)
|
|
66396
|
-
this.objectMode = this.objectMode || !!options.readableObjectMode;
|
|
66397
|
-
this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex);
|
|
66398
|
-
this.buffer = new BufferList;
|
|
66399
|
-
this.length = 0;
|
|
66400
|
-
this.pipes = null;
|
|
66401
|
-
this.pipesCount = 0;
|
|
66402
|
-
this.flowing = null;
|
|
66403
|
-
this.ended = false;
|
|
66404
|
-
this.endEmitted = false;
|
|
66405
|
-
this.reading = false;
|
|
66406
|
-
this.sync = true;
|
|
66407
|
-
this.needReadable = false;
|
|
66408
|
-
this.emittedReadable = false;
|
|
66409
|
-
this.readableListening = false;
|
|
66410
|
-
this.resumeScheduled = false;
|
|
66411
|
-
this.paused = true;
|
|
66412
|
-
this.emitClose = options.emitClose !== false;
|
|
66413
|
-
this.autoDestroy = !!options.autoDestroy;
|
|
66414
|
-
this.destroyed = false;
|
|
66415
|
-
this.defaultEncoding = options.defaultEncoding || "utf8";
|
|
66416
|
-
this.awaitDrain = 0;
|
|
66417
|
-
this.readingMore = false;
|
|
66418
|
-
this.decoder = null;
|
|
66419
|
-
this.encoding = null;
|
|
66420
|
-
if (options.encoding) {
|
|
66421
|
-
if (!StringDecoder)
|
|
66422
|
-
StringDecoder = require_string_decoder().StringDecoder;
|
|
66423
|
-
this.decoder = new StringDecoder(options.encoding);
|
|
66424
|
-
this.encoding = options.encoding;
|
|
66425
|
-
}
|
|
66426
|
-
}
|
|
66427
|
-
function Readable2(options) {
|
|
66428
|
-
Duplex = Duplex || require__stream_duplex();
|
|
66429
|
-
if (!(this instanceof Readable2))
|
|
66430
|
-
return new Readable2(options);
|
|
66431
|
-
var isDuplex = this instanceof Duplex;
|
|
66432
|
-
this._readableState = new ReadableState(options, this, isDuplex);
|
|
66433
|
-
this.readable = true;
|
|
66434
|
-
if (options) {
|
|
66435
|
-
if (typeof options.read === "function")
|
|
66436
|
-
this._read = options.read;
|
|
66437
|
-
if (typeof options.destroy === "function")
|
|
66438
|
-
this._destroy = options.destroy;
|
|
66439
|
-
}
|
|
66440
|
-
Stream.call(this);
|
|
66441
|
-
}
|
|
66442
|
-
Object.defineProperty(Readable2.prototype, "destroyed", {
|
|
66443
|
-
enumerable: false,
|
|
66444
|
-
get: function get() {
|
|
66445
|
-
if (this._readableState === undefined) {
|
|
66446
|
-
return false;
|
|
66447
|
-
}
|
|
66448
|
-
return this._readableState.destroyed;
|
|
66449
|
-
},
|
|
66450
|
-
set: function set(value) {
|
|
66451
|
-
if (!this._readableState) {
|
|
66452
|
-
return;
|
|
66453
|
-
}
|
|
66454
|
-
this._readableState.destroyed = value;
|
|
66455
|
-
}
|
|
66456
|
-
});
|
|
66457
|
-
Readable2.prototype.destroy = destroyImpl.destroy;
|
|
66458
|
-
Readable2.prototype._undestroy = destroyImpl.undestroy;
|
|
66459
|
-
Readable2.prototype._destroy = function(err, cb) {
|
|
66460
|
-
cb(err);
|
|
66461
|
-
};
|
|
66462
|
-
Readable2.prototype.push = function(chunk, encoding) {
|
|
66463
|
-
var state2 = this._readableState;
|
|
66464
|
-
var skipChunkCheck;
|
|
66465
|
-
if (!state2.objectMode) {
|
|
66466
|
-
if (typeof chunk === "string") {
|
|
66467
|
-
encoding = encoding || state2.defaultEncoding;
|
|
66468
|
-
if (encoding !== state2.encoding) {
|
|
66469
|
-
chunk = Buffer2.from(chunk, encoding);
|
|
66470
|
-
encoding = "";
|
|
66471
|
-
}
|
|
66472
|
-
skipChunkCheck = true;
|
|
66473
|
-
}
|
|
66474
|
-
} else {
|
|
66475
|
-
skipChunkCheck = true;
|
|
66476
|
-
}
|
|
66477
|
-
return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
|
|
66478
|
-
};
|
|
66479
|
-
Readable2.prototype.unshift = function(chunk) {
|
|
66480
|
-
return readableAddChunk(this, chunk, null, true, false);
|
|
66481
|
-
};
|
|
66482
|
-
function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
|
|
66483
|
-
debug5("readableAddChunk", chunk);
|
|
66484
|
-
var state2 = stream._readableState;
|
|
66485
|
-
if (chunk === null) {
|
|
66486
|
-
state2.reading = false;
|
|
66487
|
-
onEofChunk(stream, state2);
|
|
66488
|
-
} else {
|
|
66489
|
-
var er;
|
|
66490
|
-
if (!skipChunkCheck)
|
|
66491
|
-
er = chunkInvalid(state2, chunk);
|
|
66492
|
-
if (er) {
|
|
66493
|
-
errorOrDestroy(stream, er);
|
|
66494
|
-
} else if (state2.objectMode || chunk && chunk.length > 0) {
|
|
66495
|
-
if (typeof chunk !== "string" && !state2.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) {
|
|
66496
|
-
chunk = _uint8ArrayToBuffer(chunk);
|
|
66497
|
-
}
|
|
66498
|
-
if (addToFront) {
|
|
66499
|
-
if (state2.endEmitted)
|
|
66500
|
-
errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT);
|
|
66501
|
-
else
|
|
66502
|
-
addChunk(stream, state2, chunk, true);
|
|
66503
|
-
} else if (state2.ended) {
|
|
66504
|
-
errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF);
|
|
66505
|
-
} else if (state2.destroyed) {
|
|
66506
|
-
return false;
|
|
66507
|
-
} else {
|
|
66508
|
-
state2.reading = false;
|
|
66509
|
-
if (state2.decoder && !encoding) {
|
|
66510
|
-
chunk = state2.decoder.write(chunk);
|
|
66511
|
-
if (state2.objectMode || chunk.length !== 0)
|
|
66512
|
-
addChunk(stream, state2, chunk, false);
|
|
66513
|
-
else
|
|
66514
|
-
maybeReadMore(stream, state2);
|
|
66515
|
-
} else {
|
|
66516
|
-
addChunk(stream, state2, chunk, false);
|
|
66517
|
-
}
|
|
66518
|
-
}
|
|
66519
|
-
} else if (!addToFront) {
|
|
66520
|
-
state2.reading = false;
|
|
66521
|
-
maybeReadMore(stream, state2);
|
|
66522
|
-
}
|
|
66523
|
-
}
|
|
66524
|
-
return !state2.ended && (state2.length < state2.highWaterMark || state2.length === 0);
|
|
66525
|
-
}
|
|
66526
|
-
function addChunk(stream, state2, chunk, addToFront) {
|
|
66527
|
-
if (state2.flowing && state2.length === 0 && !state2.sync) {
|
|
66528
|
-
state2.awaitDrain = 0;
|
|
66529
|
-
stream.emit("data", chunk);
|
|
66530
|
-
} else {
|
|
66531
|
-
state2.length += state2.objectMode ? 1 : chunk.length;
|
|
66532
|
-
if (addToFront)
|
|
66533
|
-
state2.buffer.unshift(chunk);
|
|
66534
|
-
else
|
|
66535
|
-
state2.buffer.push(chunk);
|
|
66536
|
-
if (state2.needReadable)
|
|
66537
|
-
emitReadable(stream);
|
|
66538
|
-
}
|
|
66539
|
-
maybeReadMore(stream, state2);
|
|
66540
|
-
}
|
|
66541
|
-
function chunkInvalid(state2, chunk) {
|
|
66542
|
-
var er;
|
|
66543
|
-
if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== undefined && !state2.objectMode) {
|
|
66544
|
-
er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk);
|
|
66545
|
-
}
|
|
66546
|
-
return er;
|
|
66547
|
-
}
|
|
66548
|
-
Readable2.prototype.isPaused = function() {
|
|
66549
|
-
return this._readableState.flowing === false;
|
|
66550
|
-
};
|
|
66551
|
-
Readable2.prototype.setEncoding = function(enc) {
|
|
66552
|
-
if (!StringDecoder)
|
|
66553
|
-
StringDecoder = require_string_decoder().StringDecoder;
|
|
66554
|
-
var decoder = new StringDecoder(enc);
|
|
66555
|
-
this._readableState.decoder = decoder;
|
|
66556
|
-
this._readableState.encoding = this._readableState.decoder.encoding;
|
|
66557
|
-
var p = this._readableState.buffer.head;
|
|
66558
|
-
var content = "";
|
|
66559
|
-
while (p !== null) {
|
|
66560
|
-
content += decoder.write(p.data);
|
|
66561
|
-
p = p.next;
|
|
66562
|
-
}
|
|
66563
|
-
this._readableState.buffer.clear();
|
|
66564
|
-
if (content !== "")
|
|
66565
|
-
this._readableState.buffer.push(content);
|
|
66566
|
-
this._readableState.length = content.length;
|
|
66567
|
-
return this;
|
|
66568
|
-
};
|
|
66569
|
-
var MAX_HWM = 1073741824;
|
|
66570
|
-
function computeNewHighWaterMark(n) {
|
|
66571
|
-
if (n >= MAX_HWM) {
|
|
66572
|
-
n = MAX_HWM;
|
|
66573
|
-
} else {
|
|
66574
|
-
n--;
|
|
66575
|
-
n |= n >>> 1;
|
|
66576
|
-
n |= n >>> 2;
|
|
66577
|
-
n |= n >>> 4;
|
|
66578
|
-
n |= n >>> 8;
|
|
66579
|
-
n |= n >>> 16;
|
|
66580
|
-
n++;
|
|
66581
|
-
}
|
|
66582
|
-
return n;
|
|
66583
|
-
}
|
|
66584
|
-
function howMuchToRead(n, state2) {
|
|
66585
|
-
if (n <= 0 || state2.length === 0 && state2.ended)
|
|
66586
|
-
return 0;
|
|
66587
|
-
if (state2.objectMode)
|
|
66588
|
-
return 1;
|
|
66589
|
-
if (n !== n) {
|
|
66590
|
-
if (state2.flowing && state2.length)
|
|
66591
|
-
return state2.buffer.head.data.length;
|
|
66592
|
-
else
|
|
66593
|
-
return state2.length;
|
|
66594
|
-
}
|
|
66595
|
-
if (n > state2.highWaterMark)
|
|
66596
|
-
state2.highWaterMark = computeNewHighWaterMark(n);
|
|
66597
|
-
if (n <= state2.length)
|
|
66598
|
-
return n;
|
|
66599
|
-
if (!state2.ended) {
|
|
66600
|
-
state2.needReadable = true;
|
|
66601
|
-
return 0;
|
|
66602
|
-
}
|
|
66603
|
-
return state2.length;
|
|
66604
|
-
}
|
|
66605
|
-
Readable2.prototype.read = function(n) {
|
|
66606
|
-
debug5("read", n);
|
|
66607
|
-
n = parseInt(n, 10);
|
|
66608
|
-
var state2 = this._readableState;
|
|
66609
|
-
var nOrig = n;
|
|
66610
|
-
if (n !== 0)
|
|
66611
|
-
state2.emittedReadable = false;
|
|
66612
|
-
if (n === 0 && state2.needReadable && ((state2.highWaterMark !== 0 ? state2.length >= state2.highWaterMark : state2.length > 0) || state2.ended)) {
|
|
66613
|
-
debug5("read: emitReadable", state2.length, state2.ended);
|
|
66614
|
-
if (state2.length === 0 && state2.ended)
|
|
66615
|
-
endReadable(this);
|
|
66616
|
-
else
|
|
66617
|
-
emitReadable(this);
|
|
66618
|
-
return null;
|
|
66619
|
-
}
|
|
66620
|
-
n = howMuchToRead(n, state2);
|
|
66621
|
-
if (n === 0 && state2.ended) {
|
|
66622
|
-
if (state2.length === 0)
|
|
66623
|
-
endReadable(this);
|
|
66624
|
-
return null;
|
|
66625
|
-
}
|
|
66626
|
-
var doRead = state2.needReadable;
|
|
66627
|
-
debug5("need readable", doRead);
|
|
66628
|
-
if (state2.length === 0 || state2.length - n < state2.highWaterMark) {
|
|
66629
|
-
doRead = true;
|
|
66630
|
-
debug5("length less than watermark", doRead);
|
|
66631
|
-
}
|
|
66632
|
-
if (state2.ended || state2.reading) {
|
|
66633
|
-
doRead = false;
|
|
66634
|
-
debug5("reading or ended", doRead);
|
|
66635
|
-
} else if (doRead) {
|
|
66636
|
-
debug5("do read");
|
|
66637
|
-
state2.reading = true;
|
|
66638
|
-
state2.sync = true;
|
|
66639
|
-
if (state2.length === 0)
|
|
66640
|
-
state2.needReadable = true;
|
|
66641
|
-
this._read(state2.highWaterMark);
|
|
66642
|
-
state2.sync = false;
|
|
66643
|
-
if (!state2.reading)
|
|
66644
|
-
n = howMuchToRead(nOrig, state2);
|
|
66645
|
-
}
|
|
66646
|
-
var ret;
|
|
66647
|
-
if (n > 0)
|
|
66648
|
-
ret = fromList(n, state2);
|
|
66649
|
-
else
|
|
66650
|
-
ret = null;
|
|
66651
|
-
if (ret === null) {
|
|
66652
|
-
state2.needReadable = state2.length <= state2.highWaterMark;
|
|
66653
|
-
n = 0;
|
|
66654
|
-
} else {
|
|
66655
|
-
state2.length -= n;
|
|
66656
|
-
state2.awaitDrain = 0;
|
|
66657
|
-
}
|
|
66658
|
-
if (state2.length === 0) {
|
|
66659
|
-
if (!state2.ended)
|
|
66660
|
-
state2.needReadable = true;
|
|
66661
|
-
if (nOrig !== n && state2.ended)
|
|
66662
|
-
endReadable(this);
|
|
66663
|
-
}
|
|
66664
|
-
if (ret !== null)
|
|
66665
|
-
this.emit("data", ret);
|
|
66666
|
-
return ret;
|
|
66667
|
-
};
|
|
66668
|
-
function onEofChunk(stream, state2) {
|
|
66669
|
-
debug5("onEofChunk");
|
|
66670
|
-
if (state2.ended)
|
|
66671
|
-
return;
|
|
66672
|
-
if (state2.decoder) {
|
|
66673
|
-
var chunk = state2.decoder.end();
|
|
66674
|
-
if (chunk && chunk.length) {
|
|
66675
|
-
state2.buffer.push(chunk);
|
|
66676
|
-
state2.length += state2.objectMode ? 1 : chunk.length;
|
|
66677
|
-
}
|
|
66678
|
-
}
|
|
66679
|
-
state2.ended = true;
|
|
66680
|
-
if (state2.sync) {
|
|
66681
|
-
emitReadable(stream);
|
|
66682
|
-
} else {
|
|
66683
|
-
state2.needReadable = false;
|
|
66684
|
-
if (!state2.emittedReadable) {
|
|
66685
|
-
state2.emittedReadable = true;
|
|
66686
|
-
emitReadable_(stream);
|
|
66687
|
-
}
|
|
66688
|
-
}
|
|
66689
|
-
}
|
|
66690
|
-
function emitReadable(stream) {
|
|
66691
|
-
var state2 = stream._readableState;
|
|
66692
|
-
debug5("emitReadable", state2.needReadable, state2.emittedReadable);
|
|
66693
|
-
state2.needReadable = false;
|
|
66694
|
-
if (!state2.emittedReadable) {
|
|
66695
|
-
debug5("emitReadable", state2.flowing);
|
|
66696
|
-
state2.emittedReadable = true;
|
|
66697
|
-
process.nextTick(emitReadable_, stream);
|
|
66698
|
-
}
|
|
66699
|
-
}
|
|
66700
|
-
function emitReadable_(stream) {
|
|
66701
|
-
var state2 = stream._readableState;
|
|
66702
|
-
debug5("emitReadable_", state2.destroyed, state2.length, state2.ended);
|
|
66703
|
-
if (!state2.destroyed && (state2.length || state2.ended)) {
|
|
66704
|
-
stream.emit("readable");
|
|
66705
|
-
state2.emittedReadable = false;
|
|
66706
|
-
}
|
|
66707
|
-
state2.needReadable = !state2.flowing && !state2.ended && state2.length <= state2.highWaterMark;
|
|
66708
|
-
flow(stream);
|
|
66709
|
-
}
|
|
66710
|
-
function maybeReadMore(stream, state2) {
|
|
66711
|
-
if (!state2.readingMore) {
|
|
66712
|
-
state2.readingMore = true;
|
|
66713
|
-
process.nextTick(maybeReadMore_, stream, state2);
|
|
66714
|
-
}
|
|
66715
|
-
}
|
|
66716
|
-
function maybeReadMore_(stream, state2) {
|
|
66717
|
-
while (!state2.reading && !state2.ended && (state2.length < state2.highWaterMark || state2.flowing && state2.length === 0)) {
|
|
66718
|
-
var len = state2.length;
|
|
66719
|
-
debug5("maybeReadMore read 0");
|
|
66720
|
-
stream.read(0);
|
|
66721
|
-
if (len === state2.length)
|
|
66722
|
-
break;
|
|
66723
|
-
}
|
|
66724
|
-
state2.readingMore = false;
|
|
66725
|
-
}
|
|
66726
|
-
Readable2.prototype._read = function(n) {
|
|
66727
|
-
errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()"));
|
|
66728
|
-
};
|
|
66729
|
-
Readable2.prototype.pipe = function(dest, pipeOpts) {
|
|
66730
|
-
var src = this;
|
|
66731
|
-
var state2 = this._readableState;
|
|
66732
|
-
switch (state2.pipesCount) {
|
|
66733
|
-
case 0:
|
|
66734
|
-
state2.pipes = dest;
|
|
66735
|
-
break;
|
|
66736
|
-
case 1:
|
|
66737
|
-
state2.pipes = [state2.pipes, dest];
|
|
66738
|
-
break;
|
|
66739
|
-
default:
|
|
66740
|
-
state2.pipes.push(dest);
|
|
66741
|
-
break;
|
|
66742
|
-
}
|
|
66743
|
-
state2.pipesCount += 1;
|
|
66744
|
-
debug5("pipe count=%d opts=%j", state2.pipesCount, pipeOpts);
|
|
66745
|
-
var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
|
|
66746
|
-
var endFn = doEnd ? onend : unpipe;
|
|
66747
|
-
if (state2.endEmitted)
|
|
66748
|
-
process.nextTick(endFn);
|
|
66749
|
-
else
|
|
66750
|
-
src.once("end", endFn);
|
|
66751
|
-
dest.on("unpipe", onunpipe);
|
|
66752
|
-
function onunpipe(readable, unpipeInfo) {
|
|
66753
|
-
debug5("onunpipe");
|
|
66754
|
-
if (readable === src) {
|
|
66755
|
-
if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
|
|
66756
|
-
unpipeInfo.hasUnpiped = true;
|
|
66757
|
-
cleanup();
|
|
66758
|
-
}
|
|
66759
|
-
}
|
|
66760
|
-
}
|
|
66761
|
-
function onend() {
|
|
66762
|
-
debug5("onend");
|
|
66763
|
-
dest.end();
|
|
66764
|
-
}
|
|
66765
|
-
var ondrain = pipeOnDrain(src);
|
|
66766
|
-
dest.on("drain", ondrain);
|
|
66767
|
-
var cleanedUp = false;
|
|
66768
|
-
function cleanup() {
|
|
66769
|
-
debug5("cleanup");
|
|
66770
|
-
dest.removeListener("close", onclose);
|
|
66771
|
-
dest.removeListener("finish", onfinish);
|
|
66772
|
-
dest.removeListener("drain", ondrain);
|
|
66773
|
-
dest.removeListener("error", onerror);
|
|
66774
|
-
dest.removeListener("unpipe", onunpipe);
|
|
66775
|
-
src.removeListener("end", onend);
|
|
66776
|
-
src.removeListener("end", unpipe);
|
|
66777
|
-
src.removeListener("data", ondata);
|
|
66778
|
-
cleanedUp = true;
|
|
66779
|
-
if (state2.awaitDrain && (!dest._writableState || dest._writableState.needDrain))
|
|
66780
|
-
ondrain();
|
|
66781
|
-
}
|
|
66782
|
-
src.on("data", ondata);
|
|
66783
|
-
function ondata(chunk) {
|
|
66784
|
-
debug5("ondata");
|
|
66785
|
-
var ret = dest.write(chunk);
|
|
66786
|
-
debug5("dest.write", ret);
|
|
66787
|
-
if (ret === false) {
|
|
66788
|
-
if ((state2.pipesCount === 1 && state2.pipes === dest || state2.pipesCount > 1 && indexOf(state2.pipes, dest) !== -1) && !cleanedUp) {
|
|
66789
|
-
debug5("false write response, pause", state2.awaitDrain);
|
|
66790
|
-
state2.awaitDrain++;
|
|
66791
|
-
}
|
|
66792
|
-
src.pause();
|
|
66793
|
-
}
|
|
66794
|
-
}
|
|
66795
|
-
function onerror(er) {
|
|
66796
|
-
debug5("onerror", er);
|
|
66797
|
-
unpipe();
|
|
66798
|
-
dest.removeListener("error", onerror);
|
|
66799
|
-
if (EElistenerCount(dest, "error") === 0)
|
|
66800
|
-
errorOrDestroy(dest, er);
|
|
66801
|
-
}
|
|
66802
|
-
prependListener(dest, "error", onerror);
|
|
66803
|
-
function onclose() {
|
|
66804
|
-
dest.removeListener("finish", onfinish);
|
|
66805
|
-
unpipe();
|
|
66806
|
-
}
|
|
66807
|
-
dest.once("close", onclose);
|
|
66808
|
-
function onfinish() {
|
|
66809
|
-
debug5("onfinish");
|
|
66810
|
-
dest.removeListener("close", onclose);
|
|
66811
|
-
unpipe();
|
|
66812
|
-
}
|
|
66813
|
-
dest.once("finish", onfinish);
|
|
66814
|
-
function unpipe() {
|
|
66815
|
-
debug5("unpipe");
|
|
66816
|
-
src.unpipe(dest);
|
|
66817
|
-
}
|
|
66818
|
-
dest.emit("pipe", src);
|
|
66819
|
-
if (!state2.flowing) {
|
|
66820
|
-
debug5("pipe resume");
|
|
66821
|
-
src.resume();
|
|
66822
|
-
}
|
|
66823
|
-
return dest;
|
|
66824
|
-
};
|
|
66825
|
-
function pipeOnDrain(src) {
|
|
66826
|
-
return function pipeOnDrainFunctionResult() {
|
|
66827
|
-
var state2 = src._readableState;
|
|
66828
|
-
debug5("pipeOnDrain", state2.awaitDrain);
|
|
66829
|
-
if (state2.awaitDrain)
|
|
66830
|
-
state2.awaitDrain--;
|
|
66831
|
-
if (state2.awaitDrain === 0 && EElistenerCount(src, "data")) {
|
|
66832
|
-
state2.flowing = true;
|
|
66833
|
-
flow(src);
|
|
66834
|
-
}
|
|
66835
|
-
};
|
|
66836
|
-
}
|
|
66837
|
-
Readable2.prototype.unpipe = function(dest) {
|
|
66838
|
-
var state2 = this._readableState;
|
|
66839
|
-
var unpipeInfo = {
|
|
66840
|
-
hasUnpiped: false
|
|
66841
|
-
};
|
|
66842
|
-
if (state2.pipesCount === 0)
|
|
66843
|
-
return this;
|
|
66844
|
-
if (state2.pipesCount === 1) {
|
|
66845
|
-
if (dest && dest !== state2.pipes)
|
|
66846
|
-
return this;
|
|
66847
|
-
if (!dest)
|
|
66848
|
-
dest = state2.pipes;
|
|
66849
|
-
state2.pipes = null;
|
|
66850
|
-
state2.pipesCount = 0;
|
|
66851
|
-
state2.flowing = false;
|
|
66852
|
-
if (dest)
|
|
66853
|
-
dest.emit("unpipe", this, unpipeInfo);
|
|
66854
|
-
return this;
|
|
66855
|
-
}
|
|
66856
|
-
if (!dest) {
|
|
66857
|
-
var dests = state2.pipes;
|
|
66858
|
-
var len = state2.pipesCount;
|
|
66859
|
-
state2.pipes = null;
|
|
66860
|
-
state2.pipesCount = 0;
|
|
66861
|
-
state2.flowing = false;
|
|
66862
|
-
for (var i = 0;i < len; i++)
|
|
66863
|
-
dests[i].emit("unpipe", this, {
|
|
66864
|
-
hasUnpiped: false
|
|
66865
|
-
});
|
|
66866
|
-
return this;
|
|
66867
|
-
}
|
|
66868
|
-
var index = indexOf(state2.pipes, dest);
|
|
66869
|
-
if (index === -1)
|
|
66870
|
-
return this;
|
|
66871
|
-
state2.pipes.splice(index, 1);
|
|
66872
|
-
state2.pipesCount -= 1;
|
|
66873
|
-
if (state2.pipesCount === 1)
|
|
66874
|
-
state2.pipes = state2.pipes[0];
|
|
66875
|
-
dest.emit("unpipe", this, unpipeInfo);
|
|
66876
|
-
return this;
|
|
66877
|
-
};
|
|
66878
|
-
Readable2.prototype.on = function(ev, fn) {
|
|
66879
|
-
var res = Stream.prototype.on.call(this, ev, fn);
|
|
66880
|
-
var state2 = this._readableState;
|
|
66881
|
-
if (ev === "data") {
|
|
66882
|
-
state2.readableListening = this.listenerCount("readable") > 0;
|
|
66883
|
-
if (state2.flowing !== false)
|
|
66884
|
-
this.resume();
|
|
66885
|
-
} else if (ev === "readable") {
|
|
66886
|
-
if (!state2.endEmitted && !state2.readableListening) {
|
|
66887
|
-
state2.readableListening = state2.needReadable = true;
|
|
66888
|
-
state2.flowing = false;
|
|
66889
|
-
state2.emittedReadable = false;
|
|
66890
|
-
debug5("on readable", state2.length, state2.reading);
|
|
66891
|
-
if (state2.length) {
|
|
66892
|
-
emitReadable(this);
|
|
66893
|
-
} else if (!state2.reading) {
|
|
66894
|
-
process.nextTick(nReadingNextTick, this);
|
|
66895
|
-
}
|
|
66896
|
-
}
|
|
66897
|
-
}
|
|
66898
|
-
return res;
|
|
66899
|
-
};
|
|
66900
|
-
Readable2.prototype.addListener = Readable2.prototype.on;
|
|
66901
|
-
Readable2.prototype.removeListener = function(ev, fn) {
|
|
66902
|
-
var res = Stream.prototype.removeListener.call(this, ev, fn);
|
|
66903
|
-
if (ev === "readable") {
|
|
66904
|
-
process.nextTick(updateReadableListening, this);
|
|
66905
|
-
}
|
|
66906
|
-
return res;
|
|
66907
|
-
};
|
|
66908
|
-
Readable2.prototype.removeAllListeners = function(ev) {
|
|
66909
|
-
var res = Stream.prototype.removeAllListeners.apply(this, arguments);
|
|
66910
|
-
if (ev === "readable" || ev === undefined) {
|
|
66911
|
-
process.nextTick(updateReadableListening, this);
|
|
66912
|
-
}
|
|
66913
|
-
return res;
|
|
66914
|
-
};
|
|
66915
|
-
function updateReadableListening(self2) {
|
|
66916
|
-
var state2 = self2._readableState;
|
|
66917
|
-
state2.readableListening = self2.listenerCount("readable") > 0;
|
|
66918
|
-
if (state2.resumeScheduled && !state2.paused) {
|
|
66919
|
-
state2.flowing = true;
|
|
66920
|
-
} else if (self2.listenerCount("data") > 0) {
|
|
66921
|
-
self2.resume();
|
|
66922
|
-
}
|
|
66923
|
-
}
|
|
66924
|
-
function nReadingNextTick(self2) {
|
|
66925
|
-
debug5("readable nexttick read 0");
|
|
66926
|
-
self2.read(0);
|
|
66927
|
-
}
|
|
66928
|
-
Readable2.prototype.resume = function() {
|
|
66929
|
-
var state2 = this._readableState;
|
|
66930
|
-
if (!state2.flowing) {
|
|
66931
|
-
debug5("resume");
|
|
66932
|
-
state2.flowing = !state2.readableListening;
|
|
66933
|
-
resume2(this, state2);
|
|
66934
|
-
}
|
|
66935
|
-
state2.paused = false;
|
|
66936
|
-
return this;
|
|
66937
|
-
};
|
|
66938
|
-
function resume2(stream, state2) {
|
|
66939
|
-
if (!state2.resumeScheduled) {
|
|
66940
|
-
state2.resumeScheduled = true;
|
|
66941
|
-
process.nextTick(resume_, stream, state2);
|
|
66942
|
-
}
|
|
66943
|
-
}
|
|
66944
|
-
function resume_(stream, state2) {
|
|
66945
|
-
debug5("resume", state2.reading);
|
|
66946
|
-
if (!state2.reading) {
|
|
66947
|
-
stream.read(0);
|
|
66948
|
-
}
|
|
66949
|
-
state2.resumeScheduled = false;
|
|
66950
|
-
stream.emit("resume");
|
|
66951
|
-
flow(stream);
|
|
66952
|
-
if (state2.flowing && !state2.reading)
|
|
66953
|
-
stream.read(0);
|
|
66954
|
-
}
|
|
66955
|
-
Readable2.prototype.pause = function() {
|
|
66956
|
-
debug5("call pause flowing=%j", this._readableState.flowing);
|
|
66957
|
-
if (this._readableState.flowing !== false) {
|
|
66958
|
-
debug5("pause");
|
|
66959
|
-
this._readableState.flowing = false;
|
|
66960
|
-
this.emit("pause");
|
|
66961
|
-
}
|
|
66962
|
-
this._readableState.paused = true;
|
|
66963
|
-
return this;
|
|
66964
|
-
};
|
|
66965
|
-
function flow(stream) {
|
|
66966
|
-
var state2 = stream._readableState;
|
|
66967
|
-
debug5("flow", state2.flowing);
|
|
66968
|
-
while (state2.flowing && stream.read() !== null)
|
|
66969
|
-
;
|
|
66970
|
-
}
|
|
66971
|
-
Readable2.prototype.wrap = function(stream) {
|
|
66972
|
-
var _this = this;
|
|
66973
|
-
var state2 = this._readableState;
|
|
66974
|
-
var paused = false;
|
|
66975
|
-
stream.on("end", function() {
|
|
66976
|
-
debug5("wrapped end");
|
|
66977
|
-
if (state2.decoder && !state2.ended) {
|
|
66978
|
-
var chunk = state2.decoder.end();
|
|
66979
|
-
if (chunk && chunk.length)
|
|
66980
|
-
_this.push(chunk);
|
|
66981
|
-
}
|
|
66982
|
-
_this.push(null);
|
|
66983
|
-
});
|
|
66984
|
-
stream.on("data", function(chunk) {
|
|
66985
|
-
debug5("wrapped data");
|
|
66986
|
-
if (state2.decoder)
|
|
66987
|
-
chunk = state2.decoder.write(chunk);
|
|
66988
|
-
if (state2.objectMode && (chunk === null || chunk === undefined))
|
|
66989
|
-
return;
|
|
66990
|
-
else if (!state2.objectMode && (!chunk || !chunk.length))
|
|
66991
|
-
return;
|
|
66992
|
-
var ret = _this.push(chunk);
|
|
66993
|
-
if (!ret) {
|
|
66994
|
-
paused = true;
|
|
66995
|
-
stream.pause();
|
|
66996
|
-
}
|
|
66997
|
-
});
|
|
66998
|
-
for (var i in stream) {
|
|
66999
|
-
if (this[i] === undefined && typeof stream[i] === "function") {
|
|
67000
|
-
this[i] = function methodWrap(method) {
|
|
67001
|
-
return function methodWrapReturnFunction() {
|
|
67002
|
-
return stream[method].apply(stream, arguments);
|
|
67003
|
-
};
|
|
67004
|
-
}(i);
|
|
67005
|
-
}
|
|
67006
|
-
}
|
|
67007
|
-
for (var n = 0;n < kProxyEvents.length; n++) {
|
|
67008
|
-
stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
|
|
67009
|
-
}
|
|
67010
|
-
this._read = function(n2) {
|
|
67011
|
-
debug5("wrapped _read", n2);
|
|
67012
|
-
if (paused) {
|
|
67013
|
-
paused = false;
|
|
67014
|
-
stream.resume();
|
|
67015
|
-
}
|
|
67016
|
-
};
|
|
67017
|
-
return this;
|
|
67018
|
-
};
|
|
67019
|
-
if (typeof Symbol === "function") {
|
|
67020
|
-
Readable2.prototype[Symbol.asyncIterator] = function() {
|
|
67021
|
-
if (createReadableStreamAsyncIterator === undefined) {
|
|
67022
|
-
createReadableStreamAsyncIterator = require_async_iterator();
|
|
67023
|
-
}
|
|
67024
|
-
return createReadableStreamAsyncIterator(this);
|
|
67025
|
-
};
|
|
67026
|
-
}
|
|
67027
|
-
Object.defineProperty(Readable2.prototype, "readableHighWaterMark", {
|
|
67028
|
-
enumerable: false,
|
|
67029
|
-
get: function get() {
|
|
67030
|
-
return this._readableState.highWaterMark;
|
|
67031
|
-
}
|
|
67032
|
-
});
|
|
67033
|
-
Object.defineProperty(Readable2.prototype, "readableBuffer", {
|
|
67034
|
-
enumerable: false,
|
|
67035
|
-
get: function get() {
|
|
67036
|
-
return this._readableState && this._readableState.buffer;
|
|
67037
|
-
}
|
|
67038
|
-
});
|
|
67039
|
-
Object.defineProperty(Readable2.prototype, "readableFlowing", {
|
|
67040
|
-
enumerable: false,
|
|
67041
|
-
get: function get() {
|
|
67042
|
-
return this._readableState.flowing;
|
|
67043
|
-
},
|
|
67044
|
-
set: function set(state2) {
|
|
67045
|
-
if (this._readableState) {
|
|
67046
|
-
this._readableState.flowing = state2;
|
|
67047
|
-
}
|
|
67048
|
-
}
|
|
67049
|
-
});
|
|
67050
|
-
Readable2._fromList = fromList;
|
|
67051
|
-
Object.defineProperty(Readable2.prototype, "readableLength", {
|
|
67052
|
-
enumerable: false,
|
|
67053
|
-
get: function get() {
|
|
67054
|
-
return this._readableState.length;
|
|
67055
|
-
}
|
|
67056
|
-
});
|
|
67057
|
-
function fromList(n, state2) {
|
|
67058
|
-
if (state2.length === 0)
|
|
67059
|
-
return null;
|
|
67060
|
-
var ret;
|
|
67061
|
-
if (state2.objectMode)
|
|
67062
|
-
ret = state2.buffer.shift();
|
|
67063
|
-
else if (!n || n >= state2.length) {
|
|
67064
|
-
if (state2.decoder)
|
|
67065
|
-
ret = state2.buffer.join("");
|
|
67066
|
-
else if (state2.buffer.length === 1)
|
|
67067
|
-
ret = state2.buffer.first();
|
|
67068
|
-
else
|
|
67069
|
-
ret = state2.buffer.concat(state2.length);
|
|
67070
|
-
state2.buffer.clear();
|
|
67071
|
-
} else {
|
|
67072
|
-
ret = state2.buffer.consume(n, state2.decoder);
|
|
67073
|
-
}
|
|
67074
|
-
return ret;
|
|
67075
|
-
}
|
|
67076
|
-
function endReadable(stream) {
|
|
67077
|
-
var state2 = stream._readableState;
|
|
67078
|
-
debug5("endReadable", state2.endEmitted);
|
|
67079
|
-
if (!state2.endEmitted) {
|
|
67080
|
-
state2.ended = true;
|
|
67081
|
-
process.nextTick(endReadableNT, state2, stream);
|
|
67082
|
-
}
|
|
67083
|
-
}
|
|
67084
|
-
function endReadableNT(state2, stream) {
|
|
67085
|
-
debug5("endReadableNT", state2.endEmitted, state2.length);
|
|
67086
|
-
if (!state2.endEmitted && state2.length === 0) {
|
|
67087
|
-
state2.endEmitted = true;
|
|
67088
|
-
stream.readable = false;
|
|
67089
|
-
stream.emit("end");
|
|
67090
|
-
if (state2.autoDestroy) {
|
|
67091
|
-
var wState = stream._writableState;
|
|
67092
|
-
if (!wState || wState.autoDestroy && wState.finished) {
|
|
67093
|
-
stream.destroy();
|
|
67094
|
-
}
|
|
67095
|
-
}
|
|
67096
|
-
}
|
|
67097
|
-
}
|
|
67098
|
-
if (typeof Symbol === "function") {
|
|
67099
|
-
Readable2.from = function(iterable, opts) {
|
|
67100
|
-
if (from === undefined) {
|
|
67101
|
-
from = require_from();
|
|
67102
|
-
}
|
|
67103
|
-
return from(Readable2, iterable, opts);
|
|
67104
|
-
};
|
|
67105
|
-
}
|
|
67106
|
-
function indexOf(xs, x) {
|
|
67107
|
-
for (var i = 0, l = xs.length;i < l; i++) {
|
|
67108
|
-
if (xs[i] === x)
|
|
67109
|
-
return i;
|
|
67110
|
-
}
|
|
67111
|
-
return -1;
|
|
67112
|
-
}
|
|
67113
|
-
});
|
|
67114
|
-
|
|
67115
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/_stream_transform.js
|
|
67116
|
-
var require__stream_transform = __commonJS((exports, module) => {
|
|
67117
|
-
module.exports = Transform;
|
|
67118
|
-
var _require$codes = require_errors().codes;
|
|
67119
|
-
var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
|
|
67120
|
-
var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
|
|
67121
|
-
var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
|
|
67122
|
-
var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
|
|
67123
|
-
var Duplex = require__stream_duplex();
|
|
67124
|
-
require_inherits()(Transform, Duplex);
|
|
67125
|
-
function afterTransform(er, data2) {
|
|
67126
|
-
var ts = this._transformState;
|
|
67127
|
-
ts.transforming = false;
|
|
67128
|
-
var cb = ts.writecb;
|
|
67129
|
-
if (cb === null) {
|
|
67130
|
-
return this.emit("error", new ERR_MULTIPLE_CALLBACK);
|
|
67131
|
-
}
|
|
67132
|
-
ts.writechunk = null;
|
|
67133
|
-
ts.writecb = null;
|
|
67134
|
-
if (data2 != null)
|
|
67135
|
-
this.push(data2);
|
|
67136
|
-
cb(er);
|
|
67137
|
-
var rs = this._readableState;
|
|
67138
|
-
rs.reading = false;
|
|
67139
|
-
if (rs.needReadable || rs.length < rs.highWaterMark) {
|
|
67140
|
-
this._read(rs.highWaterMark);
|
|
67141
|
-
}
|
|
67142
|
-
}
|
|
67143
|
-
function Transform(options) {
|
|
67144
|
-
if (!(this instanceof Transform))
|
|
67145
|
-
return new Transform(options);
|
|
67146
|
-
Duplex.call(this, options);
|
|
67147
|
-
this._transformState = {
|
|
67148
|
-
afterTransform: afterTransform.bind(this),
|
|
67149
|
-
needTransform: false,
|
|
67150
|
-
transforming: false,
|
|
67151
|
-
writecb: null,
|
|
67152
|
-
writechunk: null,
|
|
67153
|
-
writeencoding: null
|
|
67154
|
-
};
|
|
67155
|
-
this._readableState.needReadable = true;
|
|
67156
|
-
this._readableState.sync = false;
|
|
67157
|
-
if (options) {
|
|
67158
|
-
if (typeof options.transform === "function")
|
|
67159
|
-
this._transform = options.transform;
|
|
67160
|
-
if (typeof options.flush === "function")
|
|
67161
|
-
this._flush = options.flush;
|
|
67162
|
-
}
|
|
67163
|
-
this.on("prefinish", prefinish);
|
|
67164
|
-
}
|
|
67165
|
-
function prefinish() {
|
|
67166
|
-
var _this = this;
|
|
67167
|
-
if (typeof this._flush === "function" && !this._readableState.destroyed) {
|
|
67168
|
-
this._flush(function(er, data2) {
|
|
67169
|
-
done(_this, er, data2);
|
|
67170
|
-
});
|
|
67171
|
-
} else {
|
|
67172
|
-
done(this, null, null);
|
|
67173
|
-
}
|
|
67174
|
-
}
|
|
67175
|
-
Transform.prototype.push = function(chunk, encoding) {
|
|
67176
|
-
this._transformState.needTransform = false;
|
|
67177
|
-
return Duplex.prototype.push.call(this, chunk, encoding);
|
|
67178
|
-
};
|
|
67179
|
-
Transform.prototype._transform = function(chunk, encoding, cb) {
|
|
67180
|
-
cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
|
|
67181
|
-
};
|
|
67182
|
-
Transform.prototype._write = function(chunk, encoding, cb) {
|
|
67183
|
-
var ts = this._transformState;
|
|
67184
|
-
ts.writecb = cb;
|
|
67185
|
-
ts.writechunk = chunk;
|
|
67186
|
-
ts.writeencoding = encoding;
|
|
67187
|
-
if (!ts.transforming) {
|
|
67188
|
-
var rs = this._readableState;
|
|
67189
|
-
if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark)
|
|
67190
|
-
this._read(rs.highWaterMark);
|
|
67191
|
-
}
|
|
67192
|
-
};
|
|
67193
|
-
Transform.prototype._read = function(n) {
|
|
67194
|
-
var ts = this._transformState;
|
|
67195
|
-
if (ts.writechunk !== null && !ts.transforming) {
|
|
67196
|
-
ts.transforming = true;
|
|
67197
|
-
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
|
|
67198
|
-
} else {
|
|
67199
|
-
ts.needTransform = true;
|
|
67200
|
-
}
|
|
67201
|
-
};
|
|
67202
|
-
Transform.prototype._destroy = function(err, cb) {
|
|
67203
|
-
Duplex.prototype._destroy.call(this, err, function(err2) {
|
|
67204
|
-
cb(err2);
|
|
67205
|
-
});
|
|
67206
|
-
};
|
|
67207
|
-
function done(stream, er, data2) {
|
|
67208
|
-
if (er)
|
|
67209
|
-
return stream.emit("error", er);
|
|
67210
|
-
if (data2 != null)
|
|
67211
|
-
stream.push(data2);
|
|
67212
|
-
if (stream._writableState.length)
|
|
67213
|
-
throw new ERR_TRANSFORM_WITH_LENGTH_0;
|
|
67214
|
-
if (stream._transformState.transforming)
|
|
67215
|
-
throw new ERR_TRANSFORM_ALREADY_TRANSFORMING;
|
|
67216
|
-
return stream.push(null);
|
|
67217
|
-
}
|
|
67218
|
-
});
|
|
67219
|
-
|
|
67220
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/_stream_passthrough.js
|
|
67221
|
-
var require__stream_passthrough = __commonJS((exports, module) => {
|
|
67222
|
-
module.exports = PassThrough;
|
|
67223
|
-
var Transform = require__stream_transform();
|
|
67224
|
-
require_inherits()(PassThrough, Transform);
|
|
67225
|
-
function PassThrough(options) {
|
|
67226
|
-
if (!(this instanceof PassThrough))
|
|
67227
|
-
return new PassThrough(options);
|
|
67228
|
-
Transform.call(this, options);
|
|
67229
|
-
}
|
|
67230
|
-
PassThrough.prototype._transform = function(chunk, encoding, cb) {
|
|
67231
|
-
cb(null, chunk);
|
|
67232
|
-
};
|
|
67233
|
-
});
|
|
67234
|
-
|
|
67235
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/lib/internal/streams/pipeline.js
|
|
67236
|
-
var require_pipeline = __commonJS((exports, module) => {
|
|
67237
|
-
var eos;
|
|
67238
|
-
function once(callback) {
|
|
67239
|
-
var called = false;
|
|
67240
|
-
return function() {
|
|
67241
|
-
if (called)
|
|
67242
|
-
return;
|
|
67243
|
-
called = true;
|
|
67244
|
-
callback.apply(undefined, arguments);
|
|
67245
|
-
};
|
|
67246
|
-
}
|
|
67247
|
-
var _require$codes = require_errors().codes;
|
|
67248
|
-
var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
|
|
67249
|
-
var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
|
|
67250
|
-
function noop(err) {
|
|
67251
|
-
if (err)
|
|
67252
|
-
throw err;
|
|
67253
|
-
}
|
|
67254
|
-
function isRequest(stream) {
|
|
67255
|
-
return stream.setHeader && typeof stream.abort === "function";
|
|
67256
|
-
}
|
|
67257
|
-
function destroyer(stream, reading, writing, callback) {
|
|
67258
|
-
callback = once(callback);
|
|
67259
|
-
var closed = false;
|
|
67260
|
-
stream.on("close", function() {
|
|
67261
|
-
closed = true;
|
|
67262
|
-
});
|
|
67263
|
-
if (eos === undefined)
|
|
67264
|
-
eos = require_end_of_stream();
|
|
67265
|
-
eos(stream, {
|
|
67266
|
-
readable: reading,
|
|
67267
|
-
writable: writing
|
|
67268
|
-
}, function(err) {
|
|
67269
|
-
if (err)
|
|
67270
|
-
return callback(err);
|
|
67271
|
-
closed = true;
|
|
67272
|
-
callback();
|
|
67273
|
-
});
|
|
67274
|
-
var destroyed = false;
|
|
67275
|
-
return function(err) {
|
|
67276
|
-
if (closed)
|
|
67277
|
-
return;
|
|
67278
|
-
if (destroyed)
|
|
67279
|
-
return;
|
|
67280
|
-
destroyed = true;
|
|
67281
|
-
if (isRequest(stream))
|
|
67282
|
-
return stream.abort();
|
|
67283
|
-
if (typeof stream.destroy === "function")
|
|
67284
|
-
return stream.destroy();
|
|
67285
|
-
callback(err || new ERR_STREAM_DESTROYED("pipe"));
|
|
67286
|
-
};
|
|
67287
|
-
}
|
|
67288
|
-
function call(fn) {
|
|
67289
|
-
fn();
|
|
67290
|
-
}
|
|
67291
|
-
function pipe(from, to) {
|
|
67292
|
-
return from.pipe(to);
|
|
67293
|
-
}
|
|
67294
|
-
function popCallback(streams) {
|
|
67295
|
-
if (!streams.length)
|
|
67296
|
-
return noop;
|
|
67297
|
-
if (typeof streams[streams.length - 1] !== "function")
|
|
67298
|
-
return noop;
|
|
67299
|
-
return streams.pop();
|
|
67300
|
-
}
|
|
67301
|
-
function pipeline2() {
|
|
67302
|
-
for (var _len = arguments.length, streams = new Array(_len), _key = 0;_key < _len; _key++) {
|
|
67303
|
-
streams[_key] = arguments[_key];
|
|
67304
|
-
}
|
|
67305
|
-
var callback = popCallback(streams);
|
|
67306
|
-
if (Array.isArray(streams[0]))
|
|
67307
|
-
streams = streams[0];
|
|
67308
|
-
if (streams.length < 2) {
|
|
67309
|
-
throw new ERR_MISSING_ARGS("streams");
|
|
67310
|
-
}
|
|
67311
|
-
var error5;
|
|
67312
|
-
var destroys = streams.map(function(stream, i) {
|
|
67313
|
-
var reading = i < streams.length - 1;
|
|
67314
|
-
var writing = i > 0;
|
|
67315
|
-
return destroyer(stream, reading, writing, function(err) {
|
|
67316
|
-
if (!error5)
|
|
67317
|
-
error5 = err;
|
|
67318
|
-
if (err)
|
|
67319
|
-
destroys.forEach(call);
|
|
67320
|
-
if (reading)
|
|
67321
|
-
return;
|
|
67322
|
-
destroys.forEach(call);
|
|
67323
|
-
callback(error5);
|
|
67324
|
-
});
|
|
67325
|
-
});
|
|
67326
|
-
return streams.reduce(pipe);
|
|
67327
|
-
}
|
|
67328
|
-
module.exports = pipeline2;
|
|
67329
|
-
});
|
|
67330
|
-
|
|
67331
|
-
// ../../node_modules/md5.js/node_modules/hash-base/node_modules/readable-stream/readable.js
|
|
67332
|
-
var require_readable = __commonJS((exports, module) => {
|
|
67333
|
-
var Stream = __require("stream");
|
|
67334
|
-
if (process.env.READABLE_STREAM === "disable" && Stream) {
|
|
67335
|
-
module.exports = Stream.Readable;
|
|
67336
|
-
Object.assign(module.exports, Stream);
|
|
67337
|
-
module.exports.Stream = Stream;
|
|
67338
|
-
} else {
|
|
67339
|
-
exports = module.exports = require__stream_readable();
|
|
67340
|
-
exports.Stream = Stream || exports;
|
|
67341
|
-
exports.Readable = exports;
|
|
67342
|
-
exports.Writable = require__stream_writable();
|
|
67343
|
-
exports.Duplex = require__stream_duplex();
|
|
67344
|
-
exports.Transform = require__stream_transform();
|
|
67345
|
-
exports.PassThrough = require__stream_passthrough();
|
|
67346
|
-
exports.finished = require_end_of_stream();
|
|
67347
|
-
exports.pipeline = require_pipeline();
|
|
67348
|
-
}
|
|
67349
|
-
});
|
|
67350
|
-
|
|
67351
|
-
// ../../node_modules/md5.js/node_modules/hash-base/index.js
|
|
64647
|
+
// ../../node_modules/hash-base/index.js
|
|
67352
64648
|
var require_hash_base = __commonJS((exports, module) => {
|
|
67353
64649
|
var Buffer2 = require_safe_buffer().Buffer;
|
|
67354
|
-
var Transform =
|
|
64650
|
+
var Transform = __require("stream").Transform;
|
|
67355
64651
|
var inherits = require_inherits();
|
|
67356
|
-
function throwIfNotStringOrBuffer(val, prefix) {
|
|
67357
|
-
if (!Buffer2.isBuffer(val) && typeof val !== "string") {
|
|
67358
|
-
throw new TypeError(prefix + " must be a string or a buffer");
|
|
67359
|
-
}
|
|
67360
|
-
}
|
|
67361
64652
|
function HashBase(blockSize) {
|
|
67362
64653
|
Transform.call(this);
|
|
67363
64654
|
this._block = Buffer2.allocUnsafe(blockSize);
|
|
@@ -67385,12 +64676,31 @@ var require_hash_base = __commonJS((exports, module) => {
|
|
|
67385
64676
|
}
|
|
67386
64677
|
callback(error5);
|
|
67387
64678
|
};
|
|
64679
|
+
var useUint8Array = typeof Uint8Array !== "undefined";
|
|
64680
|
+
var useArrayBuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined" && ArrayBuffer.isView && (Buffer2.prototype instanceof Uint8Array || Buffer2.TYPED_ARRAY_SUPPORT);
|
|
64681
|
+
function toBuffer(data2, encoding) {
|
|
64682
|
+
if (data2 instanceof Buffer2)
|
|
64683
|
+
return data2;
|
|
64684
|
+
if (typeof data2 === "string")
|
|
64685
|
+
return Buffer2.from(data2, encoding);
|
|
64686
|
+
if (useArrayBuffer && ArrayBuffer.isView(data2)) {
|
|
64687
|
+
if (data2.byteLength === 0)
|
|
64688
|
+
return Buffer2.alloc(0);
|
|
64689
|
+
var res = Buffer2.from(data2.buffer, data2.byteOffset, data2.byteLength);
|
|
64690
|
+
if (res.byteLength === data2.byteLength)
|
|
64691
|
+
return res;
|
|
64692
|
+
}
|
|
64693
|
+
if (useUint8Array && data2 instanceof Uint8Array)
|
|
64694
|
+
return Buffer2.from(data2);
|
|
64695
|
+
if (Buffer2.isBuffer(data2) && data2.constructor && typeof data2.constructor.isBuffer === "function" && data2.constructor.isBuffer(data2)) {
|
|
64696
|
+
return Buffer2.from(data2);
|
|
64697
|
+
}
|
|
64698
|
+
throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.');
|
|
64699
|
+
}
|
|
67388
64700
|
HashBase.prototype.update = function(data2, encoding) {
|
|
67389
|
-
throwIfNotStringOrBuffer(data2, "Data");
|
|
67390
64701
|
if (this._finalized)
|
|
67391
64702
|
throw new Error("Digest already called");
|
|
67392
|
-
|
|
67393
|
-
data2 = Buffer2.from(data2, encoding);
|
|
64703
|
+
data2 = toBuffer(data2, encoding);
|
|
67394
64704
|
var block = this._block;
|
|
67395
64705
|
var offset = 0;
|
|
67396
64706
|
while (this._blockOffset + data2.length - offset >= this._blockSize) {
|
|
@@ -92196,5 +89506,5 @@ export {
|
|
|
92196
89506
|
AgentRuntime
|
|
92197
89507
|
};
|
|
92198
89508
|
|
|
92199
|
-
//# debugId=
|
|
89509
|
+
//# debugId=CB4EC6A4BC6C1CAC64756E2164756E21
|
|
92200
89510
|
//# sourceMappingURL=index.node.js.map
|