TRD_ACC_ID = 2632; TRD_IS_FRIENDLY = true; TRD_SELECTORS = [];var $Trd_Base64=function(){function t(){}return t.encode=function(t){return t&&t.length?btoa(t):t},t.decode=function(t){return t&&t.length?atob(t):t},t}(),$Trd_i18n=function(){function t(t){this.context=t}return t.prototype.get=function(t){return t?(t=t.toLocaleUpperCase(),this.context.userTranslates[t]?this.context.userTranslates[t]:t):t},t}(),__awaiter=this&&this.__awaiter||function(t,n,e,i){return new(e||(e=Promise))((function(o,r){function a(t){try{d(i.next(t))}catch(t){r(t)}}function c(t){try{d(i.throw(t))}catch(t){r(t)}}function d(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,c)}d((i=i.apply(t,n||[])).next())}))},__generator=this&&this.__generator||function(t,n){var e,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(c){return function(d){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;r&&(r=0,c[0]&&(a=0)),a;)try{if(e=1,i&&(o=2&c[0]?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,i=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(t,a)}catch(t){c=[6,t],i=0}finally{e=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,d])}}},$Trd_Utils=function(){function t(){}return t.objectToQueryString=function(t){var n=[];for(var e in t)t.hasOwnProperty(e)&&void 0!==t[e]&&null!==t[e]&&n.push(encodeURIComponent(e)+"="+encodeURIComponent(t[e]));return n.join("&")},t.unix_nowtime=function(){return Math.round((new Date).valueOf()/1e3)},t.from_unixtime=function(t){return new Date(1e3*t).valueOf()},t.is_dif_hour=function(n,e){return t.unix_nowtime()-n>60*e*60},t.getscrollTop=function(){return t.isScrolledToShow(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0)},t.isScrolledToShow=function(t,n,e){var i=t||0;return n&&(!i||i>n)&&(i=n),e&&(!i||i>e)?e:i},t.IsScrollbarAtBottom=function(n){var e=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),i=Math.max(document.documentElement.scrollTop,document.body&&document.body.scrollTop,0),o=Math.max(document.documentElement.clientHeight,window.innerHeight)+i;if(document.doctype)return e*n<o;return document.getElementsByTagName("body")[0].style.height="900px",900*n<t.getscrollTop()},t.getScrollPercent=function(){var t=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(document.documentElement.scrollTop,document.body&&document.body.scrollTop,0),e=Math.max(document.documentElement.clientHeight,window.innerHeight)+n;return Math.round(100*e/t)},t.parseURL=function(t){var n=document.createElement("a");n.href=t;var e={source:t,protocol:n.protocol.replace(":",""),host:n.hostname,port:n.port,query:n.search,params:function(){for(var t,e={},i=n.search.replace(/^\?/,"").split("&"),o=i.length,r=0;r<o;r++)i[r]&&(e[(t=i[r].split("="))[0]]=t[1]);return e}(),file:(n.pathname.match(/\/([^\/?#]+)$/i)||[,""])[1],hash:n.hash.replace("#",""),path:n.pathname.replace(/^([^\/])/,"/$1"),relative:(n.href.match(/tps?:\/\/[^\/]+(.+)/)||[,""])[1],segments:n.pathname.replace(/^\//,"").split("/")};return n=void 0,e},t.cleanUrlQueryParams=function(t,n){try{var e=new URL(t);return n.forEach((function(t){return e.searchParams.delete(t)})),e.toString()}catch(n){return t}},t.parseYouTubeUrl=function(t){var n,e={videoId:void 0,startTime:0},i=new URL(t);return i.hostname.includes("youtube.com")?e.videoId=i.searchParams.get("v")||(null===(n=i.pathname)||void 0===n?void 0:n.split("/embed/")[1]):"youtu.be"===i.hostname&&(e.videoId=i.pathname.substring(1)),e.videoId&&i.searchParams.has("t")&&(e.startTime=Number(i.searchParams.get("t"))),e},t.compareDomains=function(n,e){var i=t.parseURL(e),o=t.parseURL(n);return i.host.replace("www.","")===o.host.replace("www.","")},t.CheckVisibleContainer=function(t){if(t){var n=window.getComputedStyle(t);return"0"!==n.width&&"0"!==n.height&&"0"!==n.opacity&&"none"!==n.display&&"hidden"!==n.visibility&&t.offsetHeight+t.offsetWidth+t.getBoundingClientRect().height+t.getBoundingClientRect().width>0}return!1},t.loadCss=function(t,n){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,new Promise((function(e,i){var o;if(!document.getElementById(n)){var r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.onload=function(){e(!0)},r.onerror=function(){i(!1)},r.href=t,r.id=n;var a=document.querySelector("script");null===(o=null==a?void 0:a.parentNode)||void 0===o||o.insertBefore(r,a)}e(!0)}))]}))}))},t.loadJs=function(t,n){return new Promise((function(e,i){var o;if(!document.getElementById(n)){var r=document.createElement("script");r.type="text/javascript",r.onload=function(){e(!0)},r.onerror=function(){i(!1)},r.src=t,r.id=n;var a=document.getElementsByTagName("script")[0];null===(o=a.parentNode)||void 0===o||o.insertBefore(r,a)}}))},t.downloadFile=function(n,e){var i=t.parseURL(n),o=i.segments[i.segments.length-1],r=(null==e?void 0:e.length)?"".concat(e,"?url=").concat(encodeURIComponent(n)):n,a=new XMLHttpRequest;a.open("GET",r,!0),a.responseType="blob",a.onload=function(){var t=new Blob([a.response],{}),n=window.URL.createObjectURL(t),e=document.createElement("a");e.style.display="none",e.setAttribute("href",n),e.setAttribute("download",o),document.body.appendChild(e),e.click(),window.URL.revokeObjectURL(n),document.body.removeChild(e)},a.send()},t.getVisibilityTypeId=function(t){switch(t){case"embedded":return UnitVisibiltyType.Embedded;case"full":return UnitVisibiltyType.Full;case"light":return UnitVisibiltyType.Light;case"fixed":return UnitVisibiltyType.Float;case"slider":return UnitVisibiltyType.Sliding;default:return UnitVisibiltyType.None}},t.getUnitTypeId=function(t){switch(t){case"recommend":return UnitTypeId.Content;case"form":return UnitTypeId.Form;case"script":return UnitTypeId.Script;case"hub":return UnitTypeId.Hub;case"survey":return UnitTypeId.Survey;case"fastext":return UnitTypeId.FastText;default:return UnitTypeId.Text}},t.showPreviewErrorMessage=function(t){var n=document.createElement("div");n.appendChild(document.createTextNode(t)),n.style.cssText="font-size: 12px; color: red; border: 1px solid red; background:white; position: fixed; bottom:10px; left:50%; padding:10px 50px; transform: translate(-50%, 0);",document.body.append(n)},t.sendToGoogleAnalytics=function(t,n,e){switch("undefined"!=typeof ga?"ga":"undefined"!=typeof gtag?"gtag":"undefined"){case"ga":var i=void 0!==ga.getAll?ga.getAll()[0]:void 0;i?i.send("event",t,n,(null==e?void 0:e.PageUrl)||"","0",{nonInteraction:"load"===n?1:0}):ga("send","event",t,n,(null==e?void 0:e.PageUrl)||"","0",{nonInteraction:"load"===n?1:0});break;case"gtag":gtag("event",n,{event_category:t,non_interaction:"load"===n})}},t.loadLzString=function(n){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return this.isLzStringLoaded?[3,2]:(this.isLzStringLoaded=!0,[4,t.loadJs("".concat(n.environment.cdnPath,"/global/lz-string.min.js"),"trd-lz")]);case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},t.sortURLSearchParamsDescending=function(t){var n=Array.from(t.keys()).sort((function(t,n){return n.localeCompare(t)})),e=new URLSearchParams;return n.forEach((function(n){t.getAll(n).forEach((function(t){e.append(n,t)}))})),e},t.getUtmParamsFromQueryString=function(t){var n=Array.from(t.keys()).filter((function(t){return t.startsWith("utm_")})),e=new URLSearchParams;return n.forEach((function(n){var i=t.get(n);null!==i&&e.append(n,i)})),e},t.getPageStrUid=function(n,e){var i=new URL(n),o=i.hostname.startsWith("www.")?i.hostname.replace("www.",""):i.hostname;if(!e&&""!==i.search){var r=t.cleanUrlParameters(i.searchParams);if(r)return o+t.removeLastSlash(i.pathname)+"?"+r}return o+t.removeLastSlash(i.pathname)},t.removeLastSlash=function(t){return"/"===t[t.length-1]?t.slice(0,-1):t},t.cleanUrlParameters=function(n){["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","trd","trd_debug","td","ref","mkt_tok","key","a8","token","dclid","transactionid","ugad","wapr","yclid","_ga","_gac","trd_unit_params_id","admin_preview","preview","ldtag_cl","dmai","argument","epik","sd_redirect_referer","submissionguid","_k_vid","asclp_uid","_hsmi","_hsenc","wbraid","_gl","ugx","trd_variant","trd_orig_variant","trd_ace_params_id","trd_otw","trd_strm","trd_stream_params_id","trd_referrer","fromStream","ysclid","trd_params_token"].forEach((function(t){n.delete(t)}));var e=t.sortURLSearchParamsDescending(n);return decodeURIComponent(e.toString().substring(0,4e3).trim().toLowerCase())},t.isVideoScriptSourceValid=function(t){return["https://fast.wistia.net","https://players.brightcove.net","https://play.vidyard.com"].some((function(n){return t.startsWith(n)}))},t.getPreSavedParams=function(t,n,e){return __awaiter(this,void 0,void 0,(function(){var i,o,r,a,c;return __generator(this,(function(d){if(i=new URLSearchParams(window.location.search),!(o=i.get("trd_params_token")))throw new Error("token not found");return r=encodeURIComponent(t),a=encodeURIComponent(o),c="".concat(e.environment.trafficServiceUrl,"/api/PreSavedParams?guid=").concat(r,"&paramsType=").concat(n,"&token=").concat(a),[2,$Trd_Tools.JsonpPromise(c)]}))}))},t.trim=function(t){return t&&t.length?t.replace(/^\s+|\s+$/gm,""):""},t.log=function(){if("undefined"!=typeof console&&void 0!==console.info)try{console.info.apply(console,arguments)}catch(t){Function.prototype.bind.call(console.info,console).apply(console,arguments)}},t.isValidEmail=function(n){return!!n&&(!((n=t.trim(n)).length<2)&&(!!n.match(/\S+@\S+\.\S+/)&&(-1===n.indexOf(" ")&&-1===n.indexOf(".."))))},t.validationEmail=function(n){return t.isValidEmail(n)},t.findDomain=function(){var t="",n=location.host;-1===n.indexOf("www.")&&(n="www."+n);var e=n.split("."),i=e.length;if(2===i)return t="."+n;for(var o=i-(2===e[i-2].length||3===e[i-2].length?3:2);o<i;o++)t+="."+e[o];return t},t.arr2params=function(t){var n=[];for(var e in t)for(var i in t[e])n.push(i+"="+encodeURIComponent(t[e][i]));return n.join("&")},t.generateUniqueId=function(){return(new Date).valueOf()+Math.random().toFixed(4).substring(2)},t.isUrl=function(t){return void 0!==t&&(0!==t.length&&(0!==t.indexOf("#")&&0!==t.indexOf("javascript:")))},t.url={encode:function(n){return escape(t.url._utf8_encode(n))},decode:function(n){return t.url._utf8_decode(decodeURIComponent(n))},_utf8_encode:function(t){t=t.replace(/\r\n/g,"\n");for(var n="",e=0;e<t.length;e++){var i=t.charCodeAt(e);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(63&i|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(63&i|128))}return n},_utf8_decode:function(t){for(var n="",e=0,i=0,o=0,r=0;e<t.length;)(i=t.charCodeAt(e))<128?(n+=String.fromCharCode(i),e++):i>191&&i<224?(o=t.charCodeAt(e+1),n+=String.fromCharCode((31&i)<<6|63&o),e+=2):(o=t.charCodeAt(e+1),r=t.charCodeAt(e+2),n+=String.fromCharCode((15&i)<<12|(63&o)<<6|63&r),e+=3);return n}},t.isEmptyObject=function(t){for(var n in t)if(t.hasOwnProperty(n))return!1;return!0},t.isLzStringLoaded=!1,t}(),$Trd_Tools=function(){function t(){}return t.get_urlparams=function(t){var n=t?t.split("?")[1]:window.location.search.slice(1),e={};if(n)for(var i=(n=n.split("#")[0]).split("&"),o=function(t){var n=i[t].split("="),o=void 0,r=n[0].replace(/\[\d*\]/,(function(t){return o=t.slice(1,-1),""}));if(void 0!==n[1]&&""!==n[1]){var a=n[1];r=["__proto__","constructor","prototype"].includes(r.toLowerCase())?r.toUpperCase():r.toLowerCase(),a=decodeURIComponent(a),e[r]?("string"==typeof e[r]&&(e[r]=[e[r]]),void 0===o?e[r].push(a):e[r][o]=a):e[r]=a}},r=0;r<i.length;r++)o(r);return e},t.JSONP=function(n,e,i,o){if(n=n||"",e=e||function(){},i&&!/^[a-zA-z0-9]+$/.test(i))throw new Error("Bad jsonp callback: ".concat(i));var r=i||"jsonp"+Math.round(1000001*Math.random());window[r]=function(n){e&&e(n);var i=t.getBrowser();if(window[r]&&void 0!==i.name&&"IE"!==i.name){window[r]=void 0;try{delete window[r]}catch(t){}}},-1===n.indexOf("?")?n+="?":n+="&";var a=document.createElement("script");a.src="".concat(n,"callback=").concat(r,"&vid=").concat(t.getVid()),a.type="text/javascript",a.className="cross",a.async=!0,a.onerror=function(t){o&&o(t)},document.getElementsByTagName("head")[0].appendChild(a)},t.JsonpPromise=function(n){return new Promise((function(e,i){t.JSONP(n,(function(t){return e(t)}),null,(function(){return i()}))}))},t.getVid=function(){return window.trd_api.context.visitorId||""},t.tryDecodeUri=function(t){try{return decodeURIComponent(t)}catch(n){return t}},t.getBrowser=function(){var t,n=navigator.userAgent,e=n.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(e[1])?{name:"IE",version:(t=/\brv[ :]+(\d+)/g.exec(n)||[])[1]||""}:"Chrome"===e[1]&&(t=n.match(/\b(OPR|Edge)\/(\d+)/))?{name:t[1].replace("OPR","Opera"),version:t[2]}:(e=e[2]?[e[1],e[2]]:[navigator.appName,navigator.appVersion,"-?"],(t=n.match(/version\/(\d+)/i))&&e.splice(1,1,t[1]),{name:e[0],version:e[1]})},t.checkMobile=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n},t.isMobile={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPod/i)},iOS_ipad:function(){return navigator.userAgent.match(/iPad/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return t.isMobile.Android()||t.isMobile.BlackBerry()||t.isMobile.iOS()||t.isMobile.iOS_ipad()||t.isMobile.Opera()||t.isMobile.Windows()},is_mobile:function(){return t.isMobile.any()?1:0},getOs:function(){return t.isMobile.Android()?"android":t.isMobile.iOS()||t.isMobile.iOS_ipad()?"ios":"desktop"}},t.ajax=function(t,n,e,i){var o=!1!==i,r=new XMLHttpRequest;r.onload=function(t){var n=t.target,i="";"json"!==n.responseType&&("("===(i=n.responseText)[0]&&(i=i.substring(1,i.length)),")"===i[i.length-1]&&(i=i.substring(0,i.length-1)),i=JSON.parse(i),e(i))};var a=n;o&&(a+=(-1===n.indexOf("?")?"?":"&")+(new Date).getTime());r.open(t,a,!0),r.send()},t.pixel=function(n,e,i){var o=document.getElementsByTagName("BODY")[0],r=-1===n.indexOf("?")?"?":"&",a="".concat(n).concat(r,"vid=").concat(t.getVid(),"&r=").concat((new Date).getTime()),c=document.createElement("img");c.className="trdpix",c.onerror=function(){},c.onload=function(){null==o||o.removeChild(c),i&&i()},c.src=a,c.height=1,c.width=1,c.alt="",c.style.cssText="display:none !important; visibility:hidden !important;width:1px;height:1px;",null==o||o.appendChild(c)},t.cookie={decodeCookie:function(){for(var n=document.cookie.split(";"),e={},i=0;i<n.length;i++){var o=n[i],r=o.indexOf("="),a=$Trd_Utils.trim(t.tryDecodeUri(o.slice(0,r))),c=t.tryDecodeUri(o.slice(r+1));e[a]=c}return e},findCookieByName:function(n){var e=t.cookie.decodeCookie();for(var i in e){var o=e[i];if(0===i.indexOf(n))return o}},get:function(t){var n=document.cookie.match(new RegExp("(?:^|; )"+t.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return n?decodeURIComponent(n[1]):void 0},set:function(t,n,e){var i=(e=e||{}).expires;if("number"==typeof i&&i){var o=new Date;o.setTime(o.getTime()+1e3*i),i=e.expires=o}i&&i.toUTCString&&(e.expires=i.toUTCString());var r=t+"="+(n=encodeURIComponent(n));for(var a in e){r+="; "+a;var c=e[a];!0!==c&&(r+="="+c)}document.cookie=r+"; Secure"},erase:function(t,n){document.cookie=t+"=; domain="+n+"; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"},getCookieByName:function(t){var n="string"==typeof document.cookie?document.cookie:"";if((n=$Trd_Utils.trim(n))&&n.length>0)for(var e=n.split("; "),i="",o="",r=0;r<e.length;r++){var a=e[r].split("=");if(i=$Trd_Utils.trim(a[0]),o=$Trd_Utils.trim(a[1]),i.indexOf("hash")<0&&0===i.indexOf(t))return{name:i,value:o}}return{name:"",value:""}},getCookieByExactName:function(t){var n="string"==typeof document.cookie?document.cookie:"";if((n=$Trd_Utils.trim(n))&&n.length>0)for(var e=n.split("; "),i="",o="",r=0;r<e.length;r++){var a=e[r].split("=");if(i=$Trd_Utils.trim(a[0]),o=$Trd_Utils.trim(a[1]),i===t)return{name:i,value:o}}return{name:"",value:""}}},t.encode=function(t){return String(t).replace(/[,;"\\=\s%]/g,(function(t){return encodeURIComponent(t)}))},t.decode=function(t){return decodeURIComponent(t)},t.isArray=function(t){return"[object HTMLCollection]"==={}.toString.call(t)||"[object NodeList]"==={}.toString.call(t)||"[object Array]"==={}.toString.call(t)},t.toArray=function(t){var n,e;for(e=[],n=t.length;n--;e[n]=t[n]);return e},t.dom={addHandler:function(t,n,e){t.addEventListener?t.addEventListener(n,e,!0):t.attachEvent?t.attachEvent("on"+n,e):t["on"+n]=e},removeHandler:function(t,n,e){t.removeEventListener?t.removeEventListener(n,e,!1):t.detachEvent?t.detachEvent("on"+n,e):t["on"+n]=null},add_event:function(n,e,i){var o=i||!1;if("window"===n)return t.dom.addHandler(window,e,o),!0;if("document"===n)return t.dom.addHandler(document,e,o),!0;if(n=t.dom.getElement(n))if(t.isArray(n)){n=t.toArray(n);for(var r=0;r<n.length;r++)t.dom.addHandler(n[r],e,o)}else t.dom.addHandler(n,e,o);return n},remove_event:function(n,e,i){var o=i||{};if("window"===n)return t.dom.removeHandler(window,e,o),!0;if("document"===n)return t.dom.removeHandler(document,e,o),!0;if(n=t.dom.getElement(n))if(t.isArray(n)){n=t.toArray(n);for(var r=0;r<n.length;r++)t.dom.removeHandler(n[r],e,o)}else t.dom.removeHandler(n,e,o)},getElement:function(t){return 0===t.indexOf("#")&&!1===t.indexOf(" ")&&!1===t.indexOf(".")?document.getElementById(t):document.querySelectorAll(t)}},t.addCssIntoHead=function(t,n){var e=document.createElement("style");e.type="text/css",e.id=n,t=(t=(t=(t=t.replace('<style type="text/css">',"")).replace("</style>","")).replace(/(?:\r\n|\r|\n)/g,"")).replace(/  +/g," "),e.innerText=t,document.getElementsByTagName("head")[0].appendChild(e)},t}(),RecordsService=function(){function t(t,n,e){var i;void 0===e&&(e=100),this.context=t,this.recordsKeyName=n,this.maxRecords=e,this.expires=36e6,this.records=this.read(),$Trd_Tools.cookie.findCookieByName(this.recordsKeyName)&&($Trd_Tools.cookie.erase(this.recordsKeyName,null===(i=this.context.pageDetails)||void 0===i?void 0:i.cook_domain),this.set())}return t.prototype.getTimeSeconds=function(){return Math.round((new Date).getTime()/1e3)},t.prototype.read=function(){var t=window.localStorage.getItem(this.recordsKeyName)||$Trd_Tools.cookie.findCookieByName(this.recordsKeyName);return t&&"null"!==t&&t.length?JSON.parse(t):[]},t.prototype.set=function(){var t=JSON.stringify(this.records);return window.localStorage.setItem(this.recordsKeyName,t),!0},t.prototype.getRecord=function(t){return this.records.find(t)},t.prototype.add=function(t){this.records.length>this.maxRecords&&this.records.shift(),this.records.push(t),this.set()},t}(),__extends=this&&this.__extends||function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}}(),$Trd_UserPageHistory_Cook=function(t){function n(n,e){var i=t.call(this,n,"trd_userpagehistory",50)||this;return i.context=n,i.logger=e,i}return __extends(n,t),n.prototype.addHistory=function(t){var n=this;return t.forEach((function(t){if(t.PageId){var e=n.getRecord((function(n){return Number(n.id)===Number(t.PageId)}));e?e.ls=n.getTimeSeconds():n.add({id:t.PageId,ls:n.getTimeSeconds()})}})),this.set(),!0},n}(RecordsService),enRenderModes,$Trd_InternalEventsTypes,$Trd_TriggersEventsTypes;function mapBackendTriggers(t){return t&&t.length>0?t.map((function(t){switch(t){case"short_timeout":return $Trd_TriggersEventsTypes.EV_SHORT_TIMEOUT_FROM_PAGE_LOAD_EXPIRED;case"long_timeout":return $Trd_TriggersEventsTypes.EV_LONG_TIMEOUT_FROM_PAGE_LOAD_EXPIRED;case"scroll":return $Trd_TriggersEventsTypes.EV_PAGE_SCROLL;case"container_shown":return $Trd_TriggersEventsTypes.EV_CONTAINER_SHOWN;case"force_show":return $Trd_TriggersEventsTypes.EV_CTA_FORCE_SHOW;case"exit_intent":return $Trd_TriggersEventsTypes.EV_EXIT_INTENT;case"trd_page_read":return $Trd_TriggersEventsTypes.EV_PAGE_READ;case"trd_first_interaction":return $Trd_TriggersEventsTypes.EV_FIRST_INTERACTION;case"trd_units_ready":return $Trd_TriggersEventsTypes.EV_TRD_UNITS_READY;case"thirty_timeout":return $Trd_TriggersEventsTypes.EV_TIMEOUT_THIRTY_FROM_PAGE_LOAD_EXPIRED;case"sixty_timeout":return $Trd_TriggersEventsTypes.EV_TIMEOUT_SIXTY_PAGE_LOAD_EXPIRED;default:return t}})):[]}!function(t){t[t.SHOW=0]="SHOW",t[t.DONT_SHOW=1]="DONT_SHOW"}(enRenderModes||(enRenderModes={})),function(t){t.CTA_INITIALIZED="cta_initialized",t.CTA_SHOWN="cta_shown",t.CTA_CLOSE="cta_close",t.CTA_COMPLETE="cta_complete",t.CTA_NOT_EXPOSED="cta_not_exposed",t.CTA_TRIGGER_USED="trd_unit_trigger_used"}($Trd_InternalEventsTypes||($Trd_InternalEventsTypes={})),function(t){t.EV_TRD_READY="trd_ready",t.EV_TRD_UNITS_READY="trd_units_ready",t.EV_PAGE_READ="trd_page_read",t.EV_PAGE_SCROLL="trd_page_scroll",t.EV_EXIT_INTENT="trd_exit_intent",t.EV_FIRST_INTERACTION="trd_first_interaction",t.EV_SHORT_TIMEOUT_FROM_PAGE_LOAD_EXPIRED="trd_short_timeout",t.EV_LONG_TIMEOUT_FROM_PAGE_LOAD_EXPIRED="trd_long_timeout",t.EV_CONTAINER_SHOWN="trd_container_shown",t.EV_CTA_FORCE_SHOW="trd_cta_force_show",t.EV_TIMEOUT_THIRTY_FROM_PAGE_LOAD_EXPIRED="trd_thirty_timeout",t.EV_TIMEOUT_SIXTY_PAGE_LOAD_EXPIRED="trd_sixty_timeout"}($Trd_TriggersEventsTypes||($Trd_TriggersEventsTypes={}));var $Trd_Context=function(){},$Trd_EnvironmentSettings=function(){function t(){}return Object.defineProperty(t.prototype,"trafficEventsEndpoint",{get:function(){return this.trafficServiceUrl+this.trafficEventPath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trafficSetMaEndpoint",{get:function(){return this.trafficServiceUrl+this.trafficSetMaPath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cdnPathEndpoint",{get:function(){return this.cdnPath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cdnCssEndpoint",{get:function(){return this.cdnPath+this.loadCssPath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cdnTemplateEndpoint",{get:function(){return this.cdnPath+this.loadTemplatePath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trafficPersonalEndpoint",{get:function(){return this.trafficServiceUrl+this.loadPersonalPath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStage",{get:function(){return this.cdnPath.includes("stage")||this.cdnPath.includes("localhost")},enumerable:!1,configurable:!0}),t}(),$Trd_ClientCookie=function(){this.name="trd_cid",this.expires=31536e3},$Trd_CtaClientCookie=function(){this.name="trd_exitintentclient",this.expires=31536e3},$Trd_ButtonSelector=function(){},Frequency,UnitVisibiltyType,UnitTypeId,AceVariantType,AceElementAction,AceElementAddPosition,AceElementAddType,ElementReplaceType,AceImageReplaceMode,AceImageObjectFit,CssSizeUnits,AceTextAlign,AcePosition,AceElementDisplay,AceBackgroundImageFit,StreamType,StreamContentType,StreamContentDesktopPosition,StreamContentThumbnailType,StreamLayoutAutoLoadTrigger,StreamLayoutType,StreamLayoutSliderStyle,StreamLayoutSliderPosition;!function(t){t[t.EveryPage=0]="EveryPage",t[t.EverySession=1]="EverySession",t[t.Never=3]="Never"}(Frequency||(Frequency={})),function(t){t[t.Embedded=0]="Embedded",t[t.Full=1]="Full",t[t.Light=2]="Light",t[t.Float=3]="Float",t[t.Sliding=4]="Sliding",t[t.None=100]="None"}(UnitVisibiltyType||(UnitVisibiltyType={})),function(t){t[t.Text=0]="Text",t[t.Content=1]="Content",t[t.Form=2]="Form",t[t.Script=3]="Script",t[t.Hub=4]="Hub",t[t.Survey=5]="Survey",t[t.FastText=6]="FastText"}(UnitTypeId||(UnitTypeId={})),function(t){t[t.Elements=1]="Elements",t[t.Urls=2]="Urls"}(AceVariantType||(AceVariantType={})),function(t){t[t.Edit=1]="Edit",t[t.Remove=2]="Remove",t[t.Add=3]="Add",t[t.Replace=4]="Replace",t[t.Reorder=5]="Reorder"}(AceElementAction||(AceElementAction={})),function(t){t[t.Before=1]="Before",t[t.After=2]="After"}(AceElementAddPosition||(AceElementAddPosition={})),function(t){t[t.Text=1]="Text",t[t.Image=2]="Image",t[t.Banner=3]="Banner",t[t.Button=4]="Button",t[t.Html=5]="Html"}(AceElementAddType||(AceElementAddType={})),function(t){t[t.Text=1]="Text",t[t.Image=2]="Image",t[t.Link=3]="Link",t[t.Banner=4]="Banner",t[t.IFrame=5]="IFrame"}(ElementReplaceType||(ElementReplaceType={})),function(t){t[t.ChangeOnlyImageSource=1]="ChangeOnlyImageSource",t[t.KeepOrigDimensions=2]="KeepOrigDimensions",t[t.CustomDimensions=3]="CustomDimensions"}(AceImageReplaceMode||(AceImageReplaceMode={})),function(t){t[t.None=1]="None",t[t.Contain=2]="Contain",t[t.Cover=3]="Cover",t[t.Fill=4]="Fill",t[t.ScaleDown=5]="ScaleDown"}(AceImageObjectFit||(AceImageObjectFit={})),function(t){t[t.Pixels=1]="Pixels",t[t.Precentage=2]="Precentage"}(CssSizeUnits||(CssSizeUnits={})),function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right",t[t.Justify=4]="Justify"}(AceTextAlign||(AceTextAlign={})),function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"}(AcePosition||(AcePosition={})),function(t){t[t.Block=1]="Block",t[t.Inline=2]="Inline"}(AceElementDisplay||(AceElementDisplay={})),function(t){t[t.Original=0]="Original",t[t.Contain=1]="Contain",t[t.Cover=2]="Cover",t[t.Fill=3]="Fill"}(AceBackgroundImageFit||(AceBackgroundImageFit={})),function(t){t[t.Stream=1]="Stream",t[t.Autopilot=2]="Autopilot"}(StreamType||(StreamType={})),function(t){t[t.Url=1]="Url",t[t.Pdf=2]="Pdf",t[t.Otw=3]="Otw",t[t.Auto=4]="Auto"}(StreamContentType||(StreamContentType={})),function(t){t[t.Left=1]="Left",t[t.Right=2]="Right"}(StreamContentDesktopPosition||(StreamContentDesktopPosition={})),function(t){t[t.None=0]="None",t[t.RoundImage=1]="RoundImage",t[t.RoundedCorners=2]="RoundedCorners",t[t.Square=3]="Square"}(StreamContentThumbnailType||(StreamContentThumbnailType={})),function(t){t[t.Scroll=0]="Scroll",t[t.Timer=1]="Timer"}(StreamLayoutAutoLoadTrigger||(StreamLayoutAutoLoadTrigger={})),function(t){t[t.SidePanel=1]="SidePanel",t[t.Slider=2]="Slider",t[t.Mixed=3]="Mixed"}(StreamLayoutType||(StreamLayoutType={})),function(t){t[t.Vertical=1]="Vertical",t[t.Horizontal=2]="Horizontal"}(StreamLayoutSliderStyle||(StreamLayoutSliderStyle={})),function(t){t[t.BottomRight=1]="BottomRight",t[t.BottomLeft=2]="BottomLeft",t[t.MiddleRight=3]="MiddleRight",t[t.MiddleLeft=4]="MiddleLeft"}(StreamLayoutSliderPosition||(StreamLayoutSliderPosition={}));var $Trd_Logger=function(){function t(t){this.context=t}return t.prototype.log=function(t){var n,e,i;console.info(t);var o=$Trd_Base64.encode(t.stack),r={accountId:this.context.accountId,cookie:null===(n=this.context.cid)||void 0===n?void 0:n.value,img:1,type:"log",url:$Trd_Base64.encode(null!==(i=null===(e=this.context.pageDetails)||void 0===e?void 0:e.url)&&void 0!==i?i:""),log:o},a=this.context.environment.trafficEventsEndpoint+"?"+$Trd_Utils.objectToQueryString(r);$Trd_Tools.pixel(a,"trd_log")},t.prototype.logparam=function(t){var n;(null===(n=this.context.pageDetails)||void 0===n?void 0:n.urlParams)&&"true"===this.context.pageDetails.urlParams.trd_log&&console.info(t)},t}(),COOKIE_NAMES={VISITOR_UID:"trd_vuid_l",VISITOR_ID:"trd_vid_l"},$Trd_Visitor=function(){function t(t,n){this.context=t,this.logger=n}return t.prototype.setEmail=function(t,n){var e;void 0===n&&(n=this.context);var i={AccountId:n.accountId,Email:t,Cookie:null===(e=n.cid)||void 0===e?void 0:e.value};window.localStorage.setItem("trd-elist",btoa(t));var o="".concat(n.environment.trafficServiceUrl,"/api/MarketingAutomation/set-email?").concat($Trd_Utils.objectToQueryString(i)),r=this;$Trd_Tools.JSONP(o,(function(t){try{window.localStorage.removeItem("trd-elist"),r.setTracker({vid:t.VisitorInternalId,vuid:t.VisitorUid},r.context)}catch(t){}}))},t.prototype.getTracker=function(){var t=$Trd_Tools.cookie.findCookieByName(COOKIE_NAMES.VISITOR_ID)||(window.localStorage?window.localStorage.getItem(COOKIE_NAMES.VISITOR_ID):void 0),n=$Trd_Tools.cookie.findCookieByName(COOKIE_NAMES.VISITOR_UID)||(window.localStorage?window.localStorage.getItem(COOKIE_NAMES.VISITOR_UID):void 0);return t&&n?{vid:t,vuid:n}:void 0},t.prototype.setTracker=function(t,n){var e,i,o,r;window.localStorage&&(window.localStorage.setItem(COOKIE_NAMES.VISITOR_ID,t.vid),window.localStorage.setItem(COOKIE_NAMES.VISITOR_UID,t.vuid)),$Trd_Tools.cookie.set(COOKIE_NAMES.VISITOR_ID,t.vid,{expires:null===(e=this.context.cid)||void 0===e?void 0:e.expires,path:"/",domain:null===(i=n.pageDetails)||void 0===i?void 0:i.cook_domain}),$Trd_Tools.cookie.set(COOKIE_NAMES.VISITOR_UID,t.vuid,{expires:null===(o=n.cid)||void 0===o?void 0:o.expires,path:"/",domain:null===(r=n.pageDetails)||void 0===r?void 0:r.cook_domain}),n.visitorId=t.vid},t}(),LOCAL_STORAGE_ITEM_NAME="trd-elist",$Trd_FormListener=function(t,n,e){this.context=t,this.logger=n,this.visitor=e;var i=Array.from(document.querySelectorAll('input[type="email"]')),o=window.localStorage.getItem(LOCAL_STORAGE_ITEM_NAME);if(o){var r=atob(o);this.visitor.setEmail(r)}var a=this;i.forEach((function(t){t.addEventListener("change",(function(t){try{var n=t.target.value;$Trd_Utils.isValidEmail(n)&&a.visitor.setEmail(n)}catch(t){}}))}))},$Trd_UrlGrabber=function(){function t(t,n){var e;this.context=t,this.visitor=n,this.emailParamsNames=["mail","utm_emaddress"],(null===(e=this.context.accountSettings)||void 0===e?void 0:e.trackUrl)&&this.init()}return t.prototype.init=function(){var t,n=this,e=function(t){i.emailParamsNames.forEach((function(e){var i;if(t.indexOf(e)>=0){var o=null===(i=n.context.pageDetails)||void 0===i?void 0:i.urlParams[t];o&&o.length&&$Trd_Utils.isValidEmail(o)&&n.visitor.setEmail(o)}}))},i=this;for(var o in null===(t=this.context.pageDetails)||void 0===t?void 0:t.urlParams)e(o)},t}(),$Trd_Events=function(){function t(t,n){this.context=t,this.logger=n,this.TIMEOUT_READ=25e3,this.TIMEOUT_READ_SCROLL=13e3,this.isScroll=!1,this.readSent=!1,this.isReadMinScrollReached=!1,this.isReadMinScrollTimeout=!1}return t.prototype.init=function(){this.registerPageReadTimers(),this.registerButtons()},t.prototype.initSpa=function(){this.unregisterPageReadTimers(),this.registerPageReadTimers()},t.prototype.replayGoals=function(){var t=this,n=window.$TRD_goals;n&&n.length&&n.forEach((function(n){t.notifyGoal(n)})),delete window.$TRD_goals},t.prototype.handleUnsubmittedLeadForm=function(){var t,n,e,i;if(localStorage.getItem("trd_lead_frm")){var o=JSON.parse(atob(null!==(t=localStorage.getItem("trd_lead_frm"))&&void 0!==t?t:"")),r={AccountId:this.context.accountId,CtaId:o.id,trd_cid:null===(n=this.context.cid)||void 0===n?void 0:n.value,ClientUrl:o.url,uuid:(null===(e=this.context.uuid)||void 0===e?void 0:e.value)||(new Date).getTime(),FormDataStr:JSON.stringify(o.formFields),StreamId:null!==(i=this.context.streamId)&&void 0!==i?i:""};this.context.maCookie&&this.context.maCookie.length&&(r.maCook=btoa(this.context.maCookie));var a="".concat(this.context.environment.trafficServiceUrl,"/api/experience/new-lead?").concat($Trd_Utils.objectToQueryString(r));$Trd_Tools.JSONP(a,(function(t){localStorage.removeItem("trd_lead_frm")}))}},t.prototype.notifyGoal=function(t){var n,e,i,o,r=Object.assign({accountId:this.context.accountId,cookie:null===(n=this.context.cid)||void 0===n?void 0:n.value,url:$Trd_Base64.encode(null!==(i=null===(e=this.context.pageDetails)||void 0===e?void 0:e.url)&&void 0!==i?i:""),streamId:null!==(o=this.context.streamId)&&void 0!==o?o:""},t),a="".concat(this.context.environment.trafficEventsEndpoint,"/goal?").concat($Trd_Utils.objectToQueryString(r));$Trd_Tools.pixel(a,"goal".concat(t.goalId))},t.prototype.notifyPageRead=function(){var t,n,e;if(!this.readSent){var i={accountId:this.context.accountId,cookie:null===(t=this.context.cid)||void 0===t?void 0:t.value,url:$Trd_Base64.encode(null!==(e=null===(n=this.context.pageDetails)||void 0===n?void 0:n.url)&&void 0!==e?e:""),streamId:this.context.streamId&&this.context.streamContentId?this.context.streamId:""};this.readSent=!0;var o="".concat(this.context.environment.trafficEventsEndpoint,"/pageread?").concat($Trd_Utils.objectToQueryString(i));$Trd_Tools.pixel(o,"pageread"),document.dispatchEvent(new Event($Trd_TriggersEventsTypes.EV_PAGE_READ)),this.afterScrollTimer&&clearTimeout(this.afterScrollTimer),this.simpleTimer&&clearTimeout(this.simpleTimer)}},t.prototype.registerPageReadTimers=function(){var t,n=this,e=null===(t=this.context.accountSettings)||void 0===t?void 0:t.readMinScroll;e?($Trd_Tools.dom.addHandler(window,"scroll",(function(){100*window.scrollY/(document.body.offsetHeight-window.innerHeight)>=e&&(n.isReadMinScrollReached=!0,!n.readSent&&n.isReadMinScrollTimeout&&n.notifyPageRead())})),this.afterScrollTimer=setTimeout((function(){n.isReadMinScrollTimeout=!0,!n.readSent&&n.isReadMinScrollReached&&n.notifyPageRead()}),this.context.readTimeoutAfterScroll||this.TIMEOUT_READ_SCROLL)):($Trd_Tools.dom.addHandler(window,"scroll",(function(){n.isScroll&&(n.afterScrollTimer&&clearTimeout(n.afterScrollTimer),n.afterScrollTimer=setTimeout((function(){n.notifyPageRead()}),n.context.readTimeoutAfterScroll||n.TIMEOUT_READ_SCROLL),n.isScroll=!1),n.isScroll=!0})),this.simpleTimer=setTimeout((function(){n.notifyPageRead()}),this.context.readTimeout||this.TIMEOUT_READ))},t.prototype.unregisterPageReadTimers=function(){this.readSent=!1,this.isScroll=!1,this.isReadMinScrollReached=!1,this.isReadMinScrollTimeout=!1,this.afterScrollTimer&&(clearTimeout(this.afterScrollTimer),this.afterScrollTimer=void 0),this.simpleTimer&&(clearTimeout(this.simpleTimer),this.simpleTimer=null)},t.prototype.registerButtons=function(){var t=this;$Trd_Tools.dom.addHandler(document,"click",(function(n){t.addEventListener(n,t)}))},t.prototype.addEventListener=function(t,n){for(var e,i,o,r=null!==(i=null===(e=n.context.accountSettings)||void 0===e?void 0:e.buttonSelectors)&&void 0!==i?i:[],a=0;a<r.length;a++)try{var c=!1;try{c=t.target.closest(r[a].button_selector)}catch(n){c=t.target}var d=document.querySelectorAll(r[a].button_selector);if(d.length)for(var s=0;s<d.length;s++)c===d[s]&&r[a]&&r[a].id&&n.goalElementClickHandler(t,t.srcElement,null!==(o=r[a].id)&&void 0!==o?o:0)}catch(t){}},t.prototype.goalElementClickHandler=function(t,n,e){var i,o,r,a="A"===n.tagName,c=n.getAttribute("href"),d="_blank"===n.getAttribute("target"),s=!0;c&&(s=$Trd_Utils.isUrl(c));var l=a&&s&&!d;l&&t.preventDefault();var u={accountId:this.context.accountId,cookie:null===(i=this.context.cid)||void 0===i?void 0:i.value,url:$Trd_Base64.encode(null!==(r=null===(o=this.context.pageDetails)||void 0===o?void 0:o.url)&&void 0!==r?r:""),goalId:e},h="".concat(this.context.environment.trafficEventsEndpoint,"/goal?").concat($Trd_Utils.objectToQueryString(u));if($Trd_Tools.pixel(h,"goal"),setTimeout((function(){l&&c&&(location.href=c)}),500),a&&s&&!d)return!1},t}(),$Trd_Pageview=function(){function t(t,n){this.context=t,this.logger=n}return t.prototype.notifyPageView=function(){var t,n,e,i,o,r,a={accountId:this.context.accountId,url:$Trd_Base64.encode(null!==(n=null===(t=this.context.pageDetails)||void 0===t?void 0:t.url)&&void 0!==n?n:""),cookie:null===(e=this.context.cid)||void 0===e?void 0:e.value,referral:(null===(i=this.context.pageDetails)||void 0===i?void 0:i.reffer)?$Trd_Base64.encode(this.context.pageDetails.reffer):"",variant:this.context.variant?this.context.variant:"",otwId:this.context.otwId?this.context.otwId:"",otwItemId:this.context.otwItemId?this.context.otwItemId:"",autopilotId:null!==(o=this.context.autopilotId)&&void 0!==o?o:"",streamId:this.context.streamId&&this.context.streamContentId?this.context.streamId:"",streamContentId:this.context.streamContentId?this.context.streamContentId:"",isPreview:this.context.isStreamPreview,fromStream:this.context.fromStream},c="";if(null===(r=this.context.accountSettings)||void 0===r?void 0:r.trackGaVisitors){var d=$Trd_Tools.cookie.getCookieByExactName("_ga");d.value&&(c="&gavid=".concat(d.value.split(".").slice(-2).join(".")))}var s="".concat(this.context.environment.trafficEventsEndpoint,"/pageview?").concat($Trd_Utils.objectToQueryString(a)).concat(c);$Trd_Tools.pixel(s,"pageview")},t}(),$TRD_MA_COOKIE_NAME="trd_ma_cookie",$TRD_MA_COOKIE_NAME_MAP={hubspot:"hubspotutk",marketo:"_mkto_trk",pardot:"visitor_id",acton:"wp",salesforce:"salesforce_id"},$Trd_MarketingAutomation=function(){function t(t,n,e){var i,o;this.context=t,this.logger=n,this.visitor=e,this.maCookieSent=!1,this.cookDomain=null!==(o=null===(i=t.pageDetails)||void 0===i?void 0:i.cook_domain)&&void 0!==o?o:"",this.savedCookie=$Trd_Tools.cookie.getCookieByName($TRD_MA_COOKIE_NAME),this.maCookieValue="",this.savedCookie.value&&"undefined"!==this.savedCookie.value&&(this.maCookieValue=this.savedCookie.value,this.context.maCookie=this.maCookieValue,this.savedCookie.value=$Trd_Base64.decode($Trd_Utils.url.decode(this.savedCookie.value))),this.check_cookie()}return t.prototype.check_cookie=function(){var t;(null===(t=this.context.accountSettings)||void 0===t?void 0:t.ma_system)?this.send_tracking({tracking_ma_name:this.context.accountSettings.ma_system}):$Trd_Tools.cookie.erase($TRD_MA_COOKIE_NAME,this.cookDomain)},t.prototype.send_tracking=function(t){var n,e,i,o=this;if(t.tracking_ma_name){var r=$TRD_MA_COOKIE_NAME_MAP[t.tracking_ma_name],a=$Trd_Tools.cookie.getCookieByName(r);if(this.logger.logparam("cook name:"+r+" / cook value:"+a.value+" / saved cook: "+this.savedCookie.value+"/ equal "+(this.savedCookie.value===a.value)),r&&a.value&&(this.maCookieValue=$Trd_Utils.url.decode(a.value),this.context.maCookie=this.maCookieValue,a.value!==this.savedCookie.value&&!this.maCookieSent)){a.value=$Trd_Utils.trim(a.value),a.value=a.value.replace(/(^")|("$)/gm,""),a.value=$Trd_Base64.encode(a.value),this.logger.logparam("cook value4send: "+a.value);var c={AccountId:this.context.accountId,ClientUrl:$Trd_Base64.encode(null!==(e=null===(n=this.context.pageDetails)||void 0===n?void 0:n.url)&&void 0!==e?e:""),CookieId:null===(i=this.context.cid)||void 0===i?void 0:i.value,MaCookie:a.value,MaCookieName:$Trd_Base64.encode(a.name),MaName:t.tracking_ma_name};this.logger.logparam("cook value4savecook: "+a.value);var d=this;this.maCookieSent=!0,$Trd_Tools.JSONP(this.context.environment.trafficSetMaEndpoint+"?"+$Trd_Utils.objectToQueryString(c),(function(t){try{t&&(t.VisitorInternalId&&d.visitor.setTracker({vid:t.VisitorInternalId,vuid:t.VisitorUid},d.context),$Trd_Tools.cookie.set($TRD_MA_COOKIE_NAME,a.value,{expires:43200,path:"/",domain:o.cookDomain}))}catch(t){o.logger.log(t)}}))}}},t}(),$TRD_CtaComponent=function(){function $TRD_CtaComponent(t,n,e,i){this.cta=t,this.ctaParams=n,this.context=e,this.renderingContext=i,this.SCROLL_DEPTH_DEFAULT=50,this.isShowNotified=!1,this._isVisible=!1,this.registeredTriggers=[],this.isContainerShownTriggerActivated=!1}return Object.defineProperty($TRD_CtaComponent.prototype,"id",{get:function(){return this.cta.Id},enumerable:!1,configurable:!0}),Object.defineProperty($TRD_CtaComponent.prototype,"isVisible",{get:function(){return this._isVisible},enumerable:!1,configurable:!0}),Object.defineProperty($TRD_CtaComponent.prototype,"containerElement",{get:function(){return this._containerElement},enumerable:!1,configurable:!0}),Object.defineProperty($TRD_CtaComponent.prototype,"isAutoEmbed",{get:function(){var t;return null===(t=this._containerElement)||void 0===t?void 0:t.classList.contains("trd-auto-embed")},enumerable:!1,configurable:!0}),Object.defineProperty($TRD_CtaComponent.prototype,"visibilityType",{get:function(){return this.cta.VisibiltyTypeId},enumerable:!1,configurable:!0}),$TRD_CtaComponent.prototype.hide=function(){},$TRD_CtaComponent.prototype.clear=function(){},$TRD_CtaComponent.prototype.notify=function(t){this.isOffer&&t===$Trd_InternalEventsTypes.CTA_CLOSE&&this.setOfferPopupTimestamp(),document.dispatchEvent(new CustomEvent(t,{detail:this.getCtaEventData()}))},$TRD_CtaComponent.prototype.unitClosed=function(){this._isVisible=!1},$TRD_CtaComponent.prototype.getCtaEventData=function(){return{cta:this.cta,ctaParams:this.ctaParams,ctaEventPrefix:this.getEventPrefix(),container:this._containerElement}},$TRD_CtaComponent.prototype.showComponent=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e;return __generator(this,(function(i){switch(i.label){case 0:return e=!0,this.cta.RenderMode!==enRenderModes.SHOW?[3,3]:(n=$Trd_InternalEventsTypes.CTA_SHOWN,this.isVisible?[3,2]:[4,this.show()]);case 1:e=i.sent(),this._isVisible=!0,i.label=2;case 2:return[3,4];case 3:n=$Trd_InternalEventsTypes.CTA_NOT_EXPOSED,i.label=4;case 4:return e&&t&&document.dispatchEvent(new CustomEvent($Trd_InternalEventsTypes.CTA_TRIGGER_USED,{detail:{unit:this.cta,trigger:null==t?void 0:t.type}})),!this.isShowNotified&&e&&(this.notify(n),this.isShowNotified=!0),[2]}}))}))},$TRD_CtaComponent.prototype.initializeComponent=function(t,n){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return this._containerElement=t,this.ctaIdentity=t.getAttribute("data-trd-tag"),this.initialize(t),!n||0===n.length||this.renderingContext&&this.cta.CtaType===String(UnitTypeId.Hub)?[4,this.showComponent()]:[3,2];case 1:return e.sent(),[3,4];case 2:return[4,this.registerTriggers(n)];case 3:e.sent(),e.label=4;case 4:return this.notify($Trd_InternalEventsTypes.CTA_INITIALIZED),[2]}}))}))},$TRD_CtaComponent.prototype.registerTriggers=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,o=this;return __generator(this,(function(r){switch(r.label){case 0:n=0,r.label=1;case 1:return n<t.length?(e=t[n])!==$Trd_TriggersEventsTypes.EV_CONTAINER_SHOWN?[3,3]:[4,this.registerContainerShownTrigger()]:[3,5];case 2:return r.sent(),[3,4];case 3:i=function(t){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,this.triggerHandler(t)];case 1:return[2,n.sent()]}}))}))},document.addEventListener(e,i),this.registeredTriggers.push({trigger:e,listener:i}),r.label=4;case 4:return n++,[3,1];case 5:return[2]}}))}))},$TRD_CtaComponent.prototype.triggerHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e;return __generator(this,(function(i){switch(i.label){case 0:if(t.type===$Trd_TriggersEventsTypes.EV_PAGE_SCROLL&&(n=this.ctaParams.scroll_depth||this.SCROLL_DEPTH_DEFAULT,t.detail.scroll_percentage<n))return this.hide(),[2];if(t.type===$Trd_TriggersEventsTypes.EV_CTA_FORCE_SHOW){if(t.detail&&t.detail.ctaIdentity&&t.detail.ctaIdentity!==this.ctaIdentity)return[2];if(t.detail&&!t.detail.ctaIdentity&&!this.isContainerVisible())return[2]}if(this.renderingContext){if(e=document.querySelectorAll(".trd-initial-open:not(.embedded):not(#trd_cta_".concat(this.cta.ViewModelId,")")),this.cta.VisibiltyTypeId!==UnitVisibiltyType.Embedded){if(this.renderingContext.triggersContext.has(t.type)||this.renderingContext.visibiltyTypesContext.has(this.cta.VisibiltyTypeId))return[2];if(e.length>0&&!this.isExitIntent(t.type))return[2];if(this.isTimePassed(this.renderingContext.lastPopupTimestamp,5e3))return[2];if(this.isTimePassed(this.renderingContext.lastClosedTimestamp,1e4)&&!this.isExitIntent(t.type))return[2];if(this.isOffer&&!this.context.streamId&&!this.isExitIntent(t.type)&&this.isTimePassed(this.renderingContext.lastOfferPopupTimestamp,1e3*this.context.environment.offersShowGapSec))return[2]}if(this.cta.VisibiltyTypeId===UnitVisibiltyType.Embedded&&(!this.isContainerVisible()||null===this.containerElement.offsetParent))return[2];this.cta.VisibiltyTypeId!==UnitVisibiltyType.Embedded&&(this.renderingContext.triggersContext.add(t.type),this.renderingContext.visibiltyTypesContext.add(this.cta.VisibiltyTypeId),this.renderingContext.lastPopupTimestamp=(new Date).getTime(),this.isOffer&&this.setOfferPopupTimestamp())}return[4,this.showComponent(t)];case 1:return i.sent(),[2]}}))}))},$TRD_CtaComponent.prototype.registerContainerShownTrigger=function(){return __awaiter(this,void 0,void 0,(function(){var t,n=this;return __generator(this,(function(e){return t=function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return this.isContainerShownTriggerActivated||!this.isContainerVisible()||null===this.containerElement.offsetParent?[3,2]:(this.isContainerShownTriggerActivated=!0,[4,this.showComponent()]);case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},document.addEventListener($Trd_TriggersEventsTypes.EV_PAGE_SCROLL,t),this.registeredTriggers.push({trigger:$Trd_TriggersEventsTypes.EV_PAGE_SCROLL,listener:t}),[2]}))}))},$TRD_CtaComponent.prototype.setOfferPopupTimestamp=function(){this.renderingContext&&(this.renderingContext.lastOfferPopupTimestamp=(new Date).getTime(),window.localStorage.setItem("trd_offerPopupTime",this.renderingContext.lastOfferPopupTimestamp.toString()))},$TRD_CtaComponent.prototype.isContainerVisible=function(){var t=+window.getComputedStyle(document.body).zoom||1,n=this.containerElement.getBoundingClientRect(),e=n.top*t<window.innerHeight&&n.bottom*t>=0,i=n.left*t>=0&&n.right*t<=window.innerWidth+1;return e&&i},$TRD_CtaComponent.prototype.isExitIntent=function(t){return!$Trd_Tools.isMobile.is_mobile()&&"trd_exit_intent"===t},$TRD_CtaComponent.prototype.isTimePassed=function(t,n){return(new Date).getTime()-t<n},Object.defineProperty($TRD_CtaComponent.prototype,"isOffer",{get:function(){return!!this.cta.OrchestrationId},enumerable:!1,configurable:!0}),$TRD_CtaComponent.prototype.clearComponent=function(){this.registeredTriggers.forEach((function(t){document.removeEventListener(t.trigger,t.listener)})),this.registeredTriggers=[],this.clear()},$TRD_CtaComponent.prototype.runUserActionScript=function(){var useActionScript=this.ctaParams.exitintent_use_actionscript||this.ctaParams.use_actionscript||"0",actionScript=this.ctaParams.exitintent_actionscript||this.ctaParams.actionscript||"";useActionScript&&actionScript.length&&eval(actionScript)},$TRD_CtaComponent}(),$TRD_CtaContentComponent=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.MAX_PAGE_TITLE_LENGTH=80,n}return __extends(n,t),n.prototype.notify=function(t,n){var e=this.getCtaEventData();e.pages=n,document.dispatchEvent(new CustomEvent(t,{detail:e}))},n.prototype.showComponent=function(){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.getContentTasks()];case 1:return t=e.sent(),this.cta.RenderMode===enRenderModes.SHOW?(n=$Trd_InternalEventsTypes.CTA_SHOWN,this.show()):n=$Trd_InternalEventsTypes.CTA_NOT_EXPOSED,this.isShowNotified||(this.notify(n,null==t?void 0:t.Pages),this.isShowNotified=!0),[2]}}))}))},n.prototype.getContentTasks=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(this.taskPages)return[2,this.taskPages];if(!this.taskPagesPromise){if(!t)throw"limit is required for the first request";this.taskPagesPromise=this.loadContentTasks(t)}return[2,this.taskPagesPromise]}))}))},n.prototype.loadContentTasks=function(t){var n=this;return new Promise((function(e,i){var o,r,a;a={AccountId:n.context.accountId,CtaId:n.cta.Id,Url:$Trd_Base64.encode((null===(o=n.context.pageDetails)||void 0===o?void 0:o.url)||""),Limit:t,UserPagesHistoryStr:JSON.stringify(null===(r=n.context.ctaUserPageHistoryCook)||void 0===r?void 0:r.records),UseOriginalImageIfExists:!0};var c="".concat(n.context.environment.trafficServiceUrl,"/api/content/recommend?").concat($Trd_Utils.objectToQueryString(a));$Trd_Tools.JSONP(c,(function(t){try{n.taskPages=n.getProcessedContentTasks(t),e(n.taskPages)}catch(t){i(t)}}))}))},n.prototype.getProcessedContentTasks=function(t){var n=this;return t.Pages.forEach((function(t){if(t.cleanPageUrl=t.PageUrl,t.Title.length>n.MAX_PAGE_TITLE_LENGTH-3&&(t.Title=t.Title.slice(0,n.MAX_PAGE_TITLE_LENGTH)+"..."),"pdf"===t.PageType){var e=encodeURIComponent(t.PageUrl),i="".concat(n.context.environment.fetchPdfPath,"?url=").concat(e),o=n.context.environment.isStage?"stage=true&":"";t.PageUrl="".concat(n.context.environment.pdfViewerPath,"?").concat(o,"accountId=").concat(n.context.accountId,"&vid=").concat(n.context.visitorId,"&ptr=").concat(e,"&file=").concat(encodeURIComponent(i))}if(n.ctaParams.exitintent_utm_code&&n.ctaParams.exitintent_utm_code.length){var r=t.PageUrl.indexOf("?")>=0?"&":"?";t.PageUrl+=r+n.ctaParams.exitintent_utm_code}})),t},n}($TRD_CtaComponent),$TRD_GenericLayoutComponent=function(t){function n(n,e,i,o){return t.call(this,n,e,i,o)||this}return __extends(n,t),n.prototype.initialize=function(t){var n,e,i,o=this;if(this.cta.RenderMode===enRenderModes.SHOW){this.componentContainerElem=t;var r=t.querySelector("#trd_cta_".concat(this.cta.ViewModelId));if(!r)return;this.componentHtmlRootElem=r,this.componentContainerElem.querySelectorAll(".close-btn").forEach((function(t){t.addEventListener("click",(function(t){o.close(!0),o.notify($Trd_InternalEventsTypes.CTA_CLOSE),t.preventDefault(),t.stopPropagation()}))}));var a=this.componentContainerElem.querySelectorAll("a.trd-link");null==a||a.forEach((function(t){t.addEventListener("click",(function(t){o.close(!0),o.notify($Trd_InternalEventsTypes.CTA_COMPLETE),t.stopPropagation()}))})),null===(n=this.componentContainerElem.querySelector(".light .container-elements"))||void 0===n||n.addEventListener("click",(function(t){t.stopPropagation()})),this.cta.CompletionMandatory||(null===(e=this.componentContainerElem.querySelector(".light"))||void 0===e||e.addEventListener("click",(function(t){o.close(!0),o.notify($Trd_InternalEventsTypes.CTA_CLOSE)})),document.addEventListener("keyup",(function(t){"Escape"===t.key&&o.componentHtmlRootElem.classList.contains("trd-initial-open")&&o.componentHtmlRootElem.classList.contains("light")&&(o.close(!0),o.notify($Trd_InternalEventsTypes.CTA_CLOSE))}))),null===(i=this.componentContainerElem.querySelectorAll(".trd-custom-html a"))||void 0===i||i.forEach((function(t){t.addEventListener("click",(function(t){o.close(!0),o.notify($Trd_InternalEventsTypes.CTA_COMPLETE),t.stopPropagation()}))}))}},n.prototype.show=function(){var t=this;return this.componentHtmlRootElem.classList.remove("trd-component-hide"),this.componentHtmlRootElem.classList.add("trd-initial-open"),setTimeout((function(){return t.componentHtmlRootElem.classList.add("animate")}),0),this.model.classes.includes("fixed")&&this.model.classes.includes("position_1")&&setTimeout((function(){var n=t.componentHtmlRootElem.offsetHeight;document.body.classList.add("trd-top-space"),t.addTopFixedStyles(n)}),200),!0},n.prototype.addTopFixedStyles=function(t){var n=window.getComputedStyle(document.body),e=Number(n.paddingTop.replace("px","")),i=document.createElement("style");i.innerHTML="body.trd-fixed-plus{ padding-top:".concat(t+e,"px !important;}\n       body .trd-bar-offset{top: ").concat(t,"px !important;}"),document.head.appendChild(i),document.body.classList.add("trd-fixed-plus"),document.querySelectorAll("*").forEach((function(t){var n=window.getComputedStyle(t);"fixed"!==n.position||0!==parseInt(n.top)||t.classList.contains("trd-comp-container")&&t.classList.contains("fixed")||t.classList.add("trd-bar-offset")}))},n.prototype.removeTopFixedStyles=function(){document.body.classList.remove("trd-fixed-plus"),document.querySelectorAll(".trd-bar-offset").forEach((function(t){t.classList.remove("trd-bar-offset")}))},n.prototype.hide=function(){this.model.classes.includes("fixed")&&this.model.classes.includes("position_1")},n.prototype.getEventPrefix=function(){return"generic_unit"},n.prototype.clear=function(){},n.prototype.getLogoAbsolutePath=function(t){if(t&&t.length)return t.toLocaleLowerCase().startsWith("http")?t:"".concat(this.context.environment.contentTaskLogoPath,"/tasks_logo/").concat(t)},n.prototype.close=function(t){var n=this;void 0===t&&(t=!1);var e=this.componentHtmlRootElem;e.classList.remove("animate"),e.classList.remove("trd-initial-open"),e.classList.add("trd-component-hide"),this.model.classes.includes("fixed")&&this.model.classes.includes("position_1")&&(document.body.classList.remove("trd-top-space"),this.removeTopFixedStyles()),setTimeout((function(){n.componentHtmlRootElem.classList.add("animate-hidden"),t&&(e.innerHTML="")}),300),this.unitClosed()},n.prototype.getCompiledTemplate=function(t,n){var e,i,o,r,a;this.model=t;var c=t.link,d=(t.isUnitLink||(null===(e=t.classes)||void 0===e?void 0:e.includes("fixed-image")))&&c,s=t.subTitle||"",l=this.getLogoAbsolutePath(t.logoRelativeUrl),u=t.videoScript,h=!d&&(null===(i=t.classes)||void 0===i?void 0:i.includes("arrow-button"))&&(null==c?void 0:c.length),m=t.closeButton?'<svg xmlns="http://www.w3.org/2000/svg" height="'.concat(t.closeButton.size,'" viewBox="0 -960 960 960" width="').concat(t.closeButton.size,'" fill="').concat(t.closeButton.color,'">\n      <path d="m259-174-84-85 220-221-220-221 84-85 221 221 221-221 84 85-220 221 220 221-84 85-221-221-221 221Z"/>\n    </svg>'):'<img src="https://pic.trendemon.com/images/closex.png" width="17" height="17" alt="close promotion" />',p=(null===(o=t.classes)||void 0===o?void 0:o.includes("trd-close-btn"))||t.closeButton?m:"",_='\n    <div id="trd_cta_'.concat(this.cta.ViewModelId,'" class="trd_comp_').concat(this.cta.ViewModelId," trd-comp-container ").concat(null===(r=t.classes)||void 0===r?void 0:r.join(" ")," ").concat(t.closeButton?"trd-custom-close":"",'">\n      <div class="component-content">\n        <div class="close-cont external-close-cont">\n          <div class="external close-btn">').concat(p,"</div>\n        </div>\n\n        ").concat(d?'<a href="'.concat(c,'" class="container-elements trd-link" target="').concat(this.model.isOpenInNewWindow?"_blank":"_self",'">'):'<div class="container-elements">','\n          <div class="close-cont internal-close-cont">\n              <div class="internal close-btn">').concat(p,"</div>\n          </div>\n          ").concat((null===(a=t.customHtml)||void 0===a?void 0:a.length)?'<div class="trd-custom-html">'.concat(t.customHtml,"</div>"):"\n          ".concat(l&&(null==c?void 0:c.length)&&!d&&!(null==u?void 0:u.length)?'\n          <a href="'.concat(c,'" class="trd-link" target="').concat(this.model.isOpenInNewWindow?"_blank":"_self",'">\n            <img class="trd-img trd-img-link" src="').concat(l,'" width="300" height="300" alt="go to promotion">\n          </a>\n          '):(null==l?void 0:l.length)&&!(null==u?void 0:u.length)?'<div style="display: flex; justify-content: center;"><img class="trd-img trd-img-link" width="300" height="300" src="'.concat(l,'" alt=""></div>'):(null==u?void 0:u.length)?"".concat(u):"",'\n\n          <div class="interactable-container">\n            <div class="int-con-td-item trd-title">').concat(h?'<a target="'.concat(this.model.isOpenInNewWindow?"_blank":"_self",'" class="trd-link" href="').concat(c,'">').concat(t.title||"","</a>"):t.title||"",'</div>\n            <div class="int-con-td-item trd-description">').concat(h?'<a target="'.concat(this.model.isOpenInNewWindow?"_blank":"_self",'" class="trd-link" href="').concat(c,'">').concat(s,"</a>"):s,'</div>\n            <div class="int-con-td-item linkable-container">\n              <div class="linkable-items">\n\n                ').concat(c&&t.buttonText&&!d?'<a href="'.concat(c,'" class="trd-link" target="').concat(this.model.isOpenInNewWindow?"_blank":"_self",'">\n                  <div class="btn-link">').concat(t.buttonText,"</div>\n                </a>"):t.buttonText?'<div class="btn-link">'.concat(t.buttonText,"</div>"):"","\n\n              </div>\n            </div>\n          </div>"),"\n        ").concat(d?"</a>":"</div>","\n      </div>\n    </div>\n  ");if(this.model.videoScript&&this.model.videoScript.length){var g=document.createElement("dummy");g.innerHTML=this.model.videoScript,Array.from(g.querySelectorAll("script")).filter((function(t){return t.src})).forEach((function(t){$Trd_Utils.isVideoScriptSourceValid(t.src)&&$Trd_Utils.loadJs(t.src,(new Date).getTime().toString())}))}var f=this.getStyleElement(t);return{html:_,css:"<style> ".concat(f," ").concat(this.getCustomStyles(n)," </style>")}},n.prototype.getCustomStyles=function(t){return t?t.replace(/{{ID}}/g,this.cta.ViewModelId).replace(/{{VISIBILITY}}/g,this.getVisibiltyTypeDescription(this.cta.VisibiltyTypeId)):""},n.prototype.getVisibiltyTypeDescription=function(t){switch(t){case UnitVisibiltyType.Embedded:return"embedded";case UnitVisibiltyType.Float:return"fixed";case UnitVisibiltyType.Full:return"full";case UnitVisibiltyType.Light:return"light";case UnitVisibiltyType.Sliding:return"slider";default:return console.error("unknown UnitVisibiltyType: ".concat(t)),""}},n.prototype.getRatioSize=function(t,n){return t*n},n.prototype.getStyleElement=function(t){var n;return"\n    #trd_cta_".concat(this.cta.ViewModelId,":not(.light):not(.full){\n      z-index: 999999999;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light, #trd_cta_").concat(this.cta.ViewModelId,".full{\n      z-index: 9999999999;\n    }\n\n    ").concat(t.closeButton?"\n    #trd_cta_".concat(this.cta.ViewModelId,".trd-custom-close .internal.close-btn,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close .external-close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-custom-close .external-close-cont{\n      ").concat("outside"==t.closeButton.position&&"no"!=t.closeButton.shape?"right: -".concat(t.closeButton.size/2+2,"px !important; top: -").concat(t.closeButton.size/2+2,"px !important;"):"right: 5px !important; top: 5px !important;",";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-custom-close.arrow-button.position_2 .external-close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-custom-close.arrow-button.position_5 .external-close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-custom-close.arrow-button.position_8 .external-close-cont{\n      ").concat("outside"==t.closeButton.position&&"no"!=t.closeButton.shape?"left: -".concat(t.closeButton.size/2+2,"px !important; top: -").concat(t.closeButton.size/2+2,"px !important;"):"left:3px !important; top: 3px !important;",";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close .internal.close-btn,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close .external-close-cont .close-btn,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-custom-close .external-close-cont .close-btn{\n      ").concat("no"!=t.closeButton.shape?"border: 1px solid ".concat(t.closeButton.border,";\n      background: ").concat(t.closeButton.background,";\n      ").concat("square"==t.closeButton.shape?"border-radius: 2px;":"border-radius: 18px;"):"","\n      padding: 2px;\n      width: ").concat(t.closeButton.size,"px;\n      height: ").concat(t.closeButton.size,"px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close svg{\n      vertical-align: unset;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close .external-close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-custom-close .external-close-cont{\n      width: auto;\n      height: auto;\n    }\n\n      ").concat("outside"===(null===(n=t.closeButton)||void 0===n?void 0:n.position)&&"no"!=t.closeButton.shape?"\n      #trd_cta_".concat(this.cta.ViewModelId,".slider:not(.arrow-button).position_2.trd-initial-open.trd-custom-close,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider:not(.arrow-button).position_5.trd-initial-open.trd-custom-close,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider:not(.arrow-button).position_8.trd-initial-open.trd-custom-close{\n        right: ").concat(t.closeButton.size/2+2,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_2.trd-initial-open.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_5.trd-initial-open.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_8.trd-initial-open.trd-custom-close .container-elements{\n        margin-right: ").concat(t.closeButton.size/2+2,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0.trd-initial-open.trd-custom-close,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_1.trd-initial-open.trd-custom-close,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2.trd-initial-open.trd-custom-close{\n        top: ").concat(t.closeButton.size/2+2,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_0.trd-initial-open.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_1.trd-initial-open.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_2.trd-initial-open.trd-custom-close .container-elements{\n        margin-top: ").concat(t.closeButton.size/2+2,"px;\n      }\n      "):"","\n    "):"","\n\n    #trd_cta_").concat(this.cta.ViewModelId,".rounded input,\n    #trd_cta_").concat(this.cta.ViewModelId,".rounded button,\n    #trd_cta_").concat(this.cta.ViewModelId,".rounded .btn-submit,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-rounded input,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-rounded button,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-rounded .btn-submit,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.trd-rounded .btn-link.trd-answer\n    {\n      border-radius: 20px;\n      border: 0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," input, #trd_cta_").concat(this.cta.ViewModelId," button, #trd_cta_").concat(this.cta.ViewModelId," .btn-submit{\n      border: 1px ").concat(this.ctaParams.buttonBackgroundColor||"#19a5c0"," solid;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container{\n      display:none;\n      background: ").concat(this.ctaParams.backgroundColor||"#19a5c0",";\n      text-align: center;\n      background-repeat: no-repeat;\n      background-size: cover;\n      background-position: center;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .internal-close-cont{\n      display:none;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-link, #trd_cta_").concat(this.cta.ViewModelId," .trd-link:hover{\n      text-decoration: none;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-img {\n      background-repeat: no-repeat;\n      background-size: contain;\n      background-position: center;\n      width: auto;\n      min-height: auto;\n      flex-basis: 1;\n      flex-grow: 1;\n      min-width: 150px;\n      max-height: 450px;\n      margin: 0;\n      height: auto;\n      aspect-ratio: unset;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .trd-img {\n      flex-basis: unset;\n      flex-grow: unset;\n    }\n\n\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .trd-img {\n      flex-basis: inherit;\n      flex-grow: inherit;\n      min-width: inherit;\n      max-width: 100%;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light .trd-img {\n      background-size: contain;\n      align-self: center;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .trd-img {\n      min-height: 100px;\n      background-size: contain;\n      margin: 2px;\n      width: inherit;\n      max-width: 150px;\n      height: auto;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.slider .trd-img {\n      object-fit: scale-down;\n      min-height: unset;\n      margin: 2px auto;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".single-img.light .container-elements{\n      height: auto;\n      max-width: unset;\n      background: unset;\n      box-shadow: unset;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".single-img.slider .trd-img{\n      position: static;\n      padding: 0;\n      margin: 0;\n      max-width: 100%;\n      display:block;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".single-img.slider .component-content .container-elements{\n      padding: 0;\n      width:100%;\n      display:block;\n    }\n\n\n    #trd_cta_").concat(this.cta.ViewModelId,".single-img .interactable-container{\n      display: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .trd-img {\n      /*min-height: 15vw;*/\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .interactable-container{\n      /*align-self: center;\n      flex-grow1: 1;*/\n      flex-basis: unset;\n      margin: 3px;\n      display: flex;\n      flex-direction: column;\n      justify-content: space-around;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".right-content .interactable-container{\n      margin:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .interactable-container {\n      flex-direction: row;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .close-cont{\n      background: ").concat(this.ctaParams.buttonTextColor||"white",";\n      color: ").concat(this.ctaParams.buttonBackgroundColor||"black",";\n      line-height: 1;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-close-btn .close-cont{\n        background:none;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .close-btn:hover{\n      /*transform: rotate(90deg);\n      box-shadow: 3px 2px 3px #999999;*/\n      opacity: 1;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .btn-link{\n      background: ").concat(this.ctaParams.buttonBackgroundColor||"white",";\n      color:  ").concat(this.ctaParams.buttonTextColor||"#19a5c0",";\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .container-elements, #trd_cta_").concat(this.cta.ViewModelId," .container-elements a,\n    #trd_cta_").concat(this.cta.ViewModelId," .int-con-td-item.trd-title{\n      color: ").concat(this.ctaParams.textColor||"#f3f2f4",";\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .container-elements .trd-description, #trd_cta_").concat(this.cta.ViewModelId," .container-elements .trd-description a{\n      color: ").concat(this.ctaParams.secondaryTextColor||this.ctaParams.textColor||"#f3f2f4",";\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .interactable-container{\n      display: flex;\n      width: 100%;\n      justify-content: center;\n      align-items: center;\n      align-content: space-around;\n      flex-basis: inherit;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-description{\n     font-size: ").concat(this.ctaParams.subTitleSize||18,"px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,":not(.arrow-button):not(.fixed) .trd-description, #trd_cta_").concat(this.cta.ViewModelId,":not(.arrow-button):not(.fixed) .trd-title{\n        line-height:1.4;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .container-elements{\n      display: inline-block;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .container-elements{\n      display: block;\n      padding:0;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-initial-open{\n      display: block;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,":not(.arrow-button) .trd-link{\n      font-size: ").concat(this.ctaParams.buttonTextSize||18,"px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .responsive {\n      width: 100%;\n      height: auto;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light .responsive {\n      max-width: 300px;\n      max-height: 300px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,":not(.trd-custom-close) .close-btn{\n      opacity:0.9;\n      transition: opacity .1s linear;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .close-btn{\n      cursor:pointer;\n      font-weight: bolder;\n      text-align: center;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .close-btn{\n      display: none;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .container-elements{\n      color: inherit;\n    }\n    @media only screen and (max-width : 640px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-title{\n        font-size: ").concat(this.ctaParams.titleSize?this.getRatioSize(this.ctaParams.titleSize,16/18):16,"px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".full .linkable-container{\n        width:100%;\n        max-width: 350px;\n        margin: 0 auto;\n      }\n\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.embedded.trd-component-hide{\n      display:inherit;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-component-hide{\n      display:none;\n    }\n\n    /* FIXED*/\n      /* FIXED - TOP*/\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed{\n        position:fixed;\n        opacity: 1;\n        color: ").concat(this.ctaParams.textColor||"white",";\n        width: 100%;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed.position_1{\n        top:0;\n      }\n      /* FIXED - BOTTOM*/\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed.position_7{\n        bottom:0;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed .container-elements{\n        display: flex;\n        justify-content: center;\n        min-height: 60px;\n        align-items: center;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed:not(.fixed-image).position_7 .container-elements{\n        border-top: 3px solid #cccccc;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed:not(.fixed-image).position_1 .container-elements{\n        border-bottom: 3px solid #cccccc;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-description{\n        font-size: ").concat(this.ctaParams.subTitleSize||14,"px;\n        text-align:left;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-title{\n        font-size: ").concat(this.ctaParams.titleSize||18,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-img{\n        display:none;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed.fixed-image .trd-link {\n        flex: 1;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed.fixed-image .trd-img {\n        display: inline-block;\n        object-fit: scale-down;\n        width: 100%;\n        max-height: 100px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed.fixed-image .interactable-container {\n        display: none;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed .int-con-td-item{\n        padding: 0 10px 0 10px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed .close-cont{\n        text-align:center;\n        position: absolute;\n        right: 5px;\n        top: 5px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed .btn-link{\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        border-radius:3px;\n        padding:7px 15px;\n        font-size: ").concat(this.ctaParams.buttonTextSize||16,"px;\n        white-space:nowrap;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed a{\n        text-decoration: none;\n        border-radius:3px;\n      }\n    /* LIGHT */\n    #trd_cta_").concat(this.cta.ViewModelId,".light{\n      display: block;\n      width: 100%; height: 100%;\n      position: fixed; top: 0; left: 0;\n      opacity: 0;\n      background: rgba(0,0,0,0.7);\n      transition: 200ms;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light:not(.trd-component-hide):not(.trd-initial-open) {\n      display: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.animate {\n      opacity: 1;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.animate-hidden{\n      display: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light .component-content{\n      height: 95vh;\n      display: flex;\n      justify-content: center;\n      align-content: center;\n      align-items: center;\n      position: relative;\n      margin: 3px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_0 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_3 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_6 .component-content{\n      justify-content: flex-start;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_2 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_5 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_8 .component-content{\n      justify-content: flex-end;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_0 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_1 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_2 .component-content{\n      align-items: baseline;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_6 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_7 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.position_8 .component-content{\n      align-items: flex-end;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light .container-elements{\n      padding: 0px;\n      align-content: center;\n      display: flex;\n      flex-direction: column;\n      justify-items: center;\n      justify-content: center;\n      background:  ").concat(this.ctaParams.backgroundColor||"#19a5c0",";\n      background-repeat: no-repeat;\n      background-size: cover;\n      background-position: center;\n      position: relative;\n      max-height:550px;\n      min-width: 350px;\n      max-width: 800px;\n      align-items: stretch;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded.single-vertical .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded.right-content:not(.rounded-light) .interactable-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded.rounded-light .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded.trd-blank-promo .container-elements {\n      background:  ").concat(this.ctaParams.backgroundColor||"none",";\n    }\n\n\n    @media only screen and (max-width : 900px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".light .container-elements {\n        max-width: 90vw;\n        min-width: 200px;\n      }\n    }\n\n    @media only screen and (max-width : 640px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".single-img:not(.slider) .container-elements .trd-img {\n        max-width: 98vw;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".single-img.embedded .container-elements .trd-img {\n        max-width: 100%;\n      }\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.padded .container-elements {\n      padding: 20px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".single-vertical:not(.fixed):not(.full):not(.right-content) .container-elements{\n      padding: 5px;\n      min-width:150px;\n      max-width:300px;\n      min-height:unset;\n      width:auto;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".single-vertical.trd-video:not(.fixed):not(.full):not(.right-content) .container-elements{\n      min-width:260px;\n    }\n\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-survey-predefined.single-vertical:not(.fixed):not(.full):not(.right-content) .container-elements {\n      max-width: 370px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".single-vertical.embedded:not(.fixed):not(.full):not(.right-content) .container-elements{\n      margin: 0 auto;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".single-vertical:not(.fixed):not(.full):not(.multi-field) .container-elements{\n      padding: 30px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .container-elements img {\n      position:static;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.single-vertical .container-elements img,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.trd-blank-promo .container-elements img,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.single-vertical .container-elements img {\n      width:100%;\n      height:auto;\n      margin:0;\n      margin-bottom:5px;\n      max-width:100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.padded.single-vertical .internal,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.padded.single-vertical .close-cont.external-close-cont{\n      right:12px;\n      top:12px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".single-img .close-cont.external-close-cont{\n      z-index: 5;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.padded.single-vertical:not(.multi-field) .internal,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.padded.single-vertical:not(.multi-field) .close-cont.external-close-cont{\n      right:3px;\n      top:3px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.padded.single-vertical .int-con-td-item,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.padded.single-vertical .int-con-td-item{\n      margin-bottom:5px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.padded.single-vertical.trd-video .int-con-td-item,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.padded.single-vertical.trd-video .int-con-td-item{\n      margin-bottom:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light .internal-close-cont, #trd_cta_").concat(this.cta.ViewModelId,".full .internal-close-cont{\n      display:block;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light .internal, #trd_cta_").concat(this.cta.ViewModelId,".full .internal{\n      position: absolute;\n      top:3px;\n      right: 3px;\n      border-radius: 18px;\n      width: 19px;\n      height: 19px;\n      font-size: 16px;\n      line-height: 19px\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.shifted-close-btn .external-close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.shifted-close-btn .internal{\n      top: -10px;\n      right: -10px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.shifted-close-btn.position_2 .external-close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.shifted-close-btn.position_5 .external-close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.shifted-close-btn.position_8 .external-close-cont  {\n      top: -10px;\n      left: -10px;\n      right: unset;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light .external.close-btn {\n      display:none;\n\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light .close-btn {\n      color: ").concat(this.ctaParams.buttonBackgroundColor||"black",";\n      background: ").concat(this.ctaParams.buttonTextColor||"white",";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.close-btn-bg-grey .close-btn{\n      color: ").concat(this.ctaParams.backgroundColor||"black",";\n      background: #9f9f9f;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.close-btn-bg-grey-inverted .close-btn{\n      color: #9f9f9f;\n      background: ").concat(this.ctaParams.backgroundColor||"black",";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.close-btn-grey .close-btn{\n      color: #c8c4c6;\n      background: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-close-btn .close-btn{\n      width:17px;\n      height:17px;\n      background: none;\n      right:5px;\n      top:5px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-close-btn .close-btn img{\n      vertical-align: baseline;\n      margin:0;\n      padding:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId).concat(t.closeButton&&"no"!=t.closeButton.shape?".trd-close-btn:not(.trd-custom-close)":".trd-close-btn"," .close-btn:hover{\n      transform: rotate(90deg);\n      display:block;\n      transition-delay: 0s;\n      transition-duration: 200ms;\n      transition-property: transform, opacity;\n      transition-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);box-sizing: content-box;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,':not(.trd-close-btn):not(.trd-custom-close) .close-btn:after{\n      content:"X";\n      font-family: cursive, Arial, Helvetica, sans-serif;\n    }\n\n    #trd_cta_').concat(this.cta.ViewModelId," .internal.close-cont{\n      text-align:center;\n      position: absolute;\n      right: 15px;\n      top: 15px;\n      font-size: 32px;\n      border-radius: 18px;\n      width: 19px;\n      height: 19px;\n      font-size: 16px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.rounded-light .container-elements{\n      border-radius: 5px;\n      padding: 20px;\n      box-sizing: border-box;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded.rounded-light .container-elements{\n      padding: 20px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.rounded-light.right-img .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.rounded-light.trd-right-img .container-elements{\n      padding: 25px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light .container-elements img{\n      max-width: 98vw;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light .btn-link, #trd_cta_").concat(this.cta.ViewModelId,".slider:not(.arrow-button) .btn-link,\n     #trd_cta_").concat(this.cta.ViewModelId,".embedded:not(.arrow-button) .btn-link{\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      margin-top: 10px;\n      border-radius: 5px;\n      transition: all .3s ease;\n      text-decoration: none;\n      min-width: 100px;\n      padding:15px 10px;\n      font-size: ").concat(this.ctaParams.buttonTextSize||24,"px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .btn-link:hover{\n      box-shadow: 0 0 5px 0 rgba(0,0,0,.2);\n\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.trd-video .btn-link, #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-video .btn-link,\n     #trd_cta_").concat(this.cta.ViewModelId,".embedded.trd-video .btn-link{\n      display: inline-block;\n      padding:5px 10px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-video iframe{\n      max-width:260px;\n    }\n\n    /*FULL*/\n    #trd_cta_").concat(this.cta.ViewModelId,".full{\n      width: 100%; height: 100%;\n      position: fixed; top: 0; left: 0;\n      opacity:0.97;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .container-elements{\n      padding: 10px;\n      align-content: center;\n      display: flex;\n      flex-direction: column;\n      justify-items: center;\n      align-items: center;\n      height: 90vh;\n      justify-content: center;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .int-con-td-item{\n      padding-top:15px\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .external.close-btn{\n      display: inline-block;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".full .container-elements img{\n      aspect-ratio: unset;\n      max-width: 100%;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .btn-link{\n      height: 80px;\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      margin-top: 10px;\n      font-size: ").concat(this.ctaParams.buttonTextSize||24,"px;\n    }\n    /*#trd_cta_").concat(this.cta.ViewModelId,".full .close-cont {\n      text-align:center;\n      position: absolute;\n      right: 30px;\n      top: 30px;\n      font-size: 32px;\n      border-radius: 36px;\n      width: 37px;\n      height: 37px;\n      font-size: 32px;\n    }*/\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider:not(.single-vertical) .linkable-container{\n      margin-top: 10px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .linkable-container{\n      display:inline-block;\n      min-width: 520px;\n    }\n    @media only screen and (max-width : 640px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".full .linkable-container{\n        min-width: inherit;\n      }\n      /*#trd_cta_").concat(this.cta.ViewModelId,".full .close-cont {\n        top: 0px;\n        right: 5px;\n        width: 25px;\n        height: 25px;\n        font-size: 24px;\n      }*/\n    }\n\n    @media only screen and (min-width : 641px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-close-btn.full .close-btn{\n        right:15px;\n        top:15px;\n      }\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .linkable-items{\n      display:flex;\n      justify-content:center;\n      height: auto;\n      align-items: center;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light .linkable-items{\n      min-width: 50%;\n      display:inline-block;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .linkable-items a{\n     width: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".full .trd-link{\n      display: flex;\n      text-decoration: none;\n      display: flex;\n      flex-direction: column;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .trd-title{\n      font-size: ").concat(this.ctaParams.titleSize||32,"px;\n      font-weight: bolder;\n      line-height: 1.1;\n    }\n\n    /* SLIDER */\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .trd-title{\n      font-size: ").concat(this.ctaParams.titleSize||22,"px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .trd-description{\n      font-size: ").concat(this.ctaParams.subTitleSize||16,"px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider {\n      position: fixed;\n      display:block;\n      overflow: hidden;\n      font-family: inherit;\n      border-radius: 3px;\n      transition: 0.5s;\n      width: auto;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2{\n      top: calc(5%);\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," input{\n      font-size: 14px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.position_7 .container-elements{\n      width: 100%;\n      padding-top: 0px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_3,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5{\n      top:50%;\n      transform: translate(0%, -50%);\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_1,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_7{\n      left:50%;\n      transform: translate(-50%, 0%);\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_6,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8{\n      bottom: 10px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8{\n      right: -1000px;\n      transition: right 0.5s;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2.trd-initial-open,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5.trd-initial-open,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8.trd-initial-open{\n      right: 0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_3,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_6{\n      left: -1000px;\n      transition: left 0.5s;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-initial-open.slider.position_0,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-initial-open.slider.position_3,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-initial-open.slider.position_6{\n      left: 0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0 .trd_form_singlefield ,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2 .trd_form_singlefield ,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_3 .trd_form_singlefield ,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5 .trd_form_singlefield ,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_6 .trd_form_singlefield ,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8 .trd_form_singlefield {\n      flex-direction: column;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0 .trd_form_singlefield input,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2 .trd_form_singlefield input,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_3 .trd_form_singlefield input,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5 .trd_form_singlefield input,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_6 .trd_form_singlefield input,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8 .trd_form_singlefield input{\n      height: 40px;\n      width: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0 .trd_form_singlefield .btn-submit,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2 .trd_form_singlefield .btn-submit,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_3 .trd_form_singlefield .btn-submit,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5 .trd_form_singlefield .btn-submit,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_6 .trd_form_singlefield .btn-submit,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8 .trd_form_singlefield .btn-submit{\n      height: 40px;\n      margin-top: 4px;\n      width: 100%;\n      padding-right: 0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_1{\n      top: -1000px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.position_1{\n      top:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_4{\n      left:50%;\n      top:0;\n      transform: translate(-50%, 0);\n      max-height: 0;\n      height: auto;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_4.trd-initial-open{\n      max-height:unset;\n      top:50%;\n      transform: translate(-50%, -50%);\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_7{\n      bottom: -1000px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.position_7{\n      bottom:10px;\n      max-height:unset;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.animate-hidden{\n      display: none;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open{\n      overflow: unset;\n      opacity:1;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_3,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_6,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8{\n      max-width: 450px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.single-vertical{\n      max-width:310px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.single-img{\n      max-width:70%;\n    }\n\n    @media only screen and (max-width : 480px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0:not(.single-img),\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2:not(.single-img),\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_3:not(.single-img),\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5:not(.single-img),\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_6:not(.single-img),\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8:not(.single-img){\n        max-width: 98vw;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".slider .trd-img {\n        min-width: 90px;\n      }\n    }\n\n    /*#trd_cta_").concat(this.cta.ViewModelId,".slider:not(.single-img):not(.arrow-button) .component-content{\n      height: calc(100% - 0px);\n    }*/\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .container-elements{\n      padding-right: 5px;\n      padding-top: 18px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .responsive{\n      max-height: 200px;\n      max-width: 200px;\n    }\n\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button .int-con-td-item{\n      padding: 0 10px 0 10px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-title,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-form-predefined-download .trd-description{\n      font-size: ").concat(this.ctaParams.titleSize||24,"px;\n      font-weight:bold;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-form-predefined-download .trd-title{\n      font-size: ").concat(this.ctaParams.subTitleSize||18,"px;\n      font-weight:400;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light.trd-rounded .container-elements{\n      border-radius: 15px;\n      overflow:hidden;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-rounded .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-rounded{\n      border-radius: 15px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-rounded .close-cont{\n      right:10px;\n      top:10px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-rounded.right-content .interactable-container {\n      padding: 20px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-rounded.trd-close-btn .close-btn {\n      right:15px;\n      top:15px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .title-container .trd-title{\n      font-weight:100\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .close-btn{\n      color: ").concat(this.ctaParams.buttonBackgroundColor||"black",";\n      font-size:12px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".full .close-cont.external-close-cont{\n      display:none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .close-cont{\n      text-align:center;\n      position: absolute;\n      right: 2px;\n      top: 2px;\n      font-size: 32px;\n      border-radius: 18px;\n      width: 19px;\n      height: 19px;\n      font-size: 16px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .btn-link{\n      justify-content: center;\n      align-items: center;\n    }\n\n    /*#trd_cta_").concat(this.cta.ViewModelId,".slider:not(.arrow-button) .btn-link, #trd_cta_").concat(this.cta.ViewModelId,".embedded:not(.arrow-button) .btn-link{\n      height: 80%;\n      display: block;\n      border-radius:3px;\n      padding: 10px;\n      margin: 10px auto;\n    }*/\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button .btn-link{\n      display:flex;\n      margin:0;\n      padding:0;\n      width: auto;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button .btn-link svg{\n      height:24px;\n      width:12px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider a{\n      text-decoration: none;\n      border-radius:3px;\n    }\n\n    /* EMBEDDED */\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded{\n      background:inherit;\n      clear: both;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .close-btn{\n      display:none;\n    }\n\n    @media only screen and (max-width : 480px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.single-img{\n        max-width:90%;\n        width:90%;\n      }\n\n      #trd_cta_8f659d62-0806-4a42-b107-b5e26fe7d5be.slider.single-img .trd-img{\n        min-height: unset;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_1:not(.single-img),\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_4:not(.single-img),\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_7:not(.single-img){\n        width: 360px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".full .trd-title{\n        font-size: ").concat(this.ctaParams.titleSize||20,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".full.trd-initial-open .title-container div.margin{\n        min-width:50px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed:not(.multi-field) .interactable-container{\n        flex-direction: column;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed:not(.multi-field) .interactable-container .int-con-td-item{\n        margin:3px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content .container-elements{\n        flex-direction: column;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content .interactable-container{\n        padding:5px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content img{\n        width:100%;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content:not(.fixed) .container-elements img.trd-img{\n        margin-top:10px;\n        max-width:50vw;\n        display: inline;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-rounded .container-elements img.trd-img{\n        margin-top:20px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.slider):not(.fixed):not(.full) .trd-img {\n        height:260px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded.right-content .container-elements{\n        background:  ").concat(this.ctaParams.backgroundColor||"none",";\n        width:100%;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded.right-content:not(.rounded-light) .interactable-container{\n        background:none;\n      }\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".right-content .container-elements .int-con-td-item{\n      margin:5px auto;\n    }\n\n    @media only screen and (min-width : 481px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content .container-elements{\n        flex-direction: row;\n        display: flex;\n        justify-content: center;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.right-img .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.trd-right-img .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.slider.trd-right-img .container-elements{\n        flex-direction: row-reverse;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content .container-elements img.trd-img{\n        max-width:400px;\n        height:100%;\n        min-width:unset;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.trd-rounded .container-elements img.trd-img{\n        margin: 40px 20px 40px 0;\n        max-width:300px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.trd-rounded.slider .container-elements img.trd-img{\n        width:280px;\n        min-width:280px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.trd-form-predefined-subscribe .container-elements img.trd-img{\n        max-width:300px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.rounded-light .container-elements img.trd-img{\n        width:300px;\n        height:auto;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.slider .container-elements img{\n        max-width:50%;\n        margin:0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.slider .container-elements{\n        display: flex;\n        flex-direction: row;\n        height: 100%;\n        padding-top: 1px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd_form_field.trd_form_singlefield input{\n        margin-right:10px;\n      }\n\n    }\n\n    @media only screen and (min-width : 481px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.light .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.embedded .container-elements {\n        height: 320px;\n        width: 600px;\n        min-width: 600px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.slider, .fixed) .container-elements {\n        position: relative;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.slider):not(.fixed):not(.full) .trd-img{\n        position: fixed;\n        top: 30px;\n        right: 20px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.full .trd-img {\n        position: fixed;\n        top: 15%;\n        left: calc(50% + 150px);\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.slider):not(.fixed) .interactable-container {\n        width: calc(50% - 40px);\n        min-height: 350px;\n        margin: 20px;\n        margin-bottom:0;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.full .trd_form_field.trd_form_multifield {\n        margin-right: 10px !important;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.full .linkable-container {\n        margin-bottom: 25px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.slider):not(.fixed) .trd_form_multifield {\n        margin:0;\n        margin-right: 10px;\n        flex-grow:1;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.slider):not(.fixed) .interactable-container {\n        display: flex;\n        position: absolute;\n        left: 0;\n        top: 0;\n        flex-direction: column;\n        justify-content: center;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.slider):not(.fixed) .linkable-container {\n        position: fixed;\n        bottom: 0;\n        display: flex;\n        justify-items: center;\n        align-items: center;\n        width: calc(100% - 40px);\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.light):not(.slider):not(.fixed) .linkable-container {\n        justify-content: center;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.vertical-tiles.light .linkable-container {\n        justify-content: space-between;\n        padding-bottom:30px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.vertical-tiles .linkable-container .trd_input_checkbox.trd-tn-privacy-policy{\n        position: absolute;\n        bottom:5px;\n        padding:0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.full .btn-submit.submit-multifields {\n        margin-top: 0;\n        margin-bottom: 0;\n        height: 45px;\n      }\n    }\n\n    @media only screen and (min-width: 769px){\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.light .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.embedded .container-elements{\n        height: 400px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.slider):not(.fixed):not(.full) .trd-img {\n          height:300px;\n        }\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_0 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_3 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_6 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_2 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_5 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_8 .component-content{\n      position: relative;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_2 .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_5 .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_8 .container-elements{\n      display: flex;\n      padding-right: 45px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_0 .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_3 .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_6 .container-elements{\n      display: flex;\n      /*flex-direction: row-reverse;*/\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open.position_7 .container-elements{\n      margin-top: 40px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button{\n      width: 505px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," *{\n      box-sizing: content-box;\n      white-space: unset;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open{\n      max-width: 505px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button .linkable-items{\n      position: absolute;\n      margin: 0;\n      padding: 0;\n      overflow: hidden;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_0 .linkable-items,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_3 .linkable-items,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_6 .linkable-items {\n      left: 0;\n      width: 40px;\n      top: 0;\n      height: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_2 .linkable-items,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_5 .linkable-items,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_8 .linkable-items {\n      right: 0;\n      width: 40px;\n      top: 0;\n      height: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_7 .linkable-items {\n      left: 0;\n      width: 100%;\n      top: 0;\n      height: 40px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_1 .linkable-items,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_4 .linkable-items {\n      left: 0;\n      width: 100%;\n      bottom: 0;\n      height: 40px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_2.shifted-close-btn .external-close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_5.shifted-close-btn .external-close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_8.shifted-close-btn .external-close-cont{\n      left: -10px;\n      right: unset;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_0 .btn-link,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_3 .btn-link,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_6 .btn-link,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_2 .btn-link,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_5 .btn-link,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_8 .btn-link {\n      height: 100%;\n      border-radius: 0px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_1 .btn-link,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_4 .btn-link,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_7 .btn-link {\n      height: 40px;\n      width: 100%;\n      border-radius: 0px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button .container-elements{\n      padding: 15px;\n      line-height:1.2;\n      width: auto;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.slider.arrow-button{\n      text-align:left;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .component-content{\n      box-shadow: 0 0 5px 0 rgba(0,0,0,.2);\n      border: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.trd-initial-open.position_8,\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.trd-initial-open.position_6{\n      bottom:25px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.trd-custom-close .component-content .close-cont{\n      z-index: 9999;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .component-content .close-cont{\n      z-index: 99;\n      left:0px;\n      top:2px;\n      background:none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .interactable-container{\n      margin:0;\n      width:100%;\n      display:block;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.title-container .trd-title, #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.trd-title{\n      padding-bottom:5px;\n      border-bottom: 1px solid #ddd;\n      padding:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.trd-title{\n      margin:0 10px;\n      padding-bottom:5px;\n      font-size: ").concat(this.ctaParams.titleSize||18,"px;\n      margin-bottom:7px;\n      line-height:1.2;\n      font-weight:100;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.linkable-container{\n      margin:0;\n      padding:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.trd-description{\n      font-size: ").concat(this.ctaParams.subTitleSize||16,"px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_6 .trd-content-hub-link .trd-content-hub-button,\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_3 .trd-content-hub-link .trd-content-hub-button,\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_0 .trd-content-hub-link .trd-content-hub-button{\n      left:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_6 .close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_3 .close-cont,\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_0 .close-cont {\n      right: 0;\n      left: auto;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_6 .int-con-td-item.title-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_3 .int-con-td-item.title-container\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_0 .int-con-td-item.title-container{\n      margin-left:45px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_6:not(.horizontal) .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_3:not(.horizontal) .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_0:not(.horizontal) .container-elements{\n      padding-left:55px;\n      padding-right:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.horizontal .trd-content-hub-link .item-img, #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button .trd-img{\n      min-width:165px;\n      max-width:165px;\n      display:block;\n      min-height: auto;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.horizontal .trd-content-hub-link .item-img{\n      margin:0;\n    }\n\n    .trd-embedded-top-bottom-margin #trd_cta_").concat(this.cta.ViewModelId," {\n      margin-top: 0.9em;\n      margin-bottom: 0.9em;\n    }\n\n    @media only screen and (max-width : 640px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content .interactable-container{\n        padding:10px;\n        padding-bottom:0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_6:not(.horizontal) .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_3:not(.horizontal) .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_0:not(.horizontal) .container-elements{\n        padding-left:40px;\n        padding-right:5px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_2 .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_5 .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_8 .container-elements{\n        padding-left:5px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button .int-con-td-item.trd-title{\n        margin: 10px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button .container-elements{\n        flex-direction: column;\n        text-align:center;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open{\n        width: 300px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .trd-content-hub-item{\n        max-width:100%;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .component-content .trd-img.trd-img-link{\n        margin: 0 auto;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.trd-title{\n        font-size: ").concat(this.ctaParams.titleSize||16,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.trd-description{\n        font-size: ").concat(this.ctaParams.subTitleSize||14,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light.padded.single-vertical .container-elements {\n        max-width:80%;\n      }\n\n    }\n\n    @media only screen and (min-width : 641px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content .interactable-container{\n        padding:0 20px;\n        min-width:280px;\n      }\n\n       #trd_cta_").concat(this.cta.ViewModelId,".right-content.rounded-light .interactable-container{\n        padding-right:0px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.rounded-light.right-img .interactable-container,\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.rounded-light.trd-right-img .interactable-container{\n        padding-right:25px;\n        padding-left:0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.slider .interactable-container{\n        padding:0 15px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light.vertical-tiles .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded.vertical-tiles .container-elements {\n        min-width: 620px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.slider{\n        max-width:620px;\n        min-width:550px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.slider .container-elements img{\n        width:300px;\n        min-width:300px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.slider.trd-form-predefined-subscribe .container-elements img{\n        width:170px;\n        min-width:170px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.slider.trd-form-predefined-subscribe{\n        max-width:550px;\n        min-width:450px;\n      }\n    }\n\n    @media only screen and (min-width : 1281px){\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content.slider{\n        max-width:650px;\n      }\n    }\n\n    @media only screen and (max-width : 768px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".light.padded.single-vertical .container-elements img,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.padded.single-vertical .container-elements img{\n        max-width:85%;\n        display: inline;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light.padded.single-vertical .internal,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.padded.single-vertical .close-cont.external-close-cont{\n          right:3px;\n          top:3px;\n       }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-title{\n        font-size: ").concat(this.ctaParams.titleSize?this.getRatioSize(this.ctaParams.titleSize,20/24):20,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-description{\n        font-size: ").concat(this.ctaParams.subTitleSize?this.getRatioSize(this.ctaParams.subTitleSize,16/18):16,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,':not(.fixed) .trd_form_field input:not([type="checkbox"]),  #trd_cta_').concat(this.cta.ViewModelId,":not(.fixed) .btn-submit{\n        height:40px;\n        line-height:40px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles:not(.slider):not(.fixed):not(.full) .trd-img {\n          height:230px;\n        }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.vertical-tiles .btn-submit{\n        height:39px;\n      }\n    }\n\n    @media only screen and (max-width : 768px) and (orientation: landscape) and (hover: none) {\n      #trd_cta_").concat(this.cta.ViewModelId,".light.padded.single-vertical .container-elements img,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.padded.single-vertical .container-elements img{\n        max-width:35%;\n        display:inline;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content .container-elements img.trd-img{\n          height:320px;\n          width:auto;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".right-content .container-elements{\n        max-height:320px;\n      }\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close.rounded .component-content,\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close.rounded .component-content .container-elements{\n          overflow: visible;\n        }\n    ")},n}($TRD_CtaComponent),$TRD_FormLayoutComponent=function(_super){function $TRD_FormLayoutComponent(t,n,e,i){var o=_super.call(this,t,n,e,i)||this;return o.dependenciesLoaded=[Promise.resolve()],o.submitted=!1,o}return __extends($TRD_FormLayoutComponent,_super),$TRD_FormLayoutComponent.prototype.initialize=function(t){var n=this;if(_super.prototype.initialize.call(this,t),this.cta.RenderMode===enRenderModes.SHOW){var e=this.componentContainerElem.querySelector(".btn-submit");null==e||e.addEventListener("click",(function(t){e.classList.contains("trd-btn-disable")||n.submitForm(!1)}))}},$TRD_FormLayoutComponent.prototype.submitForm=function(t,n){var e,i,o,r,a,c,d,s=this;if(void 0===t&&(t=!0),!this.submitted){var l=this.componentContainerElem.querySelectorAll("input"),u=!0;if(t||l.forEach((function(t){t.validity.valid?t.classList.remove("trd_error-input"):(t.classList.add("trd_error-input"),u=!1)})),u){null===(e=this.componentHtmlRootElem.classList)||void 0===e||e.add("trd-form-submitting");var h=this.componentContainerElem.querySelector(".btn-submit");null==h||h.classList.add("trd-btn-disable");var m=n||[];if(l.forEach((function(t){m.push({cfv:t.value,cfn:t.name,cfid:t.getAttribute("trd-id"),cft:t.getAttribute("typeName")||t.getAttribute("type"),cfma:t.getAttribute("trd-cfma")})})),null===(i=this.renderingContext)||void 0===i?void 0:i.previewMode)this.hideFormAfterSubmit();else{var p={AccountId:this.context.accountId,CtaId:this.cta.Id,trd_cid:null===(o=this.context.cid)||void 0===o?void 0:o.value,ClientUrl:btoa(null!==(a=null===(r=this.context.pageDetails)||void 0===r?void 0:r.url)&&void 0!==a?a:""),uuid:(null===(c=this.context.uuid)||void 0===c?void 0:c.value)||(new Date).getTime(),FormDataStr:JSON.stringify(m),StreamId:null!==(d=this.context.streamId)&&void 0!==d?d:""};this.context.maCookie&&this.context.maCookie.length&&(p.maCook=btoa(this.context.maCookie));var _="".concat(this.context.environment.trafficServiceUrl,"/api/experience/new-lead?").concat($Trd_Utils.objectToQueryString(p));this.submitted=!0,this.notify($Trd_InternalEventsTypes.CTA_COMPLETE);$Trd_Tools.JSONP(_,(function(t){localStorage.removeItem("trd_lead_frm"),s.hideFormAfterSubmit()}))}}}},$TRD_FormLayoutComponent.prototype.hideFormAfterSubmit=function(){var t,n,e,i,o=this;if(null===(t=this.model.successText)||void 0===t?void 0:t.length){var r=this.componentContainerElem.querySelector(".interactable-container");null===(n=null==r?void 0:r.classList)||void 0===n||n.add("trd-component-hide"),null===(e=null==r?void 0:r.classList)||void 0===e||e.remove("interactable-container"),null===(i=this.componentHtmlRootElem.classList)||void 0===i||i.replace("trd-form-submitting","trd-form-success")}setTimeout((function(){o.close()}),3e3)},$TRD_FormLayoutComponent.prototype.show=function(){var _this=this,_a,embeddedScripts=this.componentContainerElem.querySelectorAll("script");return embeddedScripts&&embeddedScripts.length>0?Promise.all(this.dependenciesLoaded).then((function(){var _a;embeddedScripts.forEach((function(script){if(script.innerText){var scriptToRun=script.innerText;scriptToRun.indexOf("hbspt")>-1&&(scriptToRun=script.innerText.trim().replace(/\n/g,""),scriptToRun=scriptToRun.replace("portalId",'target:"#td-form-ex-'.concat(_this.cta.ViewModelId,'", portalId '))),eval(scriptToRun)}else script.src})),(null===(_a=_this.model.scriptCode)||void 0===_a?void 0:_a.length)&&setTimeout((function(){return _this.registerToExternalForm()}),1e3)})):(null===(_a=this.model.scriptCode)||void 0===_a?void 0:_a.length)&&setTimeout((function(){return _this.registerToExternalForm()}),1e3),this.isHubspotForm||this.isMarketoForm?(setTimeout((function(){return _super.prototype.show.call(_this)}),1e3),!0):_super.prototype.show.call(this)},$TRD_FormLayoutComponent.prototype.registerToExternalForm=function(){var t,n=this,e=this.componentContainerElem.querySelector("form");if(this.isHubspotForm?window.addEventListener("message",(function(t){"hsFormCallback"===t.data.type&&"onFormSubmit"===t.data.eventName&&n.isHubspotFormId(t.data.id)&&n.submitForm(!0)})):this.isMarketoForm?MktoForms2.whenReady((function(){var t,e=n.containerElement.querySelector(".mktoForm"),i=null===(t=null==e?void 0:e.getAttribute("id"))||void 0===t?void 0:t.replace("mktoForm_","");if(!e||!i||"undefined"==typeof MktoForms2)return!1;var o=MktoForms2.getForm(i);o&&o.onSuccess((function(){n.submitForm(!0)}))})):null==e||e.addEventListener("submit",(function(t){if(e.checkValidity()){var i=e.querySelectorAll("input");Array.from(i).find((function(t){return"true"===t.getAttribute("aria-invalid")||"true"===t.getAttribute("aria-required")&&0===t.value.length}))||(t.preventDefault(),n.submitForm(!0))}})),this.componentContainerElem.querySelector("iframe")){var i=null===(t=this.componentContainerElem.querySelector("iframe"))||void 0===t?void 0:t.contentWindow;window.addEventListener("message",(function(t){var e,o;if(t.source===i&&"string"==typeof t.data&&"recaptcha-setup"!==t.data){var r=JSON.parse(t.data);switch(r.msg){case"store":var a=r.form;a&&(n.externalFormFields=a.map((function(t,n){return{cfv:t.val,cfn:t.name,cfid:String(n),cft:t.type}})));break;case"submit":if(!n.externalFormFields){var c=r.form;c&&(n.externalFormFields=c.map((function(t,n){return{cfv:t.val,cfn:t.name,cfid:String(n),cft:t.type}})))}localStorage.setItem("trd_lead_frm",btoa(unescape(encodeURIComponent(JSON.stringify({formFields:n.externalFormFields,id:n.cta.Id,url:null===(e=n.context.pageDetails)||void 0===e?void 0:e.url}))))),n.submitForm(!0,n.externalFormFields);break;case"ready":null==i||i.postMessage({unitId:n.cta.ViewModelId,css:_super.prototype.getCustomStyles.call(n,null!==(o=n.customStyles)&&void 0!==o?o:"")},"*")}}}))}},$TRD_FormLayoutComponent.prototype.getEventPrefix=function(){return"form_unit"},$TRD_FormLayoutComponent.prototype.clear=function(){},$TRD_FormLayoutComponent.prototype.getCompiledTemplate=function(t,n){var e,i,o,r,a,c,d,s=this;this.model=t,this.customStyles=n;var l=t.link,u=t.subTitle||"",h=this.getLogoAbsolutePath(t.logoRelativeUrl),m=t.closeButton?'<svg xmlns="http://www.w3.org/2000/svg" height="'.concat(t.closeButton.size,'" viewBox="0 -960 960 960" width="').concat(t.closeButton.size,'" fill="').concat(t.closeButton.color,'">\n      <path d="m259-174-84-85 220-221-220-221 84-85 221 221 221-221 84 85-220 221 220 221-84 85-221-221-221 221Z"/>\n    </svg>'):'<img src="https://pic.trendemon.com/images/closex.png" width="17" height="17" alt="close promotion" />',p=(null===(e=t.classes)||void 0===e?void 0:e.includes("trd-close-btn"))?m:"",_=!0===t.completionMandatory?"trd-hidden-close-button":"",g='\n    <div id="trd_cta_'.concat(this.cta.ViewModelId,'" class="trd_comp_').concat(this.cta.ViewModelId," ").concat(null!==(o=null===(i=this.model.fields)||void 0===i?void 0:i.length)&&void 0!==o&&o?"multi-field":"single-field"," trd-comp-container ").concat(null===(r=t.classes)||void 0===r?void 0:r.join(" ")," ").concat(t.closeButton?"trd-custom-close":"",'">\n      <div class="component-content">\n        <div class="close-cont external-close-cont ').concat(_,'">\n          <div class="external close-btn">').concat(p,'</div>\n        </div>\n        <div class="container-elements">\n          <div class="close-cont internal-close-cont ').concat(_,'">\n              <div class="internal close-btn">').concat(p,"</div>\n          </div>\n          ").concat(h&&(null==l?void 0:l.length)?'\n          <a href="'.concat(l,'">\n            <img class="trd-img trd-img-link" width="300" height="300" src="').concat(h,'" alt="">\n          </a>\n          '):(null==h?void 0:h.length)?'\n          <img class="trd-img" width="300" height="300" src="'.concat(h,'" alt="">'):"",'\n          <div class="interactable-container">\n            <div class="int-con-td-item trd-title">').concat(t.title||"",'</div>\n            <div class="int-con-td-item trd-description">').concat(u,'</div>\n            <div class="int-con-td-item linkable-container" id="td-form-ex-').concat(this.cta.ViewModelId,'">\n              ').concat((null===(a=this.model.scriptCode)||void 0===a?void 0:a.length)?this.model.scriptCode:"\n                ".concat(1===(null===(c=this.model.fields)||void 0===c?void 0:c.length)?'\n                <div class="trd_form_field trd_form_singlefield trd_input_'.concat(this.getFieldType(this.model.fields[0]),'">\n                  <label class="trd_form_field_label" for="trd_').concat(this.cta.Id,'_f_0">').concat(this.model.fields[0].label,'</label>\n                  <input id="trd_').concat(this.cta.Id,'_f_0" required type="').concat(this.getFieldType(this.model.fields[0]),'" typeName="').concat(this.model.fields[0].validationType||"text",'"\n                   pattern="').concat(this.getPattern(this.model.fields[0]),'" trd-cfma="').concat(this.model.fields[0].maName,'" trd-id="0"\n                    placeholder="').concat(this.getLabel(this.model.fields[0]),'" name="').concat(this.model.fields[0].name,'">\n                  <div class="submit-container"><div class="btn-submit"><span>').concat(this.model.buttonText,"</span></div></div>\n                </div>\n                "):(null===(d=this.model.fields)||void 0===d?void 0:d.map((function(t,n){return'\n                <div class="trd_form_field trd_form_multifield trd_input_'.concat(s.getFieldType(t)," trd-tn-").concat(t.validationType||"text",'">\n                  <label class="trd_form_field_label" for="trd_').concat(s.cta.Id,"_f_").concat(n,'">').concat(t.label,'</label>\n                  <input id="trd_').concat(s.cta.Id,"_f_").concat(n,'" ').concat(t.required?"required":"",' type="').concat(s.getFieldType(t),'" typeName="').concat(t.validationType||"text",'"\n                   pattern="').concat(s.getPattern(t),'" trd-cfma="').concat(t.maName,'" trd-id="').concat(n,'" placeholder="').concat(s.getLabel(t),'" name="').concat(t.name,'"\n                    ').concat("hidden"===t.validationType?'value="'.concat(t.label,'"'):"",">\n                </div>\n                ")})).join(" "))+'<div class="submit-container"><div class="btn-submit submit-multifields"><span>'.concat(this.model.buttonText,"</span></div></div>"),"\n              "),'\n            </div>\n          </div>\n          <div class="thanks-container">').concat(this.model.successText,"</div>\n        </div>\n      </div>\n    </div>\n  ");if(this.model.scriptCode&&this.model.scriptCode.length){var f=document.createElement("dummy");f.innerHTML=this.model.scriptCode,Array.from(f.querySelectorAll("script")).filter((function(t){return t.src})).forEach((function(t){var n=$Trd_Utils.loadJs(t.src,(new Date).getTime().toString());s.dependenciesLoaded.push(n)}))}var v=_super.prototype.getStyleElement.call(this,t),w=this.formStyles(t),x=this.isHubspotForm?"#trd_cta_".concat(this.cta.ViewModelId,".light { z-index: 999999998; }"):"";return{html:g,css:"<style> ".concat(v," ").concat(w," ").concat(x," ").concat(_super.prototype.getCustomStyles.call(this,n)," </style>")}},$TRD_FormLayoutComponent.prototype.getLabel=function(t){return"checkbox"===this.getFieldType(t)?"":t.label},$TRD_FormLayoutComponent.prototype.getFieldType=function(t){switch(t.validationType){case"checkbox":case"privacy-policy":case"terms":return"checkbox";case"phone":return"tel";case"email":return"email";case"hidden":return"hidden";default:return"text"}},$TRD_FormLayoutComponent.prototype.getPattern=function(t){switch(t.validationType){case"email":return"^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,4}$";case"name":case"fullname":case"text":return"[^0-9<>!@#$\\^\\*\\(\\)]+";case"phone":return"^([0-9\\(\\)\\/\\+ \\-]{8,25})$";default:return""}},$TRD_FormLayoutComponent.prototype.isHubspotFormId=function(t){var n=this.componentContainerElem.querySelector("form");return(null==n?void 0:n.id)==="hsForm_".concat(t)},Object.defineProperty($TRD_FormLayoutComponent.prototype,"isHubspotForm",{get:function(){var t;return!!((null===(t=this.model.scriptCode)||void 0===t?void 0:t.length)&&this.model.scriptCode.indexOf("hbspt")>-1)},enumerable:!1,configurable:!0}),Object.defineProperty($TRD_FormLayoutComponent.prototype,"isMarketoForm",{get:function(){var t;return!!((null===(t=this.model.scriptCode)||void 0===t?void 0:t.length)&&this.model.scriptCode.indexOf("MktoForms2")>-1)},enumerable:!1,configurable:!0}),$TRD_FormLayoutComponent.prototype.formStyles=function(t){var n;null===(n=t.fields)||void 0===n||n.length;return"\n\n    #trd_cta_".concat(this.cta.ViewModelId," *:focus {\n      outline: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," form *{\n      box-sizing: border-box;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-hidden-close-button {\n      display: none !important;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,':not(.fixed) .trd_form_field input:not([type="checkbox"]){\n      height:45px;\n      line-height: 45px;\n      padding: 0 20px;\n      width:100%;\n    }\n\n    #trd_cta_').concat(this.cta.ViewModelId,'.trd-field-outlined .trd_form_field input:not([type="checkbox"]){\n      border: 1px solid #CCCCCC;\n      color: ').concat(this.ctaParams.textColor,";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,'.trd-field-outlined .trd_form_field input:not([type="checkbox"])::placeholder {\n      color: #CCCCCC;\n    }\n\n    #trd_cta_').concat(this.cta.ViewModelId,'.trd-field-outlined:not(.trd-rounded) .trd_form_field input:not([type="checkbox"]),\n    #trd_cta_').concat(this.cta.ViewModelId,".trd-field-outlined:not(.trd-rounded) .btn-submit{\n      border-radius: 6px;\n    }\n\n    @media only screen and (max-width : 640px) {\n      #trd_cta_").concat(this.cta.ViewModelId,':not(.fixed) .trd_form_field input:not([type="checkbox"]){\n        height:40px;\n        line-height: 40px;\n      }\n    }\n\n    #trd_cta_').concat(this.cta.ViewModelId,":not(.fixed) .trd_form_field, #trd_cta_").concat(this.cta.ViewModelId,":not(.fixed) .submit-container{\n      margin-top:10px;\n    }\n\n   #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles .submit-container{\n      margin-top:0px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".single-vertical:not(.fixed) .trd_form_singlefield{\n      display: block !important;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,":not(.fixed) .btn-submit{\n      height: 45px;\n      line-height:45px;\n      font-size: ").concat(this.ctaParams.buttonTextSize||18,"px;\n    }\n\n    /*GENERAL */\n    #trd_cta_").concat(this.cta.ViewModelId,":not(.trd-form-success) .thanks-container{\n      display: none;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-form-success .thanks-container{\n      font-size: ").concat(this.ctaParams.successTextSize||32,"px;\n      color: ").concat(this.ctaParams.successTextColor||"black",";\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      align-content: center;\n      justify-items: center;\n      padding:20px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd_form_field_label{\n      display: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,"  .trd_input_hidden {\n      display: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd_form_field{\n      position: relative;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .btn-submit{\n      cursor:pointer;\n      color: ").concat(this.ctaParams.buttonTextColor||"white",";\n      background: ").concat(this.ctaParams.buttonBackgroundColor||"black",";\n      padding-left:10px;\n      padding-right:10px;\n      display:flex;\n      justify-content:center;\n      align-items: center;\n      margin-bottom:5px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .btn-submit span{\n      color: ").concat(this.ctaParams.buttonTextColor||"white",";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .btn-submit{\n      margin-bottom:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .component-content{\n      padding-bottom: 2px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_1 .component-content,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_4 .component-content,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.position_7 .component-content{\n      padding-bottom:0px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd_form_singlefield .btn-submit{\n      margin-bottom:0px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd_form_field input{\n      padding-left:4px;\n      box-sizing: border-box;\n      background: ").concat(this.ctaParams.buttonTextColor||"white",";\n      color: ").concat(this.ctaParams.buttonBackgroundColor||"black",";\n      border: 0;\n      margin:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd_form_field input, #trd_cta_").concat(this.cta.ViewModelId,".fixed .btn-submit{\n      padding:0 15px;\n      font-size: ").concat(this.ctaParams.buttonTextSize||13,"px;\n      height: 40px;\n      line-height:40px;\n      min-width: 100px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .btn-submit{\n      white-space: nowrap;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed.multi-field .linkable-container{\n      margin: 5px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */\n      color: ").concat(this.ctaParams.buttonBackgroundColor||"black",";\n      opacity: 0.7; /* Firefox */\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light .trd_form_singlefield,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .trd_form_singlefield,\n    #trd_cta_").concat(this.cta.ViewModelId,".full .trd_form_singlefield,\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .trd_form_singlefield{\n      margin-top:5px;\n      height: auto;\n      justify-content:center;\n      align-items: stretch;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light .trd_form_singlefield input,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .trd_form_singlefield input,\n    #trd_cta_").concat(this.cta.ViewModelId,".full .trd_form_singlefield input,\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .trd_form_singlefield input{\n      min-width:200px;\n      height: auto;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".single-vertical input{\n      width: 100%;\n    }\n\n    @media only screen and (max-width : 640px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".light .trd_form_singlefield,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider .trd_form_singlefield,\n      #trd_cta_").concat(this.cta.ViewModelId,".full .trd_form_singlefield,\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded .trd_form_singlefield{\n        min-height: 30px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".light .trd_form_singlefield input,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider .trd_form_singlefield input,\n      #trd_cta_").concat(this.cta.ViewModelId,".full .trd_form_singlefield input,\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded .trd_form_singlefield input{\n        font-size:16px;\n      }\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.vertical-tiles .btn-submit {\n      margin-bottom: 0;\n      height: 43px;\n      white-space: nowrap;\n    }\n\n\n    /* FULL */\n\n    #trd_cta_").concat(this.cta.ViewModelId,".full .btn-submit{\n      min-width: 100px;\n      font-size: ").concat(this.ctaParams.buttonTextSize||24,"px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".full .btn-submit.submit-multifields{\n      height: 50px;\n      margin-top: 30px;\n    }\n\n\n    #trd_cta_").concat(this.cta.ViewModelId,'.full .trd_form_field input:not([type="checkbox"]){\n      width: 100%;\n      font-size: 24px;\n    }\n\n    /* SLIDER */\n    #trd_cta_').concat(this.cta.ViewModelId,".slider .trd_form_field {\n      width: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,'.slider .trd_form_multifield input:not([type="checkbox"]){\n      height:40px;\n    }\n    #trd_cta_').concat(this.cta.ViewModelId,".slider .btn-submit{\n      height:40px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .container-elements{\n      padding-top: 15px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd_error-input{\n      box-shadow: 0 0 3px 1px red;\n      border:1px solid red;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .linkable-container {\n      display:flex;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed.multi-field .interactable-container {\n      flex-wrap: wrap;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed.multi-field .linkable-container{\n      display:flex;\n      justify-content: center;\n      /*width: 100vw;*/\n\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd_form_field{\n      margin: 0 5px 0 5px;\n      display:flex;\n    }\n    /* LIGHT */\n    #trd_cta_").concat(this.cta.ViewModelId,".light .container-elements{\n      height: initial;\n      max-height: unset;\n      min-height: 300px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light .linkable-container, #trd_cta_").concat(this.cta.ViewModelId,".right-content .linkable-container{\n      width:100%;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light .trd_form_field{\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .trd_form_multifield input,\n    #trd_cta_").concat(this.cta.ViewModelId,".light .trd_form_multifield input{\n      /*width: calc(100% - 10px);*/\n      width:100%;\n      /*max-width: 500px;*/\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .submit-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".light .submit-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .submit-container{\n      display: flex;\n      justify-content: center;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".light:not(.vertical-tiles) .submit-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider:not(.vertical-tiles) .submit-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.single-vertical .submit-container{\n      margin-top:10px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .btn-submit,\n    #trd_cta_").concat(this.cta.ViewModelId,".light .btn-submit,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .btn-submit{\n      max-width: 500px;\n      width: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd_input_checkbox{\n      display: flex;\n      justify-content: flex-start;\n      text-align: left;\n      flex-direction: row-reverse;\n      align-items: center;\n      font-size: 12px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd_input_checkbox .trd_form_field_label{\n      display:block;\n      flex-grow: 5;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,' .trd_input_checkbox input[type="checkbox"]{\n      width:auto;\n      min-width: 15px;\n      margin-right: 10px;\n      height: auto;\n    }\n    #trd_cta_').concat(this.cta.ViewModelId," .btn-submit.trd-btn-disable{\n      opacity:0.3;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .linkable-container .trd_input_checkbox.trd-tn-privacy-policy{\n      padding: 0 15px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .linkable-container .trd_input_checkbox.trd-tn-privacy-policy a{\n      text-decoration: underline;\n    }\n\n    /* predefined form */\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-form-predefined-subscribe .btn-submit{\n      border-color: ").concat(this.ctaParams.buttonBackgroundColor,";\n      width: auto;\n      padding : 0 20px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-form-predefined-subscribe.light .container-elements{\n      max-width:620px;\n      justify-content: top;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-form-predefined-download.light .container-elements{\n      max-width:650px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".full.trd-form-predefined-download .linkable-container{\n      min-width:unset;\n    }\n\n    /* end of predefined form */\n\n    @media only screen and (min-width : 481px) {\n\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.light .trd_form_field.trd_form_singlefield.trd_input_email{\n        display:flex;\n        width:100%;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles.light .trd_form_singlefield .submit-container{\n        margin-left:10px;\n      }\n\n    }\n    @media only screen and (max-width : 480px) {\n     #trd_cta_").concat(this.cta.ViewModelId,".fixed.multi-field .linkable-container{\n        flex-direction: column;\n        width:100%;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".fixed.multi-field .linkable-container .trd_form_field {\n        margin:0;\n        margin-bottom:5px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".vertical-tiles .submit-container{\n        margin-top:10px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-form-predefined-subscribe:not(.full):not(.embedded) .interactable-container{\n        position:relative;\n        top:-50px;\n        margin-bottom:-50px;\n        background: ").concat(this.ctaParams.backgroundColor||"white",";\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-form-predefined-subscribe:not(.full):not(.embedded) .close-cont.internal-close-cont{\n        height:20px;\n        background: ").concat(this.ctaParams.backgroundColor||"white",";\n        position:relative;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-form-predefined-subscribe:not(.full):not(.embedded) .close-cont.external-close-cont{\n        width:100%;\n        height:20px;\n        background: ").concat(this.ctaParams.backgroundColor||"white",";\n        top:0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-form-predefined-subscribe.trd-close-btn:not(.full):not(.embedded) .close-btn{\n        position: absolute;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-form-predefined-subscribe:not(.full):not(.embedded) .container-elements{\n        overflow:hidden;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-form-predefined-subscribe:not(.full):not(.embedded) .container-elements img.trd-img{\n        margin-top:-60px;\n        min-width:200px;\n      }\n    }\n    ")},$TRD_FormLayoutComponent}($TRD_GenericLayoutComponent),$TRD_RecommendationLayoutComponent=function(t){function n(n,e,i,o){var r=t.call(this,n,e,i,o)||this;return r.openedLinks=new Set,r}return __extends(n,t),Object.defineProperty(n.prototype,"pageLimit",{get:function(){return this.model.classes.includes("fixed")?1:this.model.classes.includes("slider")?Math.min(2,this.model.limit):this.model.limit},enumerable:!1,configurable:!0}),n.prototype.initialize=function(n){t.prototype.initialize.call(this,n)},n.prototype.getPageLogoAbsolutePath=function(t){if(t&&t.length)return t.toLocaleLowerCase().startsWith("http")?t:"".concat(this.context.environment.contentTaskLogoPath,"/").concat(t)},n.prototype.show=function(n){var e,i;return void 0===n&&(n=!1),__awaiter(this,void 0,void 0,(function(){var o,r,a,c,d,s;return __generator(this,(function(l){switch(l.label){case 0:return o=this,[4,this.getRecommendedPages(this.pageLimit)];case 1:return o.contentTasks=l.sent(),this.contentTasks.Pages.length?(null===(e=this.componentHtmlRootElem)||void 0===e||e.classList.replace("trd-recommend-loading","trd-recommend-loaded"),n||(t.prototype.show.call(this),r=this.getItemsHtml().join(""),(a=this.componentContainerElem.querySelector(".linkable-container"))&&(a.innerHTML=r),this.setItemsClickHandler(),c=setInterval((function(){var t,n=Array.from(null!==(t=null==a?void 0:a.querySelectorAll(".trd-item-img-hide"))&&void 0!==t?t:[]);if(0===n.length)clearInterval(c);else{var e=n.filter((function(t){return t.complete})),i=n.filter((function(t){return!t.complete}));e.forEach((function(t){return t.classList.remove("trd-item-img-hide")})),0===i.length&&clearInterval(c)}}),500),this.contentTasks.WidgetTitle&&this.contentTasks.WidgetTitle.length?(d=this.componentContainerElem.querySelector(".trd-title"))&&(d.innerHTML=this.contentTasks.WidgetTitle):this.model.title&&this.model.title.length||(s=this.componentContainerElem.querySelector(".title-container"))&&(s.style.display="none"),this.notify($Trd_InternalEventsTypes.CTA_SHOWN,this.taskPages.Pages),this.isShowNotified=!0)):(null===(i=this.renderingContext)||void 0===i?void 0:i.previewMode)&&$Trd_Utils.showPreviewErrorMessage("Content Pool is empty"),[2,this.contentTasks.Pages.length>0]}}))}))},n.prototype.getItemsHtml=function(){var t=this,n=this.model.showRecommendTags&&this.contentTasks.Pages.map((function(t){return!(!t.TagNames||!t.TagNames.length)})).includes(!0),e=this.model.showRecommendArea&&this.contentTasks.Pages.map((function(t){return!(!t.AreaName||!t.AreaName.length)})).includes(!0);return this.contentTasks.Pages.map((function(i){var o,r=t.getPageLogoAbsolutePath(i.LogoUrl),a=t.getParameterizedRecommendation(i.PageUrl),c=t.model.buttonText&&t.model.buttonText.length;return'\n    <div class="trd-content-hub-item '.concat(n?"trd-content-hub-item-with-tags":"","\n      ").concat(c?"trd-content-hub-item-with-buttons":""," ").concat(e?"trd-content-hub-item-with-area":"",' ">\n      <a href="').concat(a,'" class="trd-content-hub-link" data-item-id="').concat(i.PageId,'" target=').concat(t.sameDomain(i.PageUrl)?"_self":"_blank",' data-page-type="').concat(i.PageType,'">\n      <div class="item-img-wrap">\n        <img class="item-img trd-item-img-hide" width="260" height="166" src=').concat(r,' alt="" onload="this.classList.remove(\'trd-item-img-hide\')" />\n      </div>\n        <div class="trd-content-hub-link-text trd-content-hub-link-title">\n            ').concat(e?'<div class="trd-content-hub-area">'.concat(i.AreaName||"","</div>"):"",'\n            <div class="trd-content-hub-text trd-content-hub-text-title">').concat(i.Title,"</div>\n            ").concat(i.Description&&i.Description.length?'<div class="trd-content-hub-text trd-content-hub-text-description">'.concat(i.Description,"</div>"):"","\n            ").concat(n?'<div class="trd-content-hub-bottom">':"","\n            ").concat(c?'<div class="trd-content-hub-button">'.concat(t.model.buttonText,"</div>"):"","\n            ").concat(n?'<div class="trd-content-hub-tags">\n                '.concat(null===(o=i.TagNames)||void 0===o?void 0:o.map((function(t){return'<span class="trd-content-hub-tag">'.concat(t,"</span>")})).join(' <span class="trd-content-hub-tag-separator">|</span> '),"\n              </div>"):"","\n            ").concat(n?"</div>":"","\n        </div>\n      </a>\n    </div>\n  ")}))},n.prototype.setItemsClickHandler=function(){var t=this;this.componentContainerElem.querySelectorAll(".trd-content-hub-link").forEach((function(n){n.addEventListener("click",(function(n){var e=Number(n.currentTarget.getAttribute("data-item-id")),i=t.contentTasks.Pages.find((function(t){return t.PageId===e}));t.pageClickHandler(i,n),t.close()}))}))},n.prototype.getParameterizedRecommendation=function(t){if(this.cta.RecommendUrlParams){var n=new URL(t);return new URLSearchParams(this.cta.RecommendUrlParams).forEach((function(t,e){return n.searchParams.set(e,t)})),n.toString()}return t},n.prototype.notify=function(t,n,e){var i=this.getCtaEventData();i.pages=n,i.onlyPages=e,document.dispatchEvent(new CustomEvent(t,{detail:i}))},n.prototype.pageClickHandler=function(t,n){var e,i;return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(r){switch(r.label){case 0:return"video"!==t.PageType||$Trd_Tools.isMobile.is_mobile()?[3,2]:(n.preventDefault(),[4,this.onVideoItemClick(t)]);case 1:return r.sent(),this.openedLinks.has(t.PageId)||this.notify($Trd_InternalEventsTypes.CTA_COMPLETE,[t]),[3,3];case 2:this.openedLinks.has(t.PageId)||(this.notify($Trd_InternalEventsTypes.CTA_COMPLETE,[t]),$Trd_Utils.compareDomains(t.PageUrl,null!==(i=null===(e=this.context.pageDetails)||void 0===e?void 0:e.url)&&void 0!==i?i:"")&&(n.preventDefault(),setTimeout((function(){var n=o.getParameterizedRecommendation(t.PageUrl);window.location.href=n}),400))),r.label=3;case 3:return this.openedLinks.add(t.PageId),[2]}}))}))},n.prototype.onVideoItemClick=function(t){var n,e,i=this,o=$Trd_Utils.parseYouTubeUrl(t.PageUrl);if(o.videoId){var r=o.videoId,a=o.startTime||"0",c=document.getElementById("trd_video_popup")||document.createElement("div");c.setAttribute("id","trd_video_popup"),c.setAttribute("class","trd-component-hide trd_comp_popup light"),document.body.append(c),c.innerHTML='\n    <div class="component-content">\n      <div class="trd-video-modal-title">'.concat(t.Title,'</div>\n      <div class="close-cont external-close-cont">\n        <div class="trd-video-close-btn">\n          <img src="https://pic.trendemon.com/images/closex.png" width="17" height="17" alt="close video" />\n        </div>\n      </div>\n      <iframe width="644" height="362" src="https://www.youtube.com/embed/').concat(r,"?autoplay=1&start=").concat(a,'"\n          frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n    </div>'),null===(n=c.querySelector(".component-content"))||void 0===n||n.addEventListener("click",(function(t){t.stopPropagation()})),null==c||c.addEventListener("click",(function(t){i.closeVideoPopup(c)})),null===(e=c.querySelector(".trd-video-close-btn"))||void 0===e||e.addEventListener("click",(function(t){i.closeVideoPopup(c)})),document.addEventListener("keyup",(function(t){"Escape"===t.key&&c.classList.contains("trd-initial-open")&&c.classList.contains("light")&&i.closeVideoPopup(c)})),setTimeout((function(){c.classList.replace("trd-component-hide","trd-initial-open"),setTimeout((function(){return c.classList.add("animate")}),0),c.classList.add()}),100)}else console.error("Failed to parse youtube url '".concat(t.PageUrl,"' "),o)},n.prototype.closeVideoPopup=function(t){t.classList.replace("trd-initial-open","trd-component-hide"),t.classList.remove("animate"),setTimeout((function(){var n;return null===(n=t.parentElement)||void 0===n?void 0:n.removeChild(t)}),100)},n.prototype.sameDomain=function(t){var n,e;return $Trd_Utils.compareDomains(t,null!==(e=null===(n=this.context.pageDetails)||void 0===n?void 0:n.url)&&void 0!==e?e:"")},n.prototype.getRecommendedPages=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(this.taskPages)return[2,this.taskPages];if(!this.taskPagesPromise){if(!t)throw"limit is required for the first request";this.taskPagesPromise=this.fetchRecommendations(t)}return[2,this.taskPagesPromise]}))}))},n.prototype.fetchRecommendations=function(t){var n,e,i,o,r=this,a=(null===(n=this.renderingContext)||void 0===n?void 0:n.previewMode)?null===(i=null===(e=this.context.pageDetails)||void 0===e?void 0:e.url)||void 0===i?void 0:i.toString().split("?trd_unit_params_id")[0].split("&trd_unit_params_id")[0]:null===(o=this.context.pageDetails)||void 0===o?void 0:o.url;return new Promise((function(n,e){var i,o;o={AccountId:r.context.accountId,CtaId:r.cta.Id,Url:btoa(null!=a?a:""),Limit:t,UserPagesHistoryStr:JSON.stringify(null===(i=r.context.ctaUserPageHistoryCook)||void 0===i?void 0:i.records),ContentPoolId:r.cta.ContentPoolId||""};var c="".concat(r.context.environment.trafficServiceUrl,"/api/content/recommend-from-pool?").concat($Trd_Utils.objectToQueryString(o));$Trd_Tools.JSONP(c,(function(t){try{r.taskPages=r.getProcessedContentTasks(t),n(r.taskPages)}catch(t){e(t)}}))}))},n.prototype.getProcessedContentTasks=function(t){var n=this;return t.Pages.forEach((function(t){if(t.cleanPageUrl=t.PageUrl,"pdf"===t.PageType){var e=encodeURIComponent(t.PageUrl),i="".concat(n.context.environment.fetchPdfPath,"?url=").concat(e),o=n.context.environment.isStage?"stage=true&":"";t.PageUrl="".concat(n.context.environment.pdfViewerPath,"?").concat(o,"accountId=").concat(n.context.accountId,"&vid=").concat(n.context.visitorId,"&ptr=").concat(e,"&file=").concat(encodeURIComponent(i))}if(n.ctaParams.exitintent_utm_code&&n.ctaParams.exitintent_utm_code.length){var r=t.PageUrl.indexOf("?")>=0?"&":"?";t.PageUrl+=r+n.ctaParams.exitintent_utm_code}})),t},n.prototype.getEventPrefix=function(){return"recommend_unit"},n.prototype.clear=function(){},n.prototype.getCompiledTemplate=function(n,e){var i,o;this.model=n;var r=n.closeButton?'<svg xmlns="http://www.w3.org/2000/svg" height="'.concat(n.closeButton.size,'" viewBox="0 -960 960 960" width="').concat(n.closeButton.size,'" fill="').concat(n.closeButton.color,'">\n      <path d="m259-174-84-85 220-221-220-221 84-85 221 221 221-221 84 85-220 221 220 221-84 85-221-221-221 221Z"/>\n    </svg>'):'<img src="https://pic.trendemon.com/images/closex.png" width="17" height="17" alt="close promotion" />',a=(null===(i=n.classes)||void 0===i?void 0:i.includes("trd-close-btn"))||n.closeButton?r:"",c='\n    <div id="trd_cta_'.concat(this.cta.ViewModelId,'" class="trd_comp_').concat(this.cta.ViewModelId," trd-recommend-loading trd-comp-container ").concat(null===(o=n.classes)||void 0===o?void 0:o.join(" ")," ").concat(n.closeButton?"trd-custom-close":"",'">\n      <div class="component-content">\n        <div class="close-cont external-close-cont">\n          <div class="external close-btn">').concat(a,'</div>\n        </div>\n        <div class="container-elements">\n          <div class="close-cont internal-close-cont">\n              <div class="internal close-btn">').concat(a,'</div>\n          </div>\n          <div class="int-con-td-item title-container" >\n            <div class="trd-title-wing"></div>\n            <div class="trd-title"> ').concat(n.title||"",'</div>\n            <div class="trd-title-wing"></div>\n          </div>\n          <div class="sub-title"> ').concat(n.subTitle||"",'</div>\n          <div class="int-con-td-item linkable-container">\n          </div>\n        </div>\n      </div>\n    </div>\n  '),d=t.prototype.getStyleElement.call(this,n),s=this.contentStyles(n);return{html:c,css:"<style> ".concat(d," ").concat(s," ").concat(t.prototype.getCustomStyles.call(this,e)," </style>")}},n.prototype.contentStyles=function(t){return"\n\n    #trd_cta_".concat(this.cta.ViewModelId," .trd-content-hub-link{\n      display: flex;\n      flex-direction: column;\n      text-decoration:none;\n      color: ").concat(this.ctaParams.buttonBackgroundColor||"#f3f2f4",";\n      width: 100%;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-text-title {\n      font-size: 16px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd_comp_").concat(this.cta.ViewModelId," .trd-content-hub-text-description {\n      display: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-text-description{\n      font-size: 11px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-link{\n      flex-direction: row;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-link-title{\n      align-self: center;\n    }\n\n    ").concat(t.showRecommendTags?"\n      #trd_cta_".concat(this.cta.ViewModelId,".horizontal .trd-content-hub-item-with-tags .trd-content-hub-link-title{\n        align-self: auto;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-item-with-tags .trd-content-hub-bottom{\n        position:absolute;\n        bottom:5px;\n      }"):"","\n\n    ").concat(t.showRecommendArea?"\n      #trd_cta_".concat(this.cta.ViewModelId,".horizontal .trd-content-hub-item-with-area .trd-content-hub-link-title{\n        align-self: auto;\n      }"):"","\n\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-text{\n      -webkit-line-clamp: 3;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-text-title {\n      font-size: 16px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-text-description {\n      font-size: 12px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-link .item-img{\n      transition: all .1s ease, opacity 0.5s;\n      opacity:0.9;\n      width:100%;\n      background-repeat: no-repeat;\n      height: auto;\n      display:block;\n      padding:0;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-link .item-img.trd-item-img-hide {\n      opacity:0;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-link .item-img:hover{\n      opacity:1;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-link:hover .trd-content-hub-text{\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-text-description{\n      border-top: 1px solid rgba(0, 0, 0, 0.12);\n      color: ").concat(this.ctaParams.secondaryTextColor||this.ctaParams.text_color,";\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .linkable-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".light .linkable-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded .linkable-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".full .linkable-container{\n      display: flex;\n      justify-content: center;\n      align-items:center;\n      flex-wrap: wrap;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.vertical-items .linkable-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".light.vertical-items .linkable-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".embedded.vertical-items .linkable-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".full.vertical-items .linkable-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.horizontal .linkable-container{\n     flex-direction: column;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".slider .linkable-container,\n    #trd_cta_").concat(this.cta.ViewModelId,".slider.horizontal .linkable-container\n    {\n      flex-wrap: nowrap;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".full .trd-content-hub-text{\n      font-size:larger;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .title-container{\n      display:flex;\n      justify-content: center;\n      align-items:center;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".light .title-container{\n      width:90%;\n      margin: 0 auto;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .sub-title{\n      font-size: ").concat(this.ctaParams.subTitleSize?this.getRatioSize(this.ctaParams.subTitleSize,16/18):16,"px;\n      color: ").concat(this.ctaParams.secondaryTextColor,";\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .title-container div.trd-title-wing{\n     flex-grow:4;\n     height: 1px;\n     background-color: ").concat(this.ctaParams.textColor||"black",";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .title-container .trd-title{\n      color: ").concat(this.ctaParams.textColor||"black",";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".full .title-container div.trd-title-wing{\n      min-width: 100px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".position_0 .title-container div.trd-title-wing,\n    #trd_cta_").concat(this.cta.ViewModelId,".position_2 .title-container div.trd-title-wing,\n    #trd_cta_").concat(this.cta.ViewModelId,".position_3 .title-container div.trd-title-wing,\n    #trd_cta_").concat(this.cta.ViewModelId,".position_0 .title-container div.trd-title-wing,\n    #trd_cta_").concat(this.cta.ViewModelId,".position_5 .title-container div.trd-title-wing,\n    #trd_cta_").concat(this.cta.ViewModelId,".position_6 .title-container div.trd-title-wing,\n    #trd_cta_").concat(this.cta.ViewModelId,".position_8 .title-container div.trd-title-wing{\n      display: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-title{\n      flex-grow: 1;\n      padding: 0 10px 0 10px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-item, #trd_cta_").concat(this.cta.ViewModelId,".light .trd-content-hub-item{\n      min-width: 180px;\n      max-width: 260px;\n      margin: 18px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".large .trd-content-hub-link-title{\n      height:70px\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".large:not(.slider) .trd-content-hub-item, #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-item {\n      max-width: 360px;\n      min-width: 260px;\n      margin: 20px;\n      width: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal.light:not(.vertical-items) .trd-content-hub-item,\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal.full:not(.vertical-items) .trd-content-hub-item,\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal.embedded:not(.vertical-items) .trd-content-hub-item {\n      margin: 10px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal.no-pad-items .trd-content-hub-item{\n      margin: 0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-item{\n      margin: 10px;\n      background:  ").concat(this.ctaParams.backgroundColor||"#fff"," ;\n      filter: brightness(1.02);\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-text{\n      display: -webkit-box;\n      max-width: 100%;\n      margin: 5px auto;\n      -webkit-line-clamp: 3;\n      -webkit-box-orient: vertical;\n      overflow: hidden;\n      text-overflow: ellipsis;\n      text-align:left;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .item-img{\n      display:none;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-title-wing{\n      display:none;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-link .trd-content-hub-text-title{\n      color: ").concat(this.ctaParams.textColor,";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-link .trd-content-hub-text-description{\n      color: ").concat(this.ctaParams.secondaryTextColor,";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-content-hub-link{\n      background-color: ").concat(this.ctaParams.backgroundColor,";\n      padding:4px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-item{\n      box-shadow: 0 0 5px 0 rgba(0,0,0,.2);\n      transition: all .3s ease;\n      flex-shrink:2;\n      flex-grow:2;\n      flex-basis:0;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-item:hover{\n      box-shadow: 0 5px 20px 0 rgba(0,0,0,.2);\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-link .item-img-wrap {\n      margin-bottom:0;\n      flex-grow: 3;\n      flex-basis: 0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal.arrow-button .trd-content-hub-link .item-img-wrap {\n      flex-grow: 2;\n    }\n\n\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-link .item-img {\n      height: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-link .trd-content-hub-link-text {\n      flex-grow: 5;\n      flex-basis: 0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".horizontal.arrow-button .trd-content-hub-link .trd-content-hub-link-text{\n      flex-grow:4;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".no-pad-items .trd-content-hub-item, #trd_cta_").concat(this.cta.ViewModelId,".horizontal.slider:not(.arrow-button) .trd-content-hub-item {\n      box-shadow: none;\n      transition: none;\n      border-bottom: 3px solid ").concat(this.ctaParams.buttonTextColor,";\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,":not(.large):not(.horizontal) .trd-content-hub-link .trd-content-hub-link-text{\n      height: 80px;\n    }\n    ").concat(t.showRecommendTags?"\n      #trd_cta_".concat(this.cta.ViewModelId,":not(.large):not(.horizontal) .trd-content-hub-item-with-tags .trd-content-hub-link .trd-content-hub-link-text{\n        height: 120px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,":not(.large):not(.horizontal) .trd-content-hub-item-with-tags.trd-content-hub-item-with-area .trd-content-hub-link .trd-content-hub-link-text{\n        height: 145px;\n      }"):"","\n    ").concat(t.showRecommendArea?"\n      #trd_cta_".concat(this.cta.ViewModelId,":not(.large):not(.horizontal) .trd-content-hub-item-with-area .trd-content-hub-link .trd-content-hub-link-text{\n        height: 105px;\n      }"):"","\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-content-hub-link .trd-content-hub-link-text{\n      height: auto !important;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-content-hub-link .trd-content-hub-button{\n      display: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-link .trd-content-hub-link-text{\n      line-height:1.4;\n      padding : 0 10px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".large .trd-content-hub-link .trd-content-hub-link-text{\n      height:100px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".read-more .trd-content-hub-link .trd-content-hub-link-text,\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-read-more .trd-content-hub-link .trd-content-hub-link-text{\n      position: relative;\n    }\n\n    ").concat(t.showRecommendTags?"\n      #trd_cta_".concat(this.cta.ViewModelId,".large .trd-content-hub-item-with-tags .trd-content-hub-link .trd-content-hub-link-text{\n        height:140px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".large .trd-content-hub-item-with-tags.trd-content-hub-item-with-buttons .trd-content-hub-link .trd-content-hub-link-text {\n        height:150px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".large .trd-content-hub-item-with-tags.trd-content-hub-item-with-area .trd-content-hub-link .trd-content-hub-link-text{\n        height:165px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".large .trd-content-hub-item-with-tags.trd-content-hub-item-with-area.trd-content-hub-item-with-buttons .trd-content-hub-link .trd-content-hub-link-text{\n        height:175px;\n      }"):"","\n    ").concat(t.showRecommendArea?"\n      #trd_cta_".concat(this.cta.ViewModelId,".large .trd-content-hub-item-with-area .trd-content-hub-link .trd-content-hub-link-text{\n        height:125px;\n      }"):"","\n\n\n    #trd_cta_").concat(this.cta.ViewModelId,".text-over:not(.fixed) .trd-content-hub-link .trd-content-hub-link-text{\n      position:relative;\n      margin-bottom:-70px;\n      top:-70px;\n      height:70px;\n      font-size:14px;\n      background: ").concat(this.ctaParams.backgroundColor||"none",";\n    }\n    ").concat(t.showRecommendTags?"\n      #trd_cta_".concat(this.cta.ViewModelId,".text-over:not(.fixed) .trd-content-hub-item-with-tags .trd-content-hub-link .trd-content-hub-link-text {\n        margin-bottom:-110px;\n        top:-110px;\n        height: 110px\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".text-over:not(.fixed) .trd-content-hub-item-with-tags.trd-content-hub-item-with-area .trd-content-hub-link .trd-content-hub-link-text {\n        margin-bottom:-140px;\n        top:-140px;\n        height: 140px\n      }"):"","\n    ").concat(t.showRecommendArea?"\n      #trd_cta_".concat(this.cta.ViewModelId,".text-over:not(.fixed) .trd-content-hub-item-with-area .trd-content-hub-link .trd-content-hub-link-text {\n        margin-bottom:-100px;\n        top:-100px;\n        height: 100px\n      }"):"","\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-link .trd-content-hub-button{\n      font-size: ").concat(this.ctaParams.buttonTextSize||14,"px;\n      background-color: ").concat(this.ctaParams.buttonBackgroundColor,";\n      color: ").concat(this.ctaParams.buttonTextColor,";\n      padding: 3px 10px;\n      position: absolute;\n      bottom:10px;\n      right:10px;\n      border: 1px solid ").concat(this.ctaParams.buttonBackgroundColor,";\n      border-radius: 5px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".no-pad-items .trd-content-hub-item {\n      box-shadow: none;\n      transition: none;\n      margin: 0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-content-hub-link:hover{\n      box-shadow: 4px 4px 2px #aaa;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId,".fixed .trd-content-hub-item{\n     max-width:150px;\n     height: 98%;\n    }\n\n    ").concat(t.showRecommendTags?"\n      #trd_cta_".concat(this.cta.ViewModelId,":not(.horizontal) .trd-content-hub-bottom {\n        position:absolute;\n        bottom: 10px;\n        left: 10px;\n        right: 10px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,":not(.horizontal) .trd-content-hub-item-with-tags.trd-content-hub-item-with-buttons .trd-content-hub-bottom {\n        display: flex;\n        flex-direction: column;\n        justify-content: space-between;\n        height: 67px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-bottom .trd-content-hub-tags {\n        font-size: smaller;\n        text-align: left;\n        max-height: 35px;\n        overflow: hidden;\n        display: -webkit-box;\n        -webkit-line-clamp: 2;\n        -webkit-box-orient: vertical;\n        text-overflow: ellipsis;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-bottom .trd-content-hub-button {\n        position: relative;\n        bottom: unset;\n        right: unset;\n        margin-bottom: 5px;\n        align-self: flex-end;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-item-with-tags {\n        max-width: 400px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-item-with-tags.trd-content-hub-item-with-area {\n        max-width: 520px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-item-with-tags .trd-content-hub-link .item-img-wrap {\n        flex-grow: 5;\n      }"):"","\n\n    ").concat(t.showRecommendArea?"\n      #trd_cta_".concat(this.cta.ViewModelId,".horizontal .trd-content-hub-item-with-area {\n        max-width: 380px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".horizontal .trd-content-hub-item-with-area .trd-content-hub-link .item-img-wrap {\n        flex-grow: 4;\n      }"):"","\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-area {\n      text-align: left;\n      font-size: smaller;\n      min-height: 25px;\n      margin-top: 5px;\n    }\n\n    @media only screen and (max-width : 1010px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".light:not(.horizontal) .trd-content-hub-item{\n        max-width: 240px;\n        min-width: 100px;\n        margin: 10px;\n      }\n    }\n\n    /* swider style */\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.title-container{\n      width:100%;\n      position: absolute;\n      top:15px;\n      left: 175px;\n      max-width:50%;\n      z-index:999;\n      margin-left:10px;\n      }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.title-container .trd-title{\n      color:").concat(this.ctaParams.textColor,";\n      font-size: ").concat(this.ctaParams.titleSize||14,"px;\n      text-align:left;\n      padding-bottom:5px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .trd-content-hub-item,\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .container-elements,\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .linkable-container\n    {\n      padding:0;\n      margin: 0;\n      box-shadow: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .container-elements{\n      width:100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .trd-content-hub-item{\n      min-width:480px;\n      max-width:480px;\n      padding:15px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .trd-content-hub-link .trd-content-hub-text{\n      line-height: 1.3;\n      padding-top:15px;\n      padding-right:44px;\n      padding-left:5px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_6 .trd-content-hub-link .trd-content-hub-text{\n      padding-left:0;\n      padding-right:0;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .trd-content-hub-link .trd-content-hub-button{\n      width: 12px;\n      height: 100%;\n      border-radius:0;\n      top:0;\n      right:0;\n      padding: 0 15px;\n      border: none;\n      display:flex;\n      box-sizing:content-box;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_6 .trd-content-hub-link{\n      padding-left:40px;\n      box-sizing: border-box;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .trd-content-hub-link .trd-content-hub-button svg{\n      align-self: center;\n      height:24px;\n      width:12px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .trd-content-hub-link-title .trd-content-hub-link-text{\n      padding-top:25px;\n      align-self: auto;\n     }\n\n    /* swider style end*/\n\n    @media only screen and (max-width : 640px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".full .trd-content-hub-item, #trd_cta_").concat(this.cta.ViewModelId,".full.large .trd-content-hub-item{\n        max-height: inherit;\n        /*min-width: 80px;*/\n        margin: 4px;\n        min-height: 80px;\n        max-width: 120px;\n        font-size: small;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded .trd-content-hub-item{\n        font-size: small;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".full.vertical-items .trd-content-hub-item,\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded.vertical-items .trd-content-hub-item{\n        max-width: inherit;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.title-container{\n        left: 0;\n        max-width:90%;\n      }\n\n    }\n    @media only screen and (min-width : 769px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".light .container-elements{\n        max-width:710px;\n      }\n    }\n\n    @media only screen and (max-width : 640px) {\n      #trd_cta_").concat(this.cta.ViewModelId,":not(.embedded) .trd-content-hub-item, #trd_cta_").concat(this.cta.ViewModelId,".light .trd-content-hub-item{\n        min-width:150px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".full.horizontal .trd-content-hub-item{\n        min-width:200px;\n        max-height:unset;\n        max-width:unset;\n        min-height:unset;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .trd-content-hub-link, #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.trd-initial-open .container-elements{\n        flex-direction:column;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.trd-initial-open .trd-content-hub-item{\n        padding-top: 60px;\n        min-width: 235px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.trd-initial-open .container-elements{\n        padding:0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open.position_0 .trd-content-hub-item,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open.position_3 .trd-content-hub-item,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open.position_6 .trd-content-hub-item{\n        padding-left: 55px;\n        box-sizing: border-box;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open.position_2 .trd-content-hub-item,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open.position_5 .trd-content-hub-item,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open.position_8 .trd-content-hub-item{\n        padding-right: 55px;\n        box-sizing: border-box;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open .int-con-td-item.title-container{\n        width:215px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.trd-initial-open.position_6 .int-con-td-item.title-container{\n        width:230px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.horizontal .trd-content-hub-link .item-img{\n        margin: 0 auto;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .trd-content-hub-link .trd-content-hub-text{\n        text-align:center;\n        padding:5px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider .int-con-td-item.title-container .trd-title{\n        text-align:center;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".arrow-button.slider.position_6 .trd-content-hub-link{\n        padding-left:0;\n      }\n    }\n\n    @media only screen and (max-width: 480px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded .trd-content-hub-item{\n        max-width: 360px;\n        min-width: 250px;\n      }\n    }\n\n    /* LIGHT */\n    #trd_video_popup.trd-component-hide{\n      display:none;\n    }\n    #trd_video_popup.light{\n      width: 100%; height: 100%;\n      position: fixed; top: 0; left: 0;\n      opacity:1;\n      background: rgba(0,0,0,0.7);\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      z-index: 9999999;\n    }\n    #trd_video_popup.light.animate .component-content{\n      transform: scale(1);\n    }\n\n    #trd_video_popup.light .component-content{\n      display: flex;\n      flex-direction: column;\n      justify-content: center;\n      align-content: center;\n      align-items: center;\n      position: relative;\n      margin: 3px;\n      width: 644px;\n      min-height: 362px;\n      background: ").concat(this.ctaParams.backgroundColor,";\n      padding: 20px;\n      transform: scale(0.25);\n      transition: 0.2s;\n      box-sizing: content-box;\n    }\n\n    #trd_video_popup.light .component-content .trd-video-close-btn img{\n      vertical-align:top;\n    }\n\n    #trd_video_popup.light .component-content .trd-video-close-btn{\n      position: absolute;\n      top: 5px;\n      right: 5px;\n      background: none;\n      border-radius: 10px;\n      height: 18px;\n      cursor:pointer;\n    }\n    #trd_video_popup.light .component-content .trd-video-close-btn:hover{\n      transform: rotate(90deg);\n      display:block;\n      transition-delay: 0s;\n      transition-duration: 200ms;\n      transition-property: transform, opacity;\n      transition-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);box-sizing: content-box;\n    }\n    #trd_video_popup.light .component-content .trd-video-modal-title{\n      line-height: 1.2;\n      font-size: 18px;\n      padding: 0;\n      margin: 5px 0;\n      color: ").concat(this.ctaParams.textColor,";\n      text-align: center;\n    }\n\n    @media only screen and (min-width : 641px) {\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_0.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_3.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.arrow-button.position_6.trd-custom-close .container-elements{\n        flex-direction: row-reverse;\n      }\n    }\n\n    ")},n}($TRD_GenericLayoutComponent),$TRD_RecommendCarouselLayoutComponent=function(t){function n(n,e,i,o){var r=t.call(this,n,e,i,o)||this;return r.itemWidth=350,r.itemMargin=10,r.noOfSlides=0,r.noOfViewSlides=0,r.dotIdx=1,r.firstItemIdx=0,r.isItemsMoving=!1,r.shownPages=[],r}return __extends(n,t),n.prototype.show=function(){return __awaiter(this,void 0,void 0,(function(){var n,e=this;return __generator(this,(function(i){switch(i.label){case 0:return this.carouselElement=this.componentContainerElem.querySelector(".trd-carousel"),this.viewElement=this.componentContainerElem.querySelector(".trd-carousel-view"),this.itemsElement=this.componentContainerElem.querySelector(".trd-carousel-items"),this.dotListElement=this.componentContainerElem.querySelector(".trd-carousel-dots-list"),[4,t.prototype.show.call(this,!0)];case 1:return i.sent()&&this.contentTasks.Pages.length&&(n=this.getItemsHtml().join(""),this.itemsElement&&(this.itemsElement.innerHTML=n+n),this.setItemsClickHandler(),this.initItemsSize(),this.moveItems(),this.itemsElement&&(this.itemsElement.style.visibility="visible"),this.setActiveDotElement(),setTimeout((function(){return e.allowItemsTransition(!0)}),50),this.initCarouselHandlers(),this.shownPages=this.taskPages.Pages.slice(0,this.noOfViewSlides),this.notify($Trd_InternalEventsTypes.CTA_SHOWN,this.shownPages,!1),this.isShowNotified=!0),[2,this.contentTasks.Pages.length>0]}}))}))},n.prototype.getCompiledTemplate=function(n,e){this.model=n,this.noOfSlides=n.limit,this.noOfViewSlides=n.displayLimit,this.firstItemIdx=n.limit;var i=this.getCarouselHtml(n),o=t.prototype.contentStyles.call(this,n)+this.getCarouselStyles(n);return{html:i,css:"<style> ".concat(o," ").concat(t.prototype.getCustomStyles.call(this,e)," </style>")}},n.prototype.initCarouselHandlers=function(){var t,n,e=this;null===(t=this.containerElement.querySelector(".trd-crsl-btn-left"))||void 0===t||t.addEventListener("click",(function(){e.isItemsMoving||(e.isItemsMoving=!0,e.firstItemIdx--,e.moveItems(),e.adjustFirstItemIdx(),e.moveDotLeft(),e.notifyNewShownPages())})),null===(n=this.containerElement.querySelector(".trd-crsl-btn-right"))||void 0===n||n.addEventListener("click",(function(){e.isItemsMoving||(e.isItemsMoving=!0,e.firstItemIdx++,e.moveItems(),e.adjustFirstItemIdx(),e.moveDotRight(),e.notifyNewShownPages())})),window.addEventListener("resize",(function(t){e.initItemsSize(),e.moveItems()}))},n.prototype.notifyNewShownPages=function(){var t,n=this,e=this.firstItemIdx>=this.noOfSlides?this.firstItemIdx-this.noOfSlides:this.firstItemIdx,i=this.taskPages.Pages.slice(e,e+this.noOfViewSlides).filter((function(t){return!n.shownPages.includes(t)}));this.notify($Trd_InternalEventsTypes.CTA_SHOWN,i,!0),(t=this.shownPages).push.apply(t,i)},n.prototype.initItemsSize=function(){var t=this;if(this.viewElement&&this.itemsElement){this.noOfSlides=this.contentTasks.Pages.length,this.firstItemIdx=this.contentTasks.Pages.length,this.noOfViewSlides=window.innerWidth>650?Math.min(this.model.displayLimit,this.contentTasks.Pages.length):1;var n=this.viewElement.offsetWidth;this.itemWidth=n/this.noOfViewSlides;var e=this.itemWidth*this.noOfSlides*2;this.itemsElement.style.width="".concat(e,"px"),this.componentContainerElem.querySelectorAll(".trd-content-hub-item").forEach((function(n){n.style.width="".concat(t.itemWidth,"px"),n.style.maxWidth="".concat(t.itemWidth,"px"),n.style.minWidth="".concat(t.itemWidth-2*t.itemMargin,"px")}))}},n.prototype.moveItems=function(){var t=this.itemWidth*this.firstItemIdx*-1;this.itemsElement&&(this.itemsElement.style.transform="translateX(".concat(t,"px)"))},n.prototype.adjustFirstItemIdx=function(){var t=this;this.firstItemIdx>this.noOfSlides||0===this.firstItemIdx?setTimeout((function(){t.firstItemIdx=0===t.firstItemIdx?t.noOfSlides:t.firstItemIdx-t.noOfSlides,t.allowItemsTransition(!1),t.moveItems(),setTimeout((function(){t.allowItemsTransition(!0),t.isItemsMoving=!1}),100)}),350):this.isItemsMoving=!1},n.prototype.allowItemsTransition=function(t){this.itemsElement&&(this.itemsElement.style.transition="transform ".concat(t?"300":"0","ms ease 0s"))},n.prototype.getActiveDotElement=function(){return this.containerElement.querySelector(".trd-carousel-dots-list li:nth-child(".concat(3+this.dotIdx,")"))},n.prototype.setActiveDotElement=function(){var t;this.containerElement.querySelectorAll(".trd-carousel-dots-list li").forEach((function(t){return t.classList.remove("trd-carousel-dot-active")})),null===(t=this.getActiveDotElement())||void 0===t||t.classList.add("trd-carousel-dot-active")},n.prototype.setDotsSizes=function(t){var n,e=[.5,.75,1,1,1,.75,.5];null===(n=this.dotListElement)||void 0===n||n.querySelectorAll("li").forEach((function(n,i){var o=i>=t&&i<t+e.length?e[i-t]:0;n.style.transform="scale(".concat(o,")")}))},n.prototype.moveDotLeft=function(){var t=this;this.dotListElement&&(this.dotIdx>1?(this.dotIdx--,this.setActiveDotElement()):(this.setDotsSizes(2),this.dotListElement.style.transform="translateX(-24px)",setTimeout((function(){t.allowDotListTransition(!0),t.dotListElement&&(t.dotListElement.style.transform=""),t.setDotsSizes(1)}),1),setTimeout((function(){t.allowDotListTransition(!1)}),350)))},n.prototype.moveDotRight=function(){var t=this;this.dotListElement&&(this.dotIdx<3?(this.dotIdx++,this.setActiveDotElement()):(this.setDotsSizes(0),this.dotListElement.style.transform="translateX(24px)",setTimeout((function(){t.allowDotListTransition(!0),t.dotListElement&&(t.dotListElement.style.transform=""),t.setDotsSizes(1)}),1),setTimeout((function(){t.allowDotListTransition(!1)}),350)))},n.prototype.allowDotListTransition=function(t){this.dotListElement&&(this.dotListElement.style.transition="transform ".concat(t?"300":"0","ms ease 0s"),this.dotListElement.querySelectorAll("li").forEach((function(n){n.style.transition="transform ".concat(t?"300":"0","ms ease 0s")})))},n.prototype.getCarouselHtml=function(t){var n;return'\n  <div id="trd_cta_'.concat(this.cta.ViewModelId,'" class="trd_comp_').concat(this.cta.ViewModelId," trd-recommend-loading trd-comp-container ").concat(null===(n=t.classes)||void 0===n?void 0:n.join(" "),'">\n    <div class="component-content">\n      <div class="container-elements">\n        <div class="int-con-td-item title-container">\n          <div class="trd-title-wing"></div>\n          <div class="trd-title"> ').concat(t.title||"",'</div>\n          <div class="trd-title-wing"></div>\n        </div>\n        <div class="int-con-td-item linkable-container trd-carousel">\n\n          <div class="trd-carousel-controls">\n            <button class="trd-crsl-round-button trd-crsl-btn-left">\n              <svg class="trd-crsl-btn-icon">\n                <use href="#left"></use>\n              </svg>\n            </button>\n            <button class="trd-crsl-round-button trd-crsl-btn-right">\n              <svg class="trd-crsl-btn-icon">\n                <use href="#right"></use>\n              </svg>\n            </button>\n          </div>\n\n          <div class="trd-carousel-view">\n            <div class="trd-carousel-items"></div>\n          </div>\n\n          <div class="trd-carousel-dots">\n            <ul class="trd-carousel-dots-list">\n              <li style="transform: scale(0);"></li>\n              <li style="transform: scale(0.5);"></li>\n              <li style="transform: scale(0.75);"></li>\n              <li style="transform: scale(1);"></li>\n              <li style="transform: scale(1);"></li>\n              <li style="transform: scale(1);"></li>\n              <li style="transform: scale(0.75);"></li>\n              <li style="transform: scale(0.5);"></li>\n              <li style="transform: scale(0);"></li>\n            </ul>\n          </div>\n\n        </div>\n      </div>\n    </div>\n\n    <div style="display: none">\n      <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <symbol id="left" viewBox="0 0 32 32">\n          <path d="M18.08 3.8a1.6 1.6 0 00-2.23.05l-10.51 11v.07l-.1.16a1 1 0 00-.16.26 1.15 1.15 0 00-.06.28H5a2.18 2.18 0 000 .29 2.87 2.87 0 000 .31 1.59 1.59 0 00.06.3 1.78 1.78 0 00.17.27l.1.16V17l10.52 11a1.59 1.59 0 002.82-1 1.57 1.57 0 00-.54-1.18l-9.47-9.89L18.13 6a1.58 1.58 0 00.42-1.07 1.55 1.55 0 00-.47-1.11z"></path>\n        </symbol>\n        <symbol id="right" viewBox="0 0 32 32">\n          <path d="M23.33 15a1.78 1.78 0 00-.17-.27l-.1-.16v-.07l-10.51-11a1.56 1.56 0 00-1.11-.45 1.58 1.58 0 00-1.21 2.59l9.47 9.96-9.47 10a1.59 1.59 0 001 2.77 1.59 1.59 0 001.23-.6L23 16.72v-.07l.1-.16a2.33 2.33 0 00.17-.26 1.15 1.15 0 00.06-.28 1.34 1.34 0 000-.3 1.54 1.54 0 000-.31v-.06a2.28 2.28 0 000-.26z"></path>\n        </symbol>\n      </svg>\n    </div>\n  </div>\n  ')},n.prototype.getCarouselStyles=function(t){return"\n    #trd_cta_".concat(this.cta.ViewModelId,".embedded {\n      width: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,".trd-recommend-loading {\n      display: none;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .container-elements, #trd_cta_").concat(this.cta.ViewModelId," .container-elements a,\n    #trd_cta_").concat(this.cta.ViewModelId," .int-con-td-item.trd-title{\n      color: ").concat(this.ctaParams.textColor||"#f3f2f4",";\n      font-size: ").concat(this.ctaParams.titleSize||24,"px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .title-container {\n      ").concat(t.title?"":"display: none;","\n      margin: 30px ").concat(this.itemMargin+80,"px 15px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-title {\n      text-align: center;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel {\n      position: relative;\n      padding: 0 80px;\n      margin-bottom: 20px;\n    }\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel > * {\n      box-sizing: border-box;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel-view {\n      width: 100%;\n      overflow: hidden;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel-items {\n      display: flex;\n      visibility: hidden;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-item,\n    #trd_cta_").concat(this.cta.ViewModelId,".large:not(.slider) .trd-content-hub-item {\n      /* min-width: unset !important; */\n      margin: ").concat(this.itemMargin,"px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-item:hover {\n        box-shadow: 5px 5px 8px 0 rgba(0,0,0,.2);\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-content-hub-item img {\n      width: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel-controls {\n        display: flex;\n        justify-content: space-between;\n        left: 0;\n        padding: 16px;\n        position: absolute;\n        top: 35%;\n        width: 100%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-crsl-round-button {\n        align-items: center;\n        background-color: #fff;\n        border: none;\n        border-radius: 50%;\n        cursor: pointer;\n        display: flex;\n        height: 48px;\n        justify-content: center;\n        min-width: 48px;\n        outline: none;\n        padding: 0;\n        position: relative;\n        width: 48px;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,' .trd-crsl-round-button:before {\n        border-radius: 50%;\n        box-shadow: 1px 1px 9px rgba(33,51,67,.12);\n        content: "";\n        height: 100%;\n        left: 0;\n        position: absolute;\n        top: 0;\n        transition: box-shadow .3s ease-in-out;\n        width: 100%;\n    }\n\n    #trd_cta_').concat(this.cta.ViewModelId," .trd-crsl-round-button:hover:before {\n        box-shadow: 1px 1px 9px rgba(33,51,67,.4);\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-crsl-round-button>.trd-crsl-btn-icon {\n        fill: #213343;\n        height: 50%;\n        pointer-events: none;\n        width: 50%;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId,' .trd-crsl-round-button:after {\n        content: "";\n        height: calc(100% + 8px);\n        left: -4px;\n        position: absolute;\n        top: -4px;\n        width: calc(100% + 8px);\n    }\n\n    #trd_cta_').concat(this.cta.ViewModelId," .trd-carousel-dots {\n        display: ").concat(this.model.carouselShowIndicator?"flex":"none",";\n        justify-content: center;\n        left: 0;\n        padding-top: 20px;\n        top: 100%;\n        width: 100%;\n        transform: translateX(-24px);\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel-dots-list {\n        backface-visibility: hidden;\n        display: flex;\n        flex-wrap: nowrap;\n        list-style: none;\n        margin: 0;\n        padding: 0;\n        position: relative;\n        white-space: nowrap;\n        width: 168px;\n        will-change: transform;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel-dots-list>li {\n        background-color: ").concat(this.ctaParams.carouselIndicatorColor,";\n        opacity: 0.25;\n        border-radius: 50%;\n        height: 16px;\n        margin: 0 4px;\n        min-width: 16px;\n        width: 16px;\n        will-change: transform;\n    }\n\n    #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel-dots-list > li.trd-carousel-dot-active {\n        opacity: 1;\n    }\n\n    @media only screen and (max-width : 450px) {\n      #trd_cta_").concat(this.cta.ViewModelId," .title-container {\n        margin: 30px 0 15px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel {\n        padding: 0 60px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-carousel-controls {\n        padding: 5px;\n      }\n    }\n    ")},n}($TRD_RecommendationLayoutComponent),$TRD_GenericScriptComponent=function(_super){function $TRD_GenericScriptComponent(t,n,e,i){return _super.call(this,t,n,e,i)||this}return __extends($TRD_GenericScriptComponent,_super),$TRD_GenericScriptComponent.prototype.initialize=function(t){this.componentContainerElem=t},$TRD_GenericScriptComponent.prototype.show=function(){var _this=this,embeddedScripts=this.componentContainerElem.querySelectorAll("script");return embeddedScripts&&embeddedScripts.length>0&&embeddedScripts.forEach((function(script){try{eval(script.innerText)}catch(t){console.warn("Trendemon script cta ".concat(_this.cta.Id," error:"),t)}})),!0},$TRD_GenericScriptComponent.prototype.getEventPrefix=function(){return"generic_script"},$TRD_GenericScriptComponent.prototype.getCompiledTemplate=function(t,n){return this.model=t,{html:'\n    <script type="text/javascript" id="trd_code_'.concat(this.cta.Id,'">\n      ').concat(this.model.scriptCode||"",";\n    <\/script>\n  "),css:""}},$TRD_GenericScriptComponent}($TRD_CtaComponent),$TRD_FastTextLayoutComponent=function(t){function n(n,e,i,o){return t.call(this,n,e,i,o)||this}return __extends(n,t),n.prototype.initialize=function(n){var e=this;if(t.prototype.initialize.call(this,n),this.cta.RenderMode===enRenderModes.SHOW){var i=this.containerElement.querySelectorAll("a:not(.trd-link)");null==i||i.forEach((function(t){t.addEventListener("click",(function(t){e.notify($Trd_InternalEventsTypes.CTA_COMPLETE),t.stopPropagation()}))}))}},n.prototype.show=function(){var t=this;return this.componentHtmlRootElem.classList.add("trd-initial-open"),setTimeout((function(){return t.componentHtmlRootElem.classList.add("animate")}),0),!0},n.prototype.getEventPrefix=function(){return"fastext"},n.prototype.getCompiledTemplate=function(t,n){var e;this.model=t;var i=t.link,o=t.isUnitLink&&i,r=t.buttonText&&!o&&i?'<a href="'.concat(i,'" class="trd-link trd-fastext-btn" target="').concat(t.isOpenInNewWindow?"_blank":"_self",'">').concat(t.buttonText,"</a>"):"",a=!t.buttonText||!o&&i?"":'<div class="trd-fastext-btn">'.concat(t.buttonText,"</div>"),c=t.closeButton?'<svg xmlns="http://www.w3.org/2000/svg" height="'.concat(t.closeButton.size,'" viewBox="0 -960 960 960" width="').concat(t.closeButton.size,'" fill="').concat(t.closeButton.color,'">\n      <path d="m259-174-84-85 220-221-220-221 84-85 221 221 221-221 84 85-220 221 220 221-84 85-221-221-221 221Z"/>\n    </svg>'):'<img src="https://pic.trendemon.com/images/closex.png" width="17" height="17" alt="close promotion" />',d='\n    <div id="trd_cta_'.concat(this.cta.ViewModelId,'" class="trd_comp_').concat(this.cta.ViewModelId," trd-comp-container ").concat(null===(e=t.classes)||void 0===e?void 0:e.join(" ")," ").concat(t.closeButton?"trd-custom-close":"",'">\n      <div class="component-content">\n        <div class="container-elements">\n          <div class="close-cont internal-close-cont">\n            <div class="internal close-btn">\n              ').concat(c,"\n            </div>\n          </div>\n          ").concat(o?'<a href="'.concat(i,'" class="trd-banner-link trd-link" target="').concat(t.isOpenInNewWindow?"_blank":"_self",'">'):'<div class="trd-banner-link trd-link">','\n            <div class="trd-title">').concat(t.title||"","</div>\n            ").concat(r).concat(a,"\n          ").concat(o?"</a>":"</div>","\n        </div>\n      </div>\n    </div>\n    "),s=this.getFastTextStyles(t);return{html:d,css:"<style> ".concat(s," ").concat(this.getCustomStyles(n)," </style>")}},n.prototype.getFastTextStyles=function(t){var n,e=this.getLogoAbsolutePath(t.logoRelativeUrl);return"\n      .trd-embedded-top-bottom-margin #trd_cta_".concat(this.cta.ViewModelId," {\n        margin-top: 0.9em;\n        margin-bottom: 0.9em;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container {\n        display: none;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.trd-initial-open {\n        display: block;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,":not(.light):not(.full){\n      z-index: 999999999;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light {\n        z-index: 9999999999;\n        width: 100%;\n        height: 100%;\n        position: fixed;\n        top: 0;\n        left: 0;\n        opacity:1;\n        background: rgba(0,0,0,0.7);\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light .component-content {\n        height: 95vh;\n        display: flex;\n        justify-content: center;\n        align-content: center;\n        align-items: center;\n        position: relative;\n        margin: 3px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_0 .component-content,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_3 .component-content,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_6 .component-content {\n        justify-content: flex-start;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_2 .component-content,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_5 .component-content,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_8 .component-content {\n        justify-content: flex-end;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_0 .component-content,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_1 .component-content,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_2 .component-content {\n        align-items: baseline;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_6 .component-content,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_7 .component-content,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_8 .component-content {\n        align-items: flex-end;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light .container-elements{\n        transform: scale(0.01);\n        transition: 0.2s;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light.animate .container-elements{\n        transform: scale(1);\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider {\n        position: fixed;\n        display:block;\n        overflow: hidden;\n        font-family: inherit;\n        border-radius: 3px;\n        transition: 0.5s;\n        width: auto;\n        max-width: 90%;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2 {\n        top: calc(5%);\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_3,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5{\n        top:50%;\n        transform: translate(0%, -50%);\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_1,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_7{\n        left:50%;\n        transform: translate(-50%, 0%);\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_6,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8{\n        bottom: 10px;\n      }\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8{\n        right: -1000px;\n        transition: right 0.5s;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2.trd-initial-open,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_5.trd-initial-open,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_8.trd-initial-open{\n        right: 0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_3,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_6{\n        left: -1000px;\n        transition: left 0.5s;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.position_0,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.position_3,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.position_6{\n        left: 0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_1{\n        top: -1000px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.position_1{\n        top:0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_4{\n        left:50%;\n        top:0;\n        transform: translate(-50%, 0);\n        max-height: 0;\n        height: auto;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_4.trd-initial-open{\n        max-height:unset;\n        top:50%;\n        transform: translate(-50%, -50%);\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_7{\n        bottom: -1000px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.trd-initial-open.position_7{\n        bottom:10px;\n        max-height:unset;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .container-elements {\n        display: flex;\n        flex-direction: column;\n        justify-content: center;\n        box-sizing: border-box;\n        cursor: default;\n        width: ").concat(t.width?this.getCssSize(t.width):"100%",";\n        max-width: 100%;\n        ").concat(t.height?"height: ".concat(this.getCssSize(t.height),";"):"","\n        ").concat(this.ctaParams.backgroundColor?"background-color: ".concat(this.ctaParams.backgroundColor,";"):"","\n        ").concat(e?'background-image: url("'.concat(e,'"); background-size: cover; background-position: center;'):"","\n        ").concat(t.isUnitLink&&t.link?"":"padding: 15px 20px;","\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded .container-elements {\n        margin: auto;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light .container-elements {\n        position: relative;\n        max-width: min(90%, 800px);\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .close-btn{\n        cursor: pointer;\n        width: 17px;\n        height: 17px;\n        background: none;\n        position: absolute;\n        right: 5px;\n        top: 5px;\n        line-height: normal;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .close-btn img{\n        vertical-align: baseline;\n        margin:0;\n        padding:0;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,":not(.trd-custom-close) .close-btn:hover {\n        transform: rotate(90deg);\n        display:block;\n        transition-delay: 0s;\n        transition-duration: 200ms;\n        transition-property: transform, opacity;\n        transition-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);box-sizing: content-box;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".embedded .close-btn {\n        display: none;\n      }\n\n      ").concat(t.closeButton?"\n      #trd_cta_".concat(this.cta.ViewModelId,".trd-custom-close .internal.close-btn{\n        ").concat("outside"==t.closeButton.position&&"no"!=t.closeButton.shape?"right: -".concat(t.closeButton.size/2+2,"px !important; top: -").concat(t.closeButton.size/2+2,"px !important;"):"right: 5px !important; top: 5px !important;",";\n        ").concat("no"!=t.closeButton.shape?"border: 1px solid ".concat(t.closeButton.border,";\n        background: ").concat(t.closeButton.background,";\n        ").concat("square"==t.closeButton.shape?"border-radius: 2px;":"border-radius: 18px;"):"","\n        padding: 2px;\n        width: ").concat(t.closeButton.size,"px;\n        height: ").concat(t.closeButton.size,"px;\n        box-sizing: content-box;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close svg{\n      vertical-align: unset;\n      }\n\n      ").concat("outside"===(null===(n=t.closeButton)||void 0===n?void 0:n.position)&&"no"!=t.closeButton.shape?"\n      #trd_cta_".concat(this.cta.ViewModelId,".slider:not(.arrow-button).position_2.trd-initial-open.trd-custom-close,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider:not(.arrow-button).position_5.trd-initial-open.trd-custom-close,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider:not(.arrow-button).position_8.trd-initial-open.trd-custom-close{\n        right: ").concat(t.closeButton.size/2+2,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_2.trd-initial-open.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_5.trd-initial-open.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_8.trd-initial-open.trd-custom-close .container-elements{\n        margin-right: ").concat(t.closeButton.size/2+2,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_0.trd-initial-open.trd-custom-close,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_1.trd-initial-open.trd-custom-close,\n      #trd_cta_").concat(this.cta.ViewModelId,".slider.position_2.trd-initial-open.trd-custom-close{\n        top: ").concat(t.closeButton.size/2+2,"px;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_0.trd-initial-open.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_1.trd-initial-open.trd-custom-close .container-elements,\n      #trd_cta_").concat(this.cta.ViewModelId,".light.position_2.trd-initial-open.trd-custom-close .container-elements{\n        margin-top: ").concat(t.closeButton.size/2+2,"px;\n      }\n      "):"","\n    "):"","\n\n      #trd_cta_").concat(this.cta.ViewModelId," a,\n      #trd_cta_").concat(this.cta.ViewModelId," a:hover,\n      #trd_cta_").concat(this.cta.ViewModelId," a:active,\n      #trd_cta_").concat(this.cta.ViewModelId," a:visited {\n        text-decoration: none;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-banner-link.trd-link {\n        flex-direction: column;\n        justify-content: center;\n        box-sizing: border-box;\n        ").concat(t.height?"height: ".concat(this.getCssSize(t.height),";"):"","\n        ").concat(t.isUnitLink&&t.link?"padding: 15px 20px;":"","\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-link,\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-title {\n        width: 100%;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-title {\n        color: #000000;\n        line-height: 1.2;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId," .trd-fastext-btn {\n        box-sizing: border-box;\n        color: ").concat(this.ctaParams.buttonTextColor,";\n        background-color: ").concat(this.ctaParams.buttonBackgroundColor,";\n        padding: 10px;\n        border-radius: 5px;\n        text-align: center;\n        font-size: larger;\n      }\n\n      #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close{\n          overflow: visible;\n        }\n    ")},n.prototype.getCssSize=function(t){return/^\d+$/.test(t)?t+"px":t},n}($TRD_GenericLayoutComponent),__assign=this&&this.__assign||function(){return __assign=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},__assign.apply(this,arguments)},__spreadArray=this&&this.__spreadArray||function(t,n,e){if(e||2===arguments.length)for(var i,o=0,r=n.length;o<r;o++)!i&&o in n||(i||(i=Array.prototype.slice.call(n,0,o)),i[o]=n[o]);return t.concat(i||Array.prototype.slice.call(n))},$Trd_StreamManager=function(){function t(t){var n,e;this.context=t,this.MAX_MOBILE_WIDTH=850,this.DEFAULT_AUTO_LOAD_TIMER_SEC=5,this.isPreview=!1,this.fromStream=!1,this.queryParamsToAdd=[],this.isFullView=!1,this.showAutoLoadAlert=!1,this.isStartMinimized=!1,this.isInbound=!1,this.isAutopilot=!1,this.isUpliftLoadSent=!1,this.isRedirected=!1,this.isRedirecCanceled=!1;var i=null!==(e=null===(n=new URLSearchParams(window.location.search).get("trd_strm_view"))||void 0===n?void 0:n.split(","))&&void 0!==e?e:[];this.isFullView=i.includes("full"),this.showAutoLoadAlert=i.includes("alert")}return t.prototype.getStream=function(){var t,n,e,i;return __awaiter(this,void 0,void 0,(function(){var o,r,a,c,d,s,l,u,h,m,p;return __generator(this,(function(_){switch(_.label){case 0:if(this.stream)return[3,8];if(o=new URLSearchParams(window.location.search),this.fromStream="true"===o.get("fromStream"),r=o.get("trd_strm"),!(a=o.get("trd_stream_params_id")))return[3,5];_.label=1;case 1:return _.trys.push([1,3,,4]),[4,$Trd_Utils.getPreSavedParams(a,"stream",this.context)];case 2:return c=_.sent(),d=LZString.decompressFromEncodedURIComponent(c.params),(s=JSON.parse(d)).content&&s.layout&&(this.stream=s,this.streamId=0,this.contentId=s.contentId,this.isPreviewLink=!0,this.isPreview=!0),[3,4];case 3:return _.sent(),[2,null];case 4:return[3,7];case 5:return r?(l=LZString.decompressFromEncodedURIComponent(r),u=JSON.parse(l),this.streamId=u.si,this.contentId=u.ci,this.itemId=u.ii,this.isPreviewLink=u.p,h={AccountId:this.context.accountId,ClientUrl:null===(t=this.context.pageDetails)||void 0===t?void 0:t.url,Referral:(null===(n=this.context.pageDetails)||void 0===n?void 0:n.reffer)?$Trd_Base64.encode(this.context.pageDetails.reffer):"",Cookie:null===(e=this.context.cid)||void 0===e?void 0:e.value,StreamId:this.streamId,ContentId:this.contentId,ItemId:null!==(i=this.itemId)&&void 0!==i?i:"",IsPreview:this.isPreviewLink},m="".concat(this.context.environment.trafficServiceUrl,"/api/experience/stream?").concat($Trd_Utils.objectToQueryString(h)),p=this,[4,$Trd_Tools.JsonpPromise(m)]):[3,7];case 6:p.stream=_.sent(),_.label=7;case 7:this.stream&&this.initStream(),_.label=8;case 8:return[2,this.stream]}}))}))},t.prototype.setStream=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,$Trd_Utils.loadLzString(this.context)];case 1:return n.sent(),this.stream=t,this.streamId=t.id,this.contentId=t.contentId,this.isInbound=!0,this.isPreview="/preview-stream.html"===window.location.pathname,this.initStream(),[2]}}))}))},t.prototype.showStream=function(){var t,n,e,i,o;if(this.stream){var r=document.createElement("div");r.classList.add("trd-stream"),this.isStartMinimized||r.classList.add("trd-max"),this.layout.desktopPosition===StreamContentDesktopPosition.Right&&r.classList.add("trd-stream-right"),r.innerHTML=this.getStreamContentHtml(this.stream);var a=document.createElement("div");a.classList.add("trd-stream-closed"),this.isStartMinimized&&a.classList.add("trd-max"),this.isPositionRight&&a.classList.add("trd-stream-right");var c=this.isPositionRight?"v":"^";a.innerHTML=c+" &nbsp; &nbsp; "+this.layout.buttonText;var d=document.createElement("div");if(this.showSlider&&this.stream.layout.slider){d.classList.add("trd-stream-slider"),d.classList.add(this.getSliderPositionClass(null===(t=this.stream.layout.slider)||void 0===t?void 0:t.position)),d.classList.add(this.getSliderStyleClass(null===(n=this.stream.layout.slider)||void 0===n?void 0:n.style));var s=this.getSliderThumbnailTypeClass(null===(e=this.stream.layout.slider)||void 0===e?void 0:e.style,this.stream.layout.desktopThumbnailType);s&&d.classList.add(s),d.innerHTML=this.getStreamSliderHtml(this.stream)}var l=document.createElement("div");l.classList.add("trd-stream-mobile"),l.innerHTML=this.getStreamMobileContentHtml();var u=document.createElement("style");if(u.innerHTML=this.getStreamCss(this.stream),this.showSidePanel&&(document.body.appendChild(r),document.body.appendChild(a)),this.showSlider&&(null===(i=this.sliderContent)||void 0===i?void 0:i.length)&&(document.body.appendChild(d),setTimeout((function(){return d.classList.add("trd-stream-slider-show")}),200)),document.body.appendChild(l),document.body.appendChild(u),this.hasVerticalScroll()?(this.setMobileProgress(),this.scrollPercent<70?this.hideMobileContent():this.showMobileContent()):(null===(o=this.currContent)||void 0===o?void 0:o.contentType)!==StreamContentType.Pdf&&(this.setMobileProgress(100),this.showMobileContent()),this.layout.isLoadNextOnScroll){var h=document.createElement("div");h.classList.add("trd-scroll-alert"),this.showAutoLoadAlert&&h.classList.add("trd-scroll-alert-show"),h.innerHTML=this.getRedirectAlertHtml(),document.body.appendChild(h)}this.addStreamHandlers();var m=document.querySelector(".trd-stream-in .trd-content-item:nth-child(".concat(this.contentIndex,")"));null==m||m.scrollIntoView(),!this.isInbound&&!this.isAutopilot||this.isMobileWidth||this.sendUplift($Trd_InternalEventsTypes.CTA_SHOWN)}},t.prototype.reset=function(){this.context.streamId=void 0,this.context.streamContentId=void 0,this.context.isStreamPreview=void 0,this.context.fromStream=void 0,this.stream=void 0,this.streamId=void 0,this.contentId=void 0,this.isInbound=!1,this.hideStream(),this.hideSlider()},t.prototype.hideStream=function(){var t=document.querySelector(".trd-stream"),n=document.querySelector(".trd-stream-closed"),e=document.querySelector(".trd-stream-mobile"),i=document.querySelector(".trd-scroll-alert");null==t||t.remove(),null==n||n.remove(),null==e||e.remove(),null==i||i.remove()},t.prototype.hideSlider=function(){var t=document.querySelector(".trd-stream-slider");null==t||t.classList.remove("trd-stream-slider-show"),setTimeout((function(){return null==t?void 0:t.remove()}),1e3)},Object.defineProperty(t.prototype,"excludedStreams",{get:function(){var t=__spreadArray(__spreadArray([],this.closedStreams,!0),this.closedSliderStreams,!0).reduce((function(t,n){return(t[n.id]=t[n.id]||[]).push(n),t}),{});return Object.entries(t).map((function(t){t[0];var n=t[1];return n.reduce((function(t,n){return n.time>t.time?n:t}),n[0])}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"closedStreams",{get:function(){return JSON.parse(window.localStorage.getItem(t.STORAGE_CLOSED_STREAMS)||"[]")},set:function(n){window.localStorage.setItem(t.STORAGE_CLOSED_STREAMS,JSON.stringify(n))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"closedSliderStreams",{get:function(){return JSON.parse(window.localStorage.getItem(t.STORAGE_CLOSED_STREAM_SLIDERS)||"[]")},set:function(n){window.localStorage.setItem(t.STORAGE_CLOSED_STREAM_SLIDERS,JSON.stringify(n))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileWidth",{get:function(){return window.innerWidth<=this.MAX_MOBILE_WIDTH},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){var t,n;return null!==(n=null===(t=this.stream)||void 0===t?void 0:t.layout)&&void 0!==n?n:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPositionRight",{get:function(){var t;return(null===(t=this.stream)||void 0===t?void 0:t.layout.desktopPosition)===StreamContentDesktopPosition.Right},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollPercent",{get:function(){var t,n,e;if((null===(t=this.currContent)||void 0===t?void 0:t.contentType)===StreamContentType.Pdf){var i=document.querySelector("#viewerContainer");if(i){var o=i.clientHeight,r=i.scrollHeight-o,a=i.scrollTop;return Math.floor(a/r*100)}}if(null===(n=this.currContent)||void 0===n?void 0:n.noTagPage){var c=null===(e=null===document||void 0===document?void 0:document.getElementById("iframe"))||void 0===e?void 0:e.contentWindow;return c.document.body.offsetHeight===c.innerHeight?100*c.scrollY/(c.document.body.scrollHeight-c.document.body.offsetHeight):100*c.scrollY/(c.document.body.offsetHeight-c.innerHeight)}return document.body.offsetHeight===window.innerHeight?100*window.scrollY/(document.body.scrollHeight-document.body.offsetHeight):100*window.scrollY/(document.body.offsetHeight-window.innerHeight)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSlider",{get:function(){var t,n;return[StreamLayoutType.Slider,StreamLayoutType.Mixed].includes(null!==(n=null===(t=this.stream)||void 0===t?void 0:t.layout.layoutType)&&void 0!==n?n:StreamLayoutType.SidePanel)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSidePanel",{get:function(){var t,n;return[StreamLayoutType.SidePanel,StreamLayoutType.Mixed].includes(null!==(n=null===(t=this.stream)||void 0===t?void 0:t.layout.layoutType)&&void 0!==n?n:StreamLayoutType.SidePanel)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"IsSliderVertical",{get:function(){var t;return(null===(t=this.layout.slider)||void 0===t?void 0:t.style)===StreamLayoutSliderStyle.Vertical},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"IsSliderHorizontal",{get:function(){var t;return(null===(t=this.layout.slider)||void 0===t?void 0:t.style)===StreamLayoutSliderStyle.Horizontal},enumerable:!1,configurable:!0}),t.prototype.fixStreamLayout=function(){var t,n;this.stream&&!this.stream.layout.autoLoad?(this.layout.backgroundColor="#ffffff",this.layout.customCss="",this.layout.autoLoad={timerSec:this.DEFAULT_AUTO_LOAD_TIMER_SEC,trigger:StreamLayoutAutoLoadTrigger.Scroll,triggerValue:90,sideArrow:{text:"Scroll down to load the next page",textColor:this.stream.layout.linksColor,arrowColor:"#f53e72"},bottomLoader:{text:"Your next post will load in {timer} seconds.",textColor:"#f53e72",linkColor:this.stream.layout.linksColor,backgroundColor:"#fafcff",cancelButtonText:"Cancel",cancelButtonTextColor:"#272567",cancelButtonBackgroundColor:"#f2f2fa"}},this.layout.stopDisplayButton={showButton:!1,text:"Stop Displaying",textColor:"#7278A2",buttonColor:"#f6f4f4"}):this.stream&&(null!==(t=(n=this.stream.layout).mobileReadNextText)&&void 0!==t||(n.mobileReadNextText="Read next:"),this.stream.layout.layoutType||(this.stream.layout.layoutType=StreamLayoutType.SidePanel))},t.prototype.initStream=function(){var t;this.isAutopilot=(null===(t=this.stream)||void 0===t?void 0:t.streamType)===StreamType.Autopilot,this.fixStreamLayout(),this.getIsMinimized(),this.setCurrAndNextContent(),this.setQueryParamsToAdd(),this.setGlobalContext()},t.prototype.getIsMinimized=function(){var n=localStorage.getItem(t.STORAGE_MINIMIZED_STREAMS);if(n){var e=JSON.parse(n);this.isStartMinimized=Array.isArray(e)&&e.includes(this.streamId)}},t.prototype.setIsMinimized=function(n){var e=localStorage.getItem(t.STORAGE_MINIMIZED_STREAMS),i=null;if(e&&(i=JSON.parse(e),Array.isArray(i)&&this.streamId)){var o=i.indexOf(this.streamId);n?-1===o&&i.push(this.streamId):o>=0&&i.splice(o,1)}i||(i=n&&this.streamId?[this.streamId]:[]),localStorage.setItem(t.STORAGE_MINIMIZED_STREAMS,JSON.stringify(i))},t.prototype.setCurrAndNextContent=function(){var t,n,e,i,o,r,a=this;if(this.stream){this.stream.content.forEach((function(t){t.contentType===StreamContentType.Auto&&(t.imageUrl="".concat(a.context.environment.contentTaskLogoPath,"/autotask_logo/").concat(t.imageUrl))})),this.contentIndex=null!==(t=this.stream.content.findIndex((function(t){return t.id===a.contentId})))&&void 0!==t?t:-1,this.currContent=-1===this.contentIndex?null:this.stream.content[this.contentIndex];var c=-1!==this.contentIndex&&this.contentIndex+1===this.stream.content.length;if(this.nextContent=-1===this.contentIndex||c?null:null!==(e=null===(n=this.stream)||void 0===n?void 0:n.content[this.contentIndex+1])&&void 0!==e?e:null,this.showAutoLoadAlert&&(null!==(i=this.nextContent)&&void 0!==i||(this.nextContent=this.stream.content[0])),this.nextMobileContent=null!==(o=this.nextContent)&&void 0!==o?o:c?null:this.stream.content[0],this.showSlider){var d=-1!==this.contentIndex&&this.stream.content.length>this.contentIndex+1?this.contentIndex+1:-1===this.contentIndex?0:-1;this.sliderContent=-1===d?[]:[this.stream.content[d]],2===(null===(r=this.stream.layout.slider)||void 0===r?void 0:r.numOfRecommendations)&&this.stream.content.length>d+1&&this.sliderContent.push(this.stream.content[d+1]),console.log("setCurrAndNextContent",d,this.sliderContent)}}},t.prototype.setQueryParamsToAdd=function(){if(this.currContent){var t=Array.from(new URLSearchParams(window.location.search)),n=["trd_strm","accountId","ptr","file","url","vid","fromStream","trd_referrer","stage"];this.queryParamsToAdd=t.filter((function(t){return!n.includes(t[0])}));var e=Array.from(new URLSearchParams(new URL(this.currContent.url).search));this.queryParamsToAdd=this.queryParamsToAdd.filter((function(t){var n=e.find((function(n){return n[0]===t[0]}));return!n||n[1]!==t[1]}))}},t.prototype.setGlobalContext=function(){this.isAutopilot?this.context.autopilotId=this.streamId:(this.context.streamId=this.streamId,this.context.streamContentId=this.contentId,this.context.isStreamPreview=this.isPreviewLink,this.context.fromStream=this.fromStream)},t.prototype.addStreamHandlers=function(){var t,n,e,i,o=this,r=document.querySelector(".trd-stream .trd-close"),a=document.querySelector(".trd-stream-closed"),c=document.querySelector(".trd-stream .trd-exclude"),d=document.querySelector(".trd-stream-slider .trd-stream-slider-close"),s=document.querySelector(".trd-scroll-alert-cancel"),l=document.querySelector(".trd-close-btn-cancel");(null==r||r.addEventListener("click",(function(){return o.streamContentToggle()})),null==a||a.addEventListener("click",(function(){return o.streamContentToggle()})),null==c||c.addEventListener("click",(function(){return o.excludeStream()})),null==d||d.addEventListener("click",(function(){return o.excludeStreamSlider()})),null==s||s.addEventListener("click",(function(){return o.cancelRedirect()})),null==l||l.addEventListener("click",(function(){return o.cancelRedirect()})),this.isInbound||this.isAutopilot)&&(Array.from(document.querySelectorAll(".trd-stream .trd-content-item a")).concat(Array.from(document.querySelectorAll(".trd-stream-slider-content-container a"))).forEach((function(t){t.addEventListener("click",(function(t){var n=Number(t.currentTarget.getAttribute("data-content-id"));o.sendUplift($Trd_InternalEventsTypes.CTA_COMPLETE,n)}))})),this.nextMobileContent&&(null===(t=document.querySelector(".trd-stream-mobile a.trd-mobile-content"))||void 0===t||t.addEventListener("click",(function(){var t;o.sendUplift($Trd_InternalEventsTypes.CTA_COMPLETE,null===(t=o.nextMobileContent)||void 0===t?void 0:t.id)}))));if((null===(n=this.currContent)||void 0===n?void 0:n.contentType)===StreamContentType.Pdf){var u=document.querySelector("#viewerContainer");null==u||u.addEventListener("scroll",(function(){return o.handleScroll()}))}else(null===(e=this.currContent)||void 0===e?void 0:e.noTagPage)?null===(i=null===document||void 0===document?void 0:document.getElementById("iframe"))||void 0===i||i.addEventListener("load",(function(t){var n,e=t.target;null===(n=null==e?void 0:e.contentWindow)||void 0===n||n.addEventListener("scroll",(function(){return o.handleScroll()}))})):this.hasVerticalScroll()&&window.addEventListener("scroll",(function(){return o.handleScroll()}));this.layout.isLoadNextOnScroll&&this.layout.autoLoad.trigger===StreamLayoutAutoLoadTrigger.Timer&&!this.isFullView&&this.nextContent&&setTimeout((function(){o.isMobile()||o.alertBeforeGoToTheNextPage()}),1e3*this.layout.autoLoad.triggerValue)},t.prototype.sendUplift=function(t,n){var e,i,o,r=this;if(void 0===n&&(n=null),!(!this.isInbound&&!this.isAutopilot||t===$Trd_InternalEventsTypes.CTA_SHOWN&&this.isUpliftLoadSent)){var a={cta:{Id:null===(e=this.stream)||void 0===e?void 0:e.id,Name:null===(i=this.stream)||void 0===i?void 0:i.name},ctaParams:{},ctaEventPrefix:this.isAutopilot?"AUTOPILOT_IN":"STREAM_IN"};if(n){var c=null===(o=this.stream)||void 0===o?void 0:o.content.find((function(t){return t.id===n}));a.pages=[{cleanPageUrl:"https://"+(null==c?void 0:c.pageStrId)}]}if(this.isAutopilot&&!this.isInbound&&t===$Trd_InternalEventsTypes.CTA_SHOWN)var d=setInterval((function(){r.context.isExperienceListenersAdded&&(document.dispatchEvent(new CustomEvent(t,{detail:a})),clearInterval(d))}),200);else document.dispatchEvent(new CustomEvent(t,{detail:a}));t===$Trd_InternalEventsTypes.CTA_SHOWN&&(this.isUpliftLoadSent=!0)}},t.prototype.handleScroll=function(){this.layout.isLoadNextOnScroll&&this.nextContent&&!this.isRedirected&&this.scrollPercent>2&&this.addNextOnScrollArrow(),this.scrollPercent<70?this.hideMobileContent():this.showMobileContent(),this.layout.isLoadNextOnScroll&&this.layout.autoLoad.trigger===StreamLayoutAutoLoadTrigger.Scroll&&this.scrollPercent>=this.layout.autoLoad.triggerValue&&(this.isFullView||this.isMobile()||!this.nextContent||this.alertBeforeGoToTheNextPage());var t=document.querySelector(".trd-stream .trd-arrow-next-color-overlay");null!==t&&(t.style.height=.95*this.scrollPercent+"%"),this.setMobileProgress()},t.prototype.hasVerticalScroll=function(){return window.innerHeight?document.body.offsetHeight>window.innerHeight||document.body.scrollHeight>document.body.offsetHeight:document.documentElement.scrollHeight>document.documentElement.offsetHeight||document.body.scrollHeight>document.body.offsetHeight},t.prototype.isMobile=function(){var t=document.querySelector(".trd-stream-mobile");return!!t&&"none"!==getComputedStyle(t).display},t.prototype.setMobileProgress=function(t){var n=document.querySelector(".trd-stream-mobile .trd-mobile-scroll-progress");n&&(n.style.width="".concat(null!=t?t:this.scrollPercent,"%"))},t.prototype.showMobileContent=function(){var t=document.querySelector(".trd-stream-mobile:not(.trd-stream-mobile-show)");t&&(t.classList.add("trd-stream-mobile-show"),this.sendUplift($Trd_InternalEventsTypes.CTA_SHOWN))},t.prototype.hideMobileContent=function(){var t=document.querySelector(".trd-stream-mobile.trd-stream-mobile-show");t&&t.classList.remove("trd-stream-mobile-show")},t.prototype.streamContentToggle=function(){var t=document.querySelector(".trd-stream"),n=document.querySelector(".trd-stream-closed");t&&n&&(t.classList.toggle("trd-max"),n.classList.toggle("trd-max")),this.setIsMinimized(!(null==t?void 0:t.classList.contains("trd-max")))},t.prototype.excludeStream=function(){var t=this;if(this.streamId){var n=this.closedStreams;(n=n.filter((function(n){return n.id!==t.streamId}))).push({id:this.streamId,time:(new Date).getTime()}),this.closedStreams=n}this.hideStream()},t.prototype.excludeStreamSlider=function(){var t=this;if(this.streamId){var n=this.closedSliderStreams;(n=n.filter((function(n){return n.id!==t.streamId}))).push({id:this.streamId,time:(new Date).getTime()}),this.closedSliderStreams=n}this.hideSlider()},t.prototype.addNextOnScrollArrow=function(){var t=document.querySelector(".trd-stream .trd-arrow-next:not(.trd-arrow-next-show)");t&&(t.style.display="block",setTimeout((function(){return t.classList.add("trd-arrow-next-show")}),0))},t.prototype.alertBeforeGoToTheNextPage=function(){var t,n,e,i=this;this.isRedirected||this.isRedirecCanceled||(null===(t=document.querySelector(".trd-scroll-alert"))||void 0===t||t.classList.add("trd-scroll-alert-show"),this.startTimer(),this.isRedirected=!0,setTimeout((function(){if(!i.isRedirecCanceled&&i.nextContent){i.sendUplift($Trd_InternalEventsTypes.CTA_COMPLETE,i.nextContent.id);var t=document.querySelector(".trd-scroll-alert .trd-scroll-alert-post a");null==t||t.click()}}),1e3*((null!==(e=null===(n=this.stream)||void 0===n?void 0:n.layout.autoLoad.timerSec)&&void 0!==e?e:this.DEFAULT_AUTO_LOAD_TIMER_SEC)+1)))},t.prototype.startTimer=function(){var t,n,e=null!==(n=null===(t=this.stream)||void 0===t?void 0:t.layout.autoLoad.timerSec)&&void 0!==n?n:this.DEFAULT_AUTO_LOAD_TIMER_SEC,i=setInterval((function(){var t=document.getElementById("trd-redirect-timer");t&&(t.innerHTML=e.toString()),--e<0&&clearInterval(i)}),1e3)},t.prototype.cancelRedirect=function(){var t;this.isRedirecCanceled=!0,null===(t=document.querySelector(".trd-scroll-alert"))||void 0===t||t.classList.remove("trd-scroll-alert-show");var n=document.querySelector(".trd-stream .trd-arrow-next");null==n||n.addEventListener("transitionend",(function(){return n.style.display="none"}),{once:!0}),null==n||n.classList.remove("trd-arrow-next-show")},t.prototype.getContentUrl=function(t){var n,e,i;if(!this.stream)return t.url;if(this.isPreview)return"#";var o=__assign({si:this.stream.id,ci:t.id,p:this.isPreviewLink},this.itemId?[this.itemId]:[]),r="trd_strm="+LZString.compressToEncodedURIComponent(JSON.stringify(o)),a="https://"+(null!==(e=null===(n=this.context.accountSettings)||void 0===n?void 0:n.contentFetchDomain)&&void 0!==e?e:this.context.environment.contentFetchDomain),c=null!==(i=window.$TRD_OVERRIDE_REFERRER)&&void 0!==i?i:window.location.href,d=c?$Trd_Utils.cleanUrlQueryParams(c,["trd_referrer","trd_strm","fromStream"]):null,s=d?"trd_referrer=".concat(encodeURIComponent(d)):"",l=t.url;if(this.queryParamsToAdd.length>0){var u=Array.from(new URL(l).searchParams);this.queryParamsToAdd.forEach((function(t){var n=u.find((function(n){return n[0]===t[0]}));n?n[1]=t[1]:u.push(t)})),l=l.split("?")[0],l+="?"+u.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")}var h=encodeURIComponent(l);switch(t.contentType){case StreamContentType.Url:case StreamContentType.Auto:if(t.noTagPage){var m="".concat(a,"/serve/html?url=").concat(h),p=__spreadArray(__spreadArray(__spreadArray(__spreadArray(["accountId=".concat(this.context.accountId),"vid=".concat(this.context.visitorId)],this.queryParamsToAdd.map((function(t){return"".concat(t[0],"=").concat(t[1])})),!0),["file=".concat(encodeURIComponent(m)),"fromStream=true",r],!1),s?[s]:[],!0),this.context.environment.isStage?["stage=true"]:[],!0);return"".concat(a,"/container.html?").concat(p.join("&"))}var _=l.includes("?")?"&":"?",g=__spreadArray(["fromStream=true",r],s?[s]:[],!0);return"".concat(l).concat(_).concat(g.join("&"));case StreamContentType.Pdf:var f=new URL(l).origin===this.context.environment.contentTaskLogoPath?l:"".concat(a,"/serve?url=").concat(h),v=__spreadArray(__spreadArray(__spreadArray(__spreadArray(["accountId=".concat(this.context.accountId),"vid=".concat(this.context.visitorId)],this.queryParamsToAdd.map((function(t){return"".concat(t[0],"=").concat(t[1])})),!0),["ptr=".concat(h),"file=".concat(encodeURIComponent(f)),"fromStream=true",r],!1),s?[s]:[],!0),this.context.environment.isStage?["stage=true"]:[],!0);return"".concat(a,"/viewern.html?").concat(v.join("&"));default:return l}},t.prototype.getStreamContentHtml=function(t){var n,e,i=this,o=t.content.findIndex((function(n){return n.id===t.contentId})),r='\n      <div class="trd-arrow-next">\n        <p>'.concat(t.layout.autoLoad.sideArrow.text,'</p>\n        <div class="trd-arrow-next-image-container">\n          <div class="trd-arrow-next-color-overlay"></div>\n          <svg width="50" height="27" viewBox="0 0 50 27" xmlns="http://www.w3.org/2000/svg">\n            <path fill-rule="evenodd" clip-rule="evenodd" d="M0 3.60688C0.000236246 2.38167 0.65737 1.18626 1.84595 0.543719C2.51755 0.180564 3.00559 0.000196372 3.49463 0L0 0V3.60688ZM0 3.6082V27H50V4.68456C49.9521 5.40501 49.7589 6.15299 49.5341 6.44113C49.2784 6.76893 44.0165 11.0897 37.8406 16.0432C27.7261 24.1558 26.4719 25.0495 25.2013 25.0495C24.3261 25.0495 23.3723 24.7277 22.6895 24.2022C18.7956 21.2056 1.13222 6.30233 0.632979 5.59196C0.203907 4.98171 0.000131537 4.29037 0 3.6082ZM50 4.07887V0L3.49623 0C3.96633 0.000188769 4.43754 0.166866 5.0738 0.497707C5.64746 0.795848 10.323 4.55949 15.4643 8.86162C20.6051 13.1634 24.9093 16.6833 25.0288 16.6833C25.1482 16.6833 27.4288 14.9184 30.0963 12.761C44.6833 0.966592 45.0295 0.711424 46.4444 0.711424C48.2731 0.711424 49.8519 2.23986 50 4.07887Z" />\n          </svg>\n        </div>\n      </div>'),a=t.content.map((function(n,e){return'\n      <div class="trd-content-item '.concat(n.id===t.contentId?"trd-content-active":"",'">\n        <a href="').concat(i.getContentUrl(n),'" data-content-id="').concat(n.id,'">\n          <div class="trd-content-arrow-wrapper">\n            <div class="trd-content-arrow"></div>\n          </div>\n          <div class="trd-item-img-wrap"> <img src="').concat(n.imageUrl,'" alt="" /> </div>\n          <div class="trd-content-text"> ').concat(n.title," </div>\n        </a>\n      </div>\n      ").concat(i.layout.isLoadNextOnScroll&&o===e?r:"","\n    ")}));return'\n      <div class="trd-close"> '.concat(this.isPositionRight?">":"<"," </div>\n      ").concat(t.layout.showLogo&&t.layout.logoUrl?'<img class="trd-logo" src="'.concat(t.layout.logoUrl,'" alt=""/>'):'<div style="height: 20px"></div>',"\n      ").concat(t.layout.title?'<div class="trd-stream-title">'.concat(t.layout.title,"</div>"):"",'\n      <div class="trd-stream-in">\n        ').concat(a.join(""),"\n      </div>\n      ").concat(this.isInbound||(null===(n=this.stream)||void 0===n?void 0:n.layout.stopDisplayButton.showButton)?'\n        <div class="trd-exclude-wrap">\n          <button class="trd-exclude">'.concat(null===(e=this.stream)||void 0===e?void 0:e.layout.stopDisplayButton.text,"</button>\n        </div>"):"","\n    ")},t.prototype.getStreamSliderHtml=function(t){var n=this,e=t.layout.slider;if(e&&this.sliderContent){var i='<div class="trd-stream-slider-title">'.concat(e.title,"</div>"),o=this.getSliderStyleClass(e.style),r=this.getSliderThumbnailTypeClass(e.style,t.layout.desktopThumbnailType),a=this.IsSliderVertical&&this.sliderContent.length>1?"trd-stream-slider-shadow":"",c=this.sliderContent.map((function(t){var i;return'\n          <a href="'.concat(n.getContentUrl(t),'" data-content-id="').concat(t.id,'">\n            <div class="trd-stream-slider-content ').concat(o," ").concat(a,'">\n              <img class="trd-stream-slider-content-img" src="').concat(t.imageUrl,'" alt="" />\n              <div class="trd-stream-slider-content-text-container">\n                <div class="trd-stream-slider-content-text"> ').concat(t.title," </div>\n              </div>\n              ").concat((null===(i=e.button)||void 0===i?void 0:i.showSliderButton)?'<div class="trd-stream-slider-button-container">\n                  <div class="trd-stream-slider-button">'.concat(e.button.text,"</div>\n                </div>"):"","\n            </div>\n          </a>")})),d=["trd-stream-slider-content-container",o];return this.IsSliderVertical&&this.sliderContent.length>1||d.push("trd-stream-slider-shadow"),r&&d.push(r),e.numOfRecommendations>1&&d.push("trd-stream-slider-multiple"),i+'<div class="trd-stream-slider-close">\n        <svg fill="#000000" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" \n          viewBox="0 0 460.775 460.775" xml:space="preserve">\n          <path d="M285.08,230.397L456.218,59.27c6.076-6.077,6.076-15.911,0-21.986L423.511,4.565c-2.913-2.911-6.866-4.55-10.992-4.55\n            c-4.127,0-8.08,1.639-10.993,4.55l-171.138,171.14L59.25,4.565c-2.913-2.911-6.866-4.55-10.993-4.55\n            c-4.126,0-8.08,1.639-10.992,4.55L4.558,37.284c-6.077,6.075-6.077,15.909,0,21.986l171.138,171.128L4.575,401.505\n            c-6.074,6.077-6.074,15.911,0,21.986l32.709,32.719c2.911,2.911,6.865,4.55,10.992,4.55c4.127,0,8.08-1.639,10.994-4.55\n            l171.117-171.12l171.118,171.12c2.913,2.911,6.866,4.55,10.993,4.55c4.128,0,8.081-1.639,10.992-4.55l32.709-32.719\n            c6.074-6.075,6.074-15.909,0-21.986L285.08,230.397z"/>\n        </svg>\n      </div>'+'<div class="'.concat(d.join(" "),'">').concat(c.join(""),"</div>")}return""},t.prototype.getStreamMobileContentHtml=function(){var t;return this.nextMobileContent?'\n      <div class="trd-mobile-scroll-progress-wrapper">\n        <div class="trd-mobile-scroll-progress"></div>\n      </div>\n      <a class="trd-mobile-content" href="'.concat(this.getContentUrl(this.nextMobileContent),'">\n        <img src="').concat(this.nextMobileContent.imageUrl,'" alt="">\n        <div class="trd-mobile-title-container">\n          <div class="trd-mobile-read-next">').concat(null===(t=this.stream)||void 0===t?void 0:t.layout.mobileReadNextText,'</div>\n          <div class="trd-content-title">').concat(this.nextMobileContent.title,"</div>\n        </div>\n      </a>\n    "):""},t.prototype.getRedirectAlertHtml=function(){var t,n,e,i;if(!this.nextContent)return"";var o=this.getContentUrl(this.nextContent),r=null===(t=this.stream)||void 0===t?void 0:t.layout.autoLoad.bottomLoader.text.replace("{timer}",'<span id="trd-redirect-timer">'.concat(null===(n=this.stream)||void 0===n?void 0:n.layout.autoLoad.timerSec,"</span>"));return'\n      <div class="trd-close-btn-cancel"><img src="https://pic.trendemon.com/images/closex.png" width="17" height="17" alt="close survey"></div>\n      <div class="trd-content-link-text">\n        <p class="trd-scroll-alert-title">'.concat(r,'</p>\n        <p class="trd-scroll-alert-post"><a href="').concat(o,'">').concat(this.nextContent.title,'</a></p>\n        <button class="trd-scroll-alert-cancel">').concat(null!==(i=null===(e=this.stream)||void 0===e?void 0:e.layout.autoLoad.bottomLoader.cancelButtonText)&&void 0!==i?i:"Cancel",'</button>\n      </div>\n      <div class="trd-item-img-wrap">\n        <a href="').concat(o,'">\n          <img class="item-img" src="').concat(this.nextContent.imageUrl,'" alt="" />\n        </a>\n      </div>\n    ')},t.prototype.getSliderPositionClass=function(t){switch(t){case StreamLayoutSliderPosition.BottomLeft:return"trd-stream-slider-position-b-l";case StreamLayoutSliderPosition.BottomRight:return"trd-stream-slider-position-b-r";case StreamLayoutSliderPosition.MiddleLeft:return"trd-stream-slider-position-m-l";case StreamLayoutSliderPosition.MiddleRight:return"trd-stream-slider-position-m-r";default:return""}},t.prototype.getSliderStyleClass=function(t){return t===StreamLayoutSliderStyle.Horizontal?"trd-stream-slider-horiz":"trd-stream-slider-vert"},t.prototype.getSliderThumbnailTypeClass=function(t,n){return t===StreamLayoutSliderStyle.Horizontal&&n===StreamContentThumbnailType.RoundImage?"trd-stream-slider-rounded":""},t.prototype.getStreamCss=function(t){var n,e,i,o,r,a,c,d,s,l,u,h,m,p,_,g;return"\n      .trd-stream.trd-max, .trd-stream-closed.trd-max, .trd-stream-mobile, .trd-scroll-alert{\n        z-index: 2147483647;\n      }\n\n      .trd-comp-container.light, .trd-comp-containe.full{\n        z-index: 2147483646 !important;\n      }\n\n      .trd-stream {\n        position: fixed;\n        z-index: 9999999;\n        left: -1000px;\n        top: 50%;\n        transform:translate(0,-50%);\n        background: ".concat(t.layout.backgroundColor,";\n        box-shadow: 0 2px 7px #00000026;\n        width: 320px;\n        padding: 10px 0px 10px 20px;\n        font-family: sans-serif;\n        transition: all 1s ease;\n        border-radius: 0 9px 9px 0;\n        text-align: left;\n      }\n\n      .trd-stream .trd-arrow-next-image-container svg path{\n        fill: ").concat(t.layout.backgroundColor,";\n      }\n\n      .trd-stream.trd-stream-right {\n        border-radius: 9px 0 0 9px;\n      }\n\n      .trd-stream p, .trd-scroll-alert p{\n        margin: 0;\n      }\n\n      .trd-stream.trd-max {\n        left: 0;\n      }\n\n      .trd-stream.trd-stream-right {\n        left: unset;\n        right: -1000px;\n      }\n\n      .trd-stream.trd-stream-right.trd-max {\n        right: 0;\n      }\n\n      .trd-stream,\n      .trd-stream a {\n        color: #585859 !important;\n        text-decoration: none;\n      }\n\n      .trd-stream .trd-close {\n        width: 30px;\n        height: 30px;\n        position: absolute;\n        cursor: pointer;\n        top: 0;\n        right: 0;\n        line-height: 30px;\n        color: ").concat(t.layout.buttonTextColor,";\n        background: ").concat(t.layout.buttonColor,";\n        font-size: 14px;\n        font-weight: bold;\n        text-align: center;\n        border-radius: 0 9px 0 0;\n      }\n\n      .trd-stream.trd-stream-right .trd-close {\n        right: unset;\n        left: 0;\n        border-radius: 9px 0 0 0;\n      }\n\n      .trd-stream .trd-logo {\n        max-width: 50%\n      }\n\n      .trd-stream.trd-stream-right .trd-logo {\n        margin-left: 30px;\n      }\n\n      .trd-stream .trd-stream-title {\n        font-size: 18px;\n        font-weight: bold;\n        color: ").concat(null!==(n=t.layout.titleColor)&&void 0!==n?n:"#585859","\n      }\n\n      .trd-stream.trd-stream-right .trd-stream-title {\n        margin-top: 10px;\n      }\n\n      .trd-stream-in {\n        max-height: 65vh;\n        overflow-y: auto;\n      }\n\n      .trd-stream .trd-content-item {\n        margin-top: 15px\n      }\n      .trd-stream .trd-content-item.trd-content-active {\n        font-weight: bold;\n      }\n\n      .trd-stream .trd-content-item a {\n        display: flex;\n        flex-direction: row;\n        box-sizing: content-box;\n        white-space: unset;\n        align-items: center;\n        font-size: 16px\n      }\n\n      .trd-stream .trd-content-item .trd-content-text {\n        margin: 10px;\n        line-height: 1.4;\n        letter-spacing: unset;\n        font-family: sans-serif;\n      }\n\n      .trd-stream .trd-item-img-wrap {\n        flex-grow: 3;\n        padding: 0 !important;\n        position: relative;\n        max-width: 55px;\n        min-width: 55px;\n        border-radius: 9px;\n        ").concat(t.layout.desktopThumbnailType===StreamContentThumbnailType.None?"display: none;":"",'\n      }\n\n      .trd-stream .trd-item-img-wrap::after {\n        content: "";\n        display: block;\n        padding-bottom: 100%\n      }\n\n      .trd-stream .trd-item-img-wrap img {\n        position: absolute;\n        width: 100%;\n        height: 100%;\n        object-fit: cover;\n        ').concat(t.layout.desktopThumbnailType===StreamContentThumbnailType.RoundImage?"border-radius: 50%;":"","\n        ").concat(t.layout.desktopThumbnailType===StreamContentThumbnailType.RoundedCorners?"border-radius: 9px;":"","\n      }\n\n      .trd-stream .trd-content-arrow-wrapper {\n        display: none;\n        min-width: 10px;\n      }\n\n      .trd-stream .trd-content-arrow {\n        width: 0;\n        height: 0;\n        border-top: 10px solid transparent;\n        border-bottom: 10px solid transparent;\n      }\n\n      .trd-stream .trd-content-active .trd-content-arrow {\n        border-left: 10px solid ").concat(t.layout.buttonColor,";\n      }\n\n      .trd-stream .trd-content-text {\n        color: ").concat(t.layout.linksColor,";\n      }\n\n      .trd-stream .trd-arrow-next p {\n        color: ").concat(t.layout.autoLoad.sideArrow.textColor,";\n      }\n\n      .trd-stream .trd-arrow-next p {\n        font-size: 14px;\n        line-height: 1.2;\n        text-align: center;\n        font-weight: bold\n      }\n\n      .trd-stream .trd-arrow-next {\n        position: relative;\n        display: none;\n        opacity: 0;\n        transition: 1s ease;\n        height: 0;\n        margin: 0 50px 0 90px;\n      }\n\n      .trd-stream .trd-arrow-next.trd-arrow-next-show {\n        opacity: 1;\n        height: 60px;\n      }\n\n      .trd-stream .trd-arrow-next-image-container {\n        overflow: visible;\n        background: #e2e2e2;\n        margin: 0 auto;\n        position: absolute;\n        right: calc(50% - 25px);\n        margin-top: 10px;\n        height: 26px;\n      }\n\n      .trd-stream .trd-arrow-next-image-container img,\n      .trd-stream .trd-arrow-next-image-container svg{\n        position: relative;\n        display: block;\n        margin: 0 auto;\n        height: 28px;\n        top:-1px;\n      }\n\n      .trd-stream .trd-arrow-next-color-overlay {\n        position: absolute;\n        top: 0;\n        left: 0;\n        width: 100%;\n        height: 0%;\n        background-color: ").concat(t.layout.autoLoad.sideArrow.arrowColor,";\n        transition: opacity .3s ease-in-out\n      }\n\n      .trd-stream .trd-exclude-wrap {\n        padding: 0 0 0 65px;\n        margin: 10px 0;\n      }\n\n      .trd-stream .trd-exclude {\n        border-radius: 20px;\n        background-color: ").concat(t.layout.stopDisplayButton.buttonColor,";\n        border: none;\n        color: ").concat(t.layout.stopDisplayButton.textColor,";\n        font-size: 12px;\n        padding: 5px 30px;\n        cursor: pointer;\n      }\n\n      .trd-stream-closed {\n        line-height: 20px;\n        width: fit-content;\n        padding: 7px 12px;\n        font-family: sans-serif;\n        font-size: 16px;\n        background: ").concat(t.layout.buttonColor,";\n        color: ").concat(t.layout.buttonTextColor,";\n        transform-origin: bottom left;\n        top: auto;\n        left: 0;\n        bottom: 50%;\n        transform: rotate(90deg) translateX(-50%);\n        position: fixed;\n        z-index: -1;\n        opacity: 0;\n        transition: 100ms;\n        border-radius: 9px 9px 0 0;\n      }\n\n      .trd-stream-closed.trd-max {\n        opacity: 1;\n        z-index: 2147483647;\n        cursor: pointer;\n      }\n\n      .trd-stream-closed.trd-stream-right {\n        right: 0;\n        left: unset;\n        transform-origin: top right;\n        transform: rotate(90deg) translateX(50%);\n        border-radius: 0 0 9px 9px;\n      }\n\n      .trd-stream-slider {\n        z-index: 2147483647;\n        position: fixed;\n      }\n\n      .trd-stream-slider.trd-stream-slider-position-b-r,\n      .trd-stream-slider.trd-stream-slider-position-m-r {\n        right: -1000px;\n        transition: right 0.5s;\n      }\n\n      .trd-stream-slider.trd-stream-slider-position-b-l,\n      .trd-stream-slider.trd-stream-slider-position-m-l {\n        left: -1000px;\n        transition: left 0.5s;\n      }\n\n      .trd-stream-slider.trd-stream-slider-position-b-r,\n      .trd-stream-slider.trd-stream-slider-position-b-l {\n        bottom: 15px;\n      }\n\n      .trd-stream-slider.trd-stream-slider-position-m-r,\n      .trd-stream-slider.trd-stream-slider-position-m-l {\n        top: 50%;\n        transform: translateY(-50%);\n      }\n\n      .trd-stream-slider.trd-stream-slider-position-b-r.trd-stream-slider-show,\n      .trd-stream-slider.trd-stream-slider-position-m-r.trd-stream-slider-show {\n        right: 5px;\n      }\n\n      .trd-stream-slider.trd-stream-slider-position-b-l.trd-stream-slider-show,\n      .trd-stream-slider.trd-stream-slider-position-m-l.trd-stream-slider-show {\n        left: 5px;\n      }\n\n      .trd-stream-slider-title {\n        font-size: 12px;\n        color: #4c519a;\n        line-height: 150%;\n        height: 18px;\n      }\n\n      .trd-stream-slider-close {\n        box-sizing: content-box;\n        position: absolute;\n        right: 4px;\n        top: 23px;\n        background-color: #d9d9d9;\n        color: #47456b;\n        border-radius: 10px;\n        width: 8px;\n        height: 8px;\n        padding: 3px;\n        cursor: pointer;\n        transition: 300ms;\n      }\n\n      .trd-stream-slider-close:hover {\n        background-color: #c5c5c5;\n      }\n\n      .trd-stream-slider-close svg {\n        display: block;\n        margin-left: -0.5px;\n      }\n\n      .trd-stream-slider-shadow {\n        box-shadow: 0px 4px 4px 0px #00000040;\n        border-radius: 5px;\n        overflow: hidden;\n      }\n\n      .trd-stream-slider-content-container a {\n        text-decoration: none;\n      }\n\n      .trd-stream-slider-content-container.trd-stream-slider-rounded {\n        border-radius: 35px 0 0 35px;\n      }\n\n      .trd-stream-slider-content {\n        height: ").concat(this.IsSliderHorizontal?"65px":(null===(i=null===(e=t.layout.slider)||void 0===e?void 0:e.button)||void 0===i?void 0:i.showSliderButton)?"180px":"150px",";\n        width: ").concat(this.IsSliderHorizontal?"250px":"150px",";\n        background-color: ").concat(null===(o=t.layout.slider)||void 0===o?void 0:o.backgroundColor,";\n      }\n\n      .trd-stream-slider-content-img {\n        height: ").concat(this.IsSliderHorizontal?"65px":"70px",";\n        width: ").concat(this.IsSliderHorizontal?"65px":"100%",";\n        object-fit: cover;\n      }\n\n      .trd-stream-slider-content-container.trd-stream-slider-rounded .trd-stream-slider-content-img {\n        border-radius: 35px;\n      }\n\n      .trd-stream-slider-content-container.trd-stream-slider-multiple.trd-stream-slider-rounded .trd-stream-slider-horiz .trd-stream-slider-content-img {\n        border-radius: 35px;\n        margin: 7px;\n        height: 52px;\n        width: 52px;\n      }\n\n      .trd-stream-slider-content-container.trd-stream-slider-multiple > a:not(:first-of-type) {\n        display: block;\n        border-top: 1px solid #f1f2ff;\n      }\n\n      .trd-stream-slider-content-text {\n        padding: 10px 10px 0;\n        color: ").concat(null!==(a=null===(r=t.layout.slider)||void 0===r?void 0:r.textColor)&&void 0!==a?a:"#ffffff",";\n        font-size: ").concat(null!==(d=null===(c=t.layout.slider)||void 0===c?void 0:c.textSize)&&void 0!==d?d:"12","px;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        display: -webkit-box;\n        -webkit-line-clamp: 3;\n        line-clamp: 3;\n        -webkit-box-orient: vertical;\n        line-height: normal;\n      }\n\n      .trd-stream-slider-button-container {\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        padding-bottom: 10px;\n      }\n\n      .trd-stream-slider-button {\n        display: inline-block;\n        color: ").concat(null!==(l=null===(s=t.layout.slider)||void 0===s?void 0:s.button.textColor)&&void 0!==l?l:"#ffffff",";\n        background-color: ").concat(null!==(h=null===(u=t.layout.slider)||void 0===u?void 0:u.button.backgroundColor)&&void 0!==h?h:"#293c69",";\n        font-size: ").concat(null!==(p=null===(m=t.layout.slider)||void 0===m?void 0:m.button.textSize)&&void 0!==p?p:"12","px;\n        border-radius: ").concat(null!==(g=null===(_=t.layout.slider)||void 0===_?void 0:_.button.cornerRadius)&&void 0!==g?g:"16","px;\n        padding: 5px 15px;\n        line-height: normal;\n      }\n\n      .trd-stream-slider-content.trd-stream-slider-vert {\n        display: flex;\n        flex-direction: column;        \n      }\n\n      .trd-stream-slider-content-container.trd-stream-slider-multiple.trd-stream-slider-vert {\n        display: flex;\n        column-gap: 10px;\n      }\n\n      .trd-stream-slider-content.trd-stream-slider-vert .trd-stream-slider-content-text-container {\n        flex: 1;\n      }\n\n      .trd-stream-slider-content-container.trd-stream-slider-multiple .trd-stream-slider-horiz .trd-stream-slider-content-img {\n        border-radius: 5px;\n        margin: 5px;\n        height: 55px;\n        width: 55px;\n      }\n\n      .trd-stream-slider-content.trd-stream-slider-horiz {\n        display: grid;\n        grid-template-columns: auto 1fr;\n      }\n\n      .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-content-img {\n        grid-column: 1;\n        grid-row: 1 / span 2;\n      }\n      .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-content-text-container {\n        grid-column: 2;\n        grid-row: 1;\n      }\n      .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-button-container {\n        grid-column: 2;\n        grid-row: 2;\n        justify-content: flex-start;\n        padding: 0 0 5px 10px;\n      }\n      .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-content-text {\n        -webkit-line-clamp: 1;\n        line-clamp: 1;\n      }\n\n      .trd-stream-slider-position-b-l .trd-stream-slider-content-container.trd-stream-slider-rounded,\n      .trd-stream-slider-position-m-l .trd-stream-slider-content-container.trd-stream-slider-rounded {\n        border-radius: 0 35px 35px 0;\n      }\n      .trd-stream-slider-position-b-l.trd-stream-slider-horiz .trd-stream-slider-close,\n      .trd-stream-slider-position-m-l.trd-stream-slider-horiz .trd-stream-slider-close {\n        right: 4px;\n        top: 2px\n      }\n      .trd-stream-slider-position-b-l.trd-stream-slider-horiz.trd-stream-slider-rounded .trd-stream-slider-close,\n      .trd-stream-slider-position-m-l.trd-stream-slider-horiz.trd-stream-slider-rounded .trd-stream-slider-close {\n        right: -2px;\n        top: 12px\n      }\n      .trd-stream-slider-position-b-l .trd-stream-slider-content.trd-stream-slider-horiz,\n      .trd-stream-slider-position-m-l .trd-stream-slider-content.trd-stream-slider-horiz {\n        grid-template-columns: 1fr auto;\n      }\n      .trd-stream-slider-position-b-l .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-content-img,\n      .trd-stream-slider-position-m-l .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-content-img {\n        grid-column: 2;\n      }\n      .trd-stream-slider-position-b-l .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-content-text-container,\n      .trd-stream-slider-position-m-l .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-content-text-container {\n        grid-column: 1;\n      }\n      .trd-stream-slider-position-b-l .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-button-container,\n      .trd-stream-slider-position-m-l .trd-stream-slider-content.trd-stream-slider-horiz .trd-stream-slider-button-container {\n        grid-column: 1;\n      }\n\n      .trd-stream-mobile {\n        position: fixed;\n        left: 0;\n        right: 0;\n        bottom: -500px;\n        background-color: ").concat(t.layout.backgroundColor,";\n        font-family: sans-serif;\n        transition: 1s ease-out;\n      }\n\n      .trd-stream-mobile.trd-stream-mobile-show {\n        bottom: 0;\n      }\n\n      .trd-stream-mobile .trd-mobile-scroll-progress {\n        height: 4px;\n        background-color: ").concat(t.layout.buttonColor,";\n      }\n\n      .trd-stream-mobile .trd-mobile-content {\n        display: flex;\n        padding: 10px;\n        gap: 15px;\n        text-decoration: none;\n      }\n\n      .trd-stream-mobile img {\n        width: 80px;\n        height: 80px;\n        object-fit: cover;\n        ").concat(t.layout.mobileThumbnailType===StreamContentThumbnailType.None?"display: none;":"","\n        ").concat(t.layout.mobileThumbnailType===StreamContentThumbnailType.RoundImage?"border-radius: 50%;":"","\n        ").concat(t.layout.mobileThumbnailType===StreamContentThumbnailType.RoundedCorners?"border-radius: 9px;":"","\n      }\n\n      .trd-stream-mobile .trd-mobile-title-container {\n        flex: 1;\n      }\n\n      .trd-stream-mobile .trd-mobile-read-next {\n        font-size: 14px;\n        font-weight: normal;\n        margin-bottom: 12px;\n        color: ").concat(t.layout.linksColor,";\n      }\n\n      .trd-stream-mobile .trd-content-title {\n        font-size: 16px;\n        font-weight: bold;\n        color: ").concat(t.layout.linksColor,";\n      }\n\n      .trd-scroll-alert {\n        width: 500px;\n        position: fixed;\n        left: 50%;\n        transform: translate(-50%, 0);\n        background: ").concat(t.layout.autoLoad.bottomLoader.backgroundColor,";\n        border-radius: 9px;\n        padding: 15px;\n        font-family: sans-serif;\n        transition: all 1s ease;\n        bottom: -300px;\n        display: flex;\n        box-shadow: 0 2px 7px #00000026;\n        justify-content: space-between;\n        line-height: 1.4;\n        box-sizing: content-box;\n      }\n\n      .trd-scroll-alert.trd-scroll-alert-show {\n        bottom: 30px;\n      }\n\n      .trd-scroll-alert .trd-item-img-wrap {\n        max-width: 160px;\n        min-width: 160px;\n        margin-left: 20px;\n        padding-top:7px;\n\n      }\n\n      .trd-scroll-alert .trd-item-img-wrap img {\n        width: 100%;\n        height: 100%;\n        object-fit: cover;\n        border-radius: 9px;\n        min-height: 130px;\n      }\n\n      .trd-scroll-alert .trd-scroll-alert-title {\n        font-size: 16px;\n        color: ").concat(t.layout.autoLoad.bottomLoader.textColor,";\n      }\n\n      .trd-scroll-alert .trd-scroll-alert-post a {\n        font-size: 16px;\n      }\n\n      .trd-close-btn-cancel{\n        cursor: pointer;\n        width: 17px;\n        height: 17px;\n        position: absolute;\n        right: 3px;\n        top: 3px;\n        margin:0;\n        padding:0;\n        line-height:1;\n      }\n\n      .trd-scroll-alert-cancel {\n        padding: 7px 40px;\n        background-color: ").concat(t.layout.autoLoad.bottomLoader.cancelButtonBackgroundColor,";\n        border-radius: 20px;\n        border: none;\n        color: ").concat(t.layout.autoLoad.bottomLoader.cancelButtonTextColor,";\n        cursor: pointer;\n        font-size: 14px;\n        position: absolute;\n        bottom: 15px;\n        left:110px;\n      }\n\n      .trd-scroll-alert p {\n        margin-bottom: 15px;\n        font-weight: bold;\n        line-height: 1.4\n      }\n\n      .trd-scroll-alert p a {\n        color: ").concat(t.layout.autoLoad.bottomLoader.linkColor,";\n        text-decoration: none;\n        white-space: normal;\n      }\n\n      ").concat(this.isFullView?"\n      .trd-stream-mobile {\n        display: none;\n      }":"\n      @media only screen and (max-width: 1280px) {\n        .trd-stream {\n          width: 210px;\n          padding-left: 0;\n        }\n\n        .trd-stream .trd-logo {\n          margin-left: 20px;\n        }\n\n        .trd-stream.trd-stream-right .trd-logo {\n          margin-left: 50px;\n        }\n\n        .trd-stream .trd-stream-title {\n          margin-left: 20px;\n        }\n\n        .trd-stream .trd-content-item {\n          margin-top: 0px\n        }\n\n        .trd-stream .trd-item-img-wrap {\n          display: none;\n        }\n\n        .trd-stream .trd-content-arrow-wrapper {\n          display: block;\n        }\n\n        .trd-stream .trd-content-text {\n          overflow: hidden;\n          text-overflow: ellipsis;\n          display: -webkit-box;\n          -webkit-line-clamp: 3;\n          line-clamp: 3;\n          -webkit-box-orient: vertical;\n          font-size: 14px;\n        }\n\n        .trd-stream .trd-exclude-wrap {\n          padding-left: 20px;\n        }\n\n        .trd-stream .trd-arrow-next {\n          margin: 0 15px 0 25px;\n        }\n      }\n\n      @media only screen and (max-width: 850px) {\n        .trd-stream,\n        .trd-stream-closed,\n        .trd-stream-slider {\n          display: none;\n        }\n      }\n\n      @media only screen and (min-width: 851px) {\n        .trd-stream-mobile {\n          display: none;\n        }\n      }","\n\n      ").concat(t.layout.customCss,"\n    ")},t.STORAGE_MINIMIZED_STREAMS="trd_streams_minimized",t.STORAGE_CLOSED_STREAMS="trd_streams_closed",t.STORAGE_CLOSED_STREAM_SLIDERS="trd_streams_sliders_closed",t}(),$TRD_SurveyLayoutComponent=function(t){function n(n,e,i,o){var r=t.call(this,n,e,i,o)||this;return r.answers=[],r.submitted=!1,r}return __extends(n,t),n.prototype.initialize=function(n){var e=this;(t.prototype.initialize.call(this,n),this.cta.RenderMode===enRenderModes.SHOW)&&this.componentContainerElem.querySelectorAll(".trd-answer").forEach((function(t){return t.addEventListener("click",(function(t){var n,i=t.target,o=Number(i.getAttribute("trd-q-id")),r=Number(i.getAttribute("trd-q-idx")),a=Number(i.getAttribute("trd-answer-idx"));e.answers.push({q:o,a:a});var c=i.closest(".trd-question");null==c||c.classList.add("trd-q-done"),r===e.model.surveyQuestions.length?(null===(n=e.componentContainerElem.querySelector(".trd-survey-done"))||void 0===n||n.classList.add("trd-survey-success"),e.notify($Trd_InternalEventsTypes.CTA_COMPLETE),e.submit(),setTimeout((function(){return e.close()}),3e3)):(null==c?void 0:c.nextSibling).classList.add("trd-q-show")}))}))},n.prototype.submit=function(){var t,n,e;if(!this.submitted){this.submitted=!0;var i={accountId:this.context.accountId,url:btoa(null!==(n=null===(t=this.context.pageDetails)||void 0===t?void 0:t.url)&&void 0!==n?n:""),unitId:this.cta.Id,answers:JSON.stringify(this.answers),marketingAutomationCookie:this.context.maCookie||"",streamId:null!==(e=this.context.streamId)&&void 0!==e?e:""},o="".concat(this.context.environment.trafficServiceUrl,"/api/Experience/survey?").concat($Trd_Utils.objectToQueryString(i));$Trd_Tools.JSONP(o,null)}},n.prototype.getEventPrefix=function(){return"survey"},n.prototype.getCompiledTemplate=function(n,e){var i,o;this.model=n;var r=this.getLogoAbsolutePath(n.logoRelativeUrl),a=n.closeButton?'<svg xmlns="http://www.w3.org/2000/svg" height="'.concat(n.closeButton.size,'" viewBox="0 -960 960 960" width="').concat(n.closeButton.size,'" fill="').concat(n.closeButton.color,'">\n      <path d="m259-174-84-85 220-221-220-221 84-85 221 221 221-221 84 85-220 221 220 221-84 85-221-221-221 221Z"/>\n    </svg>'):'<img src="https://pic.trendemon.com/images/closex.png" width="17" height="17" alt="close promotion" />',c=(null===(i=n.classes)||void 0===i?void 0:i.includes("trd-close-btn"))?a:"",d='\n        <div id="trd_cta_'.concat(this.cta.ViewModelId,'" class="trd_comp_').concat(this.cta.ViewModelId," trd-comp-container trd-survey ").concat(null===(o=n.classes)||void 0===o?void 0:o.join(" ")," ").concat(n.closeButton?"trd-custom-close":"",'">\n            <div class="component-content">\n                <div class="close-cont external-close-cont">\n                    <div class="external close-btn">').concat(c,'</div>\n                </div>\n                <div class="container-elements">\n                    <div class="close-cont internal-close-cont">\n                        <div class="internal close-btn">').concat(c,'</div>\n                    </div>\n                    <div class="interactable-container">\n                        ').concat(r&&r.length?'<img class="trd-img" width="300" height="300" src="'.concat(r,'" alt="">'):"",'\n                        <div class="int-con-td-item trd-title">').concat(n.title||"","</div>\n\n                        ").concat(n.surveyQuestions.map((function(t,n){return'<div class="trd-question '.concat(0===n?"trd-q-show":"",'">\n                            <div class="int-con-td-item trd-description">').concat(t.question,"</div>\n                            ").concat(t.answers.map((function(e,i){return'<button class="btn-link trd-answer" trd-q-id="'.concat(t.questionId,'" trd-q-idx="').concat(n+1,'" trd-answer-idx="').concat(i+1,'">').concat(e,"</button>")})).join(""),"\n                            </div>")})).join(""),'\n\n                        <div class="trd-survey-done"><div class="trd-survey-done-text">').concat(this.model.successText||"","</div></div>\n                    </div>\n                </div>\n            </div>\n        </div>"),s=t.prototype.getStyleElement.call(this,n),l="\n        #trd_cta_".concat(this.cta.ViewModelId,".trd-survey .container-elements {\n            min-width: 200px;\n            padding: 15px;\n            box-sizing: border-box;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-comp-container.embedded.trd-component-hide{\n            display: none;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.trd-survey-predefined.light.padded.single-vertical:not(.multi-field) .internal,\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.trd-survey-predefined.slider.padded.single-vertical:not(.multi-field) .close-cont.external-close-cont {\n          right: 8px;\n          top: 8px;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.slider .trd-img {\n          align-self: center;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey .trd-question .int-con-td-item.trd-description {\n            text-align: initial;\n            margin-bottom:15px;\n            line-height: 1.3;\n            font-weight: bold;\n            font-size: 16px;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.trd-survey-predefined .trd-question .int-con-td-item.trd-description {\n          font-size: 14px;\n          margin-bottom: 25px;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey .trd-question:not(.trd-q-show) {\n            display: none;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey .trd-question.trd-q-show.trd-q-done {\n            display: none;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey .trd-survey-done {\n            height: 100px;\n            display: flex;\n            width: 100%;\n            justify-content: center;\n            align-items: center;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey .trd-survey-done:not(.trd-survey-success) {\n            display: none;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey .btn-link.trd-answer {\n            width: 100%;\n            justify-content: flex-start;\n            padding: 12px 10px;\n            cursor: pointer;\n            height: unset;\n            border-radius:0;\n            box-sizing: border-box;\n            font-weight: bold;\n            font-size: ").concat(this.ctaParams.buttonTextSize||14,"px;\n        }\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.trd-survey-predefined .btn-link.trd-answer {\n          width: 75%;\n          margin: 10px auto 0;\n          justify-content: center;\n        }\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.trd-survey-predefined .btn-link.trd-answer:nth-of-type(4n+2) {\n          background-color: #4595cb;\n        }\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.trd-survey-predefined .btn-link.trd-answer:nth-of-type(4n+3) {\n          background-color: #0abce4;\n        }\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey.trd-survey-predefined .btn-link.trd-answer:nth-of-type(4n) {\n          background-color: #ffb854;\n        }\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey .btn-link.trd-answer:focus {\n            outline: none;\n            opacity: 0.8;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-survey .trd-survey-done-text {\n          color: ").concat(this.ctaParams.successTextColor||"#f3f2f4",";\n          font-size: ").concat(this.ctaParams.successTextSize||24,"px;\n        }\n\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close.trd-survey .component-content,\n        #trd_cta_").concat(this.cta.ViewModelId,".trd-custom-close.trd-survey .component-content .container-elements{\n          overflow: visible;\n        }\n        ");return{html:d,css:"<style> ".concat(s," ").concat(l," ").concat(t.prototype.getCustomStyles.call(this,e)," </style>")}},n}($TRD_GenericLayoutComponent),COOLOFF_DAYS_AFTER_CLOSE=3,COOLOFF_MS_AFTER_CLOSE=24*COOLOFF_DAYS_AFTER_CLOSE*60*60*1e3,$Trd_ExperienceManager=function(){function $Trd_ExperienceManager(context,streamMngr){var _this=this;this.context=context,this.streamMngr=streamMngr,this.personalUnitsData=[],this.renderContext={triggersContext:new Set,visibiltyTypesContext:new Set,lastPopupTimestamp:0,lastOfferPopupTimestamp:0,lastClosedTimestamp:0,previewMode:!1},this.createdContainers=[],this.listeners=[],this.componenets=[],this.activelyClosedUnits=JSON.parse(window.localStorage.getItem("trd_activelyClosedUnits")||"[]");var frequencyHistStr=window.localStorage.getItem("trd_frequencyControlHistory");this.frequencyControlHistory=frequencyHistStr?JSON.parse(frequencyHistStr):{canTriggerExitOn:0,h:[]},this.listeners.push(this.addEventListener($Trd_InternalEventsTypes.CTA_SHOWN,(function(t){return _this.sendOpenEvent(t.detail.ctaEventPrefix,t.detail.cta,t.detail.pages,t.detail.onlyPages),t.detail.ctaEventPrefix.startsWith("STREAM")||t.detail.onlyPages||_this.sendGaTracking(t.detail.cta,"load"),t.detail.cta.DisplayFrequency&&t.detail.cta.VisibiltyTypeId!==UnitVisibiltyType.Embedded&&_this.handleFrequencyHistory(t.detail.cta),!0}))),this.listeners.push(this.addEventListener($Trd_InternalEventsTypes.CTA_CLOSE,(function(t){return _this.onActivelyCloseUnitEvent(t.detail.cta.Id),_this.renderContext.lastClosedTimestamp=(new Date).getTime(),!0}))),this.listeners.push(this.addEventListener($Trd_InternalEventsTypes.CTA_COMPLETE,(function(e){var _a;_this.sendClickEvent(e.detail.ctaEventPrefix,e.detail.cta,e.detail.pages&&e.detail.pages.length>0?e.detail.pages[0]:void 0),e.detail.ctaEventPrefix.startsWith("STREAM")||_this.sendGaTracking(e.detail.cta,"click",e.detail.pages&&e.detail.pages.length>0?e.detail.pages[0]:void 0);var personal=_this.personalUnitsData.find((function(t){return t.id===e.detail.cta.Id}));return(null===(_a=null==personal?void 0:personal.postCompletionScript)||void 0===_a?void 0:_a.length)&&eval(personal.postCompletionScript),!0}))),this.listeners.push(this.addEventListener($Trd_InternalEventsTypes.CTA_NOT_EXPOSED,(function(t){return _this.sendExposeEvent(t.detail.cta),!0}))),this.listeners.push(this.addEventListener($Trd_InternalEventsTypes.CTA_TRIGGER_USED,(function(t){var n,e;return t.detail.trigger===$Trd_TriggersEventsTypes.EV_EXIT_INTENT&&(_this.frequencyControlHistory.canTriggerExitOn=(new Date).getTime()+60*(null!==(e=null===(n=_this.context.accountSettings)||void 0===n?void 0:n.unitsExitTriggerCoolOffHours)&&void 0!==e?e:0)*60*1e3,window.localStorage.setItem("trd_frequencyControlHistory",JSON.stringify(_this.frequencyControlHistory))),!0}))),this.context.isExperienceListenersAdded=!0,this.init().then((function(){_this.listeners.push(_this.addEventListener("scroll",(function(){document.dispatchEvent(new CustomEvent($Trd_TriggersEventsTypes.EV_PAGE_SCROLL,{detail:{scroll_percentage:_this.getScrollPercents()}}))}))),_this.listeners.push(_this.addEventListener("click",(function(){document.dispatchEvent(new CustomEvent($Trd_TriggersEventsTypes.EV_FIRST_INTERACTION))}))),(new Date).getTime()>_this.frequencyControlHistory.canTriggerExitOn&&($Trd_Tools.isMobile.is_mobile()?_this.initMobileOnExitDispatch():setTimeout((function(){_this.addEventListener("mouseleave",(function(t){t.clientY<=0&&(new Date).getTime()>_this.frequencyControlHistory.canTriggerExitOn&&document.dispatchEvent(new CustomEvent($Trd_TriggersEventsTypes.EV_EXIT_INTENT,{detail:{clientY:t.clientY}}))}),void 0,document.documentElement)}),4e3))}))}return $Trd_ExperienceManager.prototype.initMobileOnExitDispatch=function(){var t=0,n=0,e=0,i=0,o=!1,r=0,a=0;function c(){t=window.innerHeight?window.innerHeight:document.documentElement.clientHeight,document.body.scrollHeight?document.body.scrollHeight:document.documentElement.offsetHeight;var o=Number((t/356).toPrecision(2));i=e=(n=60*o)+t}function d(){var e=n+window.scrollY;i=e+t,o=!0}function s(){document.dispatchEvent(new CustomEvent($Trd_TriggersEventsTypes.EV_EXIT_INTENT))}c(),window.addEventListener("orientationchange",(function(){return c(),r=0,!0})),window.addEventListener("touchmove",d,!1),window.addEventListener("scroll",d,!1),window.addEventListener("touchstart",(function(){r=0}),!1),setInterval((function(){r++,a++,i===e&&!o&&r>=10&&s(),i===e&&o&&a>7&&s()}),1e3)},$Trd_ExperienceManager.prototype.handleFrequencyHistory=function(t){var n,e=t.Id;this.frequencyControlHistory.h=this.frequencyControlHistory.h.filter((function(t){return t.id!==e}));var i=1;switch(null===(n=t.DisplayFrequency)||void 0===n?void 0:n.displayAgain.frequency){case Frequency.Never:i=1051200;break;case Frequency.EverySession:i=60;break;case Frequency.EveryPage:default:i=1}this.frequencyControlHistory.h.push({id:e,canShowTimestamp:(new Date).getTime()+60*i*1e3}),this.frequencyControlHistory.h=this.frequencyControlHistory.h.slice(-15),window.localStorage.setItem("trd_frequencyControlHistory",JSON.stringify(this.frequencyControlHistory))},$Trd_ExperienceManager.prototype.getScrollPercents=function(){var t=document.documentElement,n=document.body,e="scrollTop",i="scrollHeight";return(t[e]||n[e])/((t[i]||n[i])-t.clientHeight)*100},$Trd_ExperienceManager.prototype.addEventListener=function(t,n,e,i){return void 0===i&&(i=document),i.addEventListener(t,n,e),function(){return i.removeEventListener(t,n,e)}},$Trd_ExperienceManager.prototype.initRenderContext=function(){this.renderContext||(this.renderContext={}),this.renderContext.triggersContext=new Set,this.renderContext.visibiltyTypesContext=new Set,this.renderContext.lastPopupTimestamp=0,this.renderContext.lastOfferPopupTimestamp=Number(window.localStorage.getItem("trd_offerPopupTime")),this.renderContext.lastClosedTimestamp=0,this.renderContext.previewMode=!1},$Trd_ExperienceManager.prototype.init=function(){var t;return __awaiter(this,void 0,void 0,(function(){var n,e,i,o,r,a,c,d,s,l,u,h,m,p,_,g,f,v,w=this;return __generator(this,(function(x){switch(x.label){case 0:return this.initRenderContext(),n=new URLSearchParams(window.location.search),e=!!n.get("trd_strm"),n.get("trd_unit_params_id")&&(this.renderContext.previewMode=!0),i=this.componenets.filter((function(t){return!t.isVisible})),this.componenets=this.componenets.filter((function(t){return t.isVisible})),o=this.componenets.map((function(t){return t.id})),this.personalUnitsData=this.personalUnitsData.filter((function(t){return o.includes(t.id)})),i.forEach((function(t){var n;if(t.clearComponent(),t.visibilityType!==UnitVisibiltyType.Embedded){var e=w.createdContainers.indexOf(t.containerElement);e>=0&&w.createdContainers.splice(e,1),null===(n=t.containerElement.parentNode)||void 0===n||n.removeChild(t.containerElement)}})),r=this.componenets.filter((function(t){return t.isAutoEmbed})),a=r.map((function(t){return t.id})),r.forEach((function(t){var n;t.clearComponent(),null===(n=t.containerElement.parentNode)||void 0===n||n.removeChild(t.containerElement)})),this.componenets=this.componenets.filter((function(t){return!a.includes(t.id)})),document.querySelectorAll(".trd-ph-embedded.trd-auto-embed").forEach((function(t){var n;return null===(n=t.parentNode)||void 0===n?void 0:n.removeChild(t)})),c=this.componenets.filter((function(t){return t.visibilityType===UnitVisibiltyType.Embedded&&!t.containerElement.closest("body")})),d=c.map((function(t){return t.id})),c.forEach((function(t){return t.clearComponent()})),this.componenets=this.componenets.filter((function(t){return!d.includes(t.id)})),this.personalUnitsData=this.personalUnitsData.filter((function(t){return!d.includes(t.id)})),s=null,this.renderContext.previewMode||e||!(null===(t=this.context.accountSettings)||void 0===t?void 0:t.hasInboundStreams)?[3,3]:[4,this.loadPersonalStreams()];case 1:return(s=x.sent())?[4,this.streamMngr.setStream(s)]:[3,3];case 2:x.sent(),this.streamMngr.showStream(),x.label=3;case 3:return[4,this.loadPersonalUnits()];case 4:return l=x.sent(),Array.isArray(l)?(u=null==l?void 0:l.filter((function(t){return!o.includes(t.id)})),[4,this.renderUnits(u)]):[3,6];case 5:x.sent(),this.personalUnitsData=__spreadArray(__spreadArray([],this.personalUnitsData,!0),u,!0),x.label=6;case 6:return h=document.querySelectorAll(".trd-ph-embedded:not(.trd-unit-populated)"),m=new Set,p=new Set,h.forEach((function(t){t.getAttribute("data-id")?m.add(t.getAttribute("data-id")):t.getAttribute("data-group")&&p.add(t.getAttribute("data-group"))})),[4,this.loadPersonalEmbeddedUnits(m,p)];case 7:return _=x.sent(),Array.isArray(_)?(g=null==_?void 0:_.map((function(t){return __assign(__assign({},t),{triggers:[$Trd_TriggersEventsTypes.EV_CONTAINER_SHOWN,$Trd_TriggersEventsTypes.EV_CTA_FORCE_SHOW]})})),this.addAutoEmbedContainers(g),[4,this.renderUnits(g)]):[3,9];case 8:x.sent(),f=this.personalUnitsData.map((function(t){return t.id})),v=g.filter((function(t){return!f.includes(t.id)})),this.personalUnitsData=__spreadArray(__spreadArray([],this.personalUnitsData,!0),v,!0),x.label=9;case 9:return setTimeout((function(){document.dispatchEvent(new Event($Trd_TriggersEventsTypes.EV_SHORT_TIMEOUT_FROM_PAGE_LOAD_EXPIRED))}),this.context.readTimeout||3e3),setTimeout((function(){document.dispatchEvent(new Event($Trd_TriggersEventsTypes.EV_LONG_TIMEOUT_FROM_PAGE_LOAD_EXPIRED))}),this.context.readTimeout||1e4),setTimeout((function(){document.dispatchEvent(new Event($Trd_TriggersEventsTypes.EV_TIMEOUT_THIRTY_FROM_PAGE_LOAD_EXPIRED))}),this.context.readTimeout||3e4),setTimeout((function(){document.dispatchEvent(new Event($Trd_TriggersEventsTypes.EV_TIMEOUT_SIXTY_PAGE_LOAD_EXPIRED))}),this.context.readTimeout||6e4),document.dispatchEvent(new Event($Trd_TriggersEventsTypes.EV_TRD_UNITS_READY)),document.dispatchEvent(new CustomEvent($Trd_TriggersEventsTypes.EV_PAGE_SCROLL,{detail:{scroll_percentage:this.getScrollPercents()}})),[2]}}))}))},$Trd_ExperienceManager.prototype.renderUnits=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,o,r,a,c=this;return __generator(this,(function(d){if(t&&t.length)for(n=function(t){if(e.renderContext.previewMode&&t.groupConfig){if(!((document.querySelector(t.groupConfig.selector)?t.groupConfig.placementRules.map((function(n){return c.getAutoEmbedParagraphElement(n,t)})).filter((function(t){return t[0]||t[1]})):[]).length>0))return $Trd_Utils.showPreviewErrorMessage("Auto embed was not added - use a different CSS selector or paragraph number"),{value:void 0};e.addAutoEmbedContainers([t])}var n=void 0;if(t.visibilityType===UnitVisibiltyType.Embedded){var i=document.querySelectorAll(".trd-ph-embedded[data-id='".concat(t.viewModelId,"']:not(.trd-unit-populated), .trd-ph-embedded[data-group='").concat(t.groupId,"']:not(.trd-unit-populated)"));if(0===i.length&&e.renderContext.previewMode&&$Trd_Utils.showPreviewErrorMessage("Embedded Code for Activation Unit not found"),0===i.length)return"continue";n=Array.from(i)}else{var o=document.createElement("div");o.setAttribute("id",t.viewModelId.toString()),(document.getElementById("trd_ph_cta_".concat(t.viewModelId))||document.body).append(o),n=[o],e.createdContainers.push(o)}n.forEach((function(n){return __awaiter(c,void 0,void 0,(function(){var e,i,o,r,a;return __generator(this,(function(c){switch(c.label){case 0:if(i={Id:t.id,RenderMode:t.renderMode,InAbTestForVisitor:t.inAbTestForVisitor,VisibiltyTypeId:t.visibilityType,ViewModelId:t.viewModelId,ContentPoolId:t.contentPoolId,CtaType:String(t.typeId),DisplayFrequency:t.displayFrequency,RecommendUrlParams:t.recommendUrlParams,Name:t.name,CustomImpressionTrackingCode:t.customImpressionTrackingCode,CustomClickTrackingCode:t.customClickTrackingCode,Link:null===(a=t.unitSettings)||void 0===a?void 0:a.model.link,OrchestrationId:t.orchestrationId,CompletionMandatory:t.completionMandatory},!t.unitSettings)return[3,2];switch(o=t.unitSettings.param,t.unitSettings.model.completionMandatory=t.completionMandatory,t.typeId){case UnitTypeId.Text:e=new $TRD_GenericLayoutComponent(i,o,this.context,this.renderContext);break;case UnitTypeId.Content:case UnitTypeId.Hub:e=t.unitSettings.model.recommendIsCarousel?new $TRD_RecommendCarouselLayoutComponent(i,o,this.context,this.renderContext):new $TRD_RecommendationLayoutComponent(i,o,this.context,this.renderContext);break;case UnitTypeId.Form:e=new $TRD_FormLayoutComponent(i,o,this.context,this.renderContext);break;case UnitTypeId.Script:e=new $TRD_GenericScriptComponent(i,o,this.context,this.renderContext);break;case UnitTypeId.Survey:e=new $TRD_SurveyLayoutComponent(i,o,this.context,this.renderContext);break;case UnitTypeId.FastText:e=new $TRD_FastTextLayoutComponent(i,o,this.context,this.renderContext);break;default:return[2]}return r=e.getCompiledTemplate(t.unitSettings.model,t.unitSettings.css),n.classList.add("trd-unit-populated"),n.innerHTML="\n              ".concat(r.css,"\n              ").concat(r.html,"\n            "),[4,e.initializeComponent(n,mapBackendTriggers(t.triggers))];case 1:c.sent(),this.componenets.push(e),c.label=2;case 2:return[2]}}))}))}))},e=this,i=0,o=t;i<o.length;i++)if(r=o[i],"object"==typeof(a=n(r)))return[2,a.value];return[2]}))}))},$Trd_ExperienceManager.prototype.dispose=function(){var t,n,e;null===(t=this.componenets)||void 0===t||t.forEach((function(t){return t.clearComponent()})),null===(n=this.createdContainers)||void 0===n||n.forEach((function(t){var n;null===(n=t.parentNode)||void 0===n||n.removeChild(t)})),null===(e=this.listeners)||void 0===e||e.forEach((function(t){return t()}))},$Trd_ExperienceManager.prototype.loadPersonalStreams=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){return[2,new Promise((function(n,e){var i,o=t.streamMngr.excludedStreams.filter((function(t){return(new Date).getTime()-t.time<COOLOFF_MS_AFTER_CLOSE})).map((function(t){return t.id})),r={AccountId:t.context.accountId,ClientUrl:null===(i=t.context.pageDetails)||void 0===i?void 0:i.url,MarketingAutomationCookie:t.context.maCookie||"",ExcludedStreamsJson:JSON.stringify(o)},a="".concat(t.context.environment.trafficServiceUrl,"/api/experience/personal-stream?").concat($Trd_Utils.objectToQueryString(r));$Trd_Tools.JSONP(a,(function(t){try{n((null==t?void 0:t.ErrorDescription)?null:t)}catch(t){e(t)}}))}))]}))}))},$Trd_ExperienceManager.prototype.loadPersonalEmbeddedUnits=function(t,n){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){return this.renderContext.previewMode?[2,[]]:[2,new Promise((function(i,o){var r,a,c={AccountId:e.context.accountId,ClientUrl:null===(r=e.context.pageDetails)||void 0===r?void 0:r.url,MarketingAutomationCookie:e.context.maCookie||"",Ids:t.size?JSON.stringify(Array.from(t)):"[]",Groups:n.size?JSON.stringify(Array.from(n)):"[]",StreamId:null!==(a=e.context.streamId)&&void 0!==a?a:""},d="".concat(e.context.environment.trafficServiceUrl,"/api/experience/personal-embedded?").concat($Trd_Utils.objectToQueryString(c));$Trd_Tools.JSONP(d,(function(t){try{i(t)}catch(t){o(t)}}))}))]}))}))},$Trd_ExperienceManager.prototype.loadPersonalUnits=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e,i,o,r,a,c=this;return __generator(this,(function(d){switch(d.label){case 0:if(t=new URLSearchParams(window.location.search),!(n=t.get("trd_unit_params_id")))return[3,6];e=void 0,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,$Trd_Utils.getPreSavedParams(n,"unit",this.context)];case 2:return e=d.sent(),[3,4];case 3:return d.sent(),[2,[]];case 4:return[4,$Trd_Utils.loadLzString(this.context)];case 5:return d.sent(),i=LZString.decompressFromEncodedURIComponent(e.params),o=JSON.parse(i),r={id:o.id||0,inAbTestForVisitor:!1,renderMode:0,typeId:$Trd_Utils.getUnitTypeId(o.model.uiType),name:"preview test",unitSettings:{css:o.model.css,html:o.model.html,param:o.params,script:o.model.script,model:o.model},visibilityType:$Trd_Utils.getVisibilityTypeId(o.model.visibilityType),viewModelId:o.viewModelId,unitType:o.model.uiType,triggers:"embedded"===o.model.visibilityType?[]:["trd_units_ready"],groupId:o.model.groupId,groupConfig:o.model.groupConfig,contentPoolId:o.model.contentPoolId||-1},a=[r],[2,Promise.resolve(a)];case 6:return[2,new Promise((function(t,n){var e,i,o={AccountId:c.context.accountId,ClientUrl:null===(e=c.context.pageDetails)||void 0===e?void 0:e.url,MarketingAutomationCookie:c.context.maCookie||"",ExcludeUnitsJson:JSON.stringify(__spreadArray(__spreadArray([],c.activelyClosedUnits.filter((function(t){return(new Date).getTime()-t.time<COOLOFF_MS_AFTER_CLOSE})).map((function(t){return t.id})),!0),c.frequencyControlHistory.h.filter((function(t){return(new Date).getTime()<t.canShowTimestamp})).map((function(t){return t.id})),!0)),streamId:c.context.streamContentId&&null!==(i=c.context.streamId)&&void 0!==i?i:""},r="".concat(c.context.environment.trafficServiceUrl,"/api/experience/personal?").concat($Trd_Utils.objectToQueryString(o));$Trd_Tools.JSONP(r,(function(e){try{t(e)}catch(t){n(t)}}))}))]}}))}))},$Trd_ExperienceManager.prototype.addAutoEmbedContainers=function(t){var n=this;t.forEach((function(t){if(t.groupConfig){var e=null;try{e=document.querySelector(t.groupConfig.selector)}catch(t){}e&&t.groupConfig.placementRules.forEach((function(i){var o=document.createElement("div");o.classList.add("trd-ph-embedded","trd-auto-embed","trd-embedded-top-bottom-margin"),o.setAttribute("data-group",t.groupId);var r=n.getAutoEmbedParagraphElement(i,t),a=r[0],c=r[1];a?"start"===c?a.before(o):"end"===c&&a.after(o):c&&("start"===c?null==e||e.prepend(o):"end"===c&&(null==e||e.append(o)))}))}}))},$Trd_ExperienceManager.prototype.getAutoEmbedParagraphElement=function(t,n){switch(t.placementType){case"AfterParagraph":var e=Number(t.params);if(e){var i=Array.from(document.querySelectorAll("".concat(n.groupConfig.selector," > *:not(.trd-ph-embedded)"))).filter((function(t){return["DIV","P"].includes(t.tagName)})).filter((function(t){return"none"!=window.getComputedStyle(t).getPropertyValue("display")}))[e-1];return[i,i?"end":null]}case"beforeAfterSelector":var o=JSON.parse(t.params),r=Array.from(document.querySelectorAll("".concat(n.groupConfig.selector," > ").concat(o.selector))).filter((function(t){return"none"!=window.getComputedStyle(t).getPropertyValue("display")}))[o.num-1];return[r,r?"before"===o.pos?"start":"end":null];case"startEndContainer":return[null,"start"===t.params?"start":"end"]}},$Trd_ExperienceManager.prototype.sendUpliftEvent=function(t){var n="".concat(this.context.environment.trafficServiceUrl,"/api/events/uplift?").concat($Trd_Utils.objectToQueryString(t));return $Trd_Tools.pixel(n,"trd_cta_".concat(t.CtaId,"_load")),!0},$Trd_ExperienceManager.prototype.sendOpenEvent=function(t,n,e,i){var o,r,a,c,d,s=this;if(!i){var l={AccountId:this.context.accountId,Cookie:null===(o=this.context.cid)||void 0===o?void 0:o.value,Url:btoa(null!==(a=null===(r=this.context.pageDetails)||void 0===r?void 0:r.url)&&void 0!==a?a:""),EventType:"".concat(t,"_LOAD").toUpperCase(),CtaId:n.Id,OrchId:n.OrchestrationId,Widget:!0,InAbTest:n.InAbTestForVisitor,UnitTypeId:n.CtaType,StreamId:null!==(c=this.context.streamId)&&void 0!==c?c:""};this.sendUpliftEvent(l)}return(null==e?void 0:e.length)&&(null===(d=this.context.ctaUserPageHistoryCook)||void 0===d||d.addHistory(e.slice(-5)),e.forEach((function(e){var i,o,r,a,c,d={AccountId:s.context.accountId,Cookie:null===(i=s.context.cid)||void 0===i?void 0:i.value,Url:btoa(null!==(r=null===(o=s.context.pageDetails)||void 0===o?void 0:o.url)&&void 0!==r?r:""),EventType:"".concat(t,"_LOAD").toUpperCase(),CtaId:n.Id,OrchId:n.OrchestrationId,Widget:!1,InAbTest:n.InAbTestForVisitor,UnitTypeId:n.CtaType,PageTaskId:e.PageId,TargetUrl:encodeURIComponent(null!==(a=e.cleanPageUrl)&&void 0!==a?a:""),StreamId:null!==(c=s.context.streamId)&&void 0!==c?c:""};s.sendUpliftEvent(d)}))),!0},$Trd_ExperienceManager.prototype.sendExposeEvent=function(t){var n,e,i,o,r={AccountId:this.context.accountId,Cookie:null===(n=this.context.cid)||void 0===n?void 0:n.value,Url:btoa(null!==(i=null===(e=this.context.pageDetails)||void 0===e?void 0:e.url)&&void 0!==i?i:""),EventType:this.context.environment.eventCtaNotExposure,CtaId:t.Id,OrchId:t.OrchestrationId,Widget:!0,InAbTest:t.InAbTestForVisitor,UnitTypeId:t.CtaType,StreamId:null!==(o=this.context.streamId)&&void 0!==o?o:""};return this.sendUpliftEvent(r),!0},$Trd_ExperienceManager.prototype.onActivelyCloseUnitEvent=function(t){return this.activelyClosedUnits=this.activelyClosedUnits.filter((function(n){return n.id!==t})),this.activelyClosedUnits.push({id:t,time:(new Date).getTime()}),this.activelyClosedUnits=this.activelyClosedUnits.slice(-10),window.localStorage.setItem("trd_activelyClosedUnits",JSON.stringify(this.activelyClosedUnits)),!0},$Trd_ExperienceManager.prototype.sendClickEvent=function(t,n,e,i){var o,r,a,c,d,s={AccountId:this.context.accountId,Cookie:null===(o=this.context.cid)||void 0===o?void 0:o.value,Url:btoa(null!==(a=null===(r=this.context.pageDetails)||void 0===r?void 0:r.url)&&void 0!==a?a:""),EventType:"".concat(t,"_CLICK").toUpperCase(),CtaId:n.Id,OrchId:n.OrchestrationId,Widget:!0,InAbTest:n.InAbTestForVisitor,UnitTypeId:n.CtaType,MarketingAutomationCookie:this.context.maCookie||"",StreamId:null!==(c=this.context.streamId)&&void 0!==c?c:""};return e?s.TargetUrl=encodeURIComponent(null!==(d=e.cleanPageUrl)&&void 0!==d?d:""):n.Link&&(s.TargetUrl=encodeURIComponent(n.Link)),i&&i.length&&(s.Url=btoa(i)),this.sendUpliftEvent(s),!0},$Trd_ExperienceManager.prototype.sendGaTracking=function(ctaParams,event,page){var _a;if(!(null===(_a=this.context.accountSettings)||void 0===_a?void 0:_a.googleAnalyticsTrack))return!1;var trdName="Trendemon Banner "+ctaParams.Name,trackingCodeToEval;switch(event){case"load":trackingCodeToEval=ctaParams.CustomImpressionTrackingCode;break;case"click":trackingCodeToEval=ctaParams.CustomClickTrackingCode}if(null==trackingCodeToEval?void 0:trackingCodeToEval.length)eval(trackingCodeToEval);else{if("undefined"!=typeof ga&&2306!==Number(this.context.accountId)){var tracker=void 0!==ga.getAll?ga.getAll()[0]:void 0;tracker?tracker.send("event",trdName,event,(null==page?void 0:page.PageUrl)||"","0",{nonInteraction:"load"===event?1:0}):ga("send","event",trdName,event,(null==page?void 0:page.PageUrl)||"","0",{nonInteraction:"load"===event?1:0})}else"undefined"!=typeof gtag&&2306!==Number(this.context.accountId)&&gtag("event",trdName+" | "+event,{event_category:trdName,non_interaction:"load"===event});"undefined"!=typeof dataLayer&&dataLayer.push({event:"trendemon_".concat(event),unitName:ctaParams.Name,nonInteraction:"load"===event})}return!0},$Trd_ExperienceManager}(),$TRD_ClientAppFactory=function(){function t(){}return t.create=function(t,n){switch(t){case"drift":return new $TRD_ClientAppDrift(n);case"sixsense":return new $TRD_ClientAppSixSense(n);default:return null}},t}(),$TRD_ClientApp=function(){function t(t){this.context=t,this.init()}return t.prototype.sendEvent=function(t){var n=__assign({accountId:this.context.accountId,url:$Trd_Base64.encode(this.context.pageDetails.url),app:t.clientApp,name:t.eventName},t.eventData?{data:JSON.stringify(t.eventData)}:{}),e="".concat(this.context.environment.trafficEventsEndpoint,"/client-app?").concat($Trd_Utils.objectToQueryString(n));$Trd_Tools.pixel(e,"client-app")},t.prototype.sendEvents=function(t,n){var e={accountId:this.context.accountId,url:$Trd_Base64.encode(this.context.pageDetails.url),app:t,names:JSON.stringify(n)},i="".concat(this.context.environment.trafficEventsEndpoint,"/client-app/multiple?").concat($Trd_Utils.objectToQueryString(e));$Trd_Tools.pixel(i,"client-app")},t}(),$TRD_ClientAppDrift=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.init=function(){this.registerEvent("startConversation","startConversation"),this.registerEvent("phoneCapture","phoneCapture"),this.registerEvent("conversation:playbookClicked","playbookClicked"),this.registerEvent("scheduling:meetingBooked","meetingBooked"),this.registerEventWithData("emailCapture","emailCapture",(function(t){return{email:t.data.email}}))},n.prototype.registerEvent=function(t,n){var e,i=this;null===(e=window.drift)||void 0===e||e.on(t,(function(){i.sendEvent({clientApp:"drift",eventName:n})}))},n.prototype.registerEventWithData=function(t,n,e){var i,o=this;null===(i=window.drift)||void 0===i||i.on(t,(function(t){o.sendEvent({clientApp:"drift",eventName:n,eventData:e?e(t):void 0})}))},n}($TRD_ClientApp),$TRD_ClientAppSixSense=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),Object.defineProperty(n.prototype,"LAST_SIXSENSE_UPDATE_KEY",{get:function(){return"trd_6sense_last_ts"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"SIXSENSE_EVENT_COOLDOWN_MIN",{get:function(){return 60},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t;if(this.isSendEvent()){var n=localStorage.getItem("_6senseCompanyDetails");try{if(n){var e=JSON.parse(n),i=null===(t=null==e?void 0:e.segments)||void 0===t?void 0:t.names;Array.isArray(i)&&this.sendEventsWithVid(i)}}catch(t){}}},n.prototype.sendEventsWithVid=function(t){var n=this;this.intervalRef=setInterval((function(){window.trd_api.context.visitorId&&(n.sendEvents("sixsense",t),n.updateSendEvent(),clearInterval(n.intervalRef))}),100)},n.prototype.isSendEvent=function(){var t=localStorage.getItem(this.LAST_SIXSENSE_UPDATE_KEY);return!(t&&!isNaN(Number(t)))||Date.now()>Number(t)+6e4*this.SIXSENSE_EVENT_COOLDOWN_MIN},n.prototype.updateSendEvent=function(){localStorage.setItem(this.LAST_SIXSENSE_UPDATE_KEY,Date.now().toString())},n}($TRD_ClientApp),trdContext=new $Trd_Context;if(trdContext.accountId=window.TRD_ACC_ID,!trdContext.accountId){var src=document.getElementById("trdflame").src;src.split("uid=").length>1?trdContext.accountId=Number(src.split("uid=")[1].split("&")[0]):trdContext.accountId=Number(src.split("scripts/")[1].split("/")[0])}trdContext.aceSelectors=window.TRD_SELECTORS,trdContext.isFriendlyUrl=window.TRD_IS_FRIENDLY,trdContext.assetsVersion=(new Date).getTime().toString(),trdContext.insertCtaCode=!0,trdContext.environment=new $Trd_EnvironmentSettings,trdContext.environment.jQueryLink="https://code.jquery.com/jquery-3.4.1.min.js",trdContext.environment.trafficEventPath="/api/events",trdContext.environment.trafficSetMaPath="/api/marketingautomation",trdContext.environment.trafficServiceUrl="https://trackingapi.trendemon.com",trdContext.environment.cdnPath="https://assets.trendemon.com",trdContext.environment.loadCssPath="/global",trdContext.environment.loadTemplatePath="/templates",trdContext.environment.loadPersonalPath="/api/cta/personal",trdContext.environment.pdfViewerPath="https://content.trendemon.com/viewern.html",trdContext.environment.fetchPdfPath="https://content.trendemon.com/prod/serve",trdContext.environment.contentFetchDomain="content.trendemon.com",trdContext.environment.offersShowGapSec=60,trdContext.uuid=void 0,trdContext.cid=void 0,trdContext.accountSettings=void 0,trdContext.environment.contentTaskLogoPath="https://pic.trendemon.com",trdContext.environment.personalizationServiceUrl="https://prodtemplates.trendemon.com",trdContext.environment.eventCtaNotExposure="CTA_NOT_EXPOSED",trdContext.environment.eventRuNotExposure="RECOMMENDATION_NOT_EXPOSED",trdContext.environment.excludeGenericEmail=["hotmail","yahoo","gmail"],window.TrendemonContext=trdContext,window.$trd_Context=trdContext;var $Trd_AceManager=function(){function t(t,n){this.context=t,this.streamMngr=n,this.aceVariantData=[]}return t.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.loadPageVariant()];case 1:return[2,!t.sent()]}}))}))},t.prototype.loadPageVariant=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e,i,o,r,a,c,d,s,l,u;return __generator(this,(function(h){switch(h.label){case 0:return t=new URLSearchParams(window.location.search),n=t.get("trd_ace_params_id"),e=!!t.get("trd_stream_params_id"),i=!!t.get("trd_strm")||e,(o=t.get("trd_otw"))||n||i?[4,$Trd_Utils.loadLzString(this.context)]:[3,2];case 1:h.sent(),h.label=2;case 2:return h.trys.push([2,13,,14]),o?(r=LZString.decompressFromEncodedURIComponent(o),a=JSON.parse(r),c=a.oi,d=a.i,s=a.p,[4,this.loadOtwVariant(c,d,s)]):[3,6];case 3:return null==(l=h.sent())?[3,5]:(s||(this.context.otwId=c,this.context.otwItemId=d),[4,this.AddVariantElementsToPage(l)]);case 4:h.sent(),h.label=5;case 5:return[3,10];case 6:return e?[3,10]:[4,this.loadAceVariant()];case 7:return null===(u=h.sent())?[3,10]:u.variantType!==AceVariantType.Urls?[3,8]:u.isControl?(this.context.variant=u.id,[3,10]):(this.handleUrlVariant(u,t),[2,!0]);case 8:return this.context.variant=u.id,[4,this.AddVariantElementsToPage(u)];case 9:h.sent(),h.label=10;case 10:return i?[4,this.streamMngr.getStream()]:[3,12];case 11:h.sent()&&this.streamMngr.showStream(),h.label=12;case 12:return[3,14];case 13:return h.sent(),[3,14];case 14:return[2,!1]}}))}))},t.prototype.loadOtwVariant=function(t,n,e){return __awaiter(this,void 0,void 0,(function(){var i=this;return __generator(this,(function(o){return[2,new Promise((function(o,r){var a,c,d,s={AccountId:i.context.accountId,ClientUrl:null===(a=i.context.pageDetails)||void 0===a?void 0:a.url,Referral:(null===(c=i.context.pageDetails)||void 0===c?void 0:c.reffer)?$Trd_Base64.encode(i.context.pageDetails.reffer):"",OtwId:t,OtwItemId:n,IsPreview:e,TrdCid:null===(d=i.context.cid)||void 0===d?void 0:d.value},l="".concat(i.context.environment.trafficServiceUrl,"/api/experience/otw-campaign?").concat($Trd_Utils.objectToQueryString(s));$Trd_Tools.JSONP(l,(function(t){o(t)}),void 0,(function(t){return r(t)}))}))]}))}))},t.prototype.loadAceVariant=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e,i,o=this;return __generator(this,(function(r){switch(r.label){case 0:if(t=new URLSearchParams(window.location.search),n=t.get("trd_ace_params_id"),e=t.get("trd_variant"),!n)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,$Trd_Utils.getPreSavedParams(n,"ace",this.context)];case 2:return i=r.sent(),[2,this.loadVariantFromPreview(i.params)];case 3:return r.sent(),[2,null];case 4:return[2,new Promise((function(t,n){var i,r,a={AccountId:o.context.accountId,ClientUrl:null===(i=o.context.pageDetails)||void 0===i?void 0:i.url,Variant:e?+e:null,Referral:(null===(r=o.context.pageDetails)||void 0===r?void 0:r.reffer)?$Trd_Base64.encode(o.context.pageDetails.reffer):""},c="".concat(o.context.environment.trafficServiceUrl,"/api/experience/ace-campaign?").concat($Trd_Utils.objectToQueryString(a));$Trd_Tools.JSONP(c,(function(n){t(n)}),void 0,(function(t){return n(t)}))}))]}}))}))},t.prototype.handleUrlVariant=function(t,n){if(t.variantUrl){var e=$Trd_Utils.getUtmParamsFromQueryString(n),i=new URL(t.variantUrl),o=t.variantUrl;!i.search.includes("utm_")&&e.toString().length>0&&(o=i.origin+i.pathname+"".concat(""===i.search?"?":"".concat(i.search,"&"))+e.toString()+i.hash),window.location.replace(o)}},t.prototype.AddVariantElementsToPage=function(t){var n;return __awaiter(this,void 0,void 0,(function(){var e,i,o,r=this;return __generator(this,(function(a){switch(a.label){case 0:return"loading"!==document.readyState?[3,2]:[4,new Promise((function(t){window.addEventListener("DOMContentLoaded",(function(){return t()}),{once:!0})}))];case 1:a.sent(),a.label=2;case 2:return e=null===(n=t.config)||void 0===n?void 0:n.map((function(t){var n=null,e=null;try{n=document.querySelector(t.cssSelector),t.action===AceElementAction.Reorder&&t.movedCssSelector&&(e=document.querySelector(t.movedCssSelector))}catch(t){}return{htmlElement:n,movedElement:e,modification:t}})),!!(null==e?void 0:e.find((function(t){return(t.modification.action===AceElementAction.Add||t.modification.action===AceElementAction.Replace)&&t.modification.showLinkAsButton})))&&((i=document.createElement("style")).id="trd-ace-styles",i.innerHTML="\n        .trd-added-button {\n          display: inline-block;\n          text-decoration: none;\n          padding: 10px 20px;\n          border-style: solid;\n          transition: opacity 200ms;\n        }\n\n        .trd-added-button:hover {\n          opacity: 0.8;\n          text-decoration: none;\n        }",document.body.appendChild(i)),o=[],null==e||e.forEach((function(t,n){if(t.htmlElement)switch(t.modification.action){case AceElementAction.Edit:var e=r.modifyElementEdit(t.htmlElement,n,t.modification);e&&o.push(e);break;case AceElementAction.Remove:r.modifyElementRemove(t.htmlElement,n);break;case AceElementAction.Add:r.modifyElementAdd(t.htmlElement,n,t.modification);break;case AceElementAction.Replace:r.modifyElementRemove(t.htmlElement,n),r.modifyElementAdd(t.htmlElement,n,t.modification);break;case AceElementAction.Reorder:r.modifyElementReorder(t.htmlElement,t.movedElement,n,t.modification)}})),[4,Promise.all(o)];case 3:return a.sent(),[2]}}))}))},t.prototype.modifyElementRemove=function(t,n){t.style.setProperty("display","none","important"),t.setAttribute("trd-ace-removed-idx",n.toString())},t.prototype.modifyElementReorder=function(t,n,e,i){n&&(n.setAttribute("trd-ace-added-idx",e.toString()),i.addPosition===AceElementAddPosition.Before?t.before(n):t.after(n))},t.prototype.modifyElementEdit=function(t,n,e){var i,o,r,a,c,d,s,l,u=null;switch(t.setAttribute("trd-ace-edited-idx",n.toString()),e.replaceType){case ElementReplaceType.Link:t.href=null!==(i=e.link)&&void 0!==i?i:"#",t.target=e.isOpenInNewTab?"_blank":"_self";case ElementReplaceType.Text:t.innerHTML=null!==(o=e.text)&&void 0!==o?o:"",e.fontSize&&(t.style.fontSize=e.fontSize),e.fontWeight&&(t.style.fontWeight=e.fontWeight),e.fontColor&&(t.style.color=e.fontColor),e.backgroundColor&&(t.style.backgroundColor=e.backgroundColor);break;case ElementReplaceType.Banner:if("A"===(null===(r=t.parentElement)||void 0===r?void 0:r.tagName)){var h=t.parentElement;h.href=null!==(a=e.bannerLink)&&void 0!==a?a:t.href,h.target=e.isOpenInNewTab?"_blank":"_self"}case ElementReplaceType.Image:case ElementReplaceType.IFrame:if(e.imageReplaceMode===AceImageReplaceMode.CustomDimensions)e.width&&(t.style.width=e.width+this.getCssUnits(e.widthSizeUnits),t.removeAttribute("width")),e.height&&(t.style.height=e.height+this.getCssUnits(null!==(c=e.heightSizeUnits)&&void 0!==c?c:e.widthSizeUnits),t.removeAttribute("height"));else if(e.imageReplaceMode===AceImageReplaceMode.KeepOrigDimensions){var m=t.getBoundingClientRect();m.width&&(t.style.width=m.width+"px"),m.height&&(t.style.height=m.height+"px")}t.src=null!==(d=e.link)&&void 0!==d?d:"",[ElementReplaceType.Image,ElementReplaceType.Banner].includes(e.replaceType)&&(u=new Promise((function(n){return t.addEventListener("load",(function(){return n()}),{once:!0})}))),t.removeAttribute("srcset"),t.removeAttribute("data-src"),"PICTURE"===(null===(s=t.parentElement)||void 0===s?void 0:s.tagName)&&(null===(l=t.parentElement.querySelector("source"))||void 0===l||l.setAttribute("srcset",""))}return e.padding&&(this.isEmptyValue(e.padding.top)||(t.style.paddingTop="".concat(e.padding.top,"px")),this.isEmptyValue(e.padding.bottom)||(t.style.paddingBottom="".concat(e.padding.bottom,"px")),this.isEmptyValue(e.padding.left)||(t.style.paddingLeft="".concat(e.padding.left,"px")),this.isEmptyValue(e.padding.right)||(t.style.paddingRight="".concat(e.padding.right,"px"))),e.margin&&(this.isEmptyValue(e.margin.top)||(t.style.marginTop="".concat(e.margin.top,"px")),this.isEmptyValue(e.margin.bottom)||(t.style.marginBottom="".concat(e.margin.bottom,"px")),this.isEmptyValue(e.margin.left)||(t.style.marginLeft="".concat(e.margin.left,"px")),this.isEmptyValue(e.margin.right)||(t.style.marginRight="".concat(e.margin.right,"px"))),this.modifyBackground(t,e),this.modifyBorder(t,e),u},t.prototype.modifyElementAdd=function(t,n,e){var i,o,r,a,c;this.fixModifications(e);var d=null;switch(e.addType){case AceElementAddType.Html:case AceElementAddType.Text:d=document.createElement("div");break;case AceElementAddType.Image:(d=document.createElement("div")).innerHTML='<img style="box-sizing: border-box;">';break;case AceElementAddType.Button:(d=document.createElement("div")).innerHTML='<a style="display: inline-block; text-align: center"></a>';break;case AceElementAddType.Banner:(d=document.createElement("div")).innerHTML='<a><img style="box-sizing: border-box;"></a>'}if(d&&e.addType){d.setAttribute("trd-ace-added-idx",n.toString()),d.style.overflow="hidden";var s,l=this.getAddedImage(e.addType,d),u=null!=l?l:d,h=null!==(i=this.getAddedInnerElement(e.addType,d))&&void 0!==i?i:d;if([AceElementAddType.Text,AceElementAddType.Html].includes(e.addType)&&(this.modifyAddedElementTextAndFont(d,e),d.style.backgroundColor=null!==(o=e.backgroundColor)&&void 0!==o?o:""),[AceElementAddType.Image,AceElementAddType.Banner].includes(e.addType)&&(d.style.textAlign=this.getPosition(e.position),l&&(l.src=null!==(r=e.link)&&void 0!==r?r:"",l.style.objectFit=this.getObjectFit(e.imageObjectFit))),e.addType===AceElementAddType.Banner)(s=d.querySelector("a"))&&(s.href=null!==(a=e.bannerLink)&&void 0!==a?a:"#",s.target=e.isOpenInNewTab?"_blank":"");if(e.addType===AceElementAddType.Button)d.style.textAlign=this.getPosition(e.position),(s=d.querySelector("a")).href=null!==(c=e.link)&&void 0!==c?c:"#",s.target=e.isOpenInNewTab?"_blank":"",this.modifyAddedElementTextAndFont(s,e),e.showLinkAsButton&&s.classList.add("trd-added-button");var m=e.displayType===AceElementDisplay.Inline,p=e.addType===AceElementAddType.Button;d.style.display=m?"inline-block":"block",l&&(l.style.display=m?"block":"inline");var _=p?h:m?d:u;if(_.style.width=e.width?e.width+this.getCssUnits(e.widthSizeUnits):"",_.style.height=e.height?e.height+this.getCssUnits(e.heightSizeUnits):"",m&&l&&(_.style.width&&(l.style.width="100%"),_.style.height&&(l.style.height="100%")),e.padding){var g=e.padding;h.style.padding="".concat(g.top,"px ").concat(g.right,"px ").concat(g.bottom,"px ").concat(g.left,"px")}if(e.margin){var f=e.margin;h.style.margin="".concat(f.top,"px ").concat(f.right,"px ").concat(f.bottom,"px ").concat(f.left,"px")}this.modifyBackground(h,e),this.modifyBorder(h,e),e.addPosition===AceElementAddPosition.Before?t.before(d):t.after(d)}},t.prototype.sendGaTracking=function(t,n){var e;if(!(null===(e=this.context.accountSettings)||void 0===e?void 0:e.googleAnalyticsTrack))return!1;var i="Trendemon Variant "+t;return $Trd_Utils.sendToGoogleAnalytics(i,"variant",n),!0},t.prototype.loadVariantFromPreview=function(t){var n;return __awaiter(this,void 0,void 0,(function(){var e,i,o;return __generator(this,(function(r){return e=LZString.decompressFromEncodedURIComponent(t),i=JSON.parse(e),null===(n=i.config)||void 0===n||n.forEach((function(t){var n,e;if(null!==(n=t.action)&&void 0!==n||(t.action=AceElementAction.Edit),t.text)for(;;){var i=null===(e=t.text)||void 0===e?void 0:e.replace(/{{(company_name|industry)(?:;if_empty:([^}]+))?}}/,(function(t,n,e){return e||""}));if(i==t.text)break;t.text=i}})),o={id:i.id||0,name:i.name,variantType:AceVariantType.Elements,config:i.config},[2,Promise.resolve(o)]}))}))},t.prototype.getAddedImage=function(t,n){switch(t){case AceElementAddType.Image:case AceElementAddType.Banner:return n.querySelector("img");default:return null}},t.prototype.getAddedInnerElement=function(t,n){switch(t){case AceElementAddType.Image:case AceElementAddType.Banner:return n.querySelector("img");case AceElementAddType.Button:return n.querySelector("a");default:return null}},t.prototype.modifyAddedElementTextAndFont=function(t,n){var e,i,o,r;t.innerHTML=null!==(e=n.text)&&void 0!==e?e:"",t.style.fontSize=null!==(i=n.fontSize)&&void 0!==i?i:"",t.style.fontWeight=null!==(o=n.fontWeight)&&void 0!==o?o:"",t.style.color=null!==(r=n.fontColor)&&void 0!==r?r:"",n.addType!==AceElementAddType.Button&&(t.style.textAlign=n.textAlign?this.getTextAlign(n.textAlign):"")},t.prototype.modifyBackground=function(t,n){var e,i,o,r;(null===(e=n.background)||void 0===e?void 0:e.color)&&(t.style.backgroundColor=null===(i=n.background)||void 0===i?void 0:i.color);var a=(null===(o=n.background)||void 0===o?void 0:o.imageLink)?'url("'.concat(n.background.imageLink,'")'):null;if(a)switch(t.style.backgroundImage=a,null===(r=n.background)||void 0===r?void 0:r.imageFit){case AceBackgroundImageFit.Contain:t.style.backgroundSize="contain",t.style.backgroundPosition="center",t.style.backgroundRepeat="no-repeat";break;case AceBackgroundImageFit.Cover:t.style.backgroundSize="cover",t.style.backgroundPosition="center",t.style.backgroundRepeat="no-repeat";break;case AceBackgroundImageFit.Fill:t.style.backgroundSize="100% 100%",t.style.backgroundRepeat="no-repeat"}},t.prototype.modifyBorder=function(t,n){n.border&&(t.style.borderColor=n.border.color,t.style.borderWidth="".concat(n.border.width,"px"),t.style.borderRadius="".concat(n.border.radius,"px"),t.style.borderStyle="solid")},t.prototype.fixModifications=function(t){var n,e,i,o,r,a=[AceElementAction.Add,AceElementAction.Replace].includes(t.action);null!==(n=t.displayType)&&void 0!==n||(t.displayType=AceElementDisplay.Block),null!==(e=t.padding)&&void 0!==e||(t.padding=this.getInitPadding(t)),null!==(i=t.margin)&&void 0!==i||(t.margin=a?null!==(o=t.margin)&&void 0!==o?o:this.getDefaultBoxSidesSizes():null),null!==(r=t.background)&&void 0!==r||(t.background=this.getInitBackground(t))},t.prototype.getDefaultBoxSidesSizes=function(){return{top:0,bottom:0,left:0,right:0,isSameToAllSides:!0}},t.prototype.getInitPadding=function(t){return t.action===AceElementAction.Add?t.padding?t.padding:t.addType===AceElementAddType.Button&&t.showLinkAsButton?{isSameToAllSides:!1,top:10,bottom:10,left:20,right:20}:this.getDefaultBoxSidesSizes():null},t.prototype.getInitBackground=function(t){return t.background?t.background:t.backgroundColor?{color:t.backgroundColor,imageLink:null,imageFit:t.addType?AceBackgroundImageFit.Contain:AceBackgroundImageFit.Original}:null},t.prototype.isEmptyValue=function(t){return null==t},t.prototype.getObjectFit=function(t){switch(t){case AceImageObjectFit.Contain:return"contain";case AceImageObjectFit.Cover:return"cover";case AceImageObjectFit.Fill:return"fill";case AceImageObjectFit.None:return"none";case AceImageObjectFit.ScaleDown:return"scale-down";default:return""}},t.prototype.getCssUnits=function(t){switch(t){case CssSizeUnits.Pixels:return"px";case CssSizeUnits.Precentage:return"%";default:return""}},t.prototype.getTextAlign=function(t){switch(t){case AceTextAlign.Left:return"left";case AceTextAlign.Center:return"center";case AceTextAlign.Right:return"right";case AceTextAlign.Justify:return"justify";default:return""}},t.prototype.getPosition=function(t){switch(t){case AcePosition.Left:return"left";case AcePosition.Center:return"center";case AcePosition.Right:return"right";default:return""}},t}(),TRD_HIDER_STYLE_ID="trd-mask-style",$Trd_NApi=function(){function t(){var t=this;this.clientApps=[],this.loadingAceCompleted=!1,window.trd_api=this,this.context=window.$trd_Context,this.context.uuid=new $Trd_CtaClientCookie,this.context.cid=new $Trd_ClientCookie,this.context.isExperienceListenersAdded=!1,this.loadPollyills((function(){t.start()}))}return t.prototype.start=function(){var t=this;this.hideAceElements(),this.getAccountSettings(this.context.environment,Number(this.context.accountId)).then((function(n){if(n.isActive){t.context.accountSettings=n,t.logger=new $Trd_Logger(t.context),t.flameSystemStatus={ONLINE:"ONLINE",OFFLINE:"OFFLINE",DEMO:"DEMO"},t.context.useSpa=!1,t.initOnce();var e=t.visitor.getTracker();t.context.accountSettings.identify&&!e?(t.context.visitorId="",t.identify().then((function(){return t.load()}))):(e&&(t.context.visitorId=e.vid,t.visitor.setTracker(e,t.context)),t.load())}}))},t.prototype.loadPollyills=function(t){var n;if(Array.prototype.findIndex)t();else{var e=document.createElement("script");e.type="text/javascript",e.async=!0;e.src="https://polyfill.io/v3/polyfill.min.js?features=".concat(encodeURIComponent(["Event","Promise","Promise.prototype.finally","Array.prototype.findIndex","CustomEvent","Array.prototype.forEach","NodeList.prototype.forEach","Object.values","Element.prototype.append","DocumentFragment.prototype.append","DocumentFragment.prototype.prepend","Element.prototype.closest","Element.prototype.prepend","URLSearchParams","URL","Array.from","Array.prototype.find","Array.prototype.includes","String.prototype.includes"].join())),e.id="trd-pollyfills";var i=document.getElementsByTagName("script")[0];null===(n=i.parentNode)||void 0===n||n.insertBefore(e,i),e.onload=function(){t()}}},t.prototype.goal=function(t){this.pageviewFired?this.events.notifyGoal(t):(window.$TRD_goals=window.$TRD_goals||[],window.$TRD_goals.push(t))},t.prototype.refreshCta=function(t){t&&document.dispatchEvent(new CustomEvent($Trd_TriggersEventsTypes.EV_CTA_FORCE_SHOW,{detail:{ctaIdentity:t}}))},t.prototype.identify=function(){var t=this;return new Promise((function(n,e){t.getIdentity().then((function(e){var i,o={accountId:t.context.accountId,DomainCookie:null===(i=t.context.cid)||void 0===i?void 0:i.value,fingerPrint:e},r="".concat(t.context.environment.trafficServiceUrl,"/api/Identity/me?").concat($Trd_Utils.objectToQueryString(o)),a=t;$Trd_Tools.JSONP(r,(function(t){t.VisitorUid&&(a.visitor.setTracker({vid:t.VisitorInternalId,vuid:t.VisitorUid},a.context),n(t))}))}))}))},t.prototype.load=function(){var t,n,e,i;(null===(n=null===(t=this.context.accountSettings)||void 0===t?void 0:t.useSpaRegExp)||void 0===n?void 0:n.length)&&(new RegExp(this.context.accountSettings.useSpaRegExp).test(null!==(i=null===(e=this.context.pageDetails)||void 0===e?void 0:e.url)&&void 0!==i?i:"")&&(this.context.useSpa=!0));this.init(),this.context.useSpa&&this.runSpa(),document.dispatchEvent(new Event($Trd_TriggersEventsTypes.EV_TRD_READY))},t.prototype.getAccountSettings=function(t,n){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(o){return this,e=localStorage.getItem("trd_acc_".concat(n,"_ts")),i=localStorage.getItem("trd_acc_".concat(n)),e&&(new Date).getTime()-Number(e)<3e5&&i?[2,Promise.resolve(JSON.parse(decodeURIComponent(atob(i))))]:[2,new Promise((function(e,i){$Trd_Tools.JSONP("".concat(t.trafficServiceUrl,"/api/settings/").concat(n),(function(t){localStorage.setItem("trd_acc_".concat(n,"_ts"),(new Date).getTime().toString()),localStorage.setItem("trd_acc_".concat(n),btoa(encodeURIComponent(JSON.stringify(t)))),e(t)}))}))]}))}))},t.prototype.getAceSelectors=function(){var t,n,e=this.context.aceSelectors||[],i=window.$TRD_OVERRIDE_PAGE||window.location.toString();if(i&&e.length>0){var o=$Trd_Utils.getPageStrUid(i,null===(t=this.context.isFriendlyUrl)||void 0===t||t);return(null===(n=e.find((function(t){return t.Url===o})))||void 0===n?void 0:n.Selectors)||[]}return[]},t.prototype.hideAceElements=function(){var t=this,n=this.getAceSelectors();!this.loadingAceCompleted&&n.length>0&&(this.attachAceHideElementsStyle(n),setTimeout((function(){return t.unhideAceElements()}),3e3))},t.prototype.attachAceHideElementsStyle=function(t){var n=document.createElement("style");n.id=TRD_HIDER_STYLE_ID,n.textContent=t.join(",")+" { opacity: 0 !important; }",document.head.appendChild(n)},t.prototype.unhideAceElements=function(){var t;this.loadingAceCompleted=!0,null===(t=document.head.querySelector("#"+TRD_HIDER_STYLE_ID))||void 0===t||t.remove()},t.prototype.getIdentity=function(){var t=this;return new Promise((function(n,e){var i;window.IdentityConfig={name:"$Trd_Identity",context:window,enableModule:!1};var o=document.createElement("script");o.type="text/javascript",o.async=!0;var r=window.location.search.includes("td=demo")?"debug":"min";o.src="".concat(t.context.environment.cdnPath,"/global/identity.").concat(r,".js"),o.id="identity_script";var a=document.getElementsByTagName("script")[0];null===(i=a.parentNode)||void 0===i||i.insertBefore(o,a),o.onload=function(){var e={excludes:{fonts:!0,enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0,canvas:!0,audio:!0}};window.requestIdleCallback?window.requestIdleCallback((function(){return __awaiter(t,void 0,void 0,(function(){var t,i,o;return __generator(this,(function(r){switch(r.label){case 0:return[4,$Trd_Identity.getPromise(e)];case 1:return t=r.sent(),i=t.map((function(t){return t.value})),o=$Trd_Identity.x64hash128(i.join(""),31),n(o),[2]}}))}))})):setTimeout((function(){return __awaiter(t,void 0,void 0,(function(){var t,i,o;return __generator(this,(function(r){switch(r.label){case 0:return[4,$Trd_Identity.getPromise(e)];case 1:return t=r.sent(),i=t.map((function(t){return t.value})),o=$Trd_Identity.x64hash128(i.join(""),31),n(o),[2]}}))}))}),200)}}))},t.prototype.initOnce=function(){var t,n,e=this;try{if(this.visitor=new $Trd_Visitor(this.context,this.logger),this.context.pageDetails=this.initPageDetails(),this.context.cid){var i=$Trd_Tools.cookie.findCookieByName(this.context.cid.name);void 0===i||0===i.length?this.context.cid.value=$Trd_Utils.generateUniqueId():this.context.cid.value=i,$Trd_Tools.cookie.set(this.context.cid.name,this.context.cid.value,{expires:this.context.cid.expires,path:"/",domain:null===(t=this.context.pageDetails)||void 0===t?void 0:t.cook_domain})}this.context.i18n=new $Trd_i18n(this.context),this.context.addUtmcodeToUrl=this.addUtmcodeToUrl,this.context.trimTaskTitle=this.trimTaskTitle,this.events=new $Trd_Events(this.context,this.logger);var o=new URLSearchParams(window.location.search),r=o.get("trd_ace_params_id"),a=o.get("trd_stream_params_id");r||a||this.events.init(),(null===(n=this.context.accountSettings)||void 0===n?void 0:n.clientApps)&&(this.clientApps=this.context.accountSettings.clientApps.map((function(t){return $TRD_ClientAppFactory.create(t,e.context)})))}catch(t){this.logger.log(t)}return!0},t.prototype.init=function(){var t,n,e,i=this;try{this.context.ctaUserPageHistoryCook=new $Trd_UserPageHistory_Cook(this.context,this.logger),this.pageviews=new $Trd_Pageview(this.context,this.logger),this.marketingAutomation=new $Trd_MarketingAutomation(this.context,this.logger,this.visitor),this.streamMngr||(this.streamMngr=new $Trd_StreamManager(this.context));var o=new URLSearchParams(window.location.search),r=o.get("trd_unit_params_id"),a=o.get("trd_ace_params_id"),c=o.get("trd_otw"),d=o.get("trd_strm"),s=o.get("trd_stream_params_id"),l=!0,u=this.showWidgetBySystemStatus();if(u&&((null===(t=this.context.accountSettings)||void 0===t?void 0:t.aceSupport)||a||c||d||s)?(this.aceManager||(this.aceManager=new $Trd_AceManager(this.context,this.streamMngr)),l=!1,this.aceManager.init().then((function(t){!t||a||s||(i.pageviews.notifyPageView(),i.pageviewFired=!0),t&&i.unhideAceElements()}))):this.unhideAceElements(),a||s)return!0;l&&(this.pageviews.notifyPageView(),this.pageviewFired=!0),setTimeout((function(){i.events.replayGoals()}),200),setTimeout((function(){i.events.handleUnsubmittedLeadForm()}),200),this.context.useSpa&&this.events.initSpa(),(null===(n=this.context.accountSettings)||void 0===n?void 0:n.trackUrl)&&(this.urlGrabber=new $Trd_UrlGrabber(this.context,this.visitor)),(null===(e=this.context.accountSettings)||void 0===e?void 0:e.trackForms)&&(this.formListener=new $Trd_FormListener(this.context,this.logger,this.visitor));var h=setInterval((function(){"complete"===document.readyState&&(clearInterval(h),i.marketingAutomation.check_cookie(),i.startExperience(u,r))}),500)}catch(t){this.logger.log(t)}return!0},t.prototype.startExperience=function(t,n){var e,i;t&&((null===(e=this.context.accountSettings)||void 0===e?void 0:e.ctaCount)||(null===(i=this.context.accountSettings)||void 0===i?void 0:i.hasInboundStreams)||n)&&(this.experienceManager?this.experienceManager.init():this.experienceManager=new $Trd_ExperienceManager(this.context,this.streamMngr))},t.prototype.showWidgetBySystemStatus=function(){var t,n,e;switch(null===(t=this.context.accountSettings)||void 0===t?void 0:t.flameStatus){case this.flameSystemStatus.OFFLINE:return!1;case this.flameSystemStatus.ONLINE:return!0;case this.flameSystemStatus.DEMO:return!!((null===(n=this.context.pageDetails)||void 0===n?void 0:n.urlParams.td)&&"demo"===this.context.pageDetails.urlParams.td||(null===(e=this.context.pageDetails)||void 0===e?void 0:e.urlParams.trd_ace_params_id));default:return!1}},t.prototype.addUtmcodeToUrl=function(t,n){return t.map((function(t){return t.cleanPageUrl=t.PageUrl,n&&n.length&&(t.PageUrl.indexOf("?")>=0?t.PageUrl=t.PageUrl+"&"+n:t.PageUrl=t.PageUrl+"?"+n),t}))},t.prototype.trimTaskTitle=function(t,n){return t.map((function(t){return t.Title.length>n-3&&(t.Title=t.Title.slice(0,n)+"..."),t}))},t.prototype.initPageDetails=function(){var t,n,e=window.$TRD_OVERRIDE_PAGE||window.location.toString(),i="";try{i=new URL(e).origin}catch(t){i=e.split("/")[2]}var o=new URLSearchParams(window.location.search).get("trd_referrer");return{url:e,browser:$Trd_Tools.getBrowser(),cook_domain:(null===(t=this.context.accountSettings)||void 0===t?void 0:t.restrictCookieToSubdomain)?location.host:$Trd_Utils.findDomain(),isMobile:$Trd_Tools.isMobile.is_mobile(),OS:$Trd_Tools.isMobile.getOs(),urlParams:$Trd_Tools.get_urlparams(e),reffer:null!==(n=null!=o?o:document.referrer)&&void 0!==n?n:"",promoUrl:i}},t.prototype.updatePageDetails=function(t,n,e){this.context.pageDetails||(this.context.pageDetails={}),this.context.pageDetails.url=t,this.context.pageDetails.urlParams=$Trd_Tools.get_urlparams(t),e.length&&(this.context.pageDetails.urlParams.td=e),this.context.pageDetails.reffer=n},t.prototype.runSpa=function(){var t,n,e,i=this;t=window.history,n=t.pushState,e=t.replaceState,t.pushState=function(e,o,r){return i.spaHistoryChange(r),n.apply(t,arguments)},t.replaceState=function(n,o,r){return r&&r!==window.location.pathname+window.location.search&&r!==window.location.href&&i.spaHistoryChange(r),e.apply(t,arguments)}},t.prototype.spaHistoryChange=function(t){var n,e;if(this.context.pageDetails){var i=t;i.indexOf(null!==(n=this.context.pageDetails.promoUrl)&&void 0!==n?n:"")<0&&(i=this.context.pageDetails.promoUrl+i),this.context.pageDetails.url=i,this.context.pageDetails.urlParams=$Trd_Tools.get_urlparams(t),this.context.pageDetails.reffer=window.location.href}null===(e=this.streamMngr)||void 0===e||e.reset(),this.init()},t}();window.trd_api=window.trd_api||new $Trd_NApi;
