@dxos/node-std 0.6.10 → 0.6.11-staging.32b42e4

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.
Files changed (48) hide show
  1. package/dist/lib/browser/_/config.mjs +1 -1
  2. package/dist/lib/browser/assert.mjs +44 -80
  3. package/dist/lib/browser/assert.mjs.map +1 -1
  4. package/dist/lib/browser/buffer.mjs +2 -2
  5. package/dist/lib/browser/{chunk-MJPHVYKR.mjs → chunk-3QS3WKRC.mjs} +1 -1
  6. package/dist/lib/browser/{chunk-CMGRJ4FC.mjs → chunk-BBIU6VNW.mjs} +3 -3
  7. package/dist/lib/browser/{chunk-RGVVW7F2.mjs → chunk-EC477KOW.mjs} +19 -31
  8. package/dist/lib/browser/{chunk-RGVVW7F2.mjs.map → chunk-EC477KOW.mjs.map} +1 -1
  9. package/dist/lib/browser/{chunk-HFGMGNFE.mjs → chunk-PY2IJ42L.mjs} +106 -210
  10. package/dist/lib/browser/{chunk-HFGMGNFE.mjs.map → chunk-PY2IJ42L.mjs.map} +1 -1
  11. package/dist/lib/browser/crypto.mjs +1 -1
  12. package/dist/lib/browser/events.mjs +4 -7
  13. package/dist/lib/browser/events.mjs.map +1 -1
  14. package/dist/lib/browser/fs/promises.mjs +1 -1
  15. package/dist/lib/browser/fs.mjs +1 -1
  16. package/dist/lib/browser/globals.mjs +3 -3
  17. package/dist/lib/browser/inject-globals.mjs +2 -2
  18. package/dist/lib/browser/meta.json +1 -1
  19. package/dist/lib/browser/path.mjs +22 -43
  20. package/dist/lib/browser/path.mjs.map +1 -1
  21. package/dist/lib/browser/stream.mjs +1 -1
  22. package/dist/lib/browser/util.mjs +4 -4
  23. package/dist/lib/node/_/config.cjs +1 -1
  24. package/dist/lib/node/assert.cjs +1 -1
  25. package/dist/lib/node/buffer.cjs +3 -3
  26. package/dist/lib/node/{chunk-XUVUYQ27.cjs → chunk-6SZKM6EC.cjs} +5 -6
  27. package/dist/lib/node/chunk-6SZKM6EC.cjs.map +7 -0
  28. package/dist/lib/node/{chunk-LQSBC3HI.cjs → chunk-FCCITQEP.cjs} +125 -229
  29. package/dist/lib/node/{chunk-LQSBC3HI.cjs.map → chunk-FCCITQEP.cjs.map} +2 -2
  30. package/dist/lib/node/{chunk-D73VD6UV.cjs → chunk-NY4EGPUF.cjs} +4 -4
  31. package/dist/lib/node/crypto.cjs +1 -1
  32. package/dist/lib/node/events.cjs +1 -1
  33. package/dist/lib/node/fs/promises.cjs +1 -1
  34. package/dist/lib/node/fs.cjs +1 -1
  35. package/dist/lib/node/globals.cjs +3 -3
  36. package/dist/lib/node/globals.cjs.map +1 -1
  37. package/dist/lib/node/inject-globals.cjs +3 -3
  38. package/dist/lib/node/meta.json +1 -1
  39. package/dist/lib/node/path.cjs +26 -47
  40. package/dist/lib/node/path.cjs.map +2 -2
  41. package/dist/lib/node/stream.cjs +1 -1
  42. package/dist/lib/node/util.cjs +157 -170
  43. package/dist/lib/node/util.cjs.map +2 -2
  44. package/package.json +1 -1
  45. package/dist/lib/node/chunk-XUVUYQ27.cjs.map +0 -7
  46. /package/dist/lib/browser/{chunk-MJPHVYKR.mjs.map → chunk-3QS3WKRC.mjs.map} +0 -0
  47. /package/dist/lib/browser/{chunk-CMGRJ4FC.mjs.map → chunk-BBIU6VNW.mjs.map} +0 -0
  48. /package/dist/lib/node/{chunk-D73VD6UV.cjs.map → chunk-NY4EGPUF.cjs.map} +0 -0
