@sesamy/sesamy-js 1.7.2 → 1.8.0
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/README.md +2 -0
- package/dist/sesamy-js.cjs +5 -5
- package/dist/sesamy-js.d.ts +25 -2
- package/dist/sesamy-js.iife.js +5 -5
- package/dist/sesamy-js.mjs +833 -805
- package/package.json +1 -1
package/dist/sesamy-js.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var B = (t, e, n) => (
|
|
4
|
-
function
|
|
1
|
+
var Cr = Object.defineProperty;
|
|
2
|
+
var xr = (t, e, n) => e in t ? Cr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var B = (t, e, n) => (xr(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
+
function ge(t, e) {
|
|
5
5
|
const n = new CustomEvent(t, {
|
|
6
6
|
detail: e,
|
|
7
7
|
bubbles: !0,
|
|
@@ -59,21 +59,21 @@ var ue = At(function(t, e) {
|
|
|
59
59
|
};
|
|
60
60
|
});
|
|
61
61
|
xt(ue);
|
|
62
|
-
var
|
|
62
|
+
var Ar = xt(At(function(t, e) {
|
|
63
63
|
var n = le && le.__awaiter || function(u, c, f, d) {
|
|
64
|
-
return new (f || (f = Promise))(function(w,
|
|
64
|
+
return new (f || (f = Promise))(function(w, I) {
|
|
65
65
|
function v(g) {
|
|
66
66
|
try {
|
|
67
67
|
S(d.next(g));
|
|
68
68
|
} catch (l) {
|
|
69
|
-
|
|
69
|
+
I(l);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
function E(g) {
|
|
73
73
|
try {
|
|
74
74
|
S(d.throw(g));
|
|
75
75
|
} catch (l) {
|
|
76
|
-
|
|
76
|
+
I(l);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
function S(g) {
|
|
@@ -84,14 +84,14 @@ var Cr = xt(At(function(t, e) {
|
|
|
84
84
|
S((d = d.apply(u, c || [])).next());
|
|
85
85
|
});
|
|
86
86
|
}, r = le && le.__generator || function(u, c) {
|
|
87
|
-
var f, d, w,
|
|
87
|
+
var f, d, w, I, v = { label: 0, sent: function() {
|
|
88
88
|
if (1 & w[0])
|
|
89
89
|
throw w[1];
|
|
90
90
|
return w[1];
|
|
91
91
|
}, trys: [], ops: [] };
|
|
92
|
-
return
|
|
92
|
+
return I = { next: E(0), throw: E(1), return: E(2) }, typeof Symbol == "function" && (I[Symbol.iterator] = function() {
|
|
93
93
|
return this;
|
|
94
|
-
}),
|
|
94
|
+
}), I;
|
|
95
95
|
function E(S) {
|
|
96
96
|
return function(g) {
|
|
97
97
|
return function(l) {
|
|
@@ -205,19 +205,19 @@ var Cr = xt(At(function(t, e) {
|
|
|
205
205
|
}
|
|
206
206
|
return u.prototype.acquireLock = function(c, f) {
|
|
207
207
|
return f === void 0 && (f = 5e3), n(this, void 0, void 0, function() {
|
|
208
|
-
var d, w,
|
|
208
|
+
var d, w, I, v, E, S, g;
|
|
209
209
|
return r(this, function(l) {
|
|
210
210
|
switch (l.label) {
|
|
211
211
|
case 0:
|
|
212
|
-
d = Date.now() + h(4), w = Date.now() + f,
|
|
212
|
+
d = Date.now() + h(4), w = Date.now() + f, I = o + "-" + c, v = this.storageHandler === void 0 ? a : this.storageHandler, l.label = 1;
|
|
213
213
|
case 1:
|
|
214
214
|
return Date.now() < w ? [4, s(30)] : [3, 8];
|
|
215
215
|
case 2:
|
|
216
|
-
return l.sent(), v.getItemSync(
|
|
216
|
+
return l.sent(), v.getItemSync(I) !== null ? [3, 5] : (E = this.id + "-" + c + "-" + d, [4, s(Math.floor(25 * Math.random()))]);
|
|
217
217
|
case 3:
|
|
218
|
-
return l.sent(), v.setItemSync(
|
|
218
|
+
return l.sent(), v.setItemSync(I, JSON.stringify({ id: this.id, iat: d, timeoutKey: E, timeAcquired: Date.now(), timeRefreshed: Date.now() })), [4, s(30)];
|
|
219
219
|
case 4:
|
|
220
|
-
return l.sent(), (S = v.getItemSync(
|
|
220
|
+
return l.sent(), (S = v.getItemSync(I)) !== null && (g = JSON.parse(S)).id === this.id && g.iat === d ? (this.acquiredIatSet.add(d), this.refreshLockWhileAcquired(I, d), [2, !0]) : [3, 7];
|
|
221
221
|
case 5:
|
|
222
222
|
return u.lockCorrector(this.storageHandler === void 0 ? a : this.storageHandler), [4, this.waitForSomethingToChange(w)];
|
|
223
223
|
case 6:
|
|
@@ -235,13 +235,13 @@ var Cr = xt(At(function(t, e) {
|
|
|
235
235
|
return r(this, function(w) {
|
|
236
236
|
return setTimeout(function() {
|
|
237
237
|
return n(d, void 0, void 0, function() {
|
|
238
|
-
var
|
|
238
|
+
var I, v, E;
|
|
239
239
|
return r(this, function(S) {
|
|
240
240
|
switch (S.label) {
|
|
241
241
|
case 0:
|
|
242
242
|
return [4, ue.default().lock(f)];
|
|
243
243
|
case 1:
|
|
244
|
-
return S.sent(), this.acquiredIatSet.has(f) ? (
|
|
244
|
+
return S.sent(), this.acquiredIatSet.has(f) ? (I = this.storageHandler === void 0 ? a : this.storageHandler, (v = I.getItemSync(c)) === null ? (ue.default().unlock(f), [2]) : ((E = JSON.parse(v)).timeRefreshed = Date.now(), I.setItemSync(c, JSON.stringify(E)), ue.default().unlock(f), this.refreshLockWhileAcquired(c, f), [2])) : (ue.default().unlock(f), [2]);
|
|
245
245
|
}
|
|
246
246
|
});
|
|
247
247
|
});
|
|
@@ -254,11 +254,11 @@ var Cr = xt(At(function(t, e) {
|
|
|
254
254
|
switch (f.label) {
|
|
255
255
|
case 0:
|
|
256
256
|
return [4, new Promise(function(d) {
|
|
257
|
-
var w = !1,
|
|
257
|
+
var w = !1, I = Date.now(), v = !1;
|
|
258
258
|
function E() {
|
|
259
259
|
if (v || (window.removeEventListener("storage", E), u.removeFromWaiting(E), clearTimeout(S), v = !0), !w) {
|
|
260
260
|
w = !0;
|
|
261
|
-
var g = 50 - (Date.now() -
|
|
261
|
+
var g = 50 - (Date.now() - I);
|
|
262
262
|
g > 0 ? setTimeout(d, g) : d(null);
|
|
263
263
|
}
|
|
264
264
|
}
|
|
@@ -293,24 +293,24 @@ var Cr = xt(At(function(t, e) {
|
|
|
293
293
|
});
|
|
294
294
|
}, u.prototype.releaseLock__private__ = function(c) {
|
|
295
295
|
return n(this, void 0, void 0, function() {
|
|
296
|
-
var f, d, w,
|
|
296
|
+
var f, d, w, I;
|
|
297
297
|
return r(this, function(v) {
|
|
298
298
|
switch (v.label) {
|
|
299
299
|
case 0:
|
|
300
|
-
return f = this.storageHandler === void 0 ? a : this.storageHandler, d = o + "-" + c, (w = f.getItemSync(d)) === null ? [2] : (
|
|
300
|
+
return f = this.storageHandler === void 0 ? a : this.storageHandler, d = o + "-" + c, (w = f.getItemSync(d)) === null ? [2] : (I = JSON.parse(w)).id !== this.id ? [3, 2] : [4, ue.default().lock(I.iat)];
|
|
301
301
|
case 1:
|
|
302
|
-
v.sent(), this.acquiredIatSet.delete(
|
|
302
|
+
v.sent(), this.acquiredIatSet.delete(I.iat), f.removeItemSync(d), ue.default().unlock(I.iat), u.notifyWaiters(), v.label = 2;
|
|
303
303
|
case 2:
|
|
304
304
|
return [2];
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
307
|
});
|
|
308
308
|
}, u.lockCorrector = function(c) {
|
|
309
|
-
for (var f = Date.now() - 5e3, d = c, w = [],
|
|
310
|
-
var v = d.keySync(
|
|
309
|
+
for (var f = Date.now() - 5e3, d = c, w = [], I = 0; ; ) {
|
|
310
|
+
var v = d.keySync(I);
|
|
311
311
|
if (v === null)
|
|
312
312
|
break;
|
|
313
|
-
w.push(v),
|
|
313
|
+
w.push(v), I++;
|
|
314
314
|
}
|
|
315
315
|
for (var E = !1, S = 0; S < w.length; S++) {
|
|
316
316
|
var g = w[S];
|
|
@@ -327,7 +327,7 @@ var Cr = xt(At(function(t, e) {
|
|
|
327
327
|
}();
|
|
328
328
|
e.default = p;
|
|
329
329
|
}));
|
|
330
|
-
const
|
|
330
|
+
const $r = { timeoutInSeconds: 60 }, Dn = { name: "auth0-spa-js", version: "2.1.3" }, Un = () => Date.now();
|
|
331
331
|
let Y = class kt extends Error {
|
|
332
332
|
constructor(e, n) {
|
|
333
333
|
super(n), this.error = e, this.error_description = n, Object.setPrototypeOf(this, kt.prototype);
|
|
@@ -335,23 +335,23 @@ let Y = class kt extends Error {
|
|
|
335
335
|
static fromPayload({ error: e, error_description: n }) {
|
|
336
336
|
return new kt(e, n);
|
|
337
337
|
}
|
|
338
|
-
},
|
|
338
|
+
}, Nr = class Rn extends Y {
|
|
339
339
|
constructor(e, n, r, i = null) {
|
|
340
|
-
super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this,
|
|
340
|
+
super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Rn.prototype);
|
|
341
341
|
}
|
|
342
|
-
}, It = class
|
|
342
|
+
}, It = class Ln extends Y {
|
|
343
343
|
constructor() {
|
|
344
|
-
super("timeout", "Timeout"), Object.setPrototypeOf(this,
|
|
344
|
+
super("timeout", "Timeout"), Object.setPrototypeOf(this, Ln.prototype);
|
|
345
345
|
}
|
|
346
|
-
},
|
|
346
|
+
}, zr = class Mn extends It {
|
|
347
347
|
constructor(e) {
|
|
348
348
|
super(), this.popup = e, Object.setPrototypeOf(this, Mn.prototype);
|
|
349
349
|
}
|
|
350
|
-
},
|
|
350
|
+
}, Dr = class Zn extends Y {
|
|
351
351
|
constructor(e) {
|
|
352
352
|
super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Zn.prototype);
|
|
353
353
|
}
|
|
354
|
-
},
|
|
354
|
+
}, Ur = class Wn extends Y {
|
|
355
355
|
constructor(e, n, r) {
|
|
356
356
|
super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Wn.prototype);
|
|
357
357
|
}
|
|
@@ -370,20 +370,20 @@ const Qe = () => window.crypto, dt = () => {
|
|
|
370
370
|
}, Jt = (t) => btoa(t), St = (t) => {
|
|
371
371
|
var { clientId: e } = t, n = Q(t, ["clientId"]);
|
|
372
372
|
return new URLSearchParams(((r) => Object.keys(r).filter((i) => r[i] !== void 0).reduce((i, o) => Object.assign(Object.assign({}, i), { [o]: r[o] }), {}))(Object.assign({ client_id: e }, n))).toString();
|
|
373
|
-
}, Xt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")),
|
|
373
|
+
}, Xt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")), Rr = async (t, e) => {
|
|
374
374
|
const n = await fetch(t, e);
|
|
375
375
|
return { ok: n.ok, json: await n.json() };
|
|
376
376
|
}, Lr = async (t, e, n) => {
|
|
377
377
|
const r = new AbortController();
|
|
378
378
|
let i;
|
|
379
|
-
return e.signal = r.signal, Promise.race([
|
|
379
|
+
return e.signal = r.signal, Promise.race([Rr(t, e), new Promise((o, a) => {
|
|
380
380
|
i = setTimeout(() => {
|
|
381
381
|
r.abort(), a(new Error("Timeout when executing 'fetch'"));
|
|
382
382
|
}, n);
|
|
383
383
|
})]).finally(() => {
|
|
384
384
|
clearTimeout(i);
|
|
385
385
|
});
|
|
386
|
-
},
|
|
386
|
+
}, Mr = async (t, e, n, r, i, o, a) => {
|
|
387
387
|
return s = { auth: { audience: e, scope: n }, timeout: i, fetchUrl: t, fetchOptions: r, useFormData: a }, h = o, new Promise(function(p, u) {
|
|
388
388
|
const c = new MessageChannel();
|
|
389
389
|
c.port1.onmessage = function(f) {
|
|
@@ -391,27 +391,27 @@ const Qe = () => window.crypto, dt = () => {
|
|
|
391
391
|
}, h.postMessage(s, [c.port2]);
|
|
392
392
|
});
|
|
393
393
|
var s, h;
|
|
394
|
-
},
|
|
395
|
-
async function
|
|
394
|
+
}, Zr = async (t, e, n, r, i, o, a = 1e4) => i ? Mr(t, e, n, r, a, i, o) : Lr(t, r, a);
|
|
395
|
+
async function Wr(t, e) {
|
|
396
396
|
var { baseUrl: n, timeout: r, audience: i, scope: o, auth0Client: a, useFormData: s } = t, h = Q(t, ["baseUrl", "timeout", "audience", "scope", "auth0Client", "useFormData"]);
|
|
397
397
|
const p = s ? St(h) : JSON.stringify(h);
|
|
398
|
-
return await async function(u, c, f, d, w,
|
|
398
|
+
return await async function(u, c, f, d, w, I, v) {
|
|
399
399
|
let E, S = null;
|
|
400
|
-
for (let
|
|
400
|
+
for (let A = 0; A < 3; A++)
|
|
401
401
|
try {
|
|
402
|
-
E = await
|
|
402
|
+
E = await Zr(u, f, d, w, I, v, c), S = null;
|
|
403
403
|
break;
|
|
404
404
|
} catch (U) {
|
|
405
405
|
S = U;
|
|
406
406
|
}
|
|
407
407
|
if (S)
|
|
408
408
|
throw S;
|
|
409
|
-
const g = E.json, { error: l, error_description: b } = g,
|
|
409
|
+
const g = E.json, { error: l, error_description: b } = g, O = Q(g, ["error", "error_description"]), { ok: j } = E;
|
|
410
410
|
if (!j) {
|
|
411
|
-
const
|
|
412
|
-
throw l === "mfa_required" ? new
|
|
411
|
+
const A = b || `HTTP error. Unable to fetch ${u}`;
|
|
412
|
+
throw l === "mfa_required" ? new Ur(l, A, O.mfa_token) : l === "missing_refresh_token" ? new Kn(f, d) : new Y(l || "request_error", A);
|
|
413
413
|
}
|
|
414
|
-
return
|
|
414
|
+
return O;
|
|
415
415
|
}(`${n}/oauth/token`, r, i || "default", o, { method: "POST", body: p, headers: { "Content-Type": s ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(a || Dn)) } }, e, s);
|
|
416
416
|
}
|
|
417
417
|
const He = (...t) => {
|
|
@@ -433,7 +433,7 @@ let he = class _t {
|
|
|
433
433
|
const { scope: n, audience: r, client_id: i } = e;
|
|
434
434
|
return new _t({ scope: n, audience: r, clientId: i });
|
|
435
435
|
}
|
|
436
|
-
},
|
|
436
|
+
}, Kr = class {
|
|
437
437
|
set(e, n) {
|
|
438
438
|
localStorage.setItem(e, JSON.stringify(n));
|
|
439
439
|
}
|
|
@@ -467,9 +467,9 @@ let he = class _t {
|
|
|
467
467
|
}, allKeys: () => Object.keys(e) };
|
|
468
468
|
}();
|
|
469
469
|
}
|
|
470
|
-
},
|
|
470
|
+
}, Fr = class {
|
|
471
471
|
constructor(e, n, r) {
|
|
472
|
-
this.cache = e, this.keyManifest = n, this.nowProvider = r ||
|
|
472
|
+
this.cache = e, this.keyManifest = n, this.nowProvider = r || Un;
|
|
473
473
|
}
|
|
474
474
|
async setIdToken(e, n, r) {
|
|
475
475
|
var i;
|
|
@@ -530,7 +530,7 @@ let he = class _t {
|
|
|
530
530
|
return o.prefix === "@@auth0spajs@@" && o.clientId === e.clientId && o.audience === e.audience && h;
|
|
531
531
|
})[0];
|
|
532
532
|
}
|
|
533
|
-
},
|
|
533
|
+
}, Hr = class {
|
|
534
534
|
constructor(e, n, r) {
|
|
535
535
|
this.storage = e, this.clientId = n, this.cookieDomain = r, this.storageKey = `a0.spajs.txs.${this.clientId}`;
|
|
536
536
|
}
|
|
@@ -544,7 +544,7 @@ let he = class _t {
|
|
|
544
544
|
this.storage.remove(this.storageKey, { cookieDomain: this.cookieDomain });
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
|
-
const ze = (t) => typeof t == "number",
|
|
547
|
+
const ze = (t) => typeof t == "number", Jr = ["iss", "aud", "exp", "nbf", "iat", "jti", "azp", "nonce", "auth_time", "at_hash", "c_hash", "acr", "amr", "sub_jwk", "cnf", "sip_from_tag", "sip_date", "sip_callid", "sip_cseq_num", "sip_via_branch", "orig", "dest", "mky", "events", "toe", "txn", "rph", "sid", "vot", "vtm"], Xr = (t) => {
|
|
548
548
|
if (!t.id_token)
|
|
549
549
|
throw new Error("ID token is required but missing");
|
|
550
550
|
const e = ((o) => {
|
|
@@ -553,7 +553,7 @@ const ze = (t) => typeof t == "number", Fr = ["iss", "aud", "exp", "nbf", "iat",
|
|
|
553
553
|
throw new Error("ID token could not be decoded");
|
|
554
554
|
const u = JSON.parse(Xt(h)), c = { __raw: o }, f = {};
|
|
555
555
|
return Object.keys(u).forEach((d) => {
|
|
556
|
-
c[d] = u[d],
|
|
556
|
+
c[d] = u[d], Jr.includes(d) || (f[d] = u[d]);
|
|
557
557
|
}), { encoded: { header: s, payload: h, signature: p }, header: JSON.parse(Xt(s)), claims: c, user: f };
|
|
558
558
|
})(t.id_token);
|
|
559
559
|
if (!e.claims.iss)
|
|
@@ -668,9 +668,9 @@ var fe = At(function(t, e) {
|
|
|
668
668
|
};
|
|
669
669
|
});
|
|
670
670
|
xt(fe), fe.encode, fe.parse, fe.getAll;
|
|
671
|
-
var
|
|
672
|
-
const
|
|
673
|
-
const e =
|
|
671
|
+
var Vr = fe.get, Jn = fe.set, Xn = fe.remove;
|
|
672
|
+
const ke = { get(t) {
|
|
673
|
+
const e = Vr(t);
|
|
674
674
|
if (e !== void 0)
|
|
675
675
|
return JSON.parse(e);
|
|
676
676
|
}, save(t, e, n) {
|
|
@@ -679,15 +679,15 @@ const be = { get(t) {
|
|
|
679
679
|
}, remove(t, e) {
|
|
680
680
|
let n = {};
|
|
681
681
|
e != null && e.cookieDomain && (n.domain = e.cookieDomain), Xn(t, n);
|
|
682
|
-
} },
|
|
683
|
-
return
|
|
682
|
+
} }, Yr = { get(t) {
|
|
683
|
+
return ke.get(t) || ke.get(`_legacy_${t}`);
|
|
684
684
|
}, save(t, e, n) {
|
|
685
685
|
let r = {};
|
|
686
|
-
window.location.protocol === "https:" && (r = { secure: !0 }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), Jn(`_legacy_${t}`, JSON.stringify(e), r),
|
|
686
|
+
window.location.protocol === "https:" && (r = { secure: !0 }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), Jn(`_legacy_${t}`, JSON.stringify(e), r), ke.save(t, e, n);
|
|
687
687
|
}, remove(t, e) {
|
|
688
688
|
let n = {};
|
|
689
|
-
e != null && e.cookieDomain && (n.domain = e.cookieDomain), Xn(t, n),
|
|
690
|
-
} },
|
|
689
|
+
e != null && e.cookieDomain && (n.domain = e.cookieDomain), Xn(t, n), ke.remove(t, e), ke.remove(`_legacy_${t}`, e);
|
|
690
|
+
} }, Gr = { get(t) {
|
|
691
691
|
if (typeof sessionStorage > "u")
|
|
692
692
|
return;
|
|
693
693
|
const e = sessionStorage.getItem(t);
|
|
@@ -697,7 +697,7 @@ const be = { get(t) {
|
|
|
697
697
|
}, remove(t) {
|
|
698
698
|
sessionStorage.removeItem(t);
|
|
699
699
|
} };
|
|
700
|
-
function
|
|
700
|
+
function Br(t, e, n) {
|
|
701
701
|
var r = e === void 0 ? null : e, i = function(h, p) {
|
|
702
702
|
var u = atob(h);
|
|
703
703
|
if (p) {
|
|
@@ -710,11 +710,11 @@ function Yr(t, e, n) {
|
|
|
710
710
|
`, 10) + 1, a = i.substring(o) + (r ? "//# sourceMappingURL=" + r : ""), s = new Blob([a], { type: "application/javascript" });
|
|
711
711
|
return URL.createObjectURL(s);
|
|
712
712
|
}
|
|
713
|
-
var Vt, Yt, Gt, ht,
|
|
714
|
-
return ht = ht ||
|
|
713
|
+
var Vt, Yt, Gt, ht, qr = (Vt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", Yt = null, Gt = !1, function(t) {
|
|
714
|
+
return ht = ht || Br(Vt, Yt, Gt), new Worker(ht, t);
|
|
715
715
|
});
|
|
716
716
|
const ft = {};
|
|
717
|
-
let
|
|
717
|
+
let Qr = class {
|
|
718
718
|
constructor(e, n) {
|
|
719
719
|
this.cache = e, this.clientId = n, this.manifestKey = this.createManifestKeyFrom(this.clientId);
|
|
720
720
|
}
|
|
@@ -740,11 +740,11 @@ let Br = class {
|
|
|
740
740
|
return `@@auth0spajs@@::${e}`;
|
|
741
741
|
}
|
|
742
742
|
};
|
|
743
|
-
const
|
|
743
|
+
const ei = { memory: () => new Hn().enclosedCache, localstorage: () => new Kr() }, Bt = (t) => ei[t], qt = (t) => {
|
|
744
744
|
const { openUrl: e, onRedirect: n } = t, r = Q(t, ["openUrl", "onRedirect"]);
|
|
745
745
|
return Object.assign(Object.assign({}, r), { openUrl: e === !1 || e ? e : n });
|
|
746
|
-
}, pt = new
|
|
747
|
-
let
|
|
746
|
+
}, pt = new Ar();
|
|
747
|
+
let ti = class {
|
|
748
748
|
constructor(e) {
|
|
749
749
|
let n, r;
|
|
750
750
|
if (this.userCache = new Hn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
|
|
@@ -763,10 +763,10 @@ let Qr = class {
|
|
|
763
763
|
throw new Error(`Invalid cache location "${n}"`);
|
|
764
764
|
r = Bt(n)();
|
|
765
765
|
}
|
|
766
|
-
this.httpTimeoutMs = e.httpTimeoutInSeconds ? 1e3 * e.httpTimeoutInSeconds : 1e4, this.cookieStorage = e.legacySameSiteCookie === !1 ?
|
|
767
|
-
const i = e.useCookiesForTransactions ? this.cookieStorage :
|
|
766
|
+
this.httpTimeoutMs = e.httpTimeoutInSeconds ? 1e3 * e.httpTimeoutInSeconds : 1e4, this.cookieStorage = e.legacySameSiteCookie === !1 ? ke : Yr, this.orgHintCookieName = `auth0.${this.options.clientId}.organization_hint`, this.isAuthenticatedCookieName = ((a) => `auth0.${a}.is.authenticated`)(this.options.clientId), this.sessionCheckExpiryDays = e.sessionCheckExpiryDays || 1;
|
|
767
|
+
const i = e.useCookiesForTransactions ? this.cookieStorage : Gr;
|
|
768
768
|
var o;
|
|
769
|
-
this.scope = He("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new
|
|
769
|
+
this.scope = He("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new Hr(i, this.options.clientId, this.options.cookieDomain), this.nowProvider = this.options.nowProvider || Un, this.cacheManager = new Fr(r, r.allKeys ? void 0 : new Qr(r, this.options.clientId), this.nowProvider), this.domainUrl = (o = this.options.domain, /^https?:\/\//.test(o) ? o : `https://${o}`), this.tokenIssuer = ((a, s) => a ? a.startsWith("https://") ? a : `https://${a}/` : `${s}/`)(this.options.issuer, this.domainUrl), typeof window < "u" && window.Worker && this.options.useRefreshTokens && n === "memory" && (this.options.workerUrl ? this.worker = new Worker(this.options.workerUrl) : this.worker = new qr());
|
|
770
770
|
}
|
|
771
771
|
_url(e) {
|
|
772
772
|
const n = encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client || Dn)));
|
|
@@ -777,7 +777,7 @@ let Qr = class {
|
|
|
777
777
|
}
|
|
778
778
|
async _verifyIdToken(e, n, r) {
|
|
779
779
|
const i = await this.nowProvider();
|
|
780
|
-
return
|
|
780
|
+
return Xr({ iss: this.tokenIssuer, aud: this.options.clientId, id_token: e, nonce: n, organization: r, leeway: this.options.leeway, max_age: (o = this.options.authorizationParams.max_age, typeof o != "string" ? o : parseInt(o, 10) || void 0), now: i });
|
|
781
781
|
var o;
|
|
782
782
|
}
|
|
783
783
|
_processOrgHint(e) {
|
|
@@ -790,7 +790,7 @@ let Qr = class {
|
|
|
790
790
|
const d = { "+": "-", "/": "_", "=": "" };
|
|
791
791
|
return f.replace(/[+/=]/g, (w) => d[w]);
|
|
792
792
|
})(window.btoa(String.fromCharCode(...Array.from(c))));
|
|
793
|
-
})(await (async (u) => await Qe().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), h = ((u, c, f, d, w,
|
|
793
|
+
})(await (async (u) => await Qe().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), h = ((u, c, f, d, w, I, v, E) => Object.assign(Object.assign(Object.assign({ client_id: u.clientId }, u.authorizationParams), f), { scope: He(c, f.scope), response_type: "code", response_mode: E || "query", state: d, nonce: w, redirect_uri: v || u.authorizationParams.redirect_uri, code_challenge: I, code_challenge_method: "S256" }))(this.options, this.scope, e, i, o, s, e.redirect_uri || this.options.authorizationParams.redirect_uri || r, n == null ? void 0 : n.response_mode), p = this._authorizeUrl(h);
|
|
794
794
|
return { nonce: o, code_verifier: a, scope: h.scope, audience: h.audience || "default", redirect_uri: h.redirect_uri, state: i, url: p };
|
|
795
795
|
}
|
|
796
796
|
async loginWithPopup(e, n) {
|
|
@@ -805,9 +805,9 @@ let Qr = class {
|
|
|
805
805
|
const o = await ((s) => new Promise((h, p) => {
|
|
806
806
|
let u;
|
|
807
807
|
const c = setInterval(() => {
|
|
808
|
-
s.popup && s.popup.closed && (clearInterval(c), clearTimeout(f), window.removeEventListener("message", u, !1), p(new
|
|
808
|
+
s.popup && s.popup.closed && (clearInterval(c), clearTimeout(f), window.removeEventListener("message", u, !1), p(new Dr(s.popup)));
|
|
809
809
|
}, 1e3), f = setTimeout(() => {
|
|
810
|
-
clearInterval(c), p(new
|
|
810
|
+
clearInterval(c), p(new zr(s.popup)), window.removeEventListener("message", u, !1);
|
|
811
811
|
}, 1e3 * (s.timeoutInSeconds || 60));
|
|
812
812
|
u = function(d) {
|
|
813
813
|
if (d.data && d.data.type === "authorization_response") {
|
|
@@ -851,7 +851,7 @@ let Qr = class {
|
|
|
851
851
|
if (!s)
|
|
852
852
|
throw new Y("missing_transaction", "Invalid state");
|
|
853
853
|
if (this.transactionManager.remove(), o)
|
|
854
|
-
throw new
|
|
854
|
+
throw new Nr(o, a || o, r, s.appState);
|
|
855
855
|
if (!s.code_verifier || s.state && s.state !== r)
|
|
856
856
|
throw new Y("state_mismatch", "Invalid state");
|
|
857
857
|
const h = s.organization, p = s.nonce, u = s.redirect_uri;
|
|
@@ -909,7 +909,7 @@ let Qr = class {
|
|
|
909
909
|
async getTokenWithPopup(e = {}, n = {}) {
|
|
910
910
|
var r;
|
|
911
911
|
const i = Object.assign(Object.assign({}, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: He(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
|
|
912
|
-
return n = Object.assign(Object.assign({},
|
|
912
|
+
return n = Object.assign(Object.assign({}, $r), n), await this.loginWithPopup(i, n), (await this.cacheManager.get(new he({ scope: i.authorizationParams.scope, audience: i.authorizationParams.audience || "default", clientId: this.options.clientId }))).access_token;
|
|
913
913
|
}
|
|
914
914
|
async isAuthenticated() {
|
|
915
915
|
return !!await this.getUser();
|
|
@@ -932,21 +932,21 @@ let Qr = class {
|
|
|
932
932
|
try {
|
|
933
933
|
if (window.crossOriginIsolated)
|
|
934
934
|
throw new Y("login_required", "The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");
|
|
935
|
-
const c = e.timeoutInSeconds || this.options.authorizeTimeoutInSeconds, f = await ((w,
|
|
935
|
+
const c = e.timeoutInSeconds || this.options.authorizeTimeoutInSeconds, f = await ((w, I, v = 60) => new Promise((E, S) => {
|
|
936
936
|
const g = window.document.createElement("iframe");
|
|
937
937
|
g.setAttribute("width", "0"), g.setAttribute("height", "0"), g.style.display = "none";
|
|
938
938
|
const l = () => {
|
|
939
939
|
window.document.body.contains(g) && (window.document.body.removeChild(g), window.removeEventListener("message", b, !1));
|
|
940
940
|
};
|
|
941
941
|
let b;
|
|
942
|
-
const
|
|
942
|
+
const O = setTimeout(() => {
|
|
943
943
|
S(new It()), l();
|
|
944
944
|
}, 1e3 * v);
|
|
945
945
|
b = function(j) {
|
|
946
|
-
if (j.origin !=
|
|
946
|
+
if (j.origin != I || !j.data || j.data.type !== "authorization_response")
|
|
947
947
|
return;
|
|
948
|
-
const
|
|
949
|
-
|
|
948
|
+
const A = j.source;
|
|
949
|
+
A && A.close(), j.data.response.error ? S(Y.fromPayload(j.data.response)) : E(j.data.response), clearTimeout(O), window.removeEventListener("message", b, !1), setTimeout(l, 2e3);
|
|
950
950
|
}, window.addEventListener("message", b, !1), window.document.body.appendChild(g), g.setAttribute("src", w);
|
|
951
951
|
}))(i, this.domainUrl, c);
|
|
952
952
|
if (o !== f.state)
|
|
@@ -990,46 +990,46 @@ let Qr = class {
|
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
async _requestToken(e, n) {
|
|
993
|
-
const { nonceIn: r, organization: i } = n || {}, o = await
|
|
993
|
+
const { nonceIn: r, organization: i } = n || {}, o = await Wr(Object.assign({ baseUrl: this.domainUrl, client_id: this.options.clientId, auth0Client: this.options.auth0Client, useFormData: this.options.useFormData, timeout: this.httpTimeoutMs }, e), this.worker), a = await this._verifyIdToken(o.id_token, r, i);
|
|
994
994
|
return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({}, o), { decodedToken: a, scope: e.scope, audience: e.audience || "default" }), o.scope ? { oauthTokenScope: o.scope } : null), { client_id: this.options.clientId })), this.cookieStorage.save(this.isAuthenticatedCookieName, !0, { daysUntilExpire: this.sessionCheckExpiryDays, cookieDomain: this.options.cookieDomain }), this._processOrgHint(i || a.claims.org_id), Object.assign(Object.assign({}, o), { decodedToken: a });
|
|
995
995
|
}
|
|
996
996
|
};
|
|
997
|
-
async function
|
|
998
|
-
const e = new
|
|
997
|
+
async function ni(t) {
|
|
998
|
+
const e = new ti(t);
|
|
999
999
|
return await e.checkSession(), e;
|
|
1000
1000
|
}
|
|
1001
|
-
const Vn = "sesamy.com",
|
|
1002
|
-
var
|
|
1001
|
+
const Vn = "sesamy.com", ri = "https://logs.sesamy.com/events", Et = "sesamyCacheTimestamp";
|
|
1002
|
+
var ee = /* @__PURE__ */ ((t) => (t.READY = "sesamyJsReady", t.AUTHENTICATED = "sesamyJsAuthenticated", t.LOGOUT = "sesamyJsLogout", t.CLEAR_CACHE = "sesamyJsClearCache", t.USER_ATTRIBUTE_CHANGED = "sesamyUserAttributeChanged", t))(ee || {});
|
|
1003
1003
|
let G;
|
|
1004
|
-
const $t = "sesamyAccessToken",
|
|
1005
|
-
function
|
|
1006
|
-
const t = localStorage.getItem(
|
|
1007
|
-
if (!(
|
|
1004
|
+
const $t = "sesamyAccessToken", Nt = "sesamyExpires";
|
|
1005
|
+
function zt() {
|
|
1006
|
+
const t = localStorage.getItem(Nt);
|
|
1007
|
+
if (!(t && parseInt(t, 10) < (/* @__PURE__ */ new Date()).getTime()))
|
|
1008
1008
|
return localStorage.getItem($t);
|
|
1009
1009
|
}
|
|
1010
|
-
async function
|
|
1011
|
-
if (t.enabled !== !1 && (G = await
|
|
1010
|
+
async function ii(t) {
|
|
1011
|
+
if (t.enabled !== !1 && (G = await ni({
|
|
1012
1012
|
domain: t.endpoint || `token.${Vn}`,
|
|
1013
1013
|
clientId: t.clientId
|
|
1014
1014
|
}), window.location.search.includes("code=")))
|
|
1015
1015
|
try {
|
|
1016
1016
|
await G.handleRedirectCallback();
|
|
1017
1017
|
const e = await G.getUser();
|
|
1018
|
-
|
|
1018
|
+
ge(ee.AUTHENTICATED, e);
|
|
1019
1019
|
const n = new URL(location.href), r = n.searchParams;
|
|
1020
1020
|
r.delete("code"), r.delete("state"), n.search = r.toString(), window.history.replaceState({}, document.title, n.toString());
|
|
1021
1021
|
} catch {
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
|
-
async function
|
|
1025
|
-
if (
|
|
1024
|
+
async function oi() {
|
|
1025
|
+
if (zt())
|
|
1026
1026
|
return !0;
|
|
1027
1027
|
if (!G)
|
|
1028
1028
|
throw new Error("Auth0 client not initialized");
|
|
1029
1029
|
return G.isAuthenticated();
|
|
1030
1030
|
}
|
|
1031
|
-
async function
|
|
1032
|
-
if (
|
|
1031
|
+
async function ai() {
|
|
1032
|
+
if (zt())
|
|
1033
1033
|
return {
|
|
1034
1034
|
sub: "local",
|
|
1035
1035
|
name: "Local User"
|
|
@@ -1038,7 +1038,7 @@ async function ii() {
|
|
|
1038
1038
|
throw new Error("Auth0 client not initialized");
|
|
1039
1039
|
return G.getUser();
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function si() {
|
|
1042
1042
|
if (!G)
|
|
1043
1043
|
throw new Error("Auth0 client not initialized");
|
|
1044
1044
|
return G.loginWithRedirect({
|
|
@@ -1047,8 +1047,8 @@ function oi() {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
});
|
|
1049
1049
|
}
|
|
1050
|
-
async function
|
|
1051
|
-
const e =
|
|
1050
|
+
async function ci(t = !0) {
|
|
1051
|
+
const e = zt();
|
|
1052
1052
|
if (e)
|
|
1053
1053
|
return e;
|
|
1054
1054
|
try {
|
|
@@ -1061,16 +1061,16 @@ async function ai(t = !0) {
|
|
|
1061
1061
|
return null;
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
|
-
async function
|
|
1065
|
-
if (localStorage.removeItem($t), localStorage.removeItem(
|
|
1064
|
+
async function ui() {
|
|
1065
|
+
if (localStorage.removeItem($t), localStorage.removeItem(Nt), !G)
|
|
1066
1066
|
throw new Error("Auth0 client not initialized");
|
|
1067
|
-
return
|
|
1067
|
+
return ge(ee.LOGOUT, {}), G.logout({
|
|
1068
1068
|
logoutParams: {
|
|
1069
1069
|
returnTo: window.location.href
|
|
1070
1070
|
}
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function li(t) {
|
|
1074
1074
|
const e = t.split(".");
|
|
1075
1075
|
if (e.length !== 3)
|
|
1076
1076
|
throw new Error("Invalid JWT token format.");
|
|
@@ -1082,11 +1082,11 @@ function ci(t) {
|
|
|
1082
1082
|
return JSON.parse(i);
|
|
1083
1083
|
}
|
|
1084
1084
|
async function Yn(t, e) {
|
|
1085
|
-
localStorage.setItem($t, t), localStorage.setItem(
|
|
1086
|
-
const n =
|
|
1087
|
-
|
|
1085
|
+
localStorage.setItem($t, t), e && localStorage.setItem(Nt, JSON.stringify(e * 1e3 + (/* @__PURE__ */ new Date()).getTime()));
|
|
1086
|
+
const n = li(t);
|
|
1087
|
+
ge(ee.AUTHENTICATED, n);
|
|
1088
1088
|
}
|
|
1089
|
-
const
|
|
1089
|
+
const di = (t, e) => e.skipDedupe || e.method !== "GET", hi = (t, e) => e.method + "@" + t, fi = (t) => t.clone(), Qt = ({ skip: t = di, key: e = hi, resolver: n = fi } = {}) => {
|
|
1090
1090
|
const r = /* @__PURE__ */ new Map();
|
|
1091
1091
|
return (i) => (o, a) => {
|
|
1092
1092
|
if (t(o, a))
|
|
@@ -1106,11 +1106,11 @@ const ui = (t, e) => e.skipDedupe || e.method !== "GET", li = (t, e) => e.method
|
|
|
1106
1106
|
return r.delete(s), Promise.reject(h);
|
|
1107
1107
|
}
|
|
1108
1108
|
};
|
|
1109
|
-
},
|
|
1109
|
+
}, pi = (t, e) => t * e, mi = (t) => t && t.ok, en = ({ delayTimer: t = 500, delayRamp: e = pi, maxAttempts: n = 10, until: r = mi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (h) => (p, u) => {
|
|
1110
1110
|
let c = 0;
|
|
1111
1111
|
if (s && s(p, u))
|
|
1112
1112
|
return h(p, u);
|
|
1113
|
-
const f = (d, w) => Promise.resolve(r(d, w)).then((
|
|
1113
|
+
const f = (d, w) => Promise.resolve(r(d, w)).then((I) => I ? d && a ? d : w ? Promise.reject(w) : d : (c++, !n || c <= n ? new Promise((v) => {
|
|
1114
1114
|
const E = e(t, c);
|
|
1115
1115
|
setTimeout(() => {
|
|
1116
1116
|
typeof i == "function" ? Promise.resolve(i({
|
|
@@ -1133,7 +1133,7 @@ const ui = (t, e) => e.skipDedupe || e.method !== "GET", li = (t, e) => e.method
|
|
|
1133
1133
|
throw d;
|
|
1134
1134
|
return f(null, d);
|
|
1135
1135
|
});
|
|
1136
|
-
},
|
|
1136
|
+
}, gi = "application/json", Gn = "Content-Type", be = Symbol(), Bn = Symbol();
|
|
1137
1137
|
function tn(t = {}) {
|
|
1138
1138
|
var e;
|
|
1139
1139
|
return (e = Object.entries(t).find(([n]) => n.toLowerCase() === Gn.toLowerCase())) === null || e === void 0 ? void 0 : e[1];
|
|
@@ -1146,7 +1146,7 @@ const pe = function(t, e, n = !1) {
|
|
|
1146
1146
|
const a = t[i];
|
|
1147
1147
|
return Array.isArray(a) && Array.isArray(o) ? r[i] = n ? [...a, ...o] : o : typeof a == "object" && typeof o == "object" ? r[i] = pe(a, o, n) : r[i] = o, r;
|
|
1148
1148
|
}, { ...t });
|
|
1149
|
-
},
|
|
1149
|
+
}, Oe = {
|
|
1150
1150
|
// Default options
|
|
1151
1151
|
options: {},
|
|
1152
1152
|
// Error type
|
|
@@ -1167,25 +1167,25 @@ const pe = function(t, e, n = !1) {
|
|
|
1167
1167
|
return n && i ? new i(...r) : i;
|
|
1168
1168
|
}
|
|
1169
1169
|
};
|
|
1170
|
-
function
|
|
1171
|
-
|
|
1170
|
+
function yi(t, e = !1) {
|
|
1171
|
+
Oe.options = e ? t : pe(Oe.options, t);
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1174
|
-
|
|
1173
|
+
function vi(t, e = !1) {
|
|
1174
|
+
Oe.polyfills = e ? t : pe(Oe.polyfills, t);
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1177
|
-
|
|
1176
|
+
function wi(t) {
|
|
1177
|
+
Oe.errorType = t;
|
|
1178
1178
|
}
|
|
1179
|
-
const
|
|
1179
|
+
const bi = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
|
|
1180
1180
|
class qn extends Error {
|
|
1181
1181
|
}
|
|
1182
|
-
const
|
|
1182
|
+
const ki = (t) => {
|
|
1183
1183
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1184
1184
|
t = t._addons.reduce((g, l) => l.beforeRequest && l.beforeRequest(g, t._options, e) || g, t);
|
|
1185
1185
|
const { _url: n, _options: r, _config: i, _catchers: o, _resolvers: a, _middlewares: s, _addons: h } = t, p = new Map(o), u = pe(i.options, r);
|
|
1186
1186
|
let c = n;
|
|
1187
|
-
const f =
|
|
1188
|
-
throw { [
|
|
1187
|
+
const f = bi(s)((g, l) => (c = g, i.polyfill("fetch")(g, l)))(n, u), d = new Error(), w = f.catch((g) => {
|
|
1188
|
+
throw { [be]: g };
|
|
1189
1189
|
}).then((g) => {
|
|
1190
1190
|
if (!g.ok) {
|
|
1191
1191
|
const l = new qn();
|
|
@@ -1193,8 +1193,8 @@ const wi = (t) => {
|
|
|
1193
1193
|
CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
1194
1194
|
throw l;
|
|
1195
1195
|
return g.text().then((b) => {
|
|
1196
|
-
var
|
|
1197
|
-
if (l.message = b, i.errorType === "json" || ((
|
|
1196
|
+
var O;
|
|
1197
|
+
if (l.message = b, i.errorType === "json" || ((O = g.headers.get("Content-Type")) === null || O === void 0 ? void 0 : O.split(";")[0]) === "application/json")
|
|
1198
1198
|
try {
|
|
1199
1199
|
l.json = JSON.parse(b);
|
|
1200
1200
|
} catch {
|
|
@@ -1203,15 +1203,15 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
1203
1203
|
});
|
|
1204
1204
|
}
|
|
1205
1205
|
return g;
|
|
1206
|
-
}),
|
|
1207
|
-
const b = l.hasOwnProperty(
|
|
1206
|
+
}), I = (g) => g.catch((l) => {
|
|
1207
|
+
const b = l.hasOwnProperty(be), O = b ? l[be] : l, j = (O == null ? void 0 : O.status) && p.get(O.status) || p.get(O == null ? void 0 : O.name) || b && p.has(be) && p.get(be);
|
|
1208
1208
|
if (j)
|
|
1209
|
-
return j(
|
|
1210
|
-
const
|
|
1211
|
-
if (
|
|
1212
|
-
return
|
|
1213
|
-
throw
|
|
1214
|
-
}), v = (g) => (l) => /* If a callback is provided, then callback with the body result otherwise return the parsed body itself. */
|
|
1209
|
+
return j(O, t);
|
|
1210
|
+
const A = p.get(Bn);
|
|
1211
|
+
if (A)
|
|
1212
|
+
return A(O, t);
|
|
1213
|
+
throw O;
|
|
1214
|
+
}), v = (g) => (l) => /* If a callback is provided, then callback with the body result otherwise return the parsed body itself. */ I(g ? w.then((b) => b && b[g]()).then((b) => l ? l(b) : b) : w.then((b) => l ? l(b) : b)), E = {
|
|
1215
1215
|
_wretchReq: t,
|
|
1216
1216
|
_fetchReq: f,
|
|
1217
1217
|
_sharedState: e,
|
|
@@ -1243,17 +1243,17 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
1243
1243
|
return this.error(500, g);
|
|
1244
1244
|
},
|
|
1245
1245
|
fetchError(g) {
|
|
1246
|
-
return this.error(
|
|
1246
|
+
return this.error(be, g);
|
|
1247
1247
|
}
|
|
1248
1248
|
}, S = h.reduce((g, l) => ({
|
|
1249
1249
|
...g,
|
|
1250
1250
|
...typeof l.resolver == "function" ? l.resolver(g) : l.resolver
|
|
1251
1251
|
}), E);
|
|
1252
1252
|
return a.reduce((g, l) => l(g, t), S);
|
|
1253
|
-
},
|
|
1253
|
+
}, Ii = {
|
|
1254
1254
|
_url: "",
|
|
1255
1255
|
_options: {},
|
|
1256
|
-
_config:
|
|
1256
|
+
_config: Oe,
|
|
1257
1257
|
_catchers: /* @__PURE__ */ new Map(),
|
|
1258
1258
|
_resolvers: [],
|
|
1259
1259
|
_deferred: [],
|
|
@@ -1330,7 +1330,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
1330
1330
|
fetch(t = this._options.method, e = "", n = null) {
|
|
1331
1331
|
let r = this.url(e).options({ method: t });
|
|
1332
1332
|
const i = tn(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || nn(i));
|
|
1333
|
-
return r = n ? o ? r.json(n, i) : r.body(n) : r,
|
|
1333
|
+
return r = n ? o ? r.json(n, i) : r.body(n) : r, ki(r._deferred.reduce((a, s) => s(a, a._url, a._options), r));
|
|
1334
1334
|
},
|
|
1335
1335
|
get(t = "") {
|
|
1336
1336
|
return this.fetch("GET", t);
|
|
@@ -1358,67 +1358,67 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
1358
1358
|
},
|
|
1359
1359
|
json(t, e) {
|
|
1360
1360
|
const n = tn(this._options.headers);
|
|
1361
|
-
return this.content(e || nn(n) && n ||
|
|
1361
|
+
return this.content(e || nn(n) && n || gi).body(JSON.stringify(t));
|
|
1362
1362
|
}
|
|
1363
1363
|
};
|
|
1364
1364
|
function ce(t = "", e = {}) {
|
|
1365
|
-
return { ...
|
|
1365
|
+
return { ...Ii, _url: t, _options: e };
|
|
1366
1366
|
}
|
|
1367
1367
|
ce.default = ce;
|
|
1368
|
-
ce.options =
|
|
1369
|
-
ce.errorType =
|
|
1370
|
-
ce.polyfills =
|
|
1368
|
+
ce.options = yi;
|
|
1369
|
+
ce.errorType = wi;
|
|
1370
|
+
ce.polyfills = vi;
|
|
1371
1371
|
ce.WretchError = qn;
|
|
1372
|
-
function
|
|
1373
|
-
sessionStorage.removeItem(Et),
|
|
1374
|
-
}
|
|
1375
|
-
function
|
|
1376
|
-
const e = t.endpoint || `https://api2.${Vn}`, n = (
|
|
1377
|
-
let
|
|
1378
|
-
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1372
|
+
function re() {
|
|
1373
|
+
sessionStorage.removeItem(Et), ge(ee.CLEAR_CACHE, {});
|
|
1374
|
+
}
|
|
1375
|
+
function Si(t) {
|
|
1376
|
+
const e = t.endpoint || `https://api2.${Vn}`, n = (k) => async (_, $) => {
|
|
1377
|
+
let T = sessionStorage.getItem(Et);
|
|
1378
|
+
T || (T = Date.now().toString(), sessionStorage.setItem(Et, T));
|
|
1379
|
+
const Z = {
|
|
1380
|
+
...$,
|
|
1381
1381
|
headers: {
|
|
1382
|
-
|
|
1383
|
-
"Cache-Timestamp":
|
|
1382
|
+
...$.headers,
|
|
1383
|
+
"Cache-Timestamp": T
|
|
1384
1384
|
}
|
|
1385
1385
|
};
|
|
1386
|
-
return _
|
|
1387
|
-
}, r = (
|
|
1388
|
-
let
|
|
1389
|
-
if (
|
|
1390
|
-
if (
|
|
1386
|
+
return k(_, Z);
|
|
1387
|
+
}, r = (k = !0) => (_) => async ($, T) => {
|
|
1388
|
+
let Z = null;
|
|
1389
|
+
if (Z = await ci(k), !Z) {
|
|
1390
|
+
if (k)
|
|
1391
1391
|
throw new Error("No access token available");
|
|
1392
|
-
return
|
|
1392
|
+
return _($, T);
|
|
1393
1393
|
}
|
|
1394
|
-
const
|
|
1395
|
-
...
|
|
1394
|
+
const K = {
|
|
1395
|
+
...T,
|
|
1396
1396
|
headers: {
|
|
1397
|
-
...
|
|
1398
|
-
...
|
|
1397
|
+
...T.headers,
|
|
1398
|
+
...Z ? { Authorization: `Bearer ${Z}` } : {}
|
|
1399
1399
|
}
|
|
1400
1400
|
};
|
|
1401
|
-
return
|
|
1402
|
-
}, i = (
|
|
1403
|
-
if (
|
|
1404
|
-
return _
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1401
|
+
return _($, K);
|
|
1402
|
+
}, i = (k) => (_, $) => {
|
|
1403
|
+
if ($.headers.Authorization)
|
|
1404
|
+
return k(_, $);
|
|
1405
|
+
const T = localStorage.getItem("__anon_id"), Z = btoa(`${T}:`), K = {
|
|
1406
|
+
...$,
|
|
1407
1407
|
headers: {
|
|
1408
|
-
|
|
1409
|
-
Authorization: `Basic ${
|
|
1408
|
+
...$.headers,
|
|
1409
|
+
Authorization: `Basic ${Z}`
|
|
1410
1410
|
}
|
|
1411
1411
|
};
|
|
1412
|
-
return _
|
|
1412
|
+
return k(_, K);
|
|
1413
1413
|
}, o = ce(e).headers({ "Content-Type": "application/json" }).middlewares([
|
|
1414
1414
|
n,
|
|
1415
1415
|
r(),
|
|
1416
1416
|
Qt(),
|
|
1417
1417
|
en({
|
|
1418
1418
|
delayTimer: 1e3,
|
|
1419
|
-
delayRamp: (
|
|
1419
|
+
delayRamp: (k, _) => k * _,
|
|
1420
1420
|
maxAttempts: 3,
|
|
1421
|
-
until: (
|
|
1421
|
+
until: (k) => !!(k && (k.ok || k.status >= 400 && k.status < 500)),
|
|
1422
1422
|
retryOnNetworkError: !1
|
|
1423
1423
|
})
|
|
1424
1424
|
]), a = ce(e).headers({ "Content-Type": "application/json" }).middlewares([
|
|
@@ -1428,80 +1428,83 @@ function ki(t) {
|
|
|
1428
1428
|
Qt(),
|
|
1429
1429
|
en({
|
|
1430
1430
|
delayTimer: 1e3,
|
|
1431
|
-
delayRamp: (
|
|
1431
|
+
delayRamp: (k, _) => k * _,
|
|
1432
1432
|
maxAttempts: 3,
|
|
1433
|
-
until: (
|
|
1433
|
+
until: (k) => !!(k && (k.ok || k.status >= 400 && k.status < 500)),
|
|
1434
1434
|
retryOnNetworkError: !1
|
|
1435
1435
|
})
|
|
1436
1436
|
]);
|
|
1437
1437
|
async function s() {
|
|
1438
1438
|
return o.get("/entitlements").json();
|
|
1439
1439
|
}
|
|
1440
|
-
async function h(
|
|
1441
|
-
const
|
|
1442
|
-
return
|
|
1440
|
+
async function h(k) {
|
|
1441
|
+
const _ = await o.get("/entitlements").json();
|
|
1442
|
+
return _ == null ? void 0 : _.find(($) => $.id === k);
|
|
1443
1443
|
}
|
|
1444
|
-
async function p(
|
|
1445
|
-
return o.get(`/entitlements/${
|
|
1444
|
+
async function p(k) {
|
|
1445
|
+
return o.get(`/entitlements/${k}/access`).json();
|
|
1446
1446
|
}
|
|
1447
1447
|
async function u() {
|
|
1448
1448
|
return o.get("/contracts").json();
|
|
1449
1449
|
}
|
|
1450
|
-
async function c(
|
|
1451
|
-
const
|
|
1452
|
-
return
|
|
1450
|
+
async function c(k) {
|
|
1451
|
+
const _ = await o.get("/contracts").json();
|
|
1452
|
+
return _ == null ? void 0 : _.find(($) => $.id === k);
|
|
1453
1453
|
}
|
|
1454
1454
|
async function f() {
|
|
1455
|
+
return o.get("/subscriptions").json();
|
|
1456
|
+
}
|
|
1457
|
+
async function d() {
|
|
1455
1458
|
return o.get("/bills").json();
|
|
1456
1459
|
}
|
|
1457
|
-
async function
|
|
1458
|
-
const
|
|
1459
|
-
return
|
|
1460
|
+
async function w(k) {
|
|
1461
|
+
const _ = await o.get("/bills").json();
|
|
1462
|
+
return _ == null ? void 0 : _.find(($) => $.id === k);
|
|
1460
1463
|
}
|
|
1461
|
-
async function
|
|
1462
|
-
const
|
|
1463
|
-
return
|
|
1464
|
+
async function I(k, _) {
|
|
1465
|
+
const $ = await o.url(`/user-metadata/${k}`).put(_).json();
|
|
1466
|
+
return ge(ee.USER_ATTRIBUTE_CHANGED, {}), re(), $;
|
|
1464
1467
|
}
|
|
1465
|
-
async function k
|
|
1466
|
-
const
|
|
1467
|
-
return
|
|
1468
|
+
async function v(k) {
|
|
1469
|
+
const _ = await o.url(`/user-metadata/${k}`).delete().res();
|
|
1470
|
+
return re(), _.ok;
|
|
1468
1471
|
}
|
|
1469
|
-
async function
|
|
1470
|
-
return (await o.url(`/user-metadata/${
|
|
1472
|
+
async function E(k) {
|
|
1473
|
+
return (await o.url(`/user-metadata/${k}`).get().json())[k];
|
|
1471
1474
|
}
|
|
1472
|
-
async function
|
|
1475
|
+
async function S() {
|
|
1473
1476
|
return await o.url("/user-metadata").get().json();
|
|
1474
1477
|
}
|
|
1475
|
-
async function
|
|
1478
|
+
async function g() {
|
|
1476
1479
|
return await o.url("/tags").get().json();
|
|
1477
1480
|
}
|
|
1478
|
-
async function
|
|
1479
|
-
const
|
|
1480
|
-
return
|
|
1481
|
+
async function l(k) {
|
|
1482
|
+
const _ = await o.url(`/tags/${k}`).delete().res();
|
|
1483
|
+
return re(), _.ok;
|
|
1481
1484
|
}
|
|
1482
|
-
async function
|
|
1483
|
-
const
|
|
1484
|
-
return
|
|
1485
|
+
async function b(k) {
|
|
1486
|
+
const _ = await o.url("/tags").post(k).res();
|
|
1487
|
+
return ge(ee.USER_ATTRIBUTE_CHANGED, {}), re(), _.ok;
|
|
1485
1488
|
}
|
|
1486
|
-
async function
|
|
1487
|
-
return (await a.url("/tallies").get().json())[
|
|
1489
|
+
async function O(k) {
|
|
1490
|
+
return (await a.url("/tallies").get().json())[k];
|
|
1488
1491
|
}
|
|
1489
|
-
async function
|
|
1492
|
+
async function j() {
|
|
1490
1493
|
return await a.url("/tallies").get().json();
|
|
1491
1494
|
}
|
|
1492
|
-
async function
|
|
1493
|
-
const
|
|
1494
|
-
return
|
|
1495
|
+
async function A(k) {
|
|
1496
|
+
const _ = await a.url(`/tallies/${k}`).delete().res();
|
|
1497
|
+
return re(), _.ok;
|
|
1495
1498
|
}
|
|
1496
|
-
async function
|
|
1497
|
-
return await a.url(`/tallies/${
|
|
1499
|
+
async function U(k, _) {
|
|
1500
|
+
return await a.url(`/tallies/${k}/push`).post(_).json();
|
|
1498
1501
|
}
|
|
1499
|
-
async function
|
|
1500
|
-
return await o.url(`/products/${
|
|
1502
|
+
async function R(k) {
|
|
1503
|
+
return await o.url(`/products/${k}`).get().json();
|
|
1501
1504
|
}
|
|
1502
|
-
async function
|
|
1503
|
-
const
|
|
1504
|
-
return
|
|
1505
|
+
async function F(k) {
|
|
1506
|
+
const _ = await o.url(`/products/${k}/auto-onboard`).post().json();
|
|
1507
|
+
return _.length && re(), _;
|
|
1505
1508
|
}
|
|
1506
1509
|
return {
|
|
1507
1510
|
getEntitlements: s,
|
|
@@ -1509,21 +1512,22 @@ function ki(t) {
|
|
|
1509
1512
|
getEntitlementAccess: p,
|
|
1510
1513
|
getContracts: u,
|
|
1511
1514
|
getContract: c,
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1515
|
+
getSubscriptions: f,
|
|
1516
|
+
getBills: d,
|
|
1517
|
+
getBill: w,
|
|
1518
|
+
setUserMetadata: I,
|
|
1519
|
+
deleteUserMetadata: v,
|
|
1520
|
+
getUserMetadata: E,
|
|
1521
|
+
listUserMetadata: S,
|
|
1522
|
+
getTags: g,
|
|
1523
|
+
deleteTag: l,
|
|
1524
|
+
setTag: b,
|
|
1525
|
+
getTally: O,
|
|
1526
|
+
getTallies: j,
|
|
1527
|
+
deleteTally: A,
|
|
1528
|
+
pushTally: U,
|
|
1529
|
+
getProduct: R,
|
|
1530
|
+
autoOnboardProduct: F
|
|
1527
1531
|
};
|
|
1528
1532
|
}
|
|
1529
1533
|
const Qn = "@sesamy/sesamy-js", Dt = "1.3.2";
|
|
@@ -1533,53 +1537,53 @@ function rn(t, e, n, r, i) {
|
|
|
1533
1537
|
return t === i ? n : t;
|
|
1534
1538
|
}
|
|
1535
1539
|
var Je = "undefined", on = "object", Tt = function() {
|
|
1536
|
-
}, er = "any", tr = "*",
|
|
1540
|
+
}, er = "any", tr = "*", ye = "__", tt = typeof process < "u" ? process : {};
|
|
1537
1541
|
tt.env && tt.env.NODE_ENV;
|
|
1538
|
-
var
|
|
1542
|
+
var J = typeof document < "u";
|
|
1539
1543
|
tt.versions != null && tt.versions.node != null;
|
|
1540
1544
|
typeof Deno < "u" && Deno.core;
|
|
1541
|
-
|
|
1545
|
+
J && window.name === "nodejs" || typeof navigator < "u" && navigator.userAgent !== void 0 && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
|
|
1542
1546
|
function nr(t, e) {
|
|
1543
1547
|
return e.charAt(0)[t]() + e.slice(1);
|
|
1544
1548
|
}
|
|
1545
|
-
var
|
|
1546
|
-
function
|
|
1547
|
-
return rr(t) ?
|
|
1549
|
+
var _i = nr.bind(null, "toUpperCase"), Ei = nr.bind(null, "toLowerCase");
|
|
1550
|
+
function Ti(t) {
|
|
1551
|
+
return rr(t) ? _i("null") : typeof t == "object" ? Ci(t) : Object.prototype.toString.call(t).slice(8, -1);
|
|
1548
1552
|
}
|
|
1549
1553
|
function nt(t, e) {
|
|
1550
1554
|
e === void 0 && (e = !0);
|
|
1551
|
-
var n =
|
|
1552
|
-
return e ?
|
|
1555
|
+
var n = Ti(t);
|
|
1556
|
+
return e ? Ei(n) : n;
|
|
1553
1557
|
}
|
|
1554
1558
|
function Ke(t, e) {
|
|
1555
1559
|
return typeof e === t;
|
|
1556
1560
|
}
|
|
1557
|
-
var V = Ke.bind(null, "function"),
|
|
1561
|
+
var V = Ke.bind(null, "function"), ae = Ke.bind(null, "string"), Ie = Ke.bind(null, "undefined"), Oi = Ke.bind(null, "boolean");
|
|
1558
1562
|
Ke.bind(null, "symbol");
|
|
1559
1563
|
function rr(t) {
|
|
1560
1564
|
return t === null;
|
|
1561
1565
|
}
|
|
1562
|
-
function
|
|
1566
|
+
function Pi(t) {
|
|
1563
1567
|
return nt(t) === "number" && !isNaN(t);
|
|
1564
1568
|
}
|
|
1565
1569
|
function ir(t) {
|
|
1566
1570
|
return nt(t) === "array";
|
|
1567
1571
|
}
|
|
1568
1572
|
function X(t) {
|
|
1569
|
-
if (!
|
|
1573
|
+
if (!ji(t))
|
|
1570
1574
|
return !1;
|
|
1571
1575
|
for (var e = t; Object.getPrototypeOf(e) !== null; )
|
|
1572
1576
|
e = Object.getPrototypeOf(e);
|
|
1573
1577
|
return Object.getPrototypeOf(t) === e;
|
|
1574
1578
|
}
|
|
1575
|
-
function
|
|
1579
|
+
function ji(t) {
|
|
1576
1580
|
return t && (typeof t == "object" || t !== null);
|
|
1577
1581
|
}
|
|
1578
|
-
function
|
|
1582
|
+
function Ci(t) {
|
|
1579
1583
|
return V(t.constructor) ? t.constructor.name : null;
|
|
1580
1584
|
}
|
|
1581
|
-
function
|
|
1582
|
-
return t instanceof Error ||
|
|
1585
|
+
function xi(t) {
|
|
1586
|
+
return t instanceof Error || ae(t.message) && t.constructor && Pi(t.constructor.stackTraceLimit);
|
|
1583
1587
|
}
|
|
1584
1588
|
function or(t, e) {
|
|
1585
1589
|
if (typeof e != "object" || rr(e))
|
|
@@ -1587,7 +1591,7 @@ function or(t, e) {
|
|
|
1587
1591
|
if (e instanceof t)
|
|
1588
1592
|
return !0;
|
|
1589
1593
|
var n = nt(new t(""));
|
|
1590
|
-
if (
|
|
1594
|
+
if (xi(e))
|
|
1591
1595
|
for (; e; ) {
|
|
1592
1596
|
if (nt(e) === n)
|
|
1593
1597
|
return !0;
|
|
@@ -1599,9 +1603,9 @@ or.bind(null, TypeError);
|
|
|
1599
1603
|
or.bind(null, SyntaxError);
|
|
1600
1604
|
function ot(t, e) {
|
|
1601
1605
|
var n = t instanceof Element || t instanceof HTMLDocument;
|
|
1602
|
-
return n && e ?
|
|
1606
|
+
return n && e ? Ai(t, e) : n;
|
|
1603
1607
|
}
|
|
1604
|
-
function
|
|
1608
|
+
function Ai(t, e) {
|
|
1605
1609
|
return e === void 0 && (e = ""), t && t.nodeName === e.toUpperCase();
|
|
1606
1610
|
}
|
|
1607
1611
|
function at(t) {
|
|
@@ -1614,7 +1618,7 @@ at(ot, "form");
|
|
|
1614
1618
|
at(ot, "button");
|
|
1615
1619
|
at(ot, "input");
|
|
1616
1620
|
at(ot, "select");
|
|
1617
|
-
function
|
|
1621
|
+
function $i(t) {
|
|
1618
1622
|
return t ? ir(t) ? t : [t] : [];
|
|
1619
1623
|
}
|
|
1620
1624
|
function an(t) {
|
|
@@ -1624,19 +1628,19 @@ function an(t) {
|
|
|
1624
1628
|
return null;
|
|
1625
1629
|
}
|
|
1626
1630
|
}
|
|
1627
|
-
function
|
|
1628
|
-
if (
|
|
1631
|
+
function Ni() {
|
|
1632
|
+
if (J) {
|
|
1629
1633
|
var t = navigator, e = t.languages;
|
|
1630
1634
|
return t.userLanguage || (e && e.length ? e[0] : t.language);
|
|
1631
1635
|
}
|
|
1632
1636
|
}
|
|
1633
|
-
function
|
|
1637
|
+
function zi() {
|
|
1634
1638
|
try {
|
|
1635
1639
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1636
1640
|
} catch {
|
|
1637
1641
|
}
|
|
1638
1642
|
}
|
|
1639
|
-
function
|
|
1643
|
+
function Di(t) {
|
|
1640
1644
|
return function(e) {
|
|
1641
1645
|
for (var n, r = /* @__PURE__ */ Object.create(null), i = /([^&=]+)=?([^&]*)/g; n = i.exec(e); ) {
|
|
1642
1646
|
var o = an(n[1]), a = an(n[2]);
|
|
@@ -1644,7 +1648,7 @@ function zi(t) {
|
|
|
1644
1648
|
}
|
|
1645
1649
|
for (var s in r) {
|
|
1646
1650
|
var h = s.split("[");
|
|
1647
|
-
h.length > 1 && (
|
|
1651
|
+
h.length > 1 && (Ui(r, h.map(function(p) {
|
|
1648
1652
|
return p.replace(/[?[\]\\ ]/g, "");
|
|
1649
1653
|
}), r[s]), delete r[s]);
|
|
1650
1654
|
}
|
|
@@ -1654,10 +1658,10 @@ function zi(t) {
|
|
|
1654
1658
|
var n = e.match(/\?(.*)/);
|
|
1655
1659
|
return n && n[1] ? n[1].split("#")[0] : "";
|
|
1656
1660
|
}
|
|
1657
|
-
return
|
|
1661
|
+
return J && window.location.search.substring(1);
|
|
1658
1662
|
}(t));
|
|
1659
1663
|
}
|
|
1660
|
-
function
|
|
1664
|
+
function Ui(t, e, n) {
|
|
1661
1665
|
for (var r = e.length - 1, i = 0; i < r; ++i) {
|
|
1662
1666
|
var o = e[i];
|
|
1663
1667
|
if (o === "__proto__" || o === "constructor")
|
|
@@ -1673,7 +1677,7 @@ function st() {
|
|
|
1673
1677
|
}
|
|
1674
1678
|
return t;
|
|
1675
1679
|
}
|
|
1676
|
-
function
|
|
1680
|
+
function Ri(t, e) {
|
|
1677
1681
|
var n, r, i, o = null, a = 0, s = function() {
|
|
1678
1682
|
a = /* @__PURE__ */ new Date(), o = null, i = t.apply(n, r);
|
|
1679
1683
|
};
|
|
@@ -1684,20 +1688,20 @@ function Di(t, e) {
|
|
|
1684
1688
|
return n = this, r = arguments, p <= 0 ? (clearTimeout(o), o = null, a = h, i = t.apply(n, r)) : o || (o = setTimeout(s, p)), i;
|
|
1685
1689
|
};
|
|
1686
1690
|
}
|
|
1687
|
-
var
|
|
1688
|
-
function
|
|
1689
|
-
return Pe
|
|
1691
|
+
var Re = "global", Pe = ye + "global" + ye, je = typeof self === on && self.self === self && self || typeof global === on && global.global === global && global || void 0;
|
|
1692
|
+
function ve(t) {
|
|
1693
|
+
return je[Pe][t];
|
|
1690
1694
|
}
|
|
1691
|
-
function
|
|
1692
|
-
return Pe
|
|
1695
|
+
function we(t, e) {
|
|
1696
|
+
return je[Pe][t] = e;
|
|
1693
1697
|
}
|
|
1694
|
-
function
|
|
1695
|
-
delete Pe
|
|
1698
|
+
function xe(t) {
|
|
1699
|
+
delete je[Pe][t];
|
|
1696
1700
|
}
|
|
1697
|
-
function
|
|
1701
|
+
function Ae(t, e, n) {
|
|
1698
1702
|
var r;
|
|
1699
1703
|
try {
|
|
1700
|
-
if (
|
|
1704
|
+
if (Ut(t)) {
|
|
1701
1705
|
var i = window[t];
|
|
1702
1706
|
r = i[e].bind(i);
|
|
1703
1707
|
}
|
|
@@ -1705,9 +1709,9 @@ function xe(t, e, n) {
|
|
|
1705
1709
|
}
|
|
1706
1710
|
return r || n;
|
|
1707
1711
|
}
|
|
1708
|
-
Pe
|
|
1712
|
+
je[Pe] || (je[Pe] = {});
|
|
1709
1713
|
var Xe = {};
|
|
1710
|
-
function
|
|
1714
|
+
function Ut(t) {
|
|
1711
1715
|
if (typeof Xe[t] !== Je)
|
|
1712
1716
|
return Xe[t];
|
|
1713
1717
|
try {
|
|
@@ -1718,27 +1722,27 @@ function Lt(t) {
|
|
|
1718
1722
|
}
|
|
1719
1723
|
return Xe[t] = !0;
|
|
1720
1724
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1725
|
+
function x() {
|
|
1726
|
+
return x = Object.assign || function(t) {
|
|
1723
1727
|
for (var e = 1; e < arguments.length; e++) {
|
|
1724
1728
|
var n = arguments[e];
|
|
1725
1729
|
for (var r in n)
|
|
1726
1730
|
Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
|
|
1727
1731
|
}
|
|
1728
1732
|
return t;
|
|
1729
|
-
},
|
|
1733
|
+
}, x.apply(this, arguments);
|
|
1730
1734
|
}
|
|
1731
|
-
var
|
|
1732
|
-
return typeof Symbol ===
|
|
1733
|
-
}(), Ve = " != " +
|
|
1735
|
+
var oe = "function", ne = "undefined", Li = "@@redux/" + Math.random().toString(36), sn = /* @__PURE__ */ function() {
|
|
1736
|
+
return typeof Symbol === oe && Symbol.observable || "@@observable";
|
|
1737
|
+
}(), Ve = " != " + oe;
|
|
1734
1738
|
function ar(t, e, n) {
|
|
1735
1739
|
var r;
|
|
1736
|
-
if (typeof e ===
|
|
1737
|
-
if (typeof n !==
|
|
1740
|
+
if (typeof e === oe && typeof n === ne && (n = e, e = void 0), typeof n !== ne) {
|
|
1741
|
+
if (typeof n !== oe)
|
|
1738
1742
|
throw new Error("enhancer" + Ve);
|
|
1739
1743
|
return n(ar)(t, e);
|
|
1740
1744
|
}
|
|
1741
|
-
if (typeof t !==
|
|
1745
|
+
if (typeof t !== oe)
|
|
1742
1746
|
throw new Error("reducer" + Ve);
|
|
1743
1747
|
var i = t, o = e, a = [], s = a, h = !1;
|
|
1744
1748
|
function p() {
|
|
@@ -1748,22 +1752,22 @@ function ar(t, e, n) {
|
|
|
1748
1752
|
return o;
|
|
1749
1753
|
}
|
|
1750
1754
|
function c(d) {
|
|
1751
|
-
if (typeof d !==
|
|
1755
|
+
if (typeof d !== oe)
|
|
1752
1756
|
throw new Error("Listener" + Ve);
|
|
1753
1757
|
var w = !0;
|
|
1754
1758
|
return p(), s.push(d), function() {
|
|
1755
1759
|
if (w) {
|
|
1756
1760
|
w = !1, p();
|
|
1757
|
-
var
|
|
1758
|
-
s.splice(
|
|
1761
|
+
var I = s.indexOf(d);
|
|
1762
|
+
s.splice(I, 1);
|
|
1759
1763
|
}
|
|
1760
1764
|
};
|
|
1761
1765
|
}
|
|
1762
1766
|
function f(d) {
|
|
1763
1767
|
if (!X(d))
|
|
1764
1768
|
throw new Error("Act != obj");
|
|
1765
|
-
if (typeof d.type ===
|
|
1766
|
-
throw new Error("ActType " +
|
|
1769
|
+
if (typeof d.type === ne)
|
|
1770
|
+
throw new Error("ActType " + ne);
|
|
1767
1771
|
if (h)
|
|
1768
1772
|
throw new Error("Dispatch in reducer");
|
|
1769
1773
|
try {
|
|
@@ -1771,21 +1775,21 @@ function ar(t, e, n) {
|
|
|
1771
1775
|
} finally {
|
|
1772
1776
|
h = !1;
|
|
1773
1777
|
}
|
|
1774
|
-
for (var w = a = s,
|
|
1775
|
-
(0, w[
|
|
1778
|
+
for (var w = a = s, I = 0; I < w.length; I++)
|
|
1779
|
+
(0, w[I])();
|
|
1776
1780
|
return d;
|
|
1777
1781
|
}
|
|
1778
1782
|
return f({ type: "@@redux/INIT" }), (r = { dispatch: f, subscribe: c, getState: u, replaceReducer: function(d) {
|
|
1779
|
-
if (typeof d !==
|
|
1783
|
+
if (typeof d !== oe)
|
|
1780
1784
|
throw new Error("next reducer" + Ve);
|
|
1781
1785
|
i = d, f({ type: "@@redux/INIT" });
|
|
1782
1786
|
} })[sn] = function() {
|
|
1783
1787
|
var d, w = c;
|
|
1784
|
-
return (d = { subscribe: function(
|
|
1785
|
-
if (typeof
|
|
1788
|
+
return (d = { subscribe: function(I) {
|
|
1789
|
+
if (typeof I != "object")
|
|
1786
1790
|
throw new TypeError("Observer != obj");
|
|
1787
1791
|
function v() {
|
|
1788
|
-
|
|
1792
|
+
I.next && I.next(u());
|
|
1789
1793
|
}
|
|
1790
1794
|
return v(), { unsubscribe: w(v) };
|
|
1791
1795
|
} })[sn] = function() {
|
|
@@ -1793,11 +1797,11 @@ function ar(t, e, n) {
|
|
|
1793
1797
|
}, d;
|
|
1794
1798
|
}, r;
|
|
1795
1799
|
}
|
|
1796
|
-
function
|
|
1800
|
+
function Mi(t, e) {
|
|
1797
1801
|
var n = e && e.type;
|
|
1798
|
-
return "action " + (n && n.toString() || "?") + "reducer " + t + " returns " +
|
|
1802
|
+
return "action " + (n && n.toString() || "?") + "reducer " + t + " returns " + ne;
|
|
1799
1803
|
}
|
|
1800
|
-
function
|
|
1804
|
+
function Ce() {
|
|
1801
1805
|
var t = [].slice.call(arguments);
|
|
1802
1806
|
return t.length === 0 ? function(e) {
|
|
1803
1807
|
return e;
|
|
@@ -1807,7 +1811,7 @@ function je() {
|
|
|
1807
1811
|
};
|
|
1808
1812
|
});
|
|
1809
1813
|
}
|
|
1810
|
-
function
|
|
1814
|
+
function Zi() {
|
|
1811
1815
|
var t = arguments;
|
|
1812
1816
|
return function(e) {
|
|
1813
1817
|
return function(n, r, i) {
|
|
@@ -1816,39 +1820,39 @@ function Ri() {
|
|
|
1816
1820
|
} };
|
|
1817
1821
|
return o = [].slice.call(t).map(function(p) {
|
|
1818
1822
|
return p(h);
|
|
1819
|
-
}),
|
|
1823
|
+
}), x({}, a, { dispatch: s = Ce.apply(void 0, o)(a.dispatch) });
|
|
1820
1824
|
};
|
|
1821
1825
|
};
|
|
1822
1826
|
}
|
|
1823
|
-
var
|
|
1827
|
+
var se = ye + "anon_id", me = ye + "user_id", _e = ye + "user_traits", ie = "userId", Se = "anonymousId", et = ["bootstrap", "params", "campaign", "initializeStart", "initialize", "initializeEnd", "ready", "resetStart", "reset", "resetEnd", "pageStart", "page", "pageEnd", "pageAborted", "trackStart", "track", "trackEnd", "trackAborted", "identifyStart", "identify", "identifyEnd", "identifyAborted", "userIdChanged", "registerPlugins", "enablePlugin", "disablePlugin", "online", "offline", "setItemStart", "setItem", "setItemEnd", "setItemAborted", "removeItemStart", "removeItem", "removeItemEnd", "removeItemAborted"], Ot = ["name", "EVENTS", "config", "loaded"], C = et.reduce(function(t, e) {
|
|
1824
1828
|
return t[e] = e, t;
|
|
1825
1829
|
}, { registerPluginType: function(t) {
|
|
1826
1830
|
return "registerPlugin:" + t;
|
|
1827
1831
|
}, pluginReadyType: function(t) {
|
|
1828
1832
|
return "ready:" + t;
|
|
1829
1833
|
} }), cn = /^utm_/, un = /^an_prop_/, ln = /^an_trait_/;
|
|
1830
|
-
function
|
|
1834
|
+
function Wi(t) {
|
|
1831
1835
|
var e = t.storage.setItem;
|
|
1832
1836
|
return function(n) {
|
|
1833
1837
|
return function(r) {
|
|
1834
1838
|
return function(i) {
|
|
1835
|
-
if (i.type ===
|
|
1839
|
+
if (i.type === C.bootstrap) {
|
|
1836
1840
|
var o = i.params, a = i.user, s = i.persistedUser, h = i.initialUser, p = s.userId === a.userId;
|
|
1837
|
-
s.anonymousId !== a.anonymousId && e(
|
|
1841
|
+
s.anonymousId !== a.anonymousId && e(se, a.anonymousId), p || e(me, a.userId), h.traits && e(_e, x({}, p && s.traits ? s.traits : {}, h.traits));
|
|
1838
1842
|
var u = Object.keys(i.params);
|
|
1839
1843
|
if (u.length) {
|
|
1840
|
-
var c = o.an_uid, f = o.an_event, d = u.reduce(function(w,
|
|
1841
|
-
if (
|
|
1842
|
-
var v =
|
|
1843
|
-
w.campaign[v === "campaign" ? "name" : v] = o[
|
|
1844
|
+
var c = o.an_uid, f = o.an_event, d = u.reduce(function(w, I) {
|
|
1845
|
+
if (I.match(cn) || I.match(/^(d|g)clid/)) {
|
|
1846
|
+
var v = I.replace(cn, "");
|
|
1847
|
+
w.campaign[v === "campaign" ? "name" : v] = o[I];
|
|
1844
1848
|
}
|
|
1845
|
-
return
|
|
1849
|
+
return I.match(un) && (w.props[I.replace(un, "")] = o[I]), I.match(ln) && (w.traits[I.replace(ln, "")] = o[I]), w;
|
|
1846
1850
|
}, { campaign: {}, props: {}, traits: {} });
|
|
1847
|
-
n.dispatch(
|
|
1851
|
+
n.dispatch(x({ type: C.params, raw: o }, d, c ? { userId: c } : {})), c && setTimeout(function() {
|
|
1848
1852
|
return t.identify(c, d.traits);
|
|
1849
1853
|
}, 0), f && setTimeout(function() {
|
|
1850
1854
|
return t.track(f, d.props);
|
|
1851
|
-
}, 0), Object.keys(d.campaign).length && n.dispatch({ type:
|
|
1855
|
+
}, 0), Object.keys(d.campaign).length && n.dispatch({ type: C.campaign, campaign: d.campaign });
|
|
1852
1856
|
}
|
|
1853
1857
|
}
|
|
1854
1858
|
return r(i);
|
|
@@ -1856,19 +1860,19 @@ function Mi(t) {
|
|
|
1856
1860
|
};
|
|
1857
1861
|
};
|
|
1858
1862
|
}
|
|
1859
|
-
function
|
|
1863
|
+
function Ki(t) {
|
|
1860
1864
|
return function(e, n) {
|
|
1861
|
-
if (e === void 0 && (e = {}), n === void 0 && (n = {}), n.type ===
|
|
1862
|
-
if (n.key ===
|
|
1863
|
-
return
|
|
1865
|
+
if (e === void 0 && (e = {}), n === void 0 && (n = {}), n.type === C.setItemEnd) {
|
|
1866
|
+
if (n.key === se)
|
|
1867
|
+
return x({}, e, { anonymousId: n.value });
|
|
1864
1868
|
if (n.key === me)
|
|
1865
|
-
return
|
|
1869
|
+
return x({}, e, { userId: n.value });
|
|
1866
1870
|
}
|
|
1867
1871
|
switch (n.type) {
|
|
1868
|
-
case
|
|
1869
|
-
return Object.assign({}, e, { userId: n.userId, traits:
|
|
1870
|
-
case
|
|
1871
|
-
return [me,
|
|
1872
|
+
case C.identify:
|
|
1873
|
+
return Object.assign({}, e, { userId: n.userId, traits: x({}, e.traits, n.traits) });
|
|
1874
|
+
case C.reset:
|
|
1875
|
+
return [me, se, _e].forEach(function(r) {
|
|
1872
1876
|
t.removeItem(r);
|
|
1873
1877
|
}), Object.assign({}, e, { userId: null, anonymousId: null, traits: {} });
|
|
1874
1878
|
default:
|
|
@@ -1877,45 +1881,45 @@ function Zi(t) {
|
|
|
1877
1881
|
};
|
|
1878
1882
|
}
|
|
1879
1883
|
function dn(t) {
|
|
1880
|
-
return { userId: t.getItem(me), anonymousId: t.getItem(
|
|
1884
|
+
return { userId: t.getItem(me), anonymousId: t.getItem(se), traits: t.getItem(_e) };
|
|
1881
1885
|
}
|
|
1882
1886
|
var Pt = function(t) {
|
|
1883
|
-
return
|
|
1887
|
+
return ye + "TEMP" + ye + t;
|
|
1884
1888
|
};
|
|
1885
|
-
function
|
|
1889
|
+
function Fi(t) {
|
|
1886
1890
|
var e = t.storage, n = e.setItem, r = e.removeItem, i = e.getItem;
|
|
1887
1891
|
return function(o) {
|
|
1888
1892
|
return function(a) {
|
|
1889
1893
|
return function(s) {
|
|
1890
1894
|
var h = s.userId, p = s.traits, u = s.options;
|
|
1891
|
-
if (s.type ===
|
|
1895
|
+
if (s.type === C.reset && ([me, _e, se].forEach(function(d) {
|
|
1892
1896
|
r(d);
|
|
1893
|
-
}), [
|
|
1894
|
-
|
|
1895
|
-
})), s.type ===
|
|
1896
|
-
i(
|
|
1897
|
-
var c = i(me), f = i(
|
|
1898
|
-
c && c !== h && o.dispatch({ type:
|
|
1897
|
+
}), [ie, Se, "traits"].forEach(function(d) {
|
|
1898
|
+
xe(Pt(d));
|
|
1899
|
+
})), s.type === C.identify) {
|
|
1900
|
+
i(se) || n(se, st());
|
|
1901
|
+
var c = i(me), f = i(_e) || {};
|
|
1902
|
+
c && c !== h && o.dispatch({ type: C.userIdChanged, old: { userId: c, traits: f }, new: { userId: h, traits: p }, options: u }), h && n(me, h), p && n(_e, x({}, f, p));
|
|
1899
1903
|
}
|
|
1900
1904
|
return a(s);
|
|
1901
1905
|
};
|
|
1902
1906
|
};
|
|
1903
1907
|
};
|
|
1904
1908
|
}
|
|
1905
|
-
var
|
|
1909
|
+
var Ue = {};
|
|
1906
1910
|
function hn(t, e) {
|
|
1907
|
-
|
|
1911
|
+
Ue[t] && V(Ue[t]) && (Ue[t](e), delete Ue[t]);
|
|
1908
1912
|
}
|
|
1909
1913
|
function sr(t, e, n) {
|
|
1910
1914
|
return new Promise(function(r, i) {
|
|
1911
|
-
return e() ? r(t) : n < 1 ? i(
|
|
1915
|
+
return e() ? r(t) : n < 1 ? i(x({}, t, { queue: !0 })) : new Promise(function(o) {
|
|
1912
1916
|
return setTimeout(o, 10);
|
|
1913
1917
|
}).then(function(o) {
|
|
1914
1918
|
return sr(t, e, n - 10).then(r, i);
|
|
1915
1919
|
});
|
|
1916
1920
|
});
|
|
1917
1921
|
}
|
|
1918
|
-
function
|
|
1922
|
+
function Hi(t) {
|
|
1919
1923
|
return { abort: t };
|
|
1920
1924
|
}
|
|
1921
1925
|
function cr(t, e, n) {
|
|
@@ -1926,18 +1930,18 @@ function cr(t, e, n) {
|
|
|
1926
1930
|
}, { processIndex: [], process: [], requeue: [], requeueIndex: [] });
|
|
1927
1931
|
if (p.processIndex && p.processIndex.length) {
|
|
1928
1932
|
p.processIndex.forEach(function(c) {
|
|
1929
|
-
var f = s.actions[c], d = f.plugin, w = f.payload.type,
|
|
1930
|
-
if (
|
|
1933
|
+
var f = s.actions[c], d = f.plugin, w = f.payload.type, I = i[d][w];
|
|
1934
|
+
if (I && V(I)) {
|
|
1931
1935
|
var v, E = function(l, b) {
|
|
1932
|
-
return l === void 0 && (l = {}), b === void 0 && (b = {}), [
|
|
1933
|
-
return l.hasOwnProperty(j) && b[j] && b[j] !== l[j] && (
|
|
1936
|
+
return l === void 0 && (l = {}), b === void 0 && (b = {}), [ie, Se].reduce(function(O, j) {
|
|
1937
|
+
return l.hasOwnProperty(j) && b[j] && b[j] !== l[j] && (O[j] = b[j]), O;
|
|
1934
1938
|
}, l);
|
|
1935
1939
|
}(f.payload, h), S = r[E.meta.rid];
|
|
1936
|
-
if (!S && (v =
|
|
1940
|
+
if (!S && (v = I({ payload: E, config: a[d].config, instance: n, abort: Hi })) && X(v) && v.abort)
|
|
1937
1941
|
return void (r[E.meta.rid] = !0);
|
|
1938
1942
|
if (!S) {
|
|
1939
1943
|
var g = w + ":" + d;
|
|
1940
|
-
t.dispatch(
|
|
1944
|
+
t.dispatch(x({}, E, { type: g, _: { called: g, from: "queueDrain" } }));
|
|
1941
1945
|
}
|
|
1942
1946
|
}
|
|
1943
1947
|
});
|
|
@@ -1951,7 +1955,7 @@ function cr(t, e, n) {
|
|
|
1951
1955
|
var mt = function(t) {
|
|
1952
1956
|
var e = t.data, n = t.action, r = t.instance, i = t.state, o = t.allPlugins, a = t.allMatches, s = t.store, h = t.EVENTS;
|
|
1953
1957
|
try {
|
|
1954
|
-
var p = i.plugins, u = i.context, c = n.type, f = c.match(
|
|
1958
|
+
var p = i.plugins, u = i.context, c = n.type, f = c.match(Ee), d = e.exact.map(function(v) {
|
|
1955
1959
|
return v.pluginName;
|
|
1956
1960
|
});
|
|
1957
1961
|
f && (d = a.during.map(function(v) {
|
|
@@ -1959,23 +1963,23 @@ var mt = function(t) {
|
|
|
1959
1963
|
}));
|
|
1960
1964
|
var w = /* @__PURE__ */ function(v, E) {
|
|
1961
1965
|
return function(S, g, l) {
|
|
1962
|
-
var b = g.config,
|
|
1966
|
+
var b = g.config, O = g.name, j = O + "." + S.type;
|
|
1963
1967
|
l && (j = l.event);
|
|
1964
|
-
var
|
|
1965
|
-
return function(
|
|
1966
|
-
var
|
|
1967
|
-
if (
|
|
1968
|
-
throw new Error("Method " + R + " can only abort " + U + " plugin. " + JSON.stringify(
|
|
1969
|
-
return
|
|
1968
|
+
var A = S.type.match(Ee) ? /* @__PURE__ */ function(U, R, F, k, _) {
|
|
1969
|
+
return function($, T) {
|
|
1970
|
+
var Z = k ? k.name : U, K = T && We(T) ? T : F;
|
|
1971
|
+
if (k && (!(K = T && We(T) ? T : [U]).includes(U) || K.length !== 1))
|
|
1972
|
+
throw new Error("Method " + R + " can only abort " + U + " plugin. " + JSON.stringify(K) + " input valid");
|
|
1973
|
+
return x({}, _, { abort: { reason: $, plugins: K, caller: R, _: Z } });
|
|
1970
1974
|
};
|
|
1971
|
-
}(
|
|
1975
|
+
}(O, j, E, l, S) : /* @__PURE__ */ function(U, R) {
|
|
1972
1976
|
return function() {
|
|
1973
1977
|
throw new Error(U.type + " action not cancellable. Remove abort in " + R);
|
|
1974
1978
|
};
|
|
1975
1979
|
}(S, j);
|
|
1976
|
-
return { payload:
|
|
1980
|
+
return { payload: Ji(S), instance: v, config: b || {}, abort: A };
|
|
1977
1981
|
};
|
|
1978
|
-
}(r, d),
|
|
1982
|
+
}(r, d), I = e.exact.reduce(function(v, E) {
|
|
1979
1983
|
var S = E.pluginName, g = E.methodName, l = !1;
|
|
1980
1984
|
return g.match(/^initialize/) || g.match(/^reset/) || (l = !p[S].loaded), u.offline && g.match(/^(page|track|identify)/) && (l = !0), v["" + S] = l, v;
|
|
1981
1985
|
}, {});
|
|
@@ -1986,25 +1990,25 @@ var mt = function(t) {
|
|
|
1986
1990
|
function b() {
|
|
1987
1991
|
return Promise.resolve(l);
|
|
1988
1992
|
}
|
|
1989
|
-
var
|
|
1993
|
+
var O = function() {
|
|
1990
1994
|
if (e.namespaced && e.namespaced[g])
|
|
1991
|
-
return Promise.resolve(e.namespaced[g].reduce(function(j,
|
|
1995
|
+
return Promise.resolve(e.namespaced[g].reduce(function(j, A, U) {
|
|
1992
1996
|
try {
|
|
1993
1997
|
return Promise.resolve(j).then(function(R) {
|
|
1994
|
-
return
|
|
1995
|
-
var
|
|
1996
|
-
if (
|
|
1997
|
-
var
|
|
1998
|
-
throw new Error([T + " plugin is calling method " +
|
|
1998
|
+
return A.method && V(A.method) ? (function($, T) {
|
|
1999
|
+
var Z = wn($);
|
|
2000
|
+
if (Z && Z.name === T) {
|
|
2001
|
+
var K = wn(Z.method);
|
|
2002
|
+
throw new Error([T + " plugin is calling method " + $, "Plugins cant call self", "Use " + Z.method + " " + (K ? "or " + K.method : "") + " in " + T + " plugin insteadof " + $].join(`
|
|
1999
2003
|
`));
|
|
2000
2004
|
}
|
|
2001
|
-
}(
|
|
2002
|
-
return
|
|
2003
|
-
}), config: mn(
|
|
2004
|
-
var T = X(
|
|
2005
|
-
return Promise.resolve(
|
|
2005
|
+
}(A.methodName, A.pluginName), Promise.resolve(A.method({ payload: R, instance: r, abort: (F = R, k = g, _ = A.pluginName, function($, T) {
|
|
2006
|
+
return x({}, F, { abort: { reason: $, plugins: T || [k], caller: c, from: _ || k } });
|
|
2007
|
+
}), config: mn(A.pluginName, p, o), plugins: p })).then(function($) {
|
|
2008
|
+
var T = X($) ? $ : {};
|
|
2009
|
+
return Promise.resolve(x({}, R, T));
|
|
2006
2010
|
})) : R;
|
|
2007
|
-
var
|
|
2011
|
+
var F, k, _;
|
|
2008
2012
|
});
|
|
2009
2013
|
} catch (R) {
|
|
2010
2014
|
return Promise.reject(R);
|
|
@@ -2014,7 +2018,7 @@ var mt = function(t) {
|
|
|
2014
2018
|
});
|
|
2015
2019
|
l[g] = n;
|
|
2016
2020
|
}();
|
|
2017
|
-
return
|
|
2021
|
+
return O && O.then ? O.then(b) : b();
|
|
2018
2022
|
});
|
|
2019
2023
|
} catch (l) {
|
|
2020
2024
|
return Promise.reject(l);
|
|
@@ -2022,36 +2026,36 @@ var mt = function(t) {
|
|
|
2022
2026
|
}, Promise.resolve({}))).then(function(v) {
|
|
2023
2027
|
return Promise.resolve(e.exact.reduce(function(E, S, g) {
|
|
2024
2028
|
try {
|
|
2025
|
-
var l = e.exact.length === g + 1, b = S.pluginName,
|
|
2029
|
+
var l = e.exact.length === g + 1, b = S.pluginName, O = o[b];
|
|
2026
2030
|
return Promise.resolve(E).then(function(j) {
|
|
2027
|
-
var
|
|
2028
|
-
if (f && (
|
|
2029
|
-
return gt({ data:
|
|
2031
|
+
var A = v[b] ? v[b] : {};
|
|
2032
|
+
if (f && (A = j), yt(A, b))
|
|
2033
|
+
return gt({ data: A, method: c, instance: r, pluginName: b, store: s }), Promise.resolve(j);
|
|
2030
2034
|
if (yt(j, b))
|
|
2031
2035
|
return l && gt({ data: j, method: c, instance: r, store: s }), Promise.resolve(j);
|
|
2032
|
-
if (
|
|
2033
|
-
return s.dispatch({ type: "queue", plugin: b, payload:
|
|
2036
|
+
if (I.hasOwnProperty(b) && I[b] === !0)
|
|
2037
|
+
return s.dispatch({ type: "queue", plugin: b, payload: A, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(j);
|
|
2034
2038
|
var U = w(v[b], o[b]);
|
|
2035
|
-
return Promise.resolve(
|
|
2036
|
-
var
|
|
2037
|
-
if (yt(
|
|
2038
|
-
gt({ data:
|
|
2039
|
+
return Promise.resolve(O[c]({ abort: U.abort, payload: A, instance: r, config: mn(b, p, o), plugins: p })).then(function(R) {
|
|
2040
|
+
var F = X(R) ? R : {}, k = x({}, j, F), _ = v[b];
|
|
2041
|
+
if (yt(_, b))
|
|
2042
|
+
gt({ data: _, method: c, instance: r, pluginName: b, store: s });
|
|
2039
2043
|
else {
|
|
2040
|
-
var
|
|
2041
|
-
(
|
|
2044
|
+
var $ = c + ":" + b;
|
|
2045
|
+
($.match(/:/g) || []).length < 2 && !c.match(fn) && !c.match(pn) && r.dispatch(x({}, f ? k : A, { type: $, _: { called: $, from: "submethod" } }));
|
|
2042
2046
|
}
|
|
2043
|
-
return Promise.resolve(
|
|
2047
|
+
return Promise.resolve(k);
|
|
2044
2048
|
});
|
|
2045
2049
|
});
|
|
2046
2050
|
} catch (j) {
|
|
2047
2051
|
return Promise.reject(j);
|
|
2048
2052
|
}
|
|
2049
2053
|
}, Promise.resolve(n))).then(function(E) {
|
|
2050
|
-
if (!(c.match(
|
|
2054
|
+
if (!(c.match(Ee) || c.match(/^registerPlugin/) || c.match(pn) || c.match(fn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
|
|
2051
2055
|
if (h.plugins.includes(c), E._ && E._.originalAction === c)
|
|
2052
2056
|
return E;
|
|
2053
|
-
var S =
|
|
2054
|
-
ur(E, e.exact.length) && !c.match(/End$/) && (S =
|
|
2057
|
+
var S = x({}, E, { _: { originalAction: E.type, called: E.type, from: "engineEnd" } });
|
|
2058
|
+
ur(E, e.exact.length) && !c.match(/End$/) && (S = x({}, S, { type: E.type + "Aborted" })), s.dispatch(S);
|
|
2055
2059
|
}
|
|
2056
2060
|
return E;
|
|
2057
2061
|
});
|
|
@@ -2059,10 +2063,10 @@ var mt = function(t) {
|
|
|
2059
2063
|
} catch (v) {
|
|
2060
2064
|
return Promise.reject(v);
|
|
2061
2065
|
}
|
|
2062
|
-
},
|
|
2066
|
+
}, Ee = /Start$/, fn = /^bootstrap/, pn = /^ready/;
|
|
2063
2067
|
function gt(t) {
|
|
2064
2068
|
var e = t.pluginName, n = t.method + "Aborted" + (e ? ":" + e : "");
|
|
2065
|
-
t.store.dispatch(
|
|
2069
|
+
t.store.dispatch(x({}, t.data, { type: n, _: { called: n, from: "abort" } }));
|
|
2066
2070
|
}
|
|
2067
2071
|
function mn(t, e, n) {
|
|
2068
2072
|
var r = e[t] || n[t];
|
|
@@ -2074,7 +2078,7 @@ function gn(t, e) {
|
|
|
2074
2078
|
}, []);
|
|
2075
2079
|
}
|
|
2076
2080
|
function yn(t, e) {
|
|
2077
|
-
var n = t.replace(
|
|
2081
|
+
var n = t.replace(Ee, ""), r = e ? ":" + e : "";
|
|
2078
2082
|
return ["" + t + r, "" + n + r, n + "End" + r];
|
|
2079
2083
|
}
|
|
2080
2084
|
function yt(t, e) {
|
|
@@ -2085,27 +2089,27 @@ function ur(t, e) {
|
|
|
2085
2089
|
var n = t.abort;
|
|
2086
2090
|
if (!n)
|
|
2087
2091
|
return !1;
|
|
2088
|
-
if (n === !0 ||
|
|
2092
|
+
if (n === !0 || ae(n))
|
|
2089
2093
|
return !0;
|
|
2090
2094
|
var r = n.plugins;
|
|
2091
|
-
return
|
|
2095
|
+
return We(n) && n.length === e || We(r) && r.length === e;
|
|
2092
2096
|
}
|
|
2093
|
-
function
|
|
2097
|
+
function We(t) {
|
|
2094
2098
|
return Array.isArray(t);
|
|
2095
2099
|
}
|
|
2096
2100
|
function vn(t, e) {
|
|
2097
|
-
return !(!t || !
|
|
2101
|
+
return !(!t || !We(t)) && t.includes(e);
|
|
2098
2102
|
}
|
|
2099
2103
|
function wn(t) {
|
|
2100
2104
|
var e = t.match(/(.*):(.*)/);
|
|
2101
2105
|
return !!e && { method: e[1], name: e[2] };
|
|
2102
2106
|
}
|
|
2103
|
-
function
|
|
2107
|
+
function Ji(t) {
|
|
2104
2108
|
return Object.keys(t).reduce(function(e, n) {
|
|
2105
2109
|
return n === "type" || (e[n] = X(t[n]) ? Object.assign({}, t[n]) : t[n]), e;
|
|
2106
2110
|
}, {});
|
|
2107
2111
|
}
|
|
2108
|
-
function
|
|
2112
|
+
function Xi(t, e, n) {
|
|
2109
2113
|
var r = {};
|
|
2110
2114
|
return function(i) {
|
|
2111
2115
|
return function(o) {
|
|
@@ -2116,95 +2120,95 @@ function Hi(t, e, n) {
|
|
|
2116
2120
|
}, p = a.type, u = a.plugins, c = a;
|
|
2117
2121
|
if (a.abort)
|
|
2118
2122
|
return Promise.resolve(o(a));
|
|
2119
|
-
if (p ===
|
|
2123
|
+
if (p === C.enablePlugin && i.dispatch({ type: C.initializeStart, plugins: u, disabled: [], fromEnable: !0, meta: a.meta }), p === C.disablePlugin && setTimeout(function() {
|
|
2120
2124
|
return hn(a.meta.rid, { payload: a });
|
|
2121
|
-
}, 0), p ===
|
|
2125
|
+
}, 0), p === C.initializeEnd) {
|
|
2122
2126
|
var f = e(), d = Object.keys(f), w = d.filter(function(l) {
|
|
2123
2127
|
return u.includes(l);
|
|
2124
2128
|
}).map(function(l) {
|
|
2125
2129
|
return f[l];
|
|
2126
|
-
}),
|
|
2127
|
-
var b = l.loaded,
|
|
2130
|
+
}), I = [], v = [], E = a.disabled, S = w.map(function(l) {
|
|
2131
|
+
var b = l.loaded, O = l.name, j = l.config;
|
|
2128
2132
|
return sr(l, function() {
|
|
2129
2133
|
return b({ config: j });
|
|
2130
|
-
}, 1e4).then(function(
|
|
2131
|
-
return r[
|
|
2134
|
+
}, 1e4).then(function(A) {
|
|
2135
|
+
return r[O] || (i.dispatch({ type: C.pluginReadyType(O), name: O, events: Object.keys(l).filter(function(U) {
|
|
2132
2136
|
return !Ot.includes(U);
|
|
2133
|
-
}) }), r[
|
|
2134
|
-
}).catch(function(
|
|
2135
|
-
if (
|
|
2136
|
-
throw new Error(
|
|
2137
|
-
return v = v.concat(
|
|
2137
|
+
}) }), r[O] = !0), I = I.concat(O), l;
|
|
2138
|
+
}).catch(function(A) {
|
|
2139
|
+
if (A instanceof Error)
|
|
2140
|
+
throw new Error(A);
|
|
2141
|
+
return v = v.concat(A.name), A;
|
|
2138
2142
|
});
|
|
2139
2143
|
});
|
|
2140
2144
|
Promise.all(S).then(function(l) {
|
|
2141
|
-
var b = { plugins:
|
|
2145
|
+
var b = { plugins: I, failed: v, disabled: E };
|
|
2142
2146
|
setTimeout(function() {
|
|
2143
|
-
d.length === S.length + E.length && i.dispatch(
|
|
2147
|
+
d.length === S.length + E.length && i.dispatch(x({}, { type: C.ready }, b));
|
|
2144
2148
|
}, 0);
|
|
2145
2149
|
});
|
|
2146
2150
|
}
|
|
2147
2151
|
var g = function() {
|
|
2148
|
-
if (p !==
|
|
2152
|
+
if (p !== C.bootstrap)
|
|
2149
2153
|
return /^ready:([^:]*)$/.test(p) && setTimeout(function() {
|
|
2150
2154
|
return cr(i, e, t);
|
|
2151
|
-
}, 0), Promise.resolve(function(l, b,
|
|
2155
|
+
}, 0), Promise.resolve(function(l, b, O, j, A) {
|
|
2152
2156
|
try {
|
|
2153
|
-
var U = V(b) ? b() : b, R = l.type,
|
|
2157
|
+
var U = V(b) ? b() : b, R = l.type, F = R.replace(Ee, "");
|
|
2154
2158
|
if (l._ && l._.called)
|
|
2155
2159
|
return Promise.resolve(l);
|
|
2156
|
-
var
|
|
2157
|
-
var y =
|
|
2158
|
-
return
|
|
2160
|
+
var k = O.getState(), _ = (Z = U, (K = k.plugins) === void 0 && (K = {}), ($e = l.options) === void 0 && ($e = {}), Object.keys(Z).filter(function(m) {
|
|
2161
|
+
var y = $e.plugins || {};
|
|
2162
|
+
return Oi(y[m]) ? y[m] : y.all !== !1 && (!K[m] || K[m].enabled !== !1);
|
|
2159
2163
|
}).map(function(m) {
|
|
2160
|
-
return
|
|
2164
|
+
return Z[m];
|
|
2161
2165
|
}));
|
|
2162
|
-
R ===
|
|
2163
|
-
var y =
|
|
2166
|
+
R === C.initializeStart && l.fromEnable && (_ = Object.keys(k.plugins).filter(function(m) {
|
|
2167
|
+
var y = k.plugins[m];
|
|
2164
2168
|
return l.plugins.includes(m) && !y.initialized;
|
|
2165
2169
|
}).map(function(m) {
|
|
2166
2170
|
return U[m];
|
|
2167
2171
|
}));
|
|
2168
|
-
var
|
|
2172
|
+
var $ = _.map(function(m) {
|
|
2169
2173
|
return m.name;
|
|
2170
|
-
}), T = function(m, y,
|
|
2171
|
-
var
|
|
2172
|
-
return gn(
|
|
2174
|
+
}), T = function(m, y, P) {
|
|
2175
|
+
var N = yn(m).map(function(z) {
|
|
2176
|
+
return gn(z, y);
|
|
2173
2177
|
});
|
|
2174
|
-
return y.reduce(function(
|
|
2175
|
-
var
|
|
2176
|
-
return gn(
|
|
2177
|
-
}),
|
|
2178
|
-
return
|
|
2179
|
-
}, { before:
|
|
2180
|
-
}(R,
|
|
2181
|
-
return Promise.resolve(mt({ action: l, data: { exact: T.before, namespaced: T.beforeNS }, state:
|
|
2178
|
+
return y.reduce(function(z, D) {
|
|
2179
|
+
var H = D.name, M = yn(m, H).map(function(Ne) {
|
|
2180
|
+
return gn(Ne, y);
|
|
2181
|
+
}), W = M[0], L = M[1], q = M[2];
|
|
2182
|
+
return W.length && (z.beforeNS[H] = W), L.length && (z.duringNS[H] = L), q.length && (z.afterNS[H] = q), z;
|
|
2183
|
+
}, { before: N[0], beforeNS: {}, during: N[1], duringNS: {}, after: N[2], afterNS: {} });
|
|
2184
|
+
}(R, _);
|
|
2185
|
+
return Promise.resolve(mt({ action: l, data: { exact: T.before, namespaced: T.beforeNS }, state: k, allPlugins: U, allMatches: T, instance: O, store: j, EVENTS: A })).then(function(m) {
|
|
2182
2186
|
function y() {
|
|
2183
|
-
var
|
|
2184
|
-
if (R.match(
|
|
2185
|
-
return Promise.resolve(mt({ action:
|
|
2186
|
-
|
|
2187
|
+
var z = function() {
|
|
2188
|
+
if (R.match(Ee))
|
|
2189
|
+
return Promise.resolve(mt({ action: x({}, P, { type: F + "End" }), data: { exact: T.after, namespaced: T.afterNS }, state: k, allPlugins: U, allMatches: T, instance: O, store: j, EVENTS: A })).then(function(D) {
|
|
2190
|
+
D.meta && D.meta.hasCallback && hn(D.meta.rid, { payload: D });
|
|
2187
2191
|
});
|
|
2188
2192
|
}();
|
|
2189
|
-
return
|
|
2193
|
+
return z && z.then ? z.then(function() {
|
|
2190
2194
|
return m;
|
|
2191
2195
|
}) : m;
|
|
2192
2196
|
}
|
|
2193
|
-
if (ur(m,
|
|
2197
|
+
if (ur(m, $.length))
|
|
2194
2198
|
return m;
|
|
2195
|
-
var
|
|
2196
|
-
if (R !==
|
|
2197
|
-
return Promise.resolve(mt({ action:
|
|
2198
|
-
|
|
2199
|
+
var P, N = function() {
|
|
2200
|
+
if (R !== F)
|
|
2201
|
+
return Promise.resolve(mt({ action: x({}, m, { type: F }), data: { exact: T.during, namespaced: T.duringNS }, state: k, allPlugins: U, allMatches: T, instance: O, store: j, EVENTS: A })).then(function(z) {
|
|
2202
|
+
P = z;
|
|
2199
2203
|
});
|
|
2200
|
-
|
|
2204
|
+
P = m;
|
|
2201
2205
|
}();
|
|
2202
|
-
return
|
|
2206
|
+
return N && N.then ? N.then(y) : y();
|
|
2203
2207
|
});
|
|
2204
2208
|
} catch (m) {
|
|
2205
2209
|
return Promise.reject(m);
|
|
2206
2210
|
}
|
|
2207
|
-
var
|
|
2211
|
+
var Z, K, $e;
|
|
2208
2212
|
}(a, e, t, i, n)).then(function(l) {
|
|
2209
2213
|
return s = 1, o(l);
|
|
2210
2214
|
});
|
|
@@ -2217,22 +2221,22 @@ function Hi(t, e, n) {
|
|
|
2217
2221
|
};
|
|
2218
2222
|
};
|
|
2219
2223
|
}
|
|
2220
|
-
function
|
|
2224
|
+
function Vi(t) {
|
|
2221
2225
|
return function(e) {
|
|
2222
2226
|
return function(n) {
|
|
2223
2227
|
return function(r) {
|
|
2224
2228
|
var i = r.type, o = r.key, a = r.value, s = r.options;
|
|
2225
|
-
if (i ===
|
|
2229
|
+
if (i === C.setItem || i === C.removeItem) {
|
|
2226
2230
|
if (r.abort)
|
|
2227
2231
|
return n(r);
|
|
2228
|
-
i ===
|
|
2232
|
+
i === C.setItem ? t.setItem(o, a, s) : t.removeItem(o, s);
|
|
2229
2233
|
}
|
|
2230
2234
|
return n(r);
|
|
2231
2235
|
};
|
|
2232
2236
|
};
|
|
2233
2237
|
};
|
|
2234
2238
|
}
|
|
2235
|
-
var
|
|
2239
|
+
var Yi = function() {
|
|
2236
2240
|
var t = this;
|
|
2237
2241
|
this.before = [], this.after = [], this.addMiddleware = function(e, n) {
|
|
2238
2242
|
t[n] = t[n].concat(e);
|
|
@@ -2250,13 +2254,13 @@ var Xi = function() {
|
|
|
2250
2254
|
} }, a = t[e].map(function(s) {
|
|
2251
2255
|
return s(o);
|
|
2252
2256
|
});
|
|
2253
|
-
return
|
|
2257
|
+
return Ce.apply(void 0, a)(r)(i);
|
|
2254
2258
|
};
|
|
2255
2259
|
};
|
|
2256
2260
|
};
|
|
2257
2261
|
};
|
|
2258
2262
|
};
|
|
2259
|
-
function
|
|
2263
|
+
function Gi(t) {
|
|
2260
2264
|
return function(e, n) {
|
|
2261
2265
|
e === void 0 && (e = {});
|
|
2262
2266
|
var r = {};
|
|
@@ -2267,19 +2271,19 @@ function Vi(t) {
|
|
|
2267
2271
|
if (!o || !i)
|
|
2268
2272
|
return e;
|
|
2269
2273
|
var a = n.enabled, s = o.config;
|
|
2270
|
-
return r[i] = { enabled: a, initialized: !!a && !o.initialize, loaded: !!a && !!o.loaded({ config: s }), config: s },
|
|
2274
|
+
return r[i] = { enabled: a, initialized: !!a && !o.initialize, loaded: !!a && !!o.loaded({ config: s }), config: s }, x({}, e, r);
|
|
2271
2275
|
}
|
|
2272
2276
|
if (/^initialize:([^:]*)$/.test(n.type)) {
|
|
2273
|
-
var h = bn(n.type,
|
|
2274
|
-
return p && h ? (r[h] =
|
|
2277
|
+
var h = bn(n.type, C.initialize), p = t()[h];
|
|
2278
|
+
return p && h ? (r[h] = x({}, e[h], { initialized: !0, loaded: !!p.loaded({ config: p.config }) }), x({}, e, r)) : e;
|
|
2275
2279
|
}
|
|
2276
2280
|
if (/^ready:([^:]*)$/.test(n.type))
|
|
2277
|
-
return r[n.name] =
|
|
2281
|
+
return r[n.name] = x({}, e[n.name], { loaded: !0 }), x({}, e, r);
|
|
2278
2282
|
switch (n.type) {
|
|
2279
|
-
case
|
|
2280
|
-
return
|
|
2281
|
-
case
|
|
2282
|
-
return
|
|
2283
|
+
case C.disablePlugin:
|
|
2284
|
+
return x({}, e, kn(n.plugins, !1, e));
|
|
2285
|
+
case C.enablePlugin:
|
|
2286
|
+
return x({}, e, kn(n.plugins, !0, e));
|
|
2283
2287
|
default:
|
|
2284
2288
|
return e;
|
|
2285
2289
|
}
|
|
@@ -2290,7 +2294,7 @@ function bn(t, e) {
|
|
|
2290
2294
|
}
|
|
2291
2295
|
function kn(t, e, n) {
|
|
2292
2296
|
return t.reduce(function(r, i) {
|
|
2293
|
-
return r[i] =
|
|
2297
|
+
return r[i] = x({}, n[i], { enabled: e }), r;
|
|
2294
2298
|
}, n);
|
|
2295
2299
|
}
|
|
2296
2300
|
function lr(t) {
|
|
@@ -2300,24 +2304,24 @@ function lr(t) {
|
|
|
2300
2304
|
}
|
|
2301
2305
|
return t;
|
|
2302
2306
|
}
|
|
2303
|
-
var
|
|
2304
|
-
function
|
|
2305
|
-
t === void 0 && (t =
|
|
2307
|
+
var Bi = { last: {}, history: [] };
|
|
2308
|
+
function qi(t, e) {
|
|
2309
|
+
t === void 0 && (t = Bi);
|
|
2306
2310
|
var n = e.options, r = e.meta;
|
|
2307
|
-
if (e.type ===
|
|
2308
|
-
var i = lr(
|
|
2309
|
-
return
|
|
2311
|
+
if (e.type === C.track) {
|
|
2312
|
+
var i = lr(x({ event: e.event, properties: e.properties }, Object.keys(n).length && { options: n }, { meta: r }));
|
|
2313
|
+
return x({}, t, { last: i, history: t.history.concat(i) });
|
|
2310
2314
|
}
|
|
2311
2315
|
return t;
|
|
2312
2316
|
}
|
|
2313
|
-
var
|
|
2314
|
-
function
|
|
2315
|
-
t === void 0 && (t =
|
|
2317
|
+
var Qi = { actions: [] };
|
|
2318
|
+
function eo(t, e) {
|
|
2319
|
+
t === void 0 && (t = Qi);
|
|
2316
2320
|
var n = e.payload;
|
|
2317
2321
|
switch (e.type) {
|
|
2318
2322
|
case "queue":
|
|
2319
2323
|
var r;
|
|
2320
|
-
return r = n && n.type && n.type ===
|
|
2324
|
+
return r = n && n.type && n.type === C.identify ? [e].concat(t.actions) : t.actions.concat(e), x({}, t, { actions: r });
|
|
2321
2325
|
case "dequeue":
|
|
2322
2326
|
return [];
|
|
2323
2327
|
default:
|
|
@@ -2325,66 +2329,66 @@ function qi(t, e) {
|
|
|
2325
2329
|
}
|
|
2326
2330
|
}
|
|
2327
2331
|
var dr = /#.*$/;
|
|
2328
|
-
function
|
|
2332
|
+
function to(t) {
|
|
2329
2333
|
var e = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);
|
|
2330
2334
|
return "/" + (e && e[3] ? e[3].split("?")[0].replace(dr, "") : "");
|
|
2331
2335
|
}
|
|
2332
|
-
var hr, fr, pr, mr,
|
|
2333
|
-
if (t === void 0 && (t = {}), !
|
|
2336
|
+
var hr, fr, pr, mr, no = function(t) {
|
|
2337
|
+
if (t === void 0 && (t = {}), !J)
|
|
2334
2338
|
return t;
|
|
2335
2339
|
var e = document, n = e.title, r = e.referrer, i = window, o = i.location, a = i.innerWidth, s = i.innerHeight, h = o.hash, p = o.search, u = function(f) {
|
|
2336
2340
|
var d = function() {
|
|
2337
|
-
if (
|
|
2338
|
-
for (var w,
|
|
2341
|
+
if (J) {
|
|
2342
|
+
for (var w, I = document.getElementsByTagName("link"), v = 0; w = I[v]; v++)
|
|
2339
2343
|
if (w.getAttribute("rel") === "canonical")
|
|
2340
2344
|
return w.getAttribute("href");
|
|
2341
2345
|
}
|
|
2342
2346
|
}();
|
|
2343
2347
|
return d ? d.match(/\?/) ? d : d + f : window.location.href.replace(dr, "");
|
|
2344
|
-
}(p), c = { title: n, url: u, path:
|
|
2345
|
-
return r && r !== "" && (c.referrer = r),
|
|
2346
|
-
},
|
|
2347
|
-
function
|
|
2348
|
-
t === void 0 && (t =
|
|
2348
|
+
}(p), c = { title: n, url: u, path: to(u), hash: h, search: p, width: a, height: s };
|
|
2349
|
+
return r && r !== "" && (c.referrer = r), x({}, c, t);
|
|
2350
|
+
}, ro = { last: {}, history: [] };
|
|
2351
|
+
function io(t, e) {
|
|
2352
|
+
t === void 0 && (t = ro);
|
|
2349
2353
|
var n = e.options;
|
|
2350
|
-
if (e.type ===
|
|
2351
|
-
var r = lr(
|
|
2352
|
-
return
|
|
2354
|
+
if (e.type === C.page) {
|
|
2355
|
+
var r = lr(x({ properties: e.properties, meta: e.meta }, Object.keys(n).length && { options: n }));
|
|
2356
|
+
return x({}, t, { last: r, history: t.history.concat(r) });
|
|
2353
2357
|
}
|
|
2354
2358
|
return t;
|
|
2355
2359
|
}
|
|
2356
2360
|
hr = function() {
|
|
2357
|
-
if (!
|
|
2361
|
+
if (!J)
|
|
2358
2362
|
return !1;
|
|
2359
2363
|
var t = navigator.appVersion;
|
|
2360
2364
|
return ~t.indexOf("Win") ? "Windows" : ~t.indexOf("Mac") ? "MacOS" : ~t.indexOf("X11") ? "UNIX" : ~t.indexOf("Linux") ? "Linux" : "Unknown OS";
|
|
2361
|
-
}(), fr =
|
|
2362
|
-
var In = { initialized: !1, sessionId: st(), app: null, version: null, debug: !1, offline: !!
|
|
2363
|
-
function
|
|
2365
|
+
}(), fr = J ? document.referrer : null, pr = Ni(), mr = zi();
|
|
2366
|
+
var In = { initialized: !1, sessionId: st(), app: null, version: null, debug: !1, offline: !!J && !navigator.onLine, os: { name: hr }, userAgent: J ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: mr, locale: pr, campaign: {}, referrer: fr };
|
|
2367
|
+
function oo(t, e) {
|
|
2364
2368
|
t === void 0 && (t = In);
|
|
2365
2369
|
var n = t.initialized, r = e.campaign;
|
|
2366
2370
|
switch (e.type) {
|
|
2367
|
-
case
|
|
2368
|
-
return
|
|
2369
|
-
case
|
|
2370
|
-
return
|
|
2371
|
-
case
|
|
2372
|
-
return
|
|
2371
|
+
case C.campaign:
|
|
2372
|
+
return x({}, t, { campaign: r });
|
|
2373
|
+
case C.offline:
|
|
2374
|
+
return x({}, t, { offline: !0 });
|
|
2375
|
+
case C.online:
|
|
2376
|
+
return x({}, t, { offline: !1 });
|
|
2373
2377
|
default:
|
|
2374
|
-
return n ? t :
|
|
2378
|
+
return n ? t : x({}, In, t, { initialized: !0 });
|
|
2375
2379
|
}
|
|
2376
2380
|
}
|
|
2377
|
-
var
|
|
2378
|
-
function
|
|
2379
|
-
if (
|
|
2381
|
+
var ao = ["plugins", "reducers", "storage"];
|
|
2382
|
+
function so(t, e, n) {
|
|
2383
|
+
if (J) {
|
|
2380
2384
|
var r = window[(n ? "add" : "remove") + "EventListener"];
|
|
2381
2385
|
t.split(" ").forEach(function(i) {
|
|
2382
2386
|
r(i, e);
|
|
2383
2387
|
});
|
|
2384
2388
|
}
|
|
2385
2389
|
}
|
|
2386
|
-
function
|
|
2387
|
-
var e =
|
|
2390
|
+
function co(t) {
|
|
2391
|
+
var e = so.bind(null, "online offline", function(n) {
|
|
2388
2392
|
return Promise.resolve(!navigator.onLine).then(t);
|
|
2389
2393
|
});
|
|
2390
2394
|
return e(!0), function(n) {
|
|
@@ -2392,18 +2396,18 @@ function ao(t) {
|
|
|
2392
2396
|
};
|
|
2393
2397
|
}
|
|
2394
2398
|
function gr() {
|
|
2395
|
-
return
|
|
2399
|
+
return we("analytics", []), function(t) {
|
|
2396
2400
|
return function(e, n, r) {
|
|
2397
2401
|
var i = t(e, n, r), o = i.dispatch;
|
|
2398
2402
|
return Object.assign(i, { dispatch: function(a) {
|
|
2399
|
-
return Pe
|
|
2403
|
+
return je[Pe].analytics.push(a.action || a), o(a);
|
|
2400
2404
|
} });
|
|
2401
2405
|
};
|
|
2402
2406
|
};
|
|
2403
2407
|
}
|
|
2404
2408
|
function Sn(t) {
|
|
2405
2409
|
return function() {
|
|
2406
|
-
return
|
|
2410
|
+
return Ce(Ce.apply(null, arguments), gr());
|
|
2407
2411
|
};
|
|
2408
2412
|
}
|
|
2409
2413
|
function vt(t) {
|
|
@@ -2412,7 +2416,7 @@ function vt(t) {
|
|
|
2412
2416
|
function _n(t, e, n) {
|
|
2413
2417
|
t === void 0 && (t = {});
|
|
2414
2418
|
var r, i, o = st();
|
|
2415
|
-
return e && (
|
|
2419
|
+
return e && (Ue[o] = (r = e, i = function(a) {
|
|
2416
2420
|
for (var s, h = a || Array.prototype.slice.call(arguments), p = 0; p < h.length; p++)
|
|
2417
2421
|
if (V(h[p])) {
|
|
2418
2422
|
s = h[p];
|
|
@@ -2421,9 +2425,9 @@ function _n(t, e, n) {
|
|
|
2421
2425
|
return s;
|
|
2422
2426
|
}(n), function(a) {
|
|
2423
2427
|
i && i(a), r(a);
|
|
2424
|
-
})),
|
|
2428
|
+
})), x({}, t, { rid: o, ts: (/* @__PURE__ */ new Date()).getTime() }, e ? { hasCallback: !0 } : {});
|
|
2425
2429
|
}
|
|
2426
|
-
function
|
|
2430
|
+
function uo(t) {
|
|
2427
2431
|
t === void 0 && (t = {});
|
|
2428
2432
|
var e = t.reducers || {}, n = t.initialUser || {}, r = (t.plugins || []).reduce(function(m, y) {
|
|
2429
2433
|
if (V(y))
|
|
@@ -2431,26 +2435,26 @@ function so(t) {
|
|
|
2431
2435
|
if (y.NAMESPACE && (y.name = y.NAMESPACE), !y.name)
|
|
2432
2436
|
throw new Error("https://lytics.dev/errors/1");
|
|
2433
2437
|
y.config || (y.config = {});
|
|
2434
|
-
var
|
|
2435
|
-
return y.EVENTS[
|
|
2438
|
+
var P = y.EVENTS ? Object.keys(y.EVENTS).map(function(D) {
|
|
2439
|
+
return y.EVENTS[D];
|
|
2436
2440
|
}) : [];
|
|
2437
|
-
m.pluginEnabled[y.name] = !(y.enabled === !1 || y.config.enabled === !1), delete y.enabled, y.methods && (m.methods[y.name] = Object.keys(y.methods).reduce(function(
|
|
2438
|
-
var
|
|
2439
|
-
return
|
|
2440
|
-
for (var
|
|
2441
|
-
|
|
2442
|
-
return
|
|
2443
|
-
}),
|
|
2441
|
+
m.pluginEnabled[y.name] = !(y.enabled === !1 || y.config.enabled === !1), delete y.enabled, y.methods && (m.methods[y.name] = Object.keys(y.methods).reduce(function(D, H) {
|
|
2442
|
+
var M;
|
|
2443
|
+
return D[H] = (M = y.methods[H], function() {
|
|
2444
|
+
for (var W = Array.prototype.slice.call(arguments), L = new Array(M.length), q = 0; q < W.length; q++)
|
|
2445
|
+
L[q] = W[q];
|
|
2446
|
+
return L[L.length] = b, M.apply({ instance: b }, L);
|
|
2447
|
+
}), D;
|
|
2444
2448
|
}, {}), delete y.methods);
|
|
2445
|
-
var
|
|
2446
|
-
if (m.events = Array.from(
|
|
2449
|
+
var N = Object.keys(y).concat(P), z = new Set(m.events.concat(N));
|
|
2450
|
+
if (m.events = Array.from(z), m.pluginsArray = m.pluginsArray.concat(y), m.plugins[y.name])
|
|
2447
2451
|
throw new Error(y.name + "AlreadyLoaded");
|
|
2448
2452
|
return m.plugins[y.name] = y, m.plugins[y.name].loaded || (m.plugins[y.name].loaded = function() {
|
|
2449
2453
|
return !0;
|
|
2450
2454
|
}), m;
|
|
2451
|
-
}, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), i = t.storage ? t.storage : { getItem:
|
|
2452
|
-
return function(y,
|
|
2453
|
-
return
|
|
2455
|
+
}, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), i = t.storage ? t.storage : { getItem: ve, setItem: we, removeItem: xe }, o = /* @__PURE__ */ function(m) {
|
|
2456
|
+
return function(y, P, N) {
|
|
2457
|
+
return P.getState("user")[y] || (N && X(N) && N[y] ? N[y] : dn(m)[y] || ve(Pt(y)) || null);
|
|
2454
2458
|
};
|
|
2455
2459
|
}(i), a = r.plugins, s = r.events.filter(function(m) {
|
|
2456
2460
|
return !Ot.includes(m);
|
|
@@ -2458,199 +2462,199 @@ function so(t) {
|
|
|
2458
2462
|
return !Ot.includes(m);
|
|
2459
2463
|
})), p = Array.from(h).sort(), u = function() {
|
|
2460
2464
|
return a;
|
|
2461
|
-
}, c = new
|
|
2465
|
+
}, c = new Yi(), f = c.addMiddleware, d = c.removeMiddleware, w = c.dynamicMiddlewares, I = function() {
|
|
2462
2466
|
throw new Error("Abort disabled inListener");
|
|
2463
|
-
}, v =
|
|
2467
|
+
}, v = Di(), E = dn(i), S = x({}, E, n, v.an_uid ? { userId: v.an_uid } : {}, v.an_aid ? { anonymousId: v.an_aid } : {});
|
|
2464
2468
|
S.anonymousId || (S.anonymousId = st());
|
|
2465
|
-
var g =
|
|
2466
|
-
return new Promise(function(
|
|
2467
|
-
T.dispatch({ type:
|
|
2469
|
+
var g = x({ enable: function(m, y) {
|
|
2470
|
+
return new Promise(function(P) {
|
|
2471
|
+
T.dispatch({ type: C.enablePlugin, plugins: vt(m), _: { originalAction: C.enablePlugin } }, P, [y]);
|
|
2468
2472
|
});
|
|
2469
2473
|
}, disable: function(m, y) {
|
|
2470
|
-
return new Promise(function(
|
|
2471
|
-
T.dispatch({ type:
|
|
2474
|
+
return new Promise(function(P) {
|
|
2475
|
+
T.dispatch({ type: C.disablePlugin, plugins: vt(m), _: { originalAction: C.disablePlugin } }, P, [y]);
|
|
2472
2476
|
});
|
|
2473
|
-
} }, r.methods), l = !1, b = { identify: function(m, y,
|
|
2477
|
+
} }, r.methods), l = !1, b = { identify: function(m, y, P, N) {
|
|
2474
2478
|
try {
|
|
2475
|
-
var
|
|
2476
|
-
|
|
2477
|
-
var
|
|
2478
|
-
return Promise.resolve(new Promise(function(
|
|
2479
|
-
T.dispatch(
|
|
2479
|
+
var z = ae(m) ? m : null, D = X(m) ? m : y, H = P || {}, M = b.user();
|
|
2480
|
+
we(Pt(ie), z);
|
|
2481
|
+
var W = z || D.userId || o(ie, b, D);
|
|
2482
|
+
return Promise.resolve(new Promise(function(L) {
|
|
2483
|
+
T.dispatch(x({ type: C.identifyStart, userId: W, traits: D || {}, options: H, anonymousId: M.anonymousId }, M.id && M.id !== z && { previousId: M.id }), L, [y, P, N]);
|
|
2480
2484
|
}));
|
|
2481
|
-
} catch (
|
|
2482
|
-
return Promise.reject(
|
|
2485
|
+
} catch (L) {
|
|
2486
|
+
return Promise.reject(L);
|
|
2483
2487
|
}
|
|
2484
|
-
}, track: function(m, y,
|
|
2488
|
+
}, track: function(m, y, P, N) {
|
|
2485
2489
|
try {
|
|
2486
|
-
var
|
|
2487
|
-
if (!
|
|
2490
|
+
var z = X(m) ? m.event : m;
|
|
2491
|
+
if (!z || !ae(z))
|
|
2488
2492
|
throw new Error("EventMissing");
|
|
2489
|
-
var
|
|
2490
|
-
return Promise.resolve(new Promise(function(
|
|
2491
|
-
T.dispatch({ type:
|
|
2493
|
+
var D = X(m) ? m : y || {}, H = X(P) ? P : {};
|
|
2494
|
+
return Promise.resolve(new Promise(function(M) {
|
|
2495
|
+
T.dispatch({ type: C.trackStart, event: z, properties: D, options: H, userId: o(ie, b, y), anonymousId: o(Se, b, y) }, M, [y, P, N]);
|
|
2492
2496
|
}));
|
|
2493
|
-
} catch (
|
|
2494
|
-
return Promise.reject(
|
|
2497
|
+
} catch (M) {
|
|
2498
|
+
return Promise.reject(M);
|
|
2495
2499
|
}
|
|
2496
|
-
}, page: function(m, y,
|
|
2500
|
+
}, page: function(m, y, P) {
|
|
2497
2501
|
try {
|
|
2498
|
-
var
|
|
2499
|
-
return Promise.resolve(new Promise(function(
|
|
2500
|
-
T.dispatch({ type:
|
|
2502
|
+
var N = X(m) ? m : {}, z = X(y) ? y : {};
|
|
2503
|
+
return Promise.resolve(new Promise(function(D) {
|
|
2504
|
+
T.dispatch({ type: C.pageStart, properties: no(N), options: z, userId: o(ie, b, N), anonymousId: o(Se, b, N) }, D, [m, y, P]);
|
|
2501
2505
|
}));
|
|
2502
|
-
} catch (
|
|
2503
|
-
return Promise.reject(
|
|
2506
|
+
} catch (D) {
|
|
2507
|
+
return Promise.reject(D);
|
|
2504
2508
|
}
|
|
2505
2509
|
}, user: function(m) {
|
|
2506
|
-
if (m ===
|
|
2507
|
-
return o(
|
|
2508
|
-
if (m ===
|
|
2509
|
-
return o(
|
|
2510
|
+
if (m === ie || m === "id")
|
|
2511
|
+
return o(ie, b);
|
|
2512
|
+
if (m === Se || m === "anonId")
|
|
2513
|
+
return o(Se, b);
|
|
2510
2514
|
var y = b.getState("user");
|
|
2511
2515
|
return m ? rn(y, m) : y;
|
|
2512
2516
|
}, reset: function(m) {
|
|
2513
2517
|
return new Promise(function(y) {
|
|
2514
|
-
T.dispatch({ type:
|
|
2518
|
+
T.dispatch({ type: C.resetStart }, y, m);
|
|
2515
2519
|
});
|
|
2516
2520
|
}, ready: function(m) {
|
|
2517
|
-
return l && m({ plugins: g, instance: b }), b.on(
|
|
2521
|
+
return l && m({ plugins: g, instance: b }), b.on(C.ready, function(y) {
|
|
2518
2522
|
m(y), l = !0;
|
|
2519
2523
|
});
|
|
2520
2524
|
}, on: function(m, y) {
|
|
2521
2525
|
if (!m || !V(y))
|
|
2522
2526
|
return !1;
|
|
2523
|
-
if (m ===
|
|
2527
|
+
if (m === C.bootstrap)
|
|
2524
2528
|
throw new Error(".on disabled for " + m);
|
|
2525
|
-
var
|
|
2529
|
+
var P = /Start$|Start:/;
|
|
2526
2530
|
if (m === "*") {
|
|
2527
|
-
var
|
|
2528
|
-
return function(
|
|
2529
|
-
return function(
|
|
2530
|
-
return
|
|
2531
|
+
var N = function(M) {
|
|
2532
|
+
return function(W) {
|
|
2533
|
+
return function(L) {
|
|
2534
|
+
return L.type.match(P) && y({ payload: L, instance: b, plugins: a }), W(L);
|
|
2531
2535
|
};
|
|
2532
2536
|
};
|
|
2533
|
-
},
|
|
2534
|
-
return function(
|
|
2535
|
-
return function(
|
|
2536
|
-
return
|
|
2537
|
+
}, z = function(M) {
|
|
2538
|
+
return function(W) {
|
|
2539
|
+
return function(L) {
|
|
2540
|
+
return L.type.match(P) || y({ payload: L, instance: b, plugins: a }), W(L);
|
|
2537
2541
|
};
|
|
2538
2542
|
};
|
|
2539
2543
|
};
|
|
2540
|
-
return f(
|
|
2541
|
-
d(
|
|
2544
|
+
return f(N, Ye), f(z, Ge), function() {
|
|
2545
|
+
d(N, Ye), d(z, Ge);
|
|
2542
2546
|
};
|
|
2543
2547
|
}
|
|
2544
|
-
var
|
|
2545
|
-
return function(
|
|
2546
|
-
return function(
|
|
2547
|
-
return
|
|
2548
|
+
var D = m.match(P) ? Ye : Ge, H = function(M) {
|
|
2549
|
+
return function(W) {
|
|
2550
|
+
return function(L) {
|
|
2551
|
+
return L.type === m && y({ payload: L, instance: b, plugins: a, abort: I }), W(L);
|
|
2548
2552
|
};
|
|
2549
2553
|
};
|
|
2550
2554
|
};
|
|
2551
|
-
return f(
|
|
2552
|
-
return d(
|
|
2555
|
+
return f(H, D), function() {
|
|
2556
|
+
return d(H, D);
|
|
2553
2557
|
};
|
|
2554
2558
|
}, once: function(m, y) {
|
|
2555
2559
|
if (!m || !V(y))
|
|
2556
2560
|
return !1;
|
|
2557
|
-
if (m ===
|
|
2561
|
+
if (m === C.bootstrap)
|
|
2558
2562
|
throw new Error(".once disabled for " + m);
|
|
2559
|
-
var
|
|
2560
|
-
y({ payload:
|
|
2563
|
+
var P = b.on(m, function(N) {
|
|
2564
|
+
y({ payload: N.payload, instance: b, plugins: a, abort: I }), P();
|
|
2561
2565
|
});
|
|
2562
|
-
return
|
|
2566
|
+
return P;
|
|
2563
2567
|
}, getState: function(m) {
|
|
2564
2568
|
var y = T.getState();
|
|
2565
2569
|
return m ? rn(y, m) : Object.assign({}, y);
|
|
2566
2570
|
}, dispatch: function(m) {
|
|
2567
|
-
var y =
|
|
2571
|
+
var y = ae(m) ? { type: m } : m;
|
|
2568
2572
|
if (et.includes(y.type))
|
|
2569
2573
|
throw new Error("reserved action " + y.type);
|
|
2570
|
-
var
|
|
2571
|
-
T.dispatch(
|
|
2572
|
-
}, enablePlugin: g.enable, disablePlugin: g.disable, plugins: g, storage: { getItem: i.getItem, setItem: function(m, y,
|
|
2573
|
-
T.dispatch({ type:
|
|
2574
|
+
var P = x({}, y, { _: x({ originalAction: y.type }, m._ || {}) });
|
|
2575
|
+
T.dispatch(P);
|
|
2576
|
+
}, enablePlugin: g.enable, disablePlugin: g.disable, plugins: g, storage: { getItem: i.getItem, setItem: function(m, y, P) {
|
|
2577
|
+
T.dispatch({ type: C.setItemStart, key: m, value: y, options: P });
|
|
2574
2578
|
}, removeItem: function(m, y) {
|
|
2575
|
-
T.dispatch({ type:
|
|
2579
|
+
T.dispatch({ type: C.removeItemStart, key: m, options: y });
|
|
2576
2580
|
} }, setAnonymousId: function(m, y) {
|
|
2577
|
-
b.storage.setItem(
|
|
2578
|
-
}, events: { core: et, plugins: s } },
|
|
2581
|
+
b.storage.setItem(se, m, y);
|
|
2582
|
+
}, events: { core: et, plugins: s } }, O = r.middlewares.concat([function(m) {
|
|
2579
2583
|
return function(y) {
|
|
2580
|
-
return function(
|
|
2581
|
-
return
|
|
2584
|
+
return function(P) {
|
|
2585
|
+
return P.meta || (P.meta = _n()), y(P);
|
|
2582
2586
|
};
|
|
2583
2587
|
};
|
|
2584
|
-
}, w(Ye),
|
|
2585
|
-
if (
|
|
2588
|
+
}, w(Ye), Xi(b, u, { all: p, plugins: s }), Vi(i), Wi(b), Fi(b), w(Ge)]), j = { context: oo, user: Ki(i), page: io, track: qi, plugins: Gi(u), queue: eo }, A = Ce, U = Ce;
|
|
2589
|
+
if (J && t.debug) {
|
|
2586
2590
|
var R = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
|
|
2587
|
-
R && (
|
|
2591
|
+
R && (A = R({ trace: !0, traceLimit: 25 })), U = function() {
|
|
2588
2592
|
return arguments.length === 0 ? gr() : X(typeof arguments[0]) ? Sn() : Sn().apply(null, arguments);
|
|
2589
2593
|
};
|
|
2590
2594
|
}
|
|
2591
|
-
var
|
|
2592
|
-
return Object.keys(m).reduce(function(y,
|
|
2593
|
-
return
|
|
2595
|
+
var F, k = function(m) {
|
|
2596
|
+
return Object.keys(m).reduce(function(y, P) {
|
|
2597
|
+
return ao.includes(P) || (y[P] = m[P]), y;
|
|
2594
2598
|
}, {});
|
|
2595
|
-
}(t),
|
|
2596
|
-
var
|
|
2597
|
-
return m[
|
|
2598
|
-
}, {}),
|
|
2599
|
-
for (var y = Object.keys(m),
|
|
2600
|
-
var
|
|
2601
|
-
typeof m[
|
|
2599
|
+
}(t), _ = r.pluginsArray.reduce(function(m, y) {
|
|
2600
|
+
var P = y.name, N = y.config, z = y.loaded, D = r.pluginEnabled[P];
|
|
2601
|
+
return m[P] = { enabled: D, initialized: !!D && !y.initialize, loaded: !!z({ config: N }), config: N }, m;
|
|
2602
|
+
}, {}), $ = { context: k, user: S, plugins: _ }, T = ar(function(m) {
|
|
2603
|
+
for (var y = Object.keys(m), P = {}, N = 0; N < y.length; N++) {
|
|
2604
|
+
var z = y[N];
|
|
2605
|
+
typeof m[z] === oe && (P[z] = m[z]);
|
|
2602
2606
|
}
|
|
2603
|
-
var
|
|
2607
|
+
var D, H = Object.keys(P);
|
|
2604
2608
|
try {
|
|
2605
|
-
(function(
|
|
2606
|
-
Object.keys(
|
|
2607
|
-
var
|
|
2608
|
-
if (typeof
|
|
2609
|
-
throw new Error("reducer " +
|
|
2609
|
+
(function(M) {
|
|
2610
|
+
Object.keys(M).forEach(function(W) {
|
|
2611
|
+
var L = M[W];
|
|
2612
|
+
if (typeof L(void 0, { type: "@@redux/INIT" }) === ne || typeof L(void 0, { type: Li }) === ne)
|
|
2613
|
+
throw new Error("reducer " + W + " " + ne);
|
|
2610
2614
|
});
|
|
2611
|
-
})(
|
|
2612
|
-
} catch (
|
|
2613
|
-
|
|
2615
|
+
})(P);
|
|
2616
|
+
} catch (M) {
|
|
2617
|
+
D = M;
|
|
2614
2618
|
}
|
|
2615
|
-
return function(
|
|
2616
|
-
if (
|
|
2617
|
-
throw
|
|
2618
|
-
for (var
|
|
2619
|
-
var Fe =
|
|
2620
|
-
if (typeof lt ===
|
|
2621
|
-
var
|
|
2622
|
-
throw new Error(
|
|
2619
|
+
return function(M, W) {
|
|
2620
|
+
if (M === void 0 && (M = {}), D)
|
|
2621
|
+
throw D;
|
|
2622
|
+
for (var L = !1, q = {}, Ne = 0; Ne < H.length; Ne++) {
|
|
2623
|
+
var Fe = H[Ne], Ft = M[Fe], lt = (0, P[Fe])(Ft, W);
|
|
2624
|
+
if (typeof lt === ne) {
|
|
2625
|
+
var jr = Mi(Fe, W);
|
|
2626
|
+
throw new Error(jr);
|
|
2623
2627
|
}
|
|
2624
|
-
q[Fe] = lt,
|
|
2628
|
+
q[Fe] = lt, L = L || lt !== Ft;
|
|
2625
2629
|
}
|
|
2626
|
-
return
|
|
2630
|
+
return L ? q : M;
|
|
2627
2631
|
};
|
|
2628
|
-
}(
|
|
2629
|
-
T.dispatch = (
|
|
2630
|
-
var
|
|
2631
|
-
return
|
|
2632
|
+
}(x({}, j, e)), $, U(A(Zi.apply(void 0, O))));
|
|
2633
|
+
T.dispatch = (F = T.dispatch, function(m, y, P) {
|
|
2634
|
+
var N = x({}, m, { meta: _n(m.meta, y, vt(P)) });
|
|
2635
|
+
return F.apply(null, [N]);
|
|
2632
2636
|
});
|
|
2633
|
-
var
|
|
2634
|
-
T.dispatch({ type:
|
|
2635
|
-
var
|
|
2637
|
+
var Z = Object.keys(a);
|
|
2638
|
+
T.dispatch({ type: C.bootstrap, plugins: Z, config: k, params: v, user: S, initialUser: n, persistedUser: E });
|
|
2639
|
+
var K = Z.filter(function(m) {
|
|
2636
2640
|
return r.pluginEnabled[m];
|
|
2637
|
-
}),
|
|
2641
|
+
}), $e = Z.filter(function(m) {
|
|
2638
2642
|
return !r.pluginEnabled[m];
|
|
2639
2643
|
});
|
|
2640
|
-
return T.dispatch({ type:
|
|
2641
|
-
var
|
|
2642
|
-
|
|
2643
|
-
}),
|
|
2644
|
-
T.dispatch({ type: m ?
|
|
2645
|
-
}), function(m, y,
|
|
2644
|
+
return T.dispatch({ type: C.registerPlugins, plugins: Z, enabled: r.pluginEnabled }), r.pluginsArray.map(function(m, y) {
|
|
2645
|
+
var P = m.bootstrap, N = m.config, z = m.name;
|
|
2646
|
+
P && V(P) && P({ instance: b, config: N, payload: m }), T.dispatch({ type: C.registerPluginType(z), name: z, enabled: r.pluginEnabled[z], plugin: m }), r.pluginsArray.length === y + 1 && T.dispatch({ type: C.initializeStart, plugins: K, disabled: $e });
|
|
2647
|
+
}), co(function(m) {
|
|
2648
|
+
T.dispatch({ type: m ? C.offline : C.online });
|
|
2649
|
+
}), function(m, y, P) {
|
|
2646
2650
|
setInterval(function() {
|
|
2647
|
-
return cr(m, y,
|
|
2651
|
+
return cr(m, y, P);
|
|
2648
2652
|
}, 3e3);
|
|
2649
2653
|
}(T, u, b), b;
|
|
2650
2654
|
}
|
|
2651
|
-
var Ye = "before", Ge = "after",
|
|
2655
|
+
var Ye = "before", Ge = "after", Le = "cookie", de = wr(), yr = ct, lo = ct;
|
|
2652
2656
|
function vr(t) {
|
|
2653
|
-
return de ? ct(t, "", -1) :
|
|
2657
|
+
return de ? ct(t, "", -1) : xe(t);
|
|
2654
2658
|
}
|
|
2655
2659
|
function wr() {
|
|
2656
2660
|
if (de !== void 0)
|
|
@@ -2666,18 +2670,18 @@ function wr() {
|
|
|
2666
2670
|
function ct(t, e, n, r, i, o) {
|
|
2667
2671
|
if (typeof window < "u") {
|
|
2668
2672
|
var a = arguments.length > 1;
|
|
2669
|
-
return de === !1 && (a ?
|
|
2670
|
-
}
|
|
2671
|
-
}
|
|
2672
|
-
var
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
var
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
function
|
|
2673
|
+
return de === !1 && (a ? we(t, e) : ve(t)), a ? document.cookie = t + "=" + encodeURIComponent(e) + (n ? "; expires=" + new Date(+/* @__PURE__ */ new Date() + 1e3 * n).toUTCString() + (r ? "; path=" + r : "") + (i ? "; domain=" + i : "") + (o ? "; secure" : "") : "") : decodeURIComponent((("; " + document.cookie).split("; " + t + "=")[1] || "").split(";")[0]);
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
var Me = "localStorage", ho = Ut.bind(null, "localStorage");
|
|
2677
|
+
Ae("localStorage", "getItem", ve);
|
|
2678
|
+
Ae("localStorage", "setItem", we);
|
|
2679
|
+
Ae("localStorage", "removeItem", xe);
|
|
2680
|
+
var Ze = "sessionStorage", fo = Ut.bind(null, "sessionStorage");
|
|
2681
|
+
Ae("sessionStorage", "getItem", ve);
|
|
2682
|
+
Ae("sessionStorage", "setItem", we);
|
|
2683
|
+
Ae("sessionStorage", "removeItem", xe);
|
|
2684
|
+
function Te(t) {
|
|
2681
2685
|
var e = t;
|
|
2682
2686
|
try {
|
|
2683
2687
|
if ((e = JSON.parse(t)) === "true")
|
|
@@ -2692,45 +2696,45 @@ function Ee(t) {
|
|
|
2692
2696
|
if (e !== null && e !== "")
|
|
2693
2697
|
return e;
|
|
2694
2698
|
}
|
|
2695
|
-
var
|
|
2699
|
+
var po = ho(), mo = fo(), go = wr();
|
|
2696
2700
|
function br(t, e) {
|
|
2697
2701
|
if (t) {
|
|
2698
|
-
var n =
|
|
2699
|
-
if (r && !
|
|
2702
|
+
var n = Rt(e), r = !Wt(n), i = Lt(n) ? Te(localStorage.getItem(t)) : void 0;
|
|
2703
|
+
if (r && !Ie(i))
|
|
2700
2704
|
return i;
|
|
2701
|
-
var o = Mt(n) ?
|
|
2705
|
+
var o = Mt(n) ? Te(yr(t)) : void 0;
|
|
2702
2706
|
if (r && o)
|
|
2703
2707
|
return o;
|
|
2704
|
-
var a = Zt(n) ?
|
|
2708
|
+
var a = Zt(n) ? Te(sessionStorage.getItem(t)) : void 0;
|
|
2705
2709
|
if (r && a)
|
|
2706
2710
|
return a;
|
|
2707
|
-
var s =
|
|
2711
|
+
var s = ve(t);
|
|
2708
2712
|
return r ? s : { localStorage: i, sessionStorage: a, cookie: o, global: s };
|
|
2709
2713
|
}
|
|
2710
2714
|
}
|
|
2711
|
-
function
|
|
2712
|
-
if (t && !
|
|
2713
|
-
var r = {}, i =
|
|
2714
|
-
return
|
|
2715
|
+
function yo(t, e, n) {
|
|
2716
|
+
if (t && !Ie(e)) {
|
|
2717
|
+
var r = {}, i = Rt(n), o = JSON.stringify(e), a = !Wt(i);
|
|
2718
|
+
return Lt(i) && (r[Me] = Be(Me, e, Te(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Me] : Mt(i) && (r[Le] = Be(Le, e, Te(yr(t))), lo(t, o), a) ? r[Le] : Zt(i) && (r[Ze] = Be(Ze, e, Te(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Ze] : (r[Re] = Be(Re, e, ve(t)), we(t, e), a ? r[Re] : r);
|
|
2715
2719
|
}
|
|
2716
2720
|
}
|
|
2717
|
-
function
|
|
2721
|
+
function vo(t, e) {
|
|
2718
2722
|
if (t) {
|
|
2719
|
-
var n =
|
|
2720
|
-
return !
|
|
2723
|
+
var n = Rt(e), r = br(t, tr), i = {};
|
|
2724
|
+
return !Ie(r.localStorage) && Lt(n) && (localStorage.removeItem(t), i[Me] = r.localStorage), !Ie(r.cookie) && Mt(n) && (vr(t), i[Le] = r.cookie), !Ie(r.sessionStorage) && Zt(n) && (sessionStorage.removeItem(t), i[Ze] = r.sessionStorage), !Ie(r.global) && ut(n, Re) && (xe(t), i[Re] = r.global), i;
|
|
2721
2725
|
}
|
|
2722
2726
|
}
|
|
2723
|
-
function Ut(t) {
|
|
2724
|
-
return t ? oe(t) ? t : t.storage : er;
|
|
2725
|
-
}
|
|
2726
2727
|
function Rt(t) {
|
|
2727
|
-
return
|
|
2728
|
+
return t ? ae(t) ? t : t.storage : er;
|
|
2729
|
+
}
|
|
2730
|
+
function Lt(t) {
|
|
2731
|
+
return po && ut(t, Me);
|
|
2728
2732
|
}
|
|
2729
2733
|
function Mt(t) {
|
|
2730
|
-
return
|
|
2734
|
+
return go && ut(t, Le);
|
|
2731
2735
|
}
|
|
2732
2736
|
function Zt(t) {
|
|
2733
|
-
return
|
|
2737
|
+
return mo && ut(t, Ze);
|
|
2734
2738
|
}
|
|
2735
2739
|
function Wt(t) {
|
|
2736
2740
|
return t === tr || t === "all";
|
|
@@ -2741,8 +2745,8 @@ function ut(t, e) {
|
|
|
2741
2745
|
function Be(t, e, n) {
|
|
2742
2746
|
return { location: t, current: e, previous: n };
|
|
2743
2747
|
}
|
|
2744
|
-
var
|
|
2745
|
-
function
|
|
2748
|
+
var wo = { setItem: yo, getItem: br, removeItem: vo };
|
|
2749
|
+
function bo(t, e, n) {
|
|
2746
2750
|
return e in t ? Object.defineProperty(t, e, {
|
|
2747
2751
|
value: n,
|
|
2748
2752
|
enumerable: !0,
|
|
@@ -2764,20 +2768,20 @@ function Tn(t) {
|
|
|
2764
2768
|
for (var e = 1; e < arguments.length; e++) {
|
|
2765
2769
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
2766
2770
|
e % 2 ? En(Object(n), !0).forEach(function(r) {
|
|
2767
|
-
|
|
2771
|
+
bo(t, r, n[r]);
|
|
2768
2772
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : En(Object(n)).forEach(function(r) {
|
|
2769
2773
|
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
|
2770
2774
|
});
|
|
2771
2775
|
}
|
|
2772
2776
|
return t;
|
|
2773
2777
|
}
|
|
2774
|
-
function
|
|
2778
|
+
function ko() {
|
|
2775
2779
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = {
|
|
2776
|
-
storage:
|
|
2780
|
+
storage: wo
|
|
2777
2781
|
};
|
|
2778
|
-
return
|
|
2782
|
+
return uo(Tn(Tn({}, e), t));
|
|
2779
2783
|
}
|
|
2780
|
-
function
|
|
2784
|
+
function Io(t, e) {
|
|
2781
2785
|
e = e || {};
|
|
2782
2786
|
var n, r, i = [], o = e.max || 1 / 0;
|
|
2783
2787
|
function a() {
|
|
@@ -2799,7 +2803,7 @@ function bo(t, e) {
|
|
|
2799
2803
|
}
|
|
2800
2804
|
};
|
|
2801
2805
|
}
|
|
2802
|
-
function
|
|
2806
|
+
function So(t) {
|
|
2803
2807
|
if (typeof window > "u")
|
|
2804
2808
|
return;
|
|
2805
2809
|
const { addEventListener: e, history: n, location: r } = window;
|
|
@@ -2811,53 +2815,53 @@ function ko(t) {
|
|
|
2811
2815
|
const s = n[a];
|
|
2812
2816
|
n[a] = function(...h) {
|
|
2813
2817
|
var c;
|
|
2814
|
-
const p = ((c = h[2]) == null ? void 0 : c.toString()) || "", u =
|
|
2818
|
+
const p = ((c = h[2]) == null ? void 0 : c.toString()) || "", u = Eo(p);
|
|
2815
2819
|
return i !== u && (i = u, setTimeout(() => t(p), 0)), s.apply(n, h);
|
|
2816
2820
|
};
|
|
2817
2821
|
});
|
|
2818
2822
|
}
|
|
2819
|
-
function
|
|
2823
|
+
function _o(t, e) {
|
|
2820
2824
|
const n = t.indexOf(e);
|
|
2821
2825
|
return n > -1 ? t.slice(0, n) : t;
|
|
2822
2826
|
}
|
|
2823
|
-
function
|
|
2824
|
-
return ["#", "?"].forEach((e) => t =
|
|
2827
|
+
function Eo(t) {
|
|
2828
|
+
return ["#", "?"].forEach((e) => t = _o(t, e)), t;
|
|
2825
2829
|
}
|
|
2826
|
-
function
|
|
2827
|
-
|
|
2828
|
-
|
|
2830
|
+
function To() {
|
|
2831
|
+
So(() => {
|
|
2832
|
+
te.page();
|
|
2829
2833
|
});
|
|
2830
2834
|
}
|
|
2831
|
-
function
|
|
2832
|
-
if (t === void 0 && (t = {}), !
|
|
2835
|
+
function Oo(t) {
|
|
2836
|
+
if (t === void 0 && (t = {}), !J)
|
|
2833
2837
|
return Tt;
|
|
2834
2838
|
var e = Pn(), n = jt(), r = On(), i = qe(r, e), o = qe(n, e), a = [], s = [], h = [], p = r, u = i, c = o, f = Object.keys(t);
|
|
2835
2839
|
if (!f.length)
|
|
2836
2840
|
return Tt;
|
|
2837
|
-
var d = f.map(function(
|
|
2838
|
-
return Number(
|
|
2839
|
-
}), w =
|
|
2840
|
-
var
|
|
2841
|
-
return
|
|
2842
|
-
return
|
|
2841
|
+
var d = f.map(function(I) {
|
|
2842
|
+
return Number(I);
|
|
2843
|
+
}), w = Ri(function() {
|
|
2844
|
+
var I = Pn(), v = function(k, _) {
|
|
2845
|
+
return _.map(function($) {
|
|
2846
|
+
return $ === 100 ? k - 5 : k * ($ / 100);
|
|
2843
2847
|
});
|
|
2844
|
-
}(
|
|
2848
|
+
}(I, d), E = jt(), S = On(), g = qe(S, I), l = qe(E, I);
|
|
2845
2849
|
if (u = g > u ? g : u, c = l < c ? l : c, !(a.length >= d.length)) {
|
|
2846
|
-
var b = p === S,
|
|
2847
|
-
b ?
|
|
2848
|
-
var j = v,
|
|
2849
|
-
(
|
|
2850
|
-
var U =
|
|
2851
|
-
var T = j[
|
|
2852
|
-
return h.includes(
|
|
2853
|
-
return
|
|
2854
|
-
}),
|
|
2855
|
-
}, { foundFunc: [], singleFunction: null, callbacks: [], direction:
|
|
2856
|
-
if (p = S,
|
|
2857
|
-
V(t[
|
|
2850
|
+
var b = p === S, O = "up";
|
|
2851
|
+
b ? O = "initial" : p <= S && (O = "down");
|
|
2852
|
+
var j = v, A = d;
|
|
2853
|
+
(O === "up" || b) && (j = v.slice().reverse(), A = d.slice().reverse());
|
|
2854
|
+
var U = A.reduce(function(k, _, $) {
|
|
2855
|
+
var T = j[$];
|
|
2856
|
+
return h.includes(_) && S <= T && (h = h.filter(function(Z) {
|
|
2857
|
+
return Z !== _;
|
|
2858
|
+
}), k.singleFunction = _), O === "down" && !a.includes(_) && S >= T && _ > o ? (s.push(_), k.callbacks = k.callbacks.concat(_), k) : O === "up" && !a.includes(_) && S <= T && _ <= g ? (k.foundFunc = [_], k) : (b && S >= T && k.foundFunc.length === 0 && (k.foundFunc = [_]), !s.includes(_) && S >= T && (s.push(_), k.singleFunction ? h.push(_) : k.singleFunction = _), k);
|
|
2859
|
+
}, { foundFunc: [], singleFunction: null, callbacks: [], direction: O });
|
|
2860
|
+
if (p = S, O === "down" && U.callbacks && U.callbacks.forEach(function(k) {
|
|
2861
|
+
V(t[k]) && (t[k]({ trigger: k, direction: O, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(k));
|
|
2858
2862
|
}), U.singleFunction) {
|
|
2859
|
-
var R = U.singleFunction,
|
|
2860
|
-
V(t[R]) && t[R]({ trigger: R, direction:
|
|
2863
|
+
var R = U.singleFunction, F = U.direction;
|
|
2864
|
+
V(t[R]) && t[R]({ trigger: R, direction: F, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(R);
|
|
2861
2865
|
}
|
|
2862
2866
|
}
|
|
2863
2867
|
}, 500);
|
|
@@ -2866,16 +2870,16 @@ function Eo(t) {
|
|
|
2866
2870
|
};
|
|
2867
2871
|
}
|
|
2868
2872
|
function jt() {
|
|
2869
|
-
return
|
|
2873
|
+
return J ? document.body.scrollTop || document.documentElement.scrollTop : 0;
|
|
2870
2874
|
}
|
|
2871
|
-
function
|
|
2872
|
-
return
|
|
2875
|
+
function Po() {
|
|
2876
|
+
return J ? window.innerHeight || document.documentElement.clientHeight : 0;
|
|
2873
2877
|
}
|
|
2874
2878
|
function On() {
|
|
2875
|
-
return Math.round(jt() +
|
|
2879
|
+
return Math.round(jt() + Po());
|
|
2876
2880
|
}
|
|
2877
2881
|
function Pn() {
|
|
2878
|
-
if (!
|
|
2882
|
+
if (!J)
|
|
2879
2883
|
return 0;
|
|
2880
2884
|
var t = document.body, e = document.documentElement;
|
|
2881
2885
|
return Math.max(t.scrollHeight, t.offsetHeight, e.clientHeight, e.scrollHeight, e.offsetHeight);
|
|
@@ -2884,10 +2888,10 @@ function qe(t, e) {
|
|
|
2884
2888
|
return Math.round(t / e * 100);
|
|
2885
2889
|
}
|
|
2886
2890
|
var jn = "EventListener";
|
|
2887
|
-
function
|
|
2891
|
+
function jo(t) {
|
|
2888
2892
|
return function(e, n, r, i) {
|
|
2889
2893
|
var o = r || Tt, a = i || !1;
|
|
2890
|
-
if (!
|
|
2894
|
+
if (!J)
|
|
2891
2895
|
return o;
|
|
2892
2896
|
var s = rt(n), h = rt(e, !0);
|
|
2893
2897
|
if (!h.length)
|
|
@@ -2899,16 +2903,16 @@ function Oo(t) {
|
|
|
2899
2903
|
c && (p = []);
|
|
2900
2904
|
for (var f = c ? "add" + jn : "remove" + jn, d = 0; d < h.length; d++) {
|
|
2901
2905
|
var w = h[d];
|
|
2902
|
-
p[d] = c ? a && a.once ?
|
|
2903
|
-
for (var
|
|
2904
|
-
w[f] ? w["on" + s[
|
|
2906
|
+
p[d] = c ? a && a.once ? Co(o) : o : p[d] || o;
|
|
2907
|
+
for (var I = 0; I < s.length; I++)
|
|
2908
|
+
w[f] ? w["on" + s[I]] = c ? p[d] : null : w[f](s[I], p[d], a);
|
|
2905
2909
|
}
|
|
2906
2910
|
return u.bind(null, !c);
|
|
2907
2911
|
}(t);
|
|
2908
2912
|
};
|
|
2909
2913
|
}
|
|
2910
2914
|
function rt(t, e) {
|
|
2911
|
-
if (
|
|
2915
|
+
if (ae(t))
|
|
2912
2916
|
return e ? rt(document.querySelectorAll(t)) : (n = t).split(n.indexOf(",") > -1 ? "," : " ").map(function(a) {
|
|
2913
2917
|
return a.trim();
|
|
2914
2918
|
});
|
|
@@ -2918,20 +2922,20 @@ function rt(t, e) {
|
|
|
2918
2922
|
r[i] = t[i];
|
|
2919
2923
|
return r;
|
|
2920
2924
|
}
|
|
2921
|
-
var o =
|
|
2925
|
+
var o = $i(t);
|
|
2922
2926
|
return e ? o.map(function(a) {
|
|
2923
|
-
return
|
|
2927
|
+
return ae(a) ? rt(a, !0) : a;
|
|
2924
2928
|
}).flat() : o;
|
|
2925
2929
|
}
|
|
2926
|
-
function
|
|
2930
|
+
function Co(t, e) {
|
|
2927
2931
|
var n;
|
|
2928
2932
|
return function() {
|
|
2929
2933
|
return t && (n = t.apply(e || this, arguments), t = null), n;
|
|
2930
2934
|
};
|
|
2931
2935
|
}
|
|
2932
|
-
var wt =
|
|
2936
|
+
var wt = jo("Event");
|
|
2933
2937
|
function kr(t, e) {
|
|
2934
|
-
return
|
|
2938
|
+
return J && V(window[t]) ? (n = window[t], r = e, (i = window) === void 0 && (i = null), V(n) ? function() {
|
|
2935
2939
|
n.apply(i, arguments), r.apply(i, arguments);
|
|
2936
2940
|
} : r) : window[t] = e;
|
|
2937
2941
|
var n, r, i;
|
|
@@ -2939,10 +2943,10 @@ function kr(t, e) {
|
|
|
2939
2943
|
kr.bind(null, "onerror");
|
|
2940
2944
|
kr.bind(null, "onload");
|
|
2941
2945
|
var Ir = typeof window > "u", Cn = "hidden";
|
|
2942
|
-
function
|
|
2946
|
+
function xo(t) {
|
|
2943
2947
|
if (Ir)
|
|
2944
2948
|
return !1;
|
|
2945
|
-
var e =
|
|
2949
|
+
var e = Ao(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
|
|
2946
2950
|
return t(!!document[e]);
|
|
2947
2951
|
}, i = function() {
|
|
2948
2952
|
return document.addEventListener(n, r);
|
|
@@ -2951,15 +2955,15 @@ function jo(t) {
|
|
|
2951
2955
|
return document.removeEventListener(n, r), i;
|
|
2952
2956
|
};
|
|
2953
2957
|
}
|
|
2954
|
-
function
|
|
2958
|
+
function Ao() {
|
|
2955
2959
|
var t = ["webkit", "moz", "ms", "o"];
|
|
2956
2960
|
return Ir || Cn in document ? Cn : t.reduce(function(e, n) {
|
|
2957
2961
|
var r = n + "Hidden";
|
|
2958
2962
|
return !e && r in document ? r : e;
|
|
2959
2963
|
}, null);
|
|
2960
2964
|
}
|
|
2961
|
-
var
|
|
2962
|
-
function
|
|
2965
|
+
var $o = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
|
|
2966
|
+
function No(t, e) {
|
|
2963
2967
|
e === void 0 && (e = {});
|
|
2964
2968
|
var n = /* @__PURE__ */ function(a, s) {
|
|
2965
2969
|
var h = this, p = !1;
|
|
@@ -2970,10 +2974,10 @@ function Ao(t, e) {
|
|
|
2970
2974
|
};
|
|
2971
2975
|
}(t, e.throttle || 1e4), r = [];
|
|
2972
2976
|
function i() {
|
|
2973
|
-
var a =
|
|
2977
|
+
var a = xo(function(s) {
|
|
2974
2978
|
s || n({ type: "tabVisible" });
|
|
2975
2979
|
});
|
|
2976
|
-
return r = [a].concat(
|
|
2980
|
+
return r = [a].concat($o.map(function(s) {
|
|
2977
2981
|
return wt(document, s, n);
|
|
2978
2982
|
})).concat(wt(window, "load", n)).concat(wt(window, "scroll", n, { capture: !0, passive: !0 })), o;
|
|
2979
2983
|
}
|
|
@@ -2986,31 +2990,31 @@ function Ao(t, e) {
|
|
|
2986
2990
|
return o(), i;
|
|
2987
2991
|
};
|
|
2988
2992
|
}
|
|
2989
|
-
function
|
|
2993
|
+
function zo(t) {
|
|
2990
2994
|
var e, n, r = t.onIdle, i = t.onWakeUp, o = t.onHeartbeat, a = t.timeout, s = a === void 0 ? 1e4 : a, h = t.throttle, p = h === void 0 ? 2e3 : h, u = !1, c = !1, f = /* @__PURE__ */ new Date(), d = function() {
|
|
2991
2995
|
return clearTimeout(e);
|
|
2992
2996
|
};
|
|
2993
2997
|
function w(v) {
|
|
2994
|
-
d(), o && !u && o(
|
|
2995
|
-
u = !0, r && (n = /* @__PURE__ */ new Date(), r(
|
|
2998
|
+
d(), o && !u && o(De(f), v), i && u && (u = !1, i(De(n), v), f = /* @__PURE__ */ new Date()), e = setTimeout(function() {
|
|
2999
|
+
u = !0, r && (n = /* @__PURE__ */ new Date(), r(De(f), v));
|
|
2996
3000
|
}, s);
|
|
2997
3001
|
}
|
|
2998
|
-
var
|
|
3002
|
+
var I = No(w, { throttle: p });
|
|
2999
3003
|
return { disable: function() {
|
|
3000
3004
|
c = !0, u = !1, d();
|
|
3001
|
-
var v =
|
|
3005
|
+
var v = I();
|
|
3002
3006
|
return function() {
|
|
3003
3007
|
return c = !1, f = /* @__PURE__ */ new Date(), w({ type: "load" }), v();
|
|
3004
3008
|
};
|
|
3005
3009
|
}, getStatus: function() {
|
|
3006
|
-
return { isIdle: u, isDisabled: c, active: u ? 0 :
|
|
3010
|
+
return { isIdle: u, isDisabled: c, active: u ? 0 : De(f, c), idle: u ? De(n, c) : 0 };
|
|
3007
3011
|
} };
|
|
3008
3012
|
}
|
|
3009
|
-
function
|
|
3013
|
+
function De(t, e) {
|
|
3010
3014
|
return e ? 0 : Math.round((/* @__PURE__ */ new Date() - t) / 1e3);
|
|
3011
3015
|
}
|
|
3012
3016
|
const xn = 5e3;
|
|
3013
|
-
class
|
|
3017
|
+
class Do {
|
|
3014
3018
|
constructor(e) {
|
|
3015
3019
|
B(this, "element");
|
|
3016
3020
|
B(this, "isInViewport", !1);
|
|
@@ -3032,11 +3036,11 @@ class zo {
|
|
|
3032
3036
|
{
|
|
3033
3037
|
threshold: 0
|
|
3034
3038
|
}
|
|
3035
|
-
), this.observer.observe(this.element),
|
|
3039
|
+
), this.observer.observe(this.element), zo({
|
|
3036
3040
|
onIdle: (n) => this.handleAwake(!1, n),
|
|
3037
3041
|
onWakeUp: (n) => this.handleAwake(!0, n),
|
|
3038
3042
|
timeout: xn
|
|
3039
|
-
}),
|
|
3043
|
+
}), Oo({
|
|
3040
3044
|
25: this.handleScroll.bind(this),
|
|
3041
3045
|
50: this.handleScroll.bind(this),
|
|
3042
3046
|
75: this.handleScroll.bind(this),
|
|
@@ -3072,49 +3076,49 @@ class zo {
|
|
|
3072
3076
|
}
|
|
3073
3077
|
}
|
|
3074
3078
|
const An = "sesamy_session_id";
|
|
3075
|
-
function
|
|
3079
|
+
function Uo() {
|
|
3076
3080
|
let t = sessionStorage.getItem(An);
|
|
3077
3081
|
return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(An, t)), t;
|
|
3078
3082
|
}
|
|
3079
3083
|
let Sr = !1, Ct, $n, it;
|
|
3080
|
-
function
|
|
3084
|
+
function Ro({ clientId: t, enabled: e = !0, endpoint: n = ri }) {
|
|
3081
3085
|
if (Ct = t, $n = e, it = n, !$n)
|
|
3082
3086
|
return;
|
|
3083
|
-
|
|
3084
|
-
const r = new
|
|
3087
|
+
To();
|
|
3088
|
+
const r = new Do({
|
|
3085
3089
|
element: document.body,
|
|
3086
3090
|
viewCallback: () => {
|
|
3087
|
-
|
|
3091
|
+
te.page();
|
|
3088
3092
|
},
|
|
3089
3093
|
activeDurationCallback: (i, o, a) => {
|
|
3090
|
-
|
|
3094
|
+
te.track("activeDuration", {
|
|
3091
3095
|
duration: i,
|
|
3092
3096
|
durationStart: a,
|
|
3093
3097
|
flushing: o
|
|
3094
3098
|
});
|
|
3095
3099
|
},
|
|
3096
3100
|
idleDurationCallback: (i, o, a) => {
|
|
3097
|
-
|
|
3101
|
+
te.track("idleDuration", {
|
|
3098
3102
|
duration: i,
|
|
3099
3103
|
durationStart: a,
|
|
3100
3104
|
flushing: o
|
|
3101
3105
|
});
|
|
3102
3106
|
},
|
|
3103
3107
|
scrollCallback: (i) => {
|
|
3104
|
-
|
|
3108
|
+
te.track("scroll", {
|
|
3105
3109
|
scroll: i.scrollMax
|
|
3106
3110
|
});
|
|
3107
3111
|
}
|
|
3108
3112
|
});
|
|
3109
|
-
|
|
3113
|
+
Zo(document.body, () => {
|
|
3110
3114
|
r.flush();
|
|
3111
|
-
}),
|
|
3115
|
+
}), Wo(document.body, () => {
|
|
3112
3116
|
r.handleVisibilityChange();
|
|
3113
|
-
}), window.addEventListener(
|
|
3117
|
+
}), window.addEventListener(ee.AUTHENTICATED, async (i) => {
|
|
3114
3118
|
const o = i;
|
|
3115
|
-
await
|
|
3116
|
-
}), window.addEventListener(
|
|
3117
|
-
await
|
|
3119
|
+
await te.identify(o.detail.sub);
|
|
3120
|
+
}), window.addEventListener(ee.LOGOUT, async () => {
|
|
3121
|
+
await te.track("logout", {}), Kt.flush(), await te.reset();
|
|
3118
3122
|
});
|
|
3119
3123
|
}
|
|
3120
3124
|
function _r(t) {
|
|
@@ -3123,7 +3127,7 @@ function _r(t) {
|
|
|
3123
3127
|
...e,
|
|
3124
3128
|
clientId: Ct,
|
|
3125
3129
|
requestId: Math.random().toString(36).slice(2, 9),
|
|
3126
|
-
sessionId:
|
|
3130
|
+
sessionId: Uo(),
|
|
3127
3131
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3128
3132
|
version: Dt,
|
|
3129
3133
|
event: e.event,
|
|
@@ -3143,7 +3147,7 @@ function _r(t) {
|
|
|
3143
3147
|
}))
|
|
3144
3148
|
);
|
|
3145
3149
|
}
|
|
3146
|
-
const Kt =
|
|
3150
|
+
const Kt = Io(
|
|
3147
3151
|
async (t) => {
|
|
3148
3152
|
if (t.length > 0) {
|
|
3149
3153
|
const e = _r(t);
|
|
@@ -3172,7 +3176,7 @@ function bt(t) {
|
|
|
3172
3176
|
} else
|
|
3173
3177
|
Kt.push(t);
|
|
3174
3178
|
}
|
|
3175
|
-
const
|
|
3179
|
+
const te = ko({
|
|
3176
3180
|
app: Qn,
|
|
3177
3181
|
version: Dt,
|
|
3178
3182
|
plugins: [
|
|
@@ -3211,22 +3215,22 @@ const ee = wo({
|
|
|
3211
3215
|
]
|
|
3212
3216
|
});
|
|
3213
3217
|
function Lo(t, e) {
|
|
3214
|
-
|
|
3218
|
+
te.track(t, e);
|
|
3215
3219
|
}
|
|
3216
|
-
function
|
|
3220
|
+
function Mo() {
|
|
3217
3221
|
return Sr = !0, Kt.flush();
|
|
3218
3222
|
}
|
|
3219
3223
|
const Er = /* @__PURE__ */ new Map();
|
|
3220
|
-
function
|
|
3224
|
+
function Zo(t, e) {
|
|
3221
3225
|
Er.set(t, e);
|
|
3222
3226
|
}
|
|
3223
3227
|
window.addEventListener("beforeunload", () => {
|
|
3224
3228
|
Er.forEach((t, e) => {
|
|
3225
3229
|
t.bind(e)();
|
|
3226
|
-
}),
|
|
3230
|
+
}), Mo();
|
|
3227
3231
|
});
|
|
3228
3232
|
const Tr = /* @__PURE__ */ new Map();
|
|
3229
|
-
function
|
|
3233
|
+
function Wo(t, e) {
|
|
3230
3234
|
Tr.set(t, e);
|
|
3231
3235
|
}
|
|
3232
3236
|
window.addEventListener("visibilitychange", () => {
|
|
@@ -3234,126 +3238,150 @@ window.addEventListener("visibilitychange", () => {
|
|
|
3234
3238
|
t.bind(e)();
|
|
3235
3239
|
});
|
|
3236
3240
|
});
|
|
3237
|
-
const
|
|
3238
|
-
function
|
|
3239
|
-
const t = sessionStorage.getItem(
|
|
3241
|
+
const Or = "sesamySignedURLs";
|
|
3242
|
+
function Pr() {
|
|
3243
|
+
const t = sessionStorage.getItem(Or);
|
|
3240
3244
|
return t ? JSON.parse(t) : [];
|
|
3241
3245
|
}
|
|
3242
3246
|
function Ko(t) {
|
|
3247
|
+
const e = Pr();
|
|
3248
|
+
e.push(t), sessionStorage.setItem(Or, JSON.stringify(e));
|
|
3249
|
+
}
|
|
3250
|
+
function Fo(t) {
|
|
3243
3251
|
const {
|
|
3244
3252
|
getEntitlement: e,
|
|
3245
3253
|
getEntitlements: n,
|
|
3246
3254
|
getEntitlementAccess: r,
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3255
|
+
getSubscriptions: i,
|
|
3256
|
+
getContract: o,
|
|
3257
|
+
getContracts: a,
|
|
3258
|
+
getBill: s,
|
|
3259
|
+
getBills: h,
|
|
3260
|
+
getTags: p,
|
|
3261
|
+
deleteTag: u,
|
|
3262
|
+
setTag: c,
|
|
3263
|
+
getUserMetadata: f,
|
|
3264
|
+
listUserMetadata: d,
|
|
3265
|
+
setUserMetadata: w,
|
|
3266
|
+
deleteUserMetadata: I,
|
|
3267
|
+
getTally: v,
|
|
3268
|
+
getTallies: E,
|
|
3269
|
+
pushTally: S,
|
|
3270
|
+
deleteTally: g,
|
|
3271
|
+
getProduct: l,
|
|
3272
|
+
autoOnboardProduct: b
|
|
3273
|
+
} = Si(t), O = {
|
|
3265
3274
|
auth: {
|
|
3266
|
-
getUser:
|
|
3267
|
-
isAuthenticated:
|
|
3268
|
-
loginWithRedirect:
|
|
3269
|
-
logout:
|
|
3275
|
+
getUser: ai,
|
|
3276
|
+
isAuthenticated: oi,
|
|
3277
|
+
loginWithRedirect: si,
|
|
3278
|
+
logout: ui,
|
|
3270
3279
|
setToken: Yn
|
|
3271
3280
|
},
|
|
3272
3281
|
analytics: {
|
|
3273
3282
|
track: Lo
|
|
3274
3283
|
},
|
|
3275
3284
|
tags: {
|
|
3276
|
-
list:
|
|
3277
|
-
set:
|
|
3278
|
-
delete:
|
|
3285
|
+
list: p,
|
|
3286
|
+
set: c,
|
|
3287
|
+
delete: u
|
|
3279
3288
|
},
|
|
3280
3289
|
entitlements: {
|
|
3281
3290
|
get: e,
|
|
3282
3291
|
list: n,
|
|
3283
3292
|
access: r,
|
|
3284
|
-
signedLinks:
|
|
3293
|
+
signedLinks: Pr
|
|
3285
3294
|
},
|
|
3286
3295
|
contracts: {
|
|
3287
|
-
get:
|
|
3288
|
-
list:
|
|
3296
|
+
get: o,
|
|
3297
|
+
list: a
|
|
3289
3298
|
},
|
|
3290
3299
|
bills: {
|
|
3291
|
-
get:
|
|
3292
|
-
list:
|
|
3300
|
+
get: s,
|
|
3301
|
+
list: h
|
|
3293
3302
|
},
|
|
3294
3303
|
userMetadata: {
|
|
3295
|
-
get:
|
|
3296
|
-
list:
|
|
3297
|
-
set:
|
|
3298
|
-
delete:
|
|
3304
|
+
get: f,
|
|
3305
|
+
list: d,
|
|
3306
|
+
set: w,
|
|
3307
|
+
delete: I
|
|
3299
3308
|
},
|
|
3300
3309
|
tallies: {
|
|
3301
|
-
get:
|
|
3302
|
-
list:
|
|
3303
|
-
push:
|
|
3304
|
-
delete:
|
|
3310
|
+
get: v,
|
|
3311
|
+
list: E,
|
|
3312
|
+
push: S,
|
|
3313
|
+
delete: g
|
|
3314
|
+
},
|
|
3315
|
+
subscriptions: {
|
|
3316
|
+
list: i
|
|
3305
3317
|
},
|
|
3306
3318
|
products: {
|
|
3307
|
-
get:
|
|
3308
|
-
autoOnboard:
|
|
3319
|
+
get: l,
|
|
3320
|
+
autoOnboard: b
|
|
3309
3321
|
},
|
|
3310
|
-
getVersion:
|
|
3311
|
-
clearCache:
|
|
3322
|
+
getVersion: Ho,
|
|
3323
|
+
clearCache: re
|
|
3312
3324
|
};
|
|
3313
|
-
return t.namespace && (window[t.namespace] =
|
|
3325
|
+
return t.namespace && (window[t.namespace] = O), O;
|
|
3314
3326
|
}
|
|
3315
|
-
function
|
|
3327
|
+
function Ho() {
|
|
3316
3328
|
return Dt;
|
|
3317
3329
|
}
|
|
3318
|
-
function
|
|
3330
|
+
function Jo() {
|
|
3319
3331
|
const t = new URLSearchParams(window.location.hash.substring(1)), e = t.get("access_token"), n = t.get("expires_in");
|
|
3320
|
-
if (e
|
|
3321
|
-
Yn(e, parseInt(n, 10));
|
|
3332
|
+
if (e) {
|
|
3333
|
+
Yn(e, n ? parseInt(n, 10) : void 0);
|
|
3322
3334
|
const r = new URL(window.location.href);
|
|
3323
3335
|
t.delete("access_token"), t.delete("expires_in"), r.hash = t.toString(), window.history.replaceState(null, "", r);
|
|
3324
3336
|
}
|
|
3325
3337
|
}
|
|
3326
|
-
const
|
|
3327
|
-
function
|
|
3328
|
-
const t = new URLSearchParams(window.location.search), e = t.get(
|
|
3338
|
+
const Nn = "sesamy-refresh", zn = "force-refetch-entitlements";
|
|
3339
|
+
function Xo() {
|
|
3340
|
+
const t = new URLSearchParams(window.location.search), e = t.get(zn), n = t.get(Nn);
|
|
3329
3341
|
if (e !== null || n !== null) {
|
|
3330
3342
|
const r = new URL(window.location.href);
|
|
3331
|
-
t.delete(
|
|
3343
|
+
t.delete(zn), t.delete(Nn), r.search = t.toString(), re(), window.history.replaceState(null, "", r);
|
|
3332
3344
|
}
|
|
3333
3345
|
}
|
|
3334
|
-
|
|
3335
|
-
|
|
3346
|
+
function Vo() {
|
|
3347
|
+
const t = new URLSearchParams(window.location.search), e = t.get("token"), n = t.get("se");
|
|
3348
|
+
if (!n || !e)
|
|
3349
|
+
return;
|
|
3350
|
+
const r = parseInt(n, 10);
|
|
3351
|
+
if (Number.isNaN(r) || r < Date.now())
|
|
3352
|
+
return;
|
|
3353
|
+
Ko({
|
|
3354
|
+
url: window.location.href.split("?")[0],
|
|
3355
|
+
token: e,
|
|
3356
|
+
expiresAt: r,
|
|
3357
|
+
publisherContentId: t.get("sp") ?? void 0
|
|
3358
|
+
});
|
|
3359
|
+
const i = new URL(window.location.href);
|
|
3360
|
+
i.searchParams.delete("ss"), i.searchParams.delete("se"), i.searchParams.delete("sp"), i.searchParams.delete("so"), i.searchParams.delete("token"), window.history.replaceState(null, "", i);
|
|
3361
|
+
}
|
|
3362
|
+
async function Yo(t) {
|
|
3363
|
+
Ro({
|
|
3336
3364
|
clientId: t.clientId,
|
|
3337
3365
|
// The default client id can be overridden by the config
|
|
3338
3366
|
...t.analytics
|
|
3339
|
-
}), await
|
|
3367
|
+
}), await ii({
|
|
3340
3368
|
clientId: t.clientId,
|
|
3341
3369
|
// The default client id can be overridden by the config
|
|
3342
3370
|
...t.auth
|
|
3343
3371
|
});
|
|
3344
|
-
const e =
|
|
3345
|
-
return
|
|
3372
|
+
const e = Fo(t.api || {});
|
|
3373
|
+
return ge(ee.READY, {}), Jo(), Xo(), Vo(), e;
|
|
3346
3374
|
}
|
|
3347
3375
|
if (typeof document < "u") {
|
|
3348
3376
|
const t = document.getElementById("sesamy-js");
|
|
3349
3377
|
if (t != null && t.textContent)
|
|
3350
3378
|
try {
|
|
3351
3379
|
const e = JSON.parse(t.textContent);
|
|
3352
|
-
|
|
3380
|
+
Yo(e);
|
|
3353
3381
|
} catch (e) {
|
|
3354
3382
|
console.error("Failed to parse config", e);
|
|
3355
3383
|
}
|
|
3356
3384
|
}
|
|
3357
3385
|
export {
|
|
3358
|
-
|
|
3386
|
+
Yo as init
|
|
3359
3387
|
};
|