@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
@@ -32,7 +32,7 @@ export default class FeatureFlag {
32
32
  getTimestampProperty(t) {
33
33
  return this.he(t, this.Ne, "datetime");
34
34
  }
35
- Bs() {
35
+ bs() {
36
36
  const t = {};
37
37
  return (
38
38
  (t[FeatureFlag.qt.Et] = this.id),
@@ -6,174 +6,177 @@ import u from "../managers/subscription-manager.js";
6
6
  import { randomInclusive as a } from "../util/math.js";
7
7
  import l from "../util/net.js";
8
8
  import {
9
- newFeatureFlagFromJson as ht,
10
- newFeatureFlagFromSerializedValue as at,
9
+ newFeatureFlagFromJson as st,
10
+ newFeatureFlagFromSerializedValue as ht,
11
11
  } from "./feature-flag-factory.js";
12
12
  import h from "../util/request-header-utils.js";
13
13
  export default class tr extends s {
14
- constructor(t, s, i, e) {
14
+ constructor(t, s, e, i) {
15
15
  super(),
16
16
  (this.B = t),
17
17
  (this.S = s),
18
- (this.C = i),
19
- (this.T = e),
20
- (this.Gi = []),
21
- (this.Hi = 0),
18
+ (this.C = e),
19
+ (this.T = i),
20
+ (this.je = []),
21
+ (this.we = 0),
22
22
  (this.B = t),
23
23
  (this.S = s),
24
- (this.C = i),
25
- (this.T = e),
26
- (this.Ki = null),
27
- (this.Oi = new u()),
24
+ (this.C = e),
25
+ (this.T = i),
26
+ (this.Ce = null),
27
+ (this.Re = new u()),
28
28
  (this.R = 10),
29
29
  (this.I = null),
30
30
  (this.q = null),
31
- r.N(this.Oi);
31
+ r.N(this.Re);
32
32
  }
33
33
  U(t) {
34
34
  var s;
35
35
  if (
36
- (null === (s = this.B) || void 0 === s ? void 0 : s.Qi()) &&
36
+ (null === (s = this.B) || void 0 === s ? void 0 : s.De()) &&
37
37
  null != t &&
38
38
  t.feature_flags
39
39
  ) {
40
- this.Gi = [];
40
+ this.je = [];
41
41
  for (const s of t.feature_flags) {
42
- const t = ht(s);
43
- t && this.Gi.push(t);
42
+ const t = st(s);
43
+ t && this.je.push(t);
44
44
  }
45
- (this.Hi = new Date().getTime()), this.Vi(), this.Oi.X(this.Gi);
45
+ (this.we = new Date().getTime()), this.Se(), this.Re.X(this.je);
46
46
  }
47
47
  }
48
- Wi() {
48
+ qe() {
49
49
  let s = {};
50
- this.C && (s = this.C.ps(t.bs.Yi));
51
- const i = {};
50
+ this.C && (s = this.C.vs(t.gs.xe));
51
+ const e = {};
52
52
  for (const t in s) {
53
- const e = at(s[t]);
54
- e && (i[e.id] = e);
53
+ const i = ht(s[t]);
54
+ i && (e[i.id] = i);
55
55
  }
56
- return i;
56
+ return e;
57
57
  }
58
- Zi() {
58
+ ze() {
59
59
  var s;
60
60
  return (
61
- (null === (s = this.C) || void 0 === s ? void 0 : s.ps(t.bs.we)) || {}
61
+ (null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.$e)) || {}
62
62
  );
63
63
  }
64
- je(s) {
65
- this.C && this.C.js(t.bs.we, s);
64
+ ke(s) {
65
+ this.C && this.C.Bs(t.gs.$e, s);
66
66
  }
67
- Fs(t) {
68
- return this.Oi.Ns(t);
67
+ qs(t) {
68
+ return this.Re.Fs(t);
69
69
  }
70
- refreshFeatureFlags(t, s, i = !1, e = !0) {
70
+ refreshFeatureFlags(t, s, e = !1, i = !0) {
71
71
  const r = () => {
72
- "function" == typeof s && s(), this.Oi.X(this.Gi);
72
+ "function" == typeof s && s(), this.Re.X(this.je);
73
73
  };
74
- if (!this.Ce(i))
74
+ if (!this.Be(e))
75
75
  return (
76
- !this.Ki &&
76
+ !this.Ce &&
77
77
  this.B &&
78
- (this.Ki = this.B.Re(() => {
78
+ (this.Ce = this.B.Me(() => {
79
79
  this.refreshFeatureFlags(t, s);
80
80
  })),
81
81
  void r()
82
82
  );
83
83
  const o = this.S;
84
84
  if (!o) return void r();
85
- e && this.G();
85
+ i && this.G();
86
86
  const n = o.H({}, !0),
87
- u = o.J(n, h.O.De);
87
+ u = o.J(n, h.O.Ue);
88
88
  let f = !1;
89
89
  o.V(
90
90
  n,
91
- (o = -1) => {
92
- if (!this.S) return void r();
91
+ (i = -1) => {
92
+ const o = this.S;
93
+ if (!o) return void r();
93
94
  const c = new Date().valueOf();
94
- h.W(this.C, h.O.De, c),
95
- -1 !== o && u.push(["X-Braze-Req-Tokens-Remaining", o.toString()]),
95
+ h.W(this.C, h.O.Ue, c),
96
+ -1 !== i && u.push(["X-Braze-Req-Tokens-Remaining", i.toString()]),
96
97
  l.Y({
97
- url: `${this.S.Z()}/feature_flags/sync`,
98
+ url: `${o.Z()}/feature_flags/sync`,
98
99
  headers: u,
99
100
  data: n,
100
101
  ss: (s) => {
101
- if (!this.S.ts(n, s, u)) return (f = !0), void r();
102
- this.S.es(),
103
- this.U(s),
104
- (f = !1),
105
- h.ns(this.C, h.O.De, 1),
106
- "function" == typeof t && t();
102
+ if (!o.ts(n, s, u)) return (f = !0), void r();
103
+ o.es(), this.U(s), (f = !1), "function" == typeof t && t();
107
104
  },
108
105
  error: (t) => {
109
- this.S.rs(t, "retrieving feature flags"), (f = !0), r();
106
+ o.ns(t, "retrieving feature flags"), (f = !0), r();
110
107
  },
111
- os: () => {
112
- if (e && f && !this.q) {
113
- h.hs(this.C, h.O.De);
114
- let e = this.I;
115
- (null == e || e < 1e3 * this.R) && (e = 1e3 * this.R),
116
- this.ls(Math.min(3e5, a(1e3 * this.R, 3 * e)), t, s, i);
108
+ rs: (i, r) => {
109
+ let n;
110
+ if (f) {
111
+ let t = this.I;
112
+ (null == t || t < 1e3 * this.R) && (t = 1e3 * this.R),
113
+ (n = Math.min(3e5, a(1e3 * this.R, 3 * t)));
117
114
  }
115
+ o.os(
116
+ r,
117
+ () => {
118
+ this.refreshFeatureFlags(t, s, e, !0);
119
+ },
120
+ h.O.Ue,
121
+ (t) => this.hs(t),
122
+ () => this.G(),
123
+ n,
124
+ );
118
125
  },
119
126
  });
120
127
  },
121
- h.O.De,
128
+ h.O.Ue,
122
129
  s,
123
130
  );
124
131
  }
125
132
  G() {
126
133
  null != this.q && (clearTimeout(this.q), (this.q = null));
127
134
  }
128
- ls(t = 1e3 * this.R, s, i, e = !1) {
129
- this.G(),
130
- (this.q = window.setTimeout(() => {
131
- this.refreshFeatureFlags(s, i, e);
132
- }, t)),
133
- (this.I = t);
135
+ hs(t) {
136
+ this.G(), (this.q = t);
134
137
  }
135
- Ce(t) {
138
+ Be(t) {
136
139
  if (!this.B) return !1;
137
140
  if (!t) {
138
- const t = this.B.Se();
141
+ const t = this.B.Xe();
139
142
  if (null == t) return !1;
140
143
  let s = !1;
141
144
  if (!isNaN(t)) {
142
145
  if (-1 === t) return N.info("Feature flag refreshes not allowed"), !1;
143
- s = new Date().getTime() >= (this.Hi || 0) + 1e3 * t;
146
+ s = new Date().getTime() >= (this.we || 0) + 1e3 * t;
144
147
  }
145
148
  if (!s)
146
149
  return (
147
150
  N.info(`Feature flag refreshes were rate limited to ${t} seconds`), !1
148
151
  );
149
152
  }
150
- return this.B.Qi();
153
+ return this.B.De();
151
154
  }
152
- qe() {
155
+ _e() {
153
156
  var s;
154
157
  return (
155
- (null === (s = this.C) || void 0 === s ? void 0 : s.ps(t.bs.xe)) || null
158
+ (null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.Ae)) || null
156
159
  );
157
160
  }
158
- ze() {
159
- var s, i;
161
+ Ge() {
162
+ var s, e;
160
163
  null === (s = this.C) ||
161
164
  void 0 === s ||
162
- s.js(t.bs.xe, null === (i = this.T) || void 0 === i ? void 0 : i.Ss());
165
+ s.Bs(t.gs.Ae, null === (e = this.T) || void 0 === e ? void 0 : e.Ss());
163
166
  }
164
- $e() {
167
+ He() {
165
168
  var t;
166
169
  const s = null === (t = this.T) || void 0 === t ? void 0 : t.Ss(),
167
- i = this.qe();
168
- return null == i || s === i;
170
+ e = this._e();
171
+ return null == e || s === e;
169
172
  }
170
- Vi() {
173
+ Se() {
171
174
  if (!this.C) return;
172
175
  const s = {};
173
- for (const t of this.Gi) {
174
- const i = t.Bs();
175
- s[t.id] = i;
176
+ for (const t of this.je) {
177
+ const e = t.bs();
178
+ s[t.id] = e;
176
179
  }
177
- this.C.js(t.bs.Yi, s), this.C.js(t.bs.ke, this.Hi), this.ze();
180
+ this.C.Bs(t.gs.xe, s), this.C.Bs(t.gs.Je, this.we), this.Ge();
178
181
  }
179
182
  }
@@ -5,8 +5,8 @@ export function getAllFeatureFlags() {
5
5
  if (!r.rr()) return;
6
6
  const e = [],
7
7
  t = r.v();
8
- if (t && !t.Qi()) return N.info("Feature flags are not enabled."), e;
9
- const n = nr.m().Wi();
8
+ if (t && !t.De()) return N.info("Feature flags are not enabled."), e;
9
+ const n = nr.m().qe();
10
10
  for (const r in n) e.push(n[r]);
11
11
  return e;
12
12
  }
@@ -4,7 +4,7 @@ import nr from "./feature-flags-provider-factory.js";
4
4
  export function getFeatureFlag(e) {
5
5
  if (!r.rr()) return;
6
6
  const t = r.v();
7
- if (t && !t.Qi()) return N.info("Feature flags are not enabled."), null;
8
- const n = nr.m().Wi();
7
+ if (t && !t.De()) return N.info("Feature flags are not enabled."), null;
8
+ const n = nr.m().qe();
9
9
  return n[e] ? n[e] : null;
10
10
  }
@@ -7,11 +7,11 @@ export function logFeatureFlagImpression(e) {
7
7
  if (!e) return !1;
8
8
  const t =
9
9
  "Not logging a feature flag impression. The feature flag was not part of any matching experiment.",
10
- o = nr.m().Wi();
10
+ o = nr.m().qe();
11
11
  if (!o[e]) return N.info(t), !1;
12
12
  const n = o[e].trackingString;
13
13
  if (!n) return N.info(t), !1;
14
- const i = nr.m().Zi();
14
+ const i = nr.m().ze();
15
15
  if (i[n])
16
16
  return (
17
17
  N.info(
@@ -19,7 +19,7 @@ export function logFeatureFlagImpression(e) {
19
19
  ),
20
20
  !1
21
21
  );
22
- (i[n] = !0), nr.m().je(i);
22
+ (i[n] = !0), nr.m().ke(i);
23
23
  const s = { fid: e, fts: n };
24
- return c.ds(d.yr, s).ss;
24
+ return c.cs(d.yr, s).ss;
25
25
  }
@@ -4,9 +4,9 @@ import { getAllFeatureFlags } from "./get-all-feature-flags.js";
4
4
  export function subscribeToFeatureFlagsUpdates(t) {
5
5
  if (!r.rr()) return;
6
6
  const e = nr.m();
7
- if (e.$e()) {
7
+ if (e.He()) {
8
8
  const r = getAllFeatureFlags();
9
9
  r && "function" == typeof t && t(r);
10
10
  }
11
- return e.Fs(t);
11
+ return e.qs(t);
12
12
  }
@@ -2,8 +2,8 @@ import s from "../common/base-provider.js";
2
2
  import r from "../managers/braze-instance.js";
3
3
  import Feed from "./feed.js";
4
4
  import {
5
- newCardFromFeedJson as lt,
6
- newCardFromSerializedValue as tt,
5
+ newCardFromFeedJson as at,
6
+ newCardFromSerializedValue as Z,
7
7
  } from "../Card/util/card-factory.js";
8
8
  import { rehydrateDateAfterJsonization as V } from "../util/date-utils.js";
9
9
  import { STORAGE_KEYS as t } from "../managers/storage-manager.js";
@@ -12,59 +12,59 @@ export default class re extends s {
12
12
  constructor(t, s) {
13
13
  super(),
14
14
  (this.C = t),
15
- (this.Ue = s),
15
+ (this.Bi = s),
16
16
  (this.cards = []),
17
- (this.Ae = null),
17
+ (this.Gi = null),
18
18
  (this.C = t),
19
- (this.Ue = s),
20
- (this.Ms = new u()),
21
- r.N(this.Ms),
22
- this.Xs();
19
+ (this.Bi = s),
20
+ (this.Js = new u()),
21
+ r.N(this.Js),
22
+ this.Ps();
23
23
  }
24
- Xs() {
24
+ Ps() {
25
25
  let s = [];
26
- this.C && (s = this.C.ps(t.bs.Be) || []);
26
+ this.C && (s = this.C.vs(t.gs.Hi) || []);
27
27
  const i = [];
28
28
  for (let t = 0; t < s.length; t++) {
29
- const e = tt(s[t]);
29
+ const e = Z(s[t]);
30
30
  null != e && i.push(e);
31
31
  }
32
- (this.cards = i), this.C && (this.Ae = V(this.C.ps(t.bs.Ge)));
32
+ (this.cards = i), this.C && (this.Gi = V(this.C.vs(t.gs.Ji)));
33
33
  }
34
- He(s) {
34
+ Ki(s) {
35
35
  const i = [];
36
36
  let e = null,
37
37
  r = {};
38
- this.C && (r = this.C.ps(t.bs.Ct) || {});
38
+ this.C && (r = this.C.vs(t.gs.Ct) || {});
39
39
  const h = {};
40
40
  for (let t = 0; t < s.length; t++) {
41
41
  e = s[t];
42
- const o = lt(e);
42
+ const o = at(e);
43
43
  if (null != o) {
44
44
  const t = o.id;
45
45
  t && r[t] && ((o.viewed = !0), (h[t] = !0)), i.push(o);
46
46
  }
47
47
  }
48
48
  (this.cards = i),
49
- this.Ri(),
50
- (this.Ae = new Date()),
51
- this.C && (this.C.js(t.bs.Ct, h), this.C.js(t.bs.Ge, this.Ae));
49
+ this.gi(),
50
+ (this.Gi = new Date()),
51
+ this.C && (this.C.Bs(t.gs.Ct, h), this.C.Bs(t.gs.Ji, this.Gi));
52
52
  }
53
- Ri() {
53
+ gi() {
54
54
  var s;
55
55
  const i = [];
56
- for (let t = 0; t < this.cards.length; t++) i.push(this.cards[t].Bs());
57
- null === (s = this.C) || void 0 === s || s.js(t.bs.Be, i);
56
+ for (let t = 0; t < this.cards.length; t++) i.push(this.cards[t].bs());
57
+ null === (s = this.C) || void 0 === s || s.Bs(t.gs.Hi, i);
58
58
  }
59
59
  U(t) {
60
60
  null != t &&
61
61
  t.feed &&
62
- (this.Xs(),
63
- this.He(t.feed),
64
- this.Ms.X(new Feed(this.cards.slice(), this.Ae)));
62
+ (this.Ps(),
63
+ this.Ki(t.feed),
64
+ this.Js.X(new Feed(this.cards.slice(), this.Gi)));
65
65
  }
66
- Je() {
67
- this.Xs();
66
+ Mi() {
67
+ this.Ps();
68
68
  const t = [],
69
69
  s = new Date();
70
70
  for (let i = 0; i < this.cards.length; i++) {
@@ -72,19 +72,19 @@ export default class re extends s {
72
72
  let r = !0;
73
73
  null != e && (r = e >= s), r && t.push(this.cards[i]);
74
74
  }
75
- return new Feed(t, this.Ae);
75
+ return new Feed(t, this.Gi);
76
76
  }
77
- zi() {
78
- this.Ue && this.Ue.requestFeedRefresh();
77
+ Di() {
78
+ this.Bi && this.Bi.requestFeedRefresh();
79
79
  }
80
- Fs(t) {
81
- return this.Ms.Ns(t);
80
+ qs(t) {
81
+ return this.Js.Fs(t);
82
82
  }
83
83
  clearData(s) {
84
84
  null == s && (s = !1),
85
85
  (this.cards = []),
86
- (this.Ae = null),
87
- s && this.C && (this.C.Ls(t.bs.Be), this.C.Ls(t.bs.Ge)),
88
- this.Ms.X(new Feed(this.cards.slice(), this.Ae));
86
+ (this.Gi = null),
87
+ s && this.C && (this.C.Es(t.gs.Hi), this.C.Es(t.gs.Ji)),
88
+ this.Js.X(new Feed(this.cards.slice(), this.Gi));
89
89
  }
90
90
  }
@@ -1,5 +1,5 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import ie from "./feed-provider-factory.js";
3
3
  export function getCachedFeed() {
4
- if (r.rr()) return ie.m().Je();
4
+ if (r.rr()) return ie.m().Mi();
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import ie from "./feed-provider-factory.js";
3
3
  export function requestFeedRefresh() {
4
- if (r.rr()) return ie.m().zi();
4
+ if (r.rr()) return ie.m().Di();
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import ie from "./feed-provider-factory.js";
3
3
  export function subscribeToFeedUpdates(e) {
4
- if (r.rr()) return ie.m().Fs(e);
4
+ if (r.rr()) return ie.m().qs(e);
5
5
  }
@@ -36,7 +36,7 @@ export function showFeed(e, t, n) {
36
36
  let l,
37
37
  f = !1;
38
38
  null == t
39
- ? ((l = ie.m().Je()),
39
+ ? ((l = ie.m().Mi()),
40
40
  an(l, o(l.cards, n), l.lastUpdated, null, i),
41
41
  (f = !0))
42
42
  : (l = new Feed(o(t, n), new Date()));
@@ -8,6 +8,6 @@ export function deferInAppMessage(e) {
8
8
  return e instanceof ControlMessage
9
9
  ? (N.info("Not deferring since this is a ControlMessage."), !1)
10
10
  : e instanceof InAppMessage
11
- ? se.ea().Me(e)
11
+ ? se.ea().Ke(e)
12
12
  : (N.info("Not an instance of InAppMessage, ignoring."), !1);
13
13
  }
@@ -1,10 +1,10 @@
1
1
  import ro from "../../util/browser-detector.js";
2
2
  import { InAppMessage, logInAppMessageHtmlClick } from "../index.js";
3
3
  import { OperatingSystems as so } from "../../util/device-constants.js";
4
- import { buildHtmlClickHandler as ct } from "./html-message-display-utils.js";
4
+ import { buildHtmlClickHandler as lt } from "./html-message-display-utils.js";
5
5
  import { attachHtmlToIframeWithNonce as m } from "../../util/html-display-utils.js";
6
6
  import { buildBrazeBridge as b } from "../../util/html-display-utils.js";
7
- export default function dt(t, e, o, s, n, i) {
7
+ export default function ct(t, e, o, s, n, i) {
8
8
  const l = document.createElement("iframe");
9
9
  l.setAttribute("title", "Modal Message"),
10
10
  n && (l.style.zIndex = (n + 1).toString());
@@ -18,7 +18,7 @@ export default function dt(t, e, o, s, n, i) {
18
18
  if (t.Oe()) {
19
19
  const e = document.createElement("style");
20
20
  (e.innerHTML = t.css || ""),
21
- (e.id = t._e() || ""),
21
+ (e.id = t.Le() || ""),
22
22
  null != i && e.setAttribute("nonce", i),
23
23
  a.appendChild(e);
24
24
  }
@@ -42,16 +42,16 @@ export default function dt(t, e, o, s, n, i) {
42
42
  },
43
43
  );
44
44
  if (
45
- ((n.appboyBridge = c), (n.brazeBridge = c), t.Ke !== InAppMessage.Qe.Le)
45
+ ((n.appboyBridge = c), (n.brazeBridge = c), t.Qe !== InAppMessage.We.Ve)
46
46
  ) {
47
47
  const e = n.document.getElementsByTagName("a");
48
- for (let o = 0; o < e.length; o++) e[o].onclick = ct(t, l, e[o], s);
48
+ for (let o = 0; o < e.length; o++) e[o].onclick = lt(t, l, e[o], s);
49
49
  const o = n.document.getElementsByTagName("button");
50
- for (let e = 0; e < o.length; e++) o[e].onclick = ct(t, l, o[e], s);
50
+ for (let e = 0; e < o.length; e++) o[e].onclick = lt(t, l, o[e], s);
51
51
  }
52
52
  const m = n.document.body;
53
53
  if (null != m) {
54
- t.Ve() && (m.id = t.htmlId || "");
54
+ t.Ye() && (m.id = t.htmlId || "");
55
55
  const e = document.createElement("hidden");
56
56
  (e.onclick = c.closeMessage),
57
57
  (e.className = "ab-programmatic-close-button"),
@@ -67,8 +67,8 @@ export default function dt(t, e, o, s, n, i) {
67
67
  ) {
68
68
  const e = document.createElement("div");
69
69
  return (
70
- (e.className = "ab-ios-scroll-wrapper"), e.appendChild(l), (t.We = e), e
70
+ (e.className = "ab-ios-scroll-wrapper"), e.appendChild(l), (t.Ze = e), e
71
71
  );
72
72
  }
73
- return (t.We = l), l;
73
+ return (t.Ze = l), l;
74
74
  }
@@ -13,19 +13,19 @@ import ModalMessage from "../models/modal-message.js";
13
13
  import SlideUpMessage from "../models/slide-up-message.js";
14
14
  import { logInAppMessageClick } from "../log-in-app-message-click.js";
15
15
  import { _handleBrazeAction as F } from "../../Core/handle-braze-action.js";
16
- import dt from "./html-message-to-html.js";
16
+ import ct from "./html-message-to-html.js";
17
17
  import ce from "./modal-utils.js";
18
18
  import { logger as N, Guid as G } from "../../../shared-lib/index.js";
19
19
  export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
20
- if (((e.Xe = document.activeElement), e instanceof HtmlMessage))
21
- return dt(e, o, a, n, s, i);
20
+ if (((e.lo = document.activeElement), e instanceof HtmlMessage))
21
+ return ct(e, o, a, n, s, i);
22
22
  const c = (function (e, o, a, t, n, s, i = document.body, m = "ltr") {
23
23
  let l = null;
24
24
  const c = document.createElement("div");
25
25
  (c.dir = m),
26
26
  (c.className = "ab-in-app-message ab-start-hidden ab-background"),
27
27
  s && (c.style.zIndex = (s + 1).toString()),
28
- e.Ye() &&
28
+ e.do() &&
29
29
  ((c.className += " ab-modal-interactions"),
30
30
  c.setAttribute("tabindex", "-1")),
31
31
  e.Oe() ||
@@ -38,7 +38,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
38
38
  document.querySelectorAll(".ab-iam-img-loading").length > 0
39
39
  ? t(
40
40
  `Cannot show in-app message ${e.message} because another message is being shown.`,
41
- InAppMessage.lo.Ze,
41
+ InAppMessage.bo.uo,
42
42
  )
43
43
  : a(c));
44
44
  },
@@ -88,7 +88,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
88
88
  c.appendChild(u), s && (u.style.zIndex = (s + 2).toString());
89
89
  const b = document.createElement("div");
90
90
  (b.className = "ab-message-text"), (b.dir = m);
91
- const p = (e.messageAlignment || e.do).toLowerCase();
91
+ const p = (e.messageAlignment || e.po).toLowerCase();
92
92
  b.className += " " + p + "-aligned";
93
93
  let g = !1;
94
94
  const f = document.createElement("div");
@@ -99,13 +99,13 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
99
99
  (o.style.backgroundImage = "url(" + e.imageUrl + ")"),
100
100
  o.setAttribute("role", "img"),
101
101
  o.setAttribute("aria-label", "Modal Image"),
102
- e.uo(o),
102
+ e.fo(o),
103
103
  f.appendChild(o);
104
104
  } else {
105
105
  const o = document.createElement("img");
106
106
  if (
107
107
  (o.setAttribute("src", e.imageUrl),
108
- e.uo(o),
108
+ e.fo(o),
109
109
  0 === document.querySelectorAll(".ab-iam-img-loading").length)
110
110
  ) {
111
111
  g = !0;
@@ -142,7 +142,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
142
142
  }
143
143
  if ((J(b, "touchstart"), e.header && e.header.length > 0)) {
144
144
  const o = document.createElement("h1");
145
- (o.className = "ab-message-header"), (e.bo = G.Rt()), (o.id = e.bo);
145
+ (o.className = "ab-message-header"), (e.ho = G.Rt()), (o.id = e.ho);
146
146
  const a = (
147
147
  e.headerAlignment || InAppMessage.TextAlignment.CENTER
148
148
  ).toLowerCase();
@@ -151,14 +151,14 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
151
151
  o.appendChild(document.createTextNode(e.header)),
152
152
  b.appendChild(o);
153
153
  }
154
- return b.appendChild(e.po()), c.appendChild(b), g || d(), (e.We = c), c;
154
+ return b.appendChild(e.jo()), c.appendChild(b), g || d(), (e.Ze = c), c;
155
155
  })(e, o, a, t, n, s, m, l);
156
156
  if (e instanceof FullScreenMessage || e instanceof ModalMessage) {
157
157
  const a = e instanceof FullScreenMessage ? "ab-fullscreen" : "ab-modal";
158
158
  (c.className += ` ${a} ab-centered`),
159
- ce.fo(e, o, c, n),
160
- ce.ho(c),
161
- ce.jo(e.bo, c);
159
+ ce.wo(e, o, c, n),
160
+ ce.vo(c),
161
+ ce.xo(e.ho, c);
162
162
  } else if (e instanceof SlideUpMessage) {
163
163
  c.className += " ab-slideup";
164
164
  const o = c.getElementsByClassName("ab-close-button")[0];
@@ -168,7 +168,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
168
168
  "M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z",
169
169
  e.Oe() ? void 0 : le(e.closeButtonColor),
170
170
  );
171
- a.setAttribute("class", "ab-chevron"), o.appendChild(a);
171
+ a.setAttribute("class", `ab-chevron ${l}`), o.appendChild(a);
172
172
  }
173
173
  let a, t;
174
174
  H(c, R.kt, (e) => {
@@ -180,8 +180,8 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
180
180
  null != o && null != o.onclick && o.onclick(e);
181
181
  }),
182
182
  e.slideFrom === InAppMessage.SlideFrom.TOP
183
- ? ((a = R.wo), (t = " ab-swiped-up"))
184
- : ((a = R.vo), (t = " ab-swiped-down")),
183
+ ? ((a = R.Co), (t = " ab-swiped-up"))
184
+ : ((a = R.$o), (t = " ab-swiped-down")),
185
185
  H(c, a, (e) => {
186
186
  (c.className += t), null != o && null != o.onclick && o.onclick(e);
187
187
  });