@braze/web-sdk 4.8.2 → 4.9.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 (154) hide show
  1. package/index.d.ts +121 -6
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +7 -7
  4. package/shared-lib/encoding-utils.js +4 -4
  5. package/shared-lib/event-types.js +22 -21
  6. package/shared-lib/guid.js +7 -7
  7. package/shared-lib/indexed-db-adapter.js +172 -135
  8. package/shared-lib/logger.js +26 -26
  9. package/shared-lib/supported-options.js +15 -15
  10. package/shared-lib/types.js +1 -0
  11. package/src/Card/card-manager-factory.js +1 -1
  12. package/src/Card/card-manager.js +2 -2
  13. package/src/Card/display/card-display.js +5 -4
  14. package/src/Card/models/banner.js +10 -10
  15. package/src/Card/models/captioned-image.js +7 -7
  16. package/src/Card/models/card.js +37 -36
  17. package/src/Card/models/classic-card.js +7 -7
  18. package/src/Card/models/control-card.js +3 -3
  19. package/src/Card/models/image-only.js +32 -0
  20. package/src/Card/models/index.js +1 -0
  21. package/src/Card/util/card-factory.js +16 -16
  22. package/src/ContentCards/content-cards-provider-factory.js +1 -1
  23. package/src/ContentCards/content-cards-provider.js +102 -102
  24. package/src/ContentCards/get-cached-content-cards.js +1 -1
  25. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  26. package/src/ContentCards/subscribe-to-content-cards-updates.js +4 -4
  27. package/src/ContentCards/ui/show-content-cards.js +15 -12
  28. package/src/Core/add-sdk-metadata.js +2 -2
  29. package/src/Core/braze-sdk-metadata.js +1 -1
  30. package/src/Core/change-user.js +1 -1
  31. package/src/Core/device-properties.js +1 -1
  32. package/src/Core/disable-sdk.js +10 -7
  33. package/src/Core/enable-sdk.js +5 -2
  34. package/src/Core/get-device-id.js +3 -3
  35. package/src/Core/get-user.js +1 -1
  36. package/src/Core/handle-braze-action.js +14 -14
  37. package/src/Core/is-disabled.js +1 -1
  38. package/src/Core/log-custom-event.js +4 -4
  39. package/src/Core/log-purchase.js +9 -9
  40. package/src/Core/open-session.js +10 -10
  41. package/src/FeatureFlags/feature-flag-factory.js +5 -3
  42. package/src/FeatureFlags/feature-flag.js +17 -14
  43. package/src/FeatureFlags/feature-flags-provider-factory.js +1 -1
  44. package/src/FeatureFlags/feature-flags-provider.js +56 -43
  45. package/src/FeatureFlags/get-all-feature-flags.js +2 -2
  46. package/src/FeatureFlags/get-feature-flag.js +2 -2
  47. package/src/FeatureFlags/index.js +1 -0
  48. package/src/FeatureFlags/log-feature-flag-impression.js +23 -0
  49. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
  50. package/src/Feed/feed-provider-factory.js +1 -1
  51. package/src/Feed/feed-provider.js +20 -20
  52. package/src/Feed/get-cached-feed.js +1 -1
  53. package/src/Feed/log-feed-displayed.js +1 -1
  54. package/src/Feed/request-feed-refresh.js +1 -1
  55. package/src/Feed/subscribe-to-feed-updates.js +1 -1
  56. package/src/Feed/ui/show-feed.js +13 -10
  57. package/src/InAppMessage/defer-in-app-message.js +13 -0
  58. package/src/InAppMessage/display/get-animation-effect.js +1 -1
  59. package/src/InAppMessage/display/html-message-to-html.js +47 -47
  60. package/src/InAppMessage/display/in-app-message-to-html.js +92 -91
  61. package/src/InAppMessage/display/modal-utils.js +16 -16
  62. package/src/InAppMessage/get-deferred-in-app-message.js +5 -0
  63. package/src/InAppMessage/in-app-message-factory.js +77 -57
  64. package/src/InAppMessage/in-app-message-manager-factory.js +6 -6
  65. package/src/InAppMessage/in-app-message-manager.js +121 -82
  66. package/src/InAppMessage/index.js +2 -0
  67. package/src/InAppMessage/log-in-app-message-button-click.js +17 -9
  68. package/src/InAppMessage/log-in-app-message-click.js +4 -4
  69. package/src/InAppMessage/log-in-app-message-html-click.js +6 -6
  70. package/src/InAppMessage/log-in-app-message-impression.js +3 -3
  71. package/src/InAppMessage/models/full-screen-message.js +65 -29
  72. package/src/InAppMessage/models/html-message.js +32 -13
  73. package/src/InAppMessage/models/in-app-message-button.js +7 -7
  74. package/src/InAppMessage/models/in-app-message.js +203 -134
  75. package/src/InAppMessage/models/modal-message.js +64 -29
  76. package/src/InAppMessage/models/slide-up-message.js +52 -24
  77. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  78. package/src/InAppMessage/subscribe-to-in-app-message.js +2 -2
  79. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +6 -6
  80. package/src/InAppMessage/ui/show-in-app-message.js +49 -47
  81. package/src/InAppMessage/utils/in-app-message-utils.js +1 -1
  82. package/src/Push/is-push-blocked.js +2 -2
  83. package/src/Push/is-push-permission-granted.js +2 -2
  84. package/src/Push/is-push-supported.js +2 -2
  85. package/src/Push/push-manager-factory.js +19 -19
  86. package/src/Push/push-manager.js +131 -131
  87. package/src/Push/request-push-permission.js +2 -2
  88. package/src/Push/unregister-push.js +2 -2
  89. package/src/Push/utils/push-utils.js +12 -10
  90. package/src/User/user-manager.js +4 -4
  91. package/src/User/user.js +57 -57
  92. package/src/common/base-feed.js +1 -1
  93. package/src/common/constants.js +1 -0
  94. package/src/common/event-logger.js +6 -6
  95. package/src/common/feed-display.js +34 -34
  96. package/src/common/translations.js +33 -33
  97. package/src/l10n/l10n-manager-factory.js +8 -8
  98. package/src/l10n/l10n-manager.js +6 -2
  99. package/src/l10n/types.js +1 -0
  100. package/src/managers/auth-manager.js +29 -29
  101. package/src/managers/braze-instance.js +125 -125
  102. package/src/managers/device-manager.js +20 -20
  103. package/src/managers/network-manager.js +100 -98
  104. package/src/managers/server-config-manager.js +23 -23
  105. package/src/managers/session-manager.js +5 -5
  106. package/src/managers/storage-manager-factory.js +9 -9
  107. package/src/managers/storage-manager.js +132 -129
  108. package/src/managers/subscription-manager.js +8 -8
  109. package/src/models/backend-errors.js +6 -6
  110. package/src/models/braze-event.js +11 -11
  111. package/src/models/braze-sdk-metadata.js +1 -1
  112. package/src/models/device.js +2 -2
  113. package/src/models/identifier.js +1 -1
  114. package/src/models/push-token.js +5 -5
  115. package/src/models/server-config.js +7 -7
  116. package/src/request-controller.js +191 -178
  117. package/src/triggers/models/custom-event-data.js +4 -4
  118. package/src/triggers/models/custom-event-property-data.js +7 -7
  119. package/src/triggers/models/filter-set.js +5 -5
  120. package/src/triggers/models/filter.js +64 -60
  121. package/src/triggers/models/in-app-message-click-data.js +9 -9
  122. package/src/triggers/models/purchase-data.js +4 -4
  123. package/src/triggers/models/purchase-property-data.js +6 -6
  124. package/src/triggers/models/push-click-data.js +6 -6
  125. package/src/triggers/models/trigger-condition.js +55 -59
  126. package/src/triggers/models/trigger-events.js +3 -3
  127. package/src/triggers/models/trigger.js +47 -35
  128. package/src/triggers/triggers-provider-factory.js +10 -6
  129. package/src/triggers/triggers-provider.js +203 -185
  130. package/src/triggers/types.js +1 -0
  131. package/src/ui/js/attach-css.js +5 -4
  132. package/src/ui/js/feed-css.js +5 -5
  133. package/src/ui/js/iam-css.js +5 -5
  134. package/src/ui/js/load-font-awesome.js +1 -1
  135. package/src/util/base-device-parser.js +1 -1
  136. package/src/util/braze-actions.js +35 -30
  137. package/src/util/browser-detector.js +30 -31
  138. package/src/util/client-hints-parser.js +30 -24
  139. package/src/util/code-utils.js +22 -21
  140. package/src/util/color-utils.js +19 -13
  141. package/src/util/component-utils.js +4 -4
  142. package/src/util/date-utils.js +4 -3
  143. package/src/util/device-constants.js +10 -10
  144. package/src/util/dom-utils.js +32 -28
  145. package/src/util/error-utils.js +1 -1
  146. package/src/util/key-codes.js +1 -1
  147. package/src/util/net.js +53 -57
  148. package/src/util/request-header-utils.js +34 -11
  149. package/src/util/string-utils.js +14 -14
  150. package/src/util/types.js +1 -0
  151. package/src/util/url-utils.js +1 -4
  152. package/src/util/user-agent-parser.js +39 -39
  153. package/src/util/validation-utils.js +32 -32
  154. package/src/util/window-utils.js +11 -12
