@datapos/datapos-tool-csv-parse 0.0.40 → 0.0.42

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.
@@ -1,20 +1,20 @@
1
- var ie = typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : {}, P = [], F = [], Qt = typeof Uint8Array < "u" ? Uint8Array : Array, $e = !1;
2
- function ut() {
1
+ var ie = typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : {}, P = [], M = [], Qt = typeof Uint8Array < "u" ? Uint8Array : Array, $e = !1;
2
+ function lt() {
3
3
  $e = !0;
4
4
  for (var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = 0, r = t.length; e < r; ++e)
5
- P[e] = t[e], F[t.charCodeAt(e)] = e;
6
- F[45] = 62, F[95] = 63;
5
+ P[e] = t[e], M[t.charCodeAt(e)] = e;
6
+ M[45] = 62, M[95] = 63;
7
7
  }
8
8
  function Gt(t) {
9
- $e || ut();
9
+ $e || lt();
10
10
  var e, r, n, i, o, s, f = t.length;
11
11
  if (f % 4 > 0)
12
12
  throw new Error("Invalid string. Length must be a multiple of 4");
13
13
  o = t[f - 2] === "=" ? 2 : t[f - 1] === "=" ? 1 : 0, s = new Qt(f * 3 / 4 - o), n = o > 0 ? f - 4 : f;
14
- var l = 0;
14
+ var u = 0;
15
15
  for (e = 0, r = 0; e < n; e += 4, r += 3)
16
- i = F[t.charCodeAt(e)] << 18 | F[t.charCodeAt(e + 1)] << 12 | F[t.charCodeAt(e + 2)] << 6 | F[t.charCodeAt(e + 3)], s[l++] = i >> 16 & 255, s[l++] = i >> 8 & 255, s[l++] = i & 255;
17
- return o === 2 ? (i = F[t.charCodeAt(e)] << 2 | F[t.charCodeAt(e + 1)] >> 4, s[l++] = i & 255) : o === 1 && (i = F[t.charCodeAt(e)] << 10 | F[t.charCodeAt(e + 1)] << 4 | F[t.charCodeAt(e + 2)] >> 2, s[l++] = i >> 8 & 255, s[l++] = i & 255), s;
16
+ i = M[t.charCodeAt(e)] << 18 | M[t.charCodeAt(e + 1)] << 12 | M[t.charCodeAt(e + 2)] << 6 | M[t.charCodeAt(e + 3)], s[u++] = i >> 16 & 255, s[u++] = i >> 8 & 255, s[u++] = i & 255;
17
+ return o === 2 ? (i = M[t.charCodeAt(e)] << 2 | M[t.charCodeAt(e + 1)] >> 4, s[u++] = i & 255) : o === 1 && (i = M[t.charCodeAt(e)] << 10 | M[t.charCodeAt(e + 1)] << 4 | M[t.charCodeAt(e + 2)] >> 2, s[u++] = i >> 8 & 255, s[u++] = i & 255), s;
18
18
  }
19
19
  function Zt(t) {
20
20
  return P[t >> 18 & 63] + P[t >> 12 & 63] + P[t >> 6 & 63] + P[t & 63];
@@ -25,31 +25,31 @@ function Xt(t, e, r) {
25
25
  return i.join("");
26
26
  }
27
27
  function Qe(t) {
28
- $e || ut();
29
- for (var e, r = t.length, n = r % 3, i = "", o = [], s = 16383, f = 0, l = r - n; f < l; f += s)
30
- o.push(Xt(t, f, f + s > l ? l : f + s));
28
+ $e || lt();
29
+ for (var e, r = t.length, n = r % 3, i = "", o = [], s = 16383, f = 0, u = r - n; f < u; f += s)
30
+ o.push(Xt(t, f, f + s > u ? u : f + s));
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
- function ve(t, e, r, n, i) {
34
- var o, s, f = i * 8 - n - 1, l = (1 << f) - 1, u = l >> 1, h = -7, c = r ? i - 1 : 0, g = r ? -1 : 1, y = t[e + c];
33
+ function be(t, e, r, n, i) {
34
+ var o, s, f = i * 8 - n - 1, u = (1 << f) - 1, l = u >> 1, h = -7, c = r ? i - 1 : 0, g = r ? -1 : 1, y = t[e + c];
35
35
  for (c += g, o = y & (1 << -h) - 1, y >>= -h, h += f; h > 0; o = o * 256 + t[e + c], c += g, h -= 8)
36
36
  ;
37
37
  for (s = o & (1 << -h) - 1, o >>= -h, h += n; h > 0; s = s * 256 + t[e + c], c += g, h -= 8)
38
38
  ;
39
39
  if (o === 0)
40
- o = 1 - u;
40
+ o = 1 - l;
41
41
  else {
42
- if (o === l)
42
+ if (o === u)
43
43
  return s ? NaN : (y ? -1 : 1) * (1 / 0);
44
- s = s + Math.pow(2, n), o = o - u;
44
+ s = s + Math.pow(2, n), o = o - l;
45
45
  }
46
46
  return (y ? -1 : 1) * s * Math.pow(2, o - n);
47
47
  }
48
48
  function ht(t, e, r, n, i, o) {
49
- var s, f, l, u = o * 8 - i - 1, h = (1 << u) - 1, c = h >> 1, g = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = 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 = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (l = Math.pow(2, -s)) < 1 && (s--, l *= 2), s + c >= 1 ? e += g / l : e += g * Math.pow(2, 1 - c), e * l >= 2 && (s++, l /= 2), s + c >= h ? (f = 0, s = h) : s + c >= 1 ? (f = (e * l - 1) * Math.pow(2, i), s = s + c) : (f = e * Math.pow(2, c - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + y] = f & 255, y += O, f /= 256, i -= 8)
49
+ var s, f, u, l = o * 8 - i - 1, h = (1 << l) - 1, c = h >> 1, g = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = 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 = h) : (s = Math.floor(Math.log(e) / Math.LN2), e * (u = Math.pow(2, -s)) < 1 && (s--, u *= 2), s + c >= 1 ? e += g / u : e += g * Math.pow(2, 1 - c), e * u >= 2 && (s++, u /= 2), s + c >= h ? (f = 0, s = h) : s + c >= 1 ? (f = (e * u - 1) * Math.pow(2, i), s = s + c) : (f = e * Math.pow(2, c - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + y] = f & 255, y += O, f /= 256, i -= 8)
51
51
  ;
52
- for (s = s << i | f, u += i; u > 0; t[r + y] = s & 255, y += O, s /= 256, u -= 8)
52
+ for (s = s << i | f, l += i; l > 0; t[r + y] = s & 255, y += O, s /= 256, l -= 8)
53
53
  ;
54
54
  t[r + y - O] |= E * 128;
55
55
  }
@@ -57,12 +57,12 @@ var Kt = {}.toString, ct = Array.isArray || function(t) {
57
57
  return Kt.call(t) == "[object Array]";
58
58
  }, er = 50;
59
59
  a.TYPED_ARRAY_SUPPORT = ie.TYPED_ARRAY_SUPPORT !== void 0 ? ie.TYPED_ARRAY_SUPPORT : !0;
60
- _e();
61
- function _e() {
60
+ we();
61
+ function we() {
62
62
  return a.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
63
63
  }
64
64
  function q(t, e) {
65
- if (_e() < e)
65
+ if (we() < e)
66
66
  throw new RangeError("Invalid typed array length");
67
67
  return a.TYPED_ARRAY_SUPPORT ? (t = new Uint8Array(e), t.__proto__ = a.prototype) : (t === null && (t = new a(e)), t.length = e), t;
68
68
  }
@@ -151,11 +151,11 @@ function ir(t, e) {
151
151
  throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
152
152
  }
153
153
  function qe(t) {
154
- if (t >= _e())
155
- throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + _e().toString(16) + " bytes");
154
+ if (t >= we())
155
+ throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + we().toString(16) + " bytes");
156
156
  return t | 0;
157
157
  }
158
- a.isBuffer = N;
158
+ a.isBuffer = D;
159
159
  function $(t) {
160
160
  return !!(t != null && t._isBuffer);
161
161
  }
@@ -223,7 +223,7 @@ function gt(t, e) {
223
223
  case "utf8":
224
224
  case "utf-8":
225
225
  case void 0:
226
- return we(t).length;
226
+ return ye(t).length;
227
227
  case "ucs2":
228
228
  case "ucs-2":
229
229
  case "utf16le":
@@ -234,7 +234,7 @@ function gt(t, e) {
234
234
  case "base64":
235
235
  return Et(t).length;
236
236
  default:
237
- if (n) return we(t).length;
237
+ if (n) return ye(t).length;
238
238
  e = ("" + e).toLowerCase(), n = !0;
239
239
  }
240
240
  }
@@ -320,9 +320,9 @@ a.prototype.compare = function(e, r, n, i, o) {
320
320
  if (r >= n)
321
321
  return 1;
322
322
  if (r >>>= 0, n >>>= 0, i >>>= 0, o >>>= 0, this === e) return 0;
323
- for (var s = o - i, f = n - r, l = Math.min(s, f), u = this.slice(i, o), h = e.slice(r, n), c = 0; c < l; ++c)
324
- if (u[c] !== h[c]) {
325
- s = u[c], f = h[c];
323
+ for (var s = o - i, f = n - r, u = Math.min(s, f), l = this.slice(i, o), h = e.slice(r, n), c = 0; c < u; ++c)
324
+ if (l[c] !== h[c]) {
325
+ s = l[c], f = h[c];
326
326
  break;
327
327
  }
328
328
  return s < f ? -1 : f < s ? 1 : 0;
@@ -348,25 +348,25 @@ function Ge(t, e, r, n, i) {
348
348
  return -1;
349
349
  o = 2, s /= 2, f /= 2, r /= 2;
350
350
  }
351
- function l(y, O) {
351
+ function u(y, O) {
352
352
  return o === 1 ? y[O] : y.readUInt16BE(O * o);
353
353
  }
354
- var u;
354
+ var l;
355
355
  if (i) {
356
356
  var h = -1;
357
- for (u = r; u < s; u++)
358
- if (l(t, u) === l(e, h === -1 ? 0 : u - h)) {
359
- if (h === -1 && (h = u), u - h + 1 === f) return h * o;
357
+ for (l = r; l < s; l++)
358
+ if (u(t, l) === u(e, h === -1 ? 0 : l - h)) {
359
+ if (h === -1 && (h = l), l - h + 1 === f) return h * o;
360
360
  } else
361
- h !== -1 && (u -= u - h), h = -1;
361
+ h !== -1 && (l -= l - h), h = -1;
362
362
  } else
363
- for (r + f > s && (r = s - f), u = r; u >= 0; u--) {
363
+ for (r + f > s && (r = s - f), l = r; l >= 0; l--) {
364
364
  for (var c = !0, g = 0; g < f; g++)
365
- if (l(t, u + g) !== l(e, g)) {
365
+ if (u(t, l + g) !== u(e, g)) {
366
366
  c = !1;
367
367
  break;
368
368
  }
369
- if (c) return u;
369
+ if (c) return l;
370
370
  }
371
371
  return -1;
372
372
  }
@@ -394,19 +394,19 @@ function sr(t, e, r, n) {
394
394
  return s;
395
395
  }
396
396
  function fr(t, e, r, n) {
397
- return xe(we(e, t.length - r), t, r, n);
397
+ return Se(ye(e, t.length - r), t, r, n);
398
398
  }
399
399
  function _t(t, e, r, n) {
400
- return xe(br(e), t, r, n);
400
+ return Se(br(e), t, r, n);
401
401
  }
402
402
  function ar(t, e, r, n) {
403
403
  return _t(t, e, r, n);
404
404
  }
405
- function lr(t, e, r, n) {
406
- return xe(Et(e), t, r, n);
407
- }
408
405
  function ur(t, e, r, n) {
409
- return xe(Er(e, t.length - r), t, r, n);
406
+ return Se(Et(e), t, r, n);
407
+ }
408
+ function lr(t, e, r, n) {
409
+ return Se(Er(e, t.length - r), t, r, n);
410
410
  }
411
411
  a.prototype.write = function(e, r, n, i) {
412
412
  if (r === void 0)
@@ -436,12 +436,12 @@ a.prototype.write = function(e, r, n, i) {
436
436
  case "binary":
437
437
  return ar(this, e, r, n);
438
438
  case "base64":
439
- return lr(this, e, r, n);
439
+ return ur(this, e, r, n);
440
440
  case "ucs2":
441
441
  case "ucs-2":
442
442
  case "utf16le":
443
443
  case "utf-16le":
444
- return ur(this, e, r, n);
444
+ return lr(this, e, r, n);
445
445
  default:
446
446
  if (s) throw new TypeError("Unknown encoding: " + i);
447
447
  i = ("" + i).toLowerCase(), s = !0;
@@ -461,19 +461,19 @@ function wt(t, e, r) {
461
461
  for (var n = [], i = e; i < r; ) {
462
462
  var o = t[i], s = null, f = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
463
463
  if (i + f <= r) {
464
- var l, u, h, c;
464
+ var u, l, h, c;
465
465
  switch (f) {
466
466
  case 1:
467
467
  o < 128 && (s = o);
468
468
  break;
469
469
  case 2:
470
- l = t[i + 1], (l & 192) === 128 && (c = (o & 31) << 6 | l & 63, c > 127 && (s = c));
470
+ u = t[i + 1], (u & 192) === 128 && (c = (o & 31) << 6 | u & 63, c > 127 && (s = c));
471
471
  break;
472
472
  case 3:
473
- l = t[i + 1], u = t[i + 2], (l & 192) === 128 && (u & 192) === 128 && (c = (o & 15) << 12 | (l & 63) << 6 | u & 63, c > 2047 && (c < 55296 || c > 57343) && (s = c));
473
+ u = t[i + 1], l = t[i + 2], (u & 192) === 128 && (l & 192) === 128 && (c = (o & 15) << 12 | (u & 63) << 6 | l & 63, c > 2047 && (c < 55296 || c > 57343) && (s = c));
474
474
  break;
475
475
  case 4:
476
- l = t[i + 1], u = t[i + 2], h = t[i + 3], (l & 192) === 128 && (u & 192) === 128 && (h & 192) === 128 && (c = (o & 15) << 18 | (l & 63) << 12 | (u & 63) << 6 | h & 63, c > 65535 && c < 1114112 && (s = c));
476
+ u = t[i + 1], l = t[i + 2], h = t[i + 3], (u & 192) === 128 && (l & 192) === 128 && (h & 192) === 128 && (c = (o & 15) << 18 | (u & 63) << 12 | (l & 63) << 6 | h & 63, c > 65535 && c < 1114112 && (s = c));
477
477
  }
478
478
  }
479
479
  s === null ? (s = 65533, f = 1) : s > 65535 && (s -= 65536, n.push(s >>> 10 & 1023 | 55296), s = 56320 | s & 1023), n.push(s), i += f;
@@ -532,81 +532,81 @@ a.prototype.slice = function(e, r) {
532
532
  }
533
533
  return i;
534
534
  };
535
- function A(t, e, r) {
535
+ function T(t, e, r) {
536
536
  if (t % 1 !== 0 || t < 0) throw new RangeError("offset is not uint");
537
537
  if (t + e > r) throw new RangeError("Trying to access beyond buffer length");
538
538
  }
539
539
  a.prototype.readUIntLE = function(e, r, n) {
540
- e = e | 0, r = r | 0, n || A(e, r, this.length);
540
+ e = e | 0, r = r | 0, n || T(e, r, this.length);
541
541
  for (var i = this[e], o = 1, s = 0; ++s < r && (o *= 256); )
542
542
  i += this[e + s] * o;
543
543
  return i;
544
544
  };
545
545
  a.prototype.readUIntBE = function(e, r, n) {
546
- e = e | 0, r = r | 0, n || A(e, r, this.length);
546
+ e = e | 0, r = r | 0, n || T(e, r, this.length);
547
547
  for (var i = this[e + --r], o = 1; r > 0 && (o *= 256); )
548
548
  i += this[e + --r] * o;
549
549
  return i;
550
550
  };
551
551
  a.prototype.readUInt8 = function(e, r) {
552
- return r || A(e, 1, this.length), this[e];
552
+ return r || T(e, 1, this.length), this[e];
553
553
  };
554
554
  a.prototype.readUInt16LE = function(e, r) {
555
- return r || A(e, 2, this.length), this[e] | this[e + 1] << 8;
555
+ return r || T(e, 2, this.length), this[e] | this[e + 1] << 8;
556
556
  };
557
557
  a.prototype.readUInt16BE = function(e, r) {
558
- return r || A(e, 2, this.length), this[e] << 8 | this[e + 1];
558
+ return r || T(e, 2, this.length), this[e] << 8 | this[e + 1];
559
559
  };
560
560
  a.prototype.readUInt32LE = function(e, r) {
561
- return r || A(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
561
+ return r || T(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
562
562
  };
563
563
  a.prototype.readUInt32BE = function(e, r) {
564
- return r || A(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
564
+ return r || T(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
565
565
  };
566
566
  a.prototype.readIntLE = function(e, r, n) {
567
- e = e | 0, r = r | 0, n || A(e, r, this.length);
567
+ e = e | 0, r = r | 0, n || T(e, r, this.length);
568
568
  for (var i = this[e], o = 1, s = 0; ++s < r && (o *= 256); )
569
569
  i += this[e + s] * o;
570
570
  return o *= 128, i >= o && (i -= Math.pow(2, 8 * r)), i;
571
571
  };
572
572
  a.prototype.readIntBE = function(e, r, n) {
573
- e = e | 0, r = r | 0, n || A(e, r, this.length);
573
+ e = e | 0, r = r | 0, n || T(e, r, this.length);
574
574
  for (var i = r, o = 1, s = this[e + --i]; i > 0 && (o *= 256); )
575
575
  s += this[e + --i] * o;
576
576
  return o *= 128, s >= o && (s -= Math.pow(2, 8 * r)), s;
577
577
  };
578
578
  a.prototype.readInt8 = function(e, r) {
579
- return r || A(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
579
+ return r || T(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
580
580
  };
581
581
  a.prototype.readInt16LE = function(e, r) {
582
- r || A(e, 2, this.length);
582
+ r || T(e, 2, this.length);
583
583
  var n = this[e] | this[e + 1] << 8;
584
584
  return n & 32768 ? n | 4294901760 : n;
585
585
  };
586
586
  a.prototype.readInt16BE = function(e, r) {
587
- r || A(e, 2, this.length);
587
+ r || T(e, 2, this.length);
588
588
  var n = this[e + 1] | this[e] << 8;
589
589
  return n & 32768 ? n | 4294901760 : n;
590
590
  };
591
591
  a.prototype.readInt32LE = function(e, r) {
592
- return r || A(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
592
+ return r || T(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
593
593
  };
594
594
  a.prototype.readInt32BE = function(e, r) {
595
- return r || A(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
595
+ return r || T(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
596
596
  };
597
597
  a.prototype.readFloatLE = function(e, r) {
598
- return r || A(e, 4, this.length), ve(this, e, !0, 23, 4);
598
+ return r || T(e, 4, this.length), be(this, e, !0, 23, 4);
599
599
  };
600
600
  a.prototype.readFloatBE = function(e, r) {
601
- return r || A(e, 4, this.length), ve(this, e, !1, 23, 4);
601
+ return r || T(e, 4, this.length), be(this, e, !1, 23, 4);
602
602
  };
603
603
  a.prototype.readDoubleLE = function(e, r) {
604
- return r || A(e, 8, this.length), ve(this, e, !0, 52, 8);
604
+ return r || T(e, 8, this.length), be(this, e, !0, 52, 8);
605
605
  };
606
606
  a.prototype.readDoubleBE = function(e, r) {
607
- return r || A(e, 8, this.length), ve(this, e, !1, 52, 8);
607
+ return r || T(e, 8, this.length), be(this, e, !1, 52, 8);
608
608
  };
609
- function D(t, e, r, n, i, o) {
609
+ function F(t, e, r, n, i, o) {
610
610
  if (!$(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
611
611
  if (e > i || e < o) throw new RangeError('"value" argument is out of bounds');
612
612
  if (r + n > t.length) throw new RangeError("Index out of range");
@@ -614,7 +614,7 @@ function D(t, e, r, n, i, o) {
614
614
  a.prototype.writeUIntLE = function(e, r, n, i) {
615
615
  if (e = +e, r = r | 0, n = n | 0, !i) {
616
616
  var o = Math.pow(2, 8 * n) - 1;
617
- D(this, e, r, n, o, 0);
617
+ F(this, e, r, n, o, 0);
618
618
  }
619
619
  var s = 1, f = 0;
620
620
  for (this[r] = e & 255; ++f < n && (s *= 256); )
@@ -624,7 +624,7 @@ a.prototype.writeUIntLE = function(e, r, n, i) {
624
624
  a.prototype.writeUIntBE = function(e, r, n, i) {
625
625
  if (e = +e, r = r | 0, n = n | 0, !i) {
626
626
  var o = Math.pow(2, 8 * n) - 1;
627
- D(this, e, r, n, o, 0);
627
+ F(this, e, r, n, o, 0);
628
628
  }
629
629
  var s = n - 1, f = 1;
630
630
  for (this[r + s] = e & 255; --s >= 0 && (f *= 256); )
@@ -632,64 +632,64 @@ a.prototype.writeUIntBE = function(e, r, n, i) {
632
632
  return r + n;
633
633
  };
634
634
  a.prototype.writeUInt8 = function(e, r, n) {
635
- return e = +e, r = r | 0, n || D(this, e, r, 1, 255, 0), a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[r] = e & 255, r + 1;
635
+ return e = +e, r = r | 0, n || F(this, e, r, 1, 255, 0), a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[r] = e & 255, r + 1;
636
636
  };
637
- function be(t, e, r, n) {
637
+ function Ee(t, e, r, n) {
638
638
  e < 0 && (e = 65535 + e + 1);
639
639
  for (var i = 0, o = Math.min(t.length - r, 2); i < o; ++i)
640
640
  t[r + i] = (e & 255 << 8 * (n ? i : 1 - i)) >>> (n ? i : 1 - i) * 8;
641
641
  }
642
642
  a.prototype.writeUInt16LE = function(e, r, n) {
643
- return e = +e, r = r | 0, n || D(this, e, r, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : be(this, e, r, !0), r + 2;
643
+ return e = +e, r = r | 0, n || F(this, e, r, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : Ee(this, e, r, !0), r + 2;
644
644
  };
645
645
  a.prototype.writeUInt16BE = function(e, r, n) {
646
- return e = +e, r = r | 0, n || D(this, e, r, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : be(this, e, r, !1), r + 2;
646
+ return e = +e, r = r | 0, n || F(this, e, r, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : Ee(this, e, r, !1), r + 2;
647
647
  };
648
- function Ee(t, e, r, n) {
648
+ function xe(t, e, r, n) {
649
649
  e < 0 && (e = 4294967295 + e + 1);
650
650
  for (var i = 0, o = Math.min(t.length - r, 4); i < o; ++i)
651
651
  t[r + i] = e >>> (n ? i : 3 - i) * 8 & 255;
652
652
  }
653
653
  a.prototype.writeUInt32LE = function(e, r, n) {
654
- return e = +e, r = r | 0, n || D(this, e, r, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[r + 3] = e >>> 24, this[r + 2] = e >>> 16, this[r + 1] = e >>> 8, this[r] = e & 255) : Ee(this, e, r, !0), r + 4;
654
+ return e = +e, r = r | 0, n || F(this, e, r, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[r + 3] = e >>> 24, this[r + 2] = e >>> 16, this[r + 1] = e >>> 8, this[r] = e & 255) : xe(this, e, r, !0), r + 4;
655
655
  };
656
656
  a.prototype.writeUInt32BE = function(e, r, n) {
657
- return e = +e, r = r | 0, n || D(this, e, r, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : Ee(this, e, r, !1), r + 4;
657
+ return e = +e, r = r | 0, n || F(this, e, r, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : xe(this, e, r, !1), r + 4;
658
658
  };
659
659
  a.prototype.writeIntLE = function(e, r, n, i) {
660
660
  if (e = +e, r = r | 0, !i) {
661
661
  var o = Math.pow(2, 8 * n - 1);
662
- D(this, e, r, n, o - 1, -o);
662
+ F(this, e, r, n, o - 1, -o);
663
663
  }
664
- var s = 0, f = 1, l = 0;
664
+ var s = 0, f = 1, u = 0;
665
665
  for (this[r] = e & 255; ++s < n && (f *= 256); )
666
- e < 0 && l === 0 && this[r + s - 1] !== 0 && (l = 1), this[r + s] = (e / f >> 0) - l & 255;
666
+ e < 0 && u === 0 && this[r + s - 1] !== 0 && (u = 1), this[r + s] = (e / f >> 0) - u & 255;
667
667
  return r + n;
668
668
  };
669
669
  a.prototype.writeIntBE = function(e, r, n, i) {
670
670
  if (e = +e, r = r | 0, !i) {
671
671
  var o = Math.pow(2, 8 * n - 1);
672
- D(this, e, r, n, o - 1, -o);
672
+ F(this, e, r, n, o - 1, -o);
673
673
  }
674
- var s = n - 1, f = 1, l = 0;
674
+ var s = n - 1, f = 1, u = 0;
675
675
  for (this[r + s] = e & 255; --s >= 0 && (f *= 256); )
676
- e < 0 && l === 0 && this[r + s + 1] !== 0 && (l = 1), this[r + s] = (e / f >> 0) - l & 255;
676
+ e < 0 && u === 0 && this[r + s + 1] !== 0 && (u = 1), this[r + s] = (e / f >> 0) - u & 255;
677
677
  return r + n;
678
678
  };
679
679
  a.prototype.writeInt8 = function(e, r, n) {
680
- return e = +e, r = r | 0, n || D(this, e, r, 1, 127, -128), a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[r] = e & 255, r + 1;
680
+ return e = +e, r = r | 0, n || F(this, e, r, 1, 127, -128), a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[r] = e & 255, r + 1;
681
681
  };
682
682
  a.prototype.writeInt16LE = function(e, r, n) {
683
- return e = +e, r = r | 0, n || D(this, e, r, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : be(this, e, r, !0), r + 2;
683
+ return e = +e, r = r | 0, n || F(this, e, r, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8) : Ee(this, e, r, !0), r + 2;
684
684
  };
685
685
  a.prototype.writeInt16BE = function(e, r, n) {
686
- return e = +e, r = r | 0, n || D(this, e, r, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : be(this, e, r, !1), r + 2;
686
+ return e = +e, r = r | 0, n || F(this, e, r, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 8, this[r + 1] = e & 255) : Ee(this, e, r, !1), r + 2;
687
687
  };
688
688
  a.prototype.writeInt32LE = function(e, r, n) {
689
- return e = +e, r = r | 0, n || D(this, e, r, 4, 2147483647, -2147483648), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8, this[r + 2] = e >>> 16, this[r + 3] = e >>> 24) : Ee(this, e, r, !0), r + 4;
689
+ return e = +e, r = r | 0, n || F(this, e, r, 4, 2147483647, -2147483648), a.TYPED_ARRAY_SUPPORT ? (this[r] = e & 255, this[r + 1] = e >>> 8, this[r + 2] = e >>> 16, this[r + 3] = e >>> 24) : xe(this, e, r, !0), r + 4;
690
690
  };
691
691
  a.prototype.writeInt32BE = function(e, r, n) {
692
- return e = +e, r = r | 0, n || D(this, e, r, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : Ee(this, e, r, !1), r + 4;
692
+ return e = +e, r = r | 0, n || F(this, e, r, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), a.TYPED_ARRAY_SUPPORT ? (this[r] = e >>> 24, this[r + 1] = e >>> 16, this[r + 2] = e >>> 8, this[r + 3] = e & 255) : xe(this, e, r, !1), r + 4;
693
693
  };
694
694
  function yt(t, e, r, n, i, o) {
695
695
  if (r + n > t.length) throw new RangeError("Index out of range");
@@ -756,9 +756,9 @@ a.prototype.fill = function(e, r, n, i) {
756
756
  for (s = r; s < n; ++s)
757
757
  this[s] = e;
758
758
  else {
759
- var f = $(e) ? e : we(new a(e, i).toString()), l = f.length;
759
+ var f = $(e) ? e : ye(new a(e, i).toString()), u = f.length;
760
760
  for (s = 0; s < n - r; ++s)
761
- this[s + r] = f[s % l];
761
+ this[s + r] = f[s % u];
762
762
  }
763
763
  return this;
764
764
  };
@@ -775,7 +775,7 @@ function yr(t) {
775
775
  function vr(t) {
776
776
  return t < 16 ? "0" + t.toString(16) : t.toString(16);
777
777
  }
778
- function we(t, e) {
778
+ function ye(t, e) {
779
779
  e = e || 1 / 0;
780
780
  for (var r, n = t.length, i = null, o = [], s = 0; s < n; ++s) {
781
781
  if (r = t.charCodeAt(s), r > 55295 && r < 57344) {
@@ -838,7 +838,7 @@ function Er(t, e) {
838
838
  function Et(t) {
839
839
  return Gt(wr(t));
840
840
  }
841
- function xe(t, e, r, n) {
841
+ function Se(t, e, r, n) {
842
842
  for (var i = 0; i < n && !(i + r >= e.length || i >= t.length); ++i)
843
843
  e[i + r] = t[i];
844
844
  return i;
@@ -846,7 +846,7 @@ function xe(t, e, r, n) {
846
846
  function xr(t) {
847
847
  return t !== t;
848
848
  }
849
- function N(t) {
849
+ function D(t) {
850
850
  return t != null && (!!t._isBuffer || xt(t) || Sr(t));
851
851
  }
852
852
  function xt(t) {
@@ -886,46 +886,46 @@ function Rr(t, e, r) {
886
886
  if (e)
887
887
  t.call(r);
888
888
  else
889
- for (var n = t.length, i = ae(t, n), o = 0; o < n; ++o)
889
+ for (var n = t.length, i = ue(t, n), o = 0; o < n; ++o)
890
890
  i[o].call(r);
891
891
  }
892
892
  function Ir(t, e, r, n) {
893
893
  if (e)
894
894
  t.call(r, n);
895
895
  else
896
- for (var i = t.length, o = ae(t, i), s = 0; s < i; ++s)
896
+ for (var i = t.length, o = ue(t, i), s = 0; s < i; ++s)
897
897
  o[s].call(r, n);
898
898
  }
899
899
  function Or(t, e, r, n, i) {
900
900
  if (e)
901
901
  t.call(r, n, i);
902
902
  else
903
- for (var o = t.length, s = ae(t, o), f = 0; f < o; ++f)
903
+ for (var o = t.length, s = ue(t, o), f = 0; f < o; ++f)
904
904
  s[f].call(r, n, i);
905
905
  }
906
906
  function Cr(t, e, r, n, i, o) {
907
907
  if (e)
908
908
  t.call(r, n, i, o);
909
909
  else
910
- for (var s = t.length, f = ae(t, s), l = 0; l < s; ++l)
911
- f[l].call(r, n, i, o);
910
+ for (var s = t.length, f = ue(t, s), u = 0; u < s; ++u)
911
+ f[u].call(r, n, i, o);
912
912
  }
913
913
  function Ar(t, e, r, n) {
914
914
  if (e)
915
915
  t.apply(r, n);
916
916
  else
917
- for (var i = t.length, o = ae(t, i), s = 0; s < i; ++s)
917
+ for (var i = t.length, o = ue(t, i), s = 0; s < i; ++s)
918
918
  o[s].apply(r, n);
919
919
  }
920
920
  p.prototype.emit = function(e) {
921
- var r, n, i, o, s, f, l, u = e === "error";
921
+ var r, n, i, o, s, f, u, l = e === "error";
922
922
  if (f = this._events, f)
923
- u = u && f.error == null;
924
- else if (!u)
923
+ l = l && f.error == null;
924
+ else if (!l)
925
925
  return !1;
926
- if (l = this.domain, u) {
927
- if (r = arguments[1], l)
928
- r || (r = new Error('Uncaught, unspecified "error" event')), r.domainEmitter = this, r.domain = l, r.domainThrown = !1, l.emit("error", r);
926
+ if (u = this.domain, l) {
927
+ if (r = arguments[1], u)
928
+ r || (r = new Error('Uncaught, unspecified "error" event')), r.domainEmitter = this, r.domain = u, r.domainThrown = !1, u.emit("error", r);
929
929
  else {
930
930
  if (r instanceof Error)
931
931
  throw r;
@@ -1077,7 +1077,7 @@ function Lr(t, e) {
1077
1077
  t[r] = t[n];
1078
1078
  t.pop();
1079
1079
  }
1080
- function ae(t, e) {
1080
+ function ue(t, e) {
1081
1081
  for (var r = new Array(e); e--; )
1082
1082
  r[e] = t[e];
1083
1083
  return r;
@@ -1126,23 +1126,23 @@ function Dr(t) {
1126
1126
  }
1127
1127
  }
1128
1128
  }
1129
- var z = [], ne = !1, ee, ge = -1;
1129
+ var z = [], ne = !1, ee, me = -1;
1130
1130
  function Fr() {
1131
- !ne || !ee || (ne = !1, ee.length ? z = ee.concat(z) : ge = -1, z.length && Lt());
1131
+ !ne || !ee || (ne = !1, ee.length ? z = ee.concat(z) : me = -1, z.length && Lt());
1132
1132
  }
1133
1133
  function Lt() {
1134
1134
  if (!ne) {
1135
1135
  var t = Tt(Fr);
1136
1136
  ne = !0;
1137
1137
  for (var e = z.length; e; ) {
1138
- for (ee = z, z = []; ++ge < e; )
1139
- ee && ee[ge].run();
1140
- ge = -1, e = z.length;
1138
+ for (ee = z, z = []; ++me < e; )
1139
+ ee && ee[me].run();
1140
+ me = -1, e = z.length;
1141
1141
  }
1142
1142
  ee = null, ne = !1, Dr(t);
1143
1143
  }
1144
1144
  }
1145
- function B(t) {
1145
+ function U(t) {
1146
1146
  var e = new Array(arguments.length - 1);
1147
1147
  if (arguments.length > 1)
1148
1148
  for (var r = 1; r < arguments.length; r++)
@@ -1155,9 +1155,9 @@ function Nt(t, e) {
1155
1155
  Nt.prototype.run = function() {
1156
1156
  this.fun.apply(null, this.array);
1157
1157
  };
1158
- var Mr = {}, se = ie.performance || {};
1159
- se.now || se.mozNow || se.msNow || se.oNow || se.webkitNow;
1160
- var me = {
1158
+ var Mr = {}, fe = ie.performance || {};
1159
+ fe.now || fe.mozNow || fe.msNow || fe.oNow || fe.webkitNow;
1160
+ var _e = {
1161
1161
  env: Mr
1162
1162
  }, Ue;
1163
1163
  typeof Object.create == "function" ? Ue = function(e, r) {
@@ -1208,39 +1208,39 @@ function Dt(t, e) {
1208
1208
  return function() {
1209
1209
  return Dt(t, e).apply(this, arguments);
1210
1210
  };
1211
- if (me.noDeprecation === !0)
1211
+ if (_e.noDeprecation === !0)
1212
1212
  return t;
1213
1213
  var r = !1;
1214
1214
  function n() {
1215
1215
  if (!r) {
1216
- if (me.throwDeprecation)
1216
+ if (_e.throwDeprecation)
1217
1217
  throw new Error(e);
1218
- me.traceDeprecation ? console.trace(e) : console.error(e), r = !0;
1218
+ _e.traceDeprecation ? console.trace(e) : console.error(e), r = !0;
1219
1219
  }
1220
1220
  return t.apply(this, arguments);
1221
1221
  }
1222
1222
  return n;
1223
1223
  }
1224
- var pe = {}, Ce;
1224
+ var ge = {}, Ce;
1225
1225
  function kr(t) {
1226
- if (H(Ce) && (Ce = me.env.NODE_DEBUG || ""), t = t.toUpperCase(), !pe[t])
1226
+ if (H(Ce) && (Ce = _e.env.NODE_DEBUG || ""), t = t.toUpperCase(), !ge[t])
1227
1227
  if (new RegExp("\\b" + t + "\\b", "i").test(Ce)) {
1228
1228
  var e = 0;
1229
- pe[t] = function() {
1229
+ ge[t] = function() {
1230
1230
  var r = Ur.apply(null, arguments);
1231
1231
  console.error("%s %d: %s", t, e, r);
1232
1232
  };
1233
1233
  } else
1234
- pe[t] = function() {
1234
+ ge[t] = function() {
1235
1235
  };
1236
- return pe[t];
1236
+ return ge[t];
1237
1237
  }
1238
1238
  function G(t, e) {
1239
1239
  var r = {
1240
1240
  seen: [],
1241
1241
  stylize: $r
1242
1242
  };
1243
- return arguments.length >= 3 && (r.depth = arguments[2]), arguments.length >= 4 && (r.colors = arguments[3]), Ft(e) ? r.showHidden = e : e && Wr(r, e), H(r.showHidden) && (r.showHidden = !1), H(r.depth) && (r.depth = 2), H(r.colors) && (r.colors = !1), H(r.customInspect) && (r.customInspect = !0), r.colors && (r.stylize = Pr), ye(r, t, r.depth);
1243
+ return arguments.length >= 3 && (r.depth = arguments[2]), arguments.length >= 4 && (r.colors = arguments[3]), Ft(e) ? r.showHidden = e : e && Wr(r, e), H(r.showHidden) && (r.showHidden = !1), H(r.depth) && (r.depth = 2), H(r.colors) && (r.colors = !1), H(r.customInspect) && (r.customInspect = !0), r.colors && (r.stylize = Pr), ve(r, t, r.depth);
1244
1244
  }
1245
1245
  G.colors = {
1246
1246
  bold: [1, 22],
@@ -1281,12 +1281,12 @@ function jr(t) {
1281
1281
  e[r] = !0;
1282
1282
  }), e;
1283
1283
  }
1284
- function ye(t, e, r) {
1284
+ function ve(t, e, r) {
1285
1285
  if (t.customInspect && e && Ne(e.inspect) && // Filter out the util module, it's inspect function is special
1286
1286
  e.inspect !== G && // Also filter out any prototype objects using the circular check.
1287
1287
  !(e.constructor && e.constructor.prototype === e)) {
1288
1288
  var n = e.inspect(r, t);
1289
- return Ve(n) || (n = ye(t, n, r)), n;
1289
+ return Ve(n) || (n = ve(t, n, r)), n;
1290
1290
  }
1291
1291
  var i = qr(t, e);
1292
1292
  if (i)
@@ -1306,20 +1306,20 @@ function ye(t, e, r) {
1306
1306
  if (Le(e))
1307
1307
  return Ae(e);
1308
1308
  }
1309
- var l = "", u = !1, h = ["{", "}"];
1310
- if (Jr(e) && (u = !0, h = ["[", "]"]), Ne(e)) {
1309
+ var u = "", l = !1, h = ["{", "}"];
1310
+ if (Jr(e) && (l = !0, h = ["[", "]"]), Ne(e)) {
1311
1311
  var c = e.name ? ": " + e.name : "";
1312
- l = " [Function" + c + "]";
1312
+ u = " [Function" + c + "]";
1313
1313
  }
1314
- if (Te(e) && (l = " " + RegExp.prototype.toString.call(e)), Xe(e) && (l = " " + Date.prototype.toUTCString.call(e)), Le(e) && (l = " " + Ae(e)), o.length === 0 && (!u || e.length == 0))
1315
- return h[0] + l + h[1];
1314
+ if (Te(e) && (u = " " + RegExp.prototype.toString.call(e)), Xe(e) && (u = " " + Date.prototype.toUTCString.call(e)), Le(e) && (u = " " + Ae(e)), o.length === 0 && (!l || e.length == 0))
1315
+ return h[0] + u + h[1];
1316
1316
  if (r < 0)
1317
1317
  return Te(e) ? t.stylize(RegExp.prototype.toString.call(e), "regexp") : t.stylize("[Object]", "special");
1318
1318
  t.seen.push(e);
1319
1319
  var g;
1320
- return u ? g = zr(t, e, r, s, o) : g = o.map(function(y) {
1321
- return ke(t, e, r, s, y, u);
1322
- }), t.seen.pop(), Vr(g, l, h);
1320
+ return l ? g = zr(t, e, r, s, o) : g = o.map(function(y) {
1321
+ return ke(t, e, r, s, y, l);
1322
+ }), t.seen.pop(), Vr(g, u, h);
1323
1323
  }
1324
1324
  function qr(t, e) {
1325
1325
  if (H(e))
@@ -1348,28 +1348,28 @@ function zr(t, e, r, n, i) {
1348
1348
  String(s),
1349
1349
  !0
1350
1350
  )) : o.push("");
1351
- return i.forEach(function(l) {
1352
- l.match(/^\d+$/) || o.push(ke(
1351
+ return i.forEach(function(u) {
1352
+ u.match(/^\d+$/) || o.push(ke(
1353
1353
  t,
1354
1354
  e,
1355
1355
  r,
1356
1356
  n,
1357
- l,
1357
+ u,
1358
1358
  !0
1359
1359
  ));
1360
1360
  }), o;
1361
1361
  }
1362
1362
  function ke(t, e, r, n, i, o) {
1363
- var s, f, l;
1364
- if (l = Object.getOwnPropertyDescriptor(e, i) || { value: e[i] }, l.get ? l.set ? f = t.stylize("[Getter/Setter]", "special") : f = t.stylize("[Getter]", "special") : l.set && (f = t.stylize("[Setter]", "special")), Mt(n, i) || (s = "[" + i + "]"), f || (t.seen.indexOf(l.value) < 0 ? (ze(r) ? f = ye(t, l.value, null) : f = ye(t, l.value, r - 1), f.indexOf(`
1363
+ var s, f, u;
1364
+ if (u = Object.getOwnPropertyDescriptor(e, i) || { value: e[i] }, u.get ? u.set ? f = t.stylize("[Getter/Setter]", "special") : f = t.stylize("[Getter]", "special") : u.set && (f = t.stylize("[Setter]", "special")), Mt(n, i) || (s = "[" + i + "]"), f || (t.seen.indexOf(u.value) < 0 ? (ze(r) ? f = ve(t, u.value, null) : f = ve(t, u.value, r - 1), f.indexOf(`
1365
1365
  `) > -1 && (o ? f = f.split(`
1366
- `).map(function(u) {
1367
- return " " + u;
1366
+ `).map(function(l) {
1367
+ return " " + l;
1368
1368
  }).join(`
1369
1369
  `).substr(2) : f = `
1370
1370
  ` + f.split(`
1371
- `).map(function(u) {
1372
- return " " + u;
1371
+ `).map(function(l) {
1372
+ return " " + l;
1373
1373
  }).join(`
1374
1374
  `))) : f = t.stylize("[Circular]", "special")), H(s)) {
1375
1375
  if (o && i.match(/^\d+$/))
@@ -1487,7 +1487,7 @@ function Qr(t) {
1487
1487
  if (t && !Hr(t))
1488
1488
  throw new Error("Unknown encoding: " + t);
1489
1489
  }
1490
- function ue(t) {
1490
+ function he(t) {
1491
1491
  switch (this.encoding = (t || "utf8").toLowerCase().replace(/[-_]/, ""), Qr(t), this.encoding) {
1492
1492
  case "utf8":
1493
1493
  this.surrogateSize = 3;
@@ -1505,7 +1505,7 @@ function ue(t) {
1505
1505
  }
1506
1506
  this.charBuffer = new a(6), this.charReceived = 0, this.charLength = 0;
1507
1507
  }
1508
- ue.prototype.write = function(t) {
1508
+ he.prototype.write = function(t) {
1509
1509
  for (var e = ""; this.charLength; ) {
1510
1510
  var r = t.length >= this.charLength - this.charReceived ? this.charLength - this.charReceived : t.length;
1511
1511
  if (t.copy(this.charBuffer, this.charReceived, 0, r), this.charReceived += r, this.charReceived < this.charLength)
@@ -1530,7 +1530,7 @@ ue.prototype.write = function(t) {
1530
1530
  }
1531
1531
  return e;
1532
1532
  };
1533
- ue.prototype.detectIncompleteChar = function(t) {
1533
+ he.prototype.detectIncompleteChar = function(t) {
1534
1534
  for (var e = t.length >= 3 ? 3 : t.length; e > 0; e--) {
1535
1535
  var r = t[t.length - e];
1536
1536
  if (e == 1 && r >> 5 == 6) {
@@ -1548,7 +1548,7 @@ ue.prototype.detectIncompleteChar = function(t) {
1548
1548
  }
1549
1549
  this.charReceived = e;
1550
1550
  };
1551
- ue.prototype.end = function(t) {
1551
+ he.prototype.end = function(t) {
1552
1552
  var e = "";
1553
1553
  if (t && t.length && (e = this.write(t)), this.charReceived) {
1554
1554
  var r = this.charReceived, n = this.charBuffer, i = this.encoding;
@@ -1565,9 +1565,9 @@ function Zr(t) {
1565
1565
  function Xr(t) {
1566
1566
  this.charReceived = t.length % 3, this.charLength = this.charReceived ? 3 : 0;
1567
1567
  }
1568
- R.ReadableState = Bt;
1568
+ I.ReadableState = Bt;
1569
1569
  var b = kr("stream");
1570
- oe(R, p);
1570
+ oe(I, p);
1571
1571
  function Kr(t, e, r) {
1572
1572
  if (typeof t.prependListener == "function")
1573
1573
  return t.prependListener(e, r);
@@ -1577,23 +1577,23 @@ function en(t, e) {
1577
1577
  return t.listeners(e).length;
1578
1578
  }
1579
1579
  function Bt(t, e) {
1580
- t = t || {}, this.objectMode = !!t.objectMode, e instanceof M && (this.objectMode = this.objectMode || !!t.readableObjectMode);
1580
+ t = t || {}, this.objectMode = !!t.objectMode, e instanceof B && (this.objectMode = this.objectMode || !!t.readableObjectMode);
1581
1581
  var r = t.highWaterMark, n = this.objectMode ? 16 : 16 * 1024;
1582
- this.highWaterMark = r || r === 0 ? r : n, this.highWaterMark = ~~this.highWaterMark, this.buffer = new te(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.defaultEncoding = t.defaultEncoding || "utf8", this.ranOut = !1, this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, t.encoding && (this.decoder = new ue(t.encoding), this.encoding = t.encoding);
1582
+ this.highWaterMark = r || r === 0 ? r : n, this.highWaterMark = ~~this.highWaterMark, this.buffer = new te(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.defaultEncoding = t.defaultEncoding || "utf8", this.ranOut = !1, this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, t.encoding && (this.decoder = new he(t.encoding), this.encoding = t.encoding);
1583
1583
  }
1584
- function R(t) {
1585
- if (!(this instanceof R)) return new R(t);
1584
+ function I(t) {
1585
+ if (!(this instanceof I)) return new I(t);
1586
1586
  this._readableState = new Bt(t, this), this.readable = !0, t && typeof t.read == "function" && (this._read = t.read), p.call(this);
1587
1587
  }
1588
- R.prototype.push = function(t, e) {
1588
+ I.prototype.push = function(t, e) {
1589
1589
  var r = this._readableState;
1590
1590
  return !r.objectMode && typeof t == "string" && (e = e || r.defaultEncoding, e !== r.encoding && (t = a.from(t, e), e = "")), Ut(this, r, t, e, !1);
1591
1591
  };
1592
- R.prototype.unshift = function(t) {
1592
+ I.prototype.unshift = function(t) {
1593
1593
  var e = this._readableState;
1594
1594
  return Ut(this, e, t, "", !0);
1595
1595
  };
1596
- R.prototype.isPaused = function() {
1596
+ I.prototype.isPaused = function() {
1597
1597
  return this._readableState.flowing === !1;
1598
1598
  };
1599
1599
  function Ut(t, e, r, n, i) {
@@ -1610,8 +1610,8 @@ function Ut(t, e, r, n, i) {
1610
1610
  var f = new Error("stream.unshift() after end event");
1611
1611
  t.emit("error", f);
1612
1612
  } else {
1613
- var l;
1614
- e.decoder && !i && !n && (r = e.decoder.write(r), l = !e.objectMode && r.length === 0), i || (e.reading = !1), l || (e.flowing && e.length === 0 && !e.sync ? (t.emit("data", r), t.read(0)) : (e.length += e.objectMode ? 1 : r.length, i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && Se(t))), sn(t, e);
1613
+ var u;
1614
+ e.decoder && !i && !n && (r = e.decoder.write(r), u = !e.objectMode && r.length === 0), i || (e.reading = !1), u || (e.flowing && e.length === 0 && !e.sync ? (t.emit("data", r), t.read(0)) : (e.length += e.objectMode ? 1 : r.length, i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && Re(t))), sn(t, e);
1615
1615
  }
1616
1616
  else i || (e.reading = !1);
1617
1617
  return tn(e);
@@ -1619,8 +1619,8 @@ function Ut(t, e, r, n, i) {
1619
1619
  function tn(t) {
1620
1620
  return !t.ended && (t.needReadable || t.length < t.highWaterMark || t.length === 0);
1621
1621
  }
1622
- R.prototype.setEncoding = function(t) {
1623
- return this._readableState.decoder = new ue(t), this._readableState.encoding = t, this;
1622
+ I.prototype.setEncoding = function(t) {
1623
+ return this._readableState.decoder = new he(t), this._readableState.encoding = t, this;
1624
1624
  };
1625
1625
  var Ke = 8388608;
1626
1626
  function rn(t) {
@@ -1629,11 +1629,11 @@ function rn(t) {
1629
1629
  function et(t, e) {
1630
1630
  return t <= 0 || e.length === 0 && e.ended ? 0 : e.objectMode ? 1 : t !== t ? e.flowing && e.length ? e.buffer.head.data.length : e.length : (t > e.highWaterMark && (e.highWaterMark = rn(t)), t <= e.length ? t : e.ended ? e.length : (e.needReadable = !0, 0));
1631
1631
  }
1632
- R.prototype.read = function(t) {
1632
+ I.prototype.read = function(t) {
1633
1633
  b("read", t), t = parseInt(t, 10);
1634
1634
  var e = this._readableState, r = t;
1635
1635
  if (t !== 0 && (e.emittedReadable = !1), t === 0 && e.needReadable && (e.length >= e.highWaterMark || e.ended))
1636
- return b("read: emitReadable", e.length, e.ended), e.length === 0 && e.ended ? De(this) : Se(this), null;
1636
+ return b("read: emitReadable", e.length, e.ended), e.length === 0 && e.ended ? De(this) : Re(this), null;
1637
1637
  if (t = et(t, e), t === 0 && e.ended)
1638
1638
  return e.length === 0 && De(this), null;
1639
1639
  var n = e.needReadable;
@@ -1643,7 +1643,7 @@ R.prototype.read = function(t) {
1643
1643
  };
1644
1644
  function nn(t, e) {
1645
1645
  var r = null;
1646
- return !N(e) && typeof e != "string" && e !== null && e !== void 0 && !t.objectMode && (r = new TypeError("Invalid non-string/buffer chunk")), r;
1646
+ return !D(e) && typeof e != "string" && e !== null && e !== void 0 && !t.objectMode && (r = new TypeError("Invalid non-string/buffer chunk")), r;
1647
1647
  }
1648
1648
  function on(t, e) {
1649
1649
  if (!e.ended) {
@@ -1651,28 +1651,28 @@ function on(t, e) {
1651
1651
  var r = e.decoder.end();
1652
1652
  r && r.length && (e.buffer.push(r), e.length += e.objectMode ? 1 : r.length);
1653
1653
  }
1654
- e.ended = !0, Se(t);
1654
+ e.ended = !0, Re(t);
1655
1655
  }
1656
1656
  }
1657
- function Se(t) {
1657
+ function Re(t) {
1658
1658
  var e = t._readableState;
1659
- e.needReadable = !1, e.emittedReadable || (b("emitReadable", e.flowing), e.emittedReadable = !0, e.sync ? B(tt, t) : tt(t));
1659
+ e.needReadable = !1, e.emittedReadable || (b("emitReadable", e.flowing), e.emittedReadable = !0, e.sync ? U(tt, t) : tt(t));
1660
1660
  }
1661
1661
  function tt(t) {
1662
1662
  b("emit readable"), t.emit("readable"), Ye(t);
1663
1663
  }
1664
1664
  function sn(t, e) {
1665
- e.readingMore || (e.readingMore = !0, B(fn, t, e));
1665
+ e.readingMore || (e.readingMore = !0, U(fn, t, e));
1666
1666
  }
1667
1667
  function fn(t, e) {
1668
1668
  for (var r = e.length; !e.reading && !e.flowing && !e.ended && e.length < e.highWaterMark && (b("maybeReadMore read 0"), t.read(0), r !== e.length); )
1669
1669
  r = e.length;
1670
1670
  e.readingMore = !1;
1671
1671
  }
1672
- R.prototype._read = function(t) {
1672
+ I.prototype._read = function(t) {
1673
1673
  this.emit("error", new Error("not implemented"));
1674
1674
  };
1675
- R.prototype.pipe = function(t, e) {
1675
+ I.prototype.pipe = function(t, e) {
1676
1676
  var r = this, n = this._readableState;
1677
1677
  switch (n.pipesCount) {
1678
1678
  case 0:
@@ -1687,25 +1687,25 @@ R.prototype.pipe = function(t, e) {
1687
1687
  }
1688
1688
  n.pipesCount += 1, b("pipe count=%d opts=%j", n.pipesCount, e);
1689
1689
  var i = !e || e.end !== !1, o = i ? f : h;
1690
- n.endEmitted ? B(o) : r.once("end", o), t.on("unpipe", s);
1690
+ n.endEmitted ? U(o) : r.once("end", o), t.on("unpipe", s);
1691
1691
  function s(S) {
1692
1692
  b("onunpipe"), S === r && h();
1693
1693
  }
1694
1694
  function f() {
1695
1695
  b("onend"), t.end();
1696
1696
  }
1697
- var l = an(r);
1698
- t.on("drain", l);
1699
- var u = !1;
1697
+ var u = an(r);
1698
+ t.on("drain", u);
1699
+ var l = !1;
1700
1700
  function h() {
1701
- b("cleanup"), t.removeListener("close", O), t.removeListener("finish", E), t.removeListener("drain", l), t.removeListener("error", y), t.removeListener("unpipe", s), r.removeListener("end", f), r.removeListener("end", h), r.removeListener("data", g), u = !0, n.awaitDrain && (!t._writableState || t._writableState.needDrain) && l();
1701
+ b("cleanup"), t.removeListener("close", O), t.removeListener("finish", E), t.removeListener("drain", u), t.removeListener("error", y), t.removeListener("unpipe", s), r.removeListener("end", f), r.removeListener("end", h), r.removeListener("data", g), l = !0, n.awaitDrain && (!t._writableState || t._writableState.needDrain) && u();
1702
1702
  }
1703
1703
  var c = !1;
1704
1704
  r.on("data", g);
1705
1705
  function g(S) {
1706
1706
  b("ondata"), c = !1;
1707
- var m = t.write(S);
1708
- m === !1 && !c && ((n.pipesCount === 1 && n.pipes === t || n.pipesCount > 1 && Pt(n.pipes, t) !== -1) && !u && (b("false write response, pause", r._readableState.awaitDrain), r._readableState.awaitDrain++, c = !0), r.pause());
1707
+ var w = t.write(S);
1708
+ w === !1 && !c && ((n.pipesCount === 1 && n.pipes === t || n.pipesCount > 1 && Pt(n.pipes, t) !== -1) && !l && (b("false write response, pause", r._readableState.awaitDrain), r._readableState.awaitDrain++, c = !0), r.pause());
1709
1709
  }
1710
1710
  function y(S) {
1711
1711
  b("onerror", S), x(), t.removeListener("error", y), en(t, "error") === 0 && t.emit("error", S);
@@ -1730,7 +1730,7 @@ function an(t) {
1730
1730
  b("pipeOnDrain", e.awaitDrain), e.awaitDrain && e.awaitDrain--, e.awaitDrain === 0 && t.listeners("data").length && (e.flowing = !0, Ye(t));
1731
1731
  };
1732
1732
  }
1733
- R.prototype.unpipe = function(t) {
1733
+ I.prototype.unpipe = function(t) {
1734
1734
  var e = this._readableState;
1735
1735
  if (e.pipesCount === 0) return this;
1736
1736
  if (e.pipesCount === 1)
@@ -1745,31 +1745,31 @@ R.prototype.unpipe = function(t) {
1745
1745
  var o = Pt(e.pipes, 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
- R.prototype.on = function(t, e) {
1748
+ I.prototype.on = function(t, e) {
1749
1749
  var r = p.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") {
1753
1753
  var n = this._readableState;
1754
- !n.endEmitted && !n.readableListening && (n.readableListening = n.needReadable = !0, n.emittedReadable = !1, n.reading ? n.length && Se(this) : B(ln, this));
1754
+ !n.endEmitted && !n.readableListening && (n.readableListening = n.needReadable = !0, n.emittedReadable = !1, n.reading ? n.length && Re(this) : U(un, this));
1755
1755
  }
1756
1756
  return r;
1757
1757
  };
1758
- R.prototype.addListener = R.prototype.on;
1759
- function ln(t) {
1758
+ I.prototype.addListener = I.prototype.on;
1759
+ function un(t) {
1760
1760
  b("readable nexttick read 0"), t.read(0);
1761
1761
  }
1762
- R.prototype.resume = function() {
1762
+ I.prototype.resume = function() {
1763
1763
  var t = this._readableState;
1764
- return t.flowing || (b("resume"), t.flowing = !0, un(this, t)), this;
1764
+ return t.flowing || (b("resume"), t.flowing = !0, ln(this, t)), this;
1765
1765
  };
1766
- function un(t, e) {
1767
- e.resumeScheduled || (e.resumeScheduled = !0, B(hn, t, e));
1766
+ function ln(t, e) {
1767
+ e.resumeScheduled || (e.resumeScheduled = !0, U(hn, t, e));
1768
1768
  }
1769
1769
  function hn(t, e) {
1770
1770
  e.reading || (b("resume read 0"), t.read(0)), e.resumeScheduled = !1, e.awaitDrain = 0, t.emit("resume"), Ye(t), e.flowing && !e.reading && t.read(0);
1771
1771
  }
1772
- R.prototype.pause = function() {
1772
+ I.prototype.pause = function() {
1773
1773
  return b("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (b("pause"), this._readableState.flowing = !1, this.emit("pause")), this;
1774
1774
  };
1775
1775
  function Ye(t) {
@@ -1777,7 +1777,7 @@ function Ye(t) {
1777
1777
  for (b("flow", e.flowing); e.flowing && t.read() !== null; )
1778
1778
  ;
1779
1779
  }
1780
- R.prototype.wrap = function(t) {
1780
+ I.prototype.wrap = function(t) {
1781
1781
  var e = this._readableState, r = !1, n = this;
1782
1782
  t.on("end", function() {
1783
1783
  if (b("wrapped end"), e.decoder && !e.ended) {
@@ -1804,7 +1804,7 @@ R.prototype.wrap = function(t) {
1804
1804
  b("wrapped _read", s), r && (r = !1, t.resume());
1805
1805
  }, n;
1806
1806
  };
1807
- R._fromList = kt;
1807
+ I._fromList = kt;
1808
1808
  function kt(t, e) {
1809
1809
  if (e.length === 0) return null;
1810
1810
  var r;
@@ -1841,7 +1841,7 @@ function pn(t, e) {
1841
1841
  function De(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(gn, e, t));
1844
+ e.endEmitted || (e.ended = !0, U(gn, e, t));
1845
1845
  }
1846
1846
  function gn(t, e) {
1847
1847
  !t.endEmitted && t.length === 0 && (t.endEmitted = !0, e.readable = !1, e.emit("end"));
@@ -1855,8 +1855,8 @@ function Pt(t, e) {
1855
1855
  if (t[r] === e) return r;
1856
1856
  return -1;
1857
1857
  }
1858
- T.WritableState = We;
1859
- oe(T, p);
1858
+ N.WritableState = We;
1859
+ oe(N, p);
1860
1860
  function _n() {
1861
1861
  }
1862
1862
  function wn(t, e, r) {
@@ -1867,7 +1867,7 @@ function We(t, e) {
1867
1867
  get: Dt(function() {
1868
1868
  return this.getBuffer();
1869
1869
  }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")
1870
- }), t = t || {}, this.objectMode = !!t.objectMode, e instanceof M && (this.objectMode = this.objectMode || !!t.writableObjectMode);
1870
+ }), t = t || {}, this.objectMode = !!t.objectMode, e instanceof B && (this.objectMode = this.objectMode || !!t.writableObjectMode);
1871
1871
  var r = t.highWaterMark, n = this.objectMode ? 16 : 16 * 1024;
1872
1872
  this.highWaterMark = r || r === 0 ? r : n, this.highWaterMark = ~~this.highWaterMark, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1;
1873
1873
  var i = t.decodeStrings === !1;
@@ -1880,34 +1880,34 @@ We.prototype.getBuffer = function() {
1880
1880
  r.push(e), e = e.next;
1881
1881
  return r;
1882
1882
  };
1883
- function T(t) {
1884
- if (!(this instanceof T) && !(this instanceof M)) return new T(t);
1883
+ function N(t) {
1884
+ if (!(this instanceof N) && !(this instanceof B)) return new N(t);
1885
1885
  this._writableState = new We(t, this), this.writable = !0, t && (typeof t.write == "function" && (this._write = t.write), typeof t.writev == "function" && (this._writev = t.writev)), p.call(this);
1886
1886
  }
1887
- T.prototype.pipe = function() {
1887
+ N.prototype.pipe = function() {
1888
1888
  this.emit("error", new Error("Cannot pipe, not readable"));
1889
1889
  };
1890
1890
  function yn(t, e) {
1891
1891
  var r = new Error("write after end");
1892
- t.emit("error", r), B(e, r);
1892
+ t.emit("error", r), U(e, r);
1893
1893
  }
1894
1894
  function vn(t, e, r, n) {
1895
1895
  var i = !0, o = !1;
1896
- return r === null ? o = new TypeError("May not write null values to stream") : !a.isBuffer(r) && typeof r != "string" && r !== void 0 && !e.objectMode && (o = new TypeError("Invalid non-string/buffer chunk")), o && (t.emit("error", o), B(n, o), i = !1), i;
1896
+ return r === null ? o = new TypeError("May not write null values to stream") : !a.isBuffer(r) && typeof r != "string" && r !== void 0 && !e.objectMode && (o = new TypeError("Invalid non-string/buffer chunk")), o && (t.emit("error", o), U(n, o), i = !1), i;
1897
1897
  }
1898
- T.prototype.write = function(t, e, r) {
1898
+ N.prototype.write = function(t, e, r) {
1899
1899
  var n = this._writableState, i = !1;
1900
1900
  return typeof e == "function" && (r = e, e = null), a.isBuffer(t) ? e = "buffer" : e || (e = n.defaultEncoding), typeof r != "function" && (r = _n), n.ended ? yn(this, r) : vn(this, n, t, r) && (n.pendingcb++, i = En(this, n, t, e, r)), i;
1901
1901
  };
1902
- T.prototype.cork = function() {
1902
+ N.prototype.cork = function() {
1903
1903
  var t = this._writableState;
1904
1904
  t.corked++;
1905
1905
  };
1906
- T.prototype.uncork = function() {
1906
+ N.prototype.uncork = function() {
1907
1907
  var t = this._writableState;
1908
1908
  t.corked && (t.corked--, !t.writing && !t.corked && !t.finished && !t.bufferProcessing && t.bufferedRequest && $t(this, t));
1909
1909
  };
1910
- T.prototype.setDefaultEncoding = function(e) {
1910
+ N.prototype.setDefaultEncoding = function(e) {
1911
1911
  if (typeof e == "string" && (e = e.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + e);
1912
1912
  return this._writableState.defaultEncoding = e, this;
1913
1913
  };
@@ -1930,7 +1930,7 @@ function Pe(t, e, r, n, i, o, s) {
1930
1930
  e.writelen = n, e.writecb = s, e.writing = !0, e.sync = !0, r ? t._writev(i, e.onwrite) : t._write(i, o, e.onwrite), e.sync = !1;
1931
1931
  }
1932
1932
  function xn(t, e, r, n, i) {
1933
- --e.pendingcb, r ? B(i, n) : i(n), t._writableState.errorEmitted = !0, t.emit("error", n);
1933
+ --e.pendingcb, r ? U(i, n) : i(n), t._writableState.errorEmitted = !0, t.emit("error", n);
1934
1934
  }
1935
1935
  function Sn(t) {
1936
1936
  t.writing = !1, t.writecb = null, t.length -= t.writelen, t.writelen = 0;
@@ -1940,7 +1940,7 @@ function Rn(t, e) {
1940
1940
  if (Sn(r), e) xn(t, r, n, e, i);
1941
1941
  else {
1942
1942
  var o = jt(r);
1943
- !o && !r.corked && !r.bufferProcessing && r.bufferedRequest && $t(t, r), n ? B(rt, t, r, o, i) : rt(t, r, o, i);
1943
+ !o && !r.corked && !r.bufferProcessing && r.bufferedRequest && $t(t, r), n ? U(rt, t, r, o, i) : rt(t, r, o, i);
1944
1944
  }
1945
1945
  }
1946
1946
  function rt(t, e, r, n) {
@@ -1960,19 +1960,19 @@ function $t(t, e) {
1960
1960
  Pe(t, e, !0, e.length, i, "", o.finish), e.pendingcb++, e.lastBufferedRequest = null, o.next ? (e.corkedRequestsFree = o.next, o.next = null) : e.corkedRequestsFree = new zt(e);
1961
1961
  } else {
1962
1962
  for (; r; ) {
1963
- var f = r.chunk, l = r.encoding, u = r.callback, h = e.objectMode ? 1 : f.length;
1964
- if (Pe(t, e, !1, h, f, l, u), r = r.next, e.writing)
1963
+ var f = r.chunk, u = r.encoding, l = r.callback, h = e.objectMode ? 1 : f.length;
1964
+ if (Pe(t, e, !1, h, f, u, l), r = r.next, e.writing)
1965
1965
  break;
1966
1966
  }
1967
1967
  r === null && (e.lastBufferedRequest = null);
1968
1968
  }
1969
1969
  e.bufferedRequestCount = 0, e.bufferedRequest = r, e.bufferProcessing = !1;
1970
1970
  }
1971
- T.prototype._write = function(t, e, r) {
1971
+ N.prototype._write = function(t, e, r) {
1972
1972
  r(new Error("not implemented"));
1973
1973
  };
1974
- T.prototype._writev = null;
1975
- T.prototype.end = function(t, e, r) {
1974
+ N.prototype._writev = null;
1975
+ N.prototype.end = function(t, e, r) {
1976
1976
  var n = this._writableState;
1977
1977
  typeof t == "function" ? (r = t, t = null, e = null) : typeof e == "function" && (r = e, e = null), t != null && this.write(t, e), n.corked && (n.corked = 1, this.uncork()), !n.ending && !n.finished && On(this, n, r);
1978
1978
  };
@@ -1987,7 +1987,7 @@ function qt(t, e) {
1987
1987
  return r && (e.pendingcb === 0 ? (nt(t, e), e.finished = !0, t.emit("finish")) : nt(t, e)), r;
1988
1988
  }
1989
1989
  function On(t, e, r) {
1990
- e.ending = !0, qt(t, e), r && (e.finished ? B(r) : t.once("finish", r)), e.ended = !0, t.writable = !1;
1990
+ e.ending = !0, qt(t, e), r && (e.finished ? U(r) : t.once("finish", r)), e.ended = !0, t.writable = !1;
1991
1991
  }
1992
1992
  function zt(t) {
1993
1993
  var e = this;
@@ -2000,23 +2000,23 @@ function zt(t) {
2000
2000
  t.corkedRequestsFree ? t.corkedRequestsFree.next = e : t.corkedRequestsFree = e;
2001
2001
  };
2002
2002
  }
2003
- oe(M, R);
2004
- var it = Object.keys(T.prototype);
2003
+ oe(B, I);
2004
+ var it = Object.keys(N.prototype);
2005
2005
  for (var Fe = 0; Fe < it.length; Fe++) {
2006
2006
  var Me = it[Fe];
2007
- M.prototype[Me] || (M.prototype[Me] = T.prototype[Me]);
2007
+ B.prototype[Me] || (B.prototype[Me] = N.prototype[Me]);
2008
2008
  }
2009
- function M(t) {
2010
- if (!(this instanceof M)) return new M(t);
2011
- R.call(this, t), T.call(this, t), t && t.readable === !1 && (this.readable = !1), t && t.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, t && t.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", Cn);
2009
+ function B(t) {
2010
+ if (!(this instanceof B)) return new B(t);
2011
+ I.call(this, t), N.call(this, t), t && t.readable === !1 && (this.readable = !1), t && t.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, t && t.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", Cn);
2012
2012
  }
2013
2013
  function Cn() {
2014
- this.allowHalfOpen || this._writableState.ended || B(An, this);
2014
+ this.allowHalfOpen || this._writableState.ended || U(An, this);
2015
2015
  }
2016
2016
  function An(t) {
2017
2017
  t.end();
2018
2018
  }
2019
- oe(k, M);
2019
+ oe(k, B);
2020
2020
  function Tn(t) {
2021
2021
  this.afterTransform = function(e, r) {
2022
2022
  return Ln(t, e, r);
@@ -2033,7 +2033,7 @@ function Ln(t, e, r) {
2033
2033
  }
2034
2034
  function k(t) {
2035
2035
  if (!(this instanceof k)) return new k(t);
2036
- M.call(this, t), this._transformState = new Tn(this);
2036
+ B.call(this, t), this._transformState = new Tn(this);
2037
2037
  var e = this;
2038
2038
  this._readableState.needReadable = !0, this._readableState.sync = !1, t && (typeof t.transform == "function" && (this._transform = t.transform), typeof t.flush == "function" && (this._flush = t.flush)), this.once("prefinish", function() {
2039
2039
  typeof this._flush == "function" ? this._flush(function(r) {
@@ -2042,7 +2042,7 @@ function k(t) {
2042
2042
  });
2043
2043
  }
2044
2044
  k.prototype.push = function(t, e) {
2045
- return this._transformState.needTransform = !1, M.prototype.push.call(this, t, e);
2045
+ return this._transformState.needTransform = !1, B.prototype.push.call(this, t, e);
2046
2046
  };
2047
2047
  k.prototype._transform = function(t, e, r) {
2048
2048
  throw new Error("Not implemented");
@@ -2065,20 +2065,20 @@ function ot(t, e) {
2065
2065
  if (n.transforming) throw new Error("Calling transform done when still transforming");
2066
2066
  return t.push(null);
2067
2067
  }
2068
- oe(fe, k);
2069
- function fe(t) {
2070
- if (!(this instanceof fe)) return new fe(t);
2068
+ oe(ae, k);
2069
+ function ae(t) {
2070
+ if (!(this instanceof ae)) return new ae(t);
2071
2071
  k.call(this, t);
2072
2072
  }
2073
- fe.prototype._transform = function(t, e, r) {
2073
+ ae.prototype._transform = function(t, e, r) {
2074
2074
  r(null, t);
2075
2075
  };
2076
2076
  oe(V, p);
2077
- V.Readable = R;
2078
- V.Writable = T;
2079
- V.Duplex = M;
2077
+ V.Readable = I;
2078
+ V.Writable = N;
2079
+ V.Duplex = B;
2080
2080
  V.Transform = k;
2081
- V.PassThrough = fe;
2081
+ V.PassThrough = ae;
2082
2082
  V.Stream = V;
2083
2083
  function V() {
2084
2084
  p.call(this);
@@ -2100,26 +2100,26 @@ V.prototype.pipe = function(t, e) {
2100
2100
  function f() {
2101
2101
  o || (o = !0, typeof t.destroy == "function" && t.destroy());
2102
2102
  }
2103
- function l(h) {
2104
- if (u(), p.listenerCount(this, "error") === 0)
2103
+ function u(h) {
2104
+ if (l(), p.listenerCount(this, "error") === 0)
2105
2105
  throw h;
2106
2106
  }
2107
- r.on("error", l), t.on("error", l);
2108
- function u() {
2109
- r.removeListener("data", n), t.removeListener("drain", i), r.removeListener("end", s), r.removeListener("close", f), r.removeListener("error", l), t.removeListener("error", l), r.removeListener("end", u), r.removeListener("close", u), t.removeListener("close", u);
2107
+ r.on("error", u), t.on("error", u);
2108
+ function l() {
2109
+ r.removeListener("data", n), t.removeListener("drain", i), r.removeListener("end", s), r.removeListener("close", f), r.removeListener("error", u), t.removeListener("error", u), r.removeListener("end", l), r.removeListener("close", l), t.removeListener("close", l);
2110
2110
  }
2111
- return r.on("end", u), r.on("close", u), t.on("close", u), t.emit("pipe", r), t;
2111
+ return r.on("end", l), r.on("close", l), t.on("close", l), t.emit("pipe", r), t;
2112
2112
  };
2113
2113
  const Vt = function(t) {
2114
2114
  return typeof t == "object" && t !== null && !Array.isArray(t);
2115
2115
  };
2116
- class w extends Error {
2116
+ class _ extends Error {
2117
2117
  constructor(e, r, n, ...i) {
2118
- Array.isArray(r) && (r = r.join(" ").trim()), super(r), Error.captureStackTrace !== void 0 && Error.captureStackTrace(this, w), this.code = e;
2118
+ Array.isArray(r) && (r = r.join(" ").trim()), super(r), Error.captureStackTrace !== void 0 && Error.captureStackTrace(this, _), this.code = e;
2119
2119
  for (const o of i)
2120
2120
  for (const s in o) {
2121
2121
  const f = o[s];
2122
- this[s] = N(f) ? f.toString(n.encoding) : f == null ? f : JSON.parse(JSON.stringify(f));
2122
+ this[s] = D(f) ? f.toString(n.encoding) : f == null ? f : JSON.parse(JSON.stringify(f));
2123
2123
  }
2124
2124
  }
2125
2125
  }
@@ -2133,14 +2133,14 @@ const Jt = function(t) {
2133
2133
  e[r] = { name: i };
2134
2134
  else if (Vt(i)) {
2135
2135
  if (typeof i.name != "string")
2136
- throw new w("CSV_OPTION_COLUMNS_MISSING_NAME", [
2136
+ throw new _("CSV_OPTION_COLUMNS_MISSING_NAME", [
2137
2137
  "Option columns missing name:",
2138
2138
  `property "name" is required at position ${r}`,
2139
2139
  "when column is an object literal"
2140
2140
  ]);
2141
2141
  e[r] = i;
2142
2142
  } else
2143
- throw new w("CSV_INVALID_COLUMN_DEFINITION", [
2143
+ throw new _("CSV_INVALID_COLUMN_DEFINITION", [
2144
2144
  "Invalid column definition:",
2145
2145
  "expect a string or a literal object,",
2146
2146
  `got ${JSON.stringify(i)} at position ${r}`
@@ -2153,7 +2153,7 @@ class st {
2153
2153
  this.size = e, this.length = 0, this.buf = a.allocUnsafe(e);
2154
2154
  }
2155
2155
  prepend(e) {
2156
- if (N(e)) {
2156
+ if (D(e)) {
2157
2157
  const r = this.length + e.length;
2158
2158
  if (r >= this.size && (this.resize(), r >= this.size))
2159
2159
  throw Error("INVALID_BUFFER_STATE");
@@ -2199,7 +2199,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2199
2199
  error: void 0,
2200
2200
  enabled: t.from_line === 1,
2201
2201
  escaping: !1,
2202
- escapeIsQuote: N(t.escape) && N(t.quote) && a.compare(t.escape, t.quote) === 0,
2202
+ escapeIsQuote: D(t.escape) && D(t.quote) && a.compare(t.escape, t.quote) === 0,
2203
2203
  // columns can be `false`, `true`, `Array`
2204
2204
  expectedRecordLength: Array.isArray(t.columns) ? t.columns.length : void 0,
2205
2205
  field: new st(20),
@@ -2246,7 +2246,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2246
2246
  else if (e.encoding === null || e.encoding === !1)
2247
2247
  e.encoding = null;
2248
2248
  else if (typeof e.encoding != "string" && e.encoding !== null)
2249
- throw new w(
2249
+ throw new _(
2250
2250
  "CSV_INVALID_OPTION_ENCODING",
2251
2251
  [
2252
2252
  "Invalid option encoding:",
@@ -2258,7 +2258,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2258
2258
  if (e.bom === void 0 || e.bom === null || e.bom === !1)
2259
2259
  e.bom = !1;
2260
2260
  else if (e.bom !== !0)
2261
- throw new w(
2261
+ throw new _(
2262
2262
  "CSV_INVALID_OPTION_BOM",
2263
2263
  [
2264
2264
  "Invalid option bom:",
@@ -2272,7 +2272,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2272
2272
  else if (typeof e.cast == "function")
2273
2273
  e.cast_function = e.cast, e.cast = !0;
2274
2274
  else if (e.cast !== !0)
2275
- throw new w(
2275
+ throw new _(
2276
2276
  "CSV_INVALID_OPTION_CAST",
2277
2277
  [
2278
2278
  "Invalid option cast:",
@@ -2289,7 +2289,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2289
2289
  return isNaN(i) ? n : new Date(i);
2290
2290
  };
2291
2291
  else if (typeof e.cast_date != "function")
2292
- throw new w(
2292
+ throw new _(
2293
2293
  "CSV_INVALID_OPTION_CAST_DATE",
2294
2294
  [
2295
2295
  "Invalid option cast_date:",
@@ -2307,7 +2307,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2307
2307
  else if (e.columns === void 0 || e.columns === null || e.columns === !1)
2308
2308
  e.columns = !1;
2309
2309
  else
2310
- throw new w(
2310
+ throw new _(
2311
2311
  "CSV_INVALID_OPTION_COLUMNS",
2312
2312
  [
2313
2313
  "Invalid option columns:",
@@ -2320,7 +2320,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2320
2320
  e.group_columns_by_name = !1;
2321
2321
  else {
2322
2322
  if (e.group_columns_by_name !== !0)
2323
- throw new w(
2323
+ throw new _(
2324
2324
  "CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",
2325
2325
  [
2326
2326
  "Invalid option group_columns_by_name:",
@@ -2330,7 +2330,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2330
2330
  e
2331
2331
  );
2332
2332
  if (e.columns === !1)
2333
- throw new w(
2333
+ throw new _(
2334
2334
  "CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",
2335
2335
  [
2336
2336
  "Invalid option group_columns_by_name:",
@@ -2341,8 +2341,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2341
2341
  }
2342
2342
  if (e.comment === void 0 || e.comment === null || e.comment === !1 || e.comment === "")
2343
2343
  e.comment = null;
2344
- else if (typeof e.comment == "string" && (e.comment = a.from(e.comment, e.encoding)), !N(e.comment))
2345
- throw new w(
2344
+ else if (typeof e.comment == "string" && (e.comment = a.from(e.comment, e.encoding)), !D(e.comment))
2345
+ throw new _(
2346
2346
  "CSV_INVALID_OPTION_COMMENT",
2347
2347
  [
2348
2348
  "Invalid option comment:",
@@ -2354,7 +2354,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2354
2354
  if (e.comment_no_infix === void 0 || e.comment_no_infix === null || e.comment_no_infix === !1)
2355
2355
  e.comment_no_infix = !1;
2356
2356
  else if (e.comment_no_infix !== !0)
2357
- throw new w(
2357
+ throw new _(
2358
2358
  "CSV_INVALID_OPTION_COMMENT",
2359
2359
  [
2360
2360
  "Invalid option comment_no_infix:",
@@ -2365,7 +2365,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2365
2365
  );
2366
2366
  const r = JSON.stringify(e.delimiter);
2367
2367
  if (Array.isArray(e.delimiter) || (e.delimiter = [e.delimiter]), e.delimiter.length === 0)
2368
- throw new w(
2368
+ throw new _(
2369
2369
  "CSV_INVALID_OPTION_DELIMITER",
2370
2370
  [
2371
2371
  "Invalid option delimiter:",
@@ -2377,8 +2377,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2377
2377
  if (e.delimiter = e.delimiter.map(function(n) {
2378
2378
  if (n == null || n === !1)
2379
2379
  return a.from(",", e.encoding);
2380
- if (typeof n == "string" && (n = a.from(n, e.encoding)), !N(n) || n.length === 0)
2381
- throw new w(
2380
+ if (typeof n == "string" && (n = a.from(n, e.encoding)), !D(n) || n.length === 0)
2381
+ throw new _(
2382
2382
  "CSV_INVALID_OPTION_DELIMITER",
2383
2383
  [
2384
2384
  "Invalid option delimiter:",
@@ -2388,7 +2388,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2388
2388
  e
2389
2389
  );
2390
2390
  return n;
2391
- }), e.escape === void 0 || e.escape === !0 ? e.escape = a.from('"', e.encoding) : typeof e.escape == "string" ? e.escape = a.from(e.escape, e.encoding) : (e.escape === null || e.escape === !1) && (e.escape = null), e.escape !== null && !N(e.escape))
2391
+ }), e.escape === void 0 || e.escape === !0 ? e.escape = a.from('"', e.encoding) : typeof e.escape == "string" ? e.escape = a.from(e.escape, e.encoding) : (e.escape === null || e.escape === !1) && (e.escape = null), e.escape !== null && !D(e.escape))
2392
2392
  throw new Error(
2393
2393
  `Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`
2394
2394
  );
@@ -2419,7 +2419,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2419
2419
  else if (typeof e.ignore_last_delimiters == "number")
2420
2420
  e.ignore_last_delimiters = Math.floor(e.ignore_last_delimiters), e.ignore_last_delimiters === 0 && (e.ignore_last_delimiters = !1);
2421
2421
  else if (typeof e.ignore_last_delimiters != "boolean")
2422
- throw new w(
2422
+ throw new _(
2423
2423
  "CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",
2424
2424
  [
2425
2425
  "Invalid option `ignore_last_delimiters`:",
@@ -2429,7 +2429,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2429
2429
  e
2430
2430
  );
2431
2431
  if (e.ignore_last_delimiters === !0 && e.columns === !1)
2432
- throw new w(
2432
+ throw new _(
2433
2433
  "CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",
2434
2434
  [
2435
2435
  "The option `ignore_last_delimiters`",
@@ -2453,7 +2453,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2453
2453
  );
2454
2454
  if (e.objname === void 0 || e.objname === null || e.objname === !1)
2455
2455
  e.objname = void 0;
2456
- else if (N(e.objname)) {
2456
+ else if (D(e.objname)) {
2457
2457
  if (e.objname.length === 0)
2458
2458
  throw new Error("Invalid Option: objname must be a non empty buffer");
2459
2459
  e.encoding === null || (e.objname = e.objname.toString(e.encoding));
@@ -2477,7 +2477,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2477
2477
  if (e.on_record === void 0 || e.on_record === null)
2478
2478
  e.on_record = void 0;
2479
2479
  else if (typeof e.on_record != "function")
2480
- throw new w(
2480
+ throw new _(
2481
2481
  "CSV_INVALID_OPTION_ON_RECORD",
2482
2482
  [
2483
2483
  "Invalid option `on_record`:",
@@ -2492,7 +2492,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2492
2492
  );
2493
2493
  if (e.quote === null || e.quote === !1 || e.quote === "")
2494
2494
  e.quote = null;
2495
- else if (e.quote === void 0 || e.quote === !0 ? e.quote = a.from('"', e.encoding) : typeof e.quote == "string" && (e.quote = a.from(e.quote, e.encoding)), !N(e.quote))
2495
+ else if (e.quote === void 0 || e.quote === !0 ? e.quote = a.from('"', e.encoding) : typeof e.quote == "string" && (e.quote = a.from(e.quote, e.encoding)), !D(e.quote))
2496
2496
  throw new Error(
2497
2497
  `Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`
2498
2498
  );
@@ -2504,9 +2504,9 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2504
2504
  );
2505
2505
  if (e.record_delimiter === void 0)
2506
2506
  e.record_delimiter = [];
2507
- else if (typeof e.record_delimiter == "string" || N(e.record_delimiter)) {
2507
+ else if (typeof e.record_delimiter == "string" || D(e.record_delimiter)) {
2508
2508
  if (e.record_delimiter.length === 0)
2509
- throw new w(
2509
+ throw new _(
2510
2510
  "CSV_INVALID_OPTION_RECORD_DELIMITER",
2511
2511
  [
2512
2512
  "Invalid option `record_delimiter`:",
@@ -2517,7 +2517,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2517
2517
  );
2518
2518
  e.record_delimiter = [e.record_delimiter];
2519
2519
  } else if (!Array.isArray(e.record_delimiter))
2520
- throw new w(
2520
+ throw new _(
2521
2521
  "CSV_INVALID_OPTION_RECORD_DELIMITER",
2522
2522
  [
2523
2523
  "Invalid option `record_delimiter`:",
@@ -2527,8 +2527,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2527
2527
  e
2528
2528
  );
2529
2529
  if (e.record_delimiter = e.record_delimiter.map(function(n, i) {
2530
- if (typeof n != "string" && !N(n))
2531
- throw new w(
2530
+ if (typeof n != "string" && !D(n))
2531
+ throw new _(
2532
2532
  "CSV_INVALID_OPTION_RECORD_DELIMITER",
2533
2533
  [
2534
2534
  "Invalid option `record_delimiter`:",
@@ -2539,7 +2539,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2539
2539
  e
2540
2540
  );
2541
2541
  if (n.length === 0)
2542
- throw new w(
2542
+ throw new _(
2543
2543
  "CSV_INVALID_OPTION_RECORD_DELIMITER",
2544
2544
  [
2545
2545
  "Invalid option `record_delimiter`:",
@@ -2665,7 +2665,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2665
2665
  state: Un(r),
2666
2666
  __needMoreData: function(n, i, o) {
2667
2667
  if (o) return !1;
2668
- const { encoding: s, escape: f, quote: l } = this.options, { quoting: u, needMoreDataSize: h, recordDelimiterMaxLength: c } = this.state, g = i - n - 1, y = Math.max(
2668
+ const { encoding: s, escape: f, quote: u } = this.options, { quoting: l, needMoreDataSize: h, recordDelimiterMaxLength: c } = this.state, g = i - n - 1, y = Math.max(
2669
2669
  h,
2670
2670
  // Skip if the remaining buffer smaller than record delimiter
2671
2671
  // If "record_delimiter" is yet to be discovered:
@@ -2676,9 +2676,9 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2676
2676
  c === 0 ? a.from(`\r
2677
2677
  `, s).length : c,
2678
2678
  // Skip if remaining buffer can be an escaped quote
2679
- u ? (f === null ? 0 : f.length) + l.length : 0,
2679
+ l ? (f === null ? 0 : f.length) + u.length : 0,
2680
2680
  // Skip if remaining buffer can be record delimiter following the closing quote
2681
- u ? l.length + c : 0
2681
+ l ? u.length + c : 0
2682
2682
  );
2683
2683
  return g < y;
2684
2684
  },
@@ -2686,8 +2686,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2686
2686
  parse: function(n, i, o, s) {
2687
2687
  const {
2688
2688
  bom: f,
2689
- comment_no_infix: l,
2690
- encoding: u,
2689
+ comment_no_infix: u,
2690
+ encoding: l,
2691
2691
  from_line: h,
2692
2692
  ltrim: c,
2693
2693
  max_record_size: g,
@@ -2696,18 +2696,18 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2696
2696
  rtrim: E,
2697
2697
  skip_empty_lines: x,
2698
2698
  to: S,
2699
- to_line: m
2699
+ to_line: w
2700
2700
  } = this.options;
2701
- let { comment: _, escape: L, quote: U, record_delimiter: Re } = this.options;
2702
- const { bomSkipped: Yt, previousBuf: he, rawBuffer: Wt, escapeIsQuote: Ht } = this.state;
2701
+ let { comment: m, escape: R, quote: L, record_delimiter: se } = this.options;
2702
+ const { bomSkipped: Yt, previousBuf: ce, rawBuffer: Wt, escapeIsQuote: Ht } = this.state;
2703
2703
  let v;
2704
- if (he === void 0)
2704
+ if (ce === void 0)
2705
2705
  if (n === void 0) {
2706
2706
  s();
2707
2707
  return;
2708
2708
  } else
2709
2709
  v = n;
2710
- else he !== void 0 && n === void 0 ? v = he : v = a.concat([he, n]);
2710
+ else ce !== void 0 && n === void 0 ? v = ce : v = a.concat([ce, n]);
2711
2711
  if (Yt === !1)
2712
2712
  if (f === !1)
2713
2713
  this.state.bomSkipped = !0;
@@ -2717,17 +2717,17 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2717
2717
  return;
2718
2718
  }
2719
2719
  } else {
2720
- for (const I in re)
2721
- if (re[I].compare(v, 0, re[I].length) === 0) {
2722
- const J = re[I].length;
2720
+ for (const C in re)
2721
+ if (re[C].compare(v, 0, re[C].length) === 0) {
2722
+ const J = re[C].length;
2723
2723
  this.state.bufBytesStart += J, v = v.slice(J);
2724
- const ce = ft({
2724
+ const de = ft({
2725
2725
  ...this.original_options,
2726
- encoding: I
2726
+ encoding: C
2727
2727
  });
2728
- for (const C in ce)
2729
- this.options[C] = ce[C];
2730
- ({ comment: _, escape: L, quote: U } = this.options);
2728
+ for (const A in de)
2729
+ this.options[A] = de[A];
2730
+ ({ comment: m, escape: R, quote: L } = this.options);
2731
2731
  break;
2732
2732
  }
2733
2733
  this.state.bomSkipped = !0;
@@ -2735,47 +2735,47 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2735
2735
  const Ie = v.length;
2736
2736
  let d;
2737
2737
  for (d = 0; d < Ie && !this.__needMoreData(d, Ie, i); d++) {
2738
- if (this.state.wasRowDelimiter === !0 && (this.info.lines++, this.state.wasRowDelimiter = !1), m !== -1 && this.info.lines > m) {
2738
+ if (this.state.wasRowDelimiter === !0 && (this.info.lines++, this.state.wasRowDelimiter = !1), w !== -1 && this.info.lines > w) {
2739
2739
  this.state.stop = !0, s();
2740
2740
  return;
2741
2741
  }
2742
- this.state.quoting === !1 && Re.length === 0 && this.__autoDiscoverRecordDelimiter(
2742
+ this.state.quoting === !1 && se.length === 0 && this.__autoDiscoverRecordDelimiter(
2743
2743
  v,
2744
2744
  d
2745
- ) && (Re = this.options.record_delimiter);
2746
- const I = v[d];
2747
- if (y === !0 && Wt.append(I), (I === Pn || I === $n) && this.state.wasRowDelimiter === !1 && (this.state.wasRowDelimiter = !0), this.state.escaping === !0)
2745
+ ) && (se = this.options.record_delimiter);
2746
+ const C = v[d];
2747
+ if (y === !0 && Wt.append(C), (C === Pn || C === $n) && this.state.wasRowDelimiter === !1 && (this.state.wasRowDelimiter = !0), this.state.escaping === !0)
2748
2748
  this.state.escaping = !1;
2749
2749
  else {
2750
- if (L !== null && this.state.quoting === !0 && this.__isEscape(v, d, I) && d + L.length < Ie)
2750
+ if (R !== null && this.state.quoting === !0 && this.__isEscape(v, d, C) && d + R.length < Ie)
2751
2751
  if (Ht) {
2752
- if (this.__isQuote(v, d + L.length)) {
2753
- this.state.escaping = !0, d += L.length - 1;
2752
+ if (this.__isQuote(v, d + R.length)) {
2753
+ this.state.escaping = !0, d += R.length - 1;
2754
2754
  continue;
2755
2755
  }
2756
2756
  } else {
2757
- this.state.escaping = !0, d += L.length - 1;
2757
+ this.state.escaping = !0, d += R.length - 1;
2758
2758
  continue;
2759
2759
  }
2760
2760
  if (this.state.commenting === !1 && this.__isQuote(v, d))
2761
2761
  if (this.state.quoting === !0) {
2762
- const C = v[d + U.length], Z = E && this.__isCharTrimable(v, d + U.length), j = _ !== null && this.__compareBytes(_, v, d + U.length, C), X = this.__isDelimiter(
2762
+ const A = v[d + L.length], Z = E && this.__isCharTrimable(v, d + L.length), j = m !== null && this.__compareBytes(m, v, d + L.length, A), X = this.__isDelimiter(
2763
2763
  v,
2764
- d + U.length,
2765
- C
2766
- ), de = Re.length === 0 ? this.__autoDiscoverRecordDelimiter(v, d + U.length) : this.__isRecordDelimiter(C, v, d + U.length);
2767
- if (L !== null && this.__isEscape(v, d, I) && this.__isQuote(v, d + L.length))
2768
- d += L.length - 1;
2769
- else if (!C || X || de || j || Z) {
2770
- this.state.quoting = !1, this.state.wasQuoting = !0, d += U.length - 1;
2764
+ d + L.length,
2765
+ A
2766
+ ), pe = se.length === 0 ? this.__autoDiscoverRecordDelimiter(v, d + L.length) : this.__isRecordDelimiter(A, v, d + L.length);
2767
+ if (R !== null && this.__isEscape(v, d, C) && this.__isQuote(v, d + R.length))
2768
+ d += R.length - 1;
2769
+ else if (!A || X || pe || j || Z) {
2770
+ this.state.quoting = !1, this.state.wasQuoting = !0, d += L.length - 1;
2771
2771
  continue;
2772
2772
  } else if (O === !1) {
2773
2773
  const He = this.__error(
2774
- new w(
2774
+ new _(
2775
2775
  "CSV_INVALID_CLOSING_QUOTE",
2776
2776
  [
2777
2777
  "Invalid Closing Quote:",
2778
- `got "${String.fromCharCode(C)}"`,
2778
+ `got "${String.fromCharCode(A)}"`,
2779
2779
  `at line ${this.info.lines}`,
2780
2780
  "instead of delimiter, record delimiter, trimable character",
2781
2781
  "(if activated) or comment"
@@ -2786,21 +2786,21 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2786
2786
  );
2787
2787
  if (He !== void 0) return He;
2788
2788
  } else
2789
- this.state.quoting = !1, this.state.wasQuoting = !0, this.state.field.prepend(U), d += U.length - 1;
2789
+ this.state.quoting = !1, this.state.wasQuoting = !0, this.state.field.prepend(L), d += L.length - 1;
2790
2790
  } else if (this.state.field.length !== 0) {
2791
2791
  if (O === !1) {
2792
- const C = this.__infoField(), Z = Object.keys(re).map(
2792
+ const A = this.__infoField(), Z = Object.keys(re).map(
2793
2793
  (X) => re[X].equals(this.state.field.toString()) ? X : !1
2794
2794
  ).filter(Boolean)[0], j = this.__error(
2795
- new w(
2795
+ new _(
2796
2796
  "INVALID_OPENING_QUOTE",
2797
2797
  [
2798
2798
  "Invalid Opening Quote:",
2799
- `a quote is found on field ${JSON.stringify(C.column)} at line ${C.lines}, value is ${JSON.stringify(this.state.field.toString(u))}`,
2799
+ `a quote is found on field ${JSON.stringify(A.column)} at line ${A.lines}, value is ${JSON.stringify(this.state.field.toString(l))}`,
2800
2800
  Z ? `(${Z} bom)` : void 0
2801
2801
  ],
2802
2802
  this.options,
2803
- C,
2803
+ A,
2804
2804
  {
2805
2805
  field: this.state.field
2806
2806
  }
@@ -2809,48 +2809,48 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2809
2809
  if (j !== void 0) return j;
2810
2810
  }
2811
2811
  } else {
2812
- this.state.quoting = !0, d += U.length - 1;
2812
+ this.state.quoting = !0, d += L.length - 1;
2813
2813
  continue;
2814
2814
  }
2815
2815
  if (this.state.quoting === !1) {
2816
- const C = this.__isRecordDelimiter(
2817
- I,
2816
+ const A = this.__isRecordDelimiter(
2817
+ C,
2818
2818
  v,
2819
2819
  d
2820
2820
  );
2821
- if (C !== 0) {
2821
+ if (A !== 0) {
2822
2822
  if (this.state.commenting && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0)
2823
2823
  this.info.comment_lines++;
2824
2824
  else {
2825
2825
  if (this.state.enabled === !1 && this.info.lines + (this.state.wasRowDelimiter === !0 ? 1 : 0) >= h) {
2826
- this.state.enabled = !0, this.__resetField(), this.__resetRecord(), d += C - 1;
2826
+ this.state.enabled = !0, this.__resetField(), this.__resetRecord(), d += A - 1;
2827
2827
  continue;
2828
2828
  }
2829
2829
  if (x === !0 && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0) {
2830
- this.info.empty_lines++, d += C - 1;
2830
+ this.info.empty_lines++, d += A - 1;
2831
2831
  continue;
2832
2832
  }
2833
2833
  this.info.bytes = this.state.bufBytesStart + d;
2834
2834
  const X = this.__onField();
2835
2835
  if (X !== void 0) return X;
2836
- this.info.bytes = this.state.bufBytesStart + d + C;
2837
- const de = this.__onRecord(o);
2838
- if (de !== void 0) return de;
2836
+ this.info.bytes = this.state.bufBytesStart + d + A;
2837
+ const pe = this.__onRecord(o);
2838
+ if (pe !== void 0) return pe;
2839
2839
  if (S !== -1 && this.info.records >= S) {
2840
2840
  this.state.stop = !0, s();
2841
2841
  return;
2842
2842
  }
2843
2843
  }
2844
- this.state.commenting = !1, d += C - 1;
2844
+ this.state.commenting = !1, d += A - 1;
2845
2845
  continue;
2846
2846
  }
2847
2847
  if (this.state.commenting)
2848
2848
  continue;
2849
- if (_ !== null && (l === !1 || this.state.record.length === 0 && this.state.field.length === 0) && this.__compareBytes(_, v, d, I) !== 0) {
2849
+ if (m !== null && (u === !1 || this.state.record.length === 0 && this.state.field.length === 0) && this.__compareBytes(m, v, d, C) !== 0) {
2850
2850
  this.state.commenting = !0;
2851
2851
  continue;
2852
2852
  }
2853
- const Z = this.__isDelimiter(v, d, I);
2853
+ const Z = this.__isDelimiter(v, d, C);
2854
2854
  if (Z !== 0) {
2855
2855
  this.info.bytes = this.state.bufBytesStart + d;
2856
2856
  const j = this.__onField();
@@ -2862,7 +2862,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2862
2862
  }
2863
2863
  if (this.state.commenting === !1 && g !== 0 && this.state.record_length + this.state.field.length > g)
2864
2864
  return this.__error(
2865
- new w(
2865
+ new _(
2866
2866
  "CSV_MAX_RECORD_SIZE",
2867
2867
  [
2868
2868
  "Max Record Size:",
@@ -2874,13 +2874,13 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2874
2874
  this.__infoField()
2875
2875
  )
2876
2876
  );
2877
- const J = c === !1 || this.state.quoting === !0 || this.state.field.length !== 0 || !this.__isCharTrimable(v, d), ce = E === !1 || this.state.wasQuoting === !1;
2878
- if (J === !0 && ce === !0)
2879
- this.state.field.append(I);
2877
+ const J = c === !1 || this.state.quoting === !0 || this.state.field.length !== 0 || !this.__isCharTrimable(v, d), de = E === !1 || this.state.wasQuoting === !1;
2878
+ if (J === !0 && de === !0)
2879
+ this.state.field.append(C);
2880
2880
  else {
2881
2881
  if (E === !0 && !this.__isCharTrimable(v, d))
2882
2882
  return this.__error(
2883
- new w(
2883
+ new _(
2884
2884
  "CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",
2885
2885
  [
2886
2886
  "Invalid Closing Quote:",
@@ -2897,8 +2897,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2897
2897
  }
2898
2898
  if (i === !0)
2899
2899
  if (this.state.quoting === !0) {
2900
- const I = this.__error(
2901
- new w(
2900
+ const C = this.__error(
2901
+ new _(
2902
2902
  "CSV_QUOTE_NOT_CLOSED",
2903
2903
  [
2904
2904
  "Quote Not Closed:",
@@ -2908,11 +2908,11 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2908
2908
  this.__infoField()
2909
2909
  )
2910
2910
  );
2911
- if (I !== void 0) return I;
2911
+ if (C !== void 0) return C;
2912
2912
  } else if (this.state.wasQuoting === !0 || this.state.record.length !== 0 || this.state.field.length !== 0) {
2913
2913
  this.info.bytes = this.state.bufBytesStart + d;
2914
- const I = this.__onField();
2915
- if (I !== void 0) return I;
2914
+ const C = this.__onField();
2915
+ if (C !== void 0) return C;
2916
2916
  const J = this.__onRecord(o);
2917
2917
  if (J !== void 0) return J;
2918
2918
  } else this.state.wasRowDelimiter === !0 ? this.info.empty_lines++ : this.state.commenting === !0 && this.info.comment_lines++;
@@ -2926,8 +2926,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2926
2926
  group_columns_by_name: o,
2927
2927
  encoding: s,
2928
2928
  info: f,
2929
- from: l,
2930
- relax_column_count: u,
2929
+ from: u,
2930
+ relax_column_count: l,
2931
2931
  relax_column_count_less: h,
2932
2932
  relax_column_count_more: c,
2933
2933
  raw: g,
@@ -2944,7 +2944,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2944
2944
  return this.__firstLineToColumns(E);
2945
2945
  }
2946
2946
  if (i === !1 && this.info.records === 0 && (this.state.expectedRecordLength = x), x !== this.state.expectedRecordLength) {
2947
- const S = i === !1 ? new w(
2947
+ const S = i === !1 ? new _(
2948
2948
  "CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",
2949
2949
  [
2950
2950
  "Invalid Record Length:",
@@ -2956,7 +2956,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2956
2956
  {
2957
2957
  record: E
2958
2958
  }
2959
- ) : new w(
2959
+ ) : new _(
2960
2960
  "CSV_RECORD_INCONSISTENT_COLUMNS",
2961
2961
  [
2962
2962
  "Invalid Record Length:",
@@ -2970,11 +2970,11 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2970
2970
  record: E
2971
2971
  }
2972
2972
  );
2973
- if (u === !0 || h === !0 && x < this.state.expectedRecordLength || c === !0 && x > this.state.expectedRecordLength)
2973
+ if (l === !0 || h === !0 && x < this.state.expectedRecordLength || c === !0 && x > this.state.expectedRecordLength)
2974
2974
  this.info.invalid_field_length++, this.state.error = S;
2975
2975
  else {
2976
- const m = this.__error(S);
2977
- if (m) return m;
2976
+ const w = this.__error(S);
2977
+ if (w) return w;
2978
2978
  }
2979
2979
  }
2980
2980
  if (y === !0 && at(E)) {
@@ -2985,49 +2985,49 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
2985
2985
  this.__resetRecord(), this.state.recordHasError = !1;
2986
2986
  return;
2987
2987
  }
2988
- if (this.info.records++, l === 1 || this.info.records >= l) {
2988
+ if (this.info.records++, u === 1 || this.info.records >= u) {
2989
2989
  const { objname: S } = this.options;
2990
2990
  if (i !== !1) {
2991
- const m = {};
2992
- for (let _ = 0, L = E.length; _ < L; _++)
2993
- i[_] === void 0 || i[_].disabled || (o === !0 && m[i[_].name] !== void 0 ? Array.isArray(m[i[_].name]) ? m[i[_].name] = m[i[_].name].concat(E[_]) : m[i[_].name] = [m[i[_].name], E[_]] : m[i[_].name] = E[_]);
2991
+ const w = {};
2992
+ for (let m = 0, R = E.length; m < R; m++)
2993
+ i[m] === void 0 || i[m].disabled || (o === !0 && w[i[m].name] !== void 0 ? Array.isArray(w[i[m].name]) ? w[i[m].name] = w[i[m].name].concat(E[m]) : w[i[m].name] = [w[i[m].name], E[m]] : w[i[m].name] = E[m]);
2994
2994
  if (g === !0 || f === !0) {
2995
- const _ = Object.assign(
2996
- { record: m },
2995
+ const m = Object.assign(
2996
+ { record: w },
2997
2997
  g === !0 ? { raw: this.state.rawBuffer.toString(s) } : {},
2998
2998
  f === !0 ? { info: this.__infoRecord() } : {}
2999
- ), L = this.__push(
3000
- S === void 0 ? _ : [m[S], _],
2999
+ ), R = this.__push(
3000
+ S === void 0 ? m : [w[S], m],
3001
3001
  n
3002
3002
  );
3003
- if (L)
3004
- return L;
3003
+ if (R)
3004
+ return R;
3005
3005
  } else {
3006
- const _ = this.__push(
3007
- S === void 0 ? m : [m[S], m],
3006
+ const m = this.__push(
3007
+ S === void 0 ? w : [w[S], w],
3008
3008
  n
3009
3009
  );
3010
- if (_)
3011
- return _;
3010
+ if (m)
3011
+ return m;
3012
3012
  }
3013
3013
  } else if (g === !0 || f === !0) {
3014
- const m = Object.assign(
3014
+ const w = Object.assign(
3015
3015
  { record: E },
3016
3016
  g === !0 ? { raw: this.state.rawBuffer.toString(s) } : {},
3017
3017
  f === !0 ? { info: this.__infoRecord() } : {}
3018
- ), _ = this.__push(
3019
- S === void 0 ? m : [E[S], m],
3018
+ ), m = this.__push(
3019
+ S === void 0 ? w : [E[S], w],
3020
3020
  n
3021
3021
  );
3022
- if (_)
3023
- return _;
3022
+ if (m)
3023
+ return m;
3024
3024
  } else {
3025
- const m = this.__push(
3025
+ const w = this.__push(
3026
3026
  S === void 0 ? E : [E[S], E],
3027
3027
  n
3028
3028
  );
3029
- if (m)
3030
- return m;
3029
+ if (w)
3030
+ return w;
3031
3031
  }
3032
3032
  }
3033
3033
  this.__resetRecord();
@@ -3038,7 +3038,7 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
3038
3038
  const o = i === void 0 ? n : i.call(null, n);
3039
3039
  if (!Array.isArray(o))
3040
3040
  return this.__error(
3041
- new w(
3041
+ new _(
3042
3042
  "CSV_INVALID_COLUMN_MAPPING",
3043
3043
  [
3044
3044
  "Invalid Column Mapping:",
@@ -3063,16 +3063,16 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
3063
3063
  this.options.raw === !0 && this.state.rawBuffer.reset(), this.state.error = void 0, this.state.record = [], this.state.record_length = 0;
3064
3064
  },
3065
3065
  __onField: function() {
3066
- const { cast: n, encoding: i, rtrim: o, max_record_size: s } = this.options, { enabled: f, wasQuoting: l } = this.state;
3066
+ const { cast: n, encoding: i, rtrim: o, max_record_size: s } = this.options, { enabled: f, wasQuoting: u } = this.state;
3067
3067
  if (f === !1)
3068
3068
  return this.__resetField();
3069
- let u = this.state.field.toString(i);
3070
- if (o === !0 && l === !1 && (u = u.trimRight()), n === !0) {
3071
- const [h, c] = this.__cast(u);
3069
+ let l = this.state.field.toString(i);
3070
+ if (o === !0 && u === !1 && (l = l.trimRight()), n === !0) {
3071
+ const [h, c] = this.__cast(l);
3072
3072
  if (h !== void 0) return h;
3073
- u = c;
3073
+ l = c;
3074
3074
  }
3075
- this.state.record.push(u), s !== 0 && typeof u == "string" && (this.state.record_length += u.length), this.__resetField();
3075
+ this.state.record.push(l), s !== 0 && typeof l == "string" && (this.state.record_length += l.length), this.__resetField();
3076
3076
  },
3077
3077
  __resetField: function() {
3078
3078
  this.state.field.reset(), this.state.wasQuoting = !1;
@@ -3114,9 +3114,9 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
3114
3114
  // Helper to test if a character is a space or a line delimiter
3115
3115
  __isCharTrimable: function(n, i) {
3116
3116
  return ((s, f) => {
3117
- const { timchars: l } = this.state;
3118
- e: for (let u = 0; u < l.length; u++) {
3119
- const h = l[u];
3117
+ const { timchars: u } = this.state;
3118
+ e: for (let l = 0; l < u.length; l++) {
3119
+ const h = u[l];
3120
3120
  for (let c = 0; c < h.length; c++)
3121
3121
  if (h[c] !== s[f + c]) continue e;
3122
3122
  return h.length;
@@ -3136,8 +3136,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
3136
3136
  __compareBytes: function(n, i, o, s) {
3137
3137
  if (n[0] !== s) return 0;
3138
3138
  const f = n.length;
3139
- for (let l = 1; l < f; l++)
3140
- if (n[l] !== i[o + l]) return 0;
3139
+ for (let u = 1; u < f; u++)
3140
+ if (n[u] !== i[o + u]) return 0;
3141
3141
  return f;
3142
3142
  },
3143
3143
  __isDelimiter: function(n, i, o) {
@@ -3146,25 +3146,25 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
3146
3146
  return 0;
3147
3147
  if (f !== !1 && typeof f == "number" && this.state.record.length === f - 1)
3148
3148
  return 0;
3149
- e: for (let l = 0; l < s.length; l++) {
3150
- const u = s[l];
3151
- if (u[0] === o) {
3152
- for (let h = 1; h < u.length; h++)
3153
- if (u[h] !== n[i + h]) continue e;
3154
- return u.length;
3149
+ e: for (let u = 0; u < s.length; u++) {
3150
+ const l = s[u];
3151
+ if (l[0] === o) {
3152
+ for (let h = 1; h < l.length; h++)
3153
+ if (l[h] !== n[i + h]) continue e;
3154
+ return l.length;
3155
3155
  }
3156
3156
  }
3157
3157
  return 0;
3158
3158
  },
3159
3159
  __isRecordDelimiter: function(n, i, o) {
3160
3160
  const { record_delimiter: s } = this.options, f = s.length;
3161
- e: for (let l = 0; l < f; l++) {
3162
- const u = s[l], h = u.length;
3163
- if (u[0] === n) {
3161
+ e: for (let u = 0; u < f; u++) {
3162
+ const l = s[u], h = l.length;
3163
+ if (l[0] === n) {
3164
3164
  for (let c = 1; c < h; c++)
3165
- if (u[c] !== i[o + c])
3165
+ if (l[c] !== i[o + c])
3166
3166
  continue e;
3167
- return u.length;
3167
+ return l.length;
3168
3168
  }
3169
3169
  }
3170
3170
  return 0;
@@ -3174,8 +3174,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
3174
3174
  if (s === null) return !1;
3175
3175
  const f = s.length;
3176
3176
  if (s[0] === o) {
3177
- for (let l = 0; l < f; l++)
3178
- if (s[l] !== n[i + l])
3177
+ for (let u = 0; u < f; u++)
3178
+ if (s[u] !== n[i + u])
3179
3179
  return !1;
3180
3180
  return !0;
3181
3181
  }
@@ -3200,9 +3200,9 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
3200
3200
  a.from("\r", o)
3201
3201
  ];
3202
3202
  e: for (let f = 0; f < s.length; f++) {
3203
- const l = s[f].length;
3204
- for (let u = 0; u < l; u++)
3205
- if (s[f][u] !== n[i + u])
3203
+ const u = s[f].length;
3204
+ for (let l = 0; l < u; l++)
3205
+ if (s[f][l] !== n[i + l])
3206
3206
  continue e;
3207
3207
  return this.options.record_delimiter.push(s[f]), this.state.recordDelimiterMaxLength = s[f].length, s[f].length;
3208
3208
  }
@@ -3217,8 +3217,8 @@ const Nn = 12, Dn = 13, Fn = 10, Mn = 32, Bn = 9, Un = function(t) {
3217
3217
  f,
3218
3218
  o ? this.state.rawBuffer.toString(i) : void 0
3219
3219
  );
3220
- } catch (l) {
3221
- return l;
3220
+ } catch (u) {
3221
+ return u;
3222
3222
  }
3223
3223
  return;
3224
3224
  } else
@@ -3292,18 +3292,18 @@ class qn extends k {
3292
3292
  e(r);
3293
3293
  }
3294
3294
  }
3295
- const lt = function() {
3295
+ const ut = function() {
3296
3296
  let t, e, r;
3297
3297
  for (const i in arguments) {
3298
3298
  const o = arguments[i], s = typeof o;
3299
- if (t === void 0 && (typeof o == "string" || N(o)))
3299
+ if (t === void 0 && (typeof o == "string" || D(o)))
3300
3300
  t = o;
3301
3301
  else if (e === void 0 && Vt(o))
3302
3302
  e = o;
3303
3303
  else if (r === void 0 && s === "function")
3304
3304
  r = o;
3305
3305
  else
3306
- throw new w(
3306
+ throw new _(
3307
3307
  "CSV_INVALID_ARGUMENT",
3308
3308
  ["Invalid argument:", `got ${JSON.stringify(o)} at index ${i}`],
3309
3309
  e || {}
@@ -3377,53 +3377,70 @@ const Qn = 40096;
3377
3377
  class Gn {
3378
3378
  /** Build parser. */
3379
3379
  buildParser(e) {
3380
- return lt(e);
3380
+ return ut(e);
3381
3381
  }
3382
3382
  /** Parse stream. */
3383
3383
  async parseStream(e, r, n, i) {
3384
3384
  return new Promise((o, s) => {
3385
- let f, l, u, h = !1, c = 0, g = !1;
3385
+ let f, u, l, h = !1, c = 0, g = !1;
3386
3386
  const y = () => {
3387
3387
  if (g) return;
3388
3388
  g = !0;
3389
3389
  const x = f;
3390
- f = void 0, u = void 0, x != null && (this.ignoreErrors(() => x.removeAllListeners()), this.ignoreErrors(() => x.end())), this.ignoreErrors(() => {
3391
- l?.cancel();
3392
- }), l = void 0;
3390
+ f = void 0, l = void 0, x != null && (this.ignoreErrors(() => x.removeAllListeners()), this.ignoreErrors(() => x.end())), this.ignoreErrors(() => {
3391
+ u?.cancel();
3392
+ }), u = void 0;
3393
3393
  }, O = (x) => {
3394
- h || (console.log("handleError 1"), h = !0, console.log("handleError 2"), y(), i.signal.aborted || i.abort(x), console.log("handleError 3"), console.log("handleError 4"), s(x), console.log("handleError 5"));
3394
+ h || (h = !0, y(), i.signal.aborted || i.abort(x), s(x));
3395
3395
  };
3396
3396
  i.signal.addEventListener("abort", y, { once: !0 }), (async () => {
3397
- f = lt(e), u = this.constructRowBuffer({ chunk: () => {
3397
+ f = ut(e), l = this.constructRowBuffer({ chunk: () => {
3398
3398
  }, chunkSize: r.chunkSize ?? Qn }), f.on("readable", () => {
3399
3399
  try {
3400
- const m = c;
3401
- if (f == null || u == null) return;
3402
- let _;
3403
- for (; (_ = f.read()) != null; ) {
3400
+ const R = c;
3401
+ if (f == null || l == null) return;
3402
+ let L;
3403
+ for (; (L = f.read()) != null; ) {
3404
3404
  if (c++, h) return;
3405
- i.signal.throwIfAborted(), u.push(_);
3405
+ i.signal.throwIfAborted(), l.push(L);
3406
3406
  }
3407
- console.log(3333, c - m);
3408
- } catch (m) {
3409
- O(m);
3407
+ console.log(3333, c - R);
3408
+ } catch (R) {
3409
+ O(R);
3410
3410
  }
3411
- }), f.on("error", (m) => O(m)), f.on("end", () => {
3412
- h || (u?.flush(), o(this.constructSummary(f)));
3411
+ }), f.on("error", (R) => O(R)), f.on("end", () => {
3412
+ h || (l?.flush(), o(this.constructSummary(f)));
3413
3413
  });
3414
3414
  const x = await fetch(encodeURI(n), { signal: i.signal });
3415
3415
  if (!x.ok || x.body == null)
3416
3416
  throw await Yn(x, `Failed to fetch '${n}' file.`, "datapos-connector-file-store-emulator|Connector|retrieve");
3417
- l = x.body.pipeThrough(new TextDecoderStream(r.encodingId)).getReader();
3418
- let S = await l.read();
3417
+ u = x.body.pipeThrough(new TextDecoderStream(r.encodingId)).getReader();
3418
+ let S = await u.read(), w = Promise.resolve();
3419
+ const m = (R) => {
3420
+ const L = f;
3421
+ w = w.then(() => {
3422
+ if (!(h || L == null))
3423
+ return this.writeToParser(L, R);
3424
+ }).catch((se) => {
3425
+ O(se);
3426
+ });
3427
+ };
3419
3428
  for (; !S.done; ) {
3420
- if (console.log(1111.1), h) return;
3421
- console.log(1111.2), i.signal.throwIfAborted(), await this.writeToParser(f, S.value), S = await l.read();
3429
+ if (h) return;
3430
+ i.signal.throwIfAborted(), m(S.value), S = await u.read();
3422
3431
  }
3423
- f.end();
3432
+ await w, !h && f.end();
3424
3433
  })().catch((x) => O(x));
3425
3434
  });
3426
3435
  }
3436
+ /** Write to parser. */
3437
+ writeToParser(e, r) {
3438
+ return new Promise((n, i) => {
3439
+ e.write(r, (o) => {
3440
+ o ? i(o) : n();
3441
+ });
3442
+ });
3443
+ }
3427
3444
  /** Parse string. */
3428
3445
  parseString() {
3429
3446
  }
@@ -3448,14 +3465,6 @@ class Gn {
3448
3465
  recordCount: e?.info.records ?? -1
3449
3466
  };
3450
3467
  }
3451
- /** Write to parser. */
3452
- writeToParser(e, r) {
3453
- return new Promise((n, i) => {
3454
- e.write(r, (o) => {
3455
- o ? i(o) : n();
3456
- });
3457
- });
3458
- }
3459
3468
  /** Ignore best-effort cleanup errors to keep teardown noise-free. */
3460
3469
  ignoreErrors(e) {
3461
3470
  try {