@vindral/web-sdk 4.5.0 → 4.5.1-10-g5556eb794

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/94-sTJd8.js ADDED
@@ -0,0 +1,7 @@
1
+ import { a as e } from "./DSw1XhvD.js";
2
+ //#region \0@oxc-project+runtime@0.115.0/helpers/classPrivateMethodInitSpec.js
3
+ function t(t, n) {
4
+ e(t, n), n.add(t);
5
+ }
6
+ //#endregion
7
+ export { t };
package/B1PhBNUa.js ADDED
@@ -0,0 +1,101 @@
1
+ import { n as e } from "./BsfwXDui.js";
2
+ import { i as t, n, t as r } from "./DSw1XhvD.js";
3
+ //#region ../../libs/utils/src/Emitter.ts
4
+ var i = class {
5
+ constructor() {
6
+ e(this, "listeners", {});
7
+ }
8
+ emit(e, t) {
9
+ let n = this.listeners[e];
10
+ if (n) {
11
+ let r = !1;
12
+ for (let e = 0; e < n.length; e++) if (n[e].once) {
13
+ r = !0;
14
+ break;
15
+ }
16
+ r && (this.listeners[e] = n.filter((e) => !e.once));
17
+ let i, a = n.length;
18
+ for (let e = 0; e < a; e++) {
19
+ let r = n[e].fn(t);
20
+ typeof r == "function" && (i || (i = []), i.push(r));
21
+ }
22
+ if (i) for (let e = 0; e < i.length; e++) i[e]();
23
+ }
24
+ }
25
+ off(e, t) {
26
+ let n = this.listeners[e];
27
+ n && (this.listeners[e] = n.filter((e) => e.fn !== t));
28
+ }
29
+ on(e, t) {
30
+ this.add(e, t, !1);
31
+ }
32
+ once(e, t) {
33
+ this.add(e, t, !0);
34
+ }
35
+ hasListeners(e) {
36
+ let t = this.listeners[e];
37
+ return t !== void 0 && t.length > 0;
38
+ }
39
+ reset() {
40
+ this.listeners = {};
41
+ }
42
+ add(e, t, n) {
43
+ let r = this.listeners[e], i = {
44
+ fn: t,
45
+ once: n
46
+ };
47
+ r ? r.push(i) : this.listeners[e] = [i];
48
+ }
49
+ }, a = [
50
+ "off",
51
+ "error",
52
+ "warn",
53
+ "info",
54
+ "debug",
55
+ "trace"
56
+ ], o = {
57
+ ERROR: "error",
58
+ WARN: "warn",
59
+ INFO: "info",
60
+ DEBUG: "debug",
61
+ TRACE: "trace",
62
+ OFF: "off"
63
+ }, s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = class i {
64
+ constructor({ context: i, logLevel: a, debug: o }) {
65
+ t(this, s, /* @__PURE__ */ new Map()), t(this, c, ""), t(this, l, !1), t(this, u, "off"), e(this, "trace", (...e) => {}), e(this, "debug", (...e) => {}), e(this, "info", (...e) => {}), e(this, "warn", (...e) => {}), e(this, "error", (...e) => {}), e(this, "table", (...e) => {}), e(this, "count", (...e) => {}), n(c, this, i), n(u, this, a), n(l, this, o || !1), this.setLevel(a), this.setDebug(r(l, this));
66
+ }
67
+ setDebug(e) {
68
+ n(l, this, e);
69
+ for (let [t, n] of r(s, this)) n.setDebug(e);
70
+ e ? (this.table = console.table.bind(console), this.count = console.count.bind(console)) : (this.table = () => {}, this.count = () => {});
71
+ }
72
+ getLevel() {
73
+ return r(u, this);
74
+ }
75
+ setLevel(e) {
76
+ n(u, this, e);
77
+ for (let [t, n] of r(s, this)) n.setLevel(e);
78
+ let t = a.indexOf(e);
79
+ for (let [e, n] of a.entries()) n !== "off" && (e <= t ? this[n] = console[n].bind(console, "%c%s %c%s", "font-weight:bold;", n.toUpperCase(), "font-weight:normal;", r(c, this)) : this[n] = () => {});
80
+ }
81
+ createContext(e) {
82
+ let t = r(s, this).get(e);
83
+ if (!t) {
84
+ let t = new i({
85
+ context: `${e}`,
86
+ logLevel: r(u, this),
87
+ debug: r(l, this)
88
+ });
89
+ return r(s, this).set(e, t), t;
90
+ }
91
+ return t;
92
+ }
93
+ static get() {
94
+ return f._ || (f._ = new i({
95
+ context: "Vindral",
96
+ logLevel: "off"
97
+ })), f._;
98
+ }
99
+ }, f = { _: void 0 };
100
+ //#endregion
101
+ export { d as n, i as r, o as t };
@@ -1,5 +1,5 @@
1
1
  import { n as e, t } from "./BsfwXDui.js";
2
- import { t as n } from "./RxoWWyzp.js";
2
+ import { t as n } from "./BKeRxR4O.js";
3
3
  //#region ../../libs/utils/src/assert.ts
4
4
  function r(e, t) {
5
5
  if (!e) throw Error(t);
@@ -1,7 +1,7 @@
1
1
  import { n as e, t } from "./BsfwXDui.js";
2
2
  import { t as n } from "./DrWNJwZx.js";
3
- import { t as r } from "./RxoWWyzp.js";
4
- import { i, n as a, t as o } from "./Bt-ONXfO.js";
3
+ import { t as r } from "./BKeRxR4O.js";
4
+ import { i, n as a, t as o } from "./CbyVl6wP.js";
5
5
  //#region ../../libs/web-sdk/src/decoders/PendingSampleMap.ts
6
6
  var s = class {
7
7
  constructor() {