bt-core-app 1.4.88 → 1.4.90
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.
- package/dist/bt-core-app.js +742 -738
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { ref as z, shallowRef as Re, computed as te, toValue as K, watch as
|
|
2
|
-
import { watchArray as Or, useStorage as
|
|
1
|
+
import { ref as z, shallowRef as Re, computed as te, toValue as K, watch as Te, toRef as Yt, onMounted as Xr, defineComponent as Zt, openBlock as Jt, createElementBlock as jt, createVNode as Kt, unref as Qt, withCtx as Xt, createTextVNode as Ot } from "vue";
|
|
2
|
+
import { watchArray as Or, useStorage as pt, useEventListener as me, toValue as Ae, useParentElement as en, useResizeObserver as rn, useArrayUnique as tn, useArrayDifference as Gr, watchDebounced as nn, tryOnMounted as an } from "@vueuse/core";
|
|
3
3
|
import { defineStore as pr } from "pinia";
|
|
4
4
|
import { DateTime as he } from "luxon";
|
|
5
5
|
import { useRouter as Mr, useRoute as et } from "vue-router";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { VBtn as ln } from "vuetify/components";
|
|
7
|
+
function un(e) {
|
|
8
|
+
return (e || "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").replace(/[xy]/g, cn);
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
+
function cn(e) {
|
|
10
11
|
const t = Math.random() * 16 | 0;
|
|
11
12
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
const t = z([]), l = Re(), S = Re(),
|
|
14
|
+
function fn(e) {
|
|
15
|
+
const t = z([]), l = Re(), S = Re(), s = Re(), g = te(() => l.value != null);
|
|
15
16
|
function x(d) {
|
|
16
17
|
t.value = t.value.filter((h) => h.id != d);
|
|
17
18
|
}
|
|
18
19
|
function P(d) {
|
|
19
20
|
const h = {
|
|
20
|
-
id:
|
|
21
|
+
id: un(),
|
|
21
22
|
msg: d ?? "Loading"
|
|
22
23
|
};
|
|
23
24
|
return t.value.push(h), h.id;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function _(d) {
|
|
26
27
|
d != null && (S.value = d.toString());
|
|
27
28
|
}
|
|
28
29
|
function N() {
|
|
@@ -34,14 +35,14 @@ function tn(e) {
|
|
|
34
35
|
const r = P(u.loadingMsg);
|
|
35
36
|
let y = null;
|
|
36
37
|
try {
|
|
37
|
-
return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (
|
|
38
|
+
return u.requireConfirmation || u.confirmationMsg, y = await d(), u.completionMsg != null && (s.value = u.completionMsg), y;
|
|
38
39
|
} catch (I) {
|
|
39
40
|
if ((e == null ? void 0 : e.onError) != null)
|
|
40
41
|
e.onError(I);
|
|
41
42
|
else {
|
|
42
43
|
if (u.throwError == !0)
|
|
43
44
|
return I;
|
|
44
|
-
|
|
45
|
+
_(u.errorMsg ?? I ?? "error");
|
|
45
46
|
}
|
|
46
47
|
} finally {
|
|
47
48
|
x(r);
|
|
@@ -52,49 +53,49 @@ function tn(e) {
|
|
|
52
53
|
}, { deep: !0 }), {
|
|
53
54
|
actionErrorMsg: S,
|
|
54
55
|
actionLoadingMsg: l,
|
|
55
|
-
actionCompleteMsg:
|
|
56
|
+
actionCompleteMsg: s,
|
|
56
57
|
clearErrors: N,
|
|
57
58
|
doAction: $,
|
|
58
59
|
isLoading: g,
|
|
59
|
-
logError:
|
|
60
|
+
logError: _
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
63
|
var Qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
63
|
-
function
|
|
64
|
+
function sn(e) {
|
|
64
65
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
65
66
|
}
|
|
66
67
|
var Ue = function() {
|
|
67
|
-
function e(
|
|
68
|
-
return
|
|
68
|
+
function e(s) {
|
|
69
|
+
return s;
|
|
69
70
|
}
|
|
70
|
-
function t(
|
|
71
|
-
return typeof
|
|
71
|
+
function t(s) {
|
|
72
|
+
return typeof s == "string" ? s.toLowerCase() : s;
|
|
72
73
|
}
|
|
73
|
-
function l(
|
|
74
|
-
if (g = typeof g == "object" ? g : { direction: g }, typeof
|
|
75
|
-
var x =
|
|
76
|
-
|
|
74
|
+
function l(s, g) {
|
|
75
|
+
if (g = typeof g == "object" ? g : { direction: g }, typeof s != "function") {
|
|
76
|
+
var x = s;
|
|
77
|
+
s = function(d) {
|
|
77
78
|
return d[x] ? d[x] : "";
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
|
-
if (
|
|
81
|
-
var P =
|
|
81
|
+
if (s.length === 1) {
|
|
82
|
+
var P = s, _ = g.ignoreCase ? t : e, N = g.cmp || function(d, h) {
|
|
82
83
|
return d < h ? -1 : d > h ? 1 : 0;
|
|
83
84
|
};
|
|
84
|
-
|
|
85
|
-
return N(
|
|
85
|
+
s = function(d, h) {
|
|
86
|
+
return N(_(P(d)), _(P(h)));
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
const $ = { "-1": "", desc: "" };
|
|
89
90
|
return g.direction in $ ? function(d, h) {
|
|
90
|
-
return -
|
|
91
|
-
} :
|
|
91
|
+
return -s(d, h);
|
|
92
|
+
} : s;
|
|
92
93
|
}
|
|
93
|
-
function S(
|
|
94
|
-
var x = typeof this == "function" && !this.firstBy ? this : !1, P = l(
|
|
94
|
+
function S(s, g) {
|
|
95
|
+
var x = typeof this == "function" && !this.firstBy ? this : !1, P = l(s, g), _ = x ? function(N, $) {
|
|
95
96
|
return x(N, $) || P(N, $);
|
|
96
97
|
} : P;
|
|
97
|
-
return
|
|
98
|
+
return _.thenBy = S, _;
|
|
98
99
|
}
|
|
99
100
|
return S.firstBy = S, S;
|
|
100
101
|
}();
|
|
@@ -110,18 +111,18 @@ function Be(e, t) {
|
|
|
110
111
|
while (S.startsWith("/"));
|
|
111
112
|
return `${l}/${S}`;
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
+
function ta(e) {
|
|
114
115
|
return e == null || !Array.isArray(e) ? e : [...new Set(e.map((t) => t))];
|
|
115
116
|
}
|
|
116
|
-
function
|
|
117
|
+
function na(e = "blitzItExtensionExists") {
|
|
117
118
|
try {
|
|
118
119
|
var t = document.getElementById(e);
|
|
119
120
|
return t != null;
|
|
120
121
|
} catch (l) {
|
|
121
|
-
return console.log(
|
|
122
|
+
return console.log(wn(l)), !1;
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
|
-
function
|
|
125
|
+
function aa(e, t) {
|
|
125
126
|
return [
|
|
126
127
|
{ lat: e.lat - t, lng: e.lng + t },
|
|
127
128
|
{ lat: e.lat - t, lng: e.lng - t },
|
|
@@ -129,7 +130,7 @@ function ea(e, t) {
|
|
|
129
130
|
{ lat: e.lat + t, lng: e.lng + t }
|
|
130
131
|
];
|
|
131
132
|
}
|
|
132
|
-
function
|
|
133
|
+
function la(e, t) {
|
|
133
134
|
return [
|
|
134
135
|
{ lat: e.lat - t * 2, lng: e.lng + t },
|
|
135
136
|
{ lat: e.lat - t * 2, lng: e.lng - t },
|
|
@@ -137,7 +138,7 @@ function ra(e, t) {
|
|
|
137
138
|
{ lat: e.lat, lng: e.lng + t }
|
|
138
139
|
];
|
|
139
140
|
}
|
|
140
|
-
function
|
|
141
|
+
function ua(e, t) {
|
|
141
142
|
return [
|
|
142
143
|
{ lat: e.lat, lng: e.lng + t },
|
|
143
144
|
{ lat: e.lat, lng: e.lng - t },
|
|
@@ -145,7 +146,7 @@ function ta(e, t) {
|
|
|
145
146
|
{ lat: e.lat + t * 2, lng: e.lng + t }
|
|
146
147
|
];
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
+
function ia(e) {
|
|
149
150
|
var t = rt(e, !0);
|
|
150
151
|
return t = t.toLowerCase(), t = t.replace(" victoria ", "vic"), t = t.replace(" queensland ", "qld"), t = t.replace(" new south wales ", "nsw"), t = t.replace(" northern territory ", "nt"), t = t.replace(" western australia ", "wa"), t = t.replace(" tasmania ", "tas"), t = t.replace(" south australia ", "sa"), t = t.replace(" australian captial territory ", "act"), t = t.replace(" & ", " and "), t = t.replace(" road", " rd"), t = t.replace(" street", " st"), t = t.replace(" lane", " ln"), t = t.replace(" alley", " aly"), t = t.replace(" arcade", " arc"), t = t.replace(" boulevard", " blvd"), t = t.replace(" court", " ct"), t = t.replace(" cove", " cv"), t = t.replace(" highway", " hwy"), t.replaceAll(" ", "");
|
|
151
152
|
}
|
|
@@ -157,36 +158,36 @@ function rt(e, t = !1) {
|
|
|
157
158
|
var l = "";
|
|
158
159
|
return e.addressLineOne != null && !t && (l = e.addressLineOne + " "), e.streetNumber != null && (l = l + e.streetNumber + " "), e.streetName != null && (l = l + e.streetName + ", "), e.suburb != null && (l = l + e.suburb + " "), e.state != null && (l = l + e.state + " "), e.postcode != null && (l = l + e.postcode), l;
|
|
159
160
|
}
|
|
160
|
-
function
|
|
161
|
+
function ca(e, t, l) {
|
|
161
162
|
if (e) {
|
|
162
163
|
var S = new Image();
|
|
163
164
|
S.onload = t, S.onerror = l, S.src = e;
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
|
-
async function
|
|
167
|
+
async function fa(e, t = !0) {
|
|
167
168
|
return new Promise((l, S) => {
|
|
168
169
|
e == null && S("no url given");
|
|
169
|
-
var
|
|
170
|
-
|
|
170
|
+
var s = new Image();
|
|
171
|
+
s.setAttribute("crossOrigin", "anonymous"), s.onload = function() {
|
|
171
172
|
var g = document.createElement("canvas");
|
|
172
173
|
g.width = this.width, g.height = this.height;
|
|
173
174
|
var x = g.getContext("2d");
|
|
174
175
|
x == null || x.drawImage(this, 0, 0), l(g.toDataURL("image/png"));
|
|
175
|
-
},
|
|
176
|
+
}, s.onerror = function() {
|
|
176
177
|
console.log("errr"), t ? S("image could not be loaded for some reason") : l(null);
|
|
177
|
-
}, e != null && (
|
|
178
|
+
}, e != null && (s.src = e);
|
|
178
179
|
});
|
|
179
180
|
}
|
|
180
|
-
function
|
|
181
|
+
function on(e) {
|
|
181
182
|
return e && e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase());
|
|
182
183
|
}
|
|
183
|
-
function
|
|
184
|
+
function sa(e) {
|
|
184
185
|
if (e != null && typeof e == "object")
|
|
185
186
|
for (var t in e)
|
|
186
187
|
/^[A-Z]/.test(t) && Object.hasOwnProperty.call(e, t) && (e[t.charAt(0).toLowerCase() + t.substring(1)] = e[t], delete e[t]);
|
|
187
188
|
return e;
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
+
function dn(e) {
|
|
190
191
|
return e == null ? e : e.replace(/\w\S*/g, (t) => t.replace(/^\w/, (l) => l.toUpperCase()));
|
|
191
192
|
}
|
|
192
193
|
const Ye = [
|
|
@@ -199,73 +200,73 @@ const Ye = [
|
|
|
199
200
|
{ value: 7, short: "sat", values: ["sat", "saturday"] },
|
|
200
201
|
{ value: 0, short: "always", values: ["always", null, void 0] }
|
|
201
202
|
];
|
|
202
|
-
function
|
|
203
|
+
function oa(e) {
|
|
203
204
|
if (e == null)
|
|
204
205
|
return 0;
|
|
205
|
-
const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ye.filter((S) => S.values.some((
|
|
206
|
+
const t = e.replaceAll(" ", "").split(",").map((S) => S.toLowerCase()), l = Ye.filter((S) => S.values.some((s) => t.some((g) => s == g))).map((S) => S.value);
|
|
206
207
|
return l.length == 0 ? 8 : Math.min(...l);
|
|
207
208
|
}
|
|
208
|
-
function
|
|
209
|
+
function da(e) {
|
|
209
210
|
return e == null ? e : e.toLowerCase().replaceAll(" ", "").split(",").map((t) => {
|
|
210
|
-
let l = Ye.find((S) => S.values.some((
|
|
211
|
+
let l = Ye.find((S) => S.values.some((s) => s == t));
|
|
211
212
|
return l != null ? l.short : "";
|
|
212
213
|
}).filter((t) => t != null && t.length > 0).toString();
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
+
function ha(e, t) {
|
|
215
216
|
if (e == null || t == null)
|
|
216
217
|
return !0;
|
|
217
|
-
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(),
|
|
218
|
-
return
|
|
218
|
+
const l = e.replaceAll(" ", "").split(",").map((g) => g.toLowerCase()), S = t.replaceAll(" ", "").toLowerCase(), s = Ye.find((g) => g.values.some((x) => x == S));
|
|
219
|
+
return s != null && l.some((g) => g == s.short || s.values.some((x) => x == g));
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
+
function ma(e, t) {
|
|
221
222
|
if (t == null)
|
|
222
223
|
return e;
|
|
223
224
|
let l = e ?? "";
|
|
224
225
|
l = `${l},${t}`;
|
|
225
|
-
let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((
|
|
226
|
+
let S = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((s) => Ye.find((g) => g.values.some((x) => x == s))).filter((s) => s != null).sort(Ue.firstBy((s) => (s == null ? void 0 : s.value) ?? 0)).map((s) => s == null ? void 0 : s.short))].toString();
|
|
226
227
|
return S.length > 0 ? S : void 0;
|
|
227
228
|
}
|
|
228
|
-
function
|
|
229
|
+
function va(e, t) {
|
|
229
230
|
if (t == null || e == null)
|
|
230
231
|
return e;
|
|
231
|
-
let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(),
|
|
232
|
-
return
|
|
232
|
+
let l = e ?? "", S = t.replaceAll(" ", "").toLowerCase(), s = [...new Set(l.replaceAll(" ", "").toLowerCase().split(",").map((g) => Ye.find((x) => x.values.some((P) => P == g && P != S))).filter((g) => g != null).sort(Ue.firstBy((g) => (g == null ? void 0 : g.value) ?? 0)).map((g) => g == null ? void 0 : g.short))].toString();
|
|
233
|
+
return s.length > 0 ? s : void 0;
|
|
233
234
|
}
|
|
234
|
-
function
|
|
235
|
+
function ga(e, t) {
|
|
235
236
|
return e != null && Array.isArray(e) && e.length == t;
|
|
236
237
|
}
|
|
237
|
-
function
|
|
238
|
+
function _e(e, t = 0) {
|
|
238
239
|
return e != null && Array.isArray(e) && e.length > t;
|
|
239
240
|
}
|
|
240
|
-
function
|
|
241
|
+
function hn(e) {
|
|
241
242
|
return e == "0001-01-01T00:00:00Z";
|
|
242
243
|
}
|
|
243
|
-
function
|
|
244
|
+
function ya() {
|
|
244
245
|
return (/* @__PURE__ */ new Date("0001-01-01T00:00:00Z")).getTime();
|
|
245
246
|
}
|
|
246
|
-
function
|
|
247
|
+
function mn() {
|
|
247
248
|
return "0001-01-01T00:00:00Z";
|
|
248
249
|
}
|
|
249
|
-
function
|
|
250
|
+
function wa(e, t) {
|
|
250
251
|
let l = "1", S = 0;
|
|
251
252
|
if (S < t)
|
|
252
253
|
do
|
|
253
254
|
l = l + "0", S += 1;
|
|
254
255
|
while (S < t);
|
|
255
|
-
let
|
|
256
|
-
return Math.round(e *
|
|
256
|
+
let s = Number.parseInt(l);
|
|
257
|
+
return Math.round(e * s) / s;
|
|
257
258
|
}
|
|
258
|
-
function
|
|
259
|
+
function ba(e, t) {
|
|
259
260
|
let l = e ?? "";
|
|
260
|
-
return t != null && (
|
|
261
|
+
return t != null && (vn(l, t) ? l = l.split(",").filter((S) => S != t).toString() : l != null ? l = `${l},${t}` : l = t), l != null && l.length > 0 ? l : null;
|
|
261
262
|
}
|
|
262
|
-
function
|
|
263
|
+
function vn(e, t) {
|
|
263
264
|
if (e == null || e.length == 0)
|
|
264
265
|
return !1;
|
|
265
266
|
if (!t)
|
|
266
267
|
return !0;
|
|
267
268
|
var l = e.split(","), S = t.split(",");
|
|
268
|
-
return l.some((
|
|
269
|
+
return l.some((s) => S.some((g) => g == s));
|
|
269
270
|
}
|
|
270
271
|
function Lr(e) {
|
|
271
272
|
if (!e)
|
|
@@ -275,32 +276,32 @@ function Lr(e) {
|
|
|
275
276
|
t = e[S], l[S] = typeof t == "object" ? Lr(t) : t;
|
|
276
277
|
return l;
|
|
277
278
|
}
|
|
278
|
-
function
|
|
279
|
+
function gn(e) {
|
|
279
280
|
return e && Object.keys(e).sort().reduce(function(t, l) {
|
|
280
281
|
let S = e[l];
|
|
281
|
-
return t[l] = typeof S == "object" && S !== null ?
|
|
282
|
+
return t[l] = typeof S == "object" && S !== null ? gn(S) : S, t;
|
|
282
283
|
}, Array.isArray(e) ? [] : {});
|
|
283
284
|
}
|
|
284
|
-
function
|
|
285
|
+
function yn(e, t) {
|
|
285
286
|
return t == null ? !0 : e == null ? !1 : e.toLowerCase().includes(t.toLowerCase());
|
|
286
287
|
}
|
|
287
288
|
function tt(e, t = (l) => l) {
|
|
288
289
|
if (e == null)
|
|
289
290
|
return [];
|
|
290
291
|
const l = Array.isArray(e) ? e : t(e);
|
|
291
|
-
return
|
|
292
|
-
S.push(
|
|
293
|
-
const g = tt(
|
|
294
|
-
return
|
|
292
|
+
return _e(l) ? [...l.reduce((S, s) => {
|
|
293
|
+
S.push(s);
|
|
294
|
+
const g = tt(s, t);
|
|
295
|
+
return _e(g) && S.push(...g), S;
|
|
295
296
|
}, [])] : [];
|
|
296
297
|
}
|
|
297
|
-
function
|
|
298
|
-
const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0],
|
|
298
|
+
function Sa(e) {
|
|
299
|
+
const t = e.split(","), l = t[0].indexOf("base64") >= 0 ? atob(t[1]) : decodeURI(t[1]), S = t[0].split(":")[1].split(";")[0], s = new Uint8Array(l.length);
|
|
299
300
|
for (let g = 0; g < l.length; g++)
|
|
300
|
-
|
|
301
|
-
return new Blob([
|
|
301
|
+
s[g] = l.charCodeAt(g);
|
|
302
|
+
return new Blob([s], { type: S });
|
|
302
303
|
}
|
|
303
|
-
function
|
|
304
|
+
function wn(e) {
|
|
304
305
|
var t = "";
|
|
305
306
|
if (e) {
|
|
306
307
|
if (e.message && (t = e.message), e.response && e.response.data) {
|
|
@@ -313,27 +314,27 @@ function dn(e) {
|
|
|
313
314
|
}
|
|
314
315
|
return "hmmm no error was supplied";
|
|
315
316
|
}
|
|
316
|
-
function
|
|
317
|
+
function bn() {
|
|
317
318
|
const e = "#" + Math.floor(Math.random() * 16777215).toString(16);
|
|
318
|
-
return e.length !== 7 ?
|
|
319
|
+
return e.length !== 7 ? bn() : e;
|
|
319
320
|
}
|
|
320
|
-
function
|
|
321
|
+
function Sn(e, t, l) {
|
|
321
322
|
if (t == null)
|
|
322
323
|
return !0;
|
|
323
324
|
if (e == null || l == null)
|
|
324
325
|
return !1;
|
|
325
|
-
for (let
|
|
326
|
-
const g = l[
|
|
326
|
+
for (let s = 0; s < l.length; s++) {
|
|
327
|
+
const g = l[s];
|
|
327
328
|
var S = Sr(e, g);
|
|
328
|
-
if (S != null && typeof S == "string" &&
|
|
329
|
+
if (S != null && typeof S == "string" && yn(S, t))
|
|
329
330
|
return !0;
|
|
330
331
|
}
|
|
331
332
|
return !1;
|
|
332
333
|
}
|
|
333
|
-
function
|
|
334
|
+
function Aa(e) {
|
|
334
335
|
return e != null ? e.replaceAll(" ", "").toLowerCase() : null;
|
|
335
336
|
}
|
|
336
|
-
function
|
|
337
|
+
function Ea(e = 2e3) {
|
|
337
338
|
return new Promise((t) => {
|
|
338
339
|
setTimeout(() => t(), e);
|
|
339
340
|
});
|
|
@@ -343,15 +344,15 @@ function Sr(e, t) {
|
|
|
343
344
|
return null;
|
|
344
345
|
var l = t.split(".");
|
|
345
346
|
let S = l.length;
|
|
346
|
-
for (var
|
|
347
|
-
if (
|
|
347
|
+
for (var s = e, g = 0; g < S; g++)
|
|
348
|
+
if (s = s[l[g]], s == null)
|
|
348
349
|
return null;
|
|
349
|
-
return
|
|
350
|
+
return s;
|
|
350
351
|
}
|
|
351
|
-
function
|
|
352
|
+
function An(e) {
|
|
352
353
|
return e ? /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e) : !1;
|
|
353
354
|
}
|
|
354
|
-
function
|
|
355
|
+
function En(e) {
|
|
355
356
|
return e.endsWith("ies") ? e.slice(0, e.length - 3) : e.endsWith("s") ? e.slice(0, e.length - 1) : e;
|
|
356
357
|
}
|
|
357
358
|
function Xe(e) {
|
|
@@ -368,9 +369,9 @@ var nt = { exports: {} };
|
|
|
368
369
|
(function(l) {
|
|
369
370
|
e.exports = l();
|
|
370
371
|
})(function() {
|
|
371
|
-
return function l(S,
|
|
372
|
+
return function l(S, s, g) {
|
|
372
373
|
function x(N, $) {
|
|
373
|
-
if (!
|
|
374
|
+
if (!s[N]) {
|
|
374
375
|
if (!S[N]) {
|
|
375
376
|
var d = typeof Xe == "function" && Xe;
|
|
376
377
|
if (!$ && d)
|
|
@@ -380,26 +381,26 @@ var nt = { exports: {} };
|
|
|
380
381
|
var h = new Error("Cannot find module '" + N + "'");
|
|
381
382
|
throw h.code = "MODULE_NOT_FOUND", h;
|
|
382
383
|
}
|
|
383
|
-
var u =
|
|
384
|
+
var u = s[N] = { exports: {} };
|
|
384
385
|
S[N][0].call(u.exports, function(r) {
|
|
385
386
|
var y = S[N][1][r];
|
|
386
387
|
return x(y || r);
|
|
387
|
-
}, u, u.exports, l, S,
|
|
388
|
+
}, u, u.exports, l, S, s, g);
|
|
388
389
|
}
|
|
389
|
-
return
|
|
390
|
+
return s[N].exports;
|
|
390
391
|
}
|
|
391
|
-
for (var P = typeof Xe == "function" && Xe,
|
|
392
|
-
x(g[
|
|
392
|
+
for (var P = typeof Xe == "function" && Xe, _ = 0; _ < g.length; _++)
|
|
393
|
+
x(g[_]);
|
|
393
394
|
return x;
|
|
394
|
-
}({ 1: [function(l, S,
|
|
395
|
+
}({ 1: [function(l, S, s) {
|
|
395
396
|
(function(g) {
|
|
396
397
|
var x = g.MutationObserver || g.WebKitMutationObserver, P;
|
|
397
398
|
if (x) {
|
|
398
|
-
var
|
|
399
|
+
var _ = 0, N = new x(r), $ = g.document.createTextNode("");
|
|
399
400
|
N.observe($, {
|
|
400
401
|
characterData: !0
|
|
401
402
|
}), P = function() {
|
|
402
|
-
$.data =
|
|
403
|
+
$.data = _ = ++_ % 2;
|
|
403
404
|
};
|
|
404
405
|
} else if (!g.setImmediate && typeof g.MessageChannel < "u") {
|
|
405
406
|
var d = new g.MessageChannel();
|
|
@@ -430,11 +431,11 @@ var nt = { exports: {} };
|
|
|
430
431
|
u.push(I) === 1 && !h && P();
|
|
431
432
|
}
|
|
432
433
|
}).call(this, typeof Qe < "u" ? Qe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
433
|
-
}, {}], 2: [function(l, S,
|
|
434
|
+
}, {}], 2: [function(l, S, s) {
|
|
434
435
|
var g = l(1);
|
|
435
436
|
function x() {
|
|
436
437
|
}
|
|
437
|
-
var P = {},
|
|
438
|
+
var P = {}, _ = ["REJECTED"], N = ["FULFILLED"], $ = ["PENDING"];
|
|
438
439
|
S.exports = d;
|
|
439
440
|
function d(b) {
|
|
440
441
|
if (typeof b != "function")
|
|
@@ -443,19 +444,19 @@ var nt = { exports: {} };
|
|
|
443
444
|
}
|
|
444
445
|
d.prototype.catch = function(b) {
|
|
445
446
|
return this.then(null, b);
|
|
446
|
-
}, d.prototype.then = function(b,
|
|
447
|
-
if (typeof b != "function" && this.state === N || typeof
|
|
447
|
+
}, d.prototype.then = function(b, T) {
|
|
448
|
+
if (typeof b != "function" && this.state === N || typeof T != "function" && this.state === _)
|
|
448
449
|
return this;
|
|
449
450
|
var D = new this.constructor(x);
|
|
450
451
|
if (this.state !== $) {
|
|
451
|
-
var L = this.state === N ? b :
|
|
452
|
+
var L = this.state === N ? b : T;
|
|
452
453
|
u(D, L, this.outcome);
|
|
453
454
|
} else
|
|
454
|
-
this.queue.push(new h(D, b,
|
|
455
|
+
this.queue.push(new h(D, b, T));
|
|
455
456
|
return D;
|
|
456
457
|
};
|
|
457
|
-
function h(b,
|
|
458
|
-
this.promise = b, typeof
|
|
458
|
+
function h(b, T, D) {
|
|
459
|
+
this.promise = b, typeof T == "function" && (this.onFulfilled = T, this.callFulfilled = this.otherCallFulfilled), typeof D == "function" && (this.onRejected = D, this.callRejected = this.otherCallRejected);
|
|
459
460
|
}
|
|
460
461
|
h.prototype.callFulfilled = function(b) {
|
|
461
462
|
P.resolve(this.promise, b);
|
|
@@ -466,61 +467,61 @@ var nt = { exports: {} };
|
|
|
466
467
|
}, h.prototype.otherCallRejected = function(b) {
|
|
467
468
|
u(this.promise, this.onRejected, b);
|
|
468
469
|
};
|
|
469
|
-
function u(b,
|
|
470
|
+
function u(b, T, D) {
|
|
470
471
|
g(function() {
|
|
471
472
|
var L;
|
|
472
473
|
try {
|
|
473
|
-
L =
|
|
474
|
-
} catch (
|
|
475
|
-
return P.reject(b,
|
|
474
|
+
L = T(D);
|
|
475
|
+
} catch (f) {
|
|
476
|
+
return P.reject(b, f);
|
|
476
477
|
}
|
|
477
478
|
L === b ? P.reject(b, new TypeError("Cannot resolve promise with itself")) : P.resolve(b, L);
|
|
478
479
|
});
|
|
479
480
|
}
|
|
480
|
-
P.resolve = function(b,
|
|
481
|
-
var D = I(r,
|
|
481
|
+
P.resolve = function(b, T) {
|
|
482
|
+
var D = I(r, T);
|
|
482
483
|
if (D.status === "error")
|
|
483
484
|
return P.reject(b, D.value);
|
|
484
485
|
var L = D.value;
|
|
485
486
|
if (L)
|
|
486
487
|
y(b, L);
|
|
487
488
|
else {
|
|
488
|
-
b.state = N, b.outcome =
|
|
489
|
-
for (var
|
|
490
|
-
b.queue[
|
|
489
|
+
b.state = N, b.outcome = T;
|
|
490
|
+
for (var f = -1, A = b.queue.length; ++f < A; )
|
|
491
|
+
b.queue[f].callFulfilled(T);
|
|
491
492
|
}
|
|
492
493
|
return b;
|
|
493
|
-
}, P.reject = function(b,
|
|
494
|
-
b.state =
|
|
494
|
+
}, P.reject = function(b, T) {
|
|
495
|
+
b.state = _, b.outcome = T;
|
|
495
496
|
for (var D = -1, L = b.queue.length; ++D < L; )
|
|
496
|
-
b.queue[D].callRejected(
|
|
497
|
+
b.queue[D].callRejected(T);
|
|
497
498
|
return b;
|
|
498
499
|
};
|
|
499
500
|
function r(b) {
|
|
500
|
-
var
|
|
501
|
-
if (b && (typeof b == "object" || typeof b == "function") && typeof
|
|
501
|
+
var T = b && b.then;
|
|
502
|
+
if (b && (typeof b == "object" || typeof b == "function") && typeof T == "function")
|
|
502
503
|
return function() {
|
|
503
|
-
|
|
504
|
+
T.apply(b, arguments);
|
|
504
505
|
};
|
|
505
506
|
}
|
|
506
|
-
function y(b,
|
|
507
|
+
function y(b, T) {
|
|
507
508
|
var D = !1;
|
|
508
509
|
function L(Q) {
|
|
509
510
|
D || (D = !0, P.reject(b, Q));
|
|
510
511
|
}
|
|
511
|
-
function
|
|
512
|
+
function f(Q) {
|
|
512
513
|
D || (D = !0, P.resolve(b, Q));
|
|
513
514
|
}
|
|
514
515
|
function A() {
|
|
515
|
-
|
|
516
|
+
T(f, L);
|
|
516
517
|
}
|
|
517
518
|
var J = I(A);
|
|
518
519
|
J.status === "error" && L(J.value);
|
|
519
520
|
}
|
|
520
|
-
function I(b,
|
|
521
|
+
function I(b, T) {
|
|
521
522
|
var D = {};
|
|
522
523
|
try {
|
|
523
|
-
D.value = b(
|
|
524
|
+
D.value = b(T), D.status = "success";
|
|
524
525
|
} catch (L) {
|
|
525
526
|
D.status = "error", D.value = L;
|
|
526
527
|
}
|
|
@@ -532,53 +533,53 @@ var nt = { exports: {} };
|
|
|
532
533
|
}
|
|
533
534
|
d.reject = E;
|
|
534
535
|
function E(b) {
|
|
535
|
-
var
|
|
536
|
-
return P.reject(
|
|
536
|
+
var T = new this(x);
|
|
537
|
+
return P.reject(T, b);
|
|
537
538
|
}
|
|
538
539
|
d.all = w;
|
|
539
540
|
function w(b) {
|
|
540
|
-
var
|
|
541
|
+
var T = this;
|
|
541
542
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
542
543
|
return this.reject(new TypeError("must be an array"));
|
|
543
544
|
var D = b.length, L = !1;
|
|
544
545
|
if (!D)
|
|
545
546
|
return this.resolve([]);
|
|
546
|
-
for (var
|
|
547
|
+
for (var f = new Array(D), A = 0, J = -1, Q = new this(x); ++J < D; )
|
|
547
548
|
ee(b[J], J);
|
|
548
549
|
return Q;
|
|
549
550
|
function ee(ce, we) {
|
|
550
|
-
|
|
551
|
+
T.resolve(ce).then(W, function(Y) {
|
|
551
552
|
L || (L = !0, P.reject(Q, Y));
|
|
552
553
|
});
|
|
553
554
|
function W(Y) {
|
|
554
|
-
|
|
555
|
+
f[we] = Y, ++A === D && !L && (L = !0, P.resolve(Q, f));
|
|
555
556
|
}
|
|
556
557
|
}
|
|
557
558
|
}
|
|
558
559
|
d.race = M;
|
|
559
560
|
function M(b) {
|
|
560
|
-
var
|
|
561
|
+
var T = this;
|
|
561
562
|
if (Object.prototype.toString.call(b) !== "[object Array]")
|
|
562
563
|
return this.reject(new TypeError("must be an array"));
|
|
563
564
|
var D = b.length, L = !1;
|
|
564
565
|
if (!D)
|
|
565
566
|
return this.resolve([]);
|
|
566
|
-
for (var
|
|
567
|
-
J(b[
|
|
567
|
+
for (var f = -1, A = new this(x); ++f < D; )
|
|
568
|
+
J(b[f]);
|
|
568
569
|
return A;
|
|
569
570
|
function J(Q) {
|
|
570
|
-
|
|
571
|
+
T.resolve(Q).then(function(ee) {
|
|
571
572
|
L || (L = !0, P.resolve(A, ee));
|
|
572
573
|
}, function(ee) {
|
|
573
574
|
L || (L = !0, P.reject(A, ee));
|
|
574
575
|
});
|
|
575
576
|
}
|
|
576
577
|
}
|
|
577
|
-
}, { 1: 1 }], 3: [function(l, S,
|
|
578
|
+
}, { 1: 1 }], 3: [function(l, S, s) {
|
|
578
579
|
(function(g) {
|
|
579
580
|
typeof g.Promise != "function" && (g.Promise = l(2));
|
|
580
581
|
}).call(this, typeof Qe < "u" ? Qe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
581
|
-
}, { 2: 2 }], 4: [function(l, S,
|
|
582
|
+
}, { 2: 2 }], 4: [function(l, S, s) {
|
|
582
583
|
var g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
583
584
|
return typeof n;
|
|
584
585
|
} : function(n) {
|
|
@@ -604,10 +605,10 @@ var nt = { exports: {} };
|
|
|
604
605
|
return;
|
|
605
606
|
}
|
|
606
607
|
}
|
|
607
|
-
var
|
|
608
|
+
var _ = P();
|
|
608
609
|
function N() {
|
|
609
610
|
try {
|
|
610
|
-
if (!
|
|
611
|
+
if (!_ || !_.open)
|
|
611
612
|
return !1;
|
|
612
613
|
var n = typeof openDatabase < "u" && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform), c = typeof fetch == "function" && fetch.toString().indexOf("[native code") !== -1;
|
|
613
614
|
return (!n || c) && typeof indexedDB < "u" && // some outdated implementations of IDB that appear on Samsung
|
|
@@ -651,7 +652,7 @@ var nt = { exports: {} };
|
|
|
651
652
|
return arguments[arguments.length - 1];
|
|
652
653
|
}
|
|
653
654
|
var I = "local-forage-detect-blob-support", i = void 0, E = {}, w = Object.prototype.toString, M = "readonly", b = "readwrite";
|
|
654
|
-
function
|
|
655
|
+
function T(n) {
|
|
655
656
|
for (var c = n.length, a = new ArrayBuffer(c), m = new Uint8Array(a), v = 0; v < c; v++)
|
|
656
657
|
m[v] = n.charCodeAt(v);
|
|
657
658
|
return a;
|
|
@@ -674,7 +675,7 @@ var nt = { exports: {} };
|
|
|
674
675
|
return i = c, i;
|
|
675
676
|
});
|
|
676
677
|
}
|
|
677
|
-
function
|
|
678
|
+
function f(n) {
|
|
678
679
|
var c = E[n.name], a = {};
|
|
679
680
|
a.promise = new d(function(m, v) {
|
|
680
681
|
a.resolve = m, a.reject = v;
|
|
@@ -696,12 +697,12 @@ var nt = { exports: {} };
|
|
|
696
697
|
return new d(function(a, m) {
|
|
697
698
|
if (E[n.name] = E[n.name] || ne(), n.db)
|
|
698
699
|
if (c)
|
|
699
|
-
|
|
700
|
+
f(n), n.db.close();
|
|
700
701
|
else
|
|
701
702
|
return a(n.db);
|
|
702
703
|
var v = [n.name];
|
|
703
704
|
c && v.push(n.version);
|
|
704
|
-
var o =
|
|
705
|
+
var o = _.open.apply(_, v);
|
|
705
706
|
c && (o.onupgradeneeded = function(C) {
|
|
706
707
|
var R = o.result;
|
|
707
708
|
try {
|
|
@@ -755,10 +756,10 @@ var nt = { exports: {} };
|
|
|
755
756
|
});
|
|
756
757
|
}
|
|
757
758
|
function Y(n) {
|
|
758
|
-
var c =
|
|
759
|
+
var c = T(atob(n.data));
|
|
759
760
|
return $([c], { type: n.type });
|
|
760
761
|
}
|
|
761
|
-
function
|
|
762
|
+
function V(n) {
|
|
762
763
|
return n && n.__local_forage_encoded_blob;
|
|
763
764
|
}
|
|
764
765
|
function ae(n) {
|
|
@@ -770,7 +771,7 @@ var nt = { exports: {} };
|
|
|
770
771
|
return u(a, n, n), a;
|
|
771
772
|
}
|
|
772
773
|
function G(n) {
|
|
773
|
-
|
|
774
|
+
f(n);
|
|
774
775
|
for (var c = E[n.name], a = c.forages, m = 0; m < a.length; m++) {
|
|
775
776
|
var v = a[m];
|
|
776
777
|
v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
|
|
@@ -857,7 +858,7 @@ var nt = { exports: {} };
|
|
|
857
858
|
var B = R.objectStore(a._dbInfo.storeName), F = B.get(n);
|
|
858
859
|
F.onsuccess = function() {
|
|
859
860
|
var k = F.result;
|
|
860
|
-
k === void 0 && (k = null),
|
|
861
|
+
k === void 0 && (k = null), V(k) && (k = Y(k)), v(k);
|
|
861
862
|
}, F.onerror = function() {
|
|
862
863
|
o(F.error);
|
|
863
864
|
};
|
|
@@ -881,7 +882,7 @@ var nt = { exports: {} };
|
|
|
881
882
|
var q = F.result;
|
|
882
883
|
if (q) {
|
|
883
884
|
var Z = q.value;
|
|
884
|
-
|
|
885
|
+
V(Z) && (Z = Y(Z));
|
|
885
886
|
var p = n(Z, q.key, k++);
|
|
886
887
|
p !== void 0 ? v(p) : q.continue();
|
|
887
888
|
} else
|
|
@@ -1071,7 +1072,7 @@ var nt = { exports: {} };
|
|
|
1071
1072
|
n.storeName ? v = C.then(function(R) {
|
|
1072
1073
|
if (R.objectStoreNames.contains(n.storeName)) {
|
|
1073
1074
|
var B = R.version + 1;
|
|
1074
|
-
|
|
1075
|
+
f(n);
|
|
1075
1076
|
var F = E[n.name], k = F.forages;
|
|
1076
1077
|
R.close();
|
|
1077
1078
|
for (var q = 0; q < k.length; q++) {
|
|
@@ -1079,7 +1080,7 @@ var nt = { exports: {} };
|
|
|
1079
1080
|
Z._dbInfo.db = null, Z._dbInfo.version = B;
|
|
1080
1081
|
}
|
|
1081
1082
|
var p = new d(function(re, ie) {
|
|
1082
|
-
var le =
|
|
1083
|
+
var le = _.open(n.name, B);
|
|
1083
1084
|
le.onerror = function(ye) {
|
|
1084
1085
|
var ze = le.result;
|
|
1085
1086
|
ze.close(), ie(ye);
|
|
@@ -1103,7 +1104,7 @@ var nt = { exports: {} };
|
|
|
1103
1104
|
});
|
|
1104
1105
|
}
|
|
1105
1106
|
}) : v = C.then(function(R) {
|
|
1106
|
-
|
|
1107
|
+
f(n);
|
|
1107
1108
|
var B = E[n.name], F = B.forages;
|
|
1108
1109
|
R.close();
|
|
1109
1110
|
for (var k = 0; k < F.length; k++) {
|
|
@@ -1111,7 +1112,7 @@ var nt = { exports: {} };
|
|
|
1111
1112
|
q._dbInfo.db = null;
|
|
1112
1113
|
}
|
|
1113
1114
|
var Z = new d(function(p, re) {
|
|
1114
|
-
var ie =
|
|
1115
|
+
var ie = _.deleteDatabase(n.name);
|
|
1115
1116
|
ie.onerror = function() {
|
|
1116
1117
|
var le = ie.result;
|
|
1117
1118
|
le && le.close(), re(ie.error);
|
|
@@ -1153,7 +1154,7 @@ var nt = { exports: {} };
|
|
|
1153
1154
|
function ur() {
|
|
1154
1155
|
return typeof openDatabase == "function";
|
|
1155
1156
|
}
|
|
1156
|
-
var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Ze = /^~~local_forage_type~([^~]+)~/, Fe = "__lfsc__:", Ne = Fe.length, We = "arbf", Ie = "blob", Je = "si08", je = "ui08", qe = "uic8",
|
|
1157
|
+
var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Ze = /^~~local_forage_type~([^~]+)~/, Fe = "__lfsc__:", Ne = Fe.length, We = "arbf", Ie = "blob", Je = "si08", je = "ui08", qe = "uic8", Ve = "si16", U = "si32", j = "ur16", H = "ui32", O = "fl32", de = "fl64", ge = Ne + We.length, De = Object.prototype.toString;
|
|
1157
1158
|
function Se(n) {
|
|
1158
1159
|
var c = n.length * 0.75, a = n.length, m, v = 0, o, C, R, B;
|
|
1159
1160
|
n[n.length - 1] === "=" && (c--, n[n.length - 2] === "=" && c--);
|
|
@@ -1172,7 +1173,7 @@ var nt = { exports: {} };
|
|
|
1172
1173
|
var a = "";
|
|
1173
1174
|
if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
|
|
1174
1175
|
var m, v = Fe;
|
|
1175
|
-
n instanceof ArrayBuffer ? (m = n, v += We) : (m = n.buffer, a === "[object Int8Array]" ? v += Je : a === "[object Uint8Array]" ? v += je : a === "[object Uint8ClampedArray]" ? v += qe : a === "[object Int16Array]" ? v +=
|
|
1176
|
+
n instanceof ArrayBuffer ? (m = n, v += We) : (m = n.buffer, a === "[object Int8Array]" ? v += Je : a === "[object Uint8Array]" ? v += je : a === "[object Uint8ClampedArray]" ? v += qe : a === "[object Int16Array]" ? v += Ve : a === "[object Uint16Array]" ? v += j : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += H : a === "[object Float32Array]" ? v += O : a === "[object Float64Array]" ? v += de : c(new Error("Failed to get type for BinaryArray"))), c(v + oe(m));
|
|
1176
1177
|
} else if (a === "[object Blob]") {
|
|
1177
1178
|
var o = new FileReader();
|
|
1178
1179
|
o.onload = function() {
|
|
@@ -1206,13 +1207,13 @@ var nt = { exports: {} };
|
|
|
1206
1207
|
return new Uint8Array(o);
|
|
1207
1208
|
case qe:
|
|
1208
1209
|
return new Uint8ClampedArray(o);
|
|
1209
|
-
case
|
|
1210
|
+
case Ve:
|
|
1210
1211
|
return new Int16Array(o);
|
|
1211
1212
|
case j:
|
|
1212
1213
|
return new Uint16Array(o);
|
|
1213
1214
|
case U:
|
|
1214
1215
|
return new Int32Array(o);
|
|
1215
|
-
case
|
|
1216
|
+
case H:
|
|
1216
1217
|
return new Uint32Array(o);
|
|
1217
1218
|
case O:
|
|
1218
1219
|
return new Float32Array(o);
|
|
@@ -1522,7 +1523,7 @@ var nt = { exports: {} };
|
|
|
1522
1523
|
});
|
|
1523
1524
|
return h(a, n), a;
|
|
1524
1525
|
}
|
|
1525
|
-
function
|
|
1526
|
+
function Tt(n, c) {
|
|
1526
1527
|
var a = this;
|
|
1527
1528
|
n = r(n);
|
|
1528
1529
|
var m = a.ready().then(function() {
|
|
@@ -1531,7 +1532,7 @@ var nt = { exports: {} };
|
|
|
1531
1532
|
});
|
|
1532
1533
|
return h(m, c), m;
|
|
1533
1534
|
}
|
|
1534
|
-
function
|
|
1535
|
+
function _t(n, c) {
|
|
1535
1536
|
var a = this, m = a.ready().then(function() {
|
|
1536
1537
|
for (var v = a._dbInfo, o = v.keyPrefix, C = o.length, R = localStorage.length, B = 1, F = 0; F < R; F++) {
|
|
1537
1538
|
var k = localStorage.key(F);
|
|
@@ -1622,8 +1623,8 @@ var nt = { exports: {} };
|
|
|
1622
1623
|
_driver: "localStorageWrapper",
|
|
1623
1624
|
_initStorage: Dt,
|
|
1624
1625
|
_support: At(),
|
|
1625
|
-
iterate:
|
|
1626
|
-
getItem:
|
|
1626
|
+
iterate: _t,
|
|
1627
|
+
getItem: Tt,
|
|
1627
1628
|
setItem: Lt,
|
|
1628
1629
|
removeItem: Mt,
|
|
1629
1630
|
clear: xt,
|
|
@@ -1642,7 +1643,7 @@ var nt = { exports: {} };
|
|
|
1642
1643
|
return !1;
|
|
1643
1644
|
}, $r = Array.isArray || function(n) {
|
|
1644
1645
|
return Object.prototype.toString.call(n) === "[object Array]";
|
|
1645
|
-
},
|
|
1646
|
+
}, He = {}, Fr = {}, ke = {
|
|
1646
1647
|
INDEXEDDB: lr,
|
|
1647
1648
|
WEBSQL: St,
|
|
1648
1649
|
LOCALSTORAGE: Ut
|
|
@@ -1679,7 +1680,7 @@ var nt = { exports: {} };
|
|
|
1679
1680
|
for (var a in ke)
|
|
1680
1681
|
if (ke.hasOwnProperty(a)) {
|
|
1681
1682
|
var m = ke[a], v = m._driver;
|
|
1682
|
-
this[a] = v,
|
|
1683
|
+
this[a] = v, He[v] || this.defineDriver(m);
|
|
1683
1684
|
}
|
|
1684
1685
|
this._defaultConfig = sr({}, kt), this._config = sr({}, this._defaultConfig, c), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
|
|
1685
1686
|
});
|
|
@@ -1712,19 +1713,19 @@ var nt = { exports: {} };
|
|
|
1712
1713
|
}
|
|
1713
1714
|
}
|
|
1714
1715
|
var ie = function() {
|
|
1715
|
-
for (var ze = function(
|
|
1716
|
+
for (var ze = function(Ht) {
|
|
1716
1717
|
return function() {
|
|
1717
|
-
var zt = new Error("Method " +
|
|
1718
|
+
var zt = new Error("Method " + Ht + " is not implemented by the current driver"), kr = d.reject(zt);
|
|
1718
1719
|
return h(kr, arguments[arguments.length - 1]), kr;
|
|
1719
1720
|
};
|
|
1720
|
-
}, or = 0,
|
|
1721
|
+
}, or = 0, Vt = Ke.length; or < Vt; or++) {
|
|
1721
1722
|
var dr = Ke[or];
|
|
1722
1723
|
a[dr] || (a[dr] = ze(dr));
|
|
1723
1724
|
}
|
|
1724
1725
|
};
|
|
1725
1726
|
ie();
|
|
1726
1727
|
var le = function(ze) {
|
|
1727
|
-
|
|
1728
|
+
He[B] && console.info("Redefining LocalForage driver: " + B), He[B] = a, Fr[B] = ze, C();
|
|
1728
1729
|
};
|
|
1729
1730
|
"_support" in a ? a._support && typeof a._support == "function" ? a._support().then(le, R) : le(!!a._support) : le(!0);
|
|
1730
1731
|
} catch (ye) {
|
|
@@ -1735,7 +1736,7 @@ var nt = { exports: {} };
|
|
|
1735
1736
|
}, n.prototype.driver = function() {
|
|
1736
1737
|
return this._driver || null;
|
|
1737
1738
|
}, n.prototype.getDriver = function(a, m, v) {
|
|
1738
|
-
var o =
|
|
1739
|
+
var o = He[a] ? d.resolve(He[a]) : d.reject(new Error("Driver not found."));
|
|
1739
1740
|
return u(o, m, v), o;
|
|
1740
1741
|
}, n.prototype.getSerializer = function(a) {
|
|
1741
1742
|
var m = d.resolve(cr);
|
|
@@ -1804,8 +1805,8 @@ var nt = { exports: {} };
|
|
|
1804
1805
|
}, { 3: 3 }] }, {}, [4])(4);
|
|
1805
1806
|
});
|
|
1806
1807
|
})(nt);
|
|
1807
|
-
var
|
|
1808
|
-
const at = /* @__PURE__ */
|
|
1808
|
+
var In = nt.exports;
|
|
1809
|
+
const at = /* @__PURE__ */ sn(In);
|
|
1809
1810
|
let ue;
|
|
1810
1811
|
function lt() {
|
|
1811
1812
|
const e = ue == null ? void 0 : ue.getEnv();
|
|
@@ -1815,17 +1816,17 @@ function Wr() {
|
|
|
1815
1816
|
const e = ue == null ? void 0 : ue.getEnv();
|
|
1816
1817
|
return console.log(`env var: ${e}`), ue == null ? "" : (ue[e] ?? ue.development).auth ?? "";
|
|
1817
1818
|
}
|
|
1818
|
-
function
|
|
1819
|
+
function Dn(e) {
|
|
1819
1820
|
const t = ue == null ? void 0 : ue.getEnv();
|
|
1820
1821
|
if (ue == null)
|
|
1821
1822
|
return "";
|
|
1822
1823
|
const l = ue[t] ?? ue.development;
|
|
1823
1824
|
return e == null ? l.data ?? "" : l.other[e] ?? l.data ?? "";
|
|
1824
1825
|
}
|
|
1825
|
-
function
|
|
1826
|
+
function Ia() {
|
|
1826
1827
|
return ue;
|
|
1827
1828
|
}
|
|
1828
|
-
function
|
|
1829
|
+
function xn(e) {
|
|
1829
1830
|
return ue = e, ue;
|
|
1830
1831
|
}
|
|
1831
1832
|
let Oe = null;
|
|
@@ -1836,21 +1837,21 @@ function ve() {
|
|
|
1836
1837
|
const e = lt();
|
|
1837
1838
|
return (Oe == null || Oe.config.name != e) && (Oe = at.createInstance({ name: e })), Oe;
|
|
1838
1839
|
}
|
|
1839
|
-
function
|
|
1840
|
-
async function e(
|
|
1840
|
+
function Da() {
|
|
1841
|
+
async function e(s) {
|
|
1841
1842
|
const g = ve();
|
|
1842
|
-
(await g.keys()).filter((
|
|
1843
|
-
g.removeItem(
|
|
1843
|
+
(await g.keys()).filter((_) => _.startsWith(s)).forEach((_) => {
|
|
1844
|
+
g.removeItem(_);
|
|
1844
1845
|
});
|
|
1845
1846
|
}
|
|
1846
|
-
async function t(
|
|
1847
|
-
return await ve().getItem(
|
|
1847
|
+
async function t(s) {
|
|
1848
|
+
return await ve().getItem(s);
|
|
1848
1849
|
}
|
|
1849
|
-
async function l(
|
|
1850
|
-
return await ve().removeItem(
|
|
1850
|
+
async function l(s) {
|
|
1851
|
+
return await ve().removeItem(s);
|
|
1851
1852
|
}
|
|
1852
|
-
async function S(
|
|
1853
|
-
await ve().setItem(g,
|
|
1853
|
+
async function S(s, g) {
|
|
1854
|
+
await ve().setItem(g, s);
|
|
1854
1855
|
}
|
|
1855
1856
|
return {
|
|
1856
1857
|
clearAsync: e,
|
|
@@ -1860,21 +1861,21 @@ function Sa() {
|
|
|
1860
1861
|
};
|
|
1861
1862
|
}
|
|
1862
1863
|
let er;
|
|
1863
|
-
function
|
|
1864
|
+
function xa(e) {
|
|
1864
1865
|
return er(e)();
|
|
1865
1866
|
}
|
|
1866
1867
|
function Le(e) {
|
|
1867
1868
|
return er(e);
|
|
1868
1869
|
}
|
|
1869
|
-
function
|
|
1870
|
-
return er = (t) =>
|
|
1870
|
+
function Tn(e) {
|
|
1871
|
+
return er = (t) => _n({
|
|
1871
1872
|
...e,
|
|
1872
1873
|
...t
|
|
1873
1874
|
}), er;
|
|
1874
1875
|
}
|
|
1875
|
-
function
|
|
1876
|
-
var t, l, S,
|
|
1877
|
-
if (e.storeMode ?? (e.storeMode = ((l = (t = e.navigation) == null ? void 0 : t.findItem(e.nav)) == null ? void 0 : l.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((
|
|
1876
|
+
function _n(e) {
|
|
1877
|
+
var t, l, S, s, g;
|
|
1878
|
+
if (e.storeMode ?? (e.storeMode = ((l = (t = e.navigation) == null ? void 0 : t.findItem(e.nav)) == null ? void 0 : l.storeMode) ?? "session"), e.storageMode ?? (e.storageMode = ((s = (S = e.navigation) == null ? void 0 : S.findItem(e.nav)) == null ? void 0 : s.storageMode) ?? "local-cache"), e.storeName ?? (e.storeName = ((g = e.navigation) == null ? void 0 : g.findStoreName(e.nav)) ?? e.nav), e.storeName == null)
|
|
1878
1879
|
throw new Error("no store name provided");
|
|
1879
1880
|
if (e.storeMode == "whole-last-updated") {
|
|
1880
1881
|
if (e.api == null)
|
|
@@ -1885,23 +1886,23 @@ function An(e) {
|
|
|
1885
1886
|
throw new Error("Must supply an api object to use store");
|
|
1886
1887
|
return qr({ ...e, storeName: e.storeName ?? "" });
|
|
1887
1888
|
} else
|
|
1888
|
-
return
|
|
1889
|
+
return Pn({ ...e, storeName: e.storeName ?? "" });
|
|
1889
1890
|
}
|
|
1890
|
-
const
|
|
1891
|
+
const Cn = (e) => {
|
|
1891
1892
|
let t = K(e.url) ?? void 0;
|
|
1892
1893
|
if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = Be(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = Be(t, e.id)), e.params != null) {
|
|
1893
1894
|
t ?? (t = "");
|
|
1894
1895
|
let l = new URLSearchParams();
|
|
1895
|
-
Object.entries(e.params).sort(Ue.firstBy((
|
|
1896
|
-
|
|
1896
|
+
Object.entries(e.params).sort(Ue.firstBy((s) => s[0])).forEach((s) => {
|
|
1897
|
+
s[1] != null && l.append(s[0], s[1].toString());
|
|
1897
1898
|
}), t = `${t}?${l.toString()}`;
|
|
1898
1899
|
}
|
|
1899
1900
|
return e.finalUrl = t, e.finalUrl ?? "";
|
|
1900
1901
|
};
|
|
1901
|
-
function
|
|
1902
|
+
function Pn(e) {
|
|
1902
1903
|
return pr(e.storeName, () => {
|
|
1903
1904
|
var u;
|
|
1904
|
-
const t = he.utc().toSeconds() / 86400, l = z({}), S = z({}),
|
|
1905
|
+
const t = he.utc().toSeconds() / 86400, l = z({}), S = z({}), s = e.storageMode == "local-cache", g = e.buildUrl ?? ((u = e.api) == null ? void 0 : u.buildUrl) ?? Cn;
|
|
1905
1906
|
function x(r) {
|
|
1906
1907
|
var i, E;
|
|
1907
1908
|
let y = "";
|
|
@@ -1913,7 +1914,7 @@ function In(e) {
|
|
|
1913
1914
|
const y = x(r), I = r.refresh;
|
|
1914
1915
|
if (!I && l.value[y] !== void 0)
|
|
1915
1916
|
return l.value[y];
|
|
1916
|
-
if (!I &&
|
|
1917
|
+
if (!I && s == !0) {
|
|
1917
1918
|
const i = await ve().getItem(y);
|
|
1918
1919
|
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
1919
1920
|
return l.value[y] = i, i;
|
|
@@ -1925,15 +1926,15 @@ function In(e) {
|
|
|
1925
1926
|
i == null && (i = new Promise(async (w, M) => {
|
|
1926
1927
|
var b;
|
|
1927
1928
|
try {
|
|
1928
|
-
const
|
|
1929
|
+
const T = await ((b = e.api) == null ? void 0 : b.getAll(r)), D = {
|
|
1929
1930
|
meta: { storedOn: t.toString() },
|
|
1930
|
-
data:
|
|
1931
|
-
count:
|
|
1932
|
-
filters: (
|
|
1931
|
+
data: T == null ? void 0 : T.data,
|
|
1932
|
+
count: T == null ? void 0 : T.count,
|
|
1933
|
+
filters: (T == null ? void 0 : T.filters) ?? []
|
|
1933
1934
|
};
|
|
1934
|
-
|
|
1935
|
-
} catch (
|
|
1936
|
-
M(
|
|
1935
|
+
s == !0 && await ve().setItem(y, D), w(D);
|
|
1936
|
+
} catch (T) {
|
|
1937
|
+
M(T);
|
|
1937
1938
|
} finally {
|
|
1938
1939
|
delete S.value[y];
|
|
1939
1940
|
}
|
|
@@ -1948,12 +1949,12 @@ function In(e) {
|
|
|
1948
1949
|
throw i;
|
|
1949
1950
|
}
|
|
1950
1951
|
}
|
|
1951
|
-
async function
|
|
1952
|
+
async function _(r) {
|
|
1952
1953
|
r.additionalUrl ?? (r.additionalUrl = "/get"), g(r);
|
|
1953
1954
|
const y = x(r), I = r.refresh;
|
|
1954
1955
|
if (!I && l.value[y] !== void 0)
|
|
1955
1956
|
return l.value[y];
|
|
1956
|
-
if (!I &&
|
|
1957
|
+
if (!I && s == !0) {
|
|
1957
1958
|
const i = await ve().getItem(y);
|
|
1958
1959
|
if (i != null && (e.api == null || parseFloat(i.meta.storedOn) > t - 7))
|
|
1959
1960
|
return l.value[y] = i, { data: i.data };
|
|
@@ -1965,14 +1966,14 @@ function In(e) {
|
|
|
1965
1966
|
i == null && (i = new Promise(async (w, M) => {
|
|
1966
1967
|
var b;
|
|
1967
1968
|
try {
|
|
1968
|
-
let
|
|
1969
|
+
let T = await ((b = e.api) == null ? void 0 : b.get(r));
|
|
1969
1970
|
const D = {
|
|
1970
1971
|
meta: { storedOn: t.toString() },
|
|
1971
|
-
data:
|
|
1972
|
+
data: T == null ? void 0 : T.data
|
|
1972
1973
|
};
|
|
1973
|
-
|
|
1974
|
-
} catch (
|
|
1975
|
-
M(
|
|
1974
|
+
s == !0 && await ve().setItem(y, D), w(D);
|
|
1975
|
+
} catch (T) {
|
|
1976
|
+
M(T);
|
|
1976
1977
|
} finally {
|
|
1977
1978
|
delete S.value[y];
|
|
1978
1979
|
}
|
|
@@ -2002,12 +2003,12 @@ function In(e) {
|
|
|
2002
2003
|
meta: { storedOn: t.toString() },
|
|
2003
2004
|
data: { ...(i = l.value[y]) == null ? void 0 : i.data, ...I }
|
|
2004
2005
|
};
|
|
2005
|
-
return l.value[y] = E,
|
|
2006
|
+
return l.value[y] = E, s == !0 && await ve().setItem(y, E), I.id != null && I.rowVersion != null && Object.entries(l.value).forEach((M) => {
|
|
2006
2007
|
const b = M[1].data;
|
|
2007
2008
|
if (b != null)
|
|
2008
2009
|
if (Array.isArray(b))
|
|
2009
|
-
for (let
|
|
2010
|
-
b[
|
|
2010
|
+
for (let T = 0; T < b.length; T++)
|
|
2011
|
+
b[T].id == I.id && b.splice(T, 1, E.data);
|
|
2011
2012
|
else
|
|
2012
2013
|
b.id == I.id && (l.value[M[0]] = E);
|
|
2013
2014
|
}), E.data;
|
|
@@ -2032,7 +2033,7 @@ function In(e) {
|
|
|
2032
2033
|
meta: { storedOn: t.toString() },
|
|
2033
2034
|
data: I
|
|
2034
2035
|
};
|
|
2035
|
-
return
|
|
2036
|
+
return s == !0 && await ve().setItem(y, i), l.value[y] = i, i.data;
|
|
2036
2037
|
}
|
|
2037
2038
|
return I;
|
|
2038
2039
|
}
|
|
@@ -2058,7 +2059,7 @@ function In(e) {
|
|
|
2058
2059
|
M[b].id == I && M.splice(b, 1);
|
|
2059
2060
|
else
|
|
2060
2061
|
delete l.value[w[0]];
|
|
2061
|
-
}),
|
|
2062
|
+
}), s == !0 && await ve().removeItem(y);
|
|
2062
2063
|
}
|
|
2063
2064
|
async function h(r) {
|
|
2064
2065
|
if (r.additionalUrl ?? (r.additionalUrl = `/patch/restore?id=${r.data.id}`), g(r), e.api != null)
|
|
@@ -2071,7 +2072,7 @@ function In(e) {
|
|
|
2071
2072
|
}
|
|
2072
2073
|
return {
|
|
2073
2074
|
deleteItem: d,
|
|
2074
|
-
get:
|
|
2075
|
+
get: _,
|
|
2075
2076
|
getAll: P,
|
|
2076
2077
|
patch: N,
|
|
2077
2078
|
post: $,
|
|
@@ -2083,13 +2084,13 @@ function In(e) {
|
|
|
2083
2084
|
}
|
|
2084
2085
|
function qr(e) {
|
|
2085
2086
|
return pr(e.storeName, () => {
|
|
2086
|
-
const t = z(), l = z(0), S = he.utc().toSeconds() / 3600,
|
|
2087
|
-
function
|
|
2087
|
+
const t = z(), l = z(0), S = he.utc().toSeconds() / 3600, s = z(), g = z(), x = z({}), P = e.storageMode == "local-cache";
|
|
2088
|
+
function _() {
|
|
2088
2089
|
var i;
|
|
2089
2090
|
return `${e.storeName}_${((i = e.auth) == null ? void 0 : i.credentials.value.userID) ?? "no-user-id"}`;
|
|
2090
2091
|
}
|
|
2091
2092
|
async function N() {
|
|
2092
|
-
P == !0 && await ve().setItem(
|
|
2093
|
+
P == !0 && await ve().setItem(_(), {
|
|
2093
2094
|
meta: g.value,
|
|
2094
2095
|
data: t.value,
|
|
2095
2096
|
count: l.value,
|
|
@@ -2097,21 +2098,21 @@ function qr(e) {
|
|
|
2097
2098
|
});
|
|
2098
2099
|
}
|
|
2099
2100
|
function $(i) {
|
|
2100
|
-
const E =
|
|
2101
|
+
const E = _();
|
|
2101
2102
|
return x.value[E] || (x.value[E] = new Promise(async (w, M) => {
|
|
2102
|
-
var b,
|
|
2103
|
+
var b, T;
|
|
2103
2104
|
try {
|
|
2104
|
-
let D = await ((
|
|
2105
|
+
let D = await ((T = e.api) == null ? void 0 : T.getAll({
|
|
2105
2106
|
additionalUrl: "/getAll",
|
|
2106
2107
|
nav: i.nav,
|
|
2107
2108
|
params: {
|
|
2108
|
-
lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ??
|
|
2109
|
+
lastUpdate: ((b = g.value) == null ? void 0 : b.lastUpdate) ?? mn()
|
|
2109
2110
|
}
|
|
2110
2111
|
}));
|
|
2111
2112
|
D == null ? M(D) : (t.value ?? (t.value = []), D.data.forEach((L) => {
|
|
2112
2113
|
var A, J;
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2114
|
+
const f = t.value.findIndex((Q) => Q.id == L.id);
|
|
2115
|
+
f >= 0 ? (A = t.value) == null || A.splice(f, 1, L) : (J = t.value) == null || J.push(L);
|
|
2115
2116
|
}), l.value = t.value.length, g.value = {
|
|
2116
2117
|
lastUpdate: he.utc().toString(),
|
|
2117
2118
|
storedOn: S.toString()
|
|
@@ -2124,8 +2125,8 @@ function qr(e) {
|
|
|
2124
2125
|
})), x.value[E];
|
|
2125
2126
|
}
|
|
2126
2127
|
async function d(i) {
|
|
2127
|
-
var M, b,
|
|
2128
|
-
const E =
|
|
2128
|
+
var M, b, T;
|
|
2129
|
+
const E = _(), w = i.refresh;
|
|
2129
2130
|
if (!w && t.value != null)
|
|
2130
2131
|
return {
|
|
2131
2132
|
count: (M = t.value) == null ? void 0 : M.length,
|
|
@@ -2135,7 +2136,7 @@ function qr(e) {
|
|
|
2135
2136
|
if (!w && P == !0) {
|
|
2136
2137
|
const D = await ve().getItem(E);
|
|
2137
2138
|
if (D != null && parseFloat(D.meta.storedOn) > S - 7)
|
|
2138
|
-
return t.value = D.data, l.value = D.data.length,
|
|
2139
|
+
return t.value = D.data, l.value = D.data.length, s.value = D.filters ?? [], g.value = D.meta, {
|
|
2139
2140
|
count: (b = t.value) == null ? void 0 : b.length,
|
|
2140
2141
|
data: t.value ?? [],
|
|
2141
2142
|
filters: []
|
|
@@ -2143,9 +2144,9 @@ function qr(e) {
|
|
|
2143
2144
|
}
|
|
2144
2145
|
if (e.api == null)
|
|
2145
2146
|
return {
|
|
2146
|
-
count: (
|
|
2147
|
+
count: (T = t.value) == null ? void 0 : T.length,
|
|
2147
2148
|
data: t.value ?? [],
|
|
2148
|
-
filters:
|
|
2149
|
+
filters: s.value
|
|
2149
2150
|
};
|
|
2150
2151
|
t.value ?? (t.value = []);
|
|
2151
2152
|
try {
|
|
@@ -2156,34 +2157,34 @@ function qr(e) {
|
|
|
2156
2157
|
}
|
|
2157
2158
|
}
|
|
2158
2159
|
async function h(i) {
|
|
2159
|
-
var b,
|
|
2160
|
-
const E =
|
|
2160
|
+
var b, T, D, L;
|
|
2161
|
+
const E = _(), w = i.id ?? ((b = i.data) == null ? void 0 : b.id);
|
|
2161
2162
|
if (w == null)
|
|
2162
2163
|
throw new Error("no id provided");
|
|
2163
2164
|
let M = i.refresh;
|
|
2164
2165
|
if (!M && t.value != null) {
|
|
2165
|
-
const
|
|
2166
|
-
if (
|
|
2167
|
-
return { data:
|
|
2166
|
+
const f = t.value.find((A) => A.id == w);
|
|
2167
|
+
if (f != null)
|
|
2168
|
+
return { data: f };
|
|
2168
2169
|
}
|
|
2169
2170
|
if (!M && P == !0) {
|
|
2170
|
-
const
|
|
2171
|
-
if (
|
|
2172
|
-
t.value =
|
|
2173
|
-
let A = (
|
|
2171
|
+
const f = await ve().getItem(E);
|
|
2172
|
+
if (f != null && parseFloat(f.meta.storedOn) > S - 12) {
|
|
2173
|
+
t.value = f.data, l.value = f.data.length, s.value = f.filters ?? [], g.value = f.meta;
|
|
2174
|
+
let A = (T = t.value) == null ? void 0 : T.find((J) => J.id == i.id);
|
|
2174
2175
|
if (A != null)
|
|
2175
2176
|
return { data: A };
|
|
2176
2177
|
}
|
|
2177
2178
|
}
|
|
2178
2179
|
if (e.api == null)
|
|
2179
2180
|
return {
|
|
2180
|
-
data: (D = t.value) == null ? void 0 : D.find((
|
|
2181
|
+
data: (D = t.value) == null ? void 0 : D.find((f) => f.id == i.id)
|
|
2181
2182
|
};
|
|
2182
2183
|
t.value ?? (t.value = []);
|
|
2183
2184
|
try {
|
|
2184
|
-
return await $(i), { data: (L = t.value) == null ? void 0 : L.find((
|
|
2185
|
-
} catch (
|
|
2186
|
-
let A =
|
|
2185
|
+
return await $(i), { data: (L = t.value) == null ? void 0 : L.find((f) => f.id == i.id) };
|
|
2186
|
+
} catch (f) {
|
|
2187
|
+
let A = f;
|
|
2187
2188
|
throw new Error(A.message ?? "Problem");
|
|
2188
2189
|
}
|
|
2189
2190
|
}
|
|
@@ -2193,19 +2194,19 @@ function qr(e) {
|
|
|
2193
2194
|
let E;
|
|
2194
2195
|
if (e.api != null)
|
|
2195
2196
|
try {
|
|
2196
|
-
let
|
|
2197
|
-
E = { ...i.data, ...
|
|
2198
|
-
} catch (
|
|
2199
|
-
let D =
|
|
2197
|
+
let T = await e.api.patch(i);
|
|
2198
|
+
E = { ...i.data, ...T == null ? void 0 : T.data };
|
|
2199
|
+
} catch (T) {
|
|
2200
|
+
let D = T;
|
|
2200
2201
|
throw new Error(D.message ?? "Patch Problem");
|
|
2201
2202
|
}
|
|
2202
2203
|
else
|
|
2203
2204
|
E = i.data;
|
|
2204
2205
|
if (E != null) {
|
|
2205
|
-
let
|
|
2206
|
-
|
|
2206
|
+
let T = (w = t.value) == null ? void 0 : w.findIndex((D) => D.id == E.id);
|
|
2207
|
+
T != null && T >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(T, 1, E), await N());
|
|
2207
2208
|
}
|
|
2208
|
-
return (b = t.value) == null ? void 0 : b.find((
|
|
2209
|
+
return (b = t.value) == null ? void 0 : b.find((T) => T.id == (i.id ?? i.data.id));
|
|
2209
2210
|
}
|
|
2210
2211
|
async function r(i) {
|
|
2211
2212
|
var w, M;
|
|
@@ -2216,8 +2217,8 @@ function qr(e) {
|
|
|
2216
2217
|
let b = await e.api.post(i);
|
|
2217
2218
|
E = b == null ? void 0 : b.data;
|
|
2218
2219
|
} catch (b) {
|
|
2219
|
-
let
|
|
2220
|
-
throw new Error(
|
|
2220
|
+
let T = b;
|
|
2221
|
+
throw new Error(T.message ?? "Patch Problem");
|
|
2221
2222
|
}
|
|
2222
2223
|
else
|
|
2223
2224
|
E = i.data;
|
|
@@ -2231,12 +2232,12 @@ function qr(e) {
|
|
|
2231
2232
|
if (b != null)
|
|
2232
2233
|
return b;
|
|
2233
2234
|
} catch (b) {
|
|
2234
|
-
let
|
|
2235
|
-
throw new Error(
|
|
2235
|
+
let T = b;
|
|
2236
|
+
throw new Error(T.message ?? "Patch Problem");
|
|
2236
2237
|
}
|
|
2237
2238
|
const E = i.id ?? i.data.id;
|
|
2238
2239
|
if (E != null) {
|
|
2239
|
-
let b = (w = t.value) == null ? void 0 : w.findIndex((
|
|
2240
|
+
let b = (w = t.value) == null ? void 0 : w.findIndex((T) => T.id == E);
|
|
2240
2241
|
b != null && b >= 0 && (t.value ?? (t.value = []), (M = t.value) == null || M.splice(b, 1), await N());
|
|
2241
2242
|
}
|
|
2242
2243
|
}
|
|
@@ -2271,8 +2272,8 @@ let Ar;
|
|
|
2271
2272
|
function Er() {
|
|
2272
2273
|
return Ar;
|
|
2273
2274
|
}
|
|
2274
|
-
function
|
|
2275
|
-
const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? x,
|
|
2275
|
+
function Nn(e) {
|
|
2276
|
+
const t = (e == null ? void 0 : e.buildHeaders) ?? P, l = (e == null ? void 0 : e.buildQuery) ?? g, S = (e == null ? void 0 : e.buildUrl) ?? x, s = e == null ? void 0 : e.demo;
|
|
2276
2277
|
function g(u) {
|
|
2277
2278
|
let r = new URLSearchParams();
|
|
2278
2279
|
return Object.entries(u).forEach((y) => {
|
|
@@ -2290,11 +2291,11 @@ function Dn(e) {
|
|
|
2290
2291
|
let r = { ...u.headers };
|
|
2291
2292
|
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 ${(I = e == null ? void 0 : e.auth) == null ? void 0 : I.credentials.value.token}`)), r["Content-Type"] ?? (r["Content-Type"] = u.contentType ?? (e == null ? void 0 : e.defaultContentType) ?? "application/json"), r;
|
|
2292
2293
|
}
|
|
2293
|
-
async function
|
|
2294
|
+
async function _(u) {
|
|
2294
2295
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2295
2296
|
let i = u.finalUrl, E = u.headers;
|
|
2296
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)),
|
|
2297
|
-
return console.log(`DEMO: Get from ${i}`),
|
|
2297
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
2298
|
+
return console.log(`DEMO: Get from ${i}`), s.get(u);
|
|
2298
2299
|
console.log(`Get from ${i}`);
|
|
2299
2300
|
let w;
|
|
2300
2301
|
try {
|
|
@@ -2328,8 +2329,8 @@ function Dn(e) {
|
|
|
2328
2329
|
async function N(u) {
|
|
2329
2330
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2330
2331
|
let i = u.finalUrl, E = u.headers;
|
|
2331
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)),
|
|
2332
|
-
return console.log(`DEMO: Get all from ${i}`),
|
|
2332
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
2333
|
+
return console.log(`DEMO: Get all from ${i}`), s.getAll(u);
|
|
2333
2334
|
console.log(`Get all from ${i}`);
|
|
2334
2335
|
let w;
|
|
2335
2336
|
try {
|
|
@@ -2363,8 +2364,8 @@ function Dn(e) {
|
|
|
2363
2364
|
async function $(u) {
|
|
2364
2365
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2365
2366
|
let i = u.finalUrl, E = u.headers;
|
|
2366
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)),
|
|
2367
|
-
return console.log(`DEMO: Post to ${i}`),
|
|
2367
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
2368
|
+
return console.log(`DEMO: Post to ${i}`), s.post(u);
|
|
2368
2369
|
console.log(`Post to ${i}`);
|
|
2369
2370
|
let w;
|
|
2370
2371
|
try {
|
|
@@ -2399,8 +2400,8 @@ function Dn(e) {
|
|
|
2399
2400
|
async function d(u) {
|
|
2400
2401
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0, y = u.returnJson ?? (e == null ? void 0 : e.defaultReturnJson) ?? !0, I = u.returnText ?? (e == null ? void 0 : e.defaultReturnText) ?? !1;
|
|
2401
2402
|
let i = u.finalUrl, E = u.headers;
|
|
2402
|
-
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)),
|
|
2403
|
-
return console.log(`DEMO: Patch to ${i}`),
|
|
2403
|
+
if (i == null && (i = S(u)), u.overrideHeaders !== !0 && (E = t(u)), s != null && s.isDemoing.value)
|
|
2404
|
+
return console.log(`DEMO: Patch to ${i}`), s.patch(u);
|
|
2404
2405
|
console.log(`Patch to ${i}`);
|
|
2405
2406
|
let w;
|
|
2406
2407
|
try {
|
|
@@ -2435,8 +2436,8 @@ function Dn(e) {
|
|
|
2435
2436
|
async function h(u) {
|
|
2436
2437
|
const r = u.throwError ?? (e == null ? void 0 : e.defaultThrowError) ?? !0;
|
|
2437
2438
|
let y = u.finalUrl, I = u.headers;
|
|
2438
|
-
if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (I = t(u)),
|
|
2439
|
-
return console.log(`DEMO: Delete ${y}`),
|
|
2439
|
+
if (y == null && (y = S(u)), u.overrideHeaders !== !0 && (I = t(u)), s != null && s.isDemoing.value)
|
|
2440
|
+
return console.log(`DEMO: Delete ${y}`), s.deleteItem(u);
|
|
2440
2441
|
console.log(`Delete ${y}`);
|
|
2441
2442
|
let i;
|
|
2442
2443
|
try {
|
|
@@ -2465,14 +2466,14 @@ function Dn(e) {
|
|
|
2465
2466
|
buildQuery: l,
|
|
2466
2467
|
buildUrl: S,
|
|
2467
2468
|
deleteItem: h,
|
|
2468
|
-
get:
|
|
2469
|
+
get: _,
|
|
2469
2470
|
getAll: N,
|
|
2470
2471
|
patch: d,
|
|
2471
2472
|
post: $
|
|
2472
2473
|
}, Ar;
|
|
2473
2474
|
}
|
|
2474
2475
|
function ut(e) {
|
|
2475
|
-
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading:
|
|
2476
|
+
const { actionErrorMsg: t, actionLoadingMsg: l, clearErrors: S, isLoading: s, doAction: g, logError: x } = fn(e);
|
|
2476
2477
|
function P(r) {
|
|
2477
2478
|
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);
|
|
2478
2479
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
@@ -2496,7 +2497,7 @@ function ut(e) {
|
|
|
2496
2497
|
throwError: r.throwError ?? (e == null ? void 0 : e.throwError)
|
|
2497
2498
|
});
|
|
2498
2499
|
}
|
|
2499
|
-
function
|
|
2500
|
+
function _(r) {
|
|
2500
2501
|
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);
|
|
2501
2502
|
let y = (r == null ? void 0 : r.store) ?? (e == null ? void 0 : e.store);
|
|
2502
2503
|
const I = (e == null ? void 0 : e.items) ?? [];
|
|
@@ -2592,26 +2593,26 @@ function ut(e) {
|
|
|
2592
2593
|
deleteItem: P,
|
|
2593
2594
|
doAction: g,
|
|
2594
2595
|
getAllItems: N,
|
|
2595
|
-
getItem:
|
|
2596
|
-
isLoading:
|
|
2596
|
+
getItem: _,
|
|
2597
|
+
isLoading: s,
|
|
2597
2598
|
logError: x,
|
|
2598
2599
|
restoreItem: $,
|
|
2599
2600
|
saveItem: d
|
|
2600
2601
|
};
|
|
2601
2602
|
}
|
|
2602
2603
|
let hr = "Australia/Melbourne", Ir;
|
|
2603
|
-
const
|
|
2604
|
-
function
|
|
2604
|
+
const Vr = "auth-credentials-state";
|
|
2605
|
+
function Mn() {
|
|
2605
2606
|
return Ir;
|
|
2606
2607
|
}
|
|
2607
|
-
function
|
|
2608
|
+
function Ln(e) {
|
|
2608
2609
|
const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a";
|
|
2609
|
-
let l = z(localStorage.getItem(
|
|
2610
|
+
let l = z(localStorage.getItem(Vr) ?? "");
|
|
2610
2611
|
l.value.length == 0 && S();
|
|
2611
2612
|
function S() {
|
|
2612
|
-
l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(
|
|
2613
|
+
l.value = Math.random().toString(36).substring(4, 19) + Math.random().toString(12).substring(1, 11), localStorage.setItem(Vr, l.value);
|
|
2613
2614
|
}
|
|
2614
|
-
const
|
|
2615
|
+
const s = pt("auth-credentials", {});
|
|
2615
2616
|
function g(D) {
|
|
2616
2617
|
if (D == null)
|
|
2617
2618
|
return !0;
|
|
@@ -2620,10 +2621,10 @@ function _n(e) {
|
|
|
2620
2621
|
return !1;
|
|
2621
2622
|
if (L.requiresAuth === !1)
|
|
2622
2623
|
return !0;
|
|
2623
|
-
const
|
|
2624
|
-
if (
|
|
2624
|
+
const f = K(s);
|
|
2625
|
+
if (f.isSuspended && L.ignoreSuspension !== !0)
|
|
2625
2626
|
return !1;
|
|
2626
|
-
if (
|
|
2627
|
+
if (f.isGlobalAdmin)
|
|
2627
2628
|
return !0;
|
|
2628
2629
|
if (L.permissions != null) {
|
|
2629
2630
|
for (var A = 0; A < L.permissions.length; A++)
|
|
@@ -2633,11 +2634,11 @@ function _n(e) {
|
|
|
2633
2634
|
return !0;
|
|
2634
2635
|
}
|
|
2635
2636
|
function x(D) {
|
|
2636
|
-
const L = K(
|
|
2637
|
+
const L = K(s);
|
|
2637
2638
|
if (L.userPermissions != null)
|
|
2638
|
-
for (var
|
|
2639
|
-
var A = L.userPermissions[
|
|
2640
|
-
if (L.userPermissions[
|
|
2639
|
+
for (var f = 0; f < L.userPermissions.length; f++) {
|
|
2640
|
+
var A = L.userPermissions[f].split(".");
|
|
2641
|
+
if (L.userPermissions[f] == "everything.edit" || D == A[0] && A.length > 1 && A[1] == "edit")
|
|
2641
2642
|
return !0;
|
|
2642
2643
|
}
|
|
2643
2644
|
return !1;
|
|
@@ -2650,89 +2651,89 @@ function _n(e) {
|
|
|
2650
2651
|
return !1;
|
|
2651
2652
|
if (L.requiresAuth === !1)
|
|
2652
2653
|
return !0;
|
|
2653
|
-
const
|
|
2654
|
-
if (
|
|
2654
|
+
const f = K(s);
|
|
2655
|
+
if (f.isSuspended && L.ignoreSuspension !== !0)
|
|
2655
2656
|
return !1;
|
|
2656
|
-
if (
|
|
2657
|
+
if (f.isGlobalAdmin)
|
|
2657
2658
|
return !0;
|
|
2658
2659
|
if (L.permissions != null) {
|
|
2659
2660
|
for (var A = 0; A < L.permissions.length; A++)
|
|
2660
|
-
if (!
|
|
2661
|
+
if (!_(L.permissions[A]))
|
|
2661
2662
|
return !1;
|
|
2662
2663
|
}
|
|
2663
2664
|
return !0;
|
|
2664
2665
|
}
|
|
2665
|
-
function
|
|
2666
|
-
const L = K(
|
|
2666
|
+
function _(D) {
|
|
2667
|
+
const L = K(s);
|
|
2667
2668
|
if (L.userPermissions != null)
|
|
2668
|
-
for (var
|
|
2669
|
-
var A = L.userPermissions[
|
|
2670
|
-
if (D == A[0] || D == "everything" || L.userPermissions[
|
|
2669
|
+
for (var f = 0; f < L.userPermissions.length; f++) {
|
|
2670
|
+
var A = L.userPermissions[f].split(".");
|
|
2671
|
+
if (D == A[0] || D == "everything" || L.userPermissions[f] == "everything.view" || L.userPermissions[f] == "everything.edit")
|
|
2671
2672
|
return !0;
|
|
2672
2673
|
}
|
|
2673
2674
|
return !1;
|
|
2674
2675
|
}
|
|
2675
|
-
function N(D, L,
|
|
2676
|
+
function N(D, L, f) {
|
|
2676
2677
|
let A = !0;
|
|
2677
|
-
return K(
|
|
2678
|
-
|
|
2678
|
+
return K(s).isGlobalAdmin ? !0 : (L != null && L.length > 0 && L.forEach((Q) => {
|
|
2679
|
+
f == "edit" ? x(Q) || (A = !1) : _(Q) || (A = !1);
|
|
2679
2680
|
}), D != null && D.length > 0 && (D.some((Q) => u(Q)) || (A = !1)), A);
|
|
2680
2681
|
}
|
|
2681
2682
|
function $(D, L = !1) {
|
|
2682
|
-
var
|
|
2683
|
+
var f = e.getAuthItem != null ? e.getAuthItem(D) : null;
|
|
2683
2684
|
let A = !1;
|
|
2684
|
-
if (
|
|
2685
|
+
if (f == null)
|
|
2685
2686
|
return !1;
|
|
2686
|
-
let J =
|
|
2687
|
-
return ee || !L || !
|
|
2687
|
+
let J = f.subscriptions ?? [], Q = f.permissions ?? [], ee = N(J, Q, "view");
|
|
2688
|
+
return ee || !L || !_e(f.children) ? ee : ((f == null ? void 0 : f.children) != null && f.children.forEach((ce) => {
|
|
2688
2689
|
$(ce, !0) && (A = !0);
|
|
2689
2690
|
}), A);
|
|
2690
2691
|
}
|
|
2691
2692
|
function d(D) {
|
|
2692
|
-
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (L,
|
|
2693
|
-
const A = Be(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${
|
|
2693
|
+
return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (L, f) => {
|
|
2694
|
+
const A = Be(Wr(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${f}`);
|
|
2694
2695
|
return L ? `${A}&redirect_path=${L}` : A;
|
|
2695
2696
|
}), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(D, l.value) ?? "" : "";
|
|
2696
2697
|
}
|
|
2697
2698
|
function h(D) {
|
|
2698
|
-
var
|
|
2699
|
-
return D == null ? 0 : ((
|
|
2699
|
+
var f;
|
|
2700
|
+
return D == null ? 0 : ((f = (e.subscriptionOptions ?? []).find((A) => A.code == D)) == null ? void 0 : f.value) ?? 0;
|
|
2700
2701
|
}
|
|
2701
2702
|
function u(D) {
|
|
2702
|
-
const L = K(
|
|
2703
|
+
const L = K(s);
|
|
2703
2704
|
if (L.subscriptionCode == null)
|
|
2704
2705
|
return !1;
|
|
2705
2706
|
if (L.subscriptionCode == D)
|
|
2706
2707
|
return !0;
|
|
2707
|
-
const
|
|
2708
|
-
return
|
|
2708
|
+
const f = h(D), A = h(L.subscriptionCode);
|
|
2709
|
+
return f <= A;
|
|
2709
2710
|
}
|
|
2710
2711
|
function r(D) {
|
|
2711
|
-
const
|
|
2712
|
-
atob(
|
|
2712
|
+
const f = D.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), A = decodeURIComponent(
|
|
2713
|
+
atob(f).split("").map(function(J) {
|
|
2713
2714
|
return "%" + ("00" + J.charCodeAt(0).toString(16)).slice(-2);
|
|
2714
2715
|
}).join("")
|
|
2715
2716
|
);
|
|
2716
2717
|
return JSON.parse(A);
|
|
2717
2718
|
}
|
|
2718
2719
|
function y(D, L) {
|
|
2719
|
-
|
|
2720
|
+
s.value = void 0, M(), D != null && L != null && L.currentRoute.value.path != D && L.push({ path: D });
|
|
2720
2721
|
}
|
|
2721
2722
|
function I(D) {
|
|
2722
|
-
var
|
|
2723
|
-
K(
|
|
2723
|
+
var f;
|
|
2724
|
+
K(s).isLoggedIn || ((f = e.demo) == null || f.endDemo(), T() && (y(), window.location.href = d(D)));
|
|
2724
2725
|
}
|
|
2725
2726
|
async function i(D, L) {
|
|
2726
2727
|
return e.getToken ?? (e.getToken = async () => {
|
|
2727
|
-
let
|
|
2728
|
-
if (
|
|
2728
|
+
let f = D, A = L, J = e.oauthGrantType ?? "authorization_token", Q = e.oauthClientID ?? "";
|
|
2729
|
+
if (f == null || A == null)
|
|
2729
2730
|
throw new Error("Code and State required in OAuth token process");
|
|
2730
2731
|
if (A != l.value)
|
|
2731
2732
|
throw new Error("state does not match");
|
|
2732
2733
|
let ee = "";
|
|
2733
|
-
e.getTokenUrl ?? (e.getTokenUrl = () => Be(Wr(), "token")), ee = e.getTokenUrl(
|
|
2734
|
+
e.getTokenUrl ?? (e.getTokenUrl = () => Be(Wr(), "token")), ee = e.getTokenUrl(f, `${window.location.origin}/authentication`, J, Q);
|
|
2734
2735
|
const ce = {};
|
|
2735
|
-
ce.grant_type = J, ce.code =
|
|
2736
|
+
ce.grant_type = J, ce.code = f, ce.redirect_uri = `${window.location.origin}/authentication`, ce.client_id = Q;
|
|
2736
2737
|
const W = await Er().post({
|
|
2737
2738
|
additionalUrl: ee,
|
|
2738
2739
|
data: ce
|
|
@@ -2743,93 +2744,93 @@ function _n(e) {
|
|
|
2743
2744
|
function E(D) {
|
|
2744
2745
|
if (D != null && (e.demo == null || !e.demo.isDemoing.value)) {
|
|
2745
2746
|
const L = r(D);
|
|
2746
|
-
w(L, D), e.processTokenPayload != null && e.processTokenPayload(
|
|
2747
|
+
w(L, D), e.processTokenPayload != null && e.processTokenPayload(s, L);
|
|
2747
2748
|
}
|
|
2748
2749
|
}
|
|
2749
2750
|
function w(D, L) {
|
|
2750
2751
|
var A;
|
|
2751
|
-
const
|
|
2752
|
-
|
|
2752
|
+
const f = s.value;
|
|
2753
|
+
f.expiresOn = D.ExpiresOn, f.isGlobalAdmin = D.IsGlobalAdmin == "True", f.isLoggedIn = !0, f.permissions = D.Permissions, f.subscriptionCode = D.Subscription, f.timeZone ?? (f.timeZone = e.defaultTimeZone ?? hr), f.token = L, f.userID = D.UserLoginID, f.userPermissions = ((A = D.Permissions) == null ? void 0 : A.split(",")) ?? [];
|
|
2753
2754
|
}
|
|
2754
2755
|
function M() {
|
|
2755
2756
|
var D;
|
|
2756
|
-
|
|
2757
|
+
s.value ?? (s.value = {}), (D = s.value).timeZone ?? (D.timeZone = e.defaultTimeZone ?? hr);
|
|
2757
2758
|
}
|
|
2758
2759
|
function b() {
|
|
2759
|
-
const D = K(
|
|
2760
|
-
return D.isLoggedIn &&
|
|
2760
|
+
const D = K(s);
|
|
2761
|
+
return D.isLoggedIn && T() && (y(), window.location.href = d()), D.isLoggedIn;
|
|
2761
2762
|
}
|
|
2762
|
-
function
|
|
2763
|
-
const D = K(
|
|
2763
|
+
function T() {
|
|
2764
|
+
const D = K(s);
|
|
2764
2765
|
if (D == null || D.expiresOn == null)
|
|
2765
2766
|
return !0;
|
|
2766
|
-
const L = he.fromFormat(D.expiresOn, t),
|
|
2767
|
-
return L <=
|
|
2767
|
+
const L = he.fromFormat(D.expiresOn, t), f = he.utc();
|
|
2768
|
+
return L <= f;
|
|
2768
2769
|
}
|
|
2769
2770
|
return M(), Ir = {
|
|
2770
2771
|
authState: l,
|
|
2771
2772
|
canEdit: g,
|
|
2772
2773
|
canEditPermit: x,
|
|
2773
2774
|
canView: P,
|
|
2774
|
-
canViewPermit:
|
|
2775
|
-
credentials:
|
|
2775
|
+
canViewPermit: _,
|
|
2776
|
+
credentials: s,
|
|
2776
2777
|
doShow: N,
|
|
2777
2778
|
doShowByNav: $,
|
|
2778
2779
|
getAuthorizeUrl: d,
|
|
2779
2780
|
getToken: i,
|
|
2780
|
-
isLoggedIn: te(() =>
|
|
2781
|
+
isLoggedIn: te(() => s.value.isLoggedIn === !0),
|
|
2781
2782
|
login: I,
|
|
2782
2783
|
logout: y,
|
|
2783
2784
|
resetAuthState: S,
|
|
2784
2785
|
setAuth: E,
|
|
2785
|
-
timeZone: te(() =>
|
|
2786
|
+
timeZone: te(() => s.value.timeZone ?? e.defaultTimeZone ?? hr),
|
|
2786
2787
|
tryLogin: b
|
|
2787
2788
|
}, Ir;
|
|
2788
2789
|
}
|
|
2789
|
-
function
|
|
2790
|
+
function Rn(e, t, l = {}) {
|
|
2790
2791
|
const {
|
|
2791
2792
|
preventDefault: S = !1,
|
|
2792
|
-
stopPropagation:
|
|
2793
|
+
stopPropagation: s = !1,
|
|
2793
2794
|
axis: g = "both"
|
|
2794
2795
|
} = l, x = { capture: l.capture ?? !0 };
|
|
2795
|
-
let P = { x: 0, y: 0 },
|
|
2796
|
+
let P = { x: 0, y: 0 }, _ = { x: 0, y: 0 }, N = { x: 0, y: 0 }, $ = [], d = [], h = z(!1);
|
|
2796
2797
|
function u(M) {
|
|
2797
|
-
K(S) && M.preventDefault(), K(
|
|
2798
|
+
K(S) && M.preventDefault(), K(s) && M.stopPropagation();
|
|
2798
2799
|
}
|
|
2799
2800
|
function r(M) {
|
|
2800
|
-
var
|
|
2801
|
+
var f;
|
|
2801
2802
|
const b = K(e);
|
|
2802
2803
|
if (!b)
|
|
2803
2804
|
return;
|
|
2804
|
-
const
|
|
2805
|
-
N = { x: L.clientX, y: L.clientY },
|
|
2806
|
-
x:
|
|
2807
|
-
y:
|
|
2805
|
+
const T = b.$el, L = M.type === "touchstart" && M.touches.length > 0 ? M.touches[0] : M;
|
|
2806
|
+
N = { x: L.clientX, y: L.clientY }, _ = {
|
|
2807
|
+
x: T.offsetLeft,
|
|
2808
|
+
y: T.offsetTop
|
|
2808
2809
|
}, P = {
|
|
2809
|
-
x:
|
|
2810
|
-
y:
|
|
2811
|
-
}, ((
|
|
2810
|
+
x: T.offsetLeft,
|
|
2811
|
+
y: T.offsetTop
|
|
2812
|
+
}, ((f = l.onStart) == null ? void 0 : f.call(l, N, M)) !== !1 && (d.push(me("mousemove", y)), d.push(me("touchmove", y)), d.push(me("mouseup", I)), d.push(me("touchend", I)), u(M));
|
|
2812
2813
|
}
|
|
2813
2814
|
function y(M) {
|
|
2814
2815
|
var A;
|
|
2815
2816
|
if (!N || !K(e))
|
|
2816
2817
|
return;
|
|
2817
2818
|
const D = M.type === "touchmove" && M.touches.length > 0 ? M.touches[0] : M;
|
|
2818
|
-
let L = D.clientX - N.x,
|
|
2819
|
-
(g === "x" || g === "both") && (P.x =
|
|
2819
|
+
let L = D.clientX - N.x, f = D.clientY - N.y;
|
|
2820
|
+
(g === "x" || g === "both") && (P.x = _.x + L), (g === "y" || g === "both") && (P.y = _.y + f), (A = l.onMove) == null || A.call(l, P, M), u(M), i(P);
|
|
2820
2821
|
}
|
|
2821
2822
|
function I(M) {
|
|
2822
2823
|
var b;
|
|
2823
|
-
document.documentElement.style.cursor = "", d.forEach((
|
|
2824
|
-
|
|
2824
|
+
document.documentElement.style.cursor = "", d.forEach((T) => {
|
|
2825
|
+
T();
|
|
2825
2826
|
}), d.length = 0, (b = l.onEnd) == null || b.call(l, P, M), u(M);
|
|
2826
2827
|
}
|
|
2827
2828
|
function i(M) {
|
|
2828
2829
|
const b = K(e);
|
|
2829
2830
|
if (!b)
|
|
2830
2831
|
return;
|
|
2831
|
-
const
|
|
2832
|
-
|
|
2832
|
+
const T = b.$el;
|
|
2833
|
+
T.style.left = `${M.x}px`, T.style.top = `${M.y}px`;
|
|
2833
2834
|
}
|
|
2834
2835
|
function E() {
|
|
2835
2836
|
if (K(h))
|
|
@@ -2847,8 +2848,8 @@ function Tn(e, t, l = {}) {
|
|
|
2847
2848
|
if (!M)
|
|
2848
2849
|
return;
|
|
2849
2850
|
const b = M.$el;
|
|
2850
|
-
b.style.cursor = "", $.forEach((
|
|
2851
|
-
|
|
2851
|
+
b.style.cursor = "", $.forEach((T) => {
|
|
2852
|
+
T();
|
|
2852
2853
|
}), $.length = 0, h.value = !1;
|
|
2853
2854
|
}
|
|
2854
2855
|
return {
|
|
@@ -2857,9 +2858,9 @@ function Tn(e, t, l = {}) {
|
|
|
2857
2858
|
turnDraggableOn: E
|
|
2858
2859
|
};
|
|
2859
2860
|
}
|
|
2860
|
-
const
|
|
2861
|
-
function
|
|
2862
|
-
let l, S = t.handleWidth ?? 12,
|
|
2861
|
+
const Un = ["t", "r", "b", "l", "tr", "br", "bl", "tl"];
|
|
2862
|
+
function Bn(e, t = {}) {
|
|
2863
|
+
let l, S = t.handleWidth ?? 12, s = t.handleZIndex ?? 100, g = t.minWidth ?? 0, x = t.maxWidth ?? Number.MAX_SAFE_INTEGER, P = t.minHeight ?? 0, _ = t.maxHeight ?? Number.MAX_SAFE_INTEGER, N = t.preventDefault ?? !1, $ = t.stopPropagation ?? !1, d, h = [];
|
|
2863
2864
|
const u = z(!1);
|
|
2864
2865
|
let r = [], y = [];
|
|
2865
2866
|
const I = z(!1), i = z({ x: 0, y: 0 });
|
|
@@ -2868,14 +2869,14 @@ function Pn(e, t = {}) {
|
|
|
2868
2869
|
Ae(N) && W.preventDefault(), Ae($) && W.stopPropagation();
|
|
2869
2870
|
}
|
|
2870
2871
|
function b(W, Y) {
|
|
2871
|
-
h = Y.map(D), h.forEach((
|
|
2872
|
+
h = Y.map(D), h.forEach((V) => W.$el.appendChild(V));
|
|
2872
2873
|
}
|
|
2873
|
-
function
|
|
2874
|
+
function T(W) {
|
|
2874
2875
|
h.forEach((Y) => W.$el.removeChild(Y));
|
|
2875
2876
|
}
|
|
2876
2877
|
function D(W) {
|
|
2877
|
-
const Y = S + "px",
|
|
2878
|
-
return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ?
|
|
2878
|
+
const Y = S + "px", V = -S / 2 + "px", ae = s + 1, G = document.createElement("div");
|
|
2879
|
+
return G.dataset.handle = W, G.style.position = "absolute", G.style.touchAction = "none", G.style.userSelect = "none", G.style.zIndex = (W.length === 1 ? s : ae).toString(), G.style.cursor = J(W), W.includes("t") && (G.style.top = V, G.style.height = Y, W === "t" && (G.style.left = "0", G.style.width = "100%")), W.includes("b") && (G.style.bottom = V, G.style.height = Y, W === "b" && (G.style.left = "0", G.style.width = "100%")), W.includes("r") && (G.style.right = V, G.style.width = Y, W === "r" && (G.style.top = "0", G.style.height = "100%")), W.includes("l") && (G.style.left = V, G.style.width = Y, W === "l" && (G.style.top = "0", G.style.height = "100%")), G;
|
|
2879
2880
|
}
|
|
2880
2881
|
function L(W) {
|
|
2881
2882
|
var ne;
|
|
@@ -2884,30 +2885,30 @@ function Pn(e, t = {}) {
|
|
|
2884
2885
|
const Y = Ae(e);
|
|
2885
2886
|
if (!Y)
|
|
2886
2887
|
return;
|
|
2887
|
-
const
|
|
2888
|
+
const V = Y.$el, G = W.type === "touchstart" && W.touches.length > 0 ? W.touches[0] : W;
|
|
2888
2889
|
if (i.value.x = G.clientX, i.value.y = G.clientY, E = {
|
|
2889
|
-
left:
|
|
2890
|
-
top:
|
|
2891
|
-
height: parseInt(window.getComputedStyle(
|
|
2892
|
-
width: parseInt(window.getComputedStyle(
|
|
2890
|
+
left: V.offsetLeft,
|
|
2891
|
+
top: V.offsetTop,
|
|
2892
|
+
height: parseInt(window.getComputedStyle(V).getPropertyValue("height")),
|
|
2893
|
+
width: parseInt(window.getComputedStyle(V).getPropertyValue("width"))
|
|
2893
2894
|
}, w = Lr(E), ((ne = t.onStart) == null ? void 0 : ne.call(t, i.value, W)) === !1)
|
|
2894
2895
|
return;
|
|
2895
2896
|
let X = W.target;
|
|
2896
|
-
document.documentElement.style.cursor = J(X.dataset.handle), d = X.dataset.handle, y.push(me("mousemove",
|
|
2897
|
+
document.documentElement.style.cursor = J(X.dataset.handle), d = X.dataset.handle, y.push(me("mousemove", f)), y.push(me("mouseup", A)), y.push(me("touchmove", f)), y.push(me("touchend", A)), M(W);
|
|
2897
2898
|
}
|
|
2898
|
-
function
|
|
2899
|
+
function f(W) {
|
|
2899
2900
|
const Y = Ae(e);
|
|
2900
2901
|
if (!Y)
|
|
2901
2902
|
return;
|
|
2902
|
-
const
|
|
2903
|
+
const V = Y.$el, G = W.type === "touchmove" && W.touches.length > 0 ? W.touches[0] : W;
|
|
2903
2904
|
let X = G.clientX - i.value.x, ne = G.clientY - i.value.y;
|
|
2904
2905
|
const se = Ae(E);
|
|
2905
2906
|
if (d.includes("t")) {
|
|
2906
|
-
const fe = Math.min(
|
|
2907
|
+
const fe = Math.min(_, Math.max(P, (se.height ?? 0) - ne));
|
|
2907
2908
|
w.height = fe, w.top = (se.top ?? 0) + ne;
|
|
2908
2909
|
}
|
|
2909
2910
|
if (d.includes("b")) {
|
|
2910
|
-
const fe = Math.min(
|
|
2911
|
+
const fe = Math.min(_, Math.max(P, (se.height ?? 0) + ne));
|
|
2911
2912
|
w.height = fe;
|
|
2912
2913
|
}
|
|
2913
2914
|
if (d.includes("l")) {
|
|
@@ -2918,7 +2919,7 @@ function Pn(e, t = {}) {
|
|
|
2918
2919
|
const fe = Math.min(x, Math.max(g, (se.width ?? 0) + X));
|
|
2919
2920
|
w.width = fe;
|
|
2920
2921
|
}
|
|
2921
|
-
|
|
2922
|
+
V.dispatchEvent(new CustomEvent("resize")), M(W), ee(w);
|
|
2922
2923
|
}
|
|
2923
2924
|
function A() {
|
|
2924
2925
|
document.documentElement.style.cursor = "", d = null, y.forEach((W) => {
|
|
@@ -2932,37 +2933,37 @@ function Pn(e, t = {}) {
|
|
|
2932
2933
|
b: "s",
|
|
2933
2934
|
l: "w"
|
|
2934
2935
|
};
|
|
2935
|
-
return W.split("").map((
|
|
2936
|
+
return W.split("").map((V) => Y[V]).join("") + "-resize";
|
|
2936
2937
|
}
|
|
2937
2938
|
function Q(W) {
|
|
2938
2939
|
const Y = Ae(e);
|
|
2939
2940
|
if (!Y)
|
|
2940
2941
|
return;
|
|
2941
|
-
const
|
|
2942
|
+
const V = Y.$el;
|
|
2942
2943
|
if (console.log(l), l !== "page" && W == "page") {
|
|
2943
|
-
const ae =
|
|
2944
|
+
const ae = en(V), G = Ae(ae) ?? null;
|
|
2944
2945
|
let X = 0;
|
|
2945
2946
|
if (G != null) {
|
|
2946
2947
|
const ne = window.getComputedStyle(G);
|
|
2947
2948
|
X = parseInt(ne.getPropertyValue("width")) - G.offsetLeft;
|
|
2948
2949
|
}
|
|
2949
|
-
|
|
2950
|
+
V.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", V.offsetHeight, u.value = !0, ee({
|
|
2950
2951
|
height: void 0,
|
|
2951
2952
|
width: X,
|
|
2952
2953
|
top: 0,
|
|
2953
2954
|
left: 0,
|
|
2954
2955
|
position: void 0
|
|
2955
|
-
}), me(
|
|
2956
|
-
|
|
2956
|
+
}), me(V, "transitionend", () => {
|
|
2957
|
+
V.style.width = "auto", V.style.top = "", V.style.left = "", V.style.position = "", V.style.transition = "", u.value = !1;
|
|
2957
2958
|
}, { once: !0 });
|
|
2958
2959
|
} else if ((l == "page" || Y.$el.style.position !== "absolute") && W !== "page") {
|
|
2959
|
-
|
|
2960
|
-
height: parseInt(window.getComputedStyle(
|
|
2961
|
-
width: parseInt(window.getComputedStyle(
|
|
2962
|
-
top:
|
|
2963
|
-
left:
|
|
2960
|
+
V.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", u.value = !0, E = {
|
|
2961
|
+
height: parseInt(window.getComputedStyle(V).getPropertyValue("height")),
|
|
2962
|
+
width: parseInt(window.getComputedStyle(V).getPropertyValue("width")),
|
|
2963
|
+
top: V.offsetTop,
|
|
2964
|
+
left: V.offsetLeft,
|
|
2964
2965
|
position: "absolute"
|
|
2965
|
-
}, ee(E),
|
|
2966
|
+
}, ee(E), V.offsetHeight;
|
|
2966
2967
|
const ae = E;
|
|
2967
2968
|
W == "freestyle" ? w = {
|
|
2968
2969
|
height: ae.height,
|
|
@@ -2976,8 +2977,8 @@ function Pn(e, t = {}) {
|
|
|
2976
2977
|
top: (ae.top ?? 0) + 2,
|
|
2977
2978
|
left: (ae.left ?? 0) + 2,
|
|
2978
2979
|
position: "absolute"
|
|
2979
|
-
}), ee(w), me(
|
|
2980
|
-
|
|
2980
|
+
}), ee(w), me(V, "transitionend", () => {
|
|
2981
|
+
V.style.transition = "", u.value = !1;
|
|
2981
2982
|
}, { once: !0 });
|
|
2982
2983
|
}
|
|
2983
2984
|
}
|
|
@@ -2985,21 +2986,21 @@ function Pn(e, t = {}) {
|
|
|
2985
2986
|
const Y = Ae(e);
|
|
2986
2987
|
if (!Y)
|
|
2987
2988
|
return;
|
|
2988
|
-
const
|
|
2989
|
-
W.top ?
|
|
2989
|
+
const V = Y.$el;
|
|
2990
|
+
W.top ? V.style.top = `${W.top}px` : V.style.top = void 0, W.left ? V.style.left = `${W.left}px` : V.style.left = void 0, W.height ? V.style.height = `${W.height}px` : V.style.height = void 0, W.width ? V.style.width = `${W.width}px` : V.style.width = void 0, W.position ? V.style.position = `${W.position}` : V.style.position = void 0, console.log(V.style.position);
|
|
2990
2991
|
}
|
|
2991
2992
|
function ce(W, Y) {
|
|
2992
2993
|
if (I.value)
|
|
2993
2994
|
return;
|
|
2994
|
-
const
|
|
2995
|
-
|
|
2995
|
+
const V = Ae(e);
|
|
2996
|
+
V && (b(V, W ?? Un), Q(Y), r.push(me(V.$el, "mousedown", L)), r.push(me(V.$el, "touchstart", L)), I.value = !0, l = Y);
|
|
2996
2997
|
}
|
|
2997
2998
|
function we(W) {
|
|
2998
2999
|
if (!I.value)
|
|
2999
3000
|
return;
|
|
3000
3001
|
const Y = Ae(e);
|
|
3001
|
-
Y && (
|
|
3002
|
-
|
|
3002
|
+
Y && (T(Y), Q(W), r.forEach((V) => {
|
|
3003
|
+
V();
|
|
3003
3004
|
}), r.length = 0, I.value = !1);
|
|
3004
3005
|
}
|
|
3005
3006
|
return {
|
|
@@ -3008,16 +3009,16 @@ function Pn(e, t = {}) {
|
|
|
3008
3009
|
turnResizingOff: we
|
|
3009
3010
|
};
|
|
3010
3011
|
}
|
|
3011
|
-
function
|
|
3012
|
-
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1),
|
|
3013
|
-
|
|
3012
|
+
function $n(e) {
|
|
3013
|
+
const t = (e == null ? void 0 : e.blade) ?? z(null), l = (e == null ? void 0 : e.handle) ?? z(null), S = z(!1), s = (e == null ? void 0 : e.mobileBreakpoint) ?? 500, g = z((e == null ? void 0 : e.defaultVariant) ?? "page"), x = z({}), { turnResizingOff: P, turnResizingOn: _ } = Bn(t), { turnDraggableOff: N, turnDraggableOn: $ } = Rn(t, l);
|
|
3014
|
+
rn(t, (h) => {
|
|
3014
3015
|
const u = h[0], { width: r } = u.contentRect;
|
|
3015
|
-
S.value = r <
|
|
3016
|
+
S.value = r < s;
|
|
3016
3017
|
});
|
|
3017
3018
|
function d(h) {
|
|
3018
|
-
N(), h == "page" ? P(h) : h == "blade" ?
|
|
3019
|
+
N(), h == "page" ? P(h) : h == "blade" ? _(["l", "r"], h) : h == "freestyle" ? (P(), _(void 0, h), $()) : h == "inline" && P();
|
|
3019
3020
|
}
|
|
3020
|
-
return d(g.value),
|
|
3021
|
+
return d(g.value), Te(g, (h) => d(h)), {
|
|
3021
3022
|
isMobile: S,
|
|
3022
3023
|
variant: g,
|
|
3023
3024
|
bladeData: x
|
|
@@ -3041,10 +3042,10 @@ const mr = {
|
|
|
3041
3042
|
warning: "#FB8C00"
|
|
3042
3043
|
};
|
|
3043
3044
|
let Dr;
|
|
3044
|
-
function
|
|
3045
|
+
function Ta() {
|
|
3045
3046
|
return Dr;
|
|
3046
3047
|
}
|
|
3047
|
-
function
|
|
3048
|
+
function _a(e) {
|
|
3048
3049
|
const t = localStorage.getItem("cosmetics");
|
|
3049
3050
|
let l;
|
|
3050
3051
|
return t != null && t.length > 0 && (l = JSON.parse(t)), l ?? (l = {}), l.dark ?? (l.dark = e == null ? void 0 : e.dark), l.light ?? (l.light = e == null ? void 0 : e.light), l.theme ?? (l.theme = e == null ? void 0 : e.defaultTheme), {
|
|
@@ -3059,7 +3060,7 @@ function Ia(e) {
|
|
|
3059
3060
|
}
|
|
3060
3061
|
};
|
|
3061
3062
|
}
|
|
3062
|
-
function
|
|
3063
|
+
function Fn(e) {
|
|
3063
3064
|
const t = z({});
|
|
3064
3065
|
let l = e.vuetifyInstance;
|
|
3065
3066
|
function S() {
|
|
@@ -3072,7 +3073,7 @@ function Mn(e) {
|
|
|
3072
3073
|
drawerStick: e.defaultDrawerStick ?? !1
|
|
3073
3074
|
};
|
|
3074
3075
|
}
|
|
3075
|
-
function
|
|
3076
|
+
function s() {
|
|
3076
3077
|
localStorage.setItem("cosmetics", JSON.stringify(t.value));
|
|
3077
3078
|
}
|
|
3078
3079
|
function g(d) {
|
|
@@ -3100,7 +3101,7 @@ function Mn(e) {
|
|
|
3100
3101
|
function P() {
|
|
3101
3102
|
t.value.drawer = !t.value.drawer;
|
|
3102
3103
|
}
|
|
3103
|
-
function
|
|
3104
|
+
function _() {
|
|
3104
3105
|
t.value.drawerStick = !t.value.drawerStick;
|
|
3105
3106
|
}
|
|
3106
3107
|
function N() {
|
|
@@ -3113,47 +3114,47 @@ function Mn(e) {
|
|
|
3113
3114
|
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", "");
|
|
3114
3115
|
}
|
|
3115
3116
|
}
|
|
3116
|
-
return S(),
|
|
3117
|
-
|
|
3117
|
+
return S(), Te(t, () => {
|
|
3118
|
+
s();
|
|
3118
3119
|
}), Dr = {
|
|
3119
3120
|
state: t,
|
|
3120
3121
|
resetCosmetics: g,
|
|
3121
3122
|
setTemporaryColor: x,
|
|
3122
3123
|
toggleDrawer: P,
|
|
3123
|
-
toggleDrawerStick:
|
|
3124
|
+
toggleDrawerStick: _,
|
|
3124
3125
|
toggleLightDark: N,
|
|
3125
3126
|
undoTemporaryColor: $
|
|
3126
3127
|
}, Dr;
|
|
3127
3128
|
}
|
|
3128
|
-
const
|
|
3129
|
+
const Ca = {
|
|
3129
3130
|
canExportCSV: !1
|
|
3130
3131
|
};
|
|
3131
|
-
function
|
|
3132
|
+
function kn() {
|
|
3132
3133
|
function e(t) {
|
|
3133
3134
|
const {
|
|
3134
3135
|
items: l,
|
|
3135
3136
|
headers: S,
|
|
3136
|
-
fileName:
|
|
3137
|
+
fileName: s = "data.csv",
|
|
3137
3138
|
format: g = "file"
|
|
3138
3139
|
} = t;
|
|
3139
|
-
if (!
|
|
3140
|
+
if (!_e(l))
|
|
3140
3141
|
return;
|
|
3141
3142
|
let x = [];
|
|
3142
3143
|
S != null ? x = S == null ? void 0 : S.filter((I) => (I.csv ?? I.csvText ?? I.csvFilter ?? I.csvArray) != null).map((I) => ({
|
|
3143
3144
|
header: I.title ?? I.value ?? "",
|
|
3144
3145
|
itemText: I.itemText,
|
|
3145
3146
|
value: I.value
|
|
3146
|
-
})) : x = Object.keys(l[0]).map((I) => ({ header:
|
|
3147
|
+
})) : x = Object.keys(l[0]).map((I) => ({ header: on(I) ?? "", value: I })), x = x.filter((I) => I.header.length > 0);
|
|
3147
3148
|
var P = [];
|
|
3148
3149
|
for (let I = 0; I < l.length; I++) {
|
|
3149
3150
|
const i = l[I];
|
|
3150
|
-
var
|
|
3151
|
+
var _ = {}, N = [];
|
|
3151
3152
|
for (let E = 0; E < x.length; E++) {
|
|
3152
3153
|
const w = x[E];
|
|
3153
3154
|
var $ = null;
|
|
3154
|
-
typeof w.value == "function" ? $ = w.value(i) : typeof w.value == "string" && ($ = Sr(i, w.value)), w.itemText != null ?
|
|
3155
|
+
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] = $;
|
|
3155
3156
|
}
|
|
3156
|
-
P.push(
|
|
3157
|
+
P.push(_), _e(N) && N.forEach((E) => {
|
|
3157
3158
|
P.push(E);
|
|
3158
3159
|
}), N = [];
|
|
3159
3160
|
}
|
|
@@ -3169,10 +3170,10 @@ function Ln() {
|
|
|
3169
3170
|
var h = d.join(`
|
|
3170
3171
|
`), u = new Blob([h], { type: "text/plain;charset=utf-8" });
|
|
3171
3172
|
if (window.navigator.msSaveOrOpenBlob)
|
|
3172
|
-
window.navigator.msSaveOrOpenBlob(u,
|
|
3173
|
+
window.navigator.msSaveOrOpenBlob(u, s);
|
|
3173
3174
|
else {
|
|
3174
3175
|
var r = document.createElement("a"), y = URL.createObjectURL(u);
|
|
3175
|
-
r.href = y, r.download =
|
|
3176
|
+
r.href = y, r.download = s, document.body.appendChild(r), r.click(), setTimeout(function() {
|
|
3176
3177
|
document.body.removeChild(r), window.URL.revokeObjectURL(y);
|
|
3177
3178
|
}, 0);
|
|
3178
3179
|
}
|
|
@@ -3182,60 +3183,60 @@ function Ln() {
|
|
|
3182
3183
|
};
|
|
3183
3184
|
}
|
|
3184
3185
|
let xr;
|
|
3185
|
-
function
|
|
3186
|
+
function Pa() {
|
|
3186
3187
|
return xr;
|
|
3187
3188
|
}
|
|
3188
|
-
function
|
|
3189
|
+
function Gn(e) {
|
|
3189
3190
|
const t = e.getUTC ?? he.utc;
|
|
3190
3191
|
function l() {
|
|
3191
|
-
return
|
|
3192
|
+
return s().startOf("day").toUTC().toString() ?? "";
|
|
3192
3193
|
}
|
|
3193
3194
|
function S() {
|
|
3194
|
-
return
|
|
3195
|
+
return s().startOf("day").plus({ day: 1 }).toUTC().toString() ?? "";
|
|
3195
3196
|
}
|
|
3196
|
-
function
|
|
3197
|
-
return
|
|
3197
|
+
function s(_, N) {
|
|
3198
|
+
return _ == null ? t().setZone(e.getTimeZone()) : N ? he.fromFormat(_, N, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
|
|
3198
3199
|
}
|
|
3199
|
-
function g(
|
|
3200
|
-
if (
|
|
3200
|
+
function g(_, N, $) {
|
|
3201
|
+
if (_ == null) {
|
|
3201
3202
|
const h = t().setZone(e.getTimeZone());
|
|
3202
3203
|
return N ? h.toFormat(N) : h.toString();
|
|
3203
3204
|
}
|
|
3204
|
-
if (
|
|
3205
|
+
if (_ == "Invalid DateTime")
|
|
3205
3206
|
return "";
|
|
3206
|
-
const d = $ ? he.fromFormat(
|
|
3207
|
+
const d = $ ? he.fromFormat(_, $, { zone: e.getTimeZone() }) : he.fromISO(_, { zone: e.getTimeZone() });
|
|
3207
3208
|
return N ? d.toFormat(N) : d == null ? void 0 : d.toString();
|
|
3208
3209
|
}
|
|
3209
|
-
function x(
|
|
3210
|
-
return
|
|
3210
|
+
function x(_, N) {
|
|
3211
|
+
return _ == null ? t() : N ? he.fromFormat(_, N) : he.fromISO(_);
|
|
3211
3212
|
}
|
|
3212
|
-
function P(
|
|
3213
|
-
if (
|
|
3213
|
+
function P(_, N, $) {
|
|
3214
|
+
if (_ == null)
|
|
3214
3215
|
return N ? t().toFormat(N) : t().toString();
|
|
3215
3216
|
{
|
|
3216
|
-
const d = $ ? he.fromFormat(
|
|
3217
|
+
const d = $ ? he.fromFormat(_, $) : he.fromISO(_);
|
|
3217
3218
|
return N ? d.toFormat(N) : d.toString();
|
|
3218
3219
|
}
|
|
3219
3220
|
}
|
|
3220
3221
|
return xr = {
|
|
3221
3222
|
getToday: l,
|
|
3222
3223
|
getTomorrow: S,
|
|
3223
|
-
tzDate:
|
|
3224
|
+
tzDate: s,
|
|
3224
3225
|
tzString: g,
|
|
3225
3226
|
utcDate: x,
|
|
3226
3227
|
utcString: P
|
|
3227
3228
|
}, xr;
|
|
3228
3229
|
}
|
|
3229
|
-
let
|
|
3230
|
-
function
|
|
3231
|
-
return
|
|
3230
|
+
let Tr;
|
|
3231
|
+
function Na() {
|
|
3232
|
+
return Tr;
|
|
3232
3233
|
}
|
|
3233
|
-
function
|
|
3234
|
+
function Wn(e) {
|
|
3234
3235
|
const t = z(!1), l = (e == null ? void 0 : e.apis) ?? [];
|
|
3235
3236
|
function S() {
|
|
3236
3237
|
t.value = !0;
|
|
3237
3238
|
}
|
|
3238
|
-
function
|
|
3239
|
+
function s() {
|
|
3239
3240
|
t.value = !1;
|
|
3240
3241
|
}
|
|
3241
3242
|
function g(d) {
|
|
@@ -3275,7 +3276,7 @@ function Un(e) {
|
|
|
3275
3276
|
});
|
|
3276
3277
|
});
|
|
3277
3278
|
}
|
|
3278
|
-
function
|
|
3279
|
+
function _(d) {
|
|
3279
3280
|
if (l == null)
|
|
3280
3281
|
throw new Error("no demo data available for this api");
|
|
3281
3282
|
const h = g(d);
|
|
@@ -3326,138 +3327,138 @@ function Un(e) {
|
|
|
3326
3327
|
});
|
|
3327
3328
|
});
|
|
3328
3329
|
}
|
|
3329
|
-
return
|
|
3330
|
-
endDemo:
|
|
3330
|
+
return Tr = {
|
|
3331
|
+
endDemo: s,
|
|
3331
3332
|
isDemoing: t,
|
|
3332
3333
|
startDemo: S,
|
|
3333
3334
|
data: l,
|
|
3334
3335
|
deleteItem: x,
|
|
3335
3336
|
get: P,
|
|
3336
|
-
getAll:
|
|
3337
|
+
getAll: _,
|
|
3337
3338
|
post: N,
|
|
3338
3339
|
patch: $
|
|
3339
|
-
},
|
|
3340
|
+
}, Tr;
|
|
3340
3341
|
}
|
|
3341
|
-
var
|
|
3342
|
-
function
|
|
3342
|
+
var qn = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
3343
|
+
function Ma(e) {
|
|
3343
3344
|
function t(l) {
|
|
3344
|
-
var
|
|
3345
|
+
var s;
|
|
3345
3346
|
const S = l.matched.slice().reverse().find((g) => g.meta && g.meta.title);
|
|
3346
3347
|
if (S)
|
|
3347
3348
|
document.title = S.meta.title;
|
|
3348
3349
|
else {
|
|
3349
|
-
const g =
|
|
3350
|
+
const g = qn.VITE_NODE_ENV;
|
|
3350
3351
|
let x = "";
|
|
3351
|
-
g == "development" ? x = "BWeb Dev" : g == "staging" ? x = "BlitzIt Sandpit" : x = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((
|
|
3352
|
+
g == "development" ? x = "BWeb Dev" : g == "staging" ? x = "BlitzIt Sandpit" : x = "BlitzIt Web | Cloud-Based Wholesale Logistics Platform", ((s = e == null ? void 0 : e.demo) == null ? void 0 : s.isDemoing.value) == !0 && (x = `Training: ${x}`), document.title = x;
|
|
3352
3353
|
}
|
|
3353
3354
|
}
|
|
3354
3355
|
return {
|
|
3355
3356
|
updateMeta: t
|
|
3356
3357
|
};
|
|
3357
3358
|
}
|
|
3358
|
-
let
|
|
3359
|
-
function
|
|
3360
|
-
return
|
|
3359
|
+
let _r;
|
|
3360
|
+
function La() {
|
|
3361
|
+
return _r;
|
|
3361
3362
|
}
|
|
3362
|
-
function
|
|
3363
|
-
function t(
|
|
3364
|
-
return
|
|
3363
|
+
function Vn(e) {
|
|
3364
|
+
function t(f, A, J) {
|
|
3365
|
+
return f ? hn(f) ? J ?? "" : e.dates.tzString(f, A) : J ?? f ?? "";
|
|
3365
3366
|
}
|
|
3366
|
-
function l(
|
|
3367
|
-
if (!
|
|
3367
|
+
function l(f) {
|
|
3368
|
+
if (!f)
|
|
3368
3369
|
return "";
|
|
3369
|
-
if (typeof
|
|
3370
|
-
return
|
|
3370
|
+
if (typeof f != "object")
|
|
3371
|
+
return f;
|
|
3371
3372
|
var A = "";
|
|
3372
|
-
return
|
|
3373
|
+
return f.companyAccount != null && (A = f.companyAccount.companyName + " | "), f.addressLineOne != null && (A = A + f.addressLineOne + " "), f.streetNumber != null && (A = A + f.streetNumber + " "), f.streetName != null && (A = A + f.streetName + ", "), f.suburb != null && (A = A + f.suburb + " "), f.state != null && (A = A + f.state + " "), f.postcode != null && (A = A + f.postcode), A;
|
|
3373
3374
|
}
|
|
3374
|
-
function S(
|
|
3375
|
-
if (typeof
|
|
3376
|
-
return
|
|
3375
|
+
function S(f) {
|
|
3376
|
+
if (typeof f != "number")
|
|
3377
|
+
return f;
|
|
3377
3378
|
var A = new Intl.NumberFormat("en-US", {
|
|
3378
3379
|
style: "currency",
|
|
3379
3380
|
currency: "AUD",
|
|
3380
3381
|
minimumFractionDigits: 2
|
|
3381
3382
|
});
|
|
3382
|
-
return A.format(
|
|
3383
|
+
return A.format(f);
|
|
3383
3384
|
}
|
|
3384
|
-
function f
|
|
3385
|
-
return t(
|
|
3385
|
+
function s(f, A) {
|
|
3386
|
+
return t(f, "ccc | d LLL", A);
|
|
3386
3387
|
}
|
|
3387
|
-
function g(
|
|
3388
|
-
return t(
|
|
3388
|
+
function g(f, A) {
|
|
3389
|
+
return t(f, "d LLL", A);
|
|
3389
3390
|
}
|
|
3390
|
-
function x(
|
|
3391
|
-
return t(
|
|
3391
|
+
function x(f, A) {
|
|
3392
|
+
return t(f, "ccc", A);
|
|
3392
3393
|
}
|
|
3393
|
-
function P(
|
|
3394
|
-
return t(
|
|
3394
|
+
function P(f, A) {
|
|
3395
|
+
return t(f, "ccc dd LLL yyyy", A);
|
|
3395
3396
|
}
|
|
3396
|
-
function
|
|
3397
|
-
return t(
|
|
3397
|
+
function _(f, A) {
|
|
3398
|
+
return t(f, "ccc dd LLL @ hh:mm a", A);
|
|
3398
3399
|
}
|
|
3399
|
-
function N(
|
|
3400
|
-
return new Intl.NumberFormat().format(
|
|
3400
|
+
function N(f) {
|
|
3401
|
+
return new Intl.NumberFormat().format(f);
|
|
3401
3402
|
}
|
|
3402
|
-
function $(
|
|
3403
|
-
return
|
|
3403
|
+
function $(f) {
|
|
3404
|
+
return f == 0 ? "" : new Intl.NumberFormat().format(f);
|
|
3404
3405
|
}
|
|
3405
|
-
function d(
|
|
3406
|
-
if (
|
|
3406
|
+
function d(f) {
|
|
3407
|
+
if (f == 0)
|
|
3407
3408
|
return "";
|
|
3408
|
-
var A = new Intl.NumberFormat().format(
|
|
3409
|
-
return
|
|
3409
|
+
var A = new Intl.NumberFormat().format(f);
|
|
3410
|
+
return f > 0 ? "+" + A : A;
|
|
3410
3411
|
}
|
|
3411
|
-
function h(
|
|
3412
|
-
return e.dates.utcString(
|
|
3412
|
+
function h(f, A) {
|
|
3413
|
+
return e.dates.utcString(f, A);
|
|
3413
3414
|
}
|
|
3414
|
-
function u(
|
|
3415
|
-
return rt(
|
|
3415
|
+
function u(f) {
|
|
3416
|
+
return rt(f, !1);
|
|
3416
3417
|
}
|
|
3417
|
-
function r(
|
|
3418
|
-
if (!
|
|
3418
|
+
function r(f) {
|
|
3419
|
+
if (!f)
|
|
3419
3420
|
return "";
|
|
3420
|
-
if (typeof
|
|
3421
|
-
return
|
|
3421
|
+
if (typeof f != "object")
|
|
3422
|
+
return f;
|
|
3422
3423
|
var A = "";
|
|
3423
|
-
return
|
|
3424
|
+
return f.addressLineOne != null && (A = f.addressLineOne + " "), f.streetNumber != null && (A = A + f.streetNumber + " "), f.streetName != null && (A = A + f.streetName + " "), f.suburb != null && (A = A + f.suburb + " "), f.state != null && (A = A + f.state + " "), f.postcode != null && (A = A + f.postcode), A = A.replaceAll(",", " "), A;
|
|
3424
3425
|
}
|
|
3425
|
-
function y(
|
|
3426
|
-
return t(
|
|
3426
|
+
function y(f, A) {
|
|
3427
|
+
return t(f, "ddd DD MMM YYYY", A);
|
|
3427
3428
|
}
|
|
3428
|
-
function I(
|
|
3429
|
-
return t(
|
|
3429
|
+
function I(f, A) {
|
|
3430
|
+
return t(f, "ccc dd LLL yyyy hh:mm a", A);
|
|
3430
3431
|
}
|
|
3431
|
-
function i(
|
|
3432
|
+
function i(f) {
|
|
3432
3433
|
var A = new Intl.NumberFormat("en-US", {
|
|
3433
3434
|
style: "percent",
|
|
3434
3435
|
minimumFractionDigits: 2
|
|
3435
3436
|
});
|
|
3436
|
-
return A.format(
|
|
3437
|
+
return A.format(f);
|
|
3437
3438
|
}
|
|
3438
|
-
function E(
|
|
3439
|
-
return
|
|
3439
|
+
function E(f) {
|
|
3440
|
+
return f.replaceAll(",", " ");
|
|
3440
3441
|
}
|
|
3441
|
-
function w(
|
|
3442
|
-
return t(
|
|
3442
|
+
function w(f, A) {
|
|
3443
|
+
return t(f, "dd LLL yyyy", A);
|
|
3443
3444
|
}
|
|
3444
|
-
function M(
|
|
3445
|
-
return t(
|
|
3445
|
+
function M(f, A) {
|
|
3446
|
+
return t(f, "dd LLL yyyy hh:mm a", A);
|
|
3446
3447
|
}
|
|
3447
|
-
function b(
|
|
3448
|
-
return t(
|
|
3448
|
+
function b(f, A) {
|
|
3449
|
+
return t(f, "hh:mm a", A);
|
|
3449
3450
|
}
|
|
3450
|
-
function
|
|
3451
|
-
return
|
|
3451
|
+
function T(f) {
|
|
3452
|
+
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";
|
|
3452
3453
|
}
|
|
3453
3454
|
const D = {
|
|
3454
3455
|
toCompanyNameAndLocationLine: l,
|
|
3455
3456
|
toCurrency: S,
|
|
3456
|
-
toDayDate:
|
|
3457
|
+
toDayDate: s,
|
|
3457
3458
|
toDayMonth: g,
|
|
3458
3459
|
toDayOfWeek: x,
|
|
3459
3460
|
toDayShortDate: P,
|
|
3460
|
-
toDayShortDateAndTime:
|
|
3461
|
+
toDayShortDateAndTime: _,
|
|
3461
3462
|
toDisplayNumber: N,
|
|
3462
3463
|
toDisplayNumberOver: $,
|
|
3463
3464
|
toDisplayNumberSigned: d,
|
|
@@ -3471,37 +3472,37 @@ function $n(e) {
|
|
|
3471
3472
|
toShortDate: w,
|
|
3472
3473
|
toShortDateAndTime: M,
|
|
3473
3474
|
toTime: b,
|
|
3474
|
-
toTimeOfDay:
|
|
3475
|
+
toTimeOfDay: T
|
|
3475
3476
|
};
|
|
3476
|
-
function L(
|
|
3477
|
-
if (
|
|
3478
|
-
let A =
|
|
3477
|
+
function L(f) {
|
|
3478
|
+
if (f != null) {
|
|
3479
|
+
let A = f;
|
|
3479
3480
|
if (A != null && D[A] != null)
|
|
3480
3481
|
return D[A];
|
|
3481
3482
|
}
|
|
3482
3483
|
return (A) => A;
|
|
3483
3484
|
}
|
|
3484
|
-
return
|
|
3485
|
+
return _r = {
|
|
3485
3486
|
findFilter: L,
|
|
3486
3487
|
...D
|
|
3487
|
-
},
|
|
3488
|
+
}, _r;
|
|
3488
3489
|
}
|
|
3489
|
-
function
|
|
3490
|
+
function Hn(e, t) {
|
|
3490
3491
|
const l = z(!1), S = Yt(e);
|
|
3491
|
-
let
|
|
3492
|
-
(t == null ? void 0 : t.useTracker) !== !1 &&
|
|
3493
|
-
l.value = g(P) !=
|
|
3492
|
+
let s = g(K(e));
|
|
3493
|
+
(t == null ? void 0 : t.useTracker) !== !1 && Te(S, (P) => {
|
|
3494
|
+
l.value = g(P) != s;
|
|
3494
3495
|
}, { deep: !0 });
|
|
3495
3496
|
function g(P) {
|
|
3496
|
-
const
|
|
3497
|
+
const _ = Lr(P);
|
|
3497
3498
|
return t != null && (t.propsToIgnore != null ? t.propsToIgnore.forEach((N) => {
|
|
3498
|
-
delete
|
|
3499
|
+
delete _[N];
|
|
3499
3500
|
}) : t.propsToTrack != null && Object.keys(P).forEach(($) => {
|
|
3500
|
-
t.propsToTrack.some((d) => d == $) || delete
|
|
3501
|
-
})), JSON.stringify(
|
|
3501
|
+
t.propsToTrack.some((d) => d == $) || delete _[$];
|
|
3502
|
+
})), JSON.stringify(_);
|
|
3502
3503
|
}
|
|
3503
3504
|
function x() {
|
|
3504
|
-
|
|
3505
|
+
s = g(K(S)), l.value = !1;
|
|
3505
3506
|
}
|
|
3506
3507
|
return {
|
|
3507
3508
|
asyncItem: S,
|
|
@@ -3509,42 +3510,42 @@ function Fn(e, t) {
|
|
|
3509
3510
|
restartTracker: x
|
|
3510
3511
|
};
|
|
3511
3512
|
}
|
|
3512
|
-
function
|
|
3513
|
+
function Ra(e, t) {
|
|
3513
3514
|
var ae;
|
|
3514
3515
|
const {
|
|
3515
3516
|
// useBladeSrc = true,
|
|
3516
3517
|
useRouteSrc: l = !0
|
|
3517
|
-
} = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode),
|
|
3518
|
+
} = t ?? {}, S = e.storeMode ?? (t == null ? void 0 : t.storeMode), s = e.storageMode ?? (t == null ? void 0 : t.storageMode), g = e.nav ?? e.bladeName ?? "basic", x = Mr(), P = et(), _ = K(e.proxyQueryKey), N = te(() => {
|
|
3518
3519
|
var G;
|
|
3519
|
-
return K(e.proxyID) ?? (
|
|
3520
|
+
return K(e.proxyID) ?? (_ != null ? (G = P == null ? void 0 : P.query) == null ? void 0 : G[_] : void 0);
|
|
3520
3521
|
}), $ = z(void 0), { actionErrorMsg: d, actionLoadingMsg: h, deleteItem: u, getItem: r, getAllItems: y, restoreItem: I, saveItem: i } = ut({
|
|
3521
3522
|
nav: g,
|
|
3522
3523
|
onError: e.onError ?? (t == null ? void 0 : t.onError),
|
|
3523
3524
|
proxyID: N.value,
|
|
3524
3525
|
store: Le({
|
|
3525
3526
|
storeMode: S,
|
|
3526
|
-
storageMode:
|
|
3527
|
+
storageMode: s,
|
|
3527
3528
|
nav: g
|
|
3528
3529
|
})
|
|
3529
|
-
}), E = te(() => e.errorMsg ?? d.value), w = te(() => e.loadingMsg ?? h.value), M = te(() => w.value != null), b = z(e.itemID ?? (l ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)),
|
|
3530
|
-
if (
|
|
3530
|
+
}), E = te(() => e.errorMsg ?? d.value), w = te(() => e.loadingMsg ?? h.value), M = te(() => w.value != null), b = z(e.itemID ?? (l ? (ae = P == null ? void 0 : P.params) == null ? void 0 : ae.id : void 0)), T = z(b.value == "new" ? "new" : e.startEditing ? "edit" : "view"), D = Re(!1), L = te(() => {
|
|
3531
|
+
if (T.value == "new")
|
|
3531
3532
|
return !1;
|
|
3532
3533
|
const G = K($);
|
|
3533
3534
|
return e.onCanDelete != null ? e.onCanDelete(G) : (G == null ? void 0 : G.isInactive) !== !0;
|
|
3534
|
-
}),
|
|
3535
|
-
if (
|
|
3535
|
+
}), f = te(() => {
|
|
3536
|
+
if (T.value == "new")
|
|
3536
3537
|
return !1;
|
|
3537
3538
|
const G = K($);
|
|
3538
3539
|
return e.onCanEdit != null ? e.onCanEdit(G) : !0;
|
|
3539
3540
|
}), A = te(() => {
|
|
3540
|
-
if (
|
|
3541
|
+
if (T.value == "new")
|
|
3541
3542
|
return !1;
|
|
3542
3543
|
const G = K($);
|
|
3543
3544
|
return e.onCanRestore != null ? e.onCanRestore(G) : (G == null ? void 0 : G.isInactive) === !0;
|
|
3544
3545
|
}), J = te(() => {
|
|
3545
3546
|
const G = K($);
|
|
3546
3547
|
return e.onCanSave != null ? e.onCanSave(G) : !0;
|
|
3547
|
-
}), { isChanged: Q, restartTracker: ee } =
|
|
3548
|
+
}), { isChanged: Q, restartTracker: ee } = Hn($, {
|
|
3548
3549
|
useTracker: e.trackChanges,
|
|
3549
3550
|
propsToIgnore: e.trackIgnoreProps,
|
|
3550
3551
|
propsToTrack: e.trackProps
|
|
@@ -3616,7 +3617,7 @@ function Pa(e, t) {
|
|
|
3616
3617
|
onCanSaveAsync: se,
|
|
3617
3618
|
onGetSaveAsync: fe,
|
|
3618
3619
|
onSaveAsync: Ee,
|
|
3619
|
-
onSaveSuccessAsync: $e = (Ce) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Ce.rowVersion != null && (G.rowVersion = Ce.rowVersion), ee(),
|
|
3620
|
+
onSaveSuccessAsync: $e = (Ce) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Ce.rowVersion != null && (G.rowVersion = Ce.rowVersion), ee(), T.value = "view"), Promise.resolve(void 0))
|
|
3620
3621
|
} = { ...e };
|
|
3621
3622
|
i({
|
|
3622
3623
|
additionalUrl: ne,
|
|
@@ -3629,16 +3630,16 @@ function Pa(e, t) {
|
|
|
3629
3630
|
proxyID: N.value,
|
|
3630
3631
|
// ...params.getOptions(),
|
|
3631
3632
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3632
|
-
mode:
|
|
3633
|
+
mode: T.value
|
|
3633
3634
|
});
|
|
3634
3635
|
}
|
|
3635
|
-
function
|
|
3636
|
-
const G = K(
|
|
3637
|
-
!G || G == "view" ?
|
|
3636
|
+
function V() {
|
|
3637
|
+
const G = K(T);
|
|
3638
|
+
!G || G == "view" ? T.value = "edit" : G == "edit" && (T.value = "view");
|
|
3638
3639
|
}
|
|
3639
|
-
return
|
|
3640
|
+
return Te(E, (G) => {
|
|
3640
3641
|
D.value = G != null;
|
|
3641
|
-
}),
|
|
3642
|
+
}), Te(() => e.refreshToggle, () => {
|
|
3642
3643
|
W({ deepRefresh: !0 });
|
|
3643
3644
|
}), Xr(async () => {
|
|
3644
3645
|
var G;
|
|
@@ -3649,33 +3650,33 @@ function Pa(e, t) {
|
|
|
3649
3650
|
errorMsg: E,
|
|
3650
3651
|
isChanged: Q,
|
|
3651
3652
|
isDeletable: L,
|
|
3652
|
-
isEditing: te(() =>
|
|
3653
|
-
isEditable:
|
|
3653
|
+
isEditing: te(() => T.value == "new" || T.value == "edit"),
|
|
3654
|
+
isEditable: f,
|
|
3654
3655
|
isLoading: M,
|
|
3655
|
-
isNew: te(() =>
|
|
3656
|
+
isNew: te(() => T.value == "new"),
|
|
3656
3657
|
isRestorable: A,
|
|
3657
3658
|
isSaveable: J,
|
|
3658
3659
|
loadingMsg: w,
|
|
3659
|
-
mode:
|
|
3660
|
+
mode: T,
|
|
3660
3661
|
refresh: W,
|
|
3661
3662
|
restoreItem: we,
|
|
3662
3663
|
saveItem: Y,
|
|
3663
3664
|
showError: D,
|
|
3664
|
-
toggleMode:
|
|
3665
|
+
toggleMode: V
|
|
3665
3666
|
};
|
|
3666
3667
|
}
|
|
3667
|
-
const
|
|
3668
|
+
const Hr = z(!0), zr = z(!1), Yr = z(), gr = z(!1);
|
|
3668
3669
|
let yr = null, Cr;
|
|
3669
3670
|
function it() {
|
|
3670
3671
|
return Cr;
|
|
3671
3672
|
}
|
|
3672
|
-
function
|
|
3673
|
+
function zn(e) {
|
|
3673
3674
|
const t = e.defaultCacheExpiryHours ?? 7;
|
|
3674
3675
|
e.getDisplayName ?? (e.getDisplayName = (h) => {
|
|
3675
3676
|
if (h.displayName != null)
|
|
3676
3677
|
return h.displayName;
|
|
3677
3678
|
if (h.name != null)
|
|
3678
|
-
return
|
|
3679
|
+
return dn(h.name.replaceAll("-", " "));
|
|
3679
3680
|
});
|
|
3680
3681
|
const l = (e.navItems ?? []).map((h) => ({
|
|
3681
3682
|
displayName: h.displayName ?? e.getDisplayName(h),
|
|
@@ -3685,7 +3686,7 @@ function kn(e) {
|
|
|
3685
3686
|
var u;
|
|
3686
3687
|
return (u = P(h)) == null ? void 0 : u.archiveName;
|
|
3687
3688
|
}
|
|
3688
|
-
function
|
|
3689
|
+
function s(h) {
|
|
3689
3690
|
var u;
|
|
3690
3691
|
return ((u = P(h)) == null ? void 0 : u.cacheExpiryHours) ?? t;
|
|
3691
3692
|
}
|
|
@@ -3703,11 +3704,11 @@ function kn(e) {
|
|
|
3703
3704
|
return r.name == h || r.singleName == h || ((y = r.aliases) == null ? void 0 : y.some((I) => I == h));
|
|
3704
3705
|
}) ?? null;
|
|
3705
3706
|
}
|
|
3706
|
-
function
|
|
3707
|
+
function _(h) {
|
|
3707
3708
|
const u = P(h);
|
|
3708
3709
|
if (u == null)
|
|
3709
3710
|
return;
|
|
3710
|
-
let r =
|
|
3711
|
+
let r = Dn(u.microservice ?? "default") ?? "";
|
|
3711
3712
|
return u.path != null && (r = Be(r, u.path)), r != null && r.endsWith("/") && (r = r.slice(0, r.length - 1)), r;
|
|
3712
3713
|
}
|
|
3713
3714
|
function N(h) {
|
|
@@ -3716,7 +3717,7 @@ function kn(e) {
|
|
|
3716
3717
|
return u.singleName;
|
|
3717
3718
|
const r = u == null ? void 0 : u.displayName;
|
|
3718
3719
|
if (r != null)
|
|
3719
|
-
return
|
|
3720
|
+
return En(r);
|
|
3720
3721
|
}
|
|
3721
3722
|
function $(h) {
|
|
3722
3723
|
const u = P(h);
|
|
@@ -3726,30 +3727,30 @@ function kn(e) {
|
|
|
3726
3727
|
if (h == null)
|
|
3727
3728
|
return;
|
|
3728
3729
|
const u = typeof h == "string" ? P(h) : h;
|
|
3729
|
-
Yr.value = u == null ? void 0 : u.background, zr.value = (u == null ? void 0 : u.hideNavigation) !== !0,
|
|
3730
|
+
Yr.value = u == null ? void 0 : u.background, zr.value = (u == null ? void 0 : u.hideNavigation) !== !0, Hr.value = (u == null ? void 0 : u.hideAppBar) !== !0, yr != null && yr(), gr.value = (u == null ? void 0 : u.hesitate) === !0, gr.value && (yr = window.addEventListener("beforeunload", (r) => {
|
|
3730
3731
|
r.preventDefault();
|
|
3731
3732
|
}));
|
|
3732
3733
|
}
|
|
3733
3734
|
return Cr = {
|
|
3734
|
-
showAppBar:
|
|
3735
|
+
showAppBar: Hr,
|
|
3735
3736
|
showAppNavigation: zr,
|
|
3736
3737
|
backgroundName: Yr,
|
|
3737
3738
|
hesitate: gr,
|
|
3738
3739
|
navigationItems: l,
|
|
3739
3740
|
findArchiveName: S,
|
|
3740
|
-
findCacheHours:
|
|
3741
|
+
findCacheHours: s,
|
|
3741
3742
|
findDisplay: g,
|
|
3742
3743
|
findIcon: x,
|
|
3743
3744
|
findItem: P,
|
|
3744
3745
|
findStoreName: $,
|
|
3745
|
-
findPath:
|
|
3746
|
+
findPath: _,
|
|
3746
3747
|
findSingleDisplay: N,
|
|
3747
3748
|
updateNavigationProperties: d
|
|
3748
3749
|
}, Cr;
|
|
3749
3750
|
}
|
|
3750
|
-
function
|
|
3751
|
-
var qe,
|
|
3752
|
-
const S =
|
|
3751
|
+
function Ua(e, t, l) {
|
|
3752
|
+
var qe, Ve;
|
|
3753
|
+
const S = kn(), s = it(), g = Mr(), x = et(), { bladeData: P } = $n({}), _ = e.useBladeSrc ?? !0, N = e.useRouteSrc ?? !0, $ = e.nav ?? e.bladeName ?? e.itemBladeName ?? "basic", d = e.storeMode ?? ((qe = s.findItem($)) == null ? void 0 : qe.storeMode), h = e.storageMode ?? ((Ve = s.findItem($)) == null ? void 0 : Ve.storageMode), u = K(e.customFilters) ?? [], r = z([]), y = te(() => tn([
|
|
3753
3754
|
...u.filter((U) => U.name != null).map((U) => U.name),
|
|
3754
3755
|
...e.defaultFilters ?? [],
|
|
3755
3756
|
...r.value
|
|
@@ -3758,51 +3759,51 @@ function Na(e, t, l) {
|
|
|
3758
3759
|
const E = te(() => Gr(i, I).value.length > 0 || Gr(I, i).value.length > 0), w = z(M());
|
|
3759
3760
|
function M() {
|
|
3760
3761
|
var U, j;
|
|
3761
|
-
if (
|
|
3762
|
-
const
|
|
3763
|
-
if (
|
|
3764
|
-
return Number.parseInt(
|
|
3762
|
+
if (_) {
|
|
3763
|
+
const H = (U = P.value) == null ? void 0 : U.page;
|
|
3764
|
+
if (H != null)
|
|
3765
|
+
return Number.parseInt(H);
|
|
3765
3766
|
}
|
|
3766
3767
|
if (N) {
|
|
3767
|
-
const
|
|
3768
|
-
if (
|
|
3769
|
-
return Number.parseInt(typeof
|
|
3768
|
+
const H = (j = x == null ? void 0 : x.query) == null ? void 0 : j.page;
|
|
3769
|
+
if (H != null)
|
|
3770
|
+
return Number.parseInt(typeof H == "string" ? H : H.toString());
|
|
3770
3771
|
}
|
|
3771
3772
|
return 1;
|
|
3772
3773
|
}
|
|
3773
3774
|
const b = te(() => {
|
|
3774
3775
|
var U, j;
|
|
3775
|
-
if (
|
|
3776
|
-
const
|
|
3777
|
-
if (
|
|
3778
|
-
return
|
|
3776
|
+
if (_) {
|
|
3777
|
+
const H = (U = P.value) == null ? void 0 : U.proxyID;
|
|
3778
|
+
if (H != null)
|
|
3779
|
+
return H;
|
|
3779
3780
|
}
|
|
3780
3781
|
if (N) {
|
|
3781
|
-
const
|
|
3782
|
-
if (
|
|
3783
|
-
return
|
|
3782
|
+
const H = (j = x == null ? void 0 : x.query) == null ? void 0 : j.query;
|
|
3783
|
+
if (H != null)
|
|
3784
|
+
return H;
|
|
3784
3785
|
}
|
|
3785
3786
|
return e.proxyID;
|
|
3786
|
-
}),
|
|
3787
|
+
}), T = z(D());
|
|
3787
3788
|
function D() {
|
|
3788
3789
|
var U, j;
|
|
3789
|
-
if (
|
|
3790
|
-
const
|
|
3791
|
-
if (
|
|
3792
|
-
return
|
|
3790
|
+
if (_) {
|
|
3791
|
+
const H = (U = P.value) == null ? void 0 : U.search;
|
|
3792
|
+
if (H != null)
|
|
3793
|
+
return H;
|
|
3793
3794
|
}
|
|
3794
3795
|
if (N) {
|
|
3795
|
-
const
|
|
3796
|
-
if (
|
|
3797
|
-
return
|
|
3796
|
+
const H = (j = x == null ? void 0 : x.query) == null ? void 0 : j.search;
|
|
3797
|
+
if (H != null)
|
|
3798
|
+
return H;
|
|
3798
3799
|
}
|
|
3799
3800
|
}
|
|
3800
|
-
const L = z(K(e.startShowingInactive) ?? !1),
|
|
3801
|
+
const L = z(K(e.startShowingInactive) ?? !1), f = te(() => [
|
|
3801
3802
|
...e.searchProps ?? [],
|
|
3802
3803
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3803
3804
|
]), A = z([]), J = Re([]), Q = z([]);
|
|
3804
3805
|
let ee;
|
|
3805
|
-
const { actionErrorMsg: ce, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem:
|
|
3806
|
+
const { actionErrorMsg: ce, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem: V, getAllItems: ae, restoreItem: G } = ut({
|
|
3806
3807
|
nav: $,
|
|
3807
3808
|
onError: e.onError ?? (l == null ? void 0 : l.onError),
|
|
3808
3809
|
proxyID: b.value,
|
|
@@ -3817,24 +3818,24 @@ function Na(e, t, l) {
|
|
|
3817
3818
|
const de = y.value[O], ge = u.find((De) => De.name == de);
|
|
3818
3819
|
ge != null ? U = U != null ? `${U}ANDALSO${ge.filterFunction()}` : ge.filterFunction() : j.push(de);
|
|
3819
3820
|
});
|
|
3820
|
-
const
|
|
3821
|
-
return
|
|
3821
|
+
const H = {};
|
|
3822
|
+
return _e(j) && (H.filterBy = j.toString()), U != null && (H.query = U), H;
|
|
3822
3823
|
}), rr = te(() => {
|
|
3823
3824
|
var j;
|
|
3824
3825
|
let U = e.params != null ? { ...e.params } : {};
|
|
3825
|
-
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), Ce.value != null && (U = { ...U, ...Ce.value }), L.value && (U.includeInactive = !0),
|
|
3826
|
+
return e.useServerPagination && e.itemsPerPage != null && (U.includeCount = !0, U.takeAmount = e.itemsPerPage, U.takeFrom = (w.value - 1) * e.itemsPerPage), Ce.value != null && (U = { ...U, ...Ce.value }), L.value && (U.includeInactive = !0), _e(e.selectProps) && (U.properties = (j = e.selectProps) == null ? void 0 : j.toString()), T.value != null && (U.searchString = T.value), U;
|
|
3826
3827
|
}), tr = te(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = te(() => (U) => L.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Pe = te(() => Q.value.filter((U) => !U.hide)), ar = te(() => {
|
|
3827
3828
|
let U = new Array();
|
|
3828
|
-
return Pe.value.filter((
|
|
3829
|
-
let O = U.find((de) => de.position ==
|
|
3830
|
-
O == null ? U.push({ position:
|
|
3831
|
-
}), U.sort(Ue.firstBy((
|
|
3829
|
+
return Pe.value.filter((H) => H.sublevel != null).forEach((H) => {
|
|
3830
|
+
let O = U.find((de) => de.position == H.sublevel);
|
|
3831
|
+
O == null ? U.push({ position: H.sublevel ?? 0, values: [H] }) : O.values.push(H);
|
|
3832
|
+
}), U.sort(Ue.firstBy((H) => H.position));
|
|
3832
3833
|
}), lr = te(() => {
|
|
3833
3834
|
let U = new Array();
|
|
3834
|
-
return Pe.value.filter((
|
|
3835
|
-
let O = U.find((de) => de.position ==
|
|
3836
|
-
O == null ? U.push({ position:
|
|
3837
|
-
}), U.sort(Ue.firstBy((
|
|
3835
|
+
return Pe.value.filter((H) => H.level != null).forEach((H) => {
|
|
3836
|
+
let O = U.find((de) => de.position == H.level);
|
|
3837
|
+
O == null ? U.push({ position: H.level ?? 0, values: [H] }) : O.values.push(H);
|
|
3838
|
+
}), U.sort(Ue.firstBy((H) => H.position));
|
|
3838
3839
|
}), ur = te(() => Pe.value.filter((U) => U.nav != null && U.itemText != null || U.textFilter != null || U.display != null || U.bool != null));
|
|
3839
3840
|
function be(U) {
|
|
3840
3841
|
if (e.itemBladeName != null) {
|
|
@@ -3852,7 +3853,7 @@ function Na(e, t, l) {
|
|
|
3852
3853
|
function ir(U) {
|
|
3853
3854
|
const {
|
|
3854
3855
|
additionalUrl: j,
|
|
3855
|
-
onDeleteAsync:
|
|
3856
|
+
onDeleteAsync: H
|
|
3856
3857
|
} = { ...e }, O = K(U), de = O.id, ge = (De) => {
|
|
3857
3858
|
if (De != null) {
|
|
3858
3859
|
let Se = A.value.findIndex((oe) => oe.id == De);
|
|
@@ -3873,7 +3874,7 @@ function Na(e, t, l) {
|
|
|
3873
3874
|
data: O,
|
|
3874
3875
|
nav: $,
|
|
3875
3876
|
onCanDeleteAsync: e.onCanDeleteAsync,
|
|
3876
|
-
onDeleteAsync:
|
|
3877
|
+
onDeleteAsync: H,
|
|
3877
3878
|
onDeleteSuccessAsync: async () => (ge(de), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(O) : Promise.resolve(void 0)),
|
|
3878
3879
|
proxyID: b.value,
|
|
3879
3880
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
@@ -3899,9 +3900,9 @@ function Na(e, t, l) {
|
|
|
3899
3900
|
}
|
|
3900
3901
|
function Ne() {
|
|
3901
3902
|
let U = K(A);
|
|
3902
|
-
if (U = e.onFilter ? e.onFilter(U) : U,
|
|
3903
|
-
let j = [...
|
|
3904
|
-
e.itemText && j.push(e.itemText),
|
|
3903
|
+
if (U = e.onFilter ? e.onFilter(U) : U, T.value != null && T.value.length > 0) {
|
|
3904
|
+
let j = [...f.value];
|
|
3905
|
+
e.itemText && j.push(e.itemText), _e(j) && (U = U.filter((H) => Sn(H, T.value, j)));
|
|
3905
3906
|
}
|
|
3906
3907
|
J.value = U;
|
|
3907
3908
|
}
|
|
@@ -3910,7 +3911,7 @@ function Na(e, t, l) {
|
|
|
3910
3911
|
e.headers != null && (Q.value = [...e.headers], U || Q.value.push({ title: "Actions", value: "itemActions", align: "end" }));
|
|
3911
3912
|
}
|
|
3912
3913
|
async function Ie(U) {
|
|
3913
|
-
if (fe.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1,
|
|
3914
|
+
if (fe.value = !1, (U == null ? void 0 : U.resetSearch) === !0 && (Ee.value = e.showSearch ?? !1, T.value = void 0), e.items != null) {
|
|
3914
3915
|
A.value = e.onGetSuccessAsync != null ? await e.onGetSuccessAsync(e.items) : e.items;
|
|
3915
3916
|
return;
|
|
3916
3917
|
}
|
|
@@ -3929,28 +3930,28 @@ function Na(e, t, l) {
|
|
|
3929
3930
|
onGetSuccessAsync: e.onGetSuccessAsync
|
|
3930
3931
|
};
|
|
3931
3932
|
if (e.isSingle === !0)
|
|
3932
|
-
j.id === "new" ? A.value = [] : A.value = await
|
|
3933
|
+
j.id === "new" ? A.value = [] : A.value = await V(j);
|
|
3933
3934
|
else {
|
|
3934
|
-
let
|
|
3935
|
+
let H = await ae({
|
|
3935
3936
|
...j,
|
|
3936
3937
|
onGetSuccessAsync: async (O, de) => {
|
|
3937
3938
|
let ge = O == null ? void 0 : O.data;
|
|
3938
3939
|
return r.value = (O == null ? void 0 : O.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && O.count && ($e.value = Math.ceil(O.count / e.itemsPerPage)), e.onGetSuccessAsync != null && (ge = await e.onGetSuccessAsync(ge, de)), ge;
|
|
3939
3940
|
}
|
|
3940
3941
|
});
|
|
3941
|
-
A.value =
|
|
3942
|
+
A.value = H, i.value = [...I.value];
|
|
3942
3943
|
}
|
|
3943
3944
|
Ne();
|
|
3944
3945
|
}
|
|
3945
3946
|
function Je(U, j) {
|
|
3946
|
-
const
|
|
3947
|
-
if (
|
|
3947
|
+
const H = K(U);
|
|
3948
|
+
if (H != null && H === ee && e.canUnselect ? ee = null : ee = H, t != null && t("select", ee), !(!e.canSelect || e.onCanSelectItem != null && !e.onCanSelectItem(H)))
|
|
3948
3949
|
if (e.onSelectItem != null)
|
|
3949
3950
|
e.onSelectItem(ee);
|
|
3950
3951
|
else {
|
|
3951
3952
|
let O = {
|
|
3952
3953
|
bladeName: e.itemBladeName,
|
|
3953
|
-
id:
|
|
3954
|
+
id: H.id,
|
|
3954
3955
|
nav: $
|
|
3955
3956
|
};
|
|
3956
3957
|
j == "page" && g.push({
|
|
@@ -3960,15 +3961,15 @@ function Na(e, t, l) {
|
|
|
3960
3961
|
}
|
|
3961
3962
|
}
|
|
3962
3963
|
function je() {
|
|
3963
|
-
Ee.value ? (Ee.value = e.showSearch ?? !1,
|
|
3964
|
+
Ee.value ? (Ee.value = e.showSearch ?? !1, T.value = void 0, Ie()) : Ee.value = e.showSearch ?? !0;
|
|
3964
3965
|
}
|
|
3965
|
-
return We(),
|
|
3966
|
+
return We(), nn([T], () => {
|
|
3966
3967
|
Ne();
|
|
3967
|
-
}, { debounce: 500, maxWait: 500 }),
|
|
3968
|
+
}, { debounce: 500, maxWait: 500 }), Te([L, w], async () => {
|
|
3968
3969
|
await Ie();
|
|
3969
|
-
}),
|
|
3970
|
+
}), Te([X, () => e.errorMsg], ([U, j]) => {
|
|
3970
3971
|
fe.value = U != null || j != null;
|
|
3971
|
-
}),
|
|
3972
|
+
}), Te(() => e.refreshToggle, () => {
|
|
3972
3973
|
Ie({ deepRefresh: !0 });
|
|
3973
3974
|
}), Or([A, () => e.items], () => {
|
|
3974
3975
|
Ne();
|
|
@@ -3993,7 +3994,7 @@ function Na(e, t, l) {
|
|
|
3993
3994
|
loadingMsg: ne,
|
|
3994
3995
|
refresh: Ie,
|
|
3995
3996
|
restoreItem: Ze,
|
|
3996
|
-
searchString:
|
|
3997
|
+
searchString: T,
|
|
3997
3998
|
selectedFilters: I,
|
|
3998
3999
|
selectItem: Je,
|
|
3999
4000
|
// serverFilters,
|
|
@@ -4008,7 +4009,7 @@ function Na(e, t, l) {
|
|
|
4008
4009
|
};
|
|
4009
4010
|
}
|
|
4010
4011
|
let Ge;
|
|
4011
|
-
function
|
|
4012
|
+
function Yn(e) {
|
|
4012
4013
|
const t = z((e == null ? void 0 : e.default) ?? "Admin"), l = z((e == null ? void 0 : e.groups) ?? []);
|
|
4013
4014
|
return Ge = {
|
|
4014
4015
|
currentGroup: t,
|
|
@@ -4016,45 +4017,45 @@ function Gn(e) {
|
|
|
4016
4017
|
useRoutes: e == null ? void 0 : e.useRoutes
|
|
4017
4018
|
}, Ge;
|
|
4018
4019
|
}
|
|
4019
|
-
function
|
|
4020
|
-
const e = Mr(), t = it(), l =
|
|
4020
|
+
function Ba() {
|
|
4021
|
+
const e = Mr(), t = it(), l = Mn();
|
|
4021
4022
|
let S = e.getRoutes();
|
|
4022
4023
|
return {
|
|
4023
4024
|
...Ge,
|
|
4024
4025
|
sidebarNavItems: te(() => {
|
|
4025
4026
|
var g;
|
|
4026
4027
|
S = S.filter((x) => x.meta != null && x.meta.menuGroup != null);
|
|
4027
|
-
const
|
|
4028
|
+
const s = [];
|
|
4028
4029
|
return S.forEach((x) => {
|
|
4029
4030
|
var d;
|
|
4030
|
-
const P = Ge.groupOptions.value.find((h) => h.displayName == x.meta.menuGroup),
|
|
4031
|
-
let $ =
|
|
4031
|
+
const P = Ge.groupOptions.value.find((h) => h.displayName == x.meta.menuGroup), _ = t.findItem(x.meta.nav), N = x.meta;
|
|
4032
|
+
let $ = s.find((h) => h.displayName == N.menuGroup);
|
|
4032
4033
|
$ == null && ($ = {
|
|
4033
4034
|
displayName: N.menuGroup,
|
|
4034
|
-
icon: (P == null ? void 0 : P.icon) ?? (N == null ? void 0 : N.icon) ?? (
|
|
4035
|
+
icon: (P == null ? void 0 : P.icon) ?? (N == null ? void 0 : N.icon) ?? (_ == null ? void 0 : _.icon),
|
|
4035
4036
|
isGroup: !0,
|
|
4036
4037
|
items: []
|
|
4037
|
-
},
|
|
4038
|
-
displayName: (N == null ? void 0 : N.displayName) ?? t.findDisplay(
|
|
4039
|
-
icon: (N == null ? void 0 : N.icon) ?? t.findIcon(
|
|
4040
|
-
permissions: (N == null ? void 0 : N.permissions) ?? (
|
|
4038
|
+
}, s.push($)), (d = $.items) == null || d.push({
|
|
4039
|
+
displayName: (N == null ? void 0 : N.displayName) ?? t.findDisplay(_ ?? void 0),
|
|
4040
|
+
icon: (N == null ? void 0 : N.icon) ?? t.findIcon(_ ?? void 0),
|
|
4041
|
+
permissions: (N == null ? void 0 : N.permissions) ?? (_ == null ? void 0 : _.permissions) ?? [],
|
|
4041
4042
|
requiresAuth: (N == null ? void 0 : N.requiresAuth) !== !1,
|
|
4042
|
-
subscriptions: (N == null ? void 0 : N.subscriptions) ?? (
|
|
4043
|
-
subFilters: (N == null ? void 0 : N.subFilters) ?? (
|
|
4043
|
+
subscriptions: (N == null ? void 0 : N.subscriptions) ?? (_ == null ? void 0 : _.subscriptions) ?? [],
|
|
4044
|
+
subFilters: (N == null ? void 0 : N.subFilters) ?? (_ == null ? void 0 : _.subFilters) ?? [],
|
|
4044
4045
|
routeName: x.name
|
|
4045
4046
|
});
|
|
4046
|
-
}),
|
|
4047
|
+
}), s.forEach((x) => {
|
|
4047
4048
|
var P;
|
|
4048
|
-
x.items = (P = x.items) == null ? void 0 : P.filter((
|
|
4049
|
-
}), Ge.currentGroup.value != null ? ((g =
|
|
4049
|
+
x.items = (P = x.items) == null ? void 0 : P.filter((_) => !_.requiresAuth || l.doShow(_.subscriptions, _.permissions, "view")).sort(Ue.firstBy((_) => _.displayName));
|
|
4050
|
+
}), Ge.currentGroup.value != null ? ((g = s.find((x) => x.displayName == Ge.currentGroup.value)) == null ? void 0 : g.items) ?? [] : s.filter((x) => !x.requiresAuth || l.doShow(x.subscriptions, x.permissions, "view"));
|
|
4050
4051
|
})
|
|
4051
4052
|
};
|
|
4052
4053
|
}
|
|
4053
4054
|
let Pr;
|
|
4054
|
-
function
|
|
4055
|
+
function $a(e) {
|
|
4055
4056
|
return Pr.usePresets(e);
|
|
4056
4057
|
}
|
|
4057
|
-
function
|
|
4058
|
+
function Zn(e) {
|
|
4058
4059
|
function t(l) {
|
|
4059
4060
|
if (!l)
|
|
4060
4061
|
return {};
|
|
@@ -4068,10 +4069,10 @@ function Wn(e) {
|
|
|
4068
4069
|
let Zr, Jr, jr, Kr = !1;
|
|
4069
4070
|
const wr = z(!1), br = z(!1), Qr = z(), pe = z();
|
|
4070
4071
|
let Nr;
|
|
4071
|
-
function
|
|
4072
|
+
function Fa() {
|
|
4072
4073
|
return Nr;
|
|
4073
4074
|
}
|
|
4074
|
-
function
|
|
4075
|
+
function Jn() {
|
|
4075
4076
|
function e(x) {
|
|
4076
4077
|
pe.value = x.detail, br.value = !0;
|
|
4077
4078
|
}
|
|
@@ -4085,14 +4086,14 @@ function qn() {
|
|
|
4085
4086
|
function S() {
|
|
4086
4087
|
return !!window.matchMedia("(display-mode: standalone)").matches;
|
|
4087
4088
|
}
|
|
4088
|
-
function
|
|
4089
|
+
function s(x) {
|
|
4089
4090
|
x.preventDefault(), wr.value = !0, Qr.value = x;
|
|
4090
4091
|
}
|
|
4091
4092
|
function g() {
|
|
4092
4093
|
br.value = !1, !(!pe.value || !pe.value.waiting) && pe.value.waiting.postMessage({ type: "SKIP_WAITING" });
|
|
4093
4094
|
}
|
|
4094
|
-
return
|
|
4095
|
-
Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt",
|
|
4095
|
+
return an(() => {
|
|
4096
|
+
Zr == null && (Zr = document.addEventListener("swUpdated", e, { once: !0 })), Jr == null && (Jr = navigator.serviceWorker.addEventListener("controllerchange", t)), jr == null && (jr = window.addEventListener("beforeinstallprompt", s));
|
|
4096
4097
|
}), Nr = {
|
|
4097
4098
|
canInstallApp: wr,
|
|
4098
4099
|
canUpdateApp: br,
|
|
@@ -4101,132 +4102,135 @@ function qn() {
|
|
|
4101
4102
|
updateApp: g
|
|
4102
4103
|
}, Nr;
|
|
4103
4104
|
}
|
|
4104
|
-
function
|
|
4105
|
+
function ka(e) {
|
|
4105
4106
|
const t = [];
|
|
4106
|
-
return (e == null ? void 0 : e.required) == !0 && t.push((l) => !!l || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((l) => !!l || "Password is required"), t.push((l) => l != null && l.length > 9 || "Password must be 10 or more characters"), t.push((l) => /^(.*[a-z].*)$/.test(l) || "Password must contain a lowercase letter"), t.push((l) => /^(.*[A-Z].*)$/.test(l) || "Password must contain an uppercase letter"), t.push((l) => /^(.*\d.*)$/.test(l) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((l) => !!l || "Email is required"), t.push((l) =>
|
|
4107
|
+
return (e == null ? void 0 : e.required) == !0 && t.push((l) => !!l || "Field is required"), (e == null ? void 0 : e.otherRules) != null && (Array.isArray(e == null ? void 0 : e.otherRules) ? t.push(...e.otherRules) : t.push(e.otherRules)), (e == null ? void 0 : e.forPassword) == !0 && (t.push((l) => !!l || "Password is required"), t.push((l) => l != null && l.length > 9 || "Password must be 10 or more characters"), t.push((l) => /^(.*[a-z].*)$/.test(l) || "Password must contain a lowercase letter"), t.push((l) => /^(.*[A-Z].*)$/.test(l) || "Password must contain an uppercase letter"), t.push((l) => /^(.*\d.*)$/.test(l) || "Password must contain a number")), (e == null ? void 0 : e.forEmail) == !0 && (t.push((l) => !!l || "Email is required"), t.push((l) => An(l) || "Email must be valid")), t;
|
|
4107
4108
|
}
|
|
4108
|
-
const
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
l
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4109
|
+
const jn = /* @__PURE__ */ Zt({
|
|
4110
|
+
__name: "BT-Test",
|
|
4111
|
+
setup(e) {
|
|
4112
|
+
return (t, l) => (Jt(), jt("div", null, [
|
|
4113
|
+
Kt(Qt(ln), null, {
|
|
4114
|
+
default: Xt(() => [
|
|
4115
|
+
Ot("Test")
|
|
4116
|
+
]),
|
|
4117
|
+
_: 1
|
|
4118
|
+
})
|
|
4119
|
+
]));
|
|
4120
|
+
}
|
|
4121
|
+
});
|
|
4122
|
+
function Ga(e) {
|
|
4119
4123
|
return {
|
|
4120
4124
|
install(t, l) {
|
|
4121
|
-
var
|
|
4122
|
-
console.log(t), t.component("bt-test",
|
|
4123
|
-
const S =
|
|
4124
|
-
|
|
4125
|
-
const g =
|
|
4126
|
-
|
|
4127
|
-
const x =
|
|
4125
|
+
var _;
|
|
4126
|
+
console.log(t), t.component("bt-test", jn), e.vuetifyInstance ?? (e.vuetifyInstance = l.vuetifyInstance), xn(e.urls), Fn(e);
|
|
4127
|
+
const S = Wn(), s = zn(e);
|
|
4128
|
+
Zn(e), (_ = e.auth).demo ?? (_.demo = S), e.auth.getAuthItem = s.findItem;
|
|
4129
|
+
const g = Ln(e.auth);
|
|
4130
|
+
Yn(e.menu);
|
|
4131
|
+
const x = Nn({
|
|
4128
4132
|
auth: g,
|
|
4129
|
-
findPath:
|
|
4133
|
+
findPath: s.findPath,
|
|
4130
4134
|
useBearerToken: !0
|
|
4131
|
-
}), P =
|
|
4135
|
+
}), P = Gn({
|
|
4132
4136
|
getTimeZone: () => g.timeZone.value
|
|
4133
4137
|
});
|
|
4134
|
-
|
|
4138
|
+
Vn({
|
|
4135
4139
|
dates: P
|
|
4136
|
-
}),
|
|
4140
|
+
}), Jn(), Tn({
|
|
4137
4141
|
api: x,
|
|
4138
4142
|
auth: g,
|
|
4139
|
-
navigation:
|
|
4143
|
+
navigation: s
|
|
4140
4144
|
});
|
|
4141
4145
|
}
|
|
4142
4146
|
};
|
|
4143
4147
|
}
|
|
4144
4148
|
export {
|
|
4145
|
-
|
|
4146
|
-
|
|
4149
|
+
Sa as DataURIToBlob,
|
|
4150
|
+
ma as addWeekday,
|
|
4147
4151
|
Be as appendUrl,
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
+
dn as capitalizeWords,
|
|
4153
|
+
ca as checkImage,
|
|
4154
|
+
yn as containsSearch,
|
|
4155
|
+
ha as containsWeekday,
|
|
4152
4156
|
Lr as copyDeep,
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4157
|
+
gn as copyItemByAlphabet,
|
|
4158
|
+
Nn as createApi,
|
|
4159
|
+
Ln as createAuth,
|
|
4160
|
+
Ga as createCore,
|
|
4161
|
+
Fn as createCosmetics,
|
|
4162
|
+
Gn as createDates,
|
|
4163
|
+
Wn as createDemo,
|
|
4164
|
+
Vn as createFilters,
|
|
4165
|
+
Yn as createMenu,
|
|
4166
|
+
zn as createNavigation,
|
|
4167
|
+
Jn as createPWA,
|
|
4168
|
+
Zn as createPresets,
|
|
4169
|
+
Pn as createSessionStoreDefinition,
|
|
4170
|
+
Tn as createStoreBuilder,
|
|
4171
|
+
xn as createUrl,
|
|
4168
4172
|
qr as createWholeLastUpdateStoreDefinition,
|
|
4169
|
-
|
|
4170
|
-
|
|
4173
|
+
vn as csvContains,
|
|
4174
|
+
Ca as csvDefaults,
|
|
4171
4175
|
tt as deepSelect,
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4176
|
+
ta as distinct,
|
|
4177
|
+
na as extensionExists,
|
|
4178
|
+
wn as extractErrorDescription,
|
|
4179
|
+
on as fromCamelCase,
|
|
4180
|
+
aa as getAreaAround,
|
|
4181
|
+
la as getAreaToLeft,
|
|
4182
|
+
ua as getAreaToRight,
|
|
4183
|
+
ia as getGoogleMapsLocationLine,
|
|
4184
|
+
fa as getImageData,
|
|
4181
4185
|
rt as getLocationLine,
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4186
|
+
ya as getMinDate,
|
|
4187
|
+
mn as getMinDateString,
|
|
4188
|
+
bn as getRandomColor,
|
|
4189
|
+
Sn as hasSearch,
|
|
4190
|
+
ga as isArrayOfLength,
|
|
4191
|
+
_e as isLengthyArray,
|
|
4192
|
+
hn as isMinDate,
|
|
4189
4193
|
Sr as nestedValue,
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4194
|
+
va as removeWeekday,
|
|
4195
|
+
wa as roundTo,
|
|
4196
|
+
En as singularize,
|
|
4197
|
+
sa as toCamelCase,
|
|
4198
|
+
Aa as toCompareString,
|
|
4199
|
+
ba as toggleCSV,
|
|
4200
|
+
Ea as twiddleThumbs,
|
|
4197
4201
|
ut as useActions,
|
|
4198
|
-
|
|
4202
|
+
fn as useActionsTracker,
|
|
4199
4203
|
Er as useApi,
|
|
4200
|
-
|
|
4204
|
+
Mn as useAuth,
|
|
4201
4205
|
Wr as useAuthUrl,
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4206
|
+
$n as useBlade,
|
|
4207
|
+
kn as useCSV,
|
|
4208
|
+
Ta as useCosmetics,
|
|
4209
|
+
Dn as useDataUrl,
|
|
4210
|
+
Pa as useDates,
|
|
4207
4211
|
lt as useDbName,
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4212
|
+
Na as useDemo,
|
|
4213
|
+
Ma as useDocumentMeta,
|
|
4214
|
+
Rn as useDraggable,
|
|
4215
|
+
La as useFilters,
|
|
4216
|
+
un as useId,
|
|
4217
|
+
Ra as useItem,
|
|
4218
|
+
Ua as useList,
|
|
4219
|
+
Da as useLocalCache,
|
|
4220
|
+
_a as useLocalCosmetics,
|
|
4217
4221
|
ve as useLocalDb,
|
|
4218
|
-
|
|
4222
|
+
Ba as useMenu,
|
|
4219
4223
|
it as useNavigation,
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4224
|
+
Fa as usePWA,
|
|
4225
|
+
$a as usePresets,
|
|
4226
|
+
Bn as useResizable,
|
|
4227
|
+
ka as useRules,
|
|
4228
|
+
xa as useStore,
|
|
4225
4229
|
Le as useStoreDefinition,
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4230
|
+
Hn as useTracker,
|
|
4231
|
+
Ia as useUrls,
|
|
4232
|
+
An as validEmail,
|
|
4229
4233
|
Ye as weekdayPairs,
|
|
4230
|
-
|
|
4231
|
-
|
|
4234
|
+
da as weekdayShortName,
|
|
4235
|
+
oa as weekdayValue
|
|
4232
4236
|
};
|