buzzcasting-storage 3.0.7 → 3.0.9

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,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 || {}), 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.6";
4
+ var N = /* @__PURE__ */ ((d) => (d.MESSAGES = "messages", d.CLOUD = "cloud", d.SERIES = "series", d.TOPICS = "topics", d.WIDGET = "widget", d.WIDGETS = "widgets", d.SLIDE = "slide", d))(N || {}), w = /* @__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))(w || {}), 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.8";
6
6
  class Di {
7
7
  constructor(r) {
8
8
  k(this, "options");
@@ -35,30 +35,28 @@ class Di {
35
35
  const { version: s } = this.options, l = this.headers(), x = Object.assign({}, r);
36
36
  delete x.slide, delete x.type, delete x.hash, delete x.order, delete x.period;
37
37
  const D = Object.keys(x).length > 0 ? `?${new URLSearchParams(x).toString()}` : "";
38
- return console.debug(
38
+ return console.info(
39
39
  "%capi%c %cfetch",
40
- _.API,
41
- _.NONE,
42
- _.GET_DATA,
43
- r.slide,
44
- r.widget,
45
- x
46
- ), await fetch(
40
+ w.API,
41
+ w.NONE,
42
+ w.GET_DATA,
43
+ r.widget
44
+ ), console.debug("%capi%c %cfetch", w.API, w.NONE, w.GET_DATA, x), await fetch(
47
45
  [this.url, "api", s, r.type].join("/") + D,
48
46
  { ...l, method: "get" }
49
- ).then(async (T) => {
50
- if (!T.ok)
51
- throw new Error(`${T.status}`);
52
- return T;
53
- }).then((T) => T.json()).then((T) => (T.query = r, T)).catch((T) => ({ success: !1, message: `${T}`, data: null }));
47
+ ).then(async (j) => {
48
+ if (!j.ok)
49
+ throw new Error(`${j.status}`);
50
+ return j;
51
+ }).then((j) => j.json()).then((j) => (j.query = r, j)).catch((j) => ({ success: !1, message: `${j}`, data: null }));
54
52
  }
55
53
  async hideMessage(r) {
56
54
  const { version: s } = this.options, l = this.headers(), x = "?action=visible";
57
55
  return console.info(
58
56
  "%capi%c %cput",
59
- _.API,
60
- _.NONE,
61
- _.GET_DATA,
57
+ w.API,
58
+ w.NONE,
59
+ w.GET_DATA,
62
60
  re.HIDE_MESSAGE,
63
61
  r.widget,
64
62
  r.id
@@ -73,32 +71,32 @@ class Di {
73
71
  }
74
72
  async hideLabels(r) {
75
73
  const { version: s } = this.options, l = this.formHeaders(), x = new URLSearchParams(), D = r.labels || [];
76
- for (const [T, B] of D.entries())
77
- x.append(`custom_filters[${T}]`, B);
74
+ for (const [j, P] of D.entries())
75
+ x.append(`custom_filters[${j}]`, P);
78
76
  return console.info(
79
77
  "%capi%c %cput",
80
- _.API,
81
- _.NONE,
82
- _.GET_DATA,
78
+ w.API,
79
+ w.NONE,
80
+ w.GET_DATA,
83
81
  re.HIDE_LABELS,
84
82
  r.widget,
85
83
  D
86
84
  ), await fetch(
87
85
  [this.url, "api", s, r.type, r.widget].join("/"),
88
86
  { ...l, body: x, method: "put" }
89
- ).then((T) => {
90
- if (!T.ok)
91
- throw new Error(T.statusText);
92
- return T;
93
- }).then((T) => T.json()).catch((T) => ({ succes: !1, message: T, data: [] }));
87
+ ).then((j) => {
88
+ if (!j.ok)
89
+ throw new Error(j.statusText);
90
+ return j;
91
+ }).then((j) => j.json()).catch((j) => ({ succes: !1, message: j, data: [] }));
94
92
  }
95
93
  async loadSlide(r) {
96
94
  const { version: s } = this.options, l = this.headers(), x = Object.assign({}, r);
97
95
  return delete x.slide, delete x.type, delete x.hash, console.debug(
98
- "%capi%c %cget",
99
- _.API,
100
- _.NONE,
101
- _.SLIDE,
96
+ "%capi%c %cloadSlide",
97
+ w.API,
98
+ w.NONE,
99
+ w.SLIDE,
102
100
  re.SLIDE_LOAD,
103
101
  r.slide
104
102
  ), await fetch(
@@ -123,9 +121,9 @@ class Di {
123
121
  const x = JSON.stringify(r);
124
122
  return console.info(
125
123
  "%capi%c %cput",
126
- _.API,
127
- _.NONE,
128
- _.SLIDE,
124
+ w.API,
125
+ w.NONE,
126
+ w.SLIDE,
129
127
  re.SLIDE_STORE,
130
128
  r.id
131
129
  ), await fetch(
@@ -142,7 +140,7 @@ var Cr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
142
140
  function Pi(d) {
143
141
  return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
144
142
  }
145
- var Mr = { exports: {} };
143
+ var Tr = { exports: {} };
146
144
  (function(d, r) {
147
145
  (function(s, l) {
148
146
  d.exports = l();
@@ -163,25 +161,25 @@ var Mr = { exports: {} };
163
161
  for (var i, o = 0, a = t.length; o < a; o++) !i && o in t || ((i = i || Array.prototype.slice.call(t, 0, o))[o] = t[o]);
164
162
  return e.concat(i || Array.prototype.slice.call(t));
165
163
  }
166
- var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Cr, T = Object.keys, B = Array.isArray;
167
- function Q(e, t) {
168
- return typeof t != "object" || T(t).forEach(function(n) {
164
+ var D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Cr, j = Object.keys, P = Array.isArray;
165
+ function Y(e, t) {
166
+ return typeof t != "object" || j(t).forEach(function(n) {
169
167
  e[n] = t[n];
170
168
  }), e;
171
169
  }
172
170
  typeof Promise > "u" || D.Promise || (D.Promise = Promise);
173
- var V = Object.getPrototypeOf, ve = {}.hasOwnProperty;
174
- function q(e, t) {
171
+ var Z = Object.getPrototypeOf, ve = {}.hasOwnProperty;
172
+ function X(e, t) {
175
173
  return ve.call(e, t);
176
174
  }
177
175
  function pe(e, t) {
178
- typeof t == "function" && (t = t(V(e))), (typeof Reflect > "u" ? T : Reflect.ownKeys)(t).forEach(function(n) {
176
+ typeof t == "function" && (t = t(Z(e))), (typeof Reflect > "u" ? j : Reflect.ownKeys)(t).forEach(function(n) {
179
177
  Ae(e, n, t[n]);
180
178
  });
181
179
  }
182
180
  var He = Object.defineProperty;
183
181
  function Ae(e, t, n, i) {
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));
182
+ He(e, t, Y(n && X(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, i));
185
183
  }
186
184
  function Ye(e) {
187
185
  return { from: function(t) {
@@ -202,7 +200,7 @@ var Mr = { exports: {} };
202
200
  D.setImmediate ? setImmediate(e) : setTimeout(e, 0);
203
201
  }
204
202
  function we(e, t) {
205
- if (typeof t == "string" && q(e, t)) return e[t];
203
+ if (typeof t == "string" && X(e, t)) return e[t];
206
204
  if (!t) return e;
207
205
  if (typeof t != "string") {
208
206
  for (var n = [], i = 0, o = t.length; i < o; ++i) {
@@ -223,12 +221,12 @@ var Mr = { exports: {} };
223
221
  for (var i = 0, o = t.length; i < o; ++i) le(e, t[i], n[i]);
224
222
  } else {
225
223
  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]) || !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;
224
+ u !== -1 ? (a = t.substr(0, u), (c = t.substr(u + 1)) === "" ? n === void 0 ? P(e) && !isNaN(parseInt(a)) ? e.splice(a, 1) : delete e[a] : e[a] = n : le(u = !(u = e[a]) || !X(e, a) ? e[a] = {} : u, c, n)) : n === void 0 ? P(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
227
225
  }
228
226
  }
229
227
  function Yn(e) {
230
228
  var t, n = {};
231
- for (t in e) q(e, t) && (n[t] = e[t]);
229
+ for (t in e) X(e, t) && (n[t] = e[t]);
232
230
  return n;
233
231
  }
234
232
  var Wr = [].concat;
@@ -244,18 +242,18 @@ var Mr = { exports: {} };
244
242
  }), Xn = new Set(Ee.map(function(e) {
245
243
  return D[e];
246
244
  })), ot = null;
247
- function Te(e) {
245
+ function Me(e) {
248
246
  return ot = /* @__PURE__ */ new WeakMap(), e = function t(n) {
249
247
  if (!n || typeof n != "object") return n;
250
248
  var i = ot.get(n);
251
249
  if (i) return i;
252
- if (B(n)) {
250
+ if (P(n)) {
253
251
  i = [], ot.set(n, i);
254
252
  for (var o = 0, a = n.length; o < a; ++o) i.push(t(n[o]));
255
253
  } else if (Xn.has(n.constructor)) i = n;
256
254
  else {
257
- var c, u = V(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]));
255
+ var c, u = Z(n);
256
+ for (c in i = u === Object.prototype ? {} : Object.create(u), ot.set(n, i), n) X(n, c) && (i[c] = t(n[c]));
259
257
  }
260
258
  return i;
261
259
  }(e), ot = null, e;
