@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
@@ -16,60 +16,60 @@ export default class Wt {
16
16
  (this.C = s),
17
17
  (this.As = t),
18
18
  (this.B = i),
19
- (this.xl = 1e3),
19
+ (this.jl = 1e3),
20
20
  (null == e || isNaN(e)) && (e = 1800),
21
- e < this.xl / 1e3 &&
21
+ e < this.jl / 1e3 &&
22
22
  (N.info(
23
23
  "Specified session timeout of " +
24
24
  e +
25
25
  "s is too small, using the minimum session timeout of " +
26
- this.xl / 1e3 +
26
+ this.jl / 1e3 +
27
27
  "s instead.",
28
28
  ),
29
- (e = this.xl / 1e3)),
29
+ (e = this.jl / 1e3)),
30
30
  (this.Sl = e);
31
31
  }
32
- Dl(s, t) {
33
- return new ve(this.As.getUserId(), d.Gl, s, t.eu, { d: L(s - t.zl) });
32
+ xl(s, t) {
33
+ return new ve(this.As.getUserId(), d.Dl, s, t.eu, { d: L(s - t.Gl) });
34
34
  }
35
35
  Ss() {
36
- const s = this.C.tu(t.iu.Hl);
36
+ const s = this.C.tu(t.iu.Nl);
37
37
  return null == s ? null : s.eu;
38
38
  }
39
- Wl() {
39
+ zl() {
40
40
  const s = new Date().valueOf(),
41
- i = this.B.Fl();
41
+ i = this.B.Ll();
42
42
  if (null == i) return !1;
43
- const e = this.C.vs(t.gs.kl),
43
+ const e = this.C.vs(t.gs.Hl),
44
44
  n = null == e || s - e > 1e3 * i;
45
- return n && this.C.Bs(t.gs.kl, s), n;
45
+ return n && this.C.Bs(t.gs.Hl, s), n;
46
46
  }
47
- ql(s, t) {
48
- return null == t || null == t.Al || (!(s - t.zl < this.xl) && t.Al < s);
47
+ Wl(s, t) {
48
+ return null == t || null == t.kl || (!(s - t.Gl < this.jl) && t.kl < s);
49
49
  }
50
50
  Eo() {
51
51
  const s = new Date().valueOf(),
52
52
  i = s + 1e3 * this.Sl,
53
- e = this.C.tu(t.iu.Hl);
54
- if (this.ql(s, e)) {
53
+ e = this.C.tu(t.iu.Nl);
54
+ if (this.Wl(s, e)) {
55
55
  let n = "Generating session start event with time " + s;
56
56
  if (null != e) {
57
- let s = e.Il;
58
- s - e.zl < this.xl && (s = e.zl + this.xl),
59
- this.C.Jl(this.Dl(s, e)),
57
+ let s = e.ql;
58
+ s - e.Gl < this.jl && (s = e.Gl + this.jl),
59
+ this.C.Al(this.xl(s, e)),
60
60
  (n += " (old session ended " + s + ")");
61
61
  }
62
62
  (n += ". Will expire " + i.valueOf()), N.info(n);
63
63
  const o = new _t(G.Rt(), i);
64
- this.C.Jl(new ve(this.As.getUserId(), d.Kl, s, o.eu)),
65
- this.C.uu(t.iu.Hl, o);
66
- return null == this.C.vs(t.gs.kl) && this.C.Bs(t.gs.kl, s), o.eu;
64
+ this.C.Al(new ve(this.As.getUserId(), d.Il, s, o.eu)),
65
+ this.C.uu(t.iu.Nl, o);
66
+ return null == this.C.vs(t.gs.Hl) && this.C.Bs(t.gs.Hl, s), o.eu;
67
67
  }
68
- if (null != e) return (e.Il = s), (e.Al = i), this.C.uu(t.iu.Hl, e), e.eu;
68
+ if (null != e) return (e.ql = s), (e.kl = i), this.C.uu(t.iu.Nl, e), e.eu;
69
69
  }
70
- Ml() {
71
- const s = this.C.tu(t.iu.Hl);
70
+ Jl() {
71
+ const s = this.C.tu(t.iu.Nl);
72
72
  null != s &&
73
- (this.C.Ol(t.iu.Hl), this.C.Jl(this.Dl(new Date().valueOf(), s)));
73
+ (this.C.Kl(t.iu.Nl), this.C.Al(this.xl(new Date().valueOf(), s)));
74
74
  }
75
75
  }
@@ -1,14 +1,14 @@
1
1
  import ne, { STORAGE_KEYS as t } from "./storage-manager.js";
2
2
  import { logger as N } from "../../shared-lib/index.js";
3
3
  const Bt = {
4
- Va: function (e, o = !1) {
4
+ Ka: function (e, o = !1) {
5
5
  let r = !1;
6
6
  try {
7
7
  if (localStorage && localStorage.getItem)
8
8
  try {
9
- localStorage.setItem(t.gs.ec, "true"),
10
- localStorage.getItem(t.gs.ec) &&
11
- (localStorage.removeItem(t.gs.ec), (r = !0));
9
+ localStorage.setItem(t.gs.oc, "true"),
10
+ localStorage.getItem(t.gs.oc) &&
11
+ (localStorage.removeItem(t.gs.oc), (r = !0));
12
12
  } catch (e) {
13
13
  if (
14
14
  !(
@@ -24,12 +24,12 @@ const Bt = {
24
24
  } catch (e) {
25
25
  N.info("Local Storage not supported!");
26
26
  }
27
- const a = Bt.oc(),
28
- n = new ne.rc(e, a && !o, r);
27
+ const a = Bt.ac(),
28
+ n = new ne.nc(e, a && !o, r);
29
29
  let c;
30
- return (c = r ? new ne.ac(e) : new ne.nc()), new ne(n, c);
30
+ return (c = r ? new ne.cc(e) : new ne.lc()), new ne(n, c);
31
31
  },
32
- oc: function () {
32
+ ac: function () {
33
33
  return (
34
34
  navigator.cookieEnabled ||
35
35
  ("cookie" in document &&
@@ -1,7 +1,7 @@
1
1
  import ve from "../models/braze-event.js";
2
2
  import _t from "../models/identifier.js";
3
3
  import {
4
- isArray as w,
4
+ isArray as z,
5
5
  keys as y,
6
6
  validateValueIsFromEnum as ta,
7
7
  values as Rt,
@@ -13,30 +13,30 @@ import { getErrorMessage as si } from "../util/error-utils.js";
13
13
  export const STORAGE_KEYS = {
14
14
  iu: {
15
15
  su: "ab.storage.userId",
16
- $h: "ab.storage.deviceId",
17
- Hl: "ab.storage.sessionId",
16
+ Xh: "ab.storage.deviceId",
17
+ Nl: "ab.storage.sessionId",
18
18
  },
19
19
  gs: {
20
- ec: "ab.test",
20
+ oc: "ab.test",
21
21
  tE: "ab.storage.events",
22
22
  eE: "ab.storage.attributes",
23
23
  sE: "ab.storage.attributes.anonymous_user",
24
- $a: "ab.storage.device",
25
- qu: "ab.storage.sdk_metadata",
26
- Au: "ab.storage.session_id_for_cached_metadata",
27
- Bn: "ab.storage.pushToken",
24
+ ec: "ab.storage.device",
25
+ gu: "ab.storage.sdk_metadata",
26
+ bu: "ab.storage.session_id_for_cached_metadata",
27
+ Fn: "ab.storage.pushToken",
28
28
  Hi: "ab.storage.newsFeed",
29
29
  Ji: "ab.storage.lastNewsFeedRefresh",
30
30
  Ct: "ab.storage.cardImpressions",
31
- dl: "ab.storage.serverConfig",
31
+ bl: "ab.storage.serverConfig",
32
32
  rE: "ab.storage.triggers",
33
33
  oE: "ab.storage.triggers.ts",
34
- kl: "ab.storage.messagingSessionStart",
34
+ Hl: "ab.storage.messagingSessionStart",
35
35
  di: "ab.storage.cc",
36
36
  bi: "ab.storage.ccLastFullSync",
37
37
  vi: "ab.storage.ccLastCardUpdated",
38
- Wu: "ab.storage.globalRateLimitCurrentTokenCount",
39
- Qu: "ab.storage.dynamicRateLimitCurrentTokenCount",
38
+ Gu: "ab.storage.globalRateLimitCurrentTokenCount",
39
+ Yu: "ab.storage.dynamicRateLimitCurrentTokenCount",
40
40
  ot: "ab.storage.ccClicks",
41
41
  vt: "ab.storage.ccImpressions",
42
42
  gt: "ab.storage.ccDismissals",
@@ -46,28 +46,28 @@ export const STORAGE_KEYS = {
46
46
  qh: "ab.storage.signature",
47
47
  EE: "ab.storage.brazeSyncRetryCount",
48
48
  yi: "ab.storage.sdkVersion",
49
- xe: "ab.storage.ff",
50
- $e: "ab.storage.ffImpressions",
51
- Je: "ab.storage.ffLastRefreshAt",
52
- Ae: "ab.storage.ff.sessionId",
49
+ $e: "ab.storage.ff",
50
+ Be: "ab.storage.ffImpressions",
51
+ Le: "ab.storage.ffLastRefreshAt",
52
+ He: "ab.storage.ff.sessionId",
53
53
  lE: "ab.storage.lastReqToEndpoint",
54
54
  SE: "ab.storage.requestAttempts",
55
- on: "ab.storage.deferredIam",
56
- xu: "ab.storage.lastSdkReq",
55
+ Zr: "ab.storage.deferredIam",
56
+ Pu: "ab.storage.lastSdkReq",
57
57
  _E: "ab.storage.alias",
58
58
  ps: "ab.storage.banners",
59
59
  ks: "ab.storage.banners.impressions",
60
60
  ys: "ab.storage.banners.sessionId",
61
61
  },
62
- ae: "ab.optOut",
62
+ ie: "ab.optOut",
63
63
  };
64
64
  export default class ne {
65
65
  constructor(t, e) {
66
66
  (this.uE = t), (this.cE = e), (this.uE = t), (this.cE = e);
67
67
  }
68
- Fa(t) {
68
+ Ga(t) {
69
69
  const e = y(STORAGE_KEYS.iu),
70
- s = new ne.ne(t);
70
+ s = new ne.se(t);
71
71
  for (const t of e) s.remove(STORAGE_KEYS.iu[t]);
72
72
  }
73
73
  uu(t, e) {
@@ -76,7 +76,7 @@ export default class ne {
76
76
  }
77
77
  TE(t) {
78
78
  const e = this.tu(t);
79
- null != e && ((e.Il = new Date().valueOf()), this.uu(t, e));
79
+ null != e && ((e.ql = new Date().valueOf()), this.uu(t, e));
80
80
  }
81
81
  tu(t) {
82
82
  const e = this.uE.gr(t),
@@ -90,17 +90,17 @@ export default class ne {
90
90
  return e;
91
91
  })(e);
92
92
  let r;
93
- if (s) (r = _t.Yn(s) || null), r && this.uu(t, r);
93
+ if (s) (r = _t.Bn(s) || null), r && this.uu(t, r);
94
94
  else {
95
95
  const s = _t.hE(e);
96
- (r = _t.Yn(s) || null), s !== e && r && this.uu(t, r);
96
+ (r = _t.Bn(s) || null), s !== e && r && this.uu(t, r);
97
97
  }
98
98
  return r;
99
99
  }
100
- Ol(t) {
100
+ Kl(t) {
101
101
  this.uE.remove(t);
102
102
  }
103
- Ka() {
103
+ $a() {
104
104
  const t = y(STORAGE_KEYS.iu);
105
105
  let e;
106
106
  for (const s of t)
@@ -110,13 +110,13 @@ export default class ne {
110
110
  Go(t) {
111
111
  let e;
112
112
  if (null == t || 0 === t.length) return !1;
113
- e = w(t) ? t : [t];
113
+ e = z(t) ? t : [t];
114
114
  let s = this.cE.gr(STORAGE_KEYS.gs.tE);
115
- (null != s && w(s)) || (s = []);
115
+ (null != s && z(s)) || (s = []);
116
116
  for (let t = 0; t < e.length; t++) s.push(e[t].bs());
117
117
  return this.cE.store(STORAGE_KEYS.gs.tE, s);
118
118
  }
119
- Jl(t) {
119
+ Al(t) {
120
120
  return null != t && this.Go([t]);
121
121
  }
122
122
  AE() {
@@ -125,9 +125,9 @@ export default class ne {
125
125
  const e = [];
126
126
  let s = !1,
127
127
  r = null;
128
- if (w(t))
128
+ if (z(t))
129
129
  for (let s = 0; s < t.length; s++)
130
- ve.RE(t[s]) ? e.push(ve.Yn(t[s])) : (r = s);
130
+ ve.RE(t[s]) ? e.push(ve.Bn(t[s])) : (r = s);
131
131
  else s = !0;
132
132
  if (s || null != r) {
133
133
  let o = "Stored events could not be deserialized as Events";
@@ -140,7 +140,7 @@ export default class ne {
140
140
  typeof t +
141
141
  ": " +
142
142
  JSON.stringify(t)),
143
- e.push(new ve(null, d.Tu, new Date().valueOf(), null, { e: o }));
143
+ e.push(new ve(null, d.Du, new Date().valueOf(), null, { e: o }));
144
144
  }
145
145
  return e;
146
146
  }
@@ -189,15 +189,15 @@ export default class ne {
189
189
  gE(t) {
190
190
  return t || STORAGE_KEYS.gs.sE;
191
191
  }
192
- ju(t) {
192
+ Bu(t) {
193
193
  let e = this.cE.gr(STORAGE_KEYS.gs.eE);
194
194
  null == e && (e = {});
195
- const s = this.gE(t[User.fu]),
195
+ const s = this.gE(t[User.pu]),
196
196
  r = e[s];
197
197
  for (const o in t)
198
- o !== User.fu &&
198
+ o !== User.pu &&
199
199
  (null == e[s] || (r && null == r[o])) &&
200
- this.mu(t[User.fu], o, t[o]);
200
+ this.mu(t[User.pu], o, t[o]);
201
201
  }
202
202
  mu(t, e, s) {
203
203
  let r = this.cE.gr(STORAGE_KEYS.gs.eE);
@@ -205,7 +205,7 @@ export default class ne {
205
205
  const o = this.gE(t);
206
206
  let n = r[o];
207
207
  if (
208
- (null == n && ((n = {}), null != t && (n[User.fu] = t)), e === User.lu)
208
+ (null == n && ((n = {}), null != t && (n[User.pu] = t)), e === User.lu)
209
209
  ) {
210
210
  null == n[e] && (n[e] = {});
211
211
  for (const t in s) n[e][t] = s[t];
@@ -227,29 +227,29 @@ export default class ne {
227
227
  null != r &&
228
228
  ((e[s] = void 0),
229
229
  this.cE.store(STORAGE_KEYS.gs.eE, e),
230
- (r[User.fu] = t),
231
- this.ju(r));
230
+ (r[User.pu] = t),
231
+ this.Bu(r));
232
232
  }
233
- const s = this.tu(STORAGE_KEYS.iu.Hl);
233
+ const s = this.tu(STORAGE_KEYS.iu.Nl);
234
234
  let r = null;
235
235
  null != s && (r = s.eu);
236
236
  const o = this.AE();
237
237
  if (null != o)
238
238
  for (let e = 0; e < o.length; e++) {
239
239
  const s = o[e];
240
- null == s.userId && s.sessionId == r && (s.userId = t), this.Jl(s);
240
+ null == s.userId && s.sessionId == r && (s.userId = t), this.Al(s);
241
241
  }
242
242
  }
243
243
  IE() {
244
244
  return this.cE.dE;
245
245
  }
246
246
  }
247
- (ne.ac = class {
247
+ (ne.cc = class {
248
248
  constructor(t) {
249
- (this.fn = t), (this.fn = t), (this.dE = ro.fE() ? 3 : 10);
249
+ (this.cn = t), (this.cn = t), (this.dE = ro.fE() ? 3 : 10);
250
250
  }
251
251
  bE(t) {
252
- return t + "." + this.fn;
252
+ return t + "." + this.cn;
253
253
  }
254
254
  store(t, e) {
255
255
  const s = { v: e };
@@ -276,7 +276,7 @@ export default class ne {
276
276
  }
277
277
  }
278
278
  }),
279
- (ne.nc = class {
279
+ (ne.lc = class {
280
280
  constructor() {
281
281
  (this.KE = {}), (this.mE = 5242880), (this.dE = 3);
282
282
  }
@@ -318,17 +318,17 @@ export default class ne {
318
318
  this.KE[t] = null;
319
319
  }
320
320
  }),
321
- (ne.ne = class {
321
+ (ne.se = class {
322
322
  constructor(t, e) {
323
- (this.fn = t),
323
+ (this.cn = t),
324
324
  (this.NE = e),
325
- (this.fn = t),
325
+ (this.cn = t),
326
326
  (this.GE = this.DE()),
327
327
  (this.CE = 576e3),
328
328
  (this.NE = !!e);
329
329
  }
330
330
  bE(t) {
331
- return null != this.fn ? t + "." + this.fn : t;
331
+ return null != this.cn ? t + "." + this.cn : t;
332
332
  }
333
333
  DE() {
334
334
  let t = 0,
@@ -345,7 +345,7 @@ export default class ne {
345
345
  e
346
346
  );
347
347
  }
348
- se() {
348
+ ae() {
349
349
  const t = new Date();
350
350
  return t.setTime(t.getTime() + 60 * this.CE * 1e3), t.getFullYear();
351
351
  }
@@ -363,7 +363,7 @@ export default class ne {
363
363
  }
364
364
  if (o) {
365
365
  const t = r.split("=")[0];
366
- -1 === t.indexOf("." + this.fn) && this.pE(t);
366
+ -1 === t.indexOf("." + this.cn) && this.pE(t);
367
367
  }
368
368
  }
369
369
  }
@@ -419,13 +419,13 @@ export default class ne {
419
419
  (document.cookie = s), (document.cookie = s + ";path=/");
420
420
  }
421
421
  }),
422
- (ne.rc = class {
422
+ (ne.nc = class {
423
423
  constructor(t, e, s) {
424
- (this.fn = t),
424
+ (this.cn = t),
425
425
  (this.vE = []),
426
- e && this.vE.push(new ne.ne(t)),
427
- s && this.vE.push(new ne.ac(t)),
428
- this.vE.push(new ne.nc());
426
+ e && this.vE.push(new ne.se(t)),
427
+ s && this.vE.push(new ne.cc(t)),
428
+ this.vE.push(new ne.lc());
429
429
  }
430
430
  store(t, e) {
431
431
  let s = !0;
@@ -440,7 +440,7 @@ export default class ne {
440
440
  return null;
441
441
  }
442
442
  remove(t) {
443
- new ne.ne(this.fn).remove(t);
443
+ new ne.se(this.cn).remove(t);
444
444
  for (let e = 0; e < this.vE.length; e++) this.vE[e].remove(t);
445
445
  }
446
446
  });
@@ -1,8 +1,8 @@
1
1
  export default {
2
- Nu: "invalid_api_key",
3
- wu: "blacklisted",
4
- Cu: "no_device_identifier",
5
- yu: "invalid_json_response",
6
- ku: "empty_response",
2
+ Tu: "invalid_api_key",
3
+ yu: "blacklisted",
4
+ Nu: "no_device_identifier",
5
+ ku: "invalid_json_response",
6
+ Au: "empty_response",
7
7
  __: "sdk_auth_error",
8
8
  };
@@ -18,7 +18,7 @@ export default class ve {
18
18
  (this.sessionId = r),
19
19
  (this.data = e);
20
20
  }
21
- Qr() {
21
+ Kr() {
22
22
  var t;
23
23
  const s = {
24
24
  name: this.type,
@@ -49,7 +49,7 @@ export default class ve {
49
49
  static RE(t) {
50
50
  return null != t && yt(t) && null != t.t && "" !== t.t;
51
51
  }
52
- static Yn(t) {
52
+ static Bn(t) {
53
53
  return new ve(t.u, t.t, t.ts, t.s, t.d);
54
54
  }
55
55
  }
@@ -2,11 +2,11 @@ export default class Gt {
2
2
  constructor(s) {
3
3
  (this.id = s), (this.id = s);
4
4
  }
5
- Qr() {
5
+ Kr() {
6
6
  const s = {};
7
7
  return (
8
8
  null != this.browser && (s.browser = this.browser),
9
- null != this.Ha && (s.browser_version = this.Ha),
9
+ null != this.Qa && (s.browser_version = this.Qa),
10
10
  null != this.os && (s.os_version = this.os),
11
11
  null != this.resolution && (s.resolution = this.resolution),
12
12
  null != this.language && (s.locale = this.language),
@@ -1,18 +1,18 @@
1
1
  import { Guid as G, logger as N } from "../../shared-lib/index.js";
2
- import { isArray as w } from "../util/code-utils.js";
2
+ import { isArray as z } from "../util/code-utils.js";
3
3
  import { getErrorMessage as si } from "../util/error-utils.js";
4
4
  export default class _t {
5
5
  constructor(t, e, i) {
6
6
  (this.eu = t),
7
7
  null == t && (t = G.Rt()),
8
- !i || isNaN(i) ? (this.zl = new Date().valueOf()) : (this.zl = i),
8
+ !i || isNaN(i) ? (this.Gl = new Date().valueOf()) : (this.Gl = i),
9
9
  (this.eu = t),
10
- (this.Il = new Date().valueOf()),
11
- (this.Al = e);
10
+ (this.ql = new Date().valueOf()),
11
+ (this.kl = e);
12
12
  }
13
13
  bs() {
14
- return `g:${encodeURIComponent(this.eu)}|e:${this.Al}|c:${this.zl}|l:${
15
- this.Il
14
+ return `g:${encodeURIComponent(this.eu)}|e:${this.kl}|c:${this.Gl}|l:${
15
+ this.ql
16
16
  }`;
17
17
  }
18
18
  static hE(t) {
@@ -26,19 +26,19 @@ export default class _t {
26
26
  (t = t.replace(i, `g:${n}`))
27
27
  );
28
28
  }
29
- static Yn(t) {
29
+ static Bn(t) {
30
30
  let e;
31
31
  if ("string" == typeof t)
32
32
  try {
33
33
  const i = t.split("|");
34
- if (!w(i) || 4 !== i.length) return null;
34
+ if (!z(i) || 4 !== i.length) return null;
35
35
  const r = (t) => t.split(":")[1],
36
36
  n = (t) => {
37
37
  const e = parseInt(r(t));
38
38
  if (!isNaN(e)) return e;
39
39
  };
40
40
  (e = new _t(decodeURIComponent(r(i[0])), n(i[1]), n(i[2]))),
41
- (e.Il = n(i[3]));
41
+ (e.ql = n(i[3]));
42
42
  } catch (e) {
43
43
  N.info(
44
44
  `Unable to parse cookie string ${t}, failed with error: ${si(e)}`,
@@ -46,7 +46,7 @@ export default class _t {
46
46
  }
47
47
  else {
48
48
  if (null == t || null == t.g) return null;
49
- (e = new _t(t.g, t.e, t.c)), (e.Il = t.l);
49
+ (e = new _t(t.g, t.e, t.c)), (e.ql = t.l);
50
50
  }
51
51
  return e;
52
52
  }
@@ -2,26 +2,26 @@ import { rehydrateDateAfterJsonization as V } from "../util/date-utils.js";
2
2
  export default class ti {
3
3
  constructor(t, i, s, l, h) {
4
4
  (this.endpoint = t),
5
- (this.Mn = i),
5
+ (this.On = i),
6
6
  (this.publicKey = s),
7
7
  (this.Vl = l),
8
- (this.vl = h),
8
+ (this.Cl = h),
9
9
  (this.endpoint = t || null),
10
- (this.Mn = i || null),
10
+ (this.On = i || null),
11
11
  (this.publicKey = s || null),
12
12
  (this.Vl = l || null),
13
- (this.vl = h || null);
13
+ (this.Cl = h || null);
14
14
  }
15
15
  bs() {
16
16
  return {
17
17
  e: this.endpoint,
18
- c: this.Mn,
18
+ c: this.On,
19
19
  p: this.publicKey,
20
20
  u: this.Vl,
21
- v: this.vl,
21
+ v: this.Cl,
22
22
  };
23
23
  }
24
- static Yn(t) {
24
+ static Bn(t) {
25
25
  return new ti(t.e, V(t.c), t.p, t.u, t.v);
26
26
  }
27
27
  }
@@ -15,46 +15,46 @@ export default class Jt {
15
15
  n = { enabled: !0, capacity: Zt, refill_rate: hi, endpoint_overrides: {} },
16
16
  o = { enabled: !1, max_placements: 0 },
17
17
  ) {
18
- (this.Rl = t),
19
- (this.yl = i),
20
- (this.Ll = s),
21
- (this.Bl = h),
22
- (this.Tl = e),
23
- (this.vl = l),
24
- (this.wl = r),
25
- (this.je = a),
26
- (this.El = n),
18
+ (this.fl = t),
19
+ (this.vl = i),
20
+ (this.wl = s),
21
+ (this.yl = h),
22
+ (this.Bl = e),
23
+ (this.Cl = l),
24
+ (this.El = r),
25
+ (this.we = a),
26
+ (this.Rl = n),
27
27
  (this.banners = o),
28
- (this.Rl = t),
29
- (this.yl = i),
30
- (this.Ll = s),
31
- (this.Bl = h),
32
- (this.Tl = e),
33
- (this.vl = l),
34
- (this.wl = r),
35
- (this.je = a),
36
- (this.El = n),
28
+ (this.fl = t),
29
+ (this.vl = i),
30
+ (this.wl = s),
31
+ (this.yl = h),
32
+ (this.Bl = e),
33
+ (this.Cl = l),
34
+ (this.El = r),
35
+ (this.we = a),
36
+ (this.Rl = n),
37
37
  (this.banners = o);
38
38
  }
39
39
  bs() {
40
40
  return {
41
- s: "5.7.0",
42
- l: this.Rl,
43
- e: this.yl,
44
- a: this.Ll,
45
- p: this.Bl,
46
- m: this.Tl,
47
- v: this.vl,
48
- c: this.wl,
49
- f: this.je,
50
- grl: this.El,
41
+ s: "5.8.0",
42
+ l: this.fl,
43
+ e: this.vl,
44
+ a: this.wl,
45
+ p: this.yl,
46
+ m: this.Bl,
47
+ v: this.Cl,
48
+ c: this.El,
49
+ f: this.we,
50
+ grl: this.Rl,
51
51
  b: this.banners,
52
52
  };
53
53
  }
54
- static Yn(t) {
54
+ static Bn(t) {
55
55
  let i = t.l;
56
56
  return (
57
- "5.7.0" !== t.s && (i = 0),
57
+ "5.8.0" !== t.s && (i = 0),
58
58
  new Jt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b)
59
59
  );
60
60
  }