@braze/web-sdk 6.12.1 → 6.13.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 (149) hide show
  1. package/index.d.ts +240 -3
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +18 -18
  4. package/shared-lib/indexed-db-adapter.js +58 -58
  5. package/shared-lib/logger.js +7 -7
  6. package/shared-lib/supported-options.js +25 -24
  7. package/src/ConversationalChat/automatically-manage-chat.js +5 -0
  8. package/src/ConversationalChat/chat-message-factory.js +25 -0
  9. package/src/ConversationalChat/chat-message.js +33 -0
  10. package/src/ConversationalChat/constants.js +1 -0
  11. package/src/ConversationalChat/conversational-chat-provider-factory.js +26 -0
  12. package/src/ConversationalChat/conversational-chat-provider.js +372 -0
  13. package/src/ConversationalChat/display/chat-widget-manager.js +113 -0
  14. package/src/ConversationalChat/display/chat-widget-to-html.js +58 -0
  15. package/src/ConversationalChat/get-chat-messages.js +7 -0
  16. package/src/ConversationalChat/index.js +12 -0
  17. package/src/ConversationalChat/is-chat-conversation-ended.js +7 -0
  18. package/src/ConversationalChat/is-chat-turn-errored.js +7 -0
  19. package/src/ConversationalChat/is-chat-turn-in-progress.js +7 -0
  20. package/src/ConversationalChat/register-chat-action-handler.js +10 -0
  21. package/src/ConversationalChat/reset-chat-conversation.js +5 -0
  22. package/src/ConversationalChat/retrieve-chat-config.js +7 -0
  23. package/src/ConversationalChat/send-chat-message.js +17 -0
  24. package/src/ConversationalChat/subscribe-to-chat-action.js +5 -0
  25. package/src/ConversationalChat/subscribe-to-chat-conversation-updated.js +5 -0
  26. package/src/ConversationalChat/subscribe-to-chat-message-received.js +5 -0
  27. package/src/ConversationalChat/trigger-chat-action.js +11 -0
  28. package/src/ConversationalChat/types.js +1 -0
  29. package/src/Core/add-sdk-metadata.js +5 -5
  30. package/src/Core/change-user.js +6 -6
  31. package/src/Core/disable-sdk.js +6 -6
  32. package/src/Core/enable-sdk.js +3 -3
  33. package/src/Core/get-device-id.js +2 -2
  34. package/src/Core/handle-braze-action.js +20 -13
  35. package/src/Core/is-disabled.js +1 -1
  36. package/src/Core/is-initialized.js +1 -1
  37. package/src/Core/log-custom-event.js +9 -9
  38. package/src/Core/log-ecommerce-event.js +4 -4
  39. package/src/Core/log-purchase.js +14 -14
  40. package/src/Core/open-session.js +8 -8
  41. package/src/Core/set-sdk-authentication-signature.js +3 -3
  42. package/src/Core/subscribe-to-sdk-authentication-failures.js +1 -1
  43. package/src/Core/wipe-data.js +1 -1
  44. package/src/DUST/dust-config-store.js +35 -35
  45. package/src/DUST/dust-message-dedup.js +3 -3
  46. package/src/DUST/dust-provider-factory.js +10 -10
  47. package/src/DUST/dust-provider.js +234 -234
  48. package/src/DUST/subscribe-to-dust.js +7 -7
  49. package/src/FeatureFlags/feature-flag-factory.js +2 -2
  50. package/src/FeatureFlags/feature-flag.js +4 -4
  51. package/src/FeatureFlags/feature-flags-provider-factory.js +11 -11
  52. package/src/FeatureFlags/feature-flags-provider.js +38 -38
  53. package/src/FeatureFlags/get-all-feature-flags.js +3 -3
  54. package/src/FeatureFlags/get-feature-flag.js +3 -3
  55. package/src/FeatureFlags/log-feature-flag-impression.js +4 -4
  56. package/src/FeatureFlags/refresh-feature-flags.js +5 -5
  57. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +3 -3
  58. package/src/InAppMessage/defer-in-app-message.js +1 -1
  59. package/src/InAppMessage/display/html-message-display-utils.js +4 -4
  60. package/src/InAppMessage/display/html-message-to-html.js +13 -13
  61. package/src/InAppMessage/display/in-app-message-to-html.js +20 -20
  62. package/src/InAppMessage/display/modal-utils.js +7 -7
  63. package/src/InAppMessage/in-app-message-factory.js +6 -6
  64. package/src/InAppMessage/in-app-message-manager.js +92 -92
  65. package/src/InAppMessage/log-in-app-message-button-click.js +9 -9
  66. package/src/InAppMessage/log-in-app-message-click.js +7 -7
  67. package/src/InAppMessage/log-in-app-message-html-click.js +6 -6
  68. package/src/InAppMessage/log-in-app-message-impression.js +3 -3
  69. package/src/InAppMessage/models/full-screen-message.js +39 -39
  70. package/src/InAppMessage/models/html-message.js +20 -20
  71. package/src/InAppMessage/models/in-app-message-button.js +2 -2
  72. package/src/InAppMessage/models/in-app-message.js +102 -102
  73. package/src/InAppMessage/models/modal-message.js +38 -38
  74. package/src/InAppMessage/models/slide-up-message.js +34 -34
  75. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  76. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  77. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  78. package/src/InAppMessage/ui/remove-all-visible-in-app-messages.js +3 -3
  79. package/src/InAppMessage/ui/show-in-app-message.js +23 -23
  80. package/src/Push/is-push-blocked.js +2 -2
  81. package/src/Push/is-push-permission-granted.js +2 -2
  82. package/src/Push/is-push-supported.js +2 -2
  83. package/src/Push/push-manager-factory.js +15 -15
  84. package/src/Push/push-manager.js +13 -13
  85. package/src/Push/register-push.js +2 -2
  86. package/src/Push/request-push-permission.js +2 -2
  87. package/src/Push/unregister-push-token-on-server.js +3 -3
  88. package/src/Push/unregister-push.js +3 -3
  89. package/src/Push/utils/push-utils.js +15 -15
  90. package/src/User/user-manager.js +9 -9
  91. package/src/User/user.js +50 -50
  92. package/src/common/constants.js +1 -1
  93. package/src/common/content-cards-display.js +22 -22
  94. package/src/common/event-logger.js +3 -3
  95. package/src/index.js +2 -9
  96. package/src/l10n/l10n-manager-factory.js +4 -4
  97. package/src/l10n/l10n-manager.js +6 -6
  98. package/src/managers/auth-manager.js +28 -28
  99. package/src/managers/braze-action-manager.js +14 -0
  100. package/src/managers/braze-instance.js +159 -151
  101. package/src/managers/device-manager.js +26 -26
  102. package/src/managers/network-manager.js +120 -120
  103. package/src/managers/server-config-manager.js +95 -86
  104. package/src/managers/session-manager.js +25 -25
  105. package/src/managers/storage-manager-factory.js +12 -12
  106. package/src/managers/storage-manager.js +129 -124
  107. package/src/managers/subscription-manager.js +8 -8
  108. package/src/models/backend-errors.js +5 -5
  109. package/src/models/braze-event.js +5 -5
  110. package/src/models/device.js +2 -2
  111. package/src/models/identifier.js +8 -8
  112. package/src/models/push-token.js +6 -6
  113. package/src/models/request-result.js +2 -2
  114. package/src/models/server-config.js +27 -27
  115. package/src/request-controller.js +117 -117
  116. package/src/standard-index.js +9 -0
  117. package/src/triggers/models/custom-event-data.js +4 -4
  118. package/src/triggers/models/custom-event-property-data.js +5 -5
  119. package/src/triggers/models/filter-set.js +5 -5
  120. package/src/triggers/models/filter.js +31 -31
  121. package/src/triggers/models/in-app-message-click-data.js +9 -9
  122. package/src/triggers/models/purchase-data.js +1 -1
  123. package/src/triggers/models/purchase-property-data.js +5 -5
  124. package/src/triggers/models/push-click-data.js +4 -4
  125. package/src/triggers/models/trigger-condition.js +35 -35
  126. package/src/triggers/models/trigger-events.js +3 -3
  127. package/src/triggers/models/trigger.js +36 -36
  128. package/src/triggers/triggers-provider-factory.js +5 -5
  129. package/src/triggers/triggers-provider.js +128 -128
  130. package/src/types.js +2 -2
  131. package/src/ui/js/attach-css.js +1 -1
  132. package/src/ui/js/chat-widget-css.js +11 -0
  133. package/src/ui/js/load-font-awesome.js +1 -1
  134. package/src/util/base-device-parser.js +7 -7
  135. package/src/util/braze-actions.js +5 -5
  136. package/src/util/browser-detector.js +41 -41
  137. package/src/util/client-hints-parser.js +10 -10
  138. package/src/util/component-utils.js +1 -1
  139. package/src/util/date-utils.js +2 -2
  140. package/src/util/device-constants.js +5 -5
  141. package/src/util/dom-utils.js +8 -8
  142. package/src/util/ecommerce-event-validation.js +13 -13
  143. package/src/util/html-display-utils.js +6 -6
  144. package/src/util/key-codes.js +1 -1
  145. package/src/util/net.js +82 -44
  146. package/src/util/request-header-utils.js +26 -24
  147. package/src/util/user-agent-parser.js +21 -21
  148. package/src/util/validation-utils.js +29 -21
  149. package/src/util/window-utils.js +3 -3
