@braze/web-sdk 5.6.1 → 5.7.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 (121) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +14 -4
  3. package/package.json +1 -1
  4. package/shared-lib/encoding-utils.js +1 -1
  5. package/shared-lib/event-types.js +20 -20
  6. package/shared-lib/indexed-db-adapter.js +15 -15
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +14 -14
  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 +2 -2
  12. package/src/Banner/get-banner.js +2 -2
  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 +2 -2
  16. package/src/Banner/subscribe-to-banners-updates.js +5 -5
  17. package/src/Card/card-manager.js +10 -10
  18. package/src/Card/models/captioned-image.js +1 -1
  19. package/src/Card/models/card.js +3 -3
  20. package/src/Card/models/classic-card.js +1 -1
  21. package/src/Card/models/control-card.js +1 -1
  22. package/src/Card/models/image-only.js +1 -1
  23. package/src/ContentCards/content-cards-provider.js +139 -180
  24. package/src/ContentCards/get-cached-content-cards.js +1 -1
  25. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  26. package/src/ContentCards/subscribe-to-content-cards-updates.js +10 -10
  27. package/src/ContentCards/ui/show-content-cards.js +3 -3
  28. package/src/Core/disable-sdk.js +3 -3
  29. package/src/Core/enable-sdk.js +3 -3
  30. package/src/Core/log-custom-event.js +3 -3
  31. package/src/Core/log-purchase.js +1 -1
  32. package/src/Core/open-session.js +6 -6
  33. package/src/Core/wipe-data.js +4 -4
  34. package/src/FeatureFlags/feature-flag.js +1 -1
  35. package/src/FeatureFlags/feature-flags-provider.js +81 -78
  36. package/src/FeatureFlags/get-all-feature-flags.js +2 -2
  37. package/src/FeatureFlags/get-feature-flag.js +2 -2
  38. package/src/FeatureFlags/log-feature-flag-impression.js +4 -4
  39. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
  40. package/src/Feed/feed-provider.js +34 -34
  41. package/src/Feed/get-cached-feed.js +1 -1
  42. package/src/Feed/request-feed-refresh.js +1 -1
  43. package/src/Feed/subscribe-to-feed-updates.js +1 -1
  44. package/src/Feed/ui/show-feed.js +1 -1
  45. package/src/InAppMessage/defer-in-app-message.js +1 -1
  46. package/src/InAppMessage/display/html-message-to-html.js +9 -9
  47. package/src/InAppMessage/display/in-app-message-to-html.js +16 -16
  48. package/src/InAppMessage/display/modal-utils.js +5 -5
  49. package/src/InAppMessage/in-app-message-factory.js +4 -4
  50. package/src/InAppMessage/in-app-message-manager.js +115 -91
  51. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  52. package/src/InAppMessage/log-in-app-message-click.js +2 -2
  53. package/src/InAppMessage/log-in-app-message-html-click.js +4 -4
  54. package/src/InAppMessage/log-in-app-message-impression.js +2 -2
  55. package/src/InAppMessage/models/full-screen-message.js +5 -5
  56. package/src/InAppMessage/models/html-message.js +10 -10
  57. package/src/InAppMessage/models/in-app-message-button.js +5 -5
  58. package/src/InAppMessage/models/in-app-message.js +37 -37
  59. package/src/InAppMessage/models/modal-message.js +5 -5
  60. package/src/InAppMessage/models/slide-up-message.js +7 -7
  61. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  62. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  63. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  64. package/src/InAppMessage/ui/show-in-app-message.js +14 -14
  65. package/src/Push/is-push-blocked.js +2 -2
  66. package/src/Push/is-push-permission-granted.js +2 -2
  67. package/src/Push/is-push-supported.js +2 -2
  68. package/src/Push/push-manager.js +88 -88
  69. package/src/Push/utils/push-utils.js +12 -12
  70. package/src/User/user-manager.js +10 -10
  71. package/src/User/user.js +46 -34
  72. package/src/common/constants.js +1 -1
  73. package/src/common/event-logger.js +3 -3
  74. package/src/common/feed-display.js +10 -10
  75. package/src/l10n/l10n-manager.js +1 -1
  76. package/src/managers/auth-manager.js +10 -10
  77. package/src/managers/braze-instance.js +110 -110
  78. package/src/managers/device-manager.js +17 -17
  79. package/src/managers/network-manager.js +180 -143
  80. package/src/managers/server-config-manager.js +65 -65
  81. package/src/managers/session-manager.js +22 -22
  82. package/src/managers/storage-manager-factory.js +9 -9
  83. package/src/managers/storage-manager.js +134 -134
  84. package/src/managers/subscription-manager.js +8 -8
  85. package/src/managers/utils.js +1 -1
  86. package/src/models/backend-errors.js +5 -5
  87. package/src/models/braze-event.js +8 -8
  88. package/src/models/device.js +2 -2
  89. package/src/models/identifier.js +10 -10
  90. package/src/models/push-token.js +8 -8
  91. package/src/models/server-config.js +31 -31
  92. package/src/request-controller.js +158 -146
  93. package/src/triggers/models/custom-event-data.js +5 -5
  94. package/src/triggers/models/custom-event-property-data.js +6 -6
  95. package/src/triggers/models/filter-set.js +6 -6
  96. package/src/triggers/models/filter.js +16 -16
  97. package/src/triggers/models/in-app-message-click-data.js +2 -2
  98. package/src/triggers/models/purchase-data.js +2 -2
  99. package/src/triggers/models/purchase-property-data.js +4 -4
  100. package/src/triggers/models/push-click-data.js +2 -2
  101. package/src/triggers/models/trigger-condition.js +36 -36
  102. package/src/triggers/models/trigger-events.js +1 -1
  103. package/src/triggers/models/trigger.js +11 -11
  104. package/src/triggers/triggers-provider-factory.js +2 -2
  105. package/src/triggers/triggers-provider.js +37 -37
  106. package/src/ui/js/attach-css.js +1 -1
  107. package/src/ui/js/iam-css.js +1 -1
  108. package/src/ui/js/load-font-awesome.js +1 -1
  109. package/src/util/base-device-parser.js +1 -1
  110. package/src/util/braze-actions.js +4 -4
  111. package/src/util/browser-detector.js +6 -6
  112. package/src/util/client-hints-parser.js +1 -1
  113. package/src/util/component-utils.js +2 -2
  114. package/src/util/dom-utils.js +3 -3
  115. package/src/util/html-display-utils.js +1 -0
  116. package/src/util/key-codes.js +1 -1
  117. package/src/util/net.js +22 -23
  118. package/src/util/request-header-utils.js +23 -20
  119. package/src/util/user-agent-parser.js +1 -1
  120. package/src/util/validation-utils.js +14 -14
  121. package/src/util/window-utils.js +2 -2
