buzzcasting-storage 2.14.2 → 2.14.3

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.
@@ -1,7 +1,7 @@
1
1
  var xa = Object.defineProperty;
2
2
  var ka = (h, r, c) => r in h ? xa(h, r, { enumerable: !0, configurable: !0, writable: !0, value: c }) : h[r] = c;
3
3
  var A = (h, r, c) => ka(h, typeof r != "symbol" ? r + "" : r, c);
4
- const Aa = "2.14.2";
4
+ const Aa = "2.14.3";
5
5
  class Da {
6
6
  constructor(r) {
7
7
  A(this, "options");
@@ -167,12 +167,12 @@ var jr = { exports: {} };
167
167
  }), e;
168
168
  }
169
169
  typeof Promise > "u" || D.Promise || (D.Promise = Promise);
170
- var te = Object.getPrototypeOf, be = {}.hasOwnProperty;
170
+ var q = Object.getPrototypeOf, be = {}.hasOwnProperty;
171
171
  function ie(e, t) {
172
172
  return be.call(e, t);
173
173
  }
174
174
  function xe(e, t) {
175
- typeof t == "function" && (t = t(te(e))), (typeof Reflect > "u" ? T : Reflect.ownKeys)(t).forEach(function(n) {
175
+ typeof t == "function" && (t = t(q(e))), (typeof Reflect > "u" ? T : Reflect.ownKeys)(t).forEach(function(n) {
176
176
  ke(e, n, t[n]);
177
177
  });
178
178
  }
@@ -251,7 +251,7 @@ var jr = { exports: {} };
251
251
  for (var i = 0, o = n.length; i < o; ++i) a.push(t(n[i]));
252
252
  } else if (Vn.has(n.constructor)) a = n;
253
253
  else {
254
- var s, u = te(n);
254
+ var s, u = q(n);
255
255
  for (s in a = u === Object.prototype ? {} : Object.create(u), at.set(n, a), n) ie(n, s) && (a[s] = t(n[s]));
256
256
  }
257
257
  return a;
@@ -395,9 +395,9 @@ var jr = { exports: {} };
395
395
  }
396
396
  var ot = {}, er = 100, Se = typeof Promise > "u" ? [] : function() {
397
397
  var e = Promise.resolve();
398
- if (typeof crypto > "u" || !crypto.subtle) return [e, te(e), e];
398
+ if (typeof crypto > "u" || !crypto.subtle) return [e, q(e), e];
399
399
  var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
400
- return [t, te(t), e];
400
+ return [t, q(t), e];
401
401
  }(), st = Se[0], fe = Se[1], Se = Se[2], fe = fe && fe.then, ct = st && st.constructor, an = !!Se, ut = function(e, t) {
402
402
  lt.push([e, t]), xt && (queueMicrotask(ta), xt = !1);
403
403
  }, on = !0, xt = !0, Ne = [], kt = [], sn = it, Ae = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: Q, pgp: !1, env: {}, finalize: Q }, L = Ae, lt = [], Be = 0, At = [];
@@ -646,7 +646,7 @@ var jr = { exports: {} };
646
646
  return re.echoes && e && e.constructor === ct ? (Je(), e.then(function(t) {
647
647
  return Pe(), t;
648
648
  }, function(t) {
649
- return Pe(), q(t);
649
+ return Pe(), ee(t);
650
650
  })) : e;
651
651
  }
652
652
  function aa() {
@@ -686,7 +686,7 @@ var jr = { exports: {} };
686
686
  Promise === ct && re.echoes === 0 ? It === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
687
687
  }
688
688
  ("" + fe).indexOf("[native code]") === -1 && (Je = Pe = Q);
