apxor-rtm-ui 0.9.5 → 0.9.7

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.
@@ -530,6 +530,57 @@
530
530
  function _nonIterableRest() {
531
531
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
532
532
  }
533
+ function _createForOfIteratorHelper(o, allowArrayLike) {
534
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
535
+ if (!it) {
536
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
537
+ if (it) o = it;
538
+ var i = 0;
539
+ var F = function () {};
540
+ return {
541
+ s: F,
542
+ n: function () {
543
+ if (i >= o.length) return {
544
+ done: true
545
+ };
546
+ return {
547
+ done: false,
548
+ value: o[i++]
549
+ };
550
+ },
551
+ e: function (e) {
552
+ throw e;
553
+ },
554
+ f: F
555
+ };
556
+ }
557
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
558
+ }
559
+ var normalCompletion = true,
560
+ didErr = false,
561
+ err;
562
+ return {
563
+ s: function () {
564
+ it = it.call(o);
565
+ },
566
+ n: function () {
567
+ var step = it.next();
568
+ normalCompletion = step.done;
569
+ return step;
570
+ },
571
+ e: function (e) {
572
+ didErr = true;
573
+ err = e;
574
+ },
575
+ f: function () {
576
+ try {
577
+ if (!normalCompletion && it.return != null) it.return();
578
+ } finally {
579
+ if (didErr) throw err;
580
+ }
581
+ }
582
+ };
583
+ }
533
584
  function _toPrimitive(input, hint) {
534
585
  if (typeof input !== "object" || input === null) return input;
535
586
  var prim = input[Symbol.toPrimitive];
@@ -7342,6 +7393,10 @@
7342
7393
  var configType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : EVENT_PREFIX.INAPP;
7343
7394
  var action = function action() {};
7344
7395
  var _action = action_config === null || action_config === void 0 ? void 0 : action_config.action;
7396
+ var events = (action_config === null || action_config === void 0 ? void 0 : action_config.events) || [];
7397
+ var user_properties = (action_config === null || action_config === void 0 ? void 0 : action_config.user_props) || [];
7398
+ var session_properties = (action_config === null || action_config === void 0 ? void 0 : action_config.session_props) || [];
7399
+ var copy_content = (action_config === null || action_config === void 0 ? void 0 : action_config.copy_content) || "";
7345
7400
  try {
7346
7401
  switch (_action) {
7347
7402
  case "done":
@@ -7371,6 +7426,87 @@
7371
7426
  // }
7372
7427
  };
7373
7428
 
7429
+ break;
7430
+ case "copy_clipboard":
7431
+ action = /*#__PURE__*/function () {
7432
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7433
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
7434
+ while (1) switch (_context.prev = _context.next) {
7435
+ case 0:
7436
+ window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
7437
+ _context.prev = 1;
7438
+ _context.next = 4;
7439
+ return navigator.clipboard.writeText(copy_content);
7440
+ case 4:
7441
+ window.Apxor.showInfoToast("Text-Copied:".concat(copy_content));
7442
+ ActionHandler.cancel(true, "cancel");
7443
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7444
+ _context.next = 13;
7445
+ break;
7446
+ case 9:
7447
+ _context.prev = 9;
7448
+ _context.t0 = _context["catch"](1);
7449
+ console.error("Failed to copy:", _context.t0);
7450
+ window.Apxor.showInfoToast("Failed to copy text");
7451
+ case 13:
7452
+ case "end":
7453
+ return _context.stop();
7454
+ }
7455
+ }, _callee, null, [[1, 9]]);
7456
+ }));
7457
+ return function action() {
7458
+ return _ref2.apply(this, arguments);
7459
+ };
7460
+ }();
7461
+ break;
7462
+ case "user_props":
7463
+ action = function action() {
7464
+ window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
7465
+ user_properties.forEach(function (props) {
7466
+ var _window$Apxor2;
7467
+ return (_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.setUserProperties(props);
7468
+ });
7469
+ ActionHandler.cancel(true, "cancel");
7470
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7471
+ };
7472
+ break;
7473
+ case "session_props":
7474
+ action = function action() {
7475
+ window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
7476
+ session_properties.forEach(function (props) {
7477
+ var _window$Apxor3;
7478
+ return (_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.setSessionProperties(props);
7479
+ });
7480
+ ActionHandler.cancel(true, "cancel");
7481
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7482
+ };
7483
+ break;
7484
+ case "event":
7485
+ action = function action() {
7486
+ window.Apxor.logActionEvent(configType + "img" + "_Clicked", uuid, name);
7487
+ var _iterator = _createForOfIteratorHelper(events),
7488
+ _step;
7489
+ try {
7490
+ var _loop = function _loop() {
7491
+ var _window$ApxorRTM;
7492
+ var event = _step.value;
7493
+ var props = {};
7494
+ event.properties.forEach(function (item) {
7495
+ props = _objectSpread2(_objectSpread2({}, props), item);
7496
+ });
7497
+ (_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent(event.event_name, props);
7498
+ };
7499
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
7500
+ _loop();
7501
+ }
7502
+ } catch (err) {
7503
+ _iterator.e(err);
7504
+ } finally {
7505
+ _iterator.f();
7506
+ }
7507
+ ActionHandler.cancel(true, "cancel");
7508
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7509
+ };
7374
7510
  break;
7375
7511
  case "cancel":
7376
7512
  action = function action() {
@@ -7453,8 +7589,12 @@
7453
7589
  // callbackFunction = action.callback ?? (() => {});
7454
7590
  // }
7455
7591
 
7456
- var action_config = (_button_config$action = button_config === null || button_config === void 0 ? void 0 : button_config.action) !== null && _button_config$action !== void 0 ? _button_config$action : {};
7592
+ var action_config = (_button_config$action = button_config === null || button_config === void 0 ? void 0 : button_config.action_config) !== null && _button_config$action !== void 0 ? _button_config$action : {};
7457
7593
  var _action = action_config === null || action_config === void 0 ? void 0 : action_config.action;
7594
+ var events = (action_config === null || action_config === void 0 ? void 0 : action_config.events) || [];
7595
+ var user_properties = (action_config === null || action_config === void 0 ? void 0 : action_config.user_props) || [];
7596
+ var session_properties = (action_config === null || action_config === void 0 ? void 0 : action_config.session_props) || [];
7597
+ var copy_content = (action_config === null || action_config === void 0 ? void 0 : action_config.copy_content) || "";
7458
7598
  var vMap = {};
7459
7599
  if (button_config.enable_text) {
7460
7600
  var _button_config$text$s, _button_config$text;
@@ -7517,8 +7657,8 @@
7517
7657
  break;
7518
7658
  case "redirect":
7519
7659
  action = function action() {
7520
- var _window$Apxor2;
7521
- if (((_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.platform) === "ios") {
7660
+ var _window$Apxor4;
7661
+ if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
7522
7662
  window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
7523
7663
  ActionHandler.complete(false, "redirect");
7524
7664
  window.Apxor.redirectTo(JSON.stringify(action_config));
@@ -7543,6 +7683,39 @@
7543
7683
  // }
7544
7684
  };
7545
7685
 
7686
+ break;
7687
+ case "copy_clipboard":
7688
+ action = /*#__PURE__*/function () {
7689
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
7690
+ var _window$Apxor5, _window$Apxor6;
7691
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7692
+ while (1) switch (_context2.prev = _context2.next) {
7693
+ case 0:
7694
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
7695
+ _context2.prev = 1;
7696
+ _context2.next = 4;
7697
+ return navigator.clipboard.writeText(copy_content);
7698
+ case 4:
7699
+ (_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.showInfoToast("Text-Copied:".concat(copy_content));
7700
+ ActionHandler.cancel(true, "cancel");
7701
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7702
+ _context2.next = 13;
7703
+ break;
7704
+ case 9:
7705
+ _context2.prev = 9;
7706
+ _context2.t0 = _context2["catch"](1);
7707
+ console.error("Failed to copy:", _context2.t0);
7708
+ (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 || _window$Apxor6.showInfoToast("Failed to copy text");
7709
+ case 13:
7710
+ case "end":
7711
+ return _context2.stop();
7712
+ }
7713
+ }, _callee2, null, [[1, 9]]);
7714
+ }));
7715
+ return function action() {
7716
+ return _ref3.apply(this, arguments);
7717
+ };
7718
+ }();
7546
7719
  break;
7547
7720
  case "cancel":
7548
7721
  action = function action() {
@@ -7552,6 +7725,55 @@
7552
7725
  window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7553
7726
  };
7554
7727
  break;
7728
+ case "user_props":
7729
+ action = function action() {
7730
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
7731
+ user_properties.forEach(function (props) {
7732
+ var _window$Apxor7;
7733
+ return (_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.setUserProperties(props);
7734
+ });
7735
+ ActionHandler.cancel(true, "cancel");
7736
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7737
+ };
7738
+ break;
7739
+ case "session_props":
7740
+ action = function action() {
7741
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
7742
+ session_properties.forEach(function (props) {
7743
+ var _window$Apxor8;
7744
+ return (_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 ? void 0 : _window$Apxor8.setSessionProperties(props);
7745
+ });
7746
+ ActionHandler.cancel(true, "cancel");
7747
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7748
+ };
7749
+ break;
7750
+ case "event":
7751
+ action = function action() {
7752
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
7753
+ var _iterator2 = _createForOfIteratorHelper(events),
7754
+ _step2;
7755
+ try {
7756
+ var _loop2 = function _loop2() {
7757
+ var _window$ApxorRTM2;
7758
+ var event = _step2.value;
7759
+ var props = {};
7760
+ event.properties.forEach(function (item) {
7761
+ props = _objectSpread2(_objectSpread2({}, props), item);
7762
+ });
7763
+ (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent(event.event_name, props);
7764
+ };
7765
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
7766
+ _loop2();
7767
+ }
7768
+ } catch (err) {
7769
+ _iterator2.e(err);
7770
+ } finally {
7771
+ _iterator2.f();
7772
+ }
7773
+ ActionHandler.cancel(true, "cancel");
7774
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
7775
+ };
7776
+ break;
7555
7777
  case "submit":
7556
7778
  action = function action() {
7557
7779
  ActionHandler.complete(false, "submit");
@@ -7832,10 +8054,10 @@
7832
8054
  }
7833
8055
  function objectToCSS(styleObject) {
7834
8056
  var cssString = "";
7835
- Object.entries(styleObject).forEach(function (_ref2) {
7836
- var _ref3 = _slicedToArray(_ref2, 2),
7837
- property = _ref3[0],
7838
- value = _ref3[1];
8057
+ Object.entries(styleObject).forEach(function (_ref4) {
8058
+ var _ref5 = _slicedToArray(_ref4, 2),
8059
+ property = _ref5[0],
8060
+ value = _ref5[1];
7839
8061
  cssString += "".concat(property, ": ").concat(value, ";");
7840
8062
  });
7841
8063
  return cssString;
@@ -8034,13 +8256,17 @@
8034
8256
  var buttons_array = [];
8035
8257
  var buttons_css = [];
8036
8258
  buttons_config.forEach(function (button_config, index) {
8037
- var _button_config$action2, _button_config$action3, _button_config$action4, _button_config$action5, _button_config$action6, _button_config$action7, _button_config$action8, _button_config$action9, _button_config$action10, _button_config$action11, _button_config$action12, _button_config$action13;
8259
+ var _button_config$action2, _button_config$action3, _button_config$action4, _button_config$action5, _button_config$action6, _button_config$action7, _button_config$action8, _button_config$action9, _button_config$action10, _button_config$action11, _button_config$action12, _button_config$action13, _button_config$action14, _button_config$action15, _button_config$action16, _button_config$action17;
8038
8260
  var _action = (_button_config$action2 = button_config === null || button_config === void 0 || (_button_config$action3 = button_config.action_config) === null || _button_config$action3 === void 0 ? void 0 : _button_config$action3.action) !== null && _button_config$action2 !== void 0 ? _button_config$action2 : "end";
8039
8261
  var vMap = (_button_config$action4 = button_config === null || button_config === void 0 || (_button_config$action5 = button_config.action_config) === null || _button_config$action5 === void 0 ? void 0 : _button_config$action5.vmap) !== null && _button_config$action4 !== void 0 ? _button_config$action4 : {};
8040
8262
  var url = (_button_config$action6 = button_config === null || button_config === void 0 || (_button_config$action7 = button_config.action_config) === null || _button_config$action7 === void 0 ? void 0 : _button_config$action7.url) !== null && _button_config$action6 !== void 0 ? _button_config$action6 : "";
8041
- var isExternal = (_button_config$action8 = button_config === null || button_config === void 0 || (_button_config$action9 = button_config.action_config) === null || _button_config$action9 === void 0 ? void 0 : _button_config$action9.is_external) !== null && _button_config$action8 !== void 0 ? _button_config$action8 : true;
8042
- var redirectWithin = (_button_config$action10 = button_config === null || button_config === void 0 || (_button_config$action11 = button_config.action_config) === null || _button_config$action11 === void 0 ? void 0 : _button_config$action11.is_within) !== null && _button_config$action10 !== void 0 ? _button_config$action10 : false;
8043
- var callbackFunction = (_button_config$action12 = button_config === null || button_config === void 0 || (_button_config$action13 = button_config.action_config) === null || _button_config$action13 === void 0 ? void 0 : _button_config$action13.callback_func) !== null && _button_config$action12 !== void 0 ? _button_config$action12 : "";
8263
+ var events = (button_config === null || button_config === void 0 || (_button_config$action8 = button_config.action_config) === null || _button_config$action8 === void 0 ? void 0 : _button_config$action8.events) || [];
8264
+ var user_properties = (button_config === null || button_config === void 0 || (_button_config$action9 = button_config.action_config) === null || _button_config$action9 === void 0 ? void 0 : _button_config$action9.user_props) || [];
8265
+ var session_properties = (button_config === null || button_config === void 0 || (_button_config$action10 = button_config.action_config) === null || _button_config$action10 === void 0 ? void 0 : _button_config$action10.session_props) || [];
8266
+ var copy_content = (button_config === null || button_config === void 0 || (_button_config$action11 = button_config.action_config) === null || _button_config$action11 === void 0 ? void 0 : _button_config$action11.copy_content) || "";
8267
+ var isExternal = (_button_config$action12 = button_config === null || button_config === void 0 || (_button_config$action13 = button_config.action_config) === null || _button_config$action13 === void 0 ? void 0 : _button_config$action13.is_external) !== null && _button_config$action12 !== void 0 ? _button_config$action12 : true;
8268
+ var redirectWithin = (_button_config$action14 = button_config === null || button_config === void 0 || (_button_config$action15 = button_config.action_config) === null || _button_config$action15 === void 0 ? void 0 : _button_config$action15.is_within) !== null && _button_config$action14 !== void 0 ? _button_config$action14 : false;
8269
+ var callbackFunction = (_button_config$action16 = button_config === null || button_config === void 0 || (_button_config$action17 = button_config.action_config) === null || _button_config$action17 === void 0 ? void 0 : _button_config$action17.callback_func) !== null && _button_config$action16 !== void 0 ? _button_config$action16 : "";
8044
8270
  var action_config_str = JSON.stringify(button_config === null || button_config === void 0 ? void 0 : button_config.action_config);
8045
8271
  _action = _action.toLowerCase();
8046
8272
  var borders = button_config.borders,
@@ -8077,8 +8303,8 @@
8077
8303
  break;
8078
8304
  case "redirect":
8079
8305
  action = function action() {
8080
- var _window$Apxor3;
8081
- if (((_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.platform) === "ios") {
8306
+ var _window$Apxor9;
8307
+ if (((_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 ? void 0 : _window$Apxor9.platform) === "ios") {
8082
8308
  window.Apxor.redirectTo(action_config_str);
8083
8309
  } else {
8084
8310
  window.Apxor.redirectTo(uuid, name, text, action_config_str);
@@ -8086,6 +8312,87 @@
8086
8312
  ActionHandler.complete(_action);
8087
8313
  };
8088
8314
  break;
8315
+ case "copy_clipboard":
8316
+ action = /*#__PURE__*/function () {
8317
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
8318
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
8319
+ while (1) switch (_context3.prev = _context3.next) {
8320
+ case 0:
8321
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
8322
+ _context3.prev = 1;
8323
+ _context3.next = 4;
8324
+ return navigator.clipboard.writeText(copy_content);
8325
+ case 4:
8326
+ window.Apxor.showInfoToast("Text-Copied:".concat(copy_content));
8327
+ ActionHandler.cancel("cancel");
8328
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
8329
+ _context3.next = 13;
8330
+ break;
8331
+ case 9:
8332
+ _context3.prev = 9;
8333
+ _context3.t0 = _context3["catch"](1);
8334
+ console.error("Failed to copy:", _context3.t0);
8335
+ window.Apxor.showInfoToast("Failed to copy text");
8336
+ case 13:
8337
+ case "end":
8338
+ return _context3.stop();
8339
+ }
8340
+ }, _callee3, null, [[1, 9]]);
8341
+ }));
8342
+ return function action() {
8343
+ return _ref6.apply(this, arguments);
8344
+ };
8345
+ }();
8346
+ break;
8347
+ case "user_props":
8348
+ action = function action() {
8349
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
8350
+ user_properties.forEach(function (props) {
8351
+ var _window$Apxor10;
8352
+ return (_window$Apxor10 = window.Apxor) === null || _window$Apxor10 === void 0 ? void 0 : _window$Apxor10.setUserProperties(props);
8353
+ });
8354
+ ActionHandler.cancel("cancel");
8355
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
8356
+ };
8357
+ break;
8358
+ case "session_props":
8359
+ action = function action() {
8360
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
8361
+ session_properties.forEach(function (props) {
8362
+ var _window$Apxor11;
8363
+ return (_window$Apxor11 = window.Apxor) === null || _window$Apxor11 === void 0 ? void 0 : _window$Apxor11.setSessionProperties(props);
8364
+ });
8365
+ ActionHandler.cancel("cancel");
8366
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
8367
+ };
8368
+ break;
8369
+ case "event":
8370
+ action = function action() {
8371
+ window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
8372
+ var _iterator3 = _createForOfIteratorHelper(events),
8373
+ _step3;
8374
+ try {
8375
+ var _loop3 = function _loop3() {
8376
+ var _window$ApxorRTM3;
8377
+ var event = _step3.value;
8378
+ var props = {};
8379
+ event.properties.forEach(function (item) {
8380
+ props = _objectSpread2(_objectSpread2({}, props), item);
8381
+ });
8382
+ (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent(event.event_name, props);
8383
+ };
8384
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
8385
+ _loop3();
8386
+ }
8387
+ } catch (err) {
8388
+ _iterator3.e(err);
8389
+ } finally {
8390
+ _iterator3.f();
8391
+ }
8392
+ ActionHandler.cancel("cancel");
8393
+ window.Apxor.logActionEvent("walk_through_cancelled", uuid, name);
8394
+ };
8395
+ break;
8089
8396
  case "cancel":
8090
8397
  action = function action() {
8091
8398
  window.Apxor.logActionEvent(configType + text + "_Clicked", uuid, name);
@@ -8193,20 +8500,20 @@
8193
8500
  * @param {string} type - Title or Description type
8194
8501
  * @returns
8195
8502
  */
8196
- var createTextElement = function createTextElement(_ref4, currentId) {
8197
- var _ref4$color = _ref4.color,
8198
- color = _ref4$color === void 0 ? "#000" : _ref4$color,
8199
- _ref4$font_family = _ref4.font_family,
8200
- font_family = _ref4$font_family === void 0 ? "cursive" : _ref4$font_family,
8201
- _ref4$size = _ref4.size,
8202
- size = _ref4$size === void 0 ? 14 : _ref4$size,
8203
- _ref4$style = _ref4.style,
8204
- style = _ref4$style === void 0 ? "bold" : _ref4$style,
8205
- text = _ref4.text,
8206
- segments = _ref4.segments,
8207
- quote = _ref4.quote,
8208
- _ref4$link_config = _ref4.link_config,
8209
- link_config = _ref4$link_config === void 0 ? [] : _ref4$link_config;
8503
+ var createTextElement = function createTextElement(_ref7, currentId) {
8504
+ var _ref7$color = _ref7.color,
8505
+ color = _ref7$color === void 0 ? "#000" : _ref7$color,
8506
+ _ref7$font_family = _ref7.font_family,
8507
+ font_family = _ref7$font_family === void 0 ? "cursive" : _ref7$font_family,
8508
+ _ref7$size = _ref7.size,
8509
+ size = _ref7$size === void 0 ? 14 : _ref7$size,
8510
+ _ref7$style = _ref7.style,
8511
+ style = _ref7$style === void 0 ? "bold" : _ref7$style,
8512
+ text = _ref7.text,
8513
+ segments = _ref7.segments,
8514
+ quote = _ref7.quote,
8515
+ _ref7$link_config = _ref7.link_config,
8516
+ link_config = _ref7$link_config === void 0 ? [] : _ref7$link_config;
8210
8517
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "desc";
8211
8518
  var fontMultiplier = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
8212
8519
  size = size * fontMultiplier;
@@ -8242,7 +8549,6 @@
8242
8549
  return true;
8243
8550
  };
8244
8551
 
8245
- /* eslint-disable no-unused-vars */
8246
8552
  var ApxorWalkthroughTour;
8247
8553
  var buttonAction = null;
8248
8554
  var onClickCallback = function onClickCallback(configId, configName) {
@@ -8331,6 +8637,10 @@
8331
8637
  button_text = deepGet(button_config, ["text_config", "text"], null);
8332
8638
  var _action = (_button_config$action = button_config === null || button_config === void 0 || (_button_config$action2 = button_config.action_config) === null || _button_config$action2 === void 0 ? void 0 : _button_config$action2.action) !== null && _button_config$action !== void 0 ? _button_config$action : "end";
8333
8639
  var action_config = (button_config === null || button_config === void 0 ? void 0 : button_config.action_config) || {};
8640
+ var user_properties = (action_config === null || action_config === void 0 ? void 0 : action_config.user_props) || [];
8641
+ var session_properties = (action_config === null || action_config === void 0 ? void 0 : action_config.session_props) || [];
8642
+ var events = (action_config === null || action_config === void 0 ? void 0 : action_config.events) || [];
8643
+ var copy_content = (action_config === null || action_config === void 0 ? void 0 : action_config.copy_content) || "";
8334
8644
  var action_config_str = JSON.stringify(action_config);
8335
8645
  var url = (_button_config$action3 = button_config === null || button_config === void 0 || (_button_config$action4 = button_config.action_config) === null || _button_config$action4 === void 0 ? void 0 : _button_config$action4.url) !== null && _button_config$action3 !== void 0 ? _button_config$action3 : "";
8336
8646
  var logBtnClickEvent = function logBtnClickEvent() {
@@ -8380,6 +8690,93 @@
8380
8690
  ApxorWalkthroughTour.complete();
8381
8691
  };
8382
8692
  break;
8693
+ case "event":
8694
+ action = function action() {
8695
+ console.log("tooltip file event case entered", events);
8696
+ logBtnClickEvent();
8697
+ buttonAction = "event";
8698
+ var _iterator = _createForOfIteratorHelper(events),
8699
+ _step;
8700
+ try {
8701
+ var _loop = function _loop() {
8702
+ var _window$ApxorRTM;
8703
+ var event = _step.value;
8704
+ var props = {};
8705
+ event.properties.forEach(function (item) {
8706
+ props = _objectSpread2(_objectSpread2({}, props), item);
8707
+ });
8708
+ (_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 || _window$ApxorRTM.logEvent(event.event_name, props);
8709
+ };
8710
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
8711
+ _loop();
8712
+ }
8713
+ } catch (err) {
8714
+ _iterator.e(err);
8715
+ } finally {
8716
+ _iterator.f();
8717
+ }
8718
+ ApxorWalkthroughTour.complete();
8719
+ window.Apxor.logActionEvent("walk_through_cancelled", configId, configName);
8720
+ };
8721
+ break;
8722
+ case "session_props":
8723
+ action = function action() {
8724
+ logBtnClickEvent();
8725
+ buttonAction = "session_props";
8726
+ session_properties.forEach(function (props) {
8727
+ var _window$Apxor4;
8728
+ return (_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.setSessionProperties(props);
8729
+ });
8730
+ ApxorWalkthroughTour.complete();
8731
+ window.Apxor.logActionEvent("walk_through_cancelled", configId, configName);
8732
+ };
8733
+ break;
8734
+ case "user_props":
8735
+ action = function action() {
8736
+ logBtnClickEvent();
8737
+ buttonAction = "user_props";
8738
+ user_properties.forEach(function (props) {
8739
+ var _window$Apxor5;
8740
+ return (_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.setUserProperties(props);
8741
+ });
8742
+ ApxorWalkthroughTour.complete();
8743
+ window.Apxor.logActionEvent("walk_through_cancelled", configId, configName);
8744
+ };
8745
+ break;
8746
+ case "copy_clipboard":
8747
+ action = /*#__PURE__*/function () {
8748
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8749
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
8750
+ while (1) switch (_context.prev = _context.next) {
8751
+ case 0:
8752
+ logBtnClickEvent();
8753
+ buttonAction = "copy";
8754
+ _context.prev = 2;
8755
+ _context.next = 5;
8756
+ return navigator.clipboard.writeText(copy_content);
8757
+ case 5:
8758
+ window.Apxor.showInfoToast("Text-Copied:".concat(copy_content));
8759
+ _context.next = 12;
8760
+ break;
8761
+ case 8:
8762
+ _context.prev = 8;
8763
+ _context.t0 = _context["catch"](2);
8764
+ console.error("Failed to copy:", _context.t0);
8765
+ window.Apxor.showInfoToast("Failed to copy text");
8766
+ case 12:
8767
+ ApxorWalkthroughTour.complete();
8768
+ window.Apxor.logActionEvent("walk_through_cancelled", configId, configName);
8769
+ case 14:
8770
+ case "end":
8771
+ return _context.stop();
8772
+ }
8773
+ }, _callee, null, [[2, 8]]);
8774
+ }));
8775
+ return function action() {
8776
+ return _ref.apply(this, arguments);
8777
+ };
8778
+ }();
8779
+ break;
8383
8780
  case "cancel":
8384
8781
  action = function action() {
8385
8782
  buttonAction = "cancel";
@@ -8390,13 +8787,13 @@
8390
8787
  break;
8391
8788
  case "never":
8392
8789
  action = function action() {
8393
- var _window$Apxor4, _window$Apxor5;
8790
+ var _window$Apxor6, _window$Apxor7;
8394
8791
  buttonAction = "never";
8395
8792
  logBtnClickEvent();
8396
8793
  ApxorWalkthroughTour.complete();
8397
8794
  window.Apxor.logActionEvent("never_show_clicked", configId, configName);
8398
- (_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 || _window$Apxor4.neverShow(configId, configName, "WEB_INLINE");
8399
- (_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 || _window$Apxor5.updateFlag(false);
8795
+ (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 || _window$Apxor6.neverShow(configId, configName, "WEB_INLINE");
8796
+ (_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 || _window$Apxor7.updateFlag(false);
8400
8797
  };
8401
8798
  break;
8402
8799
  default:
@@ -8639,8 +9036,8 @@
8639
9036
  // when btn is click, loggging event based on button action
8640
9037
  if (buttonAction !== "redirect" || buttonAction !== "never" || buttonAction !== "cancel") {
8641
9038
  if (additional_info.version && additional_info.version === 4) {
8642
- var _window$Apxor6, _additional_info$apx_2, _additional_info$apx_3;
8643
- (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 || _window$Apxor6.logAppEvent("apx_nudge_dismissed", {
9039
+ var _window$Apxor8, _additional_info$apx_2, _additional_info$apx_3;
9040
+ (_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 || _window$Apxor8.logAppEvent("apx_nudge_dismissed", {
8644
9041
  apx_nudge_id: configId,
8645
9042
  apx_nudge_name: configName,
8646
9043
  apx_step: (_additional_info$apx_2 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_2 !== void 0 ? _additional_info$apx_2 : 1,
@@ -8655,8 +9052,8 @@
8655
9052
  // logging nudge_terminated event when button action is never show
8656
9053
  if (buttonAction === "never") {
8657
9054
  if (additional_info.version && additional_info.version === 4) {
8658
- var _window$Apxor7, _additional_info$apx_4, _additional_info$apx_5;
8659
- (_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 || _window$Apxor7.logAppEvent("apx_nudge_terminated", {
9055
+ var _window$Apxor9, _additional_info$apx_4, _additional_info$apx_5;
9056
+ (_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 || _window$Apxor9.logAppEvent("apx_nudge_terminated", {
8660
9057
  apx_nudge_id: configId,
8661
9058
  apx_nudge_name: configName,
8662
9059
  apx_step: (_additional_info$apx_4 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_4 !== void 0 ? _additional_info$apx_4 : 1,
@@ -8670,8 +9067,8 @@
8670
9067
  } else {
8671
9068
  // when btn is not clicked, logging dismiss event
8672
9069
  if (additional_info.version && additional_info.version === 4) {
8673
- var _window$Apxor8, _additional_info$apx_6, _additional_info$apx_7;
8674
- (_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 || _window$Apxor8.logAppEvent("apx_nudge_dismissed", {
9070
+ var _window$Apxor10, _additional_info$apx_6, _additional_info$apx_7;
9071
+ (_window$Apxor10 = window.Apxor) === null || _window$Apxor10 === void 0 || _window$Apxor10.logAppEvent("apx_nudge_dismissed", {
8675
9072
  apx_nudge_id: configId,
8676
9073
  apx_nudge_name: configName,
8677
9074
  apx_step: (_additional_info$apx_6 = additional_info === null || additional_info === void 0 ? void 0 : additional_info.apx_step) !== null && _additional_info$apx_6 !== void 0 ? _additional_info$apx_6 : 1,
@@ -12296,14 +12693,14 @@
12296
12693
  _config$wait_interval,
12297
12694
  _config$termination;
12298
12695
  _classCallCheck(this, TemplateContent);
12299
- _defineProperty(this, "PyAT", function () {
12696
+ _defineProperty(this, "FeIN", function () {
12300
12697
  return new Promise(function (resolve, reject) {
12301
12698
  try {
12302
- var element = _this.CZfr(_this.layout);
12699
+ var element = _this.gVOg(_this.layout);
12303
12700
  var styleElement = document.createElement("style");
12304
12701
  styleElement.innerHTML = _this.styleContent;
12305
12702
  document.head.appendChild(styleElement);
12306
- _this.AVsY();
12703
+ _this.evpt();
12307
12704
  try {
12308
12705
  eval(_this.script);
12309
12706
  } catch (e) {
@@ -12314,15 +12711,15 @@
12314
12711
  }
12315
12712
  _this.imageElements.forEach(function (img) {
12316
12713
  img.addEventListener("error", function () {
12317
- _this.mIrr("provided image doesn't exists");
12714
+ _this.sKmG("provided image doesn't exists");
12318
12715
  });
12319
12716
  });
12320
12717
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
12321
12718
  _this.wait_interval -= 1;
12322
12719
  if (_this.wait_interval <= 0) {
12323
- _this.mIrr("provided media doesn't exists");
12720
+ _this.sKmG("provided media doesn't exists");
12324
12721
  } else {
12325
- if (_this.qNbo() && _this.BcAJ() && _this.SeJW()) {
12722
+ if (_this.Evhr() && _this.xGNr() && _this.FFyA()) {
12326
12723
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
12327
12724
  resolve(element);
12328
12725
  }
@@ -12336,7 +12733,7 @@
12336
12733
  }
12337
12734
  });
12338
12735
  });
12339
- _defineProperty(this, "mIrr", function (reason) {
12736
+ _defineProperty(this, "sKmG", function (reason) {
12340
12737
  var _window$ApxorRTM, _window$Apxor, _this$config, _this$config2, _window$Apxor2, _this$config3, _this$config4, _this$config5, _this$config6, _window3;
12341
12738
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
12342
12739
  apx_nudge_name: _this.name,
@@ -12352,13 +12749,13 @@
12352
12749
  _this.closeCallBack("cancel");
12353
12750
  (_window3 = window) === null || _window3 === void 0 || (_window3 = _window3.ApxorInternals) === null || _window3 === void 0 || _window3.removeBuilderTemplate(_this.configId);
12354
12751
  });
12355
- _defineProperty(this, "AVsY", function () {
12752
+ _defineProperty(this, "evpt", function () {
12356
12753
  var BuilderTemplatesStyles = document.createElement("style");
12357
12754
  BuilderTemplatesStyles.innerHTML = _this.initialStyles;
12358
12755
  BuilderTemplatesStyles.setAttribute("apx-builder-template-styles", "");
12359
12756
  document.head.appendChild(BuilderTemplatesStyles);
12360
12757
  });
12361
- _defineProperty(this, "CZfr", function (config) {
12758
+ _defineProperty(this, "gVOg", function (config) {
12362
12759
  var _window$Apxor3;
12363
12760
  var element;
12364
12761
  switch (config.type) {
@@ -12444,7 +12841,7 @@
12444
12841
  if (config.type === "cta_button" || config.type === "button") {
12445
12842
  reason = "cta-clicked";
12446
12843
  }
12447
- _this.GAvR(e, "redirect", reason);
12844
+ _this.mrrw(e, "redirect", reason);
12448
12845
  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) {
12449
12846
  var _window4, _this$config8;
12450
12847
  (_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);
@@ -12452,22 +12849,127 @@
12452
12849
  };
12453
12850
  break;
12454
12851
  case "cancel":
12455
- element.onclick = function (e) {
12456
- e.stopPropagation();
12457
- var reason = "";
12458
- if (config.type === "cross_button") {
12459
- reason = "cross-clicked";
12460
- } else if (config.type === "cta_button" || config.type === "button") {
12461
- reason = "cta-clicked";
12462
- }
12463
- _this.GAvR(e, "cancel", reason);
12464
- // window.Apxor.logActionEvent(
12465
- // "walk_through_cancelled",
12466
- // this.configId,
12467
- // this.name
12468
- // );
12469
- };
12470
-
12852
+ case "user_props":
12853
+ case "session_props":
12854
+ case "event":
12855
+ case "copy_clipboard":
12856
+ element.onclick = /*#__PURE__*/function () {
12857
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
12858
+ var reason, _iterator, _step, _loop;
12859
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
12860
+ while (1) switch (_context2.prev = _context2.next) {
12861
+ case 0:
12862
+ e.stopPropagation();
12863
+ reason = "";
12864
+ if (config.type === "cross_button") {
12865
+ reason = "cross-clicked";
12866
+ } else if (config.type === "cta_button" || config.type === "button") {
12867
+ reason = "cta-clicked";
12868
+ }
12869
+ if (!(action.type == "user_props")) {
12870
+ _context2.next = 7;
12871
+ break;
12872
+ }
12873
+ action.user_props.forEach(function (props) {
12874
+ var _window$Apxor4;
12875
+ return (_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.setUserProperties(props);
12876
+ });
12877
+ _context2.next = 41;
12878
+ break;
12879
+ case 7:
12880
+ if (!(action.type == "session_props")) {
12881
+ _context2.next = 11;
12882
+ break;
12883
+ }
12884
+ action.session_props.forEach(function (props) {
12885
+ var _window$Apxor5;
12886
+ return (_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.setSessionProperties(props);
12887
+ });
12888
+ _context2.next = 41;
12889
+ break;
12890
+ case 11:
12891
+ if (!(action.type == "event")) {
12892
+ _context2.next = 30;
12893
+ break;
12894
+ }
12895
+ _iterator = _createForOfIteratorHelper(action.events);
12896
+ _context2.prev = 13;
12897
+ _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
12898
+ var _window$ApxorRTM2;
12899
+ var event, props;
12900
+ return _regeneratorRuntime().wrap(function _loop$(_context) {
12901
+ while (1) switch (_context.prev = _context.next) {
12902
+ case 0:
12903
+ event = _step.value;
12904
+ props = {};
12905
+ event.properties.forEach(function (item) {
12906
+ props = _objectSpread2(_objectSpread2({}, props), item);
12907
+ });
12908
+ (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent(event.event_name, props);
12909
+ case 4:
12910
+ case "end":
12911
+ return _context.stop();
12912
+ }
12913
+ }, _loop);
12914
+ });
12915
+ _iterator.s();
12916
+ case 16:
12917
+ if ((_step = _iterator.n()).done) {
12918
+ _context2.next = 20;
12919
+ break;
12920
+ }
12921
+ return _context2.delegateYield(_loop(), "t0", 18);
12922
+ case 18:
12923
+ _context2.next = 16;
12924
+ break;
12925
+ case 20:
12926
+ _context2.next = 25;
12927
+ break;
12928
+ case 22:
12929
+ _context2.prev = 22;
12930
+ _context2.t1 = _context2["catch"](13);
12931
+ _iterator.e(_context2.t1);
12932
+ case 25:
12933
+ _context2.prev = 25;
12934
+ _iterator.f();
12935
+ return _context2.finish(25);
12936
+ case 28:
12937
+ _context2.next = 41;
12938
+ break;
12939
+ case 30:
12940
+ if (!(action.type == "copy_clipboard")) {
12941
+ _context2.next = 41;
12942
+ break;
12943
+ }
12944
+ _context2.prev = 31;
12945
+ _context2.next = 34;
12946
+ return navigator.clipboard.writeText(action.copy_content);
12947
+ case 34:
12948
+ window.Apxor.showInfoToast("Text-Copied:".concat(action.copy_content));
12949
+ _context2.next = 41;
12950
+ break;
12951
+ case 37:
12952
+ _context2.prev = 37;
12953
+ _context2.t2 = _context2["catch"](31);
12954
+ console.error("Failed to copy:", _context2.t2);
12955
+ window.Apxor.showInfoToast("Failed to copy text");
12956
+ case 41:
12957
+ _this.mrrw(e, action.type, reason);
12958
+ // window.Apxor.logActionEvent(
12959
+ // "walk_through_cancelled",
12960
+ // this.configId,
12961
+ // this.name
12962
+ // );
12963
+ case 42:
12964
+ case "end":
12965
+ return _context2.stop();
12966
+ }
12967
+ }, _callee, null, [[13, 22, 25, 28], [31, 37]]);
12968
+ }));
12969
+ return function (_x) {
12970
+ return _ref.apply(this, arguments);
12971
+ };
12972
+ }();
12471
12973
  break;
12472
12974
  case "dismiss":
12473
12975
  element.onclick = function (e) {
@@ -12479,7 +12981,7 @@
12479
12981
  } else if (config.type === "cta_button" || config.type === "button") {
12480
12982
  reason = "cta-clicked";
12481
12983
  }
12482
- _this.GAvR(e, "dismiss", reason);
12984
+ _this.mrrw(e, "dismiss", reason);
12483
12985
  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) {
12484
12986
  var _window5, _this$config10;
12485
12987
  (_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);
@@ -12490,7 +12992,7 @@
12490
12992
  element.onclick = function (e) {
12491
12993
  e.stopPropagation();
12492
12994
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
12493
- _this.GAvR(e, "never");
12995
+ _this.mrrw(e, "never");
12494
12996
  };
12495
12997
  break;
12496
12998
  case "toggle-class":
@@ -12506,16 +13008,18 @@
12506
13008
  };
12507
13009
  break;
12508
13010
  case "copy-content":
13011
+ case "copy":
12509
13012
  element.onclick = function (e) {
12510
13013
  e.stopPropagation();
12511
- var textToCopy = action === null || action === void 0 ? void 0 : action.content;
13014
+ var textToCopy = "";
13015
+ if (action.type == "copy_content") textToCopy = action === null || action === void 0 ? void 0 : action.content;else if (action.type == "copy") textToCopy = action === null || action === void 0 ? void 0 : action.copy_content;
12512
13016
  var tempInput = document.createElement("input");
12513
13017
  tempInput.value = textToCopy;
12514
13018
  document.body.appendChild(tempInput);
12515
13019
  tempInput.select();
12516
13020
  document.execCommand("copy");
12517
13021
  document.body.removeChild(tempInput);
12518
- _this.GAvR(e, "copy-content", "cta-clicked");
13022
+ _this.mrrw(e, "copy-content", "cta-clicked");
12519
13023
  setTimeout(function () {
12520
13024
  window.Apxor.showInfoToast("Text-Copied:".concat(textToCopy));
12521
13025
  }, 500);
@@ -12537,7 +13041,7 @@
12537
13041
  }
12538
13042
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
12539
13043
  config.absolute_position_children.forEach(function (childConfig) {
12540
- var childElement = _this.CZfr(childConfig);
13044
+ var childElement = _this.gVOg(childConfig);
12541
13045
  element.appendChild(childElement);
12542
13046
  });
12543
13047
  }
@@ -12545,7 +13049,7 @@
12545
13049
  // Process children
12546
13050
  if (config.children && config.children.length > 0) {
12547
13051
  config.children.forEach(function (childConfig) {
12548
- var childElement = _this.CZfr(childConfig);
13052
+ var childElement = _this.gVOg(childConfig);
12549
13053
  element.appendChild(childElement);
12550
13054
  });
12551
13055
  }
@@ -12572,28 +13076,28 @@
12572
13076
  }
12573
13077
  return element;
12574
13078
  });
12575
- _defineProperty(this, "GAvR", function (e, action) {
12576
- var _window$Apxor4, _this$config11, _this$config12, _window$Apxor5, _this$config13, _this$config14, _this$config15, _this$config16;
13079
+ _defineProperty(this, "mrrw", function (e, action) {
13080
+ var _window$Apxor6, _this$config11, _this$config12, _window$Apxor7, _this$config13, _this$config14, _this$config15, _this$config16;
12577
13081
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
12578
13082
  var additional_info = {
12579
13083
  apx_nudge_name: _this.name,
12580
- 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,
13084
+ apx_nudge_id: ((_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.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,
12581
13085
  apx_template_name: _this.type,
12582
13086
  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,
12583
- 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
13087
+ apx_step: ((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.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
12584
13088
  };
12585
13089
  if (e.target.tagName === "BUTTON") {
12586
- var _window$ApxorRTM2;
13090
+ var _window$ApxorRTM3;
12587
13091
  if (action != "never") {
12588
13092
  var _e$target$innerHTML, _e$target;
12589
13093
  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 : "";
12590
13094
  }
12591
- (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_nudge_CTA_clicked", additional_info);
13095
+ (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_CTA_clicked", additional_info);
12592
13096
  }
12593
13097
  if (action == "never") {
12594
- var _window$ApxorRTM3;
13098
+ var _window$ApxorRTM4;
12595
13099
  additional_info["apx_termination_type"] = "never show cta clicked";
12596
- (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_terminated", additional_info);
13100
+ (_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_nudge_terminated", additional_info);
12597
13101
  }
12598
13102
  if (type != "") {
12599
13103
  _this.closeCallBack(action, type);
@@ -12601,7 +13105,7 @@
12601
13105
  _this.closeCallBack(action);
12602
13106
  }
12603
13107
  });
12604
- _defineProperty(this, "BcAJ", function () {
13108
+ _defineProperty(this, "xGNr", function () {
12605
13109
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
12606
13110
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
12607
13111
  if (_this.imageElements.length === 0) return true;
@@ -12609,13 +13113,13 @@
12609
13113
  return img.complete;
12610
13114
  });
12611
13115
  });
12612
- _defineProperty(this, "SeJW", function () {
13116
+ _defineProperty(this, "FFyA", function () {
12613
13117
  if (!_this.bgImageUrl) return true;
12614
13118
  var img = new Image();
12615
13119
  img.src = _this.bgImageUrl;
12616
13120
  return img.complete;
12617
13121
  });
12618
- _defineProperty(this, "qNbo", function () {
13122
+ _defineProperty(this, "Evhr", function () {
12619
13123
  if (_this.videoElements.length === 0) return true;
12620
13124
  return _this.videoElements.every(function (video) {
12621
13125
  return video.readyState >= 3;
@@ -13554,7 +14058,7 @@
13554
14058
  case 0:
13555
14059
  _context2.prev = 0;
13556
14060
  _context2.next = 3;
13557
- return this.templateContent.PyAT();
14061
+ return this.templateContent.FeIN();
13558
14062
  case 3:
13559
14063
  this.inLineContainer = _context2.sent;
13560
14064
  _context2.next = 9;
@@ -15131,7 +15635,7 @@
15131
15635
  * @description Creates the styles for Marketing message.
15132
15636
  * @returns {string} css styles
15133
15637
  */
15134
- _defineProperty(this, "Feqc", function () {
15638
+ _defineProperty(this, "sOBS", function () {
15135
15639
  if (!_this.enable_marketing) {
15136
15640
  return "";
15137
15641
  }
@@ -15150,7 +15654,7 @@
15150
15654
  * @private
15151
15655
  * @description Sets the marketing content at the end of the Inline
15152
15656
  */
15153
- _defineProperty(this, "Nlsc", function () {
15657
+ _defineProperty(this, "apkU", function () {
15154
15658
  if (_this.enable_marketing) {
15155
15659
  var marketingContainer = document.createElement("div");
15156
15660
  marketingContainer.classList.add("apx-inline-marketing".concat(_this.cssPostFix));
@@ -15764,7 +16268,7 @@
15764
16268
  if (apxor_tooltip_styles) {
15765
16269
  return;
15766
16270
  }
15767
- 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.Feqc(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
16271
+ 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.sOBS(), "\n ").concat(this._getTippyStyles(), "\n ").concat(this._getFooterStyles(), "\n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
15768
16272
  var styleNode = document.createElement("style");
15769
16273
  styleNode.setAttribute("apx-tooltip-styles", "");
15770
16274
  styleNode.innerHTML = styles;
@@ -16574,7 +17078,7 @@
16574
17078
  this._setCloseButton();
16575
17079
 
16576
17080
  //Set the Marketing content
16577
- this.Nlsc();
17081
+ this.apkU();
16578
17082
  }
16579
17083
 
16580
17084
  /**
@@ -19471,7 +19975,7 @@
19471
19975
  case 0:
19472
19976
  _context2.prev = 0;
19473
19977
  _context2.next = 3;
19474
- return this.templateContent.PyAT();
19978
+ return this.templateContent.FeIN();
19475
19979
  case 3:
19476
19980
  this.inAppContainer = _context2.sent;
19477
19981
  this.inAppContainer.style.zIndex = 99999;
@@ -19670,7 +20174,7 @@
19670
20174
  * @description Creates the styles for Marketing message.
19671
20175
  * @returns {string} css styles
19672
20176
  */
19673
- _defineProperty(this, "Feqc", function () {
20177
+ _defineProperty(this, "sOBS", function () {
19674
20178
  if (!_this.enable_marketing) {
19675
20179
  return "";
19676
20180
  }
@@ -19716,7 +20220,7 @@
19716
20220
  * @private
19717
20221
  * @description Get the response for Form content in the InApp modal.
19718
20222
  */
19719
- _defineProperty(this, "FiBJ", function (form_elements) {
20223
+ _defineProperty(this, "IeDy", function (form_elements) {
19720
20224
  var obj = {};
19721
20225
  var callback = "";
19722
20226
  form_elements.forEach(function (element) {
@@ -19756,7 +20260,7 @@
19756
20260
  * @private
19757
20261
  * @description Sets the marketing content at the end of the InApp
19758
20262
  */
19759
- _defineProperty(this, "Nlsc", function () {
20263
+ _defineProperty(this, "apkU", function () {
19760
20264
  if (_this.enable_marketing) {
19761
20265
  var marketingContainer = document.createElement("div");
19762
20266
  marketingContainer.classList.add("apx-inapp-marketing".concat(_this.cssPostFix));
@@ -20016,7 +20520,7 @@
20016
20520
  }, {
20017
20521
  key: "_setStyles",
20018
20522
  value: function _setStyles() {
20019
- 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.Feqc(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
20523
+ 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.sOBS(), " \n ").concat(this._getProgressBarStyles(), "\n ").concat(this._getBootstrapiconsStyles(), " \n ").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
20020
20524
  var styleNode = document.createElement("style");
20021
20525
  styleNode.setAttribute("id", "apxor-style-" + this.configId);
20022
20526
  styleNode.innerHTML = styles;
@@ -20510,7 +21014,7 @@
20510
21014
  this._setCloseButton();
20511
21015
 
20512
21016
  //Set the Marketing content
20513
- this.Nlsc();
21017
+ this.apkU();
20514
21018
  }
20515
21019
 
20516
21020
  /**
@@ -20782,7 +21286,7 @@
20782
21286
  var form = document.querySelector(".apx-inapp-form-container".concat(this.cssPostFix));
20783
21287
  form.addEventListener("submit", function (e) {
20784
21288
  e.preventDefault();
20785
- var _this8$generateRespon = _this8.FiBJ(_this8.form.elements),
21289
+ var _this8$generateRespon = _this8.IeDy(_this8.form.elements),
20786
21290
  obj = _this8$generateRespon.obj,
20787
21291
  callback = _this8$generateRespon.callback;
20788
21292
  var evalString = "(obj)=>" + callback + "(obj)";
@@ -20965,7 +21469,7 @@
20965
21469
  closeButton.classList.add("apx-inapp-close".concat(this.cssPostFix));
20966
21470
  closeButton.addEventListener("click", function () {
20967
21471
  if (_this10.close_button.action === "dismiss") {
20968
- window.Apxor.logActionEvent(EVENT_PREFIX.INAPP + "InAppXIconClicked" + "_Clicked", _this10.configId, _this10.name);
21472
+ window.Apxor.logActionEvent("InAppXIconClicked", _this10.configId, _this10.name);
20969
21473
  } else if (_this10.close_button.action === "cancel") {
20970
21474
  window.Apxor.logActionEvent("walk_through_cancelled", _this10.configId, _this10.name);
20971
21475
  }
@@ -21142,7 +21646,7 @@
21142
21646
  };
21143
21647
  } else {
21144
21648
  // As the video player is hidden by default, unhide if the mode is not PIP.
21145
- _this.fEjA();
21649
+ _this.OKdJ();
21146
21650
  }
21147
21651
  _this.showCallback();
21148
21652
  } catch (e) {
@@ -21163,7 +21667,7 @@
21163
21667
  * For portrait - width is set to 50% of the screen and height is auto adjusted based on resolution.
21164
21668
  * For landscape - height is set to 50% of the screen and width is auto adjusted based on resolution.
21165
21669
  */
21166
- _defineProperty(this, "BzkK", function () {
21670
+ _defineProperty(this, "czRO", function () {
21167
21671
  var _getHeightWidthFromRe = getHeightWidthFromResolution(_this.video, 1),
21168
21672
  width = _getHeightWidthFromRe.width,
21169
21673
  height = _getHeightWidthFromRe.height;
@@ -21175,7 +21679,7 @@
21175
21679
  * @private
21176
21680
  * @description Removes the video player style element.
21177
21681
  */
21178
- _defineProperty(this, "DEWK", function () {
21682
+ _defineProperty(this, "ajoq", function () {
21179
21683
  var playerStyles = document.getElementById("apx-mpl-styles");
21180
21684
  if (playerStyles) {
21181
21685
  playerStyles.remove();
@@ -21186,7 +21690,7 @@
21186
21690
  * @private
21187
21691
  * @description Attach listeners on the video controls
21188
21692
  */
21189
- _defineProperty(this, "LyPc", function () {
21693
+ _defineProperty(this, "guqQ", function () {
21190
21694
  // Listener for the video end. Display the CTA's when the video ends.
21191
21695
  _this.videoElement.addEventListener("ended", function () {
21192
21696
  var ctaButtons = document.getElementById("apx-cta-btn");
@@ -21289,7 +21793,7 @@
21289
21793
  * @private
21290
21794
  * @description Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21291
21795
  */
21292
- _defineProperty(this, "KpqY", function () {
21796
+ _defineProperty(this, "arNC", function () {
21293
21797
  var _this$terminationConf;
21294
21798
  if (_this.mode === "PIP" && !((_this$terminationConf = _this.terminationConfig) !== null && _this$terminationConf !== void 0 && _this$terminationConf.auto_dismiss)) {
21295
21799
  // On Exit of the PIP,
@@ -21329,7 +21833,7 @@
21329
21833
  * @private Sets the custom controls on the video player.
21330
21834
  * PIP and close are the custom controls that are created and positions on the video.
21331
21835
  */
21332
- _defineProperty(this, "mkBf", function () {
21836
+ _defineProperty(this, "FuEG", function () {
21333
21837
  _this.enable_close_button;
21334
21838
  if (_this.enable_close_button) {
21335
21839
  var closeButton = document.createElement("span");
@@ -21376,21 +21880,21 @@
21376
21880
  * @function hideVideoPlayer
21377
21881
  * @description Sets the visibility of the video player to hidden.
21378
21882
  */
21379
- _defineProperty(this, "UaAZ", function () {
21883
+ _defineProperty(this, "BzBz", function () {
21380
21884
  _this.videoPlayer.classList.add("apx-video-hide-elmt".concat(_this.cssPostFix));
21381
21885
  });
21382
21886
  /**
21383
21887
  * @function unhideVideoPlayer
21384
21888
  * @description Unhides video player.
21385
21889
  */
21386
- _defineProperty(this, "fEjA", function () {
21890
+ _defineProperty(this, "OKdJ", function () {
21387
21891
  _this.videoPlayer.classList.remove("apx-video-hide-elmt".concat(_this.cssPostFix));
21388
21892
  });
21389
21893
  /**
21390
21894
  * @function getVideoElement
21391
21895
  * @returns {HTMLElement} Video ekement
21392
21896
  */
21393
- _defineProperty(this, "IQDs", function () {
21897
+ _defineProperty(this, "NEDi", function () {
21394
21898
  return _this.videoElement;
21395
21899
  });
21396
21900
  this.videoPlayer = null;
@@ -21445,7 +21949,7 @@
21445
21949
  this.videoPlayer.style.backgroundColor = this.bg_color;
21446
21950
 
21447
21951
  // Video has a resolution, not deviating from the resolution set the height and width.
21448
- this.BzkK();
21952
+ this.czRO();
21449
21953
  //Generate the styles and add them to the document head.
21450
21954
  this._setVideoPlayerStyles();
21451
21955
  //Set the position of the video player with in the 5 possible positions.
@@ -21453,16 +21957,16 @@
21453
21957
  //Create a video element,set the source and add to the container.
21454
21958
  this._setPlayerContent();
21455
21959
  //Set the listeners on the video control buttons.
21456
- this.LyPc();
21960
+ this.guqQ();
21457
21961
  //Attach listeners for the PIP toggle. i.e. for the PIP enter and PIP exit
21458
- this.KpqY();
21962
+ this.arNC();
21459
21963
  //Set the custom close and PIP controls. Not using the defaults from the html video element.
21460
21964
  //Reason - We want to position them at the top right and left positions.
21461
- this.mkBf();
21965
+ this.FuEG();
21462
21966
  //Generate and postion the CTA buttons on the video. By default hidden, visible only when video is completed
21463
21967
  this._setButtons(BUTTON_CONTAINER_POSITION.CENTER);
21464
21968
  //Hide the video player. Display it based on the video mode. Videoplayer for "video" mode and a direct PIP for "PIP" mode.
21465
- this.UaAZ();
21969
+ this.BzBz();
21466
21970
  //If the auto dismiss is enabled, sets the timeout to call the InApp close.
21467
21971
  this._setAutoTerminate();
21468
21972
  document.body.appendChild(this.videoPlayer);
@@ -21577,7 +22081,7 @@
21577
22081
  }
21578
22082
  }
21579
22083
  this.videoPlayer.remove();
21580
- this.DEWK();
22084
+ this.ajoq();
21581
22085
  if (closeButtonName !== "auto_dismiss") {
21582
22086
  var _window$ApxorRTM8;
21583
22087
  (_window$ApxorRTM8 = window.ApxorRTM) === null || _window$ApxorRTM8 === void 0 || _window$ApxorRTM8.logEvent("apx_video_inapp_close_button_clicked", {
@@ -21647,7 +22151,7 @@
21647
22151
  replayCount: _this3.replayCount
21648
22152
  });
21649
22153
  _this3.videoPlayer.remove();
21650
- _this3.DEWK();
22154
+ _this3.ajoq();
21651
22155
  _this3.hideCallback();
21652
22156
  } catch (e) {
21653
22157
  console.log("Can't close the video player\n".concat(e));
@@ -21735,31 +22239,58 @@
21735
22239
  var EmbedCards = /*#__PURE__*/_createClass(function EmbedCards(_config, configId, name, showCallback, closeCallback) {
21736
22240
  var _this = this,
21737
22241
  _config$wait_interval,
21738
- _config$termination;
22242
+ _config$termination,
22243
+ _config$single_line,
22244
+ _config$slide_duratio,
22245
+ _config$auto_scroll,
22246
+ _config$carousel;
21739
22247
  _classCallCheck(this, EmbedCards);
21740
22248
  _defineProperty(this, "showEmbedCards", function () {
21741
22249
  try {
21742
- var _window;
22250
+ var _window, _parseCSS$background, _parseCSS;
21743
22251
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.debug("called showEmbedCards");
21744
- var element = _this.IPHJ(_this.layout);
21745
- _this.dYwu();
22252
+ var element = _this.VIpq(_this.layout);
22253
+ _this.Klaz();
22254
+ var bg_cpp = (_parseCSS$background = (_parseCSS = parseCSS(_this.layout.css)) === null || _parseCSS === void 0 ? void 0 : _parseCSS["background-color"]) !== null && _parseCSS$background !== void 0 ? _parseCSS$background : "transparent";
22255
+ document.body.style.backgroundColor = bg_cpp;
22256
+ document.body.style.minWidth = "100%";
21746
22257
  window.onresize = function () {
21747
- _this.FLOH();
22258
+ _this.HObN();
21748
22259
  };
21749
22260
  _this.imageElements.forEach(function (img) {
21750
22261
  img.addEventListener("error", function () {
21751
- _this.mIrr("provided image doesn't exists");
22262
+ _this.sKmG("provided image doesn't exists");
21752
22263
  });
21753
22264
  });
21754
22265
  var rootContainer = document.createElement("div");
21755
- rootContainer.style.display = "flex";
21756
- rootContainer.style.justifyContent = "center";
21757
- rootContainer.appendChild(element);
21758
- document.body.appendChild(rootContainer);
22266
+ rootContainer.id = "apx-root-container";
22267
+ rootContainer.style.minWidth = "100%";
22268
+ if (_this.singleLine) {
22269
+ // Force the layout element to act as a slider
22270
+ _this.QFqb(element);
22271
+
22272
+ // Stack elements vertically (Images on top, Dots on bottom)
22273
+ rootContainer.style.display = "flex";
22274
+ rootContainer.style.flexDirection = "column";
22275
+ rootContainer.style.alignItems = "center";
22276
+ // rootContainer.style.maxHeight = "225px"; // Max height for the slider, can be adjusted based on design
22277
+
22278
+ rootContainer.appendChild(element);
22279
+ document.body.appendChild(rootContainer);
22280
+
22281
+ // Start the infinite 2-second slide and create dots
22282
+ _this.MHyN(element, rootContainer);
22283
+ } else {
22284
+ // Fallback to original layout behavior
22285
+ rootContainer.style.display = "flex";
22286
+ rootContainer.style.justifyContent = "center";
22287
+ rootContainer.appendChild(element);
22288
+ document.body.appendChild(rootContainer);
22289
+ }
21759
22290
  var styleElement = document.createElement("style");
21760
22291
  styleElement.innerHTML = _this.styleContent;
21761
22292
  document.head.appendChild(styleElement);
21762
- _this.Mfpa(_this.termination);
22293
+ _this.ZPVc(_this.termination);
21763
22294
  try {
21764
22295
  eval(_this.script);
21765
22296
  } catch (e) {
@@ -21770,10 +22301,10 @@
21770
22301
  _this.intervalToCheckMediaLoadingStatus = setInterval(function () {
21771
22302
  _this.wait_interval -= 1;
21772
22303
  if (_this.wait_interval <= 0) {
21773
- _this.mIrr("provided media doesn't exists");
22304
+ _this.sKmG("provided media doesn't exists");
21774
22305
  } else {
21775
- if (_this.qNbo() && _this.BcAJ() && _this.SeJW()) {
21776
- _this.FLOH();
22306
+ if (_this.Evhr() && _this.xGNr() && _this.FFyA()) {
22307
+ _this.HObN();
21777
22308
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
21778
22309
  }
21779
22310
  }
@@ -21784,7 +22315,53 @@
21784
22315
  (_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));
21785
22316
  }
21786
22317
  });
21787
- _defineProperty(this, "mIrr", function (reason) {
22318
+ // Applies CSS to force children into a single horizontal row for sliding
22319
+ _defineProperty(this, "QFqb", function (container) {
22320
+ container.style.display = "flex";
22321
+ container.style.flexDirection = "row";
22322
+ container.style.overflowX = "auto";
22323
+ container.style.overflowY = "hidden";
22324
+ container.style.scrollSnapType = "x mandatory";
22325
+ container.style.scrollBehavior = "smooth";
22326
+ container.style.width = "100%";
22327
+ container.style.flexWrap = "nowrap";
22328
+ container.style.scrollbarWidth = "none";
22329
+ container.style.msOverflowStyle = "none";
22330
+ container.style.webkitOverflowScrolling = "touch"; // Smooth momentum on iOS
22331
+ container.style.userSelect = "none";
22332
+ container.style.webkitUserSelect = "none";
22333
+ container.style.touchAction = "pan-x";
22334
+ container.style.overScrollBehaviorX = "contain"; // Prevent scroll chaining on mobile
22335
+ // container.style.maxHeight = "193px"; // Adjust based on design, ensures consistent height for the slider
22336
+
22337
+ // Hide scrollbar style injection
22338
+ var styleId = "apx-slider-scrollbar-hide";
22339
+ if (!document.getElementById(styleId)) {
22340
+ var style = document.createElement("style");
22341
+ style.id = styleId;
22342
+ style.innerHTML = "\n #".concat(container.id || "apx-root-container > div", "::-webkit-scrollbar { display: none; }\n /* Prevent images and links from being 'draggable' ghosts */\n #").concat(container.id || "apx-root-container > div", " img, \n #").concat(container.id || "apx-root-container > div", " a { \n -webkit-user-drag: none; \n user-drag: none;\n touch-action: pan-x !important;\n }\n ");
22343
+ document.head.appendChild(style);
22344
+ }
22345
+ if (container.children) {
22346
+ Array.from(container.children).forEach(function (child) {
22347
+ child.style.flexShrink = "0";
22348
+ child.style.boxSizing = "border-box";
22349
+ child.style.scrollSnapAlign = "center";
22350
+ child.style.scrollSnapStop = "always";
22351
+ // child.style.maxHeight = "169px"; // Adjust based on design, ensures consistent height for cards within the slider
22352
+ child.style.touchAction = "pan-x";
22353
+ child.style.overflowY = "hidden";
22354
+
22355
+ // Fix for Buttons and Text
22356
+ var interactiveElements = child.querySelectorAll("button, a, p, span, div");
22357
+ interactiveElements.forEach(function (el) {
22358
+ el.style.webkitUserDrag = "none";
22359
+ el.style.touchAction = "pan-x";
22360
+ });
22361
+ });
22362
+ }
22363
+ });
22364
+ _defineProperty(this, "sKmG", function (reason) {
21788
22365
  var _window$ApxorRTM, _window4;
21789
22366
  !_this.loggedNudgeNotShownEvent && ((_window$ApxorRTM = window.ApxorRTM) === null || _window$ApxorRTM === void 0 ? void 0 : _window$ApxorRTM.logEvent("apx_nudge_not_shown", {
21790
22367
  apx_nudge_name: _this.name,
@@ -21796,15 +22373,138 @@
21796
22373
  _this.loggedNudgeNotShownEvent = true;
21797
22374
  window.onresize = null;
21798
22375
  clearInterval(_this.intervalToCheckMediaLoadingStatus);
22376
+ clearInterval(_this.slideInterval); // Stop carousel on exit
21799
22377
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.ApxorWidget) === null || _window4 === void 0 || _window4.removeEmbedCard(_this.configId);
21800
22378
  });
21801
- _defineProperty(this, "dYwu", function () {
22379
+ // Creates pagination dots under the images and handles the infinite loop
22380
+ _defineProperty(this, "MHyN", function (container, rootContainer) {
22381
+ var _this$carousel, _this$carousel2, _this$carousel3, _this$carousel4, _this$carousel9;
22382
+ var childrenCount = container.children.length;
22383
+ if (childrenCount <= 1) return;
22384
+
22385
+ // Setup Dots
22386
+ var dotsWrapper = document.createElement("div");
22387
+ dotsWrapper.style.display = "flex";
22388
+ dotsWrapper.style.justifyContent = "center";
22389
+ dotsWrapper.style.padding = "12px 0";
22390
+ dotsWrapper.style.width = "100%";
22391
+ dotsWrapper.style.gap = (_this$carousel = _this.carousel) !== null && _this$carousel !== void 0 && _this$carousel.dots ? ((_this$carousel2 = _this.carousel) === null || _this$carousel2 === void 0 || (_this$carousel2 = _this$carousel2.dots_carousel) === null || _this$carousel2 === void 0 ? void 0 : _this$carousel2.gap) + "px" : ((_this$carousel3 = _this.carousel) === null || _this$carousel3 === void 0 || (_this$carousel3 = _this$carousel3.lines_carousel) === null || _this$carousel3 === void 0 ? void 0 : _this$carousel3.gap) + "px";
22392
+ var dots = [];
22393
+ if ((_this$carousel4 = _this.carousel) !== null && _this$carousel4 !== void 0 && _this$carousel4.lines) for (var i = 0; i < childrenCount; i++) {
22394
+ var _this$carousel5, _this$carousel$lines_, _this$carousel6, _this$carousel7, _this$carousel8;
22395
+ var dot = document.createElement("div");
22396
+ dot.style.width = ((_this$carousel5 = _this.carousel) === null || _this$carousel5 === void 0 ? void 0 : _this$carousel5.lines_carousel.iwidth) + "px";
22397
+ dot.style.height = ((_this$carousel$lines_ = (_this$carousel6 = _this.carousel) === null || _this$carousel6 === void 0 ? void 0 : _this$carousel6.lines_carousel.height) !== null && _this$carousel$lines_ !== void 0 ? _this$carousel$lines_ : 8) + "px";
22398
+ dot.style.borderRadius = "4px";
22399
+ dot.style.backgroundColor = i === 0 ? (_this$carousel7 = _this.carousel) === null || _this$carousel7 === void 0 ? void 0 : _this$carousel7.lines_carousel.acolor : (_this$carousel8 = _this.carousel) === null || _this$carousel8 === void 0 ? void 0 : _this$carousel8.lines_carousel.icolor;
22400
+ dot.style.transition = "all 0.3s linear";
22401
+ dotsWrapper.appendChild(dot);
22402
+ dots.push(dot);
22403
+ } else if ((_this$carousel9 = _this.carousel) !== null && _this$carousel9 !== void 0 && _this$carousel9.dots) for (var _i = 0; _i < childrenCount; _i++) {
22404
+ var _this$carousel10, _this$carousel11, _this$carousel12, _this$carousel13;
22405
+ var _dot = document.createElement("div");
22406
+ _dot.style.width = ((_this$carousel10 = _this.carousel) === null || _this$carousel10 === void 0 ? void 0 : _this$carousel10.dots_carousel.width) + "px";
22407
+ _dot.style.height = ((_this$carousel11 = _this.carousel) === null || _this$carousel11 === void 0 ? void 0 : _this$carousel11.dots_carousel.height) + "px";
22408
+ _dot.style.borderRadius = "50%";
22409
+ _dot.style.backgroundColor = _i === 0 ? (_this$carousel12 = _this.carousel) === null || _this$carousel12 === void 0 ? void 0 : _this$carousel12.dots_carousel.acolor : (_this$carousel13 = _this.carousel) === null || _this$carousel13 === void 0 ? void 0 : _this$carousel13.dots_carousel.icolor;
22410
+ dotsWrapper.appendChild(_dot);
22411
+ dots.push(_dot);
22412
+ }
22413
+ rootContainer.appendChild(dotsWrapper);
22414
+ var currentIndex = 0;
22415
+ var isPaused = false;
22416
+
22417
+ // The Auto-Slide Timer
22418
+ var startTimer = function startTimer() {
22419
+ if (_this.autoScroll) _this.slideInterval = setInterval(function () {
22420
+ if (!isPaused) {
22421
+ // Calculate if we are at the end of the scroll
22422
+ var maxScroll = container.scrollWidth - container.offsetWidth;
22423
+ if (container.scrollLeft >= maxScroll - 5) {
22424
+ // If at the end, jump back to start
22425
+ currentIndex = 0;
22426
+ } else {
22427
+ currentIndex++;
22428
+ }
22429
+ _this.wmIq(container, currentIndex, dots);
22430
+ }
22431
+ }, _this.slideDuration);
22432
+ };
22433
+
22434
+ // Enhanced Touch Interaction
22435
+ container.addEventListener("touchstart", function () {
22436
+ isPaused = true;
22437
+ // Optional: clear any existing timeout to prevent overlap
22438
+ if (_this.resumeTimeout) clearTimeout(_this.resumeTimeout);
22439
+ }, {
22440
+ passive: true
22441
+ });
22442
+ container.addEventListener("touchend", function () {
22443
+ _this.resumeTimeout = setTimeout(function () {
22444
+ isPaused = false;
22445
+ }, 3000);
22446
+ }, {
22447
+ passive: true
22448
+ });
22449
+ var isScrolling;
22450
+ container.addEventListener("scroll", function () {
22451
+ window.clearTimeout(isScrolling);
22452
+ isScrolling = setTimeout(function () {
22453
+ var index = Math.round(container.scrollLeft / container.offsetWidth);
22454
+ if (currentIndex !== index) {
22455
+ currentIndex = index;
22456
+ _this.vdNV(dots, currentIndex);
22457
+ }
22458
+ }, 60);
22459
+ }, {
22460
+ passive: true
22461
+ });
22462
+ startTimer();
22463
+ });
22464
+ // Helper to handle the scrolling animation
22465
+ _defineProperty(this, "wmIq", function (container, index, dots) {
22466
+ var targetChild = container.children[index];
22467
+ if (targetChild) {
22468
+ // If index is 0, we explicitly scroll to the far left
22469
+ var scrollPos = index === 0 ? 0 : targetChild.offsetLeft;
22470
+ container.scrollTo({
22471
+ left: scrollPos,
22472
+ behavior: "smooth"
22473
+ });
22474
+ _this.vdNV(dots, index);
22475
+ }
22476
+ });
22477
+ _defineProperty(this, "vdNV", function (dots, currentIndex) {
22478
+ var _this$carousel14, _this$carousel16;
22479
+ if ((_this$carousel14 = _this.carousel) !== null && _this$carousel14 !== void 0 && _this$carousel14.lines) {
22480
+ var _this$carousel15;
22481
+ var config = (_this$carousel15 = _this.carousel) === null || _this$carousel15 === void 0 ? void 0 : _this$carousel15.lines_carousel;
22482
+ dots.forEach(function (d, idx) {
22483
+ var _config$height;
22484
+ var isActive = idx === currentIndex;
22485
+ d.style.backgroundColor = isActive ? config.acolor : config.icolor;
22486
+ d.style.width = isActive ? config.awidth + "px" : config.iwidth + "px";
22487
+ d.style.borderRadius = ((_config$height = config.height) !== null && _config$height !== void 0 ? _config$height : 8) / 2 + "px";
22488
+ });
22489
+ } else if ((_this$carousel16 = _this.carousel) !== null && _this$carousel16 !== void 0 && _this$carousel16.dots) {
22490
+ var _this$carousel17;
22491
+ var _config2 = (_this$carousel17 = _this.carousel) === null || _this$carousel17 === void 0 ? void 0 : _this$carousel17.dots_carousel;
22492
+ dots.forEach(function (d, idx) {
22493
+ var isActive = idx === currentIndex;
22494
+ d.style.backgroundColor = isActive ? _config2.acolor : _config2.icolor;
22495
+ d.style.width = _config2.width + "px";
22496
+ d.style.height = _config2.height + "px";
22497
+ d.style.borderRadius = "50%";
22498
+ });
22499
+ }
22500
+ });
22501
+ _defineProperty(this, "Klaz", function () {
21802
22502
  var EmbeddedCardsStyles = document.createElement("style");
21803
22503
  EmbeddedCardsStyles.innerHTML = _this.initialStyles;
21804
22504
  EmbeddedCardsStyles.setAttribute("apx-embedded-card-styles", "");
21805
22505
  document.head.appendChild(EmbeddedCardsStyles);
21806
22506
  });
21807
- _defineProperty(this, "IPHJ", function (config) {
22507
+ _defineProperty(this, "VIpq", function (config) {
21808
22508
  var _window$Apxor;
21809
22509
  var element;
21810
22510
  switch (config.type) {
@@ -21814,6 +22514,8 @@
21814
22514
  case "cta_button":
21815
22515
  case "button":
21816
22516
  element = document.createElement(EMBED_CARD_TYPE[config.type]);
22517
+ // if (config.type === "img" && this.singleLine)
22518
+ // element.style.maxHeight = "169px";
21817
22519
  break;
21818
22520
  case "video":
21819
22521
  element = document.createElement("video");
@@ -21830,6 +22532,11 @@
21830
22532
  element = document.createElement("div");
21831
22533
  element.innerHTML = CROSS_ICON_SVG;
21832
22534
  break;
22535
+ case "timer":
22536
+ //countdown timer case
22537
+ element = document.createElement("div");
22538
+ _this.XBmm(element, config.properties);
22539
+ break;
21833
22540
  default:
21834
22541
  element = document.createElement(config.type);
21835
22542
  }
@@ -21884,40 +22591,77 @@
21884
22591
  element.onclick = function (e) {
21885
22592
  e.stopPropagation();
21886
22593
  window.Apxor.redirect(JSON.stringify(action));
21887
- _this.GAvR(e);
22594
+ _this.mrrw(e);
21888
22595
  };
21889
22596
  break;
21890
22597
  case "show-video":
21891
22598
  element.onclick = function (e) {
21892
22599
  e.stopPropagation();
21893
22600
  window.Apxor.showVideoInApp(_this.configId, _this.name, action.url);
21894
- _this.GAvR(e);
22601
+ _this.mrrw(e);
21895
22602
  };
21896
22603
  break;
21897
22604
  case "cancel":
21898
22605
  element.onclick = function (e) {
21899
22606
  e.stopPropagation();
21900
- _this.GAvR(e);
22607
+ _this.mrrw(e);
21901
22608
  window.Apxor.logActionEvent("walk_through_cancelled", _this.configId, _this.name);
21902
22609
  };
21903
22610
  break;
21904
22611
  case "dismiss":
21905
22612
  element.onclick = function (e) {
21906
22613
  e.stopPropagation();
21907
- _this.GAvR(e);
22614
+ _this.mrrw(e);
22615
+ };
22616
+ break;
22617
+ case "user_props":
22618
+ element.onclick = function (e) {
22619
+ e.stopPropagation();
22620
+ action.user_props.forEach(function (props) {
22621
+ var _window$Apxor2;
22622
+ return (_window$Apxor2 = window.Apxor) === null || _window$Apxor2 === void 0 ? void 0 : _window$Apxor2.setUserProperties(props);
22623
+ });
22624
+ _this.mrrw(e);
22625
+ };
22626
+ break;
22627
+ case "session_props":
22628
+ element.onclick = function (e) {
22629
+ e.stopPropagation();
22630
+ action.session_props.forEach(function (props) {
22631
+ var _window$Apxor3;
22632
+ return (_window$Apxor3 = window.Apxor) === null || _window$Apxor3 === void 0 ? void 0 : _window$Apxor3.setSessionProperties(props);
22633
+ });
22634
+ _this.mrrw(e);
22635
+ };
22636
+ break;
22637
+ case "event":
22638
+ element.onclick = function (e) {
22639
+ e.stopPropagation();
22640
+ var _loop = function _loop() {
22641
+ var _window$ApxorRTM2;
22642
+ var props = {};
22643
+ action.events[i].properties.forEach(function (item) {
22644
+ props = _objectSpread2(_objectSpread2({}, props), item);
22645
+ });
22646
+ (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent(action.events[i].event_name, props);
22647
+ };
22648
+ for (var i = 0; i < action.events.length; i++) {
22649
+ _loop();
22650
+ }
22651
+ _this.mrrw(e);
21908
22652
  };
21909
22653
  break;
21910
22654
  case "never":
21911
22655
  element.onclick = function (e) {
21912
- var _window$ApxorRTM2;
22656
+ var _window$ApxorRTM3;
21913
22657
  e.stopPropagation();
21914
22658
  window.Apxor.neverShow(_this.configId, _this.name, "IN_APP");
21915
- (_window$ApxorRTM2 = window.ApxorRTM) === null || _window$ApxorRTM2 === void 0 || _window$ApxorRTM2.logEvent("apx_nudge_terminated", {
22659
+ (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_terminated", {
21916
22660
  apx_nudge_name: _this.name,
21917
22661
  apx_nudge_id: _this.configId,
21918
22662
  apx_termination_type: "never-show"
21919
22663
  });
21920
- _this.GAvR(e);
22664
+ _this.mrrw(e);
21921
22665
  };
21922
22666
  break;
21923
22667
  case "toggle-class":
@@ -21942,14 +22686,14 @@
21942
22686
  tempInput.select();
21943
22687
  document.execCommand("copy");
21944
22688
  document.body.removeChild(tempInput);
21945
- _this.GAvR(e);
22689
+ _this.mrrw(e);
21946
22690
  };
21947
22691
  break;
21948
22692
  case "log-app-event":
21949
22693
  element.onclick = function (e) {
21950
- var _window$ApxorRTM3;
22694
+ var _window$ApxorRTM4;
21951
22695
  e.stopPropagation();
21952
- (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent(action === null || action === void 0 ? void 0 : action.event_name);
22696
+ (_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent(action === null || action === void 0 ? void 0 : action.event_name);
21953
22697
  };
21954
22698
  break;
21955
22699
  case "log-client-event":
@@ -21957,12 +22701,13 @@
21957
22701
  e.stopPropagation();
21958
22702
  window.Apxor.logClientEvent(action === null || action === void 0 ? void 0 : action.event_name);
21959
22703
  };
22704
+ break;
21960
22705
  }
21961
22706
  });
21962
22707
  }
21963
22708
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
21964
22709
  config.absolute_position_children.forEach(function (childConfig) {
21965
- var childElement = _this.CZfr(childConfig);
22710
+ var childElement = _this.VIpq(childConfig);
21966
22711
  element.appendChild(childElement);
21967
22712
  });
21968
22713
  }
@@ -21970,7 +22715,7 @@
21970
22715
  // Process children
21971
22716
  if (config.children && config.children.length > 0) {
21972
22717
  config.children.forEach(function (childConfig) {
21973
- var childElement = _this.IPHJ(childConfig);
22718
+ var childElement = _this.VIpq(childConfig);
21974
22719
  element.appendChild(childElement);
21975
22720
  });
21976
22721
  }
@@ -21996,7 +22741,7 @@
21996
22741
  }
21997
22742
  return element;
21998
22743
  });
21999
- _defineProperty(this, "GAvR", function (e) {
22744
+ _defineProperty(this, "mrrw", function (e) {
22000
22745
  var _e$target$getAttribut, _e$target, _e$target$getAttribut2;
22001
22746
  var additional_info = {
22002
22747
  apx_nudge_name: _this.name,
@@ -22005,15 +22750,15 @@
22005
22750
  apx_template_name: "embed-card"
22006
22751
  };
22007
22752
  if (e.target.tagName === "BUTTON") {
22008
- var _e$target$innerHTML, _e$target2, _window$ApxorRTM4;
22753
+ var _e$target$innerHTML, _e$target2, _window$ApxorRTM5;
22009
22754
  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 : "";
22010
- (_window$ApxorRTM4 = window.ApxorRTM) === null || _window$ApxorRTM4 === void 0 || _window$ApxorRTM4.logEvent("apx_card_CTA_clicked", additional_info);
22755
+ (_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_card_CTA_clicked", additional_info);
22011
22756
  } else {
22012
- var _window$ApxorRTM5;
22013
- (_window$ApxorRTM5 = window.ApxorRTM) === null || _window$ApxorRTM5 === void 0 || _window$ApxorRTM5.logEvent("apx_card_interaction", additional_info);
22757
+ var _window$ApxorRTM6;
22758
+ (_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_card_interaction", additional_info);
22014
22759
  }
22015
22760
  });
22016
- _defineProperty(this, "Mfpa", function (config) {
22761
+ _defineProperty(this, "ZPVc", function (config) {
22017
22762
  config.forEach(function (id) {
22018
22763
  var element = document.getElementById(id);
22019
22764
  if (element) {
@@ -22021,7 +22766,7 @@
22021
22766
  }
22022
22767
  });
22023
22768
  });
22024
- _defineProperty(this, "BcAJ", function () {
22769
+ _defineProperty(this, "xGNr", function () {
22025
22770
  //This logic is to make sure that image has loaded, it doesn't check whether image is broken
22026
22771
  //refer: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete#value
22027
22772
  if (_this.imageElements.length === 0) return true;
@@ -22029,22 +22774,23 @@
22029
22774
  return img.complete;
22030
22775
  });
22031
22776
  });
22032
- _defineProperty(this, "qNbo", function () {
22777
+ _defineProperty(this, "Evhr", function () {
22033
22778
  if (_this.videoElements.length === 0) return true;
22034
22779
  return _this.videoElements.every(function (video) {
22035
22780
  return video.readyState >= 3;
22036
22781
  });
22037
22782
  });
22038
- _defineProperty(this, "SeJW", function () {
22783
+ _defineProperty(this, "FFyA", function () {
22039
22784
  if (!_this.bgImageUrl) return true;
22040
22785
  var img = new Image();
22041
22786
  img.src = _this.bgImageUrl;
22042
22787
  return img.complete;
22043
22788
  });
22044
- _defineProperty(this, "FLOH", function () {
22789
+ _defineProperty(this, "HObN", function () {
22045
22790
  var _window6, _window7;
22046
- var width = window.document.querySelector("html").offsetWidth;
22047
- var height = window.document.querySelector("html").offsetHeight;
22791
+ var html = window.document.querySelector("html");
22792
+ var width = html.offsetWidth;
22793
+ var height = html.offsetHeight;
22048
22794
  (_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.ApxorWidget) === null || _window6 === void 0 || _window6.setDimensions(width, height);
22049
22795
  (_window7 = window) === null || _window7 === void 0 || (_window7 = _window7.ApxorLogger) === null || _window7 === void 0 || _window7.debug("called setWebViewDimensions with width: ".concat(width, " and height: ").concat(height));
22050
22796
  if (width > 0 && height > 0 && !_this.loggedNudgeShownEvent) {
@@ -22052,6 +22798,31 @@
22052
22798
  _this.loggedNudgeShownEvent = true;
22053
22799
  }
22054
22800
  });
22801
+ _defineProperty(this, "XBmm", function (container, props) {
22802
+ var targetDate = new Date(props.target_date).getTime();
22803
+ var updateClock = function updateClock() {
22804
+ var now = new Date().getTime();
22805
+ var distance = targetDate - now;
22806
+ if (distance < 0) {
22807
+ container.innerHTML = props.expired_message || "Expired";
22808
+ clearInterval(timerInterval);
22809
+ return;
22810
+ }
22811
+ var hours = Math.floor(distance % (1000 * 60 * 60 * 24) / (1000 * 60 * 60));
22812
+ var minutes = Math.floor(distance % (1000 * 60 * 60) / (1000 * 60));
22813
+ var seconds = Math.floor(distance % (1000 * 60) / 1000);
22814
+
22815
+ // Timer Layout
22816
+ container.innerHTML = "\n <span style=\"font-size: 12px; margin-right: 4px;\">".concat(props.content, "</span>\n <div style=\"display: flex; gap: 4px;\">\n ").concat(_this.Qmep(hours), ":\n ").concat(_this.Qmep(minutes), ":\n ").concat(_this.Qmep(seconds), "\n </div>\n ");
22817
+ };
22818
+ var timerInterval = setInterval(updateClock, 1000);
22819
+ updateClock(); // Initial call
22820
+ });
22821
+ // Helper for the "boxed" look
22822
+ _defineProperty(this, "Qmep", function (num) {
22823
+ var displayNum = num < 10 ? "0" + num : num;
22824
+ return "<span style=\"background: rgba(255,255,255,0.2); padding: 2px 4px; border-radius: 2px;\">".concat(displayNum, "</span>");
22825
+ });
22055
22826
  this.configId = configId;
22056
22827
  this.name = name;
22057
22828
  this.showCallback = showCallback;
@@ -22066,8 +22837,13 @@
22066
22837
  this.videoElements = [];
22067
22838
  this.bgImageUrl = "";
22068
22839
  this.intervalToCheckMediaLoadingStatus = null;
22840
+ this.slideInterval = null;
22069
22841
  this.loggedNudgeShownEvent = false;
22070
22842
  this.loggedNudgeNotShownEvent = false;
22843
+ this.singleLine = (_config$single_line = _config.single_line) !== null && _config$single_line !== void 0 ? _config$single_line : true;
22844
+ this.slideDuration = (_config$slide_duratio = _config.slide_duration) !== null && _config$slide_duratio !== void 0 ? _config$slide_duratio : 3000;
22845
+ this.autoScroll = (_config$auto_scroll = _config.auto_scroll) !== null && _config$auto_scroll !== void 0 ? _config$auto_scroll : false;
22846
+ this.carousel = (_config$carousel = _config.carousel) !== null && _config$carousel !== void 0 ? _config$carousel : {};
22071
22847
  });
22072
22848
 
22073
22849
  /**
@@ -22093,6 +22869,7 @@
22093
22869
  _config$position;
22094
22870
  _classCallCheck(this, Stories);
22095
22871
  _defineProperty(this, "showStories", function () {
22872
+ window.ApxorRTM.logEvent("showing story");
22096
22873
  _this.storyContainer = document.createElement("div");
22097
22874
  _this.storyContainer.classList.add("pause");
22098
22875
  _this.storyContainer.style = "height:100%;display:flex;align-items:center;";
@@ -22131,8 +22908,8 @@
22131
22908
  _this.storyContainer.appendChild(currentElement);
22132
22909
  _this.storyContainer.appendChild(slideDetails);
22133
22910
  document.body.appendChild(_this.storyContainer);
22134
- _this.mZHL();
22135
- _this.VeEd();
22911
+ _this.eznj();
22912
+ _this.RqiT();
22136
22913
  _this.progress = Array.from(document.querySelectorAll(".progress"));
22137
22914
  var current_slide = document.querySelector(".slide-details");
22138
22915
  var playNext = function playNext(e) {
@@ -22178,7 +22955,7 @@
22178
22955
  _existingAbsoluteElements2.forEach(function (element) {
22179
22956
  element.remove();
22180
22957
  });
22181
- // this.Qhbi();
22958
+ // this.SfPl();
22182
22959
  var _currentSlideDetails = document.querySelector(".slide-details");
22183
22960
  _currentSlideDetails.innerHTML = "";
22184
22961
  _this.position = _this.position + 1;
@@ -22274,7 +23051,7 @@
22274
23051
  absolute_header = document.createElement("div");
22275
23052
  current_slide_from_config.layout.absolute_position_children.forEach(function (current_element) {
22276
23053
  var current_absolute_element;
22277
- current_absolute_element = _this.CZfr(current_element);
23054
+ current_absolute_element = _this.gVOg(current_element);
22278
23055
  absolute_header.appendChild(current_absolute_element);
22279
23056
  });
22280
23057
  (_absolute_header = absolute_header) === null || _absolute_header === void 0 || _absolute_header.classList.add("apx-slide-header");
@@ -22334,7 +23111,7 @@
22334
23111
  document.body.style.backgroundRepeat = "";
22335
23112
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
22336
23113
  delete updated_layout_without_absolute_elements["absolute_position_children"];
22337
- element = _this.CZfr(updated_layout_without_absolute_elements);
23114
+ element = _this.gVOg(updated_layout_without_absolute_elements);
22338
23115
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
22339
23116
  document.body.style.margin = "0px";
22340
23117
  }
@@ -22342,9 +23119,9 @@
22342
23119
  current_slide.removeChild(current_slide.children[0]);
22343
23120
  }
22344
23121
  current_slide.appendChild(element);
22345
- _this.AIAj();
23122
+ _this.rVWr();
22346
23123
  window.intervalToCheckImgStatus = setInterval(function () {
22347
- if (_this.wVBl()) {
23124
+ if (_this.Twwy()) {
22348
23125
  clearInterval(window.intervalToCheckImgStatus);
22349
23126
  }
22350
23127
  }, 500);
@@ -22372,7 +23149,7 @@
22372
23149
  });
22373
23150
  playNext();
22374
23151
  });
22375
- _defineProperty(this, "Qhbi", function () {
23152
+ _defineProperty(this, "SfPl", function () {
22376
23153
  document.body.classList.add("slide-right");
22377
23154
  var animationEndCounter = 0;
22378
23155
  var onAnimationEnd = function onAnimationEnd() {
@@ -22384,7 +23161,7 @@
22384
23161
  };
22385
23162
  document.body.addEventListener("animationend", onAnimationEnd);
22386
23163
  });
22387
- _defineProperty(this, "CZfr", function (config) {
23164
+ _defineProperty(this, "gVOg", function (config) {
22388
23165
  var _window$Apxor4;
22389
23166
  var element;
22390
23167
  var explicit_styles = "";
@@ -22442,7 +23219,7 @@
22442
23219
  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>";
22443
23220
  element.id = "apx-mute-icon";
22444
23221
  element.addEventListener("touchstart", function (event) {
22445
- _this.DhGb(event);
23222
+ _this.uSjD(event);
22446
23223
  });
22447
23224
  break;
22448
23225
  case "copy_icon":
@@ -22576,8 +23353,11 @@
22576
23353
  _this.storyContainer.addEventListener("touchend", _this.boundSwipeUpHandling);
22577
23354
  break;
22578
23355
  case "dismiss":
23356
+ case "user_props":
23357
+ case "session_props":
23358
+ case "event":
22579
23359
  element.ontouchstart = function (e) {
22580
- var _window$ApxorRTM6, _window3, _window3$logInternalE;
23360
+ var _window$ApxorRTM7, _window3, _window3$logInternalE;
22581
23361
  e.stopPropagation();
22582
23362
  _this.dismissFlag = true;
22583
23363
  slide_details_to_be_deleted = document.querySelector(".slide-details");
@@ -22593,7 +23373,26 @@
22593
23373
  return el.classList.contains("active");
22594
23374
  });
22595
23375
  _this.current_slide_config.media_type === "none" ? _this.currentMediaType = "builder" : _this.currentMediaType = _this.current_slide_config.media_type;
22596
- (_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent("apx_slide_closed", {
23376
+ if (action.type == "user_props") action.user_props.forEach(function (props) {
23377
+ var _window$Apxor5;
23378
+ return (_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.setUserProperties(props);
23379
+ });else if (action.type == "session_props") action.session_props.forEach(function (props) {
23380
+ var _window$Apxor6;
23381
+ return (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.setSessionProperties(props);
23382
+ });else if (action.type === "event") {
23383
+ var _loop = function _loop() {
23384
+ var _window$ApxorRTM6;
23385
+ var props = {};
23386
+ action.events[_i].properties.forEach(function (item) {
23387
+ props = _objectSpread2(_objectSpread2({}, props), item);
23388
+ });
23389
+ (_window$ApxorRTM6 = window.ApxorRTM) === null || _window$ApxorRTM6 === void 0 || _window$ApxorRTM6.logEvent(action.events[_i].event_name, props);
23390
+ };
23391
+ for (var _i = 0; _i < action.events.length; _i++) {
23392
+ _loop();
23393
+ }
23394
+ }
23395
+ (_window$ApxorRTM7 = window.ApxorRTM) === null || _window$ApxorRTM7 === void 0 || _window$ApxorRTM7.logEvent("apx_slide_closed", {
22597
23396
  apx_nudge_id: _this.config[_this.position].id,
22598
23397
  apx_nudge_name: _this.config[_this.position].campaign_name,
22599
23398
  apx_template_name: "stories",
@@ -22613,12 +23412,14 @@
22613
23412
  };
22614
23413
  break;
22615
23414
  case "copy-content":
23415
+ case "copy_clipboard":
22616
23416
  element.ontouchstart = function (e) {
22617
- var _window4, _window4$logInternalE, _window$ApxorRTM7;
23417
+ var _window4, _window4$logInternalE, _window$ApxorRTM8;
22618
23418
  e.stopPropagation();
22619
23419
  e.stopImmediatePropagation();
22620
23420
  e.preventDefault();
22621
- var textToCopy = action.content;
23421
+ var textToCopy = "";
23422
+ if (action.type == "copy-content") textToCopy = action.content;else if (action.type == "copy") textToCopy = action === null || action === void 0 ? void 0 : action.copy_content;
22622
23423
  (_window4 = window) === null || _window4 === void 0 || (_window4 = _window4.Apxor) === null || _window4 === void 0 || (_window4$logInternalE = _window4.logInternalEvent) === null || _window4$logInternalE === void 0 || _window4$logInternalE.call(_window4, "TextCopied", JSON.stringify({
22623
23424
  text_to_copy: textToCopy.toString()
22624
23425
  }));
@@ -22630,7 +23431,7 @@
22630
23431
  var current_time = Date.now();
22631
23432
  var time_taken;
22632
23433
  time_taken = (current_time - _this.slideStartTime) / 1000;
22633
- (_window$ApxorRTM7 = window.ApxorRTM) === null || _window$ApxorRTM7 === void 0 || _window$ApxorRTM7.logEvent("apx_slide_interaction", {
23434
+ (_window$ApxorRTM8 = window.ApxorRTM) === null || _window$ApxorRTM8 === void 0 || _window$ApxorRTM8.logEvent("apx_slide_interaction", {
22634
23435
  apx_nudge_id: _this.config[_this.position].id,
22635
23436
  apx_nudge_name: _this.config[_this.position].campaign_name,
22636
23437
  apx_template_name: "stories",
@@ -22658,7 +23459,7 @@
22658
23459
  }
22659
23460
  if (config.absolute_position_children && config.absolute_position_children.length > 0) {
22660
23461
  config.absolute_position_children.forEach(function (childConfig) {
22661
- var childElement = _this.CZfr(childConfig);
23462
+ var childElement = _this.gVOg(childConfig);
22662
23463
  element.appendChild(childElement);
22663
23464
  });
22664
23465
  }
@@ -22666,7 +23467,7 @@
22666
23467
  // Process children
22667
23468
  if (config.children && config.children.length > 0) {
22668
23469
  config.children.forEach(function (childConfig) {
22669
- var childElement = _this.CZfr(childConfig);
23470
+ var childElement = _this.gVOg(childConfig);
22670
23471
  element.appendChild(childElement);
22671
23472
  });
22672
23473
  }
@@ -22694,7 +23495,7 @@
22694
23495
  element.appendChild(ElementStyles);
22695
23496
  return element;
22696
23497
  });
22697
- _defineProperty(this, "DhGb", function (event) {
23498
+ _defineProperty(this, "uSjD", function (event) {
22698
23499
  var slide_details_to_be_deleted;
22699
23500
  var mute_child_elements;
22700
23501
  var unmute_child_elements;
@@ -22724,11 +23525,11 @@
22724
23525
  }
22725
23526
  // this.muteElement.addEventListener("touchstart", (event) => {
22726
23527
  // event.stopPropagation();
22727
- // this.DhGb(event);
23528
+ // this.uSjD(event);
22728
23529
  // });
22729
23530
  }
22730
23531
  });
22731
- _defineProperty(this, "VeEd", function () {
23532
+ _defineProperty(this, "RqiT", function () {
22732
23533
  var tapTimeout;
22733
23534
  var tapThreshold = 0.5; // Assuming 0.5 is the center of the WebView
22734
23535
  var longPressDuration = 200;
@@ -22740,7 +23541,7 @@
22740
23541
  clearTimeout(tapTimeout);
22741
23542
  tapTimeout = setTimeout(function () {
22742
23543
  if (!_this.swipe_up_redirect) {
22743
- var _window$ApxorRTM8;
23544
+ var _window$ApxorRTM9;
22744
23545
  var progress = Array.from(document.querySelectorAll(".progress"));
22745
23546
  var activeIndex = progress.findIndex(function (el) {
22746
23547
  return el.classList.contains("active");
@@ -22751,7 +23552,7 @@
22751
23552
  var current_time = Date.now();
22752
23553
  var time_taken;
22753
23554
  time_taken = (current_time - _this.slideStartTime) / 1000;
22754
- (_window$ApxorRTM8 = window.ApxorRTM) === null || _window$ApxorRTM8 === void 0 || _window$ApxorRTM8.logEvent("apx_slide_paused", {
23555
+ (_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_slide_paused", {
22755
23556
  apx_nudge_id: _this.config[_this.position].id,
22756
23557
  apx_nudge_name: _this.config[_this.position].campaign_name,
22757
23558
  apx_template_name: "stories",
@@ -22787,12 +23588,12 @@
22787
23588
  });
22788
23589
  progress[activeIndex].style.animationPlayState = "running";
22789
23590
  if (_this.slidePaused) {
22790
- var _window$ApxorRTM9;
23591
+ var _window$ApxorRTM10;
22791
23592
  _this.current_slide_config.media_type === "none" ? _this.currentMediaType = "builder" : _this.currentMediaType = _this.current_slide_config.media_type;
22792
23593
  var current_time = Date.now();
22793
23594
  var time_taken;
22794
23595
  time_taken = (current_time - _this.slideStartTime) / 1000;
22795
- (_window$ApxorRTM9 = window.ApxorRTM) === null || _window$ApxorRTM9 === void 0 || _window$ApxorRTM9.logEvent("apx_slide_resumed", {
23596
+ (_window$ApxorRTM10 = window.ApxorRTM) === null || _window$ApxorRTM10 === void 0 || _window$ApxorRTM10.logEvent("apx_slide_resumed", {
22796
23597
  apx_nudge_id: _this.config[_this.position].id,
22797
23598
  apx_nudge_name: _this.config[_this.position].campaign_name,
22798
23599
  apx_template_name: "stories",
@@ -22819,8 +23620,8 @@
22819
23620
  if (relativeX > tapThreshold) {
22820
23621
  var _slide_details_to_be_deleted = document.querySelector(".slide-details");
22821
23622
  var _childElements = _slide_details_to_be_deleted.children;
22822
- for (var _i = 0; _i < _childElements.length; _i++) {
22823
- var _child = _childElements[_i];
23623
+ for (var _i2 = 0; _i2 < _childElements.length; _i2++) {
23624
+ var _child = _childElements[_i2];
22824
23625
  if (_child.tagName.toLowerCase() === "video") {
22825
23626
  _child.muted = true;
22826
23627
  }
@@ -22852,7 +23653,7 @@
22852
23653
  event.target.dataset.touchStartTime = event.timeStamp;
22853
23654
  });
22854
23655
  });
22855
- _defineProperty(this, "mZHL", function () {
23656
+ _defineProperty(this, "eznj", function () {
22856
23657
  var startY, startX;
22857
23658
  _this.storyContainer.addEventListener("touchstart", function (event) {
22858
23659
  _this.swipeTouch = true;
@@ -22888,7 +23689,7 @@
22888
23689
  (_window6 = window) === null || _window6 === void 0 || (_window6 = _window6.Apxor) === null || _window6 === void 0 || (_window6$logInternalE = _window6.logInternalEvent) === null || _window6$logInternalE === void 0 || _window6$logInternalE.call(_window6, "story_slides_closed");
22889
23690
  return;
22890
23691
  } else if (deltaX > 50 && Math.abs(deltaX) > Math.abs(deltaY)) {
22891
- var _progress$activeIndex, _progress$activeIndex2, _window8, _window8$logInternalE, _window$ApxorRTM10, _window$ApxorRTM11;
23692
+ var _progress$activeIndex, _progress$activeIndex2, _window8, _window8$logInternalE, _window$ApxorRTM11, _window$ApxorRTM12;
22892
23693
  _this.swipeRight = true;
22893
23694
  if (_this.position === _this.config.length - 1) {
22894
23695
  var _window7, _window7$logInternalE;
@@ -22928,9 +23729,9 @@
22928
23729
  progressContainer.appendChild(progressSlide);
22929
23730
  });
22930
23731
  var progressSegments = progressContainer.querySelectorAll(".progress");
22931
- for (var _i2 = 0; _i2 < slideToStart; _i2++) {
23732
+ for (var _i3 = 0; _i3 < slideToStart; _i3++) {
22932
23733
  var _progressSegments$_i;
22933
- (_progressSegments$_i = progressSegments[_i2]) === null || _progressSegments$_i === void 0 || _progressSegments$_i.classList.add("passed");
23734
+ (_progressSegments$_i = progressSegments[_i3]) === null || _progressSegments$_i === void 0 || _progressSegments$_i.classList.add("passed");
22934
23735
  }
22935
23736
  progressSegments[slideToStart].classList.add("active");
22936
23737
  Array.from(progressSegments).map(function (el) {
@@ -22947,7 +23748,7 @@
22947
23748
  index: slideToStart + 1,
22948
23749
  view_id: _this.view_id
22949
23750
  }));
22950
- (_window$ApxorRTM10 = window.ApxorRTM) === null || _window$ApxorRTM10 === void 0 || _window$ApxorRTM10.logEvent("apx_slide_viewed", {
23751
+ (_window$ApxorRTM11 = window.ApxorRTM) === null || _window$ApxorRTM11 === void 0 || _window$ApxorRTM11.logEvent("apx_slide_viewed", {
22951
23752
  apx_slide_number: slideToStart + 1,
22952
23753
  apx_slide_label: _this.current_slide_config.slide_label,
22953
23754
  apx_slide_type: _this.currentMediaType,
@@ -22959,7 +23760,7 @@
22959
23760
  var current_time = Date.now();
22960
23761
  var time_taken;
22961
23762
  time_taken = (current_time - _this.slideStartTime) / 1000;
22962
- (_window$ApxorRTM11 = window.ApxorRTM) === null || _window$ApxorRTM11 === void 0 || _window$ApxorRTM11.logEvent("apx_story_changed", {
23763
+ (_window$ApxorRTM12 = window.ApxorRTM) === null || _window$ApxorRTM12 === void 0 || _window$ApxorRTM12.logEvent("apx_story_changed", {
22963
23764
  apx_nudge_id: _this.config[_this.position].id,
22964
23765
  apx_nudge_name: _this.config[_this.position].campaign_name,
22965
23766
  apx_template_name: "stories",
@@ -22974,7 +23775,7 @@
22974
23775
  _this.slideStartTime = currentTime;
22975
23776
  return;
22976
23777
  } else if (deltaX < -50 && Math.abs(deltaX) > Math.abs(deltaY)) {
22977
- var _progress$activeIndex3, _progress$activeIndex4, _window9, _window9$logInternalE, _window$ApxorRTM12, _window$ApxorRTM13;
23778
+ var _progress$activeIndex3, _progress$activeIndex4, _window9, _window9$logInternalE, _window$ApxorRTM13, _window$ApxorRTM14;
22978
23779
  _this.swipeLeft = true;
22979
23780
  if (activeIndex === 0 && _this.position === 0) {
22980
23781
  return;
@@ -23007,9 +23808,9 @@
23007
23808
  });
23008
23809
  var _progressSegments2 = _progressContainer2.querySelectorAll(".progress");
23009
23810
  if (_progressSegments2.length > 0) {
23010
- for (var _i3 = 0; _i3 < lastSlideIndex; _i3++) {
23811
+ for (var _i4 = 0; _i4 < lastSlideIndex; _i4++) {
23011
23812
  var _progressSegments2$_i;
23012
- (_progressSegments2$_i = _progressSegments2[_i3]) === null || _progressSegments2$_i === void 0 || _progressSegments2$_i.classList.add("passed");
23813
+ (_progressSegments2$_i = _progressSegments2[_i4]) === null || _progressSegments2$_i === void 0 || _progressSegments2$_i.classList.add("passed");
23013
23814
  }
23014
23815
  _progressSegments2[lastSlideIndex].classList.add("active");
23015
23816
  }
@@ -23028,7 +23829,7 @@
23028
23829
  view_id: _this.view_id
23029
23830
  }));
23030
23831
  _this.current_slide_config.media_type === "none" ? _this.currentMediaType = "builder" : _this.currentMediaType = _this.current_slide_config.media_type;
23031
- (_window$ApxorRTM12 = window.ApxorRTM) === null || _window$ApxorRTM12 === void 0 || _window$ApxorRTM12.logEvent("apx_slide_viewed", {
23832
+ (_window$ApxorRTM13 = window.ApxorRTM) === null || _window$ApxorRTM13 === void 0 || _window$ApxorRTM13.logEvent("apx_slide_viewed", {
23032
23833
  apx_nudge_id: _this.config[_this.position].id,
23033
23834
  apx_nudge_name: _this.config[_this.position].campaign_name,
23034
23835
  apx_template_name: "stories",
@@ -23040,7 +23841,7 @@
23040
23841
  var _current_time2 = Date.now();
23041
23842
  var _time_taken;
23042
23843
  _time_taken = (_current_time2 - _this.slideStartTime) / 1000;
23043
- (_window$ApxorRTM13 = window.ApxorRTM) === null || _window$ApxorRTM13 === void 0 || _window$ApxorRTM13.logEvent("apx_story_changed", {
23844
+ (_window$ApxorRTM14 = window.ApxorRTM) === null || _window$ApxorRTM14 === void 0 || _window$ApxorRTM14.logEvent("apx_story_changed", {
23044
23845
  apx_nudge_id: _this.config[_this.position].id,
23045
23846
  apx_nudge_name: _this.config[_this.position].campaign_name,
23046
23847
  apx_template_name: "stories",
@@ -23059,7 +23860,7 @@
23059
23860
  }, 50);
23060
23861
  });
23061
23862
  });
23062
- _defineProperty(this, "AIAj", function () {
23863
+ _defineProperty(this, "rVWr", function () {
23063
23864
  _this.loader.style.display = "block";
23064
23865
  var progress = Array.from(document.querySelectorAll(".progress"));
23065
23866
  var activeIndex = progress.findIndex(function (el) {
@@ -23075,7 +23876,7 @@
23075
23876
  }
23076
23877
  }
23077
23878
  });
23078
- _defineProperty(this, "URNM", function () {
23879
+ _defineProperty(this, "sfGa", function () {
23079
23880
  if (!_this.continueLoading) {
23080
23881
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
23081
23882
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
@@ -23095,19 +23896,19 @@
23095
23896
  _this.loader.style.display = "none";
23096
23897
  }
23097
23898
  });
23098
- _defineProperty(this, "BcAJ", function () {
23899
+ _defineProperty(this, "xGNr", function () {
23099
23900
  if (_this.imageElements.length === 0) return true;
23100
23901
  return _this.imageElements.every(function (img) {
23101
23902
  return img.complete;
23102
23903
  });
23103
23904
  });
23104
- _defineProperty(this, "qNbo", function () {
23905
+ _defineProperty(this, "Evhr", function () {
23105
23906
  if (_this.videoElements.length === 0) return true;
23106
23907
  return _this.videoElements.every(function (video) {
23107
23908
  return video.readyState >= 3;
23108
23909
  });
23109
23910
  });
23110
- _defineProperty(this, "wVBl", function () {
23911
+ _defineProperty(this, "Twwy", function () {
23111
23912
  var bodyStyles = window.getComputedStyle(document.body);
23112
23913
  var backgroundImage = bodyStyles.backgroundImage;
23113
23914
  if (backgroundImage && backgroundImage !== "none" && _this.current_slide_config.media_type === "image") {
@@ -23117,7 +23918,7 @@
23117
23918
  var img = new Image();
23118
23919
  img.src = imageUrl;
23119
23920
  if (img.complete) {
23120
- _this.URNM();
23921
+ _this.sfGa();
23121
23922
  return true;
23122
23923
  }
23123
23924
  return false;
@@ -23125,27 +23926,27 @@
23125
23926
  var slide_details_to_be_deleted = document.querySelector(".slide-details");
23126
23927
  var childElements = slide_details_to_be_deleted.querySelectorAll("video");
23127
23928
  if (childElements[0].readyState >= 3) {
23128
- _this.URNM();
23929
+ _this.sfGa();
23129
23930
  return true;
23130
23931
  }
23131
23932
  return false;
23132
23933
  } else {
23133
23934
  if (_this.videoElements.length == 0 && _this.imageElements.length == 0) {
23134
- _this.URNM();
23935
+ _this.sfGa();
23135
23936
  return true;
23136
- } else if (_this.BcAJ() && _this.qNbo()) {
23137
- _this.URNM();
23937
+ } else if (_this.xGNr() && _this.Evhr()) {
23938
+ _this.sfGa();
23138
23939
  return true;
23139
23940
  }
23140
23941
  }
23141
23942
  });
23142
- _defineProperty(this, "tgxN", function (event, startY, action) {
23943
+ _defineProperty(this, "ZSUI", function (event, startY, action) {
23143
23944
  event.stopPropagation();
23144
23945
  var endY = event.changedTouches[0].clientY;
23145
23946
  var deltaY = startY - endY;
23146
23947
  if (!_this.redirectionFlag) {
23147
23948
  if (deltaY > 50) {
23148
- var _window$ApxorRTM14;
23949
+ var _window$ApxorRTM15;
23149
23950
  _this.swipe_up_redirect = true;
23150
23951
  _this.swipeUpTouch = true;
23151
23952
  window.ApxorRTM.pauseVideos();
@@ -23158,7 +23959,7 @@
23158
23959
  var current_time = Date.now();
23159
23960
  var time_taken;
23160
23961
  time_taken = (current_time - _this.slideStartTime) / 1000;
23161
- (_window$ApxorRTM14 = window.ApxorRTM) === null || _window$ApxorRTM14 === void 0 || _window$ApxorRTM14.logEvent("apx_slide_interaction", {
23962
+ (_window$ApxorRTM15 = window.ApxorRTM) === null || _window$ApxorRTM15 === void 0 || _window$ApxorRTM15.logEvent("apx_slide_interaction", {
23162
23963
  apx_nudge_id: _this.config[_this.position].id,
23163
23964
  apx_nudge_name: _this.config[_this.position].campaign_name,
23164
23965
  apx_template_name: "stories",
@@ -23236,7 +24037,7 @@
23236
24037
  this.swipe_action;
23237
24038
  this.continueLoading = false;
23238
24039
  this.boundSwipeUpHandling = function (event) {
23239
- return _this.tgxN(event, _this.startY, _this.swipe_action);
24040
+ return _this.ZSUI(event, _this.startY, _this.swipe_action);
23240
24041
  };
23241
24042
  }
23242
24043
  _createClass(Stories, [{
@@ -23259,7 +24060,7 @@
23259
24060
  }, {
23260
24061
  key: "moveToNextSlide",
23261
24062
  value: function moveToNextSlide() {
23262
- var _window$ApxorRTM15, _progress$activeIndex7, _progress$activeIndex8, _progress$nextIndex, _window13, _window13$logInternal, _window$ApxorRTM19, _window$ApxorRTM20;
24063
+ var _window$ApxorRTM16, _progress$activeIndex7, _progress$activeIndex8, _progress$nextIndex, _window13, _window13$logInternal, _window$ApxorRTM20, _window$ApxorRTM21;
23263
24064
  this.storyContainer.removeEventListener("touchend", this.boundSwipeUpHandling);
23264
24065
  var progress1 = Array.from(document.querySelectorAll(".progress"));
23265
24066
  var activeIndex1 = progress1.findIndex(function (el) {
@@ -23268,7 +24069,7 @@
23268
24069
  var current_time_new = Date.now();
23269
24070
  var time_taken_new;
23270
24071
  time_taken_new = (current_time_new - this.slideStartTime) / 1000;
23271
- (_window$ApxorRTM15 = window.ApxorRTM) === null || _window$ApxorRTM15 === void 0 || _window$ApxorRTM15.logEvent("apx_slide_completed", {
24072
+ (_window$ApxorRTM16 = window.ApxorRTM) === null || _window$ApxorRTM16 === void 0 || _window$ApxorRTM16.logEvent("apx_slide_completed", {
23272
24073
  apx_nudge_id: this.config[this.position].id,
23273
24074
  apx_nudge_name: this.config[this.position].campaign_name,
23274
24075
  apx_template_name: "stories",
@@ -23298,9 +24099,9 @@
23298
24099
  }
23299
24100
  return;
23300
24101
  } else {
23301
- var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM16, _window$ApxorRTM17, _window$ApxorRTM18;
24102
+ var _progress$activeIndex5, _progress$activeIndex6, _progress$, _window12, _window12$logInternal, _window$ApxorRTM17, _window$ApxorRTM18, _window$ApxorRTM19;
23302
24103
  // Move to the first slide of the next group
23303
- // this.Qhbi();
24104
+ // this.SfPl();
23304
24105
  this.position++;
23305
24106
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
23306
24107
  this.slides = this.config[this.position].slides;
@@ -23319,7 +24120,7 @@
23319
24120
  var _current_time3 = Date.now();
23320
24121
  _time_taken2 = (_current_time3 - this.slideStartTime) / 1000;
23321
24122
  this.current_slide_config.media_type === "none" ? this.currentMediaType = "builder" : this.currentMediaType = this.current_slide_config.media_type;
23322
- (_window$ApxorRTM16 = window.ApxorRTM) === null || _window$ApxorRTM16 === void 0 || _window$ApxorRTM16.logEvent("apx_slide_changed", {
24123
+ (_window$ApxorRTM17 = window.ApxorRTM) === null || _window$ApxorRTM17 === void 0 || _window$ApxorRTM17.logEvent("apx_slide_changed", {
23323
24124
  apx_nudge_id: this.config[this.position].id,
23324
24125
  apx_nudge_name: this.config[this.position].campaign_name,
23325
24126
  apx_template_name: "stories",
@@ -23330,7 +24131,7 @@
23330
24131
  apx_change_action: "next-clicked",
23331
24132
  apx_time_taken: _time_taken2
23332
24133
  });
23333
- (_window$ApxorRTM17 = window.ApxorRTM) === null || _window$ApxorRTM17 === void 0 || _window$ApxorRTM17.logEvent("apx_slide_viewed", {
24134
+ (_window$ApxorRTM18 = window.ApxorRTM) === null || _window$ApxorRTM18 === void 0 || _window$ApxorRTM18.logEvent("apx_slide_viewed", {
23334
24135
  apx_nudge_id: this.config[this.position].id,
23335
24136
  apx_nudge_name: this.config[this.position].campaign_name,
23336
24137
  apx_template_name: "stories",
@@ -23339,7 +24140,7 @@
23339
24140
  apx_slide_label: this.current_slide_config.slide_label,
23340
24141
  apx_slide_type: this.currentMediaType
23341
24142
  });
23342
- (_window$ApxorRTM18 = window.ApxorRTM) === null || _window$ApxorRTM18 === void 0 || _window$ApxorRTM18.logEvent("apx_story_changed", {
24143
+ (_window$ApxorRTM19 = window.ApxorRTM) === null || _window$ApxorRTM19 === void 0 || _window$ApxorRTM19.logEvent("apx_story_changed", {
23343
24144
  apx_nudge_id: this.config[this.position].id,
23344
24145
  apx_nudge_name: this.config[this.position].campaign_name,
23345
24146
  apx_template_name: "stories",
@@ -23372,7 +24173,7 @@
23372
24173
  var time_taken;
23373
24174
  var current_time = Date.now();
23374
24175
  time_taken = (current_time - this.slideStartTime) / 1000;
23375
- (_window$ApxorRTM19 = window.ApxorRTM) === null || _window$ApxorRTM19 === void 0 || _window$ApxorRTM19.logEvent("apx_slide_changed", {
24176
+ (_window$ApxorRTM20 = window.ApxorRTM) === null || _window$ApxorRTM20 === void 0 || _window$ApxorRTM20.logEvent("apx_slide_changed", {
23376
24177
  apx_nudge_id: this.config[this.position].id,
23377
24178
  apx_nudge_name: this.config[this.position].campaign_name,
23378
24179
  apx_template_name: "stories",
@@ -23383,7 +24184,7 @@
23383
24184
  apx_change_action: "next-clicked",
23384
24185
  apx_time_taken: time_taken
23385
24186
  });
23386
- (_window$ApxorRTM20 = window.ApxorRTM) === null || _window$ApxorRTM20 === void 0 || _window$ApxorRTM20.logEvent("apx_slide_viewed", {
24187
+ (_window$ApxorRTM21 = window.ApxorRTM) === null || _window$ApxorRTM21 === void 0 || _window$ApxorRTM21.logEvent("apx_slide_viewed", {
23387
24188
  apx_nudge_id: this.config[this.position].id,
23388
24189
  apx_nudge_name: this.config[this.position].campaign_name,
23389
24190
  apx_template_name: "stories",
@@ -23398,7 +24199,7 @@
23398
24199
  }, {
23399
24200
  key: "moveToPreviousSlide",
23400
24201
  value: function moveToPreviousSlide() {
23401
- var _window$ApxorRTM21, _progress$activeIndex11, _progress$activeIndex12, _progress$previousInd, _progress$previousInd2, _window15, _window15$logInternal, _window$ApxorRTM25, _window$ApxorRTM26;
24202
+ var _window$ApxorRTM22, _progress$activeIndex11, _progress$activeIndex12, _progress$previousInd, _progress$previousInd2, _window15, _window15$logInternal, _window$ApxorRTM26, _window$ApxorRTM27;
23402
24203
  this.storyContainer.removeEventListener("touchend", this.boundSwipeUpHandling);
23403
24204
  var progress1 = Array.from(document.querySelectorAll(".progress"));
23404
24205
  var activeIndex1 = progress1.findIndex(function (el) {
@@ -23407,7 +24208,7 @@
23407
24208
  var current_time_new = Date.now();
23408
24209
  var time_taken_new;
23409
24210
  time_taken_new = (current_time_new - this.slideStartTime) / 1000;
23410
- (_window$ApxorRTM21 = window.ApxorRTM) === null || _window$ApxorRTM21 === void 0 || _window$ApxorRTM21.logEvent("apx_slide_completed", {
24211
+ (_window$ApxorRTM22 = window.ApxorRTM) === null || _window$ApxorRTM22 === void 0 || _window$ApxorRTM22.logEvent("apx_slide_completed", {
23411
24212
  apx_nudge_id: this.config[this.position].id,
23412
24213
  apx_nudge_name: this.config[this.position].campaign_name,
23413
24214
  apx_template_name: "stories",
@@ -23424,9 +24225,9 @@
23424
24225
  return;
23425
24226
  }
23426
24227
  if (activeIndex === 0) {
23427
- var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM22, _window$ApxorRTM23, _window$ApxorRTM24;
24228
+ var _progress$activeIndex9, _progress$activeIndex10, _progress$lastSlideIn, _window14, _window14$logInternal, _window$ApxorRTM23, _window$ApxorRTM24, _window$ApxorRTM25;
23428
24229
  // If at the first slide of the current group, move to the last slide of the previous group
23429
- // this.Qhbi();
24230
+ // this.SfPl();
23430
24231
  this.position--;
23431
24232
  this.progress_bar = new ProgressBar$1(this.config[this.position].progress_bar);
23432
24233
  this.slides = this.config[this.position].slides;
@@ -23446,7 +24247,7 @@
23446
24247
  var _time_taken3;
23447
24248
  var _current_time4 = Date.now();
23448
24249
  _time_taken3 = (_current_time4 - this.slideStartTime) / 1000;
23449
- (_window$ApxorRTM22 = window.ApxorRTM) === null || _window$ApxorRTM22 === void 0 || _window$ApxorRTM22.logEvent("apx_slide_changed", {
24250
+ (_window$ApxorRTM23 = window.ApxorRTM) === null || _window$ApxorRTM23 === void 0 || _window$ApxorRTM23.logEvent("apx_slide_changed", {
23450
24251
  apx_nudge_id: this.config[this.position].id,
23451
24252
  apx_nudge_name: this.config[this.position].campaign_name,
23452
24253
  apx_template_name: "stories",
@@ -23457,7 +24258,7 @@
23457
24258
  apx_change_action: "previous-clicked",
23458
24259
  apx_time_taken: _time_taken3
23459
24260
  });
23460
- (_window$ApxorRTM23 = window.ApxorRTM) === null || _window$ApxorRTM23 === void 0 || _window$ApxorRTM23.logEvent("apx_slide_viewed", {
24261
+ (_window$ApxorRTM24 = window.ApxorRTM) === null || _window$ApxorRTM24 === void 0 || _window$ApxorRTM24.logEvent("apx_slide_viewed", {
23461
24262
  apx_nudge_id: this.config[this.position].id,
23462
24263
  apx_nudge_name: this.config[this.position].campaign_name,
23463
24264
  apx_template_name: "stories",
@@ -23466,7 +24267,7 @@
23466
24267
  apx_slide_label: this.current_slide_config.slide_label,
23467
24268
  apx_slide_type: this.currentMediaType
23468
24269
  });
23469
- (_window$ApxorRTM24 = window.ApxorRTM) === null || _window$ApxorRTM24 === void 0 || _window$ApxorRTM24.logEvent("apx_story_changed", {
24270
+ (_window$ApxorRTM25 = window.ApxorRTM) === null || _window$ApxorRTM25 === void 0 || _window$ApxorRTM25.logEvent("apx_story_changed", {
23470
24271
  apx_nudge_id: this.config[this.position].id,
23471
24272
  apx_nudge_name: this.config[this.position].campaign_name,
23472
24273
  apx_template_name: "stories",
@@ -23504,7 +24305,7 @@
23504
24305
  var time_taken;
23505
24306
  var current_time = Date.now();
23506
24307
  time_taken = (current_time - this.slideStartTime) / 1000;
23507
- (_window$ApxorRTM25 = window.ApxorRTM) === null || _window$ApxorRTM25 === void 0 || _window$ApxorRTM25.logEvent("apx_slide_changed", {
24308
+ (_window$ApxorRTM26 = window.ApxorRTM) === null || _window$ApxorRTM26 === void 0 || _window$ApxorRTM26.logEvent("apx_slide_changed", {
23508
24309
  apx_nudge_id: this.config[this.position].id,
23509
24310
  apx_nudge_name: this.config[this.position].campaign_name,
23510
24311
  apx_template_name: "stories",
@@ -23515,7 +24316,7 @@
23515
24316
  apx_change_action: "previous-clicked",
23516
24317
  apx_time_taken: time_taken
23517
24318
  });
23518
- (_window$ApxorRTM26 = window.ApxorRTM) === null || _window$ApxorRTM26 === void 0 || _window$ApxorRTM26.logEvent("apx_slide_viewed", {
24319
+ (_window$ApxorRTM27 = window.ApxorRTM) === null || _window$ApxorRTM27 === void 0 || _window$ApxorRTM27.logEvent("apx_slide_viewed", {
23519
24320
  apx_nudge_id: this.config[this.position].id,
23520
24321
  apx_nudge_name: this.config[this.position].campaign_name,
23521
24322
  apx_template_name: "stories",
@@ -23554,12 +24355,12 @@
23554
24355
  // Update slide content
23555
24356
  var element;
23556
24357
  if ((current_slide_from_config === null || current_slide_from_config === void 0 ? void 0 : current_slide_from_config.media_type) === "image") {
23557
- var _window$Apxor5;
24358
+ var _window$Apxor7;
23558
24359
  element = document.createElement("div");
23559
24360
  var imageSrc;
23560
- if (((_window$Apxor5 = window.Apxor) === null || _window$Apxor5 === void 0 ? void 0 : _window$Apxor5.platform) != "ios") {
23561
- var _window$Apxor6;
23562
- imageSrc = (_window$Apxor6 = window.Apxor) === null || _window$Apxor6 === void 0 ? void 0 : _window$Apxor6.getFilePathForStories(this.config[this.position].id, current_slide_from_config.media_url);
24361
+ if (((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) != "ios") {
24362
+ var _window$Apxor8;
24363
+ imageSrc = (_window$Apxor8 = window.Apxor) === null || _window$Apxor8 === void 0 ? void 0 : _window$Apxor8.getFilePathForStories(this.config[this.position].id, current_slide_from_config.media_url);
23563
24364
  if (imageSrc && imageSrc != "") {
23564
24365
  document.body.style.backgroundImage = "url(".concat(imageSrc, ")");
23565
24366
  document.body.style.backgroundSize = "100% auto";
@@ -23580,7 +24381,7 @@
23580
24381
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
23581
24382
  document.body.style.margin = "0px";
23582
24383
  } else if ((current_slide_from_config === null || current_slide_from_config === void 0 ? void 0 : current_slide_from_config.media_type) === "video") {
23583
- var _window$Apxor7;
24384
+ var _window$Apxor9;
23584
24385
  document.body.style.backgroundImage = "";
23585
24386
  document.body.style.backgroundSize = "";
23586
24387
  document.body.style.backgroundPosition = "";
@@ -23597,7 +24398,7 @@
23597
24398
  element.style.height = "auto";
23598
24399
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
23599
24400
  document.body.style.margin = "0px";
23600
- if (((_window$Apxor7 = window.Apxor) === null || _window$Apxor7 === void 0 ? void 0 : _window$Apxor7.platform) === "ios") {
24401
+ if (((_window$Apxor9 = window.Apxor) === null || _window$Apxor9 === void 0 ? void 0 : _window$Apxor9.platform) === "ios") {
23601
24402
  element.playsInline = true;
23602
24403
  }
23603
24404
  element.style.alignItems = "center";
@@ -23613,25 +24414,25 @@
23613
24414
  // Create custom content
23614
24415
  var updated_layout_without_absolute_elements = JSON.parse(JSON.stringify(current_slide_from_config.layout));
23615
24416
  delete updated_layout_without_absolute_elements["absolute_position_children"];
23616
- element = this.CZfr(updated_layout_without_absolute_elements);
24417
+ element = this.gVOg(updated_layout_without_absolute_elements);
23617
24418
  }
23618
24419
  // Append slide content to slide details container
23619
24420
 
23620
24421
  document.body.style.backgroundColor = current_slide_from_config.media_background_color;
23621
24422
  document.body.style.margin = "0px";
23622
24423
  currentSlideDetails.appendChild(element);
23623
- this.AIAj();
24424
+ this.rVWr();
23624
24425
 
23625
24426
  // Handle absolute position children
23626
24427
  if (current_slide_from_config.layout.absolute_position_children && current_slide_from_config.layout.absolute_position_children.length > 0) {
23627
24428
  current_slide_from_config.layout.absolute_position_children.forEach(function (childConfig) {
23628
- var childElement = _this2.CZfr(childConfig);
24429
+ var childElement = _this2.gVOg(childConfig);
23629
24430
  // Append absolute position children to slide details container
23630
24431
  currentSlideDetails.appendChild(childElement);
23631
24432
  });
23632
24433
  }
23633
24434
  window.intervalToCheckImgStatus2 = setInterval(function () {
23634
- if (_this2.wVBl()) {
24435
+ if (_this2.Twwy()) {
23635
24436
  clearInterval(window.intervalToCheckImgStatus2);
23636
24437
  }
23637
24438
  }, 500);
@@ -24066,15 +24867,15 @@
24066
24867
  _this$badge$animation2,
24067
24868
  _this$badge$animation3;
24068
24869
  _classCallCheck(this, ApxorBadge);
24069
- _defineProperty(this, "YJBe", function () {
24870
+ _defineProperty(this, "qoHU", function () {
24070
24871
  var delayMillis = _this.delayMillis * 1000;
24071
24872
  _this.shakeAnimationRepeat(_this.interCount, delayMillis);
24072
24873
  });
24073
- _defineProperty(this, "RRte", function () {
24874
+ _defineProperty(this, "fgNo", function () {
24074
24875
  var delayMillis = _this.delayMillis * 1000;
24075
24876
  _this.fadeAnimationRepeat(_this.interCount, delayMillis);
24076
24877
  });
24077
- _defineProperty(this, "meeG", function () {
24878
+ _defineProperty(this, "AdBL", function () {
24078
24879
  var _this$targetElement;
24079
24880
  var delayMillis = _this.delayMillis * 1000;
24080
24881
  var finalStyles = ".apxor-badge-container-stylesdummy-".concat(_this.cssPostFix, " {\n opacity:0;\n }").replaceAll("\n", "").replace(/[\s]{2,999}/g, "");
@@ -24083,7 +24884,7 @@
24083
24884
  (_this$targetElement = _this.targetElement) === null || _this$targetElement === void 0 || _this$targetElement.appendChild(newstyleNode1);
24084
24885
  _this.rippleAnimationRepeat(_this.interCount, delayMillis);
24085
24886
  });
24086
- _defineProperty(this, "WRyz", function () {
24887
+ _defineProperty(this, "qdcc", function () {
24087
24888
  var delayMillis = _this.delayMillis * 1000;
24088
24889
  //let badgeContainerClass = `.apxor-badge-container-styles-${this.cssPostFix}`;
24089
24890
  //let badgeAnimationElement = document.querySelector(badgeContainerClass);
@@ -24100,7 +24901,7 @@
24100
24901
  // newstyleNode1.innerHTML = finalStyles;
24101
24902
  // this.targetElement?.appendChild(newstyleNode1);
24102
24903
  });
24103
- _defineProperty(this, "mayB", function () {
24904
+ _defineProperty(this, "dWIh", function () {
24104
24905
  var elements = document.querySelectorAll(".apx-main-styles-".concat(_this.configId));
24105
24906
  elements === null || elements === void 0 || elements.forEach(function (ele) {
24106
24907
  ele === null || ele === void 0 || ele.remove();
@@ -24109,9 +24910,9 @@
24109
24910
  dummy_elements === null || dummy_elements === void 0 || dummy_elements.forEach(function (ele) {
24110
24911
  ele === null || ele === void 0 || ele.remove();
24111
24912
  });
24112
- _this.bFdF();
24913
+ _this.xjxB();
24113
24914
  });
24114
- _defineProperty(this, "bFdF", function () {
24915
+ _defineProperty(this, "xjxB", function () {
24115
24916
  var targetWrapperElement = document.querySelector(".image-container-".concat(_this.configId));
24116
24917
  // Ensure the target element is the wrapper with class 'image-container'
24117
24918
  if (targetWrapperElement) {
@@ -24135,12 +24936,12 @@
24135
24936
  * @param {boolean} optimized
24136
24937
  * @returns viewId
24137
24938
  */
24138
- _defineProperty(this, "eIhd", function (node, optimized) {
24939
+ _defineProperty(this, "pirj", function (node, optimized) {
24139
24940
  if (node.nodeType !== Node.ELEMENT_NODE) return "";
24140
24941
  var steps = [];
24141
24942
  var contextNode = node;
24142
24943
  while (contextNode) {
24143
- var step = _this.jLln(contextNode, !!optimized, contextNode === node);
24944
+ var step = _this.QXkv(contextNode, !!optimized, contextNode === node);
24144
24945
  if (!step) break; // Error - bail out early.
24145
24946
  steps.push(step);
24146
24947
  if (step.optimized) break;
@@ -24155,7 +24956,7 @@
24155
24956
  * @param {boolean} optimized
24156
24957
  * @param {object} isTargetNode
24157
24958
  */
24158
- _defineProperty(this, "jLln", function (node, optimized, isTargetNode) {
24959
+ _defineProperty(this, "QXkv", function (node, optimized, isTargetNode) {
24159
24960
  if (node.nodeType !== Node.ELEMENT_NODE) return null;
24160
24961
  var id = node.getAttribute("id");
24161
24962
  if (optimized) {
@@ -24277,7 +25078,7 @@
24277
25078
  this.contentZindexValue = 1;
24278
25079
  }
24279
25080
  _createClass(ApxorBadge, [{
24280
- key: "EOyo",
25081
+ key: "epJg",
24281
25082
  value: function createBadge() {
24282
25083
  var _this2 = this;
24283
25084
  var targetFoundCallback = function targetFoundCallback() {
@@ -25094,16 +25895,16 @@
25094
25895
  var RTM = /*#__PURE__*/_createClass(function RTM() {
25095
25896
  var _this = this;
25096
25897
  _classCallCheck(this, RTM);
25097
- _defineProperty(this, "fHZG", {});
25898
+ _defineProperty(this, "VbpC", {});
25098
25899
  _defineProperty(this, "isShowingAction", false);
25099
25900
  _defineProperty(this, "currentAction", null);
25100
- _defineProperty(this, "AJVx", null);
25101
- _defineProperty(this, "version", 95);
25901
+ _defineProperty(this, "QPAJ", null);
25902
+ _defineProperty(this, "version", 97);
25102
25903
  _defineProperty(this, "isInitialised", false);
25103
- _defineProperty(this, "BqLl", {});
25104
- _defineProperty(this, "RdLI", false);
25904
+ _defineProperty(this, "fWpH", {});
25905
+ _defineProperty(this, "NsON", false);
25105
25906
  _defineProperty(this, "_isShownECCalled", false);
25106
- _defineProperty(this, "pjzM", function () {
25907
+ _defineProperty(this, "oLJx", function () {
25107
25908
  _this.isInitialised = true;
25108
25909
  var oldPushState = history.pushState;
25109
25910
  history.pushState = function pushState() {
@@ -25130,7 +25931,7 @@
25130
25931
  var _window;
25131
25932
  (_window = window) === null || _window === void 0 || (_window = _window.ApxorLogger) === null || _window === void 0 || _window.error("logger show");
25132
25933
  if (!_this.isInitialised) {
25133
- _this.pjzM();
25934
+ _this.oLJx();
25134
25935
  }
25135
25936
  window.addEventListener("pagehide", function () {
25136
25937
  var _window$Apxor, _window$Apxor$pageUnl;
@@ -25155,7 +25956,7 @@
25155
25956
  } else if (ui_config.display_type === "new-inline" || ui_config.action_class === "tooltip_builder") {
25156
25957
  _this.createInLineToolTip(ui_config, duration, uuid, name, ui_config.action_class === "tooltip_builder" ? "tooltip_builder" : "new-inline");
25157
25958
  } else if (ui_config.display_type === "coach_mark_v2") {
25158
- _this.qXJu(ui_config, duration, uuid, name);
25959
+ _this.ikBy(ui_config, duration, uuid, name);
25159
25960
  } else {
25160
25961
  showCoachmarkWithDelay(_this, ui_config, {
25161
25962
  configId: uuid,
@@ -25195,7 +25996,7 @@
25195
25996
  });
25196
25997
  _defineProperty(this, "showBadge", function (uiJson, duration, uuid, name, terminationConfig) {
25197
25998
  if (!_this.isInitialised) {
25198
- _this.pjzM();
25999
+ _this.oLJx();
25199
26000
  }
25200
26001
  window.addEventListener("pagehide", function () {
25201
26002
  var _window$Apxor2, _window$Apxor2$pageUn;
@@ -25207,7 +26008,7 @@
25207
26008
  _this.removeBadge(name, uuid);
25208
26009
  }
25209
26010
  var termination_config = JSON.parse(terminationConfig);
25210
- _this.EOyo(ui_config, duration, uuid, name, termination_config);
26011
+ _this.epJg(ui_config, duration, uuid, name, termination_config);
25211
26012
  });
25212
26013
  _defineProperty(this, "showInApp", function (config, duration, configId, name) {
25213
26014
  try {
@@ -25273,7 +26074,7 @@
25273
26074
  try {
25274
26075
  config = config.split("\n").join("\\n");
25275
26076
  var ui_config = JSON.parse(config);
25276
- _this.UCak(ui_config, configId, name, position, slidesSeenCount, view_id);
26077
+ _this.OIaM(ui_config, configId, name, position, slidesSeenCount, view_id);
25277
26078
  } catch (e) {
25278
26079
  var _window$Apxor4;
25279
26080
  if (((_window$Apxor4 = window.Apxor) === null || _window$Apxor4 === void 0 ? void 0 : _window$Apxor4.platform) === "ios") {
@@ -25287,7 +26088,7 @@
25287
26088
  console.error(e);
25288
26089
  }
25289
26090
  });
25290
- _defineProperty(this, "UCak", function (config, configId, name, position, slidesSeenCount, view_id) {
26091
+ _defineProperty(this, "OIaM", function (config, configId, name, position, slidesSeenCount, view_id) {
25291
26092
  var cardsContainer = new Stories(config, configId, name, position, slidesSeenCount, view_id, function () {
25292
26093
  var _window$ApxorRTM3, _config$additional_in3, _config$additional_in4;
25293
26094
  (_window$ApxorRTM3 = window.ApxorRTM) === null || _window$ApxorRTM3 === void 0 || _window$ApxorRTM3.logEvent("apx_nudge_shown", {
@@ -25336,7 +26137,7 @@
25336
26137
  var _window22, _window22$updateFlag, _window23;
25337
26138
  _this.isShowingAction = false;
25338
26139
  _this.currentAction = null;
25339
- _this.AJVx = null;
26140
+ _this.QPAJ = null;
25340
26141
  (_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);
25341
26142
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
25342
26143
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -25347,21 +26148,21 @@
25347
26148
  }
25348
26149
  };
25349
26150
  if (action_class === "new-inline") {
25350
- _this.AJVx = new InLineTooltip(ui_config, [], [], terminationConfig, {
26151
+ _this.QPAJ = new InLineTooltip(ui_config, [], [], terminationConfig, {
25351
26152
  configId: uuid,
25352
26153
  configName: name
25353
26154
  }, _this, onShow, onHide, function () {}, false, 0);
25354
26155
  } else if (action_class === "tooltip_builder") {
25355
- _this.AJVx = new NewInLineTooltip(ui_config, terminationConfig, {
26156
+ _this.QPAJ = new NewInLineTooltip(ui_config, terminationConfig, {
25356
26157
  configId: uuid,
25357
26158
  configName: name
25358
26159
  }, _this, onShow, onHide);
25359
26160
  }
25360
26161
  setTimeout(function () {
25361
- _this.AJVx.createNewTooltip();
26162
+ _this.QPAJ.createNewTooltip();
25362
26163
  }, ui_config.delay);
25363
26164
  });
25364
- _defineProperty(this, "qXJu", function (ui_config, duration, uuid, name) {
26165
+ _defineProperty(this, "ikBy", function (ui_config, duration, uuid, name) {
25365
26166
  var terminationConfig = {};
25366
26167
  terminationConfig["auto_dismiss"] = duration > 0;
25367
26168
  terminationConfig["duration"] = duration;
@@ -25385,7 +26186,7 @@
25385
26186
  var _window27, _window27$updateFlag, _window28;
25386
26187
  _this.isShowingAction = false;
25387
26188
  _this.currentAction = null;
25388
- _this.AJVx = null;
26189
+ _this.QPAJ = null;
25389
26190
  (_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);
25390
26191
  if (window.Apxor && window.Apxor.logActionEvent && !isCancelled) {
25391
26192
  window.Apxor.logActionEvent("inline_dismissed", uuid, name);
@@ -25397,7 +26198,7 @@
25397
26198
  }, _this.stepperCallback, false, 0);
25398
26199
  _this._currentCoachmark.createNewCoachMark();
25399
26200
  });
25400
- _defineProperty(this, "EOyo", function (ui_config, duration, uuid, name, terminationConfig) {
26201
+ _defineProperty(this, "epJg", function (ui_config, duration, uuid, name, terminationConfig) {
25401
26202
  _this._currentBadge = new ApxorBadge(ui_config, terminationConfig, {
25402
26203
  configId: uuid,
25403
26204
  configName: name
@@ -25414,12 +26215,12 @@
25414
26215
  }
25415
26216
  }
25416
26217
  });
25417
- _this._currentBadge.mayB();
25418
- _this._currentBadge.EOyo();
26218
+ _this._currentBadge.dWIh();
26219
+ _this._currentBadge.epJg();
25419
26220
  });
25420
26221
  _defineProperty(this, "updateElementPositionOnScroll", function (top, left, height, width) {
25421
- if (_this.AJVx) {
25422
- _this.AJVx.updateElementPositionOnScroll(top, left, height, width);
26222
+ if (_this.QPAJ) {
26223
+ _this.QPAJ.updateElementPositionOnScroll(top, left, height, width);
25423
26224
  }
25424
26225
  });
25425
26226
  _defineProperty(this, "createInAppVideo", function (config, duration, configId, name) {
@@ -25554,10 +26355,10 @@
25554
26355
  });
25555
26356
  _defineProperty(this, "showPlaceHolder", function () {
25556
26357
  var _window38;
25557
- if (_this.RdLI) {
26358
+ if (_this.NsON) {
25558
26359
  return;
25559
26360
  }
25560
- _this.RdLI = true;
26361
+ _this.NsON = true;
25561
26362
  var ele = document.createElement("div");
25562
26363
  ele.innerHTML = "place your immersive card here";
25563
26364
  ele.style.backgroundColor = "#f5f5f5";