@qikdev/sdk 1.0.12 → 1.0.14

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