@sesamy/sesamy-js 1.113.0 → 1.113.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sesamy-js.cjs +5 -5
- package/dist/sesamy-js.d.ts +1 -0
- package/dist/sesamy-js.iife.js +4 -4
- package/dist/sesamy-js.mjs +978 -964
- package/package.json +1 -1
package/dist/sesamy-js.mjs
CHANGED
|
@@ -2472,14 +2472,14 @@ var Ln, Rn = o((() => {
|
|
|
2472
2472
|
function q(e) {
|
|
2473
2473
|
In() && console.log(e);
|
|
2474
2474
|
}
|
|
2475
|
-
var
|
|
2475
|
+
var zn = o((() => {
|
|
2476
2476
|
Rn();
|
|
2477
|
-
})),
|
|
2478
|
-
|
|
2477
|
+
})), Bn = /* @__PURE__ */ c({ Events: () => J }), J, Vn = o((() => {
|
|
2478
|
+
J = /* @__PURE__ */ function(e) {
|
|
2479
2479
|
return e.AUTH_INITIALIZED = "sesamyJsAuthInitialized", e.READY = "sesamyJsReady", e.AUTHENTICATED = "sesamyJsAuthenticated", e.LOGOUT = "sesamyJsLogout", e.CLEAR_CACHE = "sesamyJsClearCache", e.USER_ATTRIBUTE_CHANGED = "sesamyUserAttributeChanged", e.PURCHASE = "sesamyJsPurchase", e.CONSENT_CHANGED = "sesamyJsConsentChanged", e;
|
|
2480
2480
|
}({});
|
|
2481
|
-
})),
|
|
2482
|
-
function
|
|
2481
|
+
})), Hn = /* @__PURE__ */ c({ triggerEvent: () => Wn });
|
|
2482
|
+
function Un(e, t) {
|
|
2483
2483
|
let n = new CustomEvent(e, {
|
|
2484
2484
|
detail: t,
|
|
2485
2485
|
bubbles: !0,
|
|
@@ -2487,36 +2487,36 @@ function Hn(e, t) {
|
|
|
2487
2487
|
});
|
|
2488
2488
|
q(`Triggering event: ${e}`), dispatchEvent(n);
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2491
|
-
typeof window > "u" || (e ===
|
|
2490
|
+
function Wn(e, t) {
|
|
2491
|
+
typeof window > "u" || (e === J.READY && document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => Un(e, t), { once: !0 }) : Un(e, t));
|
|
2492
2492
|
}
|
|
2493
|
-
var
|
|
2494
|
-
|
|
2493
|
+
var Gn = o((() => {
|
|
2494
|
+
zn(), Vn();
|
|
2495
2495
|
}));
|
|
2496
|
-
|
|
2497
|
-
var
|
|
2498
|
-
function
|
|
2499
|
-
|
|
2496
|
+
Gn(), Mn(), Rt(), Nt();
|
|
2497
|
+
var Kn = null;
|
|
2498
|
+
function qn(e) {
|
|
2499
|
+
Kn = e;
|
|
2500
2500
|
}
|
|
2501
|
-
function
|
|
2502
|
-
return
|
|
2501
|
+
function Jn() {
|
|
2502
|
+
return Kn;
|
|
2503
2503
|
}
|
|
2504
|
-
|
|
2505
|
-
var
|
|
2506
|
-
function
|
|
2504
|
+
Vn(), zn();
|
|
2505
|
+
var Yn = "sesamy_is_authenticated";
|
|
2506
|
+
function Xn() {
|
|
2507
2507
|
try {
|
|
2508
|
-
return document.cookie.split(";").some((e) => e.trim().startsWith(`${
|
|
2508
|
+
return document.cookie.split(";").some((e) => e.trim().startsWith(`${Yn}=true`));
|
|
2509
2509
|
} catch {
|
|
2510
2510
|
return !1;
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
|
-
function
|
|
2513
|
+
function Zn(e) {
|
|
2514
2514
|
try {
|
|
2515
2515
|
let t = e ? 720 * 60 * 60 : 0, n = window.location.protocol === "https:" ? "; Secure" : "";
|
|
2516
|
-
document.cookie = `${
|
|
2516
|
+
document.cookie = `${Yn}=${e}; path=/; max-age=${t}; SameSite=Lax${n}`;
|
|
2517
2517
|
} catch {}
|
|
2518
2518
|
}
|
|
2519
|
-
function
|
|
2519
|
+
function Qn(e = {}) {
|
|
2520
2520
|
let t = e.baseUrl ?? "", n = "", r = !1, i = null, a = null, o = "sesamy:userinfo";
|
|
2521
2521
|
function s() {
|
|
2522
2522
|
try {
|
|
@@ -2553,14 +2553,14 @@ function Zn(e = {}) {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
let u = {
|
|
2555
2555
|
async init(e) {
|
|
2556
|
-
if (n = e.vendorId || e.clientId || "", q(`[cookie-auth] Initializing with baseUrl: ${t}`),
|
|
2556
|
+
if (n = e.vendorId || e.clientId || "", q(`[cookie-auth] Initializing with baseUrl: ${t}`), Xn()) {
|
|
2557
2557
|
let e = await l();
|
|
2558
|
-
e === null ? q("[cookie-auth] userinfo fetch failed transiently; retaining session hint") : e.authenticated && e.sub ? (i = !0, a = e,
|
|
2558
|
+
e === null ? q("[cookie-auth] userinfo fetch failed transiently; retaining session hint") : e.authenticated && e.sub ? (i = !0, a = e, Zn(!0), Wn(J.AUTHENTICATED, {
|
|
2559
2559
|
sub: e.sub,
|
|
2560
2560
|
appState: void 0
|
|
2561
|
-
})) : (i = !1,
|
|
2561
|
+
})) : (i = !1, Zn(!1), c(null));
|
|
2562
2562
|
} else i = !1;
|
|
2563
|
-
r = !0,
|
|
2563
|
+
r = !0, Wn(J.AUTH_INITIALIZED, {});
|
|
2564
2564
|
},
|
|
2565
2565
|
async isAuthenticated() {
|
|
2566
2566
|
if (!r) return !1;
|
|
@@ -2589,7 +2589,7 @@ function Zn(e = {}) {
|
|
|
2589
2589
|
return q("[cookie-auth] loginWithPopup called — falling back to redirect"), u.login(e);
|
|
2590
2590
|
},
|
|
2591
2591
|
async logout(e) {
|
|
2592
|
-
i = !1, a = null,
|
|
2592
|
+
i = !1, a = null, Zn(!1), c(null), Wn(J.LOGOUT, {});
|
|
2593
2593
|
let n = e?.returnTo ?? window.location.href, r = new URL(`${t}/auth/logout`, window.location.origin);
|
|
2594
2594
|
r.searchParams.set("return_to", n), e?.localOnly && r.searchParams.set("local_only", "true"), window.location.href = r.toString();
|
|
2595
2595
|
}
|
|
@@ -2598,48 +2598,48 @@ function Zn(e = {}) {
|
|
|
2598
2598
|
}
|
|
2599
2599
|
//#endregion
|
|
2600
2600
|
//#region src/services/auth/index.ts
|
|
2601
|
-
|
|
2602
|
-
var
|
|
2603
|
-
function
|
|
2604
|
-
let e =
|
|
2601
|
+
zn();
|
|
2602
|
+
var $n = "sesamyAccessToken", er = !1;
|
|
2603
|
+
function tr() {
|
|
2604
|
+
let e = Jn();
|
|
2605
2605
|
if (!e) throw Error("[sesamy-js] No auth plugin registered. This should not happen.");
|
|
2606
2606
|
return e;
|
|
2607
2607
|
}
|
|
2608
|
-
async function
|
|
2608
|
+
async function nr(e) {
|
|
2609
2609
|
if (e.enabled === !1) {
|
|
2610
|
-
q("Auth disabled via config"),
|
|
2610
|
+
q("Auth disabled via config"), er = !0;
|
|
2611
2611
|
return;
|
|
2612
2612
|
}
|
|
2613
|
-
e.useHttpCookies ? (q("useHttpCookies=true — using cookie-based BFF plugin"),
|
|
2613
|
+
e.useHttpCookies ? (q("useHttpCookies=true — using cookie-based BFF plugin"), qn(Qn())) : Jn() || (q("No auth plugin registered — falling back to cookie-based BFF plugin"), qn(Qn())), await tr().init(e), er = !0;
|
|
2614
2614
|
}
|
|
2615
|
-
async function
|
|
2616
|
-
return
|
|
2615
|
+
async function rr() {
|
|
2616
|
+
return er ? tr().isAuthenticated() : !1;
|
|
2617
2617
|
}
|
|
2618
|
-
async function
|
|
2619
|
-
return
|
|
2618
|
+
async function ir(e = !0, t = !1) {
|
|
2619
|
+
return er ? tr().getTokenSilently(e, t) : null;
|
|
2620
2620
|
}
|
|
2621
|
-
async function
|
|
2622
|
-
return
|
|
2623
|
-
}
|
|
2624
|
-
async function ar(e) {
|
|
2625
|
-
return er().login(e);
|
|
2621
|
+
async function ar() {
|
|
2622
|
+
return er ? tr().getUser() : null;
|
|
2626
2623
|
}
|
|
2627
2624
|
async function or(e) {
|
|
2628
|
-
return
|
|
2625
|
+
return tr().login(e);
|
|
2629
2626
|
}
|
|
2630
2627
|
async function sr(e) {
|
|
2631
|
-
return
|
|
2628
|
+
return tr().loginWithRedirect(e);
|
|
2629
|
+
}
|
|
2630
|
+
async function cr(e) {
|
|
2631
|
+
return tr().loginWithPopup(e);
|
|
2632
2632
|
}
|
|
2633
|
-
async function
|
|
2634
|
-
return
|
|
2633
|
+
async function lr(e = {}) {
|
|
2634
|
+
return tr().logout(e);
|
|
2635
2635
|
}
|
|
2636
|
-
async function
|
|
2636
|
+
async function ur(e) {
|
|
2637
2637
|
let t = e.split(".");
|
|
2638
2638
|
if (t.length !== 3) throw Error("Invalid token");
|
|
2639
2639
|
let n = decodeURIComponent(atob(t[1].replace(/-/g, "+").replace(/_/g, "/")).split("").map((e) => "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2)).join("")), r = JSON.parse(n);
|
|
2640
2640
|
if (!r?.exp || r.exp < Date.now() / 1e3) throw Error("Invalid token");
|
|
2641
|
-
q("Set token"), localStorage.setItem(
|
|
2642
|
-
let { triggerEvent: i } = await Promise.resolve().then(() => (
|
|
2641
|
+
q("Set token"), localStorage.setItem($n, e);
|
|
2642
|
+
let { triggerEvent: i } = await Promise.resolve().then(() => (Gn(), Hn)), { Events: a } = await Promise.resolve().then(() => (Vn(), Bn));
|
|
2643
2643
|
i(a.AUTHENTICATED, {
|
|
2644
2644
|
...r,
|
|
2645
2645
|
appState: void 0
|
|
@@ -2647,7 +2647,7 @@ async function lr(e) {
|
|
|
2647
2647
|
}
|
|
2648
2648
|
//#endregion
|
|
2649
2649
|
//#region ../../node_modules/.pnpm/wretch@2.11.1/node_modules/wretch/dist/middlewares/dedupe.js
|
|
2650
|
-
var
|
|
2650
|
+
var dr = (e, t) => t.skipDedupe || t.method !== "GET", fr = (e, t) => t.method + "@" + e, pr = (e) => e.clone(), mr = ({ skip: e = dr, key: t = fr, resolver: n = pr } = {}) => {
|
|
2651
2651
|
let r = /* @__PURE__ */ new Map();
|
|
2652
2652
|
return (i) => (a, o) => {
|
|
2653
2653
|
if (e(a, o)) return i(a, o);
|
|
@@ -2664,7 +2664,7 @@ var ur = (e, t) => t.skipDedupe || t.method !== "GET", dr = (e, t) => t.method +
|
|
|
2664
2664
|
return r.delete(s), Promise.reject(e);
|
|
2665
2665
|
}
|
|
2666
2666
|
};
|
|
2667
|
-
},
|
|
2667
|
+
}, hr = (e, t) => e * t, gr = (e) => e && e.ok, _r = ({ delayTimer: e = 500, delayRamp: t = hr, maxAttempts: n = 10, until: r = gr, onRetry: i = null, retryOnNetworkError: a = !1, resolveWithLatestResponse: o = !1, skip: s } = {}) => (c) => (l, u) => {
|
|
2668
2668
|
let d = 0;
|
|
2669
2669
|
if (s && s(l, u)) return c(l, u);
|
|
2670
2670
|
let f = (s, p) => Promise.resolve(r(s, p)).then((r) => r ? s && o ? s : p ? Promise.reject(p) : s : (d++, !n || d <= n ? new Promise((n) => {
|
|
@@ -2687,7 +2687,7 @@ var ur = (e, t) => t.skipDedupe || t.method !== "GET", dr = (e, t) => t.method +
|
|
|
2687
2687
|
if (!a) throw e;
|
|
2688
2688
|
return f(null, e);
|
|
2689
2689
|
});
|
|
2690
|
-
},
|
|
2690
|
+
}, vr = class e extends Error {
|
|
2691
2691
|
status;
|
|
2692
2692
|
statusText;
|
|
2693
2693
|
url;
|
|
@@ -2707,20 +2707,20 @@ var ur = (e, t) => t.skipDedupe || t.method !== "GET", dr = (e, t) => t.method +
|
|
|
2707
2707
|
isNotFoundError() {
|
|
2708
2708
|
return this.status === 404;
|
|
2709
2709
|
}
|
|
2710
|
-
},
|
|
2711
|
-
function
|
|
2710
|
+
}, yr = /* @__PURE__ */ ((e) => (e.BROWSER = "browser", e.NORMAL = "normal", e))(yr || {}), br = "application/json", xr = "Content-Type", Sr = Symbol(), Cr = Symbol();
|
|
2711
|
+
function wr(e = {}) {
|
|
2712
2712
|
let t = e instanceof Array ? Object.fromEntries(e) : e;
|
|
2713
|
-
return Object.entries(t).find(([e]) => e.toLowerCase() ===
|
|
2713
|
+
return Object.entries(t).find(([e]) => e.toLowerCase() === xr.toLowerCase())?.[1];
|
|
2714
2714
|
}
|
|
2715
|
-
function
|
|
2715
|
+
function Tr(e) {
|
|
2716
2716
|
return /^application\/.*json.*/.test(e);
|
|
2717
2717
|
}
|
|
2718
|
-
var
|
|
2718
|
+
var Er = function(e, t, n = !1) {
|
|
2719
2719
|
return Object.entries(t).reduce((t, [r, i]) => {
|
|
2720
2720
|
let a = e[r];
|
|
2721
|
-
return Array.isArray(a) && Array.isArray(i) ? t[r] = n ? [...a, ...i] : i : typeof a == "object" && typeof i == "object" ? t[r] =
|
|
2721
|
+
return Array.isArray(a) && Array.isArray(i) ? t[r] = n ? [...a, ...i] : i : typeof a == "object" && typeof i == "object" ? t[r] = Er(a, i, n) : t[r] = i, t;
|
|
2722
2722
|
}, { ...e });
|
|
2723
|
-
},
|
|
2723
|
+
}, Dr = {
|
|
2724
2724
|
options: {},
|
|
2725
2725
|
errorType: "text",
|
|
2726
2726
|
polyfills: {},
|
|
@@ -2730,23 +2730,23 @@ var Tr = function(e, t, n = !1) {
|
|
|
2730
2730
|
return n && i ? new i(...r) : i;
|
|
2731
2731
|
}
|
|
2732
2732
|
};
|
|
2733
|
-
function Dr(e, t = !1) {
|
|
2734
|
-
Er.options = t ? e : Tr(Er.options, e);
|
|
2735
|
-
}
|
|
2736
2733
|
function Or(e, t = !1) {
|
|
2737
|
-
|
|
2734
|
+
Dr.options = t ? e : Er(Dr.options, e);
|
|
2735
|
+
}
|
|
2736
|
+
function kr(e, t = !1) {
|
|
2737
|
+
Dr.polyfills = t ? e : Er(Dr.polyfills, e);
|
|
2738
2738
|
}
|
|
2739
|
-
function
|
|
2740
|
-
|
|
2739
|
+
function Ar(e) {
|
|
2740
|
+
Dr.errorType = e;
|
|
2741
2741
|
}
|
|
2742
|
-
var
|
|
2742
|
+
var jr = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, Mr = class extends Error {}, Nr = (e) => {
|
|
2743
2743
|
let t = /* @__PURE__ */ Object.create(null);
|
|
2744
2744
|
e = e._addons.reduce((n, r) => r.beforeRequest && r.beforeRequest(n, e._options, t) || n, e);
|
|
2745
|
-
let { _url: n, _options: r, _config: i, _catchers: a, _resolvers: o, _middlewares: s, _addons: c } = e, l = new Map(a), u =
|
|
2746
|
-
throw { [
|
|
2745
|
+
let { _url: n, _options: r, _config: i, _catchers: a, _resolvers: o, _middlewares: s, _addons: c } = e, l = new Map(a), u = Er(i.options, r), d = n, f = jr(s)((e, t) => (d = e, i.polyfill("fetch")(e, t)))(n, u), p = /* @__PURE__ */ Error(), m = f.catch((e) => {
|
|
2746
|
+
throw { [Sr]: e };
|
|
2747
2747
|
}).then((e) => {
|
|
2748
2748
|
if (!e.ok) {
|
|
2749
|
-
let t = new
|
|
2749
|
+
let t = new Mr();
|
|
2750
2750
|
if (t.cause = p, t.stack = t.stack + "\nCAUSE: " + p.stack, t.response = e, t.status = e.status, t.url = d, e.type === "opaque") throw t;
|
|
2751
2751
|
let n = i.errorType === "json" || e.headers.get("Content-Type")?.split(";")[0] === "application/json";
|
|
2752
2752
|
return (i.errorType ? n ? e.text() : e[i.errorType]() : Promise.resolve(e.body)).then((r) => {
|
|
@@ -2761,9 +2761,9 @@ var Ar = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, jr = class extends
|
|
|
2761
2761
|
}
|
|
2762
2762
|
return e;
|
|
2763
2763
|
}), h = (t) => t.catch((t) => {
|
|
2764
|
-
let n = Object.prototype.hasOwnProperty.call(t,
|
|
2764
|
+
let n = Object.prototype.hasOwnProperty.call(t, Sr), r = n ? t[Sr] : t, i = r?.status && l.get(r.status) || l.get(r?.name) || n && l.has(Sr) && l.get(Sr);
|
|
2765
2765
|
if (i) return i(r, e);
|
|
2766
|
-
let a = l.get(
|
|
2766
|
+
let a = l.get(Cr);
|
|
2767
2767
|
if (a) return a(r, e);
|
|
2768
2768
|
throw r;
|
|
2769
2769
|
}), g = (e) => (t) => h(e ? m.then((t) => t && t[e]()).then((e) => t ? t(e) : e) : m.then((e) => t ? t(e) : e)), _ = {
|
|
@@ -2798,17 +2798,17 @@ var Ar = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, jr = class extends
|
|
|
2798
2798
|
return this.error(500, e);
|
|
2799
2799
|
},
|
|
2800
2800
|
fetchError(e) {
|
|
2801
|
-
return this.error(
|
|
2801
|
+
return this.error(Sr, e);
|
|
2802
2802
|
}
|
|
2803
2803
|
}, v = c.reduce((e, t) => ({
|
|
2804
2804
|
...e,
|
|
2805
2805
|
...typeof t.resolver == "function" ? t.resolver(e) : t.resolver
|
|
2806
2806
|
}), _);
|
|
2807
2807
|
return o.reduce((t, n) => n(t, e), v);
|
|
2808
|
-
},
|
|
2808
|
+
}, Pr = {
|
|
2809
2809
|
_url: "",
|
|
2810
2810
|
_options: {},
|
|
2811
|
-
_config:
|
|
2811
|
+
_config: Dr,
|
|
2812
2812
|
_catchers: /* @__PURE__ */ new Map(),
|
|
2813
2813
|
_resolvers: [],
|
|
2814
2814
|
_deferred: [],
|
|
@@ -2835,7 +2835,7 @@ var Ar = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, jr = class extends
|
|
|
2835
2835
|
...this,
|
|
2836
2836
|
_config: {
|
|
2837
2837
|
...this._config,
|
|
2838
|
-
polyfills: t ? e :
|
|
2838
|
+
polyfills: t ? e : Er(this._config.polyfills, e)
|
|
2839
2839
|
}
|
|
2840
2840
|
};
|
|
2841
2841
|
},
|
|
@@ -2853,21 +2853,21 @@ var Ar = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, jr = class extends
|
|
|
2853
2853
|
options(e, t = !1) {
|
|
2854
2854
|
return {
|
|
2855
2855
|
...this,
|
|
2856
|
-
_options: t ? e :
|
|
2856
|
+
_options: t ? e : Er(this._options, e)
|
|
2857
2857
|
};
|
|
2858
2858
|
},
|
|
2859
2859
|
headers(e) {
|
|
2860
2860
|
let t = e ? Array.isArray(e) ? Object.fromEntries(e) : "entries" in e ? Object.fromEntries(e.entries()) : e : {};
|
|
2861
2861
|
return {
|
|
2862
2862
|
...this,
|
|
2863
|
-
_options:
|
|
2863
|
+
_options: Er(this._options, { headers: t })
|
|
2864
2864
|
};
|
|
2865
2865
|
},
|
|
2866
2866
|
accept(e) {
|
|
2867
2867
|
return this.headers({ Accept: e });
|
|
2868
2868
|
},
|
|
2869
2869
|
content(e) {
|
|
2870
|
-
return this.headers({ [
|
|
2870
|
+
return this.headers({ [xr]: e });
|
|
2871
2871
|
},
|
|
2872
2872
|
auth(e) {
|
|
2873
2873
|
return this.headers({ Authorization: e });
|
|
@@ -2880,7 +2880,7 @@ var Ar = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, jr = class extends
|
|
|
2880
2880
|
};
|
|
2881
2881
|
},
|
|
2882
2882
|
catcherFallback(e) {
|
|
2883
|
-
return this.catcher(
|
|
2883
|
+
return this.catcher(Cr, e);
|
|
2884
2884
|
},
|
|
2885
2885
|
resolve(e, t = !1) {
|
|
2886
2886
|
return {
|
|
@@ -2901,8 +2901,8 @@ var Ar = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, jr = class extends
|
|
|
2901
2901
|
};
|
|
2902
2902
|
},
|
|
2903
2903
|
fetch(e = this._options.method, t = "", n = null) {
|
|
2904
|
-
let r = this.url(t).options({ method: e }), i =
|
|
2905
|
-
return r = n ? o ? r.json(n, i) : r.body(n) : r,
|
|
2904
|
+
let r = this.url(t).options({ method: e }), i = wr(r._options.headers), a = this._config.polyfill("FormData", !1), o = typeof n == "object" && !(a && n instanceof a) && (!r._options.headers || !i || Tr(i));
|
|
2905
|
+
return r = n ? o ? r.json(n, i) : r.body(n) : r, Nr(r._deferred.reduce((e, t) => t(e, e._url, e._options), r));
|
|
2906
2906
|
},
|
|
2907
2907
|
get(e = "") {
|
|
2908
2908
|
return this.fetch("GET", e);
|
|
@@ -2935,19 +2935,19 @@ var Ar = (e) => (t) => e.reduceRight((e, t) => t(e), t) || t, jr = class extends
|
|
|
2935
2935
|
};
|
|
2936
2936
|
},
|
|
2937
2937
|
json(e, t) {
|
|
2938
|
-
let n =
|
|
2939
|
-
return this.content(t ||
|
|
2938
|
+
let n = wr(this._options.headers);
|
|
2939
|
+
return this.content(t || Tr(n) && n || br).body(JSON.stringify(e));
|
|
2940
2940
|
}
|
|
2941
2941
|
};
|
|
2942
|
-
function
|
|
2942
|
+
function Fr(e = "", t = {}) {
|
|
2943
2943
|
return {
|
|
2944
|
-
...
|
|
2944
|
+
...Pr,
|
|
2945
2945
|
_url: e,
|
|
2946
2946
|
_options: t
|
|
2947
2947
|
};
|
|
2948
2948
|
}
|
|
2949
|
-
|
|
2950
|
-
var
|
|
2949
|
+
Fr.default = Fr, Fr.options = Or, Fr.errorType = Ar, Fr.polyfills = kr, Fr.WretchError = Mr;
|
|
2950
|
+
var Ir = (e, t) => t.skipDedupe || t.method !== "GET", Lr = (e, t) => t.method + "@" + e, Rr = (e) => e.clone(), zr = ({ skip: e = Ir, key: t = Lr, resolver: n = Rr } = {}) => {
|
|
2951
2951
|
let r = /* @__PURE__ */ new Map();
|
|
2952
2952
|
return (i) => (a, o) => {
|
|
2953
2953
|
if (e(a, o)) return i(a, o);
|
|
@@ -2964,7 +2964,7 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
2964
2964
|
return r.delete(s), Promise.reject(e);
|
|
2965
2965
|
}
|
|
2966
2966
|
};
|
|
2967
|
-
},
|
|
2967
|
+
}, Br = (e, t) => t.skipCache || t.method !== "GET", Vr = (e, t) => t.method + "@" + e, Hr = () => !1, Ur = () => null, Wr = (e) => e.ok, Gr = ({ throttle: e = 1e3, skip: t = Br, key: n = Vr, clear: r = Hr, invalidate: i = Ur, condition: a = Wr, flagResponseOnCacheHit: o = "__cached" } = {}) => {
|
|
2968
2968
|
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = (t) => {
|
|
2969
2969
|
e && !l.has(t) && (l.add(t), setTimeout(() => {
|
|
2970
2970
|
l.delete(t);
|
|
@@ -2994,7 +2994,7 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
2994
2994
|
return d.cacheResponse = function(e, t) {
|
|
2995
2995
|
u(e), s.set(e, t);
|
|
2996
2996
|
}, d.cache = s, d.inflight = c, d.throttling = l, d;
|
|
2997
|
-
},
|
|
2997
|
+
}, Kr = (e, t) => e * t, qr = (e) => e && e.ok, Jr = ({ delayTimer: e = 500, delayRamp: t = Kr, maxAttempts: n = 10, until: r = qr, onRetry: i = null, retryOnNetworkError: a = !1, resolveWithLatestResponse: o = !1, skip: s } = {}) => (c) => (l, u) => {
|
|
2998
2998
|
let d = 0;
|
|
2999
2999
|
if (s && s(l, u)) return c(l, u);
|
|
3000
3000
|
let f = (s, p) => Promise.resolve(r(s, p)).then((r) => r ? s && o ? s : p ? Promise.reject(p) : s : (d++, !n || d <= n ? new Promise((n) => {
|
|
@@ -3017,7 +3017,7 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3017
3017
|
if (!a) throw e;
|
|
3018
3018
|
return f(null, e);
|
|
3019
3019
|
});
|
|
3020
|
-
},
|
|
3020
|
+
}, Yr = "@sesamy/sdk", Xr = "1.28.0", Zr = class {
|
|
3021
3021
|
cache = /* @__PURE__ */ new Map();
|
|
3022
3022
|
get(e) {
|
|
3023
3023
|
return this.cache.get(e) || null;
|
|
@@ -3031,12 +3031,12 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3031
3031
|
clear() {
|
|
3032
3032
|
this.cache.clear();
|
|
3033
3033
|
}
|
|
3034
|
-
},
|
|
3035
|
-
let { libraryName: t =
|
|
3034
|
+
}, Qr = "sesamyCacheTimestamp", $r = (e) => {
|
|
3035
|
+
let { libraryName: t = Yr, libraryVersion: n = Xr, cache: r } = e, i = r?.storage || new Zr(), a = [
|
|
3036
3036
|
(e) => async (t, n) => {
|
|
3037
|
-
if (r?.mode ===
|
|
3037
|
+
if (r?.mode === yr.BROWSER) {
|
|
3038
3038
|
let r;
|
|
3039
|
-
return typeof sessionStorage < "u" ? (r = sessionStorage.getItem(
|
|
3039
|
+
return typeof sessionStorage < "u" ? (r = sessionStorage.getItem(Qr), r || (r = Date.now().toString(), sessionStorage.setItem(Qr, r))) : (r = i.get(Qr), r || (r = Date.now().toString(), i.set(Qr, r))), e(t, {
|
|
3040
3040
|
...n,
|
|
3041
3041
|
headers: {
|
|
3042
3042
|
...n.headers,
|
|
@@ -3059,19 +3059,19 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3059
3059
|
}
|
|
3060
3060
|
});
|
|
3061
3061
|
},
|
|
3062
|
-
|
|
3062
|
+
zr()
|
|
3063
3063
|
];
|
|
3064
|
-
r?.mode ===
|
|
3064
|
+
r?.mode === yr.NORMAL && a.push(Gr({
|
|
3065
3065
|
throttle: 300 * 1e3,
|
|
3066
3066
|
skip: (e, t) => t.method !== "GET"
|
|
3067
|
-
})), a.push(
|
|
3067
|
+
})), a.push(Jr({
|
|
3068
3068
|
delayTimer: 1e3,
|
|
3069
3069
|
delayRamp: (e, t) => e * t,
|
|
3070
3070
|
maxAttempts: 3,
|
|
3071
3071
|
until: (e) => !!(e && (e.ok || e.status >= 400 && e.status < 500)),
|
|
3072
3072
|
retryOnNetworkError: !1
|
|
3073
3073
|
}));
|
|
3074
|
-
let o =
|
|
3074
|
+
let o = Fr(e.baseUrl).headers({
|
|
3075
3075
|
"Content-Type": "application/json",
|
|
3076
3076
|
"X-Sesamy-Client": `${t}/${n}`,
|
|
3077
3077
|
...e.headers
|
|
@@ -3105,19 +3105,19 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3105
3105
|
"patch",
|
|
3106
3106
|
"put",
|
|
3107
3107
|
"delete"
|
|
3108
|
-
].includes(i) &&
|
|
3108
|
+
].includes(i) && ei(), s.status === 204) return null;
|
|
3109
3109
|
if (!s.ok) {
|
|
3110
3110
|
let e = await s.text().catch(() => "Unknown error");
|
|
3111
|
-
throw new
|
|
3111
|
+
throw new vr(s.status, s.statusText, s.url, `API Error ${s.status}: ${e}`, e);
|
|
3112
3112
|
}
|
|
3113
3113
|
return await s.json();
|
|
3114
3114
|
} catch (n) {
|
|
3115
|
-
if (n instanceof
|
|
3115
|
+
if (n instanceof vr) throw n;
|
|
3116
3116
|
let r = n.status || 500;
|
|
3117
|
-
throw new
|
|
3117
|
+
throw new vr(r, n.message || "Unknown error", `${e.baseUrl}${t}`, `API Error ${r}: ${n.message || "Unknown error"}`, n.message || "Unknown error");
|
|
3118
3118
|
}
|
|
3119
3119
|
} };
|
|
3120
|
-
},
|
|
3120
|
+
}, ei = () => (typeof sessionStorage < "u" && sessionStorage.removeItem(Qr), "Cache cleared"), ti = {
|
|
3121
3121
|
get: async (e, t) => e.request(`/profile/${t}`),
|
|
3122
3122
|
update: async (e, t, n) => e.request(`/profile/${t}`, {
|
|
3123
3123
|
method: "PATCH",
|
|
@@ -3128,7 +3128,7 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3128
3128
|
delete: async (e) => {
|
|
3129
3129
|
await e.request("/profile", { method: "DELETE" });
|
|
3130
3130
|
}
|
|
3131
|
-
},
|
|
3131
|
+
}, ni = {
|
|
3132
3132
|
list: async (e, t) => {
|
|
3133
3133
|
let n = new URLSearchParams();
|
|
3134
3134
|
t?.type && n.append("type", t.type), t?.sku && n.append("sku", t.sku), t?.purchaseOptionId && n.append("purchase-option-id", t.purchaseOptionId), t?.waitForEntitlementAfter && n.append("wait-for-entitlement-after", t.waitForEntitlementAfter);
|
|
@@ -3137,20 +3137,20 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3137
3137
|
},
|
|
3138
3138
|
get: async (e, t) => e.request(`/entitlements/${t}`),
|
|
3139
3139
|
getAccess: async (e, t) => e.request(`/entitlements/${t}/access`)
|
|
3140
|
-
},
|
|
3140
|
+
}, ri = {
|
|
3141
3141
|
list: async (e) => e.request("/subscriptions"),
|
|
3142
3142
|
get: async (e, t) => e.request(`/subscriptions/${t}`)
|
|
3143
|
-
},
|
|
3143
|
+
}, ii = {
|
|
3144
3144
|
get: async (e, t) => e.request(`/products/${t}`),
|
|
3145
3145
|
autoOnboard: async (e, t) => e.request(`/products/${t}/auto-onboard`, { method: "POST" })
|
|
3146
|
-
},
|
|
3146
|
+
}, ai = (e, t) => {
|
|
3147
3147
|
if (!e || !t) return e;
|
|
3148
3148
|
let n = new URL(e);
|
|
3149
3149
|
return n.hash = `access_token=${t}`, n.toString();
|
|
3150
|
-
},
|
|
3150
|
+
}, oi = (e, t) => !e.manageUrl || !t ? e : {
|
|
3151
3151
|
...e,
|
|
3152
|
-
manageUrl:
|
|
3153
|
-
},
|
|
3152
|
+
manageUrl: ai(e.manageUrl, t)
|
|
3153
|
+
}, si = {
|
|
3154
3154
|
list: async (e) => e.request("/contracts"),
|
|
3155
3155
|
get: async (e, t) => e.request(`/contracts/${t}`),
|
|
3156
3156
|
cancel: async (e, t, n) => e.request(`/contracts/${t}/cancel`, {
|
|
@@ -3162,7 +3162,7 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3162
3162
|
body: JSON.stringify(n)
|
|
3163
3163
|
}),
|
|
3164
3164
|
confirmAmendment: async (e, t, n) => e.request(`/contracts/${t}/amendments/${n}/confirm`, { method: "POST" })
|
|
3165
|
-
},
|
|
3165
|
+
}, ci = {
|
|
3166
3166
|
get: async (e) => e.request("/user-metadata"),
|
|
3167
3167
|
set: async (e, t, n) => {
|
|
3168
3168
|
await e.request(`/user-metadata/${t}`, {
|
|
@@ -3173,7 +3173,7 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3173
3173
|
delete: async (e, t) => {
|
|
3174
3174
|
await e.request(`/user-metadata/${t}`, { method: "DELETE" });
|
|
3175
3175
|
}
|
|
3176
|
-
},
|
|
3176
|
+
}, li = {
|
|
3177
3177
|
list: async (e) => e.request("/tallies"),
|
|
3178
3178
|
get: async (e, t) => e.request(`/tallies/${t}`),
|
|
3179
3179
|
update: async (e, t, n) => e.request(`/tallies/${t}`, {
|
|
@@ -3195,7 +3195,7 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3195
3195
|
method: "POST",
|
|
3196
3196
|
body: JSON.stringify(n)
|
|
3197
3197
|
})
|
|
3198
|
-
},
|
|
3198
|
+
}, ui = {
|
|
3199
3199
|
list: async (e) => e.request("/tags"),
|
|
3200
3200
|
add: async (e, t) => {
|
|
3201
3201
|
await e.request("/tags", {
|
|
@@ -3206,7 +3206,7 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3206
3206
|
remove: async (e, t) => {
|
|
3207
3207
|
await e.request(`/tags/${t}`, { method: "DELETE" });
|
|
3208
3208
|
}
|
|
3209
|
-
},
|
|
3209
|
+
}, di = {
|
|
3210
3210
|
generateCheckoutLink: (e, t) => {
|
|
3211
3211
|
let n = new URL(`${e.apiUrl}/checkouts`);
|
|
3212
3212
|
return t.items && n.searchParams.set("items", JSON.stringify(t.items)), t.email && n.searchParams.set("email", t.email), t.language && n.searchParams.set("lang", t.language), t.redirectUrl && n.searchParams.set("redirect-url", t.redirectUrl), t.giftMode && n.searchParams.set("gift-mode", "true"), t.payerEmail && n.searchParams.set("payer-email", t.payerEmail), t.requireAddress && n.searchParams.set("require-address", "true"), t.metadata && Object.entries(t.metadata).forEach(([e, t]) => {
|
|
@@ -3229,7 +3229,7 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3229
3229
|
let n = t.language || "en", r = new URL(`${e.baseUrl}/consume/${encodeURIComponent(n)}/@${encodeURIComponent(e.clientId)}/${encodeURIComponent(t.sku)}`);
|
|
3230
3230
|
return t.episodeId ? r.href += `/${encodeURIComponent(t.episodeId)}` : r.href += "/listen", r.searchParams.set("sesamy-redirect-url", t.redirectUrl || "/"), r.toString();
|
|
3231
3231
|
}
|
|
3232
|
-
},
|
|
3232
|
+
}, fi = {
|
|
3233
3233
|
generateLink: (e, t) => {
|
|
3234
3234
|
let n = new URL(`${e.apiUrl}/checkouts`);
|
|
3235
3235
|
return t.items && n.searchParams.set("items", JSON.stringify(t.items)), t.email && n.searchParams.set("email", t.email), t.language && n.searchParams.set("lang", t.language), t.redirectUrl && n.searchParams.set("redirect-url", t.redirectUrl), t.giftMode && n.searchParams.set("gift-mode", "true"), t.payerEmail && n.searchParams.set("payer-email", t.payerEmail), t.requireAddress && n.searchParams.set("require-address", "true"), t.metadata && Object.entries(t.metadata).forEach(([e, t]) => {
|
|
@@ -3245,16 +3245,16 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3245
3245
|
method: "PATCH",
|
|
3246
3246
|
body: JSON.stringify(n)
|
|
3247
3247
|
})
|
|
3248
|
-
},
|
|
3248
|
+
}, pi = {
|
|
3249
3249
|
list: async (e) => e.request("/bills"),
|
|
3250
3250
|
get: async (e, t) => e.request(`/bills/${t}`)
|
|
3251
|
-
},
|
|
3251
|
+
}, mi = {
|
|
3252
3252
|
list: async (e) => e.request("/fulfillments"),
|
|
3253
3253
|
create: async (e, t) => e.request("/fulfillments", {
|
|
3254
3254
|
method: "POST",
|
|
3255
3255
|
body: JSON.stringify(t)
|
|
3256
3256
|
})
|
|
3257
|
-
},
|
|
3257
|
+
}, hi = {
|
|
3258
3258
|
get: async (e, t) => {
|
|
3259
3259
|
try {
|
|
3260
3260
|
return new URL(t), e.request(t);
|
|
@@ -3266,112 +3266,112 @@ var Fr = (e, t) => t.skipDedupe || t.method !== "GET", Ir = (e, t) => t.method +
|
|
|
3266
3266
|
method: "POST",
|
|
3267
3267
|
body: JSON.stringify(n)
|
|
3268
3268
|
})
|
|
3269
|
-
},
|
|
3269
|
+
}, gi = { list: async (e) => e.request("/payment-issues") }, _i = { content: async (e, t, n, r, i) => {
|
|
3270
3270
|
let a = new URLSearchParams({ url: t });
|
|
3271
3271
|
return n && a.append("selector", n), r && a.append("cache", r), e.request(`/proxy?${a.toString()}`, i);
|
|
3272
|
-
} },
|
|
3272
|
+
} }, vi = { list: async (e, t) => {
|
|
3273
3273
|
let n = (t ? new URLSearchParams({ q: t }) : new URLSearchParams()).toString(), r = n ? `/transactions?${n}` : "/transactions";
|
|
3274
3274
|
return e.request(r);
|
|
3275
|
-
} },
|
|
3275
|
+
} }, yi = {
|
|
3276
3276
|
get: async (e) => e.request("/vendor"),
|
|
3277
3277
|
list: async (e) => e.request("/vendors")
|
|
3278
|
-
},
|
|
3279
|
-
let t =
|
|
3278
|
+
}, bi = (e) => {
|
|
3279
|
+
let t = $r(e);
|
|
3280
3280
|
return {
|
|
3281
3281
|
profile: {
|
|
3282
|
-
get: (e) =>
|
|
3283
|
-
update: (e, n) =>
|
|
3284
|
-
checkSpotifyLink: () =>
|
|
3285
|
-
unlinkSpotify: () =>
|
|
3286
|
-
delete: () =>
|
|
3282
|
+
get: (e) => ti.get(t, e),
|
|
3283
|
+
update: (e, n) => ti.update(t, e, n),
|
|
3284
|
+
checkSpotifyLink: () => ti.checkSpotifyLink(t),
|
|
3285
|
+
unlinkSpotify: () => ti.unlinkSpotify(t),
|
|
3286
|
+
delete: () => ti.delete(t)
|
|
3287
3287
|
},
|
|
3288
3288
|
entitlements: {
|
|
3289
|
-
list: (e) =>
|
|
3290
|
-
get: (e) =>
|
|
3291
|
-
getAccess: (e) =>
|
|
3289
|
+
list: (e) => ni.list(t, e),
|
|
3290
|
+
get: (e) => ni.get(t, e),
|
|
3291
|
+
getAccess: (e) => ni.getAccess(t, e)
|
|
3292
3292
|
},
|
|
3293
3293
|
subscriptions: {
|
|
3294
|
-
list: () =>
|
|
3295
|
-
get: (e) =>
|
|
3294
|
+
list: () => ri.list(t),
|
|
3295
|
+
get: (e) => ri.get(t, e)
|
|
3296
3296
|
},
|
|
3297
3297
|
products: {
|
|
3298
|
-
get: (e) =>
|
|
3299
|
-
autoOnboard: (e) =>
|
|
3298
|
+
get: (e) => ii.get(t, e),
|
|
3299
|
+
autoOnboard: (e) => ii.autoOnboard(t, e)
|
|
3300
3300
|
},
|
|
3301
3301
|
contracts: {
|
|
3302
3302
|
list: async () => {
|
|
3303
|
-
let n = await
|
|
3303
|
+
let n = await si.list(t), r = await e.tokenProvider();
|
|
3304
3304
|
if (!r || !r.toLowerCase().startsWith("bearer ")) return n;
|
|
3305
3305
|
let i = r.substring(7);
|
|
3306
|
-
return n.map((e) =>
|
|
3306
|
+
return n.map((e) => oi(e, i));
|
|
3307
3307
|
},
|
|
3308
3308
|
get: async (n) => {
|
|
3309
|
-
let r = await
|
|
3310
|
-
return !i || !i.toLowerCase().startsWith("bearer ") ? r :
|
|
3309
|
+
let r = await si.get(t, n), i = await e.tokenProvider();
|
|
3310
|
+
return !i || !i.toLowerCase().startsWith("bearer ") ? r : oi(r, i.substring(7));
|
|
3311
3311
|
},
|
|
3312
|
-
cancel: (e, n) =>
|
|
3313
|
-
createAmendment: (e, n) =>
|
|
3314
|
-
confirmAmendment: (e, n) =>
|
|
3312
|
+
cancel: (e, n) => si.cancel(t, e, n),
|
|
3313
|
+
createAmendment: (e, n) => si.createAmendment(t, e, n),
|
|
3314
|
+
confirmAmendment: (e, n) => si.confirmAmendment(t, e, n)
|
|
3315
3315
|
},
|
|
3316
3316
|
userMetadata: {
|
|
3317
|
-
get: () =>
|
|
3318
|
-
set: (e, n) =>
|
|
3319
|
-
delete: (e) =>
|
|
3317
|
+
get: () => ci.get(t),
|
|
3318
|
+
set: (e, n) => ci.set(t, e, n),
|
|
3319
|
+
delete: (e) => ci.delete(t, e)
|
|
3320
3320
|
},
|
|
3321
3321
|
tallies: {
|
|
3322
|
-
list: () =>
|
|
3323
|
-
get: (e) =>
|
|
3324
|
-
update: (e, n) =>
|
|
3325
|
-
create: (e) =>
|
|
3326
|
-
delete: (e) =>
|
|
3327
|
-
push: (e, n) =>
|
|
3322
|
+
list: () => li.list(t),
|
|
3323
|
+
get: (e) => li.get(t, e),
|
|
3324
|
+
update: (e, n) => li.update(t, e, n),
|
|
3325
|
+
create: (e) => li.create(t, e),
|
|
3326
|
+
delete: (e) => li.delete(t, e),
|
|
3327
|
+
push: (e, n) => li.push(t, e, n)
|
|
3328
3328
|
},
|
|
3329
3329
|
tags: {
|
|
3330
|
-
list: () =>
|
|
3331
|
-
add: (e) =>
|
|
3332
|
-
remove: (e) =>
|
|
3330
|
+
list: () => ui.list(t),
|
|
3331
|
+
add: (e) => ui.add(t, e),
|
|
3332
|
+
remove: (e) => ui.remove(t, e)
|
|
3333
3333
|
},
|
|
3334
3334
|
checkouts: {
|
|
3335
|
-
generateLink: (e, t) =>
|
|
3336
|
-
create: (e) =>
|
|
3337
|
-
get: (e) =>
|
|
3338
|
-
update: (e, n) =>
|
|
3335
|
+
generateLink: (e, t) => di.generateCheckoutLink(e, t),
|
|
3336
|
+
create: (e) => fi.create(t, e),
|
|
3337
|
+
get: (e) => fi.get(t, e),
|
|
3338
|
+
update: (e, n) => fi.update(t, e, n)
|
|
3339
3339
|
},
|
|
3340
3340
|
links: {
|
|
3341
|
-
generateCheckoutLink: (e, t) =>
|
|
3342
|
-
generateAccountLink: (e, t) =>
|
|
3343
|
-
generateChangePaymentLink: (e, t) =>
|
|
3344
|
-
generateChangePlanLink: (e, t) =>
|
|
3345
|
-
generateConsumeLink: (e, t) =>
|
|
3341
|
+
generateCheckoutLink: (e, t) => di.generateCheckoutLink(e, t),
|
|
3342
|
+
generateAccountLink: (e, t) => di.generateAccountLink(e, t),
|
|
3343
|
+
generateChangePaymentLink: (e, t) => di.generateChangePaymentLink(e, t),
|
|
3344
|
+
generateChangePlanLink: (e, t) => di.generateChangePlanLink(e, t),
|
|
3345
|
+
generateConsumeLink: (e, t) => di.generateConsumeLink(e, t)
|
|
3346
3346
|
},
|
|
3347
3347
|
bills: {
|
|
3348
|
-
list: () =>
|
|
3349
|
-
get: (e) =>
|
|
3348
|
+
list: () => pi.list(t),
|
|
3349
|
+
get: (e) => pi.get(t, e)
|
|
3350
3350
|
},
|
|
3351
3351
|
fulfillments: {
|
|
3352
|
-
list: () =>
|
|
3353
|
-
create: (e) =>
|
|
3352
|
+
list: () => mi.list(t),
|
|
3353
|
+
create: (e) => mi.create(t, e)
|
|
3354
3354
|
},
|
|
3355
3355
|
paywalls: {
|
|
3356
|
-
get: (e) =>
|
|
3357
|
-
checkAccess: (e, n) =>
|
|
3356
|
+
get: (e) => hi.get(t, e),
|
|
3357
|
+
checkAccess: (e, n) => hi.checkAccess(t, e, n)
|
|
3358
3358
|
},
|
|
3359
|
-
paymentIssues: { list: () =>
|
|
3360
|
-
proxy: { content: (e, n, r, i) =>
|
|
3361
|
-
transactions: { list: (e) =>
|
|
3359
|
+
paymentIssues: { list: () => gi.list(t) },
|
|
3360
|
+
proxy: { content: (e, n, r, i) => _i.content(t, e, n, r, i) },
|
|
3361
|
+
transactions: { list: (e) => vi.list(t, e) },
|
|
3362
3362
|
vendor: {
|
|
3363
|
-
get: () =>
|
|
3364
|
-
list: () =>
|
|
3363
|
+
get: () => yi.get(t),
|
|
3364
|
+
list: () => yi.list(t)
|
|
3365
3365
|
}
|
|
3366
3366
|
};
|
|
3367
|
-
},
|
|
3368
|
-
function
|
|
3367
|
+
}, xi = "sesamy.com", Si = "sesamy.dev", Ci = "https://sesa.my", wi = "sesamyCacheTimestamp", Ti = "sesamyContentReloaded", Ei = /* @__PURE__ */ "co.uk,com.au,co.nz,co.za,com.br,co.jp,gov.uk,ac.uk,org.uk,net.uk,com.sg,com.my,co.in,co.id,co.th,co.kr,com.mx,com.ar,com.co,com.pe,com.ph,com.pk,com.sa,com.eg,com.ng,co.ke,co.tz,co.zw,co.bw,co.mz,gov.au,edu.au,org.au,net.au,asn.au,id.au".split(",");
|
|
3368
|
+
function Di(e) {
|
|
3369
3369
|
try {
|
|
3370
3370
|
let t = new URL(e).hostname;
|
|
3371
3371
|
if (t.startsWith("[") || /^\d{1,3}(\.\d{1,3}){3}$/.test(t)) return t;
|
|
3372
3372
|
let n = t.split(".");
|
|
3373
3373
|
if (n.length <= 1) return t;
|
|
3374
|
-
for (let e of
|
|
3374
|
+
for (let e of Ei) if (t.endsWith(`.${e}`)) {
|
|
3375
3375
|
let t = e.split(".").length + 1;
|
|
3376
3376
|
return n.slice(-t).join(".");
|
|
3377
3377
|
}
|
|
@@ -3382,7 +3382,7 @@ function Ei(e) {
|
|
|
3382
3382
|
}
|
|
3383
3383
|
//#endregion
|
|
3384
3384
|
//#region src/types/Cache.ts
|
|
3385
|
-
var
|
|
3385
|
+
var Oi = class {
|
|
3386
3386
|
get(e) {
|
|
3387
3387
|
return typeof sessionStorage > "u" ? null : sessionStorage.getItem(e);
|
|
3388
3388
|
}
|
|
@@ -3396,21 +3396,21 @@ var Di = class {
|
|
|
3396
3396
|
};
|
|
3397
3397
|
//#endregion
|
|
3398
3398
|
//#region src/services/config/index.ts
|
|
3399
|
-
function Oi(e, t) {
|
|
3400
|
-
return `${e}.${t === "dev" ? xi : bi}`;
|
|
3401
|
-
}
|
|
3402
3399
|
function ki(e, t) {
|
|
3403
|
-
return
|
|
3400
|
+
return `${e}.${t === "dev" ? Si : xi}`;
|
|
3401
|
+
}
|
|
3402
|
+
function Ai(e, t) {
|
|
3403
|
+
return `https://${ki(e, t)}`;
|
|
3404
3404
|
}
|
|
3405
3405
|
//#endregion
|
|
3406
3406
|
//#region src/utils/language.ts
|
|
3407
|
-
function
|
|
3407
|
+
function ji() {
|
|
3408
3408
|
let e = (document.documentElement.getAttribute("lang") ?? navigator.language ?? "en").split("-")[0]?.toLowerCase() ?? "en";
|
|
3409
3409
|
return e === "nn" && (e = "nb"), e;
|
|
3410
3410
|
}
|
|
3411
3411
|
//#endregion
|
|
3412
3412
|
//#region src/utils/links.ts
|
|
3413
|
-
function
|
|
3413
|
+
function Mi(e) {
|
|
3414
3414
|
let t;
|
|
3415
3415
|
try {
|
|
3416
3416
|
t = new URL(e);
|
|
@@ -3419,8 +3419,8 @@ function ji(e) {
|
|
|
3419
3419
|
}
|
|
3420
3420
|
return t.protocol === "http:" || t.protocol === "https:";
|
|
3421
3421
|
}
|
|
3422
|
-
function
|
|
3423
|
-
if (
|
|
3422
|
+
function Ni(e, t) {
|
|
3423
|
+
if (Mi(e)) return { itemSrc: e };
|
|
3424
3424
|
let n = e.split(":");
|
|
3425
3425
|
if (n.length < 2) throw Error(`Invalid itemSrc format: expected at least 2 segments separated by ':', got ${n.length}`);
|
|
3426
3426
|
let [r, i, a] = n;
|
|
@@ -3430,17 +3430,17 @@ function Mi(e, t) {
|
|
|
3430
3430
|
purchaseOption: t || a
|
|
3431
3431
|
};
|
|
3432
3432
|
}
|
|
3433
|
-
function
|
|
3433
|
+
function Pi(e) {
|
|
3434
3434
|
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
3435
3435
|
}
|
|
3436
|
-
function
|
|
3437
|
-
if (!
|
|
3436
|
+
function Fi(e, t) {
|
|
3437
|
+
if (!Mi(e) || !Mi(t)) return !1;
|
|
3438
3438
|
let n = new URL(e), r = new URL(t);
|
|
3439
|
-
return n.origin === r.origin &&
|
|
3439
|
+
return n.origin === r.origin && Pi(n.pathname) === Pi(r.pathname);
|
|
3440
3440
|
}
|
|
3441
3441
|
//#endregion
|
|
3442
3442
|
//#region src/services/consent/cmp-adapters.ts
|
|
3443
|
-
function
|
|
3443
|
+
function Ii(e) {
|
|
3444
3444
|
let t = window.Cookiebot;
|
|
3445
3445
|
t?.consent && e({
|
|
3446
3446
|
statistics: !!t.consent.statistics,
|
|
@@ -3455,25 +3455,25 @@ function Fi(e) {
|
|
|
3455
3455
|
};
|
|
3456
3456
|
window.addEventListener("CookiebotOnAccept", n), window.addEventListener("CookiebotOnDecline", n);
|
|
3457
3457
|
}
|
|
3458
|
-
function
|
|
3458
|
+
function Li() {
|
|
3459
3459
|
return window.Cookiebot !== void 0;
|
|
3460
3460
|
}
|
|
3461
|
-
function
|
|
3461
|
+
function Ri() {
|
|
3462
3462
|
let e = window.OptanonActiveGroups || "";
|
|
3463
3463
|
return {
|
|
3464
3464
|
statistics: e.includes("C0002"),
|
|
3465
3465
|
marketing: e.includes("C0004")
|
|
3466
3466
|
};
|
|
3467
3467
|
}
|
|
3468
|
-
function
|
|
3469
|
-
e(
|
|
3470
|
-
e(
|
|
3468
|
+
function zi(e) {
|
|
3469
|
+
e(Ri()), window.addEventListener("OneTrustGroupsUpdated", () => {
|
|
3470
|
+
e(Ri());
|
|
3471
3471
|
});
|
|
3472
3472
|
}
|
|
3473
|
-
function
|
|
3473
|
+
function Bi() {
|
|
3474
3474
|
return window.OneTrust !== void 0;
|
|
3475
3475
|
}
|
|
3476
|
-
function
|
|
3476
|
+
function Vi() {
|
|
3477
3477
|
let e = window.dataLayer;
|
|
3478
3478
|
if (!e) return null;
|
|
3479
3479
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
@@ -3488,8 +3488,8 @@ function Bi() {
|
|
|
3488
3488
|
}
|
|
3489
3489
|
return null;
|
|
3490
3490
|
}
|
|
3491
|
-
function
|
|
3492
|
-
let t =
|
|
3491
|
+
function Hi(e) {
|
|
3492
|
+
let t = Vi();
|
|
3493
3493
|
t && e(t);
|
|
3494
3494
|
let n = window.dataLayer ??= [], r = n.push.bind(n);
|
|
3495
3495
|
n.push = (...t) => {
|
|
@@ -3504,46 +3504,46 @@ function Vi(e) {
|
|
|
3504
3504
|
return n;
|
|
3505
3505
|
};
|
|
3506
3506
|
}
|
|
3507
|
-
function
|
|
3507
|
+
function Ui() {
|
|
3508
3508
|
return Array.isArray(window.dataLayer);
|
|
3509
3509
|
}
|
|
3510
3510
|
//#endregion
|
|
3511
3511
|
//#region src/services/consent/index.ts
|
|
3512
|
-
|
|
3513
|
-
var
|
|
3512
|
+
Vn();
|
|
3513
|
+
var Wi = !1, Gi = {
|
|
3514
3514
|
statistics: !1,
|
|
3515
3515
|
marketing: !1
|
|
3516
3516
|
};
|
|
3517
|
-
function Gi() {
|
|
3518
|
-
return Ui;
|
|
3519
|
-
}
|
|
3520
3517
|
function Ki() {
|
|
3521
|
-
return
|
|
3518
|
+
return Wi;
|
|
3522
3519
|
}
|
|
3523
|
-
function qi(
|
|
3524
|
-
return
|
|
3520
|
+
function qi() {
|
|
3521
|
+
return { ...Gi };
|
|
3525
3522
|
}
|
|
3526
3523
|
function Ji(e) {
|
|
3527
|
-
|
|
3528
|
-
e.statistics !== void 0 && (Wi.statistics = e.statistics), e.marketing !== void 0 && (Wi.marketing = e.marketing), t && window.dispatchEvent(new CustomEvent(Y.CONSENT_CHANGED, { detail: Ki() }));
|
|
3524
|
+
return Wi ? Gi[e] : !0;
|
|
3529
3525
|
}
|
|
3530
3526
|
function Yi(e) {
|
|
3527
|
+
let t = e.statistics !== void 0 && e.statistics !== Gi.statistics || e.marketing !== void 0 && e.marketing !== Gi.marketing;
|
|
3528
|
+
e.statistics !== void 0 && (Gi.statistics = e.statistics), e.marketing !== void 0 && (Gi.marketing = e.marketing), t && window.dispatchEvent(new CustomEvent(J.CONSENT_CHANGED, { detail: qi() }));
|
|
3529
|
+
}
|
|
3530
|
+
function Xi(e) {
|
|
3531
3531
|
if (!e?.enabled) return;
|
|
3532
|
-
|
|
3533
|
-
let t = (e) =>
|
|
3534
|
-
e.cmp === "cookiebot" ?
|
|
3532
|
+
Wi = !0, e.defaultConsent && (e.defaultConsent.statistics !== void 0 && (Gi.statistics = e.defaultConsent.statistics), e.defaultConsent.marketing !== void 0 && (Gi.marketing = e.defaultConsent.marketing));
|
|
3533
|
+
let t = (e) => Yi(e);
|
|
3534
|
+
e.cmp === "cookiebot" ? Ii(t) : e.cmp === "onetrust" ? zi(t) : e.cmp === "google-consent-mode" ? Hi(t) : e.onConsentChange ? e.onConsentChange(t) : Li() ? Ii(t) : Bi() ? zi(t) : Ui() && Hi(t);
|
|
3535
3535
|
}
|
|
3536
3536
|
//#endregion
|
|
3537
3537
|
//#region src/controllers/checkout.ts
|
|
3538
|
-
function
|
|
3539
|
-
let r = new URL(`${
|
|
3538
|
+
function Zi(e, t, n) {
|
|
3539
|
+
let r = new URL(`${Ai("checkout3", e.environment)}`);
|
|
3540
3540
|
t.language && r.searchParams.set("lang", t.language);
|
|
3541
3541
|
let i = t.sku, a = t.purchaseOptionId, o = t.itemSrc;
|
|
3542
3542
|
if (t.itemSrc) {
|
|
3543
|
-
let e =
|
|
3543
|
+
let e = Ni(t.itemSrc, t.purchaseOptionId);
|
|
3544
3544
|
i = e.sku || i, a = e.purchaseOption || a, o = e.itemSrc;
|
|
3545
3545
|
}
|
|
3546
|
-
if (i ? (r.searchParams.set("sku", i), a && r.searchParams.set("po-id", a)) : o && r.searchParams.set("url", o), t.email && r.searchParams.set("email", t.email), t.business && r.searchParams.set("business", "true"), t.currency && r.searchParams.set("currency", t.currency), t.price && r.searchParams.set("price", t.price.toString()), t.discountCode && r.searchParams.set("discount-code", t.discountCode), t.attributionItemSrc ? r.searchParams.set("itemSrc", t.attributionItemSrc) : n.itemSrc && r.searchParams.set("itemSrc", n.itemSrc), t.attributionPublisherContentId ? r.searchParams.set("publisherContentId", t.attributionPublisherContentId) : n.publisherContentId && r.searchParams.set("publisherContentId", n.publisherContentId), t.utmSource ? r.searchParams.set("utm_source", t.utmSource) : n.utmSource && r.searchParams.set("utm_source", n.utmSource), t.utmMedium ? r.searchParams.set("utm_medium", t.utmMedium) : n.utmMedium && r.searchParams.set("utm_medium", n.utmMedium), t.utmCampaign ? r.searchParams.set("utm_campaign", t.utmCampaign) : n.utmCampaign && r.searchParams.set("utm_campaign", n.utmCampaign), t.utmTerm ? r.searchParams.set("utm_term", t.utmTerm) : n.utmTerm && r.searchParams.set("utm_term", n.utmTerm), t.utmContent ? r.searchParams.set("utm_content", t.utmContent) : n.utmContent && r.searchParams.set("utm_content", n.utmContent),
|
|
3546
|
+
if (i ? (r.searchParams.set("sku", i), a && r.searchParams.set("po-id", a)) : o && r.searchParams.set("url", o), t.email && r.searchParams.set("email", t.email), t.business && r.searchParams.set("business", "true"), t.currency && r.searchParams.set("currency", t.currency), t.price && r.searchParams.set("price", t.price.toString()), t.discountCode && r.searchParams.set("discount-code", t.discountCode), t.attributionItemSrc ? r.searchParams.set("itemSrc", t.attributionItemSrc) : n.itemSrc && r.searchParams.set("itemSrc", n.itemSrc), t.attributionPublisherContentId ? r.searchParams.set("publisherContentId", t.attributionPublisherContentId) : n.publisherContentId && r.searchParams.set("publisherContentId", n.publisherContentId), t.utmSource ? r.searchParams.set("utm_source", t.utmSource) : n.utmSource && r.searchParams.set("utm_source", n.utmSource), t.utmMedium ? r.searchParams.set("utm_medium", t.utmMedium) : n.utmMedium && r.searchParams.set("utm_medium", n.utmMedium), t.utmCampaign ? r.searchParams.set("utm_campaign", t.utmCampaign) : n.utmCampaign && r.searchParams.set("utm_campaign", n.utmCampaign), t.utmTerm ? r.searchParams.set("utm_term", t.utmTerm) : n.utmTerm && r.searchParams.set("utm_term", n.utmTerm), t.utmContent ? r.searchParams.set("utm_content", t.utmContent) : n.utmContent && r.searchParams.set("utm_content", n.utmContent), Ji("marketing")) {
|
|
3547
3547
|
let e = [
|
|
3548
3548
|
"_ga",
|
|
3549
3549
|
"_gid",
|
|
@@ -3572,19 +3572,19 @@ function Xi(e, t, n) {
|
|
|
3572
3572
|
}
|
|
3573
3573
|
//#endregion
|
|
3574
3574
|
//#region src/controllers/index.ts
|
|
3575
|
-
|
|
3576
|
-
var
|
|
3577
|
-
function
|
|
3578
|
-
let e = sessionStorage.getItem(
|
|
3575
|
+
zn();
|
|
3576
|
+
var Qi = "sesamySignedURLs";
|
|
3577
|
+
function $i() {
|
|
3578
|
+
let e = sessionStorage.getItem(Qi);
|
|
3579
3579
|
return e ? JSON.parse(e) : [];
|
|
3580
3580
|
}
|
|
3581
|
-
function
|
|
3582
|
-
let t =
|
|
3583
|
-
t.push(e), q(`Adding signed URL: ${e}`), sessionStorage.setItem(
|
|
3581
|
+
function ea(e) {
|
|
3582
|
+
let t = $i();
|
|
3583
|
+
t.push(e), q(`Adding signed URL: ${e}`), sessionStorage.setItem(Qi, JSON.stringify(t));
|
|
3584
3584
|
}
|
|
3585
3585
|
//#endregion
|
|
3586
3586
|
//#region src/utils/removeUndefined.ts
|
|
3587
|
-
function
|
|
3587
|
+
function ta(e) {
|
|
3588
3588
|
let t = {};
|
|
3589
3589
|
return Object.keys(e).forEach((n) => {
|
|
3590
3590
|
let r = e[n];
|
|
@@ -3593,9 +3593,9 @@ function ea(e) {
|
|
|
3593
3593
|
}
|
|
3594
3594
|
//#endregion
|
|
3595
3595
|
//#region src/controllers/attribution.ts
|
|
3596
|
-
|
|
3597
|
-
var
|
|
3598
|
-
function
|
|
3596
|
+
zn();
|
|
3597
|
+
var na = "sesamyAttribution";
|
|
3598
|
+
function ra(e) {
|
|
3599
3599
|
let t = localStorage.getItem(e);
|
|
3600
3600
|
if (!t) return null;
|
|
3601
3601
|
try {
|
|
@@ -3604,7 +3604,7 @@ function na(e) {
|
|
|
3604
3604
|
return console.error(`Failed to parse ${e}`), null;
|
|
3605
3605
|
}
|
|
3606
3606
|
}
|
|
3607
|
-
function
|
|
3607
|
+
function ia(e) {
|
|
3608
3608
|
return Object.keys(e).find((e) => e.startsWith("utm_")) ? {
|
|
3609
3609
|
utmSource: void 0,
|
|
3610
3610
|
utmMedium: void 0,
|
|
@@ -3612,23 +3612,23 @@ function ra(e) {
|
|
|
3612
3612
|
...e
|
|
3613
3613
|
} : e;
|
|
3614
3614
|
}
|
|
3615
|
-
function
|
|
3616
|
-
return na
|
|
3615
|
+
function aa() {
|
|
3616
|
+
return ra(na) || {};
|
|
3617
3617
|
}
|
|
3618
|
-
function
|
|
3619
|
-
if (e === null) localStorage.removeItem(
|
|
3618
|
+
function oa(e) {
|
|
3619
|
+
if (e === null) localStorage.removeItem(na);
|
|
3620
3620
|
else {
|
|
3621
3621
|
q(`Setting attribution ${JSON.stringify(e)}`);
|
|
3622
|
-
let t =
|
|
3623
|
-
...
|
|
3624
|
-
...
|
|
3622
|
+
let t = ta({
|
|
3623
|
+
...aa() ?? {},
|
|
3624
|
+
...ia(e)
|
|
3625
3625
|
});
|
|
3626
|
-
localStorage.setItem(
|
|
3626
|
+
localStorage.setItem(na, JSON.stringify({ value: t }));
|
|
3627
3627
|
}
|
|
3628
3628
|
}
|
|
3629
3629
|
//#endregion
|
|
3630
3630
|
//#region ../../node_modules/.pnpm/@analytics+type-utils@0.6.4/node_modules/@analytics/type-utils/dist/analytics-util-types.module.js
|
|
3631
|
-
var
|
|
3631
|
+
var sa = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
|
|
3632
3632
|
(function(n, r) {
|
|
3633
3633
|
typeof e == "object" && t !== void 0 ? t.exports = function(e, t, n, r, i) {
|
|
3634
3634
|
for (t = t.split ? t.split(".") : t, r = 0; r < t.length; r++) e = e ? e[t[r]] : i;
|
|
@@ -3643,102 +3643,102 @@ var oa = /* @__PURE__ */ u((/* @__PURE__ */ s(((e, t) => {
|
|
|
3643
3643
|
return e === i ? n : e;
|
|
3644
3644
|
};
|
|
3645
3645
|
})(e);
|
|
3646
|
-
})))(), 1),
|
|
3647
|
-
|
|
3648
|
-
var
|
|
3649
|
-
|
|
3650
|
-
function
|
|
3646
|
+
})))(), 1), ca = "function", la = "string", ua = "undefined", da = "boolean", fa = "array", pa = "symbol", ma = "null", ha = function() {}, ga = "form", _a = "input", va = "button", ya = "select", ba = typeof process < "u" ? process : {};
|
|
3647
|
+
ba.env && ba.env.NODE_ENV;
|
|
3648
|
+
var Y = typeof document !== ua;
|
|
3649
|
+
Y && window.location.hostname, ba.versions != null && ba.versions.node, typeof Deno < "u" && Deno.core, typeof self == "object" && self.constructor && self.constructor.name, Y && window.name === "nodejs" || typeof navigator < "u" && navigator.userAgent !== void 0 && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
|
|
3650
|
+
function xa(e, t) {
|
|
3651
3651
|
return t.charAt(0)[e]() + t.slice(1);
|
|
3652
3652
|
}
|
|
3653
|
-
var
|
|
3654
|
-
function
|
|
3655
|
-
return
|
|
3653
|
+
var Sa = xa.bind(null, "toUpperCase"), Ca = xa.bind(null, "toLowerCase");
|
|
3654
|
+
function wa(e) {
|
|
3655
|
+
return ja(e) ? Sa(ma) : typeof e == "object" ? Ia(e) : Object.prototype.toString.call(e).slice(8, -1);
|
|
3656
3656
|
}
|
|
3657
|
-
function
|
|
3657
|
+
function Ta(e, t) {
|
|
3658
3658
|
t === void 0 && (t = !0);
|
|
3659
|
-
var n =
|
|
3660
|
-
return t ?
|
|
3659
|
+
var n = wa(e);
|
|
3660
|
+
return t ? Ca(n) : n;
|
|
3661
3661
|
}
|
|
3662
|
-
function
|
|
3662
|
+
function Ea(e, t) {
|
|
3663
3663
|
return typeof t === e;
|
|
3664
3664
|
}
|
|
3665
|
-
var
|
|
3666
|
-
|
|
3667
|
-
function Aa(e) {
|
|
3668
|
-
return e === null;
|
|
3669
|
-
}
|
|
3665
|
+
var Da = Ea.bind(null, ca), Oa = Ea.bind(null, la), ka = Ea.bind(null, ua), Aa = Ea.bind(null, da);
|
|
3666
|
+
Ea.bind(null, pa);
|
|
3670
3667
|
function ja(e) {
|
|
3671
|
-
return
|
|
3668
|
+
return e === null;
|
|
3672
3669
|
}
|
|
3673
3670
|
function Ma(e) {
|
|
3674
|
-
return
|
|
3671
|
+
return Ta(e) === "number" && !isNaN(e);
|
|
3675
3672
|
}
|
|
3676
3673
|
function Na(e) {
|
|
3677
|
-
|
|
3678
|
-
for (var t = e; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
|
|
3679
|
-
return Object.getPrototypeOf(e) === t;
|
|
3674
|
+
return Ta(e) === fa;
|
|
3680
3675
|
}
|
|
3681
3676
|
function Pa(e) {
|
|
3682
|
-
|
|
3677
|
+
if (!Fa(e)) return !1;
|
|
3678
|
+
for (var t = e; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
|
|
3679
|
+
return Object.getPrototypeOf(e) === t;
|
|
3683
3680
|
}
|
|
3684
3681
|
function Fa(e) {
|
|
3685
|
-
return
|
|
3682
|
+
return e && (typeof e == "object" || e !== null);
|
|
3686
3683
|
}
|
|
3687
3684
|
function Ia(e) {
|
|
3688
|
-
return
|
|
3685
|
+
return Da(e.constructor) ? e.constructor.name : null;
|
|
3686
|
+
}
|
|
3687
|
+
function La(e) {
|
|
3688
|
+
return e instanceof Error || Oa(e.message) && e.constructor && Ma(e.constructor.stackTraceLimit);
|
|
3689
3689
|
}
|
|
3690
|
-
function
|
|
3691
|
-
if (typeof t != "object" ||
|
|
3690
|
+
function Ra(e, t) {
|
|
3691
|
+
if (typeof t != "object" || ja(t)) return !1;
|
|
3692
3692
|
if (t instanceof e) return !0;
|
|
3693
|
-
var n =
|
|
3694
|
-
if (
|
|
3695
|
-
if (
|
|
3693
|
+
var n = Ta(new e(""));
|
|
3694
|
+
if (La(t)) for (; t;) {
|
|
3695
|
+
if (Ta(t) === n) return !0;
|
|
3696
3696
|
t = Object.getPrototypeOf(t);
|
|
3697
3697
|
}
|
|
3698
3698
|
return !1;
|
|
3699
3699
|
}
|
|
3700
|
-
|
|
3701
|
-
function
|
|
3700
|
+
Ra.bind(null, TypeError), Ra.bind(null, SyntaxError);
|
|
3701
|
+
function za(e, t) {
|
|
3702
3702
|
var n = e instanceof Element || e instanceof HTMLDocument;
|
|
3703
|
-
return n && t ?
|
|
3703
|
+
return n && t ? Ba(e, t) : n;
|
|
3704
3704
|
}
|
|
3705
|
-
function
|
|
3705
|
+
function Ba(e, t) {
|
|
3706
3706
|
return t === void 0 && (t = ""), e && e.nodeName === t.toUpperCase();
|
|
3707
3707
|
}
|
|
3708
|
-
function
|
|
3708
|
+
function Va(e) {
|
|
3709
3709
|
var t = [].slice.call(arguments, 1);
|
|
3710
3710
|
return function() {
|
|
3711
3711
|
return e.apply(void 0, [].slice.call(arguments).concat(t));
|
|
3712
3712
|
};
|
|
3713
3713
|
}
|
|
3714
|
-
|
|
3715
|
-
function
|
|
3716
|
-
return e ?
|
|
3714
|
+
Va(za, ga), Va(za, va), Va(za, _a), Va(za, ya);
|
|
3715
|
+
function Ha(e) {
|
|
3716
|
+
return e ? Na(e) ? e : [e] : [];
|
|
3717
3717
|
}
|
|
3718
3718
|
//#endregion
|
|
3719
3719
|
//#region ../../node_modules/.pnpm/analytics-utils@1.1.1_@types+dlv@1.1.5/node_modules/analytics-utils/dist/analytics-utils.module.js
|
|
3720
|
-
function
|
|
3720
|
+
function Ua(e) {
|
|
3721
3721
|
try {
|
|
3722
3722
|
return decodeURIComponent(e.replace(/\+/g, " "));
|
|
3723
3723
|
} catch {
|
|
3724
3724
|
return null;
|
|
3725
3725
|
}
|
|
3726
3726
|
}
|
|
3727
|
-
function
|
|
3728
|
-
if (
|
|
3727
|
+
function Wa() {
|
|
3728
|
+
if (Y) {
|
|
3729
3729
|
var e = navigator, t = e.languages;
|
|
3730
3730
|
return e.userLanguage || (t && t.length ? t[0] : e.language);
|
|
3731
3731
|
}
|
|
3732
3732
|
}
|
|
3733
|
-
function
|
|
3733
|
+
function Ga() {
|
|
3734
3734
|
try {
|
|
3735
3735
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3736
3736
|
} catch {}
|
|
3737
3737
|
}
|
|
3738
|
-
function
|
|
3738
|
+
function Ka(e) {
|
|
3739
3739
|
return function(e) {
|
|
3740
3740
|
for (var t, n = Object.create(null), r = /([^&=]+)=?([^&]*)/g; t = r.exec(e);) {
|
|
3741
|
-
var i =
|
|
3741
|
+
var i = Ua(t[1]), a = Ua(t[2]);
|
|
3742
3742
|
if (i) if (i.substring(i.length - 2) === "[]") {
|
|
3743
3743
|
var o = n[i = i.substring(0, i.length - 2)] || (n[i] = []);
|
|
3744
3744
|
n[i] = Array.isArray(o) ? o : [], n[i].push(a);
|
|
@@ -3746,7 +3746,7 @@ function Ga(e) {
|
|
|
3746
3746
|
}
|
|
3747
3747
|
for (var s in n) {
|
|
3748
3748
|
var c = s.split("[");
|
|
3749
|
-
c.length > 1 && (
|
|
3749
|
+
c.length > 1 && (qa(n, c.map(function(e) {
|
|
3750
3750
|
return e.replace(/[?[\]\\ ]/g, "");
|
|
3751
3751
|
}), n[s]), delete n[s]);
|
|
3752
3752
|
}
|
|
@@ -3756,10 +3756,10 @@ function Ga(e) {
|
|
|
3756
3756
|
var t = e.match(/\?(.*)/);
|
|
3757
3757
|
return t && t[1] ? t[1].split("#")[0] : "";
|
|
3758
3758
|
}
|
|
3759
|
-
return
|
|
3759
|
+
return Y && window.location.search.substring(1);
|
|
3760
3760
|
}(e));
|
|
3761
3761
|
}
|
|
3762
|
-
function
|
|
3762
|
+
function qa(e, t, n) {
|
|
3763
3763
|
for (var r = t.length - 1, i = 0; i < r; ++i) {
|
|
3764
3764
|
var a = t[i];
|
|
3765
3765
|
if (a === "__proto__" || a === "constructor") break;
|
|
@@ -3767,14 +3767,14 @@ function Ka(e, t, n) {
|
|
|
3767
3767
|
}
|
|
3768
3768
|
e[t[r]] = n;
|
|
3769
3769
|
}
|
|
3770
|
-
function
|
|
3770
|
+
function Ja() {
|
|
3771
3771
|
for (var e = "", t = 0, n = 4294967295 * Math.random() | 0; t++ < 36;) {
|
|
3772
3772
|
var r = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[t - 1], i = 15 & n;
|
|
3773
3773
|
e += r == "-" || r == "4" ? r : (r == "x" ? i : 3 & i | 8).toString(16), n = t % 8 == 0 ? 4294967295 * Math.random() | 0 : n >> 4;
|
|
3774
3774
|
}
|
|
3775
3775
|
return e;
|
|
3776
3776
|
}
|
|
3777
|
-
function
|
|
3777
|
+
function Ya(e, t) {
|
|
3778
3778
|
var n, r, i, a = null, o = 0, s = function() {
|
|
3779
3779
|
o = /* @__PURE__ */ new Date(), a = null, i = e.apply(n, r);
|
|
3780
3780
|
};
|
|
@@ -3787,59 +3787,59 @@ function Ja(e, t) {
|
|
|
3787
3787
|
}
|
|
3788
3788
|
//#endregion
|
|
3789
3789
|
//#region ../../node_modules/.pnpm/@analytics+global-storage-utils@0.1.9/node_modules/@analytics/global-storage-utils/dist/analytics-util-global-storage.module.js
|
|
3790
|
-
var
|
|
3791
|
-
function
|
|
3792
|
-
return Za
|
|
3790
|
+
var Xa = "global", Za = "__" + Xa + "__", Qa = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || void 0;
|
|
3791
|
+
function $a(e) {
|
|
3792
|
+
return Qa[Za][e];
|
|
3793
3793
|
}
|
|
3794
|
-
function
|
|
3795
|
-
return Za
|
|
3794
|
+
function eo(e, t) {
|
|
3795
|
+
return Qa[Za][e] = t;
|
|
3796
3796
|
}
|
|
3797
|
-
function
|
|
3798
|
-
delete Za
|
|
3797
|
+
function to(e) {
|
|
3798
|
+
delete Qa[Za][e];
|
|
3799
3799
|
}
|
|
3800
|
-
function
|
|
3800
|
+
function no(e, t, n) {
|
|
3801
3801
|
var r;
|
|
3802
3802
|
try {
|
|
3803
|
-
if (
|
|
3803
|
+
if (io(e)) {
|
|
3804
3804
|
var i = window[e];
|
|
3805
3805
|
r = i[t].bind(i);
|
|
3806
3806
|
}
|
|
3807
3807
|
} catch {}
|
|
3808
3808
|
return r || n;
|
|
3809
3809
|
}
|
|
3810
|
-
Za
|
|
3811
|
-
var
|
|
3812
|
-
function
|
|
3813
|
-
if (
|
|
3810
|
+
Qa[Za] || (Qa[Za] = {});
|
|
3811
|
+
var ro = {};
|
|
3812
|
+
function io(e) {
|
|
3813
|
+
if (ro[e] !== void 0) return ro[e];
|
|
3814
3814
|
try {
|
|
3815
3815
|
var t = window[e];
|
|
3816
|
-
t.setItem(
|
|
3816
|
+
t.setItem(ua, ua), t.removeItem(ua);
|
|
3817
3817
|
} catch {
|
|
3818
|
-
return
|
|
3818
|
+
return ro[e] = !1;
|
|
3819
3819
|
}
|
|
3820
|
-
return
|
|
3820
|
+
return ro[e] = !0;
|
|
3821
3821
|
}
|
|
3822
3822
|
//#endregion
|
|
3823
3823
|
//#region ../../node_modules/.pnpm/@analytics+core@0.13.2_@types+dlv@1.1.5/node_modules/@analytics/core/dist/client/core.module.js
|
|
3824
|
-
function
|
|
3825
|
-
return
|
|
3824
|
+
function X() {
|
|
3825
|
+
return X = Object.assign ? Object.assign.bind() : function(e) {
|
|
3826
3826
|
for (var t = 1; t < arguments.length; t++) {
|
|
3827
3827
|
var n = arguments[t];
|
|
3828
3828
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3829
3829
|
}
|
|
3830
3830
|
return e;
|
|
3831
|
-
},
|
|
3831
|
+
}, X.apply(null, arguments);
|
|
3832
3832
|
}
|
|
3833
|
-
var
|
|
3834
|
-
return typeof Symbol ===
|
|
3835
|
-
}(),
|
|
3836
|
-
function
|
|
3833
|
+
var ao = "function", oo = "undefined", so = "reducer", co = "@@redux/", lo = co + "INIT", uo = co + Math.random().toString(36), fo = /* @__PURE__ */ function() {
|
|
3834
|
+
return typeof Symbol === ao && Symbol.observable || "@@observable";
|
|
3835
|
+
}(), po = " != " + ao;
|
|
3836
|
+
function mo(e, t, n) {
|
|
3837
3837
|
var r;
|
|
3838
|
-
if (typeof t ===
|
|
3839
|
-
if (typeof n !==
|
|
3840
|
-
return n(
|
|
3838
|
+
if (typeof t === ao && typeof n === oo && (n = t, t = void 0), typeof n !== oo) {
|
|
3839
|
+
if (typeof n !== ao) throw Error("enhancer" + po);
|
|
3840
|
+
return n(mo)(e, t);
|
|
3841
3841
|
}
|
|
3842
|
-
if (typeof e !==
|
|
3842
|
+
if (typeof e !== ao) throw Error(so + po);
|
|
3843
3843
|
var i = e, a = t, o = [], s = o, c = !1;
|
|
3844
3844
|
function l() {
|
|
3845
3845
|
s === o && (s = o.slice());
|
|
@@ -3848,7 +3848,7 @@ function po(e, t, n) {
|
|
|
3848
3848
|
return a;
|
|
3849
3849
|
}
|
|
3850
3850
|
function d(e) {
|
|
3851
|
-
if (typeof e !==
|
|
3851
|
+
if (typeof e !== ao) throw Error("Listener" + po);
|
|
3852
3852
|
var t = !0;
|
|
3853
3853
|
return l(), s.push(e), function() {
|
|
3854
3854
|
if (t) {
|
|
@@ -3859,9 +3859,9 @@ function po(e, t, n) {
|
|
|
3859
3859
|
};
|
|
3860
3860
|
}
|
|
3861
3861
|
function f(e) {
|
|
3862
|
-
if (!
|
|
3863
|
-
if (typeof e.type ===
|
|
3864
|
-
if (c) throw Error("Dispatch in " +
|
|
3862
|
+
if (!Pa(e)) throw Error("Act != obj");
|
|
3863
|
+
if (typeof e.type === oo) throw Error("ActType " + oo);
|
|
3864
|
+
if (c) throw Error("Dispatch in " + so);
|
|
3865
3865
|
try {
|
|
3866
3866
|
c = !0, a = i(a, e);
|
|
3867
3867
|
} finally {
|
|
@@ -3870,15 +3870,15 @@ function po(e, t, n) {
|
|
|
3870
3870
|
for (var t = o = s, n = 0; n < t.length; n++) (0, t[n])();
|
|
3871
3871
|
return e;
|
|
3872
3872
|
}
|
|
3873
|
-
return f({ type:
|
|
3873
|
+
return f({ type: lo }), (r = {
|
|
3874
3874
|
dispatch: f,
|
|
3875
3875
|
subscribe: d,
|
|
3876
3876
|
getState: u,
|
|
3877
3877
|
replaceReducer: function(e) {
|
|
3878
|
-
if (typeof e !==
|
|
3879
|
-
i = e, f({ type:
|
|
3878
|
+
if (typeof e !== ao) throw Error("next " + so + po);
|
|
3879
|
+
i = e, f({ type: lo });
|
|
3880
3880
|
}
|
|
3881
|
-
})[
|
|
3881
|
+
})[fo] = function() {
|
|
3882
3882
|
var e, t = d;
|
|
3883
3883
|
return (e = { subscribe: function(e) {
|
|
3884
3884
|
if (typeof e != "object") throw TypeError("Observer != obj");
|
|
@@ -3886,16 +3886,16 @@ function po(e, t, n) {
|
|
|
3886
3886
|
e.next && e.next(u());
|
|
3887
3887
|
}
|
|
3888
3888
|
return n(), { unsubscribe: t(n) };
|
|
3889
|
-
} })[
|
|
3889
|
+
} })[fo] = function() {
|
|
3890
3890
|
return this;
|
|
3891
3891
|
}, e;
|
|
3892
3892
|
}, r;
|
|
3893
3893
|
}
|
|
3894
|
-
function
|
|
3894
|
+
function ho(e, t) {
|
|
3895
3895
|
var n = t && t.type;
|
|
3896
|
-
return "action " + (n && n.toString() || "?") +
|
|
3896
|
+
return "action " + (n && n.toString() || "?") + so + " " + e + " returns " + oo;
|
|
3897
3897
|
}
|
|
3898
|
-
function
|
|
3898
|
+
function go() {
|
|
3899
3899
|
var e = [].slice.call(arguments);
|
|
3900
3900
|
return e.length === 0 ? function(e) {
|
|
3901
3901
|
return e;
|
|
@@ -3905,7 +3905,7 @@ function ho() {
|
|
|
3905
3905
|
};
|
|
3906
3906
|
});
|
|
3907
3907
|
}
|
|
3908
|
-
function
|
|
3908
|
+
function _o() {
|
|
3909
3909
|
var e = arguments;
|
|
3910
3910
|
return function(t) {
|
|
3911
3911
|
return function(n, r, i) {
|
|
@@ -3917,16 +3917,16 @@ function go() {
|
|
|
3917
3917
|
};
|
|
3918
3918
|
return a = [].slice.call(e).map(function(e) {
|
|
3919
3919
|
return e(c);
|
|
3920
|
-
}),
|
|
3920
|
+
}), X({}, o, { dispatch: s = go.apply(void 0, a)(o.dispatch) });
|
|
3921
3921
|
};
|
|
3922
3922
|
};
|
|
3923
3923
|
}
|
|
3924
|
-
var
|
|
3924
|
+
var vo = "__anon_id", yo = "__user_id", bo = "__user_traits", xo = "analytics", So = "userId", Co = "anonymousId", wo = /* @__PURE__ */ "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".split("."), To = [
|
|
3925
3925
|
"name",
|
|
3926
3926
|
"EVENTS",
|
|
3927
3927
|
"config",
|
|
3928
3928
|
"loaded"
|
|
3929
|
-
],
|
|
3929
|
+
], Z = wo.reduce(function(e, t) {
|
|
3930
3930
|
return e[t] = t, e;
|
|
3931
3931
|
}, {
|
|
3932
3932
|
registerPluginType: function(e) {
|
|
@@ -3935,37 +3935,37 @@ var _o = "__anon_id", vo = "__user_id", yo = "__user_traits", bo = "analytics",
|
|
|
3935
3935
|
pluginReadyType: function(e) {
|
|
3936
3936
|
return "ready:" + e;
|
|
3937
3937
|
}
|
|
3938
|
-
}),
|
|
3939
|
-
function
|
|
3938
|
+
}), Eo = /^utm_/, Do = /^an_prop_/, Oo = /^an_trait_/;
|
|
3939
|
+
function ko(e) {
|
|
3940
3940
|
var t = e.storage.setItem;
|
|
3941
3941
|
return function(n) {
|
|
3942
3942
|
return function(r) {
|
|
3943
3943
|
return function(i) {
|
|
3944
|
-
if (i.type ===
|
|
3944
|
+
if (i.type === Z.bootstrap) {
|
|
3945
3945
|
var a = i.params, o = i.user, s = i.persistedUser, c = i.initialUser, l = s.userId === o.userId;
|
|
3946
|
-
s.anonymousId !== o.anonymousId && t(
|
|
3946
|
+
s.anonymousId !== o.anonymousId && t(vo, o.anonymousId), l || t(yo, o.userId), c.traits && t(bo, X({}, l && s.traits ? s.traits : {}, c.traits));
|
|
3947
3947
|
var u = Object.keys(i.params);
|
|
3948
3948
|
if (u.length) {
|
|
3949
3949
|
var d = a.an_uid, f = a.an_event, p = u.reduce(function(e, t) {
|
|
3950
|
-
if (t.match(
|
|
3951
|
-
var n = t.replace(
|
|
3950
|
+
if (t.match(Eo) || t.match(/^(d|g)clid/)) {
|
|
3951
|
+
var n = t.replace(Eo, "");
|
|
3952
3952
|
e.campaign[n === "campaign" ? "name" : n] = a[t];
|
|
3953
3953
|
}
|
|
3954
|
-
return t.match(
|
|
3954
|
+
return t.match(Do) && (e.props[t.replace(Do, "")] = a[t]), t.match(Oo) && (e.traits[t.replace(Oo, "")] = a[t]), e;
|
|
3955
3955
|
}, {
|
|
3956
3956
|
campaign: {},
|
|
3957
3957
|
props: {},
|
|
3958
3958
|
traits: {}
|
|
3959
3959
|
});
|
|
3960
|
-
n.dispatch(
|
|
3961
|
-
type:
|
|
3960
|
+
n.dispatch(X({
|
|
3961
|
+
type: Z.params,
|
|
3962
3962
|
raw: a
|
|
3963
3963
|
}, p, d ? { userId: d } : {})), d && setTimeout(function() {
|
|
3964
3964
|
return e.identify(d, p.traits);
|
|
3965
3965
|
}, 0), f && setTimeout(function() {
|
|
3966
3966
|
return e.track(f, p.props);
|
|
3967
3967
|
}, 0), Object.keys(p.campaign).length && n.dispatch({
|
|
3968
|
-
type:
|
|
3968
|
+
type: Z.campaign,
|
|
3969
3969
|
campaign: p.campaign
|
|
3970
3970
|
});
|
|
3971
3971
|
}
|
|
@@ -3975,21 +3975,21 @@ function Oo(e) {
|
|
|
3975
3975
|
};
|
|
3976
3976
|
};
|
|
3977
3977
|
}
|
|
3978
|
-
function
|
|
3978
|
+
function Ao(e) {
|
|
3979
3979
|
return function(t, n) {
|
|
3980
|
-
if (t === void 0 && (t = {}), n === void 0 && (n = {}), n.type ===
|
|
3981
|
-
if (n.key ===
|
|
3982
|
-
if (n.key ===
|
|
3980
|
+
if (t === void 0 && (t = {}), n === void 0 && (n = {}), n.type === Z.setItemEnd) {
|
|
3981
|
+
if (n.key === vo) return X({}, t, { anonymousId: n.value });
|
|
3982
|
+
if (n.key === yo) return X({}, t, { userId: n.value });
|
|
3983
3983
|
}
|
|
3984
3984
|
switch (n.type) {
|
|
3985
|
-
case
|
|
3985
|
+
case Z.identify: return Object.assign({}, t, {
|
|
3986
3986
|
userId: n.userId,
|
|
3987
|
-
traits:
|
|
3987
|
+
traits: X({}, t.traits, n.traits)
|
|
3988
3988
|
});
|
|
3989
|
-
case
|
|
3989
|
+
case Z.reset: return [
|
|
3990
|
+
yo,
|
|
3990
3991
|
vo,
|
|
3991
|
-
|
|
3992
|
-
yo
|
|
3992
|
+
bo
|
|
3993
3993
|
].forEach(function(t) {
|
|
3994
3994
|
e.removeItem(t);
|
|
3995
3995
|
}), Object.assign({}, t, {
|
|
@@ -4001,39 +4001,39 @@ function ko(e) {
|
|
|
4001
4001
|
}
|
|
4002
4002
|
};
|
|
4003
4003
|
}
|
|
4004
|
-
function
|
|
4004
|
+
function jo(e) {
|
|
4005
4005
|
return {
|
|
4006
|
-
userId: e.getItem(
|
|
4007
|
-
anonymousId: e.getItem(
|
|
4008
|
-
traits: e.getItem(
|
|
4006
|
+
userId: e.getItem(yo),
|
|
4007
|
+
anonymousId: e.getItem(vo),
|
|
4008
|
+
traits: e.getItem(bo)
|
|
4009
4009
|
};
|
|
4010
4010
|
}
|
|
4011
|
-
var
|
|
4011
|
+
var Mo = function(e) {
|
|
4012
4012
|
return "__TEMP__" + e;
|
|
4013
4013
|
};
|
|
4014
|
-
function
|
|
4014
|
+
function No(e) {
|
|
4015
4015
|
var t = e.storage, n = t.setItem, r = t.removeItem, i = t.getItem;
|
|
4016
4016
|
return function(e) {
|
|
4017
4017
|
return function(t) {
|
|
4018
4018
|
return function(a) {
|
|
4019
4019
|
var o = a.userId, s = a.traits, c = a.options;
|
|
4020
|
-
if (a.type ===
|
|
4021
|
-
vo,
|
|
4020
|
+
if (a.type === Z.reset && ([
|
|
4022
4021
|
yo,
|
|
4023
|
-
|
|
4022
|
+
bo,
|
|
4023
|
+
vo
|
|
4024
4024
|
].forEach(function(e) {
|
|
4025
4025
|
r(e);
|
|
4026
4026
|
}), [
|
|
4027
|
-
xo,
|
|
4028
4027
|
So,
|
|
4028
|
+
Co,
|
|
4029
4029
|
"traits"
|
|
4030
4030
|
].forEach(function(e) {
|
|
4031
|
-
|
|
4032
|
-
})), a.type ===
|
|
4033
|
-
i(
|
|
4034
|
-
var l = i(
|
|
4031
|
+
to(Mo(e));
|
|
4032
|
+
})), a.type === Z.identify) {
|
|
4033
|
+
i(vo) || n(vo, Ja());
|
|
4034
|
+
var l = i(yo), u = i(bo) || {};
|
|
4035
4035
|
l && l !== o && e.dispatch({
|
|
4036
|
-
type:
|
|
4036
|
+
type: Z.userIdChanged,
|
|
4037
4037
|
old: {
|
|
4038
4038
|
userId: l,
|
|
4039
4039
|
traits: u
|
|
@@ -4043,30 +4043,30 @@ function Mo(e) {
|
|
|
4043
4043
|
traits: s
|
|
4044
4044
|
},
|
|
4045
4045
|
options: c
|
|
4046
|
-
}), o && n(
|
|
4046
|
+
}), o && n(yo, o), s && n(bo, X({}, u, s));
|
|
4047
4047
|
}
|
|
4048
4048
|
return t(a);
|
|
4049
4049
|
};
|
|
4050
4050
|
};
|
|
4051
4051
|
};
|
|
4052
4052
|
}
|
|
4053
|
-
var
|
|
4054
|
-
function
|
|
4055
|
-
|
|
4053
|
+
var Po = {};
|
|
4054
|
+
function Fo(e, t) {
|
|
4055
|
+
Po[e] && Da(Po[e]) && (Po[e](t), delete Po[e]);
|
|
4056
4056
|
}
|
|
4057
|
-
function
|
|
4057
|
+
function Io(e, t, n) {
|
|
4058
4058
|
return new Promise(function(r, i) {
|
|
4059
|
-
return t() ? r(e) : n < 1 ? i(
|
|
4059
|
+
return t() ? r(e) : n < 1 ? i(X({}, e, { queue: !0 })) : new Promise(function(e) {
|
|
4060
4060
|
return setTimeout(e, 10);
|
|
4061
4061
|
}).then(function(a) {
|
|
4062
|
-
return
|
|
4062
|
+
return Io(e, t, n - 10).then(r, i);
|
|
4063
4063
|
});
|
|
4064
4064
|
});
|
|
4065
4065
|
}
|
|
4066
|
-
function
|
|
4066
|
+
function Lo(e) {
|
|
4067
4067
|
return { abort: e };
|
|
4068
4068
|
}
|
|
4069
|
-
function
|
|
4069
|
+
function Ro(e, t, n) {
|
|
4070
4070
|
var r = {}, i = t(), a = e.getState(), o = a.plugins, s = a.queue, c = a.user;
|
|
4071
4071
|
if (!a.context.offline && s && s.actions && s.actions.length) {
|
|
4072
4072
|
var l = s.actions.reduce(function(e, t, n) {
|
|
@@ -4079,9 +4079,9 @@ function Lo(e, t, n) {
|
|
|
4079
4079
|
});
|
|
4080
4080
|
l.processIndex && l.processIndex.length && (l.processIndex.forEach(function(t) {
|
|
4081
4081
|
var a = s.actions[t], l = a.plugin, u = a.payload.type, d = i[l][u];
|
|
4082
|
-
if (d &&
|
|
4082
|
+
if (d && Da(d)) {
|
|
4083
4083
|
var f, p = function(e, t) {
|
|
4084
|
-
return e === void 0 && (e = {}), t === void 0 && (t = {}), [
|
|
4084
|
+
return e === void 0 && (e = {}), t === void 0 && (t = {}), [So, Co].reduce(function(n, r) {
|
|
4085
4085
|
return e.hasOwnProperty(r) && t[r] && t[r] !== e[r] && (n[r] = t[r]), n;
|
|
4086
4086
|
}, e);
|
|
4087
4087
|
}(a.payload, c), m = r[p.meta.rid];
|
|
@@ -4089,11 +4089,11 @@ function Lo(e, t, n) {
|
|
|
4089
4089
|
payload: p,
|
|
4090
4090
|
config: o[l].config,
|
|
4091
4091
|
instance: n,
|
|
4092
|
-
abort:
|
|
4093
|
-
})) &&
|
|
4092
|
+
abort: Lo
|
|
4093
|
+
})) && Pa(f) && f.abort) return void (r[p.meta.rid] = !0);
|
|
4094
4094
|
if (!m) {
|
|
4095
4095
|
var h = u + ":" + l;
|
|
4096
|
-
e.dispatch(
|
|
4096
|
+
e.dispatch(X({}, p, {
|
|
4097
4097
|
type: h,
|
|
4098
4098
|
_: {
|
|
4099
4099
|
called: h,
|
|
@@ -4107,10 +4107,10 @@ function Lo(e, t, n) {
|
|
|
4107
4107
|
}));
|
|
4108
4108
|
}
|
|
4109
4109
|
}
|
|
4110
|
-
var
|
|
4110
|
+
var zo = function(e) {
|
|
4111
4111
|
var t = e.data, n = e.action, r = e.instance, i = e.state, a = e.allPlugins, o = e.allMatches, s = e.store, c = e.EVENTS;
|
|
4112
4112
|
try {
|
|
4113
|
-
var l = i.plugins, u = i.context, d = n.type, f = d.match(
|
|
4113
|
+
var l = i.plugins, u = i.context, d = n.type, f = d.match(Bo), p = t.exact.map(function(e) {
|
|
4114
4114
|
return e.pluginName;
|
|
4115
4115
|
});
|
|
4116
4116
|
f && (p = o.during.map(function(e) {
|
|
@@ -4120,11 +4120,11 @@ var Ro = function(e) {
|
|
|
4120
4120
|
return function(n, r, i) {
|
|
4121
4121
|
var a = r.config, o = r.name, s = o + "." + n.type;
|
|
4122
4122
|
i && (s = i.event);
|
|
4123
|
-
var c = n.type.match(
|
|
4123
|
+
var c = n.type.match(Bo) ? function(e, t, n, r, i) {
|
|
4124
4124
|
return function(a, o) {
|
|
4125
|
-
var s = r ? r.name : e, c = o &&
|
|
4126
|
-
if (r && (!(c = o &&
|
|
4127
|
-
return
|
|
4125
|
+
var s = r ? r.name : e, c = o && Yo(o) ? o : n;
|
|
4126
|
+
if (r && (!(c = o && Yo(o) ? o : [e]).includes(e) || c.length !== 1)) throw Error("Method " + t + " can only abort " + e + " plugin. " + JSON.stringify(c) + " input valid");
|
|
4127
|
+
return X({}, i, { abort: {
|
|
4128
4128
|
reason: a,
|
|
4129
4129
|
plugins: c,
|
|
4130
4130
|
caller: t,
|
|
@@ -4137,7 +4137,7 @@ var Ro = function(e) {
|
|
|
4137
4137
|
};
|
|
4138
4138
|
}(n, s);
|
|
4139
4139
|
return {
|
|
4140
|
-
payload:
|
|
4140
|
+
payload: Qo(n),
|
|
4141
4141
|
instance: e,
|
|
4142
4142
|
config: a || {},
|
|
4143
4143
|
abort: c
|
|
@@ -4156,10 +4156,10 @@ var Ro = function(e) {
|
|
|
4156
4156
|
var o = function() {
|
|
4157
4157
|
if (t.namespaced && t.namespaced[s]) return Promise.resolve(t.namespaced[s].reduce(function(e, t, n) {
|
|
4158
4158
|
return Promise.resolve(e).then(function(e) {
|
|
4159
|
-
return t.method &&
|
|
4160
|
-
var n =
|
|
4159
|
+
return t.method && Da(t.method) ? (function(e, t) {
|
|
4160
|
+
var n = Zo(e);
|
|
4161
4161
|
if (n && n.name === t) {
|
|
4162
|
-
var r =
|
|
4162
|
+
var r = Zo(n.method);
|
|
4163
4163
|
throw Error([
|
|
4164
4164
|
t + " plugin is calling method " + e,
|
|
4165
4165
|
"Plugins cant call self",
|
|
@@ -4170,18 +4170,18 @@ var Ro = function(e) {
|
|
|
4170
4170
|
payload: e,
|
|
4171
4171
|
instance: r,
|
|
4172
4172
|
abort: (n = e, i = s, o = t.pluginName, function(e, t) {
|
|
4173
|
-
return
|
|
4173
|
+
return X({}, n, { abort: {
|
|
4174
4174
|
reason: e,
|
|
4175
4175
|
plugins: t || [i],
|
|
4176
4176
|
caller: d,
|
|
4177
4177
|
from: o || i
|
|
4178
4178
|
} });
|
|
4179
4179
|
}),
|
|
4180
|
-
config:
|
|
4180
|
+
config: Wo(t.pluginName, l, a),
|
|
4181
4181
|
plugins: l
|
|
4182
4182
|
})).then(function(t) {
|
|
4183
|
-
var n =
|
|
4184
|
-
return Promise.resolve(
|
|
4183
|
+
var n = Pa(t) ? t : {};
|
|
4184
|
+
return Promise.resolve(X({}, e, n));
|
|
4185
4185
|
})) : e;
|
|
4186
4186
|
var n, i, o;
|
|
4187
4187
|
});
|
|
@@ -4198,14 +4198,14 @@ var Ro = function(e) {
|
|
|
4198
4198
|
var c = t.exact.length === o + 1, u = i.pluginName, p = a[u];
|
|
4199
4199
|
return Promise.resolve(n).then(function(t) {
|
|
4200
4200
|
var n = e[u] ? e[u] : {};
|
|
4201
|
-
if (f && (n = t),
|
|
4201
|
+
if (f && (n = t), qo(n, u)) return Uo({
|
|
4202
4202
|
data: n,
|
|
4203
4203
|
method: d,
|
|
4204
4204
|
instance: r,
|
|
4205
4205
|
pluginName: u,
|
|
4206
4206
|
store: s
|
|
4207
4207
|
}), Promise.resolve(t);
|
|
4208
|
-
if (
|
|
4208
|
+
if (qo(t, u)) return c && Uo({
|
|
4209
4209
|
data: t,
|
|
4210
4210
|
method: d,
|
|
4211
4211
|
instance: r,
|
|
@@ -4225,11 +4225,11 @@ var Ro = function(e) {
|
|
|
4225
4225
|
abort: i.abort,
|
|
4226
4226
|
payload: n,
|
|
4227
4227
|
instance: r,
|
|
4228
|
-
config:
|
|
4228
|
+
config: Wo(u, l, a),
|
|
4229
4229
|
plugins: l
|
|
4230
4230
|
})).then(function(i) {
|
|
4231
|
-
var a =
|
|
4232
|
-
if (
|
|
4231
|
+
var a = Pa(i) ? i : {}, o = X({}, t, a), c = e[u];
|
|
4232
|
+
if (qo(c, u)) Uo({
|
|
4233
4233
|
data: c,
|
|
4234
4234
|
method: d,
|
|
4235
4235
|
instance: r,
|
|
@@ -4238,7 +4238,7 @@ var Ro = function(e) {
|
|
|
4238
4238
|
});
|
|
4239
4239
|
else {
|
|
4240
4240
|
var l = d + ":" + u;
|
|
4241
|
-
(l.match(/:/g) || []).length < 2 && !d.match(
|
|
4241
|
+
(l.match(/:/g) || []).length < 2 && !d.match(Vo) && !d.match(Ho) && r.dispatch(X({}, f ? o : n, {
|
|
4242
4242
|
type: l,
|
|
4243
4243
|
_: {
|
|
4244
4244
|
called: l,
|
|
@@ -4253,14 +4253,14 @@ var Ro = function(e) {
|
|
|
4253
4253
|
return Promise.reject(e);
|
|
4254
4254
|
}
|
|
4255
4255
|
}, Promise.resolve(n))).then(function(e) {
|
|
4256
|
-
if (!(d.match(
|
|
4256
|
+
if (!(d.match(Bo) || d.match(/^registerPlugin/) || d.match(Ho) || d.match(Vo) || d.match(/^params/) || d.match(/^userIdChanged/))) {
|
|
4257
4257
|
if (c.plugins.includes(d), e._ && e._.originalAction === d) return e;
|
|
4258
|
-
var n =
|
|
4258
|
+
var n = X({}, e, { _: {
|
|
4259
4259
|
originalAction: e.type,
|
|
4260
4260
|
called: e.type,
|
|
4261
4261
|
from: "engineEnd"
|
|
4262
4262
|
} });
|
|
4263
|
-
|
|
4263
|
+
Jo(e, t.exact.length) && !d.match(/End$/) && (n = X({}, n, { type: e.type + "Aborted" })), s.dispatch(n);
|
|
4264
4264
|
}
|
|
4265
4265
|
return e;
|
|
4266
4266
|
});
|
|
@@ -4268,10 +4268,10 @@ var Ro = function(e) {
|
|
|
4268
4268
|
} catch (e) {
|
|
4269
4269
|
return Promise.reject(e);
|
|
4270
4270
|
}
|
|
4271
|
-
},
|
|
4272
|
-
function
|
|
4271
|
+
}, Bo = /Start$/, Vo = /^bootstrap/, Ho = /^ready/;
|
|
4272
|
+
function Uo(e) {
|
|
4273
4273
|
var t = e.pluginName, n = e.method + "Aborted" + (t ? ":" + t : "");
|
|
4274
|
-
e.store.dispatch(
|
|
4274
|
+
e.store.dispatch(X({}, e.data, {
|
|
4275
4275
|
type: n,
|
|
4276
4276
|
_: {
|
|
4277
4277
|
called: n,
|
|
@@ -4279,11 +4279,11 @@ function Ho(e) {
|
|
|
4279
4279
|
}
|
|
4280
4280
|
}));
|
|
4281
4281
|
}
|
|
4282
|
-
function
|
|
4282
|
+
function Wo(e, t, n) {
|
|
4283
4283
|
var r = t[e] || n[e];
|
|
4284
4284
|
return r && r.config ? r.config : {};
|
|
4285
4285
|
}
|
|
4286
|
-
function
|
|
4286
|
+
function Go(e, t) {
|
|
4287
4287
|
return t.reduce(function(t, n) {
|
|
4288
4288
|
return n[e] ? t.concat({
|
|
4289
4289
|
methodName: e,
|
|
@@ -4292,44 +4292,44 @@ function Wo(e, t) {
|
|
|
4292
4292
|
}) : t;
|
|
4293
4293
|
}, []);
|
|
4294
4294
|
}
|
|
4295
|
-
function
|
|
4296
|
-
var n = e.replace(
|
|
4295
|
+
function Ko(e, t) {
|
|
4296
|
+
var n = e.replace(Bo, ""), r = t ? ":" + t : "";
|
|
4297
4297
|
return [
|
|
4298
4298
|
"" + e + r,
|
|
4299
4299
|
"" + n + r,
|
|
4300
4300
|
n + "End" + r
|
|
4301
4301
|
];
|
|
4302
4302
|
}
|
|
4303
|
-
function
|
|
4303
|
+
function qo(e, t) {
|
|
4304
4304
|
var n = e.abort;
|
|
4305
|
-
return !!n && (!0 === n ||
|
|
4305
|
+
return !!n && (!0 === n || Xo(n, t) || n && Xo(n.plugins, t));
|
|
4306
4306
|
}
|
|
4307
|
-
function
|
|
4307
|
+
function Jo(e, t) {
|
|
4308
4308
|
var n = e.abort;
|
|
4309
4309
|
if (!n) return !1;
|
|
4310
|
-
if (!0 === n ||
|
|
4310
|
+
if (!0 === n || Oa(n)) return !0;
|
|
4311
4311
|
var r = n.plugins;
|
|
4312
|
-
return
|
|
4312
|
+
return Yo(n) && n.length === t || Yo(r) && r.length === t;
|
|
4313
4313
|
}
|
|
4314
|
-
function
|
|
4314
|
+
function Yo(e) {
|
|
4315
4315
|
return Array.isArray(e);
|
|
4316
4316
|
}
|
|
4317
|
-
function
|
|
4318
|
-
return !(!e || !
|
|
4317
|
+
function Xo(e, t) {
|
|
4318
|
+
return !(!e || !Yo(e)) && e.includes(t);
|
|
4319
4319
|
}
|
|
4320
|
-
function
|
|
4320
|
+
function Zo(e) {
|
|
4321
4321
|
var t = e.match(/(.*):(.*)/);
|
|
4322
4322
|
return !!t && {
|
|
4323
4323
|
method: t[1],
|
|
4324
4324
|
name: t[2]
|
|
4325
4325
|
};
|
|
4326
4326
|
}
|
|
4327
|
-
function
|
|
4327
|
+
function Qo(e) {
|
|
4328
4328
|
return Object.keys(e).reduce(function(t, n) {
|
|
4329
|
-
return n === "type" || (t[n] =
|
|
4329
|
+
return n === "type" || (t[n] = Pa(e[n]) ? Object.assign({}, e[n]) : e[n]), t;
|
|
4330
4330
|
}, {});
|
|
4331
4331
|
}
|
|
4332
|
-
function
|
|
4332
|
+
function $o(e, t, n) {
|
|
4333
4333
|
var r = {};
|
|
4334
4334
|
return function(i) {
|
|
4335
4335
|
return function(a) {
|
|
@@ -4339,29 +4339,29 @@ function Qo(e, t, n) {
|
|
|
4339
4339
|
return s ? e : a(d);
|
|
4340
4340
|
}, l = o.type, u = o.plugins, d = o;
|
|
4341
4341
|
if (o.abort) return Promise.resolve(a(o));
|
|
4342
|
-
if (l ===
|
|
4343
|
-
type:
|
|
4342
|
+
if (l === Z.enablePlugin && i.dispatch({
|
|
4343
|
+
type: Z.initializeStart,
|
|
4344
4344
|
plugins: u,
|
|
4345
4345
|
disabled: [],
|
|
4346
4346
|
fromEnable: !0,
|
|
4347
4347
|
meta: o.meta
|
|
4348
|
-
}), l ===
|
|
4349
|
-
return
|
|
4350
|
-
}, 0), l ===
|
|
4348
|
+
}), l === Z.disablePlugin && setTimeout(function() {
|
|
4349
|
+
return Fo(o.meta.rid, { payload: o });
|
|
4350
|
+
}, 0), l === Z.initializeEnd) {
|
|
4351
4351
|
var f = t(), p = Object.keys(f), m = p.filter(function(e) {
|
|
4352
4352
|
return u.includes(e);
|
|
4353
4353
|
}).map(function(e) {
|
|
4354
4354
|
return f[e];
|
|
4355
4355
|
}), h = [], g = [], _ = o.disabled, v = m.map(function(e) {
|
|
4356
4356
|
var t = e.loaded, n = e.name, a = e.config;
|
|
4357
|
-
return
|
|
4357
|
+
return Io(e, function() {
|
|
4358
4358
|
return t({ config: a });
|
|
4359
4359
|
}, 1e4).then(function(t) {
|
|
4360
4360
|
return r[n] || (i.dispatch({
|
|
4361
|
-
type:
|
|
4361
|
+
type: Z.pluginReadyType(n),
|
|
4362
4362
|
name: n,
|
|
4363
4363
|
events: Object.keys(e).filter(function(e) {
|
|
4364
|
-
return !
|
|
4364
|
+
return !To.includes(e);
|
|
4365
4365
|
})
|
|
4366
4366
|
}), r[n] = !0), h = h.concat(n), e;
|
|
4367
4367
|
}).catch(function(e) {
|
|
@@ -4376,24 +4376,24 @@ function Qo(e, t, n) {
|
|
|
4376
4376
|
disabled: _
|
|
4377
4377
|
};
|
|
4378
4378
|
setTimeout(function() {
|
|
4379
|
-
p.length === v.length + _.length && i.dispatch(
|
|
4379
|
+
p.length === v.length + _.length && i.dispatch(X({}, { type: Z.ready }, t));
|
|
4380
4380
|
}, 0);
|
|
4381
4381
|
});
|
|
4382
4382
|
}
|
|
4383
4383
|
var y = function() {
|
|
4384
|
-
if (l !==
|
|
4385
|
-
return
|
|
4384
|
+
if (l !== Z.bootstrap) return /^ready:([^:]*)$/.test(l) && setTimeout(function() {
|
|
4385
|
+
return Ro(i, t, e);
|
|
4386
4386
|
}, 0), Promise.resolve(function(e, t, n, r, i) {
|
|
4387
4387
|
try {
|
|
4388
|
-
var a =
|
|
4388
|
+
var a = Da(t) ? t() : t, o = e.type, s = o.replace(Bo, "");
|
|
4389
4389
|
if (e._ && e._.called) return Promise.resolve(e);
|
|
4390
4390
|
var c = n.getState(), l = (f = a, (p = c.plugins) === void 0 && (p = {}), (m = e.options) === void 0 && (m = {}), Object.keys(f).filter(function(e) {
|
|
4391
4391
|
var t = m.plugins || {};
|
|
4392
|
-
return
|
|
4392
|
+
return Aa(t[e]) ? t[e] : !1 !== t.all && (!p[e] || !1 !== p[e].enabled);
|
|
4393
4393
|
}).map(function(e) {
|
|
4394
4394
|
return f[e];
|
|
4395
4395
|
}));
|
|
4396
|
-
o ===
|
|
4396
|
+
o === Z.initializeStart && e.fromEnable && (l = Object.keys(c.plugins).filter(function(t) {
|
|
4397
4397
|
var n = c.plugins[t];
|
|
4398
4398
|
return e.plugins.includes(t) && !n.initialized;
|
|
4399
4399
|
}).map(function(e) {
|
|
@@ -4402,12 +4402,12 @@ function Qo(e, t, n) {
|
|
|
4402
4402
|
var u = l.map(function(e) {
|
|
4403
4403
|
return e.name;
|
|
4404
4404
|
}), d = function(e, t) {
|
|
4405
|
-
var n =
|
|
4406
|
-
return
|
|
4405
|
+
var n = Ko(e).map(function(e) {
|
|
4406
|
+
return Go(e, t);
|
|
4407
4407
|
});
|
|
4408
4408
|
return t.reduce(function(n, r) {
|
|
4409
|
-
var i = r.name, a =
|
|
4410
|
-
return
|
|
4409
|
+
var i = r.name, a = Ko(e, i).map(function(e) {
|
|
4410
|
+
return Go(e, t);
|
|
4411
4411
|
}), o = a[0], s = a[1], c = a[2];
|
|
4412
4412
|
return o.length && (n.beforeNS[i] = o), s.length && (n.duringNS[i] = s), c.length && (n.afterNS[i] = c), n;
|
|
4413
4413
|
}, {
|
|
@@ -4419,7 +4419,7 @@ function Qo(e, t, n) {
|
|
|
4419
4419
|
afterNS: {}
|
|
4420
4420
|
});
|
|
4421
4421
|
}(o, l);
|
|
4422
|
-
return Promise.resolve(
|
|
4422
|
+
return Promise.resolve(zo({
|
|
4423
4423
|
action: e,
|
|
4424
4424
|
data: {
|
|
4425
4425
|
exact: d.before,
|
|
@@ -4434,8 +4434,8 @@ function Qo(e, t, n) {
|
|
|
4434
4434
|
})).then(function(e) {
|
|
4435
4435
|
function t() {
|
|
4436
4436
|
var t = function() {
|
|
4437
|
-
if (o.match(
|
|
4438
|
-
action:
|
|
4437
|
+
if (o.match(Bo)) return Promise.resolve(zo({
|
|
4438
|
+
action: X({}, l, { type: s + "End" }),
|
|
4439
4439
|
data: {
|
|
4440
4440
|
exact: d.after,
|
|
4441
4441
|
namespaced: d.afterNS
|
|
@@ -4447,17 +4447,17 @@ function Qo(e, t, n) {
|
|
|
4447
4447
|
store: r,
|
|
4448
4448
|
EVENTS: i
|
|
4449
4449
|
})).then(function(e) {
|
|
4450
|
-
e.meta && e.meta.hasCallback &&
|
|
4450
|
+
e.meta && e.meta.hasCallback && Fo(e.meta.rid, { payload: e });
|
|
4451
4451
|
});
|
|
4452
4452
|
}();
|
|
4453
4453
|
return t && t.then ? t.then(function() {
|
|
4454
4454
|
return e;
|
|
4455
4455
|
}) : e;
|
|
4456
4456
|
}
|
|
4457
|
-
if (
|
|
4457
|
+
if (Jo(e, u.length)) return e;
|
|
4458
4458
|
var l, f = function() {
|
|
4459
|
-
if (o !== s) return Promise.resolve(
|
|
4460
|
-
action:
|
|
4459
|
+
if (o !== s) return Promise.resolve(zo({
|
|
4460
|
+
action: X({}, e, { type: s }),
|
|
4461
4461
|
data: {
|
|
4462
4462
|
exact: d.during,
|
|
4463
4463
|
namespaced: d.duringNS
|
|
@@ -4492,21 +4492,21 @@ function Qo(e, t, n) {
|
|
|
4492
4492
|
};
|
|
4493
4493
|
};
|
|
4494
4494
|
}
|
|
4495
|
-
function
|
|
4495
|
+
function es(e) {
|
|
4496
4496
|
return function(t) {
|
|
4497
4497
|
return function(t) {
|
|
4498
4498
|
return function(n) {
|
|
4499
4499
|
var r = n.type, i = n.key, a = n.value, o = n.options;
|
|
4500
|
-
if (r ===
|
|
4500
|
+
if (r === Z.setItem || r === Z.removeItem) {
|
|
4501
4501
|
if (n.abort) return t(n);
|
|
4502
|
-
r ===
|
|
4502
|
+
r === Z.setItem ? e.setItem(i, a, o) : e.removeItem(i, o);
|
|
4503
4503
|
}
|
|
4504
4504
|
return t(n);
|
|
4505
4505
|
};
|
|
4506
4506
|
};
|
|
4507
4507
|
};
|
|
4508
4508
|
}
|
|
4509
|
-
var
|
|
4509
|
+
var ts = function() {
|
|
4510
4510
|
var e = this;
|
|
4511
4511
|
this.before = [], this.after = [], this.addMiddleware = function(t, n) {
|
|
4512
4512
|
e[n] = e[n].concat(t);
|
|
@@ -4527,19 +4527,19 @@ var es = function() {
|
|
|
4527
4527
|
}, o = e[t].map(function(e) {
|
|
4528
4528
|
return e(a);
|
|
4529
4529
|
});
|
|
4530
|
-
return
|
|
4530
|
+
return go.apply(void 0, o)(r)(i);
|
|
4531
4531
|
};
|
|
4532
4532
|
};
|
|
4533
4533
|
};
|
|
4534
4534
|
};
|
|
4535
4535
|
};
|
|
4536
|
-
function
|
|
4536
|
+
function ns(e) {
|
|
4537
4537
|
return function(t, n) {
|
|
4538
4538
|
t === void 0 && (t = {});
|
|
4539
4539
|
var r = {};
|
|
4540
4540
|
if (n.type === "initialize:aborted") return t;
|
|
4541
4541
|
if (/^registerPlugin:([^:]*)$/.test(n.type)) {
|
|
4542
|
-
var i =
|
|
4542
|
+
var i = rs(n.type, "registerPlugin"), a = e()[i];
|
|
4543
4543
|
if (!a || !i) return t;
|
|
4544
4544
|
var o = n.enabled, s = a.config;
|
|
4545
4545
|
return r[i] = {
|
|
@@ -4547,203 +4547,203 @@ function ts(e) {
|
|
|
4547
4547
|
initialized: !!o && !a.initialize,
|
|
4548
4548
|
loaded: !!o && !!a.loaded({ config: s }),
|
|
4549
4549
|
config: s
|
|
4550
|
-
},
|
|
4550
|
+
}, X({}, t, r);
|
|
4551
4551
|
}
|
|
4552
4552
|
if (/^initialize:([^:]*)$/.test(n.type)) {
|
|
4553
|
-
var c =
|
|
4554
|
-
return l && c ? (r[c] =
|
|
4553
|
+
var c = rs(n.type, Z.initialize), l = e()[c];
|
|
4554
|
+
return l && c ? (r[c] = X({}, t[c], {
|
|
4555
4555
|
initialized: !0,
|
|
4556
4556
|
loaded: !!l.loaded({ config: l.config })
|
|
4557
|
-
}),
|
|
4557
|
+
}), X({}, t, r)) : t;
|
|
4558
4558
|
}
|
|
4559
|
-
if (/^ready:([^:]*)$/.test(n.type)) return r[n.name] =
|
|
4559
|
+
if (/^ready:([^:]*)$/.test(n.type)) return r[n.name] = X({}, t[n.name], { loaded: !0 }), X({}, t, r);
|
|
4560
4560
|
switch (n.type) {
|
|
4561
|
-
case
|
|
4562
|
-
case
|
|
4561
|
+
case Z.disablePlugin: return X({}, t, is(n.plugins, !1, t));
|
|
4562
|
+
case Z.enablePlugin: return X({}, t, is(n.plugins, !0, t));
|
|
4563
4563
|
default: return t;
|
|
4564
4564
|
}
|
|
4565
4565
|
};
|
|
4566
4566
|
}
|
|
4567
|
-
function
|
|
4567
|
+
function rs(e, t) {
|
|
4568
4568
|
return e.substring(t.length + 1, e.length);
|
|
4569
4569
|
}
|
|
4570
|
-
function
|
|
4570
|
+
function is(e, t, n) {
|
|
4571
4571
|
return e.reduce(function(e, r) {
|
|
4572
|
-
return e[r] =
|
|
4572
|
+
return e[r] = X({}, n[r], { enabled: t }), e;
|
|
4573
4573
|
}, n);
|
|
4574
4574
|
}
|
|
4575
|
-
function
|
|
4575
|
+
function as(e) {
|
|
4576
4576
|
try {
|
|
4577
4577
|
return JSON.parse(JSON.stringify(e));
|
|
4578
4578
|
} catch {}
|
|
4579
4579
|
return e;
|
|
4580
4580
|
}
|
|
4581
|
-
var
|
|
4581
|
+
var os = {
|
|
4582
4582
|
last: {},
|
|
4583
4583
|
history: []
|
|
4584
4584
|
};
|
|
4585
|
-
function
|
|
4586
|
-
e === void 0 && (e =
|
|
4585
|
+
function ss(e, t) {
|
|
4586
|
+
e === void 0 && (e = os);
|
|
4587
4587
|
var n = t.options, r = t.meta;
|
|
4588
|
-
if (t.type ===
|
|
4589
|
-
var i =
|
|
4588
|
+
if (t.type === Z.track) {
|
|
4589
|
+
var i = as(X({
|
|
4590
4590
|
event: t.event,
|
|
4591
4591
|
properties: t.properties
|
|
4592
4592
|
}, Object.keys(n).length && { options: n }, { meta: r }));
|
|
4593
|
-
return
|
|
4593
|
+
return X({}, e, {
|
|
4594
4594
|
last: i,
|
|
4595
4595
|
history: e.history.concat(i)
|
|
4596
4596
|
});
|
|
4597
4597
|
}
|
|
4598
4598
|
return e;
|
|
4599
4599
|
}
|
|
4600
|
-
var
|
|
4601
|
-
function
|
|
4602
|
-
e === void 0 && (e =
|
|
4600
|
+
var cs = { actions: [] };
|
|
4601
|
+
function ls(e, t) {
|
|
4602
|
+
e === void 0 && (e = cs);
|
|
4603
4603
|
var n = t.payload;
|
|
4604
4604
|
switch (t.type) {
|
|
4605
4605
|
case "queue":
|
|
4606
4606
|
var r;
|
|
4607
|
-
return r = n && n.type && n.type ===
|
|
4607
|
+
return r = n && n.type && n.type === Z.identify ? [t].concat(e.actions) : e.actions.concat(t), X({}, e, { actions: r });
|
|
4608
4608
|
case "dequeue": return [];
|
|
4609
4609
|
default: return e;
|
|
4610
4610
|
}
|
|
4611
4611
|
}
|
|
4612
|
-
var
|
|
4613
|
-
function
|
|
4612
|
+
var us = /#.*$/;
|
|
4613
|
+
function ds(e) {
|
|
4614
4614
|
var t = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);
|
|
4615
|
-
return "/" + (t && t[3] ? t[3].split("?")[0].replace(
|
|
4615
|
+
return "/" + (t && t[3] ? t[3].split("?")[0].replace(us, "") : "");
|
|
4616
4616
|
}
|
|
4617
|
-
var
|
|
4618
|
-
if (e === void 0 && (e = {}), !
|
|
4617
|
+
var fs, ps, ms, hs, gs = function(e) {
|
|
4618
|
+
if (e === void 0 && (e = {}), !Y) return e;
|
|
4619
4619
|
var t = document, n = t.title, r = t.referrer, i = window, a = i.location, o = i.innerWidth, s = i.innerHeight, c = a.hash, l = a.search, u = function(e) {
|
|
4620
4620
|
var t = function() {
|
|
4621
|
-
if (
|
|
4621
|
+
if (Y) {
|
|
4622
4622
|
for (var e, t = document.getElementsByTagName("link"), n = 0; e = t[n]; n++) if (e.getAttribute("rel") === "canonical") return e.getAttribute("href");
|
|
4623
4623
|
}
|
|
4624
4624
|
}();
|
|
4625
|
-
return t ? t.match(/\?/) ? t : t + e : window.location.href.replace(
|
|
4625
|
+
return t ? t.match(/\?/) ? t : t + e : window.location.href.replace(us, "");
|
|
4626
4626
|
}(l), d = {
|
|
4627
4627
|
title: n,
|
|
4628
4628
|
url: u,
|
|
4629
|
-
path:
|
|
4629
|
+
path: ds(u),
|
|
4630
4630
|
hash: c,
|
|
4631
4631
|
search: l,
|
|
4632
4632
|
width: o,
|
|
4633
4633
|
height: s
|
|
4634
4634
|
};
|
|
4635
|
-
return r && r !== "" && (d.referrer = r),
|
|
4636
|
-
},
|
|
4635
|
+
return r && r !== "" && (d.referrer = r), X({}, d, e);
|
|
4636
|
+
}, _s = {
|
|
4637
4637
|
last: {},
|
|
4638
4638
|
history: []
|
|
4639
4639
|
};
|
|
4640
|
-
function
|
|
4641
|
-
e === void 0 && (e =
|
|
4640
|
+
function vs(e, t) {
|
|
4641
|
+
e === void 0 && (e = _s);
|
|
4642
4642
|
var n = t.options;
|
|
4643
|
-
if (t.type ===
|
|
4644
|
-
var r =
|
|
4643
|
+
if (t.type === Z.page) {
|
|
4644
|
+
var r = as(X({
|
|
4645
4645
|
properties: t.properties,
|
|
4646
4646
|
meta: t.meta
|
|
4647
4647
|
}, Object.keys(n).length && { options: n }));
|
|
4648
|
-
return
|
|
4648
|
+
return X({}, e, {
|
|
4649
4649
|
last: r,
|
|
4650
4650
|
history: e.history.concat(r)
|
|
4651
4651
|
});
|
|
4652
4652
|
}
|
|
4653
4653
|
return e;
|
|
4654
4654
|
}
|
|
4655
|
-
|
|
4656
|
-
if (!
|
|
4655
|
+
fs = function() {
|
|
4656
|
+
if (!Y) return !1;
|
|
4657
4657
|
var e = navigator.appVersion;
|
|
4658
4658
|
return ~e.indexOf("Win") ? "Windows" : ~e.indexOf("Mac") ? "MacOS" : ~e.indexOf("X11") ? "UNIX" : ~e.indexOf("Linux") ? "Linux" : "Unknown OS";
|
|
4659
|
-
}(),
|
|
4660
|
-
var
|
|
4659
|
+
}(), ps = Y ? document.referrer : null, ms = Wa(), hs = Ga();
|
|
4660
|
+
var ys = {
|
|
4661
4661
|
initialized: !1,
|
|
4662
|
-
sessionId:
|
|
4662
|
+
sessionId: Ja(),
|
|
4663
4663
|
app: null,
|
|
4664
4664
|
version: null,
|
|
4665
4665
|
debug: !1,
|
|
4666
|
-
offline: !!
|
|
4667
|
-
os: { name:
|
|
4668
|
-
userAgent:
|
|
4666
|
+
offline: !!Y && !navigator.onLine,
|
|
4667
|
+
os: { name: fs },
|
|
4668
|
+
userAgent: Y ? navigator.userAgent : "node",
|
|
4669
4669
|
library: {
|
|
4670
|
-
name:
|
|
4670
|
+
name: xo,
|
|
4671
4671
|
version: "0.13.1"
|
|
4672
4672
|
},
|
|
4673
|
-
timezone:
|
|
4674
|
-
locale:
|
|
4673
|
+
timezone: hs,
|
|
4674
|
+
locale: ms,
|
|
4675
4675
|
campaign: {},
|
|
4676
|
-
referrer:
|
|
4676
|
+
referrer: ps
|
|
4677
4677
|
};
|
|
4678
|
-
function
|
|
4679
|
-
e === void 0 && (e =
|
|
4678
|
+
function bs(e, t) {
|
|
4679
|
+
e === void 0 && (e = ys);
|
|
4680
4680
|
var n = e.initialized, r = t.campaign;
|
|
4681
4681
|
switch (t.type) {
|
|
4682
|
-
case
|
|
4683
|
-
case
|
|
4684
|
-
case
|
|
4685
|
-
default: return n ? e :
|
|
4682
|
+
case Z.campaign: return X({}, e, { campaign: r });
|
|
4683
|
+
case Z.offline: return X({}, e, { offline: !0 });
|
|
4684
|
+
case Z.online: return X({}, e, { offline: !1 });
|
|
4685
|
+
default: return n ? e : X({}, ys, e, { initialized: !0 });
|
|
4686
4686
|
}
|
|
4687
4687
|
}
|
|
4688
|
-
var
|
|
4688
|
+
var xs = [
|
|
4689
4689
|
"plugins",
|
|
4690
4690
|
"reducers",
|
|
4691
4691
|
"storage"
|
|
4692
4692
|
];
|
|
4693
|
-
function
|
|
4694
|
-
if (
|
|
4693
|
+
function Ss(e, t, n) {
|
|
4694
|
+
if (Y) {
|
|
4695
4695
|
var r = window[(n ? "add" : "remove") + "EventListener"];
|
|
4696
4696
|
e.split(" ").forEach(function(e) {
|
|
4697
4697
|
r(e, t);
|
|
4698
4698
|
});
|
|
4699
4699
|
}
|
|
4700
4700
|
}
|
|
4701
|
-
function
|
|
4702
|
-
var t =
|
|
4701
|
+
function Cs(e) {
|
|
4702
|
+
var t = Ss.bind(null, "online offline", function(t) {
|
|
4703
4703
|
return Promise.resolve(!navigator.onLine).then(e);
|
|
4704
4704
|
});
|
|
4705
4705
|
return t(!0), function(e) {
|
|
4706
4706
|
return t(!1);
|
|
4707
4707
|
};
|
|
4708
4708
|
}
|
|
4709
|
-
function
|
|
4710
|
-
return
|
|
4709
|
+
function ws() {
|
|
4710
|
+
return eo(xo, []), function(e) {
|
|
4711
4711
|
return function(t, n, r) {
|
|
4712
4712
|
var i = e(t, n, r), a = i.dispatch;
|
|
4713
4713
|
return Object.assign(i, { dispatch: function(e) {
|
|
4714
|
-
return Za
|
|
4714
|
+
return Qa[Za][xo].push(e.action || e), a(e);
|
|
4715
4715
|
} });
|
|
4716
4716
|
};
|
|
4717
4717
|
};
|
|
4718
4718
|
}
|
|
4719
|
-
function
|
|
4719
|
+
function Ts(e) {
|
|
4720
4720
|
return function() {
|
|
4721
|
-
return
|
|
4721
|
+
return go(go.apply(null, arguments), ws());
|
|
4722
4722
|
};
|
|
4723
4723
|
}
|
|
4724
|
-
function
|
|
4725
|
-
return e ?
|
|
4724
|
+
function Es(e) {
|
|
4725
|
+
return e ? Na(e) ? e : [e] : [];
|
|
4726
4726
|
}
|
|
4727
|
-
function
|
|
4727
|
+
function Ds(e, t, n) {
|
|
4728
4728
|
e === void 0 && (e = {});
|
|
4729
|
-
var r, i, a =
|
|
4730
|
-
return t && (
|
|
4731
|
-
for (var t, n = e || Array.prototype.slice.call(arguments), r = 0; r < n.length; r++) if (
|
|
4729
|
+
var r, i, a = Ja();
|
|
4730
|
+
return t && (Po[a] = (r = t, i = function(e) {
|
|
4731
|
+
for (var t, n = e || Array.prototype.slice.call(arguments), r = 0; r < n.length; r++) if (Da(n[r])) {
|
|
4732
4732
|
t = n[r];
|
|
4733
4733
|
break;
|
|
4734
4734
|
}
|
|
4735
4735
|
return t;
|
|
4736
4736
|
}(n), function(e) {
|
|
4737
4737
|
i && i(e), r(e);
|
|
4738
|
-
})),
|
|
4738
|
+
})), X({}, e, {
|
|
4739
4739
|
rid: a,
|
|
4740
4740
|
ts: (/* @__PURE__ */ new Date()).getTime()
|
|
4741
4741
|
}, t ? { hasCallback: !0 } : {});
|
|
4742
4742
|
}
|
|
4743
|
-
function
|
|
4743
|
+
function Os(e) {
|
|
4744
4744
|
e === void 0 && (e = {});
|
|
4745
4745
|
var t = e.reducers || {}, n = e.initialUser || {}, r = (e.plugins || []).reduce(function(e, t) {
|
|
4746
|
-
if (
|
|
4746
|
+
if (Da(t)) return e.middlewares = e.middlewares.concat(t), e;
|
|
4747
4747
|
if (t.NAMESPACE && (t.name = t.NAMESPACE), !t.name) throw Error("https://lytics.dev/errors/1");
|
|
4748
4748
|
t.config ||= {};
|
|
4749
4749
|
var n = t.EVENTS ? Object.keys(t.EVENTS).map(function(e) {
|
|
@@ -4769,51 +4769,51 @@ function Ds(e) {
|
|
|
4769
4769
|
middlewares: [],
|
|
4770
4770
|
events: []
|
|
4771
4771
|
}), i = e.storage ? e.storage : {
|
|
4772
|
-
getItem:
|
|
4773
|
-
setItem:
|
|
4774
|
-
removeItem:
|
|
4772
|
+
getItem: $a,
|
|
4773
|
+
setItem: eo,
|
|
4774
|
+
removeItem: to
|
|
4775
4775
|
}, a = function(e) {
|
|
4776
4776
|
return function(t, n, r) {
|
|
4777
|
-
return n.getState("user")[t] || (r &&
|
|
4777
|
+
return n.getState("user")[t] || (r && Pa(r) && r[t] ? r[t] : jo(e)[t] || $a(Mo(t)) || null);
|
|
4778
4778
|
};
|
|
4779
4779
|
}(i), o = r.plugins, s = r.events.filter(function(e) {
|
|
4780
|
-
return !
|
|
4781
|
-
}).sort(), c = new Set(s.concat(
|
|
4782
|
-
return !
|
|
4780
|
+
return !To.includes(e);
|
|
4781
|
+
}).sort(), c = new Set(s.concat(wo).filter(function(e) {
|
|
4782
|
+
return !To.includes(e);
|
|
4783
4783
|
})), l = Array.from(c).sort(), u = function() {
|
|
4784
4784
|
return o;
|
|
4785
|
-
}, d = new
|
|
4785
|
+
}, d = new ts(), f = d.addMiddleware, p = d.removeMiddleware, m = d.dynamicMiddlewares, h = function() {
|
|
4786
4786
|
throw Error("Abort disabled inListener");
|
|
4787
|
-
}, g =
|
|
4788
|
-
v.anonymousId ||=
|
|
4789
|
-
var y =
|
|
4787
|
+
}, g = Ka(), _ = jo(i), v = X({}, _, n, g.an_uid ? { userId: g.an_uid } : {}, g.an_aid ? { anonymousId: g.an_aid } : {});
|
|
4788
|
+
v.anonymousId ||= Ja();
|
|
4789
|
+
var y = X({
|
|
4790
4790
|
enable: function(e, t) {
|
|
4791
4791
|
return new Promise(function(n) {
|
|
4792
4792
|
A.dispatch({
|
|
4793
|
-
type:
|
|
4794
|
-
plugins:
|
|
4795
|
-
_: { originalAction:
|
|
4793
|
+
type: Z.enablePlugin,
|
|
4794
|
+
plugins: Es(e),
|
|
4795
|
+
_: { originalAction: Z.enablePlugin }
|
|
4796
4796
|
}, n, [t]);
|
|
4797
4797
|
});
|
|
4798
4798
|
},
|
|
4799
4799
|
disable: function(e, t) {
|
|
4800
4800
|
return new Promise(function(n) {
|
|
4801
4801
|
A.dispatch({
|
|
4802
|
-
type:
|
|
4803
|
-
plugins:
|
|
4804
|
-
_: { originalAction:
|
|
4802
|
+
type: Z.disablePlugin,
|
|
4803
|
+
plugins: Es(e),
|
|
4804
|
+
_: { originalAction: Z.disablePlugin }
|
|
4805
4805
|
}, n, [t]);
|
|
4806
4806
|
});
|
|
4807
4807
|
}
|
|
4808
4808
|
}, r.methods), b = !1, x = {
|
|
4809
4809
|
identify: function(e, t, n, r) {
|
|
4810
4810
|
try {
|
|
4811
|
-
var i =
|
|
4812
|
-
|
|
4813
|
-
var l = i || o.userId || a(
|
|
4811
|
+
var i = Oa(e) ? e : null, o = Pa(e) ? e : t, s = n || {}, c = x.user();
|
|
4812
|
+
eo(Mo(So), i);
|
|
4813
|
+
var l = i || o.userId || a(So, x, o);
|
|
4814
4814
|
return Promise.resolve(new Promise(function(e) {
|
|
4815
|
-
A.dispatch(
|
|
4816
|
-
type:
|
|
4815
|
+
A.dispatch(X({
|
|
4816
|
+
type: Z.identifyStart,
|
|
4817
4817
|
userId: l,
|
|
4818
4818
|
traits: o || {},
|
|
4819
4819
|
options: s,
|
|
@@ -4830,17 +4830,17 @@ function Ds(e) {
|
|
|
4830
4830
|
},
|
|
4831
4831
|
track: function(e, t, n, r) {
|
|
4832
4832
|
try {
|
|
4833
|
-
var i =
|
|
4834
|
-
if (!i || !
|
|
4835
|
-
var o =
|
|
4833
|
+
var i = Pa(e) ? e.event : e;
|
|
4834
|
+
if (!i || !Oa(i)) throw Error("EventMissing");
|
|
4835
|
+
var o = Pa(e) ? e : t || {}, s = Pa(n) ? n : {};
|
|
4836
4836
|
return Promise.resolve(new Promise(function(e) {
|
|
4837
4837
|
A.dispatch({
|
|
4838
|
-
type:
|
|
4838
|
+
type: Z.trackStart,
|
|
4839
4839
|
event: i,
|
|
4840
4840
|
properties: o,
|
|
4841
4841
|
options: s,
|
|
4842
|
-
userId: a(
|
|
4843
|
-
anonymousId: a(
|
|
4842
|
+
userId: a(So, x, t),
|
|
4843
|
+
anonymousId: a(Co, x, t)
|
|
4844
4844
|
}, e, [
|
|
4845
4845
|
t,
|
|
4846
4846
|
n,
|
|
@@ -4853,14 +4853,14 @@ function Ds(e) {
|
|
|
4853
4853
|
},
|
|
4854
4854
|
page: function(e, t, n) {
|
|
4855
4855
|
try {
|
|
4856
|
-
var r =
|
|
4856
|
+
var r = Pa(e) ? e : {}, i = Pa(t) ? t : {};
|
|
4857
4857
|
return Promise.resolve(new Promise(function(o) {
|
|
4858
4858
|
A.dispatch({
|
|
4859
|
-
type:
|
|
4860
|
-
properties:
|
|
4859
|
+
type: Z.pageStart,
|
|
4860
|
+
properties: gs(r),
|
|
4861
4861
|
options: i,
|
|
4862
|
-
userId: a(
|
|
4863
|
-
anonymousId: a(
|
|
4862
|
+
userId: a(So, x, r),
|
|
4863
|
+
anonymousId: a(Co, x, r)
|
|
4864
4864
|
}, o, [
|
|
4865
4865
|
e,
|
|
4866
4866
|
t,
|
|
@@ -4872,27 +4872,27 @@ function Ds(e) {
|
|
|
4872
4872
|
}
|
|
4873
4873
|
},
|
|
4874
4874
|
user: function(e) {
|
|
4875
|
-
if (e ===
|
|
4876
|
-
if (e ===
|
|
4875
|
+
if (e === So || e === "id") return a(So, x);
|
|
4876
|
+
if (e === Co || e === "anonId") return a(Co, x);
|
|
4877
4877
|
var t = x.getState("user");
|
|
4878
|
-
return e ? (0,
|
|
4878
|
+
return e ? (0, sa.default)(t, e) : t;
|
|
4879
4879
|
},
|
|
4880
4880
|
reset: function(e) {
|
|
4881
4881
|
return new Promise(function(t) {
|
|
4882
|
-
A.dispatch({ type:
|
|
4882
|
+
A.dispatch({ type: Z.resetStart }, t, e);
|
|
4883
4883
|
});
|
|
4884
4884
|
},
|
|
4885
4885
|
ready: function(e) {
|
|
4886
4886
|
return b && e({
|
|
4887
4887
|
plugins: y,
|
|
4888
4888
|
instance: x
|
|
4889
|
-
}), x.on(
|
|
4889
|
+
}), x.on(Z.ready, function(t) {
|
|
4890
4890
|
e && e(t), b = !0;
|
|
4891
4891
|
});
|
|
4892
4892
|
},
|
|
4893
4893
|
on: function(e, t) {
|
|
4894
|
-
if (!e || !
|
|
4895
|
-
if (e ===
|
|
4894
|
+
if (!e || !Da(t)) return !1;
|
|
4895
|
+
if (e === Z.bootstrap) throw Error(".on disabled for " + e);
|
|
4896
4896
|
var n = /Start$|Start:/;
|
|
4897
4897
|
if (e === "*") {
|
|
4898
4898
|
var r = function(e) {
|
|
@@ -4916,11 +4916,11 @@ function Ds(e) {
|
|
|
4916
4916
|
};
|
|
4917
4917
|
};
|
|
4918
4918
|
};
|
|
4919
|
-
return f(r,
|
|
4920
|
-
p(r,
|
|
4919
|
+
return f(r, ks), f(i, As), function() {
|
|
4920
|
+
p(r, ks), p(i, As);
|
|
4921
4921
|
};
|
|
4922
4922
|
}
|
|
4923
|
-
var a = e.match(n) ?
|
|
4923
|
+
var a = e.match(n) ? ks : As, s = function(n) {
|
|
4924
4924
|
return function(n) {
|
|
4925
4925
|
return function(r) {
|
|
4926
4926
|
return r.type === e && t({
|
|
@@ -4937,8 +4937,8 @@ function Ds(e) {
|
|
|
4937
4937
|
};
|
|
4938
4938
|
},
|
|
4939
4939
|
once: function(e, t) {
|
|
4940
|
-
if (!e || !
|
|
4941
|
-
if (e ===
|
|
4940
|
+
if (!e || !Da(t)) return !1;
|
|
4941
|
+
if (e === Z.bootstrap) throw Error(".once disabled for " + e);
|
|
4942
4942
|
var n = x.on(e, function(e) {
|
|
4943
4943
|
t({
|
|
4944
4944
|
payload: e.payload,
|
|
@@ -4951,12 +4951,12 @@ function Ds(e) {
|
|
|
4951
4951
|
},
|
|
4952
4952
|
getState: function(e) {
|
|
4953
4953
|
var t = A.getState();
|
|
4954
|
-
return e ? (0,
|
|
4954
|
+
return e ? (0, sa.default)(t, e) : Object.assign({}, t);
|
|
4955
4955
|
},
|
|
4956
4956
|
dispatch: function(e) {
|
|
4957
|
-
var t =
|
|
4958
|
-
if (
|
|
4959
|
-
var n =
|
|
4957
|
+
var t = Oa(e) ? { type: e } : e;
|
|
4958
|
+
if (wo.includes(t.type)) throw Error("reserved action " + t.type);
|
|
4959
|
+
var n = X({}, t, { _: X({ originalAction: t.type }, e._ || {}) });
|
|
4960
4960
|
A.dispatch(n);
|
|
4961
4961
|
},
|
|
4962
4962
|
enablePlugin: y.enable,
|
|
@@ -4966,7 +4966,7 @@ function Ds(e) {
|
|
|
4966
4966
|
getItem: i.getItem,
|
|
4967
4967
|
setItem: function(e, t, n) {
|
|
4968
4968
|
A.dispatch({
|
|
4969
|
-
type:
|
|
4969
|
+
type: Z.setItemStart,
|
|
4970
4970
|
key: e,
|
|
4971
4971
|
value: t,
|
|
4972
4972
|
options: n
|
|
@@ -4974,56 +4974,56 @@ function Ds(e) {
|
|
|
4974
4974
|
},
|
|
4975
4975
|
removeItem: function(e, t) {
|
|
4976
4976
|
A.dispatch({
|
|
4977
|
-
type:
|
|
4977
|
+
type: Z.removeItemStart,
|
|
4978
4978
|
key: e,
|
|
4979
4979
|
options: t
|
|
4980
4980
|
});
|
|
4981
4981
|
}
|
|
4982
4982
|
},
|
|
4983
4983
|
setAnonymousId: function(e, t) {
|
|
4984
|
-
x.storage.setItem(
|
|
4984
|
+
x.storage.setItem(vo, e, t);
|
|
4985
4985
|
},
|
|
4986
4986
|
events: {
|
|
4987
|
-
core:
|
|
4987
|
+
core: wo,
|
|
4988
4988
|
plugins: s
|
|
4989
4989
|
}
|
|
4990
4990
|
}, S = r.middlewares.concat([
|
|
4991
4991
|
function(e) {
|
|
4992
4992
|
return function(e) {
|
|
4993
4993
|
return function(t) {
|
|
4994
|
-
return t.meta ||=
|
|
4994
|
+
return t.meta ||= Ds(), e(t);
|
|
4995
4995
|
};
|
|
4996
4996
|
};
|
|
4997
4997
|
},
|
|
4998
|
-
m(
|
|
4999
|
-
|
|
4998
|
+
m(ks),
|
|
4999
|
+
$o(x, u, {
|
|
5000
5000
|
all: l,
|
|
5001
5001
|
plugins: s
|
|
5002
5002
|
}),
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
m(
|
|
5003
|
+
es(i),
|
|
5004
|
+
ko(x),
|
|
5005
|
+
No(x),
|
|
5006
|
+
m(As)
|
|
5007
5007
|
]), C = {
|
|
5008
|
-
context:
|
|
5009
|
-
user:
|
|
5010
|
-
page:
|
|
5011
|
-
track:
|
|
5012
|
-
plugins:
|
|
5013
|
-
queue:
|
|
5014
|
-
}, w =
|
|
5015
|
-
if (
|
|
5008
|
+
context: bs,
|
|
5009
|
+
user: Ao(i),
|
|
5010
|
+
page: vs,
|
|
5011
|
+
track: ss,
|
|
5012
|
+
plugins: ns(u),
|
|
5013
|
+
queue: ls
|
|
5014
|
+
}, w = go, T = go;
|
|
5015
|
+
if (Y && e.debug) {
|
|
5016
5016
|
var E = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
|
|
5017
5017
|
E && (w = E({
|
|
5018
5018
|
trace: !0,
|
|
5019
5019
|
traceLimit: 25
|
|
5020
5020
|
})), T = function() {
|
|
5021
|
-
return arguments.length === 0 ?
|
|
5021
|
+
return arguments.length === 0 ? ws() : Pa(typeof arguments[0]) ? Ts() : Ts().apply(null, arguments);
|
|
5022
5022
|
};
|
|
5023
5023
|
}
|
|
5024
5024
|
var D, O = function(e) {
|
|
5025
5025
|
return Object.keys(e).reduce(function(t, n) {
|
|
5026
|
-
return
|
|
5026
|
+
return xs.includes(n) || (t[n] = e[n]), t;
|
|
5027
5027
|
}, {});
|
|
5028
5028
|
}(e), k = {
|
|
5029
5029
|
context: O,
|
|
@@ -5037,17 +5037,17 @@ function Ds(e) {
|
|
|
5037
5037
|
config: i
|
|
5038
5038
|
}, e;
|
|
5039
5039
|
}, {})
|
|
5040
|
-
}, A =
|
|
5040
|
+
}, A = mo(function(e) {
|
|
5041
5041
|
for (var t = Object.keys(e), n = {}, r = 0; r < t.length; r++) {
|
|
5042
5042
|
var i = t[r];
|
|
5043
|
-
typeof e[i] ===
|
|
5043
|
+
typeof e[i] === ao && (n[i] = e[i]);
|
|
5044
5044
|
}
|
|
5045
5045
|
var a, o = Object.keys(n);
|
|
5046
5046
|
try {
|
|
5047
5047
|
(function(e) {
|
|
5048
5048
|
Object.keys(e).forEach(function(t) {
|
|
5049
5049
|
var n = e[t];
|
|
5050
|
-
if (typeof n(void 0, { type:
|
|
5050
|
+
if (typeof n(void 0, { type: lo }) === oo || typeof n(void 0, { type: uo }) === oo) throw Error(so + " " + t + " " + oo);
|
|
5051
5051
|
});
|
|
5052
5052
|
})(n);
|
|
5053
5053
|
} catch (e) {
|
|
@@ -5057,22 +5057,22 @@ function Ds(e) {
|
|
|
5057
5057
|
if (e === void 0 && (e = {}), a) throw a;
|
|
5058
5058
|
for (var r = !1, i = {}, s = 0; s < o.length; s++) {
|
|
5059
5059
|
var c = o[s], l = e[c], u = (0, n[c])(l, t);
|
|
5060
|
-
if (typeof u ===
|
|
5061
|
-
var d =
|
|
5060
|
+
if (typeof u === oo) {
|
|
5061
|
+
var d = ho(c, t);
|
|
5062
5062
|
throw Error(d);
|
|
5063
5063
|
}
|
|
5064
5064
|
i[c] = u, r ||= u !== l;
|
|
5065
5065
|
}
|
|
5066
5066
|
return r ? i : e;
|
|
5067
5067
|
};
|
|
5068
|
-
}(
|
|
5068
|
+
}(X({}, C, t)), k, T(w(_o.apply(void 0, S))));
|
|
5069
5069
|
A.dispatch = (D = A.dispatch, function(e, t, n) {
|
|
5070
|
-
var r =
|
|
5070
|
+
var r = X({}, e, { meta: Ds(e.meta, t, Es(n)) });
|
|
5071
5071
|
return D.apply(null, [r]);
|
|
5072
5072
|
});
|
|
5073
5073
|
var j = Object.keys(o);
|
|
5074
5074
|
A.dispatch({
|
|
5075
|
-
type:
|
|
5075
|
+
type: Z.bootstrap,
|
|
5076
5076
|
plugins: j,
|
|
5077
5077
|
config: O,
|
|
5078
5078
|
params: g,
|
|
@@ -5086,83 +5086,83 @@ function Ds(e) {
|
|
|
5086
5086
|
return !r.pluginEnabled[e];
|
|
5087
5087
|
});
|
|
5088
5088
|
return A.dispatch({
|
|
5089
|
-
type:
|
|
5089
|
+
type: Z.registerPlugins,
|
|
5090
5090
|
plugins: j,
|
|
5091
5091
|
enabled: r.pluginEnabled
|
|
5092
5092
|
}), r.pluginsArray.map(function(e, t) {
|
|
5093
5093
|
var n = e.bootstrap, i = e.config, a = e.name;
|
|
5094
|
-
n &&
|
|
5094
|
+
n && Da(n) && n({
|
|
5095
5095
|
instance: x,
|
|
5096
5096
|
config: i,
|
|
5097
5097
|
payload: e
|
|
5098
5098
|
}), A.dispatch({
|
|
5099
|
-
type:
|
|
5099
|
+
type: Z.registerPluginType(a),
|
|
5100
5100
|
name: a,
|
|
5101
5101
|
enabled: r.pluginEnabled[a],
|
|
5102
5102
|
plugin: e
|
|
5103
5103
|
}), r.pluginsArray.length === t + 1 && A.dispatch({
|
|
5104
|
-
type:
|
|
5104
|
+
type: Z.initializeStart,
|
|
5105
5105
|
plugins: M,
|
|
5106
5106
|
disabled: N
|
|
5107
5107
|
});
|
|
5108
|
-
}),
|
|
5109
|
-
A.dispatch({ type: e ?
|
|
5108
|
+
}), Cs(function(e) {
|
|
5109
|
+
A.dispatch({ type: e ? Z.offline : Z.online });
|
|
5110
5110
|
}), function(e, t, n) {
|
|
5111
5111
|
setInterval(function() {
|
|
5112
|
-
return
|
|
5112
|
+
return Ro(e, t, n);
|
|
5113
5113
|
}, 3e3);
|
|
5114
5114
|
}(A, u, x), x;
|
|
5115
5115
|
}
|
|
5116
|
-
var
|
|
5117
|
-
function
|
|
5118
|
-
return
|
|
5116
|
+
var ks = "before", As = "after", js = "cookie", Ms = Is(), Ns = Ls, Ps = Ls;
|
|
5117
|
+
function Fs(e) {
|
|
5118
|
+
return Ms ? Ls(e, "", -1) : to(e);
|
|
5119
5119
|
}
|
|
5120
|
-
function
|
|
5121
|
-
if (
|
|
5122
|
-
var e =
|
|
5120
|
+
function Is() {
|
|
5121
|
+
if (Ms !== void 0) return Ms;
|
|
5122
|
+
var e = js + js;
|
|
5123
5123
|
try {
|
|
5124
|
-
|
|
5124
|
+
Ls(e, e), Ms = document.cookie.indexOf(e) !== -1, Fs(e);
|
|
5125
5125
|
} catch {
|
|
5126
|
-
|
|
5126
|
+
Ms = !1;
|
|
5127
5127
|
}
|
|
5128
|
-
return
|
|
5128
|
+
return Ms;
|
|
5129
5129
|
}
|
|
5130
|
-
function
|
|
5130
|
+
function Ls(e, t, n, r, i, a) {
|
|
5131
5131
|
if (typeof window < "u") {
|
|
5132
5132
|
var o = arguments.length > 1;
|
|
5133
|
-
return !1 ===
|
|
5133
|
+
return !1 === Ms && (o ? eo(e, t) : $a(e)), o ? document.cookie = e + "=" + encodeURIComponent(t) + (n ? "; expires=" + (/* @__PURE__ */ new Date(+/* @__PURE__ */ new Date() + 1e3 * n)).toUTCString() + (r ? "; path=" + r : "") + (i ? "; domain=" + i : "") + (a ? "; secure" : "") : "") : decodeURIComponent((("; " + document.cookie).split("; " + e + "=")[1] || "").split(";")[0]);
|
|
5134
5134
|
}
|
|
5135
5135
|
}
|
|
5136
5136
|
//#endregion
|
|
5137
5137
|
//#region ../../node_modules/.pnpm/@analytics+localstorage-utils@0.1.12/node_modules/@analytics/localstorage-utils/dist/analytics-util-localstorage.module.js
|
|
5138
|
-
var
|
|
5139
|
-
|
|
5138
|
+
var Rs = "localStorage", zs = io.bind(null, Rs);
|
|
5139
|
+
no(Rs, "getItem", $a), no(Rs, "setItem", eo), no(Rs, "removeItem", to);
|
|
5140
5140
|
//#endregion
|
|
5141
5141
|
//#region ../../node_modules/.pnpm/@analytics+session-storage-utils@0.0.9/node_modules/@analytics/session-storage-utils/dist/analytics-util-session-storage.module.js
|
|
5142
|
-
var
|
|
5143
|
-
|
|
5142
|
+
var Bs = "sessionStorage", Vs = io.bind(null, Bs);
|
|
5143
|
+
no(Bs, "getItem", $a), no(Bs, "setItem", eo), no(Bs, "removeItem", to);
|
|
5144
5144
|
//#endregion
|
|
5145
5145
|
//#region ../../node_modules/.pnpm/@analytics+storage-utils@0.4.4/node_modules/@analytics/storage-utils/dist/analytics-util-storage.module.js
|
|
5146
|
-
function
|
|
5146
|
+
function Hs(e) {
|
|
5147
5147
|
var t = e;
|
|
5148
5148
|
try {
|
|
5149
5149
|
if ((t = JSON.parse(e)) === "true") return !0;
|
|
5150
5150
|
if (t === "false") return !1;
|
|
5151
|
-
if (
|
|
5151
|
+
if (Pa(t)) return t;
|
|
5152
5152
|
parseFloat(t) === t && (t = parseFloat(t));
|
|
5153
5153
|
} catch {}
|
|
5154
5154
|
if (t !== null && t !== "") return t;
|
|
5155
5155
|
}
|
|
5156
|
-
var
|
|
5157
|
-
function
|
|
5156
|
+
var Us = zs(), Ws = Vs(), Gs = Is();
|
|
5157
|
+
function Ks(e, t) {
|
|
5158
5158
|
if (e) {
|
|
5159
|
-
var n =
|
|
5160
|
-
if (r && !
|
|
5161
|
-
var a =
|
|
5159
|
+
var n = Ys(t), r = !$s(n), i = Xs(n) ? Hs(localStorage.getItem(e)) : void 0;
|
|
5160
|
+
if (r && !ka(i)) return i;
|
|
5161
|
+
var a = Zs(n) ? Hs(Ns(e)) : void 0;
|
|
5162
5162
|
if (r && a) return a;
|
|
5163
|
-
var o =
|
|
5163
|
+
var o = Qs(n) ? Hs(sessionStorage.getItem(e)) : void 0;
|
|
5164
5164
|
if (r && o) return o;
|
|
5165
|
-
var s =
|
|
5165
|
+
var s = $a(e);
|
|
5166
5166
|
return r ? s : {
|
|
5167
5167
|
localStorage: i,
|
|
5168
5168
|
sessionStorage: o,
|
|
@@ -5171,51 +5171,51 @@ function Gs(e, t) {
|
|
|
5171
5171
|
};
|
|
5172
5172
|
}
|
|
5173
5173
|
}
|
|
5174
|
-
function
|
|
5175
|
-
if (e && !
|
|
5176
|
-
var r = {}, i =
|
|
5177
|
-
return
|
|
5174
|
+
function qs(e, t, n) {
|
|
5175
|
+
if (e && !ka(t)) {
|
|
5176
|
+
var r = {}, i = Ys(n), a = JSON.stringify(t), o = !$s(i);
|
|
5177
|
+
return Xs(i) && (r.localStorage = tc("localStorage", t, Hs(localStorage.getItem(e))), localStorage.setItem(e, a), o) ? r[Rs] : Zs(i) && (r.cookie = tc("cookie", t, Hs(Ns(e))), Ps(e, a), o) ? r[js] : Qs(i) && (r.sessionStorage = tc("sessionStorage", t, Hs(sessionStorage.getItem(e))), sessionStorage.setItem(e, a), o) ? r[Bs] : (r[Xa] = tc(Xa, t, $a(e)), eo(e, t), o ? r[Xa] : r);
|
|
5178
5178
|
}
|
|
5179
5179
|
}
|
|
5180
|
-
function
|
|
5180
|
+
function Js(e, t) {
|
|
5181
5181
|
if (e) {
|
|
5182
|
-
var n =
|
|
5183
|
-
return !
|
|
5182
|
+
var n = Ys(t), r = Ks(e, "*"), i = {};
|
|
5183
|
+
return !ka(r.localStorage) && Xs(n) && (localStorage.removeItem(e), i.localStorage = r.localStorage), !ka(r.cookie) && Zs(n) && (Fs(e), i.cookie = r.cookie), !ka(r.sessionStorage) && Qs(n) && (sessionStorage.removeItem(e), i.sessionStorage = r.sessionStorage), !ka(r.global) && ec(n, "global") && (to(e), i.global = r.global), i;
|
|
5184
5184
|
}
|
|
5185
5185
|
}
|
|
5186
|
-
function Js(e) {
|
|
5187
|
-
return e ? Da(e) ? e : e.storage : "any";
|
|
5188
|
-
}
|
|
5189
5186
|
function Ys(e) {
|
|
5190
|
-
return
|
|
5187
|
+
return e ? Oa(e) ? e : e.storage : "any";
|
|
5191
5188
|
}
|
|
5192
5189
|
function Xs(e) {
|
|
5193
|
-
return
|
|
5190
|
+
return Us && ec(e, "localStorage");
|
|
5194
5191
|
}
|
|
5195
5192
|
function Zs(e) {
|
|
5196
|
-
return
|
|
5193
|
+
return Gs && ec(e, "cookie");
|
|
5197
5194
|
}
|
|
5198
5195
|
function Qs(e) {
|
|
5196
|
+
return Ws && ec(e, "sessionStorage");
|
|
5197
|
+
}
|
|
5198
|
+
function $s(e) {
|
|
5199
5199
|
return e === "*" || e === "all";
|
|
5200
5200
|
}
|
|
5201
|
-
function
|
|
5202
|
-
return e === "any" || e === t ||
|
|
5201
|
+
function ec(e, t) {
|
|
5202
|
+
return e === "any" || e === t || $s(e);
|
|
5203
5203
|
}
|
|
5204
|
-
function
|
|
5204
|
+
function tc(e, t, n) {
|
|
5205
5205
|
return {
|
|
5206
5206
|
location: e,
|
|
5207
5207
|
current: t,
|
|
5208
5208
|
previous: n
|
|
5209
5209
|
};
|
|
5210
5210
|
}
|
|
5211
|
-
var
|
|
5212
|
-
setItem:
|
|
5213
|
-
getItem:
|
|
5214
|
-
removeItem:
|
|
5211
|
+
var nc = {
|
|
5212
|
+
setItem: qs,
|
|
5213
|
+
getItem: Ks,
|
|
5214
|
+
removeItem: Js
|
|
5215
5215
|
};
|
|
5216
5216
|
//#endregion
|
|
5217
5217
|
//#region ../../node_modules/.pnpm/analytics@0.8.19_@types+dlv@1.1.5/node_modules/analytics/lib/analytics.browser.es.js
|
|
5218
|
-
function
|
|
5218
|
+
function rc(e, t, n) {
|
|
5219
5219
|
return t in e ? Object.defineProperty(e, t, {
|
|
5220
5220
|
value: n,
|
|
5221
5221
|
enumerable: !0,
|
|
@@ -5223,7 +5223,7 @@ function nc(e, t, n) {
|
|
|
5223
5223
|
writable: !0
|
|
5224
5224
|
}) : e[t] = n, e;
|
|
5225
5225
|
}
|
|
5226
|
-
function
|
|
5226
|
+
function ic(e, t) {
|
|
5227
5227
|
var n = Object.keys(e);
|
|
5228
5228
|
if (Object.getOwnPropertySymbols) {
|
|
5229
5229
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -5233,27 +5233,27 @@ function rc(e, t) {
|
|
|
5233
5233
|
}
|
|
5234
5234
|
return n;
|
|
5235
5235
|
}
|
|
5236
|
-
function
|
|
5236
|
+
function ac(e) {
|
|
5237
5237
|
for (var t = 1; t < arguments.length; t++) {
|
|
5238
5238
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
5239
|
-
t % 2 ?
|
|
5240
|
-
|
|
5241
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
5239
|
+
t % 2 ? ic(Object(n), !0).forEach(function(t) {
|
|
5240
|
+
rc(e, t, n[t]);
|
|
5241
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ic(Object(n)).forEach(function(t) {
|
|
5242
5242
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
5243
5243
|
});
|
|
5244
5244
|
}
|
|
5245
5245
|
return e;
|
|
5246
5246
|
}
|
|
5247
|
-
function
|
|
5247
|
+
function oc() {
|
|
5248
5248
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5249
|
-
return
|
|
5249
|
+
return Os(ac(ac({}, { storage: nc }), e));
|
|
5250
5250
|
}
|
|
5251
5251
|
//#endregion
|
|
5252
5252
|
//#region package.json
|
|
5253
|
-
var
|
|
5253
|
+
var sc = "@sesamy/sesamy-js", cc = "1.113.2";
|
|
5254
5254
|
//#endregion
|
|
5255
5255
|
//#region src/services/analytics/listeners/route.ts
|
|
5256
|
-
function
|
|
5256
|
+
function lc(e) {
|
|
5257
5257
|
if (typeof window > "u") return;
|
|
5258
5258
|
let { addEventListener: t, history: n, location: r } = window, i = r.pathname;
|
|
5259
5259
|
t("popstate", () => e(r.pathname)), ["push", "replace"].map((t) => {
|
|
@@ -5261,56 +5261,56 @@ function cc(e) {
|
|
|
5261
5261
|
if (r !== "pushState" && r !== "replaceState") return;
|
|
5262
5262
|
let a = n[r];
|
|
5263
5263
|
n[r] = function(...t) {
|
|
5264
|
-
let r = t[2]?.toString() || "", o =
|
|
5264
|
+
let r = t[2]?.toString() || "", o = dc(r);
|
|
5265
5265
|
return i !== o && (i = o, setTimeout(() => e(r), 0)), a.apply(n, t);
|
|
5266
5266
|
};
|
|
5267
5267
|
});
|
|
5268
5268
|
}
|
|
5269
|
-
function
|
|
5269
|
+
function uc(e, t) {
|
|
5270
5270
|
let n = e.indexOf(t);
|
|
5271
5271
|
return n > -1 ? e.slice(0, n) : e;
|
|
5272
5272
|
}
|
|
5273
|
-
function
|
|
5274
|
-
return ["#", "?"].forEach((t) => e =
|
|
5273
|
+
function dc(e) {
|
|
5274
|
+
return ["#", "?"].forEach((t) => e = uc(e, t)), e;
|
|
5275
5275
|
}
|
|
5276
|
-
function
|
|
5277
|
-
|
|
5276
|
+
function fc() {
|
|
5277
|
+
lc(() => {
|
|
5278
5278
|
Yl();
|
|
5279
5279
|
});
|
|
5280
5280
|
}
|
|
5281
5281
|
//#endregion
|
|
5282
5282
|
//#region ../../node_modules/.pnpm/@analytics+scroll-utils@0.1.26_@types+dlv@1.1.5/node_modules/@analytics/scroll-utils/dist/analytics-util-scroll.module.js
|
|
5283
|
-
var
|
|
5284
|
-
function
|
|
5285
|
-
if (e === void 0 && (e = {}), !
|
|
5286
|
-
var t =
|
|
5287
|
-
if (!f.length) return
|
|
5283
|
+
var pc = "up", mc = "down";
|
|
5284
|
+
function hc(e) {
|
|
5285
|
+
if (e === void 0 && (e = {}), !Y) return ha;
|
|
5286
|
+
var t = yc(), n = gc(), r = vc(), i = bc(r, t), a = bc(n, t), o = [], s = [], c = [], l = r, u = i, d = a, f = Object.keys(e);
|
|
5287
|
+
if (!f.length) return ha;
|
|
5288
5288
|
var p = f.map(function(e) {
|
|
5289
5289
|
return Number(e);
|
|
5290
|
-
}), m =
|
|
5291
|
-
var t =
|
|
5290
|
+
}), m = Ya(function() {
|
|
5291
|
+
var t = yc(), n = function(e, t) {
|
|
5292
5292
|
return t.map(function(t) {
|
|
5293
5293
|
return t === 100 ? e - 5 : t / 100 * e;
|
|
5294
5294
|
});
|
|
5295
|
-
}(t, p), r =
|
|
5295
|
+
}(t, p), r = gc(), i = vc(), f = bc(i, t), m = bc(r, t);
|
|
5296
5296
|
if (u = f > u ? f : u, d = m < d ? m : d, !(o.length >= p.length)) {
|
|
5297
|
-
var h = l === i, g =
|
|
5298
|
-
h ? g = "initial" : l <= i && (g =
|
|
5297
|
+
var h = l === i, g = pc;
|
|
5298
|
+
h ? g = "initial" : l <= i && (g = mc);
|
|
5299
5299
|
var _ = n, v = p;
|
|
5300
|
-
(g ===
|
|
5300
|
+
(g === pc || h) && (_ = n.slice().reverse(), v = p.slice().reverse());
|
|
5301
5301
|
var y = v.reduce(function(e, t, n) {
|
|
5302
5302
|
var r = _[n];
|
|
5303
5303
|
return c.includes(t) && i <= r && (c = c.filter(function(e) {
|
|
5304
5304
|
return e !== t;
|
|
5305
|
-
}), e.singleFunction = t), g ===
|
|
5305
|
+
}), e.singleFunction = t), g === mc && !o.includes(t) && i >= r && t > a ? (s.push(t), e.callbacks = e.callbacks.concat(t), e) : g === pc && !o.includes(t) && i <= r && t <= f ? (e.foundFunc = [t], e) : (h && i >= r && e.foundFunc.length === 0 && (e.foundFunc = [t]), !s.includes(t) && i >= r && (s.push(t), e.singleFunction ? c.push(t) : e.singleFunction = t), e);
|
|
5306
5306
|
}, {
|
|
5307
5307
|
foundFunc: [],
|
|
5308
5308
|
singleFunction: null,
|
|
5309
5309
|
callbacks: [],
|
|
5310
5310
|
direction: g
|
|
5311
5311
|
});
|
|
5312
|
-
if (l = i, g ===
|
|
5313
|
-
|
|
5312
|
+
if (l = i, g === mc && y.callbacks && y.callbacks.forEach(function(t) {
|
|
5313
|
+
Da(e[t]) && (e[t]({
|
|
5314
5314
|
trigger: t,
|
|
5315
5315
|
direction: g,
|
|
5316
5316
|
scrollMin: d,
|
|
@@ -5319,7 +5319,7 @@ function mc(e) {
|
|
|
5319
5319
|
}), o.push(t));
|
|
5320
5320
|
}), y.singleFunction) {
|
|
5321
5321
|
var b = y.singleFunction, x = y.direction;
|
|
5322
|
-
|
|
5322
|
+
Da(e[b]) && e[b]({
|
|
5323
5323
|
trigger: b,
|
|
5324
5324
|
direction: x,
|
|
5325
5325
|
scrollMin: d,
|
|
@@ -5333,47 +5333,47 @@ function mc(e) {
|
|
|
5333
5333
|
return window.removeEventListener("scroll", m);
|
|
5334
5334
|
};
|
|
5335
5335
|
}
|
|
5336
|
-
function hc() {
|
|
5337
|
-
return X ? document.body.scrollTop || document.documentElement.scrollTop : 0;
|
|
5338
|
-
}
|
|
5339
5336
|
function gc() {
|
|
5340
|
-
return
|
|
5337
|
+
return Y ? document.body.scrollTop || document.documentElement.scrollTop : 0;
|
|
5341
5338
|
}
|
|
5342
5339
|
function _c() {
|
|
5343
|
-
return
|
|
5340
|
+
return Y ? window.innerHeight || document.documentElement.clientHeight : 0;
|
|
5344
5341
|
}
|
|
5345
5342
|
function vc() {
|
|
5346
|
-
|
|
5343
|
+
return Math.round(gc() + _c());
|
|
5344
|
+
}
|
|
5345
|
+
function yc() {
|
|
5346
|
+
if (!Y) return 0;
|
|
5347
5347
|
var e = document.body, t = document.documentElement;
|
|
5348
5348
|
return Math.max(e.scrollHeight, e.offsetHeight, t.clientHeight, t.scrollHeight, t.offsetHeight);
|
|
5349
5349
|
}
|
|
5350
|
-
function
|
|
5350
|
+
function bc(e, t) {
|
|
5351
5351
|
return Math.round(e / t * 100);
|
|
5352
5352
|
}
|
|
5353
5353
|
//#endregion
|
|
5354
5354
|
//#region ../../node_modules/.pnpm/@analytics+listener-utils@0.4.2/node_modules/@analytics/listener-utils/dist/analytics-util-listener.module.js
|
|
5355
|
-
var
|
|
5356
|
-
function
|
|
5355
|
+
var xc = "Event", Sc = xc + "Listener";
|
|
5356
|
+
function Cc(e) {
|
|
5357
5357
|
return function(t, n, r, i) {
|
|
5358
|
-
var a = r ||
|
|
5359
|
-
if (!
|
|
5360
|
-
var s =
|
|
5358
|
+
var a = r || ha, o = i || !1;
|
|
5359
|
+
if (!Y) return a;
|
|
5360
|
+
var s = wc(n), c = wc(t, !0);
|
|
5361
5361
|
if (!c.length) throw Error("noElements");
|
|
5362
|
-
if (!s.length) throw Error("no" +
|
|
5362
|
+
if (!s.length) throw Error("no" + xc);
|
|
5363
5363
|
var l = [];
|
|
5364
5364
|
return function e(t) {
|
|
5365
5365
|
t && (l = []);
|
|
5366
|
-
for (var n = t ? "add" +
|
|
5366
|
+
for (var n = t ? "add" + Sc : "remove" + Sc, r = 0; r < c.length; r++) {
|
|
5367
5367
|
var i = c[r];
|
|
5368
|
-
l[r] = t ? o && o.once ?
|
|
5368
|
+
l[r] = t ? o && o.once ? Tc(a) : a : l[r] || a;
|
|
5369
5369
|
for (var u = 0; u < s.length; u++) i[n] ? i["on" + s[u]] = t ? l[r] : null : i[n](s[u], l[r], o);
|
|
5370
5370
|
}
|
|
5371
5371
|
return e.bind(null, !t);
|
|
5372
5372
|
}(e);
|
|
5373
5373
|
};
|
|
5374
5374
|
}
|
|
5375
|
-
function
|
|
5376
|
-
if (
|
|
5375
|
+
function wc(e, t) {
|
|
5376
|
+
if (Oa(e)) return t ? wc(document.querySelectorAll(e)) : (n = e).split(n.indexOf(",") > -1 ? "," : " ").map(function(e) {
|
|
5377
5377
|
return e.trim();
|
|
5378
5378
|
});
|
|
5379
5379
|
var n;
|
|
@@ -5381,31 +5381,31 @@ function Cc(e, t) {
|
|
|
5381
5381
|
for (var r = [], i = e.length >>> 0; i--;) r[i] = e[i];
|
|
5382
5382
|
return r;
|
|
5383
5383
|
}
|
|
5384
|
-
var a =
|
|
5384
|
+
var a = Ha(e);
|
|
5385
5385
|
return t ? a.map(function(e) {
|
|
5386
|
-
return
|
|
5386
|
+
return Oa(e) ? wc(e, !0) : e;
|
|
5387
5387
|
}).flat() : a;
|
|
5388
5388
|
}
|
|
5389
|
-
function
|
|
5389
|
+
function Tc(e, t) {
|
|
5390
5390
|
var n;
|
|
5391
5391
|
return function() {
|
|
5392
5392
|
return e &&= (n = e.apply(t || this, arguments), null), n;
|
|
5393
5393
|
};
|
|
5394
5394
|
}
|
|
5395
|
-
var
|
|
5396
|
-
function
|
|
5397
|
-
return
|
|
5395
|
+
var Ec = Cc(xc);
|
|
5396
|
+
function Dc(e, t) {
|
|
5397
|
+
return Y && Da(window[e]) ? (n = window[e], r = t, (i = window) === void 0 && (i = null), Da(n) ? function() {
|
|
5398
5398
|
n.apply(i, arguments), r.apply(i, arguments);
|
|
5399
5399
|
} : r) : window[e] = t;
|
|
5400
5400
|
var n, r, i;
|
|
5401
5401
|
}
|
|
5402
|
-
|
|
5402
|
+
Dc.bind(null, "onerror"), Dc.bind(null, "onload");
|
|
5403
5403
|
//#endregion
|
|
5404
5404
|
//#region ../../node_modules/.pnpm/analytics-plugin-tab-events@0.2.1/node_modules/analytics-plugin-tab-events/lib/analytics-plugin-tab-events.browser.es.js
|
|
5405
|
-
var
|
|
5406
|
-
function
|
|
5407
|
-
if (
|
|
5408
|
-
var t =
|
|
5405
|
+
var Oc = typeof window > "u", kc = "hidden";
|
|
5406
|
+
function Ac(e) {
|
|
5407
|
+
if (Oc) return !1;
|
|
5408
|
+
var t = jc(), n = `${t.replace(/[H|h]idden/, "")}visibilitychange`, r = function() {
|
|
5409
5409
|
return e(!!document[t]);
|
|
5410
5410
|
}, i = function() {
|
|
5411
5411
|
return document.addEventListener(n, r);
|
|
@@ -5414,8 +5414,8 @@ function kc(e) {
|
|
|
5414
5414
|
return document.removeEventListener(n, r), i;
|
|
5415
5415
|
};
|
|
5416
5416
|
}
|
|
5417
|
-
function
|
|
5418
|
-
return
|
|
5417
|
+
function jc() {
|
|
5418
|
+
return Oc || "hidden" in document ? kc : [
|
|
5419
5419
|
"webkit",
|
|
5420
5420
|
"moz",
|
|
5421
5421
|
"ms",
|
|
@@ -5427,7 +5427,7 @@ function Ac() {
|
|
|
5427
5427
|
}
|
|
5428
5428
|
//#endregion
|
|
5429
5429
|
//#region ../../node_modules/.pnpm/@analytics+activity-utils@0.1.16/node_modules/@analytics/activity-utils/dist/analytics-util-activity.module.js
|
|
5430
|
-
var
|
|
5430
|
+
var Mc = [
|
|
5431
5431
|
"mousemove",
|
|
5432
5432
|
"mousedown",
|
|
5433
5433
|
"touchmove",
|
|
@@ -5435,7 +5435,7 @@ var jc = [
|
|
|
5435
5435
|
"touchend",
|
|
5436
5436
|
"keydown"
|
|
5437
5437
|
];
|
|
5438
|
-
function
|
|
5438
|
+
function Nc(e, t) {
|
|
5439
5439
|
t === void 0 && (t = {});
|
|
5440
5440
|
var n = function(e, t) {
|
|
5441
5441
|
var n = this, r = !1;
|
|
@@ -5446,11 +5446,11 @@ function Mc(e, t) {
|
|
|
5446
5446
|
};
|
|
5447
5447
|
}(e, t.throttle || 1e4), r = [];
|
|
5448
5448
|
function i() {
|
|
5449
|
-
return r = [
|
|
5449
|
+
return r = [Ac(function(e) {
|
|
5450
5450
|
e || n({ type: "tabVisible" });
|
|
5451
|
-
})].concat(
|
|
5452
|
-
return
|
|
5453
|
-
}),
|
|
5451
|
+
})].concat(Mc.map(function(e) {
|
|
5452
|
+
return Ec(document, e, n);
|
|
5453
|
+
}), Ec(window, "load", n), Ec(window, "scroll", n, {
|
|
5454
5454
|
capture: !0,
|
|
5455
5455
|
passive: !0
|
|
5456
5456
|
})), a;
|
|
@@ -5464,16 +5464,16 @@ function Mc(e, t) {
|
|
|
5464
5464
|
return a(), i;
|
|
5465
5465
|
};
|
|
5466
5466
|
}
|
|
5467
|
-
function
|
|
5467
|
+
function Pc(e) {
|
|
5468
5468
|
var t, n, r = e.onIdle, i = e.onWakeUp, a = e.onHeartbeat, o = e.timeout, s = o === void 0 ? 1e4 : o, c = e.throttle, l = c === void 0 ? 2e3 : c, u = !1, d = !1, f = /* @__PURE__ */ new Date(), p = function() {
|
|
5469
5469
|
return clearTimeout(t);
|
|
5470
5470
|
};
|
|
5471
5471
|
function m(e) {
|
|
5472
|
-
p(), a && !u && a(
|
|
5473
|
-
u = !0, r && (n = /* @__PURE__ */ new Date(), r(
|
|
5472
|
+
p(), a && !u && a(Fc(f), e), i && u && (u = !1, i(Fc(n), e), f = /* @__PURE__ */ new Date()), t = setTimeout(function() {
|
|
5473
|
+
u = !0, r && (n = /* @__PURE__ */ new Date(), r(Fc(f), e));
|
|
5474
5474
|
}, s);
|
|
5475
5475
|
}
|
|
5476
|
-
var h =
|
|
5476
|
+
var h = Nc(m, { throttle: l });
|
|
5477
5477
|
return {
|
|
5478
5478
|
disable: function() {
|
|
5479
5479
|
d = !0, u = !1, p();
|
|
@@ -5486,18 +5486,18 @@ function Nc(e) {
|
|
|
5486
5486
|
return {
|
|
5487
5487
|
isIdle: u,
|
|
5488
5488
|
isDisabled: d,
|
|
5489
|
-
active: u ? 0 :
|
|
5490
|
-
idle: u ?
|
|
5489
|
+
active: u ? 0 : Fc(f, d),
|
|
5490
|
+
idle: u ? Fc(n, d) : 0
|
|
5491
5491
|
};
|
|
5492
5492
|
}
|
|
5493
5493
|
};
|
|
5494
5494
|
}
|
|
5495
|
-
function
|
|
5495
|
+
function Fc(e, t) {
|
|
5496
5496
|
return t ? 0 : Math.round((/* @__PURE__ */ new Date() - e) / 1e3);
|
|
5497
5497
|
}
|
|
5498
5498
|
//#endregion
|
|
5499
5499
|
//#region src/services/analytics/element-tracker.ts
|
|
5500
|
-
var
|
|
5500
|
+
var Ic = 5e3, Lc = class {
|
|
5501
5501
|
element;
|
|
5502
5502
|
isInViewport = !1;
|
|
5503
5503
|
isAwake = !1;
|
|
@@ -5514,11 +5514,11 @@ var Fc = 5e3, Ic = class {
|
|
|
5514
5514
|
e.forEach((e) => {
|
|
5515
5515
|
this.handleInViewPort(e.isIntersecting);
|
|
5516
5516
|
});
|
|
5517
|
-
}, { threshold: 0 }), this.observer.observe(this.element),
|
|
5517
|
+
}, { threshold: 0 }), this.observer.observe(this.element), Pc({
|
|
5518
5518
|
onIdle: (e) => this.handleAwake(!1, e),
|
|
5519
5519
|
onWakeUp: (e) => this.handleAwake(!0, e),
|
|
5520
|
-
timeout:
|
|
5521
|
-
}),
|
|
5520
|
+
timeout: Ic
|
|
5521
|
+
}), hc({
|
|
5522
5522
|
25: this.handleScroll.bind(this),
|
|
5523
5523
|
50: this.handleScroll.bind(this),
|
|
5524
5524
|
75: this.handleScroll.bind(this),
|
|
@@ -5533,7 +5533,7 @@ var Fc = 5e3, Ic = class {
|
|
|
5533
5533
|
e ? (this.isAwake = !0, this.trackInViewport()) : this.handleAwake(!1), this.isInViewport = e;
|
|
5534
5534
|
}
|
|
5535
5535
|
handleAwake(e, t = Math.round((Date.now() - this.lastEventAt) / 1e3)) {
|
|
5536
|
-
this.isAwake = e, this.lastEventAt = e ? Date.now() - t *
|
|
5536
|
+
this.isAwake = e, this.lastEventAt = e ? Date.now() - t * Ic : Date.now(), this.isInViewport && this.trackAwake(e, t);
|
|
5537
5537
|
}
|
|
5538
5538
|
handleScroll(e) {
|
|
5539
5539
|
this.scrollCallback && this.scrollCallback(e);
|
|
@@ -5552,17 +5552,17 @@ var Fc = 5e3, Ic = class {
|
|
|
5552
5552
|
};
|
|
5553
5553
|
//#endregion
|
|
5554
5554
|
//#region src/utils/onDomContentLoaded.ts
|
|
5555
|
-
function
|
|
5555
|
+
function Rc(e) {
|
|
5556
5556
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : e();
|
|
5557
5557
|
}
|
|
5558
|
-
function
|
|
5558
|
+
function zc() {
|
|
5559
5559
|
return new Promise((e) => {
|
|
5560
|
-
|
|
5560
|
+
Rc(() => e());
|
|
5561
5561
|
});
|
|
5562
5562
|
}
|
|
5563
5563
|
//#endregion
|
|
5564
5564
|
//#region ../../node_modules/.pnpm/saturated@1.0.0/node_modules/saturated/dist/saturated.mjs
|
|
5565
|
-
function
|
|
5565
|
+
function Bc(e, t) {
|
|
5566
5566
|
t ||= {};
|
|
5567
5567
|
var n, r, i = [], a = t.max || Infinity;
|
|
5568
5568
|
function o() {
|
|
@@ -5586,14 +5586,14 @@ function zc(e, t) {
|
|
|
5586
5586
|
}
|
|
5587
5587
|
//#endregion
|
|
5588
5588
|
//#region src/services/analytics/session-id.ts
|
|
5589
|
-
var
|
|
5590
|
-
function
|
|
5591
|
-
let e = sessionStorage.getItem(
|
|
5592
|
-
return e || (e = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(
|
|
5589
|
+
var Vc = "sesamy_session_id";
|
|
5590
|
+
function Hc() {
|
|
5591
|
+
let e = sessionStorage.getItem(Vc);
|
|
5592
|
+
return e || (e = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(Vc, e)), e;
|
|
5593
5593
|
}
|
|
5594
5594
|
//#endregion
|
|
5595
5595
|
//#region src/utils/selector.ts
|
|
5596
|
-
function
|
|
5596
|
+
function Uc(e) {
|
|
5597
5597
|
function t(e) {
|
|
5598
5598
|
return e.id ? `#${e.id}` : e.classList.length > 0 ? Array.from(e.classList).map((e) => `.${e}`).join("") : null;
|
|
5599
5599
|
}
|
|
@@ -5617,15 +5617,15 @@ function Hc(e) {
|
|
|
5617
5617
|
}
|
|
5618
5618
|
//#endregion
|
|
5619
5619
|
//#region src/utils/cleanObject.ts
|
|
5620
|
-
function
|
|
5620
|
+
function Wc(e) {
|
|
5621
5621
|
return e ? Object.fromEntries(Object.entries(e).filter(([e, t]) => t !== void 0)) : {};
|
|
5622
5622
|
}
|
|
5623
5623
|
//#endregion
|
|
5624
5624
|
//#region src/services/content/index.ts
|
|
5625
|
-
function
|
|
5625
|
+
function Gc(e) {
|
|
5626
5626
|
return e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
5627
5627
|
}
|
|
5628
|
-
var
|
|
5628
|
+
var Q = {
|
|
5629
5629
|
article: { selector: "sesamy-article" },
|
|
5630
5630
|
image: {
|
|
5631
5631
|
selector: "img",
|
|
@@ -5695,14 +5695,14 @@ function Zc() {
|
|
|
5695
5695
|
function Qc(e, t) {
|
|
5696
5696
|
Kc = e.content || [];
|
|
5697
5697
|
let n = Xc();
|
|
5698
|
-
n && n.type === "article" && (
|
|
5699
|
-
...
|
|
5700
|
-
...
|
|
5698
|
+
n && n.type === "article" && (Q = {
|
|
5699
|
+
...Q,
|
|
5700
|
+
...Wc(n.selectors)
|
|
5701
5701
|
}, qc = n.enablePaywallSettingsUrlFallback || !1), Jc = t;
|
|
5702
5702
|
}
|
|
5703
5703
|
function $c(e, t) {
|
|
5704
5704
|
let { selector: n, attribute: r } = t;
|
|
5705
|
-
return n ===
|
|
5705
|
+
return n === Q.article.selector || r && e.hasAttribute(r) ? e : e.querySelector(n);
|
|
5706
5706
|
}
|
|
5707
5707
|
function el(e, t, n = !1) {
|
|
5708
5708
|
if (e) {
|
|
@@ -5781,7 +5781,7 @@ function cl(e) {
|
|
|
5781
5781
|
function ll() {
|
|
5782
5782
|
if (nl) return nl;
|
|
5783
5783
|
let e = il("NewsArticle") || il("Article") || il("BlogPosting") || il("WebPage"), t = (...e) => e.find((e) => e != null && e !== "") || void 0;
|
|
5784
|
-
return nl =
|
|
5784
|
+
return nl = Wc({
|
|
5785
5785
|
contentType: e ? Array.isArray(e["@type"]) ? e["@type"][0] : e["@type"] : void 0,
|
|
5786
5786
|
authors: sl(e?.author) || (tl("article:author").length > 0 ? tl("article:author").map((e) => ({ name: e })) : void 0) || ($("author") ? [{ name: $("author") }] : void 0),
|
|
5787
5787
|
keywords: ((...e) => e.find((e) => e && e.length > 0))(cl(e?.keywords), cl($("keywords"))),
|
|
@@ -5815,35 +5815,42 @@ function dl({ publisherContentId: e, key: t, defaultValue: n = "" }) {
|
|
|
5815
5815
|
return r?.getAttribute(t) || $(`sesamy:${t}`) || $(`sesamy:${i}`) || $(`og:${t}`) || $(t) || n;
|
|
5816
5816
|
}
|
|
5817
5817
|
function fl() {
|
|
5818
|
-
let e = document.querySelectorAll(
|
|
5818
|
+
let e = document.querySelectorAll(Q.article.selector);
|
|
5819
5819
|
return Array.from(e).map(pl).filter((e) => e !== null);
|
|
5820
5820
|
}
|
|
5821
5821
|
function pl(e) {
|
|
5822
5822
|
let t = typeof e == "string" ? document.querySelector(e) : e;
|
|
5823
5823
|
if (!t) return null;
|
|
5824
|
-
let n =
|
|
5824
|
+
let n = Q.article.selector;
|
|
5825
|
+
if (n) try {
|
|
5826
|
+
if (!t.matches(n)) {
|
|
5827
|
+
let e = t.closest(n);
|
|
5828
|
+
e && (t = e);
|
|
5829
|
+
}
|
|
5830
|
+
} catch {}
|
|
5831
|
+
let r = {
|
|
5825
5832
|
element: t,
|
|
5826
|
-
selector: typeof e == "string" ? e :
|
|
5827
|
-
},
|
|
5828
|
-
let { transform: o, collect: s = !1 } = a || {}, c = el($c(t,
|
|
5833
|
+
selector: typeof e == "string" ? e : Uc(t)
|
|
5834
|
+
}, i = (e, n, i, a) => {
|
|
5835
|
+
let { transform: o, collect: s = !1 } = a || {}, c = el($c(t, n), n, s), l = dl({
|
|
5829
5836
|
publisherContentId: i,
|
|
5830
|
-
key:
|
|
5837
|
+
key: Gc(String(e))
|
|
5831
5838
|
}), u = c || l || void 0;
|
|
5832
|
-
u && (
|
|
5839
|
+
u && (r[e] = o ? o(u) : u);
|
|
5833
5840
|
};
|
|
5834
|
-
|
|
5841
|
+
i("id", Q.id), i("title", Q.title, r.id), i("excerpt", Q.excerpt, r.id), i("image", Q.image, r.id), i("price", Q.price, r.id, { transform: (e) => {
|
|
5835
5842
|
let t = parseFloat(e);
|
|
5836
5843
|
return Number.isNaN(t) ? void 0 : t;
|
|
5837
|
-
} }),
|
|
5838
|
-
let
|
|
5839
|
-
if (
|
|
5844
|
+
} }), i("currency", Q.currency, r.id), i("url", Q.url, r.id), i("pass", Q.pass, r.id, { collect: !0 }), i("paywallUrl", Q.paywallUrl, r.id), i("accessLevel", Q.accessLevel, r.id, { transform: (e) => e || "entitlement" });
|
|
5845
|
+
let a = Xc();
|
|
5846
|
+
if (a && a.type === "article" && (a.pass && (r.pass = r.pass ? `${r.pass},${a.pass}` : a.pass), a.price && !r.price && (r.price = a.price.amount), a.price?.currency && !r.currency && (r.currency = a.price.currency), a.paywallUrl && !r.paywallUrl && (r.paywallUrl = a.paywallUrl)), qc && !r.paywallUrl) {
|
|
5840
5847
|
let e = document.querySelector("sesamy-paywall");
|
|
5841
5848
|
if (e) {
|
|
5842
5849
|
let t = e.getAttribute("settings-url");
|
|
5843
|
-
t && (
|
|
5850
|
+
t && (r.paywallUrl = t);
|
|
5844
5851
|
}
|
|
5845
5852
|
}
|
|
5846
|
-
return
|
|
5853
|
+
return r.url ||= window.location.href, r.metadata = ll(), r;
|
|
5847
5854
|
}
|
|
5848
5855
|
async function ml(e) {
|
|
5849
5856
|
let t = e === void 0 ? fl()[0] ?? null : pl(e);
|
|
@@ -5882,7 +5889,7 @@ async function hl(e, t) {
|
|
|
5882
5889
|
if (!e.token) throw Error("Could not get access token");
|
|
5883
5890
|
a = e.token;
|
|
5884
5891
|
}
|
|
5885
|
-
let o = t ||
|
|
5892
|
+
let o = t || Uc(n.parentElement || n);
|
|
5886
5893
|
return Jc.proxy.getContent(a, r.url, o);
|
|
5887
5894
|
}
|
|
5888
5895
|
function gl(e, t = {}) {
|
|
@@ -5955,9 +5962,9 @@ function Sl(e) {
|
|
|
5955
5962
|
properties: n,
|
|
5956
5963
|
clientId: xl,
|
|
5957
5964
|
requestId: Math.random().toString(36).slice(2, 9),
|
|
5958
|
-
sessionId:
|
|
5965
|
+
sessionId: Hc(),
|
|
5959
5966
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5960
|
-
version:
|
|
5967
|
+
version: cc,
|
|
5961
5968
|
event: e.event,
|
|
5962
5969
|
context: {
|
|
5963
5970
|
...e.context,
|
|
@@ -5970,14 +5977,14 @@ function Sl(e) {
|
|
|
5970
5977
|
},
|
|
5971
5978
|
campaign: t,
|
|
5972
5979
|
locale: navigator.language,
|
|
5973
|
-
library:
|
|
5980
|
+
library: sc,
|
|
5974
5981
|
userAgent: navigator.userAgent,
|
|
5975
5982
|
clientId: xl
|
|
5976
5983
|
}
|
|
5977
5984
|
};
|
|
5978
5985
|
}));
|
|
5979
5986
|
}
|
|
5980
|
-
var Cl =
|
|
5987
|
+
var Cl = Bc(async (e) => {
|
|
5981
5988
|
if (e.length > 0) {
|
|
5982
5989
|
let t = Sl(e);
|
|
5983
5990
|
vl ? navigator.sendBeacon(bl, t) : (await fetch(bl, {
|
|
@@ -6003,7 +6010,7 @@ function El(e) {
|
|
|
6003
6010
|
wl(e);
|
|
6004
6011
|
}
|
|
6005
6012
|
function Dl(e, t, n) {
|
|
6006
|
-
yl = t, bl = `${
|
|
6013
|
+
yl = t, bl = `${Ai("logs", n)}/events`, xl = e;
|
|
6007
6014
|
}
|
|
6008
6015
|
var Ol = {
|
|
6009
6016
|
name: "custom-analytics-plugin",
|
|
@@ -6042,7 +6049,7 @@ var Ol = {
|
|
|
6042
6049
|
};
|
|
6043
6050
|
//#endregion
|
|
6044
6051
|
//#region src/services/analytics/plugins/attribution-tracker.ts
|
|
6045
|
-
|
|
6052
|
+
Vn();
|
|
6046
6053
|
var kl = [
|
|
6047
6054
|
"source",
|
|
6048
6055
|
"medium",
|
|
@@ -6054,13 +6061,13 @@ function Nl(e) {
|
|
|
6054
6061
|
return e ? Date.now() - parseInt(e, 10) > jl : !0;
|
|
6055
6062
|
}
|
|
6056
6063
|
function Pl(e, t) {
|
|
6057
|
-
|
|
6064
|
+
Ji("statistics") ? qs(e, t) : Ml[e] = t;
|
|
6058
6065
|
}
|
|
6059
6066
|
function Fl(e) {
|
|
6060
|
-
return
|
|
6067
|
+
return Ji("statistics") ? Ks(e) : Ml[e] || null;
|
|
6061
6068
|
}
|
|
6062
6069
|
function Il() {
|
|
6063
|
-
for (let [e, t] of Object.entries(Ml))
|
|
6070
|
+
for (let [e, t] of Object.entries(Ml)) qs(e, t);
|
|
6064
6071
|
}
|
|
6065
6072
|
function Ll() {
|
|
6066
6073
|
let e = document.referrer || "";
|
|
@@ -6079,8 +6086,8 @@ function Rl() {
|
|
|
6079
6086
|
return {
|
|
6080
6087
|
name: "attribution-tracking",
|
|
6081
6088
|
initialize() {
|
|
6082
|
-
Ll(), typeof window < "u" && window.addEventListener(
|
|
6083
|
-
|
|
6089
|
+
Ll(), typeof window < "u" && window.addEventListener(J.CONSENT_CHANGED, () => {
|
|
6090
|
+
Ji("statistics") && Il();
|
|
6084
6091
|
});
|
|
6085
6092
|
},
|
|
6086
6093
|
campaign({ payload: e }) {
|
|
@@ -6105,10 +6112,10 @@ function Rl() {
|
|
|
6105
6112
|
}
|
|
6106
6113
|
//#endregion
|
|
6107
6114
|
//#region src/services/analytics/index.ts
|
|
6108
|
-
|
|
6115
|
+
Vn();
|
|
6109
6116
|
var zl = /* @__PURE__ */ new Map(), Bl = /* @__PURE__ */ new Map(), Vl = [];
|
|
6110
6117
|
function Hl() {
|
|
6111
|
-
return `session:${
|
|
6118
|
+
return `session:${Hc()}`;
|
|
6112
6119
|
}
|
|
6113
6120
|
function Ul(e) {
|
|
6114
6121
|
El({
|
|
@@ -6128,8 +6135,8 @@ function Wl({ clientId: e, enabled: t = !0, environment: n }) {
|
|
|
6128
6135
|
document.visibilityState !== "visible" && zl.forEach((e, t) => {
|
|
6129
6136
|
e.bind(t)();
|
|
6130
6137
|
});
|
|
6131
|
-
}),
|
|
6132
|
-
let e = new
|
|
6138
|
+
}), fc(), Rc(() => {
|
|
6139
|
+
let e = new Lc({
|
|
6133
6140
|
element: document.body,
|
|
6134
6141
|
viewCallback: () => {
|
|
6135
6142
|
Yl();
|
|
@@ -6157,7 +6164,7 @@ function Wl({ clientId: e, enabled: t = !0, environment: n }) {
|
|
|
6157
6164
|
}), zl.set(document.body, () => {
|
|
6158
6165
|
e.handleVisibilityChange();
|
|
6159
6166
|
});
|
|
6160
|
-
}), window.addEventListener(
|
|
6167
|
+
}), window.addEventListener(J.AUTHENTICATED, async (e) => {
|
|
6161
6168
|
let t = e;
|
|
6162
6169
|
if (Gl()) await ql().identify(t.detail.sub);
|
|
6163
6170
|
else {
|
|
@@ -6168,7 +6175,7 @@ function Wl({ clientId: e, enabled: t = !0, environment: n }) {
|
|
|
6168
6175
|
};
|
|
6169
6176
|
Vl.push(e), Ul(e);
|
|
6170
6177
|
}
|
|
6171
|
-
}), window.addEventListener(
|
|
6178
|
+
}), window.addEventListener(J.LOGOUT, async () => {
|
|
6172
6179
|
if (Gl()) await ql().track("logout", {}), await ql().reset();
|
|
6173
6180
|
else {
|
|
6174
6181
|
let e = {
|
|
@@ -6179,18 +6186,18 @@ function Wl({ clientId: e, enabled: t = !0, environment: n }) {
|
|
|
6179
6186
|
};
|
|
6180
6187
|
Vl.push(e), Ul(e);
|
|
6181
6188
|
}
|
|
6182
|
-
}),
|
|
6183
|
-
|
|
6189
|
+
}), Ki() && !Ji("statistics") && window.addEventListener(J.CONSENT_CHANGED, () => {
|
|
6190
|
+
Ji("statistics") && Jl();
|
|
6184
6191
|
}));
|
|
6185
6192
|
}
|
|
6186
6193
|
function Gl() {
|
|
6187
|
-
return !
|
|
6194
|
+
return !Ki() || Ji("statistics");
|
|
6188
6195
|
}
|
|
6189
6196
|
var Kl;
|
|
6190
6197
|
function ql() {
|
|
6191
|
-
return Kl ||=
|
|
6192
|
-
app:
|
|
6193
|
-
version:
|
|
6198
|
+
return Kl ||= oc({
|
|
6199
|
+
app: sc,
|
|
6200
|
+
version: cc,
|
|
6194
6201
|
plugins: [Rl(), Ol]
|
|
6195
6202
|
}), Kl;
|
|
6196
6203
|
}
|
|
@@ -6233,7 +6240,7 @@ function Zl(e, t) {
|
|
|
6233
6240
|
}
|
|
6234
6241
|
//#endregion
|
|
6235
6242
|
//#region src/services/flags/index.ts
|
|
6236
|
-
|
|
6243
|
+
zn();
|
|
6237
6244
|
var Ql = "sesamyFlags";
|
|
6238
6245
|
async function $l(e) {
|
|
6239
6246
|
try {
|
|
@@ -6261,46 +6268,50 @@ async function ru() {
|
|
|
6261
6268
|
return {};
|
|
6262
6269
|
}
|
|
6263
6270
|
}
|
|
6264
|
-
|
|
6271
|
+
Vn(), Gn();
|
|
6265
6272
|
function iu(e) {
|
|
6266
|
-
let t = e.endpoint ??
|
|
6273
|
+
let t = e.endpoint ?? Ai("api2", e.environment), n = (() => {
|
|
6267
6274
|
try {
|
|
6268
|
-
let e =
|
|
6275
|
+
let e = Di(new URL(t, window.location.origin).href), n = Di(window.location.href);
|
|
6269
6276
|
return e !== null && e === n;
|
|
6270
6277
|
} catch {
|
|
6271
6278
|
return !1;
|
|
6272
6279
|
}
|
|
6273
|
-
})(), r =
|
|
6280
|
+
})(), r = e.useHttpCookies === !0, i = bi({
|
|
6274
6281
|
baseUrl: t,
|
|
6275
6282
|
tokenProvider: async () => {
|
|
6276
|
-
if (
|
|
6277
|
-
|
|
6283
|
+
if (r) return null;
|
|
6284
|
+
if (await rr()) try {
|
|
6285
|
+
let e = await ir(!1);
|
|
6278
6286
|
if (e) return `Bearer ${e}`;
|
|
6279
6287
|
if (n) return null;
|
|
6280
6288
|
} catch {}
|
|
6281
|
-
let t =
|
|
6289
|
+
let t = Ji("statistics") ? localStorage.getItem("__anon_id") : Xl();
|
|
6282
6290
|
return `Basic ${btoa(`${e.vendorId || e.clientId}|${t}:`)}`;
|
|
6283
6291
|
},
|
|
6284
|
-
libraryName:
|
|
6285
|
-
libraryVersion:
|
|
6292
|
+
libraryName: sc,
|
|
6293
|
+
libraryVersion: cc,
|
|
6286
6294
|
vendorId: e.vendorId,
|
|
6287
6295
|
cache: {
|
|
6288
|
-
mode:
|
|
6289
|
-
storage: new
|
|
6296
|
+
mode: yr.BROWSER,
|
|
6297
|
+
storage: new Oi()
|
|
6290
6298
|
}
|
|
6291
|
-
}),
|
|
6292
|
-
let r = sessionStorage.getItem(
|
|
6293
|
-
return r || (r = Date.now().toString(), sessionStorage.setItem(
|
|
6299
|
+
}), a = (e) => async (t, n) => {
|
|
6300
|
+
let r = sessionStorage.getItem(wi);
|
|
6301
|
+
return r || (r = Date.now().toString(), sessionStorage.setItem(wi, r)), e(t, {
|
|
6294
6302
|
...n,
|
|
6295
6303
|
headers: {
|
|
6296
6304
|
...n.headers,
|
|
6297
6305
|
"Cache-Timestamp": r
|
|
6298
6306
|
}
|
|
6299
6307
|
});
|
|
6300
|
-
},
|
|
6301
|
-
|
|
6308
|
+
}, o = (e) => async (t, n) => e(t, {
|
|
6309
|
+
...n,
|
|
6310
|
+
credentials: "include"
|
|
6311
|
+
}), s = (e = !0) => (t) => async (r, i) => {
|
|
6312
|
+
let a = await ir(e);
|
|
6302
6313
|
if (!a) {
|
|
6303
|
-
if (n && await
|
|
6314
|
+
if (n && await rr()) return t(r, {
|
|
6304
6315
|
...i,
|
|
6305
6316
|
credentials: "include"
|
|
6306
6317
|
});
|
|
@@ -6314,11 +6325,11 @@ function iu(e) {
|
|
|
6314
6325
|
Authorization: `Bearer ${a}`
|
|
6315
6326
|
}
|
|
6316
6327
|
});
|
|
6317
|
-
},
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6328
|
+
}, c = Fr(t).headers({ "Content-Type": "application/json" }).middlewares([
|
|
6329
|
+
a,
|
|
6330
|
+
r ? o : s(),
|
|
6331
|
+
mr(),
|
|
6332
|
+
_r({
|
|
6322
6333
|
delayTimer: 1e3,
|
|
6323
6334
|
delayRamp: (e, t) => e * t,
|
|
6324
6335
|
maxAttempts: 3,
|
|
@@ -6326,124 +6337,126 @@ function iu(e) {
|
|
|
6326
6337
|
retryOnNetworkError: !1
|
|
6327
6338
|
})
|
|
6328
6339
|
]);
|
|
6329
|
-
async function
|
|
6330
|
-
let { waitForEntitlementAfter: t, includeSignedLinks: n = !0 } = e,
|
|
6331
|
-
return n &&
|
|
6340
|
+
async function l(e = {}) {
|
|
6341
|
+
let { waitForEntitlementAfter: t, includeSignedLinks: n = !0 } = e, r = await rr() ? await i.entitlements.list({ waitForEntitlementAfter: t?.toISOString() }) : [];
|
|
6342
|
+
return n && r.push(...$i()), r;
|
|
6332
6343
|
}
|
|
6333
|
-
async function
|
|
6334
|
-
return (await
|
|
6344
|
+
async function u(e, t = []) {
|
|
6345
|
+
return (await l())?.find((n) => {
|
|
6335
6346
|
if (e) {
|
|
6336
|
-
let { sku: t, purchaseOption: r } =
|
|
6337
|
-
if ("sku" in n && t === n.sku || r && "purchaseOptionsId" in n && r === n.purchaseOptionsId ||
|
|
6347
|
+
let { sku: t, purchaseOption: r } = Ni(e);
|
|
6348
|
+
if ("sku" in n && t === n.sku || r && "purchaseOptionsId" in n && r === n.purchaseOptionsId || Fi(e, n.url)) return !0;
|
|
6338
6349
|
}
|
|
6339
|
-
return !!t.some((e) =>
|
|
6350
|
+
return !!t.some((e) => Fi(e, n.url));
|
|
6340
6351
|
});
|
|
6341
6352
|
}
|
|
6342
|
-
async function
|
|
6343
|
-
let
|
|
6344
|
-
|
|
6353
|
+
async function d(e, n, i) {
|
|
6354
|
+
let a = new URL(t, window.location.origin);
|
|
6355
|
+
a.pathname = a.pathname.replace(/\/$/, "") + "/proxy", a.searchParams.set("url", n), i && a.searchParams.set("selector", i);
|
|
6356
|
+
let o = Fr(a.toString());
|
|
6357
|
+
return o = r ? o.options({ credentials: "include" }) : o.headers({ Authorization: `Bearer ${e}` }), o.get().text();
|
|
6345
6358
|
}
|
|
6346
|
-
async function
|
|
6359
|
+
async function f(e) {
|
|
6347
6360
|
if (!e) throw Error("SKU is required to get fulfillments");
|
|
6348
|
-
return await
|
|
6361
|
+
return await rr() ? await c.get(`/fulfillments?sku=${encodeURIComponent(e)}`).json() : [];
|
|
6349
6362
|
}
|
|
6350
|
-
async function
|
|
6363
|
+
async function p(e, t) {
|
|
6351
6364
|
if (!e || !t) throw Error("SKU and itemId are required to request delivery");
|
|
6352
|
-
return (await
|
|
6353
|
-
}
|
|
6354
|
-
async function f() {
|
|
6355
|
-
return console.warn("getSubscriptions is deprecated, use getContracts instead"), o.get("/subscriptions").json();
|
|
6356
|
-
}
|
|
6357
|
-
async function p(e) {
|
|
6358
|
-
return (await r.transactions.list())?.find((t) => t.id === e);
|
|
6365
|
+
return (await c.post({ sku: e }, `/fulfillments/${encodeURIComponent(t)}/request-delivery?`).res()).ok;
|
|
6359
6366
|
}
|
|
6360
6367
|
async function m() {
|
|
6361
|
-
return
|
|
6368
|
+
return console.warn("getSubscriptions is deprecated, use getContracts instead"), c.get("/subscriptions").json();
|
|
6362
6369
|
}
|
|
6363
6370
|
async function h(e) {
|
|
6364
|
-
|
|
6365
|
-
return $r(), t.ok;
|
|
6371
|
+
return (await i.transactions.list())?.find((t) => t.id === e);
|
|
6366
6372
|
}
|
|
6367
|
-
async function g(
|
|
6368
|
-
|
|
6369
|
-
return Un(Y.USER_ATTRIBUTE_CHANGED, {}), $r(), t.ok;
|
|
6373
|
+
async function g() {
|
|
6374
|
+
return await c.url("/tags").get().json();
|
|
6370
6375
|
}
|
|
6371
6376
|
async function _(e) {
|
|
6372
|
-
|
|
6377
|
+
let t = await c.url(`/tags/${encodeURIComponent(e)}`).delete().res();
|
|
6378
|
+
return ei(), t.ok;
|
|
6373
6379
|
}
|
|
6374
|
-
async function v() {
|
|
6375
|
-
let
|
|
6376
|
-
|
|
6377
|
-
return t;
|
|
6380
|
+
async function v(e) {
|
|
6381
|
+
let t = await c.url("/tags").post(encodeURIComponent(e)).res();
|
|
6382
|
+
return Wn(J.USER_ATTRIBUTE_CHANGED, {}), ei(), t.ok;
|
|
6378
6383
|
}
|
|
6379
6384
|
async function y(e) {
|
|
6380
|
-
return await
|
|
6385
|
+
return (await i.tallies.get(e)).value;
|
|
6381
6386
|
}
|
|
6382
|
-
async function b(
|
|
6383
|
-
|
|
6387
|
+
async function b() {
|
|
6388
|
+
let e = await i.tallies.list(), t = {};
|
|
6389
|
+
for (let n of e) t[n.id] = n.value;
|
|
6390
|
+
return t;
|
|
6384
6391
|
}
|
|
6385
|
-
async function x() {
|
|
6386
|
-
return
|
|
6392
|
+
async function x(e) {
|
|
6393
|
+
return await i.tallies.delete(e);
|
|
6387
6394
|
}
|
|
6388
|
-
async function S(e) {
|
|
6389
|
-
|
|
6390
|
-
return $r(), t.ok;
|
|
6395
|
+
async function S(e, t) {
|
|
6396
|
+
return await i.tallies.push(e, t);
|
|
6391
6397
|
}
|
|
6392
6398
|
async function C() {
|
|
6393
|
-
return (await
|
|
6399
|
+
return !await ir(!1) && !await rr() ? null : await c.url("/profile").get().json();
|
|
6400
|
+
}
|
|
6401
|
+
async function w(e) {
|
|
6402
|
+
let t = await c.url("/profile").patch(e).res();
|
|
6403
|
+
return ei(), t.ok;
|
|
6404
|
+
}
|
|
6405
|
+
async function T() {
|
|
6406
|
+
return (await c.url("/profile/spotify-link").get().json()).isSpotifyLinked;
|
|
6394
6407
|
}
|
|
6395
|
-
async function
|
|
6396
|
-
return (await
|
|
6408
|
+
async function E() {
|
|
6409
|
+
return (await c.url("/profile/unlink-spotify").post().res()).ok;
|
|
6397
6410
|
}
|
|
6398
|
-
async function
|
|
6399
|
-
let n = await
|
|
6411
|
+
async function D(t) {
|
|
6412
|
+
let n = await ir(!1);
|
|
6400
6413
|
if (!n) throw Error("No access token available");
|
|
6401
|
-
let r = new URL(`${
|
|
6414
|
+
let r = new URL(`${Ai("access-sync", e.environment)}/spotify/sesamy-callback`);
|
|
6402
6415
|
r.searchParams.set("access_token", n), r.searchParams.set("state", t), window.location.href = r.toString();
|
|
6403
6416
|
}
|
|
6404
|
-
async function
|
|
6405
|
-
let t = await
|
|
6406
|
-
return t.length &&
|
|
6417
|
+
async function O(e) {
|
|
6418
|
+
let t = await c.url(`/products/${encodeURIComponent(e)}/auto-onboard`).post().json();
|
|
6419
|
+
return t.length && ei(), t;
|
|
6407
6420
|
}
|
|
6408
|
-
async function
|
|
6409
|
-
let { shortlink: n } = await
|
|
6421
|
+
async function k(e, t = 3600) {
|
|
6422
|
+
let { shortlink: n } = await Fr(Ci).post({
|
|
6410
6423
|
url: e,
|
|
6411
6424
|
ttl: t
|
|
6412
6425
|
}).json();
|
|
6413
6426
|
return n;
|
|
6414
6427
|
}
|
|
6415
|
-
async function
|
|
6416
|
-
let n = await
|
|
6428
|
+
async function A(t) {
|
|
6429
|
+
let n = await ir(!1, !0), r, i = t.language || ji(), a = aa();
|
|
6417
6430
|
switch (t.target) {
|
|
6418
6431
|
case "account":
|
|
6419
|
-
r = new URL(`${
|
|
6432
|
+
r = new URL(`${Ai("account", e.environment)}/${encodeURIComponent(t.language || i)}/subscriptions/${encodeURIComponent(e.vendorId || e.clientId)}${t.contractId ? `/${encodeURIComponent(t.contractId)}` : ""}`), r.searchParams.set("sesamy-redirect-url", t.redirectUrl || window.location.href);
|
|
6420
6433
|
break;
|
|
6421
6434
|
case "change-payment":
|
|
6422
|
-
r = new URL(`${
|
|
6435
|
+
r = new URL(`${Ai("account", e.environment)}/${encodeURIComponent(t.language || i)}/subscriptions/${encodeURIComponent(e.vendorId || e.clientId)}/${encodeURIComponent(t.contractId)}/change-payment-method`), r.searchParams.set("sesamy-redirect-url", t.redirectUrl || window.location.href);
|
|
6423
6436
|
break;
|
|
6424
6437
|
case "change-plan":
|
|
6425
|
-
r = new URL(`${
|
|
6438
|
+
r = new URL(`${Ai("account", e.environment)}/${encodeURIComponent(t.language || i)}/subscriptions/${encodeURIComponent(e.vendorId || e.clientId)}/${encodeURIComponent(t.contractId)}/edit-plan`), r.searchParams.set("sesamy-redirect-url", t.redirectUrl || window.location.href);
|
|
6426
6439
|
break;
|
|
6427
6440
|
case "consume":
|
|
6428
|
-
r = new URL(`${
|
|
6441
|
+
r = new URL(`${Ai("consume", e.environment)}/${encodeURIComponent(t.language || i)}/@${encodeURIComponent(e.vendorId || e.clientId)}/${encodeURIComponent(t.sku)}`), t.episodeId ? r.href += `/${t.episodeId}` : r.href += "/listen", r.searchParams.set("sesamy-redirect-url", t.redirectUrl || window.location.href);
|
|
6429
6442
|
break;
|
|
6430
6443
|
case "checkout":
|
|
6431
|
-
r =
|
|
6444
|
+
r = Zi(e, {
|
|
6432
6445
|
language: i,
|
|
6433
6446
|
...t
|
|
6434
6447
|
}, a);
|
|
6435
6448
|
break;
|
|
6436
6449
|
default: throw Error("Invalid target");
|
|
6437
6450
|
}
|
|
6438
|
-
return n && (r.hash = `#access_token=${n}`), t.shorten ?
|
|
6451
|
+
return n && (r.hash = `#access_token=${n}`), t.shorten ? k(r.href, t.ttl) : r.href;
|
|
6439
6452
|
}
|
|
6440
|
-
async function
|
|
6441
|
-
let t = await
|
|
6453
|
+
async function j() {
|
|
6454
|
+
let t = await ir(!1), n = new URL(`${Ai("account", e.environment)}/subscriptions/${e.vendorId || e.clientId}`);
|
|
6442
6455
|
t && (n.hash = `#access_token=${t}`), window.location.href = n.toString();
|
|
6443
6456
|
}
|
|
6444
|
-
async function
|
|
6445
|
-
let t =
|
|
6446
|
-
if (
|
|
6457
|
+
async function M(e) {
|
|
6458
|
+
let t = aa();
|
|
6459
|
+
if (Ji("marketing")) {
|
|
6447
6460
|
let e = [
|
|
6448
6461
|
"_ga",
|
|
6449
6462
|
"_gid",
|
|
@@ -6455,8 +6468,8 @@ function iu(e) {
|
|
|
6455
6468
|
e.includes(r) && !t[r] && (t[r] = i);
|
|
6456
6469
|
});
|
|
6457
6470
|
}
|
|
6458
|
-
return
|
|
6459
|
-
language:
|
|
6471
|
+
return i.checkouts.create({
|
|
6472
|
+
language: ji(),
|
|
6460
6473
|
...e,
|
|
6461
6474
|
attribution: {
|
|
6462
6475
|
...t,
|
|
@@ -6465,55 +6478,55 @@ function iu(e) {
|
|
|
6465
6478
|
});
|
|
6466
6479
|
}
|
|
6467
6480
|
return {
|
|
6468
|
-
autoOnboardProduct:
|
|
6469
|
-
bills:
|
|
6481
|
+
autoOnboardProduct: O,
|
|
6482
|
+
bills: i.bills,
|
|
6470
6483
|
checkouts: {
|
|
6471
|
-
create:
|
|
6472
|
-
get:
|
|
6473
|
-
update:
|
|
6484
|
+
create: M,
|
|
6485
|
+
get: i.checkouts.get,
|
|
6486
|
+
update: i.checkouts.update
|
|
6474
6487
|
},
|
|
6475
6488
|
content: {
|
|
6476
6489
|
list: fl,
|
|
6477
6490
|
get: pl,
|
|
6478
|
-
getLanguage:
|
|
6491
|
+
getLanguage: ji,
|
|
6479
6492
|
unlock: hl,
|
|
6480
6493
|
getPropertyFromHTML: dl
|
|
6481
6494
|
},
|
|
6482
|
-
contracts:
|
|
6483
|
-
deleteTag:
|
|
6484
|
-
deleteTally:
|
|
6485
|
-
entitlements:
|
|
6495
|
+
contracts: i.contracts,
|
|
6496
|
+
deleteTag: _,
|
|
6497
|
+
deleteTally: x,
|
|
6498
|
+
entitlements: i.entitlements,
|
|
6486
6499
|
flags: {
|
|
6487
6500
|
get: tu,
|
|
6488
6501
|
set: eu,
|
|
6489
6502
|
list: ru,
|
|
6490
6503
|
delete: nu
|
|
6491
6504
|
},
|
|
6492
|
-
generateLink:
|
|
6493
|
-
getProxyContent:
|
|
6494
|
-
getEntitlements:
|
|
6495
|
-
getFulfillments:
|
|
6496
|
-
requestDelivery:
|
|
6497
|
-
hasAccess:
|
|
6498
|
-
isSpotifyLinked:
|
|
6499
|
-
linkSpotify:
|
|
6500
|
-
openHostedAccountPage:
|
|
6501
|
-
paywalls:
|
|
6502
|
-
paymentIssues:
|
|
6503
|
-
getProfile:
|
|
6504
|
-
products:
|
|
6505
|
-
getSubscriptions:
|
|
6506
|
-
getTally:
|
|
6507
|
-
getTallies:
|
|
6508
|
-
getTags:
|
|
6509
|
-
getTransaction:
|
|
6510
|
-
transactions:
|
|
6511
|
-
userMetadata:
|
|
6512
|
-
pushTally:
|
|
6513
|
-
setTag:
|
|
6514
|
-
unlinkSpotify:
|
|
6515
|
-
updateProfile:
|
|
6516
|
-
vendor:
|
|
6505
|
+
generateLink: A,
|
|
6506
|
+
getProxyContent: d,
|
|
6507
|
+
getEntitlements: l,
|
|
6508
|
+
getFulfillments: f,
|
|
6509
|
+
requestDelivery: p,
|
|
6510
|
+
hasAccess: u,
|
|
6511
|
+
isSpotifyLinked: T,
|
|
6512
|
+
linkSpotify: D,
|
|
6513
|
+
openHostedAccountPage: j,
|
|
6514
|
+
paywalls: i.paywalls,
|
|
6515
|
+
paymentIssues: i.paymentIssues,
|
|
6516
|
+
getProfile: C,
|
|
6517
|
+
products: i.products,
|
|
6518
|
+
getSubscriptions: m,
|
|
6519
|
+
getTally: y,
|
|
6520
|
+
getTallies: b,
|
|
6521
|
+
getTags: g,
|
|
6522
|
+
getTransaction: h,
|
|
6523
|
+
transactions: i.transactions,
|
|
6524
|
+
userMetadata: i.userMetadata,
|
|
6525
|
+
pushTally: S,
|
|
6526
|
+
setTag: v,
|
|
6527
|
+
unlinkSpotify: E,
|
|
6528
|
+
updateProfile: w,
|
|
6529
|
+
vendor: i.vendor
|
|
6517
6530
|
};
|
|
6518
6531
|
}
|
|
6519
6532
|
//#endregion
|
|
@@ -6924,7 +6937,7 @@ function xu(e) {
|
|
|
6924
6937
|
function Su() {
|
|
6925
6938
|
return bu;
|
|
6926
6939
|
}
|
|
6927
|
-
|
|
6940
|
+
zn(), Vn();
|
|
6928
6941
|
var Cu = null;
|
|
6929
6942
|
function wu() {
|
|
6930
6943
|
return Su()?.getDcaClient() ?? null;
|
|
@@ -6935,7 +6948,7 @@ function Tu(e) {
|
|
|
6935
6948
|
q("[capsule] No capsule plugin registered — capsule disabled");
|
|
6936
6949
|
return;
|
|
6937
6950
|
}
|
|
6938
|
-
t.init(e, { getToken:
|
|
6951
|
+
t.init(e, { getToken: ir }), q("[capsule] DcaClient initialized"), window.addEventListener(J.AUTH_INITIALIZED, () => {
|
|
6939
6952
|
Eu();
|
|
6940
6953
|
});
|
|
6941
6954
|
}
|
|
@@ -6944,7 +6957,7 @@ async function Eu() {
|
|
|
6944
6957
|
if (!e) return null;
|
|
6945
6958
|
let t = !1;
|
|
6946
6959
|
try {
|
|
6947
|
-
t = await
|
|
6960
|
+
t = await rr();
|
|
6948
6961
|
} catch (e) {
|
|
6949
6962
|
return q(`[capsule] isAuthenticated error: ${e}`), Du(), null;
|
|
6950
6963
|
}
|
|
@@ -7112,7 +7125,7 @@ async function Lu() {
|
|
|
7112
7125
|
async function Ru(e) {
|
|
7113
7126
|
let t = [], n = {
|
|
7114
7127
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7115
|
-
sdkVersion:
|
|
7128
|
+
sdkVersion: cc,
|
|
7116
7129
|
clientId: e.clientId,
|
|
7117
7130
|
fallbackId: e.fallbackId
|
|
7118
7131
|
};
|
|
@@ -7137,9 +7150,9 @@ async function Ru(e) {
|
|
|
7137
7150
|
} catch (e) {
|
|
7138
7151
|
t.push(`SessionStorage collection failed: ${e.message}`);
|
|
7139
7152
|
}
|
|
7140
|
-
if (await
|
|
7153
|
+
if (await rr()) {
|
|
7141
7154
|
try {
|
|
7142
|
-
let e = await
|
|
7155
|
+
let e = await ir(!1);
|
|
7143
7156
|
if (e) {
|
|
7144
7157
|
let t = e.split(".");
|
|
7145
7158
|
t.length >= 2 && (n.userId = JSON.parse(atob(t[1])).sub);
|
|
@@ -7176,9 +7189,9 @@ async function Ru(e) {
|
|
|
7176
7189
|
return t.length > 0 && (n.errors = t), n;
|
|
7177
7190
|
}
|
|
7178
7191
|
async function zu(e, t, n) {
|
|
7179
|
-
let r = `${
|
|
7180
|
-
if (await
|
|
7181
|
-
let e = await
|
|
7192
|
+
let r = `${Ai("api2", t)}/diagnostics`, i = { "Content-Type": "application/json" };
|
|
7193
|
+
if (await rr()) try {
|
|
7194
|
+
let e = await ir(!1);
|
|
7182
7195
|
e && (i.Authorization = `Bearer ${e}`);
|
|
7183
7196
|
} catch {}
|
|
7184
7197
|
if (!i.Authorization && n) {
|
|
@@ -7198,7 +7211,7 @@ async function zu(e, t, n) {
|
|
|
7198
7211
|
}
|
|
7199
7212
|
//#endregion
|
|
7200
7213
|
//#region src/handlers/user-diagnostics.ts
|
|
7201
|
-
|
|
7214
|
+
zn();
|
|
7202
7215
|
var Bu = "user-diagnostics", Vu = "diagnostics-id", Hu = "\n .sesamy-diagnostics-modal {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;\n background: white;\n border-radius: 12px;\n padding: 24px;\n max-width: 400px;\n width: 90vw;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n text-align: center;\n }\n\n .sesamy-diagnostics-modal h2 {\n margin: 0 0 12px;\n font-size: 20px;\n font-weight: 600;\n color: #1a1a1a;\n }\n\n .sesamy-diagnostics-modal p {\n margin: 0 0 20px;\n color: #666;\n font-size: 14px;\n line-height: 1.5;\n }\n\n .sesamy-diagnostics-modal .buttons {\n display: flex;\n gap: 12px;\n justify-content: center;\n }\n\n .sesamy-diagnostics-modal button {\n padding: 10px 20px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n border: none;\n }\n\n .sesamy-diagnostics-modal .btn-primary {\n background: #2563eb;\n color: white;\n }\n\n .sesamy-diagnostics-modal .btn-primary:hover {\n background: #1d4ed8;\n }\n\n .sesamy-diagnostics-modal .btn-primary:disabled {\n background: #93c5fd;\n cursor: not-allowed;\n }\n\n .sesamy-diagnostics-modal .btn-secondary {\n background: #f3f4f6;\n color: #374151;\n }\n\n .sesamy-diagnostics-modal .btn-secondary:hover {\n background: #e5e7eb;\n }\n\n .sesamy-diagnostics-modal .status {\n margin-top: 16px;\n font-size: 13px;\n }\n\n .sesamy-diagnostics-modal .status.success {\n color: #059669;\n }\n\n .sesamy-diagnostics-modal .status.error {\n color: #dc2626;\n }\n\n .sesamy-diagnostics-modal .status.loading {\n color: #6b7280;\n }\n\n .sesamy-diagnostics-modal .spinner {\n display: inline-block;\n width: 14px;\n height: 14px;\n border: 2px solid #e5e7eb;\n border-top-color: #2563eb;\n border-radius: 50%;\n animation: spin 0.8s linear infinite;\n margin-right: 8px;\n vertical-align: middle;\n }\n\n @keyframes spin {\n to { transform: rotate(360deg); }\n }\n";
|
|
7203
7216
|
function Uu() {
|
|
7204
7217
|
let e = document.createElement("div");
|
|
@@ -7259,23 +7272,23 @@ async function Ku(e) {
|
|
|
7259
7272
|
}
|
|
7260
7273
|
//#endregion
|
|
7261
7274
|
//#region src/javascript-api.ts
|
|
7262
|
-
|
|
7275
|
+
zn();
|
|
7263
7276
|
function qu(e) {
|
|
7264
7277
|
let { autoOnboardProduct: t, bills: n, checkouts: r, contracts: i, deleteTag: a, deleteTally: o, entitlements: s, generateLink: c, getEntitlements: l, getFulfillments: u, getProfile: d, getProxyContent: f, getSubscriptions: p, getTags: m, getTally: h, getTallies: g, getTransaction: _, hasAccess: v, isSpotifyLinked: y, linkSpotify: b, openHostedAccountPage: x, paywalls: S, paymentIssues: C, products: w, pushTally: T, requestDelivery: E, setTag: D, transactions: O, unlinkSpotify: k, updateProfile: A, userMetadata: j, vendor: M } = iu(e), N = () => C.list(), P = {
|
|
7265
7278
|
analytics: { track: Zl },
|
|
7266
7279
|
attribution: {
|
|
7267
|
-
get:
|
|
7268
|
-
set:
|
|
7280
|
+
get: aa,
|
|
7281
|
+
set: oa
|
|
7269
7282
|
},
|
|
7270
7283
|
auth: {
|
|
7271
7284
|
getUser: d,
|
|
7272
|
-
getTokenSilently:
|
|
7273
|
-
isAuthenticated:
|
|
7274
|
-
loginWithRedirect:
|
|
7275
|
-
loginWithPopup:
|
|
7276
|
-
login:
|
|
7277
|
-
logout:
|
|
7278
|
-
setToken:
|
|
7285
|
+
getTokenSilently: ir,
|
|
7286
|
+
isAuthenticated: rr,
|
|
7287
|
+
loginWithRedirect: sr,
|
|
7288
|
+
loginWithPopup: cr,
|
|
7289
|
+
login: or,
|
|
7290
|
+
logout: lr,
|
|
7291
|
+
setToken: ur
|
|
7279
7292
|
},
|
|
7280
7293
|
bills: n,
|
|
7281
7294
|
browser: {
|
|
@@ -7284,11 +7297,11 @@ function qu(e) {
|
|
|
7284
7297
|
isIncognito: gu
|
|
7285
7298
|
},
|
|
7286
7299
|
checkouts: r,
|
|
7287
|
-
clearCache:
|
|
7300
|
+
clearCache: ei,
|
|
7288
7301
|
content: {
|
|
7289
7302
|
list: fl,
|
|
7290
7303
|
get: pl,
|
|
7291
|
-
getLanguage:
|
|
7304
|
+
getLanguage: ji,
|
|
7292
7305
|
hasAccess: ml,
|
|
7293
7306
|
unlock: hl,
|
|
7294
7307
|
getPropertyFromHTML: dl,
|
|
@@ -7333,7 +7346,7 @@ function qu(e) {
|
|
|
7333
7346
|
},
|
|
7334
7347
|
hasAccess: v,
|
|
7335
7348
|
list: l,
|
|
7336
|
-
signedLinks:
|
|
7349
|
+
signedLinks: $i
|
|
7337
7350
|
},
|
|
7338
7351
|
events: {
|
|
7339
7352
|
emit: vu,
|
|
@@ -7391,17 +7404,17 @@ function qu(e) {
|
|
|
7391
7404
|
processPage: Eu
|
|
7392
7405
|
},
|
|
7393
7406
|
consent: {
|
|
7394
|
-
get:
|
|
7395
|
-
set:
|
|
7396
|
-
has:
|
|
7407
|
+
get: qi,
|
|
7408
|
+
set: Yi,
|
|
7409
|
+
has: Ji
|
|
7397
7410
|
},
|
|
7398
7411
|
vendor: M,
|
|
7399
|
-
setToken:
|
|
7412
|
+
setToken: ur
|
|
7400
7413
|
};
|
|
7401
7414
|
return e.namespace && typeof window < "u" && (window[e.namespace] = P), P;
|
|
7402
7415
|
}
|
|
7403
7416
|
function Ju() {
|
|
7404
|
-
return
|
|
7417
|
+
return cc;
|
|
7405
7418
|
}
|
|
7406
7419
|
//#endregion
|
|
7407
7420
|
//#region src/services/transform/gradient.ts
|
|
@@ -7479,8 +7492,8 @@ async function ed(e, t) {
|
|
|
7479
7492
|
//#endregion
|
|
7480
7493
|
//#region src/services/transform/index.ts
|
|
7481
7494
|
async function td({ enabled: e = !1, rules: t }) {
|
|
7482
|
-
e &&
|
|
7483
|
-
let e = await
|
|
7495
|
+
e && Rc(async () => {
|
|
7496
|
+
let e = await rr(), n = window.location.href;
|
|
7484
7497
|
for (let r of t) {
|
|
7485
7498
|
let t = document.querySelectorAll(r.selector);
|
|
7486
7499
|
if (!(r.path && !new RegExp(r.path).test(n))) for (let n of t) {
|
|
@@ -7513,7 +7526,7 @@ var nd = "access_token";
|
|
|
7513
7526
|
function rd() {
|
|
7514
7527
|
let e = new URLSearchParams(window.location.hash.substring(1)), t = e.get(nd);
|
|
7515
7528
|
if (t) {
|
|
7516
|
-
|
|
7529
|
+
ur(t);
|
|
7517
7530
|
let n = new URL(window.location.href);
|
|
7518
7531
|
e.delete(nd), n.hash = e.toString(), window.history.replaceState(null, "", n);
|
|
7519
7532
|
}
|
|
@@ -7525,7 +7538,7 @@ function od() {
|
|
|
7525
7538
|
let e = new URLSearchParams(window.location.search), t = e.get(ad), n = e.get(id);
|
|
7526
7539
|
if (t !== null || n !== null) {
|
|
7527
7540
|
let t = new URL(window.location.href);
|
|
7528
|
-
e.delete(ad), e.delete(id), t.search = e.toString(),
|
|
7541
|
+
e.delete(ad), e.delete(id), t.search = e.toString(), ei(), window.history.replaceState(null, "", t);
|
|
7529
7542
|
}
|
|
7530
7543
|
}
|
|
7531
7544
|
//#endregion
|
|
@@ -7550,7 +7563,7 @@ function sd(e) {
|
|
|
7550
7563
|
}
|
|
7551
7564
|
//#endregion
|
|
7552
7565
|
//#region src/handlers/signed-links.ts
|
|
7553
|
-
|
|
7566
|
+
zn();
|
|
7554
7567
|
function cd(e) {
|
|
7555
7568
|
try {
|
|
7556
7569
|
let t = e.lastIndexOf(".");
|
|
@@ -7622,7 +7635,7 @@ function dd() {
|
|
|
7622
7635
|
let e = new URLSearchParams(window.location.search), t = e.get("sesamy_token") || e.get("sesamy-token") || e.get("token");
|
|
7623
7636
|
if (t) try {
|
|
7624
7637
|
let e = cd(t);
|
|
7625
|
-
e.valid && !e.expired ?
|
|
7638
|
+
e.valid && !e.expired ? ea(ud(e.payload, t)) : e.valid ? e.expired && q("Share token has expired") : ea(ld(sd(t), t));
|
|
7626
7639
|
} catch (e) {
|
|
7627
7640
|
q(`Failed to extract signed link ${e}`);
|
|
7628
7641
|
}
|
|
@@ -7634,23 +7647,23 @@ function fd() {
|
|
|
7634
7647
|
}
|
|
7635
7648
|
//#endregion
|
|
7636
7649
|
//#region src/handlers/user.ts
|
|
7637
|
-
|
|
7650
|
+
zn();
|
|
7638
7651
|
var pd = "sesamy-user";
|
|
7639
7652
|
async function md() {
|
|
7640
7653
|
let e = new URLSearchParams(window.location.search).get(pd)?.toLowerCase();
|
|
7641
7654
|
if (!e) return;
|
|
7642
|
-
let t = await
|
|
7643
|
-
t?.email === e ? q(`Current user matches sesamy user: ${t?.email} === ${e}`) : (q(`Current user does not match sesamy user: ${t?.email} !== ${e}`),
|
|
7655
|
+
let t = await ar();
|
|
7656
|
+
t?.email === e ? q(`Current user matches sesamy user: ${t?.email} === ${e}`) : (q(`Current user does not match sesamy user: ${t?.email} !== ${e}`), ei(), sr({ authorizationParams: { login_hint: e } }));
|
|
7644
7657
|
let n = new URL(window.location.href);
|
|
7645
7658
|
n.searchParams.delete(pd), window.history.replaceState(null, "", n);
|
|
7646
7659
|
}
|
|
7647
|
-
|
|
7660
|
+
zn(), Gn(), Vn();
|
|
7648
7661
|
var hd = "sesamy-purchase";
|
|
7649
7662
|
function gd() {
|
|
7650
7663
|
let e = new URLSearchParams(window.location.search), t = e.get(hd);
|
|
7651
7664
|
if (t !== null) {
|
|
7652
7665
|
let n = new URL(window.location.href);
|
|
7653
|
-
e.delete(hd), n.search = e.toString(), q(`Purchase ${t}`),
|
|
7666
|
+
e.delete(hd), n.search = e.toString(), q(`Purchase ${t}`), Wn(J.PURCHASE, { itemSrc: t }), ei(), window.history.replaceState(null, "", n);
|
|
7654
7667
|
}
|
|
7655
7668
|
}
|
|
7656
7669
|
//#endregion
|
|
@@ -7659,7 +7672,7 @@ var _d = "sesamy-login", vd = "sesamy_login";
|
|
|
7659
7672
|
async function yd() {
|
|
7660
7673
|
let e = new URLSearchParams(window.location.search);
|
|
7661
7674
|
if (!(e.get(_d) || e.get(vd))) return;
|
|
7662
|
-
await
|
|
7675
|
+
await rr() || sr();
|
|
7663
7676
|
let t = new URL(window.location.href);
|
|
7664
7677
|
t.searchParams.delete(_d), window.history.replaceState(null, "", t);
|
|
7665
7678
|
}
|
|
@@ -7697,11 +7710,11 @@ async function wd(e) {
|
|
|
7697
7710
|
ref: t.get("ref") ?? void 0,
|
|
7698
7711
|
referrer: Cd()
|
|
7699
7712
|
}, [r] = e.content.list();
|
|
7700
|
-
r?.url && (n.itemSrc = r.url, n.publisherContentId = r.id),
|
|
7713
|
+
r?.url && (n.itemSrc = r.url, n.publisherContentId = r.id), oa(n);
|
|
7701
7714
|
}
|
|
7702
7715
|
//#endregion
|
|
7703
7716
|
//#region src/handlers/login-reload.ts
|
|
7704
|
-
|
|
7717
|
+
zn();
|
|
7705
7718
|
function Td() {
|
|
7706
7719
|
let e = new URLSearchParams(window.location.search), t = !1;
|
|
7707
7720
|
try {
|
|
@@ -7709,8 +7722,8 @@ function Td() {
|
|
|
7709
7722
|
} catch {
|
|
7710
7723
|
t = !1;
|
|
7711
7724
|
}
|
|
7712
|
-
let n = sessionStorage.getItem(
|
|
7713
|
-
!t || n || (sessionStorage.setItem(
|
|
7725
|
+
let n = sessionStorage.getItem(Ti) === "true", r = e.has("code") || e.has("error") || e.has("state");
|
|
7726
|
+
!t || n || (sessionStorage.setItem(Ti, "true"), r || (q("Reloading page to get query params in incognito browser"), window.location.reload()));
|
|
7714
7727
|
}
|
|
7715
7728
|
//#endregion
|
|
7716
7729
|
//#region src/handlers/links.ts
|
|
@@ -7759,22 +7772,22 @@ async function Od(e) {
|
|
|
7759
7772
|
let [n] = e.content.list();
|
|
7760
7773
|
n && (await e.entitlements.hasAccess(n.url || "", n.pass?.split(",") || []) || (location.href = t));
|
|
7761
7774
|
}
|
|
7762
|
-
|
|
7775
|
+
Gn(), Vn(), zn();
|
|
7763
7776
|
var kd = !1;
|
|
7764
7777
|
async function Ad(e, t, n) {
|
|
7765
7778
|
q(`Init with config: ${JSON.stringify(e)}`);
|
|
7766
7779
|
try {
|
|
7767
|
-
Td(),
|
|
7780
|
+
Td(), Xi(e.consent), Wl({
|
|
7768
7781
|
clientId: e.clientId,
|
|
7769
7782
|
environment: e.environment,
|
|
7770
7783
|
...e.analytics
|
|
7771
|
-
}), n &&
|
|
7784
|
+
}), n && qn(n), await nr({
|
|
7772
7785
|
clientId: e.clientId,
|
|
7773
7786
|
vendorId: e.vendorId || e.clientId,
|
|
7774
7787
|
organization: e.organization,
|
|
7775
7788
|
environment: e.environment,
|
|
7776
7789
|
...e.auth
|
|
7777
|
-
}), await
|
|
7790
|
+
}), await zc(), Qc(e, t), e.capsule?.enabled && (Tu(e.capsule), dd(), e.capsule.autoProcess !== !1 && (await Eu(), Ou())), e.transform && await td(e.transform), _u(), xd(), Gu({
|
|
7778
7791
|
clientId: e.clientId || e.vendorId,
|
|
7779
7792
|
environment: e.environment,
|
|
7780
7793
|
getProfile: () => t.profile.get(),
|
|
@@ -7782,7 +7795,7 @@ async function Ad(e, t, n) {
|
|
|
7782
7795
|
getContracts: () => t.contracts.list(),
|
|
7783
7796
|
getTags: () => t.tags.list(),
|
|
7784
7797
|
getTallies: () => t.tallies.list()
|
|
7785
|
-
}), wd(t), rd(), od(), fd(), await yd(), await md(), gd(), await Dd(t), await Ed(t), await Od(t), kd = !0,
|
|
7798
|
+
}), wd(t), rd(), od(), fd(), await yd(), await md(), gd(), await Dd(t), await Ed(t), await Od(t), kd = !0, Wn(J.READY, {});
|
|
7786
7799
|
} catch (e) {
|
|
7787
7800
|
q(`Failed to init ${e.message}`);
|
|
7788
7801
|
}
|
|
@@ -7792,7 +7805,7 @@ async function jd(e, t) {
|
|
|
7792
7805
|
let n = e.api?.namespace || "sesamy";
|
|
7793
7806
|
if (Sd() && n in window) return q("Sesamy already initialized. This is likely due to a duplicate import"), kd = !0, window[n];
|
|
7794
7807
|
let r = t?.authPlugin;
|
|
7795
|
-
if (!r && !
|
|
7808
|
+
if (!r && !Jn() && Sd()) {
|
|
7796
7809
|
let e = window;
|
|
7797
7810
|
typeof e.auth0Plugin?.createAuth0Plugin == "function" && (r = e.auth0Plugin.createAuth0Plugin());
|
|
7798
7811
|
}
|
|
@@ -7806,6 +7819,7 @@ async function jd(e, t) {
|
|
|
7806
7819
|
clientId: e.clientId,
|
|
7807
7820
|
vendorId: e.vendorId,
|
|
7808
7821
|
environment: e.environment,
|
|
7822
|
+
useHttpCookies: e.auth?.useHttpCookies,
|
|
7809
7823
|
...e.api,
|
|
7810
7824
|
namespace: n
|
|
7811
7825
|
});
|
|
@@ -7820,4 +7834,4 @@ if (Sd()) {
|
|
|
7820
7834
|
}
|
|
7821
7835
|
}
|
|
7822
7836
|
//#endregion
|
|
7823
|
-
export {
|
|
7837
|
+
export { J as Events, ul as clearMetadataCache, al as getAllLdJson, tl as getAllMetaTags, qi as getConsent, Zc as getContentConfig, ll as getContentMetadata, wu as getDcaClient, il as getLdJson, Ji as hasConsent, jd as init, kd as isInitialized, qn as registerAuthPlugin, xu as registerCapsulePlugin, Yi as setConsent };
|