@braze/web-sdk 4.5.0 → 4.6.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 (86) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +49 -8
  3. package/package.json +1 -1
  4. package/shared-lib/braze-shared-lib.js +7 -7
  5. package/shared-lib/encoding-utils.js +3 -3
  6. package/shared-lib/event-types.js +14 -14
  7. package/shared-lib/guid.js +2 -2
  8. package/shared-lib/indexed-db-adapter.js +3 -3
  9. package/shared-lib/logger.js +18 -18
  10. package/shared-lib/supported-options.js +15 -15
  11. package/src/Card/index.js +1 -0
  12. package/src/Card/log-content-card-click.js +4 -0
  13. package/src/FeatureFlags/feature-flag-factory.js +13 -5
  14. package/src/FeatureFlags/feature-flag.js +36 -8
  15. package/src/FeatureFlags/feature-flags-provider.js +58 -33
  16. package/src/FeatureFlags/get-all-feature-flags.js +3 -3
  17. package/src/FeatureFlags/get-feature-flag.js +5 -5
  18. package/src/FeatureFlags/index.js +1 -0
  19. package/src/Feed/feed-provider-factory.js +8 -8
  20. package/src/Feed/feed-provider.js +3 -3
  21. package/src/Feed/get-cached-feed.js +2 -2
  22. package/src/Feed/log-feed-displayed.js +1 -1
  23. package/src/Feed/request-feed-refresh.js +2 -2
  24. package/src/Feed/subscribe-to-feed-updates.js +2 -2
  25. package/src/Feed/ui/show-feed.js +2 -2
  26. package/src/InAppMessage/display/html-message-to-html.js +3 -3
  27. package/src/InAppMessage/display/in-app-message-to-html.js +101 -86
  28. package/src/InAppMessage/display/modal-utils.js +9 -9
  29. package/src/InAppMessage/in-app-message-factory.js +1 -1
  30. package/src/InAppMessage/in-app-message-manager-factory.js +3 -3
  31. package/src/InAppMessage/in-app-message-manager.js +52 -52
  32. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  33. package/src/InAppMessage/log-in-app-message-click.js +2 -2
  34. package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
  35. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  36. package/src/InAppMessage/models/full-screen-message.js +1 -1
  37. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  38. package/src/InAppMessage/models/in-app-message.js +68 -68
  39. package/src/InAppMessage/models/modal-message.js +2 -2
  40. package/src/InAppMessage/models/slide-up-message.js +8 -8
  41. package/src/InAppMessage/models/templated-in-app-message.js +4 -4
  42. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  43. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  44. package/src/InAppMessage/ui/show-in-app-message.js +24 -21
  45. package/src/Push/push-manager.js +54 -54
  46. package/src/Push/utils/push-utils.js +4 -4
  47. package/src/User/user-manager.js +4 -4
  48. package/src/User/user.js +13 -13
  49. package/src/common/base-feed.js +1 -1
  50. package/src/common/feed-display.js +22 -22
  51. package/src/l10n/l10n-manager-factory.js +7 -7
  52. package/src/managers/auth-manager.js +23 -23
  53. package/src/managers/braze-instance.js +93 -93
  54. package/src/managers/device-manager.js +2 -2
  55. package/src/managers/network-manager.js +42 -42
  56. package/src/managers/server-config-manager.js +9 -9
  57. package/src/managers/session-manager.js +27 -27
  58. package/src/managers/storage-manager-factory.js +1 -1
  59. package/src/managers/storage-manager.js +61 -61
  60. package/src/managers/subscription-manager.js +6 -6
  61. package/src/models/backend-errors.js +5 -5
  62. package/src/models/braze-event.js +2 -2
  63. package/src/models/device.js +1 -1
  64. package/src/models/identifier.js +6 -6
  65. package/src/models/push-token.js +3 -3
  66. package/src/models/server-config.js +3 -3
  67. package/src/request-controller.js +52 -52
  68. package/src/triggers/models/filter-set.js +2 -2
  69. package/src/triggers/models/filter.js +34 -34
  70. package/src/triggers/models/in-app-message-click-data.js +6 -6
  71. package/src/triggers/models/push-click-data.js +1 -1
  72. package/src/triggers/models/trigger-condition.js +8 -8
  73. package/src/triggers/models/trigger-events.js +1 -1
  74. package/src/triggers/models/trigger.js +30 -30
  75. package/src/triggers/triggers-provider-factory.js +2 -2
  76. package/src/triggers/triggers-provider.js +37 -37
  77. package/src/ui/js/attach-css.js +1 -1
  78. package/src/ui/js/feed-css.js +1 -1
  79. package/src/ui/js/iam-css.js +1 -1
  80. package/src/ui/js/load-font-awesome.js +1 -1
  81. package/src/util/braze-actions.js +4 -4
  82. package/src/util/browser-detector.js +2 -2
  83. package/src/util/dom-utils.js +8 -8
  84. package/src/util/key-codes.js +1 -1
  85. package/src/util/net.js +3 -3
  86. package/src/util/window-utils.js +1 -1
