! function() {
"use strict";
var t;
void 0 === window.CleverCore && (t = new((() => {
var t = Object.defineProperty,
e = Object.defineProperties,
i = Object.getOwnPropertyDescriptors,
s = Object.getOwnPropertySymbols,
o = Object.prototype.hasOwnProperty,
r = Object.prototype.propertyIsEnumerable,
n = (e, i, s) => i in e ? t(e, i, {
enumerable: !0,
configurable: !0,
writable: !0,
value: s
}) : e[i] = s,
a = (t, e) => {
for (var i in e || (e = {})) o.call(e, i) && n(t, i, e[i]);
if (s)
for (var i of s(e)) r.call(e, i) && n(t, i, e[i]);
return t
},
l = (t, s) => e(t, i(s)),
h = (t, e, i) => n(t, "symbol" != typeof e ? e + "" : e, i),
c = (t, e, i) => new Promise(((s, o) => {
var r = t => {
try {
a(i.next(t))
} catch (t) {
o(t)
}
},
n = t => {
try {
a(i.throw(t))
} catch (t) {
o(t)
}
},
a = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, n);
a((i = i.apply(t, e)).next())
})),
d = {
Class: "clever-core-ads",
MultiClass: "clever-core-ads-multiproduct",
CookieLastTrackerPrefix: "clever-last-tracker-",
CookieCounterPrefix: "clever-counter-",
CookieLifeTime: 720,
btnCss: {
right: "5px",
top: "5px",
width: "25px",
cursor: "pointer",
"min-width": "auto",
height: "25px",
position: "absolute",
"z-index": 99,
margin: "0"
},
DevGroups: [79651, 67645, 79455]
},
u = [/adspreview\.googleusercontent\.com/i, /usrfiles\.com/i],
p = {
SKIP: 1,
BGCOLOR: "#fff",
FRAMEBGCOLOR: "#fff",
COLOR: "#000",
PUBCOLOR: "#a2a2a2",
BORDER: "solid 5px #fff",
FONT_SIZE: "10px",
FONT: "Arial, Helvetica, sans-serif",
RADIUS: "7px",
BORDER_SPACE: 10,
BOX_SHADOW: "0 0 10px 0 rgba(50, 50, 50, 0.5)"
};
function m(t, e, i, s) {
return (t /= s / 2) < 1 ? i / 2 * t * t * t * t + e : -i / 2 * ((t -= 2) * t * t * t - 2) + e
}
function g(t = 0, e = 0, i = 400) {
const s = window.scrollX || window.pageXOffset,
o = window.scrollY || window.pageYOffset,
r = t - s,
n = e - o,
a = (new Date).getTime(),
l = window.setInterval((function() {
const t = (new Date).getTime() - a,
e = m(t, s, r, i),
h = m(t, o, n, i);
t >= i && window.clearInterval(l), window.scrollTo(e, h)
}), 1e3 / 60)
}
var C = t => t.charAt(0).toUpperCase() + t.slice(1),
b = () => f("hostname"),
f = t => {
var e, i, s;
try {
return null != (s = null != (i = null == (e = window.top) ? void 0 : e.location[t]) ? i : window.parent.location[t]) ? s : window.location[t]
} catch (e) {
return window.location[t]
}
},
M = t => {
var e;
if (!t) return "";
const i = /^(.+)\.(android|iphone)\.(.+)\.adsenseformobileapps\.com$/i.exec(t);
return null != (e = null == i ? void 0 : i[3]) ? e : ""
},
D = t => btoa(t),
O = (t, e = "DOMContentLoaded") => {
"loading" !== document.readyState ? t() : document.addEventListener(e, (() => {
t()
}))
},
k = t => {
const {
defaultUrl: e,
ts: i,
height: s
} = t;
let o = e;
return i && (o += `&ts=${i}`), s && (o += `&hei=${s}`), o
},
v = t => t.replace(/(.)([A-Z])/g, (function(t, e, i) {
return e + "-" + i
})).toLowerCase(),
I = () => {
const t = window.location.href,
e = document.referrer;
return ["doubleclick.net", "googlesyndication.com", "googleadservices.com"].some((i => t.includes(i) || e.includes(i)))
},
w = class {
constructor(t) {
this.URL = t
}
static exists() {
var t;
if ("undefined" != typeof $sf && "ext" in $sf) return !0;
if (window.location.href.includes("safeframe.googlesyndication.com")) return !0;
if ([62958].includes(x.group.ID)) try {
return !(null == (t = window.top) ? void 0 : t.location.hostname)
} catch (t) {
return !0
}
return !1
}
isEnabled() {
return 1 === x.group.SafeFrame
}
currentAncestor() {
if ("Firefox" === x.User.Browser) {
let t = window;
try {
for (; t !== window.top;) {
if (t.document.referrer) {
const e = new URL(t.document.referrer);
return this.URL.FetchDomain(e.origin)
}
t = t.parent
}
} catch (t) {
return x._debug("ancestorOrigin is not supported in Firefox Browser"), null
}
}
const t = window.location.ancestorOrigins;
if (void 0 === t || 0 === t.length) return null;
let e = t[0];
const i = ".cdn.ampproject.org";
return e.includes("-") && e.includes(i) && (e = this.URL.FetchDomain(e).split(i)[0].replace(/[-]+/g, ".")), this.URL.FetchDomain(e)
}
},
y = class t {
constructor(e, i, s, o, r) {
this.SafeFrame = i, this.AMP = s, this.URL = o, this.DOM = r, h(this, "BlockedRoomsByRegion", {
447: ["MI", "NV", "NY", "ID", "WA", "VT", "KY"]
}), h(this, "Click", 0), h(this, "Counter", 0), h(this, "InternalReference", 0), h(this, "Start", new Date), h(this, "isMultiProduct"), h(this, "WhitelistApps", ["com.example.flutter_ads_package", "com.example.core_clever_core_app_gam_demo", "com.example.coreCleverCoreAppGamDemo", "com.clever.core_clever_core_app_gam_demo"]), h(this, "CurrentApp", ""), h(this, "postMessageSources", ["https://sender.cleverwebserver.com"]), h(this, "CallbackUrl"), h(this, "Trackers"), h(this, "Timeout"), h(this, "InternalReferenceList"), h(this, "Whitelist"), h(this, "SDK"), h(this, "IsWL"), h(this, "Latency", {
Start: new Date,
End: new Date
}), h(this, "defaultOptions", {
group: {
ID: 0,
UniqueID: 0,
Expire: 24,
Wait: 5,
Alias: null,
LastDayHits: null,
Subdomains: null,
ParentID: null,
DisableMobile: null,
DisableIframes: 0,
UseLink: 0,
Version: null,
Active: 0,
DOMLoad: !0,
Theme: "LIGHT",
AutoClose: 0,
AnimationTimer: 750,
TriggerTimer: 0,
TCF: 0,
last_build_date: 0,
ads_script_type: ""
},
timeout: 0,
trackers: [],
internalRef: [],
whitelistDomains: ["partner.googleadservices.com", "ads.localhost", "adtester.yahooinc.com", "jac.yahoosandbox.com", "s.yimg.com", "creative-preview-an.com", "previewads.com", "livepreview.adform.com"],
whitelistApps: ["127.0.0.1"],
callbackUrl: null
}), e = this.prepareOptions(e), t.group = e.group, this.CallbackUrl = e.callbackUrl, this.Trackers = e.trackers, this.isMultiProduct = e.trackers.some((t => 1 === t.multiproduct)), this.Timeout = e.timeout, this.InternalReferenceList = e.internalRef, this.Whitelist = e.whitelistDomains, this.WhitelistApps = this.WhitelistApps.concat(e.whitelistApps), this.SDK = this.getSDK(), this.IsWL = this.IsWhitelist()
}
get Group() {
return t.group
}
set User(e) {
t.User = e
}
get User() {
return t.User
}
static _debug(t) {
console.log("CLVR: " + t)
}
Debug(e) {
t._debug(e)
}
SSL() {
return "https:" === location.protocol
}
getLocationHref() {
var t;
if (w.exists() && this.SafeFrame.isEnabled()) return null != (t = this.SafeFrame.currentAncestor()) ? t : "";
let e = f("href");
return this.AMP.isEnabled() && this.AMP.exists() && (e = window.context.sourceUrl), e
}
get TimeSpent() {
return (Date.now() - this.Start.getTime()) / 1e3
}
IsWhitelist() {
const e = this.DOM.Meta("gam-ref-url"),
i = M(e);
if (i) return !!this.WhitelistApps.includes(i) && (this.CurrentApp = i, !0);
const s = this.Trackers.find((t => t.publisher_app_id === e));
if (s && s.bundleId && this.WhitelistApps.includes(s.bundleId)) return this.CurrentApp = s.bundleId, !0;
let o = this.AMP.fetchCurrentDomain();
w.exists() && this.SafeFrame.isEnabled() && (o = o || this.SafeFrame.currentAncestor()), o = o || this.URL.CurrentDomain();
const r = {
"pubads.g.doubleclick.net": ["msid"],
"script.cleverwebserver.com": ["bid", "app"]
};
if (o in r) {
const t = r[o],
e = new URLSearchParams(window.location.search);
if (t.every((t => !e.has(t)))) return !1;
for (const i of t) {
const t = e.get(i);
if (t && this.WhitelistApps.includes(t)) return this.CurrentApp = t, !0
}
return !1
}
for (let e = 0; e < this.Whitelist.length; ++e) {
if (this.Whitelist[e].toLowerCase() === o.toLowerCase()) return !0;
if (1 === t.group.Subdomains && o.match(new RegExp("." + this.Whitelist[e] + "$", "i"))) return !0
}
return !1
}
getExpireTime() {
return this.User.Mobile && t.group.ExpireMobile ? t.group.ExpireMobile : t.group.Expire
}
prepareOptions(t) {
var e, i, s, o, r, n;
return {
trackers: this.normalizeTrackers(null != (e = t.trackers) ? e : this.defaultOptions.trackers),
group: null != (i = t.group) ? i : this.defaultOptions.group,
timeout: null != (s = t.timeout) ? s : this.defaultOptions.timeout,
internalRef: null != (o = t.internalRef) ? o : this.defaultOptions.internalRef,
whitelistDomains: [...this.defaultOptions.whitelistDomains, ...null != (r = t.whitelistDomains) ? r : []],
whitelistApps: [...this.defaultOptions.whitelistApps, ...t.whitelistApps],
callbackUrl: null != (n = t.callbackUrl) ? n : this.defaultOptions.callbackUrl
}
}
getSDK() {
var t;
const e = new URLSearchParams(window.location.search);
if (e.has("sdk")) return null != (t = e.get("sdk")) ? t : "";
return M(this.DOM.Meta("gam-ref-url")) ? "GAM" : ""
}
normalizeTrackers(t) {
return t.map(((t, e) => {
var i, s, o, r, n, h, c, d, u;
return l(a({}, t), {
FileW: Number(null != (i = t.FileW) ? i : 0),
FileH: Number(null != (s = t.FileH) ? s : 0),
multiproduct: Number(null != (o = t.multiproduct) ? o : 0),
OnlyMobile: Number(null != (r = t.OnlyMobile) ? r : 0),
DisallowOnTarget: Number(null != (n = t.DisallowOnTarget) ? n : 0),
CTR: null != (h = t.CTR) ? h : "AA",
SimultaneityGap: Number(null != (c = t.SimultaneityGap) ? c : 0),
Simultaneity: Number(null != (d = t.Simultaneity) ? d : 0),
Sort: Number(null != (u = t.Sort) ? u : e)
})
}))
}
};
h(y, "MinimalVisibility", .5), h(y, "User", {
ID: 0,
CTR: "AA",
remote_addr: !1,
LastGroup: !1,
t: 0,
Browser: void 0,
Platform: void 0,
bot: void 0,
Mobile: 0,
Region: void 0,
lastTracker: void 0,
s: void 0,
bv: void 0,
cont: void 0
}), h(y, "group");
var x = y,
T = class {
constructor(t, e) {
this.URL = t, this.DOM = e, h(this, "domains", ["ampproject.net", "ads.localhost"]), h(this, "isVisible", !1), h(this, "isAMP", !1)
}
exists() {
for (const t of this.domains) {
const e = new RegExp(t + "$"),
i = this.URL.FetchDomain(b());
if (null !== e.exec(i)) return !0
}
return !1
}
isEnabled() {
return void 0 !== x.group.AMP && 1 === x.group.AMP
}
fetchCurrentDomain() {
const t = this.DOM.Meta("origin");
return t ? this.URL.FetchDomain(t) : null
}
registerViewObserver(t) {
this.isAMP = !0, window.context.observeIntersection((e => {
e.forEach((e => {
this.isVisible || e.intersectionRatio >= x.MinimalVisibility && (this.isVisible = !0, t())
}))
}))
}
},
L = class {
constructor(t, e) {
this.DOM = t, this.URL = e
}
Click() {
const t = this.DOM.Meta("callback-url-click");
null !== t && "put-your-click-macro-here" !== t && (this.URL.IsValid(t) ? this.appendIframe(t) : x._debug("Callback: Invalid click URL"))
}
View() {
const t = this.DOM.Meta("callback-url-view");
null !== t && "put-your-view-macro-here" !== t && (this.URL.IsValid(t) ? this.appendIframe(t) : x._debug("Callback: Invalid view URL"))
}
appendIframe(t) {
const e = document.createElement("iframe");
e.setAttribute("style", "width: 1px; height: 1px; border: none; bottom: 0; left: 0; display: none;"), e.setAttribute("src", t), document.body.appendChild(e)
}
},
S = class {
constructor() {
h(this, "cache", new Map)
}
set(t, e) {
this.cache.set(t, e)
}
get(t) {
return this.cache.get(t)
}
},
F = "https://assets.cleverwebserver.com/ArrowMinimal.png",
H = "https://assets.cleverwebserver.com/Pixel.gif",
E = "https://assets.cleverwebserver.com/Close.png",
R = "https://assets.cleverwebserver.com/CloseSquare.png",
U = "https://assets.cleverwebserver.com/Clever.png",
B = "https://assets.cleverwebserver.com/CleverLogo.ico",
A = "https://assets.cleverwebserver.com/ArrowDown.png",
_ = class {
constructor(t) {
h(this, "tracker"), h(this, "DOM"), h(this, "Net"), h(this, "AMP"), h(this, "Registry"), h(this, "Callback"), h(this, "CodeUtils"), h(this, "Hooks"), h(this, "TCF"), h(this, "Translation"), h(this, "URL"), h(this, "Tracker");
const {
tracker: e,
Registry: i,
DOM: s,
AMP: o,
Net: r,
Callback: n,
CodeUtils: a,
Hooks: l,
TCF: c,
Translation: d,
URL: u,
Tracker: p
} = t;
this.tracker = e, this.DOM = s, this.Net = r, this.AMP = o, this.Registry = i, this.Callback = n, this.CodeUtils = a, this.Hooks = l, this.TCF = c, this.Translation = d, this.URL = u, this.Tracker = p
}
getInitialState(t) {
return {
body: t && document.querySelector(t) || document.body.querySelector(".GoogleActiveViewElement") || document.body.querySelector(".GoogleActiveViewInnerContainer") || document.body,
baseUrl: this.Net.fetchBaseUrl(this.tracker),
defaultUrl: this.Net.getDefaultUrl(this.tracker) || ""
}
}
getBlock(t) {
const e = d.Class;
if (1 === this.tracker.multiproduct && this.Registry.isMultiProduct) {
const e = this.CodeUtils.getMultiProductDiv(this.tracker);
return !!e && (t ? [e.div] : e.div)
}
let i = t ? this.DOM.getByClass(e) : this.AMP.exists() ? this.DOM.getByID("c") : this.DOM.getByClass(e)[0];
if (!i) {
x._debug("No .clever-core-ads detected");
const s = this.DOM.Meta("target");
if (s && window.name !== s) {
x._debug("Placeholder found by target");
const o = this.DOM.getByID(s);
if (!o) return x._debug("No sourceBannerFrame found"), !1;
const r = this.DOM.clone(o, "div");
r.className = e, this.DOM.replace(o, r), i = t ? this.DOM.getByClass(e) : this.DOM.getByClass(e)[0]
}
if (t) {
if (0 === (null == i ? void 0 : i.length)) return !1
} else if (!i) return !1
}
return i
}
getBlocks() {
return this.getBlock(!0)
}
createId(t) {
if (t.includes("_")) throw new Error("Invalid character in id");
return `clever-${x.group.ID}-${this.tracker.ID}-${t}`
}
handleFormatClick() {
return this.Net.fetchBaseUrl(this.tracker, {
ts: this.Registry.TimeSpent,
frominter: "1",
click: "1"
})
}
partialDelete(t) {
t.remove()
}
delete(t) {
this.DOM.setHTML(t, ""), this.DOM.css(t, "display", "none"), this.DOM.remove(t)
}
},
G = class extends _ {
constructor(t, e) {
super(e), this.config = t, h(this, "wasShown"), h(this, "autoCloseTimeout", null), this.wasShown = !1, this.config = l(a({}, t), {
closable: void 0 === t.closable || t.closable
})
}
Close(t = !0) {
const {
baseUrl: e
} = this.getInitialState();
if (!1 !== this.config.closable) return t && this.DOM.customFetch(e + "&closed=1"), this.DOM.clearEvents(), "base" === this.config.closeFormat ? this.closeBase() : "banner" === this.config.closeFormat ? this.closeBanner() : "other" === this.config.closeFormat ? this.closeOther() : void 0;
x._debug(`Format: ${this.config.name} is not closable`)
}
closeBase() {
const t = `#${this.GetId()}`,
e = document.querySelector(t);
e ? e.remove() : x._debug(`element: ${t} not found`)
}
closeBanner() {
"unknown" !== this.config.hook && this.Hooks.Call(this.Hooks.Events.Formats[this.config.hook].beforeClose, []);
const t = this.DOM.getByClass(d.Class);
if (0 === t.length) return !1;
const e = t => {
this.DOM.setHTML(t, ""), this.DOM.css(t, "display", "none"), this.DOM.remove(t)
};
for (const i in t) {
const s = t[i];
this.DOM.css(s, {
height: "0",
opacity: "0",
marginTop: "0"
}), setTimeout(e, x.group.AnimationTimer + 500, s)
}
return "unknown" !== this.config.hook && this.Hooks.Call(this.Hooks.Events.Formats[this.config.hook].afterClose, []), !0
}
closeOther() {
"unknown" !== this.config.hook && this.Hooks.Call(this.Hooks.Events.Formats[this.config.hook].beforeClose, []);
const t = this.DOM.getByID(this.GetId());
return t ? (setTimeout((() => {
this.delete(t)
}), x.group.AnimationTimer + 500), "unknown" !== this.config.hook && this.Hooks.Call(this.Hooks.Events.Formats[this.config.hook].afterClose, []), !0) : (x._debug(`Element ${this.GetId()} not found`), !1)
}
GetId(t, e) {
if (this.config.requiredPosition && void 0 === t) throw new Error("Position is required for this format");
let i = this.createId(`${this.config.name}`);
return t && (i += `-${t}`), e && (i += `-${e}`), i
}
addScrollListener(t = !1, e, i, s) {
if (this.wasShown) return;
const o = r => {
this.isMinimallyVisible(r, e, t, i, (() => {
window.removeEventListener("scroll", o), s && s()
}))
};
window.addEventListener("scroll", o)
}
isMinimallyVisible(t, e = 250, i = !1, s, o) {
const r = s ? s() : document.getElementById(this.GetId());
if (null === r) return;
const {
defaultUrl: n
} = this.getInitialState();
if (this.DOM.isMinimallyVisible(r)) {
if (this.wasShown) return;
if (this.wasShown = !0, i) {
const t = r.querySelectorAll("iframe");
for (let i = 0; i < t.length; i++) e = (null != e ? e : "height" in r) ? Number(r.style.height) : r.clientHeight, this.DOM.attr(t[i], {
src: n + `&hei=${e}&ts=` + this.Registry.TimeSpent + "&cube-side=" + i
})
} else {
const t = r.querySelector("iframe");
t && this.DOM.attr(t, {
src: n + `&hei=${e}&ts=` + this.Registry.TimeSpent
})
}
x._debug(`Do Callback: ${this.config.name}`), this.CodeUtils.DoCallback(this.tracker, !0), o && o()
}
}
bindBeforeUnloaded() {
if (!("A" === this.Registry.CurrentApp)) {
if (x.User.Mobile && x.User.Mobile > 0) {
let t = null;
const e = () => {
"hidden" === document.visibilityState ? t = setTimeout((() => {
const {
baseUrl: t
} = this.getInitialState(), e = new Image;
e.style.display = "none", e.src = t + "&unload=1"
}), 1e3) : "visible" === document.visibilityState && clearTimeout(t)
};
this.DOM.bind(window, "visibilitychange", e)
}
const t = () => {
const {
baseUrl: t
} = this.getInitialState(), e = new Image;
e.style.display = "none", e.src = t + "&unload=1"
};
this.DOM.bind(window, "beforeunload", t)
}
}
autoCloseValidation() {
if (x.group.AutoClose > 0) {
const {
baseUrl: t
} = this.getInitialState();
this.autoCloseTimeout = window.setTimeout((() => {
this.DOM.customFetch(t + "&autoclose=1"), this.Close(!1)
}), 1e3 * x.group.AutoClose)
}
}
clearAutoClose() {
this.autoCloseTimeout && (clearTimeout(this.autoCloseTimeout), this.autoCloseTimeout = null)
}
},
P = class extends G {
constructor(t) {
super({
name: "interstitial",
closeFormat: "base",
hook: "Interstitial",
closable: !1,
requiredPosition: !0
}, t), h(this, "translation", this.Translation.getTranslation(x.User.CTR)), h(this, "autoCloseTimeout", null)
}
handlePreLoad() {
this.Hooks.Call(this.Hooks.Events.Formats.Interstitial.beforeOpen, [this.tracker.ID]), this.tracker.DisallowOnTarget && (void 0 !== window.frames && window.frames || (window.frames = {}), this.DOM.getByTag("body")[0].appendChild(this.DOM.create("iframe", {
id: "dufr",
src: "about:blank",
title: "iframe"
}, {
width: "5px",
height: "5px",
border: "none"
}))), this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
let t = this.DOM.getViewportHeight() / 1.3,
e = this.DOM.getViewportWidth() / 1.3;
this.tracker.FileW > 0 && this.tracker.FileW < e && (e = this.tracker.FileW), this.tracker.FileH > 0 && this.tracker.FileH < t && (t = this.tracker.FileH), x.User.Mobile && (e = 300, t = 600);
const {
BGCOLOR: i,
FONT_SIZE: s,
FONT: o,
BORDER: r,
BORDER_SPACE: n,
RADIUS: a,
BOX_SHADOW: l,
PUBCOLOR: h,
COLOR: c
} = p, u = this.DOM.create("div", {
id: this.GetId("interstitial"),
className: d.Class
}, {
backgroundColor: i,
fontSize: s,
fontFamily: o,
position: "fixed",
zIndex: String(this.DOM.zIndex(1)),
border: r,
left: "50%",
top: "48%",
width: Number(e) + n + "px",
height: Number(t) + 30 + "px",
borderRadius: a,
boxShadow: l,
textShadow: "none",
padding: "0",
lineHeight: "0px"
}), m = this.DOM.create("div", {
id: this.GetId("interstitial-pub")
}, {
backgroundColor: i,
color: h,
width: "140px",
float: "left",
textAlign: "left",
padding: "4px",
cursor: "pointer",
fontFamily: o
});
u.appendChild(m);
const g = this.DOM.create("div", {
id: this.GetId("interstitial-header")
}, {
height: "15px",
fontSize: s,
backgroundColor: i,
padding: "10px 5px 10px 5px",
color: c,
float: "right",
width: "140px",
textAlign: "right",
cursor: "pointer",
fontFamily: o
});
u.appendChild(g), this.handleEmbed(e, t, u);
const C = this.DOM.getByTag("body");
C[0].appendChild(u);
const b = this.DOM.create("div", {
id: this.GetId("overlay")
}, {
zIndex: this.DOM.zIndex(-1),
opacity: "0.5",
backgroundColor: "#000000",
position: "fixed",
top: "0",
left: "0",
width: "100%",
height: "100%"
});
C[0] && C[0].appendChild(b);
const f = this.DOM.getByID(this.GetId("interstitial-img"));
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const M = this.Net.fetchBaseUrl(this.tracker, {
frominter: 1,
click: 1,
id: this.tracker.ID,
ref: window.btoa(this.Registry.getLocationHref()),
ruri: window.btoa(document.referrer),
cmpId: this.TCF.cmpId
});
return f && this.DOM.bind(f, "click", (() => {
this.Callback.Click(), window.open(M + "&ts=" + this.Registry.TimeSpent, "_blank"), this.clearAutoClose(), this.Close(!1)
})), this.DOM.css(u, "margin", "-" + (Number(t / 2) - 20) + "px 0 0 -" + Number(e / 2) + "px"), {
openUrlInter: M,
overlay: f,
pub: m,
header: g,
interstitial: u
}
}
handlePostLoad() {
return this.CodeUtils.DoCallback(this.tracker, !0), this.bindBeforeUnloaded(), this.Hooks.Call(this.Hooks.Events.Formats.Interstitial.afterOpen, [this.tracker.ID]), !0
}
setContentAndBindClick(t, e, i, s = !1) {
if (s) {
const e = this.DOM.create("img", {
src: E,
alt: "close"
}, {
position: "absolute",
zIndex: this.DOM.zIndex(5),
top: "-12px",
left: "-15px",
width: "22px",
height: "22px"
}).outerHTML;
this.DOM.setHTML(t, e)
} else this.DOM.setHTML(t, e);
this.DOM.bind(t, "click", i)
}
handleEmbed(t, e, i) {
const {
defaultUrl: s
} = this.getInitialState(), {
RADIUS: o,
FRAMEBGCOLOR: r
} = p, n = this.DOM.create("img", {
id: this.GetId("interstitial-img"),
src: "//static." + x.group.Domain + "/" + this.tracker.File,
alt: "img-clvr"
}, {
width: "100%",
height: "100%",
position: "absolute",
zIndex: this.DOM.zIndex(3),
left: "0",
cursor: "pointer",
border: "none",
borderRadius: "none",
backgroundColor: "transparent",
boxShadow: "none"
});
if (this.tracker.File) return void i.appendChild(n);
const a = this.DOM.create("div", {
id: this.GetId("interstitial-div")
}, {
position: "relative",
width: Number(t) + "px",
height: Number(e) + "px"
});
x.User.Platform && "ios" === x.User.Platform.toLowerCase() ? this.DOM.css(a, {
overflow: "auto",
"-webkit-overflow-scrolling": "touch"
}) : this.DOM.css(a, "overflow", "hidden"), n.alt = "img-inter", n.src = H, a.appendChild(n);
const l = this.DOM.create("iframe", {
id: this.GetId("interstitial-iframe"),
title: "Clever-iframe",
className: d.Class,
src: s + "&hei=" + e.toFixed(2) + "&ts=" + this.Registry.TimeSpent,
frameBorder: "0"
}, {
width: "100%",
height: "100%",
backgroundColor: r,
position: "relative",
left: "0",
cursor: "pointer",
border: "none",
margin: "0",
borderRadius: o,
zoom: this.tracker.Zoom,
"-moz-transform": "scale(" + this.tracker.Zoom + ")",
"-moz-transform-origin": "top",
"-o-transform": "scale(" + this.tracker.Zoom + ")",
"-o-transform-origin": "top",
"-webkit-transform": "scale(" + this.tracker.Zoom + ")",
"-webkit-transform-origin": "top"
});
a.appendChild(l);
const h = this.DOM.shortCutCreate("anchorClever"),
c = this.DOM.shortCutCreate("cleverLogoWhite", {}, {
top: "10px",
left: "10px",
zIndex: this.DOM.zIndex(4)
});
if (this.DOM.shortCutCreate("anchorClever"), this.DOM.append(h, c.outerHTML), this.DOM.append(a, h.outerHTML), i.appendChild(a), "interonclose" !== this.tracker.Type) {
const t = this.DOM.create("iframe", {
id: this.GetId("iframe-control"),
name: d.Class,
title: "Clever-iframe",
src: s + "&op=cycle",
frameBorder: "0",
width: "1px",
height: "1px"
}, {
width: "1px",
height: "1px",
position: "absolute",
zIndex: "9",
border: "none"
});
i.appendChild(t)
}
}
handleCommonClick(t, e, i, s, o) {
const {
FONT: r,
PUBCOLOR: n
} = p, {
CLOSE_VISIT_SITE: a
} = this.Translation.getTranslation(x.User.CTR);
if (1 === e) {
t.innerHTML = "";
const e = this.DOM.create("a", {
id: this.GetId("link-pub"),
target: "_blank",
href: i,
rel: "nofollow"
}, {
color: n,
fontFamily: r
});
e.innerText = a, t.appendChild(e), this.DOM.bind(e, "click", s)
} else this.DOM.setHTML(t, a), this.DOM.bind(t, "click", (() => {
o(), window.open(i + "&ts=" + this.Registry.TimeSpent, "_blank"), this.clearAutoClose(), s()
}))
}
setupClickHandler(t, e, i) {
this.DOM.bind(t, "click", (() => {
this.Registry.Timeout > 0 ? e() : this.Registry.Timeout <= 0 && i()
}))
}
Close(t = !0) {
this.Hooks.Call(this.Hooks.Events.Formats.Interstitial.afterClose, [this.tracker.ID]);
const {
baseUrl: e
} = this.getInitialState();
this.DOM.clearEvents(), t && this.DOM.customFetch(e + "&closed=1");
const i = this.DOM.getByID(this.GetId("overlay"));
i && this.delete(i);
const s = this.DOM.getByID(this.GetId("interstitial"));
return s && this.delete(s), this.Hooks.Call(this.Hooks.Events.Formats.Interstitial.afterClose, [this.tracker.ID]), !0
}
autoCloseValidation() {
if (x.group.AutoClose > 0) {
const {
baseUrl: t
} = this.getInitialState();
this.autoCloseTimeout = window.setTimeout((() => {
this.DOM.customFetch(t + "&autoclose=1"), this.Close(!1)
}), 1e3 * x.group.AutoClose)
}
}
clearAutoClose() {
this.autoCloseTimeout && (clearTimeout(this.autoCloseTimeout), this.autoCloseTimeout = null)
}
},
N = class extends P {
constructor(t) {
super(t)
}
Open() {
const {
pub: t,
openUrlInter: e,
header: i
} = this.handlePreLoad();
this.handleCommonClick(i, x.group.UseLink, e, (() => this.Close()), (() => this.Callback.Click())), this.setupClickHandler(i, (() => {
this.Callback.Click(), window.open(e + "&ts=" + this.Registry.TimeSpent, "_blank")
}), (() => this.Close())), this.DOM.setHTML(i, this.Registry.Timeout.toString()), this.cleverVerifyCloseInterstitial(i, t, e), this.handlePostLoad()
}
cleverVerifyCloseInterstitial(t, e, i) {
const {
CLOSE_VISIT_SITE: s,
CLOSE: o
} = this.translation, r = e, n = (t, e) => {
this.DOM.setHTML(t, e), this.DOM.bind(t, "click", (() => this.Close()))
}, a = t => {
const e = this.DOM.create("img", {
src: E,
alt: "close",
width: 42,
height: 42
}, {
position: "absolute",
zIndex: this.DOM.zIndex(5),
top: "-20px",
left: "-20px",
width: "42px",
height: "42px"
}).outerHTML;
this.DOM.setHTML(t, e)
};
if (0 === this.Registry.Timeout) {
const t = s + " »";
return 1 === x.group.UseLink ? this.handleLinkBehavior(r, i, n) : n(r, t), x.User.Mobile ? a(r) : this.DOM.setHTML(r, `[${o}]`), void(x.group.AutoClose > 0 && setTimeout((() => this.Close()), 1e3 * x.group.AutoClose))
}
this.DOM.setHTML(r, this.Registry.Timeout.toString()), this.Registry.Timeout--, setTimeout((() => this.cleverVerifyCloseInterstitial(t, e, i)), 1e3)
}
handleLinkBehavior(t, e, i) {
const {
FONT: s,
PUBCOLOR: o
} = p, {
CLOSE_VISIT_SITE: r
} = this.translation, n = this.GetId("link-pub");
let a = this.DOM.getByID(n);
a || (a = this.DOM.create("a", {
id: n,
target: "_blank",
href: e,
rel: "nofollow"
}, {
color: o,
fontFamily: s
}), t.appendChild(a)), i(a, r + " »")
}
},
V = class extends P {
constructor(t) {
super(t)
}
Open() {
const {
openUrlInter: t,
header: e
} = this.handlePreLoad(), {
CLOSE_VISIT_SITE: i
} = this.translation, {
PUBCOLOR: s,
FONT: o
} = p;
if (x.group.UseLink) {
let r = this.DOM.getByID(this.GetId("link-pub"));
r ? this.DOM.setHTML(r, i + " »") : (this.DOM.setHTML(e, ""), r = this.DOM.create("a", {
id: this.GetId("link-pub"),
target: "_blank",
href: t,
rel: "nofollow"
}, {
color: s,
fontFamily: o
}), this.DOM.setHTML(r, i + " »"), e.appendChild(r), this.DOM.bind(r, "click", (() => {
this.Close()
})))
} else this.DOM.setHTML(e, i + " »"), this.DOM.bind(e, "click", (() => {
this.Callback.Click(), window.open(t + "&ts=" + this.Registry.TimeSpent, "_blank"), this.Close()
}));
x.group.AutoClose > 0 && setTimeout((() => {
this.Close()
}), 1e3 * x.group.AutoClose), this.handlePostLoad()
}
},
W = class extends P {
constructor(t) {
super(t)
}
Open() {
const {
header: t,
pub: e,
openUrlInter: i
} = this.handlePreLoad(), {
CLOSE_VISIT_SITE: s
} = this.translation, {
PUBCOLOR: o,
FONT: r
} = p;
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const n = this.Net.fetchBaseUrl(this.tracker, {
id: this.tracker.ID,
ref: window.btoa(this.Registry.getLocationHref()),
ruri: window.btoa(document.referrer),
cmpId: this.TCF.cmpId
});
if (this.DOM.setHTML(t, this.DOM.create("img", {
src: E,
alt: "close",
width: 42,
height: 42
}, {
position: "absolute",
zIndex: this.DOM.zIndex(5),
top: "-20px",
left: "-20px",
width: "42px",
height: "42px"
}).outerHTML), this.DOM.setHTML(e, ""), 1 == x.group.UseLink) {
const e = this.DOM.getByID(this.GetId("link-pub"));
if (e) this.DOM.setHTML(e, s + " »");
else {
this.DOM.setHTML(t, "");
const e = this.DOM.create("a", {
id: this.GetId("link-pub"),
target: "_blank",
href: i,
rel: "nofollow"
}, {
color: o,
fontFamily: r
});
this.DOM.setHTML(e, s + " »"), t.appendChild(e), this.DOM.bind(e, "click", (() => {
this.Close()
}))
}
} else this.DOM.setHTML(t, s + " »"), this.DOM.bind(t, "click", (() => {
this.Callback.Click(), window.open(n, "_blank"), this.Close()
}));
const a = this.DOM.getByID(this.GetId("overlay"));
a && this.DOM.bind(a, "click", (() => {
this.Callback.Click(), window.open(n, "_blank"), this.Close()
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close()
}), 1e3 * x.group.AutoClose), this.handlePostLoad()
}
},
z = class extends P {
constructor(t) {
super(t)
}
Open() {
const {
pub: t,
openUrlInter: e,
header: i
} = this.handlePreLoad(), {
CLOSE_VISIT_SITE: s
} = this.translation, {
PUBCOLOR: o,
FONT: r
} = p, n = this.Net.fetchBaseUrl(this.tracker);
if (this.setContentAndBindClick(t, "", (() => {
this.clearAutoClose(), this.Close()
}), !0), 1 == x.group.UseLink) {
let t = this.DOM.getByID(this.GetId("link-pub"));
t || (this.DOM.setHTML(i, ""), t = this.DOM.create("a", {
id: this.GetId("link-pub"),
target: "_blank",
href: e,
rel: "nofollow"
}, {
color: o,
fontFamily: r
}), i.appendChild(t)), this.setContentAndBindClick(t, s + " »", (() => {
this.clearAutoClose(), this.Close()
}))
} else this.setContentAndBindClick(i, s + " »", (() => {
this.Callback.Click(), window.open(`${n}&ts=${this.Registry.TimeSpent}&skip=1`, "_blank"), this.clearAutoClose(), this.Close(!1)
}));
setTimeout((() => {
if ("interclose" === this.tracker.Type) {
const t = this.DOM.getByID(this.GetId("overlay"));
t && this.DOM.bind(t, "click", (() => {
this.DOM.customFetch(n + "&outside=1"), this.clearAutoClose(), this.Close(!1)
}))
}
}), 2e3), this.autoCloseValidation(), this.handlePostLoad()
}
},
q = class extends G {
constructor(t, e) {
super(t, e), this.config = t
}
bindSponsorClickEvents(t = !1, e = [], i = !1, s = !0) {
s && this.bindBeforeUnloaded();
const o = document.querySelector("#cleverLogoClick");
this.DOM.bind(window, "message", (e => {
if (void 0 !== e.data.cursorLogoSrc) {
if (!x.User.Mobile) {
const t = document.querySelector("#cleverImageCreative");
t.src = "https://lp.cleverwebserver.com/logos_sponsors/logo_" + e.data.cursorLogoSrc + ".png", null == t || t.setAttribute("alt", e.data.cursorLogoSrc)
}
t && (o.src = "https://lp.cleverwebserver.com/logos_sponsors/tap_" + e.data.cursorLogoSrc + ".gif", null == o || o.setAttribute("alt", e.data.cursorLogoSrc))
}
}));
const r = this.Net.fetchBaseUrl(this.tracker, {
sponsored: "1"
}),
n = function(t, e) {
const i = document.getElementById("cleverImageCreative"),
s = i ? i.offsetWidth + 5 : 0;
a >= window.innerWidth - s ? i.style.visibility = "hidden" : (i.style.visibility = "visible", i.style.left = a + 5 + "px", i.style.top = l + -30 + "px")
};
let a = 0,
l = 0,
h = 0,
c = 0;
const d = function(t) {
a = t.pageX, l = t.pageY, n()
},
u = function() {
h != window.scrollX && (a -= h, h = window.scrollX, a += h), c != window.scrollY && (l -= c, c = window.scrollY, l += c), n()
};
x.User.Mobile || (this.DOM.bind(document, "mousemove", d), this.DOM.bind(document, "scroll", u));
let p = !1;
const m = t => {
var e;
p || (x.User.Mobile || null == (e = document.querySelector("#cleverImageCreative")) || e.remove(), this.Callback.Click(), window.open(r + "&ts=" + this.Registry.TimeSpent, "_blank"), this.clearAutoClose(), this.Close(), p = !0)
};
if (i) {
const t = this.DOM.getByID("cleverLogoClick"),
e = this.DOM.getByClass("clever-core-ads")[0],
i = () => {
const i = this.DOM.height(e);
window.scrollY + 100 >= i ? this.DOM.css(t, "display", "block") : this.DOM.css(t, "display", "none")
};
this.DOM.bind(window, "scroll", i)
}
this.DOM.bind(window, "click", (t => {
const i = t.target;
i && !e.includes(i.id) && (t => {
let e = t;
for (let t = 0; t < 5; t++) {
if ("A" === e.tagName) return !0;
e = e.parentElement
}
return !1
})(i) && m()
})), t && this.DOM.bind(o, "click", m)
}
Close() {
var t, e;
super.Close(!1), null == (t = document.querySelector("#cleverLogoClick")) || t.remove(), x.User.Mobile || null == (e = document.querySelector("#cleverImageCreative")) || e.remove()
}
autoCloseValidation() {
if (x.group.AutoClose > 0) {
const {
baseUrl: t
} = this.getInitialState();
this.autoCloseTimeout = window.setTimeout((() => {
this.DOM.customFetch(t + "&autoclose=1"), this.Close()
}), 1e3 * x.group.AutoClose)
}
}
clearAutoClose() {
this.autoCloseTimeout && (clearTimeout(this.autoCloseTimeout), this.autoCloseTimeout = null)
}
},
$ = {
Banner: class extends G {
constructor(t) {
super({
name: "info-banner",
closeFormat: "base",
hook: "Banner"
}, t), h(this, "cache"), h(this, "interval"), h(this, "Config"), this.Config = {
CleverLogoZIndex: 50,
CloseButtonZIndex: 50
}, this.cache = new S, this.interval = null
}
Open() {
var t, e;
this.Hooks.Call(this.Hooks.Events.Formats.Banner.beforeOpen, [this.tracker.ID]);
const i = (null != (t = this.tracker.FileW) ? t : 300) + "px",
s = (null != (e = this.tracker.FileH) ? e : 600) + "px";
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const {
defaultUrl: o
} = this.getInitialState(), r = this.getBlock(!1);
if (!r) return !1;
let n = null;
this.Hooks.Call(this.Hooks.Events.Formats.Banner.beforeEach, [this.tracker.ID]), this.DOM.css(r, {
position: "relative",
overflow: "hidden",
backgroundColor: "transparent",
display: "block",
visibility: "visible",
margin: "0 auto",
width: i
}), this.DOM.attr(r, {
id: this.GetId("banner-img-enclosure")
}), this.DOM.isDisplayed(r) || (this.Net.ExtraParam += "&nv=1");
const a = r.parentElement;
if (a && !this.DOM.isVisible(a)) {
this.Registry.Debug("Placeholder is not visible"), this.DOM.css(a, {
display: "block",
visibility: "visible"
});
const t = a.parentElement;
t && !this.DOM.isVisible(t) && this.DOM.css(t, {
display: "block",
visibility: "visible"
})
}
x.User.Mobile && a && this.DOM.css(a, {
width: "100%"
});
const l = this.DOM.create("div", {
className: this.GetId(),
id: this.GetId()
}, {
maxWidth: "15px",
height: "15px",
color: "#fff",
padding: "0",
top: "5px",
left: "5px",
zIndex: this.Config.CleverLogoZIndex.toString(),
fontSize: "9px",
position: "absolute",
textShadow: "-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000",
fontFamily: "verdana",
transition: "max-width .5s ease",
overflow: "hidden"
}),
h = this.DOM.shortCutCreate("anchorClever"),
c = this.DOM.shortCutCreate("cleverLogoWhite", {}, {
position: "unset"
});
this.DOM.shortCutCreate("anchorClever"), this.DOM.append(h, c.outerHTML), this.DOM.append(l, h.outerHTML), r.appendChild(l);
const u = this.DOM.create("div", {
id: this.GetId("banner-img-close"),
className: this.GetId("banner-img-close")
});
Object.assign(u.style, d.btnCss), this.DOM.setHTML(u, `
'), r.appendChild(u), this.DOM.bind(l, "mouseover", (() => {
this.DOM.css(l, {
maxWidth: "150px"
})
})), this.DOM.bind(l, "mouseleave", (() => {
this.DOM.css(l, {
maxWidth: "15px"
})
}));
const p = this.DOM.create("img", {
id: this.GetId("banner-img"),
src: H,
alt: "CLVR"
}, {
width: i,
height: s,
zIndex: (this.Config.CloseButtonZIndex - 2).toString(),
top: "0",
left: "0",
position: "absolute",
cursor: "pointer",
border: "none",
borderRadius: "none",
backgroundColor: "transparent",
boxShadow: "none"
});
n = o + "&hei=" + parseInt(s).toFixed(2) + "px&mode=banner";
const m = this.DOM.create("iframe", {
id: this.GetId("banner-iframe"),
name: d.Class,
src: "about:blank",
frameBorder: "0",
scrolling: "no",
title: "Clever-iframe"
}, {
width: "100%",
height: s,
zIndex: "0",
backgroundColor: "#fff",
border: "none",
margin: "0"
});
this.DOM.bind(p, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), r.appendChild(p), r.appendChild(m);
const g = this.DOM.getByID(this.GetId("banner-img-close"));
x.User.Mobile || (this.DOM.bind(p, "mouseover", (() => {
this.DOM.css(g, {
opacity: "100"
})
})), this.DOM.bind(p, "mouseleave", (() => {
this.DOM.css(g, {
opacity: "0"
})
})), this.DOM.bind(g, "mouseover", (() => {
this.DOM.css(g, {
opacity: "100"
}), this.DOM.css(this.GetId("close-image"), {
transform: "scale(1.25)"
})
})), this.DOM.bind(g, "mouseleave", (() => {
this.DOM.css(g, {
opacity: "0"
}), this.DOM.css(this.GetId("close-image"), {
transform: "scale(1)"
})
}))), this.DOM.bind(g, "click", (() => {
const t = this.DOM.getByID(g.id.replace("-close", "") + "-enclosure");
t ? (this.DOM.destroyElement(t), this.Hooks.Call(this.Hooks.Events.Formats.Banner.afterCloseBind, [this.tracker.ID])) : x._debug("Banner to close not found")
})), this.Hooks.Call(this.Hooks.Events.Formats.Banner.afterEach, [this.tracker.ID]);
const C = this.GetId("banner-img-enclosure"),
b = this.DOM.getByID(C);
if (!b) return x._debug("Banner enclosure element not found"), !1;
if (this.DOM.isMinimallyVisible(b) && n) {
x._debug(C + " is visible, change the src");
const t = this.DOM.getByID(this.GetId("banner-iframe"));
if (!t) return x._debug("iframe not found"), !1;
this.DOM.attr(t, "src", n + "&ts=" + this.Registry.TimeSpent), this.CodeUtils.DoCallback(this.tracker, !0)
}
return "loading" !== document.readyState ? this.isMinimallyVisible(void 0, 250, !1, (() => r)) : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t, 250, !1, (() => r)))), this.addScrollListener(!1, 250, (() => r)), this.Hooks.Call(this.Hooks.Events.Formats.Banner.afterAll, [this.tracker.ID]), !0
}
},
BannerApp: class extends G {
constructor(t) {
super({
name: "Banner-App",
closable: !0,
hook: "BannerApp",
closeFormat: "base"
}, t)
}
Open() {
var t, e;
const {
defaultUrl: i,
body: s
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.BannerApp.beforeOpen, [this.tracker.ID]);
const o = null != (t = this.tracker.FileW) ? t : 300,
r = null != (e = this.tracker.FileH) ? e : 250,
n = 1 === o ? "100%" : o + "px",
a = 1 === r ? "100%" : r + "px",
l = I(),
h = this.GetId(),
c = this.DOM.create("div", {
id: h
}, {
width: n,
height: a,
position: "relative",
margin: "0 auto"
}),
d = this.GetId("overlay"),
u = this.DOM.shortCutCreate("overlay", {
id: d
}),
p = this.GetId("close"),
m = this.DOM.shortCutCreate("bannerClose", {
id: p
}, l ? {
right: "30px"
} : {}),
g = this.DOM.shortCutCreate("anchorClever", {}, l ? {
position: "absolute",
top: "0",
left: "0",
height: "30px",
width: "30px"
} : {}, l ? "div" : void 0);
this.DOM.bind(g, "click", (t => {
t.stopImmediatePropagation(), window.open(g.href, "_blank")
}));
const C = this.DOM.shortCutCreate("cleverLogo"),
b = i + "&hei=" + parseInt(a) + "&ts=" + this.Registry.TimeSpent,
f = this.DOM.create("iframe", {
id: this.GetId("iframe"),
src: b,
scrolling: "no"
}, {
width: n,
height: a,
border: "none"
});
this.DOM.append(c, u.outerHTML), this.DOM.append(c, m.outerHTML), this.DOM.append(g, C.outerHTML), this.DOM.append(c, g.outerHTML), this.DOM.append(c, f.outerHTML), this.DOM.append(s, c.outerHTML), this.DOM.bind(m, "click", (t => {
t.stopImmediatePropagation(), this.Close()
})), this.DOM.bind(l ? document : u, "click", (t => {
t.stopImmediatePropagation(), this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), x._debug("Do Callback: Banner-App"), this.CodeUtils.DoCallback(this.tracker, !0), this.Hooks.Call(this.Hooks.Events.Formats.BannerApp.afterOpen, [this.tracker.ID])
}
},
BannerAppCountdown: class extends G {
constructor(t) {
super({
name: "Banner-App-Countdown",
closeFormat: "base",
hook: "BannerAppCountdown"
}, t)
}
Open() {
const {
defaultUrl: t,
body: e
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.BannerAppCountdown.beforeOpen, [this.tracker.ID]);
const i = I(),
s = this.GetId(""),
o = this.DOM.create("div", {
id: s
}, {
width: "100vw",
height: "100vh",
position: "relative",
margin: "0 auto"
}),
r = this.GetId("overlay"),
n = this.GetId("close"),
a = this.GetId("percentage"),
l = this.DOM.shortCutCreate("overlay", {
id: r
}, {
height: "85%",
top: "iOS" === x.User.Platform ? "30px" : "0"
}),
h = this.DOM.create("div", {
id: a
}, {
position: "absolute",
width: "20px",
height: "20px",
display: "block",
right: "iOS" === x.User.Platform ? "32px" : "3px",
zIndex: "999999",
fontWeight: "bold",
backgroundColor: "white",
borderRadius: "50%",
color: "black",
textAlign: "center",
lineHeight: "20px"
}),
c = this.DOM.shortCutCreate("bannerClose", {
id: n
}, {
right: "iOS" === x.User.Platform ? "32px" : "2px",
transition: "background-color 5s linear",
display: "none"
}),
d = this.DOM.shortCutCreate("anchorClever", {}, i ? {
position: "absolute",
top: "0",
left: "0",
height: "30px",
width: "30px"
} : {}, i ? "div" : void 0);
this.DOM.bind(d, "click", (t => {
t.stopImmediatePropagation(), window.open(d.href, "_blank")
}));
const u = this.GetId("logo"),
p = this.DOM.shortCutCreate("cleverLogo", {
id: u
}),
m = t + "&ts=" + this.Registry.TimeSpent,
g = this.DOM.create("iframe", {
id: this.GetId("iframe"),
scrolling: "no",
src: m
}, {
width: "100%",
height: "100%",
border: "none"
});
this.DOM.append(o, l.outerHTML), this.DOM.append(o, c.outerHTML), this.DOM.append(o, h.outerHTML), this.DOM.append(d, p.outerHTML), this.DOM.append(o, d.outerHTML), this.DOM.append(o, g.outerHTML), this.DOM.append(e, o.outerHTML);
const C = this.DOM.getByID(a),
b = this.DOM.getByID(n);
this.handleFormatClose(C, b), this.DOM.bind(i ? document : l, "click", (t => {
t.stopImmediatePropagation(), this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), x._debug("Do Callback: Banner-App Countdown"), this.CodeUtils.DoCallback(this.tracker, !0), this.Hooks.Call(this.Hooks.Events.Formats.BannerAppCountdown.afterOpen, [this.tracker.ID])
}
handleFormatClose(t, e) {
let i = 5e3;
const s = setInterval((() => {
i -= 1e3, t.innerText = "" + i / 1e3, i <= 0 && (clearInterval(s), null == t || t.remove(), e.style.display = "block", this.DOM.bind(e, "click", (t => {
t.stopImmediatePropagation(), this.Close()
})))
}), 1e3)
}
},
BannerAppVideo: class extends G {
constructor(t) {
super({
name: "Banner-App-Video",
closeFormat: "base",
hook: "BannerAppVideo"
}, t)
}
Open() {
var t, e;
const {
defaultUrl: i,
body: s
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.BannerAppVideo.beforeOpen, [this.tracker.ID]);
let o = null != (t = this.tracker.FileW) ? t : 300,
r = null != (e = this.tracker.FileH) ? e : 600;
const n = I();
1 === o && 1 === r && (o = 100, r = 100);
const a = this.GetId(""),
l = this.DOM.create("div", {
id: a
}, {
width: o + (100 === o ? "vw" : "px"),
height: r + (100 === r ? "vh" : "px"),
position: "relative",
margin: "0 auto"
}),
h = this.GetId("overlay"),
c = this.GetId("close"),
d = this.DOM.shortCutCreate("overlay", {
id: h
}, {
height: "85%",
top: "iOS" === x.User.Platform ? "30px" : "0"
}),
u = this.DOM.shortCutCreate("bannerClose", {
id: c
}, {
right: "iOS" === x.User.Platform ? "32px" : "2px"
}),
p = this.DOM.shortCutCreate("anchorClever", {}, n ? {
position: "absolute",
top: "0",
left: "0",
height: "30px",
width: "30px"
} : {}, n ? "div" : void 0);
this.DOM.bind(p, "click", (t => {
t.stopImmediatePropagation(), window.open(p.href, "_blank")
}));
const m = this.GetId("logo"),
g = this.DOM.shortCutCreate("cleverLogo", {
id: m
}),
C = i + "&hei=" + r + "&ts=" + this.Registry.TimeSpent,
b = this.DOM.create("iframe", {
id: this.GetId("iframe"),
scrolling: "no",
src: C
}, {
width: o + (100 === o ? "vw" : "px"),
height: r + (100 === r ? "vh" : "px"),
border: "none"
});
if (this.DOM.append(l, d.outerHTML), this.DOM.append(l, u.outerHTML), this.DOM.append(p, g.outerHTML), this.DOM.append(l, p.outerHTML), this.DOM.append(l, b.outerHTML), this.DOM.append(s, l.outerHTML), 100 === o && 100 === r) {
const t = s.querySelector("#" + c),
e = s.querySelector("#" + m);
e && this.DOM.css(e, {
left: "35px",
top: "15px"
}), t && this.DOM.css(t, {
display: "none"
})
}
this.DOM.bind(u, "click", (t => {
t.stopImmediatePropagation(), this.Close()
})), this.DOM.bind(n ? document : d, "click", (t => {
t.stopImmediatePropagation(), this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), x._debug("Do Callback: Banner-App Video"), this.CodeUtils.DoCallback(this.tracker, !0), this.Hooks.Call(this.Hooks.Events.Formats.BannerAppVideo.afterOpen, [this.tracker.ID])
}
},
BannerCube: class extends G {
constructor(t) {
super({
name: "banner-cube",
hook: "BannerCube",
closeFormat: "base"
}, t)
}
Open() {
var t, e, i, s;
this.Hooks.Call(this.Hooks.Events.Formats.BannerCube.beforeOpen, [this.tracker.ID]);
const o = this.getBlock(!1);
if (!o) return !1;
const r = this.GetId(""),
n = this.DOM.create("div", {
id: r
}, {
cursor: "pointer",
width: "300px",
height: "250px",
margin: "auto",
perspective: "800px",
perspectiveOrigin: "50% 225px"
}),
l = this.GetId("overlay"),
h = this.DOM.shortCutCreate("overlay", {
id: l
}, {
zIndex: "14"
}),
c = this.DOM.create("div", {
id: this.GetId("stage")
}, {
transition: "transform 4s",
transformStyle: "preserve-3d",
position: "relative"
}),
d = this.GetId("close"),
u = this.DOM.shortCutCreate("bannerClose", {
id: d
}),
p = this.DOM.shortCutCreate("anchorClever"),
m = this.DOM.shortCutCreate("cleverLogo"),
g = this.DOM.create("div", {
id: this.GetId("shape")
}, {
animation: "spin_Cube 14s infinite linear",
position: "relative",
top: "46px",
margin: "0 auto",
height: "200px",
width: "200px",
transformStyle: "preserve-3d"
}),
C = {
position: "absolute",
height: "200px",
width: "200px",
"box-sizing": "border-box",
"background-color": "rgba(255, 255, 255, 0.6)",
transition: "-webkit-transform 1s ease-in-out",
"backface-visibility": "visible"
},
b = {
width: "100%",
"max-width": "300px",
height: "100%",
"max-height": "250px",
border: "none"
};
let f = -90;
for (let t = 1; t <= 4; t++) {
const e = this.DOM.create("div", {
id: this.GetId("side-" + t)
}, a(a({}, C), {
transform: `rotateY(${f}deg) translateZ(100px)`
}));
f += 90;
const i = this.DOM.create("iframe", {
id: this.GetId("frame-" + t)
}, b);
this.DOM.append(e, i.outerHTML), this.DOM.append(g, e.outerHTML)
}
const M = this.DOM.create("style");
return M.type = "text/css", M.appendChild(document.createTextNode("@keyframes spin_Cube { from {transform: rotateY(0);} to { transform: rotateY(-360deg); } }")), this.DOM.append(c, g.outerHTML), this.DOM.append(n, u.outerHTML), this.DOM.append(p, m.outerHTML), this.DOM.append(n, p.outerHTML), this.DOM.append(n, h.outerHTML), this.DOM.append(n, c.outerHTML), this.DOM.append(o, M.outerHTML), this.DOM.append(o, n.outerHTML), null == (t = o.querySelector("#" + d)) || t.addEventListener("click", (() => {
this.Close()
})), null == (e = o.querySelector("#" + l)) || e.addEventListener("click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank");
const t = o.querySelector("#" + r);
t && (t.style.animationPlayState = "running")
})), null == (i = o.querySelector("#" + r)) || i.addEventListener("mouseenter", (function() {
const t = o.querySelector("#" + r);
t && (t.style.animationPlayState = "paused")
})), null == (s = o.querySelector("#" + r)) || s.addEventListener("mouseleave", (function() {
const t = o.querySelector("#" + r);
t && (t.style.animationPlayState = "running")
})), "loading" !== document.readyState ? this.isMinimallyVisible(void 0, 250, !0) : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t, 250, !0))), this.addScrollListener(!0), this.Hooks.Call(this.Hooks.Events.Formats.BannerCube.afterOpen, [this.tracker.ID]), !0
}
},
Box3D: class extends G {
constructor(t) {
super({
name: "3DBox",
closeFormat: "base",
hook: "Box3D"
}, t)
}
Open() {
var t, e;
this.Hooks.Call(this.Hooks.Events.Formats.Box3D.beforeOpen, [this.tracker.ID]);
const i = this.getBlock(!1);
if (!i) return !1;
const s = this.GetId(""),
o = this.DOM.create("div", {
id: s
}, {
width: x.User.Mobile ? "300px" : "970px",
height: "250px",
position: "relative",
margin: "0 auto"
}),
r = this.GetId("overlay"),
n = this.DOM.shortCutCreate("overlay", {
id: r
}, {
zIndex: "14"
}),
a = this.GetId("close"),
l = this.DOM.create("img", {
id: a,
src: E,
alt: "close"
});
Object.assign(l.style, d.btnCss);
const h = this.DOM.shortCutCreate("anchorClever"),
c = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
u = this.DOM.create("iframe", {
id: this.GetId("iframe"),
scrolling: "no",
title: "Clever-iframe"
}, {
width: "100%",
height: "100%",
border: "none"
});
this.DOM.append(o, n.outerHTML), this.DOM.append(o, l.outerHTML), this.DOM.append(h, c.outerHTML), this.DOM.append(o, h.outerHTML), this.DOM.append(o, u.outerHTML), this.DOM.append(i, o.outerHTML), null == (t = i.querySelector("#" + a)) || t.addEventListener("click", (() => {
this.Close()
})), null == (e = i.querySelector("#" + r)) || e.addEventListener("click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), "loading" !== document.readyState ? this.isMinimallyVisible() : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t))), this.addScrollListener(), this.Hooks.Call(this.Hooks.Events.Formats.Box3D.afterOpen, [this.tracker.ID])
}
},
Cube: class extends G {
constructor(t) {
super({
name: "cube",
hook: "Cube",
closeFormat: "base"
}, t)
}
Open() {
var t, e, i, s;
this.Hooks.Call(this.Hooks.Events.Formats.Cube.beforeOpen, [this.tracker.ID]);
const o = this.getBlock(!1);
if (!o) return !1;
const r = this.GetId(""),
n = this.DOM.create("div", {
id: r
}, {
cursor: "pointer",
width: "300px",
height: "250px",
margin: "auto",
position: "relative"
}),
a = this.GetId("overlay"),
l = this.DOM.shortCutCreate("overlay", {
id: a
}),
h = this.GetId("close"),
c = this.DOM.shortCutCreate("bannerClose", {
id: h
}),
d = this.DOM.shortCutCreate("anchorClever"),
u = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
p = this.DOM.create("iframe", {
id: this.GetId("iframe"),
title: "Clever-iframe"
}, {
width: "100%",
maxWidth: "300px",
height: "100%",
maxHeight: "250px",
minHeight: "200px",
border: "none"
});
this.DOM.append(n, l.outerHTML), this.DOM.append(n, c.outerHTML), this.DOM.append(d, u.outerHTML), this.DOM.append(n, d.outerHTML), this.DOM.append(n, p.outerHTML), this.DOM.append(o, n.outerHTML);
const m = document.getElementById(this.GetId("iframe"));
return null == (t = o.querySelector("#" + h)) || t.addEventListener("click", (() => {
this.Close()
})), null == (e = o.querySelector("#" + a)) || e.addEventListener("mouseenter", (() => {
var t;
null == (t = null == m ? void 0 : m.contentWindow) || t.postMessage({
in: !0
}, "*")
})), null == (i = o.querySelector("#" + a)) || i.addEventListener("mouseleave", (() => {
var t;
null == (t = m.contentWindow) || t.postMessage({
in: !1
}, "*")
})), null == (s = o.querySelector("#" + a)) || s.addEventListener("click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), "loading" !== document.readyState ? this.isMinimallyVisible() : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t))), this.addScrollListener(), this.Hooks.Call(this.Hooks.Events.Formats.Cube.afterOpen, [this.tracker.ID]), !0
}
},
ExpandableBannerLeft: class extends G {
constructor(t) {
super({
name: "expandable-banner-left",
hook: "ExpandableBannerLeft",
closeFormat: "banner"
}, t), h(this, "Config", {
CloseButtonZIndex: 50
})
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.ExpandableBannerLeft.beforeOpen, []);
const t = this.getBlocks();
if (!t) return;
const {
defaultUrl: e
} = this.getInitialState(), i = (t, e) => () => {
if (!1 === e) return void this.Close();
e = !1;
const i = (t, e) => {
const i = e ? "720px" : "300px",
s = e ? "300px" : "250px",
o = this.DOM.getByID(this.GetId(t, "inner-box"));
o && this.DOM.css(o, {
width: i,
height: s
});
const r = this.DOM.getByID(this.GetId(t, "arrow"));
r && this.DOM.css(r, "display", "none")
},
s = this.DOM.getByID(this.GetId(t, "box"));
s && setTimeout((() => {
s.onmouseout = () => {
i(t, !1)
}, s.onmouseover = () => {
i(t, !0)
}
}), 500), i(t, !1)
};
x._debug("Detected ExpandableBannerLeft ad elements: " + t.length);
for (let e = 0; e < t.length; e++) {
const s = this.DOM.create("div", {
id: this.GetId(e)
}, {
background: "transparent",
width: "300px",
height: "250px"
}),
o = this.DOM.create("div", {
id: this.GetId(e, "box")
}, {
position: "relative",
width: "728px",
height: "300px",
left: "0"
}),
r = this.DOM.shortCutCreate("overlay", {
id: this.GetId(e, "overlay")
}),
n = this.DOM.create("div", {
id: this.GetId(e, "inner-box")
}, {
position: "absolute",
maxWidth: "100%",
zIndex: "5043",
width: "300px",
height: "250px",
left: "0",
top: "0",
transition: "all .2s ease-in-out",
border: "none"
}),
a = this.DOM.create("div", {
id: this.GetId(e, "close")
}, d.btnCss),
l = this.DOM.shortCutCreate("anchorClever"),
h = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId(e, "logo")
}, {
top: "5px"
}),
c = this.DOM.create("img", {
id: this.GetId(e, "arrow"),
alt: "arrow",
src: A
}, {
display: "none",
transition: "all 1s ease-in-out 0s",
right: "10px",
bottom: "45%",
width: "35px",
position: "absolute",
zIndex: "101",
cursor: "pointer",
margin: "5px",
transform: "rotate(90deg)"
}),
u = this.DOM.create("iframe", {
id: this.GetId(e, "iframe"),
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no"
}, {
width: "100%",
height: "100%",
border: "none"
});
this.DOM.setHTML(n, r.outerHTML), this.DOM.append(n, a.outerHTML), this.DOM.append(l, h.outerHTML), this.DOM.append(n, l.outerHTML), this.DOM.append(n, c.outerHTML), this.DOM.append(n, u.outerHTML), this.DOM.setHTML(o, n.outerHTML), this.DOM.setHTML(s, o.outerHTML), this.DOM.setHTML(t[e], s.outerHTML), setTimeout((() => {
this.DOM.setHTML(a, '
')
}), 2e3), this.DOM.bind(r, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), this.DOM.bind(a, "click", i(e, !1)), this.DOM.bind(c, "click", i(e, !0))
}
let s = !1;
const o = [],
r = i => {
for (let r = 0; r < t.length; r++) {
if (void 0 !== o[r] && o[r]) continue;
const n = this.GetId(r, "iframe"),
a = t[r];
if (this.DOM.isMinimallyVisible(a) || i) {
const t = () => {
const t = this.DOM.getByID(this.GetId(r, "inner-box"));
t && this.DOM.css(t, {
width: "728px",
height: "300px"
});
const e = this.DOM.getByID(this.GetId(r, "close"));
e && this.DOM.css(e, "display", "inherit");
const i = this.DOM.getByID(this.GetId(r, "arrow"));
i && this.DOM.css(i, "display", "inherit"), s || (s = !0)
};
s ? t() : setTimeout((() => {
t()
}), 2e3);
const i = e + "&hei=" + a.style.height,
l = this.DOM.getByID(n);
l && this.DOM.attr(l, "src", i + "&ts=" + this.Registry.TimeSpent), x._debug("Do Callback: ExpandableBannerLeft"), this.CodeUtils.DoCallback(this.tracker, !0), o[r] = !0;
break
}
}
},
n = new IntersectionObserver((t => {
t.some((t => t.isIntersecting)) && r(!0)
})),
a = document.querySelector("." + d.Class);
return null !== a && n.observe(a), this.Hooks.Call(this.Hooks.Events.Formats.ExpandableBannerLeft.afterOpen, []), !0
}
},
ExpandableBannerRight: class extends G {
constructor(t) {
super({
name: "expandable-banner-right",
hook: "ExpandableBannerRight",
closeFormat: "banner"
}, t), h(this, "Config", {
CloseButtonZIndex: 50
})
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.ExpandableBannerRight.beforeOpen, []);
const t = this.getBlocks();
if (!t) return;
const {
defaultUrl: e
} = this.getInitialState(), i = (t, e) => () => {
if (!1 === e) return void this.Close();
e = !1;
const i = (t, e) => {
const i = e ? "720px" : "300px",
s = e ? "300px" : "250px",
o = this.DOM.getByID(this.GetId(t, "inner-box"));
o && this.DOM.css(o, {
width: i,
height: s
});
const r = this.DOM.getByID(this.GetId(t, "arrow"));
r && this.DOM.css(r, "display", "none")
},
s = this.DOM.getByID(this.GetId(t, "box"));
s && setTimeout((() => {
s.onmouseout = () => {
i(t, !1)
}, s.onmouseover = () => {
i(t, !0)
}
}), 500), i(t, !1)
};
x._debug("Detected ExpandableBannerRight ad elements: " + t.length);
for (let e = 0; e < t.length; e++) {
const s = this.DOM.create("div", {
id: this.GetId(e)
}, {
background: "transparent",
width: "300px",
height: "250px"
}),
o = this.DOM.create("div", {
id: this.GetId(e, "box")
}, {
position: "relative",
width: "728px",
height: "300px",
left: "0"
}),
r = this.DOM.shortCutCreate("overlay", {
id: this.GetId(e, "overlay")
}),
n = this.DOM.create("div", {
id: this.GetId(e, "inner-box")
}, {
position: "absolute",
maxWidth: "100%",
zIndex: "5043",
width: "300px",
height: "250px",
right: "0",
top: "0",
transition: "all .2s ease-in-out",
border: "none"
}),
a = this.DOM.create("div", {
id: this.GetId(e, "close")
}, d.btnCss),
l = this.DOM.shortCutCreate("anchorClever"),
h = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId(e, "logo")
}, {
top: "5px"
}),
c = this.DOM.create("img", {
id: this.GetId(e, "arrow"),
alt: "arrow",
src: A
}, {
display: "none",
transition: "all 1s ease-in-out 0s",
left: "10px",
bottom: "45%",
width: "35px",
position: "absolute",
zIndex: "101",
cursor: "pointer",
margin: "5px",
transform: "rotate(-90deg)"
}),
u = this.DOM.create("iframe", {
id: this.GetId(e, "iframe"),
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no"
}, {
width: "100%",
height: "100%",
border: "none"
});
this.DOM.setHTML(n, r.outerHTML), this.DOM.append(n, a.outerHTML), this.DOM.append(l, h.outerHTML), this.DOM.append(n, l.outerHTML), this.DOM.append(n, c.outerHTML), this.DOM.append(n, u.outerHTML), this.DOM.setHTML(o, n.outerHTML), this.DOM.setHTML(s, o.outerHTML), this.DOM.setHTML(t[e], s.outerHTML), setTimeout((() => {
this.DOM.setHTML(a, `
`)
}), 2e3), this.DOM.bind(r, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), this.DOM.bind(a, "click", i(e, !1)), this.DOM.bind(c, "click", i(e, !0))
}
let s = !1;
const o = [],
r = i => {
for (let r = 0; r < t.length; r++) {
if (void 0 !== o[r] && o[r]) continue;
const n = this.GetId(r, "iframe"),
a = t[r];
if (this.DOM.isMinimallyVisible(a) || i) {
const t = () => {
const t = this.DOM.getByID(this.GetId(r, "inner-box"));
t && this.DOM.css(t, {
width: "728px",
height: "300px"
});
const e = this.DOM.getByID(this.GetId(r, "close"));
e && this.DOM.css(e, "display", "inherit");
const i = this.DOM.getByID(this.GetId(r, "arrow"));
i && this.DOM.css(i, "display", "inherit"), s || (s = !0)
};
!1 === s ? setTimeout((() => {
t()
}), 2e3) : t();
const i = e + "&hei=" + a.style.height,
l = this.DOM.getByID(n);
l && this.DOM.attr(l, "src", i + "&ts=" + this.Registry.TimeSpent), x._debug("Do Callback: ExpandableBannerLeft"), this.CodeUtils.DoCallback(this.tracker, !0), o[r] = !0;
break
}
}
},
n = new IntersectionObserver((function(t) {
t.some((function(t) {
return t.isIntersecting
})) && r(!0)
})),
a = document.querySelector("." + d.Class);
return null !== a && n.observe(a), this.Hooks.Call(this.Hooks.Events.Formats.ExpandableBannerRight.afterOpen, []), !0
}
},
InterScroller: class extends G {
constructor(t) {
super({
name: "inter-scroller",
hook: "InterScroller",
closeFormat: "banner"
}, t), h(this, "cookieAfterIds", [45366, 33249, 49672, 45366, 45004]), h(this, "Config", {
MainElementZIndex: 0
})
}
Open() {
var t, e;
if (this.Hooks.Call(this.Hooks.Events.Formats.InterScroller.beforeOpen, [this.tracker.ID]), !x.User.Mobile) return x._debug("Device or user is not mobile"), !1;
const i = this.getBlock(!1);
if (!i) return !1;
x._debug("Detected InterScroller ad elements");
const {
defaultUrl: s
} = this.getInitialState(), o = null != (t = this.tracker.FileW) ? t : 300, r = null != (e = this.tracker.FileH) ? e : 250, n = o + "px", a = this.DOM.create("iframe", {
id: this.GetId("iframe"),
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no",
src: "about:blank",
allowFullscreen: !0
}, {
border: "0 none transparent",
width: n,
height: 600 === r ? r + "px" : "100vh",
backgroundColor: "transparent",
marginTop: "20px",
visibility: "visible",
position: "fixed",
top: "0",
padding: "0",
pointerEvents: "all",
zIndex: "-1",
display: "flex"
}), l = 600 === r ? "566px" : "250px", h = this.DOM.create("div", {
id: this.GetId("child3")
}, {
position: "absolute",
left: "0",
top: "0",
overflow: "hidden",
zIndex: "10",
width: "100%",
height: l,
clipPath: "inset(0 0 0 0)"
}), c = this.DOM.create("div", {
id: this.GetId("child2")
}, {
position: "relative",
width: o + "px",
display: "flex",
justifyContent: "center",
height: l,
minHeight: "250px"
}), u = this.DOM.create("div", {
id: this.GetId("child1")
}, {
position: "relative",
maxWidth: "300px"
}), p = this.DOM.shortCutCreate("overlay", {
id: this.GetId("overlay")
}), m = this.DOM.create("div", {
id: this.GetId()
}, {
height: r + "px",
display: "flex",
justifyContent: "center",
overflowX: "hidden",
position: "relative",
zIndex: this.Config.MainElementZIndex.toString(),
textAlign: "justify"
});
this.DOM.setHTML(h, a.outerHTML), this.DOM.setHTML(c, h.outerHTML), this.DOM.setHTML(u, c.outerHTML), this.DOM.setHTML(m, p.outerHTML), this.DOM.append(m, u.outerHTML), this.DOM.setHTML(i, m.outerHTML), this.DOM.css(i, {
display: "block",
visibility: "visible"
}), this.DOM.bind(p, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), -1 !== this.cookieAfterIds.indexOf(x.group.ID) && this.DOM.attr(a, {
src: s + "&hei=" + i.style.height
});
let g = !1;
const C = () => {
if (!g && this.DOM.isMinimallyVisible(i)) {
g = !0;
const t = "height" in i ? i.height : i.clientHeight,
e = this.DOM.getByID(this.GetId("iframe")),
o = s + "&hei=" + i.style.height;
e && (-1 !== this.cookieAfterIds.indexOf(x.group.ID) ? this.DOM.attr(e, {
src: o + "#visible=1"
}) : this.DOM.attr(e, {
src: k({
defaultUrl: s,
ts: this.Registry.TimeSpent,
height: t
})
})), window.removeEventListener("scroll", C), x._debug(`Do Callback: ${this.config.name}`), this.CodeUtils.DoCallback(this.tracker, !0)
}
};
return "loading" !== document.readyState ? C() : document.addEventListener("DOMContentLoaded", C), window.addEventListener("scroll", C), this.Hooks.Call(this.Hooks.Events.Formats.InterScroller.afterOpen, [this.tracker.ID]), !0
}
},
InteractiveBanner: class extends G {
constructor(t) {
super({
name: "interactive-banner",
hook: "InteractiveBanner",
closeFormat: "banner"
}, t)
}
Open() {
var t, e, i;
const {
baseUrl: s
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.InteractiveBanner.beforeOpen, [this.tracker.ID]);
const o = this.getBlock(!0);
if (!o) return !1;
const r = null != (t = this.tracker.FileW) ? t : 300,
n = null != (e = this.tracker.FileH) ? e : 120,
a = this.GetId(""),
l = this.DOM.create("div", {
id: a
}, {
height: n + "px",
width: "300px",
display: "flex",
justifyContent: "center",
overflowX: "hidden",
position: "relative",
zIndex: "99",
textAlign: "justify",
maxWidth: "600px",
margin: "0 auto",
cursor: "pointer"
}),
h = this.GetId("overlay"),
c = this.DOM.shortCutCreate("overlay", {
id: h
}),
d = this.GetId("close"),
u = this.DOM.shortCutCreate("bannerClose", {
id: d
}, {
right: "1px",
height: "16px",
width: "16px"
}),
p = this.DOM.shortCutCreate("anchorClever"),
m = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
g = this.DOM.shortCutCreate("iframe", {
id: this.GetId("iframe")
});
this.DOM.append(l, c.outerHTML), this.DOM.append(l, u.outerHTML), this.DOM.append(p, m.outerHTML), this.DOM.append(l, p.outerHTML), this.DOM.append(l, g.outerHTML), this.DOM.append(o[0], l.outerHTML), null == (i = o[0].querySelector("#" + d)) || i.addEventListener("click", (() => {
this.Close()
}));
const C = o[0].querySelector("#" + h);
let b = !1;
return null == C || C.addEventListener("click", (() => {
var t, e;
b ? (this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")) : null == (e = null == (t = o[0].querySelector("iframe")) ? void 0 : t.contentWindow) || e.postMessage({
switchToVideo2: !0,
impression_url: s + "&ts=" + this.Registry.TimeSpent + "&interactive=1"
}, "*"), b = !b
})), "loading" !== document.readyState ? this.isMinimallyVisible(void 0, r) : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t, r))), this.addScrollListener(!1, r), this.Hooks.Call(this.Hooks.Events.Formats.InteractiveBanner.afterOpen, [this.tracker.ID]), !0
}
},
InteractiveSticky: class extends G {
constructor(t) {
super({
hook: "InteractiveSticky",
name: "interactive-sticky",
closeFormat: "other"
}, t), h(this, "Config", {
CustomBody: null
})
}
Open() {
const {
baseUrl: t,
defaultUrl: e
} = this.getInitialState();
let i = null;
if (this.Config.CustomBody) {
const t = document.querySelector(this.Config.CustomBody);
null !== t && (i = t)
} else i = this.DOM.getByTag("body")[0];
this.Hooks.Call(this.Hooks.Events.Formats.InteractiveSticky.beforeOpen, [this.tracker.ID]);
const s = this.GetId(""),
o = this.DOM.create("div", {
id: s
}, {
height: "120px",
width: "300px",
display: "flex",
justifyContent: "center",
overflowX: "hidden",
bottom: "0px",
position: "fixed",
zIndex: "5999999",
textAlign: "justify",
maxWidth: "600px",
margin: "0 auto",
cursor: "pointer",
left: "0px",
right: "0px"
}),
r = this.GetId("overlay"),
n = this.DOM.shortCutCreate("overlay", {
id: r
}),
a = this.GetId("close"),
l = this.DOM.shortCutCreate("bannerClose", {
id: a
}, {
right: "1px",
height: "16px",
width: "16px"
}),
h = this.DOM.shortCutCreate("anchorClever"),
c = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
d = this.DOM.shortCutCreate("iframe", {
id: this.GetId("iframe")
});
this.DOM.append(o, n.outerHTML), this.DOM.append(o, l.outerHTML), this.DOM.append(h, c.outerHTML), this.DOM.append(o, h.outerHTML), this.DOM.append(o, d.outerHTML), null == i || i.insertBefore(o, i.firstChild);
let u = !1;
null == n || n.addEventListener("click", (() => {
var e;
this.clearAutoClose(), u ? (this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")) : null == (e = null == d ? void 0 : d.contentWindow) || e.postMessage({
switchToVideo2: !0,
impression_url: t + "&ts=" + this.Registry.TimeSpent + "&interactive=1"
}, "*"), u = !u
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.DOM.bind(l, "click", (() => {
this.clearAutoClose(), this.Close()
})), this.DOM.attr(d, {
src: e
}), this.Hooks.Call(this.Hooks.Events.Formats.InteractiveSticky.afterOpen, [this.tracker.ID]), this.autoCloseValidation()
}
},
Interstitial: class {
constructor(t) {
this.args = t
}
Open() {
const t = this.args.tracker;
if ("inter" === t.Type) {
return new N(this.args).Open()
}
if ("internotime" == t.Type) {
return new V(this.args).Open()
}
if ("interonclose" == t.Type) {
return new W(this.args).Open()
}
return new z(this.args).Open()
}
},
LayerOver: class extends G {
constructor(t) {
super({
name: "layer-over",
closeFormat: "other",
hook: "unknown"
}, t)
}
Open() {
var t;
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const {
defaultUrl: e,
body: i
} = this.getInitialState();
let s = 300,
o = 600;
this.tracker.FileH > 0 && this.tracker.FileH < o && (o = this.tracker.FileH), this.tracker.FileW > 0 && this.tracker.FileW < s && (s = this.tracker.FileW);
const {
FONT_SIZE: r,
FONT: n,
BGCOLOR: a,
COLOR: l,
RADIUS: h,
BOX_SHADOW: c
} = p, u = this.DOM.create("div", {
id: this.GetId()
}, {
fontSize: r,
fontFamily: n,
backgroundColor: a,
color: l,
position: "fixed",
zIndex: this.DOM.zIndex(0),
width: s + "px",
height: o + "px",
margin: "0",
bottom: "0",
overflow: "hidden",
borderRadius: h,
boxShadow: c,
borderBottomLeftRadius: "0",
borderBottomRightRadius: "0",
textShadow: "none",
padding: "0"
});
x.User.Platform && "ios" === x.User.Platform.toLowerCase() && this.DOM.css(u, {
overflow: "auto",
"-webkit-overflow-scrolling": "touch"
});
const m = "layerleft" === this.tracker.Type;
this.DOM.css(u, m ? "left" : "right", "40px");
const g = this.DOM.create("div", {
id: this.GetId("layer-header")
}, {
width: "15px",
height: "15px",
fontSize: r,
padding: "4px",
color: l,
backgroundColor: a,
float: "right",
textAlign: "right",
cursor: "pointer"
});
let C;
if (u.appendChild(g), this.tracker.File) C = this.DOM.create("img", {
id: this.GetId("layer-img"),
alt: "CLVR",
src: "//static." + x.group.Domain + "/" + (null != (t = this.tracker.File) ? t : "")
}, {
width: s + "px",
height: o - 30 + "px",
position: "absolute",
zIndex: this.DOM.zIndex(3),
top: "0",
left: "0",
cursor: "pointer",
border: "none"
}), u.appendChild(C);
else {
const t = this.DOM.create("div", {
id: this.GetId("interstitial-div")
}, {
width: Number(s) + "px",
height: o - 30 + "px"
});
x.User.Platform && "ios" === x.User.Platform.toLowerCase() && this.DOM.css(t, {
"-webkit-overflow-scrolling": "touch"
}), C = this.DOM.create("img", {
id: this.GetId("layer-img"),
src: H,
alt: "img"
}, {
width: s + "px",
height: o + "px",
position: "absolute",
zIndex: this.DOM.zIndex(4),
top: "0",
left: "0",
cursor: "pointer",
border: "none",
borderRadius: "none",
backgroundColor: "transparent",
boxShadow: "none"
}), t.appendChild(C);
const i = this.DOM.shortCutCreate("anchorClever"),
r = this.DOM.shortCutCreate("cleverLogo", {}, {
top: "5px"
});
this.DOM.append(i, r.outerHTML), this.DOM.append(u, i.outerHTML);
const n = this.DOM.create("iframe", {
id: this.GetId("layer-iframe"),
name: d.Class,
title: "Clever-iframe",
src: k({
defaultUrl: e,
ts: this.Registry.TimeSpent,
height: o
}),
frameBorder: "0"
}, {
width: s + "px",
height: o + "px",
backgroundColor: "#fff",
position: "absolute",
zIndex: this.DOM.zIndex(3),
top: "0",
left: "0",
cursor: "pointer",
border: "none",
margin: "0",
zoom: this.tracker.Zoom,
"-moz-transform": "scale(" + this.tracker.Zoom + ")",
"-moz-transform-origin": "0 0",
"-o-transform": "scale(" + this.tracker.Zoom + ")",
"-o-transform-origin": "0 0",
"-webkit-transform": "scale(" + this.tracker.Zoom + ")",
"-webkit-transform-origin": "0 0"
});
t.appendChild(n), u.appendChild(t)
}
i.appendChild(u);
const b = {
position: "fixed",
"z-index": this.DOM.zIndex(5),
bottom: o - 10 + "px",
width: "30px",
height: "30px",
cursor: "pointer",
margin: "0",
left: m ? `${s+20}px` : "auto",
right: m ? "-20px" : s - 270 + "px"
};
i.appendChild(this.DOM.create("img", {
src: E,
alt: "close",
width: 30,
height: 30,
id: this.GetId("close-btn")
}, b));
const f = this.DOM.getByID(this.GetId("layer-img"));
if (f) {
const t = this.Net.fetchBaseUrl(this.tracker, {
id: this.tracker.ID,
frominter: 1,
click: 1,
ref: window.btoa(this.Registry.getLocationHref()),
ruri: window.btoa(document.referrer),
cmpId: this.TCF.cmpId
});
this.DOM.bind(f, "click", (() => {
this.Callback.Click(), window.open(t, "_blank"), this.clearAutoClose(), this.Close(!1)
}))
}
this.DOM.bind(g, "click", (() => {
this.clearAutoClose(), this.Close(!1)
}));
const M = this.DOM.getByID(this.GetId("close-btn"));
return M && this.DOM.bind(M, "click", (() => {
this.clearAutoClose(), this.Close()
})), this.CodeUtils.DoCallback(this.tracker, u && u.offsetWidth > 0 && u.offsetHeight > 0), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.autoCloseValidation(), !0
}
Close(t = !0) {
const {
baseUrl: e
} = this.getInitialState(), i = this.DOM.getByID(this.GetId()), s = this.DOM.getByID(this.GetId("close-btn"));
return t && this.DOM.customFetch(e + "&closed=1"), i && this.partialDelete(i), s && this.partialDelete(s), !0
}
},
LeaderBoard: class extends G {
constructor(t) {
super({
name: "leader-board",
hook: "LeaderBoard",
closeFormat: "banner"
}, t)
}
Open() {
if (this.Hooks.Call(this.Hooks.Events.Formats.LeaderBoard.beforeOpen, [this.tracker.ID]), x.User.Mobile) return x._debug("Device is mobile, skip"), !1;
const t = this.getBlock(!1);
if (!t) return !1;
const e = this.GetId(""),
i = this.DOM.create("div", {
id: e
}, {
width: "728px",
height: "90px",
padding: "",
background: "transparent",
margin: "0 auto",
position: "relative",
zIndex: "100"
}),
s = this.DOM.create("div", {
id: this.GetId("wrap")
}, {
position: "relative",
width: "100%",
height: "90px",
transition: "1s",
transitionDuration: "0.5s",
transitionTimingFunction: "ease-in-out"
}),
o = this.DOM.shortCutCreate("overlay", {
id: this.GetId("overlay")
}),
r = this.DOM.create("div", {
id: this.GetId("header")
}, {
position: "absolute",
top: "0",
left: "0",
width: "100%",
height: "90px",
zIndex: "16",
cursor: "pointer"
}),
n = this.DOM.shortCutCreate("overlay", {
id: this.GetId("header-overlay")
}),
a = this.DOM.create("img", {
id: this.GetId("close"),
src: E,
alt: "close"
}, d.btnCss),
l = this.DOM.shortCutCreate("anchorClever"),
h = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}, {
top: "5px"
}),
c = this.DOM.create("img", {
id: this.GetId("arrow"),
alt: "arrow",
src: A
}, {
transition: "all 1s ease-in-out 0s",
right: "50%",
bottom: "10px",
width: "35px",
position: "absolute",
zIndex: "101",
cursor: "pointer",
margin: "5px"
}),
u = this.DOM.create("iframe", {
id: this.GetId("iframe"),
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no"
}, {
width: "100%",
height: "100%",
position: "absolute",
top: "0",
left: "0",
border: "none"
});
this.DOM.setHTML(r, n.outerHTML), this.DOM.setHTML(s, c.outerHTML), this.DOM.append(s, o.outerHTML), this.DOM.append(l, h.outerHTML), this.DOM.append(i, l.outerHTML), this.DOM.append(s, u.outerHTML), this.DOM.append(s, a.outerHTML), this.DOM.append(i, r.outerHTML), this.DOM.append(i, s.outerHTML);
const p = (t, e) => {
const i = t ? 300 : 90,
o = t ? "inherit" : "none",
r = t ? 180 : 0,
n = t ? "-50%" : "50%";
this.DOM.css(s, "height", i + "px"), this.DOM.css(c, {
transform: "rotate(" + r + "deg) translateX(" + n + ")",
display: e ? o : "none"
})
};
this.DOM.setHTML(t, i.outerHTML), this.DOM.bind(o, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), this.DOM.bind(n, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
}));
let m = !1;
return this.DOM.bind(r, "mouseover", (() => {
p(!0, !m)
})), this.DOM.bind(c, "click", (() => {
p(!1, !1), this.DOM.bind(r, "mouseout", (() => {
p(!1, !1)
})), m = !0
})), this.DOM.bind(a, "click", (() => {
this.Close()
})), "loading" !== document.readyState ? (this.isMinimallyVisible(void 0, 250), p(!0, !0)) : document.addEventListener("DOMContentLoaded", (t => {
this.isMinimallyVisible(t, 250), p(!0, !0)
})), this.addScrollListener(!1, 250, void 0, (() => p(!0, !0))), this.Hooks.Call(this.Hooks.Events.Formats.LeaderBoard.afterOpen, [this.tracker.ID]), !0
}
},
MiniScroller: class extends G {
constructor(t) {
super({
name: "mini-scroller",
hook: "MiniScroller",
closeFormat: "banner"
}, t)
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.MiniScroller.beforeOpen, [this.tracker.ID]);
const t = this.getBlock(!1);
if (!t) return !1;
const e = this.GetId(""),
i = this.DOM.create("div", {
id: e
}, {
position: "relative",
width: "100%",
height: "30vh",
justifyContent: "center",
overflowX: "hidden",
cursor: "pointer"
}),
s = this.DOM.shortCutCreate("overlay"),
o = this.DOM.create("div", {}, {
position: "relative"
}),
r = this.DOM.create("div", {}, {
position: "absolute",
clip: "rect(0, 100vw, 30vh, 0)"
}),
n = this.DOM.create("iframe", this.DOM.shortCuts.iframe.attr, {
border: "0 none",
width: "100%",
height: "100%",
position: "fixed",
top: "0"
});
return this.DOM.setHTML(r, n.outerHTML), this.DOM.setHTML(o, r.outerHTML), this.DOM.setHTML(i, s.outerHTML), this.DOM.append(i, o.outerHTML), this.DOM.setHTML(t, i.outerHTML), this.DOM.bind(t, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), "loading" !== document.readyState ? this.isMinimallyVisible(void 0, 250) : document.addEventListener("DOMContentLoaded", (() => this.isMinimallyVisible(void 0, 250))), this.addScrollListener(!0, 250), this.Hooks.Call(this.Hooks.Events.Formats.MiniScroller.afterOpen, [this.tracker.ID]), !0
}
},
MobilePull: class extends G {
constructor(t) {
super({
hook: "MobilePull",
name: "mobile-pull",
requiredPosition: !0,
closeFormat: "other"
}, t), h(this, "Config", {
CustomBody: void 0
}), h(this, "startTime"), h(this, "userClickedClose2", !1), h(this, "interval")
}
Open() {
const {
defaultUrl: t,
body: e
} = this.getInitialState(this.Config.CustomBody);
this.Hooks.Call(this.Hooks.Events.Formats.MobilePull.beforeOpen, [this.tracker.ID]);
const i = this.GetId(""),
s = this.DOM.create("div", {
id: i
}, {
position: "fixed",
width: "100%",
height: "100%",
zIndex: "auto",
left: "0px",
top: "100%"
}),
o = this.GetId("overlay"),
r = this.DOM.shortCutCreate("overlay", {
id: o
}),
n = this.GetId("close"),
a = this.DOM.create("img", {
id: n,
src: R,
alt: "close"
}, {
position: "fixed",
right: "4px",
bottom: "93px",
width: "22px",
zIndex: "15",
height: "22px",
margin: "0",
cursor: "pointer",
transition: "opacity 1s ease, height 0.5s ease"
}),
l = this.GetId("close2"),
h = this.DOM.create("img", {
id: l,
src: R,
alt: "close"
}, {
height: "20px",
width: "20px",
position: "absolute",
right: "4px",
top: "4px"
}),
c = this.DOM.shortCutCreate("anchorClever"),
d = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}, {
left: "5px",
top: "5px"
});
this.GetId("iframe");
const u = this.DOM.shortCutCreate("iframe", {}, {
position: "fixed",
display: "block",
padding: "0",
border: "none",
margin: "0px auto",
pointerEvents: "auto",
width: "100%",
height: "120px",
bottom: "0",
left: "50%",
transition: "opacity 1s ease, height 0.5s ease",
transform: "translateX(-50%)"
});
this.DOM.append(s, r.outerHTML), this.DOM.append(c, d.outerHTML), this.DOM.append(s, c.outerHTML), this.DOM.append(s, a.outerHTML), this.DOM.append(s, h.outerHTML), this.DOM.append(s, u.outerHTML), e.insertBefore(s, e.firstChild);
this.interval = setInterval((() => {
requestAnimationFrame((() => this.animate({
direction: 10,
mobilePullImg: u,
amplitude: 10,
duration: 1e3,
mobilePullClose: a,
timestamp: performance.now(),
startTime: performance.now()
})))
}), 1500), this.dragElement(r), this.DOM.bind(a, "click", (() => {
this.Close()
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.DOM.attr(u, {
src: t
});
const p = {
display: "block",
position: "fixed",
padding: "0",
border: "none",
margin: "0px auto",
pointerEvents: "auto",
width: "100%",
height: "120px",
bottom: "0",
left: "50%",
top: "unset",
transform: "translateX(-50%)",
opacity: "unset",
overflow: "unset"
},
m = {
display: "block",
right: "4px",
bottom: "93px",
width: "22px",
position: "fixed",
zIndex: "15",
height: "22px",
margin: "0",
cursor: "pointer",
top: "unset",
opacity: "unset",
overflow: "unset"
};
h.addEventListener("click", (() => {
this.clearAutoClose(), s.style.top = "100%", this.DOM.css(r, p), this.DOM.css(u, p), this.DOM.css(a, m)
})), r.addEventListener("touchstart", (t => {
this.clearAutoClose(), r.clientHeight > 120 && (this.Callback.Click(), window.open(this.handleFormatClick(), "_blank"), this.DOM.css(r, p), this.DOM.css(u, p), this.DOM.css(a, m), s.style.top = "100%")
})), this.Hooks.Call(this.Hooks.Events.Formats.MobilePull.afterOpen, [this.tracker.ID]), this.autoCloseValidation()
}
animate(t) {
const {
timestamp: e,
mobilePullImg: i,
mobilePullClose: s,
duration: o,
amplitude: r
} = t;
if (i.clientHeight < window.innerHeight) {
this.startTime || (this.startTime = e);
const n = e - this.startTime,
a = Math.max(1 - n / o, 0);
i.style.bottom = r * a + "px", s.style.bottom = 93 + r * a + "px", n < o || (this.startTime = void 0), requestAnimationFrame((() => this.animate(t)))
} else this.interval && clearInterval(this.interval)
}
dragElement(t) {
let e = 0,
i = !1;
const s = t => {
const s = (t = t || window.event).touches[0].clientY - e;
Math.abs(s) > 50 && (i = !0, this.DOM.css(this.GetId("iframe"), {
height: "100%"
}), this.DOM.css(this.GetId("overlay"), {
height: "100%"
}), this.DOM.css(this.GetId("close2"), {
zIndex: "15"
}))
},
o = () => {
i && this.animateElementRelease(s, t), i = !1, t.removeEventListener("touchmove", s), t.removeEventListener("touchend", o)
};
t.addEventListener("touchstart", (r => {
(r = r || window.event).preventDefault(), e = r.touches[0].clientY, i = !1, t.addEventListener("touchmove", s, {
passive: !1
}), t.addEventListener("touchend", o, {
passive: !1
})
}), {
passive: !1
})
}
animateElementRelease(t, e) {
const i = this.DOM.getByID(this.GetId(""));
if (!i) return;
const s = this.DOM.getByID(this.GetId("close"));
if (!s) return;
let o = parseFloat(i.style.top);
const r = () => {
if (this.userClickedClose2) return void(this.userClickedClose2 = !1);
const n = 0 - o;
o += .14 * n, i.style.top = o + "%", Math.abs(n) > .1 ? (requestAnimationFrame(r), s.style.display = "none") : (s.style.display = "none", i.style.top = "0", e.removeEventListener("touchmove", t))
};
requestAnimationFrame(r)
}
},
Mosaic: class extends G {
constructor(t) {
super({
name: "mosaic",
closeFormat: "base",
hook: "Mosaic"
}, t)
}
Open() {
var t, e, i;
const s = null != (t = this.tracker.FileW) ? t : 200,
o = null != (e = this.tracker.FileH) ? e : 420;
if (0 !== x.User.Mobile) {
if (420 === s && 420 === o) return void x._debug("Full layout is not allowed in mobile devices");
if (420 === s && 200 === o) return void x._debug("Vertical layout is not allowed in mobile devices")
}
const {
defaultUrl: r
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.Mosaic.beforeOpen, [this.tracker.ID]);
const n = this.getBlock(!1);
if (!n) return !1;
const a = this.GetId("overlay"),
l = this.GetId("close"),
h = this.GetId(""),
c = this.GetId("overlay-single"),
d = this.DOM.create("div", {
id: h
}, {
width: s + "px",
height: o + "px",
margin: "auto",
position: "relative"
}),
u = this.DOM.shortCutCreate("overlay", {
id: a
}),
p = this.DOM.shortCutCreate("bannerClose", {
id: l
}),
m = this.DOM.shortCutCreate("anchorClever"),
g = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
C = this.DOM.create("iframe", {
id: this.GetId("iframe"),
title: "Clever-iframe",
scrolling: "no"
}, {
width: "100%",
height: "100%",
minHeight: "200px",
border: "none"
}),
b = this.DOM.shortCutCreate("overlay", {
className: c,
alt: "overlay-single-clever"
}, {
top: "220px",
display: "inline-block",
verticalAlign: "top"
});
if (200 === s)
for (let t = 0; t < 2; t++) {
const e = t % 2;
b.style.top = 220 * e + "px", this.DOM.append(u, b.outerHTML)
} else if (420 === s && 420 === o)
for (let t = 0; t < 4; t++) {
const e = t % 2,
i = t > 1 ? "220px" : "0";
b.style.top = 220 * e + "px", b.style.left = i, this.DOM.append(u, b.outerHTML)
} else
for (let t = 0; t < 2; t++) {
const e = t % 2;
b.style.left = 220 * e + "px", b.style.top = "0px", this.DOM.append(u, b.outerHTML)
}
this.DOM.append(d, u.outerHTML), this.DOM.append(d, p.outerHTML), this.DOM.append(m, g.outerHTML), this.DOM.append(d, m.outerHTML), this.DOM.append(d, C.outerHTML), this.DOM.append(n, d.outerHTML);
const f = n.querySelectorAll("." + c);
null == (i = n.querySelector("#" + l)) || i.addEventListener("click", (() => {
this.Close()
})), f.forEach((t => {
t.addEventListener("click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
}))
}));
let M = !1;
const D = () => {
const t = document.getElementById(h);
if (null !== t && !1 === M && this.DOM.isMinimallyVisible(t)) {
M = !0;
const e = t.querySelector("iframe");
this.DOM.attr(e, {
src: r + "&ts=" + this.Registry.TimeSpent
}), x._debug("Do Callback: Mosaic"), this.CodeUtils.DoCallback(this.tracker, !0), window.removeEventListener("scroll", D)
}
};
return "loading" !== document.readyState ? D() : document.addEventListener("DOMContentLoaded", D), window.addEventListener("scroll", D), this.Hooks.Call(this.Hooks.Events.Formats.Mosaic.afterOpen, [this.tracker.ID]), !0
}
},
PopUnder: class extends G {
constructor(t) {
super({
name: "pop-under",
closeFormat: "base",
hook: "unknown"
}, t), h(this, "lastWin", null), h(this, "lastTarget", null), h(this, "flipPop", null), h(this, "openURL", "")
}
Open() {
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const t = `${this.Net.getDefaultUrl(this.tracker)}ts=${this.Registry.TimeSpent}`;
this.open(this.tracker, t, !0), this.sendToBackground(!1).setPopURL(!1), !this.flipPop && x.User.Browser && "chrome" !== x.User.Browser.toLowerCase() && this.sendToBackground(!1)
}
bindUpHook() {
x._debug("bindUpHook");
const t = this.DOM.getByID("clever_hook_" + x.group.ID + "overclick");
t && (this.DOM.css("clever_hook_" + x.group.ID + "overclick", {
width: "5px",
height: "5px",
left: "0",
top: "0"
}), "focus" in t && t.focus())
}
sendToBackground(t) {
var e, i;
return this.lastWin && this.lastTarget && !t && (this.flipPop = this.lastWin.window.open("about:blank"), this.flipPop && this.flipPop.close(), null == (i = null == (e = this.lastWin.opener) ? void 0 : e.window) || i.focus()), this
}
setPopURL(t) {
if (t && this.lastTarget && this.lastWin && "about:blank" !== this.lastTarget && this.lastTarget !== this.openURL)
if (x.User.Browser && "chrome" === x.User.Browser.toLowerCase()) {
const t = this.lastWin.document;
t.open(), t.write(`\n \n \n Document Title\n