@@ -1,4 +1,4 @@
1
- import jt from "./auth-manager.js";
1
+ import kt from "./auth-manager.js";
2
2
  import y from "../common/base-provider.js";
3
3
  import V from "../util/browser-detector.js";
4
4
  import Ot from "./device-manager.js";
@@ -7,7 +7,7 @@ import {
7
7
  isArray as p,
8
8
  keys as oo,
9
9
  validateValueIsFromEnum as H,
10
- values as Lt
10
+ values as Lt,
11
11
  } from "../util/code-utils.js";
12
12
  import { logDeprecationWarning as z } from "../util/deprecation-utils.js";
13
13
  import Pt from "./network-manager.js";
@@ -29,75 +29,75 @@ const L = {
29
29
  Eo: "baseUrl",
30
30
  _o: "noCookies",
31
31
  Io: "devicePropertyAllowlist",
32
- ia: "disablePushTokenMaintenance",
32
+ Aa: "disablePushTokenMaintenance",
33
33
  Ao: "enableLogging",
34
34
  So: "enableSdkAuthentication",
35
- ta: "manageServiceWorkerExternally",
35
+ qa: "manageServiceWorkerExternally",
36
36
  No: "minimumIntervalBetweenTriggerActionsInSeconds",
37
37
  wo: "sessionTimeoutInSeconds",
38
- To: "appVersion",
39
- na: "serviceWorkerLocation",
40
- ra: "safariWebsitePushId",
41
- Mn: "localization",
42
- lo: "contentSecurityNonce",
43
- Oo: "enableHtmlInAppMessages",
44
- Co: "allowUserSuppliedJavascript",
45
- mo: "inAppMessageZIndex",
46
- po: "openInAppMessagesInNewTab",
38
+ Oo: "appVersion",
39
+ _a: "serviceWorkerLocation",
40
+ ka: "safariWebsitePushId",
41
+ Ba: "localization",
42
+ po: "contentSecurityNonce",
43
+ Co: "enableHtmlInAppMessages",
44
+ Lo: "allowUserSuppliedJavascript",
45
+ lo: "inAppMessageZIndex",
46
+ fo: "openInAppMessagesInNewTab",
47
47
  tn: "openCardsInNewTab",
48
48
  en: "openNewsFeedCardsInNewTab",
49
- Lh: "requireExplicitInAppMessageDismissal",
50
- Lo: "doNotLoadFontAwesome",
51
- Po: "sdkFlavor"
49
+ mh: "requireExplicitInAppMessageDismissal",
50
+ Po: "doNotLoadFontAwesome",
51
+ Ro: "sdkFlavor",
52
52
  };
