@braze/web-sdk 5.4.0 → 5.6.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 (183) hide show
  1. package/index.d.ts +109 -7
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +1 -1
  4. package/shared-lib/event-types.js +33 -31
  5. package/shared-lib/guid.js +3 -3
  6. package/shared-lib/indexed-db-adapter.js +20 -20
  7. package/shared-lib/logger.js +18 -18
  8. package/shared-lib/supported-options.js +24 -24
  9. package/src/Banner/banner-factory.js +14 -0
  10. package/src/Banner/banner-provider-factory.js +19 -0
  11. package/src/Banner/banner-provider.js +198 -0
  12. package/src/Banner/banner.js +30 -0
  13. package/src/Banner/display/banner-to-html.js +57 -0
  14. package/src/Banner/display/destroy-banner-html.js +7 -0
  15. package/src/Banner/display/detect-banner-impressions.js +28 -0
  16. package/src/Banner/get-all-banners.js +13 -0
  17. package/src/Banner/get-banner.js +19 -0
  18. package/src/Banner/index.js +7 -0
  19. package/src/Banner/log-banner-click.js +22 -0
  20. package/src/Banner/log-banner-impressions.js +31 -0
  21. package/src/Banner/request-banners-refresh.js +35 -0
  22. package/src/Banner/subscribe-to-banners-updates.js +23 -0
  23. package/src/Banner/types.js +1 -0
  24. package/src/Banner/ui/insert-banner.js +24 -0
  25. package/src/Card/card-manager-factory.js +10 -10
  26. package/src/Card/card-manager.js +64 -58
  27. package/src/Card/display/card-display.js +77 -91
  28. package/src/Card/log-card-click.js +6 -6
  29. package/src/Card/log-card-dismissal.js +6 -5
  30. package/src/Card/log-card-impressions.js +11 -11
  31. package/src/Card/models/captioned-image.js +21 -21
  32. package/src/Card/models/card.js +111 -105
  33. package/src/Card/models/classic-card.js +21 -21
  34. package/src/Card/models/control-card.js +11 -11
  35. package/src/Card/models/image-only.js +19 -19
  36. package/src/Card/util/card-factory.js +58 -58
  37. package/src/ContentCards/content-cards-provider-factory.js +14 -14
  38. package/src/ContentCards/content-cards-provider.js +260 -262
  39. package/src/ContentCards/content-cards.js +5 -5
  40. package/src/ContentCards/get-cached-content-cards.js +3 -3
  41. package/src/ContentCards/request-content-cards-refresh.js +4 -4
  42. package/src/ContentCards/subscribe-to-content-cards-updates.js +13 -13
  43. package/src/ContentCards/ui/hide-content-cards.js +7 -7
  44. package/src/ContentCards/ui/show-content-cards.js +52 -52
  45. package/src/ContentCards/ui/toggle-content-cards.js +4 -4
  46. package/src/Core/add-sdk-metadata.js +9 -9
  47. package/src/Core/change-user.js +14 -14
  48. package/src/Core/destroy.js +3 -3
  49. package/src/Core/disable-sdk.js +13 -13
  50. package/src/Core/enable-sdk.js +9 -9
  51. package/src/Core/get-device-id.js +10 -10
  52. package/src/Core/get-user.js +2 -2
  53. package/src/Core/handle-braze-action.js +53 -53
  54. package/src/Core/initialize.js +2 -2
  55. package/src/Core/is-disabled.js +2 -2
  56. package/src/Core/is-initialized.js +2 -2
  57. package/src/Core/log-custom-event.js +24 -24
  58. package/src/Core/log-purchase.js +38 -38
  59. package/src/Core/open-session.js +18 -18
  60. package/src/Core/remove-all-subscriptions.js +2 -2
  61. package/src/Core/remove-subscription.js +3 -3
  62. package/src/Core/request-immediate-data-flush.js +5 -5
  63. package/src/Core/set-logger.js +2 -2
  64. package/src/Core/set-sdk-authentication-signature.js +6 -6
  65. package/src/Core/subscribe-to-sdk-authentication-failures.js +5 -5
  66. package/src/Core/toggle-logging.js +2 -2
  67. package/src/Core/wipe-data.js +10 -10
  68. package/src/FeatureFlags/feature-flag-factory.js +13 -13
  69. package/src/FeatureFlags/feature-flag.js +10 -10
  70. package/src/FeatureFlags/feature-flags-provider-factory.js +13 -14
  71. package/src/FeatureFlags/feature-flags-provider.js +118 -116
  72. package/src/FeatureFlags/get-all-feature-flags.js +10 -10
  73. package/src/FeatureFlags/get-feature-flag.js +9 -9
  74. package/src/FeatureFlags/log-feature-flag-impression.js +18 -18
  75. package/src/FeatureFlags/refresh-feature-flags.js +6 -6
  76. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +9 -9
  77. package/src/Feed/feed-provider-factory.js +12 -12
  78. package/src/Feed/feed-provider.js +59 -59
  79. package/src/Feed/feed.js +4 -4
  80. package/src/Feed/get-cached-feed.js +3 -3
  81. package/src/Feed/log-feed-displayed.js +5 -5
  82. package/src/Feed/request-feed-refresh.js +3 -3
  83. package/src/Feed/subscribe-to-feed-updates.js +4 -4
  84. package/src/Feed/ui/hide-feed.js +5 -5
  85. package/src/Feed/ui/show-feed.js +53 -53
  86. package/src/Feed/ui/toggle-feed.js +4 -4
  87. package/src/InAppMessage/defer-in-app-message.js +9 -9
  88. package/src/InAppMessage/display/html-message-display-utils.js +18 -164
  89. package/src/InAppMessage/display/html-message-to-html.js +55 -62
  90. package/src/InAppMessage/display/in-app-message-to-html.js +74 -74
  91. package/src/InAppMessage/display/modal-utils.js +17 -17
  92. package/src/InAppMessage/get-deferred-in-app-message.js +2 -2
  93. package/src/InAppMessage/in-app-message-factory.js +61 -61
  94. package/src/InAppMessage/in-app-message-manager-factory.js +9 -9
  95. package/src/InAppMessage/in-app-message-manager.js +158 -156
  96. package/src/InAppMessage/log-in-app-message-button-click.js +16 -16
  97. package/src/InAppMessage/log-in-app-message-click.js +11 -11
  98. package/src/InAppMessage/log-in-app-message-html-click.js +15 -15
  99. package/src/InAppMessage/log-in-app-message-impression.js +6 -6
  100. package/src/InAppMessage/models/control-message.js +15 -8
  101. package/src/InAppMessage/models/full-screen-message.js +34 -34
  102. package/src/InAppMessage/models/html-message.js +23 -23
  103. package/src/InAppMessage/models/in-app-message-button.js +10 -10
  104. package/src/InAppMessage/models/in-app-message.js +155 -155
  105. package/src/InAppMessage/models/modal-message.js +33 -33
  106. package/src/InAppMessage/models/slide-up-message.js +35 -35
  107. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  108. package/src/InAppMessage/subscribe-to-in-app-message.js +3 -3
  109. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +6 -6
  110. package/src/InAppMessage/ui/show-in-app-message.js +103 -103
  111. package/src/Push/is-push-blocked.js +2 -2
  112. package/src/Push/is-push-permission-granted.js +2 -2
  113. package/src/Push/is-push-supported.js +2 -2
  114. package/src/Push/push-manager-factory.js +25 -25
  115. package/src/Push/push-manager.js +176 -176
  116. package/src/Push/request-push-permission.js +8 -8
  117. package/src/Push/unregister-push.js +4 -4
  118. package/src/Push/utils/push-utils.js +4 -4
  119. package/src/User/user-manager.js +38 -38
  120. package/src/User/user.js +95 -92
  121. package/src/common/base-feed.js +9 -9
  122. package/src/common/base-provider.js +2 -2
  123. package/src/common/constants.js +1 -0
  124. package/src/common/detect-impression.js +18 -0
  125. package/src/common/event-logger.js +22 -22
  126. package/src/common/feed-display.js +53 -53
  127. package/src/index.js +1 -0
  128. package/src/l10n/l10n-manager-factory.js +15 -15
  129. package/src/l10n/l10n-manager.js +4 -4
  130. package/src/managers/auth-manager.js +38 -38
  131. package/src/managers/braze-instance.js +212 -212
  132. package/src/managers/device-manager.js +30 -30
  133. package/src/managers/network-manager.js +231 -232
  134. package/src/managers/server-config-manager.js +99 -83
  135. package/src/managers/session-manager.js +46 -50
  136. package/src/managers/storage-manager-factory.js +13 -13
  137. package/src/managers/storage-manager.js +182 -180
  138. package/src/managers/subscription-manager.js +12 -12
  139. package/src/managers/utils.js +4 -4
  140. package/src/models/backend-errors.js +5 -5
  141. package/src/models/braze-event.js +9 -9
  142. package/src/models/device.js +2 -2
  143. package/src/models/identifier.js +15 -15
  144. package/src/models/push-token.js +10 -10
  145. package/src/models/request-result.js +4 -4
  146. package/src/models/server-config.js +38 -34
  147. package/src/request-controller.js +228 -228
  148. package/src/triggers/models/custom-event-data.js +5 -5
  149. package/src/triggers/models/custom-event-property-data.js +6 -6
  150. package/src/triggers/models/filter-set.js +10 -10
  151. package/src/triggers/models/filter.js +66 -66
  152. package/src/triggers/models/in-app-message-click-data.js +10 -10
  153. package/src/triggers/models/purchase-data.js +2 -2
  154. package/src/triggers/models/purchase-property-data.js +6 -6
  155. package/src/triggers/models/push-click-data.js +5 -5
  156. package/src/triggers/models/trigger-condition.js +46 -46
  157. package/src/triggers/models/trigger-events.js +4 -4
  158. package/src/triggers/models/trigger.js +33 -33
  159. package/src/triggers/triggers-provider-factory.js +16 -16
  160. package/src/triggers/triggers-provider.js +156 -154
  161. package/src/ui/js/attach-css.js +7 -7
  162. package/src/ui/js/banner-css.js +11 -0
  163. package/src/ui/js/feed-css.js +4 -4
  164. package/src/ui/js/iam-css.js +4 -4
  165. package/src/ui/js/index.js +1 -0
  166. package/src/ui/js/load-font-awesome.js +8 -8
  167. package/src/util/base-device-parser.js +9 -9
  168. package/src/util/braze-actions.js +32 -32
  169. package/src/util/browser-detector.js +27 -27
  170. package/src/util/client-hints-parser.js +9 -9
  171. package/src/util/code-utils.js +5 -5
  172. package/src/util/component-utils.js +5 -5
  173. package/src/util/deprecation-utils.js +3 -3
  174. package/src/util/device-constants.js +1 -1
  175. package/src/util/dom-utils.js +13 -13
  176. package/src/util/html-display-utils.js +158 -0
  177. package/src/util/key-codes.js +1 -1
  178. package/src/util/net.js +21 -21
  179. package/src/util/request-header-utils.js +31 -30
  180. package/src/util/string-utils.js +2 -2
  181. package/src/util/user-agent-parser.js +9 -9
  182. package/src/util/validation-utils.js +89 -85
  183. package/src/util/window-utils.js +3 -3
