@qikdev/sdk 1.0.12 → 1.0.13
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/main.js +796 -759
- package/package.json +1 -1
- package/src/api/qik.access.js +177 -201
- package/src/api/qik.api.js +55 -28
- package/src/api/qik.auth.js +181 -113
- package/src/api/qik.cache.js +29 -7
- package/src/api/qik.content.js +275 -147
- package/src/api/qik.core.js +19 -28
- package/src/api/qik.files.js +48 -38
- package/src/api/qik.filter.js +148 -207
- package/src/api/qik.geo.js +59 -42
- package/src/api/qik.socket.js +117 -43
- package/src/api/qik.storage.js +17 -8
- package/src/api/qik.system.js +6 -5
- package/src/api/qik.utils.js +244 -199
- package/src/version.js +1 -1
package/dist/main.js
CHANGED
|
@@ -68,43 +68,43 @@ var Ye, Cr;
|
|
|
68
68
|
function Xr() {
|
|
69
69
|
if (Cr) return Ye;
|
|
70
70
|
Cr = 1;
|
|
71
|
-
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, i = Math.max, t = "[object Function]", a = function(c,
|
|
71
|
+
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, i = Math.max, t = "[object Function]", a = function(c, p) {
|
|
72
72
|
for (var S = [], g = 0; g < c.length; g += 1)
|
|
73
73
|
S[g] = c[g];
|
|
74
|
-
for (var u = 0; u <
|
|
75
|
-
S[u + c.length] =
|
|
74
|
+
for (var u = 0; u < p.length; u += 1)
|
|
75
|
+
S[u + c.length] = p[u];
|
|
76
76
|
return S;
|
|
77
|
-
}, n = function(c,
|
|
78
|
-
for (var S = [], g =
|
|
77
|
+
}, n = function(c, p) {
|
|
78
|
+
for (var S = [], g = p, u = 0; g < c.length; g += 1, u += 1)
|
|
79
79
|
S[u] = c[g];
|
|
80
80
|
return S;
|
|
81
|
-
}, s = function(
|
|
82
|
-
for (var
|
|
83
|
-
|
|
84
|
-
return
|
|
81
|
+
}, s = function(d, c) {
|
|
82
|
+
for (var p = "", S = 0; S < d.length; S += 1)
|
|
83
|
+
p += d[S], S + 1 < d.length && (p += c);
|
|
84
|
+
return p;
|
|
85
85
|
};
|
|
86
86
|
return Ye = function(c) {
|
|
87
|
-
var
|
|
88
|
-
if (typeof
|
|
89
|
-
throw new TypeError(e +
|
|
87
|
+
var p = this;
|
|
88
|
+
if (typeof p != "function" || r.apply(p) !== t)
|
|
89
|
+
throw new TypeError(e + p);
|
|
90
90
|
for (var S = n(arguments, 1), g, u = function() {
|
|
91
91
|
if (this instanceof g) {
|
|
92
|
-
var l =
|
|
92
|
+
var l = p.apply(
|
|
93
93
|
this,
|
|
94
94
|
a(S, arguments)
|
|
95
95
|
);
|
|
96
96
|
return Object(l) === l ? l : this;
|
|
97
97
|
}
|
|
98
|
-
return
|
|
98
|
+
return p.apply(
|
|
99
99
|
c,
|
|
100
100
|
a(S, arguments)
|
|
101
101
|
);
|
|
102
|
-
}, o = i(0,
|
|
103
|
-
|
|
104
|
-
if (g = Function("binder", "return function (" + s(
|
|
102
|
+
}, o = i(0, p.length - S.length), f = [], w = 0; w < o; w++)
|
|
103
|
+
f[w] = "$" + w;
|
|
104
|
+
if (g = Function("binder", "return function (" + s(f, ",") + "){ return binder.apply(this,arguments); }")(u), p.prototype) {
|
|
105
105
|
var m = function() {
|
|
106
106
|
};
|
|
107
|
-
m.prototype =
|
|
107
|
+
m.prototype = p.prototype, g.prototype = new m(), m.prototype = null;
|
|
108
108
|
}
|
|
109
109
|
return g;
|
|
110
110
|
}, Ye;
|
|
@@ -123,13 +123,13 @@ function et() {
|
|
|
123
123
|
var e = yr();
|
|
124
124
|
return er = e.call(Function.call, Object.prototype.hasOwnProperty), er;
|
|
125
125
|
}
|
|
126
|
-
var rr,
|
|
126
|
+
var rr, Rr;
|
|
127
127
|
function hr() {
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
var e, r = SyntaxError, i = Function, t = TypeError, a = function(
|
|
128
|
+
if (Rr) return rr;
|
|
129
|
+
Rr = 1;
|
|
130
|
+
var e, r = SyntaxError, i = Function, t = TypeError, a = function(U) {
|
|
131
131
|
try {
|
|
132
|
-
return i('"use strict"; return (' +
|
|
132
|
+
return i('"use strict"; return (' + U + ").constructor;")();
|
|
133
133
|
} catch {
|
|
134
134
|
}
|
|
135
135
|
}, n = Object.getOwnPropertyDescriptor;
|
|
@@ -141,7 +141,7 @@ function hr() {
|
|
|
141
141
|
}
|
|
142
142
|
var s = function() {
|
|
143
143
|
throw new t();
|
|
144
|
-
},
|
|
144
|
+
}, d = n ? (function() {
|
|
145
145
|
try {
|
|
146
146
|
return arguments.callee, s;
|
|
147
147
|
} catch {
|
|
@@ -151,13 +151,13 @@ function hr() {
|
|
|
151
151
|
return s;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
})() : s, c = Yr()(),
|
|
155
|
-
return
|
|
156
|
-
}, S = {}, g = typeof Uint8Array > "u" ? e :
|
|
154
|
+
})() : s, c = Yr()(), p = Object.getPrototypeOf || function(U) {
|
|
155
|
+
return U.__proto__;
|
|
156
|
+
}, S = {}, g = typeof Uint8Array > "u" ? e : p(Uint8Array), u = {
|
|
157
157
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
158
158
|
"%Array%": Array,
|
|
159
159
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
|
|
160
|
-
"%ArrayIteratorPrototype%": c ?
|
|
160
|
+
"%ArrayIteratorPrototype%": c ? p([][Symbol.iterator]()) : e,
|
|
161
161
|
"%AsyncFromSyncIteratorPrototype%": e,
|
|
162
162
|
"%AsyncFunction%": S,
|
|
163
163
|
"%AsyncGenerator%": S,
|
|
@@ -186,10 +186,10 @@ function hr() {
|
|
|
186
186
|
"%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
|
|
187
187
|
"%isFinite%": isFinite,
|
|
188
188
|
"%isNaN%": isNaN,
|
|
189
|
-
"%IteratorPrototype%": c ?
|
|
189
|
+
"%IteratorPrototype%": c ? p(p([][Symbol.iterator]())) : e,
|
|
190
190
|
"%JSON%": typeof JSON == "object" ? JSON : e,
|
|
191
191
|
"%Map%": typeof Map > "u" ? e : Map,
|
|
192
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !c ? e :
|
|
192
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !c ? e : p((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
193
193
|
"%Math%": Math,
|
|
194
194
|
"%Number%": Number,
|
|
195
195
|
"%Object%": Object,
|
|
@@ -202,13 +202,13 @@ function hr() {
|
|
|
202
202
|
"%Reflect%": typeof Reflect > "u" ? e : Reflect,
|
|
203
203
|
"%RegExp%": RegExp,
|
|
204
204
|
"%Set%": typeof Set > "u" ? e : Set,
|
|
205
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !c ? e :
|
|
205
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !c ? e : p((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
206
206
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
|
|
207
207
|
"%String%": String,
|
|
208
|
-
"%StringIteratorPrototype%": c ?
|
|
208
|
+
"%StringIteratorPrototype%": c ? p(""[Symbol.iterator]()) : e,
|
|
209
209
|
"%Symbol%": c ? Symbol : e,
|
|
210
210
|
"%SyntaxError%": r,
|
|
211
|
-
"%ThrowTypeError%":
|
|
211
|
+
"%ThrowTypeError%": d,
|
|
212
212
|
"%TypedArray%": g,
|
|
213
213
|
"%TypeError%": t,
|
|
214
214
|
"%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
|
|
@@ -219,23 +219,23 @@ function hr() {
|
|
|
219
219
|
"%WeakMap%": typeof WeakMap > "u" ? e : WeakMap,
|
|
220
220
|
"%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
|
|
221
221
|
"%WeakSet%": typeof WeakSet > "u" ? e : WeakSet
|
|
222
|
-
}, o = function
|
|
223
|
-
var
|
|
224
|
-
if (
|
|
225
|
-
|
|
226
|
-
else if (
|
|
227
|
-
|
|
228
|
-
else if (
|
|
229
|
-
|
|
230
|
-
else if (
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
} else if (
|
|
234
|
-
var
|
|
235
|
-
|
|
222
|
+
}, o = function U(x) {
|
|
223
|
+
var T;
|
|
224
|
+
if (x === "%AsyncFunction%")
|
|
225
|
+
T = a("async function () {}");
|
|
226
|
+
else if (x === "%GeneratorFunction%")
|
|
227
|
+
T = a("function* () {}");
|
|
228
|
+
else if (x === "%AsyncGeneratorFunction%")
|
|
229
|
+
T = a("async function* () {}");
|
|
230
|
+
else if (x === "%AsyncGenerator%") {
|
|
231
|
+
var I = U("%AsyncGeneratorFunction%");
|
|
232
|
+
I && (T = I.prototype);
|
|
233
|
+
} else if (x === "%AsyncIteratorPrototype%") {
|
|
234
|
+
var N = U("%AsyncGenerator%");
|
|
235
|
+
N && (T = p(N.prototype));
|
|
236
236
|
}
|
|
237
|
-
return u[
|
|
238
|
-
},
|
|
237
|
+
return u[x] = T, T;
|
|
238
|
+
}, f = {
|
|
239
239
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
240
240
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
241
241
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -287,52 +287,52 @@ function hr() {
|
|
|
287
287
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
288
288
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
289
289
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
290
|
-
}, w = yr(), m = et(), l = w.call(Function.call, Array.prototype.concat), v = w.call(Function.apply, Array.prototype.splice), b = w.call(Function.call, String.prototype.replace), O = w.call(Function.call, String.prototype.slice),
|
|
291
|
-
var
|
|
292
|
-
if (
|
|
290
|
+
}, w = yr(), m = et(), l = w.call(Function.call, Array.prototype.concat), v = w.call(Function.apply, Array.prototype.splice), b = w.call(Function.call, String.prototype.replace), O = w.call(Function.call, String.prototype.slice), P = w.call(Function.call, RegExp.prototype.exec), k = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, L = /\\(\\)?/g, R = function(x) {
|
|
291
|
+
var T = O(x, 0, 1), I = O(x, -1);
|
|
292
|
+
if (T === "%" && I !== "%")
|
|
293
293
|
throw new r("invalid intrinsic syntax, expected closing `%`");
|
|
294
|
-
if (
|
|
294
|
+
if (I === "%" && T !== "%")
|
|
295
295
|
throw new r("invalid intrinsic syntax, expected opening `%`");
|
|
296
|
-
var
|
|
297
|
-
return b(
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
}, j = function(
|
|
301
|
-
var
|
|
302
|
-
if (m(
|
|
303
|
-
var $ = u[
|
|
304
|
-
if ($ === S && ($ = o(
|
|
305
|
-
throw new t("intrinsic " +
|
|
296
|
+
var N = [];
|
|
297
|
+
return b(x, k, function($, z, F, Z) {
|
|
298
|
+
N[N.length] = F ? b(Z, L, "$1") : z || $;
|
|
299
|
+
}), N;
|
|
300
|
+
}, j = function(x, T) {
|
|
301
|
+
var I = x, N;
|
|
302
|
+
if (m(f, I) && (N = f[I], I = "%" + N[0] + "%"), m(u, I)) {
|
|
303
|
+
var $ = u[I];
|
|
304
|
+
if ($ === S && ($ = o(I)), typeof $ > "u" && !T)
|
|
305
|
+
throw new t("intrinsic " + x + " exists, but is not available. Please file an issue!");
|
|
306
306
|
return {
|
|
307
|
-
alias:
|
|
308
|
-
name:
|
|
307
|
+
alias: N,
|
|
308
|
+
name: I,
|
|
309
309
|
value: $
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
throw new r("intrinsic " +
|
|
312
|
+
throw new r("intrinsic " + x + " does not exist!");
|
|
313
313
|
};
|
|
314
|
-
return rr = function(
|
|
315
|
-
if (typeof
|
|
314
|
+
return rr = function(x, T) {
|
|
315
|
+
if (typeof x != "string" || x.length === 0)
|
|
316
316
|
throw new t("intrinsic name must be a non-empty string");
|
|
317
|
-
if (arguments.length > 1 && typeof
|
|
317
|
+
if (arguments.length > 1 && typeof T != "boolean")
|
|
318
318
|
throw new t('"allowMissing" argument must be a boolean');
|
|
319
|
-
if (
|
|
319
|
+
if (P(/^%?[^%]*%?$/, x) === null)
|
|
320
320
|
throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
321
|
-
var
|
|
322
|
-
Q && (
|
|
323
|
-
for (var ne = 1, X = !0; ne <
|
|
324
|
-
var K =
|
|
321
|
+
var I = R(x), N = I.length > 0 ? I[0] : "", $ = j("%" + N + "%", T), z = $.name, F = $.value, Z = !1, Q = $.alias;
|
|
322
|
+
Q && (N = Q[0], v(I, l([0, 1], Q)));
|
|
323
|
+
for (var ne = 1, X = !0; ne < I.length; ne += 1) {
|
|
324
|
+
var K = I[ne], ie = O(K, 0, 1), re = O(K, -1);
|
|
325
325
|
if ((ie === '"' || ie === "'" || ie === "`" || re === '"' || re === "'" || re === "`") && ie !== re)
|
|
326
326
|
throw new r("property names with quotes must have matching quotes");
|
|
327
|
-
if ((K === "constructor" || !X) && (Z = !0),
|
|
327
|
+
if ((K === "constructor" || !X) && (Z = !0), N += "." + K, z = "%" + N + "%", m(u, z))
|
|
328
328
|
F = u[z];
|
|
329
329
|
else if (F != null) {
|
|
330
330
|
if (!(K in F)) {
|
|
331
|
-
if (!
|
|
332
|
-
throw new t("base intrinsic for " +
|
|
331
|
+
if (!T)
|
|
332
|
+
throw new t("base intrinsic for " + x + " exists, but the property is not available.");
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
if (n && ne + 1 >=
|
|
335
|
+
if (n && ne + 1 >= I.length) {
|
|
336
336
|
var te = n(F, K);
|
|
337
337
|
X = !!te, X && "get" in te && !("originalValue" in te.get) ? F = te.get : F = F[K];
|
|
338
338
|
} else
|
|
@@ -343,21 +343,21 @@ function hr() {
|
|
|
343
343
|
return F;
|
|
344
344
|
}, rr;
|
|
345
345
|
}
|
|
346
|
-
var tr = { exports: {} },
|
|
346
|
+
var tr = { exports: {} }, kr;
|
|
347
347
|
function rt() {
|
|
348
|
-
return
|
|
349
|
-
var r = yr(), i = hr(), t = i("%Function.prototype.apply%"), a = i("%Function.prototype.call%"), n = i("%Reflect.apply%", !0) || r.call(a, t), s = i("%Object.getOwnPropertyDescriptor%", !0),
|
|
350
|
-
if (
|
|
348
|
+
return kr || (kr = 1, (function(e) {
|
|
349
|
+
var r = yr(), i = hr(), t = i("%Function.prototype.apply%"), a = i("%Function.prototype.call%"), n = i("%Reflect.apply%", !0) || r.call(a, t), s = i("%Object.getOwnPropertyDescriptor%", !0), d = i("%Object.defineProperty%", !0), c = i("%Math.max%");
|
|
350
|
+
if (d)
|
|
351
351
|
try {
|
|
352
|
-
|
|
352
|
+
d({}, "a", { value: 1 });
|
|
353
353
|
} catch {
|
|
354
|
-
|
|
354
|
+
d = null;
|
|
355
355
|
}
|
|
356
356
|
e.exports = function(g) {
|
|
357
357
|
var u = n(r, a, arguments);
|
|
358
|
-
if (s &&
|
|
358
|
+
if (s && d) {
|
|
359
359
|
var o = s(u, "length");
|
|
360
|
-
o.configurable &&
|
|
360
|
+
o.configurable && d(
|
|
361
361
|
u,
|
|
362
362
|
"length",
|
|
363
363
|
{ value: 1 + c(0, g.length - (arguments.length - 1)) }
|
|
@@ -365,10 +365,10 @@ function rt() {
|
|
|
365
365
|
}
|
|
366
366
|
return u;
|
|
367
367
|
};
|
|
368
|
-
var
|
|
368
|
+
var p = function() {
|
|
369
369
|
return n(r, t, arguments);
|
|
370
370
|
};
|
|
371
|
-
|
|
371
|
+
d ? d(e.exports, "apply", { value: p }) : e.exports.apply = p;
|
|
372
372
|
})(tr)), tr.exports;
|
|
373
373
|
}
|
|
374
374
|
var ar, Ir;
|
|
@@ -389,15 +389,15 @@ var nr, _r;
|
|
|
389
389
|
function ot() {
|
|
390
390
|
if (_r) return nr;
|
|
391
391
|
_r = 1;
|
|
392
|
-
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, s = a && n && typeof n.get == "function" ? n.get : null,
|
|
392
|
+
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, s = a && n && typeof n.get == "function" ? n.get : null, d = a && Set.prototype.forEach, c = typeof WeakMap == "function" && WeakMap.prototype, p = c ? WeakMap.prototype.has : null, S = typeof WeakSet == "function" && WeakSet.prototype, g = S ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, o = u ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, w = Object.prototype.toString, m = Function.prototype.toString, l = String.prototype.match, v = String.prototype.slice, b = String.prototype.replace, O = String.prototype.toUpperCase, P = String.prototype.toLowerCase, k = RegExp.prototype.test, L = Array.prototype.concat, R = Array.prototype.join, j = Array.prototype.slice, U = Math.floor, x = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, N = typeof Symbol == "function" && typeof Symbol.iterator == "object", $ = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === N || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, F = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(h) {
|
|
393
393
|
return h.__proto__;
|
|
394
394
|
} : null);
|
|
395
395
|
function Z(h, A) {
|
|
396
|
-
if (h === 1 / 0 || h === -1 / 0 || h !== h || h && h > -1e3 && h < 1e3 ||
|
|
396
|
+
if (h === 1 / 0 || h === -1 / 0 || h !== h || h && h > -1e3 && h < 1e3 || k.call(/e/, A))
|
|
397
397
|
return A;
|
|
398
398
|
var D = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
399
399
|
if (typeof h == "number") {
|
|
400
|
-
var y = h < 0 ? -
|
|
400
|
+
var y = h < 0 ? -U(-h) : U(h);
|
|
401
401
|
if (y !== h) {
|
|
402
402
|
var E = String(y), C = v.call(A, E.length + 1);
|
|
403
403
|
return b.call(E, D, "$&_") + "." + b.call(b.call(C, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
@@ -457,26 +457,26 @@ function ot() {
|
|
|
457
457
|
}
|
|
458
458
|
if (typeof A == "function" && !ce(A)) {
|
|
459
459
|
var Y = Te(A), Ee = ge(A, H);
|
|
460
|
-
return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " +
|
|
460
|
+
return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " + R.call(Ee, ", ") + " }" : "");
|
|
461
461
|
}
|
|
462
462
|
if (se(A)) {
|
|
463
|
-
var Ar =
|
|
464
|
-
return typeof A == "object" && !
|
|
463
|
+
var Ar = N ? b.call(String(A), /^(Symbol\(.*\))_[^)]*$/, "$1") : I.call(A);
|
|
464
|
+
return typeof A == "object" && !N ? le(Ar) : Ar;
|
|
465
465
|
}
|
|
466
466
|
if (_e(A)) {
|
|
467
|
-
for (var Fe = "<" +
|
|
467
|
+
for (var Fe = "<" + P.call(String(A.nodeName)), ze = A.attributes || [], $e = 0; $e < ze.length; $e++)
|
|
468
468
|
Fe += " " + ze[$e].name + "=" + K(ie(ze[$e].value), "double", C);
|
|
469
|
-
return Fe += ">", A.childNodes && A.childNodes.length && (Fe += "..."), Fe += "</" +
|
|
469
|
+
return Fe += ">", A.childNodes && A.childNodes.length && (Fe += "..."), Fe += "</" + P.call(String(A.nodeName)) + ">", Fe;
|
|
470
470
|
}
|
|
471
471
|
if (re(A)) {
|
|
472
472
|
if (A.length === 0)
|
|
473
473
|
return "[]";
|
|
474
474
|
var Ke = ge(A, H);
|
|
475
|
-
return V && !Ce(Ke) ? "[" + he(Ke, V) + "]" : "[ " +
|
|
475
|
+
return V && !Ce(Ke) ? "[" + he(Ke, V) + "]" : "[ " + R.call(Ke, ", ") + " ]";
|
|
476
476
|
}
|
|
477
477
|
if (ue(A)) {
|
|
478
478
|
var We = ge(A, H);
|
|
479
|
-
return !("cause" in Error.prototype) && "cause" in A && !z.call(A, "cause") ? "{ [" + String(A) + "] " +
|
|
479
|
+
return !("cause" in Error.prototype) && "cause" in A && !z.call(A, "cause") ? "{ [" + String(A) + "] " + R.call(L.call("[cause]: " + H(A.cause), We), ", ") + " }" : We.length === 0 ? "[" + String(A) + "]" : "{ [" + String(A) + "] " + R.call(We, ", ") + " }";
|
|
480
480
|
}
|
|
481
481
|
if (typeof A == "object" && G) {
|
|
482
482
|
if (X && typeof A[X] == "function" && Q)
|
|
@@ -484,15 +484,15 @@ function ot() {
|
|
|
484
484
|
if (G !== "symbol" && typeof A.inspect == "function")
|
|
485
485
|
return A.inspect();
|
|
486
486
|
}
|
|
487
|
-
if (
|
|
487
|
+
if (Re(A)) {
|
|
488
488
|
var br = [];
|
|
489
489
|
return t.call(A, function(Me, Be) {
|
|
490
490
|
br.push(H(Be, A, !0) + " => " + H(Me, A));
|
|
491
491
|
}), we("Map", i.call(A), br, V);
|
|
492
492
|
}
|
|
493
|
-
if (
|
|
493
|
+
if (ke(A)) {
|
|
494
494
|
var Sr = [];
|
|
495
|
-
return
|
|
495
|
+
return d.call(A, function(Me) {
|
|
496
496
|
Sr.push(H(Me, A));
|
|
497
497
|
}), we("Set", s.call(A), Sr, V);
|
|
498
498
|
}
|
|
@@ -505,14 +505,14 @@ function ot() {
|
|
|
505
505
|
if (de(A))
|
|
506
506
|
return le(H(Number(A)));
|
|
507
507
|
if (ye(A))
|
|
508
|
-
return le(H(
|
|
508
|
+
return le(H(x.call(A)));
|
|
509
509
|
if (pe(A))
|
|
510
|
-
return le(
|
|
510
|
+
return le(f.call(A));
|
|
511
511
|
if (oe(A))
|
|
512
512
|
return le(H(String(A)));
|
|
513
513
|
if (!te(A) && !ce(A)) {
|
|
514
|
-
var He = ge(A, H), wr = F ? F(A) === Object.prototype : A instanceof Object || A.constructor === Object, Je = A instanceof Object ? "" : "null prototype", Er = !wr && $ && Object(A) === A && $ in A ? v.call(ee(A), 8, -1) : Je ? "Object" : "", Hr = wr || typeof A.constructor != "function" ? "" : A.constructor.name ? A.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" +
|
|
515
|
-
return He.length === 0 ? qe + "{}" : V ? qe + "{" + he(He, V) + "}" : qe + "{ " +
|
|
514
|
+
var He = ge(A, H), wr = F ? F(A) === Object.prototype : A instanceof Object || A.constructor === Object, Je = A instanceof Object ? "" : "null prototype", Er = !wr && $ && Object(A) === A && $ in A ? v.call(ee(A), 8, -1) : Je ? "Object" : "", Hr = wr || typeof A.constructor != "function" ? "" : A.constructor.name ? A.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + R.call(L.call([], Er || [], Je || []), ": ") + "] " : "");
|
|
515
|
+
return He.length === 0 ? qe + "{}" : V ? qe + "{" + he(He, V) + "}" : qe + "{ " + R.call(He, ", ") + " }";
|
|
516
516
|
}
|
|
517
517
|
return String(A);
|
|
518
518
|
};
|
|
@@ -545,23 +545,23 @@ function ot() {
|
|
|
545
545
|
return ee(h) === "[object Boolean]" && (!$ || !(typeof h == "object" && $ in h));
|
|
546
546
|
}
|
|
547
547
|
function se(h) {
|
|
548
|
-
if (
|
|
548
|
+
if (N)
|
|
549
549
|
return h && typeof h == "object" && h instanceof Symbol;
|
|
550
550
|
if (typeof h == "symbol")
|
|
551
551
|
return !0;
|
|
552
|
-
if (!h || typeof h != "object" || !
|
|
552
|
+
if (!h || typeof h != "object" || !I)
|
|
553
553
|
return !1;
|
|
554
554
|
try {
|
|
555
|
-
return
|
|
555
|
+
return I.call(h), !0;
|
|
556
556
|
} catch {
|
|
557
557
|
}
|
|
558
558
|
return !1;
|
|
559
559
|
}
|
|
560
560
|
function ye(h) {
|
|
561
|
-
if (!h || typeof h != "object" || !
|
|
561
|
+
if (!h || typeof h != "object" || !x)
|
|
562
562
|
return !1;
|
|
563
563
|
try {
|
|
564
|
-
return
|
|
564
|
+
return x.call(h), !0;
|
|
565
565
|
} catch {
|
|
566
566
|
}
|
|
567
567
|
return !1;
|
|
@@ -589,7 +589,7 @@ function ot() {
|
|
|
589
589
|
return D;
|
|
590
590
|
return -1;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function Re(h) {
|
|
593
593
|
if (!i || !h || typeof h != "object")
|
|
594
594
|
return !1;
|
|
595
595
|
try {
|
|
@@ -605,10 +605,10 @@ function ot() {
|
|
|
605
605
|
return !1;
|
|
606
606
|
}
|
|
607
607
|
function me(h) {
|
|
608
|
-
if (!
|
|
608
|
+
if (!p || !h || typeof h != "object")
|
|
609
609
|
return !1;
|
|
610
610
|
try {
|
|
611
|
-
|
|
611
|
+
p.call(h, p);
|
|
612
612
|
try {
|
|
613
613
|
g.call(h, g);
|
|
614
614
|
} catch {
|
|
@@ -628,7 +628,7 @@ function ot() {
|
|
|
628
628
|
}
|
|
629
629
|
return !1;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function ke(h) {
|
|
632
632
|
if (!s || !h || typeof h != "object")
|
|
633
633
|
return !1;
|
|
634
634
|
try {
|
|
@@ -649,7 +649,7 @@ function ot() {
|
|
|
649
649
|
try {
|
|
650
650
|
g.call(h, g);
|
|
651
651
|
try {
|
|
652
|
-
|
|
652
|
+
p.call(h, p);
|
|
653
653
|
} catch {
|
|
654
654
|
return !0;
|
|
655
655
|
}
|
|
@@ -686,7 +686,7 @@ function ot() {
|
|
|
686
686
|
return h + " { ? }";
|
|
687
687
|
}
|
|
688
688
|
function we(h, A, D, y) {
|
|
689
|
-
var E = y ? he(D, y) :
|
|
689
|
+
var E = y ? he(D, y) : R.call(D, ", ");
|
|
690
690
|
return h + " (" + A + ") {" + E + "}";
|
|
691
691
|
}
|
|
692
692
|
function Ce(h) {
|
|
@@ -701,12 +701,12 @@ function ot() {
|
|
|
701
701
|
if (h.indent === " ")
|
|
702
702
|
D = " ";
|
|
703
703
|
else if (typeof h.indent == "number" && h.indent > 0)
|
|
704
|
-
D =
|
|
704
|
+
D = R.call(Array(h.indent + 1), " ");
|
|
705
705
|
else
|
|
706
706
|
return null;
|
|
707
707
|
return {
|
|
708
708
|
base: D,
|
|
709
|
-
prev:
|
|
709
|
+
prev: R.call(Array(A + 1), D)
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
712
|
function he(h, A) {
|
|
@@ -714,7 +714,7 @@ function ot() {
|
|
|
714
714
|
return "";
|
|
715
715
|
var D = `
|
|
716
716
|
` + A.prev + A.base;
|
|
717
|
-
return D +
|
|
717
|
+
return D + R.call(h, "," + D) + `
|
|
718
718
|
` + A.prev;
|
|
719
719
|
}
|
|
720
720
|
function ge(h, A) {
|
|
@@ -724,15 +724,15 @@ function ot() {
|
|
|
724
724
|
for (var E = 0; E < h.length; E++)
|
|
725
725
|
y[E] = J(h, E) ? A(h[E], h) : "";
|
|
726
726
|
}
|
|
727
|
-
var C = typeof
|
|
728
|
-
if (
|
|
727
|
+
var C = typeof T == "function" ? T(h) : [], G;
|
|
728
|
+
if (N) {
|
|
729
729
|
G = {};
|
|
730
730
|
for (var ae = 0; ae < C.length; ae++)
|
|
731
731
|
G["$" + C[ae]] = C[ae];
|
|
732
732
|
}
|
|
733
733
|
for (var W in h)
|
|
734
|
-
J(h, W) && (D && String(Number(W)) === W && W < h.length ||
|
|
735
|
-
if (typeof
|
|
734
|
+
J(h, W) && (D && String(Number(W)) === W && W < h.length || N && G["$" + W] instanceof Symbol || (k.call(/[^\w$]/, W) ? y.push(A(W, h) + ": " + A(h[W], h)) : y.push(W + ": " + A(h[W], h))));
|
|
735
|
+
if (typeof T == "function")
|
|
736
736
|
for (var M = 0; M < C.length; M++)
|
|
737
737
|
z.call(h, C[M]) && y.push("[" + A(C[M]) + "]: " + A(h[C[M]], h));
|
|
738
738
|
return y;
|
|
@@ -743,14 +743,14 @@ var ir, Nr;
|
|
|
743
743
|
function st() {
|
|
744
744
|
if (Nr) return ir;
|
|
745
745
|
Nr = 1;
|
|
746
|
-
var e = hr(), r = tt(), i = /* @__PURE__ */ ot(), t = e("%TypeError%"), a = e("%WeakMap%", !0), n = e("%Map%", !0), s = r("WeakMap.prototype.get", !0),
|
|
746
|
+
var e = hr(), r = tt(), i = /* @__PURE__ */ ot(), t = e("%TypeError%"), a = e("%WeakMap%", !0), n = e("%Map%", !0), s = r("WeakMap.prototype.get", !0), d = r("WeakMap.prototype.set", !0), c = r("WeakMap.prototype.has", !0), p = r("Map.prototype.get", !0), S = r("Map.prototype.set", !0), g = r("Map.prototype.has", !0), u = function(m, l) {
|
|
747
747
|
for (var v = m, b; (b = v.next) !== null; v = b)
|
|
748
748
|
if (b.key === l)
|
|
749
749
|
return v.next = b.next, b.next = m.next, m.next = b, b;
|
|
750
750
|
}, o = function(m, l) {
|
|
751
751
|
var v = u(m, l);
|
|
752
752
|
return v && v.value;
|
|
753
|
-
},
|
|
753
|
+
}, f = function(m, l, v) {
|
|
754
754
|
var b = u(m, l);
|
|
755
755
|
b ? b.value = v : m.next = {
|
|
756
756
|
// eslint-disable-line no-param-reassign
|
|
@@ -763,33 +763,33 @@ function st() {
|
|
|
763
763
|
};
|
|
764
764
|
return ir = function() {
|
|
765
765
|
var l, v, b, O = {
|
|
766
|
-
assert: function(
|
|
767
|
-
if (!O.has(
|
|
768
|
-
throw new t("Side channel does not contain " + i(
|
|
766
|
+
assert: function(P) {
|
|
767
|
+
if (!O.has(P))
|
|
768
|
+
throw new t("Side channel does not contain " + i(P));
|
|
769
769
|
},
|
|
770
|
-
get: function(
|
|
771
|
-
if (a &&
|
|
770
|
+
get: function(P) {
|
|
771
|
+
if (a && P && (typeof P == "object" || typeof P == "function")) {
|
|
772
772
|
if (l)
|
|
773
|
-
return s(l,
|
|
773
|
+
return s(l, P);
|
|
774
774
|
} else if (n) {
|
|
775
775
|
if (v)
|
|
776
|
-
return
|
|
776
|
+
return p(v, P);
|
|
777
777
|
} else if (b)
|
|
778
|
-
return o(b,
|
|
778
|
+
return o(b, P);
|
|
779
779
|
},
|
|
780
|
-
has: function(
|
|
781
|
-
if (a &&
|
|
780
|
+
has: function(P) {
|
|
781
|
+
if (a && P && (typeof P == "object" || typeof P == "function")) {
|
|
782
782
|
if (l)
|
|
783
|
-
return c(l,
|
|
783
|
+
return c(l, P);
|
|
784
784
|
} else if (n) {
|
|
785
785
|
if (v)
|
|
786
|
-
return g(v,
|
|
786
|
+
return g(v, P);
|
|
787
787
|
} else if (b)
|
|
788
|
-
return w(b,
|
|
788
|
+
return w(b, P);
|
|
789
789
|
return !1;
|
|
790
790
|
},
|
|
791
|
-
set: function(
|
|
792
|
-
a &&
|
|
791
|
+
set: function(P, k) {
|
|
792
|
+
a && P && (typeof P == "object" || typeof P == "function") ? (l || (l = new a()), d(l, P, k)) : n ? (v || (v = new n()), S(v, P, k)) : (b || (b = { key: {}, next: null }), f(b, P, k));
|
|
793
793
|
}
|
|
794
794
|
};
|
|
795
795
|
return O;
|
|
@@ -853,17 +853,17 @@ function Kr() {
|
|
|
853
853
|
if (!m || typeof m != "object")
|
|
854
854
|
return [m].concat(l);
|
|
855
855
|
var b = m;
|
|
856
|
-
return i(m) && !i(l) && (b = n(m, v)), i(m) && i(l) ? (l.forEach(function(O,
|
|
857
|
-
if (r.call(m,
|
|
858
|
-
var
|
|
859
|
-
|
|
856
|
+
return i(m) && !i(l) && (b = n(m, v)), i(m) && i(l) ? (l.forEach(function(O, P) {
|
|
857
|
+
if (r.call(m, P)) {
|
|
858
|
+
var k = m[P];
|
|
859
|
+
k && typeof k == "object" && O && typeof O == "object" ? m[P] = w(k, O, v) : m.push(O);
|
|
860
860
|
} else
|
|
861
|
-
m[
|
|
862
|
-
}), m) : Object.keys(l).reduce(function(O,
|
|
863
|
-
var
|
|
864
|
-
return r.call(O,
|
|
861
|
+
m[P] = O;
|
|
862
|
+
}), m) : Object.keys(l).reduce(function(O, P) {
|
|
863
|
+
var k = l[P];
|
|
864
|
+
return r.call(O, P) ? O[P] = w(O[P], k, v) : O[P] = k, O;
|
|
865
865
|
}, b);
|
|
866
|
-
},
|
|
866
|
+
}, d = function(m, l) {
|
|
867
867
|
return Object.keys(l).reduce(function(v, b) {
|
|
868
868
|
return v[b] = l[b], v;
|
|
869
869
|
}, m);
|
|
@@ -876,40 +876,40 @@ function Kr() {
|
|
|
876
876
|
} catch {
|
|
877
877
|
return v;
|
|
878
878
|
}
|
|
879
|
-
},
|
|
879
|
+
}, p = function(m, l, v, b, O) {
|
|
880
880
|
if (m.length === 0)
|
|
881
881
|
return m;
|
|
882
|
-
var
|
|
883
|
-
if (typeof m == "symbol" ?
|
|
884
|
-
return escape(
|
|
882
|
+
var P = m;
|
|
883
|
+
if (typeof m == "symbol" ? P = Symbol.prototype.toString.call(m) : typeof m != "string" && (P = String(m)), v === "iso-8859-1")
|
|
884
|
+
return escape(P).replace(/%u[0-9a-f]{4}/gi, function(j) {
|
|
885
885
|
return "%26%23" + parseInt(j.slice(2), 16) + "%3B";
|
|
886
886
|
});
|
|
887
|
-
for (var
|
|
888
|
-
var
|
|
889
|
-
if (
|
|
890
|
-
|
|
887
|
+
for (var k = "", L = 0; L < P.length; ++L) {
|
|
888
|
+
var R = P.charCodeAt(L);
|
|
889
|
+
if (R === 45 || R === 46 || R === 95 || R === 126 || R >= 48 && R <= 57 || R >= 65 && R <= 90 || R >= 97 && R <= 122 || O === e.RFC1738 && (R === 40 || R === 41)) {
|
|
890
|
+
k += P.charAt(L);
|
|
891
891
|
continue;
|
|
892
892
|
}
|
|
893
|
-
if (
|
|
894
|
-
|
|
893
|
+
if (R < 128) {
|
|
894
|
+
k = k + t[R];
|
|
895
895
|
continue;
|
|
896
896
|
}
|
|
897
|
-
if (
|
|
898
|
-
|
|
897
|
+
if (R < 2048) {
|
|
898
|
+
k = k + (t[192 | R >> 6] + t[128 | R & 63]);
|
|
899
899
|
continue;
|
|
900
900
|
}
|
|
901
|
-
if (
|
|
902
|
-
|
|
901
|
+
if (R < 55296 || R >= 57344) {
|
|
902
|
+
k = k + (t[224 | R >> 12] + t[128 | R >> 6 & 63] + t[128 | R & 63]);
|
|
903
903
|
continue;
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
L += 1, R = 65536 + ((R & 1023) << 10 | P.charCodeAt(L) & 1023), k += t[240 | R >> 18] + t[128 | R >> 12 & 63] + t[128 | R >> 6 & 63] + t[128 | R & 63];
|
|
906
906
|
}
|
|
907
|
-
return
|
|
907
|
+
return k;
|
|
908
908
|
}, S = function(m) {
|
|
909
909
|
for (var l = [{ obj: { o: m }, prop: "o" }], v = [], b = 0; b < l.length; ++b)
|
|
910
|
-
for (var O = l[b],
|
|
911
|
-
var
|
|
912
|
-
typeof j == "object" && j !== null && v.indexOf(j) === -1 && (l.push({ obj:
|
|
910
|
+
for (var O = l[b], P = O.obj[O.prop], k = Object.keys(P), L = 0; L < k.length; ++L) {
|
|
911
|
+
var R = k[L], j = P[R];
|
|
912
|
+
typeof j == "object" && j !== null && v.indexOf(j) === -1 && (l.push({ obj: P, prop: R }), v.push(j));
|
|
913
913
|
}
|
|
914
914
|
return a(l), m;
|
|
915
915
|
}, g = function(m) {
|
|
@@ -918,7 +918,7 @@ function Kr() {
|
|
|
918
918
|
return !m || typeof m != "object" ? !1 : !!(m.constructor && m.constructor.isBuffer && m.constructor.isBuffer(m));
|
|
919
919
|
}, o = function(m, l) {
|
|
920
920
|
return [].concat(m, l);
|
|
921
|
-
},
|
|
921
|
+
}, f = function(m, l) {
|
|
922
922
|
if (i(m)) {
|
|
923
923
|
for (var v = [], b = 0; b < m.length; b += 1)
|
|
924
924
|
v.push(l(m[b]));
|
|
@@ -928,14 +928,14 @@ function Kr() {
|
|
|
928
928
|
};
|
|
929
929
|
return sr = {
|
|
930
930
|
arrayToObject: n,
|
|
931
|
-
assign:
|
|
931
|
+
assign: d,
|
|
932
932
|
combine: o,
|
|
933
933
|
compact: S,
|
|
934
934
|
decode: c,
|
|
935
|
-
encode:
|
|
935
|
+
encode: p,
|
|
936
936
|
isBuffer: u,
|
|
937
937
|
isRegExp: g,
|
|
938
|
-
maybeMap:
|
|
938
|
+
maybeMap: f,
|
|
939
939
|
merge: s
|
|
940
940
|
}, sr;
|
|
941
941
|
}
|
|
@@ -954,9 +954,9 @@ function ut() {
|
|
|
954
954
|
repeat: function(l) {
|
|
955
955
|
return l;
|
|
956
956
|
}
|
|
957
|
-
}, n = Array.isArray, s = String.prototype.split,
|
|
958
|
-
|
|
959
|
-
},
|
|
957
|
+
}, n = Array.isArray, s = String.prototype.split, d = Array.prototype.push, c = function(m, l) {
|
|
958
|
+
d.apply(m, n(l) ? l : [l]);
|
|
959
|
+
}, p = Date.prototype.toISOString, S = i.default, g = {
|
|
960
960
|
addQueryPrefix: !1,
|
|
961
961
|
allowDots: !1,
|
|
962
962
|
charset: "utf-8",
|
|
@@ -970,13 +970,13 @@ function ut() {
|
|
|
970
970
|
// deprecated
|
|
971
971
|
indices: !1,
|
|
972
972
|
serializeDate: function(l) {
|
|
973
|
-
return
|
|
973
|
+
return p.call(l);
|
|
974
974
|
},
|
|
975
975
|
skipNulls: !1,
|
|
976
976
|
strictNullHandling: !1
|
|
977
977
|
}, u = function(l) {
|
|
978
978
|
return typeof l == "string" || typeof l == "number" || typeof l == "boolean" || typeof l == "symbol" || typeof l == "bigint";
|
|
979
|
-
}, o = {},
|
|
979
|
+
}, o = {}, f = function m(l, v, b, O, P, k, L, R, j, U, x, T, I, N, $, z) {
|
|
980
980
|
for (var F = l, Z = z, Q = 0, ne = !1; (Z = Z.get(o)) !== void 0 && !ne; ) {
|
|
981
981
|
var X = Z.get(l);
|
|
982
982
|
if (Q += 1, typeof X < "u") {
|
|
@@ -986,24 +986,24 @@ function ut() {
|
|
|
986
986
|
}
|
|
987
987
|
typeof Z.get(o) > "u" && (Q = 0);
|
|
988
988
|
}
|
|
989
|
-
if (typeof
|
|
990
|
-
return ee instanceof Date ?
|
|
989
|
+
if (typeof R == "function" ? F = R(v, F) : F instanceof Date ? F = x(F) : b === "comma" && n(F) && (F = r.maybeMap(F, function(ee) {
|
|
990
|
+
return ee instanceof Date ? x(ee) : ee;
|
|
991
991
|
})), F === null) {
|
|
992
|
-
if (
|
|
993
|
-
return
|
|
992
|
+
if (P)
|
|
993
|
+
return L && !N ? L(v, g.encoder, $, "key", T) : v;
|
|
994
994
|
F = "";
|
|
995
995
|
}
|
|
996
996
|
if (u(F) || r.isBuffer(F)) {
|
|
997
|
-
if (
|
|
998
|
-
var K =
|
|
999
|
-
if (b === "comma" &&
|
|
997
|
+
if (L) {
|
|
998
|
+
var K = N ? v : L(v, g.encoder, $, "key", T);
|
|
999
|
+
if (b === "comma" && N) {
|
|
1000
1000
|
for (var ie = s.call(String(F), ","), re = "", te = 0; te < ie.length; ++te)
|
|
1001
|
-
re += (te === 0 ? "" : ",") +
|
|
1002
|
-
return [
|
|
1001
|
+
re += (te === 0 ? "" : ",") + I(L(ie[te], g.encoder, $, "value", T));
|
|
1002
|
+
return [I(K) + (O && n(F) && ie.length === 1 ? "[]" : "") + "=" + re];
|
|
1003
1003
|
}
|
|
1004
|
-
return [
|
|
1004
|
+
return [I(K) + "=" + I(L(F, g.encoder, $, "value", T))];
|
|
1005
1005
|
}
|
|
1006
|
-
return [
|
|
1006
|
+
return [I(v) + "=" + I(String(F))];
|
|
1007
1007
|
}
|
|
1008
1008
|
var ce = [];
|
|
1009
1009
|
if (typeof F > "u")
|
|
@@ -1011,16 +1011,16 @@ function ut() {
|
|
|
1011
1011
|
var ue;
|
|
1012
1012
|
if (b === "comma" && n(F))
|
|
1013
1013
|
ue = [{ value: F.length > 0 ? F.join(",") || null : void 0 }];
|
|
1014
|
-
else if (n(
|
|
1015
|
-
ue =
|
|
1014
|
+
else if (n(R))
|
|
1015
|
+
ue = R;
|
|
1016
1016
|
else {
|
|
1017
1017
|
var oe = Object.keys(F);
|
|
1018
1018
|
ue = j ? oe.sort(j) : oe;
|
|
1019
1019
|
}
|
|
1020
1020
|
for (var de = O && n(F) && F.length === 1 ? v + "[]" : v, pe = 0; pe < ue.length; ++pe) {
|
|
1021
1021
|
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : F[se];
|
|
1022
|
-
if (!(
|
|
1023
|
-
var Se = n(F) ? typeof b == "function" ? b(de, se) : de : de + (
|
|
1022
|
+
if (!(k && ye === null)) {
|
|
1023
|
+
var Se = n(F) ? typeof b == "function" ? b(de, se) : de : de + (U ? "." + se : "[" + se + "]");
|
|
1024
1024
|
z.set(l, Q);
|
|
1025
1025
|
var J = e();
|
|
1026
1026
|
J.set(o, z), c(ce, m(
|
|
@@ -1028,16 +1028,16 @@ function ut() {
|
|
|
1028
1028
|
Se,
|
|
1029
1029
|
b,
|
|
1030
1030
|
O,
|
|
1031
|
-
x,
|
|
1032
|
-
R,
|
|
1033
|
-
N,
|
|
1034
|
-
T,
|
|
1035
|
-
j,
|
|
1036
1031
|
P,
|
|
1037
1032
|
k,
|
|
1038
|
-
U,
|
|
1039
|
-
_,
|
|
1040
1033
|
L,
|
|
1034
|
+
R,
|
|
1035
|
+
j,
|
|
1036
|
+
U,
|
|
1037
|
+
x,
|
|
1038
|
+
T,
|
|
1039
|
+
I,
|
|
1040
|
+
N,
|
|
1041
1041
|
$,
|
|
1042
1042
|
J
|
|
1043
1043
|
));
|
|
@@ -1058,8 +1058,8 @@ function ut() {
|
|
|
1058
1058
|
throw new TypeError("Unknown format option provided.");
|
|
1059
1059
|
b = l.format;
|
|
1060
1060
|
}
|
|
1061
|
-
var O = i.formatters[b],
|
|
1062
|
-
return (typeof l.filter == "function" || n(l.filter)) && (
|
|
1061
|
+
var O = i.formatters[b], P = g.filter;
|
|
1062
|
+
return (typeof l.filter == "function" || n(l.filter)) && (P = l.filter), {
|
|
1063
1063
|
addQueryPrefix: typeof l.addQueryPrefix == "boolean" ? l.addQueryPrefix : g.addQueryPrefix,
|
|
1064
1064
|
allowDots: typeof l.allowDots > "u" ? g.allowDots : !!l.allowDots,
|
|
1065
1065
|
charset: v,
|
|
@@ -1068,7 +1068,7 @@ function ut() {
|
|
|
1068
1068
|
encode: typeof l.encode == "boolean" ? l.encode : g.encode,
|
|
1069
1069
|
encoder: typeof l.encoder == "function" ? l.encoder : g.encoder,
|
|
1070
1070
|
encodeValuesOnly: typeof l.encodeValuesOnly == "boolean" ? l.encodeValuesOnly : g.encodeValuesOnly,
|
|
1071
|
-
filter:
|
|
1071
|
+
filter: P,
|
|
1072
1072
|
format: b,
|
|
1073
1073
|
formatter: O,
|
|
1074
1074
|
serializeDate: typeof l.serializeDate == "function" ? l.serializeDate : g.serializeDate,
|
|
@@ -1078,24 +1078,24 @@ function ut() {
|
|
|
1078
1078
|
};
|
|
1079
1079
|
};
|
|
1080
1080
|
return ur = function(m, l) {
|
|
1081
|
-
var v = m, b = w(l), O,
|
|
1082
|
-
typeof b.filter == "function" ? (
|
|
1083
|
-
var
|
|
1081
|
+
var v = m, b = w(l), O, P;
|
|
1082
|
+
typeof b.filter == "function" ? (P = b.filter, v = P("", v)) : n(b.filter) && (P = b.filter, O = P);
|
|
1083
|
+
var k = [];
|
|
1084
1084
|
if (typeof v != "object" || v === null)
|
|
1085
1085
|
return "";
|
|
1086
|
-
var
|
|
1087
|
-
l && l.arrayFormat in a ?
|
|
1088
|
-
var
|
|
1086
|
+
var L;
|
|
1087
|
+
l && l.arrayFormat in a ? L = l.arrayFormat : l && "indices" in l ? L = l.indices ? "indices" : "repeat" : L = "indices";
|
|
1088
|
+
var R = a[L];
|
|
1089
1089
|
if (l && "commaRoundTrip" in l && typeof l.commaRoundTrip != "boolean")
|
|
1090
1090
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
1091
|
-
var j =
|
|
1091
|
+
var j = R === "comma" && l && l.commaRoundTrip;
|
|
1092
1092
|
O || (O = Object.keys(v)), b.sort && O.sort(b.sort);
|
|
1093
|
-
for (var
|
|
1094
|
-
var
|
|
1095
|
-
b.skipNulls && v[
|
|
1096
|
-
v[
|
|
1097
|
-
U,
|
|
1093
|
+
for (var U = e(), x = 0; x < O.length; ++x) {
|
|
1094
|
+
var T = O[x];
|
|
1095
|
+
b.skipNulls && v[T] === null || c(k, f(
|
|
1096
|
+
v[T],
|
|
1098
1097
|
T,
|
|
1098
|
+
R,
|
|
1099
1099
|
j,
|
|
1100
1100
|
b.strictNullHandling,
|
|
1101
1101
|
b.skipNulls,
|
|
@@ -1108,11 +1108,11 @@ function ut() {
|
|
|
1108
1108
|
b.formatter,
|
|
1109
1109
|
b.encodeValuesOnly,
|
|
1110
1110
|
b.charset,
|
|
1111
|
-
|
|
1111
|
+
U
|
|
1112
1112
|
));
|
|
1113
1113
|
}
|
|
1114
|
-
var
|
|
1115
|
-
return b.charsetSentinel && (b.charset === "iso-8859-1" ?
|
|
1114
|
+
var I = k.join(b.delimiter), N = b.addQueryPrefix === !0 ? "?" : "";
|
|
1115
|
+
return b.charsetSentinel && (b.charset === "iso-8859-1" ? N += "utf8=%26%2310003%3B&" : N += "utf8=%E2%9C%93&"), I.length > 0 ? N + I : "";
|
|
1116
1116
|
}, ur;
|
|
1117
1117
|
}
|
|
1118
1118
|
var cr, $r;
|
|
@@ -1137,54 +1137,54 @@ function ct() {
|
|
|
1137
1137
|
plainObjects: !1,
|
|
1138
1138
|
strictNullHandling: !1
|
|
1139
1139
|
}, a = function(u) {
|
|
1140
|
-
return u.replace(/&#(\d+);/g, function(o,
|
|
1141
|
-
return String.fromCharCode(parseInt(
|
|
1140
|
+
return u.replace(/&#(\d+);/g, function(o, f) {
|
|
1141
|
+
return String.fromCharCode(parseInt(f, 10));
|
|
1142
1142
|
});
|
|
1143
1143
|
}, n = function(u, o) {
|
|
1144
1144
|
return u && typeof u == "string" && o.comma && u.indexOf(",") > -1 ? u.split(",") : u;
|
|
1145
|
-
}, s = "utf8=%26%2310003%3B",
|
|
1146
|
-
var w = {}, m =
|
|
1147
|
-
if (
|
|
1145
|
+
}, s = "utf8=%26%2310003%3B", d = "utf8=%E2%9C%93", c = function(o, f) {
|
|
1146
|
+
var w = {}, m = f.ignoreQueryPrefix ? o.replace(/^\?/, "") : o, l = f.parameterLimit === 1 / 0 ? void 0 : f.parameterLimit, v = m.split(f.delimiter, l), b = -1, O, P = f.charset;
|
|
1147
|
+
if (f.charsetSentinel)
|
|
1148
1148
|
for (O = 0; O < v.length; ++O)
|
|
1149
|
-
v[O].indexOf("utf8=") === 0 && (v[O] ===
|
|
1149
|
+
v[O].indexOf("utf8=") === 0 && (v[O] === d ? P = "utf-8" : v[O] === s && (P = "iso-8859-1"), b = O, O = v.length);
|
|
1150
1150
|
for (O = 0; O < v.length; ++O)
|
|
1151
1151
|
if (O !== b) {
|
|
1152
|
-
var
|
|
1153
|
-
|
|
1154
|
-
n(
|
|
1155
|
-
function(
|
|
1156
|
-
return
|
|
1152
|
+
var k = v[O], L = k.indexOf("]="), R = L === -1 ? k.indexOf("=") : L + 1, j, U;
|
|
1153
|
+
R === -1 ? (j = f.decoder(k, t.decoder, P, "key"), U = f.strictNullHandling ? null : "") : (j = f.decoder(k.slice(0, R), t.decoder, P, "key"), U = e.maybeMap(
|
|
1154
|
+
n(k.slice(R + 1), f),
|
|
1155
|
+
function(x) {
|
|
1156
|
+
return f.decoder(x, t.decoder, P, "value");
|
|
1157
1157
|
}
|
|
1158
|
-
)),
|
|
1158
|
+
)), U && f.interpretNumericEntities && P === "iso-8859-1" && (U = a(U)), k.indexOf("[]=") > -1 && (U = i(U) ? [U] : U), r.call(w, j) ? w[j] = e.combine(w[j], U) : w[j] = U;
|
|
1159
1159
|
}
|
|
1160
1160
|
return w;
|
|
1161
|
-
},
|
|
1162
|
-
for (var m = w ? o : n(o,
|
|
1161
|
+
}, p = function(u, o, f, w) {
|
|
1162
|
+
for (var m = w ? o : n(o, f), l = u.length - 1; l >= 0; --l) {
|
|
1163
1163
|
var v, b = u[l];
|
|
1164
|
-
if (b === "[]" &&
|
|
1164
|
+
if (b === "[]" && f.parseArrays)
|
|
1165
1165
|
v = [].concat(m);
|
|
1166
1166
|
else {
|
|
1167
|
-
v =
|
|
1168
|
-
var O = b.charAt(0) === "[" && b.charAt(b.length - 1) === "]" ? b.slice(1, -1) : b,
|
|
1169
|
-
!
|
|
1167
|
+
v = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1168
|
+
var O = b.charAt(0) === "[" && b.charAt(b.length - 1) === "]" ? b.slice(1, -1) : b, P = parseInt(O, 10);
|
|
1169
|
+
!f.parseArrays && O === "" ? v = { 0: m } : !isNaN(P) && b !== O && String(P) === O && P >= 0 && f.parseArrays && P <= f.arrayLimit ? (v = [], v[P] = m) : O !== "__proto__" && (v[O] = m);
|
|
1170
1170
|
}
|
|
1171
1171
|
m = v;
|
|
1172
1172
|
}
|
|
1173
1173
|
return m;
|
|
1174
|
-
}, S = function(o,
|
|
1174
|
+
}, S = function(o, f, w, m) {
|
|
1175
1175
|
if (o) {
|
|
1176
|
-
var l = w.allowDots ? o.replace(/\.([^.[]+)/g, "[$1]") : o, v = /(\[[^[\]]*])/, b = /(\[[^[\]]*])/g, O = w.depth > 0 && v.exec(l),
|
|
1177
|
-
if (
|
|
1178
|
-
if (!w.plainObjects && r.call(Object.prototype,
|
|
1176
|
+
var l = w.allowDots ? o.replace(/\.([^.[]+)/g, "[$1]") : o, v = /(\[[^[\]]*])/, b = /(\[[^[\]]*])/g, O = w.depth > 0 && v.exec(l), P = O ? l.slice(0, O.index) : l, k = [];
|
|
1177
|
+
if (P) {
|
|
1178
|
+
if (!w.plainObjects && r.call(Object.prototype, P) && !w.allowPrototypes)
|
|
1179
1179
|
return;
|
|
1180
|
-
|
|
1180
|
+
k.push(P);
|
|
1181
1181
|
}
|
|
1182
|
-
for (var
|
|
1183
|
-
if (
|
|
1182
|
+
for (var L = 0; w.depth > 0 && (O = b.exec(l)) !== null && L < w.depth; ) {
|
|
1183
|
+
if (L += 1, !w.plainObjects && r.call(Object.prototype, O[1].slice(1, -1)) && !w.allowPrototypes)
|
|
1184
1184
|
return;
|
|
1185
|
-
|
|
1185
|
+
k.push(O[1]);
|
|
1186
1186
|
}
|
|
1187
|
-
return O &&
|
|
1187
|
+
return O && k.push("[" + l.slice(O.index) + "]"), p(k, f, w, m);
|
|
1188
1188
|
}
|
|
1189
1189
|
}, g = function(o) {
|
|
1190
1190
|
if (!o)
|
|
@@ -1193,13 +1193,13 @@ function ct() {
|
|
|
1193
1193
|
throw new TypeError("Decoder has to be a function.");
|
|
1194
1194
|
if (typeof o.charset < "u" && o.charset !== "utf-8" && o.charset !== "iso-8859-1")
|
|
1195
1195
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
1196
|
-
var
|
|
1196
|
+
var f = typeof o.charset > "u" ? t.charset : o.charset;
|
|
1197
1197
|
return {
|
|
1198
1198
|
allowDots: typeof o.allowDots > "u" ? t.allowDots : !!o.allowDots,
|
|
1199
1199
|
allowPrototypes: typeof o.allowPrototypes == "boolean" ? o.allowPrototypes : t.allowPrototypes,
|
|
1200
1200
|
allowSparse: typeof o.allowSparse == "boolean" ? o.allowSparse : t.allowSparse,
|
|
1201
1201
|
arrayLimit: typeof o.arrayLimit == "number" ? o.arrayLimit : t.arrayLimit,
|
|
1202
|
-
charset:
|
|
1202
|
+
charset: f,
|
|
1203
1203
|
charsetSentinel: typeof o.charsetSentinel == "boolean" ? o.charsetSentinel : t.charsetSentinel,
|
|
1204
1204
|
comma: typeof o.comma == "boolean" ? o.comma : t.comma,
|
|
1205
1205
|
decoder: typeof o.decoder == "function" ? o.decoder : t.decoder,
|
|
@@ -1215,14 +1215,14 @@ function ct() {
|
|
|
1215
1215
|
};
|
|
1216
1216
|
};
|
|
1217
1217
|
return cr = function(u, o) {
|
|
1218
|
-
var
|
|
1218
|
+
var f = g(o);
|
|
1219
1219
|
if (u === "" || u === null || typeof u > "u")
|
|
1220
|
-
return
|
|
1221
|
-
for (var w = typeof u == "string" ? c(u,
|
|
1222
|
-
var b = l[v], O = S(b, w[b],
|
|
1223
|
-
m = e.merge(m, O,
|
|
1220
|
+
return f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1221
|
+
for (var w = typeof u == "string" ? c(u, f) : u, m = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, l = Object.keys(w), v = 0; v < l.length; ++v) {
|
|
1222
|
+
var b = l[v], O = S(b, w[b], f, typeof u == "string");
|
|
1223
|
+
m = e.merge(m, O, f);
|
|
1224
1224
|
}
|
|
1225
|
-
return
|
|
1225
|
+
return f.allowSparse === !0 ? m : e.compact(m);
|
|
1226
1226
|
}, cr;
|
|
1227
1227
|
}
|
|
1228
1228
|
var lr, Br;
|
|
@@ -1237,13 +1237,13 @@ function lt() {
|
|
|
1237
1237
|
}, lr;
|
|
1238
1238
|
}
|
|
1239
1239
|
var ft = lt();
|
|
1240
|
-
const dt = /* @__PURE__ */ mr(ft), vr = "1.0.
|
|
1240
|
+
const dt = /* @__PURE__ */ mr(ft), vr = "1.0.13", pt = Ae.CancelToken;
|
|
1241
1241
|
var mt = function(e) {
|
|
1242
1242
|
var r;
|
|
1243
1243
|
typeof window < "u" && (r = e.cache.get("api"));
|
|
1244
1244
|
const i = Ae.getAdapter(Ae.defaults.adapter);
|
|
1245
1245
|
function t(c) {
|
|
1246
|
-
var
|
|
1246
|
+
var p = [
|
|
1247
1247
|
c.method,
|
|
1248
1248
|
c.url,
|
|
1249
1249
|
c.headers?.Authorization,
|
|
@@ -1253,11 +1253,11 @@ var mt = function(e) {
|
|
|
1253
1253
|
data: c.data
|
|
1254
1254
|
})
|
|
1255
1255
|
].filter(Boolean).join("-");
|
|
1256
|
-
return
|
|
1256
|
+
return p;
|
|
1257
1257
|
}
|
|
1258
|
-
const a = {}, s =
|
|
1259
|
-
var
|
|
1260
|
-
return a[
|
|
1258
|
+
const a = {}, s = d(function(c) {
|
|
1259
|
+
var p = t(c);
|
|
1260
|
+
return a[p] || (a[p] = new Promise(function(S, g) {
|
|
1261
1261
|
var u, o;
|
|
1262
1262
|
switch (String(c.method).toLowerCase()) {
|
|
1263
1263
|
case "post":
|
|
@@ -1267,36 +1267,36 @@ var mt = function(e) {
|
|
|
1267
1267
|
c.cache || (c.cache = !1);
|
|
1268
1268
|
break;
|
|
1269
1269
|
}
|
|
1270
|
-
return c.cache === !1 || (u = c.cache || r, u && (o = u.get(
|
|
1271
|
-
function(
|
|
1272
|
-
delete a[
|
|
1270
|
+
return c.cache === !1 || (u = c.cache || r, u && (o = u.get(p))), o ? S(o) : (Object.assign(c, { adapter: i }), Ae.request(c).then(
|
|
1271
|
+
function(f) {
|
|
1272
|
+
delete a[p], S(f);
|
|
1273
1273
|
},
|
|
1274
|
-
function(
|
|
1275
|
-
delete a[
|
|
1274
|
+
function(f) {
|
|
1275
|
+
delete a[p], g(f);
|
|
1276
1276
|
}
|
|
1277
1277
|
));
|
|
1278
|
-
})), a[
|
|
1278
|
+
})), a[p];
|
|
1279
1279
|
});
|
|
1280
|
-
s.generateEndpointURL = function(c,
|
|
1281
|
-
S = S || {},
|
|
1280
|
+
s.generateEndpointURL = function(c, p, S) {
|
|
1281
|
+
S = S || {}, p = p || {};
|
|
1282
1282
|
var g;
|
|
1283
1283
|
const u = S.file && e.fileAPI || e.apiURL;
|
|
1284
|
-
S.withoutToken || (delete
|
|
1285
|
-
var o = e.utils.mapParameters(
|
|
1284
|
+
S.withoutToken || (delete p.access_token, g = e.auth.getCurrentToken()), c[0] == "/" && c.slice(1);
|
|
1285
|
+
var o = e.utils.mapParameters(p);
|
|
1286
1286
|
g ? o = o ? `?access_token=${g}&${o}` : `?access_token=${g}` : o = o ? `?${o}` : "";
|
|
1287
|
-
var
|
|
1288
|
-
return
|
|
1287
|
+
var f = `${u}${c}${o}`;
|
|
1288
|
+
return f;
|
|
1289
1289
|
}, s.wasCancelled = function(c) {
|
|
1290
1290
|
return Ae.isCancel(c);
|
|
1291
1291
|
};
|
|
1292
|
-
function
|
|
1293
|
-
var
|
|
1292
|
+
function d(c) {
|
|
1293
|
+
var p = Ae.create({
|
|
1294
1294
|
paramsSerializer: {
|
|
1295
1295
|
serialize: (g) => dt.stringify(g, { arrayFormat: "repeat" })
|
|
1296
1296
|
},
|
|
1297
1297
|
adapter: c
|
|
1298
1298
|
});
|
|
1299
|
-
|
|
1299
|
+
p.defaults.baseURL = e.apiURL, p.defaults.headers.common.Accept = "application/json", p.interceptors.request.use(function(g) {
|
|
1300
1300
|
if (t(g), g.withoutToken)
|
|
1301
1301
|
return g;
|
|
1302
1302
|
if (g.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
|
|
@@ -1308,15 +1308,15 @@ var mt = function(e) {
|
|
|
1308
1308
|
return u && (g.headers.Authorization = `Bearer ${u}`, g.params && g.params.access_token && delete g.params.access_token), g;
|
|
1309
1309
|
});
|
|
1310
1310
|
let S = 0;
|
|
1311
|
-
return
|
|
1311
|
+
return p.interceptors.response.use(
|
|
1312
1312
|
function(g) {
|
|
1313
1313
|
var u = g.config, o = g.status;
|
|
1314
1314
|
switch (o) {
|
|
1315
1315
|
case 204:
|
|
1316
1316
|
if (S < 5)
|
|
1317
|
-
return S++, new Promise(function(
|
|
1317
|
+
return S++, new Promise(function(f, w) {
|
|
1318
1318
|
setTimeout(function() {
|
|
1319
|
-
return
|
|
1319
|
+
return p.request(u).then(f, w);
|
|
1320
1320
|
}, 800);
|
|
1321
1321
|
});
|
|
1322
1322
|
console.log("Failed after 5 retries"), S = 0;
|
|
@@ -1334,13 +1334,13 @@ var mt = function(e) {
|
|
|
1334
1334
|
case 429: {
|
|
1335
1335
|
var o = g.config || {};
|
|
1336
1336
|
if (o.__retry429 = (o.__retry429 || 0) + 1, o.__retry429 <= 3) {
|
|
1337
|
-
var
|
|
1337
|
+
var f = parseInt(
|
|
1338
1338
|
g?.response?.headers?.["retry-after"],
|
|
1339
1339
|
10
|
|
1340
|
-
), w = Number.isFinite(
|
|
1340
|
+
), w = Number.isFinite(f) ? f * 1e3 : 800 * o.__retry429, m = Math.floor(Math.random() * 500);
|
|
1341
1341
|
return new Promise(function(l, v) {
|
|
1342
1342
|
setTimeout(function() {
|
|
1343
|
-
return
|
|
1343
|
+
return p.request(o).then(l, v);
|
|
1344
1344
|
}, w + m);
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
@@ -1351,7 +1351,7 @@ var mt = function(e) {
|
|
|
1351
1351
|
if (S < 5)
|
|
1352
1352
|
return S++, new Promise(function(l, v) {
|
|
1353
1353
|
setTimeout(function() {
|
|
1354
|
-
return
|
|
1354
|
+
return p.request(g.config).then(l, v);
|
|
1355
1355
|
}, 800);
|
|
1356
1356
|
});
|
|
1357
1357
|
console.log("Failed after 5 retries"), S = 0;
|
|
@@ -1359,14 +1359,14 @@ var mt = function(e) {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
return Promise.reject(g);
|
|
1361
1361
|
}
|
|
1362
|
-
),
|
|
1362
|
+
), p;
|
|
1363
1363
|
}
|
|
1364
1364
|
return s.CancelToken = pt, s.axios = Ae, s;
|
|
1365
1365
|
}, fr, Gr;
|
|
1366
1366
|
function yt() {
|
|
1367
1367
|
if (Gr) return fr;
|
|
1368
1368
|
Gr = 1;
|
|
1369
|
-
var e = "Expected a function", r = "__lodash_hash_undefined__", i = "[object Function]", t = "[object GeneratorFunction]", a = "[object Symbol]", n = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/,
|
|
1369
|
+
var e = "Expected a function", r = "__lodash_hash_undefined__", i = "[object Function]", t = "[object GeneratorFunction]", a = "[object Symbol]", n = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/, d = /^\./, c = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, p = /[\\^$.*+?()[\]{}|]/g, S = /\\(\\)?/g, g = /^\[object .+?Constructor\]$/, u = typeof be == "object" && be && be.Object === Object && be, o = typeof self == "object" && self && self.Object === Object && self, f = u || o || Function("return this")();
|
|
1370
1370
|
function w(y, E) {
|
|
1371
1371
|
return y?.[E];
|
|
1372
1372
|
}
|
|
@@ -1379,12 +1379,12 @@ function yt() {
|
|
|
1379
1379
|
}
|
|
1380
1380
|
return E;
|
|
1381
1381
|
}
|
|
1382
|
-
var l = Array.prototype, v = Function.prototype, b = Object.prototype, O =
|
|
1382
|
+
var l = Array.prototype, v = Function.prototype, b = Object.prototype, O = f["__core-js_shared__"], P = (function() {
|
|
1383
1383
|
var y = /[^.]+$/.exec(O && O.keys && O.keys.IE_PROTO || "");
|
|
1384
1384
|
return y ? "Symbol(src)_1." + y : "";
|
|
1385
|
-
})(),
|
|
1386
|
-
"^" +
|
|
1387
|
-
),
|
|
1385
|
+
})(), k = v.toString, L = b.hasOwnProperty, R = b.toString, j = RegExp(
|
|
1386
|
+
"^" + k.call(L).replace(p, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1387
|
+
), U = f.Symbol, x = l.splice, T = Pe(f, "Map"), I = Pe(Object, "create"), N = U ? U.prototype : void 0, $ = N ? N.toString : void 0;
|
|
1388
1388
|
function z(y) {
|
|
1389
1389
|
var E = -1, C = y ? y.length : 0;
|
|
1390
1390
|
for (this.clear(); ++E < C; ) {
|
|
@@ -1393,26 +1393,26 @@ function yt() {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
1395
|
function F() {
|
|
1396
|
-
this.__data__ =
|
|
1396
|
+
this.__data__ = I ? I(null) : {};
|
|
1397
1397
|
}
|
|
1398
1398
|
function Z(y) {
|
|
1399
1399
|
return this.has(y) && delete this.__data__[y];
|
|
1400
1400
|
}
|
|
1401
1401
|
function Q(y) {
|
|
1402
1402
|
var E = this.__data__;
|
|
1403
|
-
if (
|
|
1403
|
+
if (I) {
|
|
1404
1404
|
var C = E[y];
|
|
1405
1405
|
return C === r ? void 0 : C;
|
|
1406
1406
|
}
|
|
1407
|
-
return
|
|
1407
|
+
return L.call(E, y) ? E[y] : void 0;
|
|
1408
1408
|
}
|
|
1409
1409
|
function ne(y) {
|
|
1410
1410
|
var E = this.__data__;
|
|
1411
|
-
return
|
|
1411
|
+
return I ? E[y] !== void 0 : L.call(E, y);
|
|
1412
1412
|
}
|
|
1413
1413
|
function X(y, E) {
|
|
1414
1414
|
var C = this.__data__;
|
|
1415
|
-
return C[y] =
|
|
1415
|
+
return C[y] = I && E === void 0 ? r : E, this;
|
|
1416
1416
|
}
|
|
1417
1417
|
z.prototype.clear = F, z.prototype.delete = Z, z.prototype.get = Q, z.prototype.has = ne, z.prototype.set = X;
|
|
1418
1418
|
function K(y) {
|
|
@@ -1430,7 +1430,7 @@ function yt() {
|
|
|
1430
1430
|
if (C < 0)
|
|
1431
1431
|
return !1;
|
|
1432
1432
|
var G = E.length - 1;
|
|
1433
|
-
return C == G ? E.pop() :
|
|
1433
|
+
return C == G ? E.pop() : x.call(E, C, 1), !0;
|
|
1434
1434
|
}
|
|
1435
1435
|
function te(y) {
|
|
1436
1436
|
var E = this.__data__, C = J(E, y);
|
|
@@ -1454,7 +1454,7 @@ function yt() {
|
|
|
1454
1454
|
function de() {
|
|
1455
1455
|
this.__data__ = {
|
|
1456
1456
|
hash: new z(),
|
|
1457
|
-
map: new (
|
|
1457
|
+
map: new (T || K)(),
|
|
1458
1458
|
string: new z()
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
@@ -1478,7 +1478,7 @@ function yt() {
|
|
|
1478
1478
|
return -1;
|
|
1479
1479
|
}
|
|
1480
1480
|
function ee(y, E) {
|
|
1481
|
-
E =
|
|
1481
|
+
E = ke(E, y) ? [E] : Re(E);
|
|
1482
1482
|
for (var C = 0, G = E.length; y != null && C < G; )
|
|
1483
1483
|
y = y[Ne(E[C++])];
|
|
1484
1484
|
return C && C == G ? y : void 0;
|
|
@@ -1497,7 +1497,7 @@ function yt() {
|
|
|
1497
1497
|
var E = y + "";
|
|
1498
1498
|
return E == "0" && 1 / y == -1 / 0 ? "-0" : E;
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function Re(y) {
|
|
1501
1501
|
return Ce(y) ? y : Oe(y);
|
|
1502
1502
|
}
|
|
1503
1503
|
function me(y, E) {
|
|
@@ -1508,7 +1508,7 @@ function yt() {
|
|
|
1508
1508
|
var C = w(y, E);
|
|
1509
1509
|
return Te(C) ? C : void 0;
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function ke(y, E) {
|
|
1512
1512
|
if (Ce(y))
|
|
1513
1513
|
return !1;
|
|
1514
1514
|
var C = typeof y;
|
|
@@ -1519,12 +1519,12 @@ function yt() {
|
|
|
1519
1519
|
return E == "string" || E == "number" || E == "symbol" || E == "boolean" ? y !== "__proto__" : y === null;
|
|
1520
1520
|
}
|
|
1521
1521
|
function _e(y) {
|
|
1522
|
-
return !!
|
|
1522
|
+
return !!P && P in y;
|
|
1523
1523
|
}
|
|
1524
1524
|
var Oe = fe(function(y) {
|
|
1525
1525
|
y = A(y);
|
|
1526
1526
|
var E = [];
|
|
1527
|
-
return
|
|
1527
|
+
return d.test(y) && E.push(""), y.replace(c, function(C, G, ae, W) {
|
|
1528
1528
|
E.push(ae ? W.replace(S, "$1") : G || C);
|
|
1529
1529
|
}), E;
|
|
1530
1530
|
});
|
|
@@ -1537,7 +1537,7 @@ function yt() {
|
|
|
1537
1537
|
function le(y) {
|
|
1538
1538
|
if (y != null) {
|
|
1539
1539
|
try {
|
|
1540
|
-
return
|
|
1540
|
+
return k.call(y);
|
|
1541
1541
|
} catch {
|
|
1542
1542
|
}
|
|
1543
1543
|
try {
|
|
@@ -1565,7 +1565,7 @@ function yt() {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
var Ce = Array.isArray;
|
|
1567
1567
|
function Le(y) {
|
|
1568
|
-
var E = he(y) ?
|
|
1568
|
+
var E = he(y) ? R.call(y) : "";
|
|
1569
1569
|
return E == i || E == t;
|
|
1570
1570
|
}
|
|
1571
1571
|
function he(y) {
|
|
@@ -1576,7 +1576,7 @@ function yt() {
|
|
|
1576
1576
|
return !!y && typeof y == "object";
|
|
1577
1577
|
}
|
|
1578
1578
|
function h(y) {
|
|
1579
|
-
return typeof y == "symbol" || ge(y) &&
|
|
1579
|
+
return typeof y == "symbol" || ge(y) && R.call(y) == a;
|
|
1580
1580
|
}
|
|
1581
1581
|
function A(y) {
|
|
1582
1582
|
return y == null ? "" : xe(y);
|
|
@@ -1593,14 +1593,14 @@ var dr, Dr;
|
|
|
1593
1593
|
function gt() {
|
|
1594
1594
|
if (Dr) return dr;
|
|
1595
1595
|
Dr = 1;
|
|
1596
|
-
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", a = "\\u0300-\\u036f\\ufe20-\\ufe23", n = "\\u20d0-\\u20f0", s = "\\u2700-\\u27bf",
|
|
1597
|
-
|
|
1598
|
-
$ + "+" + F + "(?=" + [l,
|
|
1599
|
-
|
|
1600
|
-
|
|
1596
|
+
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", a = "\\u0300-\\u036f\\ufe20-\\ufe23", n = "\\u20d0-\\u20f0", s = "\\u2700-\\u27bf", d = "a-z\\xdf-\\xf6\\xf8-\\xff", c = "\\xac\\xb1\\xd7\\xf7", p = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", S = "\\u2000-\\u206f", g = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", u = "A-Z\\xc0-\\xd6\\xd8-\\xde", o = "\\ufe0e\\ufe0f", f = c + p + S + g, w = "['’]", m = "[" + t + "]", l = "[" + f + "]", v = "[" + a + n + "]", b = "\\d+", O = "[" + s + "]", P = "[" + d + "]", k = "[^" + t + f + b + s + d + u + "]", L = "\\ud83c[\\udffb-\\udfff]", R = "(?:" + v + "|" + L + ")", j = "[^" + t + "]", U = "(?:\\ud83c[\\udde6-\\uddff]){2}", x = "[\\ud800-\\udbff][\\udc00-\\udfff]", T = "[" + u + "]", I = "\\u200d", N = "(?:" + P + "|" + k + ")", $ = "(?:" + T + "|" + k + ")", z = "(?:" + w + "(?:d|ll|m|re|s|t|ve))?", F = "(?:" + w + "(?:D|LL|M|RE|S|T|VE))?", Z = R + "?", Q = "[" + o + "]?", ne = "(?:" + I + "(?:" + [j, U, x].join("|") + ")" + Q + Z + ")*", X = Q + Z + ne, K = "(?:" + [O, U, x].join("|") + ")" + X, ie = "(?:" + [j + v + "?", v, U, x, m].join("|") + ")", re = RegExp(w, "g"), te = RegExp(v, "g"), ce = RegExp(L + "(?=" + L + ")|" + ie + X, "g"), ue = RegExp([
|
|
1597
|
+
T + "?" + P + "+" + z + "(?=" + [l, T, "$"].join("|") + ")",
|
|
1598
|
+
$ + "+" + F + "(?=" + [l, T + N, "$"].join("|") + ")",
|
|
1599
|
+
T + "?" + N + "+" + z,
|
|
1600
|
+
T + "+" + F,
|
|
1601
1601
|
b,
|
|
1602
1602
|
K
|
|
1603
|
-
].join("|"), "g"), oe = RegExp("[" +
|
|
1603
|
+
].join("|"), "g"), oe = RegExp("[" + I + t + a + n + o + "]"), de = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, pe = {
|
|
1604
1604
|
// Latin-1 Supplement block.
|
|
1605
1605
|
À: "A",
|
|
1606
1606
|
Á: "A",
|
|
@@ -1810,14 +1810,14 @@ function gt() {
|
|
|
1810
1810
|
return M?.[B];
|
|
1811
1811
|
};
|
|
1812
1812
|
}
|
|
1813
|
-
var
|
|
1813
|
+
var Re = xe(pe);
|
|
1814
1814
|
function me(M) {
|
|
1815
1815
|
return oe.test(M);
|
|
1816
1816
|
}
|
|
1817
1817
|
function Pe(M) {
|
|
1818
1818
|
return de.test(M);
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1820
|
+
function ke(M) {
|
|
1821
1821
|
return me(M) ? Ie(M) : ee(M);
|
|
1822
1822
|
}
|
|
1823
1823
|
function Ie(M) {
|
|
@@ -1849,7 +1849,7 @@ function gt() {
|
|
|
1849
1849
|
function ge(M) {
|
|
1850
1850
|
return function(B) {
|
|
1851
1851
|
B = y(B);
|
|
1852
|
-
var V = me(B) ?
|
|
1852
|
+
var V = me(B) ? ke(B) : void 0, H = V ? V[0] : B.charAt(0), Y = V ? he(V, 1).join("") : B.slice(1);
|
|
1853
1853
|
return H[M]() + Y;
|
|
1854
1854
|
};
|
|
1855
1855
|
}
|
|
@@ -1874,7 +1874,7 @@ function gt() {
|
|
|
1874
1874
|
return ae(y(M).toLowerCase());
|
|
1875
1875
|
}
|
|
1876
1876
|
function G(M) {
|
|
1877
|
-
return M = y(M), M && M.replace(i,
|
|
1877
|
+
return M = y(M), M && M.replace(i, Re).replace(te, "");
|
|
1878
1878
|
}
|
|
1879
1879
|
var ae = ge("toUpperCase");
|
|
1880
1880
|
function W(M, B, V) {
|
|
@@ -1898,8 +1898,8 @@ function bt() {
|
|
|
1898
1898
|
return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = i, ve.isJsDom = a, ve.isDeno = n, ve;
|
|
1899
1899
|
}
|
|
1900
1900
|
bt();
|
|
1901
|
-
const
|
|
1902
|
-
|
|
1901
|
+
const _ = {}, Ge = {};
|
|
1902
|
+
_.loadExternalScript = function(e) {
|
|
1903
1903
|
if (Ge[e])
|
|
1904
1904
|
return Ge[e];
|
|
1905
1905
|
const r = Ge[e] = new Promise(i);
|
|
@@ -1914,7 +1914,7 @@ I.loadExternalScript = function(e) {
|
|
|
1914
1914
|
return r;
|
|
1915
1915
|
};
|
|
1916
1916
|
const Vr = {};
|
|
1917
|
-
|
|
1917
|
+
_.loadExternalStyle = function(e) {
|
|
1918
1918
|
const r = new Promise(i);
|
|
1919
1919
|
function i(t, a) {
|
|
1920
1920
|
if (!document)
|
|
@@ -1929,7 +1929,7 @@ I.loadExternalStyle = function(e) {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
return r;
|
|
1931
1931
|
};
|
|
1932
|
-
|
|
1932
|
+
_.exists = function(e) {
|
|
1933
1933
|
var r;
|
|
1934
1934
|
if (Array.isArray(e) || e === 0)
|
|
1935
1935
|
return !0;
|
|
@@ -1951,7 +1951,7 @@ I.exists = function(e) {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
return !r;
|
|
1953
1953
|
};
|
|
1954
|
-
|
|
1954
|
+
_.parseDate = function(e) {
|
|
1955
1955
|
if (e) {
|
|
1956
1956
|
if (e instanceof Date)
|
|
1957
1957
|
return e;
|
|
@@ -1960,15 +1960,15 @@ I.parseDate = function(e) {
|
|
|
1960
1960
|
return r;
|
|
1961
1961
|
}
|
|
1962
1962
|
};
|
|
1963
|
-
|
|
1963
|
+
_.parseURL = function(e) {
|
|
1964
1964
|
if (!e)
|
|
1965
1965
|
return !1;
|
|
1966
1966
|
if (e.startsWith("/") || e.startsWith("://") || e.startsWith("mailto:") || e.startsWith("tel:") || e.startsWith("sms:"))
|
|
1967
1967
|
return e;
|
|
1968
|
-
var i =
|
|
1968
|
+
var i = _.parseEmail(e);
|
|
1969
1969
|
if (i && i === e)
|
|
1970
1970
|
return `mailto:${i}`;
|
|
1971
|
-
const t = (
|
|
1971
|
+
const t = (p) => /^https?:\/\//i.test(p) ? p : `http://${p}`;
|
|
1972
1972
|
e = t(e), e = e.replace(/\s/g, "");
|
|
1973
1973
|
var a = String(e).replace(/^https?:\/\//i, "").split(/[/?#]/)[0], n = a.lastIndexOf(":");
|
|
1974
1974
|
if (n !== -1) {
|
|
@@ -1978,30 +1978,30 @@ I.parseURL = function(e) {
|
|
|
1978
1978
|
}
|
|
1979
1979
|
if (!a)
|
|
1980
1980
|
return !1;
|
|
1981
|
-
var s = a.split("."),
|
|
1982
|
-
return /^\d{1,3}$/.test(
|
|
1981
|
+
var s = a.split("."), d = s.length === 4 && s.every(function(p) {
|
|
1982
|
+
return /^\d{1,3}$/.test(p);
|
|
1983
1983
|
});
|
|
1984
|
-
if (!
|
|
1984
|
+
if (!d) {
|
|
1985
1985
|
if (s.length < 2)
|
|
1986
1986
|
return !1;
|
|
1987
|
-
var c = s.every(function(
|
|
1988
|
-
return /^[a-z\d]([a-z\d-]*[a-z\d])?$/i.test(
|
|
1987
|
+
var c = s.every(function(p) {
|
|
1988
|
+
return /^[a-z\d]([a-z\d-]*[a-z\d])?$/i.test(p);
|
|
1989
1989
|
});
|
|
1990
1990
|
if (!c || !/^[a-z]{2,}$/i.test(s[s.length - 1]))
|
|
1991
1991
|
return !1;
|
|
1992
1992
|
}
|
|
1993
1993
|
return t(e);
|
|
1994
1994
|
};
|
|
1995
|
-
|
|
1995
|
+
_.parseNumber = function(e, r) {
|
|
1996
1996
|
if (!e || (e = Number(e), isNaN(e)))
|
|
1997
1997
|
return 0;
|
|
1998
1998
|
if (r) {
|
|
1999
1999
|
var i = e.toFixed(r);
|
|
2000
|
-
e =
|
|
2000
|
+
e = _.parseNumber(i);
|
|
2001
2001
|
}
|
|
2002
2002
|
return e;
|
|
2003
2003
|
};
|
|
2004
|
-
|
|
2004
|
+
_.isValidEmailAddress = function(e) {
|
|
2005
2005
|
var r = /^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;
|
|
2006
2006
|
if (!e) return !1;
|
|
2007
2007
|
var i = e.split("@");
|
|
@@ -2014,48 +2014,48 @@ I.isValidEmailAddress = function(e) {
|
|
|
2014
2014
|
return s.length > 63;
|
|
2015
2015
|
}) || !r.test(e));
|
|
2016
2016
|
};
|
|
2017
|
-
|
|
2017
|
+
_.parseEmail = function(e) {
|
|
2018
2018
|
if (!e)
|
|
2019
2019
|
return !1;
|
|
2020
|
-
var r = String(e).toLowerCase(), i =
|
|
2020
|
+
var r = String(e).toLowerCase(), i = _.isValidEmailAddress(r);
|
|
2021
2021
|
return i ? r : !1;
|
|
2022
2022
|
};
|
|
2023
|
-
|
|
2023
|
+
_.parseInt = function(e) {
|
|
2024
2024
|
return !e || (e = parseInt(e), isNaN(e)) ? 0 : e;
|
|
2025
2025
|
};
|
|
2026
|
-
|
|
2026
|
+
_.cleanValue = function(e, r, i) {
|
|
2027
2027
|
i || (i = {});
|
|
2028
|
-
var t =
|
|
2028
|
+
var t = _.exists(e);
|
|
2029
2029
|
if (i.strict && t && r != "boolean")
|
|
2030
2030
|
return e;
|
|
2031
2031
|
switch (r) {
|
|
2032
2032
|
case "reference":
|
|
2033
|
-
return
|
|
2033
|
+
return _.id(e, !0);
|
|
2034
2034
|
case "boolean":
|
|
2035
|
-
return
|
|
2035
|
+
return _.parseBoolean(e);
|
|
2036
2036
|
case "url":
|
|
2037
|
-
return
|
|
2037
|
+
return _.parseURL(e);
|
|
2038
2038
|
case "key":
|
|
2039
|
-
return
|
|
2039
|
+
return _.machineName(e);
|
|
2040
2040
|
case "email":
|
|
2041
|
-
return
|
|
2041
|
+
return _.parseEmail(e);
|
|
2042
2042
|
case "date":
|
|
2043
|
-
var a =
|
|
2043
|
+
var a = _.parseDate(e, i);
|
|
2044
2044
|
return a === void 0 ? void 0 : a;
|
|
2045
2045
|
case "number":
|
|
2046
2046
|
case "decimal":
|
|
2047
2047
|
case "float":
|
|
2048
|
-
var n =
|
|
2048
|
+
var n = _.parseNumber(e);
|
|
2049
2049
|
return String(n) == String(Number(e)) ? n : void 0;
|
|
2050
2050
|
case "integer":
|
|
2051
|
-
var n =
|
|
2051
|
+
var n = _.parseInt(e);
|
|
2052
2052
|
return String(n) == String(parseInt(e)) ? n : void 0;
|
|
2053
2053
|
case "group":
|
|
2054
2054
|
return e;
|
|
2055
2055
|
case "object":
|
|
2056
2056
|
return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
|
|
2057
2057
|
case "string":
|
|
2058
|
-
if (
|
|
2058
|
+
if (_.exists(e)) {
|
|
2059
2059
|
var s = String(e);
|
|
2060
2060
|
return s == "[object Object]" ? void 0 : s;
|
|
2061
2061
|
} else
|
|
@@ -2075,43 +2075,43 @@ I.cleanValue = function(e, r, i) {
|
|
|
2075
2075
|
return String(e);
|
|
2076
2076
|
}
|
|
2077
2077
|
};
|
|
2078
|
-
|
|
2079
|
-
var t =
|
|
2078
|
+
_.isValidValue = function(e, r, i) {
|
|
2079
|
+
var t = _.exists(e), a = typeof e == "number", n = !1;
|
|
2080
2080
|
if (!t)
|
|
2081
2081
|
return !1;
|
|
2082
2082
|
switch (r) {
|
|
2083
2083
|
case "url":
|
|
2084
|
-
i ? n = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : n = String(e) ===
|
|
2084
|
+
i ? n = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : n = String(e) === _.parseURL(e);
|
|
2085
2085
|
break;
|
|
2086
2086
|
case "key":
|
|
2087
|
-
n = String(e) ===
|
|
2087
|
+
n = String(e) === _.machineName(e);
|
|
2088
2088
|
break;
|
|
2089
2089
|
case "date":
|
|
2090
2090
|
if (i && (typeof e != "object" || !(e instanceof Date)))
|
|
2091
2091
|
return !1;
|
|
2092
|
-
var s =
|
|
2092
|
+
var s = _.parseDate(e);
|
|
2093
2093
|
return s !== void 0;
|
|
2094
2094
|
case "email":
|
|
2095
|
-
i ? n = e ===
|
|
2095
|
+
i ? n = e === _.parseEmail(e) : n = String(e).toLowerCase() === _.parseEmail(e);
|
|
2096
2096
|
break;
|
|
2097
2097
|
case "number":
|
|
2098
2098
|
case "decimal":
|
|
2099
2099
|
case "float":
|
|
2100
|
-
i ? n = a && Number(e) ===
|
|
2100
|
+
i ? n = a && Number(e) === _.parseNumber(e) : n = Number(e) === _.parseNumber(e);
|
|
2101
2101
|
break;
|
|
2102
2102
|
case "integer":
|
|
2103
|
-
i ? n = a && Number(e) ===
|
|
2103
|
+
i ? n = a && Number(e) === _.parseInt(e) : n = Number(e) === _.parseInt(e);
|
|
2104
2104
|
break;
|
|
2105
2105
|
case "boolean":
|
|
2106
|
-
var s =
|
|
2106
|
+
var s = _.parseBoolean(e);
|
|
2107
2107
|
i ? (e === !0 || e === !1) && (n = e === s) : n = s === !0 || s === !1;
|
|
2108
2108
|
break;
|
|
2109
2109
|
case "reference":
|
|
2110
|
-
i ? n = String(e) ===
|
|
2110
|
+
i ? n = String(e) === _.id(e) : n = !!_.id(e);
|
|
2111
2111
|
break;
|
|
2112
2112
|
case "string":
|
|
2113
|
-
var
|
|
2114
|
-
if (i && typeof e != "string" ||
|
|
2113
|
+
var d = String(e);
|
|
2114
|
+
if (i && typeof e != "string" || d == "[object Object]")
|
|
2115
2115
|
return !1;
|
|
2116
2116
|
n = !0;
|
|
2117
2117
|
break;
|
|
@@ -2127,7 +2127,7 @@ I.isValidValue = function(e, r, i) {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
return n;
|
|
2129
2129
|
};
|
|
2130
|
-
|
|
2130
|
+
_.parseBoolean = function(e) {
|
|
2131
2131
|
switch (String(e).toLowerCase()) {
|
|
2132
2132
|
case "true":
|
|
2133
2133
|
case "y":
|
|
@@ -2150,10 +2150,10 @@ I.parseBoolean = function(e) {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
return !!e;
|
|
2152
2152
|
};
|
|
2153
|
-
|
|
2153
|
+
_.clone = function(e) {
|
|
2154
2154
|
return JSON.parse(JSON.stringify(e));
|
|
2155
2155
|
};
|
|
2156
|
-
|
|
2156
|
+
_.getAllFields = function(e) {
|
|
2157
2157
|
const r = e.definesType === "profile" || e.key === "profile", i = e.definesType === "submission";
|
|
2158
2158
|
var t = [...e.fields], a = e.definedFields || [];
|
|
2159
2159
|
if (a.length)
|
|
@@ -2175,8 +2175,8 @@ I.getAllFields = function(e) {
|
|
|
2175
2175
|
key: "data",
|
|
2176
2176
|
asObject: !0,
|
|
2177
2177
|
type: "group",
|
|
2178
|
-
fields: a.map(function(
|
|
2179
|
-
return
|
|
2178
|
+
fields: a.map(function(p) {
|
|
2179
|
+
return p.type === "reference" && (p = JSON.parse(JSON.stringify(p)), delete p.fields), p;
|
|
2180
2180
|
})
|
|
2181
2181
|
};
|
|
2182
2182
|
t.push(s);
|
|
@@ -2205,38 +2205,38 @@ I.getAllFields = function(e) {
|
|
|
2205
2205
|
maximum: 1,
|
|
2206
2206
|
type: "date"
|
|
2207
2207
|
}));
|
|
2208
|
-
var
|
|
2209
|
-
var
|
|
2210
|
-
return !
|
|
2208
|
+
var d = _.mapFields(t).filter(function(c) {
|
|
2209
|
+
var p = c.type == "group" && c.asObject && c.minimum == 1 && c.maximum == 1;
|
|
2210
|
+
return !p;
|
|
2211
2211
|
}).map(function(c) {
|
|
2212
2212
|
return c.title = c.filterTitle || c.titles.filter(Boolean).join(" › "), c;
|
|
2213
|
-
}).sort(function(c,
|
|
2214
|
-
return c.title <
|
|
2213
|
+
}).sort(function(c, p) {
|
|
2214
|
+
return c.title < p.title ? -1 : 1;
|
|
2215
2215
|
});
|
|
2216
|
-
return
|
|
2216
|
+
return d;
|
|
2217
2217
|
};
|
|
2218
|
-
|
|
2218
|
+
_.mapFields = function(e, r) {
|
|
2219
2219
|
r || (r = {});
|
|
2220
|
-
var i = [], t = [], a = [], n = 1, s = r.depth,
|
|
2220
|
+
var i = [], t = [], a = [], n = 1, s = r.depth, d = r.arrayDelimeter || "[]";
|
|
2221
2221
|
e.forEach(c);
|
|
2222
|
-
function c(
|
|
2223
|
-
var g =
|
|
2224
|
-
m.trail = t.slice(), m.trail.push(g), m.path = m.trail.join("."), m.titles = a.slice(), m.titles.push(
|
|
2222
|
+
function c(p, S) {
|
|
2223
|
+
var g = p.key, u = p.type == "group", o = p.minimum === p.maximum && p.minimum === 1, f = p.asObject, w = u && !f, m = r.original ? p : _.clone(p);
|
|
2224
|
+
m.trail = t.slice(), m.trail.push(g), m.path = m.trail.join("."), m.titles = a.slice(), m.titles.push(p.filterTitle || p.title || ""), (!w || r.includeLayout) && i.push(m);
|
|
2225
2225
|
var v = s && n >= s;
|
|
2226
|
-
if (
|
|
2226
|
+
if (p.fields && p.fields.length)
|
|
2227
2227
|
if (w)
|
|
2228
|
-
|
|
2228
|
+
p.fields.forEach(c);
|
|
2229
2229
|
else {
|
|
2230
2230
|
if (v)
|
|
2231
2231
|
return;
|
|
2232
2232
|
n++;
|
|
2233
2233
|
let b = g;
|
|
2234
|
-
r.includeArrayDelimeter && (o || (b = `${g}${
|
|
2234
|
+
r.includeArrayDelimeter && (o || (b = `${g}${d}`)), t.push(b), a.push(p.filterTitle || p.title), p.fields.forEach(c), n--, t.pop(), a.pop();
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
2237
|
return i;
|
|
2238
2238
|
};
|
|
2239
|
-
|
|
2239
|
+
_.mapParameters = function(e) {
|
|
2240
2240
|
e = e || {};
|
|
2241
2241
|
var r = [];
|
|
2242
2242
|
return Object.entries(e).forEach(function([i, t]) {
|
|
@@ -2245,13 +2245,13 @@ I.mapParameters = function(e) {
|
|
|
2245
2245
|
}) : r.push(encodeURIComponent(i) + "=" + encodeURIComponent(t)));
|
|
2246
2246
|
}), r.join("&");
|
|
2247
2247
|
};
|
|
2248
|
-
|
|
2248
|
+
_.formatCurrency = function(e, r, i) {
|
|
2249
2249
|
(!e || isNaN(e)) && (e = 0), i = i || 2;
|
|
2250
|
-
var t =
|
|
2250
|
+
var t = _.currencySymbol(r);
|
|
2251
2251
|
return `${t}${parseFloat(Number(e) / 100).toFixed(i)}`;
|
|
2252
2252
|
};
|
|
2253
|
-
|
|
2254
|
-
if (e =
|
|
2253
|
+
_.getTypeFromID = function(e) {
|
|
2254
|
+
if (e = _.id(e), !e)
|
|
2255
2255
|
return;
|
|
2256
2256
|
const r = {
|
|
2257
2257
|
21: "organisation",
|
|
@@ -2314,7 +2314,7 @@ I.getTypeFromID = function(e) {
|
|
|
2314
2314
|
return r[i];
|
|
2315
2315
|
};
|
|
2316
2316
|
const St = { gbp: "£", eur: "€" };
|
|
2317
|
-
|
|
2317
|
+
_.currencySymbol = function(e) {
|
|
2318
2318
|
return St[String(e).toLowerCase()] || "$";
|
|
2319
2319
|
};
|
|
2320
2320
|
const wt = [
|
|
@@ -2325,9 +2325,9 @@ const wt = [
|
|
|
2325
2325
|
{ code: "nzd", countries: ["NZ"] },
|
|
2326
2326
|
{ code: "sgd", countries: ["SG"] }
|
|
2327
2327
|
];
|
|
2328
|
-
|
|
2328
|
+
_.getAvailableCurrencies = function(e) {
|
|
2329
2329
|
let r = wt.map(({ code: i, countries: t }) => ({
|
|
2330
|
-
name: `${i.toUpperCase()} (${
|
|
2330
|
+
name: `${i.toUpperCase()} (${_.currencySymbol(i)})`,
|
|
2331
2331
|
value: i,
|
|
2332
2332
|
countryCode: Object.fromEntries(t.map((a) => [a, !0]))
|
|
2333
2333
|
}));
|
|
@@ -2340,97 +2340,97 @@ I.getAvailableCurrencies = function(e) {
|
|
|
2340
2340
|
}
|
|
2341
2341
|
return r;
|
|
2342
2342
|
};
|
|
2343
|
-
|
|
2343
|
+
_.hash = function(e, r) {
|
|
2344
2344
|
return e = Array.isArray(e) ? e : [], e.reduce(function(i, t) {
|
|
2345
2345
|
const a = r ? je(t, r) : t;
|
|
2346
2346
|
return i[a] = t, i;
|
|
2347
2347
|
}, {});
|
|
2348
2348
|
};
|
|
2349
|
-
|
|
2349
|
+
_.extractFromArray = function(e, r, i, t, a, n, s) {
|
|
2350
2350
|
s = s || {}, i && (s.sum = i), t && (s.flatten = !0), a && (s.unique = !0), n && (s.excludeNull = !0);
|
|
2351
|
-
var
|
|
2352
|
-
var S = je(
|
|
2351
|
+
var d = e.reduce(function(c, p) {
|
|
2352
|
+
var S = je(p, r), g = !S && S !== !1 && S !== 0;
|
|
2353
2353
|
return s.excludeNull && g || c.push(S), c;
|
|
2354
2354
|
}, []);
|
|
2355
|
-
return s.flatten && (
|
|
2356
|
-
return c +
|
|
2357
|
-
}, 0)),
|
|
2355
|
+
return s.flatten && (d = d.flat()), s.unique && (d = [...new Set(d)]), s.sum && (d = d.reduce(function(c, p) {
|
|
2356
|
+
return c + p;
|
|
2357
|
+
}, 0)), d;
|
|
2358
2358
|
};
|
|
2359
|
-
|
|
2359
|
+
_.matchInArray = function(e, r, i, t) {
|
|
2360
2360
|
var a = e.filter(function(n) {
|
|
2361
|
-
var s = je(n, r),
|
|
2361
|
+
var s = je(n, r), d;
|
|
2362
2362
|
switch (t) {
|
|
2363
2363
|
case "in":
|
|
2364
|
-
|
|
2364
|
+
d = s.includes(i);
|
|
2365
2365
|
break;
|
|
2366
2366
|
case ">=":
|
|
2367
|
-
|
|
2367
|
+
d = s >= i;
|
|
2368
2368
|
break;
|
|
2369
2369
|
case "<=":
|
|
2370
|
-
|
|
2370
|
+
d = s <= i;
|
|
2371
2371
|
break;
|
|
2372
2372
|
case "<":
|
|
2373
|
-
|
|
2373
|
+
d = s < i;
|
|
2374
2374
|
break;
|
|
2375
2375
|
case ">":
|
|
2376
|
-
|
|
2376
|
+
d = s > i;
|
|
2377
2377
|
break;
|
|
2378
2378
|
case "==":
|
|
2379
2379
|
default:
|
|
2380
|
-
i === void 0 ?
|
|
2380
|
+
i === void 0 ? d = s : d = s == i;
|
|
2381
2381
|
break;
|
|
2382
2382
|
}
|
|
2383
|
-
return
|
|
2383
|
+
return d;
|
|
2384
2384
|
});
|
|
2385
2385
|
return a;
|
|
2386
2386
|
};
|
|
2387
|
-
|
|
2387
|
+
_.comma = function(e, r, i) {
|
|
2388
2388
|
return i && (e = e.slice(0, i)), e.filter(function(t) {
|
|
2389
2389
|
return t != null && t !== void 0 && t !== "";
|
|
2390
2390
|
}).map(function(t) {
|
|
2391
2391
|
return r && r.length ? je(t, r) : t;
|
|
2392
2392
|
}).join(", ");
|
|
2393
2393
|
};
|
|
2394
|
-
|
|
2394
|
+
_.id = function(e) {
|
|
2395
2395
|
if (e) {
|
|
2396
2396
|
var r;
|
|
2397
2397
|
e._id ? r = String(e._id) : r = String(e);
|
|
2398
|
-
var i =
|
|
2398
|
+
var i = _.isValidID(r);
|
|
2399
2399
|
if (i)
|
|
2400
2400
|
return r;
|
|
2401
2401
|
}
|
|
2402
2402
|
};
|
|
2403
|
-
|
|
2403
|
+
_.ids = function(e) {
|
|
2404
2404
|
if (!e)
|
|
2405
2405
|
return [];
|
|
2406
2406
|
var r = Object.keys(
|
|
2407
2407
|
e.reduce(function(i, t) {
|
|
2408
2408
|
if (!t)
|
|
2409
2409
|
return i;
|
|
2410
|
-
var a =
|
|
2410
|
+
var a = _.id(t);
|
|
2411
2411
|
return a && (i[a] = 1), i;
|
|
2412
2412
|
}, {})
|
|
2413
2413
|
);
|
|
2414
2414
|
return r;
|
|
2415
2415
|
};
|
|
2416
|
-
|
|
2416
|
+
_.isValidID = function(e) {
|
|
2417
2417
|
var r = new RegExp("^[0-9a-fA-F]{24}$");
|
|
2418
2418
|
return r.test(String(e));
|
|
2419
2419
|
};
|
|
2420
|
-
|
|
2420
|
+
_.errorMessage = function(e) {
|
|
2421
2421
|
if (!e)
|
|
2422
2422
|
return;
|
|
2423
2423
|
Array.isArray(e) && (e = e[0]);
|
|
2424
2424
|
let r = e?.response?.data?.message || (typeof e?.response?.data == "string" ? e.response.data : null) || e?.message || null;
|
|
2425
2425
|
return Array.isArray(r) && (r = r[0]), r || JSON.stringify(e);
|
|
2426
2426
|
};
|
|
2427
|
-
|
|
2427
|
+
_.guid = function() {
|
|
2428
2428
|
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
2429
2429
|
const r = Math.random() * 16 | 0;
|
|
2430
2430
|
return (e === "x" ? r : r & 3 | 8).toString(16);
|
|
2431
2431
|
});
|
|
2432
2432
|
};
|
|
2433
|
-
|
|
2433
|
+
_.machineName = function(e) {
|
|
2434
2434
|
if (!(!e || !e.length)) {
|
|
2435
2435
|
var r = /[^a-zA-Z0-9-_]+/g;
|
|
2436
2436
|
return String(e).replace(r, " ").split("_").map((i) => At(i)).join("_");
|
|
@@ -2438,11 +2438,11 @@ I.machineName = function(e) {
|
|
|
2438
2438
|
};
|
|
2439
2439
|
function De() {
|
|
2440
2440
|
const e = /* @__PURE__ */ new Map(), r = {
|
|
2441
|
-
dispatch(i, t) {
|
|
2441
|
+
dispatch(i, ...t) {
|
|
2442
2442
|
const a = e.get(i);
|
|
2443
2443
|
if (a)
|
|
2444
2444
|
for (const n of a)
|
|
2445
|
-
n(t);
|
|
2445
|
+
n(...t);
|
|
2446
2446
|
},
|
|
2447
2447
|
addEventListener(i, t) {
|
|
2448
2448
|
if (typeof t != "function")
|
|
@@ -2665,157 +2665,159 @@ var Pt = function(e) {
|
|
|
2665
2665
|
});
|
|
2666
2666
|
const a = new De();
|
|
2667
2667
|
a.bootstrap(t);
|
|
2668
|
-
function n(
|
|
2668
|
+
function n(d) {
|
|
2669
2669
|
var c = r.getUser();
|
|
2670
|
-
t.onChange && t.onChange(c), a.dispatch("change", c,
|
|
2670
|
+
t.onChange && t.onChange(c, d), a.dispatch("change", c, d);
|
|
2671
2671
|
}
|
|
2672
|
-
t.set = function(
|
|
2672
|
+
t.set = function(d, c, p) {
|
|
2673
2673
|
const S = r.getUser();
|
|
2674
|
-
if (JSON.stringify(S) != JSON.stringify(
|
|
2674
|
+
if (JSON.stringify(S) != JSON.stringify(d) && (r.setUser(d), !p))
|
|
2675
2675
|
return n(c);
|
|
2676
2676
|
}, t.logout = function() {
|
|
2677
2677
|
return r.clearUser(), e.cache.reset(), n();
|
|
2678
|
-
}, t.changeOrganisation = function(
|
|
2679
|
-
|
|
2680
|
-
var
|
|
2681
|
-
return c.disableAutoAuthentication && (
|
|
2682
|
-
e.api.post(`/user/switch/${
|
|
2683
|
-
|
|
2678
|
+
}, t.changeOrganisation = function(d, c) {
|
|
2679
|
+
d = e.utils.id(d), c || (c = {});
|
|
2680
|
+
var p = !0;
|
|
2681
|
+
return c.disableAutoAuthentication && (p = !1), new Promise(function(S, g) {
|
|
2682
|
+
e.api.post(`/user/switch/${d}`).then(function(u) {
|
|
2683
|
+
p && (e.cache.reset(), t.set(u.data)), S(u.data);
|
|
2684
2684
|
}).catch(g);
|
|
2685
2685
|
});
|
|
2686
|
-
}, t.impersonate = function(
|
|
2687
|
-
|
|
2688
|
-
var
|
|
2689
|
-
c.disableAutoAuthentication && (
|
|
2690
|
-
var S =
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2686
|
+
}, t.impersonate = function(d, c) {
|
|
2687
|
+
d = e.utils.id(d), c || (c = {});
|
|
2688
|
+
var p = !0;
|
|
2689
|
+
c.disableAutoAuthentication && (p = !1);
|
|
2690
|
+
var S = { persona: d };
|
|
2691
|
+
c.application && (S.application = e.utils.id(c.application));
|
|
2692
|
+
var g = e.api.post("/user/impersonate", S);
|
|
2693
|
+
return g.then(function(u) {
|
|
2694
|
+
p && (e.cache.reset(), t.set(u.data));
|
|
2695
|
+
}, function(u) {
|
|
2696
|
+
}), g;
|
|
2697
|
+
}, t.login = async function(d, c) {
|
|
2696
2698
|
c || (c = {});
|
|
2697
|
-
var
|
|
2698
|
-
c.disableAutoAuthentication && (
|
|
2699
|
+
var p = !0;
|
|
2700
|
+
c.disableAutoAuthentication && (p = !1);
|
|
2699
2701
|
var S = new Promise(g);
|
|
2700
2702
|
function g(u, o) {
|
|
2701
|
-
if (!
|
|
2703
|
+
if (!d)
|
|
2702
2704
|
return o({
|
|
2703
2705
|
message: "Login requires an email and password"
|
|
2704
2706
|
});
|
|
2705
|
-
if (!
|
|
2707
|
+
if (!d.email || !d.email.length)
|
|
2706
2708
|
return o({
|
|
2707
2709
|
message: "An email address is required to log in"
|
|
2708
2710
|
});
|
|
2709
|
-
if (!
|
|
2711
|
+
if (!d.password || !d.password.length)
|
|
2710
2712
|
return o({
|
|
2711
2713
|
message: "A password is required to log in"
|
|
2712
2714
|
});
|
|
2713
|
-
var
|
|
2715
|
+
var f = {
|
|
2714
2716
|
bypassInterceptor: !0
|
|
2715
2717
|
};
|
|
2716
|
-
r.isCookieMode && r.isCookieMode() && (
|
|
2718
|
+
r.isCookieMode && r.isCookieMode() && (d.useCookies = !0, f.withCredentials = !0);
|
|
2717
2719
|
var m = `${e.apiURL}/user/login`;
|
|
2718
|
-
c.url && (m = c.url), e.api.post(m,
|
|
2719
|
-
|
|
2720
|
+
c.url && (m = c.url), e.api.post(m, d, f).then(function(l) {
|
|
2721
|
+
p && !(l.data && l.data.mfa) && t.set(l.data), u(l);
|
|
2720
2722
|
}, o);
|
|
2721
2723
|
}
|
|
2722
2724
|
return S;
|
|
2723
|
-
}, t.signup = async function(
|
|
2725
|
+
}, t.signup = async function(d, c) {
|
|
2724
2726
|
c || (c = {});
|
|
2725
|
-
var
|
|
2726
|
-
c.disableAutoAuthentication && (
|
|
2727
|
+
var p = !0;
|
|
2728
|
+
c.disableAutoAuthentication && (p = !1);
|
|
2727
2729
|
var S = new Promise(g);
|
|
2728
2730
|
function g(u, o) {
|
|
2729
|
-
if (!
|
|
2731
|
+
if (!d)
|
|
2730
2732
|
return o({
|
|
2731
2733
|
message: "Signup details are required"
|
|
2732
2734
|
});
|
|
2733
|
-
if (!
|
|
2735
|
+
if (!d.firstName || !d.firstName.length)
|
|
2734
2736
|
return o({
|
|
2735
2737
|
message: "Please provide a first name"
|
|
2736
2738
|
});
|
|
2737
|
-
if (!
|
|
2739
|
+
if (!d.lastName || !d.lastName.length)
|
|
2738
2740
|
return o({
|
|
2739
2741
|
message: "Please provide a last name"
|
|
2740
2742
|
});
|
|
2741
|
-
if (!
|
|
2743
|
+
if (!d.email || !d.email.length)
|
|
2742
2744
|
return o({
|
|
2743
2745
|
message: "An email address is required to sign up"
|
|
2744
2746
|
});
|
|
2745
|
-
if (!
|
|
2747
|
+
if (!d.password || !d.password.length)
|
|
2746
2748
|
return o({
|
|
2747
2749
|
message: "A password is required to sign up"
|
|
2748
2750
|
});
|
|
2749
|
-
if (!
|
|
2751
|
+
if (!d.confirmPassword || !d.confirmPassword.length)
|
|
2750
2752
|
return o({
|
|
2751
2753
|
message: "Please confirm your password"
|
|
2752
2754
|
});
|
|
2753
|
-
if (
|
|
2755
|
+
if (d.confirmPassword != d.password)
|
|
2754
2756
|
return o({
|
|
2755
2757
|
message: "Password and confirmation do not match"
|
|
2756
2758
|
});
|
|
2757
|
-
var
|
|
2759
|
+
var f = {
|
|
2758
2760
|
bypassInterceptor: !0
|
|
2759
2761
|
};
|
|
2760
|
-
r.isCookieMode && r.isCookieMode() && (
|
|
2762
|
+
r.isCookieMode && r.isCookieMode() && (d.useCookies = !0, f.withCredentials = !0);
|
|
2761
2763
|
var m = `${e.apiURL}/user/signup`;
|
|
2762
|
-
c.application && (m = `${e.domain || ""}/qik/application/signup`), c.url && (m = c.url), e.api.post(m,
|
|
2763
|
-
|
|
2764
|
+
c.application && (m = `${e.domain || ""}/qik/application/signup`), c.url && (m = c.url), e.api.post(m, d, f).then(function(l) {
|
|
2765
|
+
p && t.set(l.data), u(l);
|
|
2764
2766
|
}, o);
|
|
2765
2767
|
}
|
|
2766
2768
|
return S;
|
|
2767
|
-
}, t.retrieveUserFromResetToken = async function(
|
|
2769
|
+
}, t.retrieveUserFromResetToken = async function(d, c) {
|
|
2768
2770
|
c || (c = {});
|
|
2769
|
-
var
|
|
2771
|
+
var p = {
|
|
2770
2772
|
bypassInterceptor: !0
|
|
2771
2773
|
};
|
|
2772
2774
|
return new Promise(function(S, g) {
|
|
2773
|
-
e.api.get(c.url || `${e.apiURL}/user/reset/${
|
|
2775
|
+
e.api.get(c.url || `${e.apiURL}/user/reset/${d}`, p).then(function(u) {
|
|
2774
2776
|
return S(u.data);
|
|
2775
2777
|
}, g);
|
|
2776
2778
|
});
|
|
2777
|
-
}, t.updateUserWithToken = async function(
|
|
2778
|
-
|
|
2779
|
+
}, t.updateUserWithToken = async function(d, c, p) {
|
|
2780
|
+
p || (p = {});
|
|
2779
2781
|
var S = !0;
|
|
2780
|
-
return
|
|
2782
|
+
return p.disableAutoAuthentication && (S = !1), new Promise(function(g, u) {
|
|
2781
2783
|
var o = {
|
|
2782
2784
|
bypassInterceptor: !0
|
|
2783
2785
|
};
|
|
2784
|
-
e.api.post(
|
|
2785
|
-
return S && (e.cache.reset(), t.set(
|
|
2786
|
+
e.api.post(p.url || `${e.apiURL}/user/reset/${d}`, c, o).then(function(f) {
|
|
2787
|
+
return S && (e.cache.reset(), t.set(f.data)), g(f.data);
|
|
2786
2788
|
}, u);
|
|
2787
2789
|
});
|
|
2788
|
-
}, t.sendResetPasswordRequest = function(
|
|
2789
|
-
return c || (c = {}),
|
|
2790
|
+
}, t.sendResetPasswordRequest = function(d, c) {
|
|
2791
|
+
return c || (c = {}), d ? !d.email || !d.email.length ? Promise.reject({
|
|
2790
2792
|
message: "An email address is required for password reset"
|
|
2791
|
-
}) : new Promise(function(
|
|
2793
|
+
}) : new Promise(function(p, S) {
|
|
2792
2794
|
var g = {
|
|
2793
2795
|
bypassInterceptor: !0
|
|
2794
2796
|
};
|
|
2795
|
-
e.api.post(c.url || `${e.apiURL}/user/forgot`,
|
|
2797
|
+
e.api.post(c.url || `${e.apiURL}/user/forgot`, d, g).then(p, S);
|
|
2796
2798
|
}) : Promise.reject({
|
|
2797
2799
|
message: "Please provide your account details to reset your password"
|
|
2798
2800
|
});
|
|
2799
|
-
}, t.ensureValidToken = async function(
|
|
2801
|
+
}, t.ensureValidToken = async function(d) {
|
|
2800
2802
|
var c = t.getCurrentUser();
|
|
2801
2803
|
if (!c)
|
|
2802
2804
|
return Promise.reject(new Error("No user"));
|
|
2803
2805
|
if (r.isCookieMode && r.isCookieMode())
|
|
2804
|
-
return
|
|
2806
|
+
return d ? await t.refreshAccessToken() : "cookie_mode_token";
|
|
2805
2807
|
var { token: S } = c;
|
|
2806
2808
|
if (!S)
|
|
2807
2809
|
return Promise.reject("No token");
|
|
2808
2810
|
var g = /* @__PURE__ */ new Date();
|
|
2809
2811
|
g.setSeconds(g.getSeconds() + i);
|
|
2810
2812
|
var u = new Date(S.expires);
|
|
2811
|
-
return
|
|
2813
|
+
return d ? await t.refreshAccessToken(S.refreshToken) : g < u ? S : await t.refreshAccessToken(S.refreshToken);
|
|
2812
2814
|
};
|
|
2813
2815
|
const s = {};
|
|
2814
|
-
return t.refreshAccessToken = async function(
|
|
2816
|
+
return t.refreshAccessToken = async function(d) {
|
|
2815
2817
|
if (s.inflightRefreshRequest)
|
|
2816
2818
|
return s.inflightRefreshRequest;
|
|
2817
2819
|
const c = r.isCookieMode && r.isCookieMode();
|
|
2818
|
-
return s.inflightRefreshRequest = new Promise(function(
|
|
2820
|
+
return s.inflightRefreshRequest = new Promise(function(p, S) {
|
|
2819
2821
|
let g = {}, u = {
|
|
2820
2822
|
bypassInterceptor: !0,
|
|
2821
2823
|
withoutToken: !0
|
|
@@ -2823,18 +2825,18 @@ var Pt = function(e) {
|
|
|
2823
2825
|
if (c)
|
|
2824
2826
|
u.withCredentials = !0;
|
|
2825
2827
|
else {
|
|
2826
|
-
if (!
|
|
2828
|
+
if (!d)
|
|
2827
2829
|
return s.inflightRefreshRequest = null, S(new Error("No refresh token provided for localStorage mode"));
|
|
2828
|
-
g.refreshToken =
|
|
2830
|
+
g.refreshToken = d;
|
|
2829
2831
|
}
|
|
2830
|
-
e.api.post("/user/refresh", g, u).then(function(
|
|
2831
|
-
if (!
|
|
2832
|
+
e.api.post("/user/refresh", g, u).then(function(f) {
|
|
2833
|
+
if (!f || !f.data)
|
|
2832
2834
|
return s.inflightRefreshRequest = null, S(new Error("Invalid refresh response"));
|
|
2833
|
-
if (t.set(
|
|
2834
|
-
|
|
2835
|
+
if (t.set(f.data), n(), c)
|
|
2836
|
+
p("cookie_token_refreshed");
|
|
2835
2837
|
else {
|
|
2836
|
-
const w =
|
|
2837
|
-
w ?
|
|
2838
|
+
const w = f.data.token?.accessToken;
|
|
2839
|
+
w ? p(w) : S(new Error("No access token in refresh response"));
|
|
2838
2840
|
}
|
|
2839
2841
|
setTimeout(function() {
|
|
2840
2842
|
s.inflightRefreshRequest = null;
|
|
@@ -2845,44 +2847,44 @@ var Pt = function(e) {
|
|
|
2845
2847
|
}), S(o);
|
|
2846
2848
|
});
|
|
2847
2849
|
}), s.inflightRefreshRequest;
|
|
2848
|
-
}, t.sync = function() {
|
|
2849
|
-
return e.api.get("/user").then(function(
|
|
2850
|
-
if (
|
|
2851
|
-
const
|
|
2852
|
-
if (
|
|
2853
|
-
const
|
|
2854
|
-
|
|
2850
|
+
}, t.sync = function(d) {
|
|
2851
|
+
return d = d || {}, e.api.get("/user").then(function(c) {
|
|
2852
|
+
if (c.data) {
|
|
2853
|
+
const p = r.getUser();
|
|
2854
|
+
if (p) {
|
|
2855
|
+
const S = { ...p };
|
|
2856
|
+
S.session ? Object.assign(S.session, c.data) : S.session = c.data, t.set(S);
|
|
2855
2857
|
} else
|
|
2856
|
-
t.set(
|
|
2858
|
+
t.set(c.data);
|
|
2857
2859
|
} else
|
|
2858
2860
|
t.set(null);
|
|
2859
2861
|
n();
|
|
2860
|
-
}).catch(function(
|
|
2861
|
-
t.set(null), n();
|
|
2862
|
+
}).catch(function(c) {
|
|
2863
|
+
d.keepOnError || (t.set(null), n());
|
|
2862
2864
|
});
|
|
2863
2865
|
}, t.getCurrentUser = function() {
|
|
2864
2866
|
return r.getUser();
|
|
2865
2867
|
}, t.getCurrentToken = function() {
|
|
2866
|
-
var
|
|
2867
|
-
if (
|
|
2868
|
-
return
|
|
2868
|
+
var d = r.getAccessToken();
|
|
2869
|
+
if (d)
|
|
2870
|
+
return d;
|
|
2869
2871
|
var c = t.getCurrentUser();
|
|
2870
2872
|
if (!c)
|
|
2871
2873
|
return e.applicationToken ? e.applicationToken : void 0;
|
|
2872
|
-
var { token:
|
|
2873
|
-
if (
|
|
2874
|
-
return
|
|
2874
|
+
var { token: p } = c;
|
|
2875
|
+
if (p)
|
|
2876
|
+
return p.accessToken;
|
|
2875
2877
|
}, e.api.interceptors.request.use(
|
|
2876
|
-
async function(
|
|
2877
|
-
if (
|
|
2878
|
-
return
|
|
2879
|
-
var c =
|
|
2878
|
+
async function(d) {
|
|
2879
|
+
if (d.bypassInterceptor)
|
|
2880
|
+
return d;
|
|
2881
|
+
var c = d;
|
|
2880
2882
|
if (r.isCookieMode && r.isCookieMode())
|
|
2881
2883
|
return c.withCredentials || (c.withCredentials = !0), c;
|
|
2882
2884
|
var S = t.getCurrentUser(), g, u, o;
|
|
2883
2885
|
if (S) {
|
|
2884
|
-
var { token:
|
|
2885
|
-
|
|
2886
|
+
var { token: f } = S;
|
|
2887
|
+
f && (g = f.accessToken, u = f.refreshToken, o = f.expires);
|
|
2886
2888
|
}
|
|
2887
2889
|
if (g)
|
|
2888
2890
|
c.headers.Authorization = `Bearer ${g}`;
|
|
@@ -2901,19 +2903,19 @@ var Pt = function(e) {
|
|
|
2901
2903
|
});
|
|
2902
2904
|
});
|
|
2903
2905
|
},
|
|
2904
|
-
function(
|
|
2905
|
-
return Promise.reject(
|
|
2906
|
+
function(d) {
|
|
2907
|
+
return Promise.reject(d);
|
|
2906
2908
|
}
|
|
2907
|
-
), e.api.interceptors.response.use(function(
|
|
2908
|
-
return
|
|
2909
|
-
}, function(
|
|
2910
|
-
var c =
|
|
2909
|
+
), e.api.interceptors.response.use(function(d) {
|
|
2910
|
+
return d;
|
|
2911
|
+
}, function(d) {
|
|
2912
|
+
var c = d && d.response && d.response.status || d.status;
|
|
2911
2913
|
switch (c) {
|
|
2912
2914
|
case 401:
|
|
2913
2915
|
t.logout();
|
|
2914
2916
|
break;
|
|
2915
2917
|
}
|
|
2916
|
-
return Promise.reject(
|
|
2918
|
+
return Promise.reject(d);
|
|
2917
2919
|
}), t;
|
|
2918
2920
|
}, q = {};
|
|
2919
2921
|
function pr(e) {
|
|
@@ -2926,7 +2928,7 @@ function Wr(e) {
|
|
|
2926
2928
|
return !pr(e);
|
|
2927
2929
|
}
|
|
2928
2930
|
q.cleanKey = function(e) {
|
|
2929
|
-
return e = String(e).split("|")[0], e[0] == "." && (e = e.slice(1)), e;
|
|
2931
|
+
return e == null ? "" : (e = String(e).split("|")[0], e[0] == "." && (e = e.slice(1)), e);
|
|
2930
2932
|
};
|
|
2931
2933
|
q.isValidFilter = function(e) {
|
|
2932
2934
|
if (!e)
|
|
@@ -2971,8 +2973,8 @@ q.activeFilterKeys = function(e, r) {
|
|
|
2971
2973
|
var i = q.activeFilters(e), t = i.filter(function(n) {
|
|
2972
2974
|
return !n.operator;
|
|
2973
2975
|
}).reduce(function(n, s) {
|
|
2974
|
-
var
|
|
2975
|
-
return r.trimArrayDelimeters !== !1 && (
|
|
2976
|
+
var d = q.cleanKey(s.key);
|
|
2977
|
+
return r.trimArrayDelimeters !== !1 && (d = d.split("[]").join("")), n[d] = !0, n;
|
|
2976
2978
|
}, {}), a = Object.keys(t);
|
|
2977
2979
|
return a;
|
|
2978
2980
|
};
|
|
@@ -3022,8 +3024,8 @@ function Ot(e) {
|
|
|
3022
3024
|
return n.extension?.length && (n.extension.includes(".") ? s = `${s}/${n.extension}` : s = `${s}/${i}.${n.extension}`), e.api.generateEndpointURL(s, a, n);
|
|
3023
3025
|
}, r.filesize = function(i, t) {
|
|
3024
3026
|
if (i == 0) return "0 Bytes";
|
|
3025
|
-
var a = 1024, n = t || 2, s = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
|
|
3026
|
-
return parseFloat((i / Math.pow(a,
|
|
3027
|
+
var a = 1024, n = t || 2, s = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], d = Math.floor(Math.log(i) / Math.log(a));
|
|
3028
|
+
return parseFloat((i / Math.pow(a, d)).toFixed(n)) + " " + s[d];
|
|
3027
3029
|
}, r.getBinaryTypeFromMime = function(i) {
|
|
3028
3030
|
if (!i)
|
|
3029
3031
|
return "file";
|
|
@@ -3066,8 +3068,12 @@ function Ot(e) {
|
|
|
3066
3068
|
var Ue = {}, Ct = {
|
|
3067
3069
|
///////////////////////////////////////////////////
|
|
3068
3070
|
/**
|
|
3069
|
-
*
|
|
3070
|
-
*
|
|
3071
|
+
* Empties every cache created with sdk.cache.get (the caches themselves stay available, just empty).
|
|
3072
|
+
* sdk.auth.logout() and sdk.auth.changeOrganisation() call this for you.
|
|
3073
|
+
* @alias cache.reset
|
|
3074
|
+
* @returns {undefined}
|
|
3075
|
+
* @example
|
|
3076
|
+
* sdk.cache.reset();
|
|
3071
3077
|
*/
|
|
3072
3078
|
reset() {
|
|
3073
3079
|
Object.entries(Ue).forEach(([e, r]) => {
|
|
@@ -3076,10 +3082,21 @@ var Ue = {}, Ct = {
|
|
|
3076
3082
|
},
|
|
3077
3083
|
///////////////////////////////////////////////////
|
|
3078
3084
|
/**
|
|
3079
|
-
*
|
|
3080
|
-
*
|
|
3081
|
-
* @
|
|
3082
|
-
* @
|
|
3085
|
+
* Returns the cache with this name, creating it the first time. Later calls with the same name return the
|
|
3086
|
+
* same cache, whatever options they pass.
|
|
3087
|
+
* @alias cache.get
|
|
3088
|
+
* @param {String} key The cache's name.
|
|
3089
|
+
* @param {Object} [options] lru-cache options, used only when the cache is created. Default { max: 5 } (five entries).
|
|
3090
|
+
* @param {Number} [options.max] Maximum number of entries.
|
|
3091
|
+
* @param {Number} [options.ttl] Milliseconds before an entry expires.
|
|
3092
|
+
* @returns {LRUCache} An lru-cache instance: get(key), set(key, value), has(key), delete(key), clear().
|
|
3093
|
+
* @example
|
|
3094
|
+
* const cache = sdk.cache.get('people', { max: 500, ttl: 60000 });
|
|
3095
|
+
* let person = cache.get(id);
|
|
3096
|
+
* if (!person) {
|
|
3097
|
+
* person = await sdk.content.get(id);
|
|
3098
|
+
* cache.set(id, person);
|
|
3099
|
+
* }
|
|
3083
3100
|
*/
|
|
3084
3101
|
get(e, r) {
|
|
3085
3102
|
return r = r || { max: 5 }, Ue[e] || (Ue[e] = new qr(r)), Ue[e];
|
|
@@ -3102,10 +3119,10 @@ var Ue = {}, Ct = {
|
|
|
3102
3119
|
}, r.getAllDescendants = function(a) {
|
|
3103
3120
|
var n = /* @__PURE__ */ new Set();
|
|
3104
3121
|
s(a);
|
|
3105
|
-
function s(
|
|
3106
|
-
var c = e.utils.id(
|
|
3107
|
-
n.add(c), (
|
|
3108
|
-
s(
|
|
3122
|
+
function s(d) {
|
|
3123
|
+
var c = e.utils.id(d);
|
|
3124
|
+
n.add(c), (d.children || []).forEach(function(p) {
|
|
3125
|
+
s(p);
|
|
3109
3126
|
});
|
|
3110
3127
|
}
|
|
3111
3128
|
return Array.from(n);
|
|
@@ -3116,13 +3133,13 @@ var Ue = {}, Ct = {
|
|
|
3116
3133
|
if (n && t && t.key === n && Date.now() - t.at < i)
|
|
3117
3134
|
return t.value;
|
|
3118
3135
|
var s = /* @__PURE__ */ new Map();
|
|
3119
|
-
for (var
|
|
3120
|
-
var c = a?.permissions[
|
|
3136
|
+
for (var d in a?.permissions || {}) {
|
|
3137
|
+
var c = a?.permissions[d], p = r.getAllDescendants(c);
|
|
3121
3138
|
(c.permissions || []).forEach(function(g) {
|
|
3122
3139
|
var u = s.get(g);
|
|
3123
3140
|
u || (u = /* @__PURE__ */ new Set(), s.set(g, u));
|
|
3124
|
-
for (var o = 0; o <
|
|
3125
|
-
u.add(
|
|
3141
|
+
for (var o = 0; o < p.length; o++)
|
|
3142
|
+
u.add(p[o]);
|
|
3126
3143
|
});
|
|
3127
3144
|
}
|
|
3128
3145
|
var S = {};
|
|
@@ -3131,50 +3148,50 @@ var Ue = {}, Ct = {
|
|
|
3131
3148
|
}), n && (t = { key: n, value: S, at: Date.now() }), S;
|
|
3132
3149
|
}, r.allUserScopes = function(a) {
|
|
3133
3150
|
var n = {}, s = a?.permissions || {};
|
|
3134
|
-
function
|
|
3135
|
-
if (
|
|
3136
|
-
var S = e.utils.id(
|
|
3137
|
-
S && (n[S] = 1,
|
|
3138
|
-
|
|
3151
|
+
function d(p) {
|
|
3152
|
+
if (p) {
|
|
3153
|
+
var S = e.utils.id(p);
|
|
3154
|
+
S && (n[S] = 1, p.children && p.children.length && p.children.forEach(function(g) {
|
|
3155
|
+
d(g);
|
|
3139
3156
|
}));
|
|
3140
3157
|
}
|
|
3141
3158
|
}
|
|
3142
3159
|
for (var c in s)
|
|
3143
|
-
|
|
3160
|
+
d(s[c]);
|
|
3144
3161
|
return Object.keys(n);
|
|
3145
|
-
}, r.actionableScopes = function(a, n, s,
|
|
3162
|
+
}, r.actionableScopes = function(a, n, s, d, c) {
|
|
3146
3163
|
c = c || {};
|
|
3147
|
-
var
|
|
3164
|
+
var p = [];
|
|
3148
3165
|
if (a?.userType == "administrator")
|
|
3149
|
-
|
|
3166
|
+
p = r.allUserScopes(a, c);
|
|
3150
3167
|
else {
|
|
3151
|
-
var S = r.hashPermissions(a), g = s ||
|
|
3168
|
+
var S = r.hashPermissions(a), g = s || d;
|
|
3152
3169
|
if (!g)
|
|
3153
|
-
return
|
|
3154
|
-
let u = s ? S[`${s}.${n}`] || [] : [], o =
|
|
3155
|
-
|
|
3170
|
+
return p;
|
|
3171
|
+
let u = s ? S[`${s}.${n}`] || [] : [], o = d ? S[`${d}.${n}`] || [] : [];
|
|
3172
|
+
p = [...u, ...o];
|
|
3156
3173
|
}
|
|
3157
|
-
return
|
|
3174
|
+
return p || [];
|
|
3158
3175
|
}, r.isOwner = function(a, n) {
|
|
3159
|
-
var s = e.utils.id(a),
|
|
3176
|
+
var s = e.utils.id(a), d = e.utils.id(a?.persona), c = n.meta;
|
|
3160
3177
|
if (!c)
|
|
3161
3178
|
return !1;
|
|
3162
|
-
var
|
|
3179
|
+
var p = c.userOwners || [], S = e.utils.ids([...p, c.userAuthor]), g = e.utils.hash(S);
|
|
3163
3180
|
if (g[s])
|
|
3164
3181
|
return !0;
|
|
3165
3182
|
var u = c.personaOwners || [], o = e.utils.ids([
|
|
3166
3183
|
...u,
|
|
3167
3184
|
c.personaAuthor
|
|
3168
|
-
]),
|
|
3169
|
-
return
|
|
3185
|
+
]), f = e.utils.hash(o);
|
|
3186
|
+
return f[d] ? !0 : r.isAssignee(a, n);
|
|
3170
3187
|
}, r.isAssignee = function(a, n) {
|
|
3171
3188
|
const s = e.utils.ids(a?.profiles);
|
|
3172
3189
|
if (!s.length)
|
|
3173
3190
|
return !1;
|
|
3174
|
-
const
|
|
3175
|
-
if (!
|
|
3191
|
+
const d = e.utils.ids(n.assignees);
|
|
3192
|
+
if (!d.length)
|
|
3176
3193
|
return !1;
|
|
3177
|
-
const c = new Set(
|
|
3194
|
+
const c = new Set(d);
|
|
3178
3195
|
return !!s.filter((g) => c.has(g)).length;
|
|
3179
3196
|
}, r.allPermissions = function(a) {
|
|
3180
3197
|
var n = Object.values(a?.permissions || {}).map(function(s) {
|
|
@@ -3182,61 +3199,61 @@ var Ue = {}, Ct = {
|
|
|
3182
3199
|
}).flat();
|
|
3183
3200
|
return n;
|
|
3184
3201
|
}, r.allPermissionTypes = function(a, n) {
|
|
3185
|
-
return n ? r.allPermissions(a).reduce(function(s,
|
|
3186
|
-
var c =
|
|
3202
|
+
return n ? r.allPermissions(a).reduce(function(s, d) {
|
|
3203
|
+
var c = d.split(".")[0];
|
|
3187
3204
|
return s[c] = !0, s;
|
|
3188
3205
|
}, {}) : r.allPermissions(a).map(function(s) {
|
|
3189
3206
|
return s.split(".")[0];
|
|
3190
3207
|
});
|
|
3191
3208
|
}, r.canKnowOf = function(a, n, s) {
|
|
3192
3209
|
return s = s || {}, s.cache = s.cache || {}, r.allPermissionTypes(a, !0)[n];
|
|
3193
|
-
}, r.checkActionAccess = function(a, n, s,
|
|
3210
|
+
}, r.checkActionAccess = function(a, n, s, d, c) {
|
|
3194
3211
|
if (c = c || {}, c.cache = c.cache || {}, r.isAdministrator(a))
|
|
3195
3212
|
return !0;
|
|
3196
|
-
var
|
|
3213
|
+
var p = n.meta?.type, S = n.meta?.definition || p;
|
|
3197
3214
|
if (!S)
|
|
3198
3215
|
return !1;
|
|
3199
|
-
if ((s == "listany" ||
|
|
3216
|
+
if ((s == "listany" || d == "listown") && p === "scope") {
|
|
3200
3217
|
var g = e.utils.id(n);
|
|
3201
3218
|
return !!a.permissions[g];
|
|
3202
3219
|
}
|
|
3203
3220
|
var u = e.utils.ids(n.meta.scopes || []);
|
|
3204
|
-
|
|
3221
|
+
p === "scope" && (u = [
|
|
3205
3222
|
...e.utils.ids(n.path || []),
|
|
3206
3223
|
e.utils.id(n)
|
|
3207
3224
|
]);
|
|
3208
|
-
var o,
|
|
3209
|
-
if (c.cache[
|
|
3210
|
-
o = c.cache[
|
|
3225
|
+
var o, f = `access-${a?.cacheKey}-${s}-${S}-${p}`;
|
|
3226
|
+
if (c.cache[f])
|
|
3227
|
+
o = c.cache[f];
|
|
3211
3228
|
else {
|
|
3212
3229
|
var w = e.utils.ids(
|
|
3213
|
-
r.actionableScopes(a, s, S,
|
|
3230
|
+
r.actionableScopes(a, s, S, p, c)
|
|
3214
3231
|
);
|
|
3215
|
-
o = e.utils.hash(w), c.cache[
|
|
3232
|
+
o = e.utils.hash(w), c.cache[f] = o;
|
|
3216
3233
|
}
|
|
3217
3234
|
if (o) {
|
|
3218
|
-
var m = u.some(function(
|
|
3219
|
-
return o[
|
|
3235
|
+
var m = u.some(function(k) {
|
|
3236
|
+
return o[k];
|
|
3220
3237
|
});
|
|
3221
3238
|
if (m)
|
|
3222
3239
|
return !0;
|
|
3223
3240
|
}
|
|
3224
3241
|
var l = r.isOwner(a, n);
|
|
3225
3242
|
if (l) {
|
|
3226
|
-
var v, b = `access-${a?.cacheKey}-${
|
|
3243
|
+
var v, b = `access-${a?.cacheKey}-${d}-${S}-${p}`;
|
|
3227
3244
|
if (c.cache[b])
|
|
3228
3245
|
v = c.cache[b];
|
|
3229
3246
|
else {
|
|
3230
3247
|
var O = e.utils.ids(
|
|
3231
|
-
r.actionableScopes(a,
|
|
3248
|
+
r.actionableScopes(a, d, S, p, c)
|
|
3232
3249
|
);
|
|
3233
3250
|
v = e.utils.hash(O), c.cache[b] = v;
|
|
3234
3251
|
}
|
|
3235
3252
|
if (v) {
|
|
3236
|
-
var
|
|
3237
|
-
return v[
|
|
3253
|
+
var P = u.some(function(k) {
|
|
3254
|
+
return v[k];
|
|
3238
3255
|
});
|
|
3239
|
-
if (
|
|
3256
|
+
if (P)
|
|
3240
3257
|
return !0;
|
|
3241
3258
|
}
|
|
3242
3259
|
}
|
|
@@ -3246,8 +3263,8 @@ var Ue = {}, Ct = {
|
|
|
3246
3263
|
return !0;
|
|
3247
3264
|
var s = r.hashPermissions(a);
|
|
3248
3265
|
return s[n];
|
|
3249
|
-
}, r.canCreate = function(a, n, s,
|
|
3250
|
-
if (
|
|
3266
|
+
}, r.canCreate = function(a, n, s, d) {
|
|
3267
|
+
if (d = d || {}, d.cache = d.cache || {}, r.isAdministrator(a))
|
|
3251
3268
|
return !0;
|
|
3252
3269
|
var c = r.actionableScopes(
|
|
3253
3270
|
a,
|
|
@@ -3258,40 +3275,40 @@ var Ue = {}, Ct = {
|
|
|
3258
3275
|
return c.length;
|
|
3259
3276
|
}, r.canListItem = function(a, n, s) {
|
|
3260
3277
|
s = s || {}, s.cache = s.cache || {};
|
|
3261
|
-
var
|
|
3278
|
+
var d = r.checkActionAccess(
|
|
3262
3279
|
a,
|
|
3263
3280
|
n,
|
|
3264
3281
|
"listany",
|
|
3265
3282
|
"listown",
|
|
3266
3283
|
s
|
|
3267
3284
|
);
|
|
3268
|
-
if (
|
|
3285
|
+
if (d)
|
|
3269
3286
|
return !0;
|
|
3270
3287
|
var c = r.canViewItem(a, n, s);
|
|
3271
3288
|
return !!c;
|
|
3272
3289
|
}, r.canViewItem = function(a, n, s) {
|
|
3273
3290
|
s = s || {}, s.cache = s.cache || {};
|
|
3274
|
-
var
|
|
3291
|
+
var d = r.checkActionAccess(
|
|
3275
3292
|
a,
|
|
3276
3293
|
n,
|
|
3277
3294
|
"viewany",
|
|
3278
|
-
"
|
|
3295
|
+
"viewown",
|
|
3279
3296
|
s
|
|
3280
3297
|
);
|
|
3281
|
-
if (
|
|
3298
|
+
if (d)
|
|
3282
3299
|
return !0;
|
|
3283
3300
|
var c = r.canEditItem(a, n, s);
|
|
3284
3301
|
return !!c;
|
|
3285
3302
|
}, r.canEditItem = function(a, n, s) {
|
|
3286
3303
|
s = s || {}, s.cache = s.cache || {};
|
|
3287
|
-
var
|
|
3304
|
+
var d = r.checkActionAccess(
|
|
3288
3305
|
a,
|
|
3289
3306
|
n,
|
|
3290
3307
|
"editany",
|
|
3291
3308
|
"editown",
|
|
3292
3309
|
s
|
|
3293
3310
|
);
|
|
3294
|
-
return
|
|
3311
|
+
return d;
|
|
3295
3312
|
}, r.canDeleteItem = function(a, n, s) {
|
|
3296
3313
|
return s = s || {}, s.cache = s.cache || {}, r.checkActionAccess(
|
|
3297
3314
|
a,
|
|
@@ -3329,8 +3346,8 @@ function Tt(e) {
|
|
|
3329
3346
|
let t;
|
|
3330
3347
|
r.variables = async function(u, o) {
|
|
3331
3348
|
o = o || {}, u = u || [];
|
|
3332
|
-
var
|
|
3333
|
-
if (
|
|
3349
|
+
var f = o.refresh || o.reload || !i.data;
|
|
3350
|
+
if (f) {
|
|
3334
3351
|
if (!t) {
|
|
3335
3352
|
let m = function() {
|
|
3336
3353
|
t = null;
|
|
@@ -3349,23 +3366,23 @@ function Tt(e) {
|
|
|
3349
3366
|
typeof requestIdleCallback == "function" ? requestIdleCallback(u, { timeout: 50 }) : setTimeout(u, 0);
|
|
3350
3367
|
});
|
|
3351
3368
|
}
|
|
3352
|
-
async function
|
|
3369
|
+
async function d({ _s: u, _k: o, types: f }) {
|
|
3353
3370
|
function w(v) {
|
|
3354
3371
|
if (typeof v == "string" && v[0] === "~")
|
|
3355
3372
|
return u[parseInt(v.slice(1))];
|
|
3356
3373
|
if (Array.isArray(v)) return v.map(w);
|
|
3357
3374
|
if (v && typeof v == "object") {
|
|
3358
3375
|
const b = {};
|
|
3359
|
-
for (const [O,
|
|
3360
|
-
b[o[O] || O] = w(
|
|
3376
|
+
for (const [O, P] of Object.entries(v))
|
|
3377
|
+
b[o[O] || O] = w(P);
|
|
3361
3378
|
return b;
|
|
3362
3379
|
}
|
|
3363
3380
|
return v;
|
|
3364
3381
|
}
|
|
3365
3382
|
const m = 50, l = [];
|
|
3366
|
-
for (let v = 0; v <
|
|
3367
|
-
const b =
|
|
3368
|
-
l.push(...b.map(w)), v + m <
|
|
3383
|
+
for (let v = 0; v < f.length; v += m) {
|
|
3384
|
+
const b = f.slice(v, v + m);
|
|
3385
|
+
l.push(...b.map(w)), v + m < f.length && await s();
|
|
3369
3386
|
}
|
|
3370
3387
|
return l;
|
|
3371
3388
|
}
|
|
@@ -3375,14 +3392,14 @@ function Tt(e) {
|
|
|
3375
3392
|
var m = u.refresh || u.reload || !o;
|
|
3376
3393
|
if (m) {
|
|
3377
3394
|
if (!n) {
|
|
3378
|
-
let
|
|
3395
|
+
let P = function() {
|
|
3379
3396
|
n = null, r.loadingGlossary = !1;
|
|
3380
3397
|
};
|
|
3381
3398
|
r.loadingGlossary = !0;
|
|
3382
3399
|
const O = w ? "/glossary/compressed" : "/glossary";
|
|
3383
|
-
n = e.api.get(O, { cache: !1 }), n.then(
|
|
3400
|
+
n = e.api.get(O, { cache: !1 }), n.then(P, P);
|
|
3384
3401
|
}
|
|
3385
|
-
const { data: v } = await n, b = v._s && v._k && v.types ? await
|
|
3402
|
+
const { data: v } = await n, b = v._s && v._k && v.types ? await d(v) : v;
|
|
3386
3403
|
a.set("glossary", b), o = b, e.dispatch("glossary", b);
|
|
3387
3404
|
}
|
|
3388
3405
|
if (u.hash) {
|
|
@@ -3396,25 +3413,25 @@ function Tt(e) {
|
|
|
3396
3413
|
return o;
|
|
3397
3414
|
};
|
|
3398
3415
|
const c = {};
|
|
3399
|
-
let
|
|
3416
|
+
let p;
|
|
3400
3417
|
r.scopeGlossary = async function(u) {
|
|
3401
3418
|
u = u || {};
|
|
3402
3419
|
var o = u.refresh || u.reload || !c.data;
|
|
3403
3420
|
if (o) {
|
|
3404
|
-
if (!
|
|
3421
|
+
if (!p) {
|
|
3405
3422
|
let m = function() {
|
|
3406
|
-
|
|
3423
|
+
p = null;
|
|
3407
3424
|
};
|
|
3408
|
-
|
|
3425
|
+
p = e.api.get("/scope/glossary", {
|
|
3409
3426
|
cache: !1
|
|
3410
|
-
}),
|
|
3427
|
+
}), p.then(m, m);
|
|
3411
3428
|
}
|
|
3412
|
-
const { data: w } = await
|
|
3429
|
+
const { data: w } = await p;
|
|
3413
3430
|
c.data = w;
|
|
3414
3431
|
}
|
|
3415
3432
|
if (u.hash) {
|
|
3416
|
-
var
|
|
3417
|
-
return
|
|
3433
|
+
var f = e.utils.hash(c.data, "_id");
|
|
3434
|
+
return f;
|
|
3418
3435
|
}
|
|
3419
3436
|
return c.data;
|
|
3420
3437
|
};
|
|
@@ -3423,51 +3440,51 @@ function Tt(e) {
|
|
|
3423
3440
|
u = u || {};
|
|
3424
3441
|
var o = u.reload || u.refresh || !S.data;
|
|
3425
3442
|
if (o) {
|
|
3426
|
-
const { data:
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
return
|
|
3443
|
+
const { data: f } = await e.api.get("/system/comparators");
|
|
3444
|
+
f.available = {}, Object.entries(f.types).forEach(([w, m]) => {
|
|
3445
|
+
f.available[w] = m.map(function(l) {
|
|
3446
|
+
return f.hash[l];
|
|
3430
3447
|
});
|
|
3431
|
-
}), S.data =
|
|
3448
|
+
}), S.data = f;
|
|
3432
3449
|
}
|
|
3433
3450
|
return S.data;
|
|
3434
3451
|
};
|
|
3435
3452
|
function g(u) {
|
|
3436
|
-
var { minimum: o, maximum:
|
|
3437
|
-
return o = e.utils.parseInt(o), o = Math.max(o, 0),
|
|
3453
|
+
var { minimum: o, maximum: f } = u;
|
|
3454
|
+
return o = e.utils.parseInt(o), o = Math.max(o, 0), f = e.utils.parseInt(f), f = Math.max(f, 0), f == 0 || (f = Math.max(f, o)), { minimum: o, maximum: f };
|
|
3438
3455
|
}
|
|
3439
|
-
return r.meetsValidationRequirements = function(u, o,
|
|
3440
|
-
if (
|
|
3456
|
+
return r.meetsValidationRequirements = function(u, o, f) {
|
|
3457
|
+
if (f.minLength) {
|
|
3441
3458
|
var w = String(u).length;
|
|
3442
|
-
if (w <
|
|
3443
|
-
return `Must be at least ${
|
|
3459
|
+
if (w < f.minLength)
|
|
3460
|
+
return `Must be at least ${f.minLength} characters`;
|
|
3444
3461
|
}
|
|
3445
|
-
if (
|
|
3462
|
+
if (f.maxLength) {
|
|
3446
3463
|
var w = String(u).length;
|
|
3447
|
-
if (w >
|
|
3448
|
-
return `Can be no more than ${
|
|
3464
|
+
if (w > f.maxLength)
|
|
3465
|
+
return `Can be no more than ${f.maxLength} characters`;
|
|
3449
3466
|
}
|
|
3450
|
-
if (
|
|
3467
|
+
if (f.minValue && u !== void 0) {
|
|
3451
3468
|
var m = Number(u);
|
|
3452
|
-
if (m <
|
|
3453
|
-
return `Must be at least ${
|
|
3469
|
+
if (m < f.minValue)
|
|
3470
|
+
return `Must be at least ${f.minValue}`;
|
|
3454
3471
|
}
|
|
3455
|
-
if (
|
|
3472
|
+
if (f.maxValue && u !== void 0) {
|
|
3456
3473
|
var m = Number(u);
|
|
3457
|
-
if (m >
|
|
3458
|
-
return `Can be no greater than ${
|
|
3474
|
+
if (m > f.maxValue)
|
|
3475
|
+
return `Can be no greater than ${f.maxValue}`;
|
|
3459
3476
|
}
|
|
3460
|
-
}, r.validateField = function(u, o,
|
|
3461
|
-
|
|
3462
|
-
var w = o.type || "string", { minimum: m, maximum: l } = g(o), v = o.type == "group" && o.asObject, b = v ? m === l && l === 1 : l === 1, O = !b,
|
|
3463
|
-
if (o.type === "boolean" && u !== !0 && (
|
|
3464
|
-
if (!
|
|
3477
|
+
}, r.validateField = function(u, o, f) {
|
|
3478
|
+
f = f || {};
|
|
3479
|
+
var w = o.type || "string", { minimum: m, maximum: l } = g(o), v = o.type == "group" && o.asObject, b = v ? m === l && l === 1 : l === 1, O = !b, P = e.utils.exists(u);
|
|
3480
|
+
if (o.type === "boolean" && u !== !0 && (P = !1), m) {
|
|
3481
|
+
if (!P)
|
|
3465
3482
|
return {
|
|
3466
3483
|
valid: !1,
|
|
3467
3484
|
message: `${o.title} is a required field`,
|
|
3468
3485
|
status: 400
|
|
3469
3486
|
};
|
|
3470
|
-
} else if (!
|
|
3487
|
+
} else if (!P)
|
|
3471
3488
|
return {
|
|
3472
3489
|
valid: !0
|
|
3473
3490
|
};
|
|
@@ -3482,91 +3499,91 @@ function Tt(e) {
|
|
|
3482
3499
|
message: `${o.title} must be provided as an array`,
|
|
3483
3500
|
status: 400
|
|
3484
3501
|
});
|
|
3485
|
-
var
|
|
3486
|
-
if (
|
|
3487
|
-
var
|
|
3488
|
-
return !
|
|
3489
|
-
}), m == l && m &&
|
|
3502
|
+
var k = u;
|
|
3503
|
+
if (k = k.filter(function(I) {
|
|
3504
|
+
var N = I == null || I === "";
|
|
3505
|
+
return !N;
|
|
3506
|
+
}), m == l && m && k.length != m)
|
|
3490
3507
|
return {
|
|
3491
3508
|
valid: !1,
|
|
3492
3509
|
message: `${o.title} requires exactly ${l} values`,
|
|
3493
3510
|
status: 400
|
|
3494
3511
|
};
|
|
3495
|
-
if (l &&
|
|
3512
|
+
if (l && k.length > l)
|
|
3496
3513
|
return {
|
|
3497
3514
|
valid: !1,
|
|
3498
3515
|
message: `${o.title} requires less than ${l + 1} values`,
|
|
3499
3516
|
status: 400
|
|
3500
3517
|
};
|
|
3501
|
-
if (
|
|
3518
|
+
if (k.length < m)
|
|
3502
3519
|
return {
|
|
3503
3520
|
valid: !1,
|
|
3504
3521
|
message: `${o.title} requires at least ${m} values`,
|
|
3505
3522
|
status: 400
|
|
3506
3523
|
};
|
|
3507
|
-
var
|
|
3508
|
-
if (
|
|
3509
|
-
var
|
|
3510
|
-
o.type === "group" && (
|
|
3524
|
+
var L;
|
|
3525
|
+
if (k.find(function(I) {
|
|
3526
|
+
var N = w;
|
|
3527
|
+
o.type === "group" && (N = "object"), o.type === "reference" && o.widget === "form" && (N = "object");
|
|
3511
3528
|
var $ = e.utils.isValidValue(
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3529
|
+
I,
|
|
3530
|
+
N,
|
|
3531
|
+
f.strict
|
|
3515
3532
|
);
|
|
3516
3533
|
if (!$)
|
|
3517
|
-
return
|
|
3534
|
+
return L = !0, !0;
|
|
3518
3535
|
if (o.validation) {
|
|
3519
3536
|
var z = r.meetsValidationRequirements(
|
|
3520
|
-
|
|
3537
|
+
I,
|
|
3521
3538
|
w,
|
|
3522
3539
|
o.validation
|
|
3523
3540
|
);
|
|
3524
3541
|
if (z)
|
|
3525
|
-
return
|
|
3542
|
+
return L = !0, !0;
|
|
3526
3543
|
}
|
|
3527
|
-
}),
|
|
3544
|
+
}), L)
|
|
3528
3545
|
return {
|
|
3529
3546
|
valid: !1,
|
|
3530
3547
|
message: `Invalid input for ${o.title}`,
|
|
3531
3548
|
status: 400
|
|
3532
3549
|
};
|
|
3533
3550
|
} else {
|
|
3534
|
-
var
|
|
3535
|
-
|
|
3536
|
-
var
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3551
|
+
var R = w, j = o.widget;
|
|
3552
|
+
R === "group" && (R = "object"), R === "reference" && j === "form" && (R = "object");
|
|
3553
|
+
var U = r.getCleanedValue(u, R, f), x = e.utils.isValidValue(
|
|
3554
|
+
U,
|
|
3555
|
+
R,
|
|
3556
|
+
f.strict
|
|
3540
3557
|
);
|
|
3541
|
-
if (!
|
|
3558
|
+
if (!x)
|
|
3542
3559
|
return {
|
|
3543
3560
|
valid: !1,
|
|
3544
|
-
message: `Single value '${u}' is not a valid ${
|
|
3561
|
+
message: `Single value '${u}' is not a valid ${R} for ${o.title}`,
|
|
3545
3562
|
criteria: {
|
|
3546
|
-
isValidValue:
|
|
3547
|
-
cleanedValue:
|
|
3563
|
+
isValidValue: x,
|
|
3564
|
+
cleanedValue: U,
|
|
3548
3565
|
fieldType: w,
|
|
3549
|
-
options:
|
|
3566
|
+
options: f
|
|
3550
3567
|
},
|
|
3551
3568
|
status: 400
|
|
3552
3569
|
};
|
|
3553
|
-
let
|
|
3554
|
-
const
|
|
3555
|
-
if (String(o.minValue) && (
|
|
3570
|
+
let I = !1;
|
|
3571
|
+
const N = {};
|
|
3572
|
+
if (String(o.minValue) && (N.minValue = parseInt(o.minValue), I = !0), String(o.maxValue) && (N.maxValue = parseInt(o.maxValue), I = !0), String(o.minLength) && (N.minLength = parseInt(o.minLength), I = !0), String(o.maxLength) && (N.maxLength = parseInt(o.maxLength), I = !0), I) {
|
|
3556
3573
|
const $ = Object.assign(
|
|
3557
3574
|
{},
|
|
3558
|
-
|
|
3575
|
+
N,
|
|
3559
3576
|
o.validation || {}
|
|
3560
3577
|
);
|
|
3561
|
-
var
|
|
3578
|
+
var T = r.meetsValidationRequirements(
|
|
3562
3579
|
u,
|
|
3563
3580
|
w,
|
|
3564
3581
|
$
|
|
3565
3582
|
);
|
|
3566
|
-
if (
|
|
3583
|
+
if (T)
|
|
3567
3584
|
return {
|
|
3568
3585
|
valid: !1,
|
|
3569
|
-
message:
|
|
3586
|
+
message: T,
|
|
3570
3587
|
status: 400
|
|
3571
3588
|
};
|
|
3572
3589
|
}
|
|
@@ -3574,8 +3591,8 @@ function Tt(e) {
|
|
|
3574
3591
|
return {
|
|
3575
3592
|
valid: !0
|
|
3576
3593
|
};
|
|
3577
|
-
}, r.getCleanedValue = function(u, o,
|
|
3578
|
-
switch (o) {
|
|
3594
|
+
}, r.getCleanedValue = function(u, o, f) {
|
|
3595
|
+
switch (f = f || {}, o) {
|
|
3579
3596
|
case "number":
|
|
3580
3597
|
case "float":
|
|
3581
3598
|
case "decimal":
|
|
@@ -3585,66 +3602,75 @@ function Tt(e) {
|
|
|
3585
3602
|
case "boolean":
|
|
3586
3603
|
return e.utils.exists(u) ? e.utils.parseBoolean(u) : void 0;
|
|
3587
3604
|
case "email":
|
|
3588
|
-
return
|
|
3605
|
+
return f.strict ? u : String(u).toLowerCase();
|
|
3589
3606
|
case "reference":
|
|
3590
|
-
return
|
|
3607
|
+
return f.strict ? u : e.utils.id(u);
|
|
3591
3608
|
default:
|
|
3592
|
-
return
|
|
3609
|
+
return f.strict ? u : e.utils.cleanValue(u, o, f);
|
|
3593
3610
|
}
|
|
3594
3611
|
return u;
|
|
3595
|
-
}, r.list = async function(u, o,
|
|
3596
|
-
|
|
3597
|
-
const w =
|
|
3598
|
-
if (
|
|
3599
|
-
|
|
3612
|
+
}, r.list = async function(u, o, f) {
|
|
3613
|
+
f || (f = {});
|
|
3614
|
+
const w = f.remoteURL || `/content/${u}/list`;
|
|
3615
|
+
if (f.cancellable) {
|
|
3616
|
+
f.config || (f.config = {});
|
|
3600
3617
|
const l = e.api.CancelToken.source();
|
|
3601
|
-
return
|
|
3602
|
-
promise: e.api.post(w, o,
|
|
3618
|
+
return f.config.cancelToken = l.token, {
|
|
3619
|
+
promise: e.api.post(w, o, f.config),
|
|
3603
3620
|
cancel(b) {
|
|
3604
3621
|
l.cancel(b || "Operation canceled by the user.");
|
|
3605
3622
|
}
|
|
3606
3623
|
};
|
|
3607
3624
|
} else {
|
|
3608
|
-
const { data: m } = await e.api.post(w, o,
|
|
3625
|
+
const { data: m } = await e.api.post(w, o, f.config);
|
|
3609
3626
|
return m;
|
|
3610
3627
|
}
|
|
3611
3628
|
}, r.create = async function(u, o) {
|
|
3612
|
-
const
|
|
3613
|
-
|
|
3614
|
-
|
|
3629
|
+
const f = { ...o };
|
|
3630
|
+
f.meta?.scopes && (f.meta = {
|
|
3631
|
+
...f.meta,
|
|
3632
|
+
scopes: e.utils.ids(f.meta.scopes)
|
|
3633
|
+
});
|
|
3634
|
+
const { data: w } = await e.api.post(`/content/${u}/create`, f);
|
|
3615
3635
|
return w;
|
|
3616
3636
|
}, r.update = async function(u, o) {
|
|
3617
3637
|
u = e.utils.id(u);
|
|
3618
|
-
const
|
|
3619
|
-
|
|
3620
|
-
|
|
3638
|
+
const f = { ...o };
|
|
3639
|
+
f.meta?.scopes && (f.meta = {
|
|
3640
|
+
...f.meta,
|
|
3641
|
+
scopes: e.utils.ids(f.meta.scopes)
|
|
3642
|
+
});
|
|
3643
|
+
const { data: w } = await e.api.put(`/content/${u}`, f);
|
|
3621
3644
|
return w;
|
|
3622
3645
|
}, r.patch = async function(u, o) {
|
|
3623
3646
|
u = e.utils.id(u);
|
|
3624
|
-
const
|
|
3625
|
-
|
|
3626
|
-
|
|
3647
|
+
const f = { ...o };
|
|
3648
|
+
f.meta?.scopes && (f.meta = {
|
|
3649
|
+
...f.meta,
|
|
3650
|
+
scopes: e.utils.ids(f.meta.scopes)
|
|
3651
|
+
});
|
|
3652
|
+
const { data: w } = await e.api.patch(`/content/${u}`, f);
|
|
3627
3653
|
return w;
|
|
3628
3654
|
}, r.get = async function(u, o) {
|
|
3629
3655
|
u = e.utils.id(u), o = o || {};
|
|
3630
|
-
const { data:
|
|
3631
|
-
return
|
|
3656
|
+
const { data: f } = await e.api.get(`/content/${u}`, o);
|
|
3657
|
+
return f;
|
|
3632
3658
|
}, r.getFromID = async function(u) {
|
|
3633
3659
|
return r.get(u);
|
|
3634
3660
|
}, r.delete = async function(u, o) {
|
|
3635
3661
|
u = e.utils.id(u);
|
|
3636
|
-
const { data:
|
|
3637
|
-
return
|
|
3662
|
+
const { data: f } = await e.api.delete(`/content/${u}`, o);
|
|
3663
|
+
return f;
|
|
3638
3664
|
}, r.restore = async function(u, o) {
|
|
3639
3665
|
u = e.utils.id(u);
|
|
3640
|
-
const { data:
|
|
3641
|
-
return
|
|
3666
|
+
const { data: f } = await e.api.get(`/content/${u}/restore`, o);
|
|
3667
|
+
return f;
|
|
3642
3668
|
}, r.getFromSlug = async function(u) {
|
|
3643
3669
|
const { data: o } = await e.api.get(`/content/slug/${u}`);
|
|
3644
3670
|
return o;
|
|
3645
3671
|
}, r;
|
|
3646
3672
|
}
|
|
3647
|
-
function
|
|
3673
|
+
function Rt(e) {
|
|
3648
3674
|
var r = {}, i;
|
|
3649
3675
|
return r.countries = async function() {
|
|
3650
3676
|
return i || (i = new Promise(async function(t, a) {
|
|
@@ -3654,16 +3680,16 @@ function kt(e) {
|
|
|
3654
3680
|
})), i;
|
|
3655
3681
|
}, r;
|
|
3656
3682
|
}
|
|
3657
|
-
function
|
|
3683
|
+
function kt(e) {
|
|
3658
3684
|
var r = {};
|
|
3659
3685
|
function i() {
|
|
3660
3686
|
return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
|
|
3661
3687
|
}
|
|
3662
3688
|
return r.distance = function({ lat: t, lon: a }, { lat: n, lon: s }) {
|
|
3663
|
-
function f
|
|
3664
|
-
return
|
|
3689
|
+
function d(f) {
|
|
3690
|
+
return f * (Math.PI / 180);
|
|
3665
3691
|
}
|
|
3666
|
-
var c = 6371e3,
|
|
3692
|
+
var c = 6371e3, p = d(n - t), S = d(s - a), g = Math.sin(p / 2) * Math.sin(p / 2) + Math.cos(d(t)) * Math.cos(d(n)) * Math.sin(S / 2) * Math.sin(S / 2), u = 2 * Math.atan2(Math.sqrt(g), Math.sqrt(1 - g)), o = c * u;
|
|
3667
3693
|
return o;
|
|
3668
3694
|
}, r.getPosition = async function() {
|
|
3669
3695
|
return i() ? (console.log("qik:geo: getting location"), new Promise(function(t, a) {
|
|
@@ -3677,9 +3703,9 @@ function Rt(e) {
|
|
|
3677
3703
|
});
|
|
3678
3704
|
})) : Promise.reject({ message: "Geolocation is not enabled" });
|
|
3679
3705
|
}, r.stopWatchPosition = async function(t) {
|
|
3680
|
-
return i() ? (console.log("qik:geo: watch stopped"), navigator.geolocation.clearWatch(
|
|
3706
|
+
return i() ? (console.log("qik:geo: watch stopped"), navigator.geolocation.clearWatch(t), !0) : Promise.reject({ message: "Geolocation is not enabled" });
|
|
3681
3707
|
}, r.getDefaultTimezone = function() {
|
|
3682
|
-
const
|
|
3708
|
+
const t = e.auth.getCurrentUser()?.session;
|
|
3683
3709
|
if (t) {
|
|
3684
3710
|
const a = t?.organisation?.timezone;
|
|
3685
3711
|
if (a)
|
|
@@ -4384,7 +4410,7 @@ function Rt(e) {
|
|
|
4384
4410
|
"Pacific/Wake",
|
|
4385
4411
|
"Pacific/Wallis"
|
|
4386
4412
|
], r.getDefaultCountry = function() {
|
|
4387
|
-
const
|
|
4413
|
+
const t = e.auth.getCurrentUser()?.session;
|
|
4388
4414
|
if (t) {
|
|
4389
4415
|
const a = t?.organisation?.countryCode;
|
|
4390
4416
|
if (a) {
|
|
@@ -4407,79 +4433,82 @@ const It = function(e, r) {
|
|
|
4407
4433
|
connected: !1,
|
|
4408
4434
|
windowID: i,
|
|
4409
4435
|
autoreconnect: !0
|
|
4410
|
-
}, a, n, s,
|
|
4411
|
-
const g = {}, u = 1e3, o = 3e4,
|
|
4412
|
-
|
|
4413
|
-
if (S[
|
|
4414
|
-
return S[
|
|
4415
|
-
const
|
|
4416
|
-
function
|
|
4417
|
-
|
|
4436
|
+
}, a, n, s, d = 0, c = [], p = !1, S = {};
|
|
4437
|
+
const g = {}, u = 1e3, o = 3e4, f = new De();
|
|
4438
|
+
f.bootstrap(t), t.channel = async function(x) {
|
|
4439
|
+
if (S[x])
|
|
4440
|
+
return S[x];
|
|
4441
|
+
const T = new De();
|
|
4442
|
+
function I(N) {
|
|
4443
|
+
T.dispatch("message", N);
|
|
4418
4444
|
}
|
|
4419
|
-
return
|
|
4420
|
-
t.removeEventListener(
|
|
4421
|
-
}, S[
|
|
4445
|
+
return T.destroy = function() {
|
|
4446
|
+
t.removeEventListener(x, I), t.unsubscribe(x), T.removeAllListeners(), delete S[x];
|
|
4447
|
+
}, S[x] = T, t.connected || await t.connect(), t.subscribe(x), t.addEventListener(x, I), S[x];
|
|
4422
4448
|
};
|
|
4423
|
-
function w(
|
|
4424
|
-
t.debug && console.log("[socket] Connection open",
|
|
4449
|
+
function w(x) {
|
|
4450
|
+
t.debug && console.log("[socket] Connection open", x), t.connected = !0, d = 0, f.dispatch("connected", x), L(Object.keys(g));
|
|
4425
4451
|
}
|
|
4426
|
-
async function m(
|
|
4427
|
-
|
|
4452
|
+
async function m(x) {
|
|
4453
|
+
x.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${x.code} reason=${x.reason}`) : t.debug && console.log("[socket] - connection closed due to error", x), t.connected = !1, f.dispatch("disconnected", x), a = null, t.autoreconnect && l();
|
|
4428
4454
|
}
|
|
4429
4455
|
function l() {
|
|
4430
4456
|
if (s)
|
|
4431
4457
|
return;
|
|
4432
|
-
const
|
|
4433
|
-
|
|
4458
|
+
const x = Math.min(o, u * Math.pow(2, d)), T = Math.round(x * (0.5 + Math.random() / 2));
|
|
4459
|
+
d++, t.debug && console.log(`[socket] reconnecting in ${T}ms`), s = setTimeout(function() {
|
|
4434
4460
|
s = null, t.reconnect();
|
|
4435
|
-
},
|
|
4461
|
+
}, T);
|
|
4436
4462
|
}
|
|
4437
|
-
function v(
|
|
4438
|
-
console.log("[event] socketError",
|
|
4463
|
+
function v(x) {
|
|
4464
|
+
console.log("[event] socketError", x), t.debug && console.log("[socket] Error", x), f.dispatch("error", x);
|
|
4439
4465
|
}
|
|
4440
|
-
function b(
|
|
4441
|
-
const
|
|
4442
|
-
t.debug && console.log("[socket] message received",
|
|
4466
|
+
function b(x) {
|
|
4467
|
+
const T = JSON.parse(x.data);
|
|
4468
|
+
t.debug && console.log("[socket] message received", T), f.dispatch("message", T), T.channel && f.dispatch(T.channel, T);
|
|
4469
|
+
const I = T.message;
|
|
4470
|
+
I && I.type === "session" && I.action === "changed" && Promise.resolve(e.auth.sync({ keepOnError: !0 })).catch(function() {
|
|
4471
|
+
});
|
|
4443
4472
|
}
|
|
4444
|
-
async function O(
|
|
4473
|
+
async function O(x) {
|
|
4445
4474
|
if (!a || a.readyState !== WebSocket.OPEN) {
|
|
4446
|
-
t.debug && console.log("[socket] - frame dropped, socket not open",
|
|
4475
|
+
t.debug && console.log("[socket] - frame dropped, socket not open", x);
|
|
4447
4476
|
return;
|
|
4448
4477
|
}
|
|
4449
|
-
a.send(JSON.stringify(
|
|
4478
|
+
a.send(JSON.stringify(x));
|
|
4450
4479
|
}
|
|
4451
|
-
function
|
|
4452
|
-
return t.connected ? Promise.resolve(a) : new Promise(function(
|
|
4453
|
-
function
|
|
4454
|
-
t.removeEventListener("connected",
|
|
4480
|
+
function P() {
|
|
4481
|
+
return t.connected ? Promise.resolve(a) : new Promise(function(x) {
|
|
4482
|
+
function T() {
|
|
4483
|
+
t.removeEventListener("connected", T), x(a);
|
|
4455
4484
|
}
|
|
4456
|
-
t.addEventListener("connected",
|
|
4485
|
+
t.addEventListener("connected", T);
|
|
4457
4486
|
});
|
|
4458
4487
|
}
|
|
4459
4488
|
t.connect = async function() {
|
|
4460
4489
|
if (a)
|
|
4461
|
-
return a.connected ? (console.log("[socket] - Socket is already connected"), a) :
|
|
4490
|
+
return a.connected ? (console.log("[socket] - Socket is already connected"), a) : P();
|
|
4462
4491
|
if (n)
|
|
4463
4492
|
return n;
|
|
4464
|
-
n =
|
|
4493
|
+
n = k();
|
|
4465
4494
|
try {
|
|
4466
4495
|
return await n;
|
|
4467
4496
|
} finally {
|
|
4468
4497
|
n = null;
|
|
4469
4498
|
}
|
|
4470
4499
|
};
|
|
4471
|
-
async function
|
|
4500
|
+
async function k() {
|
|
4472
4501
|
try {
|
|
4473
4502
|
await e.auth.ensureValidToken();
|
|
4474
|
-
} catch (
|
|
4475
|
-
t.debug && console.log("[socket] - could not refresh token before connecting",
|
|
4503
|
+
} catch (T) {
|
|
4504
|
+
t.debug && console.log("[socket] - could not refresh token before connecting", T);
|
|
4476
4505
|
}
|
|
4477
|
-
const
|
|
4478
|
-
if (!
|
|
4506
|
+
const x = e.auth.getCurrentToken();
|
|
4507
|
+
if (!x) {
|
|
4479
4508
|
t.debug && console.log("[socket] - Must be authenticated to connect to socket");
|
|
4480
4509
|
return;
|
|
4481
4510
|
}
|
|
4482
|
-
return a = new WebSocket(`${t.url}?access_token=${
|
|
4511
|
+
return a = new WebSocket(`${t.url}?access_token=${x}&windowid=${i}`), a.addEventListener("close", m), a.addEventListener("error", v), a.addEventListener("open", w), a.addEventListener("message", b), t.debug && console.log("[socket] - Connected with event listeners"), P();
|
|
4483
4512
|
}
|
|
4484
4513
|
t.reconnect = async function() {
|
|
4485
4514
|
if (!t.connected)
|
|
@@ -4490,41 +4519,49 @@ const It = function(e, r) {
|
|
|
4490
4519
|
return;
|
|
4491
4520
|
}
|
|
4492
4521
|
s && (clearTimeout(s), s = null);
|
|
4493
|
-
const
|
|
4494
|
-
t.autoreconnect = !1, a.close(), a.removeEventListener("close", m), a.removeEventListener("error", v), a.removeEventListener("open", w), a.removeEventListener("message", b), a = null, m({ wasClean: !0 }), t.autoreconnect =
|
|
4522
|
+
const x = t.autoreconnect;
|
|
4523
|
+
t.autoreconnect = !1, a.close(), a.removeEventListener("close", m), a.removeEventListener("error", v), a.removeEventListener("open", w), a.removeEventListener("message", b), a = null, m({ wasClean: !0 }), t.autoreconnect = x;
|
|
4495
4524
|
}, t.disconnect = t.close;
|
|
4496
|
-
function
|
|
4497
|
-
|
|
4498
|
-
c.includes(
|
|
4499
|
-
}), !
|
|
4500
|
-
}
|
|
4501
|
-
function
|
|
4502
|
-
|
|
4503
|
-
const
|
|
4504
|
-
return g[
|
|
4525
|
+
function L(x) {
|
|
4526
|
+
x.forEach(function(T) {
|
|
4527
|
+
c.includes(T) || c.push(T);
|
|
4528
|
+
}), !p && (p = !0, setTimeout(R, 0));
|
|
4529
|
+
}
|
|
4530
|
+
function R() {
|
|
4531
|
+
p = !1;
|
|
4532
|
+
const x = c.filter(function(T) {
|
|
4533
|
+
return g[T];
|
|
4505
4534
|
});
|
|
4506
|
-
c = [],
|
|
4535
|
+
c = [], x.length && (x.length === 1 ? O({ action: "subscribe", channel: x[0] }) : O({ action: "subscribe", channels: x }));
|
|
4507
4536
|
}
|
|
4508
|
-
t.subscribe = async function(
|
|
4537
|
+
t.subscribe = async function(x) {
|
|
4509
4538
|
if (!a) {
|
|
4510
4539
|
console.log("[socket] - Can't subscribe to channel as socket is not connected");
|
|
4511
4540
|
return;
|
|
4512
4541
|
}
|
|
4513
|
-
g[
|
|
4514
|
-
}, t.unsubscribe = async function(
|
|
4542
|
+
g[x] = !0, L([x]), f.dispatch("subscribe", x), t.debug && console.log(`[socket] - subscribed to ${x}`);
|
|
4543
|
+
}, t.unsubscribe = async function(x) {
|
|
4515
4544
|
if (!a) {
|
|
4516
4545
|
console.log("[socket] - Can't unsubscribe from channel as socket is not connected");
|
|
4517
4546
|
return;
|
|
4518
4547
|
}
|
|
4519
4548
|
O({
|
|
4520
4549
|
action: "unsubscribe",
|
|
4521
|
-
channel:
|
|
4522
|
-
}), delete g[
|
|
4550
|
+
channel: x
|
|
4551
|
+
}), delete g[x], f.dispatch("unsubscribe", x), t.debug && console.log(`[socket] - unsubscribed from ${x}`);
|
|
4523
4552
|
};
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4553
|
+
function j(x) {
|
|
4554
|
+
const T = x && x.session;
|
|
4555
|
+
return T ? [
|
|
4556
|
+
e.utils.id(T.organisation),
|
|
4557
|
+
e.utils.id(T.persona),
|
|
4558
|
+
e.utils.id(T._id)
|
|
4559
|
+
].join("|") : "";
|
|
4560
|
+
}
|
|
4561
|
+
let U = j(e.auth.getCurrentUser());
|
|
4562
|
+
return e.auth.addEventListener("change", async function(x) {
|
|
4563
|
+
const T = j(x);
|
|
4564
|
+
T !== U && (U = T, a && (t.debug && console.log("[socket] - signed-in identity changed, reconnecting"), await t.close(), await t.reconnect()));
|
|
4528
4565
|
}), t;
|
|
4529
4566
|
};
|
|
4530
4567
|
function Ft(e) {
|
|
@@ -4551,7 +4588,7 @@ function Ft(e) {
|
|
|
4551
4588
|
value: Ct,
|
|
4552
4589
|
writable: !1
|
|
4553
4590
|
});
|
|
4554
|
-
const t =
|
|
4591
|
+
const t = _;
|
|
4555
4592
|
Object.defineProperty(r, "utils", {
|
|
4556
4593
|
value: t,
|
|
4557
4594
|
writable: !1
|
|
@@ -4563,14 +4600,14 @@ function Ft(e) {
|
|
|
4563
4600
|
Object.defineProperty(r, "files", {
|
|
4564
4601
|
value: n,
|
|
4565
4602
|
writable: !1
|
|
4566
|
-
}), new De().bootstrap(r), r.error = function(
|
|
4567
|
-
return r.dispatch("error", t.errorMessage(
|
|
4568
|
-
}, r.notify = function(
|
|
4569
|
-
return r.dispatch("notification", { message:
|
|
4603
|
+
}), new De().bootstrap(r), r.error = function(f) {
|
|
4604
|
+
return r.dispatch("error", t.errorMessage(f));
|
|
4605
|
+
}, r.notify = function(f, w) {
|
|
4606
|
+
return r.dispatch("notification", { message: f, options: w });
|
|
4570
4607
|
};
|
|
4571
|
-
const
|
|
4608
|
+
const d = new mt(r);
|
|
4572
4609
|
Object.defineProperty(r, "api", {
|
|
4573
|
-
value:
|
|
4610
|
+
value: d,
|
|
4574
4611
|
writable: !1
|
|
4575
4612
|
});
|
|
4576
4613
|
const c = new Pt(r);
|
|
@@ -4578,9 +4615,9 @@ function Ft(e) {
|
|
|
4578
4615
|
value: c,
|
|
4579
4616
|
writable: !1
|
|
4580
4617
|
});
|
|
4581
|
-
const
|
|
4618
|
+
const p = new It(r);
|
|
4582
4619
|
Object.defineProperty(r, "socket", {
|
|
4583
|
-
value:
|
|
4620
|
+
value: p,
|
|
4584
4621
|
writable: !1
|
|
4585
4622
|
});
|
|
4586
4623
|
const S = new Mt(r);
|
|
@@ -4588,12 +4625,12 @@ function Ft(e) {
|
|
|
4588
4625
|
value: S,
|
|
4589
4626
|
writable: !1
|
|
4590
4627
|
});
|
|
4591
|
-
const g = new
|
|
4628
|
+
const g = new Rt(r);
|
|
4592
4629
|
Object.defineProperty(r, "system", {
|
|
4593
4630
|
value: g,
|
|
4594
4631
|
writable: !1
|
|
4595
4632
|
});
|
|
4596
|
-
const u = new
|
|
4633
|
+
const u = new kt(r);
|
|
4597
4634
|
Object.defineProperty(r, "geo", {
|
|
4598
4635
|
value: u,
|
|
4599
4636
|
writable: !1
|