@datapos/datapos-tool-csv-parse 0.0.68 → 0.0.70
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.
|
@@ -31,8 +31,8 @@ function Ze(t) {
|
|
|
31
31
|
return n === 1 ? (e = t[r - 1], i += P[e >> 2], i += P[e << 4 & 63], i += "==") : n === 2 && (e = (t[r - 2] << 8) + t[r - 1], i += P[e >> 10], i += P[e >> 4 & 63], i += P[e << 2 & 63], i += "="), o.push(i), o.join("");
|
|
32
32
|
}
|
|
33
33
|
function ve(t, e, r, n, i) {
|
|
34
|
-
var o, s, f = i * 8 - n - 1, a = (1 << f) - 1, u = a >> 1, c = -7, h = r ? i - 1 : 0, d = r ? -1 : 1,
|
|
35
|
-
for (h += d, o =
|
|
34
|
+
var o, s, f = i * 8 - n - 1, a = (1 << f) - 1, u = a >> 1, c = -7, h = r ? i - 1 : 0, d = r ? -1 : 1, m = t[e + h];
|
|
35
|
+
for (h += d, o = m & (1 << -c) - 1, m >>= -c, c += f; c > 0; o = o * 256 + t[e + h], h += d, c -= 8)
|
|
36
36
|
;
|
|
37
37
|
for (s = o & (1 << -c) - 1, o >>= -c, c += n; c > 0; s = s * 256 + t[e + h], h += d, c -= 8)
|
|
38
38
|
;
|
|
@@ -40,18 +40,18 @@ function ve(t, e, r, n, i) {
|
|
|
40
40
|
o = 1 - u;
|
|
41
41
|
else {
|
|
42
42
|
if (o === a)
|
|
43
|
-
return s ? NaN : (
|
|
43
|
+
return s ? NaN : (m ? -1 : 1) * (1 / 0);
|
|
44
44
|
s = s + Math.pow(2, n), o = o - u;
|
|
45
45
|
}
|
|
46
|
-
return (
|
|
46
|
+
return (m ? -1 : 1) * s * Math.pow(2, o - n);
|
|
47
47
|
}
|
|
48
48
|
function ht(t, e, r, n, i, o) {
|
|
49
|
-
var s, f, a, u = o * 8 - i - 1, c = (1 << u) - 1, h = c >> 1, d = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
|
|
50
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, s = c) : (s = Math.floor(Math.log(e) / Math.LN2), e * (a = Math.pow(2, -s)) < 1 && (s--, a *= 2), s + h >= 1 ? e += d / a : e += d * Math.pow(2, 1 - h), e * a >= 2 && (s++, a /= 2), s + h >= c ? (f = 0, s = c) : s + h >= 1 ? (f = (e * a - 1) * Math.pow(2, i), s = s + h) : (f = e * Math.pow(2, h - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r +
|
|
49
|
+
var s, f, a, u = o * 8 - i - 1, c = (1 << u) - 1, h = c >> 1, d = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, m = n ? 0 : o - 1, O = n ? 1 : -1, E = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
50
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, s = c) : (s = Math.floor(Math.log(e) / Math.LN2), e * (a = Math.pow(2, -s)) < 1 && (s--, a *= 2), s + h >= 1 ? e += d / a : e += d * Math.pow(2, 1 - h), e * a >= 2 && (s++, a /= 2), s + h >= c ? (f = 0, s = c) : s + h >= 1 ? (f = (e * a - 1) * Math.pow(2, i), s = s + h) : (f = e * Math.pow(2, h - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + m] = f & 255, m += O, f /= 256, i -= 8)
|
|
51
51
|
;
|
|
52
|
-
for (s = s << i | f, u += i; u > 0; t[r +
|
|
52
|
+
for (s = s << i | f, u += i; u > 0; t[r + m] = s & 255, m += O, s /= 256, u -= 8)
|
|
53
53
|
;
|
|
54
|
-
t[r +
|
|
54
|
+
t[r + m - O] |= E * 128;
|
|
55
55
|
}
|
|
56
56
|
var er = {}.toString, dt = Array.isArray || function(t) {
|
|
57
57
|
return er.call(t) == "[object Array]";
|
|
@@ -91,20 +91,20 @@ l.from = function(t, e, r) {
|
|
|
91
91
|
return pt(null, t, e, r);
|
|
92
92
|
};
|
|
93
93
|
l.TYPED_ARRAY_SUPPORT && (l.prototype.__proto__ = Uint8Array.prototype, l.__proto__ = Uint8Array, typeof Symbol < "u" && Symbol.species && l[Symbol.species]);
|
|
94
|
-
function
|
|
94
|
+
function gt(t) {
|
|
95
95
|
if (typeof t != "number")
|
|
96
96
|
throw new TypeError('"size" argument must be a number');
|
|
97
97
|
if (t < 0)
|
|
98
98
|
throw new RangeError('"size" argument must not be negative');
|
|
99
99
|
}
|
|
100
100
|
function rr(t, e, r, n) {
|
|
101
|
-
return
|
|
101
|
+
return gt(e), e <= 0 ? q(t, e) : r !== void 0 ? typeof n == "string" ? q(t, e).fill(r, n) : q(t, e).fill(r) : q(t, e);
|
|
102
102
|
}
|
|
103
103
|
l.alloc = function(t, e, r) {
|
|
104
104
|
return rr(null, t, e, r);
|
|
105
105
|
};
|
|
106
106
|
function ze(t, e) {
|
|
107
|
-
if (
|
|
107
|
+
if (gt(e), t = q(t, e < 0 ? 0 : Ve(e) | 0), !l.TYPED_ARRAY_SUPPORT)
|
|
108
108
|
for (var r = 0; r < e; ++r)
|
|
109
109
|
t[r] = 0;
|
|
110
110
|
return t;
|
|
@@ -118,7 +118,7 @@ l.allocUnsafeSlow = function(t) {
|
|
|
118
118
|
function nr(t, e, r) {
|
|
119
119
|
if ((typeof r != "string" || r === "") && (r = "utf8"), !l.isEncoding(r))
|
|
120
120
|
throw new TypeError('"encoding" must be a valid string encoding');
|
|
121
|
-
var n =
|
|
121
|
+
var n = mt(e, r) | 0;
|
|
122
122
|
t = q(t, n);
|
|
123
123
|
var i = t.write(e, r);
|
|
124
124
|
return i !== n && (t = t.slice(0, i)), t;
|
|
@@ -206,7 +206,7 @@ l.concat = function(e, r) {
|
|
|
206
206
|
}
|
|
207
207
|
return i;
|
|
208
208
|
};
|
|
209
|
-
function
|
|
209
|
+
function mt(t, e) {
|
|
210
210
|
if ($(t))
|
|
211
211
|
return t.length;
|
|
212
212
|
if (typeof ArrayBuffer < "u" && typeof ArrayBuffer.isView == "function" && (ArrayBuffer.isView(t) || t instanceof ArrayBuffer))
|
|
@@ -238,7 +238,7 @@ function gt(t, e) {
|
|
|
238
238
|
e = ("" + e).toLowerCase(), n = !0;
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
l.byteLength =
|
|
241
|
+
l.byteLength = mt;
|
|
242
242
|
function sr(t, e, r) {
|
|
243
243
|
var n = !1;
|
|
244
244
|
if ((e === void 0 || e < 0) && (e = 0), e > this.length || ((r === void 0 || r > this.length) && (r = this.length), r <= 0) || (r >>>= 0, e >>>= 0, r <= e))
|
|
@@ -246,7 +246,7 @@ function sr(t, e, r) {
|
|
|
246
246
|
for (t || (t = "utf8"); ; )
|
|
247
247
|
switch (t) {
|
|
248
248
|
case "hex":
|
|
249
|
-
return
|
|
249
|
+
return mr(this, e, r);
|
|
250
250
|
case "utf8":
|
|
251
251
|
case "utf-8":
|
|
252
252
|
return yt(this, e, r);
|
|
@@ -254,7 +254,7 @@ function sr(t, e, r) {
|
|
|
254
254
|
return pr(this, e, r);
|
|
255
255
|
case "latin1":
|
|
256
256
|
case "binary":
|
|
257
|
-
return
|
|
257
|
+
return gr(this, e, r);
|
|
258
258
|
case "base64":
|
|
259
259
|
return hr(this, e, r);
|
|
260
260
|
case "ucs2":
|
|
@@ -348,8 +348,8 @@ function Xe(t, e, r, n, i) {
|
|
|
348
348
|
return -1;
|
|
349
349
|
o = 2, s /= 2, f /= 2, r /= 2;
|
|
350
350
|
}
|
|
351
|
-
function a(
|
|
352
|
-
return o === 1 ?
|
|
351
|
+
function a(m, O) {
|
|
352
|
+
return o === 1 ? m[O] : m.readUInt16BE(O * o);
|
|
353
353
|
}
|
|
354
354
|
var u;
|
|
355
355
|
if (i) {
|
|
@@ -499,14 +499,14 @@ function pr(t, e, r) {
|
|
|
499
499
|
n += String.fromCharCode(t[i] & 127);
|
|
500
500
|
return n;
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function gr(t, e, r) {
|
|
503
503
|
var n = "";
|
|
504
504
|
r = Math.min(t.length, r);
|
|
505
505
|
for (var i = e; i < r; ++i)
|
|
506
506
|
n += String.fromCharCode(t[i]);
|
|
507
507
|
return n;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function mr(t, e, r) {
|
|
510
510
|
var n = t.length;
|
|
511
511
|
(!e || e < 0) && (e = 0), (!r || r < 0 || r > n) && (r = n);
|
|
512
512
|
for (var i = "", o = e; o < r; ++o)
|
|
@@ -859,27 +859,27 @@ var Ce;
|
|
|
859
859
|
function H() {
|
|
860
860
|
}
|
|
861
861
|
H.prototype = /* @__PURE__ */ Object.create(null);
|
|
862
|
-
function
|
|
863
|
-
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
this.domain = null,
|
|
873
|
-
};
|
|
874
|
-
|
|
862
|
+
function g() {
|
|
863
|
+
g.init.call(this);
|
|
864
|
+
}
|
|
865
|
+
g.EventEmitter = g;
|
|
866
|
+
g.usingDomains = !1;
|
|
867
|
+
g.prototype.domain = void 0;
|
|
868
|
+
g.prototype._events = void 0;
|
|
869
|
+
g.prototype._maxListeners = void 0;
|
|
870
|
+
g.defaultMaxListeners = 10;
|
|
871
|
+
g.init = function() {
|
|
872
|
+
this.domain = null, g.usingDomains && Ce.active && !(this instanceof Ce.Domain) && (this.domain = Ce.active), (!this._events || this._events === Object.getPrototypeOf(this)._events) && (this._events = new H(), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
873
|
+
};
|
|
874
|
+
g.prototype.setMaxListeners = function(e) {
|
|
875
875
|
if (typeof e != "number" || e < 0 || isNaN(e))
|
|
876
876
|
throw new TypeError('"n" argument must be a positive number');
|
|
877
877
|
return this._maxListeners = e, this;
|
|
878
878
|
};
|
|
879
879
|
function Rt(t) {
|
|
880
|
-
return t._maxListeners === void 0 ?
|
|
880
|
+
return t._maxListeners === void 0 ? g.defaultMaxListeners : t._maxListeners;
|
|
881
881
|
}
|
|
882
|
-
|
|
882
|
+
g.prototype.getMaxListeners = function() {
|
|
883
883
|
return Rt(this);
|
|
884
884
|
};
|
|
885
885
|
function Ir(t, e, r) {
|
|
@@ -917,7 +917,7 @@ function Lr(t, e, r, n) {
|
|
|
917
917
|
for (var i = t.length, o = ae(t, i), s = 0; s < i; ++s)
|
|
918
918
|
o[s].apply(r, n);
|
|
919
919
|
}
|
|
920
|
-
|
|
920
|
+
g.prototype.emit = function(e) {
|
|
921
921
|
var r, n, i, o, s, f, a, u = e === "error";
|
|
922
922
|
if (f = this._events, f)
|
|
923
923
|
u = u && f.error == null;
|
|
@@ -979,11 +979,11 @@ function It(t, e, r, n) {
|
|
|
979
979
|
function Tr(t) {
|
|
980
980
|
typeof console.warn == "function" ? console.warn(t) : console.log(t);
|
|
981
981
|
}
|
|
982
|
-
|
|
982
|
+
g.prototype.addListener = function(e, r) {
|
|
983
983
|
return It(this, e, r, !1);
|
|
984
984
|
};
|
|
985
|
-
|
|
986
|
-
|
|
985
|
+
g.prototype.on = g.prototype.addListener;
|
|
986
|
+
g.prototype.prependListener = function(e, r) {
|
|
987
987
|
return It(this, e, r, !0);
|
|
988
988
|
};
|
|
989
989
|
function Ct(t, e, r) {
|
|
@@ -993,17 +993,17 @@ function Ct(t, e, r) {
|
|
|
993
993
|
}
|
|
994
994
|
return i.listener = r, i;
|
|
995
995
|
}
|
|
996
|
-
|
|
996
|
+
g.prototype.once = function(e, r) {
|
|
997
997
|
if (typeof r != "function")
|
|
998
998
|
throw new TypeError('"listener" argument must be a function');
|
|
999
999
|
return this.on(e, Ct(this, e, r)), this;
|
|
1000
1000
|
};
|
|
1001
|
-
|
|
1001
|
+
g.prototype.prependOnceListener = function(e, r) {
|
|
1002
1002
|
if (typeof r != "function")
|
|
1003
1003
|
throw new TypeError('"listener" argument must be a function');
|
|
1004
1004
|
return this.prependListener(e, Ct(this, e, r)), this;
|
|
1005
1005
|
};
|
|
1006
|
-
|
|
1006
|
+
g.prototype.removeListener = function(e, r) {
|
|
1007
1007
|
var n, i, o, s, f;
|
|
1008
1008
|
if (typeof r != "function")
|
|
1009
1009
|
throw new TypeError('"listener" argument must be a function');
|
|
@@ -1031,7 +1031,7 @@ m.prototype.removeListener = function(e, r) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
return this;
|
|
1033
1033
|
};
|
|
1034
|
-
|
|
1034
|
+
g.prototype.removeAllListeners = function(e) {
|
|
1035
1035
|
var r, n;
|
|
1036
1036
|
if (n = this._events, !n)
|
|
1037
1037
|
return this;
|
|
@@ -1050,14 +1050,14 @@ m.prototype.removeAllListeners = function(e) {
|
|
|
1050
1050
|
while (r[0]);
|
|
1051
1051
|
return this;
|
|
1052
1052
|
};
|
|
1053
|
-
|
|
1053
|
+
g.prototype.listeners = function(e) {
|
|
1054
1054
|
var r, n, i = this._events;
|
|
1055
1055
|
return i ? (r = i[e], r ? typeof r == "function" ? n = [r.listener || r] : n = Nr(r) : n = []) : n = [], n;
|
|
1056
1056
|
};
|
|
1057
|
-
|
|
1057
|
+
g.listenerCount = function(t, e) {
|
|
1058
1058
|
return typeof t.listenerCount == "function" ? t.listenerCount(e) : Ot.call(t, e);
|
|
1059
1059
|
};
|
|
1060
|
-
|
|
1060
|
+
g.prototype.listenerCount = Ot;
|
|
1061
1061
|
function Ot(t) {
|
|
1062
1062
|
var e = this._events;
|
|
1063
1063
|
if (e) {
|
|
@@ -1069,7 +1069,7 @@ function Ot(t) {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
return 0;
|
|
1071
1071
|
}
|
|
1072
|
-
|
|
1072
|
+
g.prototype.eventNames = function() {
|
|
1073
1073
|
return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
|
|
1074
1074
|
};
|
|
1075
1075
|
function Dr(t, e) {
|
|
@@ -1126,18 +1126,18 @@ function Fr(t) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
|
-
var z = [], ne = !1, ee,
|
|
1129
|
+
var z = [], ne = !1, ee, ge = -1;
|
|
1130
1130
|
function Mr() {
|
|
1131
|
-
!ne || !ee || (ne = !1, ee.length ? z = ee.concat(z) :
|
|
1131
|
+
!ne || !ee || (ne = !1, ee.length ? z = ee.concat(z) : ge = -1, z.length && Dt());
|
|
1132
1132
|
}
|
|
1133
1133
|
function Dt() {
|
|
1134
1134
|
if (!ne) {
|
|
1135
1135
|
var t = Tt(Mr);
|
|
1136
1136
|
ne = !0;
|
|
1137
1137
|
for (var e = z.length; e; ) {
|
|
1138
|
-
for (ee = z, z = []; ++
|
|
1139
|
-
ee && ee[
|
|
1140
|
-
|
|
1138
|
+
for (ee = z, z = []; ++ge < e; )
|
|
1139
|
+
ee && ee[ge].run();
|
|
1140
|
+
ge = -1, e = z.length;
|
|
1141
1141
|
}
|
|
1142
1142
|
ee = null, ne = !1, Fr(t);
|
|
1143
1143
|
}
|
|
@@ -1157,7 +1157,7 @@ Nt.prototype.run = function() {
|
|
|
1157
1157
|
};
|
|
1158
1158
|
var Br = {}, se = ie.performance || {};
|
|
1159
1159
|
se.now || se.mozNow || se.msNow || se.oNow || se.webkitNow;
|
|
1160
|
-
var
|
|
1160
|
+
var me = {
|
|
1161
1161
|
env: Br
|
|
1162
1162
|
}, ke;
|
|
1163
1163
|
typeof Object.create == "function" ? ke = function(e, r) {
|
|
@@ -1208,14 +1208,14 @@ function Ft(t, e) {
|
|
|
1208
1208
|
return function() {
|
|
1209
1209
|
return Ft(t, e).apply(this, arguments);
|
|
1210
1210
|
};
|
|
1211
|
-
if (
|
|
1211
|
+
if (me.noDeprecation === !0)
|
|
1212
1212
|
return t;
|
|
1213
1213
|
var r = !1;
|
|
1214
1214
|
function n() {
|
|
1215
1215
|
if (!r) {
|
|
1216
|
-
if (
|
|
1216
|
+
if (me.throwDeprecation)
|
|
1217
1217
|
throw new Error(e);
|
|
1218
|
-
|
|
1218
|
+
me.traceDeprecation ? console.trace(e) : console.error(e), r = !0;
|
|
1219
1219
|
}
|
|
1220
1220
|
return t.apply(this, arguments);
|
|
1221
1221
|
}
|
|
@@ -1223,7 +1223,7 @@ function Ft(t, e) {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
var pe = {}, Oe;
|
|
1225
1225
|
function Pr(t) {
|
|
1226
|
-
if (Q(Oe) && (Oe =
|
|
1226
|
+
if (Q(Oe) && (Oe = me.env.NODE_DEBUG || ""), t = t.toUpperCase(), !pe[t])
|
|
1227
1227
|
if (new RegExp("\\b" + t + "\\b", "i").test(Oe)) {
|
|
1228
1228
|
var e = 0;
|
|
1229
1229
|
pe[t] = function() {
|
|
@@ -1317,8 +1317,8 @@ function ye(t, e, r) {
|
|
|
1317
1317
|
return Le(e) ? t.stylize(RegExp.prototype.toString.call(e), "regexp") : t.stylize("[Object]", "special");
|
|
1318
1318
|
t.seen.push(e);
|
|
1319
1319
|
var d;
|
|
1320
|
-
return u ? d = Vr(t, e, r, s, o) : d = o.map(function(
|
|
1321
|
-
return Pe(t, e, r, s,
|
|
1320
|
+
return u ? d = Vr(t, e, r, s, o) : d = o.map(function(m) {
|
|
1321
|
+
return Pe(t, e, r, s, m, u);
|
|
1322
1322
|
}), t.seen.pop(), Jr(d, a, c);
|
|
1323
1323
|
}
|
|
1324
1324
|
function zr(t, e) {
|
|
@@ -1567,7 +1567,7 @@ function Kr(t) {
|
|
|
1567
1567
|
}
|
|
1568
1568
|
I.ReadableState = Ut;
|
|
1569
1569
|
var b = Pr("stream");
|
|
1570
|
-
oe(I,
|
|
1570
|
+
oe(I, g);
|
|
1571
1571
|
function en(t, e, r) {
|
|
1572
1572
|
if (typeof t.prependListener == "function")
|
|
1573
1573
|
return t.prependListener(e, r);
|
|
@@ -1583,7 +1583,7 @@ function Ut(t, e) {
|
|
|
1583
1583
|
}
|
|
1584
1584
|
function I(t) {
|
|
1585
1585
|
if (!(this instanceof I)) return new I(t);
|
|
1586
|
-
this._readableState = new Ut(t, this), this.readable = !0, t && typeof t.read == "function" && (this._read = t.read),
|
|
1586
|
+
this._readableState = new Ut(t, this), this.readable = !0, t && typeof t.read == "function" && (this._read = t.read), g.call(this);
|
|
1587
1587
|
}
|
|
1588
1588
|
I.prototype.push = function(t, e) {
|
|
1589
1589
|
var r = this._readableState;
|
|
@@ -1698,7 +1698,7 @@ I.prototype.pipe = function(t, e) {
|
|
|
1698
1698
|
t.on("drain", a);
|
|
1699
1699
|
var u = !1;
|
|
1700
1700
|
function c() {
|
|
1701
|
-
b("cleanup"), t.removeListener("close", O), t.removeListener("finish", E), t.removeListener("drain", a), t.removeListener("error",
|
|
1701
|
+
b("cleanup"), t.removeListener("close", O), t.removeListener("finish", E), t.removeListener("drain", a), t.removeListener("error", m), t.removeListener("unpipe", s), r.removeListener("end", f), r.removeListener("end", c), r.removeListener("data", d), u = !0, n.awaitDrain && (!t._writableState || t._writableState.needDrain) && a();
|
|
1702
1702
|
}
|
|
1703
1703
|
var h = !1;
|
|
1704
1704
|
r.on("data", d);
|
|
@@ -1707,10 +1707,10 @@ I.prototype.pipe = function(t, e) {
|
|
|
1707
1707
|
var y = t.write(S);
|
|
1708
1708
|
y === !1 && !h && ((n.pipesCount === 1 && n.pipes === t || n.pipesCount > 1 && $t(n.pipes, t) !== -1) && !u && (b("false write response, pause", r._readableState.awaitDrain), r._readableState.awaitDrain++, h = !0), r.pause());
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1711
|
-
b("onerror", S), x(), t.removeListener("error",
|
|
1710
|
+
function m(S) {
|
|
1711
|
+
b("onerror", S), x(), t.removeListener("error", m), tn(t, "error") === 0 && t.emit("error", S);
|
|
1712
1712
|
}
|
|
1713
|
-
en(t, "error",
|
|
1713
|
+
en(t, "error", m);
|
|
1714
1714
|
function O() {
|
|
1715
1715
|
t.removeListener("finish", E), x();
|
|
1716
1716
|
}
|
|
@@ -1746,7 +1746,7 @@ I.prototype.unpipe = function(t) {
|
|
|
1746
1746
|
return o === -1 ? this : (e.pipes.splice(o, 1), e.pipesCount -= 1, e.pipesCount === 1 && (e.pipes = e.pipes[0]), t.emit("unpipe", this), this);
|
|
1747
1747
|
};
|
|
1748
1748
|
I.prototype.on = function(t, e) {
|
|
1749
|
-
var r =
|
|
1749
|
+
var r = g.prototype.on.call(this, t, e);
|
|
1750
1750
|
if (t === "data")
|
|
1751
1751
|
this._readableState.flowing !== !1 && this.resume();
|
|
1752
1752
|
else if (t === "readable") {
|
|
@@ -1812,7 +1812,7 @@ function Pt(t, e) {
|
|
|
1812
1812
|
}
|
|
1813
1813
|
function dn(t, e, r) {
|
|
1814
1814
|
var n;
|
|
1815
|
-
return t < e.head.data.length ? (n = e.head.data.slice(0, t), e.head.data = e.head.data.slice(t)) : t === e.head.data.length ? n = e.shift() : n = r ? pn(t, e) :
|
|
1815
|
+
return t < e.head.data.length ? (n = e.head.data.slice(0, t), e.head.data = e.head.data.slice(t)) : t === e.head.data.length ? n = e.shift() : n = r ? pn(t, e) : gn(t, e), n;
|
|
1816
1816
|
}
|
|
1817
1817
|
function pn(t, e) {
|
|
1818
1818
|
var r = e.head, n = 1, i = r.data;
|
|
@@ -1826,7 +1826,7 @@ function pn(t, e) {
|
|
|
1826
1826
|
}
|
|
1827
1827
|
return e.length -= n, i;
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1829
|
+
function gn(t, e) {
|
|
1830
1830
|
var r = l.allocUnsafe(t), n = e.head, i = 1;
|
|
1831
1831
|
for (n.data.copy(r), t -= n.data.length; n = n.next; ) {
|
|
1832
1832
|
var o = n.data, s = t > o.length ? o.length : t;
|
|
@@ -1841,9 +1841,9 @@ function mn(t, e) {
|
|
|
1841
1841
|
function Ne(t) {
|
|
1842
1842
|
var e = t._readableState;
|
|
1843
1843
|
if (e.length > 0) throw new Error('"endReadable()" called on non-empty stream');
|
|
1844
|
-
e.endEmitted || (e.ended = !0, B(
|
|
1844
|
+
e.endEmitted || (e.ended = !0, B(mn, e, t));
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function mn(t, e) {
|
|
1847
1847
|
!t.endEmitted && t.length === 0 && (t.endEmitted = !0, e.readable = !1, e.emit("end"));
|
|
1848
1848
|
}
|
|
1849
1849
|
function _n(t, e) {
|
|
@@ -1856,7 +1856,7 @@ function $t(t, e) {
|
|
|
1856
1856
|
return -1;
|
|
1857
1857
|
}
|
|
1858
1858
|
T.WritableState = He;
|
|
1859
|
-
oe(T,
|
|
1859
|
+
oe(T, g);
|
|
1860
1860
|
function wn() {
|
|
1861
1861
|
}
|
|
1862
1862
|
function yn(t, e, r) {
|
|
@@ -1882,7 +1882,7 @@ He.prototype.getBuffer = function() {
|
|
|
1882
1882
|
};
|
|
1883
1883
|
function T(t) {
|
|
1884
1884
|
if (!(this instanceof T) && !(this instanceof M)) return new T(t);
|
|
1885
|
-
this._writableState = new He(t, this), this.writable = !0, t && (typeof t.write == "function" && (this._write = t.write), typeof t.writev == "function" && (this._writev = t.writev)),
|
|
1885
|
+
this._writableState = new He(t, this), this.writable = !0, t && (typeof t.write == "function" && (this._write = t.write), typeof t.writev == "function" && (this._writev = t.writev)), g.call(this);
|
|
1886
1886
|
}
|
|
1887
1887
|
T.prototype.pipe = function() {
|
|
1888
1888
|
this.emit("error", new Error("Cannot pipe, not readable"));
|
|
@@ -2073,7 +2073,7 @@ function fe(t) {
|
|
|
2073
2073
|
fe.prototype._transform = function(t, e, r) {
|
|
2074
2074
|
r(null, t);
|
|
2075
2075
|
};
|
|
2076
|
-
oe(V,
|
|
2076
|
+
oe(V, g);
|
|
2077
2077
|
V.Readable = I;
|
|
2078
2078
|
V.Writable = T;
|
|
2079
2079
|
V.Duplex = M;
|
|
@@ -2081,7 +2081,7 @@ V.Transform = k;
|
|
|
2081
2081
|
V.PassThrough = fe;
|
|
2082
2082
|
V.Stream = V;
|
|
2083
2083
|
function V() {
|
|
2084
|
-
|
|
2084
|
+
g.call(this);
|
|
2085
2085
|
}
|
|
2086
2086
|
V.prototype.pipe = function(t, e) {
|
|
2087
2087
|
var r = this;
|
|
@@ -2101,7 +2101,7 @@ V.prototype.pipe = function(t, e) {
|
|
|
2101
2101
|
o || (o = !0, typeof t.destroy == "function" && t.destroy());
|
|
2102
2102
|
}
|
|
2103
2103
|
function a(c) {
|
|
2104
|
-
if (u(),
|
|
2104
|
+
if (u(), g.listenerCount(this, "error") === 0)
|
|
2105
2105
|
throw c;
|
|
2106
2106
|
}
|
|
2107
2107
|
r.on("error", a), t.on("error", a);
|
|
@@ -2665,7 +2665,7 @@ const Nn = 12, Fn = 13, Mn = 10, Bn = 32, Un = 9, kn = function(t) {
|
|
|
2665
2665
|
state: kn(r),
|
|
2666
2666
|
__needMoreData: function(n, i, o) {
|
|
2667
2667
|
if (o) return !1;
|
|
2668
|
-
const { encoding: s, escape: f, quote: a } = this.options, { quoting: u, needMoreDataSize: c, recordDelimiterMaxLength: h } = this.state, d = i - n - 1,
|
|
2668
|
+
const { encoding: s, escape: f, quote: a } = this.options, { quoting: u, needMoreDataSize: c, recordDelimiterMaxLength: h } = this.state, d = i - n - 1, m = Math.max(
|
|
2669
2669
|
c,
|
|
2670
2670
|
// Skip if the remaining buffer smaller than record delimiter
|
|
2671
2671
|
// If "record_delimiter" is yet to be discovered:
|
|
@@ -2680,7 +2680,7 @@ const Nn = 12, Fn = 13, Mn = 10, Bn = 32, Un = 9, kn = function(t) {
|
|
|
2680
2680
|
// Skip if remaining buffer can be record delimiter following the closing quote
|
|
2681
2681
|
u ? a.length + h : 0
|
|
2682
2682
|
);
|
|
2683
|
-
return d <
|
|
2683
|
+
return d < m;
|
|
2684
2684
|
},
|
|
2685
2685
|
// Central parser implementation
|
|
2686
2686
|
parse: function(n, i, o, s) {
|
|
@@ -2691,7 +2691,7 @@ const Nn = 12, Fn = 13, Mn = 10, Bn = 32, Un = 9, kn = function(t) {
|
|
|
2691
2691
|
from_line: c,
|
|
2692
2692
|
ltrim: h,
|
|
2693
2693
|
max_record_size: d,
|
|
2694
|
-
raw:
|
|
2694
|
+
raw: m,
|
|
2695
2695
|
relax_quotes: O,
|
|
2696
2696
|
rtrim: E,
|
|
2697
2697
|
skip_empty_lines: x,
|
|
@@ -2744,7 +2744,7 @@ const Nn = 12, Fn = 13, Mn = 10, Bn = 32, Un = 9, kn = function(t) {
|
|
|
2744
2744
|
p
|
|
2745
2745
|
) && (Re = this.options.record_delimiter);
|
|
2746
2746
|
const C = v[p];
|
|
2747
|
-
if (
|
|
2747
|
+
if (m === !0 && Qt.append(C), (C === $n || C === jn) && this.state.wasRowDelimiter === !1 && (this.state.wasRowDelimiter = !0), this.state.escaping === !0)
|
|
2748
2748
|
this.state.escaping = !1;
|
|
2749
2749
|
else {
|
|
2750
2750
|
if (R !== null && this.state.quoting === !0 && this.__isEscape(v, p, C) && p + R.length < Ie)
|
|
@@ -2931,13 +2931,13 @@ const Nn = 12, Fn = 13, Mn = 10, Bn = 32, Un = 9, kn = function(t) {
|
|
|
2931
2931
|
relax_column_count_less: c,
|
|
2932
2932
|
relax_column_count_more: h,
|
|
2933
2933
|
raw: d,
|
|
2934
|
-
skip_records_with_empty_values:
|
|
2934
|
+
skip_records_with_empty_values: m
|
|
2935
2935
|
} = this.options, { enabled: O, record: E } = this.state;
|
|
2936
2936
|
if (O === !1)
|
|
2937
2937
|
return this.__resetRecord();
|
|
2938
2938
|
const x = E.length;
|
|
2939
2939
|
if (i === !0) {
|
|
2940
|
-
if (
|
|
2940
|
+
if (m === !0 && ut(E)) {
|
|
2941
2941
|
this.__resetRecord();
|
|
2942
2942
|
return;
|
|
2943
2943
|
}
|
|
@@ -2977,7 +2977,7 @@ const Nn = 12, Fn = 13, Mn = 10, Bn = 32, Un = 9, kn = function(t) {
|
|
|
2977
2977
|
if (y) return y;
|
|
2978
2978
|
}
|
|
2979
2979
|
}
|
|
2980
|
-
if (
|
|
2980
|
+
if (m === !0 && ut(E)) {
|
|
2981
2981
|
this.__resetRecord();
|
|
2982
2982
|
return;
|
|
2983
2983
|
}
|
|
@@ -3401,7 +3401,7 @@ class ri {
|
|
|
3401
3401
|
async parseStream(e, r, n, i, o) {
|
|
3402
3402
|
return new Promise((s, f) => {
|
|
3403
3403
|
let a, u, c, h = !1, d = !1;
|
|
3404
|
-
const
|
|
3404
|
+
const m = () => {
|
|
3405
3405
|
if (d) return;
|
|
3406
3406
|
d = !0;
|
|
3407
3407
|
const x = a;
|
|
@@ -3409,9 +3409,9 @@ class ri {
|
|
|
3409
3409
|
u?.cancel();
|
|
3410
3410
|
}), u = void 0;
|
|
3411
3411
|
};
|
|
3412
|
-
i.signal.addEventListener("abort",
|
|
3412
|
+
i.signal.addEventListener("abort", m, { once: !0 });
|
|
3413
3413
|
const O = (x) => {
|
|
3414
|
-
h || (h = !0,
|
|
3414
|
+
h || (h = !0, m(), i.signal.aborted || i.abort(x), f(x));
|
|
3415
3415
|
};
|
|
3416
3416
|
(async () => {
|
|
3417
3417
|
a = je(r), c = ei({ chunk: o, chunkSize: e.chunkSize ?? Gn }), a.on("readable", () => {
|
|
@@ -3459,6 +3459,7 @@ async function Kn(t) {
|
|
|
3459
3459
|
let r, n, i;
|
|
3460
3460
|
for (const o of e)
|
|
3461
3461
|
try {
|
|
3462
|
+
console.log("0000", o);
|
|
3462
3463
|
let s = 0, f, a = 0, u = 0;
|
|
3463
3464
|
const c = je({ delimiter: o, relax_column_count: !0 });
|
|
3464
3465
|
await new Promise((h) => {
|
|
@@ -3467,10 +3468,12 @@ async function Kn(t) {
|
|
|
3467
3468
|
let d;
|
|
3468
3469
|
for (; (d = c.read()) != null; ) {
|
|
3469
3470
|
a++;
|
|
3470
|
-
const
|
|
3471
|
-
f != null && (u += Math.abs(
|
|
3471
|
+
const m = d.length;
|
|
3472
|
+
f != null && (u += Math.abs(m - f)), f = m, s += m;
|
|
3472
3473
|
}
|
|
3473
|
-
}), c.on("error", () =>
|
|
3474
|
+
}), c.on("error", (d) => {
|
|
3475
|
+
console.log(7777, d), h();
|
|
3476
|
+
}), c.on("end", () => {
|
|
3474
3477
|
const d = s / a;
|
|
3475
3478
|
console.log(1111, r, n, i, d), (!i || u <= i) && (!n || d > n) && (r = o, n = d, i = u), console.log(2222, r, n, i), h();
|
|
3476
3479
|
}), c.write(t), c.end();
|
|
@@ -3481,7 +3484,7 @@ async function Kn(t) {
|
|
|
3481
3484
|
} catch (s) {
|
|
3482
3485
|
console.log(8888, s);
|
|
3483
3486
|
}
|
|
3484
|
-
return console.log(
|
|
3487
|
+
return console.log(3333, r), r ?? ",";
|
|
3485
3488
|
}
|
|
3486
3489
|
function ei(t) {
|
|
3487
3490
|
const e = Math.max(1, Math.floor(t.chunkSize)), r = [];
|