apxor-qe 1.2.4 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -175,6 +175,14 @@
175
175
  return String.fromCharCode(c ^ keyCharAt(key, i));
176
176
  }).join("");
177
177
  }
178
+ function stringToArrayBuffer(str) {
179
+ var buffer = new ArrayBuffer(str.length);
180
+ var view = new Uint8Array(buffer);
181
+ for (var i = 0; i < str.length; i++) {
182
+ view[i] = str.charCodeAt(i);
183
+ }
184
+ return buffer;
185
+ }
178
186
  var decode = function decode(key, data) {
179
187
  data = b64_decode(data);
180
188
  return xor_decrypt(key, data);
@@ -238,16 +246,16 @@
238
246
  var Audience = /*#__PURE__*/_createClass(function Audience() {
239
247
  var _this = this;
240
248
  _classCallCheck(this, Audience);
241
- _defineProperty(this, "OlPJ", "ALL");
242
- _defineProperty(this, "ccAa", []);
243
- _defineProperty(this, "atqR", []);
249
+ _defineProperty(this, "FFVT", "ALL");
250
+ _defineProperty(this, "Peqo", []);
251
+ _defineProperty(this, "ukFQ", []);
244
252
  _defineProperty(this, "parse", function () {
245
253
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
246
254
  try {
247
- _this.OlPJ = config.audience.audience_type;
248
- _this.ccAa = config.audience.attributes.user;
249
- _this.atqR = config.audience.attributes.session;
250
- if (!Array.isArray(_this.ccAa) || !Array.isArray(_this.atqR)) {
255
+ _this.FFVT = config.audience.audience_type;
256
+ _this.Peqo = config.audience.attributes.user;
257
+ _this.ukFQ = config.audience.attributes.session;
258
+ if (!Array.isArray(_this.Peqo) || !Array.isArray(_this.ukFQ)) {
251
259
  Logger.error("No attributes");
252
260
  return false;
253
261
  }
@@ -259,12 +267,12 @@
259
267
  });
260
268
  _defineProperty(this, "validate", function (user, session) {
261
269
  var status = true;
262
- if (_this.OlPJ === "FTU") {
270
+ if (_this.FFVT === "FTU") {
263
271
  status = Apxor.getController().getSessionInfo().is_first_session;
264
272
  }
265
- return status && _this.zowh(user, _this.ccAa) && _this.zowh(session, _this.atqR);
273
+ return status && _this.pYKU(user, _this.Peqo) && _this.pYKU(session, _this.ukFQ);
266
274
  });
267
- _defineProperty(this, "zowh", function (attributes, expected) {
275
+ _defineProperty(this, "pYKU", function (attributes, expected) {
268
276
  var length = expected.length;
269
277
  var status = true;
270
278
  try {
@@ -316,34 +324,34 @@
316
324
  var Frequency = /*#__PURE__*/_createClass(function Frequency() {
317
325
  var _this = this;
318
326
  _classCallCheck(this, Frequency);
319
- _defineProperty(this, "uQfG", 0);
320
- _defineProperty(this, "InyA", 0);
321
- _defineProperty(this, "MtmN", "SESSION");
322
- _defineProperty(this, "btNb", 0);
323
- _defineProperty(this, "sLkK", 0);
324
- _defineProperty(this, "zwUB", 0);
327
+ _defineProperty(this, "FDLa", 0);
328
+ _defineProperty(this, "CBbn", 0);
329
+ _defineProperty(this, "bLov", "SESSION");
330
+ _defineProperty(this, "WzqN", 0);
331
+ _defineProperty(this, "FhVO", 0);
332
+ _defineProperty(this, "HkIT", 0);
325
333
  _defineProperty(this, "parse", function () {
326
334
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
327
335
  try {
328
- _this.uQfG = config.frequency.count;
329
- _this.zwUB = _this.uQfG;
330
- _this.InyA = config.frequency.time_interval;
331
- _this.MtmN = config.frequency.validity;
332
- _this.sLkK = config.frequency.ses_lmt;
336
+ _this.FDLa = config.frequency.count;
337
+ _this.HkIT = _this.FDLa;
338
+ _this.CBbn = config.frequency.time_interval;
339
+ _this.bLov = config.frequency.validity;
340
+ _this.FhVO = config.frequency.ses_lmt;
333
341
  _this._dayCount = config.frequency.day_lmt;
334
342
  // let data = Apxor.getController().getFromStorage(QE_STATE);
335
343
  // let qe_state = JSON.parse(decode(Apxor.getSiteId(), data));
336
344
  var qe_state = CE.getInstance().getQeState();
337
345
  if (!isDefined(qe_state) || !isDefined(qe_state[config._id])) return true;
338
- if (_this.MtmN === "SESSION") {
339
- _this.uQfG = parseInt(_this.uQfG) - parseInt(qe_state[config._id]["SESSION"]);
340
- if (_this.uQfG <= 0) {
346
+ if (_this.bLov === "SESSION") {
347
+ _this.FDLa = parseInt(_this.FDLa) - parseInt(qe_state[config._id]["SESSION"]);
348
+ if (_this.FDLa <= 0) {
341
349
  console.warn("Max count limit reached for session:" + config._id);
342
350
  return false;
343
351
  }
344
- } else if (_this.MtmN === "OVERALL") {
345
- _this.uQfG = parseInt(_this.uQfG) - parseInt(qe_state[config._id]["OVERALL"]);
346
- if (_this.uQfG <= 0) {
352
+ } else if (_this.bLov === "OVERALL") {
353
+ _this.FDLa = parseInt(_this.FDLa) - parseInt(qe_state[config._id]["OVERALL"]);
354
+ if (_this.FDLa <= 0) {
347
355
  console.warn("Max count limit reached for overall:" + config._id);
348
356
  return false;
349
357
  }
@@ -357,28 +365,28 @@
357
365
  }
358
366
  return true;
359
367
  });
360
- _defineProperty(this, "wnxp", function () {
361
- _this.uQfG = _this.uQfG - 1;
368
+ _defineProperty(this, "PUEA", function () {
369
+ _this.FDLa = _this.FDLa - 1;
362
370
  });
363
371
  _defineProperty(this, "getFrequencyCount", function () {
364
- return _this.uQfG;
372
+ return _this.FDLa;
365
373
  });
366
- _defineProperty(this, "ScJa", function () {
367
- if (_this.MtmN === "SESSION") {
368
- _this.uQfG = _this.zwUB;
374
+ _defineProperty(this, "kPus", function () {
375
+ if (_this.bLov === "SESSION") {
376
+ _this.FDLa = _this.HkIT;
369
377
  Logger$1.info("Campaign Limit reset");
370
378
  }
371
379
  });
372
380
  /**
373
- * @function BSns
381
+ * @function Frbd
374
382
  * @description Validates if the campaign count is with in the limits set in the config.
375
383
  * @param {string} Config id
376
384
  * @returns {boolean} true - If the Campaign limits are not reached
377
385
  * false - Otherwise
378
386
  */
379
- _defineProperty(this, "BSns", function (id) {
387
+ _defineProperty(this, "Frbd", function (id) {
380
388
  try {
381
- if (_this.uQfG <= 0) {
389
+ if (_this.FDLa <= 0) {
382
390
  return false;
383
391
  }
384
392
 
@@ -389,8 +397,8 @@
389
397
  if (!isDefined(qe_state) || !isDefined(qe_state[id])) return true;
390
398
 
391
399
  //If the config has a session count limit set
392
- if (_this.sLkK !== 0) {
393
- var sessionCountInConfig = parseInt(_this.sLkK);
400
+ if (_this.FhVO !== 0) {
401
+ var sessionCountInConfig = parseInt(_this.FhVO);
394
402
  var thisSessionCount = parseInt(qe_state[id]["SESSION"]);
395
403
  if (sessionCountInConfig - thisSessionCount <= 0) {
396
404
  return false;
@@ -417,14 +425,14 @@
417
425
  var Meta = /*#__PURE__*/_createClass(function Meta() {
418
426
  var _this = this;
419
427
  _classCallCheck(this, Meta);
420
- _defineProperty(this, "KsvN", "");
421
- _defineProperty(this, "OlPJ", "");
428
+ _defineProperty(this, "CtPY", "");
429
+ _defineProperty(this, "FFVT", "");
422
430
  _defineProperty(this, "parse", function () {
423
431
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
424
432
  try {
425
433
  var _config$meta;
426
- _this.KsvN = config.meta.name;
427
- _this.OlPJ = config.meta.type;
434
+ _this.CtPY = config.meta.name;
435
+ _this.FFVT = config.meta.type;
428
436
  _this._only_context = config.meta.only_context;
429
437
  _this._attr = ((_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.attr) || {};
430
438
  } catch (error) {
@@ -439,11 +447,11 @@
439
447
  var Validity = /*#__PURE__*/_createClass(function Validity() {
440
448
  var _this = this;
441
449
  _classCallCheck(this, Validity);
442
- _defineProperty(this, "AXJi", -1);
443
- _defineProperty(this, "xIZS", -1);
444
- _defineProperty(this, "bhjK", -1);
445
- _defineProperty(this, "WRnt", -1);
446
- _defineProperty(this, "sfJc", false);
450
+ _defineProperty(this, "JHaV", -1);
451
+ _defineProperty(this, "CDOi", -1);
452
+ _defineProperty(this, "qOFY", -1);
453
+ _defineProperty(this, "vZJY", -1);
454
+ _defineProperty(this, "RnJn", false);
447
455
  _defineProperty(this, "parse", function () {
448
456
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
449
457
  try {
@@ -451,17 +459,17 @@
451
459
  Logger$2.error("Not valid dates");
452
460
  return false;
453
461
  }
454
- _this.AXJi = Date.parse(config.validity.start_date);
455
- _this.xIZS = Date.parse(config.validity.end_date);
462
+ _this.JHaV = Date.parse(config.validity.start_date);
463
+ _this.CDOi = Date.parse(config.validity.end_date);
456
464
  if (isDefined(config.time_limits_in_day)) {
457
- _this.sfJc = config.time_limits_in_day;
458
- if (_this.sfJc && isDefined(config.time_limits)) {
465
+ _this.RnJn = config.time_limits_in_day;
466
+ if (_this.RnJn && isDefined(config.time_limits)) {
459
467
  var currentDate = new Date().toISOString().split("T")[0];
460
- _this.bhjK = Date.parse(currentDate + "T" + config.time_limits.start_time + ".000Z");
461
- _this.WRnt = Date.parse(currentDate + "T" + config.time_limits.end_time + ".000Z");
468
+ _this.qOFY = Date.parse(currentDate + "T" + config.time_limits.start_time + ".000Z");
469
+ _this.vZJY = Date.parse(currentDate + "T" + config.time_limits.end_time + ".000Z");
462
470
 
463
471
  // If invalid format is passed, return false
464
- if (isNaN(_this.bhjK) || isNaN(_this.WRnt)) {
472
+ if (isNaN(_this.qOFY) || isNaN(_this.vZJY)) {
465
473
  Logger$2.error("Not valid times");
466
474
  return false;
467
475
  }
@@ -475,8 +483,8 @@
475
483
  });
476
484
  _defineProperty(this, "validate", function () {
477
485
  var currentTime = Date.now();
478
- if (currentTime > _this.AXJi && currentTime < _this.xIZS) {
479
- return !_this.sfJc || currentTime >= _this.bhjK && currentTime <= _this.WRnt;
486
+ if (currentTime > _this.JHaV && currentTime < _this.CDOi) {
487
+ return !_this.RnJn || currentTime >= _this.qOFY && currentTime <= _this.vZJY;
480
488
  }
481
489
  return false;
482
490
  });
@@ -485,13 +493,13 @@
485
493
  var Details = /*#__PURE__*/_createClass(function Details() {
486
494
  var _this = this;
487
495
  _classCallCheck(this, Details);
488
- _defineProperty(this, "KsvN", "");
489
- _defineProperty(this, "OmwE", {});
496
+ _defineProperty(this, "CtPY", "");
497
+ _defineProperty(this, "NVOO", {});
490
498
  _defineProperty(this, "parse", function () {
491
499
  var details = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
492
500
  try {
493
- _this.KsvN = details.name;
494
- _this.OmwE = details.additional_info;
501
+ _this.CtPY = details.name;
502
+ _this.NVOO = details.additional_info;
495
503
  } catch (error) {
496
504
  return false;
497
505
  }
@@ -502,14 +510,14 @@
502
510
  var Timebounds = /*#__PURE__*/_createClass(function Timebounds() {
503
511
  var _this = this;
504
512
  _classCallCheck(this, Timebounds);
505
- _defineProperty(this, "hPng", 0);
506
- _defineProperty(this, "EaoX", 0);
513
+ _defineProperty(this, "RZpl", 0);
514
+ _defineProperty(this, "FsQW", 0);
507
515
  _defineProperty(this, "parse", function () {
508
516
  var timeBounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
509
517
  try {
510
- _this.hPng = Number(timeBounds.lower);
511
- _this.EaoX = Number(timeBounds.upper);
512
- if (isNaN(_this.hPng) || isNaN(_this.EaoX)) {
518
+ _this.RZpl = Number(timeBounds.lower);
519
+ _this.FsQW = Number(timeBounds.upper);
520
+ if (isNaN(_this.RZpl) || isNaN(_this.FsQW)) {
513
521
  return false;
514
522
  }
515
523
  } catch (error) {
@@ -522,17 +530,17 @@
522
530
  var PreCondition = /*#__PURE__*/_createClass(function PreCondition() {
523
531
  var _this = this;
524
532
  _classCallCheck(this, PreCondition);
525
- _defineProperty(this, "ACyh", 0);
526
- _defineProperty(this, "oByE", "");
527
- _defineProperty(this, "XXBT", "");
528
- _defineProperty(this, "QrLp", new Details());
529
- _defineProperty(this, "XwsM", new Timebounds());
533
+ _defineProperty(this, "gplO", 0);
534
+ _defineProperty(this, "AlVX", "");
535
+ _defineProperty(this, "fBwj", "");
536
+ _defineProperty(this, "QYMC", new Details());
537
+ _defineProperty(this, "pWFR", new Timebounds());
530
538
  _defineProperty(this, "parse", function () {
531
539
  var precondition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
532
540
  try {
533
- _this.oByE = precondition.event_type;
534
- _this.XXBT = precondition.activity;
535
- return _this.QrLp.parse(precondition.details) && _this.XwsM.parse(precondition.time_bounds);
541
+ _this.AlVX = precondition.event_type;
542
+ _this.fBwj = precondition.activity;
543
+ return _this.QYMC.parse(precondition.details) && _this.pWFR.parse(precondition.time_bounds);
536
544
  } catch (error) {
537
545
  return false;
538
546
  }
@@ -543,29 +551,29 @@
543
551
  var Condition = /*#__PURE__*/_createClass(function Condition() {
544
552
  var _this = this;
545
553
  _classCallCheck(this, Condition);
546
- _defineProperty(this, "ACyh", 0);
547
- _defineProperty(this, "xiFM", -1);
548
- _defineProperty(this, "uQfG", 0);
549
- _defineProperty(this, "GFOB", "");
550
- _defineProperty(this, "XXBT", "");
551
- _defineProperty(this, "oByE", "");
552
- _defineProperty(this, "XwsM", new Timebounds());
553
- _defineProperty(this, "QrLp", new Details());
554
- _defineProperty(this, "uUDi", new PreCondition());
555
- _defineProperty(this, "hfEI", "AND");
556
- _defineProperty(this, "ytXh", false);
557
- _defineProperty(this, "OlPJ", void 0);
554
+ _defineProperty(this, "gplO", 0);
555
+ _defineProperty(this, "fnMy", -1);
556
+ _defineProperty(this, "FDLa", 0);
557
+ _defineProperty(this, "LXVx", "");
558
+ _defineProperty(this, "fBwj", "");
559
+ _defineProperty(this, "AlVX", "");
560
+ _defineProperty(this, "pWFR", new Timebounds());
561
+ _defineProperty(this, "QYMC", new Details());
562
+ _defineProperty(this, "jsSe", new PreCondition());
563
+ _defineProperty(this, "kURO", "AND");
564
+ _defineProperty(this, "eatT", false);
565
+ _defineProperty(this, "FFVT", void 0);
558
566
  _defineProperty(this, "parse", function () {
559
567
  var condition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
560
568
  try {
561
- _this.xiFM = condition.sequence;
562
- _this.uQfG = condition.count_config.count;
563
- _this.GFOB = condition.count_config.operator;
564
- _this.XXBT = condition.activity;
565
- _this.oByE = condition.event_type;
566
- _this.hfEI = condition.combine_operator;
567
- _this.OlPJ = condition.type;
568
- return _this.QrLp.parse(condition.details) && _this.uUDi.parse(condition.trigger) && _this.XwsM.parse(condition.time_bounds);
569
+ _this.fnMy = condition.sequence;
570
+ _this.FDLa = condition.count_config.count;
571
+ _this.LXVx = condition.count_config.operator;
572
+ _this.fBwj = condition.activity;
573
+ _this.AlVX = condition.event_type;
574
+ _this.kURO = condition.combine_operator;
575
+ _this.FFVT = condition.type;
576
+ return _this.QYMC.parse(condition.details) && _this.jsSe.parse(condition.trigger) && _this.pWFR.parse(condition.time_bounds);
569
577
  } catch (error) {
570
578
  Logger$3.error(error);
571
579
  return false;
@@ -579,19 +587,19 @@
579
587
  function ConditionValidator() {
580
588
  var _this = this;
581
589
  _classCallCheck(this, ConditionValidator);
582
- _defineProperty(this, "gCch", 0);
583
- _defineProperty(this, "khHY", "");
584
- _defineProperty(this, "kTpA", new Condition());
585
- _defineProperty(this, "LeeG", false);
586
- _defineProperty(this, "mOYl", false);
587
- _defineProperty(this, "ccds", 0);
588
- _defineProperty(this, "hfEI", "AND");
589
- _defineProperty(this, "AdbQ", -1);
590
- _defineProperty(this, "MLGX", []);
591
- _defineProperty(this, "auHD", {});
592
- _defineProperty(this, "bACZ", false);
590
+ _defineProperty(this, "vWIX", 0);
591
+ _defineProperty(this, "Fdjl", "");
592
+ _defineProperty(this, "dqkJ", new Condition());
593
+ _defineProperty(this, "AhjD", false);
594
+ _defineProperty(this, "xVdJ", false);
595
+ _defineProperty(this, "BjBE", 0);
596
+ _defineProperty(this, "kURO", "AND");
597
+ _defineProperty(this, "sqsm", -1);
598
+ _defineProperty(this, "wlEj", []);
599
+ _defineProperty(this, "qewW", {});
600
+ _defineProperty(this, "doep", false);
593
601
  /**
594
- * If respectSequence is true, don't auto-UPYl to events except for the condition whose index is 0
602
+ * If respectSequence is true, don't auto-qqsE to events except for the condition whose index is 0
595
603
  *
596
604
  * @param condition
597
605
  * @param type
@@ -606,155 +614,155 @@
606
614
  var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
607
615
  var respectSequence = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
608
616
  var noKpiArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
609
- _this.khHY = id;
610
- _this.ccds = index;
611
- _this.MLGX = noKpiArray;
612
- var result = _this.kTpA.parse(condition);
617
+ _this.Fdjl = id;
618
+ _this.BjBE = index;
619
+ _this.wlEj = noKpiArray;
620
+ var result = _this.dqkJ.parse(condition);
613
621
  if (result) {
614
- _this.hfEI = _this.kTpA.hfEI;
622
+ _this.kURO = _this.dqkJ.kURO;
615
623
 
616
624
  // FIXME: Why this code is written? Don't see any usecase
617
- if (_this.kTpA.ytXh) {
618
- var eventName = _this.kTpA.QrLp.KsvN;
625
+ if (_this.dqkJ.eatT) {
626
+ var eventName = _this.dqkJ.QYMC.CtPY;
619
627
  if (eventName === "APX_PAGE_OPENED") {
620
- eventName = _this.kTpA.QrLp.OmwE["navigation_id"];
621
- eventName = isDefined(eventName) ? eventName : _this.kTpA.QrLp.KsvN;
628
+ eventName = _this.dqkJ.QYMC.NVOO["navigation_id"];
629
+ eventName = isDefined(eventName) ? eventName : _this.dqkJ.QYMC.CtPY;
622
630
  }
623
- _this.AdbQ = Apxor.getController().getEventCount(eventName);
624
- var count = _this.kTpA.uQfG;
625
- var operator = _this.kTpA.GFOB;
626
- _this.mOYl = _this.TnSn(_this.AdbQ - 1, count, operator, false);
627
- _this.LeeG = _this.mOYl;
628
- // If the condition is already satisfied and if it is page view, no need to UPYl
631
+ _this.sqsm = Apxor.getController().getEventCount(eventName);
632
+ var count = _this.dqkJ.FDLa;
633
+ var operator = _this.dqkJ.LXVx;
634
+ _this.xVdJ = _this.LzlO(_this.sqsm - 1, count, operator, false);
635
+ _this.AhjD = _this.xVdJ;
636
+ // If the condition is already satisfied and if it is page view, no need to qqsE
629
637
  // This only applies for NAVIGATION_EVENTS
630
- if (_this.mOYl && _this.kTpA.QrLp.KsvN === "APX_PAGE_OPENED") {
638
+ if (_this.xVdJ && _this.dqkJ.QYMC.CtPY === "APX_PAGE_OPENED") {
631
639
  return true;
632
640
  }
633
641
  }
634
642
  if (!respectSequence || index === 0) {
635
- _this.UPYl();
643
+ _this.qqsE();
636
644
  }
637
645
  return true;
638
646
  }
639
647
  return false;
640
648
  });
641
- _defineProperty(this, "UPYl", function () {
642
- var condition = _this.kTpA;
643
- var precondition = condition.uUDi;
649
+ _defineProperty(this, "qqsE", function () {
650
+ var condition = _this.dqkJ;
651
+ var precondition = condition.jsSe;
644
652
  var ceInstance = CE.getInstance();
645
- if (precondition.oByE === "app_start") {
646
- _this.LeeG = true;
647
- ceInstance.registerForEvent(generateKey(condition.oByE) + "___" + condition.QrLp.KsvN, _this.VolR);
653
+ if (precondition.AlVX === "app_start") {
654
+ _this.AhjD = true;
655
+ ceInstance.registerForEvent(generateKey(condition.AlVX) + "___" + condition.QYMC.CtPY, _this.LydU);
648
656
  } else {
649
- ceInstance.registerForEvent(generateKey(condition.oByE) + "___" + precondition.QrLp.KsvN, _this.VolR);
657
+ ceInstance.registerForEvent(generateKey(condition.AlVX) + "___" + precondition.QYMC.CtPY, _this.LydU);
650
658
  }
651
659
  });
652
- _defineProperty(this, "VNlO", function (type, name, time, additionalInfo) {
653
- var _this$kTpA;
660
+ _defineProperty(this, "uMbk", function (type, name, time, additionalInfo) {
661
+ var _this$dqkJ;
654
662
  var eventTime = Date.now();
655
- var time_differnce = (eventTime - _this.auHD[name]) / 1000;
656
- var time_fromConfig = ((_this$kTpA = _this.kTpA) === null || _this$kTpA === void 0 || (_this$kTpA = _this$kTpA.QrLp) === null || _this$kTpA === void 0 || (_this$kTpA = _this$kTpA.OmwE) === null || _this$kTpA === void 0 ? void 0 : _this$kTpA.time) / 1000;
663
+ var time_differnce = (eventTime - _this.qewW[name]) / 1000;
664
+ var time_fromConfig = ((_this$dqkJ = _this.dqkJ) === null || _this$dqkJ === void 0 || (_this$dqkJ = _this$dqkJ.QYMC) === null || _this$dqkJ === void 0 || (_this$dqkJ = _this$dqkJ.NVOO) === null || _this$dqkJ === void 0 ? void 0 : _this$dqkJ.time) / 1000;
657
665
  if (time_fromConfig > time_differnce) {
658
666
  _this._displayCampaign(time);
659
667
  }
660
668
  });
661
- _defineProperty(this, "dLQC", function (type, name, time, additionalInfo) {
669
+ _defineProperty(this, "kIfZ", function (type, name, time, additionalInfo) {
662
670
  var _this$_condition2, _this$_condition3;
663
- _this.bACZ = true;
671
+ _this.doep = true;
664
672
  var currentTime = Date.now();
665
- var eventName = (_this$_condition2 = _this.kTpA) === null || _this$_condition2 === void 0 || (_this$_condition2 = _this$_condition2.uUDi) === null || _this$_condition2 === void 0 ? void 0 : _this$_condition2.QrLp.KsvN;
666
- var eventTime = _this.auHD[eventName];
673
+ var eventName = (_this$_condition2 = _this.dqkJ) === null || _this$_condition2 === void 0 || (_this$_condition2 = _this$_condition2.jsSe) === null || _this$_condition2 === void 0 ? void 0 : _this$_condition2.QYMC.CtPY;
674
+ var eventTime = _this.qewW[eventName];
667
675
  var time_differnce = (currentTime - eventTime) / 1000;
668
- var time_fromConfig = (_this$_condition3 = _this.kTpA) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.QrLp) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.OmwE) === null || _this$_condition3 === void 0 ? void 0 : _this$_condition3.time;
676
+ var time_fromConfig = (_this$_condition3 = _this.dqkJ) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.QYMC) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.NVOO) === null || _this$_condition3 === void 0 ? void 0 : _this$_condition3.time;
669
677
  time_fromConfig = time_fromConfig / 1000;
670
678
  if (time_fromConfig > time_differnce) {
671
679
  _this._displayCampaign(time);
672
680
  }
673
681
  //unregister the event
674
682
  });
675
- _defineProperty(this, "VolR", function (type, name, time, additionalInfo) {
683
+ _defineProperty(this, "LydU", function (type, name, time, additionalInfo) {
676
684
  var ceInstance = CE.getInstance();
677
- if (!_this.LeeG) {
685
+ if (!_this.AhjD) {
678
686
  // Validate Precondition
679
- _this.LeeG = _this.XASt(type, name, time, additionalInfo);
680
- if (_this.LeeG) {
681
- var condition = _this.kTpA;
682
- var precondition = condition.uUDi;
683
- precondition.ACyh = time;
687
+ _this.AhjD = _this.zOaF(type, name, time, additionalInfo);
688
+ if (_this.AhjD) {
689
+ var condition = _this.dqkJ;
690
+ var precondition = condition.jsSe;
691
+ precondition.gplO = time;
684
692
  //events will be registred by its type activity event_type: "activity_time"
685
- if ((condition === null || condition === void 0 ? void 0 : condition.oByE) === "activity_time") {
686
- var kTpA$QrLp, kTpA$_details2, kTpA$_details3;
687
- var event_time = condition === null || condition === void 0 || (kTpA$QrLp = condition.QrLp) === null || kTpA$QrLp === void 0 || (kTpA$QrLp = kTpA$QrLp.OmwE) === null || kTpA$QrLp === void 0 ? void 0 : kTpA$QrLp.time;
688
- if ((condition === null || condition === void 0 || (kTpA$_details2 = condition.QrLp) === null || kTpA$_details2 === void 0 || (kTpA$_details2 = kTpA$_details2.OmwE) === null || kTpA$_details2 === void 0 ? void 0 : kTpA$_details2.nkpi.length) > 0) {
693
+ if ((condition === null || condition === void 0 ? void 0 : condition.AlVX) === "activity_time") {
694
+ var dqkJ$QYMC, dqkJ$_details2, dqkJ$_details3;
695
+ var event_time = condition === null || condition === void 0 || (dqkJ$QYMC = condition.QYMC) === null || dqkJ$QYMC === void 0 || (dqkJ$QYMC = dqkJ$QYMC.NVOO) === null || dqkJ$QYMC === void 0 ? void 0 : dqkJ$QYMC.time;
696
+ if ((condition === null || condition === void 0 || (dqkJ$_details2 = condition.QYMC) === null || dqkJ$_details2 === void 0 || (dqkJ$_details2 = dqkJ$_details2.NVOO) === null || dqkJ$_details2 === void 0 ? void 0 : dqkJ$_details2.nkpi.length) > 0) {
689
697
  setTimeout(function () {
690
- if (!_this.bACZ) {
691
- _this.mOYl = true;
692
- if (_this.mOYl) {
693
- _this.gCch += 1;
694
- _this.mOYl = _this.TnSn(_this.gCch, _this.kTpA.uQfG, _this.kTpA.GFOB);
695
- if (_this.mOYl) {
696
- _this.kTpA.ACyh = time;
697
- ceInstance.validate(_this.khHY, _this.ccds);
698
+ if (!_this.doep) {
699
+ _this.xVdJ = true;
700
+ if (_this.xVdJ) {
701
+ _this.vWIX += 1;
702
+ _this.xVdJ = _this.LzlO(_this.vWIX, _this.dqkJ.FDLa, _this.dqkJ.LXVx);
703
+ if (_this.xVdJ) {
704
+ _this.dqkJ.gplO = time;
705
+ ceInstance.validate(_this.Fdjl, _this.BjBE);
698
706
  }
699
707
  }
700
708
  }
701
- condition.QrLp.OmwE.nkpi.map(function (nokpi) {
702
- ceInstance.unregisterFromEvent(toUpperCase(condition.QrLp.OmwE.et) + "___" + nokpi, _this);
709
+ condition.QYMC.NVOO.nkpi.map(function (nokpi) {
710
+ ceInstance.unregisterFromEvent(toUpperCase(condition.QYMC.NVOO.et) + "___" + nokpi, _this);
703
711
  });
704
712
  }, event_time);
705
- condition.QrLp.OmwE.nkpi.map(function (nokpi) {
706
- ceInstance.registerForEvent(toUpperCase(condition.QrLp.OmwE.et) + "___" + nokpi, _this.dLQC);
713
+ condition.QYMC.NVOO.nkpi.map(function (nokpi) {
714
+ ceInstance.registerForEvent(toUpperCase(condition.QYMC.NVOO.et) + "___" + nokpi, _this.kIfZ);
707
715
  });
708
716
  }
709
717
  //it is for unregistering the events did case after completing the time imit
710
- if ((condition === null || condition === void 0 || (kTpA$_details3 = condition.QrLp) === null || kTpA$_details3 === void 0 || (kTpA$_details3 = kTpA$_details3.OmwE) === null || kTpA$_details3 === void 0 ? void 0 : kTpA$_details3.kpi.length) > 0) {
718
+ if ((condition === null || condition === void 0 || (dqkJ$_details3 = condition.QYMC) === null || dqkJ$_details3 === void 0 || (dqkJ$_details3 = dqkJ$_details3.NVOO) === null || dqkJ$_details3 === void 0 ? void 0 : dqkJ$_details3.kpi.length) > 0) {
711
719
  setTimeout(function () {
712
- condition.QrLp.OmwE.kpi.map(function (kpi) {
713
- ceInstance.unregisterFromEvent(toUpperCase(condition.QrLp.OmwE.et) + "___" + kpi, _this);
720
+ condition.QYMC.NVOO.kpi.map(function (kpi) {
721
+ ceInstance.unregisterFromEvent(toUpperCase(condition.QYMC.NVOO.et) + "___" + kpi, _this);
714
722
  });
715
723
  }, event_time);
716
- condition.QrLp.OmwE.kpi.map(function (kpi) {
717
- if (kpi === condition.uUDi.QrLp.KsvN) {
724
+ condition.QYMC.NVOO.kpi.map(function (kpi) {
725
+ if (kpi === condition.jsSe.QYMC.CtPY) {
718
726
  //unregister the previous event
719
- ceInstance.unregisterFromEvent(generateKey(precondition.oByE) + "___" + precondition.QrLp.KsvN, _this);
720
- ceInstance.registerForEvent(toUpperCase(condition.QrLp.OmwE.et) + "___" + kpi, _this.VNlO);
727
+ ceInstance.unregisterFromEvent(generateKey(precondition.AlVX) + "___" + precondition.QYMC.CtPY, _this);
728
+ ceInstance.registerForEvent(toUpperCase(condition.QYMC.NVOO.et) + "___" + kpi, _this.uMbk);
721
729
  } else {
722
- ceInstance.registerForEvent(toUpperCase(condition.QrLp.OmwE.et) + "___" + kpi, _this.dLQC);
730
+ ceInstance.registerForEvent(toUpperCase(condition.QYMC.NVOO.et) + "___" + kpi, _this.kIfZ);
723
731
  }
724
732
  });
725
733
  }
726
734
  } else {
727
- ceInstance.unregisterFromEvent(generateKey(precondition.oByE) + "___" + precondition.QrLp.KsvN, _this);
728
- ceInstance.registerForEvent(generateKey(condition.oByE) + "___" + condition.QrLp.KsvN, _this);
735
+ ceInstance.unregisterFromEvent(generateKey(precondition.AlVX) + "___" + precondition.QYMC.CtPY, _this);
736
+ ceInstance.registerForEvent(generateKey(condition.AlVX) + "___" + condition.QYMC.CtPY, _this);
729
737
  }
730
- _this.auHD[name] = Date.now();
738
+ _this.qewW[name] = Date.now();
731
739
  }
732
740
  return;
733
741
  }
734
742
 
735
743
  // Validate Condition
736
- var validationStatus = generateKey(_this.kTpA.oByE) === type && _this.PHir(time - _this.kTpA.uUDi.ACyh, _this.kTpA.XwsM) && _this.kTpA.QrLp.KsvN === name && _this.JXPv(_this.kTpA.QrLp.OmwE, additionalInfo);
744
+ var validationStatus = generateKey(_this.dqkJ.AlVX) === type && _this.Chvr(time - _this.dqkJ.jsSe.gplO, _this.dqkJ.pWFR) && _this.dqkJ.QYMC.CtPY === name && _this.BXyf(_this.dqkJ.QYMC.NVOO, additionalInfo);
737
745
  if (validationStatus) {
738
- _this.gCch += 1;
739
- _this.mOYl = _this.TnSn(_this.gCch, _this.kTpA.uQfG, _this.kTpA.GFOB);
740
- if (_this.mOYl) {
741
- _this.kTpA.ACyh = time;
742
- ceInstance.validate(_this.khHY, _this.ccds);
746
+ _this.vWIX += 1;
747
+ _this.xVdJ = _this.LzlO(_this.vWIX, _this.dqkJ.FDLa, _this.dqkJ.LXVx);
748
+ if (_this.xVdJ) {
749
+ _this.dqkJ.gplO = time;
750
+ ceInstance.validate(_this.Fdjl, _this.BjBE);
743
751
  }
744
752
  }
745
753
  });
746
- _defineProperty(this, "XASt", function (type, name, time, additionalInfo) {
747
- var precondition = _this.kTpA.uUDi;
748
- return generateKey(precondition.oByE) === type && precondition.QrLp.KsvN === name && _this.PHir(time, precondition.XwsM) && _this.JXPv(precondition.QrLp.OmwE, additionalInfo);
754
+ _defineProperty(this, "zOaF", function (type, name, time, additionalInfo) {
755
+ var precondition = _this.dqkJ.jsSe;
756
+ return generateKey(precondition.AlVX) === type && precondition.QYMC.CtPY === name && _this.Chvr(time, precondition.pWFR) && _this.BXyf(precondition.QYMC.NVOO, additionalInfo);
749
757
  });
750
- _defineProperty(this, "PHir", function (time, timeBounds) {
758
+ _defineProperty(this, "Chvr", function (time, timeBounds) {
751
759
  var currentTime = Math.ceil(time);
752
- return currentTime > timeBounds.hPng && currentTime < timeBounds.EaoX;
760
+ return currentTime > timeBounds.RZpl && currentTime < timeBounds.FsQW;
753
761
  });
754
- _defineProperty(this, "TnSn", function (current, required, operator) {
762
+ _defineProperty(this, "LzlO", function (current, required, operator) {
755
763
  var checkOld = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
756
- if (checkOld && _this.kTpA.ytXh) {
757
- current = current + _this.AdbQ;
764
+ if (checkOld && _this.dqkJ.eatT) {
765
+ current = current + _this.sqsm;
758
766
  }
759
767
  switch (operator) {
760
768
  case "EQ":
@@ -771,7 +779,7 @@
771
779
  return false;
772
780
  }
773
781
  });
774
- _defineProperty(this, "JXPv", function (expected, received) {
782
+ _defineProperty(this, "BXyf", function (expected, received) {
775
783
  var status = true;
776
784
  try {
777
785
  var _loop = function _loop() {
@@ -819,13 +827,13 @@
819
827
  key: "_displayCampaign",
820
828
  value: function _displayCampaign(time) {
821
829
  var ceInstance = CE.getInstance();
822
- this.mOYl = true;
823
- if (this.mOYl) {
824
- this.gCch += 1;
825
- this.mOYl = this.TnSn(this.gCch, this.kTpA.uQfG, this.kTpA.GFOB);
826
- if (this.mOYl) {
827
- this.kTpA.ACyh = time;
828
- ceInstance.validate(this.khHY, this.ccds);
830
+ this.xVdJ = true;
831
+ if (this.xVdJ) {
832
+ this.vWIX += 1;
833
+ this.xVdJ = this.LzlO(this.vWIX, this.dqkJ.FDLa, this.dqkJ.LXVx);
834
+ if (this.xVdJ) {
835
+ this.dqkJ.gplO = time;
836
+ ceInstance.validate(this.Fdjl, this.BjBE);
829
837
  }
830
838
  }
831
839
  }
@@ -842,20 +850,20 @@
842
850
  var OverallConfig = /*#__PURE__*/_createClass(function OverallConfig() {
843
851
  var _this = this;
844
852
  _classCallCheck(this, OverallConfig);
845
- _defineProperty(this, "AEeG", []);
853
+ _defineProperty(this, "PMCb", []);
846
854
  _defineProperty(this, "_ret_day", {});
847
- _defineProperty(this, "NGyb", {});
848
- _defineProperty(this, "ySyl", false);
849
- _defineProperty(this, "xrUm", false);
855
+ _defineProperty(this, "ejSN", {});
856
+ _defineProperty(this, "eQvN", false);
857
+ _defineProperty(this, "eEge", false);
850
858
  _defineProperty(this, "parse", function () {
851
859
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
852
860
  try {
853
- _this.AEeG = config.overall_cfg.events;
861
+ _this.PMCb = config.overall_cfg.events;
854
862
  _this._ret_day = config.overall_cfg.ret_day;
855
- _this.NGyb = config.overall_cfg.session;
856
- _this.ySyl = config.overall_cfg.toggleRetDay;
857
- _this.AEeG = config.overall_cfg.events;
858
- _this.xrUm = config.overall_cfg.toggleSession;
863
+ _this.ejSN = config.overall_cfg.session;
864
+ _this.eQvN = config.overall_cfg.toggleRetDay;
865
+ _this.PMCb = config.overall_cfg.events;
866
+ _this.eEge = config.overall_cfg.toggleSession;
859
867
  } catch (error) {
860
868
  Logger$5.error(error);
861
869
  return false;
@@ -865,19 +873,19 @@
865
873
  _defineProperty(this, "validate", function () {
866
874
  var retainedDays = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_DAYS));
867
875
  var retainedSession = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_SESSIONS));
868
- if (_this.ySyl && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
876
+ if (_this.eQvN && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
869
877
  return false;
870
878
  }
871
- if (_this.xrUm && !isNaN(retainedSession) && !(retainedSession >= _this.NGyb.from && retainedSession <= _this.NGyb.to)) {
879
+ if (_this.eEge && !isNaN(retainedSession) && !(retainedSession >= _this.ejSN.from && retainedSession <= _this.ejSN.to)) {
872
880
  return false;
873
881
  }
874
882
  try {
875
883
  // particular event not happened in Life time
876
884
  var data = Apxor.getController().getFromStorage("_apx_lt_count");
877
885
  var siteid = Apxor.getSiteId();
878
- var LtCountObjDecoded = JSON.parse(decode(siteid, data));
879
- for (var i = 0; i < _this.AEeG.length; i++) {
880
- var evName = _this.AEeG[i].name.replace("'", "").replace("’", "");
886
+ var LtCountObjDecoded = JSON.parse(new TextDecoder().decode(stringToArrayBuffer(decode(siteid, data))));
887
+ for (var i = 0; i < _this.PMCb.length; i++) {
888
+ var evName = _this.PMCb[i].name.replace("'", "").replace("’", "");
881
889
  if (LtCountObjDecoded[evName]) {
882
890
  return false;
883
891
  }
@@ -893,15 +901,15 @@
893
901
  var ConfigItem = /*#__PURE__*/_createClass(function ConfigItem() {
894
902
  var _this = this;
895
903
  _classCallCheck(this, ConfigItem);
896
- _defineProperty(this, "tVlQ", []);
897
- _defineProperty(this, "khHY", "");
898
- _defineProperty(this, "vbNk", new Meta());
899
- _defineProperty(this, "lKMm", new Audience());
900
- _defineProperty(this, "MtmN", new Validity());
901
- _defineProperty(this, "ZPkK", new Frequency());
902
- _defineProperty(this, "MiVL", new OverallConfig());
903
- _defineProperty(this, "HAqW", false);
904
- _defineProperty(this, "QzOA", []);
904
+ _defineProperty(this, "BHxj", []);
905
+ _defineProperty(this, "Fdjl", "");
906
+ _defineProperty(this, "FBLV", new Meta());
907
+ _defineProperty(this, "HZsk", new Audience());
908
+ _defineProperty(this, "bLov", new Validity());
909
+ _defineProperty(this, "RUmb", new Frequency());
910
+ _defineProperty(this, "mpfN", new OverallConfig());
911
+ _defineProperty(this, "OBnx", false);
912
+ _defineProperty(this, "lyLV", []);
905
913
  _defineProperty(this, "parse", function () {
906
914
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
907
915
  try {
@@ -918,7 +926,7 @@
918
926
  }
919
927
 
920
928
  // If META, VALIDITY, FREQUENCY and AUDIENCE is not parsed properly, throw it out
921
- if (!(_this.vbNk.parse(config) && _this.MtmN.parse(config) && _this.ZPkK.parse(config) && _this.lKMm.parse(config) && _this.MiVL.parse(config))) {
929
+ if (!(_this.FBLV.parse(config) && _this.bLov.parse(config) && _this.RUmb.parse(config) && _this.HZsk.parse(config) && _this.mpfN.parse(config))) {
922
930
  return false;
923
931
  }
924
932
 
@@ -927,9 +935,9 @@
927
935
  Logger$6.error("No valid conditions", config.conditions);
928
936
  return false;
929
937
  }
930
- _this.khHY = config._id;
931
- _this.HAqW = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
932
- if (_this.HAqW) {
938
+ _this.Fdjl = config._id;
939
+ _this.OBnx = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
940
+ if (_this.OBnx) {
933
941
  // iff respectSequence is true, Sort the Conditions by their sequence order
934
942
  // We need to sort, if server sends them in orderless manner
935
943
  config.conditions.sort(function (prev, current) {
@@ -941,17 +949,17 @@
941
949
  var conditions = config.conditions;
942
950
  var length = conditions.length;
943
951
  for (var index = 0; index < length; index++) {
944
- _this.QzOA = [];
952
+ _this.lyLV = [];
945
953
  var condition = conditions[index];
946
954
  if (condition.type === "didn't") {
947
- var kTpA$details;
955
+ var dqkJ$details;
948
956
  var obj = {
949
957
  trigger_key: condition.trigger.details.name,
950
- no_kpi_array: condition === null || condition === void 0 || (kTpA$details = condition.details) === null || kTpA$details === void 0 || (kTpA$details = kTpA$details.additional_info) === null || kTpA$details === void 0 ? void 0 : kTpA$details.nkpi,
958
+ no_kpi_array: condition === null || condition === void 0 || (dqkJ$details = condition.details) === null || dqkJ$details === void 0 || (dqkJ$details = dqkJ$details.additional_info) === null || dqkJ$details === void 0 ? void 0 : dqkJ$details.nkpi,
951
959
  condition_id: condition === null || condition === void 0 ? void 0 : condition._id,
952
960
  time_bounds: condition.time_bounds.upper
953
961
  };
954
- _this.QzOA = [].concat(_toConsumableArray(_this.QzOA), [obj]);
962
+ _this.lyLV = [].concat(_toConsumableArray(_this.lyLV), [obj]);
955
963
  //this will be the key
956
964
  //when event occur check this array and then then check the time
957
965
  //check the time diffrence
@@ -960,57 +968,57 @@
960
968
  }
961
969
 
962
970
  var conditionValidator = new ConditionValidator();
963
- if (conditionValidator.initialize(condition, _this.khHY, index, _this.HAqW, _this.QzOA)) {
964
- _this.tVlQ.push(conditionValidator);
971
+ if (conditionValidator.initialize(condition, _this.Fdjl, index, _this.OBnx, _this.lyLV)) {
972
+ _this.BHxj.push(conditionValidator);
965
973
  }
966
974
  }
967
- return _this.tVlQ.length > 0;
975
+ return _this.BHxj.length > 0;
968
976
  } catch (error) {
969
977
  Logger$6.error(error);
970
978
  return false;
971
979
  }
972
980
  });
973
- _defineProperty(this, "cxKp", function (index) {
981
+ _defineProperty(this, "BLtn", function (index) {
974
982
  if (index < 0) {
975
983
  return;
976
984
  }
977
- if (_this.HAqW) {
978
- var conditionValidator = _this.tVlQ[index];
979
- if (isDefined(conditionValidator) && conditionValidator.mOYl) {
985
+ if (_this.OBnx) {
986
+ var conditionValidator = _this.BHxj[index];
987
+ if (isDefined(conditionValidator) && conditionValidator.xVdJ) {
980
988
  // Check if previous validator is satisfied
981
- var prevValidator = _this.tVlQ[index - 1];
982
- if (isDefined(prevValidator) && !prevValidator.mOYl) {
989
+ var prevValidator = _this.BHxj[index - 1];
990
+ if (isDefined(prevValidator) && !prevValidator.xVdJ) {
983
991
  // TODO: If current index is satisfied before previous one, do something
984
992
  // either unregister all conditions or remove this item from ConfigLookup
985
993
  return;
986
994
  }
987
- var nextValidator = _this.tVlQ[index + 1];
995
+ var nextValidator = _this.BHxj[index + 1];
988
996
  if (!isDefined(nextValidator)) {
989
997
  // It means this is the last condition
990
998
  // Validate all conditions
991
- _this.VxHD();
999
+ _this.CtCE();
992
1000
  } else {
993
- nextValidator.UPYl();
1001
+ nextValidator.qqsE();
994
1002
  }
995
1003
  }
996
1004
  } else {
997
1005
  // Validate all conditions
998
- _this.VxHD();
1006
+ _this.CtCE();
999
1007
  }
1000
1008
  });
1001
- _defineProperty(this, "VxHD", function () {
1009
+ _defineProperty(this, "CtCE", function () {
1002
1010
  // Check If Audience, Validity is satisfied or not
1003
1011
  var userAttributes = Apxor.getController().getUserAttributes();
1004
1012
  var sessionAttributes = Apxor.getController().getSessionAttributes();
1005
- if (!_this.MtmN.validate() || !_this.lKMm.validate(userAttributes, sessionAttributes) || !_this.MiVL.validate()) {
1013
+ if (!_this.bLov.validate() || !_this.HZsk.validate(userAttributes, sessionAttributes) || !_this.mpfN.validate()) {
1006
1014
  return;
1007
1015
  }
1008
- var length = _this.tVlQ.length;
1016
+ var length = _this.BHxj.length;
1009
1017
  var isSatisfied = length < 1;
1010
1018
  var combineOperator = "";
1011
1019
  for (var index = 0; index < length; index++) {
1012
- var validator = _this.tVlQ[index];
1013
- var currentResult = validator.mOYl;
1020
+ var validator = _this.BHxj[index];
1021
+ var currentResult = validator.xVdJ;
1014
1022
  if (combineOperator.trim() === "") {
1015
1023
  isSatisfied = currentResult;
1016
1024
  } else {
@@ -1023,47 +1031,47 @@
1023
1031
  break;
1024
1032
  }
1025
1033
  }
1026
- combineOperator = validator.hfEI;
1034
+ combineOperator = validator.kURO;
1027
1035
  }
1028
1036
  if (isSatisfied) {
1029
1037
  console.debug("onCondition satisfied");
1030
1038
  // Check if count reached it's maximum
1031
- if (!_this.ZPkK.BSns(_this.khHY)) {
1032
- console.warn("Maximum limit reached", _this.khHY);
1039
+ if (!_this.RUmb.Frbd(_this.Fdjl)) {
1040
+ console.warn("Maximum limit reached", _this.Fdjl);
1033
1041
  return;
1034
1042
  }
1035
- console.log("Dispatching event", _this.vbNk.OlPJ);
1036
- if (_this.vbNk._only_context === true) {
1037
- Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.vbNk._attr), {}, {
1038
- message_name: _this.vbNk.KsvN,
1039
- id: _this.khHY
1043
+ console.log("Dispatching event", _this.FBLV.FFVT);
1044
+ if (_this.FBLV._only_context === true) {
1045
+ Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.FBLV._attr), {}, {
1046
+ message_name: _this.FBLV.CtPY,
1047
+ id: _this.Fdjl
1040
1048
  }));
1041
1049
  }
1042
1050
  // Emit event
1043
- Apxor.getController().dispatchEvent(_this.vbNk.OlPJ, {
1044
- name: _this.vbNk.OlPJ,
1051
+ Apxor.getController().dispatchEvent(_this.FBLV.FFVT, {
1052
+ name: _this.FBLV.FFVT,
1045
1053
  additional_info: {
1046
- uuid: _this.khHY,
1047
- name: _this.vbNk.KsvN
1054
+ uuid: _this.Fdjl,
1055
+ name: _this.FBLV.CtPY
1048
1056
  }
1049
1057
  });
1050
1058
  }
1051
1059
  });
1052
- _defineProperty(this, "wnxp", function () {
1053
- _this.ZPkK.wnxp();
1060
+ _defineProperty(this, "PUEA", function () {
1061
+ _this.RUmb.PUEA();
1054
1062
  });
1055
1063
  _defineProperty(this, "getFrequencyCount", function () {
1056
- return _this.ZPkK.getFrequencyCount();
1064
+ return _this.RUmb.getFrequencyCount();
1057
1065
  });
1058
- _defineProperty(this, "TFzA", function () {
1059
- return _this.ZPkK.ScJa();
1066
+ _defineProperty(this, "YMgG", function () {
1067
+ return _this.RUmb.kPus();
1060
1068
  });
1061
1069
  });
1062
1070
 
1063
1071
  var ConfigLookup = /*#__PURE__*/_createClass(function ConfigLookup() {
1064
1072
  var _this = this;
1065
1073
  _classCallCheck(this, ConfigLookup);
1066
- _defineProperty(this, "gTqz", {});
1074
+ _defineProperty(this, "benn", {});
1067
1075
  _defineProperty(this, "parse", function () {
1068
1076
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
1069
1077
  configs: []
@@ -1086,7 +1094,7 @@
1086
1094
  var configId = _config._id;
1087
1095
  var configItem = new ConfigItem();
1088
1096
  if (configItem.parse(_config)) {
1089
- _this.gTqz[configId] = configItem;
1097
+ _this.benn[configId] = configItem;
1090
1098
  } else {
1091
1099
  console.warn("Failed to parse cfg", configId);
1092
1100
  }
@@ -1094,31 +1102,31 @@
1094
1102
  }
1095
1103
  });
1096
1104
  _defineProperty(this, "validate", function (id, index) {
1097
- if (_this.gTqz[id]) {
1098
- var configItem = _this.gTqz[id];
1099
- configItem.cxKp(index);
1105
+ if (_this.benn[id]) {
1106
+ var configItem = _this.benn[id];
1107
+ configItem.BLtn(index);
1100
1108
  }
1101
1109
  });
1102
- _defineProperty(this, "wnxp", function (id) {
1103
- var campiagnConfig = _this.gTqz[id];
1104
- campiagnConfig.wnxp();
1110
+ _defineProperty(this, "PUEA", function (id) {
1111
+ var campiagnConfig = _this.benn[id];
1112
+ campiagnConfig.PUEA();
1105
1113
  });
1106
1114
  _defineProperty(this, "getFrequencyCount", function (id) {
1107
- var campiagnConfig = _this.gTqz[id];
1115
+ var campiagnConfig = _this.benn[id];
1108
1116
  return campiagnConfig.getFrequencyCount();
1109
1117
  });
1110
1118
  _defineProperty(this, "resetFrequencyCounts", function () {
1111
- var configs = _this.gTqz;
1119
+ var configs = _this.benn;
1112
1120
  for (var configId in configs) {
1113
- configs[configId].TFzA();
1121
+ configs[configId].YMgG();
1114
1122
  }
1115
1123
  });
1116
- _defineProperty(this, "Xijd", function (campaignId) {
1124
+ _defineProperty(this, "SynP", function (campaignId) {
1117
1125
  try {
1118
- if (_this.gTqz) {
1119
- var configItem = _this.gTqz[campaignId];
1120
- if (configItem && configItem.vbNk) {
1121
- return configItem.vbNk;
1126
+ if (_this.benn) {
1127
+ var configItem = _this.benn[campaignId];
1128
+ if (configItem && configItem.FBLV) {
1129
+ return configItem.FBLV;
1122
1130
  }
1123
1131
  }
1124
1132
  } catch (e) {
@@ -1134,42 +1142,42 @@
1134
1142
  var EventsListener = /*#__PURE__*/_createClass(function EventsListener() {
1135
1143
  var _this = this;
1136
1144
  _classCallCheck(this, EventsListener);
1137
- _defineProperty(this, "SPrF", {});
1138
- _defineProperty(this, "EcTh", []);
1139
- _defineProperty(this, "HxWM", false);
1145
+ _defineProperty(this, "VywR", {});
1146
+ _defineProperty(this, "Tdmf", []);
1147
+ _defineProperty(this, "wJFP", false);
1140
1148
  _defineProperty(this, "initialize", function () {
1141
1149
  var controller = Apxor.getController();
1142
1150
  controller.registerForEvent(APP_EVENT, function (event) {
1143
- return _this.ZKQc(event, "AE");
1151
+ return _this.tkDV(event, "AE");
1144
1152
  });
1145
1153
  controller.registerForEvent(CLIENT_EVENT, function (event) {
1146
- return _this.ZKQc(event, "CE");
1154
+ return _this.tkDV(event, "CE");
1147
1155
  });
1148
1156
  });
1149
- _defineProperty(this, "MhGD", function () {
1157
+ _defineProperty(this, "QkcY", function () {
1150
1158
  // Clear Buffer
1151
- for (var item in _this.EcTh) {
1152
- _this.gdBA(item.event, item.key, item.type);
1159
+ for (var item in _this.Tdmf) {
1160
+ _this.MCKA(item.event, item.key, item.type);
1153
1161
  }
1154
- _this.HxWM = true;
1162
+ _this.wJFP = true;
1155
1163
  });
1156
- _defineProperty(this, "rzbt", function (event, callback) {
1164
+ _defineProperty(this, "HhWj", function (event, callback) {
1157
1165
  if (!isFunction(callback)) {
1158
1166
  return;
1159
1167
  }
1160
1168
  var listeners;
1161
- if (_this.SPrF[event]) {
1162
- listeners = _this.SPrF[event];
1169
+ if (_this.VywR[event]) {
1170
+ listeners = _this.VywR[event];
1163
1171
  } else {
1164
1172
  listeners = [];
1165
1173
  }
1166
1174
  listeners.push(callback);
1167
- _this.SPrF[event] = listeners;
1168
- Logger$7.debug("Listeners list: ", _this.SPrF);
1175
+ _this.VywR[event] = listeners;
1176
+ Logger$7.debug("Listeners list: ", _this.VywR);
1169
1177
  });
1170
1178
  _defineProperty(this, "unregisterFromEvent", function (event, callback) {
1171
- if (_this.SPrF[event]) {
1172
- var listeners = _this.SPrF[event];
1179
+ if (_this.VywR[event]) {
1180
+ var listeners = _this.VywR[event];
1173
1181
  var updatedListeners = [];
1174
1182
  for (var index = 0; index < listeners.length; index++) {
1175
1183
  var listener = listeners[index];
@@ -1177,25 +1185,25 @@
1177
1185
  updatedListeners.push(listener);
1178
1186
  }
1179
1187
  }
1180
- _this.SPrF[event] = updatedListeners;
1188
+ _this.VywR[event] = updatedListeners;
1181
1189
  }
1182
1190
  });
1183
- _defineProperty(this, "ZKQc", function (event) {
1191
+ _defineProperty(this, "tkDV", function (event) {
1184
1192
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "AE";
1185
1193
  var key = type + "___" + event.name;
1186
- _this.gdBA(event, key, type);
1194
+ _this.MCKA(event, key, type);
1187
1195
  });
1188
- _defineProperty(this, "gdBA", function (event, key, type) {
1189
- if (!_this.HxWM) {
1190
- _this.EcTh.push({
1196
+ _defineProperty(this, "MCKA", function (event, key, type) {
1197
+ if (!_this.wJFP) {
1198
+ _this.Tdmf.push({
1191
1199
  event: event,
1192
1200
  key: key,
1193
1201
  type: type
1194
1202
  });
1195
1203
  } else {
1196
- Logger$7.debug("Notifying listeners for event: " + event + ", " + key, _this.SPrF);
1197
- if (_this.SPrF[key]) {
1198
- var listeners = _this.SPrF[key];
1204
+ Logger$7.debug("Notifying listeners for event: " + event + ", " + key, _this.VywR);
1205
+ if (_this.VywR[key]) {
1206
+ var listeners = _this.VywR[key];
1199
1207
  var time = Apxor.getController().getSDKRunningTimeInSec();
1200
1208
  for (var index = 0; index < listeners.length; index++) {
1201
1209
  var listener = listeners[index];
@@ -1211,17 +1219,17 @@
1211
1219
  function CE() {
1212
1220
  var _this = this;
1213
1221
  _classCallCheck(this, CE);
1214
- _defineProperty(this, "CueH", false);
1215
- _defineProperty(this, "TVGk", null);
1216
- _defineProperty(this, "XFkq", getDateInDDMMYYYY());
1217
- _defineProperty(this, "CKgK", new EventsListener());
1218
- _defineProperty(this, "cuhG", Apxor.getSiteId());
1222
+ _defineProperty(this, "nckW", false);
1223
+ _defineProperty(this, "yTlh", null);
1224
+ _defineProperty(this, "JXUH", getDateInDDMMYYYY());
1225
+ _defineProperty(this, "cINd", new EventsListener());
1226
+ _defineProperty(this, "TKYH", Apxor.getSiteId());
1219
1227
  _defineProperty(this, "_qeState", {});
1220
1228
  _defineProperty(this, "getQeState", function () {
1221
1229
  try {
1222
1230
  var data = Apxor.getController().getFromStorage(QE_STATE);
1223
1231
  if (data) {
1224
- return JSON.parse(decode(_this.cuhG, data));
1232
+ return JSON.parse(decode(_this.TKYH, data));
1225
1233
  } else {
1226
1234
  _this._qeState = {};
1227
1235
  return _this.setQeState();
@@ -1250,10 +1258,10 @@
1250
1258
  return _this._qeState;
1251
1259
  });
1252
1260
  _defineProperty(this, "initialize", function () {
1253
- if (!_this.CueH) {
1254
- _this.CueH = true;
1255
- _this.TVGk = new ConfigLookup();
1256
- _this.CKgK.initialize();
1261
+ if (!_this.nckW) {
1262
+ _this.nckW = true;
1263
+ _this.yTlh = new ConfigLookup();
1264
+ _this.cINd.initialize();
1257
1265
  _this._qeState = _this.getQeState();
1258
1266
  Logger$8.info("QE Initialized..");
1259
1267
  }
@@ -1264,12 +1272,12 @@
1264
1272
  * @param config
1265
1273
  */
1266
1274
  _defineProperty(this, "parse", function (config) {
1267
- if (!_this.iafS()) {
1275
+ if (!_this.kEWF()) {
1268
1276
  Logger$8.warn("Must call init first. Unable to proceed");
1269
1277
  return;
1270
1278
  }
1271
- _this.TVGk.parse(config);
1272
- _this.CKgK.MhGD();
1279
+ _this.yTlh.parse(config);
1280
+ _this.cINd.QkcY();
1273
1281
  });
1274
1282
  /**
1275
1283
  * Validates all conditions for given config ID
@@ -1278,10 +1286,10 @@
1278
1286
  * @param index
1279
1287
  */
1280
1288
  _defineProperty(this, "validate", function (id, index) {
1281
- if (!_this.iafS()) {
1289
+ if (!_this.kEWF()) {
1282
1290
  return;
1283
1291
  }
1284
- _this.TVGk.validate(id, index);
1292
+ _this.yTlh.validate(id, index);
1285
1293
  });
1286
1294
  _defineProperty(this, "updateCount", function (id) {
1287
1295
  try {
@@ -1290,22 +1298,22 @@
1290
1298
  }
1291
1299
  _this.incrementFrequencies(id);
1292
1300
  _this.setQeState(id);
1293
- _this.TVGk.wnxp(id);
1301
+ _this.yTlh.PUEA(id);
1294
1302
  } catch (e) {
1295
1303
  console.log("Could not update the count config:".concat(e));
1296
1304
  }
1297
1305
  });
1298
1306
  _defineProperty(this, "resetFrequencyCounts", function () {
1299
- _this.TVGk.resetFrequencyCounts();
1307
+ _this.yTlh.resetFrequencyCounts();
1300
1308
  });
1301
1309
  _defineProperty(this, "getFrequencyCount", function (id) {
1302
- return _this.TVGk.getFrequencyCount(id);
1310
+ return _this.yTlh.getFrequencyCount(id);
1303
1311
  });
1304
1312
  _defineProperty(this, "registerForEvent", function (event, callback) {
1305
- _this.CKgK.rzbt(event, callback);
1313
+ _this.cINd.HhWj(event, callback);
1306
1314
  });
1307
1315
  _defineProperty(this, "unregisterFromEvent", function (event, callback) {
1308
- _this.CKgK.unregisterFromEvent(event, callback);
1316
+ _this.cINd.unregisterFromEvent(event, callback);
1309
1317
  });
1310
1318
  /**
1311
1319
  * Fetches the config from Server
@@ -1318,14 +1326,14 @@
1318
1326
  _defineProperty(this, "fetch", function (type, validateUrl, apiUrl, callback) {
1319
1327
  Apxor.getController().fetchConfiguration(type, validateUrl, apiUrl, callback);
1320
1328
  });
1321
- _defineProperty(this, "iafS", function () {
1322
- return _this.CueH;
1329
+ _defineProperty(this, "kEWF", function () {
1330
+ return _this.nckW;
1323
1331
  });
1324
1332
  _defineProperty(this, "getCampaignMetaFromQueryEngine", function (campaignId) {
1325
- return _this.TVGk.Xijd(campaignId);
1333
+ return _this.yTlh.SynP(campaignId);
1326
1334
  });
1327
- _defineProperty(this, "SZpm", function () {
1328
- return _this.XFkq;
1335
+ _defineProperty(this, "VBfn", function () {
1336
+ return _this.JXUH;
1329
1337
  });
1330
1338
  if (!CE.instance) {
1331
1339
  CE.instance = this;
@@ -1349,7 +1357,7 @@
1349
1357
  OVERALL: 0,
1350
1358
  DATES: {}
1351
1359
  };
1352
- if (this.XFkq) this._qeState[id].DATES[this.XFkq] = 0;
1360
+ if (this.JXUH) this._qeState[id].DATES[this.JXUH] = 0;
1353
1361
  this.setQeState(id);
1354
1362
  }
1355
1363
  } catch (e) {
@@ -1368,12 +1376,12 @@
1368
1376
 
1369
1377
  // Increment the DATES count for this particular date by 1. If the date changes reset.
1370
1378
  var currentDate = getDateInDDMMYYYY();
1371
- if (currentDate !== this.XFkq || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
1372
- this.XFkq = currentDate;
1379
+ if (currentDate !== this.JXUH || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
1380
+ this.JXUH = currentDate;
1373
1381
  configFrequency.DATES = {};
1374
- configFrequency.DATES[this.XFkq] = 0;
1382
+ configFrequency.DATES[this.JXUH] = 0;
1375
1383
  }
1376
- configFrequency.DATES[this.XFkq] = configFrequency.DATES[this.XFkq] + 1;
1384
+ configFrequency.DATES[this.JXUH] = configFrequency.DATES[this.JXUH] + 1;
1377
1385
  }
1378
1386
  }], [{
1379
1387
  key: "getInstance",
@@ -1392,7 +1400,7 @@
1392
1400
 
1393
1401
  /* eslint-disable no-empty */
1394
1402
 
1395
- window.ceVersion = 124;
1403
+ window.ceVersion = 130;
1396
1404
  try {
1397
1405
  if (exports !== undefined || exports !== null) {
1398
1406
  exports["default"] = CE;