(function(h,g,aa){function t(a,b){return function(){try{return a.apply(this,arguments)}catch(c){ua(c,b)}}}function ua(a,b){if(.01>Math.random())try{(new T).log("jserrs",Q,a.message,b,B.href,"","string"==typeof a.stack&&a.stack.replace(/\n/g,"\\n"))}catch(e){var c=["cp: "+b,a.name+": "+a.message,"debug: ","code: "+Q,"stack: "+a.stack];(new Image).src="//an.yandex.ru/jserr/101500?cnt-class=100&errmsg="+encodeURIComponent(c.join("; ").replace(/\r?\n/g,"\\n"))}}function fb(a,b,c){return h.setTimeout(t(a,
c||"setTimeout"),b)}function y(){for(var a={},b="hash host hostname href pathname port protocol search".split(" "),c=b.length,e=c;e--;)a[b[e]]="";try{for(var d=h.location,e=c;e--;){var f=b[e];a[f]=""+d[f]}}catch(g){B&&(a=B)}return a}function Ia(a){return a?(""+a).replace(/^\s+/,"").replace(/\s+$/,""):""}function Ja(){return-1!=y().hostname.search(/(?:^|\.)(?:ya|yandex)\.(?:\w+|com\.\w+)$/)}function ga(a){return-1!==(""+h.navigator.userAgent).toLowerCase().search(a)}function Ka(a){return Ia(a&&a.innerHTML&&
a.innerHTML.replace(/<\/?[^>]+>/gi,""))}function La(a,b){if(!a||!b)return!1;for(var c=[],e=0;e<b.length;e++)c.push(b[e].replace(/\^/g,"\\^").replace(/\$/g,"\\$").replace(/\./g,"\\.").replace(/\[/g,"\\[").replace(/\]/g,"\\]").replace(/\|/g,"\\|").replace(/\(/g,"\\(").replace(/\)/g,"\\)").replace(/\?/g,"\\?").replace(/\*/g,"\\*").replace(/\+/g,"\\+").replace(/\{/g,"\\{").replace(/\}/g,"\\}"));return(new RegExp("\\.("+c.join("|")+")$","i")).test(a)}function gb(a){a=a.target||a.srcElement;if(!a)return!1;
3==a.nodeType&&(a=a.parentNode);for(var b=a&&a.nodeName&&a.nodeName.toString().toLowerCase();a&&a.parentNode&&a.parentNode.nodeName&&("a"!=b&&"area"!=b||!a.href);)b=(a=a.parentNode)&&a.nodeName&&a.nodeName.toString().toLowerCase();return a.href?a:!1}function hb(a,b){return(a?a.replace(/^www\./,""):"")==(b?b.replace(/^www\./,""):"")}function ib(a,b){function c(a){a=a.split(":");a=a[1]||"";a=a.replace(/^\/*/,"").replace(/^www\./,"");return a.split("/")[0]}return a&&b?c(a)==c(b):a||b?!1:!0}function Ma(){var a=
h.performance||h.webkitPerformance,b=[];if(a=a&&a.timing){var c=a.navigationStart;if(c)for(b=[a.domainLookupEnd-a.domainLookupStart,a.connectEnd-a.connectStart,a.responseStart-a.requestStart,a.responseEnd-a.responseStart,a.fetchStart-c,a.redirectEnd-a.redirectStart,a.redirectCount],b.push(a.domInteractive&&a.domLoading?a.domInteractive-a.domLoading:null),b.push(a.domContentLoadedEventStart&&a.domContentLoadedEventEnd?a.domContentLoadedEventEnd-a.domContentLoadedEventStart:null),b.push(a.domComplete?
a.domComplete-c:null),b.push(a.loadEventStart?a.loadEventStart-c:null),b.push(a.loadEventStart&&a.loadEventEnd?a.loadEventEnd-a.loadEventStart:null),b.push(a.domContentLoadedEventStart?a.domContentLoadedEventStart-c:null),a=0;a<b.length;a++)c=b[a],null!==c&&(0>c||36E5<c)&&(b[a]=null)}return b}function jb(a){var b=[],c=a._lastPerformanceTiming,e=Ma();if(c)for(var d=0,f=c.length;d<f;d++)null===e[d]?b.push(e[d]):b.push(c[d]===e[d]?"":e[d]);else b=e;a._lastPerformanceTiming=e;return b.join(",")}function kb(){var a;
if("object"==typeof h.chrome&&h.chrome.loadTimes){if(a=h.chrome.loadTimes(),a.requestTime&&a.firstPaintTime)return~~(1E3*(a.firstPaintTime-a.requestTime))}else if(h.performance&&h.performance.timing&&(a=h.performance.timing,a.navigationStart&&a.msFirstPaint))return a.msFirstPaint-a.navigationStart;return null}function lb(a){var b=g.referrer||"";if((new RegExp("^https?://"+B.host+"/")).test(b))return!1;for(var c=a.patterns,e=0;e<c.length;e++)if(b.match(new RegExp(c[e],"i"))){var d=a.params||[];if(d.length)for(var h=
f.safeDecodeURIComponent((RegExp.$1||"").replace(/\+/g,"%20")),I=0;I<d.length;I++){if(h==f.safeDecodeURIComponent(d[I]))return!0}else return!0}return!1}function Na(a,b){var c=!1;if(a&&"string"!=typeof a&&a.length)for(var e=0;e<a.length;e++){var d=a[e].selector,f=a[e].text,h=d.charAt(0),d=d.slice(1);if("#"==h){if(h=g.getElementById(d))c=!0,b&&U.unshift([h,h.innerHTML]),h.innerHTML=f}else if("."==h)for(h=l.getElementsByClassName(d),d=0;d<h.length;d++){var c=!0,k=h[d],R=f;b&&U.unshift([k,k.innerHTML]);
k.innerHTML=R}}return c}function Oa(){for(var a=0;a<U.length;a++)U[a][0].innerHTML=U[a][1]}function mb(a,b){var c,e,d="",h;a=a&&a.replace(/^\?/,"");b=b&&b.replace(/^#/,"")||"";if(a)for(e=a.split("&"),c=0;c<e.length;c++)h=e[c].split("="),"_openstat"===h[0]&&(d=h[1]);var g=b.split("?");for(c=0;c<g.length;c++){var k=g[c].split("&");for(e=0;e<k.length;e++)h=k[e].split("="),"_openstat"===h[0]&&(d=h[1])}d&&(d=-1<d.indexOf(";")?f.safeDecodeURIComponent(d):V.decode(d.replace(/[-*_]/g,function(a){return{"*":"+",
"-":"/",_:"="}[a]||a})));return d&&(c=d.split(";"),4==c.length)?{service:c[0],campaign:c[1],ad:c[2],source:c[3]}:null}function Pa(a){try{delete h[a]}catch(b){h[a]=aa}}function nb(a,b,c,e,d){function q(a){var b=(new Date).getTime();a&&b<a&&(M+=a-b+20);f.setTimeout(function(){q(b)},20,"timeCorrector")}function I(){var a=(new Date).getTime()+M;a<H&&(a=H+10);return H=a}function A(){return Math.round((I()-na)/50)}function R(a,b){b=Math.max(0,Math.min(b,65535));f.mergeArrays(a,[b>>8,b&255])}function m(a,
b){f.mergeArrays(a,[b&255])}function n(a,b){for(b=Math.max(0,b|0);127<b;)f.mergeArrays(a,[b&127|128]),b>>=7;f.mergeArrays(a,[b])}function p(a,b){255<b.length&&(b=b.substr(0,255));f.mergeArrays(a,[b.length]);for(var c=0;c<b.length;c++)R(a,b.charCodeAt(c))}function v(a,b){n(a,b.length);for(var c=0;c<b.length;c++)n(a,b.charCodeAt(c))}function B(a,b,c,d,e,f){for(var h;c&&(h=l.getElementSize(c))&&(!h[0]||!h[1]);)c=l.getElementParent(c);if(!c)return null;h=c[C];if(!h||0>h)return null;var g={mousemove:2,
click:32,dblclick:33,mousedown:4,mouseup:30,touch:12}[b];if(!g)return null;var q=l.getElementXY(c);c=[];m(c,g);n(c,a);n(c,h);n(c,Math.max(0,d[0]-q[0]));n(c,Math.max(0,d[1]-q[1]));/^mouse(up|down)|click$/.test(b)&&(a=e||f,m(c,2>a?1:a==(e?2:4)?4:2));return c}function G(a,b,c,d){b=b[C];if(!b||0>b)return null;var e=[];m(e,31);n(e,a);n(e,b);n(e,c[0]);n(e,c[1]);m(e,0);m(e,0);m(e,d);return e}function z(a,b){var c=[];m(c,3);n(c,a);n(c,b[0]);n(c,b[1]);return c}function ob(a,b,c){var d=[];c=c[C];if(!c||0>c)return null;
m(d,16);n(d,a);n(d,b[0]);n(d,b[1]);n(d,c);return d}function L(a,b,c){var d=[];m(d,28);n(d,a);n(d,b[0]);n(d,b[1]);n(d,c[0]);n(d,c[1]);return d}function J(a,b,c,d){var e=[];m(e,5);n(e,a);R(e,b);m(e,c);a=d[C];if(!a||0>a)a=0;n(e,a);return e}function K(a,b){var c,d;0==b.length?d=c="":100>=b.length?(c=b,d=""):200>=b.length?(c=b.substr(0,100),d=b.substr(100)):(c=b.substr(0,97),d=b.substr(b.length-97));var e=[];m(e,29);n(e,a);v(e,c);v(e,d);return e}function S(a){var b=[];m(b,27);n(b,a);return b}function N(a){var b=
[];m(b,14);n(b,a);return b}function w(a){var b=[];m(b,15);n(b,a);return b}function W(a,b){var c=[];m(c,17);n(c,a);n(c,b[C]);return c}function aa(a,b){var c=[];m(c,18);n(c,a);n(c,b[C]);return c}function O(a,b,c){var d=[];m(d,19);n(d,a);n(d,b[C]);p(d,String(c));return d}function ha(a){var b=a[C];if(!b||0>b||!/^INPUT|SELECT|TEXTAREA$/.test(a.nodeName)||!a.form||U(a.form))return null;var c=l.getFormNumber(a.form);if(0>c)return null;var d;d="INPUT"==a.nodeName?{text:0,color:0,date:0,datetime:0,"datetime-local":0,
email:0,number:0,range:0,search:0,tel:0,time:0,url:0,month:0,week:0,password:2,radio:3,checkbox:4,file:6,image:7}[a.type]:{SELECT:1,TEXTAREA:5}[a.nodeName];if("number"!=typeof d)return null;for(var e=-1,f=a.form.elements,h=f.length,g=0,q=0;g<h;g++)if(f[g].name==a.name){if(f[g]==a){e=q;break}q++}if(0>e)return null;f=[];m(f,7);n(f,b);n(f,c);n(f,d);v(f,a.name||"");n(f,e);return f}function X(a,b){var c=l.getFormNumber(b);if(0>c)return null;for(var d=b.elements,e=d.length,h=[],g=0;g<e;g++)if(!l.isEmptyField(d[g])){var q=
d[g][C];q&&0<q&&f.mergeArrays(h,[q])}d=[];m(d,11);n(d,a);n(d,c);n(d,h.length);for(c=0;c<h.length;c++)n(d,h[c]);return d}function ia(){var a=[];m(a,13);return a}function E(a,b,c){a=a.apply(h,b);oa.append(a,c)}function r(a){if(a[C])a:{var b=A(),c=a[C];if(0<c){var d=[];a=l.getElementRegion(a);var e=va[c],f=a[0]+"x"+a[1],h=a[2]+"x"+a[3];f!=e.pos&&(e.pos=f,m(d,9),n(d,b),n(d,c),n(d,a[0]),n(d,a[1]));h!=e.size&&(e.size=h,m(d,10),n(d,b),n(d,c),n(d,a[2]),n(d,a[3]));if(d.length){a=d;break a}}a=null}else{(c=
l.getElementParent(a))&&r(c);a[C]=P;va[P]={};P++;if(a.nodeName)if(c=+a[C],!isFinite(c)||0>=c)b=null;else{var d=64,e=0,g=l.getElementParent(a),f=g&&g[C]?g[C]:0;0>f&&(f=0);var h=a.nodeName.toUpperCase(),q=ka[h];q||(d|=2);var x=l.getElementNeighborPosition(a);x||(d|=4);var u=l.getElementRegion(a);(g=g?l.getElementRegion(g):null)&&u[0]==g[0]&&u[1]==g[1]&&u[2]==g[2]&&u[3]==g[3]&&(d|=8);va[c].pos=u[0]+"x"+u[1];va[c].size=u[2]+"x"+u[3];a.id&&"string"==typeof a.id&&(d|=32);(g=l.calcTextChecksum(a))&&(d|=
16);var I=l.calcAttribChecksum(a);I&&(e|=2);var k;b:{k=l.getElementChildren(l.getElementParent(a),a.tagName);for(var F=0;F<k.length;F++)if((!k[F].id||"string"!=typeof k[F].id)&&l.calcAttribChecksum(k[F])==I&&l.calcTextChecksum(k[F])==g){k=!0;break b}k=!1}k&&(d|=1,b=l.calcChildrenChecksum(a));k=[];m(k,1);n(k,c);m(k,d);n(k,f);q?m(k,q):p(k,h);x&&n(k,x);d&8||(n(k,u[0]),n(k,u[1]),n(k,u[2]),n(k,u[3]));d&32&&p(k,a.id);g&&R(k,g);d&1&&R(k,b);m(k,e);I&&R(k,I);b=k}else a[C]=-1,b=null;oa.append(b,void 0);a=ha(a)}oa.append(a,
void 0)}function Z(a,b){var c=a&&l.classNameExists(a,"(ym-disable-keys|-metrika-nokeys)");b&&a&&(c=c||!!l.getElementsByClassName("(ym-disable-keys|-metrika-nokeys)",a).length);return c}function U(a){return a&&l.classNameExists(a,"(ym-disable-submit|-metrika-noform)")}function ja(a){var b=D.getTarget(a);if(b&&"SCROLLBAR"!=b.nodeName){if(/^INPUT|SELECT|TEXTAREA|BUTTON$/.test(b.tagName))if(b[C])r(b);else{var c=b.form;if(c)for(var c=c.elements,d=c.length,e=0;e<d;e++)/^INPUT|SELECT|TEXTAREA|BUTTON$/.test(c[e].tagName)&&
!c[e][C]&&r(c[e]);else r(b)}else r(b);E(B,[A(),a.type,b,D.getPos(a),a.which,a.button])}}function u(a){ja(a);a:{var b,c;if(h.getSelection){try{var d=h.getSelection()}catch(e){break a}b=d.toString();c=d.anchorNode}else g.selection&&g.selection.createRange&&(a=g.selection.createRange(),b=a.text,c=a.parentElement());if("string"==typeof b){try{for(;c&&1!=c.nodeType;)c=c.parentNode}catch(e){break a}c&&Ca(c)||Z(c,!0)||b==la||(la=b,E(K,[A(),b]))}}}function x(a){var b=I(),c=b-fa;if(!(10>c)){var d=D.getPos(a),
e=T[0]-d[0],f=T[1]-d[1],e=e*e+f*f;0>=e||16>e&&100>c||20>c&&256>e||(fa=b,T=d,ja(a))}}function F(){var a=l.getDocumentScroll(),b=I();10>b-Q||10>Math.abs(a[0]-V[0])&&10>Math.abs(a[1]-V[1])||(Q=b,V=a,E(z,[A(),a]))}function Qa(a){if(a=D.getTarget(a)){var b=Math.random(),c=[a.scrollLeft,a.scrollTop];if(a.localId){if(b=da[a.localId],!b||10>Math.abs(c[0]-b[0])&&10>Math.abs(c[1]-b[1]))return}else{for(;da[b];)b=Math.random();a.localId=b}da[a.localId]=c;a!==g&&(r(a),E(ob,[A(),c,a]))}}function pa(){E(L,[A(),
l.getViewportSize(),l.getDocumentSize()])}function ba(){E(ia,[],!0)}function Ra(a){return(a.shiftKey?2:0)|(a.ctrlKey?4:0)|(a.altKey?1:0)|(a.metaKey?8:0)|(a.ctrlKey||a.altKey?16:0)}function Ca(a){return"INPUT"==a.tagName?"password"==a.type||a.name&&ma.test(a.name)||a.id&&ma.test(a.id):!1}function Sa(a,b,c){!(a=D.getTarget(a))||Ca(a)||Z(a)||(r(a),E(J,[A(),b,c,a]))}function Ta(a){var b=a.keyCode,c=Ra(a);if({3:1,8:1,9:1,13:1,16:1,17:1,18:1,19:1,20:1,27:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,45:1,46:1,
91:1,92:1,93:1,106:1,110:1,111:1,144:1,145:1}[b]||112<=b&&123>=b||96<=b&&105>=b||c&16)19==b&&4==(c&-17)&&(b=144),Sa(a,b,c|16),ea=!1,f.setTimeout(function(){ea=!0},1),!(67==b&&c&4)||c&1||c&2||Da()}function Ua(a){ea&&!ga&&0!==a.which&&(Sa(a,a.charCode||a.keyCode,Ra(a)),ga=!0,f.setTimeout(function(){ga=!1},1))}function Da(){Y||(Y=!0,la&&E(S,[A()]),f.setTimeout(function(){Y=!1},1))}function Ea(){qa||(qa=!0,E(N,[A()]))}function ra(){qa&&(qa=!1,E(w,[A()]))}function Va(a){(!qa||a&&!a.fromElement)&&Ea()}
function Wa(a){a&&!a.toElement&&ra()}function wa(a){if((a=D.getTarget(a))&&/^INPUT|SELECT|TEXTAREA|BUTTON$/.test(a.tagName)){if(a[C])r(a);else{var b=a.form;if(b)for(var b=b.elements,c=b.length,d=0;d<c;d++)/^INPUT|SELECT|TEXTAREA|BUTTON$/.test(b[d].tagName)&&!b[d][C]&&r(b[d]);else r(a)}E(W,[A(),a])}}function xa(a){(a=D.getTarget(a))&&/^INPUT|SELECT|TEXTAREA|BUTTON$/.test(a.tagName)&&(r(a),E(aa,[A(),a]))}function ya(a){if((a=D.getTarget(a))&&!Ca(a)&&!Z(a)&&/^INPUT|SELECT|TEXTAREA$/.test(a.tagName)){var b=
/^(checkbox|radio)$/.test(a.type)?a.checked:a.value;r(a);E(O,[A(),a,b])}}function sa(a){if((a=D.getTarget(a))&&!U(a)&&"FORM"==a.nodeName){for(var b=a.elements,c=0;c<b.length;c++)l.isEmptyField(b[c])||r(b[c]);E(X,[A(),a],!0)}}function Xa(a){F();if(a.touches&&a.touches.length){var b=D.getTarget(a);if(b&&b!=g){r(b);for(var c=0;c<a.touches.length;c++)E(B,[A(),"touch",b,[a.touches[c].pageX,a.touches[c].pageY],0,0])}}}function Fa(a){var b=D.getTarget(a);if(b){var c;"wheel"==a.type?c=0<a.deltaY?1:0>a.deltaY?
2:0:"mousewheel"==a.type&&(c=0<a.wheelDelta?2:0>a.wheelDelta?1:0);c&&(r(b),E(G,[A(),b,D.getPos(a),c]))}}function ca(a){(a=D.getTarget(a))&&"BODY"==a.tagName&&oa.append([],!0)}var oa=new Za({protocol:a,counterId:b,counterType:c,meta:{url:y().href,hitId:e,timezone:za,timestamp:Aa}}),ka={A:1,ABBR:2,ACRONYM:3,ADDRESS:4,APPLET:5,AREA:6,B:7,BASE:8,BASEFONT:9,BDO:10,BIG:11,BLOCKQUOTE:12,BODY:13,BR:14,BUTTON:15,CAPTION:16,CENTER:17,CITE:18,CODE:19,COL:20,COLGROUP:21,DD:22,DEL:23,DFN:24,DIR:25,DIV:26,DL:27,
DT:28,EM:29,FIELDSET:30,FONT:31,FORM:32,FRAME:33,FRAMESET:34,H1:35,H2:36,H3:37,H4:38,H5:39,H6:40,HEAD:41,HR:42,HTML:43,I:44,IFRAME:45,IMG:46,INPUT:47,INS:48,ISINDEX:49,KBD:50,LABEL:51,LEGEND:52,LI:53,LINK:54,MAP:55,MENU:56,META:57,NOFRAMES:58,NOSCRIPT:59,OBJECT:60,OL:61,OPTGROUP:62,OPTION:63,P:64,PARAM:65,PRE:66,Q:67,S:68,SAMP:69,SCRIPT:70,SELECT:71,SMALL:72,SPAN:73,STRIKE:74,STRONG:75,STYLE:76,SUB:77,SUP:78,TABLE:79,TBODY:80,TD:81,TEXTAREA:82,TFOOT:83,TH:84,THEAD:85,TITLE:86,TR:87,TT:88,U:89,UL:90,
VAR:91,NOINDEX:100},M=0;q(0);var H=0,P=1,fa=0,T=[0,0],Q=0,V=[0,0],da={},ma=/^(password|passwd|pswd)$/,ea=!0,ga=!1,la="",Y=!1,qa=!0,na=I(),C="metrikaId_"+Math.random(),va={},Ba=":submit"+Math.random();if(!f.isMetrikaPlayer()){k.on(g,"mousemove",x);k.on(g,"click,dblclick,mousedown",ja);k.on(g,"mouseup",u);k.on(h,"scroll",F);if("onmousewheel"in g)k.on(g,"mousewheel",Fa);else k.on(g,"wheel",Fa);k.on(h,"beforeunload",ba);if(!pb)k.on(h,"unload",ba);k.on(h,"resize",pa);k.on(g,"keydown",Ta);k.on(g,"keypress",
Ua);k.on(g,"copy",Da);k.on(g,"touchmove,touchstart",Xa);if(g.body)k.on(g,"mouseleave",ca);g.attachEvent&&!h.opera?(k.on(g,"focusin",Va),k.on(g,"focusout",Wa)):(k.on(h,"focus",Ea),k.on(h,"blur",ra),k.on(g,"blur",ra));g.addEventListener?(k.on(g,"scroll",Qa),k.on(g,"focus",wa),k.on(g,"blur",xa),k.on(g,"change",ya),k.on(g,"submit",sa)):g.attachEvent&&(k.on(g,"focusin",wa),k.on(g,"focusout",xa),function(){for(var a=g.getElementsByTagName("form"),b=0;b<a.length;b++){for(var c=a[b].getElementsByTagName("*"),
d=0;d<c.length;d++)if(/^INPUT|SELECT|TEXTAREA$/.test(c[d].tagName))k.on(c[d],"change",ya);k.on(a[b],"submit",sa)}}());(function(){var a=g.getElementsByTagName("form");if(a.length)for(var b=0;b<a.length;b++){var c=a[b].submit;if("function"==typeof c||"object"==typeof c&&/^\s*function submit\(\)/.test(String(c)))a[b][Ba]=c,a[b].submit=function(){sa({target:this});return this[Ba]()}}})();"0:0"!=l.getDocumentScroll().join(":")&&F();pa();d.uploadPage=t(function(d){if("function"==typeof h.toStaticHTML&&
-1<h.toStaticHTML.toString().indexOf("NoScript"))return!1;var f=g.documentElement;if(f&&19E4<(""+f.innerHTML).length)return!1;var q=h.XMLHttpRequest?new h.XMLHttpRequest:new ActiveXObject("Msxml2.XMLHTTP"),u=l.getDocumentCharset(),x="text/html"+(u?";charset="+u:""),k=new qb({protocol:a,counterId:b,counterType:c});if("html"==d)return d=RegExp("<script [^>]*?//mc\\.yandex\\.ru/watch/.*?\x3c/script>","gi"),k.sendContent(l.getDocumentHTML().replace(d,""),x,e,za,Aa),!0;q&&(q.open("get",y().href,!0),q.onreadystatechange=
t(function(){if(4==q.readyState){var a=q.getResponseHeader("content-type")||"";u&&-1===a.indexOf("charset=")&&(a=x);k.sendContent(q.responseText,a,e,za,Aa)}},"updatePage.1"),q.overrideMimeType&&u&&q.overrideMimeType(x),q.send(null));return!0},"uploadPage")}return{start:function(){oa.activate()},stop:function(){oa.clear();k.un(g,"mousemove",x);k.un(g,"click,dblclick,mousedown",ja);k.un(g,"mouseup",u);k.un(g,"mousewheel,wheel",Fa);k.un(h,"scroll",F);k.un(h,"beforeunload",ba);k.un(h,"unload",ba);k.un(h,
"resize",pa);k.un(g,"keydown",Ta);k.un(g,"keypress",Ua);k.un(g,"copy",Da);k.un(g,"touchmove,touchstart",Xa);g.body&&k.un(g,"mouseleave",ca);k.un(g,"focusin",Va);k.un(g,"focusout",Wa);k.un(h,"focus",Ea);k.un(h,"blur",ra);k.un(g,"blur",ra);g.removeEventListener?(k.un(g,"scroll",Qa),k.un(g,"focus",wa),k.un(g,"blur",xa),k.un(g,"change",ya),k.un(g,"submit",sa)):g.detachEvent&&(k.un(g,"focusin",wa),k.un(g,"focusout",xa),function(){for(var a=g.getElementsByTagName("form"),b=0;b<a.length;b++){for(var c=a[b].getElementsByTagName("*"),
d=0;d<c.length;d++)/^INPUT|SELECT|TEXTAREA$/.test(c[d].tagName)&&k.un(c[d],"change",ya);k.un(a[b],"submit",sa)}}());(function(){for(var a=g.getElementsByTagName("form"),b=0;b<a.length;b++)a[b][Ba]&&(a[b].submit=a[b][Ba])})()},uploadPages:function(a,b){function c(){k.un(g,"DOMContentLoaded",c);k.un(h,"load",c);for(var e=a.split(/\n/),f=y().href,q=/regexp:/,u=0;u<e.length;u++){var x=e[u];if(x)if(q.test(x)){x=Ia(x.replace(q,""));try{var I=new RegExp(x)}catch(m){}if(I&&I.test(f)){d.uploadPage(b);break}}else if(-1!==
f.indexOf(x)){d.uploadPage(b);break}}}"complete"==g.readyState?c():(k.on(g,"DOMContentLoaded",c),k.on(h,"load",c))}}}var pb=!ga(/webkit/)&&ga(/gecko/),l={getDocumentCharset:function(){return(""+(g.characterSet||g.charset||"")).toLowerCase()},getDocumentHTML:function(){var a="",b="",a=g.documentElement,c=a.outerHTML;if(c)a=c;else{for(var c=a.attributes,e="",d=0;d<c.length;d++){var f=c[d];f&&(e+=" "+f.name+'="'+(f.value||"")+'"')}a="<html"+e+">"+a.innerHTML+"</html>"}(c=g.doctype)&&(b="<!DOCTYPE "+
c.name+(c.publicId?' PUBLIC "'+c.publicId+'"':"")+(c.systemId?' "'+c.systemId+'"':"")+">\n");return b+a},getRootElement:function(){var a=g.documentElement;return"CSS1Compat"==g.compatMode?a:g.body||a},getViewportSize:function(){var a=l.getRootElement();return[a.clientWidth,a.clientHeight]},getDocumentSize:function(){var a=l.getRootElement(),b=l.getViewportSize();return[Math.max(a.scrollWidth,b[0]),Math.max(a.scrollHeight,b[1])]},getDocumentScroll:function(){return[h.pageXOffset||g.documentElement&&
g.documentElement.scrollLeft||g.body&&g.body.scrollLeft||0,h.pageYOffset||g.documentElement&&g.documentElement.scrollTop||g.body&&g.body.scrollTop||0]},getElementXY:function(a){if(!a||!a.ownerDocument||"PARAM"==a.tagName||a==g.body||a==g.documentElement)return[0,0];if(a.getBoundingClientRect){a=a.getBoundingClientRect();var b=l.getDocumentScroll();return[Math.round(a.left+b[0]),Math.round(a.top+b[1])]}for(var c=b=0;a;)b+=a.offsetLeft,c+=a.offsetTop,a=a.offsetParent;return[b,c]},getElementParent:function(a){var b;
if(!a||a==g.documentElement)return null;if(a==g.body)return g.documentElement;b=null;try{b=a.parentNode}catch(c){}return b}},f={isArray:function(a){return"function"==typeof Array.isArray?Array.isArray(a):"[object Array]"==Object.prototype.toString.call(a)},mergeArrays:function(a){for(var b=1;b<arguments.length;b++)if(f.isArray(arguments[b]))for(var c=0;c<arguments[b].length;c++)a[a.length]=arguments[b][c];return a}};l.getElementChildren=function(a,b){var c=[];if(a){var e=a.childNodes;if(e)for(var d=
0,h=e.length;d<h;d++){var g=e[d];"INPUT"==g.nodeName&&g.type&&"hidden"==g.type.toLocaleLowerCase()||b&&g.nodeName!=b||f.mergeArrays(c,[g])}}return c};l.getElementNeighborPosition=function(a){var b=l.getElementParent(a);if(b)for(var c=0,b=b.childNodes,e,d=a&&a.nodeName,f=0;f<b.length;f++)if(e=b[f]&&b[f].nodeName,d==e){if(a==b[f])return c;c++}return 0};l.getElementSize=function(a){if(a==g.body||a==g.documentElement)return l.getDocumentSize();var b=a.getBoundingClientRect&&a.getBoundingClientRect();
return b?[b.width,b.height]:[a.offsetWidth,a.offsetHeight]};l.getElementRegion=function(a){var b=l.getElementXY(a);a=l.getElementSize(a);return[b[0],b[1],a[0],a[1]]};f.fletcher=function(a){for(var b=a.length,c=0,e=255,d=255;b;){var f=21<b?21:b,b=b-f;do{var h="string"==typeof a?a.charCodeAt(c):a[c];c++;if(255<h)var g=h>>8,h=h&255,h=h^g;e+=h;d+=e}while(--f);e=(e&255)+(e>>8);d=(d&255)+(d>>8)}a=(e&255)+(e>>8)<<8|(d&255)+(d>>8);return 65535==a?0:a};l.calcTextChecksum=function(a){var b="";a=a.childNodes;
for(var c=0,e=a.length;c<e;c++)a[c]&&3==a[c].nodeType&&(b+=a[c].nodeValue);return f.fletcher(b.replace(/[\u0000-\u0020]+/g,""))};l.calcAttribChecksum=function(a){var b="",c="width height align title alt name".split(" ");"IMG"==a.tagName&&(b+=a.src.toLowerCase());"A"==a.tagName&&(b+=a.href.toLowerCase());for(var b=b+String(a.className||"").toLowerCase(),e=0;e<c.length;e++)a.getAttribute&&(b+=String(a.getAttribute(c[e])||"").toLowerCase());return f.fletcher(b.replace(/[\u0000-\u0020]+/g,""))};l.calcChildrenChecksum=
function(a){return f.fletcher((a.innerHTML||"").replace(/(<[^>]*>|[\u0000-\u0020])/g,""))};l.getFormNumber=function(a){for(var b=g.getElementsByTagName("form"),c=0,e=b.length;c<e;c++)if(b[c]==a)return c;return-1};l.classNameExists=function(a,b){try{return(new RegExp("(?:^|\\s)"+b+"(?:\\s|$)")).test(a.className)}catch(c){return!1}};l.isEmptyField=function(a){return"INPUT"==a.nodeName&&"submit"!=a.type&&"image"!=a.type&&"hidden"!=a.type?"radio"==a.type||"checkbox"==a.type?!a.checked:!a.value:"TEXTAREA"==
a.nodeName?!a.value:"SELECT"==a.nodeName?0>a.selectedIndex:!0};l.getElementsByClassName=function(a,b){b=b||g;for(var c=b.getElementsByTagName("*"),e=[],d=0;d<c.length;d++)l.classNameExists(c[d],a)&&e.push(c[d]);return e};l.getDocumentTitle=function(){var a=g.title;"string"!=typeof a&&(a=(a=g.getElementsByTagName("title"))&&a.length?a[0].innerHTML:"");return a};f.mixin=function(a){var b;for(b=1;b<arguments.length;b++)if(arguments[b]){for(var c in arguments[b])arguments[b].hasOwnProperty(c)&&(a[c]=
arguments[b][c]);arguments[b].hasOwnProperty("toString")&&(a.toString=arguments[b].toString)}return a};f.getNativeFunction=function(a,b){b=b||h;var c=b.constructor&&b.constructor.prototype&&b.constructor.prototype[a]||b[a];return c&&"apply"in c?function(){return c.apply(b,arguments)}:function(){}};l.loadScript=function(a){a=f.mixin({type:"text/javascript",charset:"utf-8",async:!0},a);var b=f.getNativeFunction("createElement",g),c=b("script");if(!c)return!1;c.type=a.type;c.charset=a.charset;c.src=
a.src;a.async&&(c.async=!0);try{var e=g.getElementsByTagName("head")[0],d;e||(d=g.getElementsByTagName("html")[0],d.appendChild(b("head")));e.insertBefore(c,e.firstChild);return c}catch(h){return!1}};var G=function(a){a=a||{};f.mixin(this,a);this._initComponent()};G.prototype._initComponent=function(){};G.inherit=function(a){a=a||{};var b="function"==typeof this?this:Object;a.hasOwnProperty("constructor")||(a.constructor=function(){b.apply(this,arguments)});var c=function(){};c.prototype=b.prototype;
a.constructor.prototype=new c;f.mixin(a.constructor.prototype,a);a.constructor.prototype.constructor=a.constructor;a.constructor.superclass=b.prototype;a.constructor.inherit=G.inherit;return a.constructor};var ca={stringify:function(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var e=a[c];if(f.isArray(e))for(var d=0;d<e.length;d++)b.push(encodeURIComponent(c)+"="+encodeURIComponent(String(e[d])));else b.push(encodeURIComponent(c)+"="+encodeURIComponent(String(e)))}return b.join("&")}};f.forEachKey=
function(a,b,c){for(var e in a)a.hasOwnProperty(e)&&b.call(c,e,a[e],a)};f.inArray=function(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return!0;return!1};var J=G.inherit({postParams:[],_buildUrl:function(a,b){return a+(-1<a.indexOf("?")?"&":"?")+ca.stringify(b)},_splitParams:function(a){var b={},c={};f.forEachKey(a,function(a,d){f.inArray(this.postParams,a)?c[a]=d:b[a]=d},this);return{get:b,post:c}}}),z=J.inherit({id:"XHR",method:"POST",withCredentials:!0,request:function(a,b,c,e){if(/[^a-z0-9.:-]/.test(B.host)&&
h.opera&&"function"==typeof h.opera.version){var d=h.opera.version();if("string"==typeof d&&"12"==d.split(".")[0])return c.call(e,!1)}if(h.XMLHttpRequest){var f=new XMLHttpRequest;if("withCredentials"in f){b=this._splitParams(b);a=this._buildUrl(a,b.get);try{f.open(this.method,a,!0)}catch(g){return c.call(e,!1)}f.withCredentials=this.withCredentials;this._setHeaders(f);f.send(this._preparePostParams(b));f.onreadystatechange=function(){4==f.readyState&&c.call(e,200==f.status,f.responseText)};return}}c.call(e,
!1)},setMethod:function(a){this.method=a},_preparePostParams:function(a){return ca.stringify(a.post)},_setHeaders:function(a){a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}}),rb=z.inherit({id:"RawBodyXHR",postParams:["body"],_setHeaders:function(){},_preparePostParams:function(a){return a.post.body||""}}),ka={stringify:function(a){try{return JSON.stringify(a)}catch(b){return"null"}}};f.toJSON=function(a){if(a===aa)return"";if(null===a)return"null";switch(a.constructor){case Boolean:return a.toString();
case Number:return isFinite(a)?a.toString():"null";case String:return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"';case Array:for(var b=[],c=0,e=a.length;c<e;c++)b[b.length]=f.toJSON(a[c]);return"["+b.join(",")+"]";case Object:b=[];for(c in a)a.hasOwnProperty(c)&&a[c]!==aa&&(b[b.length]=f.toJSON(c)+":"+f.toJSON(a[c]));return"{"+b.join(",")+"}";default:ka.stringify(a)}};var S=G.inherit({counterId:"",_initComponent:function(){S.superclass._initComponent.apply(this,
arguments);this._ls=null;try{this._ls=h.localStorage}catch(a){}},set:function(a,b){if(this.isEnabled())try{!b||b&&f.isArray(b)&&!b.length?this.remove(a):this._ls.setItem(this._getLsKey(a),f.toJSON(b))}catch(c){}},get:function(a){if(this.isEnabled())try{return JSON.parse(this._ls.getItem(this._getLsKey(a)))}catch(b){}return null},remove:function(a){if(this.isEnabled())try{this._ls.removeItem(this._getLsKey(a))}catch(b){}},isEnabled:function(){return this._ls&&h.JSON&&"object"==typeof this._ls&&"object"==
typeof h.JSON},getStorageId:function(){var a=this.get("lsid");a||(a=Math.round(Math.random()*new Date),this.set("lsid",a));return a},clearStorageId:function(){this.remove("lsid")},_getLsKey:function(a){return"_ym"+this.counterId+"_"+a}});f.arrayFilter=function(a,b,c){var e=[],d;for(d=0;d<a.length;d++)b.call(c,a[d],d,a)&&e.push(a[d]);return e};f.arrayIndexOf=function(a,b){var c;for(c=0;c<a.length;c++)if(a[c]===b)return c;return-1};f.arrDiff=function(a,b){return f.arrayFilter(a,function(a){return-1===
f.arrayIndexOf(b,a)})};var p={getLanguage:function(){return(h.navigator&&(v.language||v.userLanguage||v.browserLanguage||v.systemLanguage)||"").toLowerCase()}};ka.parse=function(a){try{return JSON.parse(a)}catch(b){return null}};var M=G.inherit({transports:[],postParams:[],dontSendRequests:!1,send:function(a,b,c,e){c=c||function(){};this.dontSendRequests?c.call(e):function q(f){if(f<this.transports.length)try{var h=new this.transports[f]({postParams:this.postParams});h.request(a,b,function(a,b){a?
c.call(e,b):q.call(this,f+1)},this)}catch(g){ua(g,"send by "+(h&&h.id)),q.call(this,f+1)}}.call(this,0)}});J.inherit({id:"beacon",request:function(a,b,c,e){"function"==typeof v.sendBeacon?(b=this._splitParams(b),c.call(e,v.sendBeacon(this._buildUrl(a,b.get),ca.stringify(b.post)))):c.call(e,!1)}});f.random=function(a,b){2>arguments.length&&(b=a,a=0);1>arguments.length&&(b=1073741824);return Math.floor(Math.random()*(b-a))+a};f.setTimeout=function(a,b,c){return f.getNativeFunction("setTimeout")(t(a,
c||"setTimeout"),b)};var H=J.inherit({id:"form",enctype:"application/x-www-form-urlencoded",htmlfileOnly:!1,_initComponent:function(){H.superclass._initComponent.apply(this,arguments);"_htmlfile"in H.prototype||(H.prototype._htmlfile=this._createHtmlfile());this._doc=this._htmlfile||(this.htmlfileOnly?null:g)},request:function(a,b,c,e){var d=this._doc;if(!d)return c.call(e,!1);b=this._splitParams(b);var h="ifr"+f.random(),g=d.createElement("div");g.style.position="absolute";g.style.left="-99999px";
g.style.top="-99999px";var k=['<iframe name="',h,'"></iframe>','<form action="',this._buildUrl(a,b.get),'" method="post" target="',h,'" enctype="',this.enctype,'">'];f.forEachKey(b.post,function(a){f.mergeArrays(k,['<input type="hidden" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="',a,'"/>'])});f.mergeArrays(k,["</form>"]);g.innerHTML=k.join("");d.body.appendChild(g);var l=g.getElementsByTagName("form")[0];f.forEachKey(b.post,function(a,b){l[a].value=b});l.submit();
f.setTimeout(function(){d.body.removeChild(g)},1E4,"TransportForm.request.2");return c.call(e,!0)},_createHtmlfile:function(){try{if(h.ActiveXObject){var a=new ActiveXObject("htmlfile");a.open();a.write("<html><body></body></html>");a.close();return a}}catch(b){}return null}}),K=H.inherit({id:"htmlfile",htmlfileOnly:!0}),N=J.inherit({id:"img",request:function(a,b,c,e){a=this._buildUrl(a,b);b=g.createElement("img");b.onload=t(function(){c.call(e,!0)},"TransportImage.request");b.onerror=t(function(){c.call(e,
!1)},"TransportImage.request");b.src=a}}),W=G.inherit({counterId:"",onlyCurrentDomain:!1,skipPrefix:!1,_initComponent:function(){W.superclass._initComponent.apply(this,arguments);this._domain=null;if(!this.onlyCurrentDomain)for(var a=B.host.split("."),b=2;;)if(b<=a.length){if(this._domain="."+a.slice(-b).join("."),b++,this.isEnabled())break}else{this._domain=null;break}},create:function(a,b,c){a=[this._prepareName(a)+"="+encodeURIComponent(b)];c&&(b=new Date,b.setTime(b.getTime()+6E4*c),a.push("expires="+
b.toGMTString()));this._domain&&a.push("domain="+this._domain);a.push("path=/");try{g.cookie=a.join(";")}catch(e){}},read:function(a){try{var b=g.cookie}catch(c){}return b&&b.match(new RegExp("(?:^|;\\s*)"+this._prepareName(a)+"=([^;]*)"))?decodeURIComponent(RegExp.$1):null},erase:function(a){this.create(a,"",-1)},isEnabled:function(){this.create("metrika_enabled","1",60);var a=!!this.read("metrika_enabled");this.erase("metrika_enabled");return a},_prepareName:function(a){return(this.skipPrefix?"":
"_ym_")+a+(this.counterId?"_"+this.counterId:"")}});W.isEnabled=function(){return(new W({onlyCurrentDomain:!0})).isEnabled()};f.defer=function(a,b,c,e,d){return f.setTimeout(function(){a.apply(c,e||[])},b,d)};var L=M.inherit({protocol:"",host:"mc.yandex.ru",resource:"",counterId:"",counterType:0,retry:!1,transports:[z,N,K],_initComponent:function(){L.superclass._initComponent.apply(this,arguments);this.retry&&(this._storage=new S)},send:function(a,b,c,e){var d=this._registerRequest(a,b);this._sendSavedRequest(d,
a,b,c,e)},_sendSavedRequest:function(a,b,c,e,d){var g=h.Ya._metrika.firstReqStatus;if("process"==g)h.Ya._metrika.firstReqCallbacks=f.mergeArrays(h.Ya._metrika.firstReqCallbacks||[],[[this,arguments]]);else{g||(h.Ya._metrika.firstReqStatus="process");g={};this.counterType&&(g["cnt-class"]=this.counterType);f.mixin(g,b);c.st=Math.round((new Date).getTime()/1E3);c.u=L._userID;var k=[this.protocol,"//",this.host,"/"+this.resource+"/"+this.counterId].join(""),l=[];c&&(f.forEachKey(c,function(a,b){"t"!=
a&&f.mergeArrays(l,[a,b])}),c.t&&f.mergeArrays(l,["t",c.t]));l.length&&(g["browser-info"]=l.join(":"));return L.superclass.send.call(this,k,g,function(){h.Ya._metrika.firstReqStatus="complete";this._unregisterRequest(a);var b=h.Ya._metrika.firstReqCallbacks;h.Ya._metrika.firstReqCallbacks=null;if(b)for(var c=0;c<b.length;c++)b[c][0]._sendSavedRequest.apply(b[c][0],b[c][1]);e&&e.apply(d,arguments)},this)}},_isRetryEnabled:function(){return this.retry&&this._storage&&this._storage.isEnabled()},_registerRequest:function(a,
b){if(this._isRetryEnabled()){b.rqnl=b.rqnl||0;b.rqnl++;for(var c=this._storage.get("retryReqs")||{},e=1;c[e];)e++;c[e]={protocol:this.protocol,host:this.host,resource:this.resource,counterId:this.counterId,counterType:this.counterType,postParams:this.postParams,params:a,browserInfo:b,ghid:Ya._globalMetrikaHitId,time:+new Date};this._storage.set("retryReqs",c);return e}},_unregisterRequest:function(a){if(a&&this._isRetryEnabled()){var b=this._storage.get("retryReqs")||{};b[a]&&(delete b[a],this._storage.set("retryReqs",
b))}}});L.initCookie=function(){var a=new W,b=a.read("uid");b||(b=Math.round((new Date).getTime()/1E3),b=b+""+f.random(),a.create("uid",b,1036800));L._userID=b};L.retransmit=function(){var a=new S,b=a.get("retryReqs")||{};a.remove("retryReqs");f.forEachKey(b,function(a,b){h.Ya._metrika.firstReqStatus||(h.Ya._metrika.firstReqStatus="complete");b.ghid&&b.ghid!=Ya._globalMetrikaHitId&&b.time&&b.time+864E5>+new Date&&2>=b.browserInfo.rqnl&&(new L({protocol:b.protocol,host:b.host,resource:b.resource,counterId:b.counterId,
counterType:b.counterType,postParams:b.postParams||[],retry:!0})).send(b.params,b.browserInfo)})};f.trim=function(a,b){a=String(a).replace(/^\s+|\s+$/g,"");b&&a.length>b&&(a=a.substr(0,b));return a};f.isFunction=function(a){return"function"===typeof a};f.isString=function(a){return"[object String]"==Object.prototype.toString.call(a)};f._playerRegexp=/^.+\.mtproxy\.yandex\.net$/;f.isMetrikaPlayer=function(){return"MetrikaPlayer"==h.name||this._playerRegexp.test(h.location.hostname)};p._silverlightVersion=
"";p.getSilverlightVersion=function(){if(!p._silverlightVersion)if(h.ActiveXObject)try{var a=function(a,b,c,f){for(;a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3]);)b[c]+=f;b[c]-=f},b=new ActiveXObject("AgControl.AgControl"),c=[1,0,0,0];a(b,c,0,1);a(b,c,1,1);a(b,c,2,1E4);a(b,c,2,1E3);a(b,c,2,100);a(b,c,2,10);a(b,c,2,1);a(b,c,3,1);p._silverlightVersion=c.join(".")}catch(e){}else if(a=h.navigator,a=a.plugins&&a.plugins["Silverlight Plug-In"])p._silverlightVersion=a.description;return p._silverlightVersion||
""};p._flashVersion=0;p.getFlashVersion=function(){if(!p._flashVersion){var a=h.navigator;if("undefined"!=typeof a.plugins&&"object"==typeof a.plugins["Shockwave Flash"]){var b=a.plugins["Shockwave Flash"],c=b.version;if((b=b.description)||c)if(a=a.mimeTypes,"undefined"==typeof a||!a["application/x-shockwave-flash"]||a["application/x-shockwave-flash"].enabledPlugin)c?p._flashVersion=c:b&&(p._flashVersion=b.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,"."))}else if("undefined"!=typeof h.ActiveXObject)try{if(c=
new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))if(b=c.GetVariable("$version"))p._flashVersion=b.split(" ")[1].replace(/,/g,".").replace(/[^.\d]/g,"")}catch(e){}}return p._flashVersion};p.getJavaEnabled=function(){try{return v.javaEnabled()}catch(a){return!1}};p.getNotificationPermission=function(){var a;try{a=Notification.permission}catch(b){}switch(a){case "denied":return 1;case "granted":return 2}};p.isIframe=function(){try{return h.top!=h.self}catch(a){return!1}};f.fnv32a=function(a){for(var b=
2166136261,c=0,e=a.length;c<e;++c)b^=a.charCodeAt(c),b+=(b<<1)+(b<<4)+(b<<7)+(b<<8)+(b<<24);return b>>>0};p.getFingerPrint=function(){var a=[];if(v.plugins&&v.plugins.length)for(var b=0;b<v.plugins.length;b++){var c=v.plugins[b];f.mergeArrays(a,[c.name,c.version,c.description,c.filename])}if(v.mimeTypes&&v.mimeTypes.length)for(b=0;b<v.mimeTypes.length;b++)c=v.mimeTypes[b],f.mergeArrays(a,[c.type,c.description,c.suffixes]);return f.fnv32a(a.join(";"))+"01"};p._nMap={other:"0",none:"1",unknown:"2",
wifi:"3",ethernet:"4",bluetooth:"5",cellular:"6",wimax:"7"};p.netType=function(){var a=(v.connection||{type:""}).type;return p._nMap[a]||a};p.isSafari=function(){try{return v.vendor&&-1<v.vendor.indexOf("Apple")&&v.userAgent&&!v.userAgent.match("CriOS")}catch(a){}return!1};var sb={url:"https://mc.yandex.ru/metrika/",_value:null,_storage:null,getVal:function(){var a;if(null!==this._value&&this._value!==aa)return this._value;this._storage||(this._storage=new W);if(a=this._storage.read("isad"))return this._set(a),
this._value;this._getReqStatus()||this._send();return null},_set:function(a){var b=null;"1"==a?b="1":"2"==a&&(b="2");this._value=b},_send:function(){var a=g.createElement("img"),b=this;a.onload=function(){b._saveReq(!1);this.parentNode&&this.parentNode.removeChild(this)};a.onerror=function(){b._saveReq(!0);this.parentNode&&this.parentNode.removeChild(this)};this._setReqStatus("process");a.src=this.url+String.fromCharCode(97,100,118,101,114,116,46,103,105,102);p.isSafari()&&(a.style.position="absolute",
a.style.visibility="hidden",a.style.width="0px",a.style.height="0px",l.getRootElement().appendChild(a))},_saveReq:function(a){this._value=a=a?"1":"2";this._setReqStatus("complete");this._storage.create("isad",a,1200)},_setReqStatus:function(a){try{h.Ya._metrika.adStatus=a}catch(b){}},_getReqStatus:function(){try{return h.Ya._metrika.adStatus}catch(a){return"complete"}}},da=L.inherit({hitId:0,trackHash:!1,trimParams:!1,webvisor:!1,counter:null,counterNum:0,resource:"watch",retry:!0,postParams:["site-info"],
countersNoTitle:"22836271 1143050 29626870 9928105 26128362 29850769".split(" "),fake:!1,sendTitle:!0,_initComponent:function(){da.superclass._initComponent.apply(this,arguments);this._trackHash=this.trackHash;"0"===""+this.counterType&&(this.sendTitle=-1===f.arrayIndexOf(this.countersNoTitle,""+this.counterId))},setTrackHash:function(a){this._trackHash=a},sendHit:function(a){this._hitExt({url:a.url,title:a.title,referrer:a.referrer,vParams:a.vParams,modes:{ar:!0,saveRef:!0,pv:!0},callback:a.callback,
ctx:a.ctx})},sendExperiments:function(a){this._hitExt({url:y().href,title:"",referrer:"",modes:{ex:!0,ar:!0},experiments:a.experiments,callback:a.callback,ctx:a.ctx})},sendPrerenderHit:function(a){this._hitExt({url:a.url,title:a.title,referrer:a.referrer,modes:{ar:!0,pq:!0}})},sendAjaxHit:function(a){this._hitExt({url:a.url,title:a.title,referrer:a.referrer,modes:a.modes})},sendParams:function(a,b,c){this._hitExt({url:y().href,title:"",referrer:"",vParams:a,modes:{ar:!0,pa:!0,onlyData:!0},callback:b,
ctx:c})},sendGoal:function(a,b){if(!/[\/&=?#]/.test(a)){var c=a?"goal://"+y().hostname+"/"+encodeURIComponent(a):y().href,e=l.getDocumentTitle(),d=a?y().href:g.referrer;this._hitExt({url:c,title:e,referrer:d,vParams:b.vParams,modes:{ar:!0},callback:b.callback,ctx:b.ctx})}},sendClickLink:function(a){this._hitExt({url:a.url,title:a.title,referrer:y().href,modes:a.modes})},sendExtLink:function(a){this._hitExt({url:a.url,title:a.title||"",referrer:y().href,vParams:a.vParams,modes:{ar:!0,ln:!0,ut:la},
callback:a.callback,ctx:a.ctx})},sendFileUpload:function(a){this._hitExt({url:a.url,title:a.title||"",referrer:y().href,vParams:a.vParams,modes:{ar:!0,ln:!0,dl:!0},callback:a.callback,ctx:a.ctx})},sendNotBounce:function(a,b){this._hitExt({url:y().href,title:"",referrer:"",modes:{cl:a,ar:!0,nb:!0,onlyData:!0},callback:b.callback,ctx:b.ctx})},_hitExt:function(a){function b(a,b){b&&(k[a]=b)}if(!f.isMetrikaPlayer()){var c=a.modes||{},e=a.browserInfo||{},d,h="undefined"!=typeof a.referrer?a.referrer:ma.lastReferrer,
g=a.url||"",k={};c.ar&&!c.onlyData&&(h=null===h||""===h?"":this._prepareHitUrl(h),g=this._prepareHitUrl(a.url));b("page-ref",f.trim(h,Y));b("page-url",f.trim(g,Y));Ja()?b("ut",la):"undefined"!=typeof c.ut&&b("ut",f.trim(c.ut,tb));a.experiments&&(e.exs=a.experiments);if(a.vParams)if(g=f.toJSON(a.vParams),this.trimParams&&g.length>ub)var l=!0;else b("site-info",g);c.saveRef&&(ma.lastReferrer=h);this.fake||(d=this._getTechInfo(a.title,c,this.counterId,a.ts,a.tz,this._trackHash,this.hitId,this.webvisor,
this.counter));f.mixin(e,d);this.send(k,e,function(){l&&this.counter.params(a.vParams);a.userParams&&this.counter.userParams(a.userParams);f.isFunction(a.callback)&&a.callback.apply(a.ctx,arguments)},this)}},_prepareHitUrl:function(a){var b=y(),c=b.host,b=b.href,e;if(!f.isString(a))return b;if(-1!=a.search(/^\w+:\/\//))return a;e=a.charAt(0);if("?"==e)return e=b.search(/\?/),-1==e?b+a:b.substr(0,e)+a;if("#"==e)return e=b.search(/#/),-1==e?b+a:b.substr(0,e)+a;if("/"==e){if(e=b.search(c),-1!=e)return b.substr(0,
e+c.length)+a}else return c=b.split("/"),c[c.length-1]=a,c.join("/");return a},_getTechInfo:function(a,b,c,e,d,g,k,A,R){function m(a,b){a&&b&&(t[a]=b)}function n(a){b[a]&&m(a,"1")}b=b||{};var t={};e=e||X.getTimestamp();d=d||X.getTimezone();m("j",p.getJavaEnabled()?"1":"");m("nt",p.netType());P&&m("s",P.width+"x"+P.height+"x"+(P.colorDepth||P.pixelDepth));h.devicePixelRatio&&m("sk",h.devicePixelRatio);p.isIframe()&&m("ifr","1");m("adb",sb.getVal());m("f",p.getFlashVersion());m("l",p.getSilverlightVersion());
m("fpr",p.getFingerPrint());m("cn",this.counterNum);if(!b.pa){var y=l.getViewportSize();m("w",y[0]+"x"+y[1])}m("z",d);m("i",e);m("et",Math.round((new Date).getTime()/1E3));m("en",l.getDocumentCharset());m("v",Q);m("c",v.cookieEnabled?"1":"");m("la",p.getLanguage());m("ntf",p.getNotificationPermission());g&&m("wh","1");d="ar ln dl ad nb pa pq pv ex".split(" ");for(e=0;e<d.length;e++)n(d[e]);d=["va","vt","sn","sa","he"];b.nb&&d.push("cl");for(e=0;e<d.length;e++)g=d[e],m(g,b[g]);c=new S({counterId:c});
c.isEnabled()&&(e=c.getStorageId(),(d=c.get("reqNum"))?d++:d=1,c.set("reqNum",d),c.get("reqNum")==d?(m("ls",e),m("rqn",d)):(c.remove("reqNum"),c.clearStorageId(),1<d&&(m("ls",e),m("rqn",0))));m("rn",f.random());m("hid",k);m("ds",jb(R));R._firstPaint||(R._firstPaint=kb(),m("fp",R._firstPaint));if(A){h.name||(h.name=Math.round(65535*Math.random()));if(k=+h.name)0>k&&(k*=-1),k%=65535;m("wn",k||f.fletcher(h.name));try{h.history&&m("hl",String(h.history.length))}catch(B){}}k="";this.sendTitle&&(k=this._getTitle(a));
m("t",k);return t},_getTitle:function(a){var b="";b="undefined"==typeof a?(b=l.getDocumentTitle())?f.trim(b,$a):"":f.trim(a,$a);return b}}),J=J.inherit({id:"script",request:function(a,b,c,e){var d,k=f.getNativeFunction("createElement",g)("script");if(!k)return c.call(e,!1),!1;d="_ymjsp"+f.random();h[d]=t(function(a){try{delete h[d]}catch(b){h[d]=aa}c.call(e,!0,a);k.parentNode&&k.parentNode.removeChild(k)},"transport.script");k.type="text/javascript";k.src=this._buildUrl(a,f.mixin({wmode:5,callback:d},
b));a=g.getElementsByTagName("head")[0];a.insertBefore(k,a.firstChild);return!0}}),na={encode:function(a){for(var b=[],c=0,e=a.length;c<e;c++){var d=a.charCodeAt(c);128>d?b.push(d):(127<d&&2048>d?b.push(d>>6|192):(b.push(d>>12|224),b.push(d>>6&63|128)),b.push(d&63|128))}return b},decode:function(a){for(var b="",c=0,e=0,d=0,f=0;c<a.length;)e=a.charCodeAt(c),128>e?(b+=String.fromCharCode(e),c++):191<e&&224>e?(d=a.charCodeAt(c+1),b+=String.fromCharCode((e&31)<<6|d&63),c+=2):(d=a.charCodeAt(c+1),f=a.charCodeAt(c+
2),b+=String.fromCharCode((e&15)<<12|(d&63)<<6|f&63),c+=3);return b}},V={abc:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",tail:"+/=",tailSafe:"*-_",encode:function(a,b){for(var c=(this.abc+(b?this.tailSafe:this.tail)).split(""),e=a.length,d=[],h=e-e%3,g,k=0;k<h;k+=3)g=(a[k]<<16)+(a[k+1]<<8)+a[k+2],f.mergeArrays(d,[c[g>>18&63],c[g>>12&63],c[g>>6&63],c[g&63]]);switch(e-h){case 1:g=a[h]<<4;f.mergeArrays(d,[c[g>>6&63],c[g&63],c[64],c[64]]);break;case 2:g=(a[h]<<10)+(a[h+1]<<2),f.mergeArrays(d,
[c[g>>12&63],c[g>>6&63],c[g&63],c[64]])}return d.join("")},decode:function(a,b){for(;a.length%4;)a+="=";var c=this.abc+(b?this.tailSafe:this.tail),e,d,f,g,h,k=0,m="";do{e=c.indexOf(a.charAt(k++));d=c.indexOf(a.charAt(k++));g=c.indexOf(a.charAt(k++));h=c.indexOf(a.charAt(k++));if(0>e||0>d||0>g||0>h)return null;f=e<<18|d<<12|g<<6|h;e=f>>16&255;d=f>>8&255;f&=255;m=64==g?m+String.fromCharCode(e):64==h?m+String.fromCharCode(e,d):m+String.fromCharCode(e,d,f)}while(k<a.length);return na.decode(m)}},Ga=da.inherit({transports:[J],
trimParams:!0,_initComponent:function(){Ga.superclass._initComponent.apply(this,arguments);this._ilStorage=new S({counterId:this.counterId})},sendHit:function(a){var b={},c=this._ilStorage.get("il");a.visitColor&&(b.vc=a.visitColor);a.hasPrerender&&(b.pr=1);c&&(this._ilStorage.remove("il"),b.ilt=V.encode(na.encode(f.trim(c,ab))));this._hitExt({url:a.url,title:a.title,referrer:a.referrer,vParams:a.vParams,userParams:a.userParams,experiments:a.experiments,modes:a.modes,browserInfo:b,ts:a.ts,tz:a.tz,
callback:a.callback,ctx:a.ctx})}}),vb=G.inherit({cid:3,cnt:0,_initComponent:function(){this._storage=new S},hit:function(a){var b=this,c=this._storage.get("wasSynced");c&&c.time+864E5>+new Date||h.Ya._metrika.fakeHit?a():(h.Ya._metrika.fakeHit=!0,this._getSender().sendHit({callback:function(){b._storage.set("wasSynced",{time:+new Date});a()}}))},_getSender:function(){this._sender||(this._sender=new Ga({protocol:"https:",counterType:this.cnt,counterId:this.cid,sendTitle:!1,dontSendRequests:this.dontSendRequests,
fake:!0}));return this._sender}}),wb=G.inherit({baseUrl:"https://mc.yandex.",baseTld:"ru",syncTlds:["ua","by","kz","com.tr"],langToDomain:{uk:"ua",be:"by",tr:"com.tr",kk:"kz"},sync:function(a){var b=this,c=this._need();!this._is()&&c?(this._setStatus(!0),Ja()?this._getCn().hit(function(){b._sync(c,a)}):a(function(){b._sync(c)})):a()},_is:function(){try{return!!h.Ya._metrika.startSync}catch(a){return!1}},_setStatus:function(a){try{h.Ya._metrika.startSync=a}catch(b){}},_need:function(){var a=this._getDomainByLang(),
b=this._getTld(),c,e=[];-1!=f.arrayIndexOf(this.syncTlds,a)&&e.push(a);-1!=f.arrayIndexOf(this.syncTlds,b)&&-1==f.arrayIndexOf(e,b)&&e.push(b);c=this._getLs().get("synced")||{};e=f.arrayFilter(e,function(a){return(c[a]||1)+864E5<+new Date});return e.length&&e||!1},_sync:function(a,b){var c,e,d=this;a.length?(e=new rb({method:"GET"}),b=b||function(){},e.request(this.baseUrl+this.baseTld+"/sync_cookie_get",null,function(g,h){var k,l,m,n=0,p=0,t;if(g){k=ka.parse(h);try{l=k.sync_token,t=k.sync_ok}catch(v){return b(),
!1}e.setMethod("POST");c=f.arrDiff(a,t);if(n=c.length)for(m=d._getLs(),k=0;k<c.length;k++)(function(a){e.request(d.baseUrl+a+"/sync_cookie_decide",{body:l},function(c,f){c?e.request(d.baseUrl+d.baseTld+"/sync_cookie_decide_ok",{body:f},function(c){p++;n===p&&b();c&&(c=m.get("synced")||{},c[a]=+new Date,m.set("synced",c))}):(p++,n===p&&b())})})(c[k]);else b()}else b()})):b()},_getCn:function(){this._cn||(this._cn=new vb({fake:!0,dontSendRequests:this.dontSendRequests}));return this._cn},_getLs:function(){this._ls||
(this._ls=new S);return this._ls},_getTld:function(){var a=B.hostname.split("."),a=a[a.length-1];return{tr:"com.tr","\u0443\u043a\u0440":"ua","xn--j1amh":"ua","\u0431\u0435\u043b":"by","xn--90ais":"by"}[a]||a},_getDomainByLang:function(){var a;if(!h.navigator)return"ru";try{a=v.languages?v.languages[0]:p.getLanguage()}catch(b){}a=(a||"").toLowerCase().split("-")[0];return this.langToDomain[a]||"ru"}}),D={getPos:function(a){var b=l.getRootElement(),c=l.getDocumentScroll();return[a.pageX||a.clientX+
c[0]-(b.clientLeft||0)||0,a.pageY||a.clientY+c[1]-(b.clientTop||0)||0]},getTarget:function(a){var b=null;try{(b=a.target||a.srcElement)&&!b.ownerDocument&&b.documentElement&&(b=b.documentElement)}catch(c){}return b},getMouseButton:function(a){return a.which||a.button==aa?a.which:a.button&1?1:a.button&2?3:a.button&4?2:0},prevent:function(a){a=a||h.event;a.preventDefault?a.preventDefault():a.returnValue=!1}};D.dispatchCustomEvent=t(function(a,b){var c;b=b||g;c=f.getNativeFunction("createEvent",g)("Event");
c.initEvent(a,!1,!1);f.getNativeFunction("dispatchEvent",b)(c)},"evt.dispatch");var k=G.inherit({_initComponent:function(){k.superclass._initComponent.apply(this,arguments);this._listeners=[]},on:function(a,b,c,e,d){d=5>arguments.length?!0:!!d;for(var f=b.split(","),g=0;g<f.length;g++){var k=f[g],l=t(function(a){c.call(e||this,a||h.event)},"on"+k);this._listeners[this._listeners.length]=[a,k,c,e,d,l];a.addEventListener?a.addEventListener(k,l,d):a.attachEvent&&a.attachEvent("on"+k,l)}},un:function(a,
b,c,e,d){d=5>arguments.length?!0:!!d;for(var f=b.split(","),g=0;g<f.length;g++)for(var h=f[g],k=0;k<this._listeners.length;k++){var l=this._listeners[k];if(l[0]==a&&l[1]==h&&l[2]==c&&l[3]==e&&l[4]==d){this._listeners.splice(k,1);this._removeListener(a,h,l[5],d);return}}},unAll:function(){for(var a=0;a<this._listeners.length;a++){var b=this._listeners[a];this._removeListener(b[0],b[1],b[5],b[4])}this._listeners.length=0},_removeListener:function(a,b,c,e){a.removeEventListener?a.removeEventListener(b,
c,e):a.detachEvent&&a.detachEvent("on"+b,c)}});k.on=function(a,b,c,e,d){k._instance||(k._instance=new k);k._instance.on.apply(k._instance,arguments)};k.un=function(a,b,c,e,d){k._instance&&k._instance.un.apply(k._instance,arguments)};var ma={lastReferrer:null},qb=L.inherit({resource:"webvisor",transports:[z,H],postParams:["wv-data"],sendContent:function(a,b,c,e,d,f,g){if(!a)return!1;-1<a.indexOf("\r")&&(a=a.replace(/\r\n/g,"\n"));a={"wv-type":1,"page-url":y().href,"wv-hit":c,"wv-data":V.encode(na.encode(a))};
return 245E3<a["wv-data"].length?!1:this.send(a,{z:e,i:d,pct:b||""},f,g)}});f.throttle=function(a,b,c,e){var d,g,h;return function(){g=arguments;h=this;d||function(){d=null;g&&(a.apply(c||h,g),g=null,d=f.setTimeout(arguments.callee,b,e))}()}};var bb=G.inherit({storage:null,storageKey:"dataBuffer",maxBufferSize:255,flushTimeout:1E4,active:!0,meta:null,onFlush:function(){},onFlushCtx:null,bufferExpireTime:864E5,_initComponent:function(){bb.superclass._initComponent.apply(this,arguments);this._data=
[];this._packetNumber=0;this._flushTID=null;this._saveToStorageThrottled=f.throttle(this._saveToStorage,300,this,"DataBuffer._saveToStorage");if(this.storage){var a=this.storage.get(this.storageKey);a&&a.data&&a.meta&&a.time&&a.time+this.bufferExpireTime>+new Date&&this.onFlush.call(this.onFlushCtx||this,a.data,a.meta,a.pnum);this.clear()}},append:function(a,b){f.mergeArrays(this._data,a);this._saveToStorageThrottled();this.active&&((b||this._data.length>=this.maxBufferSize)&&this._flush(),this._flushTID||
(this._flushTID=f.defer(this._flush,this.flushTimeout,this,[],"DataBuffer._flush")))},activate:function(){this.active||(this.active=!0,this.append([]))},clear:function(){this._data.length=0;this._flushTID=null;this.storage&&this.storage.remove(this.storageKey)},_flush:function(){this.onFlush.call(this.onFlushCtx||this,this._data,this.meta,this._packetNumber);this._packetNumber++;this.clear()},_saveToStorage:function(){this.storage&&this._data.length&&this.storage.set(this.storageKey,{data:this._data,
meta:this.meta,pnum:this._packetNumber,time:+new Date})}});f.array2Props=function(a){for(var b=a.length,c={},e=c,d=0;d<b-1;d++){var f=a[d];e[f]={};d<b-2&&(e=e[f])}e[f]=a[b-1];return c};var T=G.inherit({sampling:1,counterId:26302566,_initComponent:function(){T.superclass._initComponent.apply(this,arguments);this._sender=new da({protocol:"https:",counterId:this.counterId,retry:!1,counter:{}})},log:function(){this.logParams(f.array2Props(arguments))},logParams:function(a){Math.random()<this.sampling&&
this._sender.sendHit({url:B.href,title:"",referrer:"",vParams:a})}}),xb=L.inherit({resource:"webvisor",retry:!0,postParams:["wv-data"],sendPacket:function(a,b,c,e,d,g,k,l){if(!a||!a.length)return!1;var p=V.encode(a,!0);0==p.indexOf("AAAAAAAAADw")&&h.Error&&"string"==typeof Error().stack&&(new T({sampling:.1})).log("bad visor packet 5",1);a={rn:f.random(),"page-url":b,wmode:0,"wv-type":0,"wv-hit":c,"wv-part":e+1,"wv-check":f.fletcher(a),"wv-data":p};return this.send(a,{z:d,i:g},k,l)}}),Za=bb.inherit({protocol:"",
counterId:"",counterType:"",meta:null,maxBufferSize:7500,flushTimeout:3E4,storageKey:"visorbuff",active:!1,_initComponent:function(){this.storage=new S({counterId:this.counterId});this._sender=new xb({protocol:this.protocol,counterId:this.counterId,counterType:this.counterType});Za.superclass._initComponent.apply(this,arguments)},onFlush:function(a,b,c){this._sender.sendPacket(a,b.url,b.hitId,c,b.timezone,b.timestamp)}});f.isObject=function(a){try{return a&&null!==a&&"[object Object]"==Object.prototype.toString.call(a)}catch(b){return!1}};
f.isNumber=function(a){return isFinite(a)&&!isNaN(a)&&"[object Number]"==Object.prototype.toString.call(a)};f.clearTimeout=function(a){return f.getNativeFunction("clearTimeout")(a)};f._urlParser=null;f.parseUrl=function(a){if(!this._urlParser)try{this._urlParser=g.createElement("a")}catch(b){}return this._urlParser?(this._urlParser.href=a,{protocol:this._urlParser.protocol,host:this._urlParser.host,port:this._urlParser.port,hostname:this._urlParser.hostname,hash:this._urlParser.hash,search:this._urlParser.search,
query:this._urlParser.search.replace(/^\?/,""),pathname:this._urlParser.pathname||"/",path:(this._urlParser.pathname||"/")+this._urlParser.search,href:this._urlParser.href}):{}};p.isIE=function(){return g&&!g.addEventListener||!1};var Z={};Z._cookie=new W({onlyCurrentDomain:!0});Z.log=t(function(){var a=-1<B.href.indexOf("_ym_debug=1")||h._ym_debug;a&&this._cookie.create("debug","1");h.console&&console.log&&(a||"1"===this._cookie.read("debug"))&&console.log.apply(console,arguments)},"DebugConsole.log");
var yb=L.inherit({resource:"clmap",retry:!0,transports:[N],sendClick:function(a,b,c,e){this.send({"page-url":a,"pointer-click":b},{},c,e)}}),zb=G.inherit({filter:null,ignoreTags:[],quota:0,isTrackHash:!1,protocol:"",counterId:0,counterType:0,startTime:0,dontSendRequests:!1,MAX_LEN_PATH:128,TIMEOUT_CLICK:50,TIMEOUT_SAME_CLICKS:1E3,DELTA_SAME_CLICKS:2,tags:"A B BIG BODY BUTTON DD DIV DL DT EM FIELDSET FORM H1 H2 H3 H4 H5 H6 HR I IMG INPUT LI OL P PRE SELECT SMALL SPAN STRONG SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TR U UL ABBR AREA BLOCKQUOTE CAPTION CENTER CITE CODE CANVAS DFN EMBED FONT INS KBD LEGEND LABEL MAP OBJECT Q S SAMP STRIKE TT ARTICLE AUDIO ASIDE FOOTER HEADER MENU METER NAV PROGRESS SECTION TIME VIDEO NOINDEX NOBR MAIN".split(" "),
_initComponent:function(){this._lastClick=null;this.hasQuota=!!this.quota;this._quota=this.quota;this._ignoreTags=[];if(this.ignoreTags)for(var a=0;a<this.ignoreTags.length;a++)this.ignoreTags[a]&&f.mergeArrays(this._ignoreTags,[String(this.ignoreTags[a]).toUpperCase()]);this._cacheTags={};for(var a=59,b=String.fromCharCode,c=0;c<this.tags.length;c++)this._cacheTags[this.tags[c]]=b(a),b(a),a++;this._sender=new yb({dontSendRequests:this.dontSendRequests,protocol:this.protocol,counterId:this.counterId,
counterType:this.counterType});this._start=!1;this.start()},destroy:function(){this.stop()},start:function(){if(!this._start)k.on(g,"click",this._handler,this);this._start=!0},stop:function(){this._start&&k.un(g,"click",this._handler,this);this._start=!1},setTrackHash:function(a){this.isTrackHash=a},_isIgnore:function(a){return l.classNameExists(a,"(ym-disable-clickmap|ym-clickmap-ignore)")},_handler:function(a){a={el:D.getTarget(a),pos:D.getPos(a),button:D.getMouseButton(a),time:+new Date};if(this._isTrackingClick(a)){var b=
l.getElementSize(a.el),c=l.getElementXY(a.el),b=["rn",f.random(),"x",Math.floor(65535*(a.pos[0]-c[0])/(b[0]||1)),"y",Math.floor(65535*(a.pos[1]-c[1])/(b[1]||1)),"t",Math.floor((a.time-this.startTime)/100),"p",this._getElPath(a.el)],c=y().href;this.isTrackHash?f.mergeArrays(b,["wh","1"]):c=c.split("#")[0];this._sender.sendClick(f.trim(c,Y),b.join(":"));this._lastClick=a}},_isTrackingClick:function(a){if(h.ymDisabledClickmap||f.isMetrikaPlayer()||!a.el)return!1;var b=a.el.tagName;if((2==a.button||3==
a.button)&&"A"!=b||this.filter&&!this.filter(a.el,b))return!1;for(var c=0;c<this._ignoreTags.length;c++)if(this._ignoreTags[c]==b)return!1;for(b=a.el;b;){if(this._isIgnore(b))return!1;b=b.parentNode}if(this._lastClick){if(a.time-this._lastClick.time<this.TIMEOUT_CLICK)return!1;var b=Math.abs(this._lastClick.pos[0]-a.pos[0]),c=Math.abs(this._lastClick.pos[1]-a.pos[1]),e=a.time-this._lastClick.time;if(this._lastClick.el==a.el&&b<this.DELTA_SAME_CLICKS&&c<this.DELTA_SAME_CLICKS&&e<this.TIMEOUT_SAME_CLICKS)return!1}if(this.hasQuota){if(!this._quota)return!1;
this._quota--}return!0},_getElPath:function(a){for(var b="";a&&a.parentNode&&"BODY"!=a.tagName&&"HTML"!=a.tagName;)b+=this._cacheTags[a.tagName]||"*",b+=l.getElementNeighborPosition(a)||"",a=a.parentNode;return f.trim(b,this.MAX_LEN_PATH)}}),cb=G.inherit({_initComponent:function(){cb.superclass._initComponent.apply(this,arguments);this._executedMsgs={};k.on(h,"message",this._onMessage,this)},_isAllowedLang:function(a){return-1!==f.arrayIndexOf(["ru","uk","en","tr"],a)},_isAllowedOrigin:function(a){return/^http:\/\/(.+\.)?webvisor\.com\/?$/.test(a)},
_isAllowedStatic:function(a){return/^https?:\/\/(((.+\.)?dev\.webvisor\.com)|(yastatic\.net))(\/.*)?$/.test(a)},_onMessage:function(a){try{var b=a.origin}catch(c){}b&&this._isAllowedOrigin(b)&&(b=ka.parse(a.data))&&"appendscript"===b.action&&this._isAllowedStatic(b.domain)&&this._isAllowedLang(b.lang)&&!this._executedMsgs[b.id]&&(this._executedMsgs[b.id]=!0,h._ym__postMessageEvent=a,h._ym__inpageMode=b.inpageMode,h._ym__initMessage=b.initMessage,l.loadScript({src:b.domain+"/cdn/inpage-remote/inpage-remote."+
b.lang+".js"}))}}),X={};f.pad=function(a){return(10>a?"0":"")+a};X.getTimestamp=function(){for(var a=new Date,a=[a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()],b="",c=0;c<a.length;c++)b+=f.pad(a[c]);return b};X.getTimezone=function(){return-(new Date).getTimezoneOffset()};f.bind=function(a,b){return function(){return a.apply(b||this,arguments)}};var db=G.inherit({counter:null,prefsEcommerce:null,dataLayerName:"dataLayer",_initComponent:function(){var a="customArr";
db.superclass._initComponent.apply(this,arguments);this._overridePush(this.prefsEcommerce)||(f.isString(this.prefsEcommerce)&&(this.dataLayerName=this.prefsEcommerce),a=this.dataLayerName,this._tryTimeout=f.bind(this._tryTimeout,this),this._tryTimeout());this.counter._ecommerce=a},_overridePush:function(a){if(a&&"function"==typeof a.push){var b=this;b._send(a);var c=a.push;a.push=function(){b._send([].slice.call(arguments,0));c.apply(this,arguments)};return!0}return!1},_tryTimeout:function(){this._overridePush(h[this.dataLayerName])||
f.setTimeout(this._tryTimeout,1E3,"dlObserver")},_send:function(a){var b=[],c,e;for(c=0;c<a.length;c++)(e=a[c])&&e.ecommerce&&(b[b.length]=e.ecommerce);b.length&&this.counter.params({__ym:{ecommerce:b}})}});f.safeDecodeURIComponent=function(a){try{return decodeURIComponent(a)}catch(b){return""}};ca.parse=function(a,b){var c={};a=a&&a.replace(/^\?/,"")||"";if(a.length)for(var e=a.split("&"),d=0;d<e.length;d++)if(e[d]){var g=e[d].split("=");if(g[0]){var h=f.safeDecodeURIComponent(g[0]),g=f.safeDecodeURIComponent((g[1]||
"").replace(/\+/g,"%20"));b&&h in c?f.isArray(c[h])?c[h].push(g):c[h]=[c[h],g]:c[h]=g}}return c};var U=[];h.Ya=h.Ya||{};Ya._metrika=Ya._metrika||{};Ya._metrika.counters=Ya._metrika.counters||{};Ya._metrika.hitParam=Ya._metrika.hitParam||{};Ya._metrika.counterNum=Ya._metrika.counterNum||0;Ya._metrika.hitId=Ya._metrika.hitId||f.random();Ya._globalMetrikaHitId=f.random();var B=y(),za=X.getTimezone(),Aa=X.getTimestamp(),v=h.navigator,P=h.screen,Q="ver720".slice(3),tb=64,Y=p.isIE()?512:2048,ub=p.isIE()?
512:2048,$a=p.isIE()?100:400,ab=100,la="noindex",eb=/\.(3gp|7z|aac|ac3|acs|ai|avi|ape|apk|asf|bmp|bz2|cab|cdr|crc32|css|csv|cue|divx|dmg|djvu?|doc(x|m|b)?|emf|eps|exe|flac?|flv|iso|swf|gif|t?gz|jpe?g?|js|m3u8?|m4a|mp(3|4|e?g?)|m4v|md5|mkv|mov|msi|ods|og(g|m|v)|pdf|phps|png|ppt(x|m|b)?|psd|rar|rss|rtf|sea|sfv|sit|sha1|svg|tar|tif?f|torrent|ts|txt|vob|wave?|wma|wmv|wmf|webm|xls(x|m|b)?|xpi|g?zip)$/i,Ab=+new Date,Ha,ea,fa=!!Ya._metrika.oo;Ya._metrika.v=Q;h.Ya.Metrika=function(a,b,c,e){var d=this;return t(function(){function q(u){var x=
!1;if(Ya._metrika.hitParam[H]){if(1!=c||Ya._metrika.counters[H])return!1;x=!0}Ya._metrika.counters[H]=d;Ya._metrika.hitParam[H]=1;d._webvisor=!e&&(w&&w.webvisor||!1);d._directCampaign=w&&w.directCampaign;w&&w.trackHash&&K(!0);if(!e&&!x){d.replacePhones();var F=new W({counterId:a}),n=F.read("visorc");"b"!=n&&"w"!=n&&(n="");if(!F.isEnabled()||ga("opera mini"))n="b";(new wb({dontSendRequests:fa})).sync(function(e){Ha=+new Date;var x=new Ga({protocol:"https:",counterType:c,counterId:a,trackHash:r,hitId:Q,
webvisor:d._webvisor,counter:d,dontSendRequests:fa,counterNum:Y}),m={ut:P,he:w?~~w.httpError:0,ad:1==c&&h.Ya&&h.Ya.Direct,pv:!0,saveRef:!0};x.sendHit({url:B.href,title:l.getDocumentTitle(),referrer:g.referrer,vParams:b,userParams:U,experiments:T,modes:m,visitColor:n,hasPrerender:u,ts:Aa,tz:za,callback:function(c){Z.log("PageView. Counter "+a+". URL: "+B.href+". Referrer: "+g.referrer,". Params: ",b);ea||(ea=+new Date);c=c||{};var u=c.webvisor||{};if(ha){var x=+u.recp;if(!isFinite(x)||0>x||1<x)n="w";
n||(n=Q%1E4/1E4<x?"w":"b");F.create("visorc",n,30);"w"==n?(ha.start(),x=u.arch_type,(u=u.urls)&&x&&"none"!=x&&ha.uploadPages(u,x)):ha.stop()}c=c.mp2;F.erase("mp2_substs");if(c){b:if((u=c.conditions)&&u.length)for(x=0;x<u.length;x++){var l;l=u[x];if("ref"==l.type)l=lb(l);else if("adv"==l.type){var m=l,p=Ya._metrika.counter._directCampaign,q=m.ServiceNamePattern,t=m.RefererPattern;l=p?m.direct_orders:m.direct_camp;for(var v=g.referrer,ba=ca.parse(B.search),y=mb(B.search,B.hash),w={},r=["source","medium",
"campaign","term","content"],z=0;z<r.length;z++)ba["utm_"+r[z]]&&(w[r[z]]=ba["utm_"+r[z]]);z=p?"direct.yandex.ru":y&&y.service||w.source;r=!1;if(!r&&q&&q.length)for(var A=0;A<q.length;A++)if((new RegExp(q[A],"i")).test(z)){r=!0;break}if(!r&&!m.yandex_direct&&t&&t.length)for(q=0;q<t.length;q++)if((new RegExp(t[q],"i")).test(v)){r=!0;break}!r&&m.google_adwords&&ba.gclid&&(r=!0);if(r&&l&&l.length&&(r=!1,m=p||y&&y.campaign||w&&w.campaign))for(p=0;p<l.length;p++)if(l[p]==m){r=!0;break}l=r}else l=!1;if(l){u[x].track_id&&
F.create("mp2_track",u[x].track_id,43200);break b}}u=F.read("mp2_track");c=c.substs&&c.substs[u];u&&c?(F.create("mp2_substs",f.toJSON(c)),c=Na(c),d.params("__ym",c?"mp_trackid":"mp_trackid_bad",u)):Oa()}else Oa();k.on(h,"load",d.replacePhones,d);d._inited=!0;e&&e()}})})}A();w&&(w.enableAll?(v(!0),m(!0),z()):(w.clickmap&&m(w.clickmap),w.trackLinks&&v(w.trackLinks),w.accurateTrackBounce&&z(w.accurateTrackBounce)),(w.ecommerce||w.useDataLayer)&&new db({counter:d,prefsEcommerce:w.ecommerce}),w.triggerEvent&&
fb(function(){D.dispatchCustomEvent("yacounter"+a+"inited")},0));d._webvisor&&!fa&&(ha=new nb("https:",a,c,Q,d))}function v(a){var b={};switch(typeof a){case "string":b.on=!0;break;case "object":b.on=!0;break;case "boolean":b.on=a;break;default:return}d._trackLinks=b}function A(){v(!1);k.on(g,"click",function(a){d._trackLinks&&d._trackLinks.on&&G(a)})}function G(a){var b=gb(a);if(b){a=!1;var c=""+b.href,d=c?c.split(/\?/)[0]:"",e=function(a){var d=Ka(b);O.sendClickLink({url:c,title:c==d?"":d,modes:a})};
if(eb.test(d)||eb.test(c)||La(c,ia)||La(d,ia))a=!0;var g=l.classNameExists(b,"ym-disable-tracklink"),d=l.classNameExists(b,"ym-external-link");g||(g={ln:!0,dl:a},d?e(g):(d=b.hostname||f.parseUrl(b.href).hostname||"",hb(y().hostname,d)?a?(g.ln=!1,e(g)):(a=Ka(b))&&a!=c&&na.set("il",f.trim(a,ab)):c&&-1!=c.search(/^ *(data|javascript):/i)||(g.ut=la,e(g))))}}function m(b){"undefined"==typeof b&&(b=!0);!0===b&&(b={});d._clickmap&&d._clickmap.destroy();b&&(d._clickmap=new zb({dontSendRequests:fa,filter:b.filter,
ignoreTags:b.ignoreTags,quota:b.quota,isTrackHash:b.isTrackHash,protocol:"https:",counterId:a,counterType:c,startTime:Ab}))}function n(a,b){function c(){if(!z){y&&f.clearTimeout(y);var d;d=t?r:r+ +new Date-v;d=b-d;0>d&&(d=0);y=f.setTimeout(function(){z=!0;m(!1);a()},d,"trackUserTime")}}function d(){t=n=q=!0;r+=+new Date-v;v=+new Date;c()}function e(){n||q||(r=0);v=+new Date;n=q=!0;t=!1;c()}function l(){q||(n=!0,t=!1,q=!0,c())}function m(a){for(var b=0;b<w.length;b+=3)if(a)k.on(w[b],w[b+1],w[b+2]);
else k.un(w[b],w[b+1],w[b+2])}var n=!1,q=!1,t=!0,r=0,v=+new Date,y=null,z=!1;if(p.isIE())f.setTimeout(a,b,"trackUserTime");else{var w=[h,"blur",d,h,"focus",e,g,"click",l,g,"mousemove",l,g,"keydown",l,g,"scroll",l];m(!0);c()}}function z(b){"number"!=typeof b&&(b=15E3);if(!d._isAccurateTrackBounce){d._isAccurateTrackBounce=!0;var c=new S({counterId:a}),e=c.get("lastHit");c.set("lastHit",+new Date);((c=c.get("lastHit"))&&(!e||e<c-18E5)||!ib(g.referrer,y().href)||.1>Math.random())&&n(function(){d.notBounce()},
b)}}function J(a){function b(){var a=y().hash.split("#")[1];if("undefined"==typeof a)return!1;var c=a.indexOf("?");0<c&&(a=a.substring(0,c));return a}var c=b();(function pa(){var d=b();d!==c&&(a(),c=d);E=f.setTimeout(pa,200,"trackHash")})()}function K(a){if(!1===a)r&&("onhashchange"in h?k.un(h,"hashchange",N):f.clearTimeout(E),r=!1);else if(a=N,!r){if("onhashchange"in h)k.on(h,"hashchange",a);else J(a);r=!0}O.setTrackHash(r);d._trackHash=r}function N(){X=ma.lastReferrer=V;var a={ut:P,ad:1==c&&h.Ya&&
h.Ya.Direct,wh:!0,saveRef:!0,pv:!0};O.sendAjaxHit({url:y().href,title:l.getDocumentTitle(),referrer:X,modes:a});V=y().href}function M(a,b,c){a=ta.parseValidate(a,b);b=[];a&&(b.push(a),c=c||{},f.isFunction(c.callback)&&(b.push(c.callback),c.ctx&&b.push(c.ctx)));b.length&&d.params.apply(d,b)}var H,P="",T,U,V=ma.lastReferrer=B.href,X="",w;Ya._metrika.counter||(Ya._metrika.counter=d);"object"==typeof a&&(w=a,e=a.defer,P=a.ut,c=a.type,b=a.params,U=a.userParams,T=w.experiments,a=a.id);a=a||0;/^\d+$/.test(a)||
(a=0);c=c||0;H=a+":"+c;if(Ya._metrika.counters[H])return Ya._metrika.counters[H];var Q=Ya._metrika.hitId;Ya._metrika.counterNum++;var Y=Ya._metrika.counterNum;L.initCookie();L.retransmit();var O=new da({protocol:"https:",counterType:c,counterId:a,hitId:Q,counter:d,dontSendRequests:fa,counterNum:Y}),ha;d.replacePhones=t(function(){try{var b=(new W({counterId:a})).read("mp2_substs");if(b){var c=ka.parse(b);c&&Na(c,!0)}}catch(e){}return d},"counter.replacePhones");d.reachGoal=t(function(b,c,e,f){2<=
arguments.length&&"function"===typeof c&&(f=e,e=c,c=aa);Z.log("Reach goal. Counter: "+a+". Goal id: "+b+". Params: ",c);O.sendGoal(b,{vParams:c,callback:e,ctx:f});return d},"counter.reachGoal");d.trackLinks=t(function(a){v(a);return d},"counter.trackLinks");var na=new S({counterId:a});d.hit=t(function(b,c,e,g,h,k){b&&(f.isObject(c)&&(e=c.referer,g=c.params,h=c.callback,k=c.ctx,c=c.title),Z.log("PageView. Counter "+a+". URL: "+b+". Referrer: "+e+". Params: ",g),O.sendHit({url:b,title:c,referrer:e,
vParams:g,callback:h,ctx:k}));return d},"counter.hit");d.params=t(function(b){var c=arguments.length,e=c,g,h,k=[].slice.call(arguments,0);b&&(1<arguments.length&&(f.isFunction(arguments[c-1])?(g=arguments[c-1],e=c-1):f.isFunction(arguments[c-2])&&(g=arguments[c-2],h=arguments[c-1],e=c-2),k=[].slice.call(k,0,e),1<k.length&&(k=[f.array2Props(k)])),Z.log("User params. Counter "+a+". Params: ",k[0]),O.sendParams(k[0],g,h));return d},"counter.params");d.file=t(function(a,b){a&&(b=b||{},O.sendFileUpload({url:a,
title:b.title,vParams:b.params,callback:b.callback,ctx:b.ctx}));return d},"counter.file");d.extLink=t(function(a,b){a&&(b=b||{},O.sendExtLink({url:a,title:b.title,vParams:b.params,callback:b.callback,ctx:b.ctx}));return d},"counter.extLink");d.notBounce=t(function(a){var b=0;a=a||{};Ha&&ea&&(b=ea-Ha);O.sendNotBounce(b,{callback:a.callback,ctx:a.ctx});return d},"counter.notBounce");var ia=[];d.addFileExtension=function(a){"string"==typeof a?ia.push(a):ia=ia.concat(a);return d};d.clickmap=function(a){m(a);
return d};d.accurateTrackBounce=function(a){z(a);return d};var E=null,r=!1;d.trackHash=function(a){K(a);return d};f.arrayEvery=function(a,b,c){for(var d=0;d<a.length;d++)if(!b.call(c,a[d],d,a))return!1;return!0};var ta={requiredEcommerceFields:["currency","goods"],parseValidate:function(a,b){var c=this.validate(a,b);if(!c.isValid)return console&&console.log(c.message),!1;c={};c[a]={};b.currency&&(c.currencyCode=b.currency);b.goods&&(c[a].products=b.goods);for(var d in b)b.hasOwnProperty(d)&&-1===
f.arrayIndexOf(this.requiredEcommerceFields,d)&&(c[a].actionField||(c[a].actionField={}),c[a].actionField[d]=b[d]);return{__ym:{ecommerce:[c]}}},validate:function(a,b){var c=!1,d="";if(f.isObject(b))switch(a){case "detail":case "add":case "remove":f.isArray(b.goods)&&b.goods.length?(c=f.arrayEvery(b.goods,function(a){return f.isObject(a)&&(f.isString(a.id)||f.isNumber(a.id)||f.isString(a.name)||f.isString(a.name))}))||(d="All items in 'goods' should be objects and contain 'id' or 'name' field"):d=
"Ecommerce data should contain 'goods' non-empty array";break;case "purchase":f.isNumber(b.id)||f.isString(b.id)?c=!0:d="Purchase object should contain string or number 'id' field"}else d="Ecommerce data should be an object";return{isValid:c,message:d}}};d.ecommerceDetail=t(function(a,b){M("detail",a,b);return d},"ecommerce.detail");d.ecommerceAdd=t(function(a,b){M("add",a,b);return d},"ecommerce.add");d.ecommerceRemove=t(function(a,b){M("remove",a,b);return d},"ecommerce.remove");d.ecommercePurchase=
t(function(a,b){M("purchase",a,b);return d},"ecommerce.purchase");d.userParams=t(function(a,b,c){f.isObject(a)&&d.params({__ymu:a},b||function(){},c);return d},"uparams");d.experiments=t(function(a,b,c){O.sendExperiments({callback:b,ctx:c,experiments:a});return d},"exps");d.id=d.setUserID=t(function(a,b,c){(f.isString(a)||f.isNumber(a))&&d.params({__ym:{user_id:a}},b||function(){},c);return d},"id");var ua=new W;d.getClientID=t(function(){return ua.read("uid")},"guid");d.enableAll=function(){v(!0);
m(!0);z();return d};d.uploadPage=function(){};d._performanceTiming=Ma;if(a)if("prerender"==g.webkitVisibilityState){O.sendPrerenderHit({url:B.href,title:l.getDocumentTitle(),referrer:g.referrer});var ja=function(){"prerender"!=g.webkitVisibilityState&&(k.un(g,"webkitvisibilitychange",ja),q(!0))};k.on(g,"webkitvisibilitychange",ja)}else q(!1)},"init")()};if(h.performance&&"function"==typeof performance.getEntries){N={2343947156:1,1996539654:1,2065498185:1,823651274:1,12282461:1,1555719328:1,1417229093:1,
138396985:1};J=performance.getEntries();M={};for(z=0;z<J.length;z++){var K=J[z],ta=K.name.replace(/^https?:\/\//,"").split("?")[0],Bb=f.fnv32a(ta);N[Bb]&&!M[ta]&&0<K.duration&&(M[ta]={dns:Math.round(K.domainLookupEnd-K.domainLookupStart),tcp:Math.round(K.connectEnd-K.connectStart),duration:Math.round(K.duration),response:Math.round(K.responseEnd-K.requestStart),pages:B.href})}(new T({sampling:.001})).logParams({timings8:M})}h.Ya._metrika.remoteCtrlInited||(h.Ya._metrika.remoteCtrlInited=!0,new cb);
h.Ya.Metrika.counters=function(){var a=[];f.forEachKey(h.Ya._metrika.counters,function(b,c){var e=b.split(":");a.push({id:+e[0],type:+e[1],accurateTrackBounce:c._isAccurateTrackBounce,clickmap:c._clickmap&&c._clickmap._start,oldCode:!!h.ya_cid,trackHash:!!c._trackHash,trackLinks:c._trackLinks&&c._trackLinks.on,webvisor:!!c._webvisor})});return a};h.ya_cid&&new Ya.Metrika(h.ya_cid,h.ya_params,h.ya_class);h.ya_cid&&!h.ya_hit&&(h.ya_hit=function(a,b){Ya._metrika.counter&&Ya._metrika.counter.reachGoal(a,
b)});z=h.yandex_metrika_callback;N=h.yandex_metrika_callbacks;"function"==typeof z&&z();if("object"==typeof N)for(z=0;z<N.length;z++)if(J=N[z])N[z]=null,J();Pa("yandex_metrika_callback");Pa("yandex_metrika_callbacks");h.Ya.Metrika.informer=function(a){var b=!!Ya.Metrika._informer;Ya.Metrika._informer=a;b||l.loadScript({src:"https://informer.yandex.ru/metrika/informer.js"})};k.on(g,"click",t(function(a){var b=D.getTarget(a),c,e;b&&"ym-advanced-informer"==b.className&&(c=b.getAttribute("data-lang"),
e=b.getAttribute("data-cid"),Ya.Metrika.informer({i:b,id:+e,lang:c}),D.prevent(a))},"adv-inf"));(function(){var a=function(){var a=g.getElementsByTagName("body")[0],b=g.createElement("iframe");b.src="http://awaps.yandex.ru/0/2153/0.htm?ad=165746&pl=93829&rnd="+f.random();b.setAttribute("style","position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;visibility:hidden");a.appendChild(b);f.setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b)},1E4,"ad")},b=function(){h.removeEventListener("load",
b,!1);a()},c=h.performance;f.random(200)||Ya._metrika.isAd||(Ya._metrika.isAd=!0,"http:"==B.protocol&&"object"==typeof c&&h.addEventListener&&(c.timing&&c.timing.loadEventStart?a():h.addEventListener("load",b,!1)))})()})(this,this.document);
