123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- (function(h,f,L){var Y;function w(a,b){return function(){try{return a.apply(this,arguments)}catch(c){oa(c,b)}}}function oa(a,b){if(0.01>Math.random())try{(new Z).log("jserrs",$,a.message,b,B.href,O,"string"==typeof a.stack&&a.stack.replace(/\n/g,"\\n"))}catch(c){var e=["cp: "+b,a.name+": "+a.message,"debug: "+O,"code: "+$,"stack: "+a.stack];(new Image).src="//an.yandex.ru/jserr/101500?cnt-class=100&errmsg="+encodeURIComponent(e.join("; ").replace(/\r?\n/g,"\\n"))}}function z(){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 K=b[e];a[K]=""+d[K]}}catch(g){B&&(a=B)}return a}function lb(a){return a?(""+a).replace(/^\s+/,"").replace(/\s+$/,""):""}function ga(a){return-1!==(""+h.navigator.userAgent).toLowerCase().search(a)}function pa(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 RegExp("\\.("+c.join("|")+")$","i").test(a)}function La(a){a=a.target||a.srcElement;if(!a)return!1;3==a.nodeType&&(a=a.parentNode);for(var b=a.nodeName.toString().toLowerCase();a.parentNode&&a.parentNode.nodeName&&("a"!=b&&"area"!=b||!a.href);)a=a.parentNode,b=a.nodeName.toString().toLowerCase();return a.href?a:!1}function Ma(a,b){return(a?a.replace(/^www\./,""):"")==(b?b.replace(/^www\./,
- ""):"")}function Na(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 qa(){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 Oa(a){var b=[],
- c=a._lastPerformanceTiming,e=qa();if(c)for(var d=0,h=c.length;d<h;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 Pa(){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 Qa(a){var b=f.referrer||"";if(RegExp("^https?://"+B.host+"/").test(b))return!1;for(var c=a.patterns,e=0;e<c.length;e++)if(b.match(RegExp(c[e],"i"))){var d=a.params||[];if(d.length)for(var h=W((RegExp.$1||"").replace(/\+/g,"%20")),g=0;g<d.length;g++){if(h==W(d[g]))return!0}else return!0}return!1}function ra(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,h=a[e].text,g=d.charAt(0),d=d.slice(1);if("#"==g){if(g=f.getElementById(d))c=!0,b&&P.unshift([g,
- g.innerHTML]),g.innerHTML=h}else if("."==g)for(g=l.getElementsByClassName(d),d=0;d<g.length;d++){var c=!0,k=g[d],s=h;b&&P.unshift([k,k.innerHTML]);k.innerHTML=s}}return c}function ta(){for(var a=0;a<P.length;a++)P[a][0].innerHTML=P[a][1]}function Ra(a,b){var c,e,d="",g;a=a&&a.replace(/^\?/,"");b=b&&b.replace(/^#/,"")||"";if(a)for(e=a.split("&"),c=0;c<e.length;c++)g=e[c].split("="),"_openstat"===g[0]&&(d=g[1]);var h=b.split("?");for(c=0;c<h.length;c++){var f=h[c].split("&");for(e=0;e<f.length;e++)g=
- f[e].split("="),"_openstat"===g[0]&&(d=g[1])}d&&(d=-1<d.indexOf(";")?W(d):Sa(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 W(a){try{return decodeURIComponent(a)}catch(b){return""}}function Sa(a){for(;a.length%4;)a+="=";var b,c,e,d,g,h=0,f="";do{b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++));c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++));
- d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++));g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++));if(0>b||0>c||0>d||0>g)return null;e=b<<18|c<<12|d<<6|g;b=e>>16&255;c=e>>8&255;e&=255;f=64==d?f+String.fromCharCode(b):64==g?f+String.fromCharCode(b,c):f+String.fromCharCode(b,c,e)}while(h<a.length);a=f;d="";for(b=f=h=g=0;g<a.length;)h=a.charCodeAt(g),128>h?(d+=String.fromCharCode(h),g++):191<h&&224>h?(f=a.charCodeAt(g+
- 1),d+=String.fromCharCode((h&31)<<6|f&63),g+=2):(f=a.charCodeAt(g+1),b=a.charCodeAt(g+2),d+=String.fromCharCode((h&15)<<12|(f&63)<<6|b&63),g+=3);return d}function ua(a){try{delete h[a]}catch(b){h[a]=L}}function va(a){var b=f.createElement("script");b.type="text/javascript";b.async=!0;b.src=a;try{var c=f.getElementsByTagName("html")[0];f.getElementsByTagName("head")[0]||c.appendChild(f.createElement("head"));var e=f.getElementsByTagName("head")[0];e.insertBefore(b,e.firstChild)}catch(d){}}function Ta(a,
- b,c,e,d,K){function q(a){var b=(new Date).getTime();a&&b<a&&(Ua+=a-b+R);g.setTimeout(function(){q(b)},R,"timeCorrector")}function sa(){var a=(new Date).getTime()+Ua;a<Va&&(a=Va+R/2);return Va=a}function s(){return Math.round((sa()-kb)/Q)}function p(a,b){b=Math.max(0,Math.min(b,65535));g.mergeArrays(a,[b>>8,b&255])}function r(a,b){g.mergeArrays(a,[b&255])}function m(a,b){for(b=Math.max(0,b|0);127<b;)g.mergeArrays(a,[b&127|128]),b>>=7;g.mergeArrays(a,[b])}function v(a,b){255<b.length&&(b=b.substr(0,
- 255));g.mergeArrays(a,[b.length]);for(var c=0;c<b.length;c++)p(a,b.charCodeAt(c))}function u(a,b){m(a,b.length);for(var c=0;c<b.length;c++)m(a,b.charCodeAt(c))}function B(a,b,c,e,d,g){for(;c&&(!c.offsetWidth||!c.offsetHeight);)c=l.getElementParent(c);if(!c)return null;var h=c[C];if(!h||0>h)return null;var n={mousemove:V,click:Ja,dblclick:Ka,mousedown:$,mouseup:Ha,touch:na}[b];if(!n)return null;var f=l.getElementXY(c);c=[];r(c,n);m(c,a);m(c,h);m(c,Math.max(0,e[0]-f[0]));m(c,Math.max(0,e[1]-f[1]));
- /^mouse(up|down)|click$/.test(b)&&(a=d||g,r(c,2>a?La:a==(d?2:4)?Na:Ma));return c}function F(a,b,c,e){b=b[C];if(!b||0>b)return null;var d=[];r(d,Ia);m(d,a);m(d,b);m(d,c[0]);m(d,c[1]);r(d,0);r(d,0);r(d,e);return d}function G(a,b){var c=[];r(c,Z);m(c,a);m(c,b[0]);m(c,b[1]);return c}function J(a,b,c){var d=[];c=c[C];if(!c||0>c)return null;r(d,fa);m(d,a);m(d,b[0]);m(d,b[1]);m(d,c);return d}function H(a,b,c){var d=[];r(d,Fa);m(d,a);m(d,b[0]);m(d,b[1]);m(d,c[0]);m(d,c[1]);return d}function E(a,b,c,d){var e=
- [];r(e,ga);m(e,a);p(e,b);r(e,c);a=d[C];if(!a||0>a)a=0;m(e,a);return e}function x(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=[];r(e,Ga);m(e,a);u(e,c);u(e,d);return e}function S(a){var b=[];r(b,va);m(b,a);return b}function aa(a){var b=[];r(b,pa);m(b,a);return b}function M(a){var b=[];r(b,qa);m(b,a);return b}function Cb(a,b){var c=[];r(c,ra);m(c,a);m(c,b[C]);return c}function Db(a,b){var c=
- [];r(c,ta);m(c,a);m(c,b[C]);return c}function ba(a,b,c){var d=[];r(d,ua);m(d,a);m(d,b[C]);v(d,String(c));return d}function X(a){var b=a[C];if(!b||0>b||!/^INPUT|SELECT|TEXTAREA$/.test(a.nodeName)||!a.form||l.classNameExists(a.form,"-metrika-noform"))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,g=a.form.elements,h=g.length,n=0,f=0;n<h;n++)if(g[n].name==a.name){if(g[n]==a){e=f;break}f++}if(0>e)return null;g=[];r(g,ja);m(g,b);m(g,c);m(g,d);u(g,a.name||"");m(g,e);return g}function N(a,b){var c=l.getFormNumber(b);if(0>c)return null;for(var d=b.elements,e=d.length,h=[],n=0;n<e;n++)if(!l.isEmptyField(d[n])){var f=d[n][C];f&&0<f&&g.mergeArrays(h,[f])}d=[];r(d,ma);m(d,a);m(d,c);m(d,h.length);for(c=0;c<h.length;c++)m(d,
- h[c]);return d}function ca(){var a=[];r(a,oa);return a}function n(a,b,c){a=a.apply(h,b);ea.append(a,c)}function y(a){if(a[C])a:{var b=s(),c=a[C];if(0<c){var d=[];a=l.getElementRegion(a);var e=wa[c],g=a[0]+"x"+a[1],h=a[2]+"x"+a[3];g!=e.pos&&(e.pos=g,r(d,ka),m(d,b),m(d,c),m(d,a[0]),m(d,a[1]));h!=e.size&&(e.size=h,r(d,la),m(d,b),m(d,c),m(d,a[2]),m(d,a[3]));if(d.length){a=d;break a}}a=null}else{(c=l.getElementParent(a))&&y(c);a[C]=Wa;wa[Wa]={};Wa++;if(a.nodeName)if(c=+a[C],!isFinite(c)||0>=c)b=null;else{var d=
- Ra,e=0,n=l.getElementParent(a),g=n&&n[C]?n[C]:0;0>g&&(g=0);var h=a.nodeName.toUpperCase(),f=jb[h];f||(d|=Oa);var K=l.getElementNeighborPosition(a);K||(d|=Pa);var q=l.getElementRegion(a);(n=n?l.getElementRegion(n):null)&&q[0]==n[0]&&q[1]==n[1]&&q[2]==n[2]&&q[3]==n[3]&&(d|=mb);wa[c].pos=q[0]+"x"+q[1];wa[c].size=q[2]+"x"+q[3];a.id&&"string"==typeof a.id&&(d|=nb);(n=l.calcTextChecksum(a))&&(d|=Qa);var k=l.calcAttribChecksum(a);k&&(e|=Sa);var t;b:{t=l.getElementChildren(l.getElementParent(a),a.tagName);
- for(var D=0;D<t.length;D++)if((!t[D].id||"string"!=typeof t[D].id)&&l.calcAttribChecksum(t[D])==k&&l.calcTextChecksum(t[D])==n){t=!0;break b}t=!1}t&&(d|=ob,b=l.calcChildrenChecksum(a));t=[];r(t,da);m(t,c);r(t,d);m(t,g);f?r(t,f):v(t,h);K&&m(t,K);d&mb||(m(t,q[0]),m(t,q[1]),m(t,q[2]),m(t,q[3]));d&nb&&v(t,a.id);n&&p(t,n);d&ob&&p(t,b);r(t,e);k&&p(t,k);b=t}else a[C]=-1,b=null;ea.append(b,void 0);a=X(a)}ea.append(a,void 0)}function t(a){var b=I.getTarget(a);if(b&&"SCROLLBAR"!=b.nodeName){if(b&&/^INPUT|SELECT|TEXTAREA|BUTTON$/.test(b.tagName))if(b[C])y(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]&&y(c[e]);else y(b)}else y(b);n(B,[s(),a.type,b,I.getPos(a),a.which,a.button])}}function D(a){t(a);a:{var b,c;h.getSelection?(a=h.getSelection(),b=a.toString(),c=a.anchorNode):f.selection&&f.selection.createRange&&(a=f.selection.createRange(),b=a.text,c=a.parentElement());if("string"==typeof b){try{for(;c&&1!=c.nodeType;)c=c.parentNode}catch(d){break a}c&&Xa(c)||c&&(/(?:^|\s)-metrika-nokeys(?:\s|$)/.test(c.className)||
- l.getElementsByClassName("-metrika-nokeys",c).length)||b==Za||(Za=b,n(x,[s(),b]))}}}function A(a){var b=sa(),c=b-pb;if(!(c<T)){var d=I.getPos(a),e=$a[0]-d[0],g=$a[1]-d[1],e=e*e+g*g;0>=e||16>e&&100>c||20>c&&256>e||(pb=b,$a=d,t(a))}}function xa(){var a=l.getDocumentScroll(),b=sa();b-qb<T||10>Math.abs(a[0]-ab[0])&&10>Math.abs(a[1]-ab[1])||(qb=b,ab=a,n(G,[s(),a]))}function rb(a){a=I.getTarget(a);var b=Math.random(),c=[a.scrollLeft,a.scrollTop];if(a.localId){if(b=bb[a.localId],!b||10>Math.abs(c[0]-b[0])&&
- 10>Math.abs(c[1]-b[1]))return}else{for(;bb[b];)b=Math.random();a.localId=b}bb[a.localId]=c;a!==f&&(y(a),n(J,[s(),c,a]))}function cb(){n(H,[s(),l.getViewportSize(),l.getDocumentSize()])}function ya(){n(ca,[],!0)}function sb(a){return(a.shiftKey?tb:0)|(a.ctrlKey?db:0)|(a.altKey?ub:0)|(a.metaKey?Ta:0)|(a.ctrlKey||a.altKey?za:0)}function Xa(a){return"INPUT"==a.tagName?"password"==a.type||a.name&&vb.test(a.name)||a.id&&vb.test(a.id):!1}function wb(a,b,c){a=I.getTarget(a);Xa(a)||/(?:^|\s)-metrika-nokeys(?:\s|$)/.test(a.className)||
- (y(a),n(E,[s(),b,c,a]))}function xb(a){var b=a.keyCode,c=sb(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&za)19==b&&(c&~za)==db&&(b=144),wb(a,b,c|za),eb=!1,g.setTimeout(function(){eb=!0},1),67==b&&c&db&&!(c&ub||c&tb)&&fb()}function yb(a){eb&&!gb&&0!==a.which&&(wb(a,a.charCode||a.keyCode,sb(a)),gb=!0,g.setTimeout(function(){gb=!1},1))}function fb(){hb||(hb=!0,
- Za&&n(S,[s()]),g.setTimeout(function(){hb=!1},1))}function ib(){ha||(ha=!0,n(aa,[s()]))}function ia(){ha&&(ha=!1,n(M,[s()]))}function zb(a){(!ha||a&&!a.fromElement)&&ib()}function Ab(a){a&&!a.toElement&&ia()}function Aa(a){if((a=I.getTarget(a))&&/^INPUT|SELECT|TEXTAREA|BUTTON$/.test(a.tagName)){if(a[C])y(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]&&y(b[d]);else y(a)}n(Cb,[s(),a])}}function Ba(a){(a=I.getTarget(a))&&
- /^INPUT|SELECT|TEXTAREA|BUTTON$/.test(a.tagName)&&(y(a),n(Db,[s(),a]))}function U(a){a=I.getTarget(a);if(!(Xa(a)||a&&/(?:^|\s)-metrika-nokeys(?:\s|$)/.test(a.className))&&a&&/^INPUT|SELECT|TEXTAREA$/.test(a.tagName)){var b=/^(checkbox|radio)$/.test(a.type)?a.checked:a.value;y(a);n(ba,[s(),a,b])}}function L(a){a=I.getTarget(a);if(!l.classNameExists(a,"-metrika-noform")&&"FORM"==a.nodeName){for(var b=a.elements,c=0;c<b.length;c++)l.isEmptyField(b[c])||y(b[c]);n(N,[s(),a],!0)}}function Y(a){xa();if(a.touches&&
- a.touches.length){var b=I.getTarget(a);O=typeof b+" - "+String(b);if(b&&b!=f){y(b);for(var c=0;c<a.touches.length;c++)n(B,[s(),"touch",b,[a.touches[c].pageX,a.touches[c].pageY],0,0])}}}function W(a){var b=I.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&&(y(b),n(F,[s(),b,I.getPos(a),c]))}}function P(a){(a=I.getTarget(a))&&"BODY"==a.tagName&&ea.append([],!0)}var ea=new Bb({protocol:a,counterId:b,counterType:c,meta:{url:z().href,
- hitId:d,timezone:Ca,timestamp:Da}}),R=20,Q=50,T=10,da=1,V=2,Z=3,fa=16,$=4,ga=5,ja=7,ka=9,la=10,ma=11,na=12,oa=13,pa=14,qa=15,ra=17,ta=18,ua=19,va=27,Fa=28,Ga=29,Ha=30,Ia=31,Ja=32,Ka=33,La=1,Ma=2,Na=4,ob=1,Oa=2,Pa=4,mb=8,Qa=16,nb=32,Ra=64,Sa=2,ub=1,tb=2,db=4,Ta=8,za=16,jb={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},
- Ua=0;q(0);var Va=0,Wa=1,pb=0,$a=[0,0],qb=0,ab=[0,0],bb={},vb=/^(password|passwd|pswd)$/,eb=!0,gb=!1,Za="",hb=!1,ha=!0,kb=sa(),C="metrikaId_"+Math.random(),wa={},Ea=":submit"+Math.random();if("MetrikaPlayer"!=h.name){k.on(f,"mousemove",A);k.on(f,"click,dblclick,mousedown",t);k.on(f,"mouseup",D);k.on(h,"scroll",xa);if("onmousewheel"in f)k.on(f,"mousewheel",W);else k.on(f,"wheel",W);k.on(h,"beforeunload",ya);if(!Eb)k.on(h,"unload",ya);k.on(h,"resize",cb);k.on(f,"keydown",xb);k.on(f,"keypress",yb);k.on(f,
- "copy",fb);k.on(f,"touchmove,touchstart",Y);if(f.body)k.on(f,"mouseleave",P);f.attachEvent&&!h.opera?(k.on(f,"focusin",zb),k.on(f,"focusout",Ab)):(k.on(h,"focus",ib),k.on(h,"blur",ia),k.on(f,"blur",ia));f.addEventListener?(k.on(f,"scroll",rb),k.on(f,"focus",Aa),k.on(f,"blur",Ba),k.on(f,"change",U),k.on(f,"submit",L)):f.attachEvent&&(k.on(f,"focusin",Aa),k.on(f,"focusout",Ba),function(){for(var a=f.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",U);k.on(a[b],"submit",L)}}());(function(){var a=f.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][Ea]=c,a[b].submit=function(){L({target:this});return this[Ea]()}}})();"0:0"!=l.getDocumentScroll().join(":")&&xa();cb();K.uploadPage=w(function(e){if("function"==typeof h.toStaticHTML&&-1<h.toStaticHTML.toString().indexOf("NoScript"))return!1;var g=f.documentElement;
- if(g&&19E4<(""+g.innerHTML).length)return!1;var n=h.XMLHttpRequest?new h.XMLHttpRequest:new ActiveXObject("Msxml2.XMLHTTP"),q=l.getDocumentCharset(),K="text/html"+(q?";charset="+q:""),k=new Fb({protocol:a,counterId:b,counterType:c});if("html"==e)return e=RegExp("<script [^>]*?//mc\\.yandex\\.ru/watch/.*?\x3c/script>","gi"),k.sendContent(l.getDocumentHTML().replace(e,""),K,d,Ca,Da),!0;n&&(n.open("get",z().href,!0),n.onreadystatechange=w(function(){if(4==n.readyState){var a=n.getResponseHeader("content-type");
- q&&-1===a.indexOf("charset=")&&(a=K);k.sendContent(n.responseText,a,d,Ca,Da)}},"updatePage.1"),n.overrideMimeType&&q&&n.overrideMimeType(K),n.send(null));return!0},"uploadPage")}return{start:function(){ea.activate()},stop:function(){ea.clear();k.un(f,"mousemove",A);k.un(f,"click,dblclick,mousedown",t);k.un(f,"mouseup",D);k.un(f,"mousewheel,wheel",W);k.un(h,"scroll",xa);k.un(h,"beforeunload",ya);k.un(h,"unload",ya);k.un(h,"resize",cb);k.un(f,"keydown",xb);k.un(f,"keypress",yb);k.un(f,"copy",fb);k.un(f,
- "touchmove,touchstart",Y);f.body&&k.un(f,"mouseleave",P);k.un(f,"focusin",zb);k.un(f,"focusout",Ab);k.un(h,"focus",ib);k.un(h,"blur",ia);k.un(f,"blur",ia);f.removeEventListener?(k.un(f,"scroll",rb),k.un(f,"focus",Aa),k.un(f,"blur",Ba),k.un(f,"change",U),k.un(f,"submit",L)):f.detachEvent&&(k.un(f,"focusin",Aa),k.un(f,"focusout",Ba),function(){for(var a=f.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",U);k.un(a[b],"submit",L)}}());(function(){for(var a=f.getElementsByTagName("form"),b=0;b<a.length;b++)a[b][Ea]&&(a[b].submit=a[b][Ea])})()},uploadPages:function(a,b){function c(){k.un(f,"DOMContentLoaded",c);k.un(h,"load",c);for(var d=a.split(/\n/),e=z().href,g=/regexp:/,n=0;n<d.length;n++){var q=d[n];if(q)if(g.test(q)){q=lb(q.replace(g,""));try{var t=RegExp(q)}catch(y){}if(t&&t.test(e)){K.uploadPage(b);break}}else if(-1!==e.indexOf(q)){K.uploadPage(b);break}}}"complete"==f.readyState?
- c():(k.on(f,"DOMContentLoaded",c),k.on(h,"load",c))}}}var jb=!1,O="",Eb=!ga(/webkit/)&&ga(/gecko/),l={getDocumentCharset:function(){return(""+(f.characterSet||f.charset||"")).toLowerCase()},getDocumentHTML:function(){var a="",b="",a=f.documentElement,c=a.outerHTML;if(c)a=c;else{for(var c=a.attributes,e="",d=0;d<c.length;d++){var g=c[d];g&&(e+=" "+g.name+'="'+(g.value||"")+'"')}a="<html"+e+">"+a.innerHTML+"</html>"}(c=f.doctype)&&(b="<!DOCTYPE "+c.name+(c.publicId?' PUBLIC "'+c.publicId+'"':"")+(c.systemId?
- ' "'+c.systemId+'"':"")+">\n");return b+a},getRootElement:function(){var a=f.documentElement;return"CSS1Compat"==f.compatMode?a:f.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||f.documentElement&&f.documentElement.scrollLeft||f.body&&f.body.scrollLeft||0,h.pageYOffset||
- f.documentElement&&f.documentElement.scrollTop||f.body&&f.body.scrollTop||0]},getElementXY:function(a){if(!a.ownerDocument||"PARAM"==a.tagName||a==f.body||a==f.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){return a==f.documentElement?null:a==f.body?f.documentElement:a.parentNode}},
- g={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(g.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 f=e[d];"INPUT"==f.nodeName&&f.type&&"hidden"==f.type.toLocaleLowerCase()||b&&f.nodeName!=b||g.mergeArrays(c,
- [f])}}return c};l.getElementNeighborPosition=function(a){var b=l.getElementParent(a);if(b)for(var c=0,e=0;e<b.childNodes.length;e++)if(a.nodeName==b.childNodes[e].nodeName){if(a==b.childNodes[e])return c;c++}return 0};l.getElementSize=function(a){return a==f.body||a==f.documentElement?l.getDocumentSize():[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]]};g.fletcher=function(a){for(var b=a.length,c=0,e=255,d=255;b;){var g=
- 21<b?21:b,b=b-g;do{var h="string"==typeof a?a.charCodeAt(c):a[c];c++;if(255<h)var f=h>>8,h=h&255,h=h^f;e+=h;d+=e}while(--g);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 g.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 g.fletcher(b.replace(/[\u0000-\u0020]+/g,""))};l.calcChildrenChecksum=function(a){return g.fletcher((a.innerHTML||"").replace(/(<[^>]*>|[\u0000-\u0020])/g,""))};l.getFormNumber=function(a){for(var b=f.getElementsByTagName("form"),c=0,e=b.length;c<e;c++)if(b[c]==a)return c;return-1};l.classNameExists=
- function(a,b){return RegExp("(?:^|\\s)"+b+"(?:\\s|$)").test(a.className)};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||f;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=
- f.title;"string"!=typeof a&&(a=(a=f.getElementsByTagName("title"))&&a.length?a[0].innerHTML:"");return a};var I={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){a=a.target||a.srcElement;O=typeof a+" - "+String(a);!a.ownerDocument&&a.documentElement&&(a=a.documentElement);return a},getMouseButton:function(a){return a.which||a.button==L?a.which:a.button&1?1:a.button&
- 2?3:a.button&4?2:0}};g.mixin=function(a){for(var 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};var J=function(a){a=a||{};g.mixin(this,a);this._initComponent()};J.prototype._initComponent=function(){};J.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;g.mixin(a.constructor.prototype,a);a.constructor.prototype.constructor=a.constructor;a.constructor.superclass=b.prototype;a.constructor.inherit=J.inherit;return a.constructor};var k=J.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 g=b.split(","),f=0;f<g.length;f++){var k=g[f],l=w(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 g=b.split(","),h=0;h<g.length;h++)for(var f=g[h],k=0;k<this._listeners.length;k++){var l=this._listeners[k];if(l[0]==a&&l[1]==f&&l[2]==c&&l[3]==e&&l[4]==d){this._listeners.splice(k,1);this._removeListener(a,f,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)};Y=null;g.toJSON=function(a){if(a===L)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]=g.toJSON(a[c]);return"["+b.join(",")+"]";case Object:b=[];for(c in a)a.hasOwnProperty(c)&&a[c]!==L&&(b[b.length]=g.toJSON(c)+":"+g.toJSON(a[c]));return"{"+b.join(",")+"}";default:return"null"}};var aa=J.inherit({counterId:"",_initComponent:function(){aa.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&&g.isArray(b)&&!b.length?this.remove(a):this._ls.setItem(this._getLsKey(a),g.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}}),ba=J.inherit({counterId:"",onlyCurrentDomain:!1,skipPrefix:!1,_initComponent:function(){ba.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{f.cookie=a.join(";")}catch(e){}},read:function(a){try{var b=f.cookie}catch(c){}return b&&b.match(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:"")}});ba.isEnabled=function(){return(new ba({onlyCurrentDomain:!0})).isEnabled()};var u=J.inherit({transports:[],postParams:[],send:function(a,b,c,e){c=c||function(){};(function K(g){if(g<this.transports.length)try{var h=new this.transports[g]({postParams:this.postParams});
- h.request(a,b,function(a,b){a?c.call(e,b):K.call(this,g+1)},this)}catch(f){oa(f,"send by "+(h&&h.id)),K.call(this,g+1)}}).call(this,0)}}),ja={stringify:function(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var e=a[c];if(g.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("&")}};g.forEachKey=function(a,b,c){for(var e in a)a.hasOwnProperty(e)&&b.call(c,e,a[e],
- a)};g.inArray=function(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return!0;return!1};var F=J.inherit({postParams:[],_buildUrl:function(a,b){return a+(-1<a.indexOf("?")?"&":"?")+ja.stringify(b)},_splitParams:function(a){var b={},c={};g.forEachKey(a,function(a,d){g.inArray(this.postParams,a)?c[a]=d:b[a]=d},this);return{get:b,post:c}}});F.inherit({id:"beacon",request:function(a,b,c,e){"function"==typeof G.sendBeacon?(b=this._splitParams(b),c.call(e,G.sendBeacon(this._buildUrl(a,b.get),ja.stringify(b.post)))):
- c.call(e,!1)}});g.getNativeFunction=function(a,b){b=b||h;var c=b.constructor&&b.constructor.prototype&&b.constructor.prototype[a]||b[a];return"apply"in c?function(){return c.apply(b,arguments)}:c};g.setTimeout=function(a,b,c){return g.getNativeFunction("setTimeout")(w(a,c||"setTimeout"),b)};var E=F.inherit({id:"XHR",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("POST",a,!0)}catch(k){return c.call(e,!1)}f.withCredentials=!0;f.setRequestHeader("Content-Type","application/x-www-form-urlencoded");f.send(ja.stringify(b.post));(function(){4==f.readyState?c.call(e,200==f.status):g.setTimeout(arguments.callee,50,"TransportXHR.request")})();return}}c.call(e,!1)}});g.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 R=F.inherit({id:"form",enctype:"application/x-www-form-urlencoded",htmlfileOnly:!1,_initComponent:function(){R.superclass._initComponent.apply(this,arguments);"_htmlfile"in R.prototype||(R.prototype._htmlfile=this._createHtmlfile());this._doc=this._htmlfile||(this.htmlfileOnly?null:f)},request:function(a,b,c,e){var d=this._doc;if(!d)return c.call(e,!1);b=this._splitParams(b);var h="ifr"+g.random(),f=d.createElement("div");f.style.position=
- "absolute";f.style.left="-99999px";f.style.top="-99999px";var k=['<iframe name="',h,'"></iframe>','<form action="',this._buildUrl(a,b.get),'" method="post" target="',h,'" enctype="',this.enctype,'">'];g.forEachKey(b.post,function(a){g.mergeArrays(k,['<input type="hidden" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="',a,'"/>'])});g.mergeArrays(k,["</form>"]);f.innerHTML=k.join("");d.body.appendChild(f);var l=f.getElementsByTagName("form")[0];g.forEachKey(b.post,
- function(a,b){l[a].value=b});l.submit();g.setTimeout(function(){d.body.removeChild(f)},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}}),Q=R.inherit({id:"htmlfile",htmlfileOnly:!0}),H=F.inherit({id:"img",request:function(a,b,c,e){a=this._buildUrl(a,b);b=f.createElement("img");b.onload=w(function(){c.call(e,!0)},"TransportImage.request");
- b.onerror=w(function(){c.call(e,!1)},"TransportImage.request");b.src=a}});g.defer=function(a,b,c,e,d){return g.setTimeout(function(){a.apply(c,e||[])},b,d)};var S=u.inherit({protocol:"",host:"mc.yandex.ru",resource:"",counterId:"",counterType:0,retry:!1,transports:[E,H,Q],_initComponent:function(){S.superclass._initComponent.apply(this,arguments);this.retry&&(this._storage=new aa)},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 f=h.Ya._metrika.firstReqStatus;if("process"==f)h.Ya._metrika.firstReqCallbacks=g.mergeArrays(h.Ya._metrika.firstReqCallbacks||[],[[this,arguments]]);else{f||(h.Ya._metrika.firstReqStatus="process");f={};this.counterType&&(f["cnt-class"]=this.counterType);g.mixin(f,b);c.st=Math.round((new Date).getTime()/1E3);var k=[this.protocol,"//",this.host,"/"+this.resource+"/"+this.counterId].join(""),l=[];c&&(g.forEachKey(c,function(a,b){"t"!=a&&g.mergeArrays(l,[a,b])}),c.t&&g.mergeArrays(l,["t",
- c.t]));l.length&&(f["browser-info"]=l.join(":"));return S.superclass.send.call(this,k,f,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))}}});S.retransmit=
- function(){var a=new aa,b=a.get("retryReqs")||{};a.remove("retryReqs");g.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 S({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)})};var T={abc:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
- tail:"+/=",tailSafe:"*-_",encode:function(a,b){for(var c=(T.abc+(b?T.tailSafe:T.tail)).split(""),e=a.length,d=[],f=e-e%3,h,k=0;k<f;k+=3)h=(a[k]<<16)+(a[k+1]<<8)+a[k+2],g.mergeArrays(d,[c[h>>18&63],c[h>>12&63],c[h>>6&63],c[h&63]]);switch(e-f){case 1:h=a[f]<<4;g.mergeArrays(d,[c[h>>6&63],c[h&63],c[64],c[64]]);break;case 2:h=(a[f]<<10)+(a[f+1]<<2),g.mergeArrays(d,[c[h>>12&63],c[h>>6&63],c[h&63],c[64]])}return d.join("")}},kb={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}},Fb=S.inherit({resource:"webvisor",transports:[E,R],postParams:["wv-data"],sendContent:function(a,b,c,e,d,g,h){if(!a)return!1;-1<a.indexOf("\r")&&(a=a.replace(/\r\n/g,"\n"));a={"wv-type":1,"page-url":z().href,"wv-hit":c,"wv-data":T.encode(kb.encode(a))};return 245E3<a["wv-data"].length?!1:this.send(a,{z:e,i:d,pct:b||""},g,h)}});g.throttle=function(a,b,c,e){var d,h,f;return function(){h=
- arguments;f=this;d||function(){d=null;h&&(a.apply(c||f,h),h=null,d=g.setTimeout(arguments.callee,b,e))}()}};var Fa=J.inherit({storage:null,storageKey:"dataBuffer",maxBufferSize:255,flushTimeout:1E4,active:!0,meta:null,onFlush:function(){},onFlushCtx:null,bufferExpireTime:864E5,_initComponent:function(){Fa.superclass._initComponent.apply(this,arguments);this._data=[];this._packetNumber=0;this._flushTID=null;this._saveToStorageThrottled=g.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){g.mergeArrays(this._data,a);this._saveToStorageThrottled();this.active&&((b||this._data.length>=this.maxBufferSize)&&this._flush(),this._flushTID||(this._flushTID=g.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})}});g.trim=function(a,b){a=String(a).replace(/^\s+|\s+$/g,"");b&&a.length>
- b&&(a=a.substr(0,b));return a};g.arrayIndexOf=function(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1};var v={_jScriptVersion:0,getJScriptVersion:function(){v._jScriptVersion||(v._jScriptVersion=(new Function("return /*@cc_on @_jscript_version @*/;"))());return v._jScriptVersion},_silverlightVersion:"",getSilverlightVersion:function(){if(!v._silverlightVersion)if(h.ActiveXObject)try{var a=new ActiveXObject("AgControl.AgControl"),b=function(a,b,c,e){for(;a.isVersionSupported(b[0]+"."+
- b[1]+"."+b[2]+"."+b[3]);)b[c]+=e;b[c]-=e},c=[1,0,0,0];b(a,c,0,1);b(a,c,1,1);b(a,c,2,1E4);b(a,c,2,1E3);b(a,c,2,100);b(a,c,2,10);b(a,c,2,1);b(a,c,3,1);v._silverlightVersion=c.join(".")}catch(e){}else if(a=h.navigator,a=a.plugins&&a.plugins["Silverlight Plug-In"])v._silverlightVersion=a.description;return v._silverlightVersion||""},_flashVersion:0,getFlashVersion:function(){if(!v._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?v._flashVersion=c:b&&(v._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"))v._flashVersion=b.split(" ")[1].replace(/,/g,".").replace(/[^.\d]/g,"")}catch(e){}}return v._flashVersion},
- getLanguage:function(){return(h.navigator&&(G.language||G.browserLanguage)||"").toLowerCase()},getJavaEnabled:function(){try{return G.javaEnabled()}catch(a){return!1}}};g.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};v.getFingerPrint=function(){var a=[];if(G.plugins&&G.plugins.length)for(var b=0;b<G.plugins.length;b++){var c=G.plugins[b];g.mergeArrays(a,[c.name,c.version,c.description,c.filename])}if(G.mimeTypes&&
- G.mimeTypes.length)for(b=0;b<G.mimeTypes.length;b++)c=G.mimeTypes[b],g.mergeArrays(a,[c.type,c.description,c.suffixes]);return g.fnv32a(a.join(";"))+"01"};var da=S.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(" "),sendTitle:!0,_initComponent:function(){da.superclass._initComponent.apply(this,arguments);this._trackHash=this.trackHash;"0"===
- ""+this.counterType&&(this.sendTitle=-1===g.arrayIndexOf(this.countersNoTitle,""+this.counterId))},setTrackHash:function(a){this._trackHash=a},sendHit:function(a,b,c,e,d){this._hitExt(a,b,c,e,{ut:d,ar:!0,saveRef:!0})},sendPrerenderHit:function(a,b,c){this._hitExt(a,b,c,null,{ar:!0,pq:!0})},sendAjaxHit:function(a,b,c,e){this._hitExt(a,b,c,null,e)},sendParams:function(a){this._hitExt(z().href,"","",a,{ar:!0,pa:!0,onlyData:!0})},sendGoal:function(a,b){if(!/[\/&=?#]/.test(a)){var c=a?"goal://"+z().hostname+
- "/"+encodeURIComponent(a):z().href,e=l.getDocumentTitle(),d=a?z().href:f.referrer;this._hitExt(c,e,d,b,{ar:!0})}},sendClickLink:function(a,b,c){this._hitExt(a,b,z().href,null,c)},sendExtLink:function(a,b,c,e){this._hitExt(a,"",z().href,e,{ar:!0,ln:!0,ut:ka})},sendFileUpload:function(a,b,c,e){this._hitExt(a,"",z().href,e,{ar:!0,ln:!0,dl:!0})},sendNotBounce:function(a){this._hitExt(z().href,"","",null,{cl:a,ar:!0,nb:!0,onlyData:!0})},sendVideoAction:function(a,b,c,e){this._hitExt(c,e||"","",null,{ar:!0,
- va:a,vt:+b})},sendSocialClick:function(a,b,c){this._hitExt(c||z().href,"","",null,{ar:!0,sn:g.trim(a,64),sa:g.trim(b,64)})},_hitExt:function(a,b,c,e,d,f,k,l,s,p){function r(a,b){b&&(m[a]=b)}d=d||{};f=f||{};if("MetrikaPlayer"!=h.name){c="undefined"!=typeof c?c:Y;var m={};d.ar&&!d.onlyData&&(c=this._prepareHitUrl(c),a=this._prepareHitUrl(a));r("page-ref",g.trim(c,la));r("page-url",g.trim(a,la));-1!=z().hostname.search(/(?:^|\.)(?:ya|yandex|narod|narod2)\.(?:\w+|com\.\w+)$/)?r("ut",ka):"undefined"!=
- typeof d.ut&&r("ut",g.trim(d.ut,Gb));if(e)if(a=g.toJSON(e),this.trimParams&&a.length>Hb)var v=!0;else r("site-info",a);d.saveRef&&(Y=c);g.mixin(f,this._getTechInfo(b,d,this.counterId,k,l,this._trackHash,this.hitId,this.webvisor,this.counter));this.send(m,f,function(){v&&(new da({protocol:this.protocol,counterType:this.counterType,counterId:this.counterId,hitId:this.hitId,trackHash:this.trackHash,webvisor:this.webvisor,counterNum:this.counterNum,counter:this.counter})).sendParams(e);s&&s.apply(p,arguments)},
- this)}},_prepareHitUrl:function(a){var b=z(),c=b.host,b=b.href;if(!a)return b;if(-1!=a.search(/^\w+:\/\//))return a;var 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,f,k,w,s){function p(a,b){a&&b&&(m[a]=b)}function r(a){b[a]&&p(a,"1")}b=b||{};var m={};
- e=e||N.getTimestamp();d=d||N.getTimezone();p("j",v.getJavaEnabled()?"1":"");V&&p("s",V.width+"x"+V.height+"x"+(V.colorDepth||V.pixelDepth));h.devicePixelRatio&&p("sk",h.devicePixelRatio);p("f",v.getFlashVersion());p("l",v.getSilverlightVersion());p("fpr",v.getFingerPrint());p("cn",this.counterNum);if(!b.pa){var u=l.getViewportSize();p("w",u[0]+"x"+u[1])}p("z",d);p("i",e);p("et",Math.round((new Date).getTime()/1E3));p("en",l.getDocumentCharset());p("v",$);p("c",G.cookieEnabled?"1":"");p("jv",v.getJScriptVersion());
- p("la",v.getLanguage());f&&p("wh","1");d="ar ln dl ad nb pa pq".split(" ");for(e=0;e<d.length;e++)r(d[e]);d=["va","vt","sn","sa","he"];b.nb&&d.push("cl");for(e=0;e<d.length;e++)f=d[e],p(f,b[f]);c=new aa({counterId:c});c.isEnabled()&&(e=c.getStorageId(),(d=c.get("reqNum"))?d++:d=1,c.set("reqNum",d),c.get("reqNum")==d?(p("ls",e),p("rqn",d)):(c.remove("reqNum"),c.clearStorageId(),1<d&&(p("ls",e),p("rqn",0))));p("rn",g.random());p("hid",k);p("ds",Oa(s));s._firstPaint||(s._firstPaint=Pa(),p("fp",s._firstPaint));
- if(w){h.name||(h.name=Math.round(65535*Math.random()));if(k=+h.name)0>k&&(k*=-1),k%=65535;p("wn",k||g.fletcher(h.name));try{h.history&&p("hl",String(h.history.length))}catch(z){}}k="";this.sendTitle&&(k=this._getTitle(a));p("t",k);return m},_getTitle:function(a){var b="";b="undefined"==typeof a?(b=l.getDocumentTitle())?g.trim(b,Ga):"":g.trim(a,Ga);return b}});g.array2Props=function(a){for(var b=a.length,c={},e=c,d=0;d<b-1;d++){var g=a[d];e[g]={};d<b-2&&(e=e[g])}e[g]=a[b-1];return c};var Z=J.inherit({sampling:1,
- counterId:26302566,_initComponent:function(){Z.superclass._initComponent.apply(this,arguments);this._sender=new da({counterId:this.counterId,retry:!1,counter:{}})},log:function(){this.logParams(g.array2Props(arguments))},logParams:function(a){Math.random()<this.sampling&&this._sender.sendHit(B.href,"","",a)}}),Ib=S.inherit({resource:"webvisor",retry:!0,postParams:["wv-data"],sendPacket:function(a,b,c,e,d,f,k,l){if(!a||!a.length)return!1;var s=T.encode(a,!0);0==s.indexOf("AAAAAAAAADw")&&h.Error&&"string"==
- typeof Error().stack&&(new Z({sampling:0.1})).log("bad visor packet 5",1);a={rn:g.random(),"page-url":b,wmode:0,"wv-type":0,"wv-hit":c,"wv-part":e+1,"wv-check":g.fletcher(a),"wv-data":s};return this.send(a,{z:d,i:f},k,l)}}),Bb=Fa.inherit({protocol:"",counterId:"",counterType:"",meta:null,maxBufferSize:7500,flushTimeout:3E4,storageKey:"visorbuff",active:!1,_initComponent:function(){this.storage=new aa({counterId:this.counterId});this._sender=new Ib({protocol:this.protocol,counterId:this.counterId,
- counterType:this.counterType});Bb.superclass._initComponent.apply(this,arguments)},onFlush:function(a,b,c){this._sender.sendPacket(a,b.url,b.hitId,c,b.timezone,b.timestamp)}});g.clearTimeout=function(a){return g.getNativeFunction("clearTimeout")(a)};g._urlParser=null;g.parseUrl=function(a){if(!this._urlParser)try{this._urlParser=f.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}):{}};v.isIE=function(){return 5.8>=v.getJScriptVersion()};var ca={};ca._cookie=new ba({onlyCurrentDomain:!0});ca.log=w(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 Jb=S.inherit({resource:"clmap",retry:!0,transports:[H],sendClick:function(a,b,c,e){this.send({"page-url":a,"pointer-click":b},{},c,e)}}),Kb=J.inherit({filter:null,ignoreTags:[],quota:0,isTrackHash:!1,protocol:"",counterId:0,counterType:0,startTime:0,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]&&g.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 Jb({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(f,"click",this._handler,this);this._start=!0},stop:function(){this._start&&k.un(f,"click",this._handler,this);this._start=!1},setTrackHash:function(a){this.isTrackHash=a},_handler:function(a){O=1;a={el:I.getTarget(a),pos:I.getPos(a),button:I.getMouseButton(a),time:+new Date};O=2;if(this._isTrackingClick(a)){O=3;var b=l.getElementSize(a.el),c=l.getElementXY(a.el),b=["rn",g.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)];O=4;c=z().href;this.isTrackHash?g.mergeArrays(b,["wh","1"]):c=c.split("#")[0];O=5;this._sender.sendClick(g.trim(c,la),b.join(":"));this._lastClick=a}O=6},_isTrackingClick:function(a){if(h.ymDisabledClickmap||"MetrikaPlayer"==h.name)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(l.classNameExists(b,"ym-clickmap-ignore"))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 g.trim(b,this.MAX_LEN_PATH)}}),Ha=J.inherit({_initComponent:function(){Ha.superclass._initComponent.apply(this,arguments);this._executedMsgs={};k.on(h,"message",this.RemoteControl__onMessage,this)},RemoteControl__onMessage:function(a){try{var b=a.origin}catch(c){}if(b&&/^https?:\/\/(.*?\.)?(metr(i(ca?|ka))?|analytics|metrika-(dev|test|ps)(\.haze)?)\.yandex\.(ru|ua|by|kz|com(\.tr)?)(:\d+)?$/.test(b)){try{var e=
- (new Function("return "+a.data))()}catch(d){}e&&e.id&&e.code&&!this._executedMsgs[e.id]&&(this._executedMsgs[e.id]=!0,(new Function("evt",e.code))(a))}}}),N={};g.pad=function(a){return(10>a?"0":"")+a};N.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+=g.pad(a[c]);return b};N.getTimezone=function(){return-(new Date).getTimezoneOffset()};var Ia=J.inherit({counter:null,_initComponent:function(){Ia.superclass._initComponent.apply(this,
- arguments);if(h.dataLayer&&"function"==typeof h.dataLayer.push){var a=this;a._send(h.dataLayer);var b=h.dataLayer.push;h.dataLayer.push=function(){a._send([].slice.call(arguments,0));b.apply(this,arguments)}}},_send:function(a){for(var b=[],c=0;c<a.length;c++)a[c].ecommerce&&(b[b.length]=a[c].ecommerce);b.length&&this.counter.params({__ym:{ecommerce:b}})}}),u=F.inherit({id:"script",request:function(a,b,c,e){var d="_ymjsp"+g.random(),k=f.createElement("script");h[d]=w(function(a){try{delete h[d]}catch(b){h[d]=
- L}c.call(e,!0,a);k.parentNode&&k.parentNode.removeChild(k)},"transport.script");k.type="text/javascript";k.src=this._buildUrl(a,g.mixin({wmode:5,callback:d},b));a=f.getElementsByTagName("head")[0];a.insertBefore(k,a.firstChild);return!0}}),Lb=da.inherit({transports:[u],trimParams:!0,sendHit:function(a,b,c,e,d,g,f,h,k,l,r){var m={};g&&(m.vc=g);f&&(m.pr=1);this._hitExt(a,b,c,e,d,m,h,k,l,r)}}),P=[];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||g.random();Ya._globalMetrikaHitId=g.random();var B=z(),Ca=N.getTimezone(),Da=N.getTimestamp(),G=h.navigator,V=h.screen,U="https:",$="ver637".slice(3),Gb=64,la=v.isIE()?512:2048,Hb=v.isIE()?512:2048,Ga=v.isIE()?100:400,ka="noindex",Ja=50,Mb=15E3,Ka=RegExp("\\.(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"),Nb=+new Date,ma,fa;h.Ya.Metrika=function(a,b,c,e){var d=this;return w(function(){function u(n){var y=!1;if(Ya._metrika.hitParam[E]){if(1!=c||Ya._metrika.counters[E])return!1;y=!0}Ya._metrika.counters[E]=d;Ya._metrika.hitParam[E]=1;d._webvisor=!e&&(x&&x.webvisor||jb);d._directCampaign=x&&x.directCampaign;x&&x.trackHash&&G(!0);if(!e&&!y){d.replacePhones();var t=new ba({counterId:a}),D=t.read("visorc");"b"!=D&&"w"!=D&&(D="");if(!t.isEnabled()||ga("opera mini"))D="b";ma=+new Date;var y=new Lb({protocol:U,
- counterType:c,counterId:a,trackHash:X,hitId:P,webvisor:d._webvisor,counter:d,counterNum:T}),r={ut:L,he:x?~~x.httpError:0,ad:1==c&&h.Ya&&h.Ya.Direct,saveRef:!0};ca.log("PageView. Counter "+a+". URL: "+B.href+". Referer: "+f.referrer,". Params: ",b);y.sendHit(B.href,l.getDocumentTitle(),f.referrer,b,r,D,n,Da,Ca,function(a){fa||(fa=+new Date);a=a||{};var b=a.webvisor||{};if(N){var c=+b.recp;if(!isFinite(c)||0>c||1<c)D="w";D||(D=P%1E4/1E4<c?"w":"b");t.create("visorc",D,30);"w"==D?(N.start(),c=b.arch_type,
- (b=b.urls)&&c&&"none"!=c&&N.uploadPages(b,c)):N.stop()}b=a.mp2;a=d;t.erase("mp2_substs");if(b){b:if((c=b.conditions)&&c.length)for(var e=0;e<c.length;e++){var n;if("ref"==c[e].type)n=Qa(c[e]);else if(n="adv"==c[e].type){var l=c[e],y=Ya._metrika.counter._directCampaign,m=l.ServiceNamePattern,p=l.RefererPattern;n=y?l.direct_orders:l.direct_camp;var r=f.referrer,q=B.search,q=q&&q.replace(/^\?/,""),s={};if(q)for(var q=q.split("&"),v=0;v<q.length;v++){var A=q[v].split("=");s[W(A[0])]=W(A[1])}for(var q=
- Ra(B.search,B.hash),v={},A=["source","medium","campaign","term","content"],u=0;u<A.length;u++)s["utm_"+A[u]]&&(v[A[u]]=s["utm_"+A[u]]);u=y?"direct.yandex.ru":q&&q.service||v.source;A=!1;if(!A&&m&&m.length)for(var w=0;w<m.length;w++)if(RegExp(m[w],"i").test(u)){A=!0;break}if(!A&&p&&p.length)for(m=0;m<p.length;m++)if(RegExp(p[m],"i").test(r)){A=!0;break}!A&&l.google_adwords&&s.gclid&&(A=!0);!A&&l.yandex_direct&&s.yclid&&(A=!0);if(A&&n&&n.length&&(A=!1,l=y||q&&q.campaign||v&&v.campaign))for(y=0;y<n.length;y++)if(n[y]==
- l){A=!0;break}n=A}if(n){c[e].track_id&&t.create("mp2_track",c[e].track_id,43200);break b}}c=t.read("mp2_track");b=b.substs&&b.substs[c];c&&b?(t.create("mp2_substs",g.toJSON(b)),b=ra(b),a.params("__ym",b?"mp_trackid":"mp_trackid_bad",c)):ta()}else ta();k.on(h,"load",d.replacePhones,d);d._inited=!0})}F();x&&(x.enableAll?(q(!0),p(!0),m()):(x.clickmap&&p(x.clickmap),x.trackLinks&&q(x.trackLinks),x.accurateTrackBounce&&m(x.accurateTrackBounce),x.ad&&ad()),(x.useDataLayer||0.01>Math.random())&&new Ia({counter:d}));
- d._webvisor&&(N=new Ta(U,a,c,x,P,d))}function q(a){var b={delay:Ja};switch(typeof a){case "string":b.on=!0;break;case "object":b.on=!0;b.delay="number"!=typeof a.delay?Ja:a.delay;break;case "boolean":b.on=a;break;default:return}d._trackLinks=b}function F(){q(!1);k.on(f,"click",function(a){d._trackLinks.on&&s(a)})}function s(a){var b=La(a);if(b){var c=!1,e=""+b.href,f=e?e.split(/\?/)[0]:"",k=function(a){var c=lb(b.innerHTML.replace(/<\/?[^>]+>/gi,""));M.sendClickLink(e,e==c?"":c,a)},m=function(){var c;
- var e=b.target;c=!1;b.hostname?(e&&"_self"!=e&&"_top"!=e&&"_parent"!=e||(c=!0),(e=a.shiftKey||a.ctrlKey||a.altKey)||a.modifiers&&h.Event&&(e=a.modifiers&h.Event.CONTROL_MASK||a.modifiers&h.Event.SHIFT_MASK||a.modifiers&h.Event.ALT_MASK),c=c&&!e):c=!1;return c?d._trackLinks.delay:0};if(Ka.test(f)||Ka.test(e)||pa(e,Q)||pa(f,Q))c=!0;var p=l.classNameExists(b,"ym-disable-tracklink"),f=l.classNameExists(b,"ym-external-link");p||(p={ln:!0,dl:c},f?(p.delay=m(),k(p)):(f=b.hostname||g.parseUrl(b.href).hostname||
- "",Ma(z().hostname,f)?c&&(p.ln=!1,p.delay=m(),k(p)):e&&-1!=e.search(/^ *(data|javascript):/i)||(p.ut=ka,p.delay=m(),k(p))))}}function p(b){"undefined"==typeof b&&(b=!0);!0===b&&(b={});d._clickmap&&d._clickmap.destroy();b&&(d._clickmap=new Kb({filter:b.filter,ignoreTags:b.ignoreTags,quota:b.quota,isTrackHash:b.isTrackHash,protocol:U,counterId:a,counterType:c,startTime:Nb}))}function r(a,b){function c(){if(!z){w&&g.clearTimeout(w);var d=b,e;e=r?s:s+ +new Date-u;d-=e;0>d&&(d=0);w=g.setTimeout(function(){z=
- !0;m(!1);a()},d,"trackUserTime")}}function d(){r=p=q=!0;s+=+new Date-u;u=+new Date;c()}function e(){p||q||(s=0);u=+new Date;p=q=!0;r=!1;c()}function l(){q||(p=!0,r=!1,q=!0,c())}function m(a){for(var b=0;b<x.length;b+=3)if(a)k.on(x[b],x[b+1],x[b+2]);else k.un(x[b],x[b+1],x[b+2])}var p=!1,q=!1,r=!0,s=0,u=+new Date,w=null,z=!1;if(v.isIE())g.setTimeout(a,b,"trackUserTime");else{var x=[h,"blur",d,h,"focus",e,f,"click",l,f,"mousemove",l,f,"keydown",l,f,"scroll",l];m(!0);c()}}function m(b){"number"!=typeof b&&
- (b=Mb);if(!d._isAccurateTrackBounce){d._isAccurateTrackBounce=!0;var c=new aa({counterId:a}),e=c.get("lastHit");c.set("lastHit",+new Date);((c=c.get("lastHit"))&&(!e||e<c-18E5)||!Na(f.referrer,z().href)||0.1>Math.random())&&r(function(){d.notBounce()},b)}}function I(a){function b(){var a=z().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 A(){var d=b();d!==c&&(a(),c=d);V=g.setTimeout(A,200,"trackHash")})()}function G(a){if(!1===
- a)X&&("onhashchange"in h?k.un(h,"hashchange",J):g.clearTimeout(V),X=!1);else if(a=J,!X){if("onhashchange"in h)k.on(h,"hashchange",a);else I(a);X=!0}M.setTrackHash(X);d._trackHash=X}function J(){R=Y=O;var a={ut:L,ad:1==c&&h.Ya&&h.Ya.Direct,wh:!0,saveRef:!0};M.sendAjaxHit(z().href,l.getDocumentTitle(),R,a);O=z().href}function H(a,b){var c=Z.parseValidate(a,b);c&&d.params(c)}var E,L="",O=Y=B.href,R="",x;Ya._metrika.counter||(Ya._metrika.counter=d);"object"==typeof a&&(x=a,e=a.defer,L=a.ut,c=a.type,b=
- a.params,a=a.id);a=a||0;/^\d+$/.test(a)||(a=0);c=c||0;E=a+":"+c;if(Ya._metrika.counters[E])return Ya._metrika.counters[E];var P=Ya._metrika.hitId;Ya._metrika.counterNum++;var T=Ya._metrika.counterNum;S.retransmit();var M=new da({protocol:U,counterType:c,counterId:a,hitId:P,counter:d,counterNum:T}),N;d.replacePhones=w(function(){try{var b=(new ba({counterId:a})).read("mp2_substs");if(b){var c=(new Function("return "+b))();c&&ra(c,!0)}}catch(d){}},"counter.replacePhones");d.reachGoal=w(function(b,c){ca.log("Reach goal. Counter: "+
- a+". Goal id: "+b+". Params: ",c);M.sendGoal(b,c);return!0},"counter.reachGoal");d.trackLinks=w(function(a){q(a)},"counter.trackLinks");d.hit=w(function(b,c,d,e,f){b&&(ca.log("PageView. Counter "+a+". URL: "+b+". Referer: "+d+". Params: ",e),M.sendHit(b,c,d,e,f))},"counter.hit");d.params=w(function(b){b&&(1<arguments.length&&(b=g.array2Props(arguments)),ca.log("User params. Counter "+a+". Params: ",b),M.sendParams(b))},"counter.params");d.file=w(function(a,b,c,d){a&&M.sendFileUpload(a,b,c,d)},"counter.file");
- d.extLink=w(function(a,b,c,d){a&&M.sendExtLink(a,b,c,d)},"counter.extLink");d.notBounce=w(function(){var a=0;ma&&fa&&(a=fa-ma);M.sendNotBounce(a)},"counter.notBounce");var Q=[];d.addFileExtension=function(a){"string"==typeof a?Q.push(a):Q=Q.concat(a)};d.clickmap=function(a){p(a)};d.accurateTrackBounce=function(a){m(a)};var V=null,X=!1;d.trackHash=function(a){G(a)};d.video=w(function(a,b,c,d){var e=["end","play","pause","seek"];if(a&&c){a:{for(var f=0,g=e.length;f<g;f+=1)if(a===e[f]){e=f;break a}e=
- -1}-1!==e&&M.sendVideoAction(a,b,c,d)}},"counter.video");d.social=w(function(a,b,c){a&&b&&M.sendSocialClick(a,b,c)},"counter.social");g.isObject=function(a){return"[object Object]"==Object.prototype.toString.call(a)};g.isNumber=function(a){return isFinite(a)&&!isNaN(a)&&"[object Number]"==Object.prototype.toString.call(a)};g.isString=function(a){return"[object String]"==Object.prototype.toString.call(a)};g.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 Z={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===g.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(g.isObject(b))switch(a){case "detail":case "add":case "remove":g.isArray(b.goods)&&
- b.goods.length?(c=g.arrayEvery(b.goods,function(a){return g.isObject(a)&&(g.isString(a.id)||g.isNumber(a.id)||g.isString(a.name)||g.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":g.isNumber(b.id)||g.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=
- w(function(a){H("detail",a)},"ecommerce.detail");d.ecommerceAdd=w(function(a){H("add",a)},"ecommerce.add");d.ecommerceRemove=w(function(a){H("remove",a)},"ecommerce.remove");d.ecommercePurchase=w(function(a){H("purchase",a)},"ecommerce.purchase");d.enableAll=function(){q(!0);p(!0);m()};d.uploadPage=function(){};d._performanceTiming=qa;if(a)if("prerender"==f.webkitVisibilityState){M.sendPrerenderHit(B.href,l.getDocumentTitle(),f.referrer);var $=function(){"prerender"!=f.webkitVisibilityState&&(k.un(f,
- "webkitvisibilitychange",$),u(!0))};k.on(f,"webkitvisibilitychange",$)}else u(!1)},"init")()};if(h.performance&&"function"==typeof performance.getEntries){F={2343947156:1,1996539654:1,2065498185:1,823651274:1,1417229093:1,138396985:1};E=performance.getEntries();Q={};for(u=0;u<E.length;u++){var H=E[u],na=H.name.replace(/^https?:\/\//,"").split("?")[0],Ob=g.fnv32a(na);F[Ob]&&!Q[na]&&0<H.duration&&(Q[na]={dns:Math.round(H.domainLookupEnd-H.domainLookupStart),tcp:Math.round(H.connectEnd-H.connectStart),
- duration:Math.round(H.duration),response:Math.round(H.responseEnd-H.requestStart),pages:B.href})}(new Z({sampling:1E-4})).logParams({timings8:Q})}h.Ya._metrika.remoteCtrlInited||(h.Ya._metrika.remoteCtrlInited=!0,new Ha);h.Ya.Metrika.counters=function(){var a=[];g.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)});u=h.yandex_metrika_callback;F=h.yandex_metrika_callbacks;"function"==typeof u&&u();if("object"==typeof F)for(u=0;u<F.length;u++)if(E=F[u])F[u]=null,E();ua("yandex_metrika_callback");ua("yandex_metrika_callbacks");F=["link","click","scroll","res"];for(u=0;u<F.length;u++)if(E=F[u]+"map",
- -1!=B.href.search("ym_playback="+E)){va(U+"//old.metrika.yandex.ru/js/"+E+"/_loader.js");break}h.Ya.Metrika.informer=function(a){var b=!!Ya.Metrika._informer;Ya.Metrika._informer=a;b||va(U+"//mc.yandex.ru/metrika/informer.js")};(function(){var a=function(){var a=f.getElementsByTagName("body")[0],b=f.createElement("iframe");b.src="http://awaps.yandex.ru/0/2153/0.htm?ad=165746&pl=93829&rnd="+g.random();b.setAttribute("style","position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;visibility:hidden");
- a.appendChild(b);g.setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b)},1E4,"ad")},b=function(){h.removeEventListener("load",b,!1);a()},c=h.performance;g.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);
|