apxor-qe 1.6.2-qa.0 → 1.6.3-qa.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.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("apxor")):"function"==typeof define&&define.amd?define(["apxor"],e):(t=t||self)["apxor-qe"]=e(t.Apxor)}(this,(function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,n){return(e=l(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var d=window.ApxorLogger,v=function(t){return void 0!==t&&!function(t){return null===t}(t)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function f(t,e){return Array.from(e).map((function(e,n){return String.fromCharCode(e^function(t,e){return t.charCodeAt(Math.floor(e%t.length))}(t,n))})).join("")}var p=function(t,e){return f(t,e=function(t){var e,n,r,i,o,a,s=0,u=[];if(!t)return t;t+="";do{e=(a=h.indexOf(t.charAt(s++))<<18|h.indexOf(t.charAt(s++))<<12|(i=h.indexOf(t.charAt(s++)))<<6|(o=h.indexOf(t.charAt(s++))))>>16&255,n=a>>8&255,r=255&a,u.push(e),64!==i&&(u.push(n),64!==o&&u.push(r))}while(s<t.length);return u}(e))},g=function(t){switch(t){case"app_event":return"AE";case"client_event":return"CE";case"activity_time":case"activity_event":return"AE"}return"Unknown"},_=function(t){return t.toUpperCase()},m=function(t,e,n){switch(n){case"EQ":return t===e;case"GT":return t>e;case"GTE":return t>=e;case"LT":return t<e;case"LTE":return t<=e;case"NEQ":return t!==e;case"R":return y(e).test(t);default:return!1}},y=function(t){var e=t.replace(/.*\/([gimuy]*)$/,"$1");e===t&&(e="");var n=e?t.replace(new RegExp("^/(.*?)/"+e+"$"),"$1"):t;return new RegExp(n,e)},w=function(){var t=new Date;return t.getDate()+"/"+t.getMonth()+"/"+t.getFullYear()},x=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i="([^/]+)",o=n?n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"):"",a=e.replace(new RegExp(o,"g"),i),s=new RegExp("^".concat(a)+(r?"":"$")),u=t.match(s);return null!==u};function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=E(t,e);if(o){var a=function(){if(C(o)){return function(t){return D(t)}(o)}return d.info("Invalid target element. Width and height are 0 for element: ".concat(t,". Can't show tooltip")),!1};return a()}return n?(d.info("Not found yet. Rechecking the DOM."),I(i,r,t,e)):(d.info("Element with selector:".concat(t," not found.")),!1)}function I(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=setInterval((function(){var e=E(n,r);if(e){clearInterval(i);!function(){if(C()){D()}else d.info("Invalid target element. Width and height are 0 for element: ".concat(n,". Can't show tooltip"))}()}else(t-=1)<=0&&(clearInterval(i),console.warn("Element with selector:".concat(n," not found.")))}),e)}var E=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=document.getElementById(t);if(!r)try{r=document.querySelector(t)}catch(t){window.ApxorLogger.error("Error finding element in DOM:"+t)}(r||(r=S(t)),!r&&n.length>0)&&(r=null===(e=document.getElementById(n))||void 0===e||null===(e=e.contentWindow)||void 0===e||null===(e=e.document)||void 0===e?void 0:e.querySelector(t));return r},S=function(t){var e=t.indexOf("svg");-1!==e&&(t=t.substring(0,e)+"svg:svg");try{return document.xOwj(t,document,(function(t){return"svg"===t?"http://www.w3.org/2000/svg":null}),XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(t){window.ApxorLogger.error("Error finding element in DOM:"+t)}return null};function C(t){try{var e=t.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(t){return!1}return!0}function D(t){var e,n,r,i;return!!(n=(e=t).offsetHeight,r=e.offsetWidth,(i=e.getBoundingClientRect()).left>=-r&&i.top>=-n&&i.right<=(window.innerWidth||document.documentElement.clientWidth)+r&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)+n)}var A=function(t){var e='\n <style> \n .apx-container{\n padding:10px;\n }\n </style>\n <div id="apx-innerElement" class="apx-container">\n <div id="close-button" style="cursor: pointer;position:absolute;top:9px;right:9px;"><svg width="11" height="11" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path opacity="0.5" d="M11.0962 9.07071L17.8586 15.8331L15.8331 17.8586L9.0707 11.0962L8.99999 11.0255L8.92928 11.0962L2.16693 17.8586L0.141421 15.8331L6.90379 9.07071L6.9745 9L6.90379 8.92929L0.141421 2.16694L2.16693 0.141422L8.92928 6.9038L8.99999 6.97451L9.0707 6.9038L15.8331 0.141422L17.8586 2.16694L11.0962 8.92929L11.0255 9L11.0962 9.07071Z" fill="white" stroke="#002845" stroke-width="0.2"/>\n </svg>\n </div>\n <div style="font-family: inherit;font-style: normal;font-weight: 600;font-size: 16px;line-height: 22px;\n color: #FFFFFF; display: flex; gap: 12px;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-check-filled" width="33" height="33" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" stroke-width="0" fill="currentColor" />\n</svg><div style = "align-self: center;padding-right:20px;">'.concat(t,"</div></div>\n </div>\n "),n=document.createElement("div");n.style="\n z-index:99999999;\n background:#16202f;\n position:fixed;\n top:1%;\n right:1%;\n border-radius: 12px;\n ",n.innerHTML=e,n.id="apx-container",document.body.appendChild(n)},F=window.ApxorLogger,O=a((function e(){var n=this;i(this,e),s(this,"MLcB","ALL"),s(this,"dsWR",[]),s(this,"LTNO",[]),s(this,"userAttributesValidated",!0),s(this,"sessionAttributeValidated",!0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(n.MLcB=t.audience.audience_type,n.dsWR=t.audience.attributes.user,n.LTNO=t.audience.attributes.session,!Array.isArray(n.dsWR)||!Array.isArray(n.LTNO))return F.error("No attributes"),!1}catch(t){return F.error(t),!1}return!0})),s(this,"validate",(function(e,r){var i=!0;"FTU"===n.MLcB&&(i=t.getController().getSessionInfo().is_first_session);var o=n.oQgb(e,n.dsWR),a=n.oQgb(r,n.LTNO);return o||(n.userAttributesValidated=!1),a||(n.sessionAttributeValidated=!1),i&&o&&a})),s(this,"oQgb",(function(t,e){var n=e.length,r=!0;try{for(var i,o=function(){var n=e[a];if(void 0===t[n.name]||!1===r)return{v:!1};var i=n.operator,o=n.type,s=n.value.map((function(t){if("s"===o)return t;if("l"===o)return parseInt(t);if("f"===o)return parseFloat(t);if("b"===o)switch(t){case"true":return!0;case"false":return!1;default:return t}})),u=(Array.isArray(t[n.name])?t[n.name]:[t[n.name]]).some((function(t){return s.some((function(e){return"s"===o?t="".concat(t):"l"===o?t=parseInt(t):"f"===o?t=parseFloat(t):"b"===o&&(t=!!t),m(t,e,i)}))}));r=r&&u},a=0;a<n;a++)if(i=o())return i.v}catch(t){F.error(t),r=!1}return r}))})),L=window.ApxorLogger,U=a((function e(){var n=this;i(this,e),s(this,"ansI",0),s(this,"XsJV",0),s(this,"FXvj","SESSION"),s(this,"DALS",0),s(this,"hPUi",0),s(this,"fckB",0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{n.xKIU=t._id,n.UzYn=t.meta,n.ansI=t.frequency.count,-1===n.ansI&&(n.ansI=1e3),n.fckB=n.ansI,n.XsJV=t.frequency.time_interval,n.FXvj=t.frequency.validity,n.hPUi=t.frequency.ses_lmt,n._dayCount=t.frequency.day_lmt;var e=it.getInstance().getQeState();if(!v(e)||!v(e[t._id]))return!0;if("SESSION"===n.FXvj){if(n.ansI=parseInt(n.ansI)-parseInt(e[t._id].SESSION),n.ansI<=0)return n.QyOa("Session limit reached"),console.warn("Max count limit reached for session:"+t._id),!1}else{if("OVERALL"!==n.FXvj)return L.info("Invalid config."),!1;if(n.ansI=parseInt(n.ansI)-parseInt(e[t._id].OVERALL),n.ansI<=0)return n.QyOa("Overall limit reached"),console.warn("Max count limit reached for overall:"+t._id),!1}}catch(t){return L.error(t),!1}return!0})),s(this,"PrTa",(function(){n.ansI=n.ansI-1})),s(this,"getFrequencyCount",(function(){return n.ansI})),s(this,"hYCk",(function(){"SESSION"===n.FXvj&&(n.ansI=n.fckB,L.info("Campaign Limit reset"))})),s(this,"fhhD",(function(t){try{if(n.ansI<=0)return"OVERALL"===n.FXvj?n.QyOa("Overall limit reached"):"SESSION"===n.FXvj&&n.QyOa("Session limit reached"),!1;var e=it.getInstance().getQeState();if(!v(e)||!v(e[t]))return!0;if(0!==n.hPUi)if(parseInt(n.hPUi)-parseInt(e[t].SESSION)<=0)return n.QyOa("Session limit reached"),!1;if(0!==n._dayCount){var r,i=w();if(parseInt(n._dayCount)-parseInt((null===(r=e[t])||void 0===r?void 0:r.DATES[i])||0)<=0)return n.QyOa("Day limit reached"),!1}}catch(t){n.QyOa("Error validating the frequency: ".concat(t)),L.error("Error validating the frequency:"+t)}return!0})),s(this,"QyOa",(function(e){var r;null==t||t.logEvent("apx_non_eligible_user",{apx_nudge_type:"SURVEY"===n.UzYn.type?"survey":"campaign",apx_nudge_id:n.xKIU,apx_nudge_name:n.UzYn.name,apx_variant_code:n.UzYn.isExperiment||n.UzYn.only_context?null===(r=n.UzYn.attr)||void 0===r?void 0:r.apx_variant_code:"TG",apx_failure_type:"warn",apx_reason:e})}))})),H=a((function t(){var e=this;i(this,t),s(this,"hqtt",""),s(this,"MLcB",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var n,r;e.hqtt=t.meta.name,e.MLcB=t.meta.type,e._only_context=t.meta.only_context,e._attr=(null===(n=t.meta)||void 0===n?void 0:n.attr)||{},e._isExperiment=null===(r=t.meta)||void 0===r?void 0:r.isExperiment}catch(t){return window.ApxorLogger.error(t),!1}return!0}))})),z=window.ApxorLogger,N=a((function t(){var e=this;i(this,t),s(this,"pOyH",-1),s(this,"PSJt",-1),s(this,"LHUD",-1),s(this,"SuFC",-1),s(this,"CtxV",!1),s(this,"_nudge_expired",!1),s(this,"_not_yet_active",!1),s(this,"_not_in_specified_time",!1),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(isNaN(Date.parse(t.validity.start_date))||isNaN(Date.parse(t.validity.end_date)))return z.error("Not valid dates"),!1;if(e.pOyH=Date.parse(t.validity.start_date),e.PSJt=Date.parse(t.validity.end_date),v(t.at_specific_time)&&(e.CtxV=t.at_specific_time,e.CtxV&&v(t.time_limits))){var n=(new Date).toISOString().split("T")[0];if(e.LHUD=Date.parse(n+"T"+t.time_limits.start_time+":00.000Z"),e.SuFC=Date.parse(n+"T"+t.time_limits.end_time+":00.000Z"),isNaN(e.LHUD)||isNaN(e.SuFC))return z.error("Not valid times"),!1}}catch(t){return z.error(t),!1}return!0})),s(this,"validate",(function(){var t=Date.now();return t>e.pOyH&&t<e.PSJt?(!e.CtxV||t>=e.LHUD&&t<=e.SuFC||(e._not_in_specified_time=!0),!e.CtxV||t>=e.LHUD&&t<=e.SuFC):(t<e.pOyH?e._not_yet_active=!0:t>e.PSJt&&(e._nudge_expired=!0),!1)}))})),T=a((function t(){var e=this;i(this,t),s(this,"hqtt",""),s(this,"XKvc",{}),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{e.hqtt=t.name,e.XKvc=t.additional_info}catch(t){return!1}return!0}))})),P=a((function t(){var e=this;i(this,t),s(this,"xBDg",0),s(this,"sjKZ",0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(e.xBDg=Number(t.lower),e.sjKZ=Number(t.upper),isNaN(e.xBDg)||isNaN(e.sjKZ))return!1}catch(t){return!1}return!0}))})),B=a((function t(){var e=this;i(this,t),s(this,"BXjF",0),s(this,"rNjl",""),s(this,"PWJL",""),s(this,"VfDz",new T),s(this,"jJSu",new P),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.rNjl=t.event_type,e.PWJL=t.activity,e.VfDz.parse(t.details)&&e.jJSu.parse(t.time_bounds)}catch(t){return!1}}))})),j=window.ApxorLogger,Q=a((function t(){var e=this;i(this,t),s(this,"BXjF",0),s(this,"eXhV",-1),s(this,"ansI",0),s(this,"cLqc",""),s(this,"PWJL",""),s(this,"rNjl",""),s(this,"jJSu",new P),s(this,"VfDz",new T),s(this,"wYau",new B),s(this,"NcmX","AND"),s(this,"GWHp",!1),s(this,"MLcB",void 0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.eXhV=t.sequence,e.ansI=t.count_config.count,e.cLqc=t.count_config.operator,e.PWJL=t.activity,e.rNjl=t.event_type,e.NcmX=t.combine_operator,e.MLcB=t.type,e.VfDz.parse(t.details)&&e.wYau.parse(t.trigger)&&e.jJSu.parse(t.time_bounds)}catch(t){return j.error(t),!1}}))})),V=window.ApxorLogger,q=a((function t(){var e=this;i(this,t),s(this,"ansI",0),s(this,"cLqc",""),s(this,"rNjl",""),s(this,"jJSu",new P),s(this,"VfDz",new T),s(this,"NcmX","AND"),s(this,"parse",(function(t){try{return e.ansI=t.count_config.count,e.cLqc=t.count_config.operator,e.rNjl=t.event_type,e.NcmX=t.combine_operator,e.VfDz.parse(t.details)&&e.jJSu.parse(t.time_bounds)}catch(t){return V.error(t),!1}}))})),k=window.ApxorLogger,X=function(){function e(){var n=this;i(this,e),s(this,"EdOZ",0),s(this,"xKIU",""),s(this,"HPBH",new Q),s(this,"FcCI",new q),s(this,"BkRH",!1),s(this,"lAQm",!1),s(this,"vJCV",0),s(this,"NcmX","AND"),s(this,"cTHv","OR"),s(this,"SIsf",-1),s(this,"WNGW",[]),s(this,"MHiS",{}),s(this,"CwKf",!1),s(this,"initialize",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";if(n.xKIU=r,n.vJCV=i,n.WNGW=a,"termination"===s&&""!==s){n.FcCI.parse(e);return n.cTHv=n.FcCI.NcmX,n.jVsY(),!0}var u=n.HPBH.parse(e);if(u){if(n.NcmX=n.HPBH.NcmX,n.HPBH.GWHp){var c=n.HPBH.VfDz.hqtt;"APX_PAGE_OPENED"===c&&(c=n.HPBH.VfDz.XKvc.navigation_id,c=v(c)?c:n.HPBH.VfDz.hqtt),n.SIsf=t.getController().getEventCount(c);var l=n.HPBH.ansI,d=n.HPBH.cLqc;if(n.lAQm=n.cCpn(n.SIsf-1,l,d,!1),n.BkRH=n.lAQm,n.lAQm&&"APX_PAGE_OPENED"===n.HPBH.VfDz.hqtt)return!0}return o&&0!==i||n.GRBk(),!0}return!1})),s(this,"GRBk",(function(){var t,e=n.HPBH,r=e.wYau,i=it.getInstance();"app_start"===r.rNjl?(n.BkRH=!0,i.registerForEvent(g(e.rNjl)+"___"+e.VfDz.hqtt,n.rXqr)):i.registerForEvent(g(e.rNjl)+"___"+r.VfDz.hqtt,n.rXqr),null!==(t=window.ApxorRTM)&&void 0!==t&&t.badgesLists.includes(n.xKIU)&&i.registerForEvent(g(e.rNjl)+"___"+"apxor-badge-container-".concat("-".concat(n.xKIU).replaceAll(" ","").replace(/[^\w\s]/gi,"")),n.rXqr)})),s(this,"jVsY",(function(){var t=n.FcCI,e=it.getInstance();n.BkRH=!0,e.registerForEvent(g(t.rNjl)+"___"+t.VfDz.hqtt,n.nCho)})),s(this,"sDtI",(function(t,e,r,i){var o,a=(Date.now()-n.MHiS[e])/1e3;(null===(o=n.HPBH)||void 0===o||null===(o=o.VfDz)||void 0===o||null===(o=o.XKvc)||void 0===o?void 0:o.time)/1e3>a&&n._displayCampaign(r)})),s(this,"hyIv",(function(t,e,r,i){var o,a;n.CwKf=!0;var s=Date.now(),u=null===(o=n.HPBH)||void 0===o||null===(o=o.wYau)||void 0===o?void 0:o.VfDz.hqtt,c=(s-n.MHiS[u])/1e3,l=null===(a=n.HPBH)||void 0===a||null===(a=a.VfDz)||void 0===a||null===(a=a.XKvc)||void 0===a?void 0:a.time;(l/=1e3)>c&&n._displayCampaign(r)})),s(this,"rXqr",(function(e,r,i,o){var a,s,u=it.getInstance();if(n.BkRH){if(null!==(a=window.ApxorRTM)&&void 0!==a&&a.isBadgePresent&&null!==(s=window.ApxorRTM)&&void 0!==s&&s.badgesLists.includes(n.xKIU)&&t.getController().isBadgeTriggerSatisfied(n.xKIU))return n.lAQm=!0,n.HPBH.BXjF=i,void u.validate(n.xKIU,n.vJCV);g(n.HPBH.rNjl)===e&&n.mBlI(i-n.HPBH.wYau.BXjF,n.HPBH.jJSu)&&n.HPBH.VfDz.hqtt===r&&n.dpga(n.HPBH.VfDz.XKvc,o)&&(n.EdOZ+=1,n.lAQm=n.cCpn(n.EdOZ,n.HPBH.ansI,n.HPBH.cLqc),n.lAQm&&(n.HPBH.BXjF=i,u.validate(n.xKIU,n.vJCV)))}else if(n.BkRH=n.pNGQ(e,r,i,o),n.BkRH){var c=n.HPBH,l=c.wYau;if(l.BXjF=i,"activity_time"===(null==c?void 0:c.rNjl)){var d,v,h,f=null==c||null===(d=c.VfDz)||void 0===d||null===(d=d.XKvc)||void 0===d?void 0:d.time;(null==c||null===(v=c.VfDz)||void 0===v||null===(v=v.XKvc)||void 0===v?void 0:v.nkpi.length)>0&&(setTimeout((function(){n.CwKf||(n.lAQm=!0,n.lAQm&&(n.EdOZ+=1,n.lAQm=n.cCpn(n.EdOZ,n.HPBH.ansI,n.HPBH.cLqc),n.lAQm&&(n.HPBH.BXjF=i,u.validate(n.xKIU,n.vJCV)))),c.VfDz.XKvc.nkpi.map((function(t){u.unregisterFromEvent(_(c.VfDz.XKvc.et)+"___"+t,n)}))}),f),c.VfDz.XKvc.nkpi.map((function(t){u.registerForEvent(_(c.VfDz.XKvc.et)+"___"+t,n.hyIv)}))),(null==c||null===(h=c.VfDz)||void 0===h||null===(h=h.XKvc)||void 0===h?void 0:h.kpi.length)>0&&(setTimeout((function(){c.VfDz.XKvc.kpi.map((function(t){u.unregisterFromEvent(_(c.VfDz.XKvc.et)+"___"+t,n)}))}),f),c.VfDz.XKvc.kpi.map((function(t){t===c.wYau.VfDz.hqtt?(u.unregisterFromEvent(g(l.rNjl)+"___"+l.VfDz.hqtt,n),u.registerForEvent(_(c.VfDz.XKvc.et)+"___"+t,n.sDtI)):u.registerForEvent(_(c.VfDz.XKvc.et)+"___"+t,n.hyIv)})))}else u.unregisterFromEvent(g(l.rNjl)+"___"+l.VfDz.hqtt,n),u.registerForEvent(g(c.rNjl)+"___"+c.VfDz.hqtt,n);n.MHiS[r]=Date.now()}})),s(this,"nCho",(function(t,e,r,i){var o=it.getInstance();g(n.FcCI.rNjl)===t&&n.mBlI(r,n.FcCI.jJSu)&&n.FcCI.VfDz.hqtt===e&&n.dpga(n.FcCI.VfDz.XKvc,i)&&(n.EdOZ+=1,n.lAQm=n.cCpn(n.EdOZ,n.FcCI.ansI,n.FcCI.cLqc),n.lAQm&&(n.FcCI.BXjF=r,o.validateForTermination(n.xKIU,n.vJCV)))})),s(this,"pNGQ",(function(t,e,r,i){var o=n.HPBH.wYau;return g(o.rNjl)===t&&o.VfDz.hqtt===e&&n.mBlI(r,o.jJSu)&&n.dpga(o.VfDz.XKvc,i)})),s(this,"mBlI",(function(t,e){var n=Math.ceil(t);return n>e.xBDg&&n<e.sjKZ})),s(this,"cCpn",(function(t,e,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];switch(i&&n.HPBH.GWHp&&(t+=n.SIsf),r){case"EQ":return t===e;case"GT":return t>e;case"GTE":return t>=e;case"LT":return t<e;case"LTE":return t<=e;default:return!1}})),s(this,"dpga",(function(t,e){var n=!0;try{var i,o=function(){if(!1===n)return{v:!1};if("object"===r(t[a])){var i,o=t[a].op,s=t[a].t;if("s"===s)i=t[a].val;else if("l"===s||"f"===s)i=parseFloat(t[a].val);else if("b"===s)switch(t[a].val){case"true":i=!0;break;case"false":i=!1;break;default:i=t[a].val}var u=(Array.isArray(e[a])?e[a]:[e[a]]).some((function(t){return"s"===s?t="".concat(t):"l"===s?t=parseInt(t):"f"===s?t=parseFloat(t):"b"===s&&(t=!!t),m(t,i,o)}));n=n&&u}else n=n&&m(e[a],t[a],"EQ")};for(var a in t)if(i=o())return i.v}catch(t){k.error(t),n=!1}return n}))}return a(e,[{key:"_displayCampaign",value:function(t){var e=it.getInstance();this.lAQm=!0,this.lAQm&&(this.EdOZ+=1,this.lAQm=this.cCpn(this.EdOZ,this.HPBH.ansI,this.HPBH.cLqc),this.lAQm&&(this.HPBH.BXjF=t,e.validate(this.xKIU,this.vJCV)))}}]),e}(),K=window.ApxorLogger,Y=a((function e(){var n=this;i(this,e),s(this,"SxPK",[]),s(this,"_ret_day",{}),s(this,"rPFc",{}),s(this,"nhio",!1),s(this,"ANMQ",!1),s(this,"retainedDaysValidated",!0),s(this,"retainedSessionValidated",!0),s(this,"eventDoneInLT",!1),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{n.SxPK=t.overall_cfg.events,n._ret_day=t.overall_cfg.ret_day,n.rPFc=t.overall_cfg.session,n.nhio=t.overall_cfg.toggleRetDay,n.ANMQ=t.overall_cfg.toggleSession}catch(t){return K.error(t),!1}return!0})),s(this,"validate",(function(){var e=parseInt(t.getController().getFromStorage("apx_retained_days")),r=parseInt(t.getController().getFromStorage("apx_retained_session"));if(n.nhio&&!isNaN(e)&&!(e>=n._ret_day.from&&e<=n._ret_day.to))return n.retainedDaysValidated=!1,!1;if(n.ANMQ&&!isNaN(r)&&!(r>=n.rPFc.from&&r<=n.rPFc.to))return n.retainedSessionValidated=!1,!1;try{for(var i=t.getController().getFromStorage("_apx_lt_count"),o=t.getSiteId(),a=JSON.parse((new TextDecoder).decode(function(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return e}(p(o,i)))),s=0;s<n.SxPK.length;s++){if(a[n.SxPK[s].name.replace("'","").replace("’","")])return n.eventDoneInLT=!0,!1}}catch(t){K.error("Failed to validate the lt count:"+t)}return!0}))})),R=window.ApxorLogger,J=a((function t(){var e=this;i(this,t),s(this,"dsWR",[]),s(this,"LTNO",[]),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(e.dsWR=t.attributes.user,e.LTNO=t.attributes.session,!Array.isArray(e.dsWR)||!Array.isArray(e.LTNO))return R.error("No attributes"),!1}catch(t){return R.error(t),!1}return!0})),s(this,"validate",(function(t,n){return e.oQgb(t,e.dsWR)&&e.oQgb(n,e.LTNO)})),s(this,"oQgb",(function(t,e){var n=e.length,r=!0;try{for(var i,o=function(){var n=e[a];if(!t[n.name]||!1===r)return{v:!1};var i=n.operator,o=n.type,s=n.value.map((function(t){return"s"===o?t:"l"===o?parseInt(t):"f"===o?parseFloat(t):void 0})),u=(Array.isArray(t[n.name])?t[n.name]:[t[n.name]]).some((function(t){return s.some((function(e){return m(t,e,i)}))}));r=r&&u},a=0;a<n;a++)if(i=o())return i.v}catch(t){R.error(t),r=!1}return r}))})),M=a((function e(){var n=this;i(this,e),s(this,"qHaI",t.getController()),s(this,"type",""),s(this,"_duration_seconds",0),s(this,"wNpm",1),s(this,"parse",(function(t){try{var e,r,i;if(n.MLcB=null===(e=t.terminate_info.time_based)||void 0===e?void 0:e.type,n._duration_seconds=null===(r=t.terminate_info)||void 0===r?void 0:r.time_based.duration_seconds,n.wNpm=null===(i=t.terminate_info.time_based)||void 0===i?void 0:i.days,n.FrGM(t._id))return n.qHaI.persistTerminationInfoLocally(t._id),!1}catch(t){return!1}return!0})),s(this,"FrGM",(function(t){var e,r=JSON.parse(n.qHaI.getFromStorage("apx_termination_ID"));if(!r[t]||null===(e=r[t])||void 0===e||!e.startDate)return!1;var i,o=new Date(r[t].startDate),a=new Date((i=new Date).getMonth()+"/"+i.getDate()+"/"+i.getFullYear()),s=parseInt((a-o)/864e5,10),u=function(){var t=new Date;return{hours:t.getHours(),mins:t.getMinutes()}}(),c=r[t].LHUD;return s===n.wNpm&&u.hours>=c.hours||s>n.wNpm||r[t].goalAcheived}))})),W=a((function t(){var e=this;i(this,t),s(this,"enable_goal_events",!1),s(this,"attributes",{}),s(this,"mnOu",new J),s(this,"hHRZ",new M),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var n,r,i;if(e.enable_time_based=null==t||null===(n=t.terminate_info)||void 0===n?void 0:n.enable_time_based,e.enable_time_based&&!e.hHRZ.parse(t))return!1;if(e.enable_goal_events=null==t||null===(r=t.terminate_info)||void 0===r?void 0:r.enable_goal_events,e.enable_attributes=null==t||null===(i=t.terminate_info)||void 0===i?void 0:i.enable_attributes,e.enable_attributes&&!e.mnOu.parse(t.terminate_info))return!1}catch(t){return window.ApxorLogger.error(t),!1}return!0})),s(this,"validate",(function(t,n){return e.mnOu.validate(t,n)}))})),Z=a((function t(){var e=this;i(this,t),s(this,"zciv",""),s(this,"DDKo",""),s(this,"TZPK",""),s(this,"UqJE",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.zciv=null==t?void 0:t.screen_binding,!e.zciv||(e.DDKo=null==t?void 0:t.binding.url,e.TZPK=null==t?void 0:t.binding.var,e.UqJE=null==t?void 0:t.binding.operator,!0)}catch(t){return window.ApxorLogger.error(t),!1}})),s(this,"validate",(function(){var t=e.DDKo,n=e.TZPK,r=e.UqJE,i=window.location.href;return!e.zciv||("EQ"===r?t.includes(n)?!!x(i,t,n,!1):i===t:"SW"===r?t.includes(n)?!!x(i,t,n,!0):!!i.startsWith(t):void 0)}))})),G=window.ApxorLogger,$=a((function e(){var r=this;i(this,e),s(this,"pZCC",[]),s(this,"eCJJ",[]),s(this,"xKIU",""),s(this,"UzYn",new H),s(this,"trWM",new O),s(this,"FXvj",new N),s(this,"rQSF",new U),s(this,"ZIao",new Y),s(this,"TgFO",new W),s(this,"kpCc",new Z),s(this,"wOSL",!1),s(this,"IsFF",[]),s(this,"_variant_code",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var e;if(!v(t._id))return G.error("No Id"),!1;if(!v(t.enabled)||!t.enabled)return G.error("Not enabled"),!1;if(!(r.UzYn.parse(t)&&r.FXvj.parse(t)&&r.rQSF.parse(t)&&r.trWM.parse(t)&&r.ZIao.parse(t)&&r.TgFO.parse(t)&&r.kpCc.parse(t)))return!1;if(r._variant_code=r.UzYn._isExperiment||r.UzYn._only_context?null===(e=r.UzYn._attr)||void 0===e?void 0:e.apx_variant_code:"TG",!v(t.conditions)||!Array.isArray(t.conditions))return G.error("No valid conditions",t.conditions),!1;r.xKIU=t._id,r.wOSL=!!v(t.sequence_enabled)&&t.sequence_enabled,r.wOSL&&t.conditions.sort((function(t,e){return t.sequence<e.sequence}));var n=t.conditions,i=n.length,o=null==t?void 0:t.no_context_enabled;0===i&&o&&r.evpT();for(var a=function(){r.IsFF=[];var t=n[s];if("didn't"===t.type){var e,i={trigger_key:t.trigger.details.name,no_kpi_array:null==t||null===(e=t.details)||void 0===e||null===(e=e.additional_info)||void 0===e?void 0:e.nkpi,condition_id:null==t?void 0:t._id,time_bounds:t.time_bounds.upper};r.IsFF=[].concat(u(r.IsFF),[i])}var o=new X;if(o.initialize(t,r.xKIU,s,r.wOSL,r.IsFF)){r.pZCC.push(o);var a=(null==t?void 0:t.timeout)/(null==t?void 0:t.findinterval),c=(null==t?void 0:t.frameid)||"",l=null==t?void 0:t.url;window.location.href===l&&"view_visibility"===t.event_type&&!0===b(t.view_id,c,null==t?void 0:t.enable_retry,null==t?void 0:t.findinterval,a)&&r.evpT(!0),window.addEventListener("navigate",(function(e){var n=null==t?void 0:t.url;window.location.href===n&&"view_visibility"===t.event_type&&!0===b(t.view_id,c,null==t?void 0:t.enable_retry,null==t?void 0:t.findinterval,a)&&r.evpT(!0)}))}},s=0;s<i;s++)a();if(r.TgFO.enable_goal_events)for(var c=t.terminate_info.goal_events.events,l=c.length,d=0;d<l;d++){var h=new X;h.initialize(c[d],r.xKIU,d,!0,[],"termination")&&r.eCJJ.push(h)}return r.pZCC.length>0}catch(t){return G.error(t),!1}})),s(this,"xOwj",(function(t){if(!(t<0))if(r.wOSL){var e=r.pZCC[t];if(v(e)&&e.lAQm){var n=r.pZCC[t-1];if(v(n)&&!n.lAQm)return;var i=r.pZCC[t+1];v(i)?i.GRBk():r.evpT()}}else r.evpT()})),s(this,"YTOO",(function(t){t<0||r.cClV()})),s(this,"evpT",(function(){var e,i,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=t.getController().getUserAttributes(),s=t.getController().getSessionAttributes();if(null!==(e=window.ApxorRTM)&&void 0!==e&&e.isBadgePresent&&null!==(i=window.ApxorRTM)&&void 0!==i&&i.badgesLists.includes(r.xKIU)&&t.getController().isBadgeTriggerSatisfied(r.xKIU)||null==t||t.logEvent("apx_trigger_satisfied",{apx_nudge_type:"SURVEY"===r.UzYn.MLcB?"survey":"campaign",apx_nudge_id:r.xKIU,apx_nudge_name:r.UzYn.hqtt,apx_variant_code:r.UzYn._isExperiment||r.UzYn._only_context?r.UzYn._attr.apx_variant_code:"TG"}),!(r.FXvj.validate()&&r.trWM.validate(a,s)&&r.ZIao.validate()&&r.kpCc.validate()))return r.ZIao.retainedDaysValidated?r.ZIao.retainedSessionValidated?r.ZIao.eventDoneInLT?void r.QyOa("Event done in life time"):r.trWM.userAttributesValidated?r.trWM.sessionAttributeValidated?r.FXvj._not_in_specified_time?void r.QyOa("Time limits check failed"):r.FXvj._not_yet_active?void r.QyOa("not in the scheduled time"):r.FXvj._nudge_expired?void r.QyOa("nudge expired"):void 0:void r.QyOa("Session property filter not met"):void r.QyOa("User property filter not met"):void r.QyOa("User session criteria not met"):void r.QyOa("Retained day criteria not met");var u=r.pZCC.length,c=u<1,l="";0===u&&(c=!0);for(var d=0;d<u;d++){var v=r.pZCC[d],h=v.lAQm;if(""===l.trim())c=h;else switch(l){case"AND":c=c&&h;break;case"OR":c=c||h}l=v.NcmX}if(!0===o&&(c=!0),c){if(console.debug("onCondition satisfied"),!r.rQSF.fhhD(r.xKIU)){if(console.warn("Maximum limit reached",r.xKIU),t.getController().isTestDevice()){A("Maximum limit reached for campaign name ".concat(r.UzYn.hqtt));var f=document.getElementById("close-button"),p=function(){var t=document.getElementById("apx-container");null==t||t.remove()};null==f||f.addEventListener("click",p),window.setTimeout(p,2e4)}return}console.log("Dispatching event",r.UzYn.MLcB),t.logEvent("apx_context_evaluated",n(n({apx_nudge_type:"SURVEY"===r.UzYn.MLcB?"survey":"campaign",apx_nudge_id:r.xKIU,apx_nudge_name:r.UzYn.hqtt,apx_variant_code:r.UzYn._isExperiment||r.UzYn._only_context?r.UzYn._attr.apx_variant_code:"TG"},r.UzYn._attr),{},{message_name:r.UzYn.hqtt,id:r.xKIU})),t.getController().dispatchEvent(r.UzYn.MLcB,{name:r.UzYn.MLcB,additional_info:{uuid:r.xKIU,name:r.UzYn.hqtt}})}})),s(this,"cClV",(function(){for(var e=r.eCJJ.length,i=e<1,o="",a=0;a<e;a++){var s=r.eCJJ[a],u=s.lAQm;if(""===o.trim())i=u;else switch(o){case"AND":i=i&&u;break;case"OR":i=i||u}o=s.cTHv}i&&(console.log("Dispatching event",r.UzYn.MLcB),t.getController().persistTerminationInfoLocally(r.xKIU),!0===r.UzYn._only_context&&t.logEvent("apx_context_evaluated",n(n({},r.UzYn._attr),{},{message_name:r.UzYn.hqtt,id:r.xKIU})),t.getController().dispatchEvent(r.UzYn.MLcB,{name:r.UzYn.MLcB,additional_info:{uuid:r.xKIU,name:r.UzYn.hqtt}}))})),s(this,"validateForTerminationAttributes",(function(){var e=t.getController().getUserAttributes(),n=t.getController().getSessionAttributes();return r.TgFO.validate(e,n)})),s(this,"PrTa",(function(){r.rQSF.PrTa()})),s(this,"getFrequencyCount",(function(){return r.rQSF.getFrequencyCount()})),s(this,"TDWH",(function(){return r.rQSF.hYCk()})),s(this,"QyOa",(function(e){var n;null==t||t.logEvent("apx_non_eligible_user",{apx_nudge_type:"SURVEY"===r.UzYn.MLcB?"survey":"campaign",apx_nudge_id:r.xKIU,apx_nudge_name:r.UzYn.hqtt,apx_variant_code:r.UzYn._isExperiment||r.UzYn._only_context?null===(n=r.UzYn._attr)||void 0===n?void 0:n.apx_variant_code:"TG",apx_failure_type:"warn",apx_reason:e})}))})),tt=a((function t(){var e=this;i(this,t),s(this,"rDWk",{}),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{configs:[]};if(v(t)&&v(t.configs)){var n=t.configs;if(!Array.isArray(n))return;n.sort((function(t,e){var n,r;return(null!==(n=t.prio)&&void 0!==n?n:-1)-(null!==(r=e.prio)&&void 0!==r?r:-1)}));for(var r=0;r<n.length;r++){var i=n[r],o=i._id,a=new $;a.parse(i)?e.rDWk[o]=a:console.warn("Failed to parse cfg",o)}}})),s(this,"validate",(function(t,n){e.rDWk[t]&&e.rDWk[t].xOwj(n)})),s(this,"getVariantCode",(function(t){return e.rDWk[t]?e.rDWk[t]._variant_code:""})),s(this,"validateForTermination",(function(t,n){e.rDWk[t]&&e.rDWk[t].YTOO(n)})),s(this,"validateForTerminationAttributes",(function(t){return!!e.rDWk[t]&&e.rDWk[t].validateForTerminationAttributes()})),s(this,"PrTa",(function(t){e.rDWk[t].PrTa()})),s(this,"getFrequencyCount",(function(t){var n=e.rDWk[t];if(null!=n)return n.getFrequencyCount()})),s(this,"resetFrequencyCounts",(function(){var t=e.rDWk;for(var n in t)t[n].TDWH()})),s(this,"zmqm",(function(t){try{if(e.rDWk){var n=e.rDWk[t];if(n&&n.UzYn)return n.UzYn}}catch(t){console.log("Error in getting the campaign meta ".concat(t))}return{}}))})),et=window.ApxorLogger,nt=a((function e(){var n=this;i(this,e),s(this,"xUEh",{}),s(this,"asOE",[]),s(this,"CQYb",!1),s(this,"initialize",(function(){var e=t.getController();e.registerForEvent("APP_EVENT",(function(t){return n.Xijx(t,"AE")})),e.registerForEvent("CLIENT_EVENT",(function(t){return n.Xijx(t,"CE")}))})),s(this,"QENl",(function(){for(var t in n.asOE)n.hpBl(t.event,t.key,t.type);n.CQYb=!0})),s(this,"Cbqw",(function(t,e){var r;"function"==typeof e&&((r=n.xUEh[t]?n.xUEh[t]:[]).push(e),n.xUEh[t]=r,et.debug("Listeners list: ",n.xUEh))})),s(this,"unregisterFromEvent",(function(t,e){if(n.xUEh[t]){for(var r=n.xUEh[t],i=[],o=0;o<r.length;o++){var a=r[o];a!==e&&i.push(a)}n.xUEh[t]=i}})),s(this,"Xijx",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"AE",r=e+"___"+t.name;n.hpBl(t,r,e)})),s(this,"hpBl",(function(e,r,i){if(n.CQYb){if(et.debug("Notifying listeners for event: "+e+", "+r,n.xUEh),n.xUEh[r])for(var o=n.xUEh[r],a=t.getController().getSDKRunningTimeInSec(),s=0;s<o.length;s++){(0,o[s])(i,e.name,a,e.additional_info)}}else n.asOE.push({event:e,key:r,type:i})}))})),rt=window.ApxorLogger,it=function(){function e(){var n=this;return i(this,e),s(this,"CjwR",!1),s(this,"GcQU",null),s(this,"zyPd",w()),s(this,"ZcbS",new nt),s(this,"XlUq",t.getSiteId()),s(this,"boHJ",{}),s(this,"getQeState",(function(){try{var e=t.getController().getFromStorage("qe_state");return e?JSON.parse(p(n.XlUq,e)):(n.boHJ={},n.setQeState())}catch(t){return n.boHJ={},n.setQeState()}})),s(this,"setQeState",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{t.getController().persistToStorage("qe_state",n.boHJ,!0)}catch(r){""===e?n.boHJ={}:n.boHJ[e]={SESSION:0,OVERALL:0,DATES:{}},t.getController().persistToStorage("qe_state",n.boHJ,!0)}return n.boHJ})),s(this,"initialize",(function(){n.CjwR||(n.CjwR=!0,n.GcQU=new tt,n.ZcbS.initialize(),n.boHJ=n.getQeState(),rt.info("QE Initialized.."))})),s(this,"parse",(function(t){n.Ctkq()?(n.GcQU.parse(t),n.ZcbS.QENl()):rt.warn("Must call init first. Unable to proceed")})),s(this,"validate",(function(t,e){n.Ctkq()&&n.GcQU.validate(t,e)})),s(this,"getVariantCode",(function(t){return n.GcQU.getVariantCode(t)})),s(this,"validateForTermination",(function(t,e){n.Ctkq()&&n.GcQU.validateForTermination(t,e)})),s(this,"validateForTerminationAttributes",(function(t,e){return n.GcQU.validateForTerminationAttributes(t,e)})),s(this,"updateCount",(function(t){try{v(n.boHJ[t])||n.createObjConfig(t),n.incrementFrequencies(t),n.setQeState(t),n.GcQU.PrTa(t)}catch(t){console.log("Could not update the count config:".concat(t))}})),s(this,"resetFrequencyCounts",(function(){n.GcQU.resetFrequencyCounts()})),s(this,"getFrequencyCount",(function(t){return n.GcQU.getFrequencyCount(t)})),s(this,"registerForEvent",(function(t,e){n.ZcbS.Cbqw(t,e)})),s(this,"unregisterFromEvent",(function(t,e){n.ZcbS.unregisterFromEvent(t,e)})),s(this,"notifyEventListener",(function(t){n.ZcbS.Xijx(t)})),s(this,"fetch",(function(e,n,r,i){t.getController().fetchConfiguration(e,n,r,i)})),s(this,"Ctkq",(function(){return n.CjwR})),s(this,"getCampaignMetaFromQueryEngine",(function(t){return n.GcQU.zmqm(t)})),s(this,"DdpW",(function(){return n.zyPd})),e.instance||(e.instance=this),e.instance}return a(e,[{key:"createObjConfig",value:function(t){try{this.boHJ=this.getQeState(),v(this.boHJ[t])||(this.boHJ[t]={SESSION:0,OVERALL:0,DATES:{}},this.zyPd&&(this.boHJ[t].DATES[this.zyPd]=0),this.setQeState(t))}catch(t){rt.error("Can not create the frequency count object:"+t)}}},{key:"incrementFrequencies",value:function(t){this.boHJ=this.getQeState();var e=this.boHJ[t];e.SESSION=e.SESSION+1,e.OVERALL=e.OVERALL+1;var n=w();n===this.zyPd&&e.DATES&&e.DATES[n]||(this.zyPd=n,e.DATES={},e.DATES[this.zyPd]=0),e.DATES[this.zyPd]=e.DATES[this.zyPd]+1}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}]),e}();s(it,"instance",void 0),window.ceVersion=160;try{void 0===exports&&null===exports||(exports.default=it,module.exports=exports.default)}catch(t){}return it}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("apxor")):"function"==typeof define&&define.amd?define(["apxor"],e):(t=t||self)["apxor-qe"]=e(t.Apxor)}(this,(function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function n(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,c(i.key),i)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,n){return(e=c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function c(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var d=window.ApxorLogger,f=function(t){return void 0!==t&&!function(t){return null===t}(t)},v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function h(t,e){return Array.from(e).map((function(e,n){return String.fromCharCode(e^function(t,e){return t.charCodeAt(Math.floor(e%t.length))}(t,n))})).join("")}var g=function(t,e){return h(t,e=function(t){var e,n,i,r,o,a,s=0,u=[];if(!t)return t;t+="";do{e=(a=v.indexOf(t.charAt(s++))<<18|v.indexOf(t.charAt(s++))<<12|(r=v.indexOf(t.charAt(s++)))<<6|(o=v.indexOf(t.charAt(s++))))>>16&255,n=a>>8&255,i=255&a,u.push(e),64!==r&&(u.push(n),64!==o&&u.push(i))}while(s<t.length);return u}(e))},p=function(t){switch(t){case"app_event":return"AE";case"client_event":return"CE";case"activity_time":case"activity_event":return"AE"}return"Unknown"},_=function(t){return t.toUpperCase()},y=function(t,e,n){switch(n){case"EQ":return t===e;case"GT":return t>e;case"GTE":return t>=e;case"LT":return t<e;case"LTE":return t<=e;case"NEQ":return t!==e;case"R":return m(e).test(t);default:return!1}},m=function(t){var e=t.replace(/.*\/([gimuy]*)$/,"$1");e===t&&(e="");var n=e?t.replace(new RegExp("^/(.*?)/"+e+"$"),"$1"):t;return new RegExp(n,e)},w=function(){var t=new Date;return t.getDate()+"/"+t.getMonth()+"/"+t.getFullYear()},A=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r="([^/]+)",o=n?n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"):"",a=e.replace(new RegExp(o,"g"),r),s=new RegExp("^".concat(a)+(i?"":"$")),u=t.match(s);return null!==u};function x(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=b(t,e);if(o){var a=function(){if(P(o)){return function(t){return Z(t)}(o)}return d.info("Invalid target element. Width and height are 0 for element: ".concat(t,". Can't show tooltip")),!1};return a()}return n?(d.info("Not found yet. Rechecking the DOM."),E(r,i,t,e)):(d.info("Element with selector:".concat(t," not found.")),!1)}function E(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=setInterval((function(){var e=b(n,i);if(e){clearInterval(r);!function(){if(P()){Z()}else d.info("Invalid target element. Width and height are 0 for element: ".concat(n,". Can't show tooltip"))}()}else(t-=1)<=0&&(clearInterval(r),console.warn("Element with selector:".concat(n," not found.")))}),e)}var b=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=document.getElementById(t);if(!i)try{i=document.querySelector(t)}catch(t){window.ApxorLogger.error("Error finding element in DOM:"+t)}(i||(i=k(t)),!i&&n.length>0)&&(i=null===(e=document.getElementById(n))||void 0===e||null===(e=e.contentWindow)||void 0===e||null===(e=e.document)||void 0===e?void 0:e.querySelector(t));return i},k=function(t){var e=t.indexOf("svg");-1!==e&&(t=t.substring(0,e)+"svg:svg");try{return document.fZkd(t,document,(function(t){return"svg"===t?"http://www.w3.org/2000/svg":null}),XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(t){window.ApxorLogger.error("Error finding element in DOM:"+t)}return null};function P(t){try{var e=t.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(t){return!1}return!0}function Z(t){var e,n,i,r;return!!(n=(e=t).offsetHeight,i=e.offsetWidth,(r=e.getBoundingClientRect()).left>=-i&&r.top>=-n&&r.right<=(window.innerWidth||document.documentElement.clientWidth)+i&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)+n)}var O=function(t){var e='\n <style> \n .apx-container{\n padding:10px;\n }\n </style>\n <div id="apx-innerElement" class="apx-container">\n <div id="close-button" style="cursor: pointer;position:absolute;top:9px;right:9px;"><svg width="11" height="11" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path opacity="0.5" d="M11.0962 9.07071L17.8586 15.8331L15.8331 17.8586L9.0707 11.0962L8.99999 11.0255L8.92928 11.0962L2.16693 17.8586L0.141421 15.8331L6.90379 9.07071L6.9745 9L6.90379 8.92929L0.141421 2.16694L2.16693 0.141422L8.92928 6.9038L8.99999 6.97451L9.0707 6.9038L15.8331 0.141422L17.8586 2.16694L11.0962 8.92929L11.0255 9L11.0962 9.07071Z" fill="white" stroke="#002845" stroke-width="0.2"/>\n </svg>\n </div>\n <div style="font-family: inherit;font-style: normal;font-weight: 600;font-size: 16px;line-height: 22px;\n color: #FFFFFF; display: flex; gap: 12px;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-check-filled" width="33" height="33" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" stroke-width="0" fill="currentColor" />\n</svg><div style = "align-self: center;padding-right:20px;">'.concat(t,"</div></div>\n </div>\n "),n=document.createElement("div");n.style="\n z-index:99999999;\n background:#16202f;\n position:fixed;\n top:1%;\n right:1%;\n border-radius: 12px;\n ",n.innerHTML=e,n.id="apx-container",document.body.appendChild(n)},T=window.ApxorLogger,S=a((function e(){var n=this;r(this,e),s(this,"kcPk","ALL"),s(this,"zAFt",[]),s(this,"VvGB",[]),s(this,"userAttributesValidated",!0),s(this,"sessionAttributeValidated",!0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(n.kcPk=t.audience.audience_type,n.zAFt=t.audience.attributes.user,n.VvGB=t.audience.attributes.session,!Array.isArray(n.zAFt)||!Array.isArray(n.VvGB))return T.error("No attributes"),!1}catch(t){return T.error(t),!1}return!0})),s(this,"validate",(function(e,i){var r=!0;"FTU"===n.kcPk&&(r=t.getController().getSessionInfo().is_first_session);var o=n.IJgZ(e,n.zAFt),a=n.IJgZ(i,n.VvGB);return o||(n.userAttributesValidated=!1),a||(n.sessionAttributeValidated=!1),r&&o&&a})),s(this,"IJgZ",(function(t,e){var n=e.length,i=!0;try{for(var r,o=function(){var n=e[a];if(void 0===t[n.name]||!1===i)return{v:!1};var r=n.operator,o=n.type,s=n.value.map((function(t){if("s"===o)return t;if("l"===o)return parseInt(t);if("f"===o)return parseFloat(t);if("b"===o)switch(t){case"true":return!0;case"false":return!1;default:return t}})),u=(Array.isArray(t[n.name])?t[n.name]:[t[n.name]]).some((function(t){return s.some((function(e){return"s"===o?t="".concat(t):"l"===o?t=parseInt(t):"f"===o?t=parseFloat(t):"b"===o&&(t=!!t),y(t,e,r)}))}));i=i&&u},a=0;a<n;a++)if(r=o())return r.v}catch(t){T.error(t),i=!1}return i}))})),L=window.ApxorLogger,I=a((function e(){var n=this;r(this,e),s(this,"ZIqy",0),s(this,"GmGj",0),s(this,"MnIa","SESSION"),s(this,"mKem",0),s(this,"RQPp",0),s(this,"lVnA",0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{n.ZPwC=t._id,n.WkEQ=t.meta,n.ZIqy=t.frequency.count,-1===n.ZIqy&&(n.ZIqy=1e3),n.lVnA=n.ZIqy,n.GmGj=t.frequency.time_interval,n.MnIa=t.frequency.validity,n.RQPp=t.frequency.ses_lmt,n._dayCount=t.frequency.day_lmt;var e=rt.getInstance().getQeState();if(!f(e)||!f(e[t._id]))return!0;if("SESSION"===n.MnIa){if(n.ZIqy=parseInt(n.ZIqy)-parseInt(e[t._id].SESSION),n.ZIqy<=0)return n.xZni("Session limit reached"),console.warn("Max count limit reached for session:"+t._id),!1}else{if("OVERALL"!==n.MnIa)return L.info("Invalid config."),!1;if(n.ZIqy=parseInt(n.ZIqy)-parseInt(e[t._id].OVERALL),n.ZIqy<=0)return n.xZni("Overall limit reached"),console.warn("Max count limit reached for overall:"+t._id),!1}}catch(t){return L.error(t),!1}return!0})),s(this,"dRwe",(function(){n.ZIqy=n.ZIqy-1})),s(this,"getFrequencyCount",(function(){return n.ZIqy})),s(this,"UcJn",(function(){"SESSION"===n.MnIa&&(n.ZIqy=n.lVnA,L.info("Campaign Limit reset"))})),s(this,"atfr",(function(t){try{if(n.ZIqy<=0)return"OVERALL"===n.MnIa?n.xZni("Overall limit reached"):"SESSION"===n.MnIa&&n.xZni("Session limit reached"),!1;var e=rt.getInstance().getQeState();if(!f(e)||!f(e[t]))return!0;if(0!==n.RQPp)if(parseInt(n.RQPp)-parseInt(e[t].SESSION)<=0)return n.xZni("Session limit reached"),!1;if(0!==n._dayCount){var i,r=w();if(parseInt(n._dayCount)-parseInt((null===(i=e[t])||void 0===i?void 0:i.DATES[r])||0)<=0)return n.xZni("Day limit reached"),!1}}catch(t){n.xZni("Error validating the frequency: ".concat(t)),L.error("Error validating the frequency:"+t)}return!0})),s(this,"xZni",(function(e){var i;null==t||t.logEvent("apx_non_eligible_user",{apx_nudge_type:"SURVEY"===n.WkEQ.type?"survey":"campaign",apx_nudge_id:n.ZPwC,apx_nudge_name:n.WkEQ.name,apx_variant_code:n.WkEQ.isExperiment||n.WkEQ.only_context?null===(i=n.WkEQ.attr)||void 0===i?void 0:i.apx_variant_code:"TG",apx_failure_type:"warn",apx_reason:e})}))})),C=a((function t(){var e=this;r(this,t),s(this,"lkvT",""),s(this,"kcPk",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var n,i;e.lkvT=t.meta.name,e.kcPk=t.meta.type,e._only_context=t.meta.only_context,e._attr=(null===(n=t.meta)||void 0===n?void 0:n.attr)||{},e._isExperiment=null===(i=t.meta)||void 0===i?void 0:i.isExperiment}catch(t){return window.ApxorLogger.error(t),!1}return!0}))})),V=window.ApxorLogger,N=a((function t(){var e=this;r(this,t),s(this,"twTf",-1),s(this,"Zkxl",-1),s(this,"tTTW",-1),s(this,"qBOQ",-1),s(this,"GLHi",!1),s(this,"_nudge_expired",!1),s(this,"_not_yet_active",!1),s(this,"_not_in_specified_time",!1),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(isNaN(Date.parse(t.validity.start_date))||isNaN(Date.parse(t.validity.end_date)))return V.error("Not valid dates"),!1;if(e.twTf=Date.parse(t.validity.start_date),e.Zkxl=Date.parse(t.validity.end_date),f(t.at_specific_time)&&(e.GLHi=t.at_specific_time,e.GLHi&&f(t.time_limits))){var n=(new Date).toISOString().split("T")[0];if(e.tTTW=Date.parse(n+"T"+t.time_limits.start_time+":00.000Z"),e.qBOQ=Date.parse(n+"T"+t.time_limits.end_time+":00.000Z"),isNaN(e.tTTW)||isNaN(e.qBOQ))return V.error("Not valid times"),!1}}catch(t){return V.error(t),!1}return!0})),s(this,"validate",(function(){var t=Date.now();return t>e.twTf&&t<e.Zkxl?(!e.GLHi||t>=e.tTTW&&t<=e.qBOQ||(e._not_in_specified_time=!0),!e.GLHi||t>=e.tTTW&&t<=e.qBOQ):(t<e.twTf?e._not_yet_active=!0:t>e.Zkxl&&(e._nudge_expired=!0),!1)}))})),Q=a((function t(){var e=this;r(this,t),s(this,"lkvT",""),s(this,"aoOe",{}),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{e.lkvT=t.name,e.aoOe=t.additional_info}catch(t){return!1}return!0}))})),F=a((function t(){var e=this;r(this,t),s(this,"HWOm",0),s(this,"xcvA",0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(e.HWOm=Number(t.lower),e.xcvA=Number(t.upper),isNaN(e.HWOm)||isNaN(e.xcvA))return!1}catch(t){return!1}return!0}))})),R=a((function t(){var e=this;r(this,t),s(this,"RgIj",0),s(this,"ufVL",""),s(this,"Nrox",""),s(this,"OXAP",new Q),s(this,"PwzV",new F),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.ufVL=t.event_type,e.Nrox=t.activity,e.OXAP.parse(t.details)&&e.PwzV.parse(t.time_bounds)}catch(t){return!1}}))})),W=window.ApxorLogger,q=a((function t(){var e=this;r(this,t),s(this,"RgIj",0),s(this,"MGiL",-1),s(this,"ZIqy",0),s(this,"KHXB",""),s(this,"Nrox",""),s(this,"ufVL",""),s(this,"PwzV",new F),s(this,"OXAP",new Q),s(this,"zbHV",new R),s(this,"PGZU","AND"),s(this,"PTjs",!1),s(this,"kcPk",void 0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.MGiL=t.sequence,e.ZIqy=t.count_config.count,e.KHXB=t.count_config.operator,e.Nrox=t.activity,e.ufVL=t.event_type,e.PGZU=t.combine_operator,e.kcPk=t.type,e.OXAP.parse(t.details)&&e.zbHV.parse(t.trigger)&&e.PwzV.parse(t.time_bounds)}catch(t){return W.error(t),!1}}))})),j=window.ApxorLogger,D=a((function t(){var e=this;r(this,t),s(this,"ZIqy",0),s(this,"KHXB",""),s(this,"ufVL",""),s(this,"PwzV",new F),s(this,"OXAP",new Q),s(this,"PGZU","AND"),s(this,"parse",(function(t){try{return e.ZIqy=t.count_config.count,e.KHXB=t.count_config.operator,e.ufVL=t.event_type,e.PGZU=t.combine_operator,e.OXAP.parse(t.details)&&e.PwzV.parse(t.time_bounds)}catch(t){return j.error(t),!1}}))})),B=window.ApxorLogger,G=function(){function e(){var n=this;r(this,e),s(this,"OZwB",0),s(this,"ZPwC",""),s(this,"Accr",new q),s(this,"qZyN",new D),s(this,"VtGp",!1),s(this,"ossY",!1),s(this,"DdYx",0),s(this,"PGZU","AND"),s(this,"OfmW","OR"),s(this,"bfSR",-1),s(this,"nWaf",[]),s(this,"GKyo",{}),s(this,"VVVx",!1),s(this,"initialize",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";if(n.ZPwC=i,n.DdYx=r,n.nWaf=a,"termination"===s&&""!==s){n.qZyN.parse(e);return n.OfmW=n.qZyN.PGZU,n.jOBW(),!0}var u=n.Accr.parse(e);if(u){if(n.PGZU=n.Accr.PGZU,n.Accr.PTjs){var l=n.Accr.OXAP.lkvT;"APX_PAGE_OPENED"===l&&(l=n.Accr.OXAP.aoOe.navigation_id,l=f(l)?l:n.Accr.OXAP.lkvT),n.bfSR=t.getController().getEventCount(l);var c=n.Accr.ZIqy,d=n.Accr.KHXB;if(n.ossY=n.Ujwy(n.bfSR-1,c,d,!1),n.VtGp=n.ossY,n.ossY&&"APX_PAGE_OPENED"===n.Accr.OXAP.lkvT)return!0}return o&&0!==r||n.vlES(),!0}return!1})),s(this,"vlES",(function(){var t,e=n.Accr,i=e.zbHV,r=rt.getInstance();"app_start"===i.ufVL?(n.VtGp=!0,r.registerForEvent(p(e.ufVL)+"___"+e.OXAP.lkvT,n.shbH)):r.registerForEvent(p(e.ufVL)+"___"+i.OXAP.lkvT,n.shbH),null!==(t=window.ApxorRTM)&&void 0!==t&&t.badgesLists.includes(n.ZPwC)&&r.registerForEvent(p(e.ufVL)+"___"+"apxor-badge-container-".concat("-".concat(n.ZPwC).replaceAll(" ","").replace(/[^\w\s]/gi,"")),n.shbH)})),s(this,"jOBW",(function(){var t=n.qZyN,e=rt.getInstance();n.VtGp=!0,e.registerForEvent(p(t.ufVL)+"___"+t.OXAP.lkvT,n.xlta)})),s(this,"UNmM",(function(t,e,i,r){var o,a=(Date.now()-n.GKyo[e])/1e3;(null===(o=n.Accr)||void 0===o||null===(o=o.OXAP)||void 0===o||null===(o=o.aoOe)||void 0===o?void 0:o.time)/1e3>a&&n._displayCampaign(i)})),s(this,"NskH",(function(t,e,i,r){var o,a;n.VVVx=!0;var s=Date.now(),u=null===(o=n.Accr)||void 0===o||null===(o=o.zbHV)||void 0===o?void 0:o.OXAP.lkvT,l=(s-n.GKyo[u])/1e3,c=null===(a=n.Accr)||void 0===a||null===(a=a.OXAP)||void 0===a||null===(a=a.aoOe)||void 0===a?void 0:a.time;(c/=1e3)>l&&n._displayCampaign(i)})),s(this,"shbH",(function(e,i,r,o){var a,s,u=rt.getInstance();if(n.VtGp){if(null!==(a=window.ApxorRTM)&&void 0!==a&&a.isBadgePresent&&null!==(s=window.ApxorRTM)&&void 0!==s&&s.badgesLists.includes(n.ZPwC)&&t.getController().isBadgeTriggerSatisfied(n.ZPwC))return n.ossY=!0,n.Accr.RgIj=r,void u.validate(n.ZPwC,n.DdYx);p(n.Accr.ufVL)===e&&n.PIhj(r-n.Accr.zbHV.RgIj,n.Accr.PwzV)&&n.Accr.OXAP.lkvT===i&&n.rBGh(n.Accr.OXAP.aoOe,o)&&(n.OZwB+=1,n.ossY=n.Ujwy(n.OZwB,n.Accr.ZIqy,n.Accr.KHXB),n.ossY&&(n.Accr.RgIj=r,u.validate(n.ZPwC,n.DdYx)))}else if(n.VtGp=n.LCMw(e,i,r,o),n.VtGp){var l=n.Accr,c=l.zbHV;if(c.RgIj=r,"activity_time"===(null==l?void 0:l.ufVL)){var d,f,v,h=null==l||null===(d=l.OXAP)||void 0===d||null===(d=d.aoOe)||void 0===d?void 0:d.time;(null==l||null===(f=l.OXAP)||void 0===f||null===(f=f.aoOe)||void 0===f?void 0:f.nkpi.length)>0&&(setTimeout((function(){n.VVVx||(n.ossY=!0,n.ossY&&(n.OZwB+=1,n.ossY=n.Ujwy(n.OZwB,n.Accr.ZIqy,n.Accr.KHXB),n.ossY&&(n.Accr.RgIj=r,u.validate(n.ZPwC,n.DdYx)))),l.OXAP.aoOe.nkpi.map((function(t){u.unregisterFromEvent(_(l.OXAP.aoOe.et)+"___"+t,n)}))}),h),l.OXAP.aoOe.nkpi.map((function(t){u.registerForEvent(_(l.OXAP.aoOe.et)+"___"+t,n.NskH)}))),(null==l||null===(v=l.OXAP)||void 0===v||null===(v=v.aoOe)||void 0===v?void 0:v.kpi.length)>0&&(setTimeout((function(){l.OXAP.aoOe.kpi.map((function(t){u.unregisterFromEvent(_(l.OXAP.aoOe.et)+"___"+t,n)}))}),h),l.OXAP.aoOe.kpi.map((function(t){t===l.zbHV.OXAP.lkvT?(u.unregisterFromEvent(p(c.ufVL)+"___"+c.OXAP.lkvT,n),u.registerForEvent(_(l.OXAP.aoOe.et)+"___"+t,n.UNmM)):u.registerForEvent(_(l.OXAP.aoOe.et)+"___"+t,n.NskH)})))}else u.unregisterFromEvent(p(c.ufVL)+"___"+c.OXAP.lkvT,n),u.registerForEvent(p(l.ufVL)+"___"+l.OXAP.lkvT,n);n.GKyo[i]=Date.now()}})),s(this,"xlta",(function(t,e,i,r){var o=rt.getInstance();p(n.qZyN.ufVL)===t&&n.PIhj(i,n.qZyN.PwzV)&&n.qZyN.OXAP.lkvT===e&&n.rBGh(n.qZyN.OXAP.aoOe,r)&&(n.OZwB+=1,n.ossY=n.Ujwy(n.OZwB,n.qZyN.ZIqy,n.qZyN.KHXB),n.ossY&&(n.qZyN.RgIj=i,o.validateForTermination(n.ZPwC,n.DdYx)))})),s(this,"LCMw",(function(t,e,i,r){var o=n.Accr.zbHV;return p(o.ufVL)===t&&o.OXAP.lkvT===e&&n.PIhj(i,o.PwzV)&&n.rBGh(o.OXAP.aoOe,r)})),s(this,"PIhj",(function(t,e){var n=Math.ceil(t);return n>e.HWOm&&n<e.xcvA})),s(this,"Ujwy",(function(t,e,i){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];switch(r&&n.Accr.PTjs&&(t+=n.bfSR),i){case"EQ":return t===e;case"GT":return t>e;case"GTE":return t>=e;case"LT":return t<e;case"LTE":return t<=e;default:return!1}})),s(this,"rBGh",(function(t,e){var n=!0;try{var r,o=function(){if(!1===n)return{v:!1};if("object"===i(t[a])){var r,o=t[a].op,s=t[a].t;if("s"===s)r=t[a].val;else if("l"===s||"f"===s)r=parseFloat(t[a].val);else if("b"===s)switch(t[a].val){case"true":r=!0;break;case"false":r=!1;break;default:r=t[a].val}var u=(Array.isArray(e[a])?e[a]:[e[a]]).some((function(t){return"s"===s?t="".concat(t):"l"===s?t=parseInt(t):"f"===s?t=parseFloat(t):"b"===s&&(t=!!t),y(t,r,o)}));n=n&&u}else n=n&&y(e[a],t[a],"EQ")};for(var a in t)if(r=o())return r.v}catch(t){B.error(t),n=!1}return n}))}return a(e,[{key:"_displayCampaign",value:function(t){var e=rt.getInstance();this.ossY=!0,this.ossY&&(this.OZwB+=1,this.ossY=this.Ujwy(this.OZwB,this.Accr.ZIqy,this.Accr.KHXB),this.ossY&&(this.Accr.RgIj=t,e.validate(this.ZPwC,this.DdYx)))}}]),e}(),X=window.ApxorLogger,U=a((function e(){var n=this;r(this,e),s(this,"XuaJ",[]),s(this,"_ret_day",{}),s(this,"Spio",{}),s(this,"ufhL",!1),s(this,"ZqTC",!1),s(this,"retainedDaysValidated",!0),s(this,"retainedSessionValidated",!0),s(this,"eventDoneInLT",!1),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{n.XuaJ=t.overall_cfg.events,n._ret_day=t.overall_cfg.ret_day,n.Spio=t.overall_cfg.session,n.ufhL=t.overall_cfg.toggleRetDay,n.ZqTC=t.overall_cfg.toggleSession}catch(t){return X.error(t),!1}return!0})),s(this,"validate",(function(){var e=parseInt(t.getController().getFromStorage("apx_retained_days")),i=parseInt(t.getController().getFromStorage("apx_retained_session"));if(n.ufhL&&!isNaN(e)&&!(e>=n._ret_day.from&&e<=n._ret_day.to))return n.retainedDaysValidated=!1,!1;if(n.ZqTC&&!isNaN(i)&&!(i>=n.Spio.from&&i<=n.Spio.to))return n.retainedSessionValidated=!1,!1;try{for(var r=t.getController().getFromStorage("_apx_lt_count"),o=t.getSiteId(),a=JSON.parse((new TextDecoder).decode(function(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return e}(g(o,r)))),s=0;s<n.XuaJ.length;s++){if(a[n.XuaJ[s].name.replace("'","").replace("’","")])return n.eventDoneInLT=!0,!1}}catch(t){X.error("Failed to validate the lt count:"+t)}return!0}))})),M=window.ApxorLogger,H=a((function t(){var e=this;r(this,t),s(this,"zAFt",[]),s(this,"VvGB",[]),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(e.zAFt=t.attributes.user,e.VvGB=t.attributes.session,!Array.isArray(e.zAFt)||!Array.isArray(e.VvGB))return M.error("No attributes"),!1}catch(t){return M.error(t),!1}return!0})),s(this,"validate",(function(t,n){return e.IJgZ(t,e.zAFt)&&e.IJgZ(n,e.VvGB)})),s(this,"IJgZ",(function(t,e){var n=e.length,i=!0;try{for(var r,o=function(){var n=e[a];if(!t[n.name]||!1===i)return{v:!1};var r=n.operator,o=n.type,s=n.value.map((function(t){return"s"===o?t:"l"===o?parseInt(t):"f"===o?parseFloat(t):void 0})),u=(Array.isArray(t[n.name])?t[n.name]:[t[n.name]]).some((function(t){return s.some((function(e){return y(t,e,r)}))}));i=i&&u},a=0;a<n;a++)if(r=o())return r.v}catch(t){M.error(t),i=!1}return i}))})),K=a((function e(){var n=this;r(this,e),s(this,"LWBN",t.getController()),s(this,"type",""),s(this,"_duration_seconds",0),s(this,"NaUZ",1),s(this,"parse",(function(t){try{var e,i,r;if(n.kcPk=null===(e=t.terminate_info.time_based)||void 0===e?void 0:e.type,n._duration_seconds=null===(i=t.terminate_info)||void 0===i?void 0:i.time_based.duration_seconds,n.NaUZ=null===(r=t.terminate_info.time_based)||void 0===r?void 0:r.days,n.LbJy(t._id))return n.LWBN.persistTerminationInfoLocally(t._id),!1}catch(t){return!1}return!0})),s(this,"LbJy",(function(t){var e,i=JSON.parse(n.LWBN.getFromStorage("apx_termination_ID"));if(!i[t]||null===(e=i[t])||void 0===e||!e.startDate)return!1;var r,o=new Date(i[t].startDate),a=new Date((r=new Date).getMonth()+"/"+r.getDate()+"/"+r.getFullYear()),s=parseInt((a-o)/864e5,10),u=function(){var t=new Date;return{hours:t.getHours(),mins:t.getMinutes()}}(),l=i[t].tTTW;return s===n.NaUZ&&u.hours>=l.hours||s>n.NaUZ||i[t].goalAcheived}))})),z=a((function t(){var e=this;r(this,t),s(this,"enable_goal_events",!1),s(this,"attributes",{}),s(this,"ahQs",new H),s(this,"Cgue",new K),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var n,i,r;if(e.enable_time_based=null==t||null===(n=t.terminate_info)||void 0===n?void 0:n.enable_time_based,e.enable_time_based&&!e.Cgue.parse(t))return!1;if(e.enable_goal_events=null==t||null===(i=t.terminate_info)||void 0===i?void 0:i.enable_goal_events,e.enable_attributes=null==t||null===(r=t.terminate_info)||void 0===r?void 0:r.enable_attributes,e.enable_attributes&&!e.ahQs.parse(t.terminate_info))return!1}catch(t){return window.ApxorLogger.error(t),!1}return!0})),s(this,"validate",(function(t,n){return e.ahQs.validate(t,n)}))})),Y=a((function t(){var e=this;r(this,t),s(this,"FgUq",""),s(this,"hQfM",""),s(this,"ZnGX",""),s(this,"zVUj",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.FgUq=null==t?void 0:t.screen_binding,!e.FgUq||(e.hQfM=null==t?void 0:t.binding.url,e.ZnGX=null==t?void 0:t.binding.var,e.zVUj=null==t?void 0:t.binding.operator,!0)}catch(t){return window.ApxorLogger.error(t),!1}})),s(this,"validate",(function(){var t=e.hQfM,n=e.ZnGX,i=e.zVUj,r=window.location.href;return!e.FgUq||("EQ"===i?t.includes(n)?!!A(r,t,n,!1):r===t:"SW"===i?t.includes(n)?!!A(r,t,n,!0):!!r.startsWith(t):void 0)}))})),J=window.ApxorLogger,$=a((function e(){var i=this;r(this,e),s(this,"dUpZ",[]),s(this,"jZdL",[]),s(this,"ZPwC",""),s(this,"WkEQ",new C),s(this,"Vdjb",new S),s(this,"MnIa",new N),s(this,"wmft",new I),s(this,"ufwV",new U),s(this,"erWN",new z),s(this,"zFMC",new Y),s(this,"LaSX",!1),s(this,"SYtP",[]),s(this,"_variant_code",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var e;if(!f(t._id))return J.error("No Id"),!1;if(!f(t.enabled)||!t.enabled)return J.error("Not enabled"),!1;if(!(i.WkEQ.parse(t)&&i.MnIa.parse(t)&&i.wmft.parse(t)&&i.Vdjb.parse(t)&&i.ufwV.parse(t)&&i.erWN.parse(t)&&i.zFMC.parse(t)))return!1;if(i._variant_code=i.WkEQ._isExperiment||i.WkEQ._only_context?null===(e=i.WkEQ._attr)||void 0===e?void 0:e.apx_variant_code:"TG",!f(t.conditions)||!Array.isArray(t.conditions))return J.error("No valid conditions",t.conditions),!1;i.ZPwC=t._id,i.LaSX=!!f(t.sequence_enabled)&&t.sequence_enabled,i.LaSX&&t.conditions.sort((function(t,e){return t.sequence<e.sequence}));var n=t.conditions,r=n.length,o=null==t?void 0:t.no_context_enabled;0===r&&o&&i.UvBk();for(var a=function(){i.SYtP=[];var t=n[s];if("didn't"===t.type){var e,r={trigger_key:t.trigger.details.name,no_kpi_array:null==t||null===(e=t.details)||void 0===e||null===(e=e.additional_info)||void 0===e?void 0:e.nkpi,condition_id:null==t?void 0:t._id,time_bounds:t.time_bounds.upper};i.SYtP=[].concat(u(i.SYtP),[r])}var o=new G;if(o.initialize(t,i.ZPwC,s,i.LaSX,i.SYtP)){i.dUpZ.push(o);var a=(null==t?void 0:t.timeout)/(null==t?void 0:t.findinterval),l=(null==t?void 0:t.frameid)||"",c=null==t?void 0:t.url;window.location.href===c&&"view_visibility"===t.event_type&&!0===x(t.view_id,l,null==t?void 0:t.enable_retry,null==t?void 0:t.findinterval,a)&&i.UvBk(!0),window.addEventListener("navigate",(function(e){var n=null==t?void 0:t.url;window.location.href===n&&"view_visibility"===t.event_type&&!0===x(t.view_id,l,null==t?void 0:t.enable_retry,null==t?void 0:t.findinterval,a)&&i.UvBk(!0)}))}},s=0;s<r;s++)a();if(i.erWN.enable_goal_events)for(var l=t.terminate_info.goal_events.events,c=l.length,d=0;d<c;d++){var v=new G;v.initialize(l[d],i.ZPwC,d,!0,[],"termination")&&i.jZdL.push(v)}return i.dUpZ.length>0}catch(t){return J.error(t),!1}})),s(this,"fZkd",(function(t){if(!(t<0))if(i.LaSX){var e=i.dUpZ[t];if(f(e)&&e.ossY){var n=i.dUpZ[t-1];if(f(n)&&!n.ossY)return;var r=i.dUpZ[t+1];f(r)?r.vlES():i.UvBk()}}else i.UvBk()})),s(this,"CWHG",(function(t){t<0||i.ZoLa()})),s(this,"UvBk",(function(){var e,r,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=t.getController().getUserAttributes(),s=t.getController().getSessionAttributes();if(null!==(e=window.ApxorRTM)&&void 0!==e&&e.isBadgePresent&&null!==(r=window.ApxorRTM)&&void 0!==r&&r.badgesLists.includes(i.ZPwC)&&t.getController().isBadgeTriggerSatisfied(i.ZPwC)||null==t||t.logEvent("apx_trigger_satisfied",{apx_nudge_type:"SURVEY"===i.WkEQ.kcPk?"survey":"campaign",apx_nudge_id:i.ZPwC,apx_nudge_name:i.WkEQ.lkvT,apx_variant_code:i.WkEQ._isExperiment||i.WkEQ._only_context?i.WkEQ._attr.apx_variant_code:"TG"}),!(i.MnIa.validate()&&i.Vdjb.validate(a,s)&&i.ufwV.validate()&&i.zFMC.validate()))return i.ufwV.retainedDaysValidated?i.ufwV.retainedSessionValidated?i.ufwV.eventDoneInLT?void i.xZni("Event done in life time"):i.Vdjb.userAttributesValidated?i.Vdjb.sessionAttributeValidated?i.MnIa._not_in_specified_time?void i.xZni("Time limits check failed"):i.MnIa._not_yet_active?void i.xZni("not in the scheduled time"):i.MnIa._nudge_expired?void i.xZni("nudge expired"):void 0:void i.xZni("Session property filter not met"):void i.xZni("User property filter not met"):void i.xZni("User session criteria not met"):void i.xZni("Retained day criteria not met");var u=i.dUpZ.length,l=u<1,c="";0===u&&(l=!0);for(var d=0;d<u;d++){var f=i.dUpZ[d],v=f.ossY;if(""===c.trim())l=v;else switch(c){case"AND":l=l&&v;break;case"OR":l=l||v}c=f.PGZU}if(!0===o&&(l=!0),l){if(console.debug("onCondition satisfied"),!i.wmft.atfr(i.ZPwC)){if(console.warn("Maximum limit reached",i.ZPwC),t.getController().isTestDevice()){O("Maximum limit reached for campaign name ".concat(i.WkEQ.lkvT));var h=document.getElementById("close-button"),g=function(){var t=document.getElementById("apx-container");null==t||t.remove()};null==h||h.addEventListener("click",g),window.setTimeout(g,2e4)}return}console.log("Dispatching event",i.WkEQ.kcPk),t.logEvent("apx_context_evaluated",n(n({apx_nudge_type:"SURVEY"===i.WkEQ.kcPk?"survey":"campaign",apx_nudge_id:i.ZPwC,apx_nudge_name:i.WkEQ.lkvT,apx_variant_code:i.WkEQ._isExperiment||i.WkEQ._only_context?i.WkEQ._attr.apx_variant_code:"TG"},i.WkEQ._attr),{},{message_name:i.WkEQ.lkvT,id:i.ZPwC})),t.getController().dispatchEvent(i.WkEQ.kcPk,{name:i.WkEQ.kcPk,additional_info:{uuid:i.ZPwC,name:i.WkEQ.lkvT}})}})),s(this,"ZoLa",(function(){for(var e=i.jZdL.length,r=e<1,o="",a=0;a<e;a++){var s=i.jZdL[a],u=s.ossY;if(""===o.trim())r=u;else switch(o){case"AND":r=r&&u;break;case"OR":r=r||u}o=s.OfmW}r&&(console.log("Dispatching event",i.WkEQ.kcPk),t.getController().persistTerminationInfoLocally(i.ZPwC),!0===i.WkEQ._only_context&&t.logEvent("apx_context_evaluated",n(n({},i.WkEQ._attr),{},{message_name:i.WkEQ.lkvT,id:i.ZPwC})),t.getController().dispatchEvent(i.WkEQ.kcPk,{name:i.WkEQ.kcPk,additional_info:{uuid:i.ZPwC,name:i.WkEQ.lkvT}}))})),s(this,"validateForTerminationAttributes",(function(){var e=t.getController().getUserAttributes(),n=t.getController().getSessionAttributes();return i.erWN.validate(e,n)})),s(this,"dRwe",(function(){i.wmft.dRwe()})),s(this,"getFrequencyCount",(function(){return i.wmft.getFrequencyCount()})),s(this,"fucO",(function(){return i.wmft.UcJn()})),s(this,"xZni",(function(e){var n;null==t||t.logEvent("apx_non_eligible_user",{apx_nudge_type:"SURVEY"===i.WkEQ.kcPk?"survey":"campaign",apx_nudge_id:i.ZPwC,apx_nudge_name:i.WkEQ.lkvT,apx_variant_code:i.WkEQ._isExperiment||i.WkEQ._only_context?null===(n=i.WkEQ._attr)||void 0===n?void 0:n.apx_variant_code:"TG",apx_failure_type:"warn",apx_reason:e})}))})),tt=a((function t(){var e=this;r(this,t),s(this,"RmJl",{}),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{configs:[]};if(f(t)&&f(t.configs)){var n=t.configs;if(!Array.isArray(n))return;n.sort((function(t,e){var n,i;return(null!==(n=t.prio)&&void 0!==n?n:-1)-(null!==(i=e.prio)&&void 0!==i?i:-1)}));for(var i=0;i<n.length;i++){var r=n[i],o=r._id,a=new $;a.parse(r)?e.RmJl[o]=a:console.warn("Failed to parse cfg",o)}}})),s(this,"validate",(function(t,n){e.RmJl[t]&&e.RmJl[t].fZkd(n)})),s(this,"getVariantCode",(function(t){return e.RmJl[t]?e.RmJl[t]._variant_code:""})),s(this,"validateForTermination",(function(t,n){e.RmJl[t]&&e.RmJl[t].CWHG(n)})),s(this,"validateForTerminationAttributes",(function(t){return!!e.RmJl[t]&&e.RmJl[t].validateForTerminationAttributes()})),s(this,"dRwe",(function(t){e.RmJl[t].dRwe()})),s(this,"getFrequencyCount",(function(t){var n=e.RmJl[t];if(null!=n)return n.getFrequencyCount()})),s(this,"resetFrequencyCounts",(function(){var t=e.RmJl;for(var n in t)t[n].fucO()})),s(this,"cPnL",(function(t){try{if(e.RmJl){var n=e.RmJl[t];if(n&&n.WkEQ)return n.WkEQ}}catch(t){console.log("Error in getting the campaign meta ".concat(t))}return{}}))})),et=window.ApxorLogger,nt=a((function e(){var n=this;r(this,e),s(this,"nHSF",{}),s(this,"AeBT",[]),s(this,"TMJG",!1),s(this,"initialize",(function(){var e=t.getController();e.registerForEvent("APP_EVENT",(function(t){return n.krnL(t,"AE")})),e.registerForEvent("CLIENT_EVENT",(function(t){return n.krnL(t,"CE")}))})),s(this,"BIyR",(function(){for(var t in n.AeBT)n.uTCD(t.event,t.key,t.type);n.TMJG=!0})),s(this,"Lwdg",(function(t,e){var i;"function"==typeof e&&((i=n.nHSF[t]?n.nHSF[t]:[]).push(e),n.nHSF[t]=i,et.debug("Listeners list: ",n.nHSF))})),s(this,"unregisterFromEvent",(function(t,e){if(n.nHSF[t]){for(var i=n.nHSF[t],r=[],o=0;o<i.length;o++){var a=i[o];a!==e&&r.push(a)}n.nHSF[t]=r}})),s(this,"krnL",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"AE",i=e+"___"+t.name;n.uTCD(t,i,e)})),s(this,"uTCD",(function(e,i,r){if(n.TMJG){if(et.debug("Notifying listeners for event: "+e+", "+i,n.nHSF),n.nHSF[i])for(var o=n.nHSF[i],a=t.getController().getSDKRunningTimeInSec(),s=0;s<o.length;s++){(0,o[s])(r,e.name,a,e.additional_info)}}else n.AeBT.push({event:e,key:i,type:r})}))})),it=window.ApxorLogger,rt=function(){function e(){var n=this;return r(this,e),s(this,"eMkE",!1),s(this,"xjsP",null),s(this,"xydZ",w()),s(this,"NWRx",new nt),s(this,"BDFf",t.getSiteId()),s(this,"QKTK",{}),s(this,"getQeState",(function(){try{var e=t.getController().getFromStorage("qe_state");return e?JSON.parse(g(n.BDFf,e)):(n.QKTK={},n.setQeState())}catch(t){return n.QKTK={},n.setQeState()}})),s(this,"setQeState",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{t.getController().persistToStorage("qe_state",n.QKTK,!0)}catch(i){""===e?n.QKTK={}:n.QKTK[e]={SESSION:0,OVERALL:0,DATES:{}},t.getController().persistToStorage("qe_state",n.QKTK,!0)}return n.QKTK})),s(this,"initialize",(function(){n.eMkE||(n.eMkE=!0,n.xjsP=new tt,n.NWRx.initialize(),n.QKTK=n.getQeState(),it.info("QE Initialized.."))})),s(this,"parse",(function(t){n.Rify()?(n.xjsP.parse(t),n.NWRx.BIyR()):it.warn("Must call init first. Unable to proceed")})),s(this,"validate",(function(t,e){n.Rify()&&n.xjsP.validate(t,e)})),s(this,"getVariantCode",(function(t){return n.xjsP.getVariantCode(t)})),s(this,"validateForTermination",(function(t,e){n.Rify()&&n.xjsP.validateForTermination(t,e)})),s(this,"validateForTerminationAttributes",(function(t,e){return n.xjsP.validateForTerminationAttributes(t,e)})),s(this,"updateCount",(function(t){try{f(n.QKTK[t])||n.createObjConfig(t),n.incrementFrequencies(t),n.setQeState(t),n.xjsP.dRwe(t)}catch(t){console.log("Could not update the count config:".concat(t))}})),s(this,"resetFrequencyCounts",(function(){n.xjsP.resetFrequencyCounts()})),s(this,"getFrequencyCount",(function(t){return n.xjsP.getFrequencyCount(t)})),s(this,"registerForEvent",(function(t,e){n.NWRx.Lwdg(t,e)})),s(this,"unregisterFromEvent",(function(t,e){n.NWRx.unregisterFromEvent(t,e)})),s(this,"notifyEventListener",(function(t){n.NWRx.krnL(t)})),s(this,"fetch",(function(e,n,i,r){t.getController().fetchConfiguration(e,n,i,r)})),s(this,"Rify",(function(){return n.eMkE})),s(this,"getCampaignMetaFromQueryEngine",(function(t){return n.xjsP.cPnL(t)})),s(this,"wETq",(function(){return n.xydZ})),e.instance||(e.instance=this),e.instance}return a(e,[{key:"createObjConfig",value:function(t){try{this.QKTK=this.getQeState(),f(this.QKTK[t])||(this.QKTK[t]={SESSION:0,OVERALL:0,DATES:{}},this.xydZ&&(this.QKTK[t].DATES[this.xydZ]=0),this.setQeState(t))}catch(t){it.error("Can not create the frequency count object:"+t)}}},{key:"incrementFrequencies",value:function(t){this.QKTK=this.getQeState();var e=this.QKTK[t];e.SESSION=e.SESSION+1,e.OVERALL=e.OVERALL+1;var n=w();n===this.xydZ&&e.DATES&&e.DATES[n]||(this.xydZ=n,e.DATES={},e.DATES[this.xydZ]=0),e.DATES[this.xydZ]=e.DATES[this.xydZ]+1}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}]),e}();s(rt,"instance",void 0),window.ceVersion=160;try{void 0===exports&&null===exports||(exports.default=rt,module.exports=exports.default)}catch(t){}return rt}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apxor-qe",
3
- "version": "1.6.2-qa.0",
3
+ "version": "1.6.3-qa.0",
4
4
  "author": "Uma Sankar Yedida <umasankar.yedida@apxor.com> (https://www.apxor.com)",
5
5
  "contributors": [
6
6
  {
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "jsdom": "^22.1.0",
55
- "apxor": "2.5.2-qa.0"
55
+ "apxor": "2.5.3-qa.0"
56
56
  },
57
57
  "files": [
58
58
  "dist"