689
- var q = N.reject, Ge = "￿", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", Ze = [], Tt = "__dbnames", hn = "readonly", pn = "readwrite";
689
+ var ee = N.reject, Ge = "￿", _e = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", Ze = [], Tt = "__dbnames", hn = "readonly", pn = "readwrite";
690
690
  function $e(e, t) {
691
691
  return e ? t ? function() {
692
692
  return e.apply(this, arguments) && t.apply(this, arguments);
@@ -755,7 +755,7 @@ var jr = { exports: {} };
755
755
  } catch (w) {
756
756
  return w.name === nn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
757
757
  return f(b, d, v, p);
758
- })) : q(w);
758
+ })) : ee(w);
759
759
  }
760
760
  return m._promise(d, function(w, y) {
761
761
  return De(function() {
@@ -771,9 +771,9 @@ var jr = { exports: {} };
771
771
  });
772
772
  });
773
773
  }
774
- if (b._state.openComplete) return q(new G.DatabaseClosed(b._state.dbOpenError));
774
+ if (b._state.openComplete) return ee(new G.DatabaseClosed(b._state.dbOpenError));
775
775
  if (!b._state.isBeingOpened) {
776
- if (!b._state.autoOpen) return q(new G.DatabaseClosed());
776
+ if (!b._state.autoOpen) return ee(new G.DatabaseClosed());
777
777
  b.open().catch(Q);
778
778
  }
779
779
  return b._state.dbReadyPromise.then(function() {
@@ -781,14 +781,14 @@ var jr = { exports: {} };
781
781
  });
782
782
  }(this.db, e, [this.name], s);
783
783
  return o && (g._consoleTask = o, g = g.catch(function(f) {
784
- return console.trace(f), q(f);
784
+ return console.trace(f), ee(f);
785
785
  })), g;
786
786
  } finally {
787
787
  u && Ve();
788
788
  }
