buzzcasting-storage 2.9.1 → 2.9.2
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/dist/buzzcasting-storage.d.ts +0 -2
- package/dist/buzzcasting-storage.esm.js +576 -580
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Ei = Object.defineProperty;
|
|
2
|
-
var Oi = (w, o,
|
|
3
|
-
var
|
|
4
|
-
const xi = "2.9.
|
|
2
|
+
var Oi = (w, o, h) => o in w ? Ei(w, o, { enumerable: !0, configurable: !0, writable: !0, value: h }) : w[o] = h;
|
|
3
|
+
var P = (w, o, h) => (Oi(w, typeof o != "symbol" ? o + "" : o, h), h);
|
|
4
|
+
const xi = "2.9.1";
|
|
5
5
|
class ki {
|
|
6
6
|
constructor(o) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
P(this, "options");
|
|
8
|
+
P(this, "url");
|
|
9
|
+
P(this, "headers", () => {
|
|
10
10
|
const o = `Bearer ${this.options.bearer}`;
|
|
11
11
|
return {
|
|
12
12
|
headers: new Headers({
|
|
@@ -19,9 +19,9 @@ class ki {
|
|
|
19
19
|
this.options = o, this.url = `https://${o.app}.buzzcasting.net`;
|
|
20
20
|
}
|
|
21
21
|
async get(o) {
|
|
22
|
-
const { version:
|
|
23
|
-
delete
|
|
24
|
-
const
|
|
22
|
+
const { version: h } = this.options, m = this.headers(), I = Object.assign({}, o);
|
|
23
|
+
delete I.slide, delete I.type, delete I.hash;
|
|
24
|
+
const B = Object.keys(I).length > 0 ? `?${new URLSearchParams(I).toString()}` : "";
|
|
25
25
|
return console.debug(
|
|
26
26
|
"%capi%c %cget",
|
|
27
27
|
x.API,
|
|
@@ -30,7 +30,7 @@ class ki {
|
|
|
30
30
|
o.slide,
|
|
31
31
|
o.widget
|
|
32
32
|
), await fetch(
|
|
33
|
-
[this.url, "api",
|
|
33
|
+
[this.url, "api", h, o.type].join("/") + B,
|
|
34
34
|
{ ...m, method: "get" }
|
|
35
35
|
).then(async (j) => {
|
|
36
36
|
if (!j.ok)
|
|
@@ -39,18 +39,18 @@ class ki {
|
|
|
39
39
|
}).then((j) => j.json()).then((j) => (j.query = o, j)).catch((j) => ({ success: !1, message: `${j}`, data: null }));
|
|
40
40
|
}
|
|
41
41
|
async hideMessage(o) {
|
|
42
|
-
const { app:
|
|
42
|
+
const { app: h, version: m } = this.options, I = this.headers(), B = "?action=visible";
|
|
43
43
|
return console.info(
|
|
44
44
|
"%capi%c %cpost",
|
|
45
45
|
x.API,
|
|
46
46
|
x.NONE,
|
|
47
47
|
x.GET_DATA,
|
|
48
48
|
ue.HIDE_MESSAGE,
|
|
49
|
-
[
|
|
50
|
-
{ ...
|
|
49
|
+
[h, "api", m, o.type, o.id].join("/") + B,
|
|
50
|
+
{ ...I, method: "put" }
|
|
51
51
|
), await fetch(
|
|
52
|
-
[
|
|
53
|
-
{ ...
|
|
52
|
+
[h, "api", m, o.type, o.id].join("/") + B,
|
|
53
|
+
{ ...I, method: "put" }
|
|
54
54
|
).then((j) => {
|
|
55
55
|
if (!j.ok)
|
|
56
56
|
throw new Error(j.statusText);
|
|
@@ -64,11 +64,11 @@ function Ai(w) {
|
|
|
64
64
|
}
|
|
65
65
|
var Rr = { exports: {} };
|
|
66
66
|
(function(w, o) {
|
|
67
|
-
(function(
|
|
67
|
+
(function(h, m) {
|
|
68
68
|
w.exports = m();
|
|
69
69
|
})(Ir, function() {
|
|
70
|
-
var
|
|
71
|
-
return (
|
|
70
|
+
var h = function(e, t) {
|
|
71
|
+
return (h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
72
72
|
n.__proto__ = r;
|
|
73
73
|
} || function(n, r) {
|
|
74
74
|
for (var i in r)
|
|
@@ -82,19 +82,19 @@ var Rr = { exports: {} };
|
|
|
82
82
|
return e;
|
|
83
83
|
}).apply(this, arguments);
|
|
84
84
|
};
|
|
85
|
-
function
|
|
85
|
+
function I(e, t, n) {
|
|
86
86
|
if (n || arguments.length === 2)
|
|
87
87
|
for (var r, i = 0, a = t.length; i < a; i++)
|
|
88
88
|
!r && i in t || ((r = r || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
|
|
89
89
|
return e.concat(r || Array.prototype.slice.call(t));
|
|
90
90
|
}
|
|
91
|
-
var
|
|
91
|
+
var B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Ir, j = Object.keys, N = Array.isArray;
|
|
92
92
|
function Z(e, t) {
|
|
93
93
|
return typeof t != "object" || j(t).forEach(function(n) {
|
|
94
94
|
e[n] = t[n];
|
|
95
95
|
}), e;
|
|
96
96
|
}
|
|
97
|
-
typeof Promise > "u" ||
|
|
97
|
+
typeof Promise > "u" || B.Promise || (B.Promise = Promise);
|
|
98
98
|
var te = Object.getPrototypeOf, be = {}.hasOwnProperty;
|
|
99
99
|
function ie(e, t) {
|
|
100
100
|
return be.call(e, t);
|
|
@@ -125,7 +125,7 @@ var Rr = { exports: {} };
|
|
|
125
125
|
throw new Error("Assertion Failed");
|
|
126
126
|
}
|
|
127
127
|
function Hn(e) {
|
|
128
|
-
|
|
128
|
+
B.setImmediate ? setImmediate(e) : setTimeout(e, 0);
|
|
129
129
|
}
|
|
130
130
|
function ve(e, t) {
|
|
131
131
|
if (typeof t == "string" && ie(e, t))
|
|
@@ -171,9 +171,9 @@ var Rr = { exports: {} };
|
|
|
171
171
|
return t + e + "Array";
|
|
172
172
|
});
|
|
173
173
|
}))).filter(function(e) {
|
|
174
|
-
return
|
|
174
|
+
return B[e];
|
|
175
175
|
}), Xn = new Set(ge.map(function(e) {
|
|
176
|
-
return
|
|
176
|
+
return B[e];
|
|
177
177
|
})), it = null;
|
|
178
178
|
function Ae(e) {
|
|
179
179
|
return it = /* @__PURE__ */ new WeakMap(), e = function t(n) {
|
|
@@ -348,12 +348,12 @@ var Rr = { exports: {} };
|
|
|
348
348
|
return [t, te(t), e];
|
|
349
349
|
}(), st = ge[0], de = ge[1], ge = ge[2], de = de && de.then, ut = st && st.constructor, nn = !!ge, ct = function(e, t) {
|
|
350
350
|
lt.push([e, t]), Et && (queueMicrotask(qr), Et = !1);
|
|
351
|
-
}, rn = !0, Et = !0, Be = [], Ot = [], on = ot, De = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: H, pgp: !1, env: {}, finalize: H },
|
|
351
|
+
}, rn = !0, Et = !0, Be = [], Ot = [], on = ot, De = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: H, pgp: !1, env: {}, finalize: H }, M = De, lt = [], Ne = 0, xt = [];
|
|
352
352
|
function T(e) {
|
|
353
353
|
if (typeof this != "object")
|
|
354
354
|
throw new TypeError("Promises must be constructed via new");
|
|
355
355
|
this._listeners = [], this._lib = !1;
|
|
356
|
-
var t = this._PSD =
|
|
356
|
+
var t = this._PSD = M;
|
|
357
357
|
if (typeof e != "function") {
|
|
358
358
|
if (e !== at)
|
|
359
359
|
throw new TypeError("Not a function");
|
|
@@ -366,8 +366,8 @@ var Rr = { exports: {} };
|
|
|
366
366
|
if (a === r)
|
|
367
367
|
throw new TypeError("A promise cannot be resolved with itself.");
|
|
368
368
|
var s = r._lib && Qe();
|
|
369
|
-
a && typeof a.then == "function" ? n(r, function(u,
|
|
370
|
-
a instanceof T ? a._then(u,
|
|
369
|
+
a && typeof a.then == "function" ? n(r, function(u, d) {
|
|
370
|
+
a instanceof T ? a._then(u, d) : a.then(u, d);
|
|
371
371
|
}) : (r._state = !0, r._value = a, nr(r)), s && Xe();
|
|
372
372
|
}
|
|
373
373
|
}, sn.bind(null, r));
|
|
@@ -377,12 +377,12 @@ var Rr = { exports: {} };
|
|
|
377
377
|
}(this, e);
|
|
378
378
|
}
|
|
379
379
|
var an = { get: function() {
|
|
380
|
-
var e =
|
|
380
|
+
var e = M, t = Pt;
|
|
381
381
|
function n(r, i) {
|
|
382
|
-
var a = this, s = !e.global && (e !==
|
|
382
|
+
var a = this, s = !e.global && (e !== M || t !== Pt), u = s && !Ie(), d = new T(function(l, b) {
|
|
383
383
|
un(a, new tr(ir(r, e, s, u), ir(i, e, s, u), l, b, e));
|
|
384
384
|
});
|
|
385
|
-
return this._consoleTask && (
|
|
385
|
+
return this._consoleTask && (d._consoleTask = this._consoleTask), d;
|
|
386
386
|
}
|
|
387
387
|
return n.prototype = at, n;
|
|
388
388
|
}, set: function(e) {
|
|
@@ -466,9 +466,9 @@ var Rr = { exports: {} };
|
|
|
466
466
|
return new T(at, !1, e);
|
|
467
467
|
}
|
|
468
468
|
function J(e, t) {
|
|
469
|
-
var n =
|
|
469
|
+
var n = M;
|
|
470
470
|
return function() {
|
|
471
|
-
var r = Qe(), i =
|
|
471
|
+
var r = Qe(), i = M;
|
|
472
472
|
try {
|
|
473
473
|
return Ce(n, !0), e.apply(this, arguments);
|
|
474
474
|
} catch (a) {
|
|
@@ -479,7 +479,7 @@ var Rr = { exports: {} };
|
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
481
|
xe(T.prototype, { then: an, _then: function(e, t) {
|
|
482
|
-
un(this, new tr(null, null, e, t,
|
|
482
|
+
un(this, new tr(null, null, e, t, M));
|
|
483
483
|
}, catch: function(e) {
|
|
484
484
|
if (arguments.length === 1)
|
|
485
485
|
return this.then(null, e);
|
|
@@ -530,9 +530,9 @@ var Rr = { exports: {} };
|
|
|
530
530
|
});
|
|
531
531
|
});
|
|
532
532
|
}, PSD: { get: function() {
|
|
533
|
-
return
|
|
533
|
+
return M;
|
|
534
534
|
}, set: function(e) {
|
|
535
|
-
return
|
|
535
|
+
return M = e;
|
|
536
536
|
} }, totalEchoes: { get: function() {
|
|
537
537
|
return Pt;
|
|
538
538
|
} }, newPSD: Pe, usePSD: Ge, scheduler: { get: function() {
|
|
@@ -546,11 +546,11 @@ var Rr = { exports: {} };
|
|
|
546
546
|
} }, follow: function(e, t) {
|
|
547
547
|
return new T(function(n, r) {
|
|
548
548
|
return Pe(function(i, a) {
|
|
549
|
-
var s =
|
|
549
|
+
var s = M;
|
|
550
550
|
s.unhandleds = [], s.onunhandled = a, s.finalize = Me(function() {
|
|
551
|
-
var u,
|
|
551
|
+
var u, d = this;
|
|
552
552
|
u = function() {
|
|
553
|
-
|
|
553
|
+
d.unhandleds.length === 0 ? i() : a(d.unhandleds[0]);
|
|
554
554
|
}, xt.push(function l() {
|
|
555
555
|
u(), xt.splice(xt.indexOf(l), 1);
|
|
556
556
|
}), ++Ne, ct(function() {
|
|
@@ -590,7 +590,7 @@ var Rr = { exports: {} };
|
|
|
590
590
|
}));
|
|
591
591
|
var ne = { awaits: 0, echoes: 0, id: 0 }, ei = 0, At = [], Dt = 0, Pt = 0, ti = 0;
|
|
592
592
|
function Pe(e, t, n, r) {
|
|
593
|
-
var i =
|
|
593
|
+
var i = M, a = Object.create(i);
|
|
594
594
|
return a.parent = i, a.ref = 0, a.global = !1, a.id = ++ti, De.env, a.env = nn ? { Promise: T, PromiseProp: { value: T, configurable: !0, writable: !0 }, all: T.all, race: T.race, allSettled: T.allSettled, any: T.any, resolve: T.resolve, reject: T.reject } : {}, t && Z(a, t), ++i.ref, a.finalize = function() {
|
|
595
595
|
--this.parent.ref || this.parent.finalize();
|
|
596
596
|
}, r = Ge(a, e, n, r), a.ref === 0 && a.finalize(), r;
|
|
@@ -613,17 +613,17 @@ var Rr = { exports: {} };
|
|
|
613
613
|
At.pop(), Ce(e, !1);
|
|
614
614
|
}
|
|
615
615
|
function Ce(e, t) {
|
|
616
|
-
var n, r =
|
|
617
|
-
(t ? !ne.echoes || Dt++ && e ===
|
|
618
|
-
++Pt, ne.echoes && --ne.echoes != 0 || (ne.echoes = ne.awaits = ne.id = 0), At.push(
|
|
619
|
-
}).bind(null, e) : ni), e !==
|
|
616
|
+
var n, r = M;
|
|
617
|
+
(t ? !ne.echoes || Dt++ && e === M : !Dt || --Dt && e === M) || queueMicrotask(t ? (function(i) {
|
|
618
|
+
++Pt, ne.echoes && --ne.echoes != 0 || (ne.echoes = ne.awaits = ne.id = 0), At.push(M), Ce(i, !0);
|
|
619
|
+
}).bind(null, e) : ni), e !== M && (M = e, r === De && (De.env = rr()), nn && (n = De.env.Promise, t = e.env, (r.global || e.global) && (Object.defineProperty(B, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
|
|
620
620
|
}
|
|
621
621
|
function rr() {
|
|
622
|
-
var e =
|
|
623
|
-
return nn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(
|
|
622
|
+
var e = B.Promise;
|
|
623
|
+
return nn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(B, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
|
|
624
624
|
}
|
|
625
625
|
function Ge(e, t, n, r, i) {
|
|
626
|
-
var a =
|
|
626
|
+
var a = M;
|
|
627
627
|
try {
|
|
628
628
|
return Ce(e, !0), t(n, r, i);
|
|
629
629
|
} finally {
|
|
@@ -632,7 +632,7 @@ var Rr = { exports: {} };
|
|
|
632
632
|
}
|
|
633
633
|
function ir(e, t, n, r) {
|
|
634
634
|
return typeof e != "function" ? e : function() {
|
|
635
|
-
var i =
|
|
635
|
+
var i = M;
|
|
636
636
|
n && Je(), Ce(t, !0);
|
|
637
637
|
try {
|
|
638
638
|
return e.apply(this, arguments);
|
|
@@ -674,14 +674,14 @@ var Rr = { exports: {} };
|
|
|
674
674
|
return t < e ? 1 : e < t ? -1 : 0;
|
|
675
675
|
case "binary":
|
|
676
676
|
return function(i, a) {
|
|
677
|
-
for (var s = i.length, u = a.length,
|
|
677
|
+
for (var s = i.length, u = a.length, d = s < u ? s : u, l = 0; l < d; ++l)
|
|
678
678
|
if (i[l] !== a[l])
|
|
679
679
|
return i[l] < a[l] ? -1 : 1;
|
|
680
680
|
return s === u ? 0 : s < u ? -1 : 1;
|
|
681
681
|
}(cr(e), cr(t));
|
|
682
682
|
case "Array":
|
|
683
683
|
return function(i, a) {
|
|
684
|
-
for (var s = i.length, u = a.length,
|
|
684
|
+
for (var s = i.length, u = a.length, d = s < u ? s : u, l = 0; l < d; ++l) {
|
|
685
685
|
var b = $(i[l], a[l]);
|
|
686
686
|
if (b !== 0)
|
|
687
687
|
return b;
|
|
@@ -701,7 +701,7 @@ var Rr = { exports: {} };
|
|
|
701
701
|
return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
|
|
702
702
|
}
|
|
703
703
|
var lr = (Q.prototype._trans = function(e, t, n) {
|
|
704
|
-
var r = this._tx ||
|
|
704
|
+
var r = this._tx || M.trans, i = this.name, a = pe && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
|
|
705
705
|
function s(l, b, c) {
|
|
706
706
|
if (!c.schema[i])
|
|
707
707
|
throw new F.NotFound("Table " + i + " not part of transaction");
|
|
@@ -709,10 +709,10 @@ var Rr = { exports: {} };
|
|
|
709
709
|
}
|
|
710
710
|
var u = Qe();
|
|
711
711
|
try {
|
|
712
|
-
var
|
|
712
|
+
var d = r && r.db._novip === this.db._novip ? r === M.trans ? r._promise(e, s, n) : Pe(function() {
|
|
713
713
|
return r._promise(e, s, n);
|
|
714
|
-
}, { trans: r, transless:
|
|
715
|
-
if (b.idbdb && (b._state.openComplete ||
|
|
714
|
+
}, { trans: r, transless: M.transless || M }) : function l(b, c, f, p) {
|
|
715
|
+
if (b.idbdb && (b._state.openComplete || M.letThrough || b._vip)) {
|
|
716
716
|
var y = b._createTransaction(c, f, b._dbSchema);
|
|
717
717
|
try {
|
|
718
718
|
y.create(), b._state.PR1398_maxLoop = 3;
|
|
@@ -723,7 +723,7 @@ var Rr = { exports: {} };
|
|
|
723
723
|
}
|
|
724
724
|
return y._promise(c, function(v, g) {
|
|
725
725
|
return Pe(function() {
|
|
726
|
-
return
|
|
726
|
+
return M.trans = y, p(v, g, y);
|
|
727
727
|
});
|
|
728
728
|
}).then(function(v) {
|
|
729
729
|
if (c === "readwrite")
|
|
@@ -747,9 +747,9 @@ var Rr = { exports: {} };
|
|
|
747
747
|
return l(b, c, f, p);
|
|
748
748
|
});
|
|
749
749
|
}(this.db, e, [this.name], s);
|
|
750
|
-
return a && (
|
|
750
|
+
return a && (d._consoleTask = a, d = d.catch(function(l) {
|
|
751
751
|
return console.trace(l), q(l);
|
|
752
|
-
})),
|
|
752
|
+
})), d;
|
|
753
753
|
} finally {
|
|
754
754
|
u && Xe();
|
|
755
755
|
}
|
|
@@ -768,18 +768,18 @@ var Rr = { exports: {} };
|
|
|
768
768
|
var t = j(e);
|
|
769
769
|
if (t.length === 1)
|
|
770
770
|
return this.where(t[0]).equals(e[t[0]]);
|
|
771
|
-
var n = this.schema.indexes.concat(this.schema.primKey).filter(function(
|
|
772
|
-
if (
|
|
773
|
-
return 0 <=
|
|
771
|
+
var n = this.schema.indexes.concat(this.schema.primKey).filter(function(d) {
|
|
772
|
+
if (d.compound && t.every(function(b) {
|
|
773
|
+
return 0 <= d.keyPath.indexOf(b);
|
|
774
774
|
})) {
|
|
775
775
|
for (var l = 0; l < t.length; ++l)
|
|
776
|
-
if (t.indexOf(
|
|
776
|
+
if (t.indexOf(d.keyPath[l]) === -1)
|
|
777
777
|
return !1;
|
|
778
778
|
return !0;
|
|
779
779
|
}
|
|
780
780
|
return !1;
|
|
781
|
-
}).sort(function(
|
|
782
|
-
return
|
|
781
|
+
}).sort(function(d, l) {
|
|
782
|
+
return d.keyPath.length - l.keyPath.length;
|
|
783
783
|
})[0];
|
|
784
784
|
if (n && this.db._maxKey !== Fe) {
|
|
785
785
|
var s = n.keyPath.slice(0, t.length);
|
|
@@ -789,8 +789,8 @@ var Rr = { exports: {} };
|
|
|
789
789
|
}
|
|
790
790
|
!n && pe && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
|
|
791
791
|
var r = this.schema.idxByName, i = this.db._deps.indexedDB;
|
|
792
|
-
function a(
|
|
793
|
-
return i.cmp(
|
|
792
|
+
function a(d, l) {
|
|
793
|
+
return i.cmp(d, l) === 0;
|
|
794
794
|
}
|
|
795
795
|
var u = t.reduce(function(f, l) {
|
|
796
796
|
var b = f[0], c = f[1], f = r[l], p = e[l];
|
|
@@ -826,30 +826,30 @@ var Rr = { exports: {} };
|
|
|
826
826
|
function i() {
|
|
827
827
|
return t !== null && t.apply(this, arguments) || this;
|
|
828
828
|
}
|
|
829
|
-
(this.schema.mappedClass = e).prototype instanceof sr && (function(
|
|
829
|
+
(this.schema.mappedClass = e).prototype instanceof sr && (function(d, l) {
|
|
830
830
|
if (typeof l != "function" && l !== null)
|
|
831
831
|
throw new TypeError("Class extends value " + String(l) + " is not a constructor or null");
|
|
832
832
|
function b() {
|
|
833
|
-
this.constructor =
|
|
833
|
+
this.constructor = d;
|
|
834
834
|
}
|
|
835
|
-
d
|
|
835
|
+
h(d, l), d.prototype = l === null ? Object.create(l) : (b.prototype = l.prototype, new b());
|
|
836
836
|
}(i, t = e), Object.defineProperty(i.prototype, "db", { get: function() {
|
|
837
837
|
return n;
|
|
838
838
|
}, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
|
|
839
839
|
return r;
|
|
840
840
|
}, e = i);
|
|
841
841
|
for (var a = /* @__PURE__ */ new Set(), s = e.prototype; s; s = te(s))
|
|
842
|
-
Object.getOwnPropertyNames(s).forEach(function(
|
|
843
|
-
return a.add(
|
|
842
|
+
Object.getOwnPropertyNames(s).forEach(function(d) {
|
|
843
|
+
return a.add(d);
|
|
844
844
|
});
|
|
845
|
-
function u(
|
|
846
|
-
if (!
|
|
847
|
-
return
|
|
845
|
+
function u(d) {
|
|
846
|
+
if (!d)
|
|
847
|
+
return d;
|
|
848
848
|
var l, b = Object.create(e.prototype);
|
|
849
|
-
for (l in
|
|
849
|
+
for (l in d)
|
|
850
850
|
if (!a.has(l))
|
|
851
851
|
try {
|
|
852
|
-
b[l] =
|
|
852
|
+
b[l] = d[l];
|
|
853
853
|
} catch {
|
|
854
854
|
}
|
|
855
855
|
return b;
|
|
@@ -920,12 +920,12 @@ var Rr = { exports: {} };
|
|
|
920
920
|
throw new F.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
|
|
921
921
|
if (i && i.length !== e.length)
|
|
922
922
|
throw new F.InvalidArgument("Arguments objects and keys must have the same length");
|
|
923
|
-
var
|
|
923
|
+
var d = e.length, l = l && u ? e.map(Rt(l)) : e;
|
|
924
924
|
return r.core.mutate({ trans: s, type: "add", keys: i, values: l, wantResults: a }).then(function(y) {
|
|
925
925
|
var c = y.numFailures, f = y.results, p = y.lastResult, y = y.failures;
|
|
926
926
|
if (c === 0)
|
|
927
927
|
return a ? f : p;
|
|
928
|
-
throw new Ve("".concat(r.name, ".bulkAdd(): ").concat(c, " of ").concat(
|
|
928
|
+
throw new Ve("".concat(r.name, ".bulkAdd(): ").concat(c, " of ").concat(d, " operations failed"), y);
|
|
929
929
|
});
|
|
930
930
|
});
|
|
931
931
|
}, Q.prototype.bulkPut = function(e, t, n) {
|
|
@@ -936,12 +936,12 @@ var Rr = { exports: {} };
|
|
|
936
936
|
throw new F.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
|
|
937
937
|
if (i && i.length !== e.length)
|
|
938
938
|
throw new F.InvalidArgument("Arguments objects and keys must have the same length");
|
|
939
|
-
var
|
|
939
|
+
var d = e.length, l = l && u ? e.map(Rt(l)) : e;
|
|
940
940
|
return r.core.mutate({ trans: s, type: "put", keys: i, values: l, wantResults: a }).then(function(y) {
|
|
941
941
|
var c = y.numFailures, f = y.results, p = y.lastResult, y = y.failures;
|
|
942
942
|
if (c === 0)
|
|
943
943
|
return a ? f : p;
|
|
944
|
-
throw new Ve("".concat(r.name, ".bulkPut(): ").concat(c, " of ").concat(
|
|
944
|
+
throw new Ve("".concat(r.name, ".bulkPut(): ").concat(c, " of ").concat(d, " operations failed"), y);
|
|
945
945
|
});
|
|
946
946
|
});
|
|
947
947
|
}, Q.prototype.bulkUpdate = function(e) {
|
|
@@ -952,7 +952,7 @@ var Rr = { exports: {} };
|
|
|
952
952
|
}), a = [];
|
|
953
953
|
return this._trans("readwrite", function(s) {
|
|
954
954
|
return n.getMany({ trans: s, keys: r, cache: "clone" }).then(function(u) {
|
|
955
|
-
var
|
|
955
|
+
var d = [], l = [];
|
|
956
956
|
e.forEach(function(c, f) {
|
|
957
957
|
var p = c.key, y = c.changes, v = u[f];
|
|
958
958
|
if (v) {
|
|
@@ -964,11 +964,11 @@ var Rr = { exports: {} };
|
|
|
964
964
|
} else
|
|
965
965
|
fe(v, S, E);
|
|
966
966
|
}
|
|
967
|
-
a.push(f),
|
|
967
|
+
a.push(f), d.push(p), l.push(v);
|
|
968
968
|
}
|
|
969
969
|
});
|
|
970
|
-
var b =
|
|
971
|
-
return n.mutate({ trans: s, type: "put", keys:
|
|
970
|
+
var b = d.length;
|
|
971
|
+
return n.mutate({ trans: s, type: "put", keys: d, values: l, updates: { keys: r, changeSpecs: i } }).then(function(c) {
|
|
972
972
|
var f = c.numFailures, p = c.failures;
|
|
973
973
|
if (f === 0)
|
|
974
974
|
return b;
|
|
@@ -996,8 +996,8 @@ var Rr = { exports: {} };
|
|
|
996
996
|
function ft(e) {
|
|
997
997
|
function t(s, u) {
|
|
998
998
|
if (u) {
|
|
999
|
-
for (var
|
|
1000
|
-
l[
|
|
999
|
+
for (var d = arguments.length, l = new Array(d - 1); --d; )
|
|
1000
|
+
l[d - 1] = arguments[d];
|
|
1001
1001
|
return n[s].subscribe.apply(null, l), e;
|
|
1002
1002
|
}
|
|
1003
1003
|
if (typeof s == "string")
|
|
@@ -1008,16 +1008,16 @@ var Rr = { exports: {} };
|
|
|
1008
1008
|
for (var r = 1, i = arguments.length; r < i; ++r)
|
|
1009
1009
|
a(arguments[r]);
|
|
1010
1010
|
return t;
|
|
1011
|
-
function a(s, u,
|
|
1011
|
+
function a(s, u, d) {
|
|
1012
1012
|
if (typeof s != "object") {
|
|
1013
1013
|
var l;
|
|
1014
1014
|
u = u || Jr;
|
|
1015
|
-
var b = { subscribers: [], fire:
|
|
1015
|
+
var b = { subscribers: [], fire: d = d || H, subscribe: function(c) {
|
|
1016
1016
|
b.subscribers.indexOf(c) === -1 && (b.subscribers.push(c), b.fire = u(b.fire, c));
|
|
1017
1017
|
}, unsubscribe: function(c) {
|
|
1018
1018
|
b.subscribers = b.subscribers.filter(function(f) {
|
|
1019
1019
|
return f !== c;
|
|
1020
|
-
}), b.fire = b.subscribers.reduce(u,
|
|
1020
|
+
}), b.fire = b.subscribers.reduce(u, d);
|
|
1021
1021
|
} };
|
|
1022
1022
|
return n[s] = t[s] = b;
|
|
1023
1023
|
}
|
|
@@ -1071,13 +1071,13 @@ var Rr = { exports: {} };
|
|
|
1071
1071
|
function jt(e, t, n, r) {
|
|
1072
1072
|
var i = e.replayFilter ? Le(e.filter, e.replayFilter()) : e.filter;
|
|
1073
1073
|
if (e.or) {
|
|
1074
|
-
var a = {}, s = function(u,
|
|
1074
|
+
var a = {}, s = function(u, d, l) {
|
|
1075
1075
|
var b, c;
|
|
1076
|
-
i && !i(
|
|
1077
|
-
return
|
|
1076
|
+
i && !i(d, l, function(f) {
|
|
1077
|
+
return d.stop(f);
|
|
1078
1078
|
}, function(f) {
|
|
1079
|
-
return
|
|
1080
|
-
}) || ((c = "" + (b =
|
|
1079
|
+
return d.fail(f);
|
|
1080
|
+
}) || ((c = "" + (b = d.primaryKey)) == "[object ArrayBuffer]" && (c = "" + new Uint8Array(b)), ie(a, c) || (a[c] = !0, t(u, d, l)));
|
|
1081
1081
|
};
|
|
1082
1082
|
return Promise.all([e.or._iterate(s, n), dr(fr(e, r, n), e.algorithm, s, !e.keysOnly && e.valueMapper)]);
|
|
1083
1083
|
}
|
|
@@ -1143,15 +1143,15 @@ var Rr = { exports: {} };
|
|
|
1143
1143
|
}).then(e);
|
|
1144
1144
|
}, z.prototype.sortBy = function(e, t) {
|
|
1145
1145
|
var n = e.split(".").reverse(), r = n[0], i = n.length - 1;
|
|
1146
|
-
function a(
|
|
1147
|
-
return l ? a(
|
|
1146
|
+
function a(d, l) {
|
|
1147
|
+
return l ? a(d[n[l]], l - 1) : d[r];
|
|
1148
1148
|
}
|
|
1149
1149
|
var s = this._ctx.dir === "next" ? 1 : -1;
|
|
1150
|
-
function u(
|
|
1151
|
-
return
|
|
1150
|
+
function u(d, l) {
|
|
1151
|
+
return d = a(d, i), l = a(l, i), d < l ? -s : l < d ? s : 0;
|
|
1152
1152
|
}
|
|
1153
|
-
return this.toArray(function(
|
|
1154
|
-
return
|
|
1153
|
+
return this.toArray(function(d) {
|
|
1154
|
+
return d.sort(u);
|
|
1155
1155
|
}).then(t);
|
|
1156
1156
|
}, z.prototype.toArray = function(e) {
|
|
1157
1157
|
var t = this;
|
|
@@ -1288,26 +1288,26 @@ var Rr = { exports: {} };
|
|
|
1288
1288
|
p.push(S[C]);
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
1291
|
-
var
|
|
1291
|
+
var d = n.table.core, l = d.schema.primaryKey, b = l.outbound, c = l.extractKey, f = t.db._options.modifyChunkSize || 200, p = [], y = 0, v = [];
|
|
1292
1292
|
return t.clone().primaryKeys().then(function(g) {
|
|
1293
1293
|
function _(S) {
|
|
1294
1294
|
var E = Math.min(f, g.length - S);
|
|
1295
|
-
return
|
|
1296
|
-
for (var k = [], C = [],
|
|
1297
|
-
var G = O[
|
|
1298
|
-
s.call(L, L.value, L) !== !1 && (L.value == null ? R.push(g[S +
|
|
1295
|
+
return d.getMany({ trans: r, keys: g.slice(S, S + E), cache: "immutable" }).then(function(O) {
|
|
1296
|
+
for (var k = [], C = [], A = b ? [] : null, R = [], D = 0; D < E; ++D) {
|
|
1297
|
+
var G = O[D], L = { value: Ae(G), primKey: g[S + D] };
|
|
1298
|
+
s.call(L, L.value, L) !== !1 && (L.value == null ? R.push(g[S + D]) : b || $(c(G), c(L.value)) === 0 ? (C.push(L.value), b && A.push(g[S + D])) : (R.push(g[S + D]), k.push(L.value)));
|
|
1299
1299
|
}
|
|
1300
1300
|
var Y = qe(n) && n.limit === 1 / 0 && (typeof e != "function" || e === gn) && { index: n.index, range: n.range };
|
|
1301
|
-
return Promise.resolve(0 < k.length &&
|
|
1301
|
+
return Promise.resolve(0 < k.length && d.mutate({ trans: r, type: "add", values: k }).then(function(W) {
|
|
1302
1302
|
for (var V in W.failures)
|
|
1303
1303
|
R.splice(parseInt(V), 1);
|
|
1304
1304
|
u(k.length, W);
|
|
1305
1305
|
})).then(function() {
|
|
1306
|
-
return (0 < C.length || Y && typeof e == "object") &&
|
|
1306
|
+
return (0 < C.length || Y && typeof e == "object") && d.mutate({ trans: r, type: "put", keys: A, values: C, criteria: Y, changeSpec: typeof e != "function" && e }).then(function(W) {
|
|
1307
1307
|
return u(C.length, W);
|
|
1308
1308
|
});
|
|
1309
1309
|
}).then(function() {
|
|
1310
|
-
return (0 < R.length || Y && e === gn) &&
|
|
1310
|
+
return (0 < R.length || Y && e === gn) && d.mutate({ trans: r, type: "delete", keys: R, criteria: Y }).then(function(W) {
|
|
1311
1311
|
return u(R.length, W);
|
|
1312
1312
|
});
|
|
1313
1313
|
}).then(function() {
|
|
@@ -1330,8 +1330,8 @@ var Rr = { exports: {} };
|
|
|
1330
1330
|
return e.table.core.mutate({ trans: n, type: "deleteRange", range: i }).then(function(s) {
|
|
1331
1331
|
var u = s.failures;
|
|
1332
1332
|
if (s.lastResult, s.results, s = s.numFailures, s)
|
|
1333
|
-
throw new _t("Could not delete some values", Object.keys(u).map(function(
|
|
1334
|
-
return u[
|
|
1333
|
+
throw new _t("Could not delete some values", Object.keys(u).map(function(d) {
|
|
1334
|
+
return u[d];
|
|
1335
1335
|
}), a - s);
|
|
1336
1336
|
return a - s;
|
|
1337
1337
|
});
|
|
@@ -1358,7 +1358,7 @@ var Rr = { exports: {} };
|
|
|
1358
1358
|
}).limit(0);
|
|
1359
1359
|
}
|
|
1360
1360
|
function Kt(e, t, n, r) {
|
|
1361
|
-
var i, a, s, u,
|
|
1361
|
+
var i, a, s, u, d, l, b, c = n.length;
|
|
1362
1362
|
if (!n.every(function(y) {
|
|
1363
1363
|
return typeof y == "string";
|
|
1364
1364
|
}))
|
|
@@ -1380,12 +1380,12 @@ var Rr = { exports: {} };
|
|
|
1380
1380
|
});
|
|
1381
1381
|
u = v.map(function(g) {
|
|
1382
1382
|
return g.upper;
|
|
1383
|
-
}),
|
|
1383
|
+
}), d = v.map(function(g) {
|
|
1384
1384
|
return g.lower;
|
|
1385
1385
|
}), b = (l = y) === "next" ? "" : r;
|
|
1386
1386
|
}
|
|
1387
1387
|
f("next"), e = new e.Collection(e, function() {
|
|
1388
|
-
return Re(u[0],
|
|
1388
|
+
return Re(u[0], d[c - 1] + r);
|
|
1389
1389
|
}), e._ondirectionchange = function(y) {
|
|
1390
1390
|
f(y);
|
|
1391
1391
|
};
|
|
@@ -1395,18 +1395,18 @@ var Rr = { exports: {} };
|
|
|
1395
1395
|
if (typeof _ != "string")
|
|
1396
1396
|
return !1;
|
|
1397
1397
|
var S = a(_);
|
|
1398
|
-
if (t(S,
|
|
1398
|
+
if (t(S, d, p))
|
|
1399
1399
|
return !0;
|
|
1400
1400
|
for (var E = null, O = p; O < c; ++O) {
|
|
1401
|
-
var k = function(C,
|
|
1402
|
-
for (var Y = Math.min(C.length,
|
|
1403
|
-
var le =
|
|
1404
|
-
if (le !==
|
|
1405
|
-
return G(C[V], R[V]) < 0 ? C.substr(0, V) + R[V] + R.substr(V + 1) : G(C[V],
|
|
1401
|
+
var k = function(C, A, R, D, G, L) {
|
|
1402
|
+
for (var Y = Math.min(C.length, D.length), W = -1, V = 0; V < Y; ++V) {
|
|
1403
|
+
var le = A[V];
|
|
1404
|
+
if (le !== D[V])
|
|
1405
|
+
return G(C[V], R[V]) < 0 ? C.substr(0, V) + R[V] + R.substr(V + 1) : G(C[V], D[V]) < 0 ? C.substr(0, V) + D[V] + R.substr(V + 1) : 0 <= W ? C.substr(0, W) + A[W] + R.substr(W + 1) : null;
|
|
1406
1406
|
G(C[V], le) < 0 && (W = V);
|
|
1407
1407
|
}
|
|
1408
|
-
return Y <
|
|
1409
|
-
}(_, S, u[O],
|
|
1408
|
+
return Y < D.length && L === "next" ? C + R.substr(C.length) : Y < C.length && L === "prev" ? C.substr(0, R.length) : W < 0 ? null : C.substr(0, W) + D[W] + R.substr(W + 1);
|
|
1409
|
+
}(_, S, u[O], d[O], s, l);
|
|
1410
1410
|
k === null && E === null ? p = O + 1 : (E === null || 0 < s(E, k)) && (E = k);
|
|
1411
1411
|
}
|
|
1412
1412
|
return v(E !== null ? function() {
|
|
@@ -1490,10 +1490,10 @@ var Rr = { exports: {} };
|
|
|
1490
1490
|
};
|
|
1491
1491
|
var i = 0;
|
|
1492
1492
|
return r._addAlgorithm(function(a, s, u) {
|
|
1493
|
-
for (var
|
|
1493
|
+
for (var d = a.key; 0 < n(d, t[i]); )
|
|
1494
1494
|
if (++i === t.length)
|
|
1495
1495
|
return s(u), !1;
|
|
1496
|
-
return n(
|
|
1496
|
+
return n(d, t[i]) === 0 || (s(function() {
|
|
1497
1497
|
a.continue(t[i]);
|
|
1498
1498
|
}), !1);
|
|
1499
1499
|
}), r;
|
|
@@ -1520,7 +1520,7 @@ var Rr = { exports: {} };
|
|
|
1520
1520
|
return S[0] !== void 0 && S[1] !== void 0 && i(S[0], S[1]) <= 0;
|
|
1521
1521
|
}))
|
|
1522
1522
|
return ce(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", F.InvalidArgument);
|
|
1523
|
-
var
|
|
1523
|
+
var d = !t || t.includeLowers !== !1, l = t && t.includeUppers === !0, b, c = i;
|
|
1524
1524
|
function f(S, E) {
|
|
1525
1525
|
return c(S[0], E[0]);
|
|
1526
1526
|
}
|
|
@@ -1542,12 +1542,12 @@ var Rr = { exports: {} };
|
|
|
1542
1542
|
return 0 < i(S, b[p][1]);
|
|
1543
1543
|
} : function(S) {
|
|
1544
1544
|
return 0 <= i(S, b[p][1]);
|
|
1545
|
-
}, v =
|
|
1545
|
+
}, v = d ? function(S) {
|
|
1546
1546
|
return 0 < a(S, b[p][0]);
|
|
1547
1547
|
} : function(S) {
|
|
1548
1548
|
return 0 <= a(S, b[p][0]);
|
|
1549
1549
|
}, g = y, _ = new this.Collection(this, function() {
|
|
1550
|
-
return Re(b[0][0], b[b.length - 1][1], !
|
|
1550
|
+
return Re(b[0][0], b[b.length - 1][1], !d, !l);
|
|
1551
1551
|
});
|
|
1552
1552
|
return _._ondirectionchange = function(S) {
|
|
1553
1553
|
c = S === "next" ? (g = y, i) : (g = v, a), b.sort(f);
|
|
@@ -1578,10 +1578,10 @@ var Rr = { exports: {} };
|
|
|
1578
1578
|
e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
|
|
1579
1579
|
}
|
|
1580
1580
|
var pt = "storagemutated", yn = "x-storagemutated-1", Te = ft(null, pt), ai = (me.prototype._lock = function() {
|
|
1581
|
-
return rt(!
|
|
1581
|
+
return rt(!M.global), ++this._reculock, this._reculock !== 1 || M.global || (M.lockOwnerFor = this), this;
|
|
1582
1582
|
}, me.prototype._unlock = function() {
|
|
1583
|
-
if (rt(!
|
|
1584
|
-
for (
|
|
1583
|
+
if (rt(!M.global), --this._reculock == 0)
|
|
1584
|
+
for (M.global || (M.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
|
|
1585
1585
|
var e = this._blockedFuncs.shift();
|
|
1586
1586
|
try {
|
|
1587
1587
|
Ge(e[1], e[0]);
|
|
@@ -1590,7 +1590,7 @@ var Rr = { exports: {} };
|
|
|
1590
1590
|
}
|
|
1591
1591
|
return this;
|
|
1592
1592
|
}, me.prototype._locked = function() {
|
|
1593
|
-
return this._reculock &&
|
|
1593
|
+
return this._reculock && M.lockOwnerFor !== this;
|
|
1594
1594
|
}, me.prototype.create = function(e) {
|
|
1595
1595
|
var t = this;
|
|
1596
1596
|
if (!this.mode)
|
|
@@ -1624,14 +1624,14 @@ var Rr = { exports: {} };
|
|
|
1624
1624
|
return new T(function(a, s) {
|
|
1625
1625
|
r._blockedFuncs.push([function() {
|
|
1626
1626
|
r._promise(e, t, n).then(a, s);
|
|
1627
|
-
},
|
|
1627
|
+
}, M]);
|
|
1628
1628
|
});
|
|
1629
1629
|
if (n)
|
|
1630
1630
|
return Pe(function() {
|
|
1631
1631
|
var a = new T(function(s, u) {
|
|
1632
1632
|
r._lock();
|
|
1633
|
-
var
|
|
1634
|
-
|
|
1633
|
+
var d = t(s, u, r);
|
|
1634
|
+
d && d.then && d.then(s, u);
|
|
1635
1635
|
});
|
|
1636
1636
|
return a.finally(function() {
|
|
1637
1637
|
return r._unlock();
|
|
@@ -1719,7 +1719,7 @@ var Rr = { exports: {} };
|
|
|
1719
1719
|
function yt(e) {
|
|
1720
1720
|
return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
|
|
1721
1721
|
}
|
|
1722
|
-
function ui(e, t,
|
|
1722
|
+
function ui(e, t, d) {
|
|
1723
1723
|
function r(g) {
|
|
1724
1724
|
if (g.type === 3)
|
|
1725
1725
|
return null;
|
|
@@ -1734,8 +1734,8 @@ var Rr = { exports: {} };
|
|
|
1734
1734
|
var g = v.trans, _ = v.type, S = v.keys, E = v.values, O = v.range;
|
|
1735
1735
|
return new Promise(function(k, C) {
|
|
1736
1736
|
k = J(k);
|
|
1737
|
-
var
|
|
1738
|
-
if (!
|
|
1737
|
+
var A = g.objectStore(y), R = A.keyPath == null, D = _ === "put" || _ === "add";
|
|
1738
|
+
if (!D && _ !== "delete" && _ !== "deleteRange")
|
|
1739
1739
|
throw new Error("Invalid operation type: " + _);
|
|
1740
1740
|
var G, L = (S || E || { length: 1 }).length;
|
|
1741
1741
|
if (S && E && S.length !== E.length)
|
|
@@ -1749,15 +1749,15 @@ var Rr = { exports: {} };
|
|
|
1749
1749
|
if (_ === "deleteRange") {
|
|
1750
1750
|
if (O.type === 4)
|
|
1751
1751
|
return k({ numFailures: le, failures: V, results: [], lastResult: void 0 });
|
|
1752
|
-
O.type === 3 ? W.push(G =
|
|
1752
|
+
O.type === 3 ? W.push(G = A.clear()) : W.push(G = A.delete(r(O)));
|
|
1753
1753
|
} else {
|
|
1754
|
-
var R =
|
|
1755
|
-
if (
|
|
1754
|
+
var R = D ? R ? [E, S] : [E, null] : [S, null], U = R[0], Ee = R[1];
|
|
1755
|
+
if (D)
|
|
1756
1756
|
for (var ae = 0; ae < L; ++ae)
|
|
1757
|
-
W.push(G = Ee && Ee[ae] !== void 0 ?
|
|
1757
|
+
W.push(G = Ee && Ee[ae] !== void 0 ? A[_](U[ae], Ee[ae]) : A[_](U[ae])), G.onerror = Y;
|
|
1758
1758
|
else
|
|
1759
1759
|
for (ae = 0; ae < L; ++ae)
|
|
1760
|
-
W.push(G =
|
|
1760
|
+
W.push(G = A[_](U[ae])), G.onerror = Y;
|
|
1761
1761
|
}
|
|
1762
1762
|
function Vt(se) {
|
|
1763
1763
|
se = se.target.result, W.forEach(function(ze, Nn) {
|
|
@@ -1774,11 +1774,11 @@ var Rr = { exports: {} };
|
|
|
1774
1774
|
var g = v.trans, _ = v.keys;
|
|
1775
1775
|
return new Promise(function(S, E) {
|
|
1776
1776
|
S = J(S);
|
|
1777
|
-
for (var O, k = g.objectStore(y), C = _.length,
|
|
1778
|
-
W = W.target,
|
|
1777
|
+
for (var O, k = g.objectStore(y), C = _.length, A = new Array(C), R = 0, D = 0, G = function(W) {
|
|
1778
|
+
W = W.target, A[W._pos] = W.result, ++D === R && S(A);
|
|
1779
1779
|
}, L = ye(E), Y = 0; Y < C; ++Y)
|
|
1780
1780
|
_[Y] != null && ((O = k.get(_[Y]))._pos = Y, O.onsuccess = G, O.onerror = L, ++R);
|
|
1781
|
-
R === 0 && S(
|
|
1781
|
+
R === 0 && S(A);
|
|
1782
1782
|
});
|
|
1783
1783
|
}, get: function(v) {
|
|
1784
1784
|
var g = v.trans, _ = v.key;
|
|
@@ -1792,12 +1792,12 @@ var Rr = { exports: {} };
|
|
|
1792
1792
|
}, query: (p = l, function(v) {
|
|
1793
1793
|
return new Promise(function(g, _) {
|
|
1794
1794
|
g = J(g);
|
|
1795
|
-
var S, E, O, R = v.trans, k = v.values, C = v.limit, G = v.query,
|
|
1795
|
+
var S, E, O, R = v.trans, k = v.values, C = v.limit, G = v.query, A = C === 1 / 0 ? void 0 : C, D = G.index, G = G.range, R = R.objectStore(y), D = D.isPrimaryKey ? R : R.index(D.name), G = r(G);
|
|
1796
1796
|
if (C === 0)
|
|
1797
1797
|
return g({ result: [] });
|
|
1798
|
-
p ? ((
|
|
1798
|
+
p ? ((A = k ? D.getAll(G, A) : D.getAllKeys(G, A)).onsuccess = function(L) {
|
|
1799
1799
|
return g({ result: L.target.result });
|
|
1800
|
-
},
|
|
1800
|
+
}, A.onerror = ye(_)) : (S = 0, E = !k && "openKeyCursor" in D ? D.openKeyCursor(G) : D.openCursor(G), O = [], E.onsuccess = function(L) {
|
|
1801
1801
|
var Y = E.result;
|
|
1802
1802
|
return Y ? (O.push(k ? Y.value : Y.primaryKey), ++S === C ? g({ result: O }) : void Y.continue()) : g({ result: O });
|
|
1803
1803
|
}, E.onerror = ye(_));
|
|
@@ -1806,7 +1806,7 @@ var Rr = { exports: {} };
|
|
|
1806
1806
|
var g = v.trans, _ = v.values, S = v.query, E = v.reverse, O = v.unique;
|
|
1807
1807
|
return new Promise(function(k, C) {
|
|
1808
1808
|
k = J(k);
|
|
1809
|
-
var
|
|
1809
|
+
var D = S.index, A = S.range, R = g.objectStore(y), R = D.isPrimaryKey ? R : R.index(D.name), D = E ? O ? "prevunique" : "prev" : O ? "nextunique" : "next", G = !_ && "openKeyCursor" in R ? R.openKeyCursor(r(A), D) : R.openCursor(r(A), D);
|
|
1810
1810
|
G.onerror = ye(C), G.onsuccess = J(function(L) {
|
|
1811
1811
|
var Y, W, V, le, U = G.result;
|
|
1812
1812
|
U ? (U.___id = ++si, U.done = !1, Y = U.continue.bind(U), W = (W = U.continuePrimaryKey) && W.bind(U), V = U.advance.bind(U), le = function() {
|
|
@@ -1847,14 +1847,14 @@ var Rr = { exports: {} };
|
|
|
1847
1847
|
}, count: function(v) {
|
|
1848
1848
|
var g = v.query, _ = v.trans, S = g.index, E = g.range;
|
|
1849
1849
|
return new Promise(function(O, k) {
|
|
1850
|
-
var C = _.objectStore(y),
|
|
1851
|
-
|
|
1850
|
+
var C = _.objectStore(y), A = S.isPrimaryKey ? C : C.index(S.name), C = r(E), A = C ? A.count(C) : A.count();
|
|
1851
|
+
A.onsuccess = J(function(R) {
|
|
1852
1852
|
return O(R.target.result);
|
|
1853
|
-
}),
|
|
1853
|
+
}), A.onerror = ye(k);
|
|
1854
1854
|
});
|
|
1855
1855
|
} };
|
|
1856
1856
|
}
|
|
1857
|
-
var a, s, u, b = (s =
|
|
1857
|
+
var a, s, u, b = (s = d, u = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: u.map(function(f) {
|
|
1858
1858
|
return s.objectStore(f);
|
|
1859
1859
|
}).map(function(f) {
|
|
1860
1860
|
var p = f.keyPath, g = f.autoIncrement, y = N(p), v = {}, g = { name: f.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: y, keyPath: p, autoIncrement: g, unique: !0, extractKey: vn(p) }, indexes: yr(f.indexNames).map(function(_) {
|
|
@@ -1866,14 +1866,14 @@ var Rr = { exports: {} };
|
|
|
1866
1866
|
return v[yt(_)];
|
|
1867
1867
|
} };
|
|
1868
1868
|
return v[":id"] = g.primaryKey, p != null && (v[yt(p)] = g.primaryKey), g;
|
|
1869
|
-
}) }, hasGetAll: 0 < u.length && "getAll" in s.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }),
|
|
1869
|
+
}) }, hasGetAll: 0 < u.length && "getAll" in s.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), d = b.schema, l = b.hasGetAll, b = d.tables.map(i), c = {};
|
|
1870
1870
|
return b.forEach(function(f) {
|
|
1871
1871
|
return c[f.name] = f;
|
|
1872
1872
|
}), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(f) {
|
|
1873
1873
|
if (!c[f])
|
|
1874
1874
|
throw new Error("Table '".concat(f, "' not found"));
|
|
1875
1875
|
return c[f];
|
|
1876
|
-
}, MIN_KEY: -1 / 0, MAX_KEY: gt(t), schema:
|
|
1876
|
+
}, MIN_KEY: -1 / 0, MAX_KEY: gt(t), schema: d };
|
|
1877
1877
|
}
|
|
1878
1878
|
function ci(e, t, n, r) {
|
|
1879
1879
|
var i = n.IDBKeyRange;
|
|
@@ -1894,13 +1894,13 @@ var Rr = { exports: {} };
|
|
|
1894
1894
|
n.forEach(function(i) {
|
|
1895
1895
|
var a = r[i];
|
|
1896
1896
|
t.forEach(function(s) {
|
|
1897
|
-
var u = function
|
|
1898
|
-
return Fr(l, b) || (l = te(l)) &&
|
|
1897
|
+
var u = function d(l, b) {
|
|
1898
|
+
return Fr(l, b) || (l = te(l)) && d(l, b);
|
|
1899
1899
|
}(s, i);
|
|
1900
1900
|
(!u || "value" in u && u.value === void 0) && (s === e.Transaction.prototype || s instanceof e.Transaction ? ke(s, i, { get: function() {
|
|
1901
1901
|
return this.table(i);
|
|
1902
|
-
}, set: function(
|
|
1903
|
-
$n(this, i, { value:
|
|
1902
|
+
}, set: function(d) {
|
|
1903
|
+
$n(this, i, { value: d, writable: !0, configurable: !0, enumerable: !0 });
|
|
1904
1904
|
} }) : s[i] = new e.Table(i, a));
|
|
1905
1905
|
});
|
|
1906
1906
|
});
|
|
@@ -1919,9 +1919,9 @@ var Rr = { exports: {} };
|
|
|
1919
1919
|
n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = bn("$meta", br("")[0], []), e._storeNames.push("$meta"));
|
|
1920
1920
|
var a = e._createTransaction("readwrite", e._storeNames, i);
|
|
1921
1921
|
a.create(n), a._completion.catch(r);
|
|
1922
|
-
var s = a._reject.bind(a), u =
|
|
1922
|
+
var s = a._reject.bind(a), u = M.transless || M;
|
|
1923
1923
|
Pe(function() {
|
|
1924
|
-
return
|
|
1924
|
+
return M.trans = a, M.transless = u, t !== 0 ? (Mt(e, n), l = t, ((d = a).storeNames.includes("$meta") ? d.table("$meta").get("version").then(function(b) {
|
|
1925
1925
|
return b ?? l;
|
|
1926
1926
|
}) : T.resolve(l)).then(function(b) {
|
|
1927
1927
|
return f = b, p = a, y = n, v = [], b = (c = e)._versions, g = c._dbSchema = Gt(0, c.idbdb, y), (b = b.filter(function(_) {
|
|
@@ -1931,17 +1931,17 @@ var Rr = { exports: {} };
|
|
|
1931
1931
|
var S = g, E = _._cfg.dbschema;
|
|
1932
1932
|
Ft(c, S, y), Ft(c, E, y), g = c._dbSchema = E;
|
|
1933
1933
|
var O = _n(S, E);
|
|
1934
|
-
O.add.forEach(function(
|
|
1935
|
-
Sn(y,
|
|
1936
|
-
}), O.change.forEach(function(
|
|
1937
|
-
if (
|
|
1934
|
+
O.add.forEach(function(D) {
|
|
1935
|
+
Sn(y, D[0], D[1].primKey, D[1].indexes);
|
|
1936
|
+
}), O.change.forEach(function(D) {
|
|
1937
|
+
if (D.recreate)
|
|
1938
1938
|
throw new F.Upgrade("Not yet support for changing primary key");
|
|
1939
|
-
var G = y.objectStore(
|
|
1940
|
-
|
|
1939
|
+
var G = y.objectStore(D.name);
|
|
1940
|
+
D.add.forEach(function(L) {
|
|
1941
1941
|
return Nt(G, L);
|
|
1942
|
-
}),
|
|
1942
|
+
}), D.change.forEach(function(L) {
|
|
1943
1943
|
G.deleteIndex(L.name), Nt(G, L);
|
|
1944
|
-
}),
|
|
1944
|
+
}), D.del.forEach(function(L) {
|
|
1945
1945
|
return G.deleteIndex(L);
|
|
1946
1946
|
});
|
|
1947
1947
|
});
|
|
@@ -1949,15 +1949,15 @@ var Rr = { exports: {} };
|
|
|
1949
1949
|
if (k && _._cfg.version > f) {
|
|
1950
1950
|
Mt(c, y), p._memoizedTables = {};
|
|
1951
1951
|
var C = Vn(E);
|
|
1952
|
-
O.del.forEach(function(
|
|
1953
|
-
C[
|
|
1952
|
+
O.del.forEach(function(D) {
|
|
1953
|
+
C[D] = S[D];
|
|
1954
1954
|
}), wn(c, [c.Transaction.prototype]), Bt(c, [c.Transaction.prototype], j(C), C), p.schema = C;
|
|
1955
|
-
var
|
|
1955
|
+
var A, R = qt(k);
|
|
1956
1956
|
return R && Je(), O = T.follow(function() {
|
|
1957
|
-
var
|
|
1958
|
-
(
|
|
1959
|
-
}),
|
|
1960
|
-
return
|
|
1957
|
+
var D;
|
|
1958
|
+
(A = k(p)) && R && (D = Ie.bind(null, null), A.then(D, D));
|
|
1959
|
+
}), A && typeof A.then == "function" ? T.resolve(A) : O.then(function() {
|
|
1960
|
+
return A;
|
|
1961
1961
|
});
|
|
1962
1962
|
}
|
|
1963
1963
|
}), v.push(function(S) {
|
|
@@ -1981,7 +1981,7 @@ var Rr = { exports: {} };
|
|
|
1981
1981
|
}), Mt(e, n), void T.follow(function() {
|
|
1982
1982
|
return e.on.populate.fire(a);
|
|
1983
1983
|
}).catch(s));
|
|
1984
|
-
var
|
|
1984
|
+
var d, l;
|
|
1985
1985
|
});
|
|
1986
1986
|
}
|
|
1987
1987
|
function di(e, t) {
|
|
@@ -1993,8 +1993,8 @@ var Rr = { exports: {} };
|
|
|
1993
1993
|
if (s.change.length || s.recreate)
|
|
1994
1994
|
return console.warn("Unable to patch indexes of table ".concat(s.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
|
|
1995
1995
|
var u = t.objectStore(s.name);
|
|
1996
|
-
s.add.forEach(function(
|
|
1997
|
-
pe && console.debug("Dexie upgrade patch: Creating missing index ".concat(s.name, ".").concat(
|
|
1996
|
+
s.add.forEach(function(d) {
|
|
1997
|
+
pe && console.debug("Dexie upgrade patch: Creating missing index ".concat(s.name, ".").concat(d.src)), Nt(u, d);
|
|
1998
1998
|
});
|
|
1999
1999
|
}(i[r]);
|
|
2000
2000
|
if (typeof a == "object")
|
|
@@ -2012,11 +2012,11 @@ var Rr = { exports: {} };
|
|
|
2012
2012
|
if ("" + (i.primKey.keyPath || "") != "" + (a.primKey.keyPath || "") || i.primKey.auto !== a.primKey.auto)
|
|
2013
2013
|
s.recreate = !0, r.change.push(s);
|
|
2014
2014
|
else {
|
|
2015
|
-
var u = i.idxByName,
|
|
2015
|
+
var u = i.idxByName, d = a.idxByName, l = void 0;
|
|
2016
2016
|
for (l in u)
|
|
2017
|
-
|
|
2018
|
-
for (l in
|
|
2019
|
-
var b = u[l], c =
|
|
2017
|
+
d[l] || s.del.push(l);
|
|
2018
|
+
for (l in d) {
|
|
2019
|
+
var b = u[l], c = d[l];
|
|
2020
2020
|
b ? b.src !== c.src && s.change.push(c) : s.add.push(c);
|
|
2021
2021
|
}
|
|
2022
2022
|
(0 < s.del.length || 0 < s.add.length || 0 < s.change.length) && r.change.push(s);
|
|
@@ -2043,8 +2043,8 @@ var Rr = { exports: {} };
|
|
|
2043
2043
|
function Gt(e, t, n) {
|
|
2044
2044
|
var r = {};
|
|
2045
2045
|
return wt(t.objectStoreNames, 0).forEach(function(i) {
|
|
2046
|
-
for (var a = n.objectStore(i), s = mn(gr(l = a.keyPath), l || "", !0, !1, !!a.autoIncrement, l && typeof l != "string", !0), u = [],
|
|
2047
|
-
var b = a.index(a.indexNames[
|
|
2046
|
+
for (var a = n.objectStore(i), s = mn(gr(l = a.keyPath), l || "", !0, !1, !!a.autoIncrement, l && typeof l != "string", !0), u = [], d = 0; d < a.indexNames.length; ++d) {
|
|
2047
|
+
var b = a.index(a.indexNames[d]), l = b.keyPath, b = mn(b.name, l, !!b.unique, !!b.multiEntry, !1, l && typeof l != "string", !1);
|
|
2048
2048
|
u.push(b);
|
|
2049
2049
|
}
|
|
2050
2050
|
r[i] = bn(i, s, u);
|
|
@@ -2055,11 +2055,11 @@ var Rr = { exports: {} };
|
|
|
2055
2055
|
var a = r[i], s = n.objectStore(a);
|
|
2056
2056
|
e._hasGetAll = "getAll" in s;
|
|
2057
2057
|
for (var u = 0; u < s.indexNames.length; ++u) {
|
|
2058
|
-
var
|
|
2059
|
-
!t[a] || (l = t[a].idxByName[b]) && (l.name =
|
|
2058
|
+
var d = s.indexNames[u], l = s.index(d).keyPath, b = typeof l == "string" ? l : "[" + wt(l).join("+") + "]";
|
|
2059
|
+
!t[a] || (l = t[a].idxByName[b]) && (l.name = d, delete t[a].idxByName[b], t[a].idxByName[d] = l);
|
|
2060
2060
|
}
|
|
2061
2061
|
}
|
|
2062
|
-
typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) &&
|
|
2062
|
+
typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && B.WorkerGlobalScope && B instanceof B.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
|
|
2063
2063
|
}
|
|
2064
2064
|
function br(e) {
|
|
2065
2065
|
return e.split(",").map(function(t, n) {
|
|
@@ -2102,7 +2102,7 @@ var Rr = { exports: {} };
|
|
|
2102
2102
|
}
|
|
2103
2103
|
function xn(e) {
|
|
2104
2104
|
return Pe(function() {
|
|
2105
|
-
return
|
|
2105
|
+
return M.letThrough = !0, e();
|
|
2106
2106
|
});
|
|
2107
2107
|
}
|
|
2108
2108
|
function kn(e) {
|
|
@@ -2131,9 +2131,9 @@ var Rr = { exports: {} };
|
|
|
2131
2131
|
}
|
|
2132
2132
|
}
|
|
2133
2133
|
function bt(e, t) {
|
|
2134
|
-
kn(t) || function n(r,
|
|
2135
|
-
var a =
|
|
2136
|
-
mt(r, a, s), u && n(r, u),
|
|
2134
|
+
kn(t) || function n(r, d) {
|
|
2135
|
+
var a = d.from, s = d.to, u = d.l, d = d.r;
|
|
2136
|
+
mt(r, a, s), u && n(r, u), d && n(r, d);
|
|
2137
2137
|
}(e, t);
|
|
2138
2138
|
}
|
|
2139
2139
|
function Ut(e, t) {
|
|
@@ -2225,24 +2225,24 @@ var Rr = { exports: {} };
|
|
|
2225
2225
|
var s, u = /^idb\:\/\/(.*)\/(.*)\//.exec(a);
|
|
2226
2226
|
u && (a = u[1], u = u[2], (s = Ue["idb://".concat(a, "/").concat(u)]) && _r(s, e, n, t));
|
|
2227
2227
|
}
|
|
2228
|
-
n.forEach(function(
|
|
2229
|
-
return
|
|
2228
|
+
n.forEach(function(d) {
|
|
2229
|
+
return d();
|
|
2230
2230
|
});
|
|
2231
2231
|
}
|
|
2232
2232
|
function _r(e, t, n, r) {
|
|
2233
2233
|
for (var i = [], a = 0, s = Object.entries(e.queries.query); a < s.length; a++) {
|
|
2234
|
-
for (var u = s[a],
|
|
2234
|
+
for (var u = s[a], d = u[0], l = [], b = 0, c = u[1]; b < c.length; b++) {
|
|
2235
2235
|
var f = c[b];
|
|
2236
2236
|
Dn(t, f.obsSet) ? f.subscribers.forEach(function(g) {
|
|
2237
2237
|
return n.add(g);
|
|
2238
2238
|
}) : r && l.push(f);
|
|
2239
2239
|
}
|
|
2240
|
-
r && i.push([
|
|
2240
|
+
r && i.push([d, l]);
|
|
2241
2241
|
}
|
|
2242
2242
|
if (r)
|
|
2243
2243
|
for (var p = 0, y = i; p < y.length; p++) {
|
|
2244
|
-
var v = y[p],
|
|
2245
|
-
e.queries.query[
|
|
2244
|
+
var v = y[p], d = v[0], l = v[1];
|
|
2245
|
+
e.queries.query[d] = l;
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
2248
|
function pi(e) {
|
|
@@ -2274,21 +2274,21 @@ var Rr = { exports: {} };
|
|
|
2274
2274
|
var g, _, S, E, O, k = e.idbdb = v.result, C = wt(k.objectStoreNames);
|
|
2275
2275
|
if (0 < C.length)
|
|
2276
2276
|
try {
|
|
2277
|
-
var
|
|
2277
|
+
var A = k.transaction((E = C).length === 1 ? E[0] : E, "readonly");
|
|
2278
2278
|
if (t.autoSchema)
|
|
2279
|
-
_ = k, S =
|
|
2280
|
-
else if (Ft(e, e._dbSchema,
|
|
2279
|
+
_ = k, S = A, (g = e).verno = _.version / 10, S = g._dbSchema = Gt(0, _, S), g._storeNames = wt(_.objectStoreNames, 0), Bt(g, [g._allTables], j(S), S);
|
|
2280
|
+
else if (Ft(e, e._dbSchema, A), ((O = _n(Gt(0, (O = e).idbdb, A), O._dbSchema)).add.length || O.change.some(function(R) {
|
|
2281
2281
|
return R.add.length || R.change.length;
|
|
2282
2282
|
})) && !a)
|
|
2283
2283
|
return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), k.close(), i = k.version + 1, a = !0, f(u());
|
|
2284
|
-
Mt(e,
|
|
2284
|
+
Mt(e, A);
|
|
2285
2285
|
} catch {
|
|
2286
2286
|
}
|
|
2287
2287
|
Ze.push(e), k.onversionchange = J(function(R) {
|
|
2288
2288
|
t.vcFired = !0, e.on("versionchange").fire(R);
|
|
2289
2289
|
}), k.onclose = J(function(R) {
|
|
2290
2290
|
e.on("close").fire(R);
|
|
2291
|
-
}), c && (O = e._deps,
|
|
2291
|
+
}), c && (O = e._deps, A = y, k = O.indexedDB, O = O.IDBKeyRange, On(k) || A === Ct || En(k, O).put({ name: A }).catch(H)), f();
|
|
2292
2292
|
}, p);
|
|
2293
2293
|
}).catch(function(f) {
|
|
2294
2294
|
switch (f == null ? void 0 : f.name) {
|
|
@@ -2303,14 +2303,14 @@ var Rr = { exports: {} };
|
|
|
2303
2303
|
return T.reject(f);
|
|
2304
2304
|
});
|
|
2305
2305
|
}
|
|
2306
|
-
var
|
|
2306
|
+
var d, l = t.dbReadyResolve, b = null, c = !1;
|
|
2307
2307
|
return T.race([r, (typeof navigator > "u" ? T.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(f) {
|
|
2308
2308
|
function p() {
|
|
2309
2309
|
return indexedDB.databases().finally(f);
|
|
2310
2310
|
}
|
|
2311
|
-
|
|
2311
|
+
d = setInterval(p, 100), p();
|
|
2312
2312
|
}).finally(function() {
|
|
2313
|
-
return clearInterval(
|
|
2313
|
+
return clearInterval(d);
|
|
2314
2314
|
}) : Promise.resolve()).then(u)]).then(function() {
|
|
2315
2315
|
return s(), t.onReadyBeingFired = [], T.resolve(xn(function() {
|
|
2316
2316
|
return e.on.ready.fire(e.vip);
|
|
@@ -2350,9 +2350,9 @@ var Rr = { exports: {} };
|
|
|
2350
2350
|
return e.throw(a);
|
|
2351
2351
|
});
|
|
2352
2352
|
function i(a) {
|
|
2353
|
-
return function(
|
|
2354
|
-
var u = a(
|
|
2355
|
-
return u.done ?
|
|
2353
|
+
return function(d) {
|
|
2354
|
+
var u = a(d), d = u.value;
|
|
2355
|
+
return u.done ? d : d && typeof d.then == "function" ? d.then(n, r) : N(d) ? Promise.all(d).then(n, r) : n(d);
|
|
2356
2356
|
};
|
|
2357
2357
|
}
|
|
2358
2358
|
return i(t)();
|
|
@@ -2372,8 +2372,8 @@ var Rr = { exports: {} };
|
|
|
2372
2372
|
}), _;
|
|
2373
2373
|
}
|
|
2374
2374
|
t = s(r.primaryKey.keyPath, 0, r.primaryKey), i[":id"] = [t];
|
|
2375
|
-
for (var u = 0,
|
|
2376
|
-
var l =
|
|
2375
|
+
for (var u = 0, d = r.indexes; u < d.length; u++) {
|
|
2376
|
+
var l = d[u];
|
|
2377
2377
|
s(l.keyPath, 0, l);
|
|
2378
2378
|
}
|
|
2379
2379
|
function b(c) {
|
|
@@ -2423,16 +2423,16 @@ var Rr = { exports: {} };
|
|
|
2423
2423
|
return m(m({}, e), { table: function(t) {
|
|
2424
2424
|
var n = e.table(t), r = n.schema.primaryKey;
|
|
2425
2425
|
return m(m({}, n), { mutate: function(i) {
|
|
2426
|
-
var a =
|
|
2426
|
+
var a = M.trans, s = a.table(t).hook, u = s.deleting, d = s.creating, l = s.updating;
|
|
2427
2427
|
switch (i.type) {
|
|
2428
2428
|
case "add":
|
|
2429
|
-
if (
|
|
2429
|
+
if (d.fire === H)
|
|
2430
2430
|
break;
|
|
2431
2431
|
return a._promise("readwrite", function() {
|
|
2432
2432
|
return b(i);
|
|
2433
2433
|
}, !0);
|
|
2434
2434
|
case "put":
|
|
2435
|
-
if (
|
|
2435
|
+
if (d.fire === H && l.fire === H)
|
|
2436
2436
|
break;
|
|
2437
2437
|
return a._promise("readwrite", function() {
|
|
2438
2438
|
return b(i);
|
|
@@ -2459,20 +2459,20 @@ var Rr = { exports: {} };
|
|
|
2459
2459
|
}
|
|
2460
2460
|
return n.mutate(i);
|
|
2461
2461
|
function b(c) {
|
|
2462
|
-
var f, p, y, v =
|
|
2462
|
+
var f, p, y, v = M.trans, g = c.keys || jn(r, c);
|
|
2463
2463
|
if (!g)
|
|
2464
2464
|
throw new Error("Keys missing");
|
|
2465
|
-
return (c = c.type === "add" || c.type === "put" ? m(m({}, c), { keys: g }) : m({}, c)).type !== "delete" && (c.values =
|
|
2465
|
+
return (c = c.type === "add" || c.type === "put" ? m(m({}, c), { keys: g }) : m({}, c)).type !== "delete" && (c.values = I([], c.values, !0)), c.keys && (c.keys = I([], c.keys, !0)), f = n, y = g, ((p = c).type === "add" ? Promise.resolve([]) : f.getMany({ trans: p.trans, keys: y, cache: "immutable" })).then(function(_) {
|
|
2466
2466
|
var S = g.map(function(E, O) {
|
|
2467
|
-
var k, C,
|
|
2468
|
-
return c.type === "delete" ? u.fire.call(
|
|
2469
|
-
ie(
|
|
2470
|
-
}))),
|
|
2467
|
+
var k, C, A, R = _[O], D = { onerror: null, onsuccess: null };
|
|
2468
|
+
return c.type === "delete" ? u.fire.call(D, E, R, v) : c.type === "add" || R === void 0 ? (k = d.fire.call(D, E, c.values[O], v), E == null && k != null && (c.keys[O] = E = k, r.outbound || fe(c.values[O], r.keyPath, E))) : (k = Tn(R, c.values[O]), (C = l.fire.call(D, k, E, R, v)) && (A = c.values[O], Object.keys(C).forEach(function(G) {
|
|
2469
|
+
ie(A, G) ? A[G] = C[G] : fe(A, G, C[G]);
|
|
2470
|
+
}))), D;
|
|
2471
2471
|
});
|
|
2472
2472
|
return n.mutate(c).then(function(E) {
|
|
2473
|
-
for (var O = E.failures, k = E.results, C = E.numFailures, E = E.lastResult,
|
|
2474
|
-
var R = (k || g)[
|
|
2475
|
-
R == null ?
|
|
2473
|
+
for (var O = E.failures, k = E.results, C = E.numFailures, E = E.lastResult, A = 0; A < g.length; ++A) {
|
|
2474
|
+
var R = (k || g)[A], D = S[A];
|
|
2475
|
+
R == null ? D.onerror && D.onerror(O[A]) : D.onsuccess && D.onsuccess(c.type === "put" && _[A] ? c.values[A] : R);
|
|
2476
2476
|
}
|
|
2477
2477
|
return { failures: O, results: k, numFailures: C, lastResult: E };
|
|
2478
2478
|
}).catch(function(E) {
|
|
@@ -2528,28 +2528,28 @@ var Rr = { exports: {} };
|
|
|
2528
2528
|
var bi = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
|
|
2529
2529
|
var t = e.schema.name, n = new oe(e.MIN_KEY, e.MAX_KEY);
|
|
2530
2530
|
return m(m({}, e), { transaction: function(r, i, a) {
|
|
2531
|
-
if (
|
|
2532
|
-
throw new F.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(
|
|
2531
|
+
if (M.subscr && i !== "readonly")
|
|
2532
|
+
throw new F.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(M.querier));
|
|
2533
2533
|
return e.transaction(r, i, a);
|
|
2534
2534
|
}, table: function(r) {
|
|
2535
2535
|
function i(p) {
|
|
2536
2536
|
var p = (y = p.query).index, y = y.range;
|
|
2537
2537
|
return [p, new oe((p = y.lower) !== null && p !== void 0 ? p : e.MIN_KEY, (y = y.upper) !== null && y !== void 0 ? y : e.MAX_KEY)];
|
|
2538
2538
|
}
|
|
2539
|
-
var a = e.table(r), s = a.schema, u = s.primaryKey,
|
|
2540
|
-
function p(
|
|
2541
|
-
return
|
|
2539
|
+
var a = e.table(r), s = a.schema, u = s.primaryKey, d = u.extractKey, l = u.outbound, b = m(m({}, a), { mutate: function(f) {
|
|
2540
|
+
function p(D) {
|
|
2541
|
+
return D = "idb://".concat(t, "/").concat(r, "/").concat(D), S[D] || (S[D] = new oe());
|
|
2542
2542
|
}
|
|
2543
|
-
var y, v, g, _ = f.trans, S = f.mutatedParts || (f.mutatedParts = {}), E = p(""), O = p(":dels"), k = f.type, R = f.type === "deleteRange" ? [f.range] : f.type === "delete" ? [f.keys] : f.values.length < 50 ? [jn(u, f).filter(function(
|
|
2544
|
-
return
|
|
2545
|
-
}), f.values] : [], C = R[0],
|
|
2546
|
-
return N(C) ? (E.addKeys(C), (R = k === "delete" || C.length ===
|
|
2547
|
-
var G = y(
|
|
2543
|
+
var y, v, g, _ = f.trans, S = f.mutatedParts || (f.mutatedParts = {}), E = p(""), O = p(":dels"), k = f.type, R = f.type === "deleteRange" ? [f.range] : f.type === "delete" ? [f.keys] : f.values.length < 50 ? [jn(u, f).filter(function(D) {
|
|
2544
|
+
return D;
|
|
2545
|
+
}), f.values] : [], C = R[0], A = R[1], R = f.trans._cache;
|
|
2546
|
+
return N(C) ? (E.addKeys(C), (R = k === "delete" || C.length === A.length ? Sr(C, R) : null) || O.addKeys(C), (R || A) && (y = p, v = R, g = A, s.indexes.forEach(function(D) {
|
|
2547
|
+
var G = y(D.name || "");
|
|
2548
2548
|
function L(W) {
|
|
2549
|
-
return W != null ?
|
|
2549
|
+
return W != null ? D.extractKey(W) : null;
|
|
2550
2550
|
}
|
|
2551
2551
|
function Y(W) {
|
|
2552
|
-
return
|
|
2552
|
+
return D.multiEntry && N(W) ? W.forEach(function(V) {
|
|
2553
2553
|
return G.addKey(V);
|
|
2554
2554
|
}) : G.addKey(W);
|
|
2555
2555
|
}
|
|
@@ -2557,10 +2557,10 @@ var Rr = { exports: {} };
|
|
|
2557
2557
|
var le = v && L(v[U]), U = g && L(g[U]);
|
|
2558
2558
|
$(le, U) !== 0 && (le != null && Y(le), U != null && Y(U));
|
|
2559
2559
|
});
|
|
2560
|
-
}))) : C ? (
|
|
2561
|
-
return p(
|
|
2562
|
-
})), a.mutate(f).then(function(
|
|
2563
|
-
return !C || f.type !== "add" && f.type !== "put" || E.addKeys(
|
|
2560
|
+
}))) : C ? (A = { from: C.lower, to: C.upper }, O.add(A), E.add(A)) : (E.add(n), O.add(n), s.indexes.forEach(function(D) {
|
|
2561
|
+
return p(D.name).add(n);
|
|
2562
|
+
})), a.mutate(f).then(function(D) {
|
|
2563
|
+
return !C || f.type !== "add" && f.type !== "put" || E.addKeys(D.results), _.mutatedParts = Wt(_.mutatedParts || {}, S), D;
|
|
2564
2564
|
});
|
|
2565
2565
|
} }), c = { get: function(f) {
|
|
2566
2566
|
return [u, new oe(f.key)];
|
|
@@ -2569,34 +2569,34 @@ var Rr = { exports: {} };
|
|
|
2569
2569
|
}, count: i, query: i, openCursor: i };
|
|
2570
2570
|
return j(c).forEach(function(f) {
|
|
2571
2571
|
b[f] = function(p) {
|
|
2572
|
-
var y =
|
|
2572
|
+
var y = M.subscr, v = !!y, g = Er(M, a) && Or(f, p) ? p.obsSet = {} : y;
|
|
2573
2573
|
if (v) {
|
|
2574
|
-
var _ = function(
|
|
2575
|
-
return
|
|
2574
|
+
var _ = function(A) {
|
|
2575
|
+
return A = "idb://".concat(t, "/").concat(r, "/").concat(A), g[A] || (g[A] = new oe());
|
|
2576
2576
|
}, S = _(""), E = _(":dels"), y = c[f](p), v = y[0], y = y[1];
|
|
2577
2577
|
if ((f === "query" && v.isPrimaryKey && !p.values ? E : _(v.name || "")).add(y), !v.isPrimaryKey) {
|
|
2578
2578
|
if (f !== "count") {
|
|
2579
2579
|
var O = f === "query" && l && p.values && a.query(m(m({}, p), { values: !1 }));
|
|
2580
|
-
return a[f].apply(this, arguments).then(function(
|
|
2580
|
+
return a[f].apply(this, arguments).then(function(A) {
|
|
2581
2581
|
if (f === "query") {
|
|
2582
2582
|
if (l && p.values)
|
|
2583
2583
|
return O.then(function(L) {
|
|
2584
|
-
return L = L.result, S.addKeys(L),
|
|
2584
|
+
return L = L.result, S.addKeys(L), A;
|
|
2585
2585
|
});
|
|
2586
|
-
var R = p.values ?
|
|
2586
|
+
var R = p.values ? A.result.map(d) : A.result;
|
|
2587
2587
|
(p.values ? S : E).addKeys(R);
|
|
2588
2588
|
} else if (f === "openCursor") {
|
|
2589
|
-
var
|
|
2590
|
-
return
|
|
2591
|
-
return E.addKey(
|
|
2589
|
+
var D = A, G = p.values;
|
|
2590
|
+
return D && Object.create(D, { key: { get: function() {
|
|
2591
|
+
return E.addKey(D.primaryKey), D.key;
|
|
2592
2592
|
} }, primaryKey: { get: function() {
|
|
2593
|
-
var L =
|
|
2593
|
+
var L = D.primaryKey;
|
|
2594
2594
|
return E.addKey(L), L;
|
|
2595
2595
|
} }, value: { get: function() {
|
|
2596
|
-
return G && S.addKey(
|
|
2596
|
+
return G && S.addKey(D.primaryKey), D.value;
|
|
2597
2597
|
} } });
|
|
2598
2598
|
}
|
|
2599
|
-
return
|
|
2599
|
+
return A;
|
|
2600
2600
|
});
|
|
2601
2601
|
}
|
|
2602
2602
|
E.add(n);
|
|
@@ -2626,11 +2626,11 @@ var Rr = { exports: {} };
|
|
|
2626
2626
|
function kr(e, t, f, r, i, a) {
|
|
2627
2627
|
if (!f || f.length === 0)
|
|
2628
2628
|
return e;
|
|
2629
|
-
var s = t.query.index, u = s.multiEntry,
|
|
2629
|
+
var s = t.query.index, u = s.multiEntry, d = t.query.range, l = r.schema.primaryKey.extractKey, b = s.extractKey, c = (s.lowLevelIndex || s).extractKey, f = f.reduce(function(p, y) {
|
|
2630
2630
|
var v = p, g = y.type === "add" || y.type === "put" ? y.values.filter(function(O) {
|
|
2631
2631
|
return O = b(O), u && N(O) ? O.some(function(k) {
|
|
2632
|
-
return Kn(k,
|
|
2633
|
-
}) : Kn(O,
|
|
2632
|
+
return Kn(k, d);
|
|
2633
|
+
}) : Kn(O, d);
|
|
2634
2634
|
}).map(function(O) {
|
|
2635
2635
|
return O = Ae(O), a && Object.freeze(O), O;
|
|
2636
2636
|
}) : [];
|
|
@@ -2713,7 +2713,7 @@ var Rr = { exports: {} };
|
|
|
2713
2713
|
var t = e.schema.name;
|
|
2714
2714
|
return m(m({}, e), { transaction: function(n, r, i) {
|
|
2715
2715
|
var a, s, u = e.transaction(n, r, i);
|
|
2716
|
-
return r === "readwrite" && (s = (a = new AbortController()).signal, i = function(
|
|
2716
|
+
return r === "readwrite" && (s = (a = new AbortController()).signal, i = function(d) {
|
|
2717
2717
|
return function() {
|
|
2718
2718
|
if (a.abort(), r === "readwrite") {
|
|
2719
2719
|
for (var l = /* @__PURE__ */ new Set(), b = 0, c = n; b < c.length; b++) {
|
|
@@ -2722,10 +2722,10 @@ var Rr = { exports: {} };
|
|
|
2722
2722
|
var y = e.table(f), v = p.optimisticOps.filter(function(L) {
|
|
2723
2723
|
return L.trans === u;
|
|
2724
2724
|
});
|
|
2725
|
-
if (u._explicit &&
|
|
2725
|
+
if (u._explicit && d && u.mutatedParts)
|
|
2726
2726
|
for (var g = 0, _ = Object.values(p.queries.query); g < _.length; g++)
|
|
2727
2727
|
for (var S = 0, E = (C = _[g]).slice(); S < E.length; S++)
|
|
2728
|
-
Dn((
|
|
2728
|
+
Dn((A = E[S]).obsSet, u.mutatedParts) && (Ke(C, A), A.subscribers.forEach(function(L) {
|
|
2729
2729
|
return l.add(L);
|
|
2730
2730
|
}));
|
|
2731
2731
|
else if (0 < v.length) {
|
|
@@ -2733,10 +2733,10 @@ var Rr = { exports: {} };
|
|
|
2733
2733
|
return L.trans !== u;
|
|
2734
2734
|
});
|
|
2735
2735
|
for (var O = 0, k = Object.values(p.queries.query); O < k.length; O++)
|
|
2736
|
-
for (var C,
|
|
2737
|
-
(
|
|
2736
|
+
for (var C, A, R, D = 0, G = (C = k[O]).slice(); D < G.length; D++)
|
|
2737
|
+
(A = G[D]).res != null && u.mutatedParts && (d && !A.dirty ? (R = Object.isFrozen(A.res), R = kr(A.res, A.req, v, y, A, R), A.dirty ? (Ke(C, A), A.subscribers.forEach(function(L) {
|
|
2738
2738
|
return l.add(L);
|
|
2739
|
-
})) : R !==
|
|
2739
|
+
})) : R !== A.res && (A.res = R, A.promise = T.resolve({ result: R }))) : (A.dirty && Ke(C, A), A.subscribers.forEach(function(L) {
|
|
2740
2740
|
return l.add(L);
|
|
2741
2741
|
})));
|
|
2742
2742
|
}
|
|
@@ -2751,29 +2751,29 @@ var Rr = { exports: {} };
|
|
|
2751
2751
|
}, table: function(n) {
|
|
2752
2752
|
var r = e.table(n), i = r.schema.primaryKey;
|
|
2753
2753
|
return m(m({}, r), { mutate: function(a) {
|
|
2754
|
-
var s =
|
|
2754
|
+
var s = M.trans;
|
|
2755
2755
|
if (i.outbound || s.db._options.cache === "disabled" || s.explicit)
|
|
2756
2756
|
return r.mutate(a);
|
|
2757
2757
|
var u = Ue["idb://".concat(t, "/").concat(n)];
|
|
2758
|
-
return u ? (s = r.mutate(a), a.type !== "add" && a.type !== "put" || !(50 <= a.values.length || jn(i, a).some(function(
|
|
2759
|
-
return
|
|
2760
|
-
})) ? (u.optimisticOps.push(a), a.mutatedParts && zt(a.mutatedParts), s.then(function(
|
|
2761
|
-
0 <
|
|
2758
|
+
return u ? (s = r.mutate(a), a.type !== "add" && a.type !== "put" || !(50 <= a.values.length || jn(i, a).some(function(d) {
|
|
2759
|
+
return d == null;
|
|
2760
|
+
})) ? (u.optimisticOps.push(a), a.mutatedParts && zt(a.mutatedParts), s.then(function(d) {
|
|
2761
|
+
0 < d.numFailures && (Ke(u.optimisticOps, a), (d = xr(0, a, d)) && u.optimisticOps.push(d), a.mutatedParts && zt(a.mutatedParts));
|
|
2762
2762
|
}), s.catch(function() {
|
|
2763
2763
|
Ke(u.optimisticOps, a), a.mutatedParts && zt(a.mutatedParts);
|
|
2764
|
-
})) : s.then(function(
|
|
2764
|
+
})) : s.then(function(d) {
|
|
2765
2765
|
var l = xr(0, m(m({}, a), { values: a.values.map(function(p, c) {
|
|
2766
2766
|
var f, p = (f = i.keyPath) !== null && f !== void 0 && f.includes(".") ? Ae(p) : m({}, p);
|
|
2767
|
-
return fe(p, i.keyPath,
|
|
2768
|
-
}) }),
|
|
2767
|
+
return fe(p, i.keyPath, d.results[c]), p;
|
|
2768
|
+
}) }), d);
|
|
2769
2769
|
u.optimisticOps.push(l), queueMicrotask(function() {
|
|
2770
2770
|
return a.mutatedParts && zt(a.mutatedParts);
|
|
2771
2771
|
});
|
|
2772
2772
|
}), s) : r.mutate(a);
|
|
2773
2773
|
}, query: function(a) {
|
|
2774
|
-
if (!Er(
|
|
2774
|
+
if (!Er(M, r) || !Or("query", a))
|
|
2775
2775
|
return r.query(a);
|
|
2776
|
-
var s = ((l =
|
|
2776
|
+
var s = ((l = M.trans) === null || l === void 0 ? void 0 : l.db._options.cache) === "immutable", c = M, u = c.requery, d = c.signal, l = function(y, v, g, _) {
|
|
2777
2777
|
var S = Ue["idb://".concat(y, "/").concat(v)];
|
|
2778
2778
|
if (!S)
|
|
2779
2779
|
return [];
|
|
@@ -2807,7 +2807,7 @@ var Rr = { exports: {} };
|
|
|
2807
2807
|
return y;
|
|
2808
2808
|
}).catch(function(y) {
|
|
2809
2809
|
return p && b && Ke(p, b), Promise.reject(y);
|
|
2810
|
-
}), b = { obsSet: a.obsSet, promise: c, subscribers: /* @__PURE__ */ new Set(), type: "query", req: a, dirty: !1 }, p ? p.push(b) : (p = [b], (f = f || (Ue["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[a.query.index.name || ""] = p)), wi(b, p, u,
|
|
2810
|
+
}), b = { obsSet: a.obsSet, promise: c, subscribers: /* @__PURE__ */ new Set(), type: "query", req: a, dirty: !1 }, p ? p.push(b) : (p = [b], (f = f || (Ue["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[a.query.index.name || ""] = p)), wi(b, p, u, d), b.promise.then(function(y) {
|
|
2811
2811
|
return { result: kr(y.result, a, f == null ? void 0 : f.optimisticOps, r, b, s) };
|
|
2812
2812
|
});
|
|
2813
2813
|
} });
|
|
@@ -2830,7 +2830,7 @@ var Rr = { exports: {} };
|
|
|
2830
2830
|
return n || (n = new this.Version(e), t.push(n), t.sort(li), n.stores({}), this._state.autoSchema = !1, n);
|
|
2831
2831
|
}, ee.prototype._whenReady = function(e) {
|
|
2832
2832
|
var t = this;
|
|
2833
|
-
return this.idbdb && (this._state.openComplete ||
|
|
2833
|
+
return this.idbdb && (this._state.openComplete || M.letThrough || this._vip) ? e() : new T(function(n, r) {
|
|
2834
2834
|
if (t._state.openComplete)
|
|
2835
2835
|
return r(new F.DatabaseClosed(t._state.dbOpenError));
|
|
2836
2836
|
if (!t._state.isBeingOpened) {
|
|
@@ -2881,8 +2881,8 @@ var Rr = { exports: {} };
|
|
|
2881
2881
|
t.close(e);
|
|
2882
2882
|
var u = t._deps.indexedDB.deleteDatabase(t.name);
|
|
2883
2883
|
u.onsuccess = J(function() {
|
|
2884
|
-
var
|
|
2885
|
-
|
|
2884
|
+
var d, l, b;
|
|
2885
|
+
d = t._deps, l = t.name, b = d.indexedDB, d = d.IDBKeyRange, On(b) || l === Ct || En(b, d).delete(l).catch(H), i();
|
|
2886
2886
|
}), u.onerror = ye(a), u.onblocked = t._fireOnBlocked;
|
|
2887
2887
|
}
|
|
2888
2888
|
if (n)
|
|
@@ -2916,7 +2916,7 @@ var Rr = { exports: {} };
|
|
|
2916
2916
|
}).apply(this, arguments);
|
|
2917
2917
|
return this._transaction.apply(this, e);
|
|
2918
2918
|
}, ee.prototype._transaction = function(e, t, n) {
|
|
2919
|
-
var r = this, i =
|
|
2919
|
+
var r = this, i = M.trans;
|
|
2920
2920
|
i && i.db === this && e.indexOf("!") === -1 || (i = null);
|
|
2921
2921
|
var a, s, u = e.indexOf("?") !== -1;
|
|
2922
2922
|
e = e.replace("!", "").replace("?", "");
|
|
@@ -2951,9 +2951,9 @@ var Rr = { exports: {} };
|
|
|
2951
2951
|
c(l);
|
|
2952
2952
|
}) : q(l);
|
|
2953
2953
|
}
|
|
2954
|
-
var
|
|
2954
|
+
var d = (function l(b, c, f, p, y) {
|
|
2955
2955
|
return T.resolve().then(function() {
|
|
2956
|
-
var v =
|
|
2956
|
+
var v = M.transless || M, g = b._createTransaction(c, f, b._dbSchema, p);
|
|
2957
2957
|
if (g.explicit = !0, v = { trans: g, transless: v }, p)
|
|
2958
2958
|
g.idbtrans = p.idbtrans;
|
|
2959
2959
|
else
|
|
@@ -2981,9 +2981,9 @@ var Rr = { exports: {} };
|
|
|
2981
2981
|
});
|
|
2982
2982
|
});
|
|
2983
2983
|
}).bind(null, this, a, s, i, n);
|
|
2984
|
-
return i ? i._promise(a,
|
|
2985
|
-
return r._whenReady(
|
|
2986
|
-
}) : this._whenReady(
|
|
2984
|
+
return i ? i._promise(a, d, "lock") : M.trans ? Ge(M.transless, function() {
|
|
2985
|
+
return r._whenReady(d);
|
|
2986
|
+
}) : this._whenReady(d);
|
|
2987
2987
|
}, ee.prototype.table = function(e) {
|
|
2988
2988
|
if (!ie(this._allTables, e))
|
|
2989
2989
|
throw new F.InvalidTable("Table ".concat(e, " does not exist"));
|
|
@@ -2994,7 +2994,7 @@ var Rr = { exports: {} };
|
|
|
2994
2994
|
this._middlewares = {}, this.verno = 0;
|
|
2995
2995
|
var r = ee.dependencies;
|
|
2996
2996
|
this._options = t = m({ addons: ee.addons, autoOpen: !0, indexedDB: r.indexedDB, IDBKeyRange: r.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, r = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
|
|
2997
|
-
var i, a, s, u,
|
|
2997
|
+
var i, a, s, u, d, l = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: H, dbReadyPromise: null, cancelOpen: H, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
|
|
2998
2998
|
l.dbReadyPromise = new T(function(c) {
|
|
2999
2999
|
l.dbReadyResolve = c;
|
|
3000
3000
|
}), l.openCanceller = new T(function(c, f) {
|
|
@@ -3033,14 +3033,14 @@ var Rr = { exports: {} };
|
|
|
3033
3033
|
});
|
|
3034
3034
|
})), this.Version = (u = this, dt(hi.prototype, function(c) {
|
|
3035
3035
|
this.db = u, this._cfg = { version: c, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
|
|
3036
|
-
})), this.WhereClause = (
|
|
3037
|
-
if (this.db =
|
|
3036
|
+
})), this.WhereClause = (d = this, dt(pr.prototype, function(c, f, p) {
|
|
3037
|
+
if (this.db = d, this._ctx = { table: c, index: f === ":id" ? null : f, or: p }, this._cmp = this._ascending = $, this._descending = function(y, v) {
|
|
3038
3038
|
return $(v, y);
|
|
3039
3039
|
}, this._max = function(y, v) {
|
|
3040
3040
|
return 0 < $(y, v) ? y : v;
|
|
3041
3041
|
}, this._min = function(y, v) {
|
|
3042
3042
|
return $(y, v) < 0 ? y : v;
|
|
3043
|
-
}, this._IDBKeyRange =
|
|
3043
|
+
}, this._IDBKeyRange = d._deps.IDBKeyRange, !this._IDBKeyRange)
|
|
3044
3044
|
throw new F.MissingAPI();
|
|
3045
3045
|
})), this.on("versionchange", function(c) {
|
|
3046
3046
|
0 < c.newVersion ? console.warn("Another connection wants to upgrade database '".concat(n.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(n.name, "'. Closing db now to resume the delete request.")), n.close({ disableAutoOpen: !1 });
|
|
@@ -3082,13 +3082,13 @@ var Rr = { exports: {} };
|
|
|
3082
3082
|
this._subscribe = e;
|
|
3083
3083
|
}
|
|
3084
3084
|
try {
|
|
3085
|
-
Ht = { indexedDB:
|
|
3085
|
+
Ht = { indexedDB: B.indexedDB || B.mozIndexedDB || B.webkitIndexedDB || B.msIndexedDB, IDBKeyRange: B.IDBKeyRange || B.webkitIDBKeyRange };
|
|
3086
3086
|
} catch {
|
|
3087
3087
|
Ht = { indexedDB: null, IDBKeyRange: null };
|
|
3088
3088
|
}
|
|
3089
3089
|
function Dr(e) {
|
|
3090
3090
|
var t, n = !1, r = new Si(function(i) {
|
|
3091
|
-
var a = qt(e), s, u = !1,
|
|
3091
|
+
var a = qt(e), s, u = !1, d = {}, l = {}, b = { get closed() {
|
|
3092
3092
|
return u;
|
|
3093
3093
|
}, unsubscribe: function() {
|
|
3094
3094
|
u || (u = !0, s && s.abort(), c && Te.storagemutated.unsubscribe(p));
|
|
@@ -3097,10 +3097,10 @@ var Rr = { exports: {} };
|
|
|
3097
3097
|
var c = !1, f = function() {
|
|
3098
3098
|
return ln(y);
|
|
3099
3099
|
}, p = function(v) {
|
|
3100
|
-
Wt(
|
|
3100
|
+
Wt(d, v), Dn(l, d) && f();
|
|
3101
3101
|
}, y = function() {
|
|
3102
3102
|
var v, g, _;
|
|
3103
|
-
!u && Ht.indexedDB && (
|
|
3103
|
+
!u && Ht.indexedDB && (d = {}, v = {}, s && s.abort(), s = new AbortController(), _ = function(S) {
|
|
3104
3104
|
var E = Qe();
|
|
3105
3105
|
try {
|
|
3106
3106
|
a && Je();
|
|
@@ -3110,7 +3110,7 @@ var Rr = { exports: {} };
|
|
|
3110
3110
|
E && Xe();
|
|
3111
3111
|
}
|
|
3112
3112
|
}(g = { subscr: v, signal: s.signal, requery: f, querier: e, trans: null }), Promise.resolve(_).then(function(S) {
|
|
3113
|
-
n = !0, t = S, u || g.signal.aborted || (
|
|
3113
|
+
n = !0, t = S, u || g.signal.aborted || (d = {}, function(E) {
|
|
3114
3114
|
for (var O in E)
|
|
3115
3115
|
if (ie(E, O))
|
|
3116
3116
|
return;
|
|
@@ -3167,7 +3167,7 @@ var Rr = { exports: {} };
|
|
|
3167
3167
|
Z(this, e);
|
|
3168
3168
|
};
|
|
3169
3169
|
}, ignoreTransaction: function(e) {
|
|
3170
|
-
return
|
|
3170
|
+
return M.trans ? Ge(M.transless, e) : e();
|
|
3171
3171
|
}, vip: xn, async: function(e) {
|
|
3172
3172
|
return function() {
|
|
3173
3173
|
try {
|
|
@@ -3185,9 +3185,9 @@ var Rr = { exports: {} };
|
|
|
3185
3185
|
return q(i);
|
|
3186
3186
|
}
|
|
3187
3187
|
}, currentTransaction: { get: function() {
|
|
3188
|
-
return
|
|
3188
|
+
return M.trans || null;
|
|
3189
3189
|
} }, waitFor: function(e, t) {
|
|
3190
|
-
return t = T.resolve(typeof e == "function" ? We.ignoreTransaction(e) : e).timeout(t || 6e4),
|
|
3190
|
+
return t = T.resolve(typeof e == "function" ? We.ignoreTransaction(e) : e).timeout(t || 6e4), M.trans ? M.trans.waitFor(t) : t;
|
|
3191
3191
|
}, Promise: T, debug: { get: function() {
|
|
3192
3192
|
return pe;
|
|
3193
3193
|
}, set: function(e) {
|
|
@@ -3239,17 +3239,17 @@ function X(w) {
|
|
|
3239
3239
|
function nt(w) {
|
|
3240
3240
|
var o;
|
|
3241
3241
|
if (w.widget === void 0) {
|
|
3242
|
-
const
|
|
3243
|
-
|
|
3242
|
+
const h = (o = w.topics) == null ? void 0 : o.split("-");
|
|
3243
|
+
h && h.length > 1 ? (w.dashboard = h ? h[0] : "", w.widget = h ? h[1] : "") : (w.widget = w.topics, w.dashboard = w.slide);
|
|
3244
3244
|
}
|
|
3245
3245
|
return w.topics === void 0 && (w.topics = `${w.dashboard}-${w.widget}`), w;
|
|
3246
3246
|
}
|
|
3247
3247
|
function vt(w, o) {
|
|
3248
3248
|
var N;
|
|
3249
|
-
let
|
|
3249
|
+
let h, m, I, B, j;
|
|
3250
3250
|
switch (w.moderation) {
|
|
3251
3251
|
case Xt.BEFORE:
|
|
3252
|
-
|
|
3252
|
+
h = /* @__PURE__ */ new Date(), m = (N = w.beforeTime) == null ? void 0 : N.split(":"), I = Number.parseInt(m ? m[0] : "00"), B = Number.parseInt(m ? m[1] : "00"), j = Number.parseInt(m ? m[2] : "00"), o.before = h.setHours(I, B, j, 0) / 1e3, o.period || (o.period = h.getDay() === 1 ? 72 : 24);
|
|
3253
3253
|
break;
|
|
3254
3254
|
case Xt.DELAYED:
|
|
3255
3255
|
w.delay && w.delay > 0 && (o.delay = `${w.delay}`);
|
|
@@ -3264,16 +3264,16 @@ function vt(w, o) {
|
|
|
3264
3264
|
}
|
|
3265
3265
|
class Tr {
|
|
3266
3266
|
constructor(o) {
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3267
|
+
P(this, "db");
|
|
3268
|
+
P(this, "subscribers", []);
|
|
3269
|
+
P(this, "options");
|
|
3270
3270
|
/**
|
|
3271
3271
|
* Retrieve Cloud Data
|
|
3272
3272
|
* @param query IQuery
|
|
3273
3273
|
* @returns IResponse
|
|
3274
3274
|
*/
|
|
3275
|
-
|
|
3276
|
-
const
|
|
3275
|
+
P(this, "getCloud", async (o) => {
|
|
3276
|
+
const h = await this.db.table(K.CLOUD).where({ id: o.widget }).last().catch(() => (console.warn(
|
|
3277
3277
|
"%capi%C %ccloud",
|
|
3278
3278
|
x.API,
|
|
3279
3279
|
x.NONE,
|
|
@@ -3281,15 +3281,15 @@ class Tr {
|
|
|
3281
3281
|
o.slide,
|
|
3282
3282
|
o.widget
|
|
3283
3283
|
), { data: null, message: "Series Data error", success: !1 }));
|
|
3284
|
-
return
|
|
3284
|
+
return h.data.presentation = (o == null ? void 0 : o.presentation) || "not set", h.data.slide = (o == null ? void 0 : o.slide) || "not set", h.message = "Messages retrieved successfully", h.success = !0, h;
|
|
3285
3285
|
});
|
|
3286
3286
|
/**
|
|
3287
3287
|
* Retrieve Cloud Data
|
|
3288
3288
|
* @param query IQuery
|
|
3289
3289
|
* @returns IResponse
|
|
3290
3290
|
*/
|
|
3291
|
-
|
|
3292
|
-
const
|
|
3291
|
+
P(this, "getSeries", async (o) => {
|
|
3292
|
+
const h = await this.db.table(K.SERIES).where({ id: o.widget }).last().catch(() => (console.warn(
|
|
3293
3293
|
"%capi%c %cseries",
|
|
3294
3294
|
x.API,
|
|
3295
3295
|
x.NONE,
|
|
@@ -3297,26 +3297,26 @@ class Tr {
|
|
|
3297
3297
|
o.slide,
|
|
3298
3298
|
o.widget
|
|
3299
3299
|
), { data: null, message: "Series Data error", success: !1 }));
|
|
3300
|
-
return
|
|
3300
|
+
return h.data.presentation = (o == null ? void 0 : o.presentation) || "not set", h.data.slide = (o == null ? void 0 : o.slide) || "not set", h.message = "Messages retrieved successfully", h.success = !0, h;
|
|
3301
3301
|
});
|
|
3302
3302
|
/**
|
|
3303
3303
|
* Retrieve Cloud Data
|
|
3304
3304
|
* @param query IQuery
|
|
3305
3305
|
* @returns IResponse
|
|
3306
3306
|
*/
|
|
3307
|
-
|
|
3308
|
-
const
|
|
3307
|
+
P(this, "getMessages", async (o) => {
|
|
3308
|
+
const h = (B) => B.widget_id === o.widget, m = (B) => B.utc > ((o == null ? void 0 : o.since) || 0), I = (B) => (B == null ? void 0 : B.visible) !== 0;
|
|
3309
3309
|
try {
|
|
3310
|
-
const
|
|
3310
|
+
const B = await this.db.table(K.TOPICS).orderBy("utc").reverse().filter(h).filter(m).filter(I).limit((o == null ? void 0 : o.limit) ?? 25).toArray().catch(() => (console.warn(
|
|
3311
3311
|
"%capi%c %cmessages",
|
|
3312
3312
|
x.API,
|
|
3313
3313
|
x.NONE,
|
|
3314
3314
|
x.MESSAGES,
|
|
3315
3315
|
o.slide,
|
|
3316
3316
|
o.widget
|
|
3317
|
-
), { data: null, message: "Messages Data error", success: !1 })), j =
|
|
3317
|
+
), { data: null, message: "Messages Data error", success: !1 })), j = B[0] ? B[0].title : "No title", N = B.map(
|
|
3318
3318
|
(be) => be.message_id
|
|
3319
|
-
), te = (await this.db.table(
|
|
3319
|
+
), te = (await this.db.table(K.MESSAGES).where("id").anyOf(N).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
|
|
3320
3320
|
(be) => be.data
|
|
3321
3321
|
);
|
|
3322
3322
|
return {
|
|
@@ -3341,10 +3341,10 @@ class Tr {
|
|
|
3341
3341
|
* @param data
|
|
3342
3342
|
* @returns number
|
|
3343
3343
|
*/
|
|
3344
|
-
|
|
3344
|
+
P(this, "setCloud", async (o, h) => o.type === K.CLOUD && h !== "" ? await this.db.table(K.CLOUD).put({
|
|
3345
3345
|
id: o.widget,
|
|
3346
3346
|
dashboard_id: o.dashboard,
|
|
3347
|
-
data:
|
|
3347
|
+
data: h.data
|
|
3348
3348
|
}).then(() => 201).catch((m) => (console.error("%cstorage", x.STORAGE, "set", o, m), 400)) : 400);
|
|
3349
3349
|
/**
|
|
3350
3350
|
* Update Series
|
|
@@ -3352,10 +3352,10 @@ class Tr {
|
|
|
3352
3352
|
* @param data
|
|
3353
3353
|
* @returns number
|
|
3354
3354
|
*/
|
|
3355
|
-
|
|
3355
|
+
P(this, "setSeries", async (o, h) => o.type === K.SERIES && h !== "" ? await this.db.table(K.SERIES).put({
|
|
3356
3356
|
id: o.widget,
|
|
3357
3357
|
dashboard_id: o.dashboard,
|
|
3358
|
-
data:
|
|
3358
|
+
data: h.data
|
|
3359
3359
|
}).then(() => 201).catch((m) => (console.error("%cstorage", x.STORAGE, "set", o, m), 400)) : 400);
|
|
3360
3360
|
/**
|
|
3361
3361
|
* Update Messages
|
|
@@ -3366,37 +3366,37 @@ class Tr {
|
|
|
3366
3366
|
* @param data.data.messages IMessages
|
|
3367
3367
|
* @returns number
|
|
3368
3368
|
*/
|
|
3369
|
-
|
|
3370
|
-
if (o.type !==
|
|
3369
|
+
P(this, "setMessages", async (o, h) => {
|
|
3370
|
+
if (o.type !== K.MESSAGES)
|
|
3371
3371
|
return 400;
|
|
3372
|
-
const m =
|
|
3372
|
+
const m = h.title;
|
|
3373
3373
|
try {
|
|
3374
|
-
return
|
|
3375
|
-
var
|
|
3376
|
-
await this.db.table(
|
|
3374
|
+
return h.data.messages.forEach(async (I) => {
|
|
3375
|
+
var B, j, N;
|
|
3376
|
+
await this.db.table(K.MESSAGES).put({ id: I.id, utc: I.utc, data: I }), await this.db.table(K.TOPICS).put({
|
|
3377
3377
|
widget_id: o.widget,
|
|
3378
|
-
message_id:
|
|
3378
|
+
message_id: I.id,
|
|
3379
3379
|
dashboard_id: o.dashboard,
|
|
3380
3380
|
title: m,
|
|
3381
|
-
engagement: (
|
|
3382
|
-
impressions: (j =
|
|
3383
|
-
reach: (N =
|
|
3384
|
-
sentiment:
|
|
3385
|
-
utc:
|
|
3381
|
+
engagement: (B = I.dynamics) == null ? void 0 : B.engagement,
|
|
3382
|
+
impressions: (j = I.dynamics) == null ? void 0 : j.semrush_visits,
|
|
3383
|
+
reach: (N = I.dynamics) == null ? void 0 : N.potential_reach,
|
|
3384
|
+
sentiment: I.topics[0].sentiment,
|
|
3385
|
+
utc: I.utc
|
|
3386
3386
|
});
|
|
3387
3387
|
}), 201;
|
|
3388
|
-
} catch (
|
|
3389
|
-
return console.error("%cstorage", x.STORAGE, "set", o,
|
|
3388
|
+
} catch (I) {
|
|
3389
|
+
return console.error("%cstorage", x.STORAGE, "set", o, I), 400;
|
|
3390
3390
|
}
|
|
3391
3391
|
});
|
|
3392
3392
|
/**
|
|
3393
3393
|
* Wipe Message data after number of seconds
|
|
3394
3394
|
* @param retentionDuration
|
|
3395
3395
|
*/
|
|
3396
|
-
|
|
3397
|
-
const
|
|
3398
|
-
await this.db.table("topics").orderBy("utc").filter(m).modify((
|
|
3399
|
-
delete
|
|
3396
|
+
P(this, "cleanMessages", async (o) => {
|
|
3397
|
+
const h = Date.now() / 1e3, m = (I) => I.utc < o - h;
|
|
3398
|
+
await this.db.table("topics").orderBy("utc").filter(m).modify((I, B) => {
|
|
3399
|
+
delete B.value;
|
|
3400
3400
|
});
|
|
3401
3401
|
});
|
|
3402
3402
|
/**
|
|
@@ -3404,19 +3404,19 @@ class Tr {
|
|
|
3404
3404
|
* @param query IQuery
|
|
3405
3405
|
* @returns number
|
|
3406
3406
|
*/
|
|
3407
|
-
|
|
3407
|
+
P(this, "setWidget", async (o) => await this.db.table(K.WIDGETS).put({
|
|
3408
3408
|
id: o.widget,
|
|
3409
3409
|
dashboard_id: o.dashboard,
|
|
3410
3410
|
type: o.type
|
|
3411
|
-
}).then(() => 201).catch((
|
|
3411
|
+
}).then(() => 201).catch((h) => (console.error("%cstorage", x.STORAGE, K.WIDGET, o, h), 400)));
|
|
3412
3412
|
/**
|
|
3413
3413
|
* Add component subscriber
|
|
3414
3414
|
* @param query IQuery
|
|
3415
3415
|
* @returns null
|
|
3416
3416
|
*/
|
|
3417
|
-
|
|
3417
|
+
P(this, "subscribe", (o) => (o = nt(o), this.subscribers.filter(
|
|
3418
3418
|
(m) => m.widget === o.widget
|
|
3419
|
-
).length > 0 || (o.type ===
|
|
3419
|
+
).length > 0 || (o.type === K.MESSAGES && (o = vt(this.options, o)), console.debug(
|
|
3420
3420
|
"%cstorage%c %csubscribe",
|
|
3421
3421
|
x.STORAGE,
|
|
3422
3422
|
x.NONE,
|
|
@@ -3428,7 +3428,7 @@ class Tr {
|
|
|
3428
3428
|
* Get current subscribers
|
|
3429
3429
|
* @returns IQuery[]
|
|
3430
3430
|
*/
|
|
3431
|
-
|
|
3431
|
+
P(this, "getSubscribers", async () => await new Promise((o) => o(this.subscribers)));
|
|
3432
3432
|
this.options = o, this.db = new Wn(o.app), this.db.version(2).stores({
|
|
3433
3433
|
player: "id,title,name,location",
|
|
3434
3434
|
monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
|
|
@@ -3444,41 +3444,41 @@ class Tr {
|
|
|
3444
3444
|
}
|
|
3445
3445
|
}
|
|
3446
3446
|
function zn(w) {
|
|
3447
|
-
return new Promise((o,
|
|
3448
|
-
w.oncomplete = w.onsuccess = () => o(w.result), w.onabort = w.onerror = () =>
|
|
3447
|
+
return new Promise((o, h) => {
|
|
3448
|
+
w.oncomplete = w.onsuccess = () => o(w.result), w.onabort = w.onerror = () => h(w.error);
|
|
3449
3449
|
});
|
|
3450
3450
|
}
|
|
3451
3451
|
function Pi(w, o) {
|
|
3452
|
-
const
|
|
3453
|
-
|
|
3454
|
-
const m = zn(
|
|
3455
|
-
return (
|
|
3452
|
+
const h = indexedDB.open(w);
|
|
3453
|
+
h.onupgradeneeded = () => h.result.createObjectStore(o);
|
|
3454
|
+
const m = zn(h);
|
|
3455
|
+
return (I, B) => m.then((j) => B(j.transaction(o, I).objectStore(o)));
|
|
3456
3456
|
}
|
|
3457
3457
|
let Gn;
|
|
3458
3458
|
function jr() {
|
|
3459
3459
|
return Gn || (Gn = Pi("keyval-store", "keyval")), Gn;
|
|
3460
3460
|
}
|
|
3461
3461
|
function Fn(w, o = jr()) {
|
|
3462
|
-
return o("readonly", (
|
|
3462
|
+
return o("readonly", (h) => zn(h.get(w)));
|
|
3463
3463
|
}
|
|
3464
|
-
function Qt(w, o,
|
|
3465
|
-
return
|
|
3464
|
+
function Qt(w, o, h = jr()) {
|
|
3465
|
+
return h("readwrite", (m) => (m.put(o, w), zn(m.transaction)));
|
|
3466
3466
|
}
|
|
3467
3467
|
class Kr {
|
|
3468
3468
|
constructor(o) {
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
const
|
|
3473
|
-
return await Fn(
|
|
3469
|
+
P(this, "subscribers", []);
|
|
3470
|
+
P(this, "options");
|
|
3471
|
+
P(this, "getCloud", async (o) => {
|
|
3472
|
+
const h = X(o);
|
|
3473
|
+
return await Fn(h).then((m) => m).catch(() => (console.warn("%capi", x.API, K.CLOUD, o.slide, o.widget), { data: null, message: "Cloud Data error", success: !1 }));
|
|
3474
3474
|
});
|
|
3475
|
-
|
|
3476
|
-
const
|
|
3477
|
-
return await Fn(
|
|
3475
|
+
P(this, "getSeries", async (o) => {
|
|
3476
|
+
const h = X(o);
|
|
3477
|
+
return await Fn(h).then((m) => m).catch(() => (console.warn("%capi", x.API, K.SERIES, o.slide, o.widget), { data: null, message: "Series Data error", success: !1 }));
|
|
3478
3478
|
});
|
|
3479
|
-
|
|
3480
|
-
const
|
|
3481
|
-
return await Fn(
|
|
3479
|
+
P(this, "getMessages", async (o) => {
|
|
3480
|
+
const h = X(o);
|
|
3481
|
+
return await Fn(h).then((m) => m).catch(() => (console.warn("%capi", x.API, K.MESSAGES, o.slide, o.widget), { data: null, message: "Messages Data error", success: !1 }));
|
|
3482
3482
|
});
|
|
3483
3483
|
/**
|
|
3484
3484
|
* Update Cloud
|
|
@@ -3486,11 +3486,11 @@ class Kr {
|
|
|
3486
3486
|
* @param data
|
|
3487
3487
|
* @returns number
|
|
3488
3488
|
*/
|
|
3489
|
-
|
|
3490
|
-
if (!
|
|
3489
|
+
P(this, "setCloud", async (o, h) => {
|
|
3490
|
+
if (!h.success)
|
|
3491
3491
|
return 400;
|
|
3492
3492
|
const m = X(o);
|
|
3493
|
-
return delete
|
|
3493
|
+
return delete h.success, delete h.message, await Qt(m, h).then(() => 201).catch((I) => (console.error("%cstorage", x.STORAGE, K.CLOUD, o, I), 400));
|
|
3494
3494
|
});
|
|
3495
3495
|
/**
|
|
3496
3496
|
* Update Series
|
|
@@ -3498,11 +3498,11 @@ class Kr {
|
|
|
3498
3498
|
* @param data
|
|
3499
3499
|
* @returns bumber
|
|
3500
3500
|
*/
|
|
3501
|
-
|
|
3502
|
-
if (!
|
|
3501
|
+
P(this, "setSeries", async (o, h) => {
|
|
3502
|
+
if (!h.success)
|
|
3503
3503
|
return 400;
|
|
3504
3504
|
const m = X(o);
|
|
3505
|
-
return delete
|
|
3505
|
+
return delete h.success, delete h.message, await Qt(m, h).then(() => 201).catch((I) => (console.error("%cstorage", x.STORAGE, K.SERIES, o, I), 400));
|
|
3506
3506
|
});
|
|
3507
3507
|
/**
|
|
3508
3508
|
* Update Messages
|
|
@@ -3510,32 +3510,32 @@ class Kr {
|
|
|
3510
3510
|
* @param data
|
|
3511
3511
|
* @returns number
|
|
3512
3512
|
*/
|
|
3513
|
-
|
|
3514
|
-
if (!
|
|
3513
|
+
P(this, "setMessages", async (o, h) => {
|
|
3514
|
+
if (!h.success)
|
|
3515
3515
|
return 400;
|
|
3516
3516
|
const m = X(o);
|
|
3517
|
-
return delete
|
|
3517
|
+
return delete h.success, delete h.message, await Qt(m, h).then(() => 201).catch((I) => (console.error("%cstorage", x.STORAGE, K.MESSAGES, o, I), 400));
|
|
3518
3518
|
});
|
|
3519
|
-
|
|
3519
|
+
P(this, "cleanMessages", async (o) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((h) => h())));
|
|
3520
3520
|
/**
|
|
3521
3521
|
* Update Cloud
|
|
3522
3522
|
* @param query IQuery
|
|
3523
3523
|
* @returns number
|
|
3524
3524
|
*/
|
|
3525
|
-
|
|
3526
|
-
const
|
|
3525
|
+
P(this, "setWidget", async (o) => {
|
|
3526
|
+
const h = X(o), m = {
|
|
3527
3527
|
id: o.widget,
|
|
3528
3528
|
dashboard_id: o.dashboard,
|
|
3529
3529
|
type: o.type
|
|
3530
3530
|
};
|
|
3531
|
-
return await Qt(
|
|
3531
|
+
return await Qt(h, m).then(() => 201).catch((I) => (console.error("%cstorage", x.STORAGE, K.WIDGET, o, I), 400));
|
|
3532
3532
|
});
|
|
3533
3533
|
/**
|
|
3534
3534
|
* Add component subscriber
|
|
3535
3535
|
* @param query IQuery
|
|
3536
3536
|
* @returns null
|
|
3537
3537
|
*/
|
|
3538
|
-
|
|
3538
|
+
P(this, "subscribe", (o) => (o = nt(o), o.type === K.MESSAGES && (o = vt(this.options, o)), this.subscribers.filter(
|
|
3539
3539
|
(m) => m.widget === o.widget
|
|
3540
3540
|
).length > 0 || (console.debug(
|
|
3541
3541
|
"%cstorage%c %csubscribe",
|
|
@@ -3549,36 +3549,36 @@ class Kr {
|
|
|
3549
3549
|
* Get current subscribers
|
|
3550
3550
|
* @returns IQuery[]
|
|
3551
3551
|
*/
|
|
3552
|
-
|
|
3552
|
+
P(this, "getSubscribers", async () => await new Promise((o) => o(this.subscribers)));
|
|
3553
3553
|
this.options = o;
|
|
3554
3554
|
}
|
|
3555
3555
|
}
|
|
3556
3556
|
class Mr {
|
|
3557
3557
|
constructor(o) {
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
const
|
|
3558
|
+
P(this, "subscribers", []);
|
|
3559
|
+
P(this, "options");
|
|
3560
|
+
P(this, "getCloud", async (o) => {
|
|
3561
|
+
const h = X(o);
|
|
3562
3562
|
try {
|
|
3563
|
-
return localStorage.getObject(
|
|
3563
|
+
return localStorage.getObject(h);
|
|
3564
3564
|
} catch {
|
|
3565
|
-
return console.warn("%capi", x.API,
|
|
3565
|
+
return console.warn("%capi", x.API, K.CLOUD, o.slide, o.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3566
3566
|
}
|
|
3567
3567
|
});
|
|
3568
|
-
|
|
3569
|
-
const
|
|
3568
|
+
P(this, "getSeries", async (o) => {
|
|
3569
|
+
const h = X(o);
|
|
3570
3570
|
try {
|
|
3571
|
-
return localStorage.getObject(
|
|
3571
|
+
return localStorage.getObject(h);
|
|
3572
3572
|
} catch {
|
|
3573
|
-
return console.warn("%capi", x.API,
|
|
3573
|
+
return console.warn("%capi", x.API, K.SERIES, o.slide, o.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3574
3574
|
}
|
|
3575
3575
|
});
|
|
3576
|
-
|
|
3577
|
-
const
|
|
3576
|
+
P(this, "getMessages", async (o) => {
|
|
3577
|
+
const h = X(o);
|
|
3578
3578
|
try {
|
|
3579
|
-
return localStorage.getObject(
|
|
3579
|
+
return localStorage.getObject(h);
|
|
3580
3580
|
} catch {
|
|
3581
|
-
return console.warn("%capi", x.API,
|
|
3581
|
+
return console.warn("%capi", x.API, K.MESSAGES, o.slide, o.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3582
3582
|
}
|
|
3583
3583
|
});
|
|
3584
3584
|
/**
|
|
@@ -3587,12 +3587,12 @@ class Mr {
|
|
|
3587
3587
|
* @param data
|
|
3588
3588
|
* @returns number
|
|
3589
3589
|
*/
|
|
3590
|
-
|
|
3590
|
+
P(this, "setCloud", async (o, h) => {
|
|
3591
3591
|
const m = X(o);
|
|
3592
3592
|
try {
|
|
3593
|
-
return localStorage.setObject(m,
|
|
3594
|
-
} catch (
|
|
3595
|
-
return console.error("%cstorage", x.STORAGE,
|
|
3593
|
+
return localStorage.setObject(m, h), 201;
|
|
3594
|
+
} catch (I) {
|
|
3595
|
+
return console.error("%cstorage", x.STORAGE, K.CLOUD, o, I), 400;
|
|
3596
3596
|
}
|
|
3597
3597
|
});
|
|
3598
3598
|
/**
|
|
@@ -3601,12 +3601,12 @@ class Mr {
|
|
|
3601
3601
|
* @param data
|
|
3602
3602
|
* @returns number
|
|
3603
3603
|
*/
|
|
3604
|
-
|
|
3604
|
+
P(this, "setSeries", async (o, h) => {
|
|
3605
3605
|
const m = X(o);
|
|
3606
3606
|
try {
|
|
3607
|
-
return localStorage.setObject(m,
|
|
3608
|
-
} catch (
|
|
3609
|
-
return console.error("%cstorage", x.STORAGE,
|
|
3607
|
+
return localStorage.setObject(m, h), 201;
|
|
3608
|
+
} catch (I) {
|
|
3609
|
+
return console.error("%cstorage", x.STORAGE, K.SERIES, o, I), 400;
|
|
3610
3610
|
}
|
|
3611
3611
|
});
|
|
3612
3612
|
/**
|
|
@@ -3615,23 +3615,23 @@ class Mr {
|
|
|
3615
3615
|
* @param data
|
|
3616
3616
|
* @returns number
|
|
3617
3617
|
*/
|
|
3618
|
-
|
|
3618
|
+
P(this, "setMessages", async (o, h) => {
|
|
3619
3619
|
const m = X(o);
|
|
3620
3620
|
try {
|
|
3621
|
-
return localStorage.setObject(m,
|
|
3622
|
-
} catch (
|
|
3623
|
-
return console.error("%cstorage", x.STORAGE,
|
|
3621
|
+
return localStorage.setObject(m, h), 200;
|
|
3622
|
+
} catch (I) {
|
|
3623
|
+
return console.error("%cstorage", x.STORAGE, K.MESSAGES, o, I), 400;
|
|
3624
3624
|
}
|
|
3625
3625
|
});
|
|
3626
|
-
|
|
3626
|
+
P(this, "cleanMessages", async (o) => {
|
|
3627
3627
|
console.log("cleanMessages not implemented for ", this.options.storage);
|
|
3628
3628
|
});
|
|
3629
|
-
|
|
3630
|
-
const
|
|
3629
|
+
P(this, "setWidget", async (o) => {
|
|
3630
|
+
const h = `widget.${o.widget}`;
|
|
3631
3631
|
try {
|
|
3632
|
-
return localStorage.setObject(
|
|
3632
|
+
return localStorage.setObject(h, o), 201;
|
|
3633
3633
|
} catch (m) {
|
|
3634
|
-
return console.error("%cstorage", x.STORAGE,
|
|
3634
|
+
return console.error("%cstorage", x.STORAGE, K.WIDGET, o, m), 400;
|
|
3635
3635
|
}
|
|
3636
3636
|
});
|
|
3637
3637
|
/**
|
|
@@ -3639,7 +3639,7 @@ class Mr {
|
|
|
3639
3639
|
* @param query IQuery
|
|
3640
3640
|
* @returns null
|
|
3641
3641
|
*/
|
|
3642
|
-
|
|
3642
|
+
P(this, "subscribe", (o) => (o = nt(o), o.type === K.MESSAGES && (o = vt(this.options, o)), this.subscribers.filter(
|
|
3643
3643
|
(m) => m.widget === o.widget
|
|
3644
3644
|
).length || (console.debug(
|
|
3645
3645
|
"%cstorage%c %csubscribe",
|
|
@@ -3653,41 +3653,41 @@ class Mr {
|
|
|
3653
3653
|
* Get current subscribers
|
|
3654
3654
|
* @returns IQuery[]
|
|
3655
3655
|
*/
|
|
3656
|
-
|
|
3657
|
-
this.options = o, Storage.prototype.setObject = function(
|
|
3658
|
-
this.setObject(
|
|
3659
|
-
}, Storage.prototype.getObject = function(
|
|
3660
|
-
const m = this.getObject(
|
|
3656
|
+
P(this, "getSubscribers", async () => await new Promise((o) => o(this.subscribers)));
|
|
3657
|
+
this.options = o, Storage.prototype.setObject = function(h, m) {
|
|
3658
|
+
this.setObject(h, JSON.stringify(m));
|
|
3659
|
+
}, Storage.prototype.getObject = function(h) {
|
|
3660
|
+
const m = this.getObject(h);
|
|
3661
3661
|
return m && JSON.parse(m);
|
|
3662
3662
|
};
|
|
3663
3663
|
}
|
|
3664
3664
|
}
|
|
3665
3665
|
class Br {
|
|
3666
3666
|
constructor(o) {
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
const
|
|
3667
|
+
P(this, "subscribers", []);
|
|
3668
|
+
P(this, "options");
|
|
3669
|
+
P(this, "getCloud", async (o) => {
|
|
3670
|
+
const h = X(o);
|
|
3671
3671
|
try {
|
|
3672
|
-
return sessionStorage.getObject(
|
|
3672
|
+
return sessionStorage.getObject(h);
|
|
3673
3673
|
} catch {
|
|
3674
|
-
return console.warn("%capi", x.API,
|
|
3674
|
+
return console.warn("%capi", x.API, K.CLOUD, o.slide, o.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3675
3675
|
}
|
|
3676
3676
|
});
|
|
3677
|
-
|
|
3678
|
-
const
|
|
3677
|
+
P(this, "getSeries", async (o) => {
|
|
3678
|
+
const h = X(o);
|
|
3679
3679
|
try {
|
|
3680
|
-
return sessionStorage.getObject(
|
|
3680
|
+
return sessionStorage.getObject(h);
|
|
3681
3681
|
} catch {
|
|
3682
|
-
return console.warn("%capi", x.API,
|
|
3682
|
+
return console.warn("%capi", x.API, K.SERIES, o.slide, o.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3683
3683
|
}
|
|
3684
3684
|
});
|
|
3685
|
-
|
|
3686
|
-
const
|
|
3685
|
+
P(this, "getMessages", async (o) => {
|
|
3686
|
+
const h = X(o);
|
|
3687
3687
|
try {
|
|
3688
|
-
return sessionStorage.getObject(
|
|
3688
|
+
return sessionStorage.getObject(h);
|
|
3689
3689
|
} catch {
|
|
3690
|
-
return console.warn("%capi", x.API,
|
|
3690
|
+
return console.warn("%capi", x.API, K.MESSAGES, o.slide, o.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3691
3691
|
}
|
|
3692
3692
|
});
|
|
3693
3693
|
/**
|
|
@@ -3696,12 +3696,12 @@ class Br {
|
|
|
3696
3696
|
* @param data
|
|
3697
3697
|
* @returns number
|
|
3698
3698
|
*/
|
|
3699
|
-
|
|
3699
|
+
P(this, "setCloud", async (o, h) => {
|
|
3700
3700
|
const m = X(o);
|
|
3701
3701
|
try {
|
|
3702
|
-
return sessionStorage.setObject(m,
|
|
3703
|
-
} catch (
|
|
3704
|
-
return console.error("%cstorage", x.STORAGE,
|
|
3702
|
+
return sessionStorage.setObject(m, h), 201;
|
|
3703
|
+
} catch (I) {
|
|
3704
|
+
return console.error("%cstorage", x.STORAGE, K.CLOUD, o, I), 400;
|
|
3705
3705
|
}
|
|
3706
3706
|
});
|
|
3707
3707
|
/**
|
|
@@ -3710,12 +3710,12 @@ class Br {
|
|
|
3710
3710
|
* @param data
|
|
3711
3711
|
* @returns number
|
|
3712
3712
|
*/
|
|
3713
|
-
|
|
3713
|
+
P(this, "setSeries", async (o, h) => {
|
|
3714
3714
|
const m = X(o);
|
|
3715
3715
|
try {
|
|
3716
|
-
return sessionStorage.setObject(m,
|
|
3717
|
-
} catch (
|
|
3718
|
-
return console.error("%cstorage", x.STORAGE,
|
|
3716
|
+
return sessionStorage.setObject(m, h), 201;
|
|
3717
|
+
} catch (I) {
|
|
3718
|
+
return console.error("%cstorage", x.STORAGE, K.SERIES, o, I), 400;
|
|
3719
3719
|
}
|
|
3720
3720
|
});
|
|
3721
3721
|
/**
|
|
@@ -3724,23 +3724,23 @@ class Br {
|
|
|
3724
3724
|
* @param data
|
|
3725
3725
|
* @returns number
|
|
3726
3726
|
*/
|
|
3727
|
-
|
|
3727
|
+
P(this, "setMessages", async (o, h) => {
|
|
3728
3728
|
const m = X(o);
|
|
3729
3729
|
try {
|
|
3730
|
-
return sessionStorage.setObject(m,
|
|
3731
|
-
} catch (
|
|
3732
|
-
return console.error("%cstorage", x.STORAGE,
|
|
3730
|
+
return sessionStorage.setObject(m, h), 200;
|
|
3731
|
+
} catch (I) {
|
|
3732
|
+
return console.error("%cstorage", x.STORAGE, K.MESSAGES, o, I), 400;
|
|
3733
3733
|
}
|
|
3734
3734
|
});
|
|
3735
|
-
|
|
3735
|
+
P(this, "cleanMessages", async (o) => {
|
|
3736
3736
|
console.log("cleanMessages not implemented for ", this.options.storage);
|
|
3737
3737
|
});
|
|
3738
|
-
|
|
3739
|
-
const
|
|
3738
|
+
P(this, "setWidget", async (o) => {
|
|
3739
|
+
const h = `widget.${o.widget}`;
|
|
3740
3740
|
try {
|
|
3741
|
-
return sessionStorage.setObject(
|
|
3741
|
+
return sessionStorage.setObject(h, o), 201;
|
|
3742
3742
|
} catch (m) {
|
|
3743
|
-
return console.error("%cstorage", x.STORAGE,
|
|
3743
|
+
return console.error("%cstorage", x.STORAGE, K.WIDGET, o, m), 400;
|
|
3744
3744
|
}
|
|
3745
3745
|
});
|
|
3746
3746
|
/**
|
|
@@ -3748,7 +3748,7 @@ class Br {
|
|
|
3748
3748
|
* @param query IQuery
|
|
3749
3749
|
* @returns null
|
|
3750
3750
|
*/
|
|
3751
|
-
|
|
3751
|
+
P(this, "subscribe", (o) => (o = nt(o), o.type === K.MESSAGES && (o = vt(this.options, o)), this.subscribers.filter(
|
|
3752
3752
|
(m) => m.widget === o.widget
|
|
3753
3753
|
).length || (console.debug(
|
|
3754
3754
|
"%cstorage%c %csubscribe",
|
|
@@ -3762,41 +3762,41 @@ class Br {
|
|
|
3762
3762
|
* Get current subscribers
|
|
3763
3763
|
* @returns IQuery[]
|
|
3764
3764
|
*/
|
|
3765
|
-
|
|
3766
|
-
this.options = o, Storage.prototype.setObject = function(
|
|
3767
|
-
this.setItem(
|
|
3768
|
-
}, Storage.prototype.getObject = function(
|
|
3769
|
-
const m = this.getItem(
|
|
3765
|
+
P(this, "getSubscribers", async () => await new Promise((o) => o(this.subscribers)));
|
|
3766
|
+
this.options = o, Storage.prototype.setObject = function(h, m) {
|
|
3767
|
+
this.setItem(h, JSON.stringify(m));
|
|
3768
|
+
}, Storage.prototype.getObject = function(h) {
|
|
3769
|
+
const m = this.getItem(h);
|
|
3770
3770
|
return m && JSON.parse(m);
|
|
3771
3771
|
};
|
|
3772
3772
|
}
|
|
3773
3773
|
}
|
|
3774
3774
|
class Nr {
|
|
3775
3775
|
constructor(o) {
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
const
|
|
3776
|
+
P(this, "subscribers", []);
|
|
3777
|
+
P(this, "options");
|
|
3778
|
+
P(this, "getCloud", async (o) => {
|
|
3779
|
+
const h = X(o);
|
|
3780
3780
|
try {
|
|
3781
|
-
return window.BuzzCasting.WidgetData[
|
|
3781
|
+
return window.BuzzCasting.WidgetData[h];
|
|
3782
3782
|
} catch {
|
|
3783
|
-
return console.warn("%capi", x.API,
|
|
3783
|
+
return console.warn("%capi", x.API, K.CLOUD, o.slide, o.widget), { data: null, message: "Cloud Data error", success: !1 };
|
|
3784
3784
|
}
|
|
3785
3785
|
});
|
|
3786
|
-
|
|
3787
|
-
const
|
|
3786
|
+
P(this, "getSeries", async (o) => {
|
|
3787
|
+
const h = X(o);
|
|
3788
3788
|
try {
|
|
3789
|
-
return window.BuzzCasting.WidgetData[
|
|
3789
|
+
return window.BuzzCasting.WidgetData[h];
|
|
3790
3790
|
} catch {
|
|
3791
|
-
return console.warn("%capi", x.API,
|
|
3791
|
+
return console.warn("%capi", x.API, K.SERIES, o.slide, o.widget), { data: null, message: "Series Data error", success: !1 };
|
|
3792
3792
|
}
|
|
3793
3793
|
});
|
|
3794
|
-
|
|
3795
|
-
const
|
|
3794
|
+
P(this, "getMessages", async (o) => {
|
|
3795
|
+
const h = X(o);
|
|
3796
3796
|
try {
|
|
3797
|
-
return window.BuzzCasting.WidgetData[
|
|
3797
|
+
return window.BuzzCasting.WidgetData[h];
|
|
3798
3798
|
} catch {
|
|
3799
|
-
return console.warn("%capi", x.API,
|
|
3799
|
+
return console.warn("%capi", x.API, K.MESSAGES, o.slide, o.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3800
3800
|
}
|
|
3801
3801
|
});
|
|
3802
3802
|
/**
|
|
@@ -3805,12 +3805,12 @@ class Nr {
|
|
|
3805
3805
|
* @param data
|
|
3806
3806
|
* @returns number
|
|
3807
3807
|
*/
|
|
3808
|
-
|
|
3808
|
+
P(this, "setCloud", async (o, h) => {
|
|
3809
3809
|
const m = X(o);
|
|
3810
3810
|
try {
|
|
3811
|
-
return window.BuzzCasting.WidgetData[m] =
|
|
3812
|
-
} catch (
|
|
3813
|
-
return console.error("%cstorage", x.STORAGE, "set", o,
|
|
3811
|
+
return window.BuzzCasting.WidgetData[m] = h, 201;
|
|
3812
|
+
} catch (I) {
|
|
3813
|
+
return console.error("%cstorage", x.STORAGE, "set", o, I), 400;
|
|
3814
3814
|
}
|
|
3815
3815
|
});
|
|
3816
3816
|
/**
|
|
@@ -3819,12 +3819,12 @@ class Nr {
|
|
|
3819
3819
|
* @param data
|
|
3820
3820
|
* @returns number
|
|
3821
3821
|
*/
|
|
3822
|
-
|
|
3822
|
+
P(this, "setSeries", async (o, h) => {
|
|
3823
3823
|
const m = X(o);
|
|
3824
3824
|
try {
|
|
3825
|
-
return window.BuzzCasting.WidgetData[m] =
|
|
3826
|
-
} catch (
|
|
3827
|
-
return console.error("%cstorage", x.STORAGE, "set", o,
|
|
3825
|
+
return window.BuzzCasting.WidgetData[m] = h, 201;
|
|
3826
|
+
} catch (I) {
|
|
3827
|
+
return console.error("%cstorage", x.STORAGE, "set", o, I), 400;
|
|
3828
3828
|
}
|
|
3829
3829
|
});
|
|
3830
3830
|
/**
|
|
@@ -3833,23 +3833,23 @@ class Nr {
|
|
|
3833
3833
|
* @param data
|
|
3834
3834
|
* @returns number
|
|
3835
3835
|
*/
|
|
3836
|
-
|
|
3836
|
+
P(this, "setMessages", async (o, h) => {
|
|
3837
3837
|
const m = X(o);
|
|
3838
3838
|
try {
|
|
3839
|
-
return window.BuzzCasting.WidgetData[m] =
|
|
3840
|
-
} catch (
|
|
3841
|
-
return console.error("%cstorage", x.STORAGE, "set", o,
|
|
3839
|
+
return window.BuzzCasting.WidgetData[m] = h, 201;
|
|
3840
|
+
} catch (I) {
|
|
3841
|
+
return console.error("%cstorage", x.STORAGE, "set", o, I), 400;
|
|
3842
3842
|
}
|
|
3843
3843
|
});
|
|
3844
|
-
|
|
3844
|
+
P(this, "cleanMessages", async (o) => {
|
|
3845
3845
|
console.log("cleanMessages not implemented for ", this.options.storage);
|
|
3846
3846
|
});
|
|
3847
|
-
|
|
3848
|
-
const
|
|
3847
|
+
P(this, "setWidget", async (o) => {
|
|
3848
|
+
const h = `widget.${o.widget}`;
|
|
3849
3849
|
try {
|
|
3850
|
-
return window.BuzzCasting.WidgetData[
|
|
3850
|
+
return window.BuzzCasting.WidgetData[h] = o, 201;
|
|
3851
3851
|
} catch (m) {
|
|
3852
|
-
return console.error("%cstorage", x.STORAGE,
|
|
3852
|
+
return console.error("%cstorage", x.STORAGE, K.WIDGET, o, m), 400;
|
|
3853
3853
|
}
|
|
3854
3854
|
});
|
|
3855
3855
|
/**
|
|
@@ -3857,7 +3857,7 @@ class Nr {
|
|
|
3857
3857
|
* @param query IQuery
|
|
3858
3858
|
* @returns null
|
|
3859
3859
|
*/
|
|
3860
|
-
|
|
3860
|
+
P(this, "subscribe", (o) => (o = nt(o), o.type === K.MESSAGES && (o = vt(this.options, o)), this.subscribers.filter(
|
|
3861
3861
|
(m) => m.widget === o.widget
|
|
3862
3862
|
).length || (console.debug(
|
|
3863
3863
|
"%cstorage%c %csubscribe",
|
|
@@ -3871,7 +3871,7 @@ class Nr {
|
|
|
3871
3871
|
* Get current subscribers
|
|
3872
3872
|
* @returns IQuery[]
|
|
3873
3873
|
*/
|
|
3874
|
-
|
|
3874
|
+
P(this, "getSubscribers", async () => await new Promise((o) => o(this.subscribers)));
|
|
3875
3875
|
this.options = o, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
|
|
3876
3876
|
}
|
|
3877
3877
|
}
|
|
@@ -3881,39 +3881,39 @@ function Ii(w, o) {
|
|
|
3881
3881
|
return w;
|
|
3882
3882
|
}
|
|
3883
3883
|
function Oe(w, o) {
|
|
3884
|
-
let
|
|
3884
|
+
let h, m, I;
|
|
3885
3885
|
if (o.length === 0)
|
|
3886
3886
|
return w;
|
|
3887
|
-
for (
|
|
3888
|
-
m = o.charCodeAt(
|
|
3887
|
+
for (h = 0, I = o.length; h < I; h++)
|
|
3888
|
+
m = o.charCodeAt(h), w = (w << 5) - w + m, w |= 0;
|
|
3889
3889
|
return w < 0 ? w * -2 : w;
|
|
3890
3890
|
}
|
|
3891
|
-
function Ci(w, o,
|
|
3891
|
+
function Ci(w, o, h) {
|
|
3892
3892
|
return Object.keys(o).sort().reduce(m, w);
|
|
3893
|
-
function m(
|
|
3894
|
-
return Gr(
|
|
3893
|
+
function m(I, B) {
|
|
3894
|
+
return Gr(I, o[B], B, h);
|
|
3895
3895
|
}
|
|
3896
3896
|
}
|
|
3897
|
-
function Gr(w, o,
|
|
3898
|
-
const
|
|
3897
|
+
function Gr(w, o, h, m) {
|
|
3898
|
+
const I = Oe(Oe(Oe(w, h), Ri(o)), typeof o);
|
|
3899
3899
|
if (o === null)
|
|
3900
|
-
return Oe(
|
|
3900
|
+
return Oe(I, "null");
|
|
3901
3901
|
if (o === void 0)
|
|
3902
|
-
return Oe(
|
|
3902
|
+
return Oe(I, "undefined");
|
|
3903
3903
|
if (typeof o == "object" || typeof o == "function") {
|
|
3904
3904
|
if (m.includes(o))
|
|
3905
|
-
return Oe(
|
|
3905
|
+
return Oe(I, `[Circular]${h}`);
|
|
3906
3906
|
m.push(o);
|
|
3907
|
-
const
|
|
3907
|
+
const B = Ci(I, o, m);
|
|
3908
3908
|
if (!("valueOf" in o) || typeof o.valueOf != "function")
|
|
3909
|
-
return
|
|
3909
|
+
return B;
|
|
3910
3910
|
try {
|
|
3911
|
-
return Oe(
|
|
3911
|
+
return Oe(B, String(o.valueOf()));
|
|
3912
3912
|
} catch (j) {
|
|
3913
|
-
return Oe(
|
|
3913
|
+
return Oe(B, `[valueOf exception]${j.stack || j.message}`);
|
|
3914
3914
|
}
|
|
3915
3915
|
}
|
|
3916
|
-
return Oe(
|
|
3916
|
+
return Oe(I, o.toString());
|
|
3917
3917
|
}
|
|
3918
3918
|
function Ri(w) {
|
|
3919
3919
|
return Object.prototype.toString.call(w);
|
|
@@ -3923,24 +3923,24 @@ function Ln(w) {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
class Mi {
|
|
3925
3925
|
constructor(o) {
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3926
|
+
P(this, "sm");
|
|
3927
|
+
P(this, "api");
|
|
3928
|
+
P(this, "bc");
|
|
3929
|
+
P(this, "options");
|
|
3930
|
+
P(this, "update", async (o) => {
|
|
3931
3931
|
if (this.sm === null)
|
|
3932
3932
|
return;
|
|
3933
|
-
const
|
|
3934
|
-
if (
|
|
3933
|
+
const h = await this.sm.getSubscribers();
|
|
3934
|
+
if (h.length === 0)
|
|
3935
3935
|
return;
|
|
3936
3936
|
const m = [];
|
|
3937
|
-
o ? m.push(this.api.get(o)) :
|
|
3938
|
-
m.push(this.api.get(
|
|
3937
|
+
o ? m.push(this.api.get(o)) : h == null || h.forEach((I) => {
|
|
3938
|
+
m.push(this.api.get(I));
|
|
3939
3939
|
}), await Promise.allSettled(m).then(
|
|
3940
|
-
(
|
|
3940
|
+
(I) => I.forEach(async (B) => {
|
|
3941
3941
|
let j = 400;
|
|
3942
|
-
if (
|
|
3943
|
-
const N =
|
|
3942
|
+
if (B.status === "fulfilled") {
|
|
3943
|
+
const N = B.value;
|
|
3944
3944
|
if (this.sm === null)
|
|
3945
3945
|
return 400;
|
|
3946
3946
|
if (N.success === !0) {
|
|
@@ -3949,37 +3949,37 @@ class Mi {
|
|
|
3949
3949
|
)[0];
|
|
3950
3950
|
let te = "";
|
|
3951
3951
|
switch (N.query.type) {
|
|
3952
|
-
case
|
|
3952
|
+
case K.MESSAGES:
|
|
3953
3953
|
if (te = Ln(N.data.messages), Z.hash === te)
|
|
3954
3954
|
return console.debug(
|
|
3955
3955
|
"%capi%c %cno updates",
|
|
3956
3956
|
x.API,
|
|
3957
3957
|
x.NONE,
|
|
3958
3958
|
x.NO_UPDATES,
|
|
3959
|
-
|
|
3959
|
+
K.MESSAGES,
|
|
3960
3960
|
N.query.slide,
|
|
3961
3961
|
N.query.widget
|
|
3962
3962
|
), 204;
|
|
3963
3963
|
Z.hash = te, j = await this.sm.setMessages(N.query, N);
|
|
3964
3964
|
break;
|
|
3965
|
-
case
|
|
3965
|
+
case K.CLOUD:
|
|
3966
3966
|
te = Ln(N.data), Z.hash === te ? (console.debug(
|
|
3967
3967
|
"%capi%c %cno updates",
|
|
3968
3968
|
x.API,
|
|
3969
3969
|
x.NONE,
|
|
3970
3970
|
x.NO_UPDATES,
|
|
3971
|
-
|
|
3971
|
+
K.CLOUD,
|
|
3972
3972
|
N.query.slide,
|
|
3973
3973
|
N.query.widget
|
|
3974
3974
|
), j = 204) : (Z.hash = te, j = await this.sm.setCloud(N.query, N));
|
|
3975
3975
|
break;
|
|
3976
|
-
case
|
|
3976
|
+
case K.SERIES:
|
|
3977
3977
|
te = Ln(N.data), Z.hash === te ? (console.debug(
|
|
3978
3978
|
"%capi%c %cno updates",
|
|
3979
3979
|
x.API,
|
|
3980
3980
|
x.NONE,
|
|
3981
3981
|
x.NO_UPDATES,
|
|
3982
|
-
|
|
3982
|
+
K.SERIES,
|
|
3983
3983
|
N.query.slide,
|
|
3984
3984
|
N.query.widget
|
|
3985
3985
|
), j = 204) : (Z.hash = te, j = await this.sm.setSeries(N.query, N));
|
|
@@ -4030,14 +4030,14 @@ class Mi {
|
|
|
4030
4030
|
})
|
|
4031
4031
|
);
|
|
4032
4032
|
});
|
|
4033
|
-
|
|
4033
|
+
P(this, "hide", (o) => {
|
|
4034
4034
|
this.api.hideMessage(o);
|
|
4035
4035
|
});
|
|
4036
|
-
|
|
4037
|
-
var
|
|
4036
|
+
P(this, "actions", async (o) => {
|
|
4037
|
+
var h;
|
|
4038
4038
|
switch (o.data.event) {
|
|
4039
4039
|
case ue.SUBSCRIBE:
|
|
4040
|
-
(
|
|
4040
|
+
(h = this.sm) == null || h.subscribe(o.data.data);
|
|
4041
4041
|
break;
|
|
4042
4042
|
case ue.UPDATE:
|
|
4043
4043
|
console.debug(
|
|
@@ -4051,15 +4051,15 @@ class Mi {
|
|
|
4051
4051
|
break;
|
|
4052
4052
|
}
|
|
4053
4053
|
});
|
|
4054
|
-
|
|
4055
|
-
var
|
|
4056
|
-
const o = ((
|
|
4054
|
+
P(this, "cleanMessages", async () => {
|
|
4055
|
+
var h, m;
|
|
4056
|
+
const o = ((h = this.options) == null ? void 0 : h.retention) || 345600;
|
|
4057
4057
|
return await ((m = this.sm) == null ? void 0 : m.cleanMessages(o));
|
|
4058
4058
|
});
|
|
4059
4059
|
// TODO: add checksum to avoid broadcasting update
|
|
4060
4060
|
// private setHash(widget: string) {
|
|
4061
4061
|
// }
|
|
4062
|
-
|
|
4062
|
+
P(this, "getSubscribers", async () => {
|
|
4063
4063
|
var o;
|
|
4064
4064
|
return await ((o = this.sm) == null ? void 0 : o.getSubscribers());
|
|
4065
4065
|
});
|
|
@@ -4072,14 +4072,14 @@ class Mi {
|
|
|
4072
4072
|
ue.VERSION,
|
|
4073
4073
|
xi
|
|
4074
4074
|
), this.options = o, this.sm = null;
|
|
4075
|
-
const
|
|
4076
|
-
switch (this.bc = new BroadcastChannel(
|
|
4075
|
+
const h = (o == null ? void 0 : o.slide) || o.app;
|
|
4076
|
+
switch (this.bc = new BroadcastChannel(h), console.info(
|
|
4077
4077
|
"%capi%c %cbroadcast",
|
|
4078
4078
|
x.API,
|
|
4079
4079
|
x.NONE,
|
|
4080
4080
|
x.BROADCAST,
|
|
4081
4081
|
ue.CHANNEL,
|
|
4082
|
-
|
|
4082
|
+
h
|
|
4083
4083
|
), this.bc.onmessage = (m) => {
|
|
4084
4084
|
this.actions(m);
|
|
4085
4085
|
}, this.bc.postMessage({ event: ue.STORAGE_INIT, data: {} }), this.api = new ki(o), o.storage) {
|
|
@@ -4103,15 +4103,15 @@ class Mi {
|
|
|
4103
4103
|
}
|
|
4104
4104
|
class Ti {
|
|
4105
4105
|
constructor(o) {
|
|
4106
|
-
|
|
4106
|
+
P(this, "sm");
|
|
4107
4107
|
/**
|
|
4108
4108
|
* Retieve Cloud Data
|
|
4109
4109
|
* @param query Widgets parameters, type "cloud"
|
|
4110
4110
|
* @returns IResponse
|
|
4111
4111
|
*/
|
|
4112
|
-
|
|
4113
|
-
var
|
|
4114
|
-
return o.type !==
|
|
4112
|
+
P(this, "getCloud", async (o) => {
|
|
4113
|
+
var h;
|
|
4114
|
+
return o.type !== K.CLOUD ? (console.warn(
|
|
4115
4115
|
"%capp%c %get",
|
|
4116
4116
|
x.APP,
|
|
4117
4117
|
x.NONE,
|
|
@@ -4123,16 +4123,16 @@ class Ti {
|
|
|
4123
4123
|
data: null,
|
|
4124
4124
|
message: `'wrong method call for getMessages, type used is ${o.type}`,
|
|
4125
4125
|
success: !1
|
|
4126
|
-
}) : await ((
|
|
4126
|
+
}) : await ((h = this.sm) == null ? void 0 : h.getCloud(o));
|
|
4127
4127
|
});
|
|
4128
4128
|
/**
|
|
4129
4129
|
* Retieve Message Data
|
|
4130
4130
|
* @param query Widgets parameters, type "messages"
|
|
4131
4131
|
* @returns IResponse
|
|
4132
4132
|
*/
|
|
4133
|
-
|
|
4134
|
-
var
|
|
4135
|
-
return o.type !==
|
|
4133
|
+
P(this, "getMessages", async (o) => {
|
|
4134
|
+
var h;
|
|
4135
|
+
return o.type !== K.MESSAGES ? (console.warn(
|
|
4136
4136
|
"%capp%c %get",
|
|
4137
4137
|
x.APP,
|
|
4138
4138
|
x.NONE,
|
|
@@ -4144,16 +4144,16 @@ class Ti {
|
|
|
4144
4144
|
data: null,
|
|
4145
4145
|
message: `'wrong method call for getMessages, type used is ${o.type}`,
|
|
4146
4146
|
success: !1
|
|
4147
|
-
}) : await ((
|
|
4147
|
+
}) : await ((h = this.sm) == null ? void 0 : h.getMessages(o));
|
|
4148
4148
|
});
|
|
4149
4149
|
/**
|
|
4150
4150
|
* Retrieve Series Data
|
|
4151
4151
|
* @param query Widgets parameters, type "series"
|
|
4152
4152
|
* @returns IResponse
|
|
4153
4153
|
*/
|
|
4154
|
-
|
|
4155
|
-
var
|
|
4156
|
-
return o.type !==
|
|
4154
|
+
P(this, "getSeries", async (o) => {
|
|
4155
|
+
var h;
|
|
4156
|
+
return o.type !== K.SERIES ? (console.warn(
|
|
4157
4157
|
"%capp%c %get",
|
|
4158
4158
|
x.APP,
|
|
4159
4159
|
x.NONE,
|
|
@@ -4165,7 +4165,7 @@ class Ti {
|
|
|
4165
4165
|
data: null,
|
|
4166
4166
|
message: `'wrong method call for getSeries, type used is ${o.type}`,
|
|
4167
4167
|
success: !1
|
|
4168
|
-
}) : await ((
|
|
4168
|
+
}) : await ((h = this.sm) == null ? void 0 : h.getSeries(o));
|
|
4169
4169
|
});
|
|
4170
4170
|
switch (this.sm = null, o.storage) {
|
|
4171
4171
|
case he.DEXIE:
|
|
@@ -4186,7 +4186,7 @@ class Ti {
|
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
4188
|
}
|
|
4189
|
-
var
|
|
4189
|
+
var K = /* @__PURE__ */ ((w) => (w.MESSAGES = "messages", w.CLOUD = "cloud", w.SERIES = "series", w.TOPICS = "topics", w.WIDGET = "widget", w.WIDGETS = "widgets", w))(K || {}), x = /* @__PURE__ */ ((w) => (w.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", w.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", w.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", w.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", w.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", w.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", w.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", w.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", w.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", w.NONE = "color:transparent;background-color:transparent;", w.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", w.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", w.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", w.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", w.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", w.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", w.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", w))(x || {}), ue = /* @__PURE__ */ ((w) => (w.ADD_SLIDE = "addSlide", w.APP_READY = "appReady", w.API_UPDATE = "apiUpdate", w.CHANNEL = "channel", w.ERROR = "error", w.GOTO_SLIDE = "gotoSlide", w.HIDE_MESSAGE = "hideMessage", w.NEXT_SLIDE = "nextSlide", w.PAUSE_PRESENTATION = "pausePresentation", w.PRESENTATION_READY = "presentationReady", w.PREV_SLIDE = "prevSlide", w.RELOAD_PRESENTATION = "reloadPresentation", w.SHOW_MODAL = "showModal", w.SLIDE_DID_LOAD = "slideDidLoad", w.SLIDE_GOTO = "slideGoto", w.SLIDE_READY = "slideReady", w.SLIDE_TRANSITIONER = "slideTransitioner", w.START_TRANSITIONER = "startTransitioner", w.STORAGE_INIT = "stroageInit", w.SUBSCRIBE = "subscribe", w.UPDATE = "update", w.VERSION = "version", w.WIDGET_UPDATE = "widgetUpdate", w))(ue || {}), Xt = /* @__PURE__ */ ((w) => (w.APPROVED = "approved", w.BEFORE = "before", w.DELAYED = "delayed", w.NONE = "none", w.REALTIME = "realtime", w))(Xt || {}), he = /* @__PURE__ */ ((w) => (w.KEYVAL = "keyval", w.LOCAL = "local", w.SESSION = "session", w.DEXIE = "dexie", w.WINDOW = "window", w))(he || {});
|
|
4190
4190
|
class Bi {
|
|
4191
4191
|
/**
|
|
4192
4192
|
* Main container for managing widgets and data updates
|
|
@@ -4195,24 +4195,24 @@ class Bi {
|
|
|
4195
4195
|
* @param callbacks functions in the widget that will receive the update
|
|
4196
4196
|
* @param selector container for the element - by default buzzcasting-slide (optional)
|
|
4197
4197
|
*/
|
|
4198
|
-
constructor(o,
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4198
|
+
constructor(o, h, m) {
|
|
4199
|
+
P(this, "storageReader");
|
|
4200
|
+
P(this, "broadcastChannel");
|
|
4201
|
+
P(this, "query");
|
|
4202
|
+
P(this, "attributes");
|
|
4203
|
+
P(this, "listeners");
|
|
4204
4204
|
/**
|
|
4205
4205
|
* Generic call to any query type
|
|
4206
4206
|
*
|
|
4207
4207
|
* @returns IResponse
|
|
4208
4208
|
*/
|
|
4209
|
-
|
|
4209
|
+
P(this, "getData", async () => {
|
|
4210
4210
|
switch (this.query.type) {
|
|
4211
|
-
case
|
|
4211
|
+
case K.CLOUD:
|
|
4212
4212
|
return await this.getCloud();
|
|
4213
|
-
case
|
|
4213
|
+
case K.MESSAGES:
|
|
4214
4214
|
return await this.getMessages();
|
|
4215
|
-
case
|
|
4215
|
+
case K.SERIES:
|
|
4216
4216
|
return await this.getSeries();
|
|
4217
4217
|
}
|
|
4218
4218
|
return {
|
|
@@ -4226,7 +4226,7 @@ class Bi {
|
|
|
4226
4226
|
*
|
|
4227
4227
|
* @returns IResponse
|
|
4228
4228
|
*/
|
|
4229
|
-
|
|
4229
|
+
P(this, "getCloud", async () => this.query.type !== K.CLOUD ? (console.warn(
|
|
4230
4230
|
"%cstorage%c %cwidget",
|
|
4231
4231
|
x.STORAGE,
|
|
4232
4232
|
x.NONE,
|
|
@@ -4244,7 +4244,7 @@ class Bi {
|
|
|
4244
4244
|
*
|
|
4245
4245
|
* @returns IResponse
|
|
4246
4246
|
*/
|
|
4247
|
-
|
|
4247
|
+
P(this, "getMessages", async () => this.query.type !== K.MESSAGES ? (console.warn(
|
|
4248
4248
|
"%cstorage%c %cwidget",
|
|
4249
4249
|
x.STORAGE,
|
|
4250
4250
|
x.NONE,
|
|
@@ -4262,7 +4262,7 @@ class Bi {
|
|
|
4262
4262
|
*
|
|
4263
4263
|
* @returns IResponse
|
|
4264
4264
|
*/
|
|
4265
|
-
|
|
4265
|
+
P(this, "getSeries", async () => this.query.type !== K.SERIES ? (console.warn(
|
|
4266
4266
|
"%cstorage%c %cwidget",
|
|
4267
4267
|
x.STORAGE,
|
|
4268
4268
|
x.NONE,
|
|
@@ -4281,25 +4281,34 @@ class Bi {
|
|
|
4281
4281
|
*
|
|
4282
4282
|
* @param modal IModal
|
|
4283
4283
|
*/
|
|
4284
|
-
|
|
4285
|
-
const
|
|
4284
|
+
P(this, "showModal", (o) => {
|
|
4285
|
+
const h = { ...o.dataset, ...this.query }, m = { ...o.attributes, ...this.attributes };
|
|
4286
|
+
console.debug(
|
|
4287
|
+
"%cwidget",
|
|
4288
|
+
x.WIDGET,
|
|
4289
|
+
ue.SHOW_MODAL,
|
|
4290
|
+
o.showComponent,
|
|
4291
|
+
m,
|
|
4292
|
+
h
|
|
4293
|
+
);
|
|
4294
|
+
const I = new CustomEvent(ue.SHOW_MODAL, {
|
|
4286
4295
|
detail: {
|
|
4287
4296
|
component: o.showComponent,
|
|
4288
|
-
attributes:
|
|
4289
|
-
dataset:
|
|
4297
|
+
attributes: m,
|
|
4298
|
+
dataset: h
|
|
4290
4299
|
},
|
|
4291
4300
|
bubbles: !0,
|
|
4292
4301
|
cancelable: !0,
|
|
4293
4302
|
composed: !0
|
|
4294
4303
|
});
|
|
4295
|
-
window.dispatchEvent(
|
|
4304
|
+
window.dispatchEvent(I);
|
|
4296
4305
|
});
|
|
4297
4306
|
var j;
|
|
4298
|
-
m = typeof m < "u" ? m : "buzzcasting-slide", this.listeners =
|
|
4299
|
-
let
|
|
4300
|
-
|
|
4301
|
-
const
|
|
4302
|
-
this.storageReader = new Ti(
|
|
4307
|
+
m = typeof m < "u" ? m : "buzzcasting-slide", this.listeners = h;
|
|
4308
|
+
let I;
|
|
4309
|
+
I = { ...o.dataset }, delete I.hmr, I.slide = ((j = o.closest(m.toUpperCase())) == null ? void 0 : j.id) ?? `${m} not found`, I = nt(I), this.query = I, this.attributes = ji(o.attributes);
|
|
4310
|
+
const B = window.BuzzCasting.getOptions();
|
|
4311
|
+
this.storageReader = new Ti(B), this.broadcastChannel = new BroadcastChannel(I.slide), this.startListener();
|
|
4303
4312
|
}
|
|
4304
4313
|
addListener(o) {
|
|
4305
4314
|
this.listeners.push(o);
|
|
@@ -4309,12 +4318,12 @@ class Bi {
|
|
|
4309
4318
|
*/
|
|
4310
4319
|
startListener() {
|
|
4311
4320
|
const o = this.query;
|
|
4312
|
-
this.broadcastChannel.onmessage = async (
|
|
4313
|
-
const m =
|
|
4314
|
-
switch (
|
|
4321
|
+
this.broadcastChannel.onmessage = async (h) => {
|
|
4322
|
+
const m = h.data.data;
|
|
4323
|
+
switch (h.data.event) {
|
|
4315
4324
|
case ue.WIDGET_UPDATE:
|
|
4316
|
-
m.query.slide === o.slide && m.query.widget === o.widget && this.listeners.forEach((
|
|
4317
|
-
|
|
4325
|
+
m.query.slide === o.slide && m.query.widget === o.widget && this.listeners.forEach((I) => {
|
|
4326
|
+
I(h.data.data);
|
|
4318
4327
|
});
|
|
4319
4328
|
break;
|
|
4320
4329
|
case ue.SLIDE_READY:
|
|
@@ -4346,26 +4355,14 @@ class Bi {
|
|
|
4346
4355
|
}
|
|
4347
4356
|
function ji(w) {
|
|
4348
4357
|
const o = {};
|
|
4349
|
-
for (let
|
|
4350
|
-
const m = w[
|
|
4358
|
+
for (let h = 0; h < w.length; h++) {
|
|
4359
|
+
const m = w[h];
|
|
4351
4360
|
m.name !== "class" && !m.name.includes("data") && (o[m.name] = m.value);
|
|
4352
4361
|
}
|
|
4353
4362
|
return o;
|
|
4354
4363
|
}
|
|
4355
|
-
function Ni(w, o) {
|
|
4356
|
-
var j;
|
|
4357
|
-
w.stopPropagation();
|
|
4358
|
-
let d = w.target;
|
|
4359
|
-
if (d == null)
|
|
4360
|
-
return;
|
|
4361
|
-
o = typeof o < "u" ? o : "animate-children";
|
|
4362
|
-
let m = !1, A, K = "";
|
|
4363
|
-
for (; !m; )
|
|
4364
|
-
A = d == null ? void 0 : d.parentElement, A != null && A.tagName.includes("-") && (j = A == null ? void 0 : A.dataset) != null && j.message && (K = A.dataset.message), (A == null ? void 0 : A.tagName) === (o == null ? void 0 : o.toUpperCase()) && (m = !0), d = A;
|
|
4365
|
-
return K;
|
|
4366
|
-
}
|
|
4367
4364
|
export {
|
|
4368
|
-
|
|
4365
|
+
K as API,
|
|
4369
4366
|
Mi as BuzzcastingStorageManager,
|
|
4370
4367
|
Ti as BuzzcastingStorageReader,
|
|
4371
4368
|
x as CSS,
|
|
@@ -4374,6 +4371,5 @@ export {
|
|
|
4374
4371
|
he as STORAGE,
|
|
4375
4372
|
Bi as Widget,
|
|
4376
4373
|
ji as filterAttributes,
|
|
4377
|
-
Ni as messageId,
|
|
4378
4374
|
nt as widgetParams
|
|
4379
4375
|
};
|