@braze/web-sdk 6.12.0 → 6.13.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 (149) hide show
  1. package/index.d.ts +240 -3
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +18 -18
  4. package/shared-lib/indexed-db-adapter.js +58 -58
  5. package/shared-lib/logger.js +7 -7
  6. package/shared-lib/supported-options.js +25 -24
  7. package/src/ConversationalChat/automatically-manage-chat.js +5 -0
  8. package/src/ConversationalChat/chat-message-factory.js +25 -0
  9. package/src/ConversationalChat/chat-message.js +33 -0
  10. package/src/ConversationalChat/constants.js +1 -0
  11. package/src/ConversationalChat/conversational-chat-provider-factory.js +26 -0
  12. package/src/ConversationalChat/conversational-chat-provider.js +372 -0
  13. package/src/ConversationalChat/display/chat-widget-manager.js +113 -0
  14. package/src/ConversationalChat/display/chat-widget-to-html.js +58 -0
  15. package/src/ConversationalChat/get-chat-messages.js +7 -0
  16. package/src/ConversationalChat/index.js +12 -0
  17. package/src/ConversationalChat/is-chat-conversation-ended.js +7 -0
  18. package/src/ConversationalChat/is-chat-turn-errored.js +7 -0
  19. package/src/ConversationalChat/is-chat-turn-in-progress.js +7 -0
  20. package/src/ConversationalChat/register-chat-action-handler.js +10 -0
  21. package/src/ConversationalChat/reset-chat-conversation.js +5 -0
  22. package/src/ConversationalChat/retrieve-chat-config.js +7 -0
  23. package/src/ConversationalChat/send-chat-message.js +17 -0
  24. package/src/ConversationalChat/subscribe-to-chat-action.js +5 -0
  25. package/src/ConversationalChat/subscribe-to-chat-conversation-updated.js +5 -0
  26. package/src/ConversationalChat/subscribe-to-chat-message-received.js +5 -0
  27. package/src/ConversationalChat/trigger-chat-action.js +11 -0
  28. package/src/ConversationalChat/types.js +1 -0
  29. package/src/Core/add-sdk-metadata.js +5 -5
  30. package/src/Core/change-user.js +6 -6
  31. package/src/Core/disable-sdk.js +6 -6
  32. package/src/Core/enable-sdk.js +3 -3
  33. package/src/Core/get-device-id.js +2 -2
  34. package/src/Core/handle-braze-action.js +20 -13
  35. package/src/Core/is-disabled.js +1 -1
  36. package/src/Core/is-initialized.js +1 -1
  37. package/src/Core/log-custom-event.js +9 -9
  38. package/src/Core/log-ecommerce-event.js +4 -4
  39. package/src/Core/log-purchase.js +14 -14
  40. package/src/Core/open-session.js +8 -8
  41. package/src/Core/set-sdk-authentication-signature.js +3 -3
  42. package/src/Core/subscribe-to-sdk-authentication-failures.js +1 -1
  43. package/src/Core/wipe-data.js +1 -1
  44. package/src/DUST/dust-config-store.js +35 -35
  45. package/src/DUST/dust-message-dedup.js +3 -3
  46. package/src/DUST/dust-provider-factory.js +10 -10
  47. package/src/DUST/dust-provider.js +234 -234
  48. package/src/DUST/subscribe-to-dust.js +7 -7
  49. package/src/FeatureFlags/feature-flag-factory.js +2 -2
  50. package/src/FeatureFlags/feature-flag.js +4 -4
  51. package/src/FeatureFlags/feature-flags-provider-factory.js +11 -11
  52. package/src/FeatureFlags/feature-flags-provider.js +38 -38
  53. package/src/FeatureFlags/get-all-feature-flags.js +3 -3
  54. package/src/FeatureFlags/get-feature-flag.js +3 -3
  55. package/src/FeatureFlags/log-feature-flag-impression.js +4 -4
  56. package/src/FeatureFlags/refresh-feature-flags.js +5 -5
  57. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +3 -3
  58. package/src/InAppMessage/defer-in-app-message.js +1 -1
  59. package/src/InAppMessage/display/html-message-display-utils.js +4 -4
  60. package/src/InAppMessage/display/html-message-to-html.js +13 -13
  61. package/src/InAppMessage/display/in-app-message-to-html.js +20 -20
  62. package/src/InAppMessage/display/modal-utils.js +7 -7
  63. package/src/InAppMessage/in-app-message-factory.js +6 -6
  64. package/src/InAppMessage/in-app-message-manager.js +92 -92
  65. package/src/InAppMessage/log-in-app-message-button-click.js +9 -9
  66. package/src/InAppMessage/log-in-app-message-click.js +7 -7
  67. package/src/InAppMessage/log-in-app-message-html-click.js +6 -6
  68. package/src/InAppMessage/log-in-app-message-impression.js +3 -3
  69. package/src/InAppMessage/models/full-screen-message.js +39 -39
  70. package/src/InAppMessage/models/html-message.js +20 -20
  71. package/src/InAppMessage/models/in-app-message-button.js +2 -2
  72. package/src/InAppMessage/models/in-app-message.js +102 -102
  73. package/src/InAppMessage/models/modal-message.js +38 -38
  74. package/src/InAppMessage/models/slide-up-message.js +34 -34
  75. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  76. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  77. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  78. package/src/InAppMessage/ui/remove-all-visible-in-app-messages.js +3 -3
  79. package/src/InAppMessage/ui/show-in-app-message.js +27 -24
  80. package/src/Push/is-push-blocked.js +2 -2
  81. package/src/Push/is-push-permission-granted.js +2 -2
  82. package/src/Push/is-push-supported.js +2 -2
  83. package/src/Push/push-manager-factory.js +15 -15
  84. package/src/Push/push-manager.js +13 -13
  85. package/src/Push/register-push.js +2 -2
  86. package/src/Push/request-push-permission.js +2 -2
  87. package/src/Push/unregister-push-token-on-server.js +3 -3
  88. package/src/Push/unregister-push.js +3 -3
  89. package/src/Push/utils/push-utils.js +15 -15
  90. package/src/User/user-manager.js +9 -9
  91. package/src/User/user.js +50 -50
  92. package/src/common/constants.js +1 -1
  93. package/src/common/content-cards-display.js +22 -22
  94. package/src/common/event-logger.js +3 -3
  95. package/src/index.js +2 -9
  96. package/src/l10n/l10n-manager-factory.js +4 -4
  97. package/src/l10n/l10n-manager.js +6 -6
  98. package/src/managers/auth-manager.js +28 -28
  99. package/src/managers/braze-action-manager.js +14 -0
  100. package/src/managers/braze-instance.js +159 -151
  101. package/src/managers/device-manager.js +26 -26
  102. package/src/managers/network-manager.js +120 -120
  103. package/src/managers/server-config-manager.js +95 -86
  104. package/src/managers/session-manager.js +25 -25
  105. package/src/managers/storage-manager-factory.js +12 -12
  106. package/src/managers/storage-manager.js +129 -124
  107. package/src/managers/subscription-manager.js +8 -8
  108. package/src/models/backend-errors.js +5 -5
  109. package/src/models/braze-event.js +5 -5
  110. package/src/models/device.js +2 -2
  111. package/src/models/identifier.js +8 -8
  112. package/src/models/push-token.js +6 -6
  113. package/src/models/request-result.js +2 -2
  114. package/src/models/server-config.js +27 -27
  115. package/src/request-controller.js +117 -117
  116. package/src/standard-index.js +9 -0
  117. package/src/triggers/models/custom-event-data.js +4 -4
  118. package/src/triggers/models/custom-event-property-data.js +5 -5
  119. package/src/triggers/models/filter-set.js +5 -5
  120. package/src/triggers/models/filter.js +31 -31
  121. package/src/triggers/models/in-app-message-click-data.js +9 -9
  122. package/src/triggers/models/purchase-data.js +1 -1
  123. package/src/triggers/models/purchase-property-data.js +5 -5
  124. package/src/triggers/models/push-click-data.js +4 -4
  125. package/src/triggers/models/trigger-condition.js +35 -35
  126. package/src/triggers/models/trigger-events.js +3 -3
  127. package/src/triggers/models/trigger.js +36 -36
  128. package/src/triggers/triggers-provider-factory.js +5 -5
  129. package/src/triggers/triggers-provider.js +128 -128
  130. package/src/types.js +2 -2
  131. package/src/ui/js/attach-css.js +1 -1
  132. package/src/ui/js/chat-widget-css.js +11 -0
  133. package/src/ui/js/load-font-awesome.js +1 -1
  134. package/src/util/base-device-parser.js +7 -7
  135. package/src/util/braze-actions.js +5 -5
  136. package/src/util/browser-detector.js +41 -41
  137. package/src/util/client-hints-parser.js +10 -10
  138. package/src/util/component-utils.js +1 -1
  139. package/src/util/date-utils.js +2 -2
  140. package/src/util/device-constants.js +5 -5
  141. package/src/util/dom-utils.js +8 -8
  142. package/src/util/ecommerce-event-validation.js +13 -13
  143. package/src/util/html-display-utils.js +6 -6
  144. package/src/util/key-codes.js +1 -1
  145. package/src/util/net.js +82 -44
  146. package/src/util/request-header-utils.js +26 -24
  147. package/src/util/user-agent-parser.js +21 -21
  148. package/src/util/validation-utils.js +29 -21
  149. package/src/util/window-utils.js +3 -3