@@ -16,18 +16,18 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_LQSBC3HI_exports = {};
20
- __export(chunk_LQSBC3HI_exports, {
19
+ var chunk_FCCITQEP_exports = {};
20
+ __export(chunk_FCCITQEP_exports, {
21
21
  require_buffer: () => require_buffer
22
22
  });
23
- module.exports = __toCommonJS(chunk_LQSBC3HI_exports);
24
- var import_chunk_XUVUYQ27 = require("./chunk-XUVUYQ27.cjs");
25
- var require_base64_js = (0, import_chunk_XUVUYQ27.__commonJS)({
26
- "node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js"(exports) {
23
+ module.exports = __toCommonJS(chunk_FCCITQEP_exports);
24
+ var import_chunk_6SZKM6EC = require("./chunk-6SZKM6EC.cjs");
25
+ var require_base64_js = (0, import_chunk_6SZKM6EC.__commonJS)({
26
+ "node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js"(exports2) {
27
27
  "use strict";
28
- exports.byteLength = byteLength;
29
- exports.toByteArray = toByteArray;
30
- exports.fromByteArray = fromByteArray;
28
+ exports2.byteLength = byteLength;
29
+ exports2.toByteArray = toByteArray;
30
+ exports2.fromByteArray = fromByteArray;
31
31
  var lookup = [];
32
32
  var revLookup = [];
33
33
  var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
@@ -46,8 +46,7 @@ var require_base64_js = (0, import_chunk_XUVUYQ27.__commonJS)({
46
46
  throw new Error("Invalid string. Length must be a multiple of 4");
47
47
  }
48
48
  var validLen = b64.indexOf("=");
49
- if (validLen === -1)
50
- validLen = len2;
49
+ if (validLen === -1) validLen = len2;
51
50
  var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
52
51
  return [validLen, placeHoldersLen];
53
52
  }
@@ -122,9 +121,9 @@ var require_base64_js = (0, import_chunk_XUVUYQ27.__commonJS)({
122
121
  }
123
122
  }
124
123
  });
125
- var require_ieee754 = (0, import_chunk_XUVUYQ27.__commonJS)({
126
- "node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js"(exports) {
127
- exports.read = function(buffer, offset, isLE, mLen, nBytes) {
124
+ var require_ieee754 = (0, import_chunk_6SZKM6EC.__commonJS)({
125
+ "node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js"(exports2) {
126
+ exports2.read = function(buffer, offset, isLE, mLen, nBytes) {
128
127
  var e, m;
129
128
  var eLen = nBytes * 8 - mLen - 1;
130
129
  var eMax = (1 << eLen) - 1;
@@ -154,7 +153,7 @@ var require_ieee754 = (0, import_chunk_XUVUYQ27.__commonJS)({
154
153
  }
155
154
  return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
156
155
  };
157
- exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
156
+ exports2.write = function(buffer, value, offset, isLE, mLen, nBytes) {
158
157
  var e, m, c;
159
158
  var eLen = nBytes * 8 - mLen - 1;
160
159
  var eMax = (1 << eLen) - 1;
@@ -203,17 +202,17 @@ var require_ieee754 = (0, import_chunk_XUVUYQ27.__commonJS)({
203
202
  };
204
203
  }
205
204
  });
206
- var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
207
- "node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js"(exports) {
205
+ var require_buffer = (0, import_chunk_6SZKM6EC.__commonJS)({
206
+ "node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js"(exports2) {
208
207
  "use strict";
209
208
  var base64 = require_base64_js();
210
209
  var ieee754 = require_ieee754();
211
210
  var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
212
- exports.Buffer = Buffer2;
213
- exports.SlowBuffer = SlowBuffer;
214
- exports.INSPECT_MAX_BYTES = 50;
211
+ exports2.Buffer = Buffer2;
212
+ exports2.SlowBuffer = SlowBuffer;
213
+ exports2.INSPECT_MAX_BYTES = 50;
215
214
  var K_MAX_LENGTH = 2147483647;
216
- exports.kMaxLength = K_MAX_LENGTH;
215
+ exports2.kMaxLength = K_MAX_LENGTH;
217
216
  Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport();
218
217
  if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
219
218
  console.error(
@@ -236,16 +235,14 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
236
235
  Object.defineProperty(Buffer2.prototype, "parent", {
237
236
  enumerable: true,
238
237
  get: function() {
239
- if (!Buffer2.isBuffer(this))
240
- return void 0;
238
+ if (!Buffer2.isBuffer(this)) return void 0;
241
239
  return this.buffer;
242
240
  }
243
241
  });
244
242
  Object.defineProperty(Buffer2.prototype, "offset", {
245
243
  enumerable: true,
246
244
  get: function() {
247
- if (!Buffer2.isBuffer(this))
248
- return void 0;
245
+ if (!Buffer2.isBuffer(this)) return void 0;
249
246
  return this.byteOffset;
250
247
  }
251
248
  });
@@ -297,8 +294,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
297
294
  return Buffer2.from(valueOf, encodingOrOffset, length);
298
295
  }
299
296
  const b = fromObject(value);
300
- if (b)
301
- return b;
297
+ if (b) return b;
302
298
  if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
303
299
  return Buffer2.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
304
300
  }
@@ -425,17 +421,14 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
425
421
  return b != null && b._isBuffer === true && b !== Buffer2.prototype;
426
422
  };
427
423
  Buffer2.compare = function compare(a, b) {
428
- if (isInstance(a, Uint8Array))
429
- a = Buffer2.from(a, a.offset, a.byteLength);
430
- if (isInstance(b, Uint8Array))
431
- b = Buffer2.from(b, b.offset, b.byteLength);
424
+ if (isInstance(a, Uint8Array)) a = Buffer2.from(a, a.offset, a.byteLength);
425
+ if (isInstance(b, Uint8Array)) b = Buffer2.from(b, b.offset, b.byteLength);
432
426
  if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) {
433
427
  throw new TypeError(
434
428
  'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
435
429
  );
436
430
  }
437
- if (a === b)
438
- return 0;
431
+ if (a === b) return 0;
439
432
  let x = a.length;
440
433
  let y = b.length;
441
434
  for (let i = 0, len = Math.min(x, y); i < len; ++i) {
@@ -445,10 +438,8 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
445
438
  break;
446
439
  }
447
440
  }
448
- if (x < y)
449
- return -1;
450
- if (y < x)
451
- return 1;
441
+ if (x < y) return -1;
442
+ if (y < x) return 1;
452
443
  return 0;
453
444
  };
454
445
  Buffer2.isEncoding = function isEncoding(encoding) {
@@ -489,8 +480,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
489
480
  let buf = list[i];
490
481
  if (isInstance(buf, Uint8Array)) {
491
482
  if (pos + buf.length > buffer.length) {
492
- if (!Buffer2.isBuffer(buf))
493
- buf = Buffer2.from(buf);
483
+ if (!Buffer2.isBuffer(buf)) buf = Buffer2.from(buf);
494
484
  buf.copy(buffer, pos);
495
485
  } else {
496
486
  Uint8Array.prototype.set.call(
@@ -522,8 +512,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
522
512
  }
523
513
  const len = string.length;
524
514
  const mustMatch = arguments.length > 2 && arguments[2] === true;
525
- if (!mustMatch && len === 0)
526
- return 0;
515
+ if (!mustMatch && len === 0) return 0;
527
516
  let loweredCase = false;
528
517
  for (; ; ) {
529
518
  switch (encoding) {
@@ -572,8 +561,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
572
561
  if (end <= start) {
573
562
  return "";
574
563
  }
575
- if (!encoding)
576
- encoding = "utf8";
564
+ if (!encoding) encoding = "utf8";
577
565
  while (true) {
578
566
  switch (encoding) {
579
567
  case "hex":
@@ -594,8 +582,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
594
582
  case "utf-16le":
595
583
  return utf16leSlice(this, start, end);
596
584
  default:
597
- if (loweredCase)
598
- throw new TypeError("Unknown encoding: " + encoding);
585
+ if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
599
586
  encoding = (encoding + "").toLowerCase();
600
587
  loweredCase = true;
601
588
  }
@@ -643,26 +630,21 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
643
630
  };
644
631
  Buffer2.prototype.toString = function toString() {
645
632
  const length = this.length;
646
- if (length === 0)
647
- return "";
648
- if (arguments.length === 0)
649
- return utf8Slice(this, 0, length);
633
+ if (length === 0) return "";
634
+ if (arguments.length === 0) return utf8Slice(this, 0, length);
650
635
  return slowToString.apply(this, arguments);
651
636
  };
652
637
  Buffer2.prototype.toLocaleString = Buffer2.prototype.toString;
653
638
  Buffer2.prototype.equals = function equals(b) {
654
- if (!Buffer2.isBuffer(b))
655
- throw new TypeError("Argument must be a Buffer");
656
- if (this === b)
657
- return true;
639
+ if (!Buffer2.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
640
+ if (this === b) return true;
658
641
  return Buffer2.compare(this, b) === 0;
659
642
  };
660
643
  Buffer2.prototype.inspect = function inspect() {
661
644
  let str = "";
662
- const max = exports.INSPECT_MAX_BYTES;
645
+ const max = exports2.INSPECT_MAX_BYTES;
663
646
  str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
664
- if (this.length > max)
665
- str += " ... ";
647
+ if (this.length > max) str += " ... ";
666
648
  return "<Buffer " + str + ">";
667
649
  };
668
650
  if (customInspectSymbol) {
@@ -705,8 +687,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
705
687
  end >>>= 0;
706
688
  thisStart >>>= 0;
707
689
  thisEnd >>>= 0;
708
- if (this === target)
709
- return 0;
690
+ if (this === target) return 0;
710
691
  let x = thisEnd - thisStart;
711
692
  let y = end - start;
712
693
  const len = Math.min(x, y);
@@ -719,15 +700,12 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
719
700
  break;
720
701
  }
721
702
  }
722
- if (x < y)
723
- return -1;
724
- if (y < x)
725
- return 1;
703
+ if (x < y) return -1;
704
+ if (y < x) return 1;
726
705
  return 0;
727
706
  };
728
707
  function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
729
- if (buffer.length === 0)
730
- return -1;
708
+ if (buffer.length === 0) return -1;
731
709
  if (typeof byteOffset === "string") {
732
710
  encoding = byteOffset;
733
711
  byteOffset = 0;
@@ -740,18 +718,13 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
740
718
  if (numberIsNaN(byteOffset)) {
741
719
  byteOffset = dir ? 0 : buffer.length - 1;
742
720
  }
743
- if (byteOffset < 0)
744
- byteOffset = buffer.length + byteOffset;
721
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
745
722
  if (byteOffset >= buffer.length) {
746
- if (dir)
747
- return -1;
748
- else
749
- byteOffset = buffer.length - 1;
723
+ if (dir) return -1;
724
+ else byteOffset = buffer.length - 1;
750
725
  } else if (byteOffset < 0) {
751
- if (dir)
752
- byteOffset = 0;
753
- else
754
- return -1;
726
+ if (dir) byteOffset = 0;
727
+ else return -1;
755
728
  }
756
729
  if (typeof val === "string") {
757
730
  val = Buffer2.from(val, encoding);
@@ -802,19 +775,15 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
802
775
  let foundIndex = -1;
803
776
  for (i = byteOffset; i < arrLength; i++) {
804
777
  if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
805
- if (foundIndex === -1)
806
- foundIndex = i;
807
- if (i - foundIndex + 1 === valLength)
808
- return foundIndex * indexSize;
778
+ if (foundIndex === -1) foundIndex = i;
779
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
809
780
  } else {
810
- if (foundIndex !== -1)
811
- i -= i - foundIndex;
781
+ if (foundIndex !== -1) i -= i - foundIndex;
812
782
  foundIndex = -1;
813
783
  }
814
784
  }
815
785
  } else {
816
- if (byteOffset + valLength > arrLength)
817
- byteOffset = arrLength - valLength;
786
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
818
787
  for (i = byteOffset; i >= 0; i--) {
819
788
  let found = true;
820
789
  for (let j = 0; j < valLength; j++) {
@@ -823,8 +792,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
823
792
  break;
824
793
  }
825
794
  }
826
- if (found)
827
- return i;
795
+ if (found) return i;
828
796
  }
829
797
  }
830
798
  return -1;
@@ -856,8 +824,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
856
824
  let i;
857
825
  for (i = 0; i < length; ++i) {
858
826
  const parsed = parseInt(string.substr(i * 2, 2), 16);
859
- if (numberIsNaN(parsed))
860
- return i;
827
+ if (numberIsNaN(parsed)) return i;
861
828
  buf[offset + i] = parsed;
862
829
  }
863
830
  return i;
@@ -887,8 +854,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
887
854
  offset = offset >>> 0;
888
855
  if (isFinite(length)) {
889
856
  length = length >>> 0;
890
- if (encoding === void 0)
891
- encoding = "utf8";
857
+ if (encoding === void 0) encoding = "utf8";
892
858
  } else {
893
859
  encoding = length;
894
860
  length = void 0;
@@ -899,13 +865,11 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
899
865
  );
900
866
  }
901
867
  const remaining = this.length - offset;
902
- if (length === void 0 || length > remaining)
903
- length = remaining;
868
+ if (length === void 0 || length > remaining) length = remaining;
904
869
  if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
905
870
  throw new RangeError("Attempt to write outside buffer bounds");
906
871
  }
907
- if (!encoding)
908
- encoding = "utf8";
872
+ if (!encoding) encoding = "utf8";
909
873
  let loweredCase = false;
910
874
  for (; ; ) {
911
875
  switch (encoding) {
@@ -926,8 +890,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
926
890
  case "utf-16le":
927
891
  return ucs2Write(this, string, offset, length);
928
892
  default:
929
- if (loweredCase)
930
- throw new TypeError("Unknown encoding: " + encoding);
893
+ if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
931
894
  encoding = ("" + encoding).toLowerCase();
932
895
  loweredCase = true;
933
896
  }
@@ -1040,10 +1003,8 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1040
1003
  }
1041
1004
  function hexSlice(buf, start, end) {
1042
1005
  const len = buf.length;
1043
- if (!start || start < 0)
1044
- start = 0;
1045
- if (!end || end < 0 || end > len)
1046
- end = len;
1006
+ if (!start || start < 0) start = 0;
1007
+ if (!end || end < 0 || end > len) end = len;
1047
1008
  let out = "";
1048
1009
  for (let i = start; i < end; ++i) {
1049
1010
  out += hexSliceLookupTable[buf[i]];
@@ -1064,35 +1025,29 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1064
1025
  end = end === void 0 ? len : ~~end;
1065
1026
  if (start < 0) {
1066
1027
  start += len;
1067
- if (start < 0)
1068
- start = 0;
1028
+ if (start < 0) start = 0;
1069
1029
  } else if (start > len) {
1070
1030
  start = len;
1071
1031
  }
1072
1032
  if (end < 0) {
1073
1033
  end += len;
1074
- if (end < 0)
1075
- end = 0;
1034
+ if (end < 0) end = 0;
1076
1035
  } else if (end > len) {
1077
1036
  end = len;
1078
1037
  }
1079
- if (end < start)
1080
- end = start;
1038
+ if (end < start) end = start;
1081
1039
  const newBuf = this.subarray(start, end);
1082
1040
  Object.setPrototypeOf(newBuf, Buffer2.prototype);
1083
1041
  return newBuf;
1084
1042
  };
1085
1043
  function checkOffset(offset, ext, length) {
1086
- if (offset % 1 !== 0 || offset < 0)
1087
- throw new RangeError("offset is not uint");
1088
- if (offset + ext > length)
1089
- throw new RangeError("Trying to access beyond buffer length");
1044
+ if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint");
1045
+ if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length");
1090
1046
  }
1091
1047
  Buffer2.prototype.readUintLE = Buffer2.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {
1092
1048
  offset = offset >>> 0;
1093
1049
  byteLength2 = byteLength2 >>> 0;
1094
- if (!noAssert)
1095
- checkOffset(offset, byteLength2, this.length);
1050
+ if (!noAssert) checkOffset(offset, byteLength2, this.length);
1096
1051
  let val = this[offset];
1097
1052
  let mul = 1;
1098
1053
  let i = 0;
@@ -1116,32 +1071,27 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1116
1071
  };
1117
1072
  Buffer2.prototype.readUint8 = Buffer2.prototype.readUInt8 = function readUInt8(offset, noAssert) {
1118
1073
  offset = offset >>> 0;
1119
- if (!noAssert)
1120
- checkOffset(offset, 1, this.length);
1074
+ if (!noAssert) checkOffset(offset, 1, this.length);
1121
1075
  return this[offset];
1122
1076
  };
1123
1077
  Buffer2.prototype.readUint16LE = Buffer2.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
1124
1078
  offset = offset >>> 0;
1125
- if (!noAssert)
1126
- checkOffset(offset, 2, this.length);
1079
+ if (!noAssert) checkOffset(offset, 2, this.length);
1127
1080
  return this[offset] | this[offset + 1] << 8;
1128
1081
  };
1129
1082
  Buffer2.prototype.readUint16BE = Buffer2.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
1130
1083
  offset = offset >>> 0;
1131
- if (!noAssert)
1132
- checkOffset(offset, 2, this.length);
1084
+ if (!noAssert) checkOffset(offset, 2, this.length);
1133
1085
  return this[offset] << 8 | this[offset + 1];
1134
1086
  };
1135
1087
  Buffer2.prototype.readUint32LE = Buffer2.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
1136
1088
  offset = offset >>> 0;
1137
- if (!noAssert)
1138
- checkOffset(offset, 4, this.length);
1089
+ if (!noAssert) checkOffset(offset, 4, this.length);
1139
1090
  return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
1140
1091
  };
1141
1092
  Buffer2.prototype.readUint32BE = Buffer2.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
1142
1093
  offset = offset >>> 0;
1143
- if (!noAssert)
1144
- checkOffset(offset, 4, this.length);
1094
+ if (!noAssert) checkOffset(offset, 4, this.length);
1145
1095
  return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
1146
1096
  };
1147
1097
  Buffer2.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
@@ -1171,8 +1121,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1171
1121
  Buffer2.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {
1172
1122
  offset = offset >>> 0;
1173
1123
  byteLength2 = byteLength2 >>> 0;
1174
- if (!noAssert)
1175
- checkOffset(offset, byteLength2, this.length);
1124
+ if (!noAssert) checkOffset(offset, byteLength2, this.length);
1176
1125
  let val = this[offset];
1177
1126
  let mul = 1;
1178
1127
  let i = 0;
@@ -1180,15 +1129,13 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1180
1129
  val += this[offset + i] * mul;
1181
1130
  }
1182
1131
  mul *= 128;
1183
- if (val >= mul)
1184
- val -= Math.pow(2, 8 * byteLength2);
1132
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
1185
1133
  return val;
1186
1134
  };
1187
1135
  Buffer2.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {
1188
1136
  offset = offset >>> 0;
1189
1137
  byteLength2 = byteLength2 >>> 0;
1190
- if (!noAssert)
1191
- checkOffset(offset, byteLength2, this.length);
1138
+ if (!noAssert) checkOffset(offset, byteLength2, this.length);
1192
1139
  let i = byteLength2;
1193
1140
  let mul = 1;
1194
1141
  let val = this[offset + --i];
@@ -1196,42 +1143,35 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1196
1143
  val += this[offset + --i] * mul;
1197
1144
  }
1198
1145
  mul *= 128;
1199
- if (val >= mul)
1200
- val -= Math.pow(2, 8 * byteLength2);
1146
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
1201
1147
  return val;
1202
1148
  };
1203
1149
  Buffer2.prototype.readInt8 = function readInt8(offset, noAssert) {
1204
1150
  offset = offset >>> 0;
1205
- if (!noAssert)
1206
- checkOffset(offset, 1, this.length);
1207
- if (!(this[offset] & 128))
1208
- return this[offset];
1151
+ if (!noAssert) checkOffset(offset, 1, this.length);
1152
+ if (!(this[offset] & 128)) return this[offset];
1209
1153
  return (255 - this[offset] + 1) * -1;
1210
1154
  };
1211
1155
  Buffer2.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
1212
1156
  offset = offset >>> 0;
1213
- if (!noAssert)
1214
- checkOffset(offset, 2, this.length);
1157
+ if (!noAssert) checkOffset(offset, 2, this.length);
1215
1158
  const val = this[offset] | this[offset + 1] << 8;
1216
1159
  return val & 32768 ? val | 4294901760 : val;
1217
1160
  };
1218
1161
  Buffer2.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
1219
1162
  offset = offset >>> 0;
1220
- if (!noAssert)
1221
- checkOffset(offset, 2, this.length);
1163
+ if (!noAssert) checkOffset(offset, 2, this.length);
1222
1164
  const val = this[offset + 1] | this[offset] << 8;
1223
1165
  return val & 32768 ? val | 4294901760 : val;
1224
1166
  };
1225
1167
  Buffer2.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
1226
1168
  offset = offset >>> 0;
1227
- if (!noAssert)
1228
- checkOffset(offset, 4, this.length);
1169
+ if (!noAssert) checkOffset(offset, 4, this.length);
1229
1170
  return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
1230
1171
  };
1231
1172
  Buffer2.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
1232
1173
  offset = offset >>> 0;
1233
- if (!noAssert)
1234
- checkOffset(offset, 4, this.length);
1174
+ if (!noAssert) checkOffset(offset, 4, this.length);
1235
1175
  return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
1236
1176
  };
1237
1177
  Buffer2.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
@@ -1259,35 +1199,28 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1259
1199
  });
1260
1200
  Buffer2.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
1261
1201
  offset = offset >>> 0;
1262
- if (!noAssert)
1263
- checkOffset(offset, 4, this.length);
1202
+ if (!noAssert) checkOffset(offset, 4, this.length);
1264
1203
  return ieee754.read(this, offset, true, 23, 4);
1265
1204
  };
1266
1205
  Buffer2.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
1267
1206
  offset = offset >>> 0;
1268
- if (!noAssert)
1269
- checkOffset(offset, 4, this.length);
1207
+ if (!noAssert) checkOffset(offset, 4, this.length);
1270
1208
  return ieee754.read(this, offset, false, 23, 4);
1271
1209
  };
1272
1210
  Buffer2.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
1273
1211
  offset = offset >>> 0;
1274
- if (!noAssert)
1275
- checkOffset(offset, 8, this.length);
1212
+ if (!noAssert) checkOffset(offset, 8, this.length);
1276
1213
  return ieee754.read(this, offset, true, 52, 8);
1277
1214
  };
