@braze/web-sdk 5.7.0 → 5.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 (98) hide show
  1. package/index.d.ts +4 -4
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +1 -1
  4. package/shared-lib/event-types.js +8 -8
  5. package/shared-lib/indexed-db-adapter.js +7 -7
  6. package/shared-lib/logger.js +2 -2
  7. package/shared-lib/supported-options.js +17 -17
  8. package/src/Banner/get-all-banners.js +2 -3
  9. package/src/Banner/get-banner.js +11 -11
  10. package/src/Banner/request-banners-refresh.js +20 -12
  11. package/src/Banner/subscribe-to-banners-updates.js +14 -13
  12. package/src/Banner/ui/insert-banner.js +11 -9
  13. package/src/Card/log-card-impressions.js +2 -2
  14. package/src/ContentCards/content-cards-provider-factory.js +1 -1
  15. package/src/ContentCards/content-cards.js +3 -3
  16. package/src/ContentCards/ui/show-content-cards.js +5 -5
  17. package/src/Core/add-sdk-metadata.js +2 -2
  18. package/src/Core/change-user.js +3 -3
  19. package/src/Core/disable-sdk.js +5 -5
  20. package/src/Core/enable-sdk.js +3 -3
  21. package/src/Core/get-device-id.js +2 -2
  22. package/src/Core/get-user.js +1 -1
  23. package/src/Core/is-disabled.js +1 -1
  24. package/src/Core/open-session.js +6 -6
  25. package/src/Core/wipe-data.js +1 -1
  26. package/src/FeatureFlags/feature-flag-factory.js +4 -4
  27. package/src/FeatureFlags/feature-flag.js +17 -17
  28. package/src/FeatureFlags/feature-flags-provider.js +37 -37
  29. package/src/FeatureFlags/get-all-feature-flags.js +6 -7
  30. package/src/FeatureFlags/get-feature-flag.js +5 -6
  31. package/src/FeatureFlags/log-feature-flag-impression.js +3 -3
  32. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
  33. package/src/Feed/feed.js +2 -2
  34. package/src/Feed/ui/show-feed.js +4 -4
  35. package/src/InAppMessage/defer-in-app-message.js +1 -1
  36. package/src/InAppMessage/display/html-message-to-html.js +6 -6
  37. package/src/InAppMessage/display/in-app-message-to-html.js +18 -18
  38. package/src/InAppMessage/display/modal-utils.js +4 -4
  39. package/src/InAppMessage/in-app-message-factory.js +4 -4
  40. package/src/InAppMessage/in-app-message-manager-factory.js +1 -1
  41. package/src/InAppMessage/in-app-message-manager.js +49 -49
  42. package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
  43. package/src/InAppMessage/log-in-app-message-click.js +1 -1
  44. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  45. package/src/InAppMessage/models/control-message.js +1 -1
  46. package/src/InAppMessage/models/full-screen-message.js +3 -3
  47. package/src/InAppMessage/models/html-message.js +5 -5
  48. package/src/InAppMessage/models/in-app-message-button.js +2 -2
  49. package/src/InAppMessage/models/in-app-message.js +32 -32
  50. package/src/InAppMessage/models/modal-message.js +3 -3
  51. package/src/InAppMessage/models/slide-up-message.js +6 -6
  52. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  53. package/src/InAppMessage/ui/show-in-app-message.js +18 -18
  54. package/src/Push/push-manager-factory.js +8 -8
  55. package/src/Push/push-manager.js +83 -83
  56. package/src/Push/utils/push-utils.js +4 -4
  57. package/src/User/user-manager.js +6 -6
  58. package/src/User/user.js +18 -18
  59. package/src/common/base-feed.js +3 -3
  60. package/src/common/event-logger.js +1 -1
  61. package/src/common/feed-display.js +8 -8
  62. package/src/l10n/l10n-manager-factory.js +2 -2
  63. package/src/l10n/l10n-manager.js +1 -1
  64. package/src/managers/braze-instance.js +107 -107
  65. package/src/managers/device-manager.js +18 -18
  66. package/src/managers/network-manager.js +117 -117
  67. package/src/managers/server-config-manager.js +61 -61
  68. package/src/managers/session-manager.js +25 -25
  69. package/src/managers/storage-manager-factory.js +8 -8
  70. package/src/managers/storage-manager.js +57 -57
  71. package/src/models/backend-errors.js +5 -5
  72. package/src/models/braze-event.js +2 -2
  73. package/src/models/device.js +2 -2
  74. package/src/models/identifier.js +10 -10
  75. package/src/models/push-token.js +7 -7
  76. package/src/models/server-config.js +30 -30
  77. package/src/request-controller.js +93 -93
  78. package/src/triggers/models/filter-set.js +4 -4
  79. package/src/triggers/models/filter.js +1 -1
  80. package/src/triggers/models/trigger-condition.js +29 -29
  81. package/src/triggers/models/trigger-events.js +1 -1
  82. package/src/triggers/models/trigger.js +9 -9
  83. package/src/triggers/triggers-provider-factory.js +2 -2
  84. package/src/triggers/triggers-provider.js +15 -15
  85. package/src/ui/js/attach-css.js +3 -3
  86. package/src/ui/js/load-font-awesome.js +2 -2
  87. package/src/util/base-device-parser.js +3 -3
  88. package/src/util/braze-actions.js +4 -4
  89. package/src/util/browser-detector.js +5 -5
  90. package/src/util/client-hints-parser.js +1 -1
  91. package/src/util/component-utils.js +1 -1
  92. package/src/util/dom-utils.js +6 -6
  93. package/src/util/key-codes.js +1 -1
  94. package/src/util/net.js +1 -1
  95. package/src/util/request-header-utils.js +13 -13
  96. package/src/util/user-agent-parser.js +1 -1
  97. package/src/util/validation-utils.js +4 -4
  98. package/src/util/window-utils.js +1 -1
