@braze/web-sdk 6.10.2 → 6.11.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 (71) hide show
  1. package/index.d.ts +28 -4
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +3 -3
  4. package/shared-lib/event-types.js +10 -10
  5. package/shared-lib/indexed-db-adapter.js +51 -51
  6. package/shared-lib/logger.js +7 -7
  7. package/shared-lib/supported-options.js +9 -9
  8. package/src/Core/logout.js +2 -2
  9. package/src/InAppMessage/constants.js +39 -47
  10. package/src/InAppMessage/display/html-message-to-html.js +1 -1
  11. package/src/InAppMessage/display/in-app-message-to-html.js +38 -36
  12. package/src/InAppMessage/in-app-message-factory.js +4 -4
  13. package/src/InAppMessage/in-app-message-manager.js +89 -68
  14. package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
  15. package/src/InAppMessage/log-in-app-message-click.js +1 -1
  16. package/src/InAppMessage/log-in-app-message-html-click.js +2 -2
  17. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  18. package/src/InAppMessage/models/full-screen-message.js +22 -22
  19. package/src/InAppMessage/models/html-message.js +13 -13
  20. package/src/InAppMessage/models/in-app-message-button.js +2 -2
  21. package/src/InAppMessage/models/in-app-message.js +68 -66
  22. package/src/InAppMessage/models/modal-message.js +20 -20
  23. package/src/InAppMessage/models/slide-up-message.js +25 -25
  24. package/src/InAppMessage/models/templated-in-app-message.js +6 -6
  25. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  26. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  27. package/src/InAppMessage/ui/show-in-app-message.js +27 -25
  28. package/src/Push/index.js +1 -0
  29. package/src/Push/push-manager-factory.js +4 -4
  30. package/src/Push/push-manager.js +222 -179
  31. package/src/Push/register-push.js +9 -0
  32. package/src/Push/unregister-push-token-on-server.js +4 -4
  33. package/src/Push/utils/push-utils.js +8 -8
  34. package/src/User/user-manager.js +19 -19
  35. package/src/User/user.js +35 -35
  36. package/src/common/constants.js +1 -1
  37. package/src/common/content-cards-display.js +5 -5
  38. package/src/l10n/l10n-manager-factory.js +1 -1
  39. package/src/l10n/l10n-manager.js +1 -1
  40. package/src/managers/braze-instance.js +42 -38
  41. package/src/managers/device-manager.js +20 -20
  42. package/src/managers/network-manager.js +122 -122
  43. package/src/managers/server-config-manager.js +76 -76
  44. package/src/managers/session-manager.js +8 -8
  45. package/src/managers/storage-manager.js +127 -127
  46. package/src/managers/utils.js +1 -1
  47. package/src/models/backend-errors.js +5 -5
  48. package/src/models/braze-event.js +2 -2
  49. package/src/models/device.js +3 -3
  50. package/src/models/identifier.js +6 -6
  51. package/src/models/push-token.js +6 -6
  52. package/src/models/server-config.js +24 -24
  53. package/src/request-controller.js +85 -85
  54. package/src/triggers/models/trigger-condition.js +27 -27
  55. package/src/triggers/models/trigger.js +2 -2
  56. package/src/triggers/triggers-provider-factory.js +1 -1
  57. package/src/triggers/triggers-provider.js +37 -29
  58. package/src/types.js +2 -2
  59. package/src/ui/js/attach-css.js +1 -1
  60. package/src/util/base-device-parser.js +1 -1
  61. package/src/util/braze-actions.js +4 -4
  62. package/src/util/browser-detector.js +5 -5
  63. package/src/util/client-hints-parser.js +1 -1
  64. package/src/util/dom-utils.js +2 -2
  65. package/src/util/ecommerce-event-validation.js +1 -1
  66. package/src/util/key-codes.js +1 -1
  67. package/src/util/net.js +3 -3
  68. package/src/util/request-header-utils.js +15 -15
  69. package/src/util/user-agent-parser.js +4 -4
  70. package/src/util/validation-utils.js +5 -5
  71. package/src/util/window-utils.js +2 -2
@@ -5,7 +5,7 @@ import {
5
5
  convertSecondsToMs as Xe,
6
6
  } from "../util/date-utils.js";
