@braze/web-sdk 6.3.0 → 6.4.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 (132) hide show
  1. package/index.d.ts +35 -3
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +1 -1
  4. package/shared-lib/event-types.js +23 -23
  5. package/shared-lib/guid.js +25 -6
  6. package/shared-lib/indexed-db-adapter.js +7 -7
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +22 -21
  9. package/src/Banner/display/banner-to-html.js +2 -2
  10. package/src/Banner/display/detect-banner-impressions.js +7 -7
  11. package/src/Banner/index.js +2 -0
  12. package/src/Banner/request-banners-refresh.js +6 -6
  13. package/src/Banner/ui/insert-banner.js +4 -4
  14. package/src/Card/card-manager-factory.js +5 -5
  15. package/src/Card/card-manager.js +4 -4
  16. package/src/Card/display/card-display.js +7 -7
  17. package/src/Card/log-card-dismissal.js +3 -3
  18. package/src/Card/log-content-card-click.js +3 -3
  19. package/src/Card/log-content-card-impressions.js +6 -6
  20. package/src/Card/models/card.js +7 -7
  21. package/src/Card/util/card-factory.js +6 -6
  22. package/src/ContentCards/content-cards-provider-factory.js +14 -10
  23. package/src/ContentCards/content-cards-provider.js +28 -28
  24. package/src/ContentCards/content-cards.js +4 -4
  25. package/src/ContentCards/get-cached-content-cards.js +2 -2
  26. package/src/ContentCards/request-content-cards-refresh.js +2 -2
  27. package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
  28. package/src/ContentCards/ui/show-content-cards.js +8 -8
  29. package/src/Core/add-sdk-metadata.js +2 -2
  30. package/src/Core/change-user.js +5 -5
  31. package/src/Core/disable-sdk.js +3 -3
  32. package/src/Core/enable-sdk.js +3 -3
  33. package/src/Core/get-user.js +1 -1
  34. package/src/Core/is-disabled.js +1 -1
  35. package/src/Core/log-custom-event.js +9 -9
  36. package/src/Core/log-purchase.js +7 -7
  37. package/src/Core/open-session.js +11 -11
  38. package/src/Core/set-sdk-authentication-signature.js +2 -2
  39. package/src/Core/wipe-data.js +5 -5
  40. package/src/DUST/dust-provider-factory.js +20 -0
  41. package/src/DUST/dust-provider.js +288 -0
  42. package/src/DUST/index.js +3 -0
  43. package/src/DUST/subscribe-to-dust.js +24 -0
  44. package/src/DUST/types.js +1 -0
  45. package/src/FeatureFlags/feature-flags-provider-factory.js +9 -9
  46. package/src/FeatureFlags/feature-flags-provider.js +38 -38
  47. package/src/FeatureFlags/get-all-feature-flags.js +3 -3
  48. package/src/FeatureFlags/get-feature-flag.js +3 -3
  49. package/src/FeatureFlags/log-feature-flag-impression.js +5 -5
  50. package/src/FeatureFlags/refresh-feature-flags.js +5 -5
  51. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +3 -3
  52. package/src/InAppMessage/defer-in-app-message.js +1 -1
  53. package/src/InAppMessage/display/html-message-to-html.js +5 -5
  54. package/src/InAppMessage/display/in-app-message-to-html.js +22 -22
  55. package/src/InAppMessage/display/modal-utils.js +5 -5
  56. package/src/InAppMessage/get-deferred-in-app-message.js +1 -1
  57. package/src/InAppMessage/in-app-message-factory.js +4 -4
  58. package/src/InAppMessage/in-app-message-manager.js +80 -80
  59. package/src/InAppMessage/log-in-app-message-button-click.js +5 -5
  60. package/src/InAppMessage/log-in-app-message-click.js +5 -5
  61. package/src/InAppMessage/log-in-app-message-html-click.js +5 -5
  62. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  63. package/src/InAppMessage/models/control-message.js +1 -1
  64. package/src/InAppMessage/models/full-screen-message.js +12 -12
  65. package/src/InAppMessage/models/html-message.js +14 -14
  66. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  67. package/src/InAppMessage/models/in-app-message.js +119 -121
  68. package/src/InAppMessage/models/modal-message.js +12 -12
  69. package/src/InAppMessage/models/slide-up-message.js +21 -21
  70. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  71. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  72. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  73. package/src/InAppMessage/ui/remove-all-visible-in-app-messages.js +18 -0
  74. package/src/InAppMessage/ui/show-in-app-message.js +24 -24
  75. package/src/Push/is-push-blocked.js +2 -2
  76. package/src/Push/is-push-permission-granted.js +2 -2
  77. package/src/Push/is-push-supported.js +2 -2
  78. package/src/Push/push-manager-factory.js +8 -8
  79. package/src/Push/push-manager.js +90 -90
  80. package/src/Push/utils/push-utils.js +17 -17
  81. package/src/User/user-manager.js +12 -12
  82. package/src/User/user.js +48 -48
  83. package/src/common/constants.js +1 -0
  84. package/src/common/content-cards-display.js +20 -20
  85. package/src/common/event-logger.js +4 -4
  86. package/src/common/properties-base.js +16 -16
  87. package/src/l10n/l10n-manager-factory.js +2 -2
  88. package/src/l10n/l10n-manager.js +1 -1
  89. package/src/managers/auth-manager.js +29 -29
  90. package/src/managers/braze-instance.js +141 -133
  91. package/src/managers/device-manager.js +18 -18
  92. package/src/managers/network-manager.js +139 -139
  93. package/src/managers/server-config-manager.js +99 -82
  94. package/src/managers/session-manager.js +32 -32
  95. package/src/managers/storage-manager-factory.js +8 -8
  96. package/src/managers/storage-manager.js +76 -74
  97. package/src/managers/subscription-manager.js +10 -10
  98. package/src/models/backend-errors.js +5 -5
  99. package/src/models/braze-event.js +9 -9
  100. package/src/models/device.js +2 -2
  101. package/src/models/identifier.js +12 -12
  102. package/src/models/push-token.js +12 -12
  103. package/src/models/request-result.js +1 -1
  104. package/src/models/server-config.js +38 -34
  105. package/src/request-controller.js +136 -134
  106. package/src/triggers/models/custom-event-data.js +4 -4
  107. package/src/triggers/models/custom-event-property-data.js +5 -5
  108. package/src/triggers/models/filter-set.js +8 -8
  109. package/src/triggers/models/filter.js +30 -30
  110. package/src/triggers/models/in-app-message-click-data.js +1 -1
  111. package/src/triggers/models/purchase-data.js +1 -1
  112. package/src/triggers/models/purchase-property-data.js +2 -2
  113. package/src/triggers/models/push-click-data.js +1 -1
  114. package/src/triggers/models/trigger-condition.js +36 -36
  115. package/src/triggers/models/trigger-events.js +2 -2
  116. package/src/triggers/models/trigger.js +15 -15
  117. package/src/triggers/triggers-provider-factory.js +3 -3
  118. package/src/triggers/triggers-provider.js +25 -25
  119. package/src/ui/js/attach-css.js +3 -3
  120. package/src/ui/js/load-font-awesome.js +2 -2
  121. package/src/util/base-device-parser.js +3 -3
  122. package/src/util/braze-actions.js +3 -3
  123. package/src/util/browser-detector.js +13 -13
  124. package/src/util/client-hints-parser.js +6 -6
  125. package/src/util/component-utils.js +1 -1
  126. package/src/util/dom-utils.js +10 -10
  127. package/src/util/key-codes.js +1 -1
  128. package/src/util/net.js +1 -1
  129. package/src/util/request-header-utils.js +22 -22
  130. package/src/util/user-agent-parser.js +14 -14
  131. package/src/util/validation-utils.js +14 -13
  132. package/src/util/window-utils.js +1 -1
