xframelib
Version:
The accumulated front-end development foundation library originates from projects and serves projects.
1,204 lines • 431 kB
JavaScript
var e = Object.create, t = Object.defineProperty, r = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, i = Object.getPrototypeOf, o = Object.prototype.hasOwnProperty, s = (e, t, r) => () => {
if (r) throw r[0];
try {
return e && (t = e(e = 0)), t;
} catch (e) {
throw r = [e], e;
}
}, a = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), c = (e, r) => {
let n = {};
for (var i in e) t(n, i, {
get: e[i],
enumerable: !0
});
return r || t(n, Symbol.toStringTag, { value: "Module" }), n;
}, f = (e, i, s, a) => {
if (i && "object" == typeof i || "function" == typeof i) for (var c, f = n(i), u = 0, h = f.length; u < h; u++) c = f[u], o.call(e, c) || c === s || t(e, c, {
get: ((e) => i[e]).bind(null, c),
enumerable: !(a = r(i, c)) || a.enumerable
});
return e;
}, u = (e) => o.call(e, "module.exports") ? e["module.exports"] : f(t({}, "__esModule", { value: !0 }), e);
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/ const h = Symbol("Comlink.proxy"), l = Symbol("Comlink.endpoint"), d = Symbol("Comlink.releaseProxy"), p = Symbol("Comlink.finalizer"), b = Symbol("Comlink.thrown"), g = (e) => "object" == typeof e && null !== e || "function" == typeof e, y = /* @__PURE__ */ new Map([["proxy", {
canHandle: (e) => g(e) && e[h],
serialize(e) {
const { port1: t, port2: r } = new MessageChannel();
return w(e, t), [r, [r]];
},
deserialize: (e) => (e.start(), function(e) {
const t = /* @__PURE__ */ new Map();
return e.addEventListener("message", function(e) {
const { data: r } = e;
if (!r || !r.id) return;
const n = t.get(r.id);
if (n) try {
n(r);
} finally {
t.delete(r.id);
}
}), B(e, t, [], void 0);
}(e))
}], ["throw", {
canHandle: (e) => g(e) && b in e,
serialize({ value: e }) {
let t;
return t = e instanceof Error ? {
isError: !0,
value: {
message: e.message,
name: e.name,
stack: e.stack
}
} : {
isError: !1,
value: e
}, [t, []];
},
deserialize(e) {
if (e.isError) throw Object.assign(new Error(e.value.message), e.value);
throw e.value;
}
}]]);
function w(e, t = globalThis, r = ["*"]) {
t.addEventListener("message", function n(i) {
if (!i || !i.data) return;
if (!function(e, t) {
for (const r of e) {
if (t === r || "*" === r) return !0;
if (r instanceof RegExp && r.test(t)) return !0;
}
return !1;
}(r, i.origin)) return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);
const { id: o, type: s, path: a } = Object.assign({ path: [] }, i.data), c = (i.data.argumentList || []).map(L);
let f;
try {
const t = a.slice(0, -1).reduce((e, t) => e[t], e), r = a.reduce((e, t) => e[t], e);
switch (s) {
case "GET":
f = r;
break;
case "SET":
t[a.slice(-1)[0]] = L(i.data.value), f = !0;
break;
case "APPLY":
f = r.apply(t, c);
break;
case "CONSTRUCT":
f = function(e) {
return Object.assign(e, { [h]: !0 });
}(new r(...c));
break;
case "ENDPOINT":
{
const { port1: t, port2: r } = new MessageChannel();
w(e, r), f = function(e, t) {
return T.set(e, t), e;
}(t, [t]);
}
break;
case "RELEASE":
f = void 0;
break;
default: return;
}
} catch (e) {
f = {
value: e,
[b]: 0
};
}
Promise.resolve(f).catch((e) => ({
value: e,
[b]: 0
})).then((r) => {
const [i, a] = A(r);
t.postMessage(Object.assign(Object.assign({}, i), { id: o }), a), "RELEASE" === s && (t.removeEventListener("message", n), v(t), p in e && "function" == typeof e[p] && e[p]());
}).catch((e) => {
const [r, n] = A({
value: /* @__PURE__ */ new TypeError("Unserializable return value"),
[b]: 0
});
t.postMessage(Object.assign(Object.assign({}, r), { id: o }), n);
});
}), t.start && t.start();
}
function v(e) {
(function(e) {
return "MessagePort" === e.constructor.name;
})(e) && e.close();
}
function m(e) {
if (e) throw new Error("Proxy has been released and is not useable");
}
function E(e) {
return O(e, /* @__PURE__ */ new Map(), { type: "RELEASE" }).then(() => {
v(e);
});
}
const _ = /* @__PURE__ */ new WeakMap(), S = "FinalizationRegistry" in globalThis && new FinalizationRegistry((e) => {
const t = (_.get(e) || 0) - 1;
_.set(e, t), 0 === t && E(e);
});
function B(e, t, r = [], n = function() {}) {
let i = !1;
const o = new Proxy(n, {
get(n, s) {
if (m(i), s === d) return () => {
(function(e) {
S && S.unregister(e);
})(o), E(e), t.clear(), i = !0;
};
if ("then" === s) {
if (0 === r.length) return { then: () => o };
const n = O(e, t, {
type: "GET",
path: r.map((e) => e.toString())
}).then(L);
return n.then.bind(n);
}
return B(e, t, [...r, s]);
},
set(n, o, s) {
m(i);
const [a, c] = A(s);
return O(e, t, {
type: "SET",
path: [...r, o].map((e) => e.toString()),
value: a
}, c).then(L);
},
apply(n, o, s) {
m(i);
const a = r[r.length - 1];
if (a === l) return O(e, t, { type: "ENDPOINT" }).then(L);
if ("bind" === a) return B(e, t, r.slice(0, -1));
const [c, f] = R(s);
return O(e, t, {
type: "APPLY",
path: r.map((e) => e.toString()),
argumentList: c
}, f).then(L);
},
construct(n, o) {
m(i);
const [s, a] = R(o);
return O(e, t, {
type: "CONSTRUCT",
path: r.map((e) => e.toString()),
argumentList: s
}, a).then(L);
}
});
return function(e, t) {
const r = (_.get(t) || 0) + 1;
_.set(t, r), S && S.register(e, t, e);
}(o, e), o;
}
function R(e) {
const t = e.map(A);
return [t.map((e) => e[0]), (r = t.map((e) => e[1]), Array.prototype.concat.apply([], r))];
var r;
}
const T = /* @__PURE__ */ new WeakMap();
function A(e) {
for (const [t, r] of y) if (r.canHandle(e)) {
const [n, i] = r.serialize(e);
return [{
type: "HANDLER",
name: t,
value: n
}, i];
}
return [{
type: "RAW",
value: e
}, T.get(e) || []];
}
function L(e) {
switch (e.type) {
case "HANDLER": return y.get(e.name).deserialize(e.value);
case "RAW": return e.value;
}
}
function O(e, t, r, n) {
return new Promise((i) => {
const o = new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
t.set(o, i), e.start && e.start(), e.postMessage(Object.assign({ id: o }, r), n);
});
}
for (var I, x, k, C, M, U, j, N, P, D, F = a((e) => {
Object.defineProperties(e, {
__esModule: { value: !0 },
[Symbol.toStringTag]: { value: "Module" }
});
for (var t = {}, r = {
byteLength: function(e) {
var t = c(e), r = t[0], n = t[1];
return 3 * (r + n) / 4 - n;
},
toByteArray: function(e) {
var t, r, n = c(e), s = n[0], a = n[1], f = new o(function(e, t, r) {
return 3 * (t + r) / 4 - r;
}(0, s, a)), u = 0, h = a > 0 ? s - 4 : s;
for (r = 0; r < h; r += 4) t = i[e.charCodeAt(r)] << 18 | i[e.charCodeAt(r + 1)] << 12 | i[e.charCodeAt(r + 2)] << 6 | i[e.charCodeAt(r + 3)], f[u++] = t >> 16 & 255, f[u++] = t >> 8 & 255, f[u++] = 255 & t;
return 2 === a && (t = i[e.charCodeAt(r)] << 2 | i[e.charCodeAt(r + 1)] >> 4, f[u++] = 255 & t), 1 === a && (t = i[e.charCodeAt(r)] << 10 | i[e.charCodeAt(r + 1)] << 4 | i[e.charCodeAt(r + 2)] >> 2, f[u++] = t >> 8 & 255, f[u++] = 255 & t), f;
},
fromByteArray: function(e) {
for (var t, r = e.length, i = r % 3, o = [], s = 16383, a = 0, c = r - i; a < c; a += s) o.push(u(e, a, a + s > c ? c : a + s));
return 1 === i ? (t = e[r - 1], o.push(n[t >> 2] + n[t << 4 & 63] + "==")) : 2 === i && (t = (e[r - 2] << 8) + e[r - 1], o.push(n[t >> 10] + n[t >> 4 & 63] + n[t << 2 & 63] + "=")), o.join("");
}
}, n = [], i = [], o = "undefined" != typeof Uint8Array ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0; a < 64; ++a) n[a] = s[a], i[s.charCodeAt(a)] = a;
function c(e) {
var t = e.length;
if (t % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
var r = e.indexOf("=");
return -1 === r && (r = t), [r, r === t ? 0 : 4 - r % 4];
}
function f(e) {
return n[e >> 18 & 63] + n[e >> 12 & 63] + n[e >> 6 & 63] + n[63 & e];
}
function u(e, t, r) {
for (var n, i = [], o = t; o < r; o += 3) n = (e[o] << 16 & 16711680) + (e[o + 1] << 8 & 65280) + (255 & e[o + 2]), i.push(f(n));
return i.join("");
}
i["-".charCodeAt(0)] = 62, i["_".charCodeAt(0)] = 63;
var h = {
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
read: function(e, t, r, n, i) {
var o, s, a = 8 * i - n - 1, c = (1 << a) - 1, f = c >> 1, u = -7, h = r ? i - 1 : 0, l = r ? -1 : 1, d = e[t + h];
for (h += l, o = d & (1 << -u) - 1, d >>= -u, u += a; u > 0; o = 256 * o + e[t + h], h += l, u -= 8);
for (s = o & (1 << -u) - 1, o >>= -u, u += n; u > 0; s = 256 * s + e[t + h], h += l, u -= 8);
if (0 === o) o = 1 - f;
else {
if (o === c) return s ? NaN : Infinity * (d ? -1 : 1);
s += Math.pow(2, n), o -= f;
}
return (d ? -1 : 1) * s * Math.pow(2, o - n);
},
write: function(e, t, r, n, i, o) {
var s, a, c, f = 8 * o - i - 1, u = (1 << f) - 1, h = u >> 1, l = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, d = n ? 0 : o - 1, p = n ? 1 : -1, b = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
for (t = Math.abs(t), isNaN(t) || t === Infinity ? (a = isNaN(t) ? 1 : 0, s = u) : (s = Math.floor(Math.log(t) / Math.LN2), t * (c = Math.pow(2, -s)) < 1 && (s--, c *= 2), (t += s + h >= 1 ? l / c : l * Math.pow(2, 1 - h)) * c >= 2 && (s++, c /= 2), s + h >= u ? (a = 0, s = u) : s + h >= 1 ? (a = (t * c - 1) * Math.pow(2, i), s += h) : (a = t * Math.pow(2, h - 1) * Math.pow(2, i), s = 0)); i >= 8; e[r + d] = 255 & a, d += p, a /= 256, i -= 8);
for (s = s << i | a, f += i; f > 0; e[r + d] = 255 & s, d += p, s /= 256, f -= 8);
e[r + d - p] |= 128 * b;
}
};
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/ (function(e) {
const t = r, n = h, i = "function" == typeof Symbol && "function" == typeof Symbol.for ? Symbol.for("nodejs.util.inspect.custom") : null;
e.Buffer = u, e.SlowBuffer = function(e) {
return +e != e && (e = 0), u.alloc(+e);
}, e.INSPECT_MAX_BYTES = 50;
const o = 2147483647;
e.kMaxLength = o;
const { Uint8Array: s, ArrayBuffer: a, SharedArrayBuffer: c } = globalThis;
function f(e) {
if (e > o) throw new RangeError("The value \"" + e + "\" is invalid for option \"size\"");
const t = new s(e);
return Object.setPrototypeOf(t, u.prototype), t;
}
function u(e, t, r) {
if ("number" == typeof e) {
if ("string" == typeof t) throw new TypeError("The \"string\" argument must be of type string. Received type number");
return p(e);
}
return l(e, t, r);
}
function l(e, t, r) {
if ("string" == typeof e) return function(e, t) {
if ("string" == typeof t && "" !== t || (t = "utf8"), !u.isEncoding(t)) throw new TypeError("Unknown encoding: " + t);
const r = 0 | w(e, t);
let n = f(r);
const i = n.write(e, t);
return i !== r && (n = n.slice(0, i)), n;
}(e, t);
if (a.isView(e)) return function(e) {
if (Z(e, s)) {
const t = new s(e);
return g(t.buffer, t.byteOffset, t.byteLength);
}
return b(e);
}(e);
if (null == e) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
if (Z(e, a) || e && Z(e.buffer, a)) return g(e, t, r);
if (void 0 !== c && (Z(e, c) || e && Z(e.buffer, c))) return g(e, t, r);
if ("number" == typeof e) throw new TypeError("The \"value\" argument must not be of type number. Received type number");
const n = e.valueOf && e.valueOf();
if (null != n && n !== e) return u.from(n, t, r);
const i = function(e) {
if (u.isBuffer(e)) {
const t = 0 | y(e.length), r = f(t);
return 0 === r.length || e.copy(r, 0, 0, t), r;
}
return void 0 !== e.length ? "number" != typeof e.length || Q(e.length) ? f(0) : b(e) : "Buffer" === e.type && Array.isArray(e.data) ? b(e.data) : void 0;
}(e);
if (i) return i;
if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e[Symbol.toPrimitive]) return u.from(e[Symbol.toPrimitive]("string"), t, r);
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
}
function d(e) {
if ("number" != typeof e) throw new TypeError("\"size\" argument must be of type number");
if (e < 0) throw new RangeError("The value \"" + e + "\" is invalid for option \"size\"");
}
function p(e) {
return d(e), f(e < 0 ? 0 : 0 | y(e));
}
function b(e) {
const t = e.length < 0 ? 0 : 0 | y(e.length), r = f(t);
for (let n = 0; n < t; n += 1) r[n] = 255 & e[n];
return r;
}
function g(e, t, r) {
if (t < 0 || e.byteLength < t) throw new RangeError("\"offset\" is outside of buffer bounds");
if (e.byteLength < t + (r || 0)) throw new RangeError("\"length\" is outside of buffer bounds");
let n;
return n = void 0 === t && void 0 === r ? new s(e) : void 0 === r ? new s(e, t) : new s(e, t, r), Object.setPrototypeOf(n, u.prototype), n;
}
function y(e) {
if (e >= o) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + o.toString(16) + " bytes");
return 0 | e;
}
function w(e, t) {
if (u.isBuffer(e)) return e.length;
if (a.isView(e) || Z(e, a)) return e.byteLength;
if ("string" != typeof e) throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof e);
const r = e.length, n = arguments.length > 2 && !0 === arguments[2];
if (!n && 0 === r) return 0;
let i = !1;
for (;;) switch (t) {
case "ascii":
case "latin1":
case "binary": return r;
case "utf8":
case "utf-8": return X(e).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le": return 2 * r;
case "hex": return r >>> 1;
case "base64": return J(e).length;
default:
if (i) return n ? -1 : X(e).length;
t = ("" + t).toLowerCase(), i = !0;
}
}
function v(e, t, r) {
let n = !1;
if ((void 0 === t || t < 0) && (t = 0), t > this.length) return "";
if ((void 0 === r || r > this.length) && (r = this.length), r <= 0) return "";
if ((r >>>= 0) <= (t >>>= 0)) return "";
for (e || (e = "utf8");;) switch (e) {
case "hex": return C(this, t, r);
case "utf8":
case "utf-8": return O(this, t, r);
case "ascii": return x(this, t, r);
case "latin1":
case "binary": return k(this, t, r);
case "base64": return L(this, t, r);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le": return M(this, t, r);
default:
if (n) throw new TypeError("Unknown encoding: " + e);
e = (e + "").toLowerCase(), n = !0;
}
}
function m(e, t, r) {
const n = e[t];
e[t] = e[r], e[r] = n;
}
function E(e, t, r, n, i) {
if (0 === e.length) return -1;
if ("string" == typeof r ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), Q(r = +r) && (r = i ? 0 : e.length - 1), r < 0 && (r = e.length + r), r >= e.length) {
if (i) return -1;
r = e.length - 1;
} else if (r < 0) {
if (!i) return -1;
r = 0;
}
if ("string" == typeof t && (t = u.from(t, n)), u.isBuffer(t)) return 0 === t.length ? -1 : _(e, t, r, n, i);
if ("number" == typeof t) return t &= 255, "function" == typeof s.prototype.indexOf ? i ? s.prototype.indexOf.call(e, t, r) : s.prototype.lastIndexOf.call(e, t, r) : _(e, [t], r, n, i);
throw new TypeError("val must be string, number or Buffer");
}
function _(e, t, r, n, i) {
let o, s = 1, a = e.length, c = t.length;
if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) {
if (e.length < 2 || t.length < 2) return -1;
s = 2, a /= 2, c /= 2, r /= 2;
}
function f(e, t) {
return 1 === s ? e[t] : e.readUInt16BE(t * s);
}
if (i) {
let n = -1;
for (o = r; o < a; o++) if (f(e, o) === f(t, -1 === n ? 0 : o - n)) {
if (-1 === n && (n = o), o - n + 1 === c) return n * s;
} else -1 !== n && (o -= o - n), n = -1;
} else for (r + c > a && (r = a - c), o = r; o >= 0; o--) {
let r = !0;
for (let n = 0; n < c; n++) if (f(e, o + n) !== f(t, n)) {
r = !1;
break;
}
if (r) return o;
}
return -1;
}
function S(e, t, r, n) {
r = Number(r) || 0;
const i = e.length - r;
n ? (n = Number(n)) > i && (n = i) : n = i;
const o = t.length;
let s;
for (n > o / 2 && (n = o / 2), s = 0; s < n; ++s) {
const n = parseInt(t.substr(2 * s, 2), 16);
if (Q(n)) return s;
e[r + s] = n;
}
return s;
}
function B(e, t, r, n) {
return K(X(t, e.length - r), e, r, n);
}
function R(e, t, r, n) {
return K(function(e) {
const t = [];
for (let r = 0; r < e.length; ++r) t.push(255 & e.charCodeAt(r));
return t;
}(t), e, r, n);
}
function T(e, t, r, n) {
return K(J(t), e, r, n);
}
function A(e, t, r, n) {
return K(function(e, t) {
let r, n, i;
const o = [];
for (let s = 0; s < e.length && !((t -= 2) < 0); ++s) r = e.charCodeAt(s), n = r >> 8, i = r % 256, o.push(i), o.push(n);
return o;
}(t, e.length - r), e, r, n);
}
function L(e, r, n) {
return 0 === r && n === e.length ? t.fromByteArray(e) : t.fromByteArray(e.slice(r, n));
}
function O(e, t, r) {
r = Math.min(e.length, r);
const n = [];
let i = t;
for (; i < r;) {
const t = e[i];
let o = null, s = t > 239 ? 4 : t > 223 ? 3 : t > 191 ? 2 : 1;
if (i + s <= r) {
let r, n, a, c;
switch (s) {
case 1:
t < 128 && (o = t);
break;
case 2:
r = e[i + 1], 128 == (192 & r) && (c = (31 & t) << 6 | 63 & r, c > 127 && (o = c));
break;
case 3:
r = e[i + 1], n = e[i + 2], 128 == (192 & r) && 128 == (192 & n) && (c = (15 & t) << 12 | (63 & r) << 6 | 63 & n, c > 2047 && (c < 55296 || c > 57343) && (o = c));
break;
case 4: r = e[i + 1], n = e[i + 2], a = e[i + 3], 128 == (192 & r) && 128 == (192 & n) && 128 == (192 & a) && (c = (15 & t) << 18 | (63 & r) << 12 | (63 & n) << 6 | 63 & a, c > 65535 && c < 1114112 && (o = c));
}
}
null === o ? (o = 65533, s = 1) : o > 65535 && (o -= 65536, n.push(o >>> 10 & 1023 | 55296), o = 56320 | 1023 & o), n.push(o), i += s;
}
return function(e) {
const t = e.length;
if (t <= I) return String.fromCharCode.apply(String, e);
let r = "", n = 0;
for (; n < t;) r += String.fromCharCode.apply(String, e.slice(n, n += I));
return r;
}(n);
}
u.TYPED_ARRAY_SUPPORT = function() {
try {
const e = new s(1), t = { foo: function() {
return 42;
} };
return Object.setPrototypeOf(t, s.prototype), Object.setPrototypeOf(e, t), 42 === e.foo();
} catch (e) {
return !1;
}
}(), u.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || 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."), Object.defineProperty(u.prototype, "parent", {
enumerable: !0,
get: function() {
if (u.isBuffer(this)) return this.buffer;
}
}), Object.defineProperty(u.prototype, "offset", {
enumerable: !0,
get: function() {
if (u.isBuffer(this)) return this.byteOffset;
}
}), u.poolSize = 8192, u.from = function(e, t, r) {
return l(e, t, r);
}, Object.setPrototypeOf(u.prototype, s.prototype), Object.setPrototypeOf(u, s), u.alloc = function(e, t, r) {
return function(e, t, r) {
return d(e), e <= 0 ? f(e) : void 0 !== t ? "string" == typeof r ? f(e).fill(t, r) : f(e).fill(t) : f(e);
}(e, t, r);
}, u.allocUnsafe = function(e) {
return p(e);
}, u.allocUnsafeSlow = function(e) {
return p(e);
}, u.isBuffer = function(e) {
return null != e && !0 === e._isBuffer && e !== u.prototype;
}, u.compare = function(e, t) {
if (Z(e, s) && (e = u.from(e, e.offset, e.byteLength)), Z(t, s) && (t = u.from(t, t.offset, t.byteLength)), !u.isBuffer(e) || !u.isBuffer(t)) throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
if (e === t) return 0;
let r = e.length, n = t.length;
for (let i = 0, o = Math.min(r, n); i < o; ++i) if (e[i] !== t[i]) {
r = e[i], n = t[i];
break;
}
return r < n ? -1 : n < r ? 1 : 0;
}, u.isEncoding = function(e) {
switch (String(e).toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le": return !0;
default: return !1;
}
}, u.concat = function(e, t) {
if (!Array.isArray(e)) throw new TypeError("\"list\" argument must be an Array of Buffers");
if (0 === e.length) return u.alloc(0);
let r;
if (void 0 === t) for (t = 0, r = 0; r < e.length; ++r) t += e[r].length;
const n = u.allocUnsafe(t);
let i = 0;
for (r = 0; r < e.length; ++r) {
let t = e[r];
if (Z(t, s)) i + t.length > n.length ? (u.isBuffer(t) || (t = u.from(t)), t.copy(n, i)) : s.prototype.set.call(n, t, i);
else {
if (!u.isBuffer(t)) throw new TypeError("\"list\" argument must be an Array of Buffers");
t.copy(n, i);
}
i += t.length;
}
return n;
}, u.byteLength = w, u.prototype._isBuffer = !0, u.prototype.swap16 = function() {
const e = this.length;
if (e % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
for (let t = 0; t < e; t += 2) m(this, t, t + 1);
return this;
}, u.prototype.swap32 = function() {
const e = this.length;
if (e % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
for (let t = 0; t < e; t += 4) m(this, t, t + 3), m(this, t + 1, t + 2);
return this;
}, u.prototype.swap64 = function() {
const e = this.length;
if (e % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
for (let t = 0; t < e; t += 8) m(this, t, t + 7), m(this, t + 1, t + 6), m(this, t + 2, t + 5), m(this, t + 3, t + 4);
return this;
}, u.prototype.toString = function() {
const e = this.length;
return 0 === e ? "" : 0 === arguments.length ? O(this, 0, e) : v.apply(this, arguments);
}, u.prototype.toLocaleString = u.prototype.toString, u.prototype.equals = function(e) {
if (!u.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
return this === e || 0 === u.compare(this, e);
}, u.prototype.inspect = function() {
let t = "";
const r = e.INSPECT_MAX_BYTES;
return t = this.toString("hex", 0, r).replace(/(.{2})/g, "$1 ").trim(), this.length > r && (t += " ... "), "<Buffer " + t + ">";
}, i && (u.prototype[i] = u.prototype.inspect), u.prototype.compare = function(e, t, r, n, i) {
if (Z(e, s) && (e = u.from(e, e.offset, e.byteLength)), !u.isBuffer(e)) throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
if (void 0 === t && (t = 0), void 0 === r && (r = e ? e.length : 0), void 0 === n && (n = 0), void 0 === i && (i = this.length), t < 0 || r > e.length || n < 0 || i > this.length) throw new RangeError("out of range index");
if (n >= i && t >= r) return 0;
if (n >= i) return -1;
if (t >= r) return 1;
if (this === e) return 0;
let o = (i >>>= 0) - (n >>>= 0), a = (r >>>= 0) - (t >>>= 0);
const c = Math.min(o, a), f = this.slice(n, i), h = e.slice(t, r);
for (let s = 0; s < c; ++s) if (f[s] !== h[s]) {
o = f[s], a = h[s];
break;
}
return o < a ? -1 : a < o ? 1 : 0;
}, u.prototype.includes = function(e, t, r) {
return -1 !== this.indexOf(e, t, r);
}, u.prototype.indexOf = function(e, t, r) {
return E(this, e, t, r, !0);
}, u.prototype.lastIndexOf = function(e, t, r) {
return E(this, e, t, r, !1);
}, u.prototype.write = function(e, t, r, n) {
if (void 0 === t) n = "utf8", r = this.length, t = 0;
else if (void 0 === r && "string" == typeof t) n = t, r = this.length, t = 0;
else {
if (!isFinite(t)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
t >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = "utf8")) : (n = r, r = void 0);
}
const i = this.length - t;
if ((void 0 === r || r > i) && (r = i), e.length > 0 && (r < 0 || t < 0) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds");
n || (n = "utf8");
let o = !1;
for (;;) switch (n) {
case "hex": return S(this, e, t, r);
case "utf8":
case "utf-8": return B(this, e, t, r);
case "ascii":
case "latin1":
case "binary": return R(this, e, t, r);
case "base64": return T(this, e, t, r);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le": return A(this, e, t, r);
default:
if (o) throw new TypeError("Unknown encoding: " + n);
n = ("" + n).toLowerCase(), o = !0;
}
}, u.prototype.toJSON = function() {
return {
type: "Buffer",
data: Array.prototype.slice.call(this._arr || this, 0)
};
};
const I = 4096;
function x(e, t, r) {
let n = "";
r = Math.min(e.length, r);
for (let i = t; i < r; ++i) n += String.fromCharCode(127 & e[i]);
return n;
}
function k(e, t, r) {
let n = "";
r = Math.min(e.length, r);
for (let i = t; i < r; ++i) n += String.fromCharCode(e[i]);
return n;
}
function C(e, t, r) {
const n = e.length;
(!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n);
let i = "";
for (let o = t; o < r; ++o) i += ee[e[o]];
return i;
}
function M(e, t, r) {
const n = e.slice(t, r);
let i = "";
for (let o = 0; o < n.length - 1; o += 2) i += String.fromCharCode(n[o] + 256 * n[o + 1]);
return i;
}
function U(e, t, r) {
if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");
if (e + t > r) throw new RangeError("Trying to access beyond buffer length");
}
function j(e, t, r, n, i, o) {
if (!u.isBuffer(e)) throw new TypeError("\"buffer\" argument must be a Buffer instance");
if (t > i || t < o) throw new RangeError("\"value\" argument is out of bounds");
if (r + n > e.length) throw new RangeError("Index out of range");
}
function N(e, t, r, n, i) {
H(t, n, i, e, r, 7);
let o = Number(t & BigInt(4294967295));
e[r++] = o, o >>= 8, e[r++] = o, o >>= 8, e[r++] = o, o >>= 8, e[r++] = o;
let s = Number(t >> BigInt(32) & BigInt(4294967295));
return e[r++] = s, s >>= 8, e[r++] = s, s >>= 8, e[r++] = s, s >>= 8, e[r++] = s, r;
}
function P(e, t, r, n, i) {
H(t, n, i, e, r, 7);
let o = Number(t & BigInt(4294967295));
e[r + 7] = o, o >>= 8, e[r + 6] = o, o >>= 8, e[r + 5] = o, o >>= 8, e[r + 4] = o;
let s = Number(t >> BigInt(32) & BigInt(4294967295));
return e[r + 3] = s, s >>= 8, e[r + 2] = s, s >>= 8, e[r + 1] = s, s >>= 8, e[r] = s, r + 8;
}
function D(e, t, r, n, i, o) {
if (r + n > e.length) throw new RangeError("Index out of range");
if (r < 0) throw new RangeError("Index out of range");
}
function F(e, t, r, i, o) {
return t = +t, r >>>= 0, o || D(e, 0, r, 4), n.write(e, t, r, i, 23, 4), r + 4;
}
function $(e, t, r, i, o) {
return t = +t, r >>>= 0, o || D(e, 0, r, 8), n.write(e, t, r, i, 52, 8), r + 8;
}
u.prototype.slice = function(e, t) {
const r = this.length;
(e = ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), (t = void 0 === t ? r : ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), t < e && (t = e);
const n = this.subarray(e, t);
return Object.setPrototypeOf(n, u.prototype), n;
}, u.prototype.readUintLE = u.prototype.readUIntLE = function(e, t, r) {
e >>>= 0, t >>>= 0, r || U(e, t, this.length);
let n = this[e], i = 1, o = 0;
for (; ++o < t && (i *= 256);) n += this[e + o] * i;
return n;
}, u.prototype.readUintBE = u.prototype.readUIntBE = function(e, t, r) {
e >>>= 0, t >>>= 0, r || U(e, t, this.length);
let n = this[e + --t], i = 1;
for (; t > 0 && (i *= 256);) n += this[e + --t] * i;
return n;
}, u.prototype.readUint8 = u.prototype.readUInt8 = function(e, t) {
return e >>>= 0, t || U(e, 1, this.length), this[e];
}, u.prototype.readUint16LE = u.prototype.readUInt16LE = function(e, t) {
return e >>>= 0, t || U(e, 2, this.length), this[e] | this[e + 1] << 8;
}, u.prototype.readUint16BE = u.prototype.readUInt16BE = function(e, t) {
return e >>>= 0, t || U(e, 2, this.length), this[e] << 8 | this[e + 1];
}, u.prototype.readUint32LE = u.prototype.readUInt32LE = function(e, t) {
return e >>>= 0, t || U(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3];
}, u.prototype.readUint32BE = u.prototype.readUInt32BE = function(e, t) {
return e >>>= 0, t || U(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
}, u.prototype.readBigUInt64LE = te(function(e) {
G(e >>>= 0, "offset");
const t = this[e], r = this[e + 7];
void 0 !== t && void 0 !== r || Y(e, this.length - 8);
const n = t + 256 * this[++e] + 65536 * this[++e] + this[++e] * 2 ** 24, i = this[++e] + 256 * this[++e] + 65536 * this[++e] + r * 2 ** 24;
return BigInt(n) + (BigInt(i) << BigInt(32));
}), u.prototype.readBigUInt64BE = te(function(e) {
G(e >>>= 0, "offset");
const t = this[e], r = this[e + 7];
void 0 !== t && void 0 !== r || Y(e, this.length - 8);
const n = t * 2 ** 24 + 65536 * this[++e] + 256 * this[++e] + this[++e], i = this[++e] * 2 ** 24 + 65536 * this[++e] + 256 * this[++e] + r;
return (BigInt(n) << BigInt(32)) + BigInt(i);
}), u.prototype.readIntLE = function(e, t, r) {
e >>>= 0, t >>>= 0, r || U(e, t, this.length);
let n = this[e], i = 1, o = 0;
for (; ++o < t && (i *= 256);) n += this[e + o] * i;
return i *= 128, n >= i && (n -= Math.pow(2, 8 * t)), n;
}, u.prototype.readIntBE = function(e, t, r) {
e >>>= 0, t >>>= 0, r || U(e, t, this.length);
let n = t, i = 1, o = this[e + --n];
for (; n > 0 && (i *= 256);) o += this[e + --n] * i;
return i *= 128, o >= i && (o -= Math.pow(2, 8 * t)), o;
}, u.prototype.readInt8 = function(e, t) {
return e >>>= 0, t || U(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e];
}, u.prototype.readInt16LE = function(e, t) {
e >>>= 0, t || U(e, 2, this.length);
const r = this[e] | this[e + 1] << 8;
return 32768 & r ? 4294901760 | r : r;
}, u.prototype.readInt16BE = function(e, t) {
e >>>= 0, t || U(e, 2, this.length);
const r = this[e + 1] | this[e] << 8;
return 32768 & r ? 4294901760 | r : r;
}, u.prototype.readInt32LE = function(e, t) {
return e >>>= 0, t || U(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
}, u.prototype.readInt32BE = function(e, t) {
return e >>>= 0, t || U(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
}, u.prototype.readBigInt64LE = te(function(e) {
G(e >>>= 0, "offset");
const t = this[e], r = this[e + 7];
void 0 !== t && void 0 !== r || Y(e, this.length - 8);
const n = this[e + 4] + 256 * this[e + 5] + 65536 * this[e + 6] + (r << 24);
return (BigInt(n) << BigInt(32)) + BigInt(t + 256 * this[++e] + 65536 * this[++e] + this[++e] * 2 ** 24);
}), u.prototype.readBigInt64BE = te(function(e) {
G(e >>>= 0, "offset");
const t = this[e], r = this[e + 7];
void 0 !== t && void 0 !== r || Y(e, this.length - 8);
const n = (t << 24) + 65536 * this[++e] + 256 * this[++e] + this[++e];
return (BigInt(n) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + 65536 * this[++e] + 256 * this[++e] + r);
}), u.prototype.readFloatLE = function(e, t) {
return e >>>= 0, t || U(e, 4, this.length), n.read(this, e, !0, 23, 4);
}, u.prototype.readFloatBE = function(e, t) {
return e >>>= 0, t || U(e, 4, this.length), n.read(this, e, !1, 23, 4);
}, u.prototype.readDoubleLE = function(e, t) {
return e >>>= 0, t || U(e, 8, this.length), n.read(this, e, !0, 52, 8);
}, u.prototype.readDoubleBE = function(e, t) {
return e >>>= 0, t || U(e, 8, this.length), n.read(this, e, !1, 52, 8);
}, u.prototype.writeUintLE = u.prototype.writeUIntLE = function(e, t, r, n) {
e = +e, t >>>= 0, r >>>= 0, n || j(this, e, t, r, Math.pow(2, 8 * r) - 1, 0);
let i = 1, o = 0;
for (this[t] = 255 & e; ++o < r && (i *= 256);) this[t + o] = e / i & 255;
return t + r;
}, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(e, t, r, n) {
e = +e, t >>>= 0, r >>>= 0, n || j(this, e, t, r, Math.pow(2, 8 * r) - 1, 0);
let i = r - 1, o = 1;
for (this[t + i] = 255 & e; --i >= 0 && (o *= 256);) this[t + i] = e / o & 255;
return t + r;
}, u.prototype.writeUint8 = u.prototype.writeUInt8 = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 1, 255, 0), this[t] = 255 & e, t + 1;
}, u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 2, 65535, 0), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2;
}, u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2;
}, u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e, t + 4;
}, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4;
}, u.prototype.writeBigUInt64LE = te(function(e, t = 0) {
return N(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
}), u.prototype.writeBigUInt64BE = te(function(e, t = 0) {
return P(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
}), u.prototype.writeIntLE = function(e, t, r, n) {
if (e = +e, t >>>= 0, !n) {
const n = Math.pow(2, 8 * r - 1);
j(this, e, t, r, n - 1, -n);
}
let i = 0, o = 1, s = 0;
for (this[t] = 255 & e; ++i < r && (o *= 256);) e < 0 && 0 === s && 0 !== this[t + i - 1] && (s = 1), this[t + i] = (e / o | 0) - s & 255;
return t + r;
}, u.prototype.writeIntBE = function(e, t, r, n) {
if (e = +e, t >>>= 0, !n) {
const n = Math.pow(2, 8 * r - 1);
j(this, e, t, r, n - 1, -n);
}
let i = r - 1, o = 1, s = 0;
for (this[t + i] = 255 & e; --i >= 0 && (o *= 256);) e < 0 && 0 === s && 0 !== this[t + i + 1] && (s = 1), this[t + i] = (e / o | 0) - s & 255;
return t + r;
}, u.prototype.writeInt8 = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1;
}, u.prototype.writeInt16LE = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 2, 32767, -32768), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2;
}, u.prototype.writeInt16BE = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2;
}, u.prototype.writeInt32LE = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 4, 2147483647, -2147483648), this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
}, u.prototype.writeInt32BE = function(e, t, r) {
return e = +e, t >>>= 0, r || j(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4;
}, u.prototype.writeBigInt64LE = te(function(e, t = 0) {
return N(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
}), u.prototype.writeBigInt64BE = te(function(e, t = 0) {
return P(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
}), u.prototype.writeFloatLE = function(e, t, r) {
return F(this, e, t, !0, r);
}, u.prototype.writeFloatBE = function(e, t, r) {
return F(this, e, t, !1, r);
}, u.prototype.writeDoubleLE = function(e, t, r) {
return $(this, e, t, !0, r);
}, u.prototype.writeDoubleBE = function(e, t, r) {
return $(this, e, t, !1, r);
}, u.prototype.copy = function(e, t, r, n) {
if (!u.isBuffer(e)) throw new TypeError("argument should be a Buffer");
if (r || (r = 0), n || 0 === n || (n = this.length), t >= e.length && (t = e.length), t || (t = 0), n > 0 && n < r && (n = r), n === r) return 0;
if (0 === e.length || 0 === this.length) return 0;
if (t < 0) throw new RangeError("targetStart out of bounds");
if (r < 0 || r >= this.length) throw new RangeError("Index out of range");
if (n < 0) throw new RangeError("sourceEnd out of bounds");
n > this.length && (n = this.length), e.length - t < n - r && (n = e.length - t + r);
const i = n - r;
return this === e && "function" == typeof s.prototype.copyWithin ? this.copyWithin(t, r, n) : s.prototype.set.call(e, this.subarray(r, n), t), i;
}, u.prototype.fill = function(e, t, r, n) {
if ("string" == typeof e) {
if ("string" == typeof t ? (n = t, t = 0, r = this.length) : "string" == typeof r && (n = r, r = this.length), void 0 !== n && "string" != typeof n) throw new TypeError("encoding must be a string");
if ("string" == typeof n && !u.isEncoding(n)) throw new TypeError("Unknown encoding: " + n);
if (1 === e.length) {
const t = e.charCodeAt(0);
("utf8" === n && t < 128 || "latin1" === n) && (e = t);
}
} else "number" == typeof e ? e &= 255 : "boolean" == typeof e && (e = Number(e));
if (t < 0 || this.length < t || this.length < r) throw new RangeError("Out of range index");
if (r <= t) return this;
let i;
if (t >>>= 0, r = void 0 === r ? this.length : r >>> 0, e || (e = 0), "number" == typeof e) for (i = t; i < r; ++i) this[i] = e;
else {
const o = u.isBuffer(e) ? e : u.from(e, n), s = o.length;
if (0 === s) throw new TypeError("The value \"" + e + "\" is invalid for argument \"value\"");
for (i = 0; i < r - t; ++i) this[i + t] = o[i % s];
}
return this;
};
const q = {};
function W(e, t, r) {
q[e] = class extends r {
constructor() {
super(), Object.defineProperty(this, "message", {
value: t.apply(this, arguments),
writable: !0,
configurable: !0
}), this.name = `${this.name} [${e}]`, this.stack, delete this.name;
}
get code() {
return e;
}
set code(e) {
Object.defineProperty(this, "code", {
configurable: !0,
enumerable: !0,
value: e,
writable: !0
});
}
toString() {
return `${this.name} [${e}]: ${this.message}`;
}
};
}
function z(e) {
let t = "", r = e.length;
const n = "-" === e[0] ? 1 : 0;
for (; r >= n + 4; r -= 3) t = `_${e.slice(r - 3, r)}${t}`;
return `${e.slice(0, r)}${t}`;
}
function H(e, t, r, n, i, o) {
if (e > r || e < t) {
const n = "bigint" == typeof t ? "n" : "";
let i;
throw i = o > 3 ? 0 === t || t === BigInt(0) ? `>= 0${n} and < 2${n} ** ${8 * (o + 1)}${n}` : `>= -(2${n} ** ${8 * (o + 1) - 1}${n}) and < 2 ** ${8 * (o + 1) - 1}${n}` : `>= ${t}${n} and <= ${r}${n}`, new q.ERR_OUT_OF_RANGE("value", i, e);
}
(function(e, t, r) {
G(t, "offset"), void 0 !== e[t] && void 0 !== e[t + r] || Y(t, e.length - (r + 1));
})(n, i, o);
}
function G(e, t) {
if ("number" != typeof e) throw new q.ERR_INVALID_ARG_TYPE(t, "number", e);
}
function Y(e, t, r) {
if (Math.floor(e) !== e) throw G(e, r), new q.ERR_OUT_OF_RANGE(r || "offset", "an integer", e);
if (t < 0) throw new q.ERR_BUFFER_OUT_OF_BOUNDS();
throw new q.ERR_OUT_OF_RANGE(r || "offset", `>= ${r ? 1 : 0} and <= ${t}`, e);
}
W("ERR_BUFFER_OUT_OF_BOUNDS", function(e) {
return e ? `${e} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
}, RangeError), W("ERR_INVALID_ARG_TYPE", function(e, t) {
return `The "${e}" argument must be of type number. Received type ${typeof t}`;
}, TypeError), W("ERR_OUT_OF_RANGE", function(e, t, r) {
let n = `The value of "${e}" is out of range.`, i = r;
return Number.isInteger(r) && Math.abs(r) > 2 ** 32 ? i = z(String(r)) : "bigint" == typeof r && (i = String(r), (r > BigInt(2) ** BigInt(32) || r < -(BigInt(2) ** BigInt(32))) && (i = z(i)), i += "n"), n += ` It must be ${t}. Received ${i}`, n;
}, RangeError);
const V = /[^+/0-9A-Za-z-_]/g;
function X(e, t) {
let r;
t = t || Infinity;
const n = e.length;
let i = null;
const o = [];
for (let s = 0; s < n; ++s) {
if (r = e.charCodeAt(s), r > 55295 && r < 57344) {
if (!i) {
if (r > 56319) {
(t -= 3) > -1 && o.push(239, 191, 189);
continue;
}
if (s + 1 === n) {
(t -= 3) > -1 && o.push(239, 191, 189);
continue;
}
i = r;
continue;
}
if (r < 56320) {
(t -= 3) > -1 && o.push(239, 191, 189), i = r;
continue;
}
r = 65536 + (i - 55296 << 10 | r - 56320);
} else i && (t -= 3) > -1 && o.push(239, 191, 189);
if (i = null, r < 128) {
if ((t -= 1) < 0) break;
o.push(r);
} else if (r < 2048) {
if ((t -= 2) < 0) break;
o.push(r >> 6 | 192, 63 & r | 128);
} else if (r < 65536) {
if ((t -= 3) < 0) break;
o.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128);
} else {
if (!(r < 1114112)) throw new Error("Invalid code point");
if ((t -= 4) < 0) break;
o.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128);
}
}
return o;
}
function J(e) {
return t.toByteArray(function(e) {
if ((e = (e = e.split("=")[0]).trim().replace(V, "")).length < 2) return "";
for (; e.length % 4 != 0;) e += "=";
return e;
}(e));
}
function K(e, t, r, n) {
let i;
for (i = 0; i < n && !(i + r >= t.length || i >= e.length); ++i) t[i + r] = e[i];
return i;
}
function Z(e, t) {
return e instanceof t || null != e && null != e.constructor && null != e.constructor.name && e.constructor.name === t.name;
}
function Q(e) {
return e != e;
}
const ee = function() {
const e = "0123456789abcdef", t = new Array(256);
for (let r = 0; r < 16; ++r) {
const n = 16 * r;
for (let i = 0; i < 16; ++i) t[n + i] = e[r] + e[i];
}
return t;
}();
function te(e) {
return "undefined" == typeof BigInt ? re : e;
}
function re() {
throw new Error("BigInt not supported");
}
})(t);
const l = t.Buffer;
e.Blob = t.Blob, e.BlobOptions = t.BlobOptions, e.Buffer = t.Buffer, e.File = t.File, e.FileOptions = t.FileOptions, e.INSPECT_MAX_BYTES = t.INSPECT_MAX_BYTES, e.SlowBuffer = t.SlowBuffer, e.TranscodeEncoding = t.TranscodeEncoding, e.atob = t.atob, e.btoa = t.btoa, e.constants = t.constants, e.default = l, e.isAscii = t.isAscii, e.isUtf8 = t.isUtf8, e.kMaxLength = t.kMaxLength, e.kStringMaxLength = t.kStringMaxLength, e.resolveObjectURL = t.resolveObjectURL, e.transcode = t.transcode;
}), $ = a((e, t) => {
var r, n = F(), i = n.Buffer, o = {};
for (r in n) n.hasOwnProperty(r) && "SlowBuffer" !== r && "Buffer" !== r && (o[r] = n[r]);
var s = o.Buffer = {};
for (r in i) i.hasOwnProperty(r) && "allocUnsafe" !== r && "allocUnsafeSlow" !== r && (s[r] = i[r]);
if (o.Buffer.prototype = i.prototype, s.from && s.from !== Uint8Array.from || (s.from = function(e, t, r) {
if ("number" == typeof e) throw new TypeError("The \"value\" argument must not be of type number. Received type " + typeof e);
if (e && void 0 === e.length) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
return i(e, t, r);
}), s.alloc || (s.alloc = function(e, t, r) {
if ("number" != typeof e) throw new TypeError("The \"size\" argument must be of type number. Received type " + typeof e);
if (e < 0 || e >= 2 * (1 << 30)) throw new RangeError("The value \"" + e + "\" is invalid for option \"size\"");
var n = i(e);
return t && 0 !== t.length ? "string" == typeof r ? n.fill(t, r) : n.fill(t) : n.fill(0), n;
}), !o.kStringMaxLength) try {
o.kStringMaxLength = process.binding("buffer").kStringMaxLength;
} catch (e) {}
o.constants || (o.constants = { MAX_LENGTH: o.kMaxLength }, o.kStringMaxLength && (o.constants.MAX_STRING_LENGTH = o.kStringMaxLength)), t.exports = o;
}), q = a((e) => {
function t(e, t) {
this.encoder = e, this.addBOM = !0;
}
function r(e, t) {
this.decoder = e, this.pass = !1, this.options = t || {};
}
e.PrependBOM = t, t.prototype.write = function(e) {
return this.addBOM && (e = "" + e, this.addBOM = !1), this.encoder.write(e);
}, t.prototype.end = function() {
return this.encoder.end();
}, e.StripBOM = r, r.prototype.write = function(e) {
var t = this.decoder.write(e);
return this.pass || !t || ("" === t[0] && (t = t.slice(1), "function" == typeof this.options.stripBOM && this.options.stripBOM()), this.pass = !0), t;
}, r.prototype.end = function() {
return this.decoder.end();
};
}), W = a((e, t) => {
var r = void 0 === Object.hasOwn ? Function.call.bind(Object.prototype.hasOwnProperty) : Object.hasOwn;
t.exports = function(e, t) {
for (var n in t) r(t, n) && (e[n] = t[n]);
};
}), z = a((e, t) => {
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var r = F(), n = r.Buffer;
function i(e, t) {
for (var r in e) t[r] = e[r];
}
function o(e, t, r) {
return n(e, t, r);
}
n.from && n.alloc && n.allocUnsafe && n.allocUnsafeSlow ? t.exports = r : (i(r, e), e.Buffer = o), o.prototype = Object.create(n.prototype), i(n, o), o.from = function(e, t, r) {
if ("number" == typeof e) throw new TypeError("Argument must not be a number");
return n(e, t, r);
}, o.alloc = function(e, t, r) {
if ("number" != typeof e) throw new TypeError("Argument must be a number");
var i = n(e);
return void 0 !== t ? "string" == typeof r ? i.fill(t, r) : i.fill(t) : i.fill(0), i;
}, o.allocUnsafe = function(e) {
if ("number" != typeof e) throw new TypeError("Argument must be a number");
return n(e);
}, o.allocUnsafeSlow = function(e) {
if ("number" != typeof e) throw new TypeError("Argument must be a number");
return r.SlowBuffer(e);
};
}), H = a((e) => {
var t = z().Buffer, r = t.isEncoding || function(e) {
switch ((e = "" + e) && e.toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
case "raw": return !0;
default: return !1;
}
};
function n(e) {
var n;
switch (this.encoding = function(e) {
var n = function(e) {
if (!e) return "utf8";
for (var t;;) switch (e) {
case "utf8":
case "utf-8": return "utf8";
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le": return "utf16le";
case "latin1":
case "binary": return "latin1";
case "base64":
case "ascii":
case "hex": return e;
default:
if (t) return;
e = ("" + e).toLowerCase(), t = !0;
}
}(e);
if ("string" != typeof n && (t.isEncoding === r || !r(e))) throw new Error("Unknown encoding: " + e);
return n || e;
}(e), this.encoding) {
case "utf16le":
this.text = s, this.end = a, n = 4;
break;
case "utf8":
this.fillLast = o, n = 4;
break;
case "base64":
this.text = c, this.end = f, n = 3;
break;
default:
this.write = u, this.end = h;
return;
}
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = t.allocUnsafe(n);
}
function i(e) {
return e <= 127 ? 0 : e >> 5 == 6 ? 2 : e >> 4 == 14 ? 3 : e >> 3 == 30 ? 4 : e >> 6 == 2 ? -1 : -2;
}
function o(e) {
var t = this.lastTotal - this.lastNeed, r = function(e, t) {
if (128 != (192 & t[0])) return e.lastNeed = 0, "�";
if (e.lastNeed > 1 && t.length > 1) {
if (128 != (192 & t[1])) return e.lastNeed = 1, "�";
if (e.lastNeed > 2 && t.length > 2 && 128 != (192 & t[2])) return e.lastNeed = 2, "�";
}
}(this, e);
return void 0 !== r ? r : this.lastNeed <= e.length ? (e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (e.copy(this.lastChar, t, 0, e.length), void (this.lastNeed -= e.length));
}
function s(e, t) {
if ((e.length - t) % 2 == 0) {
var r = e.toString("utf16le", t);
if (r) {
var n = r.charCodeAt(r.length - 1);
if (n >= 55296 && n <= 56319) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1], r.slice(0, -1);
}
return r;
}
return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1);
}
function a(e) {
var t = e && e.length ? this.write(e) : "";
if (this.lastNeed) {
var r = this.lastTotal - this.lastNeed;
return t + this.lastChar.toString("utf16le", 0, r);
}
return t;
}
function c(e, t) {
var r = (e.length - t) % 3;
return 0 === r ? e.toString("base64", t) : (this.lastNeed = 3 - r, this.lastTotal = 3, 1 === r ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString("base64", t, e.length - r));
}
function f(e) {
var t = e && e.length ? this.write(e) : "";
return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t;
}
function u(e) {
return e.toS