@@ -9,11 +9,11 @@ import { TriggersProviderFactory as W } from "../triggers/triggers-provider-fact
9
9
  export function logInAppMessageClick(o) {
10
10
  if (!e.rr()) return !1;
11
11
  if (!(o instanceof InAppMessage)) return r.D.error(or), !1;
12
- const s = pe.m().G(o, r.A.pi);
12
+ const s = pe.m().G(o, r.A.yi);
13
13
  if (s) {
14
14
  o.Cr() || logInAppMessageImpression(o);
15
15
  for (let r = 0; r < s.ve.length; r++)
16
- W.er().je(V.Ar, [o.triggerId], s.ve[r]);
16
+ W.er().je(V.Br, [o.triggerId], s.ve[r]);
17
17
  }
18
18
  return s.S;
19
19
  }
@@ -13,11 +13,11 @@ export function logInAppMessageHtmlClick(s, t, o) {
13
13
  ),
14
14
  !1
15
15
  );
16
- let m = r.A.pi;
17
- null != t && (m = r.A.mi);
16
+ let m = r.A.yi;
17
+ null != t && (m = r.A.ji);
18
18
  const i = pe.m().G(s, m, t, o);
19
19
  if (i.S)
20
20
  for (let r = 0; r < i.ve.length; r++)
21
- W.er().je(V.Ar, [s.triggerId, t], i.ve[r]);
21
+ W.er().je(V.Br, [s.triggerId, t], i.ve[r]);
22
22
  return i.S;
23
23
  }
@@ -8,6 +8,6 @@ export function logInAppMessageImpression(o) {
8
8
  if (!e.rr()) return !1;
9
9
  if (!(o instanceof InAppMessage || o instanceof ControlMessage))
10
10
  return r.D.error(or), !1;
11
- const s = o instanceof ControlMessage ? r.A.ro : r.A.gi;
11
+ const s = o instanceof ControlMessage ? r.A.ro : r.A.bi;
12
12
  return pe.m().G(o, s).S;
13
13
  }
@@ -64,7 +64,7 @@ export default class FullScreenMessage extends InAppMessage {
64
64
  z
65
65
  );
66
66
  }
67
- get Ce() {
67
+ get He() {
68
68
  return InAppMessage.TextAlignment.CENTER;
69
69
  }
70
70
  }
@@ -3,12 +3,12 @@ import u from "../../managers/subscription-manager.js";
3
3
  export default class InAppMessageButton {
4
4
  constructor(s, t, i, r, e, h, n) {
5
5
  (this.text = s || ""),
6
- (this.backgroundColor = t || InAppMessage.xi.Ci),
7
- (this.textColor = i || InAppMessage.xi.Ei),
6
+ (this.backgroundColor = t || InAppMessage.Ji.Ci),
7
+ (this.textColor = i || InAppMessage.Ji.Hi),
8
8
  (this.borderColor = r || this.backgroundColor),
9
9
  (this.clickAction = e || InAppMessage.ClickAction.NONE),
10
10
  (this.uri = h),
11
- null == n && (n = InAppMessageButton.di),
11
+ null == n && (n = InAppMessageButton.Mi),
12
12
  (this.id = n),
13
13
  (this.nl = !1),
14
14
  (this.lt = new u());
@@ -37,4 +37,4 @@ export default class InAppMessageButton {
37
37
  );
38
38
  }
39
39
  }
