@braze/web-sdk 5.6.1 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +15 -5
  3. package/package.json +1 -1
  4. package/shared-lib/encoding-utils.js +1 -1
  5. package/shared-lib/event-types.js +23 -23
  6. package/shared-lib/indexed-db-adapter.js +20 -20
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +17 -17
  9. package/src/Banner/banner-provider.js +53 -50
  10. package/src/Banner/banner.js +1 -1
  11. package/src/Banner/get-all-banners.js +3 -4
  12. package/src/Banner/get-banner.js +11 -11
  13. package/src/Banner/log-banner-click.js +1 -1
  14. package/src/Banner/log-banner-impressions.js +4 -4
  15. package/src/Banner/request-banners-refresh.js +21 -13
  16. package/src/Banner/subscribe-to-banners-updates.js +14 -13
  17. package/src/Banner/ui/insert-banner.js +11 -9
  18. package/src/Card/card-manager.js +10 -10
  19. package/src/Card/log-card-impressions.js +2 -2
  20. package/src/Card/models/captioned-image.js +1 -1
  21. package/src/Card/models/card.js +3 -3
  22. package/src/Card/models/classic-card.js +1 -1
  23. package/src/Card/models/control-card.js +1 -1
  24. package/src/Card/models/image-only.js +1 -1
  25. package/src/ContentCards/content-cards-provider-factory.js +1 -1
  26. package/src/ContentCards/content-cards-provider.js +139 -180
  27. package/src/ContentCards/content-cards.js +3 -3
  28. package/src/ContentCards/get-cached-content-cards.js +1 -1
  29. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  30. package/src/ContentCards/subscribe-to-content-cards-updates.js +10 -10
  31. package/src/ContentCards/ui/show-content-cards.js +8 -8
  32. package/src/Core/add-sdk-metadata.js +2 -2
  33. package/src/Core/change-user.js +3 -3
  34. package/src/Core/disable-sdk.js +7 -7
  35. package/src/Core/enable-sdk.js +5 -5
  36. package/src/Core/get-device-id.js +2 -2
  37. package/src/Core/get-user.js +1 -1
  38. package/src/Core/is-disabled.js +1 -1
  39. package/src/Core/log-custom-event.js +3 -3
  40. package/src/Core/log-purchase.js +1 -1
  41. package/src/Core/open-session.js +9 -9
  42. package/src/Core/wipe-data.js +5 -5
  43. package/src/FeatureFlags/feature-flag-factory.js +4 -4
  44. package/src/FeatureFlags/feature-flag.js +18 -18
  45. package/src/FeatureFlags/feature-flags-provider.js +81 -78
  46. package/src/FeatureFlags/get-all-feature-flags.js +6 -7
  47. package/src/FeatureFlags/get-feature-flag.js +5 -6
  48. package/src/FeatureFlags/log-feature-flag-impression.js +4 -4
  49. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
  50. package/src/Feed/feed-provider.js +34 -34
  51. package/src/Feed/feed.js +2 -2
  52. package/src/Feed/get-cached-feed.js +1 -1
  53. package/src/Feed/request-feed-refresh.js +1 -1
  54. package/src/Feed/subscribe-to-feed-updates.js +1 -1
  55. package/src/Feed/ui/show-feed.js +5 -5
  56. package/src/InAppMessage/defer-in-app-message.js +1 -1
  57. package/src/InAppMessage/display/html-message-to-html.js +10 -10
  58. package/src/InAppMessage/display/in-app-message-to-html.js +21 -21
  59. package/src/InAppMessage/display/modal-utils.js +6 -6
  60. package/src/InAppMessage/in-app-message-factory.js +4 -4
  61. package/src/InAppMessage/in-app-message-manager-factory.js +1 -1
  62. package/src/InAppMessage/in-app-message-manager.js +115 -91
  63. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  64. package/src/InAppMessage/log-in-app-message-click.js +3 -3
  65. package/src/InAppMessage/log-in-app-message-html-click.js +4 -4
  66. package/src/InAppMessage/log-in-app-message-impression.js +2 -2
  67. package/src/InAppMessage/models/control-message.js +1 -1
  68. package/src/InAppMessage/models/full-screen-message.js +5 -5
  69. package/src/InAppMessage/models/html-message.js +10 -10
  70. package/src/InAppMessage/models/in-app-message-button.js +5 -5
  71. package/src/InAppMessage/models/in-app-message.js +42 -42
  72. package/src/InAppMessage/models/modal-message.js +5 -5
  73. package/src/InAppMessage/models/slide-up-message.js +8 -8
  74. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  75. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  76. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  77. package/src/InAppMessage/ui/show-in-app-message.js +24 -24
  78. package/src/Push/is-push-blocked.js +2 -2
  79. package/src/Push/is-push-permission-granted.js +2 -2
  80. package/src/Push/is-push-supported.js +2 -2
  81. package/src/Push/push-manager-factory.js +8 -8
  82. package/src/Push/push-manager.js +90 -90
  83. package/src/Push/utils/push-utils.js +12 -12
  84. package/src/User/user-manager.js +12 -12
  85. package/src/User/user.js +48 -36
  86. package/src/common/base-feed.js +3 -3
  87. package/src/common/constants.js +1 -1
  88. package/src/common/event-logger.js +4 -4
  89. package/src/common/feed-display.js +14 -14
  90. package/src/l10n/l10n-manager-factory.js +2 -2
  91. package/src/l10n/l10n-manager.js +1 -1
  92. package/src/managers/auth-manager.js +10 -10
  93. package/src/managers/braze-instance.js +128 -128
  94. package/src/managers/device-manager.js +18 -18
  95. package/src/managers/network-manager.js +184 -147
  96. package/src/managers/server-config-manager.js +63 -63
  97. package/src/managers/session-manager.js +27 -27
  98. package/src/managers/storage-manager-factory.js +10 -10
  99. package/src/managers/storage-manager.js +146 -146
  100. package/src/managers/subscription-manager.js +8 -8
  101. package/src/managers/utils.js +1 -1
  102. package/src/models/backend-errors.js +4 -4
  103. package/src/models/braze-event.js +8 -8
  104. package/src/models/device.js +2 -2
  105. package/src/models/identifier.js +12 -12
  106. package/src/models/push-token.js +8 -8
  107. package/src/models/server-config.js +31 -31
  108. package/src/request-controller.js +163 -151
  109. package/src/triggers/models/custom-event-data.js +5 -5
  110. package/src/triggers/models/custom-event-property-data.js +6 -6
  111. package/src/triggers/models/filter-set.js +8 -8
  112. package/src/triggers/models/filter.js +16 -16
  113. package/src/triggers/models/in-app-message-click-data.js +2 -2
  114. package/src/triggers/models/purchase-data.js +2 -2
  115. package/src/triggers/models/purchase-property-data.js +4 -4
  116. package/src/triggers/models/push-click-data.js +2 -2
  117. package/src/triggers/models/trigger-condition.js +37 -37
  118. package/src/triggers/models/trigger-events.js +2 -2
  119. package/src/triggers/models/trigger.js +11 -11
  120. package/src/triggers/triggers-provider-factory.js +3 -3
  121. package/src/triggers/triggers-provider.js +39 -39
  122. package/src/ui/js/attach-css.js +3 -3
  123. package/src/ui/js/iam-css.js +1 -1
  124. package/src/ui/js/load-font-awesome.js +2 -2
  125. package/src/util/base-device-parser.js +3 -3
  126. package/src/util/braze-actions.js +4 -4
  127. package/src/util/browser-detector.js +6 -6
  128. package/src/util/client-hints-parser.js +1 -1
  129. package/src/util/component-utils.js +2 -2
  130. package/src/util/dom-utils.js +6 -6
  131. package/src/util/html-display-utils.js +1 -0
  132. package/src/util/key-codes.js +1 -1
  133. package/src/util/net.js +22 -23
  134. package/src/util/request-header-utils.js +25 -22
  135. package/src/util/user-agent-parser.js +1 -1
  136. package/src/util/validation-utils.js +17 -17
  137. package/src/util/window-utils.js +2 -2
