@braze/web-sdk 5.2.0 → 5.3.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.
- package/index.d.ts +54 -5
- package/package.json +1 -1
- package/shared-lib/event-types.js +14 -14
- package/shared-lib/indexed-db-adapter.js +51 -51
- package/shared-lib/logger.js +7 -7
- package/shared-lib/supported-options.js +7 -7
- package/src/ContentCards/content-cards-provider.js +107 -135
- package/src/ContentCards/get-cached-content-cards.js +1 -1
- package/src/ContentCards/request-content-cards-refresh.js +1 -1
- package/src/ContentCards/subscribe-to-content-cards-updates.js +2 -2
- package/src/ContentCards/ui/show-content-cards.js +1 -1
- package/src/FeatureFlags/feature-flag.js +41 -30
- package/src/FeatureFlags/feature-flags-provider.js +88 -84
- package/src/FeatureFlags/get-all-feature-flags.js +2 -2
- package/src/FeatureFlags/get-feature-flag.js +2 -2
- package/src/FeatureFlags/log-feature-flag-impression.js +3 -3
- package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
- package/src/Feed/feed-provider.js +24 -24
- package/src/Feed/get-cached-feed.js +1 -1
- package/src/Feed/log-feed-displayed.js +1 -1
- package/src/Feed/request-feed-refresh.js +1 -1
- package/src/Feed/subscribe-to-feed-updates.js +1 -1
- package/src/Feed/ui/show-feed.js +1 -1
- package/src/InAppMessage/defer-in-app-message.js +1 -1
- package/src/InAppMessage/display/html-message-to-html.js +9 -9
- package/src/InAppMessage/display/in-app-message-to-html.js +20 -20
- package/src/InAppMessage/display/modal-utils.js +5 -5
- package/src/InAppMessage/get-deferred-in-app-message.js +1 -1
- package/src/InAppMessage/in-app-message-factory.js +4 -4
- package/src/InAppMessage/in-app-message-manager.js +78 -75
- package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
- package/src/InAppMessage/log-in-app-message-click.js +3 -3
- package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
- package/src/InAppMessage/log-in-app-message-impression.js +1 -1
- package/src/InAppMessage/models/full-screen-message.js +12 -12
- package/src/InAppMessage/models/html-message.js +9 -9
- package/src/InAppMessage/models/in-app-message-button.js +2 -2
- package/src/InAppMessage/models/in-app-message.js +84 -82
- package/src/InAppMessage/models/modal-message.js +12 -12
- package/src/InAppMessage/models/slide-up-message.js +17 -17
- package/src/InAppMessage/models/templated-in-app-message.js +8 -8
- package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
- package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
- package/src/InAppMessage/ui/show-in-app-message.js +17 -17
- package/src/Push/push-manager-factory.js +6 -6
- package/src/Push/push-manager.js +1 -1
- package/src/Push/utils/push-utils.js +1 -1
- package/src/User/user.js +12 -12
- package/src/common/base-provider.js +1 -1
- package/src/common/constants.js +0 -2
- package/src/common/event-logger.js +2 -2
- package/src/common/feed-display.js +1 -1
- package/src/managers/auth-manager.js +3 -3
- package/src/managers/braze-instance.js +73 -73
- package/src/managers/device-manager.js +15 -15
- package/src/managers/network-manager.js +190 -145
- package/src/managers/server-config-manager.js +43 -47
- package/src/managers/session-manager.js +21 -21
- package/src/managers/storage-manager-factory.js +1 -1
- package/src/managers/storage-manager.js +107 -107
- package/src/managers/utils.js +1 -1
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +6 -6
- package/src/models/device.js +2 -2
- package/src/models/identifier.js +8 -8
- package/src/models/server-config.js +25 -25
- package/src/request-controller.js +115 -108
- package/src/triggers/models/custom-event-data.js +2 -2
- package/src/triggers/models/custom-event-property-data.js +4 -4
- package/src/triggers/models/filter-set.js +3 -3
- package/src/triggers/models/filter.js +55 -55
- package/src/triggers/models/in-app-message-click-data.js +8 -8
- package/src/triggers/models/purchase-data.js +2 -2
- package/src/triggers/models/purchase-property-data.js +4 -4
- package/src/triggers/models/push-click-data.js +3 -3
- package/src/triggers/models/trigger-condition.js +40 -40
- package/src/triggers/models/trigger-events.js +1 -1
- package/src/triggers/models/trigger.js +31 -31
- package/src/triggers/triggers-provider-factory.js +1 -1
- package/src/triggers/triggers-provider.js +40 -40
- package/src/ui/js/attach-css.js +2 -2
- package/src/util/base-device-parser.js +7 -7
- package/src/util/braze-actions.js +4 -4
- package/src/util/browser-detector.js +23 -23
- package/src/util/client-hints-parser.js +4 -4
- package/src/util/dom-utils.js +6 -6
- package/src/util/net.js +4 -4
- package/src/util/request-header-utils.js +36 -37
- package/src/util/user-agent-parser.js +7 -7
- package/src/util/window-utils.js +1 -1
|
@@ -107,11 +107,11 @@ export default class InAppMessage {
|
|
|
107
107
|
(this.Th = !1),
|
|
108
108
|
(this.vo = !1),
|
|
109
109
|
(this.oh = !1),
|
|
110
|
-
(this.
|
|
111
|
-
(this.
|
|
110
|
+
(this.Me = null),
|
|
111
|
+
(this.ke = null),
|
|
112
112
|
(this.Et = new T()),
|
|
113
113
|
(this.rh = new T()),
|
|
114
|
-
(this
|
|
114
|
+
(this.De = InAppMessage.TextAlignment.CENTER);
|
|
115
115
|
}
|
|
116
116
|
subscribeToClickedEvent(t) {
|
|
117
117
|
return this.Et.It(t);
|
|
@@ -126,27 +126,27 @@ export default class InAppMessage {
|
|
|
126
126
|
this.Et.removeAllSubscriptions(), this.rh.removeAllSubscriptions();
|
|
127
127
|
}
|
|
128
128
|
closeMessage() {
|
|
129
|
-
this.
|
|
129
|
+
this.Ae(this.Me);
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
ze() {
|
|
132
132
|
return !0;
|
|
133
133
|
}
|
|
134
134
|
do() {
|
|
135
|
-
return this.
|
|
135
|
+
return this.ze();
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
xe() {
|
|
138
138
|
return null != this.htmlId && this.htmlId.length > 4;
|
|
139
139
|
}
|
|
140
|
-
|
|
141
|
-
return this.
|
|
140
|
+
Ce() {
|
|
141
|
+
return this.xe() && null != this.css && this.css.length > 0;
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
if (this.
|
|
143
|
+
ve() {
|
|
144
|
+
if (this.xe() && this.Ce()) return this.htmlId + "-css";
|
|
145
145
|
}
|
|
146
146
|
K() {
|
|
147
147
|
return !this.Th && ((this.Th = !0), !0);
|
|
148
148
|
}
|
|
149
|
-
|
|
149
|
+
Ur() {
|
|
150
150
|
return this.Th;
|
|
151
151
|
}
|
|
152
152
|
p(t) {
|
|
@@ -158,7 +158,7 @@ export default class InAppMessage {
|
|
|
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.
|
|
161
|
+
if ((null == s && (s = t), this.ze() && null != s.parentNode)) {
|
|
162
162
|
const t = s.parentNode.classList;
|
|
163
163
|
t && t.contains(InAppMessage.lh) && t.remove(InAppMessage.lh),
|
|
164
164
|
document.body.removeEventListener("touchmove", InAppMessage.uh);
|
|
@@ -167,10 +167,10 @@ export default class InAppMessage {
|
|
|
167
167
|
}
|
|
168
168
|
return this.animateOut || !1;
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
Ae(t, s) {
|
|
171
171
|
if (null == t) return;
|
|
172
172
|
let i;
|
|
173
|
-
(this.
|
|
173
|
+
(this.Me = null),
|
|
174
174
|
(i =
|
|
175
175
|
-1 === t.className.indexOf("ab-in-app-message")
|
|
176
176
|
? t.getElementsByClassName("ab-in-app-message")[0]
|
|
@@ -185,7 +185,7 @@ 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.
|
|
188
|
+
const i = this.ve();
|
|
189
189
|
if (null != i) {
|
|
190
190
|
const t = document.getElementById(i);
|
|
191
191
|
t && t.parentNode && t.parentNode.removeChild(t);
|
|
@@ -193,14 +193,14 @@ export default class InAppMessage {
|
|
|
193
193
|
null != e && "Safari" === X.browser && (e.scrollTop = E),
|
|
194
194
|
s ? s() : this.N();
|
|
195
195
|
};
|
|
196
|
-
h ? setTimeout(n, InAppMessage.Ah) : n(), this.
|
|
196
|
+
h ? setTimeout(n, InAppMessage.Ah) : n(), this.ke && this.ke.focus();
|
|
197
197
|
}
|
|
198
|
-
|
|
198
|
+
Je() {
|
|
199
199
|
return document.createTextNode(this.message || "");
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
Ge(t) {
|
|
202
202
|
let s = "";
|
|
203
|
-
this.message || this.header || !this.
|
|
203
|
+
this.message || this.header || !this.ze() || (s = "Modal Image"),
|
|
204
204
|
t.setAttribute("alt", s);
|
|
205
205
|
}
|
|
206
206
|
static uh(t) {
|
|
@@ -210,11 +210,13 @@ export default class InAppMessage {
|
|
|
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.lh}`) &&
|
|
214
|
+
t.cancelable &&
|
|
215
|
+
t.preventDefault());
|
|
214
216
|
}
|
|
215
217
|
Oh(t) {
|
|
216
218
|
const s = t.parentNode;
|
|
217
|
-
this.
|
|
219
|
+
this.ze() &&
|
|
218
220
|
null != s &&
|
|
219
221
|
this.orientation !== InAppMessage.Orientation.LANDSCAPE &&
|
|
220
222
|
(null != s.classList && s.classList.add(InAppMessage.lh),
|
|
@@ -262,37 +264,37 @@ export default class InAppMessage {
|
|
|
262
264
|
Y(t) {
|
|
263
265
|
const s = {};
|
|
264
266
|
return t
|
|
265
|
-
? ((s[InAppMessage.tt.
|
|
266
|
-
(s[InAppMessage.tt.
|
|
267
|
+
? ((s[InAppMessage.tt.Vr] = this.message),
|
|
268
|
+
(s[InAppMessage.tt.Wr] = this.messageAlignment),
|
|
267
269
|
(s[InAppMessage.tt.Rh] = this.slideFrom),
|
|
268
270
|
(s[InAppMessage.tt.bt] = this.extras),
|
|
269
|
-
(s[InAppMessage.tt.
|
|
270
|
-
(s[InAppMessage.tt.
|
|
271
|
+
(s[InAppMessage.tt.Yr] = this.triggerId),
|
|
272
|
+
(s[InAppMessage.tt.Zr] = this.clickAction),
|
|
271
273
|
(s[InAppMessage.tt.URI] = this.uri),
|
|
272
|
-
(s[InAppMessage.tt.
|
|
273
|
-
(s[InAppMessage.tt.
|
|
274
|
-
(s[InAppMessage.tt.
|
|
275
|
-
(s[InAppMessage.tt.
|
|
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),
|
|
276
278
|
(s[InAppMessage.tt.ot] = this.imageUrl),
|
|
277
|
-
(s[InAppMessage.tt.
|
|
278
|
-
(s[InAppMessage.tt.
|
|
279
|
-
(s[InAppMessage.tt.
|
|
280
|
-
(s[InAppMessage.tt.
|
|
281
|
-
(s[InAppMessage.tt.
|
|
282
|
-
(s[InAppMessage.tt.
|
|
283
|
-
(s[InAppMessage.tt.
|
|
284
|
-
(s[InAppMessage.tt.
|
|
285
|
-
(s[InAppMessage.tt.
|
|
286
|
-
(s[InAppMessage.tt.
|
|
287
|
-
(s[InAppMessage.tt.
|
|
288
|
-
(s[InAppMessage.tt.
|
|
289
|
-
(s[InAppMessage.tt.
|
|
290
|
-
(s[InAppMessage.tt.
|
|
291
|
-
(s[InAppMessage.tt.
|
|
292
|
-
(s[InAppMessage.tt.
|
|
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),
|
|
293
295
|
(s[InAppMessage.tt.CSS] = this.css),
|
|
294
296
|
(s[InAppMessage.tt.Z] = t),
|
|
295
|
-
(s[InAppMessage.tt.
|
|
297
|
+
(s[InAppMessage.tt.va] = this.messageExtras),
|
|
296
298
|
s)
|
|
297
299
|
: s;
|
|
298
300
|
}
|
|
@@ -306,9 +308,9 @@ export default class InAppMessage {
|
|
|
306
308
|
Eh: 3224580915,
|
|
307
309
|
eh: 4288387995,
|
|
308
310
|
}),
|
|
309
|
-
(InAppMessage.
|
|
311
|
+
(InAppMessage.Be = {
|
|
310
312
|
Ch: "hd",
|
|
311
|
-
|
|
313
|
+
Le: "ias",
|
|
312
314
|
dh: "of",
|
|
313
315
|
Uh: "do",
|
|
314
316
|
bh: "umt",
|
|
@@ -337,14 +339,14 @@ export default class InAppMessage {
|
|
|
337
339
|
CENTER_CROP: "CENTER_CROP",
|
|
338
340
|
FIT_CENTER: "FIT_CENTER",
|
|
339
341
|
}),
|
|
340
|
-
(InAppMessage.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
342
|
+
(InAppMessage.qe = {
|
|
343
|
+
Kr: "SLIDEUP",
|
|
344
|
+
Jr: "MODAL",
|
|
345
|
+
Ve: "MODAL_STYLED",
|
|
346
|
+
Or: "FULL",
|
|
347
|
+
Hr: "WEB_HTML",
|
|
348
|
+
$e: "HTML",
|
|
349
|
+
We: "HTML_FULL",
|
|
348
350
|
}),
|
|
349
351
|
(InAppMessage.Ah = 500),
|
|
350
352
|
(InAppMessage.fh = 200),
|
|
@@ -352,36 +354,36 @@ export default class InAppMessage {
|
|
|
352
354
|
(InAppMessage.Ih = "ab-hide"),
|
|
353
355
|
(InAppMessage.lh = "ab-pause-scrolling"),
|
|
354
356
|
(InAppMessage.tt = {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
+
Vr: "m",
|
|
358
|
+
Wr: "ma",
|
|
357
359
|
Rh: "sf",
|
|
358
360
|
bt: "e",
|
|
359
|
-
|
|
360
|
-
|
|
361
|
+
Yr: "ti",
|
|
362
|
+
Zr: "ca",
|
|
361
363
|
URI: "u",
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
ea: "oa",
|
|
365
|
+
ra: "dt",
|
|
366
|
+
sa: "d",
|
|
367
|
+
ta: "i",
|
|
366
368
|
ot: "iu",
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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",
|
|
383
385
|
CSS: "css",
|
|
384
386
|
Z: "type",
|
|
385
387
|
uo: "messageFields",
|
|
386
|
-
|
|
388
|
+
va: "me",
|
|
387
389
|
});
|
|
@@ -63,24 +63,28 @@ export default class ModalMessage extends InAppMessage {
|
|
|
63
63
|
q,
|
|
64
64
|
A,
|
|
65
65
|
),
|
|
66
|
-
(this
|
|
66
|
+
(this.De = InAppMessage.TextAlignment.CENTER);
|
|
67
67
|
}
|
|
68
68
|
Y() {
|
|
69
69
|
return super.Y(ModalMessage.it);
|
|
70
70
|
}
|
|
71
|
-
static
|
|
71
|
+
static Xr(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],
|
|
73
79
|
e[InAppMessage.tt.ea],
|
|
74
80
|
e[InAppMessage.tt.ra],
|
|
75
|
-
e[InAppMessage.tt.bt],
|
|
76
81
|
e[InAppMessage.tt.sa],
|
|
77
82
|
e[InAppMessage.tt.ta],
|
|
78
|
-
e[InAppMessage.tt.
|
|
83
|
+
e[InAppMessage.tt.ot],
|
|
79
84
|
e[InAppMessage.tt.ia],
|
|
80
85
|
e[InAppMessage.tt.aa],
|
|
81
86
|
e[InAppMessage.tt.oa],
|
|
82
87
|
e[InAppMessage.tt.pa],
|
|
83
|
-
e[InAppMessage.tt.ot],
|
|
84
88
|
e[InAppMessage.tt.ma],
|
|
85
89
|
e[InAppMessage.tt.na],
|
|
86
90
|
e[InAppMessage.tt.ua],
|
|
@@ -89,16 +93,12 @@ export default class ModalMessage extends InAppMessage {
|
|
|
89
93
|
e[InAppMessage.tt.da],
|
|
90
94
|
e[InAppMessage.tt.la],
|
|
91
95
|
e[InAppMessage.tt.ga],
|
|
92
|
-
e[InAppMessage.tt.ja],
|
|
96
|
+
pe(e[InAppMessage.tt.ja]),
|
|
93
97
|
e[InAppMessage.tt.xa],
|
|
94
|
-
e[InAppMessage.tt.za],
|
|
95
98
|
e[InAppMessage.tt.ha],
|
|
96
|
-
pe(e[InAppMessage.tt.va]),
|
|
97
|
-
e[InAppMessage.tt.wa],
|
|
98
|
-
e[InAppMessage.tt.Sa],
|
|
99
99
|
e[InAppMessage.tt.CSS],
|
|
100
|
-
e[InAppMessage.tt.
|
|
100
|
+
e[InAppMessage.tt.va],
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
ModalMessage.it = InAppMessage.
|
|
104
|
+
ModalMessage.it = InAppMessage.qe.Jr;
|
|
@@ -59,18 +59,18 @@ export default class SlideUpMessage extends InAppMessage {
|
|
|
59
59
|
M,
|
|
60
60
|
b,
|
|
61
61
|
),
|
|
62
|
-
(this
|
|
62
|
+
(this.De = InAppMessage.TextAlignment.START);
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
ze() {
|
|
65
65
|
return !1;
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
Je() {
|
|
68
68
|
const e = document.createElement("span");
|
|
69
69
|
return e.appendChild(document.createTextNode(this.message || "")), e;
|
|
70
70
|
}
|
|
71
71
|
Oh(e) {
|
|
72
72
|
const t = e.getElementsByClassName("ab-in-app-message")[0];
|
|
73
|
-
de.
|
|
73
|
+
de.po(t, !0, !0) ||
|
|
74
74
|
(this.slideFrom === InAppMessage.SlideFrom.TOP
|
|
75
75
|
? (t.style.top = "0px")
|
|
76
76
|
: (t.style.bottom = "0px")),
|
|
@@ -79,31 +79,31 @@ export default class SlideUpMessage extends InAppMessage {
|
|
|
79
79
|
Y() {
|
|
80
80
|
return super.Y(SlideUpMessage.it);
|
|
81
81
|
}
|
|
82
|
-
static
|
|
82
|
+
static Xr(e) {
|
|
83
83
|
return new SlideUpMessage(
|
|
84
|
-
e[InAppMessage.tt.
|
|
85
|
-
e[InAppMessage.tt.
|
|
84
|
+
e[InAppMessage.tt.Vr],
|
|
85
|
+
e[InAppMessage.tt.Wr],
|
|
86
86
|
e[InAppMessage.tt.Rh],
|
|
87
87
|
e[InAppMessage.tt.bt],
|
|
88
|
+
e[InAppMessage.tt.Yr],
|
|
89
|
+
e[InAppMessage.tt.Zr],
|
|
90
|
+
e[InAppMessage.tt.URI],
|
|
91
|
+
e[InAppMessage.tt.ea],
|
|
92
|
+
e[InAppMessage.tt.ra],
|
|
88
93
|
e[InAppMessage.tt.sa],
|
|
89
94
|
e[InAppMessage.tt.ta],
|
|
90
|
-
e[InAppMessage.tt.
|
|
91
|
-
e[InAppMessage.tt.ia],
|
|
95
|
+
e[InAppMessage.tt.ot],
|
|
92
96
|
e[InAppMessage.tt.aa],
|
|
93
97
|
e[InAppMessage.tt.oa],
|
|
94
98
|
e[InAppMessage.tt.pa],
|
|
95
|
-
e[InAppMessage.tt.
|
|
99
|
+
e[InAppMessage.tt.ma],
|
|
96
100
|
e[InAppMessage.tt.na],
|
|
97
101
|
e[InAppMessage.tt.ua],
|
|
98
102
|
e[InAppMessage.tt.ca],
|
|
99
|
-
e[InAppMessage.tt.
|
|
100
|
-
e[InAppMessage.tt.da],
|
|
101
|
-
e[InAppMessage.tt.la],
|
|
102
|
-
e[InAppMessage.tt.ga],
|
|
103
|
-
e[InAppMessage.tt.Sa],
|
|
103
|
+
e[InAppMessage.tt.ha],
|
|
104
104
|
e[InAppMessage.tt.CSS],
|
|
105
|
-
e[InAppMessage.tt.
|
|
105
|
+
e[InAppMessage.tt.va],
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
SlideUpMessage.it = InAppMessage.
|
|
109
|
+
SlideUpMessage.it = InAppMessage.qe.Kr;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export default class wt {
|
|
2
2
|
constructor(t, s, i, h, l) {
|
|
3
3
|
(this.triggerId = t),
|
|
4
|
-
(this.
|
|
5
|
-
(this.
|
|
6
|
-
(this.
|
|
7
|
-
(this.
|
|
4
|
+
(this.Er = s),
|
|
5
|
+
(this.Tr = i),
|
|
6
|
+
(this.Gr = h),
|
|
7
|
+
(this.Nr = l),
|
|
8
8
|
(this.triggerId = t),
|
|
9
|
-
(this.
|
|
10
|
-
(this.
|
|
11
|
-
(this.
|
|
12
|
-
(this.
|
|
9
|
+
(this.Er = s),
|
|
10
|
+
(this.Tr = i),
|
|
11
|
+
(this.Gr = h),
|
|
12
|
+
(this.Nr = l);
|
|
13
13
|
}
|
|
14
14
|
static fromJson(t, s, i, h, l) {
|
|
15
15
|
return null == t || null == t.trigger_id
|
|
@@ -7,9 +7,9 @@ export function automaticallyShowInAppMessages() {
|
|
|
7
7
|
if (!e.X()) return;
|
|
8
8
|
ss();
|
|
9
9
|
const s = se.m();
|
|
10
|
-
if (null == s.
|
|
10
|
+
if (null == s.Pi()) {
|
|
11
11
|
const r = subscribeToInAppMessage((s) => showInAppMessage(s));
|
|
12
|
-
s
|
|
12
|
+
s.$i(r);
|
|
13
13
|
}
|
|
14
|
-
return s.
|
|
14
|
+
return s.Pi();
|
|
15
15
|
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
ORIENTATION as fe,
|
|
11
11
|
WindowUtils as eo,
|
|
12
12
|
} from "../../util/window-utils.js";
|
|
13
|
-
import { isURIJavascriptOrData as
|
|
13
|
+
import { isURIJavascriptOrData as R } from "../../util/url-utils.js";
|
|
14
14
|
import { KeyCodes as lt } from "../../util/key-codes.js";
|
|
15
15
|
import { setupInAppMessageUI as ss } from "../../ui/js/index.js";
|
|
16
16
|
import { logger as r } from "../../../shared-lib/index.js";
|
|
@@ -39,7 +39,7 @@ export function showInAppMessage(t, s, o) {
|
|
|
39
39
|
),
|
|
40
40
|
!1
|
|
41
41
|
);
|
|
42
|
-
if ((null == s && (s = document.body), t.
|
|
42
|
+
if ((null == s && (s = document.body), t.ze())) {
|
|
43
43
|
if (s.querySelectorAll(".ab-modal-interactions").length > 0)
|
|
44
44
|
return (
|
|
45
45
|
r.info(
|
|
@@ -49,7 +49,7 @@ export function showInAppMessage(t, s, o) {
|
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
if (eo.fo()) {
|
|
52
|
-
const e = eo.
|
|
52
|
+
const e = eo.co();
|
|
53
53
|
if (
|
|
54
54
|
(e === fe.PORTRAIT &&
|
|
55
55
|
t.orientation === InAppMessage.Orientation.LANDSCAPE) ||
|
|
@@ -76,9 +76,9 @@ export function showInAppMessage(t, s, o) {
|
|
|
76
76
|
for (let t = 0; t < s.length; t++)
|
|
77
77
|
if (s[t].clickAction === InAppMessage.ClickAction.URI) {
|
|
78
78
|
const o = s[t].uri;
|
|
79
|
-
e =
|
|
79
|
+
e = R(o);
|
|
80
80
|
}
|
|
81
|
-
} else t.clickAction === InAppMessage.ClickAction.URI && (e =
|
|
81
|
+
} else t.clickAction === InAppMessage.ClickAction.URI && (e = R(t.uri));
|
|
82
82
|
if (e)
|
|
83
83
|
return (
|
|
84
84
|
r.error(
|
|
@@ -92,15 +92,15 @@ export function showInAppMessage(t, s, o) {
|
|
|
92
92
|
((n.className = "ab-iam-root v3"),
|
|
93
93
|
(n.className += me(t)),
|
|
94
94
|
n.setAttribute("role", "complementary"),
|
|
95
|
-
t.
|
|
96
|
-
e.nn(L.
|
|
95
|
+
t.xe() && (n.id = t.htmlId),
|
|
96
|
+
e.nn(L.jo) && (n.style.zIndex = (e.nn(L.jo) + 1).toString()),
|
|
97
97
|
s.appendChild(n),
|
|
98
|
-
t.
|
|
98
|
+
t.Ce())
|
|
99
99
|
) {
|
|
100
100
|
const s = document.createElement("style");
|
|
101
101
|
(s.innerHTML = t.css),
|
|
102
|
-
(s.id = t.
|
|
103
|
-
null != e.nn(L.
|
|
102
|
+
(s.id = t.ve()),
|
|
103
|
+
null != e.nn(L.bo) && s.setAttribute("nonce", e.nn(L.bo)),
|
|
104
104
|
document.getElementsByTagName("head")[0].appendChild(s);
|
|
105
105
|
}
|
|
106
106
|
const a = t instanceof SlideUpMessage,
|
|
@@ -112,19 +112,19 @@ export function showInAppMessage(t, s, o) {
|
|
|
112
112
|
});
|
|
113
113
|
},
|
|
114
114
|
(s) => {
|
|
115
|
-
if (t.
|
|
115
|
+
if (t.ze() && t.do()) {
|
|
116
116
|
const o = document.createElement("div");
|
|
117
117
|
if (
|
|
118
118
|
((o.className = "ab-page-blocker"),
|
|
119
|
-
t.
|
|
120
|
-
e.nn(L.
|
|
119
|
+
t.Ce() || (o.style.backgroundColor = ie(t.frameColor)),
|
|
120
|
+
e.nn(L.jo) && (o.style.zIndex = e.nn(L.jo).toString()),
|
|
121
121
|
n.appendChild(o),
|
|
122
122
|
!e.nn(L.Lh))
|
|
123
123
|
) {
|
|
124
124
|
const e = new Date().valueOf();
|
|
125
125
|
o.onclick = (o) => {
|
|
126
126
|
new Date().valueOf() - e > InAppMessage.fh &&
|
|
127
|
-
(t.
|
|
127
|
+
(t.Ae(s), o.stopPropagation());
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
n.appendChild(s), s.focus(), t.Oh(n);
|
|
@@ -159,16 +159,16 @@ export function showInAppMessage(t, s, o) {
|
|
|
159
159
|
logInAppMessageImpression(t),
|
|
160
160
|
t.dismissType === InAppMessage.DismissType.AUTO_DISMISS &&
|
|
161
161
|
setTimeout(() => {
|
|
162
|
-
n.contains(s) && t.
|
|
162
|
+
n.contains(s) && t.Ae(s);
|
|
163
163
|
}, t.duration),
|
|
164
164
|
"function" == typeof o && o();
|
|
165
165
|
},
|
|
166
166
|
(e) => {
|
|
167
167
|
r.info(e);
|
|
168
168
|
},
|
|
169
|
-
e.nn(L.wo),
|
|
170
|
-
e.nn(L.bo),
|
|
171
169
|
e.nn(L.ho),
|
|
170
|
+
e.nn(L.jo),
|
|
171
|
+
e.nn(L.bo),
|
|
172
172
|
s,
|
|
173
173
|
);
|
|
174
174
|
return (i || a) && (n.appendChild(l), t.Oh(n)), !0;
|
|
@@ -8,14 +8,14 @@ const na = {
|
|
|
8
8
|
na.i ||
|
|
9
9
|
(na.i = new ea(
|
|
10
10
|
e.pr(),
|
|
11
|
-
e.
|
|
11
|
+
e.ba(),
|
|
12
12
|
e.te(),
|
|
13
|
-
e.
|
|
14
|
-
e.nn(L.
|
|
15
|
-
e.nn(L.
|
|
13
|
+
e.Hs(),
|
|
14
|
+
e.nn(L.wa),
|
|
15
|
+
e.nn(L.ya),
|
|
16
16
|
e.ir(),
|
|
17
|
-
e.nn(L.
|
|
18
|
-
e.nn(L.
|
|
17
|
+
e.nn(L.Ma),
|
|
18
|
+
e.nn(L._a),
|
|
19
19
|
e.l(),
|
|
20
20
|
)),
|
|
21
21
|
na.i
|
package/src/Push/push-manager.js
CHANGED
|
@@ -224,7 +224,7 @@ export default class ea {
|
|
|
224
224
|
"Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",
|
|
225
225
|
t,
|
|
226
226
|
);
|
|
227
|
-
if (this.yt && !this.yt.Wn() && 0 === this.yt.
|
|
227
|
+
if (this.yt && !this.yt.Wn() && 0 === this.yt.ii())
|
|
228
228
|
return (
|
|
229
229
|
r.info(
|
|
230
230
|
"Waiting for VAPID key from server config before subscribing to push.",
|