buzzcasting-storage 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buzzcasting-storage.esm.js +80 -76
- package/package.json +1 -1
|
@@ -34,15 +34,13 @@ class hr {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
async get(e) {
|
|
37
|
-
|
|
38
|
-
const r = this.auth(), s = this.csrf();
|
|
39
|
-
n = { ...r, ...s };
|
|
37
|
+
const n = this.auth(), r = this.csrf(), s = { ...n, ...r };
|
|
40
38
|
let i = Object.assign({}, e);
|
|
41
39
|
delete i.type;
|
|
42
40
|
const o = Object.keys(i).length > 0 ? "?" + new URLSearchParams(i).toString() : "";
|
|
43
41
|
return await fetch(
|
|
44
42
|
[this.url, "api", this.options.version, e.type].join("/") + o,
|
|
45
|
-
{ ...
|
|
43
|
+
{ ...s, method: "get" }
|
|
46
44
|
).then((a) => {
|
|
47
45
|
if (!a.ok)
|
|
48
46
|
throw Error(a.statusText);
|
|
@@ -80,9 +78,9 @@ function Ce(t, e) {
|
|
|
80
78
|
te(t, n, e[n]);
|
|
81
79
|
});
|
|
82
80
|
}
|
|
83
|
-
const
|
|
81
|
+
const jn = Object.defineProperty;
|
|
84
82
|
function te(t, e, n, r) {
|
|
85
|
-
|
|
83
|
+
jn(t, e, z(n && H(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, r));
|
|
86
84
|
}
|
|
87
85
|
function Ee(t) {
|
|
88
86
|
return { from: function(e) {
|
|
@@ -568,7 +566,7 @@ From previous: `);
|
|
|
568
566
|
return new E((e, n) => {
|
|
569
567
|
t.map((r) => E.resolve(r).then(e, n));
|
|
570
568
|
});
|
|
571
|
-
}, PSD: { get: () => P, set: (t) => P = t }, totalEchoes: { get: () => mt }, newPSD: ae, usePSD:
|
|
569
|
+
}, PSD: { get: () => P, set: (t) => P = t }, totalEchoes: { get: () => mt }, newPSD: ae, usePSD: je, scheduler: { get: () => Me, set: (t) => {
|
|
572
570
|
Me = t;
|
|
573
571
|
} }, rejectionMapper: { get: () => Lt, set: (t) => {
|
|
574
572
|
Lt = t;
|
|
@@ -606,25 +604,25 @@ From previous: `);
|
|
|
606
604
|
});
|
|
607
605
|
}));
|
|
608
606
|
const $ = { awaits: 0, echoes: 0, id: 0 };
|
|
609
|
-
var
|
|
607
|
+
var Kr = 0, ct = [], kt = 0, mt = 0, jr = 0;
|
|
610
608
|
function ae(t, e, n, r) {
|
|
611
609
|
var s = P, i = Object.create(s);
|
|
612
|
-
i.parent = s, i.ref = 0, i.global = !1, i.id = ++
|
|
610
|
+
i.parent = s, i.ref = 0, i.global = !1, i.id = ++jr;
|
|
613
611
|
var o = Pe.env;
|
|
614
612
|
i.env = un ? { Promise: E, PromiseProp: { value: E, configurable: !0, writable: !0 }, all: E.all, race: E.race, allSettled: E.allSettled, any: E.any, resolve: E.resolve, reject: E.reject, nthen: vn(o.nthen, i), gthen: vn(o.gthen, i) } : {}, e && z(i, e), ++s.ref, i.finalize = function() {
|
|
615
613
|
--this.parent.ref || this.parent.finalize();
|
|
616
614
|
};
|
|
617
|
-
var a =
|
|
615
|
+
var a = je(i, t, n, r);
|
|
618
616
|
return i.ref === 0 && i.finalize(), a;
|
|
619
617
|
}
|
|
620
|
-
function
|
|
621
|
-
return $.id || ($.id = ++
|
|
618
|
+
function Ke() {
|
|
619
|
+
return $.id || ($.id = ++Kr), ++$.awaits, $.echoes += Ln, $.id;
|
|
622
620
|
}
|
|
623
621
|
function re() {
|
|
624
622
|
return !!$.awaits && (--$.awaits == 0 && ($.id = 0), $.echoes = $.awaits * Ln, !0);
|
|
625
623
|
}
|
|
626
624
|
function qe(t) {
|
|
627
|
-
return $.echoes && t && t.constructor === it ? (
|
|
625
|
+
return $.echoes && t && t.constructor === it ? (Ke(), t.then((e) => (re(), e), (e) => (re(), F(e)))) : t;
|
|
628
626
|
}
|
|
629
627
|
function Ar(t) {
|
|
630
628
|
++mt, $.echoes && --$.echoes != 0 || ($.echoes = $.id = 0), ct.push(P), ce(t, !0);
|
|
@@ -644,7 +642,7 @@ function Yn() {
|
|
|
644
642
|
var t = D.Promise;
|
|
645
643
|
return un ? { Promise: t, PromiseProp: Object.getOwnPropertyDescriptor(D, "Promise"), all: t.all, race: t.race, allSettled: t.allSettled, any: t.any, resolve: t.resolve, reject: t.reject, nthen: ft.then, gthen: t.prototype.then } : {};
|
|
646
644
|
}
|
|
647
|
-
function
|
|
645
|
+
function je(t, e, n, r, s) {
|
|
648
646
|
var i = P;
|
|
649
647
|
try {
|
|
650
648
|
return ce(t, !0), e(n, r, s);
|
|
@@ -658,7 +656,7 @@ function Qn(t) {
|
|
|
658
656
|
function yt(t, e, n, r) {
|
|
659
657
|
return typeof t != "function" ? t : function() {
|
|
660
658
|
var s = P;
|
|
661
|
-
n &&
|
|
659
|
+
n && Ke(), ce(e, !0);
|
|
662
660
|
try {
|
|
663
661
|
return t.apply(this, arguments);
|
|
664
662
|
} finally {
|
|
@@ -671,7 +669,7 @@ function vn(t, e) {
|
|
|
671
669
|
return t.call(this, yt(n, e), yt(r, e));
|
|
672
670
|
};
|
|
673
671
|
}
|
|
674
|
-
("" + Un).indexOf("[native code]") === -1 && (
|
|
672
|
+
("" + Un).indexOf("[native code]") === -1 && (Ke = re = A);
|
|
675
673
|
const wn = "unhandledrejection";
|
|
676
674
|
function _n(t, e) {
|
|
677
675
|
var n;
|
|
@@ -1267,15 +1265,15 @@ class Mr {
|
|
|
1267
1265
|
return a.getMany({ trans: r, keys: y.slice(m, m + f), cache: "immutable" }).then((w) => {
|
|
1268
1266
|
const S = [], O = [], x = c ? [] : null, v = [];
|
|
1269
1267
|
for (let _ = 0; _ < f; ++_) {
|
|
1270
|
-
const T = w[_],
|
|
1271
|
-
s.call(
|
|
1268
|
+
const T = w[_], j = { value: He(T), primKey: y[m + _] };
|
|
1269
|
+
s.call(j, j.value, j) !== !1 && (j.value == null ? v.push(y[m + _]) : c || W(l(T), l(j.value)) === 0 ? (O.push(j.value), c && x.push(y[m + _])) : (v.push(y[m + _]), S.push(j.value)));
|
|
1272
1270
|
}
|
|
1273
|
-
const
|
|
1271
|
+
const K = ke(n) && n.limit === 1 / 0 && (typeof e != "function" || e === Pt) && { index: n.index, range: n.range };
|
|
1274
1272
|
return Promise.resolve(S.length > 0 && a.mutate({ trans: r, type: "add", values: S }).then((_) => {
|
|
1275
1273
|
for (let T in _.failures)
|
|
1276
1274
|
v.splice(parseInt(T), 1);
|
|
1277
1275
|
g(S.length, _);
|
|
1278
|
-
})).then(() => (O.length > 0 ||
|
|
1276
|
+
})).then(() => (O.length > 0 || K && typeof e == "object") && a.mutate({ trans: r, type: "put", keys: x, values: O, criteria: K, changeSpec: typeof e != "function" && e }).then((_) => g(O.length, _))).then(() => (v.length > 0 || K && e === Pt) && a.mutate({ trans: r, type: "delete", keys: v, criteria: K }).then((_) => g(v.length, _))).then(() => y.length > m + f && b(m + u));
|
|
1279
1277
|
});
|
|
1280
1278
|
};
|
|
1281
1279
|
return b(0).then(() => {
|
|
@@ -1520,7 +1518,7 @@ class $r {
|
|
|
1520
1518
|
for (P.global || (P.lockOwnerFor = null); this._blockedFuncs.length > 0 && !this._locked(); ) {
|
|
1521
1519
|
var e = this._blockedFuncs.shift();
|
|
1522
1520
|
try {
|
|
1523
|
-
|
|
1521
|
+
je(e[1], e[0]);
|
|
1524
1522
|
} catch {
|
|
1525
1523
|
}
|
|
1526
1524
|
}
|
|
@@ -1677,14 +1675,14 @@ function Ur(t, e, n) {
|
|
|
1677
1675
|
if (O === 0)
|
|
1678
1676
|
return b({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
|
|
1679
1677
|
let x;
|
|
1680
|
-
const v = [],
|
|
1678
|
+
const v = [], K = [];
|
|
1681
1679
|
let _ = 0;
|
|
1682
1680
|
const T = (U) => {
|
|
1683
1681
|
++_, We(U);
|
|
1684
1682
|
};
|
|
1685
1683
|
if (h === "deleteRange") {
|
|
1686
1684
|
if (y.type === 4)
|
|
1687
|
-
return b({ numFailures: _, failures:
|
|
1685
|
+
return b({ numFailures: _, failures: K, results: [], lastResult: void 0 });
|
|
1688
1686
|
y.type === 3 ? v.push(x = f.clear()) : v.push(x = f.delete(r(y)));
|
|
1689
1687
|
} else {
|
|
1690
1688
|
const [U, N] = S ? w ? [g, p] : [g, null] : [p, null];
|
|
@@ -1695,21 +1693,21 @@ function Ur(t, e, n) {
|
|
|
1695
1693
|
for (let M = 0; M < O; ++M)
|
|
1696
1694
|
v.push(x = f[h](U[M])), x.onerror = T;
|
|
1697
1695
|
}
|
|
1698
|
-
const
|
|
1696
|
+
const j = (U) => {
|
|
1699
1697
|
const N = U.target.result;
|
|
1700
|
-
v.forEach((M, we) => M.error != null && (
|
|
1698
|
+
v.forEach((M, we) => M.error != null && (K[we] = M.error)), b({ numFailures: _, failures: K, results: h === "delete" ? p : v.map((M) => M.result), lastResult: N });
|
|
1701
1699
|
};
|
|
1702
1700
|
x.onerror = (U) => {
|
|
1703
|
-
T(U),
|
|
1704
|
-
}, x.onsuccess =
|
|
1701
|
+
T(U), j(U);
|
|
1702
|
+
}, x.onsuccess = j;
|
|
1705
1703
|
});
|
|
1706
1704
|
}, getMany: ({ trans: d, keys: h }) => new Promise((p, g) => {
|
|
1707
1705
|
p = I(p);
|
|
1708
1706
|
const y = d.objectStore(u), b = h.length, m = new Array(b);
|
|
1709
1707
|
let f, w = 0, S = 0;
|
|
1710
1708
|
const O = (v) => {
|
|
1711
|
-
const
|
|
1712
|
-
m[
|
|
1709
|
+
const K = v.target;
|
|
1710
|
+
m[K._pos] = K.result, ++S === w && p(m);
|
|
1713
1711
|
}, x = Q(g);
|
|
1714
1712
|
for (let v = 0; v < b; ++v)
|
|
1715
1713
|
h[v] != null && (f = y.get(h[v]), f._pos = v, f.onsuccess = O, f.onerror = x, ++w);
|
|
@@ -1721,18 +1719,18 @@ function Ur(t, e, n) {
|
|
|
1721
1719
|
}), query: /* @__PURE__ */ function(d) {
|
|
1722
1720
|
return (h) => new Promise((p, g) => {
|
|
1723
1721
|
p = I(p);
|
|
1724
|
-
const { trans: y, values: b, limit: m, query: f } = h, w = m === 1 / 0 ? void 0 : m, { index: S, range: O } = f, x = y.objectStore(u), v = S.isPrimaryKey ? x : x.index(S.name),
|
|
1722
|
+
const { trans: y, values: b, limit: m, query: f } = h, w = m === 1 / 0 ? void 0 : m, { index: S, range: O } = f, x = y.objectStore(u), v = S.isPrimaryKey ? x : x.index(S.name), K = r(O);
|
|
1725
1723
|
if (m === 0)
|
|
1726
1724
|
return p({ result: [] });
|
|
1727
1725
|
if (d) {
|
|
1728
|
-
const _ = b ? v.getAll(
|
|
1726
|
+
const _ = b ? v.getAll(K, w) : v.getAllKeys(K, w);
|
|
1729
1727
|
_.onsuccess = (T) => p({ result: T.target.result }), _.onerror = Q(g);
|
|
1730
1728
|
} else {
|
|
1731
1729
|
let _ = 0;
|
|
1732
|
-
const T = b || !("openKeyCursor" in v) ? v.openCursor(
|
|
1730
|
+
const T = b || !("openKeyCursor" in v) ? v.openCursor(K) : v.openKeyCursor(K), j = [];
|
|
1733
1731
|
T.onsuccess = (U) => {
|
|
1734
1732
|
const N = T.result;
|
|
1735
|
-
return N ? (
|
|
1733
|
+
return N ? (j.push(b ? N.value : N.primaryKey), ++_ === m ? p({ result: j }) : void N.continue()) : p({ result: j });
|
|
1736
1734
|
}, T.onerror = Q(g);
|
|
1737
1735
|
}
|
|
1738
1736
|
});
|
|
@@ -1740,14 +1738,14 @@ function Ur(t, e, n) {
|
|
|
1740
1738
|
return new Promise((b, m) => {
|
|
1741
1739
|
b = I(b);
|
|
1742
1740
|
const { index: f, range: w } = p, S = d.objectStore(u), O = f.isPrimaryKey ? S : S.index(f.name), x = g ? y ? "prevunique" : "prev" : y ? "nextunique" : "next", v = h || !("openKeyCursor" in O) ? O.openCursor(r(w), x) : O.openKeyCursor(r(w), x);
|
|
1743
|
-
v.onerror = Q(m), v.onsuccess = I((
|
|
1741
|
+
v.onerror = Q(m), v.onsuccess = I((K) => {
|
|
1744
1742
|
const _ = v.result;
|
|
1745
1743
|
if (!_)
|
|
1746
1744
|
return void b(null);
|
|
1747
1745
|
_.___id = ++Lr, _.done = !1;
|
|
1748
1746
|
const T = _.continue.bind(_);
|
|
1749
|
-
let
|
|
1750
|
-
|
|
1747
|
+
let j = _.continuePrimaryKey;
|
|
1748
|
+
j && (j = j.bind(_));
|
|
1751
1749
|
const U = _.advance.bind(_), N = () => {
|
|
1752
1750
|
throw new Error("Cursor not stopped");
|
|
1753
1751
|
};
|
|
@@ -1775,7 +1773,7 @@ function Ur(t, e, n) {
|
|
|
1775
1773
|
};
|
|
1776
1774
|
return v.onsuccess = I((V) => {
|
|
1777
1775
|
v.onsuccess = _e, _e();
|
|
1778
|
-
}), _.continue = T, _.continuePrimaryKey =
|
|
1776
|
+
}), _.continue = T, _.continuePrimaryKey = j, _.advance = U, _e(), we;
|
|
1779
1777
|
}, b(_);
|
|
1780
1778
|
}, m);
|
|
1781
1779
|
});
|
|
@@ -1812,7 +1810,7 @@ function gt({ _novip: t }, e, n, r) {
|
|
|
1812
1810
|
(!a || "value" in a && a.value === void 0) && (o === t.Transaction.prototype || o instanceof t.Transaction ? te(o, s, { get() {
|
|
1813
1811
|
return this.table(s);
|
|
1814
1812
|
}, set(c) {
|
|
1815
|
-
|
|
1813
|
+
jn(this, s, { value: c, writable: !0, configurable: !0, enumerable: !0 });
|
|
1816
1814
|
} }) : o[s] = new t.Table(s, i));
|
|
1817
1815
|
});
|
|
1818
1816
|
});
|
|
@@ -1851,26 +1849,26 @@ function zr(t, e, n, r) {
|
|
|
1851
1849
|
if (v.recreate)
|
|
1852
1850
|
throw new C.Upgrade("Not yet support for changing primary key");
|
|
1853
1851
|
{
|
|
1854
|
-
const
|
|
1855
|
-
v.add.forEach((_) => Jt(
|
|
1856
|
-
|
|
1857
|
-
}), v.del.forEach((_) =>
|
|
1852
|
+
const K = d.objectStore(v.name);
|
|
1853
|
+
v.add.forEach((_) => Jt(K, _)), v.change.forEach((_) => {
|
|
1854
|
+
K.deleteIndex(_.name), Jt(K, _);
|
|
1855
|
+
}), v.del.forEach((_) => K.deleteIndex(_));
|
|
1858
1856
|
}
|
|
1859
1857
|
});
|
|
1860
1858
|
const x = f._cfg.contentUpgrade;
|
|
1861
1859
|
if (x && f._cfg.version > l) {
|
|
1862
1860
|
Yt(c, d), u._memoizedTables = {}, y = !0;
|
|
1863
1861
|
let v = Bn(S);
|
|
1864
|
-
O.del.forEach((
|
|
1865
|
-
v[
|
|
1862
|
+
O.del.forEach((j) => {
|
|
1863
|
+
v[j] = w[j];
|
|
1866
1864
|
}), Qt(c, [c.Transaction.prototype]), gt(c, [c.Transaction.prototype], R(v), v), u.schema = v;
|
|
1867
|
-
const
|
|
1865
|
+
const K = on(x);
|
|
1868
1866
|
let _;
|
|
1869
|
-
|
|
1867
|
+
K && Ke();
|
|
1870
1868
|
const T = E.follow(() => {
|
|
1871
|
-
if (_ = x(u), _ &&
|
|
1872
|
-
var
|
|
1873
|
-
_.then(
|
|
1869
|
+
if (_ = x(u), _ && K) {
|
|
1870
|
+
var j = re.bind(null, null);
|
|
1871
|
+
_.then(j, j);
|
|
1874
1872
|
}
|
|
1875
1873
|
});
|
|
1876
1874
|
return _ && typeof _.then == "function" ? E.resolve(_) : T.then(() => _);
|
|
@@ -2112,7 +2110,7 @@ function sr(t, e, n, r, s) {
|
|
|
2112
2110
|
}
|
|
2113
2111
|
const c = on(s);
|
|
2114
2112
|
let l;
|
|
2115
|
-
c &&
|
|
2113
|
+
c && Ke();
|
|
2116
2114
|
const u = E.follow(() => {
|
|
2117
2115
|
if (l = s.call(o, o), l)
|
|
2118
2116
|
if (c) {
|
|
@@ -2224,8 +2222,8 @@ const Jr = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: (t) =>
|
|
|
2224
2222
|
const O = mn(w, h.values[f]), x = l.fire.call(S, O, m, w, p);
|
|
2225
2223
|
if (x) {
|
|
2226
2224
|
const v = h.values[f];
|
|
2227
|
-
Object.keys(x).forEach((
|
|
2228
|
-
H(v,
|
|
2225
|
+
Object.keys(x).forEach((K) => {
|
|
2226
|
+
H(v, K) ? v[K] = x[K] : Y(v, K, x[K]);
|
|
2229
2227
|
});
|
|
2230
2228
|
}
|
|
2231
2229
|
}
|
|
@@ -2345,11 +2343,11 @@ function Cn(t) {
|
|
|
2345
2343
|
const r = (((e = t.r) === null || e === void 0 ? void 0 : e.d) || 0) - (((n = t.l) === null || n === void 0 ? void 0 : n.d) || 0), s = r > 1 ? "r" : r < -1 ? "l" : "";
|
|
2346
2344
|
if (s) {
|
|
2347
2345
|
const i = s === "r" ? "l" : "r", o = { ...t }, a = t[s];
|
|
2348
|
-
t.from = a.from, t.to = a.to, t[s] = a[s], o[s] = a[i], t[i] = o, o.d =
|
|
2346
|
+
t.from = a.from, t.to = a.to, t[s] = a[s], o[s] = a[i], t[i] = o, o.d = Kn(o);
|
|
2349
2347
|
}
|
|
2350
|
-
t.d =
|
|
2348
|
+
t.d = Kn(t);
|
|
2351
2349
|
}
|
|
2352
|
-
function
|
|
2350
|
+
function Kn({ r: t, l: e }) {
|
|
2353
2351
|
return (t ? e ? Math.max(t.d, e.d) : t.d : e ? e.d : 0) + 1;
|
|
2354
2352
|
}
|
|
2355
2353
|
Ce(Z.prototype, { add(t) {
|
|
@@ -2375,15 +2373,15 @@ const qr = { stack: "dbcore", level: 0, create: (t) => {
|
|
|
2375
2373
|
if (L(w)) {
|
|
2376
2374
|
f !== "delete" && (w = x.results), b.addKeys(w);
|
|
2377
2375
|
const v = ir(w, O);
|
|
2378
|
-
v || f === "add" || m.addKeys(w), (v || S) && function(
|
|
2376
|
+
v || f === "add" || m.addKeys(w), (v || S) && function(K, _, T, j) {
|
|
2379
2377
|
function U(N) {
|
|
2380
|
-
const M =
|
|
2378
|
+
const M = K(N.name || "");
|
|
2381
2379
|
function we(V) {
|
|
2382
2380
|
return V != null ? N.extractKey(V) : null;
|
|
2383
2381
|
}
|
|
2384
2382
|
const _e = (V) => N.multiEntry && L(V) ? V.forEach((ue) => M.addKey(ue)) : M.addKey(V);
|
|
2385
|
-
(T ||
|
|
2386
|
-
const Ae = T && we(T[ue]), _t =
|
|
2383
|
+
(T || j).forEach((V, ue) => {
|
|
2384
|
+
const Ae = T && we(T[ue]), _t = j && we(j[ue]);
|
|
2387
2385
|
W(Ae, _t) !== 0 && (Ae != null && _e(Ae), _t != null && _e(_t));
|
|
2388
2386
|
});
|
|
2389
2387
|
}
|
|
@@ -2420,8 +2418,8 @@ const qr = { stack: "dbcore", level: 0, create: (t) => {
|
|
|
2420
2418
|
} else if (h === "openCursor") {
|
|
2421
2419
|
const x = O, v = p.values;
|
|
2422
2420
|
return x && Object.create(x, { key: { get: () => (m.addKey(x.primaryKey), x.key) }, primaryKey: { get() {
|
|
2423
|
-
const
|
|
2424
|
-
return m.addKey(
|
|
2421
|
+
const K = x.primaryKey;
|
|
2422
|
+
return m.addKey(K), K;
|
|
2425
2423
|
} }, value: { get: () => (v && b.addKey(x.primaryKey), x.value) } });
|
|
2426
2424
|
}
|
|
2427
2425
|
return O;
|
|
@@ -2641,7 +2639,7 @@ class me {
|
|
|
2641
2639
|
}) : F(l);
|
|
2642
2640
|
}
|
|
2643
2641
|
const c = sr.bind(null, this, o, a, s, r);
|
|
2644
|
-
return s ? s._promise(o, c, "lock") : P.trans ?
|
|
2642
|
+
return s ? s._promise(o, c, "lock") : P.trans ? je(P.transless, () => this._whenReady(c)) : this._whenReady(c);
|
|
2645
2643
|
}
|
|
2646
2644
|
table(e) {
|
|
2647
2645
|
if (!H(this._allTables, e))
|
|
@@ -2688,8 +2686,8 @@ function ns(t) {
|
|
|
2688
2686
|
return;
|
|
2689
2687
|
a = {};
|
|
2690
2688
|
const y = {}, b = function(m) {
|
|
2691
|
-
i &&
|
|
2692
|
-
const f = () => ae(t, { subscr: m, trans: null }), w = P.trans ?
|
|
2689
|
+
i && Ke();
|
|
2690
|
+
const f = () => ae(t, { subscr: m, trans: null }), w = P.trans ? je(P.transless, f) : f();
|
|
2693
2691
|
return i && w.then(re, re), w;
|
|
2694
2692
|
}(y);
|
|
2695
2693
|
d || (le(ze, p), d = !0), u = !0, Promise.resolve(b).then((m) => {
|
|
@@ -2727,7 +2725,7 @@ Ce(he, { ...st, delete: (t) => new he(t, { addons: [] }).delete(), exists: (t) =
|
|
|
2727
2725
|
}
|
|
2728
2726
|
}, defineClass: () => function(t) {
|
|
2729
2727
|
z(this, t);
|
|
2730
|
-
}, ignoreTransaction: (t) => P.trans ?
|
|
2728
|
+
}, ignoreTransaction: (t) => P.trans ? je(P.transless, t) : t(), vip: qt, async: function(t) {
|
|
2731
2729
|
return function() {
|
|
2732
2730
|
try {
|
|
2733
2731
|
var e = en(t.apply(this, arguments));
|
|
@@ -2860,7 +2858,9 @@ class rs {
|
|
|
2860
2858
|
});
|
|
2861
2859
|
});
|
|
2862
2860
|
k(this, "getMessages", async (e) => {
|
|
2863
|
-
const n = (l) => l.widget_id === e.widget, r = (l) => l.utc > ((e == null ? void 0 : e.since) || 0), s = (l) => !l.hasOwnProperty("visible") || (l == null ? void 0 : l.visible) !== 0, i = await this.db.table("topics").orderBy("utc").reverse().filter(n).filter(r).filter(s).limit((e == null ? void 0 : e.limit) ?? 25).toArray(), o = i[0].title || "No results", a = i.map(
|
|
2861
|
+
const n = (l) => l.widget_id === e.widget, r = (l) => l.utc > ((e == null ? void 0 : e.since) || 0), s = (l) => !l.hasOwnProperty("visible") || (l == null ? void 0 : l.visible) !== 0, i = await this.db.table("topics").orderBy("utc").reverse().filter(n).filter(r).filter(s).limit((e == null ? void 0 : e.limit) ?? 25).toArray(), o = i[0].title || "No results", a = i.map(
|
|
2862
|
+
(l) => l.message_id
|
|
2863
|
+
), c = await this.db.table("messages").where("id").anyOf(a).toArray().then((l) => l.sort(function(u, d) {
|
|
2864
2864
|
return d.utc - u.utc;
|
|
2865
2865
|
}));
|
|
2866
2866
|
return {
|
|
@@ -2886,7 +2886,9 @@ class rs {
|
|
|
2886
2886
|
const s = (r = e.topics) == null ? void 0 : r.split("-");
|
|
2887
2887
|
e.dashboard = s ? s[0] : "", e.widget = s ? s[1] : "";
|
|
2888
2888
|
}
|
|
2889
|
-
this.subscribers.filter(
|
|
2889
|
+
this.subscribers.filter(
|
|
2890
|
+
(s) => s.widget == e.widget
|
|
2891
|
+
).length > 0 || (e.type === be && (e = Je(this.options, e)), console.log("[storage] subscribe", e), this.subscribers.push(e));
|
|
2890
2892
|
});
|
|
2891
2893
|
this.options = e, this.db = new me(e.app), this.db.version(2).stores({
|
|
2892
2894
|
player: "id,title,name,location",
|
|
@@ -2916,11 +2918,11 @@ function ss(t, e) {
|
|
|
2916
2918
|
const r = gn(n);
|
|
2917
2919
|
return (s, i) => r.then((o) => i(o.transaction(e, s).objectStore(e)));
|
|
2918
2920
|
}
|
|
2919
|
-
let
|
|
2921
|
+
let Kt;
|
|
2920
2922
|
function ar() {
|
|
2921
|
-
return
|
|
2923
|
+
return Kt || (Kt = ss("keyval-store", "keyval")), Kt;
|
|
2922
2924
|
}
|
|
2923
|
-
function
|
|
2925
|
+
function jt(t, e = ar()) {
|
|
2924
2926
|
return e("readonly", (n) => gn(n.get(t)));
|
|
2925
2927
|
}
|
|
2926
2928
|
function At(t, e, n = ar()) {
|
|
@@ -2936,7 +2938,7 @@ class is {
|
|
|
2936
2938
|
});
|
|
2937
2939
|
k(this, "getCloud", async (e) => {
|
|
2938
2940
|
const n = B(e);
|
|
2939
|
-
return await
|
|
2941
|
+
return await jt(n);
|
|
2940
2942
|
});
|
|
2941
2943
|
k(this, "setSeries", async (e, n) => {
|
|
2942
2944
|
const r = B(e);
|
|
@@ -2944,7 +2946,7 @@ class is {
|
|
|
2944
2946
|
});
|
|
2945
2947
|
k(this, "getSeries", async (e) => {
|
|
2946
2948
|
const n = B(e);
|
|
2947
|
-
return await
|
|
2949
|
+
return await jt(n);
|
|
2948
2950
|
});
|
|
2949
2951
|
k(this, "setMessages", async (e, n) => {
|
|
2950
2952
|
const r = B(e);
|
|
@@ -2952,7 +2954,7 @@ class is {
|
|
|
2952
2954
|
});
|
|
2953
2955
|
k(this, "getMessages", async (e) => {
|
|
2954
2956
|
const n = B(e);
|
|
2955
|
-
return await
|
|
2957
|
+
return await jt(n);
|
|
2956
2958
|
});
|
|
2957
2959
|
k(this, "cleanMessages", async (e) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((n) => n())));
|
|
2958
2960
|
k(this, "subscribe", (e) => {
|
|
@@ -3114,12 +3116,14 @@ class cs {
|
|
|
3114
3116
|
k(this, "subscribers", []);
|
|
3115
3117
|
k(this, "options");
|
|
3116
3118
|
k(this, "setCloud", async (e, n) => {
|
|
3119
|
+
await null;
|
|
3117
3120
|
const r = B(e);
|
|
3118
|
-
window.BuzzCasting.WidgetData[r] = n
|
|
3121
|
+
window.BuzzCasting.WidgetData[r] = n;
|
|
3119
3122
|
});
|
|
3120
3123
|
k(this, "getCloud", async (e) => {
|
|
3121
|
-
|
|
3122
|
-
|
|
3124
|
+
await null;
|
|
3125
|
+
const n = B(e);
|
|
3126
|
+
return window.BuzzCasting.WidgetData[n];
|
|
3123
3127
|
});
|
|
3124
3128
|
k(this, "setSeries", async (e, n) => {
|
|
3125
3129
|
const r = B(e);
|