40
- InAppMessageButton.di = -1;
40
+ InAppMessageButton.Mi = -1;
@@ -51,51 +51,51 @@ export default class InAppMessage {
51
51
  (this.icon = T),
52
52
  (this.imageUrl = a),
53
53
  (this.imageStyle = m || InAppMessage.ImageStyle.TOP),
54
- (this.iconColor = c || InAppMessage.xi.Ei),
55
- (this.iconBackgroundColor = I || InAppMessage.xi.Ci),
56
- (this.backgroundColor = A || InAppMessage.xi.Ei),
57
- (this.textColor = N || InAppMessage.xi.Ni),
58
- (this.closeButtonColor = _ || InAppMessage.xi.Li),
54
+ (this.iconColor = c || InAppMessage.Ji.Hi),
55
+ (this.iconBackgroundColor = I || InAppMessage.Ji.Ci),
56
+ (this.backgroundColor = A || InAppMessage.Ji.Hi),
57
+ (this.textColor = N || InAppMessage.Ji.Li),
58
+ (this.closeButtonColor = _ || InAppMessage.Ji.Oi),
59
59
  (this.animateIn = L),
60
60
  null == this.animateIn && (this.animateIn = !0),
61
61
  (this.animateOut = d),
62
62
  null == this.animateOut && (this.animateOut = !0),
63
63
  (this.header = O),
64
64
  (this.headerAlignment = S || InAppMessage.TextAlignment.CENTER),
65
- (this.headerTextColor = D || InAppMessage.xi.Ni),
66
- (this.frameColor = M || InAppMessage.xi.Oi),
65
+ (this.headerTextColor = D || InAppMessage.Ji.Li),
66
+ (this.frameColor = M || InAppMessage.Ji.Ri),
67
67
  (this.buttons = R || []),
68
68
  (this.cropType = b || InAppMessage.CropType.FIT_CENTER),
69
69
  (this.orientation = P),
70
70
  (this.htmlId = p),
71
71
  (this.css = C),
72
72
  (this.isControl = !1),
73
- (this.Ri = !1),
74
- (this.nl = !1),
75
73
  (this.Pi = !1),
74
+ (this.nl = !1),
75
+ (this.Ui = !1),
76
76
  (this.lt = new u()),
77
- (this.Ui = new u());
77
+ (this.Wi = new u());
78
78
  }
79
79
  subscribeToClickedEvent(t) {
80
80
  return this.lt.ut(t);
81
81
  }
82
82
  subscribeToDismissedEvent(t) {
83
- return this.Ui.ut(t);
83
+ return this.Wi.ut(t);
84
84
  }
85
85
  removeSubscription(t) {
86
- this.lt.removeSubscription(t), this.Ui.removeSubscription(t);
86
+ this.lt.removeSubscription(t), this.Wi.removeSubscription(t);
87
87
  }
88
88
  removeAllSubscriptions() {
89
- this.lt.removeAllSubscriptions(), this.Ui.removeAllSubscriptions();
89
+ this.lt.removeAllSubscriptions(), this.Wi.removeAllSubscriptions();
90
90
  }
91
91
  closeMessage() {
92
92
  this.on(this.mn);
93
93
  }
