@sesamy/sesamy-js 1.13.0 → 1.13.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.
@@ -327,50 +327,50 @@ var Dr = Ut(Lt(function(t, e) {
327
327
  }();
328
328
  e.default = f;
329
329
  }));
330
- const Mr = { timeoutInSeconds: 60 }, Fn = { name: "auth0-spa-js", version: "2.1.3" }, Hn = () => Date.now();
331
- let Y = class St extends Error {
330
+ const Mr = { timeoutInSeconds: 60 }, Kn = { name: "auth0-spa-js", version: "2.1.3" }, Wn = () => Date.now();
331
+ let Y = class _t extends Error {
332
332
  constructor(e, n) {
333
- super(n), this.error = e, this.error_description = n, Object.setPrototypeOf(this, St.prototype);
333
+ super(n), this.error = e, this.error_description = n, Object.setPrototypeOf(this, _t.prototype);
334
334
  }
335
335
  static fromPayload({ error: e, error_description: n }) {
336
- return new St(e, n);
336
+ return new _t(e, n);
337
337
  }
338
- }, Zr = class Jn extends Y {
338
+ }, Zr = class Fn extends Y {
339
339
  constructor(e, n, r, i = null) {
340
- super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Jn.prototype);
340
+ super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Fn.prototype);
341
341
  }
342
- }, _t = class Xn extends Y {
342
+ }, Et = class Hn extends Y {
343
343
  constructor() {
344
- super("timeout", "Timeout"), Object.setPrototypeOf(this, Xn.prototype);
344
+ super("timeout", "Timeout"), Object.setPrototypeOf(this, Hn.prototype);
345
345
  }
346
- }, Kr = class Vn extends _t {
346
+ }, Kr = class Jn extends Et {
347
347
  constructor(e) {
348
- super(), this.popup = e, Object.setPrototypeOf(this, Vn.prototype);
348
+ super(), this.popup = e, Object.setPrototypeOf(this, Jn.prototype);
349
349
  }
350
- }, Wr = class Yn extends Y {
350
+ }, Wr = class Xn extends Y {
351
351
  constructor(e) {
352
- super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Yn.prototype);
352
+ super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Xn.prototype);
353
353
  }
354
- }, Fr = class Gn extends Y {
354
+ }, Fr = class Vn extends Y {
355
355
  constructor(e, n, r) {
356
- super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Gn.prototype);
356
+ super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Vn.prototype);
357
357
  }
358
- }, Bn = class qn extends Y {
358
+ }, Yn = class Gn extends Y {
359
359
  constructor(e, n) {
360
- super("missing_refresh_token", `Missing Refresh Token (audience: '${Gt(e, ["default"])}', scope: '${Gt(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this, qn.prototype);
360
+ super("missing_refresh_token", `Missing Refresh Token (audience: '${Vt(e, ["default"])}', scope: '${Vt(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this, Gn.prototype);
361
361
  }
362
362
  };
363
- function Gt(t, e = []) {
363
+ function Vt(t, e = []) {
364
364
  return t && !e.includes(t) ? t : "";
365
365
  }
366
- const tt = () => window.crypto, ft = () => {
366
+ const nt = () => window.crypto, pt = () => {
367
367
  const t = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";
368
368
  let e = "";
369
- return Array.from(tt().getRandomValues(new Uint8Array(43))).forEach((n) => e += t[n % t.length]), e;
370
- }, Bt = (t) => btoa(t), Et = (t) => {
369
+ return Array.from(nt().getRandomValues(new Uint8Array(43))).forEach((n) => e += t[n % t.length]), e;
370
+ }, Yt = (t) => btoa(t), Pt = (t) => {
371
371
  var { clientId: e } = t, n = te(t, ["clientId"]);
372
372
  return new URLSearchParams(((r) => Object.keys(r).filter((i) => r[i] !== void 0).reduce((i, o) => Object.assign(Object.assign({}, i), { [o]: r[o] }), {}))(Object.assign({ client_id: e }, n))).toString();
373
- }, qt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")), Hr = async (t, e) => {
373
+ }, Gt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")), Hr = async (t, e) => {
374
374
  const n = await fetch(t, e);
375
375
  return { ok: n.ok, json: await n.json() };
376
376
  }, Jr = async (t, e, n) => {
@@ -394,7 +394,7 @@ const tt = () => window.crypto, ft = () => {
394
394
  }, Vr = async (t, e, n, r, i, o, a = 1e4) => i ? Xr(t, e, n, r, a, i, o) : Jr(t, r, a);
395
395
  async function Yr(t, e) {
396
396
  var { baseUrl: n, timeout: r, audience: i, scope: o, auth0Client: a, useFormData: s } = t, h = te(t, ["baseUrl", "timeout", "audience", "scope", "auth0Client", "useFormData"]);
397
- const f = s ? Et(h) : JSON.stringify(h);
397
+ const f = s ? Pt(h) : JSON.stringify(h);
398
398
  return await async function(u, c, p, d, b, S, w) {
399
399
  let P, _ = null;
400
400
  for (let C = 0; C < 3; C++)
@@ -409,16 +409,16 @@ async function Yr(t, e) {
409
409
  const v = P.json, { error: l, error_description: k } = v, T = te(v, ["error", "error_description"]), { ok: O } = P;
410
410
  if (!O) {
411
411
  const C = k || `HTTP error. Unable to fetch ${u}`;
412
- throw l === "mfa_required" ? new Fr(l, C, T.mfa_token) : l === "missing_refresh_token" ? new Bn(p, d) : new Y(l || "request_error", C);
412
+ throw l === "mfa_required" ? new Fr(l, C, T.mfa_token) : l === "missing_refresh_token" ? new Yn(p, d) : new Y(l || "request_error", C);
413
413
  }
414
414
  return T;
415
- }(`${n}/oauth/token`, r, i || "default", o, { method: "POST", body: f, headers: { "Content-Type": s ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(a || Fn)) } }, e, s);
415
+ }(`${n}/oauth/token`, r, i || "default", o, { method: "POST", body: f, headers: { "Content-Type": s ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(a || Kn)) } }, e, s);
416
416
  }
417
- const Je = (...t) => {
417
+ const Xe = (...t) => {
418
418
  return (e = t.filter(Boolean).join(" ").trim().split(/\s+/), Array.from(new Set(e))).join(" ");
419
419
  var e;
420
420
  };
421
- let pe = class Pt {
421
+ let pe = class Tt {
422
422
  constructor(e, n = "@@auth0spajs@@", r) {
423
423
  this.prefix = n, this.suffix = r, this.clientId = e.clientId, this.scope = e.scope, this.audience = e.audience;
424
424
  }
@@ -427,11 +427,11 @@ let pe = class Pt {
427
427
  }
428
428
  static fromKey(e) {
429
429
  const [n, r, i, o] = e.split("::");
430
- return new Pt({ clientId: r, scope: o, audience: i }, n);
430
+ return new Tt({ clientId: r, scope: o, audience: i }, n);
431
431
  }
432
432
  static fromCacheEntry(e) {
433
433
  const { scope: n, audience: r, client_id: i } = e;
434
- return new Pt({ scope: n, audience: r, clientId: i });
434
+ return new Tt({ scope: n, audience: r, clientId: i });
435
435
  }
436
436
  }, Gr = class {
437
437
  set(e, n) {
@@ -452,7 +452,7 @@ let pe = class Pt {
452
452
  allKeys() {
453
453
  return Object.keys(window.localStorage).filter((e) => e.startsWith("@@auth0spajs@@"));
454
454
  }
455
- }, Qn = class {
455
+ }, Bn = class {
456
456
  constructor() {
457
457
  this.enclosedCache = /* @__PURE__ */ function() {
458
458
  let e = {};
@@ -469,7 +469,7 @@ let pe = class Pt {
469
469
  }
470
470
  }, Br = class {
471
471
  constructor(e, n, r) {
472
- this.cache = e, this.keyManifest = n, this.nowProvider = r || Hn;
472
+ this.cache = e, this.keyManifest = n, this.nowProvider = r || Wn;
473
473
  }
474
474
  async setIdToken(e, n, r) {
475
475
  var i;
@@ -551,10 +551,10 @@ const Ne = (t) => typeof t == "number", Qr = ["iss", "aud", "exp", "nbf", "iat",
551
551
  const a = o.split("."), [s, h, f] = a;
552
552
  if (a.length !== 3 || !s || !h || !f)
553
553
  throw new Error("ID token could not be decoded");
554
- const u = JSON.parse(qt(h)), c = { __raw: o }, p = {};
554
+ const u = JSON.parse(Gt(h)), c = { __raw: o }, p = {};
555
555
  return Object.keys(u).forEach((d) => {
556
556
  c[d] = u[d], Qr.includes(d) || (p[d] = u[d]);
557
- }), { encoded: { header: s, payload: h, signature: f }, header: JSON.parse(qt(s)), claims: c, user: p };
557
+ }), { encoded: { header: s, payload: h, signature: f }, header: JSON.parse(Gt(s)), claims: c, user: p };
558
558
  })(t.id_token);
559
559
  if (!e.claims.iss)
560
560
  throw new Error("Issuer (iss) claim must be a string present in the ID token");
@@ -668,25 +668,25 @@ var me = Lt(function(t, e) {
668
668
  };
669
669
  });
670
670
  Ut(me), me.encode, me.parse, me.getAll;
671
- var ti = me.get, er = me.set, tr = me.remove;
671
+ var ti = me.get, qn = me.set, Qn = me.remove;
672
672
  const Ie = { get(t) {
673
673
  const e = ti(t);
674
674
  if (e !== void 0)
675
675
  return JSON.parse(e);
676
676
  }, save(t, e, n) {
677
677
  let r = {};
678
- window.location.protocol === "https:" && (r = { secure: !0, sameSite: "none" }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), er(t, JSON.stringify(e), r);
678
+ window.location.protocol === "https:" && (r = { secure: !0, sameSite: "none" }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), qn(t, JSON.stringify(e), r);
679
679
  }, remove(t, e) {
680
680
  let n = {};
681
- e != null && e.cookieDomain && (n.domain = e.cookieDomain), tr(t, n);
681
+ e != null && e.cookieDomain && (n.domain = e.cookieDomain), Qn(t, n);
682
682
  } }, ni = { get(t) {
683
683
  return Ie.get(t) || Ie.get(`_legacy_${t}`);
684
684
  }, save(t, e, n) {
685
685
  let r = {};
686
- window.location.protocol === "https:" && (r = { secure: !0 }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), er(`_legacy_${t}`, JSON.stringify(e), r), Ie.save(t, e, n);
686
+ window.location.protocol === "https:" && (r = { secure: !0 }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), qn(`_legacy_${t}`, JSON.stringify(e), r), Ie.save(t, e, n);
687
687
  }, remove(t, e) {
688
688
  let n = {};
689
- e != null && e.cookieDomain && (n.domain = e.cookieDomain), tr(t, n), Ie.remove(t, e), Ie.remove(`_legacy_${t}`, e);
689
+ e != null && e.cookieDomain && (n.domain = e.cookieDomain), Qn(t, n), Ie.remove(t, e), Ie.remove(`_legacy_${t}`, e);
690
690
  } }, ri = { get(t) {
691
691
  if (typeof sessionStorage > "u")
692
692
  return;
@@ -710,10 +710,10 @@ function ii(t, e, n) {
710
710
  `, 10) + 1, a = i.substring(o) + (r ? "//# sourceMappingURL=" + r : ""), s = new Blob([a], { type: "application/javascript" });
711
711
  return URL.createObjectURL(s);
712
712
  }
713
- var Qt, en, tn, pt, oi = (Qt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", en = null, tn = !1, function(t) {
714
- return pt = pt || ii(Qt, en, tn), new Worker(pt, t);
713
+ var Bt, qt, Qt, mt, oi = (Bt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", qt = null, Qt = !1, function(t) {
714
+ return mt = mt || ii(Bt, qt, Qt), new Worker(mt, t);
715
715
  });
716
- const mt = {};
716
+ const gt = {};
717
717
  let ai = class {
718
718
  constructor(e, n) {
719
719
  this.cache = e, this.clientId = n, this.manifestKey = this.createManifestKeyFrom(this.clientId);
@@ -740,40 +740,40 @@ let ai = class {
740
740
  return `@@auth0spajs@@::${e}`;
741
741
  }
742
742
  };
743
- const si = { memory: () => new Qn().enclosedCache, localstorage: () => new Gr() }, nn = (t) => si[t], rn = (t) => {
743
+ const si = { memory: () => new Bn().enclosedCache, localstorage: () => new Gr() }, en = (t) => si[t], tn = (t) => {
744
744
  const { openUrl: e, onRedirect: n } = t, r = te(t, ["openUrl", "onRedirect"]);
745
745
  return Object.assign(Object.assign({}, r), { openUrl: e === !1 || e ? e : n });
746
- }, gt = new Dr();
746
+ }, yt = new Dr();
747
747
  let ci = class {
748
748
  constructor(e) {
749
749
  let n, r;
750
- if (this.userCache = new Qn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
751
- await gt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
750
+ if (this.userCache = new Bn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
751
+ await yt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
752
752
  }, this.options = Object.assign(Object.assign(Object.assign({}, this.defaultOptions), e), { authorizationParams: Object.assign(Object.assign({}, this.defaultOptions.authorizationParams), e.authorizationParams) }), typeof window < "u" && (() => {
753
- if (!tt())
753
+ if (!nt())
754
754
  throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");
755
- if (tt().subtle === void 0)
755
+ if (nt().subtle === void 0)
756
756
  throw new Error(`
757
757
  auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
758
758
  `);
759
759
  })(), e.cache && e.cacheLocation && console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."), e.cache)
760
760
  r = e.cache;
761
761
  else {
762
- if (n = e.cacheLocation || "memory", !nn(n))
762
+ if (n = e.cacheLocation || "memory", !en(n))
763
763
  throw new Error(`Invalid cache location "${n}"`);
764
- r = nn(n)();
764
+ r = en(n)();
765
765
  }
766
766
  this.httpTimeoutMs = e.httpTimeoutInSeconds ? 1e3 * e.httpTimeoutInSeconds : 1e4, this.cookieStorage = e.legacySameSiteCookie === !1 ? Ie : ni, this.orgHintCookieName = `auth0.${this.options.clientId}.organization_hint`, this.isAuthenticatedCookieName = ((a) => `auth0.${a}.is.authenticated`)(this.options.clientId), this.sessionCheckExpiryDays = e.sessionCheckExpiryDays || 1;
767
767
  const i = e.useCookiesForTransactions ? this.cookieStorage : ri;
768
768
  var o;
769
- this.scope = Je("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new qr(i, this.options.clientId, this.options.cookieDomain), this.nowProvider = this.options.nowProvider || Hn, this.cacheManager = new Br(r, r.allKeys ? void 0 : new ai(r, this.options.clientId), this.nowProvider), this.domainUrl = (o = this.options.domain, /^https?:\/\//.test(o) ? o : `https://${o}`), this.tokenIssuer = ((a, s) => a ? a.startsWith("https://") ? a : `https://${a}/` : `${s}/`)(this.options.issuer, this.domainUrl), typeof window < "u" && window.Worker && this.options.useRefreshTokens && n === "memory" && (this.options.workerUrl ? this.worker = new Worker(this.options.workerUrl) : this.worker = new oi());
769
+ this.scope = Xe("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new qr(i, this.options.clientId, this.options.cookieDomain), this.nowProvider = this.options.nowProvider || Wn, this.cacheManager = new Br(r, r.allKeys ? void 0 : new ai(r, this.options.clientId), this.nowProvider), this.domainUrl = (o = this.options.domain, /^https?:\/\//.test(o) ? o : `https://${o}`), this.tokenIssuer = ((a, s) => a ? a.startsWith("https://") ? a : `https://${a}/` : `${s}/`)(this.options.issuer, this.domainUrl), typeof window < "u" && window.Worker && this.options.useRefreshTokens && n === "memory" && (this.options.workerUrl ? this.worker = new Worker(this.options.workerUrl) : this.worker = new oi());
770
770
  }
771
771
  _url(e) {
772
- const n = encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client || Fn)));
772
+ const n = encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client || Kn)));
773
773
  return `${this.domainUrl}${e}&auth0Client=${n}`;
774
774
  }
775
775
  _authorizeUrl(e) {
776
- return this._url(`/authorize?${Et(e)}`);
776
+ return this._url(`/authorize?${Pt(e)}`);
777
777
  }
778
778
  async _verifyIdToken(e, n, r) {
779
779
  const i = await this.nowProvider();
@@ -784,13 +784,13 @@ let ci = class {
784
784
  e ? this.cookieStorage.save(this.orgHintCookieName, e, { daysUntilExpire: this.sessionCheckExpiryDays, cookieDomain: this.options.cookieDomain }) : this.cookieStorage.remove(this.orgHintCookieName, { cookieDomain: this.options.cookieDomain });
785
785
  }
786
786
  async _prepareAuthorizeUrl(e, n, r) {
787
- const i = Bt(ft()), o = Bt(ft()), a = ft(), s = ((u) => {
787
+ const i = Yt(pt()), o = Yt(pt()), a = pt(), s = ((u) => {
788
788
  const c = new Uint8Array(u);
789
789
  return ((p) => {
790
790
  const d = { "+": "-", "/": "_", "=": "" };
791
791
  return p.replace(/[+/=]/g, (b) => d[b]);
792
792
  })(window.btoa(String.fromCharCode(...Array.from(c))));
793
- })(await (async (u) => await tt().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), h = ((u, c, p, d, b, S, w, P) => Object.assign(Object.assign(Object.assign({ client_id: u.clientId }, u.authorizationParams), p), { scope: Je(c, p.scope), response_type: "code", response_mode: P || "query", state: d, nonce: b, redirect_uri: w || u.authorizationParams.redirect_uri, code_challenge: S, code_challenge_method: "S256" }))(this.options, this.scope, e, i, o, s, e.redirect_uri || this.options.authorizationParams.redirect_uri || r, n == null ? void 0 : n.response_mode), f = this._authorizeUrl(h);
793
+ })(await (async (u) => await nt().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), h = ((u, c, p, d, b, S, w, P) => Object.assign(Object.assign(Object.assign({ client_id: u.clientId }, u.authorizationParams), p), { scope: Xe(c, p.scope), response_type: "code", response_mode: P || "query", state: d, nonce: b, redirect_uri: w || u.authorizationParams.redirect_uri, code_challenge: S, code_challenge_method: "S256" }))(this.options, this.scope, e, i, o, s, e.redirect_uri || this.options.authorizationParams.redirect_uri || r, n == null ? void 0 : n.response_mode), f = this._authorizeUrl(h);
794
794
  return { nonce: o, code_verifier: a, scope: h.scope, audience: h.audience || "default", redirect_uri: h.redirect_uri, state: i, url: f };
795
795
  }
796
796
  async loginWithPopup(e, n) {
@@ -834,7 +834,7 @@ let ci = class {
834
834
  }
835
835
  async loginWithRedirect(e = {}) {
836
836
  var n;
837
- const r = rn(e), { openUrl: i, fragment: o, appState: a } = r, s = te(r, ["openUrl", "fragment", "appState"]), h = ((n = s.authorizationParams) === null || n === void 0 ? void 0 : n.organization) || this.options.authorizationParams.organization, f = await this._prepareAuthorizeUrl(s.authorizationParams || {}), { url: u } = f, c = te(f, ["url"]);
837
+ const r = tn(e), { openUrl: i, fragment: o, appState: a } = r, s = te(r, ["openUrl", "fragment", "appState"]), h = ((n = s.authorizationParams) === null || n === void 0 ? void 0 : n.organization) || this.options.authorizationParams.organization, f = await this._prepareAuthorizeUrl(s.authorizationParams || {}), { url: u } = f, c = te(f, ["url"]);
838
838
  this.transactionManager.create(Object.assign(Object.assign(Object.assign({}, c), { appState: a }), h && { organization: h }));
839
839
  const p = o ? `${u}#${o}` : u;
840
840
  i ? await i(p) : window.location.assign(p);
@@ -870,11 +870,11 @@ let ci = class {
870
870
  }
871
871
  async getTokenSilently(e = {}) {
872
872
  var n;
873
- const r = Object.assign(Object.assign({ cacheMode: "on" }, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Je(this.scope, (n = e.authorizationParams) === null || n === void 0 ? void 0 : n.scope) }) }), i = await ((o, a) => {
874
- let s = mt[a];
873
+ const r = Object.assign(Object.assign({ cacheMode: "on" }, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Xe(this.scope, (n = e.authorizationParams) === null || n === void 0 ? void 0 : n.scope) }) }), i = await ((o, a) => {
874
+ let s = gt[a];
875
875
  return s || (s = o().finally(() => {
876
- delete mt[a], s = null;
877
- }), mt[a] = s), s;
876
+ delete gt[a], s = null;
877
+ }), gt[a] = s), s;
878
878
  })(() => this._getTokenSilently(r), `${this.options.clientId}::${r.authorizationParams.audience}::${r.authorizationParams.scope}`);
879
879
  return e.detailedResponse ? i : i == null ? void 0 : i.access_token;
880
880
  }
@@ -891,8 +891,8 @@ let ci = class {
891
891
  if (await i())
892
892
  return !0;
893
893
  return !1;
894
- })(() => gt.acquireLock("auth0.lock.getTokenSilently", 5e3), 10))
895
- throw new _t();
894
+ })(() => yt.acquireLock("auth0.lock.getTokenSilently", 5e3), 10))
895
+ throw new Et();
896
896
  try {
897
897
  if (window.addEventListener("pagehide", this._releaseLockOnPageHide), n !== "off") {
898
898
  const f = await this._getEntryFromCache({ scope: r.authorizationParams.scope, audience: r.authorizationParams.audience || "default", clientId: this.options.clientId });
@@ -902,13 +902,13 @@ let ci = class {
902
902
  const i = this.options.useRefreshTokens ? await this._getTokenUsingRefreshToken(r) : await this._getTokenFromIFrame(r), { id_token: o, access_token: a, oauthTokenScope: s, expires_in: h } = i;
903
903
  return Object.assign(Object.assign({ id_token: o, access_token: a }, s ? { scope: s } : null), { expires_in: h });
904
904
  } finally {
905
- await gt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
905
+ await yt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
906
906
  }
907
907
  }
908
908
  }