@@ -4,21 +4,21 @@ export default class ui {
4
4
  (this.endpoint = t),
5
5
  (this.Uu = i),
6
6
  (this.publicKey = s),
7
- (this.sc = l),
8
- (this.ld = h),
7
+ (this.zd = l),
8
+ (this.Td = h),
9
9
  (this.endpoint = t || null),
10
10
  (this.Uu = i || null),
11
11
  (this.publicKey = s || null),
12
- (this.sc = l || null),
13
- (this.ld = h || null);
12
+ (this.zd = l || null),
13
+ (this.Td = h || null);
14
14
  }
15
15
  qt() {
16
16
  return {
17
17
  e: this.endpoint,
18
18
  c: this.Uu,
19
19
  p: this.publicKey,
20
- u: this.sc,
21
- v: this.ld,
20
+ u: this.zd,
21
+ v: this.Td,
22
22
  };
23
23
  }
24
24
  static _u(t) {
@@ -1,8 +1,8 @@
1
1
  export default class L {
2
2
  constructor(t = !1, s = []) {
3
- (this.lt = t), (this.Ce = s), (this.lt = t), (this.Ce = s);
3
+ (this.lt = t), (this.Ne = s), (this.lt = t), (this.Ne = s);
4
4
  }
5
5
  Cs(t) {
6
- (this.lt = this.lt && t.lt), this.Ce.push(...t.Ce);
6
+ (this.lt = this.lt && t.lt), this.Ne.push(...t.Ne);
7
7
  }
8
8
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
- GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as _i,
3
- GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as bi,
2
+ GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT as bi,
3
+ GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT as Vi,
4
4
  } from "../common/constants.js";
5
5
  export default class vi {
6
6
  constructor(
@@ -12,51 +12,51 @@ export default class vi {
12
12
  e = null,
13
13
  r = { enabled: !1 },
14
14
  n = { enabled: !1, refresh_rate_limit: void 0 },
15
- a = { enabled: !0, capacity: _i, refill_rate: bi, endpoint_overrides: {} },
15
+ a = { enabled: !0, capacity: bi, refill_rate: Vi, endpoint_overrides: {} },
16
16
  o = null,
17
17
  u = null,
18
18
  c = null,
19
19
  d = null,
20
20
  m = null,
21
21
  ) {
22
- (this.ed = t),
23
- (this.vd = i),
24
- (this.md = s),
25
- (this.gd = h),
26
- (this.fd = l),
27
- (this.ld = e),
28
- (this.ud = r),
22
+ (this.Ed = t),
23
+ (this.Sd = i),
24
+ (this.Fd = s),
25
+ (this.Ld = h),
26
+ (this.kd = l),
27
+ (this.Td = e),
28
+ (this.yd = r),
29
29
  (this.Rr = n),
30
- (this.nd = a),
30
+ (this.Bd = a),
31
31
  (this.banners = o),
32
32
  (this.dust = u),
33
- (this.Cd = c),
34
- (this.wd = d),
35
- (this.ad = m);
33
+ (this.xd = c),
34
+ (this.Gd = d),
35
+ (this.Md = m);
36
36
  }
37
37
  qt() {
38
38
  return {
39
- s: "6.12.0",
40
- l: this.ed,
41
- e: this.vd,
42
- a: this.md,
43
- p: this.gd,
44
- m: this.fd,
45
- v: this.ld,
46
- c: this.ud,
39
+ s: "6.13.0",
40
+ l: this.Ed,
41
+ e: this.Sd,
42
+ a: this.Fd,
43
+ p: this.Ld,
44
+ m: this.kd,
45
+ v: this.Td,
46
+ c: this.yd,
47
47
  f: this.Rr,
48
- grl: this.nd,
48
+ grl: this.Bd,
49
49
  b: this.banners,
50
50
  d: this.dust,
51
- rb: this.Cd,
52
- mst: this.wd,
53
- ch: this.ad,
51
+ rb: this.xd,
52
+ mst: this.Gd,
53
+ ch: this.Md,
54
54
  };
55
55
  }
56
56
  static _u(t) {
57
57
  let i = t.l;
58
58
  return (
59
- "6.12.0" !== t.s && (i = 0),
59
+ "6.13.0" !== t.s && (i = 0),
60
60
  new vi(
61
61
  i,
62
62
  t.e,
@@ -5,16 +5,16 @@ import {
5
5
  logger as b,
6
6
  } from "../shared-lib/index.js";
7
7
  import v from "./common/event-logger.js";
8
- import { removeAllVisibleInAppMessages as gi } from "./InAppMessage/ui/remove-all-visible-in-app-messages.js";
8
+ import { removeAllVisibleInAppMessages as wi } from "./InAppMessage/ui/remove-all-visible-in-app-messages.js";
9
9
  import { STORAGE_KEYS as s } from "./managers/storage-manager.js";
10
10
  import f from "./managers/subscription-manager.js";
11
11
  import ve from "./models/braze-event.js";
12
12
  import L from "./models/request-result.js";
13
- import Dt from "./Push/utils/push-utils.js";
13
+ import _t from "./Push/utils/push-utils.js";
14
14
  import { randomInclusive as a } from "./util/math.js";
15
15
  import l from "./util/net.js";
16
16
  import h from "./util/request-header-utils.js";
17
- export default class Zt {
17
+ export default class pi {
18
18
  constructor(t, i, s, e, h, o, n, r, l, u) {
19
19
  (this.eu = t),
20
20
  (this.baseUrl = i),
@@ -23,50 +23,50 @@ export default class Zt {
23
23
  (this.Ss = h),
24
24
  (this.h = o),
25
25
  (this.j = n),
26
- (this.hc = r),
27
- (this.Gh = l),
26
+ (this.Ad = r),
27
+ (this.Cl = l),
28
28
  (this.B = u),
29
29
  (this.eu = t),
30
30
  (this.baseUrl = i),
31
- (this.nc = 0),
32
- (this.fS = n.bS() || 0),
33
- (this.lc = null),
31
+ (this.$d = 0),
32
+ (this.fS = n.dS() || 0),
33
+ (this.Id = null),
34
34
  (this.C = s),
35
35
  (this.tu = e),
36
36
  (this.Ss = h),
37
37
  (this.h = o),
38
38
  (this.j = n),
39
- (this.Gh = l),
39
+ (this.Cl = l),
40
40
  (this.B = u),
41
- (this.hc = r),
42
- (this.uc = new f()),
43
- (this.cc = null),
44
- (this.dc = 50),
45
- (this.mc = !1),
46
- (this.fc = !1);
41
+ (this.Ad = r),
42
+ (this.Pd = new f()),
43
+ (this.Od = null),
44
+ (this.Ud = 50),
45
+ (this._d = !1),
46
+ (this.Jd = !1);
47
47
  }
48
- gc(t, i) {
49
- return !t && !i && this.Gh.Ih() >= this.dc;
48
+ Kd(t, i) {
49
+ return !t && !i && this.Cl.bc() >= this.Ud;
50
50
  }
51
- vc(t) {
52
- let i = this.C.am();
51
+ Wd(t) {
52
+ let i = this.C.dm();
53
53
  if (t.length > 0) {
54
54
  const s = this.Ss.getUserId();
55
55
  for (const e of t) {
56
56
  const t = (!e.userId && !s) || e.userId === s;
57
- e.type === p.wm && t && (i = !0);
57
+ e.type === p.Sm && t && (i = !0);
58
58
  }
59
59
  }
60
60
  return i;
61
61
  }
62
- bc(t = !1, i = !0, e, o, n, r = !1, u = !1, c = "sdk") {
63
- i && this.wc();
64
- const d = this.j.gS(),
65
- m = this.j.IS();
62
+ Xd(t = !1, i = !0, e, o, n, r = !1, u = !1, c = "sdk") {
63
+ i && this.Hd();
64
+ const d = this.j.RS(),
65
+ m = this.j.bS();
66
66
  let f = !1;
67
67
  const g = (t, r, u = -1) => {
68
68
  const c = new Date().valueOf();
69
- h.nt(this.j, h.it.Cn, c),
69
+ h.nt(this.j, h.it.Jh, c),
70
70
  -1 !== u && r.push(["X-Braze-Req-Tokens-Remaining", u.toString()]);
71
71
  let d = !1;
72
72
  l.ot({
@@ -76,18 +76,18 @@ export default class Zt {
76
76
  lt: (i) => {
77
77
  null != t.respond_with &&
78
78
  t.respond_with.triggers &&
79
- (this.nc = Math.max(this.nc - 1, 0)),
79
+ (this.$d = Math.max(this.$d - 1, 0)),
80
80
  this.B.ut(t, i, r)
81
- ? (this.Gh.ct(),
82
- this.h.sd(i),
81
+ ? (this.Cl.ct(),
82
+ this.h.wd(i),
83
83
  (null != t.respond_with &&
84
84
  t.respond_with.user_id != this.Ss.getUserId()) ||
85
- (null != t.device && this.j.Pt(s.It.Aa, t.device),
85
+ (null != t.device && this.j.Pt(s.It.Mc, t.device),
86
86
  null != t.sdk_metadata &&
87
- (this.j.Pt(s.It.Ka, t.sdk_metadata),
88
- this.j.Pt(s.It.Pa, this.C.$t())),
89
- this.hc(i),
90
- h.ql(this.j, h.it.Cn, 1),
87
+ (this.j.Pt(s.It.Hl, t.sdk_metadata),
88
+ this.j.Pt(s.It.Yl, this.C.$t())),
89
+ this.Ad(i),
90
+ h.$c(this.j, h.it.Jh, 1),
91
91
  "function" == typeof e && e()))
92
92
  : i.auth_error && (d = !0);
93
93
  },
@@ -95,13 +95,13 @@ export default class Zt {
95
95
  (d = !0),
96
96
  null != t.respond_with &&
97
97
  t.respond_with.triggers &&
98
- (this.nc = Math.max(this.nc - 1, 0)),
99
- this.B.Ua(t.events, t.attributes),
98
+ (this.$d = Math.max(this.$d - 1, 0)),
99
+ this.B.Jl(t.events, t.attributes),
100
100
  "function" == typeof o && o();
101
101
  },
102
102
  ft: (t, s) => {
103
103
  "function" == typeof n && n(!d);
104
- const e = this.B.Bl(s);
104
+ const e = this.B.Hc(s);
105
105
  let o = 0;
106
106
  if (e)
107
107
  switch (e.type) {
@@ -113,98 +113,98 @@ export default class Zt {
113
113
  }
114
114
  if (i && !f) {
115
115
  if (d) {
116
- h.Sl(this.j, h.it.Cn);
116
+ h.Oc(this.j, h.it.Jh);
117
117
  const t = this.h.vt(),
118
118
  i = this.h.gt(),
119
119
  s = this.h.bt();
120
- let e = this.lc;
120
+ let e = this.Id;
121
121
  (null == e || e < t) && (e = t);
122
122
  const n = Math.min(s, a(t, e * i)) + o;
123
- this.kc(n);
124
- } else this.kc(Math.max(1e3 * this.fS, o));
123
+ this.Qd(n);
124
+ } else this.Qd(Math.max(1e3 * this.fS, o));
125
125
  f = !0;
126
126
  }
127
127
  },
128
128
  });
129
129
  },
130
- p = this.vc(d),
130
+ p = this.Wd(d),
131
131
  v = t || p;
132
- if (this.gc(r, p))
132
+ if (this.Kd(r, p))
133
133
  return void b.info(
134
134
  "Declining to flush data due to 50 consecutive authentication failures",
135
135
  );
136
- if (i && !this.B.Za(d, m, v))
137
- return this.kc(), void ("function" == typeof n && n(!0));
138
- const w = this.B.dl(v, d, m, u, c);
139
- v && this.nc++;
136
+ if (i && !this.B.Dc(d, m, v))
137
+ return this.Qd(), void ("function" == typeof n && n(!0));
138
+ const w = this.B.yc(v, d, m, u, c);
139
+ v && this.$d++;
140
140
  let k = !1;
141
141
  if (w)
142
142
  for (const t of w)
143
143
  this.B.et(
144
144
  t.requestData,
145
145
  (i) => g(t.requestData, t.headers, i),
146
- h.it.Cn,
146
+ h.it.Jh,
147
147
  o,
148
148
  ),
149
149
  (k = !0);
150
- this.Gh.Fh() && i && !k
151
- ? this.kc()
150
+ this.Cl.hc() && i && !k
151
+ ? this.Qd()
152
152
  : p &&
153
153
  (b.info("Invoking new session subscriptions"),
154
- this.uc.A(),
155
- (this.fc = !0));
154
+ this.Pd.A(),
155
+ (this.Jd = !0));
156
156
  }
157
- yc() {
158
- return this.nc > 0;
157
+ Vd() {
158
+ return this.$d > 0;
159
159
  }
160
- kc(t = 1e3 * this.fS) {
161
- this.mc ||
162
- (this.wc(),
163
- (this.cc = window.setTimeout(() => {
160
+ Qd(t = 1e3 * this.fS) {
161
+ this._d ||
162
+ (this.Hd(),
163
+ (this.Od = window.setTimeout(() => {
164
164
  if (document.hidden) {
165
165
  const t = "visibilitychange",
166
166
  i = () => {
167
167
  document.hidden ||
168
- (document.removeEventListener(t, i, !1), this.bc());
168
+ (document.removeEventListener(t, i, !1), this.Xd());
169
169
  };
170
170
  document.addEventListener(t, i, !1);
171
- } else this.bc();
171
+ } else this.Xd();
172
172
  }, t)),
173
- (this.lc = t));
173
+ (this.Id = t));
174
174
  }
175
- wc() {
176
- null != this.cc && (clearTimeout(this.cc), (this.cc = null));
175
+ Hd() {
176
+ null != this.Od && (clearTimeout(this.Od), (this.Od = null));
177
177
  }
178
178
  initialize() {
179
- (this.mc = !1), this.kc();
179
+ (this._d = !1), this.Qd();
180
180
  }
181
181
  destroy() {
182
- this.uc.removeAllSubscriptions(),
183
- this.Gh.xh(),
184
- this.wc(),
185
- (this.mc = !0),
186
- this.bc(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
- (this.cc = null),
188
- (this.fc = !1);
182
+ this.Pd.removeAllSubscriptions(),
183
+ this.Cl.gc(),
184
+ this.Hd(),
185
+ (this._d = !0),
186
+ this.Xd(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
+ (this.Od = null),
188
+ (this.Jd = !1);
189
189
  }
190
190
  rn(t) {
191
- const i = this.uc.Ut(t);
192
- return this.fc && t(), i;
191
+ const i = this.Pd.Ut(t);
192
+ return this.Jd && t(), i;
193
193
  }
194
194
  openSession() {
195
- const t = this.C.$t() !== this.C.el();
196
- t && (this.j.hS(s.Ou.Wh), this.j.hS(s.Ou.Cu)),
197
- this.bc(!1, void 0, () => {
198
- t && (this.j.Vt(s.It.Zr), this.j.Vt(s.It.At));
195
+ const t = this.C.$t() !== this.C.ol();
196
+ t && (this.j.hS(s.Ou.Nl), this.j.hS(s.Ou.Cu)),
197
+ this.Xd(!1, void 0, () => {
198
+ t && (this.j.Vt(s.It.do), this.j.Vt(s.It.At));
199
199
  }),
200
- this.Ea(),
200
+ this.el(),
201
201
  t &&
202
202
  import("./Push/push-manager-factory.js").then((t) => {
203
- if (this.mc) return;
203
+ if (this._d) return;
204
204
  const i = t.default.ra();
205
205
  if (
206
206
  null != i &&
207
- (Dt.isPushPermissionGranted() || Dt.isPushBlocked())
207
+ (_t.isPushPermissionGranted() || _t.isPushBlocked())
208
208
  ) {
209
209
  const t = () => {
210
210
  i.lu()
@@ -225,44 +225,44 @@ export default class Zt {
225
225
  }
226
226
  });
227
227
  }
228
- jc() {
229
- this.j.Vt(s.It.Vr), this.j.Vt(s.It.bi), this.j.Vt(s.It.la);
228
+ Yd() {
229
+ this.j.Vt(s.It.ho), this.j.Vt(s.It.bi), this.j.Vt(s.It.Pa);
230
230
  }
231
- Sc() {
232
- this.j.Vt(s.It.wl),
231
+ Zd() {
232
+ this.j.Vt(s.It.Uc),
233
233
  this.j.Vt(s.It.lS),
234
- this.j.Vt(s.It.zl),
235
- this.j.Vt(s.It.Xl);
234
+ this.j.Vt(s.It._c),
235
+ this.j.Vt(s.It.Jc);
236
236
  }
237
237
  changeUser(t, i, e) {
238
238
  const h = this.Ss.getUserId();
239
239
  if (h !== t) {
240
- this.C.Sm(),
241
- this.jc(),
242
- gi(),
243
- null != h && this.bc(void 0, !1, void 0, void 0, void 0),
240
+ this.C.jm(),
241
+ this.Yd(),
242
+ wi(),
243
+ null != h && this.Xd(void 0, !1, void 0, void 0, void 0),
244
244
  this.Ss.Lu(t),
245
- e ? this.Gh.setSdkAuthenticationSignature(e) : this.Gh.jh();
245
+ e ? this.Cl.setSdkAuthenticationSignature(e) : this.Cl.cc();
246
246
  for (let t = 0; t < i.length; t++) i[t].changeUser(null == h);
247
247
  this.B.fo(),
248
248
  null != h && this.j.Vt(s.It.rS),
249
- this.j.Vt(s.It.Aa),
249
+ this.j.Vt(s.It.Mc),
250
250
  this.j.Vt(s.It.uS),
251
- this.Sc(),
251
+ this.Zd(),
252
252
  this.openSession(),
253
253
  b.info('Changed user to "' + t + '".');
254
254
  } else {
255
255
  let i = "Doing nothing.";
256
256
  e &&
257
- this.Gh.kh() !== e &&
258
- (this.Gh.setSdkAuthenticationSignature(e),
257
+ this.Cl.uc() !== e &&
258
+ (this.Cl.setSdkAuthenticationSignature(e),
259
259
  (i = "Updated SDK authentication signature")),
260
260
  b.info(`Current user is already ${t}. ${i}`);
261
261
  }
262
262
  }
263
263
  requestImmediateDataFlush(t) {
264
- this.wc(), this.C.el();
265
- this.bc(
264
+ this.Hd(), this.C.ol();
265
+ this.Xd(
266
266
  void 0,
267
267
  void 0,
268
268
  void 0,
@@ -273,13 +273,13 @@ export default class Zt {
273
273
  !0,
274
274
  );
275
275
  }
276
- Ar(t, i, s = "sdk") {
277
- this.C.el(),
276
+ Br(t, i, s = "sdk") {
277
+ this.C.ol(),
278
278
  b.info("Requesting explicit trigger refresh."),
279
- this.bc(!0, void 0, t, i, void 0, void 0, void 0, s);
279
+ this.Xd(!0, void 0, t, i, void 0, void 0, void 0, s);
280
280
  }
281
281
  Hu(t, i) {
282
- const e = p.Ac,
282
+ const e = p.vm,
283
283
  h = { a: t, l: i },
284
284
  o = v.Dt(e, h);
285
285
  return (
@@ -305,38 +305,38 @@ export default class Zt {
305
305
  null != e && (n.altitude = e),
306
306
  null != h && (n.ll_accuracy = h),
307
307
  null != o && (n.alt_accuracy = o);
308
- const r = v.Dt(p.Dc, n, t || void 0);
308
+ const r = v.Dt(p.bm, n, t || void 0);
309
309
  return (
310
310
  r &&
311
311
  b.info(`Set user last known location as ${JSON.stringify(n, null, 2)}`),
312
312
  r
313
313
  );
314
314
  }
315
- Fr(t, i) {
316
- const s = this.C.el();
317
- return new ve(this.Ss.getUserId(), p.$c, t, s, { cid: i });
315
+ Sr(t, i) {
316
+ const s = this.C.ol();
317
+ return new ve(this.Ss.getUserId(), p.km, t, s, { cid: i });
318
318
  }
319
- qc(t, i) {
319
+ ym(t, i) {
320
320
  return new et(t, i);
321
321
  }
322
- Ea() {
322
+ el() {
323
323
  const t = et._s.Xs;
324
- this.qc(t, b).setItem(t.Ws.Cn, 1, {
324
+ this.ym(t, b).setItem(t.Ws.Jh, 1, {
325
325
  baseUrl: this.baseUrl,
326
- data: { api_key: this.eu, device_id: this.tu.ve().id },
326
+ data: { api_key: this.eu, device_id: this.tu.Ye().id },
327
327
  userId: this.Ss.getUserId(),
328
- sdkAuthEnabled: this.Gh.Fh(),
328
+ sdkAuthEnabled: this.Cl.hc(),
329
329
  });
330
330
  }
331
- Dr(t) {
331
+ Er(t) {
332
332
  for (const i of t)
333
- if (i.api_key === this.eu) this.B.Ua(i.events, i.attributes);
333
+ if (i.api_key === this.eu) this.B.Jl(i.events, i.attributes);
334
334
  else {
335
335
  const t = et._s.Xs;
336
- new et(t, b).setItem(t.Ws.Br, V.de(), i);
336
+ new et(t, b).setItem(t.Ws.Dr, V.de(), i);
337
337
  }
338
338
  }
339
- ya(t, i, s) {
339
+ Va(t, i, s) {
340
340
  if (this.h.zu(t))
341
341
  return (
342
342
  b.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new L()
@@ -344,13 +344,13 @@ export default class Zt {
344
344
  let e, h;
345
345
  return (
346
346
  null === i && null === s
347
- ? ((e = p.Cc), (h = { key: t }))
348
- : ((e = p.Mc), (h = { key: t, latitude: i, longitude: s })),
347
+ ? ((e = p.Am), (h = { key: t }))
348
+ : ((e = p.Dm), (h = { key: t, latitude: i, longitude: s })),
349
349
  v.Dt(e, h)
350
350
  );
351
351
  }
352
- va(t, i) {
352
+ Wa(t, i) {
353
353
  const s = { group_id: t, status: i };
354
- return v.Dt(p.Tc, s);
354
+ return v.Dt(p.$m, s);
355
355
  }
356
356
  }
@@ -0,0 +1,9 @@
1
+ export * from "./Card/index.js";
2
+ export * from "./ContentCards/index.js";
3
+ export * from "./Core/index.js";
4
+ export * from "./InAppMessage/index.js";
5
+ export * from "./Push/index.js";
6
+ export * from "./User/index.js";
7
+ export * from "./FeatureFlags/index.js";
8
+ export * from "./Banner/index.js";
9
+ export { WindowUtils } from "./util/window-utils.js";
@@ -1,14 +1,14 @@
1
1
  export default class es {
2
2
  constructor(t) {
3
- (this.xc = t), (this.xc = t);
3
+ (this.tf = t), (this.tf = t);
4
4
  }
5
- zc(t) {
6
- return null == this.xc || this.xc === t[0];
5
+ sf(t) {
6
+ return null == this.tf || this.tf === t[0];
7
7
  }
8
8
  static fromJson(t) {
9
9
  return new es(t ? t.event_name : null);
10
10
  }
11
11
  qt() {
12
- return this.xc;
12
+ return this.tf;
13
13
  }
14
14
  }
@@ -1,13 +1,13 @@
1
1
  import ls from "./filter-set.js";
2
2
  export default class ns {
3
3
  constructor(t, s) {
4
- (this.xc = t), (this.tf = s), (this.xc = t), (this.tf = s);
4
+ (this.tf = t), (this.if = s), (this.tf = t), (this.if = s);
5
5
  }
6
- zc(t) {
7
- if (null == this.xc || null == this.tf) return !1;
6
+ sf(t) {
7
+ if (null == this.tf || null == this.if) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.xc && this.tf.zc(i);
10
+ return s === this.tf && this.if.sf(i);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new ns(
@@ -16,6 +16,6 @@ export default class ns {
16
16
  );
17
17
  }
18
18
  qt() {
19
- return { e: this.xc, pf: this.tf ? this.tf.qt() : null };
19
+ return { e: this.tf, pf: this.if ? this.if.qt() : null };
20
20
  }
21
21
  }
@@ -1,16 +1,16 @@
1
- import hr from "./filter.js";
1
+ import kr from "./filter.js";
2
2
  import { isArray as g } from "../../util/code-utils.js";
3
3
  export default class ls {
4
4
  constructor(t) {
5
5
  (this.filters = t), (this.filters = t);
6
6
  }
7
- zc(t) {
7
+ sf(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].zc(t)) {
13
+ if (o[r].sf(t)) {
14
14
  s = !0;
15
15
  break;
16
16
  }
@@ -27,7 +27,7 @@ export default class ls {
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(hr.fromJson(s[t]));
30
+ for (let t = 0; t < s.length; t++) o.push(kr.fromJson(s[t]));
31
31
  r.push(o);
32
32
  }
33
33
  return new ls(r);
@@ -47,7 +47,7 @@ export default class ls {
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(hr._u(s[t]));
50
+ for (let t = 0; t < s.length; t++) o.push(kr._u(s[t]));
51
51
  r.push(o);
52
52
  }
53
53
  return new ls(r);