53
53
  class Wt {
54
54
  constructor() {
55
- (this.Xr = ""),
56
- (this.Ro = ""),
57
- (this.Mo = void 0),
58
- (this.jo = null),
59
- (this.Zr = null),
55
+ (this.cn = ""),
56
+ (this.Mo = ""),
57
+ (this.jo = void 0),
58
+ (this.Do = null),
59
+ (this.fn = null),
60
60
  (this.gt = null),
61
- (this.Ci = null),
61
+ (this.ki = null),
62
62
  (this.wt = null),
63
63
  (this._e = null),
64
64
  (this.u = null),
65
65
  (this.ft = null),
66
- (this.Do = ""),
67
- (this.Uo = !1),
66
+ (this.Uo = ""),
68
67
  (this.Bo = !1),
69
- (this.Wo = new E()),
68
+ (this.Wo = !1),
70
69
  (this.zo = new E()),
70
+ (this.Vo = new E()),
71
71
  (this.options = {}),
72
- (this.Vo = []),
73
72
  (this.Go = []),
74
- (this.Se = []),
75
- (this.Ro = "4.8.2");
73
+ (this.Ko = []),
74
+ (this.Ve = []),
75
+ (this.Mo = "4.9.0");
76
76
  }
77
- Ko(t) {
78
- this.Wo.lt(t);
79
- }
80
- Nh(t) {
77
+ Ho(t) {
81
78
  this.zo.lt(t);
82
79
  }
80
+ Rh(t) {
81
+ this.Vo.lt(t);
82
+ }
83
83
  initialize(t, s) {
84
- if (this.ue())
84
+ if (this.fe())
85
85
  return (
86
86
  r.j.info("Braze has already been initialized with an API key."), !0
87
87
  );
88
88
  this.options = s || {};
89
89
  let e = this.nn(L.Ao);
90
- const n = ct(Z.jn());
90
+ const n = ct(Z.Cn());
91
91
  if (
92
92
  (n && "true" === n.brazeLogging && (e = !0),
93
93
  r.j.init(e),
94
94
  r.j.info(
95
- `Initialization Options: ${JSON.stringify(this.options, null, 2)}`
95
+ `Initialization Options: ${JSON.stringify(this.options, null, 2)}`,
96
96
  ),
97
97
  null == t || "" === t || "string" != typeof t)
98
98
  )
99
99
  return r.j.error("Braze requires a valid API key to be initialized."), !1;
100
- this.Xr = t;
100
+ this.cn = t;
101
101
  let o = this.nn(L.Eo);
102
102
  if (null == o || "" === o || "string" != typeof o)
103
103
  return r.j.error("Braze requires a valid baseUrl to be initialized."), !1;
@@ -107,34 +107,34 @@ class Wt {
107
107
  ((o = document.createElement("a")),
108
108
  (o.href = h),
109
109
  "/" === o.pathname && (o = `${o}api/v3`),
110
- (this.Do = o.toString()),
111
- V.Ho && !this.nn(L.ho))
110
+ (this.Uo = o.toString()),
111
+ V.$o && !this.nn(L.ho))
112
112
  )
113
113
  return (
114
114
  r.j.info("Ignoring activity from crawler bot " + navigator.userAgent),
115
- (this.Bo = !0),
115
+ (this.Wo = !0),
116
116
  !1
117
117
  );
118
118
  const a = this.nn(L._o) || !1;
119
119
  if (
120
- ((this.u = Bt.$o(t, a)), a && this.u.qo(t), new O.ee(null, !0).wr(i.ne))
120
+ ((this.u = Bt.qo(t, a)), a && this.u.xo(t), new O.ee(null, !0).jr(i.re))
121
121
  )
122
122
  return (
123
123
  r.j.info("Ignoring all activity due to previous opt out"),
124
- (this.Bo = !0),
124
+ (this.Wo = !0),
125
125
  !1
126
126
  );
127
127
  for (const t of oo(this.options))
128
- -1 === Lt(r.xo).indexOf(t) &&
128
+ -1 === Lt(r.Jo).indexOf(t) &&
129
129
  r.j.warn(`Ignoring unknown initialization option '${t}'.`);
130
130
  const l = ["mparticle", "wordpress", "tealium"];
131
- if (null != this.nn(L.Po)) {
132
- const t = this.nn(L.Po);
131
+ if (null != this.nn(L.Ro)) {
132
+ const t = this.nn(L.Ro);
133
133
  -1 !== l.indexOf(t)
134
- ? (this.Mo = t)
134
+ ? (this.jo = t)
135
135
  : r.j.error("Invalid sdk flavor passed: " + t);
136
136
  }
137
- let u = this.nn(r.xo.Io);
137
+ let u = this.nn(r.Jo.Io);
138
138
  if (null != u)
139
139
  if (p(u)) {
140
140
  const t = [];
@@ -143,125 +143,125 @@ class Wt {
143
143
  DeviceProperties,
144
144
  u[i],
145
145
  "devicePropertyAllowlist contained an invalid value.",
146
- "DeviceProperties"
146
+ "DeviceProperties",
147
147
  ) && t.push(u[i]);
148
148
  u = t;
149
149
  } else
150
150
  r.j.error(
151
- "devicePropertyAllowlist must be an array. Defaulting to all properties."
151
+ "devicePropertyAllowlist must be an array. Defaulting to all properties.",
152
152
  ),
153
153
  (u = null);
154
- (this.Zr = new Ot(this.u, u)),
154
+ (this.fn = new Ot(this.u, u)),
155
155
  (this.wt = new Mt(this.u)),
156
156
  (this.ft = new bt(this.wt, this.u)),
157
157
  (this._e = new Dt(this.u, this.ft, this.wt, this.nn(L.wo)));
158
158
  const f = new E();
159
159
  return (
160
- (this.jo = new jt(this.u, this.nn(L.So), f)),
160
+ (this.Do = new kt(this.u, this.nn(L.So), f)),
161
161
  this.jt(f),
162
162
  (this.gt = new Pt(
163
- this.Zr,
163
+ this.fn,
164
164
  this.u,
165
- this.jo,
165
+ this.Do,
166
166
  this.ft,
167
167
  this._e,
168
168
  this.wt,
169
- this.Xr,
170
- this.Do,
171
- this.Ro,
172
- this.Mo || "",
173
- this.nn(L.To)
169
+ this.cn,
170
+ this.Uo,
171
+ this.Mo,
172
+ this.jo || "",
173
+ this.nn(L.Oo),
174
174
  )),
175
- (this.Ci = new Rt(
176
- this.Xr,
177
- this.Do,
175
+ (this.ki = new Rt(
176
+ this.cn,
177
+ this.Uo,
178
178
  this._e,
179
- this.Zr,
179
+ this.fn,
180
180
  this.ft,
181
181
  this.wt,
182
182
  this.u,
183
- t => {
184
- if (this.ue()) for (const i of this.gr()) i.Ts(t);
183
+ (t) => {
184
+ if (this.fe()) for (const i of this.gr()) i.Ts(t);
185
185
  },
186
- this.jo,
187
- this.gt
186
+ this.Do,
187
+ this.gt,
188
188
  )),
189
- this.Ci.initialize(),
189
+ this.ki.initialize(),
190
190
  r.j.info(
191
191
  `Initialized for the Braze backend at "${this.nn(
192
- L.Eo
193
- )}" with API key "${this.Xr}".`
192
+ L.Eo,
193
+ )}" with API key "${this.cn}".`,
194
194
  ),
195
- null != this.nn(L.Oo) &&
195
+ null != this.nn(L.Co) &&
196
196
  z(
197
197
  "enableHtmlInAppMessages",
198
198
  "initialization option",
199
- "allowUserSuppliedJavascript"
199
+ "allowUserSuppliedJavascript",
200
200
  ),
201
- et.init(),
202
- this.wt.Ni(() => {
203
- this.Uo &&
201
+ et.o(),
202
+ this.wt.Ci(() => {
203
+ this.Bo &&
204
204
  this.wt &&
205
- this.wt.bi() &&
206
- import("../FeatureFlags/refresh-feature-flags.js").then(t => {
207
- if (!this.Uo) return;
205
+ this.wt.vi() &&
206
+ import("../FeatureFlags/refresh-feature-flags.js").then((t) => {
207
+ if (!this.Bo) return;
208
208
  (0, t.default)();
209
209
  });
210
210
  }),
211
- this.Ci.pr(() => {
212
- this.Uo &&
211
+ this.ki.pr(() => {
212
+ this.Bo &&
213
213
  this.wt &&
214
- this.wt.bi() &&
215
- import("../FeatureFlags/refresh-feature-flags.js").then(t => {
216
- if (!this.Uo) return;
214
+ this.wt.vi() &&
215
+ import("../FeatureFlags/refresh-feature-flags.js").then((t) => {
216
+ if (!this.Bo) return;
217
217
  (0, t.default)(void 0, void 0, !0);
218
218
  });
219
219
  }),
220
- this.Wo.Et(this.options),
221
- (this.Uo = !0),
220
+ this.zo.Et(this.options),
221
+ (this.Bo = !0),
222
222
  !0
223
223
  );
224
224
  }
225
225
  destroy(t) {
226
- if ((r.j.destroy(), this.ue())) {
227
- this.zo.Et(), this.zo.removeAllSubscriptions();
228
- for (const t of this.Vo) t.destroy();
229
- this.Vo = [];
230
- for (const t of this.Go) t.clearData(!1);
231
- (this.Go = []),
226
+ if ((r.j.destroy(), this.fe())) {
227
+ this.Vo.Et(), this.Vo.removeAllSubscriptions();
228
+ for (const t of this.Go) t.destroy();
229
+ this.Go = [];
230
+ for (const t of this.Ko) t.clearData(!1);
231
+ (this.Ko = []),
232
232
  this.removeAllSubscriptions(),
233
- (this.Se = []),
234
- null != this.Ci && this.Ci.destroy(),
235
- (this.Ci = null),
236
- (this.jo = null),
237
- (this.Zr = null),
233
+ (this.Ve = []),
234
+ null != this.ki && this.ki.destroy(),
235
+ (this.ki = null),
236
+ (this.Do = null),
237
+ (this.fn = null),
238
238
  (this.gt = null),
239
239
  (this.wt = null),
240
240
  (this._e = null),
241
241
  (this.ft = null),
242
242
  (this.options = {}),
243
- (this.Mo = void 0),
244
- (this.Uo = !1),
243
+ (this.jo = void 0),
245
244
  (this.Bo = !1),
245
+ (this.Wo = !1),
246
246
  t && (this.u = null);
247
247
  }
248
248
  }
249
249
  rr() {
250
- if (this.Jo()) return !1;
251
- if (!this.ue()) throw new Error(P);
250
+ if (this.Yo()) return !1;
251
+ if (!this.fe()) throw new Error(P);
252
252
  return !0;
253
253
  }
254
- ea() {
255
- return this.Xr;
254
+ Ma() {
255
+ return this.cn;
256
256
  }
257
257
  Sr() {
258
- return this.jo;
259
- }
260
- Zs() {
261
258
  return this.Do;
262
259
  }
263
- ie() {
264
- return this.Zr;
260
+ Ys() {
261
+ return this.Uo;
262
+ }
263
+ te() {
264
+ return this.fn;
265
265
  }
266
266
  ar() {
267
267
  return this.gt;
@@ -270,10 +270,10 @@ class Wt {
270
270
  return this.options[t];
271
271
  }
272
272
  gr() {
273
- return this.Go;
273
+ return this.Ko;
274
274
  }
275
275
  cr() {
276
- return this.Ci;
276
+ return this.ki;
277
277
  }
278
278
  tr() {
279
279
  return this.wt;
@@ -284,45 +284,45 @@ class Wt {
284
284
  l() {
285
285
  return this.u;
286
286
  }
287
- jr() {
288
- if (this.ft && this.Ci) return new User(this.ft, this.Ci);
287
+ br() {
288
+ if (this.ft && this.ki) return new User(this.ft, this.ki);
289
289
  }
290
290
  ir() {
291
291
  return this.ft;
292
292
  }
293
293
  nr() {
294
- return !0 === this.nn(L.Co) || !0 === this.nn(L.Oo);
294
+ return !0 === this.nn(L.Lo) || !0 === this.nn(L.Co);
295
295
  }
296
296
  g(t) {
297
297
  let i = !1;
298
- for (const s of this.Vo) s === t && (i = !0);
299
- i || this.Vo.push(t);
298
+ for (const s of this.Go) s === t && (i = !0);
299
+ i || this.Go.push(t);
300
300
  }
301
301
  dr(t) {
302
302
  let i = !1;
303
- for (const s of this.Go) s.constructor === t.constructor && (i = !0);
304
- t instanceof y && !i && this.Go.push(t);
303
+ for (const s of this.Ko) s.constructor === t.constructor && (i = !0);
304
+ t instanceof y && !i && this.Ko.push(t);
305
305
  }
306
306
  jt(t) {
307
- t instanceof E && this.Se.push(t);
307
+ t instanceof E && this.Ve.push(t);
308
308
  }
309
309
  removeAllSubscriptions() {
310
- if (this.rr()) for (const t of this.Se) t.removeAllSubscriptions();
310
+ if (this.rr()) for (const t of this.Ve) t.removeAllSubscriptions();
311
311
  }
312
312
  removeSubscription(t) {
313
- if (this.rr()) for (const i of this.Se) i.removeSubscription(t);
313
+ if (this.rr()) for (const i of this.Ve) i.removeSubscription(t);
314
314
  }
315
- ae(t) {
316
- this.Bo = t;
315
+ ne(t) {
316
+ this.Wo = t;
317
317
  }
318
- ue() {
319
- return this.Uo;
320
- }
321
- Jo() {
318
+ fe() {
322
319
  return this.Bo;
323
320
  }
324
- Us() {
325
- return this.Ro;
321
+ Yo() {
322
+ return this.Wo;
323
+ }
324
+ ks() {
325
+ return this.Mo;
326
326
  }
327
327
  }
328
328
  const e = new Wt();
@@ -14,42 +14,42 @@ export default class Ot {
14
14
  null == e && (e = Lt(DeviceProperties)),
15
15
  (this.Qo = e);
16
16
  }
17
- te() {
18
- let t = this.u.tu(i.eu.Xo);
19
- null == t && ((t = new _t(r.Z.Y())), this.u.uu(i.eu.Xo, t));
20
- const e = new xt(t.iu);
17
+ ce(t = !0) {
18
+ let e = this.u.tu(i.eu.Xo);
19
+ null == e && ((e = new _t(r.Z.Y())), t && this.u.uu(i.eu.Xo, e));
20
+ const s = new xt(e.iu);
21
21
  for (let t = 0; t < this.Qo.length; t++) {
22
22
  switch (this.Qo[t]) {
23
23
  case DeviceProperties.BROWSER:
24
- e.browser = V.browser;
24
+ s.browser = V.browser;
25
25
  break;
26
26
  case DeviceProperties.BROWSER_VERSION:
27
- e.Yo = V.version;
27
+ s.Zo = V.version;
28
28
  break;
29
29
  case DeviceProperties.OS:
30
- e.os = this.Zo();
30
+ s.os = this.Ia();
31
31
  break;
32
32
  case DeviceProperties.RESOLUTION:
33
- e.sa = screen.width + "x" + screen.height;
33
+ s.Ta = screen.width + "x" + screen.height;
34
34
  break;
35
35
  case DeviceProperties.LANGUAGE:
36
- e.language = V.language;
36
+ s.language = V.language;
37
37
  break;
38
38
  case DeviceProperties.TIME_ZONE:
39
- e.timeZone = this.oa(new Date());
39
+ s.timeZone = this.Da(new Date());
40
40
  break;
41
41
  case DeviceProperties.USER_AGENT:
42
- e.userAgent = V.userAgent;
42
+ s.userAgent = V.userAgent;
43
43
  }
44
44
  }
45
- return e;
45
+ return s;
46
46
  }
47
- Zo() {
48
- if (V.ca()) return V.ca();
49
- const t = this.u.v(i.k.la);
50
- return t && t.os_version ? t.os_version : V.Zo();
47
+ Ia() {
48
+ if (V.Oa()) return V.Oa();
49
+ const t = this.u.v(i.k.Ca);
50
+ return t && t.os_version ? t.os_version : V.Ia();
51
51
  }
52
- oa(t) {
52
+ Da(t) {
53
53
  let e = !1;
54
54
  if ("undefined" != typeof Intl && "function" == typeof Intl.DateTimeFormat)
55
55
  try {
@@ -60,15 +60,15 @@ export default class Ot {
60
60
  } catch (t) {
61
61
  r.j.info(
62
62
  "Intl.DateTimeFormat threw an error, cannot detect user's time zone:" +
63
- ei(t)
63
+ ei(t),
64
64
  ),
65
65
  (e = !0);
66
66
  }
67
67
  if (e) return "";
68
68
  const s = t.getTimezoneOffset();
69
- return this.fa(s);
69
+ return this.Fa(s);
70
70
  }
71
- fa(t) {
71
+ Fa(t) {
72
72
  const e = Math.trunc(t / 60),
73
73
  r = Math.trunc(t % 60);
74
74
  let s = "GMT";