1278
1215
  Buffer2.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
1279
1216
  offset = offset >>> 0;
1280
- if (!noAssert)
1281
- checkOffset(offset, 8, this.length);
1217
+ if (!noAssert) checkOffset(offset, 8, this.length);
1282
1218
  return ieee754.read(this, offset, false, 52, 8);
1283
1219
  };
1284
1220
  function checkInt(buf, value, offset, ext, max, min) {
1285
- if (!Buffer2.isBuffer(buf))
1286
- throw new TypeError('"buffer" argument must be a Buffer instance');
1287
- if (value > max || value < min)
1288
- throw new RangeError('"value" argument is out of bounds');
1289
- if (offset + ext > buf.length)
1290
- throw new RangeError("Index out of range");
1221
+ if (!Buffer2.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
1222
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
1223
+ if (offset + ext > buf.length) throw new RangeError("Index out of range");
1291
1224
  }
1292
1225
  Buffer2.prototype.writeUintLE = Buffer2.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {
1293
1226
  value = +value;
@@ -1324,16 +1257,14 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1324
1257
  Buffer2.prototype.writeUint8 = Buffer2.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
1325
1258
  value = +value;
1326
1259
  offset = offset >>> 0;
1327
- if (!noAssert)
1328
- checkInt(this, value, offset, 1, 255, 0);
1260
+ if (!noAssert) checkInt(this, value, offset, 1, 255, 0);
1329
1261
  this[offset] = value & 255;
1330
1262
  return offset + 1;
1331
1263
  };
1332
1264
  Buffer2.prototype.writeUint16LE = Buffer2.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
1333
1265
  value = +value;
1334
1266
  offset = offset >>> 0;
1335
- if (!noAssert)
1336
- checkInt(this, value, offset, 2, 65535, 0);
1267
+ if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1337
1268
  this[offset] = value & 255;
1338
1269
  this[offset + 1] = value >>> 8;
1339
1270
  return offset + 2;
@@ -1341,8 +1272,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1341
1272
  Buffer2.prototype.writeUint16BE = Buffer2.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
1342
1273
  value = +value;
1343
1274
  offset = offset >>> 0;
1344
- if (!noAssert)
1345
- checkInt(this, value, offset, 2, 65535, 0);
1275
+ if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
1346
1276
  this[offset] = value >>> 8;
1347
1277
  this[offset + 1] = value & 255;
1348
1278
  return offset + 2;
@@ -1350,8 +1280,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1350
1280
  Buffer2.prototype.writeUint32LE = Buffer2.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
1351
1281
  value = +value;
1352
1282
  offset = offset >>> 0;
1353
- if (!noAssert)
1354
- checkInt(this, value, offset, 4, 4294967295, 0);
1283
+ if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1355
1284
  this[offset + 3] = value >>> 24;
1356
1285
  this[offset + 2] = value >>> 16;
1357
1286
  this[offset + 1] = value >>> 8;
@@ -1361,8 +1290,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1361
1290
  Buffer2.prototype.writeUint32BE = Buffer2.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
1362
1291
  value = +value;
1363
1292
  offset = offset >>> 0;
1364
- if (!noAssert)
1365
- checkInt(this, value, offset, 4, 4294967295, 0);
1293
+ if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
1366
1294
  this[offset] = value >>> 24;
1367
1295
  this[offset + 1] = value >>> 16;
1368
1296
  this[offset + 2] = value >>> 8;
@@ -1456,18 +1384,15 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1456
1384
  Buffer2.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
1457
1385
  value = +value;
1458
1386
  offset = offset >>> 0;
1459
- if (!noAssert)
1460
- checkInt(this, value, offset, 1, 127, -128);
1461
- if (value < 0)
1462
- value = 255 + value + 1;
1387
+ if (!noAssert) checkInt(this, value, offset, 1, 127, -128);
1388
+ if (value < 0) value = 255 + value + 1;
1463
1389
  this[offset] = value & 255;
1464
1390
  return offset + 1;
1465
1391
  };
