"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n=0?"+":"-",i=function(e){var t=Math.floor(Math.abs(e));return(t<10?"0":"")+t};return e.getFullYear()+"-"+i(e.getMonth()+1)+"-"+i(e.getDate())+"T"+i(e.getHours())+":"+i(e.getMinutes())+":"+i(e.getSeconds())+n+i(t/60)+":"+i(t%60)}},{key:"getCookie",value:function(e){for(var t=e+"=",n=decodeURIComponent(document.cookie).split(";"),i=0;i0&&(e.recommendedTickers=t),n.length>0&&(e.analyzedTickers=n),null!=i&&void 0!==i&&(e.pubCode=i),isNaN(this.brandId)||null===this.brandId||(e.brandId=this.brandId),isNaN(this.affiliateId)||null===this.affiliateId||(e.affiliateId=this.affiliateId),e}},{key:"sendPing",value:function(e){var t=this.getPData();void 0!==e&&(t.eventType="additionalData",t.additionalData=e);var n=new XMLHttpRequest;n.open("POST",this.loggerUrl,!0),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("x-api-key","O1I1d31dqY5iHR07pLHrf7rKAOxDeMhQ2JsWck8c"),n.send(JSON.stringify(t))}},{key:"run",value:function(){this.sessionId=this.getCookie(this.BSS_SESSION_ID),null===this.sessionId&&(this.sessionId=this.uuidv4(),this.setCookie(this.BSS_SESSION_ID,this.sessionId,3650));var e=document.querySelector("script[src$='bss-px.min.js']"),t=e.getAttribute("src");this.brandId=e.getAttribute("data-brandId"),this.affiliateId=e.getAttribute("data-affiliateId"),this.pixelDomain=t.split("/store/PROD/js")[0],this.loggerUrl=this.pixelDomain+"/snowflake/logger",this.checkURLchange(this.checkURLchange,this)}},{key:"init",value:function(){return setTimeout((function(e){e.run()}),0,this),this}},{key:"sendData",value:function(e){if("object"!==_typeof(e)||null===e)throw"data must be of type object";"snaid"in e&&(this.snaid=e.snaid),this.sendPing(e)}}]),e}(),bsspx=(new bsspxClass).init();