bt-core-app 1.4.97 → 1.4.99

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.
Files changed (2) hide show
  1. package/dist/bt-core-app.js +1001 -992
  2. package/package.json +1 -1
@@ -11,8 +11,8 @@ function pt(e) {
11
11
  return (e == "x" ? t : t & 3 | 8).toString(16);
12
12
  }
13
13
  function en(e) {
14
- const t = z([]), l = Ne(), S = Ne(), f = Ne(), g = ee(() => l.value != null);
15
- function D(d) {
14
+ const t = z([]), l = Ne(), A = Ne(), s = Ne(), g = ee(() => l.value != null);
15
+ function I(d) {
16
16
  t.value = t.value.filter((h) => h.id != d);
17
17
  }
18
18
  function C(d) {
@@ -23,36 +23,36 @@ function en(e) {
23
23
  return t.value.push(h), h.id;
24
24
  }
25
25
  function _(d) {
26
- d != null && (S.value = d.toString());
26
+ d != null && (A.value = d.toString());
27
27
  }
28
28
  function M() {
29
- S.value = void 0;
29
+ A.value = void 0;
30
30
  }
31
31
  async function $(d, h) {
32
32
  const u = { ...h };
33
33
  u.completionMsg ?? (u.completionMsg = e == null ? void 0 : e.completionMsg), u.confirmationMsg ?? (u.confirmationMsg = e == null ? void 0 : e.confirmationMsg), u.errorMsg ?? (u.errorMsg = e == null ? void 0 : e.errorMsg), u.loadingMsg ?? (u.loadingMsg = (e == null ? void 0 : e.loadingMsg) ?? "Loading"), u.requireConfirmation ?? (u.requireConfirmation = e == null ? void 0 : e.requireConfirmation);
34
34
  const r = C(u.loadingMsg);
35
- let y = null;
35
+ let w = null;
36
36
  try {
37
- return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (f.value = u.completionMsg), y;
38
- } catch (x) {
37
+ return u.requireConfirmation || u.confirmationMsg, w = await d(), u.completionMsg != null && (s.value = u.completionMsg), w;
38
+ } catch (D) {
39
39
  if ((e == null ? void 0 : e.onError) != null)
40
- e.onError(x);
40
+ e.onError(D);
41
41
  else {
42
42
  if (u.throwError == !0)
43
- return x;
44
- _(u.errorMsg ?? x ?? "error");
43
+ return D;
44
+ _(u.errorMsg ?? D ?? "error");
45
45
  }
46
46
  } finally {
47
- D(r);
47
+ I(r);
48
48
  }
49
49
  }
50
50
  return Or(t, (d) => {
51
51
  l.value = d.length > 0 ? d[0].msg : void 0;
52
52
  }, { deep: !0 }), {
53
- actionErrorMsg: S,
53
+ actionErrorMsg: A,
54
54
  actionLoadingMsg: l,
55
- actionCompleteMsg: f,
55
+ actionCompleteMsg: s,
56
56
  clearErrors: M,
57
57
  doAction: $,
58
58
  isLoading: g,
@@ -64,51 +64,51 @@ function rn(e) {
64
64
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
65
65
  }
66
66
  var Re = function() {
67
- function e(f) {
68
- return f;
67
+ function e(s) {
68
+ return s;
69
69
  }
70
- function t(f) {
71
- return typeof f == "string" ? f.toLowerCase() : f;
70
+ function t(s) {
71
+ return typeof s == "string" ? s.toLowerCase() : s;
72
72
  }
73
- function l(f, g) {
74
- if (g = typeof g == "object" ? g : { direction: g }, typeof f != "function") {
75
- var D = f;
76
- f = function(d) {
77
- return d[D] ? d[D] : "";
73
+ function l(s, g) {
74
+ if (g = typeof g == "object" ? g : { direction: g }, typeof s != "function") {
75
+ var I = s;
76
+ s = function(d) {
77
+ return d[I] ? d[I] : "";
78
78
  };
79
79
  }
80
- if (f.length === 1) {
81
- var C = f, _ = g.ignoreCase ? t : e, M = g.cmp || function(d, h) {
80
+ if (s.length === 1) {
81
+ var C = s, _ = g.ignoreCase ? t : e, M = g.cmp || function(d, h) {
82
82
  return d < h ? -1 : d > h ? 1 : 0;
83
83
  };
84
- f = function(d, h) {
84
+ s = function(d, h) {
85
85
  return M(_(C(d)), _(C(h)));
86
86
  };
87
87
  }
88
88
  const $ = { "-1": "", desc: "" };
89
89
  return g.direction in $ ? function(d, h) {
90
- return -f(d, h);
91
- } : f;
90
+ return -s(d, h);
91
+ } : s;
92
92
  }
93
- function S(f, g) {
94
- var D = typeof this == "function" && !this.firstBy ? this : !1, C = l(f, g), _ = D ? function(M, $) {
95
- return D(M, $) || C(M, $);
93
+ function A(s, g) {
94
+ var I = typeof this == "function" && !this.firstBy ? this : !1, C = l(s, g), _ = I ? function(M, $) {
95
+ return I(M, $) || C(M, $);
96
96
  } : C;
97
- return _.thenBy = S, _;
97
+ return _.thenBy = A, _;
98
98
  }
99
- return S.firstBy = S, S;
99
+ return A.firstBy = A, A;
100
100
  }();
101
101
  function Ue(e, t) {
102
- let l = e ?? "", S = t ?? "";
102
+ let l = e ?? "", A = t ?? "";
103
103
  if (l.endsWith("/"))
104
104
  do
105
105
  l = l.slice(0, l.length - 1);
106
106
  while (l.endsWith("/"));
107
- if (S.startsWith("/"))
107
+ if (A.startsWith("/"))
108
108
  do
109
- S = S.slice(1, S.length);
110
- while (S.startsWith("/"));
111
- return `${l}/${S}`;
109
+ A = A.slice(1, A.length);
110
+ while (A.startsWith("/"));
111
+ return `${l}/${A}`;
112
112
  }
113
113
  function Zn(e) {
114
114
  return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
@@ -159,22 +159,22 @@ function rt(e, t = !1) {
159
159
  }
160
160
  function On(e, t, l) {
161
161
  if (e) {
162
- var S = new Image();
163
- S.onload = t, S.onerror = l, S.src = e;
162
+ var A = new Image();
163
+ A.onload = t, A.onerror = l, A.src = e;
164
164
  }
165
165
  }
166
166
  async function pn(e, t = !0) {
167
- return new Promise((l, S) => {
168
- e == null && S("no url given");
169
- var f = new Image();
170
- f.setAttribute("crossOrigin", "anonymous"), f.onload = function() {
167
+ return new Promise((l, A) => {
168
+ e == null && A("no url given");
169
+ var s = new Image();
170
+ s.setAttribute("crossOrigin", "anonymous"), s.onload = function() {
171
171
  var g = document.createElement("canvas");
172
172
  g.width = this.width, g.height = this.height;
173
- var D = g.getContext("2d");
174
- D == null || D.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
175
- }, f.onerror = function() {
176
- console.log("errr"), t ? S("image could not be loaded for some reason") : l(null);
177
- }, e != null && (f.src = e);
173
+ var I = g.getContext("2d");
174
+ I == null || I.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
175
+ }, s.onerror = function() {
176
+ console.log("errr"), t ? A("image could not be loaded for some reason") : l(null);
177
+ }, e != null && (s.src = e);
178
178
  });
179
179
  }
180
180
  function tn(e) {
@@ -202,34 +202,34 @@ const Ze = [
202
202
  function ra(e) {
203
203
  if (e == null)
204
204
  return 0;
205
- const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ze.filter((S) => S.values.some((f) => t.some((g) => f == g))).map((S) => S.value);
205
+ const t = e.replaceAll(" ", "").split(",").map((A) => A.toLowerCase()), l = Ze.filter((A) => A.values.some((s) => t.some((g) => s == g))).map((A) => A.value);
206
206
  return l.length == 0 ? 8 : Math.min(...l);
207
207
  }
208
208
  function ta(e) {
209
209
  return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
210
- let l = Ze.find((S) => S.values.some((f) => f == t));
210
+ let l = Ze.find((A) => A.values.some((s) => s == t));
211
211
  return l != null ? l.short : "";
212
212
  }).filter((t) => t != null && t.length > 0).toString();
213
213
  }
214
214
  function na(e, t) {
215
215
  if (e == null || t == null)
216
216
  return !0;
217
- const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), f = Ze.find((g) => g.values.some((D) => D == S));
218
- return f != null && l.some((g) => g == f.short || f.values.some((D) => D == g));
217
+ const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), A = t.replaceAll(" ", "").toLowerCase(), s = Ze.find((g) => g.values.some((I) => I == A));
218
+ return s != null && l.some((g) => g == s.short || s.values.some((I) => I == g));
219
219
  }
220
220
  function aa(e, t) {
221
221
  if (t == null)
222
222
  return e;
223
223
  let l = e ?? "";
224
224
  l = `${l},${t}`;
225
- let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((f) => Ze.find((g) => g.values.some((D) => D == f))).filter((f) => f != null).sort(Re.firstBy((f) => (f == null ? void 0 : f.value) ?? 0)).map((f) => f == null ? void 0 : f.short))].toString();
226
- return S.length > 0 ? S : void 0;
225
+ let A = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ze.find((g) => g.values.some((I) => I == s))).filter((s) => s != null).sort(Re.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
226
+ return A.length > 0 ? A : void 0;
227
227
  }
228
228
  function la(e, t) {
229
229
  if (t == null || e == null)
230
230
  return e;
231
- let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), f = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((D) => D.values.some((C) => C == g && C != S))).filter((g) => g != null).sort(Re.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
232
- return f.length > 0 ? f : void 0;
231
+ let l = e ?? "", A = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ze.find((I) => I.values.some((C) => C == g && C != A))).filter((g) => g != null).sort(Re.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
232
+ return s.length > 0 ? s : void 0;
233
233
  }
234
234
  function ua(e, t) {
235
235
  return e != null && Array.isArray(e) && e.length == t;
@@ -247,38 +247,38 @@ function ln() {
247
247
  return "0001-01-01T00:00:00Z";
248
248
  }
249
249
  function ca(e, t) {
250
- let l = "1", S = 0;
251
- if (S < t)
250
+ let l = "1", A = 0;
251
+ if (A < t)
252
252
  do
253
- l = l + "0", S += 1;
254
- while (S < t);
255
- let f = Number.parseInt(l);
256
- return Math.round(e * f) / f;
253
+ l = l + "0", A += 1;
254
+ while (A < t);
255
+ let s = Number.parseInt(l);
256
+ return Math.round(e * s) / s;
257
257
  }
258
258
  function fa(e, t) {
259
259
  let l = e ?? "";
260
- return t != null && (un(l, t) ? l = l.split(",").filter((S) => S != t).toString() : l != null ? l = `${l},${t}` : l = t), l != null && l.length > 0 ? l : null;
260
+ return t != null && (un(l, t) ? l = l.split(",").filter((A) => A != t).toString() : l != null ? l = `${l},${t}` : l = t), l != null && l.length > 0 ? l : null;
261
261
  }
262
262
  function un(e, t) {
263
263
  if (e == null || e.length == 0)
264
264
  return !1;
265
265
  if (!t)
266
266
  return !0;
267
- var l = e.split(","), S = t.split(",");
268
- return l.some((f) => S.some((g) => g == f));
267
+ var l = e.split(","), A = t.split(",");
268
+ return l.some((s) => A.some((g) => g == s));
269
269
  }
270
270
  function Nr(e) {
271
271
  if (!e)
272
272
  return e;
273
273
  let t, l = Array.isArray(e) ? [] : {};
274
- for (const S in e)
275
- t = e[S], l[S] = typeof t == "object" ? Nr(t) : t;
274
+ for (const A in e)
275
+ t = e[A], l[A] = typeof t == "object" ? Nr(t) : t;
276
276
  return l;
277
277
  }
278
278
  function cn(e) {
279
279
  return e && Object.keys(e).sort().reduce(function(t, l) {
280
- let S = e[l];
281
- return t[l] = typeof S == "object" && S !== null ? cn(S) : S, t;
280
+ let A = e[l];
281
+ return t[l] = typeof A == "object" && A !== null ? cn(A) : A, t;
282
282
  }, Array.isArray(e) ? [] : {});
283
283
  }
284
284
  function fn(e, t) {
@@ -288,17 +288,17 @@ function tt(e, t = (l) => l) {
288
288
  if (e == null)
289
289
  return [];
290
290
  const l = Array.isArray(e) ? e : t(e);
291
- return _e(l) ? [...l.reduce((S, f) => {
292
- S.push(f);
293
- const g = tt(f, t);
294
- return _e(g) && S.push(...g), S;
291
+ return _e(l) ? [...l.reduce((A, s) => {
292
+ A.push(s);
293
+ const g = tt(s, t);
294
+ return _e(g) && A.push(...g), A;
295
295
  }, [])] : [];
296
296
  }
297
297
  function sa(e) {
298
- const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0], f = new Uint8Array(l.length);
298
+ const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), A = t[0].split(":")[1].split(";")[0], s = new Uint8Array(l.length);
299
299
  for (let g = 0; g < l.length; g++)
300
- f[g] = l.charCodeAt(g);
301
- return new Blob([f], { type: S });
300
+ s[g] = l.charCodeAt(g);
301
+ return new Blob([s], { type: A });
302
302
  }
303
303
  function sn(e) {
304
304
  var t = "";
@@ -322,10 +322,10 @@ function dn(e, t, l) {
322
322
  return !0;
323
323
  if (e == null || l == null)
324
324
  return !1;
325
- for (let f = 0; f < l.length; f++) {
326
- const g = l[f];
327
- var S = Sr(e, g);
328
- if (S != null && typeof S == "string" && fn(S, t))
325
+ for (let s = 0; s < l.length; s++) {
326
+ const g = l[s];
327
+ var A = Sr(e, g);
328
+ if (A != null && typeof A == "string" && fn(A, t))
329
329
  return !0;
330
330
  }
331
331
  return !1;
@@ -342,11 +342,11 @@ function Sr(e, t) {
342
342
  if (e == null || e == null || !t)
343
343
  return null;
344
344
  var l = t.split(".");
345
- let S = l.length;
346
- for (var f = e, g = 0; g < S; g++)
347
- if (f = f[l[g]], f == null)
345
+ let A = l.length;
346
+ for (var s = e, g = 0; g < A; g++)
347
+ if (s = s[l[g]], s == null)
348
348
  return null;
349
- return f;
349
+ return s;
350
350
  }
351
351
  function hn(e) {
352
352
  return e ? /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e) : !1;
@@ -368,10 +368,10 @@ var nt = { exports: {} };
368
368
  (function(l) {
369
369
  e.exports = l();
370
370
  })(function() {
371
- return function l(S, f, g) {
372
- function D(M, $) {
373
- if (!f[M]) {
374
- if (!S[M]) {
371
+ return function l(A, s, g) {
372
+ function I(M, $) {
373
+ if (!s[M]) {
374
+ if (!A[M]) {
375
375
  var d = typeof Oe == "function" && Oe;
376
376
  if (!$ && d)
377
377
  return d(M, !0);
@@ -380,22 +380,22 @@ var nt = { exports: {} };
380
380
  var h = new Error("Cannot find module '" + M + "'");
381
381
  throw h.code = "MODULE_NOT_FOUND", h;
382
382
  }
383
- var u = f[M] = { exports: {} };
384
- S[M][0].call(u.exports, function(r) {
385
- var y = S[M][1][r];
386
- return D(y || r);
387
- }, u, u.exports, l, S, f, g);
383
+ var u = s[M] = { exports: {} };
384
+ A[M][0].call(u.exports, function(r) {
385
+ var w = A[M][1][r];
386
+ return I(w || r);
387
+ }, u, u.exports, l, A, s, g);
388
388
  }
389
- return f[M].exports;
389
+ return s[M].exports;
390
390
  }
391
391
  for (var C = typeof Oe == "function" && Oe, _ = 0; _ < g.length; _++)
392
- D(g[_]);
393
- return D;
394
- }({ 1: [function(l, S, f) {
392
+ I(g[_]);
393
+ return I;
394
+ }({ 1: [function(l, A, s) {
395
395
  (function(g) {
396
- var D = g.MutationObserver || g.WebKitMutationObserver, C;
397
- if (D) {
398
- var _ = 0, M = new D(r), $ = g.document.createTextNode("");
396
+ var I = g.MutationObserver || g.WebKitMutationObserver, C;
397
+ if (I) {
398
+ var _ = 0, M = new I(r), $ = g.document.createTextNode("");
399
399
  M.observe($, {
400
400
  characterData: !0
401
401
  }), C = function() {
@@ -408,183 +408,183 @@ var nt = { exports: {} };
408
408
  };
409
409
  } else
410
410
  "document" in g && "onreadystatechange" in g.document.createElement("script") ? C = function() {
411
- var x = g.document.createElement("script");
412
- x.onreadystatechange = function() {
413
- r(), x.onreadystatechange = null, x.parentNode.removeChild(x), x = null;
414
- }, g.document.documentElement.appendChild(x);
411
+ var D = g.document.createElement("script");
412
+ D.onreadystatechange = function() {
413
+ r(), D.onreadystatechange = null, D.parentNode.removeChild(D), D = null;
414
+ }, g.document.documentElement.appendChild(D);
415
415
  } : C = function() {
416
416
  setTimeout(r, 0);
417
417
  };
418
418
  var h, u = [];
419
419
  function r() {
420
420
  h = !0;
421
- for (var x, i, E = u.length; E; ) {
422
- for (i = u, u = [], x = -1; ++x < E; )
423
- i[x]();
421
+ for (var D, i, E = u.length; E; ) {
422
+ for (i = u, u = [], D = -1; ++D < E; )
423
+ i[D]();
424
424
  E = u.length;
425
425
  }
426
426
  h = !1;
427
427
  }
428
- S.exports = y;
429
- function y(x) {
430
- u.push(x) === 1 && !h && C();
428
+ A.exports = w;
429
+ function w(D) {
430
+ u.push(D) === 1 && !h && C();
431
431
  }
432
432
  }).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
433
- }, {}], 2: [function(l, S, f) {
433
+ }, {}], 2: [function(l, A, s) {
434
434
  var g = l(1);
435
- function D() {
435
+ function I() {
436
436
  }
437
437
  var C = {}, _ = ["REJECTED"], M = ["FULFILLED"], $ = ["PENDING"];
438
- S.exports = d;
439
- function d(b) {
440
- if (typeof b != "function")
438
+ A.exports = d;
439
+ function d(S) {
440
+ if (typeof S != "function")
441
441
  throw new TypeError("resolver must be a function");
442
- this.state = $, this.queue = [], this.outcome = void 0, b !== D && y(this, b);
442
+ this.state = $, this.queue = [], this.outcome = void 0, S !== I && w(this, S);
443
443
  }
444
- d.prototype.catch = function(b) {
445
- return this.then(null, b);
446
- }, d.prototype.then = function(b, T) {
447
- if (typeof b != "function" && this.state === M || typeof T != "function" && this.state === _)
444
+ d.prototype.catch = function(S) {
445
+ return this.then(null, S);
446
+ }, d.prototype.then = function(S, T) {
447
+ if (typeof S != "function" && this.state === M || typeof T != "function" && this.state === _)
448
448
  return this;
449
- var I = new this.constructor(D);
449
+ var x = new this.constructor(I);
450
450
  if (this.state !== $) {
451
- var N = this.state === M ? b : T;
452
- u(I, N, this.outcome);
451
+ var L = this.state === M ? S : T;
452
+ u(x, L, this.outcome);
453
453
  } else
454
- this.queue.push(new h(I, b, T));
455
- return I;
454
+ this.queue.push(new h(x, S, T));
455
+ return x;
456
456
  };
457
- function h(b, T, I) {
458
- this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof I == "function" && (this.onRejected = I, this.callRejected = this.otherCallRejected);
457
+ function h(S, T, x) {
458
+ this.promise = S, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof x == "function" && (this.onRejected = x, this.callRejected = this.otherCallRejected);
459
459
  }
460
- h.prototype.callFulfilled = function(b) {
461
- C.resolve(this.promise, b);
462
- }, h.prototype.otherCallFulfilled = function(b) {
463
- u(this.promise, this.onFulfilled, b);
464
- }, h.prototype.callRejected = function(b) {
465
- C.reject(this.promise, b);
466
- }, h.prototype.otherCallRejected = function(b) {
467
- u(this.promise, this.onRejected, b);
460
+ h.prototype.callFulfilled = function(S) {
461
+ C.resolve(this.promise, S);
462
+ }, h.prototype.otherCallFulfilled = function(S) {
463
+ u(this.promise, this.onFulfilled, S);
464
+ }, h.prototype.callRejected = function(S) {
465
+ C.reject(this.promise, S);
466
+ }, h.prototype.otherCallRejected = function(S) {
467
+ u(this.promise, this.onRejected, S);
468
468
  };
469
- function u(b, T, I) {
469
+ function u(S, T, x) {
470
470
  g(function() {
471
- var N;
471
+ var L;
472
472
  try {
473
- N = T(I);
474
- } catch (s) {
475
- return C.reject(b, s);
473
+ L = T(x);
474
+ } catch (f) {
475
+ return C.reject(S, f);
476
476
  }
477
- N === b ? C.reject(b, new TypeError("Cannot resolve promise with itself")) : C.resolve(b, N);
477
+ L === S ? C.reject(S, new TypeError("Cannot resolve promise with itself")) : C.resolve(S, L);
478
478
  });
479
479
  }
480
- C.resolve = function(b, T) {
481
- var I = x(r, T);
482
- if (I.status === "error")
483
- return C.reject(b, I.value);
484
- var N = I.value;
485
- if (N)
486
- y(b, N);
480
+ C.resolve = function(S, T) {
481
+ var x = D(r, T);
482
+ if (x.status === "error")
483
+ return C.reject(S, x.value);
484
+ var L = x.value;
485
+ if (L)
486
+ w(S, L);
487
487
  else {
488
- b.state = M, b.outcome = T;
489
- for (var s = -1, A = b.queue.length; ++s < A; )
490
- b.queue[s].callFulfilled(T);
488
+ S.state = M, S.outcome = T;
489
+ for (var f = -1, y = S.queue.length; ++f < y; )
490
+ S.queue[f].callFulfilled(T);
491
491
  }
492
- return b;
493
- }, C.reject = function(b, T) {
494
- b.state = _, b.outcome = T;
495
- for (var I = -1, N = b.queue.length; ++I < N; )
496
- b.queue[I].callRejected(T);
497
- return b;
492
+ return S;
493
+ }, C.reject = function(S, T) {
494
+ S.state = _, S.outcome = T;
495
+ for (var x = -1, L = S.queue.length; ++x < L; )
496
+ S.queue[x].callRejected(T);
497
+ return S;
498
498
  };
499
- function r(b) {
500
- var T = b && b.then;
501
- if (b && (typeof b == "object" || typeof b == "function") && typeof T == "function")
499
+ function r(S) {
500
+ var T = S && S.then;
501
+ if (S && (typeof S == "object" || typeof S == "function") && typeof T == "function")
502
502
  return function() {
503
- T.apply(b, arguments);
503
+ T.apply(S, arguments);
504
504
  };
505
505
  }
506
- function y(b, T) {
507
- var I = !1;
508
- function N(X) {
509
- I || (I = !0, C.reject(b, X));
506
+ function w(S, T) {
507
+ var x = !1;
508
+ function L(X) {
509
+ x || (x = !0, C.reject(S, X));
510
510
  }
511
- function s(X) {
512
- I || (I = !0, C.resolve(b, X));
511
+ function f(X) {
512
+ x || (x = !0, C.resolve(S, X));
513
513
  }
514
- function A() {
515
- T(s, N);
514
+ function y() {
515
+ T(f, L);
516
516
  }
517
- var j = x(A);
518
- j.status === "error" && N(j.value);
517
+ var J = D(y);
518
+ J.status === "error" && L(J.value);
519
519
  }
520
- function x(b, T) {
521
- var I = {};
520
+ function D(S, T) {
521
+ var x = {};
522
522
  try {
523
- I.value = b(T), I.status = "success";
524
- } catch (N) {
525
- I.status = "error", I.value = N;
523
+ x.value = S(T), x.status = "success";
524
+ } catch (L) {
525
+ x.status = "error", x.value = L;
526
526
  }
527
- return I;
527
+ return x;
528
528
  }
529
529
  d.resolve = i;
530
- function i(b) {
531
- return b instanceof this ? b : C.resolve(new this(D), b);
530
+ function i(S) {
531
+ return S instanceof this ? S : C.resolve(new this(I), S);
532
532
  }
533
533
  d.reject = E;
534
- function E(b) {
535
- var T = new this(D);
536
- return C.reject(T, b);
534
+ function E(S) {
535
+ var T = new this(I);
536
+ return C.reject(T, S);
537
537
  }
538
- d.all = w;
539
- function w(b) {
538
+ d.all = b;
539
+ function b(S) {
540
540
  var T = this;
541
- if (Object.prototype.toString.call(b) !== "[object Array]")
541
+ if (Object.prototype.toString.call(S) !== "[object Array]")
542
542
  return this.reject(new TypeError("must be an array"));
543
- var I = b.length, N = !1;
544
- if (!I)
543
+ var x = S.length, L = !1;
544
+ if (!x)
545
545
  return this.resolve([]);
546
- for (var s = new Array(I), A = 0, j = -1, X = new this(D); ++j < I; )
547
- re(b[j], j);
546
+ for (var f = new Array(x), y = 0, J = -1, X = new this(I); ++J < x; )
547
+ re(S[J], J);
548
548
  return X;
549
549
  function re(ue, be) {
550
550
  T.resolve(ue).then(G, function(Y) {
551
- N || (N = !0, C.reject(X, Y));
551
+ L || (L = !0, C.reject(X, Y));
552
552
  });
553
553
  function G(Y) {
554
- s[be] = Y, ++A === I && !N && (N = !0, C.resolve(X, s));
554
+ f[be] = Y, ++y === x && !L && (L = !0, C.resolve(X, f));
555
555
  }
556
556
  }
557
557
  }
558
- d.race = L;
559
- function L(b) {
558
+ d.race = N;
559
+ function N(S) {
560
560
  var T = this;
561
- if (Object.prototype.toString.call(b) !== "[object Array]")
561
+ if (Object.prototype.toString.call(S) !== "[object Array]")
562
562
  return this.reject(new TypeError("must be an array"));
563
- var I = b.length, N = !1;
564
- if (!I)
563
+ var x = S.length, L = !1;
564
+ if (!x)
565
565
  return this.resolve([]);
566
- for (var s = -1, A = new this(D); ++s < I; )
567
- j(b[s]);
568
- return A;
569
- function j(X) {
566
+ for (var f = -1, y = new this(I); ++f < x; )
567
+ J(S[f]);
568
+ return y;
569
+ function J(X) {
570
570
  T.resolve(X).then(function(re) {
571
- N || (N = !0, C.resolve(A, re));
571
+ L || (L = !0, C.resolve(y, re));
572
572
  }, function(re) {
573
- N || (N = !0, C.reject(A, re));
573
+ L || (L = !0, C.reject(y, re));
574
574
  });
575
575
  }
576
576
  }
577
- }, { 1: 1 }], 3: [function(l, S, f) {
577
+ }, { 1: 1 }], 3: [function(l, A, s) {
578
578
  (function(g) {
579
579
  typeof g.Promise != "function" && (g.Promise = l(2));
580
580
  }).call(this, typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
581
- }, { 2: 2 }], 4: [function(l, S, f) {
581
+ }, { 2: 2 }], 4: [function(l, A, s) {
582
582
  var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
583
583
  return typeof n;
584
584
  } : function(n) {
585
585
  return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
586
586
  };
587
- function D(n, c) {
587
+ function I(n, c) {
588
588
  if (!(n instanceof c))
589
589
  throw new TypeError("Cannot call a class as a function");
590
590
  }
@@ -646,20 +646,20 @@ var nt = { exports: {} };
646
646
  function r(n) {
647
647
  return typeof n != "string" && (console.warn(n + " used as a key, but it is not a string."), n = String(n)), n;
648
648
  }
649
- function y() {
649
+ function w() {
650
650
  if (arguments.length && typeof arguments[arguments.length - 1] == "function")
651
651
  return arguments[arguments.length - 1];
652
652
  }
653
- var x = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, L = "readonly", b = "readwrite";
653
+ var D = "local-forage-detect-blob-support", i = void 0, E = {}, b = Object.prototype.toString, N = "readonly", S = "readwrite";
654
654
  function T(n) {
655
655
  for (var c = n.length, a = new ArrayBuffer(c), m = new Uint8Array(a), v = 0; v < c; v++)
656
656
  m[v] = n.charCodeAt(v);
657
657
  return a;
658
658
  }
659
- function I(n) {
659
+ function x(n) {
660
660
  return new d(function(c) {
661
- var a = n.transaction(x, b), m = $([""]);
662
- a.objectStore(x).put(m, "key"), a.onabort = function(v) {
661
+ var a = n.transaction(D, S), m = $([""]);
662
+ a.objectStore(D).put(m, "key"), a.onabort = function(v) {
663
663
  v.preventDefault(), v.stopPropagation(), c(!1);
664
664
  }, a.oncomplete = function() {
665
665
  var v = navigator.userAgent.match(/Chrome\/(\d+)/), o = navigator.userAgent.match(/Edge\//);
@@ -669,12 +669,12 @@ var nt = { exports: {} };
669
669
  return !1;
670
670
  });
671
671
  }
672
- function N(n) {
673
- return typeof i == "boolean" ? d.resolve(i) : I(n).then(function(c) {
672
+ function L(n) {
673
+ return typeof i == "boolean" ? d.resolve(i) : x(n).then(function(c) {
674
674
  return i = c, i;
675
675
  });
676
676
  }
677
- function s(n) {
677
+ function f(n) {
678
678
  var c = E[n.name], a = {};
679
679
  a.promise = new d(function(m, v) {
680
680
  a.resolve = m, a.reject = v;
@@ -682,12 +682,12 @@ var nt = { exports: {} };
682
682
  return a.promise;
683
683
  }) : c.dbReady = a.promise;
684
684
  }
685
- function A(n) {
685
+ function y(n) {
686
686
  var c = E[n.name], a = c.deferredOperations.pop();
687
687
  if (a)
688
688
  return a.resolve(), a.promise;
689
689
  }
690
- function j(n, c) {
690
+ function J(n, c) {
691
691
  var a = E[n.name], m = a.deferredOperations.pop();
692
692
  if (m)
693
693
  return m.reject(c), m.promise;
@@ -696,7 +696,7 @@ var nt = { exports: {} };
696
696
  return new d(function(a, m) {
697
697
  if (E[n.name] = E[n.name] || ne(), n.db)
698
698
  if (c)
699
- s(n), n.db.close();
699
+ f(n), n.db.close();
700
700
  else
701
701
  return a(n.db);
702
702
  var v = [n.name];
@@ -705,7 +705,7 @@ var nt = { exports: {} };
705
705
  c && (o.onupgradeneeded = function(P) {
706
706
  var R = o.result;
707
707
  try {
708
- R.createObjectStore(n.storeName), P.oldVersion <= 1 && R.createObjectStore(x);
708
+ R.createObjectStore(n.storeName), P.oldVersion <= 1 && R.createObjectStore(D);
709
709
  } catch (B) {
710
710
  if (B.name === "ConstraintError")
711
711
  console.warn('The database "' + n.name + '" has been upgraded from version ' + P.oldVersion + " to version " + P.newVersion + ', but the storage "' + n.storeName + '" already exists.');
@@ -718,7 +718,7 @@ var nt = { exports: {} };
718
718
  var P = o.result;
719
719
  P.onversionchange = function(R) {
720
720
  R.target.close();
721
- }, a(P), A(n);
721
+ }, a(P), y(n);
722
722
  };
723
723
  });
724
724
  }
@@ -770,7 +770,7 @@ var nt = { exports: {} };
770
770
  return u(a, n, n), a;
771
771
  }
772
772
  function Z(n) {
773
- s(n);
773
+ f(n);
774
774
  for (var c = E[n.name], a = c.forages, m = 0; m < a.length; m++) {
775
775
  var v = a[m];
776
776
  v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
@@ -782,7 +782,7 @@ var nt = { exports: {} };
782
782
  for (var P = 0; P < a.length; P++)
783
783
  a[P]._dbInfo.db = o;
784
784
  }).catch(function(o) {
785
- throw j(n, o), o;
785
+ throw J(n, o), o;
786
786
  });
787
787
  }
788
788
  function W(n, c, a, m) {
@@ -840,8 +840,8 @@ var nt = { exports: {} };
840
840
  }).then(function(k) {
841
841
  a.db = v.db = k, c._dbInfo = a;
842
842
  for (var q = 0; q < F.length; q++) {
843
- var J = F[q];
844
- J !== c && (J._dbInfo.db = a.db, J._dbInfo.version = a.version);
843
+ var j = F[q];
844
+ j !== c && (j._dbInfo.db = a.db, j._dbInfo.version = a.version);
845
845
  }
846
846
  });
847
847
  }
@@ -850,7 +850,7 @@ var nt = { exports: {} };
850
850
  n = r(n);
851
851
  var m = new d(function(v, o) {
852
852
  a.ready().then(function() {
853
- W(a._dbInfo, L, function(P, R) {
853
+ W(a._dbInfo, N, function(P, R) {
854
854
  if (P)
855
855
  return o(P);
856
856
  try {
@@ -872,7 +872,7 @@ var nt = { exports: {} };
872
872
  function ge(n, c) {
873
873
  var a = this, m = new d(function(v, o) {
874
874
  a.ready().then(function() {
875
- W(a._dbInfo, L, function(P, R) {
875
+ W(a._dbInfo, N, function(P, R) {
876
876
  if (P)
877
877
  return o(P);
878
878
  try {
@@ -880,9 +880,9 @@ var nt = { exports: {} };
880
880
  F.onsuccess = function() {
881
881
  var q = F.result;
882
882
  if (q) {
883
- var J = q.value;
884
- H(J) && (J = Y(J));
885
- var p = n(J, q.key, k++);
883
+ var j = q.value;
884
+ H(j) && (j = Y(j));
885
+ var p = n(j, q.key, k++);
886
886
  p !== void 0 ? v(p) : q.continue();
887
887
  } else
888
888
  v();
@@ -903,21 +903,21 @@ var nt = { exports: {} };
903
903
  var v = new d(function(o, P) {
904
904
  var R;
905
905
  m.ready().then(function() {
906
- return R = m._dbInfo, w.call(c) === "[object Blob]" ? N(R.db).then(function(B) {
906
+ return R = m._dbInfo, b.call(c) === "[object Blob]" ? L(R.db).then(function(B) {
907
907
  return B ? c : G(c);
908
908
  }) : c;
909
909
  }).then(function(B) {
910
- W(m._dbInfo, b, function(F, k) {
910
+ W(m._dbInfo, S, function(F, k) {
911
911
  if (F)
912
912
  return P(F);
913
913
  try {
914
914
  var q = k.objectStore(m._dbInfo.storeName);
915
915
  B === null && (B = void 0);
916
- var J = q.put(B, n);
916
+ var j = q.put(B, n);
917
917
  k.oncomplete = function() {
918
918
  B === void 0 && (B = null), o(B);
919
919
  }, k.onabort = k.onerror = function() {
920
- var p = J.error ? J.error : J.transaction.error;
920
+ var p = j.error ? j.error : j.transaction.error;
921
921
  P(p);
922
922
  };
923
923
  } catch (p) {
@@ -933,7 +933,7 @@ var nt = { exports: {} };
933
933
  n = r(n);
934
934
  var m = new d(function(v, o) {
935
935
  a.ready().then(function() {
936
- W(a._dbInfo, b, function(P, R) {
936
+ W(a._dbInfo, S, function(P, R) {
937
937
  if (P)
938
938
  return o(P);
939
939
  try {
@@ -957,7 +957,7 @@ var nt = { exports: {} };
957
957
  function Fe(n) {
958
958
  var c = this, a = new d(function(m, v) {
959
959
  c.ready().then(function() {
960
- W(c._dbInfo, b, function(o, P) {
960
+ W(c._dbInfo, S, function(o, P) {
961
961
  if (o)
962
962
  return v(o);
963
963
  try {
@@ -979,7 +979,7 @@ var nt = { exports: {} };
979
979
  function tr(n) {
980
980
  var c = this, a = new d(function(m, v) {
981
981
  c.ready().then(function() {
982
- W(c._dbInfo, L, function(o, P) {
982
+ W(c._dbInfo, N, function(o, P) {
983
983
  if (o)
984
984
  return v(o);
985
985
  try {
@@ -1004,7 +1004,7 @@ var nt = { exports: {} };
1004
1004
  return;
1005
1005
  }
1006
1006
  a.ready().then(function() {
1007
- W(a._dbInfo, L, function(P, R) {
1007
+ W(a._dbInfo, N, function(P, R) {
1008
1008
  if (P)
1009
1009
  return o(P);
1010
1010
  try {
@@ -1030,7 +1030,7 @@ var nt = { exports: {} };
1030
1030
  function Ce(n) {
1031
1031
  var c = this, a = new d(function(m, v) {
1032
1032
  c.ready().then(function() {
1033
- W(c._dbInfo, L, function(o, P) {
1033
+ W(c._dbInfo, N, function(o, P) {
1034
1034
  if (o)
1035
1035
  return v(o);
1036
1036
  try {
@@ -1054,7 +1054,7 @@ var nt = { exports: {} };
1054
1054
  return h(a, n), a;
1055
1055
  }
1056
1056
  function ar(n, c) {
1057
- c = y.apply(this, arguments);
1057
+ c = w.apply(this, arguments);
1058
1058
  var a = this.config();
1059
1059
  n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
1060
1060
  var m = this, v;
@@ -1071,12 +1071,12 @@ var nt = { exports: {} };
1071
1071
  n.storeName ? v = P.then(function(R) {
1072
1072
  if (R.objectStoreNames.contains(n.storeName)) {
1073
1073
  var B = R.version + 1;
1074
- s(n);
1074
+ f(n);
1075
1075
  var F = E[n.name], k = F.forages;
1076
1076
  R.close();
1077
1077
  for (var q = 0; q < k.length; q++) {
1078
- var J = k[q];
1079
- J._dbInfo.db = null, J._dbInfo.version = B;
1078
+ var j = k[q];
1079
+ j._dbInfo.db = null, j._dbInfo.version = B;
1080
1080
  }
1081
1081
  var p = new d(function(te, fe) {
1082
1082
  var ae = _.open(n.name, B);
@@ -1095,22 +1095,22 @@ var nt = { exports: {} };
1095
1095
  F.db = te;
1096
1096
  for (var fe = 0; fe < k.length; fe++) {
1097
1097
  var ae = k[fe];
1098
- ae._dbInfo.db = te, A(ae._dbInfo);
1098
+ ae._dbInfo.db = te, y(ae._dbInfo);
1099
1099
  }
1100
1100
  }).catch(function(te) {
1101
- throw (j(n, te) || d.resolve()).catch(function() {
1101
+ throw (J(n, te) || d.resolve()).catch(function() {
1102
1102
  }), te;
1103
1103
  });
1104
1104
  }
1105
1105
  }) : v = P.then(function(R) {
1106
- s(n);
1106
+ f(n);
1107
1107
  var B = E[n.name], F = B.forages;
1108
1108
  R.close();
1109
1109
  for (var k = 0; k < F.length; k++) {
1110
1110
  var q = F[k];
1111
1111
  q._dbInfo.db = null;
1112
1112
  }
1113
- var J = new d(function(p, te) {
1113
+ var j = new d(function(p, te) {
1114
1114
  var fe = _.deleteDatabase(n.name);
1115
1115
  fe.onerror = function() {
1116
1116
  var ae = fe.result;
@@ -1122,14 +1122,14 @@ var nt = { exports: {} };
1122
1122
  ae && ae.close(), p(ae);
1123
1123
  };
1124
1124
  });
1125
- return J.then(function(p) {
1125
+ return j.then(function(p) {
1126
1126
  B.db = p;
1127
1127
  for (var te = 0; te < F.length; te++) {
1128
1128
  var fe = F[te];
1129
- A(fe._dbInfo);
1129
+ y(fe._dbInfo);
1130
1130
  }
1131
1131
  }).catch(function(p) {
1132
- throw (j(n, p) || d.resolve()).catch(function() {
1132
+ throw (J(n, p) || d.resolve()).catch(function() {
1133
1133
  }), p;
1134
1134
  });
1135
1135
  });
@@ -1287,9 +1287,9 @@ var nt = { exports: {} };
1287
1287
  var P = a._dbInfo;
1288
1288
  P.db.transaction(function(R) {
1289
1289
  xe(R, P, "SELECT * FROM " + P.storeName, [], function(B, F) {
1290
- for (var k = F.rows, q = k.length, J = 0; J < q; J++) {
1291
- var p = k.item(J), te = p.value;
1292
- if (te && (te = P.serializer.deserialize(te)), te = n(te, p.key, J + 1), te !== void 0) {
1290
+ for (var k = F.rows, q = k.length, j = 0; j < q; j++) {
1291
+ var p = k.item(j), te = p.value;
1292
+ if (te && (te = P.serializer.deserialize(te)), te = n(te, p.key, j + 1), te !== void 0) {
1293
1293
  v(te);
1294
1294
  return;
1295
1295
  }
@@ -1311,19 +1311,19 @@ var nt = { exports: {} };
1311
1311
  c === void 0 && (c = null);
1312
1312
  var B = c, F = v._dbInfo;
1313
1313
  F.serializer.serialize(c, function(k, q) {
1314
- q ? R(q) : F.db.transaction(function(J) {
1315
- xe(J, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
1314
+ q ? R(q) : F.db.transaction(function(j) {
1315
+ xe(j, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
1316
1316
  P(B);
1317
1317
  }, function(p, te) {
1318
1318
  R(te);
1319
1319
  });
1320
- }, function(J) {
1321
- if (J.code === J.QUOTA_ERR) {
1320
+ }, function(j) {
1321
+ if (j.code === j.QUOTA_ERR) {
1322
1322
  if (m > 0) {
1323
1323
  P(Ur.apply(v, [n, B, a, m - 1]));
1324
1324
  return;
1325
1325
  }
1326
- R(J);
1326
+ R(j);
1327
1327
  }
1328
1328
  });
1329
1329
  });
@@ -1434,7 +1434,7 @@ var nt = { exports: {} };
1434
1434
  });
1435
1435
  }
1436
1436
  function bt(n, c) {
1437
- c = y.apply(this, arguments);
1437
+ c = w.apply(this, arguments);
1438
1438
  var a = this.config();
1439
1439
  n = typeof n != "function" && n || {}, n.name || (n.name = n.name || a.name, n.storeName = n.storeName || a.storeName);
1440
1440
  var m = this, v;
@@ -1456,7 +1456,7 @@ var nt = { exports: {} };
1456
1456
  });
1457
1457
  });
1458
1458
  }
1459
- for (var k = [], q = 0, J = o.storeNames.length; q < J; q++)
1459
+ for (var k = [], q = 0, j = o.storeNames.length; q < j; q++)
1460
1460
  k.push(F(o.storeNames[q]));
1461
1461
  d.all(k).then(function() {
1462
1462
  P();
@@ -1604,7 +1604,7 @@ var nt = { exports: {} };
1604
1604
  return h(v, a), v;
1605
1605
  }
1606
1606
  function Rt(n, c) {
1607
- if (c = y.apply(this, arguments), n = typeof n != "function" && n || {}, !n.name) {
1607
+ if (c = w.apply(this, arguments), n = typeof n != "function" && n || {}, !n.name) {
1608
1608
  var a = this.config();
1609
1609
  n.name = n.name || a.name, n.storeName = n.storeName || a.storeName;
1610
1610
  }
@@ -1675,7 +1675,7 @@ var nt = { exports: {} };
1675
1675
  }
1676
1676
  var Wt = function() {
1677
1677
  function n(c) {
1678
- D(this, n);
1678
+ I(this, n);
1679
1679
  for (var a in Ge)
1680
1680
  if (Ge.hasOwnProperty(a)) {
1681
1681
  var m = Ge[a], v = m._driver;
@@ -1704,7 +1704,7 @@ var nt = { exports: {} };
1704
1704
  R(F);
1705
1705
  return;
1706
1706
  }
1707
- for (var k = fr.concat("_initStorage"), q = 0, J = k.length; q < J; q++) {
1707
+ for (var k = fr.concat("_initStorage"), q = 0, j = k.length; q < j; q++) {
1708
1708
  var p = k[q], te = !$t(Qe, p);
1709
1709
  if ((te || a[p]) && typeof a[p] != "function") {
1710
1710
  R(F);
@@ -1757,11 +1757,11 @@ var nt = { exports: {} };
1757
1757
  }
1758
1758
  function F(q) {
1759
1759
  return function() {
1760
- var J = 0;
1760
+ var j = 0;
1761
1761
  function p() {
1762
- for (; J < q.length; ) {
1763
- var te = q[J];
1764
- return J++, o._dbInfo = null, o._ready = null, o.getDriver(te).then(B).catch(p);
1762
+ for (; j < q.length; ) {
1763
+ var te = q[j];
1764
+ return j++, o._dbInfo = null, o._ready = null, o.getDriver(te).then(B).catch(p);
1765
1765
  }
1766
1766
  R();
1767
1767
  var fe = new Error("No available storage method found.");
@@ -1775,8 +1775,8 @@ var nt = { exports: {} };
1775
1775
  }) : d.resolve();
1776
1776
  return this._driverSet = k.then(function() {
1777
1777
  var q = P[0];
1778
- return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(J) {
1779
- o._driver = J._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(P);
1778
+ return o._dbInfo = null, o._ready = null, o.getDriver(q).then(function(j) {
1779
+ o._driver = j._driver, R(), o._wrapLibraryMethodsWithReady(), o._initDriver = F(P);
1780
1780
  });
1781
1781
  }).catch(function() {
1782
1782
  R();
@@ -1800,7 +1800,7 @@ var nt = { exports: {} };
1800
1800
  return new n(a);
1801
1801
  }, n;
1802
1802
  }(), qt = new Wt();
1803
- S.exports = qt;
1803
+ A.exports = qt;
1804
1804
  }, { 3: 3 }] }, {}, [4])(4);
1805
1805
  });
1806
1806
  })(nt);
@@ -1837,26 +1837,26 @@ function ve() {
1837
1837
  return (pe == null || pe.config.name != e) && (pe = at.createInstance({ name: e })), pe;
1838
1838
  }
1839
1839
  function ma() {
1840
- async function e(f) {
1840
+ async function e(s) {
1841
1841
  const g = ve();
1842
- (await g.keys()).filter((_) => _.startsWith(f)).forEach((_) => {
1842
+ (await g.keys()).filter((_) => _.startsWith(s)).forEach((_) => {
1843
1843
  g.removeItem(_);
1844
1844
  });
1845
1845
  }
1846
- async function t(f) {
1847
- return await ve().getItem(f);
1846
+ async function t(s) {
1847
+ return await ve().getItem(s);
1848
1848
  }
1849
- async function l(f) {
1850
- return await ve().removeItem(f);
1849
+ async function l(s) {
1850
+ return await ve().removeItem(s);
1851
1851
  }
1852
- async function S(f, g) {
1853
- await ve().setItem(g, f);
1852
+ async function A(s, g) {
1853
+ await ve().setItem(g, s);
1854
1854
  }
1855
1855
  return {
1856
1856
  clearAsync: e,
1857
1857
  getAsync: t,
1858
1858
  removeAsync: l,
1859
- saveAsync: S
1859
+ saveAsync: A
1860
1860
  };
1861
1861
  }
1862
1862
  let rr;
@@ -1873,8 +1873,8 @@ function wn(e) {
1873
1873
  }), rr;
1874
1874
  }
1875
1875
  function bn(e) {
1876
- var l, S, f, g, D;
1877
- e.storeMode ?? (e.storeMode = ((S = (l = e.navigation) == null ? void 0 : l.findItem(e.nav)) == null ? void 0 : S.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((g = (f = e.navigation) == null ? void 0 : f.findItem(e.nav)) == null ? void 0 : g.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((D = e.navigation) == null ? void 0 : D.findStoreName(e.nav)) ?? e.nav);
1876
+ var l, A, s, g, I;
1877
+ e.storeMode ?? (e.storeMode = ((A = (l = e.navigation) == null ? void 0 : l.findItem(e.nav)) == null ? void 0 : A.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((g = (s = e.navigation) == null ? void 0 : s.findItem(e.nav)) == null ? void 0 : g.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((I = e.navigation) == null ? void 0 : I.findStoreName(e.nav)) ?? e.nav);
1878
1878
  const t = { ...e, storeName: e.storeName ?? "" };
1879
1879
  if (console.log("creating store def"), console.log(t), e.storeName == null)
1880
1880
  throw new Error("no store name provided");
@@ -1894,8 +1894,8 @@ const Sn = (e) => {
1894
1894
  if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Ue(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Ue(t, e.id)), e.params != null) {
1895
1895
  t ?? (t = "");
1896
1896
  let l = new URLSearchParams();
1897
- Object.entries(e.params).sort(Re.firstBy((f) => f[0])).forEach((f) => {
1898
- f[1] != null && l.append(f[0], f[1].toString());
1897
+ Object.entries(e.params).sort(Re.firstBy((s) => s[0])).forEach((s) => {
1898
+ s[1] != null && l.append(s[0], s[1].toString());
1899
1899
  }), t = `${t}?${l.toString()}`;
1900
1900
  }
1901
1901
  return e.finalUrl = t, e.finalUrl ?? "";
@@ -1903,45 +1903,45 @@ const Sn = (e) => {
1903
1903
  function An(e) {
1904
1904
  return pr(e.storeName, () => {
1905
1905
  var u;
1906
- const t = he.utc().toSeconds() / 86400, l = z({}), S = z({}), f = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? Sn;
1907
- function D(r) {
1906
+ const t = he.utc().toSeconds() / 86400, l = z({}), A = z({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? Sn;
1907
+ function I(r) {
1908
1908
  var i, E;
1909
- let y = "";
1910
- const x = r.params ?? {};
1911
- return x != null && (y = Object.entries(x).sort(Re.firstBy((w) => w[0])).map((w) => `${w[0]}=${JSON.stringify(w[1])}`).join("&")), `${e.storeName ?? "base"}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((E = r.data) == null ? void 0 : E.id) ?? "no-item-id"}_${y ?? "no-params"}`;
1909
+ let w = "";
1910
+ const D = r.params ?? {};
1911
+ return D != null && (w = Object.entries(D).sort(Re.firstBy((b) => b[0])).map((b) => `${b[0]}=${JSON.stringify(b[1])}`).join("&")), `${e.storeName ?? "base"}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}_${r.id ?? ((E = r.data) == null ? void 0 : E.id) ?? "no-item-id"}_${w ?? "no-params"}`;
1912
1912
  }
1913
1913
  async function C(r) {
1914
1914
  r.additionalUrl ?? (r.additionalUrl = "/getAll"), g(r);
1915
- const y = D(r), x = r.refresh;
1916
- if (!x && l.value[y] !== void 0)
1917
- return l.value[y];
1918
- if (!x && f == !0) {
1919
- const i = await ve().getItem(y);
1915
+ const w = I(r), D = r.refresh;
1916
+ if (!D && l.value[w] !== void 0)
1917
+ return l.value[w];
1918
+ if (!D && s == !0) {
1919
+ const i = await ve().getItem(w);
1920
1920
  if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
1921
- return l.value[y] = i, i;
1921
+ return l.value[w] = i, i;
1922
1922
  }
1923
1923
  if (e.api == null)
1924
- return l.value[y];
1924
+ return l.value[w];
1925
1925
  try {
1926
- let i = S.value[y];
1927
- i == null && (i = new Promise(async (w, L) => {
1928
- var b;
1926
+ let i = A.value[w];
1927
+ i == null && (i = new Promise(async (b, N) => {
1928
+ var S;
1929
1929
  try {
1930
- const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), I = {
1930
+ const T = await ((S = e.api) == null ? void 0 : S.getAll(r)), x = {
1931
1931
  meta: { storedOn: t.toString() },
1932
1932
  data: T == null ? void 0 : T.data,
1933
1933
  count: T == null ? void 0 : T.count,
1934
1934
  filters: (T == null ? void 0 : T.filters) ?? []
1935
1935
  };
1936
- f == !0 && await ve().setItem(y, I), w(I);
1936
+ s == !0 && await ve().setItem(w, x), b(x);
1937
1937
  } catch (T) {
1938
- L(T);
1938
+ N(T);
1939
1939
  } finally {
1940
- delete S.value[y];
1940
+ delete A.value[w];
1941
1941
  }
1942
- }), S.value[y] = i);
1942
+ }), A.value[w] = i);
1943
1943
  const E = await i;
1944
- return l.value[y] = E, {
1944
+ return l.value[w] = E, {
1945
1945
  data: E == null ? void 0 : E.data,
1946
1946
  filters: E == null ? void 0 : E.filters,
1947
1947
  count: E == null ? void 0 : E.count
@@ -1952,35 +1952,35 @@ function An(e) {
1952
1952
  }
1953
1953
  async function _(r) {
1954
1954
  r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
1955
- const y = D(r), x = r.refresh;
1956
- if (!x && l.value[y] !== void 0)
1957
- return l.value[y];
1958
- if (!x && f == !0) {
1959
- const i = await ve().getItem(y);
1955
+ const w = I(r), D = r.refresh;
1956
+ if (!D && l.value[w] !== void 0)
1957
+ return l.value[w];
1958
+ if (!D && s == !0) {
1959
+ const i = await ve().getItem(w);
1960
1960
  if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
1961
- return l.value[y] = i, { data: i.data };
1961
+ return l.value[w] = i, { data: i.data };
1962
1962
  }
1963
1963
  if (e.api == null)
1964
- return l.value[y];
1964
+ return l.value[w];
1965
1965
  try {
1966
- let i = S.value[y];
1967
- i == null && (i = new Promise(async (w, L) => {
1968
- var b;
1966
+ let i = A.value[w];
1967
+ i == null && (i = new Promise(async (b, N) => {
1968
+ var S;
1969
1969
  try {
1970
- let T = await ((b = e.api) == null ? void 0 : b.get(r));
1971
- const I = {
1970
+ let T = await ((S = e.api) == null ? void 0 : S.get(r));
1971
+ const x = {
1972
1972
  meta: { storedOn: t.toString() },
1973
1973
  data: T == null ? void 0 : T.data
1974
1974
  };
1975
- f == !0 && await ve().setItem(y, I), w(I);
1975
+ s == !0 && await ve().setItem(w, x), b(x);
1976
1976
  } catch (T) {
1977
- L(T);
1977
+ N(T);
1978
1978
  } finally {
1979
- delete S.value[y];
1979
+ delete A.value[w];
1980
1980
  }
1981
- }), S.value[y] = i);
1981
+ }), A.value[w] = i);
1982
1982
  const E = await i;
1983
- return l.value[y] = E, { data: E.data };
1983
+ return l.value[w] = E, { data: E.data };
1984
1984
  } catch (i) {
1985
1985
  throw i;
1986
1986
  }
@@ -1988,60 +1988,60 @@ function An(e) {
1988
1988
  async function M(r) {
1989
1989
  var i;
1990
1990
  r.additionalUrl ?? (r.additionalUrl = "/patch"), g(r);
1991
- const y = D(r);
1992
- let x;
1991
+ const w = I(r);
1992
+ let D;
1993
1993
  if (e.api != null)
1994
1994
  try {
1995
1995
  let E = await e.api.patch(r);
1996
- x = E == null ? void 0 : E.data;
1996
+ D = E == null ? void 0 : E.data;
1997
1997
  } catch (E) {
1998
1998
  throw E;
1999
1999
  }
2000
2000
  else
2001
- x = r.data;
2002
- if (x != null) {
2001
+ D = r.data;
2002
+ if (D != null) {
2003
2003
  let E = {
2004
2004
  meta: { storedOn: t.toString() },
2005
- data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...x }
2005
+ data: { ...(i = l.value[w]) == null ? void 0 : i.data, ...D }
2006
2006
  };
2007
- return l.value[y] = E, f == !0 && await ve().setItem(y, E), x.id != null && x.rowVersion != null && Object.entries(l.value).forEach((L) => {
2008
- const b = L[1].data;
2009
- if (b != null)
2010
- if (Array.isArray(b))
2011
- for (let T = 0; T < b.length; T++)
2012
- b[T].id == x.id && b.splice(T, 1, E.data);
2007
+ return l.value[w] = E, s == !0 && await ve().setItem(w, E), D.id != null && D.rowVersion != null && Object.entries(l.value).forEach((N) => {
2008
+ const S = N[1].data;
2009
+ if (S != null)
2010
+ if (Array.isArray(S))
2011
+ for (let T = 0; T < S.length; T++)
2012
+ S[T].id == D.id && S.splice(T, 1, E.data);
2013
2013
  else
2014
- b.id == x.id && (l.value[L[0]] = E);
2014
+ S.id == D.id && (l.value[N[0]] = E);
2015
2015
  }), E.data;
2016
2016
  }
2017
- return x;
2017
+ return D;
2018
2018
  }
2019
2019
  async function $(r) {
2020
2020
  r.additionalUrl ?? (r.additionalUrl = "/post"), g(r);
2021
- const y = D(r);
2022
- let x;
2021
+ const w = I(r);
2022
+ let D;
2023
2023
  if (e.api != null)
2024
2024
  try {
2025
2025
  let i = await e.api.post(r);
2026
- x = i == null ? void 0 : i.data;
2026
+ D = i == null ? void 0 : i.data;
2027
2027
  } catch (i) {
2028
2028
  throw i;
2029
2029
  }
2030
2030
  else
2031
- x = r.data;
2032
- if (x != null) {
2031
+ D = r.data;
2032
+ if (D != null) {
2033
2033
  let i = {
2034
2034
  meta: { storedOn: t.toString() },
2035
- data: x
2035
+ data: D
2036
2036
  };
2037
- return f == !0 && await ve().setItem(y, i), l.value[y] = i, i.data;
2037
+ return s == !0 && await ve().setItem(w, i), l.value[w] = i, i.data;
2038
2038
  }
2039
- return x;
2039
+ return D;
2040
2040
  }
2041
2041
  async function d(r) {
2042
2042
  var i;
2043
2043
  r.additionalUrl ?? (r.additionalUrl = "/delete"), g(r);
2044
- const y = D(r);
2044
+ const w = I(r);
2045
2045
  if (e.api != null)
2046
2046
  try {
2047
2047
  let E = await e.api.deleteItem(r);
@@ -2050,25 +2050,25 @@ function An(e) {
2050
2050
  } catch (E) {
2051
2051
  throw E;
2052
2052
  }
2053
- delete l.value[y];
2054
- const x = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
2055
- x != null && Object.entries(l.value).forEach((w) => {
2056
- const L = w[1].data;
2057
- if (L != null)
2058
- if (Array.isArray(L))
2059
- for (let b = 0; b < L.length; b++)
2060
- L[b].id == x && L.splice(b, 1);
2053
+ delete l.value[w];
2054
+ const D = ((i = r.data) == null ? void 0 : i.id) ?? r.id;
2055
+ D != null && Object.entries(l.value).forEach((b) => {
2056
+ const N = b[1].data;
2057
+ if (N != null)
2058
+ if (Array.isArray(N))
2059
+ for (let S = 0; S < N.length; S++)
2060
+ N[S].id == D && N.splice(S, 1);
2061
2061
  else
2062
- delete l.value[w[0]];
2063
- }), f == !0 && await ve().removeItem(y);
2062
+ delete l.value[b[0]];
2063
+ }), s == !0 && await ve().removeItem(w);
2064
2064
  }
2065
2065
  async function h(r) {
2066
2066
  if (r.additionalUrl ?? (r.additionalUrl = `/patch/restore?id=${r.data.id}`), g(r), e.api != null)
2067
2067
  try {
2068
- let y = await e.api.patch(r);
2069
- return y == null ? void 0 : y.data;
2070
- } catch (y) {
2071
- throw y;
2068
+ let w = await e.api.patch(r);
2069
+ return w == null ? void 0 : w.data;
2070
+ } catch (w) {
2071
+ throw w;
2072
2072
  }
2073
2073
  }
2074
2074
  return {
@@ -2081,14 +2081,14 @@ function An(e) {
2081
2081
  searchMemory: l,
2082
2082
  //mainly for testing
2083
2083
  currentTimeStampDays: t,
2084
- promiseMemory: S,
2085
- cacheLocally: f
2084
+ promiseMemory: A,
2085
+ cacheLocally: s
2086
2086
  };
2087
2087
  });
2088
2088
  }
2089
2089
  function qr(e) {
2090
2090
  return pr(e.storeName, () => {
2091
- const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, f = z(), g = z(), D = z({}), C = e.storageMode == "local-cache";
2091
+ const t = z(), l = z(0), A = he.utc().toSeconds() / 3600, s = z(), g = z(), I = z({}), C = e.storageMode == "local-cache";
2092
2092
  function _() {
2093
2093
  var i;
2094
2094
  return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
@@ -2103,98 +2103,106 @@ function qr(e) {
2103
2103
  }
2104
2104
  function $(i) {
2105
2105
  const E = _();
2106
- return D.value[E] || (D.value[E] = new Promise(async (w, L) => {
2107
- var b, T;
2106
+ return I.value[E] || (I.value[E] = new Promise(async (b, N) => {
2107
+ var S, T;
2108
2108
  try {
2109
- let I = await ((T = e.api) == null ? void 0 : T.getAll({
2109
+ let x = await ((T = e.api) == null ? void 0 : T.getAll({
2110
2110
  additionalUrl: "/getAll",
2111
2111
  nav: i.nav,
2112
2112
  params: {
2113
- lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? ln()
2113
+ lastUpdate: ((S = g.value) == null ? void 0 : S.lastUpdate) ?? ln()
2114
2114
  }
2115
2115
  }));
2116
- console.log("res"), console.log(I), I == null ? L(I) : (t.value ?? (t.value = []), I.data.forEach((N) => {
2117
- var A, j;
2118
- const s = t.value.findIndex((X) => X.id == N.id);
2119
- s >= 0 ? (A = t.value) == null || A.splice(s, 1, N) : (j = t.value) == null || j.push(N);
2116
+ console.log("res"), console.log(x), x == null ? N(x) : (t.value ?? (t.value = []), x.data.forEach((L) => {
2117
+ var y, J;
2118
+ const f = t.value.findIndex((X) => X.id == L.id);
2119
+ f >= 0 ? (y = t.value) == null || y.splice(f, 1, L) : (J = t.value) == null || J.push(L);
2120
2120
  }), l.value = t.value.length, g.value = {
2121
2121
  lastUpdate: he.utc().toString(),
2122
- storedOn: S.toString()
2123
- }, await M(), console.log("resolving"), console.log(I), w(I));
2124
- } catch (I) {
2125
- L(I);
2122
+ storedOn: A.toString()
2123
+ }, await M(), b(x));
2124
+ } catch (x) {
2125
+ N(x);
2126
2126
  } finally {
2127
- delete D.value[E];
2127
+ delete I.value[E];
2128
2128
  }
2129
- })), D.value[E];
2129
+ })), I.value[E];
2130
2130
  }
2131
2131
  async function d(i) {
2132
- var L, b, T;
2133
- const E = _(), w = i.refresh;
2134
- if (console.log("getting all from"), console.log(E), !w && t.value != null)
2132
+ var T, x, L, f;
2133
+ const E = _(), b = i.refresh;
2134
+ if (console.log("getting all from"), console.log(E), !b && t.value != null)
2135
2135
  return console.log("not refresh and ditems not null"), {
2136
- count: (L = t.value) == null ? void 0 : L.length,
2136
+ count: (T = t.value) == null ? void 0 : T.length,
2137
2137
  data: t.value,
2138
2138
  filters: []
2139
2139
  };
2140
- if (!w && C == !0) {
2140
+ if (!b && C == !0) {
2141
2141
  console.log("not refresh and caching locally");
2142
- const I = await ve().getItem(E);
2143
- if (console.log(I), I != null && parseFloat(I.meta.storedOn) > S - 7)
2144
- return t.value = I.data, l.value = I.data.length, f.value = I.filters ?? [], g.value = I.meta, {
2145
- count: (b = t.value) == null ? void 0 : b.length,
2142
+ const y = await ve().getItem(E);
2143
+ if (console.log(y), y != null && parseFloat(y.meta.storedOn) > A - 7)
2144
+ return t.value = y.data, l.value = y.data.length, s.value = y.filters ?? [], g.value = y.meta, {
2145
+ count: (x = t.value) == null ? void 0 : x.length,
2146
2146
  data: t.value ?? [],
2147
2147
  filters: []
2148
2148
  };
2149
2149
  }
2150
2150
  if (e.api == null)
2151
2151
  return console.log("no api"), {
2152
- count: (T = t.value) == null ? void 0 : T.length,
2152
+ count: (L = t.value) == null ? void 0 : L.length,
2153
2153
  data: t.value ?? [],
2154
- filters: f.value
2154
+ filters: s.value
2155
2155
  };
2156
2156
  console.log("setting dataitems"), t.value ?? (t.value = []);
2157
2157
  try {
2158
- return console.log("create refresh promise"), await $(i);
2159
- } catch (I) {
2160
- let N = I;
2161
- throw new Error(N.message ?? "Problem");
2158
+ console.log("create refresh promise");
2159
+ var N = await $(i);
2160
+ console.log(N);
2161
+ var S = {
2162
+ count: (f = t.value) == null ? void 0 : f.length,
2163
+ data: t.value ?? [],
2164
+ filters: s.value
2165
+ };
2166
+ return console.log(S), S;
2167
+ } catch (y) {
2168
+ let J = y;
2169
+ throw new Error(J.message ?? "Problem");
2162
2170
  }
2163
2171
  }
2164
2172
  async function h(i) {
2165
- var b, T, I, N;
2166
- const E = _(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
2167
- if (w == null)
2173
+ var S, T, x, L;
2174
+ const E = _(), b = i.id ?? ((S = i.data) == null ? void 0 : S.id);
2175
+ if (b == null)
2168
2176
  throw new Error("no id provided");
2169
- let L = i.refresh;
2170
- if (!L && t.value != null) {
2171
- const s = t.value.find((A) => A.id == w);
2172
- if (s != null)
2173
- return { data: s };
2177
+ let N = i.refresh;
2178
+ if (!N && t.value != null) {
2179
+ const f = t.value.find((y) => y.id == b);
2180
+ if (f != null)
2181
+ return { data: f };
2174
2182
  }
2175
- if (!L && C == !0) {
2176
- const s = await ve().getItem(E);
2177
- if (s != null && parseFloat(s.meta.storedOn) > S - 12) {
2178
- t.value = s.data, l.value = s.data.length, f.value = s.filters ?? [], g.value = s.meta;
2179
- let A = (T = t.value) == null ? void 0 : T.find((j) => j.id == i.id);
2180
- if (A != null)
2181
- return { data: A };
2183
+ if (!N && C == !0) {
2184
+ const f = await ve().getItem(E);
2185
+ if (f != null && parseFloat(f.meta.storedOn) > A - 12) {
2186
+ t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
2187
+ let y = (T = t.value) == null ? void 0 : T.find((J) => J.id == i.id);
2188
+ if (y != null)
2189
+ return { data: y };
2182
2190
  }
2183
2191
  }
2184
2192
  if (e.api == null)
2185
2193
  return {
2186
- data: (I = t.value) == null ? void 0 : I.find((s) => s.id == i.id)
2194
+ data: (x = t.value) == null ? void 0 : x.find((f) => f.id == i.id)
2187
2195
  };
2188
2196
  t.value ?? (t.value = []);
2189
2197
  try {
2190
- return await $(i), { data: (N = t.value) == null ? void 0 : N.find((s) => s.id == i.id) };
2191
- } catch (s) {
2192
- let A = s;
2193
- throw new Error(A.message ?? "Problem");
2198
+ return await $(i), { data: (L = t.value) == null ? void 0 : L.find((f) => f.id == i.id) };
2199
+ } catch (f) {
2200
+ let y = f;
2201
+ throw new Error(y.message ?? "Problem");
2194
2202
  }
2195
2203
  }
2196
2204
  async function u(i) {
2197
- var w, L, b;
2205
+ var b, N, S;
2198
2206
  i.additionalUrl ?? (i.additionalUrl = "/patch");
2199
2207
  let E;
2200
2208
  if (e.api != null)
@@ -2202,81 +2210,81 @@ function qr(e) {
2202
2210
  let T = await e.api.patch(i);
2203
2211
  E = { ...i.data, ...T == null ? void 0 : T.data };
2204
2212
  } catch (T) {
2205
- let I = T;
2206
- throw new Error(I.message ?? "Patch Problem");
2213
+ let x = T;
2214
+ throw new Error(x.message ?? "Patch Problem");
2207
2215
  }
2208
2216
  else
2209
2217
  E = i.data;
2210
2218
  if (E != null) {
2211
- let T = (w = t.value) == null ? void 0 : w.findIndex((I) => I.id == E.id);
2212
- T != null && T >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(T, 1, E), await M());
2219
+ let T = (b = t.value) == null ? void 0 : b.findIndex((x) => x.id == E.id);
2220
+ T != null && T >= 0 && (t.value ?? (t.value = []), (N = t.value) == null || N.splice(T, 1, E), await M());
2213
2221
  }
2214
- return (b = t.value) == null ? void 0 : b.find((T) => T.id == (i.id ?? i.data.id));
2222
+ return (S = t.value) == null ? void 0 : S.find((T) => T.id == (i.id ?? i.data.id));
2215
2223
  }
2216
2224
  async function r(i) {
2217
- var w, L;
2225
+ var b, N;
2218
2226
  i.additionalUrl ?? (i.additionalUrl = "/post");
2219
2227
  let E;
2220
2228
  if (e.api != null)
2221
2229
  try {
2222
- let b = await e.api.post(i);
2223
- E = b == null ? void 0 : b.data;
2224
- } catch (b) {
2225
- let T = b;
2230
+ let S = await e.api.post(i);
2231
+ E = S == null ? void 0 : S.data;
2232
+ } catch (S) {
2233
+ let T = S;
2226
2234
  throw new Error(T.message ?? "Patch Problem");
2227
2235
  }
2228
2236
  else
2229
2237
  E = i.data;
2230
- return E != null && (t.value ?? (t.value = []), (w = t.value) == null || w.unshift(E), l.value += 1, await M()), (L = t.value) == null ? void 0 : L.find((b) => b.id == (i.id ?? i.data.id));
2238
+ return E != null && (t.value ?? (t.value = []), (b = t.value) == null || b.unshift(E), l.value += 1, await M()), (N = t.value) == null ? void 0 : N.find((S) => S.id == (i.id ?? i.data.id));
2231
2239
  }
2232
- async function y(i) {
2233
- var w, L;
2240
+ async function w(i) {
2241
+ var b, N;
2234
2242
  if (i.additionalUrl ?? (i.additionalUrl = "/delete"), e.api != null)
2235
2243
  try {
2236
- let b = await e.api.deleteItem(i);
2237
- if (b != null)
2238
- return b;
2239
- } catch (b) {
2240
- let T = b;
2244
+ let S = await e.api.deleteItem(i);
2245
+ if (S != null)
2246
+ return S;
2247
+ } catch (S) {
2248
+ let T = S;
2241
2249
  throw new Error(T.message ?? "Patch Problem");
2242
2250
  }
2243
2251
  const E = i.id ?? i.data.id;
2244
2252
  if (E != null) {
2245
- let b = (w = t.value) == null ? void 0 : w.findIndex((T) => T.id == E);
2246
- b != null && b >= 0 && (t.value ?? (t.value = []), (L = t.value) == null || L.splice(b, 1), await M());
2253
+ let S = (b = t.value) == null ? void 0 : b.findIndex((T) => T.id == E);
2254
+ S != null && S >= 0 && (t.value ?? (t.value = []), (N = t.value) == null || N.splice(S, 1), await M());
2247
2255
  }
2248
2256
  }
2249
- async function x(i) {
2257
+ async function D(i) {
2250
2258
  var E;
2251
2259
  if (i.additionalUrl ?? (i.additionalUrl = `/patch/restore?id=${i.data.id}`), e.api != null)
2252
2260
  try {
2253
2261
  await e.api.patch(i);
2254
- } catch (w) {
2255
- let L = w;
2256
- throw new Error(L.message ?? "Patch Problem");
2262
+ } catch (b) {
2263
+ let N = b;
2264
+ throw new Error(N.message ?? "Patch Problem");
2257
2265
  }
2258
2266
  try {
2259
2267
  i.additionalUrl = "/getAll", await $(i);
2260
- } catch (w) {
2261
- let L = w;
2262
- throw new Error(L.message ?? "Problem");
2268
+ } catch (b) {
2269
+ let N = b;
2270
+ throw new Error(N.message ?? "Problem");
2263
2271
  }
2264
- return (E = t.value) == null ? void 0 : E.find((w) => w.id == (i.id ?? i.data.id));
2272
+ return (E = t.value) == null ? void 0 : E.find((b) => b.id == (i.id ?? i.data.id));
2265
2273
  }
2266
2274
  return {
2267
- deleteItem: y,
2275
+ deleteItem: w,
2268
2276
  get: h,
2269
2277
  getAll: d,
2270
2278
  patch: u,
2271
2279
  post: r,
2272
- restore: x,
2280
+ restore: D,
2273
2281
  //other stuff
2274
2282
  dataItems: t,
2275
2283
  count: l,
2276
- currentTimeStampHours: S,
2277
- filters: f,
2284
+ currentTimeStampHours: A,
2285
+ filters: s,
2278
2286
  meta: g,
2279
- promiseMemory: D,
2287
+ promiseMemory: I,
2280
2288
  cacheLocally: C
2281
2289
  };
2282
2290
  });
@@ -2286,179 +2294,179 @@ function Er() {
2286
2294
  return Ar;
2287
2295
  }
2288
2296
  function En(e) {
2289
- const t = (e == null ? void 0 : e.buildHeaders) ?? C, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? D, f = e == null ? void 0 : e.demo;
2297
+ const t = (e == null ? void 0 : e.buildHeaders) ?? C, l = (e == null ? void 0 : e.buildQuery) ?? g, A = (e == null ? void 0 : e.buildUrl) ?? I, s = e == null ? void 0 : e.demo;
2290
2298
  function g(u) {
2291
2299
  let r = new URLSearchParams();
2292
- return Object.entries(u).forEach((y) => {
2293
- y[1] != null && r.append(y[0], y[1]);
2294
- }), u.filterBy && r.set("filterBy", u.filterBy), u.includeCount && r.set("includeCount", u.includeCount.toString()), u.includeDetails != null && r.set("includeDetails", u.includeDetails.toString()), u.includeInactive && r.set("includeInactive", u.includeInactive.toString()), u.properties && r.set("properties", u.properties.toString()), u.query && r.set("query", u.query.toString()), u.searchString && r.set("searchString", u.searchString), u.sortOrder && r.set("sortOrder", u.sortOrder), u.sortBy && r.set("sortBy", u.sortBy), u.takeFrom && r.set("takeFrom", u.takeFrom.toString()), u.takeAmount && r.set("takeAmount", u.takeAmount.toString()), u.other && Object.entries(u.other).forEach((y) => {
2295
- y[1] != null && r.append(y[0], y[1].toString());
2300
+ return Object.entries(u).forEach((w) => {
2301
+ w[1] != null && r.append(w[0], w[1]);
2302
+ }), u.filterBy && r.set("filterBy", u.filterBy), u.includeCount && r.set("includeCount", u.includeCount.toString()), u.includeDetails != null && r.set("includeDetails", u.includeDetails.toString()), u.includeInactive && r.set("includeInactive", u.includeInactive.toString()), u.properties && r.set("properties", u.properties.toString()), u.query && r.set("query", u.query.toString()), u.searchString && r.set("searchString", u.searchString), u.sortOrder && r.set("sortOrder", u.sortOrder), u.sortBy && r.set("sortBy", u.sortBy), u.takeFrom && r.set("takeFrom", u.takeFrom.toString()), u.takeAmount && r.set("takeAmount", u.takeAmount.toString()), u.other && Object.entries(u.other).forEach((w) => {
2303
+ w[1] != null && r.append(w[0], w[1].toString());
2296
2304
  }), r.toString();
2297
2305
  }
2298
- function D(u) {
2299
- let r = Q(u.url) ?? void 0, y = Q(u.id);
2300
- return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r = Ue(r, u.additionalUrl)), y != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", y) : r = Ue(r, y)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
2306
+ function I(u) {
2307
+ let r = Q(u.url) ?? void 0, w = Q(u.id);
2308
+ return r == null && (e == null ? void 0 : e.findPath) != null && (r = e.findPath(u.nav)), u.additionalUrl != null && (r == null ? r = u.additionalUrl : r = Ue(r, u.additionalUrl)), w != null && (r != null && r.includes("{id}") ? r = r.replaceAll("{id}", w) : r = Ue(r, w)), u.params != null && (r = `${r}?${l(u.params)}`), u.finalUrl = r, u.finalUrl ?? "";
2301
2309
  }
2302
2310
  function C(u) {
2303
- var y, x;
2311
+ var w, D;
2304
2312
  let r = { ...u.headers };
2305
- return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((y = e == null ? void 0 : e.auth) == null ? void 0 : y.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(x = e == null ? void 0 : e.auth) == null ? void 0 : x.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
2313
+ return u.proxyID && (r.ManagedCompanyAccountID ?? (r.ManagedCompanyAccountID = u.proxyID)), (e == null ? void 0 : e.useBearerToken) != !1 && ((w = e == null ? void 0 : e.auth) == null ? void 0 : w.isLoggedIn.value) == !0 && (r.authorization ?? (r.authorization = `bearer ${(D = e == null ? void 0 : e.auth) == null ? void 0 : D.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
2306
2314
  }
2307
2315
  async function _(u) {
2308
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, x = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2316
+ const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, w = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2309
2317
  let i = u.finalUrl, E = u.headers;
2310
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
2311
- return console.log(`DEMO: Get from ${i}`), f.get(u);
2318
+ if (i == null && (i = A(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2319
+ return console.log(`DEMO: Get from ${i}`), s.get(u);
2312
2320
  console.log(`Get from ${i}`);
2313
- let w;
2321
+ let b;
2314
2322
  try {
2315
- if (w = await fetch(i, {
2323
+ if (b = await fetch(i, {
2316
2324
  method: "GET",
2317
2325
  mode: "cors",
2318
2326
  cache: "no-cache",
2319
2327
  headers: E
2320
- }), !w.ok) {
2321
- if (w.status == 401)
2328
+ }), !b.ok) {
2329
+ if (b.status == 401)
2322
2330
  throw {
2323
- code: w.status,
2331
+ code: b.status,
2324
2332
  name: "Unauthorized",
2325
- message: w.statusText
2333
+ message: b.statusText
2326
2334
  };
2327
- let L = await w.text();
2328
- throw new Error(L ?? w.statusText ?? "Get error");
2335
+ let N = await b.text();
2336
+ throw new Error(N ?? b.statusText ?? "Get error");
2329
2337
  }
2330
- if (x)
2331
- return await w.text();
2332
- if (y)
2333
- return await w.json();
2338
+ if (D)
2339
+ return await b.text();
2340
+ if (w)
2341
+ return await b.json();
2334
2342
  throw new Error();
2335
- } catch (L) {
2336
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2343
+ } catch (N) {
2344
+ const S = `${(b == null ? void 0 : b.status) ?? ""} ${(b == null ? void 0 : b.statusText) ?? ""} ${N.message}`;
2337
2345
  if (!r)
2338
2346
  return;
2339
- throw L.code == 401 ? L : new Error(b);
2347
+ throw N.code == 401 ? N : new Error(S);
2340
2348
  }
2341
2349
  }
2342
2350
  async function M(u) {
2343
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, x = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2351
+ const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, w = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2344
2352
  let i = u.finalUrl, E = u.headers;
2345
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
2346
- return console.log(`DEMO: Get all from ${i}`), f.getAll(u);
2353
+ if (i == null && (i = A(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2354
+ return console.log(`DEMO: Get all from ${i}`), s.getAll(u);
2347
2355
  console.log(`Get all from ${i}`);
2348
- let w;
2356
+ let b;
2349
2357
  try {
2350
- if (w = await fetch(i, {
2358
+ if (b = await fetch(i, {
2351
2359
  method: "GET",
2352
2360
  mode: "cors",
2353
2361
  cache: "no-cache",
2354
2362
  headers: E
2355
- }), !w.ok) {
2356
- if (w.status == 401)
2363
+ }), !b.ok) {
2364
+ if (b.status == 401)
2357
2365
  throw {
2358
- code: w.status,
2366
+ code: b.status,
2359
2367
  name: "Unauthorized",
2360
- message: w.statusText
2368
+ message: b.statusText
2361
2369
  };
2362
- let L = await w.text();
2363
- throw new Error(L ?? w.statusText ?? "Get all error");
2370
+ let N = await b.text();
2371
+ throw new Error(N ?? b.statusText ?? "Get all error");
2364
2372
  }
2365
- if (x)
2366
- return await w.text();
2367
- if (y)
2368
- return await w.json();
2373
+ if (D)
2374
+ return await b.text();
2375
+ if (w)
2376
+ return await b.json();
2369
2377
  throw new Error();
2370
- } catch (L) {
2371
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2378
+ } catch (N) {
2379
+ const S = `${(b == null ? void 0 : b.status) ?? ""} ${(b == null ? void 0 : b.statusText) ?? ""} ${N.message}`;
2372
2380
  if (!r)
2373
2381
  return;
2374
- throw L.code == 401 ? L : new Error(b);
2382
+ throw N.code == 401 ? N : new Error(S);
2375
2383
  }
2376
2384
  }
2377
2385
  async function $(u) {
2378
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, x = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2386
+ const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, w = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2379
2387
  let i = u.finalUrl, E = u.headers;
2380
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
2381
- return console.log(`DEMO: Post to ${i}`), f.post(u);
2388
+ if (i == null && (i = A(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2389
+ return console.log(`DEMO: Post to ${i}`), s.post(u);
2382
2390
  console.log(`Post to ${i}`);
2383
- let w;
2391
+ let b;
2384
2392
  try {
2385
- if (w = await fetch(i, {
2393
+ if (b = await fetch(i, {
2386
2394
  method: "POST",
2387
2395
  mode: "cors",
2388
2396
  cache: "no-cache",
2389
2397
  headers: E,
2390
2398
  body: JSON.stringify(u.data)
2391
- }), !w.ok) {
2392
- if (w.status == 401)
2399
+ }), !b.ok) {
2400
+ if (b.status == 401)
2393
2401
  throw {
2394
- code: w.status,
2402
+ code: b.status,
2395
2403
  name: "Unauthorized",
2396
- message: w.statusText
2404
+ message: b.statusText
2397
2405
  };
2398
- let L = await w.text();
2399
- throw new Error(L ?? w.statusText ?? "Post error!");
2406
+ let N = await b.text();
2407
+ throw new Error(N ?? b.statusText ?? "Post error!");
2400
2408
  }
2401
- if (x)
2402
- return await w.text();
2403
- if (y)
2404
- return await w.json();
2409
+ if (D)
2410
+ return await b.text();
2411
+ if (w)
2412
+ return await b.json();
2405
2413
  throw new Error();
2406
- } catch (L) {
2407
- if (w.status == 200 || !r)
2414
+ } catch (N) {
2415
+ if (b.status == 200 || !r)
2408
2416
  return;
2409
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2410
- throw L.code == 401 ? L : new Error(b);
2417
+ const S = `${(b == null ? void 0 : b.status) ?? ""} ${(b == null ? void 0 : b.statusText) ?? ""} ${N.message}`;
2418
+ throw N.code == 401 ? N : new Error(S);
2411
2419
  }
2412
2420
  }
2413
2421
  async function d(u) {
2414
- const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, x = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2422
+ const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, w = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, D = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
2415
2423
  let i = u.finalUrl, E = u.headers;
2416
- if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), f != null && f.isDemoing.value)
2417
- return console.log(`DEMO: Patch to ${i}`), f.patch(u);
2424
+ if (i == null && (i = A(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
2425
+ return console.log(`DEMO: Patch to ${i}`), s.patch(u);
2418
2426
  console.log(`Patch to ${i}`);
2419
- let w;
2427
+ let b;
2420
2428
  try {
2421
- if (w = await fetch(i, {
2429
+ if (b = await fetch(i, {
2422
2430
  method: "PATCH",
2423
2431
  mode: "cors",
2424
2432
  cache: "no-cache",
2425
2433
  headers: E,
2426
2434
  body: JSON.stringify(u.data)
2427
- }), !w.ok) {
2428
- if (w.status == 401)
2435
+ }), !b.ok) {
2436
+ if (b.status == 401)
2429
2437
  throw {
2430
- code: w.status,
2438
+ code: b.status,
2431
2439
  name: "Unauthorized",
2432
- message: w.statusText
2440
+ message: b.statusText
2433
2441
  };
2434
- let L = await w.text();
2435
- throw new Error(L ?? w.statusText ?? "Patch error!");
2442
+ let N = await b.text();
2443
+ throw new Error(N ?? b.statusText ?? "Patch error!");
2436
2444
  }
2437
- if (x)
2438
- return await w.text();
2439
- if (y)
2440
- return await w.json();
2445
+ if (D)
2446
+ return await b.text();
2447
+ if (w)
2448
+ return await b.json();
2441
2449
  throw new Error();
2442
- } catch (L) {
2443
- if (w.status == 200 || !r)
2450
+ } catch (N) {
2451
+ if (b.status == 200 || !r)
2444
2452
  return;
2445
- const b = `${(w == null ? void 0 : w.status) ?? ""} ${(w == null ? void 0 : w.statusText) ?? ""} ${L.message}`;
2446
- throw L.code == 401 ? L : new Error(b);
2453
+ const S = `${(b == null ? void 0 : b.status) ?? ""} ${(b == null ? void 0 : b.statusText) ?? ""} ${N.message}`;
2454
+ throw N.code == 401 ? N : new Error(S);
2447
2455
  }
2448
2456
  }
2449
2457
  async function h(u) {
2450
2458
  const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
2451
- let y = u.finalUrl, x = u.headers;
2452
- if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (x = t(u)), f != null && f.isDemoing.value)
2453
- return console.log(`DEMO: Delete ${y}`), f.deleteItem(u);
2454
- console.log(`Delete ${y}`);
2459
+ let w = u.finalUrl, D = u.headers;
2460
+ if (w == null && (w = A(u)), u.overrideHeaders !== !0 && (D = t(u)), s != null && s.isDemoing.value)
2461
+ return console.log(`DEMO: Delete ${w}`), s.deleteItem(u);
2462
+ console.log(`Delete ${w}`);
2455
2463
  let i;
2456
2464
  try {
2457
- if (i = await fetch(y, {
2465
+ if (i = await fetch(w, {
2458
2466
  method: "DELETE",
2459
2467
  mode: "cors",
2460
2468
  cache: "no-cache",
2461
- headers: x,
2469
+ headers: D,
2462
2470
  body: JSON.stringify(u.data)
2463
2471
  }), i.status == 401)
2464
2472
  throw {
@@ -2468,16 +2476,16 @@ function En(e) {
2468
2476
  };
2469
2477
  return i.status == 200 ? void 0 : i.statusText;
2470
2478
  } catch (E) {
2471
- const w = `${(i == null ? void 0 : i.status) ?? ""} ${(i == null ? void 0 : i.statusText) ?? ""} ${E.message}`;
2479
+ const b = `${(i == null ? void 0 : i.status) ?? ""} ${(i == null ? void 0 : i.statusText) ?? ""} ${E.message}`;
2472
2480
  if (!r)
2473
- return w;
2481
+ return b;
2474
2482
  throw E.code == 401 ? E : new Error(`${i.status} ${i.statusText} ${E.message}`);
2475
2483
  }
2476
2484
  }
2477
2485
  return Ar = {
2478
2486
  buildHeaders: t,
2479
2487
  buildQuery: l,
2480
- buildUrl: S,
2488
+ buildUrl: A,
2481
2489
  deleteItem: h,
2482
2490
  get: _,
2483
2491
  getAll: M,
@@ -2486,21 +2494,21 @@ function En(e) {
2486
2494
  }, Ar;
2487
2495
  }
2488
2496
  function ut(e) {
2489
- const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: f, doAction: g, logError: D } = en(e);
2497
+ const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: A, isLoading: s, doAction: g, logError: I } = en(e);
2490
2498
  function C(r) {
2491
2499
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0);
2492
- let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2493
- const x = (e == null ? void 0 : e.items) ?? [];
2494
- return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => y().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
2495
- var w;
2496
- const i = r.id ?? ((w = r.data) == null ? void 0 : w.id);
2500
+ let w = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2501
+ const D = (e == null ? void 0 : e.items) ?? [];
2502
+ return w == null && r.nav != null && (w = Le({ nav: r.nav })), w != null ? r.onDeleteAsync ?? (r.onDeleteAsync = () => w().deleteItem(r)) : r.onDeleteAsync ?? (r.onDeleteAsync = () => {
2503
+ var b;
2504
+ const i = r.id ?? ((b = r.data) == null ? void 0 : b.id);
2497
2505
  if (i == null)
2498
2506
  return Promise.resolve("No id found in delete action");
2499
- const E = x.findIndex((L) => L.id == i);
2500
- return E >= 0 && x.splice(E, 1), Promise.resolve(void 0);
2507
+ const E = D.findIndex((N) => N.id == i);
2508
+ return E >= 0 && D.splice(E, 1), Promise.resolve(void 0);
2501
2509
  }), g(async () => {
2502
2510
  let i;
2503
- r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), D(i);
2511
+ r.onCanDeleteAsync != null && (i = await r.onCanDeleteAsync(r.data)), i == null && r.onDeleteAsync != null && (i = await r.onDeleteAsync(r.data)), i == null && r.onDeleteSuccessAsync != null && await r.onDeleteSuccessAsync(r.data), I(i);
2504
2512
  }, {
2505
2513
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
2506
2514
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -2512,12 +2520,12 @@ function ut(e) {
2512
2520
  }
2513
2521
  function _(r) {
2514
2522
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get this item?" : void 0);
2515
- let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2516
- const x = (e == null ? void 0 : e.items) ?? [];
2517
- return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await y().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
2523
+ let w = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2524
+ const D = (e == null ? void 0 : e.items) ?? [];
2525
+ return w == null && r.nav != null && (w = Le({ nav: r.nav })), w != null ? r.onGetAsync ?? (r.onGetAsync = async () => (await w().get(r)).data) : r.onGetAsync ?? (r.onGetAsync = () => {
2518
2526
  var E;
2519
2527
  const i = r.id ?? ((E = r.data) == null ? void 0 : E.id);
2520
- return i == null ? Promise.resolve(void 0) : Promise.resolve(x.find((w) => w.id == i));
2528
+ return i == null ? Promise.resolve(void 0) : Promise.resolve(D.find((b) => b.id == i));
2521
2529
  }), g(async () => {
2522
2530
  let i;
2523
2531
  return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
@@ -2532,9 +2540,9 @@ function ut(e) {
2532
2540
  }
2533
2541
  function M(r) {
2534
2542
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to get these items?" : void 0);
2535
- let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2536
- const x = (e == null ? void 0 : e.items) ?? [];
2537
- return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onGetAsync ?? (r.onGetAsync = () => y().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(x)), g(async () => {
2543
+ let w = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2544
+ const D = (e == null ? void 0 : e.items) ?? [];
2545
+ return w == null && r.nav != null && (w = Le({ nav: r.nav })), w != null ? r.onGetAsync ?? (r.onGetAsync = () => w().getAll(r)) : r.onGetAsync ?? (r.onGetAsync = () => Promise.resolve(D)), g(async () => {
2538
2546
  let i;
2539
2547
  return r.onGetAsync != null && (i = await r.onGetAsync(r)), r.onGetSuccessAsync != null && (i = await r.onGetSuccessAsync(i, r)), i;
2540
2548
  }, {
@@ -2548,10 +2556,10 @@ function ut(e) {
2548
2556
  }
2549
2557
  function $(r) {
2550
2558
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to restore this item?" : void 0);
2551
- let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2552
- return y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => y().restore(r))), g(async () => {
2553
- let x, i;
2554
- return r.onCanRestoreAsync != null && (x = await r.onCanRestoreAsync(r.data)), x == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), D(x), i;
2559
+ let w = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2560
+ return w == null && r.nav != null && (w = Le({ nav: r.nav })), w != null && (r.onRestoreAsync ?? (r.onRestoreAsync = () => w().restore(r))), g(async () => {
2561
+ let D, i;
2562
+ return r.onCanRestoreAsync != null && (D = await r.onCanRestoreAsync(r.data)), D == null && r.onRestoreAsync != null && (i = await r.onRestoreAsync(r.data)), i != null && r.onRestoreSuccessAsync != null && await r.onRestoreSuccessAsync(i), I(D), i;
2555
2563
  }, {
2556
2564
  completionMsg: r.completionMsg ?? (e == null ? void 0 : e.completionMsg),
2557
2565
  confirmationMsg: r.confirmationMsg ?? (e == null ? void 0 : e.confirmationMsg),
@@ -2563,21 +2571,21 @@ function ut(e) {
2563
2571
  }
2564
2572
  function d(r) {
2565
2573
  r.nav ?? (r.nav = e == null ? void 0 : e.nav), r.proxyID ?? (r.proxyID = e == null ? void 0 : e.proxyID), r.refresh ?? (r.refresh = e == null ? void 0 : e.refresh), r.throwError ?? (r.throwError = e == null ? void 0 : e.throwError), r.url ?? (r.url = e == null ? void 0 : e.url), r.confirmationMsg ?? (r.confirmationMsg = r.requireConfirmation === !0 ? "Are you sure you want to save this item?" : void 0);
2566
- let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2567
- const x = (e == null ? void 0 : e.items) ?? [];
2568
- return r.onGetSaveAsync ?? (r.onGetSaveAsync = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), y == null && r.nav != null && (y = Le({ nav: r.nav })), y != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
2574
+ let w = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
2575
+ const D = (e == null ? void 0 : e.items) ?? [];
2576
+ return r.onGetSaveAsync ?? (r.onGetSaveAsync = (i) => i), r.onCanSaveAsync ?? (r.onCanSaveAsync = () => Promise.resolve(void 0)), w == null && r.nav != null && (w = Le({ nav: r.nav })), w != null ? r.onSaveAsync ?? (r.onSaveAsync = async () => {
2569
2577
  var i;
2570
- return r.mode ?? (r.mode = ((i = r.data) == null ? void 0 : i.id) == null ? "new" : "edit"), r.mode == "new" ? await y().post(r) : await y().patch(r);
2578
+ return r.mode ?? (r.mode = ((i = r.data) == null ? void 0 : i.id) == null ? "new" : "edit"), r.mode == "new" ? await w().post(r) : await w().patch(r);
2571
2579
  }) : r.onSaveAsync ?? (r.onSaveAsync = (i) => {
2572
- const E = x.findIndex((w) => w.id == i.id);
2573
- return E >= 0 ? x.splice(E, 1, i) : x.push(i), Promise.resolve(i);
2580
+ const E = D.findIndex((b) => b.id == i.id);
2581
+ return E >= 0 ? D.splice(E, 1, i) : D.push(i), Promise.resolve(i);
2574
2582
  }), g(async () => {
2575
2583
  let i;
2576
2584
  if (r.onGetSaveAsync != null && (i = await r.onGetSaveAsync(r.data)), i == null)
2577
2585
  return;
2578
2586
  if (r.onCanSaveAsync != null) {
2579
- let w = await r.onCanSaveAsync(i);
2580
- if (D(w), w != null)
2587
+ let b = await r.onCanSaveAsync(i);
2588
+ if (I(b), b != null)
2581
2589
  return;
2582
2590
  }
2583
2591
  let E;
@@ -2602,13 +2610,13 @@ function ut(e) {
2602
2610
  actionErrorMsg: t,
2603
2611
  apiGet: h,
2604
2612
  apiPost: u,
2605
- clearErrors: S,
2613
+ clearErrors: A,
2606
2614
  deleteItem: C,
2607
2615
  doAction: g,
2608
2616
  getAllItems: M,
2609
2617
  getItem: _,
2610
- isLoading: f,
2611
- logError: D,
2618
+ isLoading: s,
2619
+ logError: I,
2612
2620
  restoreItem: $,
2613
2621
  saveItem: d
2614
2622
  };
@@ -2621,277 +2629,277 @@ function In() {
2621
2629
  function Dn(e) {
2622
2630
  const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a";
2623
2631
  let l = z(localStorage.getItem(Hr) ?? "");
2624
- l.value.length == 0 && S();
2625
- function S() {
2632
+ l.value.length == 0 && A();
2633
+ function A() {
2626
2634
  l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Hr, l.value);
2627
2635
  }
2628
- const f = Zt("auth-credentials", {});
2629
- function g(I) {
2630
- if (I == null)
2636
+ const s = Zt("auth-credentials", {});
2637
+ function g(x) {
2638
+ if (x == null)
2631
2639
  return !0;
2632
- var N = e.getAuthItem != null ? e.getAuthItem(I) : null;
2633
- if (N == null)
2640
+ var L = e.getAuthItem != null ? e.getAuthItem(x) : null;
2641
+ if (L == null)
2634
2642
  return !1;
2635
- if (N.requiresAuth === !1)
2643
+ if (L.requiresAuth === !1)
2636
2644
  return !0;
2637
- const s = Q(f);
2638
- if (s.isSuspended && N.ignoreSuspension !== !0)
2645
+ const f = Q(s);
2646
+ if (f.isSuspended && L.ignoreSuspension !== !0)
2639
2647
  return !1;
2640
- if (s.isGlobalAdmin)
2648
+ if (f.isGlobalAdmin)
2641
2649
  return !0;
2642
- if (N.permissions != null) {
2643
- for (var A = 0; A < N.permissions.length; A++)
2644
- if (!D(N.permissions[A]))
2650
+ if (L.permissions != null) {
2651
+ for (var y = 0; y < L.permissions.length; y++)
2652
+ if (!I(L.permissions[y]))
2645
2653
  return !1;
2646
2654
  }
2647
2655
  return !0;
2648
2656
  }
2649
- function D(I) {
2650
- const N = Q(f);
2651
- if (N.userPermissions != null)
2652
- for (var s = 0; s < N.userPermissions.length; s++) {
2653
- var A = N.userPermissions[s].split(".");
2654
- if (N.userPermissions[s] == "everything.edit" || I == A[0] && A.length > 1 && A[1] == "edit")
2657
+ function I(x) {
2658
+ const L = Q(s);
2659
+ if (L.userPermissions != null)
2660
+ for (var f = 0; f < L.userPermissions.length; f++) {
2661
+ var y = L.userPermissions[f].split(".");
2662
+ if (L.userPermissions[f] == "everything.edit" || x == y[0] && y.length > 1 && y[1] == "edit")
2655
2663
  return !0;
2656
2664
  }
2657
2665
  return !1;
2658
2666
  }
2659
- function C(I) {
2660
- if (I == null)
2667
+ function C(x) {
2668
+ if (x == null)
2661
2669
  return !0;
2662
- var N = e.getAuthItem != null ? e.getAuthItem(I) : null;
2663
- if (N == null)
2670
+ var L = e.getAuthItem != null ? e.getAuthItem(x) : null;
2671
+ if (L == null)
2664
2672
  return !1;
2665
- if (N.requiresAuth === !1)
2673
+ if (L.requiresAuth === !1)
2666
2674
  return !0;
2667
- const s = Q(f);
2668
- if (s.isSuspended && N.ignoreSuspension !== !0)
2675
+ const f = Q(s);
2676
+ if (f.isSuspended && L.ignoreSuspension !== !0)
2669
2677
  return !1;
2670
- if (s.isGlobalAdmin)
2678
+ if (f.isGlobalAdmin)
2671
2679
  return !0;
2672
- if (N.permissions != null) {
2673
- for (var A = 0; A < N.permissions.length; A++)
2674
- if (!_(N.permissions[A]))
2680
+ if (L.permissions != null) {
2681
+ for (var y = 0; y < L.permissions.length; y++)
2682
+ if (!_(L.permissions[y]))
2675
2683
  return !1;
2676
2684
  }
2677
2685
  return !0;
2678
2686
  }
2679
- function _(I) {
2680
- const N = Q(f);
2681
- if (N.userPermissions != null)
2682
- for (var s = 0; s < N.userPermissions.length; s++) {
2683
- var A = N.userPermissions[s].split(".");
2684
- if (I == A[0] || I == "everything" || N.userPermissions[s] == "everything.view" || N.userPermissions[s] == "everything.edit")
2687
+ function _(x) {
2688
+ const L = Q(s);
2689
+ if (L.userPermissions != null)
2690
+ for (var f = 0; f < L.userPermissions.length; f++) {
2691
+ var y = L.userPermissions[f].split(".");
2692
+ if (x == y[0] || x == "everything" || L.userPermissions[f] == "everything.view" || L.userPermissions[f] == "everything.edit")
2685
2693
  return !0;
2686
2694
  }
2687
2695
  return !1;
2688
2696
  }
2689
- function M(I, N, s) {
2690
- let A = !0;
2691
- return Q(f).isGlobalAdmin ? !0 : (N != null && N.length > 0 && N.forEach((X) => {
2692
- s == "edit" ? D(X) || (A = !1) : _(X) || (A = !1);
2693
- }), I != null && I.length > 0 && (I.some((X) => u(X)) || (A = !1)), A);
2697
+ function M(x, L, f) {
2698
+ let y = !0;
2699
+ return Q(s).isGlobalAdmin ? !0 : (L != null && L.length > 0 && L.forEach((X) => {
2700
+ f == "edit" ? I(X) || (y = !1) : _(X) || (y = !1);
2701
+ }), x != null && x.length > 0 && (x.some((X) => u(X)) || (y = !1)), y);
2694
2702
  }
2695
- function $(I, N = !1) {
2696
- var s = e.getAuthItem != null ? e.getAuthItem(I) : null;
2697
- let A = !1;
2698
- if (s == null)
2703
+ function $(x, L = !1) {
2704
+ var f = e.getAuthItem != null ? e.getAuthItem(x) : null;
2705
+ let y = !1;
2706
+ if (f == null)
2699
2707
  return !1;
2700
- let j = s.subscriptions ?? [], X = s.permissions ?? [], re = M(j, X, "view");
2701
- return re || !N || !_e(s.children) ? re : ((s == null ? void 0 : s.children) != null && s.children.forEach((ue) => {
2702
- $(ue, !0) && (A = !0);
2703
- }), A);
2704
- }
2705
- function d(I) {
2706
- return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (N, s) => {
2707
- const A = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${s}`);
2708
- return N ? `${A}&redirect_path=${N}` : A;
2709
- }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(I, l.value) ?? "" : "";
2710
- }
2711
- function h(I) {
2712
- var s;
2713
- return I == null ? 0 : ((s = (e.subscriptionOptions ?? []).find((A) => A.code == I)) == null ? void 0 : s.value) ?? 0;
2708
+ let J = f.subscriptions ?? [], X = f.permissions ?? [], re = M(J, X, "view");
2709
+ return re || !L || !_e(f.children) ? re : ((f == null ? void 0 : f.children) != null && f.children.forEach((ue) => {
2710
+ $(ue, !0) && (y = !0);
2711
+ }), y);
2712
+ }
2713
+ function d(x) {
2714
+ return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (L, f) => {
2715
+ const y = Ue(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
2716
+ return L ? `${y}&redirect_path=${L}` : y;
2717
+ }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(x, l.value) ?? "" : "";
2718
+ }
2719
+ function h(x) {
2720
+ var f;
2721
+ return x == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((y) => y.code == x)) == null ? void 0 : f.value) ?? 0;
2714
2722
  }
2715
- function u(I) {
2716
- const N = Q(f);
2717
- if (N.subscriptionCode == null)
2723
+ function u(x) {
2724
+ const L = Q(s);
2725
+ if (L.subscriptionCode == null)
2718
2726
  return !1;
2719
- if (N.subscriptionCode == I)
2727
+ if (L.subscriptionCode == x)
2720
2728
  return !0;
2721
- const s = h(I), A = h(N.subscriptionCode);
2722
- return s <= A;
2729
+ const f = h(x), y = h(L.subscriptionCode);
2730
+ return f <= y;
2723
2731
  }
2724
- function r(I) {
2725
- const s = I.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
2726
- atob(s).split("").map(function(j) {
2727
- return "%" + ("00" + j.charCodeAt(0).toString(16)).slice(-2);
2732
+ function r(x) {
2733
+ const f = x.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), y = decodeURIComponent(
2734
+ atob(f).split("").map(function(J) {
2735
+ return "%" + ("00" + J.charCodeAt(0).toString(16)).slice(-2);
2728
2736
  }).join("")
2729
2737
  );
2730
- return JSON.parse(A);
2738
+ return JSON.parse(y);
2731
2739
  }
2732
- function y(I, N) {
2733
- f.value = void 0, L(), I != null && N != null && N.currentRoute.value.path != I && N.push({ path: I });
2740
+ function w(x, L) {
2741
+ s.value = void 0, N(), x != null && L != null && L.currentRoute.value.path != x && L.push({ path: x });
2734
2742
  }
2735
- function x(I) {
2736
- var s;
2737
- Q(f).isLoggedIn || ((s = e.demo) == null || s.endDemo(), T() && (y(), window.location.href = d(I)));
2743
+ function D(x) {
2744
+ var f;
2745
+ Q(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (w(), window.location.href = d(x)));
2738
2746
  }
2739
- async function i(I, N) {
2747
+ async function i(x, L) {
2740
2748
  return e.getToken ?? (e.getToken = async () => {
2741
- let s = I, A = N, j = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
2742
- if (s == null || A == null)
2749
+ let f = x, y = L, J = e.oauthGrantType ?? "authorization_token", X = e.oauthClientID ?? "";
2750
+ if (f == null || y == null)
2743
2751
  throw new Error("Code and State required in OAuth token process");
2744
- if (A != l.value)
2752
+ if (y != l.value)
2745
2753
  throw new Error("state does not match");
2746
2754
  let re = "";
2747
- e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(s, `${window.location.origin}/authentication`, j, X);
2755
+ e.getTokenUrl ?? (e.getTokenUrl = () => Ue(Wr(), "token")), re = e.getTokenUrl(f, `${window.location.origin}/authentication`, J, X);
2748
2756
  const ue = {};
2749
- ue.grant_type = j, ue.code = s, ue.redirect_uri = `${window.location.origin}/authentication`, ue.client_id = X;
2757
+ ue.grant_type = J, ue.code = f, ue.redirect_uri = `${window.location.origin}/authentication`, ue.client_id = X;
2750
2758
  const G = await Er().post({
2751
2759
  additionalUrl: re,
2752
2760
  data: ue
2753
2761
  });
2754
2762
  E(G.access_token);
2755
- }), await e.getToken(I, N);
2763
+ }), await e.getToken(x, L);
2756
2764
  }
2757
- function E(I) {
2758
- if (I != null && (e.demo == null || !e.demo.isDemoing.value)) {
2759
- const N = r(I);
2760
- w(N, I), e.processTokenPayload != null && e.processTokenPayload(f, N);
2765
+ function E(x) {
2766
+ if (x != null && (e.demo == null || !e.demo.isDemoing.value)) {
2767
+ const L = r(x);
2768
+ b(L, x), e.processTokenPayload != null && e.processTokenPayload(s, L);
2761
2769
  }
2762
2770
  }
2763
- function w(I, N) {
2764
- var A;
2765
- const s = f.value;
2766
- s.expiresOn = I.ExpiresOn, s.isGlobalAdmin = I.IsGlobalAdmin == "True", s.isLoggedIn = !0, s.permissions = I.Permissions, s.subscriptionCode = I.Subscription, s.timeZone ?? (s.timeZone = e.defaultTimeZone ?? hr), s.token = N, s.userID = I.UserLoginID, s.userPermissions = ((A = I.Permissions) == null ? void 0 : A.split(",")) ?? [];
2771
+ function b(x, L) {
2772
+ var y;
2773
+ const f = s.value;
2774
+ f.expiresOn = x.ExpiresOn, f.isGlobalAdmin = x.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = x.Permissions, f.subscriptionCode = x.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = L, f.userID = x.UserLoginID, f.userPermissions = ((y = x.Permissions) == null ? void 0 : y.split(",")) ?? [];
2767
2775
  }
2768
- function L() {
2769
- var I;
2770
- f.value ?? (f.value = {}), (I = f.value).timeZone ?? (I.timeZone = e.defaultTimeZone ?? hr);
2776
+ function N() {
2777
+ var x;
2778
+ s.value ?? (s.value = {}), (x = s.value).timeZone ?? (x.timeZone = e.defaultTimeZone ?? hr);
2771
2779
  }
2772
- function b() {
2773
- const I = Q(f);
2774
- return I.isLoggedIn && T() && (y(), window.location.href = d()), I.isLoggedIn;
2780
+ function S() {
2781
+ const x = Q(s);
2782
+ return x.isLoggedIn && T() && (w(), window.location.href = d()), x.isLoggedIn;
2775
2783
  }
2776
2784
  function T() {
2777
- const I = Q(f);
2778
- if (I == null || I.expiresOn == null)
2785
+ const x = Q(s);
2786
+ if (x == null || x.expiresOn == null)
2779
2787
  return !0;
2780
- const N = he.fromFormat(I.expiresOn, t), s = he.utc();
2781
- return N <= s;
2788
+ const L = he.fromFormat(x.expiresOn, t), f = he.utc();
2789
+ return L <= f;
2782
2790
  }
2783
- return L(), Ir = {
2791
+ return N(), Ir = {
2784
2792
  authState: l,
2785
2793
  canEdit: g,
2786
- canEditPermit: D,
2794
+ canEditPermit: I,
2787
2795
  canView: C,
2788
2796
  canViewPermit: _,
2789
- credentials: f,
2797
+ credentials: s,
2790
2798
  doShow: M,
2791
2799
  doShowByNav: $,
2792
2800
  getAuthorizeUrl: d,
2793
2801
  getToken: i,
2794
- isLoggedIn: ee(() => f.value.isLoggedIn === !0),
2795
- login: x,
2796
- logout: y,
2797
- resetAuthState: S,
2802
+ isLoggedIn: ee(() => s.value.isLoggedIn === !0),
2803
+ login: D,
2804
+ logout: w,
2805
+ resetAuthState: A,
2798
2806
  setAuth: E,
2799
- timeZone: ee(() => f.value.timeZone ?? e.defaultTimeZone ?? hr),
2800
- tryLogin: b
2807
+ timeZone: ee(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
2808
+ tryLogin: S
2801
2809
  }, Ir;
2802
2810
  }
2803
2811
  function xn(e, t, l = {}) {
2804
2812
  const {
2805
- preventDefault: S = !1,
2806
- stopPropagation: f = !1,
2813
+ preventDefault: A = !1,
2814
+ stopPropagation: s = !1,
2807
2815
  axis: g = "both"
2808
- } = l, D = { capture: l.capture ?? !0 };
2816
+ } = l, I = { capture: l.capture ?? !0 };
2809
2817
  let C = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, M = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
2810
- function u(L) {
2811
- Q(S) && L.preventDefault(), Q(f) && L.stopPropagation();
2818
+ function u(N) {
2819
+ Q(A) && N.preventDefault(), Q(s) && N.stopPropagation();
2812
2820
  }
2813
- function r(L) {
2814
- var s;
2815
- const b = Q(e);
2816
- if (!b)
2821
+ function r(N) {
2822
+ var f;
2823
+ const S = Q(e);
2824
+ if (!S)
2817
2825
  return;
2818
- const T = b.$el, N = L.type === "touchstart" && L.touches.length > 0 ? L.touches[0] : L;
2819
- M = { x: N.clientX, y: N.clientY }, _ = {
2826
+ const T = S.$el, L = N.type === "touchstart" && N.touches.length > 0 ? N.touches[0] : N;
2827
+ M = { x: L.clientX, y: L.clientY }, _ = {
2820
2828
  x: T.offsetLeft,
2821
2829
  y: T.offsetTop
2822
2830
  }, C = {
2823
2831
  x: T.offsetLeft,
2824
2832
  y: T.offsetTop
2825
- }, ((s = l.onStart) == null ? void 0 : s.call(l, M, L)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", x)), d.push(me("touchend", x)), u(L));
2833
+ }, ((f = l.onStart) == null ? void 0 : f.call(l, M, N)) !== !1 && (d.push(me("mousemove", w)), d.push(me("touchmove", w)), d.push(me("mouseup", D)), d.push(me("touchend", D)), u(N));
2826
2834
  }
2827
- function y(L) {
2828
- var A;
2835
+ function w(N) {
2836
+ var y;
2829
2837
  if (!M || !Q(e))
2830
2838
  return;
2831
- const I = L.type === "touchmove" && L.touches.length > 0 ? L.touches[0] : L;
2832
- let N = I.clientX - M.x, s = I.clientY - M.y;
2833
- (g === "x" || g === "both") && (C.x = _.x + N), (g === "y" || g === "both") && (C.y = _.y + s), (A = l.onMove) == null || A.call(l, C, L), u(L), i(C);
2839
+ const x = N.type === "touchmove" && N.touches.length > 0 ? N.touches[0] : N;
2840
+ let L = x.clientX - M.x, f = x.clientY - M.y;
2841
+ (g === "x" || g === "both") && (C.x = _.x + L), (g === "y" || g === "both") && (C.y = _.y + f), (y = l.onMove) == null || y.call(l, C, N), u(N), i(C);
2834
2842
  }
2835
- function x(L) {
2836
- var b;
2843
+ function D(N) {
2844
+ var S;
2837
2845
  document.documentElement.style.cursor = "", d.forEach((T) => {
2838
2846
  T();
2839
- }), d.length = 0, (b = l.onEnd) == null || b.call(l, C, L), u(L);
2847
+ }), d.length = 0, (S = l.onEnd) == null || S.call(l, C, N), u(N);
2840
2848
  }
2841
- function i(L) {
2842
- const b = Q(e);
2843
- if (!b)
2849
+ function i(N) {
2850
+ const S = Q(e);
2851
+ if (!S)
2844
2852
  return;
2845
- const T = b.$el;
2846
- T.style.left = `${L.x}px`, T.style.top = `${L.y}px`;
2853
+ const T = S.$el;
2854
+ T.style.left = `${N.x}px`, T.style.top = `${N.y}px`;
2847
2855
  }
2848
2856
  function E() {
2849
2857
  if (Q(h))
2850
2858
  return;
2851
- const L = Q(t);
2852
- if (!L)
2859
+ const N = Q(t);
2860
+ if (!N)
2853
2861
  return;
2854
- const b = L.$el;
2855
- b.style.cursor = "move", $.push(me(b, "mousedown", r, D)), $.push(me(b, "touchstart", r, D)), h.value = !0;
2862
+ const S = N.$el;
2863
+ S.style.cursor = "move", $.push(me(S, "mousedown", r, I)), $.push(me(S, "touchstart", r, I)), h.value = !0;
2856
2864
  }
2857
- function w() {
2865
+ function b() {
2858
2866
  if (!Q(h))
2859
2867
  return;
2860
- const L = Q(t);
2861
- if (!L)
2868
+ const N = Q(t);
2869
+ if (!N)
2862
2870
  return;
2863
- const b = L.$el;
2864
- b.style.cursor = "", $.forEach((T) => {
2871
+ const S = N.$el;
2872
+ S.style.cursor = "", $.forEach((T) => {
2865
2873
  T();
2866
2874
  }), $.length = 0, h.value = !1;
2867
2875
  }
2868
2876
  return {
2869
2877
  draggingIsOn: h,
2870
- turnDraggableOff: w,
2878
+ turnDraggableOff: b,
2871
2879
  turnDraggableOn: E
2872
2880
  };
2873
2881
  }
2874
2882
  const Tn = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
2875
2883
  function _n(e, t = {}) {
2876
- let l, S = t.handleWidth ?? 12, f = t.handleZIndex ?? 100, g = t.minWidth ?? 0, D = t.maxWidth ?? Number.MAX_SAFE_INTEGER, C = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, M = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
2884
+ let l, A = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, I = t.maxWidth ?? Number.MAX_SAFE_INTEGER, C = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, M = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
2877
2885
  const u = z(!1);
2878
- let r = [], y = [];
2879
- const x = z(!1), i = z({ x: 0, y: 0 });
2880
- let E = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, w = {};
2881
- function L(G) {
2886
+ let r = [], w = [];
2887
+ const D = z(!1), i = z({ x: 0, y: 0 });
2888
+ let E = { left: 0, top: 0, height: 0, width: 0, position: "absolute" }, b = {};
2889
+ function N(G) {
2882
2890
  Ee(M) && G.preventDefault(), Ee($) && G.stopPropagation();
2883
2891
  }
2884
- function b(G, Y) {
2885
- h = Y.map(I), h.forEach((H) => G.$el.appendChild(H));
2892
+ function S(G, Y) {
2893
+ h = Y.map(x), h.forEach((H) => G.$el.appendChild(H));
2886
2894
  }
2887
2895
  function T(G) {
2888
2896
  h.forEach((Y) => G.$el.removeChild(Y));
2889
2897
  }
2890
- function I(G) {
2891
- const Y = S + "px", H = -S / 2 + "px", ie = f + 1, Z = document.createElement("div");
2892
- return Z.dataset.handle = G, Z.style.position = "absolute", Z.style.touchAction = "none", Z.style.userSelect = "none", Z.style.zIndex = (G.length === 1 ? f : ie).toString(), Z.style.cursor = j(G), G.includes("t") && (Z.style.top = H, Z.style.height = Y, G === "t" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("b") && (Z.style.bottom = H, Z.style.height = Y, G === "b" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("r") && (Z.style.right = H, Z.style.width = Y, G === "r" && (Z.style.top = "0", Z.style.height = "100%")), G.includes("l") && (Z.style.left = H, Z.style.width = Y, G === "l" && (Z.style.top = "0", Z.style.height = "100%")), Z;
2898
+ function x(G) {
2899
+ const Y = A + "px", H = -A / 2 + "px", ie = s + 1, Z = document.createElement("div");
2900
+ return Z.dataset.handle = G, Z.style.position = "absolute", Z.style.touchAction = "none", Z.style.userSelect = "none", Z.style.zIndex = (G.length === 1 ? s : ie).toString(), Z.style.cursor = J(G), G.includes("t") && (Z.style.top = H, Z.style.height = Y, G === "t" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("b") && (Z.style.bottom = H, Z.style.height = Y, G === "b" && (Z.style.left = "0", Z.style.width = "100%")), G.includes("r") && (Z.style.right = H, Z.style.width = Y, G === "r" && (Z.style.top = "0", Z.style.height = "100%")), G.includes("l") && (Z.style.left = H, Z.style.width = Y, G === "l" && (Z.style.top = "0", Z.style.height = "100%")), Z;
2893
2901
  }
2894
- function N(G) {
2902
+ function L(G) {
2895
2903
  var ne;
2896
2904
  if (!h.some((ce) => ce == G.target))
2897
2905
  return;
@@ -2904,12 +2912,12 @@ function _n(e, t = {}) {
2904
2912
  top: H.offsetTop,
2905
2913
  height: parseInt(window.getComputedStyle(H).getPropertyValue("height")),
2906
2914
  width: parseInt(window.getComputedStyle(H).getPropertyValue("width"))
2907
- }, w = Nr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, G)) === !1)
2915
+ }, b = Nr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, G)) === !1)
2908
2916
  return;
2909
2917
  let W = G.target;
2910
- document.documentElement.style.cursor = j(W.dataset.handle), d = W.dataset.handle, y.push(me("mousemove", s)), y.push(me("mouseup", A)), y.push(me("touchmove", s)), y.push(me("touchend", A)), L(G);
2918
+ document.documentElement.style.cursor = J(W.dataset.handle), d = W.dataset.handle, w.push(me("mousemove", f)), w.push(me("mouseup", y)), w.push(me("touchmove", f)), w.push(me("touchend", y)), N(G);
2911
2919
  }
2912
- function s(G) {
2920
+ function f(G) {
2913
2921
  const Y = Ee(e);
2914
2922
  if (!Y)
2915
2923
  return;
@@ -2918,28 +2926,28 @@ function _n(e, t = {}) {
2918
2926
  const ce = Ee(E);
2919
2927
  if (d.includes("t")) {
2920
2928
  const se = Math.min(_, Math.max(C, (ce.height ?? 0) - ne));
2921
- w.height = se, w.top = (ce.top ?? 0) + ne;
2929
+ b.height = se, b.top = (ce.top ?? 0) + ne;
2922
2930
  }
2923
2931
  if (d.includes("b")) {
2924
2932
  const se = Math.min(_, Math.max(C, (ce.height ?? 0) + ne));
2925
- w.height = se;
2933
+ b.height = se;
2926
2934
  }
2927
2935
  if (d.includes("l")) {
2928
- const se = Math.min(D, Math.max(g, (ce.width ?? 0) - W));
2929
- w.width = se, w.left = (ce.left ?? 0) + W;
2936
+ const se = Math.min(I, Math.max(g, (ce.width ?? 0) - W));
2937
+ b.width = se, b.left = (ce.left ?? 0) + W;
2930
2938
  }
2931
2939
  if (d.includes("r")) {
2932
- const se = Math.min(D, Math.max(g, (ce.width ?? 0) + W));
2933
- w.width = se;
2940
+ const se = Math.min(I, Math.max(g, (ce.width ?? 0) + W));
2941
+ b.width = se;
2934
2942
  }
2935
- H.dispatchEvent(new CustomEvent("resize")), L(G), re(w);
2943
+ H.dispatchEvent(new CustomEvent("resize")), N(G), re(b);
2936
2944
  }
2937
- function A() {
2938
- document.documentElement.style.cursor = "", d = null, y.forEach((G) => {
2945
+ function y() {
2946
+ document.documentElement.style.cursor = "", d = null, w.forEach((G) => {
2939
2947
  G();
2940
- }), y.length = 0;
2948
+ }), w.length = 0;
2941
2949
  }
2942
- function j(G) {
2950
+ function J(G) {
2943
2951
  const Y = {
2944
2952
  t: "n",
2945
2953
  r: "e",
@@ -2978,19 +2986,19 @@ function _n(e, t = {}) {
2978
2986
  position: "absolute"
2979
2987
  }, re(E), H.offsetHeight;
2980
2988
  const ie = E;
2981
- G == "freestyle" ? w = {
2989
+ G == "freestyle" ? b = {
2982
2990
  height: ie.height,
2983
2991
  width: (ie.width ?? 100) / 2,
2984
2992
  top: (ie.top ?? 0) + 2,
2985
2993
  left: (ie.left ?? 0) + 2,
2986
2994
  position: "absolute"
2987
- } : G == "blade" && (w = {
2995
+ } : G == "blade" && (b = {
2988
2996
  height: ie.height,
2989
2997
  width: (ie.width ?? 100) / 2,
2990
2998
  top: (ie.top ?? 0) + 2,
2991
2999
  left: (ie.left ?? 0) + 2,
2992
3000
  position: "absolute"
2993
- }), re(w), me(H, "transitionend", () => {
3001
+ }), re(b), me(H, "transitionend", () => {
2994
3002
  H.style.transition = "", u.value = !1;
2995
3003
  }, { once: !0 });
2996
3004
  }
@@ -3003,38 +3011,38 @@ function _n(e, t = {}) {
3003
3011
  G.top ? H.style.top = `${G.top}px` : H.style.top = void 0, G.left ? H.style.left = `${G.left}px` : H.style.left = void 0, G.height ? H.style.height = `${G.height}px` : H.style.height = void 0, G.width ? H.style.width = `${G.width}px` : H.style.width = void 0, G.position ? H.style.position = `${G.position}` : H.style.position = void 0, console.log(H.style.position);
3004
3012
  }
3005
3013
  function ue(G, Y) {
3006
- if (x.value)
3014
+ if (D.value)
3007
3015
  return;
3008
3016
  const H = Ee(e);
3009
- H && (b(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", N)), r.push(me(H.$el, "touchstart", N)), x.value = !0, l = Y);
3017
+ H && (S(H, G ?? Tn), X(Y), r.push(me(H.$el, "mousedown", L)), r.push(me(H.$el, "touchstart", L)), D.value = !0, l = Y);
3010
3018
  }
3011
3019
  function be(G) {
3012
- if (!x.value)
3020
+ if (!D.value)
3013
3021
  return;
3014
3022
  const Y = Ee(e);
3015
3023
  Y && (T(Y), X(G), r.forEach((H) => {
3016
3024
  H();
3017
- }), r.length = 0, x.value = !1);
3025
+ }), r.length = 0, D.value = !1);
3018
3026
  }
3019
3027
  return {
3020
- resizingIsOn: x,
3028
+ resizingIsOn: D,
3021
3029
  turnResizingOn: ue,
3022
3030
  turnResizingOff: be
3023
3031
  };
3024
3032
  }
3025
3033
  function Cn(e) {
3026
- const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), f = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), D = z({}), { turnResizingOff: C, turnResizingOn: _ } = _n(t), { turnDraggableOff: M, turnDraggableOn: $ } = xn(t, l);
3034
+ const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), A = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), I = z({}), { turnResizingOff: C, turnResizingOn: _ } = _n(t), { turnDraggableOff: M, turnDraggableOn: $ } = xn(t, l);
3027
3035
  jt(t, (h) => {
3028
3036
  const u = h[0], { width: r } = u.contentRect;
3029
- S.value = r < f;
3037
+ A.value = r < s;
3030
3038
  });
3031
3039
  function d(h) {
3032
3040
  M(), h == "page" ? C(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (C(), _(void 0, h), $()) : h == "inline" && C();
3033
3041
  }
3034
3042
  return d(g.value), Te(g, (h) => d(h)), {
3035
- isMobile: S,
3043
+ isMobile: A,
3036
3044
  variant: g,
3037
- bladeData: D
3045
+ bladeData: I
3038
3046
  };
3039
3047
  }
3040
3048
  const mr = {
@@ -3076,7 +3084,7 @@ function ya(e) {
3076
3084
  function Pn(e) {
3077
3085
  const t = z({});
3078
3086
  let l = e.vuetifyInstance;
3079
- function S() {
3087
+ function A() {
3080
3088
  const d = localStorage.getItem("cosmetics");
3081
3089
  d != null && d.length > 0 ? t.value = JSON.parse(d) : t.value = {
3082
3090
  theme: e.defaultTheme ?? "light",
@@ -3086,7 +3094,7 @@ function Pn(e) {
3086
3094
  drawerStick: e.defaultDrawerStick ?? !1
3087
3095
  };
3088
3096
  }
3089
- function f() {
3097
+ function s() {
3090
3098
  localStorage.setItem("cosmetics", JSON.stringify(t.value));
3091
3099
  }
3092
3100
  function g(d) {
@@ -3104,7 +3112,7 @@ function Pn(e) {
3104
3112
  }
3105
3113
  }));
3106
3114
  }
3107
- function D(d) {
3115
+ function I(d) {
3108
3116
  var h;
3109
3117
  if (l != null) {
3110
3118
  const u = l.themes.value.dark, r = l.themes.value.light;
@@ -3127,12 +3135,12 @@ function Pn(e) {
3127
3135
  h.colors.primary = (t.value.dark ?? { ...vr, ...e.defaultDarkTheme }).primary, u.colors.primary = (t.value.light ?? { ...mr, ...e.defaultLightTheme }).primary, (d = document.querySelector('meta[name="theme-color"]')) == null || d.setAttribute("content", "");
3128
3136
  }
3129
3137
  }
3130
- return S(), Te(t, () => {
3131
- f();
3138
+ return A(), Te(t, () => {
3139
+ s();
3132
3140
  }), Dr = {
3133
3141
  state: t,
3134
3142
  resetCosmetics: g,
3135
- setTemporaryColor: D,
3143
+ setTemporaryColor: I,
3136
3144
  toggleDrawer: C,
3137
3145
  toggleDrawerStick: _,
3138
3146
  toggleLightDark: M,
@@ -3146,48 +3154,48 @@ function Mn() {
3146
3154
  function e(t) {
3147
3155
  const {
3148
3156
  items: l,
3149
- headers: S,
3150
- fileName: f = "data.csv",
3157
+ headers: A,
3158
+ fileName: s = "data.csv",
3151
3159
  format: g = "file"
3152
3160
  } = t;
3153
3161
  if (!_e(l))
3154
3162
  return;
3155
- let D = [];
3156
- S != null ? D = S == null ? void 0 : S.filter((x) => (x.csv ?? x.csvText ?? x.csvFilter ?? x.csvArray) != null).map((x) => ({
3157
- header: x.title ?? x.value ?? "",
3158
- itemText: x.itemText,
3159
- value: x.value
3160
- })) : D = Object.keys(l[0]).map((x) => ({ header: tn(x) ?? "", value: x })), D = D.filter((x) => x.header.length > 0);
3163
+ let I = [];
3164
+ A != null ? I = A == null ? void 0 : A.filter((D) => (D.csv ?? D.csvText ?? D.csvFilter ?? D.csvArray) != null).map((D) => ({
3165
+ header: D.title ?? D.value ?? "",
3166
+ itemText: D.itemText,
3167
+ value: D.value
3168
+ })) : I = Object.keys(l[0]).map((D) => ({ header: tn(D) ?? "", value: D })), I = I.filter((D) => D.header.length > 0);
3161
3169
  var C = [];
3162
- for (let x = 0; x < l.length; x++) {
3163
- const i = l[x];
3170
+ for (let D = 0; D < l.length; D++) {
3171
+ const i = l[D];
3164
3172
  var _ = {}, M = [];
3165
- for (let E = 0; E < D.length; E++) {
3166
- const w = D[E];
3173
+ for (let E = 0; E < I.length; E++) {
3174
+ const b = I[E];
3167
3175
  var $ = null;
3168
- typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ? _[w.header] = Sr($, w.itemText) : _[w.header] = $;
3176
+ typeof b.value == "function" ? $ = b.value(i) : typeof b.value == "string" && ($ = Sr(i, b.value)), b.itemText != null ? _[b.header] = Sr($, b.itemText) : _[b.header] = $;
3169
3177
  }
3170
3178
  C.push(_), _e(M) && M.forEach((E) => {
3171
3179
  C.push(E);
3172
3180
  }), M = [];
3173
3181
  }
3174
3182
  var d = [];
3175
- if (d.push(D.map((x) => x.header).toString()), C.forEach((x) => {
3183
+ if (d.push(I.map((D) => D.header).toString()), C.forEach((D) => {
3176
3184
  let i = [];
3177
- D.forEach(function(E) {
3178
- var w = x[E.header];
3179
- i.push(w ?? "");
3185
+ I.forEach(function(E) {
3186
+ var b = D[E.header];
3187
+ i.push(b ?? "");
3180
3188
  }), d.push(i.join(","));
3181
3189
  }), g == "array")
3182
3190
  return d;
3183
3191
  var h = d.join(`
3184
3192
  `), u = new Blob([h], { type: "text/plain;charset=utf-8" });
3185
3193
  if (window.navigator.msSaveOrOpenBlob)
3186
- window.navigator.msSaveOrOpenBlob(u, f);
3194
+ window.navigator.msSaveOrOpenBlob(u, s);
3187
3195
  else {
3188
- var r = document.createElement("a"), y = URL.createObjectURL(u);
3189
- r.href = y, r.download = f, document.body.appendChild(r), r.click(), setTimeout(function() {
3190
- document.body.removeChild(r), window.URL.revokeObjectURL(y);
3196
+ var r = document.createElement("a"), w = URL.createObjectURL(u);
3197
+ r.href = w, r.download = s, document.body.appendChild(r), r.click(), setTimeout(function() {
3198
+ document.body.removeChild(r), window.URL.revokeObjectURL(w);
3191
3199
  }, 0);
3192
3200
  }
3193
3201
  }
@@ -3202,12 +3210,12 @@ function ba() {
3202
3210
  function Ln(e) {
3203
3211
  const t = e.getUTC ?? he.utc;
3204
3212
  function l() {
3205
- return f().startOf("day").toUTC().toString() ?? "";
3213
+ return s().startOf("day").toUTC().toString() ?? "";
3206
3214
  }
3207
- function S() {
3208
- return f().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
3215
+ function A() {
3216
+ return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
3209
3217
  }
3210
- function f(_, M) {
3218
+ function s(_, M) {
3211
3219
  return _ == null ? t().setZone(e.getTimeZone()) : M ? he.fromFormat(_, M, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3212
3220
  }
3213
3221
  function g(_, M, $) {
@@ -3220,7 +3228,7 @@ function Ln(e) {
3220
3228
  const d = $ ? he.fromFormat(_, $, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
3221
3229
  return M ? d.toFormat(M) : d == null ? void 0 : d.toString();
3222
3230
  }
3223
- function D(_, M) {
3231
+ function I(_, M) {
3224
3232
  return _ == null ? t() : M ? he.fromFormat(_, M) : he.fromISO(_);
3225
3233
  }
3226
3234
  function C(_, M, $) {
@@ -3233,10 +3241,10 @@ function Ln(e) {
3233
3241
  }
3234
3242
  return xr = {
3235
3243
  getToday: l,
3236
- getTomorrow: S,
3237
- tzDate: f,
3244
+ getTomorrow: A,
3245
+ tzDate: s,
3238
3246
  tzString: g,
3239
- utcDate: D,
3247
+ utcDate: I,
3240
3248
  utcString: C
3241
3249
  }, xr;
3242
3250
  }
@@ -3246,10 +3254,10 @@ function Sa() {
3246
3254
  }
3247
3255
  function Nn(e) {
3248
3256
  const t = z(!1), l = (e == null ? void 0 : e.apis) ?? [];
3249
- function S() {
3257
+ function A() {
3250
3258
  t.value = !0;
3251
3259
  }
3252
- function f() {
3260
+ function s() {
3253
3261
  t.value = !1;
3254
3262
  }
3255
3263
  function g(d) {
@@ -3260,28 +3268,28 @@ function Nn(e) {
3260
3268
  }
3261
3269
  return h == null && (h = l.find((u) => Array.isArray(u.nav) ? u.nav.some((r) => r == d.nav) : u.nav == d.nav)), h;
3262
3270
  }
3263
- function D(d) {
3271
+ function I(d) {
3264
3272
  var r;
3265
3273
  if (l == null)
3266
3274
  return Promise.resolve("no demo data available for this api");
3267
3275
  const h = d.id ?? ((r = d.data) == null ? void 0 : r.id), u = g(d);
3268
3276
  if (h != null && (u == null ? void 0 : u.data) != null) {
3269
- const y = u.data.findIndex((x) => x.id == h);
3270
- y >= 0 && u.data.splice(y, 1);
3277
+ const w = u.data.findIndex((D) => D.id == h);
3278
+ w >= 0 && u.data.splice(w, 1);
3271
3279
  }
3272
- return new Promise(function(y) {
3280
+ return new Promise(function(w) {
3273
3281
  setTimeout(function() {
3274
- y(void 0);
3282
+ w(void 0);
3275
3283
  }, 200);
3276
3284
  });
3277
3285
  }
3278
3286
  function C(d) {
3279
- var y, x, i;
3287
+ var w, D, i;
3280
3288
  if (l == null)
3281
3289
  throw new Error("no demo data available for this api");
3282
- const h = d.id ?? ((y = d.data) == null ? void 0 : y.id), u = g(d);
3290
+ const h = d.id ?? ((w = d.data) == null ? void 0 : w.id), u = g(d);
3283
3291
  let r;
3284
- return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (x = u.data) == null ? void 0 : x.find((E) => E.id == h) : u.path != null && ((i = u.data) == null ? void 0 : i.length) == 1 && (r = u.data[0])), r == null ? Promise.resolve(void 0) : new Promise((E) => {
3292
+ return u != null && (u.data ?? (u.data = []), u.getAction != null ? r = u.getAction(u.data, h) : h != null ? r = (D = u.data) == null ? void 0 : D.find((E) => E.id == h) : u.path != null && ((i = u.data) == null ? void 0 : i.length) == 1 && (r = u.data[0])), r == null ? Promise.resolve(void 0) : new Promise((E) => {
3285
3293
  setTimeout(() => {
3286
3294
  E({
3287
3295
  data: r
@@ -3305,21 +3313,21 @@ function Nn(e) {
3305
3313
  });
3306
3314
  }
3307
3315
  function M(d) {
3308
- var r, y;
3316
+ var r, w;
3309
3317
  if (l == null)
3310
3318
  throw new Error("no demo data available for this api");
3311
3319
  const h = g(d);
3312
3320
  let u;
3313
- return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data, d.data) : d.data != null && (d.data.id == null && (d.data.id = ((((r = h.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), u = d.data, (y = h.data) == null || y.push(u))), u == null ? Promise.resolve(void 0) : new Promise((x) => {
3321
+ return h != null && (h.data ?? (h.data = []), h.postAction != null ? u = h.postAction(h.data, d.data) : d.data != null && (d.data.id == null && (d.data.id = ((((r = h.data) == null ? void 0 : r.length) ?? 0) + 1).toString()), u = d.data, (w = h.data) == null || w.push(u))), u == null ? Promise.resolve(void 0) : new Promise((D) => {
3314
3322
  setTimeout(() => {
3315
- x({
3323
+ D({
3316
3324
  data: u
3317
3325
  });
3318
3326
  });
3319
3327
  });
3320
3328
  }
3321
3329
  function $(d) {
3322
- var r, y;
3330
+ var r, w;
3323
3331
  if (l == null)
3324
3332
  throw new Error("no demo data available for this api");
3325
3333
  const h = g(d);
@@ -3328,24 +3336,24 @@ function Nn(e) {
3328
3336
  if (h.data ?? (h.data = []), h.patchAction != null)
3329
3337
  u = h.patchAction(h.data, d.data);
3330
3338
  else if (d.data.id != null) {
3331
- const x = (r = h.data) == null ? void 0 : r.findIndex((i) => i.id == d.data.id);
3332
- x != null && x > -1 && ((y = h.data) == null || y.splice(x, 1, d.data)), u = d.data;
3339
+ const D = (r = h.data) == null ? void 0 : r.findIndex((i) => i.id == d.data.id);
3340
+ D != null && D > -1 && ((w = h.data) == null || w.splice(D, 1, d.data)), u = d.data;
3333
3341
  }
3334
3342
  }
3335
- return u == null ? Promise.resolve(void 0) : new Promise((x) => {
3343
+ return u == null ? Promise.resolve(void 0) : new Promise((D) => {
3336
3344
  setTimeout(() => {
3337
- x({
3345
+ D({
3338
3346
  data: u
3339
3347
  });
3340
3348
  });
3341
3349
  });
3342
3350
  }
3343
3351
  return Tr = {
3344
- endDemo: f,
3352
+ endDemo: s,
3345
3353
  isDemoing: t,
3346
- startDemo: S,
3354
+ startDemo: A,
3347
3355
  data: l,
3348
- deleteItem: D,
3356
+ deleteItem: I,
3349
3357
  get: C,
3350
3358
  getAll: _,
3351
3359
  post: M,
@@ -3355,14 +3363,14 @@ function Nn(e) {
3355
3363
  var Rn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
3356
3364
  function Aa(e) {
3357
3365
  function t(l) {
3358
- var f;
3359
- const S = l.matched.slice().reverse().find((g) => g.meta && g.meta.title);
3360
- if (S)
3361
- document.title = S.meta.title;
3366
+ var s;
3367
+ const A = l.matched.slice().reverse().find((g) => g.meta && g.meta.title);
3368
+ if (A)
3369
+ document.title = A.meta.title;
3362
3370
  else {
3363
3371
  const g = Rn.VITE_NODE_ENV;
3364
- let D = "";
3365
- g == "development" ? D = "BWeb Dev" : g == "staging" ? D = "BlitzIt Sandpit" : D = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((f = e == null ? void 0 : e.demo) == null ? void 0 : f.isDemoing.value) == !0 && (D = `Training: ${D}`), document.title = D;
3372
+ let I = "";
3373
+ g == "development" ? I = "BWeb Dev" : g == "staging" ? I = "BlitzIt Sandpit" : I = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (I = `Training: ${I}`), document.title = I;
3366
3374
  }
3367
3375
  }
3368
3376
  return {
@@ -3374,102 +3382,102 @@ function Ea() {
3374
3382
  return _r;
3375
3383
  }
3376
3384
  function Un(e) {
3377
- function t(s, A, j) {
3378
- return s ? an(s) ? j ?? "" : e.dates.tzString(s, A) : j ?? s ?? "";
3385
+ function t(f, y, J) {
3386
+ return f ? an(f) ? J ?? "" : e.dates.tzString(f, y) : J ?? f ?? "";
3379
3387
  }
3380
- function l(s) {
3381
- if (!s)
3388
+ function l(f) {
3389
+ if (!f)
3382
3390
  return "";
3383
- if (typeof s != "object")
3384
- return s;
3385
- var A = "";
3386
- return s.companyAccount != null && (A = s.companyAccount.companyName + " | "), s.addressLineOne != null && (A = A + s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + ", "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A;
3387
- }
3388
- function S(s) {
3389
- if (typeof s != "number")
3390
- return s;
3391
- var A = new Intl.NumberFormat("en-US", {
3391
+ if (typeof f != "object")
3392
+ return f;
3393
+ var y = "";
3394
+ return f.companyAccount != null && (y = f.companyAccount.companyName + " | "), f.addressLineOne != null && (y = y + f.addressLineOne + " "), f.streetNumber != null && (y = y + f.streetNumber + " "), f.streetName != null && (y = y + f.streetName + ", "), f.suburb != null && (y = y + f.suburb + " "), f.state != null && (y = y + f.state + " "), f.postcode != null && (y = y + f.postcode), y;
3395
+ }
3396
+ function A(f) {
3397
+ if (typeof f != "number")
3398
+ return f;
3399
+ var y = new Intl.NumberFormat("en-US", {
3392
3400
  style: "currency",
3393
3401
  currency: "AUD",
3394
3402
  minimumFractionDigits: 2
3395
3403
  });
3396
- return A.format(s);
3404
+ return y.format(f);
3397
3405
  }
3398
- function f(s, A) {
3399
- return t(s, "ccc | d LLL", A);
3406
+ function s(f, y) {
3407
+ return t(f, "ccc | d LLL", y);
3400
3408
  }
3401
- function g(s, A) {
3402
- return t(s, "d LLL", A);
3409
+ function g(f, y) {
3410
+ return t(f, "d LLL", y);
3403
3411
  }
3404
- function D(s, A) {
3405
- return t(s, "ccc", A);
3412
+ function I(f, y) {
3413
+ return t(f, "ccc", y);
3406
3414
  }
3407
- function C(s, A) {
3408
- return t(s, "ccc dd LLL yyyy", A);
3415
+ function C(f, y) {
3416
+ return t(f, "ccc dd LLL yyyy", y);
3409
3417
  }
3410
- function _(s, A) {
3411
- return t(s, "ccc dd LLL @ hh:mm a", A);
3418
+ function _(f, y) {
3419
+ return t(f, "ccc dd LLL @ hh:mm a", y);
3412
3420
  }
3413
- function M(s) {
3414
- return new Intl.NumberFormat().format(s);
3421
+ function M(f) {
3422
+ return new Intl.NumberFormat().format(f);
3415
3423
  }
3416
- function $(s) {
3417
- return s == 0 ? "" : new Intl.NumberFormat().format(s);
3424
+ function $(f) {
3425
+ return f == 0 ? "" : new Intl.NumberFormat().format(f);
3418
3426
  }
3419
- function d(s) {
3420
- if (s == 0)
3427
+ function d(f) {
3428
+ if (f == 0)
3421
3429
  return "";
3422
- var A = new Intl.NumberFormat().format(s);
3423
- return s > 0 ? "+" + A : A;
3430
+ var y = new Intl.NumberFormat().format(f);
3431
+ return f > 0 ? "+" + y : y;
3424
3432
  }
3425
- function h(s, A) {
3426
- return e.dates.utcString(s, A);
3433
+ function h(f, y) {
3434
+ return e.dates.utcString(f, y);
3427
3435
  }
3428
- function u(s) {
3429
- return rt(s, !1);
3436
+ function u(f) {
3437
+ return rt(f, !1);
3430
3438
  }
3431
- function r(s) {
3432
- if (!s)
3439
+ function r(f) {
3440
+ if (!f)
3433
3441
  return "";
3434
- if (typeof s != "object")
3435
- return s;
3436
- var A = "";
3437
- return s.addressLineOne != null && (A = s.addressLineOne + " "), s.streetNumber != null && (A = A + s.streetNumber + " "), s.streetName != null && (A = A + s.streetName + " "), s.suburb != null && (A = A + s.suburb + " "), s.state != null && (A = A + s.state + " "), s.postcode != null && (A = A + s.postcode), A = A.replaceAll(",", " "), A;
3442
+ if (typeof f != "object")
3443
+ return f;
3444
+ var y = "";
3445
+ return f.addressLineOne != null && (y = f.addressLineOne + " "), f.streetNumber != null && (y = y + f.streetNumber + " "), f.streetName != null && (y = y + f.streetName + " "), f.suburb != null && (y = y + f.suburb + " "), f.state != null && (y = y + f.state + " "), f.postcode != null && (y = y + f.postcode), y = y.replaceAll(",", " "), y;
3438
3446
  }
3439
- function y(s, A) {
3440
- return t(s, "ddd DD MMM YYYY", A);
3447
+ function w(f, y) {
3448
+ return t(f, "ddd DD MMM YYYY", y);
3441
3449
  }
3442
- function x(s, A) {
3443
- return t(s, "ccc dd LLL yyyy hh:mm a", A);
3450
+ function D(f, y) {
3451
+ return t(f, "ccc dd LLL yyyy hh:mm a", y);
3444
3452
  }
3445
- function i(s) {
3446
- var A = new Intl.NumberFormat("en-US", {
3453
+ function i(f) {
3454
+ var y = new Intl.NumberFormat("en-US", {
3447
3455
  style: "percent",
3448
3456
  minimumFractionDigits: 2
3449
3457
  });
3450
- return A.format(s);
3458
+ return y.format(f);
3451
3459
  }
3452
- function E(s) {
3453
- return s.replaceAll(",", " ");
3460
+ function E(f) {
3461
+ return f.replaceAll(",", " ");
3454
3462
  }
3455
- function w(s, A) {
3456
- return t(s, "dd LLL yyyy", A);
3463
+ function b(f, y) {
3464
+ return t(f, "dd LLL yyyy", y);
3457
3465
  }
3458
- function L(s, A) {
3459
- return t(s, "dd LLL yyyy hh:mm a", A);
3466
+ function N(f, y) {
3467
+ return t(f, "dd LLL yyyy hh:mm a", y);
3460
3468
  }
3461
- function b(s, A) {
3462
- return t(s, "hh:mm a", A);
3469
+ function S(f, y) {
3470
+ return t(f, "hh:mm a", y);
3463
3471
  }
3464
- function T(s) {
3465
- return s == null ? "" : typeof s == "number" ? e.dates.tzDate().startOf("day").plus({ minutes: s }).toFormat("T") : typeof s == "string" ? e.dates.tzString(s, "t") : "unknown";
3472
+ function T(f) {
3473
+ return f == null ? "" : typeof f == "number" ? e.dates.tzDate().startOf("day").plus({ minutes: f }).toFormat("T") : typeof f == "string" ? e.dates.tzString(f, "t") : "unknown";
3466
3474
  }
3467
- const I = {
3475
+ const x = {
3468
3476
  toCompanyNameAndLocationLine: l,
3469
- toCurrency: S,
3470
- toDayDate: f,
3477
+ toCurrency: A,
3478
+ toDayDate: s,
3471
3479
  toDayMonth: g,
3472
- toDayOfWeek: D,
3480
+ toDayOfWeek: I,
3473
3481
  toDayShortDate: C,
3474
3482
  toDayShortDateAndTime: _,
3475
3483
  toDisplayNumber: M,
@@ -3478,33 +3486,33 @@ function Un(e) {
3478
3486
  toFormat: h,
3479
3487
  toLocationLine: u,
3480
3488
  toLocationLineNoCommas: r,
3481
- toLongDate: y,
3482
- toLongDateAndTime: x,
3489
+ toLongDate: w,
3490
+ toLongDateAndTime: D,
3483
3491
  toPercent: i,
3484
3492
  toPrettyCSV: E,
3485
- toShortDate: w,
3486
- toShortDateAndTime: L,
3487
- toTime: b,
3493
+ toShortDate: b,
3494
+ toShortDateAndTime: N,
3495
+ toTime: S,
3488
3496
  toTimeOfDay: T
3489
3497
  };
3490
- function N(s) {
3491
- if (s != null) {
3492
- let A = s;
3493
- if (A != null && I[A] != null)
3494
- return I[A];
3498
+ function L(f) {
3499
+ if (f != null) {
3500
+ let y = f;
3501
+ if (y != null && x[y] != null)
3502
+ return x[y];
3495
3503
  }
3496
- return (A) => A;
3504
+ return (y) => y;
3497
3505
  }
3498
3506
  return _r = {
3499
- findFilter: N,
3500
- ...I
3507
+ findFilter: L,
3508
+ ...x
3501
3509
  }, _r;
3502
3510
  }
3503
3511
  function Bn(e, t) {
3504
- const l = z(!1), S = Yt(e);
3505
- let f = g(Q(e));
3506
- (t == null ? void 0 : t.useTracker) !== !1 && Te(S, (C) => {
3507
- l.value = g(C) != f;
3512
+ const l = z(!1), A = Yt(e);
3513
+ let s = g(Q(e));
3514
+ (t == null ? void 0 : t.useTracker) !== !1 && Te(A, (C) => {
3515
+ l.value = g(C) != s;
3508
3516
  }, { deep: !0 });
3509
3517
  function g(C) {
3510
3518
  const _ = Nr(C);
@@ -3514,13 +3522,13 @@ function Bn(e, t) {
3514
3522
  t.propsToTrack.some((d) => d == $) || delete _[$];
3515
3523
  })), JSON.stringify(_);
3516
3524
  }
3517
- function D() {
3518
- f = g(Q(S)), l.value = !1;
3525
+ function I() {
3526
+ s = g(Q(A)), l.value = !1;
3519
3527
  }
3520
3528
  return {
3521
- asyncItem: S,
3529
+ asyncItem: A,
3522
3530
  isChanged: l,
3523
- restartTracker: D
3531
+ restartTracker: I
3524
3532
  };
3525
3533
  }
3526
3534
  function Ia(e, t) {
@@ -3528,32 +3536,32 @@ function Ia(e, t) {
3528
3536
  const {
3529
3537
  // useBladeSrc = true,
3530
3538
  useRouteSrc: l = !0
3531
- } = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), f = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", D = Lr(), C = et(), _ = Q(e.proxyQueryKey), M = ee(() => {
3539
+ } = t ?? {}, A = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", I = Lr(), C = et(), _ = Q(e.proxyQueryKey), M = ee(() => {
3532
3540
  var W;
3533
3541
  return Q(e.proxyID) ?? (_ != null ? (W = C == null ? void 0 : C.query) == null ? void 0 : W[_] : void 0);
3534
- }), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: x, saveItem: i } = ut({
3542
+ }), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: w, restoreItem: D, saveItem: i } = ut({
3535
3543
  nav: g,
3536
3544
  onError: e.onError ?? (t == null ? void 0 : t.onError),
3537
3545
  proxyID: M.value,
3538
3546
  store: Le({
3539
- storeMode: S,
3540
- storageMode: f,
3547
+ storeMode: A,
3548
+ storageMode: s,
3541
3549
  nav: g
3542
3550
  })
3543
- }), E = ee(() => e.errorMsg ?? d.value), w = ee(() => e.loadingMsg ?? h.value), L = ee(() => w.value != null), b = z(e.itemID ?? (l ? (Z = C == null ? void 0 : C.params) == null ? void 0 : Z.id : void 0)), T = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), I = Ne(!1), N = ee(() => {
3551
+ }), E = ee(() => e.errorMsg ?? d.value), b = ee(() => e.loadingMsg ?? h.value), N = ee(() => b.value != null), S = z(e.itemID ?? (l ? (Z = C == null ? void 0 : C.params) == null ? void 0 : Z.id : void 0)), T = z(S.value == "new" ? "new" : e.startEditing ? "edit" : "view"), x = Ne(!1), L = ee(() => {
3544
3552
  let W = e.params != null ? { ...e.params } : {};
3545
3553
  return e.includeDetails != null && (W.includeDetails = e.includeDetails), W;
3546
- }), s = ee(() => {
3554
+ }), f = ee(() => {
3547
3555
  if (T.value == "new")
3548
3556
  return !1;
3549
3557
  const W = Q($);
3550
3558
  return e.onCanDelete != null ? e.onCanDelete(W) : (W == null ? void 0 : W.isInactive) !== !0;
3551
- }), A = ee(() => {
3559
+ }), y = ee(() => {
3552
3560
  if (T.value == "new")
3553
3561
  return !1;
3554
3562
  const W = Q($);
3555
3563
  return e.onCanEdit != null ? e.onCanEdit(W) : !0;
3556
- }), j = ee(() => {
3564
+ }), J = ee(() => {
3557
3565
  if (T.value == "new")
3558
3566
  return !1;
3559
3567
  const W = Q($);
@@ -3570,7 +3578,7 @@ function Ia(e, t) {
3570
3578
  const {
3571
3579
  additionalUrl: ne,
3572
3580
  onDeleteAsync: ce,
3573
- onDeleteSuccessAsync: se = () => (D.back(), Promise.resolve(void 0)),
3581
+ onDeleteSuccessAsync: se = () => (I.back(), Promise.resolve(void 0)),
3574
3582
  proxyID: ge
3575
3583
  } = { ...e };
3576
3584
  u({
@@ -3592,7 +3600,7 @@ function Ia(e, t) {
3592
3600
  onRestoreSuccessAsync: se,
3593
3601
  proxyID: ge
3594
3602
  } = { ...e };
3595
- x({
3603
+ D({
3596
3604
  additionalUrl: ne,
3597
3605
  data: W,
3598
3606
  nav: g,
@@ -3604,15 +3612,15 @@ function Ia(e, t) {
3604
3612
  });
3605
3613
  }
3606
3614
  async function Y(W) {
3607
- if (I.value = !1, e.item != null)
3615
+ if (x.value = !1, e.item != null)
3608
3616
  $.value = e.item;
3609
3617
  else {
3610
3618
  const ne = {
3611
3619
  additionalUrl: e.additionalUrl,
3612
- id: b.value,
3620
+ id: S.value,
3613
3621
  nav: g,
3614
3622
  proxyID: M.value,
3615
- params: N.value,
3623
+ params: L.value,
3616
3624
  //props.params,
3617
3625
  // ...(useBladeSrc ? bladeData.value : {}),
3618
3626
  refresh: (W == null ? void 0 : W.deepRefresh) ?? !1,
@@ -3622,7 +3630,7 @@ function Ia(e, t) {
3622
3630
  if (e.isSingle === !0)
3623
3631
  ne.id === "new" ? $.value = e.onGetNew ? e.onGetNew() : {} : $.value = await r(ne);
3624
3632
  else {
3625
- const ce = await y(ne);
3633
+ const ce = await w(ne);
3626
3634
  $.value = ce.data;
3627
3635
  }
3628
3636
  }
@@ -3634,7 +3642,7 @@ function Ia(e, t) {
3634
3642
  onCanSaveAsync: se,
3635
3643
  onGetSaveAsync: ge,
3636
3644
  onSaveAsync: Be,
3637
- onSaveSuccessAsync: $e = (Fe) => ((ne == null ? void 0 : ne.navBack) === !0 ? D.back() : (W.rowVersion != null && Fe.rowVersion != null && (W.rowVersion = Fe.rowVersion), ue(), T.value = "view"), Promise.resolve(void 0))
3645
+ onSaveSuccessAsync: $e = (Fe) => ((ne == null ? void 0 : ne.navBack) === !0 ? I.back() : (W.rowVersion != null && Fe.rowVersion != null && (W.rowVersion = Fe.rowVersion), ue(), T.value = "view"), Promise.resolve(void 0))
3638
3646
  } = { ...e };
3639
3647
  i({
3640
3648
  additionalUrl: ce,
@@ -3655,7 +3663,7 @@ function Ia(e, t) {
3655
3663
  !W || W == "view" ? T.value = "edit" : W == "edit" && (T.value = "view");
3656
3664
  }
3657
3665
  return Te(E, (W) => {
3658
- I.value = W != null;
3666
+ x.value = W != null;
3659
3667
  }), Te(() => e.refreshToggle, () => {
3660
3668
  Y({ deepRefresh: !0 });
3661
3669
  }), Xr(async () => {
@@ -3666,19 +3674,19 @@ function Ia(e, t) {
3666
3674
  deleteItem: be,
3667
3675
  errorMsg: E,
3668
3676
  isChanged: re,
3669
- isDeletable: s,
3677
+ isDeletable: f,
3670
3678
  isEditing: ee(() => T.value == "new" || T.value == "edit"),
3671
- isEditable: A,
3672
- isLoading: L,
3679
+ isEditable: y,
3680
+ isLoading: N,
3673
3681
  isNew: ee(() => T.value == "new"),
3674
- isRestorable: j,
3682
+ isRestorable: J,
3675
3683
  isSaveable: X,
3676
- loadingMsg: w,
3684
+ loadingMsg: b,
3677
3685
  mode: T,
3678
3686
  refresh: Y,
3679
3687
  restoreItem: G,
3680
3688
  saveItem: H,
3681
- showError: I,
3689
+ showError: x,
3682
3690
  toggleMode: ie
3683
3691
  };
3684
3692
  }
@@ -3699,11 +3707,11 @@ function $n(e) {
3699
3707
  displayName: h.displayName ?? e.getDisplayName(h),
3700
3708
  ...h
3701
3709
  }));
3702
- function S(h) {
3710
+ function A(h) {
3703
3711
  var u;
3704
3712
  return (u = C(h)) == null ? void 0 : u.archiveName;
3705
3713
  }
3706
- function f(h) {
3714
+ function s(h) {
3707
3715
  var u;
3708
3716
  return ((u = C(h)) == null ? void 0 : u.cacheExpiryHours) ?? t;
3709
3717
  }
@@ -3711,14 +3719,14 @@ function $n(e) {
3711
3719
  var u;
3712
3720
  return (u = C(h)) == null ? void 0 : u.displayName;
3713
3721
  }
3714
- function D(h) {
3722
+ function I(h) {
3715
3723
  var u;
3716
3724
  return (u = C(h)) == null ? void 0 : u.icon;
3717
3725
  }
3718
3726
  function C(h) {
3719
3727
  return h == null ? null : typeof h != "string" ? h : tt(l, (r) => r.children).find((r) => {
3720
- var y;
3721
- return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((x) => x == h));
3728
+ var w;
3729
+ return r.name == h || r.singleName == h || ((w = r.aliases) == null ? void 0 : w.some((D) => D == h));
3722
3730
  }) ?? null;
3723
3731
  }
3724
3732
  function _(h) {
@@ -3754,10 +3762,10 @@ function $n(e) {
3754
3762
  backgroundName: Yr,
3755
3763
  hesitate: gr,
3756
3764
  navigationItems: l,
3757
- findArchiveName: S,
3758
- findCacheHours: f,
3765
+ findArchiveName: A,
3766
+ findCacheHours: s,
3759
3767
  findDisplay: g,
3760
- findIcon: D,
3768
+ findIcon: I,
3761
3769
  findItem: C,
3762
3770
  findStoreName: $,
3763
3771
  findPath: _,
@@ -3767,14 +3775,14 @@ function $n(e) {
3767
3775
  }
3768
3776
  function Da(e, t, l) {
3769
3777
  var He, Ve;
3770
- const S = Mn(), f = it(), g = Lr(), D = et(), { bladeData: C } = Cn({}), _ = e.useBladeSrc ?? !0, M = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((He = f.findItem($)) == null ? void 0 : He.storeMode), h = e.storageMode ?? ((Ve = f.findItem($)) == null ? void 0 : Ve.storageMode), u = Q(e.customFilters) ?? [], r = z([]), y = ee(() => Kt([
3778
+ const A = Mn(), s = it(), g = Lr(), I = et(), { bladeData: C } = Cn({}), _ = e.useBladeSrc ?? !0, M = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((He = s.findItem($)) == null ? void 0 : He.storeMode), h = e.storageMode ?? ((Ve = s.findItem($)) == null ? void 0 : Ve.storageMode), u = Q(e.customFilters) ?? [], r = z([]), w = ee(() => Kt([
3771
3779
  ...u.filter((U) => U.name != null).map((U) => U.name),
3772
3780
  ...e.defaultFilters ?? [],
3773
3781
  ...r.value
3774
- ]).value), x = z((e.defaultFilters ?? []).map((U) => y.value.indexOf(U)));
3775
- let i = z([...x.value]);
3776
- const E = ee(() => Gr(i, x).value.length > 0 || Gr(x, i).value.length > 0), w = z(L());
3777
- function L() {
3782
+ ]).value), D = z((e.defaultFilters ?? []).map((U) => w.value.indexOf(U)));
3783
+ let i = z([...D.value]);
3784
+ const E = ee(() => Gr(i, D).value.length > 0 || Gr(D, i).value.length > 0), b = z(N());
3785
+ function N() {
3778
3786
  var U, K;
3779
3787
  if (_) {
3780
3788
  const V = (U = C.value) == null ? void 0 : U.page;
@@ -3782,13 +3790,13 @@ function Da(e, t, l) {
3782
3790
  return Number.parseInt(V);
3783
3791
  }
3784
3792
  if (M) {
3785
- const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.page;
3793
+ const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.page;
3786
3794
  if (V != null)
3787
3795
  return Number.parseInt(typeof V == "string" ? V : V.toString());
3788
3796
  }
3789
3797
  return 1;
3790
3798
  }
3791
- const b = ee(() => {
3799
+ const S = ee(() => {
3792
3800
  var U, K;
3793
3801
  if (_) {
3794
3802
  const V = (U = C.value) == null ? void 0 : U.proxyID;
@@ -3796,13 +3804,13 @@ function Da(e, t, l) {
3796
3804
  return V;
3797
3805
  }
3798
3806
  if (M) {
3799
- const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.query;
3807
+ const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.query;
3800
3808
  if (V != null)
3801
3809
  return V;
3802
3810
  }
3803
3811
  return e.proxyID;
3804
- }), T = z(I());
3805
- function I() {
3812
+ }), T = z(x());
3813
+ function x() {
3806
3814
  var U, K;
3807
3815
  if (_) {
3808
3816
  const V = (U = C.value) == null ? void 0 : U.search;
@@ -3810,20 +3818,20 @@ function Da(e, t, l) {
3810
3818
  return V;
3811
3819
  }
3812
3820
  if (M) {
3813
- const V = (K = D == null ? void 0 : D.query) == null ? void 0 : K.search;
3821
+ const V = (K = I == null ? void 0 : I.query) == null ? void 0 : K.search;
3814
3822
  if (V != null)
3815
3823
  return V;
3816
3824
  }
3817
3825
  }
3818
- const N = z(Q(e.startShowingInactive) ?? !1), s = ee(() => [
3826
+ const L = z(Q(e.startShowingInactive) ?? !1), f = ee(() => [
3819
3827
  ...e.searchProps ?? [],
3820
3828
  ...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
3821
- ]), A = z([]), j = Ne([]), X = z([]);
3829
+ ]), y = z([]), J = Ne([]), X = z([]);
3822
3830
  let re;
3823
3831
  const { actionErrorMsg: ue, actionLoadingMsg: be, deleteItem: G, doAction: Y, getItem: H, getAllItems: ie, restoreItem: Z } = ut({
3824
3832
  nav: $,
3825
3833
  onError: e.onError ?? (l == null ? void 0 : l.onError),
3826
- proxyID: b.value,
3834
+ proxyID: S.value,
3827
3835
  store: Le({
3828
3836
  storeMode: d,
3829
3837
  storageMode: h,
@@ -3831,8 +3839,8 @@ function Da(e, t, l) {
3831
3839
  })
3832
3840
  }), W = ee(() => e.errorMsg ?? ue.value), ne = ee(() => e.loadingMsg ?? be.value), ce = ee(() => ne.value != null), se = Ne(!1), ge = Ne(e.showSearch ?? !0), Be = z(0), $e = ee(() => {
3833
3841
  let U, K = [];
3834
- x.value.forEach((O) => {
3835
- const de = y.value[O], ye = u.find((De) => De.name == de);
3842
+ D.value.forEach((O) => {
3843
+ const de = w.value[O], ye = u.find((De) => De.name == de);
3836
3844
  ye != null ? U = U != null ? `${U}ANDALSO${ye.filterFunction()}` : ye.filterFunction() : K.push(de);
3837
3845
  });
3838
3846
  const V = {};
@@ -3840,8 +3848,8 @@ function Da(e, t, l) {
3840
3848
  }), Fe = ee(() => {
3841
3849
  var K;
3842
3850
  let U = e.params != null ? { ...e.params } : {};
3843
- return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }), N.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (K = e.selectProps) == null ? void 0 : K.toString()), T.value != null && (U.searchString = T.value), U;
3844
- }), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) => N.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Ce = ee(() => X.value.filter((U) => !U.hide)), ar = ee(() => {
3851
+ return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (b.value - 1) * e.itemsPerPage), $e.value != null && (U = { ...U, ...$e.value }), L.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (K = e.selectProps) == null ? void 0 : K.toString()), T.value != null && (U.searchString = T.value), U;
3852
+ }), tr = ee(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = ee(() => (U) => L.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Ce = ee(() => X.value.filter((U) => !U.hide)), ar = ee(() => {
3845
3853
  let U = new Array();
3846
3854
  return Ce.value.filter((V) => V.sublevel != null).forEach((V) => {
3847
3855
  let O = U.find((de) => de.position == V.sublevel);
@@ -3873,14 +3881,14 @@ function Da(e, t, l) {
3873
3881
  onDeleteAsync: V
3874
3882
  } = { ...e }, O = Q(U), de = O.id, ye = (De) => {
3875
3883
  if (De != null) {
3876
- let Ae = A.value.findIndex((oe) => oe.id == De);
3877
- if (Ae > -1 && A.value.splice(Ae, 1), e.items != null) {
3884
+ let Ae = y.value.findIndex((oe) => oe.id == De);
3885
+ if (Ae > -1 && y.value.splice(Ae, 1), e.items != null) {
3878
3886
  let oe = e.items.findIndex((Me) => Me.id == De);
3879
3887
  oe > -1 && e.items.splice(oe, 1);
3880
3888
  }
3881
3889
  } else {
3882
- let Ae = A.value.findIndex((oe) => oe === O);
3883
- if (Ae == -1 && (Ae = A.value.findIndex((oe) => oe == O)), Ae > -1 && A.value.splice(Ae, 1), e.items != null) {
3890
+ let Ae = y.value.findIndex((oe) => oe === O);
3891
+ if (Ae == -1 && (Ae = y.value.findIndex((oe) => oe == O)), Ae > -1 && y.value.splice(Ae, 1), e.items != null) {
3884
3892
  let oe = e.items.findIndex((Me) => Me === O);
3885
3893
  oe == -1 && (oe = e.items.findIndex((Me) => Me == O)), oe > -1 && e.items.splice(oe, 1);
3886
3894
  }
@@ -3893,7 +3901,7 @@ function Da(e, t, l) {
3893
3901
  onCanDeleteAsync: e.onCanDeleteAsync,
3894
3902
  onDeleteAsync: V,
3895
3903
  onDeleteSuccessAsync: async () => (ye(de), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
3896
- proxyID: b.value,
3904
+ proxyID: S.value,
3897
3905
  // ...(useBladeSrc ? bladeData.value : {}),
3898
3906
  requireConfirmation: !0
3899
3907
  }), t && t("deleted", U);
@@ -3906,22 +3914,22 @@ function Da(e, t, l) {
3906
3914
  onCanRestoreAsync: e.onCanRestoreAsync,
3907
3915
  onRestoreAsync: e.onRestoreAsync,
3908
3916
  onRestoreSuccessAsync: e.onRestoreSuccessAsync,
3909
- proxyID: b.value
3917
+ proxyID: S.value
3910
3918
  // ...(useBladeSrc ? bladeData.value : {})
3911
3919
  });
3912
3920
  }
3913
3921
  function ke() {
3914
3922
  Y(() => {
3915
- S.exportToCSV(Ce.value, j.value);
3923
+ A.exportToCSV(Ce.value, J.value);
3916
3924
  }, { loadingMsg: "Exporting to CSV" });
3917
3925
  }
3918
3926
  function Pe() {
3919
- let U = Q(A);
3927
+ let U = Q(y);
3920
3928
  if (U = e.onFilter ? e.onFilter(U) : U, T.value != null && T.value.length > 0) {
3921
- let K = [...s.value];
3929
+ let K = [...f.value];
3922
3930
  e.itemText && K.push(e.itemText), _e(K) && (U = U.filter((V) => dn(V, T.value, K)));
3923
3931
  }
3924
- j.value = U;
3932
+ J.value = U;
3925
3933
  }
3926
3934
  function qe() {
3927
3935
  const U = (l == null ? void 0 : l.hideActions) ?? e.hideActions;
@@ -3929,7 +3937,7 @@ function Da(e, t, l) {
3929
3937
  }
3930
3938
  async function Ie(U) {
3931
3939
  if (se.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (ge.value = e.showSearch ?? !1, T.value = void 0), e.items != null) {
3932
- A.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
3940
+ y.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
3933
3941
  return;
3934
3942
  }
3935
3943
  const K = {
@@ -3939,7 +3947,7 @@ function Da(e, t, l) {
3939
3947
  params: Fe.value,
3940
3948
  //params,
3941
3949
  // params: params.getParamOptions(),
3942
- proxyID: b.value,
3950
+ proxyID: S.value,
3943
3951
  // ...(useBladeSrc ? bladeData.value : {}),
3944
3952
  // ...(props.useInterEvents ? eventData : {}),
3945
3953
  refresh: (U == null ? void 0 : U.deepRefresh) ?? !1,
@@ -3947,16 +3955,17 @@ function Da(e, t, l) {
3947
3955
  onGetSuccessAsync: e.onGetSuccessAsync
3948
3956
  };
3949
3957
  if (e.isSingle === !0)
3950
- K.id === "new" ? A.value = [] : A.value = await H(K);
3958
+ K.id === "new" ? y.value = [] : y.value = await H(K);
3951
3959
  else {
3952
3960
  let V = await ie({
3953
3961
  ...K,
3954
3962
  onGetSuccessAsync: async (O, de) => {
3963
+ console.log("get suc"), console.log(O);
3955
3964
  let ye = O == null ? void 0 : O.data;
3956
3965
  return r.value = (O == null ? void 0 : O.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && O.count && (Be.value = Math.ceil(O.count / e.itemsPerPage)), e.onGetSuccessAsync != null && (ye = await e.onGetSuccessAsync(ye, de)), ye;
3957
3966
  }
3958
3967
  });
3959
- A.value = V, i.value = [...x.value];
3968
+ console.log("list res"), console.log(V), y.value = V, i.value = [...D.value];
3960
3969
  }
3961
3970
  Pe();
3962
3971
  }
@@ -3983,27 +3992,27 @@ function Da(e, t, l) {
3983
3992
  }
3984
3993
  return qe(), Qt([T], () => {
3985
3994
  Pe();
3986
- }, { debounce: 500, maxWait: 500 }), Te([N, w], async () => {
3995
+ }, { debounce: 500, maxWait: 500 }), Te([L, b], async () => {
3987
3996
  await Ie();
3988
3997
  }), Te([W, () => e.errorMsg], ([U, K]) => {
3989
3998
  se.value = U != null || K != null;
3990
3999
  }), Te(() => e.refreshToggle, () => {
3991
4000
  Ie({ deepRefresh: !0 });
3992
- }), Or([A, () => e.items], () => {
4001
+ }), Or([y, () => e.items], () => {
3993
4002
  Pe();
3994
4003
  }), Xr(async () => {
3995
4004
  var U;
3996
- e.eager == !0 && await Ie({ deepRefresh: ((U = D == null ? void 0 : D.params) == null ? void 0 : U.refresh) == "true" });
4005
+ e.eager == !0 && await Ie({ deepRefresh: ((U = I == null ? void 0 : I.params) == null ? void 0 : U.refresh) == "true" });
3997
4006
  }), {
3998
4007
  add: Se,
3999
- asyncItems: A,
4000
- currentPage: w,
4008
+ asyncItems: y,
4009
+ currentPage: b,
4001
4010
  deleteItem: ir,
4002
4011
  displayHeaders: ur,
4003
4012
  errorMsg: W,
4004
4013
  exportToCSV: ke,
4005
- filteredItems: j,
4006
- filters: y,
4014
+ filteredItems: J,
4015
+ filters: w,
4007
4016
  filtersChanged: E,
4008
4017
  headerOptions: X,
4009
4018
  isDeletable: tr,
@@ -4013,11 +4022,11 @@ function Da(e, t, l) {
4013
4022
  refresh: Ie,
4014
4023
  restoreItem: Je,
4015
4024
  searchString: T,
4016
- selectedFilters: x,
4025
+ selectedFilters: D,
4017
4026
  selectItem: je,
4018
4027
  // serverFilters,
4019
4028
  showError: se,
4020
- showInactive: N,
4029
+ showInactive: L,
4021
4030
  showSearch: ge,
4022
4031
  subtitleOptions: ar,
4023
4032
  tableHeaders: Ce,
@@ -4037,35 +4046,35 @@ function Fn(e) {
4037
4046
  }
4038
4047
  function xa() {
4039
4048
  const e = Lr(), t = it(), l = In();
4040
- let S = e.getRoutes();
4049
+ let A = e.getRoutes();
4041
4050
  return {
4042
4051
  ...We,
4043
4052
  sidebarNavItems: ee(() => {
4044
4053
  var g;
4045
- S = S.filter((D) => D.meta != null && D.meta.menuGroup != null);
4046
- const f = [];
4047
- return S.forEach((D) => {
4054
+ A = A.filter((I) => I.meta != null && I.meta.menuGroup != null);
4055
+ const s = [];
4056
+ return A.forEach((I) => {
4048
4057
  var d;
4049
- const C = We.groupOptions.value.find((h) => h.displayName == D.meta.menuGroup), _ = t.findItem(D.meta.nav), M = D.meta;
4050
- let $ = f.find((h) => h.displayName == M.menuGroup);
4058
+ const C = We.groupOptions.value.find((h) => h.displayName == I.meta.menuGroup), _ = t.findItem(I.meta.nav), M = I.meta;
4059
+ let $ = s.find((h) => h.displayName == M.menuGroup);
4051
4060
  $ == null && ($ = {
4052
4061
  displayName: M.menuGroup,
4053
4062
  icon: (C == null ? void 0 : C.icon) ?? (M == null ? void 0 : M.icon) ?? (_ == null ? void 0 : _.icon),
4054
4063
  isGroup: !0,
4055
4064
  items: []
4056
- }, f.push($)), (d = $.items) == null || d.push({
4065
+ }, s.push($)), (d = $.items) == null || d.push({
4057
4066
  displayName: (M == null ? void 0 : M.displayName) ?? t.findDisplay(_ ?? void 0),
4058
4067
  icon: (M == null ? void 0 : M.icon) ?? t.findIcon(_ ?? void 0),
4059
4068
  permissions: (M == null ? void 0 : M.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
4060
4069
  requiresAuth: (M == null ? void 0 : M.requiresAuth) !== !1,
4061
4070
  subscriptions: (M == null ? void 0 : M.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
4062
4071
  subFilters: (M == null ? void 0 : M.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
4063
- routeName: D.name
4072
+ routeName: I.name
4064
4073
  });
4065
- }), f.forEach((D) => {
4074
+ }), s.forEach((I) => {
4066
4075
  var C;
4067
- D.items = (C = D.items) == null ? void 0 : C.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Re.firstBy((_) => _.displayName));
4068
- }), We.currentGroup.value != null ? ((g = f.find((D) => D.displayName == We.currentGroup.value)) == null ? void 0 : g.items) ?? [] : f.filter((D) => !D.requiresAuth || l.doShow(D.subscriptions, D.permissions, "view"));
4076
+ I.items = (C = I.items) == null ? void 0 : C.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Re.firstBy((_) => _.displayName));
4077
+ }), We.currentGroup.value != null ? ((g = s.find((I) => I.displayName == We.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((I) => !I.requiresAuth || l.doShow(I.subscriptions, I.permissions, "view"));
4069
4078
  })
4070
4079
  };
4071
4080
  }
@@ -4077,8 +4086,8 @@ function kn(e) {
4077
4086
  function t(l) {
4078
4087
  if (!l)
4079
4088
  return {};
4080
- let S = l;
4081
- return e.presets[S] ?? {};
4089
+ let A = l;
4090
+ return e.presets[A] ?? {};
4082
4091
  }
4083
4092
  return Pr = {
4084
4093
  usePresets: t
@@ -4091,32 +4100,32 @@ function _a() {
4091
4100
  return Mr;
4092
4101
  }
4093
4102
  function Gn() {
4094
- function e(D) {
4095
- er.value = D.detail, br.value = !0;
4103
+ function e(I) {
4104
+ er.value = I.detail, br.value = !0;
4096
4105
  }
4097
4106
  function t() {
4098
4107
  Kr || (Kr = !0, window.location.reload());
4099
4108
  }
4100
4109
  function l() {
4101
- var D;
4102
- (D = Qr.value) == null || D.prompt(), wr.value = !1;
4110
+ var I;
4111
+ (I = Qr.value) == null || I.prompt(), wr.value = !1;
4103
4112
  }
4104
- function S() {
4113
+ function A() {
4105
4114
  return !!window.matchMedia("(display-mode: standalone)").matches;
4106
4115
  }
4107
- function f(D) {
4108
- D.preventDefault(), wr.value = !0, Qr.value = D;
4116
+ function s(I) {
4117
+ I.preventDefault(), wr.value = !0, Qr.value = I;
4109
4118
  }
4110
4119
  function g() {
4111
4120
  br.value = !1, !(!er.value || !er.value.waiting) && er.value.waiting.postMessage({ type: "SKIP_WAITING" });
4112
4121
  }
4113
4122
  return Xt(() => {
4114
- Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", f));
4123
+ Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", s));
4115
4124
  }), Mr = {
4116
4125
  canInstallApp: wr,
4117
4126
  canUpdateApp: br,
4118
4127
  installApp: l,
4119
- isInstalled: S,
4128
+ isInstalled: A,
4120
4129
  updateApp: g
4121
4130
  }, Mr;
4122
4131
  }
@@ -4129,13 +4138,13 @@ function Pa(e) {
4129
4138
  install(t, l) {
4130
4139
  var _;
4131
4140
  console.log(t), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), yn(e.urls), Pn(e);
4132
- const S = Nn(), f = $n(e);
4133
- kn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = f.findItem;
4141
+ const A = Nn(), s = $n(e);
4142
+ kn(e), (_ = e.auth).demo ?? (_.demo = A), e.auth.getAuthItem = s.findItem;
4134
4143
  const g = Dn(e.auth);
4135
4144
  Fn(e.menu);
4136
- const D = En({
4145
+ const I = En({
4137
4146
  auth: g,
4138
- findPath: f.findPath,
4147
+ findPath: s.findPath,
4139
4148
  useBearerToken: !0
4140
4149
  }), C = Ln({
4141
4150
  getTimeZone: () => g.timeZone.value
@@ -4143,9 +4152,9 @@ function Pa(e) {
4143
4152
  Un({
4144
4153
  dates: C
4145
4154
  }), Gn(), wn({
4146
- api: D,
4155
+ api: I,
4147
4156
  auth: g,
4148
- navigation: f
4157
+ navigation: s
4149
4158
  });
4150
4159
  }
4151
4160
  };