7
7
  import v from "../common/event-logger.js";
8
- import { isArray as g, isEqual as oi } from "../util/code-utils.js";
8
+ import { isArray as g, isEqual as hi } from "../util/code-utils.js";
9
9
  import { logger as b, EventTypes as p } from "../../shared-lib/index.js";
10
10
  import { STORAGE_KEYS as s } from "./storage-manager.js";
11
11
  import h from "../util/request-header-utils.js";
@@ -14,53 +14,53 @@ import {
14
14
  MAX_RETRY_COUNT_PER_REQUEST as Pe,
15
15
  } from "../common/constants.js";
16
16
  import { getAlias as He } from "./utils.js";
17
- import { readResponseHeaders as Oe } from "../util/net.js";
17
+ import { readResponseHeaders as Ge } from "../util/net.js";
18
18
  export default class Vt {
19
19
  constructor(t, e, i, s, r, n, o, a, h, u, l, c) {
20
- (this.eu = t),
20
+ (this.tu = t),
21
21
  (this.j = e),
22
22
  (this.Gh = i),
23
23
  (this.Ss = s),
24
24
  (this.C = r),
25
25
  (this.h = n),
26
- (this.tu = o),
26
+ (this.eu = o),
27
27
  (this.Yh = a),
28
28
  (this.Vh = h),
29
29
  (this.Kh = u),
30
30
  (this.appVersion = l),
31
- (this.Ra = c),
32
- (this.Xa = (t) => (null == t ? "" : `${t} `)),
33
- (this.eu = t),
31
+ (this.Xa = c),
32
+ (this.$a = (t) => (null == t ? "" : `${t} `)),
33
+ (this.tu = t),
34
34
  (this.j = e),
35
35
  (this.Gh = i),
36
36
  (this.Ss = s),
37
37
  (this.C = r),
38
38
  (this.h = n),
39
- (this.tu = o),
39
+ (this.eu = o),
40
40
  (this.Yh = a),
41
41
  (this.Vh = h),
42
42
  (this.Kh = u),
43
43
  (this.appVersion = l),
44
- (this.Ra = c),
45
- (this.$a = ["npm"]),
46
- (this.La = {});
44
+ (this.Xa = c),
45
+ (this.Wa = ["npm"]),
46
+ (this.Ya = {});
47
47
  }
48
48
  Z(t, e = !1, i = !1) {
49
- const r = this.eu.ve(!i),
50
- n = r.ta(),
51
- o = this.j.St(s.It.Ha);
52
- oi(o, n) || (t.device = n),
53
- (t.api_key = this.tu),
49
+ const r = this.tu.ve(!i),
50
+ n = r.oa(),
51
+ o = this.j.St(s.It.La);
52
+ hi(o, n) || (t.device = n),
53
+ (t.api_key = this.eu),
54
54
  (t.time = X(new Date().valueOf(), !0));
55
- const a = this.j.St(s.It.Pa) || [],
56
- h = this.j.St(s.It.Ua) || "";
57
- this.$a.length > 0 &&
58
- (!oi(a, this.$a) || h !== this.C.$t()) &&
59
- (t.sdk_metadata = this.$a),
55
+ const a = this.j.St(s.It.Qa) || [],
56
+ h = this.j.St(s.It.Va) || "";
57
+ this.Wa.length > 0 &&
58
+ (!hi(a, this.Wa) || h !== this.C.$t()) &&
59
+ (t.sdk_metadata = this.Wa),
60
60
  (t.sdk_version = this.Vh),
61
61
  this.Kh && (t.sdk_flavor = this.Kh),
62
62
  (t.app_version = this.appVersion),
63
- (t.app_version_code = this.Ra),
63
+ (t.app_version_code = this.Xa),
64
64
  (t.device_id = r.id);
65
65
  const u = this.Ss.getUserId();
66
66
  if ((e && null !== u && (t.user_id = u), !u && !this.Gh.Fh())) {
@@ -91,7 +91,7 @@ export default class Vt {
91
91
  (e +=
92
92
  ' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),
93
93
  b.error(`SDK Authentication failed ${e}`),
94
- this.Wa(t.events || [], t.attributes || []),
94
+ this.Za(t.events || [], t.attributes || []),
95
95
  this.Gh.Ch(r),
96
96
  !1
97
97
  );
@@ -100,28 +100,28 @@ export default class Vt {
100
100
  let i,
101
101
  s = r;
102
102
  switch (s) {
103
- case Ne.Ya:
103
+ case Ne.dl:
104
104
  return (
105
105
  (i = "Received successful response with empty body."),
106
- v.Dt(p.Qa, { e: i }),
106
+ v.Dt(p.fl, { e: i }),
107
107
  b.info(i),
108
108
  !1
109
109
  );
110
- case Ne.Va:
110
+ case Ne.ml:
111
111
  return (
112
112
  (i = "Received successful response with invalid JSON"),
113
- v.Dt(p.Qa, { e: i + ": " + e.response }),
113
+ v.Dt(p.fl, { e: i + ": " + e.response }),
114
114
  b.info(i),
115
115
  !1
116
116
  );
117
- case Ne.Za:
117
+ case Ne.vl:
118
118
  s = `The API key "${t.api_key}" is invalid for the baseUrl ${this.Yh}`;
119
119
  break;
120
- case Ne.dl:
120
+ case Ne.Rl:
121
121
  s =
122
122
  "Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";
123
123
  break;
124
- case Ne.fl:
124
+ case Ne.gl:
125
125
  s =
126
126
  "No device identifier. Please contact Braze Technical Support for assistance.";
127
127
  }
@@ -129,51 +129,51 @@ export default class Vt {
129
129
  }
130
130
  return !1;
131
131
  }
132
- ml(t, e, i) {
132
+ bl(t, e, i) {
133
133
  return !!((t && 0 !== t.length) || (e && 0 !== e.length) || i);
134
134
  }
135
- vl(t, e, i, s = !1) {
136
- const r = [],
137
- n = (t) => t || "",
138
- o = n(this.Ss.getUserId());
139
- let a = this.Zo(t);
140
- const u = [],
141
- l = [];
142
- let c,
143
- d = null;
135
+ ql(t, e, i, s = !1, r = "sdk") {
136
+ const n = [],
137
+ o = (t) => t || "",
138
+ a = o(this.Ss.getUserId());
139
+ let u = this.ia(t);
140
+ const l = [],
141
+ c = [];
142
+ let d,
143
+ f = null;
144
144
  if (e.length > 0) {
145
145
  const t = [];
146
146
  for (const i of e) {
147
- if (((c = i.ta()), this.Gh.Fh())) {
148
- if (o && !c.user_id) {
149
- d || (d = {}), d.events || (d.events = []), d.events.push(c);
147
+ if (((d = i.oa()), this.Gh.Fh())) {
148
+ if (a && !d.user_id) {
149
+ f || (f = {}), f.events || (f.events = []), f.events.push(d);
150
150
  continue;
151
151
  }
152
- if (n(c.user_id) !== o) {
153
- l.push(c);
152
+ if (o(d.user_id) !== a) {
153
+ c.push(d);
154
154
  continue;
155
155
  }
156
156
  }
157
- t.push(c);
157
+ t.push(d);
158
158
  }
159
- t.length > 0 && (a.events = t);
159
+ t.length > 0 && (u.events = t);
160
160
  }
161
161
  if (i.length > 0) {
162
162
  const t = [];
163
163
  for (const e of i)
164
- e && (this.Gh.Fh() && n(e.user_id) !== o ? u.push(e) : t.push(e));
165
- t.length > 0 && (a.attributes = t);
164
+ e && (this.Gh.Fh() && o(e.user_id) !== a ? l.push(e) : t.push(e));
165
+ t.length > 0 && (u.attributes = t);
166
166
  }
167
- if ((this.Wa(l, u), (a = this.Z(a, !1, s)), d)) {
168
- d = this.Z(d, !1, s);
169
- const t = { requestData: d, headers: this.tt(d, h.it.pn) };
170
- r.push(t);
167
+ if ((this.Za(c, l), (u = this.Z(u, !1, s)), f)) {
168
+ f = this.Z(f, !1, s);
169
+ const t = { requestData: f, headers: this.tt(f, h.it.pn, r) };
170
+ n.push(t);
171
171
  }
172
- if (a && !this.ml(a.events, a.attributes, t)) return d ? r : null;
173
- const f = { requestData: a, headers: this.tt(a, h.it.pn) };
174
- return r.push(f), r;
172
+ if (u && !this.bl(u.events, u.attributes, t)) return f ? n : null;
173
+ const m = { requestData: u, headers: this.tt(u, h.it.pn, r) };
174
+ return n.push(m), n;
175
175
  }
176
- Wa(t, e) {
176
+ Za(t, e) {
177
177
  if (t) {
178
178
  const e = [];
179
179
  for (const i of t) {
@@ -182,16 +182,16 @@ export default class Vt {
182
182
  }
183
183
  this.j.ol(e);
184
184
  }
185
- if (e) for (const t of e) this.j.Rl(t);
185
+ if (e) for (const t of e) this.j.Al(t);
186
186
  }
187
187
  dt(t, e) {
188
188
  let i = "HTTP error ";
189
189
  null != t && (i += t + " "), (i += e), b.error(i);
190
190
  }
191
- gl(t) {
192
- return v.Dt(p.bl, { n: t });
191
+ Dl(t) {
192
+ return v.Dt(p.kl, { n: t });
193
193
  }
194
- Zo(t, e) {
194
+ ia(t, e) {
195
195
  const i = {};
196
196
  t && (i.triggers = !0);
197
197
  const s = null != e ? e : this.Ss.getUserId();
@@ -201,20 +201,20 @@ export default class Vt {
201
201
  }
202
202
  return (i.config = { config_time: this.h.Qt() }), { respond_with: i };
203
203
  }
204
- ql(t) {
204
+ Tl(t) {
205
205
  const e = new Date().valueOf();
206
206
  let i = Ke.toString();
207
- const s = h.Al(this.j, t);
207
+ const s = h.yl(this.j, t);
208
208
  if (-1 !== s) {
209
209
  i = (e - s).toString();
210
210
  }
211
211
  return i;
212
212
  }
213
213
  tt(t, e, i = "sdk") {
214
- const s = [["X-Braze-Api-Key", this.tu]],
215
- r = this.ql(e);
214
+ const s = [["X-Braze-Api-Key", this.eu]],
215
+ r = this.Tl(e);
216
216
  s.push(["X-Braze-Last-Req-Ms-Ago", r]);
217
- const n = h.Dl(this.j, e).toString();
217
+ const n = h.wl(this.j, e).toString();
218
218
  s.push(["X-Braze-Req-Attempt", n]);
219
219
  let o = !1;
220
220
  if (
@@ -224,8 +224,8 @@ export default class Vt {
224
224
  e === h.it.Mi)
225
225
  ) {
226
226
  s.push(["X-Braze-ContentCardsRequest", "true"]);
227
- let t = h.Dl(this.j, h.it.Mi);
228
- (t && "client" !== i) || ((t = 1), h.Tl(this.j, h.it.Mi, t));
227
+ let t = h.wl(this.j, h.it.Mi);
228
+ (t && "client" !== i) || ((t = 1), h.Nl(this.j, h.it.Mi, t));
229
229
  const e = Math.max(0, t - 1);
230
230
  s.push(["BRAZE-SYNC-RETRY-COUNT", e.toString()]), (o = !0);
231
231
  }
@@ -241,49 +241,49 @@ export default class Vt {
241
241
  }
242
242
  return s;
243
243
  }
244
- kl(t, e, i, s) {
245
- if (this.La[s]) return;
244
+ Bl(t, e, i, s) {
245
+ if (this.Ya[s]) return;
246
246
  const r = window.setTimeout(() => {
247
- b.info(`Retrying rate limited ${this.Xa(s)}SDK request.`),
247
+ b.info(`Retrying rate limited ${this.$a(s)}SDK request.`),
248
248
  this.et(e, i, s);
249
249
  }, t);
250
- this.La[s] = r;
250
+ this.Ya[s] = r;
251
251
  }
252
252
  fo() {
253
- for (const t in this.La) {
254
- const e = this.La[t];
253
+ for (const t in this.Ya) {
254
+ const e = this.Ya[t];
255
255
  window.clearTimeout(e);
256
256
  }
257
- this.La = {};
257
+ this.Ya = {};
258
258
  }
259
259
  et(t, e, i, r) {
260
- if (!this.yl(i))
260
+ if (!this.Sl(i))
261
261
  return (
262
- b.info(`${this.Xa(i)}SDK request being rate limited.`),
262
+ b.info(`${this.$a(i)}SDK request being rate limited.`),
263
263
  void ("function" == typeof r && r())
264
264
  );
265
- const n = this.wl();
266
- if (!n.Nl)
265
+ const n = this.Cl();
266
+ if (!n.zl)
267
267
  return (
268
- this.kl(n.Bl, t, e, i),
268
+ this.Bl(n.jl, t, e, i),
269
269
  void b.info(
270
- `${this.Xa(
270
+ `${this.$a(
271
271
  i,
272
272
  )}SDK request being rate limited. Request will be retried in ${Math.trunc(
273
- n.Bl / 1e3,
273
+ n.jl / 1e3,
274
274
  )} seconds.`,
275
275
  )
276
276
  );
277
- this.j.Pt(s.It.Sl, new Date().valueOf());
277
+ this.j.Pt(s.It.Ml, new Date().valueOf());
278
278
  const o = t.device;
279
279
  o && o.os_version instanceof Promise
280
280
  ? o.os_version.then((i) => {
281
- (t.device.os_version = i), e(n.Cl);
281
+ (t.device.os_version = i), e(n.Xl);
282
282
  })
283
- : e(n.Cl);
283
+ : e(n.Xl);
284
284
  }
285
- zl(t) {
286
- const e = t ? Oe(t) : null;
285
+ $l(t) {
286
+ const e = t ? Ge(t) : null;
287
287
  if (!e || !e["retry-after"]) return null;
288
288
  const i = e["retry-after"];
289
289
  if (isNaN(i) && !isNaN(Date.parse(i)))
@@ -293,21 +293,21 @@ export default class Vt {
293
293
  {
294
294
  const t =
295
295
  "Received unexpected value for retry-after header in /sync response";
296
- v.Dt(p.Qa, { e: t + ": " + i });
296
+ v.Dt(p.fl, { e: t + ": " + i });
297
297
  }
298
298
  return null;
299
299
  }
300
300
  yt(t, e, i, s, r, n) {
301
- if (h.Dl(this.j, i) >= Pe) return;
301
+ if (h.wl(this.j, i) >= Pe) return;
302
302
  let o;
303
303
  n = n || 0;
304
- const a = this.zl(t);
304
+ const a = this.$l(t);
305
305
  r();
306
306
  const u = (t) => {
307
307
  const r = window.setTimeout(() => {
308
308
  e();
309
309
  }, t);
310
- s(r), h.jl(this.j, i);
310
+ s(r), h.Ll(this.j, i);
311
311
  };
312
312
  if (a && !isNaN(a.value)) {
313
313
  switch (a.type) {
@@ -320,44 +320,44 @@ export default class Vt {
320
320
  u(o);
321
321
  } else n ? u(n) : h.Ji(this.j, i);
322
322
  }
323
- Ml(t) {
323
+ El(t) {
324
324
  var e;
325
- null === (e = this.j) || void 0 === e || e.Pt(s.It.Xl, t);
325
+ null === (e = this.j) || void 0 === e || e.Pt(s.It.Fl, t);
326
326
  }
327
- $l(t, e) {
328
- let i = this.Ll();
329
- null == i && (i = {}), (i[t] = e), this.j.Pt(s.It.El, i);
327
+ Il(t, e) {
328
+ let i = this.Kl();
329
+ null == i && (i = {}), (i[t] = e), this.j.Pt(s.It.Pl, i);
330
330
  }
331
- Fl() {
331
+ Ul() {
332
332
  var t;
333
- return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.Xl);
333
+ return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.Fl);
334
334
  }
335
- Ll() {
335
+ Kl() {
336
336
  var t;
337
- return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.El);
337
+ return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.Pl);
338
338
  }
339
- Il(t, e, i, s, r = "") {
339
+ xl(t, e, i, s, r = "") {
340
340
  let n;
341
341
  if (r) {
342
- const t = this.Ll();
342
+ const t = this.Kl();
343
343
  n = null == t || isNaN(t[r]) ? e : t[r];
344
- } else (n = this.Fl()), (null == n || isNaN(n)) && (n = e);
344
+ } else (n = this.Ul()), (null == n || isNaN(n)) && (n = e);
345
345
  const o = (t - s) / 1e3;
346
346
  return (n = Math.min(n + o / i, e)), n;
347
347
  }
348
- Kl(t, e) {
348
+ Hl(t, e) {
349
349
  return Math.max(0, (1 - t) * e * 1e3);
350
350
  }
351
- Pl(t, e = "") {
351
+ Ol(t, e = "") {
352
352
  var i, r, n, o, a;
353
- const u = { Nl: !0, Cl: -1, Bl: 0 };
353
+ const u = { zl: !0, Xl: -1, jl: 0 };
354
354
  if ((null == t && (t = !0), !t && !e)) return u;
355
355
  let l,
356
356
  c,
357
357
  d = null;
358
- if (t) d = null === (i = this.j) || void 0 === i ? void 0 : i.St(s.It.Sl);
358
+ if (t) d = null === (i = this.j) || void 0 === i ? void 0 : i.St(s.It.Ml);
359
359
  else {
360
- const t = h.Ul(this.j);
360
+ const t = h.Gl(this.j);
361
361
  if (null == t || null == t[e]) return u;
362
362
  d = t[e];
363
363
  }
@@ -365,30 +365,30 @@ export default class Vt {
365
365
  if (
366
366
  (t
367
367
  ? ((l =
368
- (null === (r = this.h) || void 0 === r ? void 0 : r.xl()) || -1),
369
- (c = (null === (n = this.h) || void 0 === n ? void 0 : n.Hl()) || -1))
368
+ (null === (r = this.h) || void 0 === r ? void 0 : r._l()) || -1),
369
+ (c = (null === (n = this.h) || void 0 === n ? void 0 : n.Wl()) || -1))
370
370
  : ((l =
371
- (null === (o = this.h) || void 0 === o ? void 0 : o.Ol(e)) || -1),
371
+ (null === (o = this.h) || void 0 === o ? void 0 : o.Yl(e)) || -1),
372
372
  (c =
373
- (null === (a = this.h) || void 0 === a ? void 0 : a.Gl(e)) || -1)),
373
+ (null === (a = this.h) || void 0 === a ? void 0 : a.Jl(e)) || -1)),
374
374
  -1 === l || -1 === c)
375
375
  )
376
376
  return u;
377
377
  const f = new Date().valueOf();
378
- let m = this.Il(f, l, c, d, e);
378
+ let m = this.xl(f, l, c, d, e);
379
379
  return m < 1
380
- ? ((u.Nl = !1), (u.Bl = this.Kl(m, c)), u)
380
+ ? ((u.zl = !1), (u.jl = this.Hl(m, c)), u)
381
381
  : ((m = Math.trunc(m) - 1),
382
- (u.Cl = m),
383
- t ? this.Ml(m) : this.$l(e, m),
382
+ (u.Xl = m),
383
+ t ? this.El(m) : this.Il(e, m),
384
384
  u);
385
385
  }
386
- wl() {
387
- return this.Pl(!0);
386
+ Cl() {
387
+ return this.Ol(!0);
388
388
  }
389
- yl(t) {
390
- const e = this.Pl(!1, t);
391
- return !(e && !e.Nl);
389
+ Sl(t) {
390
+ const e = this.Ol(!1, t);
391
+ return !(e && !e.zl);
392
392
  }
393
393
  ct() {
394
394
  this.Gh.ct();
@@ -397,6 +397,6 @@ export default class Vt {
397
397
  return this.Yh;
398
398
  }
399
399
  addSdkMetadata(t) {
400
- for (const e of t) -1 === this.$a.indexOf(e) && this.$a.push(e);
400
+ for (const e of t) -1 === this.Wa.indexOf(e) && this.Wa.push(e);
401
401
  }
402
402
  }