From a2c79a2c9d68208d7f9fb84b8db49c29e9785ae2 Mon Sep 17 00:00:00 2001 From: Robert Ing Date: Mon, 25 Sep 2023 10:11:21 -0400 Subject: [PATCH] Generate latest bundle --- dist/BrazeKit.common.js | 7744 +++++++++++++++++++++------------------ dist/BrazeKit.iife.js | 7744 +++++++++++++++++++++------------------ 2 files changed, 8364 insertions(+), 7124 deletions(-) diff --git a/dist/BrazeKit.common.js b/dist/BrazeKit.common.js index aeb9252..7c4c848 100644 --- a/dist/BrazeKit.common.js +++ b/dist/BrazeKit.common.js @@ -21,8 +21,8 @@ function getAugmentedNamespace(n) { return a; } -const je = { - Wn: function(t) { +const ve = { + Fn: function (t) { const r = (t + "=".repeat((4 - (t.length % 4)) % 4)) .replace(/\-/g, "+") .replace(/_/g, "/"), @@ -30,76 +30,85 @@ const je = { o = new Uint8Array(n.length); for (let t = 0; t < n.length; ++t) o[t] = n.charCodeAt(t); return o; - } + }, }; -const ve = { +const De = { CustomEvent: "ce", Pr: "p", - Rl: "pc", - cc: "ca", - ya: "i", - Is: "ie", + $u: "pc", + dc: "ca", + Va: "i", + qs: "ie", P: "cci", T: "ccic", $: "ccc", H: "ccd", - Vh: "ss", - Fh: "se", - _i: "si", - Ii: "sc", - Mi: "sbc", - Ze: "sfe", - ro: "iec", - Pl: "lr", - Ll: "uae", + Wl: "ss", + xl: "se", + Vi: "si", + Li: "sc", + Qi: "sbc", + Ki: "sfe", + eo: "iec", + Su: "lr", + ju: "uae", R: "ci", B: "cc", - Nl: "lcaa", - Ml: "lcar", - Rn: "inc", - Bn: "add", - Ln: "rem", - Fn: "set", - $n: "ncam", - Ol: "sgu" + Au: "lcaa", + qu: "lcar", + Xn: "inc", + Jn: "add", + Qn: "rem", + Hn: "set", + Kn: "ncam", + Cu: "sgu", + Fr: "ffi", }, - De = { Ar: "feed_displayed", dc: "content_cards_displayed" }; + Be = { Br: "feed_displayed", vc: "content_cards_displayed" }; -const Ie = { - Y: () => { - const t = t => { - const e = (Math.random().toString(16) + "000000000").substr(2, 8); - return t ? "-" + e.substr(0, 4) + "-" + e.substr(4, 4) : e; +const Ge = { + Y: function () { + const t = (t = !1) => { + const n = (Math.random().toString(16) + "000000000").substr(2, 8); + return t ? "-" + n.substr(0, 4) + "-" + n.substr(4, 4) : n; }; return t() + t(!0) + t(!0) + t(); - } + }, }; -class Be { +class Oe { constructor(t, e) { - (this.td = "undefined" == typeof window ? self : window), - (this.ed = t), - (this.nd = e); + (this.database = t), + (this.j = e), + (this.parent = "undefined" == typeof window ? self : window), + (this.database = t), + (this.j = e); } - od() { - if ("indexedDB" in this.td) return this.td.indexedDB; + td() { + if ("indexedDB" in this.parent) return this.parent.indexedDB; } - rd() { + isSupported() { + var t; try { - if (null == this.od()) return !1; + if (null == this.td()) return !1; { - const t = this.od().open("Braze IndexedDB Support Test"); + const e = + null === (t = this.td()) || void 0 === t + ? void 0 + : t.open("Braze IndexedDB Support Test"); if ( - ((t.onupgradeneeded = () => t.result.close()), - (t.onsuccess = () => t.result.close()), + (e && + ((e.onupgradeneeded = () => e.result.close()), + (e.onsuccess = () => e.result.close())), "undefined" != typeof window) ) { - const t = window.chrome || window.browser || window.msBrowser; - if (t && t.runtime && t.runtime.id) + const t = window, + e = t.chrome || t.browser || t.ed; + if (e && e.runtime && e.runtime.id) return ( - this.nd.info( - "Not using IndexedDB for storage because we are running inside an extension" + this.j.info( + "Not using IndexedDB for storage because we are running inside an extension", ), !1 ); @@ -108,85 +117,101 @@ class Be { } } catch (t) { return ( - this.nd.info( - "Not using IndexedDB for storage due to following error: " + t + this.j.info( + "Not using IndexedDB for storage due to following error: " + t, ), !1 ); } } - sd(t, e) { - const n = this.od().open(this.ed.dd, this.ed.VERSION); - if (null == n) return "function" == typeof e && e(), !1; - const o = this; + nd(t, e) { + var n; + const o = + null === (n = this.td()) || void 0 === n + ? void 0 + : n.open(this.database.od, this.database.VERSION); + if (null == o) return "function" == typeof e && e(), !1; + const i = this; return ( - (n.onupgradeneeded = t => { - o.nd.info( - "Upgrading indexedDB " + o.ed.dd + " to v" + o.ed.VERSION + "..." + (o.onupgradeneeded = (t) => { + var e; + i.j.info( + "Upgrading indexedDB " + + i.database.od + + " to v" + + i.database.VERSION + + "...", ); - const e = t.target.result; - for (const t in o.ed.Jt) - o.ed.Jt.hasOwnProperty(t) && - !e.objectStoreNames.contains(o.ed.Jt[t]) && - e.createObjectStore(o.ed.Jt[t]); + const n = null === (e = t.target) || void 0 === e ? void 0 : e.result; + for (const t in i.database.Jt) { + const e = t; + i.database.Jt.hasOwnProperty(t) && + !n.objectStoreNames.contains(i.database.Jt[e]) && + n.createObjectStore(i.database.Jt[e]); + } }), - (n.onsuccess = n => { - const i = n.target.result; - (i.onversionchange = () => { - i.close(), + (o.onsuccess = (n) => { + var o; + const r = null === (o = n.target) || void 0 === o ? void 0 : o.result; + (r.onversionchange = () => { + r.close(), "function" == typeof e && e(), - o.nd.error( - "Needed to close the database unexpectedly because of an upgrade in another tab" + i.j.error( + "Needed to close the database unexpectedly because of an upgrade in another tab", ); }), - t(i); + t(r); + }), + (o.onerror = (t) => { + var n; + const o = t; + return ( + i.j.info( + "Could not open indexedDB " + + i.database.od + + " v" + + i.database.VERSION + + ": " + + (null === (n = o.target) || void 0 === n ? void 0 : n.errorCode), + ), + "function" == typeof e && e(), + !0 + ); }), - (n.onerror = t => ( - o.nd.info( - "Could not open indexedDB " + - o.ed.dd + - " v" + - o.ed.VERSION + - ": " + - t.target.errorCode - ), - "function" == typeof e && e(), - !0 - )), !0 ); } setItem(t, e, n, o, i) { - if (!this.rd()) return "function" == typeof i && i(), !1; + if (!this.isSupported()) return "function" == typeof i && i(), !1; const r = this; - return this.sd(s => { - if (!s.objectStoreNames.contains(t)) + return this.nd((d) => { + if (!d.objectStoreNames.contains(t)) return ( - r.nd.error( + r.j.error( "Could not store object " + e + " in " + t + " on indexedDB " + - r.ed.dd + + r.database.od + " - " + t + - " is not a valid objectStore" + " is not a valid objectStore", ), "function" == typeof i && i(), - void s.close() + void d.close() ); - const d = s.transaction([t], "readwrite"); - d.oncomplete = () => s.close(); - const u = d.objectStore(t).put(n, e); + const s = d.transaction([t], "readwrite"); + s.oncomplete = () => d.close(); + const u = s.objectStore(t).put(n, e); (u.onerror = () => { - r.nd.error( + r.j.error( "Could not store object " + e + " in " + t + " on indexedDB " + - r.ed.dd + r.database.od, ), "function" == typeof i && i(); }), @@ -196,276 +221,291 @@ class Be { }, i); } getItem(t, e, n) { - if (!this.rd()) return !1; + if (!this.isSupported()) return !1; const o = this; - return this.sd(i => { + return this.nd((i) => { if (!i.objectStoreNames.contains(t)) return ( - o.nd.error( + o.j.error( "Could not retrieve object " + e + " in " + t + " on indexedDB " + - o.ed.dd + + o.database.od + " - " + t + - " is not a valid objectStore" + " is not a valid objectStore", ), void i.close() ); const r = i.transaction([t], "readonly"); r.oncomplete = () => i.close(); - const s = r.objectStore(t).get(e); - (s.onerror = () => { - o.nd.error( + const d = r.objectStore(t).get(e); + (d.onerror = () => { + o.j.error( "Could not retrieve object " + e + " in " + t + " on indexedDB " + - o.ed.dd + o.database.od, ); }), - (s.onsuccess = t => { - const e = t.target.result; - null != e && n(e); + (d.onsuccess = (t) => { + var e; + const o = null === (e = t.target) || void 0 === e ? void 0 : e.result; + null != o && n(o); }); }); } hr(t, e, n) { - if (!this.rd()) return "function" == typeof n && n(), !1; + if (!this.isSupported()) return "function" == typeof n && n(), !1; const o = this; - return this.sd(i => { + return this.nd((i) => { if (!i.objectStoreNames.contains(t)) return ( - o.nd.error( + o.j.error( "Could not retrieve last record from " + t + " on indexedDB " + - o.ed.dd + + o.database.od + " - " + t + - " is not a valid objectStore" + " is not a valid objectStore", ), "function" == typeof n && n(), void i.close() ); const r = i.transaction([t], "readonly"); r.oncomplete = () => i.close(); - const s = r.objectStore(t).openCursor(null, "prev"); - (s.onerror = () => { - o.nd.error( - "Could not open cursor for " + t + " on indexedDB " + o.ed.dd + const d = r.objectStore(t).openCursor(null, "prev"); + (d.onerror = () => { + o.j.error( + "Could not open cursor for " + t + " on indexedDB " + o.database.od, ), "function" == typeof n && n(); }), - (s.onsuccess = t => { - const o = t.target.result; - null != o && null != o.value && null != o.key - ? e(o.key, o.value) + (d.onsuccess = (t) => { + var o; + const i = null === (o = t.target) || void 0 === o ? void 0 : o.result; + null != i && null != i.value && null != i.key + ? e(i.key, i.value) : "function" == typeof n && n(); }); }, n); } - br(t, e) { - if (!this.rd()) return !1; + oe(t, e) { + if (!this.isSupported()) return !1; const n = this; - return this.sd(o => { + return this.nd((o) => { if (!o.objectStoreNames.contains(t)) return ( - n.nd.error( + n.j.error( "Could not delete record " + e + " from " + t + " on indexedDB " + - n.ed.dd + + n.database.od + " - " + t + - " is not a valid objectStore" + " is not a valid objectStore", ), void o.close() ); const i = o.transaction([t], "readwrite"); i.oncomplete = () => o.close(); i.objectStore(t).delete(e).onerror = () => { - n.nd.error( + n.j.error( "Could not delete record " + e + " from " + t + " on indexedDB " + - n.ed.dd + n.database.od, ); }; }); } Mt(t, e) { - if (!this.rd()) return !1; + if (!this.isSupported()) return !1; const n = this; - return this.sd(o => { + return this.nd((o) => { if (!o.objectStoreNames.contains(t)) return ( - n.nd.error( + n.j.error( "Could not retrieve objects from " + t + " on indexedDB " + - n.ed.dd + + n.database.od + " - " + t + - " is not a valid objectStore" + " is not a valid objectStore", ), void o.close() ); const i = o.transaction([t], "readwrite"); i.oncomplete = () => o.close(); const r = i.objectStore(t), - s = r.openCursor(), - d = []; - (s.onerror = () => { - d.length > 0 - ? (n.nd.info( + d = r.openCursor(), + s = []; + (d.onerror = () => { + s.length > 0 + ? (n.j.info( "Cursor closed midway through for " + t + " on indexedDB " + - n.ed.dd + n.database.od, ), - e(d)) - : n.nd.error( - "Could not open cursor for " + t + " on indexedDB " + n.ed.dd + e(s)) + : n.j.error( + "Could not open cursor for " + + t + + " on indexedDB " + + n.database.od, ); }), - (s.onsuccess = t => { - const n = t.target.result; - if (null != n) { - if (null != n.value && null != n.key) { - r.delete(n.key).onsuccess = () => { - d.push(n.value); + (d.onsuccess = (t) => { + var n; + const o = null === (n = t.target) || void 0 === n ? void 0 : n.result; + if (null != o) { + if (null != o.value && null != o.key) { + r.delete(o.key).onsuccess = () => { + s.push(o.value); }; } - n.continue(); - } else d.length > 0 && e(d); + "function" == typeof o.continue && o.continue(); + } else s.length > 0 && e(s); }); }); } clearData() { - if (!this.rd()) return !1; + if (!this.isSupported()) return !1; const t = []; - for (const e in this.ed.Jt) - this.ed.Jt.hasOwnProperty(e) && - this.ed.Jt[e] !== this.ed.Jt.oe && - t.push(this.ed.Jt[e]); + for (const e in this.database.Jt) { + const n = e; + this.database.Jt.hasOwnProperty(e) && + this.database.Jt[n] !== this.database.Jt.se && + t.push(this.database.Jt[n]); + } const e = this; - return this.sd(function(n) { + return this.nd(function (n) { const o = n.transaction(t, "readwrite"); o.oncomplete = () => n.close(); for (let n = 0; n < t.length; n++) { const i = t[n]; - o.objectStore(i).clear().onerror = function() { - e.nd.error( - "Could not clear " + this.source.name + " on indexedDB " + e.ed.dd + o.objectStore(i).clear().onerror = function () { + e.j.error( + "Could not clear " + + this.source.name + + " on indexedDB " + + e.database.od, ); }; } - o.onerror = function() { - e.nd.error("Could not clear object stores on indexedDB " + e.ed.dd); + o.onerror = function () { + e.j.error( + "Could not clear object stores on indexedDB " + e.database.od, + ); }; }); } } -Be.ep = { +Oe.ep = { Ft: { - dd: "AppboyServiceWorkerAsyncStorage", + od: "AppboyServiceWorkerAsyncStorage", VERSION: 6, Jt: { - Xa: "data", + Ja: "data", kr: "pushClicks", cu: "pushSubscribed", - ud: "fallbackDevice", + dd: "fallbackDevice", qt: "cardUpdates", - oe: "optOut", - yr: "pendingData", - gu: "sdkAuthenticationSignature" + se: "optOut", + wr: "pendingData", + qh: "sdkAuthenticationSignature", }, - se: 1 - } + ie: 1, + }, }; -const Ae = { - init: function(n) { - (void 0 === n && void 0 !== Ae.zg) || (Ae.zg = !!n), Ae.Eg || (Ae.Eg = !0); +const Ue = { + init: function (n) { + (void 0 === n && void 0 !== Ue.zg) || (Ue.zg = !!n), Ue.t || (Ue.t = !0); }, - destroy: function() { - (Ae.Eg = !1), (Ae.zg = void 0), (Ae.nd = void 0); + destroy: function () { + (Ue.t = !1), (Ue.zg = void 0), (Ue.j = void 0); }, - setLogger: function(n) { + setLogger: function (n) { "function" == typeof n - ? (Ae.init(), (Ae.nd = n)) - : Ae.info("Ignoring setLogger call since logger is not a function"); + ? (Ue.init(), (Ue.j = n)) + : Ue.info("Ignoring setLogger call since logger is not a function"); }, - toggleLogging: function() { - Ae.init(), - Ae.zg - ? (console.log("Disabling Braze logging"), (Ae.zg = !1)) - : (console.log("Enabled Braze logging"), (Ae.zg = !0)); + toggleLogging: function () { + Ue.init(), + Ue.zg + ? (console.log("Disabling Braze logging"), (Ue.zg = !1)) + : (console.log("Enabled Braze logging"), (Ue.zg = !0)); }, - info: function(n) { - if (Ae.zg) { + info: function (n) { + if (Ue.zg) { const o = "Braze: " + n; - null != Ae.nd ? Ae.nd(o) : console.log(o); + null != Ue.j ? Ue.j(o) : console.log(o); } }, - warn: function(n) { - if (Ae.zg) { - const o = "Braze SDK Warning: " + n + " (v4.8.0)"; - null != Ae.nd ? Ae.nd(o) : console.warn(o); + warn: function (n) { + if (Ue.zg) { + const o = "Braze SDK Warning: " + n + " (v4.9.0)"; + null != Ue.j ? Ue.j(o) : console.warn(o); } }, - error: function(n) { - if (Ae.zg) { - const o = "Braze SDK Error: " + n + " (v4.8.0)"; - null != Ae.nd ? Ae.nd(o) : console.error(o); + error: function (n) { + if (Ue.zg) { + const o = "Braze SDK Error: " + n + " (v4.9.0)"; + null != Ue.j ? Ue.j(o) : console.error(o); } - } + }, }; -var Ge = { +var ke = { ho: "allowCrawlerActivity", Eo: "baseUrl", _o: "noCookies", Io: "devicePropertyAllowlist", - ia: "disablePushTokenMaintenance", + Aa: "disablePushTokenMaintenance", Ao: "enableLogging", So: "enableSdkAuthentication", - ta: "manageServiceWorkerExternally", + qa: "manageServiceWorkerExternally", No: "minimumIntervalBetweenTriggerActionsInSeconds", wo: "sessionTimeoutInSeconds", - To: "appVersion", - na: "serviceWorkerLocation", - ra: "safariWebsitePushId", - Mn: "localization", - lo: "contentSecurityNonce", - Oo: "enableHtmlInAppMessages", - Co: "allowUserSuppliedJavascript", - mo: "inAppMessageZIndex", - po: "openInAppMessagesInNewTab", + Oo: "appVersion", + _a: "serviceWorkerLocation", + ka: "safariWebsitePushId", + Ba: "localization", + po: "contentSecurityNonce", + Co: "enableHtmlInAppMessages", + Lo: "allowUserSuppliedJavascript", + lo: "inAppMessageZIndex", + fo: "openInAppMessagesInNewTab", en: "openNewsFeedCardsInNewTab", - Lh: "requireExplicitInAppMessageDismissal", - Lo: "doNotLoadFontAwesome", - Po: "sdkFlavor", - tn: "openCardsInNewTab" + mh: "requireExplicitInAppMessageDismissal", + Po: "doNotLoadFontAwesome", + Ro: "sdkFlavor", + tn: "openCardsInNewTab", }; -const r = { _n: je, q: ve, Cr: De, Z: Ie, xt: Be, zt: Be.ep, j: Ae, Jo: Ge }; +const r = { On: ve, q: De, Cr: Be, Z: Ge, xt: Oe, zt: Oe.ep, j: Ue, Jo: ke }; var r$1 = r; function values(t) { const e = []; - for (let r in t) - Object.prototype.hasOwnProperty.call(t, r) && - void 0 !== t[r] && - e.push(t[r]); + let r; + for (const n in t) + (r = n), + Object.prototype.hasOwnProperty.call(t, r) && + void 0 !== t[r] && + e.push(t[r]); return e; } function validateValueIsFromEnum(t, e, n, o) { @@ -486,22 +526,22 @@ function isDate(t) { function isObject$1(t) { return "[object Object]" === Object.prototype.toString.call(t); } -function intersection(t) { +function intersection(t, ...e) { null == t && (t = []); - const e = [], - r = arguments.length; - for (let n = 0, o = t.length; n < o; n++) { - const o = t[n]; - if (-1 !== e.indexOf(o)) continue; + const r = [], + n = arguments.length; + for (let e = 0, o = t.length; e < o; e++) { + const o = t[e]; + if (-1 !== r.indexOf(o)) continue; let c = 1; - for (c = 1; c < r && -1 !== arguments[c].indexOf(o); c++); - c === r && e.push(o); + for (c = 1; c < n && -1 !== arguments[c].indexOf(o); c++); + c === n && r.push(o); } - return e; + return r; } function keys(t) { const e = []; - for (let r in t) Object.prototype.hasOwnProperty.call(t, r) && e.push(r); + for (const r in t) Object.prototype.hasOwnProperty.call(t, r) && e.push(r); return e; } function isEqual(t, e) { @@ -545,21 +585,20 @@ function isEqual(t, e) { if (((i = t.length), i !== e.length)) return !1; for (; i--; ) if (!isEqual(t[i], e[i])) return !1; } else { - let r, - n = keys(t); - if (((i = n.length), keys(e).length !== i)) return !1; + const r = keys(t); + let n; + if (((i = r.length), keys(e).length !== i)) return !1; for (; i--; ) if ( - ((r = n[i]), - !Object.prototype.hasOwnProperty.call(e, r) || - !isEqual(t[r], e[r])) + ((n = r[i]), + !Object.prototype.hasOwnProperty.call(e, n) || !isEqual(t[n], e[n])) ) return !1; } return o.pop(), c.pop(), !0; } -function convertMsToSeconds(e, n) { +function convertMsToSeconds(e, n = !1) { let t = e / 1e3; return n && (t = Math.floor(t)), t; } @@ -567,8 +606,9 @@ function convertSecondsToMs(e) { return 1e3 * e; } function dateFromUnixTimestamp(e) { - const n = parseInt(e); - return null == e || isNaN(n) ? null : new Date(1e3 * n); + if (null == e) return null; + const n = parseInt(e.toString()); + return isNaN(n) ? null : new Date(1e3 * n); } function toValidBackendTimeString(e) { return null != e && isDate(e) ? e.toISOString().replace(/\.[0-9]{3}Z$/, "") : e; @@ -599,28 +639,32 @@ const CONTENT_CARDS_RATE_LIMIT_CAPACITY_DEFAULT = 5; const CONTENT_CARDS_RATE_LIMIT_REFILL_RATE_DEFAULT = 90; const LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT = 72e5; const MAX_ERROR_RETRIES_CONTENT_CARDS = 3; +const REQUEST_ATTEMPT_DEFAULT = 1; class E { constructor() { - this.zo = {}; + this.Ve = {}; } lt(t) { if ("function" != typeof t) return null; const i = r$1.Z.Y(); - return (this.zo[i] = t), i; + return (this.Ve[i] = t), i; } removeSubscription(t) { - delete this.zo[t]; + delete this.Ve[t]; } removeAllSubscriptions() { - this.zo = {}; + this.Ve = {}; } - fu() { - return Object.keys(this.zo).length; + ic() { + return Object.keys(this.Ve).length; } Et(t) { const i = []; - for (let r in this.zo) i.push(this.zo[r](t)); + for (const r in this.Ve) { + const s = this.Ve[r]; + i.push(s(t)); + } return i; } } @@ -683,19 +727,20 @@ class Card { dismissCard() { if (!this.dismissible || this.dismissed) return; "function" == typeof this.logCardDismissal && this.logCardDismissal(); - const t = this._; - t && - ((t.style.height = t.offsetHeight + "px"), - (t.className = t.className + " ab-hide"), - setTimeout(function() { - t && - t.parentNode && - ((t.style.height = "0"), - (t.style.margin = "0"), - setTimeout(function() { - t && t.parentNode && t.parentNode.removeChild(t); - }, Card.ut)); - }, FEED_ANIMATION_DURATION)); + let t = this._; + !t && this.id && (t = document.getElementById(this.id)), + t && + ((t.style.height = t.offsetHeight + "px"), + (t.className = t.className + " ab-hide"), + setTimeout(function () { + t && + t.parentNode && + ((t.style.height = "0"), + (t.style.margin = "0"), + setTimeout(function () { + t && t.parentNode && t.parentNode.removeChild(t); + }, Card.ut)); + }, FEED_ANIMATION_DURATION)); } et() { return null == this.ht && (this.ht = new E()), this.ht; @@ -726,7 +771,7 @@ class Card { return !0; if ( (t[Card.Tt.ls] && !this.viewed && (this.viewed = !0), - t[Card.Tt.gs] && !this.clicked && (this.clicked = t[Card.Tt.gs]), + t[Card.Tt.ys] && !this.clicked && (this.clicked = t[Card.Tt.ys]), null != t[Card.Tt.st] && (this.title = t[Card.Tt.st]), null != t[Card.Tt.os] && (this.imageUrl = t[Card.Tt.os]), null != t[Card.Tt.it] && (this.description = t[Card.Tt.it]), @@ -735,14 +780,14 @@ class Card { const i = dateFromUnixTimestamp(t[Card.Tt.us]); null != i && (this.updated = i); } - if (null != t[Card.Tt.ps]) { + if (null != t[Card.Tt.ds]) { let i; - (i = t[Card.Tt.ps] === Card.Nt ? null : dateFromUnixTimestamp(t[Card.Tt.ps])), + (i = t[Card.Tt.ds] === Card.Nt ? null : dateFromUnixTimestamp(t[Card.Tt.ds])), (this.expiresAt = i); } if ( (null != t[Card.Tt.URL] && (this.url = t[Card.Tt.URL]), - null != t[Card.Tt.bs] && (this.linkText = t[Card.Tt.bs]), + null != t[Card.Tt.ps] && (this.linkText = t[Card.Tt.ps]), null != t[Card.Tt.fs]) ) { const i = parseFloat(t[Card.Tt.fs].toString()); @@ -750,9 +795,9 @@ class Card { } return ( null != t[Card.Tt.xs] && (this.extras = t[Card.Tt.xs]), - null != t[Card.Tt.js] && (this.pinned = t[Card.Tt.js]), - null != t[Card.Tt.zs] && (this.dismissible = t[Card.Tt.zs]), - null != t[Card.Tt.ks] && (this.test = t[Card.Tt.ks]), + null != t[Card.Tt.gs] && (this.pinned = t[Card.Tt.gs]), + null != t[Card.Tt.js] && (this.dismissible = t[Card.Tt.js]), + null != t[Card.Tt.zs] && (this.test = t[Card.Tt.zs]), !0 ); } @@ -764,61 +809,92 @@ class Card { (Card.Tt = { ns: "id", ls: "v", - zs: "db", + js: "db", It: "r", us: "ca", - js: "p", - ps: "ea", + gs: "p", + ds: "ea", xs: "e", ts: "tp", os: "i", st: "tt", it: "ds", URL: "u", - bs: "dm", + ps: "dm", fs: "ar", - gs: "cl", - ks: "t" + ys: "cl", + zs: "t", }), (Card.es = { tt: "captioned_image", ct: "text_announcement", St: "short_news", rs: "banner_image", - At: "control" + At: "control", }), (Card.hs = { ns: "id", ls: "v", - zs: "db", + js: "db", cs: "cr", us: "ca", - js: "p", - ds: "t", - ps: "ea", + gs: "p", + bs: "t", + ds: "ea", xs: "e", ts: "tp", os: "i", st: "tt", it: "ds", URL: "u", - bs: "dm", + ps: "dm", fs: "ar", - gs: "cl", - ks: "s" + ys: "cl", + zs: "s", }), (Card.Dt = { dt: "ADVERTISING", Ct: "ANNOUNCEMENTS", Rt: "NEWS", - bt: "SOCIAL" + bt: "SOCIAL", }), (Card.ut = 400); class Banner extends Card { - constructor(s, t, i, h, r, e, n, l, a, o, u, c, d, p) { - super(s, t, null, i, null, h, r, e, n, l, a, o, u, c, d, p), - (this.U = "ab-banner"), + constructor(s, t, i, h, r, e, n, a, l, o, u, c, b, d) { + super(s, t, null, i, null, h, r, e, n, a, l, o, u, c, b, d), + (this.U = "ab-banner ab-image-only"), + (this.V = !1), + (this.test = !1); + } + ss() { + const s = {}; + return ( + (s[Card.hs.ts] = Card.es.rs), + (s[Card.hs.ns] = this.id), + (s[Card.hs.ls] = this.viewed), + (s[Card.hs.os] = this.imageUrl), + (s[Card.hs.us] = this.updated), + (s[Card.hs.cs] = this.created), + (s[Card.hs.bs] = this.categories), + (s[Card.hs.ds] = this.expiresAt), + (s[Card.hs.URL] = this.url), + (s[Card.hs.ps] = this.linkText), + (s[Card.hs.fs] = this.aspectRatio), + (s[Card.hs.xs] = this.extras), + (s[Card.hs.gs] = this.pinned), + (s[Card.hs.js] = this.dismissible), + (s[Card.hs.ys] = this.clicked), + (s[Card.hs.zs] = this.test), + s + ); + } +} + +class ImageOnly extends Banner { + constructor(s, t, i, h, r, e, a, n, o, c, m, b, l, p) { + super(s, t, i, h, r, e, a, n, o, c, m, b, l, p), + (this.U = "ab-banner ab-image-only"), (this.V = !1), (this.test = !1); } @@ -831,16 +907,16 @@ class Banner extends Card { (s[Card.hs.os] = this.imageUrl), (s[Card.hs.us] = this.updated), (s[Card.hs.cs] = this.created), - (s[Card.hs.ds] = this.categories), - (s[Card.hs.ps] = this.expiresAt), + (s[Card.hs.bs] = this.categories), + (s[Card.hs.ds] = this.expiresAt), (s[Card.hs.URL] = this.url), - (s[Card.hs.bs] = this.linkText), + (s[Card.hs.ps] = this.linkText), (s[Card.hs.fs] = this.aspectRatio), (s[Card.hs.xs] = this.extras), - (s[Card.hs.js] = this.pinned), - (s[Card.hs.zs] = this.dismissible), - (s[Card.hs.gs] = this.clicked), - (s[Card.hs.ks] = this.test), + (s[Card.hs.gs] = this.pinned), + (s[Card.hs.js] = this.dismissible), + (s[Card.hs.ys] = this.clicked), + (s[Card.hs.zs] = this.test), s ); } @@ -864,16 +940,16 @@ class CaptionedImage extends Card { (t[Card.hs.it] = this.description), (t[Card.hs.us] = this.updated), (t[Card.hs.cs] = this.created), - (t[Card.hs.ds] = this.categories), - (t[Card.hs.ps] = this.expiresAt), + (t[Card.hs.bs] = this.categories), + (t[Card.hs.ds] = this.expiresAt), (t[Card.hs.URL] = this.url), - (t[Card.hs.bs] = this.linkText), + (t[Card.hs.ps] = this.linkText), (t[Card.hs.fs] = this.aspectRatio), (t[Card.hs.xs] = this.extras), - (t[Card.hs.js] = this.pinned), - (t[Card.hs.zs] = this.dismissible), - (t[Card.hs.gs] = this.clicked), - (t[Card.hs.ks] = this.test), + (t[Card.hs.gs] = this.pinned), + (t[Card.hs.js] = this.dismissible), + (t[Card.hs.ys] = this.clicked), + (t[Card.hs.zs] = this.test), t ); } @@ -896,16 +972,16 @@ class ClassicCard extends Card { (s[Card.hs.it] = this.description), (s[Card.hs.us] = this.updated), (s[Card.hs.cs] = this.created), - (s[Card.hs.ds] = this.categories), - (s[Card.hs.ps] = this.expiresAt), + (s[Card.hs.bs] = this.categories), + (s[Card.hs.ds] = this.expiresAt), (s[Card.hs.URL] = this.url), - (s[Card.hs.bs] = this.linkText), + (s[Card.hs.ps] = this.linkText), (s[Card.hs.fs] = this.aspectRatio), (s[Card.hs.xs] = this.extras), - (s[Card.hs.js] = this.pinned), - (s[Card.hs.zs] = this.dismissible), - (s[Card.hs.gs] = this.clicked), - (s[Card.hs.ks] = this.test), + (s[Card.hs.gs] = this.pinned), + (s[Card.hs.js] = this.dismissible), + (s[Card.hs.ys] = this.clicked), + (s[Card.hs.zs] = this.test), s ); } @@ -925,283 +1001,35 @@ class ControlCard extends Card { (l[Card.hs.ns] = this.id), (l[Card.hs.ls] = this.viewed), (l[Card.hs.us] = this.updated), - (l[Card.hs.ps] = this.expiresAt), + (l[Card.hs.ds] = this.expiresAt), (l[Card.hs.xs] = this.extras), - (l[Card.hs.js] = this.pinned), - (l[Card.hs.ks] = this.test), + (l[Card.hs.gs] = this.pinned), + (l[Card.hs.zs] = this.test), l ); } } -class Oe { - constructor() {} - tf() {} - ef() {} - ua(t) {} - static rf(t, e) { - if (t && e) - if (((t = t.toLowerCase()), isArray(e.if))) { - for (let r = 0; r < e.if.length; r++) - if (-1 !== t.indexOf(e.if[r].toLowerCase())) return e.identity; - } else if (-1 !== t.indexOf(e.if.toLowerCase())) return e.identity; - } -} - -const Browsers = { - OE: "Chrome", - RE: "Edge", - Pg: "Internet Explorer", - IE: "Opera", - kg: "Safari", - AE: "Firefox" -}; -const OperatingSystems = { - Fg: "Android", - fe: "iOS", - jg: "Mac", - Dg: "Windows" -}; - -class ni extends Oe { - constructor() { - if ( - (super(), - (this.userAgentData = navigator.userAgentData), - this.userAgentData) - ) { - const t = this.ic(); - (this.browser = t.browser || "Unknown Browser"), - (this.version = t.version || "Unknown Version"); - } - } - tf() { - return this.browser; - } - ef() { - return this.version; - } - ua(t) { - if (this.OS) return Promise.resolve(this.OS); - const r = r => { - for (let s = 0; s < t.length; s++) { - const e = ni.rf(r, t[s]); - if (e) return (this.OS = e), this.OS; - } - return r; - }; - return this.userAgentData.platform - ? Promise.resolve(r(this.userAgentData.platform)) - : this.nc() - .then(t => r(t.platform)) - .catch(() => navigator.platform); - } - ic() { - const t = {}, - r = this.userAgentData.brands; - if (r && r.length) - for (const s of r) { - const r = this.oc(Browsers), - e = s.brand.match(r); - if (e && e.length > 0) { - (t.browser = e[0]), (t.version = s.version); - break; - } - } - return t; - } - oc(t) { - const r = []; - for (const s in t) t[s] !== Browsers.Pg && r.push(t[s]); - return new RegExp("(" + r.join("|") + ")", "i"); - } - nc() { - return this.userAgentData.getHighEntropyValues - ? this.userAgentData.getHighEntropyValues(["platform"]) - : Promise.reject(); - } -} - -class ei extends Oe { - constructor() { - super(), (this.Vu = ei.Uu(navigator.userAgent || "")); - } - tf() { - return this.Vu[0] || "Unknown Browser"; - } - ef() { - return this.Vu[1] || "Unknown Version"; - } - ua(r) { - for (let e = 0; e < r.length; e++) { - let n = r[e].string, - i = ei.rf(n, r[e]); - if (i) - return ( - i === OperatingSystems.jg && navigator.maxTouchPoints > 1 && (i = OperatingSystems.fe), - Promise.resolve(i) - ); - } - return Promise.resolve(navigator.platform); - } - static Uu(r) { - let e, - n = - r.match( - /(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i - ) || []; - if (/trident/i.test(n[1])) - return ( - (e = /\brv[ :]+(\.?\d+(\.\d+)*)/g.exec(r) || []), [Browsers.Pg, e[1] || ""] - ); - if (-1 !== r.indexOf("(Web0S; Linux/SmartTV)")) - return ["LG Smart TV", null]; - if (-1 !== r.indexOf("CrKey")) return ["Chromecast", null]; - if ( - -1 !== r.indexOf("BRAVIA") || - -1 !== r.indexOf("SonyCEBrowser") || - -1 !== r.indexOf("SonyDTV") - ) - return ["Sony Smart TV", null]; - if (-1 !== r.indexOf("PhilipsTV")) return ["Philips Smart TV", null]; - if (r.match(/\b(Roku)\b/)) return ["Roku", null]; - if (r.match(/\bAFTM\b/)) return ["Amazon Fire Stick", null]; - if ( - n[1] === Browsers.OE && - ((e = r.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/)), - null != e) - ) - return ( - (e = e.slice(1)), - (e[0] = e[0].replace("OPR", Browsers.IE)), - (e[0] = e[0].replace("EdgA", Browsers.RE)), - "Edg" === e[0] && (e[0] = Browsers.RE), - [e[0], e[1]] - ); - if ( - n[1] === Browsers.kg && - ((e = r.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/)), null != e) - ) - return ( - (e = e.slice(1)), (e[0] = e[0].replace("EdgiOS", Browsers.RE)), [e[0], e[1]] - ); - if ( - ((n = n[2] ? [n[1], n[2]] : [null, null]), - n[0] === Browsers.kg && - null != (e = r.match(/version\/(\.?\d+(\.\d+)*)/i)) && - n.splice(1, 1, e[1]), - null != (e = r.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/)) && - n.splice(1, 1, e[2]), - n[0] === Browsers.IE && null != (e = r.match(/mini\/(\.?\d+(\.\d+)*)/i))) - ) - return ["Opera Mini", e[1] || ""]; - if (n[0]) { - const r = n[0].toLowerCase(); - "msie" === r && (n[0] = Browsers.Pg), - "crios" === r && (n[0] = Browsers.OE), - "tizen" === r && ((n[0] = "Samsung Smart TV"), (n[1] = null)), - "samsungbrowser" === r && (n[0] = "Samsung Browser"); - } - return n; - } -} - -class gi { - constructor() { - const t = navigator.userAgentData ? ni : ei; - (this.Sg = new t()), - (this.userAgent = navigator.userAgent), - (this.browser = this.Sg.tf()), - (this.version = this.Sg.ef()), - this.ua().then(t => (this.OS = t)), - (this.language = ( - navigator.userLanguage || - navigator.language || - navigator.browserLanguage || - navigator.systemLanguage || - "" - ).toLowerCase()), - (this.$o = gi.Bg(this.userAgent)); - } - Og() { - return this.browser !== Browsers.Pg || this.version > 8; - } - rE() { - return this.browser === Browsers.kg; - } - la() { - return this.OS || null; - } - ua() { - return this.OS - ? Promise.resolve(this.OS) - : this.Sg.ua(gi.xg).then(t => ((this.OS = t), t)); - } - static Bg(t) { - t = t.toLowerCase(); - const i = [ - "googlebot", - "bingbot", - "slurp", - "duckduckbot", - "baiduspider", - "yandex", - "facebookexternalhit", - "sogou", - "ia_archiver", - "https://github.com/prerender/prerender", - "aolbuild", - "bingpreview", - "msnbot", - "adsbot", - "mediapartners-google", - "teoma" - ]; - for (let n = 0; n < i.length; n++) if (-1 !== t.indexOf(i[n])) return !0; - return !1; - } -} -gi.xg = [ - { string: navigator.platform, if: "Win", identity: OperatingSystems.Dg }, - { string: navigator.platform, if: "Mac", identity: OperatingSystems.jg }, - { string: navigator.platform, if: "BlackBerry", identity: "BlackBerry" }, - { string: navigator.platform, if: "FreeBSD", identity: "FreeBSD" }, - { string: navigator.platform, if: "OpenBSD", identity: "OpenBSD" }, - { string: navigator.platform, if: "Nintendo", identity: "Nintendo" }, - { string: navigator.platform, if: "SunOS", identity: "SunOS" }, - { string: navigator.platform, if: "PlayStation", identity: "PlayStation" }, - { string: navigator.platform, if: "X11", identity: "X11" }, - { - string: navigator.userAgent, - if: ["iPhone", "iPad", "iPod"], - identity: OperatingSystems.fe - }, - { string: navigator.platform, if: "Pike v", identity: OperatingSystems.fe }, - { string: navigator.userAgent, if: ["Web0S"], identity: "WebOS" }, - { - string: navigator.platform, - if: ["Linux armv7l", "Android"], - identity: OperatingSystems.Fg - }, - { string: navigator.userAgent, if: ["Android"], identity: OperatingSystems.Fg }, - { string: navigator.platform, if: "Linux", identity: "Linux" } -]; -const V = new gi(); - -class ue { +class be { constructor(t, i, s, r, e) { (this.userId = t), + (this.type = i), + (this.time = s), + (this.sessionId = r), + (this.data = e), + (this.userId = t), (this.type = i), (this.time = timestampOrNow(s)), (this.sessionId = r), (this.data = e); } - Wi() { + Kr() { const t = { name: this.type, time: convertMsToSeconds(this.time), data: this.data || {}, - session_id: this.sessionId + session_id: this.sessionId, + user_id: void 0, }; return null != this.userId && (t.user_id = this.userId), t; } @@ -1211,65 +1039,67 @@ class ue { t: this.type, ts: this.time, s: this.sessionId, - d: this.data + d: this.data, }; } static fromJson(t) { - return new ue(t.user_id, t.name, t.time, t.session_id, t.data); + return new be(t.user_id, t.name, t.time, t.session_id, t.data); } - static Za(t) { + static TE(t) { return null != t && isObject$1(t) && null != t.t && "" !== t.t; } - static Tn(t) { - return new ue(t.u, t.t, t.ts, t.s, t.d); + static Yn(t) { + return new be(t.u, t.t, t.ts, t.s, t.d); } } class _t { - constructor(t, e, s) { - null == t && (t = r$1.Z.Y()), - (s = parseInt(s)), - (isNaN(s) || 0 === s) && (s = new Date().valueOf()), + constructor(t, i, s) { + (this.iu = t), + null == t && (t = r$1.Z.Y()), + !s || isNaN(s) ? (this.vl = new Date().valueOf()) : (this.vl = s), (this.iu = t), - (this.Hh = s), - (this.Jh = new Date().valueOf()), - (this.Bh = e); + (this.Nl = new Date().valueOf()), + (this.Gl = i); } ss() { - return { g: this.iu, e: this.Bh, c: this.Hh, l: this.Jh }; + return { g: this.iu, e: this.Gl, c: this.vl, l: this.Nl }; } - static Tn(t) { + static Yn(t) { if (null == t || null == t.g) return null; - const e = new _t(t.g, t.e, t.c); - return (e.Jh = t.l), e; + const i = new _t(t.g, t.e, t.c); + return (i.Nl = t.l), i; } } -function getByteLength(e) { - let t = e.length; - for (let r = e.length - 1; r >= 0; r--) { - const n = e.charCodeAt(r); - n > 127 && n <= 2047 ? t++ : n > 2047 && n <= 65535 && (t += 2), +function getByteLength(t) { + let e = t.length; + for (let r = t.length - 1; r >= 0; r--) { + const n = t.charCodeAt(r); + n > 127 && n <= 2047 ? e++ : n > 2047 && n <= 65535 && (e += 2), n >= 56320 && n <= 57343 && r--; } - return t; + return e; } -function decodeBrazeActions(e) { +function decodeBrazeActions(t) { try { - e = e.replace(/-/g, "+").replace(/_/g, "/"); - let t = window.atob(e), - r = new Uint8Array(t.length); - for (let e = 0; e < t.length; e++) r[e] = t.charCodeAt(e); - let n = new Uint16Array(r.buffer); + t = t.replace(/-/g, "+").replace(/_/g, "/"); + const e = window.atob(t), + r = new Uint8Array(e.length); + for (let t = 0; t < e.length; t++) r[t] = e.charCodeAt(t); + const n = new Uint16Array(r.buffer); return String.fromCharCode(...n); - } catch (e) { - return r$1.j.error("Unable to decode Base64: " + e), null; + } catch (t) { + return r$1.j.error("Unable to decode Base64: " + t), null; } } +const getErrorMessage = (r) => + r instanceof Error ? r.message : String(r); + const BRAZE_ACTIONS = { types: { - le: "container", + ue: "container", logCustomEvent: "logCustomEvent", setEmailNotificationSubscriptionType: "setEmailNotificationSubscriptionType", @@ -1280,20 +1110,20 @@ const BRAZE_ACTIONS = { removeFromSubscriptionGroup: "removeFromSubscriptionGroup", addToCustomAttributeArray: "addToCustomAttributeArray", removeFromCustomAttributeArray: "removeFromCustomAttributeArray", - de: "openLink", - pe: "openLinkInWebView" + pe: "openLink", + je: "openLinkInWebView", }, - properties: { type: "type", ce: "steps", me: "args" } + properties: { type: "type", me: "steps", le: "args" }, }; const INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES = { - Ji: "unknownBrazeAction", - Li: "noPushPrompt" + _r: "unknownBrazeAction", + Or: "noPushPrompt", }; const ineligibleBrazeActionURLErrorMessage = (t, o) => { switch (t) { - case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Ji: + case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES._r: return `${o} contains an unknown braze action type and will not be displayed.`; - case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Li: + case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Or: return `${o} contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.`; default: return ""; @@ -1301,43 +1131,47 @@ const ineligibleBrazeActionURLErrorMessage = (t, o) => { }; function getDecodedBrazeAction(t) { try { - let o = t.match(BRAZE_ACTION_URI_REGEX)[0].length; - const e = t.substring(o); - if (o > t.length - 1 || !e) + const o = t.match(BRAZE_ACTION_URI_REGEX), + e = o ? o[0].length : null, + n = e ? t.substring(e) : null; + if (null == e || e > t.length - 1 || !n) return void r$1.j.error( - `Did not find base64 encoded brazeAction in url to process : ${t}` + `Did not find base64 encoded brazeAction in url to process : ${t}`, ); - const n = decodeBrazeActions(e); - return n - ? JSON.parse(n) - : void r$1.j.error(`Failed to decode base64 encoded brazeAction: ${e}`); + const i = decodeBrazeActions(n); + return i + ? JSON.parse(i) + : void r$1.j.error(`Failed to decode base64 encoded brazeAction: ${n}`); } catch (o) { - return void r$1.j.error( - `Failed to process brazeAction URL ${t} : ${o.message}` - ); + return void r$1.j.error(`Failed to process brazeAction URL ${t} : ${getErrorMessage(o)}`); } } function eo(t, o) { let r = !1; - for (const e of o) if (((r = r || t(e)), r)) return !0; + if (o) for (const e of o) if (((r = r || t(e)), r)) return !0; return !1; } function containsUnknownBrazeAction(t) { + const o = BRAZE_ACTIONS.properties.type, + r = BRAZE_ACTIONS.properties.me; try { - const o = t[BRAZE_ACTIONS.properties.type]; - return o === BRAZE_ACTIONS.types.le - ? eo(containsUnknownBrazeAction, t[BRAZE_ACTIONS.properties.ce]) - : !isValidBrazeActionType(o); + if (null == t) return !0; + const e = t[o]; + return e === BRAZE_ACTIONS.types.ue + ? eo(containsUnknownBrazeAction, t[r]) + : !isValidBrazeActionType(e); } catch (t) { return !0; } } function containsPushPrimerBrazeAction(t) { - if (!isValidBrazeActionJson(t)) return !1; - const o = t[BRAZE_ACTIONS.properties.type]; - return o === BRAZE_ACTIONS.types.le - ? eo(containsPushPrimerBrazeAction, t[BRAZE_ACTIONS.properties.ce]) - : o === BRAZE_ACTIONS.types.requestPushPermission; + if (!t || !isValidBrazeActionJson(t)) return !1; + const o = BRAZE_ACTIONS.properties.type, + r = BRAZE_ACTIONS.properties.me, + e = t[o]; + return e === BRAZE_ACTIONS.types.ue + ? eo(containsPushPrimerBrazeAction, t[r]) + : e === BRAZE_ACTIONS.types.requestPushPermission; } const CUSTOM_DATA_REGEX = /^[^\x00-\x1F\x22]+$/; @@ -1349,7 +1183,7 @@ const CUSTOM_ATTRIBUTE_RESERVED_OPERATORS = [ "$identifier_key", "$identifier_value", "$new_object", - "$time" + "$time", ]; const EMAIL_ADDRESS_REGEX = new RegExp(/^.+@.+\..+$/); const BRAZE_ACTION_URI_REGEX = /^brazeActions:\/\/v\d+\//; @@ -1357,7 +1191,7 @@ function validateCustomString(t, e, n) { const o = null != t && "string" == typeof t && - ("" === t || t.match(CUSTOM_DATA_REGEX)); + ("" === t || null != t.match(CUSTOM_DATA_REGEX)); return o || r$1.j.error(`Cannot ${e} because ${n} "${t}" is invalid.`), o; } function validateCustomAttributeKey(t) { @@ -1392,12 +1226,12 @@ function _validateNestedProperties(t, e, n) { } else { if (!isObject$1(t)) return validatePropertyType(t); for (const r of keys(t)) { + const n = t[r]; if (o && !validateCustomAttributeKey(r)) return !1; - if ( - (isDate(t[r]) && (e[r] = toValidBackendTimeString(t[r])), - !_validateNestedProperties(t[r], e[r], i)) - ) - return !1; + if (isDate(n)) { + e[r] = toValidBackendTimeString(n); + } + if (!_validateNestedProperties(n, e[r], i)) return !1; } } return !0; @@ -1413,7 +1247,7 @@ function _validateEventPropertyValue(t, e, n, o, i) { a ); } -function validateStandardString(t, e, n, o) { +function validateStandardString(t, e, n, o = !1) { const i = "string" == typeof t || (null === t && o); return i || r$1.j.error(`Cannot ${e} because ${n} "${t}" is invalid.`), i; } @@ -1429,7 +1263,7 @@ function validateCustomProperties(t, e, n, o, i) { if (getByteLength(u) > a) return ( r$1.j.error( - `Could not ${o} because ${n} was greater than the max size of ${s}.` + `Could not ${o} because ${n} was greater than the max size of ${s}.`, ), [!1, null] ); @@ -1442,7 +1276,7 @@ function validateCustomProperties(t, e, n, o, i) { [!1, null] ); } - for (let r in t) { + for (const r in t) { if (e === SET_CUSTOM_USER_ATTRIBUTE_STRING && !validateCustomAttributeKey(r)) return [!1, null]; if (!validateCustomString(r, o, `the ${i} property name`)) return [!1, null]; @@ -1458,7 +1292,7 @@ function validateCustomProperties(t, e, n, o, i) { l[r], o, `the ${i} property "${r}"`, - e === SET_CUSTOM_USER_ATTRIBUTE_STRING + e === SET_CUSTOM_USER_ATTRIBUTE_STRING, ) ) return [!1, null]; @@ -1470,7 +1304,7 @@ function validateCustomAttributeArrayType(t, e) { o = !1; const i = () => { r$1.j.error( - "Custom attribute arrays must be either string arrays or object arrays." + "Custom attribute arrays must be either string arrays or object arrays.", ); }; for (const r of e) @@ -1480,7 +1314,7 @@ function validateCustomAttributeArrayType(t, e) { !validateCustomString( r, `set custom user attribute "${t}"`, - "the element in the given array" + "the element in the given array", ) ) return [!1, !1]; @@ -1494,7 +1328,7 @@ function validateCustomAttributeArrayType(t, e) { SET_CUSTOM_USER_ATTRIBUTE_STRING, "attribute value", `set custom user attribute "${t}"`, - "custom user attribute" + "custom user attribute", ) ) return [!1, !1]; @@ -1510,8 +1344,8 @@ function isValidEmail(t) { function isValidBrazeActionJson(t) { if (!(BRAZE_ACTIONS.properties.type in t)) return !1; switch (t[BRAZE_ACTIONS.properties.type]) { - case BRAZE_ACTIONS.types.le: - if (BRAZE_ACTIONS.properties.ce in t) return !0; + case BRAZE_ACTIONS.types.ue: + if (BRAZE_ACTIONS.properties.me in t) return !0; break; case BRAZE_ACTIONS.types.logCustomEvent: case BRAZE_ACTIONS.types.setEmailNotificationSubscriptionType: @@ -1521,9 +1355,9 @@ function isValidBrazeActionJson(t) { case BRAZE_ACTIONS.types.removeFromSubscriptionGroup: case BRAZE_ACTIONS.types.addToCustomAttributeArray: case BRAZE_ACTIONS.types.removeFromCustomAttributeArray: - case BRAZE_ACTIONS.types.de: case BRAZE_ACTIONS.types.pe: - if (BRAZE_ACTIONS.properties.me in t) return !0; + case BRAZE_ACTIONS.types.je: + if (BRAZE_ACTIONS.properties.le in t) return !0; break; case BRAZE_ACTIONS.types.requestPushPermission: return !0; @@ -1535,7 +1369,7 @@ function isValidBrazeActionJson(t) { function isValidBrazeActionType(t) { let e = !1; return ( - Object.keys(BRAZE_ACTIONS.types).forEach(r => { + Object.keys(BRAZE_ACTIONS.types).forEach((r) => { BRAZE_ACTIONS.types[r] !== t.toString() || (e = !0); }), e @@ -1544,12 +1378,12 @@ function isValidBrazeActionType(t) { class User { constructor(t, e) { - (this.ft = t), (this.Ci = e), (this.ft = t), (this.Ci = e); + (this.ft = t), (this.ki = e), (this.ft = t), (this.ki = e); } getUserId(t) { null == t && r$1.j.error( - "getUserId must be supplied with a callback. e.g., braze.getUser().getUserId(function(userId) {console.log('the user id is ' + userId)})" + "getUserId must be supplied with a callback. e.g., braze.getUser().getUserId(function(userId) {console.log('the user id is ' + userId)})", ), "function" == typeof t && t(this.ft.getUserId()); } @@ -1558,7 +1392,7 @@ class User { ? (r$1.j.error("addAlias requires a non-empty alias"), !1) : !validateStandardString(e, "add alias", "the label", !1) || e.length <= 0 ? (r$1.j.error("addAlias requires a non-empty label"), !1) - : this.Ci.Cn(t, e).O; + : this.ki.$n(t, e).O; } setFirstName(t) { return ( @@ -1575,7 +1409,7 @@ class User { return null === t || isValidEmail(t) ? this.ft.nu("email", t) : (r$1.j.error( - `Cannot set email address - "${t}" did not pass RFC-5322 validation.` + `Cannot set email address - "${t}" did not pass RFC-5322 validation.`, ), !1); } @@ -1588,7 +1422,7 @@ class User { User.Genders, t, `Gender "${t}" is not a valid gender.`, - "User.Genders" + "User.Genders", ) ) && this.ft.nu("gender", t) ); @@ -1610,7 +1444,7 @@ class User { s > 31 || s < 1 ? (r$1.j.error( - "Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);" + "Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);", ), !1) : this.ft.nu("dob", `${t}-${e}-${s}`)); @@ -1634,7 +1468,7 @@ class User { User.NotificationSubscriptionTypes, t, `Email notification setting "${t}" is not a valid subscription type.`, - "User.NotificationSubscriptionTypes" + "User.NotificationSubscriptionTypes", ) && this.ft.nu("email_subscribe", t) ); } @@ -1644,17 +1478,17 @@ class User { User.NotificationSubscriptionTypes, t, `Push notification setting "${t}" is not a valid subscription type.`, - "User.NotificationSubscriptionTypes" + "User.NotificationSubscriptionTypes", ) && this.ft.nu("push_subscribe", t) ); } setPhoneNumber(t) { return ( !!validateStandardString(t, "set phone number", "the phoneNumber", !0) && - (null === t || t.match(User.In) + (null === t || t.match(User.Ln) ? this.ft.nu("phone", t) : (r$1.j.error( - `Cannot set phone number - "${t}" did not pass validation.` + `Cannot set phone number - "${t}" did not pass validation.`, ), !1)) ); @@ -1662,7 +1496,7 @@ class User { setLastKnownLocation(t, e, s, i, n) { return null == t || null == e ? (r$1.j.error( - "Cannot set last-known location - latitude and longitude are required." + "Cannot set last-known location - latitude and longitude are required.", ), !1) : ((t = parseFloat(t.toString())), @@ -1676,41 +1510,41 @@ class User { (null != i && isNaN(i)) || (null != n && isNaN(n)) ? (r$1.j.error( - "Cannot set last-known location - all supplied parameters must be numeric." + "Cannot set last-known location - all supplied parameters must be numeric.", ), !1) : t > 90 || t < -90 || e > 180 || e < -180 ? (r$1.j.error( - "Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively." + "Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively.", ), !1) : (null != s && s < 0) || (null != n && n < 0) ? (r$1.j.error( - "Cannot set last-known location - accuracy and altitudeAccuracy may not be negative." + "Cannot set last-known location - accuracy and altitudeAccuracy may not be negative.", ), !1) - : this.Ci.setLastKnownLocation(this.ft.getUserId(), t, e, i, s, n).O); + : this.ki.setLastKnownLocation(this.ft.getUserId(), t, e, i, s, n).O); } setCustomUserAttribute(t, e, s) { if (!validateCustomAttributeKey(t)) return !1; - const i = e => { + const i = (e) => { const [r] = validateCustomProperties( e, SET_CUSTOM_USER_ATTRIBUTE_STRING, "attribute value", `set custom user attribute "${t}"`, - "custom user attribute" + "custom user attribute", ); return r; }; if (isArray(e)) { const [s, n] = validateCustomAttributeArrayType(t, e); if (!s && !n && 0 !== e.length) return !1; - if (s || 0 === e.length) return this.Ci.En(r$1.q.Fn, t, e).O; + if (s || 0 === e.length) return this.ki.Gn(r$1.q.Hn, t, e).O; for (const t of e) if (!i(t)) return !1; } else if (isObject$1(e)) { if (!i(e)) return !1; - if (s) return this.Ci.En(r$1.q.$n, t, e).O; + if (s) return this.ki.Gn(r$1.q.Kn, t, e).O; } else { if (!(void 0 !== e && validatePropertyType(e))) return !1; if ( @@ -1719,7 +1553,7 @@ class User { !validateCustomString( e, `set custom user attribute "${t}"`, - "the element in the given array" + "the element in the given array", )) ) return !1; @@ -1733,7 +1567,7 @@ class User { null != e && !validateCustomString(e, "add to custom user attribute array", "the given value") ) && - this.Ci.En(r$1.q.Bn, t, e).O + this.ki.Gn(r$1.q.Jn, t, e).O ); } removeFromCustomAttributeArray(t, e) { @@ -1743,7 +1577,7 @@ class User { null != e && !validateCustomString(e, "remove from custom user attribute array", "the given value") ) && - this.Ci.En(r$1.q.Ln, t, e).O + this.ki.Gn(r$1.q.Qn, t, e).O ); } incrementCustomUserAttribute(t, e) { @@ -1752,10 +1586,10 @@ class User { const s = parseInt(e.toString()); return isNaN(s) || s !== parseFloat(e.toString()) ? (r$1.j.error( - `Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.` + `Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`, ), !1) - : this.Ci.En(r$1.q.Rn, t, s).O; + : this.ki.Gn(r$1.q.Xn, t, s).O; } setCustomLocationAttribute(t, e, s) { return ( @@ -1768,10 +1602,10 @@ class User { (null != e && (isNaN(e) || e > 90 || e < -90)) || (null != s && (isNaN(s) || s > 180 || s < -180))) ? (r$1.j.error( - "Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal." + "Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal.", ), !1) - : this.Ci.On(t, e, s).O) + : this.ki.Zn(t, e, s).O) ); } addToSubscriptionGroup(t) { @@ -1779,32 +1613,32 @@ class User { t, "add user to subscription group", "subscription group ID", - !1 + !1, ) || t.length <= 0 ? (r$1.j.error( - "addToSubscriptionGroup requires a non-empty subscription group ID" + "addToSubscriptionGroup requires a non-empty subscription group ID", ), !1) - : this.Ci.Gn(t, User.qn.SUBSCRIBED).O; + : this.ki.au(t, User.du.SUBSCRIBED).O; } removeFromSubscriptionGroup(t) { return !validateStandardString( t, "remove user from subscription group", "subscription group ID", - !1 + !1, ) || t.length <= 0 ? (r$1.j.error( - "removeFromSubscriptionGroup requires a non-empty subscription group ID" + "removeFromSubscriptionGroup requires a non-empty subscription group ID", ), !1) - : this.Ci.Gn(t, User.qn.UNSUBSCRIBED).O; + : this.ki.au(t, User.du.UNSUBSCRIBED).O; } - yn(t, e, r, s, i) { - this.ft.yn(t, e, r, s, i), this.Ci.zn(); + _n(t, e, r, s, i) { + this.ft._n(t, e, r, s, i), this.ki.pu(); } - wn(t) { - this.ft.wn(t); + Nn(t) { + this.ft.Nn(t); } } (User.Genders = { @@ -1813,99 +1647,367 @@ class User { OTHER: "o", UNKNOWN: "u", NOT_APPLICABLE: "n", - PREFER_NOT_TO_SAY: "p" + PREFER_NOT_TO_SAY: "p", }), (User.NotificationSubscriptionTypes = { OPTED_IN: "opted_in", SUBSCRIBED: "subscribed", - UNSUBSCRIBED: "unsubscribed" + UNSUBSCRIBED: "unsubscribed", }), - (User.In = /^[0-9 .\\(\\)\\+\\-]+$/), - (User.qn = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }), - (User.Hn = "user_id"), + (User.Ln = /^[0-9 .\\(\\)\\+\\-]+$/), + (User.du = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }), + (User.bu = "user_id"), (User.lu = "custom"), (User.lr = 997); -const STORAGE_KEYS = { - eu: { - su: "ab.storage.userId", - oa: "ab.storage.deviceId", - Wh: "ab.storage.sessionId" - }, - k: { - _a: "ab.test", - Ia: "ab.storage.events", - Ka: "ab.storage.attributes", - Ya: "ab.storage.attributes.anonymous_user", - ma: "ab.storage.device", - ga: "ab.storage.sdk_metadata", - qa: "ab.storage.session_id_for_cached_metadata", - xn: "ab.storage.pushToken", - ki: "ab.storage.newsFeed", - Ai: "ab.storage.lastNewsFeedRefresh", - L: "ab.storage.cardImpressions", - ll: "ab.storage.serverConfig", - Na: "ab.storage.triggers", - Ga: "ab.storage.triggers.ts", - qh: "ab.storage.messagingSessionStart", - Zt: "ab.storage.cc", - vs: "ab.storage.ccLastFullSync", - ys: "ab.storage.ccLastCardUpdated", - Ws: "ab.storage.ccLastClientRequest", - ui: "ab.storage.ccRateLimitCurrentTokenCount", - C: "ab.storage.ccClicks", - K: "ab.storage.ccImpressions", - G: "ab.storage.ccDismissals", - Ua: "ab.storage.lastDisplayedTriggerTimesById", - La: "ab.storage.lastDisplayedTriggerTime", - Fa: "ab.storage.triggerFireInstancesById", - bu: "ab.storage.signature", - Fs: "ab.storage.brazeSyncRetryCount", - Ss: "ab.storage.sdkVersion", - Di: "ab.storage.ff", - $i: "ab.storage.ffLastRefreshAt", - Pa: "ab.storage.lastReqToEndpoint" - }, - re: "ab.optOut" -}; -class O { - constructor(t, e) { - (this.Ja = t), (this.Va = e); - } - uu(t, e) { - let s = e; - null != e && e instanceof _t && (s = e.ss()), this.Ja.store(t, s); - } - Ha(t) { - const e = this.tu(t); - null != e && ((e.Jh = new Date().valueOf()), this.uu(t, e)); - } - tu(t) { - return _t.Tn(this.Ja.wr(t)); +class ge { + constructor() {} + tf() {} + ef() {} + Ia(t) {} + static rf(t, e) { + if (t && e) + if (((t = t.toLowerCase()), isArray(e.if))) { + for (let r = 0; r < e.if.length; r++) + if (-1 !== t.indexOf(e.if[r].toLowerCase())) return e.identity; + } else if (-1 !== t.indexOf(e.if.toLowerCase())) return e.identity; } - Yh(t) { - this.Ja.remove(t); +} + +const Browsers = { + pE: "Chrome", + xE: "Edge", + Ku: "Internet Explorer", + FE: "Opera", + Bg: "Safari", + ME: "Firefox", +}; +const OperatingSystems = { + xg: "Android", + de: "iOS", + kg: "Mac", + Pg: "Windows", +}; + +class ni extends ge { + constructor() { + if ( + (super(), + (this.userAgentData = navigator.userAgentData), + (this.browser = null), + (this.version = null), + this.userAgentData) + ) { + const t = this.Uu(); + (this.browser = t.browser || "Unknown Browser"), + (this.version = t.version || "Unknown Version"); + } + this.OS = null; + } + tf() { + return this.browser; + } + ef() { + return this.version; + } + Ia(t) { + if (this.OS) return Promise.resolve(this.OS); + const s = (s) => { + for (let r = 0; r < t.length; r++) { + const i = ni.rf(s, t[r]); + if (i) return (this.OS = i), this.OS; + } + return s; + }; + return this.userAgentData.platform + ? Promise.resolve(s(this.userAgentData.platform)) + : this.getHighEntropyValues() + .then((t) => (t.platform ? s(t.platform) : navigator.platform)) + .catch(() => navigator.platform); + } + Uu() { + const t = {}, + s = this.userAgentData.brands; + if (s && s.length) + for (const r of s) { + const s = this.Ou(Browsers), + i = r.brand.match(s); + if (i && i.length > 0) { + (t.browser = i[0]), (t.version = r.version); + break; + } + } + return t; + } + Ou(t) { + const s = []; + for (const r in t) { + const i = r; + t[i] !== Browsers.Ku && s.push(t[i]); + } + return new RegExp("(" + s.join("|") + ")", "i"); + } + getHighEntropyValues() { + return this.userAgentData.getHighEntropyValues + ? this.userAgentData.getHighEntropyValues(["platform"]) + : Promise.reject(); + } +} + +class ai extends ge { + constructor() { + super(), (this.rd = ai.Uu(navigator.userAgent || "")); + } + tf() { + return this.rd[0] || "Unknown Browser"; + } + ef() { + return this.rd[1] || "Unknown Version"; + } + Ia(r) { + for (let n = 0; n < r.length; n++) { + const e = r[n].string; + let i = ai.rf(e, r[n]); + if (i) + return ( + i === OperatingSystems.kg && navigator.maxTouchPoints > 1 && (i = OperatingSystems.de), + Promise.resolve(i) + ); + } + return Promise.resolve(navigator.platform); + } + static Uu(r) { + let n, + e = + r.match( + /(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i, + ) || []; + if (e[1] && /trident/i.test(e[1])) + return ( + (n = /\brv[ :]+(\.?\d+(\.\d+)*)/g.exec(r) || []), [Browsers.Ku, n[1] || ""] + ); + if (-1 !== r.indexOf("(Web0S; Linux/SmartTV)")) + return ["LG Smart TV", null]; + if (-1 !== r.indexOf("CrKey")) return ["Chromecast", null]; + if ( + -1 !== r.indexOf("BRAVIA") || + -1 !== r.indexOf("SonyCEBrowser") || + -1 !== r.indexOf("SonyDTV") + ) + return ["Sony Smart TV", null]; + if (-1 !== r.indexOf("PhilipsTV")) return ["Philips Smart TV", null]; + if (r.match(/\b(Roku)\b/)) return ["Roku", null]; + if (r.match(/\bAFTM\b/)) return ["Amazon Fire Stick", null]; + if ( + e[1] === Browsers.pE && + ((n = r.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/)), + null != n) + ) + return ( + (n = n.slice(1)), + (n[0] = n[0].replace("OPR", Browsers.FE)), + (n[0] = n[0].replace("EdgA", Browsers.xE)), + "Edg" === n[0] && (n[0] = Browsers.xE), + [n[0], n[1]] + ); + if ( + e[1] === Browsers.Bg && + ((n = r.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/)), null != n) + ) + return ( + (n = n.slice(1)), (n[0] = n[0].replace("EdgiOS", Browsers.xE)), [n[0], n[1]] + ); + if ( + ((e = e[2] ? [e[1], e[2]] : [null, null]), + e[0] === Browsers.Bg && + null != (n = r.match(/version\/(\.?\d+(\.\d+)*)/i)) && + e.splice(1, 1, n[1]), + null != (n = r.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/)) && + e.splice(1, 1, n[2]), + e[0] === Browsers.FE && null != (n = r.match(/mini\/(\.?\d+(\.\d+)*)/i))) + ) + return ["Opera Mini", n[1] || ""]; + if (e[0]) { + const r = e[0].toLowerCase(); + "msie" === r && (e[0] = Browsers.Ku), + "crios" === r && (e[0] = Browsers.pE), + "tizen" === r && ((e[0] = "Samsung Smart TV"), (e[1] = null)), + "samsungbrowser" === r && (e[0] = "Samsung Browser"); + } + return e; + } +} + +class gi { + constructor() { + const t = navigator.userAgentData ? ni : ai; + (this.Sg = new t()), + (this.userAgent = navigator.userAgent), + (this.browser = this.Sg.tf()), + (this.version = this.Sg.ef()), + (this.OS = null), + this.Ia().then((t) => (this.OS = t)); + const i = navigator; + (this.language = ( + i.userLanguage || + i.language || + i.browserLanguage || + i.systemLanguage || + "" + ).toLowerCase()), + (this.$o = gi.vg(this.userAgent)); + } + OE() { + return this.browser === Browsers.Bg; + } + Oa() { + return this.OS || null; + } + Ia() { + return this.OS + ? Promise.resolve(this.OS) + : this.Sg.Ia(gi.Og).then((t) => ((this.OS = t), t)); + } + static vg(t) { + t = t.toLowerCase(); + const i = [ + "googlebot", + "bingbot", + "slurp", + "duckduckbot", + "baiduspider", + "yandex", + "facebookexternalhit", + "sogou", + "ia_archiver", + "https://github.com/prerender/prerender", + "aolbuild", + "bingpreview", + "msnbot", + "adsbot", + "mediapartners-google", + "teoma", + ]; + for (let n = 0; n < i.length; n++) if (-1 !== t.indexOf(i[n])) return !0; + return !1; + } +} +gi.Og = [ + { string: navigator.platform, if: "Win", identity: OperatingSystems.Pg }, + { string: navigator.platform, if: "Mac", identity: OperatingSystems.kg }, + { string: navigator.platform, if: "BlackBerry", identity: "BlackBerry" }, + { string: navigator.platform, if: "FreeBSD", identity: "FreeBSD" }, + { string: navigator.platform, if: "OpenBSD", identity: "OpenBSD" }, + { string: navigator.platform, if: "Nintendo", identity: "Nintendo" }, + { string: navigator.platform, if: "SunOS", identity: "SunOS" }, + { string: navigator.platform, if: "PlayStation", identity: "PlayStation" }, + { string: navigator.platform, if: "X11", identity: "X11" }, + { + string: navigator.userAgent, + if: ["iPhone", "iPad", "iPod"], + identity: OperatingSystems.de, + }, + { string: navigator.platform, if: "Pike v", identity: OperatingSystems.de }, + { string: navigator.userAgent, if: ["Web0S"], identity: "WebOS" }, + { + string: navigator.platform, + if: ["Linux armv7l", "Android"], + identity: OperatingSystems.xg, + }, + { string: navigator.userAgent, if: ["Android"], identity: OperatingSystems.xg }, + { string: navigator.platform, if: "Linux", identity: "Linux" }, +]; +const V = new gi(); + +const STORAGE_KEYS = { + eu: { + su: "ab.storage.userId", + Xo: "ab.storage.deviceId", + Dl: "ab.storage.sessionId", + }, + k: { + ec: "ab.test", + tE: "ab.storage.events", + eE: "ab.storage.attributes", + sE: "ab.storage.attributes.anonymous_user", + Ca: "ab.storage.device", + Xa: "ab.storage.sdk_metadata", + Ea: "ab.storage.session_id_for_cached_metadata", + Bn: "ab.storage.pushToken", + Bi: "ab.storage.newsFeed", + Ei: "ab.storage.lastNewsFeedRefresh", + L: "ab.storage.cardImpressions", + hl: "ab.storage.serverConfig", + rE: "ab.storage.triggers", + oE: "ab.storage.triggers.ts", + zl: "ab.storage.messagingSessionStart", + Yt: "ab.storage.cc", + ws: "ab.storage.ccLastFullSync", + vs: "ab.storage.ccLastCardUpdated", + Vs: "ab.storage.ccLastClientRequest", + ci: "ab.storage.ccRateLimitCurrentTokenCount", + C: "ab.storage.ccClicks", + K: "ab.storage.ccImpressions", + G: "ab.storage.ccDismissals", + nE: "ab.storage.lastDisplayedTriggerTimesById", + iE: "ab.storage.lastDisplayedTriggerTime", + aE: "ab.storage.triggerFireInstancesById", + xh: "ab.storage.signature", + Ls: "ab.storage.brazeSyncRetryCount", + Ss: "ab.storage.sdkVersion", + Ri: "ab.storage.ff", + qi: "ab.storage.ffImpressions", + Ui: "ab.storage.ffLastRefreshAt", + EE: "ab.storage.lastReqToEndpoint", + lE: "ab.storage.requestAttempts", + rn: "ab.storage.deferredIam", + }, + re: "ab.optOut", +}; +class O { + constructor(t, e) { + (this.SE = t), (this._E = e), (this.SE = t), (this._E = e); + } + xo(t) { + const e = keys(STORAGE_KEYS.eu), + s = new O.ee(t); + for (const t of e) s.remove(STORAGE_KEYS.eu[t]); + } + uu(t, e) { + let s = null; + null != e && e instanceof _t && (s = e.ss()), this.SE.store(t, s); + } + uE(t) { + const e = this.tu(t); + null != e && ((e.Nl = new Date().valueOf()), this.uu(t, e)); + } + tu(t) { + return _t.Yn(this.SE.jr(t)); + } + ql(t) { + this.SE.remove(t); } - co(t) { + bo(t) { + let e; if (null == t || 0 === t.length) return !1; - isArray(t) || (t = [t]); - let e = this.Va.wr(STORAGE_KEYS.k.Ia); - (null != e && isArray(e)) || (e = []); - for (let s = 0; s < t.length; s++) e.push(t[s].ss()); - return this.Va.store(STORAGE_KEYS.k.Ia, e); - } - Qh(t) { - return null != t && this.co([t]); - } - Wa() { - let t = this.Va.wr(STORAGE_KEYS.k.Ia); - this.Va.remove(STORAGE_KEYS.k.Ia), null == t && (t = []); + e = isArray(t) ? t : [t]; + let s = this._E.jr(STORAGE_KEYS.k.tE); + (null != s && isArray(s)) || (s = []); + for (let t = 0; t < e.length; t++) s.push(e[t].ss()); + return this._E.store(STORAGE_KEYS.k.tE, s); + } + Hl(t) { + return null != t && this.bo([t]); + } + cE() { + let t = this._E.jr(STORAGE_KEYS.k.tE); + this._E.remove(STORAGE_KEYS.k.tE), null == t && (t = []); const e = []; let s = !1, o = null; if (isArray(t)) for (let s = 0; s < t.length; s++) - ue.Za(t[s]) ? e.push(ue.Tn(t[s])) : (o = s); + be.TE(t[s]) ? e.push(be.Yn(t[s])) : (o = s); else s = !0; if (s || null != o) { let n = "Stored events could not be deserialized as Events"; @@ -1918,7 +2020,7 @@ class O { typeof t + ": " + JSON.stringify(t)), - e.push(new ue(null, r$1.q.Is, new Date().valueOf(), null, { e: n })); + e.push(new be(null, r$1.q.qs, new Date().valueOf(), null, { e: n })); } return e; } @@ -1928,8 +2030,8 @@ class O { STORAGE_KEYS.k, t, "StorageManager cannot store object.", - "STORAGE_KEYS.OBJECTS" - ) && this.Va.store(t, e) + "STORAGE_KEYS.OBJECTS", + ) && this._E.store(t, e) ); } v(t) { @@ -1938,444 +2040,449 @@ class O { STORAGE_KEYS.k, t, "StorageManager cannot retrieve object.", - "STORAGE_KEYS.OBJECTS" - ) && this.Va.wr(t) + "STORAGE_KEYS.OBJECTS", + ) && this._E.jr(t) ); } - ri(t) { + ni(t) { return ( !!validateValueIsFromEnum( STORAGE_KEYS.k, t, "StorageManager cannot remove object.", - "STORAGE_KEYS.OBJECTS" - ) && (this.Va.remove(t), !0) + "STORAGE_KEYS.OBJECTS", + ) && (this._E.remove(t), !0) ); } - xo(t) { - const e = keys(STORAGE_KEYS.eu), - s = new O.ee(t); - for (const t of e) s.remove(STORAGE_KEYS.eu[t]); - } clearData() { const t = keys(STORAGE_KEYS.eu), e = keys(STORAGE_KEYS.k); for (let e = 0; e < t.length; e++) { const s = t[e]; - this.Ja.remove(STORAGE_KEYS.eu[s]); + this.SE.remove(STORAGE_KEYS.eu[s]); } for (let t = 0; t < e.length; t++) { const s = e[t]; - this.Va.remove(STORAGE_KEYS.k[s]); + this._E.remove(STORAGE_KEYS.k[s]); } } - $a(t) { - return t || STORAGE_KEYS.k.Ya; + hE(t) { + return t || STORAGE_KEYS.k.sE; } - wa(t) { - let e = this.Va.wr(STORAGE_KEYS.k.Ka); + Qa(t) { + let e = this._E.jr(STORAGE_KEYS.k.eE); null == e && (e = {}); - const s = this.$a(t[User.Hn]); - for (let r in t) - r === User.Hn || - (null != e[s] && null != e[s][r]) || - this.mu(t[User.Hn], r, t[r]); + const s = this.hE(t[User.bu]), + r = e[s]; + for (const o in t) + o !== User.bu && + (null == e[s] || (r && null == r[o])) && + this.mu(t[User.bu], o, t[o]); } mu(t, e, s) { - let r = this.Va.wr(STORAGE_KEYS.k.Ka); + let r = this._E.jr(STORAGE_KEYS.k.eE); null == r && (r = {}); - const o = this.$a(t); + const o = this.hE(t); let n = r[o]; if ( - (null == n && ((n = {}), null != t && (n[User.Hn] = t)), e === User.lu) + (null == n && ((n = {}), null != t && (n[User.bu] = t)), e === User.lu) ) { null == n[e] && (n[e] = {}); - for (let t in s) n[e][t] = s[t]; - } else n[e] = s; - return (r[o] = n), this.Va.store(STORAGE_KEYS.k.Ka, r); + for (const t in s) n[e][t] = s[t]; + } else null != s && (n[e] = s); + return (r[o] = n), this._E.store(STORAGE_KEYS.k.eE, r); } - tE() { - const t = this.Va.wr(STORAGE_KEYS.k.Ka); - this.Va.remove(STORAGE_KEYS.k.Ka); + AE() { + const t = this._E.jr(STORAGE_KEYS.k.eE); + this._E.remove(STORAGE_KEYS.k.eE); const e = []; - for (let s in t) null != t[s] && e.push(t[s]); + for (const s in t) null != t[s] && e.push(t[s]); return e; } ou(t) { - const e = this.Va.wr(STORAGE_KEYS.k.Ka); + const e = this._E.jr(STORAGE_KEYS.k.eE); if (null != e) { - const s = this.$a(null), + const s = this.hE(null), r = e[s]; null != r && ((e[s] = void 0), - this.Va.store(STORAGE_KEYS.k.Ka, e), - (r[User.Hn] = t), - this.wa(r)); + this._E.store(STORAGE_KEYS.k.eE, e), + (r[User.bu] = t), + this.Qa(r)); } - const s = this.tu(STORAGE_KEYS.eu.Wh); + const s = this.tu(STORAGE_KEYS.eu.Dl); let r = null; null != s && (r = s.iu); - const o = this.Wa(); + const o = this.cE(); if (null != o) for (let e = 0; e < o.length; e++) { const s = o[e]; - null == s.userId && s.sessionId == r && (s.userId = t), this.Qh(s); + null == s.userId && s.sessionId == r && (s.userId = t), this.Hl(s); } } - eE() { - return this.Va.sE; + RE() { + return this._E.gE; } } -O.Ma = class { +(O.rc = class { constructor(t) { - (this.Ko = t), (this.sE = V.rE() ? 3 : 10); + (this.cn = t), (this.cn = t), (this.gE = V.OE() ? 3 : 10); } - oE(t) { - return t + "." + this.Ko; + dE(t) { + return t + "." + this.cn; } store(t, e) { const s = { v: e }; try { - return localStorage.setItem(this.oE(t), JSON.stringify(s)), !0; + return localStorage.setItem(this.dE(t), JSON.stringify(s)), !0; } catch (t) { - return r$1.j.info("Storage failure: " + t.message), !1; + return r$1.j.info("Storage failure: " + getErrorMessage(t)), !1; } } - wr(t) { + jr(t) { try { - const e = JSON.parse(localStorage.getItem(this.oE(t))); - return null == e ? null : e.v; + let e = null; + const s = localStorage.getItem(this.dE(t)); + return null != s && (e = JSON.parse(s)), null == e ? null : e.v; } catch (t) { - return r$1.j.info("Storage retrieval failure: " + t.message), null; + return r$1.j.info("Storage retrieval failure: " + getErrorMessage(t)), null; } } remove(t) { try { - localStorage.removeItem(this.oE(t)); + localStorage.removeItem(this.dE(t)); } catch (t) { - return r$1.j.info("Storage removal failure: " + t.message), !1; + return r$1.j.info("Storage removal failure: " + getErrorMessage(t)), !1; } } -}; -O.ee = class { - constructor(t, e) { - (this.Ko = t), (this.nE = this.aE()), (this.iE = 576e3), (this.EE = !!e); - } - oE(t) { - return null != this.Ko ? t + "." + this.Ko : t; - } - aE() { - let t = 0, - e = document.location.hostname; - const s = e.split("."), - r = "ab._gd"; - for (; t < s.length - 1 && -1 === document.cookie.indexOf(r + "=" + r); ) - t++, - (e = "." + s.slice(-1 - t).join(".")), - (document.cookie = r + "=" + r + ";domain=" + e + ";"); - return ( - (document.cookie = - r + "=;expires=" + new Date(0).toGMTString() + ";domain=" + e + ";"), - e - ); - } - ne() { - const t = new Date(); - return t.setTime(t.getTime() + 60 * this.iE * 1e3), t.getFullYear(); - } - lE() { - const t = values(STORAGE_KEYS.eu), - e = document.cookie.split(";"); - for (let s = 0; s < e.length; s++) { - let r = e[s]; - for (; " " === r.charAt(0); ) r = r.substring(1); - let o = !1; - for (let e = 0; e < t.length; e++) - if (0 === r.indexOf(t[e])) { - o = !0; - break; +}), + (O.ac = class { + constructor() { + (this.fE = {}), (this.bE = 5242880), (this.gE = 3); + } + store(t, e) { + const s = { value: e }, + o = this.IE(e); + return o > this.bE + ? (r$1.j.info( + "Storage failure: object is ≈" + + o + + " bytes which is greater than the max of " + + this.bE, + ), + !1) + : ((this.fE[t] = s), !0); + } + IE(t) { + const e = [], + s = [t]; + let r = 0; + for (; s.length; ) { + const t = s.pop(); + if ("boolean" == typeof t) r += 4; + else if ("string" == typeof t) r += 2 * t.length; + else if ("number" == typeof t) r += 8; + else if ("object" == typeof t && -1 === e.indexOf(t)) { + let r, o; + e.push(t); + for (const e in t) (o = t), (r = e), s.push(o[r]); } - if (o) { - const t = r.split("=")[0]; - -1 === t.indexOf("." + this.Ko) && this.SE(t); } + return r; } - } - store(t, e) { - this.lE(); - const s = new Date(); - s.setTime(s.getTime() + 60 * this.iE * 1e3); - const o = "expires=" + s.toUTCString(), - n = "domain=" + this.nE; - let a; - a = this.EE ? e : encodeURIComponent(JSON.stringify(e)); - const i = this.oE(t) + "=" + a + ";" + o + ";" + n + ";path=/"; - return i.length >= 4093 - ? (r$1.j.info( - "Storage failure: string is " + - i.length + - " chars which is too large to store as a cookie." - ), - !1) - : ((document.cookie = i), !0); - } - wr(t) { - const e = [], - s = this.oE(t) + "=", - o = document.cookie.split(";"); - for (let n = 0; n < o.length; n++) { - let a = o[n]; - for (; " " === a.charAt(0); ) a = a.substring(1); - if (0 === a.indexOf(s)) - try { - let t; - (t = this.EE - ? a.substring(s.length, a.length) - : JSON.parse(decodeURIComponent(a.substring(s.length, a.length)))), - e.push(t); - } catch (e) { - return ( - r$1.j.info("Storage retrieval failure: " + e.message), - this.remove(t), - null - ); + jr(t) { + const e = this.fE[t]; + return null == e ? null : e.value; + } + remove(t) { + this.fE[t] = null; + } + }), + (O.ee = class { + constructor(t, e) { + (this.cn = t), + (this.mE = e), + (this.cn = t), + (this.KE = this.YE()), + (this.NE = 576e3), + (this.mE = !!e); + } + dE(t) { + return null != this.cn ? t + "." + this.cn : t; + } + YE() { + let t = 0, + e = document.location.hostname; + const s = e.split("."), + r = "ab._gd"; + for (; t < s.length - 1 && -1 === document.cookie.indexOf(r + "=" + r); ) + t++, + (e = "." + s.slice(-1 - t).join(".")), + (document.cookie = r + "=" + r + ";domain=" + e + ";"); + return ( + (document.cookie = + r + "=;expires=" + new Date(0).toUTCString() + ";domain=" + e + ";"), + e + ); + } + ae() { + const t = new Date(); + return t.setTime(t.getTime() + 60 * this.NE * 1e3), t.getFullYear(); + } + DE() { + const t = values(STORAGE_KEYS.eu), + e = document.cookie.split(";"); + for (let s = 0; s < e.length; s++) { + let r = e[s]; + for (; " " === r.charAt(0); ) r = r.substring(1); + let o = !1; + for (let e = 0; e < t.length; e++) + if (0 === r.indexOf(t[e])) { + o = !0; + break; + } + if (o) { + const t = r.split("=")[0]; + -1 === t.indexOf("." + this.cn) && this.CE(t); } + } } - return e.length > 0 ? e[e.length - 1] : null; - } - remove(t) { - this.SE(this.oE(t)); - } - SE(t) { - const e = t + "=;expires=" + new Date(0).toGMTString(); - (document.cookie = e), (document.cookie = e + ";path=/"); - const s = e + ";domain=" + this.nE; - (document.cookie = s), (document.cookie = s + ";path=/"); - } -}; -O.Qa = class { - constructor() { - (this._E = {}), (this.uE = 5242880), (this.sE = 3); - } - store(t, e) { - const s = { value: e }, - o = this.cE(e); - return o > this.uE - ? (r$1.j.info( - "Storage failure: object is ≈" + - o + - " bytes which is greater than the max of " + - this.uE - ), - !1) - : ((this._E[t] = s), !0); - } - cE(t) { - const e = [], - s = [t]; - let r = 0; - for (; s.length; ) { - const t = s.pop(); - if ("boolean" == typeof t) r += 4; - else if ("string" == typeof t) r += 2 * t.length; - else if ("number" == typeof t) r += 8; - else if ("object" == typeof t && -1 === e.indexOf(t)) { - e.push(t); - for (let e in t) s.push(t[e]); + store(t, e) { + this.DE(); + const s = new Date(); + s.setTime(s.getTime() + 60 * this.NE * 1e3); + const o = "expires=" + s.toUTCString(), + n = "domain=" + this.KE; + let i; + i = this.mE ? e : encodeURIComponent(JSON.stringify(e)); + const a = this.dE(t) + "=" + i + ";" + o + ";" + n + ";path=/"; + return a.length >= 4093 + ? (r$1.j.info( + "Storage failure: string is " + + a.length + + " chars which is too large to store as a cookie.", + ), + !1) + : ((document.cookie = a), !0); + } + jr(t) { + const e = [], + s = this.dE(t) + "=", + o = document.cookie.split(";"); + for (let n = 0; n < o.length; n++) { + let i = o[n]; + for (; " " === i.charAt(0); ) i = i.substring(1); + if (0 === i.indexOf(s)) + try { + let t; + (t = this.mE + ? i.substring(s.length, i.length) + : JSON.parse( + decodeURIComponent(i.substring(s.length, i.length)), + )), + e.push(t); + } catch (e) { + return ( + r$1.j.info("Storage retrieval failure: " + getErrorMessage(e)), + this.remove(t), + null + ); + } } + return e.length > 0 ? e[e.length - 1] : null; } - return r; - } - wr(t) { - const e = this._E[t]; - return null == e ? null : e.value; - } - remove(t) { - this._E[t] = null; - } -}; -O.xa = class { - constructor(t, e, s) { - (this.Ko = t), - (this.TE = []), - e && this.TE.push(new O.ee(t)), - s && this.TE.push(new O.Ma(t)), - this.TE.push(new O.Qa(t)); - } - store(t, e) { - let s = !0; - for (let r = 0; r < this.TE.length; r++) s = this.TE[r].store(t, e) && s; - return s; - } - wr(t) { - for (let e = 0; e < this.TE.length; e++) { - const s = this.TE[e].wr(t); - if (null != s) return s; + remove(t) { + this.CE(this.dE(t)); } - return null; - } - remove(t) { - new O.ee(this.Ko).remove(t); - for (let e = 0; e < this.TE.length; e++) this.TE[e].remove(t); - } -}; + CE(t) { + const e = t + "=;expires=" + new Date(0).toUTCString(); + (document.cookie = e), (document.cookie = e + ";path=/"); + const s = e + ";domain=" + this.KE; + (document.cookie = s), (document.cookie = s + ";path=/"); + } + }), + (O.tc = class { + constructor(t, e, s) { + (this.cn = t), + (this.GE = []), + e && this.GE.push(new O.ee(t)), + s && this.GE.push(new O.rc(t)), + this.GE.push(new O.ac()); + } + store(t, e) { + let s = !0; + for (let r = 0; r < this.GE.length; r++) s = this.GE[r].store(t, e) && s; + return s; + } + jr(t) { + for (let e = 0; e < this.GE.length; e++) { + const s = this.GE[e].jr(t); + if (null != s) return s; + } + return null; + } + remove(t) { + new O.ee(this.cn).remove(t); + for (let e = 0; e < this.GE.length; e++) this.GE[e].remove(t); + } + }); -class jt { +class kt { constructor(t, i, s) { - (this.Jn = t), - (this.Kn = i || !1), - (this.Qn = s), - (this.Vn = new E()), - (this.Xn = 0), - (this.Yn = 1); + (this.u = t), + (this.gh = i), + (this.ph = s), + (this.u = t), + (this.gh = i || !1), + (this.ph = s), + (this.Fh = new E()), + (this.kh = 0), + (this.fh = 1); } - Zn() { - return this.Kn; + wh() { + return this.gh; } - au() { - return this.Jn.v(STORAGE_KEYS.k.bu); + jh() { + return this.u.v(STORAGE_KEYS.k.xh); } setSdkAuthenticationSignature(t) { - const s = this.au(); - this.Jn.D(STORAGE_KEYS.k.bu, t); + const s = this.jh(); + this.u.D(STORAGE_KEYS.k.xh, t); const e = r$1.zt.Ft; - new r$1.xt(e, r$1.j).setItem(e.Jt.gu, this.Yn, t), s !== t && this.si(); + new r$1.xt(e, r$1.j).setItem(e.Jt.qh, this.fh, t), s !== t && this.ti(); } - du() { - this.Jn.ri(STORAGE_KEYS.k.bu); + yh() { + this.u.ni(STORAGE_KEYS.k.xh); const t = r$1.zt.Ft; - new r$1.xt(t, r$1.j).br(t.Jt.gu, this.Yn); + new r$1.xt(t, r$1.j).oe(t.Jt.qh, this.fh); } subscribeToSdkAuthenticationFailures(t) { - return this.Qn.lt(t); + return this.ph.lt(t); } - Su(t) { - this.Qn.Et(t); + Bh(t) { + this.ph.Et(t); } - Au() { - this.Vn.removeAllSubscriptions(); + Gh() { + this.Fh.removeAllSubscriptions(); } - pu() { - this.Xn += 1; + Hh() { + this.kh += 1; } - Fu() { - return this.Xn; + Jh() { + return this.kh; } - si() { - this.Xn = 0; + ti() { + this.kh = 0; } } class y { constructor() {} Ts(a) {} - changeUser(a) {} - clearData(a) {} + changeUser(a = !1) {} + clearData(a = !1) {} } -var DeviceProperties = { - BROWSER: "browser", - BROWSER_VERSION: "browserVersion", - OS: "os", - RESOLUTION: "resolution", - LANGUAGE: "language", - TIME_ZONE: "timeZone", - USER_AGENT: "userAgent" -}; - -class ge { +class xt { constructor(s) { - this.id = s; + (this.id = s), (this.id = s); } - Wi() { + Kr() { const s = {}; return ( - null != this[DeviceProperties.BROWSER] && - (s.browser = this[DeviceProperties.BROWSER]), - null != this[DeviceProperties.BROWSER_VERSION] && - (s.browser_version = this[DeviceProperties.BROWSER_VERSION]), - null != this[DeviceProperties.OS] && - (s.os_version = this[DeviceProperties.OS]), - null != this[DeviceProperties.RESOLUTION] && - (s.resolution = this[DeviceProperties.RESOLUTION]), - null != this[DeviceProperties.LANGUAGE] && - (s.locale = this[DeviceProperties.LANGUAGE]), - null != this[DeviceProperties.TIME_ZONE] && - (s.time_zone = this[DeviceProperties.TIME_ZONE]), - null != this[DeviceProperties.USER_AGENT] && - (s.user_agent = this[DeviceProperties.USER_AGENT]), + null != this.browser && (s.browser = this.browser), + null != this.Zo && (s.browser_version = this.Zo), + null != this.os && (s.os_version = this.os), + null != this.resolution && (s.resolution = this.resolution), + null != this.language && (s.locale = this.language), + null != this.timeZone && (s.time_zone = this.timeZone), + null != this.userAgent && (s.user_agent = this.userAgent), s ); } } +var DeviceProperties = { + BROWSER: "browser", + BROWSER_VERSION: "browserVersion", + OS: "os", + RESOLUTION: "resolution", + LANGUAGE: "language", + TIME_ZONE: "timeZone", + USER_AGENT: "userAgent", +}; + class Ot { - constructor(e, t) { - (this.Jn = e), null == t && (t = values(DeviceProperties)), (this.sa = t); - } - te() { - let e = this.Jn.tu(STORAGE_KEYS.eu.oa); - null == e && ((e = new _t(r$1.Z.Y())), this.Jn.uu(STORAGE_KEYS.eu.oa, e)); - const t = new ge(e.iu); - for (let e = 0; e < this.sa.length; e++) { - const r = this.sa[e]; - switch (r) { + constructor(t, e) { + (this.u = t), + (this.Qo = e), + (this.u = t), + null == e && (e = values(DeviceProperties)), + (this.Qo = e); + } + ce(t = !0) { + let e = this.u.tu(STORAGE_KEYS.eu.Xo); + null == e && ((e = new _t(r$1.Z.Y())), t && this.u.uu(STORAGE_KEYS.eu.Xo, e)); + const s = new xt(e.iu); + for (let t = 0; t < this.Qo.length; t++) { + switch (this.Qo[t]) { case DeviceProperties.BROWSER: - t[r] = V.browser; + s.browser = V.browser; break; case DeviceProperties.BROWSER_VERSION: - t[r] = V.version; + s.Zo = V.version; break; case DeviceProperties.OS: - t[r] = this.ca(); + s.os = this.Ia(); break; case DeviceProperties.RESOLUTION: - t[r] = screen.width + "x" + screen.height; + s.Ta = screen.width + "x" + screen.height; break; case DeviceProperties.LANGUAGE: - t[r] = V.language; + s.language = V.language; break; case DeviceProperties.TIME_ZONE: - t[r] = this.fa(new Date()); + s.timeZone = this.Da(new Date()); break; case DeviceProperties.USER_AGENT: - t[r] = V.userAgent; + s.userAgent = V.userAgent; } } - return t; + return s; } - ca() { - if (V.la()) return V.la(); - const e = this.Jn.v(STORAGE_KEYS.k.ma); - return e && e.os_version ? e.os_version : V.ua(); + Ia() { + if (V.Oa()) return V.Oa(); + const t = this.u.v(STORAGE_KEYS.k.Ca); + return t && t.os_version ? t.os_version : V.Ia(); } - fa(e) { + Da(t) { + let e = !1; if ("undefined" != typeof Intl && "function" == typeof Intl.DateTimeFormat) try { if ("function" == typeof Intl.DateTimeFormat().resolvedOptions) { - const e = Intl.DateTimeFormat().resolvedOptions().timeZone; - if (null != e && "" !== e) return e; + const t = Intl.DateTimeFormat().resolvedOptions().timeZone; + if (null != t && "" !== t) return t; } } catch (t) { r$1.j.info( "Intl.DateTimeFormat threw an error, cannot detect user's time zone:" + - t.message + getErrorMessage(t), ), - (e = ""); + (e = !0); } - if (!e) return e; - const t = e.getTimezoneOffset(); - return this.ha(t); + if (e) return ""; + const s = t.getTimezoneOffset(); + return this.Fa(s); } - ha(e) { - const t = parseInt(e / 60), - r = parseInt(e % 60); + Fa(t) { + const e = Math.trunc(t / 60), + r = Math.trunc(t % 60); let s = "GMT"; return ( - 0 !== e && - ((s += e < 0 ? "+" : "-"), + 0 !== t && + ((s += t < 0 ? "+" : "-"), (s += - ("00" + Math.abs(t)).slice(-2) + + ("00" + Math.abs(e)).slice(-2) + ":" + ("00" + Math.abs(r)).slice(-2))), s @@ -2389,82 +2496,115 @@ function logDeprecationWarning(e, a, i) { } var qt = { - Da: "invalid_api_key", - Sa: "blacklisted", - va: "no_device_identifier", - Ba: "invalid_json_response", - za: "empty_response", - __: "sdk_auth_error" + Ka: "invalid_api_key", + Ua: "blacklisted", + La: "no_device_identifier", + Ha: "invalid_json_response", + Na: "empty_response", + __: "sdk_auth_error", }; const T = { - Qs: { Xa: "d", Os: "cc", xi: "ff", Xi: "t" }, - Lu: e => { - if (e) return e.v(STORAGE_KEYS.k.Pa); + Os: { Ja: "d", Ks: "cc", Si: "ff", Lr: "t" }, + Qu: (e) => { + if (e) return e.v(STORAGE_KEYS.k.EE); + }, + Xu: (e) => { + if (e) return e.v(STORAGE_KEYS.k.lE); }, - qu: (e, t) => { - e && e.D(STORAGE_KEYS.k.Pa, t); + Yu: (e, t) => { + e && e.D(STORAGE_KEYS.k.EE, t); }, - Ea: (e, t) => { + Zu: (e, t) => { + e && e.D(STORAGE_KEYS.k.lE, t); + }, + Ga: (e, t) => { if (!e || !t) return -1; - const r = T.Lu(e); + const r = T.Qu(e); if (null == r) return -1; const s = r[t]; return null == s || isNaN(s) ? -1 : s; }, - Xs: (e, t, r) => { + Xh: (e, t) => { + let r = REQUEST_ATTEMPT_DEFAULT; + if (!e || !t) return r; + const s = T.Xu(e); + return null == s ? r : ((r = s[t]), null == r || isNaN(r) ? REQUEST_ATTEMPT_DEFAULT : r); + }, + Ws: (e, t, r) => { if (!e || !t) return; - let s = T.Lu(e); - null == s && (s = {}), (s[t] = r), T.qu(e, s); - } + let s = T.Qu(e); + null == s && (s = {}), (s[t] = r), T.Yu(e, s); + }, + si: (e, t, r) => { + if (!e || !t) return; + let s = T.Xu(e); + null == s && (s = {}), (s[t] = r), T.Zu(e, s); + }, + hi: (e, t) => { + if (!e || !t) return; + const r = T.Xh(e, t); + T.si(e, t, r + 1); + }, }; class Pt { - constructor(t, e, s, i, r, o, n, a, u, h, c) { - (this.Xo = t), - (this.Jn = e), - (this.gh = s), - (this.Qo = i), - (this.fh = r), - (this.Zo = o), - (this.Ko = n), - (this.Ho = a), - (this.Vo = u), - (this.Yo = h), - (this.pa = c), + constructor(t, e, s, i, r, o, n, a, h, u, c) { + (this.fn = t), + (this.u = e), + (this.Do = s), + (this.ft = i), + (this._e = r), + (this.wt = o), + (this.cn = n), + (this.Uo = a), + (this.Mo = h), + (this.jo = u), + (this.appVersion = c), + (this.fn = t), + (this.u = e), + (this.Do = s), + (this.ft = i), + (this._e = r), + (this.wt = o), + (this.cn = n), + (this.Uo = a), + (this.Mo = h), + (this.jo = u), + (this.appVersion = c), (this.Ra = ["npm"]); } - Gs(t, e) { - const s = this.Xo.te(), - r = s.Wi(), - o = this.Jn.v(STORAGE_KEYS.k.ma); - isEqual(o, r) || (t.device = r), - (t.api_key = this.Ko), + Bs(t, e = !1, s = !1) { + const r = this.fn.ce(!s), + o = r.Kr(), + n = this.u.v(STORAGE_KEYS.k.Ca); + isEqual(n, o) || (t.device = o), + (t.api_key = this.cn), (t.time = convertMsToSeconds(new Date().valueOf(), !0)); - const n = this.Jn.v(STORAGE_KEYS.k.ga) || [], - a = this.Jn.v(STORAGE_KEYS.k.qa) || ""; + const a = this.u.v(STORAGE_KEYS.k.Xa) || [], + u = this.u.v(STORAGE_KEYS.k.Ea) || ""; if ( (this.Ra.length > 0 && - (!isEqual(n, this.Ra) || a !== this.fh.ba()) && + (!isEqual(a, this.Ra) || u !== this._e.Pa()) && (t.sdk_metadata = this.Ra), - (t.sdk_version = this.Vo), - this.Yo && (t.sdk_flavor = this.Yo), - (t.app_version = this.pa), - (t.device_id = s.id), + (t.sdk_version = this.Mo), + this.jo && (t.sdk_flavor = this.jo), + (t.app_version = this.appVersion), + (t.device_id = r.id), e) ) { - const e = this.Qo.getUserId(); + const e = this.ft.getUserId(); null != e && (t.user_id = e); } return t; } - ti(t, e, i) { + Zs(t, e, i) { const o = e.auth_error, n = e.error; if (!o && !n) return !0; if (o) { let e; - this.gh.pu(); + this.Do.Hh(); const s = { errorCode: o.error_code }; for (const t of i) isArray(t) && "X-Braze-Auth-Signature" === t[0] && (s.signature = t[1]); @@ -2476,12 +2616,12 @@ class Pt { n ? ((s.reason = n), (e = `due to ${n}`)) : (e = `with error code ${o.error_code}.`), - this.gh.Zn() || + this.Do.wh() || (e += ' Please use the "enableSdkAuthentication" initialization option to enable authentication.'), r$1.j.error(`SDK Authentication failed ${e}`), - this.Aa(t.events, t.attributes), - this.gh.Su(s), + this.$a(t.events || [], t.attributes || []), + this.Do.Bh(s), !1 ); } @@ -2489,161 +2629,161 @@ class Pt { let i, o = n; switch (o) { - case qt.za: + case qt.Na: return ( (i = "Received successful response with empty body."), - s$1.N(r$1.q.Is, { e: i }), + s$1.N(r$1.q.qs, { e: i }), r$1.j.info(i), !1 ); - case qt.Ba: + case qt.Ha: return ( (i = "Received successful response with invalid JSON"), - s$1.N(r$1.q.Is, { e: i + ": " + e.response }), + s$1.N(r$1.q.qs, { e: i + ": " + e.response }), r$1.j.info(i), !1 ); - case qt.Da: - o = `The API key "${t.api_key}" is invalid for the baseUrl ${this.Ho}`; + case qt.Ka: + o = `The API key "${t.api_key}" is invalid for the baseUrl ${this.Uo}`; break; - case qt.Sa: + case qt.Ua: o = "Sorry, we are not currently accepting your requests. If you think this is in error, please contact us."; break; - case qt.va: + case qt.La: o = "No device identifier. Please contact support@braze.com"; } r$1.j.error("Backend error: " + o); } return !1; } - ka(t, e, s, i) { + Wa(t, e, s, i) { return !!((t && 0 !== t.length) || (e && 0 !== e.length) || s || i); } - Ta(t, e, s, i) { - const r = [], - o = t => t || "", - n = o(this.Qo.getUserId()); - let a, - u, - h, - c, - l = this.Vi(t, e); + Ya(t, e, s, i, r = !1) { + const o = [], + n = (t) => t || "", + a = n(this.ft.getUserId()); + let h = this.Jr(t, e); + const u = [], + c = []; + let l, + f = null; if (s.length > 0) { const t = []; for (const e of s) { - if (((a = e.Wi()), this.gh.Zn())) { - if (n && !a.user_id) { - c || ((c = {}), (c.events = [])), c.events.push(a); + if (((l = e.Kr()), this.Do.wh())) { + if (a && !l.user_id) { + f || (f = {}), f.events || (f.events = []), f.events.push(l); continue; } - if (o(a.user_id) !== n) { - u || (u = []), u.push(a); + if (n(l.user_id) !== a) { + c.push(l); continue; } } - t.push(a); + t.push(l); } - t.length > 0 && (l.events = t); + t.length > 0 && (h.events = t); } if (i.length > 0) { const t = []; for (const e of i) - this.gh.Zn() && o(e.user_id) !== n - ? (h || (h = []), h.push(e)) - : t.push(e); - t.length > 0 && (l.attributes = t); + e && (this.Do.wh() && n(e.user_id) !== a ? u.push(e) : t.push(e)); + t.length > 0 && (h.attributes = t); } - if ((this.Aa(u, h), (l = this.Gs(l, !0)), c)) { - c = this.Gs(c, !1); - const t = { requestData: c, headers: this.Ks(c, T.Qs.Xa) }; - r.push(t); + if ((this.$a(c, u), (h = this.Bs(h, !0, r)), f)) { + f = this.Bs(f, !1, r); + const t = { requestData: f, headers: this.Hs(f, T.Os.Ja) }; + o.push(t); } - if (l && !this.ka(l.events, l.attributes, t, e)) return c ? r : null; - const f = { requestData: l, headers: this.Ks(l, T.Qs.Xa) }; - return r.push(f), r; + if (h && !this.Wa(h.events, h.attributes, t, e)) return f ? o : null; + const d = { requestData: h, headers: this.Hs(h, T.Os.Ja) }; + return o.push(d), o; } - Aa(t, e) { + $a(t, e) { if (t) { const e = []; for (const s of t) { - const t = ue.fromJson(s); + const t = be.fromJson(s); (t.time = convertSecondsToMs(t.time)), e.push(t); } - this.Jn.co(e); + this.u.bo(e); } - if (e) for (const t of e) this.Jn.wa(t); + if (e) for (const t of e) this.u.Qa(t); } ii(t, e) { let s = "HTTP error "; null != t && (s += t + " "), (s += e), r$1.j.error(s); } qr(t) { - return s$1.N(r$1.q.ya, { n: t }); + return s$1.N(r$1.q.Va, { n: t }); } - Vi(t, e, s) { + Jr(t, e, s) { const i = {}; t && (i.feed = !0), e && (i.triggers = !0); - const r = null != s ? s : this.Qo.getUserId(); + const r = null != s ? s : this.ft.getUserId(); return ( r && (i.user_id = r), - (i.config = { config_time: this.Zo.oi() }), + (i.config = { config_time: this.wt.li() }), { respond_with: i } ); } - Ca(t) { + Za(t) { const e = new Date().valueOf(); - let s = LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT.toString(), - i = T.Ea(this.Jn, t); + let s = LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT.toString(); + const i = T.Ga(this.u, t); if (-1 !== i) { s = (e - i).toString(); } return s; } - Ks(t, e, s) { - const r = [["X-Braze-Api-Key", this.Ko]]; - let o = this.Ca(e); + Hs(t, e, s = !1) { + const r = [["X-Braze-Api-Key", this.cn]], + o = this.Za(e); r.push(["X-Braze-Last-Req-Ms-Ago", o]); - let n = !1; + const n = T.Xh(this.u, e).toString(); + r.push(["X-Braze-Req-Attempt", n]); + let a = !1; if ( (null != t.respond_with && t.respond_with.triggers && - (r.push(["X-Braze-TriggersRequest", "true"]), (n = !0)), + (r.push(["X-Braze-TriggersRequest", "true"]), (a = !0)), null != t.respond_with && t.respond_with.feed && - (r.push(["X-Braze-FeedRequest", "true"]), (n = !0)), - e === T.Qs.Os) + (r.push(["X-Braze-FeedRequest", "true"]), (a = !0)), + e === T.Os.Ks) ) { r.push(["X-Braze-ContentCardsRequest", "true"]); - let t = this.Jn.v(STORAGE_KEYS.k.Fs); - (t && s) || ((t = 0), this.Jn.D(STORAGE_KEYS.k.Fs, t)), + let t = this.u.v(STORAGE_KEYS.k.Ls); + (t && s) || ((t = 0), this.u.D(STORAGE_KEYS.k.Ls, t)), r.push(["BRAZE-SYNC-RETRY-COUNT", t.toString()]), - (n = !0); + (a = !0); } if ( - (e === T.Qs.xi && - (r.push(["X-Braze-FeatureFlagsRequest", "true"]), (n = !0)), - n && r.push(["X-Braze-DataRequest", "true"]), - this.gh.Zn()) + (e === T.Os.Si && + (r.push(["X-Braze-FeatureFlagsRequest", "true"]), (a = !0)), + a && r.push(["X-Braze-DataRequest", "true"]), + this.Do.wh()) ) { - const t = this.gh.au(); + const t = this.Do.jh(); null != t && r.push(["X-Braze-Auth-Signature", t]); } return r; } - Vs(t, e) { + Qs(t, e) { const s = t.device; s && s.os_version instanceof Promise - ? s.os_version.then(s => { + ? s.os_version.then((s) => { (t.device.os_version = s), e(); }) : e(); } - si() { - this.gh.si(); + ti() { + this.Do.ti(); } - Zs() { - return this.Ho; + Ys() { + return this.Uo; } addSdkMetadata(t) { for (const e of t) -1 === this.Ra.indexOf(e) && this.Ra.push(e); @@ -2651,75 +2791,70 @@ class Pt { } const C = { - Ys: t => { + Xs: (t) => { let e, o; try { - const n = () => { + const s = () => { r$1.j.error("This browser does not have any supported ajax options!"); }; - if ( - (window.XMLHttpRequest ? ((e = new XMLHttpRequest()), e || n()) : n(), - null != e) - ) { - const r = () => { - "function" == typeof t.error && t.error(e.status), - "function" == typeof t.ei && t.ei(!1); - }; - (e.onload = () => { - let o = !1; - if (4 === e.readyState) - if ( - ((o = (e.status >= 200 && e.status < 300) || 304 === e.status), o) - ) { - if ("function" == typeof t.O) { - let o, r; - try { - (o = JSON.parse(e.responseText)), - (r = e.getAllResponseHeaders()); - } catch (o) { - const n = { - error: "" === e.responseText ? qt.za : qt.Ba, - response: e.responseText - }; - t.O(n, r); - } - o && t.O(o, r); + let n = !1; + if ((window.XMLHttpRequest && (n = !0), !n)) return void s(); + e = new XMLHttpRequest(); + const i = () => { + "function" == typeof t.error && t.error(e.status), + "function" == typeof t.ei && t.ei(!1); + }; + (e.onload = () => { + let o = !1; + if (4 === e.readyState) + if ( + ((o = (e.status >= 200 && e.status < 300) || 304 === e.status), o) + ) { + if ("function" == typeof t.O) { + let o, r; + try { + (o = JSON.parse(e.responseText)), + (r = e.getAllResponseHeaders()); + } catch (o) { + const s = { + error: "" === e.responseText ? qt.Na : qt.Ha, + response: e.responseText, + }; + (0, t.O)(s, r); } - "function" == typeof t.ei && t.ei(!0); - } else r(); + o && t.O(o, r); + } + "function" == typeof t.ei && t.ei(!0); + } else i(); + }), + (e.onerror = () => { + i(); }), - (e.onerror = () => { - r(); - }), - (e.ontimeout = () => { - r(); - }), - (o = JSON.stringify(t.data)), - e.open("POST", t.url, !0), - e.setRequestHeader("Content-type", "application/json"), - e.setRequestHeader("X-Requested-With", "XMLHttpRequest"); - const n = t.headers || []; - for (const t of n) e.setRequestHeader(t[0], t[1]); - e.send(o); - } + (e.ontimeout = () => { + i(); + }), + (o = JSON.stringify(t.data)), + e.open("POST", t.url, !0), + e.setRequestHeader("Content-type", "application/json"), + e.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + const f = t.headers || []; + for (const t of f) e.setRequestHeader(t[0], t[1]); + e.send(o); } catch (t) { - r$1.j.error(`Network request error: ${t.message}`); + r$1.j.error(`Network request error: ${getErrorMessage(t)}`); } - } + }, }; -const readResponseHeaders = t => { - let e = {}; - const o = t.toString().split("\r\n"); +const readResponseHeaders = (t) => { + const e = {}, + o = t.toString().split("\r\n"); if (!o) return e; - let r, n; + let r, s; for (const t of o) t && - ((r = t - .slice(0, t.indexOf(":")) - .toLowerCase() - .trim()), - (n = t.slice(t.indexOf(":") + 1).trim()), - (e[r] = n)); + ((r = t.slice(0, t.indexOf(":")).toLowerCase().trim()), + (s = t.slice(t.indexOf(":") + 1).trim()), + (e[r] = s)); return e; }; @@ -2730,389 +2865,422 @@ const randomInclusive = (t, a) => ( ); class t { - constructor(t, s) { - (this.O = !!t), (this.ve = s || []); + constructor(t = !1, s = []) { + (this.O = t), (this.ve = s), (this.O = t), (this.ve = s); } S(t) { (this.O = this.O && t.O), this.ve.push(...t.ve); } } -const yt = { - an: () => +const jt = { + kn: () => "serviceWorker" in navigator && "undefined" != typeof ServiceWorkerRegistration && "showNotification" in ServiceWorkerRegistration.prototype && "PushManager" in window, - fn: () => + Dn: () => "safari" in window && "pushNotification" in window.safari && "function" == typeof window.safari.pushNotification.permission && "function" == typeof window.safari.pushNotification.requestPermission, - isPushSupported: () => yt.an() || yt.fn(), + isPushSupported: () => jt.kn() || jt.Dn(), isPushBlocked: () => { const i = - yt.isPushSupported() && + jt.isPushSupported() && "Notification" in window && null != window.Notification && null != window.Notification.permission && "denied" === window.Notification.permission, n = - yt.isPushSupported() && + jt.isPushSupported() && (!("Notification" in window) || null == window.Notification); return i || n; }, isPushPermissionGranted: () => - yt.isPushSupported() && + jt.isPushSupported() && "Notification" in window && null != window.Notification && null != window.Notification.permission && "granted" === window.Notification.permission, - Ki: () => - !yt.isPushBlocked() && yt.isPushSupported() && !yt.isPushPermissionGranted() + Gr: () => + !jt.isPushBlocked() && + jt.isPushSupported() && + !jt.isPushPermissionGranted(), }; -var yt$1 = yt; +var jt$1 = jt; class Rt { - constructor(t, s, i, e, n, l, h, o, r, u) { - (this.Ko = t), - (this.Ho = s), - (this.wl = 0), - (this.kl = h.eE()), - (this.yl = null), - (this.fh = i), - (this.Xo = e), - (this.Qo = n), - (this.Zo = l), - (this.Jn = h), - (this.gh = r), - (this.wh = u), - (this.vl = o), - (this.jl = new E()), - (this.Sl = 50); - } - $l(t, s) { - return !t && !s && this.gh.Fu() >= this.Sl; - } - ql(t) { - let s = this.fh.kh(); + constructor(t, i, s, e, o, h, n, r, u, l) { + (this.cn = t), + (this.baseUrl = i), + (this._e = s), + (this.fn = e), + (this.ft = o), + (this.wt = h), + (this.u = n), + (this.$h = r), + (this.Do = u), + (this.gt = l), + (this.cn = t), + (this.baseUrl = i), + (this.Kh = 0), + (this.gE = n.RE() || 0), + (this.Wh = null), + (this._e = s), + (this.fn = e), + (this.ft = o), + (this.wt = h), + (this.u = n), + (this.Do = u), + (this.gt = l), + (this.$h = r), + (this.Qh = new E()), + (this.Vh = null), + (this.Yh = 50), + (this.Zh = !1); + } + fu(t, i) { + return !t && !i && this.Do.Jh() >= this.Yh; + } + gu(t) { + let i = this._e.El(); if (t.length > 0) { - const i = this.Qo.getUserId(); + const s = this.ft.getUserId(); for (const e of t) { - const t = (!e.userId && !i) || e.userId === i; - e.type === r$1.q.Vh && t && (s = !0); + const t = (!e.userId && !s) || e.userId === s; + e.type === r$1.q.Wl && t && (i = !0); } } - return s; + return i; } - Al(t, s, e, n, l, h, o) { - null == e && (e = !0), e && this.Cl(); - const u = this.Jn.Wa(), - a = this.Jn.tE(); - let c = !1; - const m = (t, s) => { - let o = !1; - T.Xs(this.Jn, T.Qs.Xa, new Date().valueOf()), - C.Ys({ - url: this.Ho + "/data/", + vu(t = !1, s = !1, e = !0, o, h, n, u = !1, l = !1) { + e && this.wu(); + const a = this.u.cE(), + c = this.u.AE(); + let d = !1; + const f = (t, s) => { + let r = !1; + T.Ws(this.u, T.Os.Ja, new Date().valueOf()), + C.Xs({ + url: this.baseUrl + "/data/", data: t, headers: s, - O: e => { + O: (e) => { null != t.respond_with && t.respond_with.triggers && - (this.wl = Math.max(this.wl - 1, 0)), - this.wh.ti(t, e, s) - ? (this.gh.si(), - this.Zo.ol(e), + (this.Kh = Math.max(this.Kh - 1, 0)), + this.gt.Zs(t, e, s) + ? (this.Do.ti(), + this.wt.ul(e), (null != t.respond_with && - t.respond_with.user_id != this.Qo.getUserId()) || - (null != t.device && this.Jn.D(STORAGE_KEYS.k.ma, t.device), + t.respond_with.user_id != this.ft.getUserId()) || + (null != t.device && this.u.D(STORAGE_KEYS.k.Ca, t.device), null != t.sdk_metadata && - (this.Jn.D(STORAGE_KEYS.k.ga, t.sdk_metadata), - this.Jn.D(STORAGE_KEYS.k.qa, this.fh.ba())), - this.vl(e), - "function" == typeof n && n())) - : e.auth_error && (o = !0); + (this.u.D(STORAGE_KEYS.k.Xa, t.sdk_metadata), + this.u.D(STORAGE_KEYS.k.Ea, this._e.Pa())), + this.$h(e), + T.si(this.u, T.Os.Ja, 1), + "function" == typeof o && o())) + : e.auth_error && (r = !0); }, error: () => { null != t.respond_with && t.respond_with.triggers && - (this.wl = Math.max(this.wl - 1, 0)), - this.wh.Aa(t.events, t.attributes), - "function" == typeof l && l(); + (this.Kh = Math.max(this.Kh - 1, 0)), + this.gt.$a(t.events, t.attributes), + "function" == typeof h && h(); }, - ei: t => { - if (("function" == typeof h && h(t), e && !c)) { - if (t && !o) this.Tl(); + ei: (t) => { + if (("function" == typeof n && n(t), e && !d)) { + if (t && !r) this.ku(); else { - let t = this.yl; - (null == t || t < 1e3 * this.kl) && (t = 1e3 * this.kl), - this.Tl(Math.min(3e5, randomInclusive(1e3 * this.kl, 3 * t))); + T.hi(this.u, T.Os.Ja); + let t = this.Wh; + (null == t || t < 1e3 * this.gE) && (t = 1e3 * this.gE), + this.ku(Math.min(3e5, randomInclusive(1e3 * this.gE, 3 * t))); } - c = !0; + d = !0; } - } + }, }); }, - d = this.ql(u), - f = s || d; - if (this.$l(o, d)) + m = this.gu(a), + g = s || m; + if (this.fu(u, m)) return void r$1.j.info( - "Declining to flush data due to 50 consecutive authentication failures" + "Declining to flush data due to 50 consecutive authentication failures", ); - if (e && !this.wh.ka(u, a, t, f)) - return this.Tl(), void ("function" == typeof h && h(!0)); - const g = this.wh.Ta(t, f, u, a); - f && this.wl++; + if (e && !this.gt.Wa(a, c, t, g)) + return this.ku(), void ("function" == typeof n && n(!0)); + const v = this.gt.Ya(t, g, a, c, l); + g && this.Kh++; let p = !1; - if (g) - for (const t of g) - this.wh.Vs(t.requestData, () => m(t.requestData, t.headers)), (p = !0); - this.gh.Zn() && e && !p - ? this.Tl() - : d && (r$1.j.info("Invoking new session subscriptions"), this.jl.Et()); - } - _l() { - return this.wl > 0; - } - Tl(t) { - this.Dl || - (null == t && (t = 1e3 * this.kl), - this.Cl(), - (this.Fl = setTimeout(() => { + if (v) + for (const t of v) + this.gt.Qs(t.requestData, () => f(t.requestData, t.headers)), (p = !0); + this.Do.wh() && e && !p + ? this.ku() + : m && (r$1.j.info("Invoking new session subscriptions"), this.Qh.Et()); + } + yu() { + return this.Kh > 0; + } + ku(t = 1e3 * this.gE) { + this.Zh || + (this.wu(), + (this.Vh = window.setTimeout(() => { if (document.hidden) { const t = "visibilitychange", - s = () => { + i = () => { document.hidden || - (document.removeEventListener(t, s, !1), this.Al()); + (document.removeEventListener(t, i, !1), this.vu()); }; - document.addEventListener(t, s, !1); - } else this.Al(); + document.addEventListener(t, i, !1); + } else this.vu(); }, t)), - (this.yl = t)); + (this.Wh = t)); } - Cl() { - null != this.Fl && (clearTimeout(this.Fl), (this.Fl = null)); + wu() { + null != this.Vh && (clearTimeout(this.Vh), (this.Vh = null)); } initialize() { - (this.Dl = !1), this.Tl(); + (this.Zh = !1), this.ku(); } destroy() { - this.jl.removeAllSubscriptions(), - this.gh.Au(), - this.Cl(), - (this.Dl = !0), - this.Al(null, null, !1), - (this.Fl = null); + this.Qh.removeAllSubscriptions(), + this.Do.Gh(), + this.wu(), + (this.Zh = !0), + this.vu(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0), + (this.Vh = null); } pr(t) { - return this.jl.lt(t); + return this.Qh.lt(t); } openSession() { - const t = this.fh.ba() !== this.fh.bo(); - t && (this.Jn.Ha(STORAGE_KEYS.eu.oa), this.Jn.Ha(STORAGE_KEYS.eu.su)), - this.Al(null, !1, null, null, null), - this.zn(), + const t = this._e.Pa() !== this._e.co(); + t && (this.u.uE(STORAGE_KEYS.eu.Xo), this.u.uE(STORAGE_KEYS.eu.su), this.u.ni(STORAGE_KEYS.k.qi)), + this.vu(void 0, !1, void 0, void 0, void 0), + this.pu(), t && - Promise.resolve().then(function () { return pushManagerFactory; }).then(t => { - if (this.Dl) return; + Promise.resolve().then(function () { return pushManagerFactory; }).then((t) => { + if (this.Zh) return; const s = t.default.m(); if ( null != s && - (yt$1.isPushPermissionGranted() || yt$1.isPushBlocked()) + (jt$1.isPushPermissionGranted() || jt$1.isPushBlocked()) ) { const t = () => { - s.ln() + s.Sn() ? r$1.j.info( - "Push token maintenance is disabled, not refreshing token for backend." + "Push token maintenance is disabled, not refreshing token for backend.", ) : s.subscribe(); }, - e = (s, i) => { - i && t(); + e = (i, s) => { + s && t(); }, - n = () => { - const s = this.Jn.v(STORAGE_KEYS.k.xn); + o = () => { + const s = this.u.v(STORAGE_KEYS.k.Bn); (null == s || s) && t(); }, - l = r$1.zt.Ft; - new r$1.xt(l, r$1.j).hr(l.Jt.cu, e, n); + h = r$1.zt.Ft; + new r$1.xt(h, r$1.j).hr(h.Jt.cu, e, o); } }); } changeUser(t, s, e) { - const n = this.Qo.getUserId(); - if (n !== t) { - this.fh.Xh(), - null != n && this.Al(null, !1, null, null, null), - this.Qo.ru(t), - e ? this.gh.setSdkAuthenticationSignature(e) : this.gh.du(); - for (let t = 0; t < s.length; t++) s[t].changeUser(null == n); - null != n && this.Jn.ri(STORAGE_KEYS.k.L), - this.Jn.ri(STORAGE_KEYS.k.ma), + const o = this.ft.getUserId(); + if (o !== t) { + this._e.kl(), + null != o && this.vu(void 0, !1, void 0, void 0, void 0), + this.ft.ru(t), + e ? this.Do.setSdkAuthenticationSignature(e) : this.Do.yh(); + for (let t = 0; t < s.length; t++) s[t].changeUser(null == o); + null != o && this.u.ni(STORAGE_KEYS.k.L), + this.u.ni(STORAGE_KEYS.k.Ca), this.openSession(), r$1.j.info('Changed user to "' + t + '".'); } else { - let s = "Doing nothing."; + let i = "Doing nothing."; e && - this.gh.au() !== e && - (this.gh.setSdkAuthenticationSignature(e), - (s = "Updated SDK authentication signature")), - r$1.j.info(`Current user is already ${t}. ${s}`); + this.Do.jh() !== e && + (this.Do.setSdkAuthenticationSignature(e), + (i = "Updated SDK authentication signature")), + r$1.j.info(`Current user is already ${t}. ${i}`); } } requestImmediateDataFlush(t) { - this.Cl(), this.fh.bo(); - this.Al( - null, - null, - null, - null, + this.wu(), this._e.co(); + this.vu( + void 0, + void 0, + void 0, + void 0, () => { r$1.j.error( - "Failed to flush data, request will be retried automatically." + "Failed to flush data, request will be retried automatically.", ); }, t, - !0 + !0, ); } requestFeedRefresh() { - this.fh.bo(), this.Al(!0); + this._e.co(), this.vu(!0); } - $r(t, s) { - this.fh.bo(), + $r(t, i) { + this._e.co(), r$1.j.info("Requesting explicit trigger refresh."), - this.Al(null, !0, null, t, s); + this.vu(void 0, !0, void 0, t, i); } - Cn(t, i) { - const e = r$1.q.Ll, - n = { a: t, l: i }, - l = s$1.N(e, n); - return l && r$1.j.info(`Logged alias ${t} with label ${i}`), l; + $n(t, i) { + const e = r$1.q.ju, + o = { a: t, l: i }, + h = s$1.N(e, o); + return h && r$1.j.info(`Logged alias ${t} with label ${i}`), h; } - En(i, e, n) { - if (this.Zo.hu(e)) + Gn(i, e, o) { + if (this.wt.hu(e)) return ( r$1.j.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new t() ); - const l = { key: e, value: n }, - h = s$1.N(i, l); - if (h) { - const t = "object" == typeof n ? JSON.stringify(n, null, 2) : n; + const h = { key: e, value: o }, + n = s$1.N(i, h); + if (n) { + const t = "object" == typeof o ? JSON.stringify(o, null, 2) : o; r$1.j.info(`Logged custom attribute: ${e} with value: ${t}`); } - return h; + return n; } - setLastKnownLocation(t, i, e, n, l, h) { - const o = { latitude: i, longitude: e }; - null != n && (o.altitude = n), - null != l && (o.ll_accuracy = l), - null != h && (o.alt_accuracy = h); - const u = s$1.N(r$1.q.Pl, o, t); + setLastKnownLocation(t, i, e, o, h, n) { + const u = { latitude: i, longitude: e }; + null != o && (u.altitude = o), + null != h && (u.ll_accuracy = h), + null != n && (u.alt_accuracy = n); + const l = s$1.N(r$1.q.Su, u, t || void 0); return ( - u && + l && r$1.j.info( - `Set user last known location as ${JSON.stringify(o, null, 2)}` + `Set user last known location as ${JSON.stringify(u, null, 2)}`, ), - u + l ); } - vr(t, s) { - const i = this.fh.bo(); - return new ue(this.Qo.getUserId(), r$1.q.Rl, t, i, { cid: s }); + vr(t, i) { + const s = this._e.co(); + return new be(this.ft.getUserId(), r$1.q.$u, t, s, { cid: i }); } - zn() { + pu() { const t = r$1.zt.Ft; - new r$1.xt(t, r$1.j).setItem(t.Jt.Xa, 1, { - baseUrl: this.Ho, - data: { api_key: this.Ko, device_id: this.Xo.te().id }, - userId: this.Qo.getUserId(), - sdkAuthEnabled: this.gh.Zn() + new r$1.xt(t, r$1.j).setItem(t.Jt.Ja, 1, { + baseUrl: this.baseUrl, + data: { api_key: this.cn, device_id: this.fn.ce().id }, + userId: this.ft.getUserId(), + sdkAuthEnabled: this.Do.wh(), }); } - Fr(t) { - for (const s of t) - if (s.api_key === this.Ko) this.wh.Aa(s.events, s.attributes); + yr(t) { + for (const i of t) + if (i.api_key === this.cn) this.gt.$a(i.events, i.attributes); else { const t = r$1.zt.Ft; - new r$1.xt(t, r$1.j).setItem(t.Jt.yr, r$1.Z.Y(), s); + new r$1.xt(t, r$1.j).setItem(t.Jt.wr, r$1.Z.Y(), i); } } - On(i, e, n) { - if (this.Zo.hu(i)) + Zn(i, e, o) { + if (this.wt.hu(i)) return ( r$1.j.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new t() ); - let l, h; + let h, n; return ( - null === e && null === n - ? ((l = r$1.q.Ml), (h = { key: i })) - : ((l = r$1.q.Nl), (h = { key: i, latitude: e, longitude: n })), - s$1.N(l, h) + null === e && null === o + ? ((h = r$1.q.qu), (n = { key: i })) + : ((h = r$1.q.Au), (n = { key: i, latitude: e, longitude: o })), + s$1.N(h, n) ); } - Gn(t, i) { + au(t, i) { const e = { group_id: t, status: i }; - return s$1.N(r$1.q.Ol, e); + return s$1.N(r$1.q.Cu, e); } } class Kt { - constructor(t, s, i, h, l, e, r, u) { - (this.hl = t || 0), - (this.cl = s || []), - (this.gl = i || []), - (this.fl = h || []), - (this.bl = l), - (null != l && "" !== l) || (this.bl = null), - (this.al = e || null), - (this.ul = r || {}), - (this.mi = u || {}); + constructor( + t = 0, + i = [], + s = [], + h = [], + e = null, + l = null, + r = { enabled: !1 }, + a = { enabled: !1, refresh_rate_limit: void 0 }, + ) { + (this.ol = t), + (this.cl = i), + (this.gl = s), + (this.fl = h), + (this.bl = e), + (this.al = l), + (this.ml = r), + (this.pi = a), + (this.ol = t), + (this.cl = i), + (this.gl = s), + (this.fl = h), + (this.bl = e), + (this.al = l), + (this.ml = r), + (this.pi = a); } ss() { return { - s: "4.8.0", - l: this.hl, + s: "4.9.0", + l: this.ol, e: this.cl, a: this.gl, p: this.fl, m: this.bl, v: this.al, - c: this.ul, - f: this.mi + c: this.ml, + f: this.pi, }; } - static Tn(t) { - let s = t.l; + static Yn(t) { + let i = t.l; return ( - "4.8.0" !== t.s && (s = 0), new Kt(s, t.e, t.a, t.p, t.m, t.v, t.c, t.f) + "4.9.0" !== t.s && (i = 0), new Kt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f) ); } } class Mt { constructor(t) { - (this.Jn = t), + (this.u = t), + (this.u = t), (this.tl = new E()), (this.el = new E()), (this.sl = new E()), - (this.il = null); + (this.il = null), + (this.rl = null); } - rl() { - if (null == this.il) { - const t = this.Jn.v(STORAGE_KEYS.k.ll); - this.il = null != t ? Kt.Tn(t) : new Kt(); + ll() { + if (null == this.rl) { + const t = this.u.v(STORAGE_KEYS.k.hl); + this.rl = null != t ? Kt.Yn(t) : new Kt(); } - return this.il; + return this.rl; } - oi() { - return this.rl().hl; + li() { + return this.ll().ol; } - ol(t) { + ul(t) { if (null != t && null != t.config) { const e = t.config; - if (e.time > this.rl().hl) { + if (e.time > this.ll().ol) { const t = new Kt( e.time, e.events_blacklist, @@ -3121,152 +3289,162 @@ class Mt { e.messaging_session_timeout, e.vapid_public_key, e.content_cards, - e.feature_flags + e.feature_flags, ); let s = !1; - null != t.al && this.jn() !== t.al && (s = !0); + null != t.al && this.En() !== t.al && (s = !0); let r = !1; - null != t.ul.enabled && this.ni() !== t.ul.enabled && (r = !0); + null != t.ml.enabled && this.oi() !== t.ml.enabled && (r = !0); let n = !1; - null != t.mi.enabled && this.bi() !== t.mi.enabled && (n = !0), - (this.il = t), - this.Jn.D(STORAGE_KEYS.k.ll, t.ss()), + null != t.pi.enabled && this.vi() !== t.pi.enabled && (n = !0), + (this.rl = t), + this.u.D(STORAGE_KEYS.k.hl, t.ss()), s && this.tl.Et(), r && this.el.Et(), n && this.sl.Et(); } } } - Un(t) { - let e = this.tl.lt(t); - return this.ml && this.tl.removeSubscription(this.ml), (this.ml = e), e; + Rn(t) { + const e = this.tl.lt(t); + return this.il && this.tl.removeSubscription(this.il), (this.il = e), e; } - $s(t) { + Ps(t) { return this.el.lt(t); } - Ni(t) { + Ci(t) { return this.sl.lt(t); } ge(t) { - return -1 !== this.rl().cl.indexOf(t); + return -1 !== this.ll().cl.indexOf(t); } hu(t) { - return -1 !== this.rl().gl.indexOf(t); + return -1 !== this.ll().gl.indexOf(t); } Dr(t) { - return -1 !== this.rl().fl.indexOf(t); + return -1 !== this.ll().fl.indexOf(t); } dl() { - return this.rl().bl; + return this.ll().bl; } - jn() { - return this.rl().al; + En() { + return this.ll().al; } - ni() { - return this.rl().ul.enabled || !1; + oi() { + return this.ll().ml.enabled || !1; } - _s() { - const t = this.rl().ul.rate_limit; + $s() { + const t = this.ll().ml.rate_limit; return !(!t || null == t.enabled) && t.enabled; } - fi() { - if (!this._s()) return -1; - const t = this.rl().ul.rate_limit; + di() { + if (!this.$s()) return -1; + const t = this.ll().ml.rate_limit; return null == t.capacity ? CONTENT_CARDS_RATE_LIMIT_CAPACITY_DEFAULT : t.capacity <= 0 ? -1 : t.capacity; } - di() { - if (!this._s()) return -1; - const t = this.rl().ul.rate_limit; + mi() { + if (!this.$s()) return -1; + const t = this.ll().ml.rate_limit; return null == t.refill_rate ? CONTENT_CARDS_RATE_LIMIT_REFILL_RATE_DEFAULT : t.refill_rate <= 0 ? -1 : t.refill_rate; } - bi() { - return this.rl().mi.enabled && null == this.Si() - ? (s$1.N(r$1.q.Is, { e: "Missing feature flag refresh_rate_limit." }), !1) - : this.rl().mi.enabled || !1; + vi() { + return this.ll().pi.enabled && null == this.Mi() + ? (s$1.N(r$1.q.qs, { e: "Missing feature flag refresh_rate_limit." }), !1) + : this.ll().pi.enabled || !1; } - Si() { - return this.rl().mi.refresh_rate_limit; + Mi() { + return this.ll().pi.refresh_rate_limit; } } class Dt { - constructor(s, t, e, i) { - (this.Jn = s), - (this.Qo = t), - (this.Zo = e), - (this.jh = 1e3), - (i = parseFloat(i)), - isNaN(i) && (i = 1800), - i < this.jh / 1e3 && + constructor(s, t, i, e) { + (this.u = s), + (this.ft = t), + (this.wt = i), + (this.wl = e), + (this.u = s), + (this.ft = t), + (this.wt = i), + (this.Sl = 1e3), + (null == e || isNaN(e)) && (e = 1800), + e < this.Sl / 1e3 && (r$1.j.info( "Specified session timeout of " + - i + + e + "s is too small, using the minimum session timeout of " + - this.jh / 1e3 + - "s instead." + this.Sl / 1e3 + + "s instead.", ), - (i = this.jh / 1e3)), - (this.xh = i); + (e = this.Sl / 1e3)), + (this.wl = e); } - Gh(s, t) { - return new ue(this.Qo.getUserId(), r$1.q.Fh, s, t.iu, { d: convertMsToSeconds(s - t.Hh) }); + jl(s, t) { + return new be(this.ft.getUserId(), r$1.q.xl, s, t.iu, { d: convertMsToSeconds(s - t.vl) }); } - ba() { - const s = this.Jn.tu(STORAGE_KEYS.eu.Wh); + Pa() { + const s = this.u.tu(STORAGE_KEYS.eu.Dl); return null == s ? null : s.iu; } - kh() { + El() { const s = new Date().valueOf(), - t = this.Zo.dl(), - e = this.Jn.v(STORAGE_KEYS.k.qh); + t = this.wt.dl(), + e = this.u.v(STORAGE_KEYS.k.zl); if (null != e && null == t) return !1; - const n = null == e || s - e > 1e3 * t; - return n && this.Jn.D(STORAGE_KEYS.k.qh, s), n; + let n = !1; + return ( + null == e ? (n = !0) : null != t && (n = s - e > 1e3 * t), + n && this.u.D(STORAGE_KEYS.k.zl, s), + n + ); } - yh(s, t) { - return null == t || (!(s - t.Hh < this.jh) && t.Bh < s); + Cl(s, t) { + return null == t || null == t.Gl || (!(s - t.vl < this.Sl) && t.Gl < s); } - bo() { + co() { const s = new Date().valueOf(), - t = s + 1e3 * this.xh, - e = this.Jn.tu(STORAGE_KEYS.eu.Wh); - if (this.yh(s, e)) { + t = s + 1e3 * this.wl, + e = this.u.tu(STORAGE_KEYS.eu.Dl); + if (this.Cl(s, e)) { let n = "Generating session start event with time " + s; if (null != e) { - let s = e.Jh; - s - e.Hh < this.jh && (s = e.Hh + this.Kh), - this.Jn.Qh(this.Gh(s, e)), + let s = e.Nl; + s - e.vl < this.Sl && (s = e.vl + this.Sl), + this.u.Hl(this.jl(s, e)), (n += " (old session ended " + s + ")"); } (n += ". Will expire " + t.valueOf()), r$1.j.info(n); - const o = new _t(r$1.Z.Y(), t); - this.Jn.Qh(new ue(this.Qo.getUserId(), r$1.q.Vh, s, o.iu)), - this.Jn.uu(STORAGE_KEYS.eu.Wh, o); - return null == this.Jn.v(STORAGE_KEYS.k.qh) && this.Jn.D(STORAGE_KEYS.k.qh, s), o.iu; + const l = new _t(r$1.Z.Y(), t); + this.u.Hl(new be(this.ft.getUserId(), r$1.q.Wl, s, l.iu)), + this.u.uu(STORAGE_KEYS.eu.Dl, l); + return null == this.u.v(STORAGE_KEYS.k.zl) && this.u.D(STORAGE_KEYS.k.zl, s), l.iu; } - return (e.Jh = s), (e.Bh = t), this.Jn.uu(STORAGE_KEYS.eu.Wh, e), e.iu; + if (null != e) return (e.Nl = s), (e.Gl = t), this.u.uu(STORAGE_KEYS.eu.Dl, e), e.iu; } - Xh() { - const s = this.Jn.tu(STORAGE_KEYS.eu.Wh); + kl() { + const s = this.u.tu(STORAGE_KEYS.eu.Dl); null != s && - (this.Jn.Yh(STORAGE_KEYS.eu.Wh), this.Jn.Qh(this.Gh(new Date().valueOf(), s))); + (this.u.ql(STORAGE_KEYS.eu.Dl), this.u.Hl(this.jl(new Date().valueOf(), s))); } } const Bt = { - qo: (e, o) => { + qo: function (e, o = !1) { let t = !1; try { if (localStorage && localStorage.getItem) try { - localStorage.setItem(STORAGE_KEYS.k._a, !0), - localStorage.getItem(STORAGE_KEYS.k._a) && - (localStorage.removeItem(STORAGE_KEYS.k._a), (t = !0)); + localStorage.setItem(STORAGE_KEYS.k.ec, "true"), + localStorage.getItem(STORAGE_KEYS.k.ec) && + (localStorage.removeItem(STORAGE_KEYS.k.ec), (t = !0)); } catch (e) { if ( - ("QuotaExceededError" !== e.name && - "NS_ERROR_DOM_QUOTA_REACHED" !== e.name) || - !(localStorage.length > 0) + !( + e instanceof Error && + ("QuotaExceededError" === e.name || + "NS_ERROR_DOM_QUOTA_REACHED" === e.name) && + localStorage.length > 0 + ) ) throw e; t = !0; @@ -3274,16 +3452,20 @@ const Bt = { } catch (e) { r$1.j.info("Local Storage not supported!"); } - const a = Bt.Oa(), - l = new O.xa(e, a && !o, t); - let c = null; - return (c = t ? new O.Ma(e) : new O.Qa()), new O(l, c); + const a = Bt.oc(), + n = new O.tc(e, a && !o, t); + let c; + return (c = t ? new O.rc(e) : new O.ac()), new O(n, c); + }, + oc: function () { + return ( + navigator.cookieEnabled || + ("cookie" in document && + (document.cookie.length > 0 || + (document.cookie = "test").indexOf.call(document.cookie, "test") > + -1)) + ); }, - Oa: () => - navigator.cookieEnabled || - ("cookie" in document && - (document.cookie.length > 0 || - (document.cookie = "test").indexOf.call(document.cookie, "test") > -1)) }; class ControlMessage { @@ -3298,7 +3480,7 @@ class ControlMessage { } } -function _isInView(t, n, e, s) { +function _isInView(t, n = !1, e = !1, s = !1) { if (null == t) return !1; (n = n || !1), (e = e || !1); const i = t.getBoundingClientRect(); @@ -3307,40 +3489,42 @@ function _isInView(t, n, e, s) { ((i.top >= 0 && i.top <= (window.innerHeight || document.documentElement.clientHeight)) || !n) && - (i.left >= 0 || !s) && - ((i.bottom >= 0 && - i.bottom <= - (window.innerHeight || document.documentElement.clientHeight)) || - !e) && - (i.right <= (window.innerWidth || document.documentElement.clientWidth) || - !s) + (i.left >= 0 || !s) && + ((i.bottom >= 0 && + i.bottom <= + (window.innerHeight || document.documentElement.clientHeight)) || + !e) && + (i.right <= (window.innerWidth || document.documentElement.clientWidth) || + !s) ); } -const DOMUtils = { Ou: null, eo: _isInView }; -const DIRECTIONS = { Je: "up", Ke: "down", W: "left", X: "right" }; +const DOMUtils = { Wu: null, no: _isInView }; +const DIRECTIONS = { Oe: "up", Qe: "down", W: "left", X: "right" }; function supportsPassive() { - if (null == DOMUtils.Ou) { - DOMUtils.Ou = !1; + if (null == DOMUtils.Wu) { + DOMUtils.Wu = !1; try { const t = Object.defineProperty({}, "passive", { get: () => { - DOMUtils.Ou = !0; - } + DOMUtils.Wu = !0; + }, }); - window.addEventListener("testPassive", null, t), - window.removeEventListener("testPassive", null, t); - } catch (t) {} + window.addEventListener("testPassive", () => {}, t), + window.removeEventListener("testPassive", () => {}, t); + } catch (t) { + r$1.j.error(getErrorMessage(t)); + } } - return DOMUtils.Ou; + return DOMUtils.Wu; } function addPassiveEventListener(t, n, e = () => {}) { t.addEventListener(n, e, !!supportsPassive() && { passive: !0 }); } function topIsInView(t) { - return DOMUtils.eo(t, !0, !1, !1); + return DOMUtils.no(t, !0, !1, !1); } function bottomIsInView(t) { - return DOMUtils.eo(t, !1, !0, !1); + return DOMUtils.no(t, !1, !0, !1); } function clickElement(t) { if (t.onclick) { @@ -3351,23 +3535,23 @@ function clickElement(t) { function detectSwipe(t, n, e) { let s = null, i = null; - addPassiveEventListener(t, "touchstart", t => { + addPassiveEventListener(t, "touchstart", (t) => { (s = t.touches[0].clientX), (i = t.touches[0].clientY); }), - addPassiveEventListener(t, "touchmove", o => { + addPassiveEventListener(t, "touchmove", (o) => { if (null == s || null == i) return; const l = s - o.touches[0].clientX, - u = i - o.touches[0].clientY; - Math.abs(l) > Math.abs(u) && Math.abs(l) >= 25 + r = i - o.touches[0].clientY; + Math.abs(l) > Math.abs(r) && Math.abs(l) >= 25 ? (((l > 0 && n === DIRECTIONS.W) || (l < 0 && n === DIRECTIONS.X)) && e(o), (s = null), (i = null)) - : Math.abs(u) >= 25 && - (((u > 0 && - n === DIRECTIONS.Je && + : Math.abs(r) >= 25 && + (((r > 0 && + n === DIRECTIONS.Oe && t.scrollTop === t.scrollHeight - t.offsetHeight) || - (u < 0 && n === DIRECTIONS.Ke && 0 === t.scrollTop)) && + (r < 0 && n === DIRECTIONS.Qe && 0 === t.scrollTop)) && e(o), (s = null), (i = null)); @@ -3386,9 +3570,9 @@ function buildSvg(t, n, e) { ); } -const KeyCodes = { yo: 32, oo: 9, Fo: 13, Ih: 27 }; +const KeyCodes = { Fo: 32, oo: 9, To: 13, _h: 27 }; -const isIFrame = e => null !== e && "IFRAME" === e.tagName; +const isIFrame = (e) => null !== e && "IFRAME" === e.tagName; class InAppMessage { constructor( @@ -3398,29 +3582,29 @@ class InAppMessage { h, e, n, + T, o, r, l, u, - T, a, - m, - c, I, - L, + c, + O, A, - N, - d, + L, _, - O, + m, + N, + R, S, D, M, - R, - b, - p, + C, + d, U, - P + b, + P, ) { (this.message = t), (this.messageAlignment = s), @@ -3428,85 +3612,85 @@ class InAppMessage { (this.extras = h), (this.triggerId = e), (this.clickAction = n), - (this.uri = o), - (this.openTarget = r), - (this.dismissType = l), - (this.duration = u), - (this.icon = T), + (this.uri = T), + (this.openTarget = o), + (this.dismissType = r), + (this.duration = l), + (this.icon = u), (this.imageUrl = a), - (this.imageStyle = m), + (this.imageStyle = I), (this.iconColor = c), - (this.iconBackgroundColor = I), - (this.backgroundColor = L), - (this.textColor = A), - (this.closeButtonColor = N), - (this.animateIn = d), - (this.animateOut = _), - (this.header = O), + (this.iconBackgroundColor = O), + (this.backgroundColor = A), + (this.textColor = L), + (this.closeButtonColor = _), + (this.animateIn = m), + (this.animateOut = N), + (this.header = R), (this.headerAlignment = S), (this.headerTextColor = D), (this.frameColor = M), - (this.buttons = R), - (this.cropType = b), - (this.orientation = p), - (this.htmlId = U), + (this.buttons = C), + (this.cropType = d), + (this.orientation = U), + (this.htmlId = b), (this.css = P), (this.message = t), (this.messageAlignment = s || InAppMessage.TextAlignment.CENTER), - (this.duration = u || 5e3), + (this.duration = l || 5e3), (this.slideFrom = i || InAppMessage.SlideFrom.BOTTOM), (this.extras = h || {}), (this.triggerId = e), (this.clickAction = n || InAppMessage.ClickAction.NONE), - (this.uri = o), - (this.openTarget = r || InAppMessage.OpenTarget.NONE), - (this.dismissType = l || InAppMessage.DismissType.AUTO_DISMISS), - (this.icon = T), + (this.uri = T), + (this.openTarget = o || InAppMessage.OpenTarget.NONE), + (this.dismissType = r || InAppMessage.DismissType.AUTO_DISMISS), + (this.icon = u), (this.imageUrl = a), - (this.imageStyle = m || InAppMessage.ImageStyle.TOP), - (this.iconColor = c || InAppMessage.Ur.Vr), - (this.iconBackgroundColor = I || InAppMessage.Ur.Qr), - (this.backgroundColor = L || InAppMessage.Ur.Vr), - (this.textColor = A || InAppMessage.Ur.th), - (this.closeButtonColor = N || InAppMessage.Ur.sh), - (this.animateIn = d), + (this.imageStyle = I || InAppMessage.ImageStyle.TOP), + (this.iconColor = c || InAppMessage.th.ih), + (this.iconBackgroundColor = O || InAppMessage.th.sh), + (this.backgroundColor = A || InAppMessage.th.ih), + (this.textColor = L || InAppMessage.th.hh), + (this.closeButtonColor = _ || InAppMessage.th.eh), + (this.animateIn = m), null == this.animateIn && (this.animateIn = !0), - (this.animateOut = _), + (this.animateOut = N), null == this.animateOut && (this.animateOut = !0), - (this.header = O), + (this.header = R), (this.headerAlignment = S || InAppMessage.TextAlignment.CENTER), - (this.headerTextColor = D || InAppMessage.Ur.th), - (this.frameColor = M || InAppMessage.Ur.ih), - (this.buttons = R || []), - (this.cropType = b || InAppMessage.CropType.FIT_CENTER), - (this.orientation = p), - (this.htmlId = U), + (this.headerTextColor = D || InAppMessage.th.hh), + (this.frameColor = M || InAppMessage.th.Eh), + (this.buttons = C || []), + (this.cropType = d || InAppMessage.CropType.FIT_CENTER), + (this.orientation = U), + (this.htmlId = b), (this.css = P), (this.isControl = !1), - (this.hh = !1), - (this.eh = !1), - (this.vo = !1), (this.nh = !1), - (this.qe = null), + (this.Th = !1), + (this.do = !1), + (this.oh = !1), + (this.Me = null), (this.ke = null), (this.ht = new E()), - (this.oh = new E()), - (this.Le = InAppMessage.TextAlignment.CENTER); + (this.rh = new E()), + (this.Te = InAppMessage.TextAlignment.CENTER); } subscribeToClickedEvent(t) { return this.ht.lt(t); } subscribeToDismissedEvent(t) { - return this.oh.lt(t); + return this.rh.lt(t); } removeSubscription(t) { - this.ht.removeSubscription(t), this.oh.removeSubscription(t); + this.ht.removeSubscription(t), this.rh.removeSubscription(t); } removeAllSubscriptions() { - this.ht.removeAllSubscriptions(), this.oh.removeAllSubscriptions(); + this.ht.removeAllSubscriptions(), this.rh.removeAllSubscriptions(); } closeMessage() { - this.he(this.qe); + this.ye(this.Me); } xe() { return !0; @@ -3514,43 +3698,43 @@ class InAppMessage { io() { return this.xe(); } - $e() { + Ne() { return null != this.htmlId && this.htmlId.length > 4; } - ye() { - return this.$e() && null != this.css && this.css.length > 0; - } Ae() { - if (this.$e() && this.ye()) return this.htmlId + "-css"; + return this.Ne() && null != this.css && this.css.length > 0; + } + Ce() { + if (this.Ne() && this.Ae()) return this.htmlId + "-css"; } M() { - return !this.eh && ((this.eh = !0), !0); + return !this.Th && ((this.Th = !0), !0); } - Lr() { - return this.eh; + so() { + return this.Th; } p(t) { - return !this.vo && ((this.vo = !0), this.ht.Et(), !0); + return !this.do && ((this.do = !0), this.ht.Et(), !0); } F() { - return !this.nh && ((this.nh = !0), this.oh.Et(), !0); + return !this.oh && ((this.oh = !0), this.rh.Et(), !0); } hide(t) { if (t && t.parentNode) { let s = t.closest(".ab-iam-root"); if ((null == s && (s = t), this.xe() && null != s.parentNode)) { const t = s.parentNode.classList; - t && t.contains(InAppMessage.rh) && t.remove(InAppMessage.rh), - document.body.removeEventListener("touchmove", InAppMessage.lh); + t && t.contains(InAppMessage.lh) && t.remove(InAppMessage.lh), + document.body.removeEventListener("touchmove", InAppMessage.uh); } - s.className = s.className.replace(InAppMessage.uh, InAppMessage.Eh); + s.className = s.className.replace(InAppMessage.ah, InAppMessage.Ih); } return this.animateOut || !1; } - he(t, s) { + ye(t, s) { if (null == t) return; let i; - (this.qe = null), + (this.Me = null), (i = -1 === t.className.indexOf("ab-in-app-message") ? t.getElementsByClassName("ab-in-app-message")[0] @@ -3558,57 +3742,57 @@ class InAppMessage { let h = !1; i && (h = this.hide(i)); const e = document.body; - let n; - null != e && (n = e.scrollTop); - const o = () => { + let E; + null != e && (E = e.scrollTop); + const n = () => { if (t && t.parentNode) { let s = t.closest(".ab-iam-root"); null == s && (s = t), s.parentNode && s.parentNode.removeChild(s); } - const i = this.Ae(); + const i = this.Ce(); if (null != i) { const t = document.getElementById(i); t && t.parentNode && t.parentNode.removeChild(t); } - null != e && "Safari" === V.browser && (e.scrollTop = n), + null != e && "Safari" === V.browser && (e.scrollTop = E), s ? s() : this.F(); }; - h ? setTimeout(o, InAppMessage.Th) : o(), this.ke && this.ke.focus(); + h ? setTimeout(n, InAppMessage.Oh) : n(), this.ke && this.ke.focus(); } - Be() { + Ge() { return document.createTextNode(this.message || ""); } - Ie(t) { + Be(t) { let s = ""; this.message || this.header || !this.xe() || (s = "Modal Image"), t.setAttribute("alt", s); } - static lh(t) { + static uh(t) { if (t.targetTouches && t.targetTouches.length > 1) return; const s = t.target; (s && s.classList && s.classList.contains("ab-message-text") && s.scrollHeight > s.clientHeight) || - (document.querySelector(`.${InAppMessage.rh}`) && t.preventDefault()); + (document.querySelector(`.${InAppMessage.lh}`) && t.preventDefault()); } - ah(t) { + Ah(t) { const s = t.parentNode; this.xe() && null != s && this.orientation !== InAppMessage.Orientation.LANDSCAPE && - (null != s.classList && s.classList.add(InAppMessage.rh), + (null != s.classList && s.classList.add(InAppMessage.lh), document.body.addEventListener( "touchmove", - InAppMessage.lh, - !!supportsPassive() && { passive: !1 } + InAppMessage.uh, + !!supportsPassive() && { passive: !1 }, )), - (t.className += " " + InAppMessage.uh); + (t.className += " " + InAppMessage.ah); } - static mh(t) { + static Lh(t) { if ( - t.keyCode === KeyCodes.Ih && - !e.nn(L.Lh) && + t.keyCode === KeyCodes._h && + !e.nn(L.mh) && document.querySelectorAll(".ab-modal-interactions").length > 0 ) { const t = document.getElementsByClassName("ab-html-message"); @@ -3618,55 +3802,91 @@ class InAppMessage { isIFrame(i) && i.contentWindow && (t = i.contentWindow.document.getElementsByClassName( - "ab-programmatic-close-button" + "ab-programmatic-close-button", )[0]), null != t && (clickElement(t), (s = !0)); } if (!s) { const t = document.querySelectorAll( - ".ab-modal-interactions > .ab-close-button" + ".ab-modal-interactions > .ab-close-button", )[0]; null != t && clickElement(t); } } } - Ah() { - this.hh || - e.nn(L.Lh) || - (document.addEventListener("keydown", InAppMessage.mh, !1), - e.Nh(() => { - document.removeEventListener("keydown", InAppMessage.mh); + Nh() { + this.nh || + e.nn(L.mh) || + (document.addEventListener("keydown", InAppMessage.Lh, !1), + e.Rh(() => { + document.removeEventListener("keydown", InAppMessage.Lh); }), - (this.hh = !0)); + (this.nh = !0)); } -} -(InAppMessage.Ur = { - th: 4281545523, - Vr: 4294967295, - Qr: 4278219733, - dh: 4293914607, - _h: 4283782485, - ih: 3224580915, - sh: 4288387995 + ss(t) { + const s = {}; + return t + ? ((s[InAppMessage.hs.ea] = this.message), + (s[InAppMessage.hs.ra] = this.messageAlignment), + (s[InAppMessage.hs.Sh] = this.slideFrom), + (s[InAppMessage.hs.xs] = this.extras), + (s[InAppMessage.hs.sa] = this.triggerId), + (s[InAppMessage.hs.ta] = this.clickAction), + (s[InAppMessage.hs.URI] = this.uri), + (s[InAppMessage.hs.ia] = this.openTarget), + (s[InAppMessage.hs.oa] = this.dismissType), + (s[InAppMessage.hs.pa] = this.duration), + (s[InAppMessage.hs.ma] = this.icon), + (s[InAppMessage.hs.os] = this.imageUrl), + (s[InAppMessage.hs.na] = this.imageStyle), + (s[InAppMessage.hs.ua] = this.iconColor), + (s[InAppMessage.hs.ca] = this.iconBackgroundColor), + (s[InAppMessage.hs.fa] = this.backgroundColor), + (s[InAppMessage.hs.da] = this.textColor), + (s[InAppMessage.hs.la] = this.closeButtonColor), + (s[InAppMessage.hs.ga] = this.animateIn), + (s[InAppMessage.hs.ja] = this.animateOut), + (s[InAppMessage.hs.xa] = this.header), + (s[InAppMessage.hs.za] = this.headerAlignment), + (s[InAppMessage.hs.ha] = this.headerTextColor), + (s[InAppMessage.hs.va] = this.frameColor), + (s[InAppMessage.hs.wa] = this.buttons), + (s[InAppMessage.hs.ya] = this.cropType), + (s[InAppMessage.hs.Sa] = this.orientation), + (s[InAppMessage.hs.ba] = this.htmlId), + (s[InAppMessage.hs.CSS] = this.css), + (s[InAppMessage.hs.ts] = t), + s) + : s; + } +} +(InAppMessage.th = { + hh: 4281545523, + ih: 4294967295, + sh: 4278219733, + Dh: 4293914607, + Mh: 4283782485, + Eh: 3224580915, + eh: 4288387995, }), - (InAppMessage.Me = { - Oh: "hd", - ze: "ias", - Sh: "of", - Dh: "do", - Gr: "umt", - Yi: "tf", - Mh: "te" + (InAppMessage.Ie = { + Ch: "hd", + Le: "ias", + dh: "of", + Uh: "do", + Xr: "umt", + Qr: "tf", + bh: "te", }), (InAppMessage.SlideFrom = { TOP: "TOP", BOTTOM: "BOTTOM" }), (InAppMessage.ClickAction = { NEWS_FEED: "NEWS_FEED", URI: "URI", - NONE: "NONE" + NONE: "NONE", }), (InAppMessage.DismissType = { AUTO_DISMISS: "AUTO_DISMISS", - MANUAL: "SWIPE" + MANUAL: "SWIPE", }), (InAppMessage.OpenTarget = { NONE: "NONE", BLANK: "BLANK" }), (InAppMessage.ImageStyle = { TOP: "TOP", GRAPHIC: "GRAPHIC" }), @@ -3674,40 +3894,73 @@ class InAppMessage { (InAppMessage.TextAlignment = { START: "START", CENTER: "CENTER", - END: "END" + END: "END", }), (InAppMessage.CropType = { CENTER_CROP: "CENTER_CROP", - FIT_CENTER: "FIT_CENTER" + FIT_CENTER: "FIT_CENTER", }), - (InAppMessage.Ee = { - Rh: "SLIDEUP", - bh: "MODAL", - Ne: "MODAL_STYLED", - so: "FULL", - do: "WEB_HTML", - Pe: "HTML", - ph: "HTML_FULL" + (InAppMessage.qe = { + pn: "SLIDEUP", + un: "MODAL", + Se: "MODAL_STYLED", + on: "FULL", + ln: "WEB_HTML", + Ee: "HTML", + Ue: "HTML_FULL", }), - (InAppMessage.Th = 500), - (InAppMessage.Uh = 200), - (InAppMessage.uh = "ab-show"), - (InAppMessage.Eh = "ab-hide"), - (InAppMessage.rh = "ab-pause-scrolling"); + (InAppMessage.Oh = 500), + (InAppMessage.Ph = 200), + (InAppMessage.ah = "ab-show"), + (InAppMessage.Ih = "ab-hide"), + (InAppMessage.lh = "ab-pause-scrolling"), + (InAppMessage.hs = { + ea: "m", + ra: "ma", + Sh: "sf", + xs: "e", + sa: "ti", + ta: "ca", + URI: "u", + ia: "oa", + oa: "dt", + pa: "d", + ma: "i", + os: "iu", + na: "is", + ua: "ic", + ca: "ibc", + fa: "bc", + da: "tc", + la: "cbc", + ga: "ai", + ja: "ao", + xa: "h", + za: "ha", + ha: "htc", + va: "fc", + wa: "b", + ya: "ct", + Sa: "o", + ba: "hi", + CSS: "css", + ts: "type", + vo: "messageFields", + }); class HtmlMessage extends InAppMessage { - constructor(i, o, d, v, s, t, e, r, u, h, n) { + constructor(i, o, e, r, d, t, s, v, n, u, a) { super( i, void 0, void 0, o, - d, + e, void 0, void 0, void 0, - (v = v || InAppMessage.DismissType.MANUAL), - s, + (r = r || InAppMessage.DismissType.MANUAL), + d, void 0, void 0, void 0, @@ -3717,32 +3970,51 @@ class HtmlMessage extends InAppMessage { void 0, void 0, t, - e, + s, void 0, void 0, void 0, - r, + v, void 0, void 0, void 0, + n, u, - h ), - (this.messageFields = n), - (this.messageFields = n); + (this.messageFields = a), + (this.messageFields = a); } io() { return !1; } p(i) { - if (this.Ce === InAppMessage.Ee.do) { - if (this.vo) return !1; - this.vo = !0; + if (this.Pe === InAppMessage.qe.ln) { + if (this.do) return !1; + this.do = !0; } return this.ht.Et(i), !0; } + ss() { + const i = super.ss(HtmlMessage.es); + return (i[InAppMessage.hs.vo] = this.messageFields), i; + } + static an(i) { + return new HtmlMessage( + i[InAppMessage.hs.ea], + i[InAppMessage.hs.xs], + i[InAppMessage.hs.sa], + i[InAppMessage.hs.oa], + i[InAppMessage.hs.pa], + i[InAppMessage.hs.ga], + i[InAppMessage.hs.ja], + i[InAppMessage.hs.va], + i[InAppMessage.hs.ba], + i[InAppMessage.hs.CSS], + i[InAppMessage.hs.vo], + ); + } } -HtmlMessage.es = InAppMessage.Ee.do; +HtmlMessage.es = InAppMessage.qe.ln; class InAppMessageButton { constructor(s, t, i, r, h, e, n) { @@ -3754,14 +4026,14 @@ class InAppMessageButton { (this.uri = e), (this.id = n), (this.text = s || ""), - (this.backgroundColor = t || InAppMessage.Ur.Qr), - (this.textColor = i || InAppMessage.Ur.Vr), + (this.backgroundColor = t || InAppMessage.th.sh), + (this.textColor = i || InAppMessage.th.ih), (this.borderColor = r || this.backgroundColor), (this.clickAction = h || InAppMessage.ClickAction.NONE), (this.uri = e), - null == n && (n = InAppMessageButton.Pi), + null == n && (n = InAppMessageButton.Yi), (this.id = n), - (this.vo = !1), + (this.do = !1), (this.ht = new E()); } subscribeToClickedEvent(s) { @@ -3774,7 +4046,7 @@ class InAppMessageButton { this.ht.removeAllSubscriptions(); } p() { - return !this.vo && ((this.vo = !0), this.ht.Et(), !0); + return !this.do && ((this.do = !0), this.ht.Et(), !0); } static fromJson(s) { return new InAppMessageButton( @@ -3784,171 +4056,240 @@ class InAppMessageButton { s.border_color, s.click_action, s.uri, - s.id + s.id, ); } } -InAppMessageButton.Pi = -1; +InAppMessageButton.Yi = -1; class FullScreenMessage extends InAppMessage { constructor( - s, e, + r, + s, t, + i, + a, o, - r, p, - a, - i, - c, - d, m, n, u, + c, f, + d, l, - x, g, - h, j, + x, + z, + h, v, + w, + y, + S, b, k, q, - w, - y, - z, A, - B ) { - (i = i || InAppMessage.DismissType.MANUAL), - (z = z || InAppMessage.Orientation.PORTRAIT), + (p = p || InAppMessage.DismissType.MANUAL), + (k = k || InAppMessage.Orientation.PORTRAIT), super( - s, e, + r, void 0, + s, t, + i, + a, o, - r, p, - a, - i, - c, - d, m, n, u, + c, f, + d, l, - x, g, - h, j, + x, + z, + h, v, - b, + w, + y, + S, + (b = b || InAppMessage.CropType.CENTER_CROP), k, q, - w, - (y = y || InAppMessage.CropType.CENTER_CROP), - z, A, - B ), - (this.Le = InAppMessage.TextAlignment.CENTER); + (this.Te = InAppMessage.TextAlignment.CENTER); + } + ss() { + return super.ss(FullScreenMessage.es); + } + static an(e) { + return new FullScreenMessage( + e[InAppMessage.hs.ea], + e[InAppMessage.hs.ra], + e[InAppMessage.hs.xs], + e[InAppMessage.hs.sa], + e[InAppMessage.hs.ta], + e[InAppMessage.hs.URI], + e[InAppMessage.hs.ia], + e[InAppMessage.hs.oa], + e[InAppMessage.hs.pa], + e[InAppMessage.hs.ma], + e[InAppMessage.hs.os], + e[InAppMessage.hs.na], + e[InAppMessage.hs.ua], + e[InAppMessage.hs.ca], + e[InAppMessage.hs.fa], + e[InAppMessage.hs.da], + e[InAppMessage.hs.la], + e[InAppMessage.hs.ga], + e[InAppMessage.hs.ja], + e[InAppMessage.hs.xa], + e[InAppMessage.hs.za], + e[InAppMessage.hs.ha], + e[InAppMessage.hs.va], + buttonsFromSerializedInAppMessage(e[InAppMessage.hs.wa]), + e[InAppMessage.hs.ya], + e[InAppMessage.hs.Sa], + e[InAppMessage.hs.ba], + e[InAppMessage.hs.CSS], + ); } } -FullScreenMessage.es = InAppMessage.Ee.so; +FullScreenMessage.es = InAppMessage.qe.on; class ModalMessage extends InAppMessage { constructor( - s, e, - o, - t, r, + s, + t, i, - p, + o, a, - d, - c, + p, m, n, u, + c, + d, f, l, + g, + j, v, x, - g, + z, h, - j, + w, + y, + S, b, k, q, - w, - y, - z, - A ) { super( - s, e, + r, void 0, - o, + s, t, - r, i, - p, - (a = a || InAppMessage.DismissType.MANUAL), - d, - c, + o, + a, + (p = p || InAppMessage.DismissType.MANUAL), m, n, u, + c, + d, f, l, + g, + j, v, x, - g, + z, h, - j, - b, - k, - q, w, - (y = y || InAppMessage.CropType.FIT_CENTER), + y, + S, + (b = b || InAppMessage.CropType.FIT_CENTER), void 0, - z, - A + k, + q, ), - (this.Le = InAppMessage.TextAlignment.CENTER); + (this.Te = InAppMessage.TextAlignment.CENTER); + } + ss() { + return super.ss(ModalMessage.es); + } + static an(e) { + return new ModalMessage( + e[InAppMessage.hs.ea], + e[InAppMessage.hs.ra], + e[InAppMessage.hs.xs], + e[InAppMessage.hs.sa], + e[InAppMessage.hs.ta], + e[InAppMessage.hs.URI], + e[InAppMessage.hs.ia], + e[InAppMessage.hs.oa], + e[InAppMessage.hs.pa], + e[InAppMessage.hs.ma], + e[InAppMessage.hs.os], + e[InAppMessage.hs.na], + e[InAppMessage.hs.ua], + e[InAppMessage.hs.ca], + e[InAppMessage.hs.fa], + e[InAppMessage.hs.da], + e[InAppMessage.hs.la], + e[InAppMessage.hs.ga], + e[InAppMessage.hs.ja], + e[InAppMessage.hs.xa], + e[InAppMessage.hs.za], + e[InAppMessage.hs.ha], + e[InAppMessage.hs.va], + buttonsFromSerializedInAppMessage(e[InAppMessage.hs.wa]), + e[InAppMessage.hs.ya], + e[InAppMessage.hs.ba], + e[InAppMessage.hs.CSS], + ); } } -ModalMessage.es = InAppMessage.Ee.bh; +ModalMessage.es = InAppMessage.qe.un; class SlideUpMessage extends InAppMessage { - constructor(o, s, t, e, i, d, n, r, a, p, u, m, c, v, l, x, h, f, g, I, M) { - (x = x || InAppMessage.Ur._h), - (l = l || InAppMessage.Ur.dh), + constructor(e, t, s, o, i, r, n, d, a, u, p, m, c, l, v, x, f, h, g, I, M) { + (x = x || InAppMessage.th.Mh), + (v = v || InAppMessage.th.Dh), super( - o, - (s = s || InAppMessage.TextAlignment.START), - t, e, + (t = t || InAppMessage.TextAlignment.START), + s, + o, i, - d, - n, r, + n, + d, a, - p, u, + p, m, void 0, c, - v, l, + v, x, - h, f, + h, g, void 0, void 0, @@ -3958,27 +4299,55 @@ class SlideUpMessage extends InAppMessage { void 0, void 0, I, - M + M, ), - (this.Le = InAppMessage.TextAlignment.START); + (this.Te = InAppMessage.TextAlignment.START); } xe() { return !1; } - Be() { - const o = document.createElement("span"); - return o.appendChild(document.createTextNode(this.message || "")), o; + Ge() { + const e = document.createElement("span"); + return e.appendChild(document.createTextNode(this.message || "")), e; } - ah(o) { - const s = o.getElementsByClassName("ab-in-app-message")[0]; - DOMUtils.eo(s, !0, !0) || + Ah(e) { + const t = e.getElementsByClassName("ab-in-app-message")[0]; + DOMUtils.no(t, !0, !0) || (this.slideFrom === InAppMessage.SlideFrom.TOP - ? (s.style.top = "0px") - : (s.style.bottom = "0px")), - super.ah(o); + ? (t.style.top = "0px") + : (t.style.bottom = "0px")), + super.Ah(e); + } + ss() { + return super.ss(SlideUpMessage.es); + } + static an(e) { + return new SlideUpMessage( + e[InAppMessage.hs.ea], + e[InAppMessage.hs.ra], + e[InAppMessage.hs.Sh], + e[InAppMessage.hs.xs], + e[InAppMessage.hs.sa], + e[InAppMessage.hs.ta], + e[InAppMessage.hs.URI], + e[InAppMessage.hs.ia], + e[InAppMessage.hs.oa], + e[InAppMessage.hs.pa], + e[InAppMessage.hs.ma], + e[InAppMessage.hs.os], + e[InAppMessage.hs.ua], + e[InAppMessage.hs.ca], + e[InAppMessage.hs.fa], + e[InAppMessage.hs.da], + e[InAppMessage.hs.la], + e[InAppMessage.hs.ga], + e[InAppMessage.hs.ja], + e[InAppMessage.hs.ba], + e[InAppMessage.hs.CSS], + ); } } -SlideUpMessage.es = InAppMessage.Ee.Rh; +SlideUpMessage.es = InAppMessage.qe.pn; function newInAppMessageFromJson(e) { if (!e) return null; @@ -3986,249 +4355,273 @@ function newInAppMessageFromJson(e) { let s = e.type; null != s && (s = s.toUpperCase()); const o = e.message, - m = e.text_align_message, - l = e.slide_from, - n = e.extras, - t = e.trigger_id, + n = e.text_align_message, + m = e.slide_from, + t = e.extras, + l = e.trigger_id, i = e.click_action, f = e.uri, p = e.open_target, a = e.message_close, - d = e.duration, - u = e.icon, + u = e.duration, + d = e.icon, g = e.image_url, - j = e.image_style, - w = e.icon_color, - c = e.icon_bg_color, + c = e.image_style, + j = e.icon_color, + w = e.icon_bg_color, b = e.bg_color, h = e.text_color, v = e.close_btn_color, I = e.header, - k = e.text_align_header, - x = e.header_text_color, - y = e.frame_color, - z = []; - let A = e.btns; - null == A && (A = []); - for (let e = 0; e < A.length; e++) z.push(InAppMessageButton.fromJson(A[e])); - const F = e.crop_type, - J = e.orientation, - M = e.animate_in, - q = e.animate_out; - let B, - C = e.html_id, - D = e.css; + x = e.text_align_header, + z = e.header_text_color, + A = e.frame_color, + F = []; + let M = e.btns; + null == M && (M = []); + for (let e = 0; e < M.length; e++) F.push(InAppMessageButton.fromJson(M[e])); + const k = e.crop_type, + y = e.orientation, + J = e.animate_in, + S = e.animate_out; + let q, + B = e.html_id, + C = e.css; if ( - ((null != C && "" !== C && null != D && "" !== D) || - ((C = void 0), (D = void 0)), - s === ModalMessage.es || s === InAppMessage.Ee.Ne) + ((null != B && "" !== B && null != C && "" !== C) || + ((B = void 0), (C = void 0)), + s === ModalMessage.es || s === InAppMessage.qe.Se) ) - B = new ModalMessage( + q = new ModalMessage( o, - m, n, t, + l, i, f, p, a, - d, u, + d, g, + c, j, w, - c, b, h, v, - M, - q, + J, + S, I, - k, x, - y, z, + A, F, + k, + B, C, - D ); else if (s === FullScreenMessage.es) - B = new FullScreenMessage( + q = new FullScreenMessage( o, - m, n, t, + l, i, f, p, a, - d, u, + d, g, + c, j, w, - c, b, h, v, - M, - q, + J, + S, I, - k, x, - y, z, + A, F, - J, + k, + y, + B, C, - D ); else if (s === SlideUpMessage.es) - B = new SlideUpMessage( + q = new SlideUpMessage( o, - m, - l, n, + m, t, + l, i, f, p, a, - d, u, + d, g, + j, w, - c, b, h, v, - M, - q, + J, + S, + B, C, - D ); else { - if (s !== HtmlMessage.es && s !== InAppMessage.Ee.Pe) + if ( + s !== HtmlMessage.es && + s !== InAppMessage.qe.Ee && + s !== InAppMessage.qe.Ue + ) return void r$1.j.error("Ignoring message with unknown type " + s); { const s = e.message_fields; - (B = new HtmlMessage(o, n, t, a, d, M, q, y, C, D, s)), - (B.trusted = e.trusted || !1); - } - } - return (B.Ce = s), B; + (q = new HtmlMessage(o, t, l, a, u, J, S, A, B, C, s)), + (q.trusted = e.trusted || !1); + } + } + return (q.Pe = s), q; +} +function buttonsFromSerializedInAppMessage(e) { + const s = []; + for (const o of e) + s.push( + new InAppMessageButton( + o.text, + o.backgroundColor, + o.textColor, + o.borderColor, + o.clickAction, + o.uri, + o.id, + ), + ); + return s; } -class Gt { +class Qt { constructor(t) { - this.xl = t; + (this.yl = t), (this.yl = t); } Bl(t) { - return null == this.xl || this.xl === t[0]; + return null == this.yl || this.yl === t[0]; } static fromJson(t) { - return new Gt(t ? t.event_name : null); + return new Qt(t ? t.event_name : null); } ss() { - return this.xl; + return this.yl; } } -class Zt { +class sr { constructor(t, s, e, i) { - (this.El = t), - (this.Hl = s), + (this.Tl = t), + (this.Al = s), + (this.comparator = e), + (this._l = i), + (this.Tl = t), + (this.Al = s), (this.comparator = e), - (this.Il = i), - this.Hl === Zt.Ql.Ul && - this.comparator !== Zt.Gl.Xl && - this.comparator !== Zt.Gl.Vl && - this.comparator !== Zt.Gl.Kl && - this.comparator !== Zt.Gl.Wl && - (this.Il = dateFromUnixTimestamp(this.Il)); + (this._l = i), + this.Al === sr.Rl.Ml && + this.comparator !== sr.Il.Ll && + this.comparator !== sr.Il.Ol && + this.comparator !== sr.Il.Ul && + this.comparator !== sr.Il.Ql && + (this._l = dateFromUnixTimestamp(this._l)); } Bl(t) { let s = null; - switch ((null != t && (s = t[this.El]), this.comparator)) { - case Zt.Gl.Yl: - return null != s && s.valueOf() === this.Il.valueOf(); - case Zt.Gl.Zl: - return null == s || s.valueOf() !== this.Il.valueOf(); - case Zt.Gl.Zh: - return typeof s == typeof this.Il && s > this.Il; - case Zt.Gl.Xl: - return this.Hl === Zt.Ql.Ul - ? null != s && isDate(s) && secondsAgo(s) <= this.Il - : typeof s == typeof this.Il && s >= this.Il; - case Zt.Gl.$h: - return typeof s == typeof this.Il && s < this.Il; - case Zt.Gl.Vl: - return this.Hl === Zt.Ql.Ul - ? null != s && isDate(s) && secondsAgo(s) >= this.Il - : typeof s == typeof this.Il && s <= this.Il; - case Zt.Gl.Eu: + switch ((null != t && (s = t[this.Tl]), this.comparator)) { + case sr.Il.Xl: + return null != s && s.valueOf() === this._l.valueOf(); + case sr.Il.Fl: + return null == s || s.valueOf() !== this._l.valueOf(); + case sr.Il.Kl: + return null != s && typeof s == typeof this._l && s > this._l; + case sr.Il.Ll: + return this.Al === sr.Rl.Ml + ? null != s && isDate(s) && secondsAgo(s) <= this._l.valueOf() + : null != s && typeof s == typeof this._l && s >= this._l; + case sr.Il.Pl: + return null != s && typeof s == typeof this._l && s < this._l; + case sr.Il.Ol: + return this.Al === sr.Rl.Ml + ? null != s && isDate(s) && secondsAgo(s) >= this._l.valueOf() + : null != s && typeof s == typeof this._l && s <= this._l; + case sr.Il.Yl: return ( null != s && "string" == typeof s && - typeof s == typeof this.Il && - null != s.match(this.Il) + typeof s == typeof this._l && + null != s.match(this._l) ); - case Zt.Gl.Tu: + case sr.Il.Zl: return null != s; - case Zt.Gl._u: + case sr.Il.$l: return null == s; - case Zt.Gl.Kl: - return null != s && isDate(s) && secondsInTheFuture(s) < this.Il; - case Zt.Gl.Wl: - return null != s && isDate(s) && secondsInTheFuture(s) > this.Il; - case Zt.Gl.yu: + case sr.Il.Ul: + return null != s && isDate(s) && secondsInTheFuture(s) < this._l; + case sr.Il.Ql: + return null != s && isDate(s) && secondsInTheFuture(s) > this._l; + case sr.Il.Eu: return ( null == s || - typeof s != typeof this.Il || + typeof s != typeof this._l || "string" != typeof s || - null == s.match(this.Il) + null == s.match(this._l) ); } return !1; } static fromJson(t) { - return new Zt( + return new sr( t.property_key, t.property_type, t.comparator, - t.property_value + t.property_value, ); } ss() { - let t = this.Il; + let t = this._l; return ( - isDate(this.Il) && (t = convertMsToSeconds(t.valueOf())), - { k: this.El, t: this.Hl, c: this.comparator, v: t } + isDate(this._l) && (t = convertMsToSeconds(t.valueOf())), + { k: this.Tl, t: this.Al, c: this.comparator, v: t } ); } - static Tn(t) { - return new Zt(t.k, t.t, t.c, t.v); - } -} -(Zt.Gl = { - Yl: 1, - Zl: 2, - Zh: 3, - Xl: 4, - $h: 5, - Vl: 6, - Eu: 10, - Tu: 11, - _u: 12, - Kl: 15, - Wl: 16, - yu: 17 -}), - (Zt.Ql = { Nu: "boolean", Mu: "number", Ru: "string", Ul: "date" }); + static Yn(t) { + return new sr(t.k, t.t, t.c, t.v); + } +} +(sr.Rl = { Tu: "boolean", _u: "number", Nu: "string", Ml: "date" }), + (sr.Il = { + Xl: 1, + Fl: 2, + Kl: 3, + Ll: 4, + Pl: 5, + Ol: 6, + Yl: 10, + Zl: 11, + $l: 12, + Ul: 15, + Ql: 16, + Eu: 17, + }); -class Qt { +class Yt { constructor(t) { - this.filters = t; + (this.filters = t), (this.filters = t); } Bl(t) { let r = !0; @@ -4253,10 +4646,10 @@ class Qt { for (let e = 0; e < t.length; e++) { const o = [], s = t[e]; - for (let t = 0; t < s.length; t++) o.push(Zt.fromJson(s[t])); + for (let t = 0; t < s.length; t++) o.push(sr.fromJson(s[t])); r.push(o); } - return new Qt(r); + return new Yt(r); } ss() { const t = []; @@ -4268,51 +4661,51 @@ class Qt { } return t; } - static Tn(t) { + static Yn(t) { const r = []; for (let e = 0; e < t.length; e++) { const o = [], s = t[e]; - for (let t = 0; t < s.length; t++) o.push(Zt.Tn(s[t])); + for (let t = 0; t < s.length; t++) o.push(sr.Yn(s[t])); r.push(o); } - return new Qt(r); + return new Yt(r); } } -class Yt { +class Zt { constructor(t, s) { - (this.xl = t), (this.Jl = s); + (this.yl = t), (this.Jl = s), (this.yl = t), (this.Jl = s); } Bl(t) { - if (null == this.xl || null == this.Jl) return !1; + if (null == this.yl || null == this.Jl) return !1; const s = t[0], - r = t[1]; - return s === this.xl && this.Jl.Bl(r); + i = t[1]; + return s === this.yl && this.Jl.Bl(i); } static fromJson(t) { - return new Yt( + return new Zt( t ? t.event_name : null, - t ? Qt.fromJson(t.property_filters) : null + t ? Yt.fromJson(t.property_filters) : null, ); } ss() { - return { e: this.xl, pf: this.Jl.ss() }; + return { e: this.yl, pf: this.Jl ? this.Jl.ss() : null }; } } class si { constructor(t, i) { - (this.ju = t), (this.ku = i); + (this.xu = t), (this.zu = i), (this.xu = t), (this.zu = i); } Bl(t) { - if (null == this.ju) return !1; - const i = ri.wu(t[0], this.ju); + if (null == this.xu) return !1; + const i = ri.Bu(t[0], this.xu); if (!i) return !1; - let r = null == this.ku || 0 === this.ku.length; - if (null != this.ku) - for (let i = 0; i < this.ku.length; i++) - if (this.ku[i] === t[1]) { + let r = null == this.zu || 0 === this.zu.length; + if (null != this.zu) + for (let i = 0; i < this.zu.length; i++) + if (this.zu[i] === t[1]) { r = !0; break; } @@ -4322,19 +4715,19 @@ class si { return new si(t ? t.id : null, t ? t.buttons : null); } ss() { - return this.ju; + return this.xu; } } -class sr { +class rs { constructor(t) { - this.productId = t; + (this.productId = t), (this.productId = t); } Bl(t) { return null == this.productId || t[0] === this.productId; } static fromJson(t) { - return new sr(t ? t.product_id : null); + return new rs(t ? t.product_id : null); } ss() { return this.productId; @@ -4343,7 +4736,7 @@ class sr { class is { constructor(t, s) { - (this.productId = t), (this.Jl = s); + (this.productId = t), (this.Jl = s), (this.productId = t), (this.Jl = s); } Bl(t) { if (null == this.productId || null == this.Jl) return !1; @@ -4354,26 +4747,26 @@ class is { static fromJson(t) { return new is( t ? t.product_id : null, - t ? Qt.fromJson(t.property_filters) : null + t ? Yt.fromJson(t.property_filters) : null, ); } ss() { - return { id: this.productId, pf: this.Jl.ss() }; + return { id: this.productId, pf: this.Jl ? this.Jl.ss() : null }; } } class lr { constructor(t) { - this.ju = t; + (this.xu = t), (this.xu = t); } Bl(t) { - return null == this.ju || ri.wu(t[0], this.ju); + return null == this.xu || ri.Bu(t[0], this.xu); } static fromJson(t) { return new lr(t ? t.campaign_id : null); } ss() { - return this.ju; + return this.xu; } } @@ -4381,150 +4774,156 @@ var tt = { OPEN: "open", Rr: "purchase", zr: "push_click", - be: "custom_event", - Kr: "iam_click", - ks: "test" + $e: "custom_event", + ro: "iam_click", + zs: "test", }; class ri { constructor(e, t) { - (this.type = e), (this.data = t); + (this.type = e), (this.data = t), (this.type = e), (this.data = t); } - ec(e, t) { - return ri.tc[this.type] === e && (null == this.data || this.data.Bl(t)); + sc(e, t) { + return ri.cc[this.type] === e && (null == this.data || this.data.Bl(t)); } - static wu(e, t) { - let a = null; + static Bu(e, t) { + let s = null; try { - a = window.atob(e); + s = window.atob(e); } catch (t) { return ( - r$1.j.info("Failed to unencode analytics id " + e + ": " + t.message), !1 + r$1.j.info("Failed to unencode analytics id " + e + ": " + getErrorMessage(t)), !1 ); } - return t === a.split("_")[0]; + return t === s.split("_")[0]; } static fromJson(e) { const t = e.type; - let r; + let r = null; switch (t) { - case ri.rc.OPEN: - r = null; + case ri.Wr.OPEN: + case ri.Wr.zs: break; - case ri.rc.Rr: - r = sr.fromJson(e.data); + case ri.Wr.Rr: + r = rs.fromJson(e.data); break; - case ri.rc.ac: + case ri.Wr.nc: r = is.fromJson(e.data); break; - case ri.rc.zr: + case ri.Wr.zr: r = lr.fromJson(e.data); break; - case ri.rc.be: - r = Gt.fromJson(e.data); + case ri.Wr.$e: + r = Qt.fromJson(e.data); break; - case ri.rc.sc: - r = Yt.fromJson(e.data); + case ri.Wr.lc: + r = Zt.fromJson(e.data); break; - case ri.rc.Kr: + case ri.Wr.ro: r = si.fromJson(e.data); - break; - case ri.rc.ks: - r = null; } return new ri(t, r); } ss() { return { t: this.type, d: this.data ? this.data.ss() : null }; } - static Tn(e) { - let t, r; + static Yn(e) { + let t, + r = null; switch (e.t) { - case ri.rc.OPEN: - t = null; - break; - case ri.rc.Rr: - t = new sr(e.d); + case ri.Wr.OPEN: + case ri.Wr.zs: break; - case ri.rc.ac: - (r = e.d || {}), (t = new is(r.id, Qt.Tn(r.pf || []))); + case ri.Wr.Rr: + r = new rs(e.d); break; - case ri.rc.zr: - t = new lr(e.d); + case ri.Wr.nc: + (t = e.d || {}), (r = new is(t.id, Yt.Yn(t.pf || []))); break; - case ri.rc.be: - t = new Gt(e.d); + case ri.Wr.zr: + r = new lr(e.d); break; - case ri.rc.sc: - (r = e.d || {}), (t = new Yt(r.e, Qt.Tn(r.pf || []))); + case ri.Wr.$e: + r = new Qt(e.d); break; - case ri.rc.Kr: - t = new si(e.d); + case ri.Wr.lc: + (t = e.d || {}), (r = new Zt(t.e, Yt.Yn(t.pf || []))); break; - case ri.rc.ks: - t = null; + case ri.Wr.ro: + r = new si(e.d); } - return new ri(e.t, t); + return new ri(e.t, r); } } -(ri.rc = { +(ri.Wr = { OPEN: "open", Rr: "purchase", - ac: "purchase_property", + nc: "purchase_property", zr: "push_click", - be: "custom_event", - sc: "custom_event_property", - Kr: "iam_click", - ks: "test" + $e: "custom_event", + lc: "custom_event_property", + ro: "iam_click", + zs: "test", }), - (ri.tc = {}), - (ri.tc[ri.rc.OPEN] = tt.OPEN), - (ri.tc[ri.rc.Rr] = tt.Rr), - (ri.tc[ri.rc.ac] = tt.Rr), - (ri.tc[ri.rc.zr] = tt.zr), - (ri.tc[ri.rc.be] = tt.be), - (ri.tc[ri.rc.sc] = tt.be), - (ri.tc[ri.rc.Kr] = tt.Kr), - (ri.tc[ri.rc.ks] = tt.ks); + (ri.cc = {}), + (ri.cc[ri.Wr.OPEN] = tt.OPEN), + (ri.cc[ri.Wr.Rr] = tt.Rr), + (ri.cc[ri.Wr.nc] = tt.Rr), + (ri.cc[ri.Wr.zr] = tt.zr), + (ri.cc[ri.Wr.$e] = tt.$e), + (ri.cc[ri.Wr.lc] = tt.$e), + (ri.cc[ri.Wr.ro] = tt.ro), + (ri.cc[ri.Wr.zs] = tt.zs); class mt { - constructor(t, i, s, e, r, l, o, n, h, a, u, d) { + constructor(t, i = [], s, e, r = 0, h, l, o = 0, n = mt.Du, a, u, d) { (this.id = t), - (this.Du = i || []), + (this.Pu = i), + (this.startTime = s), + (this.endTime = e), + (this.priority = r), + (this.type = h), + (this.data = l), + (this.Iu = o), + (this.Mu = n), + (this.sn = a), + (this.Fu = u), + (this.Hu = d), + (this.id = t), + (this.Pu = i || []), void 0 === s && (s = null), (this.startTime = s), void 0 === e && (e = null), (this.endTime = e), (this.priority = r || 0), - (this.type = l), - (this.Pu = n || 0), - null == a && (a = 1e3 * (this.Pu + 30)), - (this.Jr = a), - (this.data = o), - null == h && (h = mt.vu), - (this.zu = h), - (this.Iu = u), - (this.$u = d || null); - } - xu(t) { + (this.type = h), + (this.Iu = o || 0), + null == a && (a = 1e3 * (this.Iu + 30)), + (this.sn = a), + (this.data = l), + null != n && (this.Mu = n), + (this.Fu = u), + (this.Hu = d || null); + } + Ju(t) { return ( - null == this.$u || (this.zu !== mt.vu && t - this.$u >= 1e3 * this.zu) + null == this.Hu || (this.Mu !== mt.Du && t - this.Hu >= 1e3 * this.Mu) ); } - Bu(t) { - this.$u = t; + Lu(t) { + this.Hu = t; } - Cu(t) { - const i = t + 1e3 * this.Pu; + Ru(t) { + const i = t + 1e3 * this.Iu; return Math.max(i - new Date().valueOf(), 0); } - Hu(t) { + Vu(t) { const i = new Date().valueOf() - t, - s = null == t || isNaN(i) || null == this.Jr || i < this.Jr; + s = null == t || isNaN(i) || null == this.sn || i < this.sn; return ( s || r$1.j.info( - `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.Jr}ms.` + `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.sn}ms.`, ), !s ); @@ -4536,270 +4935,77 @@ class mt { s.push(ri.fromJson(t.trigger_condition[i])); const e = dateFromUnixTimestamp(t.start_time), r = dateFromUnixTimestamp(t.end_time), - o = t.priority, - n = t.type, - h = t.delay, + h = t.priority, + o = t.type, + n = t.delay, a = t.re_eligibility, u = t.timeout, d = t.data, m = t.min_seconds_since_last_trigger; return validateValueIsFromEnum( - mt._r, - n, - "Could not construct Trigger from server data", - "Trigger.Types" - ) - ? new mt(i, s, e, r, o, n, d, h, a, u, m) - : null; - } - ss() { - const t = []; - for (let i = 0; i < this.Du.length; i++) t.push(this.Du[i].ss()); - return { - i: this.id, - c: t, - s: this.startTime, - e: this.endTime, - p: this.priority, - t: this.type, - da: this.data, - d: this.Pu, - r: this.zu, - tm: this.Jr, - ss: this.Iu, - ld: this.$u - }; - } - static Tn(t) { - const i = []; - for (let s = 0; s < t.c.length; s++) i.push(ri.Tn(t.c[s])); - return new mt( - t.i, - i, - rehydrateDateAfterJsonization(t.s), - rehydrateDateAfterJsonization(t.e), - t.p, - t.t, - t.da, - t.d, - t.r, - t.tm, - t.ss, - t.ld - ); - } -} -(mt.vu = -1), (mt._r = { Mr: "inapp", Ju: "templated_iam" }); - -class aa { - constructor(t, s, i, r) { - (this.gt = t), - (this._e = s), - (this.u = i), - (this.ft = r), - (this.gt = t), - (this._e = s), - (this.u = i), - (this.ft = r), - (this.Se = new E()), - e.jt(this.Se), - (this.Oe = 1e3), - (this.Re = 6e4), - (this.Qe = null); - } - Ue() { - return this.Se; - } - Ve(t) { - return this.Se.lt(t); - } - We() { - return this.Qe; - } - Xe(t) { - this.Qe = t; - } - Ye(e, i) { - if (!e) return new t(); - if ( - !validateValueIsFromEnum( - InAppMessage.Me, - i, - `${i} is not a valid in-app message display failure`, - "InAppMessage.DisplayFailures" - ) - ) - return new t(); - const n = { trigger_ids: [e], error_code: i }; - return s$1.N(r$1.q.Ze, n); - } - N(e, i, n, o) { - const a = new t(); - let l; - if (e instanceof ControlMessage) l = { trigger_ids: [e.triggerId] }; - else { - if (i === r$1.q.Ii || (e instanceof HtmlMessage && i === r$1.q.Mi)) { - if (!e.p(o)) - return ( - r$1.j.info( - "This in-app message has already received a click. Ignoring analytics event." - ), - a - ); - } else if (i === r$1.q._i) { - if (!e.M()) - return ( - r$1.j.info( - "This in-app message has already received an impression. Ignoring analytics event." - ), - a - ); - } - l = this.Gi(e); - } - return null == l ? a : (null != n && (l.bid = n), s$1.N(i, l)); - } - Oi(e, i) { - const n = new t(); - if (!e.p()) - return ( - r$1.j.info( - "This in-app message button has already received a click. Ignoring analytics event." - ), - n - ); - const o = this.Gi(i); - return null == o - ? n - : e.id === InAppMessageButton.Pi - ? (r$1.j.info( - "This in-app message button does not have a tracking id. Not logging event to Braze servers." - ), - n) - : (null != e.id && (o.bid = e.id), s$1.N(r$1.q.Mi, o)); - } - Hi(t) { - if (!(t instanceof InAppMessage)) return; - const s = t => { - if (!t) return; - const s = getDecodedBrazeAction(t); - return containsUnknownBrazeAction(s) - ? ineligibleBrazeActionURLErrorMessage(INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Ji, "In-App Message") - : containsPushPrimerBrazeAction(s) && !yt$1.Ki() - ? ineligibleBrazeActionURLErrorMessage(INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Li, "In-App Message") - : void 0; - }, - e = t.buttons || []; - let i; - for (const t of e) - if ( - t.clickAction === InAppMessage.ClickAction.URI && - t.uri && - BRAZE_ACTION_URI_REGEX.test(t.uri) && - ((i = s(t.uri)), i) - ) - return i; - return t.clickAction === InAppMessage.ClickAction.URI && - t.uri && - BRAZE_ACTION_URI_REGEX.test(t.uri) - ? s(t.uri) - : void 0; - } - Qi(t, s, e, i) { - if (!this.gt) return; - const n = this.gt.Vi(!1, !1), - o = this.gt.Gs(n); - (o.template = { trigger_id: t.triggerId, trigger_event_type: s }), - null != e && (o.template.data = e.Wi()); - const a = this.gt.Ks(o, T.Qs.Xi); - this.gt.Vs(o, () => { - this.gt && - (T.Xs(this.u, T.Qs.Xi, new Date().valueOf()), - C.Ys({ - url: `${this.gt.Zs()}/template/`, - data: o, - headers: a, - O: s => { - if (!this.gt.ti(o, s, a)) - return ( - this.Ye(t.triggerId, InAppMessage.Me.Yi), - void ("function" == typeof t.Zi && t.Zi()) - ); - if ((this.gt.si(), null == s || null == s.templated_message)) - return void this.Ye(t.triggerId, InAppMessage.Me.Yi); - const e = s.templated_message; - if (e.type !== mt._r.Mr) - return void this.Ye(t.triggerId, InAppMessage.Me.Gr); - const i = newInAppMessageFromJson(e.data); - if (null == i) return void this.Ye(t.triggerId, InAppMessage.Me.Gr); - const n = this.Hi(i); - if (n) - return r$1.j.error(n), void ("function" == typeof t.Zi && t.Zi()); - "function" == typeof t.Or - ? t.Or(i) - : this.Ye(t.triggerId, InAppMessage.Me.Yi); - }, - error: r => { - let n = `getting user personalization for message ${t.triggerId}`; - if (new Date().valueOf() - t.Hr > t.Jr) - this.Ye(t.triggerId, InAppMessage.Me.Yi); - else { - const r = Math.min(t.Jr, this.Re), - o = this.Oe; - null == i && (i = o); - const a = Math.min(r, randomInclusive(o, 3 * i)); - (n += `. Retrying in ${a} ms`), - setTimeout(() => { - this.Qi(t, s, e, a); - }, a); - } - this.gt.ii(r, n); - } - })); - }); + mt.Wr, + o, + "Could not construct Trigger from server data", + "Trigger.Types", + ) + ? new mt(i, s, e, r, h, o, d, n, a, u, m) + : null; } - Gi(t) { - if (null == t.triggerId) - return ( - r$1.j.info( - "The in-app message has no analytics id. Not logging event to Braze servers." - ), - null - ); - const s = {}; - return null != t.triggerId && (s.trigger_ids = [t.triggerId]), s; + ss() { + const t = []; + for (let i = 0; i < this.Pu.length; i++) t.push(this.Pu[i].ss()); + return { + i: this.id, + c: t, + s: this.startTime, + e: this.endTime, + p: this.priority, + t: this.type, + da: this.data, + d: this.Iu, + r: this.Mu, + tm: this.sn, + ss: this.Fu, + ld: this.Hu, + }; } -} - -const ea = { - i: null, - t: !1, - m: () => ( - ea.o(), ea.i || (ea.i = new aa(e.ar(), e.aa(), e.l(), e.ir())), ea.i - ), - o: () => { - ea.t || (e.g(ea), (ea.t = !0)); - }, - destroy: () => { - (ea.i = null), (ea.t = !1); + static Yn(t) { + const i = [], + s = t.c || []; + for (let t = 0; t < s.length; t++) i.push(ri.Yn(s[t])); + return new mt( + t.i, + i, + rehydrateDateAfterJsonization(t.s), + rehydrateDateAfterJsonization(t.e), + t.p, + t.t, + t.da, + t.d, + t.r, + t.tm, + t.ss, + t.ld, + ); } -}; -var ea$1 = ea; +} +(mt.Wr = { Vr: "inapp", Gu: "templated_iam" }), (mt.Du = -1); function attachCSS(n, t, o) { const c = n || document.querySelector("head"), - s = `ab-${t}-css-definitions-${"4.8.0".replace(/\./g, "-")}`, - a = c.ownerDocument || document; + s = `ab-${t}-css-definitions-${"4.9.0".replace(/\./g, "-")}`; + if (!c) return; + const a = c.ownerDocument || document; if (null == a.getElementById(s)) { const n = a.createElement("style"); - (n.innerHTML = o), (n.id = s); - const t = e.nn(L.lo); + (n.innerHTML = o || ""), (n.id = s); + const t = e.nn(L.po); null != t && n.setAttribute("nonce", t), c.appendChild(n); } } function loadFontAwesome() { - if (e.nn(L.Lo)) return; + if (e.nn(L.Po)) return; const t = "https://use.fontawesome.com/7f85a56ba4.css"; if ( !(null !== document.querySelector('link[rel=stylesheet][href="' + t + '"]')) @@ -4815,7 +5021,7 @@ function attachFeedCSS(t) { attachCSS( t, "feed", - "body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}.ab-feed .ab-card.ab-banner .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px;padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}" + "body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}.ab-feed .ab-card.ab-banner .ab-card-body{display:none}.ab-feed .ab-card.ab-image-only .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px;padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}", ); } function setupFeedUI() { @@ -4826,14 +5032,14 @@ function attachInAppMessageCSS(t) { attachCSS( t, "iam", - ".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}" + ".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}", ); } function setupInAppMessageUI() { attachInAppMessageCSS(), loadFontAwesome(); } -function se(e) { +function me(e) { let s = ""; return ( e.animateIn && (s += " ab-animate-in"), @@ -4859,15 +5065,15 @@ function createCloseButton(t, o, e) { const r = buildSvg( "0 0 15 15", "M15 1.5L13.5 0l-6 6-6-6L0 1.5l6 6-6 6L1.5 15l6-6 6 6 1.5-1.5-6-6 6-6z", - o + o, ); return ( n.appendChild(r), - n.addEventListener("keydown", t => { - (t.keyCode !== KeyCodes.yo && t.keyCode !== KeyCodes.Fo) || + n.addEventListener("keydown", (t) => { + (t.keyCode !== KeyCodes.Fo && t.keyCode !== KeyCodes.To) || (e(), t.stopPropagation()); }), - (n.onclick = t => { + (n.onclick = (t) => { e(), t.stopPropagation(); }), n @@ -4875,36 +5081,43 @@ function createCloseButton(t, o, e) { } function isTransparent(r) { - return (r = parseInt(r)), !isNaN(r) && (4278190080 & r) >>> 24 == 0; + return ( + null != r && + ((r = parseInt(r.toString())), !isNaN(r) && (4278190080 & r) >>> 24 == 0) + ); } -function toRgba(r, t) { - if (((r = parseInt(r)), isNaN(r))) return ""; - (t = parseFloat(t)), isNaN(t) && (t = 1); - const n = 255 & (r >>>= 0), - e = (65280 & r) >>> 8, - o = (16711680 & r) >>> 16, - a = ((4278190080 & r) >>> 24) / 255; - return V.Og() - ? "rgba(" + [o, e, n, a * t].join(",") + ")" - : "rgb(" + [o, e, n].join(",") + ")"; +function toRgba(r, n) { + if (null == r) return ""; + if (((r = parseInt(r.toString())), isNaN(r))) return ""; + (n && !isNaN(parseFloat(n.toString()))) || (n = 1); + return ( + "rgba(" + + [ + (16711680 & (r >>>= 0)) >>> 16, + (65280 & r) >>> 8, + 255 & r, + (((4278190080 & r) >>> 24) / 255) * n, + ].join(",") + + ")" + ); } function logInAppMessageImpression(o) { if (!e.rr()) return !1; if (!(o instanceof InAppMessage || o instanceof ControlMessage)) return r$1.j.error(MUST_BE_IN_APP_MESSAGE_WARNING), !1; - const s = o instanceof ControlMessage ? r$1.q.ro : r$1.q._i; - return ea$1.m().N(o, s).O; + const s = o instanceof ControlMessage ? r$1.q.eo : r$1.q.Vi; + return se$1.m().N(o, s).O; } function logInAppMessageClick(o) { if (!e.rr()) return !1; if (!(o instanceof InAppMessage)) return r$1.j.error(MUST_BE_IN_APP_MESSAGE_WARNING), !1; - const s = ea$1.m().N(o, r$1.q.Ii); + const s = se$1.m().N(o, r$1.q.Li); if (s) { - o.Lr() || logInAppMessageImpression(o); + o.so() || logInAppMessageImpression(o); for (let r = 0; r < s.ve.length; r++) - TriggersProviderFactory.er().je(tt.Kr, [o.triggerId], s.ve[r]); + TriggersProviderFactory.er().be(tt.ro, [o.triggerId], s.ve[r]); } return s.O; } @@ -4918,35 +5131,34 @@ function _getOrientation() { return 90 === Math.abs(window.orientation) || 270 === window.orientation ? ORIENTATION.LANDSCAPE : ORIENTATION.PORTRAIT; - if ("screen" in window) { - let n = - window.screen.orientation || - screen.mozOrientation || - screen.msOrientation; + const n = window; + if ("screen" in n) { + let e = + n.screen.orientation || screen.mozOrientation || screen.msOrientation; return ( - null != n && "object" == typeof n && (n = n.type), - "landscape-primary" === n || "landscape-secondary" === n + null != e && "object" == typeof e && (e = e.type), + "landscape-primary" === e || "landscape-secondary" === e ? ORIENTATION.LANDSCAPE : ORIENTATION.PORTRAIT ); } return ORIENTATION.PORTRAIT; } -function _openUri(n, e, r) { - e || (null != r && r.metaKey) ? window.open(n) : (window.location = n); +function _openUri(n, e, t) { + n && (e || (null != t && t.metaKey) ? window.open(n) : (window.location = n)); } function _getCurrentUrl() { return window.location.href; } const WindowUtils = { openUri: _openUri, - no: _isPhone, - ao: _getOrientation, - An: _getCurrentUrl + ao: _isPhone, + mo: _getOrientation, + Cn: _getCurrentUrl, }; function getUser() { - if (e.rr()) return e.jr(); + if (e.rr()) return e.br(); } function _handleBrazeAction(o, s, t) { @@ -4954,20 +5166,20 @@ function _handleBrazeAction(o, s, t) { if (BRAZE_ACTION_URI_REGEX.test(o)) { const s = getDecodedBrazeAction(o); if (!s) return; - const t = o => { + const t = (o) => { if (!isValidBrazeActionJson(o)) return void r$1.j.error( `Decoded Braze Action json is invalid: ${JSON.stringify( o, null, - 2 - )}` + 2, + )}`, ); const s = BRAZE_ACTIONS.properties.type, - i = BRAZE_ACTIONS.properties.ce, - n = BRAZE_ACTIONS.properties.me, + i = BRAZE_ACTIONS.properties.me, + n = BRAZE_ACTIONS.properties.le, a = o[s]; - if (a === BRAZE_ACTIONS.types.le) { + if (a === BRAZE_ACTIONS.types.ue) { const e = o[i]; for (const o of e) t(o); } else { @@ -4977,22 +5189,22 @@ function _handleBrazeAction(o, s, t) { case BRAZE_ACTIONS.types.logCustomEvent: Promise.resolve().then(function () { return logCustomEvent$1; }).then( ({ logCustomEvent: logCustomEvent }) => { - e.ue() + e.fe() ? ((i = Array.prototype.slice.call(s)), logCustomEvent(...i)) : r$1.j.error(BRAZE_MUST_BE_INITIALIZED_ERROR); - } + }, ); break; case BRAZE_ACTIONS.types.requestPushPermission: Promise.resolve().then(function () { return requestPushPermission$1; }).then( ({ requestPushPermission: requestPushPermission }) => { - e.ue() - ? "Safari" === V.browser && V.OS === OperatingSystems.fe + e.fe() + ? "Safari" === V.browser && V.OS === OperatingSystems.de ? window.navigator.standalone && requestPushPermission() : requestPushPermission() : r$1.j.error(BRAZE_MUST_BE_INITIALIZED_ERROR); - } + }, ); break; case BRAZE_ACTIONS.types.setEmailNotificationSubscriptionType: @@ -5006,8 +5218,8 @@ function _handleBrazeAction(o, s, t) { t[a](...Array.prototype.slice.call(s)); } break; - case BRAZE_ACTIONS.types.de: case BRAZE_ACTIONS.types.pe: + case BRAZE_ACTIONS.types.je: (i = Array.prototype.slice.call(s)), WindowUtils.openUri(...i); break; default: @@ -5027,25 +5239,22 @@ function logInAppMessageHtmlClick(s, t, o) { if (!(s instanceof HtmlMessage)) return ( r$1.j.error( - "inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object." + "inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object.", ), !1 ); - let m = r$1.q.Ii; - null != t && (m = r$1.q.Mi); - const i = ea$1.m().N(s, m, t, o); + let m = r$1.q.Li; + null != t && (m = r$1.q.Qi); + const i = se$1.m().N(s, m, t, o); if (i.O) for (let r = 0; r < i.ve.length; r++) - TriggersProviderFactory.er().je(tt.Kr, [s.triggerId, t], i.ve[r]); + TriggersProviderFactory.er().be(tt.ro, [s.triggerId, t], i.ve[r]); return i.O; } function parseQueryStringKeyValues(t) { null == t && (t = ""); - const r = t - .split("?") - .slice(1) - .join("?"), + const r = t.split("?").slice(1).join("?"), n = {}; if (null != r) { const t = r.split("&"); @@ -5068,10 +5277,10 @@ function at(t, o, n, s, i, u) { const c = document.createElement("iframe"); c.setAttribute("title", "Modal Message"), i && (c.style.zIndex = (i + 1).toString()); - const a = e => { + const a = (e) => { const o = e.getAttribute("href"), r = e.onclick; - return n => { + return (n) => { if (null != r && "function" == typeof r && !1 === r.bind(e)(n)) return; let i = parseQueryStringKeyValues(o).abButtonId; if ( @@ -5085,7 +5294,7 @@ function at(t, o, n, s, i, u) { a = () => { logInAppMessageHtmlClick(t, i, o), WindowUtils.openUri(o, u, n); }; - u ? a() : t.he(c, a); + u ? a() : t.ye(c, a); } else logInAppMessageHtmlClick(t, i, o || void 0); return n.stopPropagation(), !1; }; @@ -5096,7 +5305,7 @@ function at(t, o, n, s, i, u) { if (n) { const o = `${n[1]}.setAttribute("nonce", "${e}")`; return `${t.slice(0, n.index + n[0].length)};${o};${t.slice( - n.index + n[0].length + n.index + n[0].length, )}`; } return null; @@ -5113,7 +5322,7 @@ function at(t, o, n, s, i, u) { o[t].setAttribute("nonce", u), (o[t].innerHTML = o[t].innerHTML.replace( /