@@ -36,35 +36,35 @@ export default class HtmlMessage extends InAppMessage {
36
36
  (this.messageFields = a),
37
37
  (this.messageFields = a);
38
38
  }
39
- do() {
39
+ Bo() {
40
40
  return !1;
41
41
  }
42
- p(i) {
43
- if (this.xe === InAppMessage.Be.Hr) {
44
- if (this.vo) return !1;
45
- this.vo = !0;
42
+ rt(i) {
43
+ if (this.Ke === InAppMessage.Qe.fn) {
44
+ if (this.Co) return !1;
45
+ this.Co = !0;
46
46
  }
47
- return this.Et.Dt(i), !0;
47
+ return this._t.X(i), !0;
48
48
  }
49
- Y() {
50
- const i = super.Y(HtmlMessage.it);
51
- return (i[InAppMessage.tt.uo] = this.messageFields), i;
49
+ Bs() {
50
+ const i = super.Bs(HtmlMessage.Dt);
51
+ return (i[InAppMessage.qt.Po] = this.messageFields), i;
52
52
  }
53
- static Xr(i) {
53
+ static hn(i) {
54
54
  return new HtmlMessage(
55
- i[InAppMessage.tt.Vr],
56
- i[InAppMessage.tt.bt],
57
- i[InAppMessage.tt.Yr],
58
- i[InAppMessage.tt.ra],
59
- i[InAppMessage.tt.sa],
60
- i[InAppMessage.tt.ua],
61
- i[InAppMessage.tt.ca],
62
- i[InAppMessage.tt.ga],
63
- i[InAppMessage.tt.ha],
64
- i[InAppMessage.tt.CSS],
65
- i[InAppMessage.tt.uo],
66
- i[InAppMessage.tt.va],
55
+ i[InAppMessage.qt.ra],
56
+ i[InAppMessage.qt.St],
57
+ i[InAppMessage.qt.ta],
58
+ i[InAppMessage.qt.pa],
59
+ i[InAppMessage.qt.ma],
60
+ i[InAppMessage.qt.ja],
61
+ i[InAppMessage.qt.xa],
62
+ i[InAppMessage.qt.wa],
63
+ i[InAppMessage.qt.ka],
64
+ i[InAppMessage.qt.CSS],
65
+ i[InAppMessage.qt.Po],
66
+ i[InAppMessage.qt.qa],
67
67
  );
68
68
  }
69
69
  }
70
- HtmlMessage.it = InAppMessage.Be.Hr;
70
+ HtmlMessage.Dt = InAppMessage.Qe.fn;
@@ -1,5 +1,5 @@
1
1
  import InAppMessage from "./in-app-message.js";
2
- import T from "../../managers/subscription-manager.js";
2
+ import u from "../../managers/subscription-manager.js";
3
3
  export default class InAppMessageButton {
4
4
  constructor(s, t, i, r, h, e, n) {
5
5
  (this.text = s),
@@ -15,22 +15,22 @@ export default class InAppMessageButton {
15
15
  (this.borderColor = r || this.backgroundColor),
16
16
  (this.clickAction = h || InAppMessage.ClickAction.NONE),
17
17
  (this.uri = e),
18
- null == n && (n = InAppMessageButton.Hi),
18
+ null == n && (n = InAppMessageButton.Jr),
19
19
  (this.id = n),
20
- (this.vo = !1),
21
- (this.Et = new T());
20
+ (this.Co = !1),
21
+ (this._t = new u());
22
22
  }
23
23
  subscribeToClickedEvent(s) {
24
- return this.Et.It(s);
24
+ return this._t.Ns(s);
25
25
  }
26
26
  removeSubscription(s) {
27
- this.Et.removeSubscription(s);
27
+ this._t.removeSubscription(s);
28
28
  }
29
29
  removeAllSubscriptions() {
30
- this.Et.removeAllSubscriptions();
30
+ this._t.removeAllSubscriptions();
31
31
  }
32
- p() {
33
- return !this.vo && ((this.vo = !0), this.Et.Dt(), !0);
32
+ rt() {
33
+ return !this.Co && ((this.Co = !0), this._t.X(), !0);
34
34
  }
35
35
  static fromJson(s) {
36
36
  return new InAppMessageButton(
@@ -44,4 +44,4 @@ export default class InAppMessageButton {
44
44
  );
45
45
  }
46
46
  }
47
- InAppMessageButton.Hi = -1;
47
+ InAppMessageButton.Jr = -1;
@@ -1,11 +1,11 @@
1
- import e, { OPTIONS as L } from "../../managers/braze-instance.js";
2
- import X from "../../util/browser-detector.js";
1
+ import r, { OPTIONS as z } from "../../managers/braze-instance.js";
2
+ import ro from "../../util/browser-detector.js";
3
3
  import {
4
4
  clickElement as Et,
5
5
  supportsPassive as Tt,
6
6
  } from "../../util/dom-utils.js";
7
- import { KeyCodes as mt } from "../../util/key-codes.js";
8
- import T from "../../managers/subscription-manager.js";
7
+ import { KeyCodes as bt } from "../../util/key-codes.js";
8
+ import u from "../../managers/subscription-manager.js";
9
9
  import { isIFrame as It } from "../utils/in-app-message-utils.js";
10
10
  export default class InAppMessage {
11
11
  constructor(
@@ -16,10 +16,10 @@ export default class InAppMessage {
16
16
  e,
17
17
  E,
18
18
  n,
19
+ T,
19
20
  o,
20
21
  r,
21
22
  l,
22
- u,
23
23
  a,
24
24
  I,
25
25
  c,
@@ -47,10 +47,10 @@ export default class InAppMessage {
47
47
  (this.triggerId = e),
48
48
  (this.clickAction = E),
49
49
  (this.uri = n),
50
- (this.openTarget = o),
51
- (this.dismissType = r),
52
- (this.duration = l),
53
- (this.icon = u),
50
+ (this.openTarget = T),
51
+ (this.dismissType = o),
52
+ (this.duration = r),
53
+ (this.icon = l),
54
54
  (this.imageUrl = a),
55
55
  (this.imageStyle = I),
56
56
  (this.iconColor = c),
@@ -72,15 +72,15 @@ export default class InAppMessage {
72
72
  (this.messageExtras = p),
73
73
  (this.message = t),
74
74
  (this.messageAlignment = s || InAppMessage.TextAlignment.CENTER),
75
- (this.duration = l || 5e3),
75
+ (this.duration = r || 5e3),
76
76
  (this.slideFrom = i || InAppMessage.SlideFrom.BOTTOM),
77
77
  (this.extras = h || {}),
78
78
  (this.triggerId = e),
79
79
  (this.clickAction = E || InAppMessage.ClickAction.NONE),
80
80
  (this.uri = n),
81
- (this.openTarget = o || InAppMessage.OpenTarget.NONE),
82
- (this.dismissType = r || InAppMessage.DismissType.AUTO_DISMISS),
83
- (this.icon = u),
81
+ (this.openTarget = T || InAppMessage.OpenTarget.NONE),
82
+ (this.dismissType = o || InAppMessage.DismissType.AUTO_DISMISS),
83
+ (this.icon = l),
84
84
  (this.imageUrl = a),
85
85
  (this.imageStyle = I || InAppMessage.ImageStyle.TOP),
86
86
  (this.iconColor = c || InAppMessage.th.ih),
@@ -104,73 +104,73 @@ export default class InAppMessage {
104
104
  (this.isControl = !1),
105
105
  (this.messageExtras = p),
106
106
  (this.nh = !1),
107
+ (this.st = !1),
108
+ (this.Co = !1),
107
109
  (this.Th = !1),
108
- (this.vo = !1),
109
- (this.oh = !1),
110
- (this.Re = null),
111
- (this.ke = null),
112
- (this.Et = new T()),
113
- (this.rh = new T()),
114
- (this.qe = InAppMessage.TextAlignment.CENTER);
110
+ (this.We = null),
111
+ (this.Xe = null),
112
+ (this._t = new u()),
113
+ (this.oh = new u()),
114
+ (this.do = InAppMessage.TextAlignment.CENTER);
115
115
  }
116
116
  subscribeToClickedEvent(t) {
117
- return this.Et.It(t);
117
+ return this._t.Ns(t);
118
118
  }
119
119
  subscribeToDismissedEvent(t) {
120
- return this.rh.It(t);
120
+ return this.oh.Ns(t);
121
121
  }
122
122
  removeSubscription(t) {
123
- this.Et.removeSubscription(t), this.rh.removeSubscription(t);
123
+ this._t.removeSubscription(t), this.oh.removeSubscription(t);
124
124
  }
125
125
  removeAllSubscriptions() {
126
- this.Et.removeAllSubscriptions(), this.rh.removeAllSubscriptions();
126
+ this._t.removeAllSubscriptions(), this.oh.removeAllSubscriptions();
127
127
  }
128
128
  closeMessage() {
129
- this.Cr(this.Re);
129
+ this.ll(this.We);
130
130
  }
131
- $e() {
131
+ Ye() {
132
132
  return !0;
133
133
  }
134
- do() {
135
- return this.$e();
134
+ Bo() {
135
+ return this.Ye();
136
136
  }
137
- Ce() {
137
+ Ve() {
138
138
  return null != this.htmlId && this.htmlId.length > 4;
139
139
  }
140
- ve() {
141
- return this.Ce() && null != this.css && this.css.length > 0;
140
+ Oe() {
141
+ return this.Ve() && null != this.css && this.css.length > 0;
142
142
  }
143
- we() {
144
- if (this.Ce() && this.ve()) return this.htmlId + "-css";
143
+ _e() {
144
+ if (this.Ve() && this.Oe()) return this.htmlId + "-css";
145
145
  }
146
- K() {
147
- return !this.Th && ((this.Th = !0), !0);
146
+ wt() {
147
+ return !this.st && ((this.st = !0), !0);
148
148
  }
149
- Ur() {
150
- return this.Th;
149
+ ko() {
150
+ return this.st;
151
151
  }
152
- p(t) {
153
- return !this.vo && ((this.vo = !0), this.Et.Dt(), !0);
152
+ rt(t) {
153
+ return !this.Co && ((this.Co = !0), this._t.X(), !0);
154
154
  }
155
- N() {
156
- return !this.oh && ((this.oh = !0), this.rh.Dt(), !0);
155
+ ft() {
156
+ return !this.Th && ((this.Th = !0), this.oh.X(), !0);
157
157
  }
158
158
  hide(t) {
159
159
  if (t && t.parentNode) {
160
160
  let s = t.closest(".ab-iam-root");
161
- if ((null == s && (s = t), this.$e() && null != s.parentNode)) {
161
+ if ((null == s && (s = t), this.Ye() && null != s.parentNode)) {
162
162
  const t = s.parentNode.classList;
163
- t && t.contains(InAppMessage.lh) && t.remove(InAppMessage.lh),
164
- document.body.removeEventListener("touchmove", InAppMessage.uh);
163
+ t && t.contains(InAppMessage.rh) && t.remove(InAppMessage.rh),
164
+ document.body.removeEventListener("touchmove", InAppMessage.lh);
165
165
  }
166
- s.className = s.className.replace(InAppMessage.ah, InAppMessage.Ih);
166
+ s.className = s.className.replace(InAppMessage.uh, InAppMessage.ah);
167
167
  }
168
168
  return this.animateOut || !1;
169
169
  }
170
- Cr(t, s) {
170
+ ll(t, s) {
171
171
  if (null == t) return;
172
172
  let i;
173
- (this.Re = null),
173
+ (this.We = null),
174
174
  (i =
175
175
  -1 === t.className.indexOf("ab-in-app-message")
176
176
  ? t.getElementsByClassName("ab-in-app-message")[0]
@@ -185,52 +185,52 @@ export default class InAppMessage {
185
185
  let s = t.closest(".ab-iam-root");
186
186
  null == s && (s = t), s.parentNode && s.parentNode.removeChild(s);
187
187
  }
188
- const i = this.we();
188
+ const i = this._e();
189
189
  if (null != i) {
190
190
  const t = document.getElementById(i);
191
191
  t && t.parentNode && t.parentNode.removeChild(t);
192
192
  }
193
- null != e && "Safari" === X.browser && (e.scrollTop = E),
194
- s ? s() : this.N();
193
+ null != e && "Safari" === ro.browser && (e.scrollTop = E),
194
+ s ? s() : this.ft();
195
195
  };
196
- h ? setTimeout(n, InAppMessage.Ah) : n(), this.ke && this.ke.focus();
196
+ h ? setTimeout(n, InAppMessage.Ih) : n(), this.Xe && this.Xe.focus();
197
197
  }
198
- Ge() {
198
+ po() {
199
199
  return document.createTextNode(this.message || "");
200
200
  }
201
- Ae(t) {
201
+ uo(t) {
202
202
  let s = "";
203
- this.message || this.header || !this.$e() || (s = "Modal Image"),
203
+ this.message || this.header || !this.Ye() || (s = "Modal Image"),
204
204
  t.setAttribute("alt", s);
205
205
  }
206
- static uh(t) {
206
+ static lh(t) {
207
207
  if (t.targetTouches && t.targetTouches.length > 1) return;
208
208
  const s = t.target;
209
209
  (s &&
210
210
  s.classList &&
211
211
  s.classList.contains("ab-message-text") &&
212
212
  s.scrollHeight > s.clientHeight) ||
213
- (document.querySelector(`.${InAppMessage.lh}`) &&
213
+ (document.querySelector(`.${InAppMessage.rh}`) &&
214
214
  t.cancelable &&
215
215
  t.preventDefault());
216
216
  }
217
- Oh(t) {
217
+ Ah(t) {
218
218
  const s = t.parentNode;
219
- this.$e() &&
219
+ this.Ye() &&
220
220
  null != s &&
221
221
  this.orientation !== InAppMessage.Orientation.LANDSCAPE &&
222
- (null != s.classList && s.classList.add(InAppMessage.lh),
222
+ (null != s.classList && s.classList.add(InAppMessage.rh),
223
223
  document.body.addEventListener(
224
224
  "touchmove",
225
- InAppMessage.uh,
225
+ InAppMessage.lh,
226
226
  !!Tt() && { passive: !1 },
227
227
  )),
228
- (t.className += " " + InAppMessage.ah);
228
+ (t.className += " " + InAppMessage.uh);
229
229
  }
230
- static _h(t) {
230
+ static Oh(t) {
231
231
  if (
232
- t.keyCode === mt.mh &&
233
- !e.nn(L.Lh) &&
232
+ t.keyCode === bt._h &&
233
+ !r.sr(z.mh) &&
234
234
  document.querySelectorAll(".ab-modal-interactions").length > 0
235
235
  ) {
236
236
  const t = document.getElementsByClassName("ab-html-message");
@@ -252,49 +252,49 @@ export default class InAppMessage {
252
252
  }
253
253
  }
254
254
  }
255
- Nh() {
255
+ Lh() {
256
256
  this.nh ||
257
- e.nn(L.Lh) ||
258
- (document.addEventListener("keydown", InAppMessage._h, !1),
259
- e.Sh(() => {
260
- document.removeEventListener("keydown", InAppMessage._h);
257
+ r.sr(z.mh) ||
258
+ (document.addEventListener("keydown", InAppMessage.Oh, !1),
259
+ r.Nh(() => {
260
+ document.removeEventListener("keydown", InAppMessage.Oh);
261
261
  }),
262
262
  (this.nh = !0));
263
263
  }
264
- Y(t) {
264
+ Bs(t) {
265
265
  const s = {};
266
266
  return t
267
- ? ((s[InAppMessage.tt.Vr] = this.message),
268
- (s[InAppMessage.tt.Wr] = this.messageAlignment),
269
- (s[InAppMessage.tt.Rh] = this.slideFrom),
270
- (s[InAppMessage.tt.bt] = this.extras),
271
- (s[InAppMessage.tt.Yr] = this.triggerId),
272
- (s[InAppMessage.tt.Zr] = this.clickAction),
273
- (s[InAppMessage.tt.URI] = this.uri),
274
- (s[InAppMessage.tt.ea] = this.openTarget),
275
- (s[InAppMessage.tt.ra] = this.dismissType),
276
- (s[InAppMessage.tt.sa] = this.duration),
277
- (s[InAppMessage.tt.ta] = this.icon),
278
- (s[InAppMessage.tt.ot] = this.imageUrl),
279
- (s[InAppMessage.tt.ia] = this.imageStyle),
280
- (s[InAppMessage.tt.aa] = this.iconColor),
281
- (s[InAppMessage.tt.oa] = this.iconBackgroundColor),
282
- (s[InAppMessage.tt.pa] = this.backgroundColor),
283
- (s[InAppMessage.tt.ma] = this.textColor),
284
- (s[InAppMessage.tt.na] = this.closeButtonColor),
285
- (s[InAppMessage.tt.ua] = this.animateIn),
286
- (s[InAppMessage.tt.ca] = this.animateOut),
287
- (s[InAppMessage.tt.fa] = this.header),
288
- (s[InAppMessage.tt.da] = this.headerAlignment),
289
- (s[InAppMessage.tt.la] = this.headerTextColor),
290
- (s[InAppMessage.tt.ga] = this.frameColor),
291
- (s[InAppMessage.tt.ja] = this.buttons),
292
- (s[InAppMessage.tt.xa] = this.cropType),
293
- (s[InAppMessage.tt.za] = this.orientation),
294
- (s[InAppMessage.tt.ha] = this.htmlId),
295
- (s[InAppMessage.tt.CSS] = this.css),
296
- (s[InAppMessage.tt.Z] = t),
297
- (s[InAppMessage.tt.va] = this.messageExtras),
267
+ ? ((s[InAppMessage.qt.ra] = this.message),
268
+ (s[InAppMessage.qt.sa] = this.messageAlignment),
269
+ (s[InAppMessage.qt.Sh] = this.slideFrom),
270
+ (s[InAppMessage.qt.St] = this.extras),
271
+ (s[InAppMessage.qt.ta] = this.triggerId),
272
+ (s[InAppMessage.qt.ia] = this.clickAction),
273
+ (s[InAppMessage.qt.URI] = this.uri),
274
+ (s[InAppMessage.qt.oa] = this.openTarget),
275
+ (s[InAppMessage.qt.pa] = this.dismissType),
276
+ (s[InAppMessage.qt.ma] = this.duration),
277
+ (s[InAppMessage.qt.na] = this.icon),
278
+ (s[InAppMessage.qt.Jt] = this.imageUrl),
279
+ (s[InAppMessage.qt.ua] = this.imageStyle),
280
+ (s[InAppMessage.qt.ca] = this.iconColor),
281
+ (s[InAppMessage.qt.fa] = this.iconBackgroundColor),
282
+ (s[InAppMessage.qt.da] = this.backgroundColor),
283
+ (s[InAppMessage.qt.la] = this.textColor),
284
+ (s[InAppMessage.qt.ga] = this.closeButtonColor),
285
+ (s[InAppMessage.qt.ja] = this.animateIn),
286
+ (s[InAppMessage.qt.xa] = this.animateOut),
287
+ (s[InAppMessage.qt.za] = this.header),
288
+ (s[InAppMessage.qt.ha] = this.headerAlignment),
289
+ (s[InAppMessage.qt.va] = this.headerTextColor),
290
+ (s[InAppMessage.qt.wa] = this.frameColor),
291
+ (s[InAppMessage.qt.ya] = this.buttons),
292
+ (s[InAppMessage.qt.Sa] = this.cropType),
293
+ (s[InAppMessage.qt.ba] = this.orientation),
294
+ (s[InAppMessage.qt.ka] = this.htmlId),
295
+ (s[InAppMessage.qt.CSS] = this.css),
296
+ (s[InAppMessage.qt.zt] = t),
297
+ (s[InAppMessage.qt.qa] = this.messageExtras),
298
298
  s)
299
299
  : s;
300
300
  }
@@ -303,19 +303,19 @@ export default class InAppMessage {
303
303
  hh: 4281545523,
304
304
  ih: 4294967295,
305
305
  sh: 4278219733,
306
- Mh: 4293914607,
307
- Dh: 4283782485,
306
+ Rh: 4293914607,
307
+ Mh: 4283782485,
308
308
  Eh: 3224580915,
309
309
  eh: 4288387995,
310
310
  }),
311
- (InAppMessage.Le = {
312
- Ch: "hd",
313
- ze: "ias",
314
- dh: "of",
315
- Uh: "do",
316
- bh: "umt",
317
- Ph: "tf",
318
- ph: "te",
311
+ (InAppMessage.lo = {
312
+ Dh: "hd",
313
+ Ze: "ias",
314
+ Ch: "of",
315
+ dh: "do",
316
+ Uh: "umt",
317
+ bh: "tf",
318
+ Ph: "te",
319
319
  }),
320
320
  (InAppMessage.SlideFrom = { TOP: "TOP", BOTTOM: "BOTTOM" }),
321
321
  (InAppMessage.ClickAction = {
@@ -339,51 +339,51 @@ export default class InAppMessage {
339
339
  CENTER_CROP: "CENTER_CROP",
340
340
  FIT_CENTER: "FIT_CENTER",
341
341
  }),
342
- (InAppMessage.Be = {
343
- Kr: "SLIDEUP",
344
- Jr: "MODAL",
345
- Ue: "MODAL_STYLED",
346
- Or: "FULL",
347
- Hr: "WEB_HTML",
348
- Me: "HTML",
349
- Ve: "HTML_FULL",
342
+ (InAppMessage.Qe = {
343
+ jn: "SLIDEUP",
344
+ dn: "MODAL",
345
+ xo: "MODAL_STYLED",
346
+ gn: "FULL",
347
+ fn: "WEB_HTML",
348
+ Le: "HTML",
349
+ Io: "HTML_FULL",
350
350
  }),
351
- (InAppMessage.Ah = 500),
352
- (InAppMessage.fh = 200),
353
- (InAppMessage.ah = "ab-show"),
354
- (InAppMessage.Ih = "ab-hide"),
355
- (InAppMessage.lh = "ab-pause-scrolling"),
356
- (InAppMessage.tt = {
357
- Vr: "m",
358
- Wr: "ma",
359
- Rh: "sf",
360
- bt: "e",
361
- Yr: "ti",
362
- Zr: "ca",
351
+ (InAppMessage.Ih = 500),
352
+ (InAppMessage.ph = 200),
353
+ (InAppMessage.uh = "ab-show"),
354
+ (InAppMessage.ah = "ab-hide"),
355
+ (InAppMessage.rh = "ab-pause-scrolling"),
356
+ (InAppMessage.qt = {
357
+ ra: "m",
358
+ sa: "ma",
359
+ Sh: "sf",
360
+ St: "e",
361
+ ta: "ti",
362
+ ia: "ca",
363
363
  URI: "u",
364
- ea: "oa",
365
- ra: "dt",
366
- sa: "d",
367
- ta: "i",
368
- ot: "iu",
369
- ia: "is",
370
- aa: "ic",
371
- oa: "ibc",
372
- pa: "bc",
373
- ma: "tc",
374
- na: "cbc",
375
- ua: "ai",
376
- ca: "ao",
377
- fa: "h",
378
- da: "ha",
379
- la: "htc",
380
- ga: "fc",
381
- ja: "b",
382
- xa: "ct",
383
- za: "o",
384
- ha: "hi",
364
+ oa: "oa",
365
+ pa: "dt",
366
+ ma: "d",
367
+ na: "i",
368
+ Jt: "iu",
369
+ ua: "is",
370
+ ca: "ic",
371
+ fa: "ibc",
372
+ da: "bc",
373
+ la: "tc",
374
+ ga: "cbc",
375
+ ja: "ai",
376
+ xa: "ao",
377
+ za: "h",
378
+ ha: "ha",
379
+ va: "htc",
380
+ wa: "fc",
381
+ ya: "b",
382
+ Sa: "ct",
383
+ ba: "o",
384
+ ka: "hi",
385
385
  CSS: "css",
386
- Z: "type",
387
- uo: "messageFields",
388
- va: "me",
386
+ zt: "type",
387
+ Po: "messageFields",
388
+ qa: "me",
389
389
  });
@@ -63,42 +63,42 @@ export default class ModalMessage extends InAppMessage {
63
63
  q,
64
64
  A,
65
65
  ),
66
- (this.qe = InAppMessage.TextAlignment.CENTER);
66
+ (this.do = InAppMessage.TextAlignment.CENTER);
67
67
  }
68
- Y() {
69
- return super.Y(ModalMessage.it);
68
+ Bs() {
69
+ return super.Bs(ModalMessage.Dt);
70
70
  }
71
- static Xr(e) {
71
+ static hn(e) {
72
72
  return new ModalMessage(
73
- e[InAppMessage.tt.Vr],
74
- e[InAppMessage.tt.Wr],
75
- e[InAppMessage.tt.bt],
76
- e[InAppMessage.tt.Yr],
77
- e[InAppMessage.tt.Zr],
78
- e[InAppMessage.tt.URI],
79
- e[InAppMessage.tt.ea],
80
- e[InAppMessage.tt.ra],
81
- e[InAppMessage.tt.sa],
82
- e[InAppMessage.tt.ta],
83
- e[InAppMessage.tt.ot],
84
- e[InAppMessage.tt.ia],
85
- e[InAppMessage.tt.aa],
86
- e[InAppMessage.tt.oa],
87
- e[InAppMessage.tt.pa],
88
- e[InAppMessage.tt.ma],
89
- e[InAppMessage.tt.na],
90
- e[InAppMessage.tt.ua],
91
- e[InAppMessage.tt.ca],
92
- e[InAppMessage.tt.fa],
93
- e[InAppMessage.tt.da],
94
- e[InAppMessage.tt.la],
95
- e[InAppMessage.tt.ga],
96
- pe(e[InAppMessage.tt.ja]),
97
- e[InAppMessage.tt.xa],
98
- e[InAppMessage.tt.ha],
99
- e[InAppMessage.tt.CSS],
100
- e[InAppMessage.tt.va],
73
+ e[InAppMessage.qt.ra],
74
+ e[InAppMessage.qt.sa],
75
+ e[InAppMessage.qt.St],
76
+ e[InAppMessage.qt.ta],
77
+ e[InAppMessage.qt.ia],
78
+ e[InAppMessage.qt.URI],
79
+ e[InAppMessage.qt.oa],
80
+ e[InAppMessage.qt.pa],
81
+ e[InAppMessage.qt.ma],
82
+ e[InAppMessage.qt.na],
83
+ e[InAppMessage.qt.Jt],
84
+ e[InAppMessage.qt.ua],
85
+ e[InAppMessage.qt.ca],
86
+ e[InAppMessage.qt.fa],
87
+ e[InAppMessage.qt.da],
88
+ e[InAppMessage.qt.la],
89
+ e[InAppMessage.qt.ga],
90
+ e[InAppMessage.qt.ja],
91
+ e[InAppMessage.qt.xa],
92
+ e[InAppMessage.qt.za],
93
+ e[InAppMessage.qt.ha],
94
+ e[InAppMessage.qt.va],
95
+ e[InAppMessage.qt.wa],
96
+ pe(e[InAppMessage.qt.ya]),
97
+ e[InAppMessage.qt.Sa],
98
+ e[InAppMessage.qt.ka],
99
+ e[InAppMessage.qt.CSS],
100
+ e[InAppMessage.qt.qa],
101
101
  );
102
102
  }
103
103
  }
104
- ModalMessage.it = InAppMessage.Be.Jr;
104
+ ModalMessage.Dt = InAppMessage.Qe.dn;