@alquimia-ai/tools 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/actions/index.d.mts +2 -2
- package/dist/actions/index.d.ts +2 -2
- package/dist/actions/index.js +1 -1
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/index.mjs +1 -1
- package/dist/actions/index.mjs.map +1 -1
- package/dist/{actions-CZU_GRy5.d.mts → actions-BjDPJdyA.d.mts} +1 -1
- package/dist/{actions-B0hfoYRd.d.ts → actions-CP1d4Ye1.d.ts} +1 -1
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.d.ts +2 -2
- package/dist/adapters/index.js.map +1 -1
- package/dist/genui/index.d.mts +3 -3
- package/dist/genui/index.d.ts +3 -3
- package/dist/genui/index.js +9 -1
- package/dist/genui/index.js.map +1 -1
- package/dist/genui/index.mjs +9 -1
- package/dist/genui/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +10 -10
- package/dist/hooks/index.d.ts +10 -10
- package/dist/hooks/index.js +28 -8
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +28 -8
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/next/index.js +19 -5
- package/dist/next/index.js.map +1 -1
- package/dist/next/index.mjs +19 -5
- package/dist/next/index.mjs.map +1 -1
- package/dist/providers/index.d.mts +4 -4
- package/dist/providers/index.d.ts +4 -4
- package/dist/providers/index.js +111 -110
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/index.mjs +111 -110
- package/dist/providers/index.mjs.map +1 -1
- package/dist/{providers-BJTXCtI3.d.ts → providers-DiR9cgyo.d.mts} +8 -8
- package/dist/{providers-0Gi78uNQ.d.mts → providers-b5_yMyMo.d.ts} +8 -8
- package/dist/proxy.d.mts +4 -4
- package/dist/proxy.d.ts +4 -4
- package/dist/proxy.js +19 -5
- package/dist/proxy.js.map +1 -1
- package/dist/proxy.mjs +19 -5
- package/dist/proxy.mjs.map +1 -1
- package/dist/sdk/index.d.mts +4 -3
- package/dist/sdk/index.d.ts +4 -3
- package/dist/sdk/index.js +8 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/index.mjs +8 -2
- package/dist/sdk/index.mjs.map +1 -1
- package/dist/services/index.d.mts +3 -3
- package/dist/services/index.d.ts +3 -3
- package/dist/services/index.js.map +1 -1
- package/dist/services/index.mjs.map +1 -1
- package/dist/type-DqX3-9QS.d.mts +312 -0
- package/dist/type-xksRnBUW.d.ts +312 -0
- package/dist/types/index.d.mts +78 -304
- package/dist/types/index.d.ts +78 -304
- package/dist/types/index.js.map +1 -1
- package/dist/types-C-6fgK1_.d.mts +111 -0
- package/dist/types-C-6fgK1_.d.ts +111 -0
- package/dist/{types-DnfWUE9V.d.mts → types-CMVbyEv8.d.mts} +3 -2
- package/dist/{types-DnfWUE9V.d.ts → types-CMVbyEv8.d.ts} +3 -2
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/dist/worklog/index.d.mts +5 -2
- package/dist/worklog/index.d.ts +5 -2
- package/dist/worklog/index.js +3 -1
- package/dist/worklog/index.js.map +1 -1
- package/dist/worklog/index.mjs +3 -1
- package/dist/worklog/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/types-Dvu9y4WM.d.mts +0 -53
- package/dist/types-Dvu9y4WM.d.ts +0 -53
package/dist/providers/index.js
CHANGED
|
@@ -222,13 +222,13 @@ var require_buffer = __commonJS({
|
|
|
222
222
|
var base64 = require_base64_js();
|
|
223
223
|
var ieee754 = require_ieee754();
|
|
224
224
|
var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
|
|
225
|
-
exports.Buffer =
|
|
225
|
+
exports.Buffer = Buffer4;
|
|
226
226
|
exports.SlowBuffer = SlowBuffer;
|
|
227
227
|
exports.INSPECT_MAX_BYTES = 50;
|
|
228
228
|
var K_MAX_LENGTH = 2147483647;
|
|
229
229
|
exports.kMaxLength = K_MAX_LENGTH;
|
|
230
|
-
|
|
231
|
-
if (!
|
|
230
|
+
Buffer4.TYPED_ARRAY_SUPPORT = typedArraySupport();
|
|
231
|
+
if (!Buffer4.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
232
232
|
console.error(
|
|
233
233
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
234
234
|
);
|
|
@@ -246,17 +246,17 @@ var require_buffer = __commonJS({
|
|
|
246
246
|
return false;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
Object.defineProperty(
|
|
249
|
+
Object.defineProperty(Buffer4.prototype, "parent", {
|
|
250
250
|
enumerable: true,
|
|
251
251
|
get: function() {
|
|
252
|
-
if (!
|
|
252
|
+
if (!Buffer4.isBuffer(this)) return void 0;
|
|
253
253
|
return this.buffer;
|
|
254
254
|
}
|
|
255
255
|
});
|
|
256
|
-
Object.defineProperty(
|
|
256
|
+
Object.defineProperty(Buffer4.prototype, "offset", {
|
|
257
257
|
enumerable: true,
|
|
258
258
|
get: function() {
|
|
259
|
-
if (!
|
|
259
|
+
if (!Buffer4.isBuffer(this)) return void 0;
|
|
260
260
|
return this.byteOffset;
|
|
261
261
|
}
|
|
262
262
|
});
|
|
@@ -265,10 +265,10 @@ var require_buffer = __commonJS({
|
|
|
265
265
|
throw new RangeError('The value "' + length + '" is invalid for option "size"');
|
|
266
266
|
}
|
|
267
267
|
const buf = new Uint8Array(length);
|
|
268
|
-
Object.setPrototypeOf(buf,
|
|
268
|
+
Object.setPrototypeOf(buf, Buffer4.prototype);
|
|
269
269
|
return buf;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function Buffer4(arg, encodingOrOffset, length) {
|
|
272
272
|
if (typeof arg === "number") {
|
|
273
273
|
if (typeof encodingOrOffset === "string") {
|
|
274
274
|
throw new TypeError(
|
|
@@ -279,7 +279,7 @@ var require_buffer = __commonJS({
|
|
|
279
279
|
}
|
|
280
280
|
return from(arg, encodingOrOffset, length);
|
|
281
281
|
}
|
|
282
|
-
|
|
282
|
+
Buffer4.poolSize = 8192;
|
|
283
283
|
function from(value, encodingOrOffset, length) {
|
|
284
284
|
if (typeof value === "string") {
|
|
285
285
|
return fromString(value, encodingOrOffset);
|
|
@@ -305,22 +305,22 @@ var require_buffer = __commonJS({
|
|
|
305
305
|
}
|
|
306
306
|
const valueOf = value.valueOf && value.valueOf();
|
|
307
307
|
if (valueOf != null && valueOf !== value) {
|
|
308
|
-
return
|
|
308
|
+
return Buffer4.from(valueOf, encodingOrOffset, length);
|
|
309
309
|
}
|
|
310
310
|
const b = fromObject(value);
|
|
311
311
|
if (b) return b;
|
|
312
312
|
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
313
|
-
return
|
|
313
|
+
return Buffer4.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
|
|
314
314
|
}
|
|
315
315
|
throw new TypeError(
|
|
316
316
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value
|
|
317
317
|
);
|
|
318
318
|
}
|
|
319
|
-
|
|
319
|
+
Buffer4.from = function(value, encodingOrOffset, length) {
|
|
320
320
|
return from(value, encodingOrOffset, length);
|
|
321
321
|
};
|
|
322
|
-
Object.setPrototypeOf(
|
|
323
|
-
Object.setPrototypeOf(
|
|
322
|
+
Object.setPrototypeOf(Buffer4.prototype, Uint8Array.prototype);
|
|
323
|
+
Object.setPrototypeOf(Buffer4, Uint8Array);
|
|
324
324
|
function assertSize(size) {
|
|
325
325
|
if (typeof size !== "number") {
|
|
326
326
|
throw new TypeError('"size" argument must be of type number');
|
|
@@ -338,24 +338,24 @@ var require_buffer = __commonJS({
|
|
|
338
338
|
}
|
|
339
339
|
return createBuffer(size);
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
Buffer4.alloc = function(size, fill, encoding) {
|
|
342
342
|
return alloc(size, fill, encoding);
|
|
343
343
|
};
|
|
344
344
|
function allocUnsafe(size) {
|
|
345
345
|
assertSize(size);
|
|
346
346
|
return createBuffer(size < 0 ? 0 : checked(size) | 0);
|
|
347
347
|
}
|
|
348
|
-
|
|
348
|
+
Buffer4.allocUnsafe = function(size) {
|
|
349
349
|
return allocUnsafe(size);
|
|
350
350
|
};
|
|
351
|
-
|
|
351
|
+
Buffer4.allocUnsafeSlow = function(size) {
|
|
352
352
|
return allocUnsafe(size);
|
|
353
353
|
};
|
|
354
354
|
function fromString(string, encoding) {
|
|
355
355
|
if (typeof encoding !== "string" || encoding === "") {
|
|
356
356
|
encoding = "utf8";
|
|
357
357
|
}
|
|
358
|
-
if (!
|
|
358
|
+
if (!Buffer4.isEncoding(encoding)) {
|
|
359
359
|
throw new TypeError("Unknown encoding: " + encoding);
|
|
360
360
|
}
|
|
361
361
|
const length = byteLength(string, encoding) | 0;
|
|
@@ -396,11 +396,11 @@ var require_buffer = __commonJS({
|
|
|
396
396
|
} else {
|
|
397
397
|
buf = new Uint8Array(array, byteOffset, length);
|
|
398
398
|
}
|
|
399
|
-
Object.setPrototypeOf(buf,
|
|
399
|
+
Object.setPrototypeOf(buf, Buffer4.prototype);
|
|
400
400
|
return buf;
|
|
401
401
|
}
|
|
402
402
|
function fromObject(obj) {
|
|
403
|
-
if (
|
|
403
|
+
if (Buffer4.isBuffer(obj)) {
|
|
404
404
|
const len = checked(obj.length) | 0;
|
|
405
405
|
const buf = createBuffer(len);
|
|
406
406
|
if (buf.length === 0) {
|
|
@@ -429,15 +429,15 @@ var require_buffer = __commonJS({
|
|
|
429
429
|
if (+length != length) {
|
|
430
430
|
length = 0;
|
|
431
431
|
}
|
|
432
|
-
return
|
|
432
|
+
return Buffer4.alloc(+length);
|
|
433
433
|
}
|
|
434
|
-
|
|
435
|
-
return b != null && b._isBuffer === true && b !==
|
|
434
|
+
Buffer4.isBuffer = function isBuffer(b) {
|
|
435
|
+
return b != null && b._isBuffer === true && b !== Buffer4.prototype;
|
|
436
436
|
};
|
|
437
|
-
|
|
438
|
-
if (isInstance(a, Uint8Array)) a =
|
|
439
|
-
if (isInstance(b, Uint8Array)) b =
|
|
440
|
-
if (!
|
|
437
|
+
Buffer4.compare = function compare(a, b) {
|
|
438
|
+
if (isInstance(a, Uint8Array)) a = Buffer4.from(a, a.offset, a.byteLength);
|
|
439
|
+
if (isInstance(b, Uint8Array)) b = Buffer4.from(b, b.offset, b.byteLength);
|
|
440
|
+
if (!Buffer4.isBuffer(a) || !Buffer4.isBuffer(b)) {
|
|
441
441
|
throw new TypeError(
|
|
442
442
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
443
443
|
);
|
|
@@ -456,7 +456,7 @@ var require_buffer = __commonJS({
|
|
|
456
456
|
if (y < x) return 1;
|
|
457
457
|
return 0;
|
|
458
458
|
};
|
|
459
|
-
|
|
459
|
+
Buffer4.isEncoding = function isEncoding(encoding) {
|
|
460
460
|
switch (String(encoding).toLowerCase()) {
|
|
461
461
|
case "hex":
|
|
462
462
|
case "utf8":
|
|
@@ -474,12 +474,12 @@ var require_buffer = __commonJS({
|
|
|
474
474
|
return false;
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
|
-
|
|
477
|
+
Buffer4.concat = function concat(list, length) {
|
|
478
478
|
if (!Array.isArray(list)) {
|
|
479
479
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
480
480
|
}
|
|
481
481
|
if (list.length === 0) {
|
|
482
|
-
return
|
|
482
|
+
return Buffer4.alloc(0);
|
|
483
483
|
}
|
|
484
484
|
let i;
|
|
485
485
|
if (length === void 0) {
|
|
@@ -488,13 +488,13 @@ var require_buffer = __commonJS({
|
|
|
488
488
|
length += list[i].length;
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
const buffer =
|
|
491
|
+
const buffer = Buffer4.allocUnsafe(length);
|
|
492
492
|
let pos = 0;
|
|
493
493
|
for (i = 0; i < list.length; ++i) {
|
|
494
494
|
let buf = list[i];
|
|
495
495
|
if (isInstance(buf, Uint8Array)) {
|
|
496
496
|
if (pos + buf.length > buffer.length) {
|
|
497
|
-
if (!
|
|
497
|
+
if (!Buffer4.isBuffer(buf)) buf = Buffer4.from(buf);
|
|
498
498
|
buf.copy(buffer, pos);
|
|
499
499
|
} else {
|
|
500
500
|
Uint8Array.prototype.set.call(
|
|
@@ -503,7 +503,7 @@ var require_buffer = __commonJS({
|
|
|
503
503
|
pos
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
|
-
} else if (!
|
|
506
|
+
} else if (!Buffer4.isBuffer(buf)) {
|
|
507
507
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
508
508
|
} else {
|
|
509
509
|
buf.copy(buffer, pos);
|
|
@@ -513,7 +513,7 @@ var require_buffer = __commonJS({
|
|
|
513
513
|
return buffer;
|
|
514
514
|
};
|
|
515
515
|
function byteLength(string, encoding) {
|
|
516
|
-
if (
|
|
516
|
+
if (Buffer4.isBuffer(string)) {
|
|
517
517
|
return string.length;
|
|
518
518
|
}
|
|
519
519
|
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
|
|
@@ -555,7 +555,7 @@ var require_buffer = __commonJS({
|
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
|
|
558
|
+
Buffer4.byteLength = byteLength;
|
|
559
559
|
function slowToString(encoding, start, end) {
|
|
560
560
|
let loweredCase = false;
|
|
561
561
|
if (start === void 0 || start < 0) {
|
|
@@ -602,13 +602,13 @@ var require_buffer = __commonJS({
|
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
|
|
605
|
+
Buffer4.prototype._isBuffer = true;
|
|
606
606
|
function swap(b, n, m) {
|
|
607
607
|
const i = b[n];
|
|
608
608
|
b[n] = b[m];
|
|
609
609
|
b[m] = i;
|
|
610
610
|
}
|
|
611
|
-
|
|
611
|
+
Buffer4.prototype.swap16 = function swap16() {
|
|
612
612
|
const len = this.length;
|
|
613
613
|
if (len % 2 !== 0) {
|
|
614
614
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
@@ -618,7 +618,7 @@ var require_buffer = __commonJS({
|
|
|
618
618
|
}
|
|
619
619
|
return this;
|
|
620
620
|
};
|
|
621
|
-
|
|
621
|
+
Buffer4.prototype.swap32 = function swap32() {
|
|
622
622
|
const len = this.length;
|
|
623
623
|
if (len % 4 !== 0) {
|
|
624
624
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
@@ -629,7 +629,7 @@ var require_buffer = __commonJS({
|
|
|
629
629
|
}
|
|
630
630
|
return this;
|
|
631
631
|
};
|
|
632
|
-
|
|
632
|
+
Buffer4.prototype.swap64 = function swap64() {
|
|
633
633
|
const len = this.length;
|
|
634
634
|
if (len % 8 !== 0) {
|
|
635
635
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
@@ -642,19 +642,19 @@ var require_buffer = __commonJS({
|
|
|
642
642
|
}
|
|
643
643
|
return this;
|
|
644
644
|
};
|
|
645
|
-
|
|
645
|
+
Buffer4.prototype.toString = function toString() {
|
|
646
646
|
const length = this.length;
|
|
647
647
|
if (length === 0) return "";
|
|
648
648
|
if (arguments.length === 0) return utf8Slice(this, 0, length);
|
|
649
649
|
return slowToString.apply(this, arguments);
|
|
650
650
|
};
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
if (!
|
|
651
|
+
Buffer4.prototype.toLocaleString = Buffer4.prototype.toString;
|
|
652
|
+
Buffer4.prototype.equals = function equals(b) {
|
|
653
|
+
if (!Buffer4.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
|
|
654
654
|
if (this === b) return true;
|
|
655
|
-
return
|
|
655
|
+
return Buffer4.compare(this, b) === 0;
|
|
656
656
|
};
|
|
657
|
-
|
|
657
|
+
Buffer4.prototype.inspect = function inspect() {
|
|
658
658
|
let str = "";
|
|
659
659
|
const max = exports.INSPECT_MAX_BYTES;
|
|
660
660
|
str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
|
|
@@ -662,13 +662,13 @@ var require_buffer = __commonJS({
|
|
|
662
662
|
return "<Buffer " + str + ">";
|
|
663
663
|
};
|
|
664
664
|
if (customInspectSymbol) {
|
|
665
|
-
|
|
665
|
+
Buffer4.prototype[customInspectSymbol] = Buffer4.prototype.inspect;
|
|
666
666
|
}
|
|
667
|
-
|
|
667
|
+
Buffer4.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
|
|
668
668
|
if (isInstance(target, Uint8Array)) {
|
|
669
|
-
target =
|
|
669
|
+
target = Buffer4.from(target, target.offset, target.byteLength);
|
|
670
670
|
}
|
|
671
|
-
if (!
|
|
671
|
+
if (!Buffer4.isBuffer(target)) {
|
|
672
672
|
throw new TypeError(
|
|
673
673
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target
|
|
674
674
|
);
|
|
@@ -741,9 +741,9 @@ var require_buffer = __commonJS({
|
|
|
741
741
|
else return -1;
|
|
742
742
|
}
|
|
743
743
|
if (typeof val === "string") {
|
|
744
|
-
val =
|
|
744
|
+
val = Buffer4.from(val, encoding);
|
|
745
745
|
}
|
|
746
|
-
if (
|
|
746
|
+
if (Buffer4.isBuffer(val)) {
|
|
747
747
|
if (val.length === 0) {
|
|
748
748
|
return -1;
|
|
749
749
|
}
|
|
@@ -811,13 +811,13 @@ var require_buffer = __commonJS({
|
|
|
811
811
|
}
|
|
812
812
|
return -1;
|
|
813
813
|
}
|
|
814
|
-
|
|
814
|
+
Buffer4.prototype.includes = function includes(val, byteOffset, encoding) {
|
|
815
815
|
return this.indexOf(val, byteOffset, encoding) !== -1;
|
|
816
816
|
};
|
|
817
|
-
|
|
817
|
+
Buffer4.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
|
|
818
818
|
return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
|
|
819
819
|
};
|
|
820
|
-
|
|
820
|
+
Buffer4.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
|
|
821
821
|
return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
|
|
822
822
|
};
|
|
823
823
|
function hexWrite(buf, string, offset, length) {
|
|
@@ -855,7 +855,7 @@ var require_buffer = __commonJS({
|
|
|
855
855
|
function ucs2Write(buf, string, offset, length) {
|
|
856
856
|
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
|
|
857
857
|
}
|
|
858
|
-
|
|
858
|
+
Buffer4.prototype.write = function write(string, offset, length, encoding) {
|
|
859
859
|
if (offset === void 0) {
|
|
860
860
|
encoding = "utf8";
|
|
861
861
|
length = this.length;
|
|
@@ -910,7 +910,7 @@ var require_buffer = __commonJS({
|
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
};
|
|
913
|
-
|
|
913
|
+
Buffer4.prototype.toJSON = function toJSON() {
|
|
914
914
|
return {
|
|
915
915
|
type: "Buffer",
|
|
916
916
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
@@ -1033,7 +1033,7 @@ var require_buffer = __commonJS({
|
|
|
1033
1033
|
}
|
|
1034
1034
|
return res;
|
|
1035
1035
|
}
|
|
1036
|
-
|
|
1036
|
+
Buffer4.prototype.slice = function slice(start, end) {
|
|
1037
1037
|
const len = this.length;
|
|
1038
1038
|
start = ~~start;
|
|
1039
1039
|
end = end === void 0 ? len : ~~end;
|
|
@@ -1051,14 +1051,14 @@ var require_buffer = __commonJS({
|
|
|
1051
1051
|
}
|
|
1052
1052
|
if (end < start) end = start;
|
|
1053
1053
|
const newBuf = this.subarray(start, end);
|
|
1054
|
-
Object.setPrototypeOf(newBuf,
|
|
1054
|
+
Object.setPrototypeOf(newBuf, Buffer4.prototype);
|
|
1055
1055
|
return newBuf;
|
|
1056
1056
|
};
|
|
1057
1057
|
function checkOffset(offset, ext, length) {
|
|
1058
1058
|
if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint");
|
|
1059
1059
|
if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length");
|
|
1060
1060
|
}
|
|
1061
|
-
|
|
1061
|
+
Buffer4.prototype.readUintLE = Buffer4.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {
|
|
1062
1062
|
offset = offset >>> 0;
|
|
1063
1063
|
byteLength2 = byteLength2 >>> 0;
|
|
1064
1064
|
if (!noAssert) checkOffset(offset, byteLength2, this.length);
|
|
@@ -1070,7 +1070,7 @@ var require_buffer = __commonJS({
|
|
|
1070
1070
|
}
|
|
1071
1071
|
return val;
|
|
1072
1072
|
};
|
|
1073
|
-
|
|
1073
|
+
Buffer4.prototype.readUintBE = Buffer4.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {
|
|
1074
1074
|
offset = offset >>> 0;
|
|
1075
1075
|
byteLength2 = byteLength2 >>> 0;
|
|
1076
1076
|
if (!noAssert) {
|
|
@@ -1083,32 +1083,32 @@ var require_buffer = __commonJS({
|
|
|
1083
1083
|
}
|
|
1084
1084
|
return val;
|
|
1085
1085
|
};
|
|
1086
|
-
|
|
1086
|
+
Buffer4.prototype.readUint8 = Buffer4.prototype.readUInt8 = function readUInt8(offset, noAssert) {
|
|
1087
1087
|
offset = offset >>> 0;
|
|
1088
1088
|
if (!noAssert) checkOffset(offset, 1, this.length);
|
|
1089
1089
|
return this[offset];
|
|
1090
1090
|
};
|
|
1091
|
-
|
|
1091
|
+
Buffer4.prototype.readUint16LE = Buffer4.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
|
|
1092
1092
|
offset = offset >>> 0;
|
|
1093
1093
|
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1094
1094
|
return this[offset] | this[offset + 1] << 8;
|
|
1095
1095
|
};
|
|
1096
|
-
|
|
1096
|
+
Buffer4.prototype.readUint16BE = Buffer4.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
|
|
1097
1097
|
offset = offset >>> 0;
|
|
1098
1098
|
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1099
1099
|
return this[offset] << 8 | this[offset + 1];
|
|
1100
1100
|
};
|
|
1101
|
-
|
|
1101
|
+
Buffer4.prototype.readUint32LE = Buffer4.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
|
|
1102
1102
|
offset = offset >>> 0;
|
|
1103
1103
|
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1104
1104
|
return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
|
|
1105
1105
|
};
|
|
1106
|
-
|
|
1106
|
+
Buffer4.prototype.readUint32BE = Buffer4.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
|
|
1107
1107
|
offset = offset >>> 0;
|
|
1108
1108
|
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1109
1109
|
return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
|
|
1110
1110
|
};
|
|
1111
|
-
|
|
1111
|
+
Buffer4.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
|
|
1112
1112
|
offset = offset >>> 0;
|
|
1113
1113
|
validateNumber(offset, "offset");
|
|
1114
1114
|
const first = this[offset];
|
|
@@ -1120,7 +1120,7 @@ var require_buffer = __commonJS({
|
|
|
1120
1120
|
const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
|
|
1121
1121
|
return BigInt(lo) + (BigInt(hi) << BigInt(32));
|
|
1122
1122
|
});
|
|
1123
|
-
|
|
1123
|
+
Buffer4.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
|
|
1124
1124
|
offset = offset >>> 0;
|
|
1125
1125
|
validateNumber(offset, "offset");
|
|
1126
1126
|
const first = this[offset];
|
|
@@ -1132,7 +1132,7 @@ var require_buffer = __commonJS({
|
|
|
1132
1132
|
const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
|
|
1133
1133
|
return (BigInt(hi) << BigInt(32)) + BigInt(lo);
|
|
1134
1134
|
});
|
|
1135
|
-
|
|
1135
|
+
Buffer4.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {
|
|
1136
1136
|
offset = offset >>> 0;
|
|
1137
1137
|
byteLength2 = byteLength2 >>> 0;
|
|
1138
1138
|
if (!noAssert) checkOffset(offset, byteLength2, this.length);
|
|
@@ -1146,7 +1146,7 @@ var require_buffer = __commonJS({
|
|
|
1146
1146
|
if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
|
|
1147
1147
|
return val;
|
|
1148
1148
|
};
|
|
1149
|
-
|
|
1149
|
+
Buffer4.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {
|
|
1150
1150
|
offset = offset >>> 0;
|
|
1151
1151
|
byteLength2 = byteLength2 >>> 0;
|
|
1152
1152
|
if (!noAssert) checkOffset(offset, byteLength2, this.length);
|
|
@@ -1160,35 +1160,35 @@ var require_buffer = __commonJS({
|
|
|
1160
1160
|
if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
|
|
1161
1161
|
return val;
|
|
1162
1162
|
};
|
|
1163
|
-
|
|
1163
|
+
Buffer4.prototype.readInt8 = function readInt8(offset, noAssert) {
|
|
1164
1164
|
offset = offset >>> 0;
|
|
1165
1165
|
if (!noAssert) checkOffset(offset, 1, this.length);
|
|
1166
1166
|
if (!(this[offset] & 128)) return this[offset];
|
|
1167
1167
|
return (255 - this[offset] + 1) * -1;
|
|
1168
1168
|
};
|
|
1169
|
-
|
|
1169
|
+
Buffer4.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
|
|
1170
1170
|
offset = offset >>> 0;
|
|
1171
1171
|
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1172
1172
|
const val = this[offset] | this[offset + 1] << 8;
|
|
1173
1173
|
return val & 32768 ? val | 4294901760 : val;
|
|
1174
1174
|
};
|
|
1175
|
-
|
|
1175
|
+
Buffer4.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
|
|
1176
1176
|
offset = offset >>> 0;
|
|
1177
1177
|
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1178
1178
|
const val = this[offset + 1] | this[offset] << 8;
|
|
1179
1179
|
return val & 32768 ? val | 4294901760 : val;
|
|
1180
1180
|
};
|
|
1181
|
-
|
|
1181
|
+
Buffer4.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
|
|
1182
1182
|
offset = offset >>> 0;
|
|
1183
1183
|
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1184
1184
|
return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
|
|
1185
1185
|
};
|
|
1186
|
-
|
|
1186
|
+
Buffer4.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
|
|
1187
1187
|
offset = offset >>> 0;
|
|
1188
1188
|
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1189
1189
|
return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
|
|
1190
1190
|
};
|
|
1191
|
-
|
|
1191
|
+
Buffer4.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
|
|
1192
1192
|
offset = offset >>> 0;
|
|
1193
1193
|
validateNumber(offset, "offset");
|
|
1194
1194
|
const first = this[offset];
|
|
@@ -1199,7 +1199,7 @@ var require_buffer = __commonJS({
|
|
|
1199
1199
|
const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
|
|
1200
1200
|
return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
|
|
1201
1201
|
});
|
|
1202
|
-
|
|
1202
|
+
Buffer4.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
|
|
1203
1203
|
offset = offset >>> 0;
|
|
1204
1204
|
validateNumber(offset, "offset");
|
|
1205
1205
|
const first = this[offset];
|
|
@@ -1211,32 +1211,32 @@ var require_buffer = __commonJS({
|
|
|
1211
1211
|
this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
1212
1212
|
return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
|
|
1213
1213
|
});
|
|
1214
|
-
|
|
1214
|
+
Buffer4.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
|
|
1215
1215
|
offset = offset >>> 0;
|
|
1216
1216
|
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1217
1217
|
return ieee754.read(this, offset, true, 23, 4);
|
|
1218
1218
|
};
|
|
1219
|
-
|
|
1219
|
+
Buffer4.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
|
|
1220
1220
|
offset = offset >>> 0;
|
|
1221
1221
|
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1222
1222
|
return ieee754.read(this, offset, false, 23, 4);
|
|
1223
1223
|
};
|
|
1224
|
-
|
|
1224
|
+
Buffer4.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
|
|
1225
1225
|
offset = offset >>> 0;
|
|
1226
1226
|
if (!noAssert) checkOffset(offset, 8, this.length);
|
|
1227
1227
|
return ieee754.read(this, offset, true, 52, 8);
|
|
1228
1228
|
};
|
|
1229
|
-
|
|
1229
|
+
Buffer4.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
|
|
1230
1230
|
offset = offset >>> 0;
|
|
1231
1231
|
if (!noAssert) checkOffset(offset, 8, this.length);
|
|
1232
1232
|
return ieee754.read(this, offset, false, 52, 8);
|
|
1233
1233
|
};
|
|
1234
1234
|
function checkInt(buf, value, offset, ext, max, min) {
|
|
1235
|
-
if (!
|
|
1235
|
+
if (!Buffer4.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
1236
1236
|
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
|
|
1237
1237
|
if (offset + ext > buf.length) throw new RangeError("Index out of range");
|
|
1238
1238
|
}
|
|
1239
|
-
|
|
1239
|
+
Buffer4.prototype.writeUintLE = Buffer4.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {
|
|
1240
1240
|
value = +value;
|
|
1241
1241
|
offset = offset >>> 0;
|
|
1242
1242
|
byteLength2 = byteLength2 >>> 0;
|
|
@@ -1252,7 +1252,7 @@ var require_buffer = __commonJS({
|
|
|
1252
1252
|
}
|
|
1253
1253
|
return offset + byteLength2;
|
|
1254
1254
|
};
|
|
1255
|
-
|
|
1255
|
+
Buffer4.prototype.writeUintBE = Buffer4.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {
|
|
1256
1256
|
value = +value;
|
|
1257
1257
|
offset = offset >>> 0;
|
|
1258
1258
|
byteLength2 = byteLength2 >>> 0;
|
|
@@ -1268,14 +1268,14 @@ var require_buffer = __commonJS({
|
|
|
1268
1268
|
}
|
|
1269
1269
|
return offset + byteLength2;
|
|
1270
1270
|
};
|
|
1271
|
-
|
|
1271
|
+
Buffer4.prototype.writeUint8 = Buffer4.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
|
|
1272
1272
|
value = +value;
|
|
1273
1273
|
offset = offset >>> 0;
|
|
1274
1274
|
if (!noAssert) checkInt(this, value, offset, 1, 255, 0);
|
|
1275
1275
|
this[offset] = value & 255;
|
|
1276
1276
|
return offset + 1;
|
|
1277
1277
|
};
|
|
1278
|
-
|
|
1278
|
+
Buffer4.prototype.writeUint16LE = Buffer4.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
|
|
1279
1279
|
value = +value;
|
|
1280
1280
|
offset = offset >>> 0;
|
|
1281
1281
|
if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
|
|
@@ -1283,7 +1283,7 @@ var require_buffer = __commonJS({
|
|
|
1283
1283
|
this[offset + 1] = value >>> 8;
|
|
1284
1284
|
return offset + 2;
|
|
1285
1285
|
};
|
|
1286
|
-
|
|
1286
|
+
Buffer4.prototype.writeUint16BE = Buffer4.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
|
|
1287
1287
|
value = +value;
|
|
1288
1288
|
offset = offset >>> 0;
|
|
1289
1289
|
if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
|
|
@@ -1291,7 +1291,7 @@ var require_buffer = __commonJS({
|
|
|
1291
1291
|
this[offset + 1] = value & 255;
|
|
1292
1292
|
return offset + 2;
|
|
1293
1293
|
};
|
|
1294
|
-
|
|
1294
|
+
Buffer4.prototype.writeUint32LE = Buffer4.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
|
|
1295
1295
|
value = +value;
|
|
1296
1296
|
offset = offset >>> 0;
|
|
1297
1297
|
if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
|
|
@@ -1301,7 +1301,7 @@ var require_buffer = __commonJS({
|
|
|
1301
1301
|
this[offset] = value & 255;
|
|
1302
1302
|
return offset + 4;
|
|
1303
1303
|
};
|
|
1304
|
-
|
|
1304
|
+
Buffer4.prototype.writeUint32BE = Buffer4.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
|
|
1305
1305
|
value = +value;
|
|
1306
1306
|
offset = offset >>> 0;
|
|
1307
1307
|
if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
|
|
@@ -1351,13 +1351,13 @@ var require_buffer = __commonJS({
|
|
|
1351
1351
|
buf[offset] = hi;
|
|
1352
1352
|
return offset + 8;
|
|
1353
1353
|
}
|
|
1354
|
-
|
|
1354
|
+
Buffer4.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {
|
|
1355
1355
|
return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1356
1356
|
});
|
|
1357
|
-
|
|
1357
|
+
Buffer4.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {
|
|
1358
1358
|
return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1359
1359
|
});
|
|
1360
|
-
|
|
1360
|
+
Buffer4.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {
|
|
1361
1361
|
value = +value;
|
|
1362
1362
|
offset = offset >>> 0;
|
|
1363
1363
|
if (!noAssert) {
|
|
@@ -1376,7 +1376,7 @@ var require_buffer = __commonJS({
|
|
|
1376
1376
|
}
|
|
1377
1377
|
return offset + byteLength2;
|
|
1378
1378
|
};
|
|
1379
|
-
|
|
1379
|
+
Buffer4.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {
|
|
1380
1380
|
value = +value;
|
|
1381
1381
|
offset = offset >>> 0;
|
|
1382
1382
|
if (!noAssert) {
|
|
@@ -1395,7 +1395,7 @@ var require_buffer = __commonJS({
|
|
|
1395
1395
|
}
|
|
1396
1396
|
return offset + byteLength2;
|
|
1397
1397
|
};
|
|
1398
|
-
|
|
1398
|
+
Buffer4.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
|
|
1399
1399
|
value = +value;
|
|
1400
1400
|
offset = offset >>> 0;
|
|
1401
1401
|
if (!noAssert) checkInt(this, value, offset, 1, 127, -128);
|
|
@@ -1403,7 +1403,7 @@ var require_buffer = __commonJS({
|
|
|
1403
1403
|
this[offset] = value & 255;
|
|
1404
1404
|
return offset + 1;
|
|
1405
1405
|
};
|
|
1406
|
-
|
|
1406
|
+
Buffer4.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
|
|
1407
1407
|
value = +value;
|
|
1408
1408
|
offset = offset >>> 0;
|
|
1409
1409
|
if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
|
|
@@ -1411,7 +1411,7 @@ var require_buffer = __commonJS({
|
|
|
1411
1411
|
this[offset + 1] = value >>> 8;
|
|
1412
1412
|
return offset + 2;
|
|
1413
1413
|
};
|
|
1414
|
-
|
|
1414
|
+
Buffer4.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
|
|
1415
1415
|
value = +value;
|
|
1416
1416
|
offset = offset >>> 0;
|
|
1417
1417
|
if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
|
|
@@ -1419,7 +1419,7 @@ var require_buffer = __commonJS({
|
|
|
1419
1419
|
this[offset + 1] = value & 255;
|
|
1420
1420
|
return offset + 2;
|
|
1421
1421
|
};
|
|
1422
|
-
|
|
1422
|
+
Buffer4.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
|
|
1423
1423
|
value = +value;
|
|
1424
1424
|
offset = offset >>> 0;
|
|
1425
1425
|
if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
@@ -1429,7 +1429,7 @@ var require_buffer = __commonJS({
|
|
|
1429
1429
|
this[offset + 3] = value >>> 24;
|
|
1430
1430
|
return offset + 4;
|
|
1431
1431
|
};
|
|
1432
|
-
|
|
1432
|
+
Buffer4.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
|
|
1433
1433
|
value = +value;
|
|
1434
1434
|
offset = offset >>> 0;
|
|
1435
1435
|
if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
@@ -1440,10 +1440,10 @@ var require_buffer = __commonJS({
|
|
|
1440
1440
|
this[offset + 3] = value & 255;
|
|
1441
1441
|
return offset + 4;
|
|
1442
1442
|
};
|
|
1443
|
-
|
|
1443
|
+
Buffer4.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {
|
|
1444
1444
|
return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1445
1445
|
});
|
|
1446
|
-
|
|
1446
|
+
Buffer4.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {
|
|
1447
1447
|
return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1448
1448
|
});
|
|
1449
1449
|
function checkIEEE754(buf, value, offset, ext, max, min) {
|
|
@@ -1459,10 +1459,10 @@ var require_buffer = __commonJS({
|
|
|
1459
1459
|
ieee754.write(buf, value, offset, littleEndian, 23, 4);
|
|
1460
1460
|
return offset + 4;
|
|
1461
1461
|
}
|
|
1462
|
-
|
|
1462
|
+
Buffer4.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
|
|
1463
1463
|
return writeFloat(this, value, offset, true, noAssert);
|
|
1464
1464
|
};
|
|
1465
|
-
|
|
1465
|
+
Buffer4.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
|
|
1466
1466
|
return writeFloat(this, value, offset, false, noAssert);
|
|
1467
1467
|
};
|
|
1468
1468
|
function writeDouble(buf, value, offset, littleEndian, noAssert) {
|
|
@@ -1474,14 +1474,14 @@ var require_buffer = __commonJS({
|
|
|
1474
1474
|
ieee754.write(buf, value, offset, littleEndian, 52, 8);
|
|
1475
1475
|
return offset + 8;
|
|
1476
1476
|
}
|
|
1477
|
-
|
|
1477
|
+
Buffer4.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
|
|
1478
1478
|
return writeDouble(this, value, offset, true, noAssert);
|
|
1479
1479
|
};
|
|
1480
|
-
|
|
1480
|
+
Buffer4.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
|
|
1481
1481
|
return writeDouble(this, value, offset, false, noAssert);
|
|
1482
1482
|
};
|
|
1483
|
-
|
|
1484
|
-
if (!
|
|
1483
|
+
Buffer4.prototype.copy = function copy(target, targetStart, start, end) {
|
|
1484
|
+
if (!Buffer4.isBuffer(target)) throw new TypeError("argument should be a Buffer");
|
|
1485
1485
|
if (!start) start = 0;
|
|
1486
1486
|
if (!end && end !== 0) end = this.length;
|
|
1487
1487
|
if (targetStart >= target.length) targetStart = target.length;
|
|
@@ -1510,7 +1510,7 @@ var require_buffer = __commonJS({
|
|
|
1510
1510
|
}
|
|
1511
1511
|
return len;
|
|
1512
1512
|
};
|
|
1513
|
-
|
|
1513
|
+
Buffer4.prototype.fill = function fill(val, start, end, encoding) {
|
|
1514
1514
|
if (typeof val === "string") {
|
|
1515
1515
|
if (typeof start === "string") {
|
|
1516
1516
|
encoding = start;
|
|
@@ -1523,7 +1523,7 @@ var require_buffer = __commonJS({
|
|
|
1523
1523
|
if (encoding !== void 0 && typeof encoding !== "string") {
|
|
1524
1524
|
throw new TypeError("encoding must be a string");
|
|
1525
1525
|
}
|
|
1526
|
-
if (typeof encoding === "string" && !
|
|
1526
|
+
if (typeof encoding === "string" && !Buffer4.isEncoding(encoding)) {
|
|
1527
1527
|
throw new TypeError("Unknown encoding: " + encoding);
|
|
1528
1528
|
}
|
|
1529
1529
|
if (val.length === 1) {
|
|
@@ -1552,7 +1552,7 @@ var require_buffer = __commonJS({
|
|
|
1552
1552
|
this[i] = val;
|
|
1553
1553
|
}
|
|
1554
1554
|
} else {
|
|
1555
|
-
const bytes =
|
|
1555
|
+
const bytes = Buffer4.isBuffer(val) ? val : Buffer4.from(val, encoding);
|
|
1556
1556
|
const len = bytes.length;
|
|
1557
1557
|
if (len === 0) {
|
|
1558
1558
|
throw new TypeError('The value "' + val + '" is invalid for argument "value"');
|
|
@@ -2065,6 +2065,7 @@ var StabilityProvider = class extends StableDiffusionProvider {
|
|
|
2065
2065
|
};
|
|
2066
2066
|
|
|
2067
2067
|
// src/providers/eleven-labs.ts
|
|
2068
|
+
var import_buffer2 = __toESM(require_buffer());
|
|
2068
2069
|
var import_elevenlabs = require("elevenlabs");
|
|
2069
2070
|
var import_axios3 = __toESM(require("axios"));
|
|
2070
2071
|
var defaultVoiceSettings = {
|
|
@@ -2096,7 +2097,7 @@ var ElevenLabsWhisperProvider = class extends WhisperProvider {
|
|
|
2096
2097
|
}
|
|
2097
2098
|
});
|
|
2098
2099
|
const base64Data = audio.split(",")[1];
|
|
2099
|
-
const blob = new Blob([Buffer.from(base64Data, "base64")], { type: "audio/webm" });
|
|
2100
|
+
const blob = new Blob([import_buffer2.Buffer.from(base64Data, "base64")], { type: "audio/webm" });
|
|
2100
2101
|
const formData = new FormData();
|
|
2101
2102
|
formData.append("file", blob, "audio.webm");
|
|
2102
2103
|
formData.append("model_id", "scribe_v1");
|