789
789
  }, V.prototype.get = function(e, t) {
790
790
  var n = this;
791
- return e && e.constructor === Object ? this.where(e).first(t) : e == null ? q(new G.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(a) {
791
+ return e && e.constructor === Object ? this.where(e).first(t) : e == null ? ee(new G.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(a) {
792
792
  return n.core.get({ trans: a, key: e }).then(function(i) {
793
793
  return n.hook.reading.fire(i);
794
794
  });
@@ -865,7 +865,7 @@ var jr = { exports: {} };
865
865
  }, enumerable: !1, configurable: !0 }), i.prototype.table = function() {
866
866
  return a;
867
867
  }, e = i);
868
- for (var o = /* @__PURE__ */ new Set(), s = e.prototype; s; s = te(s)) Object.getOwnPropertyNames(s).forEach(function(g) {
868
+ for (var o = /* @__PURE__ */ new Set(), s = e.prototype; s; s = q(s)) Object.getOwnPropertyNames(s).forEach(function(g) {
869
869
  return o.add(g);
870
870
  });
871
871
  function u(g) {
@@ -896,7 +896,7 @@ var jr = { exports: {} };
896
896
  return u;
897
897
  });
898
898
  }, V.prototype.update = function(e, t) {
899
- return typeof e != "object" || B(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? q(new G.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
899
+ return typeof e != "object" || B(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? ee(new G.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
900
900
  }, V.prototype.put = function(e, t) {
901
901
  var n = this, a = this.schema.primKey, i = a.auto, o = a.keyPath, s = e;
902
902
  return o && i && (s = jt(o)(e)), this._trans("readwrite", function(u) {
@@ -1139,10 +1139,10 @@ var jr = { exports: {} };
1139
1139
  }
1140
1140
  var ia = (Y.prototype._read = function(e, t) {
1141
1141
  var n = this._ctx;
1142
- return n.error ? n.table._trans(null, q.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
1142
+ return n.error ? n.table._trans(null, ee.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
1143
1143
  }, Y.prototype._write = function(e) {
1144
1144
  var t = this._ctx;
1145
- return t.error ? t.table._trans(null, q.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
1145
+ return t.error ? t.table._trans(null, ee.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
1146
1146
  }, Y.prototype._addAlgorithm = function(e) {
1147
1147
  var t = this._ctx;
1148
1148
  t.algorithm = $e(t.algorithm, e);
@@ -1626,8 +1626,8 @@ var jr = { exports: {} };
1626
1626
  }), this;
1627
1627
  }, me.prototype._promise = function(e, t, n) {
1628
1628
  var a = this;
1629
- if (e === "readwrite" && this.mode !== "readwrite") return q(new G.ReadOnly("Transaction is readonly"));
1630
- if (!this.active) return q(new G.TransactionInactive());
1629
+ if (e === "readwrite" && this.mode !== "readwrite") return ee(new G.ReadOnly("Transaction is readonly"));
1630
+ if (!this.active) return ee(new G.TransactionInactive());
1631
1631
  if (this._locked()) return new N(function(o, s) {
1632
1632
  a._blockedFuncs.push([function() {
1633
1633
  a._promise(e, t, n).then(o, s);
@@ -1883,7 +1883,7 @@ var jr = { exports: {} };
1883
1883
  var o = a[i];
1884
1884
  t.forEach(function(s) {
1885
1885
  var u = function g(f, b) {
1886
- return Fr(f, b) || (f = te(f)) && g(f, b);
1886
+ return Fr(f, b) || (f = q(f)) && g(f, b);
1887
1887
  }(s, i);
1888
1888
  (!u || "value" in u && u.value === void 0) && (s === e.Transaction.prototype || s instanceof e.Transaction ? ke(s, i, { get: function() {
1889
1889
  return this.table(i);
@@ -2211,7 +2211,7 @@ var jr = { exports: {} };
2211
2211
  function ya(e) {
2212
2212
  var t = e._state, n = e._deps.indexedDB;
2213
2213
  if (t.isBeingOpened || e.idbdb) return t.dbReadyPromise.then(function() {
2214
- return t.dbOpenError ? q(t.dbOpenError) : e;
2214
+ return t.dbOpenError ? ee(t.dbOpenError) : e;
2215
2215
  });
2216
2216
  t.isBeingOpened = !0, t.dbOpenError = null, t.openComplete = !1;
2217
2217
  var a = t.openCanceller, i = Math.round(10 * e.verno), o = !1;
@@ -2284,7 +2284,7 @@ var jr = { exports: {} };
2284
2284
  b && b.abort();
2285
2285
  } catch {
2286
2286
  }
2287
- return a === t.openCanceller && e._close(), q(v);
2287
+ return a === t.openCanceller && e._close(), ee(v);
2288
2288
  }).finally(function() {
2289
2289
  t.openComplete = !0, f();
2290
2290
  }).then(function() {
@@ -2746,7 +2746,7 @@ var jr = { exports: {} };
2746
2746
  return a === "db" ? t : Reflect.get(n, a, i);
2747
2747
  } });
2748
2748
  }
2749
- var Ee = (ee.prototype.version = function(e) {
2749
+ var Ee = (te.prototype.version = function(e) {
2750
2750
  if (isNaN(e) || e < 0.1) throw new G.Type("Given version is not a positive number");
2751
2751
  if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened) throw new G.Schema("Cannot add version when database is open");
2752
2752
  this.verno = Math.max(this.verno, e);
@@ -2754,7 +2754,7 @@ var jr = { exports: {} };
2754
2754
  return a._cfg.version === e;
2755
2755
  })[0];
2756
2756
  return n || (n = new this.Version(e), t.push(n), t.sort(fa), n.stores({}), this._state.autoSchema = !1, n);
2757
- }, ee.prototype._whenReady = function(e) {
2757
+ }, te.prototype._whenReady = function(e) {
2758
2758
  var t = this;
2759
2759
  return this.idbdb && (this._state.openComplete || L.letThrough || this._vip) ? e() : new N(function(n, a) {
2760
2760
  if (t._state.openComplete) return a(new G.DatabaseClosed(t._state.dbOpenError));
@@ -2764,22 +2764,22 @@ var jr = { exports: {} };
2764
2764
  }
2765
2765
  t._state.dbReadyPromise.then(n, a);
2766
2766
  }).then(e);
2767
- }, ee.prototype.use = function(e) {
2767
+ }, te.prototype.use = function(e) {
2768
2768
  var t = e.stack, n = e.create, a = e.level, i = e.name;
2769
2769
  return i && this.unuse({ stack: t, name: i }), e = this._middlewares[t] || (this._middlewares[t] = []), e.push({ stack: t, create: n, level: a ?? 10, name: i }), e.sort(function(o, s) {
2770
2770
  return o.level - s.level;
2771
2771
  }), this;
2772
- }, ee.prototype.unuse = function(e) {
2772
+ }, te.prototype.unuse = function(e) {
2773
2773
  var t = e.stack, n = e.name, a = e.create;
2774
2774
  return t && this._middlewares[t] && (this._middlewares[t] = this._middlewares[t].filter(function(i) {
2775
2775
  return a ? i.create !== a : !!n && i.name !== n;
2776
2776
  })), this;
2777
- }, ee.prototype.open = function() {
2777
+ }, te.prototype.open = function() {
2778
2778
  var e = this;
2779
2779
  return Le(Ae, function() {
2780
2780
  return ya(e);
2781
2781
  });
2782
- }, ee.prototype._close = function() {
2782
+ }, te.prototype._close = function() {
2783
2783
  var e = this._state, t = Ze.indexOf(this);
2784
2784
  if (0 <= t && Ze.splice(t, 1), this.idbdb) {
2785
2785
  try {
@@ -2793,10 +2793,10 @@ var jr = { exports: {} };
2793
2793
  }), e.openCanceller = new N(function(n, a) {
2794
2794
  e.cancelOpen = a;
2795
2795
  }));
2796
- }, ee.prototype.close = function(n) {
2796
+ }, te.prototype.close = function(n) {
2797
2797
  var t = (n === void 0 ? { disableAutoOpen: !0 } : n).disableAutoOpen, n = this._state;
2798
2798
  t ? (n.isBeingOpened && n.cancelOpen(new G.DatabaseClosed()), this._close(), n.autoOpen = !1, n.dbOpenError = new G.DatabaseClosed()) : (this._close(), n.autoOpen = this._options.autoOpen || n.isBeingOpened, n.openComplete = !1, n.dbOpenError = null);
2799
- }, ee.prototype.delete = function(e) {
2799
+ }, te.prototype.delete = function(e) {
2800
2800
  var t = this;
2801
2801
  e === void 0 && (e = { disableAutoOpen: !0 });
2802
2802
  var n = 0 < arguments.length && typeof arguments[0] != "object", a = this._state;
@@ -2812,23 +2812,23 @@ var jr = { exports: {} };
2812
2812
  if (n) throw new G.InvalidArgument("Invalid closeOptions argument to db.delete()");
2813
2813
  a.isBeingOpened ? a.dbReadyPromise.then(s) : s();
2814
2814
  });
2815
- }, ee.prototype.backendDB = function() {
2815
+ }, te.prototype.backendDB = function() {
2816
2816
  return this.idbdb;
2817
- }, ee.prototype.isOpen = function() {
2817
+ }, te.prototype.isOpen = function() {
2818
2818
  return this.idbdb !== null;
2819
- }, ee.prototype.hasBeenClosed = function() {
2819
+ }, te.prototype.hasBeenClosed = function() {
2820
2820
  var e = this._state.dbOpenError;
2821
2821
  return e && e.name === "DatabaseClosed";
2822
- }, ee.prototype.hasFailed = function() {
2822
+ }, te.prototype.hasFailed = function() {
2823
2823
  return this._state.dbOpenError !== null;
2824
- }, ee.prototype.dynamicallyOpened = function() {
2824
+ }, te.prototype.dynamicallyOpened = function() {
2825
2825
  return this._state.autoSchema;
2826
- }, Object.defineProperty(ee.prototype, "tables", { get: function() {
2826
+ }, Object.defineProperty(te.prototype, "tables", { get: function() {
2827
2827
  var e = this;
2828
2828
  return T(this._allTables).map(function(t) {
2829
2829
  return e._allTables[t];
2830
2830
  });
2831
- }, enumerable: !1, configurable: !0 }), ee.prototype.transaction = function() {
2831
+ }, enumerable: !1, configurable: !0 }), te.prototype.transaction = function() {
2832
2832
  var e = (function(t, n, a) {
2833
2833
  var i = arguments.length;
2834
2834
  if (i < 2) throw new G.InvalidArgument("Too few arguments");
@@ -2836,7 +2836,7 @@ var jr = { exports: {} };
2836
2836
  return a = o.pop(), [t, Xn(o), a];
2837
2837
  }).apply(this, arguments);
2838
2838
  return this._transaction.apply(this, e);
2839
- }, ee.prototype._transaction = function(e, t, n) {
2839
+ }, te.prototype._transaction = function(e, t, n) {
2840
2840
  var a = this, i = L.trans;
2841
2841
  i && i.db === this && e.indexOf("!") === -1 || (i = null);
2842
2842
  var o, s, u = e.indexOf("?") !== -1;
@@ -2865,7 +2865,7 @@ var jr = { exports: {} };
2865
2865
  } catch (f) {
2866
2866
  return i ? i._promise(null, function(b, d) {
2867
2867
  d(f);
2868
- }) : q(f);
2868
+ }) : ee(f);
2869
2869
  }
2870
2870
  var g = (function f(b, d, v, p, m) {
2871
2871
  return N.resolve().then(function() {
@@ -2876,14 +2876,14 @@ var jr = { exports: {} };
2876
2876
  } catch (O) {
2877
2877
  return O.name === nn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
2878
2878
  return f(b, d, v, null, m);
2879
- })) : q(O);
2879
+ })) : ee(O);
2880
2880
  }
2881
2881
  var _, E = tn(m);
2882
2882
  return E && Je(), w = N.follow(function() {
2883
2883
  var O;
2884
2884
  (_ = m.call(y, y)) && (E ? (O = Pe.bind(null, null), _.then(O, O)) : typeof _.next == "function" && typeof _.throw == "function" && (_ = Tn(_)));
2885
2885
  }, w), (_ && typeof _.then == "function" ? N.resolve(_).then(function(O) {
2886
- return y.active ? O : q(new G.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
2886
+ return y.active ? O : ee(new G.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
2887
2887
  }) : w.then(function() {
2888
2888
  return _;
2889
2889
  })).then(function(O) {
@@ -2891,22 +2891,22 @@ var jr = { exports: {} };
2891
2891
  return O;
2892
2892
  });
2893
2893
  }).catch(function(O) {
2894
- return y._reject(O), q(O);
2894
+ return y._reject(O), ee(O);
2895
2895
  });
2896
2896
  });
2897
2897
  }).bind(null, this, o, s, i, n);
2898
2898
  return i ? i._promise(o, g, "lock") : L.trans ? Le(L.transless, function() {
2899
2899
  return a._whenReady(g);
2900
2900
  }) : this._whenReady(g);
2901
- }, ee.prototype.table = function(e) {
2901
+ }, te.prototype.table = function(e) {
2902
2902
  if (!ie(this._allTables, e)) throw new G.InvalidTable("Table ".concat(e, " does not exist"));
2903
2903
  return this._allTables[e];
2904
- }, ee);
2905
- function ee(e, t) {
2904
+ }, te);
2905
+ function te(e, t) {
2906
2906
  var n = this;
2907
2907
  this._middlewares = {}, this.verno = 0;
2908
- var a = ee.dependencies;
2909
- this._options = t = l({ addons: ee.addons, autoOpen: !0, indexedDB: a.indexedDB, IDBKeyRange: a.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, a = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
2908
+ var a = te.dependencies;
2909
+ this._options = t = l({ addons: te.addons, autoOpen: !0, indexedDB: a.indexedDB, IDBKeyRange: a.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, a = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
2910
2910
  var i, o, s, u, g, f = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: Q, dbReadyPromise: null, cancelOpen: Q, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
2911
2911
  f.dbReadyPromise = new N(function(d) {
2912
2912
  f.dbReadyResolve = d;
@@ -2914,7 +2914,7 @@ var jr = { exports: {} };
2914
2914
  f.cancelOpen = v;
2915
2915
  }), this._state = f, this.name = e, this.on = dt(this, "populate", "blocked", "versionchange", "close", { ready: [rn, Q] }), this.on.ready.subscribe = Hn(this.on.ready.subscribe, function(d) {
2916
2916
  return function(v, p) {
2917
- ee.vip(function() {
2917
+ te.vip(function() {
2918
2918
  var m, w = n._state;
2919
2919
  w.openComplete ? (w.dbOpenError || N.resolve().then(v), p && d(v)) : w.onReadyBeingFired ? (w.onReadyBeingFired.push(v), p && d(v)) : (d(v), m = n, p || d(function y() {
2920
2920
  m.on.ready.unsubscribe(v), m.on.ready.unsubscribe(y);
@@ -2941,7 +2941,7 @@ var jr = { exports: {} };
2941
2941
  y.active = !1, y.on.complete.fire();
2942
2942
  }, function(_) {
2943
2943
  var E = y.active;
2944
- return y.active = !1, y.on.error.fire(_), y.parent ? y.parent._reject(_) : E && y.idbtrans && y.idbtrans.abort(), q(_);
2944
+ return y.active = !1, y.on.error.fire(_), y.parent ? y.parent._reject(_) : E && y.idbtrans && y.idbtrans.abort(), ee(_);
2945
2945
  });
2946
2946
  })), this.Version = (u = this, ft(ga.prototype, function(d) {
2947
2947
  this.db = u, this._cfg = { version: d, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
@@ -3066,7 +3066,7 @@ var jr = { exports: {} };
3066
3066
  });
3067
3067
  }) : xn(n, t).toCollection().primaryKeys()).then(e);
3068
3068
  } catch {
3069
- return q(new G.MissingAPI());
3069
+ return ee(new G.MissingAPI());
3070
3070
  }
3071
3071
  var t, n;
3072
3072
  }, defineClass: function() {
@@ -3081,7 +3081,7 @@ var jr = { exports: {} };
3081
3081
  var t = Tn(e.apply(this, arguments));
3082
3082
  return t && typeof t.then == "function" ? t : N.resolve(t);
3083
3083
  } catch (n) {
3084
- return q(n);
3084
+ return ee(n);
3085
3085
  }
3086
3086
  };
3087
3087
  }, spawn: function(e, t, n) {
@@ -3089,7 +3089,7 @@ var jr = { exports: {} };
3089
3089
  var a = Tn(e.apply(n, t || []));
3090
3090
  return a && typeof a.then == "function" ? a : N.resolve(a);
3091
3091
  } catch (i) {
3092
- return q(i);
3092
+ return ee(i);
3093
3093
  }
3094
3094
  }, currentTransaction: { get: function() {
3095
3095
  return L.trans || null;
@@ -3238,14 +3238,14 @@ class Mr {
3238
3238
  return { data: null, message: "No Messages error", success: !1 };
3239
3239
  const T = D[0] ? D[0].title : "No title", B = D.map(
3240
3240
  (be) => be.message_id
3241
- ), te = (await this.db.table(K.MESSAGES).where("id").anyOf(B).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
3241
+ ), q = (await this.db.table(K.MESSAGES).where("id").anyOf(B).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
3242
3242
  (be) => be.data
3243
3243
  );
3244
3244
  return {
3245
3245
  data: {
3246
3246
  presentation: (r == null ? void 0 : r.presentation) || "not set",
3247
3247
  slide: (r == null ? void 0 : r.slide) || "not set",
3248
- messages: te,
3248
+ messages: q,
3249
3249
  title: T,
3250
3250
  topics: [r.dashboard, r.widget].join("-"),
3251
3251
  query: r
@@ -3295,7 +3295,15 @@ class Mr {
3295
3295
  let k = 0;
3296
3296
  return c.data.messages.forEach(async (D) => {
3297
3297
  var T, B, J;
3298
- await this.db.table(K.MESSAGES).put({ id: D.id, utc: D.utc, data: D }), await this.db.table(K.TOPICS).put({
3298
+ await this.db.table(K.MESSAGES).put({ id: D.id, utc: D.utc, data: D }).catch((q) => {
3299
+ k++, console.error(
3300
+ "%cstorage",
3301
+ S.STORAGE,
3302
+ "set message",
3303
+ D,
3304
+ q
3305
+ );
3306
+ }), await this.db.table(K.TOPICS).put({
3299
3307
  widget_id: r.widget,
3300
3308
  message_id: D.id,
3301
3309
  dashboard_id: r.dashboard,
@@ -3305,8 +3313,8 @@ class Mr {
3305
3313
  reach: (J = D.dynamics) == null ? void 0 : J.potential_reach,
3306
3314
  sentiment: D.topics[0].sentiment,
3307
3315
  utc: D.utc
3308
- }).catch((te) => {
3309
- k++, console.error("%cstorage", S.STORAGE, "set", r, te);
3316
+ }).catch((q) => {
3317
+ k++, console.error("%cstorage", S.STORAGE, "set topic", D, q);
3310
3318
  });
3311
3319
  }), k === 0 ? 201 : 400;
3312
3320
  });
@@ -4171,10 +4179,10 @@ class Ja {
4171
4179
  const J = this.sm.subscribers.filter(
4172
4180
  (be) => be.widget === B.query.widget
4173
4181
  )[0];
4174
- let te = "";
4182
+ let q = "";
4175
4183
  switch (B.query.type) {
4176
4184
  case K.MESSAGES:
4177
- if (te = $n(B.data.messages), J.hash === te)
4185
+ if (q = $n(B.data.messages), J.hash === q)
4178
4186
  return console.debug(
4179
4187
  "%capi%c %cno updates",
4180
4188
  S.API,
@@ -4184,10 +4192,10 @@ class Ja {
4184
4192
  B.query.slide,
4185
4193
  B.query.widget
4186
4194
  ), 204;
4187
- J.hash = te, T = await this.sm.setMessages(B.query, B);
4195
+ J.hash = q, T = await this.sm.setMessages(B.query, B);
4188
4196
  break;
4189
4197
  case K.CLOUD:
4190
- te = $n(B.data), J.hash === te ? (console.debug(
4198
+ q = $n(B.data), J.hash === q ? (console.debug(
4191
4199
  "%capi%c %cno updates",
4192
4200
  S.API,
4193
4201
  S.NONE,
@@ -4195,10 +4203,10 @@ class Ja {
4195
4203
  K.CLOUD,
4196
4204
  B.query.slide,
4197
4205
  B.query.widget
4198
- ), T = 204) : (J.hash = te, T = await this.sm.setCloud(B.query, B));
4206
+ ), T = 204) : (J.hash = q, T = await this.sm.setCloud(B.query, B));
4199
4207
  break;
4200
4208
  case K.SERIES:
4201
- te = $n(B.data), J.hash === te ? (console.debug(
4209
+ q = $n(B.data), J.hash === q ? (console.debug(
4202
4210
  "%capi%c %cno updates",
4203
4211
  S.API,
4204
4212
  S.NONE,
@@ -4206,7 +4214,7 @@ class Ja {
4206
4214
  K.SERIES,
4207
4215
  B.query.slide,
4208
4216
  B.query.widget
4209
- ), T = 204) : (J.hash = te, T = await this.sm.setSeries(B.query, B));
4217
+ ), T = 204) : (J.hash = q, T = await this.sm.setSeries(B.query, B));
4210
4218
  break;
4211
4219
  default:
4212
4220
  console.warn(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-storage",
3
3
  "type": "module",
4
- "version": "2.14.2",
4
+ "version": "2.14.3",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",