@@ -1,12 +1,11 @@
1
- import { logger as N } from "../../shared-lib/index.js";
2
1
  import r from "../managers/braze-instance.js";
3
2
  import nr from "./feature-flags-provider-factory.js";
4
3
  export function getAllFeatureFlags() {
5
4
  if (!r.rr()) return;
6
- const e = [],
7
- t = r.v();
8
- if (t && !t.Qi()) return N.info("Feature flags are not enabled."), e;
9
- const n = nr.m().Wi();
10
- for (const r in n) e.push(n[r]);
11
- return e;
5
+ const t = [],
6
+ e = r.v();
7
+ if (e && !e.qe()) return t;
8
+ const n = nr.m().ze();
9
+ for (const r in n) t.push(n[r]);
10
+ return t;
12
11
  }
@@ -1,10 +1,9 @@
1
- import { logger as N } from "../../shared-lib/index.js";
2
1
  import r from "../managers/braze-instance.js";
3
2
  import nr from "./feature-flags-provider-factory.js";
4
- export function getFeatureFlag(e) {
3
+ export function getFeatureFlag(t) {
5
4
  if (!r.rr()) return;
6
- const t = r.v();
7
- if (t && !t.Qi()) return N.info("Feature flags are not enabled."), null;
8
- const n = nr.m().Wi();
9
- return n[e] ? n[e] : null;
5
+ const e = r.v();
6
+ if (e && !e.qe()) return null;
7
+ const n = nr.m().ze();
8
+ return n[t] ? n[t] : null;
10
9
  }
@@ -7,11 +7,11 @@ export function logFeatureFlagImpression(e) {
7
7
  if (!e) return !1;
8
8
  const t =
9
9
  "Not logging a feature flag impression. The feature flag was not part of any matching experiment.",
10
- o = nr.m().Wi();
10
+ o = nr.m().ze();
11
11
  if (!o[e]) return N.info(t), !1;
12
12
  const n = o[e].trackingString;
13
13
  if (!n) return N.info(t), !1;
14
- const i = nr.m().Zi();
14
+ const i = nr.m().ke();
15
15
  if (i[n])
16
16
  return (
17
17
  N.info(
@@ -19,7 +19,7 @@ export function logFeatureFlagImpression(e) {
19
19
  ),
20
20
  !1
21
21
  );
22
- (i[n] = !0), nr.m().je(i);
22
+ (i[n] = !0), nr.m().Me(i);
23
23
  const s = { fid: e, fts: n };
24
- return c.ds(d.yr, s).ss;
24
+ return c.cs(d.yr, s).ss;
25
25
  }
@@ -4,9 +4,9 @@ import { getAllFeatureFlags } from "./get-all-feature-flags.js";
4
4
  export function subscribeToFeatureFlagsUpdates(t) {
5
5
  if (!r.rr()) return;
6
6
  const e = nr.m();
7
- if (e.$e()) {
7
+ if (e.Ke()) {
8
8
  const r = getAllFeatureFlags();
9
9
  r && "function" == typeof t && t(r);
10
10
  }
11
- return e.Fs(t);
11
+ return e.qs(t);
12
12
  }
@@ -2,8 +2,8 @@ import s from "../common/base-provider.js";
2
2
  import r from "../managers/braze-instance.js";
3
3
  import Feed from "./feed.js";
4
4
  import {
5
- newCardFromFeedJson as lt,
6
- newCardFromSerializedValue as tt,
5
+ newCardFromFeedJson as at,
6
+ newCardFromSerializedValue as Z,
7
7
  } from "../Card/util/card-factory.js";
8
8
  import { rehydrateDateAfterJsonization as V } from "../util/date-utils.js";
9
9
  import { STORAGE_KEYS as t } from "../managers/storage-manager.js";
@@ -12,59 +12,59 @@ export default class re extends s {
12
12
  constructor(t, s) {
13
13
  super(),
14
14
  (this.C = t),
15
- (this.Ue = s),
15
+ (this.Bi = s),
16
16
  (this.cards = []),
17
- (this.Ae = null),
17
+ (this.Gi = null),
18
18
  (this.C = t),
19
- (this.Ue = s),
20
- (this.Ms = new u()),
21
- r.N(this.Ms),
22
- this.Xs();
19
+ (this.Bi = s),
20
+ (this.Js = new u()),
21
+ r.N(this.Js),
22
+ this.Ps();
23
23
  }
24
- Xs() {
24
+ Ps() {
25
25
  let s = [];
26
- this.C && (s = this.C.ps(t.bs.Be) || []);
26
+ this.C && (s = this.C.vs(t.gs.Hi) || []);
27
27
  const i = [];
28
28
  for (let t = 0; t < s.length; t++) {
29
- const e = tt(s[t]);
29
+ const e = Z(s[t]);
30
30
  null != e && i.push(e);
31
31
  }
32
- (this.cards = i), this.C && (this.Ae = V(this.C.ps(t.bs.Ge)));
32
+ (this.cards = i), this.C && (this.Gi = V(this.C.vs(t.gs.Ji)));
33
33
  }
34
- He(s) {
34
+ Ki(s) {
35
35
  const i = [];
36
36
  let e = null,
37
37
  r = {};
38
- this.C && (r = this.C.ps(t.bs.Ct) || {});
38
+ this.C && (r = this.C.vs(t.gs.Ct) || {});
39
39
  const h = {};
40
40
  for (let t = 0; t < s.length; t++) {
41
41
  e = s[t];
42
- const o = lt(e);
42
+ const o = at(e);
43
43
  if (null != o) {
44
44
  const t = o.id;
45
45
  t && r[t] && ((o.viewed = !0), (h[t] = !0)), i.push(o);
46
46
  }
47
47
  }
48
48
  (this.cards = i),
49
- this.Ri(),
50
- (this.Ae = new Date()),
51
- this.C && (this.C.js(t.bs.Ct, h), this.C.js(t.bs.Ge, this.Ae));
49
+ this.gi(),
50
+ (this.Gi = new Date()),
51
+ this.C && (this.C.Bs(t.gs.Ct, h), this.C.Bs(t.gs.Ji, this.Gi));
52
52
  }
53
- Ri() {
53
+ gi() {
54
54
  var s;
55
55
  const i = [];
56
- for (let t = 0; t < this.cards.length; t++) i.push(this.cards[t].Bs());
57
- null === (s = this.C) || void 0 === s || s.js(t.bs.Be, i);
56
+ for (let t = 0; t < this.cards.length; t++) i.push(this.cards[t].bs());
57
+ null === (s = this.C) || void 0 === s || s.Bs(t.gs.Hi, i);
58
58
  }
59
59
  U(t) {
60
60
  null != t &&
61
61
  t.feed &&
62
- (this.Xs(),
63
- this.He(t.feed),
64
- this.Ms.X(new Feed(this.cards.slice(), this.Ae)));
62
+ (this.Ps(),
63
+ this.Ki(t.feed),
64
+ this.Js.X(new Feed(this.cards.slice(), this.Gi)));
65
65
  }
66
- Je() {
67
- this.Xs();
66
+ Mi() {
67
+ this.Ps();
68
68
  const t = [],
69
69
  s = new Date();
70
70
  for (let i = 0; i < this.cards.length; i++) {
@@ -72,19 +72,19 @@ export default class re extends s {
72
72
  let r = !0;
73
73
  null != e && (r = e >= s), r && t.push(this.cards[i]);
74
74
  }
75
- return new Feed(t, this.Ae);
75
+ return new Feed(t, this.Gi);
76
76
  }
77
- zi() {
78
- this.Ue && this.Ue.requestFeedRefresh();
77
+ Di() {
78
+ this.Bi && this.Bi.requestFeedRefresh();
79
79
  }
80
- Fs(t) {
81
- return this.Ms.Ns(t);
80
+ qs(t) {
81
+ return this.Js.Fs(t);
82
82
  }
83
83
  clearData(s) {
84
84
  null == s && (s = !1),
85
85
  (this.cards = []),
86
- (this.Ae = null),
87
- s && this.C && (this.C.Ls(t.bs.Be), this.C.Ls(t.bs.Ge)),
88
- this.Ms.X(new Feed(this.cards.slice(), this.Ae));
86
+ (this.Gi = null),
87
+ s && this.C && (this.C.Es(t.gs.Hi), this.C.Es(t.gs.Ji)),
88
+ this.Js.X(new Feed(this.cards.slice(), this.Gi));
89
89
  }
90
90
  }
package/src/Feed/feed.js CHANGED
@@ -11,10 +11,10 @@ export default class Feed extends rr {
11
11
  logCardClick(r) {
12
12
  return logCardClick(r, !1);
13
13
  }
14
- dr() {
14
+ sr() {
15
15
  requestFeedRefresh();
16
16
  }
17
- ur() {
17
+ nr() {
18
18
  return !1;
19
19
  }
20
20
  }
@@ -1,5 +1,5 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import ie from "./feed-provider-factory.js";
3
3
  export function getCachedFeed() {
4
- if (r.rr()) return ie.m().Je();
4
+ if (r.rr()) return ie.m().Mi();
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import ie from "./feed-provider-factory.js";
3
3
  export function requestFeedRefresh() {
4
- if (r.rr()) return ie.m().zi();
4
+ if (r.rr()) return ie.m().Di();
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import ie from "./feed-provider-factory.js";
3
3
  export function subscribeToFeedUpdates(e) {
4
- if (r.rr()) return ie.m().Fs(e);
4
+ if (r.rr()) return ie.m().qs(e);
5
5
  }
@@ -1,4 +1,4 @@
1
- import r, { OPTIONS as z } from "../../managers/braze-instance.js";
1
+ import r, { OPTIONS as w } from "../../managers/braze-instance.js";
2
2
  import {
3
3
  destroyFeedHtml as ee,
4
4
  detectFeedImpressions as nn,
@@ -30,22 +30,22 @@ export function showFeed(e, t, n) {
30
30
  }
31
31
  return o;
32
32
  },
33
- i = r.sr(z.tn) || r.sr(z.en) || !1;
33
+ i = r.ee(w.tn) || r.ee(w.en) || !1;
34
34
  let s = !1;
35
35
  null == e && ((e = document.body), (s = !0));
36
36
  let l,
37
37
  f = !1;
38
38
  null == t
39
- ? ((l = ie.m().Je()),
39
+ ? ((l = ie.m().Mi()),
40
40
  an(l, o(l.cards, n), l.lastUpdated, null, i),
41
41
  (f = !0))
42
42
  : (l = new Feed(o(t, n), new Date()));
43
43
  const a = tn(l, i, s);
44
44
  if (f) {
45
45
  (null == l.lastUpdated ||
46
- new Date().valueOf() - l.lastUpdated.valueOf() > Feed.ar) &&
46
+ new Date().valueOf() - l.lastUpdated.valueOf() > Feed.dr) &&
47
47
  (N.info(
48
- `Cached feed was older than max TTL of ${Feed.ar} ms, requesting an update from the server.`,
48
+ `Cached feed was older than max TTL of ${Feed.dr} ms, requesting an update from the server.`,
49
49
  ),
50
50
  on(l, a));
51
51
  const e = new Date().valueOf(),
@@ -8,6 +8,6 @@ export function deferInAppMessage(e) {
8
8
  return e instanceof ControlMessage
9
9
  ? (N.info("Not deferring since this is a ControlMessage."), !1)
10
10
  : e instanceof InAppMessage
11
- ? se.ea().Me(e)
11
+ ? se.ea().Oe(e)
12
12
  : (N.info("Not an instance of InAppMessage, ignoring."), !1);
13
13
  }
@@ -1,10 +1,10 @@
1
1
  import ro from "../../util/browser-detector.js";
2
2
  import { InAppMessage, logInAppMessageHtmlClick } from "../index.js";
3
3
  import { OperatingSystems as so } from "../../util/device-constants.js";
4
- import { buildHtmlClickHandler as ct } from "./html-message-display-utils.js";
4
+ import { buildHtmlClickHandler as lt } from "./html-message-display-utils.js";
5
5
  import { attachHtmlToIframeWithNonce as m } from "../../util/html-display-utils.js";
6
6
  import { buildBrazeBridge as b } from "../../util/html-display-utils.js";
7
- export default function dt(t, e, o, s, n, i) {
7
+ export default function ct(t, e, o, s, n, i) {
8
8
  const l = document.createElement("iframe");
9
9
  l.setAttribute("title", "Modal Message"),
10
10
  n && (l.style.zIndex = (n + 1).toString());
@@ -15,10 +15,10 @@ export default function dt(t, e, o, s, n, i) {
15
15
  n.focus();
16
16
  const a = n.document.getElementsByTagName("head")[0];
17
17
  if (null != a) {
18
- if (t.Oe()) {
18
+ if (t.Qe()) {
19
19
  const e = document.createElement("style");
20
20
  (e.innerHTML = t.css || ""),
21
- (e.id = t._e() || ""),
21
+ (e.id = t.Ve() || ""),
22
22
  null != i && e.setAttribute("nonce", i),
23
23
  a.appendChild(e);
24
24
  }
@@ -42,16 +42,16 @@ export default function dt(t, e, o, s, n, i) {
42
42
  },
43
43
  );
44
44
  if (
45
- ((n.appboyBridge = c), (n.brazeBridge = c), t.Ke !== InAppMessage.Qe.Le)
45
+ ((n.appboyBridge = c), (n.brazeBridge = c), t.We !== InAppMessage.Ze.Ye)
46
46
  ) {
47
47
  const e = n.document.getElementsByTagName("a");
48
- for (let o = 0; o < e.length; o++) e[o].onclick = ct(t, l, e[o], s);
48
+ for (let o = 0; o < e.length; o++) e[o].onclick = lt(t, l, e[o], s);
49
49
  const o = n.document.getElementsByTagName("button");
50
- for (let e = 0; e < o.length; e++) o[e].onclick = ct(t, l, o[e], s);
50
+ for (let e = 0; e < o.length; e++) o[e].onclick = lt(t, l, o[e], s);
51
51
  }
52
52
  const m = n.document.body;
53
53
  if (null != m) {
54
- t.Ve() && (m.id = t.htmlId || "");
54
+ t.lo() && (m.id = t.htmlId || "");
55
55
  const e = document.createElement("hidden");
56
56
  (e.onclick = c.closeMessage),
57
57
  (e.className = "ab-programmatic-close-button"),
@@ -67,8 +67,8 @@ export default function dt(t, e, o, s, n, i) {
67
67
  ) {
68
68
  const e = document.createElement("div");
69
69
  return (
70
- (e.className = "ab-ios-scroll-wrapper"), e.appendChild(l), (t.We = e), e
70
+ (e.className = "ab-ios-scroll-wrapper"), e.appendChild(l), (t.do = e), e
71
71
  );
72
72
  }
73
- return (t.We = l), l;
73
+ return (t.do = l), l;
74
74
  }
@@ -13,22 +13,22 @@ import ModalMessage from "../models/modal-message.js";
13
13
  import SlideUpMessage from "../models/slide-up-message.js";
14
14
  import { logInAppMessageClick } from "../log-in-app-message-click.js";
15
15
  import { _handleBrazeAction as F } from "../../Core/handle-braze-action.js";
16
- import dt from "./html-message-to-html.js";
16
+ import ct from "./html-message-to-html.js";
17
17
  import ce from "./modal-utils.js";
18
18
  import { logger as N, Guid as G } from "../../../shared-lib/index.js";
19
19
  export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
20
- if (((e.Xe = document.activeElement), e instanceof HtmlMessage))
21
- return dt(e, o, a, n, s, i);
20
+ if (((e.uo = document.activeElement), e instanceof HtmlMessage))
21
+ return ct(e, o, a, n, s, i);
22
22
  const c = (function (e, o, a, t, n, s, i = document.body, m = "ltr") {
23
23
  let l = null;
24
24
  const c = document.createElement("div");
25
25
  (c.dir = m),
26
26
  (c.className = "ab-in-app-message ab-start-hidden ab-background"),
27
27
  s && (c.style.zIndex = (s + 1).toString()),
28
- e.Ye() &&
28
+ e.bo() &&
29
29
  ((c.className += " ab-modal-interactions"),
30
30
  c.setAttribute("tabindex", "-1")),
31
- e.Oe() ||
31
+ e.Qe() ||
32
32
  ((c.style.color = le(e.textColor)),
33
33
  (c.style.backgroundColor = le(e.backgroundColor)),
34
34
  ae(e.backgroundColor) && (c.className += " ab-no-shadow"));
@@ -38,7 +38,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
38
38
  document.querySelectorAll(".ab-iam-img-loading").length > 0
39
39
  ? t(
40
40
  `Cannot show in-app message ${e.message} because another message is being shown.`,
41
- InAppMessage.lo.Ze,
41
+ InAppMessage.fo.po,
42
42
  )
43
43
  : a(c));
44
44
  },
@@ -79,7 +79,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
79
79
  )));
80
80
  const u = T(
81
81
  "Close Message",
82
- e.Oe() ? void 0 : le(e.closeButtonColor),
82
+ e.Qe() ? void 0 : le(e.closeButtonColor),
83
83
  () => {
84
84
  e.ll(c);
85
85
  },
@@ -88,7 +88,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
88
88
  c.appendChild(u), s && (u.style.zIndex = (s + 2).toString());
89
89
  const b = document.createElement("div");
90
90
  (b.className = "ab-message-text"), (b.dir = m);
91
- const p = (e.messageAlignment || e.do).toLowerCase();
91
+ const p = (e.messageAlignment || e.ho).toLowerCase();
92
92
  b.className += " " + p + "-aligned";
93
93
  let g = !1;
94
94
  const f = document.createElement("div");
@@ -99,13 +99,13 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
99
99
  (o.style.backgroundImage = "url(" + e.imageUrl + ")"),
100
100
  o.setAttribute("role", "img"),
101
101
  o.setAttribute("aria-label", "Modal Image"),
102
- e.uo(o),
102
+ e.jo(o),
103
103
  f.appendChild(o);
104
104
  } else {
105
105
  const o = document.createElement("img");
106
106
  if (
107
107
  (o.setAttribute("src", e.imageUrl),
108
- e.uo(o),
108
+ e.jo(o),
109
109
  0 === document.querySelectorAll(".ab-iam-img-loading").length)
110
110
  ) {
111
111
  g = !0;
@@ -128,7 +128,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
128
128
  f.className += " ab-icon-area";
129
129
  const o = document.createElement("span");
130
130
  (o.className = "ab-icon"),
131
- e.Oe() ||
131
+ e.Qe() ||
132
132
  ((o.style.backgroundColor = le(e.iconBackgroundColor)),
133
133
  (o.style.color = le(e.iconColor)));
134
134
  const a = document.createElement("i");
@@ -142,23 +142,23 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
142
142
  }
143
143
  if ((J(b, "touchstart"), e.header && e.header.length > 0)) {
144
144
  const o = document.createElement("h1");
145
- (o.className = "ab-message-header"), (e.bo = G.Rt()), (o.id = e.bo);
145
+ (o.className = "ab-message-header"), (e.wo = G.Rt()), (o.id = e.wo);
146
146
  const a = (
147
147
  e.headerAlignment || InAppMessage.TextAlignment.CENTER
148
148
  ).toLowerCase();
149
149
  (o.className += " " + a + "-aligned"),
150
- e.Oe() || (o.style.color = le(e.headerTextColor)),
150
+ e.Qe() || (o.style.color = le(e.headerTextColor)),
151
151
  o.appendChild(document.createTextNode(e.header)),
152
152
  b.appendChild(o);
153
153
  }
154
- return b.appendChild(e.po()), c.appendChild(b), g || d(), (e.We = c), c;
154
+ return b.appendChild(e.vo()), c.appendChild(b), g || d(), (e.do = c), c;
155
155
  })(e, o, a, t, n, s, m, l);
156
156
  if (e instanceof FullScreenMessage || e instanceof ModalMessage) {
157
157
  const a = e instanceof FullScreenMessage ? "ab-fullscreen" : "ab-modal";
158
158
  (c.className += ` ${a} ab-centered`),
159
- ce.fo(e, o, c, n),
160
- ce.ho(c),
161
- ce.jo(e.bo, c);
159
+ ce.xo(e, o, c, n),
160
+ ce.Co(c),
161
+ ce.$o(e.wo, c);
162
162
  } else if (e instanceof SlideUpMessage) {
163
163
  c.className += " ab-slideup";
164
164
  const o = c.getElementsByClassName("ab-close-button")[0];
@@ -166,9 +166,9 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
166
166
  const a = oe(
167
167
  "0 0 11.38 19.44",
168
168
  "M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z",
169
- e.Oe() ? void 0 : le(e.closeButtonColor),
169
+ e.Qe() ? void 0 : le(e.closeButtonColor),
170
170
  );
171
- a.setAttribute("class", "ab-chevron"), o.appendChild(a);
171
+ a.setAttribute("class", `ab-chevron ${l}`), o.appendChild(a);
172
172
  }
173
173
  let a, t;
174
174
  H(c, R.kt, (e) => {
@@ -180,8 +180,8 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
180
180
  null != o && null != o.onclick && o.onclick(e);
181
181
  }),
182
182
  e.slideFrom === InAppMessage.SlideFrom.TOP
183
- ? ((a = R.wo), (t = " ab-swiped-up"))
184
- : ((a = R.vo), (t = " ab-swiped-down")),
183
+ ? ((a = R.ko), (t = " ab-swiped-up"))
184
+ : ((a = R.Mo), (t = " ab-swiped-down")),
185
185
  H(c, a, (e) => {
186
186
  (c.className += t), null != o && null != o.onclick && o.onclick(e);
187
187
  });
@@ -3,9 +3,9 @@ import { _handleBrazeAction as F } from "../../Core/handle-braze-action.js";
3
3
  import { logInAppMessageButtonClick } from "../log-in-app-message-button-click.js";
4
4
  import { toRgba as le } from "../../util/color-utils.js";
5
5
  import { addPassiveEventListener as J } from "../../util/dom-utils.js";
6
- import { KeyCodes as bt } from "../../util/key-codes.js";
6
+ import { KeyCodes as mt } from "../../util/key-codes.js";
7
7
  const ce = {
8
- ho: (t) => {
8
+ Co: (t) => {
9
9
  const o = t.querySelectorAll(
10
10
  ".ab-close-button, .ab-message-text, .ab-message-button",
11
11
  );
@@ -16,7 +16,7 @@ const ce = {
16
16
  s = o[o.length - 1];
17
17
  t.addEventListener("keydown", (o) => {
18
18
  const a = document.activeElement;
19
- o.keyCode === bt.yo &&
19
+ o.keyCode === mt.yo &&
20
20
  (o.shiftKey || (a !== s && a !== t)
21
21
  ? !o.shiftKey ||
22
22
  (a !== e && a !== t) ||
@@ -25,13 +25,13 @@ const ce = {
25
25
  });
26
26
  }
27
27
  },
28
- jo: (t, o) => {
28
+ $o: (t, o) => {
29
29
  o.setAttribute("role", "dialog"),
30
30
  o.setAttribute("aria-modal", "true"),
31
31
  o.setAttribute("aria-label", "Modal Message"),
32
32
  t && o.setAttribute("aria-labelledby", t);
33
33
  },
34
- fo: (t, o, e, s) => {
34
+ xo: (t, o, e, s) => {
35
35
  if (t.buttons && t.buttons.length > 0) {
36
36
  const a = document.createElement("div");
37
37
  (a.className = "ab-message-buttons"), e.appendChild(a);
@@ -60,7 +60,7 @@ const ce = {
60
60
  let l = e.text;
61
61
  "" === e.text && (l = " "),
62
62
  s.appendChild(document.createTextNode(l)),
63
- t.Oe() ||
63
+ t.Qe() ||
64
64
  ((s.style.backgroundColor = le(e.backgroundColor)),
65
65
  (s.style.color = le(e.textColor)),
66
66
  (s.style.borderColor = le(e.borderColor))),
@@ -47,7 +47,7 @@ export function newInAppMessageFromJson(e) {
47
47
  ((S = void 0), (q = void 0));
48
48
  const B = e.message_extras;
49
49
  let C;
50
- if (o === ModalMessage.Dt || o === InAppMessage.Qe.xo)
50
+ if (o === ModalMessage.Dt || o === InAppMessage.Ze.Io)
51
51
  C = new ModalMessage(
52
52
  s,
53
53
  n,
@@ -138,8 +138,8 @@ export function newInAppMessageFromJson(e) {
138
138
  else {
139
139
  if (
140
140
  o !== HtmlMessage.Dt &&
141
- o !== InAppMessage.Qe.Le &&
142
- o !== InAppMessage.Qe.Io
141
+ o !== InAppMessage.Ze.Ye &&
142
+ o !== InAppMessage.Ze.Ao
143
143
  )
144
144
  return void N.error("Ignoring message with unknown type " + o);
145
145
  {
@@ -148,7 +148,7 @@ export function newInAppMessageFromJson(e) {
148
148
  (C.trusted = e.trusted || !1);
149
149
  }
150
150
  }
151
- return (C.Ke = o), C;
151
+ return (C.We = o), C;
152
152
  }
153
153
  export function buttonsFromSerializedInAppMessage(e) {
154
154
  const o = [];
@@ -4,7 +4,7 @@ const se = {
4
4
  aa: null,
5
5
  l: !1,
6
6
  ea: () => (
7
- se.p(), se.aa || (se.aa = new ea(r.g(), r.P(), r.j(), r.tr())), se.aa
7
+ se.p(), se.aa || (se.aa = new ea(r.g(), r.P(), r.j(), r.ir())), se.aa
8
8
  ),
9
9
  p: () => {
10
10
  se.l || (r.h(se), (se.l = !0));