@skalenetwork/metaport
Version:
SKALE Metaport Widget
1,693 lines (1,689 loc) • 377 kB
JavaScript
import { a as Jn, s as ya, e as kr, i as Lh, c as im, b as nm, f as Sc, d as sm, J as si, g as Oc, h as Cc, j as va, E as Ac, k as mi, l as ni, m as Bn, n as am, p as om, H as Ii } from "./http-ff4a9d39.mjs";
import { q as ma, P as ie, Q as cm, R as jl, S as Ml, T as Rc, U as wa, V as um, r as ra, p as zl, W as _i, X as hm, Y as lm, Z as Y, _ as fm, $ as lc, a0 as pm, a1 as dm, a2 as gm, a3 as qh, a4 as ym, a5 as vm, a6 as mm, a7 as jh, a8 as wm, a9 as _m, aa as bm, ab as Vn, ac as Mh, ad as Em, ae as Im, af as Ul, ag as Fr, ah as xm, ai as zh, aj as hn, ak as Nt, al as Gt, am as wi, an as hr, ao as Pm, ap as ln, aq as Hl, ar as Sm, as as Om, at as Cm, au as kl, av as Am, aw as Kl, ax as Bl, ay as pn, az as fc, aA as ua, aB as dn, aC as Rm, aD as ha, aE as Tm, aF as $m, aG as Nm, aH as Fm, aI as ia, aJ as Dm, aK as Lm, aL as Wo, aM as Uh, aN as qm, aO as jm, aP as Mm, aQ as Hh, aR as zm, aS as Um, aT as Hm, aU as km, aV as Km, aW as Bm, aX as Vm, aY as Hn, aZ as Vl, a_ as Jo, a$ as Gm, b0 as Wm } from "./index-4375ce67.mjs";
import "react";
import "react/jsx-runtime";
import "react-dom";
const Jm = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, Qm = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, Ym = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
function Xm(o, r) {
if (o === "__proto__" || o === "constructor" && r && typeof r == "object" && "prototype" in r) {
Zm(o);
return;
}
return r;
}
function Zm(o) {
console.warn(`[destr] Dropping "${o}" key to prevent prototype pollution.`);
}
function na(o, r = {}) {
if (typeof o != "string")
return o;
const t = o.trim();
if (
// eslint-disable-next-line unicorn/prefer-at
o[0] === '"' && o.at(-1) === '"' && !o.includes("\\")
)
return t.slice(1, -1);
if (t.length <= 9) {
const n = t.toLowerCase();
if (n === "true")
return !0;
if (n === "false")
return !1;
if (n === "undefined")
return;
if (n === "null")
return null;
if (n === "nan")
return Number.NaN;
if (n === "infinity")
return Number.POSITIVE_INFINITY;
if (n === "-infinity")
return Number.NEGATIVE_INFINITY;
}
if (!Ym.test(o)) {
if (r.strict)
throw new SyntaxError("[destr] Invalid JSON");
return o;
}
try {
if (Jm.test(o) || Qm.test(o)) {
if (r.strict)
throw new Error("[destr] Possible prototype pollution");
return JSON.parse(o, Xm);
}
return JSON.parse(o);
} catch (n) {
if (r.strict)
throw n;
return o;
}
}
function e1(o) {
return !o || typeof o.then != "function" ? Promise.resolve(o) : o;
}
function zt(o, ...r) {
try {
return e1(o(...r));
} catch (t) {
return Promise.reject(t);
}
}
function t1(o) {
const r = typeof o;
return o === null || r !== "object" && r !== "function";
}
function r1(o) {
const r = Object.getPrototypeOf(o);
return !r || r.isPrototypeOf(Object);
}
function la(o) {
if (t1(o))
return String(o);
if (r1(o) || Array.isArray(o))
return JSON.stringify(o);
if (typeof o.toJSON == "function")
return la(o.toJSON());
throw new Error("[unstorage] Cannot stringify value!");
}
function Gl() {
if (typeof Buffer === void 0)
throw new TypeError("[unstorage] Buffer is not supported!");
}
const pc = "base64:";
function i1(o) {
if (typeof o == "string")
return o;
Gl();
const r = Buffer.from(o).toString("base64");
return pc + r;
}
function n1(o) {
return typeof o != "string" || !o.startsWith(pc) ? o : (Gl(), Buffer.from(o.slice(pc.length), "base64"));
}
function ur(o) {
return o ? o.split("?")[0].replace(/[/\\]/g, ":").replace(/:+/g, ":").replace(/^:|:$/g, "") : "";
}
function s1(...o) {
return ur(o.join(":"));
}
function sa(o) {
return o = ur(o), o ? o + ":" : "";
}
const a1 = "memory", o1 = () => {
const o = /* @__PURE__ */ new Map();
return {
name: a1,
options: {},
hasItem(r) {
return o.has(r);
},
getItem(r) {
return o.get(r) ?? null;
},
getItemRaw(r) {
return o.get(r) ?? null;
},
setItem(r, t) {
o.set(r, t);
},
setItemRaw(r, t) {
o.set(r, t);
},
removeItem(r) {
o.delete(r);
},
getKeys() {
return Array.from(o.keys());
},
clear() {
o.clear();
},
dispose() {
o.clear();
}
};
};
function c1(o = {}) {
const r = {
mounts: { "": o.driver || o1() },
mountpoints: [""],
watching: !1,
watchListeners: [],
unwatch: {}
}, t = (p) => {
for (const _ of r.mountpoints)
if (p.startsWith(_))
return {
base: _,
relativeKey: p.slice(_.length),
driver: r.mounts[_]
};
return {
base: "",
relativeKey: p,
driver: r.mounts[""]
};
}, n = (p, _) => r.mountpoints.filter(
(O) => O.startsWith(p) || _ && p.startsWith(O)
).map((O) => ({
relativeBase: p.length > O.length ? p.slice(O.length) : void 0,
mountpoint: O,
driver: r.mounts[O]
})), a = (p, _) => {
if (r.watching) {
_ = ur(_);
for (const O of r.watchListeners)
O(p, _);
}
}, u = async () => {
if (!r.watching) {
r.watching = !0;
for (const p in r.mounts)
r.unwatch[p] = await kh(
r.mounts[p],
a,
p
);
}
}, f = async () => {
if (r.watching) {
for (const p in r.unwatch)
await r.unwatch[p]();
r.unwatch = {}, r.watching = !1;
}
}, y = (p, _, O) => {
const S = /* @__PURE__ */ new Map(), L = ($) => {
let K = S.get($.base);
return K || (K = {
driver: $.driver,
base: $.base,
items: []
}, S.set($.base, K)), K;
};
for (const $ of p) {
const K = typeof $ == "string", re = ur(K ? $ : $.key), ce = K ? void 0 : $.value, ue = K || !$.options ? _ : { ..._, ...$.options }, he = t(re);
L(he).items.push({
key: re,
value: ce,
relativeKey: he.relativeKey,
options: ue
});
}
return Promise.all([...S.values()].map(($) => O($))).then(
($) => $.flat()
);
}, w = {
// Item
hasItem(p, _ = {}) {
p = ur(p);
const { relativeKey: O, driver: S } = t(p);
return zt(S.hasItem, O, _);
},
getItem(p, _ = {}) {
p = ur(p);
const { relativeKey: O, driver: S } = t(p);
return zt(S.getItem, O, _).then(
(L) => na(L)
);
},
getItems(p, _) {
return y(p, _, (O) => O.driver.getItems ? zt(
O.driver.getItems,
O.items.map((S) => ({
key: S.relativeKey,
options: S.options
})),
_
).then(
(S) => S.map((L) => ({
key: s1(O.base, L.key),
value: na(L.value)
}))
) : Promise.all(
O.items.map((S) => zt(
O.driver.getItem,
S.relativeKey,
S.options
).then((L) => ({
key: S.key,
value: na(L)
})))
));
},
getItemRaw(p, _ = {}) {
p = ur(p);
const { relativeKey: O, driver: S } = t(p);
return S.getItemRaw ? zt(S.getItemRaw, O, _) : zt(S.getItem, O, _).then(
(L) => n1(L)
);
},
async setItem(p, _, O = {}) {
if (_ === void 0)
return w.removeItem(p);
p = ur(p);
const { relativeKey: S, driver: L } = t(p);
L.setItem && (await zt(L.setItem, S, la(_), O), L.watch || a("update", p));
},
async setItems(p, _) {
await y(p, _, async (O) => {
O.driver.setItems && await zt(
O.driver.setItems,
O.items.map((S) => ({
key: S.relativeKey,
value: la(S.value),
options: S.options
})),
_
), O.driver.setItem && await Promise.all(
O.items.map((S) => zt(
O.driver.setItem,
S.relativeKey,
la(S.value),
S.options
))
);
});
},
async setItemRaw(p, _, O = {}) {
if (_ === void 0)
return w.removeItem(p, O);
p = ur(p);
const { relativeKey: S, driver: L } = t(p);
if (L.setItemRaw)
await zt(L.setItemRaw, S, _, O);
else if (L.setItem)
await zt(L.setItem, S, i1(_), O);
else
return;
L.watch || a("update", p);
},
async removeItem(p, _ = {}) {
typeof _ == "boolean" && (_ = { removeMeta: _ }), p = ur(p);
const { relativeKey: O, driver: S } = t(p);
S.removeItem && (await zt(S.removeItem, O, _), (_.removeMeta || _.removeMata) && await zt(S.removeItem, O + "$", _), S.watch || a("remove", p));
},
// Meta
async getMeta(p, _ = {}) {
typeof _ == "boolean" && (_ = { nativeOnly: _ }), p = ur(p);
const { relativeKey: O, driver: S } = t(p), L = /* @__PURE__ */ Object.create(null);
if (S.getMeta && Object.assign(L, await zt(S.getMeta, O, _)), !_.nativeOnly) {
const $ = await zt(
S.getItem,
O + "$",
_
).then((K) => na(K));
$ && typeof $ == "object" && (typeof $.atime == "string" && ($.atime = new Date($.atime)), typeof $.mtime == "string" && ($.mtime = new Date($.mtime)), Object.assign(L, $));
}
return L;
},
setMeta(p, _, O = {}) {
return this.setItem(p + "$", _, O);
},
removeMeta(p, _ = {}) {
return this.removeItem(p + "$", _);
},
// Keys
async getKeys(p, _ = {}) {
p = sa(p);
const O = n(p, !0);
let S = [];
const L = [];
for (const $ of O) {
const re = (await zt(
$.driver.getKeys,
$.relativeBase,
_
)).map((ce) => $.mountpoint + ur(ce)).filter((ce) => !S.some((ue) => ce.startsWith(ue)));
L.push(...re), S = [
$.mountpoint,
...S.filter((ce) => !ce.startsWith($.mountpoint))
];
}
return p ? L.filter(($) => $.startsWith(p) && !$.endsWith("$")) : L.filter(($) => !$.endsWith("$"));
},
// Utils
async clear(p, _ = {}) {
p = sa(p), await Promise.all(
n(p, !1).map(async (O) => {
if (O.driver.clear)
return zt(O.driver.clear, O.relativeBase, _);
if (O.driver.removeItem) {
const S = await O.driver.getKeys(O.relativeBase || "", _);
return Promise.all(
S.map((L) => O.driver.removeItem(L, _))
);
}
})
);
},
async dispose() {
await Promise.all(
Object.values(r.mounts).map((p) => Kh(p))
);
},
async watch(p) {
return await u(), r.watchListeners.push(p), async () => {
r.watchListeners = r.watchListeners.filter(
(_) => _ !== p
), r.watchListeners.length === 0 && await f();
};
},
async unwatch() {
r.watchListeners = [], await f();
},
// Mount
mount(p, _) {
if (p = sa(p), p && r.mounts[p])
throw new Error(`already mounted at ${p}`);
return p && (r.mountpoints.push(p), r.mountpoints.sort((O, S) => S.length - O.length)), r.mounts[p] = _, r.watching && Promise.resolve(kh(_, a, p)).then((O) => {
r.unwatch[p] = O;
}).catch(console.error), w;
},
async unmount(p, _ = !0) {
p = sa(p), !(!p || !r.mounts[p]) && (r.watching && p in r.unwatch && (r.unwatch[p](), delete r.unwatch[p]), _ && await Kh(r.mounts[p]), r.mountpoints = r.mountpoints.filter((O) => O !== p), delete r.mounts[p]);
},
getMount(p = "") {
p = ur(p) + ":";
const _ = t(p);
return {
driver: _.driver,
base: _.base
};
},
getMounts(p = "", _ = {}) {
return p = ur(p), n(p, _.parents).map((S) => ({
driver: S.driver,
base: S.mountpoint
}));
}
};
return w;
}
function kh(o, r, t) {
return o.watch ? o.watch((n, a) => r(n, t + a)) : () => {
};
}
async function Kh(o) {
typeof o.dispose == "function" && await zt(o.dispose);
}
function zi(o) {
return new Promise((r, t) => {
o.oncomplete = o.onsuccess = () => r(o.result), o.onabort = o.onerror = () => t(o.error);
});
}
function Wl(o, r) {
const t = indexedDB.open(o);
t.onupgradeneeded = () => t.result.createObjectStore(r);
const n = zi(t);
return (a, u) => n.then((f) => u(f.transaction(r, a).objectStore(r)));
}
let Qo;
function Qn() {
return Qo || (Qo = Wl("keyval-store", "keyval")), Qo;
}
function Bh(o, r = Qn()) {
return r("readonly", (t) => zi(t.get(o)));
}
function u1(o, r, t = Qn()) {
return t("readwrite", (n) => (n.put(r, o), zi(n.transaction)));
}
function h1(o, r = Qn()) {
return r("readwrite", (t) => (t.delete(o), zi(t.transaction)));
}
function l1(o = Qn()) {
return o("readwrite", (r) => (r.clear(), zi(r.transaction)));
}
function f1(o, r) {
return o.openCursor().onsuccess = function() {
this.result && (r(this.result), this.result.continue());
}, zi(o.transaction);
}
function p1(o = Qn()) {
return o("readonly", (r) => {
if (r.getAllKeys)
return zi(r.getAllKeys());
const t = [];
return f1(r, (n) => t.push(n.key)).then(() => t);
});
}
const d1 = "idb-keyval";
var g1 = (o = {}) => {
const r = o.base && o.base.length > 0 ? `${o.base}:` : "", t = (a) => r + a;
let n;
return o.dbName && o.storeName && (n = Wl(o.dbName, o.storeName)), { name: d1, options: o, async hasItem(a) {
return !(typeof await Bh(t(a), n) > "u");
}, async getItem(a) {
return await Bh(t(a), n) ?? null;
}, setItem(a, u) {
return u1(t(a), u, n);
}, removeItem(a) {
return h1(t(a), n);
}, getKeys() {
return p1(n);
}, clear() {
return l1(n);
} };
};
const y1 = "WALLET_CONNECT_V2_INDEXED_DB", v1 = "keyvaluestorage";
let m1 = class {
constructor() {
this.indexedDb = c1({ driver: g1({ dbName: y1, storeName: v1 }) });
}
async getKeys() {
return this.indexedDb.getKeys();
}
async getEntries() {
return (await this.indexedDb.getItems(await this.indexedDb.getKeys())).map((r) => [r.key, r.value]);
}
async getItem(r) {
const t = await this.indexedDb.getItem(r);
if (t !== null)
return t;
}
async setItem(r, t) {
await this.indexedDb.setItem(r, Jn(t));
}
async removeItem(r) {
await this.indexedDb.removeItem(r);
}
};
var Yo = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, fa = { exports: {} };
(function() {
let o;
function r() {
}
o = r, o.prototype.getItem = function(t) {
return this.hasOwnProperty(t) ? String(this[t]) : null;
}, o.prototype.setItem = function(t, n) {
this[t] = String(n);
}, o.prototype.removeItem = function(t) {
delete this[t];
}, o.prototype.clear = function() {
const t = this;
Object.keys(t).forEach(function(n) {
t[n] = void 0, delete t[n];
});
}, o.prototype.key = function(t) {
return t = t || 0, Object.keys(this)[t];
}, o.prototype.__defineGetter__("length", function() {
return Object.keys(this).length;
}), typeof Yo < "u" && Yo.localStorage ? fa.exports = Yo.localStorage : typeof window < "u" && window.localStorage ? fa.exports = window.localStorage : fa.exports = new r();
})();
function w1(o) {
var r;
return [o[0], ya((r = o[1]) != null ? r : "")];
}
class _1 {
constructor() {
this.localStorage = fa.exports;
}
async getKeys() {
return Object.keys(this.localStorage);
}
async getEntries() {
return Object.entries(this.localStorage).map(w1);
}
async getItem(r) {
const t = this.localStorage.getItem(r);
if (t !== null)
return ya(t);
}
async setItem(r, t) {
this.localStorage.setItem(r, Jn(t));
}
async removeItem(r) {
this.localStorage.removeItem(r);
}
}
const b1 = "wc_storage_version", Vh = 1, E1 = async (o, r, t) => {
const n = b1, a = await r.getItem(n);
if (a && a >= Vh) {
t(r);
return;
}
const u = await o.getKeys();
if (!u.length) {
t(r);
return;
}
const f = [];
for (; u.length; ) {
const y = u.shift();
if (!y)
continue;
const w = y.toLowerCase();
if (w.includes("wc@") || w.includes("walletconnect") || w.includes("wc_") || w.includes("wallet_connect")) {
const p = await o.getItem(y);
await r.setItem(y, p), f.push(y);
}
}
await r.setItem(n, Vh), t(r), I1(o, f);
}, I1 = async (o, r) => {
r.length && r.forEach(async (t) => {
await o.removeItem(t);
});
};
let x1 = class {
constructor() {
this.initialized = !1, this.setInitialized = (t) => {
this.storage = t, this.initialized = !0;
};
const r = new _1();
this.storage = r;
try {
const t = new m1();
E1(r, t, this.setInitialized);
} catch {
this.initialized = !0;
}
}
async getKeys() {
return await this.initialize(), this.storage.getKeys();
}
async getEntries() {
return await this.initialize(), this.storage.getEntries();
}
async getItem(r) {
return await this.initialize(), this.storage.getItem(r);
}
async setItem(r, t) {
return await this.initialize(), this.storage.setItem(r, t);
}
async removeItem(r) {
return await this.initialize(), this.storage.removeItem(r);
}
async initialize() {
this.initialized || await new Promise((r) => {
const t = setInterval(() => {
this.initialized && (clearInterval(t), r());
}, 20);
});
}
};
var gn = {};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var dc = function(o, r) {
return dc = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
t.__proto__ = n;
} || function(t, n) {
for (var a in n)
n.hasOwnProperty(a) && (t[a] = n[a]);
}, dc(o, r);
};
function P1(o, r) {
dc(o, r);
function t() {
this.constructor = o;
}
o.prototype = r === null ? Object.create(r) : (t.prototype = r.prototype, new t());
}
var gc = function() {
return gc = Object.assign || function(r) {
for (var t, n = 1, a = arguments.length; n < a; n++) {
t = arguments[n];
for (var u in t)
Object.prototype.hasOwnProperty.call(t, u) && (r[u] = t[u]);
}
return r;
}, gc.apply(this, arguments);
};
function S1(o, r) {
var t = {};
for (var n in o)
Object.prototype.hasOwnProperty.call(o, n) && r.indexOf(n) < 0 && (t[n] = o[n]);
if (o != null && typeof Object.getOwnPropertySymbols == "function")
for (var a = 0, n = Object.getOwnPropertySymbols(o); a < n.length; a++)
r.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(o, n[a]) && (t[n[a]] = o[n[a]]);
return t;
}
function O1(o, r, t, n) {
var a = arguments.length, u = a < 3 ? r : n === null ? n = Object.getOwnPropertyDescriptor(r, t) : n, f;
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
u = Reflect.decorate(o, r, t, n);
else
for (var y = o.length - 1; y >= 0; y--)
(f = o[y]) && (u = (a < 3 ? f(u) : a > 3 ? f(r, t, u) : f(r, t)) || u);
return a > 3 && u && Object.defineProperty(r, t, u), u;
}
function C1(o, r) {
return function(t, n) {
r(t, n, o);
};
}
function A1(o, r) {
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
return Reflect.metadata(o, r);
}
function R1(o, r, t, n) {
function a(u) {
return u instanceof t ? u : new t(function(f) {
f(u);
});
}
return new (t || (t = Promise))(function(u, f) {
function y(_) {
try {
p(n.next(_));
} catch (O) {
f(O);
}
}
function w(_) {
try {
p(n.throw(_));
} catch (O) {
f(O);
}
}
function p(_) {
_.done ? u(_.value) : a(_.value).then(y, w);
}
p((n = n.apply(o, r || [])).next());
});
}
function T1(o, r) {
var t = { label: 0, sent: function() {
if (u[0] & 1)
throw u[1];
return u[1];
}, trys: [], ops: [] }, n, a, u, f;
return f = { next: y(0), throw: y(1), return: y(2) }, typeof Symbol == "function" && (f[Symbol.iterator] = function() {
return this;
}), f;
function y(p) {
return function(_) {
return w([p, _]);
};
}
function w(p) {
if (n)
throw new TypeError("Generator is already executing.");
for (; t; )
try {
if (n = 1, a && (u = p[0] & 2 ? a.return : p[0] ? a.throw || ((u = a.return) && u.call(a), 0) : a.next) && !(u = u.call(a, p[1])).done)
return u;
switch (a = 0, u && (p = [p[0] & 2, u.value]), p[0]) {
case 0:
case 1:
u = p;
break;
case 4:
return t.label++, { value: p[1], done: !1 };
case 5:
t.label++, a = p[1], p = [0];
continue;
case 7:
p = t.ops.pop(), t.trys.pop();
continue;
default:
if (u = t.trys, !(u = u.length > 0 && u[u.length - 1]) && (p[0] === 6 || p[0] === 2)) {
t = 0;
continue;
}
if (p[0] === 3 && (!u || p[1] > u[0] && p[1] < u[3])) {
t.label = p[1];
break;
}
if (p[0] === 6 && t.label < u[1]) {
t.label = u[1], u = p;
break;
}
if (u && t.label < u[2]) {
t.label = u[2], t.ops.push(p);
break;
}
u[2] && t.ops.pop(), t.trys.pop();
continue;
}
p = r.call(o, t);
} catch (_) {
p = [6, _], a = 0;
} finally {
n = u = 0;
}
if (p[0] & 5)
throw p[1];
return { value: p[0] ? p[1] : void 0, done: !0 };
}
}
function $1(o, r, t, n) {
n === void 0 && (n = t), o[n] = r[t];
}
function N1(o, r) {
for (var t in o)
t !== "default" && !r.hasOwnProperty(t) && (r[t] = o[t]);
}
function yc(o) {
var r = typeof Symbol == "function" && Symbol.iterator, t = r && o[r], n = 0;
if (t)
return t.call(o);
if (o && typeof o.length == "number")
return {
next: function() {
return o && n >= o.length && (o = void 0), { value: o && o[n++], done: !o };
}
};
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function Jl(o, r) {
var t = typeof Symbol == "function" && o[Symbol.iterator];
if (!t)
return o;
var n = t.call(o), a, u = [], f;
try {
for (; (r === void 0 || r-- > 0) && !(a = n.next()).done; )
u.push(a.value);
} catch (y) {
f = { error: y };
} finally {
try {
a && !a.done && (t = n.return) && t.call(n);
} finally {
if (f)
throw f.error;
}
}
return u;
}
function F1() {
for (var o = [], r = 0; r < arguments.length; r++)
o = o.concat(Jl(arguments[r]));
return o;
}
function D1() {
for (var o = 0, r = 0, t = arguments.length; r < t; r++)
o += arguments[r].length;
for (var n = Array(o), a = 0, r = 0; r < t; r++)
for (var u = arguments[r], f = 0, y = u.length; f < y; f++, a++)
n[a] = u[f];
return n;
}
function Gn(o) {
return this instanceof Gn ? (this.v = o, this) : new Gn(o);
}
function L1(o, r, t) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var n = t.apply(o, r || []), a, u = [];
return a = {}, f("next"), f("throw"), f("return"), a[Symbol.asyncIterator] = function() {
return this;
}, a;
function f(S) {
n[S] && (a[S] = function(L) {
return new Promise(function($, K) {
u.push([S, L, $, K]) > 1 || y(S, L);
});
});
}
function y(S, L) {
try {
w(n[S](L));
} catch ($) {
O(u[0][3], $);
}
}
function w(S) {
S.value instanceof Gn ? Promise.resolve(S.value.v).then(p, _) : O(u[0][2], S);
}
function p(S) {
y("next", S);
}
function _(S) {
y("throw", S);
}
function O(S, L) {
S(L), u.shift(), u.length && y(u[0][0], u[0][1]);
}
}
function q1(o) {
var r, t;
return r = {}, n("next"), n("throw", function(a) {
throw a;
}), n("return"), r[Symbol.iterator] = function() {
return this;
}, r;
function n(a, u) {
r[a] = o[a] ? function(f) {
return (t = !t) ? { value: Gn(o[a](f)), done: a === "return" } : u ? u(f) : f;
} : u;
}
}
function j1(o) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var r = o[Symbol.asyncIterator], t;
return r ? r.call(o) : (o = typeof yc == "function" ? yc(o) : o[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
return this;
}, t);
function n(u) {
t[u] = o[u] && function(f) {
return new Promise(function(y, w) {
f = o[u](f), a(y, w, f.done, f.value);
});
};
}
function a(u, f, y, w) {
Promise.resolve(w).then(function(p) {
u({ value: p, done: y });
}, f);
}
}
function M1(o, r) {
return Object.defineProperty ? Object.defineProperty(o, "raw", { value: r }) : o.raw = r, o;
}
function z1(o) {
if (o && o.__esModule)
return o;
var r = {};
if (o != null)
for (var t in o)
Object.hasOwnProperty.call(o, t) && (r[t] = o[t]);
return r.default = o, r;
}
function U1(o) {
return o && o.__esModule ? o : { default: o };
}
function H1(o, r) {
if (!r.has(o))
throw new TypeError("attempted to get private field on non-instance");
return r.get(o);
}
function k1(o, r, t) {
if (!r.has(o))
throw new TypeError("attempted to set private field on non-instance");
return r.set(o, t), t;
}
const K1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
get __assign() {
return gc;
},
__asyncDelegator: q1,
__asyncGenerator: L1,
__asyncValues: j1,
__await: Gn,
__awaiter: R1,
__classPrivateFieldGet: H1,
__classPrivateFieldSet: k1,
__createBinding: $1,
__decorate: O1,
__exportStar: N1,
__extends: P1,
__generator: T1,
__importDefault: U1,
__importStar: z1,
__makeTemplateObject: M1,
__metadata: A1,
__param: C1,
__read: Jl,
__rest: S1,
__spread: F1,
__spreadArrays: D1,
__values: yc
}, Symbol.toStringTag, { value: "Module" })), _a = /* @__PURE__ */ ma(K1);
var Dn = {}, Xo = {}, Ln = {};
class Ui {
}
const B1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
IEvents: Ui
}, Symbol.toStringTag, { value: "Module" })), V1 = /* @__PURE__ */ ma(B1);
var Gh;
function G1() {
if (Gh)
return Ln;
Gh = 1, Object.defineProperty(Ln, "__esModule", { value: !0 }), Ln.IHeartBeat = void 0;
const o = V1;
class r extends o.IEvents {
constructor(n) {
super();
}
}
return Ln.IHeartBeat = r, Ln;
}
var Wh;
function Ql() {
return Wh || (Wh = 1, function(o) {
Object.defineProperty(o, "__esModule", { value: !0 }), _a.__exportStar(G1(), o);
}(Xo)), Xo;
}
var Zo = {}, ji = {}, Jh;
function W1() {
if (Jh)
return ji;
Jh = 1, Object.defineProperty(ji, "__esModule", { value: !0 }), ji.HEARTBEAT_EVENTS = ji.HEARTBEAT_INTERVAL = void 0;
const o = ie;
return ji.HEARTBEAT_INTERVAL = o.FIVE_SECONDS, ji.HEARTBEAT_EVENTS = {
pulse: "heartbeat_pulse"
}, ji;
}
var Qh;
function Yl() {
return Qh || (Qh = 1, function(o) {
Object.defineProperty(o, "__esModule", { value: !0 }), _a.__exportStar(W1(), o);
}(Zo)), Zo;
}
var Yh;
function J1() {
if (Yh)
return Dn;
Yh = 1, Object.defineProperty(Dn, "__esModule", { value: !0 }), Dn.HeartBeat = void 0;
const o = _a, r = kr, t = ie, n = Ql(), a = Yl();
class u extends n.IHeartBeat {
constructor(y) {
super(y), this.events = new r.EventEmitter(), this.interval = a.HEARTBEAT_INTERVAL, this.interval = (y == null ? void 0 : y.interval) || a.HEARTBEAT_INTERVAL;
}
static init(y) {
return o.__awaiter(this, void 0, void 0, function* () {
const w = new u(y);
return yield w.init(), w;
});
}
init() {
return o.__awaiter(this, void 0, void 0, function* () {
yield this.initialize();
});
}
stop() {
clearInterval(this.intervalRef);
}
on(y, w) {
this.events.on(y, w);
}
once(y, w) {
this.events.once(y, w);
}
off(y, w) {
this.events.off(y, w);
}
removeListener(y, w) {
this.events.removeListener(y, w);
}
initialize() {
return o.__awaiter(this, void 0, void 0, function* () {
this.intervalRef = setInterval(() => this.pulse(), t.toMiliseconds(this.interval));
});
}
pulse() {
this.events.emit(a.HEARTBEAT_EVENTS.pulse);
}
}
return Dn.HeartBeat = u, Dn;
}
(function(o) {
Object.defineProperty(o, "__esModule", { value: !0 });
const r = _a;
r.__exportStar(J1(), o), r.__exportStar(Ql(), o), r.__exportStar(Yl(), o);
})(gn);
var Se = {};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var vc = function(o, r) {
return vc = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
t.__proto__ = n;
} || function(t, n) {
for (var a in n)
n.hasOwnProperty(a) && (t[a] = n[a]);
}, vc(o, r);
};
function Q1(o, r) {
vc(o, r);
function t() {
this.constructor = o;
}
o.prototype = r === null ? Object.create(r) : (t.prototype = r.prototype, new t());
}
var mc = function() {
return mc = Object.assign || function(r) {
for (var t, n = 1, a = arguments.length; n < a; n++) {
t = arguments[n];
for (var u in t)
Object.prototype.hasOwnProperty.call(t, u) && (r[u] = t[u]);
}
return r;
}, mc.apply(this, arguments);
};
function Y1(o, r) {
var t = {};
for (var n in o)
Object.prototype.hasOwnProperty.call(o, n) && r.indexOf(n) < 0 && (t[n] = o[n]);
if (o != null && typeof Object.getOwnPropertySymbols == "function")
for (var a = 0, n = Object.getOwnPropertySymbols(o); a < n.length; a++)
r.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(o, n[a]) && (t[n[a]] = o[n[a]]);
return t;
}
function X1(o, r, t, n) {
var a = arguments.length, u = a < 3 ? r : n === null ? n = Object.getOwnPropertyDescriptor(r, t) : n, f;
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
u = Reflect.decorate(o, r, t, n);
else
for (var y = o.length - 1; y >= 0; y--)
(f = o[y]) && (u = (a < 3 ? f(u) : a > 3 ? f(r, t, u) : f(r, t)) || u);
return a > 3 && u && Object.defineProperty(r, t, u), u;
}
function Z1(o, r) {
return function(t, n) {
r(t, n, o);
};
}
function ew(o, r) {
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
return Reflect.metadata(o, r);
}
function tw(o, r, t, n) {
function a(u) {
return u instanceof t ? u : new t(function(f) {
f(u);
});
}
return new (t || (t = Promise))(function(u, f) {
function y(_) {
try {
p(n.next(_));
} catch (O) {
f(O);
}
}
function w(_) {
try {
p(n.throw(_));
} catch (O) {
f(O);
}
}
function p(_) {
_.done ? u(_.value) : a(_.value).then(y, w);
}
p((n = n.apply(o, r || [])).next());
});
}
function rw(o, r) {
var t = { label: 0, sent: function() {
if (u[0] & 1)
throw u[1];
return u[1];
}, trys: [], ops: [] }, n, a, u, f;
return f = { next: y(0), throw: y(1), return: y(2) }, typeof Symbol == "function" && (f[Symbol.iterator] = function() {
return this;
}), f;
function y(p) {
return function(_) {
return w([p, _]);
};
}
function w(p) {
if (n)
throw new TypeError("Generator is already executing.");
for (; t; )
try {
if (n = 1, a && (u = p[0] & 2 ? a.return : p[0] ? a.throw || ((u = a.return) && u.call(a), 0) : a.next) && !(u = u.call(a, p[1])).done)
return u;
switch (a = 0, u && (p = [p[0] & 2, u.value]), p[0]) {
case 0:
case 1:
u = p;
break;
case 4:
return t.label++, { value: p[1], done: !1 };
case 5:
t.label++, a = p[1], p = [0];
continue;
case 7:
p = t.ops.pop(), t.trys.pop();
continue;
default:
if (u = t.trys, !(u = u.length > 0 && u[u.length - 1]) && (p[0] === 6 || p[0] === 2)) {
t = 0;
continue;
}
if (p[0] === 3 && (!u || p[1] > u[0] && p[1] < u[3])) {
t.label = p[1];
break;
}
if (p[0] === 6 && t.label < u[1]) {
t.label = u[1], u = p;
break;
}
if (u && t.label < u[2]) {
t.label = u[2], t.ops.push(p);
break;
}
u[2] && t.ops.pop(), t.trys.pop();
continue;
}
p = r.call(o, t);
} catch (_) {
p = [6, _], a = 0;
} finally {
n = u = 0;
}
if (p[0] & 5)
throw p[1];
return { value: p[0] ? p[1] : void 0, done: !0 };
}
}
function iw(o, r, t, n) {
n === void 0 && (n = t), o[n] = r[t];
}
function nw(o, r) {
for (var t in o)
t !== "default" && !r.hasOwnProperty(t) && (r[t] = o[t]);
}
function wc(o) {
var r = typeof Symbol == "function" && Symbol.iterator, t = r && o[r], n = 0;
if (t)
return t.call(o);
if (o && typeof o.length == "number")
return {
next: function() {
return o && n >= o.length && (o = void 0), { value: o && o[n++], done: !o };
}
};
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function Xl(o, r) {
var t = typeof Symbol == "function" && o[Symbol.iterator];
if (!t)
return o;
var n = t.call(o), a, u = [], f;
try {
for (; (r === void 0 || r-- > 0) && !(a = n.next()).done; )
u.push(a.value);
} catch (y) {
f = { error: y };
} finally {
try {
a && !a.done && (t = n.return) && t.call(n);
} finally {
if (f)
throw f.error;
}
}
return u;
}
function sw() {
for (var o = [], r = 0; r < arguments.length; r++)
o = o.concat(Xl(arguments[r]));
return o;
}
function aw() {
for (var o = 0, r = 0, t = arguments.length; r < t; r++)
o += arguments[r].length;
for (var n = Array(o), a = 0, r = 0; r < t; r++)
for (var u = arguments[r], f = 0, y = u.length; f < y; f++, a++)
n[a] = u[f];
return n;
}
function Wn(o) {
return this instanceof Wn ? (this.v = o, this) : new Wn(o);
}
function ow(o, r, t) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var n = t.apply(o, r || []), a, u = [];
return a = {}, f("next"), f("throw"), f("return"), a[Symbol.asyncIterator] = function() {
return this;
}, a;
function f(S) {
n[S] && (a[S] = function(L) {
return new Promise(function($, K) {
u.push([S, L, $, K]) > 1 || y(S, L);
});
});
}
function y(S, L) {
try {
w(n[S](L));
} catch ($) {
O(u[0][3], $);
}
}
function w(S) {
S.value instanceof Wn ? Promise.resolve(S.value.v).then(p, _) : O(u[0][2], S);
}
function p(S) {
y("next", S);
}
function _(S) {
y("throw", S);
}
function O(S, L) {
S(L), u.shift(), u.length && y(u[0][0], u[0][1]);
}
}
function cw(o) {
var r, t;
return r = {}, n("next"), n("throw", function(a) {
throw a;
}), n("return"), r[Symbol.iterator] = function() {
return this;
}, r;
function n(a, u) {
r[a] = o[a] ? function(f) {
return (t = !t) ? { value: Wn(o[a](f)), done: a === "return" } : u ? u(f) : f;
} : u;
}
}
function uw(o) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var r = o[Symbol.asyncIterator], t;
return r ? r.call(o) : (o = typeof wc == "function" ? wc(o) : o[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
return this;
}, t);
function n(u) {
t[u] = o[u] && function(f) {
return new Promise(function(y, w) {
f = o[u](f), a(y, w, f.done, f.value);
});
};
}
function a(u, f, y, w) {
Promise.resolve(w).then(function(p) {
u({ value: p, done: y });
}, f);
}
}
function hw(o, r) {
return Object.defineProperty ? Object.defineProperty(o, "raw", { value: r }) : o.raw = r, o;
}
function lw(o) {
if (o && o.__esModule)
return o;
var r = {};
if (o != null)
for (var t in o)
Object.hasOwnProperty.call(o, t) && (r[t] = o[t]);
return r.default = o, r;
}
function fw(o) {
return o && o.__esModule ? o : { default: o };
}
function pw(o, r) {
if (!r.has(o))
throw new TypeError("attempted to get private field on non-instance");
return r.get(o);
}
function dw(o, r, t) {
if (!r.has(o))
throw new TypeError("attempted to set private field on non-instance");
return r.set(o, t), t;
}
const gw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
get __assign() {
return mc;
},
__asyncDelegator: cw,
__asyncGenerator: ow,
__asyncValues: uw,
__await: Wn,
__awaiter: tw,
__classPrivateFieldGet: pw,
__classPrivateFieldSet: dw,
__createBinding: iw,
__decorate: X1,
__exportStar: nw,
__extends: Q1,
__generator: rw,
__importDefault: fw,
__importStar: lw,
__makeTemplateObject: hw,
__metadata: ew,
__param: Z1,
__read: Xl,
__rest: Y1,
__spread: sw,
__spreadArrays: aw,
__values: wc
}, Symbol.toStringTag, { value: "Module" })), yw = /* @__PURE__ */ ma(gw);
var ec, Xh;
function vw() {
if (Xh)
return ec;
Xh = 1;
function o(t) {
try {
return JSON.stringify(t);
} catch {
return '"[Circular]"';
}
}
ec = r;
function r(t, n, a) {
var u = a && a.stringify || o, f = 1;
if (typeof t == "object" && t !== null) {
var y = n.length + f;
if (y === 1)
return t;
var w = new Array(y);
w[0] = u(t);
for (var p = 1; p < y; p++)
w[p] = u(n[p]);
return w.join(" ");
}
if (typeof t != "string")
return t;
var _ = n.length;
if (_ === 0)
return t;
for (var O = "", S = 1 - f, L = -1, $ = t && t.length || 0, K = 0; K < $; ) {
if (t.charCodeAt(K) === 37 && K + 1 < $) {
switch (L = L > -1 ? L : 0, t.charCodeAt(K + 1)) {
case 100:
case 102:
if (S >= _ || n[S] == null)
break;
L < K && (O += t.slice(L, K)), O += Number(n[S]), L = K + 2, K++;
break;
case 105:
if (S >= _ || n[S] == null)
break;
L < K && (O += t.slice(L, K)), O += Math.floor(Number(n[S])), L = K + 2, K++;
break;
case 79:
case 111:
case 106:
if (S >= _ || n[S] === void 0)
break;
L < K && (O += t.slice(L, K));
var re = typeof n[S];
if (re === "string") {
O += "'" + n[S] + "'", L = K + 2, K++;
break;
}
if (re === "function") {
O += n[S].name || "<anonymous>", L = K + 2, K++;
break;
}
O += u(n[S]), L = K + 2, K++;
break;
case 115:
if (S >= _)
break;
L < K && (O += t.slice(L, K)), O += String(n[S]), L = K + 2, K++;
break;
case 37:
L < K && (O += t.slice(L, K)), O += "%", L = K + 2, K++, S--;
break;
}
++S;
}
++K;
}
return L === -1 ? t : (L < $ && (O += t.slice(L)), O);
}
return ec;
}
var tc, Zh;
function mw() {
if (Zh)
return tc;
Zh = 1;
const o = vw();
tc = a;
const r = pe().console || {}, t = {
mapHttpRequest: $,
mapHttpResponse: $,
wrapRequestSerializer: K,
wrapResponseSerializer: K,
wrapErrorSerializer: K,
req: $,
res: $,
err: S
};
function n(F, H) {
return Array.isArray(F) ? F.filter(function(ye) {
return ye !== "!stdSerializers.err";
}) : F === !0 ? Object.keys(H) : !1;
}
function a(F) {
F = F || {}, F.browser = F.browser || {};
const H = F.browser.transmit;
if (H && typeof H.send != "function")
throw Error("pino: transmit option must have a send function");
const W = F.browser.write || r;
F.browser.write && (F.browser.asObject = !0);
const ye = F.serializers || {}, te = n(F.browser.serialize, ye);
let Ee = F.browser.serialize;
Array.isArray(F.browser.serialize) && F.browser.serialize.indexOf("!stdSerializers.err") > -1 && (Ee = !1);
const Ae = ["error", "fatal", "warn", "info", "debug", "trace"];
typeof W == "function" && (W.error = W.fatal = W.warn = W.info = W.debug = W.trace = W), F.enabled === !1 && (F.level = "silent");
const et = F.level || "info", R = Object.create(W);
R.log || (R.log = re), Object.defineProperty(R, "levelVal", {
get: Me
}), Object.defineProperty(R, "level", {
get: Re,
set: J
});
const M = {
transmit: H,
serialize: te,
asObject: F.browser.asObject,
levels: Ae,
timestamp: L(F)
};
R.levels = a.levels, R.level = et, R.setMaxListeners = R.getMaxListeners = R.emit = R.addListener = R.on = R.prependListener = R.once = R.prependOnceListener = R.removeListener = R.removeAllListeners = R.listeners = R.listenerCount = R.eventNames = R.write = R.flush = re, R.serializers = ye, R._serialize = te, R._stdErrSerialize = Ee, R.child = B, H && (R._logEvent = O());
function Me() {
return this.level === "silent" ? 1 / 0 : this.levels.values[this.level];
}
function Re() {
return this._level;
}
function J(k) {
if (k !== "silent" && !this.levels.values[k])
throw Error("unknown level " + k);
this._level = k, u(M, R, "error", "log"), u(M, R, "fatal", "error"), u(M, R, "warn", "error"), u(M, R, "info", "log"), u(M, R, "debug", "log"), u(M, R, "trace", "log");
}
function B(k, V) {
if (!k)
throw new Error("missing bindings for child Pino");
V = V || {}, te && k.serializers && (V.serializers = k.serializers);
const ut = V.serializers;
if (te && ut) {
var He = Object.assign({}, ye, ut), Dr = F.browser.serialize === !0 ? Object.keys(He) : te;
delete k.serializers, w([k], Dr, He, this._stdErrSerialize);
}
function _e(It) {
this._childLevel = (It._childLevel | 0) + 1, this.error = p(It, k, "error"), this.fatal = p(It, k, "fatal"), this.warn = p(It, k, "warn"), this.info = p(It, k, "info"), this.debug = p(It, k, "debug"), this.trace = p(It, k, "trace"), He && (this.serializers = He, this._serialize = Dr), H && (this._logEvent = O(
[].concat(It._logEvent.bindings, k)
));
}
return _e.prototype = this, new _e(this);
}
return R;
}
a.levels = {
values: {
fatal: 60,
error: 50,
warn: 40,
info: 30,
debug: 20,
trace: 10
},
labels: {
10: "trace",
20: "debug",
30: "info",
40: "warn",
50: "error",
60: "fatal"
}
}, a.stdSerializers = t, a.stdTimeFunctions = Object.assign({}, { nullTime: ce, epochTime: ue, unixTime: he, isoTime: fe });
function u(F, H, W, ye) {
const te = Object.getPrototypeOf(H);
H[W] = H.levelVal > H.levels.values[W] ? re : te[W] ? te[W] : r[W] || r[ye] || re, f(F, H, W);
}
function f(F, H, W) {
!F.transmit && H[W] === re || (H[W] = function(ye) {
return function() {
const Ee = F.timestamp(), Ae = new Array(arguments.length), et = Object.getPrototypeOf && Object.getPrototypeOf(this) === r ? r : this;
for (var R = 0; R < Ae.length; R++)
Ae[R] = arguments[R];
if (F.serialize && !F.asObject && w(Ae, this._serialize, this.serializers, this._stdErrSerialize), F.asObject ? ye.call(et, y(this, W, Ae, Ee)) : ye.apply(et, Ae), F.transmit) {
const M = F.transmit.level || H.level, Me = a.levels.values[M], Re = a.levels.values[W];
if (Re < Me)
return;
_(this, {
ts: Ee,
methodLevel: W,
methodValue: Re,
transmitLevel: M,
transmitValue: a.levels.values[F.transmit.level || H.level],
send: F.transmit.send,
val: H.levelVal
}, Ae);
}
};
}(H[W]));
}
function y(F, H, W, ye) {
F._serialize && w(W, F._serialize, F.serializers, F._stdErrSerialize);
const te = W.slice();
let Ee = te[0];
const Ae = {};
ye && (Ae.time = ye), Ae.level = a.levels.values[H];
let et = (F._childLevel | 0) + 1;
if (et < 1 && (et = 1), Ee !== null && typeof Ee == "object") {
for (; et-- && typeof te[0] == "object"; )
Object.assign(Ae, te.shift());
Ee = te.length ? o(te.shift(), te) : void 0;
} else
typeof Ee == "string" && (Ee = o(te.shift(), te));
return Ee !== void 0 && (Ae.msg = Ee), Ae;
}
function w(F, H, W, ye) {
for (const te in F)
if (ye && F[te] instanceof Error)
F[te] = a.stdSerializers.err(F[te]);
else if (typeof F[te] == "object" && !Array.isArray(F[te]))
for (const Ee in F[te])
H && H.indexOf(Ee) > -1 && Ee in W && (F[te][Ee] = W[Ee](F[te][Ee]));
}
function p(F, H, W) {
return function() {
const ye = new Array(1 + arguments.length);
ye[0] = H;
for (var te = 1; te < ye.length; te++)
ye[te] = arguments[te - 1];
return F[W].apply(this, ye);
};
}
function _(F, H, W) {
const ye = H.send, te = H.ts, Ee = H.methodLevel, Ae = H.methodValue, et = H.val, R = F._logEvent.bindings;
w(
W,
F._serialize || Object.keys(F.serializers),
F.serializers,
F._stdErrSerialize === void 0 ? !0 : F._stdErrSerialize
), F._logEvent.ts = te, F._logEvent.messages = W.filter(function(M) {
return R.indexOf(M) === -1;
}), F._logEvent.level.label = Ee, F._logEvent.level.value = Ae, ye(Ee, F._logEvent, et), F._logEvent = O(R);
}
function O(F) {
return {
ts: 0,
messages: [],
bindings: F || [],
level: { label: "", value: 0 }
};
}
function S(F) {
const H = {
type: F.constructor.name,
msg: F.message,
stack: F.stack
};
for (const W in F)
H[W] === void 0 && (H[W] = F[W]);
return H;
}
function L(F) {
return typeof F.timestamp == "function" ? F.timestamp : F.timestamp === !1 ? ce : ue;
}
function $() {
return {};
}
function K(F) {
return F;
}
function re() {
}
function ce() {
return !1;
}
function ue() {
return Date.now();
}
function he() {
return Math.round(Date.now() / 1e3);
}
function fe() {
return new Date(Date.now()).toISOString();
}
function pe() {
function F(H) {
return typeof H < "u" && H;
}
try {
return typeof globalThis < "u" || Object.defineProperty(Object.prototype, "globalThis", {
get: function() {
return delete Object.prototype.globalThis, this.globalThis = this;
},
configurable: !0
}), globalThis;
} catch {
return F(self) || F(window) || F(this) || {};
}
}
return tc;
}
var Mi = {}, el;
function Zl() {
return el || (el = 1, Object.defineProperty(Mi, "__esModule", { value: !0 }), Mi.PINO_CUSTOM_CONTEXT_KEY = Mi.PINO_LOGGER_DEFAULTS = void 0, Mi.PINO_LOGGER_DEFAULTS = {
level: "info"
}, Mi.PINO_CUSTOM_CONTEXT_KEY = "custom_context"), Mi;
}
var tr = {}, tl;
function ww() {
if (tl)
return tr;
tl = 1, Object.defineProperty(tr, "__esModule", { value: !0 }), tr.generateChildLogger = tr.formatChildLoggerContext = tr.getLoggerContext = tr.setBrowserLoggerContext = tr.getBrowserLoggerContext = tr.getDefaultLoggerOptions = void 0;
const o = Zl();
function r(y) {
return Object.assign(Object.assign({}, y), { level: (y == null ? void 0 : y.level) || o.PINO_LOGGER_DEFAULTS.level });
}
tr.getDefaultLoggerOptions = r;
function t(y, w = o.PINO_CUSTOM_CONTEXT_KEY) {
return y[w] || "";
}
tr.getBrowserLoggerContext = t;
function n(y, w, p = o.PINO_CUSTOM_CONTEXT_KEY) {
return y[p] = w, y;
}
tr.setBrowserLoggerContext = n;
function a(y, w = o.PINO_CUSTOM_CONTEXT_KEY) {
let p = "";
return typeof y.bindings > "u" ? p = t(y, w) : p = y.bi