var _tmr=_tmr||[];
(function(){function tb(){return S&&ub&&Va?(Wa=[ub-S,Va-S,Ja?Ja-S:null,Ka?Ka-S:null].join("/"),Ja&&Ka&&(tb=function(){return Wa}),Wa):null}function s(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}function L(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)}function vb(a,b){try{if(a.nodeName.toLowerCase()===b.toLowerCase())return a;if(a.parentNode)return vb(a.parentNode,b)}catch(c){p&&console.warn("[TopMailRu] Error#1.25",c)}return null}
function wb(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!==f.getComputedStyle){var c=f.getComputedStyle(a,null);return"none"!==c.display&&"hidden"!==c.visibility}return!0}function ia(a,b){for(var c=0,d=b.length;c<d;c++)if(b[c]==a)return!0;return!1}function P(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,e=a.length,h,g,l,n,f;"boolean"===typeof b&&(c=b,b=a[d++]||{});for(P(b)||(b={});d<e;d++)if(null!=(h=a[d]))for(g in h)l=b[g],n=h[g],b!==n&&(c&&n&&(P(n)||(f=T(n)))?(f?(f=!1,l=l&&T(l)?l:[]):l=l&&P(l)?l:{},b[g]=ja(c,l,n)):void 0!==n&&(b[g]=n));return b}function cc(a,b,c){if(!a)return null;var d=a.match(b),e=2<arguments.length?c:0;return d&&d.length>e?d[e]:null}function xb(a){return(""+a).replace(/[\/\^\$\*\+\?\.\|\(\)\[\]\{\}\\]/g,
"\\$&")}function yb(a){var b="";try{var c=new Uint8Array(a);f.crypto.getRandomValues(c);for(var d=0;d<a;d++)b+=(c[d]%16).toString(16)}catch(e){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:Xa(a)},d;if(!dc||"function"!==typeof navigator.sendBeacon)d=!1;else{c.dataSplitter=";";var e=Ya(c.data,c.dataSplitter);try{d=!0===navigator.sendBeacon(c.url,e)}catch(h){d=!1}}d||(void 0===b?(c.dataSplitter=
";",c.open=ec,c.connect=fc,c.startListen=gc,c.stopListen=hc,c.open(c),c.connect(c)):("function"===typeof f.XMLHttpRequest?(c.dataSplitter=";",c.open=ic,c.connect=jc,c.startListen=kc,c.stopListen=lc,c.open(c),c.connect(c),d=!0):d=!1,d||mc(c)))}function mc(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,e=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;e.appendChild(n)}}var f=d.createElement("form");f.setAttribute("action",a.url);f.setAttribute("method",zb);f.setAttribute("enctype",Ab);f.appendChild(e);var m=d.createElement("div");m.appendChild(f);d.body.appendChild(m);var A=function(){try{L(b,
"load",A),k.body.removeChild(c)}catch(a){p&&console.warn("[TopMailRu] Error#1.2",a)}};s(b,"load",A);f.submit()}catch(r){p&&console.warn("[TopMailRu] Error#1.3",r)}}function ic(a){a._connection=new f.XMLHttpRequest}function jc(a){a._connection.open(zb,a.url);a._connection.setRequestHeader("Content-Type",Ab);a._connection.send(Ya(a.data,a.dataSplitter))}function kc(a){s(a._connection,"load",a._onload);s(a._connection,"error",a._onerror)}function lc(a){L(a._connection,"load",a._onload);L(a._connection,
"error",a._onerror)}function ec(a){a._connection=new Image}function fc(a){a._connection.src=a.url+Ya(a.data,a.dataSplitter)}function gc(a){a._connection.onload=a._onload;a._connection.onerror=a._onerror}function hc(a){a._connection.onload=null;a._connection.onerror=null}function Ya(a,b){var c=b||";",d="",e;for(e in a)if(a.hasOwnProperty(e)){var h=a[e],g=typeof h;if("string"===g||"number"===g)d+=c+escape(e)+"="+escape(h)}return d}function Xa(a){return"https://top-fwz1.mail.ru"+a}function ka(a){return(a=
k.cookie.match(RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(a[1]):null}function sa(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 e in c)if((b=c[e])||0===b)a+="; "+e,!0!==b&&(a+="="+b);k.cookie=a}function Za(a,b){var c=b||{};c.expires=-1;sa(a,"",c)}function nc(){var a="tmr"+(""+Math.random()).slice(2);
try{return la=f.localStorage||null,la.setItem(a,a),la.removeItem(a),!0}catch(b){return la=null,p&&console.warn("[TopMailRu] Error#1.4",b),!1}}function La(a){try{return la.getItem(a)}catch(b){p&&console.warn("[TopMailRu] Error#1.5",b)}return null}function Ma(a,b){try{la.setItem(a,b)}catch(c){p&&console.warn("[TopMailRu] Error#1.6",c)}}function oc(){if(!ba)return null;for(var a=x.hostname.split(".").reverse(),b,c=1,d=a.length;c<d;c++){b=a[0];for(var e=1;e<=c;e++)b=a[e]+"."+b;var e=""+w(),h={domain:b,
path:"/",expires:3E5};try{sa("tmr_tcdhn",e,h);var g=ka("tmr_tcdhn");Za("tmr_tcdhn",h);if(g===e)return b}catch(l){p&&console.warn("[TopMailRu] Error#1.8",l)}}return null}function Cb(a,b){ba&&sa(a,b,$a);oa&&Ma(a,b)}function Db(a){var b=k.createElement("script");b.type="text/javascript";b.async=!0;b.src=a;document.body.appendChild(b)}function Eb(a){var b=";e="+escape("detect");z(J(a,"/tracker",!1,!1)+b)}function Fb(a,b){if(a.length&&null!==b.ecom_data){var c=wa(b.ecom_data),c=c?(""+c).substring(1,c.length-
1):"";if(!(4096<c.length||-1===c.search(/\S/))){var d=ab("_m",b.ecom_method),e=ab("_t",b.ecom_type),h=ab("_jst",Gb()),c="{"+c+d+e+h+"}";z(J({id:a[0]},"/datalayer",!1,!0)+(";ids="+escape(a.join()))+(";e="+escape(c)))}}}function ab(a,b){var c=',"'+a+'":';if(!b||!b.length)return c+"[]";try{return c+'["'+b.join('","')+'"]'}catch(d){}return c+"false"}function pc(){var a=ka(Hb);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>Ib?null:{id:a[0],version:a[1]}}
function Jb(a){bb=!0;a.length&&Db(Xa("/js/dyn-goal-config.js?ids="+a.join(",")))}function m(){}function ta(a){a&&"object"===typeof a&&(!U&&"id"in a)&&(U=a.id)}function qc(a){return(a=!V?void 0:V[a])&&Na?a-Na:void 0}function Kb(){if(V){for(var a=0,b="domInteractive domContentLoadedEventStart domContentLoadedEventEnd domComplete loadEventStart loadEventEnd".split(" "),c=0;c<b.length;c++){var d=!V?void 0:V[b[c]];if(0<d&&(d<a||0==a))a=d}return a?a:void 0}}function W(a,b){var c=1<arguments.length?b:U;
return a&&"object"===typeof a&&("id"in a&&a.id||c)}function J(a,b,c,d){oa&&Ma(xa,++F);var e="id"in a?a.id:U,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=cb;null===n&&(n=rc());n=null!==n?n?1:0:null;var m="userid"in a?a.userid:X||0===X?X:void 0,Bb=Y?Y:void 0,A;A=ma&&a.bfCache;var r="pageView"===a.type&&a.timespent,q=[];U&&e!==U&&q.push("sec");"dataLayer"in f&&q.push("dl");C&&q.push(["ecom"].concat(C).join("-"));var ya=sc();ya&&ya.length&&q.push(["jst"].concat(ya).join("-"));
A&&q.push("bfc");M&&r&&q.push("ts");pa&&q.push("gl="+pa);f.top!==f&&q.push("frame");A=q.join(",");var db=f.screen,r=(new Date).getTimezoneOffset(),q="";if(f.Intl)try{q=f.Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(tc){p&&console.warn("[TopMailRu] Error#1.1",tc)}ya=r+"/"+q;r=Lb;r=null!==r?r:pc();q=tb();a.start=Kb();b=b+"?_="+Math.random()+(e?";id="+escape(e):"")+(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!==m?";userid="+escape(m):"")+(void 0!==Bb?";uparams="+escape(wa(Bb)):"")+(d&&l?";title="+encodeURIComponent(l):"")+(db?";s="+db.width+"*"+db.height:"")+";vp=";e=d=0;k.documentElement&&(k.documentElement.clientWidth||k.documentElement.clientHeight)?(d=k.documentElement.clientWidth,e=k.documentElement.clientHeight):"number"==typeof f.innerWidth&&(d=f.innerWidth,e=f.innerHeight);b=b+(""+d+"*"+e)+";touch="+uc+";hds="+
vc+";sid="+eb+";ver="+wc+";tz="+encodeURIComponent(ya);if(c){if(!V||!fb)c="";else{c=[];c.push(fb.type);c.push(fb.redirectCount);c.push(Na);for(d=0;d<Mb.length;d++)c.push(qc(Mb[d]));c=c.join("/")}c=";nt="+c}else c="";c=b+c+(q?";ct="+q:"")+(Oa?";gl="+Oa:"")+("device"in a?";device="+escape(a.device):"")+";ni=";if(!H||!H.connection)b="";else{b=H.connection;d=[];for(h=0;h<Nb.length;h++){e=b[Nb[h]];if(void 0!==e)switch(e){case !0:e=1;break;case !1:e=0;break;default:e=(""+e).replace(/\//g,"_")}d.push(e)}b=
d.join("/")}return c+b+("params"in a?";params="+escape(wa(a.params)):"")+(null!==n?";detect="+n:"")+(ba||oa?";lvid="+escape([za,w(),F,ca].join(":")):"")+(A?";opts="+escape(A):"")+(r?";flocid="+escape(r.id)+";flocv="+escape(r.version):"")+("version"in a?";appver="+escape(a.version):"")+(da.support?";visible="+da.getValue():"")+";js=13"}function Ob(a){a=";e="+escape("PVT/"+a);for(var b=0;b<D.length;b++)z(J(D[b],"/tracker",!1,!0)+a)}function xc(){cb=!0;Pb(1);if(!gb&&!Aa){Aa=!0;for(var a=0;a<D.length;a++)Eb(D[a])}}
function yc(){Pb(0);cb=!1}function rc(){var a=ka(Qb);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>Rb)return null;a=parseInt(a[0],10);return isNaN(a)?null:a}function Pb(a){var b=w();a=[a,b].join("|");sa(Qb,a,{path:"/",expires:Rb})}function zc(){Ac||(B.pvt2=setTimeout(function(){Ob(2)},2E3));Bc||(B.pvt15=setTimeout(function(){Ob(15)},15E3))}function Sb(){hb||setInterval(function(){_tmr.beat()},6E4)}function Cc(a,b,c,d){if(!b||!d||d===ib&&b===ib&&c===
ib)return null;b={goal:Dc+b,value:c||0,params:{product_id:d}};a&&(b.id=a);return b}function Pa(){k.addEventListener?(L(k,"DOMContentLoaded",Pa),_tmr.onready()):k.attachEvent&&"complete"===k.readyState&&(L(k,"readystatechange",Pa),_tmr.onready());Tb()}function jb(a){if(ma){if(a.persisted){Ba=Ca=Qa=0;kb=lb=!1;M&&v.launch();a=mb;mb=[];for(var b=0,c=a.length;b<c;b++)_tmr.callbackOnReady(a[b]);a=Ra;Ra={};for(b in a)_tmr.pageView(a[b]);Sb()}}else L(f,"load",jb);_tmr.onready();_tmr.onload()}function Da(){ma||
(L(f,"unload",Da),L(f,"beforeunload",Da));_tmr.unload()}function Tb(){M&&v.launch();if(Ec){window.addEventListener("message",function(a){var c=null;try{if(c=a.data,P(c)||(c=Ub(c)),"LOAD_BUTTONS_SCRIPT"===c.type){var d;var e=document.referrer;a=null;var h=(""+c.lang).toLowerCase(),g;b:{for(var c=0,l=nb.length;c<l;c++)if(nb[c]===h){g=!0;break b}g=!1}g||(h=nb[0]);try{a=qa.parse(e,"domain")}catch(n){}d=a&&Fc.test(a)?"https://"+a+"/top_constructor/buttons_"+h+".js":Xa("/js/dyn-goal-wizard-"+h+".js");Db(d)}}catch(f){}});
if(window.opener)try{window.opener.postMessage({type:"READY"},document.referrer)}catch(a){}bb||Jb(Ea)}}if("[object Array]"===Object.prototype.toString.call(_tmr)){var ub=(new Date).getTime(),Va=null,Ja=null,Ka=null,S=null,Wa=null,f=window,H=navigator,k=document,x=location,Z="string"===typeof x.hostname?x.hostname:"",Fa=-1!=Z.search(/(^|\.)odnoklassniki\.ru$/)||-1!=Z.search(/(^|\.)ok\.ru$/),ob=-1!=Z.search(/(^|\.)vk\.com$/),Gc=-1!=Z.search(/(^|\.)mail\.ru$/),Hc=-1!=Z.search(/(^|\.)lamoda\.ru$/),Ic=
-1!=Z.search(/(^|\.)kommersant\.ru$/);Z.search(/(^|\.)top\.mail\.ru$/);Z.search(/(^|\.)dzen\.ru$/);var Jc="string"===typeof x.search&&-1!=x.search.search(/[?&]rb_clickid=/),p="string"===typeof x.search&&-1!=x.search.search(/[?&]tmr_debug=1(?:&|$)/),dc=!1,hb=Fa||ob||Hc||Ic,Ac=!Jc,Bc=Fa,gb=!1,M=f.performance&&"visibilityState"in k,Kc=[36383],Lc=!(Fa||ob),Ec=!0,Mc=Gc||ob,Vb=f.JSON&&f.JSON.stringify&&f.JSON.parse,ma="onpageshow"in f&&"onpagehide"in f,wa=Vb?f.JSON.stringify.bind(f.JSON):function(a){return""},
Ub=Vb?f.JSON.parse.bind(f.JSON):function(a){return{}},qa=function(){function a(a,b){var c=(""+a).match(e),d={};d[g]=c;for(var h=0,l=c.length;h<l;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 e={};e[g]=d;if(d.length){for(var l=0,n=d.length;l<n;l++)d[l]&&(e[f[l]]=d[l]);d=e}else d=null;if(!d)return null;if((e=1<arguments.length&&void 0!==b)&&(-1!==k.indexOf(b)||!0===b))for(var l=d,Ga=0,Nc=k.length;Ga<
Nc;Ga++)(n=c(m[Ga]||"",l,Ga))&&(l[k[Ga]]=n);delete d[g];return e&&!0!==b?d[b]||null:d}function c(a,b,d){var e="",h;if(P(a)&&"data"in a)e="index"in a?(b[a.data]||[])[a.index]||"":c(a.data,b,d),"re"in a&&(e=cc(e,a.re,a.reMatchIndex)||""),e&&(h=c(a.pre||"",b,d),a=c(a.post||"",b,d),e=h+e+a);else if(T(a)){h=0;for(var l=a.length;h<l;h++)e+=c(a[h],b,d)}else e=f.indexOf(a),-1===e&&(e=k.indexOf(a),e>=d&&(e=-1)),e=-1!==e?b[a]||"":""+a;return e}function d(a){var b;if(T(a)){b=[];for(var c=0,e=a.length;c<e;c++)b.push(d(a[c]));
return b}b=a instanceof RegExp?a:RegExp("^"+xb(a)+"$");return b.test(qa.parse(x.href,"domain"))?null:b}var e=/^((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",l="hash",l="hash",n=["href","protocol","contactBy","contactTo"],f=["href","scheme","subscheme","user","pass",
"hostname","port","pathname","query",l],k=["protocol","auth","host","domain","path","search",l,"fileExtension"],m=[{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:l},{data:"pathname",re:/.\.([^\.]+)$/,reMatchIndex:1}];return{parse:function(c,d){return!c?null:e.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)+"})"+xb(a)+"$";return RegExp(c?"^((?!"+a+").)*$":a)}}}(),nb=["ru","en"],Fc=/^(ads\d+\.my\.com)$/,zb="POST",Ab="application/x-www-form-urlencoded",ba=!(0===x.hostname.search(/^(\d+.)+\d+$/g)||-1!==x.hostname.search(/:/g)),la=null,oa=nc(),$a={domain:oc(),path:"/",expires:287712E5};(function(){var a;
if(a=k.cookie.match(RegExp("(?:^|; )(tmr_tcdhn\\d+)=([^;]*)","g"))){for(var b=[],c,d=0,e=a.length;d<e;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(e=a.length;d<e;d++)b=a[d][0],Za(b,$a)}})();var Aa=!1,cb=null,Rb=864E5,Qb="tmr_detect",Oc=function(){function a(a,b){for(var c=a.length,g,l,n=0;n<b;n++)l=Math.floor(Math.random()*c),g=a[n],a[n]=a[l],a[l]=g;return a.slice(0,b)}function b(b,e){var h=k.createElement("div"),g=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(" "),g=a(g,c);h.setAttribute("class",g.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=e||null;var l=this;setTimeout(function(){l._checkBait.call(l)},1)}var c=7;b.prototype._checkBait=function(){if(Aa)this._stop();else{var a=null!==k.body.getAttribute("abp")||
!wb(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 g=this;setTimeout(function(){g._checkBait.call(g)},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,Wb="ecommerce",Q="dataLayer",ea=null,pb=!1,Sa=[],Pc=[36383,2540645,3171181,3074137,2057653],Qc=[],qb;(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 e={ecom_method:[],ecom_type:[],ecom_data:{events:[]}},h=0,l=b.length;h<l;h++){var g=s[b[h]];if(g){a(e.ecom_method,[b[h]]);for(var n=0,f=g.length;n<f;n++)for(var k=0,q=d.length;k<q;k++){var m=g[n][d[k]];if(m)for(var t=0,p=c.length;t<p;t++)if(-1!==g[n].type.indexOf(c[t])){a(e.ecom_type,
[c[t]]);a(e.ecom_data.events,m);break}}}}return e}function c(a,b,c){if(!a||!c||!(b in s))return null;for(var d,e=0,h=s[b].length;e<h;e++)if(d=s[b][e],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=[],g,f,m=0,Rc=a.length;m<Rc;m++)if(f=a[m]){g=null;try{if(f.ecommerce)g=e(f)||h(f);else if(null===f.ecommerce)g=null;else if(f.event){var $={event:f.event,ecommerce:{}};g=e($)||h($)}else if("event"===f[0]){var Xb=f[1],s=f[2],
y=c(Xb,n,r);y&&(y.ecom_data[Xb]=s);g=y}else if(f.event===Wb)a:{for(var Ha=b([l],[k],[q]),E=0,t=Ha.ecom_data.events.length;E<t;E++)if(!f.hasOwnProperty(Ha.ecom_data.events[E])){g=null;break a}delete Ha.ecom_data.events;Ha.ecom_data[Wb]=f;g=Ha}}catch(A){p&&console.warn("[TopMailRu] Error#1.23",A),g=null}g&&(d.push(g),Sa.push(g))}if(d.length){a=0;for(g=d.length;a<g;a++)Fb(Ta,d[a]);C||(C=[0,0,Q]);C[0]+=d.length;g=a=0;for(m=d.length;g<m;g++)a+=wa(d[g].ecom_data).length;C[1]+=a}}function e(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 e=0,g=b.ecom_type.length;e<g;e++)-1===d.ecom_type.indexOf(b.ecom_type[e])&&(b.ecom_type.splice(e,1),g--,e--);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=f[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"]}];qb=function(a){if(!(a===Q&&ea)){a!==Q&&(Sa=[]);var b=f[Q];b&&"function"===typeof b.push&&ea&&(b.push=ea,ea=null);g(a);pb=!0}}})();var Gb=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(f).join(",")}catch(d){c=null}for(var e=[],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 f)||"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,ia(a[g].id,e)||e.push(a[g].id))}return e}}(),sc=Gb,Ib=864E5,Hb="tmr_floc",Lb=null;(function(a){try{k.interestCohort&&"function"===typeof k.interestCohort&&k.interestCohort().then(function(a){Lb=
{id:a.id,version:a.version};a=[a.id,a.version];var b=w();a=a.concat(b).join("|");sa(Hb,a,{path:"/",expires:Ib})},function(){})}catch(b){}})();var Oa=null,pa=null;(function(){function a(a){try{var f=a.state;pa=f in h?h[f]:e;if(Mc)try{f===d?(H[c].getCurrentPosition(b),g||(g=H[c].watchPosition(b))):g&&(H[c].clearWatch(g),b(null))}catch(k){}}catch(m){}}function b(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,pa);Oa=b.join("/")}catch(d){}else Oa=pa}var c="geolocation",d="granted",e="u",h={denied:"d"};h[d]="g";h.prompt="p";var g=null;(function(){pa=e;b(null);try{c in H?H.permissions&&H.permissions.query({name:c}).then(function(b){a(b);b.onchange=function(){a(b)}}):pa="n"}catch(d){}})()})();var da={support:!1},da=function(){function a(){e(g)}function b(){e(g,r)}function c(a){a.persisted&&(q[g]=null,q[l]=null,e(g,p))}function d(){return n?!k[n]:null}function e(a,b){var c=
w(),e="undefined"===typeof b?d():b;if(null===q[a])q[a]={ts:c,state:e,total:0};else{var g=q[a];if(g.state!==e&&!(g.state===r&&e!==p)){var f=c-g.ts,l=g.state;g.ts=c;g.state=e;f<h||(l===p?(g.total+=f,v&&v(c,f)):l===A&&u&&u(c,f))}}}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 v=q[l]=null,u=null;return{support:!!n,auto:function(d,e){v=d||null;u=e||null;n&&(a(),s(k,m,a));ma?(s(f,"pageshow",c),s(f,"pagehide",b)):(s(f,"beforeunload",b),s(f,"unload",b))},set:function(a){e(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 Yb={enabled:!1},Zb=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=[],e=[],h=0,g=c.length;h<g;h++){var f;a:switch(f=c[h],f.tagName.toLowerCase()){case "button":f=!1;break a;case "input":var k=f.type.toLowerCase();if(k&&-1===a.indexOf(k)){f=!1;break a}default:f=wb(f,!1)&&f.name&&!1===f.disabled}f&&(d.push(c[h].name),e.push(c[h].type))}return{node:b,inputsName:d.length?d:null,inputsType:e.length?e: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}}}(),Yb=function(){function a(a){a=a||f.event;var c=(a.which||a.keyCode)===L;if("which"in a&&a.which===D||"button"in a&&a.button&D||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 K=0,u=t.filter.tagName.length;K<u&&!(r=vb(s,t.filter.tagName[K]));K++);else r=s;if(r){if(t.filter.attr)for(s in s=
void 0,t.filter.attr)if(t.filter.attr.hasOwnProperty(s)&&(K=t.filter.attr[s],u=r[s],!0===K&&!u||!1===K&&u||T(K)&&-1===K.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===e){if(a.data=qa.parse(a.source.href,!0),!a.data)return}else if(a.category===h){if(a.data=Zb.analyze(Zb.getFormByInput(a.source)),!a.data)return}else return;c=J;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===e||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],K={category:y.category},u=[],z=0,fa=s.types.length;z<fa;z++){var x=s.types[z],C=ja({type:s.category},K),H=A in x,B;v in x?B=b(r,x,C,v):H&&(B=ja({source:r.source,data:r.data,detail:x.type},C));if(B&&(!H||!b(r,x,C,A)))if(u.push(B),(x.rule&w)!==w)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===e&&(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,e){var g=!1,f=b[e];if(T(f)){var h=b[e+"Rule"]||z;e=(h&r)===r;for(var h=(h&q)===q,k=0,l=f.length;k<l&&!(g=c(a,f[k]),e&&g);k++)if(h&&!g)return null}else g=c(a,f);return!g?
null:ja({source:a.source,data:a.data,detail:b.type},d)}function c(a,b){var c=b.rule||z,e=(c&r)===r,c=(c&q)===q,g=!1,f;for(f in b)if(b.hasOwnProperty(f)&&"rule"!==f){var g=b[f],h=a.data[f],g=!0===g?!!(T(h)?h.length:h):!1===g?!(T(h)?h.length:h):d(h,g);if(e&&g)break;else if(c&&!g)return!1}return g}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(P(d)&&!T(d)){if(!T(d.value))return!1;e=d.rule||e;d=d.value}a:{for(var g=(e&u)===u,f=(e&r)===r,e=(e&q)===q,
h=!1,k=0,l=d.length;k<l;k++){var n=d[k];if(n){var m="string"===typeof n;m&&!g&&(n=n.toLowerCase());var s=n instanceof RegExp;if(m||s){var h=!0,p;b:{p=c;for(var v=g,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(f&&p){c=!0;break a}else if(e&&!p){c=!1;break a}}}}c=f?!1:e?h?!0:!1:void 0}return c}var e="click",h="submit",g=[{category:h,types:[{type:"button",filter:{tagName:["input","button"],attr:{type:["submit","image"]}}}]},{category:e,types:[{type:"a",
filter:{tagName:["a"],attr:{href:!0}}}]}],l="file",n="resource",m="submit",v="filter",A="stop",r=1,q=2,u=4,w=8,z=r,J={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:e,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:w,stop:{domain:[qa.getDomainMask(qa.parse(x.href,"domain"),3,!1)],href:[/password/]}},{type:"messenger",filter:{domain:qa.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:qa.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/]}}]}]}]},D=1,L=13;return{enabled:!0,start:function(){s(k,"click",a);s(k,"keypress",a)}}}();Lc&&Yb.start();var v=function(){function a(){b(null)}function b(a){e();a?(S=a===fa,na=a):na=Y&&null!==S?S?fa:Z:k.visibilityState;
a=$();for(var b in ga)v(b,a)}function c(){if(!1!==O){L(f,X,ea);ea=null;f.clearInterval(ka);la=ka=null;L(k,K,ba);ba=null;Y&&(L(f,U,ca),L(f,V,da),da=ca=null);h(!0);for(var a in aa){var b=a,c=aa[b];c&&(c=c.key,M(b),F(),delete aa[b],y(null,c))}G=null;ha=[];ua=[];I={};aa={};ga={};O=!1}}function d(a,b,c){var d=a+"_"+b;if(d in I)return!1;var e=w(),g=$(),f=B(d,e,eb);b=I[d]={id:a||null,name:b,key:f,canUseInBackground:!!c,startTS:e,updateTS:g,timespent:{}};if(a)if(ua.push(d),d=b.canUseInBackground,b=ga[a]){if(c=
b.isActive,!c&&(e=G&&ia(a,G)))if(c=na===fa||d)b.updateTS=g,b.isActive=!0}else e=G&&ia(a,G),c=na===fa||d,ga[a]={isActive:e&&c,updateTS:g,timespent:{}};else ha.push(d);return!0}function e(a,b){var c,d;2>arguments.length?(c=ua.concat(ha),d=E):(c=[a+"_"+b],d=Q);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,W);g(f,Q)}function g(a,b){var c=$(),d=[],e,g,f;e=0;
for(g=a.length;e<g;e++)f=a[e],-1!==ua.indexOf(f)?l(f,b,c):-1!==ha.indexOf(f)&&d.push(f);e=0;for(g=d.length;e<g;e++)f=d[e],l(f,b,c);if(b===E&&(R=c,R-O>=qa)){for(var h in I)m(h);for(h in aa)if(c=h,d=aa[c])M(c),y(c,d.key);O=R}}function l(a,b,c){var d=I[a];if(d&&!1!==d.updateTS)if(d.timespent[na]=(d.timespent[na]||0)+(c-(d.updateTS||R)),-1!==ha.indexOf(a)&&x(null,c),b===W)d.updateTS=!1,m(a);else if(b===t){d.updateTS=c;var e;a:{if(b=I[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=I[a];if(!d)return null;var e=b||d.key;b=N[e];N[e]={uid:a,name:d.name,counterID:c||d.id||G,canUseInBackground:d.canUseInBackground,isActive:!1!==d.updateTS,startTime:d.startTS,timespent:{}};a=N[e].timespent;var d=d.timespent,g;for(g in d)a[g]=d[g];if(c&&(c=ga[c]))if(e=N[e]){e.common={};e=e.common;c=c.timespent;for(var f in c)e[f]=c[f]}return b||null}function m(a){var b=I[a];b&&(n(a),p(a,b.key))}function p(a,b){var c=N[b];if(c)if(T(c.counterID)){var d=
N[b];if(d){var c=d.counterID,e=[],g,f,h,k;if(c){h=0;for(k=c.length;h<k;h++){f=c[h];g=B(b,f);e.push(g);f=n(a||d.uid,g,f);var l=void 0;f&&(l=N[g],H(l.timespent,f.timespent),f.common&&(l.common=l.common||{},H(l.common,f.common)))}}delete N[b];F();if(a&&a in I)if(d.isActive){r(a);h=0;for(k=c.length;h<k;h++)if(d=ga[c[h]])for(var m in d.timespent)d.timespent[m]=0}else q(a);h=0;for(k=e.length;h<k;h++)u(e[h])}}else if(m=N[b])(c=a&&a in I)&&!m.isActive&&q(a),e=u(b),c&&(e&&m.isActive)&&r(a)}function u(a){var b;
if(b=N[a]){var c=P(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=P(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(J({id:b.id},"/tracker",!1,!1)+c);delete N[a];F();return!0}function r(a){if(a=I[a])for(var b in a.timespent)a.timespent[b]=0}function q(a){if(a in I){var b;-1!==(b=ha.indexOf(a))&&ha.splice(b,1);
if(-1!==(b=ua.indexOf(a)))if(ua.splice(b,1),b=I[a].id){var c=ga[b];if(c){var d=c.isActive;d&&D(c,$());d=C(b,a);d||(c.isActive=!1)}}delete I[a]}}function v(a,b){var c=ga[a];if(c){var d=G&&ia(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,$()):c.updateTS=b)}else for(c in ga)x(c,b)}function C(a,b){for(var c in I)if(c!==b&&I[c].id===a&&(na===fa||I[c].canUseInBackground))return!0;return!1}function D(a,b){a&&(a.timespent[na]=(a.timespent[na]||0)+(b-a.updateTS),
a.updateTS=b)}function B(a){return[].join.call(arguments,"_")}function H(a,b){for(var c in b)a[c]=(a[c]||0)+(b[c]||0)}function P(a){var b=a[fa]||0,c=0,d;for(d in a)d!==fa&&(c+=a[d]);return{fg:b,bg:c}}function $(){return Math.floor(f.performance.now())}function F(){if(oa){var a={};a[sa]=N;a[ta]=va;Ma(ra,wa(a)||"")}}function M(a){var b=aa[a];b&&(va[b.key]={uid:a,name:b.name,counterID:b.id,value:b.value})}function y(a,b){if(va[b]){var c;if(c=va[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(J({id:c.id},"/tracker",!1,!1)+d));!1!==c&&(delete va[b],F());if(c&&a&&(c=aa[a]))c.value=0}}var Q=1,E=2,t=4,W=8,X=ma?"pagehide":"unload",K="visibilitychange";"mozHidden"in k?K="mozvisibilitychange":"webkitHidden"in k?K="webkitvisibilitychange":"msHidden"in k&&(K="msvisibilitychange");var U="focus",V="blur";"onfocusin"in k&&(U="focusin",V="focusout");var fa="visible",Z="hidden",ja=["0"],Y=!1,pa=100,qa=12E4,O=!1,R=!1,G=null,ha=[],ua=
[],I={},na,S=null,ka,la,ba,ca,da,ea,ra="tmr_tslog",sa="activity",ta="count",N={},aa={},va={},ga={};return{init:function(){if(oa){var a=Ub(La(ra)||"{}");N=a[sa]||{};va=a[ta]||{}}for(var b in N)p(null,b);for(b in va)y(null,b)},launch:function(){!1===O&&(O=$(),R=$(),na=Y&&null!==S?S?fa:Z:k.visibilityState,ea=c.bind(f),s(f,X,ea),la=a.bind(f),ka=f.setInterval(la,1E4),ba=b.bind(f,null),s(k,K,ba),Y&&(ca=b.bind(f,fa),da=b.bind(f,Z),s(f,U,ca),s(f,V,da)))},enable:function(a){if(G){if(ia(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,$())},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=$(),a=ga[a]))a.isActive=!1,a.updateTS=b}},startActivity:d,updateActivity:e,stopActivity:h,incCount:function(a,b){var c=a+"_"+b,d;if(!(d=aa[c]))if(c in aa)d=aa[c];else{d=w();var e=B(b,d,eb);d=aa[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}}}(),
bb=!1,wc="60.3.0",Qa=0,Ca=0,eb=yb(16),X=null,Y=null,Ba=0,xa="tmr_reqNum",F=null;ba&&(F=ka(xa)||null,null!==F&&Za(xa,$a));oa&&null===F&&(F=La(xa)||null);F=null===F?0:parseInt(F,10);oa&&Ma(xa,F);var ca=(ba?ka("tmr_lvid"):null)||(oa?La("tmr_lvid"):null),za=(ba?ka("tmr_lvidTS"):null)||(oa?La("tmr_lvidTS"):null);if(null===ca||-1===ca.search(/^[0-9a-fA-F]+$/))ca=yb(32);Cb("tmr_lvid",ca);if(null===za||-1===za.search(/^\d+$/))za=""+w();Cb("tmr_lvidTS",za);var U=0,D=[],Ea=[],Ua=[],Ta=[],Ra={},uc="ontouchstart"in
f||1<(H.maxTouchPoints||H.msMaxTouchPoints)?"1":"0",vc=f.devicePixelRatio||0,$b=f.performance||f.mozPerformance||f.msPerformance||f.webkitPerformance||{},V=$b.timing||{},fb=$b.navigation||{},Mb="unloadEventStart unloadEventEnd redirectStart redirectEnd fetchStart domainLookupStart domainLookupEnd connectStart connectEnd secureConnectionStart requestStart responseStart responseEnd domLoading domInteractive domContentLoadedEventStart domContentLoadedEventEnd domComplete loadEventStart loadEventEnd".split(" "),
Na=!V?void 0:V.navigationStart,S=Na,Nb="downlink downlinkMax effectiveType rtt saveData type".split(" "),O,rb;O=function(a,b,c){if(b&&"object"===typeof b){var d="id"in b&&b.id||U,e=c.title||null,f,g=rb(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=rb(b,{params:c.optional,fn:c.fn});f=[].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?f.push("value: "+b):g.push("value"));c=f.length?"{ "+f.join(", ")+" }":"";f=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+" "+f):console.warn("[TopMailRu] Error#1.15","Undefined counter ID of "+a+" "+c)}}else console.warn("[TopMailRu][]["+a+"] Error#1.13")};rb=function(a,b){var c=[],
d=[],e,f,g;if(b.params)for(e in b.params)if(b.params.hasOwnProperty(e)&&!1!==b.params[e])if(f=e in a&&a[e],!0!==b.params[e]&&(f=f||b.params[e]),f)try{g=b.fn?b.fn:null,c.push(e+': "'+(g?g(e,f):f)+'"')}catch(k){console.warn("[TopMailRu] Error#1.16",k)}else d&&d.push(e);return{values:c,missed:d}};var B={},mb=[];m.prototype.callbackOnReady=function(a){p&&O("onReady",a,{title:"OnReady callback"});a&&"object"===typeof a&&"function"===typeof a.callback&&(a.callback.call(a.context||null),ma&&mb.push(a))};
m.prototype.pageView=function(a){ta(a);a:if(a&&"object"===typeof a&&a.id){5>Ea.length&&!ia(a.id,Ea)&&(Ea.push(a.id),!1!==a.beat&&Ua.push(a.id),D.push(a),Aa&&Eb(a));ma&&(Ra[a.id]=ja(!0,{},a),Ra[a.id].bfCache=!0);"detectBlocker"in a&&!a.detectBlocker&&(gb=!0);var b="string"===typeof a.ecommerce,c=b&&-1!==a.ecommerce.search(/\S/);if(5>Ta.length&&!ia(a.id,Ta)&&(!0===a.ecommerce||b&&!c||b&&c||!1!==a.ecommerce&&!b&&(ia(a.id,Pc)||!ia(a.id,Qc)))){Ta.push(a.id);if(b&&c){if(pb&&(qb(a.ecommerce),Q!==a.ecommerce)){Q=
a.ecommerce;C&&(C=[0,0,Q]);break a}Q=a.ecommerce;C&&(C=[0,0,Q])}b=[a.id];if(pb)for(var c=0,d=Sa.length;c<d;c++)Fb(b,Sa[c])}a.timespent=M&&(a.timespent||ia(a.id,Kc)&&!1!==a.timespent);M&&(a.timespent?v.enable(a.id):v.disable(a.id));bb&&5>Ea.length&&Jb([a.id])}p&&O("pageView",a,{title:"Page view",optional:{url:x.href}});W(a)&&(z(J(a,"/counter",!1,!0)),Ca=w())};m.prototype.reachGoal=function(a){ta(a);p&&O("reachGoal",a,{title:"Reach goal",value:!0,required:{goal:!0}});if(W(a)&&"goal"in a&&a.goal){var b=
"value"in a&&a.value?parseInt(a.value)||"":"";z(J(a,"/tracker",!1,!0)+(";e="+escape("RG:"+b+"/"+a.goal)))}};var ib="VALUE";m.prototype.itemView=function(a){p&&O("itemView",a,{title:"Item view",optional:{list:!0,pagetype:!0,productid:!0,totalvalue:!0},fn:function(a,b){return(""+b).replace(/;/g," ")}});if(W(a)){var b=a.list||"",c=a.productid||"",d=a.pagetype||"",e=a.totalvalue||0,f=Cc(a.id,d,e,c);f&&this.reachGoal(f);(new Image).src="https://ad.mail.ru/retarget/?counter="+(a.id||U)+"&list="+b+"&productid="+
c+"&pagetype="+d+"&totalvalue="+e+"&_="+Math.random();b="IV:"+e+"/"+(""+b).replace(/;/g," ")+";"+(""+c).replace(/;/g," ")+";"+(""+d).replace(/;/g," ");z(J(a,"/tracker",!1,!0)+(";e="+escape(b)))}};var Dc="vk_ecom_";m.prototype.sendEvent=function(a){ta(a);p&&O("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(W(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(J(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"):(X=a,p&&console.info("[TopMailRu]: Global user ID = "+
X))}};m.prototype.getUserID=function(){return X||0===X?X:void 0};m.prototype.deleteUserID=function(){X=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(P(a)){try{Y=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 = "+wa(Y))}else p&&console.warn("[TopMailRu] Error#1.21","Invalid user params in setUserParams")};
m.prototype.getUserParams=function(){var a=Y?Y:void 0;return a?ja(!0,{},a):void 0};m.prototype.deleteUserParams=function(){Y=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){ta(a);p&&O(b,a,{title:c});W(a)&&z(J(a,"/tracker",!1,!0)+(";e="+escape("MT:/"+b)))};m.prototype.miniAppEvent=function(a){this._MT_event(a,"miniAppEvent","VK Mini App Event")};var sb=function(a,b){if(M){var c=
v.defaultID();W(a,c)&&(!P(a)||!("activity"in a&&a.activity)?p&&console.warn("[TopMailRu] Error#1.27","Invalid startActivity command: ID of activity is required"):v.startActivity(a.id||c,""+a.activity,null===b?!!a.canUseInBackground:b))}};m.prototype.startTimespent=function(a){sb(a,null)};m.prototype.startForegroundTimespent=function(a){sb(a,!1)};m.prototype.startAnytimeTimespent=function(a){sb(a,!0)};m.prototype.updateTimespent=function(a){if(M){var b=v.defaultID();W(a,b)&&(!P(a)||!("activity"in a&&
a.activity)?v.updateActivity():"number"===typeof a.activity||"string"===typeof a.activity?v.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=v.defaultID();W(a,b)&&(!P(a)||!("activity"in a&&a.activity)?v.stopActivity(!1):"number"===typeof a.activity||"string"===typeof a.activity?v.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=v.defaultID();W(a,b)&&(!a||!("activity"in a&&a.activity)?p&&console.warn("[TopMailRu] Error#1.31","Invalid incrementEventTimespent command: ID of countable activity is required"):v.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 ac=!1;m.prototype.onready=function(){ac||(ac=!0,!gb&&!Aa&&Oc(xc,yc),qb(Q))};var lb=!1;m.prototype.onload=function(){if(!lb){lb=!0;Ba=w();if(!Fa&&0<D.length){for(var a=";e="+escape("RT/load")+";et="+Ba,b=0;b<D.length;b++)z(J(D[b],"/tracker",!0,!0)+a);Ca=Ba}zc()}};m.prototype.beat=function(){var a;if(!hb&&Qa){var b=w();if(!(12E4<b-Qa)){if(12E4<b-Ca){a=";e="+escape("RT/resend")+";et="+Ba;for(var c=0;c<D.length;c++)!1!==D[c].beat&&z(J(D[c],"/tracker",!1,!0)+
a)}else 0<Ua.length&&(a=";e="+escape("RT/beat")+";ids="+escape(Ua.join()),z(J({id:Ua[0]},"/tracker",!1,!0)+a));Ca=b}}};var kb=!1;m.prototype.unload=function(){if(!kb){kb=!0;if(!Fa){var a;a=(a=Kb())?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<D.length;b++)z(J(D[b],"/tracker",!1,!0)+a)}ma&&(B.pvt2&&(clearTimeout(B.pvt2),delete B.pvt2),B.pvt15&&(clearTimeout(B.pvt15),delete B.pvt15),B.beat&&(clearInterval(B.beat),
delete B.beat))}};m.prototype.activity=function(a){Qa=w()};var ra=_tmr;_tmr=new m;M&&v.init();for(var u=0,Ia=ra.length,R;u<Ia;u++)(R=ra[u])&&"object"===typeof R&&ta(R);Va=(new Date).getTime();u=0;for(Ia=ra.length;u<Ia;u++)R=ra[u],_tmr.processEvent(R,1);Ja=(new Date).getTime();u=0;for(Ia=ra.length;u<Ia;u++)R=ra[u],_tmr.processEvent(R,-1);"complete"===k.readyState||"loading"!==k.readyState&&!k.documentElement.doScroll?(_tmr.onready(),Tb()):k.addEventListener?s(k,"DOMContentLoaded",Pa):k.attachEvent&&
s(k,"readystatechange",Pa);if("complete"===k.readyState)_tmr.onload();else ma?s(f,"pageshow",jb):s(f,"load",jb);ma?s(f,"pagehide",Da):(s(f,"unload",Da),s(f,"beforeunload",Da));Sb();if(!hb)try{for(var bc="scroll gesturechange touchmove mousedown mousemove mouseup touch".split(" "),Sc=function(a){s(k,a,function(){_tmr.activity(a)})},u=0;u<bc.length;u++)Sc(bc[u]);s(f,"scroll",function(){_tmr.activity("scallback")})}catch(Tc){p&&console.warn("[TopMailRu] Error#1.20",Tc)}Ka=(new Date).getTime()}})();
