buzzcasting-storage 3.21.2 → 3.21.5

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,14 +1,14 @@
1
1
  //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s = (e, i, o, s) => {
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
3
3
  if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
4
4
  get: ((e) => i[e]).bind(null, d),
5
5
  enumerable: !(s = n(i, d)) || s.enumerable
6
6
  });
7
7
  return e;
8
- }, c = (n, r, a) => (a = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule ? t(a, "default", {
8
+ }, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
9
9
  value: n,
10
10
  enumerable: !0
11
- }) : a, n)), l = function(e) {
11
+ }) : o, n)), l = function(e) {
12
12
  return e.CARDS = "cards", e.CLOUD = "cloud", e.DASHBOARD = "dashboard", e.DASHBOARDS = "dashboards", e.IMAGES = "images", e.MESSAGES = "messages", e.PREFERENCE = "preference", e.PREFERENCES = "preferences", e.PRESENTATION = "presentation", e.PRESENTATIONS = "presentations", e.SERIES = "series", e.SLIDE = "slide", e.SLIDES = "slides", e.TEMPLATES = "templates", e.TOPICS = "topics", e.WIDGET = "widget", e.WIDGETS = "widgets", e;
13
13
  }({}), u = function(e) {
14
14
  return e.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", e.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", e.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", e.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", e.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", e.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", e.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", e.NONE = "color:transparent;background-color:transparent;", e.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", e.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", e.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", e.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", e.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", e.WIDGET = "color:black;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", e.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", e;
@@ -76,49 +76,48 @@ var S = (e) => {
76
76
  return t;
77
77
  };
78
78
  S("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"), S("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"), S("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"), S("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), S("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), S("script,style");
79
- function C(e) {
80
- return `"${e}"`;
81
- }
82
- var ee = (e) => {
83
- let t = [
84
- "area",
85
- "base",
86
- "basefont",
87
- "br",
88
- "col",
89
- "frame",
90
- "hr",
91
- "img",
92
- "input",
93
- "isindex",
94
- "link",
95
- "meta",
96
- "param",
97
- "embed"
98
- ], n = "";
99
- e.child && (n = e.child.map(function(e) {
100
- return ee(e);
101
- }).join(""));
102
- let r = "";
103
- if (e.attr && (r = Object.keys(e.attr).map(function(t) {
104
- let n = e.attr[t];
105
- return Array.isArray(n) && (n = n.join(" ")), `${t}=${C(n)}`;
106
- }).join(" "), r !== "" && (r = ` ${r}`)), e.node === "element") {
107
- let i = e.tag;
108
- if (t.indexOf(i) > -1) return `<${e.tag}${r}/>`;
109
- let a = `<${e.tag}${r}>`, o = `</${e.tag}>`;
110
- return `${a}${n}${o}`;
111
- }
112
- if (e.node === "text") return e.text;
113
- if (e.node === "comment") return `<!-- ${e.text} -->`;
114
- if (e.node === "root") return n;
115
- }, w = new BroadcastChannel("logging"), T = async (e = 0, t) => {
116
- w.postMessage({
79
+ var C = new BroadcastChannel("logging"), w = async (e = 0, t) => {
80
+ C.postMessage({
117
81
  action: "log",
118
82
  level: e,
119
83
  message: t
120
84
  });
121
- }, E = (e) => {
85
+ };
86
+ (class e {
87
+ static EPOCH = Date.UTC(1970, 0, 1).valueOf();
88
+ static SHARD_ID = 1;
89
+ static SEQUENCE = 1;
90
+ static generate({ timestamp: t = Date.now(), shard_id: n = e.SHARD_ID } = {}) {
91
+ t = t instanceof Date ? t.valueOf() : new Date(t).valueOf();
92
+ let r = BigInt(t) - BigInt(e.EPOCH) << BigInt(22);
93
+ return r |= BigInt(n % 1024) << BigInt(12), r |= BigInt(e.SEQUENCE++ % 4096), r.toString();
94
+ }
95
+ static parse(t) {
96
+ let n = e.binary(t);
97
+ return {
98
+ timestamp: e.extractBits(t, 1, 41),
99
+ shard_id: e.extractBits(t, 42, 10),
100
+ sequence: e.extractBits(t, 52),
101
+ binary: n
102
+ };
103
+ }
104
+ static isValid(t) {
105
+ if (!/^[\d]{19}$/.test(t)) return !1;
106
+ try {
107
+ return e.parse(t), !0;
108
+ } catch {
109
+ return !1;
110
+ }
111
+ }
112
+ static extractBits(t, n, r) {
113
+ return parseInt(r ? e.binary(t).substring(n, n + r) : e.binary(t).substring(n), 2);
114
+ }
115
+ static binary(e) {
116
+ let t = BigInt(e).toString(2);
117
+ return t.length < 64 ? "0000000000000000000000000000000000000000000000000000000000000000".substring(0, 64 - t.length) + t : t;
118
+ }
119
+ });
120
+ var T = (e) => {
122
121
  switch (e?.type) {
123
122
  case l.MESSAGES: return u.MESSAGES;
124
123
  case l.SERIES: return u.SERIES;
@@ -126,18 +125,18 @@ var ee = (e) => {
126
125
  default: return u.NO_UPDATES;
127
126
  }
128
127
  };
129
- function D(e) {
128
+ function E(e) {
130
129
  let t = `${e.type}.${e.topics}`;
131
130
  return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
132
131
  }
133
- function te(e) {
132
+ function ee(e) {
134
133
  if (e.widget === void 0) {
135
134
  let t = e.topics?.split("-");
136
135
  t && t.length > 1 ? (e.dashboard = t ? t[0] : "", e.widget = t ? t[1] : "") : (e.widget = e.topics, e.dashboard = e.slide);
137
136
  }
138
137
  return e;
139
138
  }
140
- function ne(e, t) {
139
+ function D(e, t) {
141
140
  let n, r, i, a, o;
142
141
  switch (e.moderation) {
143
142
  case f.BEFORE:
@@ -160,7 +159,7 @@ function ne(e, t) {
160
159
  }({});
161
160
  //#endregion
162
161
  //#region package.json
163
- var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
162
+ var te = "3.21.4", ne = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
164
163
  (function(n, r) {
165
164
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self, n.readNDJSONStream = r());
166
165
  })(e, (function() {
@@ -176,7 +175,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
176
175
  }
177
176
  return e;
178
177
  }));
179
- })))(), 1), ae = class {
178
+ })))(), 1), re = class {
180
179
  options;
181
180
  url;
182
181
  constructor(e) {
@@ -212,11 +211,9 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
212
211
  case l.SERIES:
213
212
  a = u.SERIES;
214
213
  break;
215
- case l.CLOUD:
216
- a = u.CLOUD;
217
- break;
214
+ case l.CLOUD: a = u.CLOUD;
218
215
  }
219
- return T(3, [
216
+ return w(3, [
220
217
  `%cfetch%c %capi%c %c${e.type}`,
221
218
  u.OK,
222
219
  u.NONE,
@@ -254,11 +251,11 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
254
251
  body: JSON.stringify({ data: e }),
255
252
  method: "post"
256
253
  });
257
- for await (let e of (0, ie.default)(r.body)) console.log("Received", e);
254
+ for await (let e of (0, ne.default)(r.body)) console.log("Received", e);
258
255
  }
259
256
  async hideMessage(e) {
260
257
  let { version: t } = this.options, n = this.headers();
261
- return T(3, [
258
+ return w(3, [
262
259
  "%capi%c %cput",
263
260
  u.API,
264
261
  u.NONE,
@@ -308,7 +305,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
308
305
  }
309
306
  async loadSlide(e) {
310
307
  let { version: t } = this.options, n = this.headers(), r = Object.assign({}, e);
311
- return delete r.type, delete r.hash, T(3, [
308
+ return delete r.type, delete r.hash, w(3, [
312
309
  "%cload%c %capi%c %cslide",
313
310
  u.OK,
314
311
  u.NONE,
@@ -343,7 +340,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
343
340
  let { version: t } = this.options, n = this.formHeaders();
344
341
  delete e.update, delete e.type;
345
342
  let r = JSON.stringify(e);
346
- return T(3, [
343
+ return w(3, [
347
344
  "%cput%c %capi%c %cslide",
348
345
  u.OK,
349
346
  u.NONE,
@@ -373,7 +370,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
373
370
  }
374
371
  async loadPresentation(e) {
375
372
  let { version: t } = this.options, n = this.headers();
376
- return delete e.update, T(3, [
373
+ return delete e.update, w(3, [
377
374
  "%cload%c %capi%c %cpresentation",
378
375
  u.OK,
379
376
  u.NONE,
@@ -406,7 +403,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
406
403
  let { version: t } = this.options, n = this.formHeaders();
407
404
  delete e.update;
408
405
  let r = JSON.stringify(e);
409
- return T(2, [
406
+ return w(2, [
410
407
  "%capi%c %cput",
411
408
  u.API,
412
409
  u.NONE,
@@ -433,7 +430,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
433
430
  }
434
431
  async loadPreference(e) {
435
432
  let { version: t } = this.options, n = this.headers();
436
- return T(3, [
433
+ return w(3, [
437
434
  "%cload%c %capi%c %cpreference",
438
435
  u.OK,
439
436
  u.NONE,
@@ -463,7 +460,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
463
460
  let { version: t } = this.options, n = this.formHeaders();
464
461
  delete e.update;
465
462
  let r = JSON.stringify({ data: e });
466
- return T(3, [
463
+ return w(3, [
467
464
  "%capi%c %cstorePreference",
468
465
  u.API,
469
466
  u.NONE,
@@ -478,7 +475,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
478
475
  ].join("/"), {
479
476
  ...n,
480
477
  body: r,
481
- method: "put"
478
+ method: "post"
482
479
  }).then((e) => {
483
480
  if (!e.ok) throw Error(e.statusText);
484
481
  return e;
@@ -490,7 +487,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
490
487
  }
491
488
  async loadDashboards(e) {
492
489
  let { version: t } = this.options, n = this.headers();
493
- return T(3, [
490
+ return w(3, [
494
491
  "%capi%c %cdashboards",
495
492
  u.API,
496
493
  u.NONE,
@@ -519,7 +516,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
519
516
  }
520
517
  async loadImages(e) {
521
518
  let { version: t } = this.options, n = this.headers();
522
- return T(3, [
519
+ return w(3, [
523
520
  "%cload%c %capi%c %cimage",
524
521
  u.OK,
525
522
  u.NONE,
@@ -587,7 +584,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
587
584
  data: []
588
585
  }));
589
586
  }
590
- }, O = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
587
+ }, ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
591
588
  ((n, r) => {
592
589
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).Dexie = r();
593
590
  })(e, function() {
@@ -667,12 +664,14 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
667
664
  return s === -1 || (o = e[t.substr(0, s)]) == null ? void 0 : b(o, t.substr(s + 1));
668
665
  }
669
666
  function x(e, t, n) {
670
- if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) if (typeof t != "string" && "length" in t) {
671
- v(typeof n != "string" && "length" in n);
672
- for (var r = 0, i = t.length; r < i; ++r) x(e, t[r], n[r]);
673
- } else {
674
- var o, s, c = t.indexOf(".");
675
- c === -1 ? n === void 0 ? a(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n : (o = t.substr(0, c), (c = t.substr(c + 1)) === "" ? n === void 0 ? a(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : x(s = (s = e[o]) && l(e, o) ? s : e[o] = {}, c, n));
667
+ if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) {
668
+ if (typeof t != "string" && "length" in t) {
669
+ v(typeof n != "string" && "length" in n);
670
+ for (var r = 0, i = t.length; r < i; ++r) x(e, t[r], n[r]);
671
+ } else {
672
+ var o, s, c = t.indexOf(".");
673
+ c === -1 ? n === void 0 ? a(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n : (o = t.substr(0, c), (c = t.substr(c + 1)) === "" ? n === void 0 ? a(e) && !isNaN(parseInt(o)) ? e.splice(o, 1) : delete e[o] : e[o] = n : x(s = (s = e[o]) && l(e, o) ? s : e[o] = {}, c, n));
674
+ }
676
675
  }
677
676
  }
678
677
  function S(e) {
@@ -681,10 +680,10 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
681
680
  return n;
682
681
  }
683
682
  var C = [].concat;
684
- function ee(e) {
683
+ function w(e) {
685
684
  return C.apply([], e);
686
685
  }
687
- var w = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ee([
686
+ var T = "BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(w([
688
687
  8,
689
688
  16,
690
689
  32,
@@ -699,24 +698,24 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
699
698
  });
700
699
  }))).filter(function(e) {
701
700
  return r[e];
702
- }), T = new Set(w.map(function(e) {
701
+ }), E = new Set(T.map(function(e) {
703
702
  return r[e];
704
- })), E = null;
703
+ })), ee = null;
705
704
  function D(e) {
706
- return E = /* @__PURE__ */ new WeakMap(), e = function e(t) {
705
+ return ee = /* @__PURE__ */ new WeakMap(), e = function e(t) {
707
706
  if (!t || typeof t != "object") return t;
708
- var n = E.get(t);
707
+ var n = ee.get(t);
709
708
  if (n) return n;
710
709
  if (a(t)) {
711
- n = [], E.set(t, n);
710
+ n = [], ee.set(t, n);
712
711
  for (var r = 0, i = t.length; r < i; ++r) n.push(e(t[r]));
713
- } else if (T.has(t.constructor)) n = t;
712
+ } else if (E.has(t.constructor)) n = t;
714
713
  else {
715
714
  var o, c = s(t);
716
- for (o in n = c === Object.prototype ? {} : Object.create(c), E.set(t, n), t) l(t, o) && (n[o] = e(t[o]));
715
+ for (o in n = c === Object.prototype ? {} : Object.create(c), ee.set(t, n), t) l(t, o) && (n[o] = e(t[o]));
717
716
  }
718
717
  return n;
719
- }(e), E = null, e;
718
+ }(e), ee = null, e;
720
719
  }
721
720
  var te = {}.toString;
722
721
  function ne(e) {
@@ -728,15 +727,15 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
728
727
  } : function() {
729
728
  return null;
730
729
  };
731
- function ae(e, t) {
730
+ function O(e, t) {
732
731
  t = e.indexOf(t), 0 <= t && e.splice(t, 1);
733
732
  }
734
- var O = {};
735
- function k(e) {
733
+ var k = {};
734
+ function A(e) {
736
735
  var t, n, r, i;
737
736
  if (arguments.length === 1) {
738
737
  if (a(e)) return e.slice();
739
- if (this === O && typeof e == "string") return [e];
738
+ if (this === k && typeof e == "string") return [e];
740
739
  if (i = ie(e)) for (n = []; !(r = i.next()).done;) n.push(r.value);
741
740
  else {
742
741
  if (e == null || typeof (t = e.length) != "number") return [e];
@@ -745,11 +744,11 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
745
744
  } else for (t = arguments.length, n = Array(t); t--;) n[t] = arguments[t];
746
745
  return n;
747
746
  }
748
- var A = typeof Symbol < "u" ? function(e) {
747
+ var ae = typeof Symbol < "u" ? function(e) {
749
748
  return e[Symbol.toStringTag] === "AsyncFunction";
750
749
  } : function() {
751
750
  return !1;
752
- }, w = [
751
+ }, T = [
753
752
  "Unknown",
754
753
  "Constraint",
755
754
  "Data",
@@ -781,7 +780,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
781
780
  "DatabaseClosed",
782
781
  "PrematureCommit",
783
782
  "ForeignAwait"
784
- ].concat(w), oe = {
783
+ ].concat(T), oe = {
785
784
  VersionChanged: "Database version changed by other database connection",
786
785
  DatabaseClosed: "Database has been closed",
787
786
  Abort: "Transaction aborted",
@@ -817,10 +816,10 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
817
816
  this.name = n, e ? typeof e == "string" ? (this.message = `${e}${r ? "\n " + r : ""}`, this.inner = r || null) : typeof e == "object" && (this.message = `${e.name} ${e.message}`, this.inner = e) : (this.message = oe[t] || n, this.inner = null);
818
817
  }
819
818
  return p(r).from(fe), e[t] = r, e;
820
- }, {}), pe = (M.Syntax = SyntaxError, M.Type = TypeError, M.Range = RangeError, w.reduce(function(e, t) {
819
+ }, {}), pe = (M.Syntax = SyntaxError, M.Type = TypeError, M.Range = RangeError, T.reduce(function(e, t) {
821
820
  return e[t + "Error"] = M[t], e;
822
821
  }, {}));
823
- w = j.reduce(function(e, t) {
822
+ T = j.reduce(function(e, t) {
824
823
  return [
825
824
  "Syntax",
826
825
  "Type",
@@ -841,26 +840,26 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
841
840
  e.apply(this, arguments), t.apply(this, arguments);
842
841
  };
843
842
  }
844
- function ge(e, t) {
843
+ function F(e, t) {
845
844
  return e === N ? t : function() {
846
845
  var n = e.apply(this, arguments), r = (n !== void 0 && (arguments[0] = n), this.onsuccess), i = this.onerror, a = (this.onsuccess = null, this.onerror = null, t.apply(this, arguments));
847
846
  return r && (this.onsuccess = this.onsuccess ? P(r, this.onsuccess) : r), i && (this.onerror = this.onerror ? P(i, this.onerror) : i), a === void 0 ? n : a;
848
847
  };
849
848
  }
850
- function _e(e, t) {
849
+ function I(e, t) {
851
850
  return e === N ? t : function() {
852
851
  e.apply(this, arguments);
853
852
  var n = this.onsuccess, r = this.onerror;
854
853
  this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? P(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? P(r, this.onerror) : r);
855
854
  };
856
855
  }
857
- function F(e, t) {
856
+ function ge(e, t) {
858
857
  return e === N ? t : function(n) {
859
858
  var r = e.apply(this, arguments), n = (o(n, r), this.onsuccess), i = this.onerror, a = (this.onsuccess = null, this.onerror = null, t.apply(this, arguments));
860
859
  return n && (this.onsuccess = this.onsuccess ? P(n, this.onsuccess) : n), i && (this.onerror = this.onerror ? P(i, this.onerror) : i), r === void 0 ? a === void 0 ? void 0 : a : o(r, a);
861
860
  };
862
861
  }
863
- function I(e, t) {
862
+ function _e(e, t) {
864
863
  return e === N ? t : function() {
865
864
  return !1 !== t.apply(this, arguments) && e.apply(this, arguments);
866
865
  };
@@ -877,7 +876,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
877
876
  return t.apply(this, arguments);
878
877
  };
879
878
  }
880
- w.ModifyError = le, w.DexieError = se, w.BulkError = ue;
879
+ T.ModifyError = le, T.DexieError = se, T.BulkError = ue;
881
880
  var L = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
882
881
  function ye(e) {
883
882
  L = e;
@@ -1055,7 +1054,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1055
1054
  },
1056
1055
  timeout: function(e, t) {
1057
1056
  var n = this;
1058
- return e < Infinity ? new z(function(r, i) {
1057
+ return e < 1 / 0 ? new z(function(r, i) {
1059
1058
  var a = setTimeout(function() {
1060
1059
  return i(new M.Timeout(t));
1061
1060
  }, e);
@@ -1064,7 +1063,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1064
1063
  }
1065
1064
  }), typeof Symbol < "u" && Symbol.toStringTag && f(z.prototype, Symbol.toStringTag, "Dexie.Promise"), Me.env = it(), u(z, {
1066
1065
  all: function() {
1067
- var e = k.apply(null, arguments).map(tt);
1066
+ var e = A.apply(null, arguments).map(tt);
1068
1067
  return new z(function(t, n) {
1069
1068
  e.length === 0 && t([]);
1070
1069
  var r = e.length;
@@ -1082,7 +1081,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1082
1081
  },
1083
1082
  reject: Ke,
1084
1083
  race: function() {
1085
- var e = k.apply(null, arguments).map(tt);
1084
+ var e = A.apply(null, arguments).map(tt);
1086
1085
  return new z(function(t, n) {
1087
1086
  e.map(function(e) {
1088
1087
  return z.resolve(e).then(t, n);
@@ -1136,7 +1135,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1136
1135
  });
1137
1136
  }
1138
1137
  }), we && (we.allSettled && f(z, "allSettled", function() {
1139
- var e = k.apply(null, arguments).map(tt);
1138
+ var e = A.apply(null, arguments).map(tt);
1140
1139
  return new z(function(t) {
1141
1140
  e.length === 0 && t([]);
1142
1141
  var n = e.length, r = Array(n);
@@ -1157,7 +1156,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1157
1156
  });
1158
1157
  });
1159
1158
  }), we.any && typeof AggregateError < "u" && f(z, "any", function() {
1160
- var e = k.apply(null, arguments).map(tt);
1159
+ var e = A.apply(null, arguments).map(tt);
1161
1160
  return new z(function(t, n) {
1162
1161
  e.length === 0 && n(/* @__PURE__ */ AggregateError([]));
1163
1162
  var r = e.length, i = Array(r);
@@ -1261,7 +1260,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1261
1260
  }
1262
1261
  var ht = {
1263
1262
  type: 3,
1264
- lower: -Infinity,
1263
+ lower: -1 / 0,
1265
1264
  lowerOpen: !1,
1266
1265
  upper: [[]],
1267
1266
  upperOpen: !1
@@ -1713,7 +1712,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
1713
1712
  return t;
1714
1713
  function s(e, r, o) {
1715
1714
  var c, l;
1716
- if (typeof e != "object") return r ||= I, l = {
1715
+ if (typeof e != "object") return r ||= _e, l = {
1717
1716
  subscribers: [],
1718
1717
  fire: o ||= N,
1719
1718
  subscribe: function(e) {
@@ -2046,7 +2045,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2046
2045
  });
2047
2046
  });
2048
2047
  }
2049
- var c = Dt(n) && n.limit === Infinity && (typeof e != "function" || h) && {
2048
+ var c = Dt(n) && n.limit === 1 / 0 && (typeof e != "function" || h) && {
2050
2049
  index: n.index,
2051
2050
  range: n.range
2052
2051
  };
@@ -2220,19 +2219,19 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2220
2219
  return e === t[0];
2221
2220
  }, [e], "");
2222
2221
  }, J.prototype.anyOfIgnoreCase = function() {
2223
- var e = k.apply(O, arguments);
2222
+ var e = A.apply(k, arguments);
2224
2223
  return e.length === 0 ? Rt(this) : zt(this, function(e, t) {
2225
2224
  return t.indexOf(e) !== -1;
2226
2225
  }, e, "");
2227
2226
  }, J.prototype.startsWithAnyOfIgnoreCase = function() {
2228
- var e = k.apply(O, arguments);
2227
+ var e = A.apply(k, arguments);
2229
2228
  return e.length === 0 ? Rt(this) : zt(this, function(e, t) {
2230
2229
  return t.some(function(t) {
2231
2230
  return e.indexOf(t) === 0;
2232
2231
  });
2233
2232
  }, e, ct);
2234
2233
  }, J.prototype.anyOf = function() {
2235
- var e, t, n = this, r = k.apply(O, arguments), i = this._cmp;
2234
+ var e, t, n = this, r = A.apply(k, arguments), i = this._cmp;
2236
2235
  try {
2237
2236
  r.sort(i);
2238
2237
  } catch {
@@ -2249,12 +2248,12 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2249
2248
  }), !1);
2250
2249
  }), e);
2251
2250
  }, J.prototype.notEqual = function(e) {
2252
- return this.inAnyRange([[-Infinity, e], [e, this.db._maxKey]], {
2251
+ return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], {
2253
2252
  includeLowers: !1,
2254
2253
  includeUppers: !1
2255
2254
  });
2256
2255
  }, J.prototype.noneOf = function() {
2257
- var e = k.apply(O, arguments);
2256
+ var e = A.apply(k, arguments);
2258
2257
  if (e.length === 0) return new this.Collection(this);
2259
2258
  try {
2260
2259
  e.sort(this._ascending);
@@ -2262,7 +2261,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2262
2261
  return q(this, U);
2263
2262
  }
2264
2263
  var t = e.reduce(function(e, t) {
2265
- return e ? e.concat([[e[e.length - 1][1], t]]) : [[-Infinity, t]];
2264
+ return e ? e.concat([[e[e.length - 1][1], t]]) : [[-1 / 0, t]];
2266
2265
  }, null);
2267
2266
  return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, {
2268
2267
  includeLowers: !1,
@@ -2312,7 +2311,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2312
2311
  }), !1);
2313
2312
  }), t;
2314
2313
  }, J.prototype.startsWithAnyOf = function() {
2315
- var e = k.apply(O, arguments);
2314
+ var e = A.apply(k, arguments);
2316
2315
  return e.every(function(e) {
2317
2316
  return typeof e == "string";
2318
2317
  }) ? e.length === 0 ? Rt(this) : this.inAnyRange(e.map(function(e) {
@@ -2386,7 +2385,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2386
2385
  return r;
2387
2386
  }) : (n._waitingFor = r, n._waitingQueue = [], t = n.idbtrans.objectStore(n.storeNames[0]), function e() {
2388
2387
  for (++n._spinCount; n._waitingQueue.length;) n._waitingQueue.shift()();
2389
- n._waitingFor && (t.get(-Infinity).onsuccess = e);
2388
+ n._waitingFor && (t.get(-1 / 0).onsuccess = e);
2390
2389
  }()), n._waitingFor);
2391
2390
  return new z(function(e, t) {
2392
2391
  r.then(function(t) {
@@ -2547,7 +2546,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2547
2546
  query: (t = c, function(e) {
2548
2547
  return new Promise(function(i, a) {
2549
2548
  i = B(i);
2550
- var o, s, c, l = e.trans, u = e.values, d = e.limit, f = e.query, p = d === Infinity ? void 0 : d, m = f.index, f = f.range, l = l.objectStore(n), l = m.isPrimaryKey ? l : l.index(m.name), m = r(f);
2549
+ var o, s, c, l = e.trans, u = e.values, d = e.limit, f = e.query, p = d === 1 / 0 ? void 0 : d, m = f.index, f = f.range, l = l.objectStore(n), l = m.isPrimaryKey ? l : l.index(m.name), m = r(f);
2551
2550
  if (d === 0) return i({ result: [] });
2552
2551
  t ? ((f = u ? l.getAll(m, p) : l.getAllKeys(m, p)).onsuccess = function(e) {
2553
2552
  return i({ result: e.target.result });
@@ -2659,7 +2658,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2659
2658
  if (l[e]) return l[e];
2660
2659
  throw Error(`Table '${e}' not found`);
2661
2660
  },
2662
- MIN_KEY: -Infinity,
2661
+ MIN_KEY: -1 / 0,
2663
2662
  MAX_KEY: Zt(t),
2664
2663
  schema: s
2665
2664
  };
@@ -2735,7 +2734,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2735
2734
  }), e._cfg.contentUpgrade);
2736
2735
  if (p && e._cfg.version > a) return an(r, c), s._memoizedTables = {}, t = S(d), f.del.forEach(function(e) {
2737
2736
  t[e] = l[e];
2738
- }), sn(r, [r.Transaction.prototype]), on(r, [r.Transaction.prototype], i(t), t), s.schema = t, (n = A(p)) && $e(), d = z.follow(function() {
2737
+ }), sn(r, [r.Transaction.prototype]), on(r, [r.Transaction.prototype], i(t), t), s.schema = t, (n = ae(p)) && $e(), d = z.follow(function() {
2739
2738
  var e;
2740
2739
  (o = p(s)) && n && (e = et.bind(null, null), o.then(e, e));
2741
2740
  }), o && typeof o.then == "function" ? z.resolve(o) : d.then(function() {
@@ -3006,7 +3005,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3006
3005
  return i(t).forEach(function(n) {
3007
3006
  e[n] ? Tn(e[n], t[n]) : e[n] = function e(t) {
3008
3007
  var n, r, i = {};
3009
- for (n in t) l(t, n) && (r = t[n], i[n] = !r || typeof r != "object" || T.has(r.constructor) ? r : e(r));
3008
+ for (n in t) l(t, n) && (r = t[n], i[n] = !r || typeof r != "object" || E.has(r.constructor) ? r : e(r));
3010
3009
  return i;
3011
3010
  }(t[n]);
3012
3011
  }), e;
@@ -3147,8 +3146,8 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3147
3146
  var t;
3148
3147
  return f && (t = {}, e.tables.forEach(function(n) {
3149
3148
  n.schema.indexes.forEach(function(r) {
3150
- r.name && (t[`idb://${e.name}/${n.name}/${r.name}`] = new Z(-Infinity, [[[]]]));
3151
- }), t[`idb://${e.name}/${n.name}/`] = t[`idb://${e.name}/${n.name}/:dels`] = new Z(-Infinity, [[[]]]);
3149
+ r.name && (t[`idb://${e.name}/${n.name}/${r.name}`] = new Z(-1 / 0, [[[]]]));
3150
+ }), t[`idb://${e.name}/${n.name}/`] = t[`idb://${e.name}/${n.name}/:dels`] = new Z(-1 / 0, [[[]]]);
3152
3151
  }), Kt(Wt).fire(t), In(t, !0)), e;
3153
3152
  });
3154
3153
  }
@@ -3326,7 +3325,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3326
3325
  return i.mutate(e);
3327
3326
  function f(e) {
3328
3327
  var r, o, s, f = R.trans, p = e.keys || Un(a, e);
3329
- if (p) return (e = e.type === "add" || e.type === "put" ? t(t({}, e), { keys: p }) : t({}, e)).type !== "delete" && (e.values = n([], e.values, !0)), e.keys &&= n([], e.keys, !0), r = i, s = p, ((o = e).type === "add" ? Promise.resolve([]) : r.getMany({
3328
+ if (p) return (e = e.type === "add" || e.type === "put" ? t(t({}, e), { keys: p }) : t({}, e)).type !== "delete" && (e.values = n([], e.values, !0)), e.keys && (e.keys = n([], e.keys, !0)), r = i, s = p, ((o = e).type === "add" ? Promise.resolve([]) : r.getMany({
3330
3329
  trans: o.trans,
3331
3330
  keys: s,
3332
3331
  cache: "immutable"
@@ -3573,7 +3572,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3573
3572
  return r;
3574
3573
  }, e)) === e) ? e : (r.sort(function(e, t) {
3575
3574
  return W(f(e), f(t)) || W(u(e), u(t));
3576
- }), t.limit && t.limit < Infinity && (r.length > t.limit ? r.length = t.limit : e.length === t.limit && r.length < t.limit && (i.dirty = !0)), o ? Object.freeze(r) : r);
3575
+ }), t.limit && t.limit < 1 / 0 && (r.length > t.limit ? r.length = t.limit : e.length === t.limit && r.length < t.limit && (i.dirty = !0)), o ? Object.freeze(r) : r);
3577
3576
  }
3578
3577
  function $n(e, t) {
3579
3578
  return W(e.lower, t.lower) === 0 && W(e.upper, t.upper) === 0 && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
@@ -3603,7 +3602,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3603
3602
  e.subscribers.add(n), r.addEventListener("abort", function() {
3604
3603
  var r, i;
3605
3604
  e.subscribers.delete(n), e.subscribers.size === 0 && (r = e, i = t, setTimeout(function() {
3606
- r.subscribers.size === 0 && ae(i, r);
3605
+ r.subscribers.size === 0 && O(i, r);
3607
3606
  }, 3e3));
3608
3607
  });
3609
3608
  }
@@ -3625,16 +3624,16 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3625
3624
  var f = e.table(u), p = d.optimisticOps.filter(function(e) {
3626
3625
  return e.trans === s;
3627
3626
  });
3628
- if (s._explicit && i && s.mutatedParts) for (var m = 0, h = Object.values(d.queries.query); m < h.length; m++) for (var g = 0, _ = (b = h[m]).slice(); g < _.length; g++) jn((x = _[g]).obsSet, s.mutatedParts) && (ae(b, x), x.subscribers.forEach(function(e) {
3627
+ if (s._explicit && i && s.mutatedParts) for (var m = 0, h = Object.values(d.queries.query); m < h.length; m++) for (var g = 0, _ = (b = h[m]).slice(); g < _.length; g++) jn((x = _[g]).obsSet, s.mutatedParts) && (O(b, x), x.subscribers.forEach(function(e) {
3629
3628
  return o.add(e);
3630
3629
  }));
3631
3630
  else if (0 < p.length) {
3632
3631
  d.optimisticOps = d.optimisticOps.filter(function(e) {
3633
3632
  return e.trans !== s;
3634
3633
  });
3635
- for (var v = 0, y = Object.values(d.queries.query); v < y.length; v++) for (var b, x, S, C = 0, ee = (b = y[v]).slice(); C < ee.length; C++) (x = ee[C]).res != null && s.mutatedParts && (i && !x.dirty ? (S = Object.isFrozen(x.res), S = Qn(x.res, x.req, p, f, x, S), x.dirty ? (ae(b, x), x.subscribers.forEach(function(e) {
3634
+ for (var v = 0, y = Object.values(d.queries.query); v < y.length; v++) for (var b, x, S, C = 0, w = (b = y[v]).slice(); C < w.length; C++) (x = w[C]).res != null && s.mutatedParts && (i && !x.dirty ? (S = Object.isFrozen(x.res), S = Qn(x.res, x.req, p, f, x, S), x.dirty ? (O(b, x), x.subscribers.forEach(function(e) {
3636
3635
  return o.add(e);
3637
- })) : S !== x.res && (x.res = S, x.promise = z.resolve({ result: S }))) : (x.dirty && ae(b, x), x.subscribers.forEach(function(e) {
3636
+ })) : S !== x.res && (x.res = S, x.promise = z.resolve({ result: S }))) : (x.dirty && O(b, x), x.subscribers.forEach(function(e) {
3638
3637
  return o.add(e);
3639
3638
  })));
3640
3639
  }
@@ -3655,9 +3654,9 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3655
3654
  return !a.outbound && s.db._options.cache !== "disabled" && !s.explicit && s.idbtrans.mode === "readwrite" && (o = Mn[`idb://${n}/${r}`]) ? (s = i.mutate(e), e.type !== "add" && e.type !== "put" || !(50 <= e.values.length || Un(a, e).some(function(e) {
3656
3655
  return e == null;
3657
3656
  })) ? (o.optimisticOps.push(e), e.mutatedParts && Fn(e.mutatedParts), s.then(function(t) {
3658
- 0 < t.numFailures && (ae(o.optimisticOps, e), (t = Xn(0, e, t)) && o.optimisticOps.push(t), e.mutatedParts) && Fn(e.mutatedParts);
3657
+ 0 < t.numFailures && (O(o.optimisticOps, e), (t = Xn(0, e, t)) && o.optimisticOps.push(t), e.mutatedParts) && Fn(e.mutatedParts);
3659
3658
  }), s.catch(function() {
3660
- ae(o.optimisticOps, e), e.mutatedParts && Fn(e.mutatedParts);
3659
+ O(o.optimisticOps, e), e.mutatedParts && Fn(e.mutatedParts);
3661
3660
  })) : s.then(function(n) {
3662
3661
  var r = Xn(0, t(t({}, e), { values: e.values.map(function(e, r) {
3663
3662
  var i;
@@ -3698,7 +3697,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3698
3697
  a
3699
3698
  ] : [
3700
3699
  a.find(function(e) {
3701
- return ("limit" in e.req ? e.req.limit : Infinity) >= r.limit && (!r.values || e.req.values) && er(e.req.query.range, r.query.range);
3700
+ return ("limit" in e.req ? e.req.limit : 1 / 0) >= r.limit && (!r.values || e.req.values) && er(e.req.query.range, r.query.range);
3702
3701
  }),
3703
3702
  !1,
3704
3703
  i,
@@ -3721,7 +3720,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3721
3720
  } else e.result = D(n);
3722
3721
  return e;
3723
3722
  }).catch(function(e) {
3724
- return c && u && ae(c, u), Promise.reject(e);
3723
+ return c && u && O(c, u), Promise.reject(e);
3725
3724
  }), u = {
3726
3725
  obsSet: e.obsSet,
3727
3726
  promise: l,
@@ -3850,7 +3849,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3850
3849
  for (var i = Array(r - 1); --r;) i[r - 1] = arguments[r];
3851
3850
  return n = i.pop(), [
3852
3851
  e,
3853
- ee(i),
3852
+ w(i),
3854
3853
  n
3855
3854
  ];
3856
3855
  }.apply(this, arguments);
@@ -3898,7 +3897,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3898
3897
  return e(t, n, r, null, a);
3899
3898
  })) : H(i);
3900
3899
  }
3901
- var c, l = A(a), o = (l && $e(), z.follow(function() {
3900
+ var c, l = ae(a), o = (l && $e(), z.follow(function() {
3902
3901
  var e;
3903
3902
  (c = a.call(s, s)) && (l ? (e = et.bind(null, null), c.then(e, e)) : typeof c.next == "function" && typeof c.throw == "function" && (c = zn(c)));
3904
3903
  }, o));
@@ -3987,17 +3986,17 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
3987
3986
  justLimit: !0,
3988
3987
  isMatch: null,
3989
3988
  offset: 0,
3990
- limit: Infinity,
3989
+ limit: 1 / 0,
3991
3990
  error: i,
3992
3991
  or: t.or,
3993
3992
  valueMapper: a === me ? null : a
3994
3993
  };
3995
3994
  })), this.Table = (i = this, Et(wt.prototype, function(e, t, n) {
3996
3995
  this.db = i, this._tx = n, this.name = e, this.schema = t, this.hook = i._allTables[e] ? i._allTables[e].hook : Tt(null, {
3997
- creating: [ge, N],
3996
+ creating: [F, N],
3998
3997
  reading: [he, me],
3999
- updating: [F, N],
4000
- deleting: [_e, N]
3998
+ updating: [ge, N],
3999
+ deleting: [I, N]
4001
4000
  });
4002
4001
  })), this.Transaction = (a = this, Et(qt.prototype, function(e, t, n, r, i) {
4003
4002
  var o = this;
@@ -4084,7 +4083,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4084
4083
  }
4085
4084
  function sr(e) {
4086
4085
  var t, n = !1, r = new ar(function(r) {
4087
- var i = A(e), a, o = !1, s = {}, c = {}, u = {
4086
+ var i = ae(e), a, o = !1, s = {}, c = {}, u = {
4088
4087
  get closed() {
4089
4088
  return o;
4090
4089
  },
@@ -4142,7 +4141,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4142
4141
  dr = t;
4143
4142
  }
4144
4143
  }
4145
- u(cr, t(t({}, w), {
4144
+ u(cr, t(t({}, T), {
4146
4145
  delete: function(e) {
4147
4146
  return new cr(e, { addons: [] }).delete();
4148
4147
  },
@@ -4229,7 +4228,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4229
4228
  getObjectDiff: Hn,
4230
4229
  cmp: W,
4231
4230
  asap: y,
4232
- minKey: -Infinity,
4231
+ minKey: -1 / 0,
4233
4232
  addons: [],
4234
4233
  connections: ut,
4235
4234
  errnames: de,
@@ -4259,7 +4258,7 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4259
4258
  for (var t = 0, n = ut; t < n.length; t++) n[t].close({ disableAutoOpen: !1 });
4260
4259
  }
4261
4260
  }), addEventListener("pageshow", function(e) {
4262
- !Q.disableBfCache && e.persisted && (L && console.debug("Dexie: handling persisted pageshow"), fr(), lr({ all: new Z(-Infinity, [[]]) }));
4261
+ !Q.disableBfCache && e.persisted && (L && console.debug("Dexie: handling persisted pageshow"), fr(), lr({ all: new Z(-1 / 0, [[]]) }));
4263
4262
  })), z.rejectionMapper = function(e, t) {
4264
4263
  return !e || e instanceof se || e instanceof TypeError || e instanceof SyntaxError || !e.name || !pe[e.name] ? e : (t = new pe[e.name](t || e.message, e), "stack" in e && f(t, "stack", { get: function() {
4265
4264
  return this.inner.stack;
@@ -4286,14 +4285,14 @@ var re = "3.21.1", ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
4286
4285
  }
4287
4286
  }), { default: Q }), Q;
4288
4287
  });
4289
- })))(), 1), k = Symbol.for("Dexie"), A = globalThis[k] || (globalThis[k] = O.default);
4290
- if (O.default.semVer !== A.semVer) throw Error(`Two different versions of Dexie loaded in the same app: ${O.default.semVer} and ${A.semVer}`);
4291
- var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, Entity: ue, PropModification: de, replacePrefix: fe, add: M, remove: pe, DexieYProvider: N } = A, me = class {
4288
+ })))(), 1), O = Symbol.for("Dexie"), k = globalThis[O] || (globalThis[O] = ie.default);
4289
+ if (ie.default.semVer !== k.semVer) throw Error(`Two different versions of Dexie loaded in the same app: ${ie.default.semVer} and ${k.semVer}`);
4290
+ var { liveQuery: A, mergeRanges: ae, rangesOverlap: j, RangeSet: oe, cmp: se, Entity: ce, PropModification: le, replacePrefix: ue, add: de, remove: fe, DexieYProvider: M } = k, pe = class {
4292
4291
  db;
4293
4292
  subscribers = [];
4294
4293
  options;
4295
4294
  constructor(e) {
4296
- this.options = e, this.db = new A(e.app), this.db.version(19).stores({
4295
+ this.options = e, this.db = new k(e.app), this.db.version(19).stores({
4297
4296
  channel: "id,slide_index",
4298
4297
  cloud: "id,dashboard_id",
4299
4298
  dashboard: "id,name,update",
@@ -4314,14 +4313,14 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4314
4313
  }
4315
4314
  getHash = async (e) => {
4316
4315
  let t = await this.db.table("hashtable").where({ id: e.widget }).last().catch(() => {
4317
- T(2, [
4316
+ w(2, [
4318
4317
  "%chash%c %capi%C %chash",
4319
4318
  u.API,
4320
4319
  u.NONE,
4321
4320
  u.APP
4322
4321
  ]);
4323
4322
  });
4324
- return T(3, [
4323
+ return w(3, [
4325
4324
  "%cget%c %chash%c %chash",
4326
4325
  u.OK,
4327
4326
  u.NONE,
@@ -4331,7 +4330,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4331
4330
  e
4332
4331
  ]), t?.hash ?? "none";
4333
4332
  };
4334
- setHash = async (e) => await this.db.table("hashtable").where({ id: e.widget }).modify({ hash: e.hash }).then(() => (T(3, [
4333
+ setHash = async (e) => await this.db.table("hashtable").where({ id: e.widget }).modify({ hash: e.hash }).then(() => (w(3, [
4335
4334
  "%cset%c %chash%c %chash}",
4336
4335
  u.OK,
4337
4336
  u.NONE,
@@ -4339,7 +4338,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4339
4338
  u.NONE,
4340
4339
  u.WIDGET,
4341
4340
  e
4342
- ]), 201)).catch((t) => (T(2, [
4341
+ ]), 201)).catch((t) => (w(2, [
4343
4342
  "%cget%c %chash%c %chash",
4344
4343
  u.OK,
4345
4344
  u.NONE,
@@ -4349,7 +4348,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4349
4348
  e,
4350
4349
  t.message
4351
4350
  ]), 400));
4352
- clearHash = async () => await this.db.table("hashtable").clear().then(() => 201).catch((e) => (T(2, [
4351
+ clearHash = async () => await this.db.table("hashtable").clear().then(() => 201).catch((e) => (w(2, [
4353
4352
  "%cclear%c %cstorage%c %chash",
4354
4353
  u.KO,
4355
4354
  u.NONE,
@@ -4358,7 +4357,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4358
4357
  u.WIDGET,
4359
4358
  "clear hashes"
4360
4359
  ]), 400));
4361
- deleteHash = async (e) => await this.db.table("hashtable").where({ id: e.widget }).delete().then(() => 201).catch((t) => (T(2, [
4360
+ deleteHash = async (e) => await this.db.table("hashtable").where({ id: e.widget }).delete().then(() => 201).catch((t) => (w(2, [
4362
4361
  "%cdelete%c %cstorage%c %chash",
4363
4362
  u.KO,
4364
4363
  u.NONE,
@@ -4371,7 +4370,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4371
4370
  createHash = async (e) => await this.db.table("hashtable").put({
4372
4371
  id: e.widget,
4373
4372
  hash: e.hash
4374
- }).then(() => 201).catch((t) => (T(2, [
4373
+ }).then(() => 201).catch((t) => (w(2, [
4375
4374
  "%cset%c %cstorage%c %chash",
4376
4375
  u.KO,
4377
4376
  u.NONE,
@@ -4382,7 +4381,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4382
4381
  t.message
4383
4382
  ]), 400));
4384
4383
  getCloud = async (e) => {
4385
- if (e.widget === "") return T(3, [
4384
+ if (e.widget === "") return w(3, [
4386
4385
  "%cget%c %cstorage%c %ccloud",
4387
4386
  u.NO_UPDATES,
4388
4387
  u.NONE,
@@ -4397,7 +4396,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4397
4396
  query: e
4398
4397
  };
4399
4398
  let t = await this.db.table(l.CLOUD).where({ id: e.widget }).last().catch(() => {
4400
- T(2, [
4399
+ w(2, [
4401
4400
  "%capi%C %ccloud",
4402
4401
  u.API,
4403
4402
  u.NONE,
@@ -4417,7 +4416,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4417
4416
  success: t !== void 0,
4418
4417
  query: e
4419
4418
  };
4420
- return T(3, [
4419
+ return w(3, [
4421
4420
  "%cget%c %cstorage%c %ccloud",
4422
4421
  u.OK,
4423
4422
  u.NONE,
@@ -4427,7 +4426,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4427
4426
  n
4428
4427
  ]), n;
4429
4428
  };
4430
- setCloud = async (e, t) => e.type === l.CLOUD && t !== "" ? (T(3, [
4429
+ setCloud = async (e, t) => e.type === l.CLOUD && t !== "" ? (w(3, [
4431
4430
  "%cset%c %cstorage%c %ccloud",
4432
4431
  u.OK,
4433
4432
  u.NONE,
@@ -4440,7 +4439,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4440
4439
  dashboard_id: e.dashboard,
4441
4440
  hash: e.hash,
4442
4441
  data: t
4443
- }).then(() => 201).catch((t) => (T(2, [
4442
+ }).then(() => 201).catch((t) => (w(2, [
4444
4443
  "%cset%c %cstorage%c %ccloud",
4445
4444
  u.KO,
4446
4445
  u.NONE,
@@ -4454,7 +4453,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4454
4453
  data: null,
4455
4454
  message: `Bulk add ${t.length} items to ${e}`,
4456
4455
  success: !0
4457
- })).catch((n) => (T(4, [
4456
+ })).catch((n) => (w(4, [
4458
4457
  "%cstorage",
4459
4458
  u.STORAGE,
4460
4459
  e,
@@ -4467,7 +4466,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4467
4466
  }));
4468
4467
  get = async (e, t) => {
4469
4468
  let n = await this.db.table(e).where({ id: t.id }).last().catch(() => {
4470
- T(2, [
4469
+ w(2, [
4471
4470
  "%cstorage",
4472
4471
  u.STORAGE,
4473
4472
  `loading ${e}`,
@@ -4484,7 +4483,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4484
4483
  data: null,
4485
4484
  message: `${e} ${t.id} saved to storage`,
4486
4485
  success: !0
4487
- })).catch((n) => (T(4, [
4486
+ })).catch((n) => (w(4, [
4488
4487
  "%cstorage",
4489
4488
  u.STORAGE,
4490
4489
  e,
@@ -4497,7 +4496,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4497
4496
  }));
4498
4497
  getDashboard = async (e) => {
4499
4498
  let t = await this.db.table(l.DASHBOARD).where({ id: e.id }).last().catch(() => {
4500
- T(2, [
4499
+ w(2, [
4501
4500
  "%cstorage",
4502
4501
  u.STORAGE,
4503
4502
  d.DASHBOARD_LOAD,
@@ -4512,14 +4511,14 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4512
4511
  };
4513
4512
  getDashboards = async (e) => {
4514
4513
  let t = (t) => e?.id === t.id, n = (t) => e?.name ? t.name.includes(e?.name) : !1, r = await this.db.table(l.DASHBOARD).toArray().then((n) => e?.id ? n.filter(t) : n).then((t) => e?.name ? t.filter(n) : t).catch(() => {
4515
- T(2, [
4514
+ w(2, [
4516
4515
  "%cstorage",
4517
4516
  u.STORAGE,
4518
4517
  d.DASHBOARD_LOAD,
4519
4518
  e
4520
4519
  ]);
4521
4520
  });
4522
- return r !== void 0 && T(3, [
4521
+ return r !== void 0 && w(3, [
4523
4522
  "%cstorage%c %cdashboards",
4524
4523
  u.STORAGE,
4525
4524
  u.NONE,
@@ -4545,7 +4544,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4545
4544
  data: null,
4546
4545
  message: `Dashboard ${t.data.id} saved to storage`,
4547
4546
  success: !0
4548
- })).catch((n) => (T(4, [
4547
+ })).catch((n) => (w(4, [
4549
4548
  "%cstorage",
4550
4549
  u.STORAGE,
4551
4550
  l.WIDGET,
@@ -4561,7 +4560,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4561
4560
  data: null,
4562
4561
  message: `Dashboard ${e.id} deleted`,
4563
4562
  success: !0
4564
- })).catch((t) => (T(4, [
4563
+ })).catch((t) => (w(4, [
4565
4564
  "%cstorage",
4566
4565
  u.STORAGE,
4567
4566
  l.DASHBOARD,
@@ -4586,7 +4585,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4586
4585
  return await this.db.table(l.TOPICS).orderBy("expires").filter((t) => t.expires < e).delete().catch((e) => (console.error("%cstorage%c %cclean", u.STORAGE, u.NONE, u.MESSAGES, e.message), 0)), await this.db.table(l.MESSAGES).orderBy("expires").filter((t) => t.expires < e).delete().catch((e) => (console.error("%clean%c %cstorage%c %cmessages", u.OK, u.NONE, u.STORAGE, u.NONE, u.MESSAGES, e.message), 0));
4587
4586
  };
4588
4587
  getMessages = async (e) => {
4589
- if (e.widget === "") return T(3, [
4588
+ if (e.widget === "") return w(3, [
4590
4589
  "%cget%c %cstorage%c %cmessages",
4591
4590
  u.NO_UPDATES,
4592
4591
  u.NONE,
@@ -4601,7 +4600,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4601
4600
  query: e
4602
4601
  };
4603
4602
  let t = e?.order ?? "utc", n = Math.floor(Date.now() / 1e3), r = e?.period ?? 0;
4604
- e.since = r === 0 ? n - 3600 * 24 * 30 : n - r, this.options.delay === 0 ? e.before = n : e.before = n - (this.options.delay || 0);
4603
+ e.since = r === 0 ? n - 2592e3 : n - r, e.before = this.options.delay === 0 ? n : n - (this.options.delay || 0);
4605
4604
  let i = (t) => t.utc > (e?.since || 0), a = (t) => t.utc < (e?.before || n);
4606
4605
  try {
4607
4606
  let n = this.db.table(l.TOPICS).where("widget_id").equals(e.widget).filter(i).filter(a);
@@ -4614,7 +4613,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4614
4613
  query: e
4615
4614
  };
4616
4615
  let o = r.map((e) => this.db.table(l.MESSAGES).get({ id: e.message_id }));
4617
- return A.Promise.all(o).then(async (t) => {
4616
+ return k.Promise.all(o).then(async (t) => {
4618
4617
  let n = {
4619
4618
  data: { messages: t.map((e) => {
4620
4619
  if (e !== void 0) return e.data;
@@ -4623,7 +4622,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4623
4622
  message: "Messages retrieved successfully",
4624
4623
  success: !0
4625
4624
  };
4626
- return T(3, [
4625
+ return w(3, [
4627
4626
  "%cget%c %cstorage%c %cmessages",
4628
4627
  u.OK,
4629
4628
  u.NONE,
@@ -4634,7 +4633,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4634
4633
  ]), n;
4635
4634
  });
4636
4635
  } catch (t) {
4637
- return T(2, [
4636
+ return w(2, [
4638
4637
  "%cget%c %cstorage%c %cmessages",
4639
4638
  u.OK,
4640
4639
  u.NONE,
@@ -4651,12 +4650,12 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4651
4650
  }
4652
4651
  };
4653
4652
  hideMessage = async (e, t) => {
4654
- await this.db.table(l.TOPICS).where("message_id").equals(e).modify({ visible: t ? 1 : 0 }).catch((e) => (console.error("%chide%c %cstorage%c %cmessage", u.KO, u.NONE, u.STORAGE, u.NONE, u.HIDE, e.message), 0));
4653
+ await this.db.table(l.TOPICS).where("message_id").equals(e).modify({ visible: +!!t }).catch((e) => (console.error("%chide%c %cstorage%c %cmessage", u.KO, u.NONE, u.STORAGE, u.NONE, u.HIDE, e.message), 0));
4655
4654
  };
4656
4655
  setMessages = async (e, t) => {
4657
4656
  if (e.type !== l.MESSAGES) return 400;
4658
4657
  let n = t.data.title, r = 0;
4659
- return T(3, [
4658
+ return w(3, [
4660
4659
  "%cset%c %cstorage%c %cmessages",
4661
4660
  u.OK,
4662
4661
  u.NONE,
@@ -4672,14 +4671,14 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4672
4671
  impressions: i.topics[0]?.impressions || i.dynamics?.semrush_visits || 0,
4673
4672
  reach: i.topics[0]?.reach || i.dynamics?.potential_reach || 0,
4674
4673
  sentiment: i.topics[0]?.sentiment || 0,
4675
- approved: i.topics[0]?.approved ? 1 : 0
4674
+ approved: +!!i.topics[0]?.approved
4676
4675
  }, await this.db.table(l.MESSAGES).put({
4677
4676
  id: i.id,
4678
4677
  utc: i.utc,
4679
4678
  data: i,
4680
4679
  expires: i.expires
4681
4680
  }).catch((e) => {
4682
- r++, T(4, [
4681
+ r++, w(4, [
4683
4682
  "%cset%c %cstorage",
4684
4683
  u.KO,
4685
4684
  u.NONE,
@@ -4705,7 +4704,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4705
4704
  expires: i.expires
4706
4705
  };
4707
4706
  await this.db.table(l.TOPICS).put(a).catch((e) => {
4708
- r++, T(4, [
4707
+ r++, w(4, [
4709
4708
  "%cset%c %cstorage",
4710
4709
  u.KO,
4711
4710
  u.NONE,
@@ -4716,12 +4715,12 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4716
4715
  e.message
4717
4716
  ]);
4718
4717
  }), await t.data.topics.forEach(async (e) => {
4719
- let t = e.message_id, n = e.visible ? 1 : 0, i = e.approve ? 1 : 0, a = e.title;
4718
+ let t = e.message_id, n = +!!e.visible, i = +!!e.approve, a = e.title;
4720
4719
  await this.db.table(l.TOPICS).where("message_id").equals(t).modify({
4721
4720
  visible: n,
4722
4721
  approve: i
4723
4722
  }).catch((t) => {
4724
- r++, T(4, [
4723
+ r++, w(4, [
4725
4724
  "%cset%c %cstorage",
4726
4725
  u.KO,
4727
4726
  u.NONE,
@@ -4737,7 +4736,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4737
4736
  }), r === 0 ? 201 : 400;
4738
4737
  };
4739
4738
  getSeries = async (e) => {
4740
- if (e.widget === "") return T(3, [
4739
+ if (e.widget === "") return w(3, [
4741
4740
  "%cget%c %cstorage%c %cseries",
4742
4741
  u.NO_UPDATES,
4743
4742
  u.NONE,
@@ -4752,7 +4751,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4752
4751
  query: e
4753
4752
  };
4754
4753
  let t = await this.db.table(l.SERIES).where({ id: e.widget }).last().catch(() => {
4755
- T(2, [
4754
+ w(2, [
4756
4755
  "%cget%c %cstorage%c %cseries",
4757
4756
  u.KO,
4758
4757
  u.NONE,
@@ -4767,7 +4766,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4767
4766
  success: t !== void 0,
4768
4767
  query: e
4769
4768
  };
4770
- return T(3, [
4769
+ return w(3, [
4771
4770
  "%cget%c %cstorage%c %cseries",
4772
4771
  u.OK,
4773
4772
  u.NONE,
@@ -4777,7 +4776,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4777
4776
  n
4778
4777
  ]), n;
4779
4778
  };
4780
- setSeries = async (e, t) => (delete t?.query, e.type === l.SERIES && t !== "" ? (T(3, [
4779
+ setSeries = async (e, t) => (delete t?.query, e.type === l.SERIES && t !== "" ? (w(3, [
4781
4780
  "%cset%c %cstorage%c %cseries",
4782
4781
  u.OK,
4783
4782
  u.NONE,
@@ -4790,7 +4789,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4790
4789
  dashboard_id: e.dashboard,
4791
4790
  hash: e.hash,
4792
4791
  data: t
4793
- }).then(() => 201).catch((t) => (T(2, [
4792
+ }).then(() => 201).catch((t) => (w(2, [
4794
4793
  "%cset%c %cstorage%c %cseries",
4795
4794
  u.KO,
4796
4795
  u.NONE,
@@ -4801,7 +4800,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4801
4800
  t.message
4802
4801
  ]), 400))) : 400);
4803
4802
  getWidget = async (e) => {
4804
- if (e.id === "") return T(3, [
4803
+ if (e.id === "") return w(3, [
4805
4804
  "%cget%c %cstorage%c %cwidget",
4806
4805
  u.KO,
4807
4806
  u.NONE,
@@ -4826,14 +4825,14 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4826
4825
  };
4827
4826
  getWidgets = async (e) => {
4828
4827
  let t = (t) => e?.dashboard === t.dashboard_id, n = (t) => e?.type === t.type, r = (t) => e?.name ? t.name.includes(e?.name) : !1, i = await this.db.table(l.WIDGET).toArray().then((n) => e?.dashboard ? n.filter(t) : n).then((t) => e?.type ? t.filter(n) : t).then((t) => e?.name ? t.filter(r) : t).catch(() => {
4829
- T(2, [
4828
+ w(2, [
4830
4829
  "%cstorage",
4831
4830
  u.STORAGE,
4832
4831
  d.WIDGET_LOAD,
4833
4832
  e
4834
4833
  ]);
4835
4834
  });
4836
- return i !== void 0 && T(3, [
4835
+ return i !== void 0 && w(3, [
4837
4836
  "%cstorage%c %cwidgets",
4838
4837
  u.STORAGE,
4839
4838
  u.NONE,
@@ -4881,11 +4880,11 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4881
4880
  message: `Widgets table deleted error: ${e.message}`,
4882
4881
  success: !1
4883
4882
  }));
4884
- subscribe = (e) => (e = te(e), this.subscribers.filter((t) => t.widget === e.widget).length > 0 ? null : (e.type === l.MESSAGES && (e = ne(this.options, e)), console.info("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e), this.subscribers.push(e), null));
4883
+ subscribe = (e) => (e = ee(e), this.subscribers.filter((t) => t.widget === e.widget).length > 0 ? null : (e.type === l.MESSAGES && (e = D(this.options, e)), console.info("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e), this.subscribers.push(e), null));
4885
4884
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
4886
4885
  getSlide = async (e) => {
4887
4886
  let t = await this.db.table(l.SLIDE).where({ id: e.id }).last().catch(() => {
4888
- T(2, [
4887
+ w(2, [
4889
4888
  "%cstorage",
4890
4889
  u.STORAGE,
4891
4890
  d.SLIDE_LOAD,
@@ -4901,7 +4900,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4901
4900
  };
4902
4901
  getSlides = async (e) => {
4903
4902
  let t = (t) => e?.id ? t.id === e.id : !1, n = (t) => e?.name ? t.name.includes(e?.name) : !1, r = (t) => e?.presentation_id ? t.presentation_id === e.presentation_id : !1, i = await this.db.table(l.SLIDE).toArray().then((t) => e?.presentation_id ? t.filter(r) : t).then((n) => e?.id ? n.filter(t) : n).then((t) => e?.name ? t.filter(n) : t);
4904
- return i && i.sort((e, t) => e.order_index - t.order_index), i !== void 0 && T(3, [
4903
+ return i && i.sort((e, t) => e.order_index - t.order_index), i !== void 0 && w(3, [
4905
4904
  "%cstorage%c %cslides",
4906
4905
  u.STORAGE,
4907
4906
  u.NONE,
@@ -4961,7 +4960,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
4961
4960
  };
4962
4961
  getPresentations = async (e) => {
4963
4962
  let t = (t) => e?.name ? t.name.includes(e?.name) : !1, n = await this.db.table(l.PRESENTATION).toArray().then((n) => e?.name ? n.filter(t) : n);
4964
- return n !== void 0 && T(3, [
4963
+ return n !== void 0 && w(3, [
4965
4964
  "%cstorage%c %cpresentations",
4966
4965
  u.STORAGE,
4967
4966
  u.NONE,
@@ -5010,7 +5009,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
5010
5009
  }));
5011
5010
  getPreference = async (e) => {
5012
5011
  let t = await this.db.table(l.PREFERENCE).where({ id: e.id }).last().catch(() => {
5013
- T(2, [
5012
+ w(2, [
5014
5013
  "%cstorage",
5015
5014
  u.STORAGE,
5016
5015
  d.PREFERENCE_LOAD,
@@ -5029,7 +5028,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
5029
5028
  };
5030
5029
  getPreferences = async (e) => {
5031
5030
  let t = (t) => e?.id ? e.id = t.id : !1, n = await this.db.table(l.PREFERENCE).toArray().then((n) => e?.id ? n.filter(t) : n);
5032
- return n !== void 0 && T(3, [
5031
+ return n !== void 0 && w(3, [
5033
5032
  "%cstorage%c %cpreferences",
5034
5033
  u.STORAGE,
5035
5034
  u.NONE,
@@ -5068,7 +5067,7 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
5068
5067
  }));
5069
5068
  getImages = async (e) => {
5070
5069
  let t = (t) => e?.id ? t.includes(e.id) : !1, n = await this.db.table(l.IMAGES).toArray().then((n) => e?.id ? n.filter(t) : n);
5071
- return n !== void 0 && T(3, [
5070
+ return n !== void 0 && w(3, [
5072
5071
  "%cstorage%c %cimages",
5073
5072
  u.STORAGE,
5074
5073
  u.NONE,
@@ -5102,34 +5101,34 @@ var { liveQuery: j, mergeRanges: oe, rangesOverlap: se, RangeSet: ce, cmp: le, E
5102
5101
  };
5103
5102
  //#endregion
5104
5103
  //#region node_modules/idb-keyval/dist/index.js
5105
- function he(e) {
5104
+ function N(e) {
5106
5105
  return new Promise((t, n) => {
5107
5106
  e.oncomplete = e.onsuccess = () => t(e.result), e.onabort = e.onerror = () => n(e.error);
5108
5107
  });
5109
5108
  }
5110
- function P(e, t) {
5109
+ function me(e, t) {
5111
5110
  let n, r = () => {
5112
5111
  if (n) return n;
5113
5112
  let r = indexedDB.open(e);
5114
- return r.onupgradeneeded = () => r.result.createObjectStore(t), n = he(r), n.then((e) => {
5113
+ return r.onupgradeneeded = () => r.result.createObjectStore(t), n = N(r), n.then((e) => {
5115
5114
  e.onclose = () => n = void 0;
5116
5115
  }, () => {}), n;
5117
5116
  };
5118
5117
  return (e, n) => r().then((r) => n(r.transaction(t, e).objectStore(t)));
5119
5118
  }
5120
- var ge;
5121
- function _e() {
5122
- return ge ||= P("keyval-store", "keyval"), ge;
5119
+ var he;
5120
+ function P() {
5121
+ return he ||= me("keyval-store", "keyval"), he;
5123
5122
  }
5124
- function F(e, t = _e()) {
5125
- return t("readonly", (t) => he(t.get(e)));
5123
+ function F(e, t = P()) {
5124
+ return t("readonly", (t) => N(t.get(e)));
5126
5125
  }
5127
- function I(e, t, n = _e()) {
5128
- return n("readwrite", (n) => (n.put(t, e), he(n.transaction)));
5126
+ function I(e, t, n = P()) {
5127
+ return n("readwrite", (n) => (n.put(t, e), N(n.transaction)));
5129
5128
  }
5130
5129
  //#endregion
5131
5130
  //#region src/storage/keyval.ts
5132
- var ve = class {
5131
+ var ge = class {
5133
5132
  subscribers = [];
5134
5133
  options;
5135
5134
  constructor(e) {
@@ -5140,41 +5139,41 @@ var ve = class {
5140
5139
  createHash = async (e) => 404;
5141
5140
  clearHash = async () => 404;
5142
5141
  deleteHash = async (e) => 404;
5143
- getCloud = async (e) => await F(D(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.CLOUD, e.slide, e.widget), {
5142
+ getCloud = async (e) => await F(E(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.CLOUD, e.slide, e.widget), {
5144
5143
  data: null,
5145
5144
  message: "Cloud Data error",
5146
5145
  success: !1
5147
5146
  }));
5148
- getSeries = async (e) => await F(D(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.SERIES, e.slide, e.widget), {
5147
+ getSeries = async (e) => await F(E(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.SERIES, e.slide, e.widget), {
5149
5148
  data: null,
5150
5149
  message: "Series Data error",
5151
5150
  success: !1
5152
5151
  }));
5153
- getMessages = async (e) => await F(D(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.MESSAGES, e.slide, e.widget), {
5152
+ getMessages = async (e) => await F(E(e)).then((e) => e).catch(() => (console.warn("%capi", u.API, l.MESSAGES, e.slide, e.widget), {
5154
5153
  data: null,
5155
5154
  message: "Messages Data error",
5156
5155
  success: !1
5157
5156
  }));
5158
5157
  setCloud = async (e, t) => {
5159
5158
  if (!t.success) return 400;
5160
- let n = D(e);
5159
+ let n = E(e);
5161
5160
  return delete t.success, delete t.message, await I(n, t).then(() => 201).catch((t) => (console.error("%cstorage", u.STORAGE, l.CLOUD, e, t.message), 400));
5162
5161
  };
5163
5162
  setSeries = async (e, t) => {
5164
5163
  if (!t.success) return 400;
5165
- let n = D(e);
5164
+ let n = E(e);
5166
5165
  return delete t.success, delete t.message, await I(n, t).then(() => 201).catch((t) => (console.error("%cstorage", u.STORAGE, l.SERIES, e, t.message), 400));
5167
5166
  };
5168
5167
  setMessages = async (e, t) => {
5169
5168
  if (!t.success) return 400;
5170
- let n = D(e);
5169
+ let n = E(e);
5171
5170
  return delete t.success, delete t.message, await I(n, t).then(() => 201).catch((t) => (console.error("%cstorage", u.STORAGE, l.MESSAGES, e, t.message), 400));
5172
5171
  };
5173
5172
  cleanMessages = async (e) => (console.log("cleanMessages not implemented for ", this.options.storage), await new Promise((e) => e(0)));
5174
5173
  hideMessage = async (e, t) => {
5175
5174
  console.debug(`hideMessage ${e} ${t} not implemented for ${this.options.storage}`);
5176
5175
  };
5177
- getDashboard = async (e) => await F(D(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5176
+ getDashboard = async (e) => await F(E(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5178
5177
  data: null,
5179
5178
  message: `Widget ${e.data.id} load error: ${t.message}`,
5180
5179
  success: !1
@@ -5184,7 +5183,7 @@ var ve = class {
5184
5183
  message: "Dashboards get error: ",
5185
5184
  success: !1
5186
5185
  });
5187
- setDashboard = async (e) => await I(D(e), {
5186
+ setDashboard = async (e) => await I(E(e), {
5188
5187
  id: e.dashboard,
5189
5188
  name: e.name
5190
5189
  }).then(() => ({
@@ -5196,7 +5195,7 @@ var ve = class {
5196
5195
  message: `Slide ${e.data.id} save error: ${t.message}`,
5197
5196
  success: !1
5198
5197
  }));
5199
- getWidget = async (e) => await F(D(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5198
+ getWidget = async (e) => await F(E(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5200
5199
  data: null,
5201
5200
  message: `Widget ${e.data.id} load error: ${t.message}`,
5202
5201
  success: !1
@@ -5206,7 +5205,7 @@ var ve = class {
5206
5205
  message: "Widgets load error: ",
5207
5206
  success: !1
5208
5207
  });
5209
- setWidget = async (e) => await I(D(e), {
5208
+ setWidget = async (e) => await I(E(e), {
5210
5209
  id: e.widget,
5211
5210
  name: e.name,
5212
5211
  dashboard_id: e.dashboard,
@@ -5239,9 +5238,9 @@ var ve = class {
5239
5238
  deleteSlides = async () => 404;
5240
5239
  deletePresentation = async (e) => 404;
5241
5240
  deletePresentations = async () => 404;
5242
- subscribe = (e) => (e.type === l.MESSAGES && (e = ne(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length > 0 ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5241
+ subscribe = (e) => (e.type === l.MESSAGES && (e = D(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length > 0 ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5243
5242
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
5244
- getSlide = async (e) => await F(D(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5243
+ getSlide = async (e) => await F(E(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.SLIDE, e.id), {
5245
5244
  data: null,
5246
5245
  message: `Slide ${e.data.id} load error: ${t.message}`,
5247
5246
  success: !1
@@ -5251,7 +5250,7 @@ var ve = class {
5251
5250
  message: `Slided ${e.presentation} load error: `,
5252
5251
  success: !1
5253
5252
  });
5254
- setSlide = async (e) => await I(D(e), {
5253
+ setSlide = async (e) => await I(E(e), {
5255
5254
  id: e.data.id,
5256
5255
  title: e.data.title || "Not set",
5257
5256
  json: e.data.json || {},
@@ -5265,7 +5264,7 @@ var ve = class {
5265
5264
  message: `Slide ${e.data.id} save error: ${t.message}`,
5266
5265
  success: !1
5267
5266
  }));
5268
- getPresentation = async (e) => await F(D(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.PRESENTATION, e.id), {
5267
+ getPresentation = async (e) => await F(E(e)).then((e) => e).catch((t) => (console.warn("%capi", u.API, l.PRESENTATION, e.id), {
5269
5268
  data: null,
5270
5269
  message: `Slide ${e.data.id} load error: ${t.message}`,
5271
5270
  success: !1
@@ -5276,7 +5275,7 @@ var ve = class {
5276
5275
  success: !1
5277
5276
  });
5278
5277
  setPresentation = async (e) => {
5279
- let t = D(e), n = e.data;
5278
+ let t = E(e), n = e.data;
5280
5279
  return await I(t, n).then(() => ({
5281
5280
  data: null,
5282
5281
  message: `Presentation ${e.data.id} saved to storage`,
@@ -5316,7 +5315,7 @@ var ve = class {
5316
5315
  message: `Image ${e.id} saved`,
5317
5316
  success: !1
5318
5317
  });
5319
- }, L = class {
5318
+ }, _e = class {
5320
5319
  subscribers = [];
5321
5320
  options;
5322
5321
  constructor(e) {
@@ -5333,7 +5332,7 @@ var ve = class {
5333
5332
  clearHash = async () => 404;
5334
5333
  deleteHash = async (e) => 404;
5335
5334
  getCloud = async (e) => {
5336
- let t = D(e);
5335
+ let t = E(e);
5337
5336
  try {
5338
5337
  return localStorage.getObject(t);
5339
5338
  } catch (t) {
@@ -5345,7 +5344,7 @@ var ve = class {
5345
5344
  }
5346
5345
  };
5347
5346
  getSeries = async (e) => {
5348
- let t = D(e);
5347
+ let t = E(e);
5349
5348
  try {
5350
5349
  return localStorage.getObject(t);
5351
5350
  } catch (t) {
@@ -5357,7 +5356,7 @@ var ve = class {
5357
5356
  }
5358
5357
  };
5359
5358
  getMessages = async (e) => {
5360
- let t = D(e);
5359
+ let t = E(e);
5361
5360
  try {
5362
5361
  return localStorage.getObject(t);
5363
5362
  } catch (t) {
@@ -5372,7 +5371,7 @@ var ve = class {
5372
5371
  get = async (e, t) => 404;
5373
5372
  set = async (e, t) => 404;
5374
5373
  setCloud = async (e, t) => {
5375
- let n = D(e);
5374
+ let n = E(e);
5376
5375
  try {
5377
5376
  return localStorage.setObject(n, t), 201;
5378
5377
  } catch (t) {
@@ -5380,7 +5379,7 @@ var ve = class {
5380
5379
  }
5381
5380
  };
5382
5381
  setSeries = async (e, t) => {
5383
- let n = D(e);
5382
+ let n = E(e);
5384
5383
  try {
5385
5384
  return localStorage.setObject(n, t), 201;
5386
5385
  } catch (t) {
@@ -5388,7 +5387,7 @@ var ve = class {
5388
5387
  }
5389
5388
  };
5390
5389
  setMessages = async (e, t) => {
5391
- let n = D(e);
5390
+ let n = E(e);
5392
5391
  try {
5393
5392
  return localStorage.setObject(n, t), 200;
5394
5393
  } catch (t) {
@@ -5471,7 +5470,7 @@ var ve = class {
5471
5470
  deleteSlides = async () => 404;
5472
5471
  deletePresentation = async (e) => 404;
5473
5472
  deletePresentations = async () => 404;
5474
- subscribe = (e) => (e.type === l.MESSAGES && (e = ne(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5473
+ subscribe = (e) => (e.type === l.MESSAGES && (e = D(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5475
5474
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
5476
5475
  getSlide = async (e) => {
5477
5476
  try {
@@ -5599,7 +5598,7 @@ var ve = class {
5599
5598
  message: `Image ${e.id} saved `,
5600
5599
  success: !1
5601
5600
  });
5602
- }, ye = class {
5601
+ }, ve = class {
5603
5602
  subscribers = [];
5604
5603
  options;
5605
5604
  constructor(e) {
@@ -5616,7 +5615,7 @@ var ve = class {
5616
5615
  clearHash = async () => 404;
5617
5616
  deleteHash = async (e) => 404;
5618
5617
  getCloud = async (e) => {
5619
- let t = D(e);
5618
+ let t = E(e);
5620
5619
  try {
5621
5620
  return sessionStorage.getObject(t);
5622
5621
  } catch (t) {
@@ -5628,7 +5627,7 @@ var ve = class {
5628
5627
  }
5629
5628
  };
5630
5629
  getSeries = async (e) => {
5631
- let t = D(e);
5630
+ let t = E(e);
5632
5631
  try {
5633
5632
  return sessionStorage.getObject(t);
5634
5633
  } catch (t) {
@@ -5640,7 +5639,7 @@ var ve = class {
5640
5639
  }
5641
5640
  };
5642
5641
  getMessages = async (e) => {
5643
- let t = D(e);
5642
+ let t = E(e);
5644
5643
  try {
5645
5644
  return sessionStorage.getObject(t);
5646
5645
  } catch (t) {
@@ -5652,7 +5651,7 @@ var ve = class {
5652
5651
  }
5653
5652
  };
5654
5653
  setCloud = async (e, t) => {
5655
- let n = D(e);
5654
+ let n = E(e);
5656
5655
  try {
5657
5656
  return sessionStorage.setObject(n, t), 201;
5658
5657
  } catch (t) {
@@ -5660,7 +5659,7 @@ var ve = class {
5660
5659
  }
5661
5660
  };
5662
5661
  setSeries = async (e, t) => {
5663
- let n = D(e);
5662
+ let n = E(e);
5664
5663
  try {
5665
5664
  return sessionStorage.setObject(n, t), 201;
5666
5665
  } catch (t) {
@@ -5668,7 +5667,7 @@ var ve = class {
5668
5667
  }
5669
5668
  };
5670
5669
  setMessages = async (e, t) => {
5671
- let n = D(e);
5670
+ let n = E(e);
5672
5671
  try {
5673
5672
  return sessionStorage.setObject(n, t), 200;
5674
5673
  } catch (t) {
@@ -5754,7 +5753,7 @@ var ve = class {
5754
5753
  deleteSlides = async () => 404;
5755
5754
  deletePresentation = async (e) => 404;
5756
5755
  deletePresentations = async () => 404;
5757
- subscribe = (e) => (e.type === l.MESSAGES && (e = ne(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5756
+ subscribe = (e) => (e.type === l.MESSAGES && (e = D(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
5758
5757
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
5759
5758
  getSlide = async (e) => {
5760
5759
  try {
@@ -5882,7 +5881,7 @@ var ve = class {
5882
5881
  message: `Image ${e.id} saved`,
5883
5882
  success: !1
5884
5883
  });
5885
- }, be = class {
5884
+ }, L = class {
5886
5885
  subscribers = [];
5887
5886
  options;
5888
5887
  constructor(e) {
@@ -5894,7 +5893,7 @@ var ve = class {
5894
5893
  clearHash = async () => 404;
5895
5894
  deleteHash = async (e) => 404;
5896
5895
  getCloud = async (e) => {
5897
- let t = D(e);
5896
+ let t = E(e);
5898
5897
  try {
5899
5898
  return window.__bc.WidgetData[t];
5900
5899
  } catch (t) {
@@ -5906,7 +5905,7 @@ var ve = class {
5906
5905
  }
5907
5906
  };
5908
5907
  getSeries = async (e) => {
5909
- let t = D(e);
5908
+ let t = E(e);
5910
5909
  try {
5911
5910
  return window.__bc.WidgetData[t];
5912
5911
  } catch (t) {
@@ -5918,7 +5917,7 @@ var ve = class {
5918
5917
  }
5919
5918
  };
5920
5919
  getMessages = async (e) => {
5921
- let t = D(e);
5920
+ let t = E(e);
5922
5921
  try {
5923
5922
  return window.__bc.WidgetData[t];
5924
5923
  } catch (t) {
@@ -5930,7 +5929,7 @@ var ve = class {
5930
5929
  }
5931
5930
  };
5932
5931
  setCloud = async (e, t) => {
5933
- let n = D(e);
5932
+ let n = E(e);
5934
5933
  try {
5935
5934
  return window.__bc.WidgetData[n] = t, 201;
5936
5935
  } catch (t) {
@@ -5938,7 +5937,7 @@ var ve = class {
5938
5937
  }
5939
5938
  };
5940
5939
  setSeries = async (e, t) => {
5941
- let n = D(e);
5940
+ let n = E(e);
5942
5941
  try {
5943
5942
  return window.__bc.WidgetData[n] = t, 201;
5944
5943
  } catch (t) {
@@ -5946,7 +5945,7 @@ var ve = class {
5946
5945
  }
5947
5946
  };
5948
5947
  setMessages = async (e, t) => {
5949
- let n = D(e);
5948
+ let n = E(e);
5950
5949
  try {
5951
5950
  return window.__bc.WidgetData[n] = t, 201;
5952
5951
  } catch (t) {
@@ -6032,7 +6031,7 @@ var ve = class {
6032
6031
  deleteSlides = async () => 404;
6033
6032
  deletePresentation = async (e) => 404;
6034
6033
  deletePresentations = async () => 404;
6035
- subscribe = (e) => (e.type === l.MESSAGES && (e = ne(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
6034
+ subscribe = (e) => (e.type === l.MESSAGES && (e = D(this.options, e)), this.subscribers.filter((t) => t.widget === e.widget).length ? null : (console.debug("%cstorage%c %csubscribe", u.STORAGE, u.NONE, u.SUBSCRIBE, e.slide, e.widget), this.subscribers.push(e), null));
6036
6035
  getSubscribers = async () => await new Promise((e) => e(this.subscribers));
6037
6036
  getSlide = async (e) => {
6038
6037
  try {
@@ -6161,36 +6160,33 @@ var ve = class {
6161
6160
  message: `Image ${e.name} saved`,
6162
6161
  success: !1
6163
6162
  });
6164
- }, xe = class {
6163
+ }, ye = class {
6165
6164
  sm;
6166
6165
  api;
6167
6166
  bc;
6168
6167
  options;
6169
6168
  subscribers = [];
6170
6169
  constructor(e) {
6171
- switch (T(3, [
6170
+ switch (w(3, [
6172
6171
  "%cpresentation",
6173
6172
  u.PRESENTATION,
6174
6173
  e.presentation,
6175
6174
  d.VERSION,
6176
- re
6177
- ]), this.options = e, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new ae(e), e.storage) {
6175
+ te
6176
+ ]), this.options = e, this.sm = null, this.bc = new BroadcastChannel(this.options.presentation), this.api = new re(e), e.storage) {
6178
6177
  case p.DEXIE:
6179
- this.sm = new me(e);
6178
+ this.sm = new pe(e);
6180
6179
  break;
6181
6180
  case p.LOCAL:
6182
- this.sm = new ye(e);
6181
+ this.sm = new ve(e);
6183
6182
  break;
6184
6183
  case p.SESSION:
6185
- this.sm = new L(e);
6184
+ this.sm = new _e(e);
6186
6185
  break;
6187
6186
  case p.KEYVAL:
6188
- this.sm = new ve(e);
6187
+ this.sm = new ge(e);
6189
6188
  break;
6190
- case p.WINDOW:
6191
- this.sm = new be(e);
6192
- break;
6193
- default:
6189
+ case p.WINDOW: this.sm = new L(e);
6194
6190
  }
6195
6191
  }
6196
6192
  addSubscriber(e) {
@@ -6200,7 +6196,7 @@ var ve = class {
6200
6196
  delete this.subscribers[e.widget];
6201
6197
  }
6202
6198
  update = async (e) => {
6203
- if (T(3, [
6199
+ if (w(3, [
6204
6200
  "%cupdate%c %cdata",
6205
6201
  u.NO_UPDATES,
6206
6202
  u.NONE,
@@ -6233,7 +6229,7 @@ var ve = class {
6233
6229
  let o = e.query;
6234
6230
  switch (o.type) {
6235
6231
  case l.MESSAGES:
6236
- a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), e.data.messages = e.data.messages.filter((e) => e.id !== null), i = e.data.messages.length > 0 ? x(e.data.messages[0].utc) : "none", a === i && t.refresh === !1 ? (T(3, [
6232
+ a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), e.data.messages = e.data.messages.filter((e) => e.id !== null), i = e.data.messages.length > 0 ? x(e.data.messages[0].utc) : "none", a === i && t.refresh === !1 ? (w(3, [
6237
6233
  "%cset%c %cstorage%c %cmessages",
6238
6234
  u.NO_UPDATES,
6239
6235
  u.NONE,
@@ -6245,7 +6241,7 @@ var ve = class {
6245
6241
  ]), r.code = 204) : this.sm === null ? r.code = 500 : (o.hash = i, await this.sm?.setHash(o), r.code = await this.sm.setMessages(e.query, e).then(async (n) => (t.refresh && n === 204 && (n = 201), this.broadcastUpdate(n, e), n)).catch((e) => 500));
6246
6242
  break;
6247
6243
  case l.CLOUD:
6248
- a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), i = x(e.data.cloud), a === i && t.refresh === !1 ? (T(3, [
6244
+ a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), i = x(e.data.cloud), a === i && t.refresh === !1 ? (w(3, [
6249
6245
  "%cset%c %cstorage%c %ccloud",
6250
6246
  u.NO_UPDATES,
6251
6247
  u.NONE,
@@ -6254,7 +6250,7 @@ var ve = class {
6254
6250
  u.CLOUD,
6255
6251
  e.data?.title ?? o.widget,
6256
6252
  `same hash:${i}`
6257
- ]), T(4, [
6253
+ ]), w(4, [
6258
6254
  "%cdebug%c %ccloud",
6259
6255
  u.NO_UPDATES,
6260
6256
  u.NONE,
@@ -6271,7 +6267,7 @@ var ve = class {
6271
6267
  }, this.sm === null ? r.code = 500 : r.code = await this.sm.setCloud(e.query, n.data).then((n) => (t.refresh && n === 204 && (n = 201), this.broadcastUpdate(n, e), n)).catch((e) => 500));
6272
6268
  break;
6273
6269
  case l.SERIES:
6274
- a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), i = x(e.data.series), a === i && t.refresh === !1 ? (T(3, [
6270
+ a = await this.sm?.getHash(o), a === "none" && (o.hash = "temp", await this.sm?.createHash(o)), i = x(e.data.series), a === i && t.refresh === !1 ? (w(3, [
6275
6271
  "%cset%c %cstorage%c %cseries",
6276
6272
  u.NO_UPDATES,
6277
6273
  u.NONE,
@@ -6280,7 +6276,7 @@ var ve = class {
6280
6276
  u.SERIES,
6281
6277
  e.data?.title ?? e.query.widget,
6282
6278
  `same hash:${i}`
6283
- ]), T(4, [
6279
+ ]), w(4, [
6284
6280
  "%cdebug%c %cseries",
6285
6281
  u.NO_UPDATES,
6286
6282
  u.NONE,
@@ -6296,7 +6292,7 @@ var ve = class {
6296
6292
  query: e.query
6297
6293
  }, this.sm === null ? r.code = 500 : r.code = await this.sm.setSeries(o, e.data).then((n) => (t.refresh && n === 204 && (n = 201), this.broadcastUpdate(n, e), n)).catch((e) => 500));
6298
6294
  break;
6299
- default: T(3, [
6295
+ default: w(3, [
6300
6296
  `%cfetch%c %capi% %c${o.type} `,
6301
6297
  u.KO,
6302
6298
  u.NONE,
@@ -6309,7 +6305,7 @@ var ve = class {
6309
6305
  hash: i
6310
6306
  };
6311
6307
  }
6312
- } else switch (T(3, [
6308
+ } else switch (w(3, [
6313
6309
  `%cset%c %c${e.query.type}%c %cunauthorized`,
6314
6310
  u.KO,
6315
6311
  u.NONE,
@@ -6344,7 +6340,7 @@ var ve = class {
6344
6340
  };
6345
6341
  startBroadcastListener = () => {
6346
6342
  let e = this.options.presentation;
6347
- T(3, [
6343
+ w(3, [
6348
6344
  "%cchannel%c %capi",
6349
6345
  u.BROADCAST,
6350
6346
  u.NONE,
@@ -6366,15 +6362,15 @@ var ve = class {
6366
6362
  broadcastUpdate = (e, t) => {
6367
6363
  switch (e) {
6368
6364
  case 201:
6369
- T(3, [
6365
+ w(3, [
6370
6366
  `%cupdate%c %cwidget%c %c${t.query?.type}`,
6371
6367
  u.BROADCAST,
6372
6368
  u.NONE,
6373
6369
  u.WIDGET,
6374
6370
  u.NONE,
6375
- E(t.query),
6371
+ T(t.query),
6376
6372
  `${t?.data?.title ?? ""} ${t.query.widget}`
6377
- ]), T(4, [
6373
+ ]), w(4, [
6378
6374
  "%cdebug%c %cevent",
6379
6375
  u.NO_UPDATES,
6380
6376
  u.NONE,
@@ -6386,18 +6382,16 @@ var ve = class {
6386
6382
  });
6387
6383
  break;
6388
6384
  case 204: break;
6389
- default:
6390
- T(2, [
6391
- `%cupdate%c %cwidget%c %c${t.query?.type}`,
6392
- u.KO,
6393
- u.NONE,
6394
- u.WIDGET,
6395
- u.NONE,
6396
- E(t.query),
6397
- "Fetch error",
6398
- t.query
6399
- ]);
6400
- break;
6385
+ default: w(2, [
6386
+ `%cupdate%c %cwidget%c %c${t.query?.type}`,
6387
+ u.KO,
6388
+ u.NONE,
6389
+ u.WIDGET,
6390
+ u.NONE,
6391
+ T(t.query),
6392
+ "Fetch error",
6393
+ t.query
6394
+ ]);
6401
6395
  }
6402
6396
  };
6403
6397
  hide = (e) => {
@@ -6407,18 +6401,18 @@ var ve = class {
6407
6401
  switch (e.data.event) {
6408
6402
  case d.SUBSCRIBE:
6409
6403
  let t = e.data.data;
6410
- t.widget !== void 0 && (T(3, [
6404
+ t.widget !== void 0 && (w(3, [
6411
6405
  `%csubscribe%c %cwidget%c %c${e.data.data.type}`,
6412
6406
  u.BROADCAST,
6413
6407
  u.NONE,
6414
6408
  u.WIDGET,
6415
6409
  u.NONE,
6416
- E(t),
6410
+ T(t),
6417
6411
  t
6418
6412
  ]), this.addSubscriber(t));
6419
6413
  break;
6420
6414
  case d.UPDATE:
6421
- T(3, [
6415
+ w(3, [
6422
6416
  "%cupdate%c %capi%c %cstorage",
6423
6417
  u.BROADCAST,
6424
6418
  u.NONE,
@@ -6428,23 +6422,20 @@ var ve = class {
6428
6422
  e.data
6429
6423
  ]), await this.update(e.data.data);
6430
6424
  break;
6431
- case "stream":
6432
- T(3, [
6433
- "%cupdate%c %capi%c %cstorage",
6434
- u.BROADCAST,
6435
- u.NONE,
6436
- u.API,
6437
- u.NONE,
6438
- u.STORAGE,
6439
- e.data
6440
- ]), await this.stream();
6441
- break;
6442
- default:
6425
+ case "stream": w(3, [
6426
+ "%cupdate%c %capi%c %cstorage",
6427
+ u.BROADCAST,
6428
+ u.NONE,
6429
+ u.API,
6430
+ u.NONE,
6431
+ u.STORAGE,
6432
+ e.data
6433
+ ]), await this.stream();
6443
6434
  }
6444
6435
  };
6445
6436
  cleanMessages = async () => {
6446
6437
  if (this.options?.suspended) {
6447
- T(2, [
6438
+ w(2, [
6448
6439
  "%cclean%c %cstorage%c %cmessages",
6449
6440
  u.KO,
6450
6441
  u.NONE,
@@ -6455,8 +6446,8 @@ var ve = class {
6455
6446
  ]);
6456
6447
  return;
6457
6448
  }
6458
- let e = this.options?.retention || 86400 * 40, t = await this.sm?.cleanMessages(e);
6459
- T(3, [
6449
+ let e = this.options?.retention || 3456e3, t = await this.sm?.cleanMessages(e);
6450
+ w(3, [
6460
6451
  "%cclean%c %cstorage%c %cmessages",
6461
6452
  u.OK,
6462
6453
  u.NONE,
@@ -6468,7 +6459,7 @@ var ve = class {
6468
6459
  };
6469
6460
  hideMessage = async (e) => {
6470
6461
  let t = await this.sm?.hideMessage(e.id, 0);
6471
- return T(3, [
6462
+ return w(3, [
6472
6463
  "%chide%c %cstorage%c %cmessages",
6473
6464
  u.OK,
6474
6465
  u.NONE,
@@ -6522,26 +6513,23 @@ var ve = class {
6522
6513
  getHash = async (e, t) => await this.sm?.getHash(t);
6523
6514
  setHash = async (e, t) => await this.sm?.setHash(t) ?? 400;
6524
6515
  clearHash = async () => await this.sm?.clearHash() ?? 400;
6525
- }, Se = class {
6516
+ }, be = class {
6526
6517
  sm;
6527
6518
  constructor(e) {
6528
6519
  switch (this.sm = null, e.storage) {
6529
6520
  case p.DEXIE:
6530
- this.sm = new me(e);
6521
+ this.sm = new pe(e);
6531
6522
  break;
6532
6523
  case p.LOCAL:
6533
- this.sm = new ye(e);
6524
+ this.sm = new ve(e);
6534
6525
  break;
6535
6526
  case p.SESSION:
6536
- this.sm = new L(e);
6527
+ this.sm = new _e(e);
6537
6528
  break;
6538
6529
  case p.KEYVAL:
6539
- this.sm = new ve(e);
6540
- break;
6541
- case p.WINDOW:
6542
- this.sm = new be(e);
6530
+ this.sm = new ge(e);
6543
6531
  break;
6544
- default:
6532
+ case p.WINDOW: this.sm = new L(e);
6545
6533
  }
6546
6534
  }
6547
6535
  getCloud = async (e) => e.type === l.CLOUD ? await this.sm?.getCloud(e) : (console.warn("%cget%c %cstorage%c %ccloud", u.KO, u.NONE, u.STORAGE, u.NONE, u.CLOUD, e.widget, "wrong method call for getCloud, type used is", e.type), {
@@ -6559,7 +6547,7 @@ var ve = class {
6559
6547
  message: `'wrong method call for getSeries, type used is ${e.type}`,
6560
6548
  success: !1
6561
6549
  });
6562
- }, Ce = class {
6550
+ }, xe = class {
6563
6551
  storageReader;
6564
6552
  broadcastChannel;
6565
6553
  element;
@@ -6570,7 +6558,7 @@ var ve = class {
6570
6558
  let r = { ...e.dataset };
6571
6559
  delete r.hmr;
6572
6560
  let i = window.__bc.opts;
6573
- r.presentation = i?.presentation ?? `${n} not found`, this.query = r, h(e), this.storageReader = new Se(i), this.broadcastChannel = new BroadcastChannel(r.presentation), this.broadcastListener();
6561
+ r.presentation = i?.presentation ?? `${n} not found`, this.query = r, h(e), this.storageReader = new be(i), this.broadcastChannel = new BroadcastChannel(r.presentation), this.broadcastListener();
6574
6562
  }
6575
6563
  addCallbackListener(e) {
6576
6564
  this.callbacks.push(e);
@@ -6584,20 +6572,20 @@ var ve = class {
6584
6572
  try {
6585
6573
  if (n.dashboard === e.dashboard && n.widget === e.widget) {
6586
6574
  let e = await this.getData();
6587
- e?.success && (T(4, [
6575
+ e?.success && (w(4, [
6588
6576
  `%cset%c %cwidget%c %c${this.query.type}`,
6589
6577
  u.OK,
6590
6578
  u.NONE,
6591
6579
  u.WIDGET,
6592
6580
  u.NONE,
6593
- E(this.query),
6581
+ T(this.query),
6594
6582
  this.query
6595
6583
  ]), this.callbacks.forEach(async (t) => {
6596
6584
  t(e);
6597
6585
  }));
6598
6586
  }
6599
6587
  } catch (e) {
6600
- T(4, [
6588
+ w(4, [
6601
6589
  d.WIDGET_UPDATE,
6602
6590
  n,
6603
6591
  e.message,
@@ -6605,10 +6593,7 @@ var ve = class {
6605
6593
  ]);
6606
6594
  }
6607
6595
  break;
6608
- case d.APP_READY:
6609
- this.subscribe();
6610
- break;
6611
- default:
6596
+ case d.APP_READY: this.subscribe();
6612
6597
  }
6613
6598
  };
6614
6599
  }
@@ -6616,15 +6601,15 @@ var ve = class {
6616
6601
  this.query.dashboard?.length && this.query.widget?.length && this.query.type?.length && (this.broadcastChannel.postMessage({
6617
6602
  event: d.SUBSCRIBE,
6618
6603
  data: this.query
6619
- }), T(3, [
6604
+ }), w(3, [
6620
6605
  `%csubscribe%c %cwidget%c %c${this.query.type}`,
6621
6606
  u.SUBSCRIBE,
6622
6607
  u.NONE,
6623
6608
  u.WIDGET,
6624
6609
  u.NONE,
6625
- E(this.query),
6610
+ T(this.query),
6626
6611
  this.query.widget
6627
- ]), T(4, [
6612
+ ]), w(4, [
6628
6613
  "%cdebug%c %cwidget",
6629
6614
  u.NO_UPDATES,
6630
6615
  u.NONE,
@@ -6645,7 +6630,7 @@ var ve = class {
6645
6630
  query: this.query
6646
6631
  };
6647
6632
  };
6648
- getCloud = async () => this.query.type === l.CLOUD ? await this.storageReader.getCloud(this.query) : (T(3, [
6633
+ getCloud = async () => this.query.type === l.CLOUD ? await this.storageReader.getCloud(this.query) : (w(3, [
6649
6634
  "%cget%c %cstorage%c %cwidget",
6650
6635
  u.KO,
6651
6636
  u.NONE,
@@ -6655,7 +6640,7 @@ var ve = class {
6655
6640
  this.query.widget,
6656
6641
  "Wrong method call for getCloud, expected type is",
6657
6642
  this.query.type
6658
- ]), T(4, [
6643
+ ]), w(4, [
6659
6644
  "%cdebug%c %ccloud",
6660
6645
  u.NO_UPDATES,
6661
6646
  u.NONE,
@@ -6667,7 +6652,7 @@ var ve = class {
6667
6652
  success: !1,
6668
6653
  query: this.query
6669
6654
  });
6670
- getMessages = async () => this.query.type === l.MESSAGES ? await this.storageReader.getMessages(this.query) : (T(3, [
6655
+ getMessages = async () => this.query.type === l.MESSAGES ? await this.storageReader.getMessages(this.query) : (w(3, [
6671
6656
  "%cget%c %cstorage%c %cwidget",
6672
6657
  u.KO,
6673
6658
  u.NONE,
@@ -6677,7 +6662,7 @@ var ve = class {
6677
6662
  this.query.widget,
6678
6663
  "Wrong method call for getMessages, expected type is",
6679
6664
  this.query.type
6680
- ]), T(4, [
6665
+ ]), w(4, [
6681
6666
  "%debug%c %cmessages",
6682
6667
  u.NO_UPDATES,
6683
6668
  u.NONE,
@@ -6688,7 +6673,7 @@ var ve = class {
6688
6673
  message: `wrong method call for getMessages, expected type is '${this.query.type}'`,
6689
6674
  success: !1
6690
6675
  });
6691
- getSeries = async () => this.query.type === l.SERIES ? await this.storageReader.getSeries(this.query) : (T(3, [
6676
+ getSeries = async () => this.query.type === l.SERIES ? await this.storageReader.getSeries(this.query) : (w(3, [
6692
6677
  "%cget%c %cstorage%c %cwidget",
6693
6678
  u.KO,
6694
6679
  u.NONE,
@@ -6698,7 +6683,7 @@ var ve = class {
6698
6683
  this.query.widget,
6699
6684
  "Wrong method call for getSeries, expected type is",
6700
6685
  this.query.type
6701
- ]), T(4, [
6686
+ ]), w(4, [
6702
6687
  "%cdebug%c %cseries",
6703
6688
  u.NO_UPDATES,
6704
6689
  u.NONE,
@@ -6711,7 +6696,7 @@ var ve = class {
6711
6696
  query: this.query
6712
6697
  });
6713
6698
  showModal = (e) => {
6714
- T(3, [
6699
+ w(3, [
6715
6700
  "%cmodal%c %cwidget",
6716
6701
  u.OK,
6717
6702
  u.NONE,
@@ -6737,4 +6722,4 @@ var ve = class {
6737
6722
  }
6738
6723
  };
6739
6724
  //#endregion
6740
- export { xe as BuzzcastingStorageManager, Se as BuzzcastingStorageReader, Ce as Widget };
6725
+ export { ye as BuzzcastingStorageManager, be as BuzzcastingStorageReader, xe as Widget };