@@ -11,51 +11,55 @@ export default class ni {
11
11
  e = null,
12
12
  l = null,
13
13
  r = { enabled: !1 },
14
- a = { enabled: !1, refresh_rate_limit: void 0 },
15
- n = { enabled: !0, capacity: hi, refill_rate: li, endpoint_overrides: {} },
14
+ n = { enabled: !1, refresh_rate_limit: void 0 },
15
+ a = { enabled: !0, capacity: hi, refill_rate: li, endpoint_overrides: {} },
16
16
  o = null,
17
+ c = null,
17
18
  ) {
18
- (this.ol = t),
19
- (this.bl = i),
20
- (this.fl = s),
21
- (this.vl = h),
22
- (this.Cl = e),
23
- (this.dl = l),
24
- (this.gl = r),
25
- (this.he = a),
26
- (this.ml = n),
19
+ (this.Dl = t),
20
+ (this.Il = i),
21
+ (this.Ml = s),
22
+ (this.Sl = h),
23
+ (this.Pl = e),
24
+ (this.xl = l),
25
+ (this.Gl = r),
26
+ (this.je = n),
27
+ (this.kl = a),
27
28
  (this.banners = o),
28
- (this.ol = t),
29
- (this.bl = i),
30
- (this.fl = s),
31
- (this.vl = h),
32
- (this.Cl = e),
33
- (this.dl = l),
34
- (this.gl = r),
35
- (this.he = a),
36
- (this.ml = n),
37
- (this.banners = o);
29
+ (this.dust = c),
30
+ (this.Dl = t),
31
+ (this.Il = i),
32
+ (this.Ml = s),
33
+ (this.Sl = h),
34
+ (this.Pl = e),
35
+ (this.xl = l),
36
+ (this.Gl = r),
37
+ (this.je = n),
38
+ (this.kl = a),
39
+ (this.banners = o),
40
+ (this.dust = c);
38
41
  }
