Skip to content

Instantly share code, notes, and snippets.

@englehardt

englehardt/nv.js Secret

Created April 11, 2018 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save englehardt/8a25d7b7f6aa3c080e73b896933c710c to your computer and use it in GitHub Desktop.
Save englehardt/8a25d7b7f6aa3c080e73b896933c710c to your computer and use it in GitHub Desktop.
No boundaries: NTVK1 script (https://p1.ntvk1.ru/nv.js)
(function e(t, n, r) {
function s(o, u) {
if (!n[o]) {
if (!t[o]) {
var a = typeof require == "function" && require;
if (!u && a) return a(o, !0);
if (i) return i(o, !0);
var f = new Error("Cannot find module '" + o + "'");
throw f.code = "MODULE_NOT_FOUND", f
}
var l = n[o] = {
exports: {}
};
t[o][0].call(l.exports, function(e) {
var n = t[o][1][e];
return s(n ? n : e)
}, l, l.exports, e, t, n, r)
}
return n[o].exports
}
var i = typeof require == "function" && require;
for (var o = 0; o < r.length; o++) s(r[o]);
return s
})({
1: [function(require, module, exports) {
"use strict";
function _interopRequireWildcard(e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
return t.default = e, t
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports._ab = exports.url_base = exports.showRecommendations = exports.visitId = exports.extra = exports._initialized = void 0;
var _util = require("./util"),
util = _interopRequireWildcard(_util),
_recommendations = require("./recommendations"),
recommendations = _interopRequireWildcard(_recommendations),
_initialized = exports._initialized = !0,
extra = exports.extra = {},
visitId = exports.visitId = top._ntvk1 && top._ntvk1.visitId ? top._ntvk1.visitId : util.guid(),
showRecommendations = exports.showRecommendations = recommendations.showRecommendations,
url_base = exports.url_base = "https://ps.ntvk1.ru/",
_ab = exports._ab = null;
}, {
"./recommendations": 7,
"./util": 8
}],
2: [function(require, module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
});
var log = exports.log = void 0;
exports.log = log = function() {};
}, {}],
3: [function(require, module, exports) {
"use strict";
function _interopRequireWildcard(e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
return t.default = e, t
}
function makeEvent(e, t) {
var n = null;
try {
n = util.ntvkElements().map(function(e) {
return e.id
})
} catch (e) {
n = {
error: "" + e
}
}
return {
type: e,
data: t,
timestamp: (new Date).getTime() / 1e3,
top_href: top.location.href,
event_id: util.guid(),
visit_id: api.visitId,
extra: api.extra,
widget_ids: n,
js_version: 2
}
}
function addEvent(e, t) {
var n = makeEvent(e, t);
debug.log(n), events.push(n)
}
function initCustomDomain(e) {
if (!customDomainInitInProgress) {
customDomainInitInProgress = !0;
try {
var t = "cb" + parseInt(1e3 * Math.random());
api[t] = function(n) {
customDomainInitInProgress && (customDomainInitInProgress = !1, delete api[t], n && n.custom_domain == api.url_base || e("some problem"), api.user_id = n.user_id, e())
}, setTimeout(function() {
customDomainInitInProgress && (customDomainInitInProgress = !1, delete api[t], e("timeout"))
}, 3e3);
var n = document.createElement("script");
n.type = "text/javascript", n.src = "https://ps.ntvk1.ru/dmn/?dmn=" + api.url_base + "&callback=" + t, document.head.appendChild(n)
} catch (t) {
customDomainInitInProgress = !1, e(t)
}
}
}
function sendData(e, t) {
var n = e ? function(t) {
var n = function(t) {
n = null, e(t)
};
n && n(t)
} : null;
if (api.url_base && !api.url_base.match(/(https?:)\/\/p(s|1)\.ntvk1\.ru\//) && !api.url_base.match(/(https?:)\/\/p1\.dircont3\.com\//) && !customDomainInitialized) return util.detectAdblock(function(e) {
if (e) return customDomainInitialized = !0, addEvent("technical_detail", {
message: "adblock"
}), sendData(n, t);
initCustomDomain(function(e) {
customDomainInitialized = !0, e && addEvent("technical_detail", {
message: "ntvk fail:" + e
}), sendData(n, t)
})
});
if (events.length > 0) {
try {
(n ? util.receiveJson : util.sendBeacon)(api.url_base + "nv/", {
events: events,
want_settings: !!n
}, n)
} catch (e) {
debug.log(e), t || (events = [], addEvent("error", {
message: "" + e,
function: "sendData"
}), sendData(null, !0))
}
events = []
}
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.makeEvent = makeEvent, exports.addEvent = addEvent, exports.sendData = sendData;
var _util = require("./util"),
util = _interopRequireWildcard(_util),
_debug = require("./debug"),
debug = _interopRequireWildcard(_debug),
_api = require("./api"),
api = _interopRequireWildcard(_api),
events = [],
customDomainInitialized = !1,
customDomainInitInProgress = !1;
}, {
"./api": 1,
"./debug": 2,
"./util": 8
}],
4: [function(require, module, exports) {
"use strict";
function _interopRequireWildcard(t) {
if (t && t.__esModule) return t;
var e = {};
if (null != t)
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
return e.default = t, e
}
function sendFingerprint(t, e) {
debug.log("fingerprint", {
kind: t,
value: e
}), events.addEvent("fingerprint.b", {
data: util.utf8_to_b64(JSON.stringify({
kind: t,
value: e
}))
})
}
function findEmails() {
[].slice.call(document.getElementsByTagName("INPUT")).map(function(t) {
return t.value && t.value.match(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/i)
}).filter(Boolean).forEach(function(t) {
var e = t[0];
sentEmails[e] || (sentEmails[e] = !0, sendFingerprint("email:input", e))
})
}
function collectFingerprints(t) {
t.email && (setInterval(util.catchErrors(findEmails), 3e3), ["change", "keyup", "paste", "submit", "beforeunload"].forEach(function(t) {
return document.addEventListener(t, util.catchErrors(findEmails))
})), t.social && setTimeout(util.catchErrors(function() {
socials.vk(), socials.fb()
}), 3e3)
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.collectFingerprints = collectFingerprints;
var _events = require("./events"),
events = _interopRequireWildcard(_events),
_util = require("./util"),
util = _interopRequireWildcard(_util),
_debug = require("./debug"),
debug = _interopRequireWildcard(_debug),
sentEmails = {},
socials = {
vk: function() {
window.VK && VK.Auth && VK.Auth.getLoginStatus && VK.Auth.getLoginStatus(util.catchErrors(function(t) {
"connected" == t.status && null !== t.session && sendFingerprint("vk:vkjs", t.session.mid)
}))
},
fb: function() {
window.FB && window.FB.getLoginStatus && FB.getLoginStatus(util.catchErrors(function(t) {
"unknown" != t.status && "not_authorized" != t.status && sendFingerprint("fb:fbjs.loginstatus", t)
}))
}
};
}, {
"./debug": 2,
"./events": 3,
"./util": 8
}],
5: [function(require, module, exports) {
"use strict";
function _interopRequireWildcard(t) {
if (t && t.__esModule) return t;
var o = {};
if (null != t)
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (o[r] = t[r]);
return o.default = t, o
}
function isFunction(t) {
var o = {};
return t && "[object Function]" === o.toString.call(t)
}
function collectImpressions() {
var t = [function() {
return Array.prototype.slice.call(document.querySelectorAll(".ntvk1-recommendations:not([ntvk1-impressed])")).filter(function(t) {
return t.offsetParent
})[0]
}, ".ntvk1-exchange", ".idv4-we-recommend", function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 59 - r)
}).join("")
}(50, 225, 144) + 22..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 3 - r)
}).join("")
}(21, 127, 123, 75, 129) + 417..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 40 - r)
}).join("")
}(12, 161, 152, 163), ".section__article-same_top", ".section__article-other_top", ".section__article-anonses_top", ".partner", "#related_tabs_block_preload", ".activeuserstrip", "table.lenta tr:last-child", 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 46030417..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 39 - r)
}).join("")
}(55, 197, 196, 217, 213, 193, 202, 206, 195, 139) + 2..toString(36).toLowerCase() + 29..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 1980767138..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 60 - r)
}).join("")
}(21, 195), 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 23449975106..toString(36).toLowerCase() + 29..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 59654235398..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 1283633..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 46 - r)
}).join("")
}(8, 158, 89, 118, 87, 170) + 679..toString(36).toLowerCase() + 16..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 14..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 16..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 683027523..toString(36).toLowerCase() + 16..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 14..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 16..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 17..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 661..toString(36).toLowerCase() + 20..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 13..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 17..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 13..toString(36).toLowerCase() + 22..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 897..toString(36).toLowerCase() + 21..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 14639..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 30 - r)
}).join("")
}(15, 143, 83, 143, 161, 147, 155), ".article__related > .news__popular", 17..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 661..toString(36).toLowerCase() + 20..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 13..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 1430165..toString(36).toLowerCase() + 21..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 52 - r)
}).join("")
}(21, 188, 123, 108, 137, 106, 166) + 19324..toString(36).toLowerCase() + 777..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 7 - r)
}).join("")
}(28, 147, 155, 149, 147, 147) + 387..toString(36).toLowerCase(), function() {
return document.querySelectorAll(".article-reklame.right > div > div.container__partners")[0]
}, function() {
return document.querySelectorAll(".article-reklame.right > div > div.container__partners")[1]
}, function() {
return document.querySelectorAll(".article-reklame.right > div > div.container__partners")[2]
}, function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 26 - r)
}).join("")
}(37, 98) + 44447..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 58 - r)
}).join("")
}(54, 234, 214, 212) + 21..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 13429..toString(36).toLowerCase(), ".mgbox", ".content_sidebar_block:nth-child(2)", ".content_sidebar_block:nth-child(3)", ".content_sidebar_block:nth-child(4)", ".content_sidebar_block:nth-child(5)", ".content_sidebar_block:nth-child(6)", function() {
return document.querySelectorAll(".row.related")[2]
}, function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 0 - r)
}).join("")
}(1, 36) + 34..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 43 - r)
}).join("")
}(42, 187, 196, 182) + 537..toString(36).toLowerCase() + 21..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 373..toString(36).toLowerCase(), function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 41 - r)
}).join("")
}(47, 193, 207, 201, 206, 200, 127, 153, 185, 190, 194, 179) + 870180..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 47 - r)
}).join("")
}(25, 182, 186) + 531..toString(36).toLowerCase() + 21..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 55 - r)
}).join("")
}(51, 199), ".newsLine", "#block-views-links_related-block_1", ".single_page_full_similar_news", ".news-content .related", ".rt_table_3458", "#block-views-most-read-today-block", ".mywidget", ".relap-default-wrapper"];
setInterval(util.catchErrors(function() {
var o = top.innerHeight || top.document.documentElement.clientHeight,
r = top.innerWidth || top.document.documentElement.clientWidth;
t.forEach(function(t) {
if (!box_seen[t]) {
var e = isFunction(t) ? t() : document.querySelector(t);
if (e && e.offsetParent) {
var n = e.getBoundingClientRect();
if (top !== self) {
var i = self.frameElement.getBoundingClientRect();
n = {
top: n.top + i.top,
left: n.left + i.left
}
}
if (!(n.height < 50 || n.width < 50) || "ntvk .idv3-title-type2" == t || ".ntvk1-exchange" == t) {
var a = 300,
c = 20;
if ((new RegExp("^[^]{5}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 22 - r)
}).join("")
}(44, 126, 127, 191, 162, 119, 123, 187, 158)).test(document.location.host) && 4 === document.location.host.indexOf(30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join(""), 4) && new RegExp("^[^]{1}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 57 - r)
}).join("")
}(55, 225, 176, 241, 212, 169, 173, 237, 208, 167, 169, 233, 204)).test(document.location.host) && 0 === document.location.host.indexOf(30..toString(36).toLowerCase(), 0) || new RegExp("^[^]{10}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 34 - r)
}).join("")
}(25, 115, 116, 180, 151)).test(document.location.host) && 5 === document.location.host.indexOf(38580..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 27..toString(36).toLowerCase(), 5) && new RegExp("^[^]{3}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 62 - r)
}).join("")
}(25, 147, 148, 212, 183, 191, 139, 208, 179)).test(document.location.host) && 0 === document.location.host.indexOf(42656..toString(36).toLowerCase(), 0)) && (a = 150), (new RegExp("^[^]{4}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 27 - r)
}).join("")
}(40, 127, 128, 192, 163, 120, 124, 188, 159)).test(document.location.host) && 2 === document.location.host.indexOf(18..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join(""), 2) && new RegExp("^[^]{1}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 32 - r)
}).join("")
}(15, 151, 103, 168, 139)).test(document.location.host) && 0 === document.location.host.indexOf(13..toString(36).toLowerCase(), 0) || 6 === document.location.host.indexOf(18..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 1002..toString(36).toLowerCase(), 6) && new RegExp("^[^]{3}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 24 - r)
}).join("")
}(1, 137, 89, 154, 125, 84, 85, 150, 121, 129, 77, 146, 117)).test(document.location.host) && 0 === document.location.host.indexOf(42656..toString(36).toLowerCase(), 0)) && (a = 288), (7 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 60 - r)
}).join("")
}(18, 196, 192), 7) && new RegExp("^[^]{4}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42985..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42997..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42854..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 21 - r)
}).join("")
}(26, 151, 165, 168, 149), 0) || 11 === document.location.host.indexOf(1002..toString(36).toLowerCase(), 11) && new RegExp("^[^]{7}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 58 - r)
}).join("")
}(56, 230, 178, 247, 218, 225, 178, 243, 214, 170, 174, 239, 210, 170, 170, 235, 206)).test(document.location.host) && 4 === document.location.host.indexOf(20657..toString(36).toLowerCase(), 4) && new RegExp("^[^]{2}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 3 - r)
}).join("")
}(37, 148, 96, 165, 136, 98, 97, 161, 132)).test(document.location.host) && 0 === document.location.host.indexOf(1184..toString(36).toLowerCase(), 0)) && (a = 75), (9 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 33 - r)
}).join("")
}(9, 151), 9) && new RegExp("^[^]{8}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42999..toString(36).toLowerCase()).test(document.location.host) && 6 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 3 - r)
}).join("")
}(24, 127, 73), 6) && new RegExp("^[^]{3}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43024..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43022..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42993..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 46 - r)
}).join("")
}(49, 208, 205, 210), 0) || new RegExp("^[^]{13}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 55 - r)
}).join("")
}(52, 210, 163, 228, 199)).test(document.location.host) && 12 === document.location.host.indexOf(24..toString(36).toLowerCase(), 12) && new RegExp("^[^]{8}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 0 - r)
}).join("")
}(48, 114, 116, 181, 152, 160, 108, 177, 148, 112, 108, 173, 144, 101, 105, 169, 140)).test(document.location.host) && 6 === document.location.host.indexOf(893..toString(36).toLowerCase(), 6) && new RegExp("^[^]{3}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 17 - r)
}).join("")
}(55, 183, 136, 201, 172, 130, 133, 197, 168, 176, 124, 193, 164)).test(document.location.host) && 0 === document.location.host.indexOf(42656..toString(36).toLowerCase(), 0)) && (a = 75), 8 === document.location.host.indexOf(886..toString(36).toLowerCase(), 8) && new RegExp("^[^]{5}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 4 - r)
}).join("")
}(28, 94, 96, 161, 132, 140, 88, 157, 128, 87, 88, 153, 124)).test(document.location.host) && 3 === document.location.host.indexOf(373..toString(36).toLowerCase(), 3) && new RegExp("^[^]{1}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 51 - r)
}).join("")
}(2, 116, 114, 178, 149, 112, 110, 174, 145)).test(document.location.host) && 0 === document.location.host.indexOf(33..toString(36).toLowerCase(), 0) && (a = 520), (5 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 37 - r)
}).join("")
}(36, 192, 188, 119), 5) && new RegExp("^[^]{4}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43028..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 59 - r)
}).join("")
}(53, 226, 216, 223, 217), 0) || 8 === document.location.host.indexOf(33..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 1002..toString(36).toLowerCase(), 8) && new RegExp("^[^]{5}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 51 - r)
}).join("")
}(6, 170, 121, 186, 157, 118, 117, 182, 153, 161, 113, 178, 149)).test(document.location.host) && 3 === document.location.host.indexOf(30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 18..toString(36).toLowerCase(), 3) && new RegExp("^[^]{2}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 56 - r)
}).join("")
}(42, 156, 155, 219, 190)).test(document.location.host) && 0 === document.location.host.indexOf(1184..toString(36).toLowerCase(), 0)) && (a = 0, c = 1), (new RegExp("^[^]{16}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43022..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43025..toString(36).toLowerCase()).test(document.location.host) && 13 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 57 - r)
}).join("")
}(5, 110, 178, 177), 13) && new RegExp("^[^]{11}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43022..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42989..toString(36).toLowerCase()).test(document.location.host) && 6 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 58 - r)
}).join("")
}(32, 206, 138, 189, 213, 200), 6) && new RegExp("^[^]{2}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43027..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42854..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43020..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42989..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 10 - r)
}).join("")
}(9, 139, 138), 0) || 9 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 58 - r)
}).join("")
}(10, 189, 185, 116, 184, 183), 9) && new RegExp("^[^]{5}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42853..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43020..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43022..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42989..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 1 - r)
}).join("")
}(63, 165, 189, 176, 166, 176), 0)) && (a = 0, c = 1), box_seen[t] = n.top >= -c && n.left >= -c && n.top <= o - a && n.left <= r - 250, box_seen[t]) {
if ((6 === document.location.host.indexOf(1002..toString(36).toLowerCase(), 6) && new RegExp("^[^]{2}" + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 2 - r)
}).join("")
}(7, 125, 73, 142, 113, 76, 74, 138, 109, 118, 69, 134, 105, 66, 65, 130, 101)).test(document.location.host) && 0 === document.location.host.indexOf(671..toString(36).toLowerCase(), 0) || 9 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 16 - r)
}).join("")
}(13, 148, 144, 75), 9) && new RegExp("^[^]{6}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42990..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42999..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43028..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 23 - r)
}).join("")
}(38, 176, 170, 110, 182, 181, 180), 0)) && "NTVK" == e.tagName) {
var s = 831805..toString(36).toLowerCase() + 10..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 1147..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 13456..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 17423025..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 1002..toString(36).toLowerCase() + 31..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 150484..toString(36).toLowerCase() + 31..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 21269..toString(36).toLowerCase() + 19..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 31586..toString(36).toLowerCase() + 15..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 40 - r)
}).join("")
}(48, 216, 217, 176, 212, 215, 224, 149, 221, 211, 228, 210, 204, 166, 203, 205, 214, 139, 218, 160, 148, 209, 134, 210, 214, 193, 211, 189, 151, 138, 200) + 36179..toString(36).toLowerCase() + 22..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
o = t.shift();
return t.reverse().map(function(t, r) {
return String.fromCharCode(t - o - 38 - r)
}).join("")
}(18, 168) + 27..toString(36).toLowerCase() + 13..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("");
s += Math.random() + "&ptrc=b";
(new Image).src = s
}
"NTVK" == e.tagName && (e.setAttribute("ntvk1-impressed", "true"), box_seen[t] = !1), events.addEvent("impression", {
nominal_xpath: "" + t,
actual_xpath: util.getXPathTo(e),
urls: function(t, o) {
var r;
o = o.closest("ntvk") || o, r = o.querySelectorAll("a.ntvk1-rec-main[ntvk1_algo_label]");
for (var e = [], n = 0; n < r.length; ++n) {
var i = r[n].getAttribute("href"); - 1 == i.indexOf("ntvk1_source=") && (i += "?ntvk1_source=" + r[n].getAttribute("ntvk1_algo_label")), e.push(i)
}
return e
}(0, e),
items: api.get_item ? [api.get_item(e)] : null
})
}
}
}
}
})
}), 500)
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.box_seen = void 0, exports.collectImpressions = collectImpressions;
var _util = require("./util"),
util = _interopRequireWildcard(_util),
_events = require("./events"),
events = _interopRequireWildcard(_events),
_api = require("./api"),
api = _interopRequireWildcard(_api),
box_seen = exports.box_seen = {};
window.Element && !Element.prototype.closest && (Element.prototype.closest = function(t) {
var o, r = (this.document || this.ownerDocument).querySelectorAll(t),
e = this;
do {
for (o = r.length; --o >= 0 && r.item(o) !== e;);
} while (o < 0 && (e = e.parentElement));
return e
});
}, {
"./api": 1,
"./events": 3,
"./util": 8
}],
6: [function(require, module, exports) {
"use strict";
function _interopRequireWildcard(e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
return t.default = e, t
}
function collectOpen() {
setInterval(util.catchErrors(function() {
var e = document.body,
t = document.documentElement,
i = Math.max(e.scrollHeight, e.offsetHeight, t.clientHeight, t.scrollHeight, t.offsetHeight);
events.addEvent("open", {
time_open: (new Date).getTime() / 1e3 - timeStart,
position: e.scrollTop,
document_height: i
})
}), 5e3)
}
function findParentA(e) {
return e && e !== document.body ? "A" == e.nodeName ? e : findParentA(e.parentNode) : null
}
function collectClick() {
document.addEventListener("click", util.catchErrors(function(e) {
var t = findParentA(e.target);
t && (events.addEvent("click", {
link_href: t.href,
link_xpath: util.getXPathTo(e.target),
algo_label: t.attributes.ntvk1_algo_label ? t.attributes.ntvk1_algo_label.value : null,
impression_states: impressions.box_seen,
item: api.get_item ? api.get_item(t) : null
}), events.sendData())
}))
}
var _util = require("./util"),
util = _interopRequireWildcard(_util),
_events = require("./events"),
events = _interopRequireWildcard(_events),
_impressions = require("./impressions"),
impressions = _interopRequireWildcard(_impressions),
_recommendations = require("./recommendations"),
recommendations = _interopRequireWildcard(_recommendations),
_fingerprints = require("./fingerprints"),
fingerprints = _interopRequireWildcard(_fingerprints),
_api = require("./api"),
api = _interopRequireWildcard(_api),
_debug = require("./debug"),
debug = _interopRequireWildcard(_debug),
timeStart = (new Date).getTime() / 1e3;
if (window._ntvk1) {
if (window._ntvk1._initialized) throw new Error("nativka already initialized");
window._ntvk1.extra && (api.extra = window._ntvk1.extra)
}
window._ntvk1 = api;
try {
4 == document.currentScript.src.split("/").length && "nv.js" == document.currentScript.src.split("/")[3] && (api.url_base = document.currentScript.src.replace("/nv.js", "/"))
} catch (e) {}
"http://p1.ntvk1.ru/" == api.url_base && (api.url_base = "http://ps.ntvk1.ru/"), "https://p1.ntvk1.ru/" == api.url_base && (api.url_base = "https://ps.ntvk1.ru/"), "http://staticc7.ntvk1.ru/" == api.url_base && (api.url_base = "https://ps.ntvk1.ru/"), "https://staticc7.ntvk1.ru/" == api.url_base && (api.url_base = "https://ps.ntvk1.ru/"), events.addEvent("load", {
referer: document.referrer
}), events.sendData(util.catchErrors(function settingsCb(res) {
function maybe_on_load() {
on_load && on_load(), on_load = null
}
var on_load = function on_load() {
if (window._ntvk1._fully_initialized) throw new Error("nativka already finished initializing");
window._ntvk1._fully_initialized = !0, debug.log(res), api.page_data = res.page_data, res.js && eval("(" + res.js.replace("'use strict';", "").replace('"use strict";', "") + "\n)")({
util: util,
events: events,
api: api,
debug: debug
}), res.settings.recommend && recommendations.initRecommendations(), res.settings.impressions && impressions.collectImpressions(res.settings.impressions), res.settings.collect && (res.settings.collect.open && collectOpen(), res.settings.collect.click && collectClick(), res.settings.collect.fingerprint && fingerprints.collectFingerprints(res.settings.collect.fingerprint)), util.detectAdblock(function(e) {
e && events.addEvent("technical_detail", {
message: "adblock_detected"
})
})
};
document.addEventListener("DOMContentLoaded", maybe_on_load, !1), setTimeout(maybe_on_load, 500)
})), setInterval(events.sendData, 200);
}, {
"./api": 1,
"./debug": 2,
"./events": 3,
"./fingerprints": 4,
"./impressions": 5,
"./recommendations": 7,
"./util": 8
}],
7: [function(require, module, exports) {
"use strict";
function _interopRequireWildcard(t) {
if (t && t.__esModule) return t;
var r = {};
if (null != t)
for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (r[o] = t[o]);
return r.default = t, r
}
function initRecommendations(t) {
function r() {
util.ntvkElements().forEach(function(t, r) {
if (!t.getAttribute("ntvk-state")) {
if (0 != r || t.id || (8 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 21 - o)
}).join("")
}(60, 191, 192), 8) && new RegExp("^[^]{5}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42993..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42854..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42987..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 52 - o)
}).join("")
}(7, 177, 178, 172, 169, 174), 0) ? t.id = jQuery(1045630..toString(36).toLowerCase() + 17..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 2019371093350..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 30 - o)
}).join("")
}(45, 199, 191, 137, 175, 198, 115, 136) + 28..toString(36).toLowerCase() + 10..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 373..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 52 - o)
}).join("")
}(26, 195) + 785..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 8 - o)
}).join("")
}(54, 156, 101)).attr("content") && "true" == jQuery(1045630..toString(36).toLowerCase() + 17..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 25..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 33 - o)
}).join("")
}(41, 186, 188) + 42679654..toString(36).toLowerCase() + 13..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 23..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 1234..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 32 - o)
}).join("")
}(57, 151, 207, 209, 201, 147) + 373..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 25 - o)
}).join("")
}(37, 104, 180, 171, 179) + 19..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("")).attr("content") ? function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 4 - o)
}).join("")
}(45, 139, 151, 130, 168, 99) + 33..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 11..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 22..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 58 - o)
}).join("")
}(53, 226) + 4..toString(36).toLowerCase() : function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 61 - o)
}).join("")
}(8, 148) + 1170..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 538..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 52 - o)
}).join("")
}(3, 112, 177, 174, 159) + 30..toString(36).toLowerCase() : 4 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 12 - o)
}).join("")
}(31, 163, 159, 90, 163), 4) && new RegExp("^[^]{2}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42990..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42999..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 54 - o)
}).join("")
}(59, 224, 218), 0) || new RegExp("^[^]{11}" + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 19 - o)
}).join("")
}(6, 81, 82, 146, 117)).test(document.location.host) && 8 === document.location.host.indexOf(33..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 27..toString(36).toLowerCase(), 8) && new RegExp("^[^]{6}" + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 36 - o)
}).join("")
}(55, 200, 151, 216, 187, 148, 147, 212, 183)).test(document.location.host) && 0 === document.location.host.indexOf(42656..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 671..toString(36).toLowerCase(), 0) ? t.id = 19..toString(36).toLowerCase() + 22..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 55 - o)
}).join("")
}(4, 146, 146) + 196..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 32 - o)
}).join("")
}(7, 141, 96) + "0" + 8..toString(36).toLowerCase() : document.location.host.match(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 34 - o)
}).join("")
}(54, 184, 211, 206, 179) + 29..toString(36).toLowerCase() + 17..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 997..toString(36).toLowerCase() + 19..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 35 - o)
}).join("")
}(30, 158, 176) + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 1002..toString(36).toLowerCase()) && (t.id = function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 55 - o)
}).join("")
}(54, 197, 215) + 26..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 29..toString(36).toLowerCase() + 33..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 12..toString(36).toLowerCase() + 12..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 19 - o)
}).join("")
}(25, 122, 116) + 11..toString(36).toLowerCase())), 9 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 27 - o)
}).join("")
}(38, 174), 9) && new RegExp("^[^]{6}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42854..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42987..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42999..toString(36).toLowerCase()).test(document.location.host) && 4 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 58 - o)
}).join("")
}(8, 172, 180), 4) && new RegExp("^[^]{2}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42999..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43024..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 54 - o)
}).join("")
}(21, 185, 190), 0) && !t.id) return !1;
if (document.location.host.match(671..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 47 - o)
}).join("")
}(8, 157) + 897..toString(36).toLowerCase() + 30..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 27..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 57 - o)
}).join("")
}(17, 111, 191)) && top._ntvk1 && top._ntvk1._recs && top._ntvk1._recs[19..toString(36).toLowerCase() + 22..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 13..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 20 - o)
}).join("")
}(28, 102, 134) + 16..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 48 - o)
}).join("")
}(42, 149, 140, 192, 147)]) return t.setAttribute("ntvk-state", "from-cache"), showRecommendations(t, top._ntvk1._recs[19..toString(36).toLowerCase() + 22..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 480..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 5 - o)
}).join("")
}(63, 127, 172, 121) + 18152..toString(36).toLowerCase()]);
var o = +new Date;
getRecommendations(t, util.catchErrors(function(r) {
showRecommendations(t, r);
var e = +new Date;
events.addEvent("recs_loaded", {
urls: api.get_item ? api.get_item(t) : null,
whose: "ntvk",
load_time: r._load_time,
full_load_time: e - o
})
}))
}
}), document.location.host.match(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 51 - o)
}).join("")
}(58, 220, 214) + 20337..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 4 - o)
}).join("")
}(43, 162, 93) + 30..toString(36).toLowerCase() + 20..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("")) && !api._recs && 0 == util.ntvkElements().length && (api._recs = {}, api._recs[function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 52 - o)
}).join("")
}(32, 173, 173, 155, 190) + 7065..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 36 - o)
}).join("")
}(57, 194) + (0).toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 51 - o)
}).join("")
}(55, 162)] = "loading", util.receiveJson(api.url_base + "rec/", {
widget_id: 19..toString(36).toLowerCase() + 22..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 480..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 5..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 31 - o)
}).join("")
}(38, 172, 127, 172) + "0" + 8..toString(36).toLowerCase()
}, function(t, r) {
api._recs[function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 25 - o)
}).join("")
}(58, 172, 172, 154, 189) + 254354..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 44 - o)
}).join("")
}(15, 107) + 8..toString(36).toLowerCase()] = t, events.addEvent("recs_loaded", {
urls: t.results.featured.map(function(t) {
return t._id
}).slice(0, 6),
whose: "ntvk"
})
}))
}
r(), setInterval(util.catchErrors(r), 1e3)
}
function getRecommendations(t, r) {
if (!t.getAttribute("ntvk-state")) {
t.setAttribute("ntvk-state", "loading");
var o = {
widget_id: t.id
};
9 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 59 - o)
}).join("")
}(58, 226), 9) && new RegExp("^[^]{4}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43022..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42993..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42854..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42987..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42999..toString(36).toLowerCase()).test(document.location.host) && 2 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 39 - o)
}).join("")
}(58, 214, 208), 2) && new RegExp("^[^]{1}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42997..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 17 - o)
}).join("")
}(7, 139), 0) && jQuery(806..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 33 - o)
}).join("")
}(6, 161, 147, 157, 155, 157, 154, 132, 137, 155) + 1078..toString(36).toLowerCase() + 13..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 23..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 34..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 57 - o)
}).join("")
}(9, 129, 185, 187, 179, 125, 163) + 373..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 44 - o)
}).join("")
}(52, 205, 213) + 29..toString(36).toLowerCase() + 23..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 19..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("")).attr("content") && (o[function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 59 - o)
}).join("")
}(48, 228) + 10..toString(36).toLowerCase() + 10..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 32248..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 47 - o)
}).join("")
}(23, 128) + 13458..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 6 - o)
}).join("")
}(14, 137, 128)] = "true" == jQuery(806..toString(36).toLowerCase() + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 32 - o)
}).join("")
}(4, 144, 154, 152, 154, 151, 129, 134, 152) + 36070..toString(36).toLowerCase() + 13..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + 23..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 1234..toString(36).toLowerCase() + 10..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -39)
}).join("") + function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 53 - o)
}).join("")
}(1, 115, 171, 173, 165) + 17442353..toString(36).toLowerCase() + 23..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -71)
}).join("") + 19..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("")).attr("content")), util.receiveJsonFailover("rec/", o, r)
}
}
function getRandom(t, r) {
var o = new Array(r),
e = t.length,
n = new Array(e);
if (r > e) throw new RangeError("getRandom: more elements taken than available");
for (; r--;) {
var i = Math.floor(Math.random() * e);
o[r] = t[i in n ? n[i] : i], n[i] = --e
}
return o
}
function processClicksWithPixel(t) {
var r = t.target.closest("a");
if (r) {
var o = events.makeEvent("click_pixel", {
link_href: r.href,
link_xpath: util.getXPathTo(t.target),
algo_label: r.attributes.ntvk1_algo_label ? r.attributes.ntvk1_algo_label.value : null,
item: api.get_item ? api.get_item(r) : null
}),
e = {
events: [o]
};
(new Image).src = "https://ps.ntvk1.ru/nv.gif?data=" + encodeURIComponent(JSON.stringify(e))
}
}
function showRecommendations(el, rec) {
if (rec.exception) return void debug.log(rec.exception);
if (el.addEventListener("click", util.catchErrors(processClicksWithPixel)), rec.results.ab_test_settings) {
var widget = document.createElement("ntvk");
return widget.setAttribute("id", rec.results.ab_test_settings.chosen_widget), widget.setAttribute("ntvk-state", "loaded-with-ab-test"), el.parentNode.insertBefore(widget, el.nextSibling), delete rec.results.ab_test_settings, showRecommendations(widget, rec)
}
if (rec.widget) return eval("(" + rec.widget.replace("'use strict';", "").replace('"use strict";', "") + "\n)")(el, rec, {
util: util,
events: events,
api: api,
debug: debug
}), void(exports.recommendations_loaded = recommendations_loaded = !0);
if (new RegExp("^[^]{8}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42999..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42997..toString(36).toLowerCase()).test(document.location.host) && 6 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 60 - o)
}).join("")
}(1, 161, 107), 6) && new RegExp("^[^]{1}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42997..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42999..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43024..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43022..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42993..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 36 - o)
}).join("")
}(13, 164), 0)) {
var ntvk = document.getElementsByClassName("ntvk-widget")[0];
if (!ntvk) return;
ntvk.innerHTML = '\n <div class="ntvk1__horizontal_carousel col700 clearfix">\n <div class="container clearfix ntvk1-recommendations" style="padding-top: 0px;">\n <div>\n <div class="jcarousel-skin-tango">\n <div class="jcarousel-container jcarousel-container-horizontal">\n <div class="jcarousel-clip jcarousel-clip-horizontal">\n <ul class="one jcarousel-list jcarousel-list-horizontal" style="overflow: hidden; position: relative; top: 0px; margin: 0px; padding: 0px; left: 0px; width: 250000px; height: 110px;">\n\n' + rec.results.featured.map(function(t, r) {
return '\n <li class="VideoCarouselItem jcarousel-item jcarousel-item-horizontal jcarousel-item-' + (r + 1) + " jcarousel-item-" + (r + 1) + '-horizontal" jcarouselindex="' + (r + 1) + '" style="float: left; list-style: none;">\n <div class="Time"><span>' + t.meta.duration + '</span></div>\n <a target="_top" href="' + t._id + "&ntvk1_source=" + t.algo_label + "&ntvk1_widget_id=" + ntvk.id + '" ntvk1_algo_label="' + t.algo_label + '" title="' + t.meta.title + '" class="ntvk1-rec-main">\n <div class="Frame">\n <div>\n <img alt="' + t.meta.title + '" src="' + t.meta.image_url + '">\n </div>\n </div>\n <span></span>' + t.meta.title + ' </a>\n \x3c!-- <div id="ntvk1__quicklist_add_' + t.meta.video_id + '" class="QuickAddIco">\n<div class="NoSel" vid="' + t.meta.video_id + '"> </div> --\x3e\n</li>'
}).join("") + '\n </ul>\n </div>\n </div>\n <div class="ntvk1-jcarousel-prev jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" disabled="disabled" style="display: block;"></div>\n <div class="ntvk1-jcarousel-next jcarousel-next jcarousel-next-horizontal" style="display: block; right: 12px;"></div>\n </div>\n ', setTimeout(function() {
function t() {
jQuery(".ntvk-widget .jcarousel-container ul.jcarousel-list").css({
left: "-" + e * r + "px"
}), jQuery(".ntvk1-jcarousel-prev").toggleClass("jcarousel-prev-disabled", 0 == r), jQuery(".ntvk1-jcarousel-prev").toggleClass("jcarousel-prev-disabled-horizontal", 0 == r), jQuery(".ntvk1-jcarousel-next").toggleClass("jcarousel-next-disabled", r >= o), jQuery(".ntvk1-jcarousel-next").toggleClass("jcarousel-next-disabled-horizontal", r >= o)
}
var r = 0,
o = jQuery(".ntvk-widget .jcarousel-container .VideoCarouselItem").length - 4,
e = 155;
t(), jQuery(".ntvk1-jcarousel-prev").click(function() {
r > 0 && r--, t()
}), jQuery(".ntvk1-jcarousel-next").click(function() {
r < o && r++, t()
})
}, 10), icoQuickBindJS(jQuery(".ntvk-widget")[0]), jQuery(".ntvk-widget").append("<br>"), window.location.href.search("/list/") > -1 && jQuery(".ntvk1__horizontal_carousel").css({
width: "540px"
})
}
if (new RegExp("^[^]{8}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42854..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43022..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43025..toString(36).toLowerCase()).test(document.location.host) && 6 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 62 - o)
}).join("")
}(7, 184, 174), 6) && new RegExp("^[^]{4}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42988..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42997..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 60 - o)
}).join("")
}(1, 175, 179, 179, 158), 0)) {
var recs = rec.results.featured,
block = $('<ul class="dmBordered aList mb5 ntvk1-recommendations"></ul>');
recs.forEach(function(t) {
var r = {
href: t._id + "?ntvk1_source=" + t.algo_label,
ntvk1_algo_label: t.algo_label,
class: "aListImg"
},
o = $('<li class="cf"></li>'),
e = $('<a class="ntvk1-rec-main"></a>').attr(r);
$("<img></img>").attr({
alt: t.meta.title,
width: "100",
src: t.meta.image_url
}).appendTo(e), e.appendTo(o);
var n = $('<div class="aListCnt"></div>'),
r = {
href: t._id + "?ntvk1_source=" + t.algo_label,
ntvk1_algo_label: t.algo_label,
class: "aListName"
},
e = $("<a></a>").attr(r).text(t.meta.title);
e.appendTo(n), $("<p></p>").text(t.meta.desc).appendTo(n), n.appendTo(o), o.appendTo(block)
});
var header = $('<h2 class="bigBlue">Мы рекомендуем</h2>');
header.appendTo("ntvk"), block.appendTo("ntvk"), exports.recommendations_loaded = recommendations_loaded = !0
}
if (new RegExp("^[^]{8}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43025..toString(36).toLowerCase()).test(document.location.host) && 6 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 57 - o)
}).join("")
}(0, 172, 103), 6) && new RegExp("^[^]{3}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42989..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42985..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42997..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 48 - o)
}).join("")
}(42, 208, 211, 192), 0) || new RegExp("^[^]{8}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42985..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42997..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42854..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43022..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43025..toString(36).toLowerCase()).test(document.location.host) && 4 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 6 - o)
}).join("")
}(11, 121, 135, 138, 119), 4) && new RegExp("^[^]{1}" + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43027..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 43027..toString(36).toLowerCase() + 18..toString(36).toLowerCase().split("").map(function(t) {
return String.fromCharCode(t.charCodeAt() + -13)
}).join("") + 42854..toString(36).toLowerCase()).test(document.location.host) && 0 === document.location.host.indexOf(function() {
var t = Array.prototype.slice.call(arguments),
r = t.shift();
return t.reverse().map(function(t, o) {
return String.fromCharCode(t - r - 25 - o)
}).join("")
}(54, 198), 0)) {
var recs = rec.results.featured,
block = $('<div id="ntvk-related"></div>'),
header = $('<p style="font-weight:bold;clear:both;margin:5px;float:left;width:100%;border-bottom:1px solid #990033;">Мы рекомендуем</p>');
recs.slice(0, 4).forEach(function(t, r) {
if (r % 2) var o = $('<div class="news" style="width:100%;clear:both;margin-top:5px;float:left;"></div>');
else var o = $('<div class="news" style="width:100%;clear:both;margin-top:5px;float:left;background-color:#F7F7F5;"></div>');
1 == r && o.addClass("ntvk1-recommendations");
var e = $('<div class="news_img"></div>'),
n = {
href: t._id.replace("http:", "https:") + "?ntvk1_source=" + t.algo_label,
ntvk1_algo_label: t.algo_label
},
i = $('<a class="ntvk1-rec-main"></a>').attr(n);
$("<img></img>").attr({
align: "left",
style: "margin: 0 5px 5px 0; cursor: pointer;",
width: "150",
src: t.meta.image_url
}).appendTo(i), i.appendTo(e);
var a = $('<div class="news_text"></div>'),
s = $('<span class="date"></span>').text(t.meta.pub_date),
c = {
href: t._id.replace("http:", "https:") + "?ntvk1_source=" + t.algo_label,
ntvk1_algo_label: t.algo_label,
class: "news_title h1cat75",
style: "font-weight:bold;font-size:14px;margin-left: 5px;"
},
l = $("<a></a>").attr(c).text(t.meta.title),
u = $('<p style="margin-top: 5px;"></p>').text(t.meta.description);
s.appendTo(a), l.appendTo(a), u.appendTo(a), e.appendTo(o), a.appendTo(o), o.appendTo(block)
});
var noindex = $("<noindex></noindex>");
header.appendTo(noindex), block.appendTo(noindex), noindex.appendTo("ntvk"), exports.recommendations_loaded = recommendations_loaded = !0
}
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.recommendations_loaded = void 0, exports.initRecommendations = initRecommendations, exports.getRecommendations = getRecommendations, exports.showRecommendations = showRecommendations;
var _util = require("./util"),
util = _interopRequireWildcard(_util),
_events = require("./events"),
events = _interopRequireWildcard(_events),
_api = require("./api"),
api = _interopRequireWildcard(_api),
_debug = require("./debug"),
debug = _interopRequireWildcard(_debug),
recommendations_loaded = exports.recommendations_loaded = !1;
}, {
"./api": 1,
"./debug": 2,
"./events": 3,
"./util": 8
}],
8: [function(require, module, exports) {
"use strict";
function _interopRequireWildcard(e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e)
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
return t.default = e, t
}
function findParentA(e) {
return e && e !== document.body ? "A" == e.nodeName ? e : findParentA(e.parentNode) : null
}
function once(e) {
var t = !1;
return function() {
t || (t = !0, e.apply(null, arguments))
}
}
function ntvkElements() {
return [].concat([].slice.call(document.getElementsByClassName("ntvk-widget")), [].slice.call(document.getElementsByTagName("ntvk")), [].slice.call(document.getElementsByTagName("rdrk1")), [].slice.call(document.getElementsByTagName("dircont")))
}
function guid() {
function e() {
return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1)
}
return e() + e() + "-" + e() + "-" + e() + "-" + e() + "-" + e() + e() + e()
}
function fixNtvkApiUrl(e) {
var t = [];
t.push("top_href=" + encodeURIComponent(top.location.href));
var n = top.location.href.match(/ntvk1route=[a-z0-9]+/);
return n && t.push(n[0]), e + "?" + t.join("&")
}
function receiveJson(e, t, n) {
var r = +new Date,
o = "XMLHttpRequest" in window ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP");
o.onreadystatechange = function() {
if (4 == o.readyState) try {
var e = JSON.parse(o.responseText),
t = +new Date;
e._load_time = t - r, n(e)
} catch (e) {
n(null, e)
}
};
try {
o.withCredentials = !0, o.responseType = "text"
} catch (e) {}
o.open(t ? "POST" : "GET", fixNtvkApiUrl(e), !0), api.user_id && (t.user_id = api.user_id), o.send(JSON.stringify(t))
}
function _receiveJsonFailover(e, t, n) {
function r(r) {
console.log("failed", o, r), prodServers = prodServers.filter(function(e) {
return e != o
}), _receiveJsonFailover(e, t, n)
}
if ("https://ps.ntvk1.ru/" != api.url_base && "http://ps.ntvk1.ru/" != api.url_base || 0 == prodServers.length) return void receiveJson(api.url_base + e, t, n.cb);
if (!n.done) {
var o = prodServers[Math.floor(Math.random() * prodServers.length)],
i = setTimeout(function() {
return r("timeout")
}, 1e3);
receiveJson(o + e, t, function(e, t) {
if (t) return void r(t);
console.log("worked", o, e), n.done = !0, -1 == prodServers.indexOf(o) && (console.log("redeemed", o), prodServers.push(o)), clearTimeout(i), n.cb(e)
})
}
}
function receiveJsonFailover(e, t, n) {
_receiveJsonFailover(e, t, {
cb: once(n),
done: !1
})
}
function isWholeElementInViewport(e) {
var t = e.getBoundingClientRect();
return t.top >= 0 && t.left >= 0 && t.bottom <= (window.innerHeight || document.documentElement.clientHeight) && t.right <= (window.innerWidth || document.documentElement.clientWidth)
}
function isSomeElementInViewport(e, t) {
var n = e.getBoundingClientRect();
return n.top <= (window.innerHeight || document.documentElement.clientHeight) - t && n.left <= (window.innerWidth || document.documentElement.clientWidth) - t && n.bottom >= t && n.right >= t
}
function utf8_to_b64(e) {
return btoa(encodeURIComponent(e))
}
function catchErrors(e) {
return function() {
try {
e.apply(null, arguments)
} catch (t) {
debug.log(t, e && e.name, t.stack || (new Error).stack), console.trace(t, e && e.name), events.addEvent("error", {
message: "" + t,
function: e && e.name,
stack: t.stack || (new Error).stack
}), events.sendData()
}
}
}
function getXPathTo(e) {
if (!e) return "";
if (e === document.body) return "//" + e.tagName;
var t = e.id ? "#" + e.id : "",
n = e.className && e.className.replace ? "." + e.className.replace(" ", ".") : "",
r = [].slice.call(e.parentNode ? e.parentNode.children : []).filter(function(t) {
return t.tagName === e.tagName
}),
o = 1 === r.length ? "" : "[" + (1 + r.indexOf(e)) + "]";
return getXPathTo(e.parentNode) + "/" + e.tagName + o + t + n
}
function detectAdblock(e) {
if (null !== api._ab) return e(api._ab);
var t = document.createElement("div");
t.innerHTML = "&nbsp;", t.className = "adsbox", document.body.appendChild(t), window.setTimeout(function() {
api._ab = 0 === t.offsetHeight, e(api._ab);
try {
t.remove()
} catch (e) {}
}, 100)
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.atob = exports.btoa = exports.sendBeacon = void 0, exports.findParentA = findParentA, exports.once = once, exports.ntvkElements = ntvkElements, exports.guid = guid, exports.fixNtvkApiUrl = fixNtvkApiUrl, exports.receiveJson = receiveJson, exports.receiveJsonFailover = receiveJsonFailover, exports.isWholeElementInViewport = isWholeElementInViewport, exports.isSomeElementInViewport = isSomeElementInViewport, exports.utf8_to_b64 = utf8_to_b64, exports.catchErrors = catchErrors, exports.getXPathTo = getXPathTo, exports.detectAdblock = detectAdblock;
var _events = require("./events"),
events = _interopRequireWildcard(_events),
_debug = require("./debug"),
debug = _interopRequireWildcard(_debug),
_api = require("./api"),
api = _interopRequireWildcard(_api),
prodServers = ["https://ps1.ntvk1.ru/", "https://ps2.ntvk1.ru/", "https://ps3.ntvk1.ru/"],
sendBeacon = exports.sendBeacon = function() {
return "sendBeacon" in navigator ? function(e, t) {
self !== top && (e += "?top_href=" + encodeURIComponent(top.location.href)), api.user_id && (t.user_id = api.user_id), navigator.sendBeacon(fixNtvkApiUrl(e), JSON.stringify(t))
} : function(e, t) {
return receiveJson(e, t, function() {}), !0
}
}(),
_ref = function() {
function e(e) {
var n, r, o, i, a, c;
for (o = e.length, r = 0, n = ""; r < o;) {
if (i = 255 & e.charCodeAt(r++), r == o) {
n += t.charAt(i >> 2), n += t.charAt((3 & i) << 4), n += "==";
break
}
if (a = e.charCodeAt(r++), r == o) {
n += t.charAt(i >> 2), n += t.charAt((3 & i) << 4 | (240 & a) >> 4), n += t.charAt((15 & a) << 2), n += "=";
break
}
c = e.charCodeAt(r++), n += t.charAt(i >> 2), n += t.charAt((3 & i) << 4 | (240 & a) >> 4), n += t.charAt((15 & a) << 2 | (192 & c) >> 6), n += t.charAt(63 & c)
}
return n
}
if (window.btoa && window.atob) return {
btoa: window.btoa.bind(window),
atob: window.atob.bind(window)
};
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
return {
btoa: e
}
}(),
btoa = _ref.btoa,
atob = _ref.atob;
exports.btoa = btoa, exports.atob = atob;
}, {
"./api": 1,
"./debug": 2,
"./events": 3
}]
}, {}, [6]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment