buzzcasting-storage 3.0.4 → 3.0.6
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 +74 -74
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var xi = Object.defineProperty;
|
|
2
2
|
var Ai = (d, r, s) => r in d ? xi(d, r, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[r] = s;
|
|
3
3
|
var k = (d, r, s) => Ai(d, typeof r != "symbol" ? r + "" : r, s);
|
|
4
|
-
var K = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.SLIDE = "slide", d))(K || {}), _ = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(_ || {}), re = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_UPDATE = "widgetUpdate", d))(re || {}), Zt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(Zt || {}),
|
|
5
|
-
const ki = "3.0.
|
|
4
|
+
var K = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.SLIDE = "slide", d))(K || {}), _ = /* @__PURE__ */ ((d) => (d.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", d.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", d.BROADCAST = "color:white;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", d.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", d.CLOUD = "color:grey;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", d.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", d.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", d.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", d.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", d.NONE = "color:transparent;background-color:transparent;", d.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", d.SERIES = "color:grey;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", d.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", d.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", d.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", d.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", d.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", d))(_ || {}), re = /* @__PURE__ */ ((d) => (d.ADD_SLIDE = "addSlide", d.APP_READY = "appReady", d.API_UPDATE = "apiUpdate", d.APPROVE_MESSAGE = "approveMessage", d.CHANNEL = "channel", d.CLEAN_MESSAGES = "cleanMessages", d.CLOSE_MODAL = "closeModal", d.CLOSE_BUILDER_MODAL = "closeBuilderModal", d.ERROR = "error", d.HIDE_MESSAGE = "hideMessage", d.HIDE_LABELS = "hideLabels", d.PAUSE_PRESENTATION = "pausePresentation", d.PRESENTATION_READY = "presentationReady", d.PREV_SLIDE = "prevSlide", d.RELOAD_PRESENTATION = "reloadPresentation", d.SHOW_MODAL = "showModal", d.STAR_MESSAGE = "starMessage", d.GOTO_SLIDE = "gotoSlide", d.NEXT_SLIDE = "nextSlide", d.SHOW_BUILDER_MODAL = "showBuilderModal", d.SLIDE_DID_LOAD = "slideDidLoad", d.SLIDE_GOTO = "slideGoto", d.SLIDE_READY = "slideReady", d.SLIDE_LOAD = "loadSlide", d.SLIDE_STORE = "storeSlide", d.SLIDE_TRANSITIONER = "slideTransitioner", d.START_TRANSITIONER = "startTransitioner", d.STORAGE_INIT = "storageInit", d.SUBSCRIBE = "subscribe", d.SUSPEND_ACCOUNT = "suspendAccount", d.REMOVE_CLOUD = "removeCloud", d.UPDATE = "update", d.VERSION = "version", d.WIDGET_UPDATE = "widgetUpdate", d))(re || {}), Zt = /* @__PURE__ */ ((d) => (d.APPROVED = "approved", d.BEFORE = "before", d.DELAYED = "delayed", d.NONE = "none", d.REALTIME = "realtime", d))(Zt || {}), ge = /* @__PURE__ */ ((d) => (d.KEYVAL = "keyval", d.LOCAL = "local", d.SESSION = "session", d.DEXIE = "dexie", d.WINDOW = "window", d))(ge || {});
|
|
5
|
+
const ki = "3.0.5";
|
|
6
6
|
class Di {
|
|
7
7
|
constructor(r) {
|
|
8
8
|
k(this, "options");
|
|
@@ -170,22 +170,22 @@ var Mr = { exports: {} };
|
|
|
170
170
|
}), e;
|
|
171
171
|
}
|
|
172
172
|
typeof Promise > "u" || D.Promise || (D.Promise = Promise);
|
|
173
|
-
var V = Object.getPrototypeOf,
|
|
174
|
-
function
|
|
175
|
-
return
|
|
173
|
+
var V = Object.getPrototypeOf, ve = {}.hasOwnProperty;
|
|
174
|
+
function q(e, t) {
|
|
175
|
+
return ve.call(e, t);
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function pe(e, t) {
|
|
178
178
|
typeof t == "function" && (t = t(V(e))), (typeof Reflect > "u" ? T : Reflect.ownKeys)(t).forEach(function(n) {
|
|
179
179
|
Ae(e, n, t[n]);
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
var He = Object.defineProperty;
|
|
183
183
|
function Ae(e, t, n, i) {
|
|
184
|
-
He(e, t, Q(n &&
|
|
184
|
+
He(e, t, Q(n && q(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, i));
|
|
185
185
|
}
|
|
186
186
|
function Ye(e) {
|
|
187
187
|
return { from: function(t) {
|
|
188
|
-
return e.prototype = Object.create(t.prototype), Ae(e.prototype, "constructor", e), { extend:
|
|
188
|
+
return e.prototype = Object.create(t.prototype), Ae(e.prototype, "constructor", e), { extend: pe.bind(null, e.prototype) };
|
|
189
189
|
} };
|
|
190
190
|
}
|
|
191
191
|
var Fr = Object.getOwnPropertyDescriptor, Ur = [].slice;
|
|
@@ -202,7 +202,7 @@ var Mr = { exports: {} };
|
|
|
202
202
|
D.setImmediate ? setImmediate(e) : setTimeout(e, 0);
|
|
203
203
|
}
|
|
204
204
|
function we(e, t) {
|
|
205
|
-
if (typeof t == "string" &&
|
|
205
|
+
if (typeof t == "string" && q(e, t)) return e[t];
|
|
206
206
|
if (!t) return e;
|
|
207
207
|
if (typeof t != "string") {
|
|
208
208
|
for (var n = [], i = 0, o = t.length; i < o; ++i) {
|
|
@@ -223,12 +223,12 @@ var Mr = { exports: {} };
|
|
|
223
223
|
for (var i = 0, o = t.length; i < o; ++i) le(e, t[i], n[i]);
|
|
224
224
|
} else {
|
|
225
225
|
var a, c, u = t.indexOf(".");
|
|
226
|
-
u !== -1 ? (a = t.substr(0, u), (c = t.substr(u + 1)) === "" ? n === void 0 ? B(e) && !isNaN(parseInt(a)) ? e.splice(a, 1) : delete e[a] : e[a] = n : le(u = !(u = e[a]) || !
|
|
226
|
+
u !== -1 ? (a = t.substr(0, u), (c = t.substr(u + 1)) === "" ? n === void 0 ? B(e) && !isNaN(parseInt(a)) ? e.splice(a, 1) : delete e[a] : e[a] = n : le(u = !(u = e[a]) || !q(e, a) ? e[a] = {} : u, c, n)) : n === void 0 ? B(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
function Yn(e) {
|
|
230
230
|
var t, n = {};
|
|
231
|
-
for (t in e)
|
|
231
|
+
for (t in e) q(e, t) && (n[t] = e[t]);
|
|
232
232
|
return n;
|
|
233
233
|
}
|
|
234
234
|
var Wr = [].concat;
|
|
@@ -255,7 +255,7 @@ var Mr = { exports: {} };
|
|
|
255
255
|
} else if (Xn.has(n.constructor)) i = n;
|
|
256
256
|
else {
|
|
257
257
|
var c, u = V(n);
|
|
258
|
-
for (c in i = u === Object.prototype ? {} : Object.create(u), ot.set(n, i), n)
|
|
258
|
+
for (c in i = u === Object.prototype ? {} : Object.create(u), ot.set(n, i), n) q(n, c) && (i[c] = t(n[c]));
|
|
259
259
|
}
|
|
260
260
|
return i;
|
|
261
261
|
}(e), ot = null, e;
|
|
@@ -510,7 +510,7 @@ var Mr = { exports: {} };
|
|
|
510
510
|
function Dt(e) {
|
|
511
511
|
return new N(st, !1, e);
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function ee(e, t) {
|
|
514
514
|
var n = G;
|
|
515
515
|
return function() {
|
|
516
516
|
var i = Ve(), o = G;
|
|
@@ -523,7 +523,7 @@ var Mr = { exports: {} };
|
|
|
523
523
|
}
|
|
524
524
|
};
|
|
525
525
|
}
|
|
526
|
-
|
|
526
|
+
pe(N.prototype, { then: un, _then: function(e, t) {
|
|
527
527
|
dn(this, new er(null, null, e, t, G));
|
|
528
528
|
}, catch: function(e) {
|
|
529
529
|
if (arguments.length === 1) return this.then(null, e);
|
|
@@ -551,7 +551,7 @@ var Mr = { exports: {} };
|
|
|
551
551
|
}, e);
|
|
552
552
|
n.then(i, o).finally(clearTimeout.bind(null, a));
|
|
553
553
|
}) : this;
|
|
554
|
-
} }), typeof Symbol < "u" && Symbol.toStringTag && Ae(N.prototype, Symbol.toStringTag, "Dexie.Promise"), ke.env = nr(),
|
|
554
|
+
} }), typeof Symbol < "u" && Symbol.toStringTag && Ae(N.prototype, Symbol.toStringTag, "Dexie.Promise"), ke.env = nr(), pe(N, { all: function() {
|
|
555
555
|
var e = _e.apply(null, arguments).map(Rt);
|
|
556
556
|
return new N(function(t, n) {
|
|
557
557
|
e.length === 0 && t([]);
|
|
@@ -1083,14 +1083,14 @@ var Mr = { exports: {} };
|
|
|
1083
1083
|
return h.stop(w);
|
|
1084
1084
|
}, function(w) {
|
|
1085
1085
|
return h.fail(w);
|
|
1086
|
-
}) || ((f = "" + (b = h.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(b)),
|
|
1086
|
+
}) || ((f = "" + (b = h.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(b)), q(a, f) || (a[f] = !0, t(u, h, g)));
|
|
1087
1087
|
};
|
|
1088
1088
|
return Promise.all([e.or._iterate(c, n), dr(lr(e, i, n), e.algorithm, c, !e.keysOnly && e.valueMapper)]);
|
|
1089
1089
|
}
|
|
1090
1090
|
return dr(lr(e, i, n), Fe(e.algorithm, o), t, !e.keysOnly && e.valueMapper);
|
|
1091
1091
|
}
|
|
1092
1092
|
function dr(e, t, n, i) {
|
|
1093
|
-
var o =
|
|
1093
|
+
var o = ee(i ? function(a, c, u) {
|
|
1094
1094
|
return n(i(a), c, u);
|
|
1095
1095
|
} : n);
|
|
1096
1096
|
return e.then(function(a) {
|
|
@@ -1298,7 +1298,7 @@ var Mr = { exports: {} };
|
|
|
1298
1298
|
if (!e || !e.multi) return this;
|
|
1299
1299
|
var t = {};
|
|
1300
1300
|
return yn(this._ctx, function(o) {
|
|
1301
|
-
var i = o.primaryKey.toString(), o =
|
|
1301
|
+
var i = o.primaryKey.toString(), o = q(t, i);
|
|
1302
1302
|
return t[i] = !0, !o;
|
|
1303
1303
|
}), this;
|
|
1304
1304
|
}, Y.prototype.modify = function(e) {
|
|
@@ -1589,7 +1589,7 @@ var Mr = { exports: {} };
|
|
|
1589
1589
|
function oe() {
|
|
1590
1590
|
}
|
|
1591
1591
|
function me(e) {
|
|
1592
|
-
return
|
|
1592
|
+
return ee(function(t) {
|
|
1593
1593
|
return pt(t), e(t.target.error), !1;
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
@@ -1622,11 +1622,11 @@ var Mr = { exports: {} };
|
|
|
1622
1622
|
throw new $.OpenFailed(i);
|
|
1623
1623
|
}
|
|
1624
1624
|
if (!this.active) throw new $.TransactionInactive();
|
|
1625
|
-
return it(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror =
|
|
1625
|
+
return it(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = ee(function(o) {
|
|
1626
1626
|
pt(o), t._reject(e.error);
|
|
1627
|
-
}), e.onabort =
|
|
1627
|
+
}), e.onabort = ee(function(o) {
|
|
1628
1628
|
pt(o), t.active && t._reject(new $.Abort(e.error)), t.active = !1, t.on("abort").fire(o);
|
|
1629
|
-
}), e.oncomplete =
|
|
1629
|
+
}), e.oncomplete = ee(function() {
|
|
1630
1630
|
t.active = !1, t._resolve(), "mutatedParts" in e && Re.storagemutated.fire(e.mutatedParts);
|
|
1631
1631
|
}), this;
|
|
1632
1632
|
}, be.prototype._promise = function(e, t, n) {
|
|
@@ -1666,9 +1666,9 @@ var Mr = { exports: {} };
|
|
|
1666
1666
|
var o = n._waitingFor;
|
|
1667
1667
|
return new N(function(a, c) {
|
|
1668
1668
|
i.then(function(u) {
|
|
1669
|
-
return n._waitingQueue.push(
|
|
1669
|
+
return n._waitingQueue.push(ee(a.bind(null, u)));
|
|
1670
1670
|
}, function(u) {
|
|
1671
|
-
return n._waitingQueue.push(
|
|
1671
|
+
return n._waitingQueue.push(ee(c.bind(null, u)));
|
|
1672
1672
|
}).finally(function() {
|
|
1673
1673
|
n._waitingFor === o && (n._waitingFor = null);
|
|
1674
1674
|
});
|
|
@@ -1677,7 +1677,7 @@ var Mr = { exports: {} };
|
|
|
1677
1677
|
this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new $.Abort()));
|
|
1678
1678
|
}, be.prototype.table = function(e) {
|
|
1679
1679
|
var t = this._memoizedTables || (this._memoizedTables = {});
|
|
1680
|
-
if (
|
|
1680
|
+
if (q(t, e)) return t[e];
|
|
1681
1681
|
var n = this.schema[e];
|
|
1682
1682
|
if (!n) throw new $.NotFound("Table " + e + " not part of transaction");
|
|
1683
1683
|
return n = new this.db.Table(e, n, this), n.core = this.db.core.table(e), t[e] = n;
|
|
@@ -1739,7 +1739,7 @@ var Mr = { exports: {} };
|
|
|
1739
1739
|
return { name: m, schema: w, mutate: function(v) {
|
|
1740
1740
|
var y = v.trans, S = v.type, E = v.keys, O = v.values, A = v.range;
|
|
1741
1741
|
return new Promise(function(P, M) {
|
|
1742
|
-
P =
|
|
1742
|
+
P = ee(P);
|
|
1743
1743
|
var I = y.objectStore(m), C = I.keyPath == null, j = S === "put" || S === "add";
|
|
1744
1744
|
if (!j && S !== "delete" && S !== "deleteRange") throw new Error("Invalid operation type: " + S);
|
|
1745
1745
|
var R, L = (E || O || { length: 1 }).length;
|
|
@@ -1771,7 +1771,7 @@ var Mr = { exports: {} };
|
|
|
1771
1771
|
}, getMany: function(v) {
|
|
1772
1772
|
var y = v.trans, S = v.keys;
|
|
1773
1773
|
return new Promise(function(E, O) {
|
|
1774
|
-
E =
|
|
1774
|
+
E = ee(E);
|
|
1775
1775
|
for (var A, P = y.objectStore(m), M = S.length, I = new Array(M), C = 0, j = 0, R = function(W) {
|
|
1776
1776
|
W = W.target, I[W._pos] = W.result, ++j === C && E(I);
|
|
1777
1777
|
}, L = me(O), U = 0; U < M; ++U) S[U] != null && ((A = P.get(S[U]))._pos = U, A.onsuccess = R, A.onerror = L, ++C);
|
|
@@ -1780,7 +1780,7 @@ var Mr = { exports: {} };
|
|
|
1780
1780
|
}, get: function(v) {
|
|
1781
1781
|
var y = v.trans, S = v.key;
|
|
1782
1782
|
return new Promise(function(E, O) {
|
|
1783
|
-
E =
|
|
1783
|
+
E = ee(E);
|
|
1784
1784
|
var A = y.objectStore(m).get(S);
|
|
1785
1785
|
A.onsuccess = function(P) {
|
|
1786
1786
|
return E(P.target.result);
|
|
@@ -1788,7 +1788,7 @@ var Mr = { exports: {} };
|
|
|
1788
1788
|
});
|
|
1789
1789
|
}, query: (p = g, function(v) {
|
|
1790
1790
|
return new Promise(function(y, S) {
|
|
1791
|
-
y =
|
|
1791
|
+
y = ee(y);
|
|
1792
1792
|
var E, O, A, C = v.trans, P = v.values, M = v.limit, R = v.query, I = M === 1 / 0 ? void 0 : M, j = R.index, R = R.range, C = C.objectStore(m), j = j.isPrimaryKey ? C : C.index(j.name), R = i(R);
|
|
1793
1793
|
if (M === 0) return y({ result: [] });
|
|
1794
1794
|
p ? ((I = P ? j.getAll(R, I) : j.getAllKeys(R, I)).onsuccess = function(L) {
|
|
@@ -1801,15 +1801,15 @@ var Mr = { exports: {} };
|
|
|
1801
1801
|
}), openCursor: function(v) {
|
|
1802
1802
|
var y = v.trans, S = v.values, E = v.query, O = v.reverse, A = v.unique;
|
|
1803
1803
|
return new Promise(function(P, M) {
|
|
1804
|
-
P =
|
|
1804
|
+
P = ee(P);
|
|
1805
1805
|
var j = E.index, I = E.range, C = y.objectStore(m), C = j.isPrimaryKey ? C : C.index(j.name), j = O ? A ? "prevunique" : "prev" : A ? "nextunique" : "next", R = !S && "openKeyCursor" in C ? C.openKeyCursor(i(I), j) : C.openCursor(i(I), j);
|
|
1806
|
-
R.onerror = me(M), R.onsuccess =
|
|
1806
|
+
R.onerror = me(M), R.onsuccess = ee(function(L) {
|
|
1807
1807
|
var U, W, z, fe, F = R.result;
|
|
1808
1808
|
F ? (F.___id = ++ui, F.done = !1, U = F.continue.bind(F), W = (W = F.continuePrimaryKey) && W.bind(F), z = F.advance.bind(F), fe = function() {
|
|
1809
1809
|
throw new Error("Cursor not stopped");
|
|
1810
1810
|
}, F.trans = y, F.stop = F.continue = F.continuePrimaryKey = F.advance = function() {
|
|
1811
1811
|
throw new Error("Cursor not started");
|
|
1812
|
-
}, F.fail =
|
|
1812
|
+
}, F.fail = ee(M), F.next = function() {
|
|
1813
1813
|
var se = this, ce = 1;
|
|
1814
1814
|
return this.start(function() {
|
|
1815
1815
|
return ce-- ? se.continue() : se.stop();
|
|
@@ -1828,11 +1828,11 @@ var Mr = { exports: {} };
|
|
|
1828
1828
|
}, F.stop();
|
|
1829
1829
|
}
|
|
1830
1830
|
var Jt = new Promise(function(ue, ze) {
|
|
1831
|
-
ue =
|
|
1831
|
+
ue = ee(ue), R.onerror = me(ze), F.fail = ze, F.stop = function(Gn) {
|
|
1832
1832
|
F.stop = F.continue = F.continuePrimaryKey = F.advance = fe, ue(Gn);
|
|
1833
1833
|
};
|
|
1834
1834
|
});
|
|
1835
|
-
return R.onsuccess =
|
|
1835
|
+
return R.onsuccess = ee(function(ue) {
|
|
1836
1836
|
R.onsuccess = ce, ce();
|
|
1837
1837
|
}), F.continue = U, F.continuePrimaryKey = W, F.advance = z, ce(), Jt;
|
|
1838
1838
|
}, P(F)) : P(null);
|
|
@@ -1842,7 +1842,7 @@ var Mr = { exports: {} };
|
|
|
1842
1842
|
var y = v.query, S = v.trans, E = y.index, O = y.range;
|
|
1843
1843
|
return new Promise(function(A, P) {
|
|
1844
1844
|
var M = S.objectStore(m), I = E.isPrimaryKey ? M : M.index(E.name), M = i(O), I = M ? I.count(M) : I.count();
|
|
1845
|
-
I.onsuccess =
|
|
1845
|
+
I.onsuccess = ee(function(C) {
|
|
1846
1846
|
return A(C.target.result);
|
|
1847
1847
|
}), I.onerror = me(P);
|
|
1848
1848
|
});
|
|
@@ -2155,7 +2155,7 @@ var Mr = { exports: {} };
|
|
|
2155
2155
|
return T(t).forEach(function(n) {
|
|
2156
2156
|
e[n] ? vt(e[n], t[n]) : e[n] = function i(o) {
|
|
2157
2157
|
var a, c, u = {};
|
|
2158
|
-
for (a in o)
|
|
2158
|
+
for (a in o) q(o, a) && (c = o[a], u[a] = !c || typeof c != "object" || Xn.has(c.constructor) ? c : i(c));
|
|
2159
2159
|
return u;
|
|
2160
2160
|
}(t[n]);
|
|
2161
2161
|
}), e;
|
|
@@ -2165,7 +2165,7 @@ var Mr = { exports: {} };
|
|
|
2165
2165
|
return t[n] && vr(t[n], e[n]);
|
|
2166
2166
|
});
|
|
2167
2167
|
}
|
|
2168
|
-
|
|
2168
|
+
pe(ae.prototype, ((he = { add: function(e) {
|
|
2169
2169
|
return vt(this, e), this;
|
|
2170
2170
|
}, addKey: function(e) {
|
|
2171
2171
|
return bt(this, e, e), this;
|
|
@@ -2228,12 +2228,12 @@ var Mr = { exports: {} };
|
|
|
2228
2228
|
if (c(), !n) throw new $.MissingAPI();
|
|
2229
2229
|
var m = e.name, v = t.autoSchema || !o ? n.open(m) : n.open(m, o);
|
|
2230
2230
|
if (!v) throw new $.MissingAPI();
|
|
2231
|
-
v.onerror = me(p), v.onblocked =
|
|
2231
|
+
v.onerror = me(p), v.onblocked = ee(e._fireOnBlocked), v.onupgradeneeded = ee(function(y) {
|
|
2232
2232
|
var S;
|
|
2233
|
-
b = v.transaction, t.autoSchema && !e._options.allowEmptyDB ? (v.onerror = pt, b.abort(), v.result.close(), (S = n.deleteDatabase(m)).onsuccess = S.onerror =
|
|
2233
|
+
b = v.transaction, t.autoSchema && !e._options.allowEmptyDB ? (v.onerror = pt, b.abort(), v.result.close(), (S = n.deleteDatabase(m)).onsuccess = S.onerror = ee(function() {
|
|
2234
2234
|
p(new $.NoSuchDatabase("Database ".concat(m, " doesnt exist")));
|
|
2235
2235
|
})) : (b.onerror = me(p), y = y.oldVersion > Math.pow(2, 62) ? 0 : y.oldVersion, f = y < 1, e.idbdb = v.result, a && pi(e, b), hi(e, y / 10, b, p));
|
|
2236
|
-
}, p), v.onsuccess =
|
|
2236
|
+
}, p), v.onsuccess = ee(function() {
|
|
2237
2237
|
b = null;
|
|
2238
2238
|
var y, S, E, O, A, P = e.idbdb = v.result, M = St(P.objectStoreNames);
|
|
2239
2239
|
if (0 < M.length) try {
|
|
@@ -2245,9 +2245,9 @@ var Mr = { exports: {} };
|
|
|
2245
2245
|
Bt(e, I);
|
|
2246
2246
|
} catch {
|
|
2247
2247
|
}
|
|
2248
|
-
et.push(e), P.onversionchange =
|
|
2248
|
+
et.push(e), P.onversionchange = ee(function(C) {
|
|
2249
2249
|
t.vcFired = !0, e.on("versionchange").fire(C);
|
|
2250
|
-
}), P.onclose =
|
|
2250
|
+
}), P.onclose = ee(function(C) {
|
|
2251
2251
|
e.on("close").fire(C);
|
|
2252
2252
|
}), f && (A = e._deps, I = m, P = A.indexedDB, A = A.IDBKeyRange, kn(P) || I === Mt || An(P, A).put({ name: I }).catch(X)), w();
|
|
2253
2253
|
}, p);
|
|
@@ -2369,9 +2369,9 @@ var Mr = { exports: {} };
|
|
|
2369
2369
|
function jn(e, t, n, i) {
|
|
2370
2370
|
return n = n || {}, i = i || "", T(e).forEach(function(o) {
|
|
2371
2371
|
var a, c, u;
|
|
2372
|
-
|
|
2372
|
+
q(t, o) ? (a = e[o], c = t[o], typeof a == "object" && typeof c == "object" && a && c ? (u = en(a)) !== en(c) ? n[i + o] = t[o] : u === "Object" ? jn(a, c, n, i + o + ".") : a !== c && (n[i + o] = t[o]) : a !== c && (n[i + o] = t[o])) : n[i + o] = void 0;
|
|
2373
2373
|
}), T(t).forEach(function(o) {
|
|
2374
|
-
|
|
2374
|
+
q(e, o) || (n[i + o] = t[o]);
|
|
2375
2375
|
}), n;
|
|
2376
2376
|
}
|
|
2377
2377
|
function Kn(e, t) {
|
|
@@ -2419,7 +2419,7 @@ var Mr = { exports: {} };
|
|
|
2419
2419
|
var E = y.map(function(O, A) {
|
|
2420
2420
|
var P, M, I, C = S[A], j = { onerror: null, onsuccess: null };
|
|
2421
2421
|
return f.type === "delete" ? u.fire.call(j, O, C, v) : f.type === "add" || C === void 0 ? (P = h.fire.call(j, O, f.values[A], v), O == null && P != null && (f.keys[A] = O = P, i.outbound || le(f.values[A], i.keyPath, O))) : (P = jn(C, f.values[A]), (M = g.fire.call(j, P, O, C, v)) && (I = f.values[A], Object.keys(M).forEach(function(R) {
|
|
2422
|
-
|
|
2422
|
+
q(I, R) ? I[R] = M[R] : le(I, R, M[R]);
|
|
2423
2423
|
}))), j;
|
|
2424
2424
|
});
|
|
2425
2425
|
return n.mutate(f).then(function(O) {
|
|
@@ -2814,7 +2814,7 @@ var Mr = { exports: {} };
|
|
|
2814
2814
|
function c() {
|
|
2815
2815
|
t.close(e);
|
|
2816
2816
|
var u = t._deps.indexedDB.deleteDatabase(t.name);
|
|
2817
|
-
u.onsuccess =
|
|
2817
|
+
u.onsuccess = ee(function() {
|
|
2818
2818
|
var h, g, b;
|
|
2819
2819
|
h = t._deps, g = t.name, b = h.indexedDB, h = h.IDBKeyRange, kn(b) || g === Mt || An(b, h).delete(g).catch(X), o();
|
|
2820
2820
|
}), u.onerror = me(a), u.onblocked = t._fireOnBlocked;
|
|
@@ -2909,7 +2909,7 @@ var Mr = { exports: {} };
|
|
|
2909
2909
|
return i._whenReady(h);
|
|
2910
2910
|
}) : this._whenReady(h);
|
|
2911
2911
|
}, ne.prototype.table = function(e) {
|
|
2912
|
-
if (!
|
|
2912
|
+
if (!q(this._allTables, e)) throw new $.InvalidTable("Table ".concat(e, " does not exist"));
|
|
2913
2913
|
return this._allTables[e];
|
|
2914
2914
|
}, ne);
|
|
2915
2915
|
function ne(e, t) {
|
|
@@ -3030,7 +3030,7 @@ var Mr = { exports: {} };
|
|
|
3030
3030
|
}
|
|
3031
3031
|
}(y = { subscr: v, signal: c.signal, requery: w, querier: e, trans: null }), Promise.resolve(S).then(function(E) {
|
|
3032
3032
|
n = !0, t = E, u || y.signal.aborted || (h = {}, function(O) {
|
|
3033
|
-
for (var A in O) if (
|
|
3033
|
+
for (var A in O) if (q(O, A)) return;
|
|
3034
3034
|
return 1;
|
|
3035
3035
|
}(g = v) || f || (Re(gt, p), f = !0), hn(function() {
|
|
3036
3036
|
return !u && o.next && o.next(E);
|
|
@@ -3058,7 +3058,7 @@ var Mr = { exports: {} };
|
|
|
3058
3058
|
Me = t;
|
|
3059
3059
|
}
|
|
3060
3060
|
}
|
|
3061
|
-
|
|
3061
|
+
pe(We, l(l({}, Ot), { delete: function(e) {
|
|
3062
3062
|
return new We(e, { addons: [] }).delete();
|
|
3063
3063
|
}, exists: function(e) {
|
|
3064
3064
|
return new We(e, { addons: [] }).open().then(function(t) {
|
|
@@ -3109,7 +3109,7 @@ var Mr = { exports: {} };
|
|
|
3109
3109
|
return ye;
|
|
3110
3110
|
}, set: function(e) {
|
|
3111
3111
|
Zn(e);
|
|
3112
|
-
} }, derive: Ye, extend: Q, props:
|
|
3112
|
+
} }, derive: Ye, extend: Q, props: pe, override: zn, Events: dt, on: Re, liveQuery: Pr, extendObservabilitySet: zt, getByKeyPath: we, setByKeyPath: le, delByKeyPath: function(e, t) {
|
|
3113
3113
|
typeof t == "string" ? le(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
|
|
3114
3114
|
le(e, n, void 0);
|
|
3115
3115
|
});
|
|
@@ -3240,11 +3240,11 @@ class jr {
|
|
|
3240
3240
|
return { data: null, message: "No Messages error", success: !1 };
|
|
3241
3241
|
let Q = B.map((V) => this.db.table(K.MESSAGES).get({ id: V.message_id }));
|
|
3242
3242
|
return qt.Promise.all(Q).then(async (V) => {
|
|
3243
|
-
const
|
|
3243
|
+
const ve = V.map((pe) => pe.data), q = {
|
|
3244
3244
|
data: {
|
|
3245
3245
|
presentation: (r == null ? void 0 : r.presentation) || "not set",
|
|
3246
3246
|
slide: (r == null ? void 0 : r.slide) || "not set",
|
|
3247
|
-
messages:
|
|
3247
|
+
messages: ve,
|
|
3248
3248
|
dashboard: r.dashboard,
|
|
3249
3249
|
widget: r.widget,
|
|
3250
3250
|
query: r
|
|
@@ -3257,8 +3257,8 @@ class jr {
|
|
|
3257
3257
|
_.STORAGE,
|
|
3258
3258
|
_.NONE,
|
|
3259
3259
|
_.MESSAGES,
|
|
3260
|
-
|
|
3261
|
-
),
|
|
3260
|
+
q
|
|
3261
|
+
), q;
|
|
3262
3262
|
});
|
|
3263
3263
|
} catch (T) {
|
|
3264
3264
|
return console.warn(
|
|
@@ -3305,7 +3305,7 @@ class jr {
|
|
|
3305
3305
|
const l = s.data.title;
|
|
3306
3306
|
let x = 0;
|
|
3307
3307
|
return s.data.messages.forEach(async (D) => {
|
|
3308
|
-
var T, B, Q, V,
|
|
3308
|
+
var T, B, Q, V, ve, q, pe;
|
|
3309
3309
|
D.id !== null && (await this.db.table(K.MESSAGES).put({
|
|
3310
3310
|
id: D.id,
|
|
3311
3311
|
utc: D.utc,
|
|
@@ -3327,8 +3327,8 @@ class jr {
|
|
|
3327
3327
|
dashboard_id: r.dashboard,
|
|
3328
3328
|
engagement: ((T = D.topics[0]) == null ? void 0 : T.engagement) || ((B = D.dynamics) == null ? void 0 : B.engagement) || 0,
|
|
3329
3329
|
impressions: ((Q = D.topics[0]) == null ? void 0 : Q.impressions) || ((V = D.dynamics) == null ? void 0 : V.semrush_visits) || 0,
|
|
3330
|
-
reach: ((
|
|
3331
|
-
sentiment: ((
|
|
3330
|
+
reach: ((ve = D.topics[0]) == null ? void 0 : ve.reach) || ((q = D.dynamics) == null ? void 0 : q.potential_reach) || 0,
|
|
3331
|
+
sentiment: ((pe = D.topics[0]) == null ? void 0 : pe.sentiment) || 0,
|
|
3332
3332
|
utc: D.utc,
|
|
3333
3333
|
expires: D.expires
|
|
3334
3334
|
}).catch((He) => {
|
|
@@ -4253,14 +4253,14 @@ class ro {
|
|
|
4253
4253
|
return 400;
|
|
4254
4254
|
if (B.success === !0) {
|
|
4255
4255
|
const Q = this.sm.subscribers.filter(
|
|
4256
|
-
(
|
|
4256
|
+
(q) => q.widget === B.query.widget
|
|
4257
4257
|
)[0];
|
|
4258
|
-
let V = "",
|
|
4258
|
+
let V = "", ve;
|
|
4259
4259
|
switch (B.query.type) {
|
|
4260
4260
|
case K.MESSAGES:
|
|
4261
|
-
if (
|
|
4262
|
-
(
|
|
4263
|
-
), B.data.messages =
|
|
4261
|
+
if (ve = B.data.messages.filter(
|
|
4262
|
+
(q) => q.id !== null
|
|
4263
|
+
), B.data.messages = ve, V = Fn(B.data.messages), Q.hash === V)
|
|
4264
4264
|
return console.debug(
|
|
4265
4265
|
"%capi%c %cno updates",
|
|
4266
4266
|
_.API,
|
|
@@ -4315,7 +4315,7 @@ class ro {
|
|
|
4315
4315
|
_.BROADCAST,
|
|
4316
4316
|
B.query.slide,
|
|
4317
4317
|
B.data.title ?? B.query.widget
|
|
4318
|
-
), B = await this.sm.getMessages(B.query), this.bc.postMessage({ event: re.WIDGET_UPDATE, data: B });
|
|
4318
|
+
), B = await this.sm.getMessages(B.query), this.bc.postMessage({ event: re.WIDGET_UPDATE, data: B.data });
|
|
4319
4319
|
break;
|
|
4320
4320
|
case 400:
|
|
4321
4321
|
console.warn(
|
|
@@ -4427,19 +4427,19 @@ class ro {
|
|
|
4427
4427
|
), this.bc.onmessage = (l) => {
|
|
4428
4428
|
this.actions(l);
|
|
4429
4429
|
}, this.bc.postMessage({ event: re.STORAGE_INIT, data: {} }), this.api = new Di(r), r.storage) {
|
|
4430
|
-
case
|
|
4430
|
+
case ge.DEXIE:
|
|
4431
4431
|
this.sm = new jr(r);
|
|
4432
4432
|
break;
|
|
4433
|
-
case
|
|
4433
|
+
case ge.LOCAL:
|
|
4434
4434
|
this.sm = new Lr(r);
|
|
4435
4435
|
break;
|
|
4436
|
-
case
|
|
4436
|
+
case ge.SESSION:
|
|
4437
4437
|
this.sm = new Br(r);
|
|
4438
4438
|
break;
|
|
4439
|
-
case
|
|
4439
|
+
case ge.KEYVAL:
|
|
4440
4440
|
this.sm = new Nr(r);
|
|
4441
4441
|
break;
|
|
4442
|
-
case
|
|
4442
|
+
case ge.WINDOW:
|
|
4443
4443
|
this.sm = new Gr(r);
|
|
4444
4444
|
break;
|
|
4445
4445
|
}
|
|
@@ -4512,19 +4512,19 @@ class Bi {
|
|
|
4512
4512
|
}) : await ((s = this.sm) == null ? void 0 : s.getSeries(r));
|
|
4513
4513
|
});
|
|
4514
4514
|
switch (this.sm = null, r.storage) {
|
|
4515
|
-
case
|
|
4515
|
+
case ge.DEXIE:
|
|
4516
4516
|
this.sm = new jr(r);
|
|
4517
4517
|
break;
|
|
4518
|
-
case
|
|
4518
|
+
case ge.LOCAL:
|
|
4519
4519
|
this.sm = new Lr(r);
|
|
4520
4520
|
break;
|
|
4521
|
-
case
|
|
4521
|
+
case ge.SESSION:
|
|
4522
4522
|
this.sm = new Br(r);
|
|
4523
4523
|
break;
|
|
4524
|
-
case
|
|
4524
|
+
case ge.KEYVAL:
|
|
4525
4525
|
this.sm = new Nr(r);
|
|
4526
4526
|
break;
|
|
4527
|
-
case
|
|
4527
|
+
case ge.WINDOW:
|
|
4528
4528
|
this.sm = new Gr(r);
|
|
4529
4529
|
break;
|
|
4530
4530
|
}
|
|
@@ -4710,7 +4710,7 @@ export {
|
|
|
4710
4710
|
_ as CSS,
|
|
4711
4711
|
re as EVENTS,
|
|
4712
4712
|
Zt as MODERATION,
|
|
4713
|
-
|
|
4713
|
+
ge as STORAGE,
|
|
4714
4714
|
io as Widget,
|
|
4715
4715
|
Gi as anonymize,
|
|
4716
4716
|
$i as attachedMedia,
|