(function(h,g,Z){function ib(a,b,c,d){function e(a){var b=(new Date).getTime();a&&b<a&&(ca+=a-b+20);f.setTimeout(function(){e(b)},20,"timeCorrector")}function m(){var a=(new Date).getTime()+ca;a<aa&&(a=aa+10);return aa=a}function l(){return Math.round((m()-wa)/50)}function ha(a,b){b=Math.max(0,Math.min(b,65535));f.mergeArrays(a,[b>>8,b&255])}function t(a,b){f.mergeArrays(a,[b&255])}function p(a,b){for(b=Math.max(0,b|0);127<b;)f.mergeArrays(a,[b&127|128]),b>>=7;f.mergeArrays(a,[b])}function r(a,b){255<
b.length&&(b=b.substr(0,255));f.mergeArrays(a,[b.length]);for(var c=0;c<b.length;c++)ha(a,b.charCodeAt(c))}function E(a,b){p(a,b.length);for(var c=0;c<b.length;c++)p(a,b.charCodeAt(c))}function A(a,b,c,d,e,f){for(var v;c&&(v=n.getElementSize(c))&&(!v[0]||!v[1]);)c=n.getElementParent(c);if(!c)return null;v=c[F];if(!v||0>v)return null;var m={mousemove:2,click:32,dblclick:33,mousedown:4,mouseup:30,touch:12}[b];if(!m)return null;var Ka=n.getElementXY(c);c=[];t(c,m);p(c,a);p(c,v);p(c,Math.max(0,d[0]-Ka[0]));
p(c,Math.max(0,d[1]-Ka[1]));/^mouse(up|down)|click$/.test(b)&&(a=e||f,t(c,2>a?1:a==(e?2:4)?4:2));return c}function La(a,b,c,d){b=b[F];if(!b||0>b)return null;var e=[];t(e,31);p(e,a);p(e,b);p(e,c[0]);p(e,c[1]);t(e,0);t(e,0);t(e,d);return e}function L(a,b){var c=[];t(c,3);p(c,a);p(c,b[0]);p(c,b[1]);return c}function J(a,b,c){var d=[];c=c[F];if(!c||0>c)return null;t(d,16);p(d,a);p(d,b[0]);p(d,b[1]);p(d,c);return d}function O(a,b,c){var d=[];t(d,28);p(d,a);p(d,b[0]);p(d,b[1]);p(d,c[0]);p(d,c[1]);return d}
function P(a,b,c,d){var e=[];t(e,5);p(e,a);ha(e,b);t(e,c);a=d[F];if(!a||0>a)a=0;p(e,a);return e}function I(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=[];t(e,29);p(e,a);E(e,c);E(e,d);return e}function Z(a){var b=[];t(b,27);p(b,a);return b}function x(a){var b=[];t(b,14);p(b,a);return b}function ea(a){var b=[];t(b,15);p(b,a);return b}function ga(a,b){var c=[];t(c,17);p(c,a);p(c,b[F]);return c}
function R(a,b){var c=[];t(c,18);p(c,a);p(c,b[F]);return c}function M(a,b,c){var d=[];t(d,19);p(d,a);p(d,b[F]);r(d,String(c));return d}function ba(a){var b=a[F];if(!b||0>b||!/^INPUT|SELECT|TEXTAREA$/.test(a.nodeName)||!a.form||ia(a.form))return null;var c=n.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,v=a.form.elements,f=v.length,m=0,l=0;m<f;m++)if(v[m].name==a.name){if(v[m]==a){e=l;break}l++}if(0>e)return null;v=[];t(v,7);p(v,b);p(v,c);p(v,d);E(v,a.name||"");p(v,e);return v}function W(a,b){var c=n.getFormNumber(b);if(0>c)return null;for(var d=b.elements,e=d.length,v=[],m=0;m<e;m++)if(!n.isEmptyField(d[m])){var l=d[m][F];l&&0<l&&f.mergeArrays(v,[l])}d=[];t(d,11);p(d,a);p(d,c);p(d,v.length);for(c=0;c<v.length;c++)p(d,
v[c]);return d}function la(){var a=[];t(a,13);return a}function w(a,b,c){a=a.apply(h,b);na.append(a,c)}function G(a){if(a[F])a:{var b=l(),c=a[F];if(0<c){var d=[];a=n.getElementRegion(a);var e=xa[c],f=a[0]+"x"+a[1],m=a[2]+"x"+a[3];f!=e.pos&&(e.pos=f,t(d,9),p(d,b),p(d,c),p(d,a[0]),p(d,a[1]));m!=e.size&&(e.size=m,t(d,10),p(d,b),p(d,c),p(d,a[2]),p(d,a[3]));if(d.length){a=d;break a}}a=null}else{(c=n.getElementParent(a))&&G(c);a[F]=U;xa[U]={};U++;if(a.nodeName)if(c=+a[F],!isFinite(c)||0>=c)b=null;else{var d=
64,e=0,v=n.getElementParent(a),f=v&&v[F]?v[F]:0;0>f&&(f=0);var m=a.nodeName.toUpperCase(),h=kb[m];h||(d|=2);var g=n.getElementNeighborPosition(a);g||(d|=4);var u=n.getElementRegion(a);(v=v?n.getElementRegion(v):null)&&u[0]==v[0]&&u[1]==v[1]&&u[2]==v[2]&&u[3]==v[3]&&(d|=8);xa[c].pos=u[0]+"x"+u[1];xa[c].size=u[2]+"x"+u[3];a.id&&"string"==typeof a.id&&(d|=32);(v=n.calcTextChecksum(a))&&(d|=16);var z=n.calcAttribChecksum(a);z&&(e|=2);var k;b:{k=n.getElementChildren(n.getElementParent(a),a.tagName);for(var B=
0;B<k.length;B++)if((!k[B].id||"string"!=typeof k[B].id)&&n.calcAttribChecksum(k[B])==z&&n.calcTextChecksum(k[B])==v){k=!0;break b}k=!1}k&&(d|=1,b=n.calcChildrenChecksum(a));k=[];t(k,1);p(k,c);t(k,d);p(k,f);h?t(k,h):r(k,m);g&&p(k,g);d&8||(p(k,u[0]),p(k,u[1]),p(k,u[2]),p(k,u[3]));d&32&&r(k,a.id);v&&ha(k,v);d&1&&ha(k,b);t(k,e);z&&ha(k,z);b=k}else a[F]=-1,b=null;na.append(b,void 0);a=ba(a)}na.append(a,void 0)}function oa(a,b){var c=a&&n.classNameExists(a,"(ym-disable-keys|-metrika-nokeys)");b&&a&&(c=
c||!!n.getElementsByClassName("(ym-disable-keys|-metrika-nokeys)",a).length);return c}function ia(a){return a&&n.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[F])G(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][F]&&G(c[e]);else G(b)}else G(b);w(A,[l(),a.type,b,D.getPos(a),a.which,a.button])}}
function N(a){ja(a);a:{var b,c;if(h.getSelection){try{var d=h.getSelection()}catch(jb){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(jb){break a}c&&Ea(c)||oa(c,!0)||b==Y||(Y=b,w(I,[l(),b]))}}}function z(a){var b=m(),c=b-da;if(!(10>c)){var d=D.getPos(a),e=Q[0]-d[0],f=Q[1]-d[1],e=e*e+f*f;0>=e||16>e&&100>c||20>c&&256>e||(da=b,Q=d,ja(a))}}
function u(){var a=n.getDocumentScroll(),b=m();10>b-X||10>Math.abs(a[0]-S[0])&&10>Math.abs(a[1]-S[1])||(X=b,S=a,w(L,[l(),a]))}function B(a){if(a=D.getTarget(a)){var b=Math.random(),c=[a.scrollLeft,a.scrollTop];if(a.localId){if(b=K[a.localId],!b||10>Math.abs(c[0]-b[0])&&10>Math.abs(c[1]-b[1]))return}else{for(;K[b];)b=Math.random();a.localId=b}K[a.localId]=c;a!==g&&(G(a),w(J,[l(),c,a]))}}function H(){w(O,[l(),n.getViewportSize(),n.getDocumentSize()])}function C(){w(la,[],!0)}function ka(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 Ea(a){return"INPUT"==a.tagName?"password"==a.type||a.name&&ma.test(a.name)||a.id&&ma.test(a.id):!1}function Ma(a,b,c){!(a=D.getTarget(a))||Ea(a)||oa(a)||(G(a),w(P,[l(),b,c,a]))}function Na(a){var b=a.keyCode,c=ka(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),Ma(a,b,c|16),fa=!1,f.setTimeout(function(){fa=!0},1),!(67==b&&c&4)||c&1||c&2||Fa()}function Oa(a){fa&&!V&&0!==a.which&&(Ma(a,a.charCode||a.keyCode,ka(a)),V=!0,f.setTimeout(function(){V=!1},1))}function Fa(){T||(T=!0,Y&&w(Z,[l()]),f.setTimeout(function(){T=!1},1))}function Ga(){qa||(qa=!0,w(x,[l()]))}function ra(){qa&&(qa=!1,w(ea,[l()]))}function Pa(a){(!qa||a&&!a.fromElement)&&Ga()}function Qa(a){a&&!a.toElement&&ra()}function ya(a){if((a=D.getTarget(a))&&/^INPUT|SELECT|TEXTAREA|BUTTON$/.test(a.tagName)){if(a[F])G(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][F]&&G(b[d]);else G(a)}w(ga,[l(),a])}}function za(a){(a=D.getTarget(a))&&/^INPUT|SELECT|TEXTAREA|BUTTON$/.test(a.tagName)&&(G(a),w(R,[l(),a]))}function Aa(a){if((a=D.getTarget(a))&&!Ea(a)&&!oa(a)&&/^INPUT|SELECT|TEXTAREA$/.test(a.tagName)){var b=/^(checkbox|radio)$/.test(a.type)?a.checked:a.value;G(a);w(M,[l(),a,b])}}function sa(a){if((a=D.getTarget(a))&&!ia(a)&&"FORM"==a.nodeName){for(var b=
a.elements,c=0;c<b.length;c++)n.isEmptyField(b[c])||G(b[c]);w(W,[l(),a],!0)}}function Ha(a){u();if(a.touches&&a.touches.length){var b=D.getTarget(a);if(b&&b!=g){G(b);for(var c=0;c<a.touches.length;c++)w(A,[l(),"touch",b,[a.touches[c].pageX,a.touches[c].pageY],0,0])}}}function Ba(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&&(G(b),w(La,[l(),b,D.getPos(a),c]))}}function Ra(a){(a=D.getTarget(a))&&"BODY"==
a.tagName&&na.append([],!0)}var na=new ta({protocol:a,counterId:b,counterType:c,meta:{url:y().href,hitId:d,timezone:ua,timestamp:va}}),kb={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},ca=0,aa=0;e(0);var U=1,da=0,Q=[0,0],X=0,S=[0,0],K={},ma=/^(password|passwd|pswd)$/,fa=!0,V=!1,Y="",T=!1,qa=!0,wa=m(),F="metrikaId_"+
Math.random(),xa={},Ca=":submit"+Math.random();if(!f.isMetrikaPlayer()){k.on(g,"mousemove",z);k.on(g,"click,dblclick,mousedown",ja);k.on(g,"mouseup",N);k.on(h,"scroll",u);if("onmousewheel"in g)k.on(g,"mousewheel",Ba);else k.on(g,"wheel",Ba);k.on(h,"beforeunload",C);if(!lb)k.on(h,"unload",C);k.on(h,"resize",H);k.on(g,"keydown",Na);k.on(g,"keypress",Oa);k.on(g,"copy",Fa);k.on(g,"touchmove,touchstart",Ha);if(g.body)k.on(g,"mouseleave",Ra);g.attachEvent&&!h.opera?(k.on(g,"focusin",Pa),k.on(g,"focusout",
Qa)):(k.on(h,"focus",Ga),k.on(h,"blur",ra),k.on(g,"blur",ra));g.addEventListener?(k.on(g,"scroll",B),k.on(g,"focus",ya),k.on(g,"blur",za),k.on(g,"change",Aa),k.on(g,"submit",sa)):g.attachEvent&&(k.on(g,"focusin",ya),k.on(g,"focusout",za),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",Aa);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][Ca]=c,a[b].submit=function(){sa({target:this});return this[Ca]()}}})();"0:0"!=n.getDocumentScroll().join(":")&&u();H()}return{start:function(){na.activate()},stop:function(){na.clear();k.un(g,"mousemove",z);k.un(g,"click,dblclick,mousedown",ja);k.un(g,"mouseup",N);k.un(g,"mousewheel",Ba);k.un(g,"wheel",Ba);k.un(h,"scroll",u);k.un(h,"beforeunload",C);
k.un(h,"unload",C);k.un(h,"resize",H);k.un(g,"keydown",Na);k.un(g,"keypress",Oa);k.un(g,"copy",Fa);k.un(g,"touchmove",Ha);k.un(g,"touchstart",Ha);g.body&&k.un(g,"mouseleave",Ra);k.un(g,"focusin",Pa);k.un(g,"focusout",Qa);k.un(h,"focus",Ga);k.un(h,"blur",ra);k.un(g,"blur",ra);g.removeEventListener?(k.un(g,"scroll",B),k.un(g,"focus",ya),k.un(g,"blur",za),k.un(g,"change",Aa),k.un(g,"submit",sa)):g.detachEvent&&(k.un(g,"focusin",ya),k.un(g,"focusout",za),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",Aa);k.un(a[b],"submit",sa)}}());(function(){for(var a=g.getElementsByTagName("form"),b=0;b<a.length;b++)a[b][Ca]&&(a[b].submit=a[b][Ca])})()},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,m=/regexp:/,l=0;l<e.length;l++){var p=e[l];if(p)if(m.test(p)){p=Da(p.replace(m,""));try{var u=
new RegExp(p)}catch(Hb){}if(u&&u.test(f)){d.uploadPage(b);break}}else if(-1!==f.indexOf(p)){d.uploadPage(b);break}}}var d=this;"complete"==g.readyState?c():(k.on(g,"DOMContentLoaded",c),k.on(h,"load",c))},uploadPage:q(function(e){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 m=h.XMLHttpRequest?new h.XMLHttpRequest:new ActiveXObject("Msxml2.XMLHTTP"),l=n.getDocumentCharset(),p=
"text/html"+(l?";charset="+l:""),u=new mb({protocol:a,counterId:b,counterType:c});if("html"==e)return e=RegExp("<script [^>]*?//mc\\.yandex\\.ru/watch/.*?\x3c/script>","gi"),u.sendContent(n.getDocumentHTML().replace(e,""),p,d,ua,va),!0;m&&(m.open("get",y().href,!0),m.onreadystatechange=q(function(){if(4==m.readyState){var a=m.getResponseHeader("content-type")||"";l&&-1===a.indexOf("charset=")&&(a=p);u.sendContent(m.responseText,a,d,ua,va)}},"updatePage.1"),m.overrideMimeType&&l&&m.overrideMimeType(p),
m.send(null));return!0},"uploadPage")}}function q(a,b,c){return function(){try{return a.apply(this,arguments)}catch(d){c||Sa(d,b)}}}function Sa(a,b){var c;if(.01>Math.random())try{(new Q).log("jserrs",R,a.message,b,E.href,"","string"==typeof a.stack&&a.stack.replace(/\n/g,"\\n"))}catch(d){c=["cp: "+b,a.name+": "+a.message,"debug: ","code: "+R,"stack: "+a.stack],(new Image).src="//an.yandex.ru/jserr/101500?cnt-class=100&errmsg="+encodeURIComponent(c.join("; ").replace(/\r?\n/g,"\\n"))}}function nb(a,
b,c){return h.setTimeout(q(a,c||"setTimeout"),b)}function y(){for(var a={},b="hash host hostname href pathname port protocol search".split(" "),c=b.length,d=c,e,m;d--;)a[b[d]]="";try{for(e=h.location,d=c;d--;)m=b[d],a[m]=""+e[m]}catch(l){E&&(a=E)}return a}function Da(a){return a?(""+a).replace(/^\s+/,"").replace(/\s+$/,""):""}function Ta(){return-1!=y().hostname.search(/(?:^|\.)(?:ya|yandex)\.(?:\w+|com\.\w+)$/)}function V(a){return-1!==(""+h.navigator.userAgent).toLowerCase().search(a)}function Ua(a){return Da(a&&
a.innerHTML&&a.innerHTML.replace(/<\/?[^>]+>/gi,""))}function Va(a,b){var c,d;if(!a||!b)return!1;c=[];for(d=0;d<b.length;d++)c.push(b[d].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 ob(a){a=a.target||a.srcElement;
var b;if(!a)return!1;3==a.nodeType&&(a=a.parentNode);for(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 pb(a,b){return(a?a.replace(/^www\./,""):"").toLowerCase()==(b?b.replace(/^www\./,""):"").toLowerCase()}function qb(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 Wa(){var a=h.performance||h.webkitPerformance,b,c=[];if(a=a&&a.timing)if(b=a.navigationStart)for(c=[a.domainLookupEnd-a.domainLookupStart,a.connectEnd-a.connectStart,a.responseStart-a.requestStart,a.responseEnd-a.responseStart,a.fetchStart-b,a.redirectEnd-a.redirectStart,a.redirectCount],c.push(a.domInteractive&&a.domLoading?a.domInteractive-a.domLoading:null),c.push(a.domContentLoadedEventStart&&a.domContentLoadedEventEnd?a.domContentLoadedEventEnd-a.domContentLoadedEventStart:
null),c.push(a.domComplete?a.domComplete-b:null),c.push(a.loadEventStart?a.loadEventStart-b:null),c.push(a.loadEventStart&&a.loadEventEnd?a.loadEventEnd-a.loadEventStart:null),c.push(a.domContentLoadedEventStart?a.domContentLoadedEventStart-b:null),a=0;a<c.length;a++)b=c[a],null!==b&&(0>b||36E5<b)&&(c[a]=null);return c}function rb(a){var b=[],c=a._lastPerformanceTiming,d=Wa(),e,m;if(c)for(e=0,m=c.length;e<m;e++)null===d[e]?b.push(d[e]):b.push(c[e]===d[e]?"":d[e]);else b=d;a._lastPerformanceTiming=
d;return b.join(",")}function sb(){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 tb(a){var b=g.referrer||"",c,d,e,m,l;if((new RegExp("^https?://"+E.host+"/")).test(b))return!1;c=a.patterns;for(m=0;m<c.length;m++)if(d=new RegExp(c[m],
"i"),b.match(d))if(d=a.params||[],d.length)for(e=f.safeDecodeURIComponent((RegExp.$1||"").replace(/\+/g,"%20")),l=0;l<d.length;l++){if(e==f.safeDecodeURIComponent(d[l]))return!0}else return!0;return!1}function Xa(a,b){var c=!1,d,e,m,f;if(a&&"string"!=typeof a&&a.length)for(f=0;f<a.length;f++)if(d=a[f].selector,e=a[f].text,m=d.charAt(0),d=d.slice(1),"#"==m){if(m=g.getElementById(d))c=!0,b&&W.unshift([m,m.innerHTML]),m.innerHTML=e}else if("."==m)for(m=n.getElementsByClassName(d),d=0;d<m.length;d++){var c=
!0,h=m[d],k=e;b&&W.unshift([h,h.innerHTML]);h.innerHTML=k}return c}function Za(){var a;for(a=0;a<W.length;a++)W[a][0].innerHTML=W[a][1]}function ub(a,b){var c,d,e="",m,l,h;a=a&&a.replace(/^\?/,"");b=b&&b.replace(/^#/,"")||"";if(a)for(d=a.split("&"),c=0;c<d.length;c++)h=d[c].split("="),"_openstat"===h[0]&&(e=h[1]);m=b.split("?");for(c=0;c<m.length;c++)for(l=m[c].split("&"),d=0;d<l.length;d++)h=l[d].split("="),"_openstat"===h[0]&&(e=h[1]);e&&(e=-1<e.indexOf(";")?f.safeDecodeURIComponent(e):X.decode(J.decode(e.replace(/[-*_]/g,
function(a){return{"*":"+","-":"/",_:"="}[a]||a}))));return e&&(c=e.split(";"),4==c.length)?{service:c[0],campaign:c[1],ad:c[2],source:c[3]}:null}var f={mixin:function(a){var b,c;for(b=1;b<arguments.length;b++)if(arguments[b]){for(c in arguments[b])arguments[b].hasOwnProperty(c)&&(a[c]=arguments[b][c]);arguments[b].hasOwnProperty("toString")&&(a.toString=arguments[b].toString)}return a}},A=function(a){a=a||{};f.mixin(this,a);this._initComponent()};A.prototype._initComponent=function(){};A.inherit=
function(a){var b,c;a=a||{};b="function"==typeof this?this:Object;a.hasOwnProperty("constructor")||(a.constructor=function(){b.apply(this,arguments)});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=A.inherit;return a.constructor};f.isArray=function(a){return"function"==typeof Array.isArray?Array.isArray(a):"[object Array]"==Object.prototype.toString.call(a)};
f.mergeArrays=function(a){var b,c,d=arguments.length,e;for(b=1;b<d;b++)if(e=arguments[b],f.isArray(e)||e&&"[object Arguments]"===e.toString())for(c=0;c<e.length;c++)a[a.length]=e[c];return a};f.getNativeFunction=function(a,b){var c;b=b||h;return(c=b.constructor&&b.constructor.prototype&&b.constructor.prototype[a]||b[a])&&"apply"in c?function(){return c.apply(b,arguments)}:function(){}};f.setTimeout=function(a,b,c){return f.getNativeFunction("setTimeout")(q(a,c||"setTimeout"),b)};f.defer=function(a,
b,c,d,e){return f.setTimeout(function(){a.apply(c,d||[])},b,e)};f.throttle=function(a,b,c,d){var e,m,l;return function(){m=arguments;l=this;e||function(){e=null;m&&(a.apply(c||l,m),m=null,e=f.setTimeout(arguments.callee,b,d))}()}};var $a=A.inherit({storage:null,storageKey:"dataBuffer",maxBufferSize:255,flushTimeout:1E4,active:!0,meta:null,onFlush:function(){},onFlushCtx:null,bufferExpireTime:864E5,_initComponent:function(){var a;$a.superclass._initComponent.apply(this,arguments);this._data=[];this._packetNumber=
0;this._flushTID=null;this._saveToStorageThrottled=f.throttle(this._saveToStorage,300,this,"DataBuffer._saveToStorage");this.storage&&((a=this.storage.get(this.storageKey))&&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())},getFlushSize:function(){return this._data.length},append:function(a,b){f.mergeArrays(this._data,a);this._saveToStorageThrottled();this.active&&((b||this.getFlushSize()>=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})}}),Y=A.inherit({transports:[],postParams:[],dontSendRequests:!1,send:function(a,b,c,d){c=c||function(){};this.dontSendRequests?c.call(d):function m(f){var l;if(f<this.transports.length)try{l=new this.transports[f]({postParams:this.postParams}),l.request(a,b,function(a,b,l){a?c.call(d,b,l):m.call(this,f+1)},this)}catch(t){Sa(t,"send by "+(l&&l.id)),m.call(this,f+1)}}.call(this,0)}}),la={stringify:function(a){var b=[],c,d,e;for(c in a)if(a.hasOwnProperty(c))if(d=
a[c],f.isArray(d))for(e=0;e<d.length;e++)b.push(encodeURIComponent(c)+"="+encodeURIComponent(String(d[e])));else b.push(encodeURIComponent(c)+"="+encodeURIComponent(String(d)));return b.join("&")}};f.forEachKey=function(a,b,c){for(var d in a)a.hasOwnProperty(d)&&b.call(c,d,a[d],a)};f.inArray=function(a,b){var c;for(c=0;c<a.length;c++)if(a[c]==b)return!0;return!1};var S=A.inherit({postParams:[],_buildUrl:function(a,b){var c=la.stringify(b);return a+(-1<a.indexOf("?")?"&":c?"?":"")+c},_splitParams:function(a){var b=
{},c={};f.forEachKey(a,function(a,e){f.inArray(this.postParams,a)?c[a]=e:b[a]=e},this);return{get:b,post:c}}}),T=S.inherit({id:"XHR",method:"POST",withCredentials:!0,request:function(a,b,c,d){var e,f;if(/[^a-z0-9.:-]/.test(E.host)&&h.opera&&"function"==typeof h.opera.version&&(e=h.opera.version(),"string"==typeof e&&"12"==e.split(".")[0]))return c.call(d,!1);if(h.XMLHttpRequest&&(f=new XMLHttpRequest,"withCredentials"in f)){b=this._splitParams(b);a=this._buildUrl(a,b.get);try{f.open(this.method,a,
!0)}catch(l){return c.call(d,!1)}f.withCredentials=this.withCredentials;this._setHeaders(f);f.send(this._preparePostParams(b));f.onreadystatechange=function(){4==f.readyState&&c.call(d,200==f.status,f.responseText)};return}c.call(d,!1)},setMethod:function(a){this.method=a},_preparePostParams:function(a){return la.stringify(a.post)},_setHeaders:function(a){a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}});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};var N=S.inherit({id:"form",enctype:"application/x-www-form-urlencoded",htmlfileOnly:!1,_initComponent:function(){N.superclass._initComponent.apply(this,arguments);"_htmlfile"in N.prototype||(N.prototype._htmlfile=this._createHtmlfile());this._doc=this._htmlfile||(this.htmlfileOnly?null:g)},request:function(a,b,c,d){var e=this._doc,m,l,h,g;if(!e)return c.call(d,!1);b=this._splitParams(b);m="ifr"+f.random();l=e.createElement("div");l.style.position=
"absolute";l.style.left="-99999px";l.style.top="-99999px";h=['<iframe name="',m,'"></iframe>','<form action="',this._buildUrl(a,b.get),'" method="post" target="',m,'" enctype="',this.enctype,'">'];f.forEachKey(b.post,function(a){f.mergeArrays(h,['<input type="hidden" autocomplete="off" autocorrect="off"',' autocapitalize="off" spellcheck="false" name="',a,'"/>'])});f.mergeArrays(h,["</form>"]);l.innerHTML=h.join("");e.body.appendChild(l);g=l.getElementsByTagName("form")[0];f.forEachKey(b.post,function(a,
b){g[a].value=b});g.submit();f.setTimeout(function(){e.body.removeChild(l)},1E4,"TransportForm.request.2");return c.call(d,!0)},_createHtmlfile:function(){var a;try{if(h.ActiveXObject)return a=new ActiveXObject("htmlfile"),a.open(),a.write("<html><body></body></html>"),a.close(),a}catch(b){}return null}}),vb=N.inherit({id:"htmlfile",htmlfileOnly:!0}),K=S.inherit({id:"img",request:function(a,b,c,d){a=this._buildUrl(a,b);b=g.createElement("img");c=c||function(){};b.onload=q(function(){c.call(d,!0)},
"TransportImage.request");b.onerror=q(function(){c.call(d,!1)},"TransportImage.request");b.src=a}}),ca={stringify:function(a){try{return JSON.stringify(a)}catch(b){return"null"}}};f.toJSON=function(a){var b,c,d;if(a===Z)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:b=[];c=0;for(d=a.length;c<
d;c++)b[b.length]=f.toJSON(a[c]);return"["+b.join(",")+"]";case Object:b=[];for(c in a)a.hasOwnProperty(c)&&a[c]!==Z&&(b[b.length]=f.toJSON(c)+":"+f.toJSON(a[c]));return"{"+b.join(",")+"}";default:return ca.stringify(a)}};var O=A.inherit({counterId:"",_initComponent:function(){O.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}}),P=A.inherit({counterId:"",onlyCurrentDomain:!1,skipPrefix:!1,_initComponent:function(){var a,b;P.superclass._initComponent.apply(this,arguments);this._domain=null;if(!this.onlyCurrentDomain)for(a=E.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(d){}},read:function(a){var b;try{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(){var a;this.create("metrika_enabled","1",60);a=!!this.read("metrika_enabled");this.erase("metrika_enabled");return a},_prepareName:function(a){return(this.skipPrefix?"":"_ym_")+a+(this.counterId?
"_"+this.counterId:"")}});P.isEnabled=function(){return(new P({onlyCurrentDomain:!0})).isEnabled()};var L=Y.inherit({protocol:"",host:"mc.yandex.ru",resource:"",counterId:"",counterType:0,retry:!1,transports:[T,K,vb],_initComponent:function(){L.superclass._initComponent.apply(this,arguments);this.retry&&(this._storage=new O)},send:function(a,b,c,d){var e=this._registerRequest(a,b);this._sendSavedRequest(e,a,b,c,d)},_sendSavedRequest:function(a,b,c,d,e){var m=h.Ya._metrika.firstReqStatus,l,g;if("process"==
m)h.Ya._metrika.firstReqCallbacks=f.mergeArrays(h.Ya._metrika.firstReqCallbacks||[],[[this,arguments]]);else return m||(h.Ya._metrika.firstReqStatus="process"),m={},this.counterType&&(m["cnt-class"]=this.counterType),f.mixin(m,b),c.st=Math.round((new Date).getTime()/1E3),c.u=L._userID,l=[this.protocol,"//",this.host,"/"+this.resource+"/"+this.counterId].join(""),g=[],c&&(f.forEachKey(c,function(a,b){"t"!=a&&f.mergeArrays(g,[a,b])}),c.t&&f.mergeArrays(g,["t",c.t])),g.length&&(m["browser-info"]=g.join(":")),
L.superclass.send.call(this,l,m,function(){var b,c;h.Ya._metrika.firstReqStatus="complete";this._unregisterRequest(a);b=h.Ya._metrika.firstReqCallbacks;h.Ya._metrika.firstReqCallbacks=null;if(b)for(c=0;c<b.length;c++)b[c][0]._sendSavedRequest.apply(b[c][0],b[c][1]);d&&d.apply(e,arguments)},this)},_isRetryEnabled:function(){return this.retry&&this._storage&&this._storage.isEnabled()},_registerRequest:function(a,b){var c,d;if(this._isRetryEnabled()){b.rqnl=b.rqnl||0;b.rqnl++;c=this._storage.get("retryReqs")||
{};for(d=1;c[d];)d++;c[d]={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 d}},_unregisterRequest:function(a){var b;a&&this._isRetryEnabled()&&(b=this._storage.get("retryReqs")||{},b[a]&&(delete b[a],this._storage.set("retryReqs",b)))},_getVersion:q(function(){return R},"",!0)});L.initCookie=function(){var a=
new P,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 O,b=a.get("retryReqs")||{},c;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&&(c=new L({protocol:b.protocol,host:b.host,resource:b.resource,counterId:b.counterId,counterType:b.counterType,
postParams:b.postParams||[],retry:!0}),c.send(b.params,b.browserInfo))})};f.fletcher=function(a){for(var b=a.length,c=0,d=255,e=255,f,l,h;b;){f=21<b?21:b;b-=f;do l="string"==typeof a?a.charCodeAt(c):a[c],c++,255<l&&(h=l>>8,l&=255,l^=h),d+=l,e+=d;while(--f);d=(d&255)+(d>>8);e=(e&255)+(e>>8)}a=(d&255)+(d>>8)<<8|(e&255)+(e>>8);return 65535==a?0:a};var J={abc:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",tail:"+/=",tailSafe:"*-_",encode:function(a,b){var c=(J.abc+(b?J.tailSafe:J.tail)).split(""),
d=a.length,e=[],m=d-d%3,l,h;for(h=0;h<m;h+=3)l=(a[h]<<16)+(a[h+1]<<8)+a[h+2],f.mergeArrays(e,[c[l>>18&63],c[l>>12&63],c[l>>6&63],c[l&63]]);switch(d-m){case 1:l=a[m]<<4;f.mergeArrays(e,[c[l>>6&63],c[l&63],c[64],c[64]]);break;case 2:l=(a[m]<<10)+(a[m+1]<<2),f.mergeArrays(e,[c[l>>12&63],c[l>>6&63],c[l&63],c[64]])}return e.join("")}};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.arrayIndexOf=function(a,b){var c;for(c=0;c<a.length;c++)if(a[c]===b)return c;return-1};f._playerRegexp=/^.+\.mtproxy\.yandex\.net$/;f.isMetrikaPlayer=function(){return"MetrikaPlayer"==h.name||this._playerRegexp.test(h.location.hostname)};var n={getDocumentCharset:function(){return(""+(g.characterSet||g.charset||"")).toLowerCase()},getRootElement:function(){var a=g.documentElement;return"CSS1Compat"==g.compatMode?a:g.body||a},getViewportSize:function(){var a=n.getRootElement();
return[a.clientWidth||h.innerWidth,a.clientHeight||h.innerHeight]},getDocumentTitle:function(){var a=g.title;"string"!=typeof a&&(a=(a=g.getElementsByTagName("title"))&&a.length?a[0].innerHTML:"");return a}},r={_silverlightVersion:"",getSilverlightVersion:function(){var a,b,c,d;if(!r._silverlightVersion)if(h.ActiveXObject)try{c=new ActiveXObject("AgControl.AgControl"),a=function(a,c,d,f){for(;b(a,c);)c[d]+=f;c[d]-=f},b=function(a,b){return a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3])},d=
[1,0,0,0],a(c,d,0,1),a(c,d,1,1),a(c,d,2,1E4),a(c,d,2,1E3),a(c,d,2,100),a(c,d,2,10),a(c,d,2,1),a(c,d,3,1),r._silverlightVersion=d.join(".")}catch(e){}else if(a=h.navigator,a=a.plugins&&a.plugins["Silverlight Plug-In"])r._silverlightVersion=a.description;return r._silverlightVersion||""},_flashVersion:0,getFlashVersion:function(){var a,b,c;if(!r._flashVersion)if(a=h.navigator,"undefined"!=typeof a.plugins&&"object"==typeof a.plugins["Shockwave Flash"]){if(b=a.plugins["Shockwave Flash"],c=b.version,
(b=b.description)||c)if(a=a.mimeTypes,"undefined"==typeof a||!a["application/x-shockwave-flash"]||a["application/x-shockwave-flash"].enabledPlugin)c?r._flashVersion=c:b&&(r._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"),b=c.GetVariable("$version"))r._flashVersion=b.split(" ")[1].replace(/,/g,".").replace(/[^.\d]/g,"")}catch(d){}return r._flashVersion},getLanguage:function(){return(h.navigator?
navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage:"").toLowerCase()},getJavaEnabled:function(){try{return navigator.javaEnabled()}catch(a){return!1}}};f.fnv32a=function(a){var b=2166136261,c,d;c=0;for(d=a.length;c<d;++c)b^=a.charCodeAt(c),b+=(b<<1)+(b<<4)+(b<<7)+(b<<8)+(b<<24);return b>>>0};r.getFingerPrint=function(){var a=[],b,c;if(navigator.plugins&&navigator.plugins.length)for(c=0;c<navigator.plugins.length;c++)b=navigator.plugins[c],f.mergeArrays(a,
[b.name,b.version,b.description,b.filename]);if(navigator.mimeTypes&&navigator.mimeTypes.length)for(c=0;c<navigator.mimeTypes.length;c++)b=navigator.mimeTypes[c],f.mergeArrays(a,[b.type,b.description,b.suffixes]);return f.fnv32a(a.join(";"))+"01"};r.getPlatform=function(){var a="";try{a=""+navigator.platform}catch(b){}return a};r.getNotificationPermission=function(){var a;try{a=Notification.permission}catch(b){}switch(a){case "denied":return 1;case "granted":return 2}};r.isIframe=function(){try{return h.top!=
h.self}catch(a){return!1}};r._nMap={other:"0",none:"1",unknown:"2",wifi:"3",ethernet:"4",bluetooth:"5",cellular:"6",wimax:"7",mixed:"8"};r.netType=function(){var a=(navigator.connection||{type:""}).type;return r._nMap[a]||a};r.isSafari=function(){try{return navigator.vendor&&-1<navigator.vendor.indexOf("Apple")&&navigator.userAgent&&!navigator.userAgent.match("CriOS")}catch(a){}return!1};n.removeNode=function(a){var b=a&&a.parentNode;b&&b.removeChild(a)};var ab={url:"https://mc.yandex.ru/metrika/",
_value:null,init:function(){var a=this._getLs().read("isad");a?this._set(a):this._getReqStatus()||this._send()},getVal:function(){return this._value},_set:function(a){this._value="1"==a||"2"==a?a:null},_send:function(){var a=g.createElement("img"),b=this;a.onload=function(){b._saveReq(!1);n.removeNode(this)};a.onerror=function(){b._saveReq(!0);n.removeNode(this)};this._setReqStatus("process");a.src=this.url+String.fromCharCode(97,100,118,101,114,116,46,103,105,102);r.isSafari()&&(a.style.position=
"absolute",a.style.visibility="hidden",a.style.width="0px",a.style.height="0px",n.getRootElement().appendChild(a))},_saveReq:function(a){this._value=a=a?"1":"2";this._setReqStatus("complete");this._getLs().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"}},_getLs:function(){this._ls||(this._ls=new P);return this._ls}},X={encode:function(a){var b=[],c,d,e;c=0;for(e=a.length;c<
e;c++)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,d,e,f;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(e=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|e&63),c+=2):(e=a.charCodeAt(c+1),f=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(e&63)<<6|f&63),c+=3);return b}};J.decode=function(a,b){for(var c=J.abc+(b?J.tailSafe:J.tail),d=0,
e="",f,h,g,k,p;a.length%4;)a+="=";do{f=c.indexOf(a.charAt(d++));h=c.indexOf(a.charAt(d++));k=c.indexOf(a.charAt(d++));p=c.indexOf(a.charAt(d++));if(0>f||0>h||0>k||0>p)return null;g=f<<18|h<<12|k<<6|p;f=g>>16&255;h=g>>8&255;g&=255;e=64==k?e+String.fromCharCode(f):64==p?e+String.fromCharCode(f,h):e+String.fromCharCode(f,h,g)}while(d<a.length);return e};var aa=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(){aa.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){var c,d,e;/[\/&=?#]/.test(a)||(c=a?"goal://"+
y().hostname+"/"+encodeURIComponent(a):y().href,d=n.getDocumentTitle(),e=a?y().href:g.referrer,this._hitExt({url:c,title:d,referrer:e,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:wa},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})},sendDevice:function(a){this._hitExt({browserInfo:{di:a.data,dip:a.port},callback:a.callback,ctx:a.ctx})},_hitExt:function(a){function b(a,b){b&&(g[a]=b)}var c,d,e,h,l,g,k;f.isMetrikaPlayer()||(c=a.modes||{},d=a.browserInfo||{},h="undefined"!=
typeof a.referrer?a.referrer:ma.lastReferrer,l=a.url||"",g={},c.ar&&!c.onlyData&&(h=null===h||""===h?"":this._prepareHitUrl(h),l=this._prepareHitUrl(a.url)),b("page-ref",f.trim(h,pa)),b("page-url",f.trim(l,pa)),Ta()?b("ut",wa):"undefined"!=typeof c.ut&&b("ut",f.trim(c.ut,wb)),b("exp",a.experiments),a.vParams&&(l=f.toJSON(a.vParams),this.trimParams&&l.length>xb?k=!0:b("site-info",l)),c.saveRef&&(ma.lastReferrer=h),this.fake||(e=this._getTechInfo(a.title,c,this.counterId,a.ts,a.tz,this._trackHash,this.hitId,
this.webvisor,this.counter)),f.mixin(d,e,{}),this.send(g,d,function(){k&&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,d;if(!f.isString(a))return b;if(-1!=a.search(/^\w+:\/\//))return a;d=a.charAt(0);if("?"==d)return d=b.search(/\?/),-1==d?b+a:b.substr(0,d)+a;if("#"==d)return d=b.search(/#/),-1==d?b+a:b.substr(0,d)+a;if("/"==d){if(d=b.search(c),
-1!=d)return b.substr(0,d+c.length)+a}else return c=b.split("/"),c[c.length-1]=a,c.join("/");return a},_getTechInfo:function(a,b,c,d,e,m,g,k,t){function l(a,b){a&&b&&(q[a]=b)}function ha(a){b[a]&&l(a,"1")}var q={},y;b=b||{};d=d||I.getTimestamp();e=e||I.getTimezone();l("j",r.getJavaEnabled()?"1":"");l("nt",r.netType());U&&l("s",U.width+"x"+U.height+"x"+(U.colorDepth||U.pixelDepth));h.devicePixelRatio&&l("sk",h.devicePixelRatio);r.isIframe()&&l("ifr","1");l("adb",ab.getVal());l("f",r.getFlashVersion());
l("l",r.getSilverlightVersion());l("fpr",r.getFingerPrint());l("cn",this.counterNum);b.pa||(y=n.getViewportSize(),l("w",y[0]+"x"+y[1]));l("z",e);l("i",d);l("et",Math.round((new Date).getTime()/1E3));l("en",n.getDocumentCharset());l("v",R);l("c",navigator.cookieEnabled?"1":"");l("la",r.getLanguage());l("ntf",r.getNotificationPermission());f.random(100)||l("np",J.encode(X.encode(f.trim(r.getPlatform(),100))));m&&l("wh","1");e="ar ln dl ad nb pa pq pv ex".split(" ");for(d=0;d<e.length;d++)ha(e[d]);e=
["va","vt","sn","sa","he"];b.nb&&e.push("cl");for(d=0;d<e.length;d++)m=e[d],l(m,b[m]);e=new O({counterId:c});e.isEnabled()&&(c=e.getStorageId(),(d=e.get("reqNum"))?d++:d=1,e.set("reqNum",d),e.get("reqNum")==d?(l("ls",c),l("rqn",d)):(e.remove("reqNum"),e.clearStorageId(),1<d&&(l("ls",c),l("rqn",0))));l("rn",f.random());l("hid",g);l("ds",rb(t));t._firstPaint||(t._firstPaint=sb(),l("fp",t._firstPaint));if(k){h.name||(h.name=Math.round(65535*Math.random()));if(g=+h.name)0>g&&(g*=-1),g%=65535;l("wn",g||
f.fletcher(h.name));try{h.history&&l("hl",String(h.history.length))}catch(La){}}g="";this.sendTitle&&(g=this._getTitle(a));l("t",g);return q},_getTitle:function(a){a="undefined"==typeof a?(a=n.getDocumentTitle())?f.trim(a,bb):"":f.trim(a,bb);return a}});f.array2Props=function(a){var b=a.length,c={},d=c,e,f;for(e=0;e<b-1;e++)f=a[e],d[f]={},e<b-2&&(d=d[f]);d[f]=a[b-1];return c};var Q=A.inherit({sampling:1,counterId:26302566,_initComponent:function(){Q.superclass._initComponent.apply(this,arguments);
this._sender=new aa({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:E.href,title:"",referrer:"",vParams:a})}}),yb=L.inherit({resource:"webvisor",retry:!0,postParams:["wv-data"],sendPacket:function(a,b,c,d,e,g,l,k){var m,p;if(!a||!a.length)return!1;m=J.encode(a,!0);0==m.indexOf("AAAAAAAAADw")&&h.Error&&(p=Error(),"string"==typeof p.stack&&(new Q({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":d+1,"wv-check":f.fletcher(a),"wv-data":m};e={v:this._getVersion(),z:e,i:g};return this.send(a,e,l,k)}}),ta=$a.inherit({protocol:"",counterId:"",counterType:"",meta:null,maxBufferSize:7500,flushTimeout:3E4,storageKey:"visorbuff",active:!1,_initComponent:function(){this.storage=new O({counterId:this.counterId});this._sender=new yb({protocol:this.protocol,counterId:this.counterId,counterType:this.counterType});ta.superclass._initComponent.apply(this,
arguments)},onFlush:function(a,b,c){this._sender.sendPacket(a,b.url,b.hitId,c,b.timezone,b.timestamp)}}),mb=L.inherit({resource:"webvisor",transports:[T,N],postParams:["wv-data"],sendContent:function(a,b,c,d,e,f,h){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":J.encode(X.encode(a))};return 245E3<a["wv-data"].length?!1:this.send(a,{z:d,i:e,pct:b||""},f,h)}});f.isEqual=function(a,b){var c=!0;f.forEachKey(a,function(a,e){b.hasOwnProperty(a)&&
b[a]===e||(c=!1)});if(!c)return c;f.forEachKey(b,function(b,e){a.hasOwnProperty(b)&&a[b]===e||(c=!1)});return c};var k=A.inherit({_initComponent:function(){k.superclass._initComponent.apply(this,arguments);this._listeners=[]},on:function(a,b,c,d,e){e=k._getOpts(e);b=b.split(",");var f=b.length,l=this._listeners,g,n,p;for(p=0;p<f;p++)g=b[p],n=q(function(a){c.call(d||this,a||h.event)},"on"+g),l[l.length]=[a,g,c,d,e,n],a.addEventListener?a.addEventListener(g,n,k._prepOpts(e)):a.attachEvent&&a.attachEvent("on"+
g,n)},un:function(a,b,c,d,e){e=k._getOpts(e);var h=this._listeners,l=h.length,g,n;for(g=0;g<l;g++)if(n=h[g],n[0]==a&&n[1]==b&&n[2]==c&&n[3]==d&&f.isEqual(n[4],e)){h.splice(g,1);this._removeListener(a,b,n[5],e);break}},unAll:function(){var a=this._listeners,b=a.length,c,d;for(d=0;d<b;d++)c=a[d],this._removeListener(c[0],c[1],c[5],c[4]);a.length=0},_removeListener:function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,k._prepOpts(d)):a.detachEvent&&a.detachEvent("on"+b,c)}});k.supportsPassive=
function(){var a;if(k._supportsPassive!==Z)return k._supportsPassive;k._supportsPassive=!1;try{a=Object.defineProperty({},"passive",{get:function(){k._supportsPassive=!0}}),h.addEventListener("test",null,a)}catch(b){}return k._supportsPassive};k._getOpts=function(a){return f.mixin({capture:!0,passive:!0},a||{})};k._prepOpts=function(a){return k.supportsPassive()?a:!!a.capture};k.on=function(){k._instance||(k._instance=new k);k._instance.on.apply(k._instance,arguments)};k.un=function(){k._instance&&
k._instance.un.apply(k._instance,arguments)};n.getDocumentHTML=function(){var a,b="";a=g.documentElement;var c=a.outerHTML,d,e,f;if(c)a=c;else{c=a.attributes;d="";for(e=0;e<c.length;e++)(f=c[e])&&(d+=" "+f.name+'="'+(f.value||"")+'"');a="<html"+d+">"+a.innerHTML+"</html>"}if(c=g.doctype)b=c.publicId?' PUBLIC "'+c.publicId+'"':"",d=c.systemId?' "'+c.systemId+'"':"",b="<!DOCTYPE "+c.name+b+d+">\n";return b+a};n.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]};n.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};n.getElementChildren=function(a,b){var c=[],d,e,h,g,k;if(a&&(d=a.childNodes))for(g=0,k=d.length;g<k;g++)e=d[g],(h="INPUT"==e.nodeName&&e.type&&"hidden"==e.type.toLocaleLowerCase())||b&&e.nodeName!=b||f.mergeArrays(c,[e]);
return c};n.getElementNeighborPosition=function(a){var b=n.getElementParent(a),c,d,e,f;if(b)for(e=0,b=b.childNodes,d=a&&a.nodeName,f=0;f<b.length;f++)if(c=b[f]&&b[f].nodeName,d==c){if(a==b[f])return e;e++}return 0};n.getElementXY=function(a){var b,c;if(!a||!a.ownerDocument||"PARAM"==a.tagName||a==g.body||a==g.documentElement)return[0,0];if(a.getBoundingClientRect)return a=a.getBoundingClientRect(),b=n.getDocumentScroll(),[Math.round(a.left+b[0]),Math.round(a.top+b[1])];for(c=b=0;a;)b+=a.offsetLeft,
c+=a.offsetTop,a=a.offsetParent;return[b,c]};n.getDocumentSize=function(){var a=n.getRootElement(),b=n.getViewportSize();return[Math.max(a.scrollWidth,b[0]),Math.max(a.scrollHeight,b[1])]};n.getElementSize=function(a){var b;return a==g.body||a==g.documentElement?n.getDocumentSize():(b=a.getBoundingClientRect&&a.getBoundingClientRect())?[b.width,b.height]:[a.offsetWidth,a.offsetHeight]};n.getElementRegion=function(a){var b=n.getElementXY(a);a=n.getElementSize(a);return[b[0],b[1],a[0],a[1]]};n.calcChildrenChecksum=
function(a){return f.fletcher((a.innerHTML||"").replace(/(<[^>]*>|[\u0000-\u0020])/g,""))};n.getFormNumber=function(a){var b=g.getElementsByTagName("form"),c,d;c=0;for(d=b.length;c<d;c++)if(b[c]==a)return c;return-1};n.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};n.calcTextChecksum=function(a){var b="";a=a.childNodes;
var c,d;c=0;for(d=a.length;c<d;c++)a[c]&&3==a[c].nodeType&&(b+=a[c].nodeValue);return f.fletcher(b.replace(/[\u0000-\u0020]+/g,""))};n.calcAttribChecksum=function(a){var b="",c="width height align title alt name".split(" "),d;"IMG"==a.tagName&&(b+=a.src.toLowerCase());"A"==a.tagName&&(b+=a.href.toLowerCase());b+=String(a.className||"").toLowerCase();for(d=0;d<c.length;d++)a.getAttribute&&(b+=String(a.getAttribute(c[d])||"").toLowerCase());return f.fletcher(b.replace(/[\u0000-\u0020]+/g,""))};n.classNameExists=
function(a,b){try{return(new RegExp("(?:^|\\s)"+b+"(?:\\s|$)")).test(a.className)}catch(c){return!1}};n.getElementsByClassName=function(a,b){var c,d,e;b=b||g;c=b.getElementsByTagName("*");d=[];for(e=0;e<c.length;e++)n.classNameExists(c[e],a)&&d.push(c[e]);return d};var lb=!V(/webkit/)&&V(/gecko/),cb=A.inherit({hid:0,tz:0,ts:0,counterId:0,counterType:0,url:"",protocol:"",enabled:!1,_initComponent:function(){var a,b;if(this.isEnabled()){a=this._getStorage();b=a.read("visorc");"b"!=b&&"w"!=b&&(b="");
if(!a.isEnabled()||V("opera mini"))b="b";this._vc=b;"b"!=b&&(this._recorder=new ib(this.protocol,this.counterId,this.counterType,this.hid,this.counter));cb.superclass._initComponent.apply(this,arguments)}},start:function(a){var b,c;if(this.isEnabled()&&this._recorder){a=a||{};b=+a.recp;if(!isFinite(b)||0>b||1<b)c="w";c||(c=this.hid%1E4/1E4<b?"w":"b");this._getStorage().create("visorc",c,30);"w"==c?(this._recorder.start(),b=a.arch_type,(a=a.urls)&&b&&"none"!=b&&this._recorder.uploadPages(a,b)):this._recorder.stop()}},
isEnabled:function(){return this.enabled},getVc:function(){return this._vc},_getStorage:function(){this._storage||(this._storage=new P({counterId:this.counterId}));return this._storage}}),db=T.inherit({id:"RawBodyXHR",postParams:["body"],_setHeaders:function(){},_preparePostParams:function(a){return a.post.body||""}});f.arrayFilter=function(a,b,c){var d=[],e;for(e=0;e<a.length;e++)b.call(c,a[e],e,a)&&d.push(a[e]);return d};f.arrDiff=function(a,b){return f.arrayFilter(a,function(a){return-1===f.arrayIndexOf(b,
a)})};ca.parse=function(a){try{return JSON.parse(a)}catch(b){return null}};f.getTld=function(){var a;this._tld||(a=E.hostname.split("."),this._tld=a[a.length-1]);return this._tld};var Y=S.inherit({id:"script",request:function(a,b,c,d){var e,k=f.getNativeFunction("createElement",g)("script");if(!k)return c.call(d,!1),!1;e="_ymjsp"+f.random();h[e]=q(function(){try{delete h[e]}catch(l){h[e]=Z}c.apply(d,f.mergeArrays([!0],arguments));k.parentNode&&k.parentNode.removeChild(k)},"transport.script");k.type=
"text/javascript";k.src=this._buildUrl(a,f.mixin({wmode:5,callback:e},b));a=g.getElementsByTagName("head")[0];a||(a=g.createElement("head"),g.documentElement.appendChild(a));a.insertBefore(k,a.firstChild);return!0}}),Ia=aa.inherit({transports:[Y],trimParams:!0,_initComponent:function(){Ia.superclass._initComponent.apply(this,arguments);this._ilStorage=new O({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=J.encode(X.encode(f.trim(c,eb))));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})}}),zb=A.inherit({cid:3,cnt:0,_initComponent:function(){this._storage=new O},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 Ia({protocol:"https:",counterType:this.cnt,counterId:this.cid,sendTitle:!1,dontSendRequests:this.dontSendRequests,fake:!0}));return this._sender}}),Ab=A.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),Ta()?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,d=[];-1!=f.arrayIndexOf(this.syncTlds,a)&&d.push(a);-1!=f.arrayIndexOf(this.syncTlds,b)&&-1==f.arrayIndexOf(d,b)&&d.push(b);c=this._getLs().get("synced")||{};d=f.arrayFilter(d,function(a){return(c[a]||1)+864E5<+new Date});return d.length&&d||!1},_sync:function(a,b){var c,d,e=this;a.length?(d=new db({method:"GET"}),
b=b||function(){},d.request(this.baseUrl+this.baseTld+"/sync_cookie_get",null,function(d,h){var g,l,k,m=0,n=0,r,q;if(d){g=ca.parse(h);try{l=g.sync_token,q=g.sync_ok}catch(Gb){return b(),!1}c=f.arrDiff(a,q);if(m=c.length)for(k=e._getLs(),r=new K,g=0;g<c.length;g++)(function(a){r.request(e.baseUrl+a+"/sync_cookie_image_check",{body:l},function(c){n++;m===n&&b();c&&(c=k.get("synced")||{},c[a]=+new Date,k.set("synced",c))})})(c[g]);else b()}else b()})):b()},_getCn:function(){this._cn||(this._cn=new zb({fake:!0,
dontSendRequests:this.dontSendRequests}));return this._cn},_getLs:function(){this._ls||(this._ls=new O);return this._ls},_getTld:function(){var a=f.getTld();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=navigator.languages?navigator.languages[0]:r.getLanguage()}catch(b){}a=(a||"").toLowerCase().split("-")[0];return this.langToDomain[a]||"ru"}});r.isAndroid=q(function(){var a=
navigator.userAgent.toLowerCase();return-1<a.indexOf("android")&&-1<a.indexOf("mobile")&&navigator.platform.match(/^android|linux armv/i)},"",!0);f.isDev=function(){var a;if(f._isDevSetted)return f._isDev;try{f._isDevSetted=!0,a=new Image,Object.defineProperty(a,"id",{get:function(){f._isDev=!0}})}catch(b){}};var I={getMinutes:function(){return Math.floor(+new Date/1E3/60)}},da={_url:"https://mc.yandex.ru/user_storage_set?",_params:{},init:function(a){this._params=a||{}},save:function(a,b){this._getReq().request(this._url+
la.stringify({key:a,value:f.toJSON(b)}));this._getLs().set(a,b)},get:function(a){return{remote:this._params[a],local:this._getLs().get(a)}},getNum:function(a){a=this.get(a);return Math.max(+a.remote||0,+a.local||0)},_getLs:function(){this._ls||(this._ls=new O);return this._ls},_getReq:function(){this._req||(this._req=new K);return this._req}},Bb={sync:q(function(){var a=["30102","29009"],b={t:'UV|L7,!"T[rwe&D_>ZIb\\aW#98Y.PC6k'},c,d;this._enabled()&&(this._setStatus(!0),c=new db({method:"GET",withCredentials:!1}),
d=a.length,function m(f){var h=a[f];f<d?c.request("http://127.0.0.1:"+h+"/p",b,function(a,b){a?this._save(a,b,h):m.call(this,f+1)},this):this._save(!1)}.call(this,0))},"ds"),_save:function(a,b,c){var d=I.getMinutes();a?(new aa({protocol:"https:",counterType:0,counterId:42822899,sendTitle:!1,fake:!0})).sendDevice({data:f.trim(b),port:c}):d-=45;da.save("ds",d)},_is:function(){try{return!!h.Ya._metrika.dSync}catch(a){return!1}},_enabled:function(){return 60<I.getMinutes()-da.getNum("ds")&&0==y().hostname.search(/^(.*\.)?((ya|yandex(\-team)?)\.(com\.)?\w+|(auto|kinopoisk)\.ru|yadi\.sk|yastatic\.net)$/)&&
!this._is()&&r.isAndroid()&&!f.isDev()},_setStatus:function(a){try{h.Ya._metrika.dSync=a}catch(b){}}},D={getPos:function(a){var b=n.getRootElement(),c=n.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==Z?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=q(function(a,b){var c;b=b||g;if(c=f.getNativeFunction("createEvent",g)("Event"))c.initEvent(a,!1,!1),f.getNativeFunction("dispatchEvent",b)(c)},"evt.dispatch");k.ready=function(a){var b=h.performance,c;"object"==typeof b&&b.timing&&b.timing.domContentLoadedEventStart?a():(c=function(){k.un(g,"DOMContentLoaded",c);k.un(h,"load",c);a()},k.on(g,"DOMContentLoaded",c),k.on(h,
"load",c))};var ma={lastReferrer:null};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}):{}};r.isIE=function(){return g&&!g.addEventListener||!1};var ea={};ea._cookie=new P({onlyCurrentDomain:!0});ea.log=q(function(){var a=-1<E.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 Cb=L.inherit({resource:"clmap",retry:!0,transports:[K],sendClick:function(a,b,c,d){this.send({"page-url":a,"pointer-click":b},{},c,d)}}),Db=A.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(){var a,b,c;this._lastClick=null;this.hasQuota=!!this.quota;this._quota=this.quota;this._ignoreTags=[];if(this.ignoreTags)for(a=0;a<this.ignoreTags.length;a++)this.ignoreTags[a]&&f.mergeArrays(this._ignoreTags,[String(this.ignoreTags[a]).toUpperCase()]);this._cacheTags={};a=59;b=String.fromCharCode;for(c=0;c<this.tags.length;c++)this._cacheTags[this.tags[c]]=b(a),b(a),a++;this._sender=new Cb({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 n.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};var b,
c;this._isTrackingClick(a)&&(b=n.getElementSize(a.el),c=n.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,pa),b.join(":")),this._lastClick=a)},_isTrackingClick:function(a){var b,c,d;if(h.ymDisabledClickmap||f.isMetrikaPlayer()||!a.el)return!1;
b=a.el.tagName;if((2==a.button||3==a.button)&&"A"!=b||this.filter&&!this.filter(a.el,b))return!1;for(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;b=Math.abs(this._lastClick.pos[0]-a.pos[0]);c=Math.abs(this._lastClick.pos[1]-a.pos[1]);d=a.time-this._lastClick.time;if(this._lastClick.el==a.el&&b<this.DELTA_SAME_CLICKS&&c<this.DELTA_SAME_CLICKS&&
d<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+=n.getElementNeighborPosition(a)||"",a=a.parentNode;return f.trim(b,this.MAX_LEN_PATH)}});n.loadScript=function(a,b){b=b||h;var c=f.mixin({type:"text/javascript",charset:"utf-8",async:!0},a),d=b.document,e=f.getNativeFunction("createElement",d),g=e("script"),l,k;if(g){g.type=
c.type;g.charset=c.charset;g.src=c.src;c.async&&(g.async=!0);try{return l=d.getElementsByTagName("head")[0],l||(k=d.getElementsByTagName("html")[0],l=e("head"),k&&k.appendChild(l)),l.insertBefore(g,l.firstChild),g}catch(t){}}};var fb=A.inherit({_initComponent:function(){fb.superclass._initComponent.apply(this,arguments);this._executedMsgs={};k.on(h,"message",this._onMessage,this)},_buildRemoteIframe:function(a){var b=f.getNativeFunction("createElement",g)("div"),c=g.body||g.documentElement,d;c&&(b.innerHTML=
'<iframe name="RemoteIframe" allowtransparency="true" style="position: absolute; left: -999px; top: -999px; width: 1px; height: 1px;"></iframe>',d=b.firstChild,d.onload=function(){n.loadScript({src:a},d.contentWindow)},h._ym__remoteIframeEl=d,b.createShadowRoot||b.webkitCreateShadowRoot?(c.appendChild(b),b.removeChild(d),(c=b.createShadowRoot?b.createShadowRoot():b.webkitCreateShadowRoot())&&c.appendChild(d),h._ym__remoteIframeContainer=b):(c.appendChild(d),h._ym__remoteIframeContainer=d))},_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){var b;try{b=a.origin}catch(c){}b&&this._isAllowedOrigin(b)&&(b=ca.parse(a.data))&&"appendremote"===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,this._buildRemoteIframe(b.domain+"/cdn/inpage-remote/inpage-remote."+b.lang+".js"))}});f.pad=function(a){return(10>a?"0":"")+a};I.getTimestamp=function(){var a=new Date,a=[a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()],b="",c;for(c=0;c<a.length;c++)b+=f.pad(a[c]);return b};I.getTimezone=function(){return-(new Date).getTimezoneOffset()};f.bind=function(a,b){return function(){return a.apply(b||
this,arguments)}};var gb=A.inherit({counter:null,prefsEcommerce:null,dataLayerName:"dataLayer",allowedEvents:["add","delete","remove","purchase","detail"],_initComponent:function(){var a="customArr";gb.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){var b,
c;return a&&"function"==typeof a.push?(b=this,b._send(a),c=a.push,a.push=function(){b._send([].slice.call(arguments,0));c.apply(this,arguments)},!0):!1},_tryTimeout:function(){this._overridePush(h[this.dataLayerName])||f.setTimeout(this._tryTimeout,1E3,"dlObserver")},_send:function(a){var b=[],c=this.allowedEvents,d,e,g,h,k;d=0;for(k=a.length;d<k;d++)(e=a[d])&&e.ecommerce&&(g={},h=!1,f.forEachKey(e.ecommerce,function(a,b){0<=f.arrayIndexOf(c,a)&&(h=!0,g[a]=b)}),h&&b.push(g));b.length&&this.counter.params({__ym:{ecommerce:b}})}}),
Eb={match:function(){this.enabled()&&k.ready(function(){var a=f.getNativeFunction("createElement",g)("iframe");a.onload=function(){da.save("cm",I.getMinutes());n.removeNode(a)};a.setAttribute("style","position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;visibility:hidden");a.src="https://mc.yandex.ru/metrika/watch_match.html";g.documentElement.appendChild(a)})},enabled:function(){return 1440<I.getMinutes()-da.getNum("cm")&&"tr"==f.getTld()}};f.safeDecodeURIComponent=function(a){try{return decodeURIComponent(a)}catch(b){return""}};
la.parse=function(a,b){var c={},d,e,g,h;a=a&&a.replace(/^\?/,"")||"";if(a.length)for(d=a.split("&"),h=0;h<d.length;h++)d[h]&&(e=d[h].split("="),e[0]&&(g=f.safeDecodeURIComponent(e[0]),e=f.safeDecodeURIComponent((e[1]||"").replace(/\+/g,"%20")),b&&g in c?f.isArray(c[g])?c[g].push(e):c[g]=[c[g],e]:c[g]=e));return c};var W=[],E=y(),ua=I.getTimezone(),va=I.getTimestamp(),U=h.screen,R="791",wb=64,pa=r.isIE()?512:2048,xb=r.isIE()?512:2048,bb=r.isIE()?100:400,eb=100,wa="noindex",hb=/\.(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)|psd|rar|rss|rtf|sea|sfv|sit|sha1|svg|tar|tif?f|torrent|ts|txt|vob|wave?|wma|wmv|wmf|webm|ppt(x|m|b)?|xls(x|m|b)?|pdf|phps|png|xpi|g?zip)$/i,
Fb=+new Date,Ja,fa,ga;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();Ya._metrika.v=R;ga=!!Ya._metrika.oo;h.Ya.Metrika=function(a,b,c,d){var e=this;return q(function(){function m(z){var u=!1,m,H;if(Ya._metrika.hitParam[K]){if(1!=c||Ya._metrika.counters[K])return!1;u=!0}Ya._metrika.counters[K]=
e;Ya._metrika.hitParam[K]=1;e._webvisor=!d&&!ga&&(x&&x.webvisor||!1);e._directCampaign=x&&x.directCampaign;x&&x.trackHash&&Q(!0);d||u||(m=new cb({protocol:"https:",counterId:a,counterType:c,hid:ia,tz:ua,ts:va,url:E.href,enabled:e._webvisor}),e.replacePhones(),u=new Ab({dontSendRequests:ga}),H=function(d){var l=new Ia({protocol:"https:",counterType:c,counterId:a,trackHash:w,hitId:ia,webvisor:e._webvisor,counter:e,dontSendRequests:ga,counterNum:T}),u={ut:R,he:x?~~x.httpError:0,ad:1==c&&h.Ya&&h.Ya.Direct,
pv:!0,saveRef:!0};Ja=+new Date;l.sendHit({url:E.href,title:n.getDocumentTitle(),referrer:g.referrer,vParams:b,userParams:W,experiments:V,modes:u,visitColor:m.getVc(),hasPrerender:z,ts:va,tz:ua,callback:function(c,l){da.init(l);Eb.match();Bb.sync();ea.log("PageView. Counter ",a,". URL: ",E.href,". Referrer: "+g.referrer,". Params: ",b);fa||(fa=+new Date);c=c||{};m.start(c.webvisor);var u=c.mp2,z,n;n=new P({counterId:a});n.erase("mp2_substs");if(u){b:{z=u.conditions;var p;if(z&&z.length)for(p=0;p<z.length;p++){var B;
B=z[p];if("ref"==B.type)B=tb(B);else if("adv"==B.type){var H,r,t,q,C;H=B;q=Ya._metrika.counter._directCampaign;r=H.ServiceNamePattern;var ka=H.RefererPattern;B=q?H.direct_orders:H.direct_camp;var y=g.referrer,x=la.parse(E.search),w=ub(E.search,E.hash),A={};t=["source","medium","campaign","term","content"];for(C=0;C<t.length;C++)x["utm_"+t[C]]&&(A[t[C]]=x["utm_"+t[C]]);var D=q?"direct.yandex.ru":w&&w.service||A.source;C=!1;if(!C&&r&&r.length)for(t=0;t<r.length;t++)if((new RegExp(r[t],"i")).test(D)){C=
!0;break}if(!C&&!H.yandex_direct&&ka&&ka.length)for(r=0;r<ka.length;r++)if((new RegExp(ka[r],"i")).test(y)){C=!0;break}!C&&H.google_adwords&&x.gclid&&(C=!0);if(C&&B&&B.length&&(C=!1,q=q||w&&w.campaign||A&&A.campaign))for(H=0;H<B.length;H++)if(B[H]==q){C=!0;break}B=C}else B=!1;if(B){z[p].track_id&&n.create("mp2_track",z[p].track_id,43200);break b}}}z=n.read("mp2_track");u=u.substs&&u.substs[z];z&&u?(n.create("mp2_substs",f.toJSON(u)),n=Xa(u),e.params("__ym",n?"mp_trackid":"mp_trackid_bad",z)):Za()}else Za();
k.on(h,"load",e.replacePhones,e);e._inited=!0;d&&d()}})},u.sync(H));A();x&&(x.enableAll?(l(!0),p(!0),I()):(x.clickmap&&p(x.clickmap),x.trackLinks&&l(x.trackLinks),x.accurateTrackBounce&&I(x.accurateTrackBounce)),(x.ecommerce||x.useDataLayer)&&new gb({counter:e,prefsEcommerce:x.ecommerce}),x.triggerEvent&&nb(function(){D.dispatchCustomEvent("yacounter"+a+"inited")},0))}function l(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}e._trackLinks=
b}function A(){l(!1);k.on(g,"click",function(a){e._trackLinks&&e._trackLinks.on&&t(a)})}function t(a){var b=ob(a),c,d,e,g;if(b){a=!1;d=(c=""+b.href)?c.split(/\?/)[0]:"";e=function(a){var d=Ua(b);M.sendClickLink({url:c,title:c==d?"":d,modes:a})};if(hb.test(d)||hb.test(c)||Va(c,ba)||Va(d,ba))a=!0;g=n.classNameExists(b,"ym-disable-tracklink");d=n.classNameExists(b,"ym-external-link");g||(g={ln:!0,dl:a},d?e(g):(d=b.hostname||f.parseUrl(b.href).hostname||"",pb(y().hostname,d)?a?(g.ln=!1,e(g)):(a=Ua(b))&&
a!=c&&ta.set("il",f.trim(a,eb)):c&&-1!=c.search(/^ *(data|javascript):/i)||(g.ut=wa,e(g))))}}function p(b){"undefined"==typeof b&&(b=!0);!0===b&&(b={});e._clickmap&&e._clickmap.destroy();b&&(e._clickmap=new Db({dontSendRequests:ga,filter:b.filter,ignoreTags:b.ignoreTags,quota:b.quota,isTrackHash:b.isTrackHash,protocol:"https:",counterId:a,counterType:c,startTime:Fb}))}function J(a,b){function c(){var c;t||(p&&f.clearTimeout(p),c=m?z:z+ +new Date-n,c=b-c,0>c&&(c=0),p=f.setTimeout(function(){t=!0;e(!1);
a()},c,"trackUserTime"))}function d(){u||(l=!0,m=!1,u=!0,c())}function e(a){var b;for(b=0;b<q.length;b+=3)if(a)k.on(q[b],q[b+1],q[b+2]);else k.un(q[b],q[b+1],q[b+2])}var l=!1,u=!1,m=!0,z=0,n=+new Date,p=null,t=!1,q;r.isIE()?f.setTimeout(a,b,"trackUserTime"):(q=[h,"blur",function(){m=l=u=!0;z+=+new Date-n;n=+new Date;c()},h,"focus",function(){l||u||(z=0);n=+new Date;l=u=!0;m=!1;c()},g,"click",d,g,"mousemove",d,g,"keydown",d,g,"scroll",d],e(!0),c())}function I(b){var c,d;"number"!=typeof b&&(b=15E3);
e._isAccurateTrackBounce||(e._isAccurateTrackBounce=!0,c=new O({counterId:a}),d=c.get("lastHit"),c.set("lastHit",+new Date),((c=c.get("lastHit"))&&(!d||d<c-18E5)||!qb(g.referrer,y().href)||.1>Math.random())&&J(function(){e.notBounce()},b))}function U(a){var b=function(){var a=y().hash.split("#")[1],b;if("undefined"==typeof a)return!1;b=a.indexOf("?");0<b&&(a=a.substring(0,b));return a},c;c=b();(function C(){var d=b();d!==c&&(a(),c=d);ja=f.setTimeout(C,200,"trackHash")})()}function Q(a){if(!1===a)w&&
("onhashchange"in h?k.un(h,"hashchange",S):f.clearTimeout(ja),w=!1);else if(a=S,!w){if("onhashchange"in h)k.on(h,"hashchange",a);else U(a);w=!0}M.setTrackHash(w);e._trackHash=w}function S(){var a={ut:R,ad:1==c&&h.Ya&&h.Ya.Direct,wh:!0,saveRef:!0,pv:!0};X=ma.lastReferrer=Y;M.sendAjaxHit({url:y().href,title:n.getDocumentTitle(),referrer:X,modes:a});Y=y().href}function N(a,b,c){a=Da.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&&
e.params.apply(e,b)}var K,R="",V,W,x,X="",Y=ma.lastReferrer=E.href,T,M,ba,pa,ta,w,G,oa,ia;Ya._metrika.counter||(Ya._metrika.counter=e);"object"==typeof a&&(x=a,d=a.defer,R=a.ut,c=a.type,b=a.params,W=a.userParams,V=x.experiments,oa=x.nck,a=a.id);a=a||0;/^\d+$/.test(a)||(a=0);c=c||0;K=a+":"+c;if(Ya._metrika.counters[K])return Ya._metrika.counters[K];ia=Ya._metrika.hitId;Ya._metrika.counterNum++;T=Ya._metrika.counterNum;oa||(L.initCookie(),ab.init());L.retransmit();M=new aa({protocol:"https:",counterType:c,
counterId:a,hitId:ia,counter:e,dontSendRequests:ga,counterNum:T});e.replacePhones=q(function(){var b,c;try{(b=(new P({counterId:a})).read("mp2_substs"))&&(c=ca.parse(b))&&Xa(c,!0)}catch(B){}return e},"counter.replacePhones");e.reachGoal=q(function(b,c,d,f){2<=arguments.length&&"function"===typeof c&&(f=d,d=c,c=Z);ea.log("Reach goal. Counter: "+a+". Goal id: "+b+". Params: ",c);M.sendGoal(b,{vParams:c,callback:d,ctx:f});return e},"counter.reachGoal");e.trackLinks=q(function(a){l(a);return e},"counter.trackLinks");
ta=new O({counterId:a});e.hit=q(function(b,c,d,g,h,k){b&&(f.isObject(c)&&(d=c.referer,g=c.params,h=c.callback,k=c.ctx,c=c.title),ea.log("PageView. Counter "+a,". URL: "+b,". Referrer: "+d,". Params: ",g),M.sendHit({url:b,title:c,referrer:d,vParams:g,callback:h,ctx:k}));return e},"counter.hit");e.params=q(function(b){var c=arguments.length,d=c,g,h,k=[].slice.call(arguments,0);b&&(1<arguments.length&&(f.isFunction(arguments[c-1])?(g=arguments[c-1],d=c-1):f.isFunction(arguments[c-2])&&(g=arguments[c-
2],h=arguments[c-1],d=c-2),k=[].slice.call(k,0,d),1<k.length&&(k=[f.array2Props(k)])),ea.log("User params. Counter "+a+". Params: ",k[0]),M.sendParams(k[0],g,h));return e},"counter.params");e.file=q(function(a,b){a&&(b=b||{},M.sendFileUpload({url:a,title:b.title,vParams:b.params,callback:b.callback,ctx:b.ctx}));return e},"counter.file");e.extLink=q(function(a,b){a&&(b=b||{},M.sendExtLink({url:a,title:b.title,vParams:b.params,callback:b.callback,ctx:b.ctx}));return e},"counter.extLink");e.notBounce=
q(function(a){var b=0;a=a||{};Ja&&fa&&(b=fa-Ja);M.sendNotBounce(b,{callback:a.callback,ctx:a.ctx});return e},"counter.notBounce");ba=[];e.addFileExtension=function(a){"string"==typeof a?ba.push(a):ba=ba.concat(a);return e};e.clickmap=function(a){p(a);return e};e.accurateTrackBounce=function(a){I(a);return e};var ja=null;w=!1;e.trackHash=function(a){Q(a);return e};f.arrayEvery=function(a,b,c){var d;for(d=0;d<a.length;d++)if(!b.call(c,a[d],d,a))return!1;return!0};var Da={requiredEcommerceFields:["currency",
"goods"],parseValidate:function(a,b){var c=this.validate(a,b),d;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(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}}};e.ecommerceDetail=
q(function(a,b){N("detail",a,b);return e},"ecommerce.detail");e.ecommerceAdd=q(function(a,b){N("add",a,b);return e},"ecommerce.add");e.ecommerceRemove=q(function(a,b){N("remove",a,b);return e},"ecommerce.remove");e.ecommercePurchase=q(function(a,b){N("purchase",a,b);return e},"ecommerce.purchase");e.userParams=q(function(a,b,c){f.isObject(a)&&e.params({__ymu:a},b||function(){},c);return e},"uparams");e.experiments=q(function(a,b,c){M.sendExperiments({callback:b,ctx:c,experiments:a});return e},"exps");
e.id=e.setUserID=q(function(a,b,c){(f.isString(a)||f.isNumber(a))&&e.params({__ym:{user_id:a}},b||function(){},c);return e},"id");pa=new P;e.getClientID=q(function(){return pa.read("uid")},"guid");e.enableAll=function(){l(!0);p(!0);I();return e};e.uploadPage=function(){};e._performanceTiming=Wa;a&&("prerender"==g.webkitVisibilityState?(M.sendPrerenderHit({url:E.href,title:n.getDocumentTitle(),referrer:g.referrer}),G=function(){"prerender"!=g.webkitVisibilityState&&(k.un(g,"webkitvisibilitychange",
G),m(!0))},k.on(g,"webkitvisibilitychange",G)):m(!1))},"init")()};(function(){if(h.performance&&"function"===typeof performance.getEntries){var a={2343947156:1,1996539654:1,2065498185:1,823651274:1,12282461:1,1555719328:1,1417229093:1,138396985:1},b=performance.getEntries(),c={},d,e,g,k;for(k=0;k<b.length;k++)d=b[k],e=d.name.replace(/^https?:\/\//,"").split("?")[0],g=f.fnv32a(e),a[g]&&!c[e]&&0<d.duration&&(c[e]={dns:Math.round(d.domainLookupEnd-d.domainLookupStart),tcp:Math.round(d.connectEnd-d.connectStart),
duration:Math.round(d.duration),response:Math.round(d.responseEnd-d.requestStart),pages:E.href});(new Q({sampling:.001})).logParams({timings8:c})}})();h.Ya._metrika.remoteCtrlInited||(h.Ya._metrika.remoteCtrlInited=!0,new fb);h.Ya.Metrika.counters=function(){var a=[];f.forEachKey(h.Ya._metrika.counters,function(b,c){var d=b.split(":");a.push({id:+d[0],type:+d[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&&Ya.Metrika&&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)});(function(){function a(a){try{delete h[a]}catch(m){h[a]=Z}}var b=h.yandex_metrika_callback,c=h.yandex_metrika_callbacks,d;"function"==typeof b&&b();if("object"==typeof c)for(b=0;b<c.length;b++)if(d=c[b])c[b]=null,d();a("yandex_metrika_callback");a("yandex_metrika_callbacks")})();
h.Ya.Metrika.informer=function(a){var b=!!Ya.Metrika._informer;Ya.Metrika._informer=a;b||n.loadScript({src:"https://informer.yandex.ru/metrika/informer.js"})};k.on(g,"click",q(function(a){var b=D.getTarget(a),c,d;b&&"ym-advanced-informer"==b.className&&(c=b.getAttribute("data-lang"),d=b.getAttribute("data-cid"),Ya.Metrika.informer({i:b,id:+d,lang:c}),D.prevent(a))},"adv-inf"),null,{passive:!1})})(this,this.document);