@@ -1,7 +1,7 @@
1
1
  import {
2
- IamDismissType as pr,
3
- IamSerializationKeys as cr,
4
- IamServerTypes as gt,
2
+ IamDismissType as cr,
3
+ IamSerializationKeys as jr,
4
+ IamServerTypes as Ot,
5
5
  } from "../constants.js";
6
6
  import InAppMessage from "./in-app-message.js";
7
7
  export default class HtmlMessage extends InAppMessage {
@@ -15,7 +15,7 @@ export default class HtmlMessage extends InAppMessage {
15
15
  void 0,
16
16
  void 0,
17
17
  void 0,
18
- (t = t || pr.MANUAL),
18
+ (t = t || cr.MANUAL),
19
19
  d,
20
20
  void 0,
21
21
  void 0,
@@ -47,30 +47,30 @@ export default class HtmlMessage extends InAppMessage {
47
47
  return !1;
48
48
  }
49
49
  Yt(i) {
50
- if (this.Oo === gt.ME) {
50
+ if (this.Bo === Ot.ME) {
51
51
  if (this.rd) return !1;
52
52
  this.rd = !0;
53
53
  }
54
54
  return this.ti.A(i), !0;
55
55
  }
56
56
  qt() {
57
- const i = super.qt(gt.ME);
58
- return (i[cr.wE] = this.messageFields), i;
57
+ const i = super.qt(Ot.ME);
58
+ return (i[jr.wE] = this.messageFields), i;
59
59
  }
60
- static ua(i) {
60
+ static Ea(i) {
61
61
  return new HtmlMessage(
62
- i[cr.UE],
63
- i[cr.Is],
64
- i[cr.PE],
65
- i[cr.rE],
66
- i[cr.mE],
67
- i[cr.lE],
68
- i[cr.YE],
69
- i[cr.XE],
70
- i[cr.fE],
71
- i[cr.CSS],
72
- i[cr.wE],
73
- i[cr.jE],
62
+ i[jr.UE],
63
+ i[jr.Is],
64
+ i[jr.PE],
65
+ i[jr.rE],
66
+ i[jr.mE],
67
+ i[jr.lE],
68
+ i[jr.YE],
69
+ i[jr.XE],
70
+ i[jr.fE],
71
+ i[jr.CSS],
72
+ i[jr.wE],
73
+ i[jr.jE],
74
74
  );
75
75
  }
76
76
  }
@@ -15,7 +15,7 @@ export default class InAppMessageButton {
15
15
  (this.borderColor = r || this.backgroundColor),
16
16
  (this.clickAction = h || ce.NONE),
17
17
  (this.uri = e),
18
- null == n && (n = InAppMessageButton.Qn),
18
+ null == n && (n = InAppMessageButton.fa),
19
19
  (this.id = n),
20
20
  (this.rd = !1),
21
21
  (this.ti = new f());
@@ -44,4 +44,4 @@ export default class InAppMessageButton {
44
44
  );
45
45
  }
46
46
  }
47
- InAppMessageButton.Qn = -1;
47
+ InAppMessageButton.fa = -1;
@@ -1,28 +1,28 @@
1
1
  import r, { OPTIONS as U } from "../../managers/braze-instance.js";
2
- import ro from "../../util/browser-detector.js";
2
+ import eo from "../../util/browser-detector.js";
3
3
  import {
4
- clickElement as wt,
5
- supportsPassive as St,
4
+ clickElement as Et,
5
+ supportsPassive as Ht,
6
6
  } from "../../util/dom-utils.js";
7
7
  import { KeyCodes as le } from "../../util/key-codes.js";
8
8
  import f from "../../managers/subscription-manager.js";
9
- import { isIFrame as xt } from "../utils/in-app-message-utils.js";
9
+ import { isIFrame as Pt } from "../utils/in-app-message-utils.js";
10
10
  import {
11
- IamStrings as mr,
11
+ IamStrings as pr,
12
12
  IamColors as ss,
13
13
  IamClickAction as ce,
14
- IAM_SHOW_CLASS as Et,
15
- IAM_HIDE_CLASS as Ht,
14
+ IAM_SHOW_CLASS as Lt,
15
+ IAM_HIDE_CLASS as $t,
16
16
  IamSlideFrom as fe,
17
- IamDismissType as pr,
18
- IamOpenTarget as dt,
17
+ IamDismissType as cr,
18
+ IamOpenTarget as bt,
19
19
  IamImageStyle as ue,
20
20
  IamOrientation as be,
21
21
  IamTextAlignment as pe,
22
22
  IamCropType as de,
23
- IamServerTypes as gt,
24
- IamTiming as kt,
25
- IamSerializationKeys as cr,
23
+ IamServerTypes as Ot,
24
+ IamTiming as qt,
25
+ IamSerializationKeys as jr,
26
26
  } from "../constants.js";
27
27
  export default class InAppMessage {
28
28
  constructor(
@@ -99,8 +99,8 @@ export default class InAppMessage {
99
99
  (this.triggerId = e),
100
100
  (this.clickAction = n || ce.NONE),
101
101
  (this.uri = r),
102
- (this.openTarget = o || dt.NONE),
103
- (this.dismissType = l || pr.AUTO_DISMISS),
102
+ (this.openTarget = o || bt.NONE),
103
+ (this.dismissType = l || cr.AUTO_DISMISS),
104
104
  (this.icon = a),
105
105
  (this.imageUrl = m),
106
106
  (this.imageStyle = c || ue.TOP),
@@ -126,31 +126,31 @@ export default class InAppMessage {
126
126
  (this.messageExtras = C),
127
127
  (this.language = D),
128
128
  (this.altImageText = z),
129
- (this.th = !1),
129
+ (this.Hh = !1),
130
130
  (this.hs = !1),
131
131
  (this.rd = !1),
132
- (this.sh = !1),
133
- (this.ih = !1),
134
- (this.Bo = null),
132
+ (this.zh = !1),
133
+ (this.Kh = !1),
134
+ (this._o = null),
135
135
  (this.$o = null),
136
136
  (this.ti = new f()),
137
- (this.hh = new f()),
138
- (this.qo = pe.CENTER);
137
+ (this.Qh = new f()),
138
+ (this.Ao = pe.CENTER);
139
139
  }
140
140
  subscribeToClickedEvent(t) {
141
141
  return this.ti.Ut(t);
142
142
  }
143
143
  subscribeToDismissedEvent(t) {
144
- return this.hh.Ut(t);
144
+ return this.Qh.Ut(t);
145
145
  }
146
146
  removeSubscription(t) {
147
- this.ti.removeSubscription(t), this.hh.removeSubscription(t);
147
+ this.ti.removeSubscription(t), this.Qh.removeSubscription(t);
148
148
  }
149
149
  removeAllSubscriptions() {
150
- this.ti.removeAllSubscriptions(), this.hh.removeAllSubscriptions();
150
+ this.ti.removeAllSubscriptions(), this.Qh.removeAllSubscriptions();
151
151
  }
152
152
  closeMessage() {
153
- this.tl(this.Bo);
153
+ this.tl(this._o);
154
154
  }
155
155
  zo() {
156
156
  return !0;
@@ -158,14 +158,14 @@ export default class InAppMessage {
158
158
  od() {
159
159
  return this.zo();
160
160
  }
161
- ko() {
161
+ Eo() {
162
162
  return null != this.htmlId && this.htmlId.length > 4;
163
163
  }
164
- Mo() {
165
- return this.ko() && null != this.css && this.css.length > 0;
164
+ Oo() {
165
+ return this.Eo() && null != this.css && this.css.length > 0;
166
166
  }
167
- Co() {
168
- if (this.ko() && this.Mo()) return this.htmlId + "-css";
167
+ ko() {
168
+ if (this.Eo() && this.Oo()) return this.htmlId + "-css";
169
169
  }
170
170
  js() {
171
171
  return !this.hs && ((this.hs = !0), !0);
@@ -177,26 +177,26 @@ export default class InAppMessage {
177
177
  return !this.rd && ((this.rd = !0), this.ti.A(), !0);
178
178
  }
179
179
  Ft() {
180
- return !this.sh && ((this.sh = !0), this.hh.A(), !0);
180
+ return !this.zh && ((this.zh = !0), this.Qh.A(), !0);
181
181
  }
182
182
  hide(t) {
183
183
  if (t && t.parentNode) {
184
184
  let s = t.closest(".ab-iam-root");
185
185
  if ((null == s && (s = t), this.zo() && null != s.parentNode)) {
186
186
  const t = s.parentNode.classList;
187
- t && t.contains(mr.TE) && t.remove(mr.TE),
188
- document.body.removeEventListener("touchmove", InAppMessage.eh);
187
+ t && t.contains(pr.TE) && t.remove(pr.TE),
188
+ document.body.removeEventListener("touchmove", InAppMessage.Vh);
189
189
  }
190
- s.className = s.className.replace(Et, Ht);
190
+ s.className = s.className.replace(Lt, $t);
191
191
  }
192
192
  return this.animateOut || !1;
193
193
  }
194
194
  tl(t, s) {
195
195
  if (null == t) return;
196
- if (this.ih) return;
196
+ if (this.Kh) return;
197
197
  let i;
198
- (this.ih = !0),
199
- (this.Bo = null),
198
+ (this.Kh = !0),
199
+ (this._o = null),
200
200
  (i =
201
201
  -1 === t.className.indexOf("ab-in-app-message")
202
202
  ? t.getElementsByClassName("ab-in-app-message")[0]
@@ -211,131 +211,131 @@ export default class InAppMessage {
211
211
  let s = t.closest(".ab-iam-root");
212
212
  null == s && (s = t), s.parentNode && s.parentNode.removeChild(s);
213
213
  }
214
- const i = this.Co();
214
+ const i = this.ko();
215
215
  if (null != i) {
216
216
  const t = document.getElementById(i);
217
217
  t && t.parentNode && t.parentNode.removeChild(t);
218
218
  }
219
- null != e && "Safari" === ro.browser && (e.scrollTop = n),
219
+ null != e && "Safari" === eo.browser && (e.scrollTop = n),
220
220
  s ? s() : this.Ft();
221
221
  };
222
- h ? setTimeout(r, kt.gr) : r(), this.$o && this.$o.focus();
222
+ h ? setTimeout(r, qt.gr) : r(), this.$o && this.$o.focus();
223
223
  }
224
- Eo() {
224
+ Ho() {
225
225
  return document.createTextNode(this.message || "");
226
226
  }
227
- Ao(t) {
227
+ Do(t) {
228
228
  t.setAttribute("alt", this.altImageText || "");
229
229
  }
230
- static eh(t) {
230
+ static Vh(t) {
231
231
  if (t.targetTouches && t.targetTouches.length > 1) return;
232
232
  const s = t.target;
233
233
  (s &&
234
234
  s.classList &&
235
235
  s.classList.contains("ab-message-text") &&
236
236
  s.scrollHeight > s.clientHeight) ||
237
- (document.querySelector(`.${mr.TE}`) &&
237
+ (document.querySelector(`.${pr.TE}`) &&
238
238
  t.cancelable &&
239
239
  t.preventDefault());
240
240
  }
241
- nh(t) {
242
- this.ih = !1;
241
+ Wh(t) {
242
+ this.Kh = !1;
243
243
  const s = t.parentNode;
244
244
  this.zo() &&
245
245
  null != s &&
246
246
  this.orientation !== be.LANDSCAPE &&
247
- (null != s.classList && s.classList.add(mr.TE),
247
+ (null != s.classList && s.classList.add(pr.TE),
248
248
  document.body.addEventListener(
249
249
  "touchmove",
250
- InAppMessage.eh,
251
- !!St() && { passive: !1 },
250
+ InAppMessage.Vh,
251
+ !!Ht() && { passive: !1 },
252
252
  )),
253
- (t.className += " " + Et);
253
+ (t.className += " " + Lt);
254
254
  }
255
- static rh(t) {
255
+ static Xh(t) {
256
256
  if (
257
- t.keyCode === le.oh &&
258
- !r.er(U.lh) &&
257
+ t.keyCode === le.Yh &&
258
+ !r.er(U.Zh) &&
259
259
  document.querySelectorAll(".ab-modal-interactions").length > 0
260
260
  ) {
261
261
  const t = document.getElementsByClassName("ab-html-message");
262
262
  let s = !1;
263
263
  for (const i of t) {
264
264
  let t = null;
265
- xt(i) &&
265
+ Pt(i) &&
266
266
  i.contentWindow &&
267
267
  (t = i.contentWindow.document.getElementsByClassName(
268
268
  "ab-programmatic-close-button",
269
269
  )[0]),
270
- null != t && (wt(t), (s = !0));
270
+ null != t && (Et(t), (s = !0));
271
271
  }
272
272
  if (!s) {
273
273
  const t = document.querySelectorAll(
274
274
  ".ab-modal-interactions > .ab-close-button",
275
275
  )[0];
276
- null != t && wt(t);
276
+ null != t && Et(t);
277
277
  }
278
278
  }
279
279
  }
280
- uh() {
281
- this.th ||
282
- r.er(U.lh) ||
283
- (document.addEventListener("keydown", InAppMessage.rh, !1),
284
- r.ah(() => {
285
- document.removeEventListener("keydown", InAppMessage.rh);
280
+ _h() {
281
+ this.Hh ||
282
+ r.er(U.Zh) ||
283
+ (document.addEventListener("keydown", InAppMessage.Xh, !1),
284
+ r.On(() => {
285
+ document.removeEventListener("keydown", InAppMessage.Xh);
286
286
  }),
287
- (this.th = !0));
287
+ (this.Hh = !0));
288
288
  }
289
289
  qt(t) {
290
290
  const s = {};
291
291
  return t
292
- ? ((s[cr.UE] = this.message),
293
- (s[cr.cE] = this.messageAlignment),
294
- (s[cr.nE] = this.slideFrom),
295
- (s[cr.Is] = this.extras),
296
- (s[cr.PE] = this.triggerId),
297
- (s[cr.iE] = this.clickAction),
298
- (s[cr.URI] = this.uri),
299
- (s[cr.pE] = this.openTarget),
300
- (s[cr.rE] = this.dismissType),
301
- (s[cr.mE] = this.duration),
302
- (s[cr.GE] = this.icon),
303
- (s[cr.Bs] = this.imageUrl),
304
- (s[cr.xE] = this.imageStyle),
305
- (s[cr.HE] = this.iconColor),
306
- (s[cr.FE] = this.iconBackgroundColor),
307
- (s[cr.BE] = this.backgroundColor),
308
- (s[cr.bE] = this.textColor),
309
- (s[cr.gE] = this.closeButtonColor),
310
- (s[cr.lE] = this.animateIn),
311
- (s[cr.YE] = this.animateOut),
312
- (s[cr.hE] = this.header),
313
- (s[cr.KE] = this.headerAlignment),
314
- (s[cr.WE] = this.headerTextColor),
315
- (s[cr.XE] = this.frameColor),
316
- (s[cr.yE] = this.buttons),
317
- (s[cr.dE] = this.cropType),
318
- (s[cr.uE] = this.orientation),
319
- (s[cr.fE] = this.htmlId),
320
- (s[cr.CSS] = this.css),
321
- (s[cr.xs] = t),
322
- (s[cr.jE] = this.messageExtras),
323
- (s[cr.LANGUAGE] = this.language),
324
- (s[cr.Ns] = this.altImageText),
292
+ ? ((s[jr.UE] = this.message),
293
+ (s[jr.cE] = this.messageAlignment),
294
+ (s[jr.nE] = this.slideFrom),
295
+ (s[jr.Is] = this.extras),
296
+ (s[jr.PE] = this.triggerId),
297
+ (s[jr.iE] = this.clickAction),
298
+ (s[jr.URI] = this.uri),
299
+ (s[jr.pE] = this.openTarget),
300
+ (s[jr.rE] = this.dismissType),
301
+ (s[jr.mE] = this.duration),
302
+ (s[jr.GE] = this.icon),
303
+ (s[jr.Bs] = this.imageUrl),
304
+ (s[jr.xE] = this.imageStyle),
305
+ (s[jr.HE] = this.iconColor),
306
+ (s[jr.FE] = this.iconBackgroundColor),
307
+ (s[jr.BE] = this.backgroundColor),
308
+ (s[jr.bE] = this.textColor),
309
+ (s[jr.gE] = this.closeButtonColor),
310
+ (s[jr.lE] = this.animateIn),
311
+ (s[jr.YE] = this.animateOut),
312
+ (s[jr.hE] = this.header),
313
+ (s[jr.KE] = this.headerAlignment),
314
+ (s[jr.WE] = this.headerTextColor),
315
+ (s[jr.XE] = this.frameColor),
316
+ (s[jr.yE] = this.buttons),
317
+ (s[jr.dE] = this.cropType),
318
+ (s[jr.uE] = this.orientation),
319
+ (s[jr.fE] = this.htmlId),
320
+ (s[jr.CSS] = this.css),
321
+ (s[jr.xs] = t),
322
+ (s[jr.jE] = this.messageExtras),
323
+ (s[jr.LANGUAGE] = this.language),
324
+ (s[jr.Ns] = this.altImageText),
325
325
  s)
326
326
  : s;
327
327
  }
328
328
  }
329
- (InAppMessage.mh = ss),
329
+ (InAppMessage.sl = ss),
330
330
  (InAppMessage.SlideFrom = fe),
331
331
  (InAppMessage.ClickAction = ce),
332
- (InAppMessage.DismissType = pr),
333
- (InAppMessage.OpenTarget = dt),
332
+ (InAppMessage.DismissType = cr),
333
+ (InAppMessage.OpenTarget = bt),
334
334
  (InAppMessage.ImageStyle = ue),
335
335
  (InAppMessage.Orientation = be),
336
336
  (InAppMessage.TextAlignment = pe),
337
337
  (InAppMessage.CropType = de),
338
- (InAppMessage.dh = gt),
339
- (InAppMessage.gr = kt.gr),
340
- (InAppMessage.sE = kt.sE),
341
- (InAppMessage.bs = cr);
338
+ (InAppMessage.il = Ot),
339
+ (InAppMessage.gr = qt.gr),
340
+ (InAppMessage.sE = qt.sE),
341
+ (InAppMessage.bs = jr);
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  IamCropType as de,
3
- IamDismissType as pr,
4
- IamSerializationKeys as cr,
5
- IamServerTypes as gt,
3
+ IamDismissType as cr,
4
+ IamSerializationKeys as jr,
5
+ IamServerTypes as Ot,
6
6
  IamTextAlignment as pe,
7
7
  } from "../constants.js";
8
- import { buttonsFromSerializedInAppMessage as ur } from "../in-app-message-factory.js";
8
+ import { buttonsFromSerializedInAppMessage as gr } from "../in-app-message-factory.js";
9
9
  import InAppMessage from "./in-app-message.js";
10
10
  export default class ModalMessage extends InAppMessage {
11
11
  constructor(
@@ -49,7 +49,7 @@ export default class ModalMessage extends InAppMessage {
49
49
  o,
50
50
  i,
51
51
  a,
52
- (p = p || pr.MANUAL),
52
+ (p = p || cr.MANUAL),
53
53
  m,
54
54
  n,
55
55
  c,
@@ -74,43 +74,43 @@ export default class ModalMessage extends InAppMessage {
74
74
  B,
75
75
  C,
76
76
  ),
77
- (this.qo = pe.CENTER);
77
+ (this.Ao = pe.CENTER);
78
78
  }
79
79
  qt() {
80
- return super.qt(gt.tE);
80
+ return super.qt(Ot.tE);
81
81
  }
82
- static ua(r) {
82
+ static Ea(r) {
83
83
  return new ModalMessage(
84
- r[cr.UE],
85
- r[cr.cE],
86
- r[cr.Is],
87
- r[cr.PE],
88
- r[cr.iE],
89
- r[cr.URI],
90
- r[cr.pE],
91
- r[cr.rE],
92
- r[cr.mE],
93
- r[cr.GE],
94
- r[cr.Bs],
95
- r[cr.xE],
96
- r[cr.HE],
97
- r[cr.FE],
98
- r[cr.BE],
99
- r[cr.bE],
100
- r[cr.gE],
101
- r[cr.lE],
102
- r[cr.YE],
103
- r[cr.hE],
104
- r[cr.KE],
105
- r[cr.WE],
106
- r[cr.XE],
107
- ur(r[cr.yE]),
108
- r[cr.dE],
109
- r[cr.fE],
110
- r[cr.CSS],
111
- r[cr.jE],
112
- r[cr.LANGUAGE],
113
- r[cr.Ns],
84
+ r[jr.UE],
85
+ r[jr.cE],
86
+ r[jr.Is],
87
+ r[jr.PE],
88
+ r[jr.iE],
89
+ r[jr.URI],
90
+ r[jr.pE],
91
+ r[jr.rE],
92
+ r[jr.mE],
93
+ r[jr.GE],
94
+ r[jr.Bs],
95
+ r[jr.xE],
96
+ r[jr.HE],
97
+ r[jr.FE],
98
+ r[jr.BE],
99
+ r[jr.bE],
100
+ r[jr.gE],
101
+ r[jr.lE],
102
+ r[jr.YE],
103
+ r[jr.hE],
104
+ r[jr.KE],
105
+ r[jr.WE],
106
+ r[jr.XE],
107
+ gr(r[jr.yE]),
108
+ r[jr.dE],
109
+ r[jr.fE],
110
+ r[jr.CSS],
111
+ r[jr.jE],
112
+ r[jr.LANGUAGE],
113
+ r[jr.Ns],
114
114
  );
115
115
  }
116
116
  }
@@ -1,9 +1,9 @@
1
1
  import InAppMessage from "./in-app-message.js";
2
- import { DOMUtils as zt } from "../../util/dom-utils.js";
2
+ import { DOMUtils as Gt } from "../../util/dom-utils.js";
3
3
  import {
4
4
  IamColors as ss,
5
- IamSerializationKeys as cr,
6
- IamServerTypes as gt,
5
+ IamSerializationKeys as jr,
6
+ IamServerTypes as Ot,
7
7
  IamSlideFrom as fe,
8
8
  IamTextAlignment as pe,
9
9
  } from "../constants.js";
@@ -70,52 +70,52 @@ export default class SlideUpMessage extends InAppMessage {
70
70
  b,
71
71
  z,
72
72
  ),
73
- (this.qo = pe.START);
73
+ (this.Ao = pe.START);
74
74
  }
75
75
  zo() {
76
76
  return !1;
77
77
  }
78
- Eo() {
78
+ Ho() {
79
79
  const t = document.createElement("span");
80
80
  return t.appendChild(document.createTextNode(this.message || "")), t;
81
81
  }
82
- nh(t) {
82
+ Wh(t) {
83
83
  const s = t.getElementsByClassName("ab-in-app-message")[0];
84
- zt.td(s, !0, !0) ||
84
+ Gt.td(s, !0, !0) ||
85
85
  (this.slideFrom === fe.TOP
86
86
  ? (s.style.top = "0px")
87
87
  : (s.style.bottom = "0px")),
88
- super.nh(t);
88
+ super.Wh(t);
89
89
  }
90
90
  qt() {
91
- return super.qt(gt.RE);
91
+ return super.qt(Ot.RE);
92
92
  }
93
- static ua(t) {
93
+ static Ea(t) {
94
94
  return new SlideUpMessage(
95
- t[cr.UE],
96
- t[cr.cE],
97
- t[cr.nE],
98
- t[cr.Is],
99
- t[cr.PE],
100
- t[cr.iE],
101
- t[cr.URI],
102
- t[cr.pE],
103
- t[cr.rE],
104
- t[cr.mE],
105
- t[cr.GE],
106
- t[cr.Bs],
107
- t[cr.HE],
108
- t[cr.FE],
109
- t[cr.BE],
110
- t[cr.bE],
111
- t[cr.gE],
112
- t[cr.lE],
113
- t[cr.YE],
114
- t[cr.fE],
115
- t[cr.CSS],
116
- t[cr.jE],
117
- t[cr.LANGUAGE],
118
- t[cr.Ns],
95
+ t[jr.UE],
96
+ t[jr.cE],
97
+ t[jr.nE],
98
+ t[jr.Is],
99
+ t[jr.PE],
100
+ t[jr.iE],
101
+ t[jr.URI],
102
+ t[jr.pE],
103
+ t[jr.rE],
104
+ t[jr.mE],
105
+ t[jr.GE],
106
+ t[jr.Bs],
107
+ t[jr.HE],
108
+ t[jr.FE],
109
+ t[jr.BE],
110
+ t[jr.bE],
111
+ t[jr.gE],
112
+ t[jr.lE],
113
+ t[jr.YE],
114
+ t[jr.fE],
115
+ t[jr.CSS],
116
+ t[jr.jE],
117
+ t[jr.LANGUAGE],
118
+ t[jr.Ns],
119
119
  );
120
120
  }
121
121
  }
@@ -1,15 +1,15 @@
1
1
  export default class Jt {
2
2
  constructor(t, s, i, h, l) {
3
3
  (this.triggerId = t),
4
- (this.Zo = s),
5
- (this.Vo = i),
6
- (this.ta = h),
7
- (this.ia = l),
4
+ (this.Ra = s),
5
+ (this.Sa = i),
6
+ (this._a = h),
7
+ (this.qa = l),
8
8
  (this.triggerId = t),
9
- (this.Zo = s),
10
- (this.Vo = i),
11
- (this.ta = h),
12
- (this.ia = l);
9
+ (this.Ra = s),
10
+ (this.Sa = i),
11
+ (this._a = h),
12
+ (this.qa = l);
13
13
  }
14
14
  static fromJson(t, s, i, h, l) {
15
15
  return null == t || null == t.trigger_id
@@ -4,7 +4,7 @@ export function subscribeToInAppMessage(n) {
4
4
  if (r.rr())
5
5
  return "function" != typeof n
6
6
  ? null
7
- : se.ra().En(function (r) {
7
+ : se.ra().ia(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 (!r.rr()) return;
8
8
  rs();
9
9
  const s = se.ra();
10
- if (null == s.Gn()) {
10
+ if (null == s.oa()) {
11
11
  const r = subscribeToInAppMessage((s) => showInAppMessage(s));
12
- s.Nn(r);
12
+ s.la(r);
13
13
  }
14
- return s.Gn();
14
+ return s.oa();
15
15
  }