@@ -277,7 +275,7 @@ var Mr = { exports: {} };
277
275
  function _e(e) {
278
276
  var t, n, i, o;
279
277
  if (arguments.length === 1) {
280
- if (B(e)) return e.slice();
278
+ if (P(e)) return e.slice();
281
279
  if (this === Qe && typeof e == "string") return [e];
282
280
  if (o = Hr(e)) {
283
281
  for (n = []; !(i = o.next()).done; ) n.push(i.value);
@@ -334,7 +332,7 @@ var Mr = { exports: {} };
334
332
  }, {}), Ot = he.reduce(function(e, t) {
335
333
  return ["Syntax", "Type", "Range"].indexOf(t) === -1 && (e[t + "Error"] = $[t]), e;
336
334
  }, {});
337
- function X() {
335
+ function J() {
338
336
  }
339
337
  function at(e) {
340
338
  return e;
@@ -350,7 +348,7 @@ var Mr = { exports: {} };
350
348
  };
351
349
  }
352
350
  function Jr(e, t) {
353
- return e === X ? t : function() {
351
+ return e === J ? t : function() {
354
352
  var n = e.apply(this, arguments);
355
353
  n !== void 0 && (arguments[0] = n);
356
354
  var i = this.onsuccess, o = this.onerror;
@@ -360,27 +358,27 @@ var Mr = { exports: {} };
360
358
  };
361
359
  }
362
360
  function Vr(e, t) {
363
- return e === X ? t : function() {
361
+ return e === J ? t : function() {
364
362
  e.apply(this, arguments);
365
363
  var n = this.onsuccess, i = this.onerror;
366
364
  this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? Ke(n, this.onsuccess) : n), i && (this.onerror = this.onerror ? Ke(i, this.onerror) : i);
367
365
  };
368
366
  }
369
367
  function Zr(e, t) {
370
- return e === X ? t : function(n) {
368
+ return e === J ? t : function(n) {
371
369
  var i = e.apply(this, arguments);
372
- Q(n, i);
370
+ Y(n, i);
373
371
  var o = this.onsuccess, a = this.onerror;
374
- return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), o && (this.onsuccess = this.onsuccess ? Ke(o, this.onsuccess) : o), a && (this.onerror = this.onerror ? Ke(a, this.onerror) : a), i === void 0 ? n === void 0 ? void 0 : n : Q(i, n);
372
+ return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), o && (this.onsuccess = this.onsuccess ? Ke(o, this.onsuccess) : o), a && (this.onerror = this.onerror ? Ke(a, this.onerror) : a), i === void 0 ? n === void 0 ? void 0 : n : Y(i, n);
375
373
  };
376
374
  }
377
375
  function qr(e, t) {
378
- return e === X ? t : function() {
376
+ return e === J ? t : function() {
379
377
  return t.apply(this, arguments) !== !1 && e.apply(this, arguments);
380
378
  };
381
379
  }
382
380
  function on(e, t) {
383
- return e === X ? t : function() {
381
+ return e === J ? t : function() {
384
382
  var n = e.apply(this, arguments);
385
383
  if (n && typeof n.then == "function") {
386
384
  for (var i = this, o = arguments.length, a = new Array(o); o--; ) a[o] = arguments[o];
@@ -398,13 +396,13 @@ var Mr = { exports: {} };
398
396
  }
399
397
  var st = {}, qn = 100, Ee = typeof Promise > "u" ? [] : function() {
400
398
  var e = Promise.resolve();
401
- if (typeof crypto > "u" || !crypto.subtle) return [e, V(e), e];
399
+ if (typeof crypto > "u" || !crypto.subtle) return [e, Z(e), e];
402
400
  var t = crypto.subtle.digest("SHA-512", new Uint8Array([0]));
403
- return [t, V(t), e];
401
+ return [t, Z(t), e];
404
402
  }(), ct = Ee[0], he = Ee[1], Ee = Ee[2], he = he && he.then, Ne = ct && ct.constructor, an = !!Ee, ut = function(e, t) {
405
403
  lt.push([e, t]), xt && (queueMicrotask(ti), xt = !1);
406
- }, sn = !0, xt = !0, Be = [], At = [], cn = at, ke = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: X, pgp: !1, env: {}, finalize: X }, G = ke, lt = [], Le = 0, kt = [];
407
- function N(e) {
404
+ }, sn = !0, xt = !0, Be = [], At = [], cn = at, ke = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: J, pgp: !1, env: {}, finalize: J }, G = ke, lt = [], Le = 0, kt = [];
405
+ function B(e) {
408
406
  if (typeof this != "object") throw new TypeError("Promises must be constructed via new");
409
407
  this._listeners = [], this._lib = !1;
410
408
  var t = this._PSD = G;
@@ -419,7 +417,7 @@ var Mr = { exports: {} };
419
417
  if (a === i) throw new TypeError("A promise cannot be resolved with itself.");
420
418
  var c = i._lib && Ve();
421
419
  a && typeof a.then == "function" ? n(i, function(u, h) {
422
- a instanceof N ? a._then(u, h) : a.then(u, h);
420
+ a instanceof B ? a._then(u, h) : a.then(u, h);
423
421
  }) : (i._state = !0, i._value = a, tr(i)), c && Ze();
424
422
  }
425
423
  }, ln.bind(null, i));
@@ -431,7 +429,7 @@ var Mr = { exports: {} };
431
429
  var un = { get: function() {
432
430
  var e = G, t = Ct;
433
431
  function n(i, o) {
434
- var a = this, c = !e.global && (e !== G || t !== Ct), u = c && !Pe(), h = new N(function(g, b) {
432
+ var a = this, c = !e.global && (e !== G || t !== Ct), u = c && !Pe(), h = new B(function(g, b) {
435
433
  dn(a, new er(rr(i, e, c, u), rr(o, e, c, u), g, b, e));
436
434
  });
437
435
  return this._consoleTask && (h._consoleTask = this._consoleTask), h;
@@ -508,7 +506,7 @@ var Mr = { exports: {} };
508
506
  for (var t = kt.slice(0), n = t.length; n; ) t[--n]();
509
507
  }
510
508
  function Dt(e) {
511
- return new N(st, !1, e);
509
+ return new B(st, !1, e);
512
510
  }
513
511
  function ee(e, t) {
514
512
  var n = G;
@@ -523,7 +521,7 @@ var Mr = { exports: {} };
523
521
  }
524
522
  };
525
523
  }
526
- pe(N.prototype, { then: un, _then: function(e, t) {
524
+ pe(B.prototype, { then: un, _then: function(e, t) {
527
525
  dn(this, new er(null, null, e, t, G));
528
526
  }, catch: function(e) {
529
527
  if (arguments.length === 1) return this.then(null, e);
@@ -535,42 +533,42 @@ var Mr = { exports: {} };
535
533
  });
536
534
  }, finally: function(e) {
537
535
  return this.then(function(t) {
538
- return N.resolve(e()).then(function() {
536
+ return B.resolve(e()).then(function() {
539
537
  return t;
540
538
  });
541
539
  }, function(t) {
542
- return N.resolve(e()).then(function() {
540
+ return B.resolve(e()).then(function() {
543
541
  return Dt(t);
544
542
  });
545
543
  });
546
544
  }, timeout: function(e, t) {
547
545
  var n = this;
548
- return e < 1 / 0 ? new N(function(i, o) {
546
+ return e < 1 / 0 ? new B(function(i, o) {
549
547
  var a = setTimeout(function() {
550
548
  return o(new $.Timeout(t));
551
549
  }, e);
552
550
  n.then(i, o).finally(clearTimeout.bind(null, a));
553
551
  }) : this;
554
- } }), typeof Symbol < "u" && Symbol.toStringTag && Ae(N.prototype, Symbol.toStringTag, "Dexie.Promise"), ke.env = nr(), pe(N, { all: function() {
552
+ } }), typeof Symbol < "u" && Symbol.toStringTag && Ae(B.prototype, Symbol.toStringTag, "Dexie.Promise"), ke.env = nr(), pe(B, { all: function() {
555
553
  var e = _e.apply(null, arguments).map(Rt);
556
- return new N(function(t, n) {
554
+ return new B(function(t, n) {
557
555
  e.length === 0 && t([]);
558
556
  var i = e.length;
559
557
  e.forEach(function(o, a) {
560
- return N.resolve(o).then(function(c) {
558
+ return B.resolve(o).then(function(c) {
561
559
  e[a] = c, --i || t(e);
562
560
  }, n);
563
561
  });
564
562
  });
565
563
  }, resolve: function(e) {
566
- return e instanceof N ? e : e && typeof e.then == "function" ? new N(function(t, n) {
564
+ return e instanceof B ? e : e && typeof e.then == "function" ? new B(function(t, n) {
567
565
  e.then(t, n);
568
- }) : new N(st, !0, e);
566
+ }) : new B(st, !0, e);
569
567
  }, reject: Dt, race: function() {
570
568
  var e = _e.apply(null, arguments).map(Rt);
571
- return new N(function(t, n) {
569
+ return new B(function(t, n) {
572
570
  e.map(function(i) {
573
- return N.resolve(i).then(t, n);
571
+ return B.resolve(i).then(t, n);
574
572
  });
575
573
  });
576
574
  }, PSD: { get: function() {
@@ -588,7 +586,7 @@ var Mr = { exports: {} };
588
586
  }, set: function(e) {
589
587
  cn = e;
590
588
  } }, follow: function(e, t) {
591
- return new N(function(n, i) {
589
+ return new B(function(n, i) {
592
590
  return De(function(o, a) {
593
591
  var c = G;
594
592
  c.unhandleds = [], c.onunhandled = a, c.finalize = Ke(function() {
@@ -603,13 +601,13 @@ var Mr = { exports: {} };
603
601
  }, c.finalize), e();
604
602
  }, t, n, i);
605
603
  });
606
- } }), Ne && (Ne.allSettled && Ae(N, "allSettled", function() {
604
+ } }), Ne && (Ne.allSettled && Ae(B, "allSettled", function() {
607
605
  var e = _e.apply(null, arguments).map(Rt);
608
- return new N(function(t) {
606
+ return new B(function(t) {
609
607
  e.length === 0 && t([]);
610
608
  var n = e.length, i = new Array(n);
611
609
  e.forEach(function(o, a) {
612
- return N.resolve(o).then(function(c) {
610
+ return B.resolve(o).then(function(c) {
613
611
  return i[a] = { status: "fulfilled", value: c };
614
612
  }, function(c) {
615
613
  return i[a] = { status: "rejected", reason: c };
@@ -618,24 +616,24 @@ var Mr = { exports: {} };
618
616
  });
619
617
  });
620
618
  });
621
- }), Ne.any && typeof AggregateError < "u" && Ae(N, "any", function() {
619
+ }), Ne.any && typeof AggregateError < "u" && Ae(B, "any", function() {
622
620
  var e = _e.apply(null, arguments).map(Rt);
623
- return new N(function(t, n) {
621
+ return new B(function(t, n) {
624
622
  e.length === 0 && n(new AggregateError([]));
625
623
  var i = e.length, o = new Array(i);
626
624
  e.forEach(function(a, c) {
627
- return N.resolve(a).then(function(u) {
625
+ return B.resolve(a).then(function(u) {
628
626
  return t(u);
629
627
  }, function(u) {
630
628
  o[c] = u, --i || n(new AggregateError(o));
631
629
  });
632
630
  });
633
631
  });
634
- }), Ne.withResolvers && (N.withResolvers = Ne.withResolvers));
632
+ }), Ne.withResolvers && (B.withResolvers = Ne.withResolvers));
635
633
  var ie = { awaits: 0, echoes: 0, id: 0 }, ni = 0, Pt = [], It = 0, Ct = 0, ri = 0;
636
634
  function De(e, t, n, i) {
637
635
  var o = G, a = Object.create(o);
638
- return a.parent = o, a.ref = 0, a.global = !1, a.id = ++ri, ke.env, a.env = an ? { Promise: N, PromiseProp: { value: N, configurable: !0, writable: !0 }, all: N.all, race: N.race, allSettled: N.allSettled, any: N.any, resolve: N.resolve, reject: N.reject } : {}, t && Q(a, t), ++o.ref, a.finalize = function() {
636
+ return a.parent = o, a.ref = 0, a.global = !1, a.id = ++ri, ke.env, a.env = an ? { Promise: B, PromiseProp: { value: B, configurable: !0, writable: !0 }, all: B.all, race: B.race, allSettled: B.allSettled, any: B.any, resolve: B.resolve, reject: B.reject } : {}, t && Y(a, t), ++o.ref, a.finalize = function() {
639
637
  --this.parent.ref || this.parent.finalize();
640
638
  }, i = Ge(a, e, n, i), a.ref === 0 && a.finalize(), i;
641
639
  }
@@ -688,19 +686,19 @@ var Mr = { exports: {} };
688
686
  function hn(e) {
689
687
  Promise === Ne && ie.echoes === 0 ? It === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
690
688
  }
691
- ("" + he).indexOf("[native code]") === -1 && (qe = Pe = X);
692
- var te = N.reject, $e = "￿", Se = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", et = [], Mt = "__dbnames", pn = "readonly", gn = "readwrite";
689
+ ("" + he).indexOf("[native code]") === -1 && (qe = Pe = J);
690
+ var te = B.reject, $e = "￿", Se = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ir = "String expected.", et = [], Tt = "__dbnames", pn = "readonly", gn = "readwrite";
693
691
  function Fe(e, t) {
694
692
  return e ? t ? function() {
695
693
  return e.apply(this, arguments) && t.apply(this, arguments);
696
694
  } : e : t;
697
695
  }
698
696
  var or = { type: 3, lower: -1 / 0, lowerOpen: !1, upper: [[]], upperOpen: !1 };
699
- function Tt(e) {
697
+ function Mt(e) {
700
698
  return typeof e != "string" || /\./.test(e) ? function(t) {
701
699
  return t;
702
700
  } : function(t) {
703
- return t[e] === void 0 && e in t && delete (t = Te(t))[e], t;
701
+ return t[e] === void 0 && e in t && delete (t = Me(t))[e], t;
704
702
  };
705
703
  }
706
704
  function ar() {
@@ -740,7 +738,7 @@ var Mr = { exports: {} };
740
738
  function cr(e) {
741
739
  return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
742
740
  }
743
- var ur = (Z.prototype._trans = function(e, t, n) {
741
+ var ur = (q.prototype._trans = function(e, t, n) {
744
742
  var i = this._tx || G.trans, o = this.name, a = ye && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
745
743
  function c(g, b, f) {
746
744
  if (!f.schema[o]) throw new $.NotFound("Table " + o + " not part of transaction");
@@ -750,14 +748,14 @@ var Mr = { exports: {} };
750
748
  try {
751
749
  var h = i && i.db._novip === this.db._novip ? i === G.trans ? i._promise(e, c, n) : De(function() {
752
750
  return i._promise(e, c, n);
753
- }, { trans: i, transless: G.transless || G }) : function g(b, f, w, p) {
751
+ }, { trans: i, transless: G.transless || G }) : function g(b, f, _, p) {
754
752
  if (b.idbdb && (b._state.openComplete || G.letThrough || b._vip)) {
755
- var m = b._createTransaction(f, w, b._dbSchema);
753
+ var m = b._createTransaction(f, _, b._dbSchema);
756
754
  try {
757
755
  m.create(), b._state.PR1398_maxLoop = 3;
758
756
  } catch (v) {
759
757
  return v.name === rn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
760
- return g(b, f, w, p);
758
+ return g(b, f, _, p);
761
759
  })) : te(v);
762
760
  }
763
761
  return m._promise(f, function(v, y) {
@@ -777,10 +775,10 @@ var Mr = { exports: {} };
777
775
  if (b._state.openComplete) return te(new $.DatabaseClosed(b._state.dbOpenError));
778
776
  if (!b._state.isBeingOpened) {
779
777
  if (!b._state.autoOpen) return te(new $.DatabaseClosed());
780
- b.open().catch(X);
778
+ b.open().catch(J);
781
779
  }
782
780
  return b._state.dbReadyPromise.then(function() {
783
- return g(b, f, w, p);
781
+ return g(b, f, _, p);
784
782
  });
785
783
  }(this.db, e, [this.name], c);
786
784
  return a && (h._consoleTask = a, h = h.catch(function(g) {
@@ -789,17 +787,17 @@ var Mr = { exports: {} };
789
787
  } finally {
790
788
  u && Ze();
791
789
  }
792
- }, Z.prototype.get = function(e, t) {
790
+ }, q.prototype.get = function(e, t) {
793
791
  var n = this;
794
792
  return e && e.constructor === Object ? this.where(e).first(t) : e == null ? te(new $.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(i) {
795
793
  return n.core.get({ trans: i, key: e }).then(function(o) {
796
794
  return n.hook.reading.fire(o);
797
795
  });
798
796
  }).then(t);
799
- }, Z.prototype.where = function(e) {
797
+ }, q.prototype.where = function(e) {
800
798
  if (typeof e == "string") return new this.db.WhereClause(this, e);
801
- if (B(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
802
- var t = T(e);
799
+ if (P(e)) return new this.db.WhereClause(this, "[".concat(e.join("+"), "]"));
800
+ var t = j(e);
803
801
  if (t.length === 1) return this.where(t[0]).equals(e[t[0]]);
804
802
  var n = this.schema.indexes.concat(this.schema.primKey).filter(function(u) {
805
803
  if (u.compound && t.every(function(g) {
@@ -824,35 +822,35 @@ var Mr = { exports: {} };
824
822
  return H(u, h) === 0;
825
823
  }
826
824
  var c = t.reduce(function(f, h) {
827
- var g = f[0], b = f[1], f = i[h], w = e[h];
825
+ var g = f[0], b = f[1], f = i[h], _ = e[h];
828
826
  return [g || f, g || !f ? Fe(b, f && f.multi ? function(p) {
829
- return p = we(p, h), B(p) && p.some(function(m) {
830
- return o(w, m);
827
+ return p = we(p, h), P(p) && p.some(function(m) {
828
+ return o(_, m);
831
829
  });
832
830
  } : function(p) {
833
- return o(w, we(p, h));
831
+ return o(_, we(p, h));
834
832
  }) : b];
835
833
  }, [null, null]), a = c[0], c = c[1];
836
834
  return a ? this.where(a.name).equals(e[a.keyPath]).filter(c) : n ? this.filter(c) : this.where(t).equals("");
837
- }, Z.prototype.filter = function(e) {
835
+ }, q.prototype.filter = function(e) {
838
836
  return this.toCollection().and(e);
839
- }, Z.prototype.count = function(e) {
837
+ }, q.prototype.count = function(e) {
840
838
  return this.toCollection().count(e);
841
- }, Z.prototype.offset = function(e) {
839
+ }, q.prototype.offset = function(e) {
842
840
  return this.toCollection().offset(e);
843
- }, Z.prototype.limit = function(e) {
841
+ }, q.prototype.limit = function(e) {
844
842
  return this.toCollection().limit(e);
845
- }, Z.prototype.each = function(e) {
843
+ }, q.prototype.each = function(e) {
846
844
  return this.toCollection().each(e);
847
- }, Z.prototype.toArray = function(e) {
845
+ }, q.prototype.toArray = function(e) {
848
846
  return this.toCollection().toArray(e);
849
- }, Z.prototype.toCollection = function() {
847
+ }, q.prototype.toCollection = function() {
850
848
  return new this.db.Collection(new this.db.WhereClause(this));
851
- }, Z.prototype.orderBy = function(e) {
852
- return new this.db.Collection(new this.db.WhereClause(this, B(e) ? "[".concat(e.join("+"), "]") : e));
853
- }, Z.prototype.reverse = function() {
849
+ }, q.prototype.orderBy = function(e) {
850
+ return new this.db.Collection(new this.db.WhereClause(this, P(e) ? "[".concat(e.join("+"), "]") : e));
851
+ }, q.prototype.reverse = function() {
854
852
  return this.toCollection().reverse();
855
- }, Z.prototype.mapToClass = function(e) {
853
+ }, q.prototype.mapToClass = function(e) {
856
854
  var t, n = this.db, i = this.name;
857
855
  function o() {
858
856
  return t !== null && t.apply(this, arguments) || this;
@@ -868,7 +866,7 @@ var Mr = { exports: {} };
868
866
  }, enumerable: !1, configurable: !0 }), o.prototype.table = function() {
869
867
  return i;
870
868
  }, e = o);
871
- for (var a = /* @__PURE__ */ new Set(), c = e.prototype; c; c = V(c)) Object.getOwnPropertyNames(c).forEach(function(h) {
869
+ for (var a = /* @__PURE__ */ new Set(), c = e.prototype; c; c = Z(c)) Object.getOwnPropertyNames(c).forEach(function(h) {
872
870
  return a.add(h);
873
871
  });
874
872
  function u(h) {
@@ -881,16 +879,16 @@ var Mr = { exports: {} };
881
879
  return b;
882
880
  }
883
881
  return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = u, this.hook("reading", u), e;
884
- }, Z.prototype.defineClass = function() {
882
+ }, q.prototype.defineClass = function() {
885
883
  return this.mapToClass(function(e) {
886
- Q(this, e);
884
+ Y(this, e);
887
885
  });
888
- }, Z.prototype.add = function(e, t) {
886
+ }, q.prototype.add = function(e, t) {
889
887
  var n = this, i = this.schema.primKey, o = i.auto, a = i.keyPath, c = e;
890
- return a && o && (c = Tt(a)(e)), this._trans("readwrite", function(u) {
888
+ return a && o && (c = Mt(a)(e)), this._trans("readwrite", function(u) {
891
889
  return n.core.mutate({ trans: u, type: "add", keys: t != null ? [t] : null, values: [c] });
892
890
  }).then(function(u) {
893
- return u.numFailures ? N.reject(u.failures[0]) : u.lastResult;
891
+ return u.numFailures ? B.reject(u.failures[0]) : u.lastResult;
894
892
  }).then(function(u) {
895
893
  if (a) try {
896
894
  le(e, a, u);
@@ -898,14 +896,14 @@ var Mr = { exports: {} };
898
896
  }
899
897
  return u;
900
898
  });
901
- }, Z.prototype.update = function(e, t) {
902
- return typeof e != "object" || B(e) ? this.where(":id").equals(e).modify(t) : (e = we(e, this.schema.primKey.keyPath), e === void 0 ? te(new $.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
903
- }, Z.prototype.put = function(e, t) {
899
+ }, q.prototype.update = function(e, t) {
900
+ return typeof e != "object" || P(e) ? this.where(":id").equals(e).modify(t) : (e = we(e, this.schema.primKey.keyPath), e === void 0 ? te(new $.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
901
+ }, q.prototype.put = function(e, t) {
904
902
  var n = this, i = this.schema.primKey, o = i.auto, a = i.keyPath, c = e;
905
- return a && o && (c = Tt(a)(e)), this._trans("readwrite", function(u) {
903
+ return a && o && (c = Mt(a)(e)), this._trans("readwrite", function(u) {
906
904
  return n.core.mutate({ trans: u, type: "put", values: [c], keys: t != null ? [t] : null });
907
905
  }).then(function(u) {
908
- return u.numFailures ? N.reject(u.failures[0]) : u.lastResult;
906
+ return u.numFailures ? B.reject(u.failures[0]) : u.lastResult;
909
907
  }).then(function(u) {
910
908
  if (a) try {
911
909
  le(e, a, u);
@@ -913,21 +911,21 @@ var Mr = { exports: {} };
913
911
  }
914
912
  return u;
915
913
  });
916
- }, Z.prototype.delete = function(e) {
914
+ }, q.prototype.delete = function(e) {
917
915
  var t = this;
918
916
  return this._trans("readwrite", function(n) {
919
917
  return t.core.mutate({ trans: n, type: "delete", keys: [e] });
920
918
  }).then(function(n) {
921
- return n.numFailures ? N.reject(n.failures[0]) : void 0;
919
+ return n.numFailures ? B.reject(n.failures[0]) : void 0;
922
920
  });
923
- }, Z.prototype.clear = function() {
921
+ }, q.prototype.clear = function() {
924
922
  var e = this;
925
923
  return this._trans("readwrite", function(t) {
926
924
  return e.core.mutate({ trans: t, type: "deleteRange", range: or });
927
925
  }).then(function(t) {
928
- return t.numFailures ? N.reject(t.failures[0]) : void 0;
926
+ return t.numFailures ? B.reject(t.failures[0]) : void 0;
929
927
  });
930
- }, Z.prototype.bulkGet = function(e) {
928
+ }, q.prototype.bulkGet = function(e) {
931
929
  var t = this;
932
930
  return this._trans("readonly", function(n) {
933
931
  return t.core.getMany({ keys: e, trans: n }).then(function(i) {
@@ -936,33 +934,33 @@ var Mr = { exports: {} };
936
934
  });
937
935
  });
938
936
  });
939
- }, Z.prototype.bulkAdd = function(e, t, n) {
937
+ }, q.prototype.bulkAdd = function(e, t, n) {
940
938
  var i = this, o = Array.isArray(t) ? t : void 0, a = (n = n || (o ? void 0 : t)) ? n.allKeys : void 0;
941
939
  return this._trans("readwrite", function(c) {
942
940
  var g = i.schema.primKey, u = g.auto, g = g.keyPath;
943
941
  if (g && o) throw new $.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
944
942
  if (o && o.length !== e.length) throw new $.InvalidArgument("Arguments objects and keys must have the same length");
945
- var h = e.length, g = g && u ? e.map(Tt(g)) : e;
943
+ var h = e.length, g = g && u ? e.map(Mt(g)) : e;
946
944
  return i.core.mutate({ trans: c, type: "add", keys: o, values: g, wantResults: a }).then(function(m) {
947
- var f = m.numFailures, w = m.results, p = m.lastResult, m = m.failures;
948
- if (f === 0) return a ? w : p;
945
+ var f = m.numFailures, _ = m.results, p = m.lastResult, m = m.failures;
946
+ if (f === 0) return a ? _ : p;
949
947
  throw new Je("".concat(i.name, ".bulkAdd(): ").concat(f, " of ").concat(h, " operations failed"), m);
950
948
  });
951
949
  });
952
- }, Z.prototype.bulkPut = function(e, t, n) {
950
+ }, q.prototype.bulkPut = function(e, t, n) {
953
951
  var i = this, o = Array.isArray(t) ? t : void 0, a = (n = n || (o ? void 0 : t)) ? n.allKeys : void 0;
954
952
  return this._trans("readwrite", function(c) {
955
953
  var g = i.schema.primKey, u = g.auto, g = g.keyPath;
956
954
  if (g && o) throw new $.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
957
955
  if (o && o.length !== e.length) throw new $.InvalidArgument("Arguments objects and keys must have the same length");
958
- var h = e.length, g = g && u ? e.map(Tt(g)) : e;
956
+ var h = e.length, g = g && u ? e.map(Mt(g)) : e;
959
957
  return i.core.mutate({ trans: c, type: "put", keys: o, values: g, wantResults: a }).then(function(m) {
960
- var f = m.numFailures, w = m.results, p = m.lastResult, m = m.failures;
961
- if (f === 0) return a ? w : p;
958
+ var f = m.numFailures, _ = m.results, p = m.lastResult, m = m.failures;
959
+ if (f === 0) return a ? _ : p;
962
960
  throw new Je("".concat(i.name, ".bulkPut(): ").concat(f, " of ").concat(h, " operations failed"), m);
963
961
  });
964
962
  });
965
- }, Z.prototype.bulkUpdate = function(e) {
963
+ }, q.prototype.bulkUpdate = function(e) {
966
964
  var t = this, n = this.core, i = e.map(function(c) {
967
965
  return c.key;
968
966
  }), o = e.map(function(c) {
@@ -971,8 +969,8 @@ var Mr = { exports: {} };
971
969
  return this._trans("readwrite", function(c) {
972
970
  return n.getMany({ trans: c, keys: i, cache: "clone" }).then(function(u) {
973
971
  var h = [], g = [];
974
- e.forEach(function(f, w) {
975
- var p = f.key, m = f.changes, v = u[w];
972
+ e.forEach(function(f, _) {
973
+ var p = f.key, m = f.changes, v = u[_];
976
974
  if (v) {
977
975
  for (var y = 0, S = Object.keys(m); y < S.length; y++) {
978
976
  var E = S[y], O = m[E];
@@ -980,22 +978,22 @@ var Mr = { exports: {} };
980
978
  if (H(O, p) !== 0) throw new $.Constraint("Cannot update primary key in bulkUpdate()");
981
979
  } else le(v, E, O);
982
980
  }
983
- a.push(w), h.push(p), g.push(v);
981
+ a.push(_), h.push(p), g.push(v);
984
982
  }
985
983
  });
986
984
  var b = h.length;
987
985
  return n.mutate({ trans: c, type: "put", keys: h, values: g, updates: { keys: i, changeSpecs: o } }).then(function(f) {
988
- var w = f.numFailures, p = f.failures;
989
- if (w === 0) return b;
986
+ var _ = f.numFailures, p = f.failures;
987
+ if (_ === 0) return b;
990
988
  for (var m = 0, v = Object.keys(p); m < v.length; m++) {
991
989
  var y, S = v[m], E = a[Number(S)];
992
990
  E != null && (y = p[S], delete p[S], p[E] = y);
993
991
  }
994
- throw new Je("".concat(t.name, ".bulkUpdate(): ").concat(w, " of ").concat(b, " operations failed"), p);
992
+ throw new Je("".concat(t.name, ".bulkUpdate(): ").concat(_, " of ").concat(b, " operations failed"), p);
995
993
  });
996
994
  });
997
995
  });
998
- }, Z.prototype.bulkDelete = function(e) {
996
+ }, q.prototype.bulkDelete = function(e) {
999
997
  var t = this, n = e.length;
1000
998
  return this._trans("readwrite", function(i) {
1001
999
  return t.core.mutate({ trans: i, type: "delete", keys: e });
@@ -1004,8 +1002,8 @@ var Mr = { exports: {} };
1004
1002
  if (o === 0) return a;
1005
1003
  throw new Je("".concat(t.name, ".bulkDelete(): ").concat(o, " of ").concat(n, " operations failed"), c);
1006
1004
  });
1007
- }, Z);
1008
- function Z() {
1005
+ }, q);
1006
+ function q() {
1009
1007
  }
1010
1008
  function dt(e) {
1011
1009
  function t(c, u) {
@@ -1023,20 +1021,20 @@ var Mr = { exports: {} };
1023
1021
  if (typeof c != "object") {
1024
1022
  var g;
1025
1023
  u = u || qr;
1026
- var b = { subscribers: [], fire: h = h || X, subscribe: function(f) {
1024
+ var b = { subscribers: [], fire: h = h || J, subscribe: function(f) {
1027
1025
  b.subscribers.indexOf(f) === -1 && (b.subscribers.push(f), b.fire = u(b.fire, f));
1028
1026
  }, unsubscribe: function(f) {
1029
- b.subscribers = b.subscribers.filter(function(w) {
1030
- return w !== f;
1027
+ b.subscribers = b.subscribers.filter(function(_) {
1028
+ return _ !== f;
1031
1029
  }), b.fire = b.subscribers.reduce(u, h);
1032
1030
  } };
1033
1031
  return n[c] = t[c] = b;
1034
1032
  }
1035
- T(g = c).forEach(function(f) {
1036
- var w = g[f];
1037
- if (B(w)) a(f, g[f][0], g[f][1]);
1033
+ j(g = c).forEach(function(f) {
1034
+ var _ = g[f];
1035
+ if (P(_)) a(f, g[f][0], g[f][1]);
1038
1036
  else {
1039
- if (w !== "asap") throw new $.InvalidArgument("Invalid event config");
1037
+ if (_ !== "asap") throw new $.InvalidArgument("Invalid event config");
1040
1038
  var p = a(f, at, function() {
1041
1039
  for (var m = arguments.length, v = new Array(m); m--; ) v[m] = arguments[m];
1042
1040
  p.subscribers.forEach(function(y) {
@@ -1079,11 +1077,11 @@ var Mr = { exports: {} };
1079
1077
  if (e.or) {
1080
1078
  var a = {}, c = function(u, h, g) {
1081
1079
  var b, f;
1082
- o && !o(h, g, function(w) {
1083
- return h.stop(w);
1084
- }, function(w) {
1085
- return h.fail(w);
1086
- }) || ((f = "" + (b = h.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(b)), q(a, f) || (a[f] = !0, t(u, h, g)));
1080
+ o && !o(h, g, function(_) {
1081
+ return h.stop(_);
1082
+ }, function(_) {
1083
+ return h.fail(_);
1084
+ }) || ((f = "" + (b = h.primaryKey)) == "[object ArrayBuffer]" && (f = "" + new Uint8Array(b)), X(a, f) || (a[f] = !0, t(u, h, g)));
1087
1085
  };
1088
1086
  return Promise.all([e.or._iterate(c, n), dr(lr(e, i, n), e.algorithm, c, !e.keysOnly && e.valueMapper)]);
1089
1087
  }
@@ -1101,9 +1099,9 @@ var Mr = { exports: {} };
1101
1099
  t && !t(a, function(u) {
1102
1100
  return c = u;
1103
1101
  }, function(u) {
1104
- a.stop(u), c = X;
1102
+ a.stop(u), c = J;
1105
1103
  }, function(u) {
1106
- a.fail(u), c = X;
1104
+ a.fail(u), c = J;
1107
1105
  }) || o(a.value, a, function(u) {
1108
1106
  return c = u;
1109
1107
  }), c();
@@ -1113,7 +1111,7 @@ var Mr = { exports: {} };
1113
1111
  var Ee = Symbol(), ht = (fr.prototype.execute = function(e) {
1114
1112
  if (this.add !== void 0) {
1115
1113
  var t = this.add;
1116
- if (B(t)) return x(x([], B(e) ? e : [], !0), t).sort();
1114
+ if (P(t)) return x(x([], P(e) ? e : [], !0), t).sort();
1117
1115
  if (typeof t == "number") return (Number(e) || 0) + t;
1118
1116
  if (typeof t == "bigint") try {
1119
1117
  return BigInt(e) + t;
@@ -1124,7 +1122,7 @@ var Mr = { exports: {} };
1124
1122
  }
1125
1123
  if (this.remove !== void 0) {
1126
1124
  var n = this.remove;
1127
- if (B(n)) return B(e) ? e.filter(function(i) {
1125
+ if (P(n)) return P(e) ? e.filter(function(i) {
1128
1126
  return !n.includes(i);
1129
1127
  }).sort() : [];
1130
1128
  if (typeof n == "number") return Number(e) - n;
@@ -1140,28 +1138,28 @@ var Mr = { exports: {} };
1140
1138
  function fr(e) {
1141
1139
  Object.assign(this, e);
1142
1140
  }
1143
- var oi = (Y.prototype._read = function(e, t) {
1141
+ var oi = (Q.prototype._read = function(e, t) {
1144
1142
  var n = this._ctx;
1145
1143
  return n.error ? n.table._trans(null, te.bind(null, n.error)) : n.table._trans("readonly", e).then(t);
1146
- }, Y.prototype._write = function(e) {
1144
+ }, Q.prototype._write = function(e) {
1147
1145
  var t = this._ctx;
1148
1146
  return t.error ? t.table._trans(null, te.bind(null, t.error)) : t.table._trans("readwrite", e, "locked");
1149
- }, Y.prototype._addAlgorithm = function(e) {
1147
+ }, Q.prototype._addAlgorithm = function(e) {
1150
1148
  var t = this._ctx;
1151
1149
  t.algorithm = Fe(t.algorithm, e);
1152
- }, Y.prototype._iterate = function(e, t) {
1150
+ }, Q.prototype._iterate = function(e, t) {
1153
1151
  return Kt(this._ctx, e, t, this._ctx.table.core);
1154
- }, Y.prototype.clone = function(e) {
1152
+ }, Q.prototype.clone = function(e) {
1155
1153
  var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
1156
- return e && Q(n, e), t._ctx = n, t;
1157
- }, Y.prototype.raw = function() {
1154
+ return e && Y(n, e), t._ctx = n, t;
1155
+ }, Q.prototype.raw = function() {
1158
1156
  return this._ctx.valueMapper = null, this;
1159
- }, Y.prototype.each = function(e) {
1157
+ }, Q.prototype.each = function(e) {
1160
1158
  var t = this._ctx;
1161
1159
  return this._read(function(n) {
1162
1160
  return Kt(t, e, n, t.table.core);
1163
1161
  });
1164
- }, Y.prototype.count = function(e) {
1162
+ }, Q.prototype.count = function(e) {
1165
1163
  var t = this;
1166
1164
  return this._read(function(n) {
1167
1165
  var i = t._ctx, o = i.table.core;
@@ -1175,7 +1173,7 @@ var Mr = { exports: {} };
1175
1173
  return a;
1176
1174
  });
1177
1175
  }).then(e);
1178
- }, Y.prototype.sortBy = function(e, t) {
1176
+ }, Q.prototype.sortBy = function(e, t) {
1179
1177
  var n = e.split(".").reverse(), i = n[0], o = n.length - 1;
1180
1178
  function a(h, g) {
1181
1179
  return g ? a(h[n[g]], g - 1) : h[i];
@@ -1187,7 +1185,7 @@ var Mr = { exports: {} };
1187
1185
  return this.toArray(function(h) {
1188
1186
  return h.sort(u);
1189
1187
  }).then(t);
1190
- }, Y.prototype.toArray = function(e) {
1188
+ }, Q.prototype.toArray = function(e) {
1191
1189
  var t = this;
1192
1190
  return this._read(function(n) {
1193
1191
  var i = t._ctx;
@@ -1204,7 +1202,7 @@ var Mr = { exports: {} };
1204
1202
  return c;
1205
1203
  });
1206
1204
  }, e);
1207
- }, Y.prototype.offset = function(e) {
1205
+ }, Q.prototype.offset = function(e) {
1208
1206
  var t = this._ctx;
1209
1207
  return e <= 0 || (t.offset += e, tt(t) ? mn(t, function() {
1210
1208
  var n = e;
@@ -1219,49 +1217,49 @@ var Mr = { exports: {} };
1219
1217
  return --n < 0;
1220
1218
  };
1221
1219
  })), this;
1222
- }, Y.prototype.limit = function(e) {
1220
+ }, Q.prototype.limit = function(e) {
1223
1221
  return this._ctx.limit = Math.min(this._ctx.limit, e), mn(this._ctx, function() {
1224
1222
  var t = e;
1225
1223
  return function(n, i, o) {
1226
1224
  return --t <= 0 && i(o), 0 <= t;
1227
1225
  };
1228
1226
  }, !0), this;
1229
- }, Y.prototype.until = function(e, t) {
1227
+ }, Q.prototype.until = function(e, t) {
1230
1228
  return yn(this._ctx, function(n, i, o) {
1231
1229
  return !e(n.value) || (i(o), t);
1232
1230
  }), this;
1233
- }, Y.prototype.first = function(e) {
1231
+ }, Q.prototype.first = function(e) {
1234
1232
  return this.limit(1).toArray(function(t) {
1235
1233
  return t[0];
1236
1234
  }).then(e);
1237
- }, Y.prototype.last = function(e) {
1235
+ }, Q.prototype.last = function(e) {
1238
1236
  return this.reverse().first(e);
1239
- }, Y.prototype.filter = function(e) {
1237
+ }, Q.prototype.filter = function(e) {
1240
1238
  var t;
1241
1239
  return yn(this._ctx, function(n) {
1242
1240
  return e(n.value);
1243
1241
  }), (t = this._ctx).isMatch = Fe(t.isMatch, e), this;
1244
- }, Y.prototype.and = function(e) {
1242
+ }, Q.prototype.and = function(e) {
1245
1243
  return this.filter(e);
1246
- }, Y.prototype.or = function(e) {
1244
+ }, Q.prototype.or = function(e) {
1247
1245
  return new this.db.WhereClause(this._ctx.table, e, this);
1248
- }, Y.prototype.reverse = function() {
1246
+ }, Q.prototype.reverse = function() {
1249
1247
  return this._ctx.dir = this._ctx.dir === "prev" ? "next" : "prev", this._ondirectionchange && this._ondirectionchange(this._ctx.dir), this;
1250
- }, Y.prototype.desc = function() {
1248
+ }, Q.prototype.desc = function() {
1251
1249
  return this.reverse();
1252
- }, Y.prototype.eachKey = function(e) {
1250
+ }, Q.prototype.eachKey = function(e) {
1253
1251
  var t = this._ctx;
1254
1252
  return t.keysOnly = !t.isMatch, this.each(function(n, i) {
1255
1253
  e(i.key, i);
1256
1254
  });
1257
- }, Y.prototype.eachUniqueKey = function(e) {
1255
+ }, Q.prototype.eachUniqueKey = function(e) {
1258
1256
  return this._ctx.unique = "unique", this.eachKey(e);
1259
- }, Y.prototype.eachPrimaryKey = function(e) {
1257
+ }, Q.prototype.eachPrimaryKey = function(e) {
1260
1258
  var t = this._ctx;
1261
1259
  return t.keysOnly = !t.isMatch, this.each(function(n, i) {
1262
1260
  e(i.primaryKey, i);
1263
1261
  });
1264
- }, Y.prototype.keys = function(e) {
1262
+ }, Q.prototype.keys = function(e) {
1265
1263
  var t = this._ctx;
1266
1264
  t.keysOnly = !t.isMatch;
1267
1265
  var n = [];
@@ -1270,7 +1268,7 @@ var Mr = { exports: {} };
1270
1268
  }).then(function() {
1271
1269
  return n;
1272
1270
  }).then(e);
1273
- }, Y.prototype.primaryKeys = function(e) {
1271
+ }, Q.prototype.primaryKeys = function(e) {
1274
1272
  var t = this._ctx;
1275
1273
  if (t.dir === "next" && tt(t, !0) && 0 < t.limit) return this._read(function(i) {
1276
1274
  var o = jt(t, t.table.core.schema);
@@ -1285,40 +1283,40 @@ var Mr = { exports: {} };
1285
1283
  }).then(function() {
1286
1284
  return n;
1287
1285
  }).then(e);
1288
- }, Y.prototype.uniqueKeys = function(e) {
1286
+ }, Q.prototype.uniqueKeys = function(e) {
1289
1287
  return this._ctx.unique = "unique", this.keys(e);
1290
- }, Y.prototype.firstKey = function(e) {
1288
+ }, Q.prototype.firstKey = function(e) {
1291
1289
  return this.limit(1).keys(function(t) {
1292
1290
  return t[0];
1293
1291
  }).then(e);
1294
- }, Y.prototype.lastKey = function(e) {
1292
+ }, Q.prototype.lastKey = function(e) {
1295
1293
  return this.reverse().firstKey(e);
1296
- }, Y.prototype.distinct = function() {
1294
+ }, Q.prototype.distinct = function() {
1297
1295
  var e = this._ctx, e = e.index && e.table.schema.idxByName[e.index];
1298
1296
  if (!e || !e.multi) return this;
1299
1297
  var t = {};
1300
1298
  return yn(this._ctx, function(o) {
1301
- var i = o.primaryKey.toString(), o = q(t, i);
1299
+ var i = o.primaryKey.toString(), o = X(t, i);
1302
1300
  return t[i] = !0, !o;
1303
1301
  }), this;
1304
- }, Y.prototype.modify = function(e) {
1302
+ }, Q.prototype.modify = function(e) {
1305
1303
  var t = this, n = this._ctx;
1306
1304
  return this._write(function(i) {
1307
1305
  var o, a, c;
1308
- c = typeof e == "function" ? e : (o = T(e), a = o.length, function(y) {
1306
+ c = typeof e == "function" ? e : (o = j(e), a = o.length, function(y) {
1309
1307
  for (var S = !1, E = 0; E < a; ++E) {
1310
- var O = o[E], A = e[O], P = we(y, O);
1311
- A instanceof ht ? (le(y, O, A.execute(P)), S = !0) : P !== A && (le(y, O, A), S = !0);
1308
+ var O = o[E], A = e[O], I = we(y, O);
1309
+ A instanceof ht ? (le(y, O, A.execute(I)), S = !0) : I !== A && (le(y, O, A), S = !0);
1312
1310
  }
1313
1311
  return S;
1314
1312
  });
1315
1313
  var u = n.table.core, f = u.schema.primaryKey, h = f.outbound, g = f.extractKey, b = 200, f = t.db._options.modifyChunkSize;
1316
1314
  f && (b = typeof f == "object" ? f[u.name] || f["*"] || 200 : f);
1317
- function w(y, O) {
1315
+ function _(y, O) {
1318
1316
  var E = O.failures, O = O.numFailures;
1319
1317
  m += y - O;
1320
- for (var A = 0, P = T(E); A < P.length; A++) {
1321
- var M = P[A];
1318
+ for (var A = 0, I = j(E); A < I.length; A++) {
1319
+ var M = I[A];
1322
1320
  p.push(E[M]);
1323
1321
  }
1324
1322
  }
@@ -1326,21 +1324,21 @@ var Mr = { exports: {} };
1326
1324
  return t.clone().primaryKeys().then(function(y) {
1327
1325
  function S(O) {
1328
1326
  var A = Math.min(b, y.length - O);
1329
- return u.getMany({ trans: i, keys: y.slice(O, O + A), cache: "immutable" }).then(function(P) {
1330
- for (var M = [], I = [], C = h ? [] : null, j = [], R = 0; R < A; ++R) {
1331
- var L = P[R], U = { value: Te(L), primKey: y[O + R] };
1332
- c.call(U, U.value, U) !== !1 && (U.value == null ? j.push(y[O + R]) : h || H(g(L), g(U.value)) === 0 ? (I.push(U.value), h && C.push(y[O + R])) : (j.push(y[O + R]), M.push(U.value)));
1327
+ return u.getMany({ trans: i, keys: y.slice(O, O + A), cache: "immutable" }).then(function(I) {
1328
+ for (var M = [], C = [], R = h ? [] : null, K = [], T = 0; T < A; ++T) {
1329
+ var L = I[T], U = { value: Me(L), primKey: y[O + T] };
1330
+ c.call(U, U.value, U) !== !1 && (U.value == null ? K.push(y[O + T]) : h || H(g(L), g(U.value)) === 0 ? (C.push(U.value), h && R.push(y[O + T])) : (K.push(y[O + T]), M.push(U.value)));
1333
1331
  }
1334
1332
  return Promise.resolve(0 < M.length && u.mutate({ trans: i, type: "add", values: M }).then(function(W) {
1335
- for (var z in W.failures) j.splice(parseInt(z), 1);
1336
- w(M.length, W);
1333
+ for (var z in W.failures) K.splice(parseInt(z), 1);
1334
+ _(M.length, W);
1337
1335
  })).then(function() {
1338
- return (0 < I.length || E && typeof e == "object") && u.mutate({ trans: i, type: "put", keys: C, values: I, criteria: E, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < O }).then(function(W) {
1339
- return w(I.length, W);
1336
+ return (0 < C.length || E && typeof e == "object") && u.mutate({ trans: i, type: "put", keys: R, values: C, criteria: E, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < O }).then(function(W) {
1337
+ return _(C.length, W);
1340
1338
  });
1341
1339
  }).then(function() {
1342
- return (0 < j.length || E && e === bn) && u.mutate({ trans: i, type: "delete", keys: j, criteria: E, isAdditionalChunk: 0 < O }).then(function(W) {
1343
- return w(j.length, W);
1340
+ return (0 < K.length || E && e === bn) && u.mutate({ trans: i, type: "delete", keys: K, criteria: E, isAdditionalChunk: 0 < O }).then(function(W) {
1341
+ return _(K.length, W);
1344
1342
  });
1345
1343
  }).then(function() {
1346
1344
  return y.length > O + A && S(O + b);
@@ -1354,7 +1352,7 @@ var Mr = { exports: {} };
1354
1352
  });
1355
1353
  });
1356
1354
  });
1357
- }, Y.prototype.delete = function() {
1355
+ }, Q.prototype.delete = function() {
1358
1356
  var e = this._ctx, t = e.range;
1359
1357
  return tt(e) && (e.isPrimKey || t.type === 3) ? this._write(function(n) {
1360
1358
  var i = e.table.core.schema.primaryKey, o = t;
@@ -1368,8 +1366,8 @@ var Mr = { exports: {} };
1368
1366
  });
1369
1367
  });
1370
1368
  }) : this.modify(bn);
1371
- }, Y);
1372
- function Y() {
1369
+ }, Q);
1370
+ function Q() {
1373
1371
  }
1374
1372
  var bn = function(e, t) {
1375
1373
  return t.value = null;
@@ -1393,7 +1391,7 @@ var Mr = { exports: {} };
1393
1391
  if (!n.every(function(m) {
1394
1392
  return typeof m == "string";
1395
1393
  })) return de(e, ir);
1396
- function w(m) {
1394
+ function _(m) {
1397
1395
  o = m === "next" ? function(y) {
1398
1396
  return y.toUpperCase();
1399
1397
  } : function(y) {
@@ -1414,10 +1412,10 @@ var Mr = { exports: {} };
1414
1412
  return y.lower;
1415
1413
  }), b = (g = m) === "next" ? "" : i;
1416
1414
  }
1417
- w("next"), e = new e.Collection(e, function() {
1415
+ _("next"), e = new e.Collection(e, function() {
1418
1416
  return Ce(u[0], h[f - 1] + i);
1419
1417
  }), e._ondirectionchange = function(m) {
1420
- w(m);
1418
+ _(m);
1421
1419
  };
1422
1420
  var p = 0;
1423
1421
  return e._addAlgorithm(function(m, v, y) {
@@ -1426,15 +1424,15 @@ var Mr = { exports: {} };
1426
1424
  var E = a(S);
1427
1425
  if (t(E, h, p)) return !0;
1428
1426
  for (var O = null, A = p; A < f; ++A) {
1429
- var P = function(M, I, C, j, R, L) {
1430
- for (var U = Math.min(M.length, j.length), W = -1, z = 0; z < U; ++z) {
1431
- var fe = I[z];
1432
- if (fe !== j[z]) return R(M[z], C[z]) < 0 ? M.substr(0, z) + C[z] + C.substr(z + 1) : R(M[z], j[z]) < 0 ? M.substr(0, z) + j[z] + C.substr(z + 1) : 0 <= W ? M.substr(0, W) + I[W] + C.substr(W + 1) : null;
1433
- R(M[z], fe) < 0 && (W = z);
1427
+ var I = function(M, C, R, K, T, L) {
1428
+ for (var U = Math.min(M.length, K.length), W = -1, z = 0; z < U; ++z) {
1429
+ var fe = C[z];
1430
+ if (fe !== K[z]) return T(M[z], R[z]) < 0 ? M.substr(0, z) + R[z] + R.substr(z + 1) : T(M[z], K[z]) < 0 ? M.substr(0, z) + K[z] + R.substr(z + 1) : 0 <= W ? M.substr(0, W) + C[W] + R.substr(W + 1) : null;
1431
+ T(M[z], fe) < 0 && (W = z);
1434
1432
  }
1435
- return U < j.length && L === "next" ? M + C.substr(M.length) : U < M.length && L === "prev" ? M.substr(0, C.length) : W < 0 ? null : M.substr(0, W) + j[W] + C.substr(W + 1);
1433
+ return U < K.length && L === "next" ? M + R.substr(M.length) : U < M.length && L === "prev" ? M.substr(0, R.length) : W < 0 ? null : M.substr(0, W) + K[W] + R.substr(W + 1);
1436
1434
  }(S, E, u[A], h[A], c, g);
1437
- P === null && O === null ? p = A + 1 : (O === null || 0 < c(O, P)) && (O = P);
1435
+ I === null && O === null ? p = A + 1 : (O === null || 0 < c(O, I)) && (O = I);
1438
1436
  }
1439
1437
  return v(O !== null ? function() {
1440
1438
  m.continue(O + b);
@@ -1542,20 +1540,20 @@ var Mr = { exports: {} };
1542
1540
  return E[0] !== void 0 && E[1] !== void 0 && o(E[0], E[1]) <= 0;
1543
1541
  })) return de(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", $.InvalidArgument);
1544
1542
  var h = !t || t.includeLowers !== !1, g = t && t.includeUppers === !0, b, f = o;
1545
- function w(E, O) {
1543
+ function _(E, O) {
1546
1544
  return f(E[0], O[0]);
1547
1545
  }
1548
1546
  try {
1549
1547
  (b = S.reduce(function(E, O) {
1550
- for (var A = 0, P = E.length; A < P; ++A) {
1548
+ for (var A = 0, I = E.length; A < I; ++A) {
1551
1549
  var M = E[A];
1552
1550
  if (i(O[0], M[1]) < 0 && 0 < i(O[1], M[0])) {
1553
1551
  M[0] = c(M[0], O[0]), M[1] = u(M[1], O[1]);
1554
1552
  break;
1555
1553
  }
1556
1554
  }
1557
- return A === P && E.push(O), E;
1558
- }, [])).sort(w);
1555
+ return A === I && E.push(O), E;
1556
+ }, [])).sort(_);
1559
1557
  } catch {
1560
1558
  return de(this, Se);
1561
1559
  }
@@ -1571,10 +1569,10 @@ var Mr = { exports: {} };
1571
1569
  return Ce(b[0][0], b[b.length - 1][1], !h, !g);
1572
1570
  });
1573
1571
  return S._ondirectionchange = function(E) {
1574
- f = E === "next" ? (y = m, o) : (y = v, a), b.sort(w);
1572
+ f = E === "next" ? (y = m, o) : (y = v, a), b.sort(_);
1575
1573
  }, S._addAlgorithm(function(E, O, A) {
1576
- for (var P, M = E.key; y(M); ) if (++p === b.length) return O(A), !1;
1577
- return !m(P = M) && !v(P) || (n._cmp(M, b[p][1]) === 0 || n._cmp(M, b[p][0]) === 0 || O(function() {
1574
+ for (var I, M = E.key; y(M); ) if (++p === b.length) return O(A), !1;
1575
+ return !m(I = M) && !v(I) || (n._cmp(M, b[p][1]) === 0 || n._cmp(M, b[p][0]) === 0 || O(function() {
1578
1576
  f === o ? E.continue(b[p][0]) : E.continue(b[p][1]);
1579
1577
  }), !1);
1580
1578
  }), S;
@@ -1633,13 +1631,13 @@ var Mr = { exports: {} };
1633
1631
  var i = this;
1634
1632
  if (e === "readwrite" && this.mode !== "readwrite") return te(new $.ReadOnly("Transaction is readonly"));
1635
1633
  if (!this.active) return te(new $.TransactionInactive());
1636
- if (this._locked()) return new N(function(a, c) {
1634
+ if (this._locked()) return new B(function(a, c) {
1637
1635
  i._blockedFuncs.push([function() {
1638
1636
  i._promise(e, t, n).then(a, c);
1639
1637
  }, G]);
1640
1638
  });
1641
1639
  if (n) return De(function() {
1642
- var a = new N(function(c, u) {
1640
+ var a = new B(function(c, u) {
1643
1641
  i._lock();
1644
1642
  var h = t(c, u, i);
1645
1643
  h && h.then && h.then(c, u);
@@ -1648,7 +1646,7 @@ var Mr = { exports: {} };
1648
1646
  return i._unlock();
1649
1647
  }), a._lib = !0, a;
1650
1648
  });
1651
- var o = new N(function(a, c) {
1649
+ var o = new B(function(a, c) {
1652
1650
  var u = t(a, c, i);
1653
1651
  u && u.then && u.then(a, c);
1654
1652
  });
@@ -1656,7 +1654,7 @@ var Mr = { exports: {} };
1656
1654
  }, be.prototype._root = function() {
1657
1655
  return this.parent ? this.parent._root() : this;
1658
1656
  }, be.prototype.waitFor = function(e) {
1659
- var t, n = this._root(), i = N.resolve(e);
1657
+ var t, n = this._root(), i = B.resolve(e);
1660
1658
  n._waitingFor ? n._waitingFor = n._waitingFor.then(function() {
1661
1659
  return i;
1662
1660
  }) : (n._waitingFor = i, n._waitingQueue = [], t = n.idbtrans.objectStore(n.storeNames[0]), function a() {
@@ -1664,7 +1662,7 @@ var Mr = { exports: {} };
1664
1662
  n._waitingFor && (t.get(-1 / 0).onsuccess = a);
1665
1663
  }());
1666
1664
  var o = n._waitingFor;
1667
- return new N(function(a, c) {
1665
+ return new B(function(a, c) {
1668
1666
  i.then(function(u) {
1669
1667
  return n._waitingQueue.push(ee(a.bind(null, u)));
1670
1668
  }, function(u) {
@@ -1677,7 +1675,7 @@ var Mr = { exports: {} };
1677
1675
  this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new $.Abort()));
1678
1676
  }, be.prototype.table = function(e) {
1679
1677
  var t = this._memoizedTables || (this._memoizedTables = {});
1680
- if (q(t, e)) return t[e];
1678
+ if (X(t, e)) return t[e];
1681
1679
  var n = this.schema[e];
1682
1680
  if (!n) throw new $.NotFound("Table " + e + " not part of transaction");
1683
1681
  return n = new this.db.Table(e, n, this), n.core = this.db.core.table(e), t[e] = n;
@@ -1734,77 +1732,77 @@ var Mr = { exports: {} };
1734
1732
  var p = y.lower, m = y.upper, v = y.lowerOpen, y = y.upperOpen;
1735
1733
  return p === void 0 ? m === void 0 ? null : t.upperBound(m, !!y) : m === void 0 ? t.lowerBound(p, !!v) : t.bound(p, m, !!v, !!y);
1736
1734
  }
1737
- function o(w) {
1738
- var p, m = w.name;
1739
- return { name: m, schema: w, mutate: function(v) {
1735
+ function o(_) {
1736
+ var p, m = _.name;
1737
+ return { name: m, schema: _, mutate: function(v) {
1740
1738
  var y = v.trans, S = v.type, E = v.keys, O = v.values, A = v.range;
1741
- return new Promise(function(P, M) {
1742
- P = ee(P);
1743
- var I = y.objectStore(m), C = I.keyPath == null, j = S === "put" || S === "add";
1744
- if (!j && S !== "delete" && S !== "deleteRange") throw new Error("Invalid operation type: " + S);
1745
- var R, L = (E || O || { length: 1 }).length;
1739
+ return new Promise(function(I, M) {
1740
+ I = ee(I);
1741
+ var C = y.objectStore(m), R = C.keyPath == null, K = S === "put" || S === "add";
1742
+ if (!K && S !== "delete" && S !== "deleteRange") throw new Error("Invalid operation type: " + S);
1743
+ var T, L = (E || O || { length: 1 }).length;
1746
1744
  if (E && O && E.length !== O.length) throw new Error("Given keys array must have same length as given values array.");
1747
- if (L === 0) return P({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
1745
+ if (L === 0) return I({ numFailures: 0, failures: {}, results: [], lastResult: void 0 });
1748
1746
  function U(ue) {
1749
1747
  ++fe, pt(ue);
1750
1748
  }
1751
1749
  var W = [], z = [], fe = 0;
1752
1750
  if (S === "deleteRange") {
1753
- if (A.type === 4) return P({ numFailures: fe, failures: z, results: [], lastResult: void 0 });
1754
- A.type === 3 ? W.push(R = I.clear()) : W.push(R = I.delete(i(A)));
1751
+ if (A.type === 4) return I({ numFailures: fe, failures: z, results: [], lastResult: void 0 });
1752
+ A.type === 3 ? W.push(T = C.clear()) : W.push(T = C.delete(i(A)));
1755
1753
  } else {
1756
- var C = j ? C ? [O, E] : [O, null] : [E, null], F = C[0], se = C[1];
1757
- if (j) for (var ce = 0; ce < L; ++ce) W.push(R = se && se[ce] !== void 0 ? I[S](F[ce], se[ce]) : I[S](F[ce])), R.onerror = U;
1758
- else for (ce = 0; ce < L; ++ce) W.push(R = I[S](F[ce])), R.onerror = U;
1754
+ var R = K ? R ? [O, E] : [O, null] : [E, null], F = R[0], se = R[1];
1755
+ if (K) for (var ce = 0; ce < L; ++ce) W.push(T = se && se[ce] !== void 0 ? C[S](F[ce], se[ce]) : C[S](F[ce])), T.onerror = U;
1756
+ else for (ce = 0; ce < L; ++ce) W.push(T = C[S](F[ce])), T.onerror = U;
1759
1757
  }
1760
1758
  function Jt(ue) {
1761
1759
  ue = ue.target.result, W.forEach(function(ze, Gn) {
1762
1760
  return ze.error != null && (z[Gn] = ze.error);
1763
- }), P({ numFailures: fe, failures: z, results: S === "delete" ? E : W.map(function(ze) {
1761
+ }), I({ numFailures: fe, failures: z, results: S === "delete" ? E : W.map(function(ze) {
1764
1762
  return ze.result;
1765
1763
  }), lastResult: ue });
1766
1764
  }
1767
- R.onerror = function(ue) {
1765
+ T.onerror = function(ue) {
1768
1766
  U(ue), Jt(ue);
1769
- }, R.onsuccess = Jt;
1767
+ }, T.onsuccess = Jt;
1770
1768
  });
1771
1769
  }, getMany: function(v) {
1772
1770
  var y = v.trans, S = v.keys;
1773
1771
  return new Promise(function(E, O) {
1774
1772
  E = ee(E);
1775
- for (var A, P = y.objectStore(m), M = S.length, I = new Array(M), C = 0, j = 0, R = function(W) {
1776
- W = W.target, I[W._pos] = W.result, ++j === C && E(I);
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);
1778
- C === 0 && E(I);
1773
+ for (var A, I = y.objectStore(m), M = S.length, C = new Array(M), R = 0, K = 0, T = function(W) {
1774
+ W = W.target, C[W._pos] = W.result, ++K === R && E(C);
1775
+ }, L = me(O), U = 0; U < M; ++U) S[U] != null && ((A = I.get(S[U]))._pos = U, A.onsuccess = T, A.onerror = L, ++R);
1776
+ R === 0 && E(C);
1779
1777
  });
1780
1778
  }, get: function(v) {
1781
1779
  var y = v.trans, S = v.key;
1782
1780
  return new Promise(function(E, O) {
1783
1781
  E = ee(E);
1784
1782
  var A = y.objectStore(m).get(S);
1785
- A.onsuccess = function(P) {
1786
- return E(P.target.result);
1783
+ A.onsuccess = function(I) {
1784
+ return E(I.target.result);
1787
1785
  }, A.onerror = me(O);
1788
1786
  });
1789
1787
  }, query: (p = g, function(v) {
1790
1788
  return new Promise(function(y, S) {
1791
1789
  y = ee(y);
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);
1790
+ var E, O, A, R = v.trans, I = v.values, M = v.limit, T = v.query, C = M === 1 / 0 ? void 0 : M, K = T.index, T = T.range, R = R.objectStore(m), K = K.isPrimaryKey ? R : R.index(K.name), T = i(T);
1793
1791
  if (M === 0) return y({ result: [] });
1794
- p ? ((I = P ? j.getAll(R, I) : j.getAllKeys(R, I)).onsuccess = function(L) {
1792
+ p ? ((C = I ? K.getAll(T, C) : K.getAllKeys(T, C)).onsuccess = function(L) {
1795
1793
  return y({ result: L.target.result });
1796
- }, I.onerror = me(S)) : (E = 0, O = !P && "openKeyCursor" in j ? j.openKeyCursor(R) : j.openCursor(R), A = [], O.onsuccess = function(L) {
1794
+ }, C.onerror = me(S)) : (E = 0, O = !I && "openKeyCursor" in K ? K.openKeyCursor(T) : K.openCursor(T), A = [], O.onsuccess = function(L) {
1797
1795
  var U = O.result;
1798
- return U ? (A.push(P ? U.value : U.primaryKey), ++E === M ? y({ result: A }) : void U.continue()) : y({ result: A });
1796
+ return U ? (A.push(I ? U.value : U.primaryKey), ++E === M ? y({ result: A }) : void U.continue()) : y({ result: A });
1799
1797
  }, O.onerror = me(S));
1800
1798
  });
1801
1799
  }), openCursor: function(v) {
1802
1800
  var y = v.trans, S = v.values, E = v.query, O = v.reverse, A = v.unique;
1803
- return new Promise(function(P, M) {
1804
- P = ee(P);
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 = ee(function(L) {
1807
- var U, W, z, fe, F = R.result;
1801
+ return new Promise(function(I, M) {
1802
+ I = ee(I);
1803
+ var K = E.index, C = E.range, R = y.objectStore(m), R = K.isPrimaryKey ? R : R.index(K.name), K = O ? A ? "prevunique" : "prev" : A ? "nextunique" : "next", T = !S && "openKeyCursor" in R ? R.openKeyCursor(i(C), K) : R.openCursor(i(C), K);
1804
+ T.onerror = me(M), T.onsuccess = ee(function(L) {
1805
+ var U, W, z, fe, F = T.result;
1808
1806
  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
1807
  throw new Error("Cursor not stopped");
1810
1808
  }, F.trans = y, F.stop = F.continue = F.continuePrimaryKey = F.advance = function() {
@@ -1818,7 +1816,7 @@ var Mr = { exports: {} };
1818
1816
  });
1819
1817
  }, F.start = function(se) {
1820
1818
  function ce() {
1821
- if (R.result) try {
1819
+ if (T.result) try {
1822
1820
  se();
1823
1821
  } catch (ue) {
1824
1822
  F.fail(ue);
@@ -1828,44 +1826,44 @@ var Mr = { exports: {} };
1828
1826
  }, F.stop();
1829
1827
  }
1830
1828
  var Jt = new Promise(function(ue, ze) {
1831
- ue = ee(ue), R.onerror = me(ze), F.fail = ze, F.stop = function(Gn) {
1829
+ ue = ee(ue), T.onerror = me(ze), F.fail = ze, F.stop = function(Gn) {
1832
1830
  F.stop = F.continue = F.continuePrimaryKey = F.advance = fe, ue(Gn);
1833
1831
  };
1834
1832
  });
1835
- return R.onsuccess = ee(function(ue) {
1836
- R.onsuccess = ce, ce();
1833
+ return T.onsuccess = ee(function(ue) {
1834
+ T.onsuccess = ce, ce();
1837
1835
  }), F.continue = U, F.continuePrimaryKey = W, F.advance = z, ce(), Jt;
1838
- }, P(F)) : P(null);
1836
+ }, I(F)) : I(null);
1839
1837
  }, M);
1840
1838
  });
1841
1839
  }, count: function(v) {
1842
1840
  var y = v.query, S = v.trans, E = y.index, O = y.range;
1843
- return new Promise(function(A, P) {
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 = ee(function(C) {
1846
- return A(C.target.result);
1847
- }), I.onerror = me(P);
1841
+ return new Promise(function(A, I) {
1842
+ var M = S.objectStore(m), C = E.isPrimaryKey ? M : M.index(E.name), M = i(O), C = M ? C.count(M) : C.count();
1843
+ C.onsuccess = ee(function(R) {
1844
+ return A(R.target.result);
1845
+ }), C.onerror = me(I);
1848
1846
  });
1849
1847
  } };
1850
1848
  }
1851
- var a, c, u, b = (c = h, u = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: u.map(function(w) {
1852
- return c.objectStore(w);
1853
- }).map(function(w) {
1854
- var p = w.keyPath, y = w.autoIncrement, m = B(p), v = {}, y = { name: w.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: m, keyPath: p, autoIncrement: y, unique: !0, extractKey: Sn(p) }, indexes: yr(w.indexNames).map(function(S) {
1855
- return w.index(S);
1849
+ var a, c, u, b = (c = h, u = yr((a = e).objectStoreNames), { schema: { name: a.name, tables: u.map(function(_) {
1850
+ return c.objectStore(_);
1851
+ }).map(function(_) {
1852
+ var p = _.keyPath, y = _.autoIncrement, m = P(p), v = {}, y = { name: _.name, primaryKey: { name: null, isPrimaryKey: !0, outbound: p == null, compound: m, keyPath: p, autoIncrement: y, unique: !0, extractKey: Sn(p) }, indexes: yr(_.indexNames).map(function(S) {
1853
+ return _.index(S);
1856
1854
  }).map(function(A) {
1857
- var E = A.name, O = A.unique, P = A.multiEntry, A = A.keyPath, P = { name: E, compound: B(A), keyPath: A, unique: O, multiEntry: P, extractKey: Sn(A) };
1858
- return v[mt(A)] = P;
1855
+ var E = A.name, O = A.unique, I = A.multiEntry, A = A.keyPath, I = { name: E, compound: P(A), keyPath: A, unique: O, multiEntry: I, extractKey: Sn(A) };
1856
+ return v[mt(A)] = I;
1859
1857
  }), getIndexByKeyPath: function(S) {
1860
1858
  return v[mt(S)];
1861
1859
  } };
1862
1860
  return v[":id"] = y.primaryKey, p != null && (v[mt(p)] = y.primaryKey), y;
1863
1861
  }) }, hasGetAll: 0 < u.length && "getAll" in c.objectStore(u[0]) && !(typeof navigator < "u" && /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604) }), h = b.schema, g = b.hasGetAll, b = h.tables.map(o), f = {};
1864
- return b.forEach(function(w) {
1865
- return f[w.name] = w;
1866
- }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(w) {
1867
- if (!f[w]) throw new Error("Table '".concat(w, "' not found"));
1868
- return f[w];
1862
+ return b.forEach(function(_) {
1863
+ return f[_.name] = _;
1864
+ }), { stack: "dbcore", transaction: e.transaction.bind(e), table: function(_) {
1865
+ if (!f[_]) throw new Error("Table '".concat(_, "' not found"));
1866
+ return f[_];
1869
1867
  }, MIN_KEY: -1 / 0, MAX_KEY: yt(t), schema: h };
1870
1868
  }
1871
1869
  function di(e, t, n, i) {
@@ -1888,7 +1886,7 @@ var Mr = { exports: {} };
1888
1886
  var a = i[o];
1889
1887
  t.forEach(function(c) {
1890
1888
  var u = function h(g, b) {
1891
- return Fr(g, b) || (g = V(g)) && h(g, b);
1889
+ return Fr(g, b) || (g = Z(g)) && h(g, b);
1892
1890
  }(c, o);
1893
1891
  (!u || "value" in u && u.value === void 0) && (c === e.Transaction.prototype || c instanceof e.Transaction ? Ae(c, o, { get: function() {
1894
1892
  return this.table(o);
@@ -1915,45 +1913,45 @@ var Mr = { exports: {} };
1915
1913
  De(function() {
1916
1914
  return G.trans = a, G.transless = u, t !== 0 ? (Bt(e, n), g = t, ((h = a).storeNames.includes("$meta") ? h.table("$meta").get("version").then(function(b) {
1917
1915
  return b ?? g;
1918
- }) : N.resolve(g)).then(function(b) {
1919
- return w = b, p = a, m = n, v = [], b = (f = e)._versions, y = f._dbSchema = $t(0, f.idbdb, m), (b = b.filter(function(S) {
1920
- return S._cfg.version >= w;
1916
+ }) : B.resolve(g)).then(function(b) {
1917
+ return _ = b, p = a, m = n, v = [], b = (f = e)._versions, y = f._dbSchema = $t(0, f.idbdb, m), (b = b.filter(function(S) {
1918
+ return S._cfg.version >= _;
1921
1919
  })).length !== 0 ? (b.forEach(function(S) {
1922
1920
  v.push(function() {
1923
1921
  var E = y, O = S._cfg.dbschema;
1924
1922
  Ft(f, E, m), Ft(f, O, m), y = f._dbSchema = O;
1925
1923
  var A = On(E, O);
1926
- A.add.forEach(function(j) {
1927
- xn(m, j[0], j[1].primKey, j[1].indexes);
1928
- }), A.change.forEach(function(j) {
1929
- if (j.recreate) throw new $.Upgrade("Not yet support for changing primary key");
1930
- var R = m.objectStore(j.name);
1931
- j.add.forEach(function(L) {
1932
- return Gt(R, L);
1933
- }), j.change.forEach(function(L) {
1934
- R.deleteIndex(L.name), Gt(R, L);
1935
- }), j.del.forEach(function(L) {
1936
- return R.deleteIndex(L);
1924
+ A.add.forEach(function(K) {
1925
+ xn(m, K[0], K[1].primKey, K[1].indexes);
1926
+ }), A.change.forEach(function(K) {
1927
+ if (K.recreate) throw new $.Upgrade("Not yet support for changing primary key");
1928
+ var T = m.objectStore(K.name);
1929
+ K.add.forEach(function(L) {
1930
+ return Gt(T, L);
1931
+ }), K.change.forEach(function(L) {
1932
+ T.deleteIndex(L.name), Gt(T, L);
1933
+ }), K.del.forEach(function(L) {
1934
+ return T.deleteIndex(L);
1937
1935
  });
1938
1936
  });
1939
- var P = S._cfg.contentUpgrade;
1940
- if (P && S._cfg.version > w) {
1937
+ var I = S._cfg.contentUpgrade;
1938
+ if (I && S._cfg.version > _) {
1941
1939
  Bt(f, m), p._memoizedTables = {};
1942
1940
  var M = Yn(O);
1943
- A.del.forEach(function(j) {
1944
- M[j] = E[j];
1945
- }), En(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], T(M), M), p.schema = M;
1946
- var I, C = nn(P);
1947
- return C && qe(), A = N.follow(function() {
1948
- var j;
1949
- (I = P(p)) && C && (j = Pe.bind(null, null), I.then(j, j));
1950
- }), I && typeof I.then == "function" ? N.resolve(I) : A.then(function() {
1951
- return I;
1941
+ A.del.forEach(function(K) {
1942
+ M[K] = E[K];
1943
+ }), En(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], j(M), M), p.schema = M;
1944
+ var C, R = nn(I);
1945
+ return R && qe(), A = B.follow(function() {
1946
+ var K;
1947
+ (C = I(p)) && R && (K = Pe.bind(null, null), C.then(K, K));
1948
+ }), C && typeof C.then == "function" ? B.resolve(C) : A.then(function() {
1949
+ return C;
1952
1950
  });
1953
1951
  }
1954
1952
  }), v.push(function(E) {
1955
- var O, A, P = S._cfg.dbschema;
1956
- O = P, A = E, [].slice.call(A.db.objectStoreNames).forEach(function(M) {
1953
+ var O, A, I = S._cfg.dbschema;
1954
+ O = I, A = E, [].slice.call(A.db.objectStoreNames).forEach(function(M) {
1957
1955
  return O[M] == null && A.db.deleteObjectStore(M);
1958
1956
  }), En(f, [f.Transaction.prototype]), Lt(f, [f.Transaction.prototype], f._storeNames, f._dbSchema), p.schema = f._dbSchema;
1959
1957
  }), v.push(function(E) {
@@ -1962,14 +1960,14 @@ var Mr = { exports: {} };
1962
1960
  })) : E.objectStore("$meta").put(S._cfg.version, "version"));
1963
1961
  });
1964
1962
  }), function S() {
1965
- return v.length ? N.resolve(v.shift()(p.idbtrans)).then(S) : N.resolve();
1963
+ return v.length ? B.resolve(v.shift()(p.idbtrans)).then(S) : B.resolve();
1966
1964
  }().then(function() {
1967
1965
  mr(y, m);
1968
- })) : N.resolve();
1969
- var f, w, p, m, v, y;
1970
- }).catch(c)) : (T(o).forEach(function(b) {
1966
+ })) : B.resolve();
1967
+ var f, _, p, m, v, y;
1968
+ }).catch(c)) : (j(o).forEach(function(b) {
1971
1969
  xn(n, b, o[b].primKey, o[b].indexes);
1972
- }), Bt(e, n), void N.follow(function() {
1970
+ }), Bt(e, n), void B.follow(function() {
1973
1971
  return e.on.populate.fire(a);
1974
1972
  }).catch(c));
1975
1973
  var h, g;
@@ -2018,7 +2016,7 @@ var Mr = { exports: {} };
2018
2016
  }), o;
2019
2017
  }
2020
2018
  function mr(e, t) {
2021
- T(e).forEach(function(n) {
2019
+ j(e).forEach(function(n) {
2022
2020
  t.db.objectStoreNames.contains(n) || (ye && console.debug("Dexie: Creating missing table", n), xn(t, n, e[n].primKey, e[n].indexes));
2023
2021
  });
2024
2022
  }
@@ -2049,11 +2047,11 @@ var Mr = { exports: {} };
2049
2047
  function br(e) {
2050
2048
  return e.split(",").map(function(t, n) {
2051
2049
  var i = (t = t.trim()).replace(/([&*]|\+\+)/g, ""), o = /^\[/.test(i) ? i.match(/^\[(.*)\]$/)[1].split("+") : i;
2052
- return wn(i, o || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), B(o), n === 0);
2050
+ return wn(i, o || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), P(o), n === 0);
2053
2051
  });
2054
2052
  }
2055
2053
  var gi = (Ut.prototype._parseStoresSpec = function(e, t) {
2056
- T(e).forEach(function(n) {
2054
+ j(e).forEach(function(n) {
2057
2055
  if (e[n] !== null) {
2058
2056
  var i = br(e[n]), o = i.shift();
2059
2057
  if (o.unique = !0, o.multi) throw new $.Schema("Primary key cannot be multi-valued");
@@ -2065,19 +2063,19 @@ var Mr = { exports: {} };
2065
2063
  });
2066
2064
  }, Ut.prototype.stores = function(n) {
2067
2065
  var t = this.db;
2068
- this._cfg.storesSource = this._cfg.storesSource ? Q(this._cfg.storesSource, n) : n;
2066
+ this._cfg.storesSource = this._cfg.storesSource ? Y(this._cfg.storesSource, n) : n;
2069
2067
  var n = t._versions, i = {}, o = {};
2070
2068
  return n.forEach(function(a) {
2071
- Q(i, a._cfg.storesSource), o = a._cfg.dbschema = {}, a._parseStoresSpec(i, o);
2072
- }), t._dbSchema = o, En(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], T(o), o), t._storeNames = T(o), this;
2069
+ Y(i, a._cfg.storesSource), o = a._cfg.dbschema = {}, a._parseStoresSpec(i, o);
2070
+ }), t._dbSchema = o, En(t, [t._allTables, t, t.Transaction.prototype]), Lt(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], j(o), o), t._storeNames = j(o), this;
2073
2071
  }, Ut.prototype.upgrade = function(e) {
2074
- return this._cfg.contentUpgrade = on(this._cfg.contentUpgrade || X, e), this;
2072
+ return this._cfg.contentUpgrade = on(this._cfg.contentUpgrade || J, e), this;
2075
2073
  }, Ut);
2076
2074
  function Ut() {
2077
2075
  }
2078
2076
  function An(e, t) {
2079
2077
  var n = e._dbNamesDB;
2080
- return n || (n = e._dbNamesDB = new Oe(Mt, { addons: [], indexedDB: e, IDBKeyRange: t })).version(1).stores({ dbnames: "name" }), n.table("dbnames");
2078
+ return n || (n = e._dbNamesDB = new Oe(Tt, { addons: [], indexedDB: e, IDBKeyRange: t })).version(1).stores({ dbnames: "name" }), n.table("dbnames");
2081
2079
  }
2082
2080
  function kn(e) {
2083
2081
  return e && typeof e.databases == "function";
@@ -2093,15 +2091,15 @@ var Mr = { exports: {} };
2093
2091
  var ae = function(e, t) {
2094
2092
  if (!this) {
2095
2093
  var n = new ae();
2096
- return e && "d" in e && Q(n, e), n;
2094
+ return e && "d" in e && Y(n, e), n;
2097
2095
  }
2098
- Q(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2096
+ Y(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
2099
2097
  };
2100
2098
  function bt(e, t, n) {
2101
2099
  var i = H(t, n);
2102
2100
  if (!isNaN(i)) {
2103
2101
  if (0 < i) throw RangeError();
2104
- if (Pn(e)) return Q(e, { from: t, to: n, d: 1 });
2102
+ if (Pn(e)) return Y(e, { from: t, to: n, d: 1 });
2105
2103
  var o = e.l, i = e.r;
2106
2104
  if (H(n, e.from) < 0) return o ? bt(o, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, wr(e);
2107
2105
  if (0 < H(t, e.to)) return i ? bt(i, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, wr(e);
@@ -2152,10 +2150,10 @@ var Mr = { exports: {} };
2152
2150
  return (t ? n ? Math.max(t.d, n.d) : t.d : n ? n.d : 0) + 1;
2153
2151
  }
2154
2152
  function zt(e, t) {
2155
- return T(t).forEach(function(n) {
2153
+ return j(t).forEach(function(n) {
2156
2154
  e[n] ? vt(e[n], t[n]) : e[n] = function i(o) {
2157
2155
  var a, c, u = {};
2158
- for (a in o) q(o, a) && (c = o[a], u[a] = !c || typeof c != "object" || Xn.has(c.constructor) ? c : i(c));
2156
+ for (a in o) X(o, a) && (c = o[a], u[a] = !c || typeof c != "object" || Xn.has(c.constructor) ? c : i(c));
2159
2157
  return u;
2160
2158
  }(t[n]);
2161
2159
  }), e;
@@ -2183,10 +2181,10 @@ var Mr = { exports: {} };
2183
2181
  var Ue = {}, Cn = {}, Rn = !1;
2184
2182
  function Ht(e) {
2185
2183
  zt(Cn, e), Rn || (Rn = !0, setTimeout(function() {
2186
- Rn = !1, Mn(Cn, !(Cn = {}));
2184
+ Rn = !1, Tn(Cn, !(Cn = {}));
2187
2185
  }, 0));
2188
2186
  }
2189
- function Mn(e, t) {
2187
+ function Tn(e, t) {
2190
2188
  t === void 0 && (t = !1);
2191
2189
  var n = /* @__PURE__ */ new Set();
2192
2190
  if (e.all) for (var i = 0, o = Object.values(Ue); i < o.length; i++) Sr(c = o[i], e, n, t);
@@ -2201,10 +2199,10 @@ var Mr = { exports: {} };
2201
2199
  function Sr(e, t, n, i) {
2202
2200
  for (var o = [], a = 0, c = Object.entries(e.queries.query); a < c.length; a++) {
2203
2201
  for (var u = c[a], h = u[0], g = [], b = 0, f = u[1]; b < f.length; b++) {
2204
- var w = f[b];
2205
- In(t, w.obsSet) ? w.subscribers.forEach(function(y) {
2202
+ var _ = f[b];
2203
+ In(t, _.obsSet) ? _.subscribers.forEach(function(y) {
2206
2204
  return n.add(y);
2207
- }) : i && g.push(w);
2205
+ }) : i && g.push(_);
2208
2206
  }
2209
2207
  i && o.push([h, g]);
2210
2208
  }
@@ -2224,7 +2222,7 @@ var Mr = { exports: {} };
2224
2222
  if (t.openCanceller !== i) throw new $.DatabaseClosed("db.open() was cancelled");
2225
2223
  }
2226
2224
  function u() {
2227
- return new N(function(w, p) {
2225
+ return new B(function(_, p) {
2228
2226
  if (c(), !n) throw new $.MissingAPI();
2229
2227
  var m = e.name, v = t.autoSchema || !o ? n.open(m) : n.open(m, o);
2230
2228
  if (!v) throw new $.MissingAPI();
@@ -2235,73 +2233,73 @@ var Mr = { exports: {} };
2235
2233
  })) : (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
2234
  }, p), v.onsuccess = ee(function() {
2237
2235
  b = null;
2238
- var y, S, E, O, A, P = e.idbdb = v.result, M = St(P.objectStoreNames);
2236
+ var y, S, E, O, A, I = e.idbdb = v.result, M = St(I.objectStoreNames);
2239
2237
  if (0 < M.length) try {
2240
- var I = P.transaction((O = M).length === 1 ? O[0] : O, "readonly");
2241
- if (t.autoSchema) S = P, E = I, (y = e).verno = S.version / 10, E = y._dbSchema = $t(0, S, E), y._storeNames = St(S.objectStoreNames, 0), Lt(y, [y._allTables], T(E), E);
2242
- else if (Ft(e, e._dbSchema, I), ((A = On($t(0, (A = e).idbdb, I), A._dbSchema)).add.length || A.change.some(function(C) {
2243
- return C.add.length || C.change.length;
2244
- })) && !a) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), P.close(), o = P.version + 1, a = !0, w(u());
2245
- Bt(e, I);
2238
+ var C = I.transaction((O = M).length === 1 ? O[0] : O, "readonly");
2239
+ if (t.autoSchema) S = I, E = C, (y = e).verno = S.version / 10, E = y._dbSchema = $t(0, S, E), y._storeNames = St(S.objectStoreNames, 0), Lt(y, [y._allTables], j(E), E);
2240
+ else if (Ft(e, e._dbSchema, C), ((A = On($t(0, (A = e).idbdb, C), A._dbSchema)).add.length || A.change.some(function(R) {
2241
+ return R.add.length || R.change.length;
2242
+ })) && !a) return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."), I.close(), o = I.version + 1, a = !0, _(u());
2243
+ Bt(e, C);
2246
2244
  } catch {
2247
2245
  }
2248
- et.push(e), P.onversionchange = ee(function(C) {
2249
- t.vcFired = !0, e.on("versionchange").fire(C);
2250
- }), P.onclose = ee(function(C) {
2251
- e.on("close").fire(C);
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();
2246
+ et.push(e), I.onversionchange = ee(function(R) {
2247
+ t.vcFired = !0, e.on("versionchange").fire(R);
2248
+ }), I.onclose = ee(function(R) {
2249
+ e.on("close").fire(R);
2250
+ }), f && (A = e._deps, C = m, I = A.indexedDB, A = A.IDBKeyRange, kn(I) || C === Tt || An(I, A).put({ name: C }).catch(J)), _();
2253
2251
  }, p);
2254
- }).catch(function(w) {
2255
- switch (w == null ? void 0 : w.name) {
2252
+ }).catch(function(_) {
2253
+ switch (_ == null ? void 0 : _.name) {
2256
2254
  case "UnknownError":
2257
2255
  if (0 < t.PR1398_maxLoop) return t.PR1398_maxLoop--, console.warn("Dexie: Workaround for Chrome UnknownError on open()"), u();
2258
2256
  break;
2259
2257
  case "VersionError":
2260
2258
  if (0 < o) return o = 0, u();
2261
2259
  }
2262
- return N.reject(w);
2260
+ return B.reject(_);
2263
2261
  });
2264
2262
  }
2265
2263
  var h, g = t.dbReadyResolve, b = null, f = !1;
2266
- return N.race([i, (typeof navigator > "u" ? N.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(w) {
2264
+ return B.race([i, (typeof navigator > "u" ? B.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(_) {
2267
2265
  function p() {
2268
- return indexedDB.databases().finally(w);
2266
+ return indexedDB.databases().finally(_);
2269
2267
  }
2270
2268
  h = setInterval(p, 100), p();
2271
2269
  }).finally(function() {
2272
2270
  return clearInterval(h);
2273
2271
  }) : Promise.resolve()).then(u)]).then(function() {
2274
- return c(), t.onReadyBeingFired = [], N.resolve(Dn(function() {
2272
+ return c(), t.onReadyBeingFired = [], B.resolve(Dn(function() {
2275
2273
  return e.on.ready.fire(e.vip);
2276
- })).then(function w() {
2274
+ })).then(function _() {
2277
2275
  if (0 < t.onReadyBeingFired.length) {
2278
- var p = t.onReadyBeingFired.reduce(on, X);
2279
- return t.onReadyBeingFired = [], N.resolve(Dn(function() {
2276
+ var p = t.onReadyBeingFired.reduce(on, J);
2277
+ return t.onReadyBeingFired = [], B.resolve(Dn(function() {
2280
2278
  return p(e.vip);
2281
- })).then(w);
2279
+ })).then(_);
2282
2280
  }
2283
2281
  });
2284
2282
  }).finally(function() {
2285
2283
  t.openCanceller === i && (t.onReadyBeingFired = null, t.isBeingOpened = !1);
2286
- }).catch(function(w) {
2287
- t.dbOpenError = w;
2284
+ }).catch(function(_) {
2285
+ t.dbOpenError = _;
2288
2286
  try {
2289
2287
  b && b.abort();
2290
2288
  } catch {
2291
2289
  }
2292
- return i === t.openCanceller && e._close(), te(w);
2290
+ return i === t.openCanceller && e._close(), te(_);
2293
2291
  }).finally(function() {
2294
2292
  t.openComplete = !0, g();
2295
2293
  }).then(function() {
2296
- var w;
2297
- return f && (w = {}, e.tables.forEach(function(p) {
2294
+ var _;
2295
+ return f && (_ = {}, e.tables.forEach(function(p) {
2298
2296
  p.schema.indexes.forEach(function(m) {
2299
- m.name && (w["idb://".concat(e.name, "/").concat(p.name, "/").concat(m.name)] = new ae(-1 / 0, [[[]]]));
2300
- }), w["idb://".concat(e.name, "/").concat(p.name, "/")] = w["idb://".concat(e.name, "/").concat(p.name, "/:dels")] = new ae(-1 / 0, [[[]]]);
2301
- }), Re(gt).fire(w), Mn(w, !0)), e;
2297
+ m.name && (_["idb://".concat(e.name, "/").concat(p.name, "/").concat(m.name)] = new ae(-1 / 0, [[[]]]));
2298
+ }), _["idb://".concat(e.name, "/").concat(p.name, "/")] = _["idb://".concat(e.name, "/").concat(p.name, "/:dels")] = new ae(-1 / 0, [[[]]]);
2299
+ }), Re(gt).fire(_), Tn(_, !0)), e;
2302
2300
  });
2303
2301
  }
2304
- function Tn(e) {
2302
+ function Mn(e) {
2305
2303
  function t(a) {
2306
2304
  return e.next(a);
2307
2305
  }
@@ -2311,21 +2309,21 @@ var Mr = { exports: {} };
2311
2309
  function o(a) {
2312
2310
  return function(h) {
2313
2311
  var u = a(h), h = u.value;
2314
- return u.done ? h : h && typeof h.then == "function" ? h.then(n, i) : B(h) ? Promise.all(h).then(n, i) : n(h);
2312
+ return u.done ? h : h && typeof h.then == "function" ? h.then(n, i) : P(h) ? Promise.all(h).then(n, i) : n(h);
2315
2313
  };
2316
2314
  }
2317
2315
  return o(t)();
2318
2316
  }
2319
2317
  function Yt(e, t, n) {
2320
- for (var i = B(e) ? e.slice() : [e], o = 0; o < n; ++o) i.push(t);
2318
+ for (var i = P(e) ? e.slice() : [e], o = 0; o < n; ++o) i.push(t);
2321
2319
  return i;
2322
2320
  }
2323
2321
  var mi = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
2324
2322
  return l(l({}, e), { table: function(t) {
2325
2323
  var n = e.table(t), i = n.schema, o = {}, a = [];
2326
- function c(f, w, p) {
2327
- var m = mt(f), v = o[m] = o[m] || [], y = f == null ? 0 : typeof f == "string" ? 1 : f.length, S = 0 < w, S = l(l({}, p), { name: S ? "".concat(m, "(virtual-from:").concat(p.name, ")") : p.name, lowLevelIndex: p, isVirtual: S, keyTail: w, keyLength: y, extractKey: Sn(f), unique: !S && p.unique });
2328
- return v.push(S), S.isPrimaryKey || a.push(S), 1 < y && c(y === 2 ? f[0] : f.slice(0, y - 1), w + 1, p), v.sort(function(E, O) {
2324
+ function c(f, _, p) {
2325
+ var m = mt(f), v = o[m] = o[m] || [], y = f == null ? 0 : typeof f == "string" ? 1 : f.length, S = 0 < _, S = l(l({}, p), { name: S ? "".concat(m, "(virtual-from:").concat(p.name, ")") : p.name, lowLevelIndex: p, isVirtual: S, keyTail: _, keyLength: y, extractKey: Sn(f), unique: !S && p.unique });
2326
+ return v.push(S), S.isPrimaryKey || a.push(S), 1 < y && c(y === 2 ? f[0] : f.slice(0, y - 1), _ + 1, p), v.sort(function(E, O) {
2329
2327
  return E.keyTail - O.keyTail;
2330
2328
  }), S;
2331
2329
  }
@@ -2335,8 +2333,8 @@ var Mr = { exports: {} };
2335
2333
  c(g.keyPath, 0, g);
2336
2334
  }
2337
2335
  function b(f) {
2338
- var w, p = f.query.index;
2339
- return p.isVirtual ? l(l({}, f), { query: { index: p.lowLevelIndex, range: (w = f.query.range, p = p.keyTail, { type: w.type === 1 ? 2 : w.type, lower: Yt(w.lower, w.lowerOpen ? e.MAX_KEY : e.MIN_KEY, p), lowerOpen: !0, upper: Yt(w.upper, w.upperOpen ? e.MIN_KEY : e.MAX_KEY, p), upperOpen: !0 }) } }) : f;
2336
+ var _, p = f.query.index;
2337
+ return p.isVirtual ? l(l({}, f), { query: { index: p.lowLevelIndex, range: (_ = f.query.range, p = p.keyTail, { type: _.type === 1 ? 2 : _.type, lower: Yt(_.lower, _.lowerOpen ? e.MAX_KEY : e.MIN_KEY, p), lowerOpen: !0, upper: Yt(_.upper, _.upperOpen ? e.MIN_KEY : e.MAX_KEY, p), upperOpen: !0 }) } }) : f;
2340
2338
  }
2341
2339
  return l(l({}, n), { schema: l(l({}, i), { primaryKey: t, indexes: a, getIndexByKeyPath: function(f) {
2342
2340
  return (f = o[mt(f)]) && f[0];
@@ -2345,7 +2343,7 @@ var Mr = { exports: {} };
2345
2343
  }, query: function(f) {
2346
2344
  return n.query(b(f));
2347
2345
  }, openCursor: function(f) {
2348
- var w = f.query.index, p = w.keyTail, m = w.isVirtual, v = w.keyLength;
2346
+ var _ = f.query.index, p = _.keyTail, m = _.isVirtual, v = _.keyLength;
2349
2347
  return m ? n.openCursor(b(f)).then(function(S) {
2350
2348
  return S && y(S);
2351
2349
  }) : n.openCursor(f);
@@ -2367,11 +2365,11 @@ var Mr = { exports: {} };
2367
2365
  } });
2368
2366
  } };
2369
2367
  function jn(e, t, n, i) {
2370
- return n = n || {}, i = i || "", T(e).forEach(function(o) {
2368
+ return n = n || {}, i = i || "", j(e).forEach(function(o) {
2371
2369
  var a, c, u;
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
- }), T(t).forEach(function(o) {
2374
- q(e, o) || (n[i + o] = t[o]);
2370
+ X(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;
2371
+ }), j(t).forEach(function(o) {
2372
+ X(e, o) || (n[i + o] = t[o]);
2375
2373
  }), n;
2376
2374
  }
2377
2375
  function Kn(e, t) {
@@ -2384,28 +2382,28 @@ var Mr = { exports: {} };
2384
2382
  var a = G.trans, c = a.table(t).hook, u = c.deleting, h = c.creating, g = c.updating;
2385
2383
  switch (o.type) {
2386
2384
  case "add":
2387
- if (h.fire === X) break;
2385
+ if (h.fire === J) break;
2388
2386
  return a._promise("readwrite", function() {
2389
2387
  return b(o);
2390
2388
  }, !0);
2391
2389
  case "put":
2392
- if (h.fire === X && g.fire === X) break;
2390
+ if (h.fire === J && g.fire === J) break;
2393
2391
  return a._promise("readwrite", function() {
2394
2392
  return b(o);
2395
2393
  }, !0);
2396
2394
  case "delete":
2397
- if (u.fire === X) break;
2395
+ if (u.fire === J) break;
2398
2396
  return a._promise("readwrite", function() {
2399
2397
  return b(o);
2400
2398
  }, !0);
2401
2399
  case "deleteRange":
2402
- if (u.fire === X) break;
2400
+ if (u.fire === J) break;
2403
2401
  return a._promise("readwrite", function() {
2404
- return function f(w, p, m) {
2405
- return n.query({ trans: w, values: !1, query: { index: i, range: p }, limit: m }).then(function(v) {
2402
+ return function f(_, p, m) {
2403
+ return n.query({ trans: _, values: !1, query: { index: i, range: p }, limit: m }).then(function(v) {
2406
2404
  var y = v.result;
2407
- return b({ type: "delete", keys: y, trans: w }).then(function(S) {
2408
- return 0 < S.numFailures ? Promise.reject(S.failures[0]) : y.length < m ? { failures: [], numFailures: 0, lastResult: void 0 } : f(w, l(l({}, p), { lower: y[y.length - 1], lowerOpen: !0 }), m);
2405
+ return b({ type: "delete", keys: y, trans: _ }).then(function(S) {
2406
+ return 0 < S.numFailures ? Promise.reject(S.failures[0]) : y.length < m ? { failures: [], numFailures: 0, lastResult: void 0 } : f(_, l(l({}, p), { lower: y[y.length - 1], lowerOpen: !0 }), m);
2409
2407
  });
2410
2408
  });
2411
2409
  }(o.trans, o.range, 1e4);
@@ -2413,21 +2411,21 @@ var Mr = { exports: {} };
2413
2411
  }
2414
2412
  return n.mutate(o);
2415
2413
  function b(f) {
2416
- var w, p, m, v = G.trans, y = f.keys || Kn(i, f);
2414
+ var _, p, m, v = G.trans, y = f.keys || Kn(i, f);
2417
2415
  if (!y) throw new Error("Keys missing");
2418
- return (f = f.type === "add" || f.type === "put" ? l(l({}, f), { keys: y }) : l({}, f)).type !== "delete" && (f.values = x([], f.values)), f.keys && (f.keys = x([], f.keys)), w = n, m = y, ((p = f).type === "add" ? Promise.resolve([]) : w.getMany({ trans: p.trans, keys: m, cache: "immutable" })).then(function(S) {
2416
+ return (f = f.type === "add" || f.type === "put" ? l(l({}, f), { keys: y }) : l({}, f)).type !== "delete" && (f.values = x([], f.values)), f.keys && (f.keys = x([], f.keys)), _ = n, m = y, ((p = f).type === "add" ? Promise.resolve([]) : _.getMany({ trans: p.trans, keys: m, cache: "immutable" })).then(function(S) {
2419
2417
  var E = y.map(function(O, A) {
2420
- var P, M, I, C = S[A], j = { onerror: null, onsuccess: null };
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
- q(I, R) ? I[R] = M[R] : le(I, R, M[R]);
2423
- }))), j;
2418
+ var I, M, C, R = S[A], K = { onerror: null, onsuccess: null };
2419
+ return f.type === "delete" ? u.fire.call(K, O, R, v) : f.type === "add" || R === void 0 ? (I = h.fire.call(K, O, f.values[A], v), O == null && I != null && (f.keys[A] = O = I, i.outbound || le(f.values[A], i.keyPath, O))) : (I = jn(R, f.values[A]), (M = g.fire.call(K, I, O, R, v)) && (C = f.values[A], Object.keys(M).forEach(function(T) {
2420
+ X(C, T) ? C[T] = M[T] : le(C, T, M[T]);
2421
+ }))), K;
2424
2422
  });
2425
2423
  return n.mutate(f).then(function(O) {
2426
- for (var A = O.failures, P = O.results, M = O.numFailures, O = O.lastResult, I = 0; I < y.length; ++I) {
2427
- var C = (P || y)[I], j = E[I];
2428
- C == null ? j.onerror && j.onerror(A[I]) : j.onsuccess && j.onsuccess(f.type === "put" && S[I] ? f.values[I] : C);
2424
+ for (var A = O.failures, I = O.results, M = O.numFailures, O = O.lastResult, C = 0; C < y.length; ++C) {
2425
+ var R = (I || y)[C], K = E[C];
2426
+ R == null ? K.onerror && K.onerror(A[C]) : K.onsuccess && K.onsuccess(f.type === "put" && S[C] ? f.values[C] : R);
2429
2427
  }
2430
- return { failures: A, results: P, numFailures: M, lastResult: O };
2428
+ return { failures: A, results: I, numFailures: M, lastResult: O };
2431
2429
  }).catch(function(O) {
2432
2430
  return E.forEach(function(A) {
2433
2431
  return A.onerror && A.onerror(O);
@@ -2441,7 +2439,7 @@ var Mr = { exports: {} };
2441
2439
  function Er(e, t, n) {
2442
2440
  try {
2443
2441
  if (!t || t.keys.length < e.length) return null;
2444
- for (var i = [], o = 0, a = 0; o < t.keys.length && a < e.length; ++o) H(t.keys[o], e[a]) === 0 && (i.push(n ? Te(t.values[o]) : t.values[o]), ++a);
2442
+ for (var i = [], o = 0, a = 0; o < t.keys.length && a < e.length; ++o) H(t.keys[o], e[a]) === 0 && (i.push(n ? Me(t.values[o]) : t.values[o]), ++a);
2445
2443
  return i.length === e.length ? i : null;
2446
2444
  } catch {
2447
2445
  return null;
@@ -2453,8 +2451,8 @@ var Mr = { exports: {} };
2453
2451
  return l(l({}, n), { getMany: function(i) {
2454
2452
  if (!i.cache) return n.getMany(i);
2455
2453
  var o = Er(i.keys, i.trans._cache, i.cache === "clone");
2456
- return o ? N.resolve(o) : n.getMany(i).then(function(a) {
2457
- return i.trans._cache = { keys: i.keys, values: i.cache === "clone" ? Te(a) : a }, a;
2454
+ return o ? B.resolve(o) : n.getMany(i).then(function(a) {
2455
+ return i.trans._cache = { keys: i.keys, values: i.cache === "clone" ? Me(a) : a }, a;
2458
2456
  });
2459
2457
  }, mutate: function(i) {
2460
2458
  return i.type !== "add" && (i.trans._cache = null), n.mutate(i);
@@ -2484,19 +2482,19 @@ var Mr = { exports: {} };
2484
2482
  var o = e.table(i), a = o.schema, c = a.primaryKey, f = a.indexes, u = c.extractKey, h = c.outbound, g = c.autoIncrement && f.filter(function(p) {
2485
2483
  return p.compound && p.keyPath.includes(c.keyPath);
2486
2484
  }), b = l(l({}, o), { mutate: function(p) {
2487
- function m(R) {
2488
- return R = "idb://".concat(t, "/").concat(i, "/").concat(R), O[R] || (O[R] = new ae());
2485
+ function m(T) {
2486
+ return T = "idb://".concat(t, "/").concat(i, "/").concat(T), O[T] || (O[T] = new ae());
2489
2487
  }
2490
- var v, y, S, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), A = m(""), P = m(":dels"), M = p.type, j = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Kn(c, p).filter(function(R) {
2491
- return R;
2492
- }), p.values] : [], I = j[0], C = j[1], j = p.trans._cache;
2493
- return B(I) ? (A.addKeys(I), (j = M === "delete" || I.length === C.length ? Er(I, j) : null) || P.addKeys(I), (j || C) && (v = m, y = j, S = C, a.indexes.forEach(function(R) {
2494
- var L = v(R.name || "");
2488
+ var v, y, S, E = p.trans, O = p.mutatedParts || (p.mutatedParts = {}), A = m(""), I = m(":dels"), M = p.type, K = p.type === "deleteRange" ? [p.range] : p.type === "delete" ? [p.keys] : p.values.length < 50 ? [Kn(c, p).filter(function(T) {
2489
+ return T;
2490
+ }), p.values] : [], C = K[0], R = K[1], K = p.trans._cache;
2491
+ return P(C) ? (A.addKeys(C), (K = M === "delete" || C.length === R.length ? Er(C, K) : null) || I.addKeys(C), (K || R) && (v = m, y = K, S = R, a.indexes.forEach(function(T) {
2492
+ var L = v(T.name || "");
2495
2493
  function U(z) {
2496
- return z != null ? R.extractKey(z) : null;
2494
+ return z != null ? T.extractKey(z) : null;
2497
2495
  }
2498
2496
  function W(z) {
2499
- return R.multiEntry && B(z) ? z.forEach(function(fe) {
2497
+ return T.multiEntry && P(z) ? z.forEach(function(fe) {
2500
2498
  return L.addKey(fe);
2501
2499
  }) : L.addKey(z);
2502
2500
  }
@@ -2504,55 +2502,55 @@ var Mr = { exports: {} };
2504
2502
  var F = y && U(y[se]), se = S && U(S[se]);
2505
2503
  H(F, se) !== 0 && (F != null && W(F), se != null && W(se));
2506
2504
  });
2507
- }))) : I ? (C = { from: (C = I.lower) !== null && C !== void 0 ? C : e.MIN_KEY, to: (C = I.upper) !== null && C !== void 0 ? C : e.MAX_KEY }, P.add(C), A.add(C)) : (A.add(n), P.add(n), a.indexes.forEach(function(R) {
2508
- return m(R.name).add(n);
2509
- })), o.mutate(p).then(function(R) {
2510
- return !I || p.type !== "add" && p.type !== "put" || (A.addKeys(R.results), g && g.forEach(function(L) {
2505
+ }))) : C ? (R = { from: (R = C.lower) !== null && R !== void 0 ? R : e.MIN_KEY, to: (R = C.upper) !== null && R !== void 0 ? R : e.MAX_KEY }, I.add(R), A.add(R)) : (A.add(n), I.add(n), a.indexes.forEach(function(T) {
2506
+ return m(T.name).add(n);
2507
+ })), o.mutate(p).then(function(T) {
2508
+ return !C || p.type !== "add" && p.type !== "put" || (A.addKeys(T.results), g && g.forEach(function(L) {
2511
2509
  for (var U = p.values.map(function(F) {
2512
2510
  return L.extractKey(F);
2513
2511
  }), W = L.keyPath.findIndex(function(F) {
2514
2512
  return F === c.keyPath;
2515
- }), z = 0, fe = R.results.length; z < fe; ++z) U[z][W] = R.results[z];
2513
+ }), z = 0, fe = T.results.length; z < fe; ++z) U[z][W] = T.results[z];
2516
2514
  m(L.name).addKeys(U);
2517
- })), E.mutatedParts = zt(E.mutatedParts || {}, O), R;
2515
+ })), E.mutatedParts = zt(E.mutatedParts || {}, O), T;
2518
2516
  });
2519
2517
  } }), f = function(m) {
2520
2518
  var v = m.query, m = v.index, v = v.range;
2521
2519
  return [m, new ae((m = v.lower) !== null && m !== void 0 ? m : e.MIN_KEY, (v = v.upper) !== null && v !== void 0 ? v : e.MAX_KEY)];
2522
- }, w = { get: function(p) {
2520
+ }, _ = { get: function(p) {
2523
2521
  return [c, new ae(p.key)];
2524
2522
  }, getMany: function(p) {
2525
2523
  return [c, new ae().addKeys(p.keys)];
2526
2524
  }, count: f, query: f, openCursor: f };
2527
- return T(w).forEach(function(p) {
2525
+ return j(_).forEach(function(p) {
2528
2526
  b[p] = function(m) {
2529
2527
  var v = G.subscr, y = !!v, S = Or(G, o) && xr(p, m) ? m.obsSet = {} : v;
2530
2528
  if (y) {
2531
- var E = function(C) {
2532
- return C = "idb://".concat(t, "/").concat(i, "/").concat(C), S[C] || (S[C] = new ae());
2533
- }, O = E(""), A = E(":dels"), v = w[p](m), y = v[0], v = v[1];
2529
+ var E = function(R) {
2530
+ return R = "idb://".concat(t, "/").concat(i, "/").concat(R), S[R] || (S[R] = new ae());
2531
+ }, O = E(""), A = E(":dels"), v = _[p](m), y = v[0], v = v[1];
2534
2532
  if ((p === "query" && y.isPrimaryKey && !m.values ? A : E(y.name || "")).add(v), !y.isPrimaryKey) {
2535
2533
  if (p !== "count") {
2536
- var P = p === "query" && h && m.values && o.query(l(l({}, m), { values: !1 }));
2537
- return o[p].apply(this, arguments).then(function(C) {
2534
+ var I = p === "query" && h && m.values && o.query(l(l({}, m), { values: !1 }));
2535
+ return o[p].apply(this, arguments).then(function(R) {
2538
2536
  if (p === "query") {
2539
- if (h && m.values) return P.then(function(U) {
2540
- return U = U.result, O.addKeys(U), C;
2537
+ if (h && m.values) return I.then(function(U) {
2538
+ return U = U.result, O.addKeys(U), R;
2541
2539
  });
2542
- var j = m.values ? C.result.map(u) : C.result;
2543
- (m.values ? O : A).addKeys(j);
2540
+ var K = m.values ? R.result.map(u) : R.result;
2541
+ (m.values ? O : A).addKeys(K);
2544
2542
  } else if (p === "openCursor") {
2545
- var R = C, L = m.values;
2546
- return R && Object.create(R, { key: { get: function() {
2547
- return A.addKey(R.primaryKey), R.key;
2543
+ var T = R, L = m.values;
2544
+ return T && Object.create(T, { key: { get: function() {
2545
+ return A.addKey(T.primaryKey), T.key;
2548
2546
  } }, primaryKey: { get: function() {
2549
- var U = R.primaryKey;
2547
+ var U = T.primaryKey;
2550
2548
  return A.addKey(U), U;
2551
2549
  } }, value: { get: function() {
2552
- return L && O.addKey(R.primaryKey), R.value;
2550
+ return L && O.addKey(T.primaryKey), T.value;
2553
2551
  } } });
2554
2552
  }
2555
- return C;
2553
+ return R;
2556
2554
  });
2557
2555
  }
2558
2556
  A.add(n);
@@ -2567,9 +2565,9 @@ var Mr = { exports: {} };
2567
2565
  if (n.numFailures === 0) return t;
2568
2566
  if (t.type === "deleteRange") return null;
2569
2567
  var i = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1;
2570
- return n.numFailures === i ? null : (t = l({}, t), B(t.keys) && (t.keys = t.keys.filter(function(o, a) {
2568
+ return n.numFailures === i ? null : (t = l({}, t), P(t.keys) && (t.keys = t.keys.filter(function(o, a) {
2571
2569
  return !(a in n.failures);
2572
- })), "values" in t && B(t.values) && (t.values = t.values.filter(function(o, a) {
2570
+ })), "values" in t && P(t.values) && (t.values = t.values.filter(function(o, a) {
2573
2571
  return !(a in n.failures);
2574
2572
  })), t);
2575
2573
  }
@@ -2577,15 +2575,15 @@ var Mr = { exports: {} };
2577
2575
  return n = e, ((i = t).lower === void 0 || (i.lowerOpen ? 0 < H(n, i.lower) : 0 <= H(n, i.lower))) && (e = e, (t = t).upper === void 0 || (t.upperOpen ? H(e, t.upper) < 0 : H(e, t.upper) <= 0));
2578
2576
  var n, i;
2579
2577
  }
2580
- function kr(e, t, w, i, o, a) {
2581
- if (!w || w.length === 0) return e;
2582
- var c = t.query.index, u = c.multiEntry, h = t.query.range, g = i.schema.primaryKey.extractKey, b = c.extractKey, f = (c.lowLevelIndex || c).extractKey, w = w.reduce(function(p, m) {
2578
+ function kr(e, t, _, i, o, a) {
2579
+ if (!_ || _.length === 0) return e;
2580
+ var c = t.query.index, u = c.multiEntry, h = t.query.range, g = i.schema.primaryKey.extractKey, b = c.extractKey, f = (c.lowLevelIndex || c).extractKey, _ = _.reduce(function(p, m) {
2583
2581
  var v = p, y = [];
2584
2582
  if (m.type === "add" || m.type === "put") for (var S = new ae(), E = m.values.length - 1; 0 <= E; --E) {
2585
- var O, A = m.values[E], P = g(A);
2586
- S.hasKey(P) || (O = b(A), (u && B(O) ? O.some(function(R) {
2587
- return Nn(R, h);
2588
- }) : Nn(O, h)) && (S.addKey(P), y.push(A)));
2583
+ var O, A = m.values[E], I = g(A);
2584
+ S.hasKey(I) || (O = b(A), (u && P(O) ? O.some(function(T) {
2585
+ return Nn(T, h);
2586
+ }) : Nn(O, h)) && (S.addKey(I), y.push(A)));
2589
2587
  }
2590
2588
  switch (m.type) {
2591
2589
  case "add":
@@ -2600,32 +2598,32 @@ var Mr = { exports: {} };
2600
2598
  }));
2601
2599
  break;
2602
2600
  case "put":
2603
- var I = new ae().addKeys(m.values.map(function(L) {
2601
+ var C = new ae().addKeys(m.values.map(function(L) {
2604
2602
  return g(L);
2605
2603
  }));
2606
2604
  v = p.filter(function(L) {
2607
- return !I.hasKey(t.values ? g(L) : L);
2605
+ return !C.hasKey(t.values ? g(L) : L);
2608
2606
  }).concat(t.values ? y : y.map(function(L) {
2609
2607
  return g(L);
2610
2608
  }));
2611
2609
  break;
2612
2610
  case "delete":
2613
- var C = new ae().addKeys(m.keys);
2611
+ var R = new ae().addKeys(m.keys);
2614
2612
  v = p.filter(function(L) {
2615
- return !C.hasKey(t.values ? g(L) : L);
2613
+ return !R.hasKey(t.values ? g(L) : L);
2616
2614
  });
2617
2615
  break;
2618
2616
  case "deleteRange":
2619
- var j = m.range;
2617
+ var K = m.range;
2620
2618
  v = p.filter(function(L) {
2621
- return !Nn(g(L), j);
2619
+ return !Nn(g(L), K);
2622
2620
  });
2623
2621
  }
2624
2622
  return v;
2625
2623
  }, e);
2626
- return w === e ? e : (w.sort(function(p, m) {
2624
+ return _ === e ? e : (_.sort(function(p, m) {
2627
2625
  return H(f(p), f(m)) || H(g(p), g(m));
2628
- }), t.limit && t.limit < 1 / 0 && (w.length > t.limit ? w.length = t.limit : e.length === t.limit && w.length < t.limit && (o.dirty = !0)), a ? Object.freeze(w) : w);
2626
+ }), t.limit && t.limit < 1 / 0 && (_.length > t.limit ? _.length = t.limit : e.length === t.limit && _.length < t.limit && (o.dirty = !0)), a ? Object.freeze(_) : _);
2629
2627
  }
2630
2628
  function Dr(e, t) {
2631
2629
  return H(e.lower, t.lower) === 0 && H(e.upper, t.upper) === 0 && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
@@ -2667,21 +2665,21 @@ var Mr = { exports: {} };
2667
2665
  return function() {
2668
2666
  if (a.abort(), i === "readwrite") {
2669
2667
  for (var g = /* @__PURE__ */ new Set(), b = 0, f = n; b < f.length; b++) {
2670
- var w = f[b], p = Ue["idb://".concat(t, "/").concat(w)];
2668
+ var _ = f[b], p = Ue["idb://".concat(t, "/").concat(_)];
2671
2669
  if (p) {
2672
- var m = e.table(w), v = p.optimisticOps.filter(function(L) {
2670
+ var m = e.table(_), v = p.optimisticOps.filter(function(L) {
2673
2671
  return L.trans === u;
2674
2672
  });
2675
- if (u._explicit && h && u.mutatedParts) for (var y = 0, S = Object.values(p.queries.query); y < S.length; y++) for (var E = 0, O = (M = S[y]).slice(); E < O.length; E++) In((I = O[E]).obsSet, u.mutatedParts) && (je(M, I), I.subscribers.forEach(function(L) {
2673
+ if (u._explicit && h && u.mutatedParts) for (var y = 0, S = Object.values(p.queries.query); y < S.length; y++) for (var E = 0, O = (M = S[y]).slice(); E < O.length; E++) In((C = O[E]).obsSet, u.mutatedParts) && (je(M, C), C.subscribers.forEach(function(L) {
2676
2674
  return g.add(L);
2677
2675
  }));
2678
2676
  else if (0 < v.length) {
2679
2677
  p.optimisticOps = p.optimisticOps.filter(function(L) {
2680
2678
  return L.trans !== u;
2681
2679
  });
2682
- for (var A = 0, P = Object.values(p.queries.query); A < P.length; A++) for (var M, I, C, j = 0, R = (M = P[A]).slice(); j < R.length; j++) (I = R[j]).res != null && u.mutatedParts && (h && !I.dirty ? (C = Object.isFrozen(I.res), C = kr(I.res, I.req, v, m, I, C), I.dirty ? (je(M, I), I.subscribers.forEach(function(L) {
2680
+ for (var A = 0, I = Object.values(p.queries.query); A < I.length; A++) for (var M, C, R, K = 0, T = (M = I[A]).slice(); K < T.length; K++) (C = T[K]).res != null && u.mutatedParts && (h && !C.dirty ? (R = Object.isFrozen(C.res), R = kr(C.res, C.req, v, m, C, R), C.dirty ? (je(M, C), C.subscribers.forEach(function(L) {
2683
2681
  return g.add(L);
2684
- })) : C !== I.res && (I.res = C, I.promise = N.resolve({ result: C }))) : (I.dirty && je(M, I), I.subscribers.forEach(function(L) {
2682
+ })) : R !== C.res && (C.res = R, C.promise = B.resolve({ result: R }))) : (C.dirty && je(M, C), C.subscribers.forEach(function(L) {
2685
2683
  return g.add(L);
2686
2684
  })));
2687
2685
  }
@@ -2707,8 +2705,8 @@ var Mr = { exports: {} };
2707
2705
  je(u.optimisticOps, a), a.mutatedParts && Ht(a.mutatedParts);
2708
2706
  })) : c.then(function(h) {
2709
2707
  var g = Ar(0, l(l({}, a), { values: a.values.map(function(b, f) {
2710
- var w;
2711
- return h.failures[f] ? b : (b = (w = o.keyPath) !== null && w !== void 0 && w.includes(".") ? Te(b) : l({}, b), le(b, o.keyPath, h.results[f]), b);
2708
+ var _;
2709
+ return h.failures[f] ? b : (b = (_ = o.keyPath) !== null && _ !== void 0 && _.includes(".") ? Me(b) : l({}, b), le(b, o.keyPath, h.results[f]), b);
2712
2710
  }) }), h);
2713
2711
  u.optimisticOps.push(g), queueMicrotask(function() {
2714
2712
  return a.mutatedParts && Ht(a.mutatedParts);
@@ -2724,29 +2722,29 @@ var Mr = { exports: {} };
2724
2722
  if (!O) return [null, !1, E, null];
2725
2723
  switch (y) {
2726
2724
  case "query":
2727
- var A = O.find(function(P) {
2728
- return P.req.limit === S.limit && P.req.values === S.values && Dr(P.req.query.range, S.query.range);
2725
+ var A = O.find(function(I) {
2726
+ return I.req.limit === S.limit && I.req.values === S.values && Dr(I.req.query.range, S.query.range);
2729
2727
  });
2730
- return A ? [A, !0, E, O] : [O.find(function(P) {
2731
- return ("limit" in P.req ? P.req.limit : 1 / 0) >= S.limit && (!S.values || P.req.values) && _i(P.req.query.range, S.query.range);
2728
+ return A ? [A, !0, E, O] : [O.find(function(I) {
2729
+ return ("limit" in I.req ? I.req.limit : 1 / 0) >= S.limit && (!S.values || I.req.values) && _i(I.req.query.range, S.query.range);
2732
2730
  }), !1, E, O];
2733
2731
  case "count":
2734
- return A = O.find(function(P) {
2735
- return Dr(P.req.query.range, S.query.range);
2732
+ return A = O.find(function(I) {
2733
+ return Dr(I.req.query.range, S.query.range);
2736
2734
  }), [A, !!A, E, O];
2737
2735
  }
2738
- }(t, n, "query", a), b = g[0], f = g[1], w = g[2], p = g[3];
2736
+ }(t, n, "query", a), b = g[0], f = g[1], _ = g[2], p = g[3];
2739
2737
  return b && f ? b.obsSet = a.obsSet : (f = i.query(a).then(function(m) {
2740
2738
  var v = m.result;
2741
2739
  if (b && (b.res = v), c) {
2742
2740
  for (var y = 0, S = v.length; y < S; ++y) Object.freeze(v[y]);
2743
2741
  Object.freeze(v);
2744
- } else m.result = Te(v);
2742
+ } else m.result = Me(v);
2745
2743
  return m;
2746
2744
  }).catch(function(m) {
2747
2745
  return p && b && je(p, b), Promise.reject(m);
2748
- }), b = { obsSet: a.obsSet, promise: f, subscribers: /* @__PURE__ */ new Set(), type: "query", req: a, dirty: !1 }, p ? p.push(b) : (p = [b], (w = w || (Ue["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[a.query.index.name || ""] = p)), Si(b, p, u, h), b.promise.then(function(m) {
2749
- return { result: kr(m.result, a, w == null ? void 0 : w.optimisticOps, i, b, c) };
2746
+ }), b = { obsSet: a.obsSet, promise: f, subscribers: /* @__PURE__ */ new Set(), type: "query", req: a, dirty: !1 }, p ? p.push(b) : (p = [b], (_ = _ || (Ue["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[a.query.index.name || ""] = p)), Si(b, p, u, h), b.promise.then(function(m) {
2747
+ return { result: kr(m.result, a, _ == null ? void 0 : _.optimisticOps, i, b, c) };
2750
2748
  });
2751
2749
  } });
2752
2750
  } });
@@ -2766,11 +2764,11 @@ var Mr = { exports: {} };
2766
2764
  return n || (n = new this.Version(e), t.push(n), t.sort(fi), n.stores({}), this._state.autoSchema = !1, n);
2767
2765
  }, ne.prototype._whenReady = function(e) {
2768
2766
  var t = this;
2769
- return this.idbdb && (this._state.openComplete || G.letThrough || this._vip) ? e() : new N(function(n, i) {
2767
+ return this.idbdb && (this._state.openComplete || G.letThrough || this._vip) ? e() : new B(function(n, i) {
2770
2768
  if (t._state.openComplete) return i(new $.DatabaseClosed(t._state.dbOpenError));
2771
2769
  if (!t._state.isBeingOpened) {
2772
2770
  if (!t._state.autoOpen) return void i(new $.DatabaseClosed());
2773
- t.open().catch(X);
2771
+ t.open().catch(J);
2774
2772
  }
2775
2773
  t._state.dbReadyPromise.then(n, i);
2776
2774
  }).then(e);
@@ -2798,9 +2796,9 @@ var Mr = { exports: {} };
2798
2796
  }
2799
2797
  this.idbdb = null;
2800
2798
  }
2801
- e.isBeingOpened || (e.dbReadyPromise = new N(function(n) {
2799
+ e.isBeingOpened || (e.dbReadyPromise = new B(function(n) {
2802
2800
  e.dbReadyResolve = n;
2803
- }), e.openCanceller = new N(function(n, i) {
2801
+ }), e.openCanceller = new B(function(n, i) {
2804
2802
  e.cancelOpen = i;
2805
2803
  }));
2806
2804
  }, ne.prototype.close = function(n) {
@@ -2810,13 +2808,13 @@ var Mr = { exports: {} };
2810
2808
  var t = this;
2811
2809
  e === void 0 && (e = { disableAutoOpen: !0 });
2812
2810
  var n = 0 < arguments.length && typeof arguments[0] != "object", i = this._state;
2813
- return new N(function(o, a) {
2811
+ return new B(function(o, a) {
2814
2812
  function c() {
2815
2813
  t.close(e);
2816
2814
  var u = t._deps.indexedDB.deleteDatabase(t.name);
2817
2815
  u.onsuccess = ee(function() {
2818
2816
  var h, g, b;
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();
2817
+ h = t._deps, g = t.name, b = h.indexedDB, h = h.IDBKeyRange, kn(b) || g === Tt || An(b, h).delete(g).catch(J), o();
2820
2818
  }), u.onerror = me(a), u.onblocked = t._fireOnBlocked;
2821
2819
  }
2822
2820
  if (n) throw new $.InvalidArgument("Invalid closeOptions argument to db.delete()");
@@ -2835,7 +2833,7 @@ var Mr = { exports: {} };
2835
2833
  return this._state.autoSchema;
2836
2834
  }, Object.defineProperty(ne.prototype, "tables", { get: function() {
2837
2835
  var e = this;
2838
- return T(this._allTables).map(function(t) {
2836
+ return j(this._allTables).map(function(t) {
2839
2837
  return e._allTables[t];
2840
2838
  });
2841
2839
  }, enumerable: !1, configurable: !0 }), ne.prototype.transaction = function() {
@@ -2877,22 +2875,22 @@ var Mr = { exports: {} };
2877
2875
  f(g);
2878
2876
  }) : te(g);
2879
2877
  }
2880
- var h = (function g(b, f, w, p, m) {
2881
- return N.resolve().then(function() {
2882
- var v = G.transless || G, y = b._createTransaction(f, w, b._dbSchema, p);
2878
+ var h = (function g(b, f, _, p, m) {
2879
+ return B.resolve().then(function() {
2880
+ var v = G.transless || G, y = b._createTransaction(f, _, b._dbSchema, p);
2883
2881
  if (y.explicit = !0, v = { trans: y, transless: v }, p) y.idbtrans = p.idbtrans;
2884
2882
  else try {
2885
2883
  y.create(), y.idbtrans._explicit = !0, b._state.PR1398_maxLoop = 3;
2886
2884
  } catch (O) {
2887
2885
  return O.name === rn.InvalidState && b.isOpen() && 0 < --b._state.PR1398_maxLoop ? (console.warn("Dexie: Need to reopen db"), b.close({ disableAutoOpen: !1 }), b.open().then(function() {
2888
- return g(b, f, w, null, m);
2886
+ return g(b, f, _, null, m);
2889
2887
  })) : te(O);
2890
2888
  }
2891
2889
  var S, E = nn(m);
2892
- return E && qe(), v = N.follow(function() {
2890
+ return E && qe(), v = B.follow(function() {
2893
2891
  var O;
2894
- (S = m.call(y, y)) && (E ? (O = Pe.bind(null, null), S.then(O, O)) : typeof S.next == "function" && typeof S.throw == "function" && (S = Tn(S)));
2895
- }, v), (S && typeof S.then == "function" ? N.resolve(S).then(function(O) {
2892
+ (S = m.call(y, y)) && (E ? (O = Pe.bind(null, null), S.then(O, O)) : typeof S.next == "function" && typeof S.throw == "function" && (S = Mn(S)));
2893
+ }, v), (S && typeof S.then == "function" ? B.resolve(S).then(function(O) {
2896
2894
  return y.active ? O : te(new $.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"));
2897
2895
  }) : v.then(function() {
2898
2896
  return S;
@@ -2909,7 +2907,7 @@ var Mr = { exports: {} };
2909
2907
  return i._whenReady(h);
2910
2908
  }) : this._whenReady(h);
2911
2909
  }, ne.prototype.table = function(e) {
2912
- if (!q(this._allTables, e)) throw new $.InvalidTable("Table ".concat(e, " does not exist"));
2910
+ if (!X(this._allTables, e)) throw new $.InvalidTable("Table ".concat(e, " does not exist"));
2913
2911
  return this._allTables[e];
2914
2912
  }, ne);
2915
2913
  function ne(e, t) {
@@ -2917,17 +2915,17 @@ var Mr = { exports: {} };
2917
2915
  this._middlewares = {}, this.verno = 0;
2918
2916
  var i = ne.dependencies;
2919
2917
  this._options = t = l({ addons: ne.addons, autoOpen: !0, indexedDB: i.indexedDB, IDBKeyRange: i.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, i = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
2920
- var o, a, c, u, h, g = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: X, dbReadyPromise: null, cancelOpen: X, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
2921
- g.dbReadyPromise = new N(function(f) {
2918
+ var o, a, c, u, h, g = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: J, dbReadyPromise: null, cancelOpen: J, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
2919
+ g.dbReadyPromise = new B(function(f) {
2922
2920
  g.dbReadyResolve = f;
2923
- }), g.openCanceller = new N(function(f, w) {
2924
- g.cancelOpen = w;
2925
- }), this._state = g, this.name = e, this.on = dt(this, "populate", "blocked", "versionchange", "close", { ready: [on, X] }), this.on.ready.subscribe = zn(this.on.ready.subscribe, function(f) {
2926
- return function(w, p) {
2921
+ }), g.openCanceller = new B(function(f, _) {
2922
+ g.cancelOpen = _;
2923
+ }), this._state = g, this.name = e, this.on = dt(this, "populate", "blocked", "versionchange", "close", { ready: [on, J] }), this.on.ready.subscribe = zn(this.on.ready.subscribe, function(f) {
2924
+ return function(_, p) {
2927
2925
  ne.vip(function() {
2928
2926
  var m, v = n._state;
2929
- v.openComplete ? (v.dbOpenError || N.resolve().then(w), p && f(w)) : v.onReadyBeingFired ? (v.onReadyBeingFired.push(w), p && f(w)) : (f(w), m = n, p || f(function y() {
2930
- m.on.ready.unsubscribe(w), m.on.ready.unsubscribe(y);
2927
+ v.openComplete ? (v.dbOpenError || B.resolve().then(_), p && f(_)) : v.onReadyBeingFired ? (v.onReadyBeingFired.push(_), p && f(_)) : (f(_), m = n, p || f(function y() {
2928
+ m.on.ready.unsubscribe(_), m.on.ready.unsubscribe(y);
2931
2929
  }));
2932
2930
  });
2933
2931
  };
@@ -2941,11 +2939,11 @@ var Mr = { exports: {} };
2941
2939
  }
2942
2940
  var v = S._ctx, y = v.table, S = y.hook.reading.fire;
2943
2941
  this._ctx = { table: y, index: v.index, isPrimKey: !v.index || y.schema.primKey.keyPath && v.index === y.schema.primKey.name, range: p, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: m, or: v.or, valueMapper: S !== at ? S : null };
2944
- })), this.Table = (a = this, ft(ur.prototype, function(f, w, p) {
2945
- this.db = a, this._tx = p, this.name = f, this.schema = w, this.hook = a._allTables[f] ? a._allTables[f].hook : dt(null, { creating: [Jr, X], reading: [Xr, at], updating: [Zr, X], deleting: [Vr, X] });
2946
- })), this.Transaction = (c = this, ft(ci.prototype, function(f, w, p, m, v) {
2942
+ })), this.Table = (a = this, ft(ur.prototype, function(f, _, p) {
2943
+ this.db = a, this._tx = p, this.name = f, this.schema = _, this.hook = a._allTables[f] ? a._allTables[f].hook : dt(null, { creating: [Jr, J], reading: [Xr, at], updating: [Zr, J], deleting: [Vr, J] });
2944
+ })), this.Transaction = (c = this, ft(ci.prototype, function(f, _, p, m, v) {
2947
2945
  var y = this;
2948
- this.db = c, this.mode = f, this.storeNames = w, this.schema = p, this.chromeTransactionDurability = m, this.idbtrans = null, this.on = dt(this, "complete", "error", "abort"), this.parent = v || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new N(function(S, E) {
2946
+ this.db = c, this.mode = f, this.storeNames = _, this.schema = p, this.chromeTransactionDurability = m, this.idbtrans = null, this.on = dt(this, "complete", "error", "abort"), this.parent = v || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new B(function(S, E) {
2949
2947
  y._resolve = S, y._reject = E;
2950
2948
  }), this._completion.then(function() {
2951
2949
  y.active = !1, y.on.complete.fire();
@@ -2955,8 +2953,8 @@ var Mr = { exports: {} };
2955
2953
  });
2956
2954
  })), this.Version = (u = this, ft(gi.prototype, function(f) {
2957
2955
  this.db = u, this._cfg = { version: f, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
2958
- })), this.WhereClause = (h = this, ft(pr.prototype, function(f, w, p) {
2959
- if (this.db = h, this._ctx = { table: f, index: w === ":id" ? null : w, or: p }, this._cmp = this._ascending = H, this._descending = function(m, v) {
2956
+ })), this.WhereClause = (h = this, ft(pr.prototype, function(f, _, p) {
2957
+ if (this.db = h, this._ctx = { table: f, index: _ === ":id" ? null : _, or: p }, this._cmp = this._ascending = H, this._descending = function(m, v) {
2960
2958
  return H(v, m);
2961
2959
  }, this._max = function(m, v) {
2962
2960
  return 0 < H(m, v) ? m : v;
@@ -2967,24 +2965,24 @@ var Mr = { exports: {} };
2967
2965
  0 < f.newVersion ? console.warn("Another connection wants to upgrade database '".concat(n.name, "'. Closing db now to resume the upgrade.")) : console.warn("Another connection wants to delete database '".concat(n.name, "'. Closing db now to resume the delete request.")), n.close({ disableAutoOpen: !1 });
2968
2966
  }), this.on("blocked", function(f) {
2969
2967
  !f.newVersion || f.newVersion < f.oldVersion ? console.warn("Dexie.delete('".concat(n.name, "') was blocked")) : console.warn("Upgrade '".concat(n.name, "' blocked by other connection holding version ").concat(f.oldVersion / 10));
2970
- }), this._maxKey = yt(t.IDBKeyRange), this._createTransaction = function(f, w, p, m) {
2971
- return new n.Transaction(f, w, p, n._options.chromeTransactionDurability, m);
2968
+ }), this._maxKey = yt(t.IDBKeyRange), this._createTransaction = function(f, _, p, m) {
2969
+ return new n.Transaction(f, _, p, n._options.chromeTransactionDurability, m);
2972
2970
  }, this._fireOnBlocked = function(f) {
2973
- n.on("blocked").fire(f), et.filter(function(w) {
2974
- return w.name === n.name && w !== n && !w._state.vcFired;
2975
- }).map(function(w) {
2976
- return w.on("versionchange").fire(f);
2971
+ n.on("blocked").fire(f), et.filter(function(_) {
2972
+ return _.name === n.name && _ !== n && !_._state.vcFired;
2973
+ }).map(function(_) {
2974
+ return _.on("versionchange").fire(f);
2977
2975
  });
2978
2976
  }, this.use(vi), this.use(Ei), this.use(wi), this.use(mi), this.use(bi);
2979
- var b = new Proxy(this, { get: function(f, w, p) {
2980
- if (w === "_vip") return !0;
2981
- if (w === "table") return function(v) {
2977
+ var b = new Proxy(this, { get: function(f, _, p) {
2978
+ if (_ === "_vip") return !0;
2979
+ if (_ === "table") return function(v) {
2982
2980
  return Qt(n.table(v), b);
2983
2981
  };
2984
- var m = Reflect.get(f, w, p);
2985
- return m instanceof ur ? Qt(m, b) : w === "tables" ? m.map(function(v) {
2982
+ var m = Reflect.get(f, _, p);
2983
+ return m instanceof ur ? Qt(m, b) : _ === "tables" ? m.map(function(v) {
2986
2984
  return Qt(v, b);
2987
- }) : w === "_createTransaction" ? function() {
2985
+ }) : _ === "_createTransaction" ? function() {
2988
2986
  return Qt(m.apply(this, arguments), b);
2989
2987
  } : m;
2990
2988
  } });
@@ -3013,10 +3011,10 @@ var Mr = { exports: {} };
3013
3011
  u || (u = !0, c && c.abort(), f && Re.storagemutated.unsubscribe(p));
3014
3012
  } };
3015
3013
  o.start && o.start(b);
3016
- var f = !1, w = function() {
3014
+ var f = !1, _ = function() {
3017
3015
  return hn(m);
3018
3016
  }, p = function(v) {
3019
- zt(h, v), In(g, h) && w();
3017
+ zt(h, v), In(g, h) && _();
3020
3018
  }, m = function() {
3021
3019
  var v, y, S;
3022
3020
  !u && Xt.indexedDB && (h = {}, v = {}, c && c.abort(), c = new AbortController(), S = function(E) {
@@ -3028,9 +3026,9 @@ var Mr = { exports: {} };
3028
3026
  } finally {
3029
3027
  O && Ze();
3030
3028
  }
3031
- }(y = { subscr: v, signal: c.signal, requery: w, querier: e, trans: null }), Promise.resolve(S).then(function(E) {
3029
+ }(y = { subscr: v, signal: c.signal, requery: _, querier: e, trans: null }), Promise.resolve(S).then(function(E) {
3032
3030
  n = !0, t = E, u || y.signal.aborted || (h = {}, function(O) {
3033
- for (var A in O) if (q(O, A)) return;
3031
+ for (var A in O) if (X(O, A)) return;
3034
3032
  return 1;
3035
3033
  }(g = v) || f || (Re(gt, p), f = !0), hn(function() {
3036
3034
  return !u && o.next && o.next(E);
@@ -3041,7 +3039,7 @@ var Mr = { exports: {} };
3041
3039
  });
3042
3040
  }));
3043
3041
  };
3044
- return setTimeout(w, 0), b;
3042
+ return setTimeout(_, 0), b;
3045
3043
  });
3046
3044
  return i.hasValue = function() {
3047
3045
  return n;
@@ -3051,11 +3049,11 @@ var Mr = { exports: {} };
3051
3049
  }
3052
3050
  var We = Oe;
3053
3051
  function Ln(e) {
3054
- var t = Me;
3052
+ var t = Te;
3055
3053
  try {
3056
- Me = !0, Re.storagemutated.fire(e), Mn(e, !0);
3054
+ Te = !0, Re.storagemutated.fire(e), Tn(e, !0);
3057
3055
  } finally {
3058
- Me = t;
3056
+ Te = t;
3059
3057
  }
3060
3058
  }
3061
3059
  pe(We, l(l({}, Ot), { delete: function(e) {
@@ -3072,7 +3070,7 @@ var Mr = { exports: {} };
3072
3070
  return i.map(function(o) {
3073
3071
  return o.name;
3074
3072
  }).filter(function(o) {
3075
- return o !== Mt;
3073
+ return o !== Tt;
3076
3074
  });
3077
3075
  }) : An(n, t).toCollection().primaryKeys()).then(e);
3078
3076
  } catch {
@@ -3081,55 +3079,55 @@ var Mr = { exports: {} };
3081
3079
  var t, n;
3082
3080
  }, defineClass: function() {
3083
3081
  return function(e) {
3084
- Q(this, e);
3082
+ Y(this, e);
3085
3083
  };
3086
3084
  }, ignoreTransaction: function(e) {
3087
3085
  return G.trans ? Ge(G.transless, e) : e();
3088
3086
  }, vip: Dn, async: function(e) {
3089
3087
  return function() {
3090
3088
  try {
3091
- var t = Tn(e.apply(this, arguments));
3092
- return t && typeof t.then == "function" ? t : N.resolve(t);
3089
+ var t = Mn(e.apply(this, arguments));
3090
+ return t && typeof t.then == "function" ? t : B.resolve(t);
3093
3091
  } catch (n) {
3094
3092
  return te(n);
3095
3093
  }
3096
3094
  };
3097
3095
  }, spawn: function(e, t, n) {
3098
3096
  try {
3099
- var i = Tn(e.apply(n, t || []));
3100
- return i && typeof i.then == "function" ? i : N.resolve(i);
3097
+ var i = Mn(e.apply(n, t || []));
3098
+ return i && typeof i.then == "function" ? i : B.resolve(i);
3101
3099
  } catch (o) {
3102
3100
  return te(o);
3103
3101
  }
3104
3102
  }, currentTransaction: { get: function() {
3105
3103
  return G.trans || null;
3106
3104
  } }, waitFor: function(e, t) {
3107
- return t = N.resolve(typeof e == "function" ? We.ignoreTransaction(e) : e).timeout(t || 6e4), G.trans ? G.trans.waitFor(t) : t;
3108
- }, Promise: N, debug: { get: function() {
3105
+ return t = B.resolve(typeof e == "function" ? We.ignoreTransaction(e) : e).timeout(t || 6e4), G.trans ? G.trans.waitFor(t) : t;
3106
+ }, Promise: B, debug: { get: function() {
3109
3107
  return ye;
3110
3108
  }, set: function(e) {
3111
3109
  Zn(e);
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) {
3110
+ } }, derive: Ye, extend: Y, props: pe, override: zn, Events: dt, on: Re, liveQuery: Pr, extendObservabilitySet: zt, getByKeyPath: we, setByKeyPath: le, delByKeyPath: function(e, t) {
3113
3111
  typeof t == "string" ? le(e, t, void 0) : "length" in t && [].map.call(t, function(n) {
3114
3112
  le(e, n, void 0);
3115
3113
  });
3116
- }, shallowClone: Yn, deepClone: Te, getObjectDiff: jn, cmp: H, asap: Hn, minKey: -1 / 0, addons: [], connections: et, errnames: rn, dependencies: Xt, cache: Ue, semVer: "4.0.10", version: "4.0.10".split(".").map(function(e) {
3114
+ }, shallowClone: Yn, deepClone: Me, getObjectDiff: jn, cmp: H, asap: Hn, minKey: -1 / 0, addons: [], connections: et, errnames: rn, dependencies: Xt, cache: Ue, semVer: "4.0.10", version: "4.0.10".split(".").map(function(e) {
3117
3115
  return parseInt(e);
3118
3116
  }).reduce(function(e, t, n) {
3119
3117
  return e + t / Math.pow(10, 2 * n);
3120
3118
  }) })), We.maxKey = yt(We.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Re(gt, function(e) {
3121
- Me || (e = new CustomEvent(vn, { detail: e }), Me = !0, dispatchEvent(e), Me = !1);
3119
+ Te || (e = new CustomEvent(vn, { detail: e }), Te = !0, dispatchEvent(e), Te = !1);
3122
3120
  }), addEventListener(vn, function(e) {
3123
- e = e.detail, Me || Ln(e);
3121
+ e = e.detail, Te || Ln(e);
3124
3122
  }));
3125
- var rt, Me = !1, Ir = function() {
3123
+ var rt, Te = !1, Ir = function() {
3126
3124
  };
3127
3125
  return typeof BroadcastChannel < "u" && ((Ir = function() {
3128
3126
  (rt = new BroadcastChannel(vn)).onmessage = function(e) {
3129
3127
  return e.data && Ln(e.data);
3130
3128
  };
3131
3129
  })(), typeof rt.unref == "function" && rt.unref(), Re(gt, function(e) {
3132
- Me || rt.postMessage(e);
3130
+ Te || rt.postMessage(e);
3133
3131
  })), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
3134
3132
  if (!Oe.disableBfCache && e.persisted) {
3135
3133
  ye && console.debug("Dexie: handling persisted pagehide"), rt != null && rt.close();
@@ -3137,7 +3135,7 @@ var Mr = { exports: {} };
3137
3135
  }
3138
3136
  }), addEventListener("pageshow", function(e) {
3139
3137
  !Oe.disableBfCache && e.persisted && (ye && console.debug("Dexie: handling persisted pageshow"), Ir(), Ln({ all: new ae(-1 / 0, [[]]) }));
3140
- })), N.rejectionMapper = function(e, t) {
3138
+ })), B.rejectionMapper = function(e, t) {
3141
3139
  return !e || e instanceof Xe || e instanceof TypeError || e instanceof SyntaxError || !e.name || !Vn[e.name] ? e : (t = new Vn[e.name](t || e.message, e), "stack" in e && Ae(t, "stack", { get: function() {
3142
3140
  return this.inner.stack;
3143
3141
  } }), t);
@@ -3149,16 +3147,16 @@ var Mr = { exports: {} };
3149
3147
  return new ht({ remove: e });
3150
3148
  }, default: Oe, RangeSet: ae, mergeRanges: vt, rangesOverlap: vr }), { default: Oe }), Oe;
3151
3149
  });
3152
- })(Mr);
3153
- var Ii = Mr.exports;
3150
+ })(Tr);
3151
+ var Ii = Tr.exports;
3154
3152
  const Un = /* @__PURE__ */ Pi(Ii), Rr = Symbol.for("Dexie"), qt = globalThis[Rr] || (globalThis[Rr] = Un);
3155
3153
  if (Un.semVer !== qt.semVer)
3156
3154
  throw new Error(`Two different versions of Dexie loaded in the same app: ${Un.semVer} and ${qt.semVer}`);
3157
- function J(d) {
3155
+ function V(d) {
3158
3156
  let r = `${d.type}.${d.topics}`;
3159
3157
  return d.order && (r += `.${d.order}`), d.period && (r += `.${d.period}`), r;
3160
3158
  }
3161
- function Tr(d) {
3159
+ function Mr(d) {
3162
3160
  var r;
3163
3161
  if (d.widget === void 0) {
3164
3162
  const s = (r = d.topics) == null ? void 0 : r.split("-");
@@ -3167,11 +3165,11 @@ function Tr(d) {
3167
3165
  return d.topics === void 0 && (d.topics = `${d.dashboard}-${d.widget}`), d;
3168
3166
  }
3169
3167
  function _t(d, r) {
3170
- var B;
3171
- let s, l, x, D, T;
3168
+ var P;
3169
+ let s, l, x, D, j;
3172
3170
  switch (d.moderation) {
3173
3171
  case Zt.BEFORE:
3174
- s = /* @__PURE__ */ new Date(), l = (B = d.beforeTime) == null ? void 0 : B.split(":"), x = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"), T = Number.parseInt(l ? l[2] : "00"), r.before = s.setHours(x, D, T, 0) / 1e3, r.period || (r.period = s.getDay() === 1 ? 72 : 24);
3172
+ s = /* @__PURE__ */ new Date(), l = (P = d.beforeTime) == null ? void 0 : P.split(":"), x = Number.parseInt(l ? l[0] : "00"), D = Number.parseInt(l ? l[1] : "00"), j = Number.parseInt(l ? l[2] : "00"), r.before = s.setHours(x, D, j, 0) / 1e3, r.period || (r.period = s.getDay() === 1 ? 72 : 24);
3175
3173
  break;
3176
3174
  case Zt.DELAYED:
3177
3175
  d.delay && d.delay > 0 && (r.delay = `${d.delay}`);
@@ -3195,17 +3193,17 @@ class jr {
3195
3193
  * @returns IResponse
3196
3194
  */
3197
3195
  k(this, "getCloud", async (r) => {
3198
- const s = await this.db.table(K.CLOUD).where({ id: r.widget }).last().catch(() => {
3196
+ const s = await this.db.table(N.CLOUD).where({ id: r.widget }).last().catch(() => {
3199
3197
  console.warn(
3200
3198
  "%capi%C %ccloud",
3201
- _.API,
3202
- _.NONE,
3203
- _.CLOUD,
3199
+ w.API,
3200
+ w.NONE,
3201
+ w.CLOUD,
3204
3202
  r.slide,
3205
3203
  r.widget
3206
3204
  );
3207
3205
  });
3208
- return s === void 0 ? { data: null, message: "Cloud Data error", success: !1 } : (s.data.presentation = (r == null ? void 0 : r.presentation) || "not set", s.data.slide = (r == null ? void 0 : r.slide) || "not set", s.message = "Messages retrieved successfully", s.success = !0, s);
3206
+ return typeof s > "u" ? { data: null, message: "Cloud Data error", success: !1 } : (s.data.presentation = (r == null ? void 0 : r.presentation) || "not set", s.data.slide = (r == null ? void 0 : r.slide) || "not set", s.message = "Messages retrieved successfully", s.success = !0, s);
3209
3207
  });
3210
3208
  /**
3211
3209
  * Retrieve Cloud Data
@@ -3213,12 +3211,12 @@ class jr {
3213
3211
  * @returns IResponse
3214
3212
  */
3215
3213
  k(this, "getSeries", async (r) => {
3216
- const s = await this.db.table(K.SERIES).where({ id: r.widget }).last().catch(() => {
3214
+ const s = await this.db.table(N.SERIES).where({ id: r.widget }).last().catch(() => {
3217
3215
  console.warn(
3218
3216
  "%capi%c %cseries",
3219
- _.API,
3220
- _.NONE,
3221
- _.SERIES,
3217
+ w.API,
3218
+ w.NONE,
3219
+ w.SERIES,
3222
3220
  r.slide,
3223
3221
  r.widget
3224
3222
  );
@@ -3233,14 +3231,14 @@ class jr {
3233
3231
  k(this, "getMessages", async (r) => {
3234
3232
  const s = (r == null ? void 0 : r.order) ?? "utc";
3235
3233
  s !== "utc" && (r.since = Math.floor(Date.now() / 1e3) - 60 * 60 * 24 * 7), this.options.delay != 0 ? r.before = Math.floor(Date.now() / 1e3) - (this.options.delay || 0) : r.before = Math.floor(Date.now() / 1e3);
3236
- const l = (T) => T.utc > ((r == null ? void 0 : r.since) || 0), x = (T) => T.utc < ((r == null ? void 0 : r.before) || Date.now() / 1e3), D = (T) => (T == null ? void 0 : T.visible) !== 0;
3234
+ const l = (j) => j.utc > ((r == null ? void 0 : r.since) || 0), x = (j) => j.utc < ((r == null ? void 0 : r.before) || Date.now() / 1e3), D = (j) => (j == null ? void 0 : j.visible) !== 0;
3237
3235
  try {
3238
- const B = await this.db.table(K.TOPICS).where("widget_id").equals(r.widget).filter(D).filter(l).filter(x).reverse().limit((r == null ? void 0 : r.limit) ?? 25).sortBy(s);
3239
- if (B.length === 0)
3236
+ const P = await this.db.table(N.TOPICS).where("widget_id").equals(r.widget).filter(D).filter(l).filter(x).reverse().limit((r == null ? void 0 : r.limit) ?? 25).sortBy(s);
3237
+ if (P.length === 0)
3240
3238
  return { data: null, message: "No Messages error", success: !1 };
3241
- let Q = B.map((V) => this.db.table(K.MESSAGES).get({ id: V.message_id }));
3242
- return qt.Promise.all(Q).then(async (V) => {
3243
- const ve = V.map((pe) => pe.data), q = {
3239
+ let Y = P.map((Z) => this.db.table(N.MESSAGES).get({ id: Z.message_id }));
3240
+ return qt.Promise.all(Y).then(async (Z) => {
3241
+ const ve = Z.map((pe) => pe.data), X = {
3244
3242
  data: {
3245
3243
  presentation: (r == null ? void 0 : r.presentation) || "not set",
3246
3244
  slide: (r == null ? void 0 : r.slide) || "not set",
@@ -3254,20 +3252,20 @@ class jr {
3254
3252
  };
3255
3253
  return console.debug(
3256
3254
  "%cstorage%c %cmessages",
3257
- _.STORAGE,
3258
- _.NONE,
3259
- _.MESSAGES,
3260
- q
3261
- ), q;
3255
+ w.STORAGE,
3256
+ w.NONE,
3257
+ w.MESSAGES,
3258
+ X
3259
+ ), X;
3262
3260
  });
3263
- } catch (T) {
3261
+ } catch (j) {
3264
3262
  return console.warn(
3265
3263
  "%cstorage%c %cmessages",
3266
- _.STORAGE,
3267
- _.NONE,
3268
- _.MESSAGES,
3264
+ w.STORAGE,
3265
+ w.NONE,
3266
+ w.MESSAGES,
3269
3267
  r,
3270
- T
3268
+ j
3271
3269
  ), { data: null, message: "Messages Data error", success: !1 };
3272
3270
  }
3273
3271
  });
@@ -3277,22 +3275,24 @@ class jr {
3277
3275
  * @param data
3278
3276
  * @returns number
3279
3277
  */
3280
- k(this, "setCloud", async (r, s) => r.type === K.CLOUD && s !== "" ? await this.db.table(K.CLOUD).put({
3278
+ k(this, "setCloud", async (r, s) => r.type === N.CLOUD && s !== "" ? await this.db.table(N.CLOUD).put({
3281
3279
  id: r.widget,
3282
3280
  dashboard_id: r.dashboard,
3283
- data: s.data
3284
- }).then(() => 201).catch((l) => (console.error("%cstorage", _.STORAGE, "set", r, l.message), 400)) : 400);
3281
+ //data: data.data,
3282
+ data: s
3283
+ }).then(() => 201).catch((l) => (console.error("%cstorage", w.STORAGE, "set", r, l.message), 400)) : 400);
3285
3284
  /**
3286
3285
  * Update Series
3287
3286
  * @param query IQuery
3288
3287
  * @param data
3289
3288
  * @returns number
3290
3289
  */
3291
- k(this, "setSeries", async (r, s) => r.type === K.SERIES && s !== "" ? await this.db.table(K.SERIES).put({
3290
+ k(this, "setSeries", async (r, s) => r.type === N.SERIES && s !== "" ? await this.db.table(N.SERIES).put({
3292
3291
  id: r.widget,
3293
3292
  dashboard_id: r.dashboard,
3294
- data: s.data
3295
- }).then(() => 201).catch((l) => (console.error("%cstorage", _.STORAGE, "set", r, l.message), 400)) : 400);
3293
+ //data: data.data,
3294
+ data: s
3295
+ }).then(() => 201).catch((l) => (console.error("%cstorage", w.STORAGE, "set", r, l.message), 400)) : 400);
3296
3296
  /**
3297
3297
  * Update Messages
3298
3298
  * @param query IQuery
@@ -3300,13 +3300,13 @@ class jr {
3300
3300
  * @returns number
3301
3301
  */
3302
3302
  k(this, "setMessages", async (r, s) => {
3303
- if (r.type !== K.MESSAGES)
3303
+ if (r.type !== N.MESSAGES)
3304
3304
  return 400;
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, ve, q, pe;
3309
- D.id !== null && (await this.db.table(K.MESSAGES).put({
3308
+ var j, P, Y, Z, ve, X, pe;
3309
+ D.id !== null && (await this.db.table(N.MESSAGES).put({
3310
3310
  id: D.id,
3311
3311
  utc: D.utc,
3312
3312
  data: D,
@@ -3314,27 +3314,27 @@ class jr {
3314
3314
  }).catch((He) => {
3315
3315
  x++, console.error(
3316
3316
  "%cstorage",
3317
- _.STORAGE,
3317
+ w.STORAGE,
3318
3318
  "set message",
3319
3319
  `title: ${l}`,
3320
3320
  D,
3321
3321
  He.message
3322
3322
  );
3323
- }), await this.db.table(K.TOPICS).put({
3323
+ }), await this.db.table(N.TOPICS).put({
3324
3324
  title: l,
3325
3325
  widget_id: r.widget,
3326
3326
  message_id: D.id,
3327
3327
  dashboard_id: r.dashboard,
3328
- engagement: ((T = D.topics[0]) == null ? void 0 : T.engagement) || ((B = D.dynamics) == null ? void 0 : B.engagement) || 0,
3329
- impressions: ((Q = D.topics[0]) == null ? void 0 : Q.impressions) || ((V = D.dynamics) == null ? void 0 : V.semrush_visits) || 0,
3330
- reach: ((ve = D.topics[0]) == null ? void 0 : ve.reach) || ((q = D.dynamics) == null ? void 0 : q.potential_reach) || 0,
3328
+ engagement: ((j = D.topics[0]) == null ? void 0 : j.engagement) || ((P = D.dynamics) == null ? void 0 : P.engagement) || 0,
3329
+ impressions: ((Y = D.topics[0]) == null ? void 0 : Y.impressions) || ((Z = D.dynamics) == null ? void 0 : Z.semrush_visits) || 0,
3330
+ reach: ((ve = D.topics[0]) == null ? void 0 : ve.reach) || ((X = D.dynamics) == null ? void 0 : X.potential_reach) || 0,
3331
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) => {
3335
3335
  x++, console.error(
3336
3336
  "%cstorage",
3337
- _.STORAGE,
3337
+ w.STORAGE,
3338
3338
  "set topic",
3339
3339
  `title: ${l}`,
3340
3340
  D,
@@ -3342,15 +3342,15 @@ class jr {
3342
3342
  );
3343
3343
  }));
3344
3344
  }), s.data.topics.forEach(async (D) => {
3345
- const T = D.message_id, B = D.visible ? 1 : 0, Q = D.title;
3346
- await this.db.table(K.TOPICS).where("message_id").equals(T).modify({ visible: B }).catch((V) => {
3345
+ const j = D.message_id, P = D.visible ? 1 : 0, Y = D.title;
3346
+ await this.db.table(N.TOPICS).where("message_id").equals(j).modify({ visible: P }).catch((Z) => {
3347
3347
  x++, console.error(
3348
3348
  "%cstorage",
3349
- _.STORAGE,
3349
+ w.STORAGE,
3350
3350
  "update message visibility",
3351
- `title: ${Q}`,
3351
+ `title: ${Y}`,
3352
3352
  `widget: ${D.widget_id}`,
3353
- V.message
3353
+ Z.message
3354
3354
  );
3355
3355
  });
3356
3356
  }), x === 0 ? 201 : 400;
@@ -3360,26 +3360,26 @@ class jr {
3360
3360
  */
3361
3361
  k(this, "cleanMessages", async () => {
3362
3362
  const r = Date.now() / 1e3, s = (D) => D.expires < r, l = (D) => D.expires < r;
3363
- return await this.db.table(K.TOPICS).orderBy("expires").filter(s).delete().catch((D) => (console.error(
3363
+ return await this.db.table(N.TOPICS).orderBy("expires").filter(s).delete().catch((D) => (console.error(
3364
3364
  "%cstorage%c %cclean",
3365
- _.STORAGE,
3366
- _.NONE,
3367
- _.MESSAGES,
3365
+ w.STORAGE,
3366
+ w.NONE,
3367
+ w.MESSAGES,
3368
3368
  D.message
3369
- ), 0)), await this.db.table(K.MESSAGES).orderBy("expires").filter(l).delete().catch((D) => (console.error(
3369
+ ), 0)), await this.db.table(N.MESSAGES).orderBy("expires").filter(l).delete().catch((D) => (console.error(
3370
3370
  "%cstorage%c %clean",
3371
- _.STORAGE,
3372
- _.NONE,
3373
- _.MESSAGES,
3371
+ w.STORAGE,
3372
+ w.NONE,
3373
+ w.MESSAGES,
3374
3374
  D.message
3375
3375
  ), 0));
3376
3376
  });
3377
3377
  k(this, "hideMessage", async (r, s) => {
3378
- await this.db.table(K.TOPICS).where("message_id").equals(r).modify({ visible: s ? 1 : 0 }).catch((l) => (console.error(
3378
+ await this.db.table(N.TOPICS).where("message_id").equals(r).modify({ visible: s ? 1 : 0 }).catch((l) => (console.error(
3379
3379
  "%cstorage%c %chide",
3380
- _.STORAGE,
3381
- _.NONE,
3382
- _.HIDE,
3380
+ w.STORAGE,
3381
+ w.NONE,
3382
+ w.HIDE,
3383
3383
  l.message
3384
3384
  ), 0));
3385
3385
  });
@@ -3388,14 +3388,14 @@ class jr {
3388
3388
  * @param query IQuery
3389
3389
  * @returns number
3390
3390
  */
3391
- k(this, "setWidget", async (r) => await this.db.table(K.WIDGETS).put({
3391
+ k(this, "setWidget", async (r) => await this.db.table(N.WIDGETS).put({
3392
3392
  id: r.widget,
3393
3393
  dashboard_id: r.dashboard,
3394
3394
  type: r.type
3395
3395
  }).then(() => 201).catch((s) => (console.error(
3396
3396
  "%cstorage",
3397
- _.STORAGE,
3398
- K.WIDGET,
3397
+ w.STORAGE,
3398
+ N.WIDGET,
3399
3399
  r,
3400
3400
  s.message
3401
3401
  ), 400)));
@@ -3404,13 +3404,13 @@ class jr {
3404
3404
  * @param query IQuery
3405
3405
  * @returns null
3406
3406
  */
3407
- k(this, "subscribe", (r) => (r = Tr(r), this.subscribers.filter(
3407
+ k(this, "subscribe", (r) => (r = Mr(r), this.subscribers.filter(
3408
3408
  (l) => l.widget === r.widget
3409
- ).length > 0 || (r.type === K.MESSAGES && (r = _t(this.options, r)), console.debug(
3409
+ ).length > 0 || (r.type === N.MESSAGES && (r = _t(this.options, r)), console.debug(
3410
3410
  "%cstorage%c %csubscribe",
3411
- _.STORAGE,
3412
- _.NONE,
3413
- _.SUBSCRIBE,
3411
+ w.STORAGE,
3412
+ w.NONE,
3413
+ w.SUBSCRIBE,
3414
3414
  r.slide,
3415
3415
  r.widget
3416
3416
  ), this.subscribers.push(r)), null));
@@ -3425,12 +3425,12 @@ class jr {
3425
3425
  * @returns IResponse
3426
3426
  */
3427
3427
  k(this, "loadSlide", async (r) => {
3428
- const s = await this.db.table(K.SLIDE).where({ id: r.id }).last().catch(() => {
3428
+ const s = await this.db.table(N.SLIDE).where({ id: r.id }).last().catch(() => {
3429
3429
  console.warn(
3430
3430
  "%capi%c %cseries",
3431
- _.API,
3432
- _.NONE,
3433
- _.SERIES,
3431
+ w.API,
3432
+ w.NONE,
3433
+ w.SERIES,
3434
3434
  r.id
3435
3435
  );
3436
3436
  });
@@ -3441,7 +3441,7 @@ class jr {
3441
3441
  * @param query IQuery
3442
3442
  * @returns number
3443
3443
  */
3444
- k(this, "storeSlide", async (r) => r.type === K.SLIDE && r.data !== "" ? await this.db.table(K.SLIDE).put({
3444
+ k(this, "storeSlide", async (r) => r.type === N.SLIDE && r.data !== "" ? await this.db.table(N.SLIDE).put({
3445
3445
  id: r.id,
3446
3446
  title: r.data.title || "Not set",
3447
3447
  json: r.data.json || {},
@@ -3449,7 +3449,7 @@ class jr {
3449
3449
  css: r.data.css || ""
3450
3450
  }).then(() => 200).catch((s) => (console.error(
3451
3451
  "%cstorage",
3452
- _.STORAGE,
3452
+ w.STORAGE,
3453
3453
  re.SLIDE_STORE,
3454
3454
  r,
3455
3455
  s.message
@@ -3478,7 +3478,7 @@ function Ci(d, r) {
3478
3478
  const s = indexedDB.open(d);
3479
3479
  s.onupgradeneeded = () => s.result.createObjectStore(r);
3480
3480
  const l = Wn(s);
3481
- return (x, D) => l.then((T) => D(T.transaction(r, x).objectStore(r)));
3481
+ return (x, D) => l.then((j) => D(j.transaction(r, x).objectStore(r)));
3482
3482
  }
3483
3483
  let $n;
3484
3484
  function Kr() {
@@ -3495,16 +3495,16 @@ class Nr {
3495
3495
  k(this, "subscribers", []);
3496
3496
  k(this, "options");
3497
3497
  k(this, "getCloud", async (r) => {
3498
- const s = J(r);
3499
- return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", _.API, K.CLOUD, r.slide, r.widget), { data: null, message: "Cloud Data error", success: !1 }));
3498
+ const s = V(r);
3499
+ return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", w.API, N.CLOUD, r.slide, r.widget), { data: null, message: "Cloud Data error", success: !1 }));
3500
3500
  });
3501
3501
  k(this, "getSeries", async (r) => {
3502
- const s = J(r);
3503
- return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", _.API, K.SERIES, r.slide, r.widget), { data: null, message: "Series Data error", success: !1 }));
3502
+ const s = V(r);
3503
+ return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", w.API, N.SERIES, r.slide, r.widget), { data: null, message: "Series Data error", success: !1 }));
3504
3504
  });
3505
3505
  k(this, "getMessages", async (r) => {
3506
- const s = J(r);
3507
- return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", _.API, K.MESSAGES, r.slide, r.widget), { data: null, message: "Messages Data error", success: !1 }));
3506
+ const s = V(r);
3507
+ return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", w.API, N.MESSAGES, r.slide, r.widget), { data: null, message: "Messages Data error", success: !1 }));
3508
3508
  });
3509
3509
  /**
3510
3510
  * Update Cloud
@@ -3515,8 +3515,8 @@ class Nr {
3515
3515
  k(this, "setCloud", async (r, s) => {
3516
3516
  if (!s.success)
3517
3517
  return 400;
3518
- const l = J(r);
3519
- return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage", _.STORAGE, K.CLOUD, r, x.message), 400));
3518
+ const l = V(r);
3519
+ return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage", w.STORAGE, N.CLOUD, r, x.message), 400));
3520
3520
  });
3521
3521
  /**
3522
3522
  * Update Series
@@ -3527,8 +3527,8 @@ class Nr {
3527
3527
  k(this, "setSeries", async (r, s) => {
3528
3528
  if (!s.success)
3529
3529
  return 400;
3530
- const l = J(r);
3531
- return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage", _.STORAGE, K.SERIES, r, x.message), 400));
3530
+ const l = V(r);
3531
+ return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage", w.STORAGE, N.SERIES, r, x.message), 400));
3532
3532
  });
3533
3533
  /**
3534
3534
  * Update Messages
@@ -3539,8 +3539,8 @@ class Nr {
3539
3539
  k(this, "setMessages", async (r, s) => {
3540
3540
  if (!s.success)
3541
3541
  return 400;
3542
- const l = J(r);
3543
- return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage", _.STORAGE, K.MESSAGES, r, x.message), 400));
3542
+ const l = V(r);
3543
+ return delete s.success, delete s.message, await wt(l, s).then(() => 201).catch((x) => (console.error("%cstorage", w.STORAGE, N.MESSAGES, r, x.message), 400));
3544
3544
  });
3545
3545
  k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
3546
3546
  k(this, "hideMessage", async (r, s) => {
@@ -3554,25 +3554,25 @@ class Nr {
3554
3554
  * @returns number
3555
3555
  */
3556
3556
  k(this, "setWidget", async (r) => {
3557
- const s = J(r), l = {
3557
+ const s = V(r), l = {
3558
3558
  id: r.widget,
3559
3559
  dashboard_id: r.dashboard,
3560
3560
  type: r.type
3561
3561
  };
3562
- return await wt(s, l).then(() => 201).catch((x) => (console.error("%cstorage", _.STORAGE, K.WIDGET, r, x.message), 400));
3562
+ return await wt(s, l).then(() => 201).catch((x) => (console.error("%cstorage", w.STORAGE, N.WIDGET, r, x.message), 400));
3563
3563
  });
3564
3564
  /**
3565
3565
  * Add component subscriber
3566
3566
  * @param query IQuery
3567
3567
  * @returns null
3568
3568
  */
3569
- k(this, "subscribe", (r) => (r.type === K.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3569
+ k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3570
3570
  (l) => l.widget === r.widget
3571
3571
  ).length > 0 || (console.debug(
3572
3572
  "%cstorage%c %csubscribe",
3573
- _.STORAGE,
3574
- _.NONE,
3575
- _.SUBSCRIBE,
3573
+ w.STORAGE,
3574
+ w.NONE,
3575
+ w.SUBSCRIBE,
3576
3576
  r.slide,
3577
3577
  r.widget
3578
3578
  ), this.subscribers.push(r)), null));
@@ -3582,8 +3582,8 @@ class Nr {
3582
3582
  */
3583
3583
  k(this, "getSubscribers", async () => await new Promise((r) => r(this.subscribers)));
3584
3584
  k(this, "loadSlide", async (r) => {
3585
- const s = J(r);
3586
- return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", _.API, K.SLIDE, r.slide), { data: null, message: "Slide Load error", success: !1 }));
3585
+ const s = V(r);
3586
+ return await Vt(s).then((l) => l).catch(() => (console.warn("%capi", w.API, N.SLIDE, r.slide), { data: null, message: "Slide Load error", success: !1 }));
3587
3587
  });
3588
3588
  /**
3589
3589
  * Update Slide
@@ -3591,14 +3591,14 @@ class Nr {
3591
3591
  * @returns number
3592
3592
  */
3593
3593
  k(this, "storeSlide", async (r) => {
3594
- const s = J(r), l = {
3594
+ const s = V(r), l = {
3595
3595
  id: r.id,
3596
3596
  title: r.data.title || "Not set",
3597
3597
  json: r.data.json || {},
3598
3598
  html: r.data.html || "",
3599
3599
  css: r.data.css || ""
3600
3600
  };
3601
- return await wt(s, l).then(() => 201).catch((x) => (console.error("%cstorage", _.STORAGE, K.SLIDE, r, x.message), 400));
3601
+ return await wt(s, l).then(() => 201).catch((x) => (console.error("%cstorage", w.STORAGE, N.SLIDE, r, x.message), 400));
3602
3602
  });
3603
3603
  this.options = r;
3604
3604
  }
@@ -3608,27 +3608,27 @@ class Br {
3608
3608
  k(this, "subscribers", []);
3609
3609
  k(this, "options");
3610
3610
  k(this, "getCloud", async (r) => {
3611
- const s = J(r);
3611
+ const s = V(r);
3612
3612
  try {
3613
3613
  return localStorage.getObject(s);
3614
3614
  } catch (l) {
3615
- return console.warn("%capi", _.API, K.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3615
+ return console.warn("%capi", w.API, N.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3616
3616
  }
3617
3617
  });
3618
3618
  k(this, "getSeries", async (r) => {
3619
- const s = J(r);
3619
+ const s = V(r);
3620
3620
  try {
3621
3621
  return localStorage.getObject(s);
3622
3622
  } catch (l) {
3623
- return console.warn("%capi", _.API, K.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3623
+ return console.warn("%capi", w.API, N.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3624
3624
  }
3625
3625
  });
3626
3626
  k(this, "getMessages", async (r) => {
3627
- const s = J(r);
3627
+ const s = V(r);
3628
3628
  try {
3629
3629
  return localStorage.getObject(s);
3630
3630
  } catch (l) {
3631
- return console.warn("%capi", _.API, K.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3631
+ return console.warn("%capi", w.API, N.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3632
3632
  }
3633
3633
  });
3634
3634
  /**
@@ -3638,11 +3638,11 @@ class Br {
3638
3638
  * @returns number
3639
3639
  */
3640
3640
  k(this, "setCloud", async (r, s) => {
3641
- const l = J(r);
3641
+ const l = V(r);
3642
3642
  try {
3643
3643
  return localStorage.setObject(l, s), 201;
3644
3644
  } catch (x) {
3645
- return console.error("%cstorage", _.STORAGE, K.CLOUD, r, x), 400;
3645
+ return console.error("%cstorage", w.STORAGE, N.CLOUD, r, x), 400;
3646
3646
  }
3647
3647
  });
3648
3648
  /**
@@ -3652,11 +3652,11 @@ class Br {
3652
3652
  * @returns number
3653
3653
  */
3654
3654
  k(this, "setSeries", async (r, s) => {
3655
- const l = J(r);
3655
+ const l = V(r);
3656
3656
  try {
3657
3657
  return localStorage.setObject(l, s), 201;
3658
3658
  } catch (x) {
3659
- return console.error("%cstorage", _.STORAGE, K.SERIES, r, x), 400;
3659
+ return console.error("%cstorage", w.STORAGE, N.SERIES, r, x), 400;
3660
3660
  }
3661
3661
  });
3662
3662
  /**
@@ -3666,11 +3666,11 @@ class Br {
3666
3666
  * @returns number
3667
3667
  */
3668
3668
  k(this, "setMessages", async (r, s) => {
3669
- const l = J(r);
3669
+ const l = V(r);
3670
3670
  try {
3671
3671
  return localStorage.setObject(l, s), 200;
3672
3672
  } catch (x) {
3673
- return console.error("%cstorage", _.STORAGE, K.MESSAGES, r, x), 400;
3673
+ return console.error("%cstorage", w.STORAGE, N.MESSAGES, r, x), 400;
3674
3674
  }
3675
3675
  });
3676
3676
  k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
@@ -3682,7 +3682,7 @@ class Br {
3682
3682
  try {
3683
3683
  return localStorage.setObject(s, r), 201;
3684
3684
  } catch (l) {
3685
- return console.error("%cstorage", _.STORAGE, K.WIDGET, r, l), 400;
3685
+ return console.error("%cstorage", w.STORAGE, N.WIDGET, r, l), 400;
3686
3686
  }
3687
3687
  });
3688
3688
  /**
@@ -3690,13 +3690,13 @@ class Br {
3690
3690
  * @param query IQuery
3691
3691
  * @returns null
3692
3692
  */
3693
- k(this, "subscribe", (r) => (r.type === K.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3693
+ k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3694
3694
  (l) => l.widget === r.widget
3695
3695
  ).length || (console.debug(
3696
3696
  "%cstorage%c %csubscribe",
3697
- _.STORAGE,
3698
- _.NONE,
3699
- _.SUBSCRIBE,
3697
+ w.STORAGE,
3698
+ w.NONE,
3699
+ w.SUBSCRIBE,
3700
3700
  r.slide,
3701
3701
  r.widget
3702
3702
  ), this.subscribers.push(r)), null));
@@ -3709,7 +3709,7 @@ class Br {
3709
3709
  try {
3710
3710
  return localStorage.getObject(`${r.type}.${r.id}`);
3711
3711
  } catch (s) {
3712
- return console.warn("%capi", _.API, K.SLIDE, r.id, s), { data: null, message: "Slide Load error", success: !1 };
3712
+ return console.warn("%capi", w.API, N.SLIDE, r.id, s), { data: null, message: "Slide Load error", success: !1 };
3713
3713
  }
3714
3714
  });
3715
3715
  k(this, "storeSlide", async (r) => {
@@ -3722,7 +3722,7 @@ class Br {
3722
3722
  css: r.data.css || ""
3723
3723
  }), 201;
3724
3724
  } catch (s) {
3725
- return console.error("%cstorage", _.STORAGE, K.SLIDE, r, s), 400;
3725
+ return console.error("%cstorage", w.STORAGE, N.SLIDE, r, s), 400;
3726
3726
  }
3727
3727
  });
3728
3728
  this.options = r, Storage.prototype.setObject = function(s, l) {
@@ -3738,27 +3738,27 @@ class Lr {
3738
3738
  k(this, "subscribers", []);
3739
3739
  k(this, "options");
3740
3740
  k(this, "getCloud", async (r) => {
3741
- const s = J(r);
3741
+ const s = V(r);
3742
3742
  try {
3743
3743
  return sessionStorage.getObject(s);
3744
3744
  } catch (l) {
3745
- return console.warn("%capi", _.API, K.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3745
+ return console.warn("%capi", w.API, N.CLOUD, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3746
3746
  }
3747
3747
  });
3748
3748
  k(this, "getSeries", async (r) => {
3749
- const s = J(r);
3749
+ const s = V(r);
3750
3750
  try {
3751
3751
  return sessionStorage.getObject(s);
3752
3752
  } catch (l) {
3753
- return console.warn("%capi", _.API, K.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3753
+ return console.warn("%capi", w.API, N.SERIES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3754
3754
  }
3755
3755
  });
3756
3756
  k(this, "getMessages", async (r) => {
3757
- const s = J(r);
3757
+ const s = V(r);
3758
3758
  try {
3759
3759
  return sessionStorage.getObject(s);
3760
3760
  } catch (l) {
3761
- return console.warn("%capi", _.API, K.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3761
+ return console.warn("%capi", w.API, N.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3762
3762
  }
3763
3763
  });
3764
3764
  /**
@@ -3768,11 +3768,11 @@ class Lr {
3768
3768
  * @returns number
3769
3769
  */
3770
3770
  k(this, "setCloud", async (r, s) => {
3771
- const l = J(r);
3771
+ const l = V(r);
3772
3772
  try {
3773
3773
  return sessionStorage.setObject(l, s), 201;
3774
3774
  } catch (x) {
3775
- return console.error("%cstorage", _.STORAGE, K.CLOUD, r, x), 400;
3775
+ return console.error("%cstorage", w.STORAGE, N.CLOUD, r, x), 400;
3776
3776
  }
3777
3777
  });
3778
3778
  /**
@@ -3782,11 +3782,11 @@ class Lr {
3782
3782
  * @returns number
3783
3783
  */
3784
3784
  k(this, "setSeries", async (r, s) => {
3785
- const l = J(r);
3785
+ const l = V(r);
3786
3786
  try {
3787
3787
  return sessionStorage.setObject(l, s), 201;
3788
3788
  } catch (x) {
3789
- return console.error("%cstorage", _.STORAGE, K.SERIES, r, x), 400;
3789
+ return console.error("%cstorage", w.STORAGE, N.SERIES, r, x), 400;
3790
3790
  }
3791
3791
  });
3792
3792
  /**
@@ -3796,11 +3796,11 @@ class Lr {
3796
3796
  * @returns number
3797
3797
  */
3798
3798
  k(this, "setMessages", async (r, s) => {
3799
- const l = J(r);
3799
+ const l = V(r);
3800
3800
  try {
3801
3801
  return sessionStorage.setObject(l, s), 200;
3802
3802
  } catch (x) {
3803
- return console.error("%cstorage", _.STORAGE, K.MESSAGES, r, x), 400;
3803
+ return console.error("%cstorage", w.STORAGE, N.MESSAGES, r, x), 400;
3804
3804
  }
3805
3805
  });
3806
3806
  k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
@@ -3812,7 +3812,7 @@ class Lr {
3812
3812
  try {
3813
3813
  return sessionStorage.setObject(s, r), 201;
3814
3814
  } catch (l) {
3815
- return console.error("%cstorage", _.STORAGE, K.WIDGET, r, l), 400;
3815
+ return console.error("%cstorage", w.STORAGE, N.WIDGET, r, l), 400;
3816
3816
  }
3817
3817
  });
3818
3818
  /**
@@ -3820,13 +3820,13 @@ class Lr {
3820
3820
  * @param query IQuery
3821
3821
  * @returns null
3822
3822
  */
3823
- k(this, "subscribe", (r) => (r.type === K.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3823
+ k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3824
3824
  (l) => l.widget === r.widget
3825
3825
  ).length || (console.debug(
3826
3826
  "%cstorage%c %csubscribe",
3827
- _.STORAGE,
3828
- _.NONE,
3829
- _.SUBSCRIBE,
3827
+ w.STORAGE,
3828
+ w.NONE,
3829
+ w.SUBSCRIBE,
3830
3830
  r.slide,
3831
3831
  r.widget
3832
3832
  ), this.subscribers.push(r)), null));
@@ -3839,7 +3839,7 @@ class Lr {
3839
3839
  try {
3840
3840
  return sessionStorage.getObject(`${r.type}.${r.id}`);
3841
3841
  } catch (s) {
3842
- return console.warn("%capi", _.API, K.SLIDE, r.id, s), { data: null, message: "Store Load error", success: !1 };
3842
+ return console.warn("%capi", w.API, N.SLIDE, r.id, s), { data: null, message: "Store Load error", success: !1 };
3843
3843
  }
3844
3844
  });
3845
3845
  /**
@@ -3857,7 +3857,7 @@ class Lr {
3857
3857
  css: r.data.css || ""
3858
3858
  }), 200;
3859
3859
  } catch (s) {
3860
- return console.error("%cstorage", _.STORAGE, K.SLIDE, r, s), 400;
3860
+ return console.error("%cstorage", w.STORAGE, N.SLIDE, r, s), 400;
3861
3861
  }
3862
3862
  });
3863
3863
  this.options = r, Storage.prototype.setObject = function(s, l) {
@@ -3873,27 +3873,27 @@ class Gr {
3873
3873
  k(this, "subscribers", []);
3874
3874
  k(this, "options");
3875
3875
  k(this, "getCloud", async (r) => {
3876
- const s = J(r);
3876
+ const s = V(r);
3877
3877
  try {
3878
3878
  return window.BuzzCasting.WidgetData[s];
3879
3879
  } catch (l) {
3880
- return console.warn("%capi", _.API, K.CLOUD, r.slide, r.widget, l), { data: null, message: "Cloud Data error", success: !1 };
3880
+ return console.warn("%capi", w.API, N.CLOUD, r.slide, r.widget, l), { data: null, message: "Cloud Data error", success: !1 };
3881
3881
  }
3882
3882
  });
3883
3883
  k(this, "getSeries", async (r) => {
3884
- const s = J(r);
3884
+ const s = V(r);
3885
3885
  try {
3886
3886
  return window.BuzzCasting.WidgetData[s];
3887
3887
  } catch (l) {
3888
- return console.warn("%capi", _.API, K.SERIES, r.slide, r.widget, l), { data: null, message: "Series Data error", success: !1 };
3888
+ return console.warn("%capi", w.API, N.SERIES, r.slide, r.widget, l), { data: null, message: "Series Data error", success: !1 };
3889
3889
  }
3890
3890
  });
3891
3891
  k(this, "getMessages", async (r) => {
3892
- const s = J(r);
3892
+ const s = V(r);
3893
3893
  try {
3894
3894
  return window.BuzzCasting.WidgetData[s];
3895
3895
  } catch (l) {
3896
- return console.warn("%capi", _.API, K.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3896
+ return console.warn("%capi", w.API, N.MESSAGES, r.slide, r.widget, l), { data: null, message: "Messages Data error", success: !1 };
3897
3897
  }
3898
3898
  });
3899
3899
  /**
@@ -3903,11 +3903,11 @@ class Gr {
3903
3903
  * @returns number
3904
3904
  */
3905
3905
  k(this, "setCloud", async (r, s) => {
3906
- const l = J(r);
3906
+ const l = V(r);
3907
3907
  try {
3908
3908
  return window.BuzzCasting.WidgetData[l] = s, 201;
3909
3909
  } catch (x) {
3910
- return console.error("%cstorage", _.STORAGE, "set", r, x), 400;
3910
+ return console.error("%cstorage", w.STORAGE, "set", r, x), 400;
3911
3911
  }
3912
3912
  });
3913
3913
  /**
@@ -3917,11 +3917,11 @@ class Gr {
3917
3917
  * @returns number
3918
3918
  */
3919
3919
  k(this, "setSeries", async (r, s) => {
3920
- const l = J(r);
3920
+ const l = V(r);
3921
3921
  try {
3922
3922
  return window.BuzzCasting.WidgetData[l] = s, 201;
3923
3923
  } catch (x) {
3924
- return console.error("%cstorage", _.STORAGE, "set", r, x), 400;
3924
+ return console.error("%cstorage", w.STORAGE, "set", r, x), 400;
3925
3925
  }
3926
3926
  });
3927
3927
  /**
@@ -3931,11 +3931,11 @@ class Gr {
3931
3931
  * @returns number
3932
3932
  */
3933
3933
  k(this, "setMessages", async (r, s) => {
3934
- const l = J(r);
3934
+ const l = V(r);
3935
3935
  try {
3936
3936
  return window.BuzzCasting.WidgetData[l] = s, 201;
3937
3937
  } catch (x) {
3938
- return console.error("%cstorage", _.STORAGE, "set", r, x), 400;
3938
+ return console.error("%cstorage", w.STORAGE, "set", r, x), 400;
3939
3939
  }
3940
3940
  });
3941
3941
  k(this, "cleanMessages", async (r) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((s) => s(0))));
@@ -3947,7 +3947,7 @@ class Gr {
3947
3947
  try {
3948
3948
  return window.BuzzCasting.WidgetData[s] = r, 201;
3949
3949
  } catch (l) {
3950
- return console.error("%cstorage", _.STORAGE, K.WIDGET, r, l), 400;
3950
+ return console.error("%cstorage", w.STORAGE, N.WIDGET, r, l), 400;
3951
3951
  }
3952
3952
  });
3953
3953
  /**
@@ -3955,13 +3955,13 @@ class Gr {
3955
3955
  * @param query IQuery
3956
3956
  * @returns null
3957
3957
  */
3958
- k(this, "subscribe", (r) => (r.type === K.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3958
+ k(this, "subscribe", (r) => (r.type === N.MESSAGES && (r = _t(this.options, r)), this.subscribers.filter(
3959
3959
  (l) => l.widget === r.widget
3960
3960
  ).length || (console.debug(
3961
3961
  "%cstorage%c %csubscribe",
3962
- _.STORAGE,
3963
- _.NONE,
3964
- _.SUBSCRIBE,
3962
+ w.STORAGE,
3963
+ w.NONE,
3964
+ w.SUBSCRIBE,
3965
3965
  r.slide,
3966
3966
  r.widget
3967
3967
  ), this.subscribers.push(r)), null));
@@ -3974,7 +3974,7 @@ class Gr {
3974
3974
  try {
3975
3975
  return window.BuzzCasting.SlideData[r.id];
3976
3976
  } catch (s) {
3977
- return console.warn("%capi", _.API, K.SLIDE, r.id, s), { data: null, message: "Slide Load error", success: !1 };
3977
+ return console.warn("%capi", w.API, N.SLIDE, r.id, s), { data: null, message: "Slide Load error", success: !1 };
3978
3978
  }
3979
3979
  });
3980
3980
  k(this, "storeSlide", async (r) => {
@@ -3987,7 +3987,7 @@ class Gr {
3987
3987
  css: r.data.css || ""
3988
3988
  }, 201;
3989
3989
  } catch (s) {
3990
- return console.error("%cstorage", _.STORAGE, K.SLIDE, r, s), 400;
3990
+ return console.error("%cstorage", w.STORAGE, N.SLIDE, r, s), 400;
3991
3991
  }
3992
3992
  });
3993
3993
  this.options = r, window.BuzzCasting.WidgetData = /* @__PURE__ */ new Set();
@@ -4078,16 +4078,16 @@ function zi(d) {
4078
4078
  return d.toLowerCase().split("-").reduce((r, s) => r + (s.charAt(0).toUpperCase() + s.slice(1)));
4079
4079
  }
4080
4080
  const Hi = (d) => d.charAt(0).toUpperCase() + d.slice(1);
4081
- function Mi(d) {
4081
+ function Ti(d) {
4082
4082
  const r = document.createRange();
4083
4083
  r.selectNodeContents(d), r.deleteContents();
4084
4084
  }
4085
- function Ti(d) {
4085
+ function Mi(d) {
4086
4086
  d.reduce(
4087
4087
  (r, s) => Object.keys(s).reduce(
4088
4088
  (l, x) => ({
4089
4089
  ...l,
4090
- [x]: x in r && typeof r[x] == "object" && r[x] !== null && typeof s[x] == "object" && s[x] !== null ? Ti([r[x], s[x]]) : s[x]
4090
+ [x]: x in r && typeof r[x] == "object" && r[x] !== null && typeof s[x] == "object" && s[x] !== null ? Mi([r[x], s[x]]) : s[x]
4091
4091
  }),
4092
4092
  r
4093
4093
  ),
@@ -4132,8 +4132,8 @@ function $r(d, r, s, l) {
4132
4132
  return D;
4133
4133
  try {
4134
4134
  return xe(D, String(r.valueOf()));
4135
- } catch (T) {
4136
- return xe(D, `[valueOf exception]${T.stack || T.message}`);
4135
+ } catch (j) {
4136
+ return xe(D, `[valueOf exception]${j.stack || j.message}`);
4137
4137
  }
4138
4138
  }
4139
4139
  return xe(x, r.toString());
@@ -4189,10 +4189,10 @@ function Ji(d) {
4189
4189
  function Vi(d) {
4190
4190
  const r = window.BuzzCasting.getOptions().suspended ?? !1;
4191
4191
  return d.forEach((s) => {
4192
- var l, x, D, T, B;
4193
- if (r ? s.content = "License suspended, please contact your Sales Representative to restore service" : s.content = ((l = s.content) == null ? void 0 : l.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g, "")) || "", s.sender !== null ? ((((x = s.sender) == null ? void 0 : x.title) === "Unknown author" || ((D = s.sender) == null ? void 0 : D.title) === null) && (s.sender.title = ""), ((T = s.sender) == null ? void 0 : T.name) !== "" && s.sender.title === "" && (s.sender.title = s.sender.name), ((B = s.sender) == null ? void 0 : B.name) !== "" && s.channel === "tw" && (s.sender.name = `@${s.sender.name}`)) : s.sender = { title: "", name: "", id: "", avatar: "default", bio: "", location: "", following: 0, verified: 0, listed: 0, followers: 0, favourites: 0, messages: 0, influence: 0 }, s.sender.title === "" && s.link !== "") {
4194
- const Q = new URL(s.link);
4195
- s.sender.title = Q.hostname.replace("www.", "");
4192
+ var l, x, D, j, P;
4193
+ if (r ? s.content = "License suspended, please contact your Sales Representative to restore service" : s.content = ((l = s.content) == null ? void 0 : l.replace(/(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)((\?.*)?)/g, "")) || "", s.sender !== null ? ((((x = s.sender) == null ? void 0 : x.title) === "Unknown author" || ((D = s.sender) == null ? void 0 : D.title) === null) && (s.sender.title = ""), ((j = s.sender) == null ? void 0 : j.name) !== "" && s.sender.title === "" && (s.sender.title = s.sender.name), ((P = s.sender) == null ? void 0 : P.name) !== "" && s.channel === "tw" && (s.sender.name = `@${s.sender.name}`)) : s.sender = { title: "", name: "", id: "", avatar: "default", bio: "", location: "", following: 0, verified: 0, listed: 0, followers: 0, favourites: 0, messages: 0, influence: 0 }, s.sender.title === "" && s.link !== "") {
4194
+ const Y = new URL(s.link);
4195
+ s.sender.title = Y.hostname.replace("www.", "");
4196
4196
  }
4197
4197
  }), d;
4198
4198
  }
@@ -4246,95 +4246,153 @@ class ro {
4246
4246
  l.push(this.api.get(x));
4247
4247
  }), await Promise.allSettled(l).then(
4248
4248
  (x) => x.forEach(async (D) => {
4249
- let T = 400;
4249
+ let j = 400;
4250
4250
  if (D.status === "fulfilled") {
4251
- let B = D.value;
4251
+ let P = D.value;
4252
4252
  if (this.sm === null)
4253
4253
  return 400;
4254
- if (B.success === !0) {
4255
- const Q = this.sm.subscribers.filter(
4256
- (q) => q.widget === B.query.widget
4254
+ if (P.success === !0) {
4255
+ const Y = this.sm.subscribers.filter(
4256
+ (X) => X.widget === P.query.widget
4257
4257
  )[0];
4258
- let V = "", ve;
4259
- switch (B.query.type) {
4260
- case K.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)
4258
+ let Z = "", ve;
4259
+ switch (P.query.type) {
4260
+ case N.MESSAGES:
4261
+ if (ve = P.data.messages.filter(
4262
+ (X) => X.id !== null
4263
+ ), P.data.messages = ve, Z = Fn(P.data.messages), Y.hash === Z)
4264
4264
  return console.debug(
4265
4265
  "%capi%c %cno updates",
4266
- _.API,
4267
- _.NONE,
4268
- _.NO_UPDATES,
4269
- K.MESSAGES,
4270
- B.query.slide,
4271
- B.query.widget
4266
+ w.API,
4267
+ w.NONE,
4268
+ w.NO_UPDATES,
4269
+ N.MESSAGES,
4270
+ P.query.slide,
4271
+ P.query.widget
4272
4272
  ), 204;
4273
- Q.hash = V, T = await this.sm.setMessages(B.query, B);
4273
+ Y.hash = Z, j = await this.sm.setMessages(P.query, P);
4274
4274
  break;
4275
- case K.CLOUD:
4276
- V = Fn(B.data), Q.hash === V ? (console.debug(
4277
- "%capi%c %cno updates",
4278
- _.API,
4279
- _.NONE,
4280
- _.NO_UPDATES,
4281
- K.CLOUD,
4282
- B.query.slide,
4283
- B.query.widget
4284
- ), T = 204) : (Q.hash = V, T = await this.sm.setCloud(B.query, B));
4275
+ case N.CLOUD:
4276
+ if (Z = Fn(P.data), Y.hash === Z)
4277
+ console.debug(
4278
+ "%capi%c %cno updates",
4279
+ w.API,
4280
+ w.NONE,
4281
+ w.NO_UPDATES,
4282
+ N.CLOUD,
4283
+ P.query.slide,
4284
+ P.query.widget
4285
+ ), j = 204;
4286
+ else {
4287
+ Y.hash = Z;
4288
+ const X = {
4289
+ data: {
4290
+ dashboard: P.query.dashboard,
4291
+ cloud: P.data,
4292
+ query: P.query,
4293
+ slide: P.query.slide
4294
+ },
4295
+ query: P.query,
4296
+ message: P.message,
4297
+ success: P.success
4298
+ };
4299
+ j = await this.sm.setCloud(P.query, X.data.cloud);
4300
+ }
4285
4301
  break;
4286
- case K.SERIES:
4287
- V = Fn(B.data), Q.hash === V ? (console.debug(
4288
- "%capi%c %cno updates",
4289
- _.API,
4290
- _.NONE,
4291
- _.NO_UPDATES,
4292
- K.SERIES,
4293
- B.query.slide,
4294
- B.query.widget
4295
- ), T = 204) : (Q.hash = V, T = await this.sm.setSeries(B.query, B));
4302
+ case N.SERIES:
4303
+ if (Z = Fn(P.data), Y.hash === Z)
4304
+ console.debug(
4305
+ "%capi%c %cno updates",
4306
+ w.API,
4307
+ w.NONE,
4308
+ w.NO_UPDATES,
4309
+ N.SERIES,
4310
+ P.query.slide,
4311
+ P.query.widget
4312
+ ), j = 204;
4313
+ else {
4314
+ Y.hash = Z;
4315
+ const X = {
4316
+ data: {
4317
+ dashboard: P.query.dashboard,
4318
+ series: P.data,
4319
+ query: P.query,
4320
+ slide: P.query.slide
4321
+ },
4322
+ query: P.query,
4323
+ message: P.message,
4324
+ success: P.success
4325
+ };
4326
+ j = await this.sm.setSeries(P.query, X.data.series);
4327
+ }
4296
4328
  break;
4297
4329
  default:
4298
4330
  console.warn(
4299
4331
  "%capi%c %cstorage",
4300
- _.API,
4301
- _.NONE,
4302
- _.STORAGE,
4332
+ w.API,
4333
+ w.NONE,
4334
+ w.STORAGE,
4303
4335
  "error",
4304
- `data type ${B.query.type} unknown`
4336
+ `data type ${P.query.type} unknown`
4305
4337
  );
4306
4338
  }
4307
4339
  } else
4308
- T = 401;
4309
- switch (T) {
4340
+ j = 401;
4341
+ switch (j) {
4310
4342
  case 201:
4311
4343
  console.info(
4312
4344
  "%capp%c %cbroadcast",
4313
- _.API,
4314
- _.NONE,
4315
- _.BROADCAST,
4316
- B.query.slide,
4317
- B.data.title ?? B.query.widget
4318
- ), B = await this.sm.getMessages(B.query), this.bc.postMessage({ event: re.WIDGET_UPDATE, data: B.data });
4345
+ w.API,
4346
+ w.NONE,
4347
+ w.BROADCAST,
4348
+ P.query.slide,
4349
+ P.data.title ?? P.query.widget
4350
+ );
4351
+ const Y = structuredClone(P.query);
4352
+ switch (console.log("status", j, Y), P.query.type) {
4353
+ case "messages":
4354
+ P = await this.sm.getMessages(P.query);
4355
+ break;
4356
+ case "cloud":
4357
+ P = await this.sm.getCloud(P.query), P && (P.query = Y);
4358
+ break;
4359
+ case "series":
4360
+ P = await this.sm.getSeries(P.query), P && (P.query = Y);
4361
+ break;
4362
+ default:
4363
+ console.warn(
4364
+ "%capp%c %cbroadcast",
4365
+ w.API,
4366
+ w.NONE,
4367
+ w.BROADCAST,
4368
+ "Unhandled data type",
4369
+ P.query
4370
+ );
4371
+ }
4372
+ P && this.bc.postMessage({
4373
+ event: re.WIDGET_UPDATE,
4374
+ data: P.data
4375
+ });
4319
4376
  break;
4320
- case 400:
4377
+ default:
4321
4378
  console.warn(
4322
4379
  "%capp%c %cbroadcast",
4323
- _.API,
4324
- _.NONE,
4325
- _.BROADCAST,
4326
- B.query.slide,
4327
- B.data.title ?? B.query.widget
4380
+ w.API,
4381
+ w.NONE,
4382
+ w.BROADCAST,
4383
+ "Fetch error",
4384
+ P.query.slide,
4385
+ P.data.title ?? P.query.widget
4328
4386
  );
4329
4387
  break;
4330
4388
  }
4331
- return T;
4389
+ return j;
4332
4390
  } else
4333
4391
  return console.warn(
4334
4392
  "%capi%c %cstorage",
4335
- _.API,
4336
- _.NONE,
4337
- _.STORAGE,
4393
+ w.API,
4394
+ w.NONE,
4395
+ w.STORAGE,
4338
4396
  re.ERROR
4339
4397
  ), 400;
4340
4398
  })
@@ -4352,9 +4410,9 @@ class ro {
4352
4410
  case re.UPDATE:
4353
4411
  console.debug(
4354
4412
  "%capi%c %cstorage",
4355
- _.API,
4356
- _.NONE,
4357
- _.STORAGE,
4413
+ w.API,
4414
+ w.NONE,
4415
+ w.STORAGE,
4358
4416
  re.UPDATE,
4359
4417
  r.data
4360
4418
  ), await this.update();
@@ -4366,9 +4424,9 @@ class ro {
4366
4424
  if ((l = this.options) != null && l.suspended) {
4367
4425
  console.info(
4368
4426
  "%cstorage%c %cstorage",
4369
- _.STORAGE,
4370
- _.NONE,
4371
- _.MESSAGES,
4427
+ w.STORAGE,
4428
+ w.NONE,
4429
+ w.MESSAGES,
4372
4430
  "Account suspended"
4373
4431
  );
4374
4432
  return;
@@ -4378,9 +4436,9 @@ class ro {
4378
4436
  ));
4379
4437
  console.info(
4380
4438
  "%cstorage%c %cstorage",
4381
- _.STORAGE,
4382
- _.NONE,
4383
- _.MESSAGES,
4439
+ w.STORAGE,
4440
+ w.NONE,
4441
+ w.MESSAGES,
4384
4442
  `${s} messages deleted`
4385
4443
  );
4386
4444
  });
@@ -4389,9 +4447,9 @@ class ro {
4389
4447
  const s = await ((l = this.sm) == null ? void 0 : l.hideMessage(r.id, 0));
4390
4448
  return console.info(
4391
4449
  "%cstorage%c %cstorage",
4392
- _.STORAGE,
4393
- _.NONE,
4394
- _.HIDE,
4450
+ w.STORAGE,
4451
+ w.NONE,
4452
+ w.HIDE,
4395
4453
  `${s} messages hidden`
4396
4454
  ), await this.api.hideMessage(r);
4397
4455
  });
@@ -4409,9 +4467,9 @@ class ro {
4409
4467
  });
4410
4468
  console.info(
4411
4469
  "%cstorage%c %cslide",
4412
- _.STORAGE,
4413
- _.NONE,
4414
- _.SLIDE,
4470
+ w.STORAGE,
4471
+ w.NONE,
4472
+ w.SLIDE,
4415
4473
  r.slide,
4416
4474
  re.VERSION,
4417
4475
  ki
@@ -4419,9 +4477,9 @@ class ro {
4419
4477
  const s = (r == null ? void 0 : r.slide) || r.app;
4420
4478
  switch (this.bc = new BroadcastChannel(s), console.info(
4421
4479
  "%capi%c %cbroadcast",
4422
- _.API,
4423
- _.NONE,
4424
- _.BROADCAST,
4480
+ w.API,
4481
+ w.NONE,
4482
+ w.BROADCAST,
4425
4483
  re.CHANNEL,
4426
4484
  s
4427
4485
  ), this.bc.onmessage = (l) => {
@@ -4455,11 +4513,11 @@ class Bi {
4455
4513
  */
4456
4514
  k(this, "getCloud", async (r) => {
4457
4515
  var s;
4458
- return r.type !== K.CLOUD ? (console.warn(
4516
+ return r.type !== N.CLOUD ? (console.warn(
4459
4517
  "%capp%c %get",
4460
- _.APP,
4461
- _.NONE,
4462
- _.GET_DATA,
4518
+ w.APP,
4519
+ w.NONE,
4520
+ w.GET_DATA,
4463
4521
  r.widget,
4464
4522
  "wrong method call for getMessages, type used is",
4465
4523
  r.type
@@ -4476,11 +4534,11 @@ class Bi {
4476
4534
  */
4477
4535
  k(this, "getMessages", async (r) => {
4478
4536
  var s;
4479
- return r.type !== K.MESSAGES ? (console.warn(
4537
+ return r.type !== N.MESSAGES ? (console.warn(
4480
4538
  "%capp%c %get",
4481
- _.APP,
4482
- _.NONE,
4483
- _.GET_DATA,
4539
+ w.APP,
4540
+ w.NONE,
4541
+ w.GET_DATA,
4484
4542
  r.widget,
4485
4543
  "wrong method call for getMessages, type used is",
4486
4544
  r.type
@@ -4497,11 +4555,11 @@ class Bi {
4497
4555
  */
4498
4556
  k(this, "getSeries", async (r) => {
4499
4557
  var s;
4500
- return r.type !== K.SERIES ? (console.warn(
4558
+ return r.type !== N.SERIES ? (console.warn(
4501
4559
  "%capp%c %get",
4502
- _.APP,
4503
- _.NONE,
4504
- _.GET_DATA,
4560
+ w.APP,
4561
+ w.NONE,
4562
+ w.GET_DATA,
4505
4563
  r.widget,
4506
4564
  "wrong method call for getMessages, type used is",
4507
4565
  r.type
@@ -4551,11 +4609,11 @@ class io {
4551
4609
  */
4552
4610
  k(this, "getData", async () => {
4553
4611
  switch (this.query.type) {
4554
- case K.CLOUD:
4612
+ case N.CLOUD:
4555
4613
  return await this.getCloud();
4556
- case K.MESSAGES:
4614
+ case N.MESSAGES:
4557
4615
  return await this.getMessages();
4558
- case K.SERIES:
4616
+ case N.SERIES:
4559
4617
  return await this.getSeries();
4560
4618
  }
4561
4619
  return {
@@ -4569,11 +4627,11 @@ class io {
4569
4627
  *
4570
4628
  * @returns IResponse
4571
4629
  */
4572
- k(this, "getCloud", async () => this.query.type !== K.CLOUD ? (console.warn(
4630
+ k(this, "getCloud", async () => this.query.type !== N.CLOUD ? (console.warn(
4573
4631
  "%cstorage%c %cwidget",
4574
- _.STORAGE,
4575
- _.NONE,
4576
- _.WIDGET,
4632
+ w.STORAGE,
4633
+ w.NONE,
4634
+ w.WIDGET,
4577
4635
  this.query.widget,
4578
4636
  "Wrong method call for getCloud, expected type is",
4579
4637
  this.query.type
@@ -4587,11 +4645,11 @@ class io {
4587
4645
  *
4588
4646
  * @returns IResponse
4589
4647
  */
4590
- k(this, "getMessages", async () => this.query.type !== K.MESSAGES ? (console.warn(
4648
+ k(this, "getMessages", async () => this.query.type !== N.MESSAGES ? (console.warn(
4591
4649
  "%cstorage%c %cwidget",
4592
- _.STORAGE,
4593
- _.NONE,
4594
- _.WIDGET,
4650
+ w.STORAGE,
4651
+ w.NONE,
4652
+ w.WIDGET,
4595
4653
  this.query.widget,
4596
4654
  "Wrong method call for getMessages, expected type is",
4597
4655
  this.query.type
@@ -4601,9 +4659,9 @@ class io {
4601
4659
  success: !1
4602
4660
  }) : (console.debug(
4603
4661
  "%cstorage%c %cwidget",
4604
- _.API,
4605
- _.NONE,
4606
- _.MESSAGES,
4662
+ w.API,
4663
+ w.NONE,
4664
+ w.MESSAGES,
4607
4665
  this.query
4608
4666
  ), await this.storageReader.getMessages(this.query)));
4609
4667
  /**
@@ -4611,11 +4669,11 @@ class io {
4611
4669
  *
4612
4670
  * @returns IResponse
4613
4671
  */
4614
- k(this, "getSeries", async () => this.query.type !== K.SERIES ? (console.warn(
4672
+ k(this, "getSeries", async () => this.query.type !== N.SERIES ? (console.warn(
4615
4673
  "%cstorage%c %cwidget",
4616
- _.STORAGE,
4617
- _.NONE,
4618
- _.WIDGET,
4674
+ w.STORAGE,
4675
+ w.NONE,
4676
+ w.WIDGET,
4619
4677
  this.query.widget,
4620
4678
  "Wrong method call for getSeries, expected type is",
4621
4679
  this.query.type
@@ -4633,7 +4691,7 @@ class io {
4633
4691
  k(this, "showModal", (r) => {
4634
4692
  console.debug(
4635
4693
  "%cwidget",
4636
- _.WIDGET,
4694
+ w.WIDGET,
4637
4695
  re.SHOW_MODAL,
4638
4696
  r.showComponent,
4639
4697
  // @ts-ignore
@@ -4653,10 +4711,10 @@ class io {
4653
4711
  });
4654
4712
  window.dispatchEvent(s);
4655
4713
  });
4656
- var T;
4714
+ var j;
4657
4715
  this.element = r, this.listeners = s, l = typeof l < "u" ? l : "buzzcasting-slide";
4658
4716
  let x;
4659
- x = { ...r.dataset }, delete x.hmr, x.slide = ((T = r.closest(l.toUpperCase())) == null ? void 0 : T.id) ?? `${l} not found`, x = Tr(x), this.query = x, Mi(r);
4717
+ x = { ...r.dataset }, delete x.hmr, x.slide = ((j = r.closest(l.toUpperCase())) == null ? void 0 : j.id) ?? `${l} not found`, x = Mr(x), this.query = x, Ti(r);
4660
4718
  const D = window.BuzzCasting.getOptions();
4661
4719
  this.storageReader = new Bi(D), this.broadcastChannel = new BroadcastChannel(x.slide), this.startListener();
4662
4720
  }
@@ -4670,7 +4728,7 @@ class io {
4670
4728
  const r = this.query;
4671
4729
  this.broadcastChannel.onmessage = async (s) => {
4672
4730
  const l = s.data.data;
4673
- switch (s.data.event) {
4731
+ switch (console.debug(s.data.event, s.data), s.data.event) {
4674
4732
  case re.WIDGET_UPDATE:
4675
4733
  l.query.slide === r.slide && l.query.widget === r.widget && this.listeners.forEach((x) => {
4676
4734
  x(s.data);
@@ -4687,13 +4745,19 @@ class io {
4687
4745
  * This takes place when the container indicates it has finished loading (ready)
4688
4746
  */
4689
4747
  subscribe() {
4690
- console.debug(
4748
+ console.info(
4691
4749
  "%cwidget%c %csubscribe",
4692
- _.WIDGET,
4693
- _.NONE,
4694
- _.SUBSCRIBE,
4750
+ w.WIDGET,
4751
+ w.NONE,
4752
+ w.SUBSCRIBE,
4695
4753
  this.query.slide,
4696
4754
  this.query.widget
4755
+ ), console.debug(
4756
+ "%cwidget%c %csubscribe",
4757
+ w.WIDGET,
4758
+ w.NONE,
4759
+ w.SUBSCRIBE,
4760
+ this.query
4697
4761
  ), this.broadcastChannel.postMessage({
4698
4762
  event: re.SUBSCRIBE,
4699
4763
  data: this.query
@@ -4704,10 +4768,10 @@ class io {
4704
4768
  }
4705
4769
  }
4706
4770
  export {
4707
- K as API,
4771
+ N as API,
4708
4772
  ro as BuzzcastingStorageManager,
4709
4773
  Bi as BuzzcastingStorageReader,
4710
- _ as CSS,
4774
+ w as CSS,
4711
4775
  re as EVENTS,
4712
4776
  Zt as MODERATION,
4713
4777
  ge as STORAGE,
@@ -4719,8 +4783,8 @@ export {
4719
4783
  zi as camelCase,
4720
4784
  Wi as camelize,
4721
4785
  Hi as capitalizeFirstLetter,
4722
- Mi as clearContents,
4723
- Ti as deepMerge,
4786
+ Ti as clearContents,
4787
+ Mi as deepMerge,
4724
4788
  Fi as filterAttributes,
4725
4789
  Yi as formatContent,
4726
4790
  Fn as hashSum,
@@ -4733,5 +4797,5 @@ export {
4733
4797
  qi as shuffleMessages,
4734
4798
  eo as stringGen,
4735
4799
  no as upDownColor,
4736
- Tr as widgetParams
4800
+ Mr as widgetParams
4737
4801
  };