buzzcasting-storage 2.5.12 → 2.6.0
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 +4 -2
- package/dist/buzzcasting-storage.esm.js +181 -169
- package/package.json +1 -1
|
@@ -108,9 +108,10 @@ export declare interface IIndicators {
|
|
|
108
108
|
export declare interface ILabel {
|
|
109
109
|
label: string;
|
|
110
110
|
count: number;
|
|
111
|
-
info
|
|
111
|
+
info?: string;
|
|
112
112
|
current: ICloudIndicators;
|
|
113
|
-
previous
|
|
113
|
+
previous?: ICloudIndicators;
|
|
114
|
+
percentage?: number;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
export declare interface IMedium {
|
|
@@ -324,6 +325,7 @@ export declare class Widget {
|
|
|
324
325
|
getCloud: () => Promise<IResponse>;
|
|
325
326
|
getMessages: () => Promise<IResponse>;
|
|
326
327
|
getSeries: () => Promise<IResponse>;
|
|
328
|
+
showModal: (componentName: any) => void;
|
|
327
329
|
destroy(): void;
|
|
328
330
|
}
|
|
329
331
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ri = Object.defineProperty;
|
|
2
2
|
var Ni = (C, o, h) => o in C ? Ri(C, o, { enumerable: !0, configurable: !0, writable: !0, value: h }) : C[o] = h;
|
|
3
3
|
var P = (C, o, h) => (Ni(C, typeof o != "symbol" ? o + "" : o, h), h);
|
|
4
|
-
const Fi = "2.5.
|
|
4
|
+
const Fi = "2.5.13";
|
|
5
5
|
class $i {
|
|
6
6
|
constructor(o) {
|
|
7
7
|
P(this, "options");
|
|
@@ -26,7 +26,7 @@ class $i {
|
|
|
26
26
|
"%capi%c %cget",
|
|
27
27
|
Q,
|
|
28
28
|
H,
|
|
29
|
-
|
|
29
|
+
St,
|
|
30
30
|
o.slide,
|
|
31
31
|
o.widget
|
|
32
32
|
), await fetch(
|
|
@@ -44,7 +44,7 @@ class $i {
|
|
|
44
44
|
"%capi%c %cpost",
|
|
45
45
|
Q,
|
|
46
46
|
H,
|
|
47
|
-
|
|
47
|
+
St,
|
|
48
48
|
"hide",
|
|
49
49
|
[h, "api", v, o.type, o.id].join("/") + T,
|
|
50
50
|
{ ...D, method: "put" }
|
|
@@ -210,7 +210,7 @@ var zr = { exports: {} };
|
|
|
210
210
|
return t = e.indexOf(t), 0 <= t && e.splice(t, 1), 0 <= t;
|
|
211
211
|
}
|
|
212
212
|
var Qe = {};
|
|
213
|
-
function
|
|
213
|
+
function Se(e) {
|
|
214
214
|
var t, n, r, i;
|
|
215
215
|
if (arguments.length === 1) {
|
|
216
216
|
if (I(e))
|
|
@@ -508,7 +508,7 @@ var zr = { exports: {} };
|
|
|
508
508
|
n.then(r, i).finally(clearTimeout.bind(null, a));
|
|
509
509
|
}) : this;
|
|
510
510
|
} }), typeof Symbol < "u" && Symbol.toStringTag && je(K.prototype, Symbol.toStringTag, "Dexie.Promise"), Ae.env = dr(), Pe(K, { all: function() {
|
|
511
|
-
var e =
|
|
511
|
+
var e = Se.apply(null, arguments).map(It);
|
|
512
512
|
return new K(function(t, n) {
|
|
513
513
|
e.length === 0 && t([]);
|
|
514
514
|
var r = e.length;
|
|
@@ -523,7 +523,7 @@ var zr = { exports: {} };
|
|
|
523
523
|
e.then(t, n);
|
|
524
524
|
}) : new K(lt, !0, e);
|
|
525
525
|
}, reject: Kt, race: function() {
|
|
526
|
-
var e =
|
|
526
|
+
var e = Se.apply(null, arguments).map(It);
|
|
527
527
|
return new K(function(t, n) {
|
|
528
528
|
e.map(function(r) {
|
|
529
529
|
return K.resolve(r).then(t, n);
|
|
@@ -560,7 +560,7 @@ var zr = { exports: {} };
|
|
|
560
560
|
}, t, n, r);
|
|
561
561
|
});
|
|
562
562
|
} }), dt && (dt.allSettled && je(K, "allSettled", function() {
|
|
563
|
-
var e =
|
|
563
|
+
var e = Se.apply(null, arguments).map(It);
|
|
564
564
|
return new K(function(t) {
|
|
565
565
|
e.length === 0 && t([]);
|
|
566
566
|
var n = e.length, r = new Array(n);
|
|
@@ -575,7 +575,7 @@ var zr = { exports: {} };
|
|
|
575
575
|
});
|
|
576
576
|
});
|
|
577
577
|
}), dt.any && typeof AggregateError < "u" && je(K, "any", function() {
|
|
578
|
-
var e =
|
|
578
|
+
var e = Se.apply(null, arguments).map(It);
|
|
579
579
|
return new K(function(t, n) {
|
|
580
580
|
e.length === 0 && n(new AggregateError([]));
|
|
581
581
|
var r = e.length, i = new Array(r);
|
|
@@ -645,7 +645,7 @@ var zr = { exports: {} };
|
|
|
645
645
|
Promise === dt && re.echoes === 0 ? Mt === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
|
|
646
646
|
}
|
|
647
647
|
("" + ye).indexOf("[native code]") === -1 && (et = Te = G);
|
|
648
|
-
var ee = K.reject, be = "4.0.1-beta.10", We = "",
|
|
648
|
+
var ee = K.reject, be = "4.0.1-beta.10", We = "", xe = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", pr = "String expected.", tt = [], Rt = "__dbnames", mn = "readonly", bn = "readwrite";
|
|
649
649
|
function Ue(e, t) {
|
|
650
650
|
return e ? t ? function() {
|
|
651
651
|
return e.apply(this, arguments) && t.apply(this, arguments);
|
|
@@ -1275,16 +1275,16 @@ var zr = { exports: {} };
|
|
|
1275
1275
|
var i, a, s;
|
|
1276
1276
|
s = typeof e == "function" ? e : (i = M(e), a = i.length, function(g) {
|
|
1277
1277
|
for (var w = !1, _ = 0; _ < a; ++_) {
|
|
1278
|
-
var k = i[_],
|
|
1279
|
-
ke(g, k) !==
|
|
1278
|
+
var k = i[_], S = e[k];
|
|
1279
|
+
ke(g, k) !== S && (ge(g, k, S), w = !0);
|
|
1280
1280
|
}
|
|
1281
1281
|
return w;
|
|
1282
1282
|
});
|
|
1283
1283
|
function u(g, k) {
|
|
1284
1284
|
var _ = k.failures, k = k.numFailures;
|
|
1285
1285
|
y += g - k;
|
|
1286
|
-
for (var
|
|
1287
|
-
var j = S
|
|
1286
|
+
for (var S = 0, x = M(_); S < x.length; S++) {
|
|
1287
|
+
var j = x[S];
|
|
1288
1288
|
p.push(_[j]);
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
@@ -1292,16 +1292,16 @@ var zr = { exports: {} };
|
|
|
1292
1292
|
return t.clone().primaryKeys().then(function(g) {
|
|
1293
1293
|
function w(_) {
|
|
1294
1294
|
var k = Math.min(f, g.length - _);
|
|
1295
|
-
return d.getMany({ trans: r, keys: g.slice(_, _ + k), cache: "immutable" }).then(function(
|
|
1296
|
-
for (var
|
|
1297
|
-
var R =
|
|
1298
|
-
s.call(F, F.value, F) !== !1 && (F.value == null ? A.push(g[_ + E]) : m || U(c(R), c(F.value)) === 0 ? (j.push(F.value), m && O.push(g[_ + E])) : (A.push(g[_ + E]),
|
|
1295
|
+
return d.getMany({ trans: r, keys: g.slice(_, _ + k), cache: "immutable" }).then(function(S) {
|
|
1296
|
+
for (var x = [], j = [], O = m ? [] : null, A = [], E = 0; E < k; ++E) {
|
|
1297
|
+
var R = S[E], F = { value: De(R), primKey: g[_ + E] };
|
|
1298
|
+
s.call(F, F.value, F) !== !1 && (F.value == null ? A.push(g[_ + E]) : m || U(c(R), c(F.value)) === 0 ? (j.push(F.value), m && O.push(g[_ + E])) : (A.push(g[_ + E]), x.push(F.value)));
|
|
1299
1299
|
}
|
|
1300
1300
|
var V = nt(n) && n.limit === 1 / 0 && (typeof e != "function" || e === _n) && { index: n.index, range: n.range };
|
|
1301
|
-
return Promise.resolve(0 <
|
|
1301
|
+
return Promise.resolve(0 < x.length && d.mutate({ trans: r, type: "add", values: x }).then(function(z) {
|
|
1302
1302
|
for (var Y in z.failures)
|
|
1303
1303
|
A.splice(parseInt(Y), 1);
|
|
1304
|
-
u(
|
|
1304
|
+
u(x.length, z);
|
|
1305
1305
|
})).then(function() {
|
|
1306
1306
|
return (0 < j.length || V && typeof e == "object") && d.mutate({ trans: r, type: "put", keys: O, values: j, criteria: V, changeSpec: typeof e != "function" && e }).then(function(z) {
|
|
1307
1307
|
return u(j.length, z);
|
|
@@ -1350,7 +1350,7 @@ var zr = { exports: {} };
|
|
|
1350
1350
|
return t < e ? -1 : e === t ? 0 : 1;
|
|
1351
1351
|
}
|
|
1352
1352
|
function he(e, t, n) {
|
|
1353
|
-
return e = e instanceof
|
|
1353
|
+
return e = e instanceof Sr ? new e.Collection(e) : e, e._ctx.error = new (n || TypeError)(t), e;
|
|
1354
1354
|
}
|
|
1355
1355
|
function rt(e) {
|
|
1356
1356
|
return new e.Collection(e, function() {
|
|
@@ -1397,8 +1397,8 @@ var zr = { exports: {} };
|
|
|
1397
1397
|
var _ = a(w);
|
|
1398
1398
|
if (t(_, d, p))
|
|
1399
1399
|
return !0;
|
|
1400
|
-
for (var k = null,
|
|
1401
|
-
var
|
|
1400
|
+
for (var k = null, S = p; S < c; ++S) {
|
|
1401
|
+
var x = function(j, O, A, E, R, F) {
|
|
1402
1402
|
for (var V = Math.min(j.length, E.length), z = -1, Y = 0; Y < V; ++Y) {
|
|
1403
1403
|
var pe = O[Y];
|
|
1404
1404
|
if (pe !== E[Y])
|
|
@@ -1406,8 +1406,8 @@ var zr = { exports: {} };
|
|
|
1406
1406
|
R(j[Y], pe) < 0 && (z = Y);
|
|
1407
1407
|
}
|
|
1408
1408
|
return V < E.length && F === "next" ? j + A.substr(j.length) : V < j.length && F === "prev" ? j.substr(0, A.length) : z < 0 ? null : j.substr(0, z) + E[z] + A.substr(z + 1);
|
|
1409
|
-
}(w, _, u[
|
|
1410
|
-
|
|
1409
|
+
}(w, _, u[S], d[S], s, l);
|
|
1410
|
+
x === null && k === null ? p = S + 1 : (k === null || 0 < s(k, x)) && (k = x);
|
|
1411
1411
|
}
|
|
1412
1412
|
return b(k !== null ? function() {
|
|
1413
1413
|
y.continue(k + m);
|
|
@@ -1420,7 +1420,7 @@ var zr = { exports: {} };
|
|
|
1420
1420
|
function kr(e) {
|
|
1421
1421
|
return { type: 1, lower: e, upper: e };
|
|
1422
1422
|
}
|
|
1423
|
-
var
|
|
1423
|
+
var Sr = (Object.defineProperty(ie.prototype, "Collection", { get: function() {
|
|
1424
1424
|
return this._ctx.table.db.Collection;
|
|
1425
1425
|
}, enumerable: !1, configurable: !0 }), ie.prototype.between = function(e, t, n, r) {
|
|
1426
1426
|
n = n !== !1, r = r === !0;
|
|
@@ -1429,26 +1429,26 @@ var zr = { exports: {} };
|
|
|
1429
1429
|
return Be(e, t, !n, !r);
|
|
1430
1430
|
});
|
|
1431
1431
|
} catch {
|
|
1432
|
-
return he(this,
|
|
1432
|
+
return he(this, xe);
|
|
1433
1433
|
}
|
|
1434
1434
|
}, ie.prototype.equals = function(e) {
|
|
1435
|
-
return e == null ? he(this,
|
|
1435
|
+
return e == null ? he(this, xe) : new this.Collection(this, function() {
|
|
1436
1436
|
return kr(e);
|
|
1437
1437
|
});
|
|
1438
1438
|
}, ie.prototype.above = function(e) {
|
|
1439
|
-
return e == null ? he(this,
|
|
1439
|
+
return e == null ? he(this, xe) : new this.Collection(this, function() {
|
|
1440
1440
|
return Be(e, void 0, !0);
|
|
1441
1441
|
});
|
|
1442
1442
|
}, ie.prototype.aboveOrEqual = function(e) {
|
|
1443
|
-
return e == null ? he(this,
|
|
1443
|
+
return e == null ? he(this, xe) : new this.Collection(this, function() {
|
|
1444
1444
|
return Be(e, void 0, !1);
|
|
1445
1445
|
});
|
|
1446
1446
|
}, ie.prototype.below = function(e) {
|
|
1447
|
-
return e == null ? he(this,
|
|
1447
|
+
return e == null ? he(this, xe) : new this.Collection(this, function() {
|
|
1448
1448
|
return Be(void 0, e, !1, !0);
|
|
1449
1449
|
});
|
|
1450
1450
|
}, ie.prototype.belowOrEqual = function(e) {
|
|
1451
|
-
return e == null ? he(this,
|
|
1451
|
+
return e == null ? he(this, xe) : new this.Collection(this, function() {
|
|
1452
1452
|
return Be(void 0, e);
|
|
1453
1453
|
});
|
|
1454
1454
|
}, ie.prototype.startsWith = function(e) {
|
|
@@ -1462,23 +1462,23 @@ var zr = { exports: {} };
|
|
|
1462
1462
|
return t === n[0];
|
|
1463
1463
|
}, [e], "");
|
|
1464
1464
|
}, ie.prototype.anyOfIgnoreCase = function() {
|
|
1465
|
-
var e =
|
|
1465
|
+
var e = Se.apply(Qe, arguments);
|
|
1466
1466
|
return e.length === 0 ? rt(this) : zt(this, function(t, n) {
|
|
1467
1467
|
return n.indexOf(t) !== -1;
|
|
1468
1468
|
}, e, "");
|
|
1469
1469
|
}, ie.prototype.startsWithAnyOfIgnoreCase = function() {
|
|
1470
|
-
var e =
|
|
1470
|
+
var e = Se.apply(Qe, arguments);
|
|
1471
1471
|
return e.length === 0 ? rt(this) : zt(this, function(t, n) {
|
|
1472
1472
|
return n.some(function(r) {
|
|
1473
1473
|
return t.indexOf(r) === 0;
|
|
1474
1474
|
});
|
|
1475
1475
|
}, e, We);
|
|
1476
1476
|
}, ie.prototype.anyOf = function() {
|
|
1477
|
-
var e = this, t =
|
|
1477
|
+
var e = this, t = Se.apply(Qe, arguments), n = this._cmp;
|
|
1478
1478
|
try {
|
|
1479
1479
|
t.sort(n);
|
|
1480
1480
|
} catch {
|
|
1481
|
-
return he(this,
|
|
1481
|
+
return he(this, xe);
|
|
1482
1482
|
}
|
|
1483
1483
|
if (t.length === 0)
|
|
1484
1484
|
return rt(this);
|
|
@@ -1500,13 +1500,13 @@ var zr = { exports: {} };
|
|
|
1500
1500
|
}, ie.prototype.notEqual = function(e) {
|
|
1501
1501
|
return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
|
|
1502
1502
|
}, ie.prototype.noneOf = function() {
|
|
1503
|
-
var e =
|
|
1503
|
+
var e = Se.apply(Qe, arguments);
|
|
1504
1504
|
if (e.length === 0)
|
|
1505
1505
|
return new this.Collection(this);
|
|
1506
1506
|
try {
|
|
1507
1507
|
e.sort(this._ascending);
|
|
1508
1508
|
} catch {
|
|
1509
|
-
return he(this,
|
|
1509
|
+
return he(this, xe);
|
|
1510
1510
|
}
|
|
1511
1511
|
var t = e.reduce(function(n, r) {
|
|
1512
1512
|
return n ? n.concat([[n[n.length - 1][1], r]]) : [[-1 / 0, r]];
|
|
@@ -1526,17 +1526,17 @@ var zr = { exports: {} };
|
|
|
1526
1526
|
}
|
|
1527
1527
|
try {
|
|
1528
1528
|
(m = w.reduce(function(_, k) {
|
|
1529
|
-
for (var
|
|
1530
|
-
var j = _[
|
|
1529
|
+
for (var S = 0, x = _.length; S < x; ++S) {
|
|
1530
|
+
var j = _[S];
|
|
1531
1531
|
if (r(k[0], j[1]) < 0 && 0 < r(k[1], j[0])) {
|
|
1532
1532
|
j[0] = s(j[0], k[0]), j[1] = u(j[1], k[1]);
|
|
1533
1533
|
break;
|
|
1534
1534
|
}
|
|
1535
1535
|
}
|
|
1536
|
-
return
|
|
1536
|
+
return S === x && _.push(k), _;
|
|
1537
1537
|
}, [])).sort(f);
|
|
1538
1538
|
} catch {
|
|
1539
|
-
return he(this,
|
|
1539
|
+
return he(this, xe);
|
|
1540
1540
|
}
|
|
1541
1541
|
var p = 0, y = l ? function(_) {
|
|
1542
1542
|
return 0 < i(_, m[p][1]);
|
|
@@ -1551,16 +1551,16 @@ var zr = { exports: {} };
|
|
|
1551
1551
|
});
|
|
1552
1552
|
return w._ondirectionchange = function(_) {
|
|
1553
1553
|
c = _ === "next" ? (g = y, i) : (g = b, a), m.sort(f);
|
|
1554
|
-
}, w._addAlgorithm(function(_, k,
|
|
1555
|
-
for (var
|
|
1554
|
+
}, w._addAlgorithm(function(_, k, S) {
|
|
1555
|
+
for (var x, j = _.key; g(j); )
|
|
1556
1556
|
if (++p === m.length)
|
|
1557
|
-
return k(
|
|
1558
|
-
return !y(
|
|
1557
|
+
return k(S), !1;
|
|
1558
|
+
return !y(x = j) && !b(x) || (n._cmp(j, m[p][1]) === 0 || n._cmp(j, m[p][0]) === 0 || k(function() {
|
|
1559
1559
|
c === i ? _.continue(m[p][0]) : _.continue(m[p][1]);
|
|
1560
1560
|
}), !1);
|
|
1561
1561
|
}), w;
|
|
1562
1562
|
}, ie.prototype.startsWithAnyOf = function() {
|
|
1563
|
-
var e =
|
|
1563
|
+
var e = Se.apply(Qe, arguments);
|
|
1564
1564
|
return e.every(function(t) {
|
|
1565
1565
|
return typeof t == "string";
|
|
1566
1566
|
}) ? e.length === 0 ? rt(this) : this.inAnyRange(e.map(function(t) {
|
|
@@ -1676,13 +1676,13 @@ var zr = { exports: {} };
|
|
|
1676
1676
|
}, we);
|
|
1677
1677
|
function we() {
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1680
|
-
return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: a, src: (n && !s ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") +
|
|
1679
|
+
function Sn(e, t, n, r, i, a, s) {
|
|
1680
|
+
return { name: e, keyPath: t, unique: n, multi: r, auto: i, compound: a, src: (n && !s ? "&" : "") + (r ? "*" : "") + (i ? "++" : "") + xr(t) };
|
|
1681
1681
|
}
|
|
1682
|
-
function
|
|
1682
|
+
function xr(e) {
|
|
1683
1683
|
return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1685
|
+
function xn(e, t, n) {
|
|
1686
1686
|
return { name: e, primKey: t, indexes: n, mappedClass: null, idxByName: (r = function(i) {
|
|
1687
1687
|
return [i.name, i];
|
|
1688
1688
|
}, n.reduce(function(i, a, s) {
|
|
@@ -1731,9 +1731,9 @@ var zr = { 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, w = b.type, _ = b.keys, k = b.values,
|
|
1735
|
-
return new Promise(function(
|
|
1736
|
-
|
|
1734
|
+
var g = b.trans, w = b.type, _ = b.keys, k = b.values, S = b.range;
|
|
1735
|
+
return new Promise(function(x, j) {
|
|
1736
|
+
x = Z(x);
|
|
1737
1737
|
var O = g.objectStore(y), A = O.keyPath == null, E = w === "put" || w === "add";
|
|
1738
1738
|
if (!E && w !== "delete" && w !== "deleteRange")
|
|
1739
1739
|
throw new Error("Invalid operation type: " + w);
|
|
@@ -1741,15 +1741,15 @@ var zr = { exports: {} };
|
|
|
1741
1741
|
if (_ && k && _.length !== k.length)
|
|
1742
1742
|
throw new Error("Given keys array must have same length as given values array.");
|
|
1743
1743
|
if (F === 0)
|
|
1744
|
-
return
|
|
1744
|
+
return x({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
|
|
1745
1745
|
function V(ce) {
|
|
1746
1746
|
++pe, mt(ce);
|
|
1747
1747
|
}
|
|
1748
1748
|
var z = [], Y = [], pe = 0;
|
|
1749
1749
|
if (w === "deleteRange") {
|
|
1750
|
-
if (
|
|
1751
|
-
return
|
|
1752
|
-
|
|
1750
|
+
if (S.type === 4)
|
|
1751
|
+
return x({ numFailures: pe, failures: Y, results: [], lastResult: void 0 });
|
|
1752
|
+
S.type === 3 ? z.push(R = O.clear()) : z.push(R = O.delete(r(S)));
|
|
1753
1753
|
} else {
|
|
1754
1754
|
var A = E ? A ? [k, _] : [k, null] : [_, null], $ = A[0], Ee = A[1];
|
|
1755
1755
|
if (E)
|
|
@@ -1762,7 +1762,7 @@ var zr = { exports: {} };
|
|
|
1762
1762
|
function en(ce) {
|
|
1763
1763
|
ce = ce.target.result, z.forEach(function(Ye, Un) {
|
|
1764
1764
|
return Ye.error != null && (Y[Un] = Ye.error);
|
|
1765
|
-
}),
|
|
1765
|
+
}), x({ numFailures: pe, failures: Y, results: w === "delete" ? _ : z.map(function(Ye) {
|
|
1766
1766
|
return Ye.result;
|
|
1767
1767
|
}), lastResult: ce });
|
|
1768
1768
|
}
|
|
@@ -1774,39 +1774,39 @@ var zr = { exports: {} };
|
|
|
1774
1774
|
var g = b.trans, w = b.keys;
|
|
1775
1775
|
return new Promise(function(_, k) {
|
|
1776
1776
|
_ = Z(_);
|
|
1777
|
-
for (var
|
|
1777
|
+
for (var S, x = g.objectStore(y), j = w.length, O = new Array(j), A = 0, E = 0, R = function(z) {
|
|
1778
1778
|
z = z.target, O[z._pos] = z.result, ++E === A && _(O);
|
|
1779
1779
|
}, F = ve(k), V = 0; V < j; ++V)
|
|
1780
|
-
w[V] != null && ((
|
|
1780
|
+
w[V] != null && ((S = x.get(w[V]))._pos = V, S.onsuccess = R, S.onerror = F, ++A);
|
|
1781
1781
|
A === 0 && _(O);
|
|
1782
1782
|
});
|
|
1783
1783
|
}, get: function(b) {
|
|
1784
1784
|
var g = b.trans, w = b.key;
|
|
1785
1785
|
return new Promise(function(_, k) {
|
|
1786
1786
|
_ = Z(_);
|
|
1787
|
-
var
|
|
1788
|
-
|
|
1789
|
-
return _(
|
|
1790
|
-
},
|
|
1787
|
+
var S = g.objectStore(y).get(w);
|
|
1788
|
+
S.onsuccess = function(x) {
|
|
1789
|
+
return _(x.target.result);
|
|
1790
|
+
}, S.onerror = ve(k);
|
|
1791
1791
|
});
|
|
1792
1792
|
}, query: (p = l, function(b) {
|
|
1793
1793
|
return new Promise(function(g, w) {
|
|
1794
1794
|
g = Z(g);
|
|
1795
|
-
var _, k,
|
|
1795
|
+
var _, k, S, A = b.trans, x = b.values, j = b.limit, R = b.query, O = j === 1 / 0 ? void 0 : j, E = R.index, R = R.range, A = A.objectStore(y), E = E.isPrimaryKey ? A : A.index(E.name), R = r(R);
|
|
1796
1796
|
if (j === 0)
|
|
1797
1797
|
return g({ result: [] });
|
|
1798
|
-
p ? ((O =
|
|
1798
|
+
p ? ((O = x ? E.getAll(R, O) : E.getAllKeys(R, O)).onsuccess = function(F) {
|
|
1799
1799
|
return g({ result: F.target.result });
|
|
1800
|
-
}, O.onerror = ve(w)) : (_ = 0, k = !
|
|
1800
|
+
}, O.onerror = ve(w)) : (_ = 0, k = !x && "openKeyCursor" in E ? E.openKeyCursor(R) : E.openCursor(R), S = [], k.onsuccess = function(F) {
|
|
1801
1801
|
var V = k.result;
|
|
1802
|
-
return V ? (
|
|
1802
|
+
return V ? (S.push(x ? V.value : V.primaryKey), ++_ === j ? g({ result: S }) : void V.continue()) : g({ result: S });
|
|
1803
1803
|
}, k.onerror = ve(w));
|
|
1804
1804
|
});
|
|
1805
1805
|
}), openCursor: function(b) {
|
|
1806
|
-
var g = b.trans, w = b.values, _ = b.query, k = b.reverse,
|
|
1807
|
-
return new Promise(function(
|
|
1808
|
-
|
|
1809
|
-
var E = _.index, O = _.range, A = g.objectStore(y), A = E.isPrimaryKey ? A : A.index(E.name), E = k ?
|
|
1806
|
+
var g = b.trans, w = b.values, _ = b.query, k = b.reverse, S = b.unique;
|
|
1807
|
+
return new Promise(function(x, j) {
|
|
1808
|
+
x = Z(x);
|
|
1809
|
+
var E = _.index, O = _.range, A = g.objectStore(y), A = E.isPrimaryKey ? A : A.index(E.name), E = k ? S ? "prevunique" : "prev" : S ? "nextunique" : "next", R = !w && "openKeyCursor" in A ? A.openKeyCursor(r(O), E) : A.openCursor(r(O), E);
|
|
1810
1810
|
R.onerror = ve(j), R.onsuccess = Z(function(F) {
|
|
1811
1811
|
var V, z, Y, pe, $ = R.result;
|
|
1812
1812
|
$ ? ($.___id = ++_i, $.done = !1, V = $.continue.bind($), z = (z = $.continuePrimaryKey) && z.bind($), Y = $.advance.bind($), pe = function() {
|
|
@@ -1841,16 +1841,16 @@ var zr = { exports: {} };
|
|
|
1841
1841
|
return R.onsuccess = Z(function(ce) {
|
|
1842
1842
|
R.onsuccess = ue, ue();
|
|
1843
1843
|
}), $.continue = V, $.continuePrimaryKey = z, $.advance = Y, ue(), en;
|
|
1844
|
-
},
|
|
1844
|
+
}, x($)) : x(null);
|
|
1845
1845
|
}, j);
|
|
1846
1846
|
});
|
|
1847
1847
|
}, count: function(b) {
|
|
1848
1848
|
var g = b.query, w = b.trans, _ = g.index, k = g.range;
|
|
1849
|
-
return new Promise(function(
|
|
1849
|
+
return new Promise(function(S, x) {
|
|
1850
1850
|
var j = w.objectStore(y), O = _.isPrimaryKey ? j : j.index(_.name), j = r(k), O = j ? O.count(j) : O.count();
|
|
1851
1851
|
O.onsuccess = Z(function(A) {
|
|
1852
|
-
return
|
|
1853
|
-
}), O.onerror = ve(
|
|
1852
|
+
return S(A.target.result);
|
|
1853
|
+
}), O.onerror = ve(x);
|
|
1854
1854
|
});
|
|
1855
1855
|
} };
|
|
1856
1856
|
}
|
|
@@ -1859,9 +1859,9 @@ var zr = { exports: {} };
|
|
|
1859
1859
|
}).map(function(f) {
|
|
1860
1860
|
var p = f.keyPath, g = f.autoIncrement, y = I(p), b = {}, g = { name: f.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: y, keyPath: p, autoIncrement: g, unique: !0, extractKey: On(p) }, indexes: Or(f.indexNames).map(function(w) {
|
|
1861
1861
|
return f.index(w);
|
|
1862
|
-
}).map(function(
|
|
1863
|
-
var _ =
|
|
1864
|
-
return b[wt(
|
|
1862
|
+
}).map(function(S) {
|
|
1863
|
+
var _ = S.name, k = S.unique, x = S.multiEntry, S = S.keyPath, x = { name: _, compound: I(S), keyPath: S, unique: k, multiEntry: x, extractKey: On(S) };
|
|
1864
|
+
return b[wt(S)] = x;
|
|
1865
1865
|
}), getIndexByKeyPath: function(w) {
|
|
1866
1866
|
return b[wt(w)];
|
|
1867
1867
|
} };
|
|
@@ -1875,14 +1875,14 @@ var zr = { exports: {} };
|
|
|
1875
1875
|
return c[f];
|
|
1876
1876
|
}, MIN_KEY: -1 / 0, MAX_KEY: vt(t), schema: d };
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function Si(e, t, n, r) {
|
|
1879
1879
|
var i = n.IDBKeyRange;
|
|
1880
1880
|
return n.indexedDB, { dbcore: (r = ki(t, i, r), e.dbcore.reduce(function(a, s) {
|
|
1881
1881
|
return s = s.create, v(v({}, a), s(a));
|
|
1882
1882
|
}, r)) };
|
|
1883
1883
|
}
|
|
1884
1884
|
function Lt(e, r) {
|
|
1885
|
-
var n = r.db, r =
|
|
1885
|
+
var n = r.db, r = Si(e._middlewares, n, e._deps, r);
|
|
1886
1886
|
e.core = r.dbcore, e.tables.forEach(function(i) {
|
|
1887
1887
|
var a = i.name;
|
|
1888
1888
|
e.core.schema.tables.some(function(s) {
|
|
@@ -1911,12 +1911,12 @@ var zr = { exports: {} };
|
|
|
1911
1911
|
n[r] instanceof e.Table && delete n[r];
|
|
1912
1912
|
});
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function xi(e, t) {
|
|
1915
1915
|
return e._cfg.version - t._cfg.version;
|
|
1916
1916
|
}
|
|
1917
1917
|
function Oi(e, t, n, r) {
|
|
1918
1918
|
var i = e._dbSchema;
|
|
1919
|
-
n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta =
|
|
1919
|
+
n.objectStoreNames.contains("$meta") && !i.$meta && (i.$meta = xn("$meta", Cr("")[0], []), e._storeNames.push("$meta"));
|
|
1920
1920
|
var a = e._createTransaction("readwrite", e._storeNames, i);
|
|
1921
1921
|
a.create(n), a._completion.catch(r);
|
|
1922
1922
|
var s = a._reject.bind(a), u = B.transless || B;
|
|
@@ -1930,10 +1930,10 @@ var zr = { exports: {} };
|
|
|
1930
1930
|
b.push(function() {
|
|
1931
1931
|
var _ = g, k = w._cfg.dbschema;
|
|
1932
1932
|
Gt(c, _, y), Gt(c, k, y), g = c._dbSchema = k;
|
|
1933
|
-
var
|
|
1934
|
-
|
|
1933
|
+
var S = Cn(_, k);
|
|
1934
|
+
S.add.forEach(function(E) {
|
|
1935
1935
|
Pn(y, E[0], E[1].primKey, E[1].indexes);
|
|
1936
|
-
}),
|
|
1936
|
+
}), S.change.forEach(function(E) {
|
|
1937
1937
|
if (E.recreate)
|
|
1938
1938
|
throw new N.Upgrade("Not yet support for changing primary key");
|
|
1939
1939
|
var R = y.objectStore(E.name);
|
|
@@ -1945,25 +1945,25 @@ var zr = { exports: {} };
|
|
|
1945
1945
|
return R.deleteIndex(F);
|
|
1946
1946
|
});
|
|
1947
1947
|
});
|
|
1948
|
-
var
|
|
1949
|
-
if (
|
|
1948
|
+
var x = w._cfg.contentUpgrade;
|
|
1949
|
+
if (x && w._cfg.version > f) {
|
|
1950
1950
|
Lt(c, y), p._memoizedTables = {};
|
|
1951
1951
|
var j = rr(k);
|
|
1952
|
-
|
|
1952
|
+
S.del.forEach(function(E) {
|
|
1953
1953
|
j[E] = _[E];
|
|
1954
1954
|
}), En(c, [c.Transaction.prototype]), Wt(c, [c.Transaction.prototype], M(j), j), p.schema = j;
|
|
1955
|
-
var O, A = an(
|
|
1956
|
-
return A && et(),
|
|
1955
|
+
var O, A = an(x);
|
|
1956
|
+
return A && et(), S = K.follow(function() {
|
|
1957
1957
|
var E;
|
|
1958
|
-
(O =
|
|
1959
|
-
}), O && typeof O.then == "function" ? K.resolve(O) :
|
|
1958
|
+
(O = x(p)) && A && (E = Te.bind(null, null), O.then(E, E));
|
|
1959
|
+
}), O && typeof O.then == "function" ? K.resolve(O) : S.then(function() {
|
|
1960
1960
|
return O;
|
|
1961
1961
|
});
|
|
1962
1962
|
}
|
|
1963
1963
|
}), b.push(function(_) {
|
|
1964
|
-
var k,
|
|
1965
|
-
k =
|
|
1966
|
-
return k[j] == null &&
|
|
1964
|
+
var k, S, x = w._cfg.dbschema;
|
|
1965
|
+
k = x, S = _, [].slice.call(S.db.objectStoreNames).forEach(function(j) {
|
|
1966
|
+
return k[j] == null && S.db.deleteObjectStore(j);
|
|
1967
1967
|
}), En(c, [c.Transaction.prototype]), Wt(c, [c.Transaction.prototype], c._storeNames, c._dbSchema), p.schema = c._dbSchema;
|
|
1968
1968
|
}), b.push(function(_) {
|
|
1969
1969
|
c.idbdb.objectStoreNames.contains("$meta") && (Math.ceil(c.idbdb.version / 10) === w._cfg.version ? (c.idbdb.deleteObjectStore("$meta"), delete c._dbSchema.$meta, c._storeNames = c._storeNames.filter(function(k) {
|
|
@@ -2043,11 +2043,11 @@ var zr = { exports: {} };
|
|
|
2043
2043
|
function Vt(e, t, n) {
|
|
2044
2044
|
var r = {};
|
|
2045
2045
|
return Et(t.objectStoreNames, 0).forEach(function(i) {
|
|
2046
|
-
for (var a = n.objectStore(i), s =
|
|
2047
|
-
var m = a.index(a.indexNames[d]), l = m.keyPath, m =
|
|
2046
|
+
for (var a = n.objectStore(i), s = Sn(xr(l = a.keyPath), l || "", !0, !1, !!a.autoIncrement, l && typeof l != "string", !0), u = [], d = 0; d < a.indexNames.length; ++d) {
|
|
2047
|
+
var m = a.index(a.indexNames[d]), l = m.keyPath, m = Sn(m.name, l, !!m.unique, !!m.multiEntry, !1, l && typeof l != "string", !1);
|
|
2048
2048
|
u.push(m);
|
|
2049
2049
|
}
|
|
2050
|
-
r[i] =
|
|
2050
|
+
r[i] = xn(i, s, u);
|
|
2051
2051
|
}), r;
|
|
2052
2052
|
}
|
|
2053
2053
|
function Gt(e, t, n) {
|
|
@@ -2064,7 +2064,7 @@ var zr = { exports: {} };
|
|
|
2064
2064
|
function Cr(e) {
|
|
2065
2065
|
return e.split(",").map(function(t, n) {
|
|
2066
2066
|
var r = (t = t.trim()).replace(/([&*]|\+\+)/g, ""), i = /^\[/.test(r) ? r.match(/^\[(.*)\]$/)[1].split("+") : r;
|
|
2067
|
-
return
|
|
2067
|
+
return Sn(r, i || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), I(i), n === 0);
|
|
2068
2068
|
});
|
|
2069
2069
|
}
|
|
2070
2070
|
var Ci = (Yt.prototype._parseStoresSpec = function(e, t) {
|
|
@@ -2078,7 +2078,7 @@ var zr = { exports: {} };
|
|
|
2078
2078
|
throw new N.Schema("Only primary key can be marked as autoIncrement (++)");
|
|
2079
2079
|
if (!a.keyPath)
|
|
2080
2080
|
throw new N.Schema("Index must have a name and cannot be an empty string");
|
|
2081
|
-
}), t[n] =
|
|
2081
|
+
}), t[n] = xn(n, i, r);
|
|
2082
2082
|
}
|
|
2083
2083
|
});
|
|
2084
2084
|
}, Yt.prototype.stores = function(n) {
|
|
@@ -2271,24 +2271,24 @@ var zr = { exports: {} };
|
|
|
2271
2271
|
})) : (m.onerror = ve(p), g = g.oldVersion > Math.pow(2, 62) ? 0 : g.oldVersion, c = g < 1, e.idbdb = b.result, a && Ei(e, m), Oi(e, g / 10, m, p));
|
|
2272
2272
|
}, p), b.onsuccess = Z(function() {
|
|
2273
2273
|
m = null;
|
|
2274
|
-
var g, w, _, k,
|
|
2274
|
+
var g, w, _, k, S, x = e.idbdb = b.result, j = Et(x.objectStoreNames);
|
|
2275
2275
|
if (0 < j.length)
|
|
2276
2276
|
try {
|
|
2277
|
-
var O =
|
|
2277
|
+
var O = x.transaction((k = j).length === 1 ? k[0] : k, "readonly");
|
|
2278
2278
|
if (t.autoSchema)
|
|
2279
|
-
w =
|
|
2280
|
-
else if (Gt(e, e._dbSchema, O), ((
|
|
2279
|
+
w = x, _ = O, (g = e).verno = w.version / 10, _ = g._dbSchema = Vt(0, w, _), g._storeNames = Et(w.objectStoreNames, 0), Wt(g, [g._allTables], M(_), _);
|
|
2280
|
+
else if (Gt(e, e._dbSchema, O), ((S = Cn(Vt(0, (S = e).idbdb, O), S._dbSchema)).add.length || S.change.some(function(A) {
|
|
2281
2281
|
return A.add.length || A.change.length;
|
|
2282
2282
|
})) && !a)
|
|
2283
|
-
return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),
|
|
2283
|
+
return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), x.close(), i = x.version + 1, a = !0, f(u());
|
|
2284
2284
|
Lt(e, O);
|
|
2285
2285
|
} catch {
|
|
2286
2286
|
}
|
|
2287
|
-
tt.push(e),
|
|
2287
|
+
tt.push(e), x.onversionchange = Z(function(A) {
|
|
2288
2288
|
t.vcFired = !0, e.on("versionchange").fire(A);
|
|
2289
|
-
}),
|
|
2289
|
+
}), x.onclose = Z(function(A) {
|
|
2290
2290
|
e.on("close").fire(A);
|
|
2291
|
-
}), c && (
|
|
2291
|
+
}), c && (S = e._deps, O = y, x = S.indexedDB, S = S.IDBKeyRange, Dn(x) || O === Rt || jn(x, S).put({ name: O }).catch(G)), f();
|
|
2292
2292
|
}, p);
|
|
2293
2293
|
}).catch(function(f) {
|
|
2294
2294
|
switch (f == null ? void 0 : f.name) {
|
|
@@ -2463,21 +2463,21 @@ var zr = { exports: {} };
|
|
|
2463
2463
|
if (!g)
|
|
2464
2464
|
throw new Error("Keys missing");
|
|
2465
2465
|
return (c = c.type === "add" || c.type === "put" ? v(v({}, c), { keys: g }) : v({}, c)).type !== "delete" && (c.values = D([], c.values, !0)), c.keys && (c.keys = D([], c.keys, !0)), f = n, y = g, ((p = c).type === "add" ? Promise.resolve([]) : f.getMany({ trans: p.trans, keys: y, cache: "immutable" })).then(function(w) {
|
|
2466
|
-
var _ = g.map(function(k,
|
|
2467
|
-
var
|
|
2468
|
-
return c.type === "delete" ? u.fire.call(E, k, A, b) : c.type === "add" || A === void 0 ? (
|
|
2466
|
+
var _ = g.map(function(k, S) {
|
|
2467
|
+
var x, j, O, A = w[S], E = { onerror: null, onsuccess: null };
|
|
2468
|
+
return c.type === "delete" ? u.fire.call(E, k, A, b) : c.type === "add" || A === void 0 ? (x = d.fire.call(E, k, c.values[S], b), k == null && x != null && (c.keys[S] = k = x, r.outbound || ge(c.values[S], r.keyPath, k))) : (x = Fn(A, c.values[S]), (j = l.fire.call(E, x, k, A, b)) && (O = c.values[S], Object.keys(j).forEach(function(R) {
|
|
2469
2469
|
ae(O, R) ? O[R] = j[R] : ge(O, R, j[R]);
|
|
2470
2470
|
}))), E;
|
|
2471
2471
|
});
|
|
2472
2472
|
return n.mutate(c).then(function(k) {
|
|
2473
|
-
for (var
|
|
2474
|
-
var A = (
|
|
2475
|
-
A == null ? E.onerror && E.onerror(
|
|
2473
|
+
for (var S = k.failures, x = k.results, j = k.numFailures, k = k.lastResult, O = 0; O < g.length; ++O) {
|
|
2474
|
+
var A = (x || g)[O], E = _[O];
|
|
2475
|
+
A == null ? E.onerror && E.onerror(S[O]) : E.onsuccess && E.onsuccess(c.type === "put" && w[O] ? c.values[O] : A);
|
|
2476
2476
|
}
|
|
2477
|
-
return { failures:
|
|
2477
|
+
return { failures: S, results: x, numFailures: j, lastResult: k };
|
|
2478
2478
|
}).catch(function(k) {
|
|
2479
|
-
return _.forEach(function(
|
|
2480
|
-
return
|
|
2479
|
+
return _.forEach(function(S) {
|
|
2480
|
+
return S.onerror && S.onerror(k);
|
|
2481
2481
|
}), Promise.reject(k);
|
|
2482
2482
|
});
|
|
2483
2483
|
});
|
|
@@ -2540,10 +2540,10 @@ var zr = { exports: {} };
|
|
|
2540
2540
|
function p(E) {
|
|
2541
2541
|
return E = "idb://".concat(t, "/").concat(r, "/").concat(E), _[E] || (_[E] = new se());
|
|
2542
2542
|
}
|
|
2543
|
-
var y, b, g, w = f.trans, _ = f.mutatedParts || (f.mutatedParts = {}), k = p(""),
|
|
2543
|
+
var y, b, g, w = f.trans, _ = f.mutatedParts || (f.mutatedParts = {}), k = p(""), S = p(":dels"), x = f.type, A = f.type === "deleteRange" ? [f.range] : f.type === "delete" ? [f.keys] : f.values.length < 50 ? [$n(u, f).filter(function(E) {
|
|
2544
2544
|
return E;
|
|
2545
2545
|
}), f.values] : [], j = A[0], O = A[1], A = f.trans._cache;
|
|
2546
|
-
return I(j) ? (k.addKeys(j), (A =
|
|
2546
|
+
return I(j) ? (k.addKeys(j), (A = x === "delete" || j.length === O.length ? Ar(j, A) : null) || S.addKeys(j), (A || O) && (y = p, b = A, g = O, s.indexes.forEach(function(E) {
|
|
2547
2547
|
var R = y(E.name || "");
|
|
2548
2548
|
function F(z) {
|
|
2549
2549
|
return z != null ? E.extractKey(z) : null;
|
|
@@ -2557,7 +2557,7 @@ var zr = { exports: {} };
|
|
|
2557
2557
|
var pe = b && F(b[$]), $ = g && F(g[$]);
|
|
2558
2558
|
U(pe, $) !== 0 && (pe != null && V(pe), $ != null && V($));
|
|
2559
2559
|
});
|
|
2560
|
-
}))) : j ? (O = { from: j.lower, to: j.upper },
|
|
2560
|
+
}))) : j ? (O = { from: j.lower, to: j.upper }, S.add(O), k.add(O)) : (k.add(n), S.add(n), s.indexes.forEach(function(E) {
|
|
2561
2561
|
return p(E.name).add(n);
|
|
2562
2562
|
})), a.mutate(f).then(function(E) {
|
|
2563
2563
|
return !j || f.type !== "add" && f.type !== "put" || k.addKeys(E.results), w.mutatedParts = Qt(w.mutatedParts || {}, _), E;
|
|
@@ -2576,11 +2576,11 @@ var zr = { exports: {} };
|
|
|
2576
2576
|
}, _ = w(""), k = w(":dels"), y = c[f](p), b = y[0], y = y[1];
|
|
2577
2577
|
if ((f === "query" && b.isPrimaryKey && !p.values ? k : w(b.name || "")).add(y), !b.isPrimaryKey) {
|
|
2578
2578
|
if (f !== "count") {
|
|
2579
|
-
var
|
|
2579
|
+
var S = f === "query" && l && p.values && a.query(v(v({}, p), { values: !1 }));
|
|
2580
2580
|
return a[f].apply(this, arguments).then(function(O) {
|
|
2581
2581
|
if (f === "query") {
|
|
2582
2582
|
if (l && p.values)
|
|
2583
|
-
return
|
|
2583
|
+
return S.then(function(F) {
|
|
2584
2584
|
return F = F.result, _.addKeys(F), O;
|
|
2585
2585
|
});
|
|
2586
2586
|
var A = p.values ? O.result.map(d) : O.result;
|
|
@@ -2627,38 +2627,38 @@ var zr = { exports: {} };
|
|
|
2627
2627
|
if (!f || f.length === 0)
|
|
2628
2628
|
return e;
|
|
2629
2629
|
var s = t.query.index, u = s.multiEntry, d = t.query.range, l = r.schema.primaryKey.extractKey, m = s.extractKey, c = (s.lowLevelIndex || s).extractKey, f = f.reduce(function(p, y) {
|
|
2630
|
-
var b = p, g = y.type === "add" || y.type === "put" ? y.values.filter(function(
|
|
2631
|
-
return
|
|
2632
|
-
return zn(
|
|
2633
|
-
}) : zn(
|
|
2634
|
-
}).map(function(
|
|
2635
|
-
return
|
|
2630
|
+
var b = p, g = y.type === "add" || y.type === "put" ? y.values.filter(function(S) {
|
|
2631
|
+
return S = m(S), u && I(S) ? S.some(function(x) {
|
|
2632
|
+
return zn(x, d);
|
|
2633
|
+
}) : zn(S, d);
|
|
2634
|
+
}).map(function(S) {
|
|
2635
|
+
return S = De(S), a && Object.freeze(S), S;
|
|
2636
2636
|
}) : [];
|
|
2637
2637
|
switch (y.type) {
|
|
2638
2638
|
case "add":
|
|
2639
|
-
b = p.concat(t.values ? g : g.map(function(
|
|
2640
|
-
return l(
|
|
2639
|
+
b = p.concat(t.values ? g : g.map(function(x) {
|
|
2640
|
+
return l(x);
|
|
2641
2641
|
}));
|
|
2642
2642
|
break;
|
|
2643
2643
|
case "put":
|
|
2644
|
-
var w = new se().addKeys(y.values.map(function(
|
|
2645
|
-
return l(
|
|
2646
|
-
})), b = p.filter(function(
|
|
2647
|
-
return
|
|
2648
|
-
}).concat(t.values ? g : g.map(function(
|
|
2649
|
-
return l(
|
|
2644
|
+
var w = new se().addKeys(y.values.map(function(x) {
|
|
2645
|
+
return l(x);
|
|
2646
|
+
})), b = p.filter(function(x) {
|
|
2647
|
+
return x = t.values ? l(x) : x, !Ht(new se(x), w);
|
|
2648
|
+
}).concat(t.values ? g : g.map(function(x) {
|
|
2649
|
+
return l(x);
|
|
2650
2650
|
}));
|
|
2651
2651
|
break;
|
|
2652
2652
|
case "delete":
|
|
2653
2653
|
var _ = new se().addKeys(y.keys);
|
|
2654
|
-
b = p.filter(function(
|
|
2655
|
-
return
|
|
2654
|
+
b = p.filter(function(x) {
|
|
2655
|
+
return x = t.values ? l(x) : x, !Ht(new se(x), _);
|
|
2656
2656
|
});
|
|
2657
2657
|
break;
|
|
2658
2658
|
case "deleteRange":
|
|
2659
2659
|
var k = y.range;
|
|
2660
|
-
b = p.filter(function(
|
|
2661
|
-
return !zn(l(
|
|
2660
|
+
b = p.filter(function(x) {
|
|
2661
|
+
return !zn(l(x), k);
|
|
2662
2662
|
});
|
|
2663
2663
|
}
|
|
2664
2664
|
return b;
|
|
@@ -2732,8 +2732,8 @@ var zr = { exports: {} };
|
|
|
2732
2732
|
p.optimisticOps = p.optimisticOps.filter(function(F) {
|
|
2733
2733
|
return F.trans !== u;
|
|
2734
2734
|
});
|
|
2735
|
-
for (var
|
|
2736
|
-
for (var j, O, A, E = 0, R = (j = S
|
|
2735
|
+
for (var S = 0, x = Object.values(p.queries.query); S < x.length; S++)
|
|
2736
|
+
for (var j, O, A, E = 0, R = (j = x[S]).slice(); E < R.length; E++)
|
|
2737
2737
|
(O = R[E]).res != null && u.mutatedParts && (d && !O.dirty ? (A = Object.isFrozen(O.res), A = Br(O.res, O.req, b, y, O, A), O.dirty ? (Ne(j, O), O.subscribers.forEach(function(F) {
|
|
2738
2738
|
return l.add(F);
|
|
2739
2739
|
})) : A !== O.res && (O.res = A, O.promise = K.resolve({ result: A }))) : (O.dirty && Ne(j, O), O.subscribers.forEach(function(F) {
|
|
@@ -2784,16 +2784,16 @@ var zr = { exports: {} };
|
|
|
2784
2784
|
return [null, !1, _, null];
|
|
2785
2785
|
switch (g) {
|
|
2786
2786
|
case "query":
|
|
2787
|
-
var
|
|
2788
|
-
return
|
|
2787
|
+
var S = k.find(function(x) {
|
|
2788
|
+
return x.req.limit === w.limit && x.req.values === w.values && Ir(x.req.query.range, w.query.range);
|
|
2789
2789
|
});
|
|
2790
|
-
return
|
|
2791
|
-
return ("limit" in
|
|
2790
|
+
return S ? [S, !0, _, k] : [k.find(function(x) {
|
|
2791
|
+
return ("limit" in x.req ? x.req.limit : 1 / 0) >= w.limit && (!w.values || x.req.values) && Ti(x.req.query.range, w.query.range);
|
|
2792
2792
|
}), !1, _, k];
|
|
2793
2793
|
case "count":
|
|
2794
|
-
return
|
|
2795
|
-
return Ir(
|
|
2796
|
-
}), [
|
|
2794
|
+
return S = k.find(function(x) {
|
|
2795
|
+
return Ir(x.req.query.range, w.query.range);
|
|
2796
|
+
}), [S, !!S, _, k];
|
|
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) {
|
|
@@ -2827,7 +2827,7 @@ var zr = { exports: {} };
|
|
|
2827
2827
|
var t = this._versions, n = t.filter(function(r) {
|
|
2828
2828
|
return r._cfg.version === e;
|
|
2829
2829
|
})[0];
|
|
2830
|
-
return n || (n = new this.Version(e), t.push(n), t.sort(
|
|
2830
|
+
return n || (n = new this.Version(e), t.push(n), t.sort(xi), n.stores({}), this._state.autoSchema = !1, n);
|
|
2831
2831
|
}, te.prototype._whenReady = function(e) {
|
|
2832
2832
|
var t = this;
|
|
2833
2833
|
return this.idbdb && (this._state.openComplete || B.letThrough || this._vip) ? e() : new K(function(n, r) {
|
|
@@ -3033,7 +3033,7 @@ var zr = { exports: {} };
|
|
|
3033
3033
|
});
|
|
3034
3034
|
})), this.Version = (u = this, yt(Ci.prototype, function(c) {
|
|
3035
3035
|
this.db = u, this._cfg = { version: c, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
|
|
3036
|
-
})), this.WhereClause = (d = this, yt(
|
|
3036
|
+
})), this.WhereClause = (d = this, yt(Sr.prototype, function(c, f, p) {
|
|
3037
3037
|
if (this.db = d, this._ctx = { table: c, index: f === ":id" ? null : f, or: p }, this._cmp = this._ascending = U, this._descending = function(y, b) {
|
|
3038
3038
|
return U(b, y);
|
|
3039
3039
|
}, this._max = function(y, b) {
|
|
@@ -3104,15 +3104,15 @@ var zr = { exports: {} };
|
|
|
3104
3104
|
var k = Ze();
|
|
3105
3105
|
try {
|
|
3106
3106
|
a && et();
|
|
3107
|
-
var
|
|
3108
|
-
return
|
|
3107
|
+
var S = Ke(e, _);
|
|
3108
|
+
return S = a ? S.finally(Te) : S;
|
|
3109
3109
|
} finally {
|
|
3110
3110
|
k && qe();
|
|
3111
3111
|
}
|
|
3112
3112
|
}(g = { subscr: b, signal: s.signal, requery: f, querier: e, trans: null }), Promise.resolve(w).then(function(_) {
|
|
3113
3113
|
n = !0, t = _, u || g.signal.aborted || (d = {}, function(k) {
|
|
3114
|
-
for (var
|
|
3115
|
-
if (ae(k,
|
|
3114
|
+
for (var S in k)
|
|
3115
|
+
if (ae(k, S))
|
|
3116
3116
|
return;
|
|
3117
3117
|
return 1;
|
|
3118
3118
|
}(l = b) || c || (Ie(bt, p), c = !0), yn(function() {
|
|
@@ -3244,7 +3244,7 @@ function ot(C) {
|
|
|
3244
3244
|
}
|
|
3245
3245
|
return C.topics === void 0 && (C.topics = `${C.dashboard}-${C.widget}`), C;
|
|
3246
3246
|
}
|
|
3247
|
-
function
|
|
3247
|
+
function xt(C, o) {
|
|
3248
3248
|
var I;
|
|
3249
3249
|
let h, v, D, T, M;
|
|
3250
3250
|
switch (C.moderation) {
|
|
@@ -3416,7 +3416,7 @@ class Lr {
|
|
|
3416
3416
|
*/
|
|
3417
3417
|
P(this, "subscribe", (o) => (o = ot(o), this.subscribers.filter(
|
|
3418
3418
|
(v) => v.widget === o.widget
|
|
3419
|
-
).length > 0 || (o.type === oe && (o =
|
|
3419
|
+
).length > 0 || (o.type === oe && (o = xt(this.options, o)), console.debug(
|
|
3420
3420
|
"%cstorage%c %csubscribe",
|
|
3421
3421
|
W,
|
|
3422
3422
|
H,
|
|
@@ -3535,7 +3535,7 @@ class Ur {
|
|
|
3535
3535
|
* @param query IQuery
|
|
3536
3536
|
* @returns null
|
|
3537
3537
|
*/
|
|
3538
|
-
P(this, "subscribe", (o) => (o = ot(o), o.type === oe && (o =
|
|
3538
|
+
P(this, "subscribe", (o) => (o = ot(o), o.type === oe && (o = xt(this.options, o)), this.subscribers.filter(
|
|
3539
3539
|
(v) => v.widget === o.widget
|
|
3540
3540
|
).length > 0 || (console.debug(
|
|
3541
3541
|
"%cstorage%c %csubscribe",
|
|
@@ -3639,7 +3639,7 @@ class Vr {
|
|
|
3639
3639
|
* @param query IQuery
|
|
3640
3640
|
* @returns null
|
|
3641
3641
|
*/
|
|
3642
|
-
P(this, "subscribe", (o) => (o = ot(o), o.type === oe && (o =
|
|
3642
|
+
P(this, "subscribe", (o) => (o = ot(o), o.type === oe && (o = xt(this.options, o)), this.subscribers.filter(
|
|
3643
3643
|
(v) => v.widget === o.widget
|
|
3644
3644
|
).length || (console.debug(
|
|
3645
3645
|
"%cstorage%c %csubscribe",
|
|
@@ -3748,7 +3748,7 @@ class Gr {
|
|
|
3748
3748
|
* @param query IQuery
|
|
3749
3749
|
* @returns null
|
|
3750
3750
|
*/
|
|
3751
|
-
P(this, "subscribe", (o) => (o = ot(o), o.type === oe && (o =
|
|
3751
|
+
P(this, "subscribe", (o) => (o = ot(o), o.type === oe && (o = xt(this.options, o)), this.subscribers.filter(
|
|
3752
3752
|
(v) => v.widget === o.widget
|
|
3753
3753
|
).length || (console.debug(
|
|
3754
3754
|
"%cstorage%c %csubscribe",
|
|
@@ -3857,7 +3857,7 @@ class Yr {
|
|
|
3857
3857
|
* @param query IQuery
|
|
3858
3858
|
* @returns null
|
|
3859
3859
|
*/
|
|
3860
|
-
P(this, "subscribe", (o) => (o = ot(o), o.type === oe && (o =
|
|
3860
|
+
P(this, "subscribe", (o) => (o = ot(o), o.type === oe && (o = xt(this.options, o)), this.subscribers.filter(
|
|
3861
3861
|
(v) => v.widget === o.widget
|
|
3862
3862
|
).length || (console.debug(
|
|
3863
3863
|
"%cstorage%c %csubscribe",
|
|
@@ -4115,7 +4115,7 @@ class Yi {
|
|
|
4115
4115
|
"%capp%c %get",
|
|
4116
4116
|
Xn,
|
|
4117
4117
|
H,
|
|
4118
|
-
|
|
4118
|
+
St,
|
|
4119
4119
|
o.widget,
|
|
4120
4120
|
"wrong method call for getMessages, type used is",
|
|
4121
4121
|
o.type
|
|
@@ -4136,7 +4136,7 @@ class Yi {
|
|
|
4136
4136
|
"%capp%c %get",
|
|
4137
4137
|
Xn,
|
|
4138
4138
|
H,
|
|
4139
|
-
|
|
4139
|
+
St,
|
|
4140
4140
|
o.widget,
|
|
4141
4141
|
"wrong method call for getMessages, type used is",
|
|
4142
4142
|
o.type
|
|
@@ -4157,13 +4157,13 @@ class Yi {
|
|
|
4157
4157
|
"%capp%c %get",
|
|
4158
4158
|
Xn,
|
|
4159
4159
|
H,
|
|
4160
|
-
|
|
4160
|
+
St,
|
|
4161
4161
|
o.widget,
|
|
4162
4162
|
"wrong method call for getMessages, type used is",
|
|
4163
4163
|
o.type
|
|
4164
4164
|
), {
|
|
4165
4165
|
data: null,
|
|
4166
|
-
message: `'wrong method call for
|
|
4166
|
+
message: `'wrong method call for getSeries, type used is ${o.type}`,
|
|
4167
4167
|
success: !1
|
|
4168
4168
|
}) : await ((h = this.sm) == null ? void 0 : h.getSeries(o));
|
|
4169
4169
|
});
|
|
@@ -4186,7 +4186,7 @@ class Yi {
|
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
4188
|
}
|
|
4189
|
-
const oe = "messages", fe = "cloud", de = "series", Hi = "topics", Ot = "widget", Qi = "widgets", no = "subscribe", Qr = "keyval", Xr = "local", Jr = "session", Zr = "dexie", qr = "window", le = "padding:0 4px 0 4px;border-radius:5px;", W = `color:black;background-color:cyan;${le}`, Hn = `color:white;background-color:orange;${le}`, Q = `color:white;background-color:grey;${le}`,
|
|
4189
|
+
const oe = "messages", fe = "cloud", de = "series", Hi = "topics", Ot = "widget", Qi = "widgets", no = "subscribe", Qr = "keyval", Xr = "local", Jr = "session", Zr = "dexie", qr = "window", le = "padding:0 4px 0 4px;border-radius:5px;", W = `color:black;background-color:cyan;${le}`, Hn = `color:white;background-color:orange;${le}`, Q = `color:white;background-color:grey;${le}`, St = `color:black;background-color:lime;${le}`, Qn = `color:grey;border:1px solid grey;${le}`, H = "color:transparent;background-color:transparent;", Xi = `color:grey;background-color:mistyrose;${le}`, Ji = `color:grey;background-color:tan;${le}`, Zi = `color:grey;background-color:thistle;${le}`, ro = `color:white;background-color:red;${le}`, Xn = `color:white;background-color:navy;${le}`, io = `color:white;background-color:green;${le}`, at = `color:white;background-color:dodgerblue;${le}`, nn = `color:gret;background-color:lemonchiffon;${le}`, qi = `color:black;background-color:yellow;${le}`, oo = `color:white;background-color:darkred;${le}`;
|
|
4190
4190
|
class ao {
|
|
4191
4191
|
/**
|
|
4192
4192
|
*
|
|
@@ -4237,6 +4237,18 @@ class ao {
|
|
|
4237
4237
|
message: `wrong method call for getMessages, expected type is ${this.query.type}`,
|
|
4238
4238
|
success: !1
|
|
4239
4239
|
}) : await this.storageReader.getSeries(this.query));
|
|
4240
|
+
P(this, "showModal", (o) => {
|
|
4241
|
+
const h = new CustomEvent("show-modal", {
|
|
4242
|
+
detail: {
|
|
4243
|
+
component: o,
|
|
4244
|
+
attributes: this.query
|
|
4245
|
+
},
|
|
4246
|
+
bubbles: !0,
|
|
4247
|
+
cancelable: !0,
|
|
4248
|
+
composed: !0
|
|
4249
|
+
});
|
|
4250
|
+
window.dispatchEvent(h);
|
|
4251
|
+
});
|
|
4240
4252
|
var D;
|
|
4241
4253
|
if (this.listeners = o, h = ot(h), h.widget === void 0) {
|
|
4242
4254
|
const T = (D = h.topics) == null ? void 0 : D.split("-");
|
|
@@ -4258,7 +4270,7 @@ class ao {
|
|
|
4258
4270
|
const v = h.data.data;
|
|
4259
4271
|
switch (h.data.event) {
|
|
4260
4272
|
case "widget-update":
|
|
4261
|
-
v.slide === o.slide && v.widget === o.widget && this.listeners.forEach((D) => {
|
|
4273
|
+
v.query.slide === o.slide && v.query.widget === o.widget && this.listeners.forEach((D) => {
|
|
4262
4274
|
D(h.data.data);
|
|
4263
4275
|
});
|
|
4264
4276
|
break;
|
|
@@ -4290,7 +4302,7 @@ export {
|
|
|
4290
4302
|
Yi as BuzzcastingStorageReader,
|
|
4291
4303
|
fe as CLOUD,
|
|
4292
4304
|
Xi as CLOUD_CSS,
|
|
4293
|
-
|
|
4305
|
+
St as GET_DATA,
|
|
4294
4306
|
ro as HIDE_CSS,
|
|
4295
4307
|
oe as MESSAGES,
|
|
4296
4308
|
Ji as MESSAGES_CSS,
|