@braze/web-sdk 6.12.1 → 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 +23 -23
  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
@@ -1,11 +1,11 @@
1
- import { isDate as Nt } from "../../util/code-utils.js";
1
+ import { isDate as Kt } from "../../util/code-utils.js";
2
2
  import {
3
3
  convertMsToSeconds as X,
4
4
  dateFromUnixTimestamp as Y,
5
5
  secondsAgo as hs,
6
6
  secondsInTheFuture as us,
7
7
  } from "../../util/date-utils.js";
8
- export default class hr {
8
+ export default class kr {
9
9
  constructor(t, s, e, i) {
10
10
  (this.zE = t),
11
11
  (this.kE = s),
@@ -15,48 +15,48 @@ export default class hr {
15
15
  (this.kE = s),
16
16
  (this.comparator = e),
17
17
  (this.vE = i),
18
- this.kE === hr.VE.JE &&
19
- this.comparator !== hr.ZE.qE &&
20
- this.comparator !== hr.ZE.$E &&
21
- this.comparator !== hr.ZE.tT &&
22
- this.comparator !== hr.ZE.sT &&
18
+ this.kE === kr.VE.JE &&
19
+ this.comparator !== kr.ZE.qE &&
20
+ this.comparator !== kr.ZE.$E &&
21
+ this.comparator !== kr.ZE.tT &&
22
+ this.comparator !== kr.ZE.sT &&
23
23
  (this.vE = Y(this.vE));
24
24
  }
25
- zc(t) {
25
+ sf(t) {
26
26
  let s = null;
27
27
  switch ((null != t && (s = t[this.zE]), this.comparator)) {
28
- case hr.ZE.eT:
28
+ case kr.ZE.eT:
29
29
  return null != s && s.valueOf() === this.vE.valueOf();
30
- case hr.ZE.iT:
30
+ case kr.ZE.iT:
31
31
  return null == s || s.valueOf() !== this.vE.valueOf();
32
- case hr.ZE.lT:
32
+ case kr.ZE.lT:
33
33
  return null != s && typeof s == typeof this.vE && s > this.vE;
34
- case hr.ZE.qE:
35
- return this.kE === hr.VE.JE
36
- ? null != s && Nt(s) && hs(s) <= this.vE.valueOf()
34
+ case kr.ZE.qE:
35
+ return this.kE === kr.VE.JE
36
+ ? null != s && Kt(s) && hs(s) <= this.vE.valueOf()
37
37
  : null != s && typeof s == typeof this.vE && s >= this.vE;
38
- case hr.ZE.rT:
38
+ case kr.ZE.rT:
39
39
  return null != s && typeof s == typeof this.vE && s < this.vE;
40
- case hr.ZE.$E:
41
- return this.kE === hr.VE.JE
42
- ? null != s && Nt(s) && hs(s) >= this.vE.valueOf()
40
+ case kr.ZE.$E:
41
+ return this.kE === kr.VE.JE
42
+ ? null != s && Kt(s) && hs(s) >= this.vE.valueOf()
43
43
  : null != s && typeof s == typeof this.vE && s <= this.vE;
44
- case hr.ZE.hT:
44
+ case kr.ZE.hT:
45
45
  return (
46
46
  null != s &&
47
47
  "string" == typeof s &&
48
48
  typeof s == typeof this.vE &&
49
49
  null != s.match(this.vE)
50
50
  );
51
- case hr.ZE.nT:
51
+ case kr.ZE.nT:
52
52
  return null != s;
53
- case hr.ZE.uT:
53
+ case kr.ZE.uT:
54
54
  return null == s;
55
- case hr.ZE.tT:
56
- return null != s && Nt(s) && us(s) < this.vE;
57
- case hr.ZE.sT:
58
- return null != s && Nt(s) && us(s) > this.vE;
59
- case hr.ZE.oT:
55
+ case kr.ZE.tT:
56
+ return null != s && Kt(s) && us(s) < this.vE;
57
+ case kr.ZE.sT:
58
+ return null != s && Kt(s) && us(s) > this.vE;
59
+ case kr.ZE.oT:
60
60
  return (
61
61
  null == s ||
62
62
  typeof s != typeof this.vE ||
@@ -67,7 +67,7 @@ export default class hr {
67
67
  return !1;
68
68
  }
69
69
  static fromJson(t) {
70
- return new hr(
70
+ return new kr(
71
71
  t.property_key,
72
72
  t.property_type,
73
73
  t.comparator,
@@ -77,16 +77,16 @@ export default class hr {
77
77
  qt() {
78
78
  let t = this.vE;
79
79
  return (
80
- Nt(this.vE) && (t = X(t.valueOf())),
80
+ Kt(this.vE) && (t = X(t.valueOf())),
81
81
  { k: this.zE, t: this.kE, c: this.comparator, v: t }
82
82
  );
83
83
  }
84
84
  static _u(t) {
85
- return new hr(t.k, t.t, t.c, t.v);
85
+ return new kr(t.k, t.t, t.c, t.v);
86
86
  }
87
87
  }
88
- (hr.VE = { ET: "boolean", aT: "number", TT: "string", JE: "date" }),
89
- (hr.ZE = {
88
+ (kr.VE = { ET: "boolean", aT: "number", TT: "string", JE: "date" }),
89
+ (kr.ZE = {
90
90
  eT: 1,
91
91
  iT: 2,
92
92
  lT: 3,
@@ -1,16 +1,16 @@
1
1
  import ji from "./trigger-condition.js";
2
2
  export default class ki {
3
3
  constructor(t, i) {
4
- (this.if = t), (this.rf = i), (this.if = t), (this.rf = i);
4
+ (this.rf = t), (this.nf = i), (this.rf = t), (this.nf = i);
5
5
  }
6
- zc(t) {
7
- if (null == this.if) return !1;
8
- const i = ji.sf(t[0], this.if);
6
+ sf(t) {
7
+ if (null == this.rf) return !1;
8
+ const i = ji.ef(t[0], this.rf);
9
9
  if (!i) return !1;
10
- let r = null == this.rf || 0 === this.rf.length;
11
- if (null != this.rf)
12
- for (let i = 0; i < this.rf.length; i++)
13
- if (this.rf[i] === t[1]) {
10
+ let r = null == this.nf || 0 === this.nf.length;
11
+ if (null != this.nf)
12
+ for (let i = 0; i < this.nf.length; i++)
13
+ if (this.nf[i] === t[1]) {
14
14
  r = !0;
15
15
  break;
16
16
  }
@@ -20,6 +20,6 @@ export default class ki {
20
20
  return new ki(t ? t.id : null, t ? t.buttons : null);
21
21
  }
22
22
  qt() {
23
- return this.if;
23
+ return this.rf;
24
24
  }
25
25
  }
@@ -2,7 +2,7 @@ export default class os {
2
2
  constructor(t) {
3
3
  (this.productId = t), (this.productId = t);
4
4
  }
5
- zc(t) {
5
+ sf(t) {
6
6
  return null == this.productId || t[0] === this.productId;
7
7
  }
8
8
  static fromJson(t) {
@@ -1,13 +1,13 @@
1
1
  import ls from "./filter-set.js";
2
2
  export default class fs {
3
3
  constructor(t, s) {
4
- (this.productId = t), (this.tf = s), (this.productId = t), (this.tf = s);
4
+ (this.productId = t), (this.if = s), (this.productId = t), (this.if = s);
5
5
  }
6
- zc(t) {
7
- if (null == this.productId || null == this.tf) return !1;
6
+ sf(t) {
7
+ if (null == this.productId || null == this.if) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.productId && this.tf.zc(i);
10
+ return s === this.productId && this.if.sf(i);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new fs(
@@ -16,6 +16,6 @@ export default class fs {
16
16
  );
17
17
  }
18
18
  qt() {
19
- return { id: this.productId, pf: this.tf ? this.tf.qt() : null };
19
+ return { id: this.productId, pf: this.if ? this.if.qt() : null };
20
20
  }
21
21
  }
@@ -1,15 +1,15 @@
1
1
  import ji from "./trigger-condition.js";
2
2
  export default class wr {
3
3
  constructor(t) {
4
- (this.if = t), (this.if = t);
4
+ (this.rf = t), (this.rf = t);
5
5
  }
6
- zc(t) {
7
- return null == this.if || ji.sf(t[0], this.if);
6
+ sf(t) {
7
+ return null == this.rf || ji.ef(t[0], this.rf);
8
8
  }
9
9
  static fromJson(t) {
10
10
  return new wr(t ? t.campaign_id : null);
11
11
  }
12
12
  qt() {
13
- return this.if;
13
+ return this.rf;
14
14
  }
15
15
  }
@@ -5,17 +5,17 @@ import ki from "./in-app-message-click-data.js";
5
5
  import os from "./purchase-data.js";
6
6
  import fs from "./purchase-property-data.js";
7
7
  import wr from "./push-click-data.js";
8
- import ot from "./trigger-events.js";
8
+ import gt from "./trigger-events.js";
9
9
  import { logger as b } from "../../../shared-lib/index.js";
10
10
  import { getErrorMessage as ci } from "../../util/error-utils.js";
11
11
  export default class ji {
12
12
  constructor(e, t) {
13
13
  (this.type = e), (this.data = t), (this.type = e), (this.data = t);
14
14
  }
15
- _c(e, t) {
16
- return ji.Ec[this.type] === e && (null == this.data || this.data.zc(t));
15
+ _m(e, t) {
16
+ return ji.Em[this.type] === e && (null == this.data || this.data.sf(t));
17
17
  }
18
- static sf(e, t) {
18
+ static ef(e, t) {
19
19
  let r = null;
20
20
  try {
21
21
  r = window.atob(e);
@@ -28,25 +28,25 @@ export default class ji {
28
28
  const t = e.type;
29
29
  let r = null;
30
30
  switch (t) {
31
- case ji.Yo.OPEN:
32
- case ji.Yo.Os:
31
+ case ji.Ba.OPEN:
32
+ case ji.Ba.Os:
33
33
  break;
34
- case ji.Yo.qr:
34
+ case ji.Ba.Nr:
35
35
  r = os.fromJson(e.data);
36
36
  break;
37
- case ji.Yo.Pc:
37
+ case ji.Ba.Cm:
38
38
  r = fs.fromJson(e.data);
39
39
  break;
40
- case ji.Yo.Sr:
40
+ case ji.Ba.Ar:
41
41
  r = wr.fromJson(e.data);
42
42
  break;
43
- case ji.Yo.he:
43
+ case ji.Ba.Be:
44
44
  r = es.fromJson(e.data);
45
45
  break;
46
- case ji.Yo.Rc:
46
+ case ji.Ba.Pm:
47
47
  r = ns.fromJson(e.data);
48
48
  break;
49
- case ji.Yo.rm:
49
+ case ji.Ba.rm:
50
50
  r = ki.fromJson(e.data);
51
51
  }
52
52
  return new ji(t, r);
@@ -58,46 +58,46 @@ export default class ji {
58
58
  let t,
59
59
  r = null;
60
60
  switch (e.t) {
61
- case ji.Yo.OPEN:
62
- case ji.Yo.Os:
61
+ case ji.Ba.OPEN:
62
+ case ji.Ba.Os:
63
63
  break;
64
- case ji.Yo.qr:
64
+ case ji.Ba.Nr:
65
65
  r = new os(e.d);
66
66
  break;
67
- case ji.Yo.Pc:
67
+ case ji.Ba.Cm:
68
68
  (t = e.d || {}), (r = new fs(t.id, ls._u(t.pf || [])));
69
69
  break;
70
- case ji.Yo.Sr:
70
+ case ji.Ba.Ar:
71
71
  r = new wr(e.d);
72
72
  break;
73
- case ji.Yo.he:
73
+ case ji.Ba.Be:
74
74
  r = new es(e.d);
75
75
  break;
76
- case ji.Yo.Rc:
76
+ case ji.Ba.Pm:
77
77
  (t = e.d || {}), (r = new ns(t.e, ls._u(t.pf || [])));
78
78
  break;
79
- case ji.Yo.rm:
79
+ case ji.Ba.rm:
80
80
  r = new ki(e.d);
81
81
  }
82
82
  return new ji(e.t, r);
83
83
  }
84
84
  }
85
- (ji.Yo = {
85
+ (ji.Ba = {
86
86
  OPEN: "open",
87
- qr: "purchase",
88
- Pc: "purchase_property",
89
- Sr: "push_click",
90
- he: "custom_event",
91
- Rc: "custom_event_property",
87
+ Nr: "purchase",
88
+ Cm: "purchase_property",
89
+ Ar: "push_click",
90
+ Be: "custom_event",
91
+ Pm: "custom_event_property",
92
92
  rm: "iam_click",
93
93
  Os: "test",
94
94
  }),
95
- (ji.Ec = {}),
96
- (ji.Ec[ji.Yo.OPEN] = ot.OPEN),
97
- (ji.Ec[ji.Yo.qr] = ot.qr),
98
- (ji.Ec[ji.Yo.Pc] = ot.qr),
99
- (ji.Ec[ji.Yo.Sr] = ot.Sr),
100
- (ji.Ec[ji.Yo.he] = ot.he),
101
- (ji.Ec[ji.Yo.Rc] = ot.he),
102
- (ji.Ec[ji.Yo.rm] = ot.rm),
103
- (ji.Ec[ji.Yo.Os] = ot.Os);
95
+ (ji.Em = {}),
96
+ (ji.Em[ji.Ba.OPEN] = gt.OPEN),
97
+ (ji.Em[ji.Ba.Nr] = gt.Nr),
98
+ (ji.Em[ji.Ba.Cm] = gt.Nr),
99
+ (ji.Em[ji.Ba.Ar] = gt.Ar),
100
+ (ji.Em[ji.Ba.Be] = gt.Be),
101
+ (ji.Em[ji.Ba.Pm] = gt.Be),
102
+ (ji.Em[ji.Ba.rm] = gt.rm),
103
+ (ji.Em[ji.Ba.Os] = gt.Os);
@@ -1,8 +1,8 @@
1
1
  export default {
2
2
  OPEN: "open",
3
- qr: "purchase",
4
- Sr: "push_click",
5
- he: "custom_event",
3
+ Nr: "purchase",
4
+ Ar: "push_click",
5
+ Be: "custom_event",
6
6
  rm: "iam_click",
7
7
  Os: "test",
8
8
  };
@@ -4,56 +4,56 @@ import {
4
4
  } from "../../util/date-utils.js";
5
5
  import { logger as b } from "../../../shared-lib/index.js";
6
6
  import ji from "./trigger-condition.js";
7
- import { validateValueIsFromEnum as ta } from "../../util/code-utils.js";
8
- export default class vt {
9
- constructor(t, i = [], s, e, r = 0, h, l, o = 0, n = vt.Td, a, u, d) {
7
+ import { validateValueIsFromEnum as ra } from "../../util/code-utils.js";
8
+ export default class Tt {
9
+ constructor(t, i = [], s, e, r = 0, h, l, o = 0, n = Tt.Tm, a, u, d) {
10
10
  (this.id = t),
11
- (this.Dd = i),
11
+ (this.Nm = i),
12
12
  (this.startTime = s),
13
13
  (this.endTime = e),
14
14
  (this.priority = r),
15
15
  (this.type = h),
16
16
  (this.data = l),
17
- (this.Pd = o),
18
- (this.yd = n),
19
- (this.ia = a),
20
- (this.jd = u),
21
- (this.Nd = d),
17
+ (this.Im = o),
18
+ (this.zm = n),
19
+ (this.qa = a),
20
+ (this.Mm = u),
21
+ (this.Bm = d),
22
22
  (this.id = t),
23
- (this.Dd = i || []),
23
+ (this.Nm = i || []),
24
24
  void 0 === s && (s = null),
25
25
  (this.startTime = s),
26
26
  void 0 === e && (e = null),
27
27
  (this.endTime = e),
28
28
  (this.priority = r || 0),
29
29
  (this.type = h),
30
- (this.Pd = o || 0),
31
- null == a && (a = 1e3 * (this.Pd + 30)),
32
- (this.ia = a),
30
+ (this.Im = o || 0),
31
+ null == a && (a = 1e3 * (this.Im + 30)),
32
+ (this.qa = a),
33
33
  (this.data = l),
34
- null != n && (this.yd = n),
35
- (this.jd = u),
36
- (this.Nd = d || null);
34
+ null != n && (this.zm = n),
35
+ (this.Mm = u),
36
+ (this.Bm = d || null);
37
37
  }
38
- _d(t) {
38
+ Fm(t) {
39
39
  return (
40
- null == this.Nd || (this.yd !== vt.Td && t - this.Nd >= 1e3 * this.yd)
40
+ null == this.Bm || (this.zm !== Tt.Tm && t - this.Bm >= 1e3 * this.zm)
41
41
  );
42
42
  }
43
- Ad(t) {
44
- this.Nd = t;
43
+ Hm(t) {
44
+ this.Bm = t;
45
45
  }
46
- Id(t) {
47
- const i = t + 1e3 * this.Pd;
46
+ Jm(t) {
47
+ const i = t + 1e3 * this.Im;
48
48
  return Math.max(i - new Date().valueOf(), 0);
49
49
  }
50
- $d(t) {
50
+ Lm(t) {
51
51
  const i = new Date().valueOf() - t,
52
- s = null == t || isNaN(i) || null == this.ia || i < this.ia;
52
+ s = null == t || isNaN(i) || null == this.qa || i < this.qa;
53
53
  return (
54
54
  s ||
55
55
  b.info(
56
- `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.ia}ms.`,
56
+ `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.qa}ms.`,
57
57
  ),
58
58
  !s
59
59
  );
@@ -72,18 +72,18 @@ export default class vt {
72
72
  a = t.timeout,
73
73
  u = t.data,
74
74
  d = t.min_seconds_since_last_trigger;
75
- return ta(
76
- vt.Yo,
75
+ return ra(
76
+ Tt.Ba,
77
77
  l,
78
78
  "Could not construct Trigger from server data",
79
79
  "Trigger.Types",
80
80
  )
81
- ? new vt(i, s, e, r, h, l, u, o, n, a, d)
81
+ ? new Tt(i, s, e, r, h, l, u, o, n, a, d)
82
82
  : null;
83
83
  }
84
84
  qt() {
85
85
  const t = [];
86
- for (let i = 0; i < this.Dd.length; i++) t.push(this.Dd[i].qt());
86
+ for (let i = 0; i < this.Nm.length; i++) t.push(this.Nm[i].qt());
87
87
  return {
88
88
  i: this.id,
89
89
  c: t,
@@ -92,18 +92,18 @@ export default class vt {
92
92
  p: this.priority,
93
93
  t: this.type,
94
94
  da: this.data,
95
- d: this.Pd,
96
- r: this.yd,
97
- tm: this.ia,
98
- ss: this.jd,
99
- ld: this.Nd,
95
+ d: this.Im,
96
+ r: this.zm,
97
+ tm: this.qa,
98
+ ss: this.Mm,
99
+ ld: this.Bm,
100
100
  };
101
101
  }
102
102
  static _u(t) {
103
103
  const i = [],
104
104
  s = t.c || [];
105
105
  for (let t = 0; t < s.length; t++) i.push(ji._u(s[t]));
106
- return new vt(
106
+ return new Tt(
107
107
  t.i,
108
108
  i,
109
109
  ee(t.s),
@@ -119,4 +119,4 @@ export default class vt {
119
119
  );
120
120
  }
121
121
  }
122
- (vt.Yo = { Wo: "inapp", xd: "templated_iam" }), (vt.Td = -1);
122
+ (Tt.Ba = { za: "inapp", Rm: "templated_iam" }), (Tt.Tm = -1);
@@ -6,15 +6,15 @@ export const TriggersProviderFactory = {
6
6
  provider: null,
7
7
  o: () => (
8
8
  TriggersProviderFactory.t(),
9
- TriggersProviderFactory.provider || TriggersProviderFactory.rg(),
9
+ TriggersProviderFactory.provider || TriggersProviderFactory.ig(),
10
10
  TriggersProviderFactory.provider
11
11
  ),
12
- rg: () => {
12
+ ig: () => {
13
13
  if (!TriggersProviderFactory.provider) {
14
- const i = r.er(U.Dh);
14
+ const i = r.er(U._l);
15
15
  (TriggersProviderFactory.provider = new vr(
16
16
  null != i ? i : 30,
17
- se.ra().Pn(),
17
+ se.ra().ta(),
18
18
  r.p(),
19
19
  r.nn(),
20
20
  se.ra(),
@@ -24,7 +24,7 @@ export const TriggersProviderFactory = {
24
24
  },
25
25
  t: () => {
26
26
  TriggersProviderFactory.i ||
27
- (TriggersProviderFactory.rg(),
27
+ (TriggersProviderFactory.ig(),
28
28
  r.g(TriggersProviderFactory),
29
29
  (TriggersProviderFactory.i = !0));
30
30
  },