@@ -15,56 +15,56 @@ import vt from "./Push/utils/push-utils.js";
15
15
  import h from "./util/request-header-utils.js";
16
16
  export default class Lt {
17
17
  constructor(t, i, s, e, h, o, n, r, l, a) {
18
- (this.fn = t),
18
+ (this.cn = t),
19
19
  (this.baseUrl = i),
20
20
  (this.T = s),
21
- (this.dn = e),
21
+ (this.fn = e),
22
22
  (this.As = h),
23
23
  (this.B = o),
24
24
  (this.C = n),
25
25
  (this.$l = r),
26
- (this.Qh = l),
26
+ (this.Na = l),
27
27
  (this.S = a),
28
- (this.fn = t),
28
+ (this.cn = t),
29
29
  (this.baseUrl = i),
30
- (this.Pl = 0),
30
+ (this.Ml = 0),
31
31
  (this.dE = n.IE() || 0),
32
- (this.Ul = null),
32
+ (this.Pl = null),
33
33
  (this.T = s),
34
- (this.dn = e),
34
+ (this.fn = e),
35
35
  (this.As = h),
36
36
  (this.B = o),
37
37
  (this.C = n),
38
- (this.Qh = l),
38
+ (this.Na = l),
39
39
  (this.S = a),
40
40
  (this.$l = r),
41
- (this._l = new u()),
42
- (this.Xl = null),
43
- (this.Ql = 50),
44
- (this.Yl = !1);
41
+ (this.Ol = new u()),
42
+ (this.Ul = null),
43
+ (this._l = 50),
44
+ (this.Xl = !1);
45
45
  }
46
- Zl(t, i) {
47
- return !t && !i && this.Qh.Kh() >= this.Ql;
46
+ Ql(t, i) {
47
+ return !t && !i && this.Na.Kh() >= this._l;
48
48
  }
49
- sc(t) {
50
- let i = this.T.Wl();
49
+ Yl(t) {
50
+ let i = this.T.zl();
51
51
  if (t.length > 0) {
52
52
  const s = this.As.getUserId();
53
53
  for (const e of t) {
54
54
  const t = (!e.userId && !s) || e.userId === s;
55
- e.type === d.Kl && t && (i = !0);
55
+ e.type === d.Il && t && (i = !0);
56
56
  }
57
57
  }
58
58
  return i;
59
59
  }
60
- hc(i = !1, s = !1, e = !0, o, n, r, u = !1, c = !1) {
61
- e && this.uc();
60
+ Zl(i = !1, s = !1, e = !0, o, n, r, u = !1, c = !1) {
61
+ e && this.sc();
62
62
  const d = this.C.AE(),
63
63
  m = this.C.OE();
64
64
  let f = !1;
65
65
  const g = (i, s, u = -1) => {
66
66
  const c = new Date().valueOf();
67
- h.W(this.C, h.O.zu, c),
67
+ h.W(this.C, h.O.Su, c),
68
68
  -1 !== u && s.push(["X-Braze-Req-Tokens-Remaining", u.toString()]);
69
69
  let d = !1;
70
70
  l.Y({
@@ -74,18 +74,18 @@ export default class Lt {
74
74
  ss: (e) => {
75
75
  null != i.respond_with &&
76
76
  i.respond_with.triggers &&
77
- (this.Pl = Math.max(this.Pl - 1, 0)),
77
+ (this.Ml = Math.max(this.Ml - 1, 0)),
78
78
  this.S.ts(i, e, s)
79
- ? (this.Qh.es(),
80
- this.B.Cl(e),
79
+ ? (this.Na.es(),
80
+ this.B.dl(e),
81
81
  (null != i.respond_with &&
82
82
  i.respond_with.user_id != this.As.getUserId()) ||
83
- (null != i.device && this.C.Bs(t.gs.$a, i.device),
83
+ (null != i.device && this.C.Bs(t.gs.ec, i.device),
84
84
  null != i.sdk_metadata &&
85
- (this.C.Bs(t.gs.qu, i.sdk_metadata),
86
- this.C.Bs(t.gs.Au, this.T.Ss())),
85
+ (this.C.Bs(t.gs.gu, i.sdk_metadata),
86
+ this.C.Bs(t.gs.bu, this.T.Ss())),
87
87
  this.$l(e),
88
- h.Lu(this.C, h.O.zu, 1),
88
+ h.$u(this.C, h.O.Su, 1),
89
89
  "function" == typeof o && o()))
90
90
  : e.auth_error && (d = !0);
91
91
  },
@@ -93,13 +93,13 @@ export default class Lt {
93
93
  (d = !0),
94
94
  null != i.respond_with &&
95
95
  i.respond_with.triggers &&
96
- (this.Pl = Math.max(this.Pl - 1, 0)),
97
- this.S.Du(i.events, i.attributes),
96
+ (this.Ml = Math.max(this.Ml - 1, 0)),
97
+ this.S.qu(i.events, i.attributes),
98
98
  "function" == typeof n && n();
99
99
  },
100
100
  rs: (t, i) => {
101
101
  "function" == typeof r && r(!d);
102
- const s = this.S.Ou(i);
102
+ const s = this.S.xu(i);
103
103
  let o = 0;
104
104
  if (s)
105
105
  switch (s.type) {
@@ -111,93 +111,93 @@ export default class Lt {
111
111
  }
112
112
  if (e && !f) {
113
113
  if (d) {
114
- h.Gu(this.C, h.O.zu);
115
- let t = this.Ul;
114
+ h.Hu(this.C, h.O.Su);
115
+ let t = this.Pl;
116
116
  (null == t || t < 1e3 * this.dE) && (t = 1e3 * this.dE);
117
117
  const i = Math.min(3e5, a(1e3 * this.dE, 3 * t)) + o;
118
- this.lc(i);
119
- } else this.lc(Math.max(1e3 * this.dE, o));
118
+ this.hc(i);
119
+ } else this.hc(Math.max(1e3 * this.dE, o));
120
120
  f = !0;
121
121
  }
122
122
  },
123
123
  });
124
124
  },
125
- p = this.sc(d),
125
+ p = this.Yl(d),
126
126
  v = s || p;
127
- if (this.Zl(u, p))
127
+ if (this.Ql(u, p))
128
128
  return void N.info(
129
129
  "Declining to flush data due to 50 consecutive authentication failures",
130
130
  );
131
- if (e && !this.S.Su(d, m, i, v))
132
- return this.lc(), void ("function" == typeof r && r(!0));
133
- const b = this.S.Bu(i, v, d, m, c);
134
- v && this.Pl++;
131
+ if (e && !this.S.wu(d, m, i, v))
132
+ return this.hc(), void ("function" == typeof r && r(!0));
133
+ const b = this.S.Cu(i, v, d, m, c);
134
+ v && this.Ml++;
135
135
  let w = !1;
136
136
  if (b)
137
137
  for (const t of b)
138
138
  this.S.V(
139
139
  t.requestData,
140
140
  (i) => g(t.requestData, t.headers, i),
141
- h.O.zu,
141
+ h.O.Su,
142
142
  n,
143
143
  ),
144
144
  (w = !0);
145
- this.Qh.jh() && e && !w
146
- ? this.lc()
147
- : p && (N.info("Invoking new session subscriptions"), this._l.X());
145
+ this.Na.jh() && e && !w
146
+ ? this.hc()
147
+ : p && (N.info("Invoking new session subscriptions"), this.Ol.X());
148
148
  }
149
- cc() {
150
- return this.Pl > 0;
149
+ uc() {
150
+ return this.Ml > 0;
151
151
  }
152
- lc(t = 1e3 * this.dE) {
153
- this.Yl ||
154
- (this.uc(),
155
- (this.Xl = window.setTimeout(() => {
152
+ hc(t = 1e3 * this.dE) {
153
+ this.Xl ||
154
+ (this.sc(),
155
+ (this.Ul = window.setTimeout(() => {
156
156
  if (document.hidden) {
157
157
  const t = "visibilitychange",
158
158
  i = () => {
159
159
  document.hidden ||
160
- (document.removeEventListener(t, i, !1), this.hc());
160
+ (document.removeEventListener(t, i, !1), this.Zl());
161
161
  };
162
162
  document.addEventListener(t, i, !1);
163
- } else this.hc();
163
+ } else this.Zl();
164
164
  }, t)),
165
- (this.Ul = t));
165
+ (this.Pl = t));
166
166
  }
167
- uc() {
168
- null != this.Xl && (clearTimeout(this.Xl), (this.Xl = null));
167
+ sc() {
168
+ null != this.Ul && (clearTimeout(this.Ul), (this.Ul = null));
169
169
  }
170
170
  initialize() {
171
- (this.Yl = !1), this.lc();
171
+ (this.Xl = !1), this.hc();
172
172
  }
173
173
  destroy() {
174
- this._l.removeAllSubscriptions(),
175
- this.Qh.Hh(),
176
- this.uc(),
177
- (this.Yl = !0),
178
- this.hc(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0),
179
- (this.Xl = null);
174
+ this.Ol.removeAllSubscriptions(),
175
+ this.Na.Hh(),
176
+ this.sc(),
177
+ (this.Xl = !0),
178
+ this.Zl(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0),
179
+ (this.Ul = null);
180
180
  }
181
181
  rn(t) {
182
- return this._l.Fs(t);
182
+ return this.Ol.Fs(t);
183
183
  }
184
184
  openSession() {
185
185
  const i = this.T.Ss() !== this.T.Eo();
186
- i && (this.C.TE(t.iu.$h), this.C.TE(t.iu.su)),
187
- this.hc(void 0, !1, void 0, () => {
188
- this.C.Es(t.gs.$e);
186
+ i && (this.C.TE(t.iu.Xh), this.C.TE(t.iu.su)),
187
+ this.Zl(void 0, !1, void 0, () => {
188
+ this.C.Es(t.gs.Be);
189
189
  }),
190
- this.bu(),
190
+ this.du(),
191
191
  i &&
192
192
  import("./Push/push-manager-factory.js").then((i) => {
193
- if (this.Yl) return;
193
+ if (this.Xl) return;
194
194
  const s = i.default.ea();
195
195
  if (
196
196
  null != s &&
197
197
  (vt.isPushPermissionGranted() || vt.isPushBlocked())
198
198
  ) {
199
199
  const i = () => {
200
- s.jn()
200
+ s.Sn()
201
201
  ? N.info(
202
202
  "Push token maintenance is disabled, not refreshing token for backend.",
203
203
  )
@@ -207,43 +207,43 @@ export default class Lt {
207
207
  s && i();
208
208
  },
209
209
  h = () => {
210
- const s = this.C.vs(t.gs.Bn);
210
+ const s = this.C.vs(t.gs.Fn);
211
211
  (null == s || s) && i();
212
212
  },
213
213
  o = tt._s.Xs;
214
- new tt(o, N).jr(o.Ks.cu, e, h);
214
+ new tt(o, N).cr(o.Ks.cu, e, h);
215
215
  }
216
216
  });
217
217
  }
218
218
  dc() {
219
- this.C.Es(t.gs.xe), this.C.Es(t.gs.di), this.C.Es(t.gs.on);
219
+ this.C.Es(t.gs.$e), this.C.Es(t.gs.di), this.C.Es(t.gs.Zr);
220
220
  }
221
221
  changeUser(i, s, e) {
222
222
  const h = this.As.getUserId();
223
223
  if (h !== i) {
224
- this.T.Ml(),
224
+ this.T.Jl(),
225
225
  this.dc(),
226
- null != h && this.hc(void 0, !1, void 0, void 0, void 0),
226
+ null != h && this.Zl(void 0, !1, void 0, void 0, void 0),
227
227
  this.As.ou(i),
228
- e ? this.Qh.setSdkAuthenticationSignature(e) : this.Qh.Bh();
228
+ e ? this.Na.setSdkAuthenticationSignature(e) : this.Na.Bh();
229
229
  for (let t = 0; t < s.length; t++) s[t].changeUser(null == h);
230
230
  null != h && this.C.Es(t.gs.Ct),
231
- this.C.Es(t.gs.$a),
231
+ this.C.Es(t.gs.ec),
232
232
  this.C.Es(t.gs._E),
233
233
  this.openSession(),
234
234
  N.info('Changed user to "' + i + '".');
235
235
  } else {
236
236
  let t = "Doing nothing.";
237
237
  e &&
238
- this.Qh.xh() !== e &&
239
- (this.Qh.setSdkAuthenticationSignature(e),
238
+ this.Na.xh() !== e &&
239
+ (this.Na.setSdkAuthenticationSignature(e),
240
240
  (t = "Updated SDK authentication signature")),
241
241
  N.info(`Current user is already ${i}. ${t}`);
242
242
  }
243
243
  }
244
244
  requestImmediateDataFlush(t) {
245
- this.uc(), this.T.Eo();
246
- this.hc(
245
+ this.sc(), this.T.Eo();
246
+ this.Zl(
247
247
  void 0,
248
248
  void 0,
249
249
  void 0,
@@ -256,12 +256,12 @@ export default class Lt {
256
256
  );
257
257
  }
258
258
  requestFeedRefresh() {
259
- this.T.Eo(), this.hc(!0);
259
+ this.T.Eo(), this.Zl(!0);
260
260
  }
261
- vr(t, i) {
261
+ br(t, i) {
262
262
  this.T.Eo(),
263
263
  N.info("Requesting explicit trigger refresh."),
264
- this.hc(void 0, !0, void 0, t, i);
264
+ this.Zl(void 0, !0, void 0, t, i);
265
265
  }
266
266
  Ln(i, s) {
267
267
  const e = d.mc,
@@ -297,31 +297,31 @@ export default class Lt {
297
297
  r
298
298
  );
299
299
  }
300
- br(t, i) {
300
+ lr(t, i) {
301
301
  const s = this.T.Eo();
302
302
  return new ve(this.As.getUserId(), d.gc, t, s, { cid: i });
303
303
  }
304
304
  vc(t, i) {
305
305
  return new tt(t, i);
306
306
  }
307
- bu() {
307
+ du() {
308
308
  const t = tt._s.Xs;
309
- this.vc(t, N).setItem(t.Ks.zu, 1, {
309
+ this.vc(t, N).setItem(t.Ks.Su, 1, {
310
310
  baseUrl: this.baseUrl,
311
- data: { api_key: this.fn, device_id: this.dn.ce().id },
311
+ data: { api_key: this.cn, device_id: this.fn.de().id },
312
312
  userId: this.As.getUserId(),
313
- sdkAuthEnabled: this.Qh.jh(),
313
+ sdkAuthEnabled: this.Na.jh(),
314
314
  });
315
315
  }
316
- wr(t) {
316
+ vr(t) {
317
317
  for (const i of t)
318
- if (i.api_key === this.fn) this.S.Du(i.events, i.attributes);
318
+ if (i.api_key === this.cn) this.S.qu(i.events, i.attributes);
319
319
  else {
320
320
  const t = tt._s.Xs;
321
- new tt(t, N).setItem(t.Ks.$r, G.Rt(), i);
321
+ new tt(t, N).setItem(t.Ks.kr, G.Rt(), i);
322
322
  }
323
323
  }
324
- Zn(t, i, s) {
324
+ Qn(t, i, s) {
325
325
  if (this.B.hu(t))
326
326
  return (
327
327
  N.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new E()
@@ -334,7 +334,7 @@ export default class Lt {
334
334
  c.cs(e, h)
335
335
  );
336
336
  }
337
- au(t, i) {
337
+ Xn(t, i) {
338
338
  const s = { group_id: t, status: i };
339
339
  return c.cs(d.kc, s);
340
340
  }
@@ -1,5 +1,5 @@
1
1
  import fr from "./filter.js";
2
- import { isArray as w } from "../../util/code-utils.js";
2
+ import { isArray as z } from "../../util/code-utils.js";
3
3
  export default class is {
4
4
  constructor(t) {
5
5
  (this.filters = t), (this.filters = t);
@@ -22,7 +22,7 @@ export default class is {
22
22
  return r;
23
23
  }
24
24
  static fromJson(t) {
25
- if (null == t || !w(t)) return null;
25
+ if (null == t || !z(t)) return null;
26
26
  const r = [];
27
27
  for (let e = 0; e < t.length; e++) {
28
28
  const o = [],
@@ -42,12 +42,12 @@ export default class is {
42
42
  }
43
43
  return t;
44
44
  }
45
- static Yn(t) {
45
+ static Bn(t) {
46
46
  const r = [];
47
47
  for (let e = 0; e < t.length; e++) {
48
48
  const o = [],
49
49
  s = t[e];
50
- for (let t = 0; t < s.length; t++) o.push(fr.Yn(s[t]));
50
+ for (let t = 0; t < s.length; t++) o.push(fr.Bn(s[t]));
51
51
  r.push(o);
52
52
  }
53
53
  return new is(r);
@@ -81,7 +81,7 @@ export default class fr {
81
81
  { k: this.yE, t: this.HE, c: this.comparator, v: t }
82
82
  );
83
83
  }
84
- static Yn(t) {
84
+ static Bn(t) {
85
85
  return new fr(t.k, t.t, t.c, t.v);
86
86
  }
87
87
  }
@@ -28,25 +28,25 @@ export default class ri {
28
28
  const t = e.type;
29
29
  let r = null;
30
30
  switch (t) {
31
- case ri.Wr.OPEN:
32
- case ri.Wr.Xt:
31
+ case ri.Ur.OPEN:
32
+ case ri.Ur.Xt:
33
33
  break;
34
- case ri.Wr.Rr:
34
+ case ri.Ur.Rr:
35
35
  r = ns.fromJson(e.data);
36
36
  break;
37
- case ri.Wr.jc:
37
+ case ri.Ur.jc:
38
38
  r = hs.fromJson(e.data);
39
39
  break;
40
- case ri.Wr.kr:
40
+ case ri.Ur.hr:
41
41
  r = ur.fromJson(e.data);
42
42
  break;
43
- case ri.Wr.ve:
43
+ case ri.Ur.ve:
44
44
  r = ts.fromJson(e.data);
45
45
  break;
46
- case ri.Wr.Cc:
46
+ case ri.Ur.Cc:
47
47
  r = rs.fromJson(e.data);
48
48
  break;
49
- case ri.Wr.Bo:
49
+ case ri.Ur.Bo:
50
50
  r = ni.fromJson(e.data);
51
51
  }
52
52
  return new ri(t, r);
@@ -54,50 +54,50 @@ export default class ri {
54
54
  bs() {
55
55
  return { t: this.type, d: this.data ? this.data.bs() : null };
56
56
  }
57
- static Yn(e) {
57
+ static Bn(e) {
58
58
  let t,
59
59
  r = null;
60
60
  switch (e.t) {
61
- case ri.Wr.OPEN:
62
- case ri.Wr.Xt:
61
+ case ri.Ur.OPEN:
62
+ case ri.Ur.Xt:
63
63
  break;
64
- case ri.Wr.Rr:
64
+ case ri.Ur.Rr:
65
65
  r = new ns(e.d);
66
66
  break;
67
- case ri.Wr.jc:
68
- (t = e.d || {}), (r = new hs(t.id, is.Yn(t.pf || [])));
67
+ case ri.Ur.jc:
68
+ (t = e.d || {}), (r = new hs(t.id, is.Bn(t.pf || [])));
69
69
  break;
70
- case ri.Wr.kr:
70
+ case ri.Ur.hr:
71
71
  r = new ur(e.d);
72
72
  break;
73
- case ri.Wr.ve:
73
+ case ri.Ur.ve:
74
74
  r = new ts(e.d);
75
75
  break;
76
- case ri.Wr.Cc:
77
- (t = e.d || {}), (r = new rs(t.e, is.Yn(t.pf || [])));
76
+ case ri.Ur.Cc:
77
+ (t = e.d || {}), (r = new rs(t.e, is.Bn(t.pf || [])));
78
78
  break;
79
- case ri.Wr.Bo:
79
+ case ri.Ur.Bo:
80
80
  r = new ni(e.d);
81
81
  }
82
82
  return new ri(e.t, r);
83
83
  }
84
84
  }
85
- (ri.Wr = {
85
+ (ri.Ur = {
86
86
  OPEN: "open",
87
87
  Rr: "purchase",
88
88
  jc: "purchase_property",
89
- kr: "push_click",
89
+ hr: "push_click",
90
90
  ve: "custom_event",
91
91
  Cc: "custom_event_property",
92
92
  Bo: "iam_click",
93
93
  Xt: "test",
94
94
  }),
95
95
  (ri.Ec = {}),
96
- (ri.Ec[ri.Wr.OPEN] = et.OPEN),
97
- (ri.Ec[ri.Wr.Rr] = et.Rr),
98
- (ri.Ec[ri.Wr.jc] = et.Rr),
99
- (ri.Ec[ri.Wr.kr] = et.kr),
100
- (ri.Ec[ri.Wr.ve] = et.ve),
101
- (ri.Ec[ri.Wr.Cc] = et.ve),
102
- (ri.Ec[ri.Wr.Bo] = et.Bo),
103
- (ri.Ec[ri.Wr.Xt] = et.Xt);
96
+ (ri.Ec[ri.Ur.OPEN] = et.OPEN),
97
+ (ri.Ec[ri.Ur.Rr] = et.Rr),
98
+ (ri.Ec[ri.Ur.jc] = et.Rr),
99
+ (ri.Ec[ri.Ur.hr] = et.hr),
100
+ (ri.Ec[ri.Ur.ve] = et.ve),
101
+ (ri.Ec[ri.Ur.Cc] = et.ve),
102
+ (ri.Ec[ri.Ur.Bo] = et.Bo),
103
+ (ri.Ec[ri.Ur.Xt] = et.Xt);
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  OPEN: "open",
3
3
  Rr: "purchase",
4
- kr: "push_click",
4
+ hr: "push_click",
5
5
  ve: "custom_event",
6
6
  Bo: "iam_click",
7
7
  Xt: "test",
@@ -16,7 +16,7 @@ export default class pt {
16
16
  (this.data = l),
17
17
  (this.ed = o),
18
18
  (this.rd = n),
19
- (this.sn = a),
19
+ (this.Yr = a),
20
20
  (this.hd = u),
21
21
  (this.od = d),
22
22
  (this.id = t),
@@ -29,7 +29,7 @@ export default class pt {
29
29
  (this.type = h),
30
30
  (this.ed = o || 0),
31
31
  null == a && (a = 1e3 * (this.ed + 30)),
32
- (this.sn = a),
32
+ (this.Yr = a),
33
33
  (this.data = l),
34
34
  null != n && (this.rd = n),
35
35
  (this.hd = u),
@@ -49,11 +49,11 @@ export default class pt {
49
49
  }
50
50
  dd(t) {
51
51
  const i = new Date().valueOf() - t,
52
- s = null == t || isNaN(i) || null == this.sn || i < this.sn;
52
+ s = null == t || isNaN(i) || null == this.Yr || i < this.Yr;
53
53
  return (
54
54
  s ||
55
55
  N.info(
56
- `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.sn}ms.`,
56
+ `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.Yr}ms.`,
57
57
  ),
58
58
  !s
59
59
  );
@@ -73,7 +73,7 @@ export default class pt {
73
73
  u = t.data,
74
74
  d = t.min_seconds_since_last_trigger;
75
75
  return ta(
76
- pt.Wr,
76
+ pt.Ur,
77
77
  l,
78
78
  "Could not construct Trigger from server data",
79
79
  "Trigger.Types",
@@ -94,15 +94,15 @@ export default class pt {
94
94
  da: this.data,
95
95
  d: this.ed,
96
96
  r: this.rd,
97
- tm: this.sn,
97
+ tm: this.Yr,
98
98
  ss: this.hd,
99
99
  ld: this.od,
100
100
  };
101
101
  }
102
- static Yn(t) {
102
+ static Bn(t) {
103
103
  const i = [],
104
104
  s = t.c || [];
105
- for (let t = 0; t < s.length; t++) i.push(ri.Yn(s[t]));
105
+ for (let t = 0; t < s.length; t++) i.push(ri.Bn(s[t]));
106
106
  return new pt(
107
107
  t.i,
108
108
  i,
@@ -119,4 +119,4 @@ export default class pt {
119
119
  );
120
120
  }
121
121
  }
122
- (pt.Wr = { Vr: "inapp", md: "templated_iam" }), (pt.td = -1);
122
+ (pt.Ur = { Qr: "inapp", md: "templated_iam" }), (pt.td = -1);
@@ -1,5 +1,5 @@
1
1
  import se from "../InAppMessage/in-app-message-manager-factory.js";
2
- import r, { OPTIONS as z } from "../managers/braze-instance.js";
2
+ import r, { OPTIONS as w } from "../managers/braze-instance.js";
3
3
  import gr from "./triggers-provider.js";
4
4
  export const TriggersProviderFactory = {
5
5
  l: !1,
@@ -11,7 +11,7 @@ export const TriggersProviderFactory = {
11
11
  ),
12
12
  rg: () => {
13
13
  if (!TriggersProviderFactory.provider) {
14
- const i = r.sr(z.Xo);
14
+ const i = r.ee(w.Qo);
15
15
  (TriggersProviderFactory.provider = new gr(
16
16
  null != i ? i : 30,
17
17
  se.ea().Vi(),