1466
1392
  Buffer2.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
1467
1393
  value = +value;
1468
1394
  offset = offset >>> 0;
1469
- if (!noAssert)
1470
- checkInt(this, value, offset, 2, 32767, -32768);
1395
+ if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
1471
1396
  this[offset] = value & 255;
1472
1397
  this[offset + 1] = value >>> 8;
1473
1398
  return offset + 2;
@@ -1475,8 +1400,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1475
1400
  Buffer2.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
1476
1401
  value = +value;
1477
1402
  offset = offset >>> 0;
1478
- if (!noAssert)
1479
- checkInt(this, value, offset, 2, 32767, -32768);
1403
+ if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
1480
1404
  this[offset] = value >>> 8;
1481
1405
  this[offset + 1] = value & 255;
1482
1406
  return offset + 2;
@@ -1484,8 +1408,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1484
1408
  Buffer2.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
1485
1409
  value = +value;
1486
1410
  offset = offset >>> 0;
1487
- if (!noAssert)
1488
- checkInt(this, value, offset, 4, 2147483647, -2147483648);
1411
+ if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
1489
1412
  this[offset] = value & 255;
1490
1413
  this[offset + 1] = value >>> 8;
1491
1414
  this[offset + 2] = value >>> 16;
@@ -1495,10 +1418,8 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1495
1418
  Buffer2.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
