buzzcasting-storage 2.11.2 → 2.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buzzcasting-storage.d.ts +10 -0
- package/dist/buzzcasting-storage.esm.js +738 -685
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ei = Object.defineProperty;
|
|
2
|
-
var Oi = (
|
|
3
|
-
var P = (
|
|
4
|
-
const xi = "2.11.
|
|
2
|
+
var Oi = (b, o, l) => o in b ? Ei(b, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : b[o] = l;
|
|
3
|
+
var P = (b, o, l) => (Oi(b, typeof o != "symbol" ? o + "" : o, l), l);
|
|
4
|
+
const xi = "2.11.3";
|
|
5
5
|
class ki {
|
|
6
6
|
constructor(o) {
|
|
7
7
|
P(this, "options");
|
|
@@ -19,9 +19,9 @@ class ki {
|
|
|
19
19
|
this.options = o, this.url = `https://${o.app}.buzzcasting.net`;
|
|
20
20
|
}
|
|
21
21
|
async get(o) {
|
|
22
|
-
const { version: l } = this.options, y = this.headers(),
|
|
23
|
-
delete
|
|
24
|
-
const R = Object.keys(
|
|
22
|
+
const { version: l } = this.options, y = this.headers(), C = Object.assign({}, o);
|
|
23
|
+
delete C.slide, delete C.type, delete C.hash;
|
|
24
|
+
const R = Object.keys(C).length > 0 ? `?${new URLSearchParams(C).toString()}` : "";
|
|
25
25
|
return console.debug(
|
|
26
26
|
"%capi%c %cget",
|
|
27
27
|
x.API,
|
|
@@ -39,7 +39,7 @@ class ki {
|
|
|
39
39
|
}).then((B) => B.json()).then((B) => (B.query = o, B)).catch((B) => ({ success: !1, message: `${B}`, data: null }));
|
|
40
40
|
}
|
|
41
41
|
async hideMessage(o) {
|
|
42
|
-
const { version: l } = this.options, y = this.headers(),
|
|
42
|
+
const { version: l } = this.options, y = this.headers(), C = "?action=visible";
|
|
43
43
|
return console.info(
|
|
44
44
|
"%capi%c %cput",
|
|
45
45
|
x.API,
|
|
@@ -49,7 +49,7 @@ class ki {
|
|
|
49
49
|
o.widget,
|
|
50
50
|
o.id
|
|
51
51
|
), await fetch(
|
|
52
|
-
[this.url, "api", l, o.type, o.id].join("/") +
|
|
52
|
+
[this.url, "api", l, o.type, o.id].join("/") + C,
|
|
53
53
|
{ ...y, method: "put" }
|
|
54
54
|
).then((R) => {
|
|
55
55
|
if (!R.ok)
|
|
@@ -58,7 +58,7 @@ class ki {
|
|
|
58
58
|
}).then((R) => R.json()).catch((R) => ({ succes: !1, message: R, data: [] }));
|
|
59
59
|
}
|
|
60
60
|
async hideLabels(o) {
|
|
61
|
-
const { version: l } = this.options, y = this.headers(),
|
|
61
|
+
const { version: l } = this.options, y = this.headers(), C = JSON.stringify(o.labels);
|
|
62
62
|
return console.info(
|
|
63
63
|
"%capi%c %cput",
|
|
64
64
|
x.API,
|
|
@@ -66,10 +66,10 @@ class ki {
|
|
|
66
66
|
x.GET_DATA,
|
|
67
67
|
se.HIDE_LABELS,
|
|
68
68
|
o.widget,
|
|
69
|
-
|
|
69
|
+
C
|
|
70
70
|
), await fetch(
|
|
71
71
|
[this.url, "api", l, o.type, o.widget].join("/"),
|
|
72
|
-
{ ...y, body:
|
|
72
|
+
{ ...y, body: C, method: "put" }
|
|
73
73
|
).then((R) => {
|
|
74
74
|
if (!R.ok)
|
|
75
75
|
throw new Error(R.statusText);
|
|
@@ -77,15 +77,15 @@ class ki {
|
|
|
77
77
|
}).then((R) => R.json()).catch((R) => ({ succes: !1, message: R, data: [] }));
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
var
|
|
81
|
-
function Ai(
|
|
82
|
-
return
|
|
80
|
+
var Cr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
81
|
+
function Ai(b) {
|
|
82
|
+
return b && b.__esModule && Object.prototype.hasOwnProperty.call(b, "default") ? b.default : b;
|
|
83
83
|
}
|
|
84
84
|
var Rr = { exports: {} };
|
|
85
|
-
(function(
|
|
85
|
+
(function(b, o) {
|
|
86
86
|
(function(l, y) {
|
|
87
|
-
|
|
88
|
-
})(
|
|
87
|
+
b.exports = y();
|
|
88
|
+
})(Cr, function() {
|
|
89
89
|
var l = function(e, t) {
|
|
90
90
|
return (l = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
91
91
|
n.__proto__ = r;
|
|
@@ -101,13 +101,13 @@ var Rr = { exports: {} };
|
|
|
101
101
|
return e;
|
|
102
102
|
}).apply(this, arguments);
|
|
103
103
|
};
|
|
104
|
-
function
|
|
104
|
+
function C(e, t, n) {
|
|
105
105
|
if (n || arguments.length === 2)
|
|
106
106
|
for (var r, i = 0, a = t.length; i < a; i++)
|
|
107
107
|
!r && i in t || ((r = r || Array.prototype.slice.call(t, 0, i))[i] = t[i]);
|
|
108
108
|
return e.concat(r || Array.prototype.slice.call(t));
|
|
109
109
|
}
|
|
110
|
-
var R = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window :
|
|
110
|
+
var R = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Cr, B = Object.keys, N = Array.isArray;
|
|
111
111
|
function Z(e, t) {
|
|
112
112
|
return typeof t != "object" || B(t).forEach(function(n) {
|
|
113
113
|
e[n] = t[n];
|
|
@@ -123,11 +123,11 @@ var Rr = { exports: {} };
|
|
|
123
123
|
ke(e, n, t[n]);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
var
|
|
126
|
+
var zn = Object.defineProperty;
|
|
127
127
|
function ke(e, t, n, r) {
|
|
128
|
-
|
|
128
|
+
zn(e, t, Z(n && ie(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, r));
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function ze(e) {
|
|
131
131
|
return { from: function(t) {
|
|
132
132
|
return e.prototype = Object.create(t.prototype), ke(e.prototype, "constructor", e), { extend: xe.bind(null, e.prototype) };
|
|
133
133
|
} };
|
|
@@ -164,15 +164,15 @@ var Rr = { exports: {} };
|
|
|
164
164
|
return u == null ? void 0 : ve(u, t.substr(s + 1));
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function fe(e, t, n) {
|
|
168
168
|
if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e)))
|
|
169
169
|
if (typeof t != "string" && "length" in t) {
|
|
170
170
|
rt(typeof n != "string" && "length" in n);
|
|
171
171
|
for (var r = 0, i = t.length; r < i; ++r)
|
|
172
|
-
|
|
172
|
+
fe(e, t[r], n[r]);
|
|
173
173
|
} else {
|
|
174
174
|
var a, s, u = t.indexOf(".");
|
|
175
|
-
u !== -1 ? (a = t.substr(0, u), (s = t.substr(u + 1)) === "" ? n === void 0 ? N(e) && !isNaN(parseInt(a)) ? e.splice(a, 1) : delete e[a] : e[a] = n :
|
|
175
|
+
u !== -1 ? (a = t.substr(0, u), (s = t.substr(u + 1)) === "" ? n === void 0 ? N(e) && !isNaN(parseInt(a)) ? e.splice(a, 1) : delete e[a] : e[a] = n : fe(u = !(u = e[a]) || !ie(e, a) ? e[a] = {} : u, s, n)) : n === void 0 ? N(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
function Qn(e) {
|
|
@@ -215,11 +215,11 @@ var Rr = { exports: {} };
|
|
|
215
215
|
return r;
|
|
216
216
|
}(e), it = null, e;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
218
|
+
var $r = {}.toString;
|
|
219
219
|
function Jt(e) {
|
|
220
|
-
return
|
|
220
|
+
return $r.call(e).slice(8, -1);
|
|
221
221
|
}
|
|
222
|
-
var Zt = typeof Symbol < "u" ? Symbol.iterator : "@@iterator",
|
|
222
|
+
var Zt = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", Wr = typeof Zt == "symbol" ? function(e) {
|
|
223
223
|
var t;
|
|
224
224
|
return e != null && (t = e[Zt]) && t.apply(e);
|
|
225
225
|
} : function() {
|
|
@@ -236,7 +236,7 @@ var Rr = { exports: {} };
|
|
|
236
236
|
return e.slice();
|
|
237
237
|
if (this === Ye && typeof e == "string")
|
|
238
238
|
return [e];
|
|
239
|
-
if (i =
|
|
239
|
+
if (i = Wr(e)) {
|
|
240
240
|
for (n = []; !(r = i.next()).done; )
|
|
241
241
|
n.push(r.value);
|
|
242
242
|
return n;
|
|
@@ -257,7 +257,7 @@ var Rr = { exports: {} };
|
|
|
257
257
|
return e[Symbol.toStringTag] === "AsyncFunction";
|
|
258
258
|
} : function() {
|
|
259
259
|
return !1;
|
|
260
|
-
}, st = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"],
|
|
260
|
+
}, st = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], de = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(st), zr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
|
|
261
261
|
function He(e, t) {
|
|
262
262
|
this.name = e, this.message = t;
|
|
263
263
|
}
|
|
@@ -277,23 +277,23 @@ var Rr = { exports: {} };
|
|
|
277
277
|
return t[n];
|
|
278
278
|
}), this.failuresByPos = t, this.message = Jn(e, this.failures);
|
|
279
279
|
}
|
|
280
|
-
|
|
280
|
+
ze(He).from(Error).extend({ toString: function() {
|
|
281
281
|
return this.name + ": " + this.message;
|
|
282
|
-
} }),
|
|
283
|
-
var en =
|
|
282
|
+
} }), ze(_t).from(He), ze(Qe).from(He);
|
|
283
|
+
var en = de.reduce(function(e, t) {
|
|
284
284
|
return e[t] = t + "Error", e;
|
|
285
|
-
}, {}), Yr = He, G =
|
|
285
|
+
}, {}), Yr = He, G = de.reduce(function(e, t) {
|
|
286
286
|
var n = t + "Error";
|
|
287
287
|
function r(i, a) {
|
|
288
288
|
this.name = n, i ? typeof i == "string" ? (this.message = "".concat(i).concat(a ? `
|
|
289
|
-
` + a : ""), this.inner = a || null) : typeof i == "object" && (this.message = "".concat(i.name, " ").concat(i.message), this.inner = i) : (this.message =
|
|
289
|
+
` + a : ""), this.inner = a || null) : typeof i == "object" && (this.message = "".concat(i.name, " ").concat(i.message), this.inner = i) : (this.message = zr[t] || n, this.inner = null);
|
|
290
290
|
}
|
|
291
|
-
return
|
|
291
|
+
return ze(r).from(Yr), e[t] = r, e;
|
|
292
292
|
}, {});
|
|
293
293
|
G.Syntax = SyntaxError, G.Type = TypeError, G.Range = RangeError;
|
|
294
294
|
var Zn = st.reduce(function(e, t) {
|
|
295
295
|
return e[t + "Error"] = G[t], e;
|
|
296
|
-
}, {}), St =
|
|
296
|
+
}, {}), St = de.reduce(function(e, t) {
|
|
297
297
|
return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = G[t]), e;
|
|
298
298
|
}, {});
|
|
299
299
|
function H() {
|
|
@@ -365,7 +365,7 @@ var Rr = { exports: {} };
|
|
|
365
365
|
return [e, te(e), e];
|
|
366
366
|
var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
|
|
367
367
|
return [t, te(t), e];
|
|
368
|
-
}(), st = ge[0],
|
|
368
|
+
}(), st = ge[0], de = ge[1], ge = ge[2], de = de && de.then, ut = st && st.constructor, nn = !!ge, ct = function(e, t) {
|
|
369
369
|
lt.push([e, t]), Et && (queueMicrotask(qr), Et = !1);
|
|
370
370
|
}, rn = !0, Et = !0, Be = [], Ot = [], on = ot, De = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: H, pgp: !1, env: {}, finalize: H }, K = De, lt = [], Ne = 0, xt = [];
|
|
371
371
|
function j(e) {
|
|
@@ -398,8 +398,8 @@ var Rr = { exports: {} };
|
|
|
398
398
|
var an = { get: function() {
|
|
399
399
|
var e = K, t = Pt;
|
|
400
400
|
function n(r, i) {
|
|
401
|
-
var a = this, s = !e.global && (e !== K || t !== Pt), u = s && !
|
|
402
|
-
un(a, new tr(ir(r, e, s, u), ir(i, e, s, u),
|
|
401
|
+
var a = this, s = !e.global && (e !== K || t !== Pt), u = s && !Ce(), h = new j(function(f, v) {
|
|
402
|
+
un(a, new tr(ir(r, e, s, u), ir(i, e, s, u), f, v, e));
|
|
403
403
|
});
|
|
404
404
|
return this._consoleTask && (h._consoleTask = this._consoleTask), h;
|
|
405
405
|
}
|
|
@@ -489,11 +489,11 @@ var Rr = { exports: {} };
|
|
|
489
489
|
return function() {
|
|
490
490
|
var r = Xe(), i = K;
|
|
491
491
|
try {
|
|
492
|
-
return
|
|
492
|
+
return Ie(n, !0), e.apply(this, arguments);
|
|
493
493
|
} catch (a) {
|
|
494
494
|
t && t(a);
|
|
495
495
|
} finally {
|
|
496
|
-
|
|
496
|
+
Ie(i, !1), r && Ve();
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
}
|
|
@@ -527,7 +527,7 @@ var Rr = { exports: {} };
|
|
|
527
527
|
n.then(r, i).finally(clearTimeout.bind(null, a));
|
|
528
528
|
}) : this;
|
|
529
529
|
} }), typeof Symbol < "u" && Symbol.toStringTag && ke(j.prototype, Symbol.toStringTag, "Dexie.Promise"), De.env = rr(), xe(j, { all: function() {
|
|
530
|
-
var e = we.apply(null, arguments).map(
|
|
530
|
+
var e = we.apply(null, arguments).map(Ct);
|
|
531
531
|
return new j(function(t, n) {
|
|
532
532
|
e.length === 0 && t([]);
|
|
533
533
|
var r = e.length;
|
|
@@ -542,7 +542,7 @@ var Rr = { exports: {} };
|
|
|
542
542
|
e.then(t, n);
|
|
543
543
|
}) : new j(at, !0, e);
|
|
544
544
|
}, reject: kt, race: function() {
|
|
545
|
-
var e = we.apply(null, arguments).map(
|
|
545
|
+
var e = we.apply(null, arguments).map(Ct);
|
|
546
546
|
return new j(function(t, n) {
|
|
547
547
|
e.map(function(r) {
|
|
548
548
|
return j.resolve(r).then(t, n);
|
|
@@ -570,8 +570,8 @@ var Rr = { exports: {} };
|
|
|
570
570
|
var u, h = this;
|
|
571
571
|
u = function() {
|
|
572
572
|
h.unhandleds.length === 0 ? i() : a(h.unhandleds[0]);
|
|
573
|
-
}, xt.push(function
|
|
574
|
-
u(), xt.splice(xt.indexOf(
|
|
573
|
+
}, xt.push(function f() {
|
|
574
|
+
u(), xt.splice(xt.indexOf(f), 1);
|
|
575
575
|
}), ++Ne, ct(function() {
|
|
576
576
|
--Ne == 0 && cn();
|
|
577
577
|
}, []);
|
|
@@ -579,7 +579,7 @@ var Rr = { exports: {} };
|
|
|
579
579
|
}, t, n, r);
|
|
580
580
|
});
|
|
581
581
|
} }), ut && (ut.allSettled && ke(j, "allSettled", function() {
|
|
582
|
-
var e = we.apply(null, arguments).map(
|
|
582
|
+
var e = we.apply(null, arguments).map(Ct);
|
|
583
583
|
return new j(function(t) {
|
|
584
584
|
e.length === 0 && t([]);
|
|
585
585
|
var n = e.length, r = new Array(n);
|
|
@@ -594,7 +594,7 @@ var Rr = { exports: {} };
|
|
|
594
594
|
});
|
|
595
595
|
});
|
|
596
596
|
}), ut.any && typeof AggregateError < "u" && ke(j, "any", function() {
|
|
597
|
-
var e = we.apply(null, arguments).map(
|
|
597
|
+
var e = we.apply(null, arguments).map(Ct);
|
|
598
598
|
return new j(function(t, n) {
|
|
599
599
|
e.length === 0 && n(new AggregateError([]));
|
|
600
600
|
var r = e.length, i = new Array(r);
|
|
@@ -617,24 +617,24 @@ var Rr = { exports: {} };
|
|
|
617
617
|
function Je() {
|
|
618
618
|
return ne.id || (ne.id = ++ei), ++ne.awaits, ne.echoes += er, ne.id;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function Ce() {
|
|
621
621
|
return !!ne.awaits && (--ne.awaits == 0 && (ne.id = 0), ne.echoes = ne.awaits * er, !0);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function Ct(e) {
|
|
624
624
|
return ne.echoes && e && e.constructor === ut ? (Je(), e.then(function(t) {
|
|
625
|
-
return
|
|
625
|
+
return Ce(), t;
|
|
626
626
|
}, function(t) {
|
|
627
|
-
return
|
|
627
|
+
return Ce(), q(t);
|
|
628
628
|
})) : e;
|
|
629
629
|
}
|
|
630
630
|
function ni() {
|
|
631
631
|
var e = At[At.length - 1];
|
|
632
|
-
At.pop(),
|
|
632
|
+
At.pop(), Ie(e, !1);
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Ie(e, t) {
|
|
635
635
|
var n, r = K;
|
|
636
636
|
(t ? !ne.echoes || Dt++ && e === K : !Dt || --Dt && e === K) || queueMicrotask(t ? (function(i) {
|
|
637
|
-
++Pt, ne.echoes && --ne.echoes != 0 || (ne.echoes = ne.awaits = ne.id = 0), At.push(K),
|
|
637
|
+
++Pt, ne.echoes && --ne.echoes != 0 || (ne.echoes = ne.awaits = ne.id = 0), At.push(K), Ie(i, !0);
|
|
638
638
|
}).bind(null, e) : ni), e !== K && (K = e, r === De && (De.env = rr()), nn && (n = De.env.Promise, t = e.env, (r.global || e.global) && (Object.defineProperty(R, "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
639
|
}
|
|
640
640
|
function rr() {
|
|
@@ -644,27 +644,27 @@ var Rr = { exports: {} };
|
|
|
644
644
|
function Le(e, t, n, r, i) {
|
|
645
645
|
var a = K;
|
|
646
646
|
try {
|
|
647
|
-
return
|
|
647
|
+
return Ie(e, !0), t(n, r, i);
|
|
648
648
|
} finally {
|
|
649
|
-
|
|
649
|
+
Ie(a, !1);
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
652
|
function ir(e, t, n, r) {
|
|
653
653
|
return typeof e != "function" ? e : function() {
|
|
654
654
|
var i = K;
|
|
655
|
-
n && Je(),
|
|
655
|
+
n && Je(), Ie(t, !0);
|
|
656
656
|
try {
|
|
657
657
|
return e.apply(this, arguments);
|
|
658
658
|
} finally {
|
|
659
|
-
|
|
659
|
+
Ie(i, !1), r && queueMicrotask(Ce);
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
662
|
}
|
|
663
663
|
function ln(e) {
|
|
664
664
|
Promise === ut && ne.echoes === 0 ? Dt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
665
665
|
}
|
|
666
|
-
("" +
|
|
667
|
-
var q = j.reject, ge = "4.0.1-beta.10", Ge = "", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", or = "String expected.", Ze = [],
|
|
666
|
+
("" + de).indexOf("[native code]") === -1 && (Je = Ce = H);
|
|
667
|
+
var q = j.reject, ge = "4.0.1-beta.10", Ge = "", _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
668
|
function Fe(e, t) {
|
|
669
669
|
return e ? t ? function() {
|
|
670
670
|
return e.apply(this, arguments) && t.apply(this, arguments);
|
|
@@ -681,7 +681,7 @@ var Rr = { exports: {} };
|
|
|
681
681
|
function sr() {
|
|
682
682
|
throw G.Type();
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function z(e, t) {
|
|
685
685
|
try {
|
|
686
686
|
var n = ur(e), r = ur(t);
|
|
687
687
|
if (n !== r)
|
|
@@ -693,17 +693,17 @@ var Rr = { exports: {} };
|
|
|
693
693
|
return t < e ? 1 : e < t ? -1 : 0;
|
|
694
694
|
case "binary":
|
|
695
695
|
return function(i, a) {
|
|
696
|
-
for (var s = i.length, u = a.length, h = s < u ? s : u,
|
|
697
|
-
if (i[
|
|
698
|
-
return i[
|
|
696
|
+
for (var s = i.length, u = a.length, h = s < u ? s : u, f = 0; f < h; ++f)
|
|
697
|
+
if (i[f] !== a[f])
|
|
698
|
+
return i[f] < a[f] ? -1 : 1;
|
|
699
699
|
return s === u ? 0 : s < u ? -1 : 1;
|
|
700
700
|
}(cr(e), cr(t));
|
|
701
701
|
case "Array":
|
|
702
702
|
return function(i, a) {
|
|
703
|
-
for (var s = i.length, u = a.length, h = s < u ? s : u,
|
|
704
|
-
var
|
|
705
|
-
if (
|
|
706
|
-
return
|
|
703
|
+
for (var s = i.length, u = a.length, h = s < u ? s : u, f = 0; f < h; ++f) {
|
|
704
|
+
var v = z(i[f], a[f]);
|
|
705
|
+
if (v !== 0)
|
|
706
|
+
return v;
|
|
707
707
|
}
|
|
708
708
|
return s === u ? 0 : s < u ? -1 : 1;
|
|
709
709
|
}(e, t);
|
|
@@ -721,7 +721,7 @@ var Rr = { exports: {} };
|
|
|
721
721
|
}
|
|
722
722
|
var lr = (X.prototype._trans = function(e, t, n) {
|
|
723
723
|
var r = this._tx || K.trans, i = this.name, a = pe && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
|
|
724
|
-
function s(
|
|
724
|
+
function s(f, v, c) {
|
|
725
725
|
if (!c.schema[i])
|
|
726
726
|
throw new G.NotFound("Table " + i + " not part of transaction");
|
|
727
727
|
return t(c.idbtrans, c);
|
|
@@ -730,14 +730,14 @@ var Rr = { exports: {} };
|
|
|
730
730
|
try {
|
|
731
731
|
var h = r && r.db._novip === this.db._novip ? r === K.trans ? r._promise(e, s, n) : Pe(function() {
|
|
732
732
|
return r._promise(e, s, n);
|
|
733
|
-
}, { trans: r, transless: K.transless || K }) : function
|
|
734
|
-
if (
|
|
735
|
-
var m =
|
|
733
|
+
}, { trans: r, transless: K.transless || K }) : function f(v, c, d, p) {
|
|
734
|
+
if (v.idbdb && (v._state.openComplete || K.letThrough || v._vip)) {
|
|
735
|
+
var m = v._createTransaction(c, d, v._dbSchema);
|
|
736
736
|
try {
|
|
737
|
-
m.create(),
|
|
737
|
+
m.create(), v._state.PR1398_maxLoop = 3;
|
|
738
738
|
} catch (w) {
|
|
739
|
-
return w.name === en.InvalidState &&
|
|
740
|
-
return
|
|
739
|
+
return w.name === en.InvalidState && v.isOpen() && 0 < --v._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), v.close({ disableAutoOpen: !1 }), v.open().then(function() {
|
|
740
|
+
return f(v, c, d, p);
|
|
741
741
|
})) : q(w);
|
|
742
742
|
}
|
|
743
743
|
return m._promise(c, function(w, g) {
|
|
@@ -755,19 +755,19 @@ var Rr = { exports: {} };
|
|
|
755
755
|
});
|
|
756
756
|
});
|
|
757
757
|
}
|
|
758
|
-
if (
|
|
759
|
-
return q(new G.DatabaseClosed(
|
|
760
|
-
if (!
|
|
761
|
-
if (!
|
|
758
|
+
if (v._state.openComplete)
|
|
759
|
+
return q(new G.DatabaseClosed(v._state.dbOpenError));
|
|
760
|
+
if (!v._state.isBeingOpened) {
|
|
761
|
+
if (!v._state.autoOpen)
|
|
762
762
|
return q(new G.DatabaseClosed());
|
|
763
|
-
|
|
763
|
+
v.open().catch(H);
|
|
764
764
|
}
|
|
765
|
-
return
|
|
766
|
-
return
|
|
765
|
+
return v._state.dbReadyPromise.then(function() {
|
|
766
|
+
return f(v, c, d, p);
|
|
767
767
|
});
|
|
768
768
|
}(this.db, e, [this.name], s);
|
|
769
|
-
return a && (h._consoleTask = a, h = h.catch(function(
|
|
770
|
-
return console.trace(
|
|
769
|
+
return a && (h._consoleTask = a, h = h.catch(function(f) {
|
|
770
|
+
return console.trace(f), q(f);
|
|
771
771
|
})), h;
|
|
772
772
|
} finally {
|
|
773
773
|
u && Ve();
|
|
@@ -788,37 +788,37 @@ var Rr = { exports: {} };
|
|
|
788
788
|
if (t.length === 1)
|
|
789
789
|
return this.where(t[0]).equals(e[t[0]]);
|
|
790
790
|
var n = this.schema.indexes.concat(this.schema.primKey).filter(function(h) {
|
|
791
|
-
if (h.compound && t.every(function(
|
|
792
|
-
return 0 <= h.keyPath.indexOf(
|
|
791
|
+
if (h.compound && t.every(function(v) {
|
|
792
|
+
return 0 <= h.keyPath.indexOf(v);
|
|
793
793
|
})) {
|
|
794
|
-
for (var
|
|
795
|
-
if (t.indexOf(h.keyPath[
|
|
794
|
+
for (var f = 0; f < t.length; ++f)
|
|
795
|
+
if (t.indexOf(h.keyPath[f]) === -1)
|
|
796
796
|
return !1;
|
|
797
797
|
return !0;
|
|
798
798
|
}
|
|
799
799
|
return !1;
|
|
800
|
-
}).sort(function(h,
|
|
801
|
-
return h.keyPath.length -
|
|
800
|
+
}).sort(function(h, f) {
|
|
801
|
+
return h.keyPath.length - f.keyPath.length;
|
|
802
802
|
})[0];
|
|
803
803
|
if (n && this.db._maxKey !== Ge) {
|
|
804
804
|
var s = n.keyPath.slice(0, t.length);
|
|
805
|
-
return this.where(s).equals(s.map(function(
|
|
806
|
-
return e[
|
|
805
|
+
return this.where(s).equals(s.map(function(f) {
|
|
806
|
+
return e[f];
|
|
807
807
|
}));
|
|
808
808
|
}
|
|
809
809
|
!n && pe && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
|
|
810
810
|
var r = this.schema.idxByName, i = this.db._deps.indexedDB;
|
|
811
|
-
function a(h,
|
|
812
|
-
return i.cmp(h,
|
|
811
|
+
function a(h, f) {
|
|
812
|
+
return i.cmp(h, f) === 0;
|
|
813
813
|
}
|
|
814
|
-
var u = t.reduce(function(
|
|
815
|
-
var
|
|
816
|
-
return [
|
|
817
|
-
return m = ve(m,
|
|
814
|
+
var u = t.reduce(function(d, f) {
|
|
815
|
+
var v = d[0], c = d[1], d = r[f], p = e[f];
|
|
816
|
+
return [v || d, v || !d ? Fe(c, d && d.multi ? function(m) {
|
|
817
|
+
return m = ve(m, f), N(m) && m.some(function(w) {
|
|
818
818
|
return a(p, w);
|
|
819
819
|
});
|
|
820
820
|
} : function(m) {
|
|
821
|
-
return a(p, ve(m,
|
|
821
|
+
return a(p, ve(m, f));
|
|
822
822
|
}) : c];
|
|
823
823
|
}, [null, null]), s = u[0], u = u[1];
|
|
824
824
|
return s ? this.where(s.name).equals(e[s.keyPath]).filter(u) : n ? this.filter(u) : this.where(t).equals("");
|
|
@@ -845,13 +845,13 @@ var Rr = { exports: {} };
|
|
|
845
845
|
function i() {
|
|
846
846
|
return t !== null && t.apply(this, arguments) || this;
|
|
847
847
|
}
|
|
848
|
-
(this.schema.mappedClass = e).prototype instanceof sr && (function(h,
|
|
849
|
-
if (typeof
|
|
850
|
-
throw new TypeError("Class extends value " + String(
|
|
851
|
-
function
|
|
848
|
+
(this.schema.mappedClass = e).prototype instanceof sr && (function(h, f) {
|
|
849
|
+
if (typeof f != "function" && f !== null)
|
|
850
|
+
throw new TypeError("Class extends value " + String(f) + " is not a constructor or null");
|
|
851
|
+
function v() {
|
|
852
852
|
this.constructor = h;
|
|
853
853
|
}
|
|
854
|
-
l(h,
|
|
854
|
+
l(h, f), h.prototype = f === null ? Object.create(f) : (v.prototype = f.prototype, new v());
|
|
855
855
|
}(i, t = e), Object.defineProperty(i.prototype, "db", { get: function() {
|
|
856
856
|
return n;
|
|
857
857
|
}, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
|
|
@@ -864,14 +864,14 @@ var Rr = { exports: {} };
|
|
|
864
864
|
function u(h) {
|
|
865
865
|
if (!h)
|
|
866
866
|
return h;
|
|
867
|
-
var
|
|
868
|
-
for (
|
|
869
|
-
if (!a.has(
|
|
867
|
+
var f, v = Object.create(e.prototype);
|
|
868
|
+
for (f in h)
|
|
869
|
+
if (!a.has(f))
|
|
870
870
|
try {
|
|
871
|
-
|
|
871
|
+
v[f] = h[f];
|
|
872
872
|
} catch {
|
|
873
873
|
}
|
|
874
|
-
return
|
|
874
|
+
return v;
|
|
875
875
|
}
|
|
876
876
|
return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = u, this.hook("reading", u), e;
|
|
877
877
|
}, X.prototype.defineClass = function() {
|
|
@@ -887,7 +887,7 @@ var Rr = { exports: {} };
|
|
|
887
887
|
}).then(function(u) {
|
|
888
888
|
if (a)
|
|
889
889
|
try {
|
|
890
|
-
|
|
890
|
+
fe(e, a, u);
|
|
891
891
|
} catch {
|
|
892
892
|
}
|
|
893
893
|
return u;
|
|
@@ -903,7 +903,7 @@ var Rr = { exports: {} };
|
|
|
903
903
|
}).then(function(u) {
|
|
904
904
|
if (a)
|
|
905
905
|
try {
|
|
906
|
-
|
|
906
|
+
fe(e, a, u);
|
|
907
907
|
} catch {
|
|
908
908
|
}
|
|
909
909
|
return u;
|
|
@@ -934,32 +934,32 @@ var Rr = { exports: {} };
|
|
|
934
934
|
}, X.prototype.bulkAdd = function(e, t, n) {
|
|
935
935
|
var r = this, i = Array.isArray(t) ? t : void 0, a = (n = n || (i ? void 0 : t)) ? n.allKeys : void 0;
|
|
936
936
|
return this._trans("readwrite", function(s) {
|
|
937
|
-
var
|
|
938
|
-
if (
|
|
937
|
+
var f = r.schema.primKey, u = f.auto, f = f.keyPath;
|
|
938
|
+
if (f && i)
|
|
939
939
|
throw new G.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
|
|
940
940
|
if (i && i.length !== e.length)
|
|
941
941
|
throw new G.InvalidArgument("Arguments objects and keys must have the same length");
|
|
942
|
-
var h = e.length,
|
|
943
|
-
return r.core.mutate({ trans: s, type: "add", keys: i, values:
|
|
944
|
-
var c = m.numFailures,
|
|
942
|
+
var h = e.length, f = f && u ? e.map(Rt(f)) : e;
|
|
943
|
+
return r.core.mutate({ trans: s, type: "add", keys: i, values: f, wantResults: a }).then(function(m) {
|
|
944
|
+
var c = m.numFailures, d = m.results, p = m.lastResult, m = m.failures;
|
|
945
945
|
if (c === 0)
|
|
946
|
-
return a ?
|
|
946
|
+
return a ? d : p;
|
|
947
947
|
throw new Qe("".concat(r.name, ".bulkAdd(): ").concat(c, " of ").concat(h, " operations failed"), m);
|
|
948
948
|
});
|
|
949
949
|
});
|
|
950
950
|
}, X.prototype.bulkPut = function(e, t, n) {
|
|
951
951
|
var r = this, i = Array.isArray(t) ? t : void 0, a = (n = n || (i ? void 0 : t)) ? n.allKeys : void 0;
|
|
952
952
|
return this._trans("readwrite", function(s) {
|
|
953
|
-
var
|
|
954
|
-
if (
|
|
953
|
+
var f = r.schema.primKey, u = f.auto, f = f.keyPath;
|
|
954
|
+
if (f && i)
|
|
955
955
|
throw new G.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
|
|
956
956
|
if (i && i.length !== e.length)
|
|
957
957
|
throw new G.InvalidArgument("Arguments objects and keys must have the same length");
|
|
958
|
-
var h = e.length,
|
|
959
|
-
return r.core.mutate({ trans: s, type: "put", keys: i, values:
|
|
960
|
-
var c = m.numFailures,
|
|
958
|
+
var h = e.length, f = f && u ? e.map(Rt(f)) : e;
|
|
959
|
+
return r.core.mutate({ trans: s, type: "put", keys: i, values: f, wantResults: a }).then(function(m) {
|
|
960
|
+
var c = m.numFailures, d = m.results, p = m.lastResult, m = m.failures;
|
|
961
961
|
if (c === 0)
|
|
962
|
-
return a ?
|
|
962
|
+
return a ? d : p;
|
|
963
963
|
throw new Qe("".concat(r.name, ".bulkPut(): ").concat(c, " of ").concat(h, " operations failed"), m);
|
|
964
964
|
});
|
|
965
965
|
});
|
|
@@ -971,31 +971,31 @@ var Rr = { exports: {} };
|
|
|
971
971
|
}), a = [];
|
|
972
972
|
return this._trans("readwrite", function(s) {
|
|
973
973
|
return n.getMany({ trans: s, keys: r, cache: "clone" }).then(function(u) {
|
|
974
|
-
var h = [],
|
|
975
|
-
e.forEach(function(c,
|
|
976
|
-
var p = c.key, m = c.changes, w = u[
|
|
974
|
+
var h = [], f = [];
|
|
975
|
+
e.forEach(function(c, d) {
|
|
976
|
+
var p = c.key, m = c.changes, w = u[d];
|
|
977
977
|
if (w) {
|
|
978
978
|
for (var g = 0, _ = Object.keys(m); g < _.length; g++) {
|
|
979
979
|
var S = _[g], E = m[S];
|
|
980
980
|
if (S === t.schema.primKey.keyPath) {
|
|
981
|
-
if (
|
|
981
|
+
if (z(E, p) !== 0)
|
|
982
982
|
throw new G.Constraint("Cannot update primary key in bulkUpdate()");
|
|
983
983
|
} else
|
|
984
|
-
|
|
984
|
+
fe(w, S, E);
|
|
985
985
|
}
|
|
986
|
-
a.push(
|
|
986
|
+
a.push(d), h.push(p), f.push(w);
|
|
987
987
|
}
|
|
988
988
|
});
|
|
989
|
-
var
|
|
990
|
-
return n.mutate({ trans: s, type: "put", keys: h, values:
|
|
991
|
-
var
|
|
992
|
-
if (
|
|
993
|
-
return
|
|
989
|
+
var v = h.length;
|
|
990
|
+
return n.mutate({ trans: s, type: "put", keys: h, values: f, updates: { keys: r, changeSpecs: i } }).then(function(c) {
|
|
991
|
+
var d = c.numFailures, p = c.failures;
|
|
992
|
+
if (d === 0)
|
|
993
|
+
return v;
|
|
994
994
|
for (var m = 0, w = Object.keys(p); m < w.length; m++) {
|
|
995
995
|
var g, _ = w[m], S = a[Number(_)];
|
|
996
996
|
S != null && (g = p[_], delete p[_], p[S] = g);
|
|
997
997
|
}
|
|
998
|
-
throw new Qe("".concat(t.name, ".bulkUpdate(): ").concat(
|
|
998
|
+
throw new Qe("".concat(t.name, ".bulkUpdate(): ").concat(d, " of ").concat(v, " operations failed"), p);
|
|
999
999
|
});
|
|
1000
1000
|
});
|
|
1001
1001
|
});
|
|
@@ -1012,12 +1012,12 @@ var Rr = { exports: {} };
|
|
|
1012
1012
|
}, X);
|
|
1013
1013
|
function X() {
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1015
|
+
function ft(e) {
|
|
1016
1016
|
function t(s, u) {
|
|
1017
1017
|
if (u) {
|
|
1018
|
-
for (var h = arguments.length,
|
|
1019
|
-
|
|
1020
|
-
return n[s].subscribe.apply(null,
|
|
1018
|
+
for (var h = arguments.length, f = new Array(h - 1); --h; )
|
|
1019
|
+
f[h - 1] = arguments[h];
|
|
1020
|
+
return n[s].subscribe.apply(null, f), e;
|
|
1021
1021
|
}
|
|
1022
1022
|
if (typeof s == "string")
|
|
1023
1023
|
return n[s];
|
|
@@ -1029,23 +1029,23 @@ var Rr = { exports: {} };
|
|
|
1029
1029
|
return t;
|
|
1030
1030
|
function a(s, u, h) {
|
|
1031
1031
|
if (typeof s != "object") {
|
|
1032
|
-
var
|
|
1032
|
+
var f;
|
|
1033
1033
|
u = u || Jr;
|
|
1034
|
-
var
|
|
1035
|
-
|
|
1034
|
+
var v = { subscribers: [], fire: h = h || H, subscribe: function(c) {
|
|
1035
|
+
v.subscribers.indexOf(c) === -1 && (v.subscribers.push(c), v.fire = u(v.fire, c));
|
|
1036
1036
|
}, unsubscribe: function(c) {
|
|
1037
|
-
|
|
1038
|
-
return
|
|
1039
|
-
}),
|
|
1037
|
+
v.subscribers = v.subscribers.filter(function(d) {
|
|
1038
|
+
return d !== c;
|
|
1039
|
+
}), v.fire = v.subscribers.reduce(u, h);
|
|
1040
1040
|
} };
|
|
1041
|
-
return n[s] = t[s] =
|
|
1041
|
+
return n[s] = t[s] = v;
|
|
1042
1042
|
}
|
|
1043
|
-
B(
|
|
1044
|
-
var
|
|
1045
|
-
if (N(
|
|
1046
|
-
a(c,
|
|
1043
|
+
B(f = s).forEach(function(c) {
|
|
1044
|
+
var d = f[c];
|
|
1045
|
+
if (N(d))
|
|
1046
|
+
a(c, f[c][0], f[c][1]);
|
|
1047
1047
|
else {
|
|
1048
|
-
if (
|
|
1048
|
+
if (d !== "asap")
|
|
1049
1049
|
throw new G.InvalidArgument("Invalid event config");
|
|
1050
1050
|
var p = a(c, ot, function() {
|
|
1051
1051
|
for (var m = arguments.length, w = new Array(m); m--; )
|
|
@@ -1060,8 +1060,8 @@ var Rr = { exports: {} };
|
|
|
1060
1060
|
});
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1064
|
-
return
|
|
1063
|
+
function dt(e, t) {
|
|
1064
|
+
return ze(t).from({ prototype: e }), t;
|
|
1065
1065
|
}
|
|
1066
1066
|
function qe(e, t) {
|
|
1067
1067
|
return !(e.filter || e.algorithm || e.or) && (t ? e.justLimit : !e.replayFilter);
|
|
@@ -1083,26 +1083,26 @@ var Rr = { exports: {} };
|
|
|
1083
1083
|
throw new G.Schema("KeyPath " + e.index + " on object store " + t.name + " is not indexed");
|
|
1084
1084
|
return n;
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function fr(e, t, n) {
|
|
1087
1087
|
var r = Tt(e, t.schema);
|
|
1088
1088
|
return t.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: r, range: e.range } });
|
|
1089
1089
|
}
|
|
1090
1090
|
function jt(e, t, n, r) {
|
|
1091
1091
|
var i = e.replayFilter ? Fe(e.filter, e.replayFilter()) : e.filter;
|
|
1092
1092
|
if (e.or) {
|
|
1093
|
-
var a = {}, s = function(u, h,
|
|
1094
|
-
var
|
|
1095
|
-
i && !i(h,
|
|
1096
|
-
return h.stop(
|
|
1097
|
-
}, function(
|
|
1098
|
-
return h.fail(
|
|
1099
|
-
}) || ((c = "" + (
|
|
1093
|
+
var a = {}, s = function(u, h, f) {
|
|
1094
|
+
var v, c;
|
|
1095
|
+
i && !i(h, f, function(d) {
|
|
1096
|
+
return h.stop(d);
|
|
1097
|
+
}, function(d) {
|
|
1098
|
+
return h.fail(d);
|
|
1099
|
+
}) || ((c = "" + (v = h.primaryKey)) == "[object ArrayBuffer]" && (c = "" + new Uint8Array(v)), ie(a, c) || (a[c] = !0, t(u, h, f)));
|
|
1100
1100
|
};
|
|
1101
|
-
return Promise.all([e.or._iterate(s, n), fr(
|
|
1101
|
+
return Promise.all([e.or._iterate(s, n), dr(fr(e, r, n), e.algorithm, s, !e.keysOnly && e.valueMapper)]);
|
|
1102
1102
|
}
|
|
1103
|
-
return fr(
|
|
1103
|
+
return dr(fr(e, r, n), Fe(e.algorithm, i), t, !e.keysOnly && e.valueMapper);
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function dr(e, t, n, r) {
|
|
1106
1106
|
var i = J(r ? function(a, s, u) {
|
|
1107
1107
|
return n(r(a), s, u);
|
|
1108
1108
|
} : n);
|
|
@@ -1124,28 +1124,28 @@ var Rr = { exports: {} };
|
|
|
1124
1124
|
});
|
|
1125
1125
|
});
|
|
1126
1126
|
}
|
|
1127
|
-
var ri = (
|
|
1127
|
+
var ri = (W.prototype._read = function(e, t) {
|
|
1128
1128
|
var n = this._ctx;
|
|
1129
1129
|
return n.error ? n.table._trans(null, q.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
|
|
1130
|
-
},
|
|
1130
|
+
}, W.prototype._write = function(e) {
|
|
1131
1131
|
var t = this._ctx;
|
|
1132
1132
|
return t.error ? t.table._trans(null, q.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
|
|
1133
|
-
},
|
|
1133
|
+
}, W.prototype._addAlgorithm = function(e) {
|
|
1134
1134
|
var t = this._ctx;
|
|
1135
1135
|
t.algorithm = Fe(t.algorithm, e);
|
|
1136
|
-
},
|
|
1136
|
+
}, W.prototype._iterate = function(e, t) {
|
|
1137
1137
|
return jt(this._ctx, e, t, this._ctx.table.core);
|
|
1138
|
-
},
|
|
1138
|
+
}, W.prototype.clone = function(e) {
|
|
1139
1139
|
var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
|
|
1140
1140
|
return e && Z(n, e), t._ctx = n, t;
|
|
1141
|
-
},
|
|
1141
|
+
}, W.prototype.raw = function() {
|
|
1142
1142
|
return this._ctx.valueMapper = null, this;
|
|
1143
|
-
},
|
|
1143
|
+
}, W.prototype.each = function(e) {
|
|
1144
1144
|
var t = this._ctx;
|
|
1145
1145
|
return this._read(function(n) {
|
|
1146
1146
|
return jt(t, e, n, t.table.core);
|
|
1147
1147
|
});
|
|
1148
|
-
},
|
|
1148
|
+
}, W.prototype.count = function(e) {
|
|
1149
1149
|
var t = this;
|
|
1150
1150
|
return this._read(function(n) {
|
|
1151
1151
|
var r = t._ctx, i = r.table.core;
|
|
@@ -1160,19 +1160,19 @@ var Rr = { exports: {} };
|
|
|
1160
1160
|
return a;
|
|
1161
1161
|
});
|
|
1162
1162
|
}).then(e);
|
|
1163
|
-
},
|
|
1163
|
+
}, W.prototype.sortBy = function(e, t) {
|
|
1164
1164
|
var n = e.split(".").reverse(), r = n[0], i = n.length - 1;
|
|
1165
|
-
function a(h,
|
|
1166
|
-
return
|
|
1165
|
+
function a(h, f) {
|
|
1166
|
+
return f ? a(h[n[f]], f - 1) : h[r];
|
|
1167
1167
|
}
|
|
1168
1168
|
var s = this._ctx.dir === "next" ? 1 : -1;
|
|
1169
|
-
function u(h,
|
|
1170
|
-
return h = a(h, i),
|
|
1169
|
+
function u(h, f) {
|
|
1170
|
+
return h = a(h, i), f = a(f, i), h < f ? -s : f < h ? s : 0;
|
|
1171
1171
|
}
|
|
1172
1172
|
return this.toArray(function(h) {
|
|
1173
1173
|
return h.sort(u);
|
|
1174
1174
|
}).then(t);
|
|
1175
|
-
},
|
|
1175
|
+
}, W.prototype.toArray = function(e) {
|
|
1176
1176
|
var t = this;
|
|
1177
1177
|
return this._read(function(n) {
|
|
1178
1178
|
var r = t._ctx;
|
|
@@ -1189,7 +1189,7 @@ var Rr = { exports: {} };
|
|
|
1189
1189
|
return s;
|
|
1190
1190
|
});
|
|
1191
1191
|
}, e);
|
|
1192
|
-
},
|
|
1192
|
+
}, W.prototype.offset = function(e) {
|
|
1193
1193
|
var t = this._ctx;
|
|
1194
1194
|
return e <= 0 || (t.offset += e, qe(t) ? pn(t, function() {
|
|
1195
1195
|
var n = e;
|
|
@@ -1204,49 +1204,49 @@ var Rr = { exports: {} };
|
|
|
1204
1204
|
return --n < 0;
|
|
1205
1205
|
};
|
|
1206
1206
|
})), this;
|
|
1207
|
-
},
|
|
1207
|
+
}, W.prototype.limit = function(e) {
|
|
1208
1208
|
return this._ctx.limit = Math.min(this._ctx.limit, e), pn(this._ctx, function() {
|
|
1209
1209
|
var t = e;
|
|
1210
1210
|
return function(n, r, i) {
|
|
1211
1211
|
return --t <= 0 && r(i), 0 <= t;
|
|
1212
1212
|
};
|
|
1213
1213
|
}, !0), this;
|
|
1214
|
-
},
|
|
1214
|
+
}, W.prototype.until = function(e, t) {
|
|
1215
1215
|
return hn(this._ctx, function(n, r, i) {
|
|
1216
1216
|
return !e(n.value) || (r(i), t);
|
|
1217
1217
|
}), this;
|
|
1218
|
-
},
|
|
1218
|
+
}, W.prototype.first = function(e) {
|
|
1219
1219
|
return this.limit(1).toArray(function(t) {
|
|
1220
1220
|
return t[0];
|
|
1221
1221
|
}).then(e);
|
|
1222
|
-
},
|
|
1222
|
+
}, W.prototype.last = function(e) {
|
|
1223
1223
|
return this.reverse().first(e);
|
|
1224
|
-
},
|
|
1224
|
+
}, W.prototype.filter = function(e) {
|
|
1225
1225
|
var t;
|
|
1226
1226
|
return hn(this._ctx, function(n) {
|
|
1227
1227
|
return e(n.value);
|
|
1228
1228
|
}), (t = this._ctx).isMatch = Fe(t.isMatch, e), this;
|
|
1229
|
-
},
|
|
1229
|
+
}, W.prototype.and = function(e) {
|
|
1230
1230
|
return this.filter(e);
|
|
1231
|
-
},
|
|
1231
|
+
}, W.prototype.or = function(e) {
|
|
1232
1232
|
return new this.db.WhereClause(this._ctx.table, e, this);
|
|
1233
|
-
},
|
|
1233
|
+
}, W.prototype.reverse = function() {
|
|
1234
1234
|
return this._ctx.dir = this._ctx.dir === "prev" ? "next" : "prev", this._ondirectionchange && this._ondirectionchange(this._ctx.dir), this;
|
|
1235
|
-
},
|
|
1235
|
+
}, W.prototype.desc = function() {
|
|
1236
1236
|
return this.reverse();
|
|
1237
|
-
},
|
|
1237
|
+
}, W.prototype.eachKey = function(e) {
|
|
1238
1238
|
var t = this._ctx;
|
|
1239
1239
|
return t.keysOnly = !t.isMatch, this.each(function(n, r) {
|
|
1240
1240
|
e(r.key, r);
|
|
1241
1241
|
});
|
|
1242
|
-
},
|
|
1242
|
+
}, W.prototype.eachUniqueKey = function(e) {
|
|
1243
1243
|
return this._ctx.unique = "unique", this.eachKey(e);
|
|
1244
|
-
},
|
|
1244
|
+
}, W.prototype.eachPrimaryKey = function(e) {
|
|
1245
1245
|
var t = this._ctx;
|
|
1246
1246
|
return t.keysOnly = !t.isMatch, this.each(function(n, r) {
|
|
1247
1247
|
e(r.primaryKey, r);
|
|
1248
1248
|
});
|
|
1249
|
-
},
|
|
1249
|
+
}, W.prototype.keys = function(e) {
|
|
1250
1250
|
var t = this._ctx;
|
|
1251
1251
|
t.keysOnly = !t.isMatch;
|
|
1252
1252
|
var n = [];
|
|
@@ -1255,7 +1255,7 @@ var Rr = { exports: {} };
|
|
|
1255
1255
|
}).then(function() {
|
|
1256
1256
|
return n;
|
|
1257
1257
|
}).then(e);
|
|
1258
|
-
},
|
|
1258
|
+
}, W.prototype.primaryKeys = function(e) {
|
|
1259
1259
|
var t = this._ctx;
|
|
1260
1260
|
if (t.dir === "next" && qe(t, !0) && 0 < t.limit)
|
|
1261
1261
|
return this._read(function(r) {
|
|
@@ -1271,15 +1271,15 @@ var Rr = { exports: {} };
|
|
|
1271
1271
|
}).then(function() {
|
|
1272
1272
|
return n;
|
|
1273
1273
|
}).then(e);
|
|
1274
|
-
},
|
|
1274
|
+
}, W.prototype.uniqueKeys = function(e) {
|
|
1275
1275
|
return this._ctx.unique = "unique", this.keys(e);
|
|
1276
|
-
},
|
|
1276
|
+
}, W.prototype.firstKey = function(e) {
|
|
1277
1277
|
return this.limit(1).keys(function(t) {
|
|
1278
1278
|
return t[0];
|
|
1279
1279
|
}).then(e);
|
|
1280
|
-
},
|
|
1280
|
+
}, W.prototype.lastKey = function(e) {
|
|
1281
1281
|
return this.reverse().firstKey(e);
|
|
1282
|
-
},
|
|
1282
|
+
}, W.prototype.distinct = function() {
|
|
1283
1283
|
var e = this._ctx, e = e.index && e.table.schema.idxByName[e.index];
|
|
1284
1284
|
if (!e || !e.multi)
|
|
1285
1285
|
return this;
|
|
@@ -1288,14 +1288,14 @@ var Rr = { exports: {} };
|
|
|
1288
1288
|
var r = i.primaryKey.toString(), i = ie(t, r);
|
|
1289
1289
|
return t[r] = !0, !i;
|
|
1290
1290
|
}), this;
|
|
1291
|
-
},
|
|
1291
|
+
}, W.prototype.modify = function(e) {
|
|
1292
1292
|
var t = this, n = this._ctx;
|
|
1293
1293
|
return this._write(function(r) {
|
|
1294
1294
|
var i, a, s;
|
|
1295
1295
|
s = typeof e == "function" ? e : (i = B(e), a = i.length, function(g) {
|
|
1296
1296
|
for (var _ = !1, S = 0; S < a; ++S) {
|
|
1297
1297
|
var E = i[S], O = e[E];
|
|
1298
|
-
ve(g, E) !== O && (
|
|
1298
|
+
ve(g, E) !== O && (fe(g, E, O), _ = !0);
|
|
1299
1299
|
}
|
|
1300
1300
|
return _;
|
|
1301
1301
|
});
|
|
@@ -1303,34 +1303,34 @@ var Rr = { exports: {} };
|
|
|
1303
1303
|
var S = E.failures, E = E.numFailures;
|
|
1304
1304
|
m += g - E;
|
|
1305
1305
|
for (var O = 0, k = B(S); O < k.length; O++) {
|
|
1306
|
-
var
|
|
1307
|
-
p.push(S[
|
|
1306
|
+
var I = k[O];
|
|
1307
|
+
p.push(S[I]);
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
1310
|
-
var h = n.table.core,
|
|
1310
|
+
var h = n.table.core, f = h.schema.primaryKey, v = f.outbound, c = f.extractKey, d = t.db._options.modifyChunkSize || 200, p = [], m = 0, w = [];
|
|
1311
1311
|
return t.clone().primaryKeys().then(function(g) {
|
|
1312
1312
|
function _(S) {
|
|
1313
|
-
var E = Math.min(
|
|
1313
|
+
var E = Math.min(d, g.length - S);
|
|
1314
1314
|
return h.getMany({ trans: r, keys: g.slice(S, S + E), cache: "immutable" }).then(function(O) {
|
|
1315
|
-
for (var k = [],
|
|
1315
|
+
for (var k = [], I = [], A = v ? [] : null, T = [], D = 0; D < E; ++D) {
|
|
1316
1316
|
var L = O[D], F = { value: Ae(L), primKey: g[S + D] };
|
|
1317
|
-
s.call(F, F.value, F) !== !1 && (F.value == null ? T.push(g[S + D]) :
|
|
1317
|
+
s.call(F, F.value, F) !== !1 && (F.value == null ? T.push(g[S + D]) : v || z(c(L), c(F.value)) === 0 ? (I.push(F.value), v && A.push(g[S + D])) : (T.push(g[S + D]), k.push(F.value)));
|
|
1318
1318
|
}
|
|
1319
1319
|
var Y = qe(n) && n.limit === 1 / 0 && (typeof e != "function" || e === gn) && { index: n.index, range: n.range };
|
|
1320
|
-
return Promise.resolve(0 < k.length && h.mutate({ trans: r, type: "add", values: k }).then(function(
|
|
1321
|
-
for (var Q in
|
|
1320
|
+
return Promise.resolve(0 < k.length && h.mutate({ trans: r, type: "add", values: k }).then(function($) {
|
|
1321
|
+
for (var Q in $.failures)
|
|
1322
1322
|
T.splice(parseInt(Q), 1);
|
|
1323
|
-
u(k.length,
|
|
1323
|
+
u(k.length, $);
|
|
1324
1324
|
})).then(function() {
|
|
1325
|
-
return (0 <
|
|
1326
|
-
return u(
|
|
1325
|
+
return (0 < I.length || Y && typeof e == "object") && h.mutate({ trans: r, type: "put", keys: A, values: I, criteria: Y, changeSpec: typeof e != "function" && e }).then(function($) {
|
|
1326
|
+
return u(I.length, $);
|
|
1327
1327
|
});
|
|
1328
1328
|
}).then(function() {
|
|
1329
|
-
return (0 < T.length || Y && e === gn) && h.mutate({ trans: r, type: "delete", keys: T, criteria: Y }).then(function(
|
|
1330
|
-
return u(T.length,
|
|
1329
|
+
return (0 < T.length || Y && e === gn) && h.mutate({ trans: r, type: "delete", keys: T, criteria: Y }).then(function($) {
|
|
1330
|
+
return u(T.length, $);
|
|
1331
1331
|
});
|
|
1332
1332
|
}).then(function() {
|
|
1333
|
-
return g.length > S + E && _(S +
|
|
1333
|
+
return g.length > S + E && _(S + d);
|
|
1334
1334
|
});
|
|
1335
1335
|
});
|
|
1336
1336
|
}
|
|
@@ -1341,7 +1341,7 @@ var Rr = { exports: {} };
|
|
|
1341
1341
|
});
|
|
1342
1342
|
});
|
|
1343
1343
|
});
|
|
1344
|
-
},
|
|
1344
|
+
}, W.prototype.delete = function() {
|
|
1345
1345
|
var e = this._ctx, t = e.range;
|
|
1346
1346
|
return qe(e) && (e.isPrimKey || t.type === 3) ? this._write(function(n) {
|
|
1347
1347
|
var r = e.table.core.schema.primaryKey, i = t;
|
|
@@ -1356,8 +1356,8 @@ var Rr = { exports: {} };
|
|
|
1356
1356
|
});
|
|
1357
1357
|
});
|
|
1358
1358
|
}) : this.modify(gn);
|
|
1359
|
-
},
|
|
1360
|
-
function
|
|
1359
|
+
}, W);
|
|
1360
|
+
function W() {
|
|
1361
1361
|
}
|
|
1362
1362
|
var gn = function(e, t) {
|
|
1363
1363
|
return t.value = null;
|
|
@@ -1377,12 +1377,12 @@ var Rr = { exports: {} };
|
|
|
1377
1377
|
}).limit(0);
|
|
1378
1378
|
}
|
|
1379
1379
|
function Mt(e, t, n, r) {
|
|
1380
|
-
var i, a, s, u, h,
|
|
1380
|
+
var i, a, s, u, h, f, v, c = n.length;
|
|
1381
1381
|
if (!n.every(function(m) {
|
|
1382
1382
|
return typeof m == "string";
|
|
1383
1383
|
}))
|
|
1384
1384
|
return ce(e, or);
|
|
1385
|
-
function
|
|
1385
|
+
function d(m) {
|
|
1386
1386
|
i = m === "next" ? function(g) {
|
|
1387
1387
|
return g.toUpperCase();
|
|
1388
1388
|
} : function(g) {
|
|
@@ -1401,12 +1401,12 @@ var Rr = { exports: {} };
|
|
|
1401
1401
|
return g.upper;
|
|
1402
1402
|
}), h = w.map(function(g) {
|
|
1403
1403
|
return g.lower;
|
|
1404
|
-
}),
|
|
1404
|
+
}), v = (f = m) === "next" ? "" : r;
|
|
1405
1405
|
}
|
|
1406
|
-
|
|
1406
|
+
d("next"), e = new e.Collection(e, function() {
|
|
1407
1407
|
return Re(u[0], h[c - 1] + r);
|
|
1408
1408
|
}), e._ondirectionchange = function(m) {
|
|
1409
|
-
|
|
1409
|
+
d(m);
|
|
1410
1410
|
};
|
|
1411
1411
|
var p = 0;
|
|
1412
1412
|
return e._addAlgorithm(function(m, w, g) {
|
|
@@ -1417,19 +1417,19 @@ var Rr = { exports: {} };
|
|
|
1417
1417
|
if (t(S, h, p))
|
|
1418
1418
|
return !0;
|
|
1419
1419
|
for (var E = null, O = p; O < c; ++O) {
|
|
1420
|
-
var k = function(
|
|
1421
|
-
for (var Y = Math.min(
|
|
1420
|
+
var k = function(I, A, T, D, L, F) {
|
|
1421
|
+
for (var Y = Math.min(I.length, D.length), $ = -1, Q = 0; Q < Y; ++Q) {
|
|
1422
1422
|
var le = A[Q];
|
|
1423
1423
|
if (le !== D[Q])
|
|
1424
|
-
return L(
|
|
1425
|
-
L(
|
|
1424
|
+
return L(I[Q], T[Q]) < 0 ? I.substr(0, Q) + T[Q] + T.substr(Q + 1) : L(I[Q], D[Q]) < 0 ? I.substr(0, Q) + D[Q] + T.substr(Q + 1) : 0 <= $ ? I.substr(0, $) + A[$] + T.substr($ + 1) : null;
|
|
1425
|
+
L(I[Q], le) < 0 && ($ = Q);
|
|
1426
1426
|
}
|
|
1427
|
-
return Y < D.length && F === "next" ?
|
|
1428
|
-
}(_, S, u[O], h[O], s,
|
|
1427
|
+
return Y < D.length && F === "next" ? I + T.substr(I.length) : Y < I.length && F === "prev" ? I.substr(0, T.length) : $ < 0 ? null : I.substr(0, $) + D[$] + T.substr($ + 1);
|
|
1428
|
+
}(_, S, u[O], h[O], s, f);
|
|
1429
1429
|
k === null && E === null ? p = O + 1 : (E === null || 0 < s(E, k)) && (E = k);
|
|
1430
1430
|
}
|
|
1431
1431
|
return w(E !== null ? function() {
|
|
1432
|
-
m.continue(E +
|
|
1432
|
+
m.continue(E + v);
|
|
1433
1433
|
} : g), !1;
|
|
1434
1434
|
}), e;
|
|
1435
1435
|
}
|
|
@@ -1539,43 +1539,43 @@ var Rr = { exports: {} };
|
|
|
1539
1539
|
return S[0] !== void 0 && S[1] !== void 0 && i(S[0], S[1]) <= 0;
|
|
1540
1540
|
}))
|
|
1541
1541
|
return ce(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", G.InvalidArgument);
|
|
1542
|
-
var h = !t || t.includeLowers !== !1,
|
|
1543
|
-
function
|
|
1542
|
+
var h = !t || t.includeLowers !== !1, f = t && t.includeUppers === !0, v, c = i;
|
|
1543
|
+
function d(S, E) {
|
|
1544
1544
|
return c(S[0], E[0]);
|
|
1545
1545
|
}
|
|
1546
1546
|
try {
|
|
1547
|
-
(
|
|
1547
|
+
(v = _.reduce(function(S, E) {
|
|
1548
1548
|
for (var O = 0, k = S.length; O < k; ++O) {
|
|
1549
|
-
var
|
|
1550
|
-
if (r(E[0],
|
|
1551
|
-
|
|
1549
|
+
var I = S[O];
|
|
1550
|
+
if (r(E[0], I[1]) < 0 && 0 < r(E[1], I[0])) {
|
|
1551
|
+
I[0] = s(I[0], E[0]), I[1] = u(I[1], E[1]);
|
|
1552
1552
|
break;
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
1555
1555
|
return O === k && S.push(E), S;
|
|
1556
|
-
}, [])).sort(
|
|
1556
|
+
}, [])).sort(d);
|
|
1557
1557
|
} catch {
|
|
1558
1558
|
return ce(this, _e);
|
|
1559
1559
|
}
|
|
1560
|
-
var p = 0, m =
|
|
1561
|
-
return 0 < i(S,
|
|
1560
|
+
var p = 0, m = f ? function(S) {
|
|
1561
|
+
return 0 < i(S, v[p][1]);
|
|
1562
1562
|
} : function(S) {
|
|
1563
|
-
return 0 <= i(S,
|
|
1563
|
+
return 0 <= i(S, v[p][1]);
|
|
1564
1564
|
}, w = h ? function(S) {
|
|
1565
|
-
return 0 < a(S,
|
|
1565
|
+
return 0 < a(S, v[p][0]);
|
|
1566
1566
|
} : function(S) {
|
|
1567
|
-
return 0 <= a(S,
|
|
1567
|
+
return 0 <= a(S, v[p][0]);
|
|
1568
1568
|
}, g = m, _ = new this.Collection(this, function() {
|
|
1569
|
-
return Re(
|
|
1569
|
+
return Re(v[0][0], v[v.length - 1][1], !h, !f);
|
|
1570
1570
|
});
|
|
1571
1571
|
return _._ondirectionchange = function(S) {
|
|
1572
|
-
c = S === "next" ? (g = m, i) : (g = w, a),
|
|
1572
|
+
c = S === "next" ? (g = m, i) : (g = w, a), v.sort(d);
|
|
1573
1573
|
}, _._addAlgorithm(function(S, E, O) {
|
|
1574
|
-
for (var k,
|
|
1575
|
-
if (++p ===
|
|
1574
|
+
for (var k, I = S.key; g(I); )
|
|
1575
|
+
if (++p === v.length)
|
|
1576
1576
|
return E(O), !1;
|
|
1577
|
-
return !m(k =
|
|
1578
|
-
c === i ? S.continue(
|
|
1577
|
+
return !m(k = I) && !w(k) || (n._cmp(I, v[p][1]) === 0 || n._cmp(I, v[p][0]) === 0 || E(function() {
|
|
1578
|
+
c === i ? S.continue(v[p][0]) : S.continue(v[p][1]);
|
|
1579
1579
|
}), !1);
|
|
1580
1580
|
}), _;
|
|
1581
1581
|
}, re.prototype.startsWithAnyOf = function() {
|
|
@@ -1596,7 +1596,7 @@ var Rr = { exports: {} };
|
|
|
1596
1596
|
function ht(e) {
|
|
1597
1597
|
e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
|
|
1598
1598
|
}
|
|
1599
|
-
var pt = "storagemutated", yn = "x-storagemutated-1", Te =
|
|
1599
|
+
var pt = "storagemutated", yn = "x-storagemutated-1", Te = ft(null, pt), ai = (me.prototype._lock = function() {
|
|
1600
1600
|
return rt(!K.global), ++this._reculock, this._reculock !== 1 || K.global || (K.lockOwnerFor = this), this;
|
|
1601
1601
|
}, me.prototype._unlock = function() {
|
|
1602
1602
|
if (rt(!K.global), --this._reculock == 0)
|
|
@@ -1747,11 +1747,11 @@ var Rr = { exports: {} };
|
|
|
1747
1747
|
var p = g.lower, m = g.upper, w = g.lowerOpen, g = g.upperOpen;
|
|
1748
1748
|
return p === void 0 ? m === void 0 ? null : t.upperBound(m, !!g) : m === void 0 ? t.lowerBound(p, !!w) : t.bound(p, m, !!w, !!g);
|
|
1749
1749
|
}
|
|
1750
|
-
function i(
|
|
1751
|
-
var p, m =
|
|
1752
|
-
return { name: m, schema:
|
|
1750
|
+
function i(d) {
|
|
1751
|
+
var p, m = d.name;
|
|
1752
|
+
return { name: m, schema: d, mutate: function(w) {
|
|
1753
1753
|
var g = w.trans, _ = w.type, S = w.keys, E = w.values, O = w.range;
|
|
1754
|
-
return new Promise(function(k,
|
|
1754
|
+
return new Promise(function(k, I) {
|
|
1755
1755
|
k = J(k);
|
|
1756
1756
|
var A = g.objectStore(m), T = A.keyPath == null, D = _ === "put" || _ === "add";
|
|
1757
1757
|
if (!D && _ !== "delete" && _ !== "deleteRange")
|
|
@@ -1764,25 +1764,25 @@ var Rr = { exports: {} };
|
|
|
1764
1764
|
function Y(ue) {
|
|
1765
1765
|
++le, ht(ue);
|
|
1766
1766
|
}
|
|
1767
|
-
var
|
|
1767
|
+
var $ = [], Q = [], le = 0;
|
|
1768
1768
|
if (_ === "deleteRange") {
|
|
1769
1769
|
if (O.type === 4)
|
|
1770
1770
|
return k({ numFailures: le, failures: Q, results: [], lastResult: void 0 });
|
|
1771
|
-
O.type === 3 ?
|
|
1771
|
+
O.type === 3 ? $.push(L = A.clear()) : $.push(L = A.delete(r(O)));
|
|
1772
1772
|
} else {
|
|
1773
1773
|
var T = D ? T ? [E, S] : [E, null] : [S, null], U = T[0], Ee = T[1];
|
|
1774
1774
|
if (D)
|
|
1775
1775
|
for (var ae = 0; ae < F; ++ae)
|
|
1776
|
-
|
|
1776
|
+
$.push(L = Ee && Ee[ae] !== void 0 ? A[_](U[ae], Ee[ae]) : A[_](U[ae])), L.onerror = Y;
|
|
1777
1777
|
else
|
|
1778
1778
|
for (ae = 0; ae < F; ++ae)
|
|
1779
|
-
|
|
1779
|
+
$.push(L = A[_](U[ae])), L.onerror = Y;
|
|
1780
1780
|
}
|
|
1781
1781
|
function Qt(ue) {
|
|
1782
|
-
ue = ue.target.result,
|
|
1783
|
-
return
|
|
1784
|
-
}), k({ numFailures: le, failures: Q, results: _ === "delete" ? S :
|
|
1785
|
-
return
|
|
1782
|
+
ue = ue.target.result, $.forEach(function(We, Nn) {
|
|
1783
|
+
return We.error != null && (Q[Nn] = We.error);
|
|
1784
|
+
}), k({ numFailures: le, failures: Q, results: _ === "delete" ? S : $.map(function(We) {
|
|
1785
|
+
return We.result;
|
|
1786
1786
|
}), lastResult: ue });
|
|
1787
1787
|
}
|
|
1788
1788
|
L.onerror = function(ue) {
|
|
@@ -1793,9 +1793,9 @@ var Rr = { exports: {} };
|
|
|
1793
1793
|
var g = w.trans, _ = w.keys;
|
|
1794
1794
|
return new Promise(function(S, E) {
|
|
1795
1795
|
S = J(S);
|
|
1796
|
-
for (var O, k = g.objectStore(m),
|
|
1797
|
-
|
|
1798
|
-
}, F = ye(E), Y = 0; Y <
|
|
1796
|
+
for (var O, k = g.objectStore(m), I = _.length, A = new Array(I), T = 0, D = 0, L = function($) {
|
|
1797
|
+
$ = $.target, A[$._pos] = $.result, ++D === T && S(A);
|
|
1798
|
+
}, F = ye(E), Y = 0; Y < I; ++Y)
|
|
1799
1799
|
_[Y] != null && ((O = k.get(_[Y]))._pos = Y, O.onsuccess = L, O.onerror = F, ++T);
|
|
1800
1800
|
T === 0 && S(A);
|
|
1801
1801
|
});
|
|
@@ -1808,31 +1808,31 @@ var Rr = { exports: {} };
|
|
|
1808
1808
|
return S(k.target.result);
|
|
1809
1809
|
}, O.onerror = ye(E);
|
|
1810
1810
|
});
|
|
1811
|
-
}, query: (p =
|
|
1811
|
+
}, query: (p = f, function(w) {
|
|
1812
1812
|
return new Promise(function(g, _) {
|
|
1813
1813
|
g = J(g);
|
|
1814
|
-
var S, E, O, T = w.trans, k = w.values,
|
|
1815
|
-
if (
|
|
1814
|
+
var S, E, O, T = w.trans, k = w.values, I = w.limit, L = w.query, A = I === 1 / 0 ? void 0 : I, D = L.index, L = L.range, T = T.objectStore(m), D = D.isPrimaryKey ? T : T.index(D.name), L = r(L);
|
|
1815
|
+
if (I === 0)
|
|
1816
1816
|
return g({ result: [] });
|
|
1817
1817
|
p ? ((A = k ? D.getAll(L, A) : D.getAllKeys(L, A)).onsuccess = function(F) {
|
|
1818
1818
|
return g({ result: F.target.result });
|
|
1819
1819
|
}, A.onerror = ye(_)) : (S = 0, E = !k && "openKeyCursor" in D ? D.openKeyCursor(L) : D.openCursor(L), O = [], E.onsuccess = function(F) {
|
|
1820
1820
|
var Y = E.result;
|
|
1821
|
-
return Y ? (O.push(k ? Y.value : Y.primaryKey), ++S ===
|
|
1821
|
+
return Y ? (O.push(k ? Y.value : Y.primaryKey), ++S === I ? g({ result: O }) : void Y.continue()) : g({ result: O });
|
|
1822
1822
|
}, E.onerror = ye(_));
|
|
1823
1823
|
});
|
|
1824
1824
|
}), openCursor: function(w) {
|
|
1825
1825
|
var g = w.trans, _ = w.values, S = w.query, E = w.reverse, O = w.unique;
|
|
1826
|
-
return new Promise(function(k,
|
|
1826
|
+
return new Promise(function(k, I) {
|
|
1827
1827
|
k = J(k);
|
|
1828
1828
|
var D = S.index, A = S.range, T = g.objectStore(m), T = D.isPrimaryKey ? T : T.index(D.name), D = E ? O ? "prevunique" : "prev" : O ? "nextunique" : "next", L = !_ && "openKeyCursor" in T ? T.openKeyCursor(r(A), D) : T.openCursor(r(A), D);
|
|
1829
|
-
L.onerror = ye(
|
|
1830
|
-
var Y,
|
|
1831
|
-
U ? (U.___id = ++si, U.done = !1, Y = U.continue.bind(U),
|
|
1829
|
+
L.onerror = ye(I), L.onsuccess = J(function(F) {
|
|
1830
|
+
var Y, $, Q, le, U = L.result;
|
|
1831
|
+
U ? (U.___id = ++si, U.done = !1, Y = U.continue.bind(U), $ = ($ = U.continuePrimaryKey) && $.bind(U), Q = U.advance.bind(U), le = function() {
|
|
1832
1832
|
throw new Error("Cursor not stopped");
|
|
1833
1833
|
}, U.trans = g, U.stop = U.continue = U.continuePrimaryKey = U.advance = function() {
|
|
1834
1834
|
throw new Error("Cursor not started");
|
|
1835
|
-
}, U.fail = J(
|
|
1835
|
+
}, U.fail = J(I), U.next = function() {
|
|
1836
1836
|
var Ee = this, ae = 1;
|
|
1837
1837
|
return this.start(function() {
|
|
1838
1838
|
return ae-- ? Ee.continue() : Ee.stop();
|
|
@@ -1852,32 +1852,32 @@ var Rr = { exports: {} };
|
|
|
1852
1852
|
throw new Error("Cursor behind last entry");
|
|
1853
1853
|
}, U.stop();
|
|
1854
1854
|
}
|
|
1855
|
-
var Qt = new Promise(function(ue,
|
|
1856
|
-
ue = J(ue), L.onerror = ye(
|
|
1855
|
+
var Qt = new Promise(function(ue, We) {
|
|
1856
|
+
ue = J(ue), L.onerror = ye(We), U.fail = We, U.stop = function(Nn) {
|
|
1857
1857
|
U.stop = U.continue = U.continuePrimaryKey = U.advance = le, ue(Nn);
|
|
1858
1858
|
};
|
|
1859
1859
|
});
|
|
1860
1860
|
return L.onsuccess = J(function(ue) {
|
|
1861
1861
|
L.onsuccess = ae, ae();
|
|
1862
|
-
}), U.continue = Y, U.continuePrimaryKey =
|
|
1862
|
+
}), U.continue = Y, U.continuePrimaryKey = $, U.advance = Q, ae(), Qt;
|
|
1863
1863
|
}, k(U)) : k(null);
|
|
1864
|
-
},
|
|
1864
|
+
}, I);
|
|
1865
1865
|
});
|
|
1866
1866
|
}, count: function(w) {
|
|
1867
1867
|
var g = w.query, _ = w.trans, S = g.index, E = g.range;
|
|
1868
1868
|
return new Promise(function(O, k) {
|
|
1869
|
-
var
|
|
1869
|
+
var I = _.objectStore(m), A = S.isPrimaryKey ? I : I.index(S.name), I = r(E), A = I ? A.count(I) : A.count();
|
|
1870
1870
|
A.onsuccess = J(function(T) {
|
|
1871
1871
|
return O(T.target.result);
|
|
1872
1872
|
}), A.onerror = ye(k);
|
|
1873
1873
|
});
|
|
1874
1874
|
} };
|
|
1875
1875
|
}
|
|
1876
|
-
var a, s, u,
|
|
1877
|
-
return s.objectStore(
|
|
1878
|
-
}).map(function(
|
|
1879
|
-
var p =
|
|
1880
|
-
return
|
|
1876
|
+
var a, s, u, v = (s = h, u = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: u.map(function(d) {
|
|
1877
|
+
return s.objectStore(d);
|
|
1878
|
+
}).map(function(d) {
|
|
1879
|
+
var p = d.keyPath, g = d.autoIncrement, m = N(p), w = {}, g = { name: d.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: m, keyPath: p, autoIncrement: g, unique: !0, extractKey: vn(p) }, indexes: yr(d.indexNames).map(function(_) {
|
|
1880
|
+
return d.index(_);
|
|
1881
1881
|
}).map(function(O) {
|
|
1882
1882
|
var S = O.name, E = O.unique, k = O.multiEntry, O = O.keyPath, k = { name: S, compound: N(O), keyPath: O, unique: E, multiEntry: k, extractKey: vn(O) };
|
|
1883
1883
|
return w[yt(O)] = k;
|
|
@@ -1885,13 +1885,13 @@ var Rr = { exports: {} };
|
|
|
1885
1885
|
return w[yt(_)];
|
|
1886
1886
|
} };
|
|
1887
1887
|
return w[":id"] = g.primaryKey, p != null && (w[yt(p)] = g.primaryKey), g;
|
|
1888
|
-
}) }, hasGetAll: 0 < u.length && "getAll" in s.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), h =
|
|
1889
|
-
return
|
|
1890
|
-
return c[
|
|
1891
|
-
}), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(
|
|
1892
|
-
if (!c[
|
|
1893
|
-
throw new Error("Table '".concat(
|
|
1894
|
-
return c[
|
|
1888
|
+
}) }, hasGetAll: 0 < u.length && "getAll" in s.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), h = v.schema, f = v.hasGetAll, v = h.tables.map(i), c = {};
|
|
1889
|
+
return v.forEach(function(d) {
|
|
1890
|
+
return c[d.name] = d;
|
|
1891
|
+
}), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(d) {
|
|
1892
|
+
if (!c[d])
|
|
1893
|
+
throw new Error("Table '".concat(d, "' not found"));
|
|
1894
|
+
return c[d];
|
|
1895
1895
|
}, MIN_KEY: -1 / 0, MAX_KEY: gt(t), schema: h };
|
|
1896
1896
|
}
|
|
1897
1897
|
function ci(e, t, n, r) {
|
|
@@ -1913,13 +1913,13 @@ var Rr = { exports: {} };
|
|
|
1913
1913
|
n.forEach(function(i) {
|
|
1914
1914
|
var a = r[i];
|
|
1915
1915
|
t.forEach(function(s) {
|
|
1916
|
-
var u = function h(
|
|
1917
|
-
return Gr(
|
|
1916
|
+
var u = function h(f, v) {
|
|
1917
|
+
return Gr(f, v) || (f = te(f)) && h(f, v);
|
|
1918
1918
|
}(s, i);
|
|
1919
1919
|
(!u || "value" in u && u.value === void 0) && (s === e.Transaction.prototype || s instanceof e.Transaction ? ke(s, i, { get: function() {
|
|
1920
1920
|
return this.table(i);
|
|
1921
1921
|
}, set: function(h) {
|
|
1922
|
-
|
|
1922
|
+
zn(this, i, { value: h, writable: !0, configurable: !0, enumerable: !0 });
|
|
1923
1923
|
} }) : s[i] = new e.Table(i, a));
|
|
1924
1924
|
});
|
|
1925
1925
|
});
|
|
@@ -1933,19 +1933,19 @@ var Rr = { exports: {} };
|
|
|
1933
1933
|
function li(e, t) {
|
|
1934
1934
|
return e._cfg.version - t._cfg.version;
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1936
|
+
function fi(e, t, n, r) {
|
|
1937
1937
|
var i = e._dbSchema;
|
|
1938
1938
|
n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = bn("$meta", br("")[0], []), e._storeNames.push("$meta"));
|
|
1939
1939
|
var a = e._createTransaction("readwrite", e._storeNames, i);
|
|
1940
1940
|
a.create(n), a._completion.catch(r);
|
|
1941
1941
|
var s = a._reject.bind(a), u = K.transless || K;
|
|
1942
1942
|
Pe(function() {
|
|
1943
|
-
return K.trans = a, K.transless = u, t !== 0 ? (Kt(e, n),
|
|
1944
|
-
return
|
|
1945
|
-
}) : j.resolve(
|
|
1946
|
-
return
|
|
1947
|
-
return _._cfg.version >=
|
|
1948
|
-
})).length !== 0 ? (
|
|
1943
|
+
return K.trans = a, K.transless = u, t !== 0 ? (Kt(e, n), f = t, ((h = a).storeNames.includes("$meta") ? h.table("$meta").get("version").then(function(v) {
|
|
1944
|
+
return v ?? f;
|
|
1945
|
+
}) : j.resolve(f)).then(function(v) {
|
|
1946
|
+
return d = v, p = a, m = n, w = [], v = (c = e)._versions, g = c._dbSchema = Lt(0, c.idbdb, m), (v = v.filter(function(_) {
|
|
1947
|
+
return _._cfg.version >= d;
|
|
1948
|
+
})).length !== 0 ? (v.forEach(function(_) {
|
|
1949
1949
|
w.push(function() {
|
|
1950
1950
|
var S = g, E = _._cfg.dbschema;
|
|
1951
1951
|
Gt(c, S, m), Gt(c, E, m), g = c._dbSchema = E;
|
|
@@ -1965,24 +1965,24 @@ var Rr = { exports: {} };
|
|
|
1965
1965
|
});
|
|
1966
1966
|
});
|
|
1967
1967
|
var k = _._cfg.contentUpgrade;
|
|
1968
|
-
if (k && _._cfg.version >
|
|
1968
|
+
if (k && _._cfg.version > d) {
|
|
1969
1969
|
Kt(c, m), p._memoizedTables = {};
|
|
1970
|
-
var
|
|
1970
|
+
var I = Qn(E);
|
|
1971
1971
|
O.del.forEach(function(D) {
|
|
1972
|
-
|
|
1973
|
-
}), wn(c, [c.Transaction.prototype]), Bt(c, [c.Transaction.prototype], B(
|
|
1972
|
+
I[D] = S[D];
|
|
1973
|
+
}), wn(c, [c.Transaction.prototype]), Bt(c, [c.Transaction.prototype], B(I), I), p.schema = I;
|
|
1974
1974
|
var A, T = qt(k);
|
|
1975
1975
|
return T && Je(), O = j.follow(function() {
|
|
1976
1976
|
var D;
|
|
1977
|
-
(A = k(p)) && T && (D =
|
|
1977
|
+
(A = k(p)) && T && (D = Ce.bind(null, null), A.then(D, D));
|
|
1978
1978
|
}), A && typeof A.then == "function" ? j.resolve(A) : O.then(function() {
|
|
1979
1979
|
return A;
|
|
1980
1980
|
});
|
|
1981
1981
|
}
|
|
1982
1982
|
}), w.push(function(S) {
|
|
1983
1983
|
var E, O, k = _._cfg.dbschema;
|
|
1984
|
-
E = k, O = S, [].slice.call(O.db.objectStoreNames).forEach(function(
|
|
1985
|
-
return E[
|
|
1984
|
+
E = k, O = S, [].slice.call(O.db.objectStoreNames).forEach(function(I) {
|
|
1985
|
+
return E[I] == null && O.db.deleteObjectStore(I);
|
|
1986
1986
|
}), wn(c, [c.Transaction.prototype]), Bt(c, [c.Transaction.prototype], c._storeNames, c._dbSchema), p.schema = c._dbSchema;
|
|
1987
1987
|
}), w.push(function(S) {
|
|
1988
1988
|
c.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(c.idbdb.version / 10) === _._cfg.version ? (c.idbdb.deleteObjectStore("$meta"), delete c._dbSchema.$meta, c._storeNames = c._storeNames.filter(function(E) {
|
|
@@ -1994,16 +1994,16 @@ var Rr = { exports: {} };
|
|
|
1994
1994
|
}().then(function() {
|
|
1995
1995
|
mr(g, m);
|
|
1996
1996
|
})) : j.resolve();
|
|
1997
|
-
var c,
|
|
1998
|
-
}).catch(s)) : (B(i).forEach(function(
|
|
1999
|
-
Sn(n,
|
|
1997
|
+
var c, d, p, m, w, g;
|
|
1998
|
+
}).catch(s)) : (B(i).forEach(function(v) {
|
|
1999
|
+
Sn(n, v, i[v].primKey, i[v].indexes);
|
|
2000
2000
|
}), Kt(e, n), void j.follow(function() {
|
|
2001
2001
|
return e.on.populate.fire(a);
|
|
2002
2002
|
}).catch(s));
|
|
2003
|
-
var h,
|
|
2003
|
+
var h, f;
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
|
-
function
|
|
2006
|
+
function di(e, t) {
|
|
2007
2007
|
mr(e._dbSchema, t), t.db.version % 10 != 0 || t.objectStoreNames.contains("$meta") || t.db.createObjectStore("$meta").add(Math.ceil(t.db.version / 10 - 1), "version");
|
|
2008
2008
|
var n = Lt(0, e.idbdb, t);
|
|
2009
2009
|
Gt(e, e._dbSchema, t);
|
|
@@ -2031,12 +2031,12 @@ var Rr = { exports: {} };
|
|
|
2031
2031
|
if ("" + (i.primKey.keyPath || "") != "" + (a.primKey.keyPath || "") || i.primKey.auto !== a.primKey.auto)
|
|
2032
2032
|
s.recreate = !0, r.change.push(s);
|
|
2033
2033
|
else {
|
|
2034
|
-
var u = i.idxByName, h = a.idxByName,
|
|
2035
|
-
for (
|
|
2036
|
-
h[
|
|
2037
|
-
for (
|
|
2038
|
-
var
|
|
2039
|
-
|
|
2034
|
+
var u = i.idxByName, h = a.idxByName, f = void 0;
|
|
2035
|
+
for (f in u)
|
|
2036
|
+
h[f] || s.del.push(f);
|
|
2037
|
+
for (f in h) {
|
|
2038
|
+
var v = u[f], c = h[f];
|
|
2039
|
+
v ? v.src !== c.src && s.change.push(c) : s.add.push(c);
|
|
2040
2040
|
}
|
|
2041
2041
|
(0 < s.del.length || 0 < s.add.length || 0 < s.change.length) && r.change.push(s);
|
|
2042
2042
|
}
|
|
@@ -2062,9 +2062,9 @@ var Rr = { exports: {} };
|
|
|
2062
2062
|
function Lt(e, t, n) {
|
|
2063
2063
|
var r = {};
|
|
2064
2064
|
return wt(t.objectStoreNames, 0).forEach(function(i) {
|
|
2065
|
-
for (var a = n.objectStore(i), s = mn(gr(
|
|
2066
|
-
var
|
|
2067
|
-
u.push(
|
|
2065
|
+
for (var a = n.objectStore(i), s = mn(gr(f = a.keyPath), f || "", !0, !1, !!a.autoIncrement, f && typeof f != "string", !0), u = [], h = 0; h < a.indexNames.length; ++h) {
|
|
2066
|
+
var v = a.index(a.indexNames[h]), f = v.keyPath, v = mn(v.name, f, !!v.unique, !!v.multiEntry, !1, f && typeof f != "string", !1);
|
|
2067
|
+
u.push(v);
|
|
2068
2068
|
}
|
|
2069
2069
|
r[i] = bn(i, s, u);
|
|
2070
2070
|
}), r;
|
|
@@ -2074,8 +2074,8 @@ var Rr = { exports: {} };
|
|
|
2074
2074
|
var a = r[i], s = n.objectStore(a);
|
|
2075
2075
|
e._hasGetAll = "getAll" in s;
|
|
2076
2076
|
for (var u = 0; u < s.indexNames.length; ++u) {
|
|
2077
|
-
var h = s.indexNames[u],
|
|
2078
|
-
!t[a] || (
|
|
2077
|
+
var h = s.indexNames[u], f = s.index(h).keyPath, v = typeof f == "string" ? f : "[" + wt(f).join("+") + "]";
|
|
2078
|
+
!t[a] || (f = t[a].idxByName[v]) && (f.name = h, delete t[a].idxByName[v], t[a].idxByName[h] = f);
|
|
2079
2079
|
}
|
|
2080
2080
|
}
|
|
2081
2081
|
typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && R.WorkerGlobalScope && R instanceof R.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (e._hasGetAll = !1);
|
|
@@ -2114,7 +2114,7 @@ var Rr = { exports: {} };
|
|
|
2114
2114
|
}
|
|
2115
2115
|
function En(e, t) {
|
|
2116
2116
|
var n = e._dbNamesDB;
|
|
2117
|
-
return n || (n = e._dbNamesDB = new Se(
|
|
2117
|
+
return n || (n = e._dbNamesDB = new Se(It, { addons: [], indexedDB: e, IDBKeyRange: t })).version(1).stores({ dbnames: "name" }), n.table("dbnames");
|
|
2118
2118
|
}
|
|
2119
2119
|
function On(e) {
|
|
2120
2120
|
return e && typeof e.databases == "function";
|
|
@@ -2135,18 +2135,18 @@ var Rr = { exports: {} };
|
|
|
2135
2135
|
Z(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
|
|
2136
2136
|
};
|
|
2137
2137
|
function mt(e, t, n) {
|
|
2138
|
-
var r =
|
|
2138
|
+
var r = z(t, n);
|
|
2139
2139
|
if (!isNaN(r)) {
|
|
2140
2140
|
if (0 < r)
|
|
2141
2141
|
throw RangeError();
|
|
2142
2142
|
if (kn(e))
|
|
2143
2143
|
return Z(e, { from: t, to: n, d: 1 });
|
|
2144
2144
|
var i = e.l, r = e.r;
|
|
2145
|
-
if (
|
|
2145
|
+
if (z(n, e.from) < 0)
|
|
2146
2146
|
return i ? mt(i, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, vr(e);
|
|
2147
|
-
if (0 <
|
|
2147
|
+
if (0 < z(t, e.to))
|
|
2148
2148
|
return r ? mt(r, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, vr(e);
|
|
2149
|
-
|
|
2149
|
+
z(t, e.from) < 0 && (e.from = t, e.l = null, e.d = r ? r.d + 1 : 1), 0 < z(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, i && !e.l && bt(e, i), r && n && bt(e, r);
|
|
2150
2150
|
}
|
|
2151
2151
|
}
|
|
2152
2152
|
function bt(e, t) {
|
|
@@ -2160,9 +2160,9 @@ var Rr = { exports: {} };
|
|
|
2160
2160
|
if (r.done)
|
|
2161
2161
|
return !1;
|
|
2162
2162
|
for (var i = r.value, a = An(e), s = a.next(i.from), u = s.value; !r.done && !s.done; ) {
|
|
2163
|
-
if (
|
|
2163
|
+
if (z(u.from, i.to) <= 0 && 0 <= z(u.to, i.from))
|
|
2164
2164
|
return !0;
|
|
2165
|
-
|
|
2165
|
+
z(i.from, u.from) < 0 ? i = (r = n.next(u.from)).value : u = (s = a.next(i.from)).value;
|
|
2166
2166
|
}
|
|
2167
2167
|
return !1;
|
|
2168
2168
|
}
|
|
@@ -2173,13 +2173,13 @@ var Rr = { exports: {} };
|
|
|
2173
2173
|
switch (t.s) {
|
|
2174
2174
|
case 0:
|
|
2175
2175
|
if (t.s = 1, r)
|
|
2176
|
-
for (; t.n.l &&
|
|
2176
|
+
for (; t.n.l && z(n, t.n.from) < 0; )
|
|
2177
2177
|
t = { up: t, n: t.n.l, s: 1 };
|
|
2178
2178
|
else
|
|
2179
2179
|
for (; t.n.l; )
|
|
2180
2180
|
t = { up: t, n: t.n.l, s: 1 };
|
|
2181
2181
|
case 1:
|
|
2182
|
-
if (t.s = 2, !r ||
|
|
2182
|
+
if (t.s = 2, !r || z(n, t.n.to) <= 0)
|
|
2183
2183
|
return { value: t.n, done: !1 };
|
|
2184
2184
|
case 2:
|
|
2185
2185
|
if (t.n.r) {
|
|
@@ -2200,7 +2200,7 @@ var Rr = { exports: {} };
|
|
|
2200
2200
|
var t = n.r, n = n.l;
|
|
2201
2201
|
return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
|
|
2202
2202
|
}
|
|
2203
|
-
function
|
|
2203
|
+
function $t(e, t) {
|
|
2204
2204
|
return B(t).forEach(function(n) {
|
|
2205
2205
|
e[n] ? bt(e[n], t[n]) : e[n] = function r(i) {
|
|
2206
2206
|
var a, s, u = {};
|
|
@@ -2215,7 +2215,7 @@ var Rr = { exports: {} };
|
|
|
2215
2215
|
return t[n] && Ut(t[n], e[n]);
|
|
2216
2216
|
});
|
|
2217
2217
|
}
|
|
2218
|
-
xe(oe.prototype, ((
|
|
2218
|
+
xe(oe.prototype, ((de = { add: function(e) {
|
|
2219
2219
|
return bt(this, e), this;
|
|
2220
2220
|
}, addKey: function(e) {
|
|
2221
2221
|
return mt(this, e, e), this;
|
|
@@ -2226,14 +2226,14 @@ var Rr = { exports: {} };
|
|
|
2226
2226
|
}), this;
|
|
2227
2227
|
} })[Zt] = function() {
|
|
2228
2228
|
return An(this);
|
|
2229
|
-
},
|
|
2230
|
-
var Ue = {}, Pn = {},
|
|
2231
|
-
function
|
|
2232
|
-
|
|
2233
|
-
|
|
2229
|
+
}, de));
|
|
2230
|
+
var Ue = {}, Pn = {}, Cn = !1;
|
|
2231
|
+
function Wt(e) {
|
|
2232
|
+
$t(Pn, e), Cn || (Cn = !0, setTimeout(function() {
|
|
2233
|
+
Cn = !1, In(Pn, !(Pn = {}));
|
|
2234
2234
|
}, 0));
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2236
|
+
function In(e, t) {
|
|
2237
2237
|
t === void 0 && (t = !1);
|
|
2238
2238
|
var n = /* @__PURE__ */ new Set();
|
|
2239
2239
|
if (e.all)
|
|
@@ -2250,18 +2250,18 @@ var Rr = { exports: {} };
|
|
|
2250
2250
|
}
|
|
2251
2251
|
function _r(e, t, n, r) {
|
|
2252
2252
|
for (var i = [], a = 0, s = Object.entries(e.queries.query); a < s.length; a++) {
|
|
2253
|
-
for (var u = s[a], h = u[0],
|
|
2254
|
-
var
|
|
2255
|
-
Dn(t,
|
|
2253
|
+
for (var u = s[a], h = u[0], f = [], v = 0, c = u[1]; v < c.length; v++) {
|
|
2254
|
+
var d = c[v];
|
|
2255
|
+
Dn(t, d.obsSet) ? d.subscribers.forEach(function(g) {
|
|
2256
2256
|
return n.add(g);
|
|
2257
|
-
}) : r &&
|
|
2257
|
+
}) : r && f.push(d);
|
|
2258
2258
|
}
|
|
2259
|
-
r && i.push([h,
|
|
2259
|
+
r && i.push([h, f]);
|
|
2260
2260
|
}
|
|
2261
2261
|
if (r)
|
|
2262
2262
|
for (var p = 0, m = i; p < m.length; p++) {
|
|
2263
|
-
var w = m[p], h = w[0],
|
|
2264
|
-
e.queries.query[h] =
|
|
2263
|
+
var w = m[p], h = w[0], f = w[1];
|
|
2264
|
+
e.queries.query[h] = f;
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
2267
|
function pi(e) {
|
|
@@ -2277,7 +2277,7 @@ var Rr = { exports: {} };
|
|
|
2277
2277
|
throw new G.DatabaseClosed("db.open() was cancelled");
|
|
2278
2278
|
}
|
|
2279
2279
|
function u() {
|
|
2280
|
-
return new j(function(
|
|
2280
|
+
return new j(function(d, p) {
|
|
2281
2281
|
if (s(), !n)
|
|
2282
2282
|
throw new G.MissingAPI();
|
|
2283
2283
|
var m = e.name, w = t.autoSchema || !i ? n.open(m) : n.open(m, i);
|
|
@@ -2285,21 +2285,21 @@ var Rr = { exports: {} };
|
|
|
2285
2285
|
throw new G.MissingAPI();
|
|
2286
2286
|
w.onerror = ye(p), w.onblocked = J(e._fireOnBlocked), w.onupgradeneeded = J(function(g) {
|
|
2287
2287
|
var _;
|
|
2288
|
-
|
|
2288
|
+
v = w.transaction, t.autoSchema && !e._options.allowEmptyDB ? (w.onerror = ht, v.abort(), w.result.close(), (_ = n.deleteDatabase(m)).onsuccess = _.onerror = J(function() {
|
|
2289
2289
|
p(new G.NoSuchDatabase("Database ".concat(m, " doesnt exist")));
|
|
2290
|
-
})) : (
|
|
2290
|
+
})) : (v.onerror = ye(p), g = g.oldVersion > Math.pow(2, 62) ? 0 : g.oldVersion, c = g < 1, e.idbdb = w.result, a && di(e, v), fi(e, g / 10, v, p));
|
|
2291
2291
|
}, p), w.onsuccess = J(function() {
|
|
2292
|
-
|
|
2293
|
-
var g, _, S, E, O, k = e.idbdb = w.result,
|
|
2294
|
-
if (0 <
|
|
2292
|
+
v = null;
|
|
2293
|
+
var g, _, S, E, O, k = e.idbdb = w.result, I = wt(k.objectStoreNames);
|
|
2294
|
+
if (0 < I.length)
|
|
2295
2295
|
try {
|
|
2296
|
-
var A = k.transaction((E =
|
|
2296
|
+
var A = k.transaction((E = I).length === 1 ? E[0] : E, "readonly");
|
|
2297
2297
|
if (t.autoSchema)
|
|
2298
2298
|
_ = k, S = A, (g = e).verno = _.version / 10, S = g._dbSchema = Lt(0, _, S), g._storeNames = wt(_.objectStoreNames, 0), Bt(g, [g._allTables], B(S), S);
|
|
2299
2299
|
else if (Gt(e, e._dbSchema, A), ((O = _n(Lt(0, (O = e).idbdb, A), O._dbSchema)).add.length || O.change.some(function(T) {
|
|
2300
2300
|
return T.add.length || T.change.length;
|
|
2301
2301
|
})) && !a)
|
|
2302
|
-
return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), k.close(), i = k.version + 1, a = !0,
|
|
2302
|
+
return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), k.close(), i = k.version + 1, a = !0, d(u());
|
|
2303
2303
|
Kt(e, A);
|
|
2304
2304
|
} catch {
|
|
2305
2305
|
}
|
|
@@ -2307,10 +2307,10 @@ var Rr = { exports: {} };
|
|
|
2307
2307
|
t.vcFired = !0, e.on("versionchange").fire(T);
|
|
2308
2308
|
}), k.onclose = J(function(T) {
|
|
2309
2309
|
e.on("close").fire(T);
|
|
2310
|
-
}), c && (O = e._deps, A = m, k = O.indexedDB, O = O.IDBKeyRange, On(k) || A ===
|
|
2310
|
+
}), c && (O = e._deps, A = m, k = O.indexedDB, O = O.IDBKeyRange, On(k) || A === It || En(k, O).put({ name: A }).catch(H)), d();
|
|
2311
2311
|
}, p);
|
|
2312
|
-
}).catch(function(
|
|
2313
|
-
switch (
|
|
2312
|
+
}).catch(function(d) {
|
|
2313
|
+
switch (d == null ? void 0 : d.name) {
|
|
2314
2314
|
case "UnknownError":
|
|
2315
2315
|
if (0 < t.PR1398_maxLoop)
|
|
2316
2316
|
return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), u();
|
|
@@ -2319,13 +2319,13 @@ var Rr = { exports: {} };
|
|
|
2319
2319
|
if (0 < i)
|
|
2320
2320
|
return i = 0, u();
|
|
2321
2321
|
}
|
|
2322
|
-
return j.reject(
|
|
2322
|
+
return j.reject(d);
|
|
2323
2323
|
});
|
|
2324
2324
|
}
|
|
2325
|
-
var h,
|
|
2326
|
-
return j.race([r, (typeof navigator > "u" ? j.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(
|
|
2325
|
+
var h, f = t.dbReadyResolve, v = null, c = !1;
|
|
2326
|
+
return j.race([r, (typeof navigator > "u" ? j.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(d) {
|
|
2327
2327
|
function p() {
|
|
2328
|
-
return indexedDB.databases().finally(
|
|
2328
|
+
return indexedDB.databases().finally(d);
|
|
2329
2329
|
}
|
|
2330
2330
|
h = setInterval(p, 100), p();
|
|
2331
2331
|
}).finally(function() {
|
|
@@ -2333,32 +2333,32 @@ var Rr = { exports: {} };
|
|
|
2333
2333
|
}) : Promise.resolve()).then(u)]).then(function() {
|
|
2334
2334
|
return s(), t.onReadyBeingFired = [], j.resolve(xn(function() {
|
|
2335
2335
|
return e.on.ready.fire(e.vip);
|
|
2336
|
-
})).then(function
|
|
2336
|
+
})).then(function d() {
|
|
2337
2337
|
if (0 < t.onReadyBeingFired.length) {
|
|
2338
2338
|
var p = t.onReadyBeingFired.reduce(tn, H);
|
|
2339
2339
|
return t.onReadyBeingFired = [], j.resolve(xn(function() {
|
|
2340
2340
|
return p(e.vip);
|
|
2341
|
-
})).then(
|
|
2341
|
+
})).then(d);
|
|
2342
2342
|
}
|
|
2343
2343
|
});
|
|
2344
2344
|
}).finally(function() {
|
|
2345
2345
|
t.openCanceller === r && (t.onReadyBeingFired = null, t.isBeingOpened = !1);
|
|
2346
|
-
}).catch(function(
|
|
2347
|
-
t.dbOpenError =
|
|
2346
|
+
}).catch(function(d) {
|
|
2347
|
+
t.dbOpenError = d;
|
|
2348
2348
|
try {
|
|
2349
|
-
|
|
2349
|
+
v && v.abort();
|
|
2350
2350
|
} catch {
|
|
2351
2351
|
}
|
|
2352
|
-
return r === t.openCanceller && e._close(), q(
|
|
2352
|
+
return r === t.openCanceller && e._close(), q(d);
|
|
2353
2353
|
}).finally(function() {
|
|
2354
|
-
t.openComplete = !0,
|
|
2354
|
+
t.openComplete = !0, f();
|
|
2355
2355
|
}).then(function() {
|
|
2356
|
-
var
|
|
2357
|
-
return c && (
|
|
2356
|
+
var d;
|
|
2357
|
+
return c && (d = {}, e.tables.forEach(function(p) {
|
|
2358
2358
|
p.schema.indexes.forEach(function(m) {
|
|
2359
|
-
m.name && (
|
|
2360
|
-
}),
|
|
2361
|
-
}), Te(pt).fire(
|
|
2359
|
+
m.name && (d["idb://".concat(e.name, "/").concat(p.name, "/").concat(m.name)] = new oe(-1 / 0, [[[]]]));
|
|
2360
|
+
}), d["idb://".concat(e.name, "/").concat(p.name, "/")] = d["idb://".concat(e.name, "/").concat(p.name, "/:dels")] = new oe(-1 / 0, [[[]]]);
|
|
2361
|
+
}), Te(pt).fire(d), In(d, !0)), e;
|
|
2362
2362
|
});
|
|
2363
2363
|
}
|
|
2364
2364
|
function Rn(e) {
|
|
@@ -2376,7 +2376,7 @@ var Rr = { exports: {} };
|
|
|
2376
2376
|
}
|
|
2377
2377
|
return i(t)();
|
|
2378
2378
|
}
|
|
2379
|
-
function
|
|
2379
|
+
function zt(e, t, n) {
|
|
2380
2380
|
for (var r = N(e) ? e.slice() : [e], i = 0; i < n; ++i)
|
|
2381
2381
|
r.push(t);
|
|
2382
2382
|
return r;
|
|
@@ -2384,37 +2384,37 @@ var Rr = { exports: {} };
|
|
|
2384
2384
|
var gi = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
|
|
2385
2385
|
return y(y({}, e), { table: function(t) {
|
|
2386
2386
|
var n = e.table(t), r = n.schema, i = {}, a = [];
|
|
2387
|
-
function s(c,
|
|
2388
|
-
var m = yt(c), w = i[m] = i[m] || [], g = c == null ? 0 : typeof c == "string" ? 1 : c.length, _ = 0 <
|
|
2389
|
-
return w.push(_), _.isPrimaryKey || a.push(_), 1 < g && s(g === 2 ? c[0] : c.slice(0, g - 1),
|
|
2387
|
+
function s(c, d, p) {
|
|
2388
|
+
var m = yt(c), w = i[m] = i[m] || [], g = c == null ? 0 : typeof c == "string" ? 1 : c.length, _ = 0 < d, _ = y(y({}, p), { name: _ ? "".concat(m, "(virtual-from:").concat(p.name, ")") : p.name, lowLevelIndex: p, isVirtual: _, keyTail: d, keyLength: g, extractKey: vn(c), unique: !_ && p.unique });
|
|
2389
|
+
return w.push(_), _.isPrimaryKey || a.push(_), 1 < g && s(g === 2 ? c[0] : c.slice(0, g - 1), d + 1, p), w.sort(function(S, E) {
|
|
2390
2390
|
return S.keyTail - E.keyTail;
|
|
2391
2391
|
}), _;
|
|
2392
2392
|
}
|
|
2393
2393
|
t = s(r.primaryKey.keyPath, 0, r.primaryKey), i[":id"] = [t];
|
|
2394
2394
|
for (var u = 0, h = r.indexes; u < h.length; u++) {
|
|
2395
|
-
var
|
|
2396
|
-
s(
|
|
2395
|
+
var f = h[u];
|
|
2396
|
+
s(f.keyPath, 0, f);
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2399
|
-
var
|
|
2400
|
-
return p.isVirtual ? y(y({}, c), { query: { index: p.lowLevelIndex, range: (
|
|
2398
|
+
function v(c) {
|
|
2399
|
+
var d, p = c.query.index;
|
|
2400
|
+
return p.isVirtual ? y(y({}, c), { query: { index: p.lowLevelIndex, range: (d = c.query.range, p = p.keyTail, { type: d.type === 1 ? 2 : d.type, lower: zt(d.lower, d.lowerOpen ? e.MAX_KEY : e.MIN_KEY, p), lowerOpen: !0, upper: zt(d.upper, d.upperOpen ? e.MIN_KEY : e.MAX_KEY, p), upperOpen: !0 }) } }) : c;
|
|
2401
2401
|
}
|
|
2402
2402
|
return y(y({}, n), { schema: y(y({}, r), { primaryKey: t, indexes: a, getIndexByKeyPath: function(c) {
|
|
2403
2403
|
return (c = i[yt(c)]) && c[0];
|
|
2404
2404
|
} }), count: function(c) {
|
|
2405
|
-
return n.count(
|
|
2405
|
+
return n.count(v(c));
|
|
2406
2406
|
}, query: function(c) {
|
|
2407
|
-
return n.query(
|
|
2407
|
+
return n.query(v(c));
|
|
2408
2408
|
}, openCursor: function(c) {
|
|
2409
|
-
var
|
|
2410
|
-
return m ? n.openCursor(
|
|
2409
|
+
var d = c.query.index, p = d.keyTail, m = d.isVirtual, w = d.keyLength;
|
|
2410
|
+
return m ? n.openCursor(v(c)).then(function(_) {
|
|
2411
2411
|
return _ && g(_);
|
|
2412
2412
|
}) : n.openCursor(c);
|
|
2413
2413
|
function g(_) {
|
|
2414
2414
|
return Object.create(_, { continue: { value: function(S) {
|
|
2415
|
-
S != null ? _.continue(
|
|
2415
|
+
S != null ? _.continue(zt(S, c.reverse ? e.MAX_KEY : e.MIN_KEY, p)) : c.unique ? _.continue(_.key.slice(0, w).concat(c.reverse ? e.MIN_KEY : e.MAX_KEY, p)) : _.continue();
|
|
2416
2416
|
} }, continuePrimaryKey: { value: function(S, E) {
|
|
2417
|
-
_.continuePrimaryKey(
|
|
2417
|
+
_.continuePrimaryKey(zt(S, e.MAX_KEY, p), E);
|
|
2418
2418
|
} }, primaryKey: { get: function() {
|
|
2419
2419
|
return _.primaryKey;
|
|
2420
2420
|
} }, key: { get: function() {
|
|
@@ -2442,58 +2442,58 @@ var Rr = { exports: {} };
|
|
|
2442
2442
|
return y(y({}, e), { table: function(t) {
|
|
2443
2443
|
var n = e.table(t), r = n.schema.primaryKey;
|
|
2444
2444
|
return y(y({}, n), { mutate: function(i) {
|
|
2445
|
-
var a = K.trans, s = a.table(t).hook, u = s.deleting, h = s.creating,
|
|
2445
|
+
var a = K.trans, s = a.table(t).hook, u = s.deleting, h = s.creating, f = s.updating;
|
|
2446
2446
|
switch (i.type) {
|
|
2447
2447
|
case "add":
|
|
2448
2448
|
if (h.fire === H)
|
|
2449
2449
|
break;
|
|
2450
2450
|
return a._promise("readwrite", function() {
|
|
2451
|
-
return
|
|
2451
|
+
return v(i);
|
|
2452
2452
|
}, !0);
|
|
2453
2453
|
case "put":
|
|
2454
|
-
if (h.fire === H &&
|
|
2454
|
+
if (h.fire === H && f.fire === H)
|
|
2455
2455
|
break;
|
|
2456
2456
|
return a._promise("readwrite", function() {
|
|
2457
|
-
return
|
|
2457
|
+
return v(i);
|
|
2458
2458
|
}, !0);
|
|
2459
2459
|
case "delete":
|
|
2460
2460
|
if (u.fire === H)
|
|
2461
2461
|
break;
|
|
2462
2462
|
return a._promise("readwrite", function() {
|
|
2463
|
-
return
|
|
2463
|
+
return v(i);
|
|
2464
2464
|
}, !0);
|
|
2465
2465
|
case "deleteRange":
|
|
2466
2466
|
if (u.fire === H)
|
|
2467
2467
|
break;
|
|
2468
2468
|
return a._promise("readwrite", function() {
|
|
2469
|
-
return function c(
|
|
2470
|
-
return n.query({ trans:
|
|
2469
|
+
return function c(d, p, m) {
|
|
2470
|
+
return n.query({ trans: d, values: !1, query: { index: r, range: p }, limit: m }).then(function(w) {
|
|
2471
2471
|
var g = w.result;
|
|
2472
|
-
return
|
|
2473
|
-
return 0 < _.numFailures ? Promise.reject(_.failures[0]) : g.length < m ? { failures: [], numFailures: 0, lastResult: void 0 } : c(
|
|
2472
|
+
return v({ type: "delete", keys: g, trans: d }).then(function(_) {
|
|
2473
|
+
return 0 < _.numFailures ? Promise.reject(_.failures[0]) : g.length < m ? { failures: [], numFailures: 0, lastResult: void 0 } : c(d, y(y({}, p), { lower: g[g.length - 1], lowerOpen: !0 }), m);
|
|
2474
2474
|
});
|
|
2475
2475
|
});
|
|
2476
2476
|
}(i.trans, i.range, 1e4);
|
|
2477
2477
|
}, !0);
|
|
2478
2478
|
}
|
|
2479
2479
|
return n.mutate(i);
|
|
2480
|
-
function
|
|
2481
|
-
var
|
|
2480
|
+
function v(c) {
|
|
2481
|
+
var d, p, m, w = K.trans, g = c.keys || jn(r, c);
|
|
2482
2482
|
if (!g)
|
|
2483
2483
|
throw new Error("Keys missing");
|
|
2484
|
-
return (c = c.type === "add" || c.type === "put" ? y(y({}, c), { keys: g }) : y({}, c)).type !== "delete" && (c.values =
|
|
2484
|
+
return (c = c.type === "add" || c.type === "put" ? y(y({}, c), { keys: g }) : y({}, c)).type !== "delete" && (c.values = C([], c.values, !0)), c.keys && (c.keys = C([], c.keys, !0)), d = n, m = g, ((p = c).type === "add" ? Promise.resolve([]) : d.getMany({ trans: p.trans, keys: m, cache: "immutable" })).then(function(_) {
|
|
2485
2485
|
var S = g.map(function(E, O) {
|
|
2486
|
-
var k,
|
|
2487
|
-
return c.type === "delete" ? u.fire.call(D, E, T, w) : c.type === "add" || T === void 0 ? (k = h.fire.call(D, E, c.values[O], w), E == null && k != null && (c.keys[O] = E = k, r.outbound ||
|
|
2488
|
-
ie(A, L) ? A[L] =
|
|
2486
|
+
var k, I, A, T = _[O], D = { onerror: null, onsuccess: null };
|
|
2487
|
+
return c.type === "delete" ? u.fire.call(D, E, T, w) : c.type === "add" || T === void 0 ? (k = h.fire.call(D, E, c.values[O], w), E == null && k != null && (c.keys[O] = E = k, r.outbound || fe(c.values[O], r.keyPath, E))) : (k = Tn(T, c.values[O]), (I = f.fire.call(D, k, E, T, w)) && (A = c.values[O], Object.keys(I).forEach(function(L) {
|
|
2488
|
+
ie(A, L) ? A[L] = I[L] : fe(A, L, I[L]);
|
|
2489
2489
|
}))), D;
|
|
2490
2490
|
});
|
|
2491
2491
|
return n.mutate(c).then(function(E) {
|
|
2492
|
-
for (var O = E.failures, k = E.results,
|
|
2492
|
+
for (var O = E.failures, k = E.results, I = E.numFailures, E = E.lastResult, A = 0; A < g.length; ++A) {
|
|
2493
2493
|
var T = (k || g)[A], D = S[A];
|
|
2494
2494
|
T == null ? D.onerror && D.onerror(O[A]) : D.onsuccess && D.onsuccess(c.type === "put" && _[A] ? c.values[A] : T);
|
|
2495
2495
|
}
|
|
2496
|
-
return { failures: O, results: k, numFailures:
|
|
2496
|
+
return { failures: O, results: k, numFailures: I, lastResult: E };
|
|
2497
2497
|
}).catch(function(E) {
|
|
2498
2498
|
return S.forEach(function(O) {
|
|
2499
2499
|
return O.onerror && O.onerror(E);
|
|
@@ -2509,7 +2509,7 @@ var Rr = { exports: {} };
|
|
|
2509
2509
|
if (!t || t.keys.length < e.length)
|
|
2510
2510
|
return null;
|
|
2511
2511
|
for (var r = [], i = 0, a = 0; i < t.keys.length && a < e.length; ++i)
|
|
2512
|
-
|
|
2512
|
+
z(t.keys[i], e[a]) === 0 && (r.push(n ? Ae(t.values[i]) : t.values[i]), ++a);
|
|
2513
2513
|
return r.length === e.length ? r : null;
|
|
2514
2514
|
} catch {
|
|
2515
2515
|
return null;
|
|
@@ -2555,56 +2555,56 @@ var Rr = { exports: {} };
|
|
|
2555
2555
|
var p = (m = p.query).index, m = m.range;
|
|
2556
2556
|
return [p, new oe((p = m.lower) !== null && p !== void 0 ? p : e.MIN_KEY, (m = m.upper) !== null && m !== void 0 ? m : e.MAX_KEY)];
|
|
2557
2557
|
}
|
|
2558
|
-
var a = e.table(r), s = a.schema, u = s.primaryKey, h = u.extractKey,
|
|
2558
|
+
var a = e.table(r), s = a.schema, u = s.primaryKey, h = u.extractKey, f = u.outbound, v = y(y({}, a), { mutate: function(d) {
|
|
2559
2559
|
function p(D) {
|
|
2560
2560
|
return D = "idb://".concat(t, "/").concat(r, "/").concat(D), S[D] || (S[D] = new oe());
|
|
2561
2561
|
}
|
|
2562
|
-
var m, w, g, _ =
|
|
2562
|
+
var m, w, g, _ = d.trans, S = d.mutatedParts || (d.mutatedParts = {}), E = p(""), O = p(":dels"), k = d.type, T = d.type === "deleteRange" ? [d.range] : d.type === "delete" ? [d.keys] : d.values.length < 50 ? [jn(u, d).filter(function(D) {
|
|
2563
2563
|
return D;
|
|
2564
|
-
}),
|
|
2565
|
-
return N(
|
|
2564
|
+
}), d.values] : [], I = T[0], A = T[1], T = d.trans._cache;
|
|
2565
|
+
return N(I) ? (E.addKeys(I), (T = k === "delete" || I.length === A.length ? Sr(I, T) : null) || O.addKeys(I), (T || A) && (m = p, w = T, g = A, s.indexes.forEach(function(D) {
|
|
2566
2566
|
var L = m(D.name || "");
|
|
2567
|
-
function F(
|
|
2568
|
-
return
|
|
2567
|
+
function F($) {
|
|
2568
|
+
return $ != null ? D.extractKey($) : null;
|
|
2569
2569
|
}
|
|
2570
|
-
function Y(
|
|
2571
|
-
return D.multiEntry && N(
|
|
2570
|
+
function Y($) {
|
|
2571
|
+
return D.multiEntry && N($) ? $.forEach(function(Q) {
|
|
2572
2572
|
return L.addKey(Q);
|
|
2573
|
-
}) : L.addKey(
|
|
2573
|
+
}) : L.addKey($);
|
|
2574
2574
|
}
|
|
2575
|
-
(w || g).forEach(function(
|
|
2575
|
+
(w || g).forEach(function($, U) {
|
|
2576
2576
|
var le = w && F(w[U]), U = g && F(g[U]);
|
|
2577
|
-
|
|
2577
|
+
z(le, U) !== 0 && (le != null && Y(le), U != null && Y(U));
|
|
2578
2578
|
});
|
|
2579
|
-
}))) :
|
|
2579
|
+
}))) : I ? (A = { from: I.lower, to: I.upper }, O.add(A), E.add(A)) : (E.add(n), O.add(n), s.indexes.forEach(function(D) {
|
|
2580
2580
|
return p(D.name).add(n);
|
|
2581
|
-
})), a.mutate(
|
|
2582
|
-
return !
|
|
2581
|
+
})), a.mutate(d).then(function(D) {
|
|
2582
|
+
return !I || d.type !== "add" && d.type !== "put" || E.addKeys(D.results), _.mutatedParts = $t(_.mutatedParts || {}, S), D;
|
|
2583
2583
|
});
|
|
2584
|
-
} }), c = { get: function(
|
|
2585
|
-
return [u, new oe(
|
|
2586
|
-
}, getMany: function(
|
|
2587
|
-
return [u, new oe().addKeys(
|
|
2584
|
+
} }), c = { get: function(d) {
|
|
2585
|
+
return [u, new oe(d.key)];
|
|
2586
|
+
}, getMany: function(d) {
|
|
2587
|
+
return [u, new oe().addKeys(d.keys)];
|
|
2588
2588
|
}, count: i, query: i, openCursor: i };
|
|
2589
|
-
return B(c).forEach(function(
|
|
2590
|
-
|
|
2591
|
-
var m = K.subscr, w = !!m, g = Er(K, a) && Or(
|
|
2589
|
+
return B(c).forEach(function(d) {
|
|
2590
|
+
v[d] = function(p) {
|
|
2591
|
+
var m = K.subscr, w = !!m, g = Er(K, a) && Or(d, p) ? p.obsSet = {} : m;
|
|
2592
2592
|
if (w) {
|
|
2593
2593
|
var _ = function(A) {
|
|
2594
2594
|
return A = "idb://".concat(t, "/").concat(r, "/").concat(A), g[A] || (g[A] = new oe());
|
|
2595
|
-
}, S = _(""), E = _(":dels"), m = c[
|
|
2596
|
-
if ((
|
|
2597
|
-
if (
|
|
2598
|
-
var O =
|
|
2599
|
-
return a[
|
|
2600
|
-
if (
|
|
2601
|
-
if (
|
|
2595
|
+
}, S = _(""), E = _(":dels"), m = c[d](p), w = m[0], m = m[1];
|
|
2596
|
+
if ((d === "query" && w.isPrimaryKey && !p.values ? E : _(w.name || "")).add(m), !w.isPrimaryKey) {
|
|
2597
|
+
if (d !== "count") {
|
|
2598
|
+
var O = d === "query" && f && p.values && a.query(y(y({}, p), { values: !1 }));
|
|
2599
|
+
return a[d].apply(this, arguments).then(function(A) {
|
|
2600
|
+
if (d === "query") {
|
|
2601
|
+
if (f && p.values)
|
|
2602
2602
|
return O.then(function(F) {
|
|
2603
2603
|
return F = F.result, S.addKeys(F), A;
|
|
2604
2604
|
});
|
|
2605
2605
|
var T = p.values ? A.result.map(h) : A.result;
|
|
2606
2606
|
(p.values ? S : E).addKeys(T);
|
|
2607
|
-
} else if (
|
|
2607
|
+
} else if (d === "openCursor") {
|
|
2608
2608
|
var D = A, L = p.values;
|
|
2609
2609
|
return D && Object.create(D, { key: { get: function() {
|
|
2610
2610
|
return E.addKey(D.primaryKey), D.key;
|
|
@@ -2621,9 +2621,9 @@ var Rr = { exports: {} };
|
|
|
2621
2621
|
E.add(n);
|
|
2622
2622
|
}
|
|
2623
2623
|
}
|
|
2624
|
-
return a[
|
|
2624
|
+
return a[d].apply(this, arguments);
|
|
2625
2625
|
};
|
|
2626
|
-
}),
|
|
2626
|
+
}), v;
|
|
2627
2627
|
} });
|
|
2628
2628
|
} };
|
|
2629
2629
|
function xr(e, t, n) {
|
|
@@ -2639,15 +2639,15 @@ var Rr = { exports: {} };
|
|
|
2639
2639
|
})), t);
|
|
2640
2640
|
}
|
|
2641
2641
|
function Mn(e, t) {
|
|
2642
|
-
return n = e, ((r = t).lower === void 0 || (r.lowerOpen ? 0 <
|
|
2642
|
+
return n = e, ((r = t).lower === void 0 || (r.lowerOpen ? 0 < z(n, r.lower) : 0 <= z(n, r.lower))) && (e = e, (t = t).upper === void 0 || (t.upperOpen ? z(e, t.upper) < 0 : z(e, t.upper) <= 0));
|
|
2643
2643
|
var n, r;
|
|
2644
2644
|
}
|
|
2645
|
-
function kr(e, t,
|
|
2646
|
-
if (!
|
|
2645
|
+
function kr(e, t, d, r, i, a) {
|
|
2646
|
+
if (!d || d.length === 0)
|
|
2647
2647
|
return e;
|
|
2648
|
-
var s = t.query.index, u = s.multiEntry, h = t.query.range,
|
|
2648
|
+
var s = t.query.index, u = s.multiEntry, h = t.query.range, f = r.schema.primaryKey.extractKey, v = s.extractKey, c = (s.lowLevelIndex || s).extractKey, d = d.reduce(function(p, m) {
|
|
2649
2649
|
var w = p, g = m.type === "add" || m.type === "put" ? m.values.filter(function(O) {
|
|
2650
|
-
return O =
|
|
2650
|
+
return O = v(O), u && N(O) ? O.some(function(k) {
|
|
2651
2651
|
return Mn(k, h);
|
|
2652
2652
|
}) : Mn(O, h);
|
|
2653
2653
|
}).map(function(O) {
|
|
@@ -2656,38 +2656,38 @@ var Rr = { exports: {} };
|
|
|
2656
2656
|
switch (m.type) {
|
|
2657
2657
|
case "add":
|
|
2658
2658
|
w = p.concat(t.values ? g : g.map(function(k) {
|
|
2659
|
-
return
|
|
2659
|
+
return f(k);
|
|
2660
2660
|
}));
|
|
2661
2661
|
break;
|
|
2662
2662
|
case "put":
|
|
2663
2663
|
var _ = new oe().addKeys(m.values.map(function(k) {
|
|
2664
|
-
return
|
|
2664
|
+
return f(k);
|
|
2665
2665
|
})), w = p.filter(function(k) {
|
|
2666
|
-
return k = t.values ?
|
|
2666
|
+
return k = t.values ? f(k) : k, !Ut(new oe(k), _);
|
|
2667
2667
|
}).concat(t.values ? g : g.map(function(k) {
|
|
2668
|
-
return
|
|
2668
|
+
return f(k);
|
|
2669
2669
|
}));
|
|
2670
2670
|
break;
|
|
2671
2671
|
case "delete":
|
|
2672
2672
|
var S = new oe().addKeys(m.keys);
|
|
2673
2673
|
w = p.filter(function(k) {
|
|
2674
|
-
return k = t.values ?
|
|
2674
|
+
return k = t.values ? f(k) : k, !Ut(new oe(k), S);
|
|
2675
2675
|
});
|
|
2676
2676
|
break;
|
|
2677
2677
|
case "deleteRange":
|
|
2678
2678
|
var E = m.range;
|
|
2679
2679
|
w = p.filter(function(k) {
|
|
2680
|
-
return !Mn(
|
|
2680
|
+
return !Mn(f(k), E);
|
|
2681
2681
|
});
|
|
2682
2682
|
}
|
|
2683
2683
|
return w;
|
|
2684
2684
|
}, e);
|
|
2685
|
-
return
|
|
2686
|
-
return
|
|
2687
|
-
}), t.limit && t.limit < 1 / 0 && (
|
|
2685
|
+
return d === e ? e : (d.sort(function(p, m) {
|
|
2686
|
+
return z(c(p), c(m)) || z(f(p), f(m));
|
|
2687
|
+
}), t.limit && t.limit < 1 / 0 && (d.length > t.limit ? d.length = t.limit : e.length === t.limit && d.length < t.limit && (i.dirty = !0)), a ? Object.freeze(d) : d);
|
|
2688
2688
|
}
|
|
2689
2689
|
function Ar(e, t) {
|
|
2690
|
-
return
|
|
2690
|
+
return z(e.lower, t.lower) === 0 && z(e.upper, t.upper) === 0 && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
|
|
2691
2691
|
}
|
|
2692
2692
|
function vi(e, t) {
|
|
2693
2693
|
return function(n, r, i, a) {
|
|
@@ -2695,7 +2695,7 @@ var Rr = { exports: {} };
|
|
|
2695
2695
|
return r !== void 0 ? -1 : 0;
|
|
2696
2696
|
if (r === void 0)
|
|
2697
2697
|
return 1;
|
|
2698
|
-
if ((r =
|
|
2698
|
+
if ((r = z(n, r)) === 0) {
|
|
2699
2699
|
if (i && a)
|
|
2700
2700
|
return 0;
|
|
2701
2701
|
if (i)
|
|
@@ -2709,7 +2709,7 @@ var Rr = { exports: {} };
|
|
|
2709
2709
|
return r !== void 0 ? 1 : 0;
|
|
2710
2710
|
if (r === void 0)
|
|
2711
2711
|
return -1;
|
|
2712
|
-
if ((r =
|
|
2712
|
+
if ((r = z(n, r)) === 0) {
|
|
2713
2713
|
if (i && a)
|
|
2714
2714
|
return 0;
|
|
2715
2715
|
if (i)
|
|
@@ -2735,33 +2735,33 @@ var Rr = { exports: {} };
|
|
|
2735
2735
|
return r === "readwrite" && (s = (a = new AbortController()).signal, i = function(h) {
|
|
2736
2736
|
return function() {
|
|
2737
2737
|
if (a.abort(), r === "readwrite") {
|
|
2738
|
-
for (var
|
|
2739
|
-
var
|
|
2738
|
+
for (var f = /* @__PURE__ */ new Set(), v = 0, c = n; v < c.length; v++) {
|
|
2739
|
+
var d = c[v], p = Ue["idb://".concat(t, "/").concat(d)];
|
|
2740
2740
|
if (p) {
|
|
2741
|
-
var m = e.table(
|
|
2741
|
+
var m = e.table(d), w = p.optimisticOps.filter(function(F) {
|
|
2742
2742
|
return F.trans === u;
|
|
2743
2743
|
});
|
|
2744
2744
|
if (u._explicit && h && u.mutatedParts)
|
|
2745
2745
|
for (var g = 0, _ = Object.values(p.queries.query); g < _.length; g++)
|
|
2746
|
-
for (var S = 0, E = (
|
|
2747
|
-
Dn((A = E[S]).obsSet, u.mutatedParts) && (Me(
|
|
2748
|
-
return
|
|
2746
|
+
for (var S = 0, E = (I = _[g]).slice(); S < E.length; S++)
|
|
2747
|
+
Dn((A = E[S]).obsSet, u.mutatedParts) && (Me(I, A), A.subscribers.forEach(function(F) {
|
|
2748
|
+
return f.add(F);
|
|
2749
2749
|
}));
|
|
2750
2750
|
else if (0 < w.length) {
|
|
2751
2751
|
p.optimisticOps = p.optimisticOps.filter(function(F) {
|
|
2752
2752
|
return F.trans !== u;
|
|
2753
2753
|
});
|
|
2754
2754
|
for (var O = 0, k = Object.values(p.queries.query); O < k.length; O++)
|
|
2755
|
-
for (var
|
|
2756
|
-
(A = L[D]).res != null && u.mutatedParts && (h && !A.dirty ? (T = Object.isFrozen(A.res), T = kr(A.res, A.req, w, m, A, T), A.dirty ? (Me(
|
|
2757
|
-
return
|
|
2758
|
-
})) : T !== A.res && (A.res = T, A.promise = j.resolve({ result: T }))) : (A.dirty && Me(
|
|
2759
|
-
return
|
|
2755
|
+
for (var I, A, T, D = 0, L = (I = k[O]).slice(); D < L.length; D++)
|
|
2756
|
+
(A = L[D]).res != null && u.mutatedParts && (h && !A.dirty ? (T = Object.isFrozen(A.res), T = kr(A.res, A.req, w, m, A, T), A.dirty ? (Me(I, A), A.subscribers.forEach(function(F) {
|
|
2757
|
+
return f.add(F);
|
|
2758
|
+
})) : T !== A.res && (A.res = T, A.promise = j.resolve({ result: T }))) : (A.dirty && Me(I, A), A.subscribers.forEach(function(F) {
|
|
2759
|
+
return f.add(F);
|
|
2760
2760
|
})));
|
|
2761
2761
|
}
|
|
2762
2762
|
}
|
|
2763
2763
|
}
|
|
2764
|
-
|
|
2764
|
+
f.forEach(function(F) {
|
|
2765
2765
|
return F();
|
|
2766
2766
|
});
|
|
2767
2767
|
}
|
|
@@ -2776,23 +2776,23 @@ var Rr = { exports: {} };
|
|
|
2776
2776
|
var u = Ue["idb://".concat(t, "/").concat(n)];
|
|
2777
2777
|
return u ? (s = r.mutate(a), a.type !== "add" && a.type !== "put" || !(50 <= a.values.length || jn(i, a).some(function(h) {
|
|
2778
2778
|
return h == null;
|
|
2779
|
-
})) ? (u.optimisticOps.push(a), a.mutatedParts &&
|
|
2780
|
-
0 < h.numFailures && (Me(u.optimisticOps, a), (h = xr(0, a, h)) && u.optimisticOps.push(h), a.mutatedParts &&
|
|
2779
|
+
})) ? (u.optimisticOps.push(a), a.mutatedParts && Wt(a.mutatedParts), s.then(function(h) {
|
|
2780
|
+
0 < h.numFailures && (Me(u.optimisticOps, a), (h = xr(0, a, h)) && u.optimisticOps.push(h), a.mutatedParts && Wt(a.mutatedParts));
|
|
2781
2781
|
}), s.catch(function() {
|
|
2782
|
-
Me(u.optimisticOps, a), a.mutatedParts &&
|
|
2782
|
+
Me(u.optimisticOps, a), a.mutatedParts && Wt(a.mutatedParts);
|
|
2783
2783
|
})) : s.then(function(h) {
|
|
2784
|
-
var
|
|
2785
|
-
var
|
|
2786
|
-
return
|
|
2784
|
+
var f = xr(0, y(y({}, a), { values: a.values.map(function(p, c) {
|
|
2785
|
+
var d, p = (d = i.keyPath) !== null && d !== void 0 && d.includes(".") ? Ae(p) : y({}, p);
|
|
2786
|
+
return fe(p, i.keyPath, h.results[c]), p;
|
|
2787
2787
|
}) }), h);
|
|
2788
|
-
u.optimisticOps.push(
|
|
2789
|
-
return a.mutatedParts &&
|
|
2788
|
+
u.optimisticOps.push(f), queueMicrotask(function() {
|
|
2789
|
+
return a.mutatedParts && Wt(a.mutatedParts);
|
|
2790
2790
|
});
|
|
2791
2791
|
}), s) : r.mutate(a);
|
|
2792
2792
|
}, query: function(a) {
|
|
2793
2793
|
if (!Er(K, r) || !Or("query", a))
|
|
2794
2794
|
return r.query(a);
|
|
2795
|
-
var s = ((
|
|
2795
|
+
var s = ((f = K.trans) === null || f === void 0 ? void 0 : f.db._options.cache) === "immutable", c = K, u = c.requery, h = c.signal, f = function(m, w, g, _) {
|
|
2796
2796
|
var S = Ue["idb://".concat(m, "/").concat(w)];
|
|
2797
2797
|
if (!S)
|
|
2798
2798
|
return [];
|
|
@@ -2814,10 +2814,10 @@ var Rr = { exports: {} };
|
|
|
2814
2814
|
return Ar(k.req.query.range, _.query.range);
|
|
2815
2815
|
}), [O, !!O, S, E];
|
|
2816
2816
|
}
|
|
2817
|
-
}(t, n, "query", a),
|
|
2818
|
-
return
|
|
2817
|
+
}(t, n, "query", a), v = f[0], c = f[1], d = f[2], p = f[3];
|
|
2818
|
+
return v && c ? v.obsSet = a.obsSet : (c = r.query(a).then(function(m) {
|
|
2819
2819
|
var w = m.result;
|
|
2820
|
-
if (
|
|
2820
|
+
if (v && (v.res = w), s) {
|
|
2821
2821
|
for (var g = 0, _ = w.length; g < _; ++g)
|
|
2822
2822
|
Object.freeze(w[g]);
|
|
2823
2823
|
Object.freeze(w);
|
|
@@ -2825,9 +2825,9 @@ var Rr = { exports: {} };
|
|
|
2825
2825
|
m.result = Ae(w);
|
|
2826
2826
|
return m;
|
|
2827
2827
|
}).catch(function(m) {
|
|
2828
|
-
return p &&
|
|
2829
|
-
}),
|
|
2830
|
-
return { result: kr(m.result, a,
|
|
2828
|
+
return p && v && Me(p, v), Promise.reject(m);
|
|
2829
|
+
}), v = { obsSet: a.obsSet, promise: c, subscribers: /* @__PURE__ */ new Set(), type: "query", req: a, dirty: !1 }, p ? p.push(v) : (p = [v], (d = d || (Ue["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[a.query.index.name || ""] = p)), wi(v, p, u, h), v.promise.then(function(m) {
|
|
2830
|
+
return { result: kr(m.result, a, d == null ? void 0 : d.optimisticOps, r, v, s) };
|
|
2831
2831
|
});
|
|
2832
2832
|
} });
|
|
2833
2833
|
} });
|
|
@@ -2900,8 +2900,8 @@ var Rr = { exports: {} };
|
|
|
2900
2900
|
t.close(e);
|
|
2901
2901
|
var u = t._deps.indexedDB.deleteDatabase(t.name);
|
|
2902
2902
|
u.onsuccess = J(function() {
|
|
2903
|
-
var h,
|
|
2904
|
-
h = t._deps,
|
|
2903
|
+
var h, f, v;
|
|
2904
|
+
h = t._deps, f = t.name, v = h.indexedDB, h = h.IDBKeyRange, On(v) || f === It || En(v, h).delete(f).catch(H), i();
|
|
2905
2905
|
}), u.onerror = ye(a), u.onblocked = t._fireOnBlocked;
|
|
2906
2906
|
}
|
|
2907
2907
|
if (n)
|
|
@@ -2940,53 +2940,53 @@ var Rr = { exports: {} };
|
|
|
2940
2940
|
var a, s, u = e.indexOf("?") !== -1;
|
|
2941
2941
|
e = e.replace("!", "").replace("?", "");
|
|
2942
2942
|
try {
|
|
2943
|
-
if (s = t.map(function(
|
|
2944
|
-
if (
|
|
2943
|
+
if (s = t.map(function(f) {
|
|
2944
|
+
if (f = f instanceof r.Table ? f.name : f, typeof f != "string")
|
|
2945
2945
|
throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
|
|
2946
|
-
return
|
|
2947
|
-
}), e == "r" || e ===
|
|
2948
|
-
a =
|
|
2946
|
+
return f;
|
|
2947
|
+
}), e == "r" || e === fn)
|
|
2948
|
+
a = fn;
|
|
2949
2949
|
else {
|
|
2950
|
-
if (e != "rw" && e !=
|
|
2950
|
+
if (e != "rw" && e != dn)
|
|
2951
2951
|
throw new G.InvalidArgument("Invalid transaction mode: " + e);
|
|
2952
|
-
a =
|
|
2952
|
+
a = dn;
|
|
2953
2953
|
}
|
|
2954
2954
|
if (i) {
|
|
2955
|
-
if (i.mode ===
|
|
2955
|
+
if (i.mode === fn && a === dn) {
|
|
2956
2956
|
if (!u)
|
|
2957
2957
|
throw new G.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
|
|
2958
2958
|
i = null;
|
|
2959
2959
|
}
|
|
2960
|
-
i && s.forEach(function(
|
|
2961
|
-
if (i && i.storeNames.indexOf(
|
|
2960
|
+
i && s.forEach(function(f) {
|
|
2961
|
+
if (i && i.storeNames.indexOf(f) === -1) {
|
|
2962
2962
|
if (!u)
|
|
2963
|
-
throw new G.SubTransaction("Table " +
|
|
2963
|
+
throw new G.SubTransaction("Table " + f + " not included in parent transaction.");
|
|
2964
2964
|
i = null;
|
|
2965
2965
|
}
|
|
2966
2966
|
}), u && i && !i.active && (i = null);
|
|
2967
2967
|
}
|
|
2968
|
-
} catch (
|
|
2969
|
-
return i ? i._promise(null, function(
|
|
2970
|
-
c(
|
|
2971
|
-
}) : q(
|
|
2968
|
+
} catch (f) {
|
|
2969
|
+
return i ? i._promise(null, function(v, c) {
|
|
2970
|
+
c(f);
|
|
2971
|
+
}) : q(f);
|
|
2972
2972
|
}
|
|
2973
|
-
var h = (function
|
|
2973
|
+
var h = (function f(v, c, d, p, m) {
|
|
2974
2974
|
return j.resolve().then(function() {
|
|
2975
|
-
var w = K.transless || K, g =
|
|
2975
|
+
var w = K.transless || K, g = v._createTransaction(c, d, v._dbSchema, p);
|
|
2976
2976
|
if (g.explicit = !0, w = { trans: g, transless: w }, p)
|
|
2977
2977
|
g.idbtrans = p.idbtrans;
|
|
2978
2978
|
else
|
|
2979
2979
|
try {
|
|
2980
|
-
g.create(), g.idbtrans._explicit = !0,
|
|
2980
|
+
g.create(), g.idbtrans._explicit = !0, v._state.PR1398_maxLoop = 3;
|
|
2981
2981
|
} catch (E) {
|
|
2982
|
-
return E.name === en.InvalidState &&
|
|
2983
|
-
return
|
|
2982
|
+
return E.name === en.InvalidState && v.isOpen() && 0 < --v._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), v.close({ disableAutoOpen: !1 }), v.open().then(function() {
|
|
2983
|
+
return f(v, c, d, null, m);
|
|
2984
2984
|
})) : q(E);
|
|
2985
2985
|
}
|
|
2986
2986
|
var _, S = qt(m);
|
|
2987
2987
|
return S && Je(), w = j.follow(function() {
|
|
2988
2988
|
var E;
|
|
2989
|
-
(_ = m.call(g, g)) && (S ? (E =
|
|
2989
|
+
(_ = m.call(g, g)) && (S ? (E = Ce.bind(null, null), _.then(E, E)) : typeof _.next == "function" && typeof _.throw == "function" && (_ = Rn(_)));
|
|
2990
2990
|
}, w), (_ && typeof _.then == "function" ? j.resolve(_).then(function(E) {
|
|
2991
2991
|
return g.active ? E : q(new G.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
|
|
2992
2992
|
}) : w.then(function() {
|
|
@@ -3013,21 +3013,21 @@ var Rr = { exports: {} };
|
|
|
3013
3013
|
this._middlewares = {}, this.verno = 0;
|
|
3014
3014
|
var r = ee.dependencies;
|
|
3015
3015
|
this._options = t = y({ addons: ee.addons, autoOpen: !0, indexedDB: r.indexedDB, IDBKeyRange: r.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, r = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
|
|
3016
|
-
var i, a, s, u, h,
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
}),
|
|
3020
|
-
|
|
3021
|
-
}), this._state =
|
|
3022
|
-
return function(
|
|
3016
|
+
var i, a, s, u, h, f = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: H, dbReadyPromise: null, cancelOpen: H, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
|
|
3017
|
+
f.dbReadyPromise = new j(function(c) {
|
|
3018
|
+
f.dbReadyResolve = c;
|
|
3019
|
+
}), f.openCanceller = new j(function(c, d) {
|
|
3020
|
+
f.cancelOpen = d;
|
|
3021
|
+
}), this._state = f, this.name = e, this.on = ft(this, "populate", "blocked", "versionchange", "close", { ready: [tn, H] }), this.on.ready.subscribe = Yn(this.on.ready.subscribe, function(c) {
|
|
3022
|
+
return function(d, p) {
|
|
3023
3023
|
ee.vip(function() {
|
|
3024
3024
|
var m, w = n._state;
|
|
3025
|
-
w.openComplete ? (w.dbOpenError || j.resolve().then(
|
|
3026
|
-
m.on.ready.unsubscribe(
|
|
3025
|
+
w.openComplete ? (w.dbOpenError || j.resolve().then(d), p && c(d)) : w.onReadyBeingFired ? (w.onReadyBeingFired.push(d), p && c(d)) : (c(d), m = n, p || c(function g() {
|
|
3026
|
+
m.on.ready.unsubscribe(d), m.on.ready.unsubscribe(g);
|
|
3027
3027
|
}));
|
|
3028
3028
|
});
|
|
3029
3029
|
};
|
|
3030
|
-
}), this.Collection = (i = this,
|
|
3030
|
+
}), this.Collection = (i = this, dt(ri.prototype, function(_, g) {
|
|
3031
3031
|
this.db = i;
|
|
3032
3032
|
var p = ar, m = null;
|
|
3033
3033
|
if (g)
|
|
@@ -3038,11 +3038,11 @@ var Rr = { exports: {} };
|
|
|
3038
3038
|
}
|
|
3039
3039
|
var w = _._ctx, g = w.table, _ = g.hook.reading.fire;
|
|
3040
3040
|
this._ctx = { table: g, index: w.index, isPrimKey: !w.index || g.schema.primKey.keyPath && w.index === g.schema.primKey.name, range: p, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: m, or: w.or, valueMapper: _ !== ot ? _ : null };
|
|
3041
|
-
})), this.Table = (a = this,
|
|
3042
|
-
this.db = a, this._tx = p, this.name = c, this.schema =
|
|
3043
|
-
})), this.Transaction = (s = this,
|
|
3041
|
+
})), this.Table = (a = this, dt(lr.prototype, function(c, d, p) {
|
|
3042
|
+
this.db = a, this._tx = p, this.name = c, this.schema = d, this.hook = a._allTables[c] ? a._allTables[c].hook : ft(null, { creating: [Qr, H], reading: [Hr, ot], updating: [Vr, H], deleting: [Xr, H] });
|
|
3043
|
+
})), this.Transaction = (s = this, dt(ai.prototype, function(c, d, p, m, w) {
|
|
3044
3044
|
var g = this;
|
|
3045
|
-
this.db = s, this.mode = c, this.storeNames =
|
|
3045
|
+
this.db = s, this.mode = c, this.storeNames = d, this.schema = p, this.chromeTransactionDurability = m, this.idbtrans = null, this.on = ft(this, "complete", "error", "abort"), this.parent = w || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new j(function(_, S) {
|
|
3046
3046
|
g._resolve = _, g._reject = S;
|
|
3047
3047
|
}), this._completion.then(function() {
|
|
3048
3048
|
g.active = !1, g.on.complete.fire();
|
|
@@ -3050,51 +3050,51 @@ var Rr = { exports: {} };
|
|
|
3050
3050
|
var S = g.active;
|
|
3051
3051
|
return g.active = !1, g.on.error.fire(_), g.parent ? g.parent._reject(_) : S && g.idbtrans && g.idbtrans.abort(), q(_);
|
|
3052
3052
|
});
|
|
3053
|
-
})), this.Version = (u = this,
|
|
3053
|
+
})), this.Version = (u = this, dt(hi.prototype, function(c) {
|
|
3054
3054
|
this.db = u, this._cfg = { version: c, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
|
|
3055
|
-
})), this.WhereClause = (h = this,
|
|
3056
|
-
if (this.db = h, this._ctx = { table: c, index:
|
|
3057
|
-
return
|
|
3055
|
+
})), this.WhereClause = (h = this, dt(pr.prototype, function(c, d, p) {
|
|
3056
|
+
if (this.db = h, this._ctx = { table: c, index: d === ":id" ? null : d, or: p }, this._cmp = this._ascending = z, this._descending = function(m, w) {
|
|
3057
|
+
return z(w, m);
|
|
3058
3058
|
}, this._max = function(m, w) {
|
|
3059
|
-
return 0 <
|
|
3059
|
+
return 0 < z(m, w) ? m : w;
|
|
3060
3060
|
}, this._min = function(m, w) {
|
|
3061
|
-
return
|
|
3061
|
+
return z(m, w) < 0 ? m : w;
|
|
3062
3062
|
}, this._IDBKeyRange = h._deps.IDBKeyRange, !this._IDBKeyRange)
|
|
3063
3063
|
throw new G.MissingAPI();
|
|
3064
3064
|
})), this.on("versionchange", function(c) {
|
|
3065
3065
|
0 < c.newVersion ? console.warn("Another connection wants to upgrade database '".concat(n.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(n.name, "'. Closing db now to resume the delete request.")), n.close({ disableAutoOpen: !1 });
|
|
3066
3066
|
}), this.on("blocked", function(c) {
|
|
3067
3067
|
!c.newVersion || c.newVersion < c.oldVersion ? console.warn("Dexie.delete('".concat(n.name, "') was blocked")) : console.warn("Upgrade '".concat(n.name, "' blocked by other connection holding version ").concat(c.oldVersion / 10));
|
|
3068
|
-
}), this._maxKey = gt(t.IDBKeyRange), this._createTransaction = function(c,
|
|
3069
|
-
return new n.Transaction(c,
|
|
3068
|
+
}), this._maxKey = gt(t.IDBKeyRange), this._createTransaction = function(c, d, p, m) {
|
|
3069
|
+
return new n.Transaction(c, d, p, n._options.chromeTransactionDurability, m);
|
|
3070
3070
|
}, this._fireOnBlocked = function(c) {
|
|
3071
|
-
n.on("blocked").fire(c), Ze.filter(function(
|
|
3072
|
-
return
|
|
3073
|
-
}).map(function(
|
|
3074
|
-
return
|
|
3071
|
+
n.on("blocked").fire(c), Ze.filter(function(d) {
|
|
3072
|
+
return d.name === n.name && d !== n && !d._state.vcFired;
|
|
3073
|
+
}).map(function(d) {
|
|
3074
|
+
return d.on("versionchange").fire(c);
|
|
3075
3075
|
});
|
|
3076
3076
|
}, this.use(mi), this.use(_i), this.use(bi), this.use(gi), this.use(yi);
|
|
3077
|
-
var
|
|
3078
|
-
if (
|
|
3077
|
+
var v = new Proxy(this, { get: function(c, d, p) {
|
|
3078
|
+
if (d === "_vip")
|
|
3079
3079
|
return !0;
|
|
3080
|
-
if (
|
|
3080
|
+
if (d === "table")
|
|
3081
3081
|
return function(w) {
|
|
3082
|
-
return Yt(n.table(w),
|
|
3082
|
+
return Yt(n.table(w), v);
|
|
3083
3083
|
};
|
|
3084
|
-
var m = Reflect.get(c,
|
|
3085
|
-
return m instanceof lr ? Yt(m,
|
|
3086
|
-
return Yt(w,
|
|
3087
|
-
}) :
|
|
3088
|
-
return Yt(m.apply(this, arguments),
|
|
3084
|
+
var m = Reflect.get(c, d, p);
|
|
3085
|
+
return m instanceof lr ? Yt(m, v) : d === "tables" ? m.map(function(w) {
|
|
3086
|
+
return Yt(w, v);
|
|
3087
|
+
}) : d === "_createTransaction" ? function() {
|
|
3088
|
+
return Yt(m.apply(this, arguments), v);
|
|
3089
3089
|
} : m;
|
|
3090
3090
|
} });
|
|
3091
|
-
this.vip =
|
|
3091
|
+
this.vip = v, r.forEach(function(c) {
|
|
3092
3092
|
return c(n);
|
|
3093
3093
|
});
|
|
3094
3094
|
}
|
|
3095
|
-
var Ht,
|
|
3095
|
+
var Ht, de = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", Si = (Kn.prototype.subscribe = function(e, t, n) {
|
|
3096
3096
|
return this._subscribe(e && typeof e != "function" ? e : { next: e, error: t, complete: n });
|
|
3097
|
-
}, Kn.prototype[
|
|
3097
|
+
}, Kn.prototype[de] = function() {
|
|
3098
3098
|
return this;
|
|
3099
3099
|
}, Kn);
|
|
3100
3100
|
function Kn(e) {
|
|
@@ -3107,16 +3107,16 @@ var Rr = { exports: {} };
|
|
|
3107
3107
|
}
|
|
3108
3108
|
function Dr(e) {
|
|
3109
3109
|
var t, n = !1, r = new Si(function(i) {
|
|
3110
|
-
var a = qt(e), s, u = !1, h = {},
|
|
3110
|
+
var a = qt(e), s, u = !1, h = {}, f = {}, v = { get closed() {
|
|
3111
3111
|
return u;
|
|
3112
3112
|
}, unsubscribe: function() {
|
|
3113
3113
|
u || (u = !0, s && s.abort(), c && Te.storagemutated.unsubscribe(p));
|
|
3114
3114
|
} };
|
|
3115
|
-
i.start && i.start(
|
|
3116
|
-
var c = !1,
|
|
3115
|
+
i.start && i.start(v);
|
|
3116
|
+
var c = !1, d = function() {
|
|
3117
3117
|
return ln(m);
|
|
3118
3118
|
}, p = function(w) {
|
|
3119
|
-
|
|
3119
|
+
$t(h, w), Dn(f, h) && d();
|
|
3120
3120
|
}, m = function() {
|
|
3121
3121
|
var w, g, _;
|
|
3122
3122
|
!u && Ht.indexedDB && (h = {}, w = {}, s && s.abort(), s = new AbortController(), _ = function(S) {
|
|
@@ -3124,17 +3124,17 @@ var Rr = { exports: {} };
|
|
|
3124
3124
|
try {
|
|
3125
3125
|
a && Je();
|
|
3126
3126
|
var O = Pe(e, S);
|
|
3127
|
-
return O = a ? O.finally(
|
|
3127
|
+
return O = a ? O.finally(Ce) : O;
|
|
3128
3128
|
} finally {
|
|
3129
3129
|
E && Ve();
|
|
3130
3130
|
}
|
|
3131
|
-
}(g = { subscr: w, signal: s.signal, requery:
|
|
3131
|
+
}(g = { subscr: w, signal: s.signal, requery: d, querier: e, trans: null }), Promise.resolve(_).then(function(S) {
|
|
3132
3132
|
n = !0, t = S, u || g.signal.aborted || (h = {}, function(E) {
|
|
3133
3133
|
for (var O in E)
|
|
3134
3134
|
if (ie(E, O))
|
|
3135
3135
|
return;
|
|
3136
3136
|
return 1;
|
|
3137
|
-
}(
|
|
3137
|
+
}(f = w) || c || (Te(pt, p), c = !0), ln(function() {
|
|
3138
3138
|
return !u && i.next && i.next(S);
|
|
3139
3139
|
}));
|
|
3140
3140
|
}, function(S) {
|
|
@@ -3143,7 +3143,7 @@ var Rr = { exports: {} };
|
|
|
3143
3143
|
});
|
|
3144
3144
|
}));
|
|
3145
3145
|
};
|
|
3146
|
-
return setTimeout(
|
|
3146
|
+
return setTimeout(d, 0), v;
|
|
3147
3147
|
});
|
|
3148
3148
|
return r.hasValue = function() {
|
|
3149
3149
|
return n;
|
|
@@ -3151,30 +3151,30 @@ var Rr = { exports: {} };
|
|
|
3151
3151
|
return t;
|
|
3152
3152
|
}, r;
|
|
3153
3153
|
}
|
|
3154
|
-
var
|
|
3154
|
+
var $e = Se;
|
|
3155
3155
|
function Bn(e) {
|
|
3156
3156
|
var t = je;
|
|
3157
3157
|
try {
|
|
3158
|
-
je = !0, Te.storagemutated.fire(e),
|
|
3158
|
+
je = !0, Te.storagemutated.fire(e), In(e, !0);
|
|
3159
3159
|
} finally {
|
|
3160
3160
|
je = t;
|
|
3161
3161
|
}
|
|
3162
3162
|
}
|
|
3163
|
-
xe(
|
|
3164
|
-
return new
|
|
3163
|
+
xe($e, y(y({}, St), { delete: function(e) {
|
|
3164
|
+
return new $e(e, { addons: [] }).delete();
|
|
3165
3165
|
}, exists: function(e) {
|
|
3166
|
-
return new
|
|
3166
|
+
return new $e(e, { addons: [] }).open().then(function(t) {
|
|
3167
3167
|
return t.close(), !0;
|
|
3168
3168
|
}).catch("NoSuchDatabaseError", function() {
|
|
3169
3169
|
return !1;
|
|
3170
3170
|
});
|
|
3171
3171
|
}, getDatabaseNames: function(e) {
|
|
3172
3172
|
try {
|
|
3173
|
-
return t =
|
|
3173
|
+
return t = $e.dependencies, n = t.indexedDB, t = t.IDBKeyRange, (On(n) ? Promise.resolve(n.databases()).then(function(r) {
|
|
3174
3174
|
return r.map(function(i) {
|
|
3175
3175
|
return i.name;
|
|
3176
3176
|
}).filter(function(i) {
|
|
3177
|
-
return i !==
|
|
3177
|
+
return i !== It;
|
|
3178
3178
|
});
|
|
3179
3179
|
}) : En(n, t).toCollection().primaryKeys()).then(e);
|
|
3180
3180
|
} catch {
|
|
@@ -3206,20 +3206,20 @@ var Rr = { exports: {} };
|
|
|
3206
3206
|
}, currentTransaction: { get: function() {
|
|
3207
3207
|
return K.trans || null;
|
|
3208
3208
|
} }, waitFor: function(e, t) {
|
|
3209
|
-
return t = j.resolve(typeof e == "function" ?
|
|
3209
|
+
return t = j.resolve(typeof e == "function" ? $e.ignoreTransaction(e) : e).timeout(t || 6e4), K.trans ? K.trans.waitFor(t) : t;
|
|
3210
3210
|
}, Promise: j, debug: { get: function() {
|
|
3211
3211
|
return pe;
|
|
3212
3212
|
}, set: function(e) {
|
|
3213
3213
|
qn(e);
|
|
3214
|
-
} }, derive:
|
|
3215
|
-
typeof t == "string" ?
|
|
3216
|
-
|
|
3214
|
+
} }, derive: ze, extend: Z, props: xe, override: Yn, Events: ft, on: Te, liveQuery: Dr, extendObservabilitySet: $t, getByKeyPath: ve, setByKeyPath: fe, delByKeyPath: function(e, t) {
|
|
3215
|
+
typeof t == "string" ? fe(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
|
|
3216
|
+
fe(e, n, void 0);
|
|
3217
3217
|
});
|
|
3218
|
-
}, shallowClone: Qn, deepClone: Ae, getObjectDiff: Tn, cmp:
|
|
3218
|
+
}, shallowClone: Qn, deepClone: Ae, getObjectDiff: Tn, cmp: z, asap: Hn, minKey: -1 / 0, addons: [], connections: Ze, errnames: en, dependencies: Ht, cache: Ue, semVer: ge, version: ge.split(".").map(function(e) {
|
|
3219
3219
|
return parseInt(e);
|
|
3220
3220
|
}).reduce(function(e, t, n) {
|
|
3221
3221
|
return e + t / Math.pow(10, 2 * n);
|
|
3222
|
-
}) })),
|
|
3222
|
+
}) })), $e.maxKey = gt($e.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Te(pt, function(e) {
|
|
3223
3223
|
je || (e = new CustomEvent(yn, { detail: e }), je = !0, dispatchEvent(e), je = !1);
|
|
3224
3224
|
}), addEventListener(yn, function(e) {
|
|
3225
3225
|
e = e.detail, je || Bn(e);
|
|
@@ -3244,41 +3244,41 @@ var Rr = { exports: {} };
|
|
|
3244
3244
|
return !e || e instanceof He || 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
3245
|
return this.inner.stack;
|
|
3246
3246
|
} }), t);
|
|
3247
|
-
}, qn(pe), y(Se, Object.freeze({ __proto__: null, Dexie: Se, liveQuery: Dr, Entity: sr, cmp:
|
|
3247
|
+
}, qn(pe), y(Se, Object.freeze({ __proto__: null, Dexie: Se, liveQuery: Dr, Entity: sr, cmp: z, default: Se, RangeSet: oe, mergeRanges: bt, rangesOverlap: Ut }), { default: Se }), Se;
|
|
3248
3248
|
});
|
|
3249
3249
|
})(Rr);
|
|
3250
3250
|
var Di = Rr.exports;
|
|
3251
|
-
const Un = /* @__PURE__ */ Ai(Di),
|
|
3252
|
-
if (Un.semVer !==
|
|
3253
|
-
throw new Error(`Two different versions of Dexie loaded in the same app: ${Un.semVer} and ${
|
|
3254
|
-
var M = /* @__PURE__ */ ((
|
|
3255
|
-
function V(
|
|
3256
|
-
let o = `${
|
|
3257
|
-
return
|
|
3251
|
+
const Un = /* @__PURE__ */ Ai(Di), Ir = Symbol.for("Dexie"), $n = globalThis[Ir] || (globalThis[Ir] = Un);
|
|
3252
|
+
if (Un.semVer !== $n.semVer)
|
|
3253
|
+
throw new Error(`Two different versions of Dexie loaded in the same app: ${Un.semVer} and ${$n.semVer}`);
|
|
3254
|
+
var M = /* @__PURE__ */ ((b) => (b.MESSAGES = "messages", b.CLOUD = "cloud", b.SERIES = "series", b.TOPICS = "topics", b.WIDGET = "widget", b.WIDGETS = "widgets", b))(M || {}), x = /* @__PURE__ */ ((b) => (b.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", b.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", b.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", b.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", b.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", b.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", b.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", b.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", b.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", b.NONE = "color:transparent;background-color:transparent;", b.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", b.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", b.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", b.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", b.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", b.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", b.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", b))(x || {}), se = /* @__PURE__ */ ((b) => (b.ADD_SLIDE = "addSlide", b.APP_READY = "appReady", b.API_UPDATE = "apiUpdate", b.APPROVE_MESSAGE = "approveMessage", b.CHANNEL = "channel", b.CLOSE_MODAL = "closeModal", b.ERROR = "error", b.GOTO_SLIDE = "gotoSlide", b.HIDE_MESSAGE = "hideMessage", b.HIDE_LABELS = "hideLabels", b.NEXT_SLIDE = "nextSlide", b.PAUSE_PRESENTATION = "pausePresentation", b.PRESENTATION_READY = "presentationReady", b.PREV_SLIDE = "prevSlide", b.RELOAD_PRESENTATION = "reloadPresentation", b.SHOW_MODAL = "showModal", b.STAR_MESSAGE = "starMessage", b.SLIDE_DID_LOAD = "slideDidLoad", b.SLIDE_GOTO = "slideGoto", b.SLIDE_READY = "slideReady", b.SLIDE_TRANSITIONER = "slideTransitioner", b.START_TRANSITIONER = "startTransitioner", b.STORAGE_INIT = "stroageInit", b.SUBSCRIBE = "subscribe", b.REMOVE_CLOUD = "removeCloud", b.UPDATE = "update", b.VERSION = "version", b.WIDGET_UPDATE = "widgetUpdate", b))(se || {}), Vt = /* @__PURE__ */ ((b) => (b.APPROVED = "approved", b.BEFORE = "before", b.DELAYED = "delayed", b.NONE = "none", b.REALTIME = "realtime", b))(Vt || {}), he = /* @__PURE__ */ ((b) => (b.KEYVAL = "keyval", b.LOCAL = "local", b.SESSION = "session", b.DEXIE = "dexie", b.WINDOW = "window", b))(he || {});
|
|
3255
|
+
function V(b) {
|
|
3256
|
+
let o = `${b.type}.${b.topics}`;
|
|
3257
|
+
return b.order && (o += `.${b.order}`), b.period && (o += `.${b.period}`), o;
|
|
3258
3258
|
}
|
|
3259
|
-
function nt(
|
|
3259
|
+
function nt(b) {
|
|
3260
3260
|
var o;
|
|
3261
|
-
if (
|
|
3262
|
-
const l = (o =
|
|
3263
|
-
l && l.length > 1 ? (
|
|
3261
|
+
if (b.widget === void 0) {
|
|
3262
|
+
const l = (o = b.topics) == null ? void 0 : o.split("-");
|
|
3263
|
+
l && l.length > 1 ? (b.dashboard = l ? l[0] : "", b.widget = l ? l[1] : "") : (b.widget = b.topics, b.dashboard = b.slide);
|
|
3264
3264
|
}
|
|
3265
|
-
return
|
|
3265
|
+
return b.topics === void 0 && (b.topics = `${b.dashboard}-${b.widget}`), b;
|
|
3266
3266
|
}
|
|
3267
|
-
function vt(
|
|
3267
|
+
function vt(b, o) {
|
|
3268
3268
|
var N;
|
|
3269
|
-
let l, y,
|
|
3270
|
-
switch (
|
|
3269
|
+
let l, y, C, R, B;
|
|
3270
|
+
switch (b.moderation) {
|
|
3271
3271
|
case Vt.BEFORE:
|
|
3272
|
-
l = /* @__PURE__ */ new Date(), y = (N =
|
|
3272
|
+
l = /* @__PURE__ */ new Date(), y = (N = b.beforeTime) == null ? void 0 : N.split(":"), C = Number.parseInt(y ? y[0] : "00"), R = Number.parseInt(y ? y[1] : "00"), B = Number.parseInt(y ? y[2] : "00"), o.before = l.setHours(C, R, B, 0) / 1e3, o.period || (o.period = l.getDay() === 1 ? 72 : 24);
|
|
3273
3273
|
break;
|
|
3274
3274
|
case Vt.DELAYED:
|
|
3275
|
-
|
|
3275
|
+
b.delay && b.delay > 0 && (o.delay = `${b.delay}`);
|
|
3276
3276
|
break;
|
|
3277
3277
|
case Vt.APPROVED:
|
|
3278
3278
|
o.approved = "1";
|
|
3279
3279
|
break;
|
|
3280
3280
|
default:
|
|
3281
|
-
|
|
3281
|
+
b.period !== 0 && (o.period = b.period);
|
|
3282
3282
|
}
|
|
3283
3283
|
return o;
|
|
3284
3284
|
}
|
|
@@ -3329,9 +3329,9 @@ class Tr {
|
|
|
3329
3329
|
* @returns IResponse
|
|
3330
3330
|
*/
|
|
3331
3331
|
P(this, "getMessages", async (o) => {
|
|
3332
|
-
const l = (R) => R.widget_id === o.widget, y = (R) => R.utc > ((o == null ? void 0 : o.since) || 0),
|
|
3332
|
+
const l = (R) => R.widget_id === o.widget, y = (R) => R.utc > ((o == null ? void 0 : o.since) || 0), C = (R) => (R == null ? void 0 : R.visible) !== 0;
|
|
3333
3333
|
try {
|
|
3334
|
-
const R = await this.db.table(M.TOPICS).orderBy("utc").reverse().filter(l).filter(y).filter(
|
|
3334
|
+
const R = await this.db.table(M.TOPICS).orderBy("utc").reverse().filter(l).filter(y).filter(C).limit((o == null ? void 0 : o.limit) ?? 25).toArray().catch(() => {
|
|
3335
3335
|
console.warn(
|
|
3336
3336
|
"%capi%c %cmessages",
|
|
3337
3337
|
x.API,
|
|
@@ -3400,22 +3400,22 @@ class Tr {
|
|
|
3400
3400
|
return 400;
|
|
3401
3401
|
const y = l.title;
|
|
3402
3402
|
try {
|
|
3403
|
-
return l.data.messages.forEach(async (
|
|
3403
|
+
return l.data.messages.forEach(async (C) => {
|
|
3404
3404
|
var R, B, N;
|
|
3405
|
-
await this.db.table(M.MESSAGES).put({ id:
|
|
3405
|
+
await this.db.table(M.MESSAGES).put({ id: C.id, utc: C.utc, data: C }), await this.db.table(M.TOPICS).put({
|
|
3406
3406
|
widget_id: o.widget,
|
|
3407
|
-
message_id:
|
|
3407
|
+
message_id: C.id,
|
|
3408
3408
|
dashboard_id: o.dashboard,
|
|
3409
3409
|
title: y,
|
|
3410
|
-
engagement: (R =
|
|
3411
|
-
impressions: (B =
|
|
3412
|
-
reach: (N =
|
|
3413
|
-
sentiment:
|
|
3414
|
-
utc:
|
|
3410
|
+
engagement: (R = C.dynamics) == null ? void 0 : R.engagement,
|
|
3411
|
+
impressions: (B = C.dynamics) == null ? void 0 : B.semrush_visits,
|
|
3412
|
+
reach: (N = C.dynamics) == null ? void 0 : N.potential_reach,
|
|
3413
|
+
sentiment: C.topics[0].sentiment,
|
|
3414
|
+
utc: C.utc
|
|
3415
3415
|
});
|
|
3416
3416
|
}), 201;
|
|
3417
|
-
} catch (
|
|
3418
|
-
return console.error("%cstorage", x.STORAGE, "set", o,
|
|
3417
|
+
} catch (C) {
|
|
3418
|
+
return console.error("%cstorage", x.STORAGE, "set", o, C), 400;
|
|
3419
3419
|
}
|
|
3420
3420
|
});
|
|
3421
3421
|
/**
|
|
@@ -3423,8 +3423,8 @@ class Tr {
|
|
|
3423
3423
|
* @param retentionDuration
|
|
3424
3424
|
*/
|
|
3425
3425
|
P(this, "cleanMessages", async (o) => {
|
|
3426
|
-
const l = Date.now() / 1e3, y = (
|
|
3427
|
-
await this.db.table("topics").orderBy("utc").filter(y).modify((
|
|
3426
|
+
const l = Date.now() / 1e3, y = (C) => C.utc < o - l;
|
|
3427
|
+
await this.db.table("topics").orderBy("utc").filter(y).modify((C, R) => {
|
|
3428
3428
|
delete R.value;
|
|
3429
3429
|
});
|
|
3430
3430
|
});
|
|
@@ -3458,7 +3458,7 @@ class Tr {
|
|
|
3458
3458
|
* @returns IQuery[]
|
|
3459
3459
|
*/
|
|
3460
3460
|
P(this, "getSubscribers", async () => await new Promise((o) => o(this.subscribers)));
|
|
3461
|
-
this.options = o, this.db = new
|
|
3461
|
+
this.options = o, this.db = new $n(o.app), this.db.version(2).stores({
|
|
3462
3462
|
player: "id,title,name,location",
|
|
3463
3463
|
monitor: "id,player_id,cols,rows,order,width,height,physicalwidth,physicalheight,devicePixelRatio,screenLeft,screenTop,orientation,monitor",
|
|
3464
3464
|
display: "id,monitor_id,presentation_id,colstart,colend,rowstart,rowend",
|
|
@@ -3472,26 +3472,26 @@ class Tr {
|
|
|
3472
3472
|
}), this.db.open();
|
|
3473
3473
|
}
|
|
3474
3474
|
}
|
|
3475
|
-
function
|
|
3475
|
+
function Wn(b) {
|
|
3476
3476
|
return new Promise((o, l) => {
|
|
3477
|
-
|
|
3477
|
+
b.oncomplete = b.onsuccess = () => o(b.result), b.onabort = b.onerror = () => l(b.error);
|
|
3478
3478
|
});
|
|
3479
3479
|
}
|
|
3480
|
-
function Pi(
|
|
3481
|
-
const l = indexedDB.open(
|
|
3480
|
+
function Pi(b, o) {
|
|
3481
|
+
const l = indexedDB.open(b);
|
|
3482
3482
|
l.onupgradeneeded = () => l.result.createObjectStore(o);
|
|
3483
|
-
const y =
|
|
3484
|
-
return (
|
|
3483
|
+
const y = Wn(l);
|
|
3484
|
+
return (C, R) => y.then((B) => R(B.transaction(o, C).objectStore(o)));
|
|
3485
3485
|
}
|
|
3486
3486
|
let Ln;
|
|
3487
3487
|
function jr() {
|
|
3488
3488
|
return Ln || (Ln = Pi("keyval-store", "keyval")), Ln;
|
|
3489
3489
|
}
|
|
3490
|
-
function Gn(
|
|
3491
|
-
return o("readonly", (l) =>
|
|
3490
|
+
function Gn(b, o = jr()) {
|
|
3491
|
+
return o("readonly", (l) => Wn(l.get(b)));
|
|
3492
3492
|
}
|
|
3493
|
-
function Xt(
|
|
3494
|
-
return l("readwrite", (y) => (y.put(o,
|
|
3493
|
+
function Xt(b, o, l = jr()) {
|
|
3494
|
+
return l("readwrite", (y) => (y.put(o, b), Wn(y.transaction)));
|
|
3495
3495
|
}
|
|
3496
3496
|
class Mr {
|
|
3497
3497
|
constructor(o) {
|
|
@@ -3519,7 +3519,7 @@ class Mr {
|
|
|
3519
3519
|
if (!l.success)
|
|
3520
3520
|
return 400;
|
|
3521
3521
|
const y = V(o);
|
|
3522
|
-
return delete l.success, delete l.message, await Xt(y, l).then(() => 201).catch((
|
|
3522
|
+
return delete l.success, delete l.message, await Xt(y, l).then(() => 201).catch((C) => (console.error("%cstorage", x.STORAGE, M.CLOUD, o, C), 400));
|
|
3523
3523
|
});
|
|
3524
3524
|
/**
|
|
3525
3525
|
* Update Series
|
|
@@ -3531,7 +3531,7 @@ class Mr {
|
|
|
3531
3531
|
if (!l.success)
|
|
3532
3532
|
return 400;
|
|
3533
3533
|
const y = V(o);
|
|
3534
|
-
return delete l.success, delete l.message, await Xt(y, l).then(() => 201).catch((
|
|
3534
|
+
return delete l.success, delete l.message, await Xt(y, l).then(() => 201).catch((C) => (console.error("%cstorage", x.STORAGE, M.SERIES, o, C), 400));
|
|
3535
3535
|
});
|
|
3536
3536
|
/**
|
|
3537
3537
|
* Update Messages
|
|
@@ -3543,7 +3543,7 @@ class Mr {
|
|
|
3543
3543
|
if (!l.success)
|
|
3544
3544
|
return 400;
|
|
3545
3545
|
const y = V(o);
|
|
3546
|
-
return delete l.success, delete l.message, await Xt(y, l).then(() => 201).catch((
|
|
3546
|
+
return delete l.success, delete l.message, await Xt(y, l).then(() => 201).catch((C) => (console.error("%cstorage", x.STORAGE, M.MESSAGES, o, C), 400));
|
|
3547
3547
|
});
|
|
3548
3548
|
P(this, "cleanMessages", async (o) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((l) => l())));
|
|
3549
3549
|
/**
|
|
@@ -3557,7 +3557,7 @@ class Mr {
|
|
|
3557
3557
|
dashboard_id: o.dashboard,
|
|
3558
3558
|
type: o.type
|
|
3559
3559
|
};
|
|
3560
|
-
return await Xt(l, y).then(() => 201).catch((
|
|
3560
|
+
return await Xt(l, y).then(() => 201).catch((C) => (console.error("%cstorage", x.STORAGE, M.WIDGET, o, C), 400));
|
|
3561
3561
|
});
|
|
3562
3562
|
/**
|
|
3563
3563
|
* Add component subscriber
|
|
@@ -3620,8 +3620,8 @@ class Kr {
|
|
|
3620
3620
|
const y = V(o);
|
|
3621
3621
|
try {
|
|
3622
3622
|
return localStorage.setObject(y, l), 201;
|
|
3623
|
-
} catch (
|
|
3624
|
-
return console.error("%cstorage", x.STORAGE, M.CLOUD, o,
|
|
3623
|
+
} catch (C) {
|
|
3624
|
+
return console.error("%cstorage", x.STORAGE, M.CLOUD, o, C), 400;
|
|
3625
3625
|
}
|
|
3626
3626
|
});
|
|
3627
3627
|
/**
|
|
@@ -3634,8 +3634,8 @@ class Kr {
|
|
|
3634
3634
|
const y = V(o);
|
|
3635
3635
|
try {
|
|
3636
3636
|
return localStorage.setObject(y, l), 201;
|
|
3637
|
-
} catch (
|
|
3638
|
-
return console.error("%cstorage", x.STORAGE, M.SERIES, o,
|
|
3637
|
+
} catch (C) {
|
|
3638
|
+
return console.error("%cstorage", x.STORAGE, M.SERIES, o, C), 400;
|
|
3639
3639
|
}
|
|
3640
3640
|
});
|
|
3641
3641
|
/**
|
|
@@ -3648,8 +3648,8 @@ class Kr {
|
|
|
3648
3648
|
const y = V(o);
|
|
3649
3649
|
try {
|
|
3650
3650
|
return localStorage.setObject(y, l), 200;
|
|
3651
|
-
} catch (
|
|
3652
|
-
return console.error("%cstorage", x.STORAGE, M.MESSAGES, o,
|
|
3651
|
+
} catch (C) {
|
|
3652
|
+
return console.error("%cstorage", x.STORAGE, M.MESSAGES, o, C), 400;
|
|
3653
3653
|
}
|
|
3654
3654
|
});
|
|
3655
3655
|
P(this, "cleanMessages", async (o) => {
|
|
@@ -3729,8 +3729,8 @@ class Br {
|
|
|
3729
3729
|
const y = V(o);
|
|
3730
3730
|
try {
|
|
3731
3731
|
return sessionStorage.setObject(y, l), 201;
|
|
3732
|
-
} catch (
|
|
3733
|
-
return console.error("%cstorage", x.STORAGE, M.CLOUD, o,
|
|
3732
|
+
} catch (C) {
|
|
3733
|
+
return console.error("%cstorage", x.STORAGE, M.CLOUD, o, C), 400;
|
|
3734
3734
|
}
|
|
3735
3735
|
});
|
|
3736
3736
|
/**
|
|
@@ -3743,8 +3743,8 @@ class Br {
|
|
|
3743
3743
|
const y = V(o);
|
|
3744
3744
|
try {
|
|
3745
3745
|
return sessionStorage.setObject(y, l), 201;
|
|
3746
|
-
} catch (
|
|
3747
|
-
return console.error("%cstorage", x.STORAGE, M.SERIES, o,
|
|
3746
|
+
} catch (C) {
|
|
3747
|
+
return console.error("%cstorage", x.STORAGE, M.SERIES, o, C), 400;
|
|
3748
3748
|
}
|
|
3749
3749
|
});
|
|
3750
3750
|
/**
|
|
@@ -3757,8 +3757,8 @@ class Br {
|
|
|
3757
3757
|
const y = V(o);
|
|
3758
3758
|
try {
|
|
3759
3759
|
return sessionStorage.setObject(y, l), 200;
|
|
3760
|
-
} catch (
|
|
3761
|
-
return console.error("%cstorage", x.STORAGE, M.MESSAGES, o,
|
|
3760
|
+
} catch (C) {
|
|
3761
|
+
return console.error("%cstorage", x.STORAGE, M.MESSAGES, o, C), 400;
|
|
3762
3762
|
}
|
|
3763
3763
|
});
|
|
3764
3764
|
P(this, "cleanMessages", async (o) => {
|
|
@@ -3838,8 +3838,8 @@ class Nr {
|
|
|
3838
3838
|
const y = V(o);
|
|
3839
3839
|
try {
|
|
3840
3840
|
return window.BuzzCasting.WidgetData[y] = l, 201;
|
|
3841
|
-
} catch (
|
|
3842
|
-
return console.error("%cstorage", x.STORAGE, "set", o,
|
|
3841
|
+
} catch (C) {
|
|
3842
|
+
return console.error("%cstorage", x.STORAGE, "set", o, C), 400;
|
|
3843
3843
|
}
|
|
3844
3844
|
});
|
|
3845
3845
|
/**
|
|
@@ -3852,8 +3852,8 @@ class Nr {
|
|
|
3852
3852
|
const y = V(o);
|
|
3853
3853
|
try {
|
|
3854
3854
|
return window.BuzzCasting.WidgetData[y] = l, 201;
|
|
3855
|
-
} catch (
|
|
3856
|
-
return console.error("%cstorage", x.STORAGE, "set", o,
|
|
3855
|
+
} catch (C) {
|
|
3856
|
+
return console.error("%cstorage", x.STORAGE, "set", o, C), 400;
|
|
3857
3857
|
}
|
|
3858
3858
|
});
|
|
3859
3859
|
/**
|
|
@@ -3866,8 +3866,8 @@ class Nr {
|
|
|
3866
3866
|
const y = V(o);
|
|
3867
3867
|
try {
|
|
3868
3868
|
return window.BuzzCasting.WidgetData[y] = l, 201;
|
|
3869
|
-
} catch (
|
|
3870
|
-
return console.error("%cstorage", x.STORAGE, "set", o,
|
|
3869
|
+
} catch (C) {
|
|
3870
|
+
return console.error("%cstorage", x.STORAGE, "set", o, C), 400;
|
|
3871
3871
|
}
|
|
3872
3872
|
});
|
|
3873
3873
|
P(this, "cleanMessages", async (o) => {
|
|
@@ -3904,58 +3904,100 @@ class Nr {
|
|
|
3904
3904
|
this.options = o, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
|
|
3905
3905
|
}
|
|
3906
3906
|
}
|
|
3907
|
-
function
|
|
3907
|
+
function Ci(b) {
|
|
3908
3908
|
const o = {};
|
|
3909
|
-
for (let l = 0; l <
|
|
3910
|
-
const y =
|
|
3909
|
+
for (let l = 0; l < b.length; l++) {
|
|
3910
|
+
const y = b.item(l);
|
|
3911
3911
|
y != null && y.name && (o[y.name] = y.value);
|
|
3912
3912
|
}
|
|
3913
3913
|
return o;
|
|
3914
3914
|
}
|
|
3915
|
-
function
|
|
3915
|
+
function Bi(b) {
|
|
3916
3916
|
const o = {};
|
|
3917
|
-
for (let l = 0; l <
|
|
3918
|
-
const y =
|
|
3917
|
+
for (let l = 0; l < b.length; l++) {
|
|
3918
|
+
const y = b[l];
|
|
3919
3919
|
y.name !== "class" && !y.name.includes("data") && (o[y.name] = y.value);
|
|
3920
3920
|
}
|
|
3921
3921
|
return o;
|
|
3922
3922
|
}
|
|
3923
|
-
function
|
|
3924
|
-
|
|
3923
|
+
function Ni(b, o) {
|
|
3924
|
+
switch (b) {
|
|
3925
|
+
case "bl":
|
|
3926
|
+
return `text-blue fa-solid fa-rss fa-${o}`;
|
|
3927
|
+
case "co":
|
|
3928
|
+
return `fa-solid fa-comment fa-${o}`;
|
|
3929
|
+
case "da":
|
|
3930
|
+
return `fa-brands fa-dailymotion fa-${o}`;
|
|
3931
|
+
case "fb":
|
|
3932
|
+
return `text-facebook-blue fa-brands fa-facebook fa-${o}`;
|
|
3933
|
+
case "fo":
|
|
3934
|
+
return `fa-solid fa-messages fa-${o}`;
|
|
3935
|
+
case "ig":
|
|
3936
|
+
return `fa-brands fa-instagram fa-${o}`;
|
|
3937
|
+
case "lb":
|
|
3938
|
+
return `fa-solid fa-comment fa-${o}`;
|
|
3939
|
+
case "li":
|
|
3940
|
+
return `fa-brands fa-linkedin fa-${o}`;
|
|
3941
|
+
case "me":
|
|
3942
|
+
return `fa-solid fa-rss fa-${o}`;
|
|
3943
|
+
case "pi":
|
|
3944
|
+
return `fa-brands fa-pinterest fa-${o}`;
|
|
3945
|
+
case "qq":
|
|
3946
|
+
return `fa-brands fa-weibo fa-${o}`;
|
|
3947
|
+
case "rd":
|
|
3948
|
+
return `fa-brands fa-reddit fa-${o}`;
|
|
3949
|
+
case "re":
|
|
3950
|
+
return `fa-solid fa-star-sharp-half-stroke fa-${o}`;
|
|
3951
|
+
case "ti":
|
|
3952
|
+
return `fa-brands fa-tiktok fa-${o}`;
|
|
3953
|
+
case "tw":
|
|
3954
|
+
return `text-white fa-brands fa-x-twitter fa-${o}`;
|
|
3955
|
+
case "vk":
|
|
3956
|
+
return `fa-brands fa-vk fa-${o}`;
|
|
3957
|
+
case "ws":
|
|
3958
|
+
return `fa-solid fa-rss fa-${o}`;
|
|
3959
|
+
case "yt":
|
|
3960
|
+
return `text-red fa-brands fa-youtube fa-${o}`;
|
|
3961
|
+
default:
|
|
3962
|
+
return "";
|
|
3963
|
+
}
|
|
3964
|
+
}
|
|
3965
|
+
function Li(b) {
|
|
3966
|
+
return b.replace(/(?:^\w|[A-Z]|\b\w)/g, (o, l) => l === 0 ? o.toLowerCase() : o.toUpperCase()).replace(/\s+/g, "");
|
|
3925
3967
|
}
|
|
3926
|
-
function
|
|
3927
|
-
return
|
|
3968
|
+
function Gi(b) {
|
|
3969
|
+
return b.toLowerCase().split("-").reduce((o, l) => o + (l.charAt(0).toUpperCase() + l.slice(1)));
|
|
3928
3970
|
}
|
|
3929
|
-
function
|
|
3930
|
-
for (;
|
|
3931
|
-
|
|
3932
|
-
return
|
|
3971
|
+
function Ii(b, o) {
|
|
3972
|
+
for (; b.length < o; )
|
|
3973
|
+
b = `0${b}`;
|
|
3974
|
+
return b;
|
|
3933
3975
|
}
|
|
3934
|
-
function Oe(
|
|
3935
|
-
let l, y,
|
|
3976
|
+
function Oe(b, o) {
|
|
3977
|
+
let l, y, C;
|
|
3936
3978
|
if (o.length === 0)
|
|
3937
|
-
return
|
|
3938
|
-
for (l = 0,
|
|
3939
|
-
y = o.charCodeAt(l),
|
|
3940
|
-
return
|
|
3979
|
+
return b;
|
|
3980
|
+
for (l = 0, C = o.length; l < C; l++)
|
|
3981
|
+
y = o.charCodeAt(l), b = (b << 5) - b + y, b |= 0;
|
|
3982
|
+
return b < 0 ? b * -2 : b;
|
|
3941
3983
|
}
|
|
3942
|
-
function Ri(
|
|
3943
|
-
return Object.keys(o).sort().reduce(y,
|
|
3944
|
-
function y(
|
|
3945
|
-
return Lr(
|
|
3984
|
+
function Ri(b, o, l) {
|
|
3985
|
+
return Object.keys(o).sort().reduce(y, b);
|
|
3986
|
+
function y(C, R) {
|
|
3987
|
+
return Lr(C, o[R], R, l);
|
|
3946
3988
|
}
|
|
3947
3989
|
}
|
|
3948
|
-
function Lr(
|
|
3949
|
-
const
|
|
3990
|
+
function Lr(b, o, l, y) {
|
|
3991
|
+
const C = Oe(Oe(Oe(b, l), Ti(o)), typeof o);
|
|
3950
3992
|
if (o === null)
|
|
3951
|
-
return Oe(
|
|
3993
|
+
return Oe(C, "null");
|
|
3952
3994
|
if (o === void 0)
|
|
3953
|
-
return Oe(
|
|
3995
|
+
return Oe(C, "undefined");
|
|
3954
3996
|
if (typeof o == "object" || typeof o == "function") {
|
|
3955
3997
|
if (y.includes(o))
|
|
3956
|
-
return Oe(
|
|
3998
|
+
return Oe(C, `[Circular]${l}`);
|
|
3957
3999
|
y.push(o);
|
|
3958
|
-
const R = Ri(
|
|
4000
|
+
const R = Ri(C, o, y);
|
|
3959
4001
|
if (!("valueOf" in o) || typeof o.valueOf != "function")
|
|
3960
4002
|
return R;
|
|
3961
4003
|
try {
|
|
@@ -3964,15 +4006,23 @@ function Lr(v, o, l, y) {
|
|
|
3964
4006
|
return Oe(R, `[valueOf exception]${B.stack || B.message}`);
|
|
3965
4007
|
}
|
|
3966
4008
|
}
|
|
3967
|
-
return Oe(
|
|
4009
|
+
return Oe(C, o.toString());
|
|
4010
|
+
}
|
|
4011
|
+
function Ti(b) {
|
|
4012
|
+
return Object.prototype.toString.call(b);
|
|
4013
|
+
}
|
|
4014
|
+
function Fn(b) {
|
|
4015
|
+
return Ii(Lr(0, b, "", []).toString(16), 8);
|
|
3968
4016
|
}
|
|
3969
|
-
function
|
|
3970
|
-
|
|
4017
|
+
function ji(b) {
|
|
4018
|
+
const o = document.createRange();
|
|
4019
|
+
o.selectNodeContents(b), o.deleteContents();
|
|
3971
4020
|
}
|
|
3972
|
-
function
|
|
3973
|
-
return
|
|
4021
|
+
function Fi(b) {
|
|
4022
|
+
return `${b.title.length > 0 ? `<strong>${b.title}</strong>` : ""}${b.content.replace(/\n\n/g, `
|
|
4023
|
+
`).replace(/\n/g, "<br />")}`;
|
|
3974
4024
|
}
|
|
3975
|
-
class
|
|
4025
|
+
class Ui {
|
|
3976
4026
|
constructor(o) {
|
|
3977
4027
|
P(this, "sm");
|
|
3978
4028
|
P(this, "api");
|
|
@@ -3985,10 +4035,10 @@ class Li {
|
|
|
3985
4035
|
if (l.length === 0)
|
|
3986
4036
|
return;
|
|
3987
4037
|
const y = [];
|
|
3988
|
-
o ? y.push(this.api.get(o)) : l == null || l.forEach((
|
|
3989
|
-
y.push(this.api.get(
|
|
4038
|
+
o ? y.push(this.api.get(o)) : l == null || l.forEach((C) => {
|
|
4039
|
+
y.push(this.api.get(C));
|
|
3990
4040
|
}), await Promise.allSettled(y).then(
|
|
3991
|
-
(
|
|
4041
|
+
(C) => C.forEach(async (R) => {
|
|
3992
4042
|
let B = 400;
|
|
3993
4043
|
if (R.status === "fulfilled") {
|
|
3994
4044
|
const N = R.value;
|
|
@@ -4151,7 +4201,7 @@ class Li {
|
|
|
4151
4201
|
}
|
|
4152
4202
|
}
|
|
4153
4203
|
}
|
|
4154
|
-
class
|
|
4204
|
+
class Mi {
|
|
4155
4205
|
constructor(o) {
|
|
4156
4206
|
P(this, "sm");
|
|
4157
4207
|
/**
|
|
@@ -4236,7 +4286,7 @@ class ji {
|
|
|
4236
4286
|
}
|
|
4237
4287
|
}
|
|
4238
4288
|
}
|
|
4239
|
-
class
|
|
4289
|
+
class $i {
|
|
4240
4290
|
/**
|
|
4241
4291
|
* Main container for managing widgets and data updates
|
|
4242
4292
|
*
|
|
@@ -4331,7 +4381,7 @@ class Gi {
|
|
|
4331
4381
|
* @param modal IModal
|
|
4332
4382
|
*/
|
|
4333
4383
|
P(this, "showModal", (o) => {
|
|
4334
|
-
const l =
|
|
4384
|
+
const l = Ci(this.element.attributes);
|
|
4335
4385
|
if (Object.prototype.hasOwnProperty.call(l, "data-topics")) {
|
|
4336
4386
|
const R = l["data-topics"].split("-");
|
|
4337
4387
|
R.length > 1 ? (l["data-widget"] = R[1], l["data-dashboard"] = R[0]) : (l["data-widget"] = R[0], l["data-dashboard"] = this.query.slide);
|
|
@@ -4345,7 +4395,7 @@ class Gi {
|
|
|
4345
4395
|
// @ts-expect-error cannot get string type out of IFilteredAttributes props
|
|
4346
4396
|
l["data-widget"]
|
|
4347
4397
|
);
|
|
4348
|
-
const
|
|
4398
|
+
const C = new CustomEvent(se.SHOW_MODAL, {
|
|
4349
4399
|
detail: {
|
|
4350
4400
|
component: o.showComponent,
|
|
4351
4401
|
props: y,
|
|
@@ -4355,14 +4405,14 @@ class Gi {
|
|
|
4355
4405
|
cancelable: !0,
|
|
4356
4406
|
composed: !0
|
|
4357
4407
|
});
|
|
4358
|
-
window.dispatchEvent(
|
|
4408
|
+
window.dispatchEvent(C);
|
|
4359
4409
|
});
|
|
4360
4410
|
var B;
|
|
4361
4411
|
this.element = o, this.listeners = l, y = typeof y < "u" ? y : "buzzcasting-slide";
|
|
4362
|
-
let
|
|
4363
|
-
|
|
4412
|
+
let C;
|
|
4413
|
+
C = { ...o.dataset }, delete C.hmr, C.slide = ((B = o.closest(y.toUpperCase())) == null ? void 0 : B.id) ?? `${y} not found`, C = nt(C), this.query = C, ji(o);
|
|
4364
4414
|
const R = window.BuzzCasting.getOptions();
|
|
4365
|
-
this.storageReader = new
|
|
4415
|
+
this.storageReader = new Mi(R), this.broadcastChannel = new BroadcastChannel(C.slide), this.startListener();
|
|
4366
4416
|
}
|
|
4367
4417
|
addListener(o) {
|
|
4368
4418
|
this.listeners.push(o);
|
|
@@ -4376,8 +4426,8 @@ class Gi {
|
|
|
4376
4426
|
const y = l.data.data;
|
|
4377
4427
|
switch (l.data.event) {
|
|
4378
4428
|
case se.WIDGET_UPDATE:
|
|
4379
|
-
y.query.slide === o.slide && y.query.widget === o.widget && this.listeners.forEach((
|
|
4380
|
-
|
|
4429
|
+
y.query.slide === o.slide && y.query.widget === o.widget && this.listeners.forEach((C) => {
|
|
4430
|
+
C(l.data.data);
|
|
4381
4431
|
});
|
|
4382
4432
|
break;
|
|
4383
4433
|
case se.SLIDE_READY:
|
|
@@ -4409,16 +4459,19 @@ class Gi {
|
|
|
4409
4459
|
}
|
|
4410
4460
|
export {
|
|
4411
4461
|
M as API,
|
|
4412
|
-
|
|
4413
|
-
|
|
4462
|
+
Ui as BuzzcastingStorageManager,
|
|
4463
|
+
Mi as BuzzcastingStorageReader,
|
|
4414
4464
|
x as CSS,
|
|
4415
4465
|
se as EVENTS,
|
|
4416
4466
|
Vt as MODERATION,
|
|
4417
4467
|
he as STORAGE,
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
Ni as
|
|
4421
|
-
|
|
4422
|
-
|
|
4468
|
+
$i as Widget,
|
|
4469
|
+
Ci as attrs,
|
|
4470
|
+
Ni as brandLogo,
|
|
4471
|
+
Gi as camelCase,
|
|
4472
|
+
Li as camelize,
|
|
4473
|
+
ji as clearContents,
|
|
4474
|
+
Bi as filterAttributes,
|
|
4475
|
+
Fi as formatContent,
|
|
4423
4476
|
nt as widgetParams
|
|
4424
4477
|
};
|