94
- Me() {
94
+ Ie() {
95
95
  return !0;
96
96
  }
97
97
  ll() {
98
- return this.Me();
98
+ return this.Ie();
99
99
  }
100
100
  an() {
101
101
  return null != this.htmlId && this.htmlId.length > 4;
@@ -107,26 +107,26 @@ export default class InAppMessage {
107
107
  if (this.an() && this.sn()) return this.htmlId + "-css";
108
108
  }
109
109
  R() {
110
- return !this.Ri && ((this.Ri = !0), !0);
110
+ return !this.Pi && ((this.Pi = !0), !0);
111
111
  }
112
112
  Cr() {
113
- return this.Ri;
113
+ return this.Pi;
114
114
  }
115
115
  k() {
116
116
  return !this.nl && ((this.nl = !0), this.lt.St(), !0);
117
117
  }
118
118
  J() {
119
- return !this.Pi && ((this.Pi = !0), this.Ui.St(), !0);
119
+ return !this.Ui && ((this.Ui = !0), this.Wi.St(), !0);
120
120
  }
121
- Hi(t) {
121
+ Ki(t) {
122
122
  if (t && t.parentNode) {
123
123
  let s = t.closest(".ab-iam-root");
124
- if ((null == s && (s = t), this.Me() && null != s.parentNode)) {
124
+ if ((null == s && (s = t), this.Ie() && null != s.parentNode)) {
125
125
  const t = s.parentNode.classList;
126
- t && t.contains(InAppMessage.Fi) && t.remove(InAppMessage.Fi),
127
- document.body.removeEventListener("touchmove", InAppMessage.Bi);
126
+ t && t.contains(InAppMessage.Yi) && t.remove(InAppMessage.Yi),
127
+ document.body.removeEventListener("touchmove", InAppMessage.Xi);
128
128
  }
129
- s.className = s.className.replace(InAppMessage.Gi, InAppMessage.Wi);
129
+ s.className = s.className.replace(InAppMessage.Vi, InAppMessage.Qi);
130
130
  }
131
131
  return this.animateOut;
132
132
  }
@@ -139,7 +139,7 @@ export default class InAppMessage {
139
139
  ? t.getElementsByClassName("ab-in-app-message")[0]
140
140
  : t);
141
141
  let e = !1;
142
- i && (e = this.Hi(i));
142
+ i && (e = this.Ki(i));
143
143
  const h = document.body;
144
144
  if (null != h) var n = h.scrollTop;
145
145
  const r = () => {
@@ -154,40 +154,40 @@ export default class InAppMessage {
154
154
  null != h && "Safari" === ot.browser && (h.scrollTop = n),
155
155
  s ? s() : this.J();
156
156
  };
157
- e ? setTimeout(r, InAppMessage.Ki) : r(), this.ke && this.ke.focus();
157
+ e ? setTimeout(r, InAppMessage.Zi) : r(), this.Le && this.Le.focus();
158
158
  }
159
- Ae() {
159
+ Oe() {
160
160
  return document.createTextNode(this.message);
161
161
  }
162
- Le(t) {
162
+ Je(t) {
163
163
  let s = "";
164
- this.message || this.header || !this.Me() || (s = "Modal Image"),
164
+ this.message || this.header || !this.Ie() || (s = "Modal Image"),
165
165
  t.setAttribute("alt", s);
166
166
  }
167
- static Bi(t) {
167
+ static Xi(t) {
168
168
  (t.targetTouches && t.targetTouches.length > 1) ||
169
169
  (t.target.classList &&
170
170
  t.target.classList.contains("ab-message-text") &&
171
171
  t.target.scrollHeight > t.target.clientHeight) ||
172
- (document.querySelector(`.${InAppMessage.Fi}`) && t.preventDefault());
172
+ (document.querySelector(`.${InAppMessage.Yi}`) && t.preventDefault());
173
173
  }
174
- Yi(t) {
175
- this.Me() &&
174
+ th(t) {
175
+ this.Ie() &&
176
176
  null != t.parentNode &&
177
177
  this.orientation !== InAppMessage.Orientation.LANDSCAPE &&
178
178
  (null != t.parentNode.classList &&
179
- t.parentNode.classList.add(InAppMessage.Fi),
179
+ t.parentNode.classList.add(InAppMessage.Yi),
180
180
  document.body.addEventListener(
181
181
  "touchmove",
182
- InAppMessage.Bi,
182
+ InAppMessage.Xi,
183
183
  !!Tt() && { passive: !1 }
184
184
  )),
185
- (t.className += " " + InAppMessage.Gi);
185
+ (t.className += " " + InAppMessage.Vi);
186
186
  }
187
- static Xi(t) {
187
+ static sh(t) {
188
188
  if (
189
- t.keyCode === at.Vi &&
190
- !e.nn(T.qi) &&
189
+ t.keyCode === at.ih &&
190
+ !e.nn(T.eh) &&
191
191
  document.querySelectorAll(".ab-modal-interactions").length > 0
192
192
  ) {
193
193
  const t = document.getElementsByClassName("ab-html-message");
@@ -206,33 +206,33 @@ export default class InAppMessage {
206
206
  }
207
207
  }
208
208
  }
209
- Ji() {
210
- this.Qi ||
211
- e.nn(T.qi) ||
212
- (document.addEventListener("keydown", InAppMessage.Xi, !1),
213
- e.Zi(() => {
214
- document.removeEventListener("keydown", InAppMessage.Xi);
209
+ hh() {
210
+ this.nh ||
211
+ e.nn(T.eh) ||
212
+ (document.addEventListener("keydown", InAppMessage.sh, !1),
213
+ e.rh(() => {
214
+ document.removeEventListener("keydown", InAppMessage.sh);
215
215
  }),
216
- (this.Qi = !0));
216
+ (this.nh = !0));
217
217
  }
218
218
  }
219
- (InAppMessage.xi = {
220
- Ni: 4281545523,
221
- Ei: 4294967295,
219
+ (InAppMessage.Ji = {
220
+ Li: 4281545523,
221
+ Hi: 4294967295,
222
222
  Ci: 4278219733,
223
- th: 4293914607,
224
- sh: 4283782485,
225
- Oi: 3224580915,
226
- Li: 4288387995
223
+ oh: 4293914607,
224
+ lh: 4283782485,
225
+ Ri: 3224580915,
226
+ Oi: 4288387995
227
227
  }),
228
- (InAppMessage.li = {
229
- ih: "hd",
230
- eh: "ias",
231
- hh: "of",
232
- nh: "do",
233
- ki: "umt",
234
- zi: "tf",
235
- rh: "te"
228
+ (InAppMessage.Ge = {
229
+ Eh: "hd",
230
+ Ee: "ias",
231
+ uh: "of",
232
+ Th: "do",
233
+ Gi: "umt",
234
+ $i: "tf",
235
+ ah: "te"
236
236
  }),
237
237
  (InAppMessage.SlideFrom = { TOP: "TOP", BOTTOM: "BOTTOM" }),
238
238
  (InAppMessage.ClickAction = {
@@ -257,15 +257,15 @@ export default class InAppMessage {
257
257
  FIT_CENTER: "FIT_CENTER"
258
258
  }),
259
259
  (InAppMessage.es = {
260
- oh: "SLIDEUP",
261
- lh: "MODAL",
262
- Ke: "MODAL_STYLED",
260
+ mh: "SLIDEUP",
261
+ Ih: "MODAL",
262
+ Ye: "MODAL_STYLED",
263
263
  Tr: "FULL",
264
264
  el: "WEB_HTML",
265
265
  cn: "HTML"
266
266
  }),
267
- (InAppMessage.Ki = 500),
268
- (InAppMessage.Eh = 200),
269
- (InAppMessage.Gi = "ab-show"),
270
- (InAppMessage.Wi = "ab-hide"),
271
- (InAppMessage.Fi = "ab-pause-scrolling");
267
+ (InAppMessage.Zi = 500),
268
+ (InAppMessage.Ah = 200),
269
+ (InAppMessage.Vi = "ab-show"),
270
+ (InAppMessage.Qi = "ab-hide"),
271
+ (InAppMessage.Yi = "ab-pause-scrolling");
@@ -61,8 +61,8 @@ export default class ModalMessage extends InAppMessage {
61
61
  y
62
62
  );
63
63
  }
64
- get Ce() {
64
+ get He() {
65
65
  return InAppMessage.TextAlignment.CENTER;
66
66
  }
67
67
  }
68
- ModalMessage.es = InAppMessage.es.lh;
68
+ ModalMessage.es = InAppMessage.es.Ih;
@@ -2,8 +2,8 @@ import InAppMessage from "./in-app-message.js";
2
2
  import { DOMUtils as vt } from "../../util/dom-utils.js";
3
3
  export default class SlideUpMessage extends InAppMessage {
4
4
  constructor(t, e, o, s, n, i, r, d, u, a, p, l, m, c, v, x, g, f, h, I, M) {
5
- (x = x || InAppMessage.xi.sh),
6
- (v = v || InAppMessage.xi.th),
5
+ (x = x || InAppMessage.Ji.lh),
6
+ (v = v || InAppMessage.Ji.oh),
7
7
  super(
8
8
  t,
9
9
  (e = e || InAppMessage.TextAlignment.START),
@@ -36,23 +36,23 @@ export default class SlideUpMessage extends InAppMessage {
36
36
  M
37
37
  );
38
38
  }
39
- Me() {
39
+ Ie() {
40
40
  return !1;
41
41
  }
42
- get Ce() {
42
+ get He() {
43
43
  return InAppMessage.TextAlignment.START;
44
44
  }
45
- Ae() {
45
+ Oe() {
46
46
  const t = document.createElement("span");
47
47
  return t.appendChild(document.createTextNode(this.message)), t;
48
48
  }
49
- Yi(t) {
49
+ th(t) {
50
50
  const e = t.getElementsByClassName("ab-in-app-message")[0];
51
51
  vt.eo(e, !0, !0) ||
52
52
  (this.slideFrom === InAppMessage.SlideFrom.TOP
53
53
  ? (e.style.top = "0px")
54
54
  : (e.style.bottom = "0px")),
55
- super.Yi(t);
55
+ super.th(t);
56
56
  }
57
57
  }
58
- SlideUpMessage.es = InAppMessage.es.oh;
58
+ SlideUpMessage.es = InAppMessage.es.mh;
@@ -1,10 +1,10 @@
1
1
  export default class wt {
2
2
  constructor(t, s, l, n, i) {
3
3
  (this.triggerId = t),
4
- (this.wi = s),
5
- (this.Di = l),
6
- (this.Si = n),
7
- (this.$i = i);
4
+ (this.Ni = s),
5
+ (this.Bi = l),
6
+ (this.qi = n),
7
+ (this.xi = i);
8
8
  }
9
9
  static fromJson(t, s, l, n, i) {
10
10
  return null == t || null == t.trigger_id
@@ -4,7 +4,7 @@ export function subscribeToInAppMessage(n) {
4
4
  if (e.rr())
5
5
  return "function" != typeof n
6
6
  ? null
7
- : pe.m().We(function(r) {
7
+ : pe.m().mi(function(r) {
8
8
  return n(r[0]), r.slice(1);
9
9
  });
10
10
  }
@@ -7,9 +7,9 @@ export function automaticallyShowInAppMessages() {
7
7
  if (!e.rr()) return;
8
8
  ss();
9
9
  const s = pe.m();
10
- if (null == s.Xe()) {
10
+ if (null == s.gi()) {
11
11
  const r = subscribeToInAppMessage(s => showInAppMessage(s));
12
- s.Ze(r);
12
+ s.fi(r);
13
13
  }
14
- return s.Xe();
14
+ return s.gi();
15
15
  }
@@ -5,17 +5,17 @@ import InAppMessage from "../models/in-app-message.js";
5
5
  import SlideUpMessage from "../models/slide-up-message.js";
6
6
  import pe from "../in-app-message-manager-factory.js";
7
7
  import se from "../display/get-animation-effect.js";
8
- import le from "../display/in-app-message-to-html.js";
8
+ import ce from "../display/in-app-message-to-html.js";
9
9
  import { logInAppMessageImpression } from "../log-in-app-message-impression.js";
10
10
  import {
11
- ORIENTATION as fe,
11
+ ORIENTATION as le,
12
12
  WindowUtils as H
13
13
  } from "../../util/window-utils.js";
14
14
  import { isURIJavascriptOrData as j } from "../../util/url-utils.js";
15
15
  import { KeyCodes as at } from "../../util/key-codes.js";
16
16
  import { setupInAppMessageUI as ss } from "../../ui/js/index.js";
17
17
  import r from "../../../shared-lib/braze-shared-lib.js";
18
- import { toRgba as me } from "../../util/color-utils.js";
18
+ import { toRgba as ne } from "../../util/color-utils.js";
19
19
  export function showInAppMessage(t, s, o) {
20
20
  if (!e.rr()) return;
21
21
  if ((ss(), null == t)) return !1;
@@ -29,35 +29,35 @@ export function showInAppMessage(t, s, o) {
29
29
  );
30
30
  if (!(t instanceof InAppMessage)) return !1;
31
31
  const i = pe.m();
32
- t.Ji();
32
+ t.hh();
33
33
  const n = t instanceof HtmlMessage;
34
34
  if (n && !t.trusted && !e.tr())
35
35
  return (
36
36
  r.D.error(
37
37
  'HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.'
38
38
  ),
39
- i.ni(t.triggerId, InAppMessage.li.ih),
39
+ i.di(t.triggerId, InAppMessage.Ge.Eh),
40
40
  !1
41
41
  );
42
- if ((null == s && (s = document.body), t.Me())) {
42
+ if ((null == s && (s = document.body), t.Ie())) {
43
43
  if (s.querySelectorAll(".ab-modal-interactions").length > 0)
44
44
  return (
45
45
  r.D.info(
46
46
  `Cannot show in-app message ${t.message} because another message is being shown.`
47
47
  ),
48
- i.ni(t.triggerId, InAppMessage.li.eh),
48
+ i.di(t.triggerId, InAppMessage.Ge.Ee),
49
49
  !1
50
50
  );
51
51
  }
52
52
  if (H.so()) {
53
53
  const e = H.io();
54
54
  if (
55
- (e === fe.PORTRAIT &&
55
+ (e === le.PORTRAIT &&
56
56
  t.orientation === InAppMessage.Orientation.LANDSCAPE) ||
57
- (e === fe.LANDSCAPE &&
57
+ (e === le.LANDSCAPE &&
58
58
  t.orientation === InAppMessage.Orientation.PORTRAIT)
59
59
  ) {
60
- const s = e === fe.PORTRAIT ? "portrait" : "landscape",
60
+ const s = e === le.PORTRAIT ? "portrait" : "landscape",
61
61
  o =
62
62
  t.orientation === InAppMessage.Orientation.PORTRAIT
63
63
  ? "portrait"
@@ -66,7 +66,7 @@ export function showInAppMessage(t, s, o) {
66
66
  r.D.info(
67
67
  `Not showing ${o} in-app message ${t.message} because the screen is currently ${s}`
68
68
  ),
69
- i.ni(t.triggerId, InAppMessage.li.hh),
69
+ i.di(t.triggerId, InAppMessage.Ge.uh),
70
70
  !1
71
71
  );
72
72
  }
@@ -86,7 +86,7 @@ export function showInAppMessage(t, s, o) {
86
86
  r.D.error(
87
87
  'Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.'
88
88
  ),
89
- i.ni(t.triggerId, InAppMessage.li.ih),
89
+ i.di(t.triggerId, InAppMessage.Ge.Eh),
90
90
  !1
91
91
  );
92
92
  }
@@ -107,28 +107,28 @@ export function showInAppMessage(t, s, o) {
107
107
  document.getElementsByTagName("head")[0].appendChild(s);
108
108
  }
109
109
  const l = t instanceof SlideUpMessage,
110
- m = le(
110
+ m = ce(
111
111
  t,
112
112
  () => {
113
113
  import("../../Feed/ui/show-feed.js").then(e => e.showFeed());
114
114
  },
115
115
  s => {
116
- if (t.Me() && t.ll()) {
116
+ if (t.Ie() && t.ll()) {
117
117
  const o = document.createElement("div");
118
118
  if (
119
119
  ((o.className = "ab-page-blocker"),
120
- t.sn() || (o.style.backgroundColor = me(t.frameColor)),
120
+ t.sn() || (o.style.backgroundColor = ne(t.frameColor)),
121
121
  e.nn(T.no) && (o.style.zIndex = e.nn(T.no)),
122
122
  a.appendChild(o),
123
- !e.nn(T.qi))
123
+ !e.nn(T.eh))
124
124
  ) {
125
125
  const e = new Date().valueOf();
126
126
  o.onclick = o => {
127
- new Date().valueOf() - e > InAppMessage.Eh &&
127
+ new Date().valueOf() - e > InAppMessage.Ah &&
128
128
  (t.on(s), o.stopPropagation());
129
129
  };
130
130
  }
131
- a.appendChild(s), s.focus(), t.Yi(a);
131
+ a.appendChild(s), s.focus(), t.th(a);
132
132
  } else if (l) {
133
133
  const e = document.querySelectorAll(".ab-slideup");
134
134
  let o = null;
@@ -149,10 +149,10 @@ export function showInAppMessage(t, s, o) {
149
149
  o.offsetTop),
150
150
  (s.style.bottom = Math.max(e, 0) + "px");
151
151
  }
152
- } else if (n && !e.nn(T.qi)) {
152
+ } else if (n && !e.nn(T.eh)) {
153
153
  const e = t;
154
154
  s.contentWindow.addEventListener("keydown", function(t) {
155
- t.keyCode === at.Vi && e.closeMessage();
155
+ t.keyCode === at.ih && e.closeMessage();
156
156
  });
157
157
  }
158
158
  logInAppMessageImpression(t),
@@ -162,9 +162,12 @@ export function showInAppMessage(t, s, o) {
162
162
  }, t.duration),
163
163
  "function" == typeof o && o();
164
164
  },
165
+ (e, s) => {
166
+ r.D.info(e), i.di(t.triggerId, s);
167
+ },
165
168
  e.nn(T.lo),
166
169
  e.nn(T.no),
167
170
  e.nn(T.ao)
168
171
  );
169
- return (n || l) && (a.appendChild(m), t.Yi(a)), !0;
172
+ return (n || l) && (a.appendChild(m), t.th(a)), !0;
170
173
  }