@ragsters/raggie-wallet-connector
Version:
This is a React component built by the CryptoRaggies team to enable any React website to easily connect to popular Cardano wallets. The user's choice of wallet is persisted to local storage and the wallet connector will automatically reconnect the previou
1,349 lines (1,347 loc) • 5.29 MB
JavaScript
import * as X from "react";
import Ug, { useState as MA, Fragment as Ts, createContext as BQ, useContext as RC, useRef as qA, useEffect as HA, useMemo as Vs, useCallback as UA, useLayoutEffect as Ho, useId as Ps, forwardRef as fA, cloneElement as pQ, createElement as $Q, Children as PD } from "react";
import * as Nc from "react-dom";
import yc, { flushSync as Mc, createPortal as Fc } from "react-dom";
var ao = { exports: {} }, WQ = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var zD;
function Jc() {
if (zD) return WQ;
zD = 1;
var i = Ug, A = Symbol.for("react.element"), g = Symbol.for("react.fragment"), Q = Object.prototype.hasOwnProperty, B = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, C = { key: !0, ref: !0, __self: !0, __source: !0 };
function a(D, t, w) {
var e, c = {}, n = null, h = null;
w !== void 0 && (n = "" + w), t.key !== void 0 && (n = "" + t.key), t.ref !== void 0 && (h = t.ref);
for (e in t) Q.call(t, e) && !C.hasOwnProperty(e) && (c[e] = t[e]);
if (D && D.defaultProps) for (e in t = D.defaultProps, t) c[e] === void 0 && (c[e] = t[e]);
return { $$typeof: A, type: D, key: n, ref: h, props: c, _owner: B.current };
}
return WQ.Fragment = g, WQ.jsx = a, WQ.jsxs = a, WQ;
}
var vQ = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var $D;
function Kc() {
return $D || ($D = 1, process.env.NODE_ENV !== "production" && function() {
var i = Ug, A = Symbol.for("react.element"), g = Symbol.for("react.portal"), Q = Symbol.for("react.fragment"), B = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), D = Symbol.for("react.context"), t = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), e = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), n = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), M = Symbol.iterator, J = "@@iterator";
function _(Y) {
if (Y === null || typeof Y != "object")
return null;
var x = M && Y[M] || Y[J];
return typeof x == "function" ? x : null;
}
var d = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function U(Y) {
{
for (var x = arguments.length, gA = new Array(x > 1 ? x - 1 : 0), tA = 1; tA < x; tA++)
gA[tA - 1] = arguments[tA];
p("error", Y, gA);
}
}
function p(Y, x, gA) {
{
var tA = d.ReactDebugCurrentFrame, nA = tA.getStackAddendum();
nA !== "" && (x += "%s", gA = gA.concat([nA]));
var hA = gA.map(function(KA) {
return String(KA);
});
hA.unshift("Warning: " + x), Function.prototype.apply.call(console[Y], console, hA);
}
}
var q = !1, L = !1, f = !1, j = !1, W = !1, T;
T = Symbol.for("react.module.reference");
function BA(Y) {
return !!(typeof Y == "string" || typeof Y == "function" || Y === Q || Y === C || W || Y === B || Y === w || Y === e || j || Y === h || q || L || f || typeof Y == "object" && Y !== null && (Y.$$typeof === n || Y.$$typeof === c || Y.$$typeof === a || Y.$$typeof === D || Y.$$typeof === t || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
Y.$$typeof === T || Y.getModuleId !== void 0));
}
function iA(Y, x, gA) {
var tA = Y.displayName;
if (tA)
return tA;
var nA = x.displayName || x.name || "";
return nA !== "" ? gA + "(" + nA + ")" : gA;
}
function aA(Y) {
return Y.displayName || "Context";
}
function EA(Y) {
if (Y == null)
return null;
if (typeof Y.tag == "number" && U("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof Y == "function")
return Y.displayName || Y.name || null;
if (typeof Y == "string")
return Y;
switch (Y) {
case Q:
return "Fragment";
case g:
return "Portal";
case C:
return "Profiler";
case B:
return "StrictMode";
case w:
return "Suspense";
case e:
return "SuspenseList";
}
if (typeof Y == "object")
switch (Y.$$typeof) {
case D:
var x = Y;
return aA(x) + ".Consumer";
case a:
var gA = Y;
return aA(gA._context) + ".Provider";
case t:
return iA(Y, Y.render, "ForwardRef");
case c:
var tA = Y.displayName || null;
return tA !== null ? tA : EA(Y.type) || "Memo";
case n: {
var nA = Y, hA = nA._payload, KA = nA._init;
try {
return EA(KA(hA));
} catch {
return null;
}
}
}
return null;
}
var $ = Object.assign, AA = 0, z, IA, Z, V, oA, QA, rA;
function lA() {
}
lA.__reactDisabledLog = !0;
function bA() {
{
if (AA === 0) {
z = console.log, IA = console.info, Z = console.warn, V = console.error, oA = console.group, QA = console.groupCollapsed, rA = console.groupEnd;
var Y = {
configurable: !0,
enumerable: !0,
value: lA,
writable: !0
};
Object.defineProperties(console, {
info: Y,
log: Y,
warn: Y,
error: Y,
group: Y,
groupCollapsed: Y,
groupEnd: Y
});
}
AA++;
}
}
function eA() {
{
if (AA--, AA === 0) {
var Y = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: $({}, Y, {
value: z
}),
info: $({}, Y, {
value: IA
}),
warn: $({}, Y, {
value: Z
}),
error: $({}, Y, {
value: V
}),
group: $({}, Y, {
value: oA
}),
groupCollapsed: $({}, Y, {
value: QA
}),
groupEnd: $({}, Y, {
value: rA
})
});
}
AA < 0 && U("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var cA = d.ReactCurrentDispatcher, sA;
function kA(Y, x, gA) {
{
if (sA === void 0)
try {
throw Error();
} catch (nA) {
var tA = nA.stack.trim().match(/\n( *(at )?)/);
sA = tA && tA[1] || "";
}
return `
` + sA + Y;
}
}
var wA = !1, DA;
{
var _A = typeof WeakMap == "function" ? WeakMap : Map;
DA = new _A();
}
function xA(Y, x) {
if (!Y || wA)
return "";
{
var gA = DA.get(Y);
if (gA !== void 0)
return gA;
}
var tA;
wA = !0;
var nA = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var hA;
hA = cA.current, cA.current = null, bA();
try {
if (x) {
var KA = function() {
throw Error();
};
if (Object.defineProperty(KA.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(KA, []);
} catch (vI) {
tA = vI;
}
Reflect.construct(Y, [], KA);
} else {
try {
KA.call();
} catch (vI) {
tA = vI;
}
Y.call(KA.prototype);
}
} else {
try {
throw Error();
} catch (vI) {
tA = vI;
}
Y();
}
} catch (vI) {
if (vI && tA && typeof vI.stack == "string") {
for (var yA = vI.stack.split(`
`), LA = tA.stack.split(`
`), uA = yA.length - 1, VA = LA.length - 1; uA >= 1 && VA >= 0 && yA[uA] !== LA[VA]; )
VA--;
for (; uA >= 1 && VA >= 0; uA--, VA--)
if (yA[uA] !== LA[VA]) {
if (uA !== 1 || VA !== 1)
do
if (uA--, VA--, VA < 0 || yA[uA] !== LA[VA]) {
var _g = `
` + yA[uA].replace(" at new ", " at ");
return Y.displayName && _g.includes("<anonymous>") && (_g = _g.replace("<anonymous>", Y.displayName)), typeof Y == "function" && DA.set(Y, _g), _g;
}
while (uA >= 1 && VA >= 0);
break;
}
}
} finally {
wA = !1, cA.current = hA, eA(), Error.prepareStackTrace = nA;
}
var Ng = Y ? Y.displayName || Y.name : "", VD = Ng ? kA(Ng) : "";
return typeof Y == "function" && DA.set(Y, VD), VD;
}
function RA(Y, x, gA) {
return xA(Y, !1);
}
function jA(Y) {
var x = Y.prototype;
return !!(x && x.isReactComponent);
}
function zA(Y, x, gA) {
if (Y == null)
return "";
if (typeof Y == "function")
return xA(Y, jA(Y));
if (typeof Y == "string")
return kA(Y);
switch (Y) {
case w:
return kA("Suspense");
case e:
return kA("SuspenseList");
}
if (typeof Y == "object")
switch (Y.$$typeof) {
case t:
return RA(Y.render);
case c:
return zA(Y.type, x, gA);
case n: {
var tA = Y, nA = tA._payload, hA = tA._init;
try {
return zA(hA(nA), x, gA);
} catch {
}
}
}
return "";
}
var ag = Object.prototype.hasOwnProperty, vA = {}, Rg = d.ReactDebugCurrentFrame;
function sg(Y) {
if (Y) {
var x = Y._owner, gA = zA(Y.type, Y._source, x ? x.type : null);
Rg.setExtraStackFrame(gA);
} else
Rg.setExtraStackFrame(null);
}
function lg(Y, x, gA, tA, nA) {
{
var hA = Function.call.bind(ag);
for (var KA in Y)
if (hA(Y, KA)) {
var yA = void 0;
try {
if (typeof Y[KA] != "function") {
var LA = Error((tA || "React class") + ": " + gA + " type `" + KA + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof Y[KA] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw LA.name = "Invariant Violation", LA;
}
yA = Y[KA](x, KA, tA, gA, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (uA) {
yA = uA;
}
yA && !(yA instanceof Error) && (sg(nA), U("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", tA || "React class", gA, KA, typeof yA), sg(null)), yA instanceof Error && !(yA.message in vA) && (vA[yA.message] = !0, sg(nA), U("Failed %s type: %s", gA, yA.message), sg(null));
}
}
}
var AI = Array.isArray;
function SA(Y) {
return AI(Y);
}
function wI(Y) {
{
var x = typeof Symbol == "function" && Symbol.toStringTag, gA = x && Y[Symbol.toStringTag] || Y.constructor.name || "Object";
return gA;
}
}
function xQ(Y) {
try {
return Lg(Y), !1;
} catch {
return !0;
}
}
function Lg(Y) {
return "" + Y;
}
function HB(Y) {
if (xQ(Y))
return U("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wI(Y)), Lg(Y);
}
var F = d.ReactCurrentOwner, G = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, k, S;
function l(Y) {
if (ag.call(Y, "ref")) {
var x = Object.getOwnPropertyDescriptor(Y, "ref").get;
if (x && x.isReactWarning)
return !1;
}
return Y.ref !== void 0;
}
function m(Y) {
if (ag.call(Y, "key")) {
var x = Object.getOwnPropertyDescriptor(Y, "key").get;
if (x && x.isReactWarning)
return !1;
}
return Y.key !== void 0;
}
function P(Y, x) {
typeof Y.ref == "string" && F.current;
}
function pA(Y, x) {
{
var gA = function() {
k || (k = !0, U("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
};
gA.isReactWarning = !0, Object.defineProperty(Y, "key", {
get: gA,
configurable: !0
});
}
}
function $A(Y, x) {
{
var gA = function() {
S || (S = !0, U("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
};
gA.isReactWarning = !0, Object.defineProperty(Y, "ref", {
get: gA,
configurable: !0
});
}
}
var OA = function(Y, x, gA, tA, nA, hA, KA) {
var yA = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: A,
// Built-in properties that belong on the element
type: Y,
key: x,
ref: gA,
props: KA,
// Record the component responsible for creating this element.
_owner: hA
};
return yA._store = {}, Object.defineProperty(yA._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(yA, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: tA
}), Object.defineProperty(yA, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: nA
}), Object.freeze && (Object.freeze(yA.props), Object.freeze(yA)), yA;
};
function Ag(Y, x, gA, tA, nA) {
{
var hA, KA = {}, yA = null, LA = null;
gA !== void 0 && (HB(gA), yA = "" + gA), m(x) && (HB(x.key), yA = "" + x.key), l(x) && (LA = x.ref, P(x, nA));
for (hA in x)
ag.call(x, hA) && !G.hasOwnProperty(hA) && (KA[hA] = x[hA]);
if (Y && Y.defaultProps) {
var uA = Y.defaultProps;
for (hA in uA)
KA[hA] === void 0 && (KA[hA] = uA[hA]);
}
if (yA || LA) {
var VA = typeof Y == "function" ? Y.displayName || Y.name || "Unknown" : Y;
yA && pA(KA, VA), LA && $A(KA, VA);
}
return OA(Y, yA, LA, nA, tA, F.current, KA);
}
}
var WA = d.ReactCurrentOwner, oQ = d.ReactDebugCurrentFrame;
function WI(Y) {
if (Y) {
var x = Y._owner, gA = zA(Y.type, Y._source, x ? x.type : null);
oQ.setExtraStackFrame(gA);
} else
oQ.setExtraStackFrame(null);
}
var JI;
JI = !1;
function lB(Y) {
return typeof Y == "object" && Y !== null && Y.$$typeof === A;
}
function DQ() {
{
if (WA.current) {
var Y = EA(WA.current.type);
if (Y)
return `
Check the render method of \`` + Y + "`.";
}
return "";
}
}
function JE(Y) {
return "";
}
var KE = {};
function YE(Y) {
{
var x = DQ();
if (!x) {
var gA = typeof Y == "string" ? Y : Y.displayName || Y.name;
gA && (x = `
Check the top-level render call using <` + gA + ">.");
}
return x;
}
}
function RE(Y, x) {
{
if (!Y._store || Y._store.validated || Y.key != null)
return;
Y._store.validated = !0;
var gA = YE(x);
if (KE[gA])
return;
KE[gA] = !0;
var tA = "";
Y && Y._owner && Y._owner !== WA.current && (tA = " It was passed a child from " + EA(Y._owner.type) + "."), WI(Y), U('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', gA, tA), WI(null);
}
}
function jQ(Y, x) {
{
if (typeof Y != "object")
return;
if (SA(Y))
for (var gA = 0; gA < Y.length; gA++) {
var tA = Y[gA];
lB(tA) && RE(tA, x);
}
else if (lB(Y))
Y._store && (Y._store.validated = !0);
else if (Y) {
var nA = _(Y);
if (typeof nA == "function" && nA !== Y.entries)
for (var hA = nA.call(Y), KA; !(KA = hA.next()).done; )
lB(KA.value) && RE(KA.value, x);
}
}
}
function _E(Y) {
{
var x = Y.type;
if (x == null || typeof x == "string")
return;
var gA;
if (typeof x == "function")
gA = x.propTypes;
else if (typeof x == "object" && (x.$$typeof === t || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
x.$$typeof === c))
gA = x.propTypes;
else
return;
if (gA) {
var tA = EA(x);
lg(gA, Y.props, "prop", tA, Y);
} else if (x.PropTypes !== void 0 && !JI) {
JI = !0;
var nA = EA(x);
U("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", nA || "Unknown");
}
typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && U("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function Li(Y) {
{
for (var x = Object.keys(Y.props), gA = 0; gA < x.length; gA++) {
var tA = x[gA];
if (tA !== "children" && tA !== "key") {
WI(Y), U("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", tA), WI(null);
break;
}
}
Y.ref !== null && (WI(Y), U("Invalid attribute `ref` supplied to `React.Fragment`."), WI(null));
}
}
function SE(Y, x, gA, tA, nA, hA) {
{
var KA = BA(Y);
if (!KA) {
var yA = "";
(Y === void 0 || typeof Y == "object" && Y !== null && Object.keys(Y).length === 0) && (yA += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var LA = JE();
LA ? yA += LA : yA += DQ();
var uA;
Y === null ? uA = "null" : SA(Y) ? uA = "array" : Y !== void 0 && Y.$$typeof === A ? (uA = "<" + (EA(Y.type) || "Unknown") + " />", yA = " Did you accidentally export a JSX literal instead of a component?") : uA = typeof Y, U("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", uA, yA);
}
var VA = Ag(Y, x, gA, nA, hA);
if (VA == null)
return VA;
if (KA) {
var _g = x.children;
if (_g !== void 0)
if (tA)
if (SA(_g)) {
for (var Ng = 0; Ng < _g.length; Ng++)
jQ(_g[Ng], Y);
Object.freeze && Object.freeze(_g);
} else
U("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
jQ(_g, Y);
}
return Y === Q ? Li(VA) : _E(VA), VA;
}
}
function fi(Y, x, gA) {
return SE(Y, x, gA, !0);
}
function bi(Y, x, gA) {
return SE(Y, x, gA, !1);
}
var H = bi, CA = fi;
vQ.Fragment = Q, vQ.jsx = H, vQ.jsxs = CA;
}()), vQ;
}
process.env.NODE_ENV === "production" ? ao.exports = Jc() : ao.exports = Kc();
var y = ao.exports, qg = {}, Ei = {};
Ei.byteLength = _c;
Ei.toByteArray = dc;
Ei.fromByteArray = qc;
var UI = [], gI = [], Yc = typeof Uint8Array < "u" ? Uint8Array : Array, ui = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
for (var aQ = 0, Rc = ui.length; aQ < Rc; ++aQ)
UI[aQ] = ui[aQ], gI[ui.charCodeAt(aQ)] = aQ;
gI[45] = 62;
gI[95] = 63;
function zs(i) {
var A = i.length;
if (A % 4 > 0)
throw new Error("Invalid string. Length must be a multiple of 4");
var g = i.indexOf("=");
g === -1 && (g = A);
var Q = g === A ? 0 : 4 - g % 4;
return [g, Q];
}
function _c(i) {
var A = zs(i), g = A[0], Q = A[1];
return (g + Q) * 3 / 4 - Q;
}
function Sc(i, A, g) {
return (A + g) * 3 / 4 - g;
}
function dc(i) {
var A, g = zs(i), Q = g[0], B = g[1], C = new Yc(Sc(i, Q, B)), a = 0, D = B > 0 ? Q - 4 : Q, t;
for (t = 0; t < D; t += 4)
A = gI[i.charCodeAt(t)] << 18 | gI[i.charCodeAt(t + 1)] << 12 | gI[i.charCodeAt(t + 2)] << 6 | gI[i.charCodeAt(t + 3)], C[a++] = A >> 16 & 255, C[a++] = A >> 8 & 255, C[a++] = A & 255;
return B === 2 && (A = gI[i.charCodeAt(t)] << 2 | gI[i.charCodeAt(t + 1)] >> 4, C[a++] = A & 255), B === 1 && (A = gI[i.charCodeAt(t)] << 10 | gI[i.charCodeAt(t + 1)] << 4 | gI[i.charCodeAt(t + 2)] >> 2, C[a++] = A >> 8 & 255, C[a++] = A & 255), C;
}
function pc(i) {
return UI[i >> 18 & 63] + UI[i >> 12 & 63] + UI[i >> 6 & 63] + UI[i & 63];
}
function Uc(i, A, g) {
for (var Q, B = [], C = A; C < g; C += 3)
Q = (i[C] << 16 & 16711680) + (i[C + 1] << 8 & 65280) + (i[C + 2] & 255), B.push(pc(Q));
return B.join("");
}
function qc(i) {
for (var A, g = i.length, Q = g % 3, B = [], C = 16383, a = 0, D = g - Q; a < D; a += C)
B.push(Uc(i, a, a + C > D ? D : a + C));
return Q === 1 ? (A = i[g - 1], B.push(
UI[A >> 2] + UI[A << 4 & 63] + "=="
)) : Q === 2 && (A = (i[g - 2] << 8) + i[g - 1], B.push(
UI[A >> 10] + UI[A >> 4 & 63] + UI[A << 2 & 63] + "="
)), B.join("");
}
var lo = {};
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
lo.read = function(i, A, g, Q, B) {
var C, a, D = B * 8 - Q - 1, t = (1 << D) - 1, w = t >> 1, e = -7, c = g ? B - 1 : 0, n = g ? -1 : 1, h = i[A + c];
for (c += n, C = h & (1 << -e) - 1, h >>= -e, e += D; e > 0; C = C * 256 + i[A + c], c += n, e -= 8)
;
for (a = C & (1 << -e) - 1, C >>= -e, e += Q; e > 0; a = a * 256 + i[A + c], c += n, e -= 8)
;
if (C === 0)
C = 1 - w;
else {
if (C === t)
return a ? NaN : (h ? -1 : 1) * (1 / 0);
a = a + Math.pow(2, Q), C = C - w;
}
return (h ? -1 : 1) * a * Math.pow(2, C - Q);
};
lo.write = function(i, A, g, Q, B, C) {
var a, D, t, w = C * 8 - B - 1, e = (1 << w) - 1, c = e >> 1, n = B === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, h = Q ? 0 : C - 1, M = Q ? 1 : -1, J = A < 0 || A === 0 && 1 / A < 0 ? 1 : 0;
for (A = Math.abs(A), isNaN(A) || A === 1 / 0 ? (D = isNaN(A) ? 1 : 0, a = e) : (a = Math.floor(Math.log(A) / Math.LN2), A * (t = Math.pow(2, -a)) < 1 && (a--, t *= 2), a + c >= 1 ? A += n / t : A += n * Math.pow(2, 1 - c), A * t >= 2 && (a++, t /= 2), a + c >= e ? (D = 0, a = e) : a + c >= 1 ? (D = (A * t - 1) * Math.pow(2, B), a = a + c) : (D = A * Math.pow(2, c - 1) * Math.pow(2, B), a = 0)); B >= 8; i[g + h] = D & 255, h += M, D /= 256, B -= 8)
;
for (a = a << B | D, w += B; w > 0; i[g + h] = a & 255, h += M, a /= 256, w -= 8)
;
i[g + h - M] |= J * 128;
};
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
(function(i) {
const A = Ei, g = lo, Q = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
i.Buffer = D, i.SlowBuffer = U, i.INSPECT_MAX_BYTES = 50;
const B = 2147483647;
i.kMaxLength = B, D.TYPED_ARRAY_SUPPORT = C(), !D.TYPED_ARRAY_SUPPORT && typeof console < "u" && 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 C() {
try {
const F = new Uint8Array(1), G = { foo: function() {
return 42;
} };
return Object.setPrototypeOf(G, Uint8Array.prototype), Object.setPrototypeOf(F, G), F.foo() === 42;
} catch {
return !1;
}
}
Object.defineProperty(D.prototype, "parent", {
enumerable: !0,
get: function() {
if (D.isBuffer(this))
return this.buffer;
}
}), Object.defineProperty(D.prototype, "offset", {
enumerable: !0,
get: function() {
if (D.isBuffer(this))
return this.byteOffset;
}
});
function a(F) {
if (F > B)
throw new RangeError('The value "' + F + '" is invalid for option "size"');
const G = new Uint8Array(F);
return Object.setPrototypeOf(G, D.prototype), G;
}
function D(F, G, k) {
if (typeof F == "number") {
if (typeof G == "string")
throw new TypeError(
'The "string" argument must be of type string. Received type number'
);
return c(F);
}
return t(F, G, k);
}
D.poolSize = 8192;
function t(F, G, k) {
if (typeof F == "string")
return n(F, G);
if (ArrayBuffer.isView(F))
return M(F);
if (F == null)
throw new TypeError(
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof F
);
if (SA(F, ArrayBuffer) || F && SA(F.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (SA(F, SharedArrayBuffer) || F && SA(F.buffer, SharedArrayBuffer)))
return J(F, G, k);
if (typeof F == "number")
throw new TypeError(
'The "value" argument must not be of type number. Received type number'
);
const S = F.valueOf && F.valueOf();
if (S != null && S !== F)
return D.from(S, G, k);
const l = _(F);
if (l) return l;
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof F[Symbol.toPrimitive] == "function")
return D.from(F[Symbol.toPrimitive]("string"), G, k);
throw new TypeError(
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof F
);
}
D.from = function(F, G, k) {
return t(F, G, k);
}, Object.setPrototypeOf(D.prototype, Uint8Array.prototype), Object.setPrototypeOf(D, Uint8Array);
function w(F) {
if (typeof F != "number")
throw new TypeError('"size" argument must be of type number');
if (F < 0)
throw new RangeError('The value "' + F + '" is invalid for option "size"');
}
function e(F, G, k) {
return w(F), F <= 0 ? a(F) : G !== void 0 ? typeof k == "string" ? a(F).fill(G, k) : a(F).fill(G) : a(F);
}
D.alloc = function(F, G, k) {
return e(F, G, k);
};
function c(F) {
return w(F), a(F < 0 ? 0 : d(F) | 0);
}
D.allocUnsafe = function(F) {
return c(F);
}, D.allocUnsafeSlow = function(F) {
return c(F);
};
function n(F, G) {
if ((typeof G != "string" || G === "") && (G = "utf8"), !D.isEncoding(G))
throw new TypeError("Unknown encoding: " + G);
const k = p(F, G) | 0;
let S = a(k);
const l = S.write(F, G);
return l !== k && (S = S.slice(0, l)), S;
}
function h(F) {
const G = F.length < 0 ? 0 : d(F.length) | 0, k = a(G);
for (let S = 0; S < G; S += 1)
k[S] = F[S] & 255;
return k;
}
function M(F) {
if (SA(F, Uint8Array)) {
const G = new Uint8Array(F);
return J(G.buffer, G.byteOffset, G.byteLength);
}
return h(F);
}
function J(F, G, k) {
if (G < 0 || F.byteLength < G)
throw new RangeError('"offset" is outside of buffer bounds');
if (F.byteLength < G + (k || 0))
throw new RangeError('"length" is outside of buffer bounds');
let S;
return G === void 0 && k === void 0 ? S = new Uint8Array(F) : k === void 0 ? S = new Uint8Array(F, G) : S = new Uint8Array(F, G, k), Object.setPrototypeOf(S, D.prototype), S;
}
function _(F) {
if (D.isBuffer(F)) {
const G = d(F.length) | 0, k = a(G);
return k.length === 0 || F.copy(k, 0, 0, G), k;
}
if (F.length !== void 0)
return typeof F.length != "number" || wI(F.length) ? a(0) : h(F);
if (F.type === "Buffer" && Array.isArray(F.data))
return h(F.data);
}
function d(F) {
if (F >= B)
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + B.toString(16) + " bytes");
return F | 0;
}
function U(F) {
return +F != F && (F = 0), D.alloc(+F);
}
D.isBuffer = function(G) {
return G != null && G._isBuffer === !0 && G !== D.prototype;
}, D.compare = function(G, k) {
if (SA(G, Uint8Array) && (G = D.from(G, G.offset, G.byteLength)), SA(k, Uint8Array) && (k = D.from(k, k.offset, k.byteLength)), !D.isBuffer(G) || !D.isBuffer(k))
throw new TypeError(
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
);
if (G === k) return 0;
let S = G.length, l = k.length;
for (let m = 0, P = Math.min(S, l); m < P; ++m)
if (G[m] !== k[m]) {
S = G[m], l = k[m];
break;
}
return S < l ? -1 : l < S ? 1 : 0;
}, D.isEncoding = function(G) {
switch (String(G).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;
}
}, D.concat = function(G, k) {
if (!Array.isArray(G))
throw new TypeError('"list" argument must be an Array of Buffers');
if (G.length === 0)
return D.alloc(0);
let S;
if (k === void 0)
for (k = 0, S = 0; S < G.length; ++S)
k += G[S].length;
const l = D.allocUnsafe(k);
let m = 0;
for (S = 0; S < G.length; ++S) {
let P = G[S];
if (SA(P, Uint8Array))
m + P.length > l.length ? (D.isBuffer(P) || (P = D.from(P)), P.copy(l, m)) : Uint8Array.prototype.set.call(
l,
P,
m
);
else if (D.isBuffer(P))
P.copy(l, m);
else
throw new TypeError('"list" argument must be an Array of Buffers');
m += P.length;
}
return l;
};
function p(F, G) {
if (D.isBuffer(F))
return F.length;
if (ArrayBuffer.isView(F) || SA(F, ArrayBuffer))
return F.byteLength;
if (typeof F != "string")
throw new TypeError(
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof F
);
const k = F.length, S = arguments.length > 2 && arguments[2] === !0;
if (!S && k === 0) return 0;
let l = !1;
for (; ; )
switch (G) {
case "ascii":
case "latin1":
case "binary":
return k;
case "utf8":
case "utf-8":
return vA(F).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return k * 2;
case "hex":
return k >>> 1;
case "base64":
return lg(F).length;
default:
if (l)
return S ? -1 : vA(F).length;
G = ("" + G).toLowerCase(), l = !0;
}
}
D.byteLength = p;
function q(F, G, k) {
let S = !1;
if ((G === void 0 || G < 0) && (G = 0), G > this.length || ((k === void 0 || k > this.length) && (k = this.length), k <= 0) || (k >>>= 0, G >>>= 0, k <= G))
return "";
for (F || (F = "utf8"); ; )
switch (F) {
case "hex":
return V(this, G, k);
case "utf8":
case "utf-8":
return $(this, G, k);
case "ascii":
return IA(this, G, k);
case "latin1":
case "binary":
return Z(this, G, k);
case "base64":
return EA(this, G, k);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return oA(this, G, k);
default:
if (S) throw new TypeError("Unknown encoding: " + F);
F = (F + "").toLowerCase(), S = !0;
}
}
D.prototype._isBuffer = !0;
function L(F, G, k) {
const S = F[G];
F[G] = F[k], F[k] = S;
}
D.prototype.swap16 = function() {
const G = this.length;
if (G % 2 !== 0)
throw new RangeError("Buffer size must be a multiple of 16-bits");
for (let k = 0; k < G; k += 2)
L(this, k, k + 1);
return this;
}, D.prototype.swap32 = function() {
const G = this.length;
if (G % 4 !== 0)
throw new RangeError("Buffer size must be a multiple of 32-bits");
for (let k = 0; k < G; k += 4)
L(this, k, k + 3), L(this, k + 1, k + 2);
return this;
}, D.prototype.swap64 = function() {
const G = this.length;
if (G % 8 !== 0)
throw new RangeError("Buffer size must be a multiple of 64-bits");
for (let k = 0; k < G; k += 8)
L(this, k, k + 7), L(this, k + 1, k + 6), L(this, k + 2, k + 5), L(this, k + 3, k + 4);
return this;
}, D.prototype.toString = function() {
const G = this.length;
return G === 0 ? "" : arguments.length === 0 ? $(this, 0, G) : q.apply(this, arguments);
}, D.prototype.toLocaleString = D.prototype.toString, D.prototype.equals = function(G) {
if (!D.isBuffer(G)) throw new TypeError("Argument must be a Buffer");
return this === G ? !0 : D.compare(this, G) === 0;
}, D.prototype.inspect = function() {
let G = "";
const k = i.INSPECT_MAX_BYTES;
return G = this.toString("hex", 0, k).replace(/(.{2})/g, "$1 ").trim(), this.length > k && (G += " ... "), "<Buffer " + G + ">";
}, Q && (D.prototype[Q] = D.prototype.inspect), D.prototype.compare = function(G, k, S, l, m) {
if (SA(G, Uint8Array) && (G = D.from(G, G.offset, G.byteLength)), !D.isBuffer(G))
throw new TypeError(
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof G
);
if (k === void 0 && (k = 0), S === void 0 && (S = G ? G.length : 0), l === void 0 && (l = 0), m === void 0 && (m = this.length), k < 0 || S > G.length || l < 0 || m > this.length)
throw new RangeError("out of range index");
if (l >= m && k >= S)
return 0;
if (l >= m)
return -1;
if (k >= S)
return 1;
if (k >>>= 0, S >>>= 0, l >>>= 0, m >>>= 0, this === G) return 0;
let P = m - l, pA = S - k;
const $A = Math.min(P, pA), OA = this.slice(l, m), Ag = G.slice(k, S);
for (let WA = 0; WA < $A; ++WA)
if (OA[WA] !== Ag[WA]) {
P = OA[WA], pA = Ag[WA];
break;
}
return P < pA ? -1 : pA < P ? 1 : 0;
};
function f(F, G, k, S, l) {
if (F.length === 0) return -1;
if (typeof k == "string" ? (S = k, k = 0) : k > 2147483647 ? k = 2147483647 : k < -2147483648 && (k = -2147483648), k = +k, wI(k) && (k = l ? 0 : F.length - 1), k < 0 && (k = F.length + k), k >= F.length) {
if (l) return -1;
k = F.length - 1;
} else if (k < 0)
if (l) k = 0;
else return -1;
if (typeof G == "string" && (G = D.from(G, S)), D.isBuffer(G))
return G.length === 0 ? -1 : j(F, G, k, S, l);
if (typeof G == "number")
return G = G & 255, typeof Uint8Array.prototype.indexOf == "function" ? l ? Uint8Array.prototype.indexOf.call(F, G, k) : Uint8Array.prototype.lastIndexOf.call(F, G, k) : j(F, [G], k, S, l);
throw new TypeError("val must be string, number or Buffer");
}
function j(F, G, k, S, l) {
let m = 1, P = F.length, pA = G.length;
if (S !== void 0 && (S = String(S).toLowerCase(), S === "ucs2" || S === "ucs-2" || S === "utf16le" || S === "utf-16le")) {
if (F.length < 2 || G.length < 2)
return -1;
m = 2, P /= 2, pA /= 2, k /= 2;
}
function $A(Ag, WA) {
return m === 1 ? Ag[WA] : Ag.readUInt16BE(WA * m);
}
let OA;
if (l) {
let Ag = -1;
for (OA = k; OA < P; OA++)
if ($A(F, OA) === $A(G, Ag === -1 ? 0 : OA - Ag)) {
if (Ag === -1 && (Ag = OA), OA - Ag + 1 === pA) return Ag * m;
} else
Ag !== -1 && (OA -= OA - Ag), Ag = -1;
} else
for (k + pA > P && (k = P - pA), OA = k; OA >= 0; OA--) {
let Ag = !0;
for (let WA = 0; WA < pA; WA++)
if ($A(F, OA + WA) !== $A(G, WA)) {
Ag = !1;
break;
}
if (Ag) return OA;
}
return -1;
}
D.prototype.includes = function(G, k, S) {
return this.indexOf(G, k, S) !== -1;
}, D.prototype.indexOf = function(G, k, S) {
return f(this, G, k, S, !0);
}, D.prototype.lastIndexOf = function(G, k, S) {
return f(this, G, k, S, !1);
};
function W(F, G, k, S) {
k = Number(k) || 0;
const l = F.length - k;
S ? (S = Number(S), S > l && (S = l)) : S = l;
const m = G.length;
S > m / 2 && (S = m / 2);
let P;
for (P = 0; P < S; ++P) {
const pA = parseInt(G.substr(P * 2, 2), 16);
if (wI(pA)) return P;
F[k + P] = pA;
}
return P;
}
function T(F, G, k, S) {
return AI(vA(G, F.length - k), F, k, S);
}
function BA(F, G, k, S) {
return AI(Rg(G), F, k, S);
}
function iA(F, G, k, S) {
return AI(lg(G), F, k, S);
}
function aA(F, G, k, S) {
return AI(sg(G, F.length - k), F, k, S);
}
D.prototype.write = function(G, k, S, l) {
if (k === void 0)
l = "utf8", S = this.length, k = 0;
else if (S === void 0 && typeof k == "string")
l = k, S = this.length, k = 0;
else if (isFinite(k))
k = k >>> 0, isFinite(S) ? (S = S >>> 0, l === void 0 && (l = "utf8")) : (l = S, S = void 0);
else
throw new Error(
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
);
const m = this.length - k;
if ((S === void 0 || S > m) && (S = m), G.length > 0 && (S < 0 || k < 0) || k > this.length)
throw new RangeError("Attempt to write outside buffer bounds");
l || (l = "utf8");
let P = !1;
for (; ; )
switch (l) {
case "hex":
return W(this, G, k, S);
case "utf8":
case "utf-8":
return T(this, G, k, S);
case "ascii":
case "latin1":
case "binary":
return BA(this, G, k, S);
case "base64":
return iA(this, G, k, S);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return aA(this, G, k, S);
default:
if (P) throw new TypeError("Unknown encoding: " + l);
l = ("" + l).toLowerCase(), P = !0;
}
}, D.prototype.toJSON = function() {
return {
type: "Buffer",
data: Array.prototype.slice.call(this._arr || this, 0)
};
};
function EA(F, G, k) {
return G === 0 && k === F.length ? A.fromByteArray(F) : A.fromByteArray(F.slice(G, k));
}
function $(F, G, k) {
k = Math.min(F.length, k);
const S = [];
let l = G;
for (; l < k; ) {
const m = F[l];
let P = null, pA = m > 239 ? 4 : m > 223 ? 3 : m > 191 ? 2 : 1;
if (l + pA <= k) {
let $A, OA, Ag, WA;
switch (pA) {
case 1:
m < 128 && (P = m);
break;
case 2:
$A = F[l + 1], ($A & 192) === 128 && (WA = (m & 31) << 6 | $A & 63, WA > 127 && (P = WA));
break;
case 3:
$A = F[l + 1], OA = F[l + 2], ($A & 192) === 128 && (OA & 192) === 128 && (WA = (m & 15) << 12 | ($A & 63) << 6 | OA & 63, WA > 2047 && (WA < 55296 || WA > 57343) && (P = WA));
break;
case 4:
$A = F[l + 1], OA = F[l + 2], Ag = F[l + 3], ($A & 192) === 128 && (OA & 192) === 128 && (Ag & 192) === 128 && (WA = (m & 15) << 18 | ($A & 63) << 12 | (OA & 63) << 6 | Ag & 63, WA > 65535 && WA < 1114112 && (P = WA));
}
}
P === null ? (P = 65533, pA = 1) : P > 65535 && (P -= 65536, S.push(P >>> 10 & 1023 | 55296), P = 56320 | P & 1023), S.push(P), l += pA;
}
return z(S);
}
const AA = 4096;
function z(F) {
const G = F.length;
if (G <= AA)
return String.fromCharCode.apply(String, F);
let k = "", S = 0;
for (; S < G; )
k += String.fromCharCode.apply(
String,
F.slice(S, S += AA)
);
return k;
}
function IA(F, G, k) {
let S = "";
k = Math.min(F.length, k);
for (let l = G; l < k; ++l)
S += String.fromCharCode(F[l] & 127);
return S;
}
function Z(F, G, k) {
let S = "";
k = Math.min(F.length, k);
for (let l = G; l < k; ++l)
S += String.fromCharCode(F[l]);
return S;
}
function V(F, G, k) {
const S = F.length;
(!G || G < 0) && (G = 0), (!k || k < 0 || k > S) && (k = S);
let l = "";
for (let m = G; m < k; ++m)
l += xQ[F[m]];
return l;
}
function oA(F, G, k) {
const S = F.slice(G, k);
let l = "";
for (let m = 0; m < S.length - 1; m += 2)
l += String.fromCharCode(S[m] + S[m + 1] * 256);
return l;
}
D.prototype.slice = function(G, k) {
const S = this.length;
G = ~~G, k = k === void 0 ? S : ~~k, G < 0 ? (G += S, G < 0 && (G = 0)) : G > S && (G = S), k < 0 ? (k += S, k < 0 && (k = 0)) : k > S && (k = S), k < G && (k = G);
const l = this.subarray(G, k);
return Object.setPrototypeOf(l, D.prototype), l;
};
function QA(F, G, k) {
if (F % 1 !== 0 || F < 0) throw new RangeError("offset is not uint");
if (F + G > k) throw new RangeError("Trying to access beyond buffer length");
}
D.prototype.readUintLE = D.prototype.readUIntLE = function(G, k, S) {
G = G >>> 0, k = k >>> 0, S || QA(G, k, this.length);
let l = this[G], m = 1, P = 0;
for (; ++P < k && (m *= 256); )
l += this[G + P] * m;
return l;
}, D.prototype.readUintBE = D.prototype.readUIntBE = function(G, k, S) {
G = G >>> 0, k = k >>> 0, S || QA(G, k, this.length);
let l = this[G + --k], m = 1;
for (; k > 0 && (m *= 256); )
l += this[G + --k] * m;
return l;
}, D.prototype.readUint8 = D.prototype.readUInt8 = function(G, k) {
return G = G >>> 0, k || QA(G, 1, this.length), this[G];
}, D.prototype.readUint16LE = D.prototype.readUInt16LE = function(G, k) {
return G = G >>> 0, k || QA(G, 2, this.length), this[G] | this[G + 1] << 8;
}, D.prototype.readUint16BE = D.prototype.readUInt16BE = function(G, k) {
return G = G >>> 0, k || QA(G, 2, this.length), this[G] << 8 | this[G + 1];
}, D.prototype.readUint32LE = D.prototype.readUInt32LE = function(G, k) {
return G = G >>> 0, k || QA(G, 4, this.length), (this[G] | this[G + 1] << 8 | this[G + 2] << 16) + this[G + 3] * 16777216;
}, D.prototype.readUint32BE = D.prototype.readUInt32BE = function(G, k) {
return G = G >>> 0, k || QA(G, 4, this.length), this[G] * 16777216 + (this[G + 1] << 16 | this[G + 2] << 8 | this[G + 3]);
}, D.prototype.readBigUInt64LE = Lg(function(G) {
G = G >>> 0, RA(G, "offset");
const k = this[G], S = this[G + 7];
(k === void 0 || S === void 0) && jA(G, this.length - 8);
const l = k + this[++G] * 2 ** 8 + this[++G] * 2 ** 16 + this[++G] * 2 ** 24, m = this[++G] + this[++G] * 2 ** 8 + this[++G] * 2 ** 16 + S * 2 ** 24;
return BigInt(l) + (BigInt(m) << BigInt(32));
}), D.prototype.readBigUInt64BE = Lg(function(G) {
G = G >>> 0, RA(G, "offset");
const k = this[G], S = this[G + 7];
(k === void 0 || S === void 0) && jA(G, this.length - 8);
const l = k * 2 ** 24 + this[++G] * 2 ** 16 + this[++G] * 2 ** 8 + this[++G], m = this[++G] * 2 ** 24 + this[++G] * 2 ** 16 + this[++G] * 2 ** 8 + S;
return (BigInt(l) << BigInt(32)) + BigInt(m);
}), D.prototype.readIntLE = function(G, k, S) {
G = G >>> 0, k = k >>> 0, S || QA(G, k, this.length);
let l = this[G], m = 1, P = 0;
for (; ++P < k && (m *= 256); )
l += this[G + P] * m;
return m *= 128, l >= m && (l -= Math.pow(2, 8 * k)), l;
}, D.prototype.readIntBE = function(G, k, S) {
G = G >>> 0, k = k >>> 0, S || QA(G, k, this.length);
let l = k, m = 1, P = this[G + --l];
for (; l > 0 && (m *= 256); )
P += this[G + --l] * m;
return m *= 128, P >= m && (P -= Math.pow(2, 8 * k)), P;
}, D.prototype.readInt8 = function(G, k) {
return G = G >>> 0, k || QA(G, 1, this.length), this[G] & 128 ? (255 - this[G] + 1) * -1 : this[G];
}, D.prototype.readInt16LE = function(G, k) {
G = G >>> 0, k || QA(G, 2, this.length);
const S = this[G] | this[G + 1] << 8;
return S & 32768 ? S | 4294901760 : S;
}, D.prototype.readInt16BE = function(G, k) {
G = G >>> 0, k || QA(G, 2, this.length);
const S = this[G + 1] | this[G] << 8;
return S & 32768 ? S | 4294901760 : S;
}, D.prototype.readInt32LE = function(G, k) {
return G = G >>> 0, k || QA(G, 4, this.length), this[G] | this[G + 1] << 8 | this[G + 2] << 16 | this[G + 3] << 24;
}, D.prototype.readInt32BE = function(G, k) {
return G = G >>> 0, k || QA(G, 4, this.length), this[G] << 24 | this[G + 1] << 16 | this[G + 2] << 8 | this[G + 3];
}, D.prototype.readBigInt64LE = Lg(function(G) {
G = G >>> 0, RA(G, "offset");
const k = this[G], S = this[G + 7];
(k === void 0 || S === void 0) && jA(G, this.length - 8);
const l = this[G + 4] + this[G + 5] * 2 ** 8 + this[G + 6] * 2 ** 16 + (S << 24);
return (BigInt(l) << BigInt(32)) + BigInt(k + this[++G] * 2 ** 8 + this[++G] * 2 ** 16 + this[++G] * 2 ** 24);
}), D.prototype.readBigInt64BE = Lg(function(G) {
G = G >>> 0, RA(G, "offset");
const k = this[G], S = this[G + 7];
(k === void 0 || S === void 0) && jA(G, this.length - 8);
const l = (k << 24) + // Overflow
this[++G] * 2 ** 16 + this[++G] * 2 ** 8 + this[++G];
return (BigInt(l) << BigInt(32)) + BigInt(this[++G] * 2 ** 24 + this[++G] * 2 ** 16 + this[++G] * 2 ** 8 + S);
}), D.prototype.readFloatLE = function(G, k) {
return G = G >>> 0, k || QA(G, 4, this.length), g.read(this, G, !0, 23, 4);
}, D.prototype.readFloatBE = function(G, k) {
return G = G >>> 0, k || QA(G, 4, this.length), g.read(this, G, !1, 23, 4);
}, D.prototype.readDoubleLE = function(G, k) {
return G = G >>> 0, k || QA(G, 8, this.length), g.read(this, G, !0, 52, 8);
}, D.prototype.readDoubleBE = function(G, k) {
return G = G >>> 0, k || QA(G, 8, this.length), g.read(this, G, !1, 52, 8);
};
function rA(F, G, k, S, l, m) {
if (!D.isBuffer(F)) throw new TypeError('"buffer" argument must be a Buffer instance');
if (G > l || G < m) throw new RangeError('"value" argument is out of bounds');
if (k + S > F.length) throw new RangeError("Index out of range");
}
D.prototype.writeUintLE = D.prototype.writeUIntLE = function(G, k, S, l) {
if (G = +G, k = k >>> 0, S = S >>> 0, !l) {
const pA = Math.pow(2, 8 * S) - 1;
rA(this, G, k, S, pA, 0);
}
let m = 1, P = 0;
for (this[k] = G & 255; ++P < S && (m *= 256); )
this[k + P] = G / m & 255;
return k + S;
}, D.prototype.writeUintBE = D.prototype.writeUIntBE = function(G, k, S, l) {
if (G = +G, k = k >>> 0, S = S >>> 0, !l) {
const pA = Math.pow(2, 8 * S) - 1;
rA(this, G, k, S, pA, 0);
}
let m = S - 1, P = 1;
for (this[k + m] = G & 255; --m >= 0 && (P *= 256); )
this[k + m] = G / P & 255;
return k + S;
}, D.prototype.writeUint8 = D.prototype.writeUInt8 = function(G, k, S) {
return G = +G, k = k >>> 0, S || rA(this, G, k, 1, 255, 0), this[k] = G & 255, k + 1;
}, D.prototype.writeUint16LE = D.prototype.writeUInt16LE = function(G, k, S) {
return G = +G, k = k >>> 0, S || rA(this, G, k, 2, 65535, 0), this[k] = G & 255, this[k + 1] = G >>> 8, k + 2;
}, D.prototype.writeUint16BE = D.prototype.writeUInt16BE = function(G, k, S) {
return G = +G, k = k >>> 0, S || rA(this, G, k, 2, 65535, 0), this[k] = G >>> 8, this[k + 1] = G & 255, k + 2;
}, D.prototype.writeUint32LE = D.prototype.writeUInt32LE = function(G, k, S) {
return G = +G, k = k >>> 0, S || rA(this, G, k, 4, 4294967295, 0), this[k + 3] = G >>> 24, this[k + 2] = G >>> 16, this[k + 1] = G >>> 8, this[k] = G & 255, k + 4;
}, D.prototype.writeUint32BE = D.prototype.writeUInt32BE = function(G, k, S) {
return G = +G, k = k >>> 0, S || rA(this, G, k, 4, 4294967295, 0), this[k] = G >>> 24, this[k + 1] = G >>> 16, this[k + 2] = G >>> 8, this[k + 3] = G & 255, k + 4;
};
function lA(F, G, k, S, l) {
xA(G, S, l, F, k, 7);
let m = Number(G & BigInt(4294967295));
F[k++] = m, m = m >> 8, F[k++] = m, m = m >> 8, F[k++] = m, m = m >> 8, F[k++] = m;
let P = Number(G >> BigInt(32) & BigInt(4294967295));
return F[k++] = P, P = P >> 8, F[k++] = P, P = P >> 8, F[k++] = P, P = P >> 8, F[k++] = P, k;
}
function bA(F, G, k, S, l) {
xA(G, S, l, F, k, 7);
let m = Number(G & BigInt(4294967295));
F[k + 7] = m, m =