@qikdev/sdk 1.0.1 → 1.0.2
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 +1100 -1125
- package/package.json +1 -1
- package/src/api/qik.access.js +2 -53
- package/src/api/qik.socket.js +38 -3
package/dist/main.js
CHANGED
|
@@ -44,8 +44,8 @@ function Qr() {
|
|
|
44
44
|
return !1;
|
|
45
45
|
if (typeof Object.keys == "function" && Object.keys(r).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(r).length !== 0)
|
|
46
46
|
return !1;
|
|
47
|
-
var
|
|
48
|
-
if (
|
|
47
|
+
var i = Object.getOwnPropertySymbols(r);
|
|
48
|
+
if (i.length !== 1 || i[0] !== a || !Object.prototype.propertyIsEnumerable.call(r, a))
|
|
49
49
|
return !1;
|
|
50
50
|
if (typeof Object.getOwnPropertyDescriptor == "function") {
|
|
51
51
|
var m = Object.getOwnPropertyDescriptor(r, a);
|
|
@@ -69,14 +69,14 @@ function Xr() {
|
|
|
69
69
|
if (Or) return Ye;
|
|
70
70
|
Or = 1;
|
|
71
71
|
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, a = Math.max, t = "[object Function]", n = function(p, y) {
|
|
72
|
-
for (var w = [],
|
|
73
|
-
w[
|
|
74
|
-
for (var
|
|
75
|
-
w[
|
|
72
|
+
for (var w = [], A = 0; A < p.length; A += 1)
|
|
73
|
+
w[A] = p[A];
|
|
74
|
+
for (var s = 0; s < y.length; s += 1)
|
|
75
|
+
w[s + p.length] = y[s];
|
|
76
76
|
return w;
|
|
77
|
-
},
|
|
78
|
-
for (var w = [],
|
|
79
|
-
w[
|
|
77
|
+
}, i = function(p, y) {
|
|
78
|
+
for (var w = [], A = y, s = 0; A < p.length; A += 1, s += 1)
|
|
79
|
+
w[s] = p[A];
|
|
80
80
|
return w;
|
|
81
81
|
}, m = function(l, p) {
|
|
82
82
|
for (var y = "", w = 0; w < l.length; w += 1)
|
|
@@ -87,26 +87,26 @@ function Xr() {
|
|
|
87
87
|
var y = this;
|
|
88
88
|
if (typeof y != "function" || r.apply(y) !== t)
|
|
89
89
|
throw new TypeError(e + y);
|
|
90
|
-
for (var w =
|
|
91
|
-
if (this instanceof
|
|
92
|
-
var
|
|
90
|
+
for (var w = i(arguments, 1), A, s = function() {
|
|
91
|
+
if (this instanceof A) {
|
|
92
|
+
var u = y.apply(
|
|
93
93
|
this,
|
|
94
94
|
n(w, arguments)
|
|
95
95
|
);
|
|
96
|
-
return Object(
|
|
96
|
+
return Object(u) === u ? u : this;
|
|
97
97
|
}
|
|
98
98
|
return y.apply(
|
|
99
99
|
p,
|
|
100
100
|
n(w, arguments)
|
|
101
101
|
);
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
if (
|
|
105
|
-
var
|
|
102
|
+
}, o = a(0, y.length - w.length), f = [], g = 0; g < o; g++)
|
|
103
|
+
f[g] = "$" + g;
|
|
104
|
+
if (A = Function("binder", "return function (" + m(f, ",") + "){ return binder.apply(this,arguments); }")(s), y.prototype) {
|
|
105
|
+
var c = function() {
|
|
106
106
|
};
|
|
107
|
-
|
|
107
|
+
c.prototype = y.prototype, A.prototype = new c(), c.prototype = null;
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return A;
|
|
110
110
|
}, Ye;
|
|
111
111
|
}
|
|
112
112
|
var Xe, Mr;
|
|
@@ -116,44 +116,44 @@ function yr() {
|
|
|
116
116
|
var e = Xr();
|
|
117
117
|
return Xe = Function.prototype.bind || e, Xe;
|
|
118
118
|
}
|
|
119
|
-
var er,
|
|
119
|
+
var er, Rr;
|
|
120
120
|
function et() {
|
|
121
|
-
if (
|
|
122
|
-
|
|
121
|
+
if (Rr) return er;
|
|
122
|
+
Rr = 1;
|
|
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
|
-
|
|
128
|
+
if (Tr) return rr;
|
|
129
|
+
Tr = 1;
|
|
130
130
|
var e, r = SyntaxError, a = Function, t = TypeError, n = function($) {
|
|
131
131
|
try {
|
|
132
132
|
return a('"use strict"; return (' + $ + ").constructor;")();
|
|
133
133
|
} catch {
|
|
134
134
|
}
|
|
135
|
-
},
|
|
136
|
-
if (
|
|
135
|
+
}, i = Object.getOwnPropertyDescriptor;
|
|
136
|
+
if (i)
|
|
137
137
|
try {
|
|
138
|
-
|
|
138
|
+
i({}, "");
|
|
139
139
|
} catch {
|
|
140
|
-
|
|
140
|
+
i = null;
|
|
141
141
|
}
|
|
142
142
|
var m = function() {
|
|
143
143
|
throw new t();
|
|
144
|
-
}, l =
|
|
144
|
+
}, l = i ? (function() {
|
|
145
145
|
try {
|
|
146
146
|
return arguments.callee, m;
|
|
147
147
|
} catch {
|
|
148
148
|
try {
|
|
149
|
-
return
|
|
149
|
+
return i(arguments, "callee").get;
|
|
150
150
|
} catch {
|
|
151
151
|
return m;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
})() : m, p = Yr()(), y = Object.getPrototypeOf || function($) {
|
|
155
155
|
return $.__proto__;
|
|
156
|
-
}, w = {},
|
|
156
|
+
}, w = {}, A = typeof Uint8Array > "u" ? e : y(Uint8Array), s = {
|
|
157
157
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
158
158
|
"%Array%": Array,
|
|
159
159
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
|
|
@@ -209,7 +209,7 @@ function hr() {
|
|
|
209
209
|
"%Symbol%": p ? Symbol : e,
|
|
210
210
|
"%SyntaxError%": r,
|
|
211
211
|
"%ThrowTypeError%": l,
|
|
212
|
-
"%TypedArray%":
|
|
212
|
+
"%TypedArray%": A,
|
|
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
|
-
},
|
|
222
|
+
}, o = function $(N) {
|
|
223
223
|
var F;
|
|
224
|
-
if (
|
|
224
|
+
if (N === "%AsyncFunction%")
|
|
225
225
|
F = n("async function () {}");
|
|
226
|
-
else if (
|
|
226
|
+
else if (N === "%GeneratorFunction%")
|
|
227
227
|
F = n("function* () {}");
|
|
228
|
-
else if (
|
|
228
|
+
else if (N === "%AsyncGeneratorFunction%")
|
|
229
229
|
F = n("async function* () {}");
|
|
230
|
-
else if (
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
} else if (
|
|
234
|
-
var
|
|
235
|
-
|
|
230
|
+
else if (N === "%AsyncGenerator%") {
|
|
231
|
+
var I = $("%AsyncGeneratorFunction%");
|
|
232
|
+
I && (F = I.prototype);
|
|
233
|
+
} else if (N === "%AsyncIteratorPrototype%") {
|
|
234
|
+
var k = $("%AsyncGenerator%");
|
|
235
|
+
k && (F = y(k.prototype));
|
|
236
236
|
}
|
|
237
|
-
return
|
|
238
|
-
},
|
|
237
|
+
return s[N] = F, F;
|
|
238
|
+
}, f = {
|
|
239
239
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
240
240
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
241
241
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -287,97 +287,97 @@ function hr() {
|
|
|
287
287
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
288
288
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
289
289
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
290
|
-
},
|
|
291
|
-
var F = P(
|
|
292
|
-
if (F === "%" &&
|
|
290
|
+
}, g = yr(), c = et(), u = g.call(Function.call, Array.prototype.concat), b = g.call(Function.apply, Array.prototype.splice), S = g.call(Function.call, String.prototype.replace), P = g.call(Function.call, String.prototype.slice), x = g.call(Function.call, RegExp.prototype.exec), T = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, L = /\\(\\)?/g, M = function(N) {
|
|
291
|
+
var F = P(N, 0, 1), I = P(N, -1);
|
|
292
|
+
if (F === "%" && I !== "%")
|
|
293
293
|
throw new r("invalid intrinsic syntax, expected closing `%`");
|
|
294
|
-
if (
|
|
294
|
+
if (I === "%" && F !== "%")
|
|
295
295
|
throw new r("invalid intrinsic syntax, expected opening `%`");
|
|
296
|
-
var
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
}, V = function(
|
|
301
|
-
var
|
|
302
|
-
if (f
|
|
303
|
-
var U =
|
|
304
|
-
if (U === w && (U =
|
|
305
|
-
throw new t("intrinsic " +
|
|
296
|
+
var k = [];
|
|
297
|
+
return S(N, T, function(U, z, _, Z) {
|
|
298
|
+
k[k.length] = _ ? S(Z, L, "$1") : z || U;
|
|
299
|
+
}), k;
|
|
300
|
+
}, V = function(N, F) {
|
|
301
|
+
var I = N, k;
|
|
302
|
+
if (c(f, I) && (k = f[I], I = "%" + k[0] + "%"), c(s, I)) {
|
|
303
|
+
var U = s[I];
|
|
304
|
+
if (U === w && (U = o(I)), typeof U > "u" && !F)
|
|
305
|
+
throw new t("intrinsic " + N + " exists, but is not available. Please file an issue!");
|
|
306
306
|
return {
|
|
307
|
-
alias:
|
|
308
|
-
name:
|
|
307
|
+
alias: k,
|
|
308
|
+
name: I,
|
|
309
309
|
value: U
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
throw new r("intrinsic " +
|
|
312
|
+
throw new r("intrinsic " + N + " does not exist!");
|
|
313
313
|
};
|
|
314
|
-
return rr = function(
|
|
315
|
-
if (typeof
|
|
314
|
+
return rr = function(N, F) {
|
|
315
|
+
if (typeof N != "string" || N.length === 0)
|
|
316
316
|
throw new t("intrinsic name must be a non-empty string");
|
|
317
317
|
if (arguments.length > 1 && typeof F != "boolean")
|
|
318
318
|
throw new t('"allowMissing" argument must be a boolean');
|
|
319
|
-
if (x(/^%?[^%]*%?$/,
|
|
319
|
+
if (x(/^%?[^%]*%?$/, N) === null)
|
|
320
320
|
throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
321
|
-
var
|
|
322
|
-
Q && (
|
|
323
|
-
for (var ne = 1, X = !0; ne <
|
|
324
|
-
var W =
|
|
321
|
+
var I = M(N), k = I.length > 0 ? I[0] : "", U = V("%" + k + "%", F), z = U.name, _ = U.value, Z = !1, Q = U.alias;
|
|
322
|
+
Q && (k = Q[0], b(I, u([0, 1], Q)));
|
|
323
|
+
for (var ne = 1, X = !0; ne < I.length; ne += 1) {
|
|
324
|
+
var W = I[ne], ie = P(W, 0, 1), re = P(W, -1);
|
|
325
325
|
if ((ie === '"' || ie === "'" || ie === "`" || re === '"' || re === "'" || re === "`") && ie !== re)
|
|
326
326
|
throw new r("property names with quotes must have matching quotes");
|
|
327
|
-
if ((W === "constructor" || !X) && (Z = !0),
|
|
328
|
-
_ =
|
|
327
|
+
if ((W === "constructor" || !X) && (Z = !0), k += "." + W, z = "%" + k + "%", c(s, z))
|
|
328
|
+
_ = s[z];
|
|
329
329
|
else if (_ != null) {
|
|
330
330
|
if (!(W in _)) {
|
|
331
331
|
if (!F)
|
|
332
|
-
throw new t("base intrinsic for " +
|
|
332
|
+
throw new t("base intrinsic for " + N + " exists, but the property is not available.");
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
if (
|
|
336
|
-
var te =
|
|
335
|
+
if (i && ne + 1 >= I.length) {
|
|
336
|
+
var te = i(_, W);
|
|
337
337
|
X = !!te, X && "get" in te && !("originalValue" in te.get) ? _ = te.get : _ = _[W];
|
|
338
338
|
} else
|
|
339
|
-
X =
|
|
340
|
-
X && !Z && (
|
|
339
|
+
X = c(_, W), _ = _[W];
|
|
340
|
+
X && !Z && (s[z] = _);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
return _;
|
|
344
344
|
}, rr;
|
|
345
345
|
}
|
|
346
|
-
var tr = { exports: {} },
|
|
346
|
+
var tr = { exports: {} }, Ir;
|
|
347
347
|
function rt() {
|
|
348
|
-
return
|
|
349
|
-
var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), n = a("%Function.prototype.call%"),
|
|
348
|
+
return Ir || (Ir = 1, (function(e) {
|
|
349
|
+
var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), n = a("%Function.prototype.call%"), i = a("%Reflect.apply%", !0) || r.call(n, t), m = a("%Object.getOwnPropertyDescriptor%", !0), l = a("%Object.defineProperty%", !0), p = a("%Math.max%");
|
|
350
350
|
if (l)
|
|
351
351
|
try {
|
|
352
352
|
l({}, "a", { value: 1 });
|
|
353
353
|
} catch {
|
|
354
354
|
l = null;
|
|
355
355
|
}
|
|
356
|
-
e.exports = function(
|
|
357
|
-
var
|
|
356
|
+
e.exports = function(A) {
|
|
357
|
+
var s = i(r, n, arguments);
|
|
358
358
|
if (m && l) {
|
|
359
|
-
var
|
|
360
|
-
|
|
361
|
-
|
|
359
|
+
var o = m(s, "length");
|
|
360
|
+
o.configurable && l(
|
|
361
|
+
s,
|
|
362
362
|
"length",
|
|
363
|
-
{ value: 1 + p(0,
|
|
363
|
+
{ value: 1 + p(0, A.length - (arguments.length - 1)) }
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return s;
|
|
367
367
|
};
|
|
368
368
|
var y = function() {
|
|
369
|
-
return
|
|
369
|
+
return i(r, t, arguments);
|
|
370
370
|
};
|
|
371
371
|
l ? l(e.exports, "apply", { value: y }) : e.exports.apply = y;
|
|
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
|
-
return ar = function(n,
|
|
380
|
-
var m = e(n, !!
|
|
379
|
+
return ar = function(n, i) {
|
|
380
|
+
var m = e(n, !!i);
|
|
381
381
|
return typeof m == "function" && a(n, ".prototype.") > -1 ? r(m) : m;
|
|
382
382
|
}, ar;
|
|
383
383
|
}
|
|
@@ -389,24 +389,24 @@ 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,
|
|
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, i = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, m = n && i && typeof i.get == "function" ? i.get : null, l = n && Set.prototype.forEach, p = typeof WeakMap == "function" && WeakMap.prototype, y = p ? WeakMap.prototype.has : null, w = typeof WeakSet == "function" && WeakSet.prototype, A = w ? WeakSet.prototype.has : null, s = typeof WeakRef == "function" && WeakRef.prototype, o = s ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, g = Object.prototype.toString, c = Function.prototype.toString, u = String.prototype.match, b = String.prototype.slice, S = String.prototype.replace, P = String.prototype.toUpperCase, x = String.prototype.toLowerCase, T = RegExp.prototype.test, L = Array.prototype.concat, M = Array.prototype.join, V = Array.prototype.slice, $ = Math.floor, N = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, F = Object.getOwnPropertySymbols, I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, k = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === k || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, _ = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(h) {
|
|
393
393
|
return h.__proto__;
|
|
394
394
|
} : null);
|
|
395
|
-
function Z(h,
|
|
396
|
-
if (h === 1 / 0 || h === -1 / 0 || h !== h || h && h > -1e3 && h < 1e3 ||
|
|
397
|
-
return
|
|
395
|
+
function Z(h, v) {
|
|
396
|
+
if (h === 1 / 0 || h === -1 / 0 || h !== h || h && h > -1e3 && h < 1e3 || T.call(/e/, v))
|
|
397
|
+
return v;
|
|
398
398
|
var D = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
399
399
|
if (typeof h == "number") {
|
|
400
400
|
var d = h < 0 ? -$(-h) : $(h);
|
|
401
401
|
if (d !== h) {
|
|
402
|
-
var E = String(d), C =
|
|
403
|
-
return
|
|
402
|
+
var E = String(d), C = b.call(v, E.length + 1);
|
|
403
|
+
return S.call(E, D, "$&_") + "." + S.call(S.call(C, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
return
|
|
406
|
+
return S.call(v, D, "$&_");
|
|
407
407
|
}
|
|
408
408
|
var Q = it, ne = Q.custom, X = se(ne) ? ne : null;
|
|
409
|
-
nr = function h(
|
|
409
|
+
nr = function h(v, D, d, E) {
|
|
410
410
|
var C = D || {};
|
|
411
411
|
if (J(C, "quoteStyle") && C.quoteStyle !== "single" && C.quoteStyle !== "double")
|
|
412
412
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -420,31 +420,31 @@ function ot() {
|
|
|
420
420
|
if (J(C, "numericSeparator") && typeof C.numericSeparator != "boolean")
|
|
421
421
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
422
422
|
var ae = C.numericSeparator;
|
|
423
|
-
if (typeof
|
|
423
|
+
if (typeof v > "u")
|
|
424
424
|
return "undefined";
|
|
425
|
-
if (
|
|
425
|
+
if (v === 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 K = String(
|
|
435
|
-
return ae ? Z(
|
|
427
|
+
if (typeof v == "boolean")
|
|
428
|
+
return v ? "true" : "false";
|
|
429
|
+
if (typeof v == "string")
|
|
430
|
+
return Ce(v, C);
|
|
431
|
+
if (typeof v == "number") {
|
|
432
|
+
if (v === 0)
|
|
433
|
+
return 1 / 0 / v > 0 ? "0" : "-0";
|
|
434
|
+
var K = String(v);
|
|
435
|
+
return ae ? Z(v, K) : K;
|
|
436
436
|
}
|
|
437
|
-
if (typeof
|
|
438
|
-
var O = String(
|
|
439
|
-
return ae ? Z(
|
|
437
|
+
if (typeof v == "bigint") {
|
|
438
|
+
var O = String(v) + "n";
|
|
439
|
+
return ae ? Z(v, O) : O;
|
|
440
440
|
}
|
|
441
441
|
var B = typeof C.depth > "u" ? 5 : C.depth;
|
|
442
|
-
if (typeof d > "u" && (d = 0), d >= B && B > 0 && typeof
|
|
443
|
-
return re(
|
|
444
|
-
var j =
|
|
442
|
+
if (typeof d > "u" && (d = 0), d >= B && B > 0 && typeof v == "object")
|
|
443
|
+
return re(v) ? "[Array]" : "[Object]";
|
|
444
|
+
var j = Ne(C, d);
|
|
445
445
|
if (typeof E > "u")
|
|
446
446
|
E = [];
|
|
447
|
-
else if (xe(E,
|
|
447
|
+
else if (xe(E, v) >= 0)
|
|
448
448
|
return "[Circular]";
|
|
449
449
|
function H(Me, Be, Jr) {
|
|
450
450
|
if (Be && (E = V.call(E), E.push(Be)), Jr) {
|
|
@@ -455,73 +455,73 @@ function ot() {
|
|
|
455
455
|
}
|
|
456
456
|
return h(Me, C, d + 1, E);
|
|
457
457
|
}
|
|
458
|
-
if (typeof
|
|
459
|
-
var Y =
|
|
458
|
+
if (typeof v == "function" && !ce(v)) {
|
|
459
|
+
var Y = Re(v), Ee = ge(v, H);
|
|
460
460
|
return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " + M.call(Ee, ", ") + " }" : "");
|
|
461
461
|
}
|
|
462
|
-
if (se(
|
|
463
|
-
var Ar =
|
|
464
|
-
return typeof
|
|
462
|
+
if (se(v)) {
|
|
463
|
+
var Ar = k ? S.call(String(v), /^(Symbol\(.*\))_[^)]*$/, "$1") : I.call(v);
|
|
464
|
+
return typeof v == "object" && !k ? le(Ar) : Ar;
|
|
465
465
|
}
|
|
466
|
-
if (_e(
|
|
467
|
-
for (var Fe = "<" + x.call(String(
|
|
466
|
+
if (_e(v)) {
|
|
467
|
+
for (var Fe = "<" + x.call(String(v.nodeName)), ze = v.attributes || [], $e = 0; $e < ze.length; $e++)
|
|
468
468
|
Fe += " " + ze[$e].name + "=" + W(ie(ze[$e].value), "double", C);
|
|
469
|
-
return Fe += ">",
|
|
469
|
+
return Fe += ">", v.childNodes && v.childNodes.length && (Fe += "..."), Fe += "</" + x.call(String(v.nodeName)) + ">", Fe;
|
|
470
470
|
}
|
|
471
|
-
if (re(
|
|
472
|
-
if (
|
|
471
|
+
if (re(v)) {
|
|
472
|
+
if (v.length === 0)
|
|
473
473
|
return "[]";
|
|
474
|
-
var We = ge(
|
|
474
|
+
var We = ge(v, H);
|
|
475
475
|
return j && !Oe(We) ? "[" + he(We, j) + "]" : "[ " + M.call(We, ", ") + " ]";
|
|
476
476
|
}
|
|
477
|
-
if (ue(
|
|
478
|
-
var Ke = ge(
|
|
479
|
-
return !("cause" in Error.prototype) && "cause" in
|
|
477
|
+
if (ue(v)) {
|
|
478
|
+
var Ke = ge(v, H);
|
|
479
|
+
return !("cause" in Error.prototype) && "cause" in v && !z.call(v, "cause") ? "{ [" + String(v) + "] " + M.call(L.call("[cause]: " + H(v.cause), Ke), ", ") + " }" : Ke.length === 0 ? "[" + String(v) + "]" : "{ [" + String(v) + "] " + M.call(Ke, ", ") + " }";
|
|
480
480
|
}
|
|
481
|
-
if (typeof
|
|
482
|
-
if (X && typeof
|
|
483
|
-
return Q(
|
|
484
|
-
if (G !== "symbol" && typeof
|
|
485
|
-
return
|
|
481
|
+
if (typeof v == "object" && G) {
|
|
482
|
+
if (X && typeof v[X] == "function" && Q)
|
|
483
|
+
return Q(v, { depth: B - d });
|
|
484
|
+
if (G !== "symbol" && typeof v.inspect == "function")
|
|
485
|
+
return v.inspect();
|
|
486
486
|
}
|
|
487
|
-
if (
|
|
487
|
+
if (Te(v)) {
|
|
488
488
|
var br = [];
|
|
489
|
-
return t.call(
|
|
490
|
-
br.push(H(Be,
|
|
491
|
-
}), we("Map", a.call(
|
|
489
|
+
return t.call(v, function(Me, Be) {
|
|
490
|
+
br.push(H(Be, v, !0) + " => " + H(Me, v));
|
|
491
|
+
}), we("Map", a.call(v), br, j);
|
|
492
492
|
}
|
|
493
|
-
if (
|
|
493
|
+
if (Ie(v)) {
|
|
494
494
|
var Sr = [];
|
|
495
|
-
return l.call(
|
|
496
|
-
Sr.push(H(Me,
|
|
497
|
-
}), we("Set", m.call(
|
|
495
|
+
return l.call(v, function(Me) {
|
|
496
|
+
Sr.push(H(Me, v));
|
|
497
|
+
}), we("Set", m.call(v), Sr, j);
|
|
498
498
|
}
|
|
499
|
-
if (me(
|
|
499
|
+
if (me(v))
|
|
500
500
|
return fe("WeakMap");
|
|
501
|
-
if (
|
|
501
|
+
if (ke(v))
|
|
502
502
|
return fe("WeakSet");
|
|
503
|
-
if (Pe(
|
|
503
|
+
if (Pe(v))
|
|
504
504
|
return fe("WeakRef");
|
|
505
|
-
if (de(
|
|
506
|
-
return le(H(Number(
|
|
507
|
-
if (ye(
|
|
508
|
-
return le(H(
|
|
509
|
-
if (pe(
|
|
510
|
-
return le(
|
|
511
|
-
if (oe(
|
|
512
|
-
return le(H(String(
|
|
513
|
-
if (!te(
|
|
514
|
-
var He = ge(
|
|
505
|
+
if (de(v))
|
|
506
|
+
return le(H(Number(v)));
|
|
507
|
+
if (ye(v))
|
|
508
|
+
return le(H(N.call(v)));
|
|
509
|
+
if (pe(v))
|
|
510
|
+
return le(f.call(v));
|
|
511
|
+
if (oe(v))
|
|
512
|
+
return le(H(String(v)));
|
|
513
|
+
if (!te(v) && !ce(v)) {
|
|
514
|
+
var He = ge(v, H), wr = _ ? _(v) === Object.prototype : v instanceof Object || v.constructor === Object, Je = v instanceof Object ? "" : "null prototype", Er = !wr && U && Object(v) === v && U in v ? b.call(ee(v), 8, -1) : Je ? "Object" : "", Hr = wr || typeof v.constructor != "function" ? "" : v.constructor.name ? v.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + M.call(L.call([], Er || [], Je || []), ": ") + "] " : "");
|
|
515
515
|
return He.length === 0 ? qe + "{}" : j ? qe + "{" + he(He, j) + "}" : qe + "{ " + M.call(He, ", ") + " }";
|
|
516
516
|
}
|
|
517
|
-
return String(
|
|
517
|
+
return String(v);
|
|
518
518
|
};
|
|
519
|
-
function W(h,
|
|
520
|
-
var d = (D.quoteStyle ||
|
|
519
|
+
function W(h, v, D) {
|
|
520
|
+
var d = (D.quoteStyle || v) === "double" ? '"' : "'";
|
|
521
521
|
return d + h + d;
|
|
522
522
|
}
|
|
523
523
|
function ie(h) {
|
|
524
|
-
return
|
|
524
|
+
return S.call(String(h), /"/g, """);
|
|
525
525
|
}
|
|
526
526
|
function re(h) {
|
|
527
527
|
return ee(h) === "[object Array]" && (!U || !(typeof h == "object" && U in h));
|
|
@@ -545,23 +545,23 @@ function ot() {
|
|
|
545
545
|
return ee(h) === "[object Boolean]" && (!U || !(typeof h == "object" && U in h));
|
|
546
546
|
}
|
|
547
547
|
function se(h) {
|
|
548
|
-
if (
|
|
548
|
+
if (k)
|
|
549
549
|
return h && typeof h == "object" && h instanceof Symbol;
|
|
550
550
|
if (typeof h == "symbol")
|
|
551
551
|
return !0;
|
|
552
|
-
if (!h || typeof h != "object" || !
|
|
552
|
+
if (!h || typeof h != "object" || !I)
|
|
553
553
|
return !1;
|
|
554
554
|
try {
|
|
555
|
-
return
|
|
555
|
+
return I.call(h), !0;
|
|
556
556
|
} catch {
|
|
557
557
|
}
|
|
558
558
|
return !1;
|
|
559
559
|
}
|
|
560
560
|
function ye(h) {
|
|
561
|
-
if (!h || typeof h != "object" || !
|
|
561
|
+
if (!h || typeof h != "object" || !N)
|
|
562
562
|
return !1;
|
|
563
563
|
try {
|
|
564
|
-
return
|
|
564
|
+
return N.call(h), !0;
|
|
565
565
|
} catch {
|
|
566
566
|
}
|
|
567
567
|
return !1;
|
|
@@ -569,27 +569,27 @@ function ot() {
|
|
|
569
569
|
var Se = Object.prototype.hasOwnProperty || function(h) {
|
|
570
570
|
return h in this;
|
|
571
571
|
};
|
|
572
|
-
function J(h,
|
|
573
|
-
return Se.call(h,
|
|
572
|
+
function J(h, v) {
|
|
573
|
+
return Se.call(h, v);
|
|
574
574
|
}
|
|
575
575
|
function ee(h) {
|
|
576
|
-
return
|
|
576
|
+
return g.call(h);
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Re(h) {
|
|
579
579
|
if (h.name)
|
|
580
580
|
return h.name;
|
|
581
|
-
var
|
|
582
|
-
return
|
|
581
|
+
var v = u.call(c.call(h), /^function\s*([\w$]+)/);
|
|
582
|
+
return v ? v[1] : null;
|
|
583
583
|
}
|
|
584
|
-
function xe(h,
|
|
584
|
+
function xe(h, v) {
|
|
585
585
|
if (h.indexOf)
|
|
586
|
-
return h.indexOf(
|
|
586
|
+
return h.indexOf(v);
|
|
587
587
|
for (var D = 0, d = h.length; D < d; D++)
|
|
588
|
-
if (h[D] ===
|
|
588
|
+
if (h[D] === v)
|
|
589
589
|
return D;
|
|
590
590
|
return -1;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function Te(h) {
|
|
593
593
|
if (!a || !h || typeof h != "object")
|
|
594
594
|
return !1;
|
|
595
595
|
try {
|
|
@@ -610,7 +610,7 @@ function ot() {
|
|
|
610
610
|
try {
|
|
611
611
|
y.call(h, y);
|
|
612
612
|
try {
|
|
613
|
-
|
|
613
|
+
A.call(h, A);
|
|
614
614
|
} catch {
|
|
615
615
|
return !0;
|
|
616
616
|
}
|
|
@@ -620,15 +620,15 @@ function ot() {
|
|
|
620
620
|
return !1;
|
|
621
621
|
}
|
|
622
622
|
function Pe(h) {
|
|
623
|
-
if (!
|
|
623
|
+
if (!o || !h || typeof h != "object")
|
|
624
624
|
return !1;
|
|
625
625
|
try {
|
|
626
|
-
return
|
|
626
|
+
return o.call(h), !0;
|
|
627
627
|
} catch {
|
|
628
628
|
}
|
|
629
629
|
return !1;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Ie(h) {
|
|
632
632
|
if (!m || !h || typeof h != "object")
|
|
633
633
|
return !1;
|
|
634
634
|
try {
|
|
@@ -643,11 +643,11 @@ function ot() {
|
|
|
643
643
|
}
|
|
644
644
|
return !1;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
if (!
|
|
646
|
+
function ke(h) {
|
|
647
|
+
if (!A || !h || typeof h != "object")
|
|
648
648
|
return !1;
|
|
649
649
|
try {
|
|
650
|
-
|
|
650
|
+
A.call(h, A);
|
|
651
651
|
try {
|
|
652
652
|
y.call(h, y);
|
|
653
653
|
} catch {
|
|
@@ -661,23 +661,23 @@ function ot() {
|
|
|
661
661
|
function _e(h) {
|
|
662
662
|
return !h || typeof h != "object" ? !1 : typeof HTMLElement < "u" && h instanceof HTMLElement ? !0 : typeof h.nodeName == "string" && typeof h.getAttribute == "function";
|
|
663
663
|
}
|
|
664
|
-
function Ce(h,
|
|
665
|
-
if (h.length >
|
|
666
|
-
var D = h.length -
|
|
667
|
-
return Ce(
|
|
664
|
+
function Ce(h, v) {
|
|
665
|
+
if (h.length > v.maxStringLength) {
|
|
666
|
+
var D = h.length - v.maxStringLength, d = "... " + D + " more character" + (D > 1 ? "s" : "");
|
|
667
|
+
return Ce(b.call(h, 0, v.maxStringLength), v) + d;
|
|
668
668
|
}
|
|
669
|
-
var E =
|
|
670
|
-
return W(E, "single",
|
|
669
|
+
var E = S.call(S.call(h, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Le);
|
|
670
|
+
return W(E, "single", v);
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
var
|
|
672
|
+
function Le(h) {
|
|
673
|
+
var v = h.charCodeAt(0), D = {
|
|
674
674
|
8: "b",
|
|
675
675
|
9: "t",
|
|
676
676
|
10: "n",
|
|
677
677
|
12: "f",
|
|
678
678
|
13: "r"
|
|
679
|
-
}[
|
|
680
|
-
return D ? "\\" + D : "\\x" + (
|
|
679
|
+
}[v];
|
|
680
|
+
return D ? "\\" + D : "\\x" + (v < 16 ? "0" : "") + P.call(v.toString(16));
|
|
681
681
|
}
|
|
682
682
|
function le(h) {
|
|
683
683
|
return "Object(" + h + ")";
|
|
@@ -685,18 +685,18 @@ function ot() {
|
|
|
685
685
|
function fe(h) {
|
|
686
686
|
return h + " { ? }";
|
|
687
687
|
}
|
|
688
|
-
function we(h,
|
|
688
|
+
function we(h, v, D, d) {
|
|
689
689
|
var E = d ? he(D, d) : M.call(D, ", ");
|
|
690
|
-
return h + " (" +
|
|
690
|
+
return h + " (" + v + ") {" + E + "}";
|
|
691
691
|
}
|
|
692
692
|
function Oe(h) {
|
|
693
|
-
for (var
|
|
694
|
-
if (xe(h[
|
|
693
|
+
for (var v = 0; v < h.length; v++)
|
|
694
|
+
if (xe(h[v], `
|
|
695
695
|
`) >= 0)
|
|
696
696
|
return !1;
|
|
697
697
|
return !0;
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Ne(h, v) {
|
|
700
700
|
var D;
|
|
701
701
|
if (h.indent === " ")
|
|
702
702
|
D = " ";
|
|
@@ -706,99 +706,99 @@ function ot() {
|
|
|
706
706
|
return null;
|
|
707
707
|
return {
|
|
708
708
|
base: D,
|
|
709
|
-
prev: M.call(Array(
|
|
709
|
+
prev: M.call(Array(v + 1), D)
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function he(h,
|
|
712
|
+
function he(h, v) {
|
|
713
713
|
if (h.length === 0)
|
|
714
714
|
return "";
|
|
715
715
|
var D = `
|
|
716
|
-
` +
|
|
716
|
+
` + v.prev + v.base;
|
|
717
717
|
return D + M.call(h, "," + D) + `
|
|
718
|
-
` +
|
|
718
|
+
` + v.prev;
|
|
719
719
|
}
|
|
720
|
-
function ge(h,
|
|
720
|
+
function ge(h, v) {
|
|
721
721
|
var D = re(h), d = [];
|
|
722
722
|
if (D) {
|
|
723
723
|
d.length = h.length;
|
|
724
724
|
for (var E = 0; E < h.length; E++)
|
|
725
|
-
d[E] = J(h, E) ?
|
|
725
|
+
d[E] = J(h, E) ? v(h[E], h) : "";
|
|
726
726
|
}
|
|
727
727
|
var C = typeof F == "function" ? F(h) : [], G;
|
|
728
|
-
if (
|
|
728
|
+
if (k) {
|
|
729
729
|
G = {};
|
|
730
730
|
for (var ae = 0; ae < C.length; ae++)
|
|
731
731
|
G["$" + C[ae]] = C[ae];
|
|
732
732
|
}
|
|
733
733
|
for (var K in h)
|
|
734
|
-
J(h, K) && (D && String(Number(K)) === K && K < h.length ||
|
|
734
|
+
J(h, K) && (D && String(Number(K)) === K && K < h.length || k && G["$" + K] instanceof Symbol || (T.call(/[^\w$]/, K) ? d.push(v(K, h) + ": " + v(h[K], h)) : d.push(K + ": " + v(h[K], h))));
|
|
735
735
|
if (typeof F == "function")
|
|
736
736
|
for (var O = 0; O < C.length; O++)
|
|
737
|
-
z.call(h, C[O]) && d.push("[" +
|
|
737
|
+
z.call(h, C[O]) && d.push("[" + v(C[O]) + "]: " + v(h[C[O]], h));
|
|
738
738
|
return d;
|
|
739
739
|
}
|
|
740
740
|
return nr;
|
|
741
741
|
}
|
|
742
|
-
var ir,
|
|
742
|
+
var ir, Lr;
|
|
743
743
|
function st() {
|
|
744
|
-
if (
|
|
745
|
-
|
|
746
|
-
var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), n = e("%WeakMap%", !0),
|
|
747
|
-
for (var
|
|
748
|
-
if (
|
|
749
|
-
return
|
|
750
|
-
},
|
|
751
|
-
var
|
|
752
|
-
return
|
|
753
|
-
},
|
|
754
|
-
var
|
|
755
|
-
|
|
744
|
+
if (Lr) return ir;
|
|
745
|
+
Lr = 1;
|
|
746
|
+
var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), n = e("%WeakMap%", !0), i = e("%Map%", !0), m = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), p = r("WeakMap.prototype.has", !0), y = r("Map.prototype.get", !0), w = r("Map.prototype.set", !0), A = r("Map.prototype.has", !0), s = function(c, u) {
|
|
747
|
+
for (var b = c, S; (S = b.next) !== null; b = S)
|
|
748
|
+
if (S.key === u)
|
|
749
|
+
return b.next = S.next, S.next = c.next, c.next = S, S;
|
|
750
|
+
}, o = function(c, u) {
|
|
751
|
+
var b = s(c, u);
|
|
752
|
+
return b && b.value;
|
|
753
|
+
}, f = function(c, u, b) {
|
|
754
|
+
var S = s(c, u);
|
|
755
|
+
S ? S.value = b : c.next = {
|
|
756
756
|
// eslint-disable-line no-param-reassign
|
|
757
|
-
key:
|
|
758
|
-
next:
|
|
759
|
-
value:
|
|
757
|
+
key: u,
|
|
758
|
+
next: c.next,
|
|
759
|
+
value: b
|
|
760
760
|
};
|
|
761
|
-
},
|
|
762
|
-
return !!
|
|
761
|
+
}, g = function(c, u) {
|
|
762
|
+
return !!s(c, u);
|
|
763
763
|
};
|
|
764
764
|
return ir = function() {
|
|
765
|
-
var
|
|
765
|
+
var u, b, S, P = {
|
|
766
766
|
assert: function(x) {
|
|
767
767
|
if (!P.has(x))
|
|
768
768
|
throw new t("Side channel does not contain " + a(x));
|
|
769
769
|
},
|
|
770
770
|
get: function(x) {
|
|
771
771
|
if (n && x && (typeof x == "object" || typeof x == "function")) {
|
|
772
|
-
if (
|
|
773
|
-
return m(
|
|
774
|
-
} else if (
|
|
775
|
-
if (
|
|
776
|
-
return y(
|
|
777
|
-
} else if (
|
|
778
|
-
return
|
|
772
|
+
if (u)
|
|
773
|
+
return m(u, x);
|
|
774
|
+
} else if (i) {
|
|
775
|
+
if (b)
|
|
776
|
+
return y(b, x);
|
|
777
|
+
} else if (S)
|
|
778
|
+
return o(S, x);
|
|
779
779
|
},
|
|
780
780
|
has: function(x) {
|
|
781
781
|
if (n && x && (typeof x == "object" || typeof x == "function")) {
|
|
782
|
-
if (
|
|
783
|
-
return p(
|
|
784
|
-
} else if (
|
|
785
|
-
if (
|
|
786
|
-
return
|
|
787
|
-
} else if (
|
|
788
|
-
return S
|
|
782
|
+
if (u)
|
|
783
|
+
return p(u, x);
|
|
784
|
+
} else if (i) {
|
|
785
|
+
if (b)
|
|
786
|
+
return A(b, x);
|
|
787
|
+
} else if (S)
|
|
788
|
+
return g(S, x);
|
|
789
789
|
return !1;
|
|
790
790
|
},
|
|
791
|
-
set: function(x,
|
|
792
|
-
n && x && (typeof x == "object" || typeof x == "function") ? (
|
|
791
|
+
set: function(x, T) {
|
|
792
|
+
n && x && (typeof x == "object" || typeof x == "function") ? (u || (u = new n()), l(u, x, T)) : i ? (b || (b = new i()), w(b, x, T)) : (S || (S = { key: {}, next: null }), f(S, x, T));
|
|
793
793
|
}
|
|
794
794
|
};
|
|
795
795
|
return P;
|
|
796
796
|
}, ir;
|
|
797
797
|
}
|
|
798
|
-
var or,
|
|
798
|
+
var or, Nr;
|
|
799
799
|
function gr() {
|
|
800
|
-
if (
|
|
801
|
-
|
|
800
|
+
if (Nr) return or;
|
|
801
|
+
Nr = 1;
|
|
802
802
|
var e = String.prototype.replace, r = /%20/g, a = {
|
|
803
803
|
RFC1738: "RFC1738",
|
|
804
804
|
RFC3986: "RFC3986"
|
|
@@ -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 g = [], c = 0; c < 256; ++c)
|
|
826
|
+
g.push("%" + ((c < 16 ? "0" : "") + c.toString(16)).toUpperCase());
|
|
827
|
+
return g;
|
|
828
|
+
})(), n = function(c) {
|
|
829
|
+
for (; c.length > 1; ) {
|
|
830
|
+
var u = c.pop(), b = u.obj[u.prop];
|
|
831
|
+
if (a(b)) {
|
|
832
|
+
for (var S = [], P = 0; P < b.length; ++P)
|
|
833
|
+
typeof b[P] < "u" && S.push(b[P]);
|
|
834
|
+
u.obj[u.prop] = S;
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
},
|
|
838
|
-
for (var
|
|
839
|
-
typeof
|
|
840
|
-
return
|
|
841
|
-
}, m = function
|
|
842
|
-
if (!
|
|
843
|
-
return
|
|
844
|
-
if (typeof
|
|
845
|
-
if (a(
|
|
846
|
-
|
|
847
|
-
else if (
|
|
848
|
-
(
|
|
837
|
+
}, i = function(c, u) {
|
|
838
|
+
for (var b = u && u.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, S = 0; S < c.length; ++S)
|
|
839
|
+
typeof c[S] < "u" && (b[S] = c[S]);
|
|
840
|
+
return b;
|
|
841
|
+
}, m = function g(c, u, b) {
|
|
842
|
+
if (!u)
|
|
843
|
+
return c;
|
|
844
|
+
if (typeof u != "object") {
|
|
845
|
+
if (a(c))
|
|
846
|
+
c.push(u);
|
|
847
|
+
else if (c && typeof c == "object")
|
|
848
|
+
(b && (b.plainObjects || b.allowPrototypes) || !r.call(Object.prototype, u)) && (c[u] = !0);
|
|
849
849
|
else
|
|
850
|
-
return [
|
|
851
|
-
return
|
|
850
|
+
return [c, u];
|
|
851
|
+
return c;
|
|
852
852
|
}
|
|
853
|
-
if (!
|
|
854
|
-
return [
|
|
855
|
-
var
|
|
856
|
-
return a(
|
|
857
|
-
if (r.call(
|
|
858
|
-
var
|
|
859
|
-
|
|
853
|
+
if (!c || typeof c != "object")
|
|
854
|
+
return [c].concat(u);
|
|
855
|
+
var S = c;
|
|
856
|
+
return a(c) && !a(u) && (S = i(c, b)), a(c) && a(u) ? (u.forEach(function(P, x) {
|
|
857
|
+
if (r.call(c, x)) {
|
|
858
|
+
var T = c[x];
|
|
859
|
+
T && typeof T == "object" && P && typeof P == "object" ? c[x] = g(T, P, b) : c.push(P);
|
|
860
860
|
} else
|
|
861
|
-
|
|
862
|
-
}),
|
|
863
|
-
var
|
|
864
|
-
return r.call(P, x) ? P[x] =
|
|
865
|
-
},
|
|
866
|
-
}, l = function(
|
|
867
|
-
return Object.keys(
|
|
868
|
-
return
|
|
869
|
-
},
|
|
870
|
-
}, p = function(
|
|
871
|
-
var
|
|
872
|
-
if (
|
|
873
|
-
return
|
|
861
|
+
c[x] = P;
|
|
862
|
+
}), c) : Object.keys(u).reduce(function(P, x) {
|
|
863
|
+
var T = u[x];
|
|
864
|
+
return r.call(P, x) ? P[x] = g(P[x], T, b) : P[x] = T, P;
|
|
865
|
+
}, S);
|
|
866
|
+
}, l = function(c, u) {
|
|
867
|
+
return Object.keys(u).reduce(function(b, S) {
|
|
868
|
+
return b[S] = u[S], b;
|
|
869
|
+
}, c);
|
|
870
|
+
}, p = function(g, c, u) {
|
|
871
|
+
var b = g.replace(/\+/g, " ");
|
|
872
|
+
if (u === "iso-8859-1")
|
|
873
|
+
return b.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
874
874
|
try {
|
|
875
|
-
return decodeURIComponent(
|
|
875
|
+
return decodeURIComponent(b);
|
|
876
876
|
} catch {
|
|
877
|
-
return
|
|
877
|
+
return b;
|
|
878
878
|
}
|
|
879
|
-
}, y = function(
|
|
880
|
-
if (
|
|
881
|
-
return
|
|
882
|
-
var x =
|
|
883
|
-
if (typeof
|
|
879
|
+
}, y = function(c, u, b, S, P) {
|
|
880
|
+
if (c.length === 0)
|
|
881
|
+
return c;
|
|
882
|
+
var x = c;
|
|
883
|
+
if (typeof c == "symbol" ? x = Symbol.prototype.toString.call(c) : typeof c != "string" && (x = String(c)), b === "iso-8859-1")
|
|
884
884
|
return escape(x).replace(/%u[0-9a-f]{4}/gi, function(V) {
|
|
885
885
|
return "%26%23" + parseInt(V.slice(2), 16) + "%3B";
|
|
886
886
|
});
|
|
887
|
-
for (var
|
|
888
|
-
var M = x.charCodeAt(
|
|
887
|
+
for (var T = "", L = 0; L < x.length; ++L) {
|
|
888
|
+
var M = x.charCodeAt(L);
|
|
889
889
|
if (M === 45 || M === 46 || M === 95 || M === 126 || M >= 48 && M <= 57 || M >= 65 && M <= 90 || M >= 97 && M <= 122 || P === e.RFC1738 && (M === 40 || M === 41)) {
|
|
890
|
-
|
|
890
|
+
T += x.charAt(L);
|
|
891
891
|
continue;
|
|
892
892
|
}
|
|
893
893
|
if (M < 128) {
|
|
894
|
-
|
|
894
|
+
T = T + t[M];
|
|
895
895
|
continue;
|
|
896
896
|
}
|
|
897
897
|
if (M < 2048) {
|
|
898
|
-
|
|
898
|
+
T = T + (t[192 | M >> 6] + t[128 | M & 63]);
|
|
899
899
|
continue;
|
|
900
900
|
}
|
|
901
901
|
if (M < 55296 || M >= 57344) {
|
|
902
|
-
|
|
902
|
+
T = T + (t[224 | M >> 12] + t[128 | M >> 6 & 63] + t[128 | M & 63]);
|
|
903
903
|
continue;
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
L += 1, M = 65536 + ((M & 1023) << 10 | x.charCodeAt(L) & 1023), T += t[240 | M >> 18] + t[128 | M >> 12 & 63] + t[128 | M >> 6 & 63] + t[128 | M & 63];
|
|
906
906
|
}
|
|
907
|
-
return
|
|
908
|
-
}, w = function(
|
|
909
|
-
for (var
|
|
910
|
-
for (var P =
|
|
911
|
-
var M =
|
|
912
|
-
typeof V == "object" && V !== null &&
|
|
907
|
+
return T;
|
|
908
|
+
}, w = function(c) {
|
|
909
|
+
for (var u = [{ obj: { o: c }, prop: "o" }], b = [], S = 0; S < u.length; ++S)
|
|
910
|
+
for (var P = u[S], x = P.obj[P.prop], T = Object.keys(x), L = 0; L < T.length; ++L) {
|
|
911
|
+
var M = T[L], V = x[M];
|
|
912
|
+
typeof V == "object" && V !== null && b.indexOf(V) === -1 && (u.push({ obj: x, prop: M }), b.push(V));
|
|
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(u), c;
|
|
915
|
+
}, A = function(c) {
|
|
916
|
+
return Object.prototype.toString.call(c) === "[object RegExp]";
|
|
917
|
+
}, s = function(c) {
|
|
918
|
+
return !c || typeof c != "object" ? !1 : !!(c.constructor && c.constructor.isBuffer && c.constructor.isBuffer(c));
|
|
919
|
+
}, o = function(c, u) {
|
|
920
|
+
return [].concat(c, u);
|
|
921
|
+
}, f = function(c, u) {
|
|
922
|
+
if (a(c)) {
|
|
923
|
+
for (var b = [], S = 0; S < c.length; S += 1)
|
|
924
|
+
b.push(u(c[S]));
|
|
925
|
+
return b;
|
|
926
926
|
}
|
|
927
|
-
return c
|
|
927
|
+
return u(c);
|
|
928
928
|
};
|
|
929
929
|
return sr = {
|
|
930
|
-
arrayToObject:
|
|
930
|
+
arrayToObject: i,
|
|
931
931
|
assign: l,
|
|
932
|
-
combine:
|
|
932
|
+
combine: o,
|
|
933
933
|
compact: w,
|
|
934
934
|
decode: p,
|
|
935
935
|
encode: y,
|
|
936
|
-
isBuffer:
|
|
937
|
-
isRegExp:
|
|
938
|
-
maybeMap:
|
|
936
|
+
isBuffer: s,
|
|
937
|
+
isRegExp: A,
|
|
938
|
+
maybeMap: f,
|
|
939
939
|
merge: m
|
|
940
940
|
}, sr;
|
|
941
941
|
}
|
|
@@ -944,19 +944,19 @@ function ut() {
|
|
|
944
944
|
if (Ur) return ur;
|
|
945
945
|
Ur = 1;
|
|
946
946
|
var e = st(), r = Wr(), a = gr(), t = Object.prototype.hasOwnProperty, n = {
|
|
947
|
-
brackets: function(
|
|
948
|
-
return
|
|
947
|
+
brackets: function(u) {
|
|
948
|
+
return u + "[]";
|
|
949
949
|
},
|
|
950
950
|
comma: "comma",
|
|
951
|
-
indices: function(
|
|
952
|
-
return
|
|
951
|
+
indices: function(u, b) {
|
|
952
|
+
return u + "[" + b + "]";
|
|
953
953
|
},
|
|
954
|
-
repeat: function(
|
|
955
|
-
return
|
|
954
|
+
repeat: function(u) {
|
|
955
|
+
return u;
|
|
956
956
|
}
|
|
957
|
-
},
|
|
958
|
-
l.apply(
|
|
959
|
-
}, y = Date.prototype.toISOString, w = a.default,
|
|
957
|
+
}, i = Array.isArray, m = String.prototype.split, l = Array.prototype.push, p = function(c, u) {
|
|
958
|
+
l.apply(c, i(u) ? u : [u]);
|
|
959
|
+
}, y = Date.prototype.toISOString, w = a.default, A = {
|
|
960
960
|
addQueryPrefix: !1,
|
|
961
961
|
allowDots: !1,
|
|
962
962
|
charset: "utf-8",
|
|
@@ -969,150 +969,150 @@ function ut() {
|
|
|
969
969
|
formatter: a.formatters[w],
|
|
970
970
|
// deprecated
|
|
971
971
|
indices: !1,
|
|
972
|
-
serializeDate: function(
|
|
973
|
-
return y.call(
|
|
972
|
+
serializeDate: function(u) {
|
|
973
|
+
return y.call(u);
|
|
974
974
|
},
|
|
975
975
|
skipNulls: !1,
|
|
976
976
|
strictNullHandling: !1
|
|
977
|
-
},
|
|
978
|
-
return typeof
|
|
979
|
-
},
|
|
980
|
-
for (var _ =
|
|
981
|
-
var X = Z.get(
|
|
977
|
+
}, s = function(u) {
|
|
978
|
+
return typeof u == "string" || typeof u == "number" || typeof u == "boolean" || typeof u == "symbol" || typeof u == "bigint";
|
|
979
|
+
}, o = {}, f = function c(u, b, S, P, x, T, L, M, V, $, N, F, I, k, U, z) {
|
|
980
|
+
for (var _ = u, Z = z, Q = 0, ne = !1; (Z = Z.get(o)) !== void 0 && !ne; ) {
|
|
981
|
+
var X = Z.get(u);
|
|
982
982
|
if (Q += 1, typeof X < "u") {
|
|
983
983
|
if (X === Q)
|
|
984
984
|
throw new RangeError("Cyclic object value");
|
|
985
985
|
ne = !0;
|
|
986
986
|
}
|
|
987
|
-
typeof Z.get(
|
|
987
|
+
typeof Z.get(o) > "u" && (Q = 0);
|
|
988
988
|
}
|
|
989
|
-
if (typeof M == "function" ? _ = M(
|
|
990
|
-
return ee instanceof Date ?
|
|
989
|
+
if (typeof M == "function" ? _ = M(b, _) : _ instanceof Date ? _ = N(_) : S === "comma" && i(_) && (_ = r.maybeMap(_, function(ee) {
|
|
990
|
+
return ee instanceof Date ? N(ee) : ee;
|
|
991
991
|
})), _ === null) {
|
|
992
992
|
if (x)
|
|
993
|
-
return
|
|
993
|
+
return L && !k ? L(b, A.encoder, U, "key", F) : b;
|
|
994
994
|
_ = "";
|
|
995
995
|
}
|
|
996
|
-
if (
|
|
997
|
-
if (
|
|
998
|
-
var W =
|
|
999
|
-
if (
|
|
996
|
+
if (s(_) || r.isBuffer(_)) {
|
|
997
|
+
if (L) {
|
|
998
|
+
var W = k ? b : L(b, A.encoder, U, "key", F);
|
|
999
|
+
if (S === "comma" && k) {
|
|
1000
1000
|
for (var ie = m.call(String(_), ","), re = "", te = 0; te < ie.length; ++te)
|
|
1001
|
-
re += (te === 0 ? "" : ",") +
|
|
1002
|
-
return [
|
|
1001
|
+
re += (te === 0 ? "" : ",") + I(L(ie[te], A.encoder, U, "value", F));
|
|
1002
|
+
return [I(W) + (P && i(_) && ie.length === 1 ? "[]" : "") + "=" + re];
|
|
1003
1003
|
}
|
|
1004
|
-
return [
|
|
1004
|
+
return [I(W) + "=" + I(L(_, A.encoder, U, "value", F))];
|
|
1005
1005
|
}
|
|
1006
|
-
return [
|
|
1006
|
+
return [I(b) + "=" + I(String(_))];
|
|
1007
1007
|
}
|
|
1008
1008
|
var ce = [];
|
|
1009
1009
|
if (typeof _ > "u")
|
|
1010
1010
|
return ce;
|
|
1011
1011
|
var ue;
|
|
1012
|
-
if (
|
|
1012
|
+
if (S === "comma" && i(_))
|
|
1013
1013
|
ue = [{ value: _.length > 0 ? _.join(",") || null : void 0 }];
|
|
1014
|
-
else if (
|
|
1014
|
+
else if (i(M))
|
|
1015
1015
|
ue = M;
|
|
1016
1016
|
else {
|
|
1017
1017
|
var oe = Object.keys(_);
|
|
1018
1018
|
ue = V ? oe.sort(V) : oe;
|
|
1019
1019
|
}
|
|
1020
|
-
for (var de = P &&
|
|
1020
|
+
for (var de = P && i(_) && _.length === 1 ? b + "[]" : b, pe = 0; pe < ue.length; ++pe) {
|
|
1021
1021
|
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : _[se];
|
|
1022
|
-
if (!(
|
|
1023
|
-
var Se =
|
|
1024
|
-
z.set(
|
|
1022
|
+
if (!(T && ye === null)) {
|
|
1023
|
+
var Se = i(_) ? typeof S == "function" ? S(de, se) : de : de + ($ ? "." + se : "[" + se + "]");
|
|
1024
|
+
z.set(u, Q);
|
|
1025
1025
|
var J = e();
|
|
1026
|
-
J.set(
|
|
1026
|
+
J.set(o, z), p(ce, c(
|
|
1027
1027
|
ye,
|
|
1028
1028
|
Se,
|
|
1029
|
-
|
|
1029
|
+
S,
|
|
1030
1030
|
P,
|
|
1031
1031
|
x,
|
|
1032
|
-
|
|
1033
|
-
|
|
1032
|
+
T,
|
|
1033
|
+
L,
|
|
1034
1034
|
M,
|
|
1035
1035
|
V,
|
|
1036
1036
|
$,
|
|
1037
|
-
|
|
1037
|
+
N,
|
|
1038
1038
|
F,
|
|
1039
|
-
|
|
1040
|
-
|
|
1039
|
+
I,
|
|
1040
|
+
k,
|
|
1041
1041
|
U,
|
|
1042
1042
|
J
|
|
1043
1043
|
));
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
return ce;
|
|
1047
|
-
},
|
|
1048
|
-
if (!
|
|
1049
|
-
return
|
|
1050
|
-
if (
|
|
1047
|
+
}, g = function(u) {
|
|
1048
|
+
if (!u)
|
|
1049
|
+
return A;
|
|
1050
|
+
if (u.encoder !== null && typeof u.encoder < "u" && typeof u.encoder != "function")
|
|
1051
1051
|
throw new TypeError("Encoder has to be a function.");
|
|
1052
|
-
var
|
|
1053
|
-
if (typeof
|
|
1052
|
+
var b = u.charset || A.charset;
|
|
1053
|
+
if (typeof u.charset < "u" && u.charset !== "utf-8" && u.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 S = a.default;
|
|
1056
|
+
if (typeof u.format < "u") {
|
|
1057
|
+
if (!t.call(a.formatters, u.format))
|
|
1058
1058
|
throw new TypeError("Unknown format option provided.");
|
|
1059
|
-
|
|
1059
|
+
S = u.format;
|
|
1060
1060
|
}
|
|
1061
|
-
var P = a.formatters[
|
|
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
|
|
1061
|
+
var P = a.formatters[S], x = A.filter;
|
|
1062
|
+
return (typeof u.filter == "function" || i(u.filter)) && (x = u.filter), {
|
|
1063
|
+
addQueryPrefix: typeof u.addQueryPrefix == "boolean" ? u.addQueryPrefix : A.addQueryPrefix,
|
|
1064
|
+
allowDots: typeof u.allowDots > "u" ? A.allowDots : !!u.allowDots,
|
|
1065
|
+
charset: b,
|
|
1066
|
+
charsetSentinel: typeof u.charsetSentinel == "boolean" ? u.charsetSentinel : A.charsetSentinel,
|
|
1067
|
+
delimiter: typeof u.delimiter > "u" ? A.delimiter : u.delimiter,
|
|
1068
|
+
encode: typeof u.encode == "boolean" ? u.encode : A.encode,
|
|
1069
|
+
encoder: typeof u.encoder == "function" ? u.encoder : A.encoder,
|
|
1070
|
+
encodeValuesOnly: typeof u.encodeValuesOnly == "boolean" ? u.encodeValuesOnly : A.encodeValuesOnly,
|
|
1071
1071
|
filter: x,
|
|
1072
|
-
format:
|
|
1072
|
+
format: S,
|
|
1073
1073
|
formatter: P,
|
|
1074
|
-
serializeDate: typeof
|
|
1075
|
-
skipNulls: typeof
|
|
1076
|
-
sort: typeof
|
|
1077
|
-
strictNullHandling: typeof
|
|
1074
|
+
serializeDate: typeof u.serializeDate == "function" ? u.serializeDate : A.serializeDate,
|
|
1075
|
+
skipNulls: typeof u.skipNulls == "boolean" ? u.skipNulls : A.skipNulls,
|
|
1076
|
+
sort: typeof u.sort == "function" ? u.sort : null,
|
|
1077
|
+
strictNullHandling: typeof u.strictNullHandling == "boolean" ? u.strictNullHandling : A.strictNullHandling
|
|
1078
1078
|
};
|
|
1079
1079
|
};
|
|
1080
|
-
return ur = function(
|
|
1081
|
-
var
|
|
1082
|
-
typeof
|
|
1083
|
-
var
|
|
1084
|
-
if (typeof
|
|
1080
|
+
return ur = function(c, u) {
|
|
1081
|
+
var b = c, S = g(u), P, x;
|
|
1082
|
+
typeof S.filter == "function" ? (x = S.filter, b = x("", b)) : i(S.filter) && (x = S.filter, P = x);
|
|
1083
|
+
var T = [];
|
|
1084
|
+
if (typeof b != "object" || b === null)
|
|
1085
1085
|
return "";
|
|
1086
|
-
var
|
|
1087
|
-
|
|
1088
|
-
var M = n[
|
|
1089
|
-
if (
|
|
1086
|
+
var L;
|
|
1087
|
+
u && u.arrayFormat in n ? L = u.arrayFormat : u && "indices" in u ? L = u.indices ? "indices" : "repeat" : L = "indices";
|
|
1088
|
+
var M = n[L];
|
|
1089
|
+
if (u && "commaRoundTrip" in u && typeof u.commaRoundTrip != "boolean")
|
|
1090
1090
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
1091
|
-
var V = M === "comma" &&
|
|
1092
|
-
P || (P = Object.keys(
|
|
1093
|
-
for (var $ = e(),
|
|
1094
|
-
var F = P[
|
|
1095
|
-
|
|
1096
|
-
|
|
1091
|
+
var V = M === "comma" && u && u.commaRoundTrip;
|
|
1092
|
+
P || (P = Object.keys(b)), S.sort && P.sort(S.sort);
|
|
1093
|
+
for (var $ = e(), N = 0; N < P.length; ++N) {
|
|
1094
|
+
var F = P[N];
|
|
1095
|
+
S.skipNulls && b[F] === null || p(T, f(
|
|
1096
|
+
b[F],
|
|
1097
1097
|
F,
|
|
1098
1098
|
M,
|
|
1099
1099
|
V,
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1100
|
+
S.strictNullHandling,
|
|
1101
|
+
S.skipNulls,
|
|
1102
|
+
S.encode ? S.encoder : null,
|
|
1103
|
+
S.filter,
|
|
1104
|
+
S.sort,
|
|
1105
|
+
S.allowDots,
|
|
1106
|
+
S.serializeDate,
|
|
1107
|
+
S.format,
|
|
1108
|
+
S.formatter,
|
|
1109
|
+
S.encodeValuesOnly,
|
|
1110
|
+
S.charset,
|
|
1111
1111
|
$
|
|
1112
1112
|
));
|
|
1113
1113
|
}
|
|
1114
|
-
var
|
|
1115
|
-
return
|
|
1114
|
+
var I = T.join(S.delimiter), k = S.addQueryPrefix === !0 ? "?" : "";
|
|
1115
|
+
return S.charsetSentinel && (S.charset === "iso-8859-1" ? k += "utf8=%26%2310003%3B&" : k += "utf8=%E2%9C%93&"), I.length > 0 ? k + I : "";
|
|
1116
1116
|
}, ur;
|
|
1117
1117
|
}
|
|
1118
1118
|
var cr, $r;
|
|
@@ -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(s) {
|
|
1140
|
+
return s.replace(/&#(\d+);/g, function(o, f) {
|
|
1141
|
+
return String.fromCharCode(parseInt(f, 10));
|
|
1142
1142
|
});
|
|
1143
|
-
},
|
|
1144
|
-
return
|
|
1145
|
-
}, m = "utf8=%26%2310003%3B", l = "utf8=%E2%9C%93", p = function(
|
|
1146
|
-
var
|
|
1147
|
-
if (
|
|
1148
|
-
for (P = 0; P <
|
|
1149
|
-
|
|
1150
|
-
for (P = 0; P <
|
|
1151
|
-
if (P !==
|
|
1152
|
-
var
|
|
1153
|
-
M === -1 ? (V =
|
|
1154
|
-
|
|
1155
|
-
function(
|
|
1156
|
-
return
|
|
1143
|
+
}, i = function(s, o) {
|
|
1144
|
+
return s && typeof s == "string" && o.comma && s.indexOf(",") > -1 ? s.split(",") : s;
|
|
1145
|
+
}, m = "utf8=%26%2310003%3B", l = "utf8=%E2%9C%93", p = function(o, f) {
|
|
1146
|
+
var g = {}, c = f.ignoreQueryPrefix ? o.replace(/^\?/, "") : o, u = f.parameterLimit === 1 / 0 ? void 0 : f.parameterLimit, b = c.split(f.delimiter, u), S = -1, P, x = f.charset;
|
|
1147
|
+
if (f.charsetSentinel)
|
|
1148
|
+
for (P = 0; P < b.length; ++P)
|
|
1149
|
+
b[P].indexOf("utf8=") === 0 && (b[P] === l ? x = "utf-8" : b[P] === m && (x = "iso-8859-1"), S = P, P = b.length);
|
|
1150
|
+
for (P = 0; P < b.length; ++P)
|
|
1151
|
+
if (P !== S) {
|
|
1152
|
+
var T = b[P], L = T.indexOf("]="), M = L === -1 ? T.indexOf("=") : L + 1, V, $;
|
|
1153
|
+
M === -1 ? (V = f.decoder(T, t.decoder, x, "key"), $ = f.strictNullHandling ? null : "") : (V = f.decoder(T.slice(0, M), t.decoder, x, "key"), $ = e.maybeMap(
|
|
1154
|
+
i(T.slice(M + 1), f),
|
|
1155
|
+
function(N) {
|
|
1156
|
+
return f.decoder(N, t.decoder, x, "value");
|
|
1157
1157
|
}
|
|
1158
|
-
)), $ &&
|
|
1158
|
+
)), $ && f.interpretNumericEntities && x === "iso-8859-1" && ($ = n($)), T.indexOf("[]=") > -1 && ($ = a($) ? [$] : $), r.call(g, V) ? g[V] = e.combine(g[V], $) : g[V] = $;
|
|
1159
1159
|
}
|
|
1160
|
-
return
|
|
1161
|
-
}, y = function(
|
|
1162
|
-
for (var
|
|
1163
|
-
var
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1160
|
+
return g;
|
|
1161
|
+
}, y = function(s, o, f, g) {
|
|
1162
|
+
for (var c = g ? o : i(o, f), u = s.length - 1; u >= 0; --u) {
|
|
1163
|
+
var b, S = s[u];
|
|
1164
|
+
if (S === "[]" && f.parseArrays)
|
|
1165
|
+
b = [].concat(c);
|
|
1166
1166
|
else {
|
|
1167
|
-
|
|
1168
|
-
var P =
|
|
1169
|
-
!
|
|
1167
|
+
b = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1168
|
+
var P = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, x = parseInt(P, 10);
|
|
1169
|
+
!f.parseArrays && P === "" ? b = { 0: c } : !isNaN(x) && S !== P && String(x) === P && x >= 0 && f.parseArrays && x <= f.arrayLimit ? (b = [], b[x] = c) : P !== "__proto__" && (b[P] = c);
|
|
1170
1170
|
}
|
|
1171
|
-
|
|
1171
|
+
c = b;
|
|
1172
1172
|
}
|
|
1173
|
-
return
|
|
1174
|
-
}, w = function(
|
|
1175
|
-
if (
|
|
1176
|
-
var
|
|
1173
|
+
return c;
|
|
1174
|
+
}, w = function(o, f, g, c) {
|
|
1175
|
+
if (o) {
|
|
1176
|
+
var u = g.allowDots ? o.replace(/\.([^.[]+)/g, "[$1]") : o, b = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, P = g.depth > 0 && b.exec(u), x = P ? u.slice(0, P.index) : u, T = [];
|
|
1177
1177
|
if (x) {
|
|
1178
|
-
if (!
|
|
1178
|
+
if (!g.plainObjects && r.call(Object.prototype, x) && !g.allowPrototypes)
|
|
1179
1179
|
return;
|
|
1180
|
-
|
|
1180
|
+
T.push(x);
|
|
1181
1181
|
}
|
|
1182
|
-
for (var
|
|
1183
|
-
if (
|
|
1182
|
+
for (var L = 0; g.depth > 0 && (P = S.exec(u)) !== null && L < g.depth; ) {
|
|
1183
|
+
if (L += 1, !g.plainObjects && r.call(Object.prototype, P[1].slice(1, -1)) && !g.allowPrototypes)
|
|
1184
1184
|
return;
|
|
1185
|
-
|
|
1185
|
+
T.push(P[1]);
|
|
1186
1186
|
}
|
|
1187
|
-
return P &&
|
|
1187
|
+
return P && T.push("[" + u.slice(P.index) + "]"), y(T, f, g, c);
|
|
1188
1188
|
}
|
|
1189
|
-
},
|
|
1190
|
-
if (!
|
|
1189
|
+
}, A = function(o) {
|
|
1190
|
+
if (!o)
|
|
1191
1191
|
return t;
|
|
1192
|
-
if (
|
|
1192
|
+
if (o.decoder !== null && o.decoder !== void 0 && typeof o.decoder != "function")
|
|
1193
1193
|
throw new TypeError("Decoder has to be a function.");
|
|
1194
|
-
if (typeof
|
|
1194
|
+
if (typeof o.charset < "u" && o.charset !== "utf-8" && o.charset !== "iso-8859-1")
|
|
1195
1195
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
1196
|
-
var
|
|
1196
|
+
var f = typeof o.charset > "u" ? t.charset : o.charset;
|
|
1197
1197
|
return {
|
|
1198
|
-
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 o.allowDots > "u" ? t.allowDots : !!o.allowDots,
|
|
1199
|
+
allowPrototypes: typeof o.allowPrototypes == "boolean" ? o.allowPrototypes : t.allowPrototypes,
|
|
1200
|
+
allowSparse: typeof o.allowSparse == "boolean" ? o.allowSparse : t.allowSparse,
|
|
1201
|
+
arrayLimit: typeof o.arrayLimit == "number" ? o.arrayLimit : t.arrayLimit,
|
|
1202
|
+
charset: f,
|
|
1203
|
+
charsetSentinel: typeof o.charsetSentinel == "boolean" ? o.charsetSentinel : t.charsetSentinel,
|
|
1204
|
+
comma: typeof o.comma == "boolean" ? o.comma : t.comma,
|
|
1205
|
+
decoder: typeof o.decoder == "function" ? o.decoder : t.decoder,
|
|
1206
|
+
delimiter: typeof o.delimiter == "string" || e.isRegExp(o.delimiter) ? o.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 o.depth == "number" || o.depth === !1 ? +o.depth : t.depth,
|
|
1209
|
+
ignoreQueryPrefix: o.ignoreQueryPrefix === !0,
|
|
1210
|
+
interpretNumericEntities: typeof o.interpretNumericEntities == "boolean" ? o.interpretNumericEntities : t.interpretNumericEntities,
|
|
1211
|
+
parameterLimit: typeof o.parameterLimit == "number" ? o.parameterLimit : t.parameterLimit,
|
|
1212
|
+
parseArrays: o.parseArrays !== !1,
|
|
1213
|
+
plainObjects: typeof o.plainObjects == "boolean" ? o.plainObjects : t.plainObjects,
|
|
1214
|
+
strictNullHandling: typeof o.strictNullHandling == "boolean" ? o.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(s, o) {
|
|
1218
|
+
var f = A(o);
|
|
1219
|
+
if (s === "" || s === null || typeof s > "u")
|
|
1220
|
+
return f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
1221
|
+
for (var g = typeof s == "string" ? p(s, f) : s, c = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, u = Object.keys(g), b = 0; b < u.length; ++b) {
|
|
1222
|
+
var S = u[b], P = w(S, g[S], f, typeof s == "string");
|
|
1223
|
+
c = e.merge(c, P, f);
|
|
1224
1224
|
}
|
|
1225
|
-
return
|
|
1225
|
+
return f.allowSparse === !0 ? c : e.compact(c);
|
|
1226
1226
|
}, cr;
|
|
1227
1227
|
}
|
|
1228
1228
|
var lr, Br;
|
|
@@ -1257,8 +1257,8 @@ var mt = function(e) {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
const n = {}, m = l(function(p) {
|
|
1259
1259
|
var y = t(p);
|
|
1260
|
-
return n[y] || (n[y] = new Promise(function(w,
|
|
1261
|
-
var
|
|
1260
|
+
return n[y] || (n[y] = new Promise(function(w, A) {
|
|
1261
|
+
var s, o;
|
|
1262
1262
|
switch (String(p.method).toLowerCase()) {
|
|
1263
1263
|
case "post":
|
|
1264
1264
|
case "patch":
|
|
@@ -1267,82 +1267,82 @@ var mt = function(e) {
|
|
|
1267
1267
|
p.cache || (p.cache = !1);
|
|
1268
1268
|
break;
|
|
1269
1269
|
}
|
|
1270
|
-
return p.cache === !1 || (
|
|
1271
|
-
function(
|
|
1272
|
-
delete n[y], w(
|
|
1270
|
+
return p.cache === !1 || (s = p.cache || r, s && (o = s.get(y))), o ? w(o) : (Object.assign(p, { adapter: a }), Ae.request(p).then(
|
|
1271
|
+
function(f) {
|
|
1272
|
+
delete n[y], w(f);
|
|
1273
1273
|
},
|
|
1274
|
-
function(
|
|
1275
|
-
delete n[y],
|
|
1274
|
+
function(f) {
|
|
1275
|
+
delete n[y], A(f);
|
|
1276
1276
|
}
|
|
1277
1277
|
));
|
|
1278
1278
|
})), n[y];
|
|
1279
1279
|
});
|
|
1280
1280
|
m.generateEndpointURL = function(p, y, w) {
|
|
1281
1281
|
w = w || {}, y = y || {};
|
|
1282
|
-
var
|
|
1283
|
-
const
|
|
1284
|
-
w.withoutToken || (delete y.access_token,
|
|
1285
|
-
var
|
|
1286
|
-
|
|
1287
|
-
var
|
|
1288
|
-
return
|
|
1282
|
+
var A;
|
|
1283
|
+
const s = w.file && e.fileAPI || e.apiURL;
|
|
1284
|
+
w.withoutToken || (delete y.access_token, A = e.auth.getCurrentToken()), p[0] == "/" && p.slice(1);
|
|
1285
|
+
var o = e.utils.mapParameters(y);
|
|
1286
|
+
A ? o = o ? `?access_token=${A}&${o}` : `?access_token=${A}` : o = o ? `?${o}` : "";
|
|
1287
|
+
var f = `${s}${p}${o}`;
|
|
1288
|
+
return f;
|
|
1289
1289
|
}, m.wasCancelled = function(p) {
|
|
1290
1290
|
return Ae.isCancel(p);
|
|
1291
1291
|
};
|
|
1292
1292
|
function l(p) {
|
|
1293
1293
|
var y = Ae.create({
|
|
1294
1294
|
paramsSerializer: {
|
|
1295
|
-
serialize: (
|
|
1295
|
+
serialize: (A) => dt.stringify(A, { arrayFormat: "repeat" })
|
|
1296
1296
|
},
|
|
1297
1297
|
adapter: p
|
|
1298
1298
|
});
|
|
1299
|
-
y.defaults.baseURL = e.apiURL, y.defaults.headers.common.Accept = "application/json", y.interceptors.request.use(function(
|
|
1300
|
-
if (t(
|
|
1301
|
-
return
|
|
1302
|
-
if (
|
|
1303
|
-
const
|
|
1304
|
-
|
|
1299
|
+
y.defaults.baseURL = e.apiURL, y.defaults.headers.common.Accept = "application/json", y.interceptors.request.use(function(A) {
|
|
1300
|
+
if (t(A), A.withoutToken)
|
|
1301
|
+
return A;
|
|
1302
|
+
if (A.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
|
|
1303
|
+
const o = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1304
|
+
o && (A.headers["qik-request-timezone"] = o);
|
|
1305
1305
|
}
|
|
1306
|
-
|
|
1307
|
-
var
|
|
1308
|
-
return
|
|
1306
|
+
A.headers["qik-api-version"] = vr, e?.socket?.windowID && (A.headers["qik-socket-window"] = e.socket.windowID);
|
|
1307
|
+
var s = e.auth.getCurrentToken();
|
|
1308
|
+
return s && (A.headers.Authorization = `Bearer ${s}`, A.params && A.params.access_token && delete A.params.access_token), A;
|
|
1309
1309
|
});
|
|
1310
1310
|
let w = 0;
|
|
1311
1311
|
return y.interceptors.response.use(
|
|
1312
|
-
function(
|
|
1313
|
-
var
|
|
1314
|
-
switch (
|
|
1312
|
+
function(A) {
|
|
1313
|
+
var s = A.config, o = A.status;
|
|
1314
|
+
switch (o) {
|
|
1315
1315
|
case 204:
|
|
1316
1316
|
if (w < 5)
|
|
1317
|
-
return w++, new Promise(function(
|
|
1317
|
+
return w++, new Promise(function(f, g) {
|
|
1318
1318
|
setTimeout(function() {
|
|
1319
|
-
return y.request(
|
|
1319
|
+
return y.request(s).then(f, g);
|
|
1320
1320
|
}, 800);
|
|
1321
1321
|
});
|
|
1322
1322
|
console.log("Failed after 5 retries"), w = 0;
|
|
1323
1323
|
break;
|
|
1324
1324
|
}
|
|
1325
|
-
return
|
|
1325
|
+
return A;
|
|
1326
1326
|
},
|
|
1327
|
-
function(
|
|
1328
|
-
if (Ae.isCancel(
|
|
1329
|
-
return Promise.reject(
|
|
1330
|
-
var
|
|
1331
|
-
switch (
|
|
1327
|
+
function(A) {
|
|
1328
|
+
if (Ae.isCancel(A))
|
|
1329
|
+
return Promise.reject(A);
|
|
1330
|
+
var s = A?.response?.status || A.status;
|
|
1331
|
+
switch (s) {
|
|
1332
1332
|
case 401:
|
|
1333
1333
|
break;
|
|
1334
1334
|
case 502:
|
|
1335
1335
|
case 504:
|
|
1336
1336
|
if (w < 5)
|
|
1337
|
-
return w++, new Promise(function(
|
|
1337
|
+
return w++, new Promise(function(o, f) {
|
|
1338
1338
|
setTimeout(function() {
|
|
1339
|
-
return y.request(
|
|
1339
|
+
return y.request(A.config).then(o, f);
|
|
1340
1340
|
}, 800);
|
|
1341
1341
|
});
|
|
1342
1342
|
console.log("Failed after 5 retries"), w = 0;
|
|
1343
1343
|
break;
|
|
1344
1344
|
}
|
|
1345
|
-
return Promise.reject(
|
|
1345
|
+
return Promise.reject(A);
|
|
1346
1346
|
}
|
|
1347
1347
|
), y;
|
|
1348
1348
|
}
|
|
@@ -1351,11 +1351,11 @@ var mt = function(e) {
|
|
|
1351
1351
|
function yt() {
|
|
1352
1352
|
if (Gr) return fr;
|
|
1353
1353
|
Gr = 1;
|
|
1354
|
-
var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]", n = "[object Symbol]",
|
|
1355
|
-
function
|
|
1354
|
+
var e = "Expected a function", r = "__lodash_hash_undefined__", a = "[object Function]", t = "[object GeneratorFunction]", n = "[object Symbol]", i = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, m = /^\w*$/, l = /^\./, p = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, y = /[\\^$.*+?()[\]{}|]/g, w = /\\(\\)?/g, A = /^\[object .+?Constructor\]$/, s = typeof be == "object" && be && be.Object === Object && be, o = typeof self == "object" && self && self.Object === Object && self, f = s || o || Function("return this")();
|
|
1355
|
+
function g(d, E) {
|
|
1356
1356
|
return d?.[E];
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1358
|
+
function c(d) {
|
|
1359
1359
|
var E = !1;
|
|
1360
1360
|
if (d != null && typeof d.toString != "function")
|
|
1361
1361
|
try {
|
|
@@ -1364,12 +1364,12 @@ function yt() {
|
|
|
1364
1364
|
}
|
|
1365
1365
|
return E;
|
|
1366
1366
|
}
|
|
1367
|
-
var
|
|
1367
|
+
var u = Array.prototype, b = Function.prototype, S = Object.prototype, P = f["__core-js_shared__"], x = (function() {
|
|
1368
1368
|
var d = /[^.]+$/.exec(P && P.keys && P.keys.IE_PROTO || "");
|
|
1369
1369
|
return d ? "Symbol(src)_1." + d : "";
|
|
1370
|
-
})(),
|
|
1371
|
-
"^" +
|
|
1372
|
-
), $ =
|
|
1370
|
+
})(), T = b.toString, L = S.hasOwnProperty, M = S.toString, V = RegExp(
|
|
1371
|
+
"^" + T.call(L).replace(y, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1372
|
+
), $ = f.Symbol, N = u.splice, F = Pe(f, "Map"), I = Pe(Object, "create"), k = $ ? $.prototype : void 0, U = k ? k.toString : void 0;
|
|
1373
1373
|
function z(d) {
|
|
1374
1374
|
var E = -1, C = d ? d.length : 0;
|
|
1375
1375
|
for (this.clear(); ++E < C; ) {
|
|
@@ -1378,26 +1378,26 @@ function yt() {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
1380
|
function _() {
|
|
1381
|
-
this.__data__ =
|
|
1381
|
+
this.__data__ = I ? I(null) : {};
|
|
1382
1382
|
}
|
|
1383
1383
|
function Z(d) {
|
|
1384
1384
|
return this.has(d) && delete this.__data__[d];
|
|
1385
1385
|
}
|
|
1386
1386
|
function Q(d) {
|
|
1387
1387
|
var E = this.__data__;
|
|
1388
|
-
if (
|
|
1388
|
+
if (I) {
|
|
1389
1389
|
var C = E[d];
|
|
1390
1390
|
return C === r ? void 0 : C;
|
|
1391
1391
|
}
|
|
1392
|
-
return
|
|
1392
|
+
return L.call(E, d) ? E[d] : void 0;
|
|
1393
1393
|
}
|
|
1394
1394
|
function ne(d) {
|
|
1395
1395
|
var E = this.__data__;
|
|
1396
|
-
return
|
|
1396
|
+
return I ? E[d] !== void 0 : L.call(E, d);
|
|
1397
1397
|
}
|
|
1398
1398
|
function X(d, E) {
|
|
1399
1399
|
var C = this.__data__;
|
|
1400
|
-
return C[d] =
|
|
1400
|
+
return C[d] = I && E === void 0 ? r : E, this;
|
|
1401
1401
|
}
|
|
1402
1402
|
z.prototype.clear = _, z.prototype.delete = Z, z.prototype.get = Q, z.prototype.has = ne, z.prototype.set = X;
|
|
1403
1403
|
function W(d) {
|
|
@@ -1415,7 +1415,7 @@ function yt() {
|
|
|
1415
1415
|
if (C < 0)
|
|
1416
1416
|
return !1;
|
|
1417
1417
|
var G = E.length - 1;
|
|
1418
|
-
return C == G ? E.pop() :
|
|
1418
|
+
return C == G ? E.pop() : N.call(E, C, 1), !0;
|
|
1419
1419
|
}
|
|
1420
1420
|
function te(d) {
|
|
1421
1421
|
var E = this.__data__, C = J(E, d);
|
|
@@ -1463,15 +1463,15 @@ function yt() {
|
|
|
1463
1463
|
return -1;
|
|
1464
1464
|
}
|
|
1465
1465
|
function ee(d, E) {
|
|
1466
|
-
E =
|
|
1466
|
+
E = Ie(E, d) ? [E] : Te(E);
|
|
1467
1467
|
for (var C = 0, G = E.length; d != null && C < G; )
|
|
1468
|
-
d = d[
|
|
1468
|
+
d = d[Le(E[C++])];
|
|
1469
1469
|
return C && C == G ? d : void 0;
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function Re(d) {
|
|
1472
1472
|
if (!he(d) || _e(d))
|
|
1473
1473
|
return !1;
|
|
1474
|
-
var E =
|
|
1474
|
+
var E = Ne(d) || c(d) ? V : A;
|
|
1475
1475
|
return E.test(le(d));
|
|
1476
1476
|
}
|
|
1477
1477
|
function xe(d) {
|
|
@@ -1482,24 +1482,24 @@ function yt() {
|
|
|
1482
1482
|
var E = d + "";
|
|
1483
1483
|
return E == "0" && 1 / d == -1 / 0 ? "-0" : E;
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1485
|
+
function Te(d) {
|
|
1486
1486
|
return Oe(d) ? d : Ce(d);
|
|
1487
1487
|
}
|
|
1488
1488
|
function me(d, E) {
|
|
1489
1489
|
var C = d.__data__;
|
|
1490
|
-
return
|
|
1490
|
+
return ke(E) ? C[typeof E == "string" ? "string" : "hash"] : C.map;
|
|
1491
1491
|
}
|
|
1492
1492
|
function Pe(d, E) {
|
|
1493
|
-
var C =
|
|
1494
|
-
return
|
|
1493
|
+
var C = g(d, E);
|
|
1494
|
+
return Re(C) ? C : void 0;
|
|
1495
1495
|
}
|
|
1496
|
-
function
|
|
1496
|
+
function Ie(d, E) {
|
|
1497
1497
|
if (Oe(d))
|
|
1498
1498
|
return !1;
|
|
1499
1499
|
var C = typeof d;
|
|
1500
|
-
return C == "number" || C == "symbol" || C == "boolean" || d == null || h(d) ? !0 : m.test(d) || !
|
|
1500
|
+
return C == "number" || C == "symbol" || C == "boolean" || d == null || h(d) ? !0 : m.test(d) || !i.test(d) || E != null && d in Object(E);
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function ke(d) {
|
|
1503
1503
|
var E = typeof d;
|
|
1504
1504
|
return E == "string" || E == "number" || E == "symbol" || E == "boolean" ? d !== "__proto__" : d === null;
|
|
1505
1505
|
}
|
|
@@ -1507,13 +1507,13 @@ function yt() {
|
|
|
1507
1507
|
return !!x && x in d;
|
|
1508
1508
|
}
|
|
1509
1509
|
var Ce = fe(function(d) {
|
|
1510
|
-
d =
|
|
1510
|
+
d = v(d);
|
|
1511
1511
|
var E = [];
|
|
1512
1512
|
return l.test(d) && E.push(""), d.replace(p, function(C, G, ae, K) {
|
|
1513
1513
|
E.push(ae ? K.replace(w, "$1") : G || C);
|
|
1514
1514
|
}), E;
|
|
1515
1515
|
});
|
|
1516
|
-
function
|
|
1516
|
+
function Le(d) {
|
|
1517
1517
|
if (typeof d == "string" || h(d))
|
|
1518
1518
|
return d;
|
|
1519
1519
|
var E = d + "";
|
|
@@ -1522,7 +1522,7 @@ function yt() {
|
|
|
1522
1522
|
function le(d) {
|
|
1523
1523
|
if (d != null) {
|
|
1524
1524
|
try {
|
|
1525
|
-
return
|
|
1525
|
+
return T.call(d);
|
|
1526
1526
|
} catch {
|
|
1527
1527
|
}
|
|
1528
1528
|
try {
|
|
@@ -1549,7 +1549,7 @@ function yt() {
|
|
|
1549
1549
|
return d === E || d !== d && E !== E;
|
|
1550
1550
|
}
|
|
1551
1551
|
var Oe = Array.isArray;
|
|
1552
|
-
function
|
|
1552
|
+
function Ne(d) {
|
|
1553
1553
|
var E = he(d) ? M.call(d) : "";
|
|
1554
1554
|
return E == a || E == t;
|
|
1555
1555
|
}
|
|
@@ -1563,7 +1563,7 @@ function yt() {
|
|
|
1563
1563
|
function h(d) {
|
|
1564
1564
|
return typeof d == "symbol" || ge(d) && M.call(d) == n;
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function v(d) {
|
|
1567
1567
|
return d == null ? "" : xe(d);
|
|
1568
1568
|
}
|
|
1569
1569
|
function D(d, E, C) {
|
|
@@ -1578,14 +1578,14 @@ var dr, Dr;
|
|
|
1578
1578
|
function gt() {
|
|
1579
1579
|
if (Dr) return dr;
|
|
1580
1580
|
Dr = 1;
|
|
1581
|
-
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",
|
|
1582
|
-
F + "?" + x + "+" + z + "(?=" + [
|
|
1583
|
-
U + "+" + _ + "(?=" + [
|
|
1584
|
-
F + "?" +
|
|
1581
|
+
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", i = "\\u20d0-\\u20f0", m = "\\u2700-\\u27bf", l = "a-z\\xdf-\\xf6\\xf8-\\xff", p = "\\xac\\xb1\\xd7\\xf7", y = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", w = "\\u2000-\\u206f", A = " \\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", s = "A-Z\\xc0-\\xd6\\xd8-\\xde", o = "\\ufe0e\\ufe0f", f = p + y + w + A, g = "['’]", c = "[" + t + "]", u = "[" + f + "]", b = "[" + n + i + "]", S = "\\d+", P = "[" + m + "]", x = "[" + l + "]", T = "[^" + t + f + S + m + l + s + "]", L = "\\ud83c[\\udffb-\\udfff]", M = "(?:" + b + "|" + L + ")", V = "[^" + t + "]", $ = "(?:\\ud83c[\\udde6-\\uddff]){2}", N = "[\\ud800-\\udbff][\\udc00-\\udfff]", F = "[" + s + "]", I = "\\u200d", k = "(?:" + x + "|" + T + ")", U = "(?:" + F + "|" + T + ")", z = "(?:" + g + "(?:d|ll|m|re|s|t|ve))?", _ = "(?:" + g + "(?:D|LL|M|RE|S|T|VE))?", Z = M + "?", Q = "[" + o + "]?", ne = "(?:" + I + "(?:" + [V, $, N].join("|") + ")" + Q + Z + ")*", X = Q + Z + ne, W = "(?:" + [P, $, N].join("|") + ")" + X, ie = "(?:" + [V + b + "?", b, $, N, c].join("|") + ")", re = RegExp(g, "g"), te = RegExp(b, "g"), ce = RegExp(L + "(?=" + L + ")|" + ie + X, "g"), ue = RegExp([
|
|
1582
|
+
F + "?" + x + "+" + z + "(?=" + [u, F, "$"].join("|") + ")",
|
|
1583
|
+
U + "+" + _ + "(?=" + [u, F + k, "$"].join("|") + ")",
|
|
1584
|
+
F + "?" + k + "+" + z,
|
|
1585
1585
|
F + "+" + _,
|
|
1586
|
-
|
|
1586
|
+
S,
|
|
1587
1587
|
W
|
|
1588
|
-
].join("|"), "g"), oe = RegExp("[" +
|
|
1588
|
+
].join("|"), "g"), oe = RegExp("[" + I + t + n + i + o + "]"), de = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, pe = {
|
|
1589
1589
|
// Latin-1 Supplement block.
|
|
1590
1590
|
À: "A",
|
|
1591
1591
|
Á: "A",
|
|
@@ -1787,7 +1787,7 @@ function gt() {
|
|
|
1787
1787
|
function ee(O) {
|
|
1788
1788
|
return O.split("");
|
|
1789
1789
|
}
|
|
1790
|
-
function
|
|
1790
|
+
function Re(O) {
|
|
1791
1791
|
return O.match(r) || [];
|
|
1792
1792
|
}
|
|
1793
1793
|
function xe(O) {
|
|
@@ -1795,23 +1795,23 @@ function gt() {
|
|
|
1795
1795
|
return O?.[B];
|
|
1796
1796
|
};
|
|
1797
1797
|
}
|
|
1798
|
-
var
|
|
1798
|
+
var Te = xe(pe);
|
|
1799
1799
|
function me(O) {
|
|
1800
1800
|
return oe.test(O);
|
|
1801
1801
|
}
|
|
1802
1802
|
function Pe(O) {
|
|
1803
1803
|
return de.test(O);
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1806
|
-
return me(O) ?
|
|
1805
|
+
function Ie(O) {
|
|
1806
|
+
return me(O) ? ke(O) : ee(O);
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function ke(O) {
|
|
1809
1809
|
return O.match(ce) || [];
|
|
1810
1810
|
}
|
|
1811
1811
|
function _e(O) {
|
|
1812
1812
|
return O.match(ue) || [];
|
|
1813
1813
|
}
|
|
1814
|
-
var Ce = Object.prototype,
|
|
1814
|
+
var Ce = Object.prototype, Le = Ce.toString, le = Se.Symbol, fe = le ? le.prototype : void 0, we = fe ? fe.toString : void 0;
|
|
1815
1815
|
function Oe(O, B, j) {
|
|
1816
1816
|
var H = -1, Y = O.length;
|
|
1817
1817
|
B < 0 && (B = -B > Y ? 0 : Y + B), j = j > Y ? Y : j, j < 0 && (j += Y), Y = B > j ? 0 : j - B >>> 0, B >>>= 0;
|
|
@@ -1819,7 +1819,7 @@ function gt() {
|
|
|
1819
1819
|
Ee[H] = O[H + B];
|
|
1820
1820
|
return Ee;
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function Ne(O) {
|
|
1823
1823
|
if (typeof O == "string")
|
|
1824
1824
|
return O;
|
|
1825
1825
|
if (D(O))
|
|
@@ -1834,7 +1834,7 @@ function gt() {
|
|
|
1834
1834
|
function ge(O) {
|
|
1835
1835
|
return function(B) {
|
|
1836
1836
|
B = d(B);
|
|
1837
|
-
var j = me(B) ?
|
|
1837
|
+
var j = me(B) ? Ie(B) : void 0, H = j ? j[0] : B.charAt(0), Y = j ? he(j, 1).join("") : B.slice(1);
|
|
1838
1838
|
return H[O]() + Y;
|
|
1839
1839
|
};
|
|
1840
1840
|
}
|
|
@@ -1843,14 +1843,14 @@ function gt() {
|
|
|
1843
1843
|
return J(K(G(B).replace(re, "")), O, "");
|
|
1844
1844
|
};
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function v(O) {
|
|
1847
1847
|
return !!O && typeof O == "object";
|
|
1848
1848
|
}
|
|
1849
1849
|
function D(O) {
|
|
1850
|
-
return typeof O == "symbol" ||
|
|
1850
|
+
return typeof O == "symbol" || v(O) && Le.call(O) == e;
|
|
1851
1851
|
}
|
|
1852
1852
|
function d(O) {
|
|
1853
|
-
return O == null ? "" :
|
|
1853
|
+
return O == null ? "" : Ne(O);
|
|
1854
1854
|
}
|
|
1855
1855
|
var E = h(function(O, B, j) {
|
|
1856
1856
|
return B = B.toLowerCase(), O + (j ? C(B) : B);
|
|
@@ -1859,11 +1859,11 @@ function gt() {
|
|
|
1859
1859
|
return ae(d(O).toLowerCase());
|
|
1860
1860
|
}
|
|
1861
1861
|
function G(O) {
|
|
1862
|
-
return O = d(O), O && O.replace(a,
|
|
1862
|
+
return O = d(O), O && O.replace(a, Te).replace(te, "");
|
|
1863
1863
|
}
|
|
1864
1864
|
var ae = ge("toUpperCase");
|
|
1865
1865
|
function K(O, B, j) {
|
|
1866
|
-
return O = d(O), B = B, B === void 0 ? Pe(O) ? _e(O) :
|
|
1866
|
+
return O = d(O), B = B, B === void 0 ? Pe(O) ? _e(O) : Re(O) : O.match(B) || [];
|
|
1867
1867
|
}
|
|
1868
1868
|
return dr = E, dr;
|
|
1869
1869
|
}
|
|
@@ -1879,27 +1879,27 @@ function bt() {
|
|
|
1879
1879
|
return typeof m;
|
|
1880
1880
|
} : function(m) {
|
|
1881
1881
|
return m && typeof Symbol == "function" && m.constructor === Symbol && m !== Symbol.prototype ? "symbol" : typeof m;
|
|
1882
|
-
}, r = typeof window < "u" && typeof window.document < "u", a = typeof process < "u" && process.versions != null && process.versions.node != null, t = (typeof self > "u" ? "undefined" : e(self)) === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope", n = typeof window < "u" && window.name === "nodejs" || typeof navigator < "u" && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")),
|
|
1883
|
-
return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = a, ve.isJsDom = n, ve.isDeno =
|
|
1882
|
+
}, r = typeof window < "u" && typeof window.document < "u", a = typeof process < "u" && process.versions != null && process.versions.node != null, t = (typeof self > "u" ? "undefined" : e(self)) === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope", n = typeof window < "u" && window.name === "nodejs" || typeof navigator < "u" && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")), i = typeof Deno < "u" && typeof Deno.core < "u";
|
|
1883
|
+
return ve.isBrowser = r, ve.isWebWorker = t, ve.isNode = a, ve.isJsDom = n, ve.isDeno = i, ve;
|
|
1884
1884
|
}
|
|
1885
1885
|
bt();
|
|
1886
|
-
const
|
|
1887
|
-
|
|
1886
|
+
const R = {}, Ge = {};
|
|
1887
|
+
R.loadExternalScript = function(e) {
|
|
1888
1888
|
if (Ge[e])
|
|
1889
1889
|
return Ge[e];
|
|
1890
1890
|
const r = Ge[e] = new Promise(a);
|
|
1891
1891
|
function a(t, n) {
|
|
1892
1892
|
if (!document)
|
|
1893
1893
|
return delete Ge[e], n("document is undefined");
|
|
1894
|
-
var
|
|
1895
|
-
|
|
1894
|
+
var i = document.createElement("script");
|
|
1895
|
+
i.type = "text/javascript", i.async = !0, i.onload = function() {
|
|
1896
1896
|
return console.log("Loaded external script", e), t(e);
|
|
1897
|
-
},
|
|
1897
|
+
}, i.src = e, document.head.appendChild(i);
|
|
1898
1898
|
}
|
|
1899
1899
|
return r;
|
|
1900
1900
|
};
|
|
1901
1901
|
const Vr = {};
|
|
1902
|
-
|
|
1902
|
+
R.loadExternalStyle = function(e) {
|
|
1903
1903
|
const r = new Promise(a);
|
|
1904
1904
|
function a(t, n) {
|
|
1905
1905
|
if (!document)
|
|
@@ -1907,14 +1907,14 @@ I.loadExternalStyle = function(e) {
|
|
|
1907
1907
|
if (Vr[e])
|
|
1908
1908
|
return t(e);
|
|
1909
1909
|
Vr[e] = !0;
|
|
1910
|
-
var
|
|
1911
|
-
|
|
1910
|
+
var i = document.createElement("link");
|
|
1911
|
+
i.setAttribute("rel", "stylesheet"), i.setAttribute("type", "text/css"), i.setAttribute("href", e), i.onload = function() {
|
|
1912
1912
|
return console.log("Loaded external stylesheet", e), t(e);
|
|
1913
|
-
}, document.head.appendChild(
|
|
1913
|
+
}, document.head.appendChild(i);
|
|
1914
1914
|
}
|
|
1915
1915
|
return r;
|
|
1916
1916
|
};
|
|
1917
|
-
|
|
1917
|
+
R.exists = function(e) {
|
|
1918
1918
|
var r;
|
|
1919
1919
|
if (Array.isArray(e) || e === 0)
|
|
1920
1920
|
return !0;
|
|
@@ -1936,7 +1936,7 @@ I.exists = function(e) {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
return !r;
|
|
1938
1938
|
};
|
|
1939
|
-
|
|
1939
|
+
R.parseDate = function(e) {
|
|
1940
1940
|
if (e) {
|
|
1941
1941
|
if (e instanceof Date)
|
|
1942
1942
|
return e;
|
|
@@ -1945,15 +1945,15 @@ I.parseDate = function(e) {
|
|
|
1945
1945
|
return r;
|
|
1946
1946
|
}
|
|
1947
1947
|
};
|
|
1948
|
-
|
|
1948
|
+
R.parseURL = function(e) {
|
|
1949
1949
|
if (!e)
|
|
1950
1950
|
return !1;
|
|
1951
1951
|
if (e.startsWith("/") || e.startsWith("://") || e.startsWith("mailto:") || e.startsWith("tel:") || e.startsWith("sms:"))
|
|
1952
1952
|
return e;
|
|
1953
|
-
var a =
|
|
1953
|
+
var a = R.parseEmail(e);
|
|
1954
1954
|
if (a && a === e)
|
|
1955
1955
|
return `mailto:${a}`;
|
|
1956
|
-
const t = (
|
|
1956
|
+
const t = (i) => /^https?:\/\//i.test(i) ? i : `http://${i}`;
|
|
1957
1957
|
e = t(e), e = e.replace(/\s/g, "");
|
|
1958
1958
|
var n = RegExp(
|
|
1959
1959
|
"(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+@]*)*(\\?[;&a-z\\d%_.~+=-@]*)?(\\#[-a-z\\d_@]*)?$",
|
|
@@ -1961,16 +1961,16 @@ I.parseURL = function(e) {
|
|
|
1961
1961
|
).test(e);
|
|
1962
1962
|
return n ? t(e) : !1;
|
|
1963
1963
|
};
|
|
1964
|
-
|
|
1964
|
+
R.parseNumber = function(e, r) {
|
|
1965
1965
|
if (!e || (e = Number(e), isNaN(e)))
|
|
1966
1966
|
return 0;
|
|
1967
1967
|
if (r) {
|
|
1968
1968
|
var a = e.toFixed(r);
|
|
1969
|
-
e =
|
|
1969
|
+
e = R.parseNumber(a);
|
|
1970
1970
|
}
|
|
1971
1971
|
return e;
|
|
1972
1972
|
};
|
|
1973
|
-
|
|
1973
|
+
R.isValidEmailAddress = function(e) {
|
|
1974
1974
|
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])+$/;
|
|
1975
1975
|
if (!e) return !1;
|
|
1976
1976
|
var a = e.split("@");
|
|
@@ -1978,53 +1978,53 @@ I.isValidEmailAddress = function(e) {
|
|
|
1978
1978
|
var t = a[0], n = a[1];
|
|
1979
1979
|
if (t.length > 64) return !1;
|
|
1980
1980
|
if (n.length > 255) return !1;
|
|
1981
|
-
var
|
|
1982
|
-
return !(
|
|
1981
|
+
var i = n.split(".");
|
|
1982
|
+
return !(i.some(function(m) {
|
|
1983
1983
|
return m.length > 63;
|
|
1984
1984
|
}) || !r.test(e));
|
|
1985
1985
|
};
|
|
1986
|
-
|
|
1986
|
+
R.parseEmail = function(e) {
|
|
1987
1987
|
if (!e)
|
|
1988
1988
|
return !1;
|
|
1989
|
-
var r = String(e).toLowerCase(), a =
|
|
1989
|
+
var r = String(e).toLowerCase(), a = R.isValidEmailAddress(r);
|
|
1990
1990
|
return a ? r : !1;
|
|
1991
1991
|
};
|
|
1992
|
-
|
|
1992
|
+
R.parseInt = function(e) {
|
|
1993
1993
|
return !e || (e = parseInt(e), isNaN(e)) ? 0 : e;
|
|
1994
1994
|
};
|
|
1995
|
-
|
|
1995
|
+
R.cleanValue = function(e, r, a) {
|
|
1996
1996
|
a || (a = {});
|
|
1997
|
-
var t =
|
|
1997
|
+
var t = R.exists(e);
|
|
1998
1998
|
if (a.strict && t && r != "boolean")
|
|
1999
1999
|
return e;
|
|
2000
2000
|
switch (r) {
|
|
2001
2001
|
case "reference":
|
|
2002
|
-
return
|
|
2002
|
+
return R.id(e, !0);
|
|
2003
2003
|
case "boolean":
|
|
2004
|
-
return
|
|
2004
|
+
return R.parseBoolean(e);
|
|
2005
2005
|
case "url":
|
|
2006
|
-
return
|
|
2006
|
+
return R.parseURL(e);
|
|
2007
2007
|
case "key":
|
|
2008
|
-
return
|
|
2008
|
+
return R.machineName(e);
|
|
2009
2009
|
case "email":
|
|
2010
|
-
return
|
|
2010
|
+
return R.parseEmail(e);
|
|
2011
2011
|
case "date":
|
|
2012
|
-
var n =
|
|
2012
|
+
var n = R.parseDate(e, a);
|
|
2013
2013
|
return n === void 0 ? void 0 : n;
|
|
2014
2014
|
case "number":
|
|
2015
2015
|
case "decimal":
|
|
2016
2016
|
case "float":
|
|
2017
|
-
var
|
|
2018
|
-
return String(
|
|
2017
|
+
var i = R.parseNumber(e);
|
|
2018
|
+
return String(i) == String(Number(e)) ? i : void 0;
|
|
2019
2019
|
case "integer":
|
|
2020
|
-
var
|
|
2021
|
-
return String(
|
|
2020
|
+
var i = R.parseInt(e);
|
|
2021
|
+
return String(i) == String(parseInt(e)) ? i : void 0;
|
|
2022
2022
|
case "group":
|
|
2023
2023
|
return e;
|
|
2024
2024
|
case "object":
|
|
2025
2025
|
return typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0;
|
|
2026
2026
|
case "string":
|
|
2027
|
-
if (
|
|
2027
|
+
if (R.exists(e)) {
|
|
2028
2028
|
var m = String(e);
|
|
2029
2029
|
return m == "[object Object]" ? void 0 : m;
|
|
2030
2030
|
} else
|
|
@@ -2044,59 +2044,59 @@ I.cleanValue = function(e, r, a) {
|
|
|
2044
2044
|
return String(e);
|
|
2045
2045
|
}
|
|
2046
2046
|
};
|
|
2047
|
-
|
|
2048
|
-
var t =
|
|
2047
|
+
R.isValidValue = function(e, r, a) {
|
|
2048
|
+
var t = R.exists(e), n = typeof e == "number", i = !1;
|
|
2049
2049
|
if (!t)
|
|
2050
2050
|
return !1;
|
|
2051
2051
|
switch (r) {
|
|
2052
2052
|
case "url":
|
|
2053
|
-
a ?
|
|
2053
|
+
a ? i = e.startsWith("/") || e.startsWith("://") || e.startsWith("http://") || e.startsWith("https://") : i = String(e) === R.parseURL(e);
|
|
2054
2054
|
break;
|
|
2055
2055
|
case "key":
|
|
2056
|
-
|
|
2056
|
+
i = String(e) === R.machineName(e);
|
|
2057
2057
|
break;
|
|
2058
2058
|
case "date":
|
|
2059
2059
|
if (a && (typeof e != "object" || !(e instanceof Date)))
|
|
2060
2060
|
return !1;
|
|
2061
|
-
var m =
|
|
2061
|
+
var m = R.parseDate(e);
|
|
2062
2062
|
return m !== void 0;
|
|
2063
2063
|
case "email":
|
|
2064
|
-
a ?
|
|
2064
|
+
a ? i = e === R.parseEmail(e) : i = String(e).toLowerCase() === R.parseEmail(e);
|
|
2065
2065
|
break;
|
|
2066
2066
|
case "number":
|
|
2067
2067
|
case "decimal":
|
|
2068
2068
|
case "float":
|
|
2069
|
-
a ?
|
|
2069
|
+
a ? i = n && Number(e) === R.parseNumber(e) : i = Number(e) === R.parseNumber(e);
|
|
2070
2070
|
break;
|
|
2071
2071
|
case "integer":
|
|
2072
|
-
a ?
|
|
2072
|
+
a ? i = n && Number(e) === R.parseInt(e) : i = Number(e) === R.parseInt(e);
|
|
2073
2073
|
break;
|
|
2074
2074
|
case "boolean":
|
|
2075
|
-
var m =
|
|
2076
|
-
a ? (e === !0 || e === !1) && (
|
|
2075
|
+
var m = R.parseBoolean(e);
|
|
2076
|
+
a ? (e === !0 || e === !1) && (i = e === m) : i = m === !0 || m === !1;
|
|
2077
2077
|
break;
|
|
2078
2078
|
case "reference":
|
|
2079
|
-
a ?
|
|
2079
|
+
a ? i = String(e) === R.id(e) : i = !!R.id(e);
|
|
2080
2080
|
break;
|
|
2081
2081
|
case "string":
|
|
2082
2082
|
var l = String(e);
|
|
2083
2083
|
if (a && typeof e != "string" || l == "[object Object]")
|
|
2084
2084
|
return !1;
|
|
2085
|
-
|
|
2085
|
+
i = !0;
|
|
2086
2086
|
break;
|
|
2087
2087
|
// case 'group':
|
|
2088
2088
|
// isValidEntry = _isObject(value);
|
|
2089
2089
|
// break;
|
|
2090
2090
|
case "object":
|
|
2091
|
-
|
|
2091
|
+
i = typeof e == "object" && e !== null && !Array.isArray(e);
|
|
2092
2092
|
break;
|
|
2093
2093
|
case "array":
|
|
2094
|
-
|
|
2094
|
+
i = Array.isArray(e);
|
|
2095
2095
|
break;
|
|
2096
2096
|
}
|
|
2097
|
-
return
|
|
2097
|
+
return i;
|
|
2098
2098
|
};
|
|
2099
|
-
|
|
2099
|
+
R.parseBoolean = function(e) {
|
|
2100
2100
|
switch (String(e).toLowerCase()) {
|
|
2101
2101
|
case "true":
|
|
2102
2102
|
case "y":
|
|
@@ -2119,15 +2119,15 @@ I.parseBoolean = function(e) {
|
|
|
2119
2119
|
}
|
|
2120
2120
|
return !!e;
|
|
2121
2121
|
};
|
|
2122
|
-
|
|
2122
|
+
R.clone = function(e) {
|
|
2123
2123
|
return JSON.parse(JSON.stringify(e));
|
|
2124
2124
|
};
|
|
2125
|
-
|
|
2125
|
+
R.getAllFields = function(e) {
|
|
2126
2126
|
const r = e.definesType === "profile" || e.key === "profile", a = e.definesType === "submission";
|
|
2127
2127
|
var t = [...e.fields], n = e.definedFields || [];
|
|
2128
2128
|
if (n.length)
|
|
2129
2129
|
if (a) {
|
|
2130
|
-
var
|
|
2130
|
+
var i = {
|
|
2131
2131
|
title: "Form Data",
|
|
2132
2132
|
minimum: 1,
|
|
2133
2133
|
maximum: 1,
|
|
@@ -2136,7 +2136,7 @@ I.getAllFields = function(e) {
|
|
|
2136
2136
|
type: "group",
|
|
2137
2137
|
fields: n
|
|
2138
2138
|
};
|
|
2139
|
-
t.push(
|
|
2139
|
+
t.push(i);
|
|
2140
2140
|
var m = {
|
|
2141
2141
|
title: "Data",
|
|
2142
2142
|
minimum: 1,
|
|
@@ -2174,7 +2174,7 @@ I.getAllFields = function(e) {
|
|
|
2174
2174
|
maximum: 1,
|
|
2175
2175
|
type: "date"
|
|
2176
2176
|
}));
|
|
2177
|
-
var l =
|
|
2177
|
+
var l = R.mapFields(t).filter(function(p) {
|
|
2178
2178
|
var y = p.type == "group" && p.asObject && p.minimum == 1 && p.maximum == 1;
|
|
2179
2179
|
return !y;
|
|
2180
2180
|
}).map(function(p) {
|
|
@@ -2184,28 +2184,28 @@ I.getAllFields = function(e) {
|
|
|
2184
2184
|
});
|
|
2185
2185
|
return l;
|
|
2186
2186
|
};
|
|
2187
|
-
|
|
2187
|
+
R.mapFields = function(e, r) {
|
|
2188
2188
|
r || (r = {});
|
|
2189
|
-
var a = [], t = [], n = [],
|
|
2189
|
+
var a = [], t = [], n = [], i = 1, m = r.depth, l = r.arrayDelimeter || "[]";
|
|
2190
2190
|
e.forEach(p);
|
|
2191
2191
|
function p(y, w) {
|
|
2192
|
-
var
|
|
2193
|
-
|
|
2194
|
-
var
|
|
2192
|
+
var A = y.key, s = y.type == "group", o = y.minimum === y.maximum && y.minimum === 1, f = y.asObject, g = s && !f, c = r.original ? y : R.clone(y);
|
|
2193
|
+
c.trail = t.slice(), c.trail.push(A), c.path = c.trail.join("."), c.titles = n.slice(), c.titles.push(y.filterTitle || y.title || ""), (!g || r.includeLayout) && a.push(c);
|
|
2194
|
+
var b = m && i >= m;
|
|
2195
2195
|
if (y.fields && y.fields.length)
|
|
2196
|
-
if (
|
|
2196
|
+
if (g)
|
|
2197
2197
|
y.fields.forEach(p);
|
|
2198
2198
|
else {
|
|
2199
|
-
if (
|
|
2199
|
+
if (b)
|
|
2200
2200
|
return;
|
|
2201
|
-
|
|
2202
|
-
let
|
|
2203
|
-
r.includeArrayDelimeter && (
|
|
2201
|
+
i++;
|
|
2202
|
+
let S = A;
|
|
2203
|
+
r.includeArrayDelimeter && (o || (S = `${A}${l}`)), t.push(S), n.push(y.filterTitle || y.title), y.fields.forEach(p), i--, t.pop(), n.pop();
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
2206
|
return a;
|
|
2207
2207
|
};
|
|
2208
|
-
|
|
2208
|
+
R.mapParameters = function(e) {
|
|
2209
2209
|
e = e || {};
|
|
2210
2210
|
var r = [];
|
|
2211
2211
|
return Object.entries(e).forEach(function([a, t]) {
|
|
@@ -2214,13 +2214,13 @@ I.mapParameters = function(e) {
|
|
|
2214
2214
|
}) : r.push(encodeURIComponent(a) + "=" + encodeURIComponent(t)));
|
|
2215
2215
|
}), r.join("&");
|
|
2216
2216
|
};
|
|
2217
|
-
|
|
2217
|
+
R.formatCurrency = function(e, r, a) {
|
|
2218
2218
|
(!e || isNaN(e)) && (e = 0), a = a || 2;
|
|
2219
|
-
var t =
|
|
2219
|
+
var t = R.currencySymbol(r);
|
|
2220
2220
|
return `${t}${parseFloat(Number(e) / 100).toFixed(a)}`;
|
|
2221
2221
|
};
|
|
2222
|
-
|
|
2223
|
-
if (e =
|
|
2222
|
+
R.getTypeFromID = function(e) {
|
|
2223
|
+
if (e = R.id(e), !e)
|
|
2224
2224
|
return;
|
|
2225
2225
|
const r = {
|
|
2226
2226
|
21: "organisation",
|
|
@@ -2283,7 +2283,7 @@ I.getTypeFromID = function(e) {
|
|
|
2283
2283
|
return r[a];
|
|
2284
2284
|
};
|
|
2285
2285
|
const St = { gbp: "£", eur: "€" };
|
|
2286
|
-
|
|
2286
|
+
R.currencySymbol = function(e) {
|
|
2287
2287
|
return St[String(e).toLowerCase()] || "$";
|
|
2288
2288
|
};
|
|
2289
2289
|
const wt = [
|
|
@@ -2294,9 +2294,9 @@ const wt = [
|
|
|
2294
2294
|
{ code: "nzd", countries: ["NZ"] },
|
|
2295
2295
|
{ code: "sgd", countries: ["SG"] }
|
|
2296
2296
|
];
|
|
2297
|
-
|
|
2297
|
+
R.getAvailableCurrencies = function(e) {
|
|
2298
2298
|
let r = wt.map(({ code: a, countries: t }) => ({
|
|
2299
|
-
name: `${a.toUpperCase()} (${
|
|
2299
|
+
name: `${a.toUpperCase()} (${R.currencySymbol(a)})`,
|
|
2300
2300
|
value: a,
|
|
2301
2301
|
countryCode: Object.fromEntries(t.map((n) => [n, !0]))
|
|
2302
2302
|
}));
|
|
@@ -2309,25 +2309,25 @@ I.getAvailableCurrencies = function(e) {
|
|
|
2309
2309
|
}
|
|
2310
2310
|
return r;
|
|
2311
2311
|
};
|
|
2312
|
-
|
|
2312
|
+
R.hash = function(e, r) {
|
|
2313
2313
|
return e = Array.isArray(e) ? e : [], e.reduce(function(a, t) {
|
|
2314
2314
|
const n = r ? je(t, r) : t;
|
|
2315
2315
|
return a[n] = t, a;
|
|
2316
2316
|
}, {});
|
|
2317
2317
|
};
|
|
2318
|
-
|
|
2319
|
-
m = m || {}, a && (m.sum = a), t && (m.flatten = !0), n && (m.unique = !0),
|
|
2318
|
+
R.extractFromArray = function(e, r, a, t, n, i, m) {
|
|
2319
|
+
m = m || {}, a && (m.sum = a), t && (m.flatten = !0), n && (m.unique = !0), i && (m.excludeNull = !0);
|
|
2320
2320
|
var l = e.reduce(function(p, y) {
|
|
2321
|
-
var w = je(y, r),
|
|
2322
|
-
return m.excludeNull &&
|
|
2321
|
+
var w = je(y, r), A = !w && w !== !1 && w !== 0;
|
|
2322
|
+
return m.excludeNull && A || p.push(w), p;
|
|
2323
2323
|
}, []);
|
|
2324
2324
|
return m.flatten && (l = l.flat()), m.unique && (l = [...new Set(l)]), m.sum && (l = l.reduce(function(p, y) {
|
|
2325
2325
|
return p + y;
|
|
2326
2326
|
}, 0)), l;
|
|
2327
2327
|
};
|
|
2328
|
-
|
|
2329
|
-
var n = e.filter(function(
|
|
2330
|
-
var m = je(
|
|
2328
|
+
R.matchInArray = function(e, r, a, t) {
|
|
2329
|
+
var n = e.filter(function(i) {
|
|
2330
|
+
var m = je(i, r), l;
|
|
2331
2331
|
switch (t) {
|
|
2332
2332
|
case "in":
|
|
2333
2333
|
l = m.includes(a);
|
|
@@ -2353,53 +2353,53 @@ I.matchInArray = function(e, r, a, t) {
|
|
|
2353
2353
|
});
|
|
2354
2354
|
return n;
|
|
2355
2355
|
};
|
|
2356
|
-
|
|
2356
|
+
R.comma = function(e, r, a) {
|
|
2357
2357
|
return a && (e = e.slice(0, a)), e.filter(function(t) {
|
|
2358
2358
|
return t != null && t !== void 0 && t !== "";
|
|
2359
2359
|
}).map(function(t) {
|
|
2360
2360
|
return r && r.length ? je(t, r) : t;
|
|
2361
2361
|
}).join(", ");
|
|
2362
2362
|
};
|
|
2363
|
-
|
|
2363
|
+
R.id = function(e) {
|
|
2364
2364
|
if (e) {
|
|
2365
2365
|
var r;
|
|
2366
2366
|
e._id ? r = String(e._id) : r = String(e);
|
|
2367
|
-
var a =
|
|
2367
|
+
var a = R.isValidID(r);
|
|
2368
2368
|
if (a)
|
|
2369
2369
|
return r;
|
|
2370
2370
|
}
|
|
2371
2371
|
};
|
|
2372
|
-
|
|
2372
|
+
R.ids = function(e) {
|
|
2373
2373
|
if (!e)
|
|
2374
2374
|
return [];
|
|
2375
2375
|
var r = Object.keys(
|
|
2376
2376
|
e.reduce(function(a, t) {
|
|
2377
2377
|
if (!t)
|
|
2378
2378
|
return a;
|
|
2379
|
-
var n =
|
|
2379
|
+
var n = R.id(t);
|
|
2380
2380
|
return n && (a[n] = 1), a;
|
|
2381
2381
|
}, {})
|
|
2382
2382
|
);
|
|
2383
2383
|
return r;
|
|
2384
2384
|
};
|
|
2385
|
-
|
|
2385
|
+
R.isValidID = function(e) {
|
|
2386
2386
|
var r = new RegExp("^[0-9a-fA-F]{24}$");
|
|
2387
2387
|
return r.test(String(e));
|
|
2388
2388
|
};
|
|
2389
|
-
|
|
2389
|
+
R.errorMessage = function(e) {
|
|
2390
2390
|
if (!e)
|
|
2391
2391
|
return;
|
|
2392
2392
|
Array.isArray(e) && (e = e[0]);
|
|
2393
2393
|
let r = e?.response?.data?.message || (typeof e?.response?.data == "string" ? e.response.data : null) || e?.message || null;
|
|
2394
2394
|
return Array.isArray(r) && (r = r[0]), r || JSON.stringify(e);
|
|
2395
2395
|
};
|
|
2396
|
-
|
|
2396
|
+
R.guid = function() {
|
|
2397
2397
|
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
2398
2398
|
const r = Math.random() * 16 | 0;
|
|
2399
2399
|
return (e === "x" ? r : r & 3 | 8).toString(16);
|
|
2400
2400
|
});
|
|
2401
2401
|
};
|
|
2402
|
-
|
|
2402
|
+
R.machineName = function(e) {
|
|
2403
2403
|
if (!(!e || !e.length)) {
|
|
2404
2404
|
var r = /[^a-zA-Z0-9-_]+/g;
|
|
2405
2405
|
return String(e).replace(r, " ").split("_").map((a) => At(a)).join("_");
|
|
@@ -2410,8 +2410,8 @@ function De() {
|
|
|
2410
2410
|
dispatch(a, t) {
|
|
2411
2411
|
const n = e.get(a);
|
|
2412
2412
|
if (n)
|
|
2413
|
-
for (const
|
|
2414
|
-
|
|
2413
|
+
for (const i of n)
|
|
2414
|
+
i(t);
|
|
2415
2415
|
},
|
|
2416
2416
|
addEventListener(a, t) {
|
|
2417
2417
|
if (typeof t != "function")
|
|
@@ -2551,8 +2551,8 @@ class Et extends Ve {
|
|
|
2551
2551
|
_setCookie(r, a, t = {}) {
|
|
2552
2552
|
if (typeof document > "u") return;
|
|
2553
2553
|
const n = { ...this.options, ...t };
|
|
2554
|
-
let
|
|
2555
|
-
n.domain && (
|
|
2554
|
+
let i = `${r}=${a}`;
|
|
2555
|
+
n.domain && (i += `; Domain=${n.domain}`), n.secure && (i += "; Secure"), n.sameSite && (i += `; SameSite=${n.sameSite}`), n.maxAge && (i += `; Max-Age=${n.maxAge}`), document.cookie = i;
|
|
2556
2556
|
}
|
|
2557
2557
|
/**
|
|
2558
2558
|
* Delete a cookie
|
|
@@ -2634,103 +2634,103 @@ var Pt = function(e) {
|
|
|
2634
2634
|
});
|
|
2635
2635
|
const n = new De();
|
|
2636
2636
|
n.bootstrap(t);
|
|
2637
|
-
function
|
|
2637
|
+
function i(l) {
|
|
2638
2638
|
var p = r.getUser();
|
|
2639
2639
|
t.onChange && t.onChange(p), n.dispatch("change", p, l);
|
|
2640
2640
|
}
|
|
2641
2641
|
t.set = function(l, p, y) {
|
|
2642
2642
|
const w = r.getUser();
|
|
2643
2643
|
if (JSON.stringify(w) != JSON.stringify(l) && (r.setUser(l), !y))
|
|
2644
|
-
return
|
|
2644
|
+
return i(p);
|
|
2645
2645
|
}, t.logout = function() {
|
|
2646
|
-
return r.clearUser(), e.cache.reset(),
|
|
2646
|
+
return r.clearUser(), e.cache.reset(), i();
|
|
2647
2647
|
}, t.changeOrganisation = function(l, p) {
|
|
2648
2648
|
l = e.utils.id(l), p || (p = {});
|
|
2649
2649
|
var y = !0;
|
|
2650
|
-
return p.disableAutoAuthentication && (y = !1), new Promise(function(w,
|
|
2651
|
-
e.api.post(`/user/switch/${l}`).then(function(
|
|
2652
|
-
y && (e.cache.reset(), t.set(
|
|
2653
|
-
}).catch(
|
|
2650
|
+
return p.disableAutoAuthentication && (y = !1), new Promise(function(w, A) {
|
|
2651
|
+
e.api.post(`/user/switch/${l}`).then(function(s) {
|
|
2652
|
+
y && (e.cache.reset(), t.set(s.data)), w(s.data);
|
|
2653
|
+
}).catch(A);
|
|
2654
2654
|
});
|
|
2655
2655
|
}, t.impersonate = function(l, p) {
|
|
2656
2656
|
l = e.utils.id(l), p || (p = {});
|
|
2657
2657
|
var y = !0;
|
|
2658
2658
|
p.disableAutoAuthentication && (y = !1);
|
|
2659
2659
|
var w = e.api.post(`/user/impersonate/${l}`);
|
|
2660
|
-
return w.then(function(
|
|
2661
|
-
y && (e.cache.reset(), t.set(
|
|
2662
|
-
}, function(
|
|
2660
|
+
return w.then(function(A) {
|
|
2661
|
+
y && (e.cache.reset(), t.set(A.data));
|
|
2662
|
+
}, function(A) {
|
|
2663
2663
|
}), w;
|
|
2664
2664
|
}, t.login = async function(l, p) {
|
|
2665
2665
|
p || (p = {});
|
|
2666
2666
|
var y = !0;
|
|
2667
2667
|
p.disableAutoAuthentication && (y = !1);
|
|
2668
|
-
var w = new Promise(
|
|
2669
|
-
function
|
|
2668
|
+
var w = new Promise(A);
|
|
2669
|
+
function A(s, o) {
|
|
2670
2670
|
if (!l)
|
|
2671
|
-
return
|
|
2671
|
+
return o({
|
|
2672
2672
|
message: "Login requires an email and password"
|
|
2673
2673
|
});
|
|
2674
2674
|
if (!l.email || !l.email.length)
|
|
2675
|
-
return
|
|
2675
|
+
return o({
|
|
2676
2676
|
message: "An email address is required to log in"
|
|
2677
2677
|
});
|
|
2678
2678
|
if (!l.password || !l.password.length)
|
|
2679
|
-
return
|
|
2679
|
+
return o({
|
|
2680
2680
|
message: "A password is required to log in"
|
|
2681
2681
|
});
|
|
2682
|
-
var
|
|
2682
|
+
var f = {
|
|
2683
2683
|
bypassInterceptor: !0
|
|
2684
2684
|
};
|
|
2685
|
-
r.isCookieMode && r.isCookieMode() && (l.useCookies = !0,
|
|
2686
|
-
var
|
|
2687
|
-
p.url && (
|
|
2688
|
-
y && t.set(
|
|
2689
|
-
},
|
|
2685
|
+
r.isCookieMode && r.isCookieMode() && (l.useCookies = !0, f.withCredentials = !0);
|
|
2686
|
+
var c = `${e.apiURL}/user/login`;
|
|
2687
|
+
p.url && (c = p.url), e.api.post(c, l, f).then(function(u) {
|
|
2688
|
+
y && t.set(u.data), s(u);
|
|
2689
|
+
}, o);
|
|
2690
2690
|
}
|
|
2691
2691
|
return w;
|
|
2692
2692
|
}, t.signup = async function(l, p) {
|
|
2693
2693
|
p || (p = {});
|
|
2694
2694
|
var y = !0;
|
|
2695
2695
|
p.disableAutoAuthentication && (y = !1);
|
|
2696
|
-
var w = new Promise(
|
|
2697
|
-
function
|
|
2696
|
+
var w = new Promise(A);
|
|
2697
|
+
function A(s, o) {
|
|
2698
2698
|
if (!l)
|
|
2699
|
-
return
|
|
2699
|
+
return o({
|
|
2700
2700
|
message: "Signup details are required"
|
|
2701
2701
|
});
|
|
2702
2702
|
if (!l.firstName || !l.firstName.length)
|
|
2703
|
-
return
|
|
2703
|
+
return o({
|
|
2704
2704
|
message: "Please provide a first name"
|
|
2705
2705
|
});
|
|
2706
2706
|
if (!l.lastName || !l.lastName.length)
|
|
2707
|
-
return
|
|
2707
|
+
return o({
|
|
2708
2708
|
message: "Please provide a last name"
|
|
2709
2709
|
});
|
|
2710
2710
|
if (!l.email || !l.email.length)
|
|
2711
|
-
return
|
|
2711
|
+
return o({
|
|
2712
2712
|
message: "An email address is required to sign up"
|
|
2713
2713
|
});
|
|
2714
2714
|
if (!l.password || !l.password.length)
|
|
2715
|
-
return
|
|
2715
|
+
return o({
|
|
2716
2716
|
message: "A password is required to sign up"
|
|
2717
2717
|
});
|
|
2718
2718
|
if (!l.confirmPassword || !l.confirmPassword.length)
|
|
2719
|
-
return
|
|
2719
|
+
return o({
|
|
2720
2720
|
message: "Please confirm your password"
|
|
2721
2721
|
});
|
|
2722
2722
|
if (l.confirmPassword != l.password)
|
|
2723
|
-
return
|
|
2723
|
+
return o({
|
|
2724
2724
|
message: "Password and confirmation do not match"
|
|
2725
2725
|
});
|
|
2726
|
-
var
|
|
2726
|
+
var f = {
|
|
2727
2727
|
bypassInterceptor: !0
|
|
2728
2728
|
};
|
|
2729
|
-
r.isCookieMode && r.isCookieMode() && (l.useCookies = !0,
|
|
2730
|
-
var
|
|
2731
|
-
p.application && (
|
|
2732
|
-
y && t.set(
|
|
2733
|
-
},
|
|
2729
|
+
r.isCookieMode && r.isCookieMode() && (l.useCookies = !0, f.withCredentials = !0);
|
|
2730
|
+
var c = `${e.apiURL}/user/signup`;
|
|
2731
|
+
p.application && (c = `${e.domain || ""}/qik/application/signup`), p.url && (c = p.url), e.api.post(c, l, f).then(function(u) {
|
|
2732
|
+
y && t.set(u.data), s(u);
|
|
2733
|
+
}, o);
|
|
2734
2734
|
}
|
|
2735
2735
|
return w;
|
|
2736
2736
|
}, t.retrieveUserFromResetToken = async function(l, p) {
|
|
@@ -2738,30 +2738,30 @@ var Pt = function(e) {
|
|
|
2738
2738
|
var y = {
|
|
2739
2739
|
bypassInterceptor: !0
|
|
2740
2740
|
};
|
|
2741
|
-
return new Promise(function(w,
|
|
2742
|
-
e.api.get(p.url || `${e.apiURL}/user/reset/${l}`, y).then(function(
|
|
2743
|
-
return w(
|
|
2744
|
-
},
|
|
2741
|
+
return new Promise(function(w, A) {
|
|
2742
|
+
e.api.get(p.url || `${e.apiURL}/user/reset/${l}`, y).then(function(s) {
|
|
2743
|
+
return w(s.data);
|
|
2744
|
+
}, A);
|
|
2745
2745
|
});
|
|
2746
2746
|
}, t.updateUserWithToken = async function(l, p, y) {
|
|
2747
2747
|
y || (y = {});
|
|
2748
2748
|
var w = !0;
|
|
2749
|
-
return y.disableAutoAuthentication && (w = !1), new Promise(function(
|
|
2750
|
-
var
|
|
2749
|
+
return y.disableAutoAuthentication && (w = !1), new Promise(function(A, s) {
|
|
2750
|
+
var o = {
|
|
2751
2751
|
bypassInterceptor: !0
|
|
2752
2752
|
};
|
|
2753
|
-
e.api.post(y.url || `${e.apiURL}/user/reset/${l}`, p,
|
|
2754
|
-
return w && (e.cache.reset(), t.set(
|
|
2755
|
-
},
|
|
2753
|
+
e.api.post(y.url || `${e.apiURL}/user/reset/${l}`, p, o).then(function(f) {
|
|
2754
|
+
return w && (e.cache.reset(), t.set(f.data)), A(f.data);
|
|
2755
|
+
}, s);
|
|
2756
2756
|
});
|
|
2757
2757
|
}, t.sendResetPasswordRequest = function(l, p) {
|
|
2758
2758
|
return p || (p = {}), l ? !l.email || !l.email.length ? Promise.reject({
|
|
2759
2759
|
message: "An email address is required for password reset"
|
|
2760
2760
|
}) : new Promise(function(y, w) {
|
|
2761
|
-
var
|
|
2761
|
+
var A = {
|
|
2762
2762
|
bypassInterceptor: !0
|
|
2763
2763
|
};
|
|
2764
|
-
e.api.post(p.url || `${e.apiURL}/user/forgot`, l,
|
|
2764
|
+
e.api.post(p.url || `${e.apiURL}/user/forgot`, l, A).then(y, w);
|
|
2765
2765
|
}) : Promise.reject({
|
|
2766
2766
|
message: "Please provide your account details to reset your password"
|
|
2767
2767
|
});
|
|
@@ -2774,10 +2774,10 @@ var Pt = function(e) {
|
|
|
2774
2774
|
var { token: w } = p;
|
|
2775
2775
|
if (!w)
|
|
2776
2776
|
return Promise.reject("No token");
|
|
2777
|
-
var
|
|
2778
|
-
|
|
2779
|
-
var
|
|
2780
|
-
return l ? await t.refreshAccessToken(w.refreshToken) :
|
|
2777
|
+
var A = /* @__PURE__ */ new Date();
|
|
2778
|
+
A.setSeconds(A.getSeconds() + a);
|
|
2779
|
+
var s = new Date(w.expires);
|
|
2780
|
+
return l ? await t.refreshAccessToken(w.refreshToken) : A < s ? w : await t.refreshAccessToken(w.refreshToken);
|
|
2781
2781
|
};
|
|
2782
2782
|
const m = {};
|
|
2783
2783
|
return t.refreshAccessToken = async function(l) {
|
|
@@ -2785,33 +2785,33 @@ var Pt = function(e) {
|
|
|
2785
2785
|
return m.inflightRefreshRequest;
|
|
2786
2786
|
const p = r.isCookieMode && r.isCookieMode();
|
|
2787
2787
|
return m.inflightRefreshRequest = new Promise(function(y, w) {
|
|
2788
|
-
let
|
|
2788
|
+
let A = {}, s = {
|
|
2789
2789
|
bypassInterceptor: !0,
|
|
2790
2790
|
withoutToken: !0
|
|
2791
2791
|
};
|
|
2792
2792
|
if (p)
|
|
2793
|
-
|
|
2793
|
+
s.withCredentials = !0;
|
|
2794
2794
|
else {
|
|
2795
2795
|
if (!l)
|
|
2796
2796
|
return m.inflightRefreshRequest = null, w(new Error("No refresh token provided for localStorage mode"));
|
|
2797
|
-
|
|
2797
|
+
A.refreshToken = l;
|
|
2798
2798
|
}
|
|
2799
|
-
e.api.post("/user/refresh",
|
|
2800
|
-
if (!
|
|
2799
|
+
e.api.post("/user/refresh", A, s).then(function(f) {
|
|
2800
|
+
if (!f || !f.data)
|
|
2801
2801
|
return m.inflightRefreshRequest = null, w(new Error("Invalid refresh response"));
|
|
2802
|
-
if (t.set(
|
|
2802
|
+
if (t.set(f.data), i(), p)
|
|
2803
2803
|
y("cookie_token_refreshed");
|
|
2804
2804
|
else {
|
|
2805
|
-
const
|
|
2806
|
-
|
|
2805
|
+
const g = f.data.token?.accessToken;
|
|
2806
|
+
g ? y(g) : w(new Error("No access token in refresh response"));
|
|
2807
2807
|
}
|
|
2808
2808
|
setTimeout(function() {
|
|
2809
2809
|
m.inflightRefreshRequest = null;
|
|
2810
2810
|
});
|
|
2811
|
-
}).catch(function(
|
|
2811
|
+
}).catch(function(o) {
|
|
2812
2812
|
setTimeout(function() {
|
|
2813
2813
|
m.inflightRefreshRequest = null;
|
|
2814
|
-
}), w(
|
|
2814
|
+
}), w(o);
|
|
2815
2815
|
});
|
|
2816
2816
|
}), m.inflightRefreshRequest;
|
|
2817
2817
|
}, t.sync = function() {
|
|
@@ -2825,9 +2825,9 @@ var Pt = function(e) {
|
|
|
2825
2825
|
t.set(l.data);
|
|
2826
2826
|
} else
|
|
2827
2827
|
t.set(null);
|
|
2828
|
-
|
|
2828
|
+
i();
|
|
2829
2829
|
}).catch(function(l) {
|
|
2830
|
-
t.set(null),
|
|
2830
|
+
t.set(null), i();
|
|
2831
2831
|
});
|
|
2832
2832
|
}, t.getCurrentUser = function() {
|
|
2833
2833
|
return r.getUser();
|
|
@@ -2848,25 +2848,25 @@ var Pt = function(e) {
|
|
|
2848
2848
|
var p = l;
|
|
2849
2849
|
if (r.isCookieMode && r.isCookieMode())
|
|
2850
2850
|
return p.withCredentials || (p.withCredentials = !0), p;
|
|
2851
|
-
var w = t.getCurrentUser(),
|
|
2851
|
+
var w = t.getCurrentUser(), A, s, o;
|
|
2852
2852
|
if (w) {
|
|
2853
|
-
var { token:
|
|
2854
|
-
|
|
2853
|
+
var { token: f } = w;
|
|
2854
|
+
f && (A = f.accessToken, s = f.refreshToken, o = f.expires);
|
|
2855
2855
|
}
|
|
2856
|
-
if (
|
|
2857
|
-
p.headers.Authorization = `Bearer ${
|
|
2856
|
+
if (A)
|
|
2857
|
+
p.headers.Authorization = `Bearer ${A}`;
|
|
2858
2858
|
else
|
|
2859
2859
|
return p;
|
|
2860
|
-
if (!
|
|
2860
|
+
if (!s)
|
|
2861
2861
|
return p;
|
|
2862
|
-
var
|
|
2863
|
-
|
|
2864
|
-
var
|
|
2865
|
-
return
|
|
2866
|
-
await t.refreshAccessToken(
|
|
2867
|
-
return p.headers.Authorization = `Bearer ${
|
|
2868
|
-
}).catch(function(
|
|
2869
|
-
return
|
|
2862
|
+
var g = /* @__PURE__ */ new Date();
|
|
2863
|
+
g.setSeconds(g.getSeconds() + a);
|
|
2864
|
+
var c = new Date(o);
|
|
2865
|
+
return g < c ? p : new Promise(async function(u, b) {
|
|
2866
|
+
await t.refreshAccessToken(s).then(function(S) {
|
|
2867
|
+
return p.headers.Authorization = `Bearer ${S}`, u(p);
|
|
2868
|
+
}).catch(function(S) {
|
|
2869
|
+
return b(S);
|
|
2870
2870
|
});
|
|
2871
2871
|
});
|
|
2872
2872
|
},
|
|
@@ -2928,8 +2928,8 @@ q.activeFilters = function(e) {
|
|
|
2928
2928
|
return a(e, r), r;
|
|
2929
2929
|
function a(t, n) {
|
|
2930
2930
|
if (t) {
|
|
2931
|
-
var
|
|
2932
|
-
|
|
2931
|
+
var i = q.isValidFilter(t);
|
|
2932
|
+
i && n.push(t), t.filters && t.filters.length && t.filters.forEach(function(m) {
|
|
2933
2933
|
a(m, n);
|
|
2934
2934
|
});
|
|
2935
2935
|
}
|
|
@@ -2937,11 +2937,11 @@ q.activeFilters = function(e) {
|
|
|
2937
2937
|
};
|
|
2938
2938
|
q.activeFilterKeys = function(e, r) {
|
|
2939
2939
|
r = r || {};
|
|
2940
|
-
var a = q.activeFilters(e), t = a.filter(function(
|
|
2941
|
-
return !
|
|
2942
|
-
}).reduce(function(
|
|
2940
|
+
var a = q.activeFilters(e), t = a.filter(function(i) {
|
|
2941
|
+
return !i.operator;
|
|
2942
|
+
}).reduce(function(i, m) {
|
|
2943
2943
|
var l = q.cleanKey(m.key);
|
|
2944
|
-
return r.trimArrayDelimeters !== !1 && (l = l.split("[]").join("")),
|
|
2944
|
+
return r.trimArrayDelimeters !== !1 && (l = l.split("[]").join("")), i[l] = !0, i;
|
|
2945
2945
|
}, {}), n = Object.keys(t);
|
|
2946
2946
|
return n;
|
|
2947
2947
|
};
|
|
@@ -2963,14 +2963,14 @@ q.activeFilterOperators = function(e) {
|
|
|
2963
2963
|
};
|
|
2964
2964
|
q.activeFilterValues = function(e, r) {
|
|
2965
2965
|
var a = q.activeFilters(e);
|
|
2966
|
-
function t(
|
|
2967
|
-
if (
|
|
2968
|
-
return
|
|
2969
|
-
}
|
|
2970
|
-
var n = a.filter(function(
|
|
2971
|
-
return !
|
|
2972
|
-
}).reduce(function(
|
|
2973
|
-
return
|
|
2966
|
+
function t(i) {
|
|
2967
|
+
if (i)
|
|
2968
|
+
return i._id || i.id || i.title || i.name || i;
|
|
2969
|
+
}
|
|
2970
|
+
var n = a.filter(function(i) {
|
|
2971
|
+
return !i.operator;
|
|
2972
|
+
}).reduce(function(i, m) {
|
|
2973
|
+
return i = [...i, ...(m.values || []).map(t), t(m.value), t(m.value2)], i;
|
|
2974
2974
|
}, []).filter(Kr);
|
|
2975
2975
|
return n;
|
|
2976
2976
|
};
|
|
@@ -2980,19 +2980,19 @@ q.filterChangeString = function(e) {
|
|
|
2980
2980
|
};
|
|
2981
2981
|
function Ct(e) {
|
|
2982
2982
|
var r = {};
|
|
2983
|
-
return r.downloadUrl = function(a, t, n,
|
|
2984
|
-
return
|
|
2983
|
+
return r.downloadUrl = function(a, t, n, i) {
|
|
2984
|
+
return i = i || {}, n = n || {}, n.download = !0, t = e.utils.id(t), e.api.generateEndpointURL(`/${a}/${t}`, n, i);
|
|
2985
2985
|
}, r.duration = function(a) {
|
|
2986
|
-
const t = Math.round(a), n = Math.floor(t / 3600),
|
|
2987
|
-
return n > 0 ? `${n}:${
|
|
2988
|
-
}, r.mediaUrl = function(a, t, n,
|
|
2989
|
-
|
|
2986
|
+
const t = Math.round(a), n = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60), m = t % 60;
|
|
2987
|
+
return n > 0 ? `${n}:${i.toString().padStart(2, "0")}:${m.toString().padStart(2, "0")}` : `${i}:${m.toString().padStart(2, "0")}`;
|
|
2988
|
+
}, r.mediaUrl = function(a, t, n, i) {
|
|
2989
|
+
i = i || {}, n = n || {}, t = e.utils.id(t);
|
|
2990
2990
|
let m = `/${a}/${t}`;
|
|
2991
|
-
return
|
|
2991
|
+
return i.extension?.length && (i.extension.includes(".") ? m = `${m}/${i.extension}` : m = `${m}/${a}.${i.extension}`), e.api.generateEndpointURL(m, n, i);
|
|
2992
2992
|
}, r.filesize = function(a, t) {
|
|
2993
2993
|
if (a == 0) return "0 Bytes";
|
|
2994
|
-
var n = 1024,
|
|
2995
|
-
return parseFloat((a / Math.pow(n, l)).toFixed(
|
|
2994
|
+
var n = 1024, i = t || 2, m = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], l = Math.floor(Math.log(a) / Math.log(n));
|
|
2995
|
+
return parseFloat((a / Math.pow(n, l)).toFixed(i)) + " " + m[l];
|
|
2996
2996
|
}, r.getBinaryTypeFromMime = function(a) {
|
|
2997
2997
|
if (!a)
|
|
2998
2998
|
return "file";
|
|
@@ -3063,47 +3063,17 @@ var Ue = {}, Ot = {
|
|
|
3063
3063
|
"Can't Instantiate QikAccess before QikCore.utils has been initialized"
|
|
3064
3064
|
);
|
|
3065
3065
|
var r = {};
|
|
3066
|
-
return r.
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
products: 4,
|
|
3070
|
-
checkin: 8,
|
|
3071
|
-
events: 16,
|
|
3072
|
-
ticketing: 32,
|
|
3073
|
-
emails: 64,
|
|
3074
|
-
sms: 128,
|
|
3075
|
-
images: 256,
|
|
3076
|
-
actions: 512,
|
|
3077
|
-
timers: 1024,
|
|
3078
|
-
listenertriggers: 2048,
|
|
3079
|
-
builder: 4096,
|
|
3080
|
-
scopes: 8192,
|
|
3081
|
-
components: 16384,
|
|
3082
|
-
video: 32768,
|
|
3083
|
-
audio: 65536,
|
|
3084
|
-
files: 131072,
|
|
3085
|
-
developer: 262144,
|
|
3086
|
-
notifications: 524288,
|
|
3087
|
-
payments: 1048576,
|
|
3088
|
-
comments: 2097152,
|
|
3089
|
-
workflows: 4194304,
|
|
3090
|
-
forms: 8388608
|
|
3091
|
-
}, r.featureIsIncludedInByteflag = function(a, t) {
|
|
3092
|
-
return (a & r.featureFlags[t]) === r.featureFlags[t];
|
|
3093
|
-
}, r.hasFeature = function(a, t) {
|
|
3094
|
-
const n = a?.organisation || {}, o = n.features || {};
|
|
3095
|
-
if (o.all || o[t])
|
|
3096
|
-
return !0;
|
|
3097
|
-
const m = n.ff;
|
|
3098
|
-
return r.featureIsIncludedInByteflag(m, "all") ? !0 : r.featureIsIncludedInByteflag(m, t);
|
|
3066
|
+
return r.hasFeature = function(a, t) {
|
|
3067
|
+
const n = a?.organisation?.features || {};
|
|
3068
|
+
return n.all ? !0 : !!n[t];
|
|
3099
3069
|
}, r.isAdministrator = function(a) {
|
|
3100
3070
|
return a && a?.userType == "administrator";
|
|
3101
3071
|
}, r.getAllDescendants = function(a) {
|
|
3102
3072
|
var t = [];
|
|
3103
3073
|
n(a);
|
|
3104
|
-
function n(
|
|
3105
|
-
var m = e.utils.id(
|
|
3106
|
-
t.push(m), (
|
|
3074
|
+
function n(i) {
|
|
3075
|
+
var m = e.utils.id(i);
|
|
3076
|
+
t.push(m), (i.children || []).forEach(function(l) {
|
|
3107
3077
|
n(l);
|
|
3108
3078
|
});
|
|
3109
3079
|
}
|
|
@@ -3111,8 +3081,8 @@ var Ue = {}, Ot = {
|
|
|
3111
3081
|
}, r.hashPermissions = function(a) {
|
|
3112
3082
|
var t = {};
|
|
3113
3083
|
for (var n in a?.permissions || {}) {
|
|
3114
|
-
var
|
|
3115
|
-
(
|
|
3084
|
+
var i = a?.permissions[n], m = r.getAllDescendants(i);
|
|
3085
|
+
(i.permissions || []).forEach(function(l) {
|
|
3116
3086
|
t[l] || (t[l] = []), t[l] = [
|
|
3117
3087
|
...new Set(t[l].concat(m))
|
|
3118
3088
|
];
|
|
@@ -3121,50 +3091,50 @@ var Ue = {}, Ot = {
|
|
|
3121
3091
|
return t;
|
|
3122
3092
|
}, r.allUserScopes = function(a) {
|
|
3123
3093
|
var t = {}, n = a?.permissions || {};
|
|
3124
|
-
function
|
|
3094
|
+
function i(l) {
|
|
3125
3095
|
if (l) {
|
|
3126
3096
|
var p = e.utils.id(l);
|
|
3127
3097
|
p && (t[p] = 1, l.children && l.children.length && l.children.forEach(function(y) {
|
|
3128
|
-
|
|
3098
|
+
i(y);
|
|
3129
3099
|
}));
|
|
3130
3100
|
}
|
|
3131
3101
|
}
|
|
3132
3102
|
for (var m in n)
|
|
3133
|
-
|
|
3103
|
+
i(n[m]);
|
|
3134
3104
|
return Object.keys(t);
|
|
3135
|
-
}, r.actionableScopes = function(a, t, n,
|
|
3105
|
+
}, r.actionableScopes = function(a, t, n, i, m) {
|
|
3136
3106
|
m = m || {};
|
|
3137
3107
|
var l = [];
|
|
3138
3108
|
if (a?.userType == "administrator")
|
|
3139
3109
|
l = r.allUserScopes(a, m);
|
|
3140
3110
|
else {
|
|
3141
|
-
var p = r.hashPermissions(a), y = n ||
|
|
3111
|
+
var p = r.hashPermissions(a), y = n || i;
|
|
3142
3112
|
if (!y)
|
|
3143
3113
|
return l;
|
|
3144
|
-
let w = n ? p[`${n}.${t}`] || [] : [],
|
|
3145
|
-
l = [...w, ...
|
|
3114
|
+
let w = n ? p[`${n}.${t}`] || [] : [], A = i ? p[`${i}.${t}`] || [] : [];
|
|
3115
|
+
l = [...w, ...A];
|
|
3146
3116
|
}
|
|
3147
3117
|
return l || [];
|
|
3148
3118
|
}, r.isOwner = function(a, t) {
|
|
3149
|
-
var n = e.utils.id(a),
|
|
3119
|
+
var n = e.utils.id(a), i = e.utils.id(a?.persona), m = t.meta;
|
|
3150
3120
|
if (!m)
|
|
3151
3121
|
return !1;
|
|
3152
3122
|
var l = m.userOwners || [], p = e.utils.ids([...l, m.userAuthor]), y = e.utils.hash(p);
|
|
3153
3123
|
if (y[n])
|
|
3154
3124
|
return !0;
|
|
3155
|
-
var w = m.personaOwners || [],
|
|
3125
|
+
var w = m.personaOwners || [], A = e.utils.ids([
|
|
3156
3126
|
...w,
|
|
3157
3127
|
m.personaAuthor
|
|
3158
|
-
]),
|
|
3159
|
-
return
|
|
3128
|
+
]), s = e.utils.hash(A);
|
|
3129
|
+
return s[i] ? !0 : r.isAssignee(a, t);
|
|
3160
3130
|
}, r.isAssignee = function(a, t) {
|
|
3161
3131
|
const n = e.utils.ids(a?.profiles);
|
|
3162
3132
|
if (!n.length)
|
|
3163
3133
|
return !1;
|
|
3164
|
-
const
|
|
3165
|
-
if (!
|
|
3134
|
+
const i = e.utils.ids(t.assignees);
|
|
3135
|
+
if (!i.length)
|
|
3166
3136
|
return !1;
|
|
3167
|
-
const m = new Set(
|
|
3137
|
+
const m = new Set(i);
|
|
3168
3138
|
return !!n.filter((y) => m.has(y)).length;
|
|
3169
3139
|
}, r.allPermissions = function(a) {
|
|
3170
3140
|
var t = Object.values(a?.permissions || {}).map(function(n) {
|
|
@@ -3172,21 +3142,21 @@ var Ue = {}, Ot = {
|
|
|
3172
3142
|
}).flat();
|
|
3173
3143
|
return t;
|
|
3174
3144
|
}, r.allPermissionTypes = function(a, t) {
|
|
3175
|
-
return t ? r.allPermissions(a).reduce(function(n,
|
|
3176
|
-
var m =
|
|
3145
|
+
return t ? r.allPermissions(a).reduce(function(n, i) {
|
|
3146
|
+
var m = i.split(".")[0];
|
|
3177
3147
|
return n[m] = !0, n;
|
|
3178
3148
|
}, {}) : r.allPermissions(a).map(function(n) {
|
|
3179
3149
|
return n.split(".")[0];
|
|
3180
3150
|
});
|
|
3181
3151
|
}, r.canKnowOf = function(a, t, n) {
|
|
3182
3152
|
return n = n || {}, n.cache = n.cache || {}, r.allPermissionTypes(a, !0)[t];
|
|
3183
|
-
}, r.checkActionAccess = function(a, t, n,
|
|
3153
|
+
}, r.checkActionAccess = function(a, t, n, i, m) {
|
|
3184
3154
|
if (m = m || {}, m.cache = m.cache || {}, r.isAdministrator(a))
|
|
3185
3155
|
return !0;
|
|
3186
3156
|
var l = t.meta?.type, p = t.meta?.definition || l;
|
|
3187
3157
|
if (!p)
|
|
3188
3158
|
return !1;
|
|
3189
|
-
if ((n == "listany" ||
|
|
3159
|
+
if ((n == "listany" || i == "listown") && l === "scope") {
|
|
3190
3160
|
var y = e.utils.id(t);
|
|
3191
3161
|
return !!a.permissions[y];
|
|
3192
3162
|
}
|
|
@@ -3195,38 +3165,38 @@ var Ue = {}, Ot = {
|
|
|
3195
3165
|
...e.utils.ids(t.path || []),
|
|
3196
3166
|
e.utils.id(t)
|
|
3197
3167
|
]);
|
|
3198
|
-
var
|
|
3199
|
-
if (m.cache[
|
|
3200
|
-
|
|
3168
|
+
var A, s = `access-${a?.cacheKey}-${n}-${p}-${l}`;
|
|
3169
|
+
if (m.cache[s])
|
|
3170
|
+
A = m.cache[s];
|
|
3201
3171
|
else {
|
|
3202
|
-
var
|
|
3172
|
+
var o = e.utils.ids(
|
|
3203
3173
|
r.actionableScopes(a, n, p, l, m)
|
|
3204
3174
|
);
|
|
3205
|
-
|
|
3175
|
+
A = e.utils.hash(o), m.cache[s] = A;
|
|
3206
3176
|
}
|
|
3207
|
-
if (
|
|
3208
|
-
var
|
|
3209
|
-
return
|
|
3177
|
+
if (A) {
|
|
3178
|
+
var f = w.some(function(P) {
|
|
3179
|
+
return A[P];
|
|
3210
3180
|
});
|
|
3211
|
-
if (
|
|
3181
|
+
if (f)
|
|
3212
3182
|
return !0;
|
|
3213
3183
|
}
|
|
3214
|
-
var
|
|
3215
|
-
if (
|
|
3216
|
-
var
|
|
3217
|
-
if (m.cache[
|
|
3218
|
-
|
|
3184
|
+
var g = r.isOwner(a, t);
|
|
3185
|
+
if (g) {
|
|
3186
|
+
var c, u = `access-${a?.cacheKey}-${i}-${p}-${l}`;
|
|
3187
|
+
if (m.cache[u])
|
|
3188
|
+
c = m.cache[u];
|
|
3219
3189
|
else {
|
|
3220
|
-
var
|
|
3221
|
-
r.actionableScopes(a,
|
|
3190
|
+
var b = e.utils.ids(
|
|
3191
|
+
r.actionableScopes(a, i, p, l, m)
|
|
3222
3192
|
);
|
|
3223
|
-
|
|
3193
|
+
c = e.utils.hash(b), m.cache[u] = c;
|
|
3224
3194
|
}
|
|
3225
|
-
if (
|
|
3226
|
-
var
|
|
3227
|
-
return
|
|
3195
|
+
if (c) {
|
|
3196
|
+
var S = w.some(function(P) {
|
|
3197
|
+
return c[P];
|
|
3228
3198
|
});
|
|
3229
|
-
if (
|
|
3199
|
+
if (S)
|
|
3230
3200
|
return !0;
|
|
3231
3201
|
}
|
|
3232
3202
|
}
|
|
@@ -3236,8 +3206,8 @@ var Ue = {}, Ot = {
|
|
|
3236
3206
|
return !0;
|
|
3237
3207
|
var n = r.hashPermissions(a);
|
|
3238
3208
|
return n[t];
|
|
3239
|
-
}, r.canCreate = function(a, t, n,
|
|
3240
|
-
if (
|
|
3209
|
+
}, r.canCreate = function(a, t, n, i) {
|
|
3210
|
+
if (i = i || {}, i.cache = i.cache || {}, r.isAdministrator(a))
|
|
3241
3211
|
return !0;
|
|
3242
3212
|
var m = r.actionableScopes(
|
|
3243
3213
|
a,
|
|
@@ -3248,40 +3218,40 @@ var Ue = {}, Ot = {
|
|
|
3248
3218
|
return m.length;
|
|
3249
3219
|
}, r.canListItem = function(a, t, n) {
|
|
3250
3220
|
n = n || {}, n.cache = n.cache || {};
|
|
3251
|
-
var
|
|
3221
|
+
var i = r.checkActionAccess(
|
|
3252
3222
|
a,
|
|
3253
3223
|
t,
|
|
3254
3224
|
"listany",
|
|
3255
3225
|
"listown",
|
|
3256
3226
|
n
|
|
3257
3227
|
);
|
|
3258
|
-
if (
|
|
3228
|
+
if (i)
|
|
3259
3229
|
return !0;
|
|
3260
3230
|
var m = r.canViewItem(a, t, n);
|
|
3261
3231
|
return !!m;
|
|
3262
3232
|
}, r.canViewItem = function(a, t, n) {
|
|
3263
3233
|
n = n || {}, n.cache = n.cache || {};
|
|
3264
|
-
var
|
|
3234
|
+
var i = r.checkActionAccess(
|
|
3265
3235
|
a,
|
|
3266
3236
|
t,
|
|
3267
3237
|
"viewany",
|
|
3268
3238
|
"viewOwn",
|
|
3269
3239
|
n
|
|
3270
3240
|
);
|
|
3271
|
-
if (
|
|
3241
|
+
if (i)
|
|
3272
3242
|
return !0;
|
|
3273
3243
|
var m = r.canEditItem(a, t, n);
|
|
3274
3244
|
return !!m;
|
|
3275
3245
|
}, r.canEditItem = function(a, t, n) {
|
|
3276
3246
|
n = n || {}, n.cache = n.cache || {};
|
|
3277
|
-
var
|
|
3247
|
+
var i = r.checkActionAccess(
|
|
3278
3248
|
a,
|
|
3279
3249
|
t,
|
|
3280
3250
|
"editany",
|
|
3281
3251
|
"editown",
|
|
3282
3252
|
n
|
|
3283
3253
|
);
|
|
3284
|
-
return
|
|
3254
|
+
return i;
|
|
3285
3255
|
}, r.canDeleteItem = function(a, t, n) {
|
|
3286
3256
|
return n = n || {}, n.cache = n.cache || {}, r.checkActionAccess(
|
|
3287
3257
|
a,
|
|
@@ -3308,7 +3278,7 @@ var Ue = {}, Ot = {
|
|
|
3308
3278
|
);
|
|
3309
3279
|
}, r;
|
|
3310
3280
|
};
|
|
3311
|
-
function
|
|
3281
|
+
function Rt(e) {
|
|
3312
3282
|
if (!e.api)
|
|
3313
3283
|
throw new Error("Can't Instantiate QikContent before QikAPI exists");
|
|
3314
3284
|
var r = {
|
|
@@ -3317,144 +3287,144 @@ function It(e) {
|
|
|
3317
3287
|
};
|
|
3318
3288
|
const a = {};
|
|
3319
3289
|
let t;
|
|
3320
|
-
r.variables = async function(
|
|
3321
|
-
|
|
3322
|
-
var
|
|
3323
|
-
if (
|
|
3290
|
+
r.variables = async function(s, o) {
|
|
3291
|
+
o = o || {}, s = s || [];
|
|
3292
|
+
var f = o.refresh || o.reload || !a.data;
|
|
3293
|
+
if (f) {
|
|
3324
3294
|
if (!t) {
|
|
3325
|
-
let
|
|
3295
|
+
let c = function() {
|
|
3326
3296
|
t = null;
|
|
3327
3297
|
};
|
|
3328
|
-
t = e.api.post("/variables", { keys:
|
|
3298
|
+
t = e.api.post("/variables", { keys: s }), t.then(c, c);
|
|
3329
3299
|
}
|
|
3330
|
-
const { data:
|
|
3331
|
-
a.data =
|
|
3300
|
+
const { data: g } = await t;
|
|
3301
|
+
a.data = g, e.dispatch("variables", g);
|
|
3332
3302
|
}
|
|
3333
3303
|
return a.data;
|
|
3334
3304
|
};
|
|
3335
3305
|
const n = e.cache.get("user:glossary");
|
|
3336
|
-
let
|
|
3306
|
+
let i;
|
|
3337
3307
|
function m() {
|
|
3338
|
-
return new Promise((
|
|
3339
|
-
typeof requestIdleCallback == "function" ? requestIdleCallback(
|
|
3308
|
+
return new Promise((s) => {
|
|
3309
|
+
typeof requestIdleCallback == "function" ? requestIdleCallback(s, { timeout: 50 }) : setTimeout(s, 0);
|
|
3340
3310
|
});
|
|
3341
3311
|
}
|
|
3342
|
-
async function l({ _s:
|
|
3343
|
-
function
|
|
3344
|
-
if (typeof
|
|
3345
|
-
return
|
|
3346
|
-
if (Array.isArray(
|
|
3347
|
-
if (
|
|
3348
|
-
const
|
|
3349
|
-
for (const [P, x] of Object.entries(
|
|
3350
|
-
|
|
3351
|
-
return
|
|
3312
|
+
async function l({ _s: s, _k: o, types: f }) {
|
|
3313
|
+
function g(b) {
|
|
3314
|
+
if (typeof b == "string" && b[0] === "~")
|
|
3315
|
+
return s[parseInt(b.slice(1))];
|
|
3316
|
+
if (Array.isArray(b)) return b.map(g);
|
|
3317
|
+
if (b && typeof b == "object") {
|
|
3318
|
+
const S = {};
|
|
3319
|
+
for (const [P, x] of Object.entries(b))
|
|
3320
|
+
S[o[P] || P] = g(x);
|
|
3321
|
+
return S;
|
|
3352
3322
|
}
|
|
3353
|
-
return
|
|
3323
|
+
return b;
|
|
3354
3324
|
}
|
|
3355
|
-
const
|
|
3356
|
-
for (let
|
|
3357
|
-
const
|
|
3358
|
-
|
|
3325
|
+
const c = 50, u = [];
|
|
3326
|
+
for (let b = 0; b < f.length; b += c) {
|
|
3327
|
+
const S = f.slice(b, b + c);
|
|
3328
|
+
u.push(...S.map(g)), b + c < f.length && await m();
|
|
3359
3329
|
}
|
|
3360
|
-
return
|
|
3330
|
+
return u;
|
|
3361
3331
|
}
|
|
3362
|
-
r.glossary = async function(
|
|
3363
|
-
|
|
3364
|
-
let
|
|
3365
|
-
var
|
|
3366
|
-
if (
|
|
3367
|
-
if (!
|
|
3332
|
+
r.glossary = async function(s) {
|
|
3333
|
+
s = s || {};
|
|
3334
|
+
let o = n.get("glossary"), g = !!!s.uncompressed;
|
|
3335
|
+
var c = s.refresh || s.reload || !o;
|
|
3336
|
+
if (c) {
|
|
3337
|
+
if (!i) {
|
|
3368
3338
|
let x = function() {
|
|
3369
|
-
|
|
3339
|
+
i = null, r.loadingGlossary = !1;
|
|
3370
3340
|
};
|
|
3371
3341
|
r.loadingGlossary = !0;
|
|
3372
|
-
const P =
|
|
3373
|
-
|
|
3342
|
+
const P = g ? "/glossary/compressed" : "/glossary";
|
|
3343
|
+
i = e.api.get(P, { cache: !1 }), i.then(x, x);
|
|
3374
3344
|
}
|
|
3375
|
-
const { data:
|
|
3376
|
-
n.set("glossary",
|
|
3345
|
+
const { data: b } = await i, S = b._s && b._k && b.types ? await l(b) : b;
|
|
3346
|
+
n.set("glossary", S), o = S, e.dispatch("glossary", S);
|
|
3377
3347
|
}
|
|
3378
|
-
if (
|
|
3379
|
-
var
|
|
3380
|
-
return
|
|
3348
|
+
if (s.hash) {
|
|
3349
|
+
var u = e.utils.hash(o, "key");
|
|
3350
|
+
return u;
|
|
3381
3351
|
}
|
|
3382
|
-
if (
|
|
3383
|
-
var
|
|
3384
|
-
return
|
|
3352
|
+
if (s.hex) {
|
|
3353
|
+
var u = e.utils.hash(o, "hex");
|
|
3354
|
+
return u;
|
|
3385
3355
|
}
|
|
3386
|
-
return
|
|
3356
|
+
return o;
|
|
3387
3357
|
};
|
|
3388
3358
|
const p = {};
|
|
3389
3359
|
let y;
|
|
3390
|
-
r.scopeGlossary = async function(
|
|
3391
|
-
|
|
3392
|
-
var
|
|
3393
|
-
if (
|
|
3360
|
+
r.scopeGlossary = async function(s) {
|
|
3361
|
+
s = s || {};
|
|
3362
|
+
var o = s.refresh || s.reload || !p.data;
|
|
3363
|
+
if (o) {
|
|
3394
3364
|
if (!y) {
|
|
3395
|
-
let
|
|
3365
|
+
let c = function() {
|
|
3396
3366
|
y = null;
|
|
3397
3367
|
};
|
|
3398
3368
|
y = e.api.get("/scope/glossary", {
|
|
3399
3369
|
cache: !1
|
|
3400
|
-
}), y.then(
|
|
3370
|
+
}), y.then(c, c);
|
|
3401
3371
|
}
|
|
3402
|
-
const { data:
|
|
3403
|
-
p.data =
|
|
3372
|
+
const { data: g } = await y;
|
|
3373
|
+
p.data = g;
|
|
3404
3374
|
}
|
|
3405
|
-
if (
|
|
3406
|
-
var
|
|
3407
|
-
return
|
|
3375
|
+
if (s.hash) {
|
|
3376
|
+
var f = e.utils.hash(p.data, "_id");
|
|
3377
|
+
return f;
|
|
3408
3378
|
}
|
|
3409
3379
|
return p.data;
|
|
3410
3380
|
};
|
|
3411
3381
|
const w = {};
|
|
3412
|
-
r.comparators = async function(
|
|
3413
|
-
|
|
3414
|
-
var
|
|
3415
|
-
if (
|
|
3416
|
-
const { data:
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
return
|
|
3382
|
+
r.comparators = async function(s) {
|
|
3383
|
+
s = s || {};
|
|
3384
|
+
var o = s.reload || s.refresh || !w.data;
|
|
3385
|
+
if (o) {
|
|
3386
|
+
const { data: f } = await e.api.get("/system/comparators");
|
|
3387
|
+
f.available = {}, Object.entries(f.types).forEach(([g, c]) => {
|
|
3388
|
+
f.available[g] = c.map(function(u) {
|
|
3389
|
+
return f.hash[u];
|
|
3420
3390
|
});
|
|
3421
|
-
}), w.data =
|
|
3391
|
+
}), w.data = f;
|
|
3422
3392
|
}
|
|
3423
3393
|
return w.data;
|
|
3424
3394
|
};
|
|
3425
|
-
function
|
|
3426
|
-
var { minimum:
|
|
3427
|
-
return
|
|
3428
|
-
}
|
|
3429
|
-
return r.meetsValidationRequirements = function(
|
|
3430
|
-
if (
|
|
3431
|
-
var
|
|
3432
|
-
if (
|
|
3433
|
-
return `Must be at least ${
|
|
3395
|
+
function A(s) {
|
|
3396
|
+
var { minimum: o, maximum: f } = s;
|
|
3397
|
+
return o = e.utils.parseInt(o), o = Math.max(o, 0), f = e.utils.parseInt(f), f = Math.max(f, 0), f == 0 || (f = Math.max(f, o)), { minimum: o, maximum: f };
|
|
3398
|
+
}
|
|
3399
|
+
return r.meetsValidationRequirements = function(s, o, f) {
|
|
3400
|
+
if (f.minLength) {
|
|
3401
|
+
var g = String(s).length;
|
|
3402
|
+
if (g < f.minLength)
|
|
3403
|
+
return `Must be at least ${f.minLength} characters`;
|
|
3434
3404
|
}
|
|
3435
|
-
if (
|
|
3436
|
-
var
|
|
3437
|
-
if (
|
|
3438
|
-
return `Can be no more than ${
|
|
3405
|
+
if (f.maxLength) {
|
|
3406
|
+
var g = String(s).length;
|
|
3407
|
+
if (g > f.maxLength)
|
|
3408
|
+
return `Can be no more than ${f.maxLength} characters`;
|
|
3439
3409
|
}
|
|
3440
|
-
if (
|
|
3441
|
-
var
|
|
3442
|
-
if (
|
|
3443
|
-
return `Must be at least ${
|
|
3410
|
+
if (f.minValue && s !== void 0) {
|
|
3411
|
+
var c = Number(s);
|
|
3412
|
+
if (c < f.minValue)
|
|
3413
|
+
return `Must be at least ${f.minValue}`;
|
|
3444
3414
|
}
|
|
3445
|
-
if (
|
|
3446
|
-
var
|
|
3447
|
-
if (
|
|
3448
|
-
return `Can be no greater than ${
|
|
3415
|
+
if (f.maxValue && s !== void 0) {
|
|
3416
|
+
var c = Number(s);
|
|
3417
|
+
if (c > f.maxValue)
|
|
3418
|
+
return `Can be no greater than ${f.maxValue}`;
|
|
3449
3419
|
}
|
|
3450
|
-
}, r.validateField = function(
|
|
3451
|
-
|
|
3452
|
-
var
|
|
3453
|
-
if (
|
|
3420
|
+
}, r.validateField = function(s, o, f) {
|
|
3421
|
+
f = f || {};
|
|
3422
|
+
var g = o.type || "string", { minimum: c, maximum: u } = A(o), b = o.type == "group" && o.asObject, S = b ? c === u && u === 1 : u === 1, P = !S, x = e.utils.exists(s);
|
|
3423
|
+
if (o.type === "boolean" && s !== !0 && (x = !1), c) {
|
|
3454
3424
|
if (!x)
|
|
3455
3425
|
return {
|
|
3456
3426
|
valid: !1,
|
|
3457
|
-
message: `${
|
|
3427
|
+
message: `${o.title} is a required field`,
|
|
3458
3428
|
status: 400
|
|
3459
3429
|
};
|
|
3460
3430
|
} else if (!x)
|
|
@@ -3462,95 +3432,95 @@ function It(e) {
|
|
|
3462
3432
|
valid: !0
|
|
3463
3433
|
};
|
|
3464
3434
|
if (P) {
|
|
3465
|
-
if (!Array.isArray(
|
|
3466
|
-
return
|
|
3435
|
+
if (!Array.isArray(s))
|
|
3436
|
+
return c ? {
|
|
3467
3437
|
valid: !1,
|
|
3468
|
-
message: `${
|
|
3438
|
+
message: `${o.title} requires at least ${c} values`,
|
|
3469
3439
|
status: 400
|
|
3470
|
-
} : (console.log("NOT PROVIDED AS ARRAY",
|
|
3440
|
+
} : (console.log("NOT PROVIDED AS ARRAY", o.title, s), {
|
|
3471
3441
|
valid: !1,
|
|
3472
|
-
message: `${
|
|
3442
|
+
message: `${o.title} must be provided as an array`,
|
|
3473
3443
|
status: 400
|
|
3474
3444
|
});
|
|
3475
|
-
var
|
|
3476
|
-
if (
|
|
3477
|
-
var
|
|
3478
|
-
return !
|
|
3479
|
-
}),
|
|
3445
|
+
var T = s;
|
|
3446
|
+
if (T = T.filter(function(I) {
|
|
3447
|
+
var k = I == null || I === "";
|
|
3448
|
+
return !k;
|
|
3449
|
+
}), c == u && c && T.length != c)
|
|
3480
3450
|
return {
|
|
3481
3451
|
valid: !1,
|
|
3482
|
-
message: `${
|
|
3452
|
+
message: `${o.title} requires exactly ${u} values`,
|
|
3483
3453
|
status: 400
|
|
3484
3454
|
};
|
|
3485
|
-
if (
|
|
3455
|
+
if (u && T.length > u)
|
|
3486
3456
|
return {
|
|
3487
3457
|
valid: !1,
|
|
3488
|
-
message: `${
|
|
3458
|
+
message: `${o.title} requires less than ${u + 1} values`,
|
|
3489
3459
|
status: 400
|
|
3490
3460
|
};
|
|
3491
|
-
if (
|
|
3461
|
+
if (T.length < c)
|
|
3492
3462
|
return {
|
|
3493
3463
|
valid: !1,
|
|
3494
|
-
message: `${
|
|
3464
|
+
message: `${o.title} requires at least ${c} values`,
|
|
3495
3465
|
status: 400
|
|
3496
3466
|
};
|
|
3497
|
-
var
|
|
3498
|
-
if (
|
|
3499
|
-
var
|
|
3500
|
-
|
|
3467
|
+
var L;
|
|
3468
|
+
if (T.find(function(I) {
|
|
3469
|
+
var k = g;
|
|
3470
|
+
o.type === "group" && (k = "object"), o.type === "reference" && o.widget === "form" && (k = "object");
|
|
3501
3471
|
var U = e.utils.isValidValue(
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3472
|
+
I,
|
|
3473
|
+
k,
|
|
3474
|
+
f.strict
|
|
3505
3475
|
);
|
|
3506
3476
|
if (!U)
|
|
3507
|
-
return
|
|
3508
|
-
if (
|
|
3477
|
+
return L = !0, !0;
|
|
3478
|
+
if (o.validation) {
|
|
3509
3479
|
var z = r.meetsValidationRequirements(
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3480
|
+
I,
|
|
3481
|
+
g,
|
|
3482
|
+
o.validation
|
|
3513
3483
|
);
|
|
3514
3484
|
if (z)
|
|
3515
|
-
return
|
|
3485
|
+
return L = !0, !0;
|
|
3516
3486
|
}
|
|
3517
|
-
}),
|
|
3487
|
+
}), L)
|
|
3518
3488
|
return {
|
|
3519
3489
|
valid: !1,
|
|
3520
|
-
message: `Invalid input for ${
|
|
3490
|
+
message: `Invalid input for ${o.title}`,
|
|
3521
3491
|
status: 400
|
|
3522
3492
|
};
|
|
3523
3493
|
} else {
|
|
3524
|
-
var M =
|
|
3494
|
+
var M = g, V = o.widget;
|
|
3525
3495
|
M === "group" && (M = "object"), M === "reference" && V === "form" && (M = "object");
|
|
3526
|
-
var $ = r.getCleanedValue(
|
|
3496
|
+
var $ = r.getCleanedValue(s, M, f), N = e.utils.isValidValue(
|
|
3527
3497
|
$,
|
|
3528
3498
|
M,
|
|
3529
|
-
|
|
3499
|
+
f.strict
|
|
3530
3500
|
);
|
|
3531
|
-
if (!
|
|
3501
|
+
if (!N)
|
|
3532
3502
|
return {
|
|
3533
3503
|
valid: !1,
|
|
3534
|
-
message: `Single value '${
|
|
3504
|
+
message: `Single value '${s}' is not a valid ${M} for ${o.title}`,
|
|
3535
3505
|
criteria: {
|
|
3536
|
-
isValidValue:
|
|
3506
|
+
isValidValue: N,
|
|
3537
3507
|
cleanedValue: $,
|
|
3538
|
-
fieldType:
|
|
3539
|
-
options:
|
|
3508
|
+
fieldType: g,
|
|
3509
|
+
options: f
|
|
3540
3510
|
},
|
|
3541
3511
|
status: 400
|
|
3542
3512
|
};
|
|
3543
|
-
let
|
|
3544
|
-
const
|
|
3545
|
-
if (String(
|
|
3513
|
+
let I = !1;
|
|
3514
|
+
const k = {};
|
|
3515
|
+
if (String(o.minValue) && (k.minValue = parseInt(o.minValue), I = !0), String(o.maxValue) && (k.maxValue = parseInt(o.maxValue), I = !0), String(o.minLength) && (k.minLength = parseInt(o.minLength), I = !0), String(o.maxLength) && (k.maxLength = parseInt(o.maxLength), I = !0), I) {
|
|
3546
3516
|
const U = Object.assign(
|
|
3547
3517
|
{},
|
|
3548
|
-
|
|
3549
|
-
|
|
3518
|
+
k,
|
|
3519
|
+
o.validation || {}
|
|
3550
3520
|
);
|
|
3551
3521
|
var F = r.meetsValidationRequirements(
|
|
3552
|
-
|
|
3553
|
-
|
|
3522
|
+
s,
|
|
3523
|
+
g,
|
|
3554
3524
|
U
|
|
3555
3525
|
);
|
|
3556
3526
|
if (F)
|
|
@@ -3564,104 +3534,104 @@ function It(e) {
|
|
|
3564
3534
|
return {
|
|
3565
3535
|
valid: !0
|
|
3566
3536
|
};
|
|
3567
|
-
}, r.getCleanedValue = function(
|
|
3568
|
-
switch (
|
|
3537
|
+
}, r.getCleanedValue = function(s, o, f) {
|
|
3538
|
+
switch (o) {
|
|
3569
3539
|
case "number":
|
|
3570
3540
|
case "float":
|
|
3571
3541
|
case "decimal":
|
|
3572
|
-
return e.utils.exists(
|
|
3542
|
+
return e.utils.exists(s) ? Number(s) : void 0;
|
|
3573
3543
|
case "integer":
|
|
3574
|
-
return e.utils.exists(
|
|
3544
|
+
return e.utils.exists(s) ? parseInt(s) : void 0;
|
|
3575
3545
|
case "boolean":
|
|
3576
|
-
return e.utils.exists(
|
|
3546
|
+
return e.utils.exists(s) ? e.utils.parseBoolean(s) : void 0;
|
|
3577
3547
|
case "email":
|
|
3578
|
-
return
|
|
3548
|
+
return f.strict ? s : String(s).toLowerCase();
|
|
3579
3549
|
case "reference":
|
|
3580
|
-
return
|
|
3550
|
+
return f.strict ? s : e.utils.id(s);
|
|
3581
3551
|
default:
|
|
3582
|
-
return
|
|
3552
|
+
return f.strict ? s : e.utils.cleanValue(s, o, f);
|
|
3583
3553
|
}
|
|
3584
|
-
return
|
|
3585
|
-
}, r.list = async function(
|
|
3586
|
-
|
|
3587
|
-
const
|
|
3588
|
-
if (
|
|
3589
|
-
|
|
3590
|
-
const
|
|
3591
|
-
return
|
|
3592
|
-
promise: e.api.post(
|
|
3593
|
-
cancel(
|
|
3594
|
-
|
|
3554
|
+
return s;
|
|
3555
|
+
}, r.list = async function(s, o, f) {
|
|
3556
|
+
f || (f = {});
|
|
3557
|
+
const g = f.remoteURL || `/content/${s}/list`;
|
|
3558
|
+
if (f.cancellable) {
|
|
3559
|
+
f.config || (f.config = {});
|
|
3560
|
+
const u = e.api.CancelToken.source();
|
|
3561
|
+
return f.config.cancelToken = u.token, {
|
|
3562
|
+
promise: e.api.post(g, o, f.config),
|
|
3563
|
+
cancel(S) {
|
|
3564
|
+
u.cancel(S || "Operation canceled by the user.");
|
|
3595
3565
|
}
|
|
3596
3566
|
};
|
|
3597
3567
|
} else {
|
|
3598
|
-
const { data:
|
|
3599
|
-
return
|
|
3568
|
+
const { data: c } = await e.api.post(g, o, f.config);
|
|
3569
|
+
return c;
|
|
3600
3570
|
}
|
|
3601
|
-
}, r.create = async function(
|
|
3602
|
-
const
|
|
3603
|
-
|
|
3604
|
-
const { data:
|
|
3605
|
-
return
|
|
3606
|
-
}, r.update = async function(
|
|
3607
|
-
|
|
3608
|
-
const
|
|
3609
|
-
|
|
3610
|
-
const { data:
|
|
3611
|
-
return
|
|
3612
|
-
}, r.patch = async function(
|
|
3613
|
-
|
|
3614
|
-
const
|
|
3615
|
-
|
|
3616
|
-
const { data:
|
|
3617
|
-
return
|
|
3618
|
-
}, r.get = async function(
|
|
3619
|
-
|
|
3620
|
-
const { data:
|
|
3621
|
-
return
|
|
3622
|
-
}, r.getFromID = async function(
|
|
3623
|
-
return r.get(
|
|
3624
|
-
}, r.delete = async function(
|
|
3625
|
-
|
|
3626
|
-
const { data:
|
|
3627
|
-
return
|
|
3628
|
-
}, r.restore = async function(
|
|
3629
|
-
|
|
3630
|
-
const { data:
|
|
3631
|
-
return
|
|
3632
|
-
}, r.getFromSlug = async function(
|
|
3633
|
-
const { data:
|
|
3634
|
-
return
|
|
3571
|
+
}, r.create = async function(s, o) {
|
|
3572
|
+
const f = { ...o };
|
|
3573
|
+
f.meta?.scopes && (f.meta.scopes = e.utils.ids(f.meta.scopes));
|
|
3574
|
+
const { data: g } = await e.api.post(`/content/${s}/create`, f);
|
|
3575
|
+
return g;
|
|
3576
|
+
}, r.update = async function(s, o) {
|
|
3577
|
+
s = e.utils.id(s);
|
|
3578
|
+
const f = { ...o };
|
|
3579
|
+
f.meta?.scopes && (f.meta.scopes = e.utils.ids(f.meta.scopes));
|
|
3580
|
+
const { data: g } = await e.api.put(`/content/${s}`, f);
|
|
3581
|
+
return g;
|
|
3582
|
+
}, r.patch = async function(s, o) {
|
|
3583
|
+
s = e.utils.id(s);
|
|
3584
|
+
const f = { ...o };
|
|
3585
|
+
f.meta?.scopes && (f.meta.scopes = e.utils.ids(f.meta.scopes));
|
|
3586
|
+
const { data: g } = await e.api.patch(`/content/${s}`, f);
|
|
3587
|
+
return g;
|
|
3588
|
+
}, r.get = async function(s, o) {
|
|
3589
|
+
s = e.utils.id(s), o = o || {};
|
|
3590
|
+
const { data: f } = await e.api.get(`/content/${s}`, o);
|
|
3591
|
+
return f;
|
|
3592
|
+
}, r.getFromID = async function(s) {
|
|
3593
|
+
return r.get(s);
|
|
3594
|
+
}, r.delete = async function(s, o) {
|
|
3595
|
+
s = e.utils.id(s);
|
|
3596
|
+
const { data: f } = await e.api.delete(`/content/${s}`, o);
|
|
3597
|
+
return f;
|
|
3598
|
+
}, r.restore = async function(s, o) {
|
|
3599
|
+
s = e.utils.id(s);
|
|
3600
|
+
const { data: f } = await e.api.get(`/content/${s}/restore`, o);
|
|
3601
|
+
return f;
|
|
3602
|
+
}, r.getFromSlug = async function(s) {
|
|
3603
|
+
const { data: o } = await e.api.get(`/content/slug/${s}`);
|
|
3604
|
+
return o;
|
|
3635
3605
|
}, r;
|
|
3636
3606
|
}
|
|
3637
|
-
function
|
|
3607
|
+
function Tt(e) {
|
|
3638
3608
|
var r = {}, a;
|
|
3639
3609
|
return r.countries = async function() {
|
|
3640
3610
|
return a || (a = new Promise(async function(t, n) {
|
|
3641
|
-
e.api.get("/system/countries").then(function(
|
|
3642
|
-
return t(
|
|
3611
|
+
e.api.get("/system/countries").then(function(i) {
|
|
3612
|
+
return t(i.data);
|
|
3643
3613
|
}).catch(n);
|
|
3644
3614
|
})), a;
|
|
3645
3615
|
}, r;
|
|
3646
3616
|
}
|
|
3647
|
-
function
|
|
3617
|
+
function It(e) {
|
|
3648
3618
|
var r = {};
|
|
3649
3619
|
function a() {
|
|
3650
3620
|
return !(typeof window > "u" || !window.navigator || !window.navigator.geolocation);
|
|
3651
3621
|
}
|
|
3652
|
-
return r.distance = function({ lat: t, lon: n }, { lat:
|
|
3653
|
-
function l(
|
|
3654
|
-
return
|
|
3622
|
+
return r.distance = function({ lat: t, lon: n }, { lat: i, lon: m }) {
|
|
3623
|
+
function l(f) {
|
|
3624
|
+
return f * (Math.PI / 180);
|
|
3655
3625
|
}
|
|
3656
|
-
var p = 6371e3, y = l(
|
|
3657
|
-
return
|
|
3626
|
+
var p = 6371e3, y = l(i - t), w = l(m - n), A = Math.sin(y / 2) * Math.sin(y / 2) + Math.cos(l(t)) * Math.cos(l(i)) * Math.sin(w / 2) * Math.sin(w / 2), s = 2 * Math.atan2(Math.sqrt(A), Math.sqrt(1 - A)), o = p * s;
|
|
3627
|
+
return o;
|
|
3658
3628
|
}, r.getPosition = async function() {
|
|
3659
3629
|
return a() ? (console.log("qik:geo: getting location"), new Promise(function(t, n) {
|
|
3660
3630
|
navigator.geolocation.getCurrentPosition(t, n);
|
|
3661
3631
|
})) : Promise.reject({ message: "Geolocation is not enabled" });
|
|
3662
3632
|
}, r.watchPosition = async function(t) {
|
|
3663
|
-
return a() ? (console.log("qik:geo: watching location"), new Promise(function(n,
|
|
3664
|
-
const m = navigator.geolocation.watchPosition(t,
|
|
3633
|
+
return a() ? (console.log("qik:geo: watching location"), new Promise(function(n, i) {
|
|
3634
|
+
const m = navigator.geolocation.watchPosition(t, i);
|
|
3665
3635
|
n({
|
|
3666
3636
|
id: m
|
|
3667
3637
|
});
|
|
@@ -4378,16 +4348,16 @@ function Rt(e) {
|
|
|
4378
4348
|
if (t) {
|
|
4379
4349
|
const n = t?.organisation?.countryCode;
|
|
4380
4350
|
if (n) {
|
|
4381
|
-
const
|
|
4351
|
+
const i = r.countryLookup[n];
|
|
4382
4352
|
return {
|
|
4383
4353
|
code: n,
|
|
4384
|
-
name:
|
|
4354
|
+
name: i
|
|
4385
4355
|
};
|
|
4386
4356
|
}
|
|
4387
4357
|
}
|
|
4388
4358
|
}, r;
|
|
4389
4359
|
}
|
|
4390
|
-
const
|
|
4360
|
+
const kt = function(e, r) {
|
|
4391
4361
|
if (r = r || "production", !e.auth)
|
|
4392
4362
|
throw new Error("Can't Instantiate QikSocket before QikAuth exists");
|
|
4393
4363
|
const a = e.utils.guid();
|
|
@@ -4397,89 +4367,94 @@ const Tt = function(e, r) {
|
|
|
4397
4367
|
connected: !1,
|
|
4398
4368
|
windowID: a,
|
|
4399
4369
|
autoreconnect: !0
|
|
4400
|
-
}, n,
|
|
4370
|
+
}, n, i = {};
|
|
4401
4371
|
const m = {}, l = new De();
|
|
4402
|
-
l.bootstrap(t), t.channel = async function(
|
|
4403
|
-
if (
|
|
4404
|
-
return
|
|
4405
|
-
const
|
|
4406
|
-
|
|
4407
|
-
function
|
|
4408
|
-
|
|
4372
|
+
l.bootstrap(t), t.channel = async function(g) {
|
|
4373
|
+
if (i[g])
|
|
4374
|
+
return i[g];
|
|
4375
|
+
const c = new De();
|
|
4376
|
+
i[g] = c, t.connected || await t.connect(), t.subscribe(g), t.addEventListener(g, u);
|
|
4377
|
+
function u(b) {
|
|
4378
|
+
c.dispatch("message", b);
|
|
4409
4379
|
}
|
|
4410
|
-
return
|
|
4411
|
-
t.removeAllListeners(),
|
|
4412
|
-
},
|
|
4380
|
+
return c.destroy = function() {
|
|
4381
|
+
t.removeEventListener(g, u), t.unsubscribe(g), c.removeAllListeners(), delete i[g];
|
|
4382
|
+
}, i[g];
|
|
4413
4383
|
};
|
|
4414
|
-
function p(
|
|
4415
|
-
t.debug && console.log("[socket] Connection open",
|
|
4384
|
+
function p(g) {
|
|
4385
|
+
t.debug && console.log("[socket] Connection open", g), t.connected = !0, l.dispatch("connected", g);
|
|
4416
4386
|
}
|
|
4417
|
-
async function y(
|
|
4418
|
-
|
|
4387
|
+
async function y(g) {
|
|
4388
|
+
g.wasClean ? t.debug && console.log(`[socket] Connection closed cleanly, code=${g.code} reason=${g.reason}`) : t.debug && console.log("[socket] - connection closed due to error", g), t.connected = !1, l.dispatch("disconnected", g), n = null, t.autoreconnect && t.reconnect();
|
|
4419
4389
|
}
|
|
4420
|
-
function w(
|
|
4421
|
-
console.log("[event] socketError", event), t.debug && console.log("[socket] Error",
|
|
4390
|
+
function w(g) {
|
|
4391
|
+
console.log("[event] socketError", event), t.debug && console.log("[socket] Error", g), l.dispatch("error", g);
|
|
4422
4392
|
}
|
|
4423
|
-
function
|
|
4424
|
-
const
|
|
4425
|
-
t.debug && console.log("[socket] message received",
|
|
4393
|
+
function A(g) {
|
|
4394
|
+
const c = JSON.parse(g.data);
|
|
4395
|
+
t.debug && console.log("[socket] message received", c), l.dispatch("message", c), c.channel && l.dispatch(c.channel, c);
|
|
4426
4396
|
}
|
|
4427
|
-
async function
|
|
4428
|
-
n.send(JSON.stringify(
|
|
4397
|
+
async function s(g) {
|
|
4398
|
+
n.send(JSON.stringify(g));
|
|
4429
4399
|
}
|
|
4430
|
-
function
|
|
4431
|
-
return new Promise(function(
|
|
4432
|
-
function
|
|
4400
|
+
function o() {
|
|
4401
|
+
return new Promise(function(g) {
|
|
4402
|
+
function c() {
|
|
4433
4403
|
if (t.connected)
|
|
4434
|
-
return
|
|
4435
|
-
setTimeout(
|
|
4404
|
+
return g(n);
|
|
4405
|
+
setTimeout(c, 1e3);
|
|
4436
4406
|
}
|
|
4437
|
-
|
|
4407
|
+
c();
|
|
4438
4408
|
});
|
|
4439
4409
|
}
|
|
4440
|
-
|
|
4410
|
+
t.connect = async function() {
|
|
4441
4411
|
if (n)
|
|
4442
|
-
return n.connected ? (console.log("[socket] - Socket is already connected"), n) :
|
|
4443
|
-
const
|
|
4444
|
-
if (!
|
|
4412
|
+
return n.connected ? (console.log("[socket] - Socket is already connected"), n) : o();
|
|
4413
|
+
const g = e.auth.getCurrentToken();
|
|
4414
|
+
if (!g) {
|
|
4445
4415
|
t.debug && console.log("[socket] - Must be authenticated to connect to socket");
|
|
4446
4416
|
return;
|
|
4447
4417
|
}
|
|
4448
|
-
return n = new WebSocket(`${t.url}?access_token=${
|
|
4418
|
+
return n = new WebSocket(`${t.url}?access_token=${g}&windowid=${a}`), n.addEventListener("close", y), n.addEventListener("error", w), n.addEventListener("open", p), n.addEventListener("message", A), t.debug && console.log("[socket] - Connected with event listeners"), o();
|
|
4449
4419
|
}, t.reconnect = async function() {
|
|
4450
4420
|
if (t.connected)
|
|
4451
4421
|
return;
|
|
4452
4422
|
t.debug && console.log("[socket] reconnecting...");
|
|
4453
|
-
const
|
|
4454
|
-
return Object.keys(m).forEach(function(
|
|
4455
|
-
t.subscribe(
|
|
4456
|
-
}),
|
|
4423
|
+
const g = await t.connect();
|
|
4424
|
+
return Object.keys(m).forEach(function(u) {
|
|
4425
|
+
t.subscribe(u);
|
|
4426
|
+
}), g;
|
|
4457
4427
|
}, t.close = async function() {
|
|
4458
4428
|
if (!n) {
|
|
4459
4429
|
console.log("[socket] - Socket is not connected");
|
|
4460
4430
|
return;
|
|
4461
4431
|
}
|
|
4462
|
-
const
|
|
4463
|
-
t.autoreconnect = !1, n.close(), n.removeEventListener("close", y), n.removeEventListener("error", w), n.removeEventListener("open", p), n.removeEventListener("message",
|
|
4464
|
-
}, t.disconnect = t.close, t.subscribe = async function(
|
|
4432
|
+
const g = t.autoreconnect;
|
|
4433
|
+
t.autoreconnect = !1, n.close(), n.removeEventListener("close", y), n.removeEventListener("error", w), n.removeEventListener("open", p), n.removeEventListener("message", A), n = null, y({ wasClean: !0 }), t.autoreconnect = g;
|
|
4434
|
+
}, t.disconnect = t.close, t.subscribe = async function(g) {
|
|
4465
4435
|
if (!n) {
|
|
4466
4436
|
console.log("[socket] - Can't subscribe to channel as socket is not connected");
|
|
4467
4437
|
return;
|
|
4468
4438
|
}
|
|
4469
|
-
|
|
4439
|
+
s({
|
|
4470
4440
|
action: "subscribe",
|
|
4471
|
-
channel:
|
|
4472
|
-
}), m[
|
|
4473
|
-
}, t.unsubscribe = async function(
|
|
4441
|
+
channel: g
|
|
4442
|
+
}), m[g] = !0, l.dispatch("subscribe", g), t.debug && console.log(`[socket] - subscribed to ${g}`);
|
|
4443
|
+
}, t.unsubscribe = async function(g) {
|
|
4474
4444
|
if (!n) {
|
|
4475
4445
|
console.log("[socket] - Can't unsubscribe from channel as socket is not connected");
|
|
4476
4446
|
return;
|
|
4477
4447
|
}
|
|
4478
|
-
|
|
4448
|
+
s({
|
|
4479
4449
|
action: "unsubscribe",
|
|
4480
|
-
channel:
|
|
4481
|
-
}), delete m[
|
|
4482
|
-
}
|
|
4450
|
+
channel: g
|
|
4451
|
+
}), delete m[g], l.dispatch("unsubscribe", g), t.debug && console.log(`[socket] - unsubscribed from ${g}`);
|
|
4452
|
+
};
|
|
4453
|
+
let f = e.utils.id(e.auth.getCurrentUser()?.organisation);
|
|
4454
|
+
return e.auth.addEventListener("change", async function(g) {
|
|
4455
|
+
const c = e.utils.id(g?.organisation);
|
|
4456
|
+
c !== f && (f = c, n && (t.debug && console.log("[socket] - organisation changed, reconnecting"), await t.close(), await t.reconnect()));
|
|
4457
|
+
}), t;
|
|
4483
4458
|
};
|
|
4484
4459
|
function Ft(e) {
|
|
4485
4460
|
switch (e || (e = {
|
|
@@ -4505,7 +4480,7 @@ function Ft(e) {
|
|
|
4505
4480
|
value: Ot,
|
|
4506
4481
|
writable: !1
|
|
4507
4482
|
});
|
|
4508
|
-
const t =
|
|
4483
|
+
const t = R;
|
|
4509
4484
|
Object.defineProperty(r, "utils", {
|
|
4510
4485
|
value: t,
|
|
4511
4486
|
writable: !1
|
|
@@ -4513,14 +4488,14 @@ function Ft(e) {
|
|
|
4513
4488
|
value: q,
|
|
4514
4489
|
writable: !1
|
|
4515
4490
|
});
|
|
4516
|
-
const
|
|
4491
|
+
const i = new Ct(r);
|
|
4517
4492
|
Object.defineProperty(r, "files", {
|
|
4518
|
-
value:
|
|
4493
|
+
value: i,
|
|
4519
4494
|
writable: !1
|
|
4520
|
-
}), new De().bootstrap(r), r.error = function(
|
|
4521
|
-
return r.dispatch("error", t.errorMessage(
|
|
4522
|
-
}, r.notify = function(
|
|
4523
|
-
return r.dispatch("notification", { message:
|
|
4495
|
+
}), new De().bootstrap(r), r.error = function(f) {
|
|
4496
|
+
return r.dispatch("error", t.errorMessage(f));
|
|
4497
|
+
}, r.notify = function(f, g) {
|
|
4498
|
+
return r.dispatch("notification", { message: f, options: g });
|
|
4524
4499
|
};
|
|
4525
4500
|
const l = new mt(r);
|
|
4526
4501
|
Object.defineProperty(r, "api", {
|
|
@@ -4532,7 +4507,7 @@ function Ft(e) {
|
|
|
4532
4507
|
value: p,
|
|
4533
4508
|
writable: !1
|
|
4534
4509
|
});
|
|
4535
|
-
const y = new
|
|
4510
|
+
const y = new kt(r);
|
|
4536
4511
|
Object.defineProperty(r, "socket", {
|
|
4537
4512
|
value: y,
|
|
4538
4513
|
writable: !1
|
|
@@ -4542,19 +4517,19 @@ function Ft(e) {
|
|
|
4542
4517
|
value: w,
|
|
4543
4518
|
writable: !1
|
|
4544
4519
|
});
|
|
4545
|
-
const
|
|
4520
|
+
const A = new Tt(r);
|
|
4546
4521
|
Object.defineProperty(r, "system", {
|
|
4547
|
-
value:
|
|
4522
|
+
value: A,
|
|
4548
4523
|
writable: !1
|
|
4549
4524
|
});
|
|
4550
|
-
const
|
|
4525
|
+
const s = new It(r);
|
|
4551
4526
|
Object.defineProperty(r, "geo", {
|
|
4552
|
-
value:
|
|
4527
|
+
value: s,
|
|
4553
4528
|
writable: !1
|
|
4554
4529
|
});
|
|
4555
|
-
const
|
|
4530
|
+
const o = new Rt(r);
|
|
4556
4531
|
return Object.defineProperty(r, "content", {
|
|
4557
|
-
value:
|
|
4532
|
+
value: o,
|
|
4558
4533
|
writable: !1
|
|
4559
4534
|
}), r;
|
|
4560
4535
|
}
|