var _tmr=_tmr||[];
(function(){function yb(){return S&&zb&&Ya?(Za=[zb-S,Ya-S,La?La-S:null,Ma?Ma-S:null].join("/"),La&&Ma&&(yb=function(){return Za}),Za):null}function s(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}function K(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)}function Ab(a,b){try{if(a.nodeName.toLowerCase()===b.toLowerCase())return a;if(a.parentNode)return Ab(a.parentNode,b)}catch(c){p&&console.warn("[TopMailRu] Error#1.25",c)}return null}
function Bb(a,b){if(null===a.offsetParent||(0==a.offsetHeight||0==a.offsetWidth||0==a.clientHeight||0==a.clientWidth)||b&&(0==a.offsetLeft||0==a.offsetTop))return!1;if(void 0!==e.getComputedStyle){var c=e.getComputedStyle(a,null);return"none"!==c.display&&"hidden"!==c.visibility}return!0}function L(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]==a)return!0;return!1}function Q(a){var b=typeof a;return!("number"===b||"boolean"===b||"string"===b||a.nodeType||a===a.window)}function T(a){return"[object Array]"===
Object.prototype.toString.call(a)}function ja(){var a=arguments,b=a[0]||{},c=!1,d=1,f=a.length,h,g,l,n,e;"boolean"===typeof b&&(c=b,b=a[d++]||{});for(Q(b)||(b={});d<f;d++)if(null!=(h=a[d]))for(g in h)l=b[g],n=h[g],b!==n&&(c&&n&&(Q(n)||(e=T(n)))?(e?(e=!1,l=l&&T(l)?l:[]):l=l&&Q(l)?l:{},b[g]=ja(c,l,n)):void 0!==n&&(b[g]=n));return b}function hc(a,b,c){if(!a)return null;var d=a.match(b),f=2<arguments.length?c:0;return d&&d.length>f?d[f]:null}function Cb(a){return(""+a).replace(/[\/\^\$\*\+\?\.\|\(\)\[\]\{\}\\]/g,
"\\$&")}function Db(a){var b="";try{var c=new Uint8Array(a);e.crypto.getRandomValues(c);for(var d=0;d<a;d++)b+=(c[d]%16).toString(16)}catch(f){b="";for(d=0;d<a;d++)c=Math.floor(16*Math.random()),b+=c.toString(16)}return b}function w(){return(new Date).getTime()}function z(a,b){var c={data:b,raw:a,url:$a(a)},d;if(!ic||"function"!==typeof navigator.sendBeacon)d=!1;else{c.dataSplitter=";";var f=ab(c.data,c.dataSplitter);try{d=!0===navigator.sendBeacon(c.url,f)}catch(h){d=!1}}d||(void 0===b?(c.dataSplitter=
";",c.open=jc,c.connect=kc,c.startListen=lc,c.stopListen=mc,c.open(c),c.connect(c)):("function"===typeof e.XMLHttpRequest?(c.dataSplitter=";",c.open=nc,c.connect=oc,c.startListen=pc,c.stopListen=qc,c.open(c),c.connect(c),d=!0):d=!1,d||rc(c)))}function rc(a){var b=k.createElement("iframe"),c=k.createElement("div");c.setAttribute("style","position: absolute !important; top: -9999px !important; left: -9999px !important; width: 1px !important; height: 1px !important;");c.appendChild(b);k.body.appendChild(c);
try{var d=b.contentWindow.document,f=d.createElement("div"),h;for(h in a.data)if(a.data.hasOwnProperty(h)){var g=a.data[h],l=typeof g;if("string"===l||"number"===l){var n=d.createElement("input");n.setAttribute("type","hidden");n.setAttribute("name",h);n.value=g;f.appendChild(n)}}var e=d.createElement("form");e.setAttribute("action",a.url);e.setAttribute("method",Eb);e.setAttribute("enctype",Fb);e.appendChild(f);var m=d.createElement("div");m.appendChild(e);d.body.appendChild(m);var A=function(){try{K(b,
"load",A),k.body.removeChild(c)}catch(a){p&&console.warn("[TopMailRu] Error#1.2",a)}};s(b,"load",A);e.submit()}catch(r){p&&console.warn("[TopMailRu] Error#1.3",r)}}function nc(a){a._connection=new e.XMLHttpRequest}function oc(a){a._connection.open(Eb,a.url);a._connection.setRequestHeader("Content-Type",Fb);a._connection.send(ab(a.data,a.dataSplitter))}function pc(a){s(a._connection,"load",a._onload);s(a._connection,"error",a._onerror)}function qc(a){K(a._connection,"load",a._onload);K(a._connection,
"error",a._onerror)}function jc(a){a._connection=new Image}function kc(a){a._connection.src=a.url+ab(a.data,a.dataSplitter)}function lc(a){a._connection.onload=a._onload;a._connection.onerror=a._onerror}function mc(a){a._connection.onload=null;a._connection.onerror=null}function ab(a,b){var c=b||";",d="",f;for(f in a)if(a.hasOwnProperty(f)){var h=a[f],g=typeof h;if("string"===g||"number"===g)d+=c+escape(f)+"="+escape(h)}return d}function $a(a){return"https://top-fwz1.mail.ru"+a}function U(a){return(a=
k.cookie.match(RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(a[1]):null}function ra(a,b,c){c=c||{};var d=c.expires;"number"===typeof c.expires&&(d=new Date,d.setTime(d.getTime()+c.expires));d&&d.toUTCString&&(d=d.toUTCString());c.expires=d;a=a+"="+encodeURIComponent(b);for(var f in c)if((b=c[f])||0===b)a+="; "+f,!0!==b&&(a+="="+b);k.cookie=a}function bb(a,b){var c=b||{};c.expires=-1;ra(a,"",c)}function sc(){var a="tmr"+(""+Math.random()).slice(2);
try{return ka=e.localStorage||null,ka.setItem(a,a),ka.removeItem(a),!0}catch(b){return ka=null,p&&console.warn("[TopMailRu] Error#1.4",b),!1}}function xa(a){try{return ka.getItem(a)}catch(b){p&&console.warn("[TopMailRu] Error#1.5",b)}return null}function ya(a,b){try{ka.setItem(a,b)}catch(c){p&&console.warn("[TopMailRu] Error#1.6",c)}}function tc(){if(!la)return null;for(var a=x.hostname.split(".").reverse(),b,c=1,d=a.length;c<d;c++){b=a[0];for(var f=1;f<=c;f++)b=a[f]+"."+b;var f=""+w(),h={domain:b,
path:"/",expires:3E5};try{ra("tmr_tcdhn",f,h);var g=U("tmr_tcdhn");bb("tmr_tcdhn",h);if(g===f)return b}catch(l){p&&console.warn("[TopMailRu] Error#1.8",l)}}return null}function Gb(a,b){la&&ra(a,b,cb);ma&&ya(a,b)}function db(a,b,c){var d=k.createElement("script");d.type="text/javascript";d.async=!0;b&&(d.onload=b);c&&(d.onerror=c);d.src=a;document.body.appendChild(d)}function Hb(a){var b=";e="+escape("detect");z(I(a,"/tracker",!1,!1)+b)}function Ib(a,b){if(a.length&&null!==b.ecom_data){var c=va(b.ecom_data),
c=c?(""+c).substring(1,c.length-1):"";if(!(4096<c.length||-1===c.search(/\S/))){var d=eb("_m",b.ecom_method),f=eb("_t",b.ecom_type),h=eb("_jst",Jb()),c="{"+c+d+f+h+"}";z(I({id:a[0]},"/datalayer",!1,!0)+(";ids="+escape(a.join()))+(";e="+escape(c)))}}}function eb(a,b){var c=',"'+a+'":';if(!b||!b.length)return c+"[]";try{return c+'["'+b.join('","')+'"]'}catch(d){}return c+"false"}function uc(){var a=U(Kb);if(null===a)return null;a=a.split("|");if(3!==a.length)return null;var b=a[2],b=w()-b;return 0>
b||b>Lb?null:{id:a[0],version:a[1]}}function Mb(a){fb=!0;a.length&&db($a("/js/dyn-goal-config.js?ids="+a.join(",")))}function m(){}function sa(a){a&&"object"===typeof a&&(!V&&"id"in a)&&(V=a.id)}function vc(a){return(a=!W?void 0:W[a])&&Oa?a-Oa:void 0}function Nb(){if(W){for(var a=0,b="domInteractive domContentLoadedEventStart domContentLoadedEventEnd domComplete loadEventStart loadEventEnd".split(" "),c=0;c<b.length;c++){var d=!W?void 0:W[b[c]];if(0<d&&(d<a||0==a))a=d}return a?a:void 0}}function X(a,
b){var c=1<arguments.length?b:V;return a&&"object"===typeof a&&("id"in a&&a.id||c)}function I(a,b,c,d){ma&&ya(ta,++F);var f="id"in a?a.id:V,h="url"in a?a.url:x.href,g="referrer"in a?a.referrer:k.referrer,l="title"in a?a.title:k.title,n;n=gb;null===n&&(n=wc());n=null!==n?n?1:0:null;var Na="userid"in a?a.userid:Y||0===Y?Y:void 0,m=Z?Z:void 0,A;A=na&&a.bfCache;var r="pageView"===a.type&&a.timespent,q=[];V&&f!==V&&q.push("sec");"dataLayer"in e&&q.push("dl");C&&q.push(["ecom"].concat(C).join("-"));var za=
xc();za&&za.length&&q.push(["jst"].concat(za).join("-"));A&&q.push("bfc");M&&r&&q.push("ts");e.top!==e&&q.push("frame");A=q.join(",");var hb=e.screen,r=(new Date).getTimezoneOffset(),q="";if(e.Intl)try{q=e.Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(yc){p&&console.warn("[TopMailRu] Error#1.1",yc)}za=r+"/"+q;r=Ob;r=null!==r?r:uc();q=yb();a.start=Nb();b=b+"?_="+Math.random()+(f?";id="+escape(f):"")+(h?";u="+escape(h):"")+(g?";r="+escape(g):"")+(a.start?";st="+escape(a.start):"")+("gender"in
a?";gender="+escape(a.gender):"")+("age"in a?";age="+escape(a.age):"")+("pid"in a?";pid="+escape(a.pid):"")+(void 0!==Na?";userid="+escape(Na):"")+(void 0!==m?";uparams="+escape(va(m)):"")+(d&&l?";title="+encodeURIComponent(l):"")+(hb?";s="+hb.width+"*"+hb.height:"")+";vp=";f=d=0;k.documentElement&&(k.documentElement.clientWidth||k.documentElement.clientHeight)?(d=k.documentElement.clientWidth,f=k.documentElement.clientHeight):"number"==typeof e.innerWidth&&(d=e.innerWidth,f=e.innerHeight);b=b+(""+
d+"*"+f)+";touch="+zc+";hds="+Ac+";sid="+ib+";ver="+Bc+";tz="+encodeURIComponent(za);if(c){if(!W||!jb)c="";else{c=[];c.push(jb.type);c.push(jb.redirectCount);c.push(Oa);for(d=0;d<Pb.length;d++)c.push(vc(Pb[d]));c=c.join("/")}c=";nt="+c}else c="";c=b+c+(q?";ct="+q:"")+(Pa?";gl="+Pa:"")+("device"in a?";device="+escape(a.device):"")+";ni=";if(!D||!D.connection)b="";else{b=D.connection;d=[];for(h=0;h<Qb.length;h++){f=b[Qb[h]];if(void 0!==f)switch(f){case !0:f=1;break;case !1:f=0;break;default:f=(""+f).replace(/\//g,
"_")}d.push(f)}b=d.join("/")}return c+b+("params"in a?";params="+escape(va(a.params)):"")+(null!==n?";detect="+n:"")+(la||ma?";lvid="+escape([Aa,w(),F,ca].join(":")):"")+(A?";opts="+escape(A):"")+(r?";flocid="+escape(r.id)+";flocv="+escape(r.version):"")+(Rb&&Ba?";fpid="+Ba:"")+("version"in a?";appver="+escape(a.version):"")+(da.support?";visible="+da.getValue():"")+";js=13"}function Sb(a){a=";e="+escape("PVT/"+a);for(var b=0;b<B.length;b++)z(I(B[b],"/tracker",!1,!0)+a)}function Cc(){gb=!0;Tb(1);
if(!kb&&!Ca){Ca=!0;for(var a=0;a<B.length;a++)Hb(B[a])}}function Dc(){Tb(0);gb=!1}function wc(){var a=U(Ub);if(null===a)return null;a=a.split("|");if(2!==a.length)return null;var b=a[1],b=w()-b;if(0>b||b>Vb)return null;a=parseInt(a[0],10);return isNaN(a)?null:a}function Tb(a){var b=w();a=[a,b].join("|");ra(Ub,a,{path:"/",expires:Vb})}function Ec(){Fc||(N.pvt2=setTimeout(function(){Sb(2)},2E3));Gc||(N.pvt15=setTimeout(function(){Sb(15)},15E3))}function Wb(){lb||setInterval(function(){_tmr.beat()},
6E4)}function Hc(a,b,c,d){if(!b||!d||d===mb&&b===mb&&c===mb)return null;b={goal:Ic+b,value:c||0,params:{product_id:d}};a&&(b.id=a);return b}function Qa(){k.addEventListener?(K(k,"DOMContentLoaded",Qa),_tmr.onready()):k.attachEvent&&"complete"===k.readyState&&(K(k,"readystatechange",Qa),_tmr.onready());Xb()}function nb(a){if(na){if(a.persisted){Da=Ea=Ra=0;ob=pb=!1;M&&u.launch();a=qb;qb=[];for(var b=0,c=a.length;b<c;b++)_tmr.callbackOnReady(a[b]);a=Sa;Sa={};for(b in a)_tmr.pageView(a[b]);Wb()}}else K(e,
"load",nb);_tmr.onready();_tmr.onload()}function Fa(){na||(K(e,"unload",Fa),K(e,"beforeunload",Fa));_tmr.unload()}function Xb(){M&&u.launch();if(Jc){window.addEventListener("message",function(a){var c=null;try{if(c=a.data,Q(c)||(c=Ta(c)),"LOAD_BUTTONS_SCRIPT"===c.type){var d;var f=document.referrer;a=null;var h=(""+c.lang).toLowerCase(),g;b:{for(var c=0,l=rb.length;c<l;c++)if(rb[c]===h){g=!0;break b}g=!1}g||(h=rb[0]);try{a=pa.parse(f,"domain")}catch(e){}d=a&&Kc.test(a)?"https://"+a+"/top_constructor/buttons_"+
h+".js":$a("/js/dyn-goal-wizard-"+h+".js");db(d)}}catch(k){}});if(window.opener)try{window.opener.postMessage({type:"READY"},document.referrer)}catch(a){}fb||(Ua.push.apply(Ua,Ga),Mb(Ga))}}if("[object Array]"===Object.prototype.toString.call(_tmr)){var zb=(new Date).getTime(),Ya=null,La=null,Ma=null,S=null,Za=null,e=window,D=navigator,k=document,x=location,$="string"===typeof x.hostname?x.hostname:"",Ha=-1!=$.search(/(^|\.)odnoklassniki\.ru$/)||-1!=$.search(/(^|\.)ok\.ru$/),Yb=-1!=$.search(/(^|\.)vk\.com$/);
$.search(/(^|\.)mail\.ru$/);var Lc=-1!=$.search(/(^|\.)lamoda\.ru$/),Mc=-1!=$.search(/(^|\.)kommersant\.ru$/),Nc=-1!=$.search(/(^|\.)top\.mail\.ru$/);$.search(/(^|\.)dzen\.ru$/);var Oc="string"===typeof x.search&&-1!=x.search.search(/[?&]rb_clickid=/),p="string"===typeof x.search&&-1!=x.search.search(/[?&]tmr_debug=1(?:&|$)/),ic=!1,lb=Ha||Yb||Lc||Mc,Fc=!Oc,Gc=Ha,kb=!1,M=e.performance&&"visibilityState"in k,Pc=[36383],Qc=!(Ha||Yb),Jc=!0,Rb=Nc,Zb=e.JSON&&e.JSON.stringify&&e.JSON.parse,na="onpageshow"in
e&&"onpagehide"in e,va=Zb?e.JSON.stringify.bind(e.JSON):function(a){return""},Ta=Zb?e.JSON.parse.bind(e.JSON):function(a){return{}},pa=function(){function a(a,b){var c=(""+a).match(f),d={};d[g]=c;for(var h=0,e=c.length;h<e;h++)c[h]&&(d[n[h]]=c[h]);c=1<arguments.length&&void 0!==b;delete d[g];return c&&!0!==b?d[b]||null:d}function b(a,b){var d;d=(""+a).match(h)||[];var f={};f[g]=d;if(d.length){for(var e=0,l=d.length;e<l;e++)d[e]&&(f[k[e]]=d[e]);d=f}else d=null;if(!d)return null;if((f=1<arguments.length&&
void 0!==b)&&(-1!==m.indexOf(b)||!0===b))for(var e=d,n=0,Rc=m.length;n<Rc;n++)(l=c(p[n]||"",e,n))&&(e[m[n]]=l);delete d[g];return f&&!0!==b?d[b]||null:d}function c(a,b,d){var f="",h;if(Q(a)&&"data"in a)f="index"in a?(b[a.data]||[])[a.index]||"":c(a.data,b,d),"re"in a&&(f=hc(f,a.re,a.reMatchIndex)||""),f&&(h=c(a.pre||"",b,d),a=c(a.post||"",b,d),f=h+f+a);else if(T(a)){h=0;for(var e=a.length;h<e;h++)f+=c(a[h],b,d)}else f=k.indexOf(a),-1===f&&(f=m.indexOf(a),f>=d&&(f=-1)),f=-1!==f?b[a]||"":""+a;return f}
function d(a){var b;if(T(a)){b=[];for(var c=0,f=a.length;c<f;c++)b.push(d(a[c]));return b}b=a instanceof RegExp?a:RegExp("^"+Cb(a)+"$");return b.test(pa.parse(x.href,"domain"))?null:b}var f=/^((mailto|tel|fax|modem)\:)(.*)$/,h=/^(?:([a-z]+):(?:([a-z]*):)?\/\/)?(?:([^:@]*)(?::([^:@]*))?@)?(?:((?:[a-z0-9_-]+\.)+[a-z]{2,}|localhost|(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5]))))(?::(\d+))?(?:([^:\?\#]+))?(?:\?([^\#]+))?(?:\#([^\s]+))?$/i,g="_raw",e="hash",e="hash",n=["href",
"protocol","contactBy","contactTo"],k=["href","scheme","subscheme","user","pass","hostname","port","pathname","query",e],m=["protocol","auth","host","domain","path","search",e,"fileExtension"],p=[{data:["scheme",{pre:":",data:"subscheme"}],post:":"},[{data:"user",post:{pre:":",data:"pass"}}],[{data:g,index:5,post:{pre:":",data:"port"}}],{data:"host",re:/^(?:w{3}.)?(.*)$/,reMatchIndex:1},["pathname",{pre:"?",data:"query"}],{pre:"?",data:"query"},{pre:"#",data:e},{data:"pathname",re:/.\.([^\.]+)$/,
reMatchIndex:1}];return{parse:function(c,d){return!c?null:f.test(""+c)?a(c,d):b(c,d)},getIsDomainRE:d,getDomainMask:function(a,b,c){b=(b&&0<b?b:2)-1;var d=1;a=(""+a).replace(RegExp("^.*(?:\\.((?:[^\\.]+\\.){"+b+"}[^\\.]+$))"),"$1");if(d=a.match(/\./g))d=d.length;a="(?:^|\\.{"+(b-d+1)+"})"+Cb(a)+"$";return RegExp(c?"^((?!"+a+").)*$":a)}}}(),rb=["ru","en"],Kc=/^(ads\d+\.my\.com)$/,Eb="POST",Fb="application/x-www-form-urlencoded",la=!(0===x.hostname.search(/^(\d+.)+\d+$/g)||-1!==x.hostname.search(/:/g)),
ka=null,ma=sc(),cb={domain:tc(),path:"/",expires:287712E5};(function(){var a;if(a=k.cookie.match(RegExp("(?:^|; )(tmr_tcdhn\\d+)=([^;]*)","g"))){for(var b=[],c,d=0,f=a.length;d<f;d++)c=a[d],(c=c.match(/(?:^|; )(tmr_tcdhn\d+)=([^;]*)/))&&b.push(c.slice(1));a=b}else a=null;if(a){d=0;for(f=a.length;d<f;d++)b=a[d][0],bb(b,cb)}})();var Ca=!1,gb=null,Vb=864E5,Ub="tmr_detect",Sc=function(){function a(a,b){for(var c=a.length,e,l,n=0;n<b;n++)l=Math.floor(Math.random()*c),e=a[n],a[n]=a[l],a[l]=e;return a.slice(0,
b)}function b(b,f){var h=k.createElement("div"),e=String.fromCharCode(97,100,118,98,108,111,99,107,32,97,100,118,101,114,116,98,108,111,99,107,32,97,100,118,101,114,116,66,108,111,99,107,32,98,45,114,98,32,98,97,110,110,101,114,95,50,52,48,32,112,45,116,97,114,103,101,116,32,112,117,98,95,51,48,48,120,50,53,48,32,112,117,98,95,51,48,48,120,50,53,48,109,32,112,117,98,95,55,50,56,120,57,48,32,114,98,95,98,111,100,121,32,114,98,45,102,108,111,97,116,105,110,103,32,114,98,45,115,108,111,116,32,114,98,
45,118,105,100,101,111,45,119,105,100,103,101,116,32,116,101,120,116,45,97,100,32,116,101,120,116,45,97,100,45,108,105,110,107,115,32,116,101,120,116,45,97,100,115,32,116,101,120,116,45,98,97,110,110,101,114,32,116,101,120,116,95,97,100,32,116,101,120,116,95,97,100,115,32,116,101,120,116,65,100,32,116,101,120,116,97,100,32,116,101,120,116,65,100,115,32,116,101,120,116,97,100,115,32,116,103,98,45,98,97,110,110,101,114,32,116,114,103,45,98,45,98,97,110,110,101,114,45,98,108,111,99,107).split(" "),e=
a(e,c);h.setAttribute("class",e.join(" "));h.setAttribute("style","position: absolute !important; top: -9999px !important; left: -9999px !important; width: 1px !important; height: 1px !important;");h.setAttribute("id","trg-b-banners-1");h.setAttribute("data-view","SlotView.mimic");this.bait=k.body.appendChild(h);this.bait.offsetParent;this.bait.offsetHeight;this.bait.offsetLeft;this.bait.offsetTop;this.bait.offsetWidth;this.bait.clientHeight;this.bait.clientWidth;this.loopNumber=0;this.fnPositive=
b||null;this.fnNegative=f||null;var l=this;setTimeout(function(){l._checkBait.call(l)},1)}var c=7;b.prototype._checkBait=function(){if(Ca)this._stop();else{var a=null!==k.body.getAttribute("abp")||!Bb(this.bait,!0);(!0===a||10<=++this.loopNumber)&&this._stop();var b;if(a&&this.fnPositive)try{b=this.fnPositive,b()}catch(c){p&&console.warn("[TopMailRu] Error#1.9",c)}else if(!a&&10>this.loopNumber){var e=this;setTimeout(function(){e._checkBait.call(e)},50*this.loopNumber)}else try{b=this.fnNegative,
b()}catch(l){p&&console.warn("[TopMailRu] Error#1.10",l)}}};b.prototype._stop=function(){try{k.body.removeChild(this.bait)}catch(a){p&&console.warn("[TopMailRu] Error#1.11",a)}};return function(a,c){new b(a,c)}}(),C=null,$b="ecommerce",R="dataLayer",ea=null,sb=!1,Va=[],Tc=[36383,2540645,3171181,3074137,2057653],Uc=[],tb;(function(){function a(a,b){for(var c=0,d=b.length;c<d;c++)-1===a.indexOf(b[c])&&a.push(b[c])}function b(b,c,d){for(var f={ecom_method:[],ecom_type:[],ecom_data:{events:[]}},h=0,e=
b.length;h<e;h++){var g=s[b[h]];if(g){a(f.ecom_method,[b[h]]);for(var n=0,l=g.length;n<l;n++)for(var k=0,Na=d.length;k<Na;k++){var m=g[n][d[k]];if(m)for(var t=0,q=c.length;t<q;t++)if(-1!==g[n].type.indexOf(c[t])){a(f.ecom_type,[c[t]]);a(f.ecom_data.events,m);break}}}}return f}function c(a,b,c){if(!a||!c||!(b in s))return null;for(var d,f=0,h=s[b].length;f<h;f++)if(d=s[b][f],c in d&&-1!==d[c].indexOf(a))return{ecom_method:[b],ecom_type:d.type.slice(),ecom_data:{}};return null}function d(a){for(var d=
[],e,g,m=0,Vc=a.length;m<Vc;m++)if(g=a[m]){e=null;try{if(g.ecommerce)e=f(g)||h(g);else if(null===g.ecommerce)e=null;else if(g.event){var aa={event:g.event,ecommerce:{}};e=f(aa)||h(aa)}else if("event"===g[0]){var ac=g[1],s=g[2],y=c(ac,n,r);y&&(y.ecom_data[ac]=s);e=y}else if(g.event===$b)a:{for(var Ia=b([l],[k],[q]),E=0,t=Ia.ecom_data.events.length;E<t;E++)if(!g.hasOwnProperty(Ia.ecom_data.events[E])){e=null;break a}delete Ia.ecom_data.events;Ia.ecom_data[$b]=g;e=Ia}}catch(A){p&&console.warn("[TopMailRu] Error#1.23",
A),e=null}e&&(d.push(e),Va.push(e))}if(d.length){a=0;for(e=d.length;a<e;a++)Ib(Wa,d[a]);C||(C=[0,0,R]);C[0]+=d.length;e=a=0;for(m=d.length;e<m;e++)a+=va(d[e].ecom_data).length;C[1]+=a}}function f(a){var b,d;for(d in a.ecommerce)if(a.ecommerce.hasOwnProperty(d)&&(b=c(d,l,m))){if(a.event&&(d=c(a.event,l,A)))for(var f=0,e=b.ecom_type.length;f<e;f++)-1===d.ecom_type.indexOf(b.ecom_type[f])&&(b.ecom_type.splice(f,1),e--,f--);b.ecom_data=a.ecommerce;return b}return null}function h(a){var b=a.event,d=c(b,
l,A);d&&(d.ecom_data[b]=a.ecommerce);return d}function g(a){if((a=e[a])&&"function"===typeof a.push)d(a),ea=a.push,a.push=function(){var a=ea.apply(this,arguments);d([].slice.call(arguments,0));return a}}var l="push",n="gtag",k="gse",m="inner",A="outer",r="external",q="required",s={};s[n]=[{type:["gee"],external:"add checkout checkout_option checkout_progress click detail promo_click remove select_content set_checkout_option view_refund".split(" ")},{type:["ga4"],external:"earn_virtual_currency join_group level_end level_start level_up post_score select_content spend_virtual_currency tutorial_begin tutorial_complete unlock_achievement ad_impression login search share sign_up add_payment_info add_shipping_info add_to_wishlist generate_lead select_item select_promotion view_cart view_item_list".split(" ")},
{type:["gee","ga4"],external:"add_to_cart begin_checkout purchase refund remove_from_cart view_item view_promotion".split(" ")}];s[l]=[{type:[k],required:["transactionId","transactionTotal"]},{type:["ga4"],outer:b([n],["ga4"],[r]).ecom_data.events},{type:["gee"],inner:"click checkout checkout_option impressions promoClick promoView refund".split(" "),outer:"addToCart checkout checkoutOption productClick productDetail ProductImpressions promotionClick promotionView removeFromCart transactionPush".split(" ")},
{type:["ym","gee"],inner:["add","detail","purchase","remove"]},{type:["mt"],outer:["mt_order","mt_refund"]}];tb=function(a){if(!(a===R&&ea)){a!==R&&(Va=[]);var b=e[R];b&&"function"===typeof b.push&&ea&&(b.push=ea,ea=null);g(a);sb=!0}}})();var Jb=function(){var a=[{id:"gtag",globalVars:["google_tag_manager"]},{id:"ga",globalVars:["GoogleAnalyticsObject"]},{id:"ym",globalVars:["Ya",{re:"yaCounter\\d+"}]},{id:"vk",globalVars:["VK"]},{id:"vk",globalVars:["vkAsyncInit"]}],b={};return function(){var c;
try{c=Object.keys(e).join(",")}catch(d){c=null}for(var f=[],h,g=0,l=a.length;g<l;g++){h=b[a[g].id];if(void 0===h)a:{h=a[g].globalVars;for(var n=c,k=0,m=h.length;k<m;k++){var p=h[k];if("string"===typeof p&&!(p in e)||"string"===typeof p.re&&(n&&-1===n.search(RegExp("($|,)"+p.re+"(,|^)","m"))||1===m)){h=!1;break a}}h=!0}h&&(b[a[g].id]=!0,L(a[g].id,f)||f.push(a[g].id))}return f}}(),xc=Jb,Lb=864E5,Kb="tmr_floc",Ob=null;(function(a){try{k.interestCohort&&"function"===typeof k.interestCohort&&k.interestCohort().then(function(a){Ob=
{id:a.id,version:a.version};a=[a.id,a.version];var b=w();a=a.concat(b).join("|");ra(Kb,a,{path:"/",expires:Lb})},function(){})}catch(b){}})();var ub=!1,Pa=null,Ja=null,vb=!1,bc;(function(){function a(a){try{var c=a.state;Ja=c in g?g[c]:e;vb=c===f;ub&&b(vb)}catch(d){}}function b(a){try{a?(D[d].getCurrentPosition(c),l||(l=D[d].watchPosition(c))):(l&&D[d].clearWatch(l),c(null))}catch(b){}}function c(a){if(a)try{var b=a.coords,b=[b.latitude,b.longitude,b.accuracy,b.altitude,b.altitudeAccuracy,b.heading,
b.speed];a=0;for(var c=b.length;a<c;a++)"number"!==typeof b[a]&&(b[a]="");b.splice(0,0,Ja);Pa=b.join("/")}catch(d){}else Pa=Ja}var d="geolocation",f="granted",e="u",g={denied:"d"};g[f]="g";g.prompt="p";var l=null;(function(){Ja=e;c(null);try{d in D?D.permissions&&D.permissions.query({name:d}).then(function(b){a(b);b.onchange=function(){a(b)}}):Ja="n"}catch(b){}})();bc=b})();var da={support:!1},da=function(){function a(){f(g)}function b(){f(g,r)}function c(a){a.persisted&&(q[g]=null,q[l]=null,f(g,
p))}function d(){return n?!k[n]:null}function f(a,b){var c=w(),f="undefined"===typeof b?d():b;if(null===q[a])q[a]={ts:c,state:f,total:0};else{var e=q[a];if(e.state!==f&&!(e.state===r&&f!==p)){var g=c-e.ts,l=e.state;e.ts=c;e.state=f;g<h||(l===p?(e.total+=g,u&&u(c,g)):l===A&&v&&v(c,g))}}}var h=5,g="auto",l="user",n=null,m=null,p=!0,A=!1,r=null;"hidden"in k?(n="hidden",m="visibilitychange"):"mozHidden"in k?(n="mozHidden",m="mozvisibilitychange"):"webkitHidden"in k?(n="webkitHidden",m="webkitvisibilitychange"):
"msHidden"in k&&(n="msHidden",m="msvisibilitychange");var q={};q[g]=null;var u=q[l]=null,v=null;return{support:!!n,auto:function(d,f){u=d||null;v=f||null;n&&(a(),s(k,m,a));na?(s(e,"pageshow",c),s(e,"pagehide",b)):(s(e,"beforeunload",b),s(e,"unload",b))},set:function(a){f(l,!!a)},getLog:function(){var a=w(),b={},c,d;for(d in q)c=q[d],b[d]=c?c.total:0,c&&c.state&&(b[d]+=a-c.ts);return b},getValue:d}}();da.auto();var cc={enabled:!1},dc=function(){var a="checkbox color date datetime-local email file month number password radio range search tel text time url week".split(" ");
return{analyze:function(b){if(!b)return null;for(var c=[].slice.apply(b.elements),d=[],f=[],e=0,g=c.length;e<g;e++){var l;a:switch(l=c[e],l.tagName.toLowerCase()){case "button":l=!1;break a;case "input":var k=l.type.toLowerCase();if(k&&-1===a.indexOf(k)){l=!1;break a}default:l=Bb(l,!1)&&l.name&&!1===l.disabled}l&&(d.push(c[e].name),f.push(c[e].type))}return{node:b,inputsName:d.length?d:null,inputsType:f.length?f:null}},getFormByInput:function(a){if(!a)return null;a=a.form||a.getAttribute("form");
return"string"===typeof a?document.getElementById(a)||null:a instanceof HTMLElement?a:null}}}(),cc=function(){function a(a){a=a||e.event;var c=(a.which||a.keyCode)===K;if("which"in a&&a.which===B||"button"in a&&a.button&B||c){a:{a=a.target||a.srcElement;for(var c=0,d=g.length;c<d;c++){var k;b:{k=a;for(var y=g[c],q=0,E=y.types.length;q<E;q++){var t;c:{var s=k;t=y.types[q];var r=null;if(t.filter.tagName)for(var J=0,u=t.filter.tagName.length;J<u&&!(r=Ab(s,t.filter.tagName[J]));J++);else r=s;if(r){if(t.filter.attr)for(s in s=
void 0,t.filter.attr)if(t.filter.attr.hasOwnProperty(s)&&(J=t.filter.attr[s],u=r[s],!0===J&&!u||!1===J&&u||T(J)&&-1===J.indexOf(u))){t=null;break c}t={source:r,type:t.type,detail:r.tagName}}else t=null}if(t){t.category=y.category;k=t;break b}}k=null}if(k){a=k;break a}}a=null}if(a){if(a.category===f){if(a.data=pa.parse(a.source.href,!0),!a.data)return}else if(a.category===h){if(a.data=dc.analyze(dc.getFormByInput(a.source)),!a.data)return}else return;c=I;if(c.enabled&&c.modes){d=0;for(k=c.modes.length;d<
k;d++)if(y=a,q=c.modes[d],y.category===q.mode)if(y.category===f||y.category===h){if(q=q.categories,y.data){E=void 0;c:{E=0;for(t=q.length;E<t;E++){for(var r=y,s=q[E],J={category:y.category},u=[],z=0,fa=s.types.length;z<fa;z++){var x=s.types[z],C=ja({type:s.category},J),L=A in x,D;w in x?D=b(r,x,C,w):L&&(D=ja({source:r.source,data:r.data,detail:x.type},C));if(D&&(!L||!b(r,x,C,A)))if(u.push(D),(x.rule&v)!==v)break}if(r=u.length?u:null){E=r;break c}}E=null}if(E){y=0;for(q=E.length;y<q;y++)c:{t=E[y];
r={type:"sendEvent",category:"_"+t.category,action:t.detail};if(t.category===f&&(t.type===l||t.type===n)){if(r.label=t.data.href,!r.label)break c}else if(t.category===m&&(r.label=t.data.node.action,!r.label))break c;_tmr.push(r)}}}}else p&&console.warn("[TopMailRu] Error#1.24","Not found tracking for type",y.type)}}}}function b(a,b,d,f){var e=!1,h=b[f];if(T(h)){var g=b[f+"Rule"]||z;f=(g&r)===r;for(var g=(g&q)===q,k=0,l=h.length;k<l&&!(e=c(a,h[k]),f&&e);k++)if(g&&!e)return null}else e=c(a,h);return!e?
null:ja({source:a.source,data:a.data,detail:b.type},d)}function c(a,b){var c=b.rule||z,f=(c&r)===r,c=(c&q)===q,e=!1,h;for(h in b)if(b.hasOwnProperty(h)&&"rule"!==h){var e=b[h],g=a.data[h],e=!0===e?!!(T(g)?g.length:g):!1===e?!(T(g)?g.length:g):d(g,e);if(f&&e)break;else if(c&&!e)return!1}return e}function d(a,b){var c=a;if(c)if(T(c)){if(!c.length)return!1}else c=[c];else return!1;var d=b,e=z;if(Q(d)&&!T(d)){if(!T(d.value))return!1;e=d.rule||e;d=d.value}a:{for(var f=(e&u)===u,h=(e&r)===r,e=(e&q)===q,
g=!1,k=0,l=d.length;k<l;k++){var n=d[k];if(n){var m="string"===typeof n;m&&!f&&(n=n.toLowerCase());var s=n instanceof RegExp;if(m||s){var g=!0,p;b:{p=c;for(var v=f,w=0,A=p.length;w<A;w++){var x=v?p[w]:p[w].toLowerCase();if(s&&n.test(x)||m&&n===x){p=!0;break b}}p=!1}if(h&&p){c=!0;break a}else if(e&&!p){c=!1;break a}}}}c=h?!1:e?g?!0:!1:void 0}return c}var f="click",h="submit",g=[{category:h,types:[{type:"button",filter:{tagName:["input","button"],attr:{type:["submit","image"]}}}]},{category:f,types:[{type:"a",
filter:{tagName:["a"],attr:{href:!0}}}]}],l="file",n="resource",m="submit",w="filter",A="stop",r=1,q=2,u=4,v=8,z=r,I={enabled:!0,modes:[{mode:h,categories:[{category:m,types:[{type:"lead",filter:[{inputsName:["phone"],inputsType:["tel"],rule:r},{inputsName:["email"],inputsType:["email"],rule:r}],filterRule:q,stop:{inputsName:{value:["password"]}}},{type:"form",filter:{inputsName:!0}}]}]},{mode:f,categories:[{category:"contact",types:[{type:"email",filter:{contactBy:["mailto"]}},{type:"phone",filter:{contactBy:["tel"]}}]},
{category:l,types:[{type:"file",filter:{fileExtension:"7z bz2 gz apk iso cab dmg msi rar tar zip exe txt doc docx ppt pptx xls xlsx csv pdf psd rtf ods djvu eps 3gp aac ac3 avi flac flv divx midi mka mkv mp3 mp4 mpeg mpg mov ogg vob wav webm wma wmf wmv torrent".split(" ")}}]},{category:n,types:[{type:"outgoing",rule:v,stop:{domain:[pa.getDomainMask(pa.parse(x.href,"domain"),3,!1)],href:[/password/]}},{type:"messenger",filter:{domain:pa.getIsDomainRE("vk.me t.me telegram.me telegram.im web.telegram.org m.me web.whatsapp.com api.whatsapp.com chat.whatsapp.com wa.me".split(" "))},
stop:{href:[/password/]}},{type:"social",filter:{domain:pa.getIsDomainRE("vk.com vkontakte.ru m.vk.com vk.ru ok.ru m.ok.ru odnoklassniki.ru facebook.com m.facebook.com fb.com twitter.com linkedin.com instagram.com tiktok.com youtube.com youtu.be m.youtube.com".split(" "))},stop:{href:[/password/]}}]}]}]},B=1,K=13;return{enabled:!0,start:function(){s(k,"click",a);s(k,"keypress",a)}}}();Qc&&cc.start();var u=function(){function a(){b(null)}function b(a){f();a?(U=a===fa,oa=a):oa=Z&&null!==U?U?fa:$:k.visibilityState;
a=aa();for(var b in ga)v(b,a)}function c(){if(!1!==P){K(e,Y,ia);ia=null;e.clearInterval(ka);la=ka=null;K(k,J,ca);ca=null;Z&&(K(e,V,da),K(e,W,ea),ea=da=null);h(!0);for(var a in ba){var b=a,c=ba[b];c&&(c=c.key,M(b),F(),delete ba[b],y(null,c))}G=null;ha=[];ua=[];H={};ba={};ga={};P=!1}}function d(a,b,c){var d=a+"_"+b;if(d in H)return!1;var e=w(),f=aa(),h=B(d,e,ib);b=H[d]={id:a||null,name:b,key:h,canUseInBackground:!!c,startTS:e,updateTS:f,timespent:{}};if(a)if(ua.push(d),d=b.canUseInBackground,b=ga[a]){if(c=
b.isActive,!c&&(e=G&&L(a,G)))if(c=oa===fa||d)b.updateTS=f,b.isActive=!0}else e=G&&L(a,G),c=oa===fa||d,ga[a]={isActive:e&&c,updateTS:f,timespent:{}};else ha.push(d);return!0}function f(a,b){var c,d;2>arguments.length?(c=ua.concat(ha),d=E):(c=[a+"_"+b],d=R);g(c,d)}function h(a,b,c){var d=!1,e=[],f=[];2>arguments.length?(e=ua.slice(),(d=!!arguments[0])&&(e=e.concat(ha))):(d=a+"_"+b,-1!==ua.indexOf(d)?e=[d]:-1!==ha.indexOf(d)&&(c?e=[d]:f=[d]));g(e,X);g(f,R)}function g(a,b){var c=aa(),d=[],e,f,h;e=0;for(f=
a.length;e<f;e++)h=a[e],-1!==ua.indexOf(h)?l(h,b,c):-1!==ha.indexOf(h)&&d.push(h);e=0;for(f=d.length;e<f;e++)h=d[e],l(h,b,c);if(b===E&&(S=c,S-P>=qa)){for(var g in H)m(g);for(g in ba)if(c=g,d=ba[c])M(c),y(c,d.key);P=S}}function l(a,b,c){var d=H[a];if(d&&!1!==d.updateTS)if(d.timespent[oa]=(d.timespent[oa]||0)+(c-(d.updateTS||S)),-1!==ha.indexOf(a)&&x(null,c),b===X)d.updateTS=!1,m(a);else if(b===t){d.updateTS=c;var e;a:{if(b=H[a])for(e in b.timespent)if(b.timespent[e]>pa){e=!1;break a}e=!0}e?(n(a),F()):
m(a)}else d.updateTS=b===E?null:c,n(a),F()}function n(a,b,c){var d=H[a];if(!d)return null;var e=b||d.key;b=O[e];O[e]={uid:a,name:d.name,counterID:c||d.id||G,canUseInBackground:d.canUseInBackground,isActive:!1!==d.updateTS,startTime:d.startTS,timespent:{}};a=O[e].timespent;var d=d.timespent,f;for(f in d)a[f]=d[f];if(c&&(c=ga[c]))if(e=O[e]){e.common={};e=e.common;c=c.timespent;for(var h in c)e[h]=c[h]}return b||null}function m(a){var b=H[a];b&&(n(a),p(a,b.key))}function p(a,b){var c=O[b];if(c)if(T(c.counterID)){var d=
O[b];if(d){var c=d.counterID,e=[],f,h,g,k;if(c){g=0;for(k=c.length;g<k;g++){h=c[g];f=B(b,h);e.push(f);h=n(a||d.uid,f,h);var l=void 0;h&&(l=O[f],N(l.timespent,h.timespent),h.common&&(l.common=l.common||{},N(l.common,h.common)))}}delete O[b];F();if(a&&a in H)if(d.isActive){r(a);g=0;for(k=c.length;g<k;g++)if(d=ga[c[g]])for(var m in d.timespent)d.timespent[m]=0}else q(a);g=0;for(k=e.length;g<k;g++)u(e[g])}}else if(m=O[b])(c=a&&a in H)&&!m.isActive&&q(a),e=u(b),c&&(e&&m.isActive)&&r(a)}function u(a){var b;
if(b=O[a]){var c=Q(b.timespent);if(!1===b.canUseInBackground&&b.isActive&&0===c.fg)b=null;else{c=[b.name,b.startTime,b.canUseInBackground?1:0,c.fg,c.bg];if(b.common){var d=Q(b.common);(d.fg||d.bg)&&c.push(d.fg,d.bg)}b={id:b.counterID,msg:c.join("/")}}}else b=!1;if(!b)return!1;c=";e="+escape("TS:"+b.msg);z(I({id:b.id},"/tracker",!1,!1)+c);delete O[a];F();return!0}function r(a){if(a=H[a])for(var b in a.timespent)a.timespent[b]=0}function q(a){if(a in H){var b;-1!==(b=ha.indexOf(a))&&ha.splice(b,1);
if(-1!==(b=ua.indexOf(a)))if(ua.splice(b,1),b=H[a].id){var c=ga[b];if(c){var d=c.isActive;d&&D(c,aa());d=C(b,a);d||(c.isActive=!1)}}delete H[a]}}function v(a,b){var c=ga[a];if(c){var d=G&&L(a,G),e=C(a);c.isActive=d&&e;c.updateTS=b}}function x(a,b){if(a){var c=ga[a];c&&(c.isActive?D(c,aa()):c.updateTS=b)}else for(c in ga)x(c,b)}function C(a,b){for(var c in H)if(c!==b&&H[c].id===a&&(oa===fa||H[c].canUseInBackground))return!0;return!1}function D(a,b){a&&(a.timespent[oa]=(a.timespent[oa]||0)+(b-a.updateTS),
a.updateTS=b)}function B(a){return[].join.call(arguments,"_")}function N(a,b){for(var c in b)a[c]=(a[c]||0)+(b[c]||0)}function Q(a){var b=a[fa]||0,c=0,d;for(d in a)d!==fa&&(c+=a[d]);return{fg:b,bg:c}}function aa(){return Math.floor(e.performance.now())}function F(){if(ma){var a={};a[sa]=O;a[ta]=wa;ya(ra,va(a)||"")}}function M(a){var b=ba[a];b&&(wa[b.key]={uid:a,name:b.name,counterID:b.id,value:b.value})}function y(a,b){if(wa[b]){var c;if(c=wa[b])if(0===c.value)c=null;else{var d=[c.name,c.value].join("/");
c={id:c.counterID,msg:d}}else c=!1;c&&(d=";e="+escape("TS:"+c.msg),z(I({id:c.id},"/tracker",!1,!1)+d));!1!==c&&(delete wa[b],F());if(c&&a&&(c=ba[a]))c.value=0}}var R=1,E=2,t=4,X=8,Y=na?"pagehide":"unload",J="visibilitychange";"mozHidden"in k?J="mozvisibilitychange":"webkitHidden"in k?J="webkitvisibilitychange":"msHidden"in k&&(J="msvisibilitychange");var V="focus",W="blur";"onfocusin"in k&&(V="focusin",W="focusout");var fa="visible",$="hidden",ja=["0"],Z=!1,pa=100,qa=12E4,P=!1,S=!1,G=null,ha=[],ua=
[],H={},oa,U=null,ka,la,ca,da,ea,ia,ra="tmr_tslog",sa="activity",ta="count",O={},ba={},wa={},ga={};return{init:function(){if(ma){var a=Ta(xa(ra)||"{}");O=a[sa]||{};wa=a[ta]||{}}for(var b in O)p(null,b);for(b in wa)y(null,b)},launch:function(){!1===P&&(P=aa(),S=aa(),oa=Z&&null!==U?U?fa:$:k.visibilityState,ia=c.bind(e),s(e,Y,ia),la=a.bind(e),ka=e.setInterval(la,1E4),ca=b.bind(e,null),s(k,J,ca),Z&&(da=b.bind(e,fa),ea=b.bind(e,$),s(e,V,da),s(e,W,ea)))},enable:function(a){if(G){if(L(a,G))return;g(ha,t)}else{for(var b=
0,c=ja.length;b<c;b++)d(null,ja[b],!1);G=[]}G.push(a);v(a,aa())},disable:function(a){if(G){var b;a:{b=0;for(var c=G.length;b<c;b++)if(G[b]==a)break a;b=-1}if(-1!==b&&(g(ha,t),G.splice(b,1),b=aa(),a=ga[a]))a.isActive=!1,a.updateTS=b}},startActivity:d,updateActivity:f,stopActivity:h,incCount:function(a,b){var c=a+"_"+b,d;if(!(d=ba[c]))if(c in ba)d=ba[c];else{d=w();var e=B(b,d,ib);d=ba[c]={id:a,name:b,key:e,startTS:d,value:0}}d&&d.id===a&&(d.value++,M(c),F())},defaultID:function(){return G?G[0]:void 0}}}(),
fb=!1,Ba=null;Rb&&function(){function a(){var a=xa(e);if(a)try{(a=Ta(a))&&(Ba=a.fpid||null)}catch(b){}c()}function b(){c()}function c(){ya(d,va({fpid:Ba,ts:w()}))}var d="tmr_trgfpid",e="rb_sync_id";(function(){var c=ma?xa(d):null;if(c)try{if(c=Ta(c))if(Ba=c.fpid||null,864E5>w()-c.ts)return}catch(e){}db("https://ad.mail.ru/static/sync-loader.js",a,b)})()}();var Bc="60.4.0",Ra=0,Ea=0,ib=Db(16),Y=null,Z=null,Da=0,ta="tmr_reqNum",F=null;la&&(F=U(ta)||null,null!==F&&bb(ta,cb));ma&&null===F&&(F=xa(ta)||
null);F=null===F?0:parseInt(F,10);ma&&ya(ta,F);var ca=(la?U("tmr_lvid"):null)||(ma?xa("tmr_lvid"):null),Aa=(la?U("tmr_lvidTS"):null)||(ma?xa("tmr_lvidTS"):null);if(null===ca||-1===ca.search(/^[0-9a-fA-F]+$/))ca=Db(32);Gb("tmr_lvid",ca);if(null===Aa||-1===Aa.search(/^\d+$/))Aa=""+w();Gb("tmr_lvidTS",Aa);var V=0,B=[],Ga=[],Xa=[],Wa=[],Ua=[],Sa={},zc="ontouchstart"in e||1<(D.maxTouchPoints||D.msMaxTouchPoints)?"1":"0",Ac=e.devicePixelRatio||0,ec=e.performance||e.mozPerformance||e.msPerformance||e.webkitPerformance||
{},W=ec.timing||{},jb=ec.navigation||{},Pb="unloadEventStart unloadEventEnd redirectStart redirectEnd fetchStart domainLookupStart domainLookupEnd connectStart connectEnd secureConnectionStart requestStart responseStart responseEnd domLoading domInteractive domContentLoadedEventStart domContentLoadedEventEnd domComplete loadEventStart loadEventEnd".split(" "),Oa=!W?void 0:W.navigationStart,S=Oa,Qb="downlink downlinkMax effectiveType rtt saveData type".split(" "),qa,wb;qa=function(a,b,c){if(b&&"object"===
typeof b){var d="id"in b&&b.id||V,e=c.title||null,h,g=wb(b,{params:c.required,fn:c.fn});if(g.missed.length)console.warn("[TopMailRu]"+(d?"["+d+"]":"")+" Error#1.14","Unspecified "+(1<g.missed.length&&g.missed.slice(0,-1).join(", ")+" and "||"")+g.missed.slice(-1)+" in "+a);else{var k=wb(b,{params:c.optional,fn:c.fn});h=[].concat(g.values).concat(k.values);g=[].concat(g.missed).concat(k.missed);c.value&&(b="value"in b&&b.value,!0!==c.value&&(b=b||c.value),b?h.push("value: "+b):g.push("value"));c=h.length?
"{ "+h.join(", ")+" }":"";h=g.length?"("+(1<g.length?g.slice(0,-1).join(", ")+" and "+g.slice(-1)+" are":g.slice(-1)+" is")+" empty)":"";d?console.info("[TopMailRu]["+d+"]: "+(e||a)+" "+c+" "+h):console.warn("[TopMailRu] Error#1.15","Undefined counter ID of "+a+" "+c)}}else console.warn("[TopMailRu][]["+a+"] Error#1.13")};wb=function(a,b){var c=[],d=[],e,h,g;if(b.params)for(e in b.params)if(b.params.hasOwnProperty(e)&&!1!==b.params[e])if(h=e in a&&a[e],!0!==b.params[e]&&(h=h||b.params[e]),h)try{g=
b.fn?b.fn:null,c.push(e+': "'+(g?g(e,h):h)+'"')}catch(k){console.warn("[TopMailRu] Error#1.16",k)}else d&&d.push(e);return{values:c,missed:d}};var N={},qb=[];m.prototype.callbackOnReady=function(a){p&&qa("onReady",a,{title:"OnReady callback"});a&&"object"===typeof a&&"function"===typeof a.callback&&(a.callback.call(a.context||null),na&&qb.push(a))};m.prototype.pageView=function(a){sa(a);a:if(a&&"object"===typeof a&&a.id){5>Ga.length&&!L(a.id,Ga)&&(Ga.push(a.id),!1!==a.beat&&Xa.push(a.id),B.push(a),
Ca&&Hb(a));na&&(Sa[a.id]=ja(!0,{},a),Sa[a.id].bfCache=!0);"detectBlocker"in a&&!a.detectBlocker&&(kb=!0);var b="string"===typeof a.ecommerce,c=b&&-1!==a.ecommerce.search(/\S/);if(5>Wa.length&&!L(a.id,Wa)&&(!0===a.ecommerce||b&&!c||b&&c||!1!==a.ecommerce&&!b&&(L(a.id,Tc)||!L(a.id,Uc)))){Wa.push(a.id);if(b&&c){if(sb&&(tb(a.ecommerce),R!==a.ecommerce)){R=a.ecommerce;C&&(C=[0,0,R]);break a}R=a.ecommerce;C&&(C=[0,0,R])}b=[a.id];if(sb)for(var c=0,d=Va.length;c<d;c++)Ib(b,Va[c])}a.timespent=M&&(a.timespent||
L(a.id,Pc)&&!1!==a.timespent);M&&(a.timespent?u.enable(a.id):u.disable(a.id));ub||(ub=!0===a.geolocation||a.timespent&&!1!==a.geolocation)&&bc(vb);fb&&!L(a.id,Ua)&&(Ua.push(a.id),Mb([a.id]))}p&&qa("pageView",a,{title:"Page view",optional:{url:x.href}});X(a)&&(z(I(a,"/counter",!1,!0)),Ea=w())};m.prototype.reachGoal=function(a){sa(a);p&&qa("reachGoal",a,{title:"Reach goal",value:!0,required:{goal:!0}});if(X(a)&&"goal"in a&&a.goal){var b="value"in a&&a.value?parseInt(a.value)||"":"";z(I(a,"/tracker",
!1,!0)+(";e="+escape("RG:"+b+"/"+a.goal)))}};var mb="VALUE";m.prototype.itemView=function(a){p&&qa("itemView",a,{title:"Item view",optional:{list:!0,pagetype:!0,productid:!0,totalvalue:!0},fn:function(a,b){return(""+b).replace(/;/g," ")}});if(X(a)){var b=a.list||"",c=a.productid||"",d=a.pagetype||"",e=a.totalvalue||0,h=Hc(a.id,d,e,c);h&&this.reachGoal(h);(new Image).src="https://ad.mail.ru/retarget/?counter="+(a.id||V)+"&list="+b+"&productid="+c+"&pagetype="+d+"&totalvalue="+e+"&_="+Math.random();
b="IV:"+e+"/"+(""+b).replace(/;/g," ")+";"+(""+c).replace(/;/g," ")+";"+(""+d).replace(/;/g," ");z(I(a,"/tracker",!1,!0)+(";e="+escape(b)))}};var Ic="vk_ecom_";m.prototype.sendEvent=function(a){sa(a);p&&qa("sendEvent",a,{title:"Send event",value:!0,required:{category:!0,action:!0},optional:{label:!0},fn:function(a,b){return(""+b).substring(0,300).replace(/;/g," ")}});if(X(a)&&"category"in a&&a.category&&"action"in a&&a.action){var b=(""+a.category).substring(0,300),c=(""+a.action).substring(0,300),
d="label"in a&&a.label?(""+a.label).substring(0,300):"",b="CE:"+("value"in a&&a.value?parseInt(a.value)||"":"")+"/"+(""+b).replace(/;/g," ")+";"+(""+c).replace(/;/g," ")+";"+(""+d).replace(/;/g," ");z(I(a,"/tracker",!1,!0)+(";e="+escape(b)))}};m.prototype.setUserID=function(a){if(null===a||!1===a||void 0===a)this.deleteUserID();else{var b=typeof a;"number"!==b&&"string"!==b?p&&console.warn("[TopMailRu] Error#1.17","Invalid user ID in setUserID"):(Y=a,p&&console.info("[TopMailRu]: Global user ID = "+
Y))}};m.prototype.getUserID=function(){return Y||0===Y?Y:void 0};m.prototype.deleteUserID=function(){Y=null;p&&console.info("[TopMailRu]: Reset global user ID to null")};m.prototype.setUserParams=function(a){if(null===a||!1===a||void 0===a)this.deleteUserParams();else if(Q(a)){try{Z=ja(!0,{},a)}catch(b){p&&console.warn("[TopMailRu] Error#1.22","Invalid user params in setUserParams");return}p&&console.info("[TopMailRu]: Global user params = "+va(Z))}else p&&console.warn("[TopMailRu] Error#1.21","Invalid user params in setUserParams")};
m.prototype.getUserParams=function(){var a=Z?Z:void 0;return a?ja(!0,{},a):void 0};m.prototype.deleteUserParams=function(){Z=null;p&&console.info("[TopMailRu]: Reset global user params to null")};m.prototype.getClientID=function(){var a=ca;return a||0===a?a:void 0};m.prototype._MT_event=function(a,b,c){sa(a);p&&qa(b,a,{title:c});X(a)&&z(I(a,"/tracker",!1,!0)+(";e="+escape("MT:/"+b)))};m.prototype.miniAppEvent=function(a){this._MT_event(a,"miniAppEvent","VK Mini App Event")};var xb=function(a,b){if(M){var c=
u.defaultID();X(a,c)&&(!Q(a)||!("activity"in a&&a.activity)?p&&console.warn("[TopMailRu] Error#1.27","Invalid startActivity command: ID of activity is required"):u.startActivity(a.id||c,""+a.activity,null===b?!!a.canUseInBackground:b))}};m.prototype.startTimespent=function(a){xb(a,null)};m.prototype.startForegroundTimespent=function(a){xb(a,!1)};m.prototype.startAnytimeTimespent=function(a){xb(a,!0)};m.prototype.updateTimespent=function(a){if(M){var b=u.defaultID();X(a,b)&&(!Q(a)||!("activity"in a&&
a.activity)?u.updateActivity():"number"===typeof a.activity||"string"===typeof a.activity?u.updateActivity(a.id||b,""+a.activity):p&&console.warn("[TopMailRu] Error#1.28","Invalid updateActivity command: ID of activity should be number or string"))}};m.prototype.stopTimespent=function(a){if(M){var b=u.defaultID();X(a,b)&&(!Q(a)||!("activity"in a&&a.activity)?u.stopActivity(!1):"number"===typeof a.activity||"string"===typeof a.activity?u.stopActivity(a.id||b,""+a.activity,!1):p&&console.warn("[TopMailRu] Error#1.29",
"Invalid stopActivity command: ID of activity should be number or string"))}};m.prototype.incrementEventTimespent=function(a){if(M){var b=u.defaultID();X(a,b)&&(!a||!("activity"in a&&a.activity)?p&&console.warn("[TopMailRu] Error#1.31","Invalid incrementEventTimespent command: ID of countable activity is required"):u.incCount(a.id||b,""+a.activity))}};m.prototype.processEvent=function(a,b){if(a&&"object"===typeof a)if("type"in a){if("onready"===a.type){if(b&&0>b)return;this.callbackOnReady(a)}else if(b&&
0<b)return;switch(a.type){case "pageView":this.pageView(a);break;case "reachGoal":this.reachGoal(a);break;case "itemView":this.itemView(a);break;case "sendEvent":this.sendEvent(a);break;case "setUserID":"userid"in a&&this.setUserID(a.userid);break;case "deleteUserID":this.deleteUserID();break;case "setUserParams":"params"in a&&this.setUserParams(a.params);break;case "deleteUserParams":this.deleteUserParams();break;case "miniAppEvent":this.miniAppEvent(a);break;case "startTimespent":this.startTimespent(a);
break;case "startForegroundTimespent":this.startForegroundTimespent(a);break;case "startAnytimeTimespent":this.startAnytimeTimespent(a);break;case "updateTimespent":this.updateTimespent(a);break;case "stopTimespent":this.stopTimespent(a);break;case "incrementEventTimespent":this.incrementEventTimespent(a)}}else p&&console.warn("[TopMailRu] Error#1.19","Unspecified type of push event");else p&&console.warn("[TopMailRu] Error#1.18","Invalid push event")};m.prototype.push=function(a){for(var b=0,c=arguments.length;b<
c;b++)this.processEvent(arguments[b])};var fc=!1;m.prototype.onready=function(){fc||(fc=!0,!kb&&!Ca&&Sc(Cc,Dc),tb(R))};var pb=!1;m.prototype.onload=function(){if(!pb){pb=!0;Da=w();if(!Ha&&0<B.length){for(var a=";e="+escape("RT/load")+";et="+Da,b=0;b<B.length;b++)z(I(B[b],"/tracker",!0,!0)+a);Ea=Da}Ec()}};m.prototype.beat=function(){var a;if(!lb&&Ra){var b=w();if(!(12E4<b-Ra)){if(12E4<b-Ea){a=";e="+escape("RT/resend")+";et="+Da;for(var c=0;c<B.length;c++)!1!==B[c].beat&&z(I(B[c],"/tracker",!1,!0)+
a)}else 0<Xa.length&&(a=";e="+escape("RT/beat")+";ids="+escape(Xa.join()),z(I({id:Xa[0]},"/tracker",!1,!0)+a));Ea=b}}};var ob=!1;m.prototype.unload=function(){if(!ob){ob=!0;if(!Ha){var a;a=(a=Nb())?w()-a:void 0;a=";e="+escape("RT/unload")+";et="+w()+(a?";pvt="+escape(a):"");if(da.support){var b=da.getLog();a+=";vtauto="+b.auto}for(b=0;b<B.length;b++)z(I(B[b],"/tracker",!0,!0)+a)}na&&(N.pvt2&&(clearTimeout(N.pvt2),delete N.pvt2),N.pvt15&&(clearTimeout(N.pvt15),delete N.pvt15),N.beat&&(clearInterval(N.beat),
delete N.beat))}};m.prototype.activity=function(a){Ra=w()};var ia=_tmr;_tmr=new m;M&&u.init();for(var v=0,Ka=ia.length,P;v<Ka;v++)(P=ia[v])&&"object"===typeof P&&sa(P);Ya=(new Date).getTime();v=0;for(Ka=ia.length;v<Ka;v++)P=ia[v],_tmr.processEvent(P,1);La=(new Date).getTime();v=0;for(Ka=ia.length;v<Ka;v++)P=ia[v],_tmr.processEvent(P,-1);"complete"===k.readyState||"loading"!==k.readyState&&!k.documentElement.doScroll?(_tmr.onready(),Xb()):k.addEventListener?s(k,"DOMContentLoaded",Qa):k.attachEvent&&
s(k,"readystatechange",Qa);if("complete"===k.readyState)_tmr.onload();else na?s(e,"pageshow",nb):s(e,"load",nb);na?s(e,"pagehide",Fa):(s(e,"unload",Fa),s(e,"beforeunload",Fa));Wb();if(!lb)try{for(var gc="scroll gesturechange touchmove mousedown mousemove mouseup touch".split(" "),Wc=function(a){s(k,a,function(){_tmr.activity(a)})},v=0;v<gc.length;v++)Wc(gc[v]);s(e,"scroll",function(){_tmr.activity("scallback")})}catch(Xc){p&&console.warn("[TopMailRu] Error#1.20",Xc)}Ma=(new Date).getTime()}})();