1496
1419
  value = +value;
1497
1420
  offset = offset >>> 0;
1498
- if (!noAssert)
1499
- checkInt(this, value, offset, 4, 2147483647, -2147483648);
1500
- if (value < 0)
1501
- value = 4294967295 + value + 1;
1421
+ if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
1422
+ if (value < 0) value = 4294967295 + value + 1;
1502
1423
  this[offset] = value >>> 24;
1503
1424
  this[offset + 1] = value >>> 16;
1504
1425
  this[offset + 2] = value >>> 8;
@@ -1512,10 +1433,8 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1512
1433
  return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1513
1434
  });
1514
1435
  function checkIEEE754(buf, value, offset, ext, max, min) {
1515
- if (offset + ext > buf.length)
1516
- throw new RangeError("Index out of range");
1517
- if (offset < 0)
1518
- throw new RangeError("Index out of range");
1436
+ if (offset + ext > buf.length) throw new RangeError("Index out of range");
1437
+ if (offset < 0) throw new RangeError("Index out of range");
1519
1438
  }
1520
1439
  function writeFloat(buf, value, offset, littleEndian, noAssert) {
1521
1440
  value = +value;
@@ -1548,31 +1467,20 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1548
1467
  return writeDouble(this, value, offset, false, noAssert);
1549
1468
  };
