diff --git a/main.meta.js b/main.meta.js index 4771eeb..bfee365 100644 --- a/main.meta.js +++ b/main.meta.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PNGExtraEmbed // @namespace https://coom.tech/ -// @version 0.163 +// @version 0.165 // @description uhh // @author You // @match https://boards.4channel.org/* diff --git a/main.user.js b/main.user.js index 1d8ed83..c4b90e2 100644 --- a/main.user.js +++ b/main.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name PNGExtraEmbed // @namespace https://coom.tech/ -// @version 0.163 +// @version 0.165 // @description uhh // @author You // @match https://boards.4channel.org/* @@ -81,7 +81,7 @@ var define_BUILD_VERSION_default; var init_define_BUILD_VERSION = __esm({ ""() { - define_BUILD_VERSION_default = [0, 163]; + define_BUILD_VERSION_default = [0, 165]; } }); @@ -279,13 +279,13 @@ var base64 = require_base64_js(); var ieee7542 = require_ieee754(); var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null; - exports.Buffer = Buffer18; + exports.Buffer = Buffer19; exports.SlowBuffer = SlowBuffer; exports.INSPECT_MAX_BYTES = 50; var K_MAX_LENGTH = 2147483647; exports.kMaxLength = K_MAX_LENGTH; - Buffer18.TYPED_ARRAY_SUPPORT = typedArraySupport(); - if (!Buffer18.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") { + Buffer19.TYPED_ARRAY_SUPPORT = typedArraySupport(); + if (!Buffer19.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") { console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."); } function typedArraySupport() { @@ -301,18 +301,18 @@ return false; } } - Object.defineProperty(Buffer18.prototype, "parent", { + Object.defineProperty(Buffer19.prototype, "parent", { enumerable: true, get: function() { - if (!Buffer18.isBuffer(this)) + if (!Buffer19.isBuffer(this)) return void 0; return this.buffer; } }); - Object.defineProperty(Buffer18.prototype, "offset", { + Object.defineProperty(Buffer19.prototype, "offset", { enumerable: true, get: function() { - if (!Buffer18.isBuffer(this)) + if (!Buffer19.isBuffer(this)) return void 0; return this.byteOffset; } @@ -322,10 +322,10 @@ throw new RangeError('The value "' + length + '" is invalid for option "size"'); } const buf2 = new Uint8Array(length); - Object.setPrototypeOf(buf2, Buffer18.prototype); + Object.setPrototypeOf(buf2, Buffer19.prototype); return buf2; } - function Buffer18(arg, encodingOrOffset, length) { + function Buffer19(arg, encodingOrOffset, length) { if (typeof arg === "number") { if (typeof encodingOrOffset === "string") { throw new TypeError('The "string" argument must be of type string. Received type number'); @@ -334,7 +334,7 @@ } return from(arg, encodingOrOffset, length); } - Buffer18.poolSize = 8192; + Buffer19.poolSize = 8192; function from(value, encodingOrOffset, length) { if (typeof value === "string") { return fromString(value, encodingOrOffset); @@ -356,21 +356,21 @@ } const valueOf = value.valueOf && value.valueOf(); if (valueOf != null && valueOf !== value) { - return Buffer18.from(valueOf, encodingOrOffset, length); + return Buffer19.from(valueOf, encodingOrOffset, length); } const b = fromObject(value); if (b) return b; if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") { - return Buffer18.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length); + return Buffer19.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length); } throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); } - Buffer18.from = function(value, encodingOrOffset, length) { + Buffer19.from = function(value, encodingOrOffset, length) { return from(value, encodingOrOffset, length); }; - Object.setPrototypeOf(Buffer18.prototype, Uint8Array.prototype); - Object.setPrototypeOf(Buffer18, Uint8Array); + Object.setPrototypeOf(Buffer19.prototype, Uint8Array.prototype); + Object.setPrototypeOf(Buffer19, Uint8Array); function assertSize(size) { if (typeof size !== "number") { throw new TypeError('"size" argument must be of type number'); @@ -388,24 +388,24 @@ } return createBuffer(size); } - Buffer18.alloc = function(size, fill, encoding) { + Buffer19.alloc = function(size, fill, encoding) { return alloc(size, fill, encoding); }; function allocUnsafe(size) { assertSize(size); return createBuffer(size < 0 ? 0 : checked(size) | 0); } - Buffer18.allocUnsafe = function(size) { + Buffer19.allocUnsafe = function(size) { return allocUnsafe(size); }; - Buffer18.allocUnsafeSlow = function(size) { + Buffer19.allocUnsafeSlow = function(size) { return allocUnsafe(size); }; function fromString(string, encoding) { if (typeof encoding !== "string" || encoding === "") { encoding = "utf8"; } - if (!Buffer18.isEncoding(encoding)) { + if (!Buffer19.isEncoding(encoding)) { throw new TypeError("Unknown encoding: " + encoding); } const length = byteLength(string, encoding) | 0; @@ -446,11 +446,11 @@ } else { buf2 = new Uint8Array(array, byteOffset, length); } - Object.setPrototypeOf(buf2, Buffer18.prototype); + Object.setPrototypeOf(buf2, Buffer19.prototype); return buf2; } function fromObject(obj) { - if (Buffer18.isBuffer(obj)) { + if (Buffer19.isBuffer(obj)) { const len = checked(obj.length) | 0; const buf2 = createBuffer(len); if (buf2.length === 0) { @@ -479,17 +479,17 @@ if (+length != length) { length = 0; } - return Buffer18.alloc(+length); + return Buffer19.alloc(+length); } - Buffer18.isBuffer = function isBuffer(b) { - return b != null && b._isBuffer === true && b !== Buffer18.prototype; + Buffer19.isBuffer = function isBuffer(b) { + return b != null && b._isBuffer === true && b !== Buffer19.prototype; }; - Buffer18.compare = function compare(a, b) { + Buffer19.compare = function compare(a, b) { if (isInstance(a, Uint8Array)) - a = Buffer18.from(a, a.offset, a.byteLength); + a = Buffer19.from(a, a.offset, a.byteLength); if (isInstance(b, Uint8Array)) - b = Buffer18.from(b, b.offset, b.byteLength); - if (!Buffer18.isBuffer(a) || !Buffer18.isBuffer(b)) { + b = Buffer19.from(b, b.offset, b.byteLength); + if (!Buffer19.isBuffer(a) || !Buffer19.isBuffer(b)) { throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); } if (a === b) @@ -509,7 +509,7 @@ return 1; return 0; }; - Buffer18.isEncoding = function isEncoding(encoding) { + Buffer19.isEncoding = function isEncoding(encoding) { switch (String(encoding).toLowerCase()) { case "hex": case "utf8": @@ -527,12 +527,12 @@ return false; } }; - Buffer18.concat = function concat(list, length) { + Buffer19.concat = function concat(list, length) { if (!Array.isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers'); } if (list.length === 0) { - return Buffer18.alloc(0); + return Buffer19.alloc(0); } let i; if (length === void 0) { @@ -541,19 +541,19 @@ length += list[i].length; } } - const buffer = Buffer18.allocUnsafe(length); + const buffer = Buffer19.allocUnsafe(length); let pos = 0; for (i = 0; i < list.length; ++i) { let buf2 = list[i]; if (isInstance(buf2, Uint8Array)) { if (pos + buf2.length > buffer.length) { - if (!Buffer18.isBuffer(buf2)) - buf2 = Buffer18.from(buf2); + if (!Buffer19.isBuffer(buf2)) + buf2 = Buffer19.from(buf2); buf2.copy(buffer, pos); } else { Uint8Array.prototype.set.call(buffer, buf2, pos); } - } else if (!Buffer18.isBuffer(buf2)) { + } else if (!Buffer19.isBuffer(buf2)) { throw new TypeError('"list" argument must be an Array of Buffers'); } else { buf2.copy(buffer, pos); @@ -563,7 +563,7 @@ return buffer; }; function byteLength(string, encoding) { - if (Buffer18.isBuffer(string)) { + if (Buffer19.isBuffer(string)) { return string.length; } if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { @@ -604,7 +604,7 @@ } } } - Buffer18.byteLength = byteLength; + Buffer19.byteLength = byteLength; function slowToString(encoding, start, end) { let loweredCase = false; if (start === void 0 || start < 0) { @@ -653,13 +653,13 @@ } } } - Buffer18.prototype._isBuffer = true; + Buffer19.prototype._isBuffer = true; function swap(b, n, m) { const i = b[n]; b[n] = b[m]; b[m] = i; } - Buffer18.prototype.swap16 = function swap16() { + Buffer19.prototype.swap16 = function swap16() { const len = this.length; if (len % 2 !== 0) { throw new RangeError("Buffer size must be a multiple of 16-bits"); @@ -669,7 +669,7 @@ } return this; }; - Buffer18.prototype.swap32 = function swap32() { + Buffer19.prototype.swap32 = function swap32() { const len = this.length; if (len % 4 !== 0) { throw new RangeError("Buffer size must be a multiple of 32-bits"); @@ -680,7 +680,7 @@ } return this; }; - Buffer18.prototype.swap64 = function swap64() { + Buffer19.prototype.swap64 = function swap64() { const len = this.length; if (len % 8 !== 0) { throw new RangeError("Buffer size must be a multiple of 64-bits"); @@ -693,7 +693,7 @@ } return this; }; - Buffer18.prototype.toString = function toString() { + Buffer19.prototype.toString = function toString() { const length = this.length; if (length === 0) return ""; @@ -701,15 +701,15 @@ return utf8Slice(this, 0, length); return slowToString.apply(this, arguments); }; - Buffer18.prototype.toLocaleString = Buffer18.prototype.toString; - Buffer18.prototype.equals = function equals(b) { - if (!Buffer18.isBuffer(b)) + Buffer19.prototype.toLocaleString = Buffer19.prototype.toString; + Buffer19.prototype.equals = function equals(b) { + if (!Buffer19.isBuffer(b)) throw new TypeError("Argument must be a Buffer"); if (this === b) return true; - return Buffer18.compare(this, b) === 0; + return Buffer19.compare(this, b) === 0; }; - Buffer18.prototype.inspect = function inspect() { + Buffer19.prototype.inspect = function inspect() { let str = ""; const max = exports.INSPECT_MAX_BYTES; str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim(); @@ -718,13 +718,13 @@ return ""; }; if (customInspectSymbol) { - Buffer18.prototype[customInspectSymbol] = Buffer18.prototype.inspect; + Buffer19.prototype[customInspectSymbol] = Buffer19.prototype.inspect; } - Buffer18.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { + Buffer19.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { if (isInstance(target, Uint8Array)) { - target = Buffer18.from(target, target.offset, target.byteLength); + target = Buffer19.from(target, target.offset, target.byteLength); } - if (!Buffer18.isBuffer(target)) { + if (!Buffer19.isBuffer(target)) { throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target); } if (start === void 0) { @@ -804,9 +804,9 @@ return -1; } if (typeof val === "string") { - val = Buffer18.from(val, encoding); + val = Buffer19.from(val, encoding); } - if (Buffer18.isBuffer(val)) { + if (Buffer19.isBuffer(val)) { if (val.length === 0) { return -1; } @@ -879,13 +879,13 @@ } return -1; } - Buffer18.prototype.includes = function includes(val, byteOffset, encoding) { + Buffer19.prototype.includes = function includes(val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1; }; - Buffer18.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + Buffer19.prototype.indexOf = function indexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true); }; - Buffer18.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { + Buffer19.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false); }; function hexWrite(buf2, string, offset, length) { @@ -924,7 +924,7 @@ function ucs2Write(buf2, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf2.length - offset), buf2, offset, length); } - Buffer18.prototype.write = function write2(string, offset, length, encoding) { + Buffer19.prototype.write = function write2(string, offset, length, encoding) { if (offset === void 0) { encoding = "utf8"; length = this.length; @@ -981,7 +981,7 @@ } } }; - Buffer18.prototype.toJSON = function toJSON() { + Buffer19.prototype.toJSON = function toJSON() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) @@ -1103,7 +1103,7 @@ } return res; } - Buffer18.prototype.slice = function slice(start, end) { + Buffer19.prototype.slice = function slice(start, end) { const len = this.length; start = ~~start; end = end === void 0 ? len : ~~end; @@ -1124,7 +1124,7 @@ if (end < start) end = start; const newBuf = this.subarray(start, end); - Object.setPrototypeOf(newBuf, Buffer18.prototype); + Object.setPrototypeOf(newBuf, Buffer19.prototype); return newBuf; }; function checkOffset(offset, ext, length) { @@ -1133,7 +1133,7 @@ if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length"); } - Buffer18.prototype.readUintLE = Buffer18.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) { + Buffer19.prototype.readUintLE = Buffer19.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) @@ -1146,7 +1146,7 @@ } return val; }; - Buffer18.prototype.readUintBE = Buffer18.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) { + Buffer19.prototype.readUintBE = Buffer19.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) { @@ -1159,37 +1159,37 @@ } return val; }; - Buffer18.prototype.readUint8 = Buffer18.prototype.readUInt8 = function readUInt8(offset, noAssert) { + Buffer19.prototype.readUint8 = Buffer19.prototype.readUInt8 = function readUInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); return this[offset]; }; - Buffer18.prototype.readUint16LE = Buffer18.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { + Buffer19.prototype.readUint16LE = Buffer19.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] | this[offset + 1] << 8; }; - Buffer18.prototype.readUint16BE = Buffer18.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { + Buffer19.prototype.readUint16BE = Buffer19.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] << 8 | this[offset + 1]; }; - Buffer18.prototype.readUint32LE = Buffer18.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { + Buffer19.prototype.readUint32LE = Buffer19.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216; }; - Buffer18.prototype.readUint32BE = Buffer18.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { + Buffer19.prototype.readUint32BE = Buffer19.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); }; - Buffer18.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) { + Buffer19.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) { offset = offset >>> 0; validateNumber(offset, "offset"); const first = this[offset]; @@ -1201,7 +1201,7 @@ const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24; return BigInt(lo) + (BigInt(hi) << BigInt(32)); }); - Buffer18.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) { + Buffer19.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) { offset = offset >>> 0; validateNumber(offset, "offset"); const first = this[offset]; @@ -1213,7 +1213,7 @@ const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last; return (BigInt(hi) << BigInt(32)) + BigInt(lo); }); - Buffer18.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) { + Buffer19.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) @@ -1229,7 +1229,7 @@ val -= Math.pow(2, 8 * byteLength2); return val; }; - Buffer18.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) { + Buffer19.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) @@ -1245,7 +1245,7 @@ val -= Math.pow(2, 8 * byteLength2); return val; }; - Buffer18.prototype.readInt8 = function readInt8(offset, noAssert) { + Buffer19.prototype.readInt8 = function readInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); @@ -1253,33 +1253,33 @@ return this[offset]; return (255 - this[offset] + 1) * -1; }; - Buffer18.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + Buffer19.prototype.readInt16LE = function readInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); const val = this[offset] | this[offset + 1] << 8; return val & 32768 ? val | 4294901760 : val; }; - Buffer18.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + Buffer19.prototype.readInt16BE = function readInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); const val = this[offset + 1] | this[offset] << 8; return val & 32768 ? val | 4294901760 : val; }; - Buffer18.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + Buffer19.prototype.readInt32LE = function readInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; }; - Buffer18.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + Buffer19.prototype.readInt32BE = function readInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; }; - Buffer18.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) { + Buffer19.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) { offset = offset >>> 0; validateNumber(offset, "offset"); const first = this[offset]; @@ -1290,7 +1290,7 @@ const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24); return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24); }); - Buffer18.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) { + Buffer19.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) { offset = offset >>> 0; validateNumber(offset, "offset"); const first = this[offset]; @@ -1301,39 +1301,39 @@ const val = (first << 24) + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset]; return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last); }); - Buffer18.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + Buffer19.prototype.readFloatLE = function readFloatLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee7542.read(this, offset, true, 23, 4); }; - Buffer18.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + Buffer19.prototype.readFloatBE = function readFloatBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee7542.read(this, offset, false, 23, 4); }; - Buffer18.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + Buffer19.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee7542.read(this, offset, true, 52, 8); }; - Buffer18.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + Buffer19.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee7542.read(this, offset, false, 52, 8); }; function checkInt(buf2, value, offset, ext, max, min) { - if (!Buffer18.isBuffer(buf2)) + if (!Buffer19.isBuffer(buf2)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); if (offset + ext > buf2.length) throw new RangeError("Index out of range"); } - Buffer18.prototype.writeUintLE = Buffer18.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) { + Buffer19.prototype.writeUintLE = Buffer19.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; @@ -1349,7 +1349,7 @@ } return offset + byteLength2; }; - Buffer18.prototype.writeUintBE = Buffer18.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) { + Buffer19.prototype.writeUintBE = Buffer19.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; @@ -1365,7 +1365,7 @@ } return offset + byteLength2; }; - Buffer18.prototype.writeUint8 = Buffer18.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { + Buffer19.prototype.writeUint8 = Buffer19.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1373,7 +1373,7 @@ this[offset] = value & 255; return offset + 1; }; - Buffer18.prototype.writeUint16LE = Buffer18.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { + Buffer19.prototype.writeUint16LE = Buffer19.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1382,7 +1382,7 @@ this[offset + 1] = value >>> 8; return offset + 2; }; - Buffer18.prototype.writeUint16BE = Buffer18.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { + Buffer19.prototype.writeUint16BE = Buffer19.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1391,7 +1391,7 @@ this[offset + 1] = value & 255; return offset + 2; }; - Buffer18.prototype.writeUint32LE = Buffer18.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { + Buffer19.prototype.writeUint32LE = Buffer19.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1402,7 +1402,7 @@ this[offset] = value & 255; return offset + 4; }; - Buffer18.prototype.writeUint32BE = Buffer18.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { + Buffer19.prototype.writeUint32BE = Buffer19.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1453,13 +1453,13 @@ buf2[offset] = hi; return offset + 8; } - Buffer18.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) { + Buffer19.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) { return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff")); }); - Buffer18.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) { + Buffer19.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) { return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff")); }); - Buffer18.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) { + Buffer19.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { @@ -1478,7 +1478,7 @@ } return offset + byteLength2; }; - Buffer18.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) { + Buffer19.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { @@ -1497,7 +1497,7 @@ } return offset + byteLength2; }; - Buffer18.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + Buffer19.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1507,7 +1507,7 @@ this[offset] = value & 255; return offset + 1; }; - Buffer18.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { + Buffer19.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1516,7 +1516,7 @@ this[offset + 1] = value >>> 8; return offset + 2; }; - Buffer18.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { + Buffer19.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1525,7 +1525,7 @@ this[offset + 1] = value & 255; return offset + 2; }; - Buffer18.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { + Buffer19.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1536,7 +1536,7 @@ this[offset + 3] = value >>> 24; return offset + 4; }; - Buffer18.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { + Buffer19.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -1549,10 +1549,10 @@ this[offset + 3] = value & 255; return offset + 4; }; - Buffer18.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) { + Buffer19.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) { return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); }); - Buffer18.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) { + Buffer19.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) { return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); }); function checkIEEE754(buf2, value, offset, ext, max, min) { @@ -1570,10 +1570,10 @@ ieee7542.write(buf2, value, offset, littleEndian, 23, 4); return offset + 4; } - Buffer18.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { + Buffer19.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert); }; - Buffer18.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { + Buffer19.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert); }; function writeDouble(buf2, value, offset, littleEndian, noAssert) { @@ -1585,14 +1585,14 @@ ieee7542.write(buf2, value, offset, littleEndian, 52, 8); return offset + 8; } - Buffer18.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { + Buffer19.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert); }; - Buffer18.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { + Buffer19.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert); }; - Buffer18.prototype.copy = function copy(target, targetStart, start, end) { - if (!Buffer18.isBuffer(target)) + Buffer19.prototype.copy = function copy(target, targetStart, start, end) { + if (!Buffer19.isBuffer(target)) throw new TypeError("argument should be a Buffer"); if (!start) start = 0; @@ -1628,7 +1628,7 @@ } return len; }; - Buffer18.prototype.fill = function fill(val, start, end, encoding) { + Buffer19.prototype.fill = function fill(val, start, end, encoding) { if (typeof val === "string") { if (typeof start === "string") { encoding = start; @@ -1641,7 +1641,7 @@ if (encoding !== void 0 && typeof encoding !== "string") { throw new TypeError("encoding must be a string"); } - if (typeof encoding === "string" && !Buffer18.isEncoding(encoding)) { + if (typeof encoding === "string" && !Buffer19.isEncoding(encoding)) { throw new TypeError("Unknown encoding: " + encoding); } if (val.length === 1) { @@ -1671,7 +1671,7 @@ this[i] = val; } } else { - const bytes = Buffer18.isBuffer(val) ? val : Buffer18.from(val, encoding); + const bytes = Buffer19.isBuffer(val) ? val : Buffer19.from(val, encoding); const len = bytes.length; if (len === 0) { throw new TypeError('The value "' + val + '" is invalid for argument "value"'); @@ -4474,13 +4474,13 @@ var base64 = require_base64_js(); var ieee7542 = require_ieee754(); var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null; - exports.Buffer = Buffer18; + exports.Buffer = Buffer19; exports.SlowBuffer = SlowBuffer; exports.INSPECT_MAX_BYTES = 50; var K_MAX_LENGTH = 2147483647; exports.kMaxLength = K_MAX_LENGTH; - Buffer18.TYPED_ARRAY_SUPPORT = typedArraySupport(); - if (!Buffer18.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") { + Buffer19.TYPED_ARRAY_SUPPORT = typedArraySupport(); + if (!Buffer19.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") { console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."); } function typedArraySupport() { @@ -4496,18 +4496,18 @@ return false; } } - Object.defineProperty(Buffer18.prototype, "parent", { + Object.defineProperty(Buffer19.prototype, "parent", { enumerable: true, get: function() { - if (!Buffer18.isBuffer(this)) + if (!Buffer19.isBuffer(this)) return void 0; return this.buffer; } }); - Object.defineProperty(Buffer18.prototype, "offset", { + Object.defineProperty(Buffer19.prototype, "offset", { enumerable: true, get: function() { - if (!Buffer18.isBuffer(this)) + if (!Buffer19.isBuffer(this)) return void 0; return this.byteOffset; } @@ -4517,10 +4517,10 @@ throw new RangeError('The value "' + length + '" is invalid for option "size"'); } var buf2 = new Uint8Array(length); - Object.setPrototypeOf(buf2, Buffer18.prototype); + Object.setPrototypeOf(buf2, Buffer19.prototype); return buf2; } - function Buffer18(arg, encodingOrOffset, length) { + function Buffer19(arg, encodingOrOffset, length) { if (typeof arg === "number") { if (typeof encodingOrOffset === "string") { throw new TypeError('The "string" argument must be of type string. Received type number'); @@ -4529,7 +4529,7 @@ } return from(arg, encodingOrOffset, length); } - Buffer18.poolSize = 8192; + Buffer19.poolSize = 8192; function from(value, encodingOrOffset, length) { if (typeof value === "string") { return fromString(value, encodingOrOffset); @@ -4551,21 +4551,21 @@ } var valueOf = value.valueOf && value.valueOf(); if (valueOf != null && valueOf !== value) { - return Buffer18.from(valueOf, encodingOrOffset, length); + return Buffer19.from(valueOf, encodingOrOffset, length); } var b = fromObject(value); if (b) return b; if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") { - return Buffer18.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length); + return Buffer19.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length); } throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); } - Buffer18.from = function(value, encodingOrOffset, length) { + Buffer19.from = function(value, encodingOrOffset, length) { return from(value, encodingOrOffset, length); }; - Object.setPrototypeOf(Buffer18.prototype, Uint8Array.prototype); - Object.setPrototypeOf(Buffer18, Uint8Array); + Object.setPrototypeOf(Buffer19.prototype, Uint8Array.prototype); + Object.setPrototypeOf(Buffer19, Uint8Array); function assertSize(size) { if (typeof size !== "number") { throw new TypeError('"size" argument must be of type number'); @@ -4583,24 +4583,24 @@ } return createBuffer(size); } - Buffer18.alloc = function(size, fill, encoding) { + Buffer19.alloc = function(size, fill, encoding) { return alloc(size, fill, encoding); }; function allocUnsafe(size) { assertSize(size); return createBuffer(size < 0 ? 0 : checked(size) | 0); } - Buffer18.allocUnsafe = function(size) { + Buffer19.allocUnsafe = function(size) { return allocUnsafe(size); }; - Buffer18.allocUnsafeSlow = function(size) { + Buffer19.allocUnsafeSlow = function(size) { return allocUnsafe(size); }; function fromString(string, encoding) { if (typeof encoding !== "string" || encoding === "") { encoding = "utf8"; } - if (!Buffer18.isEncoding(encoding)) { + if (!Buffer19.isEncoding(encoding)) { throw new TypeError("Unknown encoding: " + encoding); } var length = byteLength(string, encoding) | 0; @@ -4641,11 +4641,11 @@ } else { buf2 = new Uint8Array(array, byteOffset, length); } - Object.setPrototypeOf(buf2, Buffer18.prototype); + Object.setPrototypeOf(buf2, Buffer19.prototype); return buf2; } function fromObject(obj) { - if (Buffer18.isBuffer(obj)) { + if (Buffer19.isBuffer(obj)) { var len = checked(obj.length) | 0; var buf2 = createBuffer(len); if (buf2.length === 0) { @@ -4674,17 +4674,17 @@ if (+length != length) { length = 0; } - return Buffer18.alloc(+length); + return Buffer19.alloc(+length); } - Buffer18.isBuffer = function isBuffer(b) { - return b != null && b._isBuffer === true && b !== Buffer18.prototype; + Buffer19.isBuffer = function isBuffer(b) { + return b != null && b._isBuffer === true && b !== Buffer19.prototype; }; - Buffer18.compare = function compare(a, b) { + Buffer19.compare = function compare(a, b) { if (isInstance(a, Uint8Array)) - a = Buffer18.from(a, a.offset, a.byteLength); + a = Buffer19.from(a, a.offset, a.byteLength); if (isInstance(b, Uint8Array)) - b = Buffer18.from(b, b.offset, b.byteLength); - if (!Buffer18.isBuffer(a) || !Buffer18.isBuffer(b)) { + b = Buffer19.from(b, b.offset, b.byteLength); + if (!Buffer19.isBuffer(a) || !Buffer19.isBuffer(b)) { throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); } if (a === b) @@ -4704,7 +4704,7 @@ return 1; return 0; }; - Buffer18.isEncoding = function isEncoding(encoding) { + Buffer19.isEncoding = function isEncoding(encoding) { switch (String(encoding).toLowerCase()) { case "hex": case "utf8": @@ -4722,12 +4722,12 @@ return false; } }; - Buffer18.concat = function concat(list, length) { + Buffer19.concat = function concat(list, length) { if (!Array.isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers'); } if (list.length === 0) { - return Buffer18.alloc(0); + return Buffer19.alloc(0); } var i; if (length === void 0) { @@ -4736,17 +4736,17 @@ length += list[i].length; } } - var buffer = Buffer18.allocUnsafe(length); + var buffer = Buffer19.allocUnsafe(length); var pos = 0; for (i = 0; i < list.length; ++i) { var buf2 = list[i]; if (isInstance(buf2, Uint8Array)) { if (pos + buf2.length > buffer.length) { - Buffer18.from(buf2).copy(buffer, pos); + Buffer19.from(buf2).copy(buffer, pos); } else { Uint8Array.prototype.set.call(buffer, buf2, pos); } - } else if (!Buffer18.isBuffer(buf2)) { + } else if (!Buffer19.isBuffer(buf2)) { throw new TypeError('"list" argument must be an Array of Buffers'); } else { buf2.copy(buffer, pos); @@ -4756,7 +4756,7 @@ return buffer; }; function byteLength(string, encoding) { - if (Buffer18.isBuffer(string)) { + if (Buffer19.isBuffer(string)) { return string.length; } if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { @@ -4797,7 +4797,7 @@ } } } - Buffer18.byteLength = byteLength; + Buffer19.byteLength = byteLength; function slowToString(encoding, start, end) { var loweredCase = false; if (start === void 0 || start < 0) { @@ -4846,13 +4846,13 @@ } } } - Buffer18.prototype._isBuffer = true; + Buffer19.prototype._isBuffer = true; function swap(b, n, m) { var i = b[n]; b[n] = b[m]; b[m] = i; } - Buffer18.prototype.swap16 = function swap16() { + Buffer19.prototype.swap16 = function swap16() { var len = this.length; if (len % 2 !== 0) { throw new RangeError("Buffer size must be a multiple of 16-bits"); @@ -4862,7 +4862,7 @@ } return this; }; - Buffer18.prototype.swap32 = function swap32() { + Buffer19.prototype.swap32 = function swap32() { var len = this.length; if (len % 4 !== 0) { throw new RangeError("Buffer size must be a multiple of 32-bits"); @@ -4873,7 +4873,7 @@ } return this; }; - Buffer18.prototype.swap64 = function swap64() { + Buffer19.prototype.swap64 = function swap64() { var len = this.length; if (len % 8 !== 0) { throw new RangeError("Buffer size must be a multiple of 64-bits"); @@ -4886,7 +4886,7 @@ } return this; }; - Buffer18.prototype.toString = function toString() { + Buffer19.prototype.toString = function toString() { var length = this.length; if (length === 0) return ""; @@ -4894,15 +4894,15 @@ return utf8Slice(this, 0, length); return slowToString.apply(this, arguments); }; - Buffer18.prototype.toLocaleString = Buffer18.prototype.toString; - Buffer18.prototype.equals = function equals(b) { - if (!Buffer18.isBuffer(b)) + Buffer19.prototype.toLocaleString = Buffer19.prototype.toString; + Buffer19.prototype.equals = function equals(b) { + if (!Buffer19.isBuffer(b)) throw new TypeError("Argument must be a Buffer"); if (this === b) return true; - return Buffer18.compare(this, b) === 0; + return Buffer19.compare(this, b) === 0; }; - Buffer18.prototype.inspect = function inspect() { + Buffer19.prototype.inspect = function inspect() { var str = ""; var max = exports.INSPECT_MAX_BYTES; str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim(); @@ -4911,13 +4911,13 @@ return ""; }; if (customInspectSymbol) { - Buffer18.prototype[customInspectSymbol] = Buffer18.prototype.inspect; + Buffer19.prototype[customInspectSymbol] = Buffer19.prototype.inspect; } - Buffer18.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { + Buffer19.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { if (isInstance(target, Uint8Array)) { - target = Buffer18.from(target, target.offset, target.byteLength); + target = Buffer19.from(target, target.offset, target.byteLength); } - if (!Buffer18.isBuffer(target)) { + if (!Buffer19.isBuffer(target)) { throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target); } if (start === void 0) { @@ -4997,9 +4997,9 @@ return -1; } if (typeof val === "string") { - val = Buffer18.from(val, encoding); + val = Buffer19.from(val, encoding); } - if (Buffer18.isBuffer(val)) { + if (Buffer19.isBuffer(val)) { if (val.length === 0) { return -1; } @@ -5072,13 +5072,13 @@ } return -1; } - Buffer18.prototype.includes = function includes(val, byteOffset, encoding) { + Buffer19.prototype.includes = function includes(val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1; }; - Buffer18.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + Buffer19.prototype.indexOf = function indexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true); }; - Buffer18.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { + Buffer19.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false); }; function hexWrite(buf2, string, offset, length) { @@ -5116,7 +5116,7 @@ function ucs2Write(buf2, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf2.length - offset), buf2, offset, length); } - Buffer18.prototype.write = function write2(string, offset, length, encoding) { + Buffer19.prototype.write = function write2(string, offset, length, encoding) { if (offset === void 0) { encoding = "utf8"; length = this.length; @@ -5173,7 +5173,7 @@ } } }; - Buffer18.prototype.toJSON = function toJSON() { + Buffer19.prototype.toJSON = function toJSON() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) @@ -5295,7 +5295,7 @@ } return res; } - Buffer18.prototype.slice = function slice(start, end) { + Buffer19.prototype.slice = function slice(start, end) { var len = this.length; start = ~~start; end = end === void 0 ? len : ~~end; @@ -5316,7 +5316,7 @@ if (end < start) end = start; var newBuf = this.subarray(start, end); - Object.setPrototypeOf(newBuf, Buffer18.prototype); + Object.setPrototypeOf(newBuf, Buffer19.prototype); return newBuf; }; function checkOffset(offset, ext, length) { @@ -5325,7 +5325,7 @@ if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length"); } - Buffer18.prototype.readUintLE = Buffer18.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) { + Buffer19.prototype.readUintLE = Buffer19.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) @@ -5338,7 +5338,7 @@ } return val; }; - Buffer18.prototype.readUintBE = Buffer18.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) { + Buffer19.prototype.readUintBE = Buffer19.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) { @@ -5351,37 +5351,37 @@ } return val; }; - Buffer18.prototype.readUint8 = Buffer18.prototype.readUInt8 = function readUInt8(offset, noAssert) { + Buffer19.prototype.readUint8 = Buffer19.prototype.readUInt8 = function readUInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); return this[offset]; }; - Buffer18.prototype.readUint16LE = Buffer18.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { + Buffer19.prototype.readUint16LE = Buffer19.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] | this[offset + 1] << 8; }; - Buffer18.prototype.readUint16BE = Buffer18.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { + Buffer19.prototype.readUint16BE = Buffer19.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] << 8 | this[offset + 1]; }; - Buffer18.prototype.readUint32LE = Buffer18.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { + Buffer19.prototype.readUint32LE = Buffer19.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216; }; - Buffer18.prototype.readUint32BE = Buffer18.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { + Buffer19.prototype.readUint32BE = Buffer19.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); }; - Buffer18.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) { + Buffer19.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) @@ -5397,7 +5397,7 @@ val -= Math.pow(2, 8 * byteLength2); return val; }; - Buffer18.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) { + Buffer19.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) { offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; if (!noAssert) @@ -5413,7 +5413,7 @@ val -= Math.pow(2, 8 * byteLength2); return val; }; - Buffer18.prototype.readInt8 = function readInt8(offset, noAssert) { + Buffer19.prototype.readInt8 = function readInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); @@ -5421,65 +5421,65 @@ return this[offset]; return (255 - this[offset] + 1) * -1; }; - Buffer18.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + Buffer19.prototype.readInt16LE = function readInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset] | this[offset + 1] << 8; return val & 32768 ? val | 4294901760 : val; }; - Buffer18.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + Buffer19.prototype.readInt16BE = function readInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset + 1] | this[offset] << 8; return val & 32768 ? val | 4294901760 : val; }; - Buffer18.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + Buffer19.prototype.readInt32LE = function readInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; }; - Buffer18.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + Buffer19.prototype.readInt32BE = function readInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; }; - Buffer18.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + Buffer19.prototype.readFloatLE = function readFloatLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee7542.read(this, offset, true, 23, 4); }; - Buffer18.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + Buffer19.prototype.readFloatBE = function readFloatBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee7542.read(this, offset, false, 23, 4); }; - Buffer18.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + Buffer19.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee7542.read(this, offset, true, 52, 8); }; - Buffer18.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + Buffer19.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee7542.read(this, offset, false, 52, 8); }; function checkInt(buf2, value, offset, ext, max, min) { - if (!Buffer18.isBuffer(buf2)) + if (!Buffer19.isBuffer(buf2)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); if (offset + ext > buf2.length) throw new RangeError("Index out of range"); } - Buffer18.prototype.writeUintLE = Buffer18.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) { + Buffer19.prototype.writeUintLE = Buffer19.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; @@ -5495,7 +5495,7 @@ } return offset + byteLength2; }; - Buffer18.prototype.writeUintBE = Buffer18.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) { + Buffer19.prototype.writeUintBE = Buffer19.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; byteLength2 = byteLength2 >>> 0; @@ -5511,7 +5511,7 @@ } return offset + byteLength2; }; - Buffer18.prototype.writeUint8 = Buffer18.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { + Buffer19.prototype.writeUint8 = Buffer19.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5519,7 +5519,7 @@ this[offset] = value & 255; return offset + 1; }; - Buffer18.prototype.writeUint16LE = Buffer18.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { + Buffer19.prototype.writeUint16LE = Buffer19.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5528,7 +5528,7 @@ this[offset + 1] = value >>> 8; return offset + 2; }; - Buffer18.prototype.writeUint16BE = Buffer18.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { + Buffer19.prototype.writeUint16BE = Buffer19.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5537,7 +5537,7 @@ this[offset + 1] = value & 255; return offset + 2; }; - Buffer18.prototype.writeUint32LE = Buffer18.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { + Buffer19.prototype.writeUint32LE = Buffer19.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5548,7 +5548,7 @@ this[offset] = value & 255; return offset + 4; }; - Buffer18.prototype.writeUint32BE = Buffer18.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { + Buffer19.prototype.writeUint32BE = Buffer19.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5559,7 +5559,7 @@ this[offset + 3] = value & 255; return offset + 4; }; - Buffer18.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) { + Buffer19.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { @@ -5578,7 +5578,7 @@ } return offset + byteLength2; }; - Buffer18.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) { + Buffer19.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { @@ -5597,7 +5597,7 @@ } return offset + byteLength2; }; - Buffer18.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + Buffer19.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5607,7 +5607,7 @@ this[offset] = value & 255; return offset + 1; }; - Buffer18.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { + Buffer19.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5616,7 +5616,7 @@ this[offset + 1] = value >>> 8; return offset + 2; }; - Buffer18.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { + Buffer19.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5625,7 +5625,7 @@ this[offset + 1] = value & 255; return offset + 2; }; - Buffer18.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { + Buffer19.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5636,7 +5636,7 @@ this[offset + 3] = value >>> 24; return offset + 4; }; - Buffer18.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { + Buffer19.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) @@ -5664,10 +5664,10 @@ ieee7542.write(buf2, value, offset, littleEndian, 23, 4); return offset + 4; } - Buffer18.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { + Buffer19.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert); }; - Buffer18.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { + Buffer19.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert); }; function writeDouble(buf2, value, offset, littleEndian, noAssert) { @@ -5679,14 +5679,14 @@ ieee7542.write(buf2, value, offset, littleEndian, 52, 8); return offset + 8; } - Buffer18.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { + Buffer19.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert); }; - Buffer18.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { + Buffer19.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert); }; - Buffer18.prototype.copy = function copy(target, targetStart, start, end) { - if (!Buffer18.isBuffer(target)) + Buffer19.prototype.copy = function copy(target, targetStart, start, end) { + if (!Buffer19.isBuffer(target)) throw new TypeError("argument should be a Buffer"); if (!start) start = 0; @@ -5722,7 +5722,7 @@ } return len; }; - Buffer18.prototype.fill = function fill(val, start, end, encoding) { + Buffer19.prototype.fill = function fill(val, start, end, encoding) { if (typeof val === "string") { if (typeof start === "string") { encoding = start; @@ -5735,7 +5735,7 @@ if (encoding !== void 0 && typeof encoding !== "string") { throw new TypeError("encoding must be a string"); } - if (typeof encoding === "string" && !Buffer18.isEncoding(encoding)) { + if (typeof encoding === "string" && !Buffer19.isEncoding(encoding)) { throw new TypeError("Unknown encoding: " + encoding); } if (val.length === 1) { @@ -5765,7 +5765,7 @@ this[i] = val; } } else { - var bytes = Buffer18.isBuffer(val) ? val : Buffer18.from(val, encoding); + var bytes = Buffer19.isBuffer(val) ? val : Buffer19.from(val, encoding); var len = bytes.length; if (len === 0) { throw new TypeError('The value "' + val + '" is invalid for argument "value"'); @@ -9904,12 +9904,12 @@ return Constructor; } var _require = require_buffer(); - var Buffer18 = _require.Buffer; + var Buffer19 = _require.Buffer; var _require2 = require_util(); var inspect = _require2.inspect; var custom = inspect && inspect.custom || "inspect"; function copyBuffer(src, target, offset) { - Buffer18.prototype.copy.call(src, target, offset); + Buffer19.prototype.copy.call(src, target, offset); } module.exports = /* @__PURE__ */ function() { function BufferList() { @@ -9979,8 +9979,8 @@ key: "concat", value: function concat(n) { if (this.length === 0) - return Buffer18.alloc(0); - var ret = Buffer18.allocUnsafe(n >>> 0); + return Buffer19.alloc(0); + var ret = Buffer19.allocUnsafe(n >>> 0); var p = this.head; var i = 0; while (p) { @@ -10045,7 +10045,7 @@ }, { key: "_getBuffer", value: function _getBuffer(n) { - var ret = Buffer18.allocUnsafe(n); + var ret = Buffer19.allocUnsafe(n); var p = this.head; var c = 1; p.data.copy(ret); @@ -10416,14 +10416,14 @@ deprecate: require_browser() }; var Stream = require_stream_browser(); - var Buffer18 = require_buffer().Buffer; + var Buffer19 = require_buffer().Buffer; var OurUint8Array = window.Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { - return Buffer18.from(chunk); + return Buffer19.from(chunk); } function _isUint8Array(obj) { - return Buffer18.isBuffer(obj) || obj instanceof OurUint8Array; + return Buffer19.isBuffer(obj) || obj instanceof OurUint8Array; } var destroyImpl = require_destroy(); var _require = require_state(); @@ -10560,7 +10560,7 @@ var state = this._writableState; var ret = false; var isBuf = !state.objectMode && _isUint8Array(chunk); - if (isBuf && !Buffer18.isBuffer(chunk)) { + if (isBuf && !Buffer19.isBuffer(chunk)) { chunk = _uint8ArrayToBuffer(chunk); } if (typeof encoding === "function") { @@ -10608,7 +10608,7 @@ }); function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { - chunk = Buffer18.from(chunk, encoding); + chunk = Buffer19.from(chunk, encoding); } return chunk; } @@ -10981,34 +10981,34 @@ init_define_BUILD_VERSION(); init_esbuild_inject(); var buffer = require_buffer(); - var Buffer18 = buffer.Buffer; + var Buffer19 = buffer.Buffer; function copyProps(src, dst) { for (var key in src) { dst[key] = src[key]; } } - if (Buffer18.from && Buffer18.alloc && Buffer18.allocUnsafe && Buffer18.allocUnsafeSlow) { + if (Buffer19.from && Buffer19.alloc && Buffer19.allocUnsafe && Buffer19.allocUnsafeSlow) { module.exports = buffer; } else { copyProps(buffer, exports); exports.Buffer = SafeBuffer; } function SafeBuffer(arg, encodingOrOffset, length) { - return Buffer18(arg, encodingOrOffset, length); + return Buffer19(arg, encodingOrOffset, length); } - SafeBuffer.prototype = Object.create(Buffer18.prototype); - copyProps(Buffer18, SafeBuffer); + SafeBuffer.prototype = Object.create(Buffer19.prototype); + copyProps(Buffer19, SafeBuffer); SafeBuffer.from = function(arg, encodingOrOffset, length) { if (typeof arg === "number") { throw new TypeError("Argument must not be a number"); } - return Buffer18(arg, encodingOrOffset, length); + return Buffer19(arg, encodingOrOffset, length); }; SafeBuffer.alloc = function(size, fill, encoding) { if (typeof size !== "number") { throw new TypeError("Argument must be a number"); } - var buf2 = Buffer18(size); + var buf2 = Buffer19(size); if (fill !== void 0) { if (typeof encoding === "string") { buf2.fill(fill, encoding); @@ -11024,7 +11024,7 @@ if (typeof size !== "number") { throw new TypeError("Argument must be a number"); } - return Buffer18(size); + return Buffer19(size); }; SafeBuffer.allocUnsafeSlow = function(size) { if (typeof size !== "number") { @@ -11041,8 +11041,8 @@ "use strict"; init_define_BUILD_VERSION(); init_esbuild_inject(); - var Buffer18 = require_safe_buffer().Buffer; - var isEncoding = Buffer18.isEncoding || function(encoding) { + var Buffer19 = require_safe_buffer().Buffer; + var isEncoding = Buffer19.isEncoding || function(encoding) { encoding = "" + encoding; switch (encoding && encoding.toLowerCase()) { case "hex": @@ -11092,7 +11092,7 @@ } function normalizeEncoding(enc) { var nenc = _normalizeEncoding(enc); - if (typeof nenc !== "string" && (Buffer18.isEncoding === isEncoding || !isEncoding(enc))) + if (typeof nenc !== "string" && (Buffer19.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc); return nenc || enc; } @@ -11122,7 +11122,7 @@ } this.lastNeed = 0; this.lastTotal = 0; - this.lastChar = Buffer18.allocUnsafe(nb); + this.lastChar = Buffer19.allocUnsafe(nb); } StringDecoder.prototype.write = function(buf2) { if (buf2.length === 0) @@ -11595,14 +11595,14 @@ return emitter.listeners(type).length; }; var Stream = require_stream_browser(); - var Buffer18 = require_buffer().Buffer; + var Buffer19 = require_buffer().Buffer; var OurUint8Array = window.Uint8Array || function() { }; function _uint8ArrayToBuffer(chunk) { - return Buffer18.from(chunk); + return Buffer19.from(chunk); } function _isUint8Array(obj) { - return Buffer18.isBuffer(obj) || obj instanceof OurUint8Array; + return Buffer19.isBuffer(obj) || obj instanceof OurUint8Array; } var debugUtil = require_util(); var debug; @@ -11717,7 +11717,7 @@ if (typeof chunk === "string") { encoding = encoding || state.defaultEncoding; if (encoding !== state.encoding) { - chunk = Buffer18.from(chunk, encoding); + chunk = Buffer19.from(chunk, encoding); encoding = ""; } skipChunkCheck = true; @@ -11743,7 +11743,7 @@ if (er) { errorOrDestroy(stream, er); } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer18.prototype) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer19.prototype) { chunk = _uint8ArrayToBuffer(chunk); } if (addToFront) { @@ -12666,7 +12666,7 @@ // src/main.ts init_define_BUILD_VERSION(); init_esbuild_inject(); - var import_buffer10 = __toESM(require_buffer(), 1); + var import_buffer11 = __toESM(require_buffer(), 1); // src/stores.ts init_define_BUILD_VERSION(); @@ -14584,6 +14584,7 @@ // src/pomf.ts init_define_BUILD_VERSION(); init_esbuild_inject(); + var import_buffer8 = __toESM(require_buffer(), 1); var sources = [ { host: "Catbox", prefix: "files.catbox.moe/" }, { host: "Litter", prefix: "litter.catbox.moe/" }, @@ -14637,7 +14638,7 @@ filename: ext, data: csettings4.hotlink ? rsource : async (lsn) => { try { - return (await ifetch(rsource, void 0, lsn)).arrayBuffer(); + return import_buffer8.Buffer.from(await (await ifetch(rsource, void 0, lsn)).arrayBuffer()); } catch (e) { } }, @@ -19300,7 +19301,7 @@ var supportedMimeTypes = new Set(mimeTypes); // src/Components/Embedding.svelte - var import_buffer8 = __toESM(require_buffer(), 1); + var import_buffer9 = __toESM(require_buffer(), 1); function add_css10(target) { append_styles(target, "svelte-1uaoklw", ".place.svelte-1uaoklw.svelte-1uaoklw{cursor:pointer;max-width:100vw;max-height:100vh}.unzipping.svelte-1uaoklw>img.svelte-1uaoklw{filter:brightness(0.5) blur(10px)}.progress.svelte-1uaoklw.svelte-1uaoklw{color:black;-webkit-text-stroke:0.7px white;font-weight:bold;left:50%;top:50%;font-size:larger;display:inline-block;position:absolute;z-index:10}.hoverer.svelte-1uaoklw.svelte-1uaoklw{display:none;position:fixed;pointer-events:none}.visible.svelte-1uaoklw.svelte-1uaoklw{display:block;z-index:9}pre.svelte-1uaoklw.svelte-1uaoklw{padding:10px}.contract.svelte-1uaoklw pre.svelte-1uaoklw{max-width:20ch;text-overflow:ellipsis;overflow:hidden}.contract.svelte-1uaoklw img.svelte-1uaoklw,.contract.svelte-1uaoklw video.svelte-1uaoklw{max-width:125px !important;max-height:125px !important;width:auto;height:auto}.place.svelte-1uaoklw:not(.contract) video.svelte-1uaoklw,.place.svelte-1uaoklw:not(.contract) img.svelte-1uaoklw,.hoverer.svelte-1uaoklw>video.svelte-1uaoklw,.hoverer.svelte-1uaoklw>img.svelte-1uaoklw{max-width:100vw;max-height:100vh}"); } @@ -19897,7 +19898,7 @@ const thumb = file.thumbnail || file.data; let type; if (typeof thumb != "string") { - let buff = import_buffer8.Buffer.isBuffer(thumb) ? thumb : await thumb(); + let buff = import_buffer9.Buffer.isBuffer(thumb) ? thumb : await thumb(); type = await fileTypeFromBuffer(buff); if (!type && file.filename.endsWith(".txt") && file.filename.startsWith("message")) { type = { ext: "txt", mime: "text/plain" }; @@ -19960,7 +19961,7 @@ lisn.addEventListener("progress", (e) => { $$invalidate(19, progress = e.detail); }); - let full = import_buffer8.Buffer.isBuffer(file.data) ? file.data : await file.data(lisn); + let full = import_buffer9.Buffer.isBuffer(file.data) ? file.data : await file.data(lisn); type = await fileTypeFromBuffer(full); if (!type && file.filename.endsWith(".txt") && file.filename.startsWith("message")) { type = { ext: "txt", mime: "text/plain" }; @@ -20416,7 +20417,7 @@ // src/Components/EyeButton.svelte init_define_BUILD_VERSION(); init_esbuild_inject(); - var import_buffer9 = __toESM(require_buffer(), 1); + var import_buffer10 = __toESM(require_buffer(), 1); function add_css11(target) { append_styles(target, "svelte-64lw6s", ".clickable.svelte-64lw6s{cursor:pointer;margin-left:5px}.clickable.svelte-64lw6s:hover{text-shadow:0 0 4px palevioletred}"); } @@ -20750,7 +20751,7 @@ a.style.display = "none"; let url; if (typeof file.data != "string") { - const thumb = import_buffer9.Buffer.isBuffer(file.data) ? file.data : await file.data(); + const thumb = import_buffer10.Buffer.isBuffer(file.data) ? file.data : await file.data(); const type = await fileTypeFromBuffer(thumb); url = URL.createObjectURL(new Blob([thumb], { type: type?.mime })); } else @@ -21022,7 +21023,7 @@ var processImage = async (src, fn, hex, prevurl, onfound) => { return Promise.all(processors.filter((e) => e.match(fn)).map(async (proc) => { if (proc.skip) { - const md5 = import_buffer10.Buffer.from(hex, "base64"); + const md5 = import_buffer11.Buffer.from(hex, "base64"); if (await proc.has_embed(md5, fn, prevurl) === true) { onfound(); return [await proc.extract(md5, fn), true]; @@ -21032,7 +21033,7 @@ const iter = streamRemote(src); if (!iter) return; - let cumul = import_buffer10.Buffer.alloc(0); + let cumul = import_buffer11.Buffer.alloc(0); let found; let chunk = { done: true }; do { @@ -21043,7 +21044,7 @@ chunk = { done: false, value }; } if (!done) - cumul = import_buffer10.Buffer.concat([cumul, value]); + cumul = import_buffer11.Buffer.concat([cumul, value]); found = await proc.has_embed(cumul); } while (found !== false && !chunk.done); await iter.next(true); @@ -21109,13 +21110,13 @@ const processFile = (src, fn, hex) => { return Promise.all(processors.filter((e) => e.match(fn)).map(async (proc) => { if (proc.skip) { - const md5 = import_buffer10.Buffer.from(hex, "base64"); + const md5 = import_buffer11.Buffer.from(hex, "base64"); return await proc.has_embed(md5, fn); } const iter = streamRemote(src); if (!iter) return false; - let cumul = import_buffer10.Buffer.alloc(0); + let cumul = import_buffer11.Buffer.alloc(0); let found; let chunk = { done: true }; do { @@ -21126,7 +21127,7 @@ chunk = { done: false, value }; } if (!done) - cumul = import_buffer10.Buffer.concat([cumul, value]); + cumul = import_buffer11.Buffer.concat([cumul, value]); found = await proc.has_embed(cumul); } while (found !== false && !chunk.done); await iter.next(true); diff --git a/src/pomf.ts b/src/pomf.ts index 267c4aa..34da848 100644 --- a/src/pomf.ts +++ b/src/pomf.ts @@ -69,7 +69,7 @@ const extract = async (b: Buffer, fn?: string) => { //404 } }, - thumbnail + thumbnail: Buffer.from(thumbnail) } as EmbeddedFile]; };