buzzcasting-storage 2.7.0 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buzzcasting-storage.d.ts +7 -1
- package/dist/buzzcasting-storage.esm.js +233 -233
- package/package.json +1 -1
|
@@ -49,6 +49,7 @@ declare enum CSS_2 {
|
|
|
49
49
|
API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;",
|
|
50
50
|
APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;",
|
|
51
51
|
BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;",
|
|
52
|
+
DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;",
|
|
52
53
|
CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;",
|
|
53
54
|
GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;",
|
|
54
55
|
HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;",
|
|
@@ -66,18 +67,23 @@ declare enum CSS_2 {
|
|
|
66
67
|
export { CSS_2 as CSS }
|
|
67
68
|
|
|
68
69
|
export declare enum EVENTS {
|
|
69
|
-
|
|
70
|
+
APP_READY = "appReady",
|
|
71
|
+
API_UPDATE = "apiUpdate",
|
|
70
72
|
CHANNEL = "channel",
|
|
71
73
|
ERROR = "error",
|
|
72
74
|
GOTO_SLIDE = "gotoSlide",
|
|
73
75
|
HIDE_MESSAGE = "hideMessage",
|
|
74
76
|
NEXT_SLIDE = "nextSlide",
|
|
77
|
+
PAUSE_PRESENTATION = "pausePresentation",
|
|
75
78
|
PRESENTATION_READY = "presentationReady",
|
|
76
79
|
PREV_SLIDE = "prevSlide",
|
|
80
|
+
RELOAD_PRESENTATION = "reloadPresentation",
|
|
77
81
|
SHOW_MODAL = "showModal",
|
|
78
82
|
SLIDE_DID_LOAD = "slideDidLoad",
|
|
83
|
+
SLIDE_GOTO = "slideGoto",
|
|
79
84
|
SLIDE_READY = "slideReady",
|
|
80
85
|
SLIDE_TRANSITIONER = "slideTransitioner",
|
|
86
|
+
START_TRANSITIONER = "startTransitioner",
|
|
81
87
|
STORAGE_INIT = "stroageInit",
|
|
82
88
|
SUBSCRIBE = "subscribe",
|
|
83
89
|
UPDATE = "update",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ei = Object.defineProperty;
|
|
2
|
-
var Oi = (
|
|
3
|
-
var P = (
|
|
4
|
-
const xi = "2.
|
|
2
|
+
var Oi = (w, o, h) => o in w ? Ei(w, o, { enumerable: !0, configurable: !0, writable: !0, value: h }) : w[o] = h;
|
|
3
|
+
var P = (w, o, h) => (Oi(w, typeof o != "symbol" ? o + "" : o, h), h);
|
|
4
|
+
const xi = "2.7.1";
|
|
5
5
|
class ki {
|
|
6
6
|
constructor(o) {
|
|
7
7
|
P(this, "options");
|
|
@@ -59,13 +59,13 @@ class ki {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
var Ir = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
62
|
-
function Ai(
|
|
63
|
-
return
|
|
62
|
+
function Ai(w) {
|
|
63
|
+
return w && w.__esModule && Object.prototype.hasOwnProperty.call(w, "default") ? w.default : w;
|
|
64
64
|
}
|
|
65
65
|
var Rr = { exports: {} };
|
|
66
|
-
(function(
|
|
66
|
+
(function(w, o) {
|
|
67
67
|
(function(h, v) {
|
|
68
|
-
|
|
68
|
+
w.exports = v();
|
|
69
69
|
})(Ir, function() {
|
|
70
70
|
var h = function(e, t) {
|
|
71
71
|
return (h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
@@ -956,13 +956,13 @@ var Rr = { exports: {} };
|
|
|
956
956
|
e.forEach(function(c, f) {
|
|
957
957
|
var p = c.key, y = c.changes, b = u[f];
|
|
958
958
|
if (b) {
|
|
959
|
-
for (var g = 0,
|
|
960
|
-
var
|
|
961
|
-
if (
|
|
959
|
+
for (var g = 0, _ = Object.keys(y); g < _.length; g++) {
|
|
960
|
+
var S = _[g], E = y[S];
|
|
961
|
+
if (S === t.schema.primKey.keyPath) {
|
|
962
962
|
if ($(E, p) !== 0)
|
|
963
963
|
throw new F.Constraint("Cannot update primary key in bulkUpdate()");
|
|
964
964
|
} else
|
|
965
|
-
fe(b,
|
|
965
|
+
fe(b, S, E);
|
|
966
966
|
}
|
|
967
967
|
a.push(f), d.push(p), l.push(b);
|
|
968
968
|
}
|
|
@@ -973,8 +973,8 @@ var Rr = { exports: {} };
|
|
|
973
973
|
if (f === 0)
|
|
974
974
|
return m;
|
|
975
975
|
for (var y = 0, b = Object.keys(p); y < b.length; y++) {
|
|
976
|
-
var g,
|
|
977
|
-
|
|
976
|
+
var g, _ = b[y], S = a[Number(_)];
|
|
977
|
+
S != null && (g = p[_], delete p[_], p[S] = g);
|
|
978
978
|
}
|
|
979
979
|
throw new Ve("".concat(t.name, ".bulkUpdate(): ").concat(f, " of ").concat(m, " operations failed"), p);
|
|
980
980
|
});
|
|
@@ -1274,28 +1274,28 @@ var Rr = { exports: {} };
|
|
|
1274
1274
|
return this._write(function(r) {
|
|
1275
1275
|
var i, a, s;
|
|
1276
1276
|
s = typeof e == "function" ? e : (i = K(e), a = i.length, function(g) {
|
|
1277
|
-
for (var
|
|
1278
|
-
var E = i[
|
|
1279
|
-
ve(g, E) !== O && (fe(g, E, O),
|
|
1277
|
+
for (var _ = !1, S = 0; S < a; ++S) {
|
|
1278
|
+
var E = i[S], O = e[E];
|
|
1279
|
+
ve(g, E) !== O && (fe(g, E, O), _ = !0);
|
|
1280
1280
|
}
|
|
1281
|
-
return
|
|
1281
|
+
return _;
|
|
1282
1282
|
});
|
|
1283
1283
|
function u(g, E) {
|
|
1284
|
-
var
|
|
1284
|
+
var S = E.failures, E = E.numFailures;
|
|
1285
1285
|
y += g - E;
|
|
1286
|
-
for (var O = 0, k = K(
|
|
1286
|
+
for (var O = 0, k = K(S); O < k.length; O++) {
|
|
1287
1287
|
var I = k[O];
|
|
1288
|
-
p.push(
|
|
1288
|
+
p.push(S[I]);
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
1291
1291
|
var d = n.table.core, l = d.schema.primaryKey, m = l.outbound, c = l.extractKey, f = t.db._options.modifyChunkSize || 200, p = [], y = 0, b = [];
|
|
1292
1292
|
return t.clone().primaryKeys().then(function(g) {
|
|
1293
|
-
function
|
|
1294
|
-
var E = Math.min(f, g.length -
|
|
1295
|
-
return d.getMany({ trans: r, keys: g.slice(
|
|
1293
|
+
function _(S) {
|
|
1294
|
+
var E = Math.min(f, g.length - S);
|
|
1295
|
+
return d.getMany({ trans: r, keys: g.slice(S, S + E), cache: "immutable" }).then(function(O) {
|
|
1296
1296
|
for (var k = [], I = [], A = m ? [] : null, R = [], D = 0; D < E; ++D) {
|
|
1297
|
-
var G = O[D], L = { value: Ae(G), primKey: g[
|
|
1298
|
-
s.call(L, L.value, L) !== !1 && (L.value == null ? R.push(g[
|
|
1297
|
+
var G = O[D], L = { value: Ae(G), primKey: g[S + D] };
|
|
1298
|
+
s.call(L, L.value, L) !== !1 && (L.value == null ? R.push(g[S + D]) : m || $(c(G), c(L.value)) === 0 ? (I.push(L.value), m && A.push(g[S + D])) : (R.push(g[S + D]), k.push(L.value)));
|
|
1299
1299
|
}
|
|
1300
1300
|
var Y = qe(n) && n.limit === 1 / 0 && (typeof e != "function" || e === gn) && { index: n.index, range: n.range };
|
|
1301
1301
|
return Promise.resolve(0 < k.length && d.mutate({ trans: r, type: "add", values: k }).then(function(W) {
|
|
@@ -1311,11 +1311,11 @@ var Rr = { exports: {} };
|
|
|
1311
1311
|
return u(R.length, W);
|
|
1312
1312
|
});
|
|
1313
1313
|
}).then(function() {
|
|
1314
|
-
return g.length >
|
|
1314
|
+
return g.length > S + E && _(S + f);
|
|
1315
1315
|
});
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
1318
|
-
return
|
|
1318
|
+
return _(0).then(function() {
|
|
1319
1319
|
if (0 < p.length)
|
|
1320
1320
|
throw new _t("Error modifying one or more objects", p, y, b);
|
|
1321
1321
|
return g.length;
|
|
@@ -1375,8 +1375,8 @@ var Rr = { exports: {} };
|
|
|
1375
1375
|
}, s = y === "next" ? ii : oi;
|
|
1376
1376
|
var b = n.map(function(g) {
|
|
1377
1377
|
return { lower: a(g), upper: i(g) };
|
|
1378
|
-
}).sort(function(g,
|
|
1379
|
-
return s(g.lower,
|
|
1378
|
+
}).sort(function(g, _) {
|
|
1379
|
+
return s(g.lower, _.lower);
|
|
1380
1380
|
});
|
|
1381
1381
|
u = b.map(function(g) {
|
|
1382
1382
|
return g.upper;
|
|
@@ -1391,11 +1391,11 @@ var Rr = { exports: {} };
|
|
|
1391
1391
|
};
|
|
1392
1392
|
var p = 0;
|
|
1393
1393
|
return e._addAlgorithm(function(y, b, g) {
|
|
1394
|
-
var
|
|
1395
|
-
if (typeof
|
|
1394
|
+
var _ = y.key;
|
|
1395
|
+
if (typeof _ != "string")
|
|
1396
1396
|
return !1;
|
|
1397
|
-
var
|
|
1398
|
-
if (t(
|
|
1397
|
+
var S = a(_);
|
|
1398
|
+
if (t(S, d, p))
|
|
1399
1399
|
return !0;
|
|
1400
1400
|
for (var E = null, O = p; O < c; ++O) {
|
|
1401
1401
|
var k = function(I, A, R, D, G, L) {
|
|
@@ -1406,7 +1406,7 @@ var Rr = { exports: {} };
|
|
|
1406
1406
|
G(I[V], ce) < 0 && (W = V);
|
|
1407
1407
|
}
|
|
1408
1408
|
return Y < D.length && L === "next" ? I + R.substr(I.length) : Y < I.length && L === "prev" ? I.substr(0, R.length) : W < 0 ? null : I.substr(0, W) + D[W] + R.substr(W + 1);
|
|
1409
|
-
}(
|
|
1409
|
+
}(_, S, u[O], d[O], s, l);
|
|
1410
1410
|
k === null && E === null ? p = O + 1 : (E === null || 0 < s(E, k)) && (E = k);
|
|
1411
1411
|
}
|
|
1412
1412
|
return b(E !== null ? function() {
|
|
@@ -1512,53 +1512,53 @@ var Rr = { exports: {} };
|
|
|
1512
1512
|
return n ? n.concat([[n[n.length - 1][1], r]]) : [[-1 / 0, r]];
|
|
1513
1513
|
}, null);
|
|
1514
1514
|
return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, { includeLowers: !1, includeUppers: !1 });
|
|
1515
|
-
}, re.prototype.inAnyRange = function(
|
|
1515
|
+
}, re.prototype.inAnyRange = function(_, t) {
|
|
1516
1516
|
var n = this, r = this._cmp, i = this._ascending, a = this._descending, s = this._min, u = this._max;
|
|
1517
|
-
if (
|
|
1517
|
+
if (_.length === 0)
|
|
1518
1518
|
return et(this);
|
|
1519
|
-
if (!
|
|
1520
|
-
return
|
|
1519
|
+
if (!_.every(function(S) {
|
|
1520
|
+
return S[0] !== void 0 && S[1] !== void 0 && i(S[0], S[1]) <= 0;
|
|
1521
1521
|
}))
|
|
1522
1522
|
return ue(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", F.InvalidArgument);
|
|
1523
1523
|
var d = !t || t.includeLowers !== !1, l = t && t.includeUppers === !0, m, c = i;
|
|
1524
|
-
function f(
|
|
1525
|
-
return c(
|
|
1524
|
+
function f(S, E) {
|
|
1525
|
+
return c(S[0], E[0]);
|
|
1526
1526
|
}
|
|
1527
1527
|
try {
|
|
1528
|
-
(m =
|
|
1529
|
-
for (var O = 0, k =
|
|
1530
|
-
var I =
|
|
1528
|
+
(m = _.reduce(function(S, E) {
|
|
1529
|
+
for (var O = 0, k = S.length; O < k; ++O) {
|
|
1530
|
+
var I = S[O];
|
|
1531
1531
|
if (r(E[0], I[1]) < 0 && 0 < r(E[1], I[0])) {
|
|
1532
1532
|
I[0] = s(I[0], E[0]), I[1] = u(I[1], E[1]);
|
|
1533
1533
|
break;
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
|
-
return O === k &&
|
|
1536
|
+
return O === k && S.push(E), S;
|
|
1537
1537
|
}, [])).sort(f);
|
|
1538
1538
|
} catch {
|
|
1539
1539
|
return ue(this, _e);
|
|
1540
1540
|
}
|
|
1541
|
-
var p = 0, y = l ? function(
|
|
1542
|
-
return 0 < i(
|
|
1543
|
-
} : function(
|
|
1544
|
-
return 0 <= i(
|
|
1545
|
-
}, b = d ? function(
|
|
1546
|
-
return 0 < a(
|
|
1547
|
-
} : function(
|
|
1548
|
-
return 0 <= a(
|
|
1549
|
-
}, g = y,
|
|
1541
|
+
var p = 0, y = l ? function(S) {
|
|
1542
|
+
return 0 < i(S, m[p][1]);
|
|
1543
|
+
} : function(S) {
|
|
1544
|
+
return 0 <= i(S, m[p][1]);
|
|
1545
|
+
}, b = d ? function(S) {
|
|
1546
|
+
return 0 < a(S, m[p][0]);
|
|
1547
|
+
} : function(S) {
|
|
1548
|
+
return 0 <= a(S, m[p][0]);
|
|
1549
|
+
}, g = y, _ = new this.Collection(this, function() {
|
|
1550
1550
|
return Re(m[0][0], m[m.length - 1][1], !d, !l);
|
|
1551
1551
|
});
|
|
1552
|
-
return
|
|
1553
|
-
c =
|
|
1554
|
-
},
|
|
1555
|
-
for (var k, I =
|
|
1552
|
+
return _._ondirectionchange = function(S) {
|
|
1553
|
+
c = S === "next" ? (g = y, i) : (g = b, a), m.sort(f);
|
|
1554
|
+
}, _._addAlgorithm(function(S, E, O) {
|
|
1555
|
+
for (var k, I = S.key; g(I); )
|
|
1556
1556
|
if (++p === m.length)
|
|
1557
1557
|
return E(O), !1;
|
|
1558
1558
|
return !y(k = I) && !b(k) || (n._cmp(I, m[p][1]) === 0 || n._cmp(I, m[p][0]) === 0 || E(function() {
|
|
1559
|
-
c === i ?
|
|
1559
|
+
c === i ? S.continue(m[p][0]) : S.continue(m[p][1]);
|
|
1560
1560
|
}), !1);
|
|
1561
|
-
}),
|
|
1561
|
+
}), _;
|
|
1562
1562
|
}, re.prototype.startsWithAnyOf = function() {
|
|
1563
1563
|
var e = we.apply(Ye, arguments);
|
|
1564
1564
|
return e.every(function(t) {
|
|
@@ -1731,14 +1731,14 @@ var Rr = { exports: {} };
|
|
|
1731
1731
|
function i(f) {
|
|
1732
1732
|
var p, y = f.name;
|
|
1733
1733
|
return { name: y, schema: f, mutate: function(b) {
|
|
1734
|
-
var g = b.trans,
|
|
1734
|
+
var g = b.trans, _ = b.type, S = b.keys, E = b.values, O = b.range;
|
|
1735
1735
|
return new Promise(function(k, I) {
|
|
1736
1736
|
k = J(k);
|
|
1737
|
-
var A = g.objectStore(y), R = A.keyPath == null, D =
|
|
1738
|
-
if (!D &&
|
|
1739
|
-
throw new Error("Invalid operation type: " +
|
|
1740
|
-
var G, L = (
|
|
1741
|
-
if (
|
|
1737
|
+
var A = g.objectStore(y), R = A.keyPath == null, D = _ === "put" || _ === "add";
|
|
1738
|
+
if (!D && _ !== "delete" && _ !== "deleteRange")
|
|
1739
|
+
throw new Error("Invalid operation type: " + _);
|
|
1740
|
+
var G, L = (S || E || { length: 1 }).length;
|
|
1741
|
+
if (S && E && S.length !== E.length)
|
|
1742
1742
|
throw new Error("Given keys array must have same length as given values array.");
|
|
1743
1743
|
if (L === 0)
|
|
1744
1744
|
return k({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
|
|
@@ -1746,23 +1746,23 @@ var Rr = { exports: {} };
|
|
|
1746
1746
|
++ce, ht(se);
|
|
1747
1747
|
}
|
|
1748
1748
|
var W = [], V = [], ce = 0;
|
|
1749
|
-
if (
|
|
1749
|
+
if (_ === "deleteRange") {
|
|
1750
1750
|
if (O.type === 4)
|
|
1751
1751
|
return k({ numFailures: ce, failures: V, results: [], lastResult: void 0 });
|
|
1752
1752
|
O.type === 3 ? W.push(G = A.clear()) : W.push(G = A.delete(r(O)));
|
|
1753
1753
|
} else {
|
|
1754
|
-
var R = D ? R ? [E,
|
|
1754
|
+
var R = D ? R ? [E, S] : [E, null] : [S, null], U = R[0], Ee = R[1];
|
|
1755
1755
|
if (D)
|
|
1756
1756
|
for (var ae = 0; ae < L; ++ae)
|
|
1757
|
-
W.push(G = Ee && Ee[ae] !== void 0 ? A[
|
|
1757
|
+
W.push(G = Ee && Ee[ae] !== void 0 ? A[_](U[ae], Ee[ae]) : A[_](U[ae])), G.onerror = Y;
|
|
1758
1758
|
else
|
|
1759
1759
|
for (ae = 0; ae < L; ++ae)
|
|
1760
|
-
W.push(G = A[
|
|
1760
|
+
W.push(G = A[_](U[ae])), G.onerror = Y;
|
|
1761
1761
|
}
|
|
1762
1762
|
function Vt(se) {
|
|
1763
1763
|
se = se.target.result, W.forEach(function(ze, Nn) {
|
|
1764
1764
|
return ze.error != null && (V[Nn] = ze.error);
|
|
1765
|
-
}), k({ numFailures: ce, failures: V, results:
|
|
1765
|
+
}), k({ numFailures: ce, failures: V, results: _ === "delete" ? S : W.map(function(ze) {
|
|
1766
1766
|
return ze.result;
|
|
1767
1767
|
}), lastResult: se });
|
|
1768
1768
|
}
|
|
@@ -1771,42 +1771,42 @@ var Rr = { exports: {} };
|
|
|
1771
1771
|
}, G.onsuccess = Vt;
|
|
1772
1772
|
});
|
|
1773
1773
|
}, getMany: function(b) {
|
|
1774
|
-
var g = b.trans,
|
|
1775
|
-
return new Promise(function(
|
|
1776
|
-
|
|
1777
|
-
for (var O, k = g.objectStore(y), I =
|
|
1778
|
-
W = W.target, A[W._pos] = W.result, ++D === R &&
|
|
1774
|
+
var g = b.trans, _ = b.keys;
|
|
1775
|
+
return new Promise(function(S, E) {
|
|
1776
|
+
S = J(S);
|
|
1777
|
+
for (var O, k = g.objectStore(y), I = _.length, A = new Array(I), R = 0, D = 0, G = function(W) {
|
|
1778
|
+
W = W.target, A[W._pos] = W.result, ++D === R && S(A);
|
|
1779
1779
|
}, L = ye(E), Y = 0; Y < I; ++Y)
|
|
1780
|
-
|
|
1781
|
-
R === 0 &&
|
|
1780
|
+
_[Y] != null && ((O = k.get(_[Y]))._pos = Y, O.onsuccess = G, O.onerror = L, ++R);
|
|
1781
|
+
R === 0 && S(A);
|
|
1782
1782
|
});
|
|
1783
1783
|
}, get: function(b) {
|
|
1784
|
-
var g = b.trans,
|
|
1785
|
-
return new Promise(function(
|
|
1786
|
-
|
|
1787
|
-
var O = g.objectStore(y).get(
|
|
1784
|
+
var g = b.trans, _ = b.key;
|
|
1785
|
+
return new Promise(function(S, E) {
|
|
1786
|
+
S = J(S);
|
|
1787
|
+
var O = g.objectStore(y).get(_);
|
|
1788
1788
|
O.onsuccess = function(k) {
|
|
1789
|
-
return
|
|
1789
|
+
return S(k.target.result);
|
|
1790
1790
|
}, O.onerror = ye(E);
|
|
1791
1791
|
});
|
|
1792
1792
|
}, query: (p = l, function(b) {
|
|
1793
|
-
return new Promise(function(g,
|
|
1793
|
+
return new Promise(function(g, _) {
|
|
1794
1794
|
g = J(g);
|
|
1795
|
-
var
|
|
1795
|
+
var S, E, O, R = b.trans, k = b.values, I = b.limit, G = b.query, A = I === 1 / 0 ? void 0 : I, D = G.index, G = G.range, R = R.objectStore(y), D = D.isPrimaryKey ? R : R.index(D.name), G = r(G);
|
|
1796
1796
|
if (I === 0)
|
|
1797
1797
|
return g({ result: [] });
|
|
1798
1798
|
p ? ((A = k ? D.getAll(G, A) : D.getAllKeys(G, A)).onsuccess = function(L) {
|
|
1799
1799
|
return g({ result: L.target.result });
|
|
1800
|
-
}, A.onerror = ye(
|
|
1800
|
+
}, A.onerror = ye(_)) : (S = 0, E = !k && "openKeyCursor" in D ? D.openKeyCursor(G) : D.openCursor(G), O = [], E.onsuccess = function(L) {
|
|
1801
1801
|
var Y = E.result;
|
|
1802
|
-
return Y ? (O.push(k ? Y.value : Y.primaryKey), ++
|
|
1803
|
-
}, E.onerror = ye(
|
|
1802
|
+
return Y ? (O.push(k ? Y.value : Y.primaryKey), ++S === I ? g({ result: O }) : void Y.continue()) : g({ result: O });
|
|
1803
|
+
}, E.onerror = ye(_));
|
|
1804
1804
|
});
|
|
1805
1805
|
}), openCursor: function(b) {
|
|
1806
|
-
var g = b.trans,
|
|
1806
|
+
var g = b.trans, _ = b.values, S = b.query, E = b.reverse, O = b.unique;
|
|
1807
1807
|
return new Promise(function(k, I) {
|
|
1808
1808
|
k = J(k);
|
|
1809
|
-
var D =
|
|
1809
|
+
var D = S.index, A = S.range, R = g.objectStore(y), R = D.isPrimaryKey ? R : R.index(D.name), D = E ? O ? "prevunique" : "prev" : O ? "nextunique" : "next", G = !_ && "openKeyCursor" in R ? R.openKeyCursor(r(A), D) : R.openCursor(r(A), D);
|
|
1810
1810
|
G.onerror = ye(I), G.onsuccess = J(function(L) {
|
|
1811
1811
|
var Y, W, V, ce, U = G.result;
|
|
1812
1812
|
U ? (U.___id = ++si, U.done = !1, Y = U.continue.bind(U), W = (W = U.continuePrimaryKey) && W.bind(U), V = U.advance.bind(U), ce = function() {
|
|
@@ -1845,9 +1845,9 @@ var Rr = { exports: {} };
|
|
|
1845
1845
|
}, I);
|
|
1846
1846
|
});
|
|
1847
1847
|
}, count: function(b) {
|
|
1848
|
-
var g = b.query,
|
|
1848
|
+
var g = b.query, _ = b.trans, S = g.index, E = g.range;
|
|
1849
1849
|
return new Promise(function(O, k) {
|
|
1850
|
-
var I =
|
|
1850
|
+
var I = _.objectStore(y), A = S.isPrimaryKey ? I : I.index(S.name), I = r(E), A = I ? A.count(I) : A.count();
|
|
1851
1851
|
A.onsuccess = J(function(R) {
|
|
1852
1852
|
return O(R.target.result);
|
|
1853
1853
|
}), A.onerror = ye(k);
|
|
@@ -1857,13 +1857,13 @@ var Rr = { exports: {} };
|
|
|
1857
1857
|
var a, s, u, m = (s = d, u = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: u.map(function(f) {
|
|
1858
1858
|
return s.objectStore(f);
|
|
1859
1859
|
}).map(function(f) {
|
|
1860
|
-
var p = f.keyPath, g = f.autoIncrement, y = N(p), b = {}, g = { name: f.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: y, keyPath: p, autoIncrement: g, unique: !0, extractKey: vn(p) }, indexes: yr(f.indexNames).map(function(
|
|
1861
|
-
return f.index(
|
|
1860
|
+
var p = f.keyPath, g = f.autoIncrement, y = N(p), b = {}, g = { name: f.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: y, keyPath: p, autoIncrement: g, unique: !0, extractKey: vn(p) }, indexes: yr(f.indexNames).map(function(_) {
|
|
1861
|
+
return f.index(_);
|
|
1862
1862
|
}).map(function(O) {
|
|
1863
|
-
var
|
|
1863
|
+
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) };
|
|
1864
1864
|
return b[yt(O)] = k;
|
|
1865
|
-
}), getIndexByKeyPath: function(
|
|
1866
|
-
return b[yt(
|
|
1865
|
+
}), getIndexByKeyPath: function(_) {
|
|
1866
|
+
return b[yt(_)];
|
|
1867
1867
|
} };
|
|
1868
1868
|
return b[":id"] = g.primaryKey, p != null && (b[yt(p)] = g.primaryKey), g;
|
|
1869
1869
|
}) }, hasGetAll: 0 < u.length && "getAll" in s.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), d = m.schema, l = m.hasGetAll, m = d.tables.map(i), c = {};
|
|
@@ -1924,13 +1924,13 @@ var Rr = { exports: {} };
|
|
|
1924
1924
|
return M.trans = a, M.transless = u, t !== 0 ? (Mt(e, n), l = t, ((d = a).storeNames.includes("$meta") ? d.table("$meta").get("version").then(function(m) {
|
|
1925
1925
|
return m ?? l;
|
|
1926
1926
|
}) : T.resolve(l)).then(function(m) {
|
|
1927
|
-
return f = m, p = a, y = n, b = [], m = (c = e)._versions, g = c._dbSchema = Gt(0, c.idbdb, y), (m = m.filter(function(
|
|
1928
|
-
return
|
|
1929
|
-
})).length !== 0 ? (m.forEach(function(
|
|
1927
|
+
return f = m, p = a, y = n, b = [], m = (c = e)._versions, g = c._dbSchema = Gt(0, c.idbdb, y), (m = m.filter(function(_) {
|
|
1928
|
+
return _._cfg.version >= f;
|
|
1929
|
+
})).length !== 0 ? (m.forEach(function(_) {
|
|
1930
1930
|
b.push(function() {
|
|
1931
|
-
var
|
|
1932
|
-
Ft(c,
|
|
1933
|
-
var O = _n(
|
|
1931
|
+
var S = g, E = _._cfg.dbschema;
|
|
1932
|
+
Ft(c, S, y), Ft(c, E, y), g = c._dbSchema = E;
|
|
1933
|
+
var O = _n(S, E);
|
|
1934
1934
|
O.add.forEach(function(D) {
|
|
1935
1935
|
Sn(y, D[0], D[1].primKey, D[1].indexes);
|
|
1936
1936
|
}), O.change.forEach(function(D) {
|
|
@@ -1945,12 +1945,12 @@ var Rr = { exports: {} };
|
|
|
1945
1945
|
return G.deleteIndex(L);
|
|
1946
1946
|
});
|
|
1947
1947
|
});
|
|
1948
|
-
var k =
|
|
1949
|
-
if (k &&
|
|
1948
|
+
var k = _._cfg.contentUpgrade;
|
|
1949
|
+
if (k && _._cfg.version > f) {
|
|
1950
1950
|
Mt(c, y), p._memoizedTables = {};
|
|
1951
1951
|
var I = Vn(E);
|
|
1952
1952
|
O.del.forEach(function(D) {
|
|
1953
|
-
I[D] =
|
|
1953
|
+
I[D] = S[D];
|
|
1954
1954
|
}), wn(c, [c.Transaction.prototype]), Bt(c, [c.Transaction.prototype], K(I), I), p.schema = I;
|
|
1955
1955
|
var A, R = qt(k);
|
|
1956
1956
|
return R && Je(), O = T.follow(function() {
|
|
@@ -1960,18 +1960,18 @@ var Rr = { exports: {} };
|
|
|
1960
1960
|
return A;
|
|
1961
1961
|
});
|
|
1962
1962
|
}
|
|
1963
|
-
}), b.push(function(
|
|
1964
|
-
var E, O, k =
|
|
1965
|
-
E = k, O =
|
|
1963
|
+
}), b.push(function(S) {
|
|
1964
|
+
var E, O, k = _._cfg.dbschema;
|
|
1965
|
+
E = k, O = S, [].slice.call(O.db.objectStoreNames).forEach(function(I) {
|
|
1966
1966
|
return E[I] == null && O.db.deleteObjectStore(I);
|
|
1967
1967
|
}), wn(c, [c.Transaction.prototype]), Bt(c, [c.Transaction.prototype], c._storeNames, c._dbSchema), p.schema = c._dbSchema;
|
|
1968
|
-
}), b.push(function(
|
|
1969
|
-
c.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(c.idbdb.version / 10) ===
|
|
1968
|
+
}), b.push(function(S) {
|
|
1969
|
+
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) {
|
|
1970
1970
|
return E !== "$meta";
|
|
1971
|
-
})) :
|
|
1971
|
+
})) : S.objectStore("$meta").put(_._cfg.version, "version"));
|
|
1972
1972
|
});
|
|
1973
|
-
}), function
|
|
1974
|
-
return b.length ? T.resolve(b.shift()(p.idbtrans)).then(
|
|
1973
|
+
}), function _() {
|
|
1974
|
+
return b.length ? T.resolve(b.shift()(p.idbtrans)).then(_) : T.resolve();
|
|
1975
1975
|
}().then(function() {
|
|
1976
1976
|
mr(g, y);
|
|
1977
1977
|
})) : T.resolve();
|
|
@@ -2265,18 +2265,18 @@ var Rr = { exports: {} };
|
|
|
2265
2265
|
if (!b)
|
|
2266
2266
|
throw new F.MissingAPI();
|
|
2267
2267
|
b.onerror = ye(p), b.onblocked = J(e._fireOnBlocked), b.onupgradeneeded = J(function(g) {
|
|
2268
|
-
var
|
|
2269
|
-
m = b.transaction, t.autoSchema && !e._options.allowEmptyDB ? (b.onerror = ht, m.abort(), b.result.close(), (
|
|
2268
|
+
var _;
|
|
2269
|
+
m = b.transaction, t.autoSchema && !e._options.allowEmptyDB ? (b.onerror = ht, m.abort(), b.result.close(), (_ = n.deleteDatabase(y)).onsuccess = _.onerror = J(function() {
|
|
2270
2270
|
p(new F.NoSuchDatabase("Database ".concat(y, " doesnt exist")));
|
|
2271
2271
|
})) : (m.onerror = ye(p), g = g.oldVersion > Math.pow(2, 62) ? 0 : g.oldVersion, c = g < 1, e.idbdb = b.result, a && di(e, m), fi(e, g / 10, m, p));
|
|
2272
2272
|
}, p), b.onsuccess = J(function() {
|
|
2273
2273
|
m = null;
|
|
2274
|
-
var g,
|
|
2274
|
+
var g, _, S, E, O, k = e.idbdb = b.result, I = wt(k.objectStoreNames);
|
|
2275
2275
|
if (0 < I.length)
|
|
2276
2276
|
try {
|
|
2277
2277
|
var A = k.transaction((E = I).length === 1 ? E[0] : E, "readonly");
|
|
2278
2278
|
if (t.autoSchema)
|
|
2279
|
-
|
|
2279
|
+
_ = k, S = A, (g = e).verno = _.version / 10, S = g._dbSchema = Gt(0, _, S), g._storeNames = wt(_.objectStoreNames, 0), Bt(g, [g._allTables], K(S), S);
|
|
2280
2280
|
else if (Ft(e, e._dbSchema, A), ((O = _n(Gt(0, (O = e).idbdb, A), O._dbSchema)).add.length || O.change.some(function(R) {
|
|
2281
2281
|
return R.add.length || R.change.length;
|
|
2282
2282
|
})) && !a)
|
|
@@ -2366,10 +2366,10 @@ var Rr = { exports: {} };
|
|
|
2366
2366
|
return v(v({}, e), { table: function(t) {
|
|
2367
2367
|
var n = e.table(t), r = n.schema, i = {}, a = [];
|
|
2368
2368
|
function s(c, f, p) {
|
|
2369
|
-
var y = yt(c), b = i[y] = i[y] || [], g = c == null ? 0 : typeof c == "string" ? 1 : c.length,
|
|
2370
|
-
return b.push(
|
|
2371
|
-
return
|
|
2372
|
-
}),
|
|
2369
|
+
var y = yt(c), b = i[y] = i[y] || [], g = c == null ? 0 : typeof c == "string" ? 1 : c.length, _ = 0 < f, _ = v(v({}, p), { name: _ ? "".concat(y, "(virtual-from:").concat(p.name, ")") : p.name, lowLevelIndex: p, isVirtual: _, keyTail: f, keyLength: g, extractKey: vn(c), unique: !_ && p.unique });
|
|
2370
|
+
return b.push(_), _.isPrimaryKey || a.push(_), 1 < g && s(g === 2 ? c[0] : c.slice(0, g - 1), f + 1, p), b.sort(function(S, E) {
|
|
2371
|
+
return S.keyTail - E.keyTail;
|
|
2372
|
+
}), _;
|
|
2373
2373
|
}
|
|
2374
2374
|
t = s(r.primaryKey.keyPath, 0, r.primaryKey), i[":id"] = [t];
|
|
2375
2375
|
for (var u = 0, d = r.indexes; u < d.length; u++) {
|
|
@@ -2388,21 +2388,21 @@ var Rr = { exports: {} };
|
|
|
2388
2388
|
return n.query(m(c));
|
|
2389
2389
|
}, openCursor: function(c) {
|
|
2390
2390
|
var f = c.query.index, p = f.keyTail, y = f.isVirtual, b = f.keyLength;
|
|
2391
|
-
return y ? n.openCursor(m(c)).then(function(
|
|
2392
|
-
return
|
|
2391
|
+
return y ? n.openCursor(m(c)).then(function(_) {
|
|
2392
|
+
return _ && g(_);
|
|
2393
2393
|
}) : n.openCursor(c);
|
|
2394
|
-
function g(
|
|
2395
|
-
return Object.create(
|
|
2396
|
-
|
|
2397
|
-
} }, continuePrimaryKey: { value: function(
|
|
2398
|
-
|
|
2394
|
+
function g(_) {
|
|
2395
|
+
return Object.create(_, { continue: { value: function(S) {
|
|
2396
|
+
S != null ? _.continue($t(S, c.reverse ? e.MAX_KEY : e.MIN_KEY, p)) : c.unique ? _.continue(_.key.slice(0, b).concat(c.reverse ? e.MIN_KEY : e.MAX_KEY, p)) : _.continue();
|
|
2397
|
+
} }, continuePrimaryKey: { value: function(S, E) {
|
|
2398
|
+
_.continuePrimaryKey($t(S, e.MAX_KEY, p), E);
|
|
2399
2399
|
} }, primaryKey: { get: function() {
|
|
2400
|
-
return
|
|
2400
|
+
return _.primaryKey;
|
|
2401
2401
|
} }, key: { get: function() {
|
|
2402
|
-
var
|
|
2403
|
-
return b === 1 ?
|
|
2402
|
+
var S = _.key;
|
|
2403
|
+
return b === 1 ? S[0] : S.slice(0, b);
|
|
2404
2404
|
} }, value: { get: function() {
|
|
2405
|
-
return
|
|
2405
|
+
return _.value;
|
|
2406
2406
|
} } });
|
|
2407
2407
|
}
|
|
2408
2408
|
} });
|
|
@@ -2450,8 +2450,8 @@ var Rr = { exports: {} };
|
|
|
2450
2450
|
return function c(f, p, y) {
|
|
2451
2451
|
return n.query({ trans: f, values: !1, query: { index: r, range: p }, limit: y }).then(function(b) {
|
|
2452
2452
|
var g = b.result;
|
|
2453
|
-
return m({ type: "delete", keys: g, trans: f }).then(function(
|
|
2454
|
-
return 0 <
|
|
2453
|
+
return m({ type: "delete", keys: g, trans: f }).then(function(_) {
|
|
2454
|
+
return 0 < _.numFailures ? Promise.reject(_.failures[0]) : g.length < y ? { failures: [], numFailures: 0, lastResult: void 0 } : c(f, v(v({}, p), { lower: g[g.length - 1], lowerOpen: !0 }), y);
|
|
2455
2455
|
});
|
|
2456
2456
|
});
|
|
2457
2457
|
}(i.trans, i.range, 1e4);
|
|
@@ -2462,21 +2462,21 @@ var Rr = { exports: {} };
|
|
|
2462
2462
|
var f, p, y, b = M.trans, g = c.keys || jn(r, c);
|
|
2463
2463
|
if (!g)
|
|
2464
2464
|
throw new Error("Keys missing");
|
|
2465
|
-
return (c = c.type === "add" || c.type === "put" ? v(v({}, c), { keys: g }) : v({}, c)).type !== "delete" && (c.values = C([], c.values, !0)), c.keys && (c.keys = C([], c.keys, !0)), f = n, y = g, ((p = c).type === "add" ? Promise.resolve([]) : f.getMany({ trans: p.trans, keys: y, cache: "immutable" })).then(function(
|
|
2466
|
-
var
|
|
2467
|
-
var k, I, A, R =
|
|
2465
|
+
return (c = c.type === "add" || c.type === "put" ? v(v({}, c), { keys: g }) : v({}, c)).type !== "delete" && (c.values = C([], c.values, !0)), c.keys && (c.keys = C([], c.keys, !0)), f = n, y = g, ((p = c).type === "add" ? Promise.resolve([]) : f.getMany({ trans: p.trans, keys: y, cache: "immutable" })).then(function(_) {
|
|
2466
|
+
var S = g.map(function(E, O) {
|
|
2467
|
+
var k, I, A, R = _[O], D = { onerror: null, onsuccess: null };
|
|
2468
2468
|
return c.type === "delete" ? u.fire.call(D, E, R, b) : c.type === "add" || R === void 0 ? (k = d.fire.call(D, E, c.values[O], b), E == null && k != null && (c.keys[O] = E = k, r.outbound || fe(c.values[O], r.keyPath, E))) : (k = Tn(R, c.values[O]), (I = l.fire.call(D, k, E, R, b)) && (A = c.values[O], Object.keys(I).forEach(function(G) {
|
|
2469
2469
|
ie(A, G) ? A[G] = I[G] : fe(A, G, I[G]);
|
|
2470
2470
|
}))), D;
|
|
2471
2471
|
});
|
|
2472
2472
|
return n.mutate(c).then(function(E) {
|
|
2473
2473
|
for (var O = E.failures, k = E.results, I = E.numFailures, E = E.lastResult, A = 0; A < g.length; ++A) {
|
|
2474
|
-
var R = (k || g)[A], D =
|
|
2475
|
-
R == null ? D.onerror && D.onerror(O[A]) : D.onsuccess && D.onsuccess(c.type === "put" &&
|
|
2474
|
+
var R = (k || g)[A], D = S[A];
|
|
2475
|
+
R == null ? D.onerror && D.onerror(O[A]) : D.onsuccess && D.onsuccess(c.type === "put" && _[A] ? c.values[A] : R);
|
|
2476
2476
|
}
|
|
2477
2477
|
return { failures: O, results: k, numFailures: I, lastResult: E };
|
|
2478
2478
|
}).catch(function(E) {
|
|
2479
|
-
return
|
|
2479
|
+
return S.forEach(function(O) {
|
|
2480
2480
|
return O.onerror && O.onerror(E);
|
|
2481
2481
|
}), Promise.reject(E);
|
|
2482
2482
|
});
|
|
@@ -2538,9 +2538,9 @@ var Rr = { exports: {} };
|
|
|
2538
2538
|
}
|
|
2539
2539
|
var a = e.table(r), s = a.schema, u = s.primaryKey, d = u.extractKey, l = u.outbound, m = v(v({}, a), { mutate: function(f) {
|
|
2540
2540
|
function p(D) {
|
|
2541
|
-
return D = "idb://".concat(t, "/").concat(r, "/").concat(D),
|
|
2541
|
+
return D = "idb://".concat(t, "/").concat(r, "/").concat(D), S[D] || (S[D] = new oe());
|
|
2542
2542
|
}
|
|
2543
|
-
var y, b, g,
|
|
2543
|
+
var y, b, g, _ = f.trans, S = f.mutatedParts || (f.mutatedParts = {}), E = p(""), O = p(":dels"), k = f.type, R = f.type === "deleteRange" ? [f.range] : f.type === "delete" ? [f.keys] : f.values.length < 50 ? [jn(u, f).filter(function(D) {
|
|
2544
2544
|
return D;
|
|
2545
2545
|
}), f.values] : [], I = R[0], A = R[1], R = f.trans._cache;
|
|
2546
2546
|
return N(I) ? (E.addKeys(I), (R = k === "delete" || I.length === A.length ? Sr(I, R) : null) || O.addKeys(I), (R || A) && (y = p, b = R, g = A, s.indexes.forEach(function(D) {
|
|
@@ -2560,7 +2560,7 @@ var Rr = { exports: {} };
|
|
|
2560
2560
|
}))) : 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) {
|
|
2561
2561
|
return p(D.name).add(n);
|
|
2562
2562
|
})), a.mutate(f).then(function(D) {
|
|
2563
|
-
return !I || f.type !== "add" && f.type !== "put" || E.addKeys(D.results),
|
|
2563
|
+
return !I || f.type !== "add" && f.type !== "put" || E.addKeys(D.results), _.mutatedParts = Wt(_.mutatedParts || {}, S), D;
|
|
2564
2564
|
});
|
|
2565
2565
|
} }), c = { get: function(f) {
|
|
2566
2566
|
return [u, new oe(f.key)];
|
|
@@ -2571,20 +2571,20 @@ var Rr = { exports: {} };
|
|
|
2571
2571
|
m[f] = function(p) {
|
|
2572
2572
|
var y = M.subscr, b = !!y, g = Er(M, a) && Or(f, p) ? p.obsSet = {} : y;
|
|
2573
2573
|
if (b) {
|
|
2574
|
-
var
|
|
2574
|
+
var _ = function(A) {
|
|
2575
2575
|
return A = "idb://".concat(t, "/").concat(r, "/").concat(A), g[A] || (g[A] = new oe());
|
|
2576
|
-
},
|
|
2577
|
-
if ((f === "query" && b.isPrimaryKey && !p.values ? E :
|
|
2576
|
+
}, S = _(""), E = _(":dels"), y = c[f](p), b = y[0], y = y[1];
|
|
2577
|
+
if ((f === "query" && b.isPrimaryKey && !p.values ? E : _(b.name || "")).add(y), !b.isPrimaryKey) {
|
|
2578
2578
|
if (f !== "count") {
|
|
2579
2579
|
var O = f === "query" && l && p.values && a.query(v(v({}, p), { values: !1 }));
|
|
2580
2580
|
return a[f].apply(this, arguments).then(function(A) {
|
|
2581
2581
|
if (f === "query") {
|
|
2582
2582
|
if (l && p.values)
|
|
2583
2583
|
return O.then(function(L) {
|
|
2584
|
-
return L = L.result,
|
|
2584
|
+
return L = L.result, S.addKeys(L), A;
|
|
2585
2585
|
});
|
|
2586
2586
|
var R = p.values ? A.result.map(d) : A.result;
|
|
2587
|
-
(p.values ?
|
|
2587
|
+
(p.values ? S : E).addKeys(R);
|
|
2588
2588
|
} else if (f === "openCursor") {
|
|
2589
2589
|
var D = A, G = p.values;
|
|
2590
2590
|
return D && Object.create(D, { key: { get: function() {
|
|
@@ -2593,7 +2593,7 @@ var Rr = { exports: {} };
|
|
|
2593
2593
|
var L = D.primaryKey;
|
|
2594
2594
|
return E.addKey(L), L;
|
|
2595
2595
|
} }, value: { get: function() {
|
|
2596
|
-
return G &&
|
|
2596
|
+
return G && S.addKey(D.primaryKey), D.value;
|
|
2597
2597
|
} } });
|
|
2598
2598
|
}
|
|
2599
2599
|
return A;
|
|
@@ -2641,18 +2641,18 @@ var Rr = { exports: {} };
|
|
|
2641
2641
|
}));
|
|
2642
2642
|
break;
|
|
2643
2643
|
case "put":
|
|
2644
|
-
var
|
|
2644
|
+
var _ = new oe().addKeys(y.values.map(function(k) {
|
|
2645
2645
|
return l(k);
|
|
2646
2646
|
})), b = p.filter(function(k) {
|
|
2647
|
-
return k = t.values ? l(k) : k, !Ut(new oe(k),
|
|
2647
|
+
return k = t.values ? l(k) : k, !Ut(new oe(k), _);
|
|
2648
2648
|
}).concat(t.values ? g : g.map(function(k) {
|
|
2649
2649
|
return l(k);
|
|
2650
2650
|
}));
|
|
2651
2651
|
break;
|
|
2652
2652
|
case "delete":
|
|
2653
|
-
var
|
|
2653
|
+
var S = new oe().addKeys(y.keys);
|
|
2654
2654
|
b = p.filter(function(k) {
|
|
2655
|
-
return k = t.values ? l(k) : k, !Ut(new oe(k),
|
|
2655
|
+
return k = t.values ? l(k) : k, !Ut(new oe(k), S);
|
|
2656
2656
|
});
|
|
2657
2657
|
break;
|
|
2658
2658
|
case "deleteRange":
|
|
@@ -2723,9 +2723,9 @@ var Rr = { exports: {} };
|
|
|
2723
2723
|
return L.trans === u;
|
|
2724
2724
|
});
|
|
2725
2725
|
if (u._explicit && d && u.mutatedParts)
|
|
2726
|
-
for (var g = 0,
|
|
2727
|
-
for (var
|
|
2728
|
-
Dn((A = E[
|
|
2726
|
+
for (var g = 0, _ = Object.values(p.queries.query); g < _.length; g++)
|
|
2727
|
+
for (var S = 0, E = (I = _[g]).slice(); S < E.length; S++)
|
|
2728
|
+
Dn((A = E[S]).obsSet, u.mutatedParts) && (Ke(I, A), A.subscribers.forEach(function(L) {
|
|
2729
2729
|
return l.add(L);
|
|
2730
2730
|
}));
|
|
2731
2731
|
else if (0 < b.length) {
|
|
@@ -2773,33 +2773,33 @@ var Rr = { exports: {} };
|
|
|
2773
2773
|
}, query: function(a) {
|
|
2774
2774
|
if (!Er(M, r) || !Or("query", a))
|
|
2775
2775
|
return r.query(a);
|
|
2776
|
-
var s = ((l = M.trans) === null || l === void 0 ? void 0 : l.db._options.cache) === "immutable", c = M, u = c.requery, d = c.signal, l = function(y, b, g,
|
|
2777
|
-
var
|
|
2778
|
-
if (!
|
|
2776
|
+
var s = ((l = M.trans) === null || l === void 0 ? void 0 : l.db._options.cache) === "immutable", c = M, u = c.requery, d = c.signal, l = function(y, b, g, _) {
|
|
2777
|
+
var S = Ue["idb://".concat(y, "/").concat(b)];
|
|
2778
|
+
if (!S)
|
|
2779
2779
|
return [];
|
|
2780
|
-
if (!(b =
|
|
2781
|
-
return [null, !1,
|
|
2782
|
-
var E = b[(
|
|
2780
|
+
if (!(b = S.queries[g]))
|
|
2781
|
+
return [null, !1, S, null];
|
|
2782
|
+
var E = b[(_.query ? _.query.index.name : null) || ""];
|
|
2783
2783
|
if (!E)
|
|
2784
|
-
return [null, !1,
|
|
2784
|
+
return [null, !1, S, null];
|
|
2785
2785
|
switch (g) {
|
|
2786
2786
|
case "query":
|
|
2787
2787
|
var O = E.find(function(k) {
|
|
2788
|
-
return k.req.limit ===
|
|
2788
|
+
return k.req.limit === _.limit && k.req.values === _.values && Ar(k.req.query.range, _.query.range);
|
|
2789
2789
|
});
|
|
2790
|
-
return O ? [O, !0,
|
|
2791
|
-
return ("limit" in k.req ? k.req.limit : 1 / 0) >=
|
|
2792
|
-
}), !1,
|
|
2790
|
+
return O ? [O, !0, S, E] : [E.find(function(k) {
|
|
2791
|
+
return ("limit" in k.req ? k.req.limit : 1 / 0) >= _.limit && (!_.values || k.req.values) && vi(k.req.query.range, _.query.range);
|
|
2792
|
+
}), !1, S, E];
|
|
2793
2793
|
case "count":
|
|
2794
2794
|
return O = E.find(function(k) {
|
|
2795
|
-
return Ar(k.req.query.range,
|
|
2796
|
-
}), [O, !!O,
|
|
2795
|
+
return Ar(k.req.query.range, _.query.range);
|
|
2796
|
+
}), [O, !!O, S, E];
|
|
2797
2797
|
}
|
|
2798
2798
|
}(t, n, "query", a), m = l[0], c = l[1], f = l[2], p = l[3];
|
|
2799
2799
|
return m && c ? m.obsSet = a.obsSet : (c = r.query(a).then(function(y) {
|
|
2800
2800
|
var b = y.result;
|
|
2801
2801
|
if (m && (m.res = b), s) {
|
|
2802
|
-
for (var g = 0,
|
|
2802
|
+
for (var g = 0, _ = b.length; g < _; ++g)
|
|
2803
2803
|
Object.freeze(b[g]);
|
|
2804
2804
|
Object.freeze(b);
|
|
2805
2805
|
} else
|
|
@@ -2964,14 +2964,14 @@ var Rr = { exports: {} };
|
|
|
2964
2964
|
return l(m, c, f, null, y);
|
|
2965
2965
|
})) : q(E);
|
|
2966
2966
|
}
|
|
2967
|
-
var
|
|
2968
|
-
return
|
|
2967
|
+
var _, S = qt(y);
|
|
2968
|
+
return S && Je(), b = T.follow(function() {
|
|
2969
2969
|
var E;
|
|
2970
|
-
(
|
|
2971
|
-
}, b), (
|
|
2970
|
+
(_ = y.call(g, g)) && (S ? (E = Ie.bind(null, null), _.then(E, E)) : typeof _.next == "function" && typeof _.throw == "function" && (_ = Rn(_)));
|
|
2971
|
+
}, b), (_ && typeof _.then == "function" ? T.resolve(_).then(function(E) {
|
|
2972
2972
|
return g.active ? E : q(new F.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
|
|
2973
2973
|
}) : b.then(function() {
|
|
2974
|
-
return
|
|
2974
|
+
return _;
|
|
2975
2975
|
})).then(function(E) {
|
|
2976
2976
|
return p && g._resolve(), g._completion.then(function() {
|
|
2977
2977
|
return E;
|
|
@@ -3008,28 +3008,28 @@ var Rr = { exports: {} };
|
|
|
3008
3008
|
}));
|
|
3009
3009
|
});
|
|
3010
3010
|
};
|
|
3011
|
-
}), this.Collection = (i = this, dt(ri.prototype, function(
|
|
3011
|
+
}), this.Collection = (i = this, dt(ri.prototype, function(_, g) {
|
|
3012
3012
|
this.db = i;
|
|
3013
3013
|
var p = ar, y = null;
|
|
3014
3014
|
if (g)
|
|
3015
3015
|
try {
|
|
3016
3016
|
p = g();
|
|
3017
|
-
} catch (
|
|
3018
|
-
y =
|
|
3017
|
+
} catch (S) {
|
|
3018
|
+
y = S;
|
|
3019
3019
|
}
|
|
3020
|
-
var b =
|
|
3021
|
-
this._ctx = { table: g, index: b.index, isPrimKey: !b.index || g.schema.primKey.keyPath && b.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: y, or: b.or, valueMapper:
|
|
3020
|
+
var b = _._ctx, g = b.table, _ = g.hook.reading.fire;
|
|
3021
|
+
this._ctx = { table: g, index: b.index, isPrimKey: !b.index || g.schema.primKey.keyPath && b.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: y, or: b.or, valueMapper: _ !== ot ? _ : null };
|
|
3022
3022
|
})), this.Table = (a = this, dt(lr.prototype, function(c, f, p) {
|
|
3023
3023
|
this.db = a, this._tx = p, this.name = c, this.schema = f, this.hook = a._allTables[c] ? a._allTables[c].hook : ft(null, { creating: [Vr, H], reading: [Hr, ot], updating: [Xr, H], deleting: [Qr, H] });
|
|
3024
3024
|
})), this.Transaction = (s = this, dt(ai.prototype, function(c, f, p, y, b) {
|
|
3025
3025
|
var g = this;
|
|
3026
|
-
this.db = s, this.mode = c, this.storeNames = f, this.schema = p, this.chromeTransactionDurability = y, this.idbtrans = null, this.on = ft(this, "complete", "error", "abort"), this.parent = b || 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 T(function(
|
|
3027
|
-
g._resolve =
|
|
3026
|
+
this.db = s, this.mode = c, this.storeNames = f, this.schema = p, this.chromeTransactionDurability = y, this.idbtrans = null, this.on = ft(this, "complete", "error", "abort"), this.parent = b || 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 T(function(_, S) {
|
|
3027
|
+
g._resolve = _, g._reject = S;
|
|
3028
3028
|
}), this._completion.then(function() {
|
|
3029
3029
|
g.active = !1, g.on.complete.fire();
|
|
3030
|
-
}, function(
|
|
3031
|
-
var
|
|
3032
|
-
return g.active = !1, g.on.error.fire(
|
|
3030
|
+
}, function(_) {
|
|
3031
|
+
var S = g.active;
|
|
3032
|
+
return g.active = !1, g.on.error.fire(_), g.parent ? g.parent._reject(_) : S && g.idbtrans && g.idbtrans.abort(), q(_);
|
|
3033
3033
|
});
|
|
3034
3034
|
})), this.Version = (u = this, dt(hi.prototype, function(c) {
|
|
3035
3035
|
this.db = u, this._cfg = { version: c, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
|
|
@@ -3099,28 +3099,28 @@ var Rr = { exports: {} };
|
|
|
3099
3099
|
}, p = function(b) {
|
|
3100
3100
|
Wt(d, b), Dn(l, d) && f();
|
|
3101
3101
|
}, y = function() {
|
|
3102
|
-
var b, g,
|
|
3103
|
-
!u && Ht.indexedDB && (d = {}, b = {}, s && s.abort(), s = new AbortController(),
|
|
3102
|
+
var b, g, _;
|
|
3103
|
+
!u && Ht.indexedDB && (d = {}, b = {}, s && s.abort(), s = new AbortController(), _ = function(S) {
|
|
3104
3104
|
var E = Qe();
|
|
3105
3105
|
try {
|
|
3106
3106
|
a && Je();
|
|
3107
|
-
var O = Pe(e,
|
|
3107
|
+
var O = Pe(e, S);
|
|
3108
3108
|
return O = a ? O.finally(Ie) : O;
|
|
3109
3109
|
} finally {
|
|
3110
3110
|
E && Xe();
|
|
3111
3111
|
}
|
|
3112
|
-
}(g = { subscr: b, signal: s.signal, requery: f, querier: e, trans: null }), Promise.resolve(
|
|
3113
|
-
n = !0, t =
|
|
3112
|
+
}(g = { subscr: b, signal: s.signal, requery: f, querier: e, trans: null }), Promise.resolve(_).then(function(S) {
|
|
3113
|
+
n = !0, t = S, u || g.signal.aborted || (d = {}, function(E) {
|
|
3114
3114
|
for (var O in E)
|
|
3115
3115
|
if (ie(E, O))
|
|
3116
3116
|
return;
|
|
3117
3117
|
return 1;
|
|
3118
3118
|
}(l = b) || c || (Te(pt, p), c = !0), ln(function() {
|
|
3119
|
-
return !u && i.next && i.next(
|
|
3119
|
+
return !u && i.next && i.next(S);
|
|
3120
3120
|
}));
|
|
3121
|
-
}, function(
|
|
3122
|
-
n = !1, ["DatabaseClosedError", "AbortError"].includes(
|
|
3123
|
-
u || i.error && i.error(
|
|
3121
|
+
}, function(S) {
|
|
3122
|
+
n = !1, ["DatabaseClosedError", "AbortError"].includes(S == null ? void 0 : S.name) || u || ln(function() {
|
|
3123
|
+
u || i.error && i.error(S);
|
|
3124
3124
|
});
|
|
3125
3125
|
}));
|
|
3126
3126
|
};
|
|
@@ -3232,33 +3232,33 @@ var Di = Rr.exports;
|
|
|
3232
3232
|
const Un = /* @__PURE__ */ Ai(Di), Cr = Symbol.for("Dexie"), Wn = globalThis[Cr] || (globalThis[Cr] = Un);
|
|
3233
3233
|
if (Un.semVer !== Wn.semVer)
|
|
3234
3234
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${Un.semVer} and ${Wn.semVer}`);
|
|
3235
|
-
function X(
|
|
3236
|
-
let o = `${
|
|
3237
|
-
return
|
|
3235
|
+
function X(w) {
|
|
3236
|
+
let o = `${w.type}.${w.topics}`;
|
|
3237
|
+
return w.order && (o += `.${w.order}`), w.period && (o += `.${w.period}`), o;
|
|
3238
3238
|
}
|
|
3239
|
-
function nt(
|
|
3239
|
+
function nt(w) {
|
|
3240
3240
|
var o;
|
|
3241
|
-
if (
|
|
3242
|
-
const h = (o =
|
|
3243
|
-
h && h.length > 1 ? (
|
|
3241
|
+
if (w.widget === void 0) {
|
|
3242
|
+
const h = (o = w.topics) == null ? void 0 : o.split("-");
|
|
3243
|
+
h && h.length > 1 ? (w.dashboard = h ? h[0] : "", w.widget = h ? h[1] : "") : (w.widget = w.topics, w.dashboard = w.slide);
|
|
3244
3244
|
}
|
|
3245
|
-
return
|
|
3245
|
+
return w.topics === void 0 && (w.topics = `${w.dashboard}-${w.widget}`), w;
|
|
3246
3246
|
}
|
|
3247
|
-
function vt(
|
|
3247
|
+
function vt(w, o) {
|
|
3248
3248
|
var N;
|
|
3249
3249
|
let h, v, C, j, K;
|
|
3250
|
-
switch (
|
|
3250
|
+
switch (w.moderation) {
|
|
3251
3251
|
case Xt.BEFORE:
|
|
3252
|
-
h = /* @__PURE__ */ new Date(), v = (N =
|
|
3252
|
+
h = /* @__PURE__ */ new Date(), v = (N = w.beforeTime) == null ? void 0 : N.split(":"), C = Number.parseInt(v ? v[0] : "00"), j = Number.parseInt(v ? v[1] : "00"), K = Number.parseInt(v ? v[2] : "00"), o.before = h.setHours(C, j, K, 0) / 1e3, o.period || (o.period = h.getDay() === 1 ? 72 : 24);
|
|
3253
3253
|
break;
|
|
3254
3254
|
case Xt.DELAYED:
|
|
3255
|
-
|
|
3255
|
+
w.delay && w.delay > 0 && (o.delay = `${w.delay}`);
|
|
3256
3256
|
break;
|
|
3257
3257
|
case Xt.APPROVED:
|
|
3258
3258
|
o.approved = "1";
|
|
3259
3259
|
break;
|
|
3260
3260
|
default:
|
|
3261
|
-
|
|
3261
|
+
w.period !== 0 && (o.period = w.period);
|
|
3262
3262
|
}
|
|
3263
3263
|
return o;
|
|
3264
3264
|
}
|
|
@@ -3443,13 +3443,13 @@ class Tr {
|
|
|
3443
3443
|
}), this.db.open();
|
|
3444
3444
|
}
|
|
3445
3445
|
}
|
|
3446
|
-
function zn(
|
|
3446
|
+
function zn(w) {
|
|
3447
3447
|
return new Promise((o, h) => {
|
|
3448
|
-
|
|
3448
|
+
w.oncomplete = w.onsuccess = () => o(w.result), w.onabort = w.onerror = () => h(w.error);
|
|
3449
3449
|
});
|
|
3450
3450
|
}
|
|
3451
|
-
function Pi(
|
|
3452
|
-
const h = indexedDB.open(
|
|
3451
|
+
function Pi(w, o) {
|
|
3452
|
+
const h = indexedDB.open(w);
|
|
3453
3453
|
h.onupgradeneeded = () => h.result.createObjectStore(o);
|
|
3454
3454
|
const v = zn(h);
|
|
3455
3455
|
return (C, j) => v.then((K) => j(K.transaction(o, C).objectStore(o)));
|
|
@@ -3458,11 +3458,11 @@ let Gn;
|
|
|
3458
3458
|
function jr() {
|
|
3459
3459
|
return Gn || (Gn = Pi("keyval-store", "keyval")), Gn;
|
|
3460
3460
|
}
|
|
3461
|
-
function Fn(
|
|
3462
|
-
return o("readonly", (h) => zn(h.get(
|
|
3461
|
+
function Fn(w, o = jr()) {
|
|
3462
|
+
return o("readonly", (h) => zn(h.get(w)));
|
|
3463
3463
|
}
|
|
3464
|
-
function Qt(
|
|
3465
|
-
return h("readwrite", (v) => (v.put(o,
|
|
3464
|
+
function Qt(w, o, h = jr()) {
|
|
3465
|
+
return h("readwrite", (v) => (v.put(o, w), zn(v.transaction)));
|
|
3466
3466
|
}
|
|
3467
3467
|
class Kr {
|
|
3468
3468
|
constructor(o) {
|
|
@@ -3875,27 +3875,27 @@ class Nr {
|
|
|
3875
3875
|
this.options = o, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
|
|
3876
3876
|
}
|
|
3877
3877
|
}
|
|
3878
|
-
function Ii(
|
|
3879
|
-
for (;
|
|
3880
|
-
|
|
3881
|
-
return
|
|
3878
|
+
function Ii(w, o) {
|
|
3879
|
+
for (; w.length < o; )
|
|
3880
|
+
w = `0${w}`;
|
|
3881
|
+
return w;
|
|
3882
3882
|
}
|
|
3883
|
-
function Oe(
|
|
3883
|
+
function Oe(w, o) {
|
|
3884
3884
|
let h, v, C;
|
|
3885
3885
|
if (o.length === 0)
|
|
3886
|
-
return
|
|
3886
|
+
return w;
|
|
3887
3887
|
for (h = 0, C = o.length; h < C; h++)
|
|
3888
|
-
v = o.charCodeAt(h),
|
|
3889
|
-
return
|
|
3888
|
+
v = o.charCodeAt(h), w = (w << 5) - w + v, w |= 0;
|
|
3889
|
+
return w < 0 ? w * -2 : w;
|
|
3890
3890
|
}
|
|
3891
|
-
function Ci(
|
|
3892
|
-
return Object.keys(o).sort().reduce(v,
|
|
3891
|
+
function Ci(w, o, h) {
|
|
3892
|
+
return Object.keys(o).sort().reduce(v, w);
|
|
3893
3893
|
function v(C, j) {
|
|
3894
3894
|
return Gr(C, o[j], j, h);
|
|
3895
3895
|
}
|
|
3896
3896
|
}
|
|
3897
|
-
function Gr(
|
|
3898
|
-
const C = Oe(Oe(Oe(
|
|
3897
|
+
function Gr(w, o, h, v) {
|
|
3898
|
+
const C = Oe(Oe(Oe(w, h), Ri(o)), typeof o);
|
|
3899
3899
|
if (o === null)
|
|
3900
3900
|
return Oe(C, "null");
|
|
3901
3901
|
if (o === void 0)
|
|
@@ -3915,11 +3915,11 @@ function Gr(S, o, h, v) {
|
|
|
3915
3915
|
}
|
|
3916
3916
|
return Oe(C, o.toString());
|
|
3917
3917
|
}
|
|
3918
|
-
function Ri(
|
|
3919
|
-
return Object.prototype.toString.call(
|
|
3918
|
+
function Ri(w) {
|
|
3919
|
+
return Object.prototype.toString.call(w);
|
|
3920
3920
|
}
|
|
3921
|
-
function Ln(
|
|
3922
|
-
return Ii(Gr(0,
|
|
3921
|
+
function Ln(w) {
|
|
3922
|
+
return Ii(Gr(0, w, "", []).toString(16), 8);
|
|
3923
3923
|
}
|
|
3924
3924
|
class Ki {
|
|
3925
3925
|
constructor(o) {
|
|
@@ -4186,7 +4186,7 @@ class Ti {
|
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
4188
|
}
|
|
4189
|
-
var B = /* @__PURE__ */ ((
|
|
4189
|
+
var B = /* @__PURE__ */ ((w) => (w.MESSAGES = "messages", w.CLOUD = "cloud", w.SERIES = "series", w.TOPICS = "topics", w.WIDGET = "widget", w.WIDGETS = "widgets", w))(B || {}), x = /* @__PURE__ */ ((w) => (w.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", w.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", w.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", w.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", w.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", w.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", w.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", w.MESSAGES = "color:grey;background-color:tan;padding:0 4px 0 4px;border-radius:5px;", w.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", w.NONE = "color:transparent;background-color:transparent;", w.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", w.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", w.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", w.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", w.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", w.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", w.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", w))(x || {}), le = /* @__PURE__ */ ((w) => (w.APP_READY = "appReady", w.API_UPDATE = "apiUpdate", w.CHANNEL = "channel", w.ERROR = "error", w.GOTO_SLIDE = "gotoSlide", w.HIDE_MESSAGE = "hideMessage", w.NEXT_SLIDE = "nextSlide", w.PAUSE_PRESENTATION = "pausePresentation", w.PRESENTATION_READY = "presentationReady", w.PREV_SLIDE = "prevSlide", w.RELOAD_PRESENTATION = "reloadPresentation", w.SHOW_MODAL = "showModal", w.SLIDE_DID_LOAD = "slideDidLoad", w.SLIDE_GOTO = "slideGoto", w.SLIDE_READY = "slideReady", w.SLIDE_TRANSITIONER = "slideTransitioner", w.START_TRANSITIONER = "startTransitioner", w.STORAGE_INIT = "stroageInit", w.SUBSCRIBE = "subscribe", w.UPDATE = "update", w.VERSION = "version", w.WIDGET_UPDATE = "widgetUpdate", w))(le || {}), Xt = /* @__PURE__ */ ((w) => (w.APPROVED = "approved", w.BEFORE = "before", w.DELAYED = "delayed", w.NONE = "none", w.REALTIME = "realtime", w))(Xt || {}), he = /* @__PURE__ */ ((w) => (w.KEYVAL = "keyval", w.LOCAL = "local", w.SESSION = "session", w.DEXIE = "dexie", w.WINDOW = "window", w))(he || {});
|
|
4190
4190
|
class Mi {
|
|
4191
4191
|
/**
|
|
4192
4192
|
*
|
|
@@ -4234,7 +4234,7 @@ class Mi {
|
|
|
4234
4234
|
this.query.type
|
|
4235
4235
|
), {
|
|
4236
4236
|
data: null,
|
|
4237
|
-
message: `wrong method call for
|
|
4237
|
+
message: `wrong method call for getSeries, expected type is ${this.query.type}`,
|
|
4238
4238
|
success: !1
|
|
4239
4239
|
}) : await this.storageReader.getSeries(this.query));
|
|
4240
4240
|
P(this, "showModal", (o) => {
|