@braze/web-sdk 6.7.0 → 6.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 (97) hide show
  1. package/index.d.ts +74 -27
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +2 -2
  4. package/shared-lib/event-types.js +13 -13
  5. package/shared-lib/indexed-db-adapter.js +3 -3
  6. package/shared-lib/logger.js +2 -2
  7. package/shared-lib/supported-options.js +8 -8
  8. package/src/Banner/log-banner-impressions.js +20 -11
  9. package/src/ContentCards/content-cards-provider-factory.js +13 -11
  10. package/src/ContentCards/content-cards-provider.js +4 -4
  11. package/src/ContentCards/get-cached-content-cards.js +2 -2
  12. package/src/ContentCards/request-content-cards-refresh.js +2 -2
  13. package/src/ContentCards/subscribe-to-content-cards-updates.js +10 -10
  14. package/src/ContentCards/ui/show-content-cards.js +3 -3
  15. package/src/Core/change-user.js +2 -2
  16. package/src/Core/index.js +1 -0
  17. package/src/Core/log-ecommerce-event.js +29 -0
  18. package/src/Core/log-purchase.js +17 -192
  19. package/src/Core/open-session.js +6 -6
  20. package/src/Core/set-sdk-authentication-signature.js +1 -1
  21. package/src/Core/subscribe-to-sdk-authentication-failures.js +1 -1
  22. package/src/DUST/dust-connection-core.js +1 -0
  23. package/src/DUST/dust-provider-factory.js +10 -10
  24. package/src/DUST/dust-provider.js +181 -158
  25. package/src/DUST/dust-shared-worker-code.js +1 -1
  26. package/src/DUST/dust-shared-worker-impl.js +93 -100
  27. package/src/DUST/dust-worker-bridge.js +27 -27
  28. package/src/DUST/subscribe-to-dust.js +7 -7
  29. package/src/InAppMessage/defer-in-app-message.js +1 -1
  30. package/src/InAppMessage/display/in-app-message-to-html.js +16 -16
  31. package/src/InAppMessage/display/modal-utils.js +2 -2
  32. package/src/InAppMessage/in-app-message-manager.js +64 -64
  33. package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
  34. package/src/InAppMessage/log-in-app-message-click.js +1 -1
  35. package/src/InAppMessage/log-in-app-message-html-click.js +2 -2
  36. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  37. package/src/InAppMessage/models/full-screen-message.js +7 -7
  38. package/src/InAppMessage/models/html-message.js +1 -1
  39. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  40. package/src/InAppMessage/models/in-app-message.js +22 -22
  41. package/src/InAppMessage/models/modal-message.js +5 -5
  42. package/src/InAppMessage/models/slide-up-message.js +6 -6
  43. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  44. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  45. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  46. package/src/InAppMessage/ui/show-in-app-message.js +20 -20
  47. package/src/Push/push-manager-factory.js +2 -2
  48. package/src/Push/push-manager.js +8 -8
  49. package/src/Push/utils/push-utils.js +6 -6
  50. package/src/User/user-manager.js +5 -5
  51. package/src/User/user.js +8 -8
  52. package/src/common/constants.js +1 -0
  53. package/src/common/content-cards-display.js +2 -2
  54. package/src/l10n/l10n-manager-factory.js +1 -1
  55. package/src/l10n/l10n-manager.js +1 -1
  56. package/src/managers/braze-instance.js +21 -21
  57. package/src/managers/device-manager.js +6 -6
  58. package/src/managers/network-manager.js +93 -92
  59. package/src/managers/server-config-manager.js +68 -68
  60. package/src/managers/session-manager.js +2 -2
  61. package/src/managers/storage-manager-factory.js +4 -4
  62. package/src/managers/storage-manager.js +120 -120
  63. package/src/managers/subscription-manager.js +1 -1
  64. package/src/managers/utils.js +1 -1
  65. package/src/models/backend-errors.js +5 -5
  66. package/src/models/braze-event.js +3 -3
  67. package/src/models/device.js +1 -1
  68. package/src/models/identifier.js +3 -3
  69. package/src/models/push-token.js +5 -5
  70. package/src/models/server-config.js +27 -27
  71. package/src/request-controller.js +99 -99
  72. package/src/triggers/models/custom-event-data.js +4 -4
  73. package/src/triggers/models/custom-event-property-data.js +5 -5
  74. package/src/triggers/models/filter-set.js +2 -2
  75. package/src/triggers/models/filter.js +1 -1
  76. package/src/triggers/models/in-app-message-click-data.js +5 -5
  77. package/src/triggers/models/purchase-data.js +1 -1
  78. package/src/triggers/models/purchase-property-data.js +2 -2
  79. package/src/triggers/models/push-click-data.js +5 -5
  80. package/src/triggers/models/trigger-condition.js +42 -42
  81. package/src/triggers/models/trigger-events.js +2 -2
  82. package/src/triggers/models/trigger.js +10 -10
  83. package/src/triggers/triggers-provider-factory.js +1 -1
  84. package/src/triggers/triggers-provider.js +30 -30
  85. package/src/types.js +5 -1
  86. package/src/ui/js/attach-css.js +1 -1
  87. package/src/util/braze-actions.js +5 -5
  88. package/src/util/browser-detector.js +13 -13
  89. package/src/util/client-hints-parser.js +2 -2
  90. package/src/util/dom-utils.js +2 -2
  91. package/src/util/ecommerce-event-validation.js +326 -0
  92. package/src/util/iso-4217-currency-codes.js +176 -0
  93. package/src/util/net.js +3 -3
  94. package/src/util/request-header-utils.js +18 -18
  95. package/src/util/user-agent-parser.js +14 -14
  96. package/src/util/validation-utils.js +2 -2
  97. package/src/util/window-utils.js +2 -2
