@braze/web-sdk 6.7.1 → 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
@@ -1,8 +1,8 @@
1
1
  import {
2
- GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as di,
3
- GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as mi,
2
+ GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as mi,
3
+ GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as fi,
4
4
  } from "../common/constants.js";
5
- export default class ci {
5
+ export default class di {
6
6
  constructor(
7
7
  t = 0,
8
8
  i = [],
@@ -12,49 +12,49 @@ export default class ci {
12
12
  l = null,
13
13
  r = { enabled: !1 },
14
14
  n = { enabled: !1, refresh_rate_limit: void 0 },
15
- a = { enabled: !0, capacity: di, refill_rate: mi, endpoint_overrides: {} },
15
+ a = { enabled: !0, capacity: mi, refill_rate: fi, endpoint_overrides: {} },
16
16
  o = null,
17
17
  u = null,
18
18
  c = null,
19
19
  d = null,
20
20
  ) {
21
- (this.ec = t),
22
- (this.uc = i),
23
- (this.oc = s),
24
- (this.ac = h),
25
- (this.cc = e),
26
- (this.rc = l),
27
- (this.lc = r),
21
+ (this.nc = t),
22
+ (this.ac = i),
23
+ (this.hc = s),
24
+ (this.cc = h),
25
+ (this.mc = e),
26
+ (this.uc = l),
27
+ (this.oc = r),
28
28
  (this.Xr = n),
29
- (this.nc = a),
29
+ (this.lc = a),
30
30
  (this.banners = o),
31
31
  (this.dust = u),
32
- (this.vc = c),
33
- (this.fc = d);
32
+ (this.fc = c),
33
+ (this.Rc = d);
34
34
  }
35
35
  qt() {
36
36
  return {
37
- s: "6.7.1",
38
- l: this.ec,
39
- e: this.uc,
40
- a: this.oc,
41
- p: this.ac,
42
- m: this.cc,
43
- v: this.rc,
44
- c: this.lc,
37
+ s: "6.8.0",
38
+ l: this.nc,
39
+ e: this.ac,
40
+ a: this.hc,
41
+ p: this.cc,
42
+ m: this.mc,
43
+ v: this.uc,
44
+ c: this.oc,
45
45
  f: this.Xr,
46
- grl: this.nc,
46
+ grl: this.lc,
47
47
  b: this.banners,
48
48
  d: this.dust,
49
- rb: this.vc,
50
- mst: this.fc,
49
+ rb: this.fc,
50
+ mst: this.Rc,
51
51
  };
52
52
  }
53
53
  static _u(t) {
54
54
  let i = t.l;
55
55
  return (
56
- "6.7.1" !== t.s && (i = 0),
57
- new ci(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b, t.d, t.rb, t.mst)
56
+ "6.8.0" !== t.s && (i = 0),
57
+ new di(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b, t.d, t.rb, t.mst)
58
58
  );
59
59
  }
60
60
  }
@@ -5,7 +5,7 @@ import {
5
5
  logger as E,
6
6
  } from "../shared-lib/index.js";
7
7
  import v from "./common/event-logger.js";
8
- import { removeAllVisibleInAppMessages as fi } from "./InAppMessage/ui/remove-all-visible-in-app-messages.js";
8
+ import { removeAllVisibleInAppMessages as gi } from "./InAppMessage/ui/remove-all-visible-in-app-messages.js";
9
9
  import { STORAGE_KEYS as s } from "./managers/storage-manager.js";
10
10
  import f from "./managers/subscription-manager.js";
11
11
  import Ie from "./models/braze-event.js";
@@ -23,14 +23,14 @@ export default class Kt {
23
23
  (this.Ss = h),
24
24
  (this.h = n),
25
25
  (this.C = o),
26
- (this.bc = r),
26
+ (this.kc = r),
27
27
  (this.Gh = l),
28
28
  (this.B = u),
29
29
  (this.tu = t),
30
30
  (this.baseUrl = i),
31
- (this.kc = 0),
32
- (this.dS = o.RS() || 0),
33
- (this.yc = null),
31
+ (this.yc = 0),
32
+ (this.IS = o.dS() || 0),
33
+ (this.jc = null),
34
34
  (this.j = s),
35
35
  (this.eu = e),
36
36
  (this.Ss = h),
@@ -38,17 +38,17 @@ export default class Kt {
38
38
  (this.C = o),
39
39
  (this.Gh = l),
40
40
  (this.B = u),
41
- (this.bc = r),
42
- (this.jc = new f()),
43
- (this.Ac = null),
44
- (this.Dc = 50),
45
- (this.$c = !1),
46
- (this.qc = !1);
41
+ (this.kc = r),
42
+ (this.Ac = new f()),
43
+ (this.Dc = null),
44
+ (this.$c = 50),
45
+ (this.qc = !1),
46
+ (this.Cc = !1);
47
47
  }
48
- Cc(t, i) {
49
- return !t && !i && this.Gh.Ih() >= this.Dc;
48
+ Mc(t, i) {
49
+ return !t && !i && this.Gh.Ih() >= this.$c;
50
50
  }
51
- Mc(t) {
51
+ Tc(t) {
52
52
  let i = this.j.am();
53
53
  if (t.length > 0) {
54
54
  const s = this.Ss.getUserId();
@@ -59,14 +59,14 @@ export default class Kt {
59
59
  }
60
60
  return i;
61
61
  }
62
- Tc(t = !1, i = !0, e, n, o, r = !1, u = !1) {
63
- i && this.Lc();
64
- const c = this.C.TS(),
65
- d = this.C.gS();
62
+ Lc(t = !1, i = !0, e, n, o, r = !1, u = !1) {
63
+ i && this.Fc();
64
+ const c = this.C.hS(),
65
+ d = this.C.RS();
66
66
  let m = !1;
67
67
  const f = (t, r, u = -1) => {
68
68
  const c = new Date().valueOf();
69
- h.nt(this.C, h.it.pn, c),
69
+ h.nt(this.C, h.it.wn, c),
70
70
  -1 !== u && r.push(["X-Braze-Req-Tokens-Remaining", u.toString()]);
71
71
  let d = !1;
72
72
  l.ot({
@@ -76,18 +76,18 @@ export default class Kt {
76
76
  lt: (i) => {
77
77
  null != t.respond_with &&
78
78
  t.respond_with.triggers &&
79
- (this.kc = Math.max(this.kc - 1, 0)),
79
+ (this.yc = Math.max(this.yc - 1, 0)),
80
80
  this.B.ut(t, i, r)
81
81
  ? (this.Gh.ct(),
82
- this.h.sc(i),
82
+ this.h.rc(i),
83
83
  (null != t.respond_with &&
84
84
  t.respond_with.user_id != this.Ss.getUserId()) ||
85
- (null != t.device && this.C.It(s.Tt.Ba, t.device),
85
+ (null != t.device && this.C.It(s.Tt.Ka, t.device),
86
86
  null != t.sdk_metadata &&
87
- (this.C.It(s.Tt.Ka, t.sdk_metadata),
88
- this.C.It(s.Tt.Pa, this.j.kt())),
89
- this.bc(i),
90
- h.Dl(this.C, h.it.pn, 1),
87
+ (this.C.It(s.Tt.Ua, t.sdk_metadata),
88
+ this.C.It(s.Tt.Wa, this.j.kt())),
89
+ this.kc(i),
90
+ h.yl(this.C, h.it.wn, 1),
91
91
  "function" == typeof e && e()))
92
92
  : i.auth_error && (d = !0);
93
93
  },
@@ -95,13 +95,13 @@ export default class Kt {
95
95
  (d = !0),
96
96
  null != t.respond_with &&
97
97
  t.respond_with.triggers &&
98
- (this.kc = Math.max(this.kc - 1, 0)),
99
- this.B.Ua(t.events, t.attributes),
98
+ (this.yc = Math.max(this.yc - 1, 0)),
99
+ this.B.Ya(t.events, t.attributes),
100
100
  "function" == typeof n && n();
101
101
  },
102
102
  ft: (t, s) => {
103
103
  "function" == typeof o && o(!d);
104
- const e = this.B.Bl(s);
104
+ const e = this.B.jl(s);
105
105
  let n = 0;
106
106
  if (e)
107
107
  switch (e.type) {
@@ -113,93 +113,93 @@ export default class Kt {
113
113
  }
114
114
  if (i && !m) {
115
115
  if (d) {
116
- h.zl(this.C, h.it.pn);
116
+ h.Ml(this.C, h.it.wn);
117
117
  const t = this.h.vt(),
118
118
  i = this.h.gt(),
119
119
  s = this.h.bt();
120
- let e = this.yc;
120
+ let e = this.jc;
121
121
  (null == e || e < t) && (e = t);
122
122
  const o = Math.min(s, a(t, e * i)) + n;
123
- this.Fc(o);
124
- } else this.Fc(Math.max(1e3 * this.dS, n));
123
+ this.Ic(o);
124
+ } else this.Ic(Math.max(1e3 * this.IS, n));
125
125
  m = !0;
126
126
  }
127
127
  },
128
128
  });
129
129
  },
130
- g = this.Mc(c),
130
+ g = this.Tc(c),
131
131
  p = t || g;
132
- if (this.Cc(r, g))
132
+ if (this.Mc(r, g))
133
133
  return void E.info(
134
134
  "Declining to flush data due to 50 consecutive authentication failures",
135
135
  );
136
- if (i && !this.B.fl(c, d, p))
137
- return this.Fc(), void ("function" == typeof o && o(!0));
138
- const v = this.B.ml(p, c, d, u);
139
- p && this.kc++;
136
+ if (i && !this.B.vl(c, d, p))
137
+ return this.Ic(), void ("function" == typeof o && o(!0));
138
+ const v = this.B.Rl(p, c, d, u);
139
+ p && this.yc++;
140
140
  let b = !1;
141
141
  if (v)
142
142
  for (const t of v)
143
143
  this.B.et(
144
144
  t.requestData,
145
145
  (i) => f(t.requestData, t.headers, i),
146
- h.it.pn,
146
+ h.it.wn,
147
147
  n,
148
148
  ),
149
149
  (b = !0);
150
150
  this.Gh.Fh() && i && !b
151
- ? this.Fc()
151
+ ? this.Ic()
152
152
  : g &&
153
153
  (E.info("Invoking new session subscriptions"),
154
- this.jc.A(),
155
- (this.qc = !0));
154
+ this.Ac.A(),
155
+ (this.Cc = !0));
156
156
  }
157
- Ic() {
158
- return this.kc > 0;
157
+ Pc() {
158
+ return this.yc > 0;
159
159
  }
160
- Fc(t = 1e3 * this.dS) {
161
- this.$c ||
162
- (this.Lc(),
163
- (this.Ac = window.setTimeout(() => {
160
+ Ic(t = 1e3 * this.IS) {
161
+ this.qc ||
162
+ (this.Fc(),
163
+ (this.Dc = window.setTimeout(() => {
164
164
  if (document.hidden) {
165
165
  const t = "visibilitychange",
166
166
  i = () => {
167
167
  document.hidden ||
168
- (document.removeEventListener(t, i, !1), this.Tc());
168
+ (document.removeEventListener(t, i, !1), this.Lc());
169
169
  };
170
170
  document.addEventListener(t, i, !1);
171
- } else this.Tc();
171
+ } else this.Lc();
172
172
  }, t)),
173
- (this.yc = t));
173
+ (this.jc = t));
174
174
  }
175
- Lc() {
176
- null != this.Ac && (clearTimeout(this.Ac), (this.Ac = null));
175
+ Fc() {
176
+ null != this.Dc && (clearTimeout(this.Dc), (this.Dc = null));
177
177
  }
178
178
  initialize() {
179
- (this.$c = !1), this.Fc();
179
+ (this.qc = !1), this.Ic();
180
180
  }
181
181
  destroy() {
182
- this.jc.removeAllSubscriptions(),
182
+ this.Ac.removeAllSubscriptions(),
183
183
  this.Gh.xh(),
184
- this.Lc(),
185
- (this.$c = !0),
186
- this.Tc(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
- (this.Ac = null),
188
- (this.qc = !1);
184
+ this.Fc(),
185
+ (this.qc = !0),
186
+ this.Lc(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
+ (this.Dc = null),
188
+ (this.Cc = !1);
189
189
  }
190
190
  rn(t) {
191
- return this.qc ? (t(), null) : this.jc.Kt(t);
191
+ return this.Cc ? (t(), null) : this.Ac.Kt(t);
192
192
  }
193
193
  openSession() {
194
194
  const t = this.j.kt() !== this.j.el();
195
- t && (this.C.uS(s.Ou.Wh), this.C.uS(s.Ou.Cu)),
196
- this.Tc(!1, void 0, () => {
195
+ t && (this.C.cS(s.Ou.Wh), this.C.cS(s.Ou.Cu)),
196
+ this.Lc(!1, void 0, () => {
197
197
  t && (this.C.Qt(s.Tt.jo), this.C.Qt(s.Tt.Wt));
198
198
  }),
199
- this.Ea(),
199
+ this.Sa(),
200
200
  t &&
201
201
  import("./Push/push-manager-factory.js").then((t) => {
202
- if (this.$c) return;
202
+ if (this.qc) return;
203
203
  const i = t.default.ra();
204
204
  if (
205
205
  null != i &&
@@ -224,30 +224,30 @@ export default class Kt {
224
224
  }
225
225
  });
226
226
  }
227
- Pc() {
228
- this.C.Qt(s.Tt.Fo), this.C.Qt(s.Tt.Ci), this.C.Qt(s.Tt.pa);
227
+ Nc() {
228
+ this.C.Qt(s.Tt.Fo), this.C.Qt(s.Tt.Ci), this.C.Qt(s.Tt.fa);
229
229
  }
230
- xc() {
231
- this.C.Qt(s.Tt.Cl),
232
- this.C.Qt(s.Tt.iS),
233
- this.C.Qt(s.Tt.Ml),
234
- this.C.Qt(s.Tt.Ll);
230
+ Oc() {
231
+ this.C.Qt(s.Tt.Sl),
232
+ this.C.Qt(s.Tt.ES),
233
+ this.C.Qt(s.Tt.$l),
234
+ this.C.Qt(s.Tt.Fl);
235
235
  }
236
236
  changeUser(t, i, e) {
237
237
  const h = this.Ss.getUserId();
238
238
  if (h !== t) {
239
239
  this.j.Sm(),
240
- this.Pc(),
241
- fi(),
242
- null != h && this.Tc(void 0, !1, void 0, void 0, void 0),
240
+ this.Nc(),
241
+ gi(),
242
+ null != h && this.Lc(void 0, !1, void 0, void 0, void 0),
243
243
  this.Ss.Ju(t),
244
244
  e ? this.Gh.setSdkAuthenticationSignature(e) : this.Gh.jh();
245
245
  for (let t = 0; t < i.length; t++) i[t].changeUser(null == h);
246
246
  this.B.fo(),
247
- null != h && this.C.Qt(s.Tt.tS),
248
- this.C.Qt(s.Tt.Ba),
249
- this.C.Qt(s.Tt.SS),
250
- this.xc(),
247
+ null != h && this.C.Qt(s.Tt.eS),
248
+ this.C.Qt(s.Tt.Ka),
249
+ this.C.Qt(s.Tt.lS),
250
+ this.Oc(),
251
251
  this.openSession(),
252
252
  E.info('Changed user to "' + t + '".');
253
253
  } else {
@@ -260,8 +260,8 @@ export default class Kt {
260
260
  }
261
261
  }
262
262
  requestImmediateDataFlush(t) {
263
- this.Lc(), this.j.el();
264
- this.Tc(
263
+ this.Fc(), this.j.el();
264
+ this.Lc(
265
265
  void 0,
266
266
  void 0,
267
267
  void 0,
@@ -272,17 +272,17 @@ export default class Kt {
272
272
  !0,
273
273
  );
274
274
  }
275
- Sr(t, i) {
275
+ Ar(t, i) {
276
276
  this.j.el(),
277
277
  E.info("Requesting explicit trigger refresh."),
278
- this.Tc(!0, void 0, t, i);
278
+ this.Lc(!0, void 0, t, i);
279
279
  }
280
280
  Gu(t, i) {
281
- const e = p.Nc,
281
+ const e = p.Uc,
282
282
  h = { a: t, l: i },
283
283
  n = v.wt(e, h);
284
284
  return (
285
- n && (E.info(`Logged alias ${t} with label ${i}`), this.C.It(s.Tt.SS, h)),
285
+ n && (E.info(`Logged alias ${t} with label ${i}`), this.C.It(s.Tt.lS, h)),
286
286
  n
287
287
  );
288
288
  }
@@ -304,35 +304,35 @@ export default class Kt {
304
304
  null != e && (o.altitude = e),
305
305
  null != h && (o.ll_accuracy = h),
306
306
  null != n && (o.alt_accuracy = n);
307
- const r = v.wt(p.Oc, o, t || void 0);
307
+ const r = v.wt(p.Bc, o, t || void 0);
308
308
  return (
309
309
  r &&
310
310
  E.info(`Set user last known location as ${JSON.stringify(o, null, 2)}`),
311
311
  r
312
312
  );
313
313
  }
314
- yr(t, i) {
314
+ Fr(t, i) {
315
315
  const s = this.j.el();
316
- return new Ie(this.Ss.getUserId(), p.Uc, t, s, { cid: i });
316
+ return new Ie(this.Ss.getUserId(), p.Jc, t, s, { cid: i });
317
317
  }
318
- Bc(t, i) {
318
+ Kc(t, i) {
319
319
  return new et(t, i);
320
320
  }
321
- Ea() {
321
+ Sa() {
322
322
  const t = et.Ps.$s;
323
- this.Bc(t, E).setItem(t.Os.pn, 1, {
323
+ this.Kc(t, E).setItem(t.Os.wn, 1, {
324
324
  baseUrl: this.baseUrl,
325
325
  data: { api_key: this.tu, device_id: this.eu.ve().id },
326
326
  userId: this.Ss.getUserId(),
327
327
  sdkAuthEnabled: this.Gh.Fh(),
328
328
  });
329
329
  }
330
- Ar(t) {
330
+ Dr(t) {
331
331
  for (const i of t)
332
- if (i.api_key === this.tu) this.B.Ua(i.events, i.attributes);
332
+ if (i.api_key === this.tu) this.B.Ya(i.events, i.attributes);
333
333
  else {
334
334
  const t = et.Ps.$s;
335
- new et(t, E).setItem(t.Os.qr, V.de(), i);
335
+ new et(t, E).setItem(t.Os.Br, V.de(), i);
336
336
  }
337
337
  }
338
338
  Na(t, i, s) {
@@ -343,13 +343,13 @@ export default class Kt {
343
343
  let e, h;
344
344
  return (
345
345
  null === i && null === s
346
- ? ((e = p.Jc), (h = { key: t }))
347
- : ((e = p.Kc), (h = { key: t, latitude: i, longitude: s })),
346
+ ? ((e = p.Wc), (h = { key: t }))
347
+ : ((e = p.Gc), (h = { key: t, latitude: i, longitude: s })),
348
348
  v.wt(e, h)
349
349
  );
350
350
  }
351
- va(t, i) {
351
+ Ia(t, i) {
352
352
  const s = { group_id: t, status: i };
353
- return v.wt(p.Wc, s);
353
+ return v.wt(p.Xc, s);
354
354
  }
355
355
  }
@@ -1,14 +1,14 @@
1
1
  export default class es {
2
2
  constructor(t) {
3
- (this.Gc = t), (this.Gc = t);
3
+ (this.Hc = t), (this.Hc = t);
4
4
  }
5
- Hc(t) {
6
- return null == this.Gc || this.Gc === t[0];
5
+ Qc(t) {
6
+ return null == this.Hc || this.Hc === t[0];
7
7
  }
8
8
  static fromJson(t) {
9
9
  return new es(t ? t.event_name : null);
10
10
  }
11
11
  qt() {
12
- return this.Gc;
12
+ return this.Hc;
13
13
  }
14
14
  }
@@ -1,13 +1,13 @@
1
1
  import ls from "./filter-set.js";
2
2
  export default class ns {
3
3
  constructor(t, s) {
4
- (this.Gc = t), (this.tf = s), (this.Gc = t), (this.tf = s);
4
+ (this.Hc = t), (this.tf = s), (this.Hc = t), (this.tf = s);
5
5
  }
6
- Hc(t) {
7
- if (null == this.Gc || null == this.tf) return !1;
6
+ Qc(t) {
7
+ if (null == this.Hc || null == this.tf) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.Gc && this.tf.Hc(i);
10
+ return s === this.Hc && this.tf.Qc(i);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new ns(
@@ -16,6 +16,6 @@ export default class ns {
16
16
  );
17
17
  }
18
18
  qt() {
19
- return { e: this.Gc, pf: this.tf ? this.tf.qt() : null };
19
+ return { e: this.Hc, pf: this.tf ? this.tf.qt() : null };
20
20
  }
21
21
  }
@@ -4,13 +4,13 @@ export default class ls {
4
4
  constructor(t) {
5
5
  (this.filters = t), (this.filters = t);
6
6
  }
7
- Hc(t) {
7
+ Qc(t) {
8
8
  let r = !0;
9
9
  for (let e = 0; e < this.filters.length; e++) {
10
10
  const o = this.filters[e];
11
11
  let s = !1;
12
12
  for (let r = 0; r < o.length; r++)
13
- if (o[r].Hc(t)) {
13
+ if (o[r].Qc(t)) {
14
14
  s = !0;
15
15
  break;
16
16
  }
@@ -22,7 +22,7 @@ export default class hr {
22
22
  this.comparator !== hr.hT.oT &&
23
23
  (this.eT = Y(this.eT));
24
24
  }
25
- Hc(t) {
25
+ Qc(t) {
26
26
  let s = null;
27
27
  switch ((null != t && (s = t[this.tT]), this.comparator)) {
28
28
  case hr.hT.ET:
@@ -1,11 +1,11 @@
1
- import gi from "./trigger-condition.js";
2
- export default class pi {
1
+ import pi from "./trigger-condition.js";
2
+ export default class bi {
3
3
  constructor(t, i) {
4
4
  (this.if = t), (this.rf = i), (this.if = t), (this.rf = i);
5
5
  }
6
- Hc(t) {
6
+ Qc(t) {
7
7
  if (null == this.if) return !1;
8
- const i = gi.sf(t[0], this.if);
8
+ const i = pi.sf(t[0], this.if);
9
9
  if (!i) return !1;
10
10
  let r = null == this.rf || 0 === this.rf.length;
11
11
  if (null != this.rf)
@@ -17,7 +17,7 @@ export default class pi {
17
17
  return i && r;
18
18
  }
19
19
  static fromJson(t) {
20
- return new pi(t ? t.id : null, t ? t.buttons : null);
20
+ return new bi(t ? t.id : null, t ? t.buttons : null);
21
21
  }
22
22
  qt() {
23
23
  return this.if;
@@ -2,7 +2,7 @@ export default class os {
2
2
  constructor(t) {
3
3
  (this.productId = t), (this.productId = t);
4
4
  }
5
- Hc(t) {
5
+ Qc(t) {
6
6
  return null == this.productId || t[0] === this.productId;
7
7
  }
8
8
  static fromJson(t) {
@@ -3,11 +3,11 @@ export default class fs {
3
3
  constructor(t, s) {
4
4
  (this.productId = t), (this.tf = s), (this.productId = t), (this.tf = s);
5
5
  }
6
- Hc(t) {
6
+ Qc(t) {
7
7
  if (null == this.productId || null == this.tf) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.productId && this.tf.Hc(i);
10
+ return s === this.productId && this.tf.Qc(i);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new fs(
@@ -1,13 +1,13 @@
1
- import gi from "./trigger-condition.js";
2
- export default class dr {
1
+ import pi from "./trigger-condition.js";
2
+ export default class jr {
3
3
  constructor(t) {
4
4
  (this.if = t), (this.if = t);
5
5
  }
6
- Hc(t) {
7
- return null == this.if || gi.sf(t[0], this.if);
6
+ Qc(t) {
7
+ return null == this.if || pi.sf(t[0], this.if);
8
8
  }
9
9
  static fromJson(t) {
10
- return new dr(t ? t.campaign_id : null);
10
+ return new jr(t ? t.campaign_id : null);
11
11
  }
12
12
  qt() {
13
13
  return this.if;