1550
1469
  Buffer2.prototype.copy = function copy(target, targetStart, start, end) {
1551
- if (!Buffer2.isBuffer(target))
1552
- throw new TypeError("argument should be a Buffer");
1553
- if (!start)
1554
- start = 0;
1555
- if (!end && end !== 0)
1556
- end = this.length;
1557
- if (targetStart >= target.length)
1558
- targetStart = target.length;
1559
- if (!targetStart)
1560
- targetStart = 0;
1561
- if (end > 0 && end < start)
1562
- end = start;
1563
- if (end === start)
1564
- return 0;
1565
- if (target.length === 0 || this.length === 0)
1566
- return 0;
1470
+ if (!Buffer2.isBuffer(target)) throw new TypeError("argument should be a Buffer");
1471
+ if (!start) start = 0;
1472
+ if (!end && end !== 0) end = this.length;
1473
+ if (targetStart >= target.length) targetStart = target.length;
1474
+ if (!targetStart) targetStart = 0;
1475
+ if (end > 0 && end < start) end = start;
1476
+ if (end === start) return 0;
1477
+ if (target.length === 0 || this.length === 0) return 0;
1567
1478
  if (targetStart < 0) {
1568
1479
  throw new RangeError("targetStart out of bounds");
1569
1480
  }
1570
- if (start < 0 || start >= this.length)
1571
- throw new RangeError("Index out of range");
1572
- if (end < 0)
1573
- throw new RangeError("sourceEnd out of bounds");
1574
- if (end > this.length)
1575
- end = this.length;
1481
+ if (start < 0 || start >= this.length) throw new RangeError("Index out of range");
1482
+ if (end < 0) throw new RangeError("sourceEnd out of bounds");
1483
+ if (end > this.length) end = this.length;
1576
1484
  if (target.length - targetStart < end - start) {
1577
1485
  end = target.length - targetStart + start;
1578
1486
  }
@@ -1623,8 +1531,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1623
1531
  }
