buzzcasting-storage 2.12.6 → 2.12.8
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.esm.js +405 -394
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Ei = Object.defineProperty;
|
|
2
2
|
var Oi = (p, i, u) => i in p ? Ei(p, i, { enumerable: !0, configurable: !0, writable: !0, value: u }) : p[i] = u;
|
|
3
|
-
var
|
|
4
|
-
const xi = "2.12.
|
|
3
|
+
var D = (p, i, u) => (Oi(p, typeof i != "symbol" ? i + "" : i, u), u);
|
|
4
|
+
const xi = "2.12.7";
|
|
5
5
|
class ki {
|
|
6
6
|
constructor(i) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
D(this, "options");
|
|
8
|
+
D(this, "url");
|
|
9
|
+
D(this, "headers", () => {
|
|
10
10
|
const i = `Bearer ${this.options.bearer}`;
|
|
11
11
|
return {
|
|
12
12
|
headers: new Headers({
|
|
@@ -16,12 +16,23 @@ class ki {
|
|
|
16
16
|
})
|
|
17
17
|
};
|
|
18
18
|
});
|
|
19
|
+
D(this, "formHeaders", () => {
|
|
20
|
+
const i = `Bearer ${this.options.bearer}`;
|
|
21
|
+
return {
|
|
22
|
+
headers: new Headers({
|
|
23
|
+
Authorization: i,
|
|
24
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
25
|
+
Accept: "application/json"
|
|
26
|
+
// 'X-Session-Key': localStorage.getItem('guid') || 'invalid',
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
});
|
|
19
30
|
this.options = i, this.url = `https://${i.app}.buzzcasting.net`;
|
|
20
31
|
}
|
|
21
32
|
async get(i) {
|
|
22
33
|
const { version: u } = this.options, f = this.headers(), k = Object.assign({}, i);
|
|
23
34
|
delete k.slide, delete k.type, delete k.hash;
|
|
24
|
-
const
|
|
35
|
+
const I = Object.keys(k).length > 0 ? `?${new URLSearchParams(k).toString()}` : "";
|
|
25
36
|
return console.debug(
|
|
26
37
|
"%capi%c %cget",
|
|
27
38
|
E.API,
|
|
@@ -30,7 +41,7 @@ class ki {
|
|
|
30
41
|
i.slide,
|
|
31
42
|
i.widget
|
|
32
43
|
), await fetch(
|
|
33
|
-
[this.url, "api", u, i.type].join("/") +
|
|
44
|
+
[this.url, "api", u, i.type].join("/") + I,
|
|
34
45
|
{ ...f, method: "get" }
|
|
35
46
|
).then(async (K) => {
|
|
36
47
|
if (!K.ok)
|
|
@@ -51,14 +62,14 @@ class ki {
|
|
|
51
62
|
), await fetch(
|
|
52
63
|
[this.url, "api", u, i.type, i.id].join("/") + k,
|
|
53
64
|
{ ...f, method: "put" }
|
|
54
|
-
).then((
|
|
55
|
-
if (!
|
|
56
|
-
throw new Error(
|
|
57
|
-
return
|
|
58
|
-
}).then((
|
|
65
|
+
).then((I) => {
|
|
66
|
+
if (!I.ok)
|
|
67
|
+
throw new Error(I.statusText);
|
|
68
|
+
return I;
|
|
69
|
+
}).then((I) => I.json()).catch((I) => ({ succes: !1, message: I, data: [] }));
|
|
59
70
|
}
|
|
60
71
|
async hideLabels(i) {
|
|
61
|
-
const { version: u } = this.options, f = this.
|
|
72
|
+
const { version: u } = this.options, f = this.formHeaders(), k = JSON.stringify(i.labels);
|
|
62
73
|
return console.info(
|
|
63
74
|
"%capi%c %cput",
|
|
64
75
|
E.API,
|
|
@@ -70,14 +81,14 @@ class ki {
|
|
|
70
81
|
), await fetch(
|
|
71
82
|
[this.url, "api", u, i.type, i.widget].join("/"),
|
|
72
83
|
{ ...f, body: k, method: "put" }
|
|
73
|
-
).then((
|
|
74
|
-
if (!
|
|
75
|
-
throw new Error(
|
|
76
|
-
return
|
|
77
|
-
}).then((
|
|
84
|
+
).then((I) => {
|
|
85
|
+
if (!I.ok)
|
|
86
|
+
throw new Error(I.statusText);
|
|
87
|
+
return I;
|
|
88
|
+
}).then((I) => I.json()).catch((I) => ({ succes: !1, message: I, data: [] }));
|
|
78
89
|
}
|
|
79
90
|
}
|
|
80
|
-
var
|
|
91
|
+
var Cr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
81
92
|
function Ai(p) {
|
|
82
93
|
return p && p.__esModule && Object.prototype.hasOwnProperty.call(p, "default") ? p.default : p;
|
|
83
94
|
}
|
|
@@ -85,7 +96,7 @@ var Rr = { exports: {} };
|
|
|
85
96
|
(function(p, i) {
|
|
86
97
|
(function(u, f) {
|
|
87
98
|
p.exports = f();
|
|
88
|
-
})(
|
|
99
|
+
})(Cr, function() {
|
|
89
100
|
var u = function(e, t) {
|
|
90
101
|
return (u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
91
102
|
n.__proto__ = r;
|
|
@@ -107,13 +118,13 @@ var Rr = { exports: {} };
|
|
|
107
118
|
!r && o in t || ((r = r || Array.prototype.slice.call(t, 0, o))[o] = t[o]);
|
|
108
119
|
return e.concat(r || Array.prototype.slice.call(t));
|
|
109
120
|
}
|
|
110
|
-
var
|
|
121
|
+
var I = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Cr, K = Object.keys, N = Array.isArray;
|
|
111
122
|
function Z(e, t) {
|
|
112
123
|
return typeof t != "object" || K(t).forEach(function(n) {
|
|
113
124
|
e[n] = t[n];
|
|
114
125
|
}), e;
|
|
115
126
|
}
|
|
116
|
-
typeof Promise > "u" ||
|
|
127
|
+
typeof Promise > "u" || I.Promise || (I.Promise = Promise);
|
|
117
128
|
var te = Object.getPrototypeOf, be = {}.hasOwnProperty;
|
|
118
129
|
function ie(e, t) {
|
|
119
130
|
return be.call(e, t);
|
|
@@ -144,7 +155,7 @@ var Rr = { exports: {} };
|
|
|
144
155
|
throw new Error("Assertion Failed");
|
|
145
156
|
}
|
|
146
157
|
function Yn(e) {
|
|
147
|
-
|
|
158
|
+
I.setImmediate ? setImmediate(e) : setTimeout(e, 0);
|
|
148
159
|
}
|
|
149
160
|
function ve(e, t) {
|
|
150
161
|
if (typeof t == "string" && ie(e, t))
|
|
@@ -172,7 +183,7 @@ var Rr = { exports: {} };
|
|
|
172
183
|
fe(e, t[r], n[r]);
|
|
173
184
|
} else {
|
|
174
185
|
var a, s, c = t.indexOf(".");
|
|
175
|
-
c !== -1 ? (a = t.substr(0, c), (s = t.substr(c + 1)) === "" ? n === void 0 ?
|
|
186
|
+
c !== -1 ? (a = t.substr(0, c), (s = t.substr(c + 1)) === "" ? n === void 0 ? N(e) && !isNaN(parseInt(a)) ? e.splice(a, 1) : delete e[a] : e[a] = n : fe(c = !(c = e[a]) || !ie(e, a) ? e[a] = {} : c, s, n)) : n === void 0 ? N(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
|
|
176
187
|
}
|
|
177
188
|
}
|
|
178
189
|
function Qn(e) {
|
|
@@ -190,9 +201,9 @@ var Rr = { exports: {} };
|
|
|
190
201
|
return t + e + "Array";
|
|
191
202
|
});
|
|
192
203
|
}))).filter(function(e) {
|
|
193
|
-
return
|
|
204
|
+
return I[e];
|
|
194
205
|
}), Vn = new Set(ge.map(function(e) {
|
|
195
|
-
return
|
|
206
|
+
return I[e];
|
|
196
207
|
})), it = null;
|
|
197
208
|
function Ae(e) {
|
|
198
209
|
return it = /* @__PURE__ */ new WeakMap(), e = function t(n) {
|
|
@@ -201,7 +212,7 @@ var Rr = { exports: {} };
|
|
|
201
212
|
var r = it.get(n);
|
|
202
213
|
if (r)
|
|
203
214
|
return r;
|
|
204
|
-
if (
|
|
215
|
+
if (N(n)) {
|
|
205
216
|
r = [], it.set(n, r);
|
|
206
217
|
for (var o = 0, a = n.length; o < a; ++o)
|
|
207
218
|
r.push(t(n[o]));
|
|
@@ -232,7 +243,7 @@ var Rr = { exports: {} };
|
|
|
232
243
|
function we(e) {
|
|
233
244
|
var t, n, r, o;
|
|
234
245
|
if (arguments.length === 1) {
|
|
235
|
-
if (
|
|
246
|
+
if (N(e))
|
|
236
247
|
return e.slice();
|
|
237
248
|
if (this === He && typeof e == "string")
|
|
238
249
|
return [e];
|
|
@@ -367,12 +378,12 @@ var Rr = { exports: {} };
|
|
|
367
378
|
return [t, te(t), e];
|
|
368
379
|
}(), st = ge[0], de = ge[1], ge = ge[2], de = de && de.then, ut = st && st.constructor, nn = !!ge, ct = function(e, t) {
|
|
369
380
|
lt.push([e, t]), Et && (queueMicrotask(qr), Et = !1);
|
|
370
|
-
}, rn = !0, Et = !0,
|
|
381
|
+
}, rn = !0, Et = !0, Be = [], Ot = [], on = ot, De = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Y, pgp: !1, env: {}, finalize: Y }, B = De, lt = [], Ne = 0, xt = [];
|
|
371
382
|
function M(e) {
|
|
372
383
|
if (typeof this != "object")
|
|
373
384
|
throw new TypeError("Promises must be constructed via new");
|
|
374
385
|
this._listeners = [], this._lib = !1;
|
|
375
|
-
var t = this._PSD =
|
|
386
|
+
var t = this._PSD = B;
|
|
376
387
|
if (typeof e != "function") {
|
|
377
388
|
if (e !== at)
|
|
378
389
|
throw new TypeError("Not a function");
|
|
@@ -396,9 +407,9 @@ var Rr = { exports: {} };
|
|
|
396
407
|
}(this, e);
|
|
397
408
|
}
|
|
398
409
|
var an = { get: function() {
|
|
399
|
-
var e =
|
|
410
|
+
var e = B, t = Pt;
|
|
400
411
|
function n(r, o) {
|
|
401
|
-
var a = this, s = !e.global && (e !==
|
|
412
|
+
var a = this, s = !e.global && (e !== B || t !== Pt), c = s && !Ce(), g = new M(function(d, v) {
|
|
402
413
|
un(a, new tr(ir(r, e, s, c), ir(o, e, s, c), d, v, e));
|
|
403
414
|
});
|
|
404
415
|
return this._consoleTask && (g._consoleTask = this._consoleTask), g;
|
|
@@ -414,9 +425,9 @@ var Rr = { exports: {} };
|
|
|
414
425
|
}
|
|
415
426
|
function sn(e, t) {
|
|
416
427
|
var n, r;
|
|
417
|
-
Ot.push(t), e._state === null && (n = e._lib && Xe(), t = on(t), e._state = !1, e._value = t, r = e,
|
|
428
|
+
Ot.push(t), e._state === null && (n = e._lib && Xe(), t = on(t), e._state = !1, e._value = t, r = e, Be.some(function(o) {
|
|
418
429
|
return o._value === r._value;
|
|
419
|
-
}) ||
|
|
430
|
+
}) || Be.push(r), nr(e), n && Ve());
|
|
420
431
|
}
|
|
421
432
|
function nr(e) {
|
|
422
433
|
var t = e._listeners;
|
|
@@ -424,8 +435,8 @@ var Rr = { exports: {} };
|
|
|
424
435
|
for (var n = 0, r = t.length; n < r; ++n)
|
|
425
436
|
un(e, t[n]);
|
|
426
437
|
var o = e._PSD;
|
|
427
|
-
--o.ref || o.finalize(),
|
|
428
|
-
--
|
|
438
|
+
--o.ref || o.finalize(), Ne === 0 && (++Ne, ct(function() {
|
|
439
|
+
--Ne == 0 && cn();
|
|
429
440
|
}, []));
|
|
430
441
|
}
|
|
431
442
|
function un(e, t) {
|
|
@@ -433,7 +444,7 @@ var Rr = { exports: {} };
|
|
|
433
444
|
var n = e._state ? t.onFulfilled : t.onRejected;
|
|
434
445
|
if (n === null)
|
|
435
446
|
return (e._state ? t.resolve : t.reject)(e._value);
|
|
436
|
-
++t.psd.ref, ++
|
|
447
|
+
++t.psd.ref, ++Ne, ct(Zr, [n, e, t]);
|
|
437
448
|
} else
|
|
438
449
|
e._listeners.push(t);
|
|
439
450
|
}
|
|
@@ -443,14 +454,14 @@ var Rr = { exports: {} };
|
|
|
443
454
|
!t._state && Ot.length && (Ot = []), r = pe && t._consoleTask ? t._consoleTask.run(function() {
|
|
444
455
|
return e(o);
|
|
445
456
|
}) : e(o), t._state || Ot.indexOf(o) !== -1 || function(a) {
|
|
446
|
-
for (var s =
|
|
447
|
-
if (
|
|
448
|
-
return
|
|
457
|
+
for (var s = Be.length; s; )
|
|
458
|
+
if (Be[--s]._value === a._value)
|
|
459
|
+
return Be.splice(s, 1);
|
|
449
460
|
}(t), n.resolve(r);
|
|
450
461
|
} catch (a) {
|
|
451
462
|
n.reject(a);
|
|
452
463
|
} finally {
|
|
453
|
-
--
|
|
464
|
+
--Ne == 0 && cn(), --n.psd.ref || n.psd.finalize();
|
|
454
465
|
}
|
|
455
466
|
}
|
|
456
467
|
function qr() {
|
|
@@ -474,8 +485,8 @@ var Rr = { exports: {} };
|
|
|
474
485
|
Et = rn = !0;
|
|
475
486
|
}
|
|
476
487
|
function cn() {
|
|
477
|
-
var e =
|
|
478
|
-
|
|
488
|
+
var e = Be;
|
|
489
|
+
Be = [], e.forEach(function(r) {
|
|
479
490
|
r._PSD.onunhandled.call(null, r._value, r);
|
|
480
491
|
});
|
|
481
492
|
for (var t = xt.slice(0), n = t.length; n; )
|
|
@@ -485,20 +496,20 @@ var Rr = { exports: {} };
|
|
|
485
496
|
return new M(at, !1, e);
|
|
486
497
|
}
|
|
487
498
|
function J(e, t) {
|
|
488
|
-
var n =
|
|
499
|
+
var n = B;
|
|
489
500
|
return function() {
|
|
490
|
-
var r = Xe(), o =
|
|
501
|
+
var r = Xe(), o = B;
|
|
491
502
|
try {
|
|
492
|
-
return
|
|
503
|
+
return Ie(n, !0), e.apply(this, arguments);
|
|
493
504
|
} catch (a) {
|
|
494
505
|
t && t(a);
|
|
495
506
|
} finally {
|
|
496
|
-
|
|
507
|
+
Ie(o, !1), r && Ve();
|
|
497
508
|
}
|
|
498
509
|
};
|
|
499
510
|
}
|
|
500
511
|
xe(M.prototype, { then: an, _then: function(e, t) {
|
|
501
|
-
un(this, new tr(null, null, e, t,
|
|
512
|
+
un(this, new tr(null, null, e, t, B));
|
|
502
513
|
}, catch: function(e) {
|
|
503
514
|
if (arguments.length === 1)
|
|
504
515
|
return this.then(null, e);
|
|
@@ -527,7 +538,7 @@ var Rr = { exports: {} };
|
|
|
527
538
|
n.then(r, o).finally(clearTimeout.bind(null, a));
|
|
528
539
|
}) : this;
|
|
529
540
|
} }), typeof Symbol < "u" && Symbol.toStringTag && ke(M.prototype, Symbol.toStringTag, "Dexie.Promise"), De.env = rr(), xe(M, { all: function() {
|
|
530
|
-
var e = we.apply(null, arguments).map(
|
|
541
|
+
var e = we.apply(null, arguments).map(Ct);
|
|
531
542
|
return new M(function(t, n) {
|
|
532
543
|
e.length === 0 && t([]);
|
|
533
544
|
var r = e.length;
|
|
@@ -542,16 +553,16 @@ var Rr = { exports: {} };
|
|
|
542
553
|
e.then(t, n);
|
|
543
554
|
}) : new M(at, !0, e);
|
|
544
555
|
}, reject: kt, race: function() {
|
|
545
|
-
var e = we.apply(null, arguments).map(
|
|
556
|
+
var e = we.apply(null, arguments).map(Ct);
|
|
546
557
|
return new M(function(t, n) {
|
|
547
558
|
e.map(function(r) {
|
|
548
559
|
return M.resolve(r).then(t, n);
|
|
549
560
|
});
|
|
550
561
|
});
|
|
551
562
|
}, PSD: { get: function() {
|
|
552
|
-
return
|
|
563
|
+
return B;
|
|
553
564
|
}, set: function(e) {
|
|
554
|
-
return
|
|
565
|
+
return B = e;
|
|
555
566
|
} }, totalEchoes: { get: function() {
|
|
556
567
|
return Pt;
|
|
557
568
|
} }, newPSD: Pe, usePSD: Ge, scheduler: { get: function() {
|
|
@@ -565,21 +576,21 @@ var Rr = { exports: {} };
|
|
|
565
576
|
} }, follow: function(e, t) {
|
|
566
577
|
return new M(function(n, r) {
|
|
567
578
|
return Pe(function(o, a) {
|
|
568
|
-
var s =
|
|
579
|
+
var s = B;
|
|
569
580
|
s.unhandleds = [], s.onunhandled = a, s.finalize = Ke(function() {
|
|
570
581
|
var c, g = this;
|
|
571
582
|
c = function() {
|
|
572
583
|
g.unhandleds.length === 0 ? o() : a(g.unhandleds[0]);
|
|
573
584
|
}, xt.push(function d() {
|
|
574
585
|
c(), xt.splice(xt.indexOf(d), 1);
|
|
575
|
-
}), ++
|
|
576
|
-
--
|
|
586
|
+
}), ++Ne, ct(function() {
|
|
587
|
+
--Ne == 0 && cn();
|
|
577
588
|
}, []);
|
|
578
589
|
}, s.finalize), e();
|
|
579
590
|
}, t, n, r);
|
|
580
591
|
});
|
|
581
592
|
} }), ut && (ut.allSettled && ke(M, "allSettled", function() {
|
|
582
|
-
var e = we.apply(null, arguments).map(
|
|
593
|
+
var e = we.apply(null, arguments).map(Ct);
|
|
583
594
|
return new M(function(t) {
|
|
584
595
|
e.length === 0 && t([]);
|
|
585
596
|
var n = e.length, r = new Array(n);
|
|
@@ -594,7 +605,7 @@ var Rr = { exports: {} };
|
|
|
594
605
|
});
|
|
595
606
|
});
|
|
596
607
|
}), ut.any && typeof AggregateError < "u" && ke(M, "any", function() {
|
|
597
|
-
var e = we.apply(null, arguments).map(
|
|
608
|
+
var e = we.apply(null, arguments).map(Ct);
|
|
598
609
|
return new M(function(t, n) {
|
|
599
610
|
e.length === 0 && n(new AggregateError([]));
|
|
600
611
|
var r = e.length, o = new Array(r);
|
|
@@ -609,7 +620,7 @@ var Rr = { exports: {} };
|
|
|
609
620
|
}));
|
|
610
621
|
var ne = { awaits: 0, echoes: 0, id: 0 }, ei = 0, At = [], Dt = 0, Pt = 0, ti = 0;
|
|
611
622
|
function Pe(e, t, n, r) {
|
|
612
|
-
var o =
|
|
623
|
+
var o = B, a = Object.create(o);
|
|
613
624
|
return a.parent = o, a.ref = 0, a.global = !1, a.id = ++ti, De.env, a.env = nn ? { Promise: M, PromiseProp: { value: M, configurable: !0, writable: !0 }, all: M.all, race: M.race, allSettled: M.allSettled, any: M.any, resolve: M.resolve, reject: M.reject } : {}, t && Z(a, t), ++o.ref, a.finalize = function() {
|
|
614
625
|
--this.parent.ref || this.parent.finalize();
|
|
615
626
|
}, r = Ge(a, e, n, r), a.ref === 0 && a.finalize(), r;
|
|
@@ -617,54 +628,54 @@ var Rr = { exports: {} };
|
|
|
617
628
|
function Je() {
|
|
618
629
|
return ne.id || (ne.id = ++ei), ++ne.awaits, ne.echoes += er, ne.id;
|
|
619
630
|
}
|
|
620
|
-
function
|
|
631
|
+
function Ce() {
|
|
621
632
|
return !!ne.awaits && (--ne.awaits == 0 && (ne.id = 0), ne.echoes = ne.awaits * er, !0);
|
|
622
633
|
}
|
|
623
|
-
function
|
|
634
|
+
function Ct(e) {
|
|
624
635
|
return ne.echoes && e && e.constructor === ut ? (Je(), e.then(function(t) {
|
|
625
|
-
return
|
|
636
|
+
return Ce(), t;
|
|
626
637
|
}, function(t) {
|
|
627
|
-
return
|
|
638
|
+
return Ce(), q(t);
|
|
628
639
|
})) : e;
|
|
629
640
|
}
|
|
630
641
|
function ni() {
|
|
631
642
|
var e = At[At.length - 1];
|
|
632
|
-
At.pop(),
|
|
643
|
+
At.pop(), Ie(e, !1);
|
|
633
644
|
}
|
|
634
|
-
function
|
|
635
|
-
var n, r =
|
|
636
|
-
(t ? !ne.echoes || Dt++ && e ===
|
|
637
|
-
++Pt, ne.echoes && --ne.echoes != 0 || (ne.echoes = ne.awaits = ne.id = 0), At.push(
|
|
638
|
-
}).bind(null, e) : ni), e !==
|
|
645
|
+
function Ie(e, t) {
|
|
646
|
+
var n, r = B;
|
|
647
|
+
(t ? !ne.echoes || Dt++ && e === B : !Dt || --Dt && e === B) || queueMicrotask(t ? (function(o) {
|
|
648
|
+
++Pt, ne.echoes && --ne.echoes != 0 || (ne.echoes = ne.awaits = ne.id = 0), At.push(B), Ie(o, !0);
|
|
649
|
+
}).bind(null, e) : ni), e !== B && (B = e, r === De && (De.env = rr()), nn && (n = De.env.Promise, t = e.env, (r.global || e.global) && (Object.defineProperty(I, "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))));
|
|
639
650
|
}
|
|
640
651
|
function rr() {
|
|
641
|
-
var e =
|
|
642
|
-
return nn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(
|
|
652
|
+
var e = I.Promise;
|
|
653
|
+
return nn ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(I, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
|
|
643
654
|
}
|
|
644
655
|
function Ge(e, t, n, r, o) {
|
|
645
|
-
var a =
|
|
656
|
+
var a = B;
|
|
646
657
|
try {
|
|
647
|
-
return
|
|
658
|
+
return Ie(e, !0), t(n, r, o);
|
|
648
659
|
} finally {
|
|
649
|
-
|
|
660
|
+
Ie(a, !1);
|
|
650
661
|
}
|
|
651
662
|
}
|
|
652
663
|
function ir(e, t, n, r) {
|
|
653
664
|
return typeof e != "function" ? e : function() {
|
|
654
|
-
var o =
|
|
655
|
-
n && Je(),
|
|
665
|
+
var o = B;
|
|
666
|
+
n && Je(), Ie(t, !0);
|
|
656
667
|
try {
|
|
657
668
|
return e.apply(this, arguments);
|
|
658
669
|
} finally {
|
|
659
|
-
|
|
670
|
+
Ie(o, !1), r && queueMicrotask(Ce);
|
|
660
671
|
}
|
|
661
672
|
};
|
|
662
673
|
}
|
|
663
674
|
function ln(e) {
|
|
664
675
|
Promise === ut && ne.echoes === 0 ? Dt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
665
676
|
}
|
|
666
|
-
("" + de).indexOf("[native code]") === -1 && (Je =
|
|
667
|
-
var q = M.reject, ge = "4.0.1-beta.10", Le = "", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", or = "String expected.", Ze = [],
|
|
677
|
+
("" + de).indexOf("[native code]") === -1 && (Je = Ce = Y);
|
|
678
|
+
var q = M.reject, ge = "4.0.1-beta.10", Le = "", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", or = "String expected.", Ze = [], It = "__dbnames", fn = "readonly", dn = "readwrite";
|
|
668
679
|
function Fe(e, t) {
|
|
669
680
|
return e ? t ? function() {
|
|
670
681
|
return e.apply(this, arguments) && t.apply(this, arguments);
|
|
@@ -720,7 +731,7 @@ var Rr = { exports: {} };
|
|
|
720
731
|
return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
|
|
721
732
|
}
|
|
722
733
|
var lr = (X.prototype._trans = function(e, t, n) {
|
|
723
|
-
var r = this._tx ||
|
|
734
|
+
var r = this._tx || B.trans, o = this.name, a = pe && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
|
|
724
735
|
function s(d, v, l) {
|
|
725
736
|
if (!l.schema[o])
|
|
726
737
|
throw new L.NotFound("Table " + o + " not part of transaction");
|
|
@@ -728,10 +739,10 @@ var Rr = { exports: {} };
|
|
|
728
739
|
}
|
|
729
740
|
var c = Xe();
|
|
730
741
|
try {
|
|
731
|
-
var g = r && r.db._novip === this.db._novip ? r ===
|
|
742
|
+
var g = r && r.db._novip === this.db._novip ? r === B.trans ? r._promise(e, s, n) : Pe(function() {
|
|
732
743
|
return r._promise(e, s, n);
|
|
733
|
-
}, { trans: r, transless:
|
|
734
|
-
if (v.idbdb && (v._state.openComplete ||
|
|
744
|
+
}, { trans: r, transless: B.transless || B }) : function d(v, l, h, y) {
|
|
745
|
+
if (v.idbdb && (v._state.openComplete || B.letThrough || v._vip)) {
|
|
735
746
|
var b = v._createTransaction(l, h, v._dbSchema);
|
|
736
747
|
try {
|
|
737
748
|
b.create(), v._state.PR1398_maxLoop = 3;
|
|
@@ -742,7 +753,7 @@ var Rr = { exports: {} };
|
|
|
742
753
|
}
|
|
743
754
|
return b._promise(l, function(w, m) {
|
|
744
755
|
return Pe(function() {
|
|
745
|
-
return
|
|
756
|
+
return B.trans = b, y(w, m, b);
|
|
746
757
|
});
|
|
747
758
|
}).then(function(w) {
|
|
748
759
|
if (l === "readwrite")
|
|
@@ -782,7 +793,7 @@ var Rr = { exports: {} };
|
|
|
782
793
|
}, X.prototype.where = function(e) {
|
|
783
794
|
if (typeof e == "string")
|
|
784
795
|
return new this.db.WhereClause(this, e);
|
|
785
|
-
if (
|
|
796
|
+
if (N(e))
|
|
786
797
|
return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
|
|
787
798
|
var t = K(e);
|
|
788
799
|
if (t.length === 1)
|
|
@@ -814,7 +825,7 @@ var Rr = { exports: {} };
|
|
|
814
825
|
var c = t.reduce(function(h, d) {
|
|
815
826
|
var v = h[0], l = h[1], h = r[d], y = e[d];
|
|
816
827
|
return [v || h, v || !h ? Fe(l, h && h.multi ? function(b) {
|
|
817
|
-
return b = ve(b, d),
|
|
828
|
+
return b = ve(b, d), N(b) && b.some(function(w) {
|
|
818
829
|
return a(y, w);
|
|
819
830
|
});
|
|
820
831
|
} : function(b) {
|
|
@@ -837,7 +848,7 @@ var Rr = { exports: {} };
|
|
|
837
848
|
}, X.prototype.toCollection = function() {
|
|
838
849
|
return new this.db.Collection(new this.db.WhereClause(this));
|
|
839
850
|
}, X.prototype.orderBy = function(e) {
|
|
840
|
-
return new this.db.Collection(new this.db.WhereClause(this,
|
|
851
|
+
return new this.db.Collection(new this.db.WhereClause(this, N(e) ? "[".concat(e.join("+"), "]") : e));
|
|
841
852
|
}, X.prototype.reverse = function() {
|
|
842
853
|
return this.toCollection().reverse();
|
|
843
854
|
}, X.prototype.mapToClass = function(e) {
|
|
@@ -893,7 +904,7 @@ var Rr = { exports: {} };
|
|
|
893
904
|
return c;
|
|
894
905
|
});
|
|
895
906
|
}, X.prototype.update = function(e, t) {
|
|
896
|
-
return typeof e != "object" ||
|
|
907
|
+
return typeof e != "object" || N(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? q(new L.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
|
|
897
908
|
}, X.prototype.put = function(e, t) {
|
|
898
909
|
var n = this, r = this.schema.primKey, o = r.auto, a = r.keyPath, s = e;
|
|
899
910
|
return a && o && (s = Rt(a)(e)), this._trans("readwrite", function(c) {
|
|
@@ -1042,7 +1053,7 @@ var Rr = { exports: {} };
|
|
|
1042
1053
|
}
|
|
1043
1054
|
K(d = s).forEach(function(l) {
|
|
1044
1055
|
var h = d[l];
|
|
1045
|
-
if (
|
|
1056
|
+
if (N(h))
|
|
1046
1057
|
a(l, d[l][0], d[l][1]);
|
|
1047
1058
|
else {
|
|
1048
1059
|
if (h !== "asap")
|
|
@@ -1312,9 +1323,9 @@ var Rr = { exports: {} };
|
|
|
1312
1323
|
function _(S) {
|
|
1313
1324
|
var O = Math.min(h, m.length - S);
|
|
1314
1325
|
return g.getMany({ trans: r, keys: m.slice(S, S + O), cache: "immutable" }).then(function(x) {
|
|
1315
|
-
for (var A = [], R = [],
|
|
1316
|
-
var G = x[
|
|
1317
|
-
s.call(F, F.value, F) !== !1 && (F.value == null ? T.push(m[S +
|
|
1326
|
+
for (var A = [], R = [], P = v ? [] : null, T = [], C = 0; C < O; ++C) {
|
|
1327
|
+
var G = x[C], F = { value: Ae(G), primKey: m[S + C] };
|
|
1328
|
+
s.call(F, F.value, F) !== !1 && (F.value == null ? T.push(m[S + C]) : v || z(l(G), l(F.value)) === 0 ? (R.push(F.value), v && P.push(m[S + C])) : (T.push(m[S + C]), A.push(F.value)));
|
|
1318
1329
|
}
|
|
1319
1330
|
var H = qe(n) && n.limit === 1 / 0 && (typeof e != "function" || e === gn) && { index: n.index, range: n.range };
|
|
1320
1331
|
return Promise.resolve(0 < A.length && g.mutate({ trans: r, type: "add", values: A }).then(function(U) {
|
|
@@ -1322,7 +1333,7 @@ var Rr = { exports: {} };
|
|
|
1322
1333
|
T.splice(parseInt(Q), 1);
|
|
1323
1334
|
c(A.length, U);
|
|
1324
1335
|
})).then(function() {
|
|
1325
|
-
return (0 < R.length || H && typeof e == "object") && g.mutate({ trans: r, type: "put", keys:
|
|
1336
|
+
return (0 < R.length || H && typeof e == "object") && g.mutate({ trans: r, type: "put", keys: P, values: R, criteria: H, changeSpec: typeof e != "function" && e }).then(function(U) {
|
|
1326
1337
|
return c(R.length, U);
|
|
1327
1338
|
});
|
|
1328
1339
|
}).then(function() {
|
|
@@ -1417,14 +1428,14 @@ var Rr = { exports: {} };
|
|
|
1417
1428
|
if (t(S, g, y))
|
|
1418
1429
|
return !0;
|
|
1419
1430
|
for (var O = null, x = y; x < l; ++x) {
|
|
1420
|
-
var A = function(R,
|
|
1421
|
-
for (var H = Math.min(R.length,
|
|
1422
|
-
var le =
|
|
1423
|
-
if (le !==
|
|
1424
|
-
return G(R[Q], T[Q]) < 0 ? R.substr(0, Q) + T[Q] + T.substr(Q + 1) : G(R[Q],
|
|
1431
|
+
var A = function(R, P, T, C, G, F) {
|
|
1432
|
+
for (var H = Math.min(R.length, C.length), U = -1, Q = 0; Q < H; ++Q) {
|
|
1433
|
+
var le = P[Q];
|
|
1434
|
+
if (le !== C[Q])
|
|
1435
|
+
return G(R[Q], T[Q]) < 0 ? R.substr(0, Q) + T[Q] + T.substr(Q + 1) : G(R[Q], C[Q]) < 0 ? R.substr(0, Q) + C[Q] + T.substr(Q + 1) : 0 <= U ? R.substr(0, U) + P[U] + T.substr(U + 1) : null;
|
|
1425
1436
|
G(R[Q], le) < 0 && (U = Q);
|
|
1426
1437
|
}
|
|
1427
|
-
return H <
|
|
1438
|
+
return H < C.length && F === "next" ? R + T.substr(R.length) : H < R.length && F === "prev" ? R.substr(0, T.length) : U < 0 ? null : R.substr(0, U) + C[U] + T.substr(U + 1);
|
|
1428
1439
|
}(_, S, c[x], g[x], s, d);
|
|
1429
1440
|
A === null && O === null ? y = x + 1 : (O === null || 0 < s(O, A)) && (O = A);
|
|
1430
1441
|
}
|
|
@@ -1597,10 +1608,10 @@ var Rr = { exports: {} };
|
|
|
1597
1608
|
e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
|
|
1598
1609
|
}
|
|
1599
1610
|
var pt = "storagemutated", yn = "x-storagemutated-1", Te = ft(null, pt), ai = (me.prototype._lock = function() {
|
|
1600
|
-
return rt(!
|
|
1611
|
+
return rt(!B.global), ++this._reculock, this._reculock !== 1 || B.global || (B.lockOwnerFor = this), this;
|
|
1601
1612
|
}, me.prototype._unlock = function() {
|
|
1602
|
-
if (rt(!
|
|
1603
|
-
for (
|
|
1613
|
+
if (rt(!B.global), --this._reculock == 0)
|
|
1614
|
+
for (B.global || (B.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
|
|
1604
1615
|
var e = this._blockedFuncs.shift();
|
|
1605
1616
|
try {
|
|
1606
1617
|
Ge(e[1], e[0]);
|
|
@@ -1609,7 +1620,7 @@ var Rr = { exports: {} };
|
|
|
1609
1620
|
}
|
|
1610
1621
|
return this;
|
|
1611
1622
|
}, me.prototype._locked = function() {
|
|
1612
|
-
return this._reculock &&
|
|
1623
|
+
return this._reculock && B.lockOwnerFor !== this;
|
|
1613
1624
|
}, me.prototype.create = function(e) {
|
|
1614
1625
|
var t = this;
|
|
1615
1626
|
if (!this.mode)
|
|
@@ -1643,7 +1654,7 @@ var Rr = { exports: {} };
|
|
|
1643
1654
|
return new M(function(a, s) {
|
|
1644
1655
|
r._blockedFuncs.push([function() {
|
|
1645
1656
|
r._promise(e, t, n).then(a, s);
|
|
1646
|
-
},
|
|
1657
|
+
}, B]);
|
|
1647
1658
|
});
|
|
1648
1659
|
if (n)
|
|
1649
1660
|
return Pe(function() {
|
|
@@ -1753,8 +1764,8 @@ var Rr = { exports: {} };
|
|
|
1753
1764
|
var m = w.trans, _ = w.type, S = w.keys, O = w.values, x = w.range;
|
|
1754
1765
|
return new Promise(function(A, R) {
|
|
1755
1766
|
A = J(A);
|
|
1756
|
-
var
|
|
1757
|
-
if (!
|
|
1767
|
+
var P = m.objectStore(b), T = P.keyPath == null, C = _ === "put" || _ === "add";
|
|
1768
|
+
if (!C && _ !== "delete" && _ !== "deleteRange")
|
|
1758
1769
|
throw new Error("Invalid operation type: " + _);
|
|
1759
1770
|
var G, F = (S || O || { length: 1 }).length;
|
|
1760
1771
|
if (S && O && S.length !== O.length)
|
|
@@ -1768,19 +1779,19 @@ var Rr = { exports: {} };
|
|
|
1768
1779
|
if (_ === "deleteRange") {
|
|
1769
1780
|
if (x.type === 4)
|
|
1770
1781
|
return A({ numFailures: le, failures: Q, results: [], lastResult: void 0 });
|
|
1771
|
-
x.type === 3 ? U.push(G =
|
|
1782
|
+
x.type === 3 ? U.push(G = P.clear()) : U.push(G = P.delete(r(x)));
|
|
1772
1783
|
} else {
|
|
1773
|
-
var T =
|
|
1774
|
-
if (
|
|
1784
|
+
var T = C ? T ? [O, S] : [O, null] : [S, null], $ = T[0], Ee = T[1];
|
|
1785
|
+
if (C)
|
|
1775
1786
|
for (var ae = 0; ae < F; ++ae)
|
|
1776
|
-
U.push(G = Ee && Ee[ae] !== void 0 ?
|
|
1787
|
+
U.push(G = Ee && Ee[ae] !== void 0 ? P[_]($[ae], Ee[ae]) : P[_]($[ae])), G.onerror = H;
|
|
1777
1788
|
else
|
|
1778
1789
|
for (ae = 0; ae < F; ++ae)
|
|
1779
|
-
U.push(G =
|
|
1790
|
+
U.push(G = P[_]($[ae])), G.onerror = H;
|
|
1780
1791
|
}
|
|
1781
1792
|
function Qt(ue) {
|
|
1782
|
-
ue = ue.target.result, U.forEach(function(We,
|
|
1783
|
-
return We.error != null && (Q[
|
|
1793
|
+
ue = ue.target.result, U.forEach(function(We, Nn) {
|
|
1794
|
+
return We.error != null && (Q[Nn] = We.error);
|
|
1784
1795
|
}), A({ numFailures: le, failures: Q, results: _ === "delete" ? S : U.map(function(We) {
|
|
1785
1796
|
return We.result;
|
|
1786
1797
|
}), lastResult: ue });
|
|
@@ -1793,11 +1804,11 @@ var Rr = { exports: {} };
|
|
|
1793
1804
|
var m = w.trans, _ = w.keys;
|
|
1794
1805
|
return new Promise(function(S, O) {
|
|
1795
1806
|
S = J(S);
|
|
1796
|
-
for (var x, A = m.objectStore(b), R = _.length,
|
|
1797
|
-
U = U.target,
|
|
1807
|
+
for (var x, A = m.objectStore(b), R = _.length, P = new Array(R), T = 0, C = 0, G = function(U) {
|
|
1808
|
+
U = U.target, P[U._pos] = U.result, ++C === T && S(P);
|
|
1798
1809
|
}, F = ye(O), H = 0; H < R; ++H)
|
|
1799
1810
|
_[H] != null && ((x = A.get(_[H]))._pos = H, x.onsuccess = G, x.onerror = F, ++T);
|
|
1800
|
-
T === 0 && S(
|
|
1811
|
+
T === 0 && S(P);
|
|
1801
1812
|
});
|
|
1802
1813
|
}, get: function(w) {
|
|
1803
1814
|
var m = w.trans, _ = w.key;
|
|
@@ -1811,12 +1822,12 @@ var Rr = { exports: {} };
|
|
|
1811
1822
|
}, query: (y = d, function(w) {
|
|
1812
1823
|
return new Promise(function(m, _) {
|
|
1813
1824
|
m = J(m);
|
|
1814
|
-
var S, O, x, T = w.trans, A = w.values, R = w.limit, G = w.query,
|
|
1825
|
+
var S, O, x, T = w.trans, A = w.values, R = w.limit, G = w.query, P = R === 1 / 0 ? void 0 : R, C = G.index, G = G.range, T = T.objectStore(b), C = C.isPrimaryKey ? T : T.index(C.name), G = r(G);
|
|
1815
1826
|
if (R === 0)
|
|
1816
1827
|
return m({ result: [] });
|
|
1817
|
-
y ? ((
|
|
1828
|
+
y ? ((P = A ? C.getAll(G, P) : C.getAllKeys(G, P)).onsuccess = function(F) {
|
|
1818
1829
|
return m({ result: F.target.result });
|
|
1819
|
-
},
|
|
1830
|
+
}, P.onerror = ye(_)) : (S = 0, O = !A && "openKeyCursor" in C ? C.openKeyCursor(G) : C.openCursor(G), x = [], O.onsuccess = function(F) {
|
|
1820
1831
|
var H = O.result;
|
|
1821
1832
|
return H ? (x.push(A ? H.value : H.primaryKey), ++S === R ? m({ result: x }) : void H.continue()) : m({ result: x });
|
|
1822
1833
|
}, O.onerror = ye(_));
|
|
@@ -1825,7 +1836,7 @@ var Rr = { exports: {} };
|
|
|
1825
1836
|
var m = w.trans, _ = w.values, S = w.query, O = w.reverse, x = w.unique;
|
|
1826
1837
|
return new Promise(function(A, R) {
|
|
1827
1838
|
A = J(A);
|
|
1828
|
-
var
|
|
1839
|
+
var C = S.index, P = S.range, T = m.objectStore(b), T = C.isPrimaryKey ? T : T.index(C.name), C = O ? x ? "prevunique" : "prev" : x ? "nextunique" : "next", G = !_ && "openKeyCursor" in T ? T.openKeyCursor(r(P), C) : T.openCursor(r(P), C);
|
|
1829
1840
|
G.onerror = ye(R), G.onsuccess = J(function(F) {
|
|
1830
1841
|
var H, U, Q, le, $ = G.result;
|
|
1831
1842
|
$ ? ($.___id = ++si, $.done = !1, H = $.continue.bind($), U = (U = $.continuePrimaryKey) && U.bind($), Q = $.advance.bind($), le = function() {
|
|
@@ -1853,8 +1864,8 @@ var Rr = { exports: {} };
|
|
|
1853
1864
|
}, $.stop();
|
|
1854
1865
|
}
|
|
1855
1866
|
var Qt = new Promise(function(ue, We) {
|
|
1856
|
-
ue = J(ue), G.onerror = ye(We), $.fail = We, $.stop = function(
|
|
1857
|
-
$.stop = $.continue = $.continuePrimaryKey = $.advance = le, ue(
|
|
1867
|
+
ue = J(ue), G.onerror = ye(We), $.fail = We, $.stop = function(Nn) {
|
|
1868
|
+
$.stop = $.continue = $.continuePrimaryKey = $.advance = le, ue(Nn);
|
|
1858
1869
|
};
|
|
1859
1870
|
});
|
|
1860
1871
|
return G.onsuccess = J(function(ue) {
|
|
@@ -1866,20 +1877,20 @@ var Rr = { exports: {} };
|
|
|
1866
1877
|
}, count: function(w) {
|
|
1867
1878
|
var m = w.query, _ = w.trans, S = m.index, O = m.range;
|
|
1868
1879
|
return new Promise(function(x, A) {
|
|
1869
|
-
var R = _.objectStore(b),
|
|
1870
|
-
|
|
1880
|
+
var R = _.objectStore(b), P = S.isPrimaryKey ? R : R.index(S.name), R = r(O), P = R ? P.count(R) : P.count();
|
|
1881
|
+
P.onsuccess = J(function(T) {
|
|
1871
1882
|
return x(T.target.result);
|
|
1872
|
-
}),
|
|
1883
|
+
}), P.onerror = ye(A);
|
|
1873
1884
|
});
|
|
1874
1885
|
} };
|
|
1875
1886
|
}
|
|
1876
1887
|
var a, s, c, v = (s = g, c = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: c.map(function(h) {
|
|
1877
1888
|
return s.objectStore(h);
|
|
1878
1889
|
}).map(function(h) {
|
|
1879
|
-
var y = h.keyPath, m = h.autoIncrement, b =
|
|
1890
|
+
var y = h.keyPath, m = h.autoIncrement, b = N(y), w = {}, m = { name: h.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: y == null, compound: b, keyPath: y, autoIncrement: m, unique: !0, extractKey: vn(y) }, indexes: yr(h.indexNames).map(function(_) {
|
|
1880
1891
|
return h.index(_);
|
|
1881
1892
|
}).map(function(x) {
|
|
1882
|
-
var S = x.name, O = x.unique, A = x.multiEntry, x = x.keyPath, A = { name: S, compound:
|
|
1893
|
+
var S = x.name, O = x.unique, A = x.multiEntry, x = x.keyPath, A = { name: S, compound: N(x), keyPath: x, unique: O, multiEntry: A, extractKey: vn(x) };
|
|
1883
1894
|
return w[yt(x)] = A;
|
|
1884
1895
|
}), getIndexByKeyPath: function(_) {
|
|
1885
1896
|
return w[yt(_)];
|
|
@@ -1909,7 +1920,7 @@ var Rr = { exports: {} };
|
|
|
1909
1920
|
}) && (o.core = e.core.table(a), e[a] instanceof e.Table && (e[a].core = o.core));
|
|
1910
1921
|
});
|
|
1911
1922
|
}
|
|
1912
|
-
function
|
|
1923
|
+
function Bt(e, t, n, r) {
|
|
1913
1924
|
n.forEach(function(o) {
|
|
1914
1925
|
var a = r[o];
|
|
1915
1926
|
t.forEach(function(s) {
|
|
@@ -1938,9 +1949,9 @@ var Rr = { exports: {} };
|
|
|
1938
1949
|
n.objectStoreNames.contains("$meta") && !o.$meta && (o.$meta = bn("$meta", br("")[0], []), e._storeNames.push("$meta"));
|
|
1939
1950
|
var a = e._createTransaction("readwrite", e._storeNames, o);
|
|
1940
1951
|
a.create(n), a._completion.catch(r);
|
|
1941
|
-
var s = a._reject.bind(a), c =
|
|
1952
|
+
var s = a._reject.bind(a), c = B.transless || B;
|
|
1942
1953
|
Pe(function() {
|
|
1943
|
-
return
|
|
1954
|
+
return B.trans = a, B.transless = c, t !== 0 ? (Kt(e, n), d = t, ((g = a).storeNames.includes("$meta") ? g.table("$meta").get("version").then(function(v) {
|
|
1944
1955
|
return v ?? d;
|
|
1945
1956
|
}) : M.resolve(d)).then(function(v) {
|
|
1946
1957
|
return h = v, y = a, b = n, w = [], v = (l = e)._versions, m = l._dbSchema = Gt(0, l.idbdb, b), (v = v.filter(function(_) {
|
|
@@ -1950,17 +1961,17 @@ var Rr = { exports: {} };
|
|
|
1950
1961
|
var S = m, O = _._cfg.dbschema;
|
|
1951
1962
|
Lt(l, S, b), Lt(l, O, b), m = l._dbSchema = O;
|
|
1952
1963
|
var x = _n(S, O);
|
|
1953
|
-
x.add.forEach(function(
|
|
1954
|
-
Sn(b,
|
|
1955
|
-
}), x.change.forEach(function(
|
|
1956
|
-
if (
|
|
1964
|
+
x.add.forEach(function(C) {
|
|
1965
|
+
Sn(b, C[0], C[1].primKey, C[1].indexes);
|
|
1966
|
+
}), x.change.forEach(function(C) {
|
|
1967
|
+
if (C.recreate)
|
|
1957
1968
|
throw new L.Upgrade("Not yet support for changing primary key");
|
|
1958
|
-
var G = b.objectStore(
|
|
1959
|
-
|
|
1960
|
-
return
|
|
1961
|
-
}),
|
|
1962
|
-
G.deleteIndex(F.name),
|
|
1963
|
-
}),
|
|
1969
|
+
var G = b.objectStore(C.name);
|
|
1970
|
+
C.add.forEach(function(F) {
|
|
1971
|
+
return Nt(G, F);
|
|
1972
|
+
}), C.change.forEach(function(F) {
|
|
1973
|
+
G.deleteIndex(F.name), Nt(G, F);
|
|
1974
|
+
}), C.del.forEach(function(F) {
|
|
1964
1975
|
return G.deleteIndex(F);
|
|
1965
1976
|
});
|
|
1966
1977
|
});
|
|
@@ -1968,22 +1979,22 @@ var Rr = { exports: {} };
|
|
|
1968
1979
|
if (A && _._cfg.version > h) {
|
|
1969
1980
|
Kt(l, b), y._memoizedTables = {};
|
|
1970
1981
|
var R = Qn(O);
|
|
1971
|
-
x.del.forEach(function(
|
|
1972
|
-
R[
|
|
1973
|
-
}), wn(l, [l.Transaction.prototype]),
|
|
1974
|
-
var
|
|
1982
|
+
x.del.forEach(function(C) {
|
|
1983
|
+
R[C] = S[C];
|
|
1984
|
+
}), wn(l, [l.Transaction.prototype]), Bt(l, [l.Transaction.prototype], K(R), R), y.schema = R;
|
|
1985
|
+
var P, T = qt(A);
|
|
1975
1986
|
return T && Je(), x = M.follow(function() {
|
|
1976
|
-
var
|
|
1977
|
-
(
|
|
1978
|
-
}),
|
|
1979
|
-
return
|
|
1987
|
+
var C;
|
|
1988
|
+
(P = A(y)) && T && (C = Ce.bind(null, null), P.then(C, C));
|
|
1989
|
+
}), P && typeof P.then == "function" ? M.resolve(P) : x.then(function() {
|
|
1990
|
+
return P;
|
|
1980
1991
|
});
|
|
1981
1992
|
}
|
|
1982
1993
|
}), w.push(function(S) {
|
|
1983
1994
|
var O, x, A = _._cfg.dbschema;
|
|
1984
1995
|
O = A, x = S, [].slice.call(x.db.objectStoreNames).forEach(function(R) {
|
|
1985
1996
|
return O[R] == null && x.db.deleteObjectStore(R);
|
|
1986
|
-
}), wn(l, [l.Transaction.prototype]),
|
|
1997
|
+
}), wn(l, [l.Transaction.prototype]), Bt(l, [l.Transaction.prototype], l._storeNames, l._dbSchema), y.schema = l._dbSchema;
|
|
1987
1998
|
}), w.push(function(S) {
|
|
1988
1999
|
l.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(l.idbdb.version / 10) === _._cfg.version ? (l.idbdb.deleteObjectStore("$meta"), delete l._dbSchema.$meta, l._storeNames = l._storeNames.filter(function(O) {
|
|
1989
2000
|
return O !== "$meta";
|
|
@@ -2013,7 +2024,7 @@ var Rr = { exports: {} };
|
|
|
2013
2024
|
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 };
|
|
2014
2025
|
var c = t.objectStore(s.name);
|
|
2015
2026
|
s.add.forEach(function(g) {
|
|
2016
|
-
pe && console.debug("Dexie upgrade patch: Creating missing index ".concat(s.name, ".").concat(g.src)),
|
|
2027
|
+
pe && console.debug("Dexie upgrade patch: Creating missing index ".concat(s.name, ".").concat(g.src)), Nt(c, g);
|
|
2017
2028
|
});
|
|
2018
2029
|
}(o[r]);
|
|
2019
2030
|
if (typeof a == "object")
|
|
@@ -2048,7 +2059,7 @@ var Rr = { exports: {} };
|
|
|
2048
2059
|
function Sn(e, t, n, r) {
|
|
2049
2060
|
var o = e.db.createObjectStore(t, n.keyPath ? { keyPath: n.keyPath, autoIncrement: n.auto } : { autoIncrement: n.auto });
|
|
2050
2061
|
return r.forEach(function(a) {
|
|
2051
|
-
return
|
|
2062
|
+
return Nt(o, a);
|
|
2052
2063
|
}), o;
|
|
2053
2064
|
}
|
|
2054
2065
|
function mr(e, t) {
|
|
@@ -2056,7 +2067,7 @@ var Rr = { exports: {} };
|
|
|
2056
2067
|
t.db.objectStoreNames.contains(n) || (pe && console.debug("Dexie: Creating missing table", n), Sn(t, n, e[n].primKey, e[n].indexes));
|
|
2057
2068
|
});
|
|
2058
2069
|
}
|
|
2059
|
-
function
|
|
2070
|
+
function Nt(e, t) {
|
|
2060
2071
|
e.createIndex(t.name, t.keyPath, { unique: t.unique, multiEntry: t.multi });
|
|
2061
2072
|
}
|
|
2062
2073
|
function Gt(e, t, n) {
|
|
@@ -2078,12 +2089,12 @@ var Rr = { exports: {} };
|
|
|
2078
2089
|
!t[a] || (d = t[a].idxByName[v]) && (d.name = g, delete t[a].idxByName[v], t[a].idxByName[g] = d);
|
|
2079
2090
|
}
|
|
2080
2091
|
}
|
|
2081
|
-
typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) &&
|
|
2092
|
+
typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && I.WorkerGlobalScope && I instanceof I.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
|
|
2082
2093
|
}
|
|
2083
2094
|
function br(e) {
|
|
2084
2095
|
return e.split(",").map(function(t, n) {
|
|
2085
2096
|
var r = (t = t.trim()).replace(/([&*]|\+\+)/g, ""), o = /^\[/.test(r) ? r.match(/^\[(.*)\]$/)[1].split("+") : r;
|
|
2086
|
-
return mn(r, o || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t),
|
|
2097
|
+
return mn(r, o || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), N(o), n === 0);
|
|
2087
2098
|
});
|
|
2088
2099
|
}
|
|
2089
2100
|
var hi = (Ft.prototype._parseStoresSpec = function(e, t) {
|
|
@@ -2106,7 +2117,7 @@ var Rr = { exports: {} };
|
|
|
2106
2117
|
var n = t._versions, r = {}, o = {};
|
|
2107
2118
|
return n.forEach(function(a) {
|
|
2108
2119
|
Z(r, a._cfg.storesSource), o = a._cfg.dbschema = {}, a._parseStoresSpec(r, o);
|
|
2109
|
-
}), t._dbSchema = o, wn(t, [t._allTables, t, t.Transaction.prototype]),
|
|
2120
|
+
}), t._dbSchema = o, wn(t, [t._allTables, t, t.Transaction.prototype]), Bt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], K(o), o), t._storeNames = K(o), this;
|
|
2110
2121
|
}, Ft.prototype.upgrade = function(e) {
|
|
2111
2122
|
return this._cfg.contentUpgrade = tn(this._cfg.contentUpgrade || Y, e), this;
|
|
2112
2123
|
}, Ft);
|
|
@@ -2114,14 +2125,14 @@ var Rr = { exports: {} };
|
|
|
2114
2125
|
}
|
|
2115
2126
|
function En(e, t) {
|
|
2116
2127
|
var n = e._dbNamesDB;
|
|
2117
|
-
return n || (n = e._dbNamesDB = new Se(
|
|
2128
|
+
return n || (n = e._dbNamesDB = new Se(It, { addons: [], indexedDB: e, IDBKeyRange: t })).version(1).stores({ dbnames: "name" }), n.table("dbnames");
|
|
2118
2129
|
}
|
|
2119
2130
|
function On(e) {
|
|
2120
2131
|
return e && typeof e.databases == "function";
|
|
2121
2132
|
}
|
|
2122
2133
|
function xn(e) {
|
|
2123
2134
|
return Pe(function() {
|
|
2124
|
-
return
|
|
2135
|
+
return B.letThrough = !0, e();
|
|
2125
2136
|
});
|
|
2126
2137
|
}
|
|
2127
2138
|
function kn(e) {
|
|
@@ -2227,13 +2238,13 @@ var Rr = { exports: {} };
|
|
|
2227
2238
|
} })[Zt] = function() {
|
|
2228
2239
|
return An(this);
|
|
2229
2240
|
}, de));
|
|
2230
|
-
var $e = {}, Pn = {},
|
|
2241
|
+
var $e = {}, Pn = {}, Cn = !1;
|
|
2231
2242
|
function Wt(e) {
|
|
2232
|
-
Ut(Pn, e),
|
|
2233
|
-
|
|
2243
|
+
Ut(Pn, e), Cn || (Cn = !0, setTimeout(function() {
|
|
2244
|
+
Cn = !1, In(Pn, !(Pn = {}));
|
|
2234
2245
|
}, 0));
|
|
2235
2246
|
}
|
|
2236
|
-
function
|
|
2247
|
+
function In(e, t) {
|
|
2237
2248
|
t === void 0 && (t = !1);
|
|
2238
2249
|
var n = /* @__PURE__ */ new Set();
|
|
2239
2250
|
if (e.all)
|
|
@@ -2293,21 +2304,21 @@ var Rr = { exports: {} };
|
|
|
2293
2304
|
var m, _, S, O, x, A = e.idbdb = w.result, R = wt(A.objectStoreNames);
|
|
2294
2305
|
if (0 < R.length)
|
|
2295
2306
|
try {
|
|
2296
|
-
var
|
|
2307
|
+
var P = A.transaction((O = R).length === 1 ? O[0] : O, "readonly");
|
|
2297
2308
|
if (t.autoSchema)
|
|
2298
|
-
_ = A, S =
|
|
2299
|
-
else if (Lt(e, e._dbSchema,
|
|
2309
|
+
_ = A, S = P, (m = e).verno = _.version / 10, S = m._dbSchema = Gt(0, _, S), m._storeNames = wt(_.objectStoreNames, 0), Bt(m, [m._allTables], K(S), S);
|
|
2310
|
+
else if (Lt(e, e._dbSchema, P), ((x = _n(Gt(0, (x = e).idbdb, P), x._dbSchema)).add.length || x.change.some(function(T) {
|
|
2300
2311
|
return T.add.length || T.change.length;
|
|
2301
2312
|
})) && !a)
|
|
2302
2313
|
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."), A.close(), o = A.version + 1, a = !0, h(c());
|
|
2303
|
-
Kt(e,
|
|
2314
|
+
Kt(e, P);
|
|
2304
2315
|
} catch {
|
|
2305
2316
|
}
|
|
2306
2317
|
Ze.push(e), A.onversionchange = J(function(T) {
|
|
2307
2318
|
t.vcFired = !0, e.on("versionchange").fire(T);
|
|
2308
2319
|
}), A.onclose = J(function(T) {
|
|
2309
2320
|
e.on("close").fire(T);
|
|
2310
|
-
}), l && (x = e._deps,
|
|
2321
|
+
}), l && (x = e._deps, P = b, A = x.indexedDB, x = x.IDBKeyRange, On(A) || P === It || En(A, x).put({ name: P }).catch(Y)), h();
|
|
2311
2322
|
}, y);
|
|
2312
2323
|
}).catch(function(h) {
|
|
2313
2324
|
switch (h == null ? void 0 : h.name) {
|
|
@@ -2358,7 +2369,7 @@ var Rr = { exports: {} };
|
|
|
2358
2369
|
y.schema.indexes.forEach(function(b) {
|
|
2359
2370
|
b.name && (h["idb://".concat(e.name, "/").concat(y.name, "/").concat(b.name)] = new oe(-1 / 0, [[[]]]));
|
|
2360
2371
|
}), h["idb://".concat(e.name, "/").concat(y.name, "/")] = h["idb://".concat(e.name, "/").concat(y.name, "/:dels")] = new oe(-1 / 0, [[[]]]);
|
|
2361
|
-
}), Te(pt).fire(h),
|
|
2372
|
+
}), Te(pt).fire(h), In(h, !0)), e;
|
|
2362
2373
|
});
|
|
2363
2374
|
}
|
|
2364
2375
|
function Rn(e) {
|
|
@@ -2371,13 +2382,13 @@ var Rr = { exports: {} };
|
|
|
2371
2382
|
function o(a) {
|
|
2372
2383
|
return function(g) {
|
|
2373
2384
|
var c = a(g), g = c.value;
|
|
2374
|
-
return c.done ? g : g && typeof g.then == "function" ? g.then(n, r) :
|
|
2385
|
+
return c.done ? g : g && typeof g.then == "function" ? g.then(n, r) : N(g) ? Promise.all(g).then(n, r) : n(g);
|
|
2375
2386
|
};
|
|
2376
2387
|
}
|
|
2377
2388
|
return o(t)();
|
|
2378
2389
|
}
|
|
2379
2390
|
function zt(e, t, n) {
|
|
2380
|
-
for (var r =
|
|
2391
|
+
for (var r = N(e) ? e.slice() : [e], o = 0; o < n; ++o)
|
|
2381
2392
|
r.push(t);
|
|
2382
2393
|
return r;
|
|
2383
2394
|
}
|
|
@@ -2442,7 +2453,7 @@ var Rr = { exports: {} };
|
|
|
2442
2453
|
return f(f({}, e), { table: function(t) {
|
|
2443
2454
|
var n = e.table(t), r = n.schema.primaryKey;
|
|
2444
2455
|
return f(f({}, n), { mutate: function(o) {
|
|
2445
|
-
var a =
|
|
2456
|
+
var a = B.trans, s = a.table(t).hook, c = s.deleting, g = s.creating, d = s.updating;
|
|
2446
2457
|
switch (o.type) {
|
|
2447
2458
|
case "add":
|
|
2448
2459
|
if (g.fire === Y)
|
|
@@ -2478,20 +2489,20 @@ var Rr = { exports: {} };
|
|
|
2478
2489
|
}
|
|
2479
2490
|
return n.mutate(o);
|
|
2480
2491
|
function v(l) {
|
|
2481
|
-
var h, y, b, w =
|
|
2492
|
+
var h, y, b, w = B.trans, m = l.keys || Mn(r, l);
|
|
2482
2493
|
if (!m)
|
|
2483
2494
|
throw new Error("Keys missing");
|
|
2484
2495
|
return (l = l.type === "add" || l.type === "put" ? f(f({}, l), { keys: m }) : f({}, l)).type !== "delete" && (l.values = k([], l.values, !0)), l.keys && (l.keys = k([], l.keys, !0)), h = n, b = m, ((y = l).type === "add" ? Promise.resolve([]) : h.getMany({ trans: y.trans, keys: b, cache: "immutable" })).then(function(_) {
|
|
2485
2496
|
var S = m.map(function(O, x) {
|
|
2486
|
-
var A, R,
|
|
2487
|
-
return l.type === "delete" ? c.fire.call(
|
|
2488
|
-
ie(
|
|
2489
|
-
}))),
|
|
2497
|
+
var A, R, P, T = _[x], C = { onerror: null, onsuccess: null };
|
|
2498
|
+
return l.type === "delete" ? c.fire.call(C, O, T, w) : l.type === "add" || T === void 0 ? (A = g.fire.call(C, O, l.values[x], w), O == null && A != null && (l.keys[x] = O = A, r.outbound || fe(l.values[x], r.keyPath, O))) : (A = Tn(T, l.values[x]), (R = d.fire.call(C, A, O, T, w)) && (P = l.values[x], Object.keys(R).forEach(function(G) {
|
|
2499
|
+
ie(P, G) ? P[G] = R[G] : fe(P, G, R[G]);
|
|
2500
|
+
}))), C;
|
|
2490
2501
|
});
|
|
2491
2502
|
return n.mutate(l).then(function(O) {
|
|
2492
|
-
for (var x = O.failures, A = O.results, R = O.numFailures, O = O.lastResult,
|
|
2493
|
-
var T = (A || m)[
|
|
2494
|
-
T == null ?
|
|
2503
|
+
for (var x = O.failures, A = O.results, R = O.numFailures, O = O.lastResult, P = 0; P < m.length; ++P) {
|
|
2504
|
+
var T = (A || m)[P], C = S[P];
|
|
2505
|
+
T == null ? C.onerror && C.onerror(x[P]) : C.onsuccess && C.onsuccess(l.type === "put" && _[P] ? l.values[P] : T);
|
|
2495
2506
|
}
|
|
2496
2507
|
return { failures: x, results: A, numFailures: R, lastResult: O };
|
|
2497
2508
|
}).catch(function(O) {
|
|
@@ -2547,8 +2558,8 @@ var Rr = { exports: {} };
|
|
|
2547
2558
|
var bi = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
|
|
2548
2559
|
var t = e.schema.name, n = new oe(e.MIN_KEY, e.MAX_KEY);
|
|
2549
2560
|
return f(f({}, e), { transaction: function(r, o, a) {
|
|
2550
|
-
if (
|
|
2551
|
-
throw new L.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(
|
|
2561
|
+
if (B.subscr && o !== "readonly")
|
|
2562
|
+
throw new L.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(B.querier));
|
|
2552
2563
|
return e.transaction(r, o, a);
|
|
2553
2564
|
}, table: function(r) {
|
|
2554
2565
|
function o(y) {
|
|
@@ -2556,19 +2567,19 @@ var Rr = { exports: {} };
|
|
|
2556
2567
|
return [y, new oe((y = b.lower) !== null && y !== void 0 ? y : e.MIN_KEY, (b = b.upper) !== null && b !== void 0 ? b : e.MAX_KEY)];
|
|
2557
2568
|
}
|
|
2558
2569
|
var a = e.table(r), s = a.schema, c = s.primaryKey, g = c.extractKey, d = c.outbound, v = f(f({}, a), { mutate: function(h) {
|
|
2559
|
-
function y(
|
|
2560
|
-
return
|
|
2570
|
+
function y(C) {
|
|
2571
|
+
return C = "idb://".concat(t, "/").concat(r, "/").concat(C), S[C] || (S[C] = new oe());
|
|
2561
2572
|
}
|
|
2562
|
-
var b, w, m, _ = h.trans, S = h.mutatedParts || (h.mutatedParts = {}), O = y(""), x = y(":dels"), A = h.type, T = h.type === "deleteRange" ? [h.range] : h.type === "delete" ? [h.keys] : h.values.length < 50 ? [Mn(c, h).filter(function(
|
|
2563
|
-
return
|
|
2564
|
-
}), h.values] : [], R = T[0],
|
|
2565
|
-
return
|
|
2566
|
-
var G = b(
|
|
2573
|
+
var b, w, m, _ = h.trans, S = h.mutatedParts || (h.mutatedParts = {}), O = y(""), x = y(":dels"), A = h.type, T = h.type === "deleteRange" ? [h.range] : h.type === "delete" ? [h.keys] : h.values.length < 50 ? [Mn(c, h).filter(function(C) {
|
|
2574
|
+
return C;
|
|
2575
|
+
}), h.values] : [], R = T[0], P = T[1], T = h.trans._cache;
|
|
2576
|
+
return N(R) ? (O.addKeys(R), (T = A === "delete" || R.length === P.length ? Sr(R, T) : null) || x.addKeys(R), (T || P) && (b = y, w = T, m = P, s.indexes.forEach(function(C) {
|
|
2577
|
+
var G = b(C.name || "");
|
|
2567
2578
|
function F(U) {
|
|
2568
|
-
return U != null ?
|
|
2579
|
+
return U != null ? C.extractKey(U) : null;
|
|
2569
2580
|
}
|
|
2570
2581
|
function H(U) {
|
|
2571
|
-
return
|
|
2582
|
+
return C.multiEntry && N(U) ? U.forEach(function(Q) {
|
|
2572
2583
|
return G.addKey(Q);
|
|
2573
2584
|
}) : G.addKey(U);
|
|
2574
2585
|
}
|
|
@@ -2576,10 +2587,10 @@ var Rr = { exports: {} };
|
|
|
2576
2587
|
var le = w && F(w[$]), $ = m && F(m[$]);
|
|
2577
2588
|
z(le, $) !== 0 && (le != null && H(le), $ != null && H($));
|
|
2578
2589
|
});
|
|
2579
|
-
}))) : R ? (
|
|
2580
|
-
return y(
|
|
2581
|
-
})), a.mutate(h).then(function(
|
|
2582
|
-
return !R || h.type !== "add" && h.type !== "put" || O.addKeys(
|
|
2590
|
+
}))) : R ? (P = { from: R.lower, to: R.upper }, x.add(P), O.add(P)) : (O.add(n), x.add(n), s.indexes.forEach(function(C) {
|
|
2591
|
+
return y(C.name).add(n);
|
|
2592
|
+
})), a.mutate(h).then(function(C) {
|
|
2593
|
+
return !R || h.type !== "add" && h.type !== "put" || O.addKeys(C.results), _.mutatedParts = Ut(_.mutatedParts || {}, S), C;
|
|
2583
2594
|
});
|
|
2584
2595
|
} }), l = { get: function(h) {
|
|
2585
2596
|
return [c, new oe(h.key)];
|
|
@@ -2588,34 +2599,34 @@ var Rr = { exports: {} };
|
|
|
2588
2599
|
}, count: o, query: o, openCursor: o };
|
|
2589
2600
|
return K(l).forEach(function(h) {
|
|
2590
2601
|
v[h] = function(y) {
|
|
2591
|
-
var b =
|
|
2602
|
+
var b = B.subscr, w = !!b, m = Er(B, a) && Or(h, y) ? y.obsSet = {} : b;
|
|
2592
2603
|
if (w) {
|
|
2593
|
-
var _ = function(
|
|
2594
|
-
return
|
|
2604
|
+
var _ = function(P) {
|
|
2605
|
+
return P = "idb://".concat(t, "/").concat(r, "/").concat(P), m[P] || (m[P] = new oe());
|
|
2595
2606
|
}, S = _(""), O = _(":dels"), b = l[h](y), w = b[0], b = b[1];
|
|
2596
2607
|
if ((h === "query" && w.isPrimaryKey && !y.values ? O : _(w.name || "")).add(b), !w.isPrimaryKey) {
|
|
2597
2608
|
if (h !== "count") {
|
|
2598
2609
|
var x = h === "query" && d && y.values && a.query(f(f({}, y), { values: !1 }));
|
|
2599
|
-
return a[h].apply(this, arguments).then(function(
|
|
2610
|
+
return a[h].apply(this, arguments).then(function(P) {
|
|
2600
2611
|
if (h === "query") {
|
|
2601
2612
|
if (d && y.values)
|
|
2602
2613
|
return x.then(function(F) {
|
|
2603
|
-
return F = F.result, S.addKeys(F),
|
|
2614
|
+
return F = F.result, S.addKeys(F), P;
|
|
2604
2615
|
});
|
|
2605
|
-
var T = y.values ?
|
|
2616
|
+
var T = y.values ? P.result.map(g) : P.result;
|
|
2606
2617
|
(y.values ? S : O).addKeys(T);
|
|
2607
2618
|
} else if (h === "openCursor") {
|
|
2608
|
-
var
|
|
2609
|
-
return
|
|
2610
|
-
return O.addKey(
|
|
2619
|
+
var C = P, G = y.values;
|
|
2620
|
+
return C && Object.create(C, { key: { get: function() {
|
|
2621
|
+
return O.addKey(C.primaryKey), C.key;
|
|
2611
2622
|
} }, primaryKey: { get: function() {
|
|
2612
|
-
var F =
|
|
2623
|
+
var F = C.primaryKey;
|
|
2613
2624
|
return O.addKey(F), F;
|
|
2614
2625
|
} }, value: { get: function() {
|
|
2615
|
-
return G && S.addKey(
|
|
2626
|
+
return G && S.addKey(C.primaryKey), C.value;
|
|
2616
2627
|
} } });
|
|
2617
2628
|
}
|
|
2618
|
-
return
|
|
2629
|
+
return P;
|
|
2619
2630
|
});
|
|
2620
2631
|
}
|
|
2621
2632
|
O.add(n);
|
|
@@ -2632,9 +2643,9 @@ var Rr = { exports: {} };
|
|
|
2632
2643
|
if (t.type === "deleteRange")
|
|
2633
2644
|
return null;
|
|
2634
2645
|
var r = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1;
|
|
2635
|
-
return n.numFailures === r ? null : (t = f({}, t),
|
|
2646
|
+
return n.numFailures === r ? null : (t = f({}, t), N(t.keys) && (t.keys = t.keys.filter(function(o, a) {
|
|
2636
2647
|
return !(a in n.failures);
|
|
2637
|
-
})), "values" in t &&
|
|
2648
|
+
})), "values" in t && N(t.values) && (t.values = t.values.filter(function(o, a) {
|
|
2638
2649
|
return !(a in n.failures);
|
|
2639
2650
|
})), t);
|
|
2640
2651
|
}
|
|
@@ -2647,7 +2658,7 @@ var Rr = { exports: {} };
|
|
|
2647
2658
|
return e;
|
|
2648
2659
|
var s = t.query.index, c = s.multiEntry, g = t.query.range, d = r.schema.primaryKey.extractKey, v = s.extractKey, l = (s.lowLevelIndex || s).extractKey, h = h.reduce(function(y, b) {
|
|
2649
2660
|
var w = y, m = b.type === "add" || b.type === "put" ? b.values.filter(function(x) {
|
|
2650
|
-
return x = v(x), c &&
|
|
2661
|
+
return x = v(x), c && N(x) ? x.some(function(A) {
|
|
2651
2662
|
return jn(A, g);
|
|
2652
2663
|
}) : jn(x, g);
|
|
2653
2664
|
}).map(function(x) {
|
|
@@ -2744,7 +2755,7 @@ var Rr = { exports: {} };
|
|
|
2744
2755
|
if (c._explicit && g && c.mutatedParts)
|
|
2745
2756
|
for (var m = 0, _ = Object.values(y.queries.query); m < _.length; m++)
|
|
2746
2757
|
for (var S = 0, O = (R = _[m]).slice(); S < O.length; S++)
|
|
2747
|
-
Dn((
|
|
2758
|
+
Dn((P = O[S]).obsSet, c.mutatedParts) && (je(R, P), P.subscribers.forEach(function(F) {
|
|
2748
2759
|
return d.add(F);
|
|
2749
2760
|
}));
|
|
2750
2761
|
else if (0 < w.length) {
|
|
@@ -2752,10 +2763,10 @@ var Rr = { exports: {} };
|
|
|
2752
2763
|
return F.trans !== c;
|
|
2753
2764
|
});
|
|
2754
2765
|
for (var x = 0, A = Object.values(y.queries.query); x < A.length; x++)
|
|
2755
|
-
for (var R,
|
|
2756
|
-
(
|
|
2766
|
+
for (var R, P, T, C = 0, G = (R = A[x]).slice(); C < G.length; C++)
|
|
2767
|
+
(P = G[C]).res != null && c.mutatedParts && (g && !P.dirty ? (T = Object.isFrozen(P.res), T = kr(P.res, P.req, w, b, P, T), P.dirty ? (je(R, P), P.subscribers.forEach(function(F) {
|
|
2757
2768
|
return d.add(F);
|
|
2758
|
-
})) : T !==
|
|
2769
|
+
})) : T !== P.res && (P.res = T, P.promise = M.resolve({ result: T }))) : (P.dirty && je(R, P), P.subscribers.forEach(function(F) {
|
|
2759
2770
|
return d.add(F);
|
|
2760
2771
|
})));
|
|
2761
2772
|
}
|
|
@@ -2770,7 +2781,7 @@ var Rr = { exports: {} };
|
|
|
2770
2781
|
}, table: function(n) {
|
|
2771
2782
|
var r = e.table(n), o = r.schema.primaryKey;
|
|
2772
2783
|
return f(f({}, r), { mutate: function(a) {
|
|
2773
|
-
var s =
|
|
2784
|
+
var s = B.trans;
|
|
2774
2785
|
if (o.outbound || s.db._options.cache === "disabled" || s.explicit)
|
|
2775
2786
|
return r.mutate(a);
|
|
2776
2787
|
var c = $e["idb://".concat(t, "/").concat(n)];
|
|
@@ -2790,9 +2801,9 @@ var Rr = { exports: {} };
|
|
|
2790
2801
|
});
|
|
2791
2802
|
}), s) : r.mutate(a);
|
|
2792
2803
|
}, query: function(a) {
|
|
2793
|
-
if (!Er(
|
|
2804
|
+
if (!Er(B, r) || !Or("query", a))
|
|
2794
2805
|
return r.query(a);
|
|
2795
|
-
var s = ((d =
|
|
2806
|
+
var s = ((d = B.trans) === null || d === void 0 ? void 0 : d.db._options.cache) === "immutable", l = B, c = l.requery, g = l.signal, d = function(b, w, m, _) {
|
|
2796
2807
|
var S = $e["idb://".concat(b, "/").concat(w)];
|
|
2797
2808
|
if (!S)
|
|
2798
2809
|
return [];
|
|
@@ -2849,7 +2860,7 @@ var Rr = { exports: {} };
|
|
|
2849
2860
|
return n || (n = new this.Version(e), t.push(n), t.sort(li), n.stores({}), this._state.autoSchema = !1, n);
|
|
2850
2861
|
}, ee.prototype._whenReady = function(e) {
|
|
2851
2862
|
var t = this;
|
|
2852
|
-
return this.idbdb && (this._state.openComplete ||
|
|
2863
|
+
return this.idbdb && (this._state.openComplete || B.letThrough || this._vip) ? e() : new M(function(n, r) {
|
|
2853
2864
|
if (t._state.openComplete)
|
|
2854
2865
|
return r(new L.DatabaseClosed(t._state.dbOpenError));
|
|
2855
2866
|
if (!t._state.isBeingOpened) {
|
|
@@ -2901,7 +2912,7 @@ var Rr = { exports: {} };
|
|
|
2901
2912
|
var c = t._deps.indexedDB.deleteDatabase(t.name);
|
|
2902
2913
|
c.onsuccess = J(function() {
|
|
2903
2914
|
var g, d, v;
|
|
2904
|
-
g = t._deps, d = t.name, v = g.indexedDB, g = g.IDBKeyRange, On(v) || d ===
|
|
2915
|
+
g = t._deps, d = t.name, v = g.indexedDB, g = g.IDBKeyRange, On(v) || d === It || En(v, g).delete(d).catch(Y), o();
|
|
2905
2916
|
}), c.onerror = ye(a), c.onblocked = t._fireOnBlocked;
|
|
2906
2917
|
}
|
|
2907
2918
|
if (n)
|
|
@@ -2935,7 +2946,7 @@ var Rr = { exports: {} };
|
|
|
2935
2946
|
}).apply(this, arguments);
|
|
2936
2947
|
return this._transaction.apply(this, e);
|
|
2937
2948
|
}, ee.prototype._transaction = function(e, t, n) {
|
|
2938
|
-
var r = this, o =
|
|
2949
|
+
var r = this, o = B.trans;
|
|
2939
2950
|
o && o.db === this && e.indexOf("!") === -1 || (o = null);
|
|
2940
2951
|
var a, s, c = e.indexOf("?") !== -1;
|
|
2941
2952
|
e = e.replace("!", "").replace("?", "");
|
|
@@ -2972,7 +2983,7 @@ var Rr = { exports: {} };
|
|
|
2972
2983
|
}
|
|
2973
2984
|
var g = (function d(v, l, h, y, b) {
|
|
2974
2985
|
return M.resolve().then(function() {
|
|
2975
|
-
var w =
|
|
2986
|
+
var w = B.transless || B, m = v._createTransaction(l, h, v._dbSchema, y);
|
|
2976
2987
|
if (m.explicit = !0, w = { trans: m, transless: w }, y)
|
|
2977
2988
|
m.idbtrans = y.idbtrans;
|
|
2978
2989
|
else
|
|
@@ -2986,7 +2997,7 @@ var Rr = { exports: {} };
|
|
|
2986
2997
|
var _, S = qt(b);
|
|
2987
2998
|
return S && Je(), w = M.follow(function() {
|
|
2988
2999
|
var O;
|
|
2989
|
-
(_ = b.call(m, m)) && (S ? (O =
|
|
3000
|
+
(_ = b.call(m, m)) && (S ? (O = Ce.bind(null, null), _.then(O, O)) : typeof _.next == "function" && typeof _.throw == "function" && (_ = Rn(_)));
|
|
2990
3001
|
}, w), (_ && typeof _.then == "function" ? M.resolve(_).then(function(O) {
|
|
2991
3002
|
return m.active ? O : q(new L.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
|
|
2992
3003
|
}) : w.then(function() {
|
|
@@ -3000,7 +3011,7 @@ var Rr = { exports: {} };
|
|
|
3000
3011
|
});
|
|
3001
3012
|
});
|
|
3002
3013
|
}).bind(null, this, a, s, o, n);
|
|
3003
|
-
return o ? o._promise(a, g, "lock") :
|
|
3014
|
+
return o ? o._promise(a, g, "lock") : B.trans ? Ge(B.transless, function() {
|
|
3004
3015
|
return r._whenReady(g);
|
|
3005
3016
|
}) : this._whenReady(g);
|
|
3006
3017
|
}, ee.prototype.table = function(e) {
|
|
@@ -3101,7 +3112,7 @@ var Rr = { exports: {} };
|
|
|
3101
3112
|
this._subscribe = e;
|
|
3102
3113
|
}
|
|
3103
3114
|
try {
|
|
3104
|
-
Yt = { indexedDB:
|
|
3115
|
+
Yt = { indexedDB: I.indexedDB || I.mozIndexedDB || I.webkitIndexedDB || I.msIndexedDB, IDBKeyRange: I.IDBKeyRange || I.webkitIDBKeyRange };
|
|
3105
3116
|
} catch {
|
|
3106
3117
|
Yt = { indexedDB: null, IDBKeyRange: null };
|
|
3107
3118
|
}
|
|
@@ -3124,7 +3135,7 @@ var Rr = { exports: {} };
|
|
|
3124
3135
|
try {
|
|
3125
3136
|
a && Je();
|
|
3126
3137
|
var x = Pe(e, S);
|
|
3127
|
-
return x = a ? x.finally(
|
|
3138
|
+
return x = a ? x.finally(Ce) : x;
|
|
3128
3139
|
} finally {
|
|
3129
3140
|
O && Ve();
|
|
3130
3141
|
}
|
|
@@ -3152,10 +3163,10 @@ var Rr = { exports: {} };
|
|
|
3152
3163
|
}, r;
|
|
3153
3164
|
}
|
|
3154
3165
|
var Ue = Se;
|
|
3155
|
-
function
|
|
3166
|
+
function Bn(e) {
|
|
3156
3167
|
var t = Me;
|
|
3157
3168
|
try {
|
|
3158
|
-
Me = !0, Te.storagemutated.fire(e),
|
|
3169
|
+
Me = !0, Te.storagemutated.fire(e), In(e, !0);
|
|
3159
3170
|
} finally {
|
|
3160
3171
|
Me = t;
|
|
3161
3172
|
}
|
|
@@ -3174,7 +3185,7 @@ var Rr = { exports: {} };
|
|
|
3174
3185
|
return r.map(function(o) {
|
|
3175
3186
|
return o.name;
|
|
3176
3187
|
}).filter(function(o) {
|
|
3177
|
-
return o !==
|
|
3188
|
+
return o !== It;
|
|
3178
3189
|
});
|
|
3179
3190
|
}) : En(n, t).toCollection().primaryKeys()).then(e);
|
|
3180
3191
|
} catch {
|
|
@@ -3186,7 +3197,7 @@ var Rr = { exports: {} };
|
|
|
3186
3197
|
Z(this, e);
|
|
3187
3198
|
};
|
|
3188
3199
|
}, ignoreTransaction: function(e) {
|
|
3189
|
-
return
|
|
3200
|
+
return B.trans ? Ge(B.transless, e) : e();
|
|
3190
3201
|
}, vip: xn, async: function(e) {
|
|
3191
3202
|
return function() {
|
|
3192
3203
|
try {
|
|
@@ -3204,9 +3215,9 @@ var Rr = { exports: {} };
|
|
|
3204
3215
|
return q(o);
|
|
3205
3216
|
}
|
|
3206
3217
|
}, currentTransaction: { get: function() {
|
|
3207
|
-
return
|
|
3218
|
+
return B.trans || null;
|
|
3208
3219
|
} }, waitFor: function(e, t) {
|
|
3209
|
-
return t = M.resolve(typeof e == "function" ? Ue.ignoreTransaction(e) : e).timeout(t || 6e4),
|
|
3220
|
+
return t = M.resolve(typeof e == "function" ? Ue.ignoreTransaction(e) : e).timeout(t || 6e4), B.trans ? B.trans.waitFor(t) : t;
|
|
3210
3221
|
}, Promise: M, debug: { get: function() {
|
|
3211
3222
|
return pe;
|
|
3212
3223
|
}, set: function(e) {
|
|
@@ -3222,13 +3233,13 @@ var Rr = { exports: {} };
|
|
|
3222
3233
|
}) })), Ue.maxKey = gt(Ue.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Te(pt, function(e) {
|
|
3223
3234
|
Me || (e = new CustomEvent(yn, { detail: e }), Me = !0, dispatchEvent(e), Me = !1);
|
|
3224
3235
|
}), addEventListener(yn, function(e) {
|
|
3225
|
-
e = e.detail, Me ||
|
|
3236
|
+
e = e.detail, Me || Bn(e);
|
|
3226
3237
|
}));
|
|
3227
3238
|
var tt, Me = !1, Pr = function() {
|
|
3228
3239
|
};
|
|
3229
3240
|
return typeof BroadcastChannel < "u" && ((Pr = function() {
|
|
3230
3241
|
(tt = new BroadcastChannel(yn)).onmessage = function(e) {
|
|
3231
|
-
return e.data &&
|
|
3242
|
+
return e.data && Bn(e.data);
|
|
3232
3243
|
};
|
|
3233
3244
|
})(), typeof tt.unref == "function" && tt.unref(), Te(pt, function(e) {
|
|
3234
3245
|
Me || tt.postMessage(e);
|
|
@@ -3239,7 +3250,7 @@ var Rr = { exports: {} };
|
|
|
3239
3250
|
n[t].close({ disableAutoOpen: !1 });
|
|
3240
3251
|
}
|
|
3241
3252
|
}), addEventListener("pageshow", function(e) {
|
|
3242
|
-
!Se.disableBfCache && e.persisted && (pe && console.debug("Dexie: handling persisted pageshow"), Pr(),
|
|
3253
|
+
!Se.disableBfCache && e.persisted && (pe && console.debug("Dexie: handling persisted pageshow"), Pr(), Bn({ all: new oe(-1 / 0, [[]]) }));
|
|
3243
3254
|
})), M.rejectionMapper = function(e, t) {
|
|
3244
3255
|
return !e || e instanceof Ye || e instanceof TypeError || e instanceof SyntaxError || !e.name || !Zn[e.name] ? e : (t = new Zn[e.name](t || e.message, e), "stack" in e && ke(t, "stack", { get: function() {
|
|
3245
3256
|
return this.inner.stack;
|
|
@@ -3248,7 +3259,7 @@ var Rr = { exports: {} };
|
|
|
3248
3259
|
});
|
|
3249
3260
|
})(Rr);
|
|
3250
3261
|
var Di = Rr.exports;
|
|
3251
|
-
const $n = /* @__PURE__ */ Ai(Di),
|
|
3262
|
+
const $n = /* @__PURE__ */ Ai(Di), Ir = Symbol.for("Dexie"), Un = globalThis[Ir] || (globalThis[Ir] = $n);
|
|
3252
3263
|
if ($n.semVer !== Un.semVer)
|
|
3253
3264
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${$n.semVer} and ${Un.semVer}`);
|
|
3254
3265
|
var j = /* @__PURE__ */ ((p) => (p.MESSAGES = "messages", p.CLOUD = "cloud", p.SERIES = "series", p.TOPICS = "topics", p.WIDGET = "widget", p.WIDGETS = "widgets", p))(j || {}), E = /* @__PURE__ */ ((p) => (p.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", p.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", p.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", p.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", p.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", p.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", p.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", p.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", p.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", p.NONE = "color:transparent;background-color:transparent;", p.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", p.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", p.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", p.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", p.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", p.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", p.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", p))(E || {}), se = /* @__PURE__ */ ((p) => (p.ADD_SLIDE = "addSlide", p.APP_READY = "appReady", p.API_UPDATE = "apiUpdate", p.APPROVE_MESSAGE = "approveMessage", p.CHANNEL = "channel", p.CLEAN_MESSAGES = "cleanMessages", p.CLOSE_MODAL = "closeModal", p.ERROR = "error", p.GOTO_SLIDE = "gotoSlide", p.HIDE_MESSAGE = "hideMessage", p.HIDE_LABELS = "hideLabels", p.NEXT_SLIDE = "nextSlide", p.PAUSE_PRESENTATION = "pausePresentation", p.PRESENTATION_READY = "presentationReady", p.PREV_SLIDE = "prevSlide", p.RELOAD_PRESENTATION = "reloadPresentation", p.SHOW_MODAL = "showModal", p.STAR_MESSAGE = "starMessage", p.SLIDE_DID_LOAD = "slideDidLoad", p.SLIDE_GOTO = "slideGoto", p.SLIDE_READY = "slideReady", p.SLIDE_TRANSITIONER = "slideTransitioner", p.START_TRANSITIONER = "startTransitioner", p.STORAGE_INIT = "stroageInit", p.SUBSCRIBE = "subscribe", p.REMOVE_CLOUD = "removeCloud", p.UPDATE = "update", p.VERSION = "version", p.WIDGET_UPDATE = "widgetUpdate", p))(se || {}), Vt = /* @__PURE__ */ ((p) => (p.APPROVED = "approved", p.BEFORE = "before", p.DELAYED = "delayed", p.NONE = "none", p.REALTIME = "realtime", p))(Vt || {}), he = /* @__PURE__ */ ((p) => (p.KEYVAL = "keyval", p.LOCAL = "local", p.SESSION = "session", p.DEXIE = "dexie", p.WINDOW = "window", p))(he || {});
|
|
@@ -3265,11 +3276,11 @@ function nt(p) {
|
|
|
3265
3276
|
return p.topics === void 0 && (p.topics = `${p.dashboard}-${p.widget}`), p;
|
|
3266
3277
|
}
|
|
3267
3278
|
function vt(p, i) {
|
|
3268
|
-
var
|
|
3269
|
-
let u, f, k,
|
|
3279
|
+
var N;
|
|
3280
|
+
let u, f, k, I, K;
|
|
3270
3281
|
switch (p.moderation) {
|
|
3271
3282
|
case Vt.BEFORE:
|
|
3272
|
-
u = /* @__PURE__ */ new Date(), f = (
|
|
3283
|
+
u = /* @__PURE__ */ new Date(), f = (N = p.beforeTime) == null ? void 0 : N.split(":"), k = Number.parseInt(f ? f[0] : "00"), I = Number.parseInt(f ? f[1] : "00"), K = Number.parseInt(f ? f[2] : "00"), i.before = u.setHours(k, I, K, 0) / 1e3, i.period || (i.period = u.getDay() === 1 ? 72 : 24);
|
|
3273
3284
|
break;
|
|
3274
3285
|
case Vt.DELAYED:
|
|
3275
3286
|
p.delay && p.delay > 0 && (i.delay = `${p.delay}`);
|
|
@@ -3284,15 +3295,15 @@ function vt(p, i) {
|
|
|
3284
3295
|
}
|
|
3285
3296
|
class Tr {
|
|
3286
3297
|
constructor(i) {
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3298
|
+
D(this, "db");
|
|
3299
|
+
D(this, "subscribers", []);
|
|
3300
|
+
D(this, "options");
|
|
3290
3301
|
/**
|
|
3291
3302
|
* Retrieve Cloud Data
|
|
3292
3303
|
* @param query IQuery
|
|
3293
3304
|
* @returns IResponse
|
|
3294
3305
|
*/
|
|
3295
|
-
|
|
3306
|
+
D(this, "getCloud", async (i) => {
|
|
3296
3307
|
const u = await this.db.table(j.CLOUD).where({ id: i.widget }).last().catch(() => {
|
|
3297
3308
|
console.warn(
|
|
3298
3309
|
"%capi%C %ccloud",
|
|
@@ -3310,7 +3321,7 @@ class Tr {
|
|
|
3310
3321
|
* @param query IQuery
|
|
3311
3322
|
* @returns IResponse
|
|
3312
3323
|
*/
|
|
3313
|
-
|
|
3324
|
+
D(this, "getSeries", async (i) => {
|
|
3314
3325
|
const u = await this.db.table(j.SERIES).where({ id: i.widget }).last().catch(() => {
|
|
3315
3326
|
console.warn(
|
|
3316
3327
|
"%capi%c %cseries",
|
|
@@ -3328,10 +3339,10 @@ class Tr {
|
|
|
3328
3339
|
* @param query IQuery
|
|
3329
3340
|
* @returns IResponse
|
|
3330
3341
|
*/
|
|
3331
|
-
|
|
3332
|
-
const u = (
|
|
3342
|
+
D(this, "getMessages", async (i) => {
|
|
3343
|
+
const u = (I) => I.widget_id === i.widget, f = (I) => I.utc > ((i == null ? void 0 : i.since) || 0), k = (I) => (I == null ? void 0 : I.visible) !== 0;
|
|
3333
3344
|
try {
|
|
3334
|
-
const
|
|
3345
|
+
const I = await this.db.table(j.TOPICS).orderBy("utc").reverse().filter(u).filter(f).filter(k).limit((i == null ? void 0 : i.limit) ?? 25).toArray().catch(() => {
|
|
3335
3346
|
console.warn(
|
|
3336
3347
|
"%capi%c %cmessages",
|
|
3337
3348
|
E.API,
|
|
@@ -3341,11 +3352,11 @@ class Tr {
|
|
|
3341
3352
|
i.widget
|
|
3342
3353
|
);
|
|
3343
3354
|
});
|
|
3344
|
-
if (
|
|
3355
|
+
if (I.length === 0)
|
|
3345
3356
|
return { data: null, message: "No Messages error", success: !1 };
|
|
3346
|
-
const K =
|
|
3357
|
+
const K = I[0] ? I[0].title : "No title", N = I.map(
|
|
3347
3358
|
(be) => be.message_id
|
|
3348
|
-
), te = (await this.db.table(j.MESSAGES).where("id").anyOf(
|
|
3359
|
+
), te = (await this.db.table(j.MESSAGES).where("id").anyOf(N).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
|
|
3349
3360
|
(be) => be.data
|
|
3350
3361
|
);
|
|
3351
3362
|
return {
|
|
@@ -3370,7 +3381,7 @@ class Tr {
|
|
|
3370
3381
|
* @param data
|
|
3371
3382
|
* @returns number
|
|
3372
3383
|
*/
|
|
3373
|
-
|
|
3384
|
+
D(this, "setCloud", async (i, u) => i.type === j.CLOUD && u !== "" ? await this.db.table(j.CLOUD).put({
|
|
3374
3385
|
id: i.widget,
|
|
3375
3386
|
dashboard_id: i.dashboard,
|
|
3376
3387
|
data: u.data
|
|
@@ -3381,7 +3392,7 @@ class Tr {
|
|
|
3381
3392
|
* @param data
|
|
3382
3393
|
* @returns number
|
|
3383
3394
|
*/
|
|
3384
|
-
|
|
3395
|
+
D(this, "setSeries", async (i, u) => i.type === j.SERIES && u !== "" ? await this.db.table(j.SERIES).put({
|
|
3385
3396
|
id: i.widget,
|
|
3386
3397
|
dashboard_id: i.dashboard,
|
|
3387
3398
|
data: u.data
|
|
@@ -3395,21 +3406,21 @@ class Tr {
|
|
|
3395
3406
|
* @param data.data.messages IMessages
|
|
3396
3407
|
* @returns number
|
|
3397
3408
|
*/
|
|
3398
|
-
|
|
3409
|
+
D(this, "setMessages", async (i, u) => {
|
|
3399
3410
|
if (i.type !== j.MESSAGES)
|
|
3400
3411
|
return 400;
|
|
3401
3412
|
const f = u.title;
|
|
3402
3413
|
try {
|
|
3403
3414
|
return u.data.messages.forEach(async (k) => {
|
|
3404
|
-
var
|
|
3415
|
+
var I, K, N;
|
|
3405
3416
|
await this.db.table(j.MESSAGES).put({ id: k.id, utc: k.utc, data: k }), await this.db.table(j.TOPICS).put({
|
|
3406
3417
|
widget_id: i.widget,
|
|
3407
3418
|
message_id: k.id,
|
|
3408
3419
|
dashboard_id: i.dashboard,
|
|
3409
3420
|
title: f,
|
|
3410
|
-
engagement: (
|
|
3421
|
+
engagement: (I = k.dynamics) == null ? void 0 : I.engagement,
|
|
3411
3422
|
impressions: (K = k.dynamics) == null ? void 0 : K.semrush_visits,
|
|
3412
|
-
reach: (
|
|
3423
|
+
reach: (N = k.dynamics) == null ? void 0 : N.potential_reach,
|
|
3413
3424
|
sentiment: k.topics[0].sentiment,
|
|
3414
3425
|
utc: k.utc
|
|
3415
3426
|
});
|
|
@@ -3422,27 +3433,27 @@ class Tr {
|
|
|
3422
3433
|
* Wipe Message data after number of seconds
|
|
3423
3434
|
* @param retentionDuration
|
|
3424
3435
|
*/
|
|
3425
|
-
|
|
3426
|
-
const u = Date.now() / 1e3, f = (
|
|
3427
|
-
return await this.db.table(j.TOPICS).orderBy("utc").filter(f).modify((
|
|
3436
|
+
D(this, "cleanMessages", async (i) => {
|
|
3437
|
+
const u = Date.now() / 1e3, f = (I) => I.utc < u - i, k = (I) => I.utc < u - i;
|
|
3438
|
+
return await this.db.table(j.TOPICS).orderBy("utc").filter(f).modify((I, K) => {
|
|
3428
3439
|
delete K.value;
|
|
3429
|
-
}).catch((
|
|
3440
|
+
}).catch((I) => (console.error(
|
|
3430
3441
|
"%cstorage%c %clean",
|
|
3431
3442
|
E.STORAGE,
|
|
3432
3443
|
E.NONE,
|
|
3433
3444
|
E.MESSAGES,
|
|
3434
|
-
|
|
3435
|
-
), 0)), await this.db.table(j.MESSAGES).orderBy("utc").filter(k).modify((
|
|
3445
|
+
I
|
|
3446
|
+
), 0)), await this.db.table(j.MESSAGES).orderBy("utc").filter(k).modify((I, K) => {
|
|
3436
3447
|
delete K.value;
|
|
3437
|
-
}).catch((
|
|
3448
|
+
}).catch((I) => (console.error(
|
|
3438
3449
|
"%cstorage%c %clean",
|
|
3439
3450
|
E.STORAGE,
|
|
3440
3451
|
E.NONE,
|
|
3441
3452
|
E.MESSAGES,
|
|
3442
|
-
|
|
3453
|
+
I
|
|
3443
3454
|
), 0));
|
|
3444
3455
|
});
|
|
3445
|
-
|
|
3456
|
+
D(this, "hideMessage", async (i, u) => {
|
|
3446
3457
|
await this.db.table(j.TOPICS).where("message_id").equals(i).modify({ visible: u }).catch((f) => (console.error(
|
|
3447
3458
|
"%cstorage%c %chide",
|
|
3448
3459
|
E.STORAGE,
|
|
@@ -3456,7 +3467,7 @@ class Tr {
|
|
|
3456
3467
|
* @param query IQuery
|
|
3457
3468
|
* @returns number
|
|
3458
3469
|
*/
|
|
3459
|
-
|
|
3470
|
+
D(this, "setWidget", async (i) => await this.db.table(j.WIDGETS).put({
|
|
3460
3471
|
id: i.widget,
|
|
3461
3472
|
dashboard_id: i.dashboard,
|
|
3462
3473
|
type: i.type
|
|
@@ -3466,7 +3477,7 @@ class Tr {
|
|
|
3466
3477
|
* @param query IQuery
|
|
3467
3478
|
* @returns null
|
|
3468
3479
|
*/
|
|
3469
|
-
|
|
3480
|
+
D(this, "subscribe", (i) => (i = nt(i), this.subscribers.filter(
|
|
3470
3481
|
(f) => f.widget === i.widget
|
|
3471
3482
|
).length > 0 || (i.type === j.MESSAGES && (i = vt(this.options, i)), console.debug(
|
|
3472
3483
|
"%cstorage%c %csubscribe",
|
|
@@ -3480,7 +3491,7 @@ class Tr {
|
|
|
3480
3491
|
* Get current subscribers
|
|
3481
3492
|
* @returns IQuery[]
|
|
3482
3493
|
*/
|
|
3483
|
-
|
|
3494
|
+
D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
|
|
3484
3495
|
this.options = i, this.db = new Un(i.app), this.db.version(2).stores({
|
|
3485
3496
|
player: "id,title,name,location",
|
|
3486
3497
|
monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
|
|
@@ -3504,7 +3515,7 @@ function Pi(p, i) {
|
|
|
3504
3515
|
const u = indexedDB.open(p);
|
|
3505
3516
|
u.onupgradeneeded = () => u.result.createObjectStore(i);
|
|
3506
3517
|
const f = Wn(u);
|
|
3507
|
-
return (k,
|
|
3518
|
+
return (k, I) => f.then((K) => I(K.transaction(i, k).objectStore(i)));
|
|
3508
3519
|
}
|
|
3509
3520
|
let Gn;
|
|
3510
3521
|
function Mr() {
|
|
@@ -3518,17 +3529,17 @@ function Xt(p, i, u = Mr()) {
|
|
|
3518
3529
|
}
|
|
3519
3530
|
class jr {
|
|
3520
3531
|
constructor(i) {
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3532
|
+
D(this, "subscribers", []);
|
|
3533
|
+
D(this, "options");
|
|
3534
|
+
D(this, "getCloud", async (i) => {
|
|
3524
3535
|
const u = V(i);
|
|
3525
3536
|
return await Ln(u).then((f) => f).catch(() => (console.warn("%capi", E.API, j.CLOUD, i.slide, i.widget), { data: null, message: "Cloud Data error", success: !1 }));
|
|
3526
3537
|
});
|
|
3527
|
-
|
|
3538
|
+
D(this, "getSeries", async (i) => {
|
|
3528
3539
|
const u = V(i);
|
|
3529
3540
|
return await Ln(u).then((f) => f).catch(() => (console.warn("%capi", E.API, j.SERIES, i.slide, i.widget), { data: null, message: "Series Data error", success: !1 }));
|
|
3530
3541
|
});
|
|
3531
|
-
|
|
3542
|
+
D(this, "getMessages", async (i) => {
|
|
3532
3543
|
const u = V(i);
|
|
3533
3544
|
return await Ln(u).then((f) => f).catch(() => (console.warn("%capi", E.API, j.MESSAGES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 }));
|
|
3534
3545
|
});
|
|
@@ -3538,7 +3549,7 @@ class jr {
|
|
|
3538
3549
|
* @param data
|
|
3539
3550
|
* @returns number
|
|
3540
3551
|
*/
|
|
3541
|
-
|
|
3552
|
+
D(this, "setCloud", async (i, u) => {
|
|
3542
3553
|
if (!u.success)
|
|
3543
3554
|
return 400;
|
|
3544
3555
|
const f = V(i);
|
|
@@ -3550,7 +3561,7 @@ class jr {
|
|
|
3550
3561
|
* @param data
|
|
3551
3562
|
* @returns bumber
|
|
3552
3563
|
*/
|
|
3553
|
-
|
|
3564
|
+
D(this, "setSeries", async (i, u) => {
|
|
3554
3565
|
if (!u.success)
|
|
3555
3566
|
return 400;
|
|
3556
3567
|
const f = V(i);
|
|
@@ -3562,14 +3573,14 @@ class jr {
|
|
|
3562
3573
|
* @param data
|
|
3563
3574
|
* @returns number
|
|
3564
3575
|
*/
|
|
3565
|
-
|
|
3576
|
+
D(this, "setMessages", async (i, u) => {
|
|
3566
3577
|
if (!u.success)
|
|
3567
3578
|
return 400;
|
|
3568
3579
|
const f = V(i);
|
|
3569
3580
|
return delete u.success, delete u.message, await Xt(f, u).then(() => 201).catch((k) => (console.error("%cstorage", E.STORAGE, j.MESSAGES, i, k), 400));
|
|
3570
3581
|
});
|
|
3571
|
-
|
|
3572
|
-
|
|
3582
|
+
D(this, "cleanMessages", async (i) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((u) => u(0))));
|
|
3583
|
+
D(this, "hideMessage", async (i, u) => {
|
|
3573
3584
|
console.debug(`hideMessage ${i} ${u} not implemented for ${this.options.storage}`);
|
|
3574
3585
|
});
|
|
3575
3586
|
/**
|
|
@@ -3577,7 +3588,7 @@ class jr {
|
|
|
3577
3588
|
* @param query IQuery
|
|
3578
3589
|
* @returns number
|
|
3579
3590
|
*/
|
|
3580
|
-
|
|
3591
|
+
D(this, "setWidget", async (i) => {
|
|
3581
3592
|
const u = V(i), f = {
|
|
3582
3593
|
id: i.widget,
|
|
3583
3594
|
dashboard_id: i.dashboard,
|
|
@@ -3590,7 +3601,7 @@ class jr {
|
|
|
3590
3601
|
* @param query IQuery
|
|
3591
3602
|
* @returns null
|
|
3592
3603
|
*/
|
|
3593
|
-
|
|
3604
|
+
D(this, "subscribe", (i) => (i = nt(i), i.type === j.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
|
|
3594
3605
|
(f) => f.widget === i.widget
|
|
3595
3606
|
).length > 0 || (console.debug(
|
|
3596
3607
|
"%cstorage%c %csubscribe",
|
|
@@ -3604,15 +3615,15 @@ class jr {
|
|
|
3604
3615
|
* Get current subscribers
|
|
3605
3616
|
* @returns IQuery[]
|
|
3606
3617
|
*/
|
|
3607
|
-
|
|
3618
|
+
D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
|
|
3608
3619
|
this.options = i;
|
|
3609
3620
|
}
|
|
3610
3621
|
}
|
|
3611
3622
|
class Kr {
|
|
3612
3623
|
constructor(i) {
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3624
|
+
D(this, "subscribers", []);
|
|
3625
|
+
D(this, "options");
|
|
3626
|
+
D(this, "getCloud", async (i) => {
|
|
3616
3627
|
const u = V(i);
|
|
3617
3628
|
try {
|
|
3618
3629
|
return localStorage.getObject(u);
|
|
@@ -3620,7 +3631,7 @@ class Kr {
|
|
|
3620
3631
|
return console.warn("%capi", E.API, j.CLOUD, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3621
3632
|
}
|
|
3622
3633
|
});
|
|
3623
|
-
|
|
3634
|
+
D(this, "getSeries", async (i) => {
|
|
3624
3635
|
const u = V(i);
|
|
3625
3636
|
try {
|
|
3626
3637
|
return localStorage.getObject(u);
|
|
@@ -3628,7 +3639,7 @@ class Kr {
|
|
|
3628
3639
|
return console.warn("%capi", E.API, j.SERIES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3629
3640
|
}
|
|
3630
3641
|
});
|
|
3631
|
-
|
|
3642
|
+
D(this, "getMessages", async (i) => {
|
|
3632
3643
|
const u = V(i);
|
|
3633
3644
|
try {
|
|
3634
3645
|
return localStorage.getObject(u);
|
|
@@ -3642,7 +3653,7 @@ class Kr {
|
|
|
3642
3653
|
* @param data
|
|
3643
3654
|
* @returns number
|
|
3644
3655
|
*/
|
|
3645
|
-
|
|
3656
|
+
D(this, "setCloud", async (i, u) => {
|
|
3646
3657
|
const f = V(i);
|
|
3647
3658
|
try {
|
|
3648
3659
|
return localStorage.setObject(f, u), 201;
|
|
@@ -3656,7 +3667,7 @@ class Kr {
|
|
|
3656
3667
|
* @param data
|
|
3657
3668
|
* @returns number
|
|
3658
3669
|
*/
|
|
3659
|
-
|
|
3670
|
+
D(this, "setSeries", async (i, u) => {
|
|
3660
3671
|
const f = V(i);
|
|
3661
3672
|
try {
|
|
3662
3673
|
return localStorage.setObject(f, u), 201;
|
|
@@ -3670,7 +3681,7 @@ class Kr {
|
|
|
3670
3681
|
* @param data
|
|
3671
3682
|
* @returns number
|
|
3672
3683
|
*/
|
|
3673
|
-
|
|
3684
|
+
D(this, "setMessages", async (i, u) => {
|
|
3674
3685
|
const f = V(i);
|
|
3675
3686
|
try {
|
|
3676
3687
|
return localStorage.setObject(f, u), 200;
|
|
@@ -3678,11 +3689,11 @@ class Kr {
|
|
|
3678
3689
|
return console.error("%cstorage", E.STORAGE, j.MESSAGES, i, k), 400;
|
|
3679
3690
|
}
|
|
3680
3691
|
});
|
|
3681
|
-
|
|
3682
|
-
|
|
3692
|
+
D(this, "cleanMessages", async (i) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((u) => u(0))));
|
|
3693
|
+
D(this, "hideMessage", async (i, u) => {
|
|
3683
3694
|
console.debug(`hideMessage ${i} ${u} not implemented for ${this.options.storage}`);
|
|
3684
3695
|
});
|
|
3685
|
-
|
|
3696
|
+
D(this, "setWidget", async (i) => {
|
|
3686
3697
|
const u = `widget.${i.widget}`;
|
|
3687
3698
|
try {
|
|
3688
3699
|
return localStorage.setObject(u, i), 201;
|
|
@@ -3695,7 +3706,7 @@ class Kr {
|
|
|
3695
3706
|
* @param query IQuery
|
|
3696
3707
|
* @returns null
|
|
3697
3708
|
*/
|
|
3698
|
-
|
|
3709
|
+
D(this, "subscribe", (i) => (i = nt(i), i.type === j.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
|
|
3699
3710
|
(f) => f.widget === i.widget
|
|
3700
3711
|
).length || (console.debug(
|
|
3701
3712
|
"%cstorage%c %csubscribe",
|
|
@@ -3709,7 +3720,7 @@ class Kr {
|
|
|
3709
3720
|
* Get current subscribers
|
|
3710
3721
|
* @returns IQuery[]
|
|
3711
3722
|
*/
|
|
3712
|
-
|
|
3723
|
+
D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
|
|
3713
3724
|
this.options = i, Storage.prototype.setObject = function(u, f) {
|
|
3714
3725
|
this.setObject(u, JSON.stringify(f));
|
|
3715
3726
|
}, Storage.prototype.getObject = function(u) {
|
|
@@ -3718,11 +3729,11 @@ class Kr {
|
|
|
3718
3729
|
};
|
|
3719
3730
|
}
|
|
3720
3731
|
}
|
|
3721
|
-
class
|
|
3732
|
+
class Br {
|
|
3722
3733
|
constructor(i) {
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3734
|
+
D(this, "subscribers", []);
|
|
3735
|
+
D(this, "options");
|
|
3736
|
+
D(this, "getCloud", async (i) => {
|
|
3726
3737
|
const u = V(i);
|
|
3727
3738
|
try {
|
|
3728
3739
|
return sessionStorage.getObject(u);
|
|
@@ -3730,7 +3741,7 @@ class Nr {
|
|
|
3730
3741
|
return console.warn("%capi", E.API, j.CLOUD, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3731
3742
|
}
|
|
3732
3743
|
});
|
|
3733
|
-
|
|
3744
|
+
D(this, "getSeries", async (i) => {
|
|
3734
3745
|
const u = V(i);
|
|
3735
3746
|
try {
|
|
3736
3747
|
return sessionStorage.getObject(u);
|
|
@@ -3738,7 +3749,7 @@ class Nr {
|
|
|
3738
3749
|
return console.warn("%capi", E.API, j.SERIES, i.slide, i.widget), { data: null, message: "Messages Data error", success: !1 };
|
|
3739
3750
|
}
|
|
3740
3751
|
});
|
|
3741
|
-
|
|
3752
|
+
D(this, "getMessages", async (i) => {
|
|
3742
3753
|
const u = V(i);
|
|
3743
3754
|
try {
|
|
3744
3755
|
return sessionStorage.getObject(u);
|
|
@@ -3752,7 +3763,7 @@ class Nr {
|
|
|
3752
3763
|
* @param data
|
|
3753
3764
|
* @returns number
|
|
3754
3765
|
*/
|
|
3755
|
-
|
|
3766
|
+
D(this, "setCloud", async (i, u) => {
|
|
3756
3767
|
const f = V(i);
|
|
3757
3768
|
try {
|
|
3758
3769
|
return sessionStorage.setObject(f, u), 201;
|
|
@@ -3766,7 +3777,7 @@ class Nr {
|
|
|
3766
3777
|
* @param data
|
|
3767
3778
|
* @returns number
|
|
3768
3779
|
*/
|
|
3769
|
-
|
|
3780
|
+
D(this, "setSeries", async (i, u) => {
|
|
3770
3781
|
const f = V(i);
|
|
3771
3782
|
try {
|
|
3772
3783
|
return sessionStorage.setObject(f, u), 201;
|
|
@@ -3780,7 +3791,7 @@ class Nr {
|
|
|
3780
3791
|
* @param data
|
|
3781
3792
|
* @returns number
|
|
3782
3793
|
*/
|
|
3783
|
-
|
|
3794
|
+
D(this, "setMessages", async (i, u) => {
|
|
3784
3795
|
const f = V(i);
|
|
3785
3796
|
try {
|
|
3786
3797
|
return sessionStorage.setObject(f, u), 200;
|
|
@@ -3788,11 +3799,11 @@ class Nr {
|
|
|
3788
3799
|
return console.error("%cstorage", E.STORAGE, j.MESSAGES, i, k), 400;
|
|
3789
3800
|
}
|
|
3790
3801
|
});
|
|
3791
|
-
|
|
3792
|
-
|
|
3802
|
+
D(this, "cleanMessages", async (i) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((u) => u(0))));
|
|
3803
|
+
D(this, "hideMessage", async (i, u) => {
|
|
3793
3804
|
console.debug(`hideMessage ${i} ${u} not implemented for ${this.options.storage}`);
|
|
3794
3805
|
});
|
|
3795
|
-
|
|
3806
|
+
D(this, "setWidget", async (i) => {
|
|
3796
3807
|
const u = `widget.${i.widget}`;
|
|
3797
3808
|
try {
|
|
3798
3809
|
return sessionStorage.setObject(u, i), 201;
|
|
@@ -3805,7 +3816,7 @@ class Nr {
|
|
|
3805
3816
|
* @param query IQuery
|
|
3806
3817
|
* @returns null
|
|
3807
3818
|
*/
|
|
3808
|
-
|
|
3819
|
+
D(this, "subscribe", (i) => (i = nt(i), i.type === j.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
|
|
3809
3820
|
(f) => f.widget === i.widget
|
|
3810
3821
|
).length || (console.debug(
|
|
3811
3822
|
"%cstorage%c %csubscribe",
|
|
@@ -3819,7 +3830,7 @@ class Nr {
|
|
|
3819
3830
|
* Get current subscribers
|
|
3820
3831
|
* @returns IQuery[]
|
|
3821
3832
|
*/
|
|
3822
|
-
|
|
3833
|
+
D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
|
|
3823
3834
|
this.options = i, Storage.prototype.setObject = function(u, f) {
|
|
3824
3835
|
this.setItem(u, JSON.stringify(f));
|
|
3825
3836
|
}, Storage.prototype.getObject = function(u) {
|
|
@@ -3828,11 +3839,11 @@ class Nr {
|
|
|
3828
3839
|
};
|
|
3829
3840
|
}
|
|
3830
3841
|
}
|
|
3831
|
-
class
|
|
3842
|
+
class Nr {
|
|
3832
3843
|
constructor(i) {
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3844
|
+
D(this, "subscribers", []);
|
|
3845
|
+
D(this, "options");
|
|
3846
|
+
D(this, "getCloud", async (i) => {
|
|
3836
3847
|
const u = V(i);
|
|
3837
3848
|
try {
|
|
3838
3849
|
return window.BuzzCasting.WidgetData[u];
|
|
@@ -3840,7 +3851,7 @@ class Br {
|
|
|
3840
3851
|
return console.warn("%capi", E.API, j.CLOUD, i.slide, i.widget), { data: null, message: "Cloud Data error", success: !1 };
|
|
3841
3852
|
}
|
|
3842
3853
|
});
|
|
3843
|
-
|
|
3854
|
+
D(this, "getSeries", async (i) => {
|
|
3844
3855
|
const u = V(i);
|
|
3845
3856
|
try {
|
|
3846
3857
|
return window.BuzzCasting.WidgetData[u];
|
|
@@ -3848,7 +3859,7 @@ class Br {
|
|
|
3848
3859
|
return console.warn("%capi", E.API, j.SERIES, i.slide, i.widget), { data: null, message: "Series Data error", success: !1 };
|
|
3849
3860
|
}
|
|
3850
3861
|
});
|
|
3851
|
-
|
|
3862
|
+
D(this, "getMessages", async (i) => {
|
|
3852
3863
|
const u = V(i);
|
|
3853
3864
|
try {
|
|
3854
3865
|
return window.BuzzCasting.WidgetData[u];
|
|
@@ -3862,7 +3873,7 @@ class Br {
|
|
|
3862
3873
|
* @param data
|
|
3863
3874
|
* @returns number
|
|
3864
3875
|
*/
|
|
3865
|
-
|
|
3876
|
+
D(this, "setCloud", async (i, u) => {
|
|
3866
3877
|
const f = V(i);
|
|
3867
3878
|
try {
|
|
3868
3879
|
return window.BuzzCasting.WidgetData[f] = u, 201;
|
|
@@ -3876,7 +3887,7 @@ class Br {
|
|
|
3876
3887
|
* @param data
|
|
3877
3888
|
* @returns number
|
|
3878
3889
|
*/
|
|
3879
|
-
|
|
3890
|
+
D(this, "setSeries", async (i, u) => {
|
|
3880
3891
|
const f = V(i);
|
|
3881
3892
|
try {
|
|
3882
3893
|
return window.BuzzCasting.WidgetData[f] = u, 201;
|
|
@@ -3890,7 +3901,7 @@ class Br {
|
|
|
3890
3901
|
* @param data
|
|
3891
3902
|
* @returns number
|
|
3892
3903
|
*/
|
|
3893
|
-
|
|
3904
|
+
D(this, "setMessages", async (i, u) => {
|
|
3894
3905
|
const f = V(i);
|
|
3895
3906
|
try {
|
|
3896
3907
|
return window.BuzzCasting.WidgetData[f] = u, 201;
|
|
@@ -3898,11 +3909,11 @@ class Br {
|
|
|
3898
3909
|
return console.error("%cstorage", E.STORAGE, "set", i, k), 400;
|
|
3899
3910
|
}
|
|
3900
3911
|
});
|
|
3901
|
-
|
|
3902
|
-
|
|
3912
|
+
D(this, "cleanMessages", async (i) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((u) => u(0))));
|
|
3913
|
+
D(this, "hideMessage", async (i, u) => {
|
|
3903
3914
|
console.debug(`hideMessage ${i} ${u} not implemented for ${this.options.storage}`);
|
|
3904
3915
|
});
|
|
3905
|
-
|
|
3916
|
+
D(this, "setWidget", async (i) => {
|
|
3906
3917
|
const u = `widget.${i.widget}`;
|
|
3907
3918
|
try {
|
|
3908
3919
|
return window.BuzzCasting.WidgetData[u] = i, 201;
|
|
@@ -3915,7 +3926,7 @@ class Br {
|
|
|
3915
3926
|
* @param query IQuery
|
|
3916
3927
|
* @returns null
|
|
3917
3928
|
*/
|
|
3918
|
-
|
|
3929
|
+
D(this, "subscribe", (i) => (i = nt(i), i.type === j.MESSAGES && (i = vt(this.options, i)), this.subscribers.filter(
|
|
3919
3930
|
(f) => f.widget === i.widget
|
|
3920
3931
|
).length || (console.debug(
|
|
3921
3932
|
"%cstorage%c %csubscribe",
|
|
@@ -3929,17 +3940,17 @@ class Br {
|
|
|
3929
3940
|
* Get current subscribers
|
|
3930
3941
|
* @returns IQuery[]
|
|
3931
3942
|
*/
|
|
3932
|
-
|
|
3943
|
+
D(this, "getSubscribers", async () => await new Promise((i) => i(this.subscribers)));
|
|
3933
3944
|
this.options = i, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
|
|
3934
3945
|
}
|
|
3935
3946
|
}
|
|
3936
|
-
function
|
|
3947
|
+
function Bi(p) {
|
|
3937
3948
|
const i = p.toUpperCase().split(/[\s_-]+/);
|
|
3938
3949
|
return i.length > 0 ? (i.forEach((u, f) => {
|
|
3939
3950
|
i[f] = `${u.charAt(0)}.`;
|
|
3940
3951
|
}), i.join(" ")) : "";
|
|
3941
3952
|
}
|
|
3942
|
-
function
|
|
3953
|
+
function Ni(p) {
|
|
3943
3954
|
let i = "", u = "", f = {
|
|
3944
3955
|
backgroundImage: ""
|
|
3945
3956
|
};
|
|
@@ -3953,7 +3964,7 @@ function Bi(p) {
|
|
|
3953
3964
|
video: i
|
|
3954
3965
|
};
|
|
3955
3966
|
}
|
|
3956
|
-
function
|
|
3967
|
+
function Ci(p) {
|
|
3957
3968
|
const i = {};
|
|
3958
3969
|
for (let u = 0; u < p.length; u++) {
|
|
3959
3970
|
const f = p.item(u);
|
|
@@ -4017,7 +4028,7 @@ function Fi(p) {
|
|
|
4017
4028
|
function $i(p) {
|
|
4018
4029
|
return p.toLowerCase().split("-").reduce((i, u) => i + (u.charAt(0).toUpperCase() + u.slice(1)));
|
|
4019
4030
|
}
|
|
4020
|
-
function
|
|
4031
|
+
function Ii(p) {
|
|
4021
4032
|
const i = document.createRange();
|
|
4022
4033
|
i.selectNodeContents(p), i.deleteContents();
|
|
4023
4034
|
}
|
|
@@ -4040,8 +4051,8 @@ function Oe(p, i) {
|
|
|
4040
4051
|
}
|
|
4041
4052
|
function Ti(p, i, u) {
|
|
4042
4053
|
return Object.keys(i).sort().reduce(f, p);
|
|
4043
|
-
function f(k,
|
|
4044
|
-
return Gr(k, i[
|
|
4054
|
+
function f(k, I) {
|
|
4055
|
+
return Gr(k, i[I], I, u);
|
|
4045
4056
|
}
|
|
4046
4057
|
}
|
|
4047
4058
|
function Gr(p, i, u, f) {
|
|
@@ -4054,13 +4065,13 @@ function Gr(p, i, u, f) {
|
|
|
4054
4065
|
if (f.includes(i))
|
|
4055
4066
|
return Oe(k, `[Circular]${u}`);
|
|
4056
4067
|
f.push(i);
|
|
4057
|
-
const
|
|
4068
|
+
const I = Ti(k, i, f);
|
|
4058
4069
|
if (!("valueOf" in i) || typeof i.valueOf != "function")
|
|
4059
|
-
return
|
|
4070
|
+
return I;
|
|
4060
4071
|
try {
|
|
4061
|
-
return Oe(
|
|
4072
|
+
return Oe(I, String(i.valueOf()));
|
|
4062
4073
|
} catch (K) {
|
|
4063
|
-
return Oe(
|
|
4074
|
+
return Oe(I, `[valueOf exception]${K.stack || K.message}`);
|
|
4064
4075
|
}
|
|
4065
4076
|
}
|
|
4066
4077
|
return Oe(k, i.toString());
|
|
@@ -4117,8 +4128,8 @@ function Yi(p) {
|
|
|
4117
4128
|
return p.forEach((i) => {
|
|
4118
4129
|
var u, f, k;
|
|
4119
4130
|
if (i.content = i.content.replace(/(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)((\?.*)?)/g, ""), i.sender !== null ? (((u = i.sender) == null ? void 0 : u.title) === "Unknown author" && (i.sender.title = ""), ((f = i.sender) == null ? void 0 : f.name) !== "" && i.sender.title === "" && (i.sender.title = i.sender.name), ((k = i.sender) == null ? void 0 : k.name) !== "" && i.channel === "tw" && (i.sender.name = `@${i.sender.name}`)) : i.sender = { title: "", name: "", id: "", avatar: "default", bio: "", location: "", following: 0, verified: 0, listed: 0, followers: 0, favourites: 0, messages: 0, influence: 0 }, i.sender.title === "" && i.link !== "") {
|
|
4120
|
-
const
|
|
4121
|
-
i.sender.title =
|
|
4131
|
+
const I = new URL(i.link);
|
|
4132
|
+
i.sender.title = I.hostname.replace("www.", "");
|
|
4122
4133
|
}
|
|
4123
4134
|
}), p;
|
|
4124
4135
|
}
|
|
@@ -4132,11 +4143,11 @@ function Qi(p) {
|
|
|
4132
4143
|
}
|
|
4133
4144
|
class Xi {
|
|
4134
4145
|
constructor(i) {
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4146
|
+
D(this, "sm");
|
|
4147
|
+
D(this, "api");
|
|
4148
|
+
D(this, "bc");
|
|
4149
|
+
D(this, "options");
|
|
4150
|
+
D(this, "update", async (i) => {
|
|
4140
4151
|
if (this.sm === null)
|
|
4141
4152
|
return;
|
|
4142
4153
|
const u = await this.sm.getSubscribers();
|
|
@@ -4146,52 +4157,52 @@ class Xi {
|
|
|
4146
4157
|
i ? f.push(this.api.get(i)) : u == null || u.forEach((k) => {
|
|
4147
4158
|
f.push(this.api.get(k));
|
|
4148
4159
|
}), await Promise.allSettled(f).then(
|
|
4149
|
-
(k) => k.forEach(async (
|
|
4160
|
+
(k) => k.forEach(async (I) => {
|
|
4150
4161
|
let K = 400;
|
|
4151
|
-
if (
|
|
4152
|
-
const
|
|
4162
|
+
if (I.status === "fulfilled") {
|
|
4163
|
+
const N = I.value;
|
|
4153
4164
|
if (this.sm === null)
|
|
4154
4165
|
return 400;
|
|
4155
|
-
if (
|
|
4166
|
+
if (N.success === !0) {
|
|
4156
4167
|
const Z = this.sm.subscribers.filter(
|
|
4157
|
-
(be) => be.widget ===
|
|
4168
|
+
(be) => be.widget === N.query.widget
|
|
4158
4169
|
)[0];
|
|
4159
4170
|
let te = "";
|
|
4160
|
-
switch (
|
|
4171
|
+
switch (N.query.type) {
|
|
4161
4172
|
case j.MESSAGES:
|
|
4162
|
-
if (te = Fn(
|
|
4173
|
+
if (te = Fn(N.data.messages), Z.hash === te)
|
|
4163
4174
|
return console.debug(
|
|
4164
4175
|
"%capi%c %cno updates",
|
|
4165
4176
|
E.API,
|
|
4166
4177
|
E.NONE,
|
|
4167
4178
|
E.NO_UPDATES,
|
|
4168
4179
|
j.MESSAGES,
|
|
4169
|
-
|
|
4170
|
-
|
|
4180
|
+
N.query.slide,
|
|
4181
|
+
N.query.widget
|
|
4171
4182
|
), 204;
|
|
4172
|
-
Z.hash = te, K = await this.sm.setMessages(
|
|
4183
|
+
Z.hash = te, K = await this.sm.setMessages(N.query, N);
|
|
4173
4184
|
break;
|
|
4174
4185
|
case j.CLOUD:
|
|
4175
|
-
te = Fn(
|
|
4186
|
+
te = Fn(N.data), Z.hash === te ? (console.debug(
|
|
4176
4187
|
"%capi%c %cno updates",
|
|
4177
4188
|
E.API,
|
|
4178
4189
|
E.NONE,
|
|
4179
4190
|
E.NO_UPDATES,
|
|
4180
4191
|
j.CLOUD,
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
), K = 204) : (Z.hash = te, K = await this.sm.setCloud(
|
|
4192
|
+
N.query.slide,
|
|
4193
|
+
N.query.widget
|
|
4194
|
+
), K = 204) : (Z.hash = te, K = await this.sm.setCloud(N.query, N));
|
|
4184
4195
|
break;
|
|
4185
4196
|
case j.SERIES:
|
|
4186
|
-
te = Fn(
|
|
4197
|
+
te = Fn(N.data), Z.hash === te ? (console.debug(
|
|
4187
4198
|
"%capi%c %cno updates",
|
|
4188
4199
|
E.API,
|
|
4189
4200
|
E.NONE,
|
|
4190
4201
|
E.NO_UPDATES,
|
|
4191
4202
|
j.SERIES,
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
), K = 204) : (Z.hash = te, K = await this.sm.setSeries(
|
|
4203
|
+
N.query.slide,
|
|
4204
|
+
N.query.widget
|
|
4205
|
+
), K = 204) : (Z.hash = te, K = await this.sm.setSeries(N.query, N));
|
|
4195
4206
|
break;
|
|
4196
4207
|
default:
|
|
4197
4208
|
console.warn(
|
|
@@ -4200,7 +4211,7 @@ class Xi {
|
|
|
4200
4211
|
E.NONE,
|
|
4201
4212
|
E.STORAGE,
|
|
4202
4213
|
"error",
|
|
4203
|
-
`data type ${
|
|
4214
|
+
`data type ${N.query.type} unknown`
|
|
4204
4215
|
);
|
|
4205
4216
|
}
|
|
4206
4217
|
} else
|
|
@@ -4212,9 +4223,9 @@ class Xi {
|
|
|
4212
4223
|
E.API,
|
|
4213
4224
|
E.NONE,
|
|
4214
4225
|
E.BROADCAST,
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
), this.bc.postMessage({ event: se.WIDGET_UPDATE, data:
|
|
4226
|
+
N.query.slide,
|
|
4227
|
+
N.data.title ?? N.query.widget
|
|
4228
|
+
), this.bc.postMessage({ event: se.WIDGET_UPDATE, data: N });
|
|
4218
4229
|
break;
|
|
4219
4230
|
case 400:
|
|
4220
4231
|
console.warn(
|
|
@@ -4222,8 +4233,8 @@ class Xi {
|
|
|
4222
4233
|
E.API,
|
|
4223
4234
|
E.NONE,
|
|
4224
4235
|
E.BROADCAST,
|
|
4225
|
-
|
|
4226
|
-
|
|
4236
|
+
N.query.slide,
|
|
4237
|
+
N.data.title ?? N.query.widget
|
|
4227
4238
|
);
|
|
4228
4239
|
break;
|
|
4229
4240
|
}
|
|
@@ -4239,10 +4250,10 @@ class Xi {
|
|
|
4239
4250
|
})
|
|
4240
4251
|
);
|
|
4241
4252
|
});
|
|
4242
|
-
|
|
4253
|
+
D(this, "hide", (i) => {
|
|
4243
4254
|
this.api.hideMessage(i);
|
|
4244
4255
|
});
|
|
4245
|
-
|
|
4256
|
+
D(this, "actions", async (i) => {
|
|
4246
4257
|
var u;
|
|
4247
4258
|
switch (i.data.event) {
|
|
4248
4259
|
case se.SUBSCRIBE:
|
|
@@ -4260,7 +4271,7 @@ class Xi {
|
|
|
4260
4271
|
break;
|
|
4261
4272
|
}
|
|
4262
4273
|
});
|
|
4263
|
-
|
|
4274
|
+
D(this, "cleanMessages", async () => {
|
|
4264
4275
|
var f, k;
|
|
4265
4276
|
const i = ((f = this.options) == null ? void 0 : f.retention) || 345600, u = await ((k = this.sm) == null ? void 0 : k.cleanMessages(i));
|
|
4266
4277
|
console.info(
|
|
@@ -4271,7 +4282,7 @@ class Xi {
|
|
|
4271
4282
|
`${u} messages deleted`
|
|
4272
4283
|
);
|
|
4273
4284
|
});
|
|
4274
|
-
|
|
4285
|
+
D(this, "hideMessage", async (i) => {
|
|
4275
4286
|
var f;
|
|
4276
4287
|
const u = await ((f = this.sm) == null ? void 0 : f.hideMessage(i.id, 0));
|
|
4277
4288
|
return console.info(
|
|
@@ -4282,8 +4293,8 @@ class Xi {
|
|
|
4282
4293
|
`${u} messages hidden`
|
|
4283
4294
|
), await this.api.hideMessage(i);
|
|
4284
4295
|
});
|
|
4285
|
-
|
|
4286
|
-
|
|
4296
|
+
D(this, "hideLabels", async (i) => await this.api.hideLabels(i));
|
|
4297
|
+
D(this, "getSubscribers", async () => {
|
|
4287
4298
|
var i;
|
|
4288
4299
|
return await ((i = this.sm) == null ? void 0 : i.getSubscribers());
|
|
4289
4300
|
});
|
|
@@ -4311,7 +4322,7 @@ class Xi {
|
|
|
4311
4322
|
this.sm = new Tr(i);
|
|
4312
4323
|
break;
|
|
4313
4324
|
case he.LOCAL:
|
|
4314
|
-
this.sm = new
|
|
4325
|
+
this.sm = new Br(i);
|
|
4315
4326
|
break;
|
|
4316
4327
|
case he.SESSION:
|
|
4317
4328
|
this.sm = new Kr(i);
|
|
@@ -4320,20 +4331,20 @@ class Xi {
|
|
|
4320
4331
|
this.sm = new jr(i);
|
|
4321
4332
|
break;
|
|
4322
4333
|
case he.WINDOW:
|
|
4323
|
-
this.sm = new
|
|
4334
|
+
this.sm = new Nr(i);
|
|
4324
4335
|
break;
|
|
4325
4336
|
}
|
|
4326
4337
|
}
|
|
4327
4338
|
}
|
|
4328
4339
|
class ji {
|
|
4329
4340
|
constructor(i) {
|
|
4330
|
-
|
|
4341
|
+
D(this, "sm");
|
|
4331
4342
|
/**
|
|
4332
4343
|
* Retieve Cloud Data
|
|
4333
4344
|
* @param query Widgets parameters, type "cloud"
|
|
4334
4345
|
* @returns IResponse
|
|
4335
4346
|
*/
|
|
4336
|
-
|
|
4347
|
+
D(this, "getCloud", async (i) => {
|
|
4337
4348
|
var u;
|
|
4338
4349
|
return i.type !== j.CLOUD ? (console.warn(
|
|
4339
4350
|
"%capp%c %get",
|
|
@@ -4354,7 +4365,7 @@ class ji {
|
|
|
4354
4365
|
* @param query Widgets parameters, type "messages"
|
|
4355
4366
|
* @returns IResponse
|
|
4356
4367
|
*/
|
|
4357
|
-
|
|
4368
|
+
D(this, "getMessages", async (i) => {
|
|
4358
4369
|
var u;
|
|
4359
4370
|
return i.type !== j.MESSAGES ? (console.warn(
|
|
4360
4371
|
"%capp%c %get",
|
|
@@ -4375,7 +4386,7 @@ class ji {
|
|
|
4375
4386
|
* @param query Widgets parameters, type "series"
|
|
4376
4387
|
* @returns IResponse
|
|
4377
4388
|
*/
|
|
4378
|
-
|
|
4389
|
+
D(this, "getSeries", async (i) => {
|
|
4379
4390
|
var u;
|
|
4380
4391
|
return i.type !== j.SERIES ? (console.warn(
|
|
4381
4392
|
"%capp%c %get",
|
|
@@ -4396,7 +4407,7 @@ class ji {
|
|
|
4396
4407
|
this.sm = new Tr(i);
|
|
4397
4408
|
break;
|
|
4398
4409
|
case he.LOCAL:
|
|
4399
|
-
this.sm = new
|
|
4410
|
+
this.sm = new Br(i);
|
|
4400
4411
|
break;
|
|
4401
4412
|
case he.SESSION:
|
|
4402
4413
|
this.sm = new Kr(i);
|
|
@@ -4405,7 +4416,7 @@ class ji {
|
|
|
4405
4416
|
this.sm = new jr(i);
|
|
4406
4417
|
break;
|
|
4407
4418
|
case he.WINDOW:
|
|
4408
|
-
this.sm = new
|
|
4419
|
+
this.sm = new Nr(i);
|
|
4409
4420
|
break;
|
|
4410
4421
|
}
|
|
4411
4422
|
}
|
|
@@ -4419,17 +4430,17 @@ class Vi {
|
|
|
4419
4430
|
* @param selector container for the element - by default buzzcasting-slide (optional)
|
|
4420
4431
|
*/
|
|
4421
4432
|
constructor(i, u, f) {
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4433
|
+
D(this, "storageReader");
|
|
4434
|
+
D(this, "broadcastChannel");
|
|
4435
|
+
D(this, "element");
|
|
4436
|
+
D(this, "query");
|
|
4437
|
+
D(this, "listeners");
|
|
4427
4438
|
/**
|
|
4428
4439
|
* Generic call to any query type
|
|
4429
4440
|
*
|
|
4430
4441
|
* @returns IResponse
|
|
4431
4442
|
*/
|
|
4432
|
-
|
|
4443
|
+
D(this, "getData", async () => {
|
|
4433
4444
|
switch (this.query.type) {
|
|
4434
4445
|
case j.CLOUD:
|
|
4435
4446
|
return await this.getCloud();
|
|
@@ -4449,7 +4460,7 @@ class Vi {
|
|
|
4449
4460
|
*
|
|
4450
4461
|
* @returns IResponse
|
|
4451
4462
|
*/
|
|
4452
|
-
|
|
4463
|
+
D(this, "getCloud", async () => this.query.type !== j.CLOUD ? (console.warn(
|
|
4453
4464
|
"%cstorage%c %cwidget",
|
|
4454
4465
|
E.STORAGE,
|
|
4455
4466
|
E.NONE,
|
|
@@ -4467,7 +4478,7 @@ class Vi {
|
|
|
4467
4478
|
*
|
|
4468
4479
|
* @returns IResponse
|
|
4469
4480
|
*/
|
|
4470
|
-
|
|
4481
|
+
D(this, "getMessages", async () => this.query.type !== j.MESSAGES ? (console.warn(
|
|
4471
4482
|
"%cstorage%c %cwidget",
|
|
4472
4483
|
E.STORAGE,
|
|
4473
4484
|
E.NONE,
|
|
@@ -4485,7 +4496,7 @@ class Vi {
|
|
|
4485
4496
|
*
|
|
4486
4497
|
* @returns IResponse
|
|
4487
4498
|
*/
|
|
4488
|
-
|
|
4499
|
+
D(this, "getSeries", async () => this.query.type !== j.SERIES ? (console.warn(
|
|
4489
4500
|
"%cstorage%c %cwidget",
|
|
4490
4501
|
E.STORAGE,
|
|
4491
4502
|
E.NONE,
|
|
@@ -4504,11 +4515,11 @@ class Vi {
|
|
|
4504
4515
|
*
|
|
4505
4516
|
* @param modal IModal
|
|
4506
4517
|
*/
|
|
4507
|
-
|
|
4508
|
-
const u =
|
|
4518
|
+
D(this, "showModal", (i) => {
|
|
4519
|
+
const u = Ci(this.element.attributes);
|
|
4509
4520
|
if (Object.prototype.hasOwnProperty.call(u, "data-topics")) {
|
|
4510
|
-
const
|
|
4511
|
-
|
|
4521
|
+
const I = u["data-topics"].split("-");
|
|
4522
|
+
I.length > 1 ? (u["data-widget"] = I[1], u["data-dashboard"] = I[0]) : (u["data-widget"] = I[0], u["data-dashboard"] = this.query.slide);
|
|
4512
4523
|
}
|
|
4513
4524
|
const f = { ...i.props, ...u };
|
|
4514
4525
|
console.debug(
|
|
@@ -4534,9 +4545,9 @@ class Vi {
|
|
|
4534
4545
|
var K;
|
|
4535
4546
|
this.element = i, this.listeners = u, f = typeof f < "u" ? f : "buzzcasting-slide";
|
|
4536
4547
|
let k;
|
|
4537
|
-
k = { ...i.dataset }, delete k.hmr, k.slide = ((K = i.closest(f.toUpperCase())) == null ? void 0 : K.id) ?? `${f} not found`, k = nt(k), this.query = k,
|
|
4538
|
-
const
|
|
4539
|
-
this.storageReader = new ji(
|
|
4548
|
+
k = { ...i.dataset }, delete k.hmr, k.slide = ((K = i.closest(f.toUpperCase())) == null ? void 0 : K.id) ?? `${f} not found`, k = nt(k), this.query = k, Ii(i);
|
|
4549
|
+
const I = window.BuzzCasting.getOptions();
|
|
4550
|
+
this.storageReader = new ji(I), this.broadcastChannel = new BroadcastChannel(k.slide), this.startListener();
|
|
4540
4551
|
}
|
|
4541
4552
|
addListener(i) {
|
|
4542
4553
|
this.listeners.push(i);
|
|
@@ -4590,13 +4601,13 @@ export {
|
|
|
4590
4601
|
Vt as MODERATION,
|
|
4591
4602
|
he as STORAGE,
|
|
4592
4603
|
Vi as Widget,
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4604
|
+
Bi as anonymize,
|
|
4605
|
+
Ni as attachedMedia,
|
|
4606
|
+
Ci as attrs,
|
|
4596
4607
|
Li as brandLogo,
|
|
4597
4608
|
$i as camelCase,
|
|
4598
4609
|
Fi as camelize,
|
|
4599
|
-
|
|
4610
|
+
Ii as clearContents,
|
|
4600
4611
|
Gi as filterAttributes,
|
|
4601
4612
|
Ui as formatContent,
|
|
4602
4613
|
Wi as intToString,
|