if(!window._mediator){ window._mediator=[];}window._mediator.push({metaParams:{enable:false,shareOptions:['fb','ok','vk']},serverApi:{urls:{ metric:'//mediator.mail.ru/script/2820404/register/',meta:'//mediator.mail.ru/script/2820404/meta/'}},cssSels:{"custom":[{"article":".js-mediator-article","scrollCont":""},{"article":"article","scrollCont":""},{"article":"body","scrollCont":""}]},counter:'2820404',autostart:true,orientation:'vertical',sectionByClass:false,transit:{mdtr_ses:"1541930017.382808949.4193517162",mdtr_snc:"975834146"}});!function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=1)}([function(t,e,i){"use strict";function n(){for(var t=[],e=0;e2&&(r=[r[0],r[a-1]])}i[n]=m(r)}}}function g(t){var e=this._opts,i=e.section.count,n=this._elems.section.length,r=Math.floor(n/i),o=r?Math.floor(t/r):t;return o>(i-=1)?i:o}function b(){var t,e,i,n,r=this._elems,o=this._opts,a=this._state,s=a._sizes,l=a._marks,c=dt[o.orientation];if(o.sectionByClass)for(t=r.section.length,e=0;e<=t;e++){var u=e==t?e-1:e,h=s.section[u],d=h.offset[c.section.start];n={start:d,end:d+h.rect[c.section.size]},i=l[e],i||(i={}),i.meta=g.call(this,e),i.pos=e==t?n.end:n.start,i.start=i.pos,l[e]=i}else{t=o.section.count;var f=s.article.offset[c.article.start],p=s.article.rect[c.article.size],m=a.sectionSize=p/t;for(n={start:f,end:f+p},m2});this._state.wordsCount=r.length}function L(){var t=this._state;t.wordsCount>=300?t.articleViewType="long":t.articleViewType="short"}function R(t){var e=this._state._logs,i=+new Date+t.e;e[i]||(e[i]=t)}function B(t){var e=this._state._logs;for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];n.cid=t,F.call(this,n)}}function H(t,e){var i,n=this._opts,r=this._state,o=r._events,a=n.sectionByClass;switch(t){case"s":i=o.scrolls;break;case"ts":i=o.reads;break;case"r":i=o.other}var s=q.bind(this),l=U.bind(this),c=[t];if(void 0!==e){var u=r._marks,h=u[e];c=[t+e],a&&(c=[t+h.meta].concat(["_"+t+e]))}c.forEach(function(t){function e(){-1!==t.indexOf("_")?l(n):s(n)}var n={type:t};i?i[t]||(i[t]=!0,e()):e()})}function q(t){var e=this,i=this._opts,n=this._counters,r=this._state,o=t.type,a=function(i){R.call(e,i),F.call(e,i,o),I.call(e,o),U.call(e,t)},s=this;for(var l in n)!function(t){if(n.hasOwnProperty(t)){var e=n[t],l=tt({cid:e.counter,url:r.pathname},e.transit);"m"===o?e.metaParams.enable&&(r._meta?(l=tt(l,{wc:r.wordsCount},r._meta),a.call(s,l)):Q.get(e.metaParams,function(t){l=tt(l,{wc:r.wordsCount},t),a.call(this,l)}),e.metaParams.enable=!1):(l=tt(l,{ref:r.referrer,p:i.isMobile?2:1,e:o},"v"===o?{wc:r.wordsCount}:{}),a.call(s,l))}}(l)}function I(t){var e=this._state,i=e._events;i.other.r||("short"==e.articleViewType?"s3"==t&&Object.keys(i.reads).length?H.call(this,"r"):-1!==t.indexOf("ts")&&i.scrolls.s3&&H.call(this,"r"):"long"==e.articleViewType&&"ts2"==t&&H.call(this,"r"))}function N(t){var e=this._counters;for(var i in e)e.hasOwnProperty(i)&&F.call(this,tt({e:"commit"},e[i].transit),t,{serverApi:e[i].serverApi})}function U(t){var e=this._opts,i=this._state;if("function"==typeof e.onPushEvent){var n=t.type,r={cid:e.counter,url:i.pathname,p:e.isMobile?2:1,e:n};"v"===n&&(r.wc=i.wordsCount),e.onPushEvent(r)}}function F(t,e,i){var n=this._opts;e=t.e||e;var r=i&&i.serverApi;if(t.cid){r=this._counters[t.cid].serverApi}n.debug&&window.console.log("Mediator: "+(Z.stringify?Z.stringify(t):t));var o=r.urls["m"===e?"meta":"metric"];"m"!==e?W(o,t):lt.send(o,t)}function W(t,e){var i=st(e);(new Image).src=t+"?"+i}function V(){this._counters={};var t=this._opts=e.call(this),i=this._state=s.call(this);A.call(this),S.call(this),t.counter||at("The counter identifier is invalid"),i.isInited=!0}function K(){this._opts;this._elems=u.call(this),f.call(this),p.call(this),x.call(this),C.call(this),j.call(this),L.call(this),q.call(this,{type:"v"}),q.call(this,{type:"m"}),z.call(this,!0)}function D(){this._state.isStarted||(k.call(this),E.call(this))}function $(t){t=t||null;var e=this._state;if(e.isInited)try{e.isStarted&&at("The module is already running. First, it is necessary to stop it's work"),V.call(this),t&&(a.call(this,t),S.call(this)),X.call(this),K.call(this),x.call(this)}catch(t){window.console.error(t.name+": "+t.message)}}function X(){var t=this._counters;for(var e in t)if(t.hasOwnProperty(e)){var i=t[e];i.transit.mdtr_snc&&(i.transit.mdtr_snc=Math.floor(Math.random()*(Math.pow(2,32)-1)))}}var Y=r.mediatorUtils;if(Y.checkBrowserSupport()){var G=window._mediator;if(!G||!G.start||"function"!=typeof G.start){var J=window.document,Q=n.mediatorMeta,Z=window.JSON||{},tt=Y.extend,et=Y.offset,it=Y.addClass,nt=Y.debounce,rt=Y.isMobile,ot=Y.isVisible,at=Y.console,st=Y.objectToUrlParams,lt=Y.transport,ct=[];G&&(ct=G);var ut={},ht={cssSels:{scrollCont:".js-mediator-container",article:".js-mediator-article",section:".js-mediator-section",notice:".js-mediator-notice"},cssClss:{mark:"js-mediator-mark"},attrs:{autostart:"data-autostart",useSection:"data-use-section",counter:"data-counter",touchCounter:"data-mobile-counter",orientation:"data-orientation"},hashes:{showRule:"mediator",debug:"mediator-debug"},timeouts:{sleep:3e4,hit:5e3,size:2e3,scroll:300,resize:500},section:{minSize:0,count:3},rootElement:!1,articleElement:!1,metaParams:{enable:!1,shareOptions:[]},serverApi:{urls:{metric:"//collector.mediator.media/register/",meta:"//collector.mediator.media/meta/"}},transit:{},counter:null,showRule:!1,isMobile:null,sectionByClass:!1,autostart:!0,orientation:"vertical",triggerArea:.33,debug:!1,onPushEvent:null,templates:{noArticle:'
 ${title}: ${text}
'}},dt={vertical:{viewport:{start:"top",size:"height"},page:{scrollSize:"scrollHeight"},parent:{offsetStart:"top",clientSize:"clientHeight",size:"height"},article:{start:"top",size:"height"},section:{start:"top",size:"height"},mark:{pos:"top",style:{mark:"position: absolute; left: 0px; right: 0px; height: 4px; z-index: 9999; background: #F44E4E;",label:"position: absolute; top: -28px; left: 16px; font-family: Arial; font-size: 15px; color: white; background: #F44E4E; line-height: 32px; padding: 0 16px; display: inline-block; border-radius: 3px;",labelLast:"position: absolute; top: -28px; left: 16px; font-family: Arial; font-size: 15px; color: white; background: #F44E4E; line-height: 32px; padding: 0 16px; display: inline-block; border-radius: 3px;"}}},horizontal:{viewport:{start:"left",size:"width"},page:{scrollSize:"scrollWidth"},parent:{offsetStart:"left",clientSize:"clientWidth",size:"width"},article:{start:"left",size:"width"},section:{start:"left",size:"width"},mark:{pos:"left",style:{mark:"position: absolute; bottom: 0px; top: 0px; width: 4px; z-index: 9999; background: #F44E4E;",label:"position: relative; top: 0px; left: 0px; width: 120px; font-family: Arial; font-size: 15px; color: white; background: #F44E4E; line-height: 32px; padding: 0 16px; display: inline-block; border-radius: 3px;",labelLast:"position: relative; top: 0px; left: -152px; width: 120px; font-family: Arial; font-size: 15px; color: white; background: #F44E4E; line-height: 32px; padding: 0 16px; display: inline-block; border-radius: 3px;"}}}},ft={ru:{start:"Начало",end:"Конец",section:"секции",noArticle:{title:"Предупреждение",text:"на странице отсутствует контейнер для статьи"}},en:{start:"Start of",end:"End of",section:"section",noArticle:{title:"Warning",text:"there is no container for the article on the page"}}},pt={focus:!0,focusin:!0,pageshow:!0,blur:!1,focusout:!1,pagehide:!1},mt=["TEXTAREA","SCRIPT","STYLE"];window._mediator=function(){try{V.call(ut),ut._opts.autostart?K.call(ut):D.call(ut)}catch(t){window.console.error(t.name+": "+t.message)}var t=z.bind(ut),e=function(){this._opts.showRule=!1,_.call(this)}.bind(ut);return{start:function(t){$.call(ut,t)},stop:function(){t(!1),e(),D.call(ut),N.call(ut,"apiStop")},pause:function(){t(!1)},continue:function(){t(!0)},redraw:function(){ut._opts.sectionByClass&&(ut._elems.section=c.call(ut)),p.call(ut)},isActive:function(){return P.call(ut)},push:function(t){o.call(ut,t)}}}()}}}()},function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(i(3)),o=i(0),a=function(t,e){var i={},n=document.title;n&&(i.title=n);var a=document.getElementsByTagName("h1");if(a.length){var s=a[0],l=s.textContent||s.innerText;l&&(i.h1=l)}var c=document.querySelector("link[rel='canonical']");c&&(i.canonical=c.href);var u=document.querySelector("meta[name='description']");u&&(i.description=u.getAttribute("content"));var h=document.querySelector("meta[name='mediator']");h&&(i.mediator=h.getAttribute("content"));var d=document.querySelector("meta[name='mediator_published_time']");d&&(i.mediator_published_time=d.getAttribute("content"));var f=document.querySelectorAll("meta[name='mediator_author']");if(f.length){i.mediator_author=[];for(var p=0;p=0?"&":"?")+"callback="+r}else i.src=t;this.document.body.appendChild(i)}function s(t){var e=this.SHARE_PARAMS[t.type],i={};i[e.params.url]=t.url,e.getCount?a.call(this,o(e.url,i),function(i){if(!i.error)return this.SHARE_COUNTERS[t.type]=e.getCount(i)}.bind(this)):(i[e.params.id]=r.call(this,function(e){return this.SHARE_COUNTERS[t.type]=e}.bind(this)),a.call(this,o(e.url,i)))}var l=function(){var t=document.querySelector("link[rel='canonical']");return t?t.getAttribute("href"):window.location.href}(),c=document.createElement("iframe");c.id="shares_frame_"+Math.round(1e5*Math.random()),c.style.display="none",document.body.appendChild(c);var u=c.contentWindow;i.call(u),u.jsonp=a.bind(u),u.execCountCallback=n.bind(u),u.addCallback=r.bind(u),u.addUrlParams=o.bind(u),u.getShareCount=s.bind(u);for(var h=0;h