buzzcasting-storage 1.0.6 → 1.0.7

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.
@@ -75,7 +75,7 @@ const $e = Object.getPrototypeOf, dr = {}.hasOwnProperty;
75
75
  function H(t, e) {
76
76
  return dr.call(t, e);
77
77
  }
78
- function Oe(t, e) {
78
+ function Ce(t, e) {
79
79
  typeof e == "function" && (e = e($e(t))), (typeof Reflect > "u" ? R : Reflect.ownKeys)(e).forEach((n) => {
80
80
  te(t, n, e[n]);
81
81
  });
@@ -84,9 +84,9 @@ const Kn = Object.defineProperty;
84
84
  function te(t, e, n, r) {
85
85
  Kn(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
86
  }
87
- function Se(t) {
87
+ function Ee(t) {
88
88
  return { from: function(e) {
89
- return t.prototype = Object.create(e.prototype), te(t.prototype, "constructor", t), { extend: Oe.bind(null, t.prototype) };
89
+ return t.prototype = Object.create(e.prototype), te(t.prototype, "constructor", t), { extend: Ce.bind(null, t.prototype) };
90
90
  } };
91
91
  }
92
92
  const fr = Object.getOwnPropertyDescriptor;
@@ -198,13 +198,13 @@ const Bt = typeof Symbol < "u" ? Symbol.iterator : "@@iterator", br = typeof Bt
198
198
  return t != null && (e = t[Bt]) && e.apply(t);
199
199
  } : function() {
200
200
  return null;
201
- }, xe = {};
201
+ }, Se = {};
202
202
  function q(t) {
203
203
  var e, n, r, s;
204
204
  if (arguments.length === 1) {
205
205
  if (L(t))
206
206
  return t.slice();
207
- if (this === xe && typeof t == "string")
207
+ if (this === Se && typeof t == "string")
208
208
  return [t];
209
209
  if (s = br(t)) {
210
210
  for (n = []; !(r = s.next()).done; )
@@ -231,10 +231,10 @@ function Rn(t, e) {
231
231
  }
232
232
  var Fn = () => !0;
233
233
  const vr = !new Error("").stack;
234
- function be() {
234
+ function ve() {
235
235
  if (vr)
236
236
  try {
237
- throw be.arguments, new Error();
237
+ throw ve.arguments, new Error();
238
238
  } catch (t) {
239
239
  return t;
240
240
  }
@@ -248,33 +248,33 @@ function Tt(t, e) {
248
248
  ` + r).join("")) : "";
249
249
  }
250
250
  var Nn = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"], an = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(Nn), wr = { VersionChanged: "Database version changed by other database connection", DatabaseClosed: "Database has been closed", Abort: "Transaction aborted", TransactionInactive: "Transaction has already completed or failed", MissingAPI: "IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb" };
251
- function Ee(t, e) {
252
- this._e = be(), this.name = t, this.message = e;
251
+ function Pe(t, e) {
252
+ this._e = ve(), this.name = t, this.message = e;
253
253
  }
254
254
  function $n(t, e) {
255
255
  return t + ". Errors: " + Object.keys(e).map((n) => e[n].toString()).filter((n, r, s) => s.indexOf(n) === r).join(`
256
256
  `);
257
257
  }
258
258
  function dt(t, e, n, r) {
259
- this._e = be(), this.failures = e, this.failedKeys = r, this.successCount = n, this.message = $n(t, e);
259
+ this._e = ve(), this.failures = e, this.failedKeys = r, this.successCount = n, this.message = $n(t, e);
260
260
  }
261
261
  function Te(t, e) {
262
- this._e = be(), this.name = "BulkError", this.failures = Object.keys(e).map((n) => e[n]), this.failuresByPos = e, this.message = $n(t, e);
262
+ this._e = ve(), this.name = "BulkError", this.failures = Object.keys(e).map((n) => e[n]), this.failuresByPos = e, this.message = $n(t, e);
263
263
  }
264
- Se(Ee).from(Error).extend({ stack: { get: function() {
264
+ Ee(Pe).from(Error).extend({ stack: { get: function() {
265
265
  return this._stack || (this._stack = this.name + ": " + this.message + Tt(this._e, 2));
266
266
  } }, toString: function() {
267
267
  return this.name + ": " + this.message;
268
- } }), Se(dt).from(Ee), Se(Te).from(Ee);
268
+ } }), Ee(dt).from(Pe), Ee(Te).from(Pe);
269
269
  var cn = an.reduce((t, e) => (t[e] = e + "Error", t), {});
270
- const _r = Ee;
270
+ const _r = Pe;
271
271
  var C = an.reduce((t, e) => {
272
272
  var n = e + "Error";
273
273
  function r(s, i) {
274
- this._e = be(), this.name = n, s ? typeof s == "string" ? (this.message = `${s}${i ? `
274
+ this._e = ve(), this.name = n, s ? typeof s == "string" ? (this.message = `${s}${i ? `
275
275
  ` + i : ""}`, this.inner = i || null) : typeof s == "object" && (this.message = `${s.name} ${s.message}`, this.inner = s) : (this.message = wr[e] || n, this.inner = null);
276
276
  }
277
- return Se(r).from(_r), t[e] = r, t;
277
+ return Ee(r).from(_r), t[e] = r, t;
278
278
  }, {});
279
279
  C.Syntax = SyntaxError, C.Type = TypeError, C.Range = RangeError;
280
280
  var bn = Nn.reduce((t, e) => (t[e + "Error"] = C[e], t), {}), st = an.reduce((t, e) => (["Syntax", "Type", "Range"].indexOf(e) === -1 && (t[e + "Error"] = C[e]), t), {});
@@ -338,7 +338,7 @@ function ln(t, e) {
338
338
  return e.apply(this, arguments);
339
339
  };
340
340
  }
341
- st.ModifyError = dt, st.DexieError = Ee, st.BulkError = Te;
341
+ st.ModifyError = dt, st.DexieError = Pe, st.BulkError = Te;
342
342
  var Ue = {};
343
343
  const Ln = 100, [Mt, ft, Rt] = typeof Promise > "u" ? [] : (() => {
344
344
  let t = Promise.resolve();
@@ -358,20 +358,20 @@ var Ft = !1, Or = Rt ? () => {
358
358
  setTimeout(Xe, 0);
359
359
  }, Me = function(t, e) {
360
360
  Be.push([t, e]), pt && (Or(), pt = !1);
361
- }, Nt = !0, pt = !0, fe = [], ot = [], $t = null, Lt = Le, Pe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: _n, pgp: !1, env: {}, finalize: function() {
361
+ }, Nt = !0, pt = !0, fe = [], ot = [], $t = null, Lt = Le, Oe = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: _n, pgp: !1, env: {}, finalize: function() {
362
362
  this.unhandleds.forEach((t) => {
363
363
  try {
364
364
  _n(t[0], t[1]);
365
365
  } catch {
366
366
  }
367
367
  });
368
- } }, O = Pe, Be = [], pe = 0, at = [];
368
+ } }, O = Oe, Be = [], pe = 0, at = [];
369
369
  function E(t) {
370
370
  if (typeof this != "object")
371
371
  throw new TypeError("Promises must be constructed via new");
372
372
  this._listeners = [], this.onuncatched = A, this._lib = !1;
373
373
  var e = this._PSD = O;
374
- if (J && (this._stackHolder = be(), this._prev = null, this._numPrev = 0), typeof t != "function") {
374
+ if (J && (this._stackHolder = ve(), this._prev = null, this._numPrev = 0), typeof t != "function") {
375
375
  if (t !== Ue)
376
376
  throw new TypeError("Not a function");
377
377
  return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && Wt(this, this._value));
@@ -520,7 +520,7 @@ function I(t, e) {
520
520
  }
521
521
  };
522
522
  }
523
- Oe(E.prototype, { then: Ut, _then: function(t, e) {
523
+ Ce(E.prototype, { then: Ut, _then: function(t, e) {
524
524
  hn(this, new Wn(null, null, t, e, O));
525
525
  }, catch: function(t) {
526
526
  if (arguments.length === 1)
@@ -545,7 +545,7 @@ From previous: `);
545
545
  var s = setTimeout(() => r(new C.Timeout(e)), t);
546
546
  this.then(n, r).finally(clearTimeout.bind(null, s));
547
547
  }) : this;
548
- } }), typeof Symbol < "u" && Symbol.toStringTag && te(E.prototype, Symbol.toStringTag, "Dexie.Promise"), Pe.env = Yn(), Oe(E, { all: function() {
548
+ } }), typeof Symbol < "u" && Symbol.toStringTag && te(E.prototype, Symbol.toStringTag, "Dexie.Promise"), Oe.env = Yn(), Ce(E, { all: function() {
549
549
  var t = q.apply(null, arguments).map(qe);
550
550
  return new E(function(e, n) {
551
551
  t.length === 0 && e([]);
@@ -610,7 +610,7 @@ var jr = 0, ct = [], kt = 0, mt = 0, Kr = 0;
610
610
  function ae(t, e, n, r) {
611
611
  var s = O, i = Object.create(s);
612
612
  i.parent = s, i.ref = 0, i.global = !1, i.id = ++Kr;
613
- var o = Pe.env;
613
+ var o = Oe.env;
614
614
  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
615
  --this.parent.ref || this.parent.finalize();
616
616
  };
@@ -635,8 +635,8 @@ function Dr() {
635
635
  }
636
636
  function ce(t, e) {
637
637
  var n = O;
638
- if ((e ? !$.echoes || kt++ && t === O : !kt || --kt && t === O) || Qn(e ? Ar.bind(null, t) : Dr), t !== O && (O = t, n === Pe && (Pe.env = Yn()), un)) {
639
- var r = Pe.env.Promise, s = t.env;
638
+ if ((e ? !$.echoes || kt++ && t === O : !kt || --kt && t === O) || Qn(e ? Ar.bind(null, t) : Dr), t !== O && (O = t, n === Oe && (Oe.env = Yn()), un)) {
639
+ var r = Oe.env.Promise, s = t.env;
640
640
  ft.then = s.nthen, r.prototype.then = s.gthen, (n.global || t.global) && (Object.defineProperty(D, "Promise", s.PromiseProp), r.all = s.all, r.race = s.race, r.resolve = s.resolve, r.reject = s.reject, s.allSettled && (r.allSettled = s.allSettled), s.any && (r.any = s.any));
641
641
  }
642
642
  }
@@ -966,9 +966,9 @@ function Fe(t) {
966
966
  }
967
967
  }
968
968
  function De(t, e) {
969
- return Se(e).from({ prototype: t }), e;
969
+ return Ee(e).from({ prototype: t }), e;
970
970
  }
971
- function _e(t, e) {
971
+ function ke(t, e) {
972
972
  return !(t.filter || t.algorithm || t.or) && (e ? t.justLimit : !t.replayFilter);
973
973
  }
974
974
  function Et(t, e) {
@@ -1092,7 +1092,7 @@ class Mr {
1092
1092
  count(e) {
1093
1093
  return this._read((n) => {
1094
1094
  const r = this._ctx, s = r.table.core;
1095
- if (_e(r, !0))
1095
+ if (ke(r, !0))
1096
1096
  return s.count({ trans: n, query: { index: lt(r, s.schema), range: r.range } }).then((o) => Math.min(o, r.limit));
1097
1097
  var i = 0;
1098
1098
  return tt(r, () => (++i, !1), n, s).then(() => i);
@@ -1115,7 +1115,7 @@ class Mr {
1115
1115
  toArray(e) {
1116
1116
  return this._read((n) => {
1117
1117
  var r = this._ctx;
1118
- if (r.dir === "next" && _e(r, !0) && r.limit > 0) {
1118
+ if (r.dir === "next" && ke(r, !0) && r.limit > 0) {
1119
1119
  const { valueMapper: s } = r, i = lt(r, r.table.core.schema);
1120
1120
  return r.table.core.query({ trans: n, limit: r.limit, values: !0, query: { index: i, range: r.range } }).then(({ result: o }) => s ? o.map(s) : o);
1121
1121
  }
@@ -1127,7 +1127,7 @@ class Mr {
1127
1127
  }
1128
1128
  offset(e) {
1129
1129
  var n = this._ctx;
1130
- return e <= 0 || (n.offset += e, _e(n) ? Pt(n, () => {
1130
+ return e <= 0 || (n.offset += e, ke(n) ? Pt(n, () => {
1131
1131
  var r = e;
1132
1132
  return (s, i) => r === 0 || (r === 1 ? (--r, !1) : (i(() => {
1133
1133
  s.advance(r), r = 0;
@@ -1203,7 +1203,7 @@ class Mr {
1203
1203
  }
1204
1204
  primaryKeys(e) {
1205
1205
  var n = this._ctx;
1206
- if (n.dir === "next" && _e(n, !0) && n.limit > 0)
1206
+ if (n.dir === "next" && ke(n, !0) && n.limit > 0)
1207
1207
  return this._read((s) => {
1208
1208
  var i = lt(n, n.table.core.schema);
1209
1209
  return n.table.core.query({ trans: s, values: !1, limit: n.limit, query: { index: i, range: n.range } });
@@ -1270,7 +1270,7 @@ class Mr {
1270
1270
  const T = w[_], K = { value: He(T), primKey: y[m + _] };
1271
1271
  s.call(K, K.value, K) !== !1 && (K.value == null ? v.push(y[m + _]) : c || W(l(T), l(K.value)) === 0 ? (P.push(K.value), c && x.push(y[m + _])) : (v.push(y[m + _]), S.push(K.value)));
1272
1272
  }
1273
- const j = _e(n) && n.limit === 1 / 0 && (typeof e != "function" || e === Ot) && { index: n.index, range: n.range };
1273
+ const j = ke(n) && n.limit === 1 / 0 && (typeof e != "function" || e === Ot) && { index: n.index, range: n.range };
1274
1274
  return Promise.resolve(S.length > 0 && a.mutate({ trans: r, type: "add", values: S }).then((_) => {
1275
1275
  for (let T in _.failures)
1276
1276
  v.splice(parseInt(T), 1);
@@ -1288,7 +1288,7 @@ class Mr {
1288
1288
  }
1289
1289
  delete() {
1290
1290
  var e = this._ctx, n = e.range;
1291
- return _e(e) && (e.isPrimKey && !Br || n.type === 3) ? this._write((r) => {
1291
+ return ke(e) && (e.isPrimKey && !Br || n.type === 3) ? this._write((r) => {
1292
1292
  const { primaryKey: s } = e.table.core.schema, i = n;
1293
1293
  return e.table.core.count({ trans: r, query: { index: s, range: i } }).then((o) => e.table.core.mutate({ trans: r, type: "deleteRange", range: i }).then(({ failures: a, lastResult: c, results: l, numFailures: u }) => {
1294
1294
  if (u)
@@ -1309,7 +1309,7 @@ function G(t, e, n) {
1309
1309
  var r = t instanceof er ? new t.Collection(t) : t;
1310
1310
  return r._ctx.error = n ? new n(e) : new TypeError(e), r;
1311
1311
  }
1312
- function ke(t) {
1312
+ function xe(t) {
1313
1313
  return new t.Collection(t, () => qn("")).limit(0);
1314
1314
  }
1315
1315
  function Nr(t, e, n, r, s, i) {
@@ -1377,7 +1377,7 @@ class er {
1377
1377
  between(e, n, r, s) {
1378
1378
  r = r !== !1, s = s === !0;
1379
1379
  try {
1380
- return this._cmp(e, n) > 0 || this._cmp(e, n) === 0 && (r || s) && (!r || !s) ? ke(this) : new this.Collection(this, () => se(e, n, !r, !s));
1380
+ return this._cmp(e, n) > 0 || this._cmp(e, n) === 0 && (r || s) && (!r || !s) ? xe(this) : new this.Collection(this, () => se(e, n, !r, !s));
1381
1381
  } catch {
1382
1382
  return G(this, X);
1383
1383
  }
@@ -1407,15 +1407,15 @@ class er {
1407
1407
  return nt(this, (n, r) => n === r[0], [e], "");
1408
1408
  }
1409
1409
  anyOfIgnoreCase() {
1410
- var e = q.apply(xe, arguments);
1411
- return e.length === 0 ? ke(this) : nt(this, (n, r) => r.indexOf(n) !== -1, e, "");
1410
+ var e = q.apply(Se, arguments);
1411
+ return e.length === 0 ? xe(this) : nt(this, (n, r) => r.indexOf(n) !== -1, e, "");
1412
1412
  }
1413
1413
  startsWithAnyOfIgnoreCase() {
1414
- var e = q.apply(xe, arguments);
1415
- return e.length === 0 ? ke(this) : nt(this, (n, r) => r.some((s) => n.indexOf(s) === 0), e, de);
1414
+ var e = q.apply(Se, arguments);
1415
+ return e.length === 0 ? xe(this) : nt(this, (n, r) => r.some((s) => n.indexOf(s) === 0), e, de);
1416
1416
  }
1417
1417
  anyOf() {
1418
- const e = q.apply(xe, arguments);
1418
+ const e = q.apply(Se, arguments);
1419
1419
  let n = this._cmp;
1420
1420
  try {
1421
1421
  e.sort(n);
@@ -1423,7 +1423,7 @@ class er {
1423
1423
  return G(this, X);
1424
1424
  }
1425
1425
  if (e.length === 0)
1426
- return ke(this);
1426
+ return xe(this);
1427
1427
  const r = new this.Collection(this, () => se(e[0], e[e.length - 1]));
1428
1428
  r._ondirectionchange = (i) => {
1429
1429
  n = i === "next" ? this._ascending : this._descending, e.sort(n);
@@ -1443,7 +1443,7 @@ class er {
1443
1443
  return this.inAnyRange([[Vt, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
1444
1444
  }
1445
1445
  noneOf() {
1446
- const e = q.apply(xe, arguments);
1446
+ const e = q.apply(Se, arguments);
1447
1447
  if (e.length === 0)
1448
1448
  return new this.Collection(this);
1449
1449
  try {
@@ -1457,7 +1457,7 @@ class er {
1457
1457
  inAnyRange(e, n) {
1458
1458
  const r = this._cmp, s = this._ascending, i = this._descending, o = this._min, a = this._max;
1459
1459
  if (e.length === 0)
1460
- return ke(this);
1460
+ return xe(this);
1461
1461
  if (!e.every((f) => f[0] !== void 0 && f[1] !== void 0 && s(f[0], f[1]) <= 0))
1462
1462
  return G(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", C.InvalidArgument);
1463
1463
  const c = !n || n.includeLowers !== !1, l = n && n.includeUppers === !0;
@@ -1498,8 +1498,8 @@ class er {
1498
1498
  }), m;
1499
1499
  }
1500
1500
  startsWithAnyOf() {
1501
- const e = q.apply(xe, arguments);
1502
- return e.every((n) => typeof n == "string") ? e.length === 0 ? ke(this) : this.inAnyRange(e.map((n) => [n, n + de])) : G(this, "startsWithAnyOf() only works with strings");
1501
+ const e = q.apply(Se, arguments);
1502
+ return e.every((n) => typeof n == "string") ? e.length === 0 ? xe(this) : this.inAnyRange(e.map((n) => [n, n + de])) : G(this, "startsWithAnyOf() only works with strings");
1503
1503
  }
1504
1504
  }
1505
1505
  function Q(t) {
@@ -1697,7 +1697,7 @@ function Ur(t, e, n) {
1697
1697
  }
1698
1698
  const K = (U) => {
1699
1699
  const N = U.target.result;
1700
- v.forEach((M, ve) => M.error != null && (j[ve] = M.error)), b({ numFailures: _, failures: j, results: h === "delete" ? p : v.map((M) => M.result), lastResult: N });
1700
+ v.forEach((M, we) => M.error != null && (j[we] = M.error)), b({ numFailures: _, failures: j, results: h === "delete" ? p : v.map((M) => M.result), lastResult: N });
1701
1701
  };
1702
1702
  x.onerror = (U) => {
1703
1703
  T(U), K(U);
@@ -1757,11 +1757,11 @@ function Ur(t, e, n) {
1757
1757
  let M = 1;
1758
1758
  return this.start(() => M-- ? this.continue() : this.stop()).then(() => this);
1759
1759
  }, _.start = (M) => {
1760
- const ve = new Promise((V, ue) => {
1760
+ const we = new Promise((V, ue) => {
1761
1761
  V = I(V), v.onerror = Q(ue), _.fail = ue, _.stop = (Ae) => {
1762
1762
  _.stop = _.continue = _.continuePrimaryKey = _.advance = N, V(Ae);
1763
1763
  };
1764
- }), we = () => {
1764
+ }), _e = () => {
1765
1765
  if (v.result)
1766
1766
  try {
1767
1767
  M();
@@ -1774,8 +1774,8 @@ function Ur(t, e, n) {
1774
1774
  }, _.stop();
1775
1775
  };
1776
1776
  return v.onsuccess = I((V) => {
1777
- v.onsuccess = we, we();
1778
- }), _.continue = T, _.continuePrimaryKey = K, _.advance = U, we(), ve;
1777
+ v.onsuccess = _e, _e();
1778
+ }), _.continue = T, _.continuePrimaryKey = K, _.advance = U, _e(), we;
1779
1779
  }, b(_);
1780
1780
  }, m);
1781
1781
  });
@@ -2012,7 +2012,7 @@ function Hr(t) {
2012
2012
  const e = t._state, { indexedDB: n } = t._deps;
2013
2013
  if (e.isBeingOpened || t.idbdb)
2014
2014
  return e.dbReadyPromise.then(() => e.dbOpenError ? F(e.dbOpenError) : t);
2015
- J && (e.openCanceller._stackHolder = be()), e.isBeingOpened = !0, e.dbOpenError = null, e.openComplete = !1;
2015
+ J && (e.openCanceller._stackHolder = ve()), e.isBeingOpened = !0, e.dbOpenError = null, e.openComplete = !1;
2016
2016
  const r = e.openCanceller;
2017
2017
  function s() {
2018
2018
  if (e.openCanceller !== r)
@@ -2352,7 +2352,7 @@ function Cn(t) {
2352
2352
  function jn({ r: t, l: e }) {
2353
2353
  return (t ? e ? Math.max(t.d, e.d) : t.d : e ? e.d : 0) + 1;
2354
2354
  }
2355
- Oe(Z.prototype, { add(t) {
2355
+ Ce(Z.prototype, { add(t) {
2356
2356
  return bt(this, t), this;
2357
2357
  }, addKey(t) {
2358
2358
  return Ge(this, t, t), this;
@@ -2378,13 +2378,13 @@ const qr = { stack: "dbcore", level: 0, create: (t) => {
2378
2378
  v || f === "add" || m.addKeys(w), (v || S) && function(j, _, T, K) {
2379
2379
  function U(N) {
2380
2380
  const M = j(N.name || "");
2381
- function ve(V) {
2381
+ function we(V) {
2382
2382
  return V != null ? N.extractKey(V) : null;
2383
2383
  }
2384
- const we = (V) => N.multiEntry && L(V) ? V.forEach((ue) => M.addKey(ue)) : M.addKey(V);
2384
+ const _e = (V) => N.multiEntry && L(V) ? V.forEach((ue) => M.addKey(ue)) : M.addKey(V);
2385
2385
  (T || K).forEach((V, ue) => {
2386
- const Ae = T && ve(T[ue]), _t = K && ve(K[ue]);
2387
- W(Ae, _t) !== 0 && (Ae != null && we(Ae), _t != null && we(_t));
2386
+ const Ae = T && we(T[ue]), _t = K && we(K[ue]);
2387
+ W(Ae, _t) !== 0 && (Ae != null && _e(Ae), _t != null && _e(_t));
2388
2388
  });
2389
2389
  }
2390
2390
  _.indexes.forEach(U);
@@ -2717,7 +2717,7 @@ function ut(t) {
2717
2717
  ee = e;
2718
2718
  }
2719
2719
  }
2720
- Oe(he, { ...st, delete: (t) => new he(t, { addons: [] }).delete(), exists: (t) => new he(t, { addons: [] }).open().then((e) => (e.close(), !0)).catch("NoSuchDatabaseError", () => !1), getDatabaseNames(t) {
2720
+ Ce(he, { ...st, delete: (t) => new he(t, { addons: [] }).delete(), exists: (t) => new he(t, { addons: [] }).open().then((e) => (e.close(), !0)).catch("NoSuchDatabaseError", () => !1), getDatabaseNames(t) {
2721
2721
  try {
2722
2722
  return function({ indexedDB: e, IDBKeyRange: n }) {
2723
2723
  return pn(e) ? Promise.resolve(e.databases()).then((r) => r.map((s) => s.name).filter((s) => s !== wt)) : fn(e, n).toCollection().primaryKeys();
@@ -2748,7 +2748,7 @@ Oe(he, { ...st, delete: (t) => new he(t, { addons: [] }).delete(), exists: (t) =
2748
2748
  return O.trans ? O.trans.waitFor(n) : n;
2749
2749
  }, Promise: E, debug: { get: () => J, set: (t) => {
2750
2750
  Rn(t, t === "dexie" ? () => !0 : Xn);
2751
- } }, derive: Se, extend: z, props: Oe, override: An, Events: Fe, on: le, liveQuery: ns, extendObservabilitySet: or, getByKeyPath: ne, setByKeyPath: Y, delByKeyPath: function(t, e) {
2751
+ } }, derive: Ee, extend: z, props: Ce, override: An, Events: Fe, on: le, liveQuery: ns, extendObservabilitySet: or, getByKeyPath: ne, setByKeyPath: Y, delByKeyPath: function(t, e) {
2752
2752
  typeof e == "string" ? Y(t, e, void 0) : "length" in e && [].map.call(e, function(n) {
2753
2753
  Y(t, n, void 0);
2754
2754
  });
@@ -2786,7 +2786,7 @@ if (typeof BroadcastChannel < "u") {
2786
2786
  });
2787
2787
  }
2788
2788
  E.rejectionMapper = function(t, e) {
2789
- if (!t || t instanceof Ee || t instanceof TypeError || t instanceof SyntaxError || !t.name || !bn[t.name])
2789
+ if (!t || t instanceof Pe || t instanceof TypeError || t instanceof SyntaxError || !t.name || !bn[t.name])
2790
2790
  return t;
2791
2791
  var n = new bn[t.name](e || t.message, t);
2792
2792
  return "stack" in t && te(n, "stack", { get: function() {
@@ -2846,7 +2846,7 @@ class rs {
2846
2846
  const r = n.title;
2847
2847
  n.messages.forEach((s) => {
2848
2848
  var i, o, a;
2849
- this.db.table(Ce).put({ id: s.id, utc: s.utc, data: s }), this.db.table(ls).put({
2849
+ this.db.table(be).put({ id: s.id, utc: s.utc, data: s }), this.db.table(ls).put({
2850
2850
  widget_id: e.widget,
2851
2851
  message_id: s.id,
2852
2852
  dashboard_id: e.dashboard,
@@ -2886,7 +2886,7 @@ 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((s) => s.widget == e.widget).length > 0 || (e.type === Ce && (e = Je(this.options, e)), console.log("[storage] subscribe", e), this.subscribers.push(e));
2889
+ this.subscribers.filter((s) => s.widget == e.widget).length > 0 || (e.type === be && (e = Je(this.options, e)), console.log("[storage] subscribe", e), this.subscribers.push(e));
2890
2890
  });
2891
2891
  this.options = e, this.db = new me(e.app), this.db.version(2).stores({
2892
2892
  player: "id,title,name,location",
@@ -2954,16 +2954,14 @@ class is {
2954
2954
  const n = B(e);
2955
2955
  return await Kt(n);
2956
2956
  });
2957
- k(this, "cleanMessages", async (e) => {
2958
- console.log("cleanMessages not implemented for ", this.options.storage);
2959
- });
2957
+ k(this, "cleanMessages", async (e) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((n) => n())));
2960
2958
  k(this, "subscribe", (e) => {
2961
2959
  var r;
2962
2960
  if (e.widget === void 0) {
2963
2961
  const s = (r = e.topics) == null ? void 0 : r.split("-");
2964
2962
  e.dashboard = s ? s[0] : "", e.widget = s ? s[1] : "";
2965
2963
  }
2966
- e.type === "messages" && (e = Je(this.options, e)), !this.subscribers.filter((s) => s.widget == e.widget).length && this.subscribers.push(e);
2964
+ e.type === be && (e = Je(this.options, e)), !this.subscribers.filter((s) => s.widget == e.widget).length && this.subscribers.push(e);
2967
2965
  });
2968
2966
  this.options = e;
2969
2967
  }
@@ -3026,7 +3024,7 @@ class os {
3026
3024
  const s = (r = e.topics) == null ? void 0 : r.split("-");
3027
3025
  e.dashboard = s ? s[0] : "", e.widget = s ? s[1] : "";
3028
3026
  }
3029
- e.type === Ce && (e = Je(this.options, e)), !this.subscribers.filter(
3027
+ e.type === be && (e = Je(this.options, e)), !this.subscribers.filter(
3030
3028
  (s) => s.widget == e.widget
3031
3029
  ).length && this.subscribers.push(e);
3032
3030
  });
@@ -3096,7 +3094,7 @@ class as {
3096
3094
  const s = (r = e.topics) == null ? void 0 : r.split("-");
3097
3095
  e.dashboard = s ? s[0] : "", e.widget = s ? s[1] : "";
3098
3096
  }
3099
- e.type === Ce && (e = Je(this.options, e)), !this.subscribers.filter(
3097
+ e.type === be && (e = Je(this.options, e)), !this.subscribers.filter(
3100
3098
  (s) => s.widget == e.widget
3101
3099
  ).length && this.subscribers.push(e);
3102
3100
  });
@@ -3166,7 +3164,7 @@ class cs {
3166
3164
  const s = (r = e.topics) == null ? void 0 : r.split("-");
3167
3165
  e.dashboard = s ? s[0] : "", e.widget = s ? s[1] : "";
3168
3166
  }
3169
- e.type === Ce && (e = Je(this.options, e)), !this.subscribers.filter((s) => s.widget == e.widget).length && this.subscribers.push(e);
3167
+ e.type === be && (e = Je(this.options, e)), !this.subscribers.filter((s) => s.widget == e.widget).length && this.subscribers.push(e);
3170
3168
  });
3171
3169
  this.options = e, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
3172
3170
  }
@@ -3174,7 +3172,7 @@ class cs {
3174
3172
  return this.subscribers;
3175
3173
  }
3176
3174
  }
3177
- const Ce = "messages", cr = "cloud", rn = "series", ls = "topics", us = "keyval", hs = "local", ds = "session", fs = "dexie", ps = "window";
3175
+ const be = "messages", cr = "cloud", rn = "series", ls = "topics", us = "keyval", hs = "local", ds = "session", fs = "dexie", ps = "window";
3178
3176
  class ys {
3179
3177
  //private options: IStorageManager
3180
3178
  constructor(e) {
@@ -3196,7 +3194,7 @@ class ys {
3196
3194
  if (i.status === "fulfilled") {
3197
3195
  const l = i.value;
3198
3196
  switch (l.query.type) {
3199
- case Ce:
3197
+ case be:
3200
3198
  (o = this.sm) == null || o.setMessages(l.query, l.data);
3201
3199
  break;
3202
3200
  case cr:
@@ -3274,7 +3272,7 @@ class ys {
3274
3272
  }
3275
3273
  export {
3276
3274
  cr as CLOUD,
3277
- Ce as MESSAGES,
3275
+ be as MESSAGES,
3278
3276
  rn as SERIES,
3279
3277
  fs as STORAGE_DEXIE,
3280
3278
  us as STORAGE_KEYVAL,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "mark.tamis@touchflows.com"
6
6
  },
7
7
  "type": "module",
8
- "version": "1.0.6",
8
+ "version": "1.0.7",
9
9
  "private": false,
10
10
  "exports": {
11
11
  ".": {