@@ -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
+ vo: (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
+ xo: (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
+ wo: (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);
@@ -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.We.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.We.Ve &&
142
+ o !== InAppMessage.We.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.Qe = o), C;
152
152
  }
153
153
  export function buttonsFromSerializedInAppMessage(e) {
154
154
  const o = [];
@@ -16,10 +16,10 @@ import {
16
16
  containsPushPrimerBrazeAction as gt,
17
17
  containsUnknownBrazeAction as ft,
18
18
  getDecodedBrazeAction as eo,
19
- ineligibleBrazeActionURLErrorMessage as jt,
20
- INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as vt,
19
+ ineligibleBrazeActionURLErrorMessage as dt,
20
+ INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as jt,
21
21
  } from "../util/braze-actions.js";
22
- import yt from "../Push/utils/push-utils.js";
22
+ import vt from "../Push/utils/push-utils.js";
23
23
  import h from "../util/request-header-utils.js";
24
24
  import { STORAGE_KEYS as t } from "../managers/storage-manager.js";
25
25
  import { FullScreenMessage, ModalMessage, SlideUpMessage } from "./index.js";
@@ -33,28 +33,30 @@ export default class ea {
33
33
  (this.T = e),
34
34
  (this.C = s),
35
35
  (this.As = i),
36
- (this.Ir = new u()),
37
- r.N(this.Ir),
38
- (this.Mr = 1e3),
39
- (this.Tr = 6e4),
40
- (this.Br = null);
36
+ (this._i = new u()),
37
+ r.N(this._i),
38
+ (this.Pi = 1e3),
39
+ (this.$i = 6e4),
40
+ (this.Oi = null),
41
+ (this.Xi = null),
42
+ (this.Qi = null);
41
43
  }
42
- _r() {
43
- return this.Ir;
44
+ Vi() {
45
+ return this._i;
44
46
  }
45
- qr(t) {
46
- return this.Ir.Ns(t);
47
+ Wi(t) {
48
+ return this._i.Fs(t);
47
49
  }
48
- Er() {
49
- return this.Br;
50
+ Yi() {
51
+ return this.Oi;
50
52
  }
51
- Gr(t) {
52
- this.Br = t;
53
+ Zi(t) {
54
+ this.Oi = t;
53
55
  }
54
- ds(t, e, s, i) {
56
+ cs(t, e, s, i) {
55
57
  const r = new E();
56
58
  let n;
57
- if (e === d.Nr || t instanceof ControlMessage) {
59
+ if (e === d.Ir || t instanceof ControlMessage) {
58
60
  if (!t.wt())
59
61
  return (
60
62
  N.info(
@@ -62,7 +64,7 @@ export default class ea {
62
64
  ),
63
65
  r
64
66
  );
65
- } else if (e === d.Cr || (t instanceof HtmlMessage && e === d.Or)) {
67
+ } else if (e === d.Mr || (t instanceof HtmlMessage && e === d.Tr)) {
66
68
  if (!t.rt(i))
67
69
  return (
68
70
  N.info(
@@ -75,15 +77,15 @@ export default class ea {
75
77
  (n =
76
78
  t instanceof ControlMessage
77
79
  ? { trigger_ids: [t.triggerId] }
78
- : this.Xr(t)),
80
+ : this.Br(t)),
79
81
  null == n
80
82
  ? r
81
83
  : (t.messageExtras && (n.message_extras = t.messageExtras),
82
84
  null != s && (n.bid = s),
83
- c.ds(e, n))
85
+ c.cs(e, n))
84
86
  );
85
87
  }
86
- Hr(t, e) {
88
+ _r(t, e) {
87
89
  const s = new E();
88
90
  if (!t.rt())
89
91
  return (
@@ -92,32 +94,32 @@ export default class ea {
92
94
  ),
93
95
  s
94
96
  );
95
- const i = this.Xr(e);
97
+ const i = this.Br(e);
96
98
  return null == i
97
99
  ? s
98
- : t.id === InAppMessageButton.Jr
100
+ : t.id === InAppMessageButton.qr
99
101
  ? (N.info(
100
102
  "This in-app message button does not have a tracking id. Not logging event to Braze servers.",
101
103
  ),
102
104
  s)
103
- : (null != t.id && (i.bid = t.id), c.ds(d.Or, i));
105
+ : (null != t.id && (i.bid = t.id), c.cs(d.Tr, i));
104
106
  }
105
- Kr(t) {
107
+ Er(t) {
106
108
  const e = t.messageFields;
107
109
  return (null != e && e.is_push_primer) || !1;
108
110
  }
109
- Lr(t) {
111
+ Gr(t) {
110
112
  if (!(t instanceof InAppMessage)) return;
111
113
  const e = (t) => {
112
114
  if (!t) return;
113
115
  const e = eo(t);
114
116
  return ft(e)
115
- ? jt(vt.Qr, "In-App Message")
116
- : gt(e) && !yt.Ur()
117
- ? jt(vt.Vr, "In-App Message")
117
+ ? dt(jt.Nr, "In-App Message")
118
+ : gt(e) && !vt.Cr()
119
+ ? dt(jt.Or, "In-App Message")
118
120
  : void 0;
119
121
  };
120
- if (this.Kr(t) && !yt.Ur())
122
+ if (this.Er(t) && !vt.Cr())
121
123
  return "In-App Message contains a push prompt, but is not eligible for a push prompt. Ignoring.";
122
124
  const s = t.buttons || [];
123
125
  let i;
@@ -135,60 +137,82 @@ export default class ea {
135
137
  ? e(t.uri)
136
138
  : void 0;
137
139
  }
138
- Wr(t, e, s, i) {
140
+ Xr(t, e) {
141
+ e !== this.Qi && this.Hr(), (this.Xi = t), (this.Qi = e);
142
+ }
143
+ Hr() {
144
+ null != this.Xi &&
145
+ (clearTimeout(this.Xi), (this.Xi = null), (this.Qi = null));
146
+ }
147
+ Jr(t, e, s, i) {
139
148
  const r = this.S;
140
149
  if (!r) return;
141
- const n = r.Yr(!1, !1),
150
+ this.Qi && t.triggerId !== this.Qi && (this.Hr(), h.zi(this.C, h.O.Kr));
151
+ const n = r.Lr(!1, !1),
142
152
  o = r.H(n);
143
153
  (o.template = { trigger_id: t.triggerId, trigger_event_type: e }),
144
- null != s && (o.template.data = s.Zr());
145
- const u = r.J(o, h.O.sn);
154
+ null != s && (o.template.data = s.Qr());
155
+ const u = r.J(o, h.O.Kr);
146
156
  r.V(
147
157
  o,
148
158
  (r = -1) => {
149
- if (!this.S) return;
150
- const n = new Date().valueOf();
151
- h.W(this.C, h.O.sn, n),
152
- -1 !== r && u.push(["X-Braze-Req-Tokens-Remaining", r.toString()]),
153
- l.Y({
154
- url: `${this.S.Z()}/template/`,
155
- data: o,
156
- headers: u,
157
- ss: (e) => {
158
- if ((h.ns(this.C, h.O.sn, 1), !this.S.ts(o, e, u)))
159
- return void ("function" == typeof t.on && t.on());
160
- if ((this.S.es(), null == e || null == e.templated_message))
161
- return;
162
- const s = e.templated_message;
163
- if (s.type !== pt.ln.an) return;
164
- const i = ut(s.data);
165
- if (null == i) return;
166
- const r = this.Lr(i);
167
- if (r)
168
- return N.error(r), void ("function" == typeof t.on && t.on());
169
- "function" == typeof t.un && t.un(i);
170
- },
171
- error: (r) => {
172
- let n = `getting user personalization for message ${t.triggerId}`;
173
- if (new Date().valueOf() - t.pn < t.mn) {
174
- h.hs(this.C, h.O.sn);
175
- const r = Math.min(t.mn, this.Tr),
176
- o = this.Mr;
177
- null == i && (i = o);
178
- const l = Math.min(r, a(o, 3 * i));
179
- (n += `. Retrying in ${l} ms`),
180
- setTimeout(() => {
181
- this.Wr(t, e, s, l);
182
- }, l);
159
+ const n = this.S;
160
+ if (!n) return;
161
+ const p = new Date().valueOf();
162
+ h.W(this.C, h.O.Kr, p),
163
+ -1 !== r && u.push(["X-Braze-Req-Tokens-Remaining", r.toString()]);
164
+ let m,
165
+ c,
166
+ g = !1;
167
+ l.Y({
168
+ url: `${n.Z()}/template/`,
169
+ data: o,
170
+ headers: u,
171
+ ss: (e) => {
172
+ if (!n.ts(o, e, u))
173
+ return void ("function" == typeof t.Ur && t.Ur());
174
+ if ((n.es(), null == e || null == e.templated_message)) return;
175
+ const s = e.templated_message;
176
+ if (s.type !== pt.Wr.Vr) return;
177
+ const i = ut(s.data);
178
+ if (null == i) return;
179
+ const r = this.Gr(i);
180
+ if (r)
181
+ return N.error(r), void ("function" == typeof t.Ur && t.Ur());
182
+ "function" == typeof t.Yr && t.Yr(i);
183
+ },
184
+ error: (e) => {
185
+ (g = !0),
186
+ (m = e),
187
+ (c = `getting user personalization for message ${t.triggerId}.`);
188
+ },
189
+ rs: (r, o) => {
190
+ if (new Date().valueOf() - t.Zr < t.sn) {
191
+ let r = 0;
192
+ if (g) {
193
+ const e = Math.min(t.sn, this.$i),
194
+ s = this.Pi;
195
+ null == i && (i = s), (r = Math.min(e, a(s, 3 * i)));
183
196
  }
184
- this.S.rs(r, n);
185
- },
186
- });
197
+ n.os(
198
+ o,
199
+ () => {
200
+ this.Jr(t, e, s, r);
201
+ },
202
+ h.O.Kr,
203
+ (e) => this.Xr(e, t.triggerId),
204
+ () => this.Hr(),
205
+ r,
206
+ );
207
+ }
208
+ g && n.ns(m, c);
209
+ },
210
+ });
187
211
  },
188
- h.O.sn,
212
+ h.O.Kr,
189
213
  );
190
214
  }
191
- Xr(t) {
215
+ Br(t) {
192
216
  if (null == t.triggerId)
193
217
  return (
194
218
  N.info(
@@ -199,40 +223,40 @@ export default class ea {
199
223
  const e = {};
200
224
  return null != t.triggerId && (e.trigger_ids = [t.triggerId]), e;
201
225
  }
202
- Me(e) {
226
+ Ke(e) {
203
227
  return (
204
228
  !!this.C &&
205
229
  !(
206
230
  !(e && e instanceof InAppMessage && e.constructor !== InAppMessage) ||
207
231
  e instanceof ControlMessage
208
232
  ) &&
209
- this.C.js(t.bs.cn, e.Bs())
233
+ this.C.Bs(t.gs.on, e.bs())
210
234
  );
211
235
  }
212
236
  Ar() {
213
237
  if (!this.C) return null;
214
- const e = this.C.ps(t.bs.cn);
238
+ const e = this.C.vs(t.gs.on);
215
239
  if (!e) return null;
216
240
  let s;
217
241
  switch (e.type) {
218
- case InAppMessage.Qe.gn:
219
- s = FullScreenMessage.hn(e);
242
+ case InAppMessage.We.an:
243
+ s = FullScreenMessage.ln(e);
220
244
  break;
221
- case InAppMessage.Qe.fn:
222
- case InAppMessage.Qe.Le:
223
- case InAppMessage.Qe.Io:
224
- s = HtmlMessage.hn(e);
245
+ case InAppMessage.We.un:
246
+ case InAppMessage.We.Ve:
247
+ case InAppMessage.We.Ao:
248
+ s = HtmlMessage.ln(e);
225
249
  break;
226
- case InAppMessage.Qe.dn:
227
- case InAppMessage.Qe.xo:
228
- s = ModalMessage.hn(e);
250
+ case InAppMessage.We.pn:
251
+ case InAppMessage.We.Io:
252
+ s = ModalMessage.ln(e);
229
253
  break;
230
- case InAppMessage.Qe.jn:
231
- s = SlideUpMessage.hn(e);
254
+ case InAppMessage.We.mn:
255
+ s = SlideUpMessage.ln(e);
232
256
  }
233
- return s && this.vn(), s;
257
+ return s && this.hn(), s;
234
258
  }
235
- vn() {
236
- this.C && this.C.Ls(t.bs.cn);
259
+ hn() {
260
+ this.C && this.C.Es(t.gs.on);
237
261
  }
238
262
  }
@@ -12,11 +12,11 @@ export function logInAppMessageButtonClick(o, t) {
12
12
  if (!(o instanceof InAppMessageButton))
13
13
  return N.error("button must be an InAppMessageButton object"), !1;
14
14
  if (!(t instanceof InAppMessage)) return N.error(sr), !1;
15
- const s = se.ea().Hr(o, t);
15
+ const s = se.ea()._r(o, t);
16
16
  if (s.ss)
17
17
  for (let r = 0; r < s.fe.length; r++)
18
18
  ot.m().ue(
19
- et.Ao,
19
+ et.Bo,
20
20
  [
21
21
  t.triggerId,
22
22
  null === (e = o.id) || void 0 === e ? void 0 : e.toString(),
@@ -9,11 +9,11 @@ import { TriggersProviderFactory as ot } from "../triggers/triggers-provider-fac
9
9
  export function logInAppMessageClick(o) {
10
10
  if (!r.rr()) return !1;
11
11
  if (!(o instanceof InAppMessage)) return N.error(sr), !1;
12
- const s = se.ea().ds(o, d.Cr);
12
+ const s = se.ea().cs(o, d.Mr);
13
13
  if (s) {
14
14
  o.ko() || logInAppMessageImpression(o);
15
15
  for (let r = 0; r < s.fe.length; r++)
16
- ot.m().ue(et.Ao, [o.triggerId], s.fe[r]);
16
+ ot.m().ue(et.Bo, [o.triggerId], s.fe[r]);
17
17
  }
18
18
  return s.ss;
19
19
  }
@@ -13,11 +13,11 @@ export function logInAppMessageHtmlClick(e, t, s) {
13
13
  ),
14
14
  !1
15
15
  );
16
- let o = d.Cr;
17
- null != t && (o = d.Or);
18
- const m = se.ea().ds(e, o, t, s);
16
+ let o = d.Mr;
17
+ null != t && (o = d.Tr);
18
+ const m = se.ea().cs(e, o, t, s);
19
19
  if (m.ss)
20
20
  for (let r = 0; r < m.fe.length; r++)
21
- ot.m().ue(et.Ao, [e.triggerId, t], m.fe[r]);
21
+ ot.m().ue(et.Bo, [e.triggerId, t], m.fe[r]);
22
22
  return m.ss;
23
23
  }
@@ -8,6 +8,6 @@ export function logInAppMessageImpression(o) {
8
8
  if (!r.rr()) return !1;
9
9
  if (!(o instanceof InAppMessage || o instanceof ControlMessage))
10
10
  return N.error(sr), !1;
11
- const s = o instanceof ControlMessage ? d.zo : d.Nr;
12
- return se.ea().ds(o, s).ss;
11
+ const s = o instanceof ControlMessage ? d.zo : d.Ir;
12
+ return se.ea().cs(o, s).ss;
13
13
  }
@@ -66,12 +66,12 @@ export default class FullScreenMessage extends InAppMessage {
66
66
  A,
67
67
  B,
68
68
  ),
69
- (this.do = InAppMessage.TextAlignment.CENTER);
69
+ (this.po = InAppMessage.TextAlignment.CENTER);
70
70
  }
71
- Bs() {
72
- return super.Bs(FullScreenMessage.Dt);
71
+ bs() {
72
+ return super.bs(FullScreenMessage.Dt);
73
73
  }
74
- static hn(e) {
74
+ static ln(e) {
75
75
  return new FullScreenMessage(
76
76
  e[InAppMessage.qt.ra],
77
77
  e[InAppMessage.qt.sa],
@@ -105,4 +105,4 @@ export default class FullScreenMessage extends InAppMessage {
105
105
  );
106
106
  }
107
107
  }
108
- FullScreenMessage.Dt = InAppMessage.Qe.gn;
108
+ FullScreenMessage.Dt = InAppMessage.We.an;
@@ -36,21 +36,21 @@ export default class HtmlMessage extends InAppMessage {
36
36
  (this.messageFields = a),
37
37
  (this.messageFields = a);
38
38
  }
39
- Bo() {
39
+ Po() {
40
40
  return !1;
41
41
  }
42
42
  rt(i) {
43
- if (this.Ke === InAppMessage.Qe.fn) {
44
- if (this.Co) return !1;
45
- this.Co = !0;
43
+ if (this.Qe === InAppMessage.We.un) {
44
+ if (this.So) return !1;
45
+ this.So = !0;
46
46
  }
47
47
  return this._t.X(i), !0;
48
48
  }
49
- Bs() {
50
- const i = super.Bs(HtmlMessage.Dt);
51
- return (i[InAppMessage.qt.Po] = this.messageFields), i;
49
+ bs() {
50
+ const i = super.bs(HtmlMessage.Dt);
51
+ return (i[InAppMessage.qt.qo] = this.messageFields), i;
52
52
  }
53
- static hn(i) {
53
+ static ln(i) {
54
54
  return new HtmlMessage(
55
55
  i[InAppMessage.qt.ra],
56
56
  i[InAppMessage.qt.St],
@@ -62,9 +62,9 @@ export default class HtmlMessage extends InAppMessage {
62
62
  i[InAppMessage.qt.wa],
63
63
  i[InAppMessage.qt.ka],
64
64
  i[InAppMessage.qt.CSS],
65
- i[InAppMessage.qt.Po],
65
+ i[InAppMessage.qt.qo],
66
66
  i[InAppMessage.qt.qa],
67
67
  );
68
68
  }
69
69
  }
70
- HtmlMessage.Dt = InAppMessage.Qe.fn;
70
+ HtmlMessage.Dt = InAppMessage.We.un;
@@ -15,13 +15,13 @@ export default class InAppMessageButton {
15
15
  (this.borderColor = r || this.backgroundColor),
16
16
  (this.clickAction = h || InAppMessage.ClickAction.NONE),
17
17
  (this.uri = e),
18
- null == n && (n = InAppMessageButton.Jr),
18
+ null == n && (n = InAppMessageButton.qr),
19
19
  (this.id = n),
20
- (this.Co = !1),
20
+ (this.So = !1),
21
21
  (this._t = new u());
22
22
  }
23
23
  subscribeToClickedEvent(s) {
24
- return this._t.Ns(s);
24
+ return this._t.Fs(s);
25
25
  }
26
26
  removeSubscription(s) {
27
27
  this._t.removeSubscription(s);
@@ -30,7 +30,7 @@ export default class InAppMessageButton {
30
30
  this._t.removeAllSubscriptions();
31
31
  }
32
32
  rt() {
33
- return !this.Co && ((this.Co = !0), this._t.X(), !0);
33
+ return !this.So && ((this.So = !0), this._t.X(), !0);
34
34
  }
35
35
  static fromJson(s) {
36
36
  return new InAppMessageButton(
@@ -44,4 +44,4 @@ export default class InAppMessageButton {
44
44
  );
45
45
  }
46
46
  }
47
- InAppMessageButton.Jr = -1;
47
+ InAppMessageButton.qr = -1;