apxor-rtm-ui 0.7.0 → 0.8.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/dist/apxor.rtm.js.bak +1166 -348
- package/dist/apxor.rtm.min.js +4 -4
- package/package.json +2 -2
package/dist/apxor.rtm.js.bak
CHANGED
|
@@ -52,6 +52,307 @@
|
|
|
52
52
|
}
|
|
53
53
|
return e;
|
|
54
54
|
}
|
|
55
|
+
function _regeneratorRuntime() {
|
|
56
|
+
_regeneratorRuntime = function () {
|
|
57
|
+
return e;
|
|
58
|
+
};
|
|
59
|
+
var t,
|
|
60
|
+
e = {},
|
|
61
|
+
r = Object.prototype,
|
|
62
|
+
n = r.hasOwnProperty,
|
|
63
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
64
|
+
t[e] = r.value;
|
|
65
|
+
},
|
|
66
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
67
|
+
a = i.iterator || "@@iterator",
|
|
68
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
69
|
+
u = i.toStringTag || "@@toStringTag";
|
|
70
|
+
function define(t, e, r) {
|
|
71
|
+
return Object.defineProperty(t, e, {
|
|
72
|
+
value: r,
|
|
73
|
+
enumerable: !0,
|
|
74
|
+
configurable: !0,
|
|
75
|
+
writable: !0
|
|
76
|
+
}), t[e];
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
define({}, "");
|
|
80
|
+
} catch (t) {
|
|
81
|
+
define = function (t, e, r) {
|
|
82
|
+
return t[e] = r;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function wrap(t, e, r, n) {
|
|
86
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
87
|
+
a = Object.create(i.prototype),
|
|
88
|
+
c = new Context(n || []);
|
|
89
|
+
return o(a, "_invoke", {
|
|
90
|
+
value: makeInvokeMethod(t, r, c)
|
|
91
|
+
}), a;
|
|
92
|
+
}
|
|
93
|
+
function tryCatch(t, e, r) {
|
|
94
|
+
try {
|
|
95
|
+
return {
|
|
96
|
+
type: "normal",
|
|
97
|
+
arg: t.call(e, r)
|
|
98
|
+
};
|
|
99
|
+
} catch (t) {
|
|
100
|
+
return {
|
|
101
|
+
type: "throw",
|
|
102
|
+
arg: t
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
e.wrap = wrap;
|
|
107
|
+
var h = "suspendedStart",
|
|
108
|
+
l = "suspendedYield",
|
|
109
|
+
f = "executing",
|
|
110
|
+
s = "completed",
|
|
111
|
+
y = {};
|
|
112
|
+
function Generator() {}
|
|
113
|
+
function GeneratorFunction() {}
|
|
114
|
+
function GeneratorFunctionPrototype() {}
|
|
115
|
+
var p = {};
|
|
116
|
+
define(p, a, function () {
|
|
117
|
+
return this;
|
|
118
|
+
});
|
|
119
|
+
var d = Object.getPrototypeOf,
|
|
120
|
+
v = d && d(d(values([])));
|
|
121
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
122
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
123
|
+
function defineIteratorMethods(t) {
|
|
124
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
125
|
+
define(t, e, function (t) {
|
|
126
|
+
return this._invoke(e, t);
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function AsyncIterator(t, e) {
|
|
131
|
+
function invoke(r, o, i, a) {
|
|
132
|
+
var c = tryCatch(t[r], t, o);
|
|
133
|
+
if ("throw" !== c.type) {
|
|
134
|
+
var u = c.arg,
|
|
135
|
+
h = u.value;
|
|
136
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
137
|
+
invoke("next", t, i, a);
|
|
138
|
+
}, function (t) {
|
|
139
|
+
invoke("throw", t, i, a);
|
|
140
|
+
}) : e.resolve(h).then(function (t) {
|
|
141
|
+
u.value = t, i(u);
|
|
142
|
+
}, function (t) {
|
|
143
|
+
return invoke("throw", t, i, a);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
a(c.arg);
|
|
147
|
+
}
|
|
148
|
+
var r;
|
|
149
|
+
o(this, "_invoke", {
|
|
150
|
+
value: function (t, n) {
|
|
151
|
+
function callInvokeWithMethodAndArg() {
|
|
152
|
+
return new e(function (e, r) {
|
|
153
|
+
invoke(t, n, e, r);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function makeInvokeMethod(e, r, n) {
|
|
161
|
+
var o = h;
|
|
162
|
+
return function (i, a) {
|
|
163
|
+
if (o === f) throw new Error("Generator is already running");
|
|
164
|
+
if (o === s) {
|
|
165
|
+
if ("throw" === i) throw a;
|
|
166
|
+
return {
|
|
167
|
+
value: t,
|
|
168
|
+
done: !0
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
for (n.method = i, n.arg = a;;) {
|
|
172
|
+
var c = n.delegate;
|
|
173
|
+
if (c) {
|
|
174
|
+
var u = maybeInvokeDelegate(c, n);
|
|
175
|
+
if (u) {
|
|
176
|
+
if (u === y) continue;
|
|
177
|
+
return u;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
181
|
+
if (o === h) throw o = s, n.arg;
|
|
182
|
+
n.dispatchException(n.arg);
|
|
183
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
184
|
+
o = f;
|
|
185
|
+
var p = tryCatch(e, r, n);
|
|
186
|
+
if ("normal" === p.type) {
|
|
187
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
188
|
+
return {
|
|
189
|
+
value: p.arg,
|
|
190
|
+
done: n.done
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function maybeInvokeDelegate(e, r) {
|
|
198
|
+
var n = r.method,
|
|
199
|
+
o = e.iterator[n];
|
|
200
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
201
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
202
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
203
|
+
var a = i.arg;
|
|
204
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
205
|
+
}
|
|
206
|
+
function pushTryEntry(t) {
|
|
207
|
+
var e = {
|
|
208
|
+
tryLoc: t[0]
|
|
209
|
+
};
|
|
210
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
211
|
+
}
|
|
212
|
+
function resetTryEntry(t) {
|
|
213
|
+
var e = t.completion || {};
|
|
214
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
215
|
+
}
|
|
216
|
+
function Context(t) {
|
|
217
|
+
this.tryEntries = [{
|
|
218
|
+
tryLoc: "root"
|
|
219
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
220
|
+
}
|
|
221
|
+
function values(e) {
|
|
222
|
+
if (e || "" === e) {
|
|
223
|
+
var r = e[a];
|
|
224
|
+
if (r) return r.call(e);
|
|
225
|
+
if ("function" == typeof e.next) return e;
|
|
226
|
+
if (!isNaN(e.length)) {
|
|
227
|
+
var o = -1,
|
|
228
|
+
i = function next() {
|
|
229
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
230
|
+
return next.value = t, next.done = !0, next;
|
|
231
|
+
};
|
|
232
|
+
return i.next = i;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
236
|
+
}
|
|
237
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
238
|
+
value: GeneratorFunctionPrototype,
|
|
239
|
+
configurable: !0
|
|
240
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
241
|
+
value: GeneratorFunction,
|
|
242
|
+
configurable: !0
|
|
243
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
244
|
+
var e = "function" == typeof t && t.constructor;
|
|
245
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
246
|
+
}, e.mark = function (t) {
|
|
247
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
248
|
+
}, e.awrap = function (t) {
|
|
249
|
+
return {
|
|
250
|
+
__await: t
|
|
251
|
+
};
|
|
252
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
253
|
+
return this;
|
|
254
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
255
|
+
void 0 === i && (i = Promise);
|
|
256
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
257
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
258
|
+
return t.done ? t.value : a.next();
|
|
259
|
+
});
|
|
260
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
261
|
+
return this;
|
|
262
|
+
}), define(g, "toString", function () {
|
|
263
|
+
return "[object Generator]";
|
|
264
|
+
}), e.keys = function (t) {
|
|
265
|
+
var e = Object(t),
|
|
266
|
+
r = [];
|
|
267
|
+
for (var n in e) r.push(n);
|
|
268
|
+
return r.reverse(), function next() {
|
|
269
|
+
for (; r.length;) {
|
|
270
|
+
var t = r.pop();
|
|
271
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
272
|
+
}
|
|
273
|
+
return next.done = !0, next;
|
|
274
|
+
};
|
|
275
|
+
}, e.values = values, Context.prototype = {
|
|
276
|
+
constructor: Context,
|
|
277
|
+
reset: function (e) {
|
|
278
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
279
|
+
},
|
|
280
|
+
stop: function () {
|
|
281
|
+
this.done = !0;
|
|
282
|
+
var t = this.tryEntries[0].completion;
|
|
283
|
+
if ("throw" === t.type) throw t.arg;
|
|
284
|
+
return this.rval;
|
|
285
|
+
},
|
|
286
|
+
dispatchException: function (e) {
|
|
287
|
+
if (this.done) throw e;
|
|
288
|
+
var r = this;
|
|
289
|
+
function handle(n, o) {
|
|
290
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
291
|
+
}
|
|
292
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
293
|
+
var i = this.tryEntries[o],
|
|
294
|
+
a = i.completion;
|
|
295
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
296
|
+
if (i.tryLoc <= this.prev) {
|
|
297
|
+
var c = n.call(i, "catchLoc"),
|
|
298
|
+
u = n.call(i, "finallyLoc");
|
|
299
|
+
if (c && u) {
|
|
300
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
301
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
302
|
+
} else if (c) {
|
|
303
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
304
|
+
} else {
|
|
305
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
306
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
abrupt: function (t, e) {
|
|
312
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
313
|
+
var o = this.tryEntries[r];
|
|
314
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
315
|
+
var i = o;
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
320
|
+
var a = i ? i.completion : {};
|
|
321
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
322
|
+
},
|
|
323
|
+
complete: function (t, e) {
|
|
324
|
+
if ("throw" === t.type) throw t.arg;
|
|
325
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
326
|
+
},
|
|
327
|
+
finish: function (t) {
|
|
328
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
329
|
+
var r = this.tryEntries[e];
|
|
330
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
catch: function (t) {
|
|
334
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
335
|
+
var r = this.tryEntries[e];
|
|
336
|
+
if (r.tryLoc === t) {
|
|
337
|
+
var n = r.completion;
|
|
338
|
+
if ("throw" === n.type) {
|
|
339
|
+
var o = n.arg;
|
|
340
|
+
resetTryEntry(r);
|
|
341
|
+
}
|
|
342
|
+
return o;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
throw new Error("illegal catch attempt");
|
|
346
|
+
},
|
|
347
|
+
delegateYield: function (e, r, n) {
|
|
348
|
+
return this.delegate = {
|
|
349
|
+
iterator: values(e),
|
|
350
|
+
resultName: r,
|
|
351
|
+
nextLoc: n
|
|
352
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
353
|
+
}
|
|
354
|
+
}, e;
|
|
355
|
+
}
|
|
55
356
|
function _typeof(o) {
|
|
56
357
|
"@babel/helpers - typeof";
|
|
57
358
|
|
|
@@ -61,6 +362,36 @@
|
|
|
61
362
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
62
363
|
}, _typeof(o);
|
|
63
364
|
}
|
|
365
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
366
|
+
try {
|
|
367
|
+
var info = gen[key](arg);
|
|
368
|
+
var value = info.value;
|
|
369
|
+
} catch (error) {
|
|
370
|
+
reject(error);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
if (info.done) {
|
|
374
|
+
resolve(value);
|
|
375
|
+
} else {
|
|
376
|
+
Promise.resolve(value).then(_next, _throw);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
function _asyncToGenerator(fn) {
|
|
380
|
+
return function () {
|
|
381
|
+
var self = this,
|
|
382
|
+
args = arguments;
|
|
383
|
+
return new Promise(function (resolve, reject) {
|
|
384
|
+
var gen = fn.apply(self, args);
|
|
385
|
+
function _next(value) {
|
|
386
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
387
|
+
}
|
|
388
|
+
function _throw(err) {
|
|
389
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
390
|
+
}
|
|
391
|
+
_next(undefined);
|
|
392
|
+
});
|
|
393
|
+
};
|
|
394
|
+
}
|
|
64
395
|
function _classCallCheck(instance, Constructor) {
|
|
65
396
|
if (!(instance instanceof Constructor)) {
|
|
66
397
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -6394,7 +6725,10 @@
|
|
|
6394
6725
|
BOTTOM_RIGHT: "bottom-right",
|
|
6395
6726
|
TOP_CENTER: "top-center",
|
|
6396
6727
|
BOTTOM_CENTER: "bottom-center",
|
|
6397
|
-
CENTER: "center"
|
|
6728
|
+
CENTER: "center",
|
|
6729
|
+
FULL_SCREEN: "full-screen",
|
|
6730
|
+
LEFT: "left",
|
|
6731
|
+
RIGHT: "right"
|
|
6398
6732
|
};
|
|
6399
6733
|
var imgWrapperStyles = {
|
|
6400
6734
|
"margin-left": "marginLeft",
|
|
@@ -6446,8 +6780,17 @@
|
|
|
6446
6780
|
cell: "div",
|
|
6447
6781
|
img: "img",
|
|
6448
6782
|
text: "span",
|
|
6449
|
-
button: "button"
|
|
6783
|
+
button: "button",
|
|
6784
|
+
cta_button: "button"
|
|
6785
|
+
};
|
|
6786
|
+
var BUILDER_TEMPLATE_NODE_TYPES = {
|
|
6787
|
+
cell: "div",
|
|
6788
|
+
img: "img",
|
|
6789
|
+
text: "div",
|
|
6790
|
+
button: "button",
|
|
6791
|
+
cta_button: "button"
|
|
6450
6792
|
};
|
|
6793
|
+
var CROSS_ICON_SVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"border-radius: inherit; width: 100%; height: 100%;\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"current-color\"></path><path d=\"M18 6l-12 12\"></path><path d=\"M6 6l12 12\"></path></svg>";
|
|
6451
6794
|
|
|
6452
6795
|
/* eslint-disable no-unused-vars */
|
|
6453
6796
|
|
|
@@ -6560,7 +6903,7 @@
|
|
|
6560
6903
|
* @returns
|
|
6561
6904
|
*/
|
|
6562
6905
|
var _setFontFaceAtRule = function _setFontFaceAtRule(font) {
|
|
6563
|
-
if (!font.source || font.source === "url") {
|
|
6906
|
+
if (!font.source || font.source === "url" || font.source === "name") {
|
|
6564
6907
|
return [font.family, ""];
|
|
6565
6908
|
}
|
|
6566
6909
|
var src;
|
|
@@ -6807,10 +7150,11 @@
|
|
|
6807
7150
|
var index = arguments.length > 10 ? arguments[10] : undefined;
|
|
6808
7151
|
var button_alignment = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : "center";
|
|
6809
7152
|
var fontMultiplier = arguments.length > 12 && arguments[12] !== undefined ? arguments[12] : 1;
|
|
7153
|
+
var step = arguments.length > 13 && arguments[13] !== undefined ? arguments[13] : -1;
|
|
6810
7154
|
var buttons = document.createElement("div");
|
|
6811
7155
|
buttons.className = "".concat(position, "-buttons-container");
|
|
6812
7156
|
buttons.style.zIndex = 99999999;
|
|
6813
|
-
var _generateButtonsFromC = generateButtonsFromConfig(buttons_config, actionHandler, id, name, eventPrefix, position, isWalkthrough, uis, index),
|
|
7157
|
+
var _generateButtonsFromC = generateButtonsFromConfig(buttons_config, actionHandler, id, name, eventPrefix, position, isWalkthrough, uis, index, step),
|
|
6814
7158
|
buttons_array = _generateButtonsFromC.buttons_array,
|
|
6815
7159
|
buttons_css = _generateButtonsFromC.buttons_css;
|
|
6816
7160
|
buttons_css.fontMultiplier = fontMultiplier;
|
|
@@ -7003,6 +7347,88 @@
|
|
|
7003
7347
|
});
|
|
7004
7348
|
return "\n div .".concat(position, "-buttons-container {\n width:100%;\n display: flex;\n flex-direction:").concat(button_direction === DIRECTION.VERTICAL && position === BUTTON_CONTAINER_POSITION.BOTTOM ? "column" : "row", ";\n justify-content:").concat(justifyContent, ";\n align-items:").concat(button_direction === DIRECTION.HORIZONTAL ? "center" : getButtonPosition(button_alignment), ";\n flex-wrap:wrap;\n }\n ").concat(buttons, "\n ");
|
|
7005
7349
|
};
|
|
7350
|
+
var setImgAction = function setImgAction(action_config, ActionHandler, uuid, name) {
|
|
7351
|
+
var configType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : EVENT_PREFIX.INAPP;
|
|
7352
|
+
var action = function action() {};
|
|
7353
|
+
var _action = action_config === null || action_config === void 0 ? void 0 : action_config.action;
|
|
7354
|
+
try {
|
|
7355
|
+
switch (_action) {
|
|
7356
|
+
case "done":
|
|
7357
|
+
case "dismiss":
|
|
7358
|
+
action = function action() {
|
|
7359
|
+
ActionHandler.complete(false, "dismiss");
|
|
7360
|
+
window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
|
|
7361
|
+
};
|
|
7362
|
+
break;
|
|
7363
|
+
case "redirect":
|
|
7364
|
+
action = function action() {
|
|
7365
|
+
var _window$Apxor;
|
|
7366
|
+
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
|
|
7367
|
+
window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
|
|
7368
|
+
ActionHandler.complete(false, "redirect");
|
|
7369
|
+
window.Apxor.redirectTo(JSON.stringify(action_config));
|
|
7370
|
+
var type = configType.toLowerCase();
|
|
7371
|
+
window.Apxor.logActionEvent("".concat(type, "dismissed"), uuid, name);
|
|
7372
|
+
} else {
|
|
7373
|
+
ActionHandler.complete(true, "redirect");
|
|
7374
|
+
window.Apxor.redirectTo("IN_APP", uuid, name, "img", JSON.stringify(action_config));
|
|
7375
|
+
}
|
|
7376
|
+
// if (redirectWithin || isExternal) {
|
|
7377
|
+
// window.open(url, redirectWithin ? "_self" : "_blank");
|
|
7378
|
+
// } else {
|
|
7379
|
+
// rtmInstance.logClientEvent("REDIRECT", { url });
|
|
7380
|
+
// }
|
|
7381
|
+
};
|
|
7382
|
+
|
|
7383
|
+
break;
|
|
7384
|
+
case "cancel":
|
|
7385
|
+
action = function action() {
|
|
7386
|
+
ActionHandler.cancel(true, "cancel");
|
|
7387
|
+
ActionHandler._isCancelled = true;
|
|
7388
|
+
window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
|
|
7389
|
+
window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
|
|
7390
|
+
};
|
|
7391
|
+
break;
|
|
7392
|
+
// case "submit":
|
|
7393
|
+
// action = () => {
|
|
7394
|
+
// ActionHandler.complete(false, "submit");
|
|
7395
|
+
// window.Apxor.logActionEvent(
|
|
7396
|
+
// configType + "img" + "_Clicked",
|
|
7397
|
+
// uuid,
|
|
7398
|
+
// name
|
|
7399
|
+
// );
|
|
7400
|
+
// };
|
|
7401
|
+
// break;
|
|
7402
|
+
// case "skip":
|
|
7403
|
+
// action = () => {
|
|
7404
|
+
// ActionHandler.complete(false, "skip");
|
|
7405
|
+
// window.Apxor.logActionEvent(
|
|
7406
|
+
// configType + "img" + "_Clicked",
|
|
7407
|
+
// uuid,
|
|
7408
|
+
// name
|
|
7409
|
+
// );
|
|
7410
|
+
// };
|
|
7411
|
+
// break;
|
|
7412
|
+
case "never":
|
|
7413
|
+
action = function action() {
|
|
7414
|
+
ActionHandler.cancel(true, "cancel");
|
|
7415
|
+
ActionHandler._isCancelled = true;
|
|
7416
|
+
window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
|
|
7417
|
+
window.Apxor.neverShow(uuid, name, "IN_APP");
|
|
7418
|
+
window.Apxor.logActionEvent("never_show_clicked", uuid, name);
|
|
7419
|
+
};
|
|
7420
|
+
break;
|
|
7421
|
+
default:
|
|
7422
|
+
action = function action() {
|
|
7423
|
+
ActionHandler.cancel(false, "cancel");
|
|
7424
|
+
window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
|
|
7425
|
+
};
|
|
7426
|
+
}
|
|
7427
|
+
} catch (e) {
|
|
7428
|
+
console.error("Error setting actions on the image:" + e);
|
|
7429
|
+
}
|
|
7430
|
+
return action;
|
|
7431
|
+
};
|
|
7006
7432
|
var generateButtonsFromConfig = function generateButtonsFromConfig() {
|
|
7007
7433
|
var buttons_config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
7008
7434
|
var ActionHandler = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -7013,6 +7439,7 @@
|
|
|
7013
7439
|
var isWalkthrough = arguments.length > 6 ? arguments[6] : undefined;
|
|
7014
7440
|
var uis = arguments.length > 7 ? arguments[7] : undefined;
|
|
7015
7441
|
var ind = arguments.length > 8 ? arguments[8] : undefined;
|
|
7442
|
+
var step = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : -1;
|
|
7016
7443
|
var buttons_array = [];
|
|
7017
7444
|
var buttons_css = [];
|
|
7018
7445
|
buttons_config.sort(function (a, b) {
|
|
@@ -7073,6 +7500,10 @@
|
|
|
7073
7500
|
action = function action() {
|
|
7074
7501
|
ActionHandler.complete(false, "dismiss");
|
|
7075
7502
|
window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
|
|
7503
|
+
if (step != -1) {
|
|
7504
|
+
var _window;
|
|
7505
|
+
(_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || _window.triggerNextStep(uuid, step + 1);
|
|
7506
|
+
}
|
|
7076
7507
|
};
|
|
7077
7508
|
break;
|
|
7078
7509
|
case "next":
|
|
@@ -7095,16 +7526,24 @@
|
|
|
7095
7526
|
break;
|
|
7096
7527
|
case "redirect":
|
|
7097
7528
|
action = function action() {
|
|
7098
|
-
var _window$
|
|
7099
|
-
if (((_window$
|
|
7529
|
+
var _window$Apxor2;
|
|
7530
|
+
if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
|
|
7100
7531
|
window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
|
|
7101
7532
|
ActionHandler.complete(false, "redirect");
|
|
7102
7533
|
window.Apxor.redirectTo(JSON.stringify(action_config));
|
|
7103
7534
|
var _type = configType.toLowerCase();
|
|
7104
7535
|
window.Apxor.logActionEvent("".concat(_type, "dismissed"), uuid, name);
|
|
7536
|
+
if (step != -1) {
|
|
7537
|
+
var _window2;
|
|
7538
|
+
(_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || _window2.triggerNextStep(uuid, step + 1);
|
|
7539
|
+
}
|
|
7105
7540
|
} else {
|
|
7106
7541
|
ActionHandler.complete(true, "redirect");
|
|
7107
7542
|
window.Apxor.redirectTo("IN_APP", uuid, name, text, JSON.stringify(action_config));
|
|
7543
|
+
if (step != -1) {
|
|
7544
|
+
var _window3;
|
|
7545
|
+
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || _window3.triggerNextStep(uuid, step + 1);
|
|
7546
|
+
}
|
|
7108
7547
|
}
|
|
7109
7548
|
// if (redirectWithin || isExternal) {
|
|
7110
7549
|
// window.open(url, redirectWithin ? "_self" : "_blank");
|
|
@@ -7417,6 +7856,17 @@
|
|
|
7417
7856
|
});
|
|
7418
7857
|
return newObj;
|
|
7419
7858
|
}
|
|
7859
|
+
var extractBgImageUrl = function extractBgImageUrl(css) {
|
|
7860
|
+
var _css$backgroundImage;
|
|
7861
|
+
var backgroundImage = (_css$backgroundImage = css === null || css === void 0 ? void 0 : css["background-image"]) !== null && _css$backgroundImage !== void 0 ? _css$backgroundImage : "url()";
|
|
7862
|
+
var pattern = /url\((.*?)\)/;
|
|
7863
|
+
var match = backgroundImage.match(pattern);
|
|
7864
|
+
if (match && match[1]) {
|
|
7865
|
+
return match[1];
|
|
7866
|
+
} else {
|
|
7867
|
+
return "";
|
|
7868
|
+
}
|
|
7869
|
+
};
|
|
7420
7870
|
|
|
7421
7871
|
/**
|
|
7422
7872
|
* @function getPIPSVG
|
|
@@ -11673,69 +12123,109 @@
|
|
|
11673
12123
|
render: render
|
|
11674
12124
|
});
|
|
11675
12125
|
|
|
11676
|
-
var TemplateContent = /*#__PURE__*/_createClass(function TemplateContent(_config, configId, name,
|
|
12126
|
+
var TemplateContent = /*#__PURE__*/_createClass(function TemplateContent(_config, configId, name, _type, closeCallback) {
|
|
11677
12127
|
var _this = this,
|
|
12128
|
+
_config$wait_interval,
|
|
11678
12129
|
_config$termination;
|
|
11679
12130
|
_classCallCheck(this, TemplateContent);
|
|
11680
|
-
_defineProperty(this, "
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
|
|
12131
|
+
_defineProperty(this, "UYsM", function () {
|
|
12132
|
+
return new Promise(function (resolve, reject) {
|
|
12133
|
+
try {
|
|
12134
|
+
var element = _this.KDYj(_this.layout);
|
|
12135
|
+
var styleElement = document.createElement("style");
|
|
12136
|
+
styleElement.innerHTML = _this.styleContent;
|
|
12137
|
+
document.head.appendChild(styleElement);
|
|
12138
|
+
_this.iDmo();
|
|
12139
|
+
try {
|
|
12140
|
+
eval(_this.script);
|
|
12141
|
+
} catch (e) {
|
|
12142
|
+
var _window;
|
|
12143
|
+
console.log("found error while executing script: ".concat(e));
|
|
12144
|
+
(_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("found error while executing script: ".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
|
|
12145
|
+
reject("found error while executing script: ".concat(e));
|
|
12146
|
+
}
|
|
12147
|
+
_this.imageElements.forEach(function (img) {
|
|
12148
|
+
img.addEventListener("error", function () {
|
|
12149
|
+
_this.hZAf("provided image doesn't exists");
|
|
12150
|
+
});
|
|
12151
|
+
});
|
|
12152
|
+
_this.intervalToCheckMediaLoadingStatus = setInterval(function () {
|
|
12153
|
+
_this.wait_interval -= 1;
|
|
12154
|
+
if (_this.wait_interval <= 0) {
|
|
12155
|
+
_this.hZAf("provided media doesn't exists");
|
|
12156
|
+
} else {
|
|
12157
|
+
if (_this.gDMN() && _this.Wrko() && _this.OIYp()) {
|
|
12158
|
+
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
12159
|
+
resolve(element);
|
|
12160
|
+
}
|
|
12161
|
+
}
|
|
12162
|
+
}, 100);
|
|
12163
|
+
} catch (e) {
|
|
12164
|
+
var _window2;
|
|
12165
|
+
console.log("failed while creating builder template with error ".concat(e));
|
|
12166
|
+
(_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.ApxorLogger) === null || _window2 === void 0 || _window2.error("failed while creating builder template with error: ".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
|
|
12167
|
+
reject("failed while creating builder template with error: ".concat(e));
|
|
12168
|
+
}
|
|
12169
|
+
});
|
|
11696
12170
|
});
|
|
11697
|
-
_defineProperty(this, "
|
|
11698
|
-
var _window$Apxor;
|
|
12171
|
+
_defineProperty(this, "hZAf", function (reason) {
|
|
12172
|
+
var _window$ApxorRTM, _window$Apxor, _this$config, _this$config2, _window$Apxor2, _this$config3, _this$config4, _this$config5, _this$config6, _window3;
|
|
12173
|
+
!_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
|
|
12174
|
+
apx_nudge_name: _this.name,
|
|
12175
|
+
apx_nudge_id: ((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios" ? (_this$config = _this.config) === null || _this$config === void 0 || (_this$config = _this$config.additional_info) === null || _this$config === void 0 ? void 0 : _this$config.id : _this.configId,
|
|
12176
|
+
apx_template_name: _this.type,
|
|
12177
|
+
apx_notshown_type: "error",
|
|
12178
|
+
apx_reason: reason,
|
|
12179
|
+
apx_variant_code: (_this$config2 = _this.config) === null || _this$config2 === void 0 || (_this$config2 = _this$config2.additional_info) === null || _this$config2 === void 0 ? void 0 : _this$config2.apx_variant_code,
|
|
12180
|
+
apx_step: ((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios" ? (_this$config3 = _this.config) !== null && _this$config3 !== void 0 && (_this$config3 = _this$config3.additional_info) !== null && _this$config3 !== void 0 && _this$config3.is_preview ? 1 : (_this$config4 = _this.config) === null || _this$config4 === void 0 || (_this$config4 = _this$config4.additional_info) === null || _this$config4 === void 0 ? void 0 : _this$config4.apx_step : (_this$config5 = _this.config) !== null && _this$config5 !== void 0 && (_this$config5 = _this$config5.additional_info) !== null && _this$config5 !== void 0 && _this$config5.is_preview ? 1 : (_this$config6 = _this.config) === null || _this$config6 === void 0 || (_this$config6 = _this$config6.additional_info) === null || _this$config6 === void 0 ? void 0 : _this$config6.apx_step
|
|
12181
|
+
}));
|
|
12182
|
+
_this.loggedNudgeNotShownEvent = true;
|
|
12183
|
+
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
12184
|
+
_this.closeCallBack("cancel");
|
|
12185
|
+
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorInternals) === null || _window3 === void 0 || _window3.removeBuilderTemplate(_this.configId);
|
|
12186
|
+
});
|
|
12187
|
+
_defineProperty(this, "iDmo", function () {
|
|
12188
|
+
var BuilderTemplatesStyles = document.createElement("style");
|
|
12189
|
+
BuilderTemplatesStyles.innerHTML = _this.initialStyles;
|
|
12190
|
+
BuilderTemplatesStyles.setAttribute("apx-builder-template-styles", "");
|
|
12191
|
+
document.head.appendChild(BuilderTemplatesStyles);
|
|
12192
|
+
});
|
|
12193
|
+
_defineProperty(this, "KDYj", function (config) {
|
|
12194
|
+
var _window$Apxor3;
|
|
11699
12195
|
var element;
|
|
11700
12196
|
switch (config.type) {
|
|
11701
12197
|
case "cell":
|
|
11702
12198
|
case "img":
|
|
11703
12199
|
case "text":
|
|
12200
|
+
case "cta_button":
|
|
11704
12201
|
case "button":
|
|
11705
|
-
element = document.createElement(
|
|
12202
|
+
element = document.createElement(BUILDER_TEMPLATE_NODE_TYPES[config.type]);
|
|
11706
12203
|
break;
|
|
11707
12204
|
case "video":
|
|
11708
12205
|
element = document.createElement("video");
|
|
11709
12206
|
element.controlsList = "noplaybackrate nodownload nofullscreen";
|
|
11710
12207
|
element.controls = true;
|
|
12208
|
+
element.muted = true;
|
|
11711
12209
|
element.disablePictureInPicture = true;
|
|
11712
12210
|
element.autoplay = true;
|
|
11713
|
-
if (((_window$
|
|
12211
|
+
if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
|
|
11714
12212
|
element.playsInline = true;
|
|
11715
12213
|
}
|
|
11716
|
-
// if (config.source) {
|
|
11717
|
-
// let sourceElement = document.createElement("source");
|
|
11718
|
-
// for (let prop in config.source) {
|
|
11719
|
-
// sourceElement[prop] = config.source[prop];
|
|
11720
|
-
// }
|
|
11721
|
-
// element.appendChild(sourceElement);
|
|
11722
|
-
// }
|
|
11723
|
-
// if (config.track) {
|
|
11724
|
-
// let trackElement = document.createElement("track");
|
|
11725
|
-
// for (let prop in config.track) {
|
|
11726
|
-
// trackElement[prop] = config.track[prop];
|
|
11727
|
-
// }
|
|
11728
|
-
// element.appendChild(trackElement);
|
|
11729
|
-
// }
|
|
11730
12214
|
break;
|
|
11731
12215
|
case "svg":
|
|
11732
12216
|
element = document.createElement("span");
|
|
11733
12217
|
break;
|
|
12218
|
+
case "cross_button":
|
|
12219
|
+
element = document.createElement("div");
|
|
12220
|
+
element.innerHTML = CROSS_ICON_SVG;
|
|
12221
|
+
element.style.display = "flex";
|
|
12222
|
+
break;
|
|
11734
12223
|
default:
|
|
11735
12224
|
element = document.createElement(config.type);
|
|
11736
12225
|
}
|
|
11737
12226
|
if (config.properties) {
|
|
11738
12227
|
for (var prop in config.properties) {
|
|
12228
|
+
if (config.type === "img" && prop === "src" || config.type === "img" && prop === "format") continue;
|
|
11739
12229
|
if (config.type === "video" && prop === "source") {
|
|
11740
12230
|
var sourceElement = document.createElement("source");
|
|
11741
12231
|
for (var srcprop in (_config$properties = config.properties) === null || _config$properties === void 0 ? void 0 : _config$properties[prop]) {
|
|
@@ -11751,37 +12241,86 @@
|
|
|
11751
12241
|
}
|
|
11752
12242
|
element.classList.add(config._id);
|
|
11753
12243
|
if (config.css) {
|
|
11754
|
-
var styles = "
|
|
12244
|
+
var styles = "";
|
|
12245
|
+
if (config.type === "img") {
|
|
12246
|
+
var styleObject = parseCSS(config.css);
|
|
12247
|
+
var imgStyleObject = removeKeys(styleObject, Object.keys(imgWrapperStyles));
|
|
12248
|
+
styles = ".".concat(config._id, " {\n ").concat(objectToCSS(imgStyleObject), "\n }\n ");
|
|
12249
|
+
} else if (config._id === _this.layout._id) {
|
|
12250
|
+
var layoutStyleObject = parseCSS(config.css);
|
|
12251
|
+
if (layoutStyleObject["background-image"]) {
|
|
12252
|
+
var backgroundImageUrl = extractBgImageUrl(layoutStyleObject);
|
|
12253
|
+
layoutStyleObject["background-image"] = "url(".concat(decodeURIComponent(backgroundImageUrl), ")");
|
|
12254
|
+
_this.bgImageUrl = decodeURIComponent(backgroundImageUrl);
|
|
12255
|
+
}
|
|
12256
|
+
styles = ".".concat(config._id, " {\n ").concat(objectToCSS(layoutStyleObject), "\n }\n ");
|
|
12257
|
+
} else {
|
|
12258
|
+
styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
|
|
12259
|
+
}
|
|
11755
12260
|
_this.initialStyles += styles;
|
|
11756
12261
|
}
|
|
11757
12262
|
if (config.enable_actions && config.actions.length > 0) {
|
|
11758
12263
|
config.actions.forEach(function (action) {
|
|
12264
|
+
var next_step = action !== null && action !== void 0 && action.next_step ? action === null || action === void 0 ? void 0 : action.next_step : 0;
|
|
11759
12265
|
switch (action.type) {
|
|
11760
12266
|
case "activity":
|
|
11761
12267
|
case "deeplink":
|
|
11762
12268
|
case "ir":
|
|
11763
12269
|
element.onclick = function (e) {
|
|
12270
|
+
var _this$config7;
|
|
11764
12271
|
e.stopPropagation();
|
|
11765
12272
|
window.Apxor.redirect(JSON.stringify(action));
|
|
12273
|
+
var reason = "";
|
|
12274
|
+
if (config.type === "cta_button" || config.type === "button") {
|
|
12275
|
+
reason = "cta-clicked";
|
|
12276
|
+
}
|
|
12277
|
+
_this.eBcX(e, "redirect", reason);
|
|
12278
|
+
if ((_this$config7 = _this.config) !== null && _this$config7 !== void 0 && (_this$config7 = _this$config7.additional_info) !== null && _this$config7 !== void 0 && _this$config7.apx_step) {
|
|
12279
|
+
var _window4, _this$config8;
|
|
12280
|
+
(_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || _window4.triggerNextStep(_this.configId, ((_this$config8 = _this.config) === null || _this$config8 === void 0 || (_this$config8 = _this$config8.additional_info) === null || _this$config8 === void 0 ? void 0 : _this$config8.apx_step) + 1);
|
|
12281
|
+
}
|
|
11766
12282
|
};
|
|
11767
12283
|
break;
|
|
11768
12284
|
case "cancel":
|
|
11769
12285
|
element.onclick = function (e) {
|
|
11770
12286
|
e.stopPropagation();
|
|
11771
|
-
|
|
12287
|
+
var reason = "";
|
|
12288
|
+
if (config.type === "cross_button") {
|
|
12289
|
+
reason = "cross-clicked";
|
|
12290
|
+
} else if (config.type === "cta_button" || config.type === "button") {
|
|
12291
|
+
reason = "cta-clicked";
|
|
12292
|
+
}
|
|
12293
|
+
_this.eBcX(e, "cancel", reason);
|
|
12294
|
+
// window.Apxor.logActionEvent(
|
|
12295
|
+
// "walk_through_cancelled",
|
|
12296
|
+
// this.configId,
|
|
12297
|
+
// this.name
|
|
12298
|
+
// );
|
|
11772
12299
|
};
|
|
12300
|
+
|
|
11773
12301
|
break;
|
|
11774
12302
|
case "dismiss":
|
|
11775
12303
|
element.onclick = function (e) {
|
|
12304
|
+
var _this$config9;
|
|
11776
12305
|
e.stopPropagation();
|
|
11777
|
-
|
|
12306
|
+
var reason = "";
|
|
12307
|
+
if (config.type === "cross_button") {
|
|
12308
|
+
reason = "cross-clicked";
|
|
12309
|
+
} else if (config.type === "cta_button" || config.type === "button") {
|
|
12310
|
+
reason = "cta-clicked";
|
|
12311
|
+
}
|
|
12312
|
+
_this.eBcX(e, "dismiss", reason);
|
|
12313
|
+
if ((_this$config9 = _this.config) !== null && _this$config9 !== void 0 && (_this$config9 = _this$config9.additional_info) !== null && _this$config9 !== void 0 && _this$config9.apx_step) {
|
|
12314
|
+
var _window5, _this$config10;
|
|
12315
|
+
(_window5 = window) === null || _window5 === void 0 || (_window5 = _window5.Apxor) === null || _window5 === void 0 || _window5.triggerNextStep(_this.configId, ((_this$config10 = _this.config) === null || _this$config10 === void 0 || (_this$config10 = _this$config10.additional_info) === null || _this$config10 === void 0 ? void 0 : _this$config10.apx_step) + 1);
|
|
12316
|
+
}
|
|
11778
12317
|
};
|
|
11779
12318
|
break;
|
|
11780
12319
|
case "never":
|
|
11781
12320
|
element.onclick = function (e) {
|
|
11782
12321
|
e.stopPropagation();
|
|
11783
12322
|
window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
|
|
11784
|
-
|
|
12323
|
+
_this.eBcX(e, "never");
|
|
11785
12324
|
};
|
|
11786
12325
|
break;
|
|
11787
12326
|
case "toggle-class":
|
|
@@ -11806,6 +12345,10 @@
|
|
|
11806
12345
|
tempInput.select();
|
|
11807
12346
|
document.execCommand("copy");
|
|
11808
12347
|
document.body.removeChild(tempInput);
|
|
12348
|
+
_this.eBcX(e, "copy-content", "cta-clicked");
|
|
12349
|
+
setTimeout(function () {
|
|
12350
|
+
window.Apxor.showInfoToast("Text-Copied:".concat(textToCopy));
|
|
12351
|
+
}, 500);
|
|
11809
12352
|
};
|
|
11810
12353
|
break;
|
|
11811
12354
|
case "log-app-event":
|
|
@@ -11823,45 +12366,107 @@
|
|
|
11823
12366
|
});
|
|
11824
12367
|
}
|
|
11825
12368
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
11826
|
-
element.style.position = "relative";
|
|
11827
12369
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
11828
|
-
var childElement = _this.
|
|
11829
|
-
childElement.style.position = "absolute";
|
|
11830
|
-
for (var _prop in childConfig.offset) {
|
|
11831
|
-
childElement.style[_prop] = childConfig.offset[_prop];
|
|
11832
|
-
}
|
|
12370
|
+
var childElement = _this.KDYj(childConfig);
|
|
11833
12371
|
element.appendChild(childElement);
|
|
11834
12372
|
});
|
|
11835
12373
|
}
|
|
11836
12374
|
|
|
11837
12375
|
// Process children
|
|
11838
12376
|
if (config.children && config.children.length > 0) {
|
|
11839
|
-
//element.style.display = "flex";
|
|
11840
|
-
|
|
11841
|
-
// if (config.direction) {
|
|
11842
|
-
// element.style.flexDirection = config.direction;
|
|
11843
|
-
// }
|
|
11844
|
-
|
|
11845
12377
|
config.children.forEach(function (childConfig) {
|
|
11846
|
-
var childElement = _this.
|
|
12378
|
+
var childElement = _this.KDYj(childConfig);
|
|
11847
12379
|
element.appendChild(childElement);
|
|
11848
12380
|
});
|
|
11849
12381
|
}
|
|
11850
12382
|
if (config.type === "img") {
|
|
12383
|
+
var _config$properties3, _config$properties4, _window6, _window6$getFilePath;
|
|
12384
|
+
var src = config === null || config === void 0 || (_config$properties3 = config.properties) === null || _config$properties3 === void 0 ? void 0 : _config$properties3.src;
|
|
12385
|
+
var format = config === null || config === void 0 || (_config$properties4 = config.properties) === null || _config$properties4 === void 0 ? void 0 : _config$properties4.format;
|
|
12386
|
+
element["src"] = src && format ? ((_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$getFilePath = _window6.getFilePath) === null || _window6$getFilePath === void 0 ? void 0 : _window6$getFilePath.call(_window6, _this.configId, src, format)) || src : src;
|
|
12387
|
+
_this.imageElements.push(element);
|
|
11851
12388
|
var imgWrapper = document.createElement("div");
|
|
12389
|
+
var _styleObject = parseCSS(config.css);
|
|
12390
|
+
Object.keys(imgWrapperStyles).forEach(function (prop) {
|
|
12391
|
+
if (prop in _styleObject) {
|
|
12392
|
+
imgWrapper.style[imgWrapperStyles[prop]] = _styleObject[prop];
|
|
12393
|
+
}
|
|
12394
|
+
});
|
|
12395
|
+
element.style.maxWidth = "100%";
|
|
12396
|
+
element.style.height = "auto";
|
|
12397
|
+
element.style.display = "flex";
|
|
11852
12398
|
imgWrapper.appendChild(element);
|
|
11853
12399
|
return imgWrapper;
|
|
12400
|
+
} else if (config.type === "video") {
|
|
12401
|
+
_this.videoElements.push(element);
|
|
11854
12402
|
}
|
|
11855
12403
|
return element;
|
|
11856
12404
|
});
|
|
12405
|
+
_defineProperty(this, "eBcX", function (e, action) {
|
|
12406
|
+
var _window$Apxor4, _this$config11, _this$config12, _window$Apxor5, _this$config13, _this$config14, _this$config15, _this$config16;
|
|
12407
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
12408
|
+
var additional_info = {
|
|
12409
|
+
apx_nudge_name: _this.name,
|
|
12410
|
+
apx_nudge_id: ((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios" ? (_this$config11 = _this.config) === null || _this$config11 === void 0 || (_this$config11 = _this$config11.additional_info) === null || _this$config11 === void 0 ? void 0 : _this$config11.id : _this.configId,
|
|
12411
|
+
apx_template_name: _this.type,
|
|
12412
|
+
apx_variant_code: (_this$config12 = _this.config) === null || _this$config12 === void 0 || (_this$config12 = _this$config12.additional_info) === null || _this$config12 === void 0 ? void 0 : _this$config12.apx_variant_code,
|
|
12413
|
+
apx_step: ((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) === "ios" ? (_this$config13 = _this.config) !== null && _this$config13 !== void 0 && (_this$config13 = _this$config13.additional_info) !== null && _this$config13 !== void 0 && _this$config13.is_preview ? 1 : (_this$config14 = _this.config) === null || _this$config14 === void 0 || (_this$config14 = _this$config14.additional_info) === null || _this$config14 === void 0 ? void 0 : _this$config14.apx_step : (_this$config15 = _this.config) !== null && _this$config15 !== void 0 && (_this$config15 = _this$config15.additional_info) !== null && _this$config15 !== void 0 && _this$config15.is_preview ? 1 : (_this$config16 = _this.config) === null || _this$config16 === void 0 || (_this$config16 = _this$config16.additional_info) === null || _this$config16 === void 0 ? void 0 : _this$config16.apx_step
|
|
12414
|
+
};
|
|
12415
|
+
if (e.target.tagName === "BUTTON") {
|
|
12416
|
+
var _window$ApxorRTM2;
|
|
12417
|
+
if (action != "never") {
|
|
12418
|
+
var _e$target$innerHTML, _e$target;
|
|
12419
|
+
additional_info["apx_cta_name"] = (_e$target$innerHTML = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.innerHTML) !== null && _e$target$innerHTML !== void 0 ? _e$target$innerHTML : "";
|
|
12420
|
+
}
|
|
12421
|
+
(_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_nudge_CTA_clicked", additional_info);
|
|
12422
|
+
}
|
|
12423
|
+
if (action == "never") {
|
|
12424
|
+
var _window$ApxorRTM3;
|
|
12425
|
+
additional_info["apx_termination_type"] = "never show cta clicked";
|
|
12426
|
+
(_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_terminated", additional_info);
|
|
12427
|
+
}
|
|
12428
|
+
if (type != "") {
|
|
12429
|
+
_this.closeCallBack(action, type);
|
|
12430
|
+
} else {
|
|
12431
|
+
_this.closeCallBack(action);
|
|
12432
|
+
}
|
|
12433
|
+
});
|
|
12434
|
+
_defineProperty(this, "Wrko", function () {
|
|
12435
|
+
//This logic is to make sure that image has loaded, it doesn't check whether image is broken
|
|
12436
|
+
//refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
|
|
12437
|
+
if (_this.imageElements.length === 0) return true;
|
|
12438
|
+
return _this.imageElements.every(function (img) {
|
|
12439
|
+
return img.complete;
|
|
12440
|
+
});
|
|
12441
|
+
});
|
|
12442
|
+
_defineProperty(this, "OIYp", function () {
|
|
12443
|
+
if (!_this.bgImageUrl) return true;
|
|
12444
|
+
var img = new Image();
|
|
12445
|
+
img.src = _this.bgImageUrl;
|
|
12446
|
+
return img.complete;
|
|
12447
|
+
});
|
|
12448
|
+
_defineProperty(this, "gDMN", function () {
|
|
12449
|
+
if (_this.videoElements.length === 0) return true;
|
|
12450
|
+
return _this.videoElements.every(function (video) {
|
|
12451
|
+
return video.readyState >= 3;
|
|
12452
|
+
});
|
|
12453
|
+
});
|
|
11857
12454
|
this.configId = configId;
|
|
12455
|
+
this.config = _config;
|
|
11858
12456
|
this.name = name;
|
|
11859
12457
|
this.layout = _config.layout;
|
|
11860
|
-
this.styleContent = _config.css;
|
|
12458
|
+
this.styleContent = _config === null || _config === void 0 ? void 0 : _config.css;
|
|
12459
|
+
this.wait_interval = (_config$wait_interval = _config === null || _config === void 0 ? void 0 : _config.wait_interval) !== null && _config$wait_interval !== void 0 ? _config$wait_interval : 5000 / 100;
|
|
11861
12460
|
this.termination = (_config$termination = _config.termination) !== null && _config$termination !== void 0 ? _config$termination : [];
|
|
11862
|
-
this.script = _config.script;
|
|
11863
|
-
this.type =
|
|
12461
|
+
this.script = _config === null || _config === void 0 ? void 0 : _config.script;
|
|
12462
|
+
this.type = _type;
|
|
11864
12463
|
this.initialStyles = "";
|
|
12464
|
+
this.imageElements = [];
|
|
12465
|
+
this.videoElements = [];
|
|
12466
|
+
this.bgImageUrl = "";
|
|
12467
|
+
this.intervalToCheckMediaLoadingStatus = null;
|
|
12468
|
+
this.loggedNudgeNotShownEvent = false;
|
|
12469
|
+
this.closeCallBack = closeCallback;
|
|
11865
12470
|
});
|
|
11866
12471
|
|
|
11867
12472
|
var svgNS$1 = "http://www.w3.org/2000/svg";
|
|
@@ -12384,7 +12989,7 @@
|
|
|
12384
12989
|
if (this.enable_arrow) this.arrow = new Arrow(config.arrow, this.background_color);
|
|
12385
12990
|
this.enable_animation = config.enable_animation;
|
|
12386
12991
|
if (this.enable_animation) this.animation = new Animation(config.animation);
|
|
12387
|
-
this.templateContent = new TemplateContent(config, this.configId, this.name, "
|
|
12992
|
+
this.templateContent = new TemplateContent(config, this.configId, this.name, "tooltip", this.closeInlineCallback.bind(this));
|
|
12388
12993
|
this.set_font_to_scale = (_config$set_font_to_s = config.set_font_to_scale) !== null && _config$set_font_to_s !== void 0 ? _config$set_font_to_s : false;
|
|
12389
12994
|
this.fontMultiplier = this.set_font_to_scale ? getFontMultiplier() : 1;
|
|
12390
12995
|
this.fontMultiplier = this.fontMultiplier > 1 ? this.fontMultiplier : 1;
|
|
@@ -12415,20 +13020,42 @@
|
|
|
12415
13020
|
//If a tooltip can be created
|
|
12416
13021
|
if (canCreate) {
|
|
12417
13022
|
// Called when the target element comes into the viewport to show the tooltip
|
|
12418
|
-
var targetReachedCallback = function
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
13023
|
+
var targetReachedCallback = /*#__PURE__*/function () {
|
|
13024
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
13025
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13026
|
+
while (1) switch (_context.prev = _context.next) {
|
|
13027
|
+
case 0:
|
|
13028
|
+
_context.prev = 0;
|
|
13029
|
+
//Set the tooltip dimensions.
|
|
13030
|
+
//this._setInLineDimensions();
|
|
13031
|
+
//Set the InLine styles
|
|
13032
|
+
_this._setInlineStyles();
|
|
13033
|
+
//Set the offset to properly align arrow w.r.t view element
|
|
13034
|
+
//this._offsetAdjustment();
|
|
13035
|
+
//Set the content
|
|
13036
|
+
_context.next = 4;
|
|
13037
|
+
return _this._setInLineContent();
|
|
13038
|
+
case 4:
|
|
13039
|
+
// Set the obervors.
|
|
13040
|
+
_this._setObservors();
|
|
13041
|
+
// Create a tippy instance
|
|
13042
|
+
_this._createTippyInstance();
|
|
13043
|
+
_context.next = 11;
|
|
13044
|
+
break;
|
|
13045
|
+
case 8:
|
|
13046
|
+
_context.prev = 8;
|
|
13047
|
+
_context.t0 = _context["catch"](0);
|
|
13048
|
+
console.log("failed to create the inline after finding the target element with error ".concat(_context.t0));
|
|
13049
|
+
case 11:
|
|
13050
|
+
case "end":
|
|
13051
|
+
return _context.stop();
|
|
13052
|
+
}
|
|
13053
|
+
}, _callee, null, [[0, 8]]);
|
|
13054
|
+
}));
|
|
13055
|
+
return function targetReachedCallback() {
|
|
13056
|
+
return _ref.apply(this, arguments);
|
|
13057
|
+
};
|
|
13058
|
+
}();
|
|
12432
13059
|
|
|
12433
13060
|
// Called when the valid target is found to show the tooltip
|
|
12434
13061
|
var targetValidCallback = function targetValidCallback() {
|
|
@@ -12576,7 +13203,7 @@
|
|
|
12576
13203
|
animationStyles = "\n @-webkit-keyframes ".concat(this.animation.type, " {\n 0% { transform: ").concat(translateDir(this.position.position, 0), "; }\n 50% { transform: ").concat(translateDir(this.position.position, 50), "; }\n 100% { transform: ").concat(translateDir(this.position.position, 100), "; }\n }\n \n @keyframes ").concat(this.animation.type, " {\n 0% { transform: ").concat(translateDir(this.position.position, 0), "; }\n 50% { transform: ").concat(translateDir(this.position.position, 50), "; }\n 100% { transform: ").concat(translateDir(this.position.position, 100), "; }\n }\n \n .tippy-box {\n animation-name: ").concat(this.animation.type, ";\n animation-duration: ").concat(this.animation.duration, "ms;\n animation-timing-function: ").concat(this.animation.anim_function, ";\n animation-iteration-count: ").concat(this.animation.iteration_count, ";\n }\n ");
|
|
12577
13204
|
}
|
|
12578
13205
|
// Do not modify these. These tippy styles.
|
|
12579
|
-
var tippyStyles = "\n .tippy-box[data-animation=\"fade\"][data-state=hidden]{\n opacity:0;\n } \n [data-tippy-root] {\n max-width:calc(100vw - ".concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.width : 0, "px);\n } \n .tippy-box { \n position:relative;\n line-height:1.4;\n white-space:normal;\n outline:0;\n transition-property:transform,visibility,opacity;\n } \n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n ").concat(tippyTopArrowStyle, "\n border-top-color:initial;\n transform-origin:center top;\n }\n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n ").concat(tippyBottomArrowStyle, "\n border-bottom-color:initial;\n transform-origin:center bottom;\n }\n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n ").concat(tippyLeftArrowStyle, "\n border-left-color:initial;\n transform-origin:center left;\n }\n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n ").concat(tippyRightArrowStyle, "\n border-right-color:initial;\n transform-origin:center right;\n } \n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)\n } \n .tippy-arrow {\n z-index:9999;\n width:18px;\n height:18px;\n color:").concat(this.enable_arrow ? this.arrow.color : "transparent", ";\n opacity:0;\n visibility:hidden;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n } \n .tippy-arrow.open {\n opacity:1;\n visibility:visible;\n }\n .tippy-arrow:before{ \n content:\"\";\n position:absolute;\n border-color:transparent;\n border-style:").concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.style : "solid", ";\n } \n .tippy-content {\n
|
|
13206
|
+
var tippyStyles = "\n .tippy-box[data-animation=\"fade\"][data-state=hidden]{\n opacity:0;\n } \n [data-tippy-root] {\n max-width:calc(100vw - ".concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.width : 0, "px);\n } \n .tippy-box { \n position:relative;\n line-height:1.4;\n white-space:normal;\n outline:0;\n transition-property:transform,visibility,opacity;\n } \n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n ").concat(tippyTopArrowStyle, "\n border-top-color:initial;\n transform-origin:center top;\n }\n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n ").concat(tippyBottomArrowStyle, "\n border-bottom-color:initial;\n transform-origin:center bottom;\n }\n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n ").concat(tippyLeftArrowStyle, "\n border-left-color:initial;\n transform-origin:center left;\n }\n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n ").concat(tippyRightArrowStyle, "\n border-right-color:initial;\n transform-origin:center right;\n } \n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)\n } \n .tippy-arrow {\n z-index:9999;\n width:18px;\n height:18px;\n color:").concat(this.enable_arrow ? this.arrow.color : "transparent", ";\n opacity:0;\n visibility:hidden;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n } \n .tippy-arrow.open {\n opacity:1;\n visibility:visible;\n }\n .tippy-arrow:before{ \n content:\"\";\n position:absolute;\n border-color:transparent;\n border-style:").concat(this.enable_arrow && this.arrow.enable_border ? this.arrow.border.style : "solid", ";\n } \n .tippy-content {\n position:relative;\n z-index:9998;\n } \n ").concat(animationStyles, "\n ");
|
|
12580
13207
|
var tippyTheme = "\n ".concat(tippyStyles, "\n ");
|
|
12581
13208
|
return tippyTheme;
|
|
12582
13209
|
}
|
|
@@ -12745,9 +13372,33 @@
|
|
|
12745
13372
|
}
|
|
12746
13373
|
}, {
|
|
12747
13374
|
key: "_setInLineContent",
|
|
12748
|
-
value: function
|
|
12749
|
-
|
|
12750
|
-
|
|
13375
|
+
value: function () {
|
|
13376
|
+
var _setInLineContent2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
13377
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
13378
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
13379
|
+
case 0:
|
|
13380
|
+
_context2.prev = 0;
|
|
13381
|
+
_context2.next = 3;
|
|
13382
|
+
return this.templateContent.UYsM();
|
|
13383
|
+
case 3:
|
|
13384
|
+
this.inLineContainer = _context2.sent;
|
|
13385
|
+
_context2.next = 9;
|
|
13386
|
+
break;
|
|
13387
|
+
case 6:
|
|
13388
|
+
_context2.prev = 6;
|
|
13389
|
+
_context2.t0 = _context2["catch"](0);
|
|
13390
|
+
console.log("failed at creating template content with error ".concat(_context2.t0));
|
|
13391
|
+
case 9:
|
|
13392
|
+
case "end":
|
|
13393
|
+
return _context2.stop();
|
|
13394
|
+
}
|
|
13395
|
+
}, _callee2, this, [[0, 6]]);
|
|
13396
|
+
}));
|
|
13397
|
+
function _setInLineContent() {
|
|
13398
|
+
return _setInLineContent2.apply(this, arguments);
|
|
13399
|
+
}
|
|
13400
|
+
return _setInLineContent;
|
|
13401
|
+
}()
|
|
12751
13402
|
}, {
|
|
12752
13403
|
key: "_setObservors",
|
|
12753
13404
|
value: function _setObservors() {
|
|
@@ -13032,6 +13683,12 @@
|
|
|
13032
13683
|
console.error("Could not remove the tooltip styles:" + e);
|
|
13033
13684
|
}
|
|
13034
13685
|
}
|
|
13686
|
+
}, {
|
|
13687
|
+
key: "closeInlineCallback",
|
|
13688
|
+
value: function closeInlineCallback(action) {
|
|
13689
|
+
clearTimeout(this.terminationTimeoutId);
|
|
13690
|
+
this.closeCallback(action === "cancel" || action === "redirect" ? true : false);
|
|
13691
|
+
}
|
|
13035
13692
|
}]);
|
|
13036
13693
|
return NewInLineTooltip;
|
|
13037
13694
|
}();
|
|
@@ -13313,6 +13970,8 @@
|
|
|
13313
13970
|
this.background_image = new BackgroundImage(data.background_image);
|
|
13314
13971
|
this.enable_border = data.enable_border;
|
|
13315
13972
|
this.border = new Border(data.border);
|
|
13973
|
+
this.enable_action = data === null || data === void 0 ? void 0 : data.enable_action;
|
|
13974
|
+
if (this.enable_action) this.action = data === null || data === void 0 ? void 0 : data.action;
|
|
13316
13975
|
}
|
|
13317
13976
|
_createClass(Image, null, [{
|
|
13318
13977
|
key: "isEnabled",
|
|
@@ -14283,6 +14942,8 @@
|
|
|
14283
14942
|
function InLineTooltip(config, uis, walkthroughConfigs, terminationConfig, messageConfig, rtmInstance, showCallback, hideCallback, stepperCallBack) {
|
|
14284
14943
|
var _this = this,
|
|
14285
14944
|
_config$set_font_to_s,
|
|
14945
|
+
_this$uiConfig,
|
|
14946
|
+
_this$uiConfig2,
|
|
14286
14947
|
_config$wait_scroll_i,
|
|
14287
14948
|
_config$wait_scroll_i2;
|
|
14288
14949
|
var isWalkthrough = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
|
|
@@ -14294,7 +14955,7 @@
|
|
|
14294
14955
|
* @description Creates the styles for Marketing message.
|
|
14295
14956
|
* @returns {string} css styles
|
|
14296
14957
|
*/
|
|
14297
|
-
_defineProperty(this, "
|
|
14958
|
+
_defineProperty(this, "CJFJ", function () {
|
|
14298
14959
|
if (!_this.enable_marketing) {
|
|
14299
14960
|
return "";
|
|
14300
14961
|
}
|
|
@@ -14313,7 +14974,7 @@
|
|
|
14313
14974
|
* @private
|
|
14314
14975
|
* @description Sets the marketing content at the end of the Inline
|
|
14315
14976
|
*/
|
|
14316
|
-
_defineProperty(this, "
|
|
14977
|
+
_defineProperty(this, "CBmX", function () {
|
|
14317
14978
|
if (_this.enable_marketing) {
|
|
14318
14979
|
var marketingContainer = document.createElement("div");
|
|
14319
14980
|
marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
|
|
@@ -14418,6 +15079,7 @@
|
|
|
14418
15079
|
this.initial_data_placement = this.position.position;
|
|
14419
15080
|
this.recent_placement = this.position.position;
|
|
14420
15081
|
this.tippy_box_position = 0;
|
|
15082
|
+
this.step = (_this$uiConfig = this.uiConfig) !== null && _this$uiConfig !== void 0 && (_this$uiConfig = _this$uiConfig.additional_info) !== null && _this$uiConfig !== void 0 && _this$uiConfig.apx_step ? (_this$uiConfig2 = this.uiConfig) === null || _this$uiConfig2 === void 0 || (_this$uiConfig2 = _this$uiConfig2.additional_info) === null || _this$uiConfig2 === void 0 ? void 0 : _this$uiConfig2.apx_step : -1;
|
|
14421
15083
|
|
|
14422
15084
|
//badge related config
|
|
14423
15085
|
this.flag = true;
|
|
@@ -14793,12 +15455,16 @@
|
|
|
14793
15455
|
this._setDimenstionFromResolution(this.video.width, this.video.height, scale, calculateFromHeight);
|
|
14794
15456
|
}
|
|
14795
15457
|
} else if (this.enable_icon) {
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
}
|
|
15458
|
+
this.inline_width = "".concat(this.getPixelsFromPercentage(this.width, false), "px");
|
|
15459
|
+
// if (this.direction.nudge === DIRECTION.VERTICAL) {
|
|
15460
|
+
// this.inline_width = `${this.getPixelsFromPercentage(
|
|
15461
|
+
// this.width,
|
|
15462
|
+
// false
|
|
15463
|
+
// )}px`;
|
|
15464
|
+
// } else {
|
|
15465
|
+
// //this.inline_height = `${this.height}%`;
|
|
15466
|
+
// this.min_width = `${this.getPixelsFromPercentage(this.width, false)}px`;
|
|
15467
|
+
// }
|
|
14802
15468
|
} else {
|
|
14803
15469
|
if (this.direction.nudge === DIRECTION.VERTICAL) {
|
|
14804
15470
|
this.inline_width = "".concat(this.getPixelsFromPercentage(this.width, false), "px");
|
|
@@ -14896,7 +15562,12 @@
|
|
|
14896
15562
|
this.tooltip.setProps({
|
|
14897
15563
|
onClickOutside: function onClickOutside() {
|
|
14898
15564
|
if (_this6.enable_dismiss_actions && _this6.dismiss_actions.outside_touch) {
|
|
15565
|
+
var _this6$uiConfig;
|
|
14899
15566
|
_this6._destroyTooltip();
|
|
15567
|
+
if ((_this6$uiConfig = _this6.uiConfig) !== null && _this6$uiConfig !== void 0 && (_this6$uiConfig = _this6$uiConfig.additional_info) !== null && _this6$uiConfig !== void 0 && _this6$uiConfig.apx_step) {
|
|
15568
|
+
var _window2, _this6$uiConfig2;
|
|
15569
|
+
(_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || _window2.triggerNextStep(_this6.configId, ((_this6$uiConfig2 = _this6.uiConfig) === null || _this6$uiConfig2 === void 0 || (_this6$uiConfig2 = _this6$uiConfig2.additional_info) === null || _this6$uiConfig2 === void 0 ? void 0 : _this6$uiConfig2.apx_step) + 1);
|
|
15570
|
+
}
|
|
14900
15571
|
}
|
|
14901
15572
|
}
|
|
14902
15573
|
});
|
|
@@ -14915,7 +15586,7 @@
|
|
|
14915
15586
|
if (apxor_tooltip_styles) {
|
|
14916
15587
|
return;
|
|
14917
15588
|
}
|
|
14918
|
-
var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInLineContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInLineMediaContainerStyles(), "\n ").concat(this._getInLineNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getInLineButtonContainerStyles(), " \n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.
|
|
15589
|
+
var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInLineContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInLineMediaContainerStyles(), "\n ").concat(this._getInLineNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getInLineButtonContainerStyles(), " \n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.CJFJ(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
14919
15590
|
var styleNode = document.createElement("style");
|
|
14920
15591
|
styleNode.setAttribute("apx-tooltip-styles", "");
|
|
14921
15592
|
styleNode.innerHTML = styles;
|
|
@@ -15725,7 +16396,7 @@
|
|
|
15725
16396
|
this._setCloseButton();
|
|
15726
16397
|
|
|
15727
16398
|
//Set the Marketing content
|
|
15728
|
-
this.
|
|
16399
|
+
this.CBmX();
|
|
15729
16400
|
}
|
|
15730
16401
|
|
|
15731
16402
|
/**
|
|
@@ -16059,7 +16730,7 @@
|
|
|
16059
16730
|
} else {
|
|
16060
16731
|
buttons_config = this.buttons.bottom;
|
|
16061
16732
|
}
|
|
16062
|
-
var _Buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INLINE, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index, this.fontMultiplier);
|
|
16733
|
+
var _Buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INLINE, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index, "center", this.fontMultiplier, this.step);
|
|
16063
16734
|
if (position === BUTTON_CONTAINER_POSITION.TOP) {
|
|
16064
16735
|
this.topButtonContainer.appendChild(_Buttons);
|
|
16065
16736
|
} else if (position === BUTTON_CONTAINER_POSITION.CENTER) {
|
|
@@ -16544,8 +17215,13 @@
|
|
|
16544
17215
|
key: "_targetClickCallback",
|
|
16545
17216
|
value: function _targetClickCallback() {
|
|
16546
17217
|
if (this.enable_dismiss_actions && this.dismiss_actions.target_touch) {
|
|
17218
|
+
var _this$uiConfig3;
|
|
16547
17219
|
this._destroyTooltip();
|
|
16548
17220
|
window.Apxor.logActionEvent("InlineTargetViewClicked", this.configId, this.name);
|
|
17221
|
+
if ((_this$uiConfig3 = this.uiConfig) !== null && _this$uiConfig3 !== void 0 && (_this$uiConfig3 = _this$uiConfig3.additional_info) !== null && _this$uiConfig3 !== void 0 && _this$uiConfig3.apx_step) {
|
|
17222
|
+
var _window3, _this$uiConfig4;
|
|
17223
|
+
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.Apxor) === null || _window3 === void 0 || _window3.triggerNextStep(this.configId, ((_this$uiConfig4 = this.uiConfig) === null || _this$uiConfig4 === void 0 || (_this$uiConfig4 = _this$uiConfig4.additional_info) === null || _this$uiConfig4 === void 0 ? void 0 : _this$uiConfig4.apx_step) + 1);
|
|
17224
|
+
}
|
|
16549
17225
|
}
|
|
16550
17226
|
}
|
|
16551
17227
|
|
|
@@ -16558,7 +17234,12 @@
|
|
|
16558
17234
|
}, {
|
|
16559
17235
|
key: "_dimbackgroundClickCallback",
|
|
16560
17236
|
value: function _dimbackgroundClickCallback() {
|
|
17237
|
+
var _this$uiConfig5;
|
|
16561
17238
|
this._destroyTooltip(false);
|
|
17239
|
+
if ((_this$uiConfig5 = this.uiConfig) !== null && _this$uiConfig5 !== void 0 && (_this$uiConfig5 = _this$uiConfig5.additional_info) !== null && _this$uiConfig5 !== void 0 && _this$uiConfig5.apx_step) {
|
|
17240
|
+
var _window4, _this$uiConfig6;
|
|
17241
|
+
(_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || _window4.triggerNextStep(this.configId, ((_this$uiConfig6 = this.uiConfig) === null || _this$uiConfig6 === void 0 || (_this$uiConfig6 = _this$uiConfig6.additional_info) === null || _this$uiConfig6 === void 0 ? void 0 : _this$uiConfig6.apx_step) + 1);
|
|
17242
|
+
}
|
|
16562
17243
|
}
|
|
16563
17244
|
|
|
16564
17245
|
/**
|
|
@@ -16957,7 +17638,7 @@
|
|
|
16957
17638
|
var DEFAULT_PADDING$1 = 5;
|
|
16958
17639
|
var InLineCoachMark = /*#__PURE__*/function () {
|
|
16959
17640
|
function InLineCoachMark(config, uis, walkthroughConfigs, terminationConfig, messageConfig, rtmInstance, showCallback, hideCallback, stepperCallBack) {
|
|
16960
|
-
var _config$content, _config$content2;
|
|
17641
|
+
var _config$content, _config$content2, _this$uiConfig, _this$uiConfig2;
|
|
16961
17642
|
var isWalkthrough = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
|
|
16962
17643
|
var index = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : 0;
|
|
16963
17644
|
_classCallCheck(this, InLineCoachMark);
|
|
@@ -17002,6 +17683,7 @@
|
|
|
17002
17683
|
}
|
|
17003
17684
|
this.content_enable_buttons = (_config$content = config.content) === null || _config$content === void 0 ? void 0 : _config$content.enable_buttons;
|
|
17004
17685
|
if (this.content_enable_buttons) this.buttons = new CoachmarkButtons((_config$content2 = config.content) === null || _config$content2 === void 0 ? void 0 : _config$content2.coachmark_buttons);
|
|
17686
|
+
this.step = (_this$uiConfig = this.uiConfig) !== null && _this$uiConfig !== void 0 && (_this$uiConfig = _this$uiConfig.additional_info) !== null && _this$uiConfig !== void 0 && _this$uiConfig.apx_step ? (_this$uiConfig2 = this.uiConfig) === null || _this$uiConfig2 === void 0 || (_this$uiConfig2 = _this$uiConfig2.additional_info) === null || _this$uiConfig2 === void 0 ? void 0 : _this$uiConfig2.apx_step : -1;
|
|
17005
17687
|
this.targetElement = null;
|
|
17006
17688
|
this.inline_width = "auto";
|
|
17007
17689
|
this.inline_height = "auto";
|
|
@@ -17224,8 +17906,13 @@
|
|
|
17224
17906
|
key: "_targetClickCallback",
|
|
17225
17907
|
value: function _targetClickCallback() {
|
|
17226
17908
|
if (this.enable_dismiss_actions && this.dismiss_actions.target_touch) {
|
|
17909
|
+
var _this$uiConfig3;
|
|
17227
17910
|
this.rtmInstance.logActionEvent("InlineTargetViewClicked", this.configId, this.name);
|
|
17228
17911
|
this._destroyCoachMark();
|
|
17912
|
+
if ((_this$uiConfig3 = this.uiConfig) !== null && _this$uiConfig3 !== void 0 && (_this$uiConfig3 = _this$uiConfig3.additional_info) !== null && _this$uiConfig3 !== void 0 && _this$uiConfig3.apx_step) {
|
|
17913
|
+
var _window, _this$uiConfig4;
|
|
17914
|
+
(_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || _window.triggerNextStep(this.configId, ((_this$uiConfig4 = this.uiConfig) === null || _this$uiConfig4 === void 0 || (_this$uiConfig4 = _this$uiConfig4.additional_info) === null || _this$uiConfig4 === void 0 ? void 0 : _this$uiConfig4.apx_step) + 1);
|
|
17915
|
+
}
|
|
17229
17916
|
}
|
|
17230
17917
|
}
|
|
17231
17918
|
}, {
|
|
@@ -17918,7 +18605,7 @@
|
|
|
17918
18605
|
}
|
|
17919
18606
|
}
|
|
17920
18607
|
}
|
|
17921
|
-
var Buttons = generateButtonsBlock(this.configId, this.name, {}, EVENT_PREFIX.INLINE, buttons_config, this.buttons.direction, "bottom", actionHandler, this.isWalkthrough, this.uis, this.index, this.buttons.alignment, this.fontMultiplier);
|
|
18608
|
+
var Buttons = generateButtonsBlock(this.configId, this.name, {}, EVENT_PREFIX.INLINE, buttons_config, this.buttons.direction, "bottom", actionHandler, this.isWalkthrough, this.uis, this.index, this.buttons.alignment, this.fontMultiplier, this.step);
|
|
17922
18609
|
this.buttonContainer.appendChild(Buttons);
|
|
17923
18610
|
}
|
|
17924
18611
|
|
|
@@ -18469,13 +19156,16 @@
|
|
|
18469
19156
|
_classCallCheck(this, NewModalInApp);
|
|
18470
19157
|
_defineProperty(this, "closeListener", function () {
|
|
18471
19158
|
clearTimeout(_this.terminationTimeoutId);
|
|
18472
|
-
_this.closeCallback(_this.overlayElement, "dismiss", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
|
|
19159
|
+
_this.closeCallback(_this.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
|
|
18473
19160
|
});
|
|
18474
19161
|
_defineProperty(this, "redirectionListener", function () {
|
|
18475
19162
|
if (window.location.href !== _this.launchPageUrl) {
|
|
18476
|
-
_this.closeCallback(_this.overlayElement, "dismiss", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
|
|
19163
|
+
_this.closeCallback(_this.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
|
|
18477
19164
|
}
|
|
18478
19165
|
});
|
|
19166
|
+
this.configId = configId;
|
|
19167
|
+
this.config = config;
|
|
19168
|
+
this.name = name;
|
|
18479
19169
|
this.terminationConfig = terminationConfig;
|
|
18480
19170
|
this.terminationTimeoutId = null;
|
|
18481
19171
|
this.cssPostFix = "-".concat(configId, "-").concat(name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
|
|
@@ -18488,31 +19178,53 @@
|
|
|
18488
19178
|
if (this.enable_dismiss_actions) this.dismiss_actions = new DismissActions(config.dismiss_actions);
|
|
18489
19179
|
this.enable_dimbackground = config.enable_dimbackground;
|
|
18490
19180
|
if (this.enable_dimbackground) this.dimbackground = new DimBackground(config.dimbackground);
|
|
18491
|
-
this.templateContent = new TemplateContent(config, this.configId, this.name, "inapp");
|
|
18492
|
-
this.configId = configId;
|
|
18493
|
-
this.name = name;
|
|
18494
19181
|
this.showCallback = showCallback;
|
|
18495
19182
|
this.closeCallback = closeCallback;
|
|
18496
19183
|
this.dimBackgroundElement = null;
|
|
18497
19184
|
this.overlayElement = null;
|
|
18498
19185
|
this.inAppContainer = null;
|
|
18499
19186
|
this.launchPageUrl = "";
|
|
19187
|
+
this.templateContent = new TemplateContent(config, this.configId, this.name, "inapp", this.closeInappCallback.bind(this));
|
|
18500
19188
|
}
|
|
18501
19189
|
_createClass(NewModalInApp, [{
|
|
18502
19190
|
key: "createInAppModal",
|
|
18503
|
-
value: function
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18514
|
-
|
|
18515
|
-
|
|
19191
|
+
value: function () {
|
|
19192
|
+
var _createInAppModal = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
19193
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19194
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19195
|
+
case 0:
|
|
19196
|
+
_context.prev = 0;
|
|
19197
|
+
//Set the background overlays
|
|
19198
|
+
this._setBackgroundOverlays();
|
|
19199
|
+
//Set the InApp styles
|
|
19200
|
+
this._setStyles();
|
|
19201
|
+
//Set the content
|
|
19202
|
+
_context.next = 5;
|
|
19203
|
+
return this._setInAppModalContent();
|
|
19204
|
+
case 5:
|
|
19205
|
+
//set the position
|
|
19206
|
+
this._setPosition();
|
|
19207
|
+
//Set the auto termination
|
|
19208
|
+
this._setAutoTerminate();
|
|
19209
|
+
//Show the InApp
|
|
19210
|
+
this._showInApp();
|
|
19211
|
+
_context.next = 13;
|
|
19212
|
+
break;
|
|
19213
|
+
case 10:
|
|
19214
|
+
_context.prev = 10;
|
|
19215
|
+
_context.t0 = _context["catch"](0);
|
|
19216
|
+
console.log("creating Modal Template failed with error ".concat(_context.t0));
|
|
19217
|
+
case 13:
|
|
19218
|
+
case "end":
|
|
19219
|
+
return _context.stop();
|
|
19220
|
+
}
|
|
19221
|
+
}, _callee, this, [[0, 10]]);
|
|
19222
|
+
}));
|
|
19223
|
+
function createInAppModal() {
|
|
19224
|
+
return _createInAppModal.apply(this, arguments);
|
|
19225
|
+
}
|
|
19226
|
+
return createInAppModal;
|
|
19227
|
+
}()
|
|
18516
19228
|
}, {
|
|
18517
19229
|
key: "_setBackgroundOverlays",
|
|
18518
19230
|
value: function _setBackgroundOverlays() {
|
|
@@ -18535,9 +19247,14 @@
|
|
|
18535
19247
|
this.overlayElement.appendChild(this.dimBackgroundElement);
|
|
18536
19248
|
if (this.enable_dismiss_actions && this.dismiss_actions.outside_touch) {
|
|
18537
19249
|
dismissableElement.onclick = function () {
|
|
19250
|
+
var _this2$config;
|
|
18538
19251
|
clearTimeout(_this2.terminationTimeoutId);
|
|
18539
19252
|
dismissableElement.onclick = null;
|
|
18540
|
-
|
|
19253
|
+
if ((_this2$config = _this2.config) !== null && _this2$config !== void 0 && (_this2$config = _this2$config.additional_info) !== null && _this2$config !== void 0 && _this2$config.apx_step) {
|
|
19254
|
+
var _window, _this2$config2;
|
|
19255
|
+
(_window = window) === null || _window === void 0 || (_window = _window.Apxor) === null || _window === void 0 || _window.triggerNextStep(_this2.configId, ((_this2$config2 = _this2.config) === null || _this2$config2 === void 0 || (_this2$config2 = _this2$config2.additional_info) === null || _this2$config2 === void 0 ? void 0 : _this2$config2.apx_step) + 1);
|
|
19256
|
+
}
|
|
19257
|
+
_this2.closeCallback(_this2.overlayElement, "dismiss", "outside-touch", ".apx-inapp-container".concat(_this2.cssPostFix), _this2.closeListener, _this2.redirectionListener);
|
|
18541
19258
|
};
|
|
18542
19259
|
}
|
|
18543
19260
|
} else {
|
|
@@ -18548,8 +19265,6 @@
|
|
|
18548
19265
|
if (!this.enable_dimbackground) {
|
|
18549
19266
|
document.body.addEventListener("click", this.redirectionListener);
|
|
18550
19267
|
}
|
|
18551
|
-
// Append the overlay to the body. All the element of the InApp are children of this overlay.
|
|
18552
|
-
document.body.appendChild(this.overlayElement);
|
|
18553
19268
|
}
|
|
18554
19269
|
}, {
|
|
18555
19270
|
key: "_setStyles",
|
|
@@ -18564,16 +19279,45 @@
|
|
|
18564
19279
|
key: "_getBackgroundContainerStyles",
|
|
18565
19280
|
value: function _getBackgroundContainerStyles() {
|
|
18566
19281
|
// Set the dim background color and opacity only if dim background is enabled.
|
|
18567
|
-
var backgroundContainerStyle = "\n .apx-inapp-overlay".concat(this.cssPostFix, " {\n width:100%;\n height:100%;\n }\n .apx-inapp-dimbackground-overlay").concat(this.cssPostFix, " {\n width:100%;\n height:100%;\n position:fixed;\n top:0;\n left:0;\n z-index:999;\n background-color:").concat(this.enable_dimbackground ? this.dimbackground.color : "transparent", ";\n
|
|
19282
|
+
var backgroundContainerStyle = "\n .apx-inapp-overlay".concat(this.cssPostFix, " {\n width:100%;\n height:100%;\n }\n .apx-inapp-dimbackground-overlay").concat(this.cssPostFix, " {\n width:100%;\n height:100%;\n position:fixed;\n top:0;\n left:0;\n z-index:999;\n background-color:").concat(this.enable_dimbackground ? this.dimbackground.color : "transparent", ";\n overflow: auto;\n }\n ");
|
|
18568
19283
|
return backgroundContainerStyle;
|
|
18569
19284
|
}
|
|
18570
19285
|
}, {
|
|
18571
19286
|
key: "_setInAppModalContent",
|
|
18572
|
-
value: function
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
19287
|
+
value: function () {
|
|
19288
|
+
var _setInAppModalContent2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
19289
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
19290
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
19291
|
+
case 0:
|
|
19292
|
+
_context2.prev = 0;
|
|
19293
|
+
_context2.next = 3;
|
|
19294
|
+
return this.templateContent.UYsM();
|
|
19295
|
+
case 3:
|
|
19296
|
+
this.inAppContainer = _context2.sent;
|
|
19297
|
+
this.inAppContainer.style.zIndex = 99999;
|
|
19298
|
+
this.overlayElement.appendChild(this.inAppContainer);
|
|
19299
|
+
if (this.enable_dismiss_actions && this.dismiss_actions.outside_touch) {
|
|
19300
|
+
this.inAppContainer.onclick = function (event) {
|
|
19301
|
+
event.stopPropagation();
|
|
19302
|
+
};
|
|
19303
|
+
}
|
|
19304
|
+
_context2.next = 12;
|
|
19305
|
+
break;
|
|
19306
|
+
case 9:
|
|
19307
|
+
_context2.prev = 9;
|
|
19308
|
+
_context2.t0 = _context2["catch"](0);
|
|
19309
|
+
console.log("failed at creating template content with error ".concat(_context2.t0));
|
|
19310
|
+
case 12:
|
|
19311
|
+
case "end":
|
|
19312
|
+
return _context2.stop();
|
|
19313
|
+
}
|
|
19314
|
+
}, _callee2, this, [[0, 9]]);
|
|
19315
|
+
}));
|
|
19316
|
+
function _setInAppModalContent() {
|
|
19317
|
+
return _setInAppModalContent2.apply(this, arguments);
|
|
19318
|
+
}
|
|
19319
|
+
return _setInAppModalContent;
|
|
19320
|
+
}()
|
|
18577
19321
|
}, {
|
|
18578
19322
|
key: "_setPosition",
|
|
18579
19323
|
value: function _setPosition() {
|
|
@@ -18613,6 +19357,18 @@
|
|
|
18613
19357
|
this.inAppContainer.style.webkitTransform = "translate(-50%, -50%)";
|
|
18614
19358
|
this.inAppContainer.style.MozTransform = "translate(-50%, -50%);";
|
|
18615
19359
|
break;
|
|
19360
|
+
case INAPP_POSITION.LEFT:
|
|
19361
|
+
this.inAppContainer.style.top = "50%";
|
|
19362
|
+
this.inAppContainer.style.left = "0px";
|
|
19363
|
+
this.inAppContainer.style.webkitTransform = "translate(0px, -50%)";
|
|
19364
|
+
this.inAppContainer.style.MozTransform = "translate(0px, -50%)";
|
|
19365
|
+
break;
|
|
19366
|
+
case INAPP_POSITION.RIGHT:
|
|
19367
|
+
this.inAppContainer.style.top = "50%";
|
|
19368
|
+
this.inAppContainer.style.right = "0px";
|
|
19369
|
+
this.inAppContainer.style.webkitTransform = "translate(0px, -50%)";
|
|
19370
|
+
this.inAppContainer.style.MozTransform = "translate(0px, -50%)";
|
|
19371
|
+
break;
|
|
18616
19372
|
default:
|
|
18617
19373
|
this.inAppContainer.style.top = "50%";
|
|
18618
19374
|
this.inAppContainer.style.left = "50%";
|
|
@@ -18627,14 +19383,28 @@
|
|
|
18627
19383
|
var _this3 = this;
|
|
18628
19384
|
if (this.terminationConfig.auto_dismiss === true) {
|
|
18629
19385
|
this.terminationTimeoutId = window.setTimeout(function () {
|
|
18630
|
-
|
|
19386
|
+
var _this3$config;
|
|
19387
|
+
if ((_this3$config = _this3.config) !== null && _this3$config !== void 0 && (_this3$config = _this3$config.additional_info) !== null && _this3$config !== void 0 && _this3$config.apx_step) {
|
|
19388
|
+
var _window2, _this3$config2;
|
|
19389
|
+
(_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.Apxor) === null || _window2 === void 0 || _window2.triggerNextStep(_this3.configId, ((_this3$config2 = _this3.config) === null || _this3$config2 === void 0 || (_this3$config2 = _this3$config2.additional_info) === null || _this3$config2 === void 0 ? void 0 : _this3$config2.apx_step) + 1);
|
|
19390
|
+
}
|
|
19391
|
+
_this3.closeCallback(_this3.overlayElement, "dismiss", "auto-dismiss", ".apx-inapp-container".concat(_this3.cssPostFix), _this3.closeListener, _this3.redirectionListener);
|
|
18631
19392
|
}, this.terminationConfig.duration);
|
|
18632
19393
|
}
|
|
18633
19394
|
}
|
|
19395
|
+
}, {
|
|
19396
|
+
key: "closeInappCallback",
|
|
19397
|
+
value: function closeInappCallback(action) {
|
|
19398
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
19399
|
+
clearTimeout(this.terminationTimeoutId);
|
|
19400
|
+
this.closeCallback(this.overlayElement, action, type, ".apx-inapp-container".concat(this.cssPostFix), this.closeListener, this.redirectionListener);
|
|
19401
|
+
}
|
|
18634
19402
|
}, {
|
|
18635
19403
|
key: "_showInApp",
|
|
18636
19404
|
value: function _showInApp() {
|
|
18637
19405
|
this.inAppContainer.classList.toggle("open");
|
|
19406
|
+
// Append the overlay to the body. All the element of the InApp are children of this overlay.
|
|
19407
|
+
document.body.appendChild(this.overlayElement);
|
|
18638
19408
|
this.showCallback();
|
|
18639
19409
|
}
|
|
18640
19410
|
}]);
|
|
@@ -18699,17 +19469,19 @@
|
|
|
18699
19469
|
* @param {function} closeCallback
|
|
18700
19470
|
*/
|
|
18701
19471
|
function ModalInApp(config, terminationConfig, configId, name, showCallback, closeCallback, stepperCallBack, isWalkthrough) {
|
|
18702
|
-
var _this = this
|
|
19472
|
+
var _this = this,
|
|
19473
|
+
_this$config,
|
|
19474
|
+
_this$config2;
|
|
18703
19475
|
var uis = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : {};
|
|
18704
19476
|
var index = arguments.length > 9 ? arguments[9] : undefined;
|
|
18705
19477
|
_classCallCheck(this, ModalInApp);
|
|
18706
19478
|
_defineProperty(this, "closeListener", function () {
|
|
18707
19479
|
clearTimeout(_this.terminationTimeoutId);
|
|
18708
|
-
_this.closeCallback(_this.overlayElement, "dismiss", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
|
|
19480
|
+
_this.closeCallback(_this.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
|
|
18709
19481
|
});
|
|
18710
19482
|
_defineProperty(this, "redirectionListener", function () {
|
|
18711
19483
|
if (window.location.href !== _this.launchPageUrl) {
|
|
18712
|
-
_this.closeCallback(_this.overlayElement, "dismiss", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
|
|
19484
|
+
_this.closeCallback(_this.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this.cssPostFix), _this.closeListener, _this.redirectionListener);
|
|
18713
19485
|
}
|
|
18714
19486
|
});
|
|
18715
19487
|
/**
|
|
@@ -18718,7 +19490,7 @@
|
|
|
18718
19490
|
* @description Creates the styles for Marketing message.
|
|
18719
19491
|
* @returns {string} css styles
|
|
18720
19492
|
*/
|
|
18721
|
-
_defineProperty(this, "
|
|
19493
|
+
_defineProperty(this, "CJFJ", function () {
|
|
18722
19494
|
if (!_this.enable_marketing) {
|
|
18723
19495
|
return "";
|
|
18724
19496
|
}
|
|
@@ -18764,7 +19536,7 @@
|
|
|
18764
19536
|
* @private
|
|
18765
19537
|
* @description Get the response for Form content in the InApp modal.
|
|
18766
19538
|
*/
|
|
18767
|
-
_defineProperty(this, "
|
|
19539
|
+
_defineProperty(this, "VCQT", function (form_elements) {
|
|
18768
19540
|
var obj = {};
|
|
18769
19541
|
var callback = "";
|
|
18770
19542
|
form_elements.forEach(function (element) {
|
|
@@ -18804,7 +19576,7 @@
|
|
|
18804
19576
|
* @private
|
|
18805
19577
|
* @description Sets the marketing content at the end of the InApp
|
|
18806
19578
|
*/
|
|
18807
|
-
_defineProperty(this, "
|
|
19579
|
+
_defineProperty(this, "CBmX", function () {
|
|
18808
19580
|
if (_this.enable_marketing) {
|
|
18809
19581
|
var marketingContainer = document.createElement("div");
|
|
18810
19582
|
marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
|
|
@@ -18818,6 +19590,7 @@
|
|
|
18818
19590
|
this.terminationConfig = terminationConfig;
|
|
18819
19591
|
this.terminationTimeoutId = null;
|
|
18820
19592
|
this.isWalkthrough = isWalkthrough;
|
|
19593
|
+
this.config = config;
|
|
18821
19594
|
this.cssPostFix = "-".concat(configId, "-").concat(name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
|
|
18822
19595
|
this.delay = config.delay || 0;
|
|
18823
19596
|
this.background_color = config.bg_color || COLORS.WHITE;
|
|
@@ -18863,6 +19636,7 @@
|
|
|
18863
19636
|
if (this.enable_gradient) this.gradient = new Gradient(config.gradient);
|
|
18864
19637
|
this.enable_marketing = config.enable_marketing;
|
|
18865
19638
|
if (this.enable_marketing) this.marketing = new Marketing(config.marketing);
|
|
19639
|
+
this.step = (_this$config = this.config) !== null && _this$config !== void 0 && (_this$config = _this$config.additional_info) !== null && _this$config !== void 0 && _this$config.apx_step ? (_this$config2 = this.config) === null || _this$config2 === void 0 || (_this$config2 = _this$config2.additional_info) === null || _this$config2 === void 0 ? void 0 : _this$config2.apx_step : -1;
|
|
18866
19640
|
this.min_width = "";
|
|
18867
19641
|
this.max_width = "";
|
|
18868
19642
|
this.inapp_width = "auto";
|
|
@@ -19034,7 +19808,7 @@
|
|
|
19034
19808
|
dismissableElement.onclick = function () {
|
|
19035
19809
|
clearTimeout(_this2.terminationTimeoutId);
|
|
19036
19810
|
dismissableElement.onclick = null;
|
|
19037
|
-
_this2.closeCallback(_this2.overlayElement, "dismiss", ".apx-inapp-container".concat(_this2.cssPostFix), _this2.closeListener, _this2.redirectionListener);
|
|
19811
|
+
_this2.closeCallback(_this2.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this2.cssPostFix), _this2.closeListener, _this2.redirectionListener);
|
|
19038
19812
|
};
|
|
19039
19813
|
}
|
|
19040
19814
|
} else {
|
|
@@ -19057,7 +19831,7 @@
|
|
|
19057
19831
|
}, {
|
|
19058
19832
|
key: "_setStyles",
|
|
19059
19833
|
value: function _setStyles() {
|
|
19060
|
-
var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInAppContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInAppMediaContainerStyles(), "\n ").concat(this._getInAppNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getFormStyles(), "\n ").concat(this._getInAppButtonContainerStyles(), "\n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.
|
|
19834
|
+
var styles = "\n ".concat(this._getCustomFonts(), " \n ").concat(this._getBackgroundContainerStyles(), " \n ").concat(this._getInAppContainerStyles(), " \n ").concat(this._getScrollStyles(), " \n ").concat(this._getControlsStyles(), " \n ").concat(this._getInAppMediaContainerStyles(), "\n ").concat(this._getInAppNonMediaContainerStyles(), "\n ").concat(this._getTextConatinerStyles(), "\n ").concat(this._getTitleStyles(), " \n ").concat(this._getDescriptionStyles(), " \n ").concat(this._getFormStyles(), "\n ").concat(this._getInAppButtonContainerStyles(), "\n ").concat(this._getIconStyles(), " \n ").concat(this._getImageStyles(), " \n ").concat(this._getVideoStyles(), " \n ").concat(this.CJFJ(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
|
|
19061
19835
|
var styleNode = document.createElement("style");
|
|
19062
19836
|
styleNode.setAttribute("id", "apxor-style-" + this.configId);
|
|
19063
19837
|
styleNode.innerHTML = styles;
|
|
@@ -19147,6 +19921,9 @@
|
|
|
19147
19921
|
case INAPP_POSITION.CENTER:
|
|
19148
19922
|
positionStylesForContainer = "\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n ";
|
|
19149
19923
|
break;
|
|
19924
|
+
case INAPP_POSITION.FULL_SCREEN:
|
|
19925
|
+
positionStylesForContainer = "\n top: 0px;\n left: 0px;\n ";
|
|
19926
|
+
break;
|
|
19150
19927
|
default:
|
|
19151
19928
|
positionStylesForContainer = "\n left:50%;\n top:50%;\n -webkit-transform: translate(-50%, -50%);\n -moz-transform: translate(-50%, -50%);\n ";
|
|
19152
19929
|
break;
|
|
@@ -19175,7 +19952,7 @@
|
|
|
19175
19952
|
flexStylesForContainer = " ".concat(flexStylesForContainer, "\n justify-content:space-evenly;\n align-items:center;\n display:flex;\n ");
|
|
19176
19953
|
var maxWidth = "",
|
|
19177
19954
|
maxHeight = "",
|
|
19178
|
-
margin = "margin: auto";
|
|
19955
|
+
margin = "margin: auto;";
|
|
19179
19956
|
if (this.direction.nudge === DIRECTION.HORIZONTAL) {
|
|
19180
19957
|
if (!(this.enable_image || this.enable_video || this.enable_icon)) {
|
|
19181
19958
|
maxWidth = "max-width: ".concat(this.max_width);
|
|
@@ -19193,7 +19970,7 @@
|
|
|
19193
19970
|
}
|
|
19194
19971
|
//justify-content: space-evenly;
|
|
19195
19972
|
//align-items:stretch
|
|
19196
|
-
var inappContainerStyles = "\n .apx-inapp-container".concat(this.cssPostFix, " {\n height:").concat(this.inapp_height, ";\n width:").concat(this.inapp_width, ";\n background-color:").concat(this.background_color, ";\n z-index:9999;\n opacity:0;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:fixed;\n visibility:hidden;\n\n ").concat(minWidthStyle, "\n ").concat(flexStylesForContainer, "\n ").concat(paddingStylesForContainer, "\n ").concat(borderStylesForContainer, "\n ").concat(gradientStylesForContainer, "\n ").concat(shadowStylesForContainer, "\n ").concat(positionStylesForContainer, "\n ").concat(maxWidth, "\n ").concat(maxHeight, "\n ").concat(margin, "\n }\n \n .apx-inapp-container").concat(this.cssPostFix, ".open{\n opacity:1;\n visibility:visible;\n }\n ");
|
|
19973
|
+
var inappContainerStyles = "\n .apx-inapp-container".concat(this.cssPostFix, " {\n height:").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "100%" : this.inapp_height, ";\n width:").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "100%" : this.inapp_width, ";\n background-color:").concat(this.background_color, ";\n z-index:9999;\n opacity:0;\n transition:all .5s cubic-bezier(.96,.23,.07,.8);\n position:fixed;\n visibility:hidden;\n\n ").concat(minWidthStyle, "\n ").concat(flexStylesForContainer, "\n ").concat(paddingStylesForContainer, "\n ").concat(borderStylesForContainer, "\n ").concat(gradientStylesForContainer, "\n ").concat(shadowStylesForContainer, "\n ").concat(positionStylesForContainer, "\n ").concat(maxWidth, "\n ").concat(maxHeight, "\n ").concat(margin, "\n ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "box-sizing: border-box" : "", "\n }\n \n .apx-inapp-container").concat(this.cssPostFix, ".open{\n opacity:1;\n visibility:visible;\n }\n ");
|
|
19197
19974
|
return inappContainerStyles;
|
|
19198
19975
|
}
|
|
19199
19976
|
|
|
@@ -19246,7 +20023,7 @@
|
|
|
19246
20023
|
}, {
|
|
19247
20024
|
key: "_getInAppMediaContainerStyles",
|
|
19248
20025
|
value: function _getInAppMediaContainerStyles() {
|
|
19249
|
-
var inappMediaContainerStyles = "\n .apx-inapp-media-container".concat(this.cssPostFix, "{\n ").concat(this.enable_icon ? "align-self:".concat(this.icon.alignment, ";") : "", "\n ").concat(this.enable_image || this.enable_video ? "display:flex;" : "", "\n }");
|
|
20026
|
+
var inappMediaContainerStyles = "\n .apx-inapp-media-container".concat(this.cssPostFix, "{\n ").concat(this.enable_icon ? "align-self:".concat(this.icon.alignment, ";") : "", "\n ").concat(this.enable_image || this.enable_video ? "display:flex;" : "", "\n ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN && (this.enable_image || this.enable_video) ? "flex-grow:1" : "", "\n }");
|
|
19250
20027
|
return inappMediaContainerStyles;
|
|
19251
20028
|
}
|
|
19252
20029
|
|
|
@@ -19423,7 +20200,7 @@
|
|
|
19423
20200
|
if (this.image.enable_border) {
|
|
19424
20201
|
imageBorderStyles = "\n border-radius:".concat(this.image.border.radius, "%;\n border:").concat(this.image.border.width, "px ").concat(this.image.border.style, " ").concat(this.image.border.color, ";\n ");
|
|
19425
20202
|
}
|
|
19426
|
-
imageStyles = "\n .apx-inapp-image".concat(this.cssPostFix, "{\n height: ").concat(this.media_height, ";\n width: ").concat(this.media_width, ";\n ").concat(imageBorderStyles, "\n }\n ");
|
|
20203
|
+
imageStyles = "\n .apx-inapp-image".concat(this.cssPostFix, "{\n height: ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "100%" : this.media_height, ";\n width: ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "100%" : this.media_width, ";\n ").concat(imageBorderStyles, "\n ").concat(this.position.position === INAPP_POSITION.FULL_SCREEN ? "box-sizing: border-box;" : "", "\n }\n ");
|
|
19427
20204
|
}
|
|
19428
20205
|
}
|
|
19429
20206
|
return imageStyles;
|
|
@@ -19534,7 +20311,7 @@
|
|
|
19534
20311
|
this._setCloseButton();
|
|
19535
20312
|
|
|
19536
20313
|
//Set the Marketing content
|
|
19537
|
-
this.
|
|
20314
|
+
this.CBmX();
|
|
19538
20315
|
}
|
|
19539
20316
|
|
|
19540
20317
|
/**
|
|
@@ -19577,15 +20354,42 @@
|
|
|
19577
20354
|
}, {
|
|
19578
20355
|
key: "_setImageOptions",
|
|
19579
20356
|
value: function _setImageOptions() {
|
|
20357
|
+
var _this4 = this;
|
|
19580
20358
|
if (this.enable_image) {
|
|
20359
|
+
var action;
|
|
20360
|
+
if (this.image.enable_action) {
|
|
20361
|
+
var overlay = this.overlayElement;
|
|
20362
|
+
var actionCallback = function actionCallback(isCancelled, action) {
|
|
20363
|
+
clearTimeout(_this4.terminationTimeoutId);
|
|
20364
|
+
_this4.closeCallback(overlay, action, "new-inline".concat(_this4.cssPostFix), _this4.closeListener, _this4.redirectionListener);
|
|
20365
|
+
};
|
|
20366
|
+
var next_Callback = function next_Callback(id, action) {
|
|
20367
|
+
actionCallback(false, "next");
|
|
20368
|
+
_this4.stepperCallBack(id, action);
|
|
20369
|
+
};
|
|
20370
|
+
var prev_Callback = function prev_Callback(id, action) {
|
|
20371
|
+
actionCallback(false, "prev");
|
|
20372
|
+
_this4.stepperCallBack(id, action);
|
|
20373
|
+
};
|
|
20374
|
+
var actionHandler = {
|
|
20375
|
+
next: next_Callback,
|
|
20376
|
+
prev: prev_Callback,
|
|
20377
|
+
complete: actionCallback,
|
|
20378
|
+
cancel: actionCallback,
|
|
20379
|
+
_isCancelled: false,
|
|
20380
|
+
action: ""
|
|
20381
|
+
};
|
|
20382
|
+
action = setImgAction(this.image.action, actionHandler, this.configId, this.name);
|
|
20383
|
+
}
|
|
19581
20384
|
if (this.image.enable_background_image) {
|
|
19582
20385
|
this.inAppContainer.classList.add("apx-inapp-image".concat(this.cssPostFix));
|
|
19583
20386
|
} else {
|
|
19584
|
-
//const imgDiv = document.createElement("div");
|
|
19585
20387
|
var imgElement = document.createElement("img");
|
|
19586
20388
|
imgElement.src = this.image.path;
|
|
19587
20389
|
imgElement.classList.add("apx-inapp-image".concat(this.cssPostFix));
|
|
19588
|
-
|
|
20390
|
+
if (this.image.enable_action) imgElement.onclick = function () {
|
|
20391
|
+
return action();
|
|
20392
|
+
};
|
|
19589
20393
|
this.mediaContainer.appendChild(imgElement);
|
|
19590
20394
|
}
|
|
19591
20395
|
}
|
|
@@ -19725,7 +20529,7 @@
|
|
|
19725
20529
|
* @description Sets the form content in the InApp modal.
|
|
19726
20530
|
*/
|
|
19727
20531
|
function _setFormContent() {
|
|
19728
|
-
var
|
|
20532
|
+
var _this5 = this;
|
|
19729
20533
|
if (this.enable_form) {
|
|
19730
20534
|
var _this$form$elements;
|
|
19731
20535
|
var formContainer = document.createElement("form");
|
|
@@ -19739,14 +20543,14 @@
|
|
|
19739
20543
|
var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
|
|
19740
20544
|
form.addEventListener("submit", function (e) {
|
|
19741
20545
|
e.preventDefault();
|
|
19742
|
-
var
|
|
19743
|
-
obj =
|
|
19744
|
-
callback =
|
|
20546
|
+
var _this5$generateRespon = _this5.VCQT(_this5.form.elements),
|
|
20547
|
+
obj = _this5$generateRespon.obj,
|
|
20548
|
+
callback = _this5$generateRespon.callback;
|
|
19745
20549
|
var evalString = "(obj)=>" + callback + "(obj)";
|
|
19746
20550
|
var evalFunction = eval(evalString);
|
|
19747
20551
|
evalFunction(obj);
|
|
19748
|
-
clearTimeout(
|
|
19749
|
-
|
|
20552
|
+
clearTimeout(_this5.terminationTimeoutId);
|
|
20553
|
+
_this5.closeCallback(_this5.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this5.cssPostFix), _this5.closeListener, _this5.redirectionListener);
|
|
19750
20554
|
});
|
|
19751
20555
|
}
|
|
19752
20556
|
}
|
|
@@ -19846,23 +20650,23 @@
|
|
|
19846
20650
|
}, {
|
|
19847
20651
|
key: "_setButtons",
|
|
19848
20652
|
value: function _setButtons(position) {
|
|
19849
|
-
var
|
|
20653
|
+
var _this6 = this;
|
|
19850
20654
|
if (!this.enable_buttons) {
|
|
19851
20655
|
return;
|
|
19852
20656
|
}
|
|
19853
20657
|
if (position === BUTTON_CONTAINER_POSITION.TOP && this.buttons.enable_top || position === BUTTON_CONTAINER_POSITION.CENTER && this.buttons.enable_center || position === BUTTON_CONTAINER_POSITION.BOTTOM && this.buttons.enable_bottom) {
|
|
19854
20658
|
var overlay = this.overlayElement;
|
|
19855
20659
|
var actionCallback = function actionCallback(isCancelled, action) {
|
|
19856
|
-
clearTimeout(
|
|
19857
|
-
|
|
20660
|
+
clearTimeout(_this6.terminationTimeoutId);
|
|
20661
|
+
_this6.closeCallback(overlay, action, "", "new-inline".concat(_this6.cssPostFix), _this6.closeListener, _this6.redirectionListener);
|
|
19858
20662
|
};
|
|
19859
20663
|
var next_Callback = function next_Callback(id, action) {
|
|
19860
20664
|
actionCallback(false, "next");
|
|
19861
|
-
|
|
20665
|
+
_this6.stepperCallBack(id, action);
|
|
19862
20666
|
};
|
|
19863
20667
|
var prev_Callback = function prev_Callback(id, action) {
|
|
19864
20668
|
actionCallback(false, "prev");
|
|
19865
|
-
|
|
20669
|
+
_this6.stepperCallBack(id, action);
|
|
19866
20670
|
};
|
|
19867
20671
|
var actionHandler = {
|
|
19868
20672
|
next: next_Callback,
|
|
@@ -19885,7 +20689,7 @@
|
|
|
19885
20689
|
// button_config.text.font.family = this._setFontFaceAtRule(button_config.text.font);
|
|
19886
20690
|
// return button_config;
|
|
19887
20691
|
// })
|
|
19888
|
-
var _Buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INAPP, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index);
|
|
20692
|
+
var _Buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INAPP, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index, "center", 1, this.step);
|
|
19889
20693
|
if (position === BUTTON_CONTAINER_POSITION.TOP) {
|
|
19890
20694
|
this.topButtonContainer.appendChild(_Buttons);
|
|
19891
20695
|
} else if (position === BUTTON_CONTAINER_POSITION.CENTER) {
|
|
@@ -19904,7 +20708,7 @@
|
|
|
19904
20708
|
}, {
|
|
19905
20709
|
key: "_setCloseButton",
|
|
19906
20710
|
value: function _setCloseButton() {
|
|
19907
|
-
var
|
|
20711
|
+
var _this7 = this;
|
|
19908
20712
|
if (this.enable_close_button) {
|
|
19909
20713
|
var closeButton = document.createElement("span");
|
|
19910
20714
|
// Close button SVG is decided based on the type of the button in the config.
|
|
@@ -19921,13 +20725,13 @@
|
|
|
19921
20725
|
}
|
|
19922
20726
|
closeButton.classList.add("apx-inapp-close".concat(this.cssPostFix));
|
|
19923
20727
|
closeButton.addEventListener("click", function () {
|
|
19924
|
-
if (
|
|
19925
|
-
window.Apxor.logActionEvent(EVENT_PREFIX.INAPP + "InAppXIconClicked" + "_Clicked",
|
|
19926
|
-
} else if (
|
|
19927
|
-
window.Apxor.logActionEvent("walk_through_cancelled",
|
|
20728
|
+
if (_this7.close_button.action === "dismiss") {
|
|
20729
|
+
window.Apxor.logActionEvent(EVENT_PREFIX.INAPP + "InAppXIconClicked" + "_Clicked", _this7.configId, _this7.name);
|
|
20730
|
+
} else if (_this7.close_button.action === "cancel") {
|
|
20731
|
+
window.Apxor.logActionEvent("walk_through_cancelled", _this7.configId, _this7.name);
|
|
19928
20732
|
}
|
|
19929
|
-
clearTimeout(
|
|
19930
|
-
|
|
20733
|
+
clearTimeout(_this7.terminationTimeoutId);
|
|
20734
|
+
_this7.closeCallback(_this7.overlayElement, _this7.close_button.action, "", ".apx-inapp-container".concat(_this7.cssPostFix), _this7.closeListener, _this7.redirectionListener);
|
|
19931
20735
|
});
|
|
19932
20736
|
this.direction.non_media === DIRECTION.VERTICAL || this.direction.nudge === DIRECTION.VERTICAL ? this.inAppContainer.appendChild(closeButton) : this.buttonContainer.appendChild(closeButton);
|
|
19933
20737
|
}
|
|
@@ -19941,10 +20745,10 @@
|
|
|
19941
20745
|
* @description If the auto dismiss is enabled, sets the timeout to call the InApp close.
|
|
19942
20746
|
*/
|
|
19943
20747
|
function _setAutoTerminate() {
|
|
19944
|
-
var
|
|
20748
|
+
var _this8 = this;
|
|
19945
20749
|
if (this.terminationConfig.auto_dismiss === true) {
|
|
19946
20750
|
this.terminationTimeoutId = window.setTimeout(function () {
|
|
19947
|
-
|
|
20751
|
+
_this8.closeCallback(_this8.overlayElement, "dismiss", "", ".apx-inapp-container".concat(_this8.cssPostFix), _this8.closeListener, _this8.redirectionListener);
|
|
19948
20752
|
}, this.terminationConfig.duration);
|
|
19949
20753
|
}
|
|
19950
20754
|
}
|
|
@@ -20046,7 +20850,9 @@
|
|
|
20046
20850
|
* @param {function} hideCallback
|
|
20047
20851
|
*/
|
|
20048
20852
|
function VideoInApp(config, terminationConfig, configId, name, showCallback, _hideCallback) {
|
|
20049
|
-
var _this = this
|
|
20853
|
+
var _this = this,
|
|
20854
|
+
_this$config,
|
|
20855
|
+
_this$config2;
|
|
20050
20856
|
_classCallCheck(this, VideoInApp);
|
|
20051
20857
|
/**
|
|
20052
20858
|
* @function showVideoInApp
|
|
@@ -20097,7 +20903,7 @@
|
|
|
20097
20903
|
};
|
|
20098
20904
|
} else {
|
|
20099
20905
|
// As the video player is hidden by default, unhide if the mode is not PIP.
|
|
20100
|
-
_this.
|
|
20906
|
+
_this.SyyJ();
|
|
20101
20907
|
}
|
|
20102
20908
|
_this.showCallback();
|
|
20103
20909
|
} catch (e) {
|
|
@@ -20118,7 +20924,7 @@
|
|
|
20118
20924
|
* For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
|
|
20119
20925
|
* For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
|
|
20120
20926
|
*/
|
|
20121
|
-
_defineProperty(this, "
|
|
20927
|
+
_defineProperty(this, "Xmhy", function () {
|
|
20122
20928
|
var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
|
|
20123
20929
|
width = _getHeightWidthFromRe.width,
|
|
20124
20930
|
height = _getHeightWidthFromRe.height;
|
|
@@ -20130,7 +20936,7 @@
|
|
|
20130
20936
|
* @private
|
|
20131
20937
|
* @description Removes the video player style element.
|
|
20132
20938
|
*/
|
|
20133
|
-
_defineProperty(this, "
|
|
20939
|
+
_defineProperty(this, "IrHN", function () {
|
|
20134
20940
|
var playerStyles = document.getElementById("apx-mpl-styles");
|
|
20135
20941
|
if (playerStyles) {
|
|
20136
20942
|
playerStyles.remove();
|
|
@@ -20141,7 +20947,7 @@
|
|
|
20141
20947
|
* @private
|
|
20142
20948
|
* @description Attach listeners on the video controls
|
|
20143
20949
|
*/
|
|
20144
|
-
_defineProperty(this, "
|
|
20950
|
+
_defineProperty(this, "ZTFg", function () {
|
|
20145
20951
|
// Listener for the video end. Display the CTA's when the video ends.
|
|
20146
20952
|
_this.videoElement.addEventListener("ended", function () {
|
|
20147
20953
|
var ctaButtons = document.getElementById("apx-cta-btn");
|
|
@@ -20256,7 +21062,7 @@
|
|
|
20256
21062
|
* @private
|
|
20257
21063
|
* @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
20258
21064
|
*/
|
|
20259
|
-
_defineProperty(this, "
|
|
21065
|
+
_defineProperty(this, "edSQ", function () {
|
|
20260
21066
|
var _this$terminationConf;
|
|
20261
21067
|
if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
|
|
20262
21068
|
// On Exit of the PIP,
|
|
@@ -20296,7 +21102,7 @@
|
|
|
20296
21102
|
* @private Sets the custom controls on the video player.
|
|
20297
21103
|
* PIP and close are the custom controls that are created and positions on the video.
|
|
20298
21104
|
*/
|
|
20299
|
-
_defineProperty(this, "
|
|
21105
|
+
_defineProperty(this, "czTg", function () {
|
|
20300
21106
|
_this.enable_close_button;
|
|
20301
21107
|
if (_this.enable_close_button) {
|
|
20302
21108
|
var closeButton = document.createElement("span");
|
|
@@ -20343,21 +21149,21 @@
|
|
|
20343
21149
|
* @function hideVideoPlayer
|
|
20344
21150
|
* @description Sets the visibility of the video player to hidden.
|
|
20345
21151
|
*/
|
|
20346
|
-
_defineProperty(this, "
|
|
21152
|
+
_defineProperty(this, "BFUA", function () {
|
|
20347
21153
|
_this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
20348
21154
|
});
|
|
20349
21155
|
/**
|
|
20350
21156
|
* @function unhideVideoPlayer
|
|
20351
21157
|
* @description Unhides video player.
|
|
20352
21158
|
*/
|
|
20353
|
-
_defineProperty(this, "
|
|
21159
|
+
_defineProperty(this, "SyyJ", function () {
|
|
20354
21160
|
_this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
|
|
20355
21161
|
});
|
|
20356
21162
|
/**
|
|
20357
21163
|
* @function getVideoElement
|
|
20358
21164
|
* @returns {HTMLElement} Video ekement
|
|
20359
21165
|
*/
|
|
20360
|
-
_defineProperty(this, "
|
|
21166
|
+
_defineProperty(this, "iueL", function () {
|
|
20361
21167
|
return _this.videoElement;
|
|
20362
21168
|
});
|
|
20363
21169
|
this.videoPlayer = null;
|
|
@@ -20368,6 +21174,7 @@
|
|
|
20368
21174
|
this.height = 320;
|
|
20369
21175
|
this.width = 320;
|
|
20370
21176
|
this.configId = configId;
|
|
21177
|
+
this.config = config;
|
|
20371
21178
|
this.name = name || "VideoPlayer";
|
|
20372
21179
|
this.cssPostFix = "-".concat(this.configId, "-").concat(this.name).replaceAll(" ", "").replace(/[^\w\s]/gi, "");
|
|
20373
21180
|
this.replayCount = 0;
|
|
@@ -20387,6 +21194,7 @@
|
|
|
20387
21194
|
if (this.enable_pip_button) this.pip_button = new PIPButton(config.pip_button);
|
|
20388
21195
|
this.video = new Video(config.video);
|
|
20389
21196
|
this.pip = new PIP(config.pip);
|
|
21197
|
+
this.step = (_this$config = this.config) !== null && _this$config !== void 0 && (_this$config = _this$config.additional_info) !== null && _this$config !== void 0 && _this$config.apx_step ? (_this$config2 = this.config) === null || _this$config2 === void 0 || (_this$config2 = _this$config2.additional_info) === null || _this$config2 === void 0 ? void 0 : _this$config2.apx_step : -1;
|
|
20390
21198
|
}
|
|
20391
21199
|
|
|
20392
21200
|
/**
|
|
@@ -20409,7 +21217,7 @@
|
|
|
20409
21217
|
this.videoPlayer.style.backgroundColor = this.bg_color;
|
|
20410
21218
|
|
|
20411
21219
|
// Video has a resolution, not deviating from the resolution set the height and width.
|
|
20412
|
-
this.
|
|
21220
|
+
this.Xmhy();
|
|
20413
21221
|
//Generate the styles and add them to the document head.
|
|
20414
21222
|
this._setVideoPlayerStyles();
|
|
20415
21223
|
//Set the position of the video player with in the 5 possible positions.
|
|
@@ -20417,16 +21225,16 @@
|
|
|
20417
21225
|
//Create a video element,set the source and add to the container.
|
|
20418
21226
|
this._setPlayerContent();
|
|
20419
21227
|
//Set the listeners on the video control buttons.
|
|
20420
|
-
this.
|
|
21228
|
+
this.ZTFg();
|
|
20421
21229
|
//Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
|
|
20422
|
-
this.
|
|
21230
|
+
this.edSQ();
|
|
20423
21231
|
//Set the custom close and PIP controls. Not using the defaults from the html video element.
|
|
20424
21232
|
//Reason - We want to position them at the top right and left positions.
|
|
20425
|
-
this.
|
|
21233
|
+
this.czTg();
|
|
20426
21234
|
//Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
|
|
20427
21235
|
this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
|
|
20428
21236
|
//Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
|
|
20429
|
-
this.
|
|
21237
|
+
this.BFUA();
|
|
20430
21238
|
//If the auto dismiss is enabled, sets the timeout to call the InApp close.
|
|
20431
21239
|
this._setAutoTerminate();
|
|
20432
21240
|
document.body.appendChild(this.videoPlayer);
|
|
@@ -20541,7 +21349,7 @@
|
|
|
20541
21349
|
}
|
|
20542
21350
|
}
|
|
20543
21351
|
this.videoPlayer.remove();
|
|
20544
|
-
this.
|
|
21352
|
+
this.IrHN();
|
|
20545
21353
|
if (closeButtonName !== "auto_dismiss") {
|
|
20546
21354
|
var _window$ApxorRTM9;
|
|
20547
21355
|
(_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_video_inapp_close_button_clicked", {
|
|
@@ -20611,7 +21419,7 @@
|
|
|
20611
21419
|
replayCount: _this3.replayCount
|
|
20612
21420
|
});
|
|
20613
21421
|
_this3.videoPlayer.remove();
|
|
20614
|
-
_this3.
|
|
21422
|
+
_this3.IrHN();
|
|
20615
21423
|
_this3.hideCallback();
|
|
20616
21424
|
} catch (e) {
|
|
20617
21425
|
console.log("Can't close the video player\n".concat(e));
|
|
@@ -20633,7 +21441,7 @@
|
|
|
20633
21441
|
} else {
|
|
20634
21442
|
buttons_config = this.buttons.bottom;
|
|
20635
21443
|
}
|
|
20636
|
-
var buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INAPP, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index);
|
|
21444
|
+
var buttons = generateButtonsBlock(this.configId, this.name, this.stepper, EVENT_PREFIX.INAPP, buttons_config, this.direction.buttons, position, actionHandler, this.isWalkthrough, this.uis, this.index, "center", 1, this.step);
|
|
20637
21445
|
buttons.setAttribute("id", "apx-cta-btn");
|
|
20638
21446
|
buttons.classList.add("apx-video-cta".concat(this.cssPostFix));
|
|
20639
21447
|
buttons.classList.add("apx-video-hide-elmt".concat(this.cssPostFix));
|
|
@@ -20705,14 +21513,14 @@
|
|
|
20705
21513
|
try {
|
|
20706
21514
|
var _window;
|
|
20707
21515
|
(_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
|
|
20708
|
-
var element = _this.
|
|
20709
|
-
_this.
|
|
21516
|
+
var element = _this.qNQe(_this.layout);
|
|
21517
|
+
_this.uzOo();
|
|
20710
21518
|
window.onresize = function () {
|
|
20711
|
-
_this.
|
|
21519
|
+
_this.RiLq();
|
|
20712
21520
|
};
|
|
20713
21521
|
_this.imageElements.forEach(function (img) {
|
|
20714
21522
|
img.addEventListener("error", function () {
|
|
20715
|
-
_this.
|
|
21523
|
+
_this.hZAf("provided image doesn't exists");
|
|
20716
21524
|
});
|
|
20717
21525
|
});
|
|
20718
21526
|
var rootContainer = document.createElement("div");
|
|
@@ -20723,7 +21531,7 @@
|
|
|
20723
21531
|
var styleElement = document.createElement("style");
|
|
20724
21532
|
styleElement.innerHTML = _this.styleContent;
|
|
20725
21533
|
document.head.appendChild(styleElement);
|
|
20726
|
-
_this.
|
|
21534
|
+
_this.dsuA(_this.termination);
|
|
20727
21535
|
try {
|
|
20728
21536
|
eval(_this.script);
|
|
20729
21537
|
} catch (e) {
|
|
@@ -20734,10 +21542,10 @@
|
|
|
20734
21542
|
_this.intervalToCheckMediaLoadingStatus = setInterval(function () {
|
|
20735
21543
|
_this.wait_interval -= 1;
|
|
20736
21544
|
if (_this.wait_interval <= 0) {
|
|
20737
|
-
_this.
|
|
21545
|
+
_this.hZAf("provided media doesn't exists");
|
|
20738
21546
|
} else {
|
|
20739
|
-
if (_this.
|
|
20740
|
-
_this.
|
|
21547
|
+
if (_this.gDMN() && _this.Wrko() && _this.OIYp()) {
|
|
21548
|
+
_this.RiLq();
|
|
20741
21549
|
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
20742
21550
|
}
|
|
20743
21551
|
}
|
|
@@ -20748,12 +21556,12 @@
|
|
|
20748
21556
|
(_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorLogger) === null || _window3 === void 0 || _window3.error("failed while creating embed card with error: ".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message));
|
|
20749
21557
|
}
|
|
20750
21558
|
});
|
|
20751
|
-
_defineProperty(this, "
|
|
21559
|
+
_defineProperty(this, "hZAf", function (reason) {
|
|
20752
21560
|
var _window$ApxorRTM, _window4;
|
|
20753
21561
|
!_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
|
|
21562
|
+
apx_nudge_name: _this.name,
|
|
21563
|
+
apx_nudge_id: _this.configId,
|
|
21564
|
+
apx_template_time: "embed-card",
|
|
20757
21565
|
apx_notshown_type: "error",
|
|
20758
21566
|
apx_reason: reason
|
|
20759
21567
|
}));
|
|
@@ -20762,19 +21570,20 @@
|
|
|
20762
21570
|
clearInterval(_this.intervalToCheckMediaLoadingStatus);
|
|
20763
21571
|
(_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
|
|
20764
21572
|
});
|
|
20765
|
-
_defineProperty(this, "
|
|
21573
|
+
_defineProperty(this, "uzOo", function () {
|
|
20766
21574
|
var EmbeddedCardsStyles = document.createElement("style");
|
|
20767
21575
|
EmbeddedCardsStyles.innerHTML = _this.initialStyles;
|
|
20768
|
-
EmbeddedCardsStyles.setAttribute("apx-
|
|
21576
|
+
EmbeddedCardsStyles.setAttribute("apx-embedded-card-styles", "");
|
|
20769
21577
|
document.head.appendChild(EmbeddedCardsStyles);
|
|
20770
21578
|
});
|
|
20771
|
-
_defineProperty(this, "
|
|
21579
|
+
_defineProperty(this, "qNQe", function (config) {
|
|
20772
21580
|
var _window$Apxor;
|
|
20773
21581
|
var element;
|
|
20774
21582
|
switch (config.type) {
|
|
20775
21583
|
case "cell":
|
|
20776
21584
|
case "img":
|
|
20777
21585
|
case "text":
|
|
21586
|
+
case "cta_button":
|
|
20778
21587
|
case "button":
|
|
20779
21588
|
element = document.createElement(EMBED_CARD_TYPE[config.type]);
|
|
20780
21589
|
break;
|
|
@@ -20788,28 +21597,14 @@
|
|
|
20788
21597
|
if (((_window$Apxor = window.Apxor) === null || _window$Apxor === void 0 ? void 0 : _window$Apxor.platform) === "ios") {
|
|
20789
21598
|
element.playsInline = true;
|
|
20790
21599
|
}
|
|
20791
|
-
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
// }
|
|
20796
|
-
// element.appendChild(sourceElement);
|
|
20797
|
-
// }
|
|
20798
|
-
// if (config.track) {
|
|
20799
|
-
// let trackElement = document.createElement("track");
|
|
20800
|
-
// for (let prop in config.track) {
|
|
20801
|
-
// trackElement[prop] = config.track[prop];
|
|
20802
|
-
// }
|
|
20803
|
-
// element.appendChild(trackElement);
|
|
20804
|
-
// }
|
|
21600
|
+
break;
|
|
21601
|
+
case "cross_button":
|
|
21602
|
+
element = document.createElement("div");
|
|
21603
|
+
element.innerHTML = CROSS_ICON_SVG;
|
|
20805
21604
|
break;
|
|
20806
21605
|
default:
|
|
20807
21606
|
element = document.createElement(config.type);
|
|
20808
21607
|
}
|
|
20809
|
-
// const element = document.createElement(
|
|
20810
|
-
// EMBED_CARD_TYPE[config.type] ?? config.type
|
|
20811
|
-
// );
|
|
20812
|
-
|
|
20813
21608
|
if (config.properties) {
|
|
20814
21609
|
for (var prop in config.properties) {
|
|
20815
21610
|
if (config.type === "img" && prop === "src" || config.type === "img" && prop === "format") continue;
|
|
@@ -20833,6 +21628,14 @@
|
|
|
20833
21628
|
var styleObject = parseCSS(config.css);
|
|
20834
21629
|
var imgStyleObject = removeKeys(styleObject, Object.keys(imgWrapperStyles));
|
|
20835
21630
|
styles = ".".concat(config._id, " {\n ").concat(objectToCSS(imgStyleObject), "\n }\n ");
|
|
21631
|
+
} else if (config._id === _this.layout._id) {
|
|
21632
|
+
var layoutStyleObject = parseCSS(config.css);
|
|
21633
|
+
if (layoutStyleObject["background-image"]) {
|
|
21634
|
+
var backgroundImageUrl = extractBgImageUrl(layoutStyleObject);
|
|
21635
|
+
layoutStyleObject["background-image"] = "url(".concat(decodeURIComponent(backgroundImageUrl), ")");
|
|
21636
|
+
_this.bgImageUrl = decodeURIComponent(backgroundImageUrl);
|
|
21637
|
+
}
|
|
21638
|
+
styles = ".".concat(config._id, " {\n ").concat(objectToCSS(layoutStyleObject), "\n }\n ");
|
|
20836
21639
|
} else {
|
|
20837
21640
|
styles = ".".concat(config._id, " {\n ").concat(config.css, "\n }\n ");
|
|
20838
21641
|
}
|
|
@@ -20845,56 +21648,29 @@
|
|
|
20845
21648
|
case "activity":
|
|
20846
21649
|
case "ir":
|
|
20847
21650
|
element.onclick = function (e) {
|
|
20848
|
-
var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
|
|
20849
21651
|
e.stopPropagation();
|
|
20850
21652
|
window.Apxor.redirect(JSON.stringify(action));
|
|
20851
|
-
|
|
20852
|
-
campaignName: _this.name,
|
|
20853
|
-
id: _this.configId,
|
|
20854
|
-
apx_nudge_type: "sticky_card",
|
|
20855
|
-
apx_card_name: (_e$target$getAttribut = (_e$target = e.target) === null || _e$target === void 0 || (_e$target$getAttribut2 = _e$target.getAttribute) === null || _e$target$getAttribut2 === void 0 ? void 0 : _e$target$getAttribut2.call(_e$target, "card_name")) !== null && _e$target$getAttribut !== void 0 ? _e$target$getAttribut : ""
|
|
20856
|
-
};
|
|
20857
|
-
if (e.target.tagName === "BUTTON") {
|
|
20858
|
-
var _window$ApxorRTM2;
|
|
20859
|
-
additional_info["apx_cta_text"] = e.target.innerHTML;
|
|
20860
|
-
(_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_card_CTA_clicked", additional_info);
|
|
20861
|
-
} else {
|
|
20862
|
-
var _window$ApxorRTM3;
|
|
20863
|
-
(_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_card_interaction", additional_info);
|
|
20864
|
-
}
|
|
21653
|
+
_this.eBcX(e);
|
|
20865
21654
|
};
|
|
20866
21655
|
break;
|
|
20867
21656
|
case "show-video":
|
|
20868
21657
|
element.onclick = function (e) {
|
|
20869
|
-
var _e$target$getAttribut3, _e$target2, _e$target2$getAttribu;
|
|
20870
21658
|
e.stopPropagation();
|
|
20871
21659
|
window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
|
|
20872
|
-
|
|
20873
|
-
campaignName: _this.name,
|
|
20874
|
-
id: _this.configId,
|
|
20875
|
-
apx_nudge_type: "sticky_card",
|
|
20876
|
-
apx_card_name: (_e$target$getAttribut3 = (_e$target2 = e.target) === null || _e$target2 === void 0 || (_e$target2$getAttribu = _e$target2.getAttribute) === null || _e$target2$getAttribu === void 0 ? void 0 : _e$target2$getAttribu.call(_e$target2, "card_name")) !== null && _e$target$getAttribut3 !== void 0 ? _e$target$getAttribut3 : ""
|
|
20877
|
-
};
|
|
20878
|
-
if (e.target.tagName === "BUTTON") {
|
|
20879
|
-
var _window$ApxorRTM4;
|
|
20880
|
-
additional_info["apx_cta_text"] = e.target.innerHTML;
|
|
20881
|
-
(_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_card_CTA_clicked", additional_info);
|
|
20882
|
-
} else {
|
|
20883
|
-
var _window$ApxorRTM5;
|
|
20884
|
-
(_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_card_interaction", additional_info);
|
|
20885
|
-
}
|
|
21660
|
+
_this.eBcX(e);
|
|
20886
21661
|
};
|
|
20887
21662
|
break;
|
|
20888
21663
|
case "cancel":
|
|
20889
21664
|
element.onclick = function (e) {
|
|
20890
21665
|
e.stopPropagation();
|
|
21666
|
+
_this.eBcX(e);
|
|
20891
21667
|
window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
|
|
20892
21668
|
};
|
|
20893
21669
|
break;
|
|
20894
21670
|
case "dismiss":
|
|
20895
21671
|
element.onclick = function (e) {
|
|
20896
21672
|
e.stopPropagation();
|
|
20897
|
-
|
|
21673
|
+
_this.eBcX(e);
|
|
20898
21674
|
};
|
|
20899
21675
|
break;
|
|
20900
21676
|
case "never":
|
|
@@ -20902,6 +21678,7 @@
|
|
|
20902
21678
|
e.stopPropagation();
|
|
20903
21679
|
window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
|
|
20904
21680
|
window.Apxor.logActionEvent("never_show_clicked", _this.configId, _this.name);
|
|
21681
|
+
_this.eBcX(e);
|
|
20905
21682
|
};
|
|
20906
21683
|
break;
|
|
20907
21684
|
case "toggle-class":
|
|
@@ -20918,7 +21695,6 @@
|
|
|
20918
21695
|
break;
|
|
20919
21696
|
case "copy-content":
|
|
20920
21697
|
element.onclick = function (e) {
|
|
20921
|
-
var _e$target$getAttribut4, _e$target3, _e$target3$getAttribu;
|
|
20922
21698
|
e.stopPropagation();
|
|
20923
21699
|
var textToCopy = action === null || action === void 0 ? void 0 : action.content;
|
|
20924
21700
|
var tempInput = document.createElement("input");
|
|
@@ -20927,20 +21703,7 @@
|
|
|
20927
21703
|
tempInput.select();
|
|
20928
21704
|
document.execCommand("copy");
|
|
20929
21705
|
document.body.removeChild(tempInput);
|
|
20930
|
-
|
|
20931
|
-
campaignName: _this.name,
|
|
20932
|
-
id: _this.configId,
|
|
20933
|
-
apx_nudge_type: "sticky_card",
|
|
20934
|
-
apx_card_name: (_e$target$getAttribut4 = (_e$target3 = e.target) === null || _e$target3 === void 0 || (_e$target3$getAttribu = _e$target3.getAttribute) === null || _e$target3$getAttribu === void 0 ? void 0 : _e$target3$getAttribu.call(_e$target3, "card_name")) !== null && _e$target$getAttribut4 !== void 0 ? _e$target$getAttribut4 : ""
|
|
20935
|
-
};
|
|
20936
|
-
if (e.target.tagName === "BUTTON") {
|
|
20937
|
-
var _window$ApxorRTM6;
|
|
20938
|
-
additional_info["apx_cta_text"] = e.target.innerHTML;
|
|
20939
|
-
(_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_card_CTA_clicked", additional_info);
|
|
20940
|
-
} else {
|
|
20941
|
-
var _window$ApxorRTM7;
|
|
20942
|
-
(_window$ApxorRTM7 = window.ApxorRTM) === null || _window$ApxorRTM7 === void 0 || _window$ApxorRTM7.logEvent("apx_card_interaction", additional_info);
|
|
20943
|
-
}
|
|
21706
|
+
_this.eBcX(e);
|
|
20944
21707
|
};
|
|
20945
21708
|
break;
|
|
20946
21709
|
case "log-app-event":
|
|
@@ -20958,27 +21721,16 @@
|
|
|
20958
21721
|
});
|
|
20959
21722
|
}
|
|
20960
21723
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
20961
|
-
element.style.position = "relative";
|
|
20962
21724
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
20963
|
-
var childElement = _this.
|
|
20964
|
-
childElement.style.position = "absolute";
|
|
20965
|
-
for (var _prop in childConfig.offset) {
|
|
20966
|
-
childElement.style[_prop] = childConfig.offset[_prop];
|
|
20967
|
-
}
|
|
21725
|
+
var childElement = _this.KDYj(childConfig);
|
|
20968
21726
|
element.appendChild(childElement);
|
|
20969
21727
|
});
|
|
20970
21728
|
}
|
|
20971
21729
|
|
|
20972
21730
|
// Process children
|
|
20973
21731
|
if (config.children && config.children.length > 0) {
|
|
20974
|
-
//element.style.display = "flex";
|
|
20975
|
-
|
|
20976
|
-
// if (config.direction) {
|
|
20977
|
-
// element.style.flexDirection = config.direction;
|
|
20978
|
-
// }
|
|
20979
|
-
|
|
20980
21732
|
config.children.forEach(function (childConfig) {
|
|
20981
|
-
var childElement = _this.
|
|
21733
|
+
var childElement = _this.qNQe(childConfig);
|
|
20982
21734
|
element.appendChild(childElement);
|
|
20983
21735
|
});
|
|
20984
21736
|
}
|
|
@@ -21004,7 +21756,24 @@
|
|
|
21004
21756
|
}
|
|
21005
21757
|
return element;
|
|
21006
21758
|
});
|
|
21007
|
-
_defineProperty(this, "
|
|
21759
|
+
_defineProperty(this, "eBcX", function (e) {
|
|
21760
|
+
var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
|
|
21761
|
+
var additional_info = {
|
|
21762
|
+
apx_nudge_name: _this.name,
|
|
21763
|
+
apx_nudge_id: _this.configId,
|
|
21764
|
+
apx_card_name: (_e$target$getAttribut = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 || (_e$target$getAttribut2 = _e$target.getAttribute) === null || _e$target$getAttribut2 === void 0 ? void 0 : _e$target$getAttribut2.call(_e$target, "card_name")) !== null && _e$target$getAttribut !== void 0 ? _e$target$getAttribut : "",
|
|
21765
|
+
apx_template_name: "embed-card"
|
|
21766
|
+
};
|
|
21767
|
+
if (e.target.tagName === "BUTTON") {
|
|
21768
|
+
var _e$target$innerHTML, _e$target2, _window$ApxorRTM2;
|
|
21769
|
+
additional_info["apx_cta_text"] = (_e$target$innerHTML = e === null || e === void 0 || (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.innerHTML) !== null && _e$target$innerHTML !== void 0 ? _e$target$innerHTML : "";
|
|
21770
|
+
(_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_card_CTA_clicked", additional_info);
|
|
21771
|
+
} else {
|
|
21772
|
+
var _window$ApxorRTM3;
|
|
21773
|
+
(_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_card_interaction", additional_info);
|
|
21774
|
+
}
|
|
21775
|
+
});
|
|
21776
|
+
_defineProperty(this, "dsuA", function (config) {
|
|
21008
21777
|
config.forEach(function (id) {
|
|
21009
21778
|
var element = document.getElementById(id);
|
|
21010
21779
|
if (element) {
|
|
@@ -21012,7 +21781,7 @@
|
|
|
21012
21781
|
}
|
|
21013
21782
|
});
|
|
21014
21783
|
});
|
|
21015
|
-
_defineProperty(this, "
|
|
21784
|
+
_defineProperty(this, "Wrko", function () {
|
|
21016
21785
|
//This logic is to make sure that image has loaded, it doesn't check whether image is broken
|
|
21017
21786
|
//refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
|
|
21018
21787
|
if (_this.imageElements.length === 0) return true;
|
|
@@ -21020,13 +21789,19 @@
|
|
|
21020
21789
|
return img.complete;
|
|
21021
21790
|
});
|
|
21022
21791
|
});
|
|
21023
|
-
_defineProperty(this, "
|
|
21792
|
+
_defineProperty(this, "gDMN", function () {
|
|
21024
21793
|
if (_this.videoElements.length === 0) return true;
|
|
21025
21794
|
return _this.videoElements.every(function (video) {
|
|
21026
21795
|
return video.readyState >= 3;
|
|
21027
21796
|
});
|
|
21028
21797
|
});
|
|
21029
|
-
_defineProperty(this, "
|
|
21798
|
+
_defineProperty(this, "OIYp", function () {
|
|
21799
|
+
if (!_this.bgImageUrl) return true;
|
|
21800
|
+
var img = new Image();
|
|
21801
|
+
img.src = _this.bgImageUrl;
|
|
21802
|
+
return img.complete;
|
|
21803
|
+
});
|
|
21804
|
+
_defineProperty(this, "RiLq", function () {
|
|
21030
21805
|
var _window6, _window7;
|
|
21031
21806
|
var width = window.document.querySelector("html").offsetWidth;
|
|
21032
21807
|
var height = window.document.querySelector("html").offsetHeight;
|
|
@@ -21049,6 +21824,7 @@
|
|
|
21049
21824
|
this.initialStyles = "";
|
|
21050
21825
|
this.imageElements = [];
|
|
21051
21826
|
this.videoElements = [];
|
|
21827
|
+
this.bgImageUrl = "";
|
|
21052
21828
|
this.intervalToCheckMediaLoadingStatus = null;
|
|
21053
21829
|
this.loggedNudgeShownEvent = false;
|
|
21054
21830
|
this.loggedNudgeNotShownEvent = false;
|
|
@@ -21114,8 +21890,8 @@
|
|
|
21114
21890
|
_this.storyContainer.appendChild(currentElement);
|
|
21115
21891
|
_this.storyContainer.appendChild(slideDetails);
|
|
21116
21892
|
document.body.appendChild(_this.storyContainer);
|
|
21117
|
-
_this.
|
|
21118
|
-
_this.
|
|
21893
|
+
_this.zPUk();
|
|
21894
|
+
_this.NkOn();
|
|
21119
21895
|
_this.progress = Array.from(document.querySelectorAll(".progress"));
|
|
21120
21896
|
var current_slide = document.querySelector(".slide-details");
|
|
21121
21897
|
var playNext = function playNext(e) {
|
|
@@ -21161,7 +21937,7 @@
|
|
|
21161
21937
|
_existingAbsoluteElements2.forEach(function (element) {
|
|
21162
21938
|
element.remove();
|
|
21163
21939
|
});
|
|
21164
|
-
// this.
|
|
21940
|
+
// this.UFDN();
|
|
21165
21941
|
var _currentSlideDetails = document.querySelector(".slide-details");
|
|
21166
21942
|
_currentSlideDetails.innerHTML = "";
|
|
21167
21943
|
_this.position = _this.position + 1;
|
|
@@ -21257,7 +22033,7 @@
|
|
|
21257
22033
|
absolute_header = document.createElement("div");
|
|
21258
22034
|
current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
|
|
21259
22035
|
var current_absolute_element;
|
|
21260
|
-
current_absolute_element = _this.
|
|
22036
|
+
current_absolute_element = _this.KDYj(current_element);
|
|
21261
22037
|
absolute_header.appendChild(current_absolute_element);
|
|
21262
22038
|
});
|
|
21263
22039
|
(_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
|
|
@@ -21318,7 +22094,7 @@
|
|
|
21318
22094
|
document.body.style.backgroundRepeat = "";
|
|
21319
22095
|
var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
|
|
21320
22096
|
delete updated_layout_without_absolute_elements["absolute_position_children"];
|
|
21321
|
-
element = _this.
|
|
22097
|
+
element = _this.KDYj(updated_layout_without_absolute_elements);
|
|
21322
22098
|
document.body.style.backgroundColor = current_slide_from_config.media_background_color;
|
|
21323
22099
|
document.body.style.margin = "0px";
|
|
21324
22100
|
}
|
|
@@ -21326,9 +22102,9 @@
|
|
|
21326
22102
|
current_slide.removeChild(current_slide.children[0]);
|
|
21327
22103
|
}
|
|
21328
22104
|
current_slide.appendChild(element);
|
|
21329
|
-
_this.
|
|
22105
|
+
_this.pXby();
|
|
21330
22106
|
window.intervalToCheckImgStatus = setInterval(function () {
|
|
21331
|
-
if (_this.
|
|
22107
|
+
if (_this.ATnR()) {
|
|
21332
22108
|
clearInterval(window.intervalToCheckImgStatus);
|
|
21333
22109
|
}
|
|
21334
22110
|
}, 500);
|
|
@@ -21356,7 +22132,7 @@
|
|
|
21356
22132
|
});
|
|
21357
22133
|
playNext();
|
|
21358
22134
|
});
|
|
21359
|
-
_defineProperty(this, "
|
|
22135
|
+
_defineProperty(this, "UFDN", function () {
|
|
21360
22136
|
document.body.classList.add("slide-right");
|
|
21361
22137
|
var animationEndCounter = 0;
|
|
21362
22138
|
var onAnimationEnd = function onAnimationEnd() {
|
|
@@ -21368,7 +22144,7 @@
|
|
|
21368
22144
|
};
|
|
21369
22145
|
document.body.addEventListener("animationend", onAnimationEnd);
|
|
21370
22146
|
});
|
|
21371
|
-
_defineProperty(this, "
|
|
22147
|
+
_defineProperty(this, "KDYj", function (config) {
|
|
21372
22148
|
var _window$Apxor3;
|
|
21373
22149
|
var element;
|
|
21374
22150
|
var startY;
|
|
@@ -21424,7 +22200,7 @@
|
|
|
21424
22200
|
element.innerHTML = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 25 25\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12.375 4L10.1979 6.17708L7.92708 9.20833H3V15.4583H7.16667L12.375 20.6667V4Z\" fill=\"currentColor\" />\n <path d=\"M14.4905 20.2167C18.9193 20.2167 22.5095 16.6265 22.5095 12.1977C22.5095 7.76894 18.9193 4.17871 14.4905 4.17871\" stroke=\"currentColor\" fill =\"transparent\" stroke-width=\"1.782\"/>\n <path d=\"M14.4905 15.7618C16.4588 15.7618 18.0545 14.1661 18.0545 12.1978C18.0545 10.2294 16.4588 8.63379 14.4905 8.63379\" stroke=\"currentColor\" fill=\"transparent\" stroke-width=\"1.782\"/>\n </svg>";
|
|
21425
22201
|
element.id = "apx-mute-icon";
|
|
21426
22202
|
element.addEventListener("touchstart", function (event) {
|
|
21427
|
-
_this.
|
|
22203
|
+
_this.vuBO(event);
|
|
21428
22204
|
});
|
|
21429
22205
|
break;
|
|
21430
22206
|
case "copy_icon":
|
|
@@ -21618,7 +22394,7 @@
|
|
|
21618
22394
|
}
|
|
21619
22395
|
if (config.absolute_position_children && config.absolute_position_children.length > 0) {
|
|
21620
22396
|
config.absolute_position_children.forEach(function (childConfig) {
|
|
21621
|
-
var childElement = _this.
|
|
22397
|
+
var childElement = _this.KDYj(childConfig);
|
|
21622
22398
|
element.appendChild(childElement);
|
|
21623
22399
|
});
|
|
21624
22400
|
}
|
|
@@ -21626,7 +22402,7 @@
|
|
|
21626
22402
|
// Process children
|
|
21627
22403
|
if (config.children && config.children.length > 0) {
|
|
21628
22404
|
config.children.forEach(function (childConfig) {
|
|
21629
|
-
var childElement = _this.
|
|
22405
|
+
var childElement = _this.KDYj(childConfig);
|
|
21630
22406
|
element.appendChild(childElement);
|
|
21631
22407
|
});
|
|
21632
22408
|
}
|
|
@@ -21653,7 +22429,7 @@
|
|
|
21653
22429
|
}
|
|
21654
22430
|
return element;
|
|
21655
22431
|
});
|
|
21656
|
-
_defineProperty(this, "
|
|
22432
|
+
_defineProperty(this, "vuBO", function (event) {
|
|
21657
22433
|
var slide_details_to_be_deleted;
|
|
21658
22434
|
var mute_child_elements;
|
|
21659
22435
|
var unmute_child_elements;
|
|
@@ -21683,11 +22459,11 @@
|
|
|
21683
22459
|
}
|
|
21684
22460
|
// this.muteElement.addEventListener("touchstart", (event) => {
|
|
21685
22461
|
// event.stopPropagation();
|
|
21686
|
-
// this.
|
|
22462
|
+
// this.vuBO(event);
|
|
21687
22463
|
// });
|
|
21688
22464
|
}
|
|
21689
22465
|
});
|
|
21690
|
-
_defineProperty(this, "
|
|
22466
|
+
_defineProperty(this, "NkOn", function () {
|
|
21691
22467
|
var tapTimeout;
|
|
21692
22468
|
var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
|
|
21693
22469
|
var longPressDuration = 200;
|
|
@@ -21811,7 +22587,7 @@
|
|
|
21811
22587
|
event.target.dataset.touchStartTime = event.timeStamp;
|
|
21812
22588
|
});
|
|
21813
22589
|
});
|
|
21814
|
-
_defineProperty(this, "
|
|
22590
|
+
_defineProperty(this, "zPUk", function () {
|
|
21815
22591
|
var startY, startX;
|
|
21816
22592
|
_this.storyContainer.addEventListener("touchstart", function (event) {
|
|
21817
22593
|
_this.swipeTouch = true;
|
|
@@ -22018,7 +22794,7 @@
|
|
|
22018
22794
|
}, 50);
|
|
22019
22795
|
});
|
|
22020
22796
|
});
|
|
22021
|
-
_defineProperty(this, "
|
|
22797
|
+
_defineProperty(this, "pXby", function () {
|
|
22022
22798
|
_this.loader.style.display = "block";
|
|
22023
22799
|
var progress = Array.from(document.querySelectorAll(".progress"));
|
|
22024
22800
|
var activeIndex = progress.findIndex(function (el) {
|
|
@@ -22034,7 +22810,7 @@
|
|
|
22034
22810
|
}
|
|
22035
22811
|
}
|
|
22036
22812
|
});
|
|
22037
|
-
_defineProperty(this, "
|
|
22813
|
+
_defineProperty(this, "SmfR", function () {
|
|
22038
22814
|
if (!_this.continueLoading) {
|
|
22039
22815
|
var slide_details_to_be_deleted = document.querySelector(".slide-details");
|
|
22040
22816
|
var childElements = slide_details_to_be_deleted.querySelectorAll("video");
|
|
@@ -22054,19 +22830,19 @@
|
|
|
22054
22830
|
_this.loader.style.display = "none";
|
|
22055
22831
|
}
|
|
22056
22832
|
});
|
|
22057
|
-
_defineProperty(this, "
|
|
22833
|
+
_defineProperty(this, "Wrko", function () {
|
|
22058
22834
|
if (_this.imageElements.length === 0) return true;
|
|
22059
22835
|
return _this.imageElements.every(function (img) {
|
|
22060
22836
|
return img.complete;
|
|
22061
22837
|
});
|
|
22062
22838
|
});
|
|
22063
|
-
_defineProperty(this, "
|
|
22839
|
+
_defineProperty(this, "gDMN", function () {
|
|
22064
22840
|
if (_this.videoElements.length === 0) return true;
|
|
22065
22841
|
return _this.videoElements.every(function (video) {
|
|
22066
22842
|
return video.readyState >= 3;
|
|
22067
22843
|
});
|
|
22068
22844
|
});
|
|
22069
|
-
_defineProperty(this, "
|
|
22845
|
+
_defineProperty(this, "ATnR", function () {
|
|
22070
22846
|
var bodyStyles = window.getComputedStyle(document.body);
|
|
22071
22847
|
var backgroundImage = bodyStyles.backgroundImage;
|
|
22072
22848
|
if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
|
|
@@ -22076,7 +22852,7 @@
|
|
|
22076
22852
|
var img = new Image();
|
|
22077
22853
|
img.src = imageUrl;
|
|
22078
22854
|
if (img.complete) {
|
|
22079
|
-
_this.
|
|
22855
|
+
_this.SmfR();
|
|
22080
22856
|
return true;
|
|
22081
22857
|
}
|
|
22082
22858
|
return false;
|
|
@@ -22084,21 +22860,21 @@
|
|
|
22084
22860
|
var slide_details_to_be_deleted = document.querySelector(".slide-details");
|
|
22085
22861
|
var childElements = slide_details_to_be_deleted.querySelectorAll("video");
|
|
22086
22862
|
if (childElements[0].readyState >= 3) {
|
|
22087
|
-
_this.
|
|
22863
|
+
_this.SmfR();
|
|
22088
22864
|
return true;
|
|
22089
22865
|
}
|
|
22090
22866
|
return false;
|
|
22091
22867
|
} else {
|
|
22092
22868
|
if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
|
|
22093
|
-
_this.
|
|
22869
|
+
_this.SmfR();
|
|
22094
22870
|
return true;
|
|
22095
|
-
} else if (_this.
|
|
22096
|
-
_this.
|
|
22871
|
+
} else if (_this.Wrko() && _this.gDMN()) {
|
|
22872
|
+
_this.SmfR();
|
|
22097
22873
|
return true;
|
|
22098
22874
|
}
|
|
22099
22875
|
}
|
|
22100
22876
|
});
|
|
22101
|
-
_defineProperty(this, "
|
|
22877
|
+
_defineProperty(this, "nHlR", function (event, startY, action) {
|
|
22102
22878
|
event.stopPropagation();
|
|
22103
22879
|
var endY = event.changedTouches[0].clientY;
|
|
22104
22880
|
var deltaY = startY - endY;
|
|
@@ -22186,7 +22962,7 @@
|
|
|
22186
22962
|
this.swipe_action;
|
|
22187
22963
|
this.continueLoading = false;
|
|
22188
22964
|
this.boundSwipeUpHandling = function (event) {
|
|
22189
|
-
return _this.
|
|
22965
|
+
return _this.nHlR(event, _this.startY, _this.swipe_action);
|
|
22190
22966
|
};
|
|
22191
22967
|
}
|
|
22192
22968
|
_createClass(Stories, [{
|
|
@@ -22249,7 +23025,7 @@
|
|
|
22249
23025
|
} else {
|
|
22250
23026
|
var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
|
|
22251
23027
|
// Move to the first slide of the next group
|
|
22252
|
-
// this.
|
|
23028
|
+
// this.UFDN();
|
|
22253
23029
|
this.position++;
|
|
22254
23030
|
this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
|
|
22255
23031
|
this.slides = this.config[this.position].slides;
|
|
@@ -22375,7 +23151,7 @@
|
|
|
22375
23151
|
if (activeIndex === 0) {
|
|
22376
23152
|
var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
|
|
22377
23153
|
// If at the first slide of the current group, move to the last slide of the previous group
|
|
22378
|
-
// this.
|
|
23154
|
+
// this.UFDN();
|
|
22379
23155
|
this.position--;
|
|
22380
23156
|
this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
|
|
22381
23157
|
this.slides = this.config[this.position].slides;
|
|
@@ -22564,25 +23340,25 @@
|
|
|
22564
23340
|
// Create custom content
|
|
22565
23341
|
var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
|
|
22566
23342
|
delete updated_layout_without_absolute_elements["absolute_position_children"];
|
|
22567
|
-
element = this.
|
|
23343
|
+
element = this.KDYj(updated_layout_without_absolute_elements);
|
|
22568
23344
|
}
|
|
22569
23345
|
// Append slide content to slide details container
|
|
22570
23346
|
|
|
22571
23347
|
document.body.style.backgroundColor = current_slide_from_config.media_background_color;
|
|
22572
23348
|
document.body.style.margin = "0px";
|
|
22573
23349
|
currentSlideDetails.appendChild(element);
|
|
22574
|
-
this.
|
|
23350
|
+
this.pXby();
|
|
22575
23351
|
|
|
22576
23352
|
// Handle absolute position children
|
|
22577
23353
|
if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
|
|
22578
23354
|
current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
|
|
22579
|
-
var childElement = _this2.
|
|
23355
|
+
var childElement = _this2.KDYj(childConfig);
|
|
22580
23356
|
// Append absolute position children to slide details container
|
|
22581
23357
|
currentSlideDetails.appendChild(childElement);
|
|
22582
23358
|
});
|
|
22583
23359
|
}
|
|
22584
23360
|
window.intervalToCheckImgStatus2 = setInterval(function () {
|
|
22585
|
-
if (_this2.
|
|
23361
|
+
if (_this2.ATnR()) {
|
|
22586
23362
|
clearInterval(window.intervalToCheckImgStatus2);
|
|
22587
23363
|
}
|
|
22588
23364
|
}, 500);
|
|
@@ -22629,16 +23405,16 @@
|
|
|
22629
23405
|
var RTM = /*#__PURE__*/_createClass(function RTM() {
|
|
22630
23406
|
var _this = this;
|
|
22631
23407
|
_classCallCheck(this, RTM);
|
|
22632
|
-
_defineProperty(this, "
|
|
23408
|
+
_defineProperty(this, "GSRP", {});
|
|
22633
23409
|
_defineProperty(this, "isShowingAction", false);
|
|
22634
23410
|
_defineProperty(this, "currentAction", null);
|
|
22635
|
-
_defineProperty(this, "
|
|
22636
|
-
_defineProperty(this, "version",
|
|
23411
|
+
_defineProperty(this, "TadV", null);
|
|
23412
|
+
_defineProperty(this, "version", 80);
|
|
22637
23413
|
_defineProperty(this, "isInitialised", false);
|
|
22638
|
-
_defineProperty(this, "
|
|
22639
|
-
_defineProperty(this, "
|
|
23414
|
+
_defineProperty(this, "JoHc", {});
|
|
23415
|
+
_defineProperty(this, "fdTw", false);
|
|
22640
23416
|
_defineProperty(this, "_isShownECCalled", false);
|
|
22641
|
-
_defineProperty(this, "
|
|
23417
|
+
_defineProperty(this, "mRub", function () {
|
|
22642
23418
|
_this.isInitialised = true;
|
|
22643
23419
|
var oldPushState = history.pushState;
|
|
22644
23420
|
history.pushState = function pushState() {
|
|
@@ -22663,7 +23439,7 @@
|
|
|
22663
23439
|
});
|
|
22664
23440
|
_defineProperty(this, "show", function (uiJson, duration, uuid, name) {
|
|
22665
23441
|
if (!_this.isInitialised) {
|
|
22666
|
-
_this.
|
|
23442
|
+
_this.mRub();
|
|
22667
23443
|
}
|
|
22668
23444
|
window.addEventListener("pagehide", function () {
|
|
22669
23445
|
var _window$Apxor, _window$Apxor$pageUnl;
|
|
@@ -22690,7 +23466,7 @@
|
|
|
22690
23466
|
} else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
|
|
22691
23467
|
_this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
|
|
22692
23468
|
} else if (ui_config.display_type === "coach_mark_v2") {
|
|
22693
|
-
_this.
|
|
23469
|
+
_this.QJAO(ui_config, duration, uuid, name);
|
|
22694
23470
|
} else {
|
|
22695
23471
|
showCoachmarkWithDelay(_this, ui_config, {
|
|
22696
23472
|
configId: uuid,
|
|
@@ -22763,7 +23539,7 @@
|
|
|
22763
23539
|
(_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
|
|
22764
23540
|
campaignName: name,
|
|
22765
23541
|
id: configId,
|
|
22766
|
-
|
|
23542
|
+
apx_template_name: "embed-card",
|
|
22767
23543
|
apx_notshown_type: "error",
|
|
22768
23544
|
apx_reason: "".concat(e === null || e === void 0 ? void 0 : e.name, " ").concat(e === null || e === void 0 ? void 0 : e.message)
|
|
22769
23545
|
});
|
|
@@ -22778,7 +23554,7 @@
|
|
|
22778
23554
|
(config === null || config === void 0 ? void 0 : config.initialRender) && ((_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 ? void 0 : _window$ApxorRTM2.logEvent("apx_nudge_shown", {
|
|
22779
23555
|
campaignName: name,
|
|
22780
23556
|
id: configId,
|
|
22781
|
-
|
|
23557
|
+
apx_template_name: "embed-card"
|
|
22782
23558
|
}));
|
|
22783
23559
|
_this._isShownECCalled = true;
|
|
22784
23560
|
}, function () {
|
|
@@ -22791,7 +23567,7 @@
|
|
|
22791
23567
|
try {
|
|
22792
23568
|
config = config.split("\n").join("\\n");
|
|
22793
23569
|
var ui_config = JSON.parse(config);
|
|
22794
|
-
_this.
|
|
23570
|
+
_this.mKfh(ui_config, configId, name, position, slidesSeenCount, view_id);
|
|
22795
23571
|
} catch (e) {
|
|
22796
23572
|
var _window$Apxor3;
|
|
22797
23573
|
if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
|
|
@@ -22805,12 +23581,12 @@
|
|
|
22805
23581
|
console.error(e);
|
|
22806
23582
|
}
|
|
22807
23583
|
});
|
|
22808
|
-
_defineProperty(this, "
|
|
23584
|
+
_defineProperty(this, "mKfh", function (config, configId, name, position, slidesSeenCount, view_id) {
|
|
22809
23585
|
var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
|
|
22810
23586
|
window.Apxor.logAppEvent("apx_nudge_shown", {
|
|
22811
23587
|
campaignName: name,
|
|
22812
23588
|
id: configId,
|
|
22813
|
-
|
|
23589
|
+
apx_template_name: "stories"
|
|
22814
23590
|
});
|
|
22815
23591
|
}, function () {});
|
|
22816
23592
|
cardsContainer.showStories();
|
|
@@ -22853,7 +23629,7 @@
|
|
|
22853
23629
|
var _window22, _window22$updateFlag, _window23;
|
|
22854
23630
|
_this.isShowingAction = false;
|
|
22855
23631
|
_this.currentAction = null;
|
|
22856
|
-
_this.
|
|
23632
|
+
_this.TadV = null;
|
|
22857
23633
|
(_window22 = window) === null || _window22 === void 0 || (_window22 = _window22.Apxor) === null || _window22 === void 0 || (_window22$updateFlag = _window22.updateFlag) === null || _window22$updateFlag === void 0 || _window22$updateFlag.call(_window22, false);
|
|
22858
23634
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
22859
23635
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
@@ -22864,21 +23640,21 @@
|
|
|
22864
23640
|
}
|
|
22865
23641
|
};
|
|
22866
23642
|
if (action_class === "new-inline") {
|
|
22867
|
-
_this.
|
|
23643
|
+
_this.TadV = new InLineTooltip(ui_config, [], [], terminationConfig, {
|
|
22868
23644
|
configId: uuid,
|
|
22869
23645
|
configName: name
|
|
22870
23646
|
}, _this, onShow, onHide, function () {}, false, 0);
|
|
22871
23647
|
} else if (action_class === "tooltip_builder") {
|
|
22872
|
-
_this.
|
|
23648
|
+
_this.TadV = new NewInLineTooltip(ui_config, terminationConfig, {
|
|
22873
23649
|
configId: uuid,
|
|
22874
23650
|
configName: name
|
|
22875
23651
|
}, _this, onShow, onHide);
|
|
22876
23652
|
}
|
|
22877
23653
|
setTimeout(function () {
|
|
22878
|
-
_this.
|
|
23654
|
+
_this.TadV.createNewTooltip();
|
|
22879
23655
|
}, ui_config.delay);
|
|
22880
23656
|
});
|
|
22881
|
-
_defineProperty(this, "
|
|
23657
|
+
_defineProperty(this, "QJAO", function (ui_config, duration, uuid, name) {
|
|
22882
23658
|
var terminationConfig = {};
|
|
22883
23659
|
terminationConfig["auto_dismiss"] = duration > 0;
|
|
22884
23660
|
terminationConfig["duration"] = duration;
|
|
@@ -22902,7 +23678,7 @@
|
|
|
22902
23678
|
var _window27, _window27$updateFlag, _window28;
|
|
22903
23679
|
_this.isShowingAction = false;
|
|
22904
23680
|
_this.currentAction = null;
|
|
22905
|
-
_this.
|
|
23681
|
+
_this.TadV = null;
|
|
22906
23682
|
(_window27 = window) === null || _window27 === void 0 || (_window27 = _window27.Apxor) === null || _window27 === void 0 || (_window27$updateFlag = _window27.updateFlag) === null || _window27$updateFlag === void 0 || _window27$updateFlag.call(_window27, false);
|
|
22907
23683
|
if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
|
|
22908
23684
|
window.Apxor.logActionEvent("inline_dismissed", uuid, name);
|
|
@@ -22915,8 +23691,8 @@
|
|
|
22915
23691
|
_this._currentCoachmark.createNewCoachMark();
|
|
22916
23692
|
});
|
|
22917
23693
|
_defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
|
|
22918
|
-
if (_this.
|
|
22919
|
-
_this.
|
|
23694
|
+
if (_this.TadV) {
|
|
23695
|
+
_this.TadV.updateElementPositionOnScroll(top, left, height, width);
|
|
22920
23696
|
}
|
|
22921
23697
|
});
|
|
22922
23698
|
_defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
|
|
@@ -22965,24 +23741,35 @@
|
|
|
22965
23741
|
terminationConfig["duration"] = duration;
|
|
22966
23742
|
var inappModal = null;
|
|
22967
23743
|
var onShow = function onShow() {
|
|
23744
|
+
var _window$Apxor4;
|
|
22968
23745
|
_this.isShowingAction = true;
|
|
22969
|
-
if (window.Apxor
|
|
22970
|
-
var
|
|
22971
|
-
|
|
22972
|
-
|
|
22973
|
-
|
|
22974
|
-
|
|
22975
|
-
|
|
22976
|
-
|
|
22977
|
-
}
|
|
23746
|
+
if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
|
|
23747
|
+
var _window32, _window32$updateFlag;
|
|
23748
|
+
(_window32 = window) === null || _window32 === void 0 || (_window32 = _window32.Apxor) === null || _window32 === void 0 || (_window32$updateFlag = _window32.updateFlag) === null || _window32$updateFlag === void 0 || _window32$updateFlag.call(_window32, true, "IN_APP");
|
|
23749
|
+
} else {
|
|
23750
|
+
var _window33, _window33$updateFlag;
|
|
23751
|
+
(_window33 = window) === null || _window33 === void 0 || (_window33 = _window33.Apxor) === null || _window33 === void 0 || (_window33$updateFlag = _window33.updateFlag) === null || _window33$updateFlag === void 0 || _window33$updateFlag.call(_window33, "IN_APP", true);
|
|
23752
|
+
}
|
|
23753
|
+
if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent) {
|
|
22978
23754
|
window.Apxor.logActionEvent("inapp_shown", configId, name);
|
|
23755
|
+
} else if (action_class === "inapp_builder") {
|
|
23756
|
+
var _window$ApxorRTM3, _window$Apxor5, _config$additional_in, _window$Apxor6, _config$additional_in2, _config$additional_in3, _config$additional_in4, _config$additional_in5, _config$additional_in6, _config$additional_in7;
|
|
23757
|
+
(_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
|
|
23758
|
+
apx_nudge_name: name,
|
|
23759
|
+
apx_nudge_id: ((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in = config.additional_info) === null || _config$additional_in === void 0 ? void 0 : _config$additional_in.id : configId,
|
|
23760
|
+
apx_template_name: "inapp",
|
|
23761
|
+
apx_step: ((_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in2 = config.additional_info) !== null && _config$additional_in2 !== void 0 && _config$additional_in2.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in3 = config.additional_info) === null || _config$additional_in3 === void 0 ? void 0 : _config$additional_in3.apx_step : config !== null && config !== void 0 && (_config$additional_in4 = config.additional_info) !== null && _config$additional_in4 !== void 0 && _config$additional_in4.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in5 = config.additional_info) === null || _config$additional_in5 === void 0 ? void 0 : _config$additional_in5.apx_step,
|
|
23762
|
+
apx_screen_name: config === null || config === void 0 || (_config$additional_in6 = config.additional_info) === null || _config$additional_in6 === void 0 ? void 0 : _config$additional_in6.apx_screen_name,
|
|
23763
|
+
apx_variant_code: config === null || config === void 0 || (_config$additional_in7 = config.additional_info) === null || _config$additional_in7 === void 0 ? void 0 : _config$additional_in7.apx_variant_code
|
|
23764
|
+
});
|
|
22979
23765
|
}
|
|
22980
23766
|
};
|
|
22981
23767
|
var onHide = function onHide(backgroundDiv, action) {
|
|
22982
|
-
var _dialogContent$classL, _window$
|
|
22983
|
-
var
|
|
22984
|
-
var
|
|
22985
|
-
var
|
|
23768
|
+
var _dialogContent$classL, _window$Apxor7;
|
|
23769
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
23770
|
+
var cssClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ".apx-dlg-c";
|
|
23771
|
+
var closeListener = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
23772
|
+
var redirectionListener = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
22986
23773
|
document.body.removeEventListener("click", closeListener);
|
|
22987
23774
|
document.body.removeEventListener("click", redirectionListener);
|
|
22988
23775
|
var dialogContent = document.querySelector(cssClass);
|
|
@@ -22990,7 +23777,7 @@
|
|
|
22990
23777
|
// setTimeout(() => {
|
|
22991
23778
|
backgroundDiv.remove();
|
|
22992
23779
|
_this.isShowingAction = false;
|
|
22993
|
-
if (((_window$
|
|
23780
|
+
if (((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) === "ios") {
|
|
22994
23781
|
var _window34, _window34$updateFlag;
|
|
22995
23782
|
(_window34 = window) === null || _window34 === void 0 || (_window34 = _window34.Apxor) === null || _window34 === void 0 || (_window34$updateFlag = _window34.updateFlag) === null || _window34$updateFlag === void 0 || _window34$updateFlag.call(_window34, false, "IN_APP");
|
|
22996
23783
|
} else {
|
|
@@ -22998,23 +23785,54 @@
|
|
|
22998
23785
|
(_window35 = window) === null || _window35 === void 0 || (_window35 = _window35.Apxor) === null || _window35 === void 0 || (_window35$updateFlag = _window35.updateFlag) === null || _window35$updateFlag === void 0 || _window35$updateFlag.call(_window35, "IN_APP", false);
|
|
22999
23786
|
}
|
|
23000
23787
|
_this.currentAction = null;
|
|
23001
|
-
if (window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
|
|
23788
|
+
if (action_class === "modal" && window.Apxor && window.Apxor.logActionEvent && !(action == "cancel" || action == "redirect")) {
|
|
23002
23789
|
window.Apxor.logActionEvent("inapp_dismissed", configId, name);
|
|
23790
|
+
} else if (action_class === "inapp_builder") {
|
|
23791
|
+
var _window36;
|
|
23792
|
+
if (!(action == "cancel" || action == "never")) {
|
|
23793
|
+
var _window$Apxor8, _config$additional_in8, _config$additional_in9, _window$Apxor9, _config$additional_in10, _config$additional_in11, _config$additional_in12, _config$additional_in13, _window$ApxorRTM4;
|
|
23794
|
+
var additional_info = {
|
|
23795
|
+
apx_nudge_name: name,
|
|
23796
|
+
apx_nudge_id: ((_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 ? void 0 : _window$Apxor8.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in8 = config.additional_info) === null || _config$additional_in8 === void 0 ? void 0 : _config$additional_in8.id : configId,
|
|
23797
|
+
apx_template_name: "inapp",
|
|
23798
|
+
apx_variant_code: config === null || config === void 0 || (_config$additional_in9 = config.additional_info) === null || _config$additional_in9 === void 0 ? void 0 : _config$additional_in9.apx_variant_code,
|
|
23799
|
+
apx_step: ((_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 ? void 0 : _window$Apxor9.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in10 = config.additional_info) !== null && _config$additional_in10 !== void 0 && _config$additional_in10.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in11 = config.additional_info) === null || _config$additional_in11 === void 0 ? void 0 : _config$additional_in11.apx_step : config !== null && config !== void 0 && (_config$additional_in12 = config.additional_info) !== null && _config$additional_in12 !== void 0 && _config$additional_in12.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in13 = config.additional_info) === null || _config$additional_in13 === void 0 ? void 0 : _config$additional_in13.apx_step
|
|
23800
|
+
};
|
|
23801
|
+
if (type != "") {
|
|
23802
|
+
additional_info["apx_dismiss_type"] = type;
|
|
23803
|
+
}
|
|
23804
|
+
(_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_nudge_dismissed", additional_info);
|
|
23805
|
+
}
|
|
23806
|
+
if (action === "cancel") {
|
|
23807
|
+
var _window$Apxor10, _config$additional_in14, _config$additional_in15, _window$Apxor11, _config$additional_in16, _config$additional_in17, _config$additional_in18, _config$additional_in19, _window$ApxorRTM5;
|
|
23808
|
+
var _additional_info = {
|
|
23809
|
+
apx_nudge_name: name,
|
|
23810
|
+
apx_nudge_id: ((_window$Apxor10 = window.Apxor) === null || _window$Apxor10 === void 0 ? void 0 : _window$Apxor10.platform) === "ios" ? config === null || config === void 0 || (_config$additional_in14 = config.additional_info) === null || _config$additional_in14 === void 0 ? void 0 : _config$additional_in14.id : configId,
|
|
23811
|
+
apx_template_name: "inapp",
|
|
23812
|
+
apx_variant_code: config === null || config === void 0 || (_config$additional_in15 = config.additional_info) === null || _config$additional_in15 === void 0 ? void 0 : _config$additional_in15.apx_variant_code,
|
|
23813
|
+
apx_step: ((_window$Apxor11 = window.Apxor) === null || _window$Apxor11 === void 0 ? void 0 : _window$Apxor11.platform) === "ios" ? config !== null && config !== void 0 && (_config$additional_in16 = config.additional_info) !== null && _config$additional_in16 !== void 0 && _config$additional_in16.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in17 = config.additional_info) === null || _config$additional_in17 === void 0 ? void 0 : _config$additional_in17.apx_step : config !== null && config !== void 0 && (_config$additional_in18 = config.additional_info) !== null && _config$additional_in18 !== void 0 && _config$additional_in18.is_preview ? 1 : config === null || config === void 0 || (_config$additional_in19 = config.additional_info) === null || _config$additional_in19 === void 0 ? void 0 : _config$additional_in19.apx_step
|
|
23814
|
+
};
|
|
23815
|
+
(_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_nudge_cancelled", _additional_info);
|
|
23816
|
+
}
|
|
23817
|
+
(_window36 = window) === null || _window36 === void 0 || (_window36 = _window36.ApxorInternals) === null || _window36 === void 0 || _window36.removeBuilderTemplate(configId);
|
|
23003
23818
|
}
|
|
23004
23819
|
};
|
|
23005
23820
|
if (action_class === "modal") {
|
|
23006
23821
|
inappModal = new ModalInApp(config, terminationConfig, configId, name, onShow, onHide, function () {}, false, [], 0);
|
|
23822
|
+
inappModal.createInAppModal();
|
|
23007
23823
|
} else if (action_class === "inapp_builder") {
|
|
23008
23824
|
inappModal = new NewModalInApp(config, terminationConfig, configId, name, onShow, onHide);
|
|
23825
|
+
setTimeout(function () {
|
|
23826
|
+
inappModal.createInAppModal();
|
|
23827
|
+
}, config === null || config === void 0 ? void 0 : config.delay);
|
|
23009
23828
|
}
|
|
23010
|
-
inappModal.createInAppModal();
|
|
23011
23829
|
});
|
|
23012
23830
|
_defineProperty(this, "showPlaceHolder", function () {
|
|
23013
|
-
var
|
|
23014
|
-
if (_this.
|
|
23831
|
+
var _window37;
|
|
23832
|
+
if (_this.fdTw) {
|
|
23015
23833
|
return;
|
|
23016
23834
|
}
|
|
23017
|
-
_this.
|
|
23835
|
+
_this.fdTw = true;
|
|
23018
23836
|
var ele = document.createElement("div");
|
|
23019
23837
|
ele.innerHTML = "place your immersive card here";
|
|
23020
23838
|
ele.style.backgroundColor = "#f5f5f5";
|
|
@@ -23024,7 +23842,7 @@
|
|
|
23024
23842
|
ele.style.padding = "12px";
|
|
23025
23843
|
ele.style.fontSize = "14px";
|
|
23026
23844
|
document.body.appendChild(ele);
|
|
23027
|
-
(
|
|
23845
|
+
(_window37 = window) === null || _window37 === void 0 || (_window37 = _window37.ApxorWidget) === null || _window37 === void 0 || _window37.setDimensions(window.document.querySelector("html").offsetWidth, window.document.querySelector("html").offsetHeight);
|
|
23028
23846
|
});
|
|
23029
23847
|
_defineProperty(this, "pauseStories", function () {
|
|
23030
23848
|
var progress = Array.from(document.querySelectorAll(".progress"));
|
|
@@ -23063,8 +23881,8 @@
|
|
|
23063
23881
|
// survey_obj.createSurvey();
|
|
23064
23882
|
// };
|
|
23065
23883
|
_defineProperty(this, "logEvent", function (name, additional_info) {
|
|
23066
|
-
var _window$
|
|
23067
|
-
if (((_window$
|
|
23884
|
+
var _window$Apxor12;
|
|
23885
|
+
if (((_window$Apxor12 = window.Apxor) === null || _window$Apxor12 === void 0 ? void 0 : _window$Apxor12.platform) === "ios") {
|
|
23068
23886
|
window.Apxor.logAppEvent(name, additional_info);
|
|
23069
23887
|
} else {
|
|
23070
23888
|
window.Apxor.logAppEvent(name, JSON.stringify(additional_info));
|