39
42
  dt() {
40
43
  return {
41
- s: "6.3.0",
42
- l: this.ol,
43
- e: this.bl,
44
- a: this.fl,
45
- p: this.vl,
46
- m: this.Cl,
47
- v: this.dl,
48
- c: this.gl,
49
- f: this.he,
50
- grl: this.ml,
44
+ s: "6.4.0",
45
+ l: this.Dl,
46
+ e: this.Il,
47
+ a: this.Ml,
48
+ p: this.Sl,
49
+ m: this.Pl,
50
+ v: this.xl,
51
+ c: this.Gl,
52
+ f: this.je,
53
+ grl: this.kl,
51
54
  b: this.banners,
55
+ d: this.dust,
52
56
  };
53
57
  }
54
- static qn(t) {
58
+ static Vo(t) {
55
59
  let i = t.l;
56
60
  return (
57
- "6.3.0" !== t.s && (i = 0),
58
- new ni(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b)
61
+ "6.4.0" !== t.s && (i = 0),
62
+ new ni(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b, t.d)
59
63
  );
60
64
  }
61
65
  }
@@ -2,70 +2,71 @@ import a from "./util/net.js";
2
2
  import ue from "./models/braze-event.js";
3
3
  import c from "./common/event-logger.js";
4
4
  import { randomInclusive as l } from "./util/math.js";
5
- import H from "./models/request-result.js";
5
+ import G from "./models/request-result.js";
6
6
  import {
7
7
  logger as E,
8
- IndexedDBAdapter as et,
9
- Guid as P,
8
+ IndexedDBAdapter as it,
9
+ Guid as L,
10
10
  EventTypes as m,
11
11
  } from "../shared-lib/index.js";
12
12
  import { STORAGE_KEYS as s } from "./managers/storage-manager.js";
13
13
  import u from "./managers/subscription-manager.js";
14
- import yt from "./Push/utils/push-utils.js";
14
+ import vt from "./Push/utils/push-utils.js";
15
15
  import h from "./util/request-header-utils.js";
