@qikdev/sdk 0.1.212 → 0.1.214
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 +1570 -1518
- package/package.json +1 -1
- package/src/api/qik.content.js +152 -0
- package/src/version.js +1 -1
package/dist/main.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Ee from "axios";
|
|
2
|
-
import { Cache as
|
|
2
|
+
import { Cache as Zr } from "axios-extensions";
|
|
3
3
|
var Ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
4
|
function mr(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function qr(e) {
|
|
8
8
|
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
9
9
|
var r = e.default;
|
|
10
10
|
if (typeof r == "function") {
|
|
@@ -28,9 +28,9 @@ function Zr(e) {
|
|
|
28
28
|
});
|
|
29
29
|
}), a;
|
|
30
30
|
}
|
|
31
|
-
var
|
|
31
|
+
var qe, Pr;
|
|
32
32
|
function Qr() {
|
|
33
|
-
return
|
|
33
|
+
return Pr || (Pr = 1, qe = function() {
|
|
34
34
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
35
35
|
return !1;
|
|
36
36
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -53,7 +53,7 @@ function Qr() {
|
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
55
|
return !0;
|
|
56
|
-
}),
|
|
56
|
+
}), qe;
|
|
57
57
|
}
|
|
58
58
|
var Qe, Cr;
|
|
59
59
|
function Yr() {
|
|
@@ -68,45 +68,45 @@ var Ye, Or;
|
|
|
68
68
|
function Xr() {
|
|
69
69
|
if (Or) return Ye;
|
|
70
70
|
Or = 1;
|
|
71
|
-
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, a = Math.max, t = "[object Function]", n = function(
|
|
72
|
-
for (var S = [],
|
|
73
|
-
S[
|
|
74
|
-
for (var
|
|
75
|
-
S[
|
|
71
|
+
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, a = Math.max, t = "[object Function]", n = function(f, m) {
|
|
72
|
+
for (var S = [], v = 0; v < f.length; v += 1)
|
|
73
|
+
S[v] = f[v];
|
|
74
|
+
for (var P = 0; P < m.length; P += 1)
|
|
75
|
+
S[P + f.length] = m[P];
|
|
76
76
|
return S;
|
|
77
|
-
}, o = function(
|
|
78
|
-
for (var S = [],
|
|
79
|
-
S[
|
|
77
|
+
}, o = function(f, m) {
|
|
78
|
+
for (var S = [], v = m, P = 0; v < f.length; v += 1, P += 1)
|
|
79
|
+
S[P] = f[v];
|
|
80
80
|
return S;
|
|
81
|
-
}, p = function(
|
|
82
|
-
for (var
|
|
83
|
-
|
|
84
|
-
return
|
|
81
|
+
}, p = function(s, f) {
|
|
82
|
+
for (var m = "", S = 0; S < s.length; S += 1)
|
|
83
|
+
m += s[S], S + 1 < s.length && (m += f);
|
|
84
|
+
return m;
|
|
85
85
|
};
|
|
86
|
-
return Ye = function(
|
|
87
|
-
var
|
|
88
|
-
if (typeof
|
|
89
|
-
throw new TypeError(e +
|
|
90
|
-
for (var S = o(arguments, 1),
|
|
91
|
-
if (this instanceof
|
|
92
|
-
var
|
|
86
|
+
return Ye = function(f) {
|
|
87
|
+
var m = this;
|
|
88
|
+
if (typeof m != "function" || r.apply(m) !== t)
|
|
89
|
+
throw new TypeError(e + m);
|
|
90
|
+
for (var S = o(arguments, 1), v, P = function() {
|
|
91
|
+
if (this instanceof v) {
|
|
92
|
+
var d = m.apply(
|
|
93
93
|
this,
|
|
94
94
|
n(S, arguments)
|
|
95
95
|
);
|
|
96
|
-
return Object(
|
|
96
|
+
return Object(d) === d ? d : this;
|
|
97
97
|
}
|
|
98
|
-
return
|
|
99
|
-
|
|
98
|
+
return m.apply(
|
|
99
|
+
f,
|
|
100
100
|
n(S, arguments)
|
|
101
101
|
);
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
if (
|
|
105
|
-
var
|
|
102
|
+
}, b = a(0, m.length - S.length), A = [], C = 0; C < b; C++)
|
|
103
|
+
A[C] = "$" + C;
|
|
104
|
+
if (v = Function("binder", "return function (" + p(A, ",") + "){ return binder.apply(this,arguments); }")(P), m.prototype) {
|
|
105
|
+
var h = function() {
|
|
106
106
|
};
|
|
107
|
-
|
|
107
|
+
h.prototype = m.prototype, v.prototype = new h(), h.prototype = null;
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return v;
|
|
110
110
|
}, Ye;
|
|
111
111
|
}
|
|
112
112
|
var Xe, Mr;
|
|
@@ -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, Tr;
|
|
127
127
|
function hr() {
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
var e, r = SyntaxError, a = Function, t = TypeError, n = function(
|
|
128
|
+
if (Tr) return rr;
|
|
129
|
+
Tr = 1;
|
|
130
|
+
var e, r = SyntaxError, a = Function, t = TypeError, n = function(L) {
|
|
131
131
|
try {
|
|
132
|
-
return a('"use strict"; return (' +
|
|
132
|
+
return a('"use strict"; return (' + L + ").constructor;")();
|
|
133
133
|
} catch {
|
|
134
134
|
}
|
|
135
135
|
}, o = Object.getOwnPropertyDescriptor;
|
|
@@ -141,7 +141,7 @@ function hr() {
|
|
|
141
141
|
}
|
|
142
142
|
var p = function() {
|
|
143
143
|
throw new t();
|
|
144
|
-
},
|
|
144
|
+
}, s = o ? (function() {
|
|
145
145
|
try {
|
|
146
146
|
return arguments.callee, p;
|
|
147
147
|
} catch {
|
|
@@ -151,13 +151,13 @@ function hr() {
|
|
|
151
151
|
return p;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
})() : p,
|
|
155
|
-
return
|
|
156
|
-
}, S = {},
|
|
154
|
+
})() : p, f = Yr()(), m = Object.getPrototypeOf || function(L) {
|
|
155
|
+
return L.__proto__;
|
|
156
|
+
}, S = {}, v = typeof Uint8Array > "u" ? e : m(Uint8Array), P = {
|
|
157
157
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
158
158
|
"%Array%": Array,
|
|
159
159
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
|
|
160
|
-
"%ArrayIteratorPrototype%":
|
|
160
|
+
"%ArrayIteratorPrototype%": f ? m([][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%":
|
|
189
|
+
"%IteratorPrototype%": f ? m(m([][Symbol.iterator]())) : e,
|
|
190
190
|
"%JSON%": typeof JSON == "object" ? JSON : e,
|
|
191
191
|
"%Map%": typeof Map > "u" ? e : Map,
|
|
192
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !
|
|
192
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !f ? e : m((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
193
193
|
"%Math%": Math,
|
|
194
194
|
"%Number%": Number,
|
|
195
195
|
"%Object%": Object,
|
|
@@ -202,14 +202,14 @@ 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" || !
|
|
205
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !f ? e : m((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
206
206
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
|
|
207
207
|
"%String%": String,
|
|
208
|
-
"%StringIteratorPrototype%":
|
|
209
|
-
"%Symbol%":
|
|
208
|
+
"%StringIteratorPrototype%": f ? m(""[Symbol.iterator]()) : e,
|
|
209
|
+
"%Symbol%": f ? Symbol : e,
|
|
210
210
|
"%SyntaxError%": r,
|
|
211
|
-
"%ThrowTypeError%":
|
|
212
|
-
"%TypedArray%":
|
|
211
|
+
"%ThrowTypeError%": s,
|
|
212
|
+
"%TypedArray%": v,
|
|
213
213
|
"%TypeError%": t,
|
|
214
214
|
"%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
|
|
215
215
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? e : Uint8ClampedArray,
|
|
@@ -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
|
-
},
|
|
223
|
-
var
|
|
222
|
+
}, b = function L(F) {
|
|
223
|
+
var _;
|
|
224
224
|
if (F === "%AsyncFunction%")
|
|
225
|
-
|
|
225
|
+
_ = n("async function () {}");
|
|
226
226
|
else if (F === "%GeneratorFunction%")
|
|
227
|
-
|
|
227
|
+
_ = n("function* () {}");
|
|
228
228
|
else if (F === "%AsyncGeneratorFunction%")
|
|
229
|
-
|
|
229
|
+
_ = n("async function* () {}");
|
|
230
230
|
else if (F === "%AsyncGenerator%") {
|
|
231
|
-
var
|
|
232
|
-
|
|
231
|
+
var R = L("%AsyncGeneratorFunction%");
|
|
232
|
+
R && (_ = R.prototype);
|
|
233
233
|
} else if (F === "%AsyncIteratorPrototype%") {
|
|
234
|
-
var
|
|
235
|
-
|
|
234
|
+
var N = L("%AsyncGenerator%");
|
|
235
|
+
N && (_ = m(N.prototype));
|
|
236
236
|
}
|
|
237
|
-
return
|
|
238
|
-
},
|
|
237
|
+
return P[F] = _, _;
|
|
238
|
+
}, A = {
|
|
239
239
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
240
240
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
241
241
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -287,94 +287,94 @@ function hr() {
|
|
|
287
287
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
288
288
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
289
289
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
290
|
-
},
|
|
291
|
-
var
|
|
292
|
-
if (
|
|
290
|
+
}, C = yr(), h = et(), d = C.call(Function.call, Array.prototype.concat), E = C.call(Function.apply, Array.prototype.splice), i = C.call(Function.call, String.prototype.replace), c = C.call(Function.call, String.prototype.slice), u = C.call(Function.call, RegExp.prototype.exec), x = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, I = /\\(\\)?/g, O = function(F) {
|
|
291
|
+
var _ = c(F, 0, 1), R = c(F, -1);
|
|
292
|
+
if (_ === "%" && R !== "%")
|
|
293
293
|
throw new r("invalid intrinsic syntax, expected closing `%`");
|
|
294
|
-
if (
|
|
294
|
+
if (R === "%" && _ !== "%")
|
|
295
295
|
throw new r("invalid intrinsic syntax, expected opening `%`");
|
|
296
|
-
var
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
},
|
|
301
|
-
var
|
|
302
|
-
if (
|
|
303
|
-
var
|
|
304
|
-
if (
|
|
296
|
+
var N = [];
|
|
297
|
+
return i(F, x, function(B, H, U, q) {
|
|
298
|
+
N[N.length] = U ? i(q, I, "$1") : H || B;
|
|
299
|
+
}), N;
|
|
300
|
+
}, $ = function(F, _) {
|
|
301
|
+
var R = F, N;
|
|
302
|
+
if (h(A, R) && (N = A[R], R = "%" + N[0] + "%"), h(P, R)) {
|
|
303
|
+
var B = P[R];
|
|
304
|
+
if (B === S && (B = b(R)), typeof B > "u" && !_)
|
|
305
305
|
throw new t("intrinsic " + F + " exists, but is not available. Please file an issue!");
|
|
306
306
|
return {
|
|
307
|
-
alias:
|
|
308
|
-
name:
|
|
309
|
-
value:
|
|
307
|
+
alias: N,
|
|
308
|
+
name: R,
|
|
309
|
+
value: B
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
312
|
throw new r("intrinsic " + F + " does not exist!");
|
|
313
313
|
};
|
|
314
|
-
return rr = function(F,
|
|
314
|
+
return rr = function(F, _) {
|
|
315
315
|
if (typeof F != "string" || F.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 _ != "boolean")
|
|
318
318
|
throw new t('"allowMissing" argument must be a boolean');
|
|
319
|
-
if (
|
|
319
|
+
if (u(/^%?[^%]*%?$/, F) === 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
|
|
324
|
-
var
|
|
325
|
-
if ((
|
|
321
|
+
var R = O(F), N = R.length > 0 ? R[0] : "", B = $("%" + N + "%", _), H = B.name, U = B.value, q = !1, Q = B.alias;
|
|
322
|
+
Q && (N = Q[0], E(R, d([0, 1], Q)));
|
|
323
|
+
for (var z = 1, W = !0; z < R.length; z += 1) {
|
|
324
|
+
var K = R[z], re = c(K, 0, 1), ae = c(K, -1);
|
|
325
|
+
if ((re === '"' || re === "'" || re === "`" || ae === '"' || ae === "'" || ae === "`") && re !== ae)
|
|
326
326
|
throw new r("property names with quotes must have matching quotes");
|
|
327
|
-
if ((
|
|
328
|
-
|
|
329
|
-
else if (
|
|
330
|
-
if (!(
|
|
331
|
-
if (
|
|
327
|
+
if ((K === "constructor" || !W) && (q = !0), N += "." + K, H = "%" + N + "%", h(P, H))
|
|
328
|
+
U = P[H];
|
|
329
|
+
else if (U != null) {
|
|
330
|
+
if (!(K in U)) {
|
|
331
|
+
if (!_)
|
|
332
332
|
throw new t("base intrinsic for " + F + " exists, but the property is not available.");
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
if (o &&
|
|
336
|
-
var
|
|
337
|
-
|
|
335
|
+
if (o && z + 1 >= R.length) {
|
|
336
|
+
var ne = o(U, K);
|
|
337
|
+
W = !!ne, W && "get" in ne && !("originalValue" in ne.get) ? U = ne.get : U = U[K];
|
|
338
338
|
} else
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
W = h(U, K), U = U[K];
|
|
340
|
+
W && !q && (P[H] = U);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
return
|
|
343
|
+
return U;
|
|
344
344
|
}, rr;
|
|
345
345
|
}
|
|
346
|
-
var tr = { exports: {} },
|
|
346
|
+
var tr = { exports: {} }, Rr;
|
|
347
347
|
function rt() {
|
|
348
|
-
return
|
|
349
|
-
var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), n = a("%Function.prototype.call%"), o = a("%Reflect.apply%", !0) || r.call(n, t), p = a("%Object.getOwnPropertyDescriptor%", !0),
|
|
350
|
-
if (
|
|
348
|
+
return Rr || (Rr = 1, (function(e) {
|
|
349
|
+
var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), n = a("%Function.prototype.call%"), o = a("%Reflect.apply%", !0) || r.call(n, t), p = a("%Object.getOwnPropertyDescriptor%", !0), s = a("%Object.defineProperty%", !0), f = a("%Math.max%");
|
|
350
|
+
if (s)
|
|
351
351
|
try {
|
|
352
|
-
|
|
352
|
+
s({}, "a", { value: 1 });
|
|
353
353
|
} catch {
|
|
354
|
-
|
|
354
|
+
s = null;
|
|
355
355
|
}
|
|
356
|
-
e.exports = function(
|
|
357
|
-
var
|
|
358
|
-
if (p &&
|
|
359
|
-
var
|
|
360
|
-
|
|
361
|
-
|
|
356
|
+
e.exports = function(v) {
|
|
357
|
+
var P = o(r, n, arguments);
|
|
358
|
+
if (p && s) {
|
|
359
|
+
var b = p(P, "length");
|
|
360
|
+
b.configurable && s(
|
|
361
|
+
P,
|
|
362
362
|
"length",
|
|
363
|
-
{ value: 1 +
|
|
363
|
+
{ value: 1 + f(0, v.length - (arguments.length - 1)) }
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return P;
|
|
367
367
|
};
|
|
368
|
-
var
|
|
368
|
+
var m = function() {
|
|
369
369
|
return o(r, t, arguments);
|
|
370
370
|
};
|
|
371
|
-
|
|
371
|
+
s ? s(e.exports, "apply", { value: m }) : e.exports.apply = m;
|
|
372
372
|
})(tr)), tr.exports;
|
|
373
373
|
}
|
|
374
|
-
var ar,
|
|
374
|
+
var ar, kr;
|
|
375
375
|
function tt() {
|
|
376
|
-
if (
|
|
377
|
-
|
|
376
|
+
if (kr) return ar;
|
|
377
|
+
kr = 1;
|
|
378
378
|
var e = hr(), r = rt(), a = r(e("String.prototype.indexOf"));
|
|
379
379
|
return ar = function(n, o) {
|
|
380
380
|
var p = e(n, !!o);
|
|
@@ -384,358 +384,358 @@ function tt() {
|
|
|
384
384
|
const at = {}, nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
385
385
|
__proto__: null,
|
|
386
386
|
default: at
|
|
387
|
-
}, Symbol.toStringTag, { value: "Module" })), it = /* @__PURE__ */
|
|
387
|
+
}, Symbol.toStringTag, { value: "Module" })), it = /* @__PURE__ */ qr(nt);
|
|
388
388
|
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, a = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, n = typeof Set == "function" && Set.prototype, o = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, p = n && o && typeof o.get == "function" ? o.get : null,
|
|
393
|
-
return
|
|
392
|
+
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, a = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, n = typeof Set == "function" && Set.prototype, o = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, p = n && o && typeof o.get == "function" ? o.get : null, s = n && Set.prototype.forEach, f = typeof WeakMap == "function" && WeakMap.prototype, m = f ? WeakMap.prototype.has : null, S = typeof WeakSet == "function" && WeakSet.prototype, v = S ? WeakSet.prototype.has : null, P = typeof WeakRef == "function" && WeakRef.prototype, b = P ? WeakRef.prototype.deref : null, A = Boolean.prototype.valueOf, C = Object.prototype.toString, h = Function.prototype.toString, d = String.prototype.match, E = String.prototype.slice, i = String.prototype.replace, c = String.prototype.toUpperCase, u = String.prototype.toLowerCase, x = RegExp.prototype.test, I = Array.prototype.concat, O = Array.prototype.join, $ = Array.prototype.slice, L = Math.floor, F = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, _ = Object.getOwnPropertySymbols, R = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, N = typeof Symbol == "function" && typeof Symbol.iterator == "object", B = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === N || !0) ? Symbol.toStringTag : null, H = Object.prototype.propertyIsEnumerable, U = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(y) {
|
|
393
|
+
return y.__proto__;
|
|
394
394
|
} : null);
|
|
395
|
-
function
|
|
396
|
-
if (
|
|
397
|
-
return
|
|
395
|
+
function q(y, g) {
|
|
396
|
+
if (y === 1 / 0 || y === -1 / 0 || y !== y || y && y > -1e3 && y < 1e3 || x.call(/e/, g))
|
|
397
|
+
return g;
|
|
398
398
|
var j = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
399
|
-
if (typeof
|
|
400
|
-
var
|
|
401
|
-
if (
|
|
402
|
-
var w = String(
|
|
403
|
-
return
|
|
399
|
+
if (typeof y == "number") {
|
|
400
|
+
var l = y < 0 ? -L(-y) : L(y);
|
|
401
|
+
if (l !== y) {
|
|
402
|
+
var w = String(l), M = E.call(g, w.length + 1);
|
|
403
|
+
return i.call(w, j, "$&_") + "." + i.call(i.call(M, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
return
|
|
406
|
+
return i.call(g, j, "$&_");
|
|
407
407
|
}
|
|
408
|
-
var Q = it,
|
|
409
|
-
nr = function
|
|
410
|
-
var
|
|
411
|
-
if (
|
|
408
|
+
var Q = it, z = Q.custom, W = se(z) ? z : null;
|
|
409
|
+
nr = function y(g, j, l, w) {
|
|
410
|
+
var M = j || {};
|
|
411
|
+
if (Y(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
412
412
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
413
|
-
if (
|
|
413
|
+
if (Y(M, "maxStringLength") && (typeof M.maxStringLength == "number" ? M.maxStringLength < 0 && M.maxStringLength !== 1 / 0 : M.maxStringLength !== null))
|
|
414
414
|
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
415
|
-
var D =
|
|
415
|
+
var D = Y(M, "customInspect") ? M.customInspect : !0;
|
|
416
416
|
if (typeof D != "boolean" && D !== "symbol")
|
|
417
417
|
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
418
|
-
if (
|
|
418
|
+
if (Y(M, "indent") && M.indent !== null && M.indent !== " " && !(parseInt(M.indent, 10) === M.indent && M.indent > 0))
|
|
419
419
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
420
|
-
if (
|
|
420
|
+
if (Y(M, "numericSeparator") && typeof M.numericSeparator != "boolean")
|
|
421
421
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
422
|
-
var
|
|
423
|
-
if (typeof
|
|
422
|
+
var ie = M.numericSeparator;
|
|
423
|
+
if (typeof g > "u")
|
|
424
424
|
return "undefined";
|
|
425
|
-
if (
|
|
425
|
+
if (g === null)
|
|
426
426
|
return "null";
|
|
427
|
-
if (typeof
|
|
428
|
-
return
|
|
429
|
-
if (typeof
|
|
430
|
-
return Ce(
|
|
431
|
-
if (typeof
|
|
432
|
-
if (
|
|
433
|
-
return 1 / 0 /
|
|
434
|
-
var
|
|
435
|
-
return
|
|
427
|
+
if (typeof g == "boolean")
|
|
428
|
+
return g ? "true" : "false";
|
|
429
|
+
if (typeof g == "string")
|
|
430
|
+
return Ce(g, M);
|
|
431
|
+
if (typeof g == "number") {
|
|
432
|
+
if (g === 0)
|
|
433
|
+
return 1 / 0 / g > 0 ? "0" : "-0";
|
|
434
|
+
var J = String(g);
|
|
435
|
+
return ie ? q(g, J) : J;
|
|
436
436
|
}
|
|
437
|
-
if (typeof
|
|
438
|
-
var
|
|
439
|
-
return
|
|
437
|
+
if (typeof g == "bigint") {
|
|
438
|
+
var T = String(g) + "n";
|
|
439
|
+
return ie ? q(g, T) : T;
|
|
440
440
|
}
|
|
441
|
-
var
|
|
442
|
-
if (typeof
|
|
443
|
-
return
|
|
444
|
-
var V = Le(
|
|
441
|
+
var G = typeof M.depth > "u" ? 5 : M.depth;
|
|
442
|
+
if (typeof l > "u" && (l = 0), l >= G && G > 0 && typeof g == "object")
|
|
443
|
+
return ae(g) ? "[Array]" : "[Object]";
|
|
444
|
+
var V = Le(M, l);
|
|
445
445
|
if (typeof w > "u")
|
|
446
446
|
w = [];
|
|
447
|
-
else if (
|
|
447
|
+
else if (xe(w, g) >= 0)
|
|
448
448
|
return "[Circular]";
|
|
449
|
-
function
|
|
450
|
-
if (Ge && (w =
|
|
451
|
-
var
|
|
452
|
-
depth:
|
|
449
|
+
function Z(Me, Ge, Jr) {
|
|
450
|
+
if (Ge && (w = $.call(w), w.push(Ge)), Jr) {
|
|
451
|
+
var xr = {
|
|
452
|
+
depth: M.depth
|
|
453
453
|
};
|
|
454
|
-
return
|
|
454
|
+
return Y(M, "quoteStyle") && (xr.quoteStyle = M.quoteStyle), y(Me, xr, l + 1, w);
|
|
455
455
|
}
|
|
456
|
-
return
|
|
456
|
+
return y(Me, M, l + 1, w);
|
|
457
457
|
}
|
|
458
|
-
if (typeof
|
|
459
|
-
var
|
|
460
|
-
return "[Function" + (
|
|
458
|
+
if (typeof g == "function" && !ce(g)) {
|
|
459
|
+
var ee = Ie(g), we = ge(g, Z);
|
|
460
|
+
return "[Function" + (ee ? ": " + ee : " (anonymous)") + "]" + (we.length > 0 ? " { " + O.call(we, ", ") + " }" : "");
|
|
461
461
|
}
|
|
462
|
-
if (se(
|
|
463
|
-
var Ar =
|
|
464
|
-
return typeof
|
|
462
|
+
if (se(g)) {
|
|
463
|
+
var Ar = N ? i.call(String(g), /^(Symbol\(.*\))_[^)]*$/, "$1") : R.call(g);
|
|
464
|
+
return typeof g == "object" && !N ? le(Ar) : Ar;
|
|
465
465
|
}
|
|
466
|
-
if (_e(
|
|
467
|
-
for (var Fe = "<" +
|
|
468
|
-
Fe += " " + ze[Be].name + "=" +
|
|
469
|
-
return Fe += ">",
|
|
466
|
+
if (_e(g)) {
|
|
467
|
+
for (var Fe = "<" + u.call(String(g.nodeName)), ze = g.attributes || [], Be = 0; Be < ze.length; Be++)
|
|
468
|
+
Fe += " " + ze[Be].name + "=" + K(re(ze[Be].value), "double", M);
|
|
469
|
+
return Fe += ">", g.childNodes && g.childNodes.length && (Fe += "..."), Fe += "</" + u.call(String(g.nodeName)) + ">", Fe;
|
|
470
470
|
}
|
|
471
|
-
if (
|
|
472
|
-
if (
|
|
471
|
+
if (ae(g)) {
|
|
472
|
+
if (g.length === 0)
|
|
473
473
|
return "[]";
|
|
474
|
-
var We = ge(
|
|
474
|
+
var We = ge(g, Z);
|
|
475
475
|
return V && !Oe(We) ? "[" + he(We, V) + "]" : "[ " + O.call(We, ", ") + " ]";
|
|
476
476
|
}
|
|
477
|
-
if (ue(
|
|
478
|
-
var Ke = ge(
|
|
479
|
-
return !("cause" in Error.prototype) && "cause" in
|
|
477
|
+
if (ue(g)) {
|
|
478
|
+
var Ke = ge(g, Z);
|
|
479
|
+
return !("cause" in Error.prototype) && "cause" in g && !H.call(g, "cause") ? "{ [" + String(g) + "] " + O.call(I.call("[cause]: " + Z(g.cause), Ke), ", ") + " }" : Ke.length === 0 ? "[" + String(g) + "]" : "{ [" + String(g) + "] " + O.call(Ke, ", ") + " }";
|
|
480
480
|
}
|
|
481
|
-
if (typeof
|
|
482
|
-
if (
|
|
483
|
-
return Q(
|
|
484
|
-
if (D !== "symbol" && typeof
|
|
485
|
-
return
|
|
481
|
+
if (typeof g == "object" && D) {
|
|
482
|
+
if (W && typeof g[W] == "function" && Q)
|
|
483
|
+
return Q(g, { depth: G - l });
|
|
484
|
+
if (D !== "symbol" && typeof g.inspect == "function")
|
|
485
|
+
return g.inspect();
|
|
486
486
|
}
|
|
487
|
-
if (
|
|
487
|
+
if (Te(g)) {
|
|
488
488
|
var br = [];
|
|
489
|
-
return t.call(
|
|
490
|
-
br.push(
|
|
491
|
-
}), Se("Map", a.call(
|
|
489
|
+
return t.call(g, function(Me, Ge) {
|
|
490
|
+
br.push(Z(Ge, g, !0) + " => " + Z(Me, g));
|
|
491
|
+
}), Se("Map", a.call(g), br, V);
|
|
492
492
|
}
|
|
493
|
-
if (
|
|
493
|
+
if (Re(g)) {
|
|
494
494
|
var Sr = [];
|
|
495
|
-
return
|
|
496
|
-
Sr.push(
|
|
497
|
-
}), Se("Set", p.call(
|
|
495
|
+
return s.call(g, function(Me) {
|
|
496
|
+
Sr.push(Z(Me, g));
|
|
497
|
+
}), Se("Set", p.call(g), Sr, V);
|
|
498
498
|
}
|
|
499
|
-
if (me(
|
|
499
|
+
if (me(g))
|
|
500
500
|
return fe("WeakMap");
|
|
501
|
-
if (
|
|
501
|
+
if (ke(g))
|
|
502
502
|
return fe("WeakSet");
|
|
503
|
-
if (
|
|
503
|
+
if (Pe(g))
|
|
504
504
|
return fe("WeakRef");
|
|
505
|
-
if (de(
|
|
506
|
-
return le(
|
|
507
|
-
if (ye(
|
|
508
|
-
return le(
|
|
509
|
-
if (pe(
|
|
510
|
-
return le(
|
|
511
|
-
if (oe(
|
|
512
|
-
return le(
|
|
513
|
-
if (!
|
|
514
|
-
var He = ge(
|
|
515
|
-
return He.length === 0 ?
|
|
505
|
+
if (de(g))
|
|
506
|
+
return le(Z(Number(g)));
|
|
507
|
+
if (ye(g))
|
|
508
|
+
return le(Z(F.call(g)));
|
|
509
|
+
if (pe(g))
|
|
510
|
+
return le(A.call(g));
|
|
511
|
+
if (oe(g))
|
|
512
|
+
return le(Z(String(g)));
|
|
513
|
+
if (!ne(g) && !ce(g)) {
|
|
514
|
+
var He = ge(g, Z), wr = U ? U(g) === Object.prototype : g instanceof Object || g.constructor === Object, Je = g instanceof Object ? "" : "null prototype", Er = !wr && B && Object(g) === g && B in g ? E.call(te(g), 8, -1) : Je ? "Object" : "", Hr = wr || typeof g.constructor != "function" ? "" : g.constructor.name ? g.constructor.name + " " : "", Ze = Hr + (Er || Je ? "[" + O.call(I.call([], Er || [], Je || []), ": ") + "] " : "");
|
|
515
|
+
return He.length === 0 ? Ze + "{}" : V ? Ze + "{" + he(He, V) + "}" : Ze + "{ " + O.call(He, ", ") + " }";
|
|
516
516
|
}
|
|
517
|
-
return String(
|
|
517
|
+
return String(g);
|
|
518
518
|
};
|
|
519
|
-
function
|
|
520
|
-
var
|
|
521
|
-
return
|
|
519
|
+
function K(y, g, j) {
|
|
520
|
+
var l = (j.quoteStyle || g) === "double" ? '"' : "'";
|
|
521
|
+
return l + y + l;
|
|
522
522
|
}
|
|
523
|
-
function
|
|
524
|
-
return
|
|
523
|
+
function re(y) {
|
|
524
|
+
return i.call(String(y), /"/g, """);
|
|
525
525
|
}
|
|
526
|
-
function
|
|
527
|
-
return
|
|
526
|
+
function ae(y) {
|
|
527
|
+
return te(y) === "[object Array]" && (!B || !(typeof y == "object" && B in y));
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
return
|
|
529
|
+
function ne(y) {
|
|
530
|
+
return te(y) === "[object Date]" && (!B || !(typeof y == "object" && B in y));
|
|
531
531
|
}
|
|
532
|
-
function ce(
|
|
533
|
-
return
|
|
532
|
+
function ce(y) {
|
|
533
|
+
return te(y) === "[object RegExp]" && (!B || !(typeof y == "object" && B in y));
|
|
534
534
|
}
|
|
535
|
-
function ue(
|
|
536
|
-
return
|
|
535
|
+
function ue(y) {
|
|
536
|
+
return te(y) === "[object Error]" && (!B || !(typeof y == "object" && B in y));
|
|
537
537
|
}
|
|
538
|
-
function oe(
|
|
539
|
-
return
|
|
538
|
+
function oe(y) {
|
|
539
|
+
return te(y) === "[object String]" && (!B || !(typeof y == "object" && B in y));
|
|
540
540
|
}
|
|
541
|
-
function de(
|
|
542
|
-
return
|
|
541
|
+
function de(y) {
|
|
542
|
+
return te(y) === "[object Number]" && (!B || !(typeof y == "object" && B in y));
|
|
543
543
|
}
|
|
544
|
-
function pe(
|
|
545
|
-
return
|
|
544
|
+
function pe(y) {
|
|
545
|
+
return te(y) === "[object Boolean]" && (!B || !(typeof y == "object" && B in y));
|
|
546
546
|
}
|
|
547
|
-
function se(
|
|
548
|
-
if (
|
|
549
|
-
return
|
|
550
|
-
if (typeof
|
|
547
|
+
function se(y) {
|
|
548
|
+
if (N)
|
|
549
|
+
return y && typeof y == "object" && y instanceof Symbol;
|
|
550
|
+
if (typeof y == "symbol")
|
|
551
551
|
return !0;
|
|
552
|
-
if (!
|
|
552
|
+
if (!y || typeof y != "object" || !R)
|
|
553
553
|
return !1;
|
|
554
554
|
try {
|
|
555
|
-
return
|
|
555
|
+
return R.call(y), !0;
|
|
556
556
|
} catch {
|
|
557
557
|
}
|
|
558
558
|
return !1;
|
|
559
559
|
}
|
|
560
|
-
function ye(
|
|
561
|
-
if (!
|
|
560
|
+
function ye(y) {
|
|
561
|
+
if (!y || typeof y != "object" || !F)
|
|
562
562
|
return !1;
|
|
563
563
|
try {
|
|
564
|
-
return F.call(
|
|
564
|
+
return F.call(y), !0;
|
|
565
565
|
} catch {
|
|
566
566
|
}
|
|
567
567
|
return !1;
|
|
568
568
|
}
|
|
569
|
-
var be = Object.prototype.hasOwnProperty || function(
|
|
570
|
-
return
|
|
569
|
+
var be = Object.prototype.hasOwnProperty || function(y) {
|
|
570
|
+
return y in this;
|
|
571
571
|
};
|
|
572
|
-
function
|
|
573
|
-
return be.call(
|
|
574
|
-
}
|
|
575
|
-
function
|
|
576
|
-
return
|
|
577
|
-
}
|
|
578
|
-
function Ie(
|
|
579
|
-
if (
|
|
580
|
-
return
|
|
581
|
-
var
|
|
582
|
-
return
|
|
583
|
-
}
|
|
584
|
-
function
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
587
|
-
for (var j = 0,
|
|
588
|
-
if (
|
|
572
|
+
function Y(y, g) {
|
|
573
|
+
return be.call(y, g);
|
|
574
|
+
}
|
|
575
|
+
function te(y) {
|
|
576
|
+
return C.call(y);
|
|
577
|
+
}
|
|
578
|
+
function Ie(y) {
|
|
579
|
+
if (y.name)
|
|
580
|
+
return y.name;
|
|
581
|
+
var g = d.call(h.call(y), /^function\s*([\w$]+)/);
|
|
582
|
+
return g ? g[1] : null;
|
|
583
|
+
}
|
|
584
|
+
function xe(y, g) {
|
|
585
|
+
if (y.indexOf)
|
|
586
|
+
return y.indexOf(g);
|
|
587
|
+
for (var j = 0, l = y.length; j < l; j++)
|
|
588
|
+
if (y[j] === g)
|
|
589
589
|
return j;
|
|
590
590
|
return -1;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
if (!a || !
|
|
592
|
+
function Te(y) {
|
|
593
|
+
if (!a || !y || typeof y != "object")
|
|
594
594
|
return !1;
|
|
595
595
|
try {
|
|
596
|
-
a.call(
|
|
596
|
+
a.call(y);
|
|
597
597
|
try {
|
|
598
|
-
p.call(
|
|
598
|
+
p.call(y);
|
|
599
599
|
} catch {
|
|
600
600
|
return !0;
|
|
601
601
|
}
|
|
602
|
-
return
|
|
602
|
+
return y instanceof Map;
|
|
603
603
|
} catch {
|
|
604
604
|
}
|
|
605
605
|
return !1;
|
|
606
606
|
}
|
|
607
|
-
function me(
|
|
608
|
-
if (!
|
|
607
|
+
function me(y) {
|
|
608
|
+
if (!m || !y || typeof y != "object")
|
|
609
609
|
return !1;
|
|
610
610
|
try {
|
|
611
|
-
|
|
611
|
+
m.call(y, m);
|
|
612
612
|
try {
|
|
613
|
-
|
|
613
|
+
v.call(y, v);
|
|
614
614
|
} catch {
|
|
615
615
|
return !0;
|
|
616
616
|
}
|
|
617
|
-
return
|
|
617
|
+
return y instanceof WeakMap;
|
|
618
618
|
} catch {
|
|
619
619
|
}
|
|
620
620
|
return !1;
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
if (!
|
|
622
|
+
function Pe(y) {
|
|
623
|
+
if (!b || !y || typeof y != "object")
|
|
624
624
|
return !1;
|
|
625
625
|
try {
|
|
626
|
-
return
|
|
626
|
+
return b.call(y), !0;
|
|
627
627
|
} catch {
|
|
628
628
|
}
|
|
629
629
|
return !1;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
if (!p || !
|
|
631
|
+
function Re(y) {
|
|
632
|
+
if (!p || !y || typeof y != "object")
|
|
633
633
|
return !1;
|
|
634
634
|
try {
|
|
635
|
-
p.call(
|
|
635
|
+
p.call(y);
|
|
636
636
|
try {
|
|
637
|
-
a.call(
|
|
637
|
+
a.call(y);
|
|
638
638
|
} catch {
|
|
639
639
|
return !0;
|
|
640
640
|
}
|
|
641
|
-
return
|
|
641
|
+
return y instanceof Set;
|
|
642
642
|
} catch {
|
|
643
643
|
}
|
|
644
644
|
return !1;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
if (!
|
|
646
|
+
function ke(y) {
|
|
647
|
+
if (!v || !y || typeof y != "object")
|
|
648
648
|
return !1;
|
|
649
649
|
try {
|
|
650
|
-
|
|
650
|
+
v.call(y, v);
|
|
651
651
|
try {
|
|
652
|
-
|
|
652
|
+
m.call(y, m);
|
|
653
653
|
} catch {
|
|
654
654
|
return !0;
|
|
655
655
|
}
|
|
656
|
-
return
|
|
656
|
+
return y instanceof WeakSet;
|
|
657
657
|
} catch {
|
|
658
658
|
}
|
|
659
659
|
return !1;
|
|
660
660
|
}
|
|
661
|
-
function _e(
|
|
662
|
-
return !
|
|
661
|
+
function _e(y) {
|
|
662
|
+
return !y || typeof y != "object" ? !1 : typeof HTMLElement < "u" && y instanceof HTMLElement ? !0 : typeof y.nodeName == "string" && typeof y.getAttribute == "function";
|
|
663
663
|
}
|
|
664
|
-
function Ce(
|
|
665
|
-
if (
|
|
666
|
-
var j =
|
|
667
|
-
return Ce(
|
|
664
|
+
function Ce(y, g) {
|
|
665
|
+
if (y.length > g.maxStringLength) {
|
|
666
|
+
var j = y.length - g.maxStringLength, l = "... " + j + " more character" + (j > 1 ? "s" : "");
|
|
667
|
+
return Ce(E.call(y, 0, g.maxStringLength), g) + l;
|
|
668
668
|
}
|
|
669
|
-
var w =
|
|
670
|
-
return
|
|
669
|
+
var w = i.call(i.call(y, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ne);
|
|
670
|
+
return K(w, "single", g);
|
|
671
671
|
}
|
|
672
|
-
function Ne(
|
|
673
|
-
var
|
|
672
|
+
function Ne(y) {
|
|
673
|
+
var g = y.charCodeAt(0), j = {
|
|
674
674
|
8: "b",
|
|
675
675
|
9: "t",
|
|
676
676
|
10: "n",
|
|
677
677
|
12: "f",
|
|
678
678
|
13: "r"
|
|
679
|
-
}[
|
|
680
|
-
return j ? "\\" + j : "\\x" + (
|
|
679
|
+
}[g];
|
|
680
|
+
return j ? "\\" + j : "\\x" + (g < 16 ? "0" : "") + c.call(g.toString(16));
|
|
681
681
|
}
|
|
682
|
-
function le(
|
|
683
|
-
return "Object(" +
|
|
682
|
+
function le(y) {
|
|
683
|
+
return "Object(" + y + ")";
|
|
684
684
|
}
|
|
685
|
-
function fe(
|
|
686
|
-
return
|
|
685
|
+
function fe(y) {
|
|
686
|
+
return y + " { ? }";
|
|
687
687
|
}
|
|
688
|
-
function Se(
|
|
689
|
-
var w =
|
|
690
|
-
return
|
|
688
|
+
function Se(y, g, j, l) {
|
|
689
|
+
var w = l ? he(j, l) : O.call(j, ", ");
|
|
690
|
+
return y + " (" + g + ") {" + w + "}";
|
|
691
691
|
}
|
|
692
|
-
function Oe(
|
|
693
|
-
for (var
|
|
694
|
-
if (
|
|
692
|
+
function Oe(y) {
|
|
693
|
+
for (var g = 0; g < y.length; g++)
|
|
694
|
+
if (xe(y[g], `
|
|
695
695
|
`) >= 0)
|
|
696
696
|
return !1;
|
|
697
697
|
return !0;
|
|
698
698
|
}
|
|
699
|
-
function Le(
|
|
699
|
+
function Le(y, g) {
|
|
700
700
|
var j;
|
|
701
|
-
if (
|
|
701
|
+
if (y.indent === " ")
|
|
702
702
|
j = " ";
|
|
703
|
-
else if (typeof
|
|
704
|
-
j = O.call(Array(
|
|
703
|
+
else if (typeof y.indent == "number" && y.indent > 0)
|
|
704
|
+
j = O.call(Array(y.indent + 1), " ");
|
|
705
705
|
else
|
|
706
706
|
return null;
|
|
707
707
|
return {
|
|
708
708
|
base: j,
|
|
709
|
-
prev: O.call(Array(
|
|
709
|
+
prev: O.call(Array(g + 1), j)
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function he(
|
|
713
|
-
if (
|
|
712
|
+
function he(y, g) {
|
|
713
|
+
if (y.length === 0)
|
|
714
714
|
return "";
|
|
715
715
|
var j = `
|
|
716
|
-
` +
|
|
717
|
-
return j + O.call(
|
|
718
|
-
` +
|
|
716
|
+
` + g.prev + g.base;
|
|
717
|
+
return j + O.call(y, "," + j) + `
|
|
718
|
+
` + g.prev;
|
|
719
719
|
}
|
|
720
|
-
function ge(
|
|
721
|
-
var j =
|
|
720
|
+
function ge(y, g) {
|
|
721
|
+
var j = ae(y), l = [];
|
|
722
722
|
if (j) {
|
|
723
|
-
|
|
724
|
-
for (var w = 0; w <
|
|
725
|
-
|
|
723
|
+
l.length = y.length;
|
|
724
|
+
for (var w = 0; w < y.length; w++)
|
|
725
|
+
l[w] = Y(y, w) ? g(y[w], y) : "";
|
|
726
726
|
}
|
|
727
|
-
var
|
|
728
|
-
if (
|
|
727
|
+
var M = typeof _ == "function" ? _(y) : [], D;
|
|
728
|
+
if (N) {
|
|
729
729
|
D = {};
|
|
730
|
-
for (var
|
|
731
|
-
D["$" +
|
|
730
|
+
for (var ie = 0; ie < M.length; ie++)
|
|
731
|
+
D["$" + M[ie]] = M[ie];
|
|
732
732
|
}
|
|
733
|
-
for (var
|
|
734
|
-
|
|
735
|
-
if (typeof
|
|
736
|
-
for (var
|
|
737
|
-
|
|
738
|
-
return
|
|
733
|
+
for (var J in y)
|
|
734
|
+
Y(y, J) && (j && String(Number(J)) === J && J < y.length || N && D["$" + J] instanceof Symbol || (x.call(/[^\w$]/, J) ? l.push(g(J, y) + ": " + g(y[J], y)) : l.push(J + ": " + g(y[J], y))));
|
|
735
|
+
if (typeof _ == "function")
|
|
736
|
+
for (var T = 0; T < M.length; T++)
|
|
737
|
+
H.call(y, M[T]) && l.push("[" + g(M[T]) + "]: " + g(y[M[T]], y));
|
|
738
|
+
return l;
|
|
739
739
|
}
|
|
740
740
|
return nr;
|
|
741
741
|
}
|
|
@@ -743,56 +743,56 @@ var ir, Nr;
|
|
|
743
743
|
function st() {
|
|
744
744
|
if (Nr) return ir;
|
|
745
745
|
Nr = 1;
|
|
746
|
-
var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), n = e("%WeakMap%", !0), o = e("%Map%", !0), p = r("WeakMap.prototype.get", !0),
|
|
747
|
-
for (var
|
|
748
|
-
if (
|
|
749
|
-
return
|
|
750
|
-
},
|
|
751
|
-
var
|
|
752
|
-
return
|
|
753
|
-
},
|
|
754
|
-
var
|
|
755
|
-
|
|
746
|
+
var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), n = e("%WeakMap%", !0), o = e("%Map%", !0), p = r("WeakMap.prototype.get", !0), s = r("WeakMap.prototype.set", !0), f = r("WeakMap.prototype.has", !0), m = r("Map.prototype.get", !0), S = r("Map.prototype.set", !0), v = r("Map.prototype.has", !0), P = function(h, d) {
|
|
747
|
+
for (var E = h, i; (i = E.next) !== null; E = i)
|
|
748
|
+
if (i.key === d)
|
|
749
|
+
return E.next = i.next, i.next = h.next, h.next = i, i;
|
|
750
|
+
}, b = function(h, d) {
|
|
751
|
+
var E = P(h, d);
|
|
752
|
+
return E && E.value;
|
|
753
|
+
}, A = function(h, d, E) {
|
|
754
|
+
var i = P(h, d);
|
|
755
|
+
i ? i.value = E : h.next = {
|
|
756
756
|
// eslint-disable-line no-param-reassign
|
|
757
|
-
key:
|
|
758
|
-
next:
|
|
759
|
-
value:
|
|
757
|
+
key: d,
|
|
758
|
+
next: h.next,
|
|
759
|
+
value: E
|
|
760
760
|
};
|
|
761
|
-
},
|
|
762
|
-
return !!
|
|
761
|
+
}, C = function(h, d) {
|
|
762
|
+
return !!P(h, d);
|
|
763
763
|
};
|
|
764
764
|
return ir = function() {
|
|
765
|
-
var
|
|
766
|
-
assert: function(
|
|
767
|
-
if (!
|
|
768
|
-
throw new t("Side channel does not contain " + a(
|
|
765
|
+
var d, E, i, c = {
|
|
766
|
+
assert: function(u) {
|
|
767
|
+
if (!c.has(u))
|
|
768
|
+
throw new t("Side channel does not contain " + a(u));
|
|
769
769
|
},
|
|
770
|
-
get: function(
|
|
771
|
-
if (n &&
|
|
772
|
-
if (
|
|
773
|
-
return p(
|
|
770
|
+
get: function(u) {
|
|
771
|
+
if (n && u && (typeof u == "object" || typeof u == "function")) {
|
|
772
|
+
if (d)
|
|
773
|
+
return p(d, u);
|
|
774
774
|
} else if (o) {
|
|
775
|
-
if (
|
|
776
|
-
return
|
|
777
|
-
} else if (
|
|
778
|
-
return i
|
|
775
|
+
if (E)
|
|
776
|
+
return m(E, u);
|
|
777
|
+
} else if (i)
|
|
778
|
+
return b(i, u);
|
|
779
779
|
},
|
|
780
|
-
has: function(
|
|
781
|
-
if (n &&
|
|
782
|
-
if (
|
|
783
|
-
return
|
|
780
|
+
has: function(u) {
|
|
781
|
+
if (n && u && (typeof u == "object" || typeof u == "function")) {
|
|
782
|
+
if (d)
|
|
783
|
+
return f(d, u);
|
|
784
784
|
} else if (o) {
|
|
785
|
-
if (
|
|
786
|
-
return
|
|
787
|
-
} else if (
|
|
788
|
-
return
|
|
785
|
+
if (E)
|
|
786
|
+
return v(E, u);
|
|
787
|
+
} else if (i)
|
|
788
|
+
return C(i, u);
|
|
789
789
|
return !1;
|
|
790
790
|
},
|
|
791
|
-
set: function(
|
|
792
|
-
n &&
|
|
791
|
+
set: function(u, x) {
|
|
792
|
+
n && u && (typeof u == "object" || typeof u == "function") ? (d || (d = new n()), s(d, u, x)) : o ? (E || (E = new o()), S(E, u, x)) : (i || (i = { key: {}, next: null }), A(i, u, x));
|
|
793
793
|
}
|
|
794
794
|
};
|
|
795
|
-
return
|
|
795
|
+
return c;
|
|
796
796
|
}, ir;
|
|
797
797
|
}
|
|
798
798
|
var or, Lr;
|
|
@@ -822,120 +822,120 @@ function Wr() {
|
|
|
822
822
|
if (Fr) return sr;
|
|
823
823
|
Fr = 1;
|
|
824
824
|
var e = gr(), r = Object.prototype.hasOwnProperty, a = Array.isArray, t = (function() {
|
|
825
|
-
for (var
|
|
826
|
-
|
|
827
|
-
return
|
|
828
|
-
})(), n = function(
|
|
829
|
-
for (;
|
|
830
|
-
var
|
|
831
|
-
if (a(
|
|
832
|
-
for (var
|
|
833
|
-
typeof
|
|
834
|
-
|
|
825
|
+
for (var C = [], h = 0; h < 256; ++h)
|
|
826
|
+
C.push("%" + ((h < 16 ? "0" : "") + h.toString(16)).toUpperCase());
|
|
827
|
+
return C;
|
|
828
|
+
})(), n = function(h) {
|
|
829
|
+
for (; h.length > 1; ) {
|
|
830
|
+
var d = h.pop(), E = d.obj[d.prop];
|
|
831
|
+
if (a(E)) {
|
|
832
|
+
for (var i = [], c = 0; c < E.length; ++c)
|
|
833
|
+
typeof E[c] < "u" && i.push(E[c]);
|
|
834
|
+
d.obj[d.prop] = i;
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
}, o = function(
|
|
838
|
-
for (var
|
|
839
|
-
typeof
|
|
840
|
-
return
|
|
841
|
-
}, p = function
|
|
842
|
-
if (!
|
|
843
|
-
return
|
|
844
|
-
if (typeof
|
|
845
|
-
if (a(
|
|
846
|
-
|
|
847
|
-
else if (
|
|
848
|
-
(
|
|
837
|
+
}, o = function(h, d) {
|
|
838
|
+
for (var E = d && d.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, i = 0; i < h.length; ++i)
|
|
839
|
+
typeof h[i] < "u" && (E[i] = h[i]);
|
|
840
|
+
return E;
|
|
841
|
+
}, p = function C(h, d, E) {
|
|
842
|
+
if (!d)
|
|
843
|
+
return h;
|
|
844
|
+
if (typeof d != "object") {
|
|
845
|
+
if (a(h))
|
|
846
|
+
h.push(d);
|
|
847
|
+
else if (h && typeof h == "object")
|
|
848
|
+
(E && (E.plainObjects || E.allowPrototypes) || !r.call(Object.prototype, d)) && (h[d] = !0);
|
|
849
849
|
else
|
|
850
|
-
return [
|
|
851
|
-
return
|
|
850
|
+
return [h, d];
|
|
851
|
+
return h;
|
|
852
852
|
}
|
|
853
|
-
if (!
|
|
854
|
-
return [
|
|
855
|
-
var
|
|
856
|
-
return a(
|
|
857
|
-
if (r.call(
|
|
858
|
-
var
|
|
859
|
-
|
|
853
|
+
if (!h || typeof h != "object")
|
|
854
|
+
return [h].concat(d);
|
|
855
|
+
var i = h;
|
|
856
|
+
return a(h) && !a(d) && (i = o(h, E)), a(h) && a(d) ? (d.forEach(function(c, u) {
|
|
857
|
+
if (r.call(h, u)) {
|
|
858
|
+
var x = h[u];
|
|
859
|
+
x && typeof x == "object" && c && typeof c == "object" ? h[u] = C(x, c, E) : h.push(c);
|
|
860
860
|
} else
|
|
861
|
-
|
|
862
|
-
}),
|
|
863
|
-
var
|
|
864
|
-
return r.call(
|
|
865
|
-
},
|
|
866
|
-
},
|
|
867
|
-
return Object.keys(
|
|
868
|
-
return
|
|
869
|
-
},
|
|
870
|
-
},
|
|
871
|
-
var
|
|
872
|
-
if (
|
|
873
|
-
return
|
|
861
|
+
h[u] = c;
|
|
862
|
+
}), h) : Object.keys(d).reduce(function(c, u) {
|
|
863
|
+
var x = d[u];
|
|
864
|
+
return r.call(c, u) ? c[u] = C(c[u], x, E) : c[u] = x, c;
|
|
865
|
+
}, i);
|
|
866
|
+
}, s = function(h, d) {
|
|
867
|
+
return Object.keys(d).reduce(function(E, i) {
|
|
868
|
+
return E[i] = d[i], E;
|
|
869
|
+
}, h);
|
|
870
|
+
}, f = function(C, h, d) {
|
|
871
|
+
var E = C.replace(/\+/g, " ");
|
|
872
|
+
if (d === "iso-8859-1")
|
|
873
|
+
return E.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
874
874
|
try {
|
|
875
|
-
return decodeURIComponent(
|
|
875
|
+
return decodeURIComponent(E);
|
|
876
876
|
} catch {
|
|
877
|
-
return
|
|
877
|
+
return E;
|
|
878
878
|
}
|
|
879
|
-
},
|
|
880
|
-
if (
|
|
881
|
-
return
|
|
882
|
-
var
|
|
883
|
-
if (typeof
|
|
884
|
-
return escape(
|
|
885
|
-
return "%26%23" + parseInt(
|
|
879
|
+
}, m = function(h, d, E, i, c) {
|
|
880
|
+
if (h.length === 0)
|
|
881
|
+
return h;
|
|
882
|
+
var u = h;
|
|
883
|
+
if (typeof h == "symbol" ? u = Symbol.prototype.toString.call(h) : typeof h != "string" && (u = String(h)), E === "iso-8859-1")
|
|
884
|
+
return escape(u).replace(/%u[0-9a-f]{4}/gi, function($) {
|
|
885
|
+
return "%26%23" + parseInt($.slice(2), 16) + "%3B";
|
|
886
886
|
});
|
|
887
|
-
for (var
|
|
888
|
-
var O =
|
|
889
|
-
if (O === 45 || O === 46 || O === 95 || O === 126 || O >= 48 && O <= 57 || O >= 65 && O <= 90 || O >= 97 && O <= 122 ||
|
|
890
|
-
|
|
887
|
+
for (var x = "", I = 0; I < u.length; ++I) {
|
|
888
|
+
var O = u.charCodeAt(I);
|
|
889
|
+
if (O === 45 || O === 46 || O === 95 || O === 126 || O >= 48 && O <= 57 || O >= 65 && O <= 90 || O >= 97 && O <= 122 || c === e.RFC1738 && (O === 40 || O === 41)) {
|
|
890
|
+
x += u.charAt(I);
|
|
891
891
|
continue;
|
|
892
892
|
}
|
|
893
893
|
if (O < 128) {
|
|
894
|
-
|
|
894
|
+
x = x + t[O];
|
|
895
895
|
continue;
|
|
896
896
|
}
|
|
897
897
|
if (O < 2048) {
|
|
898
|
-
|
|
898
|
+
x = x + (t[192 | O >> 6] + t[128 | O & 63]);
|
|
899
899
|
continue;
|
|
900
900
|
}
|
|
901
901
|
if (O < 55296 || O >= 57344) {
|
|
902
|
-
|
|
902
|
+
x = x + (t[224 | O >> 12] + t[128 | O >> 6 & 63] + t[128 | O & 63]);
|
|
903
903
|
continue;
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
I += 1, O = 65536 + ((O & 1023) << 10 | u.charCodeAt(I) & 1023), x += t[240 | O >> 18] + t[128 | O >> 12 & 63] + t[128 | O >> 6 & 63] + t[128 | O & 63];
|
|
906
906
|
}
|
|
907
|
-
return
|
|
908
|
-
}, S = function(
|
|
909
|
-
for (var
|
|
910
|
-
for (var
|
|
911
|
-
var O = I
|
|
912
|
-
typeof
|
|
907
|
+
return x;
|
|
908
|
+
}, S = function(h) {
|
|
909
|
+
for (var d = [{ obj: { o: h }, prop: "o" }], E = [], i = 0; i < d.length; ++i)
|
|
910
|
+
for (var c = d[i], u = c.obj[c.prop], x = Object.keys(u), I = 0; I < x.length; ++I) {
|
|
911
|
+
var O = x[I], $ = u[O];
|
|
912
|
+
typeof $ == "object" && $ !== null && E.indexOf($) === -1 && (d.push({ obj: u, prop: O }), E.push($));
|
|
913
913
|
}
|
|
914
|
-
return n(
|
|
915
|
-
},
|
|
916
|
-
return Object.prototype.toString.call(
|
|
917
|
-
},
|
|
918
|
-
return !
|
|
919
|
-
},
|
|
920
|
-
return [].concat(
|
|
921
|
-
},
|
|
922
|
-
if (a(
|
|
923
|
-
for (var
|
|
924
|
-
|
|
925
|
-
return
|
|
914
|
+
return n(d), h;
|
|
915
|
+
}, v = function(h) {
|
|
916
|
+
return Object.prototype.toString.call(h) === "[object RegExp]";
|
|
917
|
+
}, P = function(h) {
|
|
918
|
+
return !h || typeof h != "object" ? !1 : !!(h.constructor && h.constructor.isBuffer && h.constructor.isBuffer(h));
|
|
919
|
+
}, b = function(h, d) {
|
|
920
|
+
return [].concat(h, d);
|
|
921
|
+
}, A = function(h, d) {
|
|
922
|
+
if (a(h)) {
|
|
923
|
+
for (var E = [], i = 0; i < h.length; i += 1)
|
|
924
|
+
E.push(d(h[i]));
|
|
925
|
+
return E;
|
|
926
926
|
}
|
|
927
|
-
return
|
|
927
|
+
return d(h);
|
|
928
928
|
};
|
|
929
929
|
return sr = {
|
|
930
930
|
arrayToObject: o,
|
|
931
|
-
assign:
|
|
932
|
-
combine:
|
|
931
|
+
assign: s,
|
|
932
|
+
combine: b,
|
|
933
933
|
compact: S,
|
|
934
|
-
decode:
|
|
935
|
-
encode:
|
|
936
|
-
isBuffer:
|
|
937
|
-
isRegExp:
|
|
938
|
-
maybeMap:
|
|
934
|
+
decode: f,
|
|
935
|
+
encode: m,
|
|
936
|
+
isBuffer: P,
|
|
937
|
+
isRegExp: v,
|
|
938
|
+
maybeMap: A,
|
|
939
939
|
merge: p
|
|
940
940
|
}, sr;
|
|
941
941
|
}
|
|
@@ -944,19 +944,19 @@ function ut() {
|
|
|
944
944
|
if ($r) return ur;
|
|
945
945
|
$r = 1;
|
|
946
946
|
var e = st(), r = Wr(), a = gr(), t = Object.prototype.hasOwnProperty, n = {
|
|
947
|
-
brackets: function(
|
|
948
|
-
return
|
|
947
|
+
brackets: function(d) {
|
|
948
|
+
return d + "[]";
|
|
949
949
|
},
|
|
950
950
|
comma: "comma",
|
|
951
|
-
indices: function(
|
|
952
|
-
return
|
|
951
|
+
indices: function(d, E) {
|
|
952
|
+
return d + "[" + E + "]";
|
|
953
953
|
},
|
|
954
|
-
repeat: function(
|
|
955
|
-
return
|
|
954
|
+
repeat: function(d) {
|
|
955
|
+
return d;
|
|
956
956
|
}
|
|
957
|
-
}, o = Array.isArray, p = String.prototype.split,
|
|
958
|
-
|
|
959
|
-
},
|
|
957
|
+
}, o = Array.isArray, p = String.prototype.split, s = Array.prototype.push, f = function(h, d) {
|
|
958
|
+
s.apply(h, o(d) ? d : [d]);
|
|
959
|
+
}, m = Date.prototype.toISOString, S = a.default, v = {
|
|
960
960
|
addQueryPrefix: !1,
|
|
961
961
|
allowDots: !1,
|
|
962
962
|
charset: "utf-8",
|
|
@@ -969,150 +969,150 @@ function ut() {
|
|
|
969
969
|
formatter: a.formatters[S],
|
|
970
970
|
// deprecated
|
|
971
971
|
indices: !1,
|
|
972
|
-
serializeDate: function(
|
|
973
|
-
return
|
|
972
|
+
serializeDate: function(d) {
|
|
973
|
+
return m.call(d);
|
|
974
974
|
},
|
|
975
975
|
skipNulls: !1,
|
|
976
976
|
strictNullHandling: !1
|
|
977
|
-
},
|
|
978
|
-
return typeof
|
|
979
|
-
},
|
|
980
|
-
for (var
|
|
981
|
-
var
|
|
982
|
-
if (Q += 1, typeof
|
|
983
|
-
if (
|
|
977
|
+
}, P = function(d) {
|
|
978
|
+
return typeof d == "string" || typeof d == "number" || typeof d == "boolean" || typeof d == "symbol" || typeof d == "bigint";
|
|
979
|
+
}, b = {}, A = function h(d, E, i, c, u, x, I, O, $, L, F, _, R, N, B, H) {
|
|
980
|
+
for (var U = d, q = H, Q = 0, z = !1; (q = q.get(b)) !== void 0 && !z; ) {
|
|
981
|
+
var W = q.get(d);
|
|
982
|
+
if (Q += 1, typeof W < "u") {
|
|
983
|
+
if (W === Q)
|
|
984
984
|
throw new RangeError("Cyclic object value");
|
|
985
|
-
|
|
985
|
+
z = !0;
|
|
986
986
|
}
|
|
987
|
-
typeof
|
|
987
|
+
typeof q.get(b) > "u" && (Q = 0);
|
|
988
988
|
}
|
|
989
|
-
if (typeof O == "function" ?
|
|
990
|
-
return
|
|
991
|
-
})),
|
|
992
|
-
if (
|
|
993
|
-
return
|
|
994
|
-
|
|
989
|
+
if (typeof O == "function" ? U = O(E, U) : U instanceof Date ? U = F(U) : i === "comma" && o(U) && (U = r.maybeMap(U, function(te) {
|
|
990
|
+
return te instanceof Date ? F(te) : te;
|
|
991
|
+
})), U === null) {
|
|
992
|
+
if (u)
|
|
993
|
+
return I && !N ? I(E, v.encoder, B, "key", _) : E;
|
|
994
|
+
U = "";
|
|
995
995
|
}
|
|
996
|
-
if (
|
|
997
|
-
if (
|
|
998
|
-
var
|
|
999
|
-
if (
|
|
1000
|
-
for (var
|
|
1001
|
-
|
|
1002
|
-
return [
|
|
996
|
+
if (P(U) || r.isBuffer(U)) {
|
|
997
|
+
if (I) {
|
|
998
|
+
var K = N ? E : I(E, v.encoder, B, "key", _);
|
|
999
|
+
if (i === "comma" && N) {
|
|
1000
|
+
for (var re = p.call(String(U), ","), ae = "", ne = 0; ne < re.length; ++ne)
|
|
1001
|
+
ae += (ne === 0 ? "" : ",") + R(I(re[ne], v.encoder, B, "value", _));
|
|
1002
|
+
return [R(K) + (c && o(U) && re.length === 1 ? "[]" : "") + "=" + ae];
|
|
1003
1003
|
}
|
|
1004
|
-
return [
|
|
1004
|
+
return [R(K) + "=" + R(I(U, v.encoder, B, "value", _))];
|
|
1005
1005
|
}
|
|
1006
|
-
return [
|
|
1006
|
+
return [R(E) + "=" + R(String(U))];
|
|
1007
1007
|
}
|
|
1008
1008
|
var ce = [];
|
|
1009
|
-
if (typeof
|
|
1009
|
+
if (typeof U > "u")
|
|
1010
1010
|
return ce;
|
|
1011
1011
|
var ue;
|
|
1012
|
-
if (
|
|
1013
|
-
ue = [{ value:
|
|
1012
|
+
if (i === "comma" && o(U))
|
|
1013
|
+
ue = [{ value: U.length > 0 ? U.join(",") || null : void 0 }];
|
|
1014
1014
|
else if (o(O))
|
|
1015
1015
|
ue = O;
|
|
1016
1016
|
else {
|
|
1017
|
-
var oe = Object.keys(
|
|
1018
|
-
ue =
|
|
1017
|
+
var oe = Object.keys(U);
|
|
1018
|
+
ue = $ ? oe.sort($) : oe;
|
|
1019
1019
|
}
|
|
1020
|
-
for (var de =
|
|
1021
|
-
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value :
|
|
1022
|
-
if (!(
|
|
1023
|
-
var be = o(
|
|
1024
|
-
|
|
1025
|
-
var
|
|
1026
|
-
|
|
1020
|
+
for (var de = c && o(U) && U.length === 1 ? E + "[]" : E, pe = 0; pe < ue.length; ++pe) {
|
|
1021
|
+
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : U[se];
|
|
1022
|
+
if (!(x && ye === null)) {
|
|
1023
|
+
var be = o(U) ? typeof i == "function" ? i(de, se) : de : de + (L ? "." + se : "[" + se + "]");
|
|
1024
|
+
H.set(d, Q);
|
|
1025
|
+
var Y = e();
|
|
1026
|
+
Y.set(b, H), f(ce, h(
|
|
1027
1027
|
ye,
|
|
1028
1028
|
be,
|
|
1029
|
-
|
|
1030
|
-
|
|
1029
|
+
i,
|
|
1030
|
+
c,
|
|
1031
|
+
u,
|
|
1031
1032
|
x,
|
|
1032
1033
|
I,
|
|
1033
|
-
k,
|
|
1034
1034
|
O,
|
|
1035
|
-
G,
|
|
1036
|
-
B,
|
|
1037
|
-
F,
|
|
1038
1035
|
$,
|
|
1039
1036
|
L,
|
|
1040
|
-
|
|
1037
|
+
F,
|
|
1041
1038
|
_,
|
|
1042
|
-
|
|
1039
|
+
R,
|
|
1040
|
+
N,
|
|
1041
|
+
B,
|
|
1042
|
+
Y
|
|
1043
1043
|
));
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
return ce;
|
|
1047
|
-
},
|
|
1048
|
-
if (!
|
|
1049
|
-
return
|
|
1050
|
-
if (
|
|
1047
|
+
}, C = function(d) {
|
|
1048
|
+
if (!d)
|
|
1049
|
+
return v;
|
|
1050
|
+
if (d.encoder !== null && typeof d.encoder < "u" && typeof d.encoder != "function")
|
|
1051
1051
|
throw new TypeError("Encoder has to be a function.");
|
|
1052
|
-
var
|
|
1053
|
-
if (typeof
|
|
1052
|
+
var E = d.charset || v.charset;
|
|
1053
|
+
if (typeof d.charset < "u" && d.charset !== "utf-8" && d.charset !== "iso-8859-1")
|
|
1054
1054
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
1055
|
-
var
|
|
1056
|
-
if (typeof
|
|
1057
|
-
if (!t.call(a.formatters,
|
|
1055
|
+
var i = a.default;
|
|
1056
|
+
if (typeof d.format < "u") {
|
|
1057
|
+
if (!t.call(a.formatters, d.format))
|
|
1058
1058
|
throw new TypeError("Unknown format option provided.");
|
|
1059
|
-
|
|
1059
|
+
i = d.format;
|
|
1060
1060
|
}
|
|
1061
|
-
var
|
|
1062
|
-
return (typeof
|
|
1063
|
-
addQueryPrefix: typeof
|
|
1064
|
-
allowDots: typeof
|
|
1065
|
-
charset:
|
|
1066
|
-
charsetSentinel: typeof
|
|
1067
|
-
delimiter: typeof
|
|
1068
|
-
encode: typeof
|
|
1069
|
-
encoder: typeof
|
|
1070
|
-
encodeValuesOnly: typeof
|
|
1071
|
-
filter:
|
|
1072
|
-
format:
|
|
1073
|
-
formatter:
|
|
1074
|
-
serializeDate: typeof
|
|
1075
|
-
skipNulls: typeof
|
|
1076
|
-
sort: typeof
|
|
1077
|
-
strictNullHandling: typeof
|
|
1061
|
+
var c = a.formatters[i], u = v.filter;
|
|
1062
|
+
return (typeof d.filter == "function" || o(d.filter)) && (u = d.filter), {
|
|
1063
|
+
addQueryPrefix: typeof d.addQueryPrefix == "boolean" ? d.addQueryPrefix : v.addQueryPrefix,
|
|
1064
|
+
allowDots: typeof d.allowDots > "u" ? v.allowDots : !!d.allowDots,
|
|
1065
|
+
charset: E,
|
|
1066
|
+
charsetSentinel: typeof d.charsetSentinel == "boolean" ? d.charsetSentinel : v.charsetSentinel,
|
|
1067
|
+
delimiter: typeof d.delimiter > "u" ? v.delimiter : d.delimiter,
|
|
1068
|
+
encode: typeof d.encode == "boolean" ? d.encode : v.encode,
|
|
1069
|
+
encoder: typeof d.encoder == "function" ? d.encoder : v.encoder,
|
|
1070
|
+
encodeValuesOnly: typeof d.encodeValuesOnly == "boolean" ? d.encodeValuesOnly : v.encodeValuesOnly,
|
|
1071
|
+
filter: u,
|
|
1072
|
+
format: i,
|
|
1073
|
+
formatter: c,
|
|
1074
|
+
serializeDate: typeof d.serializeDate == "function" ? d.serializeDate : v.serializeDate,
|
|
1075
|
+
skipNulls: typeof d.skipNulls == "boolean" ? d.skipNulls : v.skipNulls,
|
|
1076
|
+
sort: typeof d.sort == "function" ? d.sort : null,
|
|
1077
|
+
strictNullHandling: typeof d.strictNullHandling == "boolean" ? d.strictNullHandling : v.strictNullHandling
|
|
1078
1078
|
};
|
|
1079
1079
|
};
|
|
1080
|
-
return ur = function(
|
|
1081
|
-
var
|
|
1082
|
-
typeof
|
|
1083
|
-
var
|
|
1084
|
-
if (typeof
|
|
1080
|
+
return ur = function(h, d) {
|
|
1081
|
+
var E = h, i = C(d), c, u;
|
|
1082
|
+
typeof i.filter == "function" ? (u = i.filter, E = u("", E)) : o(i.filter) && (u = i.filter, c = u);
|
|
1083
|
+
var x = [];
|
|
1084
|
+
if (typeof E != "object" || E === null)
|
|
1085
1085
|
return "";
|
|
1086
|
-
var
|
|
1087
|
-
|
|
1088
|
-
var O = n[
|
|
1089
|
-
if (
|
|
1086
|
+
var I;
|
|
1087
|
+
d && d.arrayFormat in n ? I = d.arrayFormat : d && "indices" in d ? I = d.indices ? "indices" : "repeat" : I = "indices";
|
|
1088
|
+
var O = n[I];
|
|
1089
|
+
if (d && "commaRoundTrip" in d && typeof d.commaRoundTrip != "boolean")
|
|
1090
1090
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
1091
|
-
var
|
|
1092
|
-
|
|
1093
|
-
for (var
|
|
1094
|
-
var
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1091
|
+
var $ = O === "comma" && d && d.commaRoundTrip;
|
|
1092
|
+
c || (c = Object.keys(E)), i.sort && c.sort(i.sort);
|
|
1093
|
+
for (var L = e(), F = 0; F < c.length; ++F) {
|
|
1094
|
+
var _ = c[F];
|
|
1095
|
+
i.skipNulls && E[_] === null || f(x, A(
|
|
1096
|
+
E[_],
|
|
1097
|
+
_,
|
|
1098
1098
|
O,
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1099
|
+
$,
|
|
1100
|
+
i.strictNullHandling,
|
|
1101
|
+
i.skipNulls,
|
|
1102
|
+
i.encode ? i.encoder : null,
|
|
1103
|
+
i.filter,
|
|
1104
|
+
i.sort,
|
|
1105
|
+
i.allowDots,
|
|
1106
|
+
i.serializeDate,
|
|
1107
|
+
i.format,
|
|
1108
|
+
i.formatter,
|
|
1109
|
+
i.encodeValuesOnly,
|
|
1110
|
+
i.charset,
|
|
1111
|
+
L
|
|
1112
1112
|
));
|
|
1113
1113
|
}
|
|
1114
|
-
var
|
|
1115
|
-
return
|
|
1114
|
+
var R = x.join(i.delimiter), N = i.addQueryPrefix === !0 ? "?" : "";
|
|
1115
|
+
return i.charsetSentinel && (i.charset === "iso-8859-1" ? N += "utf8=%26%2310003%3B&" : N += "utf8=%E2%9C%93&"), R.length > 0 ? N + R : "";
|
|
1116
1116
|
}, ur;
|
|
1117
1117
|
}
|
|
1118
1118
|
var cr, Ur;
|
|
@@ -1136,93 +1136,93 @@ function ct() {
|
|
|
1136
1136
|
parseArrays: !0,
|
|
1137
1137
|
plainObjects: !1,
|
|
1138
1138
|
strictNullHandling: !1
|
|
1139
|
-
}, n = function(
|
|
1140
|
-
return
|
|
1141
|
-
return String.fromCharCode(parseInt(
|
|
1139
|
+
}, n = function(P) {
|
|
1140
|
+
return P.replace(/&#(\d+);/g, function(b, A) {
|
|
1141
|
+
return String.fromCharCode(parseInt(A, 10));
|
|
1142
1142
|
});
|
|
1143
|
-
}, o = function(
|
|
1144
|
-
return
|
|
1145
|
-
}, p = "utf8=%26%2310003%3B",
|
|
1146
|
-
var
|
|
1147
|
-
if (
|
|
1148
|
-
for (
|
|
1149
|
-
|
|
1150
|
-
for (
|
|
1151
|
-
if (
|
|
1152
|
-
var
|
|
1153
|
-
O === -1 ? (
|
|
1154
|
-
o(
|
|
1143
|
+
}, o = function(P, b) {
|
|
1144
|
+
return P && typeof P == "string" && b.comma && P.indexOf(",") > -1 ? P.split(",") : P;
|
|
1145
|
+
}, p = "utf8=%26%2310003%3B", s = "utf8=%E2%9C%93", f = function(b, A) {
|
|
1146
|
+
var C = {}, h = A.ignoreQueryPrefix ? b.replace(/^\?/, "") : b, d = A.parameterLimit === 1 / 0 ? void 0 : A.parameterLimit, E = h.split(A.delimiter, d), i = -1, c, u = A.charset;
|
|
1147
|
+
if (A.charsetSentinel)
|
|
1148
|
+
for (c = 0; c < E.length; ++c)
|
|
1149
|
+
E[c].indexOf("utf8=") === 0 && (E[c] === s ? u = "utf-8" : E[c] === p && (u = "iso-8859-1"), i = c, c = E.length);
|
|
1150
|
+
for (c = 0; c < E.length; ++c)
|
|
1151
|
+
if (c !== i) {
|
|
1152
|
+
var x = E[c], I = x.indexOf("]="), O = I === -1 ? x.indexOf("=") : I + 1, $, L;
|
|
1153
|
+
O === -1 ? ($ = A.decoder(x, t.decoder, u, "key"), L = A.strictNullHandling ? null : "") : ($ = A.decoder(x.slice(0, O), t.decoder, u, "key"), L = e.maybeMap(
|
|
1154
|
+
o(x.slice(O + 1), A),
|
|
1155
1155
|
function(F) {
|
|
1156
|
-
return
|
|
1156
|
+
return A.decoder(F, t.decoder, u, "value");
|
|
1157
1157
|
}
|
|
1158
|
-
)),
|
|
1158
|
+
)), L && A.interpretNumericEntities && u === "iso-8859-1" && (L = n(L)), x.indexOf("[]=") > -1 && (L = a(L) ? [L] : L), r.call(C, $) ? C[$] = e.combine(C[$], L) : C[$] = L;
|
|
1159
1159
|
}
|
|
1160
|
-
return
|
|
1161
|
-
},
|
|
1162
|
-
for (var
|
|
1163
|
-
var
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1160
|
+
return C;
|
|
1161
|
+
}, m = function(P, b, A, C) {
|
|
1162
|
+
for (var h = C ? b : o(b, A), d = P.length - 1; d >= 0; --d) {
|
|
1163
|
+
var E, i = P[d];
|
|
1164
|
+
if (i === "[]" && A.parseArrays)
|
|
1165
|
+
E = [].concat(h);
|
|
1166
1166
|
else {
|
|
1167
|
-
|
|
1168
|
-
var
|
|
1169
|
-
!
|
|
1167
|
+
E = A.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1168
|
+
var c = i.charAt(0) === "[" && i.charAt(i.length - 1) === "]" ? i.slice(1, -1) : i, u = parseInt(c, 10);
|
|
1169
|
+
!A.parseArrays && c === "" ? E = { 0: h } : !isNaN(u) && i !== c && String(u) === c && u >= 0 && A.parseArrays && u <= A.arrayLimit ? (E = [], E[u] = h) : c !== "__proto__" && (E[c] = h);
|
|
1170
1170
|
}
|
|
1171
|
-
|
|
1171
|
+
h = E;
|
|
1172
1172
|
}
|
|
1173
|
-
return
|
|
1174
|
-
}, S = function(
|
|
1175
|
-
if (
|
|
1176
|
-
var
|
|
1177
|
-
if (
|
|
1178
|
-
if (!
|
|
1173
|
+
return h;
|
|
1174
|
+
}, S = function(b, A, C, h) {
|
|
1175
|
+
if (b) {
|
|
1176
|
+
var d = C.allowDots ? b.replace(/\.([^.[]+)/g, "[$1]") : b, E = /(\[[^[\]]*])/, i = /(\[[^[\]]*])/g, c = C.depth > 0 && E.exec(d), u = c ? d.slice(0, c.index) : d, x = [];
|
|
1177
|
+
if (u) {
|
|
1178
|
+
if (!C.plainObjects && r.call(Object.prototype, u) && !C.allowPrototypes)
|
|
1179
1179
|
return;
|
|
1180
|
-
|
|
1180
|
+
x.push(u);
|
|
1181
1181
|
}
|
|
1182
|
-
for (var
|
|
1183
|
-
if (
|
|
1182
|
+
for (var I = 0; C.depth > 0 && (c = i.exec(d)) !== null && I < C.depth; ) {
|
|
1183
|
+
if (I += 1, !C.plainObjects && r.call(Object.prototype, c[1].slice(1, -1)) && !C.allowPrototypes)
|
|
1184
1184
|
return;
|
|
1185
|
-
|
|
1185
|
+
x.push(c[1]);
|
|
1186
1186
|
}
|
|
1187
|
-
return
|
|
1187
|
+
return c && x.push("[" + d.slice(c.index) + "]"), m(x, A, C, h);
|
|
1188
1188
|
}
|
|
1189
|
-
},
|
|
1190
|
-
if (!
|
|
1189
|
+
}, v = function(b) {
|
|
1190
|
+
if (!b)
|
|
1191
1191
|
return t;
|
|
1192
|
-
if (
|
|
1192
|
+
if (b.decoder !== null && b.decoder !== void 0 && typeof b.decoder != "function")
|
|
1193
1193
|
throw new TypeError("Decoder has to be a function.");
|
|
1194
|
-
if (typeof
|
|
1194
|
+
if (typeof b.charset < "u" && b.charset !== "utf-8" && b.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 A = typeof b.charset > "u" ? t.charset : b.charset;
|
|
1197
1197
|
return {
|
|
1198
|
-
allowDots: typeof
|
|
1199
|
-
allowPrototypes: typeof
|
|
1200
|
-
allowSparse: typeof
|
|
1201
|
-
arrayLimit: typeof
|
|
1202
|
-
charset:
|
|
1203
|
-
charsetSentinel: typeof
|
|
1204
|
-
comma: typeof
|
|
1205
|
-
decoder: typeof
|
|
1206
|
-
delimiter: typeof
|
|
1198
|
+
allowDots: typeof b.allowDots > "u" ? t.allowDots : !!b.allowDots,
|
|
1199
|
+
allowPrototypes: typeof b.allowPrototypes == "boolean" ? b.allowPrototypes : t.allowPrototypes,
|
|
1200
|
+
allowSparse: typeof b.allowSparse == "boolean" ? b.allowSparse : t.allowSparse,
|
|
1201
|
+
arrayLimit: typeof b.arrayLimit == "number" ? b.arrayLimit : t.arrayLimit,
|
|
1202
|
+
charset: A,
|
|
1203
|
+
charsetSentinel: typeof b.charsetSentinel == "boolean" ? b.charsetSentinel : t.charsetSentinel,
|
|
1204
|
+
comma: typeof b.comma == "boolean" ? b.comma : t.comma,
|
|
1205
|
+
decoder: typeof b.decoder == "function" ? b.decoder : t.decoder,
|
|
1206
|
+
delimiter: typeof b.delimiter == "string" || e.isRegExp(b.delimiter) ? b.delimiter : t.delimiter,
|
|
1207
1207
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
1208
|
-
depth: typeof
|
|
1209
|
-
ignoreQueryPrefix:
|
|
1210
|
-
interpretNumericEntities: typeof
|
|
1211
|
-
parameterLimit: typeof
|
|
1212
|
-
parseArrays:
|
|
1213
|
-
plainObjects: typeof
|
|
1214
|
-
strictNullHandling: typeof
|
|
1208
|
+
depth: typeof b.depth == "number" || b.depth === !1 ? +b.depth : t.depth,
|
|
1209
|
+
ignoreQueryPrefix: b.ignoreQueryPrefix === !0,
|
|
1210
|
+
interpretNumericEntities: typeof b.interpretNumericEntities == "boolean" ? b.interpretNumericEntities : t.interpretNumericEntities,
|
|
1211
|
+
parameterLimit: typeof b.parameterLimit == "number" ? b.parameterLimit : t.parameterLimit,
|
|
1212
|
+
parseArrays: b.parseArrays !== !1,
|
|
1213
|
+
plainObjects: typeof b.plainObjects == "boolean" ? b.plainObjects : t.plainObjects,
|
|
1214
|
+
strictNullHandling: typeof b.strictNullHandling == "boolean" ? b.strictNullHandling : t.strictNullHandling
|
|
1215
1215
|
};
|
|
1216
1216
|
};
|
|
1217
|
-
return cr = function(
|
|
1218
|
-
var
|
|
1219
|
-
if (
|
|
1220
|
-
return
|
|
1221
|
-
for (var
|
|
1222
|
-
var
|
|
1223
|
-
|
|
1217
|
+
return cr = function(P, b) {
|
|
1218
|
+
var A = v(b);
|
|
1219
|
+
if (P === "" || P === null || typeof P > "u")
|
|
1220
|
+
return A.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1221
|
+
for (var C = typeof P == "string" ? f(P, A) : P, h = A.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, d = Object.keys(C), E = 0; E < d.length; ++E) {
|
|
1222
|
+
var i = d[E], c = S(i, C[i], A, typeof P == "string");
|
|
1223
|
+
h = e.merge(h, c, A);
|
|
1224
1224
|
}
|
|
1225
|
-
return
|
|
1225
|
+
return A.allowSparse === !0 ? h : e.compact(h);
|
|
1226
1226
|
}, cr;
|
|
1227
1227
|
}
|
|
1228
1228
|
var lr, Br;
|
|
@@ -1237,336 +1237,336 @@ function lt() {
|
|
|
1237
1237
|
}, lr;
|
|
1238
1238
|
}
|
|
1239
1239
|
var ft = lt();
|
|
1240
|
-
const dt = /* @__PURE__ */ mr(ft), vr = "0.1.
|
|
1240
|
+
const dt = /* @__PURE__ */ mr(ft), vr = "0.1.214", pt = Ee.CancelToken;
|
|
1241
1241
|
var mt = function(e) {
|
|
1242
1242
|
var r;
|
|
1243
1243
|
typeof window < "u" && (r = e.cache.get("api"));
|
|
1244
1244
|
const a = Ee.defaults.adapter;
|
|
1245
|
-
function t(
|
|
1246
|
-
var
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1245
|
+
function t(f) {
|
|
1246
|
+
var m = [
|
|
1247
|
+
f.method,
|
|
1248
|
+
f.url,
|
|
1249
|
+
f.headers?.Authorization,
|
|
1250
|
+
f.headers.Accept,
|
|
1251
1251
|
JSON.stringify({
|
|
1252
|
-
params:
|
|
1253
|
-
data:
|
|
1252
|
+
params: f.params,
|
|
1253
|
+
data: f.data
|
|
1254
1254
|
})
|
|
1255
1255
|
].filter(Boolean).join("-");
|
|
1256
|
-
return
|
|
1256
|
+
return m;
|
|
1257
1257
|
}
|
|
1258
|
-
const n = {}, p =
|
|
1259
|
-
var
|
|
1260
|
-
return n[
|
|
1261
|
-
var
|
|
1262
|
-
switch (String(
|
|
1258
|
+
const n = {}, p = s(function(f) {
|
|
1259
|
+
var m = t(f);
|
|
1260
|
+
return n[m] || (n[m] = new Promise(function(S, v) {
|
|
1261
|
+
var P, b;
|
|
1262
|
+
switch (String(f.method).toLowerCase()) {
|
|
1263
1263
|
case "post":
|
|
1264
1264
|
case "patch":
|
|
1265
1265
|
case "put":
|
|
1266
1266
|
case "delete":
|
|
1267
|
-
|
|
1267
|
+
f.cache || (f.cache = !1);
|
|
1268
1268
|
break;
|
|
1269
1269
|
}
|
|
1270
|
-
return
|
|
1271
|
-
function(
|
|
1272
|
-
delete n[
|
|
1270
|
+
return f.cache === !1 || (P = f.cache || r, P && (b = P.get(m))), b ? S(b) : (Object.assign(f, { adapter: a }), Ee.request(f).then(
|
|
1271
|
+
function(A) {
|
|
1272
|
+
delete n[m], S(A);
|
|
1273
1273
|
},
|
|
1274
|
-
function(
|
|
1275
|
-
delete n[
|
|
1274
|
+
function(A) {
|
|
1275
|
+
delete n[m], v(A);
|
|
1276
1276
|
}
|
|
1277
1277
|
));
|
|
1278
|
-
})), n[
|
|
1278
|
+
})), n[m];
|
|
1279
1279
|
});
|
|
1280
|
-
p.generateEndpointURL = function(
|
|
1281
|
-
S = S || {},
|
|
1282
|
-
var
|
|
1283
|
-
const
|
|
1284
|
-
S.withoutToken || (delete
|
|
1285
|
-
var
|
|
1286
|
-
|
|
1287
|
-
var
|
|
1288
|
-
return
|
|
1289
|
-
}, p.wasCancelled = function(
|
|
1290
|
-
return Ee.isCancel(
|
|
1280
|
+
p.generateEndpointURL = function(f, m, S) {
|
|
1281
|
+
S = S || {}, m = m || {};
|
|
1282
|
+
var v;
|
|
1283
|
+
const P = S.file && e.fileAPI || e.apiURL;
|
|
1284
|
+
S.withoutToken || (delete m.access_token, v = e.auth.getCurrentToken()), f[0] == "/" && f.slice(1);
|
|
1285
|
+
var b = e.utils.mapParameters(m);
|
|
1286
|
+
v ? b = b ? `?access_token=${v}&${b}` : `?access_token=${v}` : b = b ? `?${b}` : "";
|
|
1287
|
+
var A = `${P}${f}${b}`;
|
|
1288
|
+
return A;
|
|
1289
|
+
}, p.wasCancelled = function(f) {
|
|
1290
|
+
return Ee.isCancel(f);
|
|
1291
1291
|
};
|
|
1292
|
-
function
|
|
1293
|
-
var
|
|
1294
|
-
paramsSerializer: (
|
|
1295
|
-
adapter:
|
|
1292
|
+
function s(f) {
|
|
1293
|
+
var m = Ee.create({
|
|
1294
|
+
paramsSerializer: (v) => dt.stringify(v, { arrayFormat: "repeat" }),
|
|
1295
|
+
adapter: f
|
|
1296
1296
|
});
|
|
1297
|
-
|
|
1298
|
-
if (t(
|
|
1299
|
-
return
|
|
1300
|
-
if (
|
|
1301
|
-
const
|
|
1302
|
-
|
|
1297
|
+
m.defaults.baseURL = e.apiURL, m.defaults.headers.common.Accept = "application/json", m.interceptors.request.use(function(v) {
|
|
1298
|
+
if (t(v), v.withoutToken)
|
|
1299
|
+
return v;
|
|
1300
|
+
if (v.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
|
|
1301
|
+
const b = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1302
|
+
b && (v.headers["qik-request-timezone"] = b);
|
|
1303
1303
|
}
|
|
1304
|
-
|
|
1305
|
-
var
|
|
1306
|
-
return
|
|
1304
|
+
v.headers["qik-api-version"] = vr, e?.socket?.windowID && (v.headers["qik-socket-window"] = e.socket.windowID);
|
|
1305
|
+
var P = e.auth.getCurrentToken();
|
|
1306
|
+
return P && (v.headers.Authorization = `Bearer ${P}`, v.params && v.params.access_token && delete v.params.access_token), v;
|
|
1307
1307
|
});
|
|
1308
1308
|
let S = 0;
|
|
1309
|
-
return
|
|
1310
|
-
function(
|
|
1311
|
-
var
|
|
1312
|
-
switch (
|
|
1309
|
+
return m.interceptors.response.use(
|
|
1310
|
+
function(v) {
|
|
1311
|
+
var P = v.config, b = v.status;
|
|
1312
|
+
switch (b) {
|
|
1313
1313
|
case 204:
|
|
1314
1314
|
if (S < 5)
|
|
1315
|
-
return S++, new Promise(function(
|
|
1315
|
+
return S++, new Promise(function(A, C) {
|
|
1316
1316
|
setTimeout(function() {
|
|
1317
|
-
return
|
|
1317
|
+
return m.request(P).then(A, C);
|
|
1318
1318
|
}, 800);
|
|
1319
1319
|
});
|
|
1320
1320
|
console.log("Failed after 5 retries"), S = 0;
|
|
1321
1321
|
break;
|
|
1322
1322
|
}
|
|
1323
|
-
return
|
|
1323
|
+
return v;
|
|
1324
1324
|
},
|
|
1325
|
-
function(
|
|
1326
|
-
if (Ee.isCancel(
|
|
1327
|
-
return Promise.reject(
|
|
1328
|
-
var
|
|
1329
|
-
switch (
|
|
1325
|
+
function(v) {
|
|
1326
|
+
if (Ee.isCancel(v))
|
|
1327
|
+
return Promise.reject(v);
|
|
1328
|
+
var P = v?.response?.status || v.status;
|
|
1329
|
+
switch (P) {
|
|
1330
1330
|
case 401:
|
|
1331
1331
|
break;
|
|
1332
1332
|
case 502:
|
|
1333
1333
|
case 504:
|
|
1334
1334
|
if (S < 5)
|
|
1335
|
-
return S++, new Promise(function(
|
|
1335
|
+
return S++, new Promise(function(b, A) {
|
|
1336
1336
|
setTimeout(function() {
|
|
1337
|
-
return
|
|
1337
|
+
return m.request(v.config).then(b, A);
|
|
1338
1338
|
}, 800);
|
|
1339
1339
|
});
|
|
1340
1340
|
console.log("Failed after 5 retries"), S = 0;
|
|
1341
1341
|
break;
|
|
1342
1342
|
}
|
|
1343
|
-
return Promise.reject(
|
|
1343
|
+
return Promise.reject(v);
|
|
1344
1344
|
}
|
|
1345
|
-
),
|
|
1345
|
+
), m;
|
|
1346
1346
|
}
|
|
1347
1347
|
return p.CancelToken = pt, p.axios = Ee, p;
|
|
1348
1348
|
}, fr, Gr;
|
|
1349
1349
|
function yt() {
|
|
1350
1350
|
if (Gr) return fr;
|
|
1351
1351
|
Gr = 1;
|
|
1352
|
-
var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]", n = "[object Symbol]", o = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, p = /^\w*$/,
|
|
1353
|
-
function
|
|
1354
|
-
return
|
|
1352
|
+
var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]", n = "[object Symbol]", o = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, p = /^\w*$/, s = /^\./, f = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, m = /[\\^$.*+?()[\]{}|]/g, S = /\\(\\)?/g, v = /^\[object .+?Constructor\]$/, P = typeof Ae == "object" && Ae && Ae.Object === Object && Ae, b = typeof self == "object" && self && self.Object === Object && self, A = P || b || Function("return this")();
|
|
1353
|
+
function C(l, w) {
|
|
1354
|
+
return l?.[w];
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function h(l) {
|
|
1357
1357
|
var w = !1;
|
|
1358
|
-
if (
|
|
1358
|
+
if (l != null && typeof l.toString != "function")
|
|
1359
1359
|
try {
|
|
1360
|
-
w = !!(
|
|
1360
|
+
w = !!(l + "");
|
|
1361
1361
|
} catch {
|
|
1362
1362
|
}
|
|
1363
1363
|
return w;
|
|
1364
1364
|
}
|
|
1365
|
-
var
|
|
1366
|
-
var
|
|
1367
|
-
return
|
|
1368
|
-
})(),
|
|
1369
|
-
"^" +
|
|
1370
|
-
),
|
|
1371
|
-
function
|
|
1372
|
-
var w = -1,
|
|
1373
|
-
for (this.clear(); ++w <
|
|
1374
|
-
var D =
|
|
1365
|
+
var d = Array.prototype, E = Function.prototype, i = Object.prototype, c = A["__core-js_shared__"], u = (function() {
|
|
1366
|
+
var l = /[^.]+$/.exec(c && c.keys && c.keys.IE_PROTO || "");
|
|
1367
|
+
return l ? "Symbol(src)_1." + l : "";
|
|
1368
|
+
})(), x = E.toString, I = i.hasOwnProperty, O = i.toString, $ = RegExp(
|
|
1369
|
+
"^" + x.call(I).replace(m, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1370
|
+
), L = A.Symbol, F = d.splice, _ = Pe(A, "Map"), R = Pe(Object, "create"), N = L ? L.prototype : void 0, B = N ? N.toString : void 0;
|
|
1371
|
+
function H(l) {
|
|
1372
|
+
var w = -1, M = l ? l.length : 0;
|
|
1373
|
+
for (this.clear(); ++w < M; ) {
|
|
1374
|
+
var D = l[w];
|
|
1375
1375
|
this.set(D[0], D[1]);
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1379
|
-
this.__data__ =
|
|
1378
|
+
function U() {
|
|
1379
|
+
this.__data__ = R ? R(null) : {};
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return this.has(
|
|
1381
|
+
function q(l) {
|
|
1382
|
+
return this.has(l) && delete this.__data__[l];
|
|
1383
1383
|
}
|
|
1384
|
-
function Q(
|
|
1384
|
+
function Q(l) {
|
|
1385
1385
|
var w = this.__data__;
|
|
1386
|
-
if (
|
|
1387
|
-
var
|
|
1388
|
-
return
|
|
1386
|
+
if (R) {
|
|
1387
|
+
var M = w[l];
|
|
1388
|
+
return M === r ? void 0 : M;
|
|
1389
1389
|
}
|
|
1390
|
-
return
|
|
1390
|
+
return I.call(w, l) ? w[l] : void 0;
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function z(l) {
|
|
1393
1393
|
var w = this.__data__;
|
|
1394
|
-
return
|
|
1394
|
+
return R ? w[l] !== void 0 : I.call(w, l);
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
var
|
|
1398
|
-
return
|
|
1396
|
+
function W(l, w) {
|
|
1397
|
+
var M = this.__data__;
|
|
1398
|
+
return M[l] = R && w === void 0 ? r : w, this;
|
|
1399
1399
|
}
|
|
1400
|
-
|
|
1401
|
-
function
|
|
1402
|
-
var w = -1,
|
|
1403
|
-
for (this.clear(); ++w <
|
|
1404
|
-
var D =
|
|
1400
|
+
H.prototype.clear = U, H.prototype.delete = q, H.prototype.get = Q, H.prototype.has = z, H.prototype.set = W;
|
|
1401
|
+
function K(l) {
|
|
1402
|
+
var w = -1, M = l ? l.length : 0;
|
|
1403
|
+
for (this.clear(); ++w < M; ) {
|
|
1404
|
+
var D = l[w];
|
|
1405
1405
|
this.set(D[0], D[1]);
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function re() {
|
|
1409
1409
|
this.__data__ = [];
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1412
|
-
var w = this.__data__,
|
|
1413
|
-
if (
|
|
1411
|
+
function ae(l) {
|
|
1412
|
+
var w = this.__data__, M = Y(w, l);
|
|
1413
|
+
if (M < 0)
|
|
1414
1414
|
return !1;
|
|
1415
1415
|
var D = w.length - 1;
|
|
1416
|
-
return
|
|
1416
|
+
return M == D ? w.pop() : F.call(w, M, 1), !0;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1419
|
-
var w = this.__data__,
|
|
1420
|
-
return
|
|
1418
|
+
function ne(l) {
|
|
1419
|
+
var w = this.__data__, M = Y(w, l);
|
|
1420
|
+
return M < 0 ? void 0 : w[M][1];
|
|
1421
1421
|
}
|
|
1422
|
-
function ce(
|
|
1423
|
-
return
|
|
1422
|
+
function ce(l) {
|
|
1423
|
+
return Y(this.__data__, l) > -1;
|
|
1424
1424
|
}
|
|
1425
|
-
function ue(
|
|
1426
|
-
var
|
|
1427
|
-
return D < 0 ?
|
|
1425
|
+
function ue(l, w) {
|
|
1426
|
+
var M = this.__data__, D = Y(M, l);
|
|
1427
|
+
return D < 0 ? M.push([l, w]) : M[D][1] = w, this;
|
|
1428
1428
|
}
|
|
1429
|
-
|
|
1430
|
-
function oe(
|
|
1431
|
-
var w = -1,
|
|
1432
|
-
for (this.clear(); ++w <
|
|
1433
|
-
var D =
|
|
1429
|
+
K.prototype.clear = re, K.prototype.delete = ae, K.prototype.get = ne, K.prototype.has = ce, K.prototype.set = ue;
|
|
1430
|
+
function oe(l) {
|
|
1431
|
+
var w = -1, M = l ? l.length : 0;
|
|
1432
|
+
for (this.clear(); ++w < M; ) {
|
|
1433
|
+
var D = l[w];
|
|
1434
1434
|
this.set(D[0], D[1]);
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
1437
1437
|
function de() {
|
|
1438
1438
|
this.__data__ = {
|
|
1439
|
-
hash: new
|
|
1440
|
-
map: new (
|
|
1441
|
-
string: new
|
|
1439
|
+
hash: new H(),
|
|
1440
|
+
map: new (_ || K)(),
|
|
1441
|
+
string: new H()
|
|
1442
1442
|
};
|
|
1443
1443
|
}
|
|
1444
|
-
function pe(
|
|
1445
|
-
return me(this,
|
|
1444
|
+
function pe(l) {
|
|
1445
|
+
return me(this, l).delete(l);
|
|
1446
1446
|
}
|
|
1447
|
-
function se(
|
|
1448
|
-
return me(this,
|
|
1447
|
+
function se(l) {
|
|
1448
|
+
return me(this, l).get(l);
|
|
1449
1449
|
}
|
|
1450
|
-
function ye(
|
|
1451
|
-
return me(this,
|
|
1450
|
+
function ye(l) {
|
|
1451
|
+
return me(this, l).has(l);
|
|
1452
1452
|
}
|
|
1453
|
-
function be(
|
|
1454
|
-
return me(this,
|
|
1453
|
+
function be(l, w) {
|
|
1454
|
+
return me(this, l).set(l, w), this;
|
|
1455
1455
|
}
|
|
1456
1456
|
oe.prototype.clear = de, oe.prototype.delete = pe, oe.prototype.get = se, oe.prototype.has = ye, oe.prototype.set = be;
|
|
1457
|
-
function
|
|
1458
|
-
for (var
|
|
1459
|
-
if (Se(
|
|
1460
|
-
return
|
|
1457
|
+
function Y(l, w) {
|
|
1458
|
+
for (var M = l.length; M--; )
|
|
1459
|
+
if (Se(l[M][0], w))
|
|
1460
|
+
return M;
|
|
1461
1461
|
return -1;
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1464
|
-
w =
|
|
1465
|
-
for (var
|
|
1466
|
-
|
|
1467
|
-
return
|
|
1463
|
+
function te(l, w) {
|
|
1464
|
+
w = Re(w, l) ? [w] : Te(w);
|
|
1465
|
+
for (var M = 0, D = w.length; l != null && M < D; )
|
|
1466
|
+
l = l[Ne(w[M++])];
|
|
1467
|
+
return M && M == D ? l : void 0;
|
|
1468
1468
|
}
|
|
1469
|
-
function Ie(
|
|
1470
|
-
if (!he(
|
|
1469
|
+
function Ie(l) {
|
|
1470
|
+
if (!he(l) || _e(l))
|
|
1471
1471
|
return !1;
|
|
1472
|
-
var w = Le(
|
|
1473
|
-
return w.test(le(
|
|
1472
|
+
var w = Le(l) || h(l) ? $ : v;
|
|
1473
|
+
return w.test(le(l));
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1476
|
-
if (typeof
|
|
1477
|
-
return
|
|
1478
|
-
if (
|
|
1479
|
-
return
|
|
1480
|
-
var w =
|
|
1481
|
-
return w == "0" && 1 /
|
|
1475
|
+
function xe(l) {
|
|
1476
|
+
if (typeof l == "string")
|
|
1477
|
+
return l;
|
|
1478
|
+
if (y(l))
|
|
1479
|
+
return B ? B.call(l) : "";
|
|
1480
|
+
var w = l + "";
|
|
1481
|
+
return w == "0" && 1 / l == -1 / 0 ? "-0" : w;
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return Oe(
|
|
1483
|
+
function Te(l) {
|
|
1484
|
+
return Oe(l) ? l : Ce(l);
|
|
1485
1485
|
}
|
|
1486
|
-
function me(
|
|
1487
|
-
var
|
|
1488
|
-
return
|
|
1486
|
+
function me(l, w) {
|
|
1487
|
+
var M = l.__data__;
|
|
1488
|
+
return ke(w) ? M[typeof w == "string" ? "string" : "hash"] : M.map;
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1491
|
-
var
|
|
1492
|
-
return Ie(
|
|
1490
|
+
function Pe(l, w) {
|
|
1491
|
+
var M = C(l, w);
|
|
1492
|
+
return Ie(M) ? M : void 0;
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1495
|
-
if (Oe(
|
|
1494
|
+
function Re(l, w) {
|
|
1495
|
+
if (Oe(l))
|
|
1496
1496
|
return !1;
|
|
1497
|
-
var
|
|
1498
|
-
return
|
|
1497
|
+
var M = typeof l;
|
|
1498
|
+
return M == "number" || M == "symbol" || M == "boolean" || l == null || y(l) ? !0 : p.test(l) || !o.test(l) || w != null && l in Object(w);
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1501
|
-
var w = typeof
|
|
1502
|
-
return w == "string" || w == "number" || w == "symbol" || w == "boolean" ?
|
|
1500
|
+
function ke(l) {
|
|
1501
|
+
var w = typeof l;
|
|
1502
|
+
return w == "string" || w == "number" || w == "symbol" || w == "boolean" ? l !== "__proto__" : l === null;
|
|
1503
1503
|
}
|
|
1504
|
-
function _e(
|
|
1505
|
-
return !!
|
|
1504
|
+
function _e(l) {
|
|
1505
|
+
return !!u && u in l;
|
|
1506
1506
|
}
|
|
1507
|
-
var Ce = fe(function(
|
|
1508
|
-
|
|
1507
|
+
var Ce = fe(function(l) {
|
|
1508
|
+
l = g(l);
|
|
1509
1509
|
var w = [];
|
|
1510
|
-
return
|
|
1511
|
-
w.push(
|
|
1510
|
+
return s.test(l) && w.push(""), l.replace(f, function(M, D, ie, J) {
|
|
1511
|
+
w.push(ie ? J.replace(S, "$1") : D || M);
|
|
1512
1512
|
}), w;
|
|
1513
1513
|
});
|
|
1514
|
-
function Ne(
|
|
1515
|
-
if (typeof
|
|
1516
|
-
return
|
|
1517
|
-
var w =
|
|
1518
|
-
return w == "0" && 1 /
|
|
1514
|
+
function Ne(l) {
|
|
1515
|
+
if (typeof l == "string" || y(l))
|
|
1516
|
+
return l;
|
|
1517
|
+
var w = l + "";
|
|
1518
|
+
return w == "0" && 1 / l == -1 / 0 ? "-0" : w;
|
|
1519
1519
|
}
|
|
1520
|
-
function le(
|
|
1521
|
-
if (
|
|
1520
|
+
function le(l) {
|
|
1521
|
+
if (l != null) {
|
|
1522
1522
|
try {
|
|
1523
|
-
return
|
|
1523
|
+
return x.call(l);
|
|
1524
1524
|
} catch {
|
|
1525
1525
|
}
|
|
1526
1526
|
try {
|
|
1527
|
-
return
|
|
1527
|
+
return l + "";
|
|
1528
1528
|
} catch {
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
1531
|
return "";
|
|
1532
1532
|
}
|
|
1533
|
-
function fe(
|
|
1534
|
-
if (typeof
|
|
1533
|
+
function fe(l, w) {
|
|
1534
|
+
if (typeof l != "function" || w && typeof w != "function")
|
|
1535
1535
|
throw new TypeError(e);
|
|
1536
|
-
var
|
|
1537
|
-
var D = arguments,
|
|
1538
|
-
if (
|
|
1539
|
-
return
|
|
1540
|
-
var
|
|
1541
|
-
return
|
|
1536
|
+
var M = function() {
|
|
1537
|
+
var D = arguments, ie = w ? w.apply(this, D) : D[0], J = M.cache;
|
|
1538
|
+
if (J.has(ie))
|
|
1539
|
+
return J.get(ie);
|
|
1540
|
+
var T = l.apply(this, D);
|
|
1541
|
+
return M.cache = J.set(ie, T), T;
|
|
1542
1542
|
};
|
|
1543
|
-
return
|
|
1543
|
+
return M.cache = new (fe.Cache || oe)(), M;
|
|
1544
1544
|
}
|
|
1545
1545
|
fe.Cache = oe;
|
|
1546
|
-
function Se(
|
|
1547
|
-
return
|
|
1546
|
+
function Se(l, w) {
|
|
1547
|
+
return l === w || l !== l && w !== w;
|
|
1548
1548
|
}
|
|
1549
1549
|
var Oe = Array.isArray;
|
|
1550
|
-
function Le(
|
|
1551
|
-
var w = he(
|
|
1550
|
+
function Le(l) {
|
|
1551
|
+
var w = he(l) ? O.call(l) : "";
|
|
1552
1552
|
return w == a || w == t;
|
|
1553
1553
|
}
|
|
1554
|
-
function he(
|
|
1555
|
-
var w = typeof
|
|
1556
|
-
return !!
|
|
1554
|
+
function he(l) {
|
|
1555
|
+
var w = typeof l;
|
|
1556
|
+
return !!l && (w == "object" || w == "function");
|
|
1557
1557
|
}
|
|
1558
|
-
function ge(
|
|
1559
|
-
return !!
|
|
1558
|
+
function ge(l) {
|
|
1559
|
+
return !!l && typeof l == "object";
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1562
|
-
return typeof
|
|
1561
|
+
function y(l) {
|
|
1562
|
+
return typeof l == "symbol" || ge(l) && O.call(l) == n;
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1565
|
-
return
|
|
1564
|
+
function g(l) {
|
|
1565
|
+
return l == null ? "" : xe(l);
|
|
1566
1566
|
}
|
|
1567
|
-
function j(
|
|
1568
|
-
var D =
|
|
1569
|
-
return D === void 0 ?
|
|
1567
|
+
function j(l, w, M) {
|
|
1568
|
+
var D = l == null ? void 0 : te(l, w);
|
|
1569
|
+
return D === void 0 ? M : D;
|
|
1570
1570
|
}
|
|
1571
1571
|
return fr = j, fr;
|
|
1572
1572
|
}
|
|
@@ -1576,14 +1576,14 @@ var dr, Dr;
|
|
|
1576
1576
|
function gt() {
|
|
1577
1577
|
if (Dr) return dr;
|
|
1578
1578
|
Dr = 1;
|
|
1579
|
-
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", n = "\\u0300-\\u036f\\ufe20-\\ufe23", o = "\\u20d0-\\u20f0", p = "\\u2700-\\u27bf",
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
].join("|"), "g"), oe = RegExp("[" +
|
|
1579
|
+
var e = "[object Symbol]", r = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, t = "\\ud800-\\udfff", n = "\\u0300-\\u036f\\ufe20-\\ufe23", o = "\\u20d0-\\u20f0", p = "\\u2700-\\u27bf", s = "a-z\\xdf-\\xf6\\xf8-\\xff", f = "\\xac\\xb1\\xd7\\xf7", m = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", S = "\\u2000-\\u206f", v = " \\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", P = "A-Z\\xc0-\\xd6\\xd8-\\xde", b = "\\ufe0e\\ufe0f", A = f + m + S + v, C = "['’]", h = "[" + t + "]", d = "[" + A + "]", E = "[" + n + o + "]", i = "\\d+", c = "[" + p + "]", u = "[" + s + "]", x = "[^" + t + A + i + p + s + P + "]", I = "\\ud83c[\\udffb-\\udfff]", O = "(?:" + E + "|" + I + ")", $ = "[^" + t + "]", L = "(?:\\ud83c[\\udde6-\\uddff]){2}", F = "[\\ud800-\\udbff][\\udc00-\\udfff]", _ = "[" + P + "]", R = "\\u200d", N = "(?:" + u + "|" + x + ")", B = "(?:" + _ + "|" + x + ")", H = "(?:" + C + "(?:d|ll|m|re|s|t|ve))?", U = "(?:" + C + "(?:D|LL|M|RE|S|T|VE))?", q = O + "?", Q = "[" + b + "]?", z = "(?:" + R + "(?:" + [$, L, F].join("|") + ")" + Q + q + ")*", W = Q + q + z, K = "(?:" + [c, L, F].join("|") + ")" + W, re = "(?:" + [$ + E + "?", E, L, F, h].join("|") + ")", ae = RegExp(C, "g"), ne = RegExp(E, "g"), ce = RegExp(I + "(?=" + I + ")|" + re + W, "g"), ue = RegExp([
|
|
1580
|
+
_ + "?" + u + "+" + H + "(?=" + [d, _, "$"].join("|") + ")",
|
|
1581
|
+
B + "+" + U + "(?=" + [d, _ + N, "$"].join("|") + ")",
|
|
1582
|
+
_ + "?" + N + "+" + H,
|
|
1583
|
+
_ + "+" + U,
|
|
1584
|
+
i,
|
|
1585
|
+
K
|
|
1586
|
+
].join("|"), "g"), oe = RegExp("[" + R + t + n + o + b + "]"), 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 = {
|
|
1587
1587
|
// Latin-1 Supplement block.
|
|
1588
1588
|
À: "A",
|
|
1589
1589
|
Á: "A",
|
|
@@ -1777,91 +1777,91 @@ function gt() {
|
|
|
1777
1777
|
ʼn: "'n",
|
|
1778
1778
|
ſ: "ss"
|
|
1779
1779
|
}, se = typeof Ae == "object" && Ae && Ae.Object === Object && Ae, ye = typeof self == "object" && self && self.Object === Object && self, be = se || ye || Function("return this")();
|
|
1780
|
-
function
|
|
1781
|
-
for (var
|
|
1782
|
-
V =
|
|
1780
|
+
function Y(T, G, V, Z) {
|
|
1781
|
+
for (var ee = -1, we = T ? T.length : 0; ++ee < we; )
|
|
1782
|
+
V = G(V, T[ee], ee, T);
|
|
1783
1783
|
return V;
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return
|
|
1785
|
+
function te(T) {
|
|
1786
|
+
return T.split("");
|
|
1787
1787
|
}
|
|
1788
|
-
function Ie(
|
|
1789
|
-
return
|
|
1788
|
+
function Ie(T) {
|
|
1789
|
+
return T.match(r) || [];
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1792
|
-
return function(
|
|
1793
|
-
return
|
|
1791
|
+
function xe(T) {
|
|
1792
|
+
return function(G) {
|
|
1793
|
+
return T?.[G];
|
|
1794
1794
|
};
|
|
1795
1795
|
}
|
|
1796
|
-
var
|
|
1797
|
-
function me(
|
|
1798
|
-
return oe.test(
|
|
1796
|
+
var Te = xe(pe);
|
|
1797
|
+
function me(T) {
|
|
1798
|
+
return oe.test(T);
|
|
1799
1799
|
}
|
|
1800
|
-
function
|
|
1801
|
-
return de.test(
|
|
1800
|
+
function Pe(T) {
|
|
1801
|
+
return de.test(T);
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1804
|
-
return me(
|
|
1803
|
+
function Re(T) {
|
|
1804
|
+
return me(T) ? ke(T) : te(T);
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1807
|
-
return
|
|
1806
|
+
function ke(T) {
|
|
1807
|
+
return T.match(ce) || [];
|
|
1808
1808
|
}
|
|
1809
|
-
function _e(
|
|
1810
|
-
return
|
|
1809
|
+
function _e(T) {
|
|
1810
|
+
return T.match(ue) || [];
|
|
1811
1811
|
}
|
|
1812
1812
|
var Ce = Object.prototype, Ne = Ce.toString, le = be.Symbol, fe = le ? le.prototype : void 0, Se = fe ? fe.toString : void 0;
|
|
1813
|
-
function Oe(
|
|
1814
|
-
var
|
|
1815
|
-
|
|
1816
|
-
for (var we = Array(
|
|
1817
|
-
we[
|
|
1813
|
+
function Oe(T, G, V) {
|
|
1814
|
+
var Z = -1, ee = T.length;
|
|
1815
|
+
G < 0 && (G = -G > ee ? 0 : ee + G), V = V > ee ? ee : V, V < 0 && (V += ee), ee = G > V ? 0 : V - G >>> 0, G >>>= 0;
|
|
1816
|
+
for (var we = Array(ee); ++Z < ee; )
|
|
1817
|
+
we[Z] = T[Z + G];
|
|
1818
1818
|
return we;
|
|
1819
1819
|
}
|
|
1820
|
-
function Le(
|
|
1821
|
-
if (typeof
|
|
1822
|
-
return
|
|
1823
|
-
if (j(
|
|
1824
|
-
return Se ? Se.call(
|
|
1825
|
-
var
|
|
1826
|
-
return
|
|
1827
|
-
}
|
|
1828
|
-
function he(
|
|
1829
|
-
var
|
|
1830
|
-
return V = V === void 0 ?
|
|
1831
|
-
}
|
|
1832
|
-
function ge(
|
|
1833
|
-
return function(
|
|
1834
|
-
|
|
1835
|
-
var V = me(
|
|
1836
|
-
return
|
|
1820
|
+
function Le(T) {
|
|
1821
|
+
if (typeof T == "string")
|
|
1822
|
+
return T;
|
|
1823
|
+
if (j(T))
|
|
1824
|
+
return Se ? Se.call(T) : "";
|
|
1825
|
+
var G = T + "";
|
|
1826
|
+
return G == "0" && 1 / T == -1 / 0 ? "-0" : G;
|
|
1827
|
+
}
|
|
1828
|
+
function he(T, G, V) {
|
|
1829
|
+
var Z = T.length;
|
|
1830
|
+
return V = V === void 0 ? Z : V, !G && V >= Z ? T : Oe(T, G, V);
|
|
1831
|
+
}
|
|
1832
|
+
function ge(T) {
|
|
1833
|
+
return function(G) {
|
|
1834
|
+
G = l(G);
|
|
1835
|
+
var V = me(G) ? Re(G) : void 0, Z = V ? V[0] : G.charAt(0), ee = V ? he(V, 1).join("") : G.slice(1);
|
|
1836
|
+
return Z[T]() + ee;
|
|
1837
1837
|
};
|
|
1838
1838
|
}
|
|
1839
|
-
function
|
|
1840
|
-
return function(
|
|
1841
|
-
return J(
|
|
1839
|
+
function y(T) {
|
|
1840
|
+
return function(G) {
|
|
1841
|
+
return Y(J(D(G).replace(ae, "")), T, "");
|
|
1842
1842
|
};
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1845
|
-
return !!
|
|
1844
|
+
function g(T) {
|
|
1845
|
+
return !!T && typeof T == "object";
|
|
1846
1846
|
}
|
|
1847
|
-
function j(
|
|
1848
|
-
return typeof
|
|
1847
|
+
function j(T) {
|
|
1848
|
+
return typeof T == "symbol" || g(T) && Ne.call(T) == e;
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1851
|
-
return
|
|
1850
|
+
function l(T) {
|
|
1851
|
+
return T == null ? "" : Le(T);
|
|
1852
1852
|
}
|
|
1853
|
-
var w =
|
|
1854
|
-
return
|
|
1853
|
+
var w = y(function(T, G, V) {
|
|
1854
|
+
return G = G.toLowerCase(), T + (V ? M(G) : G);
|
|
1855
1855
|
});
|
|
1856
|
-
function
|
|
1857
|
-
return
|
|
1856
|
+
function M(T) {
|
|
1857
|
+
return ie(l(T).toLowerCase());
|
|
1858
1858
|
}
|
|
1859
|
-
function D(
|
|
1860
|
-
return
|
|
1859
|
+
function D(T) {
|
|
1860
|
+
return T = l(T), T && T.replace(a, Te).replace(ne, "");
|
|
1861
1861
|
}
|
|
1862
|
-
var
|
|
1863
|
-
function
|
|
1864
|
-
return
|
|
1862
|
+
var ie = ge("toUpperCase");
|
|
1863
|
+
function J(T, G, V) {
|
|
1864
|
+
return T = l(T), G = G, G === void 0 ? Pe(T) ? _e(T) : Ie(T) : T.match(G) || [];
|
|
1865
1865
|
}
|
|
1866
1866
|
return dr = w, dr;
|
|
1867
1867
|
}
|
|
@@ -1881,8 +1881,8 @@ function bt() {
|
|
|
1881
1881
|
return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = a, ve.isJsDom = n, ve.isDeno = o, ve;
|
|
1882
1882
|
}
|
|
1883
1883
|
bt();
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1884
|
+
const k = {}, De = {};
|
|
1885
|
+
k.loadExternalScript = function(e) {
|
|
1886
1886
|
if (De[e])
|
|
1887
1887
|
return De[e];
|
|
1888
1888
|
const r = De[e] = new Promise(a);
|
|
@@ -1897,7 +1897,7 @@ T.loadExternalScript = function(e) {
|
|
|
1897
1897
|
return r;
|
|
1898
1898
|
};
|
|
1899
1899
|
const Vr = {};
|
|
1900
|
-
|
|
1900
|
+
k.loadExternalStyle = function(e) {
|
|
1901
1901
|
const r = new Promise(a);
|
|
1902
1902
|
function a(t, n) {
|
|
1903
1903
|
if (!document)
|
|
@@ -1912,7 +1912,7 @@ T.loadExternalStyle = function(e) {
|
|
|
1912
1912
|
}
|
|
1913
1913
|
return r;
|
|
1914
1914
|
};
|
|
1915
|
-
|
|
1915
|
+
k.exists = function(e) {
|
|
1916
1916
|
var r;
|
|
1917
1917
|
if (Array.isArray(e) || e === 0)
|
|
1918
1918
|
return !0;
|
|
@@ -1934,7 +1934,7 @@ T.exists = function(e) {
|
|
|
1934
1934
|
}
|
|
1935
1935
|
return !r;
|
|
1936
1936
|
};
|
|
1937
|
-
|
|
1937
|
+
k.parseDate = function(e) {
|
|
1938
1938
|
if (e) {
|
|
1939
1939
|
if (e instanceof Date)
|
|
1940
1940
|
return e;
|
|
@@ -1943,12 +1943,12 @@ T.parseDate = function(e) {
|
|
|
1943
1943
|
return r;
|
|
1944
1944
|
}
|
|
1945
1945
|
};
|
|
1946
|
-
|
|
1946
|
+
k.parseURL = function(e) {
|
|
1947
1947
|
if (!e)
|
|
1948
1948
|
return !1;
|
|
1949
1949
|
if (e.startsWith("/") || e.startsWith("://") || e.startsWith("mailto:") || e.startsWith("tel:") || e.startsWith("sms:"))
|
|
1950
1950
|
return e;
|
|
1951
|
-
var a =
|
|
1951
|
+
var a = k.parseEmail(e);
|
|
1952
1952
|
if (a && a === e)
|
|
1953
1953
|
return `mailto:${a}`;
|
|
1954
1954
|
const t = (o) => /^https?:\/\//i.test(o) ? o : `http://${o}`;
|
|
@@ -1959,16 +1959,16 @@ T.parseURL = function(e) {
|
|
|
1959
1959
|
).test(e);
|
|
1960
1960
|
return n ? t(e) : !1;
|
|
1961
1961
|
};
|
|
1962
|
-
|
|
1962
|
+
k.parseNumber = function(e, r) {
|
|
1963
1963
|
if (!e || (e = Number(e), isNaN(e)))
|
|
1964
1964
|
return 0;
|
|
1965
1965
|
if (r) {
|
|
1966
1966
|
var a = e.toFixed(r);
|
|
1967
|
-
e =
|
|
1967
|
+
e = k.parseNumber(a);
|
|
1968
1968
|
}
|
|
1969
1969
|
return e;
|
|
1970
1970
|
};
|
|
1971
|
-
|
|
1971
|
+
k.isValidEmailAddress = function(e) {
|
|
1972
1972
|
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])+$/;
|
|
1973
1973
|
if (!e) return !1;
|
|
1974
1974
|
var a = e.split("@");
|
|
@@ -1981,48 +1981,48 @@ T.isValidEmailAddress = function(e) {
|
|
|
1981
1981
|
return p.length > 63;
|
|
1982
1982
|
}) || !r.test(e));
|
|
1983
1983
|
};
|
|
1984
|
-
|
|
1984
|
+
k.parseEmail = function(e) {
|
|
1985
1985
|
if (!e)
|
|
1986
1986
|
return !1;
|
|
1987
|
-
var r = String(e).toLowerCase(), a =
|
|
1987
|
+
var r = String(e).toLowerCase(), a = k.isValidEmailAddress(r);
|
|
1988
1988
|
return a ? r : !1;
|
|
1989
1989
|
};
|
|
1990
|
-
|
|
1990
|
+
k.parseInt = function(e) {
|
|
1991
1991
|
return !e || (e = parseInt(e), isNaN(e)) ? 0 : e;
|
|
1992
1992
|
};
|
|
1993
|
-
|
|
1993
|
+
k.cleanValue = function(e, r, a) {
|
|
1994
1994
|
a || (a = {});
|
|
1995
|
-
var t =
|
|
1995
|
+
var t = k.exists(e);
|
|
1996
1996
|
if (a.strict && t && r != "boolean")
|
|
1997
1997
|
return e;
|
|
1998
1998
|
switch (r) {
|
|
1999
1999
|
case "reference":
|
|
2000
|
-
return
|
|
2000
|
+
return k.id(e, !0);
|
|
2001
2001
|
case "boolean":
|
|
2002
|
-
return
|
|
2002
|
+
return k.parseBoolean(e);
|
|
2003
2003
|
case "url":
|
|
2004
|
-
return
|
|
2004
|
+
return k.parseURL(e);
|
|
2005
2005
|
case "key":
|
|
2006
|
-
return
|
|
2006
|
+
return k.machineName(e);
|
|
2007
2007
|
case "email":
|
|
2008
|
-
return
|
|
2008
|
+
return k.parseEmail(e);
|
|
2009
2009
|
case "date":
|
|
2010
|
-
var n =
|
|
2010
|
+
var n = k.parseDate(e, a);
|
|
2011
2011
|
return n === void 0 ? void 0 : n;
|
|
2012
2012
|
case "number":
|
|
2013
2013
|
case "decimal":
|
|
2014
2014
|
case "float":
|
|
2015
|
-
var o =
|
|
2015
|
+
var o = k.parseNumber(e);
|
|
2016
2016
|
return String(o) == String(Number(e)) ? o : void 0;
|
|
2017
2017
|
case "integer":
|
|
2018
|
-
var o =
|
|
2018
|
+
var o = k.parseInt(e);
|
|
2019
2019
|
return String(o) == String(parseInt(e)) ? o : void 0;
|
|
2020
2020
|
case "group":
|
|
2021
2021
|
return e;
|
|
2022
2022
|
case "object":
|
|
2023
2023
|
return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
|
|
2024
2024
|
case "string":
|
|
2025
|
-
if (
|
|
2025
|
+
if (k.exists(e)) {
|
|
2026
2026
|
var p = String(e);
|
|
2027
2027
|
return p == "[object Object]" ? void 0 : p;
|
|
2028
2028
|
} else
|
|
@@ -2042,43 +2042,43 @@ T.cleanValue = function(e, r, a) {
|
|
|
2042
2042
|
return String(e);
|
|
2043
2043
|
}
|
|
2044
2044
|
};
|
|
2045
|
-
|
|
2046
|
-
var t =
|
|
2045
|
+
k.isValidValue = function(e, r, a) {
|
|
2046
|
+
var t = k.exists(e), n = typeof e == "number", o = !1;
|
|
2047
2047
|
if (!t)
|
|
2048
2048
|
return !1;
|
|
2049
2049
|
switch (r) {
|
|
2050
2050
|
case "url":
|
|
2051
|
-
a ? o = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : o = String(e) ===
|
|
2051
|
+
a ? o = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : o = String(e) === k.parseURL(e);
|
|
2052
2052
|
break;
|
|
2053
2053
|
case "key":
|
|
2054
|
-
o = String(e) ===
|
|
2054
|
+
o = String(e) === k.machineName(e);
|
|
2055
2055
|
break;
|
|
2056
2056
|
case "date":
|
|
2057
2057
|
if (a && (typeof e != "object" || !(e instanceof Date)))
|
|
2058
2058
|
return !1;
|
|
2059
|
-
var p =
|
|
2059
|
+
var p = k.parseDate(e);
|
|
2060
2060
|
return p !== void 0;
|
|
2061
2061
|
case "email":
|
|
2062
|
-
a ? o = e ===
|
|
2062
|
+
a ? o = e === k.parseEmail(e) : o = String(e).toLowerCase() === k.parseEmail(e);
|
|
2063
2063
|
break;
|
|
2064
2064
|
case "number":
|
|
2065
2065
|
case "decimal":
|
|
2066
2066
|
case "float":
|
|
2067
|
-
a ? o = n && Number(e) ===
|
|
2067
|
+
a ? o = n && Number(e) === k.parseNumber(e) : o = Number(e) === k.parseNumber(e);
|
|
2068
2068
|
break;
|
|
2069
2069
|
case "integer":
|
|
2070
|
-
a ? o = n && Number(e) ===
|
|
2070
|
+
a ? o = n && Number(e) === k.parseInt(e) : o = Number(e) === k.parseInt(e);
|
|
2071
2071
|
break;
|
|
2072
2072
|
case "boolean":
|
|
2073
|
-
var p =
|
|
2073
|
+
var p = k.parseBoolean(e);
|
|
2074
2074
|
a ? (e === !0 || e === !1) && (o = e === p) : o = p === !0 || p === !1;
|
|
2075
2075
|
break;
|
|
2076
2076
|
case "reference":
|
|
2077
|
-
a ? o = String(e) ===
|
|
2077
|
+
a ? o = String(e) === k.id(e) : o = !!k.id(e);
|
|
2078
2078
|
break;
|
|
2079
2079
|
case "string":
|
|
2080
|
-
var
|
|
2081
|
-
if (a && typeof e != "string" ||
|
|
2080
|
+
var s = String(e);
|
|
2081
|
+
if (a && typeof e != "string" || s == "[object Object]")
|
|
2082
2082
|
return !1;
|
|
2083
2083
|
o = !0;
|
|
2084
2084
|
break;
|
|
@@ -2094,7 +2094,7 @@ T.isValidValue = function(e, r, a) {
|
|
|
2094
2094
|
}
|
|
2095
2095
|
return o;
|
|
2096
2096
|
};
|
|
2097
|
-
|
|
2097
|
+
k.parseBoolean = function(e) {
|
|
2098
2098
|
switch (String(e).toLowerCase()) {
|
|
2099
2099
|
case "true":
|
|
2100
2100
|
case "y":
|
|
@@ -2117,10 +2117,10 @@ T.parseBoolean = function(e) {
|
|
|
2117
2117
|
}
|
|
2118
2118
|
return !!e;
|
|
2119
2119
|
};
|
|
2120
|
-
|
|
2120
|
+
k.clone = function(e) {
|
|
2121
2121
|
return JSON.parse(JSON.stringify(e));
|
|
2122
2122
|
};
|
|
2123
|
-
|
|
2123
|
+
k.getAllFields = function(e) {
|
|
2124
2124
|
const r = e.definesType === "profile" || e.key === "profile", a = e.definesType === "submission";
|
|
2125
2125
|
var t = [...e.fields], n = e.definedFields || [];
|
|
2126
2126
|
if (n.length)
|
|
@@ -2142,8 +2142,8 @@ T.getAllFields = function(e) {
|
|
|
2142
2142
|
key: "data",
|
|
2143
2143
|
asObject: !0,
|
|
2144
2144
|
type: "group",
|
|
2145
|
-
fields: n.map(function(
|
|
2146
|
-
return
|
|
2145
|
+
fields: n.map(function(m) {
|
|
2146
|
+
return m.type === "reference" && (m = JSON.parse(JSON.stringify(m)), delete m.fields), m;
|
|
2147
2147
|
})
|
|
2148
2148
|
};
|
|
2149
2149
|
t.push(p);
|
|
@@ -2172,38 +2172,38 @@ T.getAllFields = function(e) {
|
|
|
2172
2172
|
maximum: 1,
|
|
2173
2173
|
type: "date"
|
|
2174
2174
|
}));
|
|
2175
|
-
var
|
|
2176
|
-
var
|
|
2177
|
-
return !
|
|
2178
|
-
}).map(function(
|
|
2179
|
-
return
|
|
2180
|
-
}).sort(function(
|
|
2181
|
-
return
|
|
2175
|
+
var s = k.mapFields(t).filter(function(f) {
|
|
2176
|
+
var m = f.type == "group" && f.asObject && f.minimum == 1 && f.maximum == 1;
|
|
2177
|
+
return !m;
|
|
2178
|
+
}).map(function(f) {
|
|
2179
|
+
return f.title = f.filterTitle || f.titles.filter(Boolean).join(" › "), f;
|
|
2180
|
+
}).sort(function(f, m) {
|
|
2181
|
+
return f.title < m.title ? -1 : 1;
|
|
2182
2182
|
});
|
|
2183
|
-
return
|
|
2183
|
+
return s;
|
|
2184
2184
|
};
|
|
2185
|
-
|
|
2185
|
+
k.mapFields = function(e, r) {
|
|
2186
2186
|
r || (r = {});
|
|
2187
|
-
var a = [], t = [], n = [], o = 1, p = r.depth,
|
|
2188
|
-
e.forEach(
|
|
2189
|
-
function m
|
|
2190
|
-
var
|
|
2191
|
-
|
|
2192
|
-
var
|
|
2193
|
-
if (
|
|
2194
|
-
if (
|
|
2195
|
-
|
|
2187
|
+
var a = [], t = [], n = [], o = 1, p = r.depth, s = r.arrayDelimeter || "[]";
|
|
2188
|
+
e.forEach(f);
|
|
2189
|
+
function f(m, S) {
|
|
2190
|
+
var v = m.key, P = m.type == "group", b = m.minimum === m.maximum && m.minimum === 1, A = m.asObject, C = P && !A, h = r.original ? m : k.clone(m);
|
|
2191
|
+
h.trail = t.slice(), h.trail.push(v), h.path = h.trail.join("."), h.titles = n.slice(), h.titles.push(m.filterTitle || m.title || ""), (!C || r.includeLayout) && a.push(h);
|
|
2192
|
+
var E = p && o >= p;
|
|
2193
|
+
if (m.fields && m.fields.length)
|
|
2194
|
+
if (C)
|
|
2195
|
+
m.fields.forEach(f);
|
|
2196
2196
|
else {
|
|
2197
|
-
if (
|
|
2197
|
+
if (E)
|
|
2198
2198
|
return;
|
|
2199
2199
|
o++;
|
|
2200
|
-
let
|
|
2201
|
-
r.includeArrayDelimeter && (
|
|
2200
|
+
let i = v;
|
|
2201
|
+
r.includeArrayDelimeter && (b || (i = `${v}${s}`)), t.push(i), n.push(m.filterTitle || m.title), m.fields.forEach(f), o--, t.pop(), n.pop();
|
|
2202
2202
|
}
|
|
2203
2203
|
}
|
|
2204
2204
|
return a;
|
|
2205
2205
|
};
|
|
2206
|
-
|
|
2206
|
+
k.mapParameters = function(e) {
|
|
2207
2207
|
e = e || {};
|
|
2208
2208
|
var r = [];
|
|
2209
2209
|
return Object.entries(e).forEach(function([a, t]) {
|
|
@@ -2212,13 +2212,13 @@ T.mapParameters = function(e) {
|
|
|
2212
2212
|
}) : r.push(encodeURIComponent(a) + "=" + encodeURIComponent(t)));
|
|
2213
2213
|
}), r.join("&");
|
|
2214
2214
|
};
|
|
2215
|
-
|
|
2215
|
+
k.formatCurrency = function(e, r, a) {
|
|
2216
2216
|
(!e || isNaN(e)) && (e = 0), a = a || 2;
|
|
2217
|
-
var t =
|
|
2217
|
+
var t = k.currencySymbol(r);
|
|
2218
2218
|
return `${t}${parseFloat(Number(e) / 100).toFixed(a)}`;
|
|
2219
2219
|
};
|
|
2220
|
-
|
|
2221
|
-
if (e =
|
|
2220
|
+
k.getTypeFromID = function(e) {
|
|
2221
|
+
if (e = k.id(e), !e)
|
|
2222
2222
|
return;
|
|
2223
2223
|
const r = {
|
|
2224
2224
|
21: "organisation",
|
|
@@ -2280,7 +2280,7 @@ T.getTypeFromID = function(e) {
|
|
|
2280
2280
|
var a = e.slice(8, 10);
|
|
2281
2281
|
return r[a];
|
|
2282
2282
|
};
|
|
2283
|
-
|
|
2283
|
+
k.currencySymbol = function(e) {
|
|
2284
2284
|
switch (e = String(e).toLowerCase(), String(e).toLowerCase()) {
|
|
2285
2285
|
case "gbp":
|
|
2286
2286
|
return "£";
|
|
@@ -2290,30 +2290,30 @@ T.currencySymbol = function(e) {
|
|
|
2290
2290
|
return "$";
|
|
2291
2291
|
}
|
|
2292
2292
|
};
|
|
2293
|
-
|
|
2293
|
+
k.getAvailableCurrencies = function(e) {
|
|
2294
2294
|
var r = [];
|
|
2295
2295
|
if (r.push({
|
|
2296
|
-
name: `USD (${
|
|
2296
|
+
name: `USD (${k.currencySymbol("usd")})`,
|
|
2297
2297
|
value: "usd",
|
|
2298
2298
|
countryCode: { US: !0 }
|
|
2299
2299
|
}), r.push({
|
|
2300
|
-
name: `GBP (${
|
|
2300
|
+
name: `GBP (${k.currencySymbol("gbp")})`,
|
|
2301
2301
|
value: "gbp",
|
|
2302
2302
|
countryCode: { GB: !0, UK: !0 }
|
|
2303
2303
|
}), r.push({
|
|
2304
|
-
name: `CAD (${
|
|
2304
|
+
name: `CAD (${k.currencySymbol("cad")})`,
|
|
2305
2305
|
value: "cad",
|
|
2306
2306
|
countryCode: { CA: !0 }
|
|
2307
2307
|
}), r.push({
|
|
2308
|
-
name: `AUD (${
|
|
2308
|
+
name: `AUD (${k.currencySymbol("aud")})`,
|
|
2309
2309
|
value: "aud",
|
|
2310
2310
|
countryCode: { AU: !0 }
|
|
2311
2311
|
}), r.push({
|
|
2312
|
-
name: `NZD (${
|
|
2312
|
+
name: `NZD (${k.currencySymbol("nzd")})`,
|
|
2313
2313
|
value: "nzd",
|
|
2314
2314
|
countryCode: { NZ: !0 }
|
|
2315
2315
|
}), r.push({
|
|
2316
|
-
name: `SGD (${
|
|
2316
|
+
name: `SGD (${k.currencySymbol("sgd")})`,
|
|
2317
2317
|
value: "sgd",
|
|
2318
2318
|
countryCode: { SG: !0 }
|
|
2319
2319
|
}), e) {
|
|
@@ -2321,91 +2321,91 @@ T.getAvailableCurrencies = function(e) {
|
|
|
2321
2321
|
return n.countryCode[e];
|
|
2322
2322
|
});
|
|
2323
2323
|
const t = (n, o, p) => {
|
|
2324
|
-
const
|
|
2325
|
-
return
|
|
2324
|
+
const s = [...n];
|
|
2325
|
+
return s.splice(p, 0, ...s.splice(o, 1)), s;
|
|
2326
2326
|
};
|
|
2327
2327
|
a != -1 && (r = t(r, a, 0));
|
|
2328
2328
|
}
|
|
2329
2329
|
return r;
|
|
2330
2330
|
};
|
|
2331
|
-
|
|
2331
|
+
k.hash = function(e, r) {
|
|
2332
2332
|
return e = Array.isArray(e) ? e : [], e.reduce(function(a, t) {
|
|
2333
2333
|
const n = r ? Ue(t, r) : t;
|
|
2334
2334
|
return a[n] = t, a;
|
|
2335
2335
|
}, {});
|
|
2336
2336
|
};
|
|
2337
|
-
|
|
2337
|
+
k.extractFromArray = function(e, r, a, t, n, o, p) {
|
|
2338
2338
|
p = p || {}, a && (p.sum = a), t && (p.flatten = !0), n && (p.unique = !0), o && (p.excludeNull = !0);
|
|
2339
|
-
var
|
|
2340
|
-
var S = Ue(
|
|
2341
|
-
return p.excludeNull &&
|
|
2339
|
+
var s = e.reduce(function(f, m) {
|
|
2340
|
+
var S = Ue(m, r), v = !S && S !== !1 && S !== 0;
|
|
2341
|
+
return p.excludeNull && v || f.push(S), f;
|
|
2342
2342
|
}, []);
|
|
2343
|
-
return p.flatten && (
|
|
2344
|
-
return
|
|
2345
|
-
}, 0)),
|
|
2343
|
+
return p.flatten && (s = s.flat()), p.unique && (s = [...new Set(s)]), p.sum && (s = s.reduce(function(f, m) {
|
|
2344
|
+
return f + m;
|
|
2345
|
+
}, 0)), s;
|
|
2346
2346
|
};
|
|
2347
|
-
|
|
2347
|
+
k.matchInArray = function(e, r, a, t) {
|
|
2348
2348
|
var n = e.filter(function(o) {
|
|
2349
|
-
var p = Ue(o, r),
|
|
2349
|
+
var p = Ue(o, r), s;
|
|
2350
2350
|
switch (t) {
|
|
2351
2351
|
case "in":
|
|
2352
|
-
|
|
2352
|
+
s = p.includes(a);
|
|
2353
2353
|
break;
|
|
2354
2354
|
case ">=":
|
|
2355
|
-
|
|
2355
|
+
s = p >= a;
|
|
2356
2356
|
break;
|
|
2357
2357
|
case "<=":
|
|
2358
|
-
|
|
2358
|
+
s = p <= a;
|
|
2359
2359
|
break;
|
|
2360
2360
|
case "<":
|
|
2361
|
-
|
|
2361
|
+
s = p < a;
|
|
2362
2362
|
break;
|
|
2363
2363
|
case ">":
|
|
2364
|
-
|
|
2364
|
+
s = p > a;
|
|
2365
2365
|
break;
|
|
2366
2366
|
case "==":
|
|
2367
2367
|
default:
|
|
2368
|
-
a === void 0 ?
|
|
2368
|
+
a === void 0 ? s = p : s = p == a;
|
|
2369
2369
|
break;
|
|
2370
2370
|
}
|
|
2371
|
-
return
|
|
2371
|
+
return s;
|
|
2372
2372
|
});
|
|
2373
2373
|
return n;
|
|
2374
2374
|
};
|
|
2375
|
-
|
|
2375
|
+
k.comma = function(e, r, a) {
|
|
2376
2376
|
return a && (e = e.slice(0, a)), e.filter(function(t) {
|
|
2377
2377
|
return t != null && t !== void 0 && t !== "";
|
|
2378
2378
|
}).map(function(t) {
|
|
2379
2379
|
return r && r.length ? Ue(t, r) : t;
|
|
2380
2380
|
}).join(", ");
|
|
2381
2381
|
};
|
|
2382
|
-
|
|
2382
|
+
k.id = function(e) {
|
|
2383
2383
|
if (e) {
|
|
2384
2384
|
var r;
|
|
2385
2385
|
e._id ? r = String(e._id) : r = String(e);
|
|
2386
|
-
var a =
|
|
2386
|
+
var a = k.isValidID(r);
|
|
2387
2387
|
if (a)
|
|
2388
2388
|
return r;
|
|
2389
2389
|
}
|
|
2390
2390
|
};
|
|
2391
|
-
|
|
2391
|
+
k.ids = function(e) {
|
|
2392
2392
|
if (!e)
|
|
2393
2393
|
return [];
|
|
2394
2394
|
var r = Object.keys(
|
|
2395
2395
|
e.reduce(function(a, t) {
|
|
2396
2396
|
if (!t)
|
|
2397
2397
|
return a;
|
|
2398
|
-
var n =
|
|
2398
|
+
var n = k.id(t);
|
|
2399
2399
|
return n && (a[n] = 1), a;
|
|
2400
2400
|
}, {})
|
|
2401
2401
|
);
|
|
2402
2402
|
return r;
|
|
2403
2403
|
};
|
|
2404
|
-
|
|
2404
|
+
k.isValidID = function(e) {
|
|
2405
2405
|
var r = new RegExp("^[0-9a-fA-F]{24}$");
|
|
2406
2406
|
return r.test(String(e));
|
|
2407
2407
|
};
|
|
2408
|
-
|
|
2408
|
+
k.errorMessage = function(e) {
|
|
2409
2409
|
if (e) {
|
|
2410
2410
|
Array.isArray(e) && (e = e[0]);
|
|
2411
2411
|
var r = ["response.data.message", "response.data", "message"], a;
|
|
@@ -2417,11 +2417,11 @@ T.errorMessage = function(e) {
|
|
|
2417
2417
|
}), Array.isArray(a) && (a = a[0]), a = a || JSON.stringify(e), a;
|
|
2418
2418
|
}
|
|
2419
2419
|
};
|
|
2420
|
-
|
|
2420
|
+
k.guid = function() {
|
|
2421
2421
|
var e = (/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substring(2) + "0".repeat(16);
|
|
2422
2422
|
return e.substr(0, 8) + "-" + e.substr(8, 4) + "-4000-8" + e.substr(12, 3) + "-" + e.substr(15, 12);
|
|
2423
2423
|
};
|
|
2424
|
-
|
|
2424
|
+
k.machineName = function(e) {
|
|
2425
2425
|
if (!(!e || !e.length)) {
|
|
2426
2426
|
var r = /[^a-zA-Z0-9-_]+/g;
|
|
2427
2427
|
return String(e).replace(r, " ").split("_").map((a) => At(a)).join("_");
|
|
@@ -2652,257 +2652,257 @@ var Et = function(e) {
|
|
|
2652
2652
|
});
|
|
2653
2653
|
const n = new je();
|
|
2654
2654
|
n.bootstrap(t);
|
|
2655
|
-
function o(
|
|
2656
|
-
var
|
|
2657
|
-
t.onChange && t.onChange(
|
|
2655
|
+
function o(s) {
|
|
2656
|
+
var f = r.getUser();
|
|
2657
|
+
t.onChange && t.onChange(f), n.dispatch("change", f, s);
|
|
2658
2658
|
}
|
|
2659
|
-
t.set = function(
|
|
2659
|
+
t.set = function(s, f, m) {
|
|
2660
2660
|
const S = r.getUser();
|
|
2661
|
-
if (JSON.stringify(S) != JSON.stringify(
|
|
2662
|
-
return o(
|
|
2661
|
+
if (JSON.stringify(S) != JSON.stringify(s) && (r.setUser(s), !m))
|
|
2662
|
+
return o(f);
|
|
2663
2663
|
}, t.logout = function() {
|
|
2664
2664
|
return r.clearUser(), e.cache.reset(), o();
|
|
2665
|
-
}, t.changeOrganisation = function(
|
|
2666
|
-
|
|
2667
|
-
var
|
|
2668
|
-
return
|
|
2669
|
-
e.api.post(`/user/switch/${
|
|
2670
|
-
|
|
2671
|
-
}).catch(
|
|
2665
|
+
}, t.changeOrganisation = function(s, f) {
|
|
2666
|
+
s = e.utils.id(s), f || (f = {});
|
|
2667
|
+
var m = !0;
|
|
2668
|
+
return f.disableAutoAuthentication && (m = !1), new Promise(function(S, v) {
|
|
2669
|
+
e.api.post(`/user/switch/${s}`).then(function(P) {
|
|
2670
|
+
m && (e.cache.reset(), t.set(P.data)), S(P.data);
|
|
2671
|
+
}).catch(v);
|
|
2672
2672
|
});
|
|
2673
|
-
}, t.impersonate = function(
|
|
2674
|
-
|
|
2675
|
-
var
|
|
2676
|
-
|
|
2677
|
-
var S = e.api.post(`/user/impersonate/${
|
|
2678
|
-
return S.then(function(
|
|
2679
|
-
|
|
2680
|
-
}, function(
|
|
2673
|
+
}, t.impersonate = function(s, f) {
|
|
2674
|
+
s = e.utils.id(s), f || (f = {});
|
|
2675
|
+
var m = !0;
|
|
2676
|
+
f.disableAutoAuthentication && (m = !1);
|
|
2677
|
+
var S = e.api.post(`/user/impersonate/${s}`);
|
|
2678
|
+
return S.then(function(v) {
|
|
2679
|
+
m && (e.cache.reset(), t.set(v.data));
|
|
2680
|
+
}, function(v) {
|
|
2681
2681
|
}), S;
|
|
2682
|
-
}, t.login = async function(
|
|
2683
|
-
|
|
2684
|
-
var
|
|
2685
|
-
|
|
2686
|
-
var S = new Promise(
|
|
2687
|
-
function
|
|
2688
|
-
if (!
|
|
2689
|
-
return
|
|
2682
|
+
}, t.login = async function(s, f) {
|
|
2683
|
+
f || (f = {});
|
|
2684
|
+
var m = !0;
|
|
2685
|
+
f.disableAutoAuthentication && (m = !1);
|
|
2686
|
+
var S = new Promise(v);
|
|
2687
|
+
function v(P, b) {
|
|
2688
|
+
if (!s)
|
|
2689
|
+
return b({
|
|
2690
2690
|
message: "Missing credentials!"
|
|
2691
2691
|
});
|
|
2692
|
-
if (!
|
|
2693
|
-
return
|
|
2692
|
+
if (!s.email || !s.email.length)
|
|
2693
|
+
return b({
|
|
2694
2694
|
message: "Username was not provided"
|
|
2695
2695
|
});
|
|
2696
|
-
if (!
|
|
2697
|
-
return
|
|
2696
|
+
if (!s.password || !s.password.length)
|
|
2697
|
+
return b({
|
|
2698
2698
|
message: "Password was not provided"
|
|
2699
2699
|
});
|
|
2700
|
-
var
|
|
2700
|
+
var A = {
|
|
2701
2701
|
bypassInterceptor: !0
|
|
2702
2702
|
};
|
|
2703
|
-
r.isCookieMode && r.isCookieMode() && (
|
|
2704
|
-
var
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
},
|
|
2703
|
+
r.isCookieMode && r.isCookieMode() && (s.useCookies = !0, A.withCredentials = !0);
|
|
2704
|
+
var h = `${e.apiURL}/user/login`;
|
|
2705
|
+
f.url && (h = f.url), e.api.post(h, s, A).then(function(d) {
|
|
2706
|
+
m && t.set(d.data), P(d);
|
|
2707
|
+
}, b);
|
|
2708
2708
|
}
|
|
2709
2709
|
return S;
|
|
2710
|
-
}, t.signup = async function(
|
|
2711
|
-
|
|
2712
|
-
var
|
|
2713
|
-
|
|
2714
|
-
var S = new Promise(
|
|
2715
|
-
function
|
|
2716
|
-
if (!
|
|
2717
|
-
return
|
|
2710
|
+
}, t.signup = async function(s, f) {
|
|
2711
|
+
f || (f = {});
|
|
2712
|
+
var m = !0;
|
|
2713
|
+
f.disableAutoAuthentication && (m = !1);
|
|
2714
|
+
var S = new Promise(v);
|
|
2715
|
+
function v(P, b) {
|
|
2716
|
+
if (!s)
|
|
2717
|
+
return b({
|
|
2718
2718
|
message: "No details provided"
|
|
2719
2719
|
});
|
|
2720
|
-
if (!
|
|
2721
|
-
return
|
|
2720
|
+
if (!s.firstName || !s.firstName.length)
|
|
2721
|
+
return b({
|
|
2722
2722
|
message: "First Name was not provided"
|
|
2723
2723
|
});
|
|
2724
|
-
if (!
|
|
2725
|
-
return
|
|
2724
|
+
if (!s.lastName || !s.lastName.length)
|
|
2725
|
+
return b({
|
|
2726
2726
|
message: "Last Name was not provided"
|
|
2727
2727
|
});
|
|
2728
|
-
if (!
|
|
2729
|
-
return
|
|
2728
|
+
if (!s.email || !s.email.length)
|
|
2729
|
+
return b({
|
|
2730
2730
|
message: "Email/Username was not provided"
|
|
2731
2731
|
});
|
|
2732
|
-
if (!
|
|
2733
|
-
return
|
|
2732
|
+
if (!s.password || !s.password.length)
|
|
2733
|
+
return b({
|
|
2734
2734
|
message: "Password was not provided"
|
|
2735
2735
|
});
|
|
2736
|
-
if (!
|
|
2737
|
-
return
|
|
2736
|
+
if (!s.confirmPassword || !s.confirmPassword.length)
|
|
2737
|
+
return b({
|
|
2738
2738
|
message: "Confirm Password was not provided"
|
|
2739
2739
|
});
|
|
2740
|
-
if (
|
|
2741
|
-
return
|
|
2740
|
+
if (s.confirmPassword != s.password)
|
|
2741
|
+
return b({
|
|
2742
2742
|
message: "Your passwords do not match"
|
|
2743
2743
|
});
|
|
2744
|
-
var
|
|
2744
|
+
var A = {
|
|
2745
2745
|
bypassInterceptor: !0
|
|
2746
2746
|
};
|
|
2747
|
-
r.isCookieMode && r.isCookieMode() && (
|
|
2748
|
-
var
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
},
|
|
2747
|
+
r.isCookieMode && r.isCookieMode() && (s.useCookies = !0, A.withCredentials = !0);
|
|
2748
|
+
var h = `${e.apiURL}/user/signup`;
|
|
2749
|
+
f.application && (h = `${e.domain || ""}/qik/application/signup`), f.url && (h = f.url), e.api.post(h, s, A).then(function(d) {
|
|
2750
|
+
m && t.set(d.data), P(d);
|
|
2751
|
+
}, b);
|
|
2752
2752
|
}
|
|
2753
2753
|
return S;
|
|
2754
|
-
}, t.retrieveUserFromResetToken = async function(
|
|
2755
|
-
|
|
2756
|
-
var
|
|
2754
|
+
}, t.retrieveUserFromResetToken = async function(s, f) {
|
|
2755
|
+
f || (f = {});
|
|
2756
|
+
var m = {
|
|
2757
2757
|
bypassInterceptor: !0
|
|
2758
2758
|
};
|
|
2759
|
-
return new Promise(function(S,
|
|
2760
|
-
e.api.get(
|
|
2761
|
-
return S(
|
|
2762
|
-
},
|
|
2759
|
+
return new Promise(function(S, v) {
|
|
2760
|
+
e.api.get(f.url || `${e.apiURL}/user/reset/${s}`, m).then(function(P) {
|
|
2761
|
+
return S(P.data);
|
|
2762
|
+
}, v);
|
|
2763
2763
|
});
|
|
2764
|
-
}, t.updateUserWithToken = async function(
|
|
2765
|
-
|
|
2764
|
+
}, t.updateUserWithToken = async function(s, f, m) {
|
|
2765
|
+
m || (m = {});
|
|
2766
2766
|
var S = !0;
|
|
2767
|
-
return
|
|
2768
|
-
var
|
|
2767
|
+
return m.disableAutoAuthentication && (S = !1), new Promise(function(v, P) {
|
|
2768
|
+
var b = {
|
|
2769
2769
|
bypassInterceptor: !0
|
|
2770
2770
|
};
|
|
2771
|
-
e.api.post(
|
|
2772
|
-
return S && (e.cache.reset(), t.set(
|
|
2773
|
-
},
|
|
2771
|
+
e.api.post(m.url || `${e.apiURL}/user/reset/${s}`, f, b).then(function(A) {
|
|
2772
|
+
return S && (e.cache.reset(), t.set(A.data)), v(A.data);
|
|
2773
|
+
}, P);
|
|
2774
2774
|
});
|
|
2775
|
-
}, t.sendResetPasswordRequest = function(
|
|
2776
|
-
return
|
|
2775
|
+
}, t.sendResetPasswordRequest = function(s, f) {
|
|
2776
|
+
return f || (f = {}), s ? !s.email || !s.email.length ? Promise.reject({
|
|
2777
2777
|
message: "Email is required but was not provided"
|
|
2778
|
-
}) : new Promise(function(
|
|
2779
|
-
var
|
|
2778
|
+
}) : new Promise(function(m, S) {
|
|
2779
|
+
var v = {
|
|
2780
2780
|
bypassInterceptor: !0
|
|
2781
2781
|
};
|
|
2782
|
-
e.api.post(
|
|
2782
|
+
e.api.post(f.url || `${e.apiURL}/user/forgot`, s, v).then(m, S);
|
|
2783
2783
|
}) : Promise.reject({
|
|
2784
2784
|
message: "No details were provided for password reset request"
|
|
2785
2785
|
});
|
|
2786
|
-
}, t.ensureValidToken = async function(
|
|
2787
|
-
var
|
|
2788
|
-
if (!
|
|
2786
|
+
}, t.ensureValidToken = async function(s) {
|
|
2787
|
+
var f = t.getCurrentUser();
|
|
2788
|
+
if (!f)
|
|
2789
2789
|
return Promise.reject("No user");
|
|
2790
2790
|
if (r.isCookieMode && r.isCookieMode())
|
|
2791
|
-
return
|
|
2792
|
-
var { token: S } =
|
|
2791
|
+
return s ? await t.refreshAccessToken() : "cookie_mode_token";
|
|
2792
|
+
var { token: S } = f;
|
|
2793
2793
|
if (!S)
|
|
2794
2794
|
return Promise.reject("No token");
|
|
2795
|
-
var
|
|
2796
|
-
|
|
2797
|
-
var
|
|
2798
|
-
return
|
|
2795
|
+
var v = /* @__PURE__ */ new Date();
|
|
2796
|
+
v.setSeconds(v.getSeconds() + a);
|
|
2797
|
+
var P = new Date(S.expires);
|
|
2798
|
+
return s ? await t.refreshAccessToken(S.refreshToken) : v < P ? S : await t.refreshAccessToken(S.refreshToken);
|
|
2799
2799
|
};
|
|
2800
2800
|
const p = {};
|
|
2801
|
-
return t.refreshAccessToken = async function(
|
|
2801
|
+
return t.refreshAccessToken = async function(s) {
|
|
2802
2802
|
if (p.inflightRefreshRequest)
|
|
2803
2803
|
return p.inflightRefreshRequest;
|
|
2804
|
-
const
|
|
2805
|
-
return p.inflightRefreshRequest = new Promise(function(
|
|
2806
|
-
let
|
|
2804
|
+
const f = r.isCookieMode && r.isCookieMode();
|
|
2805
|
+
return p.inflightRefreshRequest = new Promise(function(m, S) {
|
|
2806
|
+
let v = {}, P = {
|
|
2807
2807
|
bypassInterceptor: !0,
|
|
2808
2808
|
withoutToken: !0
|
|
2809
2809
|
};
|
|
2810
|
-
if (
|
|
2811
|
-
|
|
2810
|
+
if (f)
|
|
2811
|
+
P.withCredentials = !0;
|
|
2812
2812
|
else {
|
|
2813
|
-
if (!
|
|
2813
|
+
if (!s)
|
|
2814
2814
|
return p.inflightRefreshRequest = null, S(new Error("No refresh token provided for localStorage mode"));
|
|
2815
|
-
|
|
2815
|
+
v.refreshToken = s;
|
|
2816
2816
|
}
|
|
2817
|
-
e.api.post("/user/refresh",
|
|
2818
|
-
if (!
|
|
2817
|
+
e.api.post("/user/refresh", v, P).then(function(A) {
|
|
2818
|
+
if (!A || !A.data)
|
|
2819
2819
|
return p.inflightRefreshRequest = null, S(new Error("Invalid refresh response"));
|
|
2820
|
-
if (t.set(
|
|
2821
|
-
|
|
2820
|
+
if (t.set(A.data), o(), f)
|
|
2821
|
+
m("cookie_token_refreshed");
|
|
2822
2822
|
else {
|
|
2823
|
-
const
|
|
2824
|
-
|
|
2823
|
+
const C = A.data.token?.accessToken;
|
|
2824
|
+
C ? m(C) : S(new Error("No access token in refresh response"));
|
|
2825
2825
|
}
|
|
2826
2826
|
setTimeout(function() {
|
|
2827
2827
|
p.inflightRefreshRequest = null;
|
|
2828
2828
|
});
|
|
2829
|
-
}).catch(function(
|
|
2829
|
+
}).catch(function(b) {
|
|
2830
2830
|
setTimeout(function() {
|
|
2831
2831
|
p.inflightRefreshRequest = null;
|
|
2832
|
-
}), S(
|
|
2832
|
+
}), S(b);
|
|
2833
2833
|
});
|
|
2834
2834
|
}), p.inflightRefreshRequest;
|
|
2835
2835
|
}, t.sync = function() {
|
|
2836
|
-
return e.api.get("/user").then(function(
|
|
2837
|
-
if (
|
|
2838
|
-
const
|
|
2839
|
-
if (
|
|
2840
|
-
const
|
|
2841
|
-
|
|
2836
|
+
return e.api.get("/user").then(function(s) {
|
|
2837
|
+
if (s.data) {
|
|
2838
|
+
const f = r.getUser();
|
|
2839
|
+
if (f) {
|
|
2840
|
+
const m = { ...f };
|
|
2841
|
+
m.session ? Object.assign(m.session, s.data) : m.session = s.data, t.set(m);
|
|
2842
2842
|
} else
|
|
2843
|
-
t.set(
|
|
2843
|
+
t.set(s.data);
|
|
2844
2844
|
} else
|
|
2845
2845
|
t.set(null);
|
|
2846
2846
|
o();
|
|
2847
|
-
}).catch(function(
|
|
2847
|
+
}).catch(function(s) {
|
|
2848
2848
|
t.set(null), o();
|
|
2849
2849
|
});
|
|
2850
2850
|
}, t.getCurrentUser = function() {
|
|
2851
2851
|
return r.getUser();
|
|
2852
2852
|
}, t.getCurrentToken = function() {
|
|
2853
|
-
var
|
|
2854
|
-
if (
|
|
2855
|
-
return
|
|
2856
|
-
var
|
|
2857
|
-
if (!
|
|
2853
|
+
var s = r.getAccessToken();
|
|
2854
|
+
if (s)
|
|
2855
|
+
return s;
|
|
2856
|
+
var f = t.getCurrentUser();
|
|
2857
|
+
if (!f)
|
|
2858
2858
|
return e.applicationToken ? e.applicationToken : void 0;
|
|
2859
|
-
var { token:
|
|
2860
|
-
if (
|
|
2861
|
-
return
|
|
2859
|
+
var { token: m } = f;
|
|
2860
|
+
if (m)
|
|
2861
|
+
return m.accessToken;
|
|
2862
2862
|
}, e.api.interceptors.request.use(
|
|
2863
|
-
async function(
|
|
2864
|
-
if (
|
|
2865
|
-
return
|
|
2866
|
-
var
|
|
2863
|
+
async function(s) {
|
|
2864
|
+
if (s.bypassInterceptor)
|
|
2865
|
+
return s;
|
|
2866
|
+
var f = s;
|
|
2867
2867
|
if (r.isCookieMode && r.isCookieMode())
|
|
2868
|
-
return
|
|
2869
|
-
var S = t.getCurrentUser(),
|
|
2868
|
+
return f.withCredentials || (f.withCredentials = !0), f;
|
|
2869
|
+
var S = t.getCurrentUser(), v, P, b;
|
|
2870
2870
|
if (S) {
|
|
2871
|
-
var { token:
|
|
2872
|
-
|
|
2871
|
+
var { token: A } = S;
|
|
2872
|
+
A && (v = A.accessToken, P = A.refreshToken, b = A.expires);
|
|
2873
2873
|
}
|
|
2874
|
-
if (
|
|
2875
|
-
|
|
2874
|
+
if (v)
|
|
2875
|
+
f.headers.Authorization = `Bearer ${v}`;
|
|
2876
2876
|
else
|
|
2877
|
-
return
|
|
2878
|
-
if (!
|
|
2879
|
-
return
|
|
2880
|
-
var
|
|
2881
|
-
|
|
2882
|
-
var
|
|
2883
|
-
return
|
|
2884
|
-
await t.refreshAccessToken(
|
|
2885
|
-
return
|
|
2886
|
-
}).catch(function(
|
|
2887
|
-
return
|
|
2877
|
+
return f;
|
|
2878
|
+
if (!P)
|
|
2879
|
+
return f;
|
|
2880
|
+
var C = /* @__PURE__ */ new Date();
|
|
2881
|
+
C.setSeconds(C.getSeconds() + a);
|
|
2882
|
+
var h = new Date(b);
|
|
2883
|
+
return C < h ? f : new Promise(async function(d, E) {
|
|
2884
|
+
await t.refreshAccessToken(P).then(function(i) {
|
|
2885
|
+
return f.headers.Authorization = `Bearer ${i}`, d(f);
|
|
2886
|
+
}).catch(function(i) {
|
|
2887
|
+
return E(i);
|
|
2888
2888
|
});
|
|
2889
2889
|
});
|
|
2890
2890
|
},
|
|
2891
|
-
function(
|
|
2892
|
-
return Promise.reject(
|
|
2891
|
+
function(s) {
|
|
2892
|
+
return Promise.reject(s);
|
|
2893
2893
|
}
|
|
2894
|
-
), e.api.interceptors.response.use(function(
|
|
2895
|
-
return
|
|
2896
|
-
}, function(
|
|
2897
|
-
var
|
|
2898
|
-
switch (
|
|
2894
|
+
), e.api.interceptors.response.use(function(s) {
|
|
2895
|
+
return s;
|
|
2896
|
+
}, function(s) {
|
|
2897
|
+
var f = s && s.response && s.response.status || s.status;
|
|
2898
|
+
switch (f) {
|
|
2899
2899
|
case 401:
|
|
2900
2900
|
t.logout();
|
|
2901
2901
|
break;
|
|
2902
2902
|
}
|
|
2903
|
-
return Promise.reject(
|
|
2903
|
+
return Promise.reject(s);
|
|
2904
2904
|
}), t;
|
|
2905
|
-
},
|
|
2905
|
+
}, X = {};
|
|
2906
2906
|
function pr(e) {
|
|
2907
2907
|
if (e === 0)
|
|
2908
2908
|
return !1;
|
|
@@ -2912,15 +2912,15 @@ function pr(e) {
|
|
|
2912
2912
|
function Kr(e) {
|
|
2913
2913
|
return !pr(e);
|
|
2914
2914
|
}
|
|
2915
|
-
|
|
2915
|
+
X.cleanKey = function(e) {
|
|
2916
2916
|
return e = String(e).split("|")[0], e[0] == "." && (e = e.slice(1)), e;
|
|
2917
2917
|
};
|
|
2918
|
-
|
|
2918
|
+
X.isValidFilter = function(e) {
|
|
2919
2919
|
if (!e)
|
|
2920
2920
|
return !1;
|
|
2921
2921
|
if (e.operator)
|
|
2922
|
-
return !e.filters || !e.filters.length ? !1 : e.filters.some(
|
|
2923
|
-
var r =
|
|
2922
|
+
return !e.filters || !e.filters.length ? !1 : e.filters.some(X.isValidFilter);
|
|
2923
|
+
var r = X.cleanKey(e.key);
|
|
2924
2924
|
if (!r)
|
|
2925
2925
|
return !1;
|
|
2926
2926
|
switch (e.comparator) {
|
|
@@ -2941,46 +2941,46 @@ q.isValidFilter = function(e) {
|
|
|
2941
2941
|
var a = (e.values || []).filter(Kr);
|
|
2942
2942
|
return !pr(e.value) || !pr(e.value2) || a.length;
|
|
2943
2943
|
};
|
|
2944
|
-
|
|
2944
|
+
X.activeFilters = function(e) {
|
|
2945
2945
|
var r = [];
|
|
2946
2946
|
return a(e, r), r;
|
|
2947
2947
|
function a(t, n) {
|
|
2948
2948
|
if (t) {
|
|
2949
|
-
var o =
|
|
2949
|
+
var o = X.isValidFilter(t);
|
|
2950
2950
|
o && n.push(t), t.filters && t.filters.length && t.filters.forEach(function(p) {
|
|
2951
2951
|
a(p, n);
|
|
2952
2952
|
});
|
|
2953
2953
|
}
|
|
2954
2954
|
}
|
|
2955
2955
|
};
|
|
2956
|
-
|
|
2956
|
+
X.activeFilterKeys = function(e, r) {
|
|
2957
2957
|
r = r || {};
|
|
2958
|
-
var a =
|
|
2958
|
+
var a = X.activeFilters(e), t = a.filter(function(o) {
|
|
2959
2959
|
return !o.operator;
|
|
2960
2960
|
}).reduce(function(o, p) {
|
|
2961
|
-
var
|
|
2962
|
-
return r.trimArrayDelimeters !== !1 && (
|
|
2961
|
+
var s = X.cleanKey(p.key);
|
|
2962
|
+
return r.trimArrayDelimeters !== !1 && (s = s.split("[]").join("")), o[s] = !0, o;
|
|
2963
2963
|
}, {}), n = Object.keys(t);
|
|
2964
2964
|
return n;
|
|
2965
2965
|
};
|
|
2966
|
-
|
|
2967
|
-
var r =
|
|
2966
|
+
X.activeFilterComparators = function(e) {
|
|
2967
|
+
var r = X.activeFilters(e).filter(function(a) {
|
|
2968
2968
|
return !a.operator;
|
|
2969
2969
|
}).reduce(function(a, t) {
|
|
2970
2970
|
return a[t.comparator] = !0, a;
|
|
2971
2971
|
}, {});
|
|
2972
2972
|
return Object.keys(r);
|
|
2973
2973
|
};
|
|
2974
|
-
|
|
2975
|
-
var r =
|
|
2974
|
+
X.activeFilterOperators = function(e) {
|
|
2975
|
+
var r = X.activeFilters(e).filter(function(a) {
|
|
2976
2976
|
return a.operator;
|
|
2977
2977
|
}).reduce(function(a, t) {
|
|
2978
2978
|
return a[t.operator] = !0, a;
|
|
2979
2979
|
}, {});
|
|
2980
2980
|
return Object.keys(r);
|
|
2981
2981
|
};
|
|
2982
|
-
|
|
2983
|
-
var a =
|
|
2982
|
+
X.activeFilterValues = function(e, r) {
|
|
2983
|
+
var a = X.activeFilters(e);
|
|
2984
2984
|
function t(o) {
|
|
2985
2985
|
if (o)
|
|
2986
2986
|
return o._id || o.id || o.title || o.name || o;
|
|
@@ -2992,11 +2992,11 @@ q.activeFilterValues = function(e, r) {
|
|
|
2992
2992
|
}, []).filter(Kr);
|
|
2993
2993
|
return n;
|
|
2994
2994
|
};
|
|
2995
|
-
|
|
2996
|
-
var r =
|
|
2995
|
+
X.filterChangeString = function(e) {
|
|
2996
|
+
var r = X.activeFilters(e);
|
|
2997
2997
|
return JSON.stringify(r);
|
|
2998
2998
|
};
|
|
2999
|
-
function
|
|
2999
|
+
function xt(e) {
|
|
3000
3000
|
var r = {};
|
|
3001
3001
|
return r.downloadUrl = function(a, t, n, o) {
|
|
3002
3002
|
return o = o || {}, n = n || {}, n.download = !0, t = e.utils.id(t), e.api.generateEndpointURL(`/${a}/${t}`, n, o);
|
|
@@ -3009,8 +3009,8 @@ function Pt(e) {
|
|
|
3009
3009
|
return o.extension?.length && (o.extension.includes(".") ? p = `${p}/${o.extension}` : p = `${p}/${a}.${o.extension}`), e.api.generateEndpointURL(p, n, o);
|
|
3010
3010
|
}, r.filesize = function(a, t) {
|
|
3011
3011
|
if (a == 0) return "0 Bytes";
|
|
3012
|
-
var n = 1024, o = t || 2, p = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
|
|
3013
|
-
return parseFloat((a / Math.pow(n,
|
|
3012
|
+
var n = 1024, o = t || 2, p = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], s = Math.floor(Math.log(a) / Math.log(n));
|
|
3013
|
+
return parseFloat((a / Math.pow(n, s)).toFixed(o)) + " " + p[s];
|
|
3014
3014
|
}, r.getBinaryTypeFromMime = function(a) {
|
|
3015
3015
|
if (!a)
|
|
3016
3016
|
return "file";
|
|
@@ -3050,7 +3050,7 @@ function Pt(e) {
|
|
|
3050
3050
|
}
|
|
3051
3051
|
}, r;
|
|
3052
3052
|
}
|
|
3053
|
-
var $e = {},
|
|
3053
|
+
var $e = {}, Pt = {
|
|
3054
3054
|
///////////////////////////////////////////////////
|
|
3055
3055
|
/**
|
|
3056
3056
|
* A helper function to reset all caches, useful if changing organisation or logging in or out as another user
|
|
@@ -3069,7 +3069,7 @@ var $e = {}, xt = {
|
|
|
3069
3069
|
* @return {LRUCache} The cache store for the specified key
|
|
3070
3070
|
*/
|
|
3071
3071
|
get(e, r) {
|
|
3072
|
-
return r = r || { max: 5 }, $e[e] || ($e[e] = new
|
|
3072
|
+
return r = r || { max: 5 }, $e[e] || ($e[e] = new Zr(r)), $e[e];
|
|
3073
3073
|
}
|
|
3074
3074
|
}, Ct = function(e) {
|
|
3075
3075
|
if (!e.auth)
|
|
@@ -3121,8 +3121,8 @@ var $e = {}, xt = {
|
|
|
3121
3121
|
n(a);
|
|
3122
3122
|
function n(o) {
|
|
3123
3123
|
var p = e.utils.id(o);
|
|
3124
|
-
t.push(p), (o.children || []).forEach(function(
|
|
3125
|
-
n(
|
|
3124
|
+
t.push(p), (o.children || []).forEach(function(s) {
|
|
3125
|
+
n(s);
|
|
3126
3126
|
});
|
|
3127
3127
|
}
|
|
3128
3128
|
return t;
|
|
@@ -3130,20 +3130,20 @@ var $e = {}, xt = {
|
|
|
3130
3130
|
var t = {};
|
|
3131
3131
|
for (var n in a?.permissions || {}) {
|
|
3132
3132
|
var o = a?.permissions[n], p = r.getAllDescendants(o);
|
|
3133
|
-
(o.permissions || []).forEach(function(
|
|
3134
|
-
t[
|
|
3135
|
-
...new Set(t[
|
|
3133
|
+
(o.permissions || []).forEach(function(s) {
|
|
3134
|
+
t[s] || (t[s] = []), t[s] = [
|
|
3135
|
+
...new Set(t[s].concat(p))
|
|
3136
3136
|
];
|
|
3137
3137
|
});
|
|
3138
3138
|
}
|
|
3139
3139
|
return t;
|
|
3140
3140
|
}, r.allUserScopes = function(a) {
|
|
3141
3141
|
var t = {}, n = a?.permissions || {};
|
|
3142
|
-
function o(
|
|
3143
|
-
if (
|
|
3144
|
-
var
|
|
3145
|
-
|
|
3146
|
-
o(
|
|
3142
|
+
function o(s) {
|
|
3143
|
+
if (s) {
|
|
3144
|
+
var f = e.utils.id(s);
|
|
3145
|
+
f && (t[f] = 1, s.children && s.children.length && s.children.forEach(function(m) {
|
|
3146
|
+
o(m);
|
|
3147
3147
|
}));
|
|
3148
3148
|
}
|
|
3149
3149
|
}
|
|
@@ -3152,29 +3152,29 @@ var $e = {}, xt = {
|
|
|
3152
3152
|
return Object.keys(t);
|
|
3153
3153
|
}, r.actionableScopes = function(a, t, n, o, p) {
|
|
3154
3154
|
p = p || {};
|
|
3155
|
-
var
|
|
3155
|
+
var s = [];
|
|
3156
3156
|
if (a?.userType == "administrator")
|
|
3157
|
-
|
|
3157
|
+
s = r.allUserScopes(a, p);
|
|
3158
3158
|
else {
|
|
3159
|
-
var
|
|
3160
|
-
if (!
|
|
3161
|
-
return
|
|
3162
|
-
let S = n ?
|
|
3163
|
-
|
|
3159
|
+
var f = r.hashPermissions(a), m = n || o;
|
|
3160
|
+
if (!m)
|
|
3161
|
+
return s;
|
|
3162
|
+
let S = n ? f[`${n}.${t}`] || [] : [], v = o ? f[`${o}.${t}`] || [] : [];
|
|
3163
|
+
s = [...S, ...v];
|
|
3164
3164
|
}
|
|
3165
|
-
return
|
|
3165
|
+
return s || [];
|
|
3166
3166
|
}, r.isOwner = function(a, t) {
|
|
3167
3167
|
var n = e.utils.id(a), o = e.utils.id(a?.persona), p = t.meta;
|
|
3168
3168
|
if (!p)
|
|
3169
3169
|
return !1;
|
|
3170
|
-
var
|
|
3171
|
-
if (
|
|
3170
|
+
var s = p.userOwners || [], f = e.utils.ids([...s, p.userAuthor]), m = e.utils.hash(f);
|
|
3171
|
+
if (m[n])
|
|
3172
3172
|
return !0;
|
|
3173
|
-
var S = p.personaOwners || [],
|
|
3173
|
+
var S = p.personaOwners || [], v = e.utils.ids([
|
|
3174
3174
|
...S,
|
|
3175
3175
|
p.personaAuthor
|
|
3176
|
-
]),
|
|
3177
|
-
return
|
|
3176
|
+
]), P = e.utils.hash(v);
|
|
3177
|
+
return P[o] ? !0 : r.isAssignee(a, t);
|
|
3178
3178
|
}, r.isAssignee = function(a, t) {
|
|
3179
3179
|
const n = e.utils.ids(a?.profiles);
|
|
3180
3180
|
if (!n.length)
|
|
@@ -3183,7 +3183,7 @@ var $e = {}, xt = {
|
|
|
3183
3183
|
if (!o.length)
|
|
3184
3184
|
return !1;
|
|
3185
3185
|
const p = new Set(o);
|
|
3186
|
-
return !!n.filter((
|
|
3186
|
+
return !!n.filter((m) => p.has(m)).length;
|
|
3187
3187
|
}, r.allPermissions = function(a) {
|
|
3188
3188
|
var t = Object.values(a?.permissions || {}).map(function(n) {
|
|
3189
3189
|
return n.permissions;
|
|
@@ -3201,41 +3201,41 @@ var $e = {}, xt = {
|
|
|
3201
3201
|
}, r.checkActionAccess = function(a, t, n, o, p) {
|
|
3202
3202
|
if (p = p || {}, p.cache = p.cache || {}, r.isAdministrator(a))
|
|
3203
3203
|
return !0;
|
|
3204
|
-
var
|
|
3205
|
-
if (!
|
|
3204
|
+
var s = t.meta?.type, f = t.meta?.definition || s;
|
|
3205
|
+
if (!f)
|
|
3206
3206
|
return !1;
|
|
3207
|
-
var
|
|
3208
|
-
if (p.cache[
|
|
3209
|
-
S = p.cache[
|
|
3207
|
+
var m = e.utils.ids(t.meta.scopes || []), S, v = `access-${a?.cacheKey}-${n}-${f}-${s}`;
|
|
3208
|
+
if (p.cache[v])
|
|
3209
|
+
S = p.cache[v];
|
|
3210
3210
|
else {
|
|
3211
|
-
var
|
|
3212
|
-
r.actionableScopes(a, n,
|
|
3211
|
+
var P = e.utils.ids(
|
|
3212
|
+
r.actionableScopes(a, n, f, s, p)
|
|
3213
3213
|
);
|
|
3214
|
-
S = e.utils.hash(
|
|
3214
|
+
S = e.utils.hash(P), p.cache[v] = S;
|
|
3215
3215
|
}
|
|
3216
3216
|
if (S) {
|
|
3217
|
-
var
|
|
3218
|
-
return S[
|
|
3217
|
+
var b = m.some(function(i) {
|
|
3218
|
+
return S[i];
|
|
3219
3219
|
});
|
|
3220
|
-
if (
|
|
3220
|
+
if (b)
|
|
3221
3221
|
return !0;
|
|
3222
3222
|
}
|
|
3223
|
-
var
|
|
3224
|
-
if (
|
|
3225
|
-
var
|
|
3226
|
-
if (p.cache[
|
|
3227
|
-
|
|
3223
|
+
var A = r.isOwner(a, t);
|
|
3224
|
+
if (A) {
|
|
3225
|
+
var C, h = `access-${a?.cacheKey}-${o}-${f}-${s}`;
|
|
3226
|
+
if (p.cache[h])
|
|
3227
|
+
C = p.cache[h];
|
|
3228
3228
|
else {
|
|
3229
|
-
var
|
|
3230
|
-
r.actionableScopes(a, o,
|
|
3229
|
+
var d = e.utils.ids(
|
|
3230
|
+
r.actionableScopes(a, o, f, s, p)
|
|
3231
3231
|
);
|
|
3232
|
-
|
|
3232
|
+
C = e.utils.hash(d), p.cache[h] = C;
|
|
3233
3233
|
}
|
|
3234
|
-
if (
|
|
3235
|
-
var
|
|
3236
|
-
return
|
|
3234
|
+
if (C) {
|
|
3235
|
+
var E = m.some(function(i) {
|
|
3236
|
+
return C[i];
|
|
3237
3237
|
});
|
|
3238
|
-
if (
|
|
3238
|
+
if (E)
|
|
3239
3239
|
return !0;
|
|
3240
3240
|
}
|
|
3241
3241
|
}
|
|
@@ -3326,278 +3326,330 @@ function Ot(e) {
|
|
|
3326
3326
|
};
|
|
3327
3327
|
const a = {};
|
|
3328
3328
|
let t;
|
|
3329
|
-
r.variables = async function(i,
|
|
3330
|
-
|
|
3331
|
-
var
|
|
3332
|
-
if (
|
|
3329
|
+
r.variables = async function(i, c) {
|
|
3330
|
+
c = c || {}, i = i || [];
|
|
3331
|
+
var u = c.refresh || c.reload || !a.data;
|
|
3332
|
+
if (u) {
|
|
3333
3333
|
if (!t) {
|
|
3334
|
-
let
|
|
3334
|
+
let I = function() {
|
|
3335
3335
|
t = null;
|
|
3336
3336
|
};
|
|
3337
|
-
t = e.api.post("/variables", { keys: i }), t.then(
|
|
3337
|
+
t = e.api.post("/variables", { keys: i }), t.then(I, I);
|
|
3338
3338
|
}
|
|
3339
|
-
const { data:
|
|
3340
|
-
a.data =
|
|
3339
|
+
const { data: x } = await t;
|
|
3340
|
+
a.data = x, e.dispatch("variables", x);
|
|
3341
3341
|
}
|
|
3342
3342
|
return a.data;
|
|
3343
3343
|
};
|
|
3344
|
-
const n = e.cache.get("user:glossary");
|
|
3345
|
-
let
|
|
3346
|
-
function
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3344
|
+
const n = e.cache.get("user:glossary"), o = e.cache.get("user:glossary:index"), p = e.cache.get("user:glossary:definitions");
|
|
3345
|
+
let s, f, m = {};
|
|
3346
|
+
r.loadGlossaryIndex = async function(i) {
|
|
3347
|
+
i = i || {};
|
|
3348
|
+
let c = o.get("index");
|
|
3349
|
+
if (i.reload || i.refresh || !c) {
|
|
3350
|
+
f || (f = e.api.get("/glossary/index"), f.then(
|
|
3351
|
+
() => {
|
|
3352
|
+
f = null;
|
|
3353
|
+
},
|
|
3354
|
+
() => {
|
|
3355
|
+
f = null;
|
|
3356
|
+
}
|
|
3357
|
+
));
|
|
3358
|
+
const { data: x } = await f;
|
|
3359
|
+
o.set("index", x), c = x, e.dispatch("glossary:index", x);
|
|
3360
|
+
}
|
|
3361
|
+
return i.hash ? e.utils.hash(c, "key") : i.hex ? e.utils.hash(c, "hex") : c;
|
|
3362
|
+
}, r.getDefinition = async function(i, c) {
|
|
3363
|
+
c = c || {};
|
|
3364
|
+
let u = p.get(i);
|
|
3365
|
+
if (u && !c.reload && !c.refresh)
|
|
3366
|
+
return u;
|
|
3367
|
+
if (m[i])
|
|
3368
|
+
return await m[i], p.get(i);
|
|
3369
|
+
m[i] = e.api.get(`/glossary/index/${i}`);
|
|
3370
|
+
try {
|
|
3371
|
+
const { data: x } = await m[i];
|
|
3372
|
+
return p.set(i, x), e.dispatch("glossary:definition", { key: i, data: x }), x;
|
|
3373
|
+
} finally {
|
|
3374
|
+
m[i] = null;
|
|
3375
|
+
}
|
|
3376
|
+
};
|
|
3377
|
+
let S = {}, v = {};
|
|
3378
|
+
r.loadDefinitionsForType = async function(i, c) {
|
|
3379
|
+
if (c = c || {}, v[i] && !c.reload && !c.refresh) {
|
|
3380
|
+
const u = v[i];
|
|
3381
|
+
return c.hash ? e.utils.hash(u, "key") : u;
|
|
3382
|
+
}
|
|
3383
|
+
if (S[i]) {
|
|
3384
|
+
await S[i];
|
|
3385
|
+
const u = v[i];
|
|
3386
|
+
return c.hash ? e.utils.hash(u, "key") : u;
|
|
3387
|
+
}
|
|
3388
|
+
S[i] = e.api.get(`/glossary/index/${i}/all`);
|
|
3389
|
+
try {
|
|
3390
|
+
const { data: u } = await S[i];
|
|
3391
|
+
return v[i] = u, u.forEach((x) => {
|
|
3392
|
+
p.set(x.key, x);
|
|
3393
|
+
}), e.dispatch("glossary:type", { type: i, definitions: u }), c.hash ? e.utils.hash(u, "key") : u;
|
|
3394
|
+
} finally {
|
|
3395
|
+
S[i] = null;
|
|
3396
|
+
}
|
|
3397
|
+
};
|
|
3398
|
+
function P(i, c) {
|
|
3399
|
+
return function u(x) {
|
|
3400
|
+
if (typeof x == "string" && x[0] === "~")
|
|
3401
|
+
return i[parseInt(x.slice(1))];
|
|
3402
|
+
if (Array.isArray(x)) return x.map(u);
|
|
3403
|
+
if (x && typeof x == "object") {
|
|
3404
|
+
const I = {};
|
|
3405
|
+
for (const [O, $] of Object.entries(x))
|
|
3406
|
+
I[c[O] || O] = u($);
|
|
3407
|
+
return I;
|
|
3356
3408
|
}
|
|
3357
|
-
return
|
|
3409
|
+
return x;
|
|
3358
3410
|
};
|
|
3359
3411
|
}
|
|
3360
|
-
function
|
|
3361
|
-
const
|
|
3362
|
-
return new Proxy(
|
|
3363
|
-
get(
|
|
3364
|
-
if (
|
|
3365
|
-
if (
|
|
3412
|
+
function b({ _s: i, _k: c, types: u }) {
|
|
3413
|
+
const x = P(i, c), I = new Array(u.length), O = new Array(u.length).fill(!1);
|
|
3414
|
+
return new Proxy(u, {
|
|
3415
|
+
get($, L) {
|
|
3416
|
+
if (L === "length") return $.length;
|
|
3417
|
+
if (L === Symbol.iterator)
|
|
3366
3418
|
return function* () {
|
|
3367
|
-
for (let
|
|
3368
|
-
|
|
3419
|
+
for (let _ = 0; _ < $.length; _++)
|
|
3420
|
+
O[_] || (I[_] = x($[_]), O[_] = !0), yield I[_];
|
|
3369
3421
|
};
|
|
3370
|
-
if (
|
|
3371
|
-
return function(
|
|
3372
|
-
const
|
|
3373
|
-
for (let
|
|
3374
|
-
|
|
3375
|
-
return
|
|
3422
|
+
if (L === "map")
|
|
3423
|
+
return function(_) {
|
|
3424
|
+
const R = [];
|
|
3425
|
+
for (let N = 0; N < $.length; N++)
|
|
3426
|
+
O[N] || (I[N] = x($[N]), O[N] = !0), R.push(_(I[N], N, this));
|
|
3427
|
+
return R;
|
|
3376
3428
|
};
|
|
3377
|
-
if (
|
|
3378
|
-
return function(
|
|
3379
|
-
const
|
|
3380
|
-
for (let
|
|
3381
|
-
|
|
3382
|
-
return
|
|
3429
|
+
if (L === "filter")
|
|
3430
|
+
return function(_) {
|
|
3431
|
+
const R = [];
|
|
3432
|
+
for (let N = 0; N < $.length; N++)
|
|
3433
|
+
O[N] || (I[N] = x($[N]), O[N] = !0), _(I[N], N, this) && R.push(I[N]);
|
|
3434
|
+
return R;
|
|
3383
3435
|
};
|
|
3384
|
-
if (
|
|
3385
|
-
return function(
|
|
3386
|
-
for (let
|
|
3387
|
-
if (
|
|
3388
|
-
return
|
|
3436
|
+
if (L === "find")
|
|
3437
|
+
return function(_) {
|
|
3438
|
+
for (let R = 0; R < $.length; R++)
|
|
3439
|
+
if (O[R] || (I[R] = x($[R]), O[R] = !0), _(I[R], R, this))
|
|
3440
|
+
return I[R];
|
|
3389
3441
|
};
|
|
3390
|
-
if (
|
|
3391
|
-
return function(
|
|
3392
|
-
for (let
|
|
3393
|
-
|
|
3442
|
+
if (L === "forEach")
|
|
3443
|
+
return function(_) {
|
|
3444
|
+
for (let R = 0; R < $.length; R++)
|
|
3445
|
+
O[R] || (I[R] = x($[R]), O[R] = !0), _(I[R], R, this);
|
|
3394
3446
|
};
|
|
3395
|
-
const
|
|
3396
|
-
return Number.isInteger(
|
|
3447
|
+
const F = typeof L == "string" ? parseInt(L, 10) : L;
|
|
3448
|
+
return Number.isInteger(F) && F >= 0 && F < $.length ? (O[F] || (I[F] = x($[F]), O[F] = !0), I[F]) : Reflect.get($, L);
|
|
3397
3449
|
}
|
|
3398
3450
|
});
|
|
3399
3451
|
}
|
|
3400
|
-
function
|
|
3401
|
-
return
|
|
3452
|
+
function A(i) {
|
|
3453
|
+
return b(i);
|
|
3402
3454
|
}
|
|
3403
3455
|
r.glossary = async function(i) {
|
|
3404
3456
|
i = i || {};
|
|
3405
|
-
let
|
|
3406
|
-
var
|
|
3407
|
-
if (
|
|
3408
|
-
if (!
|
|
3409
|
-
let
|
|
3410
|
-
|
|
3457
|
+
let c = n.get("glossary"), x = !!!i.uncompressed;
|
|
3458
|
+
var I = i.refresh || i.reload || !c;
|
|
3459
|
+
if (I) {
|
|
3460
|
+
if (!s) {
|
|
3461
|
+
let _ = function() {
|
|
3462
|
+
s = null, r.loadingGlossary = !1;
|
|
3411
3463
|
};
|
|
3412
3464
|
r.loadingGlossary = !0;
|
|
3413
|
-
const
|
|
3414
|
-
|
|
3465
|
+
const F = x ? "/glossary/compressed" : "/glossary";
|
|
3466
|
+
s = e.api.get(F, { cache: !1 }), s.then(_, _);
|
|
3415
3467
|
}
|
|
3416
|
-
const { data:
|
|
3417
|
-
n.set("glossary",
|
|
3468
|
+
const { data: $ } = await s, L = $._s && $._k && $.types ? A($) : $;
|
|
3469
|
+
n.set("glossary", L), c = L, e.dispatch("glossary", L);
|
|
3418
3470
|
}
|
|
3419
3471
|
if (i.hash) {
|
|
3420
|
-
var
|
|
3421
|
-
return
|
|
3472
|
+
var O = e.utils.hash(c, "key");
|
|
3473
|
+
return O;
|
|
3422
3474
|
}
|
|
3423
3475
|
if (i.hex) {
|
|
3424
|
-
var
|
|
3425
|
-
return
|
|
3476
|
+
var O = e.utils.hash(c, "hex");
|
|
3477
|
+
return O;
|
|
3426
3478
|
}
|
|
3427
|
-
return
|
|
3479
|
+
return c;
|
|
3428
3480
|
};
|
|
3429
|
-
const
|
|
3430
|
-
let
|
|
3481
|
+
const C = {};
|
|
3482
|
+
let h;
|
|
3431
3483
|
r.scopeGlossary = async function(i) {
|
|
3432
3484
|
i = i || {};
|
|
3433
|
-
var
|
|
3434
|
-
if (
|
|
3435
|
-
if (!
|
|
3436
|
-
let
|
|
3437
|
-
|
|
3485
|
+
var c = i.refresh || i.reload || !C.data;
|
|
3486
|
+
if (c) {
|
|
3487
|
+
if (!h) {
|
|
3488
|
+
let I = function() {
|
|
3489
|
+
h = null;
|
|
3438
3490
|
};
|
|
3439
|
-
|
|
3491
|
+
h = e.api.get("/scope/glossary", {
|
|
3440
3492
|
cache: !1
|
|
3441
|
-
}),
|
|
3493
|
+
}), h.then(I, I);
|
|
3442
3494
|
}
|
|
3443
|
-
const { data:
|
|
3444
|
-
|
|
3495
|
+
const { data: x } = await h;
|
|
3496
|
+
C.data = x;
|
|
3445
3497
|
}
|
|
3446
3498
|
if (i.hash) {
|
|
3447
|
-
var
|
|
3448
|
-
return
|
|
3499
|
+
var u = e.utils.hash(C.data, "_id");
|
|
3500
|
+
return u;
|
|
3449
3501
|
}
|
|
3450
|
-
return
|
|
3502
|
+
return C.data;
|
|
3451
3503
|
};
|
|
3452
|
-
const
|
|
3504
|
+
const d = {};
|
|
3453
3505
|
r.comparators = async function(i) {
|
|
3454
3506
|
i = i || {};
|
|
3455
|
-
var
|
|
3456
|
-
if (
|
|
3457
|
-
const { data:
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
return
|
|
3507
|
+
var c = i.reload || i.refresh || !d.data;
|
|
3508
|
+
if (c) {
|
|
3509
|
+
const { data: u } = await e.api.get("/system/comparators");
|
|
3510
|
+
u.available = {}, Object.entries(u.types).forEach(([x, I]) => {
|
|
3511
|
+
u.available[x] = I.map(function(O) {
|
|
3512
|
+
return u.hash[O];
|
|
3461
3513
|
});
|
|
3462
|
-
}),
|
|
3514
|
+
}), d.data = u;
|
|
3463
3515
|
}
|
|
3464
|
-
return
|
|
3516
|
+
return d.data;
|
|
3465
3517
|
};
|
|
3466
3518
|
function E(i) {
|
|
3467
|
-
var { minimum:
|
|
3468
|
-
return
|
|
3469
|
-
}
|
|
3470
|
-
return r.meetsValidationRequirements = function(i,
|
|
3471
|
-
if (
|
|
3472
|
-
var
|
|
3473
|
-
if (
|
|
3474
|
-
return `Must be at least ${
|
|
3519
|
+
var { minimum: c, maximum: u } = i;
|
|
3520
|
+
return c = e.utils.parseInt(c), c = Math.max(c, 0), u = e.utils.parseInt(u), u = Math.max(u, 0), u == 0 || (u = Math.max(u, c)), { minimum: c, maximum: u };
|
|
3521
|
+
}
|
|
3522
|
+
return r.meetsValidationRequirements = function(i, c, u) {
|
|
3523
|
+
if (u.minLength) {
|
|
3524
|
+
var x = String(i).length;
|
|
3525
|
+
if (x < u.minLength)
|
|
3526
|
+
return `Must be at least ${u.minLength} characters`;
|
|
3475
3527
|
}
|
|
3476
|
-
if (
|
|
3477
|
-
var
|
|
3478
|
-
if (
|
|
3479
|
-
return `Can be no more than ${
|
|
3528
|
+
if (u.maxLength) {
|
|
3529
|
+
var x = String(i).length;
|
|
3530
|
+
if (x > u.maxLength)
|
|
3531
|
+
return `Can be no more than ${u.maxLength} characters`;
|
|
3480
3532
|
}
|
|
3481
|
-
if (
|
|
3482
|
-
var
|
|
3483
|
-
if (
|
|
3484
|
-
return `Must be at least ${
|
|
3533
|
+
if (u.minValue && i !== void 0) {
|
|
3534
|
+
var I = Number(i);
|
|
3535
|
+
if (I < u.minValue)
|
|
3536
|
+
return `Must be at least ${u.minValue}`;
|
|
3485
3537
|
}
|
|
3486
|
-
if (
|
|
3487
|
-
var
|
|
3488
|
-
if (
|
|
3489
|
-
return `Can be no greater than ${
|
|
3538
|
+
if (u.maxValue && i !== void 0) {
|
|
3539
|
+
var I = Number(i);
|
|
3540
|
+
if (I > u.maxValue)
|
|
3541
|
+
return `Can be no greater than ${u.maxValue}`;
|
|
3490
3542
|
}
|
|
3491
|
-
}, r.validateField = function(i,
|
|
3492
|
-
|
|
3493
|
-
var
|
|
3494
|
-
if (
|
|
3495
|
-
if (!
|
|
3543
|
+
}, r.validateField = function(i, c, u) {
|
|
3544
|
+
u = u || {};
|
|
3545
|
+
var x = c.type || "string", { minimum: I, maximum: O } = E(c), $ = c.type == "group" && c.asObject, L = $ ? I === O && O === 1 : O === 1, F = !L, _ = e.utils.exists(i);
|
|
3546
|
+
if (I) {
|
|
3547
|
+
if (!_)
|
|
3496
3548
|
return {
|
|
3497
3549
|
valid: !1,
|
|
3498
|
-
message: `${
|
|
3550
|
+
message: `${c.title} is a required field`,
|
|
3499
3551
|
status: 400
|
|
3500
3552
|
};
|
|
3501
|
-
} else if (!
|
|
3553
|
+
} else if (!_)
|
|
3502
3554
|
return {
|
|
3503
3555
|
valid: !0
|
|
3504
3556
|
};
|
|
3505
|
-
if (
|
|
3557
|
+
if (F) {
|
|
3506
3558
|
if (!Array.isArray(i))
|
|
3507
|
-
return
|
|
3559
|
+
return I ? {
|
|
3508
3560
|
valid: !1,
|
|
3509
|
-
message: `${
|
|
3561
|
+
message: `${c.title} requires at least ${I} values`,
|
|
3510
3562
|
status: 400
|
|
3511
|
-
} : (console.log("NOT PROVIDED AS ARRAY",
|
|
3563
|
+
} : (console.log("NOT PROVIDED AS ARRAY", c.title, i), {
|
|
3512
3564
|
valid: !1,
|
|
3513
|
-
message: `${
|
|
3565
|
+
message: `${c.title} must be provided as an array`,
|
|
3514
3566
|
status: 400
|
|
3515
3567
|
});
|
|
3516
|
-
var
|
|
3517
|
-
if (
|
|
3518
|
-
var
|
|
3519
|
-
return !
|
|
3520
|
-
}),
|
|
3568
|
+
var R = i;
|
|
3569
|
+
if (R = R.filter(function(z) {
|
|
3570
|
+
var W = z == null || z === "";
|
|
3571
|
+
return !W;
|
|
3572
|
+
}), I == O && I && R.length != I)
|
|
3521
3573
|
return {
|
|
3522
3574
|
valid: !1,
|
|
3523
|
-
message: `${
|
|
3575
|
+
message: `${c.title} requires exactly ${O} values`,
|
|
3524
3576
|
status: 400
|
|
3525
3577
|
};
|
|
3526
|
-
if (
|
|
3578
|
+
if (O && R.length > O)
|
|
3527
3579
|
return {
|
|
3528
3580
|
valid: !1,
|
|
3529
|
-
message: `${
|
|
3581
|
+
message: `${c.title} requires less than ${O + 1} values`,
|
|
3530
3582
|
status: 400
|
|
3531
3583
|
};
|
|
3532
|
-
if (
|
|
3584
|
+
if (R.length < I)
|
|
3533
3585
|
return {
|
|
3534
3586
|
valid: !1,
|
|
3535
|
-
message: `${
|
|
3587
|
+
message: `${c.title} requires at least ${I} values`,
|
|
3536
3588
|
status: 400
|
|
3537
3589
|
};
|
|
3538
|
-
var
|
|
3539
|
-
if (
|
|
3540
|
-
var
|
|
3541
|
-
|
|
3542
|
-
var
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3590
|
+
var N;
|
|
3591
|
+
if (R.find(function(z) {
|
|
3592
|
+
var W = x;
|
|
3593
|
+
c.type === "group" && (W = "object"), c.type === "reference" && c.widget === "form" && (W = "object");
|
|
3594
|
+
var K = e.utils.isValidValue(
|
|
3595
|
+
z,
|
|
3596
|
+
W,
|
|
3597
|
+
u.strict
|
|
3546
3598
|
);
|
|
3547
|
-
if (!
|
|
3548
|
-
return
|
|
3549
|
-
if (
|
|
3550
|
-
var
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3599
|
+
if (!K)
|
|
3600
|
+
return N = !0, !0;
|
|
3601
|
+
if (c.validation) {
|
|
3602
|
+
var re = r.meetsValidationRequirements(
|
|
3603
|
+
z,
|
|
3604
|
+
x,
|
|
3605
|
+
c.validation
|
|
3554
3606
|
);
|
|
3555
|
-
if (
|
|
3556
|
-
return
|
|
3607
|
+
if (re)
|
|
3608
|
+
return N = !0, !0;
|
|
3557
3609
|
}
|
|
3558
|
-
}),
|
|
3610
|
+
}), N)
|
|
3559
3611
|
return {
|
|
3560
3612
|
valid: !1,
|
|
3561
|
-
message: `Invalid input for ${
|
|
3613
|
+
message: `Invalid input for ${c.title}`,
|
|
3562
3614
|
status: 400
|
|
3563
3615
|
};
|
|
3564
3616
|
} else {
|
|
3565
|
-
var
|
|
3566
|
-
|
|
3567
|
-
var
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3617
|
+
var B = x, H = c.widget;
|
|
3618
|
+
B === "group" && (B = "object"), B === "reference" && H === "form" && (B = "object");
|
|
3619
|
+
var U = r.getCleanedValue(i, B, u), q = e.utils.isValidValue(
|
|
3620
|
+
U,
|
|
3621
|
+
B,
|
|
3622
|
+
u.strict
|
|
3571
3623
|
);
|
|
3572
|
-
if (
|
|
3624
|
+
if (!q)
|
|
3573
3625
|
return {
|
|
3574
3626
|
valid: !1,
|
|
3575
|
-
message: `Single value '${i}' is not a valid ${
|
|
3627
|
+
message: `Single value '${i}' is not a valid ${B} for ${c.title}`,
|
|
3576
3628
|
criteria: {
|
|
3577
|
-
isValidValue:
|
|
3578
|
-
cleanedValue:
|
|
3579
|
-
fieldType:
|
|
3580
|
-
options:
|
|
3629
|
+
isValidValue: q,
|
|
3630
|
+
cleanedValue: U,
|
|
3631
|
+
fieldType: x,
|
|
3632
|
+
options: u
|
|
3581
3633
|
},
|
|
3582
3634
|
status: 400
|
|
3583
3635
|
};
|
|
3584
|
-
let
|
|
3585
|
-
const
|
|
3586
|
-
if (String(
|
|
3587
|
-
const
|
|
3636
|
+
let z = !1;
|
|
3637
|
+
const W = {};
|
|
3638
|
+
if (String(c.minValue) && (W.minValue = parseInt(c.minValue), z = !0), String(c.maxValue) && (W.maxValue = parseInt(c.maxValue), z = !0), String(c.minLength) && (W.minLength = parseInt(c.minLength), z = !0), String(c.maxLength) && (W.maxLength = parseInt(c.maxLength), z = !0), z) {
|
|
3639
|
+
const K = Object.assign(
|
|
3588
3640
|
{},
|
|
3589
|
-
|
|
3590
|
-
|
|
3641
|
+
W,
|
|
3642
|
+
c.validation || {}
|
|
3591
3643
|
);
|
|
3592
|
-
var
|
|
3644
|
+
var Q = r.meetsValidationRequirements(
|
|
3593
3645
|
i,
|
|
3594
|
-
|
|
3595
|
-
|
|
3646
|
+
x,
|
|
3647
|
+
K
|
|
3596
3648
|
);
|
|
3597
|
-
if (
|
|
3649
|
+
if (Q)
|
|
3598
3650
|
return {
|
|
3599
3651
|
valid: !1,
|
|
3600
|
-
message:
|
|
3652
|
+
message: Q,
|
|
3601
3653
|
status: 400
|
|
3602
3654
|
};
|
|
3603
3655
|
}
|
|
@@ -3605,8 +3657,8 @@ function Ot(e) {
|
|
|
3605
3657
|
return {
|
|
3606
3658
|
valid: !0
|
|
3607
3659
|
};
|
|
3608
|
-
}, r.getCleanedValue = function(i,
|
|
3609
|
-
switch (
|
|
3660
|
+
}, r.getCleanedValue = function(i, c, u) {
|
|
3661
|
+
switch (c) {
|
|
3610
3662
|
case "number":
|
|
3611
3663
|
case "float":
|
|
3612
3664
|
case "decimal":
|
|
@@ -3616,63 +3668,63 @@ function Ot(e) {
|
|
|
3616
3668
|
case "boolean":
|
|
3617
3669
|
return e.utils.exists(i) ? e.utils.parseBoolean(i) : void 0;
|
|
3618
3670
|
case "email":
|
|
3619
|
-
return
|
|
3671
|
+
return u.strict ? i : String(i).toLowerCase();
|
|
3620
3672
|
case "reference":
|
|
3621
|
-
return
|
|
3673
|
+
return u.strict ? i : e.utils.id(i);
|
|
3622
3674
|
default:
|
|
3623
|
-
return
|
|
3675
|
+
return u.strict ? i : e.utils.cleanValue(i, c, u);
|
|
3624
3676
|
}
|
|
3625
3677
|
return i;
|
|
3626
|
-
}, r.list = async function(i,
|
|
3627
|
-
|
|
3628
|
-
const
|
|
3629
|
-
if (
|
|
3630
|
-
|
|
3631
|
-
const
|
|
3632
|
-
return
|
|
3633
|
-
promise: e.api.post(
|
|
3634
|
-
cancel(
|
|
3635
|
-
|
|
3678
|
+
}, r.list = async function(i, c, u) {
|
|
3679
|
+
u || (u = {});
|
|
3680
|
+
const x = u.remoteURL || `/content/${i}/list`;
|
|
3681
|
+
if (u.cancellable) {
|
|
3682
|
+
u.config || (u.config = {});
|
|
3683
|
+
const O = e.api.CancelToken.source();
|
|
3684
|
+
return u.config.cancelToken = O.token, {
|
|
3685
|
+
promise: e.api.post(x, c, u.config),
|
|
3686
|
+
cancel(L) {
|
|
3687
|
+
O.cancel(L || "Operation canceled by the user.");
|
|
3636
3688
|
}
|
|
3637
3689
|
};
|
|
3638
3690
|
} else {
|
|
3639
|
-
const { data:
|
|
3640
|
-
return
|
|
3691
|
+
const { data: I } = await e.api.post(x, c, u.config);
|
|
3692
|
+
return I;
|
|
3641
3693
|
}
|
|
3642
|
-
}, r.create = async function(i,
|
|
3643
|
-
const
|
|
3644
|
-
|
|
3645
|
-
const { data:
|
|
3646
|
-
return
|
|
3647
|
-
}, r.update = async function(i,
|
|
3694
|
+
}, r.create = async function(i, c) {
|
|
3695
|
+
const u = { ...c };
|
|
3696
|
+
u.meta?.scopes && (u.meta.scopes = e.utils.ids(u.meta.scopes));
|
|
3697
|
+
const { data: x } = await e.api.post(`/content/${i}/create`, u);
|
|
3698
|
+
return x;
|
|
3699
|
+
}, r.update = async function(i, c) {
|
|
3648
3700
|
i = e.utils.id(i);
|
|
3649
|
-
const
|
|
3650
|
-
|
|
3651
|
-
const { data:
|
|
3652
|
-
return
|
|
3653
|
-
}, r.patch = async function(i,
|
|
3701
|
+
const u = { ...c };
|
|
3702
|
+
u.meta?.scopes && (u.meta.scopes = e.utils.ids(u.meta.scopes));
|
|
3703
|
+
const { data: x } = await e.api.put(`/content/${i}`, u);
|
|
3704
|
+
return x;
|
|
3705
|
+
}, r.patch = async function(i, c) {
|
|
3654
3706
|
i = e.utils.id(i);
|
|
3655
|
-
const
|
|
3656
|
-
|
|
3657
|
-
const { data:
|
|
3658
|
-
return
|
|
3659
|
-
}, r.get = async function(i,
|
|
3660
|
-
i = e.utils.id(i),
|
|
3661
|
-
const { data:
|
|
3662
|
-
return
|
|
3707
|
+
const u = { ...c };
|
|
3708
|
+
u.meta?.scopes && (u.meta.scopes = e.utils.ids(u.meta.scopes));
|
|
3709
|
+
const { data: x } = await e.api.patch(`/content/${i}`, u);
|
|
3710
|
+
return x;
|
|
3711
|
+
}, r.get = async function(i, c) {
|
|
3712
|
+
i = e.utils.id(i), c = c || {};
|
|
3713
|
+
const { data: u } = await e.api.get(`/content/${i}`, c);
|
|
3714
|
+
return u;
|
|
3663
3715
|
}, r.getFromID = async function(i) {
|
|
3664
3716
|
return r.get(i);
|
|
3665
|
-
}, r.delete = async function(i,
|
|
3717
|
+
}, r.delete = async function(i, c) {
|
|
3666
3718
|
i = e.utils.id(i);
|
|
3667
|
-
const { data:
|
|
3668
|
-
return
|
|
3669
|
-
}, r.restore = async function(i,
|
|
3719
|
+
const { data: u } = await e.api.delete(`/content/${i}`, c);
|
|
3720
|
+
return u;
|
|
3721
|
+
}, r.restore = async function(i, c) {
|
|
3670
3722
|
i = e.utils.id(i);
|
|
3671
|
-
const { data:
|
|
3672
|
-
return
|
|
3723
|
+
const { data: u } = await e.api.get(`/content/${i}/restore`, c);
|
|
3724
|
+
return u;
|
|
3673
3725
|
}, r.getFromSlug = async function(i) {
|
|
3674
|
-
const { data:
|
|
3675
|
-
return
|
|
3726
|
+
const { data: c } = await e.api.get(`/content/slug/${i}`);
|
|
3727
|
+
return c;
|
|
3676
3728
|
}, r;
|
|
3677
3729
|
}
|
|
3678
3730
|
function Mt(e) {
|
|
@@ -3691,11 +3743,11 @@ function It(e) {
|
|
|
3691
3743
|
return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
|
|
3692
3744
|
}
|
|
3693
3745
|
return r.distance = function({ lat: t, lon: n }, { lat: o, lon: p }) {
|
|
3694
|
-
function
|
|
3695
|
-
return
|
|
3746
|
+
function s(A) {
|
|
3747
|
+
return A * (Math.PI / 180);
|
|
3696
3748
|
}
|
|
3697
|
-
var
|
|
3698
|
-
return
|
|
3749
|
+
var f = 6371e3, m = s(o - t), S = s(p - n), v = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(s(t)) * Math.cos(s(o)) * Math.sin(S / 2) * Math.sin(S / 2), P = 2 * Math.atan2(Math.sqrt(v), Math.sqrt(1 - v)), b = f * P;
|
|
3750
|
+
return b;
|
|
3699
3751
|
}, r.getPosition = async function() {
|
|
3700
3752
|
return a() ? (console.log("qik:geo: getting location"), new Promise(function(t, n) {
|
|
3701
3753
|
navigator.geolocation.getCurrentPosition(t, n);
|
|
@@ -4428,7 +4480,7 @@ function It(e) {
|
|
|
4428
4480
|
}
|
|
4429
4481
|
}, r;
|
|
4430
4482
|
}
|
|
4431
|
-
const
|
|
4483
|
+
const Tt = function(e, r) {
|
|
4432
4484
|
if (r = r || "production", !e.auth)
|
|
4433
4485
|
throw new Error("Can't Instantiate QikSocket before QikAuth exists");
|
|
4434
4486
|
const a = e.utils.guid();
|
|
@@ -4439,87 +4491,87 @@ const kt = function(e, r) {
|
|
|
4439
4491
|
windowID: a,
|
|
4440
4492
|
autoreconnect: !0
|
|
4441
4493
|
}, n, o = {};
|
|
4442
|
-
const p = {},
|
|
4443
|
-
|
|
4444
|
-
if (o[
|
|
4445
|
-
return o[
|
|
4446
|
-
const
|
|
4447
|
-
o[
|
|
4448
|
-
function
|
|
4449
|
-
|
|
4494
|
+
const p = {}, s = new je();
|
|
4495
|
+
s.bootstrap(t), t.channel = async function(A) {
|
|
4496
|
+
if (o[A])
|
|
4497
|
+
return o[A];
|
|
4498
|
+
const C = new je();
|
|
4499
|
+
o[A] = C, t.connected || await t.connect(), t.subscribe(A), t.addEventListener(A, h);
|
|
4500
|
+
function h(d) {
|
|
4501
|
+
C.dispatch("message", d);
|
|
4450
4502
|
}
|
|
4451
|
-
return
|
|
4452
|
-
t.removeAllListeners(), o[
|
|
4453
|
-
}, o[
|
|
4503
|
+
return C.destroy = function() {
|
|
4504
|
+
t.removeAllListeners(), o[A] = null;
|
|
4505
|
+
}, o[A];
|
|
4454
4506
|
};
|
|
4455
|
-
function
|
|
4456
|
-
t.debug && console.log("[socket] Connection open",
|
|
4507
|
+
function f(A) {
|
|
4508
|
+
t.debug && console.log("[socket] Connection open", A), t.connected = !0, s.dispatch("connected", A);
|
|
4457
4509
|
}
|
|
4458
|
-
async function
|
|
4459
|
-
|
|
4510
|
+
async function m(A) {
|
|
4511
|
+
A.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${A.code} reason=${A.reason}`) : t.debug && console.log("[socket] - connection closed due to error", A), t.connected = !1, s.dispatch("disconnected", A), n = null, t.autoreconnect && t.reconnect();
|
|
4460
4512
|
}
|
|
4461
|
-
function S(
|
|
4462
|
-
console.log("[event] socketError", event), t.debug && console.log("[socket] Error",
|
|
4513
|
+
function S(A) {
|
|
4514
|
+
console.log("[event] socketError", event), t.debug && console.log("[socket] Error", A), s.dispatch("error", A);
|
|
4463
4515
|
}
|
|
4464
|
-
function
|
|
4465
|
-
const
|
|
4466
|
-
t.debug && console.log("[socket] message received",
|
|
4516
|
+
function v(A) {
|
|
4517
|
+
const C = JSON.parse(A.data);
|
|
4518
|
+
t.debug && console.log("[socket] message received", C), s.dispatch("message", C), C.channel && s.dispatch(C.channel, C);
|
|
4467
4519
|
}
|
|
4468
|
-
async function
|
|
4469
|
-
n.send(JSON.stringify(
|
|
4520
|
+
async function P(A) {
|
|
4521
|
+
n.send(JSON.stringify(A));
|
|
4470
4522
|
}
|
|
4471
|
-
function
|
|
4472
|
-
return new Promise(function(
|
|
4473
|
-
function
|
|
4523
|
+
function b() {
|
|
4524
|
+
return new Promise(function(A) {
|
|
4525
|
+
function C() {
|
|
4474
4526
|
if (t.connected)
|
|
4475
|
-
return
|
|
4476
|
-
setTimeout(
|
|
4527
|
+
return A(n);
|
|
4528
|
+
setTimeout(C, 1e3);
|
|
4477
4529
|
}
|
|
4478
|
-
|
|
4530
|
+
C();
|
|
4479
4531
|
});
|
|
4480
4532
|
}
|
|
4481
4533
|
return t.connect = async function() {
|
|
4482
4534
|
if (n)
|
|
4483
|
-
return n.connected ? (console.log("[socket] - Socket is already connected"), n) :
|
|
4484
|
-
const
|
|
4485
|
-
if (!
|
|
4535
|
+
return n.connected ? (console.log("[socket] - Socket is already connected"), n) : b();
|
|
4536
|
+
const A = e.auth.getCurrentToken();
|
|
4537
|
+
if (!A) {
|
|
4486
4538
|
t.debug && console.log("[socket] - Must be authenticated to connect to socket");
|
|
4487
4539
|
return;
|
|
4488
4540
|
}
|
|
4489
|
-
return n = new WebSocket(`${t.url}?access_token=${
|
|
4541
|
+
return n = new WebSocket(`${t.url}?access_token=${A}&windowid=${a}`), n.addEventListener("close", m), n.addEventListener("error", S), n.addEventListener("open", f), n.addEventListener("message", v), t.debug && console.log("[socket] - Connected with event listeners"), b();
|
|
4490
4542
|
}, t.reconnect = async function() {
|
|
4491
4543
|
if (t.connected)
|
|
4492
4544
|
return;
|
|
4493
4545
|
t.debug && console.log("[socket] reconnecting...");
|
|
4494
|
-
const
|
|
4495
|
-
return Object.keys(p).forEach(function(
|
|
4496
|
-
t.subscribe(
|
|
4497
|
-
}),
|
|
4546
|
+
const A = await t.connect();
|
|
4547
|
+
return Object.keys(p).forEach(function(h) {
|
|
4548
|
+
t.subscribe(h);
|
|
4549
|
+
}), A;
|
|
4498
4550
|
}, t.close = async function() {
|
|
4499
4551
|
if (!n) {
|
|
4500
4552
|
console.log("[socket] - Socket is not connected");
|
|
4501
4553
|
return;
|
|
4502
4554
|
}
|
|
4503
|
-
const
|
|
4504
|
-
t.autoreconnect = !1, n.close(), n.removeEventListener("close",
|
|
4505
|
-
}, t.disconnect = t.close, t.subscribe = async function(
|
|
4555
|
+
const A = t.autoreconnect;
|
|
4556
|
+
t.autoreconnect = !1, n.close(), n.removeEventListener("close", m), n.removeEventListener("error", S), n.removeEventListener("open", f), n.removeEventListener("message", v), n = null, m({ wasClean: !0 }), t.autoreconnect = A;
|
|
4557
|
+
}, t.disconnect = t.close, t.subscribe = async function(A) {
|
|
4506
4558
|
if (!n) {
|
|
4507
4559
|
console.log("[socket] - Can't subscribe to channel as socket is not connected");
|
|
4508
4560
|
return;
|
|
4509
4561
|
}
|
|
4510
|
-
|
|
4562
|
+
P({
|
|
4511
4563
|
action: "subscribe",
|
|
4512
|
-
channel:
|
|
4513
|
-
}), p[
|
|
4514
|
-
}, t.unsubscribe = async function(
|
|
4564
|
+
channel: A
|
|
4565
|
+
}), p[A] = !0, s.dispatch("subscribe", A), t.debug && console.log(`[socket] - subscribed to ${A}`);
|
|
4566
|
+
}, t.unsubscribe = async function(A) {
|
|
4515
4567
|
if (!n) {
|
|
4516
4568
|
console.log("[socket] - Can't unsubscribe from channel as socket is not connected");
|
|
4517
4569
|
return;
|
|
4518
4570
|
}
|
|
4519
|
-
|
|
4571
|
+
P({
|
|
4520
4572
|
action: "unsubscribe",
|
|
4521
|
-
channel:
|
|
4522
|
-
}), delete p[
|
|
4573
|
+
channel: A
|
|
4574
|
+
}), delete p[A], s.dispatch("unsubscribe", A), t.debug && console.log(`[socket] - unsubscribed from ${A}`);
|
|
4523
4575
|
}, t;
|
|
4524
4576
|
};
|
|
4525
4577
|
function Nt(e) {
|
|
@@ -4545,39 +4597,39 @@ function Nt(e) {
|
|
|
4545
4597
|
global: {}
|
|
4546
4598
|
});
|
|
4547
4599
|
Object.defineProperty(r, "cache", {
|
|
4548
|
-
value:
|
|
4600
|
+
value: Pt,
|
|
4549
4601
|
writable: !1
|
|
4550
4602
|
});
|
|
4551
|
-
const t =
|
|
4603
|
+
const t = k;
|
|
4552
4604
|
Object.defineProperty(r, "utils", {
|
|
4553
4605
|
value: t,
|
|
4554
4606
|
writable: !1
|
|
4555
4607
|
}), Object.defineProperty(r, "filter", {
|
|
4556
|
-
value:
|
|
4608
|
+
value: X,
|
|
4557
4609
|
writable: !1
|
|
4558
4610
|
});
|
|
4559
|
-
const o = new
|
|
4611
|
+
const o = new xt(r);
|
|
4560
4612
|
Object.defineProperty(r, "files", {
|
|
4561
4613
|
value: o,
|
|
4562
4614
|
writable: !1
|
|
4563
|
-
}), new je().bootstrap(r), r.error = function(
|
|
4564
|
-
return r.dispatch("error", t.errorMessage(
|
|
4565
|
-
}, r.notify = function(
|
|
4566
|
-
return r.dispatch("notification", { message:
|
|
4615
|
+
}), new je().bootstrap(r), r.error = function(A) {
|
|
4616
|
+
return r.dispatch("error", t.errorMessage(A));
|
|
4617
|
+
}, r.notify = function(A, C) {
|
|
4618
|
+
return r.dispatch("notification", { message: A, options: C });
|
|
4567
4619
|
};
|
|
4568
|
-
const
|
|
4620
|
+
const s = new mt(r);
|
|
4569
4621
|
Object.defineProperty(r, "api", {
|
|
4570
|
-
value:
|
|
4622
|
+
value: s,
|
|
4571
4623
|
writable: !1
|
|
4572
4624
|
});
|
|
4573
|
-
const
|
|
4625
|
+
const f = new Et(r);
|
|
4574
4626
|
Object.defineProperty(r, "auth", {
|
|
4575
|
-
value:
|
|
4627
|
+
value: f,
|
|
4576
4628
|
writable: !1
|
|
4577
4629
|
});
|
|
4578
|
-
const
|
|
4630
|
+
const m = new Tt(r);
|
|
4579
4631
|
Object.defineProperty(r, "socket", {
|
|
4580
|
-
value:
|
|
4632
|
+
value: m,
|
|
4581
4633
|
writable: !1
|
|
4582
4634
|
});
|
|
4583
4635
|
const S = new Ct(r);
|
|
@@ -4585,24 +4637,24 @@ function Nt(e) {
|
|
|
4585
4637
|
value: S,
|
|
4586
4638
|
writable: !1
|
|
4587
4639
|
});
|
|
4588
|
-
const
|
|
4640
|
+
const v = new Mt(r);
|
|
4589
4641
|
Object.defineProperty(r, "system", {
|
|
4590
|
-
value:
|
|
4642
|
+
value: v,
|
|
4591
4643
|
writable: !1
|
|
4592
4644
|
});
|
|
4593
|
-
const
|
|
4645
|
+
const P = new It(r);
|
|
4594
4646
|
Object.defineProperty(r, "geo", {
|
|
4595
|
-
value:
|
|
4647
|
+
value: P,
|
|
4596
4648
|
writable: !1
|
|
4597
4649
|
});
|
|
4598
|
-
const
|
|
4650
|
+
const b = new Ot(r);
|
|
4599
4651
|
return Object.defineProperty(r, "content", {
|
|
4600
|
-
value:
|
|
4652
|
+
value: b,
|
|
4601
4653
|
writable: !1
|
|
4602
4654
|
}), r;
|
|
4603
4655
|
}
|
|
4604
|
-
var
|
|
4605
|
-
console.log(
|
|
4656
|
+
var Rt = `qik ${vr}`;
|
|
4657
|
+
console.log(Rt);
|
|
4606
4658
|
export {
|
|
4607
4659
|
je as EventDispatcher,
|
|
4608
4660
|
Nt as default
|