@@ -23,7 +23,7 @@ import It from "../Push/utils/push-utils.js";
23
23
  import h from "../util/request-header-utils.js";
24
24
  import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
25
25
  import { FullScreenMessage, ModalMessage, SlideUpMessage } from "./index.js";
26
- import { IamClickAction as $e, IamServerTypes as dt } from "./constants.js";
26
+ import { IamClickAction as Le, IamServerTypes as dt } from "./constants.js";
27
27
  export default class ea {
28
28
  constructor(t, e, s, i) {
29
29
  (this.B = t),
@@ -36,28 +36,28 @@ export default class ea {
36
36
  (this.Ss = i),
37
37
  (this.In = new f()),
38
38
  r.S(this.In),
39
- (this.An = 1e3),
40
- (this.Dn = 6e4),
41
- (this.Bn = null),
42
- (this._n = null),
43
- (this.qn = null);
39
+ (this.Bn = 1e3),
40
+ (this._n = 6e4),
41
+ (this.qn = null),
42
+ (this.Pn = null),
43
+ (this.En = null);
44
44
  }
45
- Pn() {
45
+ Gn() {
46
46
  return this.In;
47
47
  }
48
- En(t) {
48
+ Nn(t) {
49
49
  return this.In.Kt(t);
50
50
  }
51
- Gn() {
52
- return this.Bn;
51
+ Fn() {
52
+ return this.qn;
53
53
  }
54
- Nn(t) {
55
- this.Bn = t;
54
+ On(t) {
55
+ this.qn = t;
56
56
  }
57
57
  wt(t, e, s, i) {
58
58
  const r = new L();
59
59
  let n;
60
- if (e === p.Fn || t instanceof ControlMessage) {
60
+ if (e === p.Xn || t instanceof ControlMessage) {
61
61
  if (!t.gs())
62
62
  return (
63
63
  E.info(
@@ -65,7 +65,7 @@ export default class ea {
65
65
  ),
66
66
  r
67
67
  );
68
- } else if (e === p.On || (t instanceof HtmlMessage && e === p.Xn)) {
68
+ } else if (e === p.Hn || (t instanceof HtmlMessage && e === p.Jn)) {
69
69
  if (!t.ss(i))
70
70
  return (
71
71
  E.info(
@@ -78,7 +78,7 @@ export default class ea {
78
78
  (n =
79
79
  t instanceof ControlMessage
80
80
  ? { trigger_ids: [t.triggerId] }
81
- : this.Hn(t)),
81
+ : this.Kn(t)),
82
82
  null == n
83
83
  ? r
84
84
  : (t.messageExtras && (n.message_extras = t.messageExtras),
@@ -86,7 +86,7 @@ export default class ea {
86
86
  v.wt(e, n))
87
87
  );
88
88
  }
89
- Jn(t, e) {
89
+ Ln(t, e) {
90
90
  const s = new L();
91
91
  if (!t.ss())
92
92
  return (
@@ -95,72 +95,72 @@ export default class ea {
95
95
  ),
96
96
  s
97
97
  );
98
- const i = this.Hn(e);
98
+ const i = this.Kn(e);
99
99
  return null == i
100
100
  ? s
101
- : t.id === InAppMessageButton.Kn
101
+ : t.id === InAppMessageButton.Qn
102
102
  ? (E.info(
103
103
  "This in-app message button does not have a tracking id. Not logging event to Braze servers.",
104
104
  ),
105
105
  s)
106
- : (null != t.id && (i.bid = t.id), v.wt(p.Xn, i));
106
+ : (null != t.id && (i.bid = t.id), v.wt(p.Jn, i));
107
107
  }
108
- Ln(t) {
108
+ Un(t) {
109
109
  const e = t.messageFields;
110
110
  return (null != e && e.is_push_primer) || !1;
111
111
  }
112
- Qn(t) {
112
+ Vn(t) {
113
113
  if (!(t instanceof InAppMessage)) return;
114
114
  const e = (t) => {
115
115
  if (!t) return;
116
116
  const e = eo(t);
117
- if (vt(e)) return yt(bt.Un, "In-App Message");
117
+ if (vt(e)) return yt(bt.Wn, "In-App Message");
118
118
  if (jt(e)) {
119
- const t = It.Vn();
120
- if (!t.Wn) return It.Yn(t.reason, "In-App Message");
119
+ const t = It.Yn();
120
+ if (!t.Zn) return It._o(t.reason, "In-App Message");
121
121
  }
122
122
  };
123
- if (this.Ln(t)) {
124
- const t = It.Vn();
125
- if (!t.Wn) return It.Yn(t.reason, "In-App Message");
123
+ if (this.Un(t)) {
124
+ const t = It.Yn();
125
+ if (!t.Zn) return It._o(t.reason, "In-App Message");
126
126
  }
127
127
  const s = t.buttons || [];
128
128
  let i;
129
129
  for (const t of s)
130
130
  if (
131
- t.clickAction === $e.URI &&
131
+ t.clickAction === Le.URI &&
132
132
  t.uri &&
133
133
  to.test(t.uri) &&
134
134
  ((i = e(t.uri)), i)
135
135
  )
136
136
  return i;
137
- return t.clickAction === $e.URI && t.uri && to.test(t.uri)
137
+ return t.clickAction === Le.URI && t.uri && to.test(t.uri)
138
138
  ? e(t.uri)
139
139
  : void 0;
140
140
  }
141
- Zn(t, e) {
142
- e !== this.qn && this._o(), (this._n = t), (this.qn = e);
141
+ Xo(t, e) {
142
+ e !== this.En && this.Yo(), (this.Pn = t), (this.En = e);
143
143
  }
144
- _o() {
145
- null != this._n &&
146
- (clearTimeout(this._n), (this._n = null), (this.qn = null));
144
+ Yo() {
145
+ null != this.Pn &&
146
+ (clearTimeout(this.Pn), (this.Pn = null), (this.En = null));
147
147
  }
148
- Xo(t, e, s, i) {
148
+ Zo(t, e, s, i) {
149
149
  const r = this.B;
150
150
  if (!r) return;
151
- this.qn && t.triggerId !== this.qn && (this._o(), h.Li(this.C, h.it.Yo));
152
- const n = r.Zo(!1),
151
+ this.En && t.triggerId !== this.En && (this.Yo(), h.Li(this.C, h.it.ta));
152
+ const n = r.ia(!1),
153
153
  o = r.Z(n);
154
154
  (o.template = { trigger_id: t.triggerId, trigger_event_type: e }),
155
- null != s && (o.template.data = s.ta());
156
- const u = r.tt(o, h.it.Yo);
155
+ null != s && (o.template.data = s.oa());
156
+ const u = r.tt(o, h.it.ta);
157
157
  r.et(
158
158
  o,
159
159
  (r = -1) => {
160
160
  const n = this.B;
161
161
  if (!n) return;
162
162
  const m = new Date().valueOf();
163
- h.nt(this.C, h.it.Yo, m),
163
+ h.nt(this.C, h.it.ta, m),
164
164
  -1 !== r && u.push(["X-Braze-Req-Tokens-Remaining", r.toString()]);
165
165
  let c,
166
166
  p,
@@ -171,16 +171,16 @@ export default class ea {
171
171
  headers: u,
172
172
  lt: (e) => {
173
173
  if (!n.ut(o, e, u))
174
- return void ("function" == typeof t.ia && t.ia());
174
+ return void ("function" == typeof t.la && t.la());
175
175
  if ((n.ct(), null == e || null == e.templated_message)) return;
176
176
  const s = e.templated_message;
177
- if (s.type !== gt.la.oa) return;
177
+ if (s.type !== gt.ma.ua) return;
178
178
  const i = pt(s.data);
179
179
  if (null == i) return;
180
- const r = this.Qn(i);
180
+ const r = this.Vn(i);
181
181
  if (r)
182
- return E.error(r), void ("function" == typeof t.ia && t.ia());
183
- "function" == typeof t.ua && t.ua(i);
182
+ return E.error(r), void ("function" == typeof t.la && t.la());
183
+ "function" == typeof t.ca && t.ca(i);
184
184
  },
185
185
  error: (e) => {
186
186
  (f = !0),
@@ -188,21 +188,21 @@ export default class ea {
188
188
  (p = `getting user personalization for message ${t.triggerId}.`);
189
189
  },
190
190
  ft: (r, o) => {
191
- if (new Date().valueOf() - t.ma < t.ca) {
191
+ if (new Date().valueOf() - t.pa < t.ha) {
192
192
  let r = 0;
193
193
  if (f) {
194
- const e = Math.min(t.ca, this.Dn),
195
- s = this.An;
194
+ const e = Math.min(t.ha, this._n),
195
+ s = this.Bn;
196
196
  null == i && (i = s), (r = Math.min(e, a(s, 3 * i)));
197
197
  }
198
198
  n.yt(
199
199
  o,
200
200
  () => {
201
- this.Xo(t, e, s, r);
201
+ this.Zo(t, e, s, r);
202
202
  },
203
- h.it.Yo,
204
- (e) => this.Zn(e, t.triggerId),
205
- () => this._o(),
203
+ h.it.ta,
204
+ (e) => this.Xo(e, t.triggerId),
205
+ () => this.Yo(),
206
206
  r,
207
207
  );
208
208
  }
@@ -210,10 +210,10 @@ export default class ea {
210
210
  },
211
211
  });
212
212
  },
213
- h.it.Yo,
213
+ h.it.ta,
214
214
  );
215
215
  }
216
- Hn(t) {
216
+ Kn(t) {
217
217
  if (null == t.triggerId)
218
218
  return (
219
219
  E.info(
@@ -224,40 +224,40 @@ export default class ea {
224
224
  const e = {};
225
225
  return null != t.triggerId && (e.trigger_ids = [t.triggerId]), e;
226
226
  }
227
- jn(t) {
227
+ An(t) {
228
228
  return (
229
229
  !!this.C &&
230
230
  !(
231
231
  !(t && t instanceof InAppMessage && t.constructor !== InAppMessage) ||
232
232
  t instanceof ControlMessage
233
233
  ) &&
234
- this.C.It(s.Tt.pa, t.qt())
234
+ this.C.It(s.Tt.fa, t.qt())
235
235
  );
236
236
  }
237
237
  sa() {
238
238
  if (!this.C) return null;
239
- const t = this.C.Rt(s.Tt.pa);
239
+ const t = this.C.Rt(s.Tt.fa);
240
240
  if (!t) return null;
241
241
  let e;
242
242
  switch (t.type) {
243
243
  case dt.cE:
244
- e = FullScreenMessage.ha(t);
244
+ e = FullScreenMessage.ga(t);
245
245
  break;
246
246
  case dt.iE:
247
247
  case dt.PE:
248
248
  case dt.nE:
249
- e = HtmlMessage.ha(t);
249
+ e = HtmlMessage.ga(t);
250
250
  break;
251
251
  case dt.aE:
252
252
  case dt.UE:
253
- e = ModalMessage.ha(t);
253
+ e = ModalMessage.ga(t);
254
254
  break;
255
255
  case dt.sE:
256
- e = SlideUpMessage.ha(t);
256
+ e = SlideUpMessage.ga(t);
257
257
  }
258
- return e && this.fa(), e;
258
+ return e && this.da(), e;
259
259
  }
260
- fa() {
261
- this.C && this.C.Qt(s.Tt.pa);
260
+ da() {
261
+ this.C && this.C.Qt(s.Tt.fa);
262
262
  }
263
263
  }
@@ -12,7 +12,7 @@ export function logInAppMessageButtonClick(t, o) {
12
12
  if (!(t instanceof InAppMessageButton))
13
13
  return E.error("button must be an InAppMessageButton object"), !1;
14
14
  if (!(o instanceof InAppMessage)) return E.error(mr.EE), !1;
15
- const s = je.ra().Jn(t, o);
15
+ const s = je.ra().Ln(t, o);
16
16
  if (s.lt)
17
17
  for (let r = 0; r < s.Ce.length; r++)
18
18
  rt.o().Ee(
@@ -9,7 +9,7 @@ import { TriggersProviderFactory as rt } from "../triggers/triggers-provider-fac
9
9
  export function logInAppMessageClick(s) {
10
10
  if (!r.rr()) return !1;
11
11
  if (!(s instanceof InAppMessage)) return E.error(mr.EE), !1;
12
- const e = je.ra().wt(s, p.On);
12
+ const e = je.ra().wt(s, p.Hn);
13
13
  if (e) {
14
14
  s.sm() || logInAppMessageImpression(s);
15
15
  for (let r = 0; r < e.Ce.length; r++)
@@ -13,8 +13,8 @@ export function logInAppMessageHtmlClick(e, t, s) {
13
13
  ),
14
14
  !1
15
15
  );
16
- let o = p.On;
17
- null != t && (o = p.Xn);
16
+ let o = p.Hn;
17
+ null != t && (o = p.Jn);
18
18
  const m = je.ra().wt(e, o, t, s);
19
19
  if (m.lt)
20
20
  for (let r = 0; r < m.Ce.length; r++)
@@ -8,6 +8,6 @@ export function logInAppMessageImpression(s) {
8
8
  if (!r.rr()) return !1;
9
9
  if (!(s instanceof InAppMessage || s instanceof ControlMessage))
10
10
  return E.error(mr.EE), !1;
11
- const o = s instanceof ControlMessage ? p.om : p.Fn;
11
+ const o = s instanceof ControlMessage ? p.om : p.Xn;
12
12
  return je.ra().wt(s, o).lt;
13
13
  }
@@ -1,10 +1,10 @@
1
1
  import {
2
- IamCropType as Le,
2
+ IamCropType as Me,
3
3
  IamDismissType as pr,
4
- IamOrientation as Ae,
4
+ IamOrientation as De,
5
5
  IamSerializationKeys as cr,
6
6
  IamServerTypes as dt,
7
- IamTextAlignment as Ee,
7
+ IamTextAlignment as Fe,
8
8
  } from "../constants.js";
9
9
  import { buttonsFromSerializedInAppMessage as ur } from "../in-app-message-factory.js";
10
10
  import InAppMessage from "./in-app-message.js";
@@ -43,7 +43,7 @@ export default class FullScreenMessage extends InAppMessage {
43
43
  D,
44
44
  ) {
45
45
  (p = p || pr.MANUAL),
46
- (k = k || Ae.PORTRAIT),
46
+ (k = k || De.PORTRAIT),
47
47
  super(
48
48
  r,
49
49
  s,
@@ -70,7 +70,7 @@ export default class FullScreenMessage extends InAppMessage {
70
70
  w,
71
71
  y,
72
72
  S,
73
- (b = b || Le.CENTER_CROP),
73
+ (b = b || Me.CENTER_CROP),
74
74
  k,
75
75
  q,
76
76
  A,
@@ -78,12 +78,12 @@ export default class FullScreenMessage extends InAppMessage {
78
78
  C,
79
79
  D,
80
80
  ),
81
- (this.Go = Ee.CENTER);
81
+ (this.Go = Fe.CENTER);
82
82
  }
83
83
  qt() {
84
84
  return super.qt(dt.cE);
85
85
  }
86
- static ha(r) {
86
+ static ga(r) {
87
87
  return new FullScreenMessage(
88
88
  r[cr.rE],
89
89
  r[cr.mE],
@@ -57,7 +57,7 @@ export default class HtmlMessage extends InAppMessage {
57
57
  const i = super.qt(dt.iE);
58
58
  return (i[cr.qE] = this.messageFields), i;
59
59
  }
60
- static ha(i) {
60
+ static ga(i) {
61
61
  return new HtmlMessage(
62
62
  i[cr.rE],
63
63
  i[cr.Fs],
@@ -1,5 +1,5 @@
1
1
  import f from "../../managers/subscription-manager.js";
2
- import { IamColors as ss, IamClickAction as $e } from "../constants.js";
2
+ import { IamColors as ss, IamClickAction as Le } from "../constants.js";
3
3
  export default class InAppMessageButton {
4
4
  constructor(s, t, i, r, h, e, n) {
5
5
  (this.text = s),
@@ -13,9 +13,9 @@ export default class InAppMessageButton {
13
13
  (this.backgroundColor = t || ss._E),
14
14
  (this.textColor = i || ss.AE),
15
15
  (this.borderColor = r || this.backgroundColor),
16
- (this.clickAction = h || $e.NONE),
16
+ (this.clickAction = h || Le.NONE),
17
17
  (this.uri = e),
18
- null == n && (n = InAppMessageButton.Kn),
18
+ null == n && (n = InAppMessageButton.Qn),
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.Kn = -1;
47
+ InAppMessageButton.Qn = -1;
@@ -10,17 +10,17 @@ import { isIFrame as St } from "../utils/in-app-message-utils.js";
10
10
  import {
11
11
  IamStrings as mr,
12
12
  IamColors as ss,
13
- IamClickAction as $e,
13
+ IamClickAction as Le,
14
14
  IAM_SHOW_CLASS as Tt,
15
15
  IAM_HIDE_CLASS as xt,
16
- IamDisplayFailures as Me,
17
- IamSlideFrom as De,
16
+ IamDisplayFailures as qe,
17
+ IamSlideFrom as Ee,
18
18
  IamDismissType as pr,
19
19
  IamOpenTarget as ut,
20
- IamImageStyle as qe,
21
- IamOrientation as Ae,
22
- IamTextAlignment as Ee,
23
- IamCropType as Le,
20
+ IamImageStyle as Ae,
21
+ IamOrientation as De,
22
+ IamTextAlignment as Fe,
23
+ IamCropType as Me,
24
24
  IamServerTypes as dt,
25
25
  IamTiming as Et,
26
26
  IamSerializationKeys as cr,
@@ -93,18 +93,18 @@ export default class InAppMessage {
93
93
  (this.language = D),
94
94
  (this.altImageText = z),
95
95
  (this.message = t),
96
- (this.messageAlignment = s || Ee.CENTER),
96
+ (this.messageAlignment = s || Fe.CENTER),
97
97
  (this.duration = u || 5e3),
98
- (this.slideFrom = i || De.BOTTOM),
98
+ (this.slideFrom = i || Ee.BOTTOM),
99
99
  (this.extras = h || {}),
100
100
  (this.triggerId = e),
101
- (this.clickAction = n || $e.NONE),
101
+ (this.clickAction = n || Le.NONE),
102
102
  (this.uri = r),
103
103
  (this.openTarget = o || ut.NONE),
104
104
  (this.dismissType = l || pr.AUTO_DISMISS),
105
105
  (this.icon = a),
106
106
  (this.imageUrl = m),
107
- (this.imageStyle = c || qe.TOP),
107
+ (this.imageStyle = c || Ae.TOP),
108
108
  (this.iconColor = d || ss.AE),
109
109
  (this.iconBackgroundColor = p || ss._E),
110
110
  (this.backgroundColor = b || ss.AE),
@@ -115,11 +115,11 @@ export default class InAppMessage {
115
115
  (this.animateOut = j),
116
116
  null == this.animateOut && (this.animateOut = !0),
117
117
  (this.header = k),
118
- (this.headerAlignment = w || Ee.CENTER),
118
+ (this.headerAlignment = w || Fe.CENTER),
119
119
  (this.headerTextColor = y || ss.IE),
120
120
  (this.frameColor = S || ss.SE),
121
121
  (this.buttons = T || []),
122
- (this.cropType = x || Le.FIT_CENTER),
122
+ (this.cropType = x || Me.FIT_CENTER),
123
123
  (this.orientation = E),
124
124
  (this.htmlId = H),
125
125
  (this.css = M),
@@ -135,7 +135,7 @@ export default class InAppMessage {
135
135
  (this.$o = null),
136
136
  (this.ti = new f()),
137
137
  (this.ih = new f()),
138
- (this.Go = Ee.CENTER);
138
+ (this.Go = Fe.CENTER);
139
139
  }
140
140
  subscribeToClickedEvent(t) {
141
141
  return this.ti.Kt(t);
@@ -240,7 +240,7 @@ export default class InAppMessage {
240
240
  const s = t.parentNode;
241
241
  this.zo() &&
242
242
  null != s &&
243
- this.orientation !== Ae.LANDSCAPE &&
243
+ this.orientation !== De.LANDSCAPE &&
244
244
  (null != s.classList && s.classList.add(mr.TE),
245
245
  document.body.addEventListener(
246
246
  "touchmove",
@@ -324,15 +324,15 @@ export default class InAppMessage {
324
324
  }
325
325
  }
326
326
  (InAppMessage.ah = ss),
327
- (InAppMessage.mh = Me),
328
- (InAppMessage.SlideFrom = De),
329
- (InAppMessage.ClickAction = $e),
327
+ (InAppMessage.mh = qe),
328
+ (InAppMessage.SlideFrom = Ee),
329
+ (InAppMessage.ClickAction = Le),
330
330
  (InAppMessage.DismissType = pr),
331
331
  (InAppMessage.OpenTarget = ut),
332
- (InAppMessage.ImageStyle = qe),
333
- (InAppMessage.Orientation = Ae),
334
- (InAppMessage.TextAlignment = Ee),
335
- (InAppMessage.CropType = Le),
332
+ (InAppMessage.ImageStyle = Ae),
333
+ (InAppMessage.Orientation = De),
334
+ (InAppMessage.TextAlignment = Fe),
335
+ (InAppMessage.CropType = Me),
336
336
  (InAppMessage.dh = dt),
337
337
  (InAppMessage.gr = Et.gr),
338
338
  (InAppMessage.pE = Et.pE),
@@ -1,9 +1,9 @@
1
1
  import {
2
- IamCropType as Le,
2
+ IamCropType as Me,
3
3
  IamDismissType as pr,
4
4
  IamSerializationKeys as cr,
5
5
  IamServerTypes as dt,
6
- IamTextAlignment as Ee,
6
+ IamTextAlignment as Fe,
7
7
  } from "../constants.js";
8
8
  import { buttonsFromSerializedInAppMessage as ur } from "../in-app-message-factory.js";
9
9
  import InAppMessage from "./in-app-message.js";
@@ -66,7 +66,7 @@ export default class ModalMessage extends InAppMessage {
66
66
  w,
67
67
  y,
68
68
  S,
69
- (b = b || Le.FIT_CENTER),
69
+ (b = b || Me.FIT_CENTER),
70
70
  void 0,
71
71
  k,
72
72
  q,
@@ -74,12 +74,12 @@ export default class ModalMessage extends InAppMessage {
74
74
  B,
75
75
  C,
76
76
  ),
77
- (this.Go = Ee.CENTER);
77
+ (this.Go = Fe.CENTER);
78
78
  }
79
79
  qt() {
80
80
  return super.qt(dt.aE);
81
81
  }
82
- static ha(r) {
82
+ static ga(r) {
83
83
  return new ModalMessage(
84
84
  r[cr.rE],
85
85
  r[cr.mE],
@@ -4,8 +4,8 @@ import {
4
4
  IamColors as ss,
5
5
  IamSerializationKeys as cr,
6
6
  IamServerTypes as dt,
7
- IamSlideFrom as De,
8
- IamTextAlignment as Ee,
7
+ IamSlideFrom as Ee,
8
+ IamTextAlignment as Fe,
9
9
  } from "../constants.js";
10
10
  export default class SlideUpMessage extends InAppMessage {
11
11
  constructor(
@@ -38,7 +38,7 @@ export default class SlideUpMessage extends InAppMessage {
38
38
  (v = v || ss.OE),
39
39
  super(
40
40
  t,
41
- (s = s || Ee.START),
41
+ (s = s || Fe.START),
42
42
  e,
43
43
  o,
44
44
  i,
@@ -70,7 +70,7 @@ export default class SlideUpMessage extends InAppMessage {
70
70
  b,
71
71
  z,
72
72
  ),
73
- (this.Go = Ee.START);
73
+ (this.Go = Fe.START);
74
74
  }
75
75
  zo() {
76
76
  return !1;
@@ -82,7 +82,7 @@ export default class SlideUpMessage extends InAppMessage {
82
82
  eh(t) {
83
83
  const s = t.getElementsByClassName("ab-in-app-message")[0];
84
84
  Mt.td(s, !0, !0) ||
85
- (this.slideFrom === De.TOP
85
+ (this.slideFrom === Ee.TOP
86
86
  ? (s.style.top = "0px")
87
87
  : (s.style.bottom = "0px")),
88
88
  super.eh(t);
@@ -90,7 +90,7 @@ export default class SlideUpMessage extends InAppMessage {
90
90
  qt() {
91
91
  return super.qt(dt.sE);
92
92
  }
93
- static ha(t) {
93
+ static ga(t) {
94
94
  return new SlideUpMessage(
95
95
  t[cr.rE],
96
96
  t[cr.mE],
@@ -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.ua = s),
5
- (this.ia = i),
6
- (this.ma = h),
7
- (this.ca = l),
4
+ (this.ca = s),
5
+ (this.la = i),
6
+ (this.pa = h),
7
+ (this.ha = l),
8
8
  (this.triggerId = t),
9
- (this.ua = s),
10
- (this.ia = i),
11
- (this.ma = h),
12
- (this.ca = l);
9
+ (this.ca = s),
10
+ (this.la = i),
11
+ (this.pa = h),
12
+ (this.ha = 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
- : je.ra().En(function (r) {
7
+ : je.ra().Nn(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 = je.ra();
10
- if (null == s.Gn()) {
10
+ if (null == s.Fn()) {
11
11
  const r = subscribeToInAppMessage((s) => showInAppMessage(s));
12
- s.Nn(r);
12
+ s.On(r);
13
13
  }
14
- return s.Gn();
14
+ return s.Fn();
15
15
  }