1624
1532
  start = start >>> 0;
1625
1533
  end = end === void 0 ? this.length : end >>> 0;
1626
- if (!val)
1627
- val = 0;
1534
+ if (!val) val = 0;
1628
1535
  let i;
1629
1536
  if (typeof val === "number") {
1630
1537
  for (i = start; i < end; ++i) {
@@ -1763,8 +1670,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1763
1670
  function base64clean(str) {
1764
1671
  str = str.split("=")[0];
1765
1672
  str = str.trim().replace(INVALID_BASE64_RE, "");
1766
- if (str.length < 2)
1767
- return "";
1673
+ if (str.length < 2) return "";
1768
1674
  while (str.length % 4 !== 0) {
1769
1675
  str = str + "=";
1770
1676
  }
@@ -1781,51 +1687,43 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1781
1687
  if (codePoint > 55295 && codePoint < 57344) {
1782
1688
  if (!leadSurrogate) {
1783
1689
  if (codePoint > 56319) {
1784
- if ((units -= 3) > -1)
1785
- bytes.push(239, 191, 189);
1690
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1786
1691
  continue;
1787
1692
  } else if (i + 1 === length) {
1788
- if ((units -= 3) > -1)
1789
- bytes.push(239, 191, 189);
1693
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1790
1694
  continue;
1791
1695
  }
1792
1696
  leadSurrogate = codePoint;
1793
1697
  continue;
1794
1698
  }
1795
1699
  if (codePoint < 56320) {
1796
- if ((units -= 3) > -1)
1797
- bytes.push(239, 191, 189);
1700
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1798
1701
  leadSurrogate = codePoint;
1799
1702
  continue;
1800
1703
  }
1801
1704
  codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
1802
1705
  } else if (leadSurrogate) {
1803
- if ((units -= 3) > -1)
1804
- bytes.push(239, 191, 189);
1706
+ if ((units -= 3) > -1) bytes.push(239, 191, 189);
1805
1707
  }
1806
1708
  leadSurrogate = null;
1807
1709
  if (codePoint < 128) {
1808
- if ((units -= 1) < 0)
1809
- break;
1710
+ if ((units -= 1) < 0) break;
1810
1711
  bytes.push(codePoint);
1811
1712
  } else if (codePoint < 2048) {
1812
- if ((units -= 2) < 0)
1813
- break;
1713
+ if ((units -= 2) < 0) break;
1814
1714
  bytes.push(
1815
1715
  codePoint >> 6 | 192,
1816
1716
  codePoint & 63 | 128
1817
1717
  );
1818
1718
  } else if (codePoint < 65536) {
1819
- if ((units -= 3) < 0)
1820
- break;
1719
+ if ((units -= 3) < 0) break;
1821
1720
  bytes.push(
1822
1721
  codePoint >> 12 | 224,
1823
1722
  codePoint >> 6 & 63 | 128,
1824
1723
  codePoint & 63 | 128
1825
1724
  );
1826
1725
  } else if (codePoint < 1114112) {
1827
- if ((units -= 4) < 0)
1828
- break;
1726
+ if ((units -= 4) < 0) break;
1829
1727
  bytes.push(
1830
1728
  codePoint >> 18 | 240,
1831
1729
  codePoint >> 12 & 63 | 128,
@@ -1849,8 +1747,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1849
1747
  let c, hi, lo;
1850
1748
  const byteArray = [];
1851
1749
  for (let i = 0; i < str.length; ++i) {
1852
- if ((units -= 2) < 0)
1853
- break;
1750
+ if ((units -= 2) < 0) break;
1854
1751
  c = str.charCodeAt(i);
1855
1752
  hi = c >> 8;
1856
1753
  lo = c % 256;
@@ -1865,8 +1762,7 @@ var require_buffer = (0, import_chunk_XUVUYQ27.__commonJS)({
1865
1762
  function blitBuffer(src, dst, offset, length) {
1866
1763
  let i;
1867
1764
  for (i = 0; i < length; ++i) {
1868
- if (i + offset >= dst.length || i >= src.length)
1869
- break;
1765
+ if (i + offset >= dst.length || i >= src.length) break;
1870
1766
  dst[i + offset] = src[i];
1871
1767
  }
1872
1768
  return i;
@@ -1913,4 +1809,4 @@ buffer/index.js:
1913
1809
  0 && (module.exports = {
1914
1810
  require_buffer
1915
1811
  });
1916
- //# sourceMappingURL=chunk-LQSBC3HI.cjs.map
1812
+ //# sourceMappingURL=chunk-FCCITQEP.cjs.map