909
909
  async getTokenWithPopup(e = {}, n = {}) {
910
910
  var r;
911
- const i = Object.assign(Object.assign({}, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Je(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
911
+ const i = Object.assign(Object.assign({}, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Xe(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
912
912
  return n = Object.assign(Object.assign({}, Mr), n), await this.loginWithPopup(i, n), (await this.cacheManager.get(new pe({ scope: i.authorizationParams.scope, audience: i.authorizationParams.audience || "default", clientId: this.options.clientId }))).access_token;
913
913
  }
914
914
  async isAuthenticated() {
@@ -917,10 +917,10 @@ let ci = class {
917
917
  _buildLogoutUrl(e) {
918
918
  e.clientId !== null ? e.clientId = e.clientId || this.options.clientId : delete e.clientId;
919
919
  const n = e.logoutParams || {}, { federated: r } = n, i = te(n, ["federated"]), o = r ? "&federated" : "";
920
- return this._url(`/v2/logout?${Et(Object.assign({ clientId: e.clientId }, i))}`) + o;
920
+ return this._url(`/v2/logout?${Pt(Object.assign({ clientId: e.clientId }, i))}`) + o;
921
921
  }
922
922
  async logout(e = {}) {
923
- const n = rn(e), { openUrl: r } = n, i = te(n, ["openUrl"]);
923
+ const n = tn(e), { openUrl: r } = n, i = te(n, ["openUrl"]);
924
924
  e.clientId === null ? await this.cacheManager.clear() : await this.cacheManager.clear(e.clientId || this.options.clientId), this.cookieStorage.remove(this.orgHintCookieName, { cookieDomain: this.options.cookieDomain }), this.cookieStorage.remove(this.isAuthenticatedCookieName, { cookieDomain: this.options.cookieDomain }), this.userCache.remove("@@user@@");
925
925
  const o = this._buildLogoutUrl(i);
926
926
  r ? await r(o) : r !== !1 && window.location.assign(o);
@@ -940,7 +940,7 @@ let ci = class {
940
940
  };
941
941
  let k;
942
942
  const T = setTimeout(() => {
943
- _(new _t()), l();
943
+ _(new Et()), l();
944
944
  }, 1e3 * w);
945
945
  k = function(O) {
946
946
  if (O.origin != S || !O.data || O.data.type !== "authorization_response")
@@ -962,7 +962,7 @@ let ci = class {
962
962
  if (!(n && n.refresh_token || this.worker)) {
963
963
  if (this.options.useRefreshTokensFallback)
964
964
  return await this._getTokenFromIFrame(e);
965
- throw new Bn(e.authorizationParams.audience || "default", e.authorizationParams.scope);
965
+ throw new Yn(e.authorizationParams.audience || "default", e.authorizationParams.scope);
966
966
  }
967
967
  const r = e.authorizationParams.redirect_uri || this.options.authorizationParams.redirect_uri || window.location.origin, i = typeof e.timeoutInSeconds == "number" ? 1e3 * e.timeoutInSeconds : null;
968
968
  try {
@@ -998,17 +998,15 @@ async function ui(t) {
998
998
  const e = new ci(t);
999
999
  return await e.checkSession(), e;
1000
1000
  }
1001
- const Se = "sesamy.com", li = "https://sesa.my", di = "https://logs.sesamy.com/events", Tt = "sesamyCacheTimestamp";
1001
+ const Se = "sesamy.com", li = "https://sesa.my", di = "https://logs.sesamy.com/events", Ot = "sesamyCacheTimestamp";
1002
1002
  var q = /* @__PURE__ */ ((t) => (t.READY = "sesamyJsReady", t.AUTHENTICATED = "sesamyJsAuthenticated", t.LOGOUT = "sesamyJsLogout", t.CLEAR_CACHE = "sesamyJsClearCache", t.USER_ATTRIBUTE_CHANGED = "sesamyUserAttributeChanged", t.PURCHASE = "sesamyJsPurchase", t))(q || {});
1003
- let G, Ot;
1004
- const Nt = "sesamyAccessToken", Rt = "sesamyExpires";
1005
- function zt() {
1006
- const t = localStorage.getItem(Rt);
1007
- if (!(t && parseInt(t, 10) < (/* @__PURE__ */ new Date()).getTime()))
1008
- return localStorage.getItem(Nt);
1003
+ let G, er;
1004
+ const Fe = "sesamyAccessToken";
1005
+ function Nt() {
1006
+ return localStorage.getItem(Fe);
1009
1007
  }
1010
1008
  async function hi(t) {
1011
- if (t.enabled !== !1 && (Ot = t.organization, G = await ui({
1009
+ if (t.enabled !== !1 && (er = t.organization, G = await ui({
1012
1010
  domain: t.endpoint || `token.${Se}`,
1013
1011
  clientId: t.clientId
1014
1012
  }), window.location.search.includes("code=")))
@@ -1022,27 +1020,33 @@ async function hi(t) {
1022
1020
  console.error(e);
1023
1021
  }
1024
1022
  }
1025
- async function Dt() {
1026
- return zt() ? !0 : G ? G.isAuthenticated() : !1;
1023
+ async function Rt() {
1024
+ return Nt() ? !0 : G ? G.isAuthenticated() : !1;
1027
1025
  }
1028
1026
  async function fi() {
1029
- return zt() ? {
1027
+ return Nt() ? {
1030
1028
  sub: "local",
1031
1029
  name: "Local User"
1032
1030
  } : G ? G.getUser() : null;
1033
1031
  }
1034
- function Mt(t) {
1035
- if (!G)
1032
+ function zt(t) {
1033
+ if (localStorage.removeItem(Fe), !G)
1036
1034
  throw new Error("Auth0 client not initialized");
1037
- const e = {
1038
- redirect_uri: window.location.href
1039
- };
1040
- return t != null && t.email && (e.login_hint = t.email), Ot && (e.organization = Ot), G.loginWithRedirect({ authorizationParams: e });
1035
+ const e = (t == null ? void 0 : t.authorizationParams) || {};
1036
+ return G.loginWithRedirect({
1037
+ ...t,
1038
+ authorizationParams: { organization: er, redirect_uri: window.location.href, ...e }
1039
+ });
1041
1040
  }
1042
- async function Xe(t = !0) {
1043
- const e = zt();
1044
- if (e)
1045
- return e;
1041
+ async function Ve(t = !0) {
1042
+ const e = Nt();
1043
+ if (e) {
1044
+ const n = tr(e);
1045
+ if (!n || !n.exp || n.exp < (/* @__PURE__ */ new Date()).getTime() / 1e3)
1046
+ localStorage.removeItem(Fe);
1047
+ else
1048
+ return e;
1049
+ }
1046
1050
  try {
1047
1051
  return G ? await G.getTokenSilently() : null;
1048
1052
  } catch (n) {
@@ -1051,18 +1055,14 @@ async function Xe(t = !0) {
1051
1055
  return null;
1052
1056
  }
1053
1057
  }
1054
- async function pi() {
1055
- if (localStorage.removeItem(Nt), localStorage.removeItem(Rt), ue(q.LOGOUT, {}), !!G)
1056
- return G.logout({
1057
- logoutParams: {
1058
- returnTo: window.location.href
1059
- }
1060
- });
1058
+ async function pi(t) {
1059
+ if (localStorage.removeItem(Fe), ue(q.LOGOUT, {}), !!G)
1060
+ return G.logout(t);
1061
1061
  }
1062
- function mi(t) {
1062
+ function tr(t) {
1063
1063
  const e = t.split(".");
1064
1064
  if (e.length !== 3)
1065
- throw new Error("Invalid JWT token format.");
1065
+ return null;
1066
1066
  const r = e[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
1067
1067
  atob(r).split("").map(function(o) {
1068
1068
  return "%" + ("00" + o.charCodeAt(0).toString(16)).slice(-2);
@@ -1070,12 +1070,12 @@ function mi(t) {
1070
1070
  );
1071
1071
  return JSON.parse(i);
1072
1072
  }
1073
- async function nr(t, e) {
1074
- localStorage.setItem(Nt, t), e && localStorage.setItem(Rt, JSON.stringify(e * 1e3 + (/* @__PURE__ */ new Date()).getTime()));
1075
- const n = mi(t);
1076
- ue(q.AUTHENTICATED, n);
1073
+ async function nr(t) {
1074
+ localStorage.setItem(Fe, t);
1075
+ const e = tr(t);
1076
+ ue(q.AUTHENTICATED, e);
1077
1077
  }
1078
- const gi = (t, e) => e.skipDedupe || e.method !== "GET", yi = (t, e) => e.method + "@" + t, vi = (t) => t.clone(), on = ({ skip: t = gi, key: e = yi, resolver: n = vi } = {}) => {
1078
+ const mi = (t, e) => e.skipDedupe || e.method !== "GET", gi = (t, e) => e.method + "@" + t, yi = (t) => t.clone(), nn = ({ skip: t = mi, key: e = gi, resolver: n = yi } = {}) => {
1079
1079
  const r = /* @__PURE__ */ new Map();
1080
1080
  return (i) => (o, a) => {
1081
1081
  if (t(o, a))
@@ -1095,7 +1095,7 @@ const gi = (t, e) => e.skipDedupe || e.method !== "GET", yi = (t, e) => e.method
1095
1095
  return r.delete(s), Promise.reject(h);
1096
1096
  }
1097
1097
  };
1098
- }, wi = (t, e) => t * e, bi = (t) => t && t.ok, an = ({ delayTimer: t = 500, delayRamp: e = wi, maxAttempts: n = 10, until: r = bi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (h) => (f, u) => {
1098
+ }, vi = (t, e) => t * e, wi = (t) => t && t.ok, rn = ({ delayTimer: t = 500, delayRamp: e = vi, maxAttempts: n = 10, until: r = wi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (h) => (f, u) => {
1099
1099
  let c = 0;
1100
1100
  if (s && s(f, u))
1101
1101
  return h(f, u);
@@ -1122,12 +1122,12 @@ const gi = (t, e) => e.skipDedupe || e.method !== "GET", yi = (t, e) => e.method
1122
1122
  throw d;
1123
1123
  return p(null, d);
1124
1124
  });
1125
- }, ki = "application/json", rr = "Content-Type", ke = Symbol(), ir = Symbol();
1126
- function sn(t = {}) {
1125
+ }, bi = "application/json", rr = "Content-Type", ke = Symbol(), ir = Symbol();
1126
+ function on(t = {}) {
1127
1127
  var e;
1128
1128
  return (e = Object.entries(t).find(([n]) => n.toLowerCase() === rr.toLowerCase())) === null || e === void 0 ? void 0 : e[1];
1129
1129
  }
1130
- function cn(t) {
1130
+ function an(t) {
1131
1131
  return /^application\/.*json.*/.test(t);
1132
1132
  }
1133
1133
  const ge = function(t, e, n = !1) {
@@ -1156,24 +1156,24 @@ const ge = function(t, e, n = !1) {
1156
1156
  return n && i ? new i(...r) : i;
1157
1157
  }
1158
1158
  };
1159
- function Ii(t, e = !1) {
1159
+ function ki(t, e = !1) {
1160
1160
  je.options = e ? t : ge(je.options, t);
1161
1161
  }
1162
- function Si(t, e = !1) {
1162
+ function Ii(t, e = !1) {
1163
1163
  je.polyfills = e ? t : ge(je.polyfills, t);
1164
1164
  }
1165
- function _i(t) {
1165
+ function Si(t) {
1166
1166
  je.errorType = t;
1167
1167
  }
1168
- const Ei = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
1168
+ const _i = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
1169
1169
  class or extends Error {
1170
1170
  }
1171
- const Pi = (t) => {
1171
+ const Ei = (t) => {
1172
1172
  const e = /* @__PURE__ */ Object.create(null);
1173
1173
  t = t._addons.reduce((v, l) => l.beforeRequest && l.beforeRequest(v, t._options, e) || v, t);
1174
1174
  const { _url: n, _options: r, _config: i, _catchers: o, _resolvers: a, _middlewares: s, _addons: h } = t, f = new Map(o), u = ge(i.options, r);
1175
1175
  let c = n;
1176
- const p = Ei(s)((v, l) => (c = v, i.polyfill("fetch")(v, l)))(n, u), d = new Error(), b = p.catch((v) => {
1176
+ const p = _i(s)((v, l) => (c = v, i.polyfill("fetch")(v, l)))(n, u), d = new Error(), b = p.catch((v) => {
1177
1177
  throw { [ke]: v };
1178
1178
  }).then((v) => {
1179
1179
  if (!v.ok) {
@@ -1239,7 +1239,7 @@ CAUSE: ` + d.stack, l.response = v, l.url = c, v.type === "opaque")
1239
1239
  ...typeof l.resolver == "function" ? l.resolver(v) : l.resolver
1240
1240
  }), P);
1241
1241
  return a.reduce((v, l) => l(v, t), _);
1242
- }, Ti = {
1242
+ }, Pi = {
1243
1243
  _url: "",
1244
1244
  _options: {},
1245
1245
  _config: je,
@@ -1318,8 +1318,8 @@ CAUSE: ` + d.stack, l.response = v, l.url = c, v.type === "opaque")
1318
1318
  },
1319
1319
  fetch(t = this._options.method, e = "", n = null) {
1320
1320
  let r = this.url(e).options({ method: t });
1321
- const i = sn(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || cn(i));
1322
- return r = n ? o ? r.json(n, i) : r.body(n) : r, Pi(r._deferred.reduce((a, s) => s(a, a._url, a._options), r));
1321
+ const i = on(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || an(i));
1322
+ return r = n ? o ? r.json(n, i) : r.body(n) : r, Ei(r._deferred.reduce((a, s) => s(a, a._url, a._options), r));
1323
1323
  },
1324
1324
  get(t = "") {
1325
1325
  return this.fetch("GET", t);
@@ -1346,25 +1346,25 @@ CAUSE: ` + d.stack, l.response = v, l.url = c, v.type === "opaque")
1346
1346
  return { ...this, _options: { ...this._options, body: t } };
1347
1347
  },
1348
1348
  json(t, e) {
1349
- const n = sn(this._options.headers);
1350
- return this.content(e || cn(n) && n || ki).body(JSON.stringify(t));
1349
+ const n = on(this._options.headers);
1350
+ return this.content(e || an(n) && n || bi).body(JSON.stringify(t));
1351
1351
  }
1352
1352
  };
1353
1353
  function ie(t = "", e = {}) {
1354
- return { ...Ti, _url: t, _options: e };
1354
+ return { ...Pi, _url: t, _options: e };
1355
1355
  }
1356
1356
  ie.default = ie;
1357
- ie.options = Ii;
1358
- ie.errorType = _i;
1359
- ie.polyfills = Si;
1357
+ ie.options = ki;
1358
+ ie.errorType = Si;
1359
+ ie.polyfills = Ii;
1360
1360
  ie.WretchError = or;
1361
1361
  function ee() {
1362
- sessionStorage.removeItem(Tt), ue(q.CLEAR_CACHE, {});
1362
+ sessionStorage.removeItem(Ot), ue(q.CLEAR_CACHE, {});
1363
1363
  }
1364
- function Oi(t) {
1364
+ function Ti(t) {
1365
1365
  const e = t.endpoint || `https://api2.${Se}`, n = (g) => async (I, E) => {
1366
- let U = sessionStorage.getItem(Tt);
1367
- U || (U = Date.now().toString(), sessionStorage.setItem(Tt, U));
1366
+ let U = sessionStorage.getItem(Ot);
1367
+ U || (U = Date.now().toString(), sessionStorage.setItem(Ot, U));
1368
1368
  const Z = {
1369
1369
  ...E,
1370
1370
  headers: {
@@ -1375,7 +1375,7 @@ function Oi(t) {
1375
1375
  return g(I, Z);
1376
1376
  }, r = (g = !0) => (I) => async (E, U) => {
1377
1377
  let Z = null;
1378
- if (Z = await Xe(g), !Z) {
1378
+ if (Z = await Ve(g), !Z) {
1379
1379
  if (g)
1380
1380
  throw new Error("No access token available");
1381
1381
  return I(E, U);
@@ -1402,8 +1402,8 @@ function Oi(t) {
1402
1402
  }, o = ie(e).headers({ "Content-Type": "application/json" }).middlewares([
1403
1403
  n,
1404
1404
  r(),
1405
- on(),
1406
- an({
1405
+ nn(),
1406
+ rn({
1407
1407
  delayTimer: 1e3,
1408
1408
  delayRamp: (g, I) => g * I,
1409
1409
  maxAttempts: 3,
@@ -1414,8 +1414,8 @@ function Oi(t) {
1414
1414
  n,
1415
1415
  r(!1),
1416
1416
  i,
1417
- on(),
1418
- an({
1417
+ nn(),
1418
+ rn({
1419
1419
  delayTimer: 1e3,
1420
1420
  delayRamp: (g, I) => g * I,
1421
1421
  maxAttempts: 3,
@@ -1492,7 +1492,7 @@ function Oi(t) {
1492
1492
  return await o.url(`/products/${g}`).get().json();
1493
1493
  }
1494
1494
  async function K() {
1495
- return await Dt() ? await o.url("/profile").get().json() : null;
1495
+ return await Rt() ? await o.url("/profile").get().json() : null;
1496
1496
  }
1497
1497
  async function $(g) {
1498
1498
  const I = await o.url("/profile").patch(g).res();
@@ -1508,7 +1508,7 @@ function Oi(t) {
1508
1508
  return (await o.url("/profile/unlink-spotify").post().res()).ok;
1509
1509
  }
1510
1510
  async function W(g) {
1511
- const I = await Xe(!1);
1511
+ const I = await Ve(!1);
1512
1512
  if (!I)
1513
1513
  throw new Error("No access token available");
1514
1514
  const E = new URL(`https://spotify-oas.${Se}/sesamy-callback`);
@@ -1523,7 +1523,7 @@ function Oi(t) {
1523
1523
  return E;
1524
1524
  }
1525
1525
  async function m(g) {
1526
- const I = await Xe(!1);
1526
+ const I = await Ve(!1);
1527
1527
  let E;
1528
1528
  switch (g.target) {
1529
1529
  case "account":
@@ -1538,7 +1538,7 @@ function Oi(t) {
1538
1538
  return I && (E.hash = `#access_token=${I}`), g.shorten ? le(E.href, g.ttl) : E.href;
1539
1539
  }
1540
1540
  async function y() {
1541
- const g = await Xe(!1), I = new URL(`https://account.${Se}/subscriptions/${t.clientId}`);
1541
+ const g = await Ve(!1), I = new URL(`https://account.${Se}/subscriptions/${t.clientId}`);
1542
1542
  g && (I.hash = `#access_token=${g}`), window.location.href = I.toString();
1543
1543
  }
1544
1544
  return {
@@ -1573,70 +1573,70 @@ function Oi(t) {
1573
1573
  openHostedAccountPage: y
1574
1574
  };
1575
1575
  }
1576
- const ar = "@sesamy/sesamy-js", Zt = "1.3.2";
1577
- function un(t, e, n, r, i) {
1576
+ const ar = "@sesamy/sesamy-js", Dt = "1.3.2";
1577
+ function sn(t, e, n, r, i) {
1578
1578
  for (e = e.split ? e.split(".") : e, r = 0; r < e.length; r++)
1579
1579
  t = t ? t[e[r]] : i;
1580
1580
  return t === i ? n : t;
1581
1581
  }
1582
- var Ve = "undefined", ln = "object", jt = function() {
1583
- }, sr = "any", cr = "*", ve = "__", rt = typeof process < "u" ? process : {};
1584
- rt.env && rt.env.NODE_ENV;
1582
+ var Ye = "undefined", cn = "object", jt = function() {
1583
+ }, sr = "any", cr = "*", ve = "__", it = typeof process < "u" ? process : {};
1584
+ it.env && it.env.NODE_ENV;
1585
1585
  var H = typeof document < "u";
1586
- rt.versions != null && rt.versions.node != null;
1586
+ it.versions != null && it.versions.node != null;
1587
1587
  typeof Deno < "u" && Deno.core;
1588
1588
  H && window.name === "nodejs" || typeof navigator < "u" && navigator.userAgent !== void 0 && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
1589
1589
  function ur(t, e) {
1590
1590
  return e.charAt(0)[t]() + e.slice(1);
1591
1591
  }
1592
- var ji = ur.bind(null, "toUpperCase"), Ci = ur.bind(null, "toLowerCase");
1593
- function xi(t) {
1594
- return lr(t) ? ji("null") : typeof t == "object" ? Li(t) : Object.prototype.toString.call(t).slice(8, -1);
1592
+ var Oi = ur.bind(null, "toUpperCase"), ji = ur.bind(null, "toLowerCase");
1593
+ function Ci(t) {
1594
+ return lr(t) ? Oi("null") : typeof t == "object" ? Ui(t) : Object.prototype.toString.call(t).slice(8, -1);
1595
1595
  }
1596
- function it(t, e) {
1596
+ function ot(t, e) {
1597
1597
  e === void 0 && (e = !0);
1598
- var n = xi(t);
1599
- return e ? Ci(n) : n;
1598
+ var n = Ci(t);
1599
+ return e ? ji(n) : n;
1600
1600
  }
1601
- function Fe(t, e) {
1601
+ function He(t, e) {
1602
1602
  return typeof e === t;
1603
1603
  }
1604
- var V = Fe.bind(null, "function"), se = Fe.bind(null, "string"), _e = Fe.bind(null, "undefined"), Ai = Fe.bind(null, "boolean");
1605
- Fe.bind(null, "symbol");
1604
+ var V = He.bind(null, "function"), se = He.bind(null, "string"), _e = He.bind(null, "undefined"), xi = He.bind(null, "boolean");
1605
+ He.bind(null, "symbol");
1606
1606
  function lr(t) {
1607
1607
  return t === null;
1608
1608
  }
1609
- function $i(t) {
1610
- return it(t) === "number" && !isNaN(t);
1609
+ function Ai(t) {
1610
+ return ot(t) === "number" && !isNaN(t);
1611
1611
  }
1612
1612
  function dr(t) {
1613
- return it(t) === "array";
1613
+ return ot(t) === "array";
1614
1614
  }
1615
1615
  function X(t) {
1616
- if (!Ui(t))
1616
+ if (!$i(t))
1617
1617
  return !1;
1618
1618
  for (var e = t; Object.getPrototypeOf(e) !== null; )
1619
1619
  e = Object.getPrototypeOf(e);
1620
1620
  return Object.getPrototypeOf(t) === e;
1621
1621
  }
1622
- function Ui(t) {
1622
+ function $i(t) {
1623
1623
  return t && (typeof t == "object" || t !== null);
1624
1624
  }
1625
- function Li(t) {
1625
+ function Ui(t) {
1626
1626
  return V(t.constructor) ? t.constructor.name : null;
1627
1627
  }
1628
- function Ni(t) {
1629
- return t instanceof Error || se(t.message) && t.constructor && $i(t.constructor.stackTraceLimit);
1628
+ function Li(t) {
1629
+ return t instanceof Error || se(t.message) && t.constructor && Ai(t.constructor.stackTraceLimit);
1630
1630
  }
1631
1631
  function hr(t, e) {
1632
1632
  if (typeof e != "object" || lr(e))
1633
1633
  return !1;
1634
1634
  if (e instanceof t)
1635
1635
  return !0;
1636
- var n = it(new t(""));
1637
- if (Ni(e))
1636
+ var n = ot(new t(""));
1637
+ if (Li(e))
1638
1638
  for (; e; ) {
1639
- if (it(e) === n)
1639
+ if (ot(e) === n)
1640
1640
  return !0;
1641
1641
  e = Object.getPrototypeOf(e);
1642
1642
  }
@@ -1644,54 +1644,54 @@ function hr(t, e) {
1644
1644
  }
1645
1645
  hr.bind(null, TypeError);
1646
1646
  hr.bind(null, SyntaxError);
1647
- function st(t, e) {
1647
+ function ct(t, e) {
1648
1648
  var n = t instanceof Element || t instanceof HTMLDocument;
1649
- return n && e ? Ri(t, e) : n;
1649
+ return n && e ? Ni(t, e) : n;
1650
1650
  }
1651
- function Ri(t, e) {
1651
+ function Ni(t, e) {
1652
1652
  return e === void 0 && (e = ""), t && t.nodeName === e.toUpperCase();
1653
1653
  }
1654
- function ct(t) {
1654
+ function ut(t) {
1655
1655
  var e = [].slice.call(arguments, 1);
1656
1656
  return function() {
1657
1657
  return t.apply(void 0, [].slice.call(arguments).concat(e));
1658
1658
  };
1659
1659
  }
1660
- ct(st, "form");
1661
- ct(st, "button");
1662
- ct(st, "input");
1663
- ct(st, "select");
1664
- function zi(t) {
1660
+ ut(ct, "form");
1661
+ ut(ct, "button");
1662
+ ut(ct, "input");
1663
+ ut(ct, "select");
1664
+ function Ri(t) {
1665
1665
  return t ? dr(t) ? t : [t] : [];
1666
1666
  }
1667
- function dn(t) {
1667
+ function un(t) {
1668
1668
  try {
1669
1669
  return decodeURIComponent(t.replace(/\+/g, " "));
1670
1670
  } catch {
1671
1671
  return null;
1672
1672
  }
1673
1673
  }
1674
- function Di() {
1674
+ function zi() {
1675
1675
  if (H) {
1676
1676
  var t = navigator, e = t.languages;
1677
1677
  return t.userLanguage || (e && e.length ? e[0] : t.language);
1678
1678
  }
1679
1679
  }
1680
- function Mi() {
1680
+ function Di() {
1681
1681
  try {
1682
1682
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
1683
1683
  } catch {
1684
1684
  }
1685
1685
  }
1686
- function Zi(t) {
1686
+ function Mi(t) {
1687
1687
  return function(e) {
1688
1688
  for (var n, r = /* @__PURE__ */ Object.create(null), i = /([^&=]+)=?([^&]*)/g; n = i.exec(e); ) {
1689
- var o = dn(n[1]), a = dn(n[2]);
1689
+ var o = un(n[1]), a = un(n[2]);
1690
1690
  o.substring(o.length - 2) === "[]" ? (r[o = o.substring(0, o.length - 2)] || (r[o] = [])).push(a) : r[o] = a === "" || a;
1691
1691
  }
1692
1692
  for (var s in r) {
1693
1693
  var h = s.split("[");
1694
- h.length > 1 && (Ki(r, h.map(function(f) {
1694
+ h.length > 1 && (Zi(r, h.map(function(f) {
1695
1695
  return f.replace(/[?[\]\\ ]/g, "");
1696
1696
  }), r[s]), delete r[s]);
1697
1697
  }
@@ -1704,7 +1704,7 @@ function Zi(t) {
1704
1704
  return H && window.location.search.substring(1);
1705
1705
  }(t));
1706
1706
  }
1707
- function Ki(t, e, n) {
1707
+ function Zi(t, e, n) {
1708
1708
  for (var r = e.length - 1, i = 0; i < r; ++i) {
1709
1709
  var o = e[i];
1710
1710
  if (o === "__proto__" || o === "constructor")
@@ -1713,14 +1713,14 @@ function Ki(t, e, n) {
1713
1713
  }
1714
1714
  t[e[r]] = n;
1715
1715
  }
1716
- function ut() {
1716
+ function lt() {
1717
1717
  for (var t = "", e = 0, n = 4294967295 * Math.random() | 0; e++ < 36; ) {
1718
1718
  var r = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e - 1], i = 15 & n;
1719
1719
  t += r == "-" || r == "4" ? r : (r == "x" ? i : 3 & i | 8).toString(16), n = e % 8 == 0 ? 4294967295 * Math.random() | 0 : n >> 4;
1720
1720
  }
1721
1721
  return t;
1722
1722
  }
1723
- function Wi(t, e) {
1723
+ function Ki(t, e) {
1724
1724
  var n, r, i, o = null, a = 0, s = function() {
1725
1725
  a = /* @__PURE__ */ new Date(), o = null, i = t.apply(n, r);
1726
1726
  };
@@ -1731,7 +1731,7 @@ function Wi(t, e) {
1731
1731
  return n = this, r = arguments, f <= 0 ? (clearTimeout(o), o = null, a = h, i = t.apply(n, r)) : o || (o = setTimeout(s, f)), i;
1732
1732
  };
1733
1733
  }
1734
- var De = "global", Ce = ve + "global" + ve, xe = typeof self === ln && self.self === self && self || typeof global === ln && global.global === global && global || void 0;
1734
+ var De = "global", Ce = ve + "global" + ve, xe = typeof self === cn && self.self === self && self || typeof global === cn && global.global === global && global || void 0;
1735
1735
  function we(t) {
1736
1736
  return xe[Ce][t];
1737
1737
  }
@@ -1744,7 +1744,7 @@ function $e(t) {
1744
1744
  function Ue(t, e, n) {
1745
1745
  var r;
1746
1746
  try {
1747
- if (Kt(t)) {
1747
+ if (Mt(t)) {
1748
1748
  var i = window[t];
1749
1749
  r = i[e].bind(i);
1750
1750
  }
@@ -1753,17 +1753,17 @@ function Ue(t, e, n) {
1753
1753
  return r || n;
1754
1754
  }
1755
1755
  xe[Ce] || (xe[Ce] = {});
1756
- var Ye = {};
1757
- function Kt(t) {
1758
- if (typeof Ye[t] !== Ve)
1759
- return Ye[t];
1756
+ var Ge = {};
1757
+ function Mt(t) {
1758
+ if (typeof Ge[t] !== Ye)
1759
+ return Ge[t];
1760
1760
  try {
1761
1761
  var e = window[t];
1762
- e.setItem(Ve, Ve), e.removeItem(Ve);
1762
+ e.setItem(Ye, Ye), e.removeItem(Ye);
1763
1763
  } catch {
1764
- return Ye[t] = !1;
1764
+ return Ge[t] = !1;
1765
1765
  }
1766
- return Ye[t] = !0;
1766
+ return Ge[t] = !0;
1767
1767
  }
1768
1768
  function A() {
1769
1769
  return A = Object.assign || function(t) {
@@ -1775,18 +1775,18 @@ function A() {
1775
1775
  return t;
1776
1776
  }, A.apply(this, arguments);
1777
1777
  }
1778
- var ae = "function", re = "undefined", Fi = "@@redux/" + Math.random().toString(36), hn = /* @__PURE__ */ function() {
1778
+ var ae = "function", re = "undefined", Wi = "@@redux/" + Math.random().toString(36), ln = /* @__PURE__ */ function() {
1779
1779
  return typeof Symbol === ae && Symbol.observable || "@@observable";
1780
- }(), Ge = " != " + ae;
1780
+ }(), Be = " != " + ae;
1781
1781
  function fr(t, e, n) {
1782
1782
  var r;
1783
1783
  if (typeof e === ae && typeof n === re && (n = e, e = void 0), typeof n !== re) {
1784
1784
  if (typeof n !== ae)
1785
- throw new Error("enhancer" + Ge);
1785
+ throw new Error("enhancer" + Be);
1786
1786
  return n(fr)(t, e);
1787
1787
  }
1788
1788
  if (typeof t !== ae)
1789
- throw new Error("reducer" + Ge);
1789
+ throw new Error("reducer" + Be);
1790
1790
  var i = t, o = e, a = [], s = a, h = !1;
1791
1791
  function f() {
1792
1792
  s === a && (s = a.slice());
@@ -1796,7 +1796,7 @@ function fr(t, e, n) {
1796
1796
  }
1797
1797
  function c(d) {
1798
1798
  if (typeof d !== ae)
1799
- throw new Error("Listener" + Ge);
1799
+ throw new Error("Listener" + Be);
1800
1800
  var b = !0;
1801
1801
  return f(), s.push(d), function() {
1802
1802
  if (b) {
@@ -1824,9 +1824,9 @@ function fr(t, e, n) {
1824
1824
  }
1825
1825
  return p({ type: "@@redux/INIT" }), (r = { dispatch: p, subscribe: c, getState: u, replaceReducer: function(d) {
1826
1826
  if (typeof d !== ae)
1827
- throw new Error("next reducer" + Ge);
1827
+ throw new Error("next reducer" + Be);
1828
1828
  i = d, p({ type: "@@redux/INIT" });
1829
- } })[hn] = function() {
1829
+ } })[ln] = function() {
1830
1830
  var d, b = c;
1831
1831
  return (d = { subscribe: function(S) {
1832
1832
  if (typeof S != "object")
@@ -1835,12 +1835,12 @@ function fr(t, e, n) {
1835
1835
  S.next && S.next(u());
1836
1836
  }
1837
1837
  return w(), { unsubscribe: b(w) };
1838
- } })[hn] = function() {
1838
+ } })[ln] = function() {
1839
1839
  return this;
1840
1840
  }, d;
1841
1841
  }, r;
1842
1842
  }
1843
- function Hi(t, e) {
1843
+ function Fi(t, e) {
1844
1844
  var n = e && e.type;
1845
1845
  return "action " + (n && n.toString() || "?") + "reducer " + t + " returns " + re;
1846
1846
  }
@@ -1854,7 +1854,7 @@ function Ae() {
1854
1854
  };
1855
1855
  });
1856
1856
  }
1857
- function Ji() {
1857
+ function Hi() {
1858
1858
  var t = arguments;
1859
1859
  return function(e) {
1860
1860
  return function(n, r, i) {
@@ -1867,14 +1867,14 @@ function Ji() {
1867
1867
  };
1868
1868
  };
1869
1869
  }
1870
- var ce = ve + "anon_id", ye = ve + "user_id", Pe = ve + "user_traits", oe = "userId", Ee = "anonymousId", nt = ["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"], Ct = ["name", "EVENTS", "config", "loaded"], x = nt.reduce(function(t, e) {
1870
+ var ce = ve + "anon_id", ye = ve + "user_id", Pe = ve + "user_traits", oe = "userId", Ee = "anonymousId", rt = ["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"], Ct = ["name", "EVENTS", "config", "loaded"], x = rt.reduce(function(t, e) {
1871
1871
  return t[e] = e, t;
1872
1872
  }, { registerPluginType: function(t) {
1873
1873
  return "registerPlugin:" + t;
1874
1874
  }, pluginReadyType: function(t) {
1875
1875
  return "ready:" + t;
1876
- } }), fn = /^utm_/, pn = /^an_prop_/, mn = /^an_trait_/;
1877
- function Xi(t) {
1876
+ } }), dn = /^utm_/, hn = /^an_prop_/, fn = /^an_trait_/;
1877
+ function Ji(t) {
1878
1878
  var e = t.storage.setItem;
1879
1879
  return function(n) {
1880
1880
  return function(r) {
@@ -1885,11 +1885,11 @@ function Xi(t) {
1885
1885
  var u = Object.keys(i.params);
1886
1886
  if (u.length) {
1887
1887
  var c = o.an_uid, p = o.an_event, d = u.reduce(function(b, S) {
1888
- if (S.match(fn) || S.match(/^(d|g)clid/)) {
1889
- var w = S.replace(fn, "");
1888
+ if (S.match(dn) || S.match(/^(d|g)clid/)) {
1889
+ var w = S.replace(dn, "");
1890
1890
  b.campaign[w === "campaign" ? "name" : w] = o[S];
1891
1891
  }
1892
- return S.match(pn) && (b.props[S.replace(pn, "")] = o[S]), S.match(mn) && (b.traits[S.replace(mn, "")] = o[S]), b;
1892
+ return S.match(hn) && (b.props[S.replace(hn, "")] = o[S]), S.match(fn) && (b.traits[S.replace(fn, "")] = o[S]), b;
1893
1893
  }, { campaign: {}, props: {}, traits: {} });
1894
1894
  n.dispatch(A({ type: x.params, raw: o }, d, c ? { userId: c } : {})), c && setTimeout(function() {
1895
1895
  return t.identify(c, d.traits);
@@ -1903,7 +1903,7 @@ function Xi(t) {
1903
1903
  };
1904
1904
  };
1905
1905
  }
1906
- function Vi(t) {
1906
+ function Xi(t) {
1907
1907
  return function(e, n) {
1908
1908
  if (e === void 0 && (e = {}), n === void 0 && (n = {}), n.type === x.setItemEnd) {
1909
1909
  if (n.key === ce)
@@ -1923,13 +1923,13 @@ function Vi(t) {
1923
1923
  }
1924
1924
  };
1925
1925
  }
1926
- function gn(t) {
1926
+ function pn(t) {
1927
1927
  return { userId: t.getItem(ye), anonymousId: t.getItem(ce), traits: t.getItem(Pe) };
1928
1928
  }
1929
1929
  var xt = function(t) {
1930
1930
  return ve + "TEMP" + ve + t;
1931
1931
  };
1932
- function Yi(t) {
1932
+ function Vi(t) {
1933
1933
  var e = t.storage, n = e.setItem, r = e.removeItem, i = e.getItem;
1934
1934
  return function(o) {
1935
1935
  return function(a) {
@@ -1940,7 +1940,7 @@ function Yi(t) {
1940
1940
  }), [oe, Ee, "traits"].forEach(function(d) {
1941
1941
  $e(xt(d));
1942
1942
  })), s.type === x.identify) {
1943
- i(ce) || n(ce, ut());
1943
+ i(ce) || n(ce, lt());
1944
1944
  var c = i(ye), p = i(Pe) || {};
1945
1945
  c && c !== h && o.dispatch({ type: x.userIdChanged, old: { userId: c, traits: p }, new: { userId: h, traits: f }, options: u }), h && n(ye, h), f && n(Pe, A({}, p, f));
1946
1946
  }
@@ -1950,7 +1950,7 @@ function Yi(t) {
1950
1950
  };
1951
1951
  }
1952
1952
  var ze = {};
1953
- function yn(t, e) {
1953
+ function mn(t, e) {
1954
1954
  ze[t] && V(ze[t]) && (ze[t](e), delete ze[t]);
1955
1955
  }
1956
1956
  function pr(t, e, n) {
@@ -1962,7 +1962,7 @@ function pr(t, e, n) {
1962
1962
  });
1963
1963
  });
1964
1964
  }
1965
- function Gi(t) {
1965
+ function Yi(t) {
1966
1966
  return { abort: t };
1967
1967
  }
1968
1968
  function mr(t, e, n) {
@@ -1980,7 +1980,7 @@ function mr(t, e, n) {
1980
1980
  return l.hasOwnProperty(O) && k[O] && k[O] !== l[O] && (T[O] = k[O]), T;
1981
1981
  }, l);
1982
1982
  }(p.payload, h), _ = r[P.meta.rid];
1983
- if (!_ && (w = S({ payload: P, config: a[d].config, instance: n, abort: Gi })) && X(w) && w.abort)
1983
+ if (!_ && (w = S({ payload: P, config: a[d].config, instance: n, abort: Yi })) && X(w) && w.abort)
1984
1984
  return void (r[P.meta.rid] = !0);
1985
1985
  if (!_) {
1986
1986
  var v = b + ":" + d;
@@ -1995,7 +1995,7 @@ function mr(t, e, n) {
1995
1995
  }
1996
1996
  }
1997
1997
  }
1998
- var yt = function(t) {
1998
+ var vt = function(t) {
1999
1999
  var e = t.data, n = t.action, r = t.instance, i = t.state, o = t.allPlugins, a = t.allMatches, s = t.store, h = t.EVENTS;
2000
2000
  try {
2001
2001
  var f = i.plugins, u = i.context, c = n.type, p = c.match(Te), d = e.exact.map(function(w) {
@@ -2020,7 +2020,7 @@ var yt = function(t) {
2020
2020
  throw new Error(R.type + " action not cancellable. Remove abort in " + z);
2021
2021
  };
2022
2022
  }(_, O);
2023
- return { payload: Bi(_), instance: w, config: k || {}, abort: C };
2023
+ return { payload: Gi(_), instance: w, config: k || {}, abort: C };
2024
2024
  };
2025
2025
  }(r, d), S = e.exact.reduce(function(w, P) {
2026
2026
  var _ = P.pluginName, v = P.methodName, l = !1;
@@ -2039,15 +2039,15 @@ var yt = function(t) {
2039
2039
  try {
2040
2040
  return Promise.resolve(O).then(function(z) {
2041
2041
  return C.method && V(C.method) ? (function(M, j) {
2042
- var W = _n(M);
2042
+ var W = In(M);
2043
2043
  if (W && W.name === j) {
2044
- var J = _n(W.method);
2044
+ var J = In(W.method);
2045
2045
  throw new Error([j + " plugin is calling method " + M, "Plugins cant call self", "Use " + W.method + " " + (J ? "or " + J.method : "") + " in " + j + " plugin insteadof " + M].join(`
2046
2046
  `));
2047
2047
  }
2048
2048
  }(C.methodName, C.pluginName), Promise.resolve(C.method({ payload: z, instance: r, abort: (K = z, $ = v, L = C.pluginName, function(M, j) {
2049
2049
  return A({}, K, { abort: { reason: M, plugins: j || [$], caller: c, from: L || $ } });
2050
- }), config: bn(C.pluginName, f, o), plugins: f })).then(function(M) {
2050
+ }), config: vn(C.pluginName, f, o), plugins: f })).then(function(M) {
2051
2051
  var j = X(M) ? M : {};
2052
2052
  return Promise.resolve(A({}, z, j));
2053
2053
  })) : z;
@@ -2072,20 +2072,20 @@ var yt = function(t) {
2072
2072
  var l = e.exact.length === v + 1, k = _.pluginName, T = o[k];
2073
2073
  return Promise.resolve(P).then(function(O) {
2074
2074
  var C = w[k] ? w[k] : {};
2075
- if (p && (C = O), wt(C, k))
2076
- return vt({ data: C, method: c, instance: r, pluginName: k, store: s }), Promise.resolve(O);
2077
- if (wt(O, k))
2078
- return l && vt({ data: O, method: c, instance: r, store: s }), Promise.resolve(O);
2075
+ if (p && (C = O), bt(C, k))
2076
+ return wt({ data: C, method: c, instance: r, pluginName: k, store: s }), Promise.resolve(O);
2077
+ if (bt(O, k))
2078
+ return l && wt({ data: O, method: c, instance: r, store: s }), Promise.resolve(O);
2079
2079
  if (S.hasOwnProperty(k) && S[k] === !0)
2080
2080
  return s.dispatch({ type: "queue", plugin: k, payload: C, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(O);
2081
2081
  var R = b(w[k], o[k]);
2082
- return Promise.resolve(T[c]({ abort: R.abort, payload: C, instance: r, config: bn(k, f, o), plugins: f })).then(function(z) {
2082
+ return Promise.resolve(T[c]({ abort: R.abort, payload: C, instance: r, config: vn(k, f, o), plugins: f })).then(function(z) {
2083
2083
  var K = X(z) ? z : {}, $ = A({}, O, K), L = w[k];
2084
- if (wt(L, k))
2085
- vt({ data: L, method: c, instance: r, pluginName: k, store: s });
2084
+ if (bt(L, k))
2085
+ wt({ data: L, method: c, instance: r, pluginName: k, store: s });
2086
2086
  else {
2087
2087
  var M = c + ":" + k;
2088
- (M.match(/:/g) || []).length < 2 && !c.match(vn) && !c.match(wn) && r.dispatch(A({}, p ? $ : C, { type: M, _: { called: M, from: "submethod" } }));
2088
+ (M.match(/:/g) || []).length < 2 && !c.match(gn) && !c.match(yn) && r.dispatch(A({}, p ? $ : C, { type: M, _: { called: M, from: "submethod" } }));
2089
2089
  }
2090
2090
  return Promise.resolve($);
2091
2091
  });
@@ -2094,7 +2094,7 @@ var yt = function(t) {
2094
2094
  return Promise.reject(O);
2095
2095
  }
2096
2096
  }, Promise.resolve(n))).then(function(P) {
2097
- if (!(c.match(Te) || c.match(/^registerPlugin/) || c.match(wn) || c.match(vn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
2097
+ if (!(c.match(Te) || c.match(/^registerPlugin/) || c.match(yn) || c.match(gn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
2098
2098
  if (h.plugins.includes(c), P._ && P._.originalAction === c)
2099
2099
  return P;
2100
2100
  var _ = A({}, P, { _: { originalAction: P.type, called: P.type, from: "engineEnd" } });
@@ -2106,27 +2106,27 @@ var yt = function(t) {
2106
2106
  } catch (w) {
2107
2107
  return Promise.reject(w);
2108
2108
  }
2109
- }, Te = /Start$/, vn = /^bootstrap/, wn = /^ready/;
2110
- function vt(t) {
2109
+ }, Te = /Start$/, gn = /^bootstrap/, yn = /^ready/;
2110
+ function wt(t) {
2111
2111
  var e = t.pluginName, n = t.method + "Aborted" + (e ? ":" + e : "");
2112
2112
  t.store.dispatch(A({}, t.data, { type: n, _: { called: n, from: "abort" } }));
2113
2113
  }
2114
- function bn(t, e, n) {
2114
+ function vn(t, e, n) {
2115
2115
  var r = e[t] || n[t];
2116
2116
  return r && r.config ? r.config : {};
2117
2117
  }
2118
- function kn(t, e) {
2118
+ function wn(t, e) {
2119
2119
  return e.reduce(function(n, r) {
2120
2120
  return r[t] ? n.concat({ methodName: t, pluginName: r.name, method: r[t] }) : n;
2121
2121
  }, []);
2122
2122
  }
2123
- function In(t, e) {
2123
+ function bn(t, e) {
2124
2124
  var n = t.replace(Te, ""), r = e ? ":" + e : "";
2125
2125
  return ["" + t + r, "" + n + r, n + "End" + r];
2126
2126
  }
2127
- function wt(t, e) {
2127
+ function bt(t, e) {
2128
2128
  var n = t.abort;
2129
- return !!n && (n === !0 || Sn(n, e) || n && Sn(n.plugins, e));
2129
+ return !!n && (n === !0 || kn(n, e) || n && kn(n.plugins, e));
2130
2130
  }
2131
2131
  function gr(t, e) {
2132
2132
  var n = t.abort;
@@ -2140,19 +2140,19 @@ function gr(t, e) {
2140
2140
  function We(t) {
2141
2141
  return Array.isArray(t);
2142
2142
  }
2143
- function Sn(t, e) {
2143
+ function kn(t, e) {
2144
2144
  return !(!t || !We(t)) && t.includes(e);
2145
2145
  }
2146
- function _n(t) {
2146
+ function In(t) {
2147
2147
  var e = t.match(/(.*):(.*)/);
2148
2148
  return !!e && { method: e[1], name: e[2] };
2149
2149
  }
2150
- function Bi(t) {
2150
+ function Gi(t) {
2151
2151
  return Object.keys(t).reduce(function(e, n) {
2152
2152
  return n === "type" || (e[n] = X(t[n]) ? Object.assign({}, t[n]) : t[n]), e;
2153
2153
  }, {});
2154
2154
  }
2155
- function qi(t, e, n) {
2155
+ function Bi(t, e, n) {
2156
2156
  var r = {};
2157
2157
  return function(i) {
2158
2158
  return function(o) {
@@ -2164,7 +2164,7 @@ function qi(t, e, n) {
2164
2164
  if (a.abort)
2165
2165
  return Promise.resolve(o(a));
2166
2166
  if (f === x.enablePlugin && i.dispatch({ type: x.initializeStart, plugins: u, disabled: [], fromEnable: !0, meta: a.meta }), f === x.disablePlugin && setTimeout(function() {
2167
- return yn(a.meta.rid, { payload: a });
2167
+ return mn(a.meta.rid, { payload: a });
2168
2168
  }, 0), f === x.initializeEnd) {
2169
2169
  var p = e(), d = Object.keys(p), b = d.filter(function(l) {
2170
2170
  return u.includes(l);
@@ -2202,7 +2202,7 @@ function qi(t, e, n) {
2202
2202
  return Promise.resolve(l);
2203
2203
  var $ = T.getState(), L = (W = R, (J = $.plugins) === void 0 && (J = {}), (le = l.options) === void 0 && (le = {}), Object.keys(W).filter(function(m) {
2204
2204
  var y = le.plugins || {};
2205
- return Ai(y[m]) ? y[m] : y.all !== !1 && (!J[m] || J[m].enabled !== !1);
2205
+ return xi(y[m]) ? y[m] : y.all !== !1 && (!J[m] || J[m].enabled !== !1);
2206
2206
  }).map(function(m) {
2207
2207
  return W[m];
2208
2208
  }));
@@ -2215,22 +2215,22 @@ function qi(t, e, n) {
2215
2215
  var M = L.map(function(m) {
2216
2216
  return m.name;
2217
2217
  }), j = function(m, y, g) {
2218
- var I = In(m).map(function(E) {
2219
- return kn(E, y);
2218
+ var I = bn(m).map(function(E) {
2219
+ return wn(E, y);
2220
2220
  });
2221
2221
  return y.reduce(function(E, U) {
2222
- var Z = U.name, N = In(m, Z).map(function(Le) {
2223
- return kn(Le, y);
2222
+ var Z = U.name, N = bn(m, Z).map(function(Le) {
2223
+ return wn(Le, y);
2224
2224
  }), F = N[0], D = N[1], Q = N[2];
2225
2225
  return F.length && (E.beforeNS[Z] = F), D.length && (E.duringNS[Z] = D), Q.length && (E.afterNS[Z] = Q), E;
2226
2226
  }, { before: I[0], beforeNS: {}, during: I[1], duringNS: {}, after: I[2], afterNS: {} });
2227
2227
  }(z, L);
2228
- return Promise.resolve(yt({ action: l, data: { exact: j.before, namespaced: j.beforeNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(m) {
2228
+ return Promise.resolve(vt({ action: l, data: { exact: j.before, namespaced: j.beforeNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(m) {
2229
2229
  function y() {
2230
2230
  var E = function() {
2231
2231
  if (z.match(Te))
2232
- return Promise.resolve(yt({ action: A({}, g, { type: K + "End" }), data: { exact: j.after, namespaced: j.afterNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(U) {
2233
- U.meta && U.meta.hasCallback && yn(U.meta.rid, { payload: U });
2232
+ return Promise.resolve(vt({ action: A({}, g, { type: K + "End" }), data: { exact: j.after, namespaced: j.afterNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(U) {
2233
+ U.meta && U.meta.hasCallback && mn(U.meta.rid, { payload: U });
2234
2234
  });
2235
2235
  }();
2236
2236
  return E && E.then ? E.then(function() {
@@ -2241,7 +2241,7 @@ function qi(t, e, n) {
2241
2241
  return m;
2242
2242
  var g, I = function() {
2243
2243
  if (z !== K)
2244
- return Promise.resolve(yt({ action: A({}, m, { type: K }), data: { exact: j.during, namespaced: j.duringNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(E) {
2244
+ return Promise.resolve(vt({ action: A({}, m, { type: K }), data: { exact: j.during, namespaced: j.duringNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(E) {
2245
2245
  g = E;
2246
2246
  });
2247
2247
  g = m;
@@ -2264,7 +2264,7 @@ function qi(t, e, n) {
2264
2264
  };
2265
2265
  };
2266
2266
  }
2267
- function Qi(t) {
2267
+ function qi(t) {
2268
2268
  return function(e) {
2269
2269
  return function(n) {
2270
2270
  return function(r) {
@@ -2279,7 +2279,7 @@ function Qi(t) {
2279
2279
  };
2280
2280
  };
2281
2281
  }
2282
- var eo = function() {
2282
+ var Qi = function() {
2283
2283
  var t = this;
2284
2284
  this.before = [], this.after = [], this.addMiddleware = function(e, n) {
2285
2285
  t[n] = t[n].concat(e);
@@ -2303,39 +2303,39 @@ var eo = function() {
2303
2303
  };
2304
2304
  };
2305
2305
  };
2306
- function to(t) {
2306
+ function eo(t) {
2307
2307
  return function(e, n) {
2308
2308
  e === void 0 && (e = {});
2309
2309
  var r = {};
2310
2310
  if (n.type === "initialize:aborted")
2311
2311
  return e;
2312
2312
  if (/^registerPlugin:([^:]*)$/.test(n.type)) {
2313
- var i = En(n.type, "registerPlugin"), o = t()[i];
2313
+ var i = Sn(n.type, "registerPlugin"), o = t()[i];
2314
2314
  if (!o || !i)
2315
2315
  return e;
2316
2316
  var a = n.enabled, s = o.config;
2317
2317
  return r[i] = { enabled: a, initialized: !!a && !o.initialize, loaded: !!a && !!o.loaded({ config: s }), config: s }, A({}, e, r);
2318
2318
  }
2319
2319
  if (/^initialize:([^:]*)$/.test(n.type)) {
2320
- var h = En(n.type, x.initialize), f = t()[h];
2320
+ var h = Sn(n.type, x.initialize), f = t()[h];
2321
2321
  return f && h ? (r[h] = A({}, e[h], { initialized: !0, loaded: !!f.loaded({ config: f.config }) }), A({}, e, r)) : e;
2322
2322
  }
2323
2323
  if (/^ready:([^:]*)$/.test(n.type))
2324
2324
  return r[n.name] = A({}, e[n.name], { loaded: !0 }), A({}, e, r);
2325
2325
  switch (n.type) {
2326
2326
  case x.disablePlugin:
2327
- return A({}, e, Pn(n.plugins, !1, e));
2327
+ return A({}, e, _n(n.plugins, !1, e));
2328
2328
  case x.enablePlugin:
2329
- return A({}, e, Pn(n.plugins, !0, e));
2329
+ return A({}, e, _n(n.plugins, !0, e));
2330
2330
  default:
2331
2331
  return e;
2332
2332
  }
2333
2333
  };
2334
2334
  }
2335
- function En(t, e) {
2335
+ function Sn(t, e) {
2336
2336
  return t.substring(e.length + 1, t.length);
2337
2337
  }
2338
- function Pn(t, e, n) {
2338
+ function _n(t, e, n) {
2339
2339
  return t.reduce(function(r, i) {
2340
2340
  return r[i] = A({}, n[i], { enabled: e }), r;
2341
2341
  }, n);
@@ -2347,9 +2347,9 @@ function yr(t) {
2347
2347
  }
2348
2348
  return t;
2349
2349
  }
2350
- var no = { last: {}, history: [] };
2351
- function ro(t, e) {
2352
- t === void 0 && (t = no);
2350
+ var to = { last: {}, history: [] };
2351
+ function no(t, e) {
2352
+ t === void 0 && (t = to);
2353
2353
  var n = e.options, r = e.meta;
2354
2354
  if (e.type === x.track) {
2355
2355
  var i = yr(A({ event: e.event, properties: e.properties }, Object.keys(n).length && { options: n }, { meta: r }));
@@ -2357,9 +2357,9 @@ function ro(t, e) {
2357
2357
  }
2358
2358
  return t;
2359
2359
  }
2360
- var io = { actions: [] };
2361
- function oo(t, e) {
2362
- t === void 0 && (t = io);
2360
+ var ro = { actions: [] };
2361
+ function io(t, e) {
2362
+ t === void 0 && (t = ro);
2363
2363
  var n = e.payload;
2364
2364
  switch (e.type) {
2365
2365
  case "queue":
@@ -2372,11 +2372,11 @@ function oo(t, e) {
2372
2372
  }
2373
2373
  }
2374
2374
  var vr = /#.*$/;
2375
- function ao(t) {
2375
+ function oo(t) {
2376
2376
  var e = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);
2377
2377
  return "/" + (e && e[3] ? e[3].split("?")[0].replace(vr, "") : "");
2378
2378
  }
2379
- var wr, br, kr, Ir, so = function(t) {
2379
+ var wr, br, kr, Ir, ao = function(t) {
2380
2380
  if (t === void 0 && (t = {}), !H)
2381
2381
  return t;
2382
2382
  var e = document, n = e.title, r = e.referrer, i = window, o = i.location, a = i.innerWidth, s = i.innerHeight, h = o.hash, f = o.search, u = function(p) {
@@ -2388,11 +2388,11 @@ var wr, br, kr, Ir, so = function(t) {
2388
2388
  }
2389
2389
  }();
2390
2390
  return d ? d.match(/\?/) ? d : d + p : window.location.href.replace(vr, "");
2391
- }(f), c = { title: n, url: u, path: ao(u), hash: h, search: f, width: a, height: s };
2391
+ }(f), c = { title: n, url: u, path: oo(u), hash: h, search: f, width: a, height: s };
2392
2392
  return r && r !== "" && (c.referrer = r), A({}, c, t);
2393
- }, co = { last: {}, history: [] };
2394
- function uo(t, e) {
2395
- t === void 0 && (t = co);
2393
+ }, so = { last: {}, history: [] };
2394
+ function co(t, e) {
2395
+ t === void 0 && (t = so);
2396
2396
  var n = e.options;
2397
2397
  if (e.type === x.page) {
2398
2398
  var r = yr(A({ properties: e.properties, meta: e.meta }, Object.keys(n).length && { options: n }));
@@ -2405,10 +2405,10 @@ wr = function() {
2405
2405
  return !1;
2406
2406
  var t = navigator.appVersion;
2407
2407
  return ~t.indexOf("Win") ? "Windows" : ~t.indexOf("Mac") ? "MacOS" : ~t.indexOf("X11") ? "UNIX" : ~t.indexOf("Linux") ? "Linux" : "Unknown OS";
2408
- }(), br = H ? document.referrer : null, kr = Di(), Ir = Mi();
2409
- var Tn = { initialized: !1, sessionId: ut(), app: null, version: null, debug: !1, offline: !!H && !navigator.onLine, os: { name: wr }, userAgent: H ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: Ir, locale: kr, campaign: {}, referrer: br };
2410
- function lo(t, e) {
2411
- t === void 0 && (t = Tn);
2408
+ }(), br = H ? document.referrer : null, kr = zi(), Ir = Di();
2409
+ var En = { initialized: !1, sessionId: lt(), app: null, version: null, debug: !1, offline: !!H && !navigator.onLine, os: { name: wr }, userAgent: H ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: Ir, locale: kr, campaign: {}, referrer: br };
2410
+ function uo(t, e) {
2411
+ t === void 0 && (t = En);
2412
2412
  var n = t.initialized, r = e.campaign;
2413
2413
  switch (e.type) {
2414
2414
  case x.campaign:
@@ -2418,11 +2418,11 @@ function lo(t, e) {
2418
2418
  case x.online:
2419
2419
  return A({}, t, { offline: !1 });
2420
2420
  default:
2421
- return n ? t : A({}, Tn, t, { initialized: !0 });
2421
+ return n ? t : A({}, En, t, { initialized: !0 });
2422
2422
  }
2423
2423
  }
2424
- var ho = ["plugins", "reducers", "storage"];
2425
- function fo(t, e, n) {
2424
+ var lo = ["plugins", "reducers", "storage"];
2425
+ function ho(t, e, n) {
2426
2426
  if (H) {
2427
2427
  var r = window[(n ? "add" : "remove") + "EventListener"];
2428
2428
  t.split(" ").forEach(function(i) {
@@ -2430,8 +2430,8 @@ function fo(t, e, n) {
2430
2430
  });
2431
2431
  }
2432
2432
  }
2433
- function po(t) {
2434
- var e = fo.bind(null, "online offline", function(n) {
2433
+ function fo(t) {
2434
+ var e = ho.bind(null, "online offline", function(n) {
2435
2435
  return Promise.resolve(!navigator.onLine).then(t);
2436
2436
  });
2437
2437
  return e(!0), function(n) {
@@ -2448,17 +2448,17 @@ function Sr() {
2448
2448
  };
2449
2449
  };
2450
2450
  }
2451
- function On(t) {
2451
+ function Pn(t) {
2452
2452
  return function() {
2453
2453
  return Ae(Ae.apply(null, arguments), Sr());
2454
2454
  };
2455
2455
  }
2456
- function bt(t) {
2456
+ function kt(t) {
2457
2457
  return t ? dr(t) ? t : [t] : [];
2458
2458
  }
2459
- function jn(t, e, n) {
2459
+ function Tn(t, e, n) {
2460
2460
  t === void 0 && (t = {});
2461
- var r, i, o = ut();
2461
+ var r, i, o = lt();
2462
2462
  return e && (ze[o] = (r = e, i = function(a) {
2463
2463
  for (var s, h = a || Array.prototype.slice.call(arguments), f = 0; f < h.length; f++)
2464
2464
  if (V(h[f])) {
@@ -2470,7 +2470,7 @@ function jn(t, e, n) {
2470
2470
  i && i(a), r(a);
2471
2471
  })), A({}, t, { rid: o, ts: (/* @__PURE__ */ new Date()).getTime() }, e ? { hasCallback: !0 } : {});
2472
2472
  }
2473
- function mo(t) {
2473
+ function po(t) {
2474
2474
  t === void 0 && (t = {});
2475
2475
  var e = t.reducers || {}, n = t.initialUser || {}, r = (t.plugins || []).reduce(function(m, y) {
2476
2476
  if (V(y))
@@ -2497,25 +2497,25 @@ function mo(t) {
2497
2497
  }), m;
2498
2498
  }, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), i = t.storage ? t.storage : { getItem: we, setItem: be, removeItem: $e }, o = /* @__PURE__ */ function(m) {
2499
2499
  return function(y, g, I) {
2500
- return g.getState("user")[y] || (I && X(I) && I[y] ? I[y] : gn(m)[y] || we(xt(y)) || null);
2500
+ return g.getState("user")[y] || (I && X(I) && I[y] ? I[y] : pn(m)[y] || we(xt(y)) || null);
2501
2501
  };
2502
2502
  }(i), a = r.plugins, s = r.events.filter(function(m) {
2503
2503
  return !Ct.includes(m);
2504
- }).sort(), h = new Set(s.concat(nt).filter(function(m) {
2504
+ }).sort(), h = new Set(s.concat(rt).filter(function(m) {
2505
2505
  return !Ct.includes(m);
2506
2506
  })), f = Array.from(h).sort(), u = function() {
2507
2507
  return a;
2508
- }, c = new eo(), p = c.addMiddleware, d = c.removeMiddleware, b = c.dynamicMiddlewares, S = function() {
2508
+ }, c = new Qi(), p = c.addMiddleware, d = c.removeMiddleware, b = c.dynamicMiddlewares, S = function() {
2509
2509
  throw new Error("Abort disabled inListener");
2510
- }, w = Zi(), P = gn(i), _ = A({}, P, n, w.an_uid ? { userId: w.an_uid } : {}, w.an_aid ? { anonymousId: w.an_aid } : {});
2511
- _.anonymousId || (_.anonymousId = ut());
2510
+ }, w = Mi(), P = pn(i), _ = A({}, P, n, w.an_uid ? { userId: w.an_uid } : {}, w.an_aid ? { anonymousId: w.an_aid } : {});
2511
+ _.anonymousId || (_.anonymousId = lt());
2512
2512
  var v = A({ enable: function(m, y) {
2513
2513
  return new Promise(function(g) {
2514
- j.dispatch({ type: x.enablePlugin, plugins: bt(m), _: { originalAction: x.enablePlugin } }, g, [y]);
2514
+ j.dispatch({ type: x.enablePlugin, plugins: kt(m), _: { originalAction: x.enablePlugin } }, g, [y]);
2515
2515
  });
2516
2516
  }, disable: function(m, y) {
2517
2517
  return new Promise(function(g) {
2518
- j.dispatch({ type: x.disablePlugin, plugins: bt(m), _: { originalAction: x.disablePlugin } }, g, [y]);
2518
+ j.dispatch({ type: x.disablePlugin, plugins: kt(m), _: { originalAction: x.disablePlugin } }, g, [y]);
2519
2519
  });
2520
2520
  } }, r.methods), l = !1, k = { identify: function(m, y, g, I) {
2521
2521
  try {
@@ -2544,7 +2544,7 @@ function mo(t) {
2544
2544
  try {
2545
2545
  var I = X(m) ? m : {}, E = X(y) ? y : {};
2546
2546
  return Promise.resolve(new Promise(function(U) {
2547
- j.dispatch({ type: x.pageStart, properties: so(I), options: E, userId: o(oe, k, I), anonymousId: o(Ee, k, I) }, U, [m, y, g]);
2547
+ j.dispatch({ type: x.pageStart, properties: ao(I), options: E, userId: o(oe, k, I), anonymousId: o(Ee, k, I) }, U, [m, y, g]);
2548
2548
  }));
2549
2549
  } catch (U) {
2550
2550
  return Promise.reject(U);
@@ -2555,7 +2555,7 @@ function mo(t) {
2555
2555
  if (m === Ee || m === "anonId")
2556
2556
  return o(Ee, k);
2557
2557
  var y = k.getState("user");
2558
- return m ? un(y, m) : y;
2558
+ return m ? sn(y, m) : y;
2559
2559
  }, reset: function(m) {
2560
2560
  return new Promise(function(y) {
2561
2561
  j.dispatch({ type: x.resetStart }, y, m);
@@ -2584,11 +2584,11 @@ function mo(t) {
2584
2584
  };
2585
2585
  };
2586
2586
  };
2587
- return p(I, Be), p(E, qe), function() {
2588
- d(I, Be), d(E, qe);
2587
+ return p(I, qe), p(E, Qe), function() {
2588
+ d(I, qe), d(E, Qe);
2589
2589
  };
2590
2590
  }
2591
- var U = m.match(g) ? Be : qe, Z = function(N) {
2591
+ var U = m.match(g) ? qe : Qe, Z = function(N) {
2592
2592
  return function(F) {
2593
2593
  return function(D) {
2594
2594
  return D.type === m && y({ payload: D, instance: k, plugins: a, abort: S }), F(D);
@@ -2609,10 +2609,10 @@ function mo(t) {
2609
2609
  return g;
2610
2610
  }, getState: function(m) {
2611
2611
  var y = j.getState();
2612
- return m ? un(y, m) : Object.assign({}, y);
2612
+ return m ? sn(y, m) : Object.assign({}, y);
2613
2613
  }, dispatch: function(m) {
2614
2614
  var y = se(m) ? { type: m } : m;
2615
- if (nt.includes(y.type))
2615
+ if (rt.includes(y.type))
2616
2616
  throw new Error("reserved action " + y.type);
2617
2617
  var g = A({}, y, { _: A({ originalAction: y.type }, m._ || {}) });
2618
2618
  j.dispatch(g);
@@ -2622,22 +2622,22 @@ function mo(t) {
2622
2622
  j.dispatch({ type: x.removeItemStart, key: m, options: y });
2623
2623
  } }, setAnonymousId: function(m, y) {
2624
2624
  k.storage.setItem(ce, m, y);
2625
- }, events: { core: nt, plugins: s } }, T = r.middlewares.concat([function(m) {
2625
+ }, events: { core: rt, plugins: s } }, T = r.middlewares.concat([function(m) {
2626
2626
  return function(y) {
2627
2627
  return function(g) {
2628
- return g.meta || (g.meta = jn()), y(g);
2628
+ return g.meta || (g.meta = Tn()), y(g);
2629
2629
  };
2630
2630
  };
2631
- }, b(Be), qi(k, u, { all: f, plugins: s }), Qi(i), Xi(k), Yi(k), b(qe)]), O = { context: lo, user: Vi(i), page: uo, track: ro, plugins: to(u), queue: oo }, C = Ae, R = Ae;
2631
+ }, b(qe), Bi(k, u, { all: f, plugins: s }), qi(i), Ji(k), Vi(k), b(Qe)]), O = { context: uo, user: Xi(i), page: co, track: no, plugins: eo(u), queue: io }, C = Ae, R = Ae;
2632
2632
  if (H && t.debug) {
2633
2633
  var z = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
2634
2634
  z && (C = z({ trace: !0, traceLimit: 25 })), R = function() {
2635
- return arguments.length === 0 ? Sr() : X(typeof arguments[0]) ? On() : On().apply(null, arguments);
2635
+ return arguments.length === 0 ? Sr() : X(typeof arguments[0]) ? Pn() : Pn().apply(null, arguments);
2636
2636
  };
2637
2637
  }
2638
2638
  var K, $ = function(m) {
2639
2639
  return Object.keys(m).reduce(function(y, g) {
2640
- return ho.includes(g) || (y[g] = m[g]), y;
2640
+ return lo.includes(g) || (y[g] = m[g]), y;
2641
2641
  }, {});
2642
2642
  }(t), L = r.pluginsArray.reduce(function(m, y) {
2643
2643
  var g = y.name, I = y.config, E = y.loaded, U = r.pluginEnabled[g];
@@ -2652,7 +2652,7 @@ function mo(t) {
2652
2652
  (function(N) {
2653
2653
  Object.keys(N).forEach(function(F) {
2654
2654
  var D = N[F];
2655
- if (typeof D(void 0, { type: "@@redux/INIT" }) === re || typeof D(void 0, { type: Fi }) === re)
2655
+ if (typeof D(void 0, { type: "@@redux/INIT" }) === re || typeof D(void 0, { type: Wi }) === re)
2656
2656
  throw new Error("reducer " + F + " " + re);
2657
2657
  });
2658
2658
  })(g);
@@ -2663,18 +2663,18 @@ function mo(t) {
2663
2663
  if (N === void 0 && (N = {}), U)
2664
2664
  throw U;
2665
2665
  for (var D = !1, Q = {}, Le = 0; Le < Z.length; Le++) {
2666
- var He = Z[Le], Yt = N[He], ht = (0, g[He])(Yt, F);
2667
- if (typeof ht === re) {
2668
- var Nr = Hi(He, F);
2666
+ var Je = Z[Le], Xt = N[Je], ft = (0, g[Je])(Xt, F);
2667
+ if (typeof ft === re) {
2668
+ var Nr = Fi(Je, F);
2669
2669
  throw new Error(Nr);
2670
2670
  }
2671
- Q[He] = ht, D = D || ht !== Yt;
2671
+ Q[Je] = ft, D = D || ft !== Xt;
2672
2672
  }
2673
2673
  return D ? Q : N;
2674
2674
  };
2675
- }(A({}, O, e)), M, R(C(Ji.apply(void 0, T))));
2675
+ }(A({}, O, e)), M, R(C(Hi.apply(void 0, T))));
2676
2676
  j.dispatch = (K = j.dispatch, function(m, y, g) {
2677
- var I = A({}, m, { meta: jn(m.meta, y, bt(g)) });
2677
+ var I = A({}, m, { meta: Tn(m.meta, y, kt(g)) });
2678
2678
  return K.apply(null, [I]);
2679
2679
  });
2680
2680
  var W = Object.keys(a);
@@ -2687,7 +2687,7 @@ function mo(t) {
2687
2687
  return j.dispatch({ type: x.registerPlugins, plugins: W, enabled: r.pluginEnabled }), r.pluginsArray.map(function(m, y) {
2688
2688
  var g = m.bootstrap, I = m.config, E = m.name;
2689
2689
  g && V(g) && g({ instance: k, config: I, payload: m }), j.dispatch({ type: x.registerPluginType(E), name: E, enabled: r.pluginEnabled[E], plugin: m }), r.pluginsArray.length === y + 1 && j.dispatch({ type: x.initializeStart, plugins: J, disabled: le });
2690
- }), po(function(m) {
2690
+ }), fo(function(m) {
2691
2691
  j.dispatch({ type: m ? x.offline : x.online });
2692
2692
  }), function(m, y, g) {
2693
2693
  setInterval(function() {
@@ -2695,32 +2695,32 @@ function mo(t) {
2695
2695
  }, 3e3);
2696
2696
  }(j, u, k), k;
2697
2697
  }
2698
- var Be = "before", qe = "after", Me = "cookie", fe = Pr(), _r = lt, go = lt;
2698
+ var qe = "before", Qe = "after", Me = "cookie", fe = Pr(), _r = dt, mo = dt;
2699
2699
  function Er(t) {
2700
- return fe ? lt(t, "", -1) : $e(t);
2700
+ return fe ? dt(t, "", -1) : $e(t);
2701
2701
  }
2702
2702
  function Pr() {
2703
2703
  if (fe !== void 0)
2704
2704
  return fe;
2705
2705
  var t = "cookiecookie";
2706
2706
  try {
2707
- lt(t, t), fe = document.cookie.indexOf(t) !== -1, Er(t);
2707
+ dt(t, t), fe = document.cookie.indexOf(t) !== -1, Er(t);
2708
2708
  } catch {
2709
2709
  fe = !1;
2710
2710
  }
2711
2711
  return fe;
2712
2712
  }
2713
- function lt(t, e, n, r, i, o) {
2713
+ function dt(t, e, n, r, i, o) {
2714
2714
  if (typeof window < "u") {
2715
2715
  var a = arguments.length > 1;
2716
2716
  return fe === !1 && (a ? be(t, e) : we(t)), a ? document.cookie = t + "=" + encodeURIComponent(e) + (n ? "; expires=" + new Date(+/* @__PURE__ */ new Date() + 1e3 * n).toUTCString() + (r ? "; path=" + r : "") + (i ? "; domain=" + i : "") + (o ? "; secure" : "") : "") : decodeURIComponent((("; " + document.cookie).split("; " + t + "=")[1] || "").split(";")[0]);
2717
2717
  }
2718
2718
  }
2719
- var Ze = "localStorage", yo = Kt.bind(null, "localStorage");
2719
+ var Ze = "localStorage", go = Mt.bind(null, "localStorage");
2720
2720
  Ue("localStorage", "getItem", we);
2721
2721
  Ue("localStorage", "setItem", be);
2722
2722
  Ue("localStorage", "removeItem", $e);
2723
- var Ke = "sessionStorage", vo = Kt.bind(null, "sessionStorage");
2723
+ var Ke = "sessionStorage", yo = Mt.bind(null, "sessionStorage");
2724
2724
  Ue("sessionStorage", "getItem", we);
2725
2725
  Ue("sessionStorage", "setItem", be);
2726
2726
  Ue("sessionStorage", "removeItem", $e);
@@ -2739,57 +2739,57 @@ function Oe(t) {
2739
2739
  if (e !== null && e !== "")
2740
2740
  return e;
2741
2741
  }
2742
- var wo = yo(), bo = vo(), ko = Pr();
2742
+ var vo = go(), wo = yo(), bo = Pr();
2743
2743
  function Tr(t, e) {
2744
2744
  if (t) {
2745
- var n = Wt(e), r = !Xt(n), i = Ft(n) ? Oe(localStorage.getItem(t)) : void 0;
2745
+ var n = Zt(e), r = !Ht(n), i = Kt(n) ? Oe(localStorage.getItem(t)) : void 0;
2746
2746
  if (r && !_e(i))
2747
2747
  return i;
2748
- var o = Ht(n) ? Oe(_r(t)) : void 0;
2748
+ var o = Wt(n) ? Oe(_r(t)) : void 0;
2749
2749
  if (r && o)
2750
2750
  return o;
2751
- var a = Jt(n) ? Oe(sessionStorage.getItem(t)) : void 0;
2751
+ var a = Ft(n) ? Oe(sessionStorage.getItem(t)) : void 0;
2752
2752
  if (r && a)
2753
2753
  return a;
2754
2754
  var s = we(t);
2755
2755
  return r ? s : { localStorage: i, sessionStorage: a, cookie: o, global: s };
2756
2756
  }
2757
2757
  }
2758
- function Io(t, e, n) {
2758
+ function ko(t, e, n) {
2759
2759
  if (t && !_e(e)) {
2760
- var r = {}, i = Wt(n), o = JSON.stringify(e), a = !Xt(i);
2761
- return Ft(i) && (r[Ze] = Qe(Ze, e, Oe(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Ze] : Ht(i) && (r[Me] = Qe(Me, e, Oe(_r(t))), go(t, o), a) ? r[Me] : Jt(i) && (r[Ke] = Qe(Ke, e, Oe(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Ke] : (r[De] = Qe(De, e, we(t)), be(t, e), a ? r[De] : r);
2760
+ var r = {}, i = Zt(n), o = JSON.stringify(e), a = !Ht(i);
2761
+ return Kt(i) && (r[Ze] = et(Ze, e, Oe(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Ze] : Wt(i) && (r[Me] = et(Me, e, Oe(_r(t))), mo(t, o), a) ? r[Me] : Ft(i) && (r[Ke] = et(Ke, e, Oe(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Ke] : (r[De] = et(De, e, we(t)), be(t, e), a ? r[De] : r);
2762
2762
  }
2763
2763
  }
2764
- function So(t, e) {
2764
+ function Io(t, e) {
2765
2765
  if (t) {
2766
- var n = Wt(e), r = Tr(t, cr), i = {};
2767
- return !_e(r.localStorage) && Ft(n) && (localStorage.removeItem(t), i[Ze] = r.localStorage), !_e(r.cookie) && Ht(n) && (Er(t), i[Me] = r.cookie), !_e(r.sessionStorage) && Jt(n) && (sessionStorage.removeItem(t), i[Ke] = r.sessionStorage), !_e(r.global) && dt(n, De) && ($e(t), i[De] = r.global), i;
2766
+ var n = Zt(e), r = Tr(t, cr), i = {};
2767
+ return !_e(r.localStorage) && Kt(n) && (localStorage.removeItem(t), i[Ze] = r.localStorage), !_e(r.cookie) && Wt(n) && (Er(t), i[Me] = r.cookie), !_e(r.sessionStorage) && Ft(n) && (sessionStorage.removeItem(t), i[Ke] = r.sessionStorage), !_e(r.global) && ht(n, De) && ($e(t), i[De] = r.global), i;
2768
2768
  }
2769
2769
  }
2770
- function Wt(t) {
2770
+ function Zt(t) {
2771
2771
  return t ? se(t) ? t : t.storage : sr;
2772
2772
  }
2773
- function Ft(t) {
2774
- return wo && dt(t, Ze);
2773
+ function Kt(t) {
2774
+ return vo && ht(t, Ze);
2775
2775
  }
2776
- function Ht(t) {
2777
- return ko && dt(t, Me);
2776
+ function Wt(t) {
2777
+ return bo && ht(t, Me);
2778
2778
  }
2779
- function Jt(t) {
2780
- return bo && dt(t, Ke);
2779
+ function Ft(t) {
2780
+ return wo && ht(t, Ke);
2781
2781
  }
2782
- function Xt(t) {
2782
+ function Ht(t) {
2783
2783
  return t === cr || t === "all";
2784
2784
  }
2785
- function dt(t, e) {
2786
- return t === sr || t === e || Xt(t);
2785
+ function ht(t, e) {
2786
+ return t === sr || t === e || Ht(t);
2787
2787
  }
2788
- function Qe(t, e, n) {
2788
+ function et(t, e, n) {
2789
2789
  return { location: t, current: e, previous: n };
2790
2790
  }
2791
- var _o = { setItem: Io, getItem: Tr, removeItem: So };
2792
- function Eo(t, e, n) {
2791
+ var So = { setItem: ko, getItem: Tr, removeItem: Io };
2792
+ function _o(t, e, n) {
2793
2793
  return e in t ? Object.defineProperty(t, e, {
2794
2794
  value: n,
2795
2795
  enumerable: !0,
@@ -2797,7 +2797,7 @@ function Eo(t, e, n) {
2797
2797
  writable: !0
2798
2798
  }) : t[e] = n, t;
2799
2799
  }
2800
- function Cn(t, e) {
2800
+ function On(t, e) {
2801
2801
  var n = Object.keys(t);
2802
2802
  if (Object.getOwnPropertySymbols) {
2803
2803
  var r = Object.getOwnPropertySymbols(t);
@@ -2807,24 +2807,24 @@ function Cn(t, e) {
2807
2807
  }
2808
2808
  return n;
2809
2809
  }
2810
- function xn(t) {
2810
+ function jn(t) {
2811
2811
  for (var e = 1; e < arguments.length; e++) {
2812
2812
  var n = arguments[e] != null ? arguments[e] : {};
2813
- e % 2 ? Cn(Object(n), !0).forEach(function(r) {
2814
- Eo(t, r, n[r]);
2815
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Cn(Object(n)).forEach(function(r) {
2813
+ e % 2 ? On(Object(n), !0).forEach(function(r) {
2814
+ _o(t, r, n[r]);
2815
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : On(Object(n)).forEach(function(r) {
2816
2816
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
2817
2817
  });
2818
2818
  }
2819
2819
  return t;
2820
2820
  }
2821
- function Po() {
2821
+ function Eo() {
2822
2822
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = {
2823
- storage: _o
2823
+ storage: So
2824
2824
  };
2825
- return mo(xn(xn({}, e), t));
2825
+ return po(jn(jn({}, e), t));
2826
2826
  }
2827
- function To(t, e) {
2827
+ function Po(t, e) {
2828
2828
  e = e || {};
2829
2829
  var n, r, i = [], o = e.max || 1 / 0;
2830
2830
  function a() {
@@ -2846,7 +2846,7 @@ function To(t, e) {
2846
2846
  }
2847
2847
  };
2848
2848
  }
2849
- function Oo(t) {
2849
+ function To(t) {
2850
2850
  if (typeof window > "u")
2851
2851
  return;
2852
2852
  const { addEventListener: e, history: n, location: r } = window;
@@ -2858,37 +2858,37 @@ function Oo(t) {
2858
2858
  const s = n[a];
2859
2859
  n[a] = function(...h) {
2860
2860
  var c;
2861
- const f = ((c = h[2]) == null ? void 0 : c.toString()) || "", u = Co(f);
2861
+ const f = ((c = h[2]) == null ? void 0 : c.toString()) || "", u = jo(f);
2862
2862
  return i !== u && (i = u, setTimeout(() => t(f), 0)), s.apply(n, h);
2863
2863
  };
2864
2864
  });
2865
2865
  }
2866
- function jo(t, e) {
2866
+ function Oo(t, e) {
2867
2867
  const n = t.indexOf(e);
2868
2868
  return n > -1 ? t.slice(0, n) : t;
2869
2869
  }
2870
- function Co(t) {
2871
- return ["#", "?"].forEach((e) => t = jo(t, e)), t;
2870
+ function jo(t) {
2871
+ return ["#", "?"].forEach((e) => t = Oo(t, e)), t;
2872
2872
  }
2873
- function xo() {
2874
- Oo(() => {
2873
+ function Co() {
2874
+ To(() => {
2875
2875
  ne.page();
2876
2876
  });
2877
2877
  }
2878
- function Ao(t) {
2878
+ function xo(t) {
2879
2879
  if (t === void 0 && (t = {}), !H)
2880
2880
  return jt;
2881
- var e = $n(), n = At(), r = An(), i = et(r, e), o = et(n, e), a = [], s = [], h = [], f = r, u = i, c = o, p = Object.keys(t);
2881
+ var e = xn(), n = At(), r = Cn(), i = tt(r, e), o = tt(n, e), a = [], s = [], h = [], f = r, u = i, c = o, p = Object.keys(t);
2882
2882
  if (!p.length)
2883
2883
  return jt;
2884
2884
  var d = p.map(function(S) {
2885
2885
  return Number(S);
2886
- }), b = Wi(function() {
2887
- var S = $n(), w = function($, L) {
2886
+ }), b = Ki(function() {
2887
+ var S = xn(), w = function($, L) {
2888
2888
  return L.map(function(M) {
2889
2889
  return M === 100 ? $ - 5 : $ * (M / 100);
2890
2890
  });
2891
- }(S, d), P = At(), _ = An(), v = et(_, S), l = et(P, S);
2891
+ }(S, d), P = At(), _ = Cn(), v = tt(_, S), l = tt(P, S);
2892
2892
  if (u = v > u ? v : u, c = l < c ? l : c, !(a.length >= d.length)) {
2893
2893
  var k = f === _, T = "up";
2894
2894
  k ? T = "initial" : f <= _ && (T = "down");
@@ -2915,28 +2915,28 @@ function Ao(t) {
2915
2915
  function At() {
2916
2916
  return H ? document.body.scrollTop || document.documentElement.scrollTop : 0;
2917
2917
  }
2918
- function $o() {
2918
+ function Ao() {
2919
2919
  return H ? window.innerHeight || document.documentElement.clientHeight : 0;
2920
2920
  }
2921
- function An() {
2922
- return Math.round(At() + $o());
2921
+ function Cn() {
2922
+ return Math.round(At() + Ao());
2923
2923
  }
2924
- function $n() {
2924
+ function xn() {
2925
2925
  if (!H)
2926
2926
  return 0;
2927
2927
  var t = document.body, e = document.documentElement;
2928
2928
  return Math.max(t.scrollHeight, t.offsetHeight, e.clientHeight, e.scrollHeight, e.offsetHeight);
2929
2929
  }
2930
- function et(t, e) {
2930
+ function tt(t, e) {
2931
2931
  return Math.round(t / e * 100);
2932
2932
  }
2933
- var Un = "EventListener";
2934
- function Uo(t) {
2933
+ var An = "EventListener";
2934
+ function $o(t) {
2935
2935
  return function(e, n, r, i) {
2936
2936
  var o = r || jt, a = i || !1;
2937
2937
  if (!H)
2938
2938
  return o;
2939
- var s = ot(n), h = ot(e, !0);
2939
+ var s = at(n), h = at(e, !0);
2940
2940
  if (!h.length)
2941
2941
  throw new Error("noElements");
2942
2942
  if (!s.length)
@@ -2944,9 +2944,9 @@ function Uo(t) {
2944
2944
  var f = [];
2945
2945
  return function u(c) {
2946
2946
  c && (f = []);
2947
- for (var p = c ? "add" + Un : "remove" + Un, d = 0; d < h.length; d++) {
2947
+ for (var p = c ? "add" + An : "remove" + An, d = 0; d < h.length; d++) {
2948
2948
  var b = h[d];
2949
- f[d] = c ? a && a.once ? Lo(o) : o : f[d] || o;
2949
+ f[d] = c ? a && a.once ? Uo(o) : o : f[d] || o;
2950
2950
  for (var S = 0; S < s.length; S++)
2951
2951
  b[p] ? b["on" + s[S]] = c ? f[d] : null : b[p](s[S], f[d], a);
2952
2952
  }
@@ -2954,9 +2954,9 @@ function Uo(t) {
2954
2954
  }(t);
2955
2955
  };
2956
2956
  }
2957
- function ot(t, e) {
2957
+ function at(t, e) {
2958
2958
  if (se(t))
2959
- return e ? ot(document.querySelectorAll(t)) : (n = t).split(n.indexOf(",") > -1 ? "," : " ").map(function(a) {
2959
+ return e ? at(document.querySelectorAll(t)) : (n = t).split(n.indexOf(",") > -1 ? "," : " ").map(function(a) {
2960
2960
  return a.trim();
2961
2961
  });
2962
2962
  var n;
@@ -2965,18 +2965,18 @@ function ot(t, e) {
2965
2965
  r[i] = t[i];
2966
2966
  return r;
2967
2967
  }
2968
- var o = zi(t);
2968
+ var o = Ri(t);
2969
2969
  return e ? o.map(function(a) {
2970
- return se(a) ? ot(a, !0) : a;
2970
+ return se(a) ? at(a, !0) : a;
2971
2971
  }).flat() : o;
2972
2972
  }
2973
- function Lo(t, e) {
2973
+ function Uo(t, e) {
2974
2974
  var n;
2975
2975
  return function() {
2976
2976
  return t && (n = t.apply(e || this, arguments), t = null), n;
2977
2977
  };
2978
2978
  }
2979
- var kt = Uo("Event");
2979
+ var It = $o("Event");
2980
2980
  function Or(t, e) {
2981
2981
  return H && V(window[t]) ? (n = window[t], r = e, (i = window) === void 0 && (i = null), V(n) ? function() {
2982
2982
  n.apply(i, arguments), r.apply(i, arguments);
@@ -2985,11 +2985,11 @@ function Or(t, e) {
2985
2985
  }
2986
2986
  Or.bind(null, "onerror");
2987
2987
  Or.bind(null, "onload");
2988
- var jr = typeof window > "u", Ln = "hidden";
2989
- function No(t) {
2988
+ var jr = typeof window > "u", $n = "hidden";
2989
+ function Lo(t) {
2990
2990
  if (jr)
2991
2991
  return !1;
2992
- var e = Ro(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2992
+ var e = No(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2993
2993
  return t(!!document[e]);
2994
2994
  }, i = function() {
2995
2995
  return document.addEventListener(n, r);
@@ -2998,15 +2998,15 @@ function No(t) {
2998
2998
  return document.removeEventListener(n, r), i;
2999
2999
  };
3000
3000
  }
3001
- function Ro() {
3001
+ function No() {
3002
3002
  var t = ["webkit", "moz", "ms", "o"];
3003
- return jr || Ln in document ? Ln : t.reduce(function(e, n) {
3003
+ return jr || $n in document ? $n : t.reduce(function(e, n) {
3004
3004
  var r = n + "Hidden";
3005
3005
  return !e && r in document ? r : e;
3006
3006
  }, null);
3007
3007
  }
3008
- var zo = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
3009
- function Do(t, e) {
3008
+ var Ro = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
3009
+ function zo(t, e) {
3010
3010
  e === void 0 && (e = {});
3011
3011
  var n = /* @__PURE__ */ function(a, s) {
3012
3012
  var h = this, f = !1;
@@ -3017,12 +3017,12 @@ function Do(t, e) {
3017
3017
  };
3018
3018
  }(t, e.throttle || 1e4), r = [];
3019
3019
  function i() {
3020
- var a = No(function(s) {
3020
+ var a = Lo(function(s) {
3021
3021
  s || n({ type: "tabVisible" });
3022
3022
  });
3023
- return r = [a].concat(zo.map(function(s) {
3024
- return kt(document, s, n);
3025
- })).concat(kt(window, "load", n)).concat(kt(window, "scroll", n, { capture: !0, passive: !0 })), o;
3023
+ return r = [a].concat(Ro.map(function(s) {
3024
+ return It(document, s, n);
3025
+ })).concat(It(window, "load", n)).concat(It(window, "scroll", n, { capture: !0, passive: !0 })), o;
3026
3026
  }
3027
3027
  function o() {
3028
3028
  r.map(function(a) {
@@ -3033,7 +3033,7 @@ function Do(t, e) {
3033
3033
  return o(), i;
3034
3034
  };
3035
3035
  }
3036
- function Mo(t) {
3036
+ function Do(t) {
3037
3037
  var e, n, r = t.onIdle, i = t.onWakeUp, o = t.onHeartbeat, a = t.timeout, s = a === void 0 ? 1e4 : a, h = t.throttle, f = h === void 0 ? 2e3 : h, u = !1, c = !1, p = /* @__PURE__ */ new Date(), d = function() {
3038
3038
  return clearTimeout(e);
3039
3039
  };
@@ -3042,7 +3042,7 @@ function Mo(t) {
3042
3042
  u = !0, r && (n = /* @__PURE__ */ new Date(), r(Re(p), w));
3043
3043
  }, s);
3044
3044
  }
3045
- var S = Do(b, { throttle: f });
3045
+ var S = zo(b, { throttle: f });
3046
3046
  return { disable: function() {
3047
3047
  c = !0, u = !1, d();
3048
3048
  var w = S();
@@ -3056,8 +3056,8 @@ function Mo(t) {
3056
3056
  function Re(t, e) {
3057
3057
  return e ? 0 : Math.round((/* @__PURE__ */ new Date() - t) / 1e3);
3058
3058
  }
3059
- const Nn = 5e3;
3060
- class Zo {
3059
+ const Un = 5e3;
3060
+ class Mo {
3061
3061
  constructor(e) {
3062
3062
  B(this, "element");
3063
3063
  B(this, "isInViewport", !1);
@@ -3079,11 +3079,11 @@ class Zo {
3079
3079
  {
3080
3080
  threshold: 0
3081
3081
  }
3082
- ), this.observer.observe(this.element), Mo({
3082
+ ), this.observer.observe(this.element), Do({
3083
3083
  onIdle: (n) => this.handleAwake(!1, n),
3084
3084
  onWakeUp: (n) => this.handleAwake(!0, n),
3085
- timeout: Nn
3086
- }), Ao({
3085
+ timeout: Un
3086
+ }), xo({
3087
3087
  25: this.handleScroll.bind(this),
3088
3088
  50: this.handleScroll.bind(this),
3089
3089
  75: this.handleScroll.bind(this),
@@ -3101,7 +3101,7 @@ class Zo {
3101
3101
  e ? (this.isAwake = !0, this.trackInViewport()) : this.handleAwake(!1), this.isInViewport = e;
3102
3102
  }
3103
3103
  handleAwake(e, n = Math.round((Date.now() - this.lastEventAt) / 1e3)) {
3104
- this.isAwake = e, this.lastEventAt = e ? Date.now() - n * Nn : Date.now(), this.isInViewport && this.trackAwake(e, n);
3104
+ this.isAwake = e, this.lastEventAt = e ? Date.now() - n * Un : Date.now(), this.isInViewport && this.trackAwake(e, n);
3105
3105
  }
3106
3106
  handleScroll(e) {
3107
3107
  this.scrollCallback && this.scrollCallback(e);
@@ -3118,17 +3118,17 @@ class Zo {
3118
3118
  this.registeredView || (this.registeredView = !0, this.viewCallback && this.viewCallback());
3119
3119
  }
3120
3120
  }
3121
- const Rn = "sesamy_session_id";
3122
- function Ko() {
3123
- let t = sessionStorage.getItem(Rn);
3124
- return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(Rn, t)), t;
3121
+ const Ln = "sesamy_session_id";
3122
+ function Zo() {
3123
+ let t = sessionStorage.getItem(Ln);
3124
+ return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(Ln, t)), t;
3125
3125
  }
3126
- let Cr = !1, $t, zn, at;
3127
- function Wo({ clientId: t, enabled: e = !0, endpoint: n = di }) {
3128
- if ($t = t, zn = e, at = n, !zn)
3126
+ let Cr = !1, $t, Nn, st;
3127
+ function Ko({ clientId: t, enabled: e = !0, endpoint: n = di }) {
3128
+ if ($t = t, Nn = e, st = n, !Nn)
3129
3129
  return;
3130
- xo();
3131
- const r = new Zo({
3130
+ Co();
3131
+ const r = new Mo({
3132
3132
  element: document.body,
3133
3133
  viewCallback: () => {
3134
3134
  ne.page();
@@ -3153,15 +3153,15 @@ function Wo({ clientId: t, enabled: e = !0, endpoint: n = di }) {
3153
3153
  });
3154
3154
  }
3155
3155
  });
3156
- Jo(document.body, () => {
3156
+ Ho(document.body, () => {
3157
3157
  r.flush();
3158
- }), Xo(document.body, () => {
3158
+ }), Jo(document.body, () => {
3159
3159
  r.handleVisibilityChange();
3160
3160
  }), window.addEventListener(q.AUTHENTICATED, async (i) => {
3161
3161
  const o = i;
3162
3162
  await ne.identify(o.detail.sub);
3163
3163
  }), window.addEventListener(q.LOGOUT, async () => {
3164
- await ne.track("logout", {}), Vt.flush(), await ne.reset();
3164
+ await ne.track("logout", {}), Jt.flush(), await ne.reset();
3165
3165
  });
3166
3166
  }
3167
3167
  function xr(t) {
@@ -3170,9 +3170,9 @@ function xr(t) {
3170
3170
  ...e,
3171
3171
  clientId: $t,
3172
3172
  requestId: Math.random().toString(36).slice(2, 9),
3173
- sessionId: Ko(),
3173
+ sessionId: Zo(),
3174
3174
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
3175
- version: Zt,
3175
+ version: Dt,
3176
3176
  event: e.event,
3177
3177
  context: {
3178
3178
  page: {
@@ -3190,11 +3190,11 @@ function xr(t) {
3190
3190
  }))
3191
3191
  );
3192
3192
  }
3193
- const Vt = To(
3193
+ const Jt = Po(
3194
3194
  async (t) => {
3195
3195
  if (t.length > 0) {
3196
3196
  const e = xr(t);
3197
- Cr ? navigator.sendBeacon(at, e) : (await fetch(at, {
3197
+ Cr ? navigator.sendBeacon(st, e) : (await fetch(st, {
3198
3198
  method: "POST",
3199
3199
  body: e,
3200
3200
  headers: {
@@ -3210,24 +3210,24 @@ const Vt = To(
3210
3210
  // 3s
3211
3211
  }
3212
3212
  );
3213
- function It(t) {
3213
+ function St(t) {
3214
3214
  var e;
3215
3215
  if (t.anonymousId)
3216
3216
  if ((e = t.properties) != null && e.flushing) {
3217
3217
  const n = { ...t };
3218
- delete n.properties.flushing, navigator.sendBeacon(at, xr([n]));
3218
+ delete n.properties.flushing, navigator.sendBeacon(st, xr([n]));
3219
3219
  } else
3220
- Vt.push(t);
3220
+ Jt.push(t);
3221
3221
  }
3222
- const ne = Po({
3222
+ const ne = Eo({
3223
3223
  app: ar,
3224
- version: Zt,
3224
+ version: Dt,
3225
3225
  plugins: [
3226
3226
  {
3227
3227
  name: "custom-analytics-plugin",
3228
3228
  page: ({ payload: t }) => {
3229
3229
  const { properties: e, anonymousId: n, userId: r, event: i } = t;
3230
- It({
3230
+ St({
3231
3231
  anonymousId: n,
3232
3232
  userId: r,
3233
3233
  properties: e,
@@ -3237,7 +3237,7 @@ const ne = Po({
3237
3237
  },
3238
3238
  track: ({ payload: t }) => {
3239
3239
  const { properties: e, anonymousId: n, userId: r, event: i } = t;
3240
- It({
3240
+ St({
3241
3241
  anonymousId: n,
3242
3242
  userId: r,
3243
3243
  properties: e,
@@ -3247,7 +3247,7 @@ const ne = Po({
3247
3247
  },
3248
3248
  identify: ({ payload: t }) => {
3249
3249
  const { properties: e, anonymousId: n, userId: r } = t;
3250
- It({
3250
+ St({
3251
3251
  anonymousId: n,
3252
3252
  userId: r,
3253
3253
  properties: e,
@@ -3257,23 +3257,23 @@ const ne = Po({
3257
3257
  }
3258
3258
  ]
3259
3259
  });
3260
- function Fo(t, e) {
3260
+ function Wo(t, e) {
3261
3261
  ne.track(t, e);
3262
3262
  }
3263
- function Ho() {
3264
- return Cr = !0, Vt.flush();
3263
+ function Fo() {
3264
+ return Cr = !0, Jt.flush();
3265
3265
  }
3266
3266
  const Ar = /* @__PURE__ */ new Map();
3267
- function Jo(t, e) {
3267
+ function Ho(t, e) {
3268
3268
  Ar.set(t, e);
3269
3269
  }
3270
3270
  window.addEventListener("beforeunload", () => {
3271
3271
  Ar.forEach((t, e) => {
3272
3272
  t.bind(e)();
3273
- }), Ho();
3273
+ }), Fo();
3274
3274
  });
3275
3275
  const $r = /* @__PURE__ */ new Map();
3276
- function Xo(t, e) {
3276
+ function Jo(t, e) {
3277
3277
  $r.set(t, e);
3278
3278
  }
3279
3279
  window.addEventListener("visibilitychange", () => {
@@ -3286,11 +3286,11 @@ function Lr() {
3286
3286
  const t = sessionStorage.getItem(Ur);
3287
3287
  return t ? JSON.parse(t) : [];
3288
3288
  }
3289
- function Vo(t) {
3289
+ function Xo(t) {
3290
3290
  const e = Lr();
3291
3291
  e.push(t), sessionStorage.setItem(Ur, JSON.stringify(e));
3292
3292
  }
3293
- function Yo(t) {
3293
+ function Vo(t) {
3294
3294
  const {
3295
3295
  getEntitlement: e,
3296
3296
  getEntitlements: n,
@@ -3321,11 +3321,11 @@ function Yo(t) {
3321
3321
  autoOnboardProduct: K,
3322
3322
  openHostedAccountPage: $,
3323
3323
  generateLink: L
3324
- } = Oi(t), M = {
3324
+ } = Ti(t), M = {
3325
3325
  auth: {
3326
3326
  getUser: f,
3327
- isAuthenticated: Dt,
3328
- loginWithRedirect: Mt,
3327
+ isAuthenticated: Rt,
3328
+ loginWithRedirect: zt,
3329
3329
  logout: pi,
3330
3330
  setToken: nr
3331
3331
  },
@@ -3337,7 +3337,7 @@ function Yo(t) {
3337
3337
  unlinkSpotify: R
3338
3338
  },
3339
3339
  analytics: {
3340
- track: Fo
3340
+ track: Wo
3341
3341
  },
3342
3342
  tags: {
3343
3343
  list: c,
@@ -3378,40 +3378,40 @@ function Yo(t) {
3378
3378
  autoOnboard: K,
3379
3379
  linkSpotify: z
3380
3380
  },
3381
- getVersion: Go,
3381
+ getVersion: Yo,
3382
3382
  getPaymentIssues: O,
3383
3383
  generateLink: L,
3384
3384
  clearCache: ee
3385
3385
  };
3386
3386
  return t.namespace && (window[t.namespace] = M), M;
3387
3387
  }
3388
- function Go() {
3389
- return Zt;
3388
+ function Yo() {
3389
+ return Dt;
3390
3390
  }
3391
- function Bo() {
3392
- const t = new URLSearchParams(window.location.hash.substring(1)), e = t.get("access_token"), n = t.get("expires_in");
3391
+ function Go() {
3392
+ const t = new URLSearchParams(window.location.hash.substring(1)), e = t.get("access_token");
3393
3393
  if (e) {
3394
- nr(e, n ? parseInt(n, 10) : void 0);
3395
- const r = new URL(window.location.href);
3396
- t.delete("access_token"), t.delete("expires_in"), r.hash = t.toString(), window.history.replaceState(null, "", r);
3394
+ nr(e);
3395
+ const n = new URL(window.location.href);
3396
+ t.delete("access_token"), n.hash = t.toString(), window.history.replaceState(null, "", n);
3397
3397
  }
3398
3398
  }
3399
- const Dn = "sesamy-refresh", Mn = "force-refetch-entitlements";
3400
- function qo() {
3401
- const t = new URLSearchParams(window.location.search), e = t.get(Mn), n = t.get(Dn);
3399
+ const Rn = "sesamy-refresh", zn = "force-refetch-entitlements";
3400
+ function Bo() {
3401
+ const t = new URLSearchParams(window.location.search), e = t.get(zn), n = t.get(Rn);
3402
3402
  if (e !== null || n !== null) {
3403
3403
  const r = new URL(window.location.href);
3404
- t.delete(Mn), t.delete(Dn), r.search = t.toString(), ee(), window.history.replaceState(null, "", r);
3404
+ t.delete(zn), t.delete(Rn), r.search = t.toString(), ee(), window.history.replaceState(null, "", r);
3405
3405
  }
3406
3406
  }
3407
- function Qo() {
3407
+ function qo() {
3408
3408
  const t = new URLSearchParams(window.location.search), e = t.get("token"), n = t.get("se");
3409
3409
  if (!n || !e)
3410
3410
  return;
3411
3411
  const r = parseInt(n, 10);
3412
3412
  if (Number.isNaN(r) || r < Date.now())
3413
3413
  return;
3414
- Vo({
3414
+ Xo({
3415
3415
  url: window.location.href.split("?")[0],
3416
3416
  token: e,
3417
3417
  expiresAt: r,
@@ -3420,34 +3420,34 @@ function Qo() {
3420
3420
  const i = new URL(window.location.href);
3421
3421
  i.searchParams.delete("ss"), i.searchParams.delete("se"), i.searchParams.delete("sp"), i.searchParams.delete("so"), i.searchParams.delete("token"), window.history.replaceState(null, "", i);
3422
3422
  }
3423
- const Zn = "sesamy-user";
3424
- async function ea() {
3425
- const e = new URLSearchParams(window.location.search).get(Zn);
3423
+ const Dn = "sesamy-user";
3424
+ async function Qo() {
3425
+ const e = new URLSearchParams(window.location.search).get(Dn);
3426
3426
  if (!e)
3427
3427
  return;
3428
3428
  const n = await fi();
3429
- (n == null ? void 0 : n.email) !== e && Mt({ email: e });
3429
+ (n == null ? void 0 : n.email) !== e && zt({ authorizationParams: { email_hint: e } });
3430
3430
  const r = new URL(window.location.href);
3431
- r.searchParams.delete(Zn), window.history.replaceState(null, "", r);
3431
+ r.searchParams.delete(Dn), window.history.replaceState(null, "", r);
3432
3432
  }
3433
- const Kn = "sesamy-purchase";
3434
- function ta() {
3435
- const t = new URLSearchParams(window.location.search), e = t.get(Kn);
3433
+ const Mn = "sesamy-purchase";
3434
+ function ea() {
3435
+ const t = new URLSearchParams(window.location.search), e = t.get(Mn);
3436
3436
  if (e !== null) {
3437
3437
  const n = new URL(window.location.href);
3438
- t.delete(Kn), n.search = t.toString(), ue(q.PURCHASE, { itemSrc: e }), ee(), window.history.replaceState(null, "", n);
3438
+ t.delete(Mn), n.search = t.toString(), ue(q.PURCHASE, { itemSrc: e }), ee(), window.history.replaceState(null, "", n);
3439
3439
  }
3440
3440
  }
3441
- const Wn = "sesamy-login";
3442
- async function na() {
3443
- if (!new URLSearchParams(window.location.search).get(Wn))
3441
+ const Zn = "sesamy-login";
3442
+ async function ta() {
3443
+ if (!new URLSearchParams(window.location.search).get(Zn))
3444
3444
  return;
3445
- await Dt() || Mt();
3445
+ await Rt() || zt();
3446
3446
  const r = new URL(window.location.href);
3447
- r.searchParams.delete(Wn), window.history.replaceState(null, "", r);
3447
+ r.searchParams.delete(Zn), window.history.replaceState(null, "", r);
3448
3448
  }
3449
- async function ra(t) {
3450
- Wo({
3449
+ async function na(t) {
3450
+ Ko({
3451
3451
  clientId: t.clientId,
3452
3452
  // The default client id can be overridden by the config
3453
3453
  ...t.analytics
@@ -3457,19 +3457,19 @@ async function ra(t) {
3457
3457
  // The default client id can be overridden by the config
3458
3458
  ...t.auth
3459
3459
  });
3460
- const e = Yo({ clientId: t.clientId, ...t.api });
3461
- return ue(q.READY, {}), Bo(), qo(), Qo(), await na(), await ea(), ta(), e;
3460
+ const e = Vo({ clientId: t.clientId, ...t.api });
3461
+ return ue(q.READY, {}), Go(), Bo(), qo(), await ta(), await Qo(), ea(), e;
3462
3462
  }
3463
3463
  if (typeof document < "u") {
3464
3464
  const t = document.getElementById("sesamy-js");
3465
3465
  if (t != null && t.textContent)
3466
3466
  try {
3467
3467
  const e = JSON.parse(t.textContent);
3468
- ra(e);
3468
+ na(e);
3469
3469
  } catch (e) {
3470
3470
  console.error("Failed to parse config", e);
3471
3471
  }
3472
3472
  }
3473
3473
  export {
3474
- ra as init
3474
+ na as init
3475
3475
  };