16
+ import { removeAllVisibleInAppMessages as oi } from "./InAppMessage/ui/remove-all-visible-in-app-messages.js";
16
17
  export default class Wt {
17
18
  constructor(t, i, s, e, h, n, o, r, l, a) {
18
- (this.sn = t),
19
+ (this.Pn = t),
19
20
  (this.baseUrl = i),
20
21
  (this.C = s),
21
- (this.on = e),
22
+ (this.Dn = e),
22
23
  (this.Cs = h),
23
24
  (this.h = n),
24
25
  (this.j = o),
25
- (this.$l = r),
26
- (this.Qh = l),
26
+ (this.fc = r),
27
+ (this.La = l),
27
28
  (this.B = a),
28
- (this.sn = t),
29
+ (this.Pn = t),
29
30
  (this.baseUrl = i),
30
- (this.Tl = 0),
31
- (this.fE = o.dE() || 0),
32
- (this.Ll = null),
31
+ (this.vc = 0),
32
+ (this.bE = o.dE() || 0),
33
+ (this.bc = null),
33
34
  (this.C = s),
34
- (this.on = e),
35
+ (this.Dn = e),
35
36
  (this.Cs = h),
36
37
  (this.h = n),
37
38
  (this.j = o),
38
- (this.Qh = l),
39
+ (this.La = l),
39
40
  (this.B = a),
40
- (this.$l = r),
41
- (this.Ml = new u()),
42
- (this.Pl = null),
43
- (this.Il = 50),
44
- (this.Ol = !1),
45
- (this.Ul = !1);
41
+ (this.fc = r),
42
+ (this.wc = new u()),
43
+ (this.kc = null),
44
+ (this.yc = 50),
45
+ (this.jc = !1),
46
+ (this.Sc = !1);
46
47
  }
47
- _l(t, i) {
48
- return !t && !i && this.Qh.Hh() >= this.Il;
48
+ Ac(t, i) {
49
+ return !t && !i && this.La.Jh() >= this.yc;
49
50
  }
50
- Jl(t) {
51
- let i = this.C.zl();
51
+ Dc(t) {
52
+ let i = this.C.Ul();
52
53
  if (t.length > 0) {
53
54
  const s = this.Cs.getUserId();
54
55
  for (const e of t) {
55
56
  const t = (!e.userId && !s) || e.userId === s;
56
- e.type === m.Al && t && (i = !0);
57
+ e.type === m.sm && t && (i = !0);
57
58
  }
58
59
  }
59
60
  return i;
60
61
  }
61
- Kl(t = !1, i = !0, e, n, o, r = !1, u = !1) {
62
- i && this.Xl();
62
+ $c(t = !1, i = !0, e, n, o, r = !1, u = !1) {
63
+ i && this.qc();
63
64
  const c = this.j.RE(),
64
65
  d = this.j.IE();
65
66
  let m = !1;
66
67
  const f = (t, r, u = -1) => {
67
68
  const c = new Date().valueOf();
68
- h.K(this.j, h.H.Tu, c),
69
+ h.K(this.j, h.H.Yi, c),
69
70
  -1 !== u && r.push(["X-Braze-Req-Tokens-Remaining", u.toString()]);
70
71
  let d = !1;
71
72
  a.O({
@@ -75,18 +76,18 @@ export default class Wt {
75
76
  W: (i) => {
76
77
  null != t.respond_with &&
77
78
  t.respond_with.triggers &&
78
- (this.Tl = Math.max(this.Tl - 1, 0)),
79
+ (this.vc = Math.max(this.vc - 1, 0)),
79
80
  this.B.Y(t, i, r)
80
- ? (this.Qh.Z(),
81
- this.h.cl(i),
81
+ ? (this.La.Z(),
82
+ this.h.Nl(i),
82
83
  (null != t.respond_with &&
83
84
  t.respond_with.user_id != this.Cs.getUserId()) ||
84
- (null != t.device && this.j.ft(s.ct.Qa, t.device),
85
+ (null != t.device && this.j.ft(s.ct.ac, t.device),
85
86
  null != t.sdk_metadata &&
86
- (this.j.ft(s.ct.au, t.sdk_metadata),
87
- this.j.ft(s.ct.du, this.C.bt())),
88
- this.$l(i),
89
- h.Bu(this.j, h.H.Tu, 1),
87
+ (this.j.ft(s.ct.ku, t.sdk_metadata),
88
+ this.j.ft(s.ct.wu, this.C.bt())),
89
+ this.fc(i),
90
+ h.Wu(this.j, h.H.Yi, 1),
90
91
  "function" == typeof e && e()))
91
92
  : i.auth_error && (d = !0);
92
93
  },
@@ -94,13 +95,13 @@ export default class Wt {
94
95
  (d = !0),
95
96
  null != t.respond_with &&
96
97
  t.respond_with.triggers &&
97
- (this.Tl = Math.max(this.Tl - 1, 0)),
98
- this.B.fu(t.events, t.attributes),
98
+ (this.vc = Math.max(this.vc - 1, 0)),
99
+ this.B.Bu(t.events, t.attributes),
99
100
  "function" == typeof n && n();
100
101
  },
101
102
  tt: (t, s) => {
102
103
  "function" == typeof o && o(!d);
103
- const e = this.B.Fu(s);
104
+ const e = this.B.il(s);
104
105
  let n = 0;
105
106
  if (e)
106
107
  switch (e.type) {
@@ -112,97 +113,97 @@ export default class Wt {
112
113
  }
113
114
  if (i && !m) {
114
115
  if (d) {
115
- h.Ku(this.j, h.H.Tu);
116
- let t = this.Ll;
117
- (null == t || t < 1e3 * this.fE) && (t = 1e3 * this.fE);
118
- const i = Math.min(3e5, l(1e3 * this.fE, 3 * t)) + n;
119
- this.Ql(i);
120
- } else this.Ql(Math.max(1e3 * this.fE, n));
116
+ h.sl(this.j, h.H.Yi);
117
+ let t = this.bc;
118
+ (null == t || t < 1e3 * this.bE) && (t = 1e3 * this.bE);
119
+ const i = Math.min(3e5, l(1e3 * this.bE, 3 * t)) + n;
120
+ this.Cc(i);
121
+ } else this.Cc(Math.max(1e3 * this.bE, n));
121
122
  m = !0;
122
123
  }
123
124
  },
124
125
  });
125
126
  },
126
- g = this.Jl(c),
127
- v = t || g;
128
- if (this._l(r, g))
127
+ g = this.Dc(c),
128
+ p = t || g;
129
+ if (this.Ac(r, g))
129
130
  return void E.info(
130
131
  "Declining to flush data due to 50 consecutive authentication failures",
131
132
  );
132
- if (i && !this.B.Au(c, d, v))
133
- return this.Ql(), void ("function" == typeof o && o(!0));
134
- const p = this.B.Du(v, c, d, u);
135
- v && this.Tl++;
133
+ if (i && !this.B.Fu(c, d, p))
134
+ return this.Cc(), void ("function" == typeof o && o(!0));
135
+ const v = this.B.Ku(p, c, d, u);
136
+ p && this.vc++;
136
137
  let b = !1;
137
- if (p)
138
- for (const t of p)
138
+ if (v)
139
+ for (const t of v)
139
140
  this.B.J(
140
141
  t.requestData,
141
142
  (i) => f(t.requestData, t.headers, i),
142
- h.H.Tu,
143
+ h.H.Yi,
143
144
  n,
144
145
  ),
145
146
  (b = !0);
146
- this.Qh.fh() && i && !b
147
- ? this.Ql()
147
+ this.La.wh() && i && !b
148
+ ? this.Cc()
148
149
  : g &&
149
150
  (E.info("Invoking new session subscriptions"),
150
- this.Ml.L(),
151
- (this.Ul = !0));
151
+ this.wc.L(),
152
+ (this.Sc = !0));
152
153
  }
153
- Yl() {
154
- return this.Tl > 0;
154
+ Mc() {
155
+ return this.vc > 0;
155
156
  }
156
- Ql(t = 1e3 * this.fE) {
157
- this.Ol ||
158
- (this.Xl(),
159
- (this.Pl = window.setTimeout(() => {
157
+ Cc(t = 1e3 * this.bE) {
158
+ this.jc ||
159
+ (this.qc(),
160
+ (this.kc = window.setTimeout(() => {
160
161
  if (document.hidden) {
161
162
  const t = "visibilitychange",
162
163
  i = () => {
163
164
  document.hidden ||
164
- (document.removeEventListener(t, i, !1), this.Kl());
165
+ (document.removeEventListener(t, i, !1), this.$c());
165
166
  };
166
167
  document.addEventListener(t, i, !1);
167
- } else this.Kl();
168
+ } else this.$c();
168
169
  }, t)),
169
- (this.Ll = t));
170
+ (this.bc = t));
170
171
  }
171
- Xl() {
172
- null != this.Pl && (clearTimeout(this.Pl), (this.Pl = null));
172
+ qc() {
173
+ null != this.kc && (clearTimeout(this.kc), (this.kc = null));
173
174
  }
174
175
  initialize() {
175
- (this.Ol = !1), this.Ql();
176
+ (this.jc = !1), this.Cc();
176
177
  }
177
178
  destroy() {
178
- this.Ml.removeAllSubscriptions(),
179
- this.Qh.Bh(),
180
- this.Xl(),
181
- (this.Ol = !0),
182
- this.Kl(void 0, !1, void 0, void 0, void 0, void 0, !0),
183
- (this.Pl = null),
184
- (this.Ul = !1);
179
+ this.wc.removeAllSubscriptions(),
180
+ this.La.Gh(),
181
+ this.qc(),
182
+ (this.jc = !0),
183
+ this.$c(void 0, !1, void 0, void 0, void 0, void 0, !0),
184
+ (this.kc = null),
185
+ (this.Sc = !1);
185
186
  }
186
187
  rn(t) {
187
- return this.Ul ? (t(), null) : this.Ml.wt(t);
188
+ return this.Sc ? (t(), null) : this.wc.wt(t);
188
189
  }
189
190
  openSession() {
190
- const t = this.C.bt() !== this.C.qo();
191
- t && (this.j.hE(s.iu.Jh), this.j.hE(s.iu.su)),
192
- this.Kl(!1, void 0, () => {
193
- this.j.Nt(s.ct.qe);
191
+ const t = this.C.bt() !== this.C.Fo();
192
+ t && (this.j.hE(s.iu.Oa), this.j.hE(s.iu.su)),
193
+ this.$c(!1, void 0, () => {
194
+ t && (this.j.Nt(s.ct.Ne), this.j.Nt(s.ct.It));
194
195
  }),
195
- this.zn(),
196
+ this.Au(),
196
197
  t &&
197
198
  import("./Push/push-manager-factory.js").then((t) => {
198
- if (this.Ol) return;
199
+ if (this.jc) return;
199
200
  const i = t.default.ea();
200
201
  if (
201
202
  null != i &&
202
- (yt.isPushPermissionGranted() || yt.isPushBlocked())
203
+ (vt.isPushPermissionGranted() || vt.isPushBlocked())
203
204
  ) {
204
205
  const t = () => {
205
- i.mn()
206
+ i.Rn()
206
207
  ? E.info(
207
208
  "Push token maintenance is disabled, not refreshing token for backend.",
208
209
  )
@@ -212,55 +213,56 @@ export default class Wt {
212
213
  s && t();
213
214
  },
214
215
  h = () => {
215
- const i = this.j.lt(s.ct.In);
216
+ const i = this.j.lt(s.ct.Wo);
216
217
  (null == i || i) && t();
217
218
  },
218
- n = et.Us.Rs;
219
- new et(n, E).jr(n.Fs.cu, e, h);
219
+ n = it.Us.Rs;
220
+ new it(n, E).kr(n.Fs.cu, e, h);
220
221
  }
221
222
  });
222
223
  }
223
- Zl() {
224
- this.j.Nt(s.ct.Ie), this.j.Nt(s.ct.Ps), this.j.Nt(s.ct.Nr);
224
+ Tc() {
225
+ this.j.Nt(s.ct.Se), this.j.Nt(s.ct.Ps), this.j.Nt(s.ct.yn);
225
226
  }
226
- hc() {
227
+ Lc() {
227
228
  var t, i;
228
- this.j.Nt(s.ct.Lu), this.j.Nt(s.ct.SE);
229
+ this.j.Nt(s.ct.tl), this.j.Nt(s.ct.SE);
229
230
  const e = h.H;
230
231
  for (const i in e) {
231
232
  const s = e[i];
232
- this.B.Uu(s, null === (t = this.h) || void 0 === t ? void 0 : t.Vu(s));
233
+ this.B.al(s, null === (t = this.h) || void 0 === t ? void 0 : t.bl(s));
233
234
  }
234
- this.B.Iu(null === (i = this.h) || void 0 === i ? void 0 : i.Ju());
235
+ this.B.rl(null === (i = this.h) || void 0 === i ? void 0 : i.Rl());
235
236
  }
236
237
  changeUser(t, i, e) {
237
238
  const h = this.Cs.getUserId();
238
239
  if (h !== t) {
239
- this.C.Bl(),
240
- this.Zl(),
241
- null != h && this.Kl(void 0, !1, void 0, void 0, void 0),
240
+ this.C.tm(),
241
+ this.Tc(),
242
+ oi(),
243
+ null != h && this.$c(void 0, !1, void 0, void 0, void 0),
242
244
  this.Cs.ou(t),
243
- e ? this.Qh.setSdkAuthenticationSignature(e) : this.Qh.qh();
245
+ e ? this.La.setSdkAuthenticationSignature(e) : this.La.yh();
244
246
  for (let t = 0; t < i.length; t++) i[t].changeUser(null == h);
245
247
  this.B.fo(),
246
248
  null != h && this.j.Nt(s.ct.rE),
247
- this.j.Nt(s.ct.Qa),
249
+ this.j.Nt(s.ct.ac),
248
250
  this.j.Nt(s.ct.uE),
249
- this.hc(),
251
+ this.Lc(),
250
252
  this.openSession(),
251
253
  E.info('Changed user to "' + t + '".');
252
254
  } else {
253
255
  let i = "Doing nothing.";
254
256
  e &&
255
- this.Qh.wh() !== e &&
256
- (this.Qh.setSdkAuthenticationSignature(e),
257
+ this.La.jh() !== e &&
258
+ (this.La.setSdkAuthenticationSignature(e),
257
259
  (i = "Updated SDK authentication signature")),
258
260
  E.info(`Current user is already ${t}. ${i}`);
259
261
  }
260
262
  }
261
263
  requestImmediateDataFlush(t) {
262
- this.Xl(), this.C.qo();
263
- this.Kl(
264
+ this.qc(), this.C.Fo();
265
+ this.$c(
264
266
  void 0,
265
267
  void 0,
266
268
  void 0,
@@ -271,13 +273,13 @@ export default class Wt {
271
273
  !0,
272
274
  );
273
275
  }
274
- $r(t, i) {
275
- this.C.qo(),
276
+ yr(t, i) {
277
+ this.C.Fo(),
276
278
  E.info("Requesting explicit trigger refresh."),
277
- this.Kl(!0, void 0, t, i);
279
+ this.$c(!0, void 0, t, i);
278
280
  }
279
- En(t, i) {
280
- const e = m.nc,
281
+ du(t, i) {
282
+ const e = m.Rc,
281
283
  h = { a: t, l: i },
282
284
  n = c.rt(e, h);
283
285
  return (
@@ -285,10 +287,10 @@ export default class Wt {
285
287
  n
286
288
  );
287
289
  }
288
- Ln(t, i, s) {
290
+ bu(t, i, s) {
289
291
  if (this.h.hu(i))
290
292
  return (
291
- E.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new H()
293
+ E.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new G()
292
294
  );
293
295
  const e = { key: i, value: s },
294
296
  h = c.rt(t, e);
@@ -303,52 +305,52 @@ export default class Wt {
303
305
  null != e && (o.altitude = e),
304
306
  null != h && (o.ll_accuracy = h),
305
307
  null != n && (o.alt_accuracy = n);
306
- const r = c.rt(m.lc, o, t || void 0);
308
+ const r = c.rt(m.Fc, o, t || void 0);
307
309
  return (
308
310
  r &&
309
311
  E.info(`Set user last known location as ${JSON.stringify(o, null, 2)}`),
310
312
  r
311
313
  );
312
314
  }
313
- kr(t, i) {
314
- const s = this.C.qo();
315
- return new ue(this.Cs.getUserId(), m.uc, t, s, { cid: i });
315
+ $r(t, i) {
316
+ const s = this.C.Fo();
317
+ return new ue(this.Cs.getUserId(), m.Ic, t, s, { cid: i });
316
318
  }
317
- cc(t, i) {
318
- return new et(t, i);
319
+ Pc(t, i) {
320
+ return new it(t, i);
319
321
  }
320
- zn() {
321
- const t = et.Us.Rs;
322
- this.cc(t, E).setItem(t.Fs.Tu, 1, {
322
+ Au() {
323
+ const t = it.Us.Rs;
324
+ this.Pc(t, E).setItem(t.Fs.Yi, 1, {
323
325
  baseUrl: this.baseUrl,
324
- data: { api_key: this.sn, device_id: this.on.fe().id },
326
+ data: { api_key: this.Pn, device_id: this.Dn.fe().id },
325
327
  userId: this.Cs.getUserId(),
326
- sdkAuthEnabled: this.Qh.fh(),
328
+ sdkAuthEnabled: this.La.wh(),
327
329
  });
328
330
  }
329
- yr(t) {
331
+ Fr(t) {
330
332
  for (const i of t)
331
- if (i.api_key === this.sn) this.B.fu(i.events, i.attributes);
333
+ if (i.api_key === this.Pn) this.B.Bu(i.events, i.attributes);
332
334
  else {
333
- const t = et.Us.Rs;
334
- new et(t, E).setItem(t.Fs.wr, P.oe(), i);
335
+ const t = it.Us.Rs;
336
+ new it(t, E).setItem(t.Fs.zr, L.oe(), i);
335
337
  }
336
338
  }
337
- Hn(t, i, s) {
339
+ Iu(t, i, s) {
338
340
  if (this.h.hu(t))
339
341
  return (
340
- E.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new H()
342
+ E.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new G()
341
343
  );
342
344
  let e, h;
343
345
  return (
344
346
  null === i && null === s
345
- ? ((e = m.dc), (h = { key: t }))
346
- : ((e = m.mc), (h = { key: t, latitude: i, longitude: s })),
347
+ ? ((e = m.xc), (h = { key: t }))
348
+ : ((e = m.Nc), (h = { key: t, latitude: i, longitude: s })),
347
349
  c.rt(e, h)
348
350
  );
349
351
  }
350
- Kn(t, i) {
352
+ Cu(t, i) {
351
353
  const s = { group_id: t, status: i };
352
- return c.rt(m.fc, s);
354
+ return c.rt(m.Oc, s);
353
355
  }
354
356
  }
@@ -1,14 +1,14 @@
1
1
  export default class rs {
2
2
  constructor(t) {
3
- (this.wc = t), (this.wc = t);
3
+ (this.zc = t), (this.zc = t);
4
4
  }
5
- xc(t) {
6
- return null == this.wc || this.wc === t[0];
5
+ Bc(t) {
6
+ return null == this.zc || this.zc === t[0];
7
7
  }
8
8
  static fromJson(t) {
9
9
  return new rs(t ? t.event_name : null);
10
10
  }
11
11
  dt() {
12
- return this.wc;
12
+ return this.zc;
13
13
  }
14
14
  }
@@ -1,13 +1,13 @@
1
1
  import is from "./filter-set.js";
2
2
  export default class ls {
3
3
  constructor(t, s) {
4
- (this.wc = t), (this.tf = s), (this.wc = t), (this.tf = s);
4
+ (this.zc = t), (this.tf = s), (this.zc = t), (this.tf = s);
5
5
  }
6
- xc(t) {
7
- if (null == this.wc || null == this.tf) return !1;
6
+ Bc(t) {
7
+ if (null == this.zc || null == this.tf) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.wc && this.tf.xc(i);
10
+ return s === this.zc && this.tf.Bc(i);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new ls(
@@ -16,6 +16,6 @@ export default class ls {
16
16
  );
17
17
  }
18
18
  dt() {
19
- return { e: this.wc, pf: this.tf ? this.tf.dt() : null };
19
+ return { e: this.zc, pf: this.tf ? this.tf.dt() : null };
20
20
  }
21
21
  }
@@ -1,16 +1,16 @@
1
- import fr from "./filter.js";
2
- import { isArray as D } from "../../util/code-utils.js";
1
+ import cr from "./filter.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);
6
6
  }
7
- xc(t) {
7
+ Bc(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].xc(t)) {
13
+ if (o[r].Bc(t)) {
14
14
  s = !0;
15
15
  break;
16
16
  }
@@ -22,12 +22,12 @@ export default class is {
22
22
  return r;
23
23
  }
24
24
  static fromJson(t) {
25
- if (null == t || !D(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 = [],
29
29
  s = t[e];
30
- for (let t = 0; t < s.length; t++) o.push(fr.fromJson(s[t]));
30
+ for (let t = 0; t < s.length; t++) o.push(cr.fromJson(s[t]));
31
31
  r.push(o);
32
32
  }
33
33
  return new is(r);
@@ -42,12 +42,12 @@ export default class is {
42
42
  }
43
43
  return t;
44
44
  }
45
- static qn(t) {
45
+ static Vo(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.qn(s[t]));
50
+ for (let t = 0; t < s.length; t++) o.push(cr.Vo(s[t]));
51
51
  r.push(o);
52
52
  }
53
53
  return new is(r);