function formatCtn(n){return n[0]+n[1]+n[2]+" "+n[3]+n[4]+n[5]+"-"+n[6]+n[7]+"-"+n[8]+n[9]}function unformatCtn(n){return n.replace(" ","").replace(" ","").replace("-","").replace("-","").replace("+7","")}function unformatInternationalCtn(n){return n.replace(" ","").replace(" ","").replace("-","").replace("-","").replace("+","")}function formatInternationalCtn(n){return"+"+n.substr(0,n.length-7)+" "+n.substr(n.length-7,3)+"-"+n.substr(n.length-4,2)+"-"+n.substr(n.length-2)}function insertAt(n,t){var i=Array.prototype.splice.apply(arguments,[2]);return Array.prototype.splice.apply(n,[t,0].concat(i)),n}function insertArrayAt(n,t,i){return Array.prototype.splice.apply(n,[t,0].concat(i)),n}var QaCommon,overridden;(function(n){function f(){var n=$("<div>"),i,t,r;return n.css({position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"100px","z-index":"-1",msOverflowStyle:"scrollbar"}),$("body").append(n),i=n[0].offsetWidth,n.css({overflow:"scroll"}),t=$("<div>"),t.css({width:"100%"}),n.append(t),r=t[0].offsetWidth,n.remove(),i-r}var t,i,r,u;n.LocalStorage={isAvailable:function(){try{return"localStorage"in window&&window.localStorage!==null}catch(n){return!1}},set:function(n,t){this.isAvailable()&&localStorage.setItem(n,t)},get:function(n){return this.isAvailable()?localStorage.getItem(n):""},remove:function(n){this.isAvailable()&&localStorage.removeItem(n)},getOrAddToCacheFromAjax:function(t,i,r,u,f,e,o,s){var c,h;if(n.LocalStorage.isAvailable()&&(c=localStorage.getItem(t),c&&(h=JSON.parse(c),h))){if(new Date(h.time)>new Date&&h.contextId==n.LocalStorage.getContextId()){console&&console.log&&console.log("found in cache: "+t);e(h.data);return}localStorage.removeItem(t)}f&&$(f).showLoading();$.ajax({url:r,data:u,type:"POST",dataType:"json",processData:!1,traditional:!0}).done(function(r){var u,h;f&&$(f).hideLoading();r.IsSucceeded||!o||r.IsSuccessed?(u=o?r.View:r,n.LocalStorage.isAvailable()&&(h={data:u,time:(new Date).setSeconds((new Date).getSeconds()+i),contextId:n.LocalStorage.getContextId()},localStorage.setItem(t,JSON.stringify(h))),e(u)):s?s(r):e()}).fail(function(){f&&$(f).hideLoading();s?s():e()})},getOrAddHtmlFromAjax:function(t,i,r,u,f,e,o){n.LocalStorage.getOrAddToCacheFromAjax(t,i,r,u,f,e,!0,o)},setContextId:function(n){localStorage._contextId=n},getContextId:function(){return localStorage._contextId}};t=function(){function t(){}return t.regex=/\{(\d+)\}/g,t.format=function(){for(var n=[],u,r,i=0;i<arguments.length-0;i++)n[i]=arguments[i+0];if(n.length==0||typeof n[0]!="string")throw new Error("Invalid arguments!");return u=n[0],r=n,u.replace(t.regex,function(n,t){var i=parseInt(t,10)+1;if(i>=r.length)throw new Error("Invalid arguments!");return r[i]})},t.isBlank=function(n){return!n||/^\s*$/.test(n)},t.replaceAllSpaces=function(t){return n.Utils.isBlank(t)?t:t.replace(/ /g,"")},t.setCurrentProtocol=function(n){if(window.location.protocol=="https:"){if(n.startsWith("http:"))return n.replace("http:","https:")}else return n.replace("https:","http:");return n},t.getRussianPluralForm=function(n,t){var i=[n.rusFirstPlural,n.rusSecondPlural,n.rusThirdPlural];return t<0&&(t=t*-1),t%10==1&&t%100!=11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]},t.getPluralFormFormatted=function(t,i){return n.Utils.format(n.Utils.getRussianPluralForm(t,i),i)},t.getPluralFormType=function(n){return n<0&&(n=n*-1),n%10==1&&n%100!=11?1:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?2:3},t.ajax=function(i){return i==null&&(i={url:"",data:"",async:!0,onSuccess:null,onError:null}),$.ajax({url:i.url,data:JSON.stringify(i.data),dataType:"json",type:i.type||"post",contentType:"application/json; charset=UTF-8",processData:!1,success:i.success||function(r){if(r!=null&&(r.IsSucceeded||n.Utils.isBlank(r.ErrorMessage)||t.defaultError({status:"error",statusText:r.ErrorMessage},null,null),typeof i.onSuccess=="function"))i.onSuccess(t.restore(r.View))},async:i.async,error:function(n){if(typeof i.onError=="function")i.onError({status:n.status,xhr:n});else t.defaultError({status:n.status,xhr:n},null,null)}})},t.ajaxJson=function(i,r,u,f){return $.ajax({url:i,data:JSON.stringify(r),dataType:"json",type:"post",contentType:"application/json; charset=UTF-8",processData:!1,success:function(i){i!=null&&(i.IsSucceeded||n.Utils.isBlank(i.ErrorMessage)||t.defaultError({status:"error",statusText:i.ErrorMessage},null,null),typeof u=="function"&&u(t.restore(i.View)))},error:function(n){typeof f=="function"?f({status:n.status,xhr:n}):t.defaultError({status:n.status,xhr:n},null,null)}})},t.ajaxForm=function(i,r,u,f){return $.ajax({url:i,data:r,dataType:"json",type:"POST",traditional:!0,processData:!0,success:function(i){i!=null&&(i.IsSucceeded||n.Utils.isBlank(i.ErrorMessage)||t.defaultError({status:"error",statusText:i.ErrorMessage},null,null),typeof u=="function"&&u(t.restore(i.View)))},error:function(n){typeof f=="function"?f({status:n.status,xhr:n}):t.defaultError({status:n.status,xhr:n},null,null)}})},t.ajaxHtml=function(i,r,u,f){return $.ajax({url:i,data:JSON.stringify(r),dataType:"json",type:"post",contentType:"application/json; charset=UTF-8",processData:!1,success:function(i){i!=null&&(i.IsSucceeded||n.Utils.isBlank(i.ErrorMessage)||t.defaultError({status:"error",statusText:i.ErrorMessage},null,null),typeof u=="function"&&u(i.View))},error:function(n){typeof f=="function"?f({status:n.status,xhr:n}):t.defaultError({status:n.status,xhr:n},null,null)}})},t.restore=function(n){if(typeof n=="object")for(var i in n)typeof n[i]=="object"?n[i]=t.restore(n[i]):typeof n[i]=="string"&&n[i].substr(1,4)=="Date"&&(n[i]=new Date(parseInt(n[i].replace(/^[\/Date\(]+|\)\/+$/g,""))));return n},t.defaultError=function(n,i){return(t.hideProgress(),t.showError(n))?!0:n.statusText!=null&&n.status!=0?(console.log(n.status+" "+n.statusText),!0):n.xhr!=null&&n.xhr.status!=0?(console.log(n.xhr.status+" "+n.xhr.statusText),!0):(i=="error"&&console.log("Unknow error."),!1)},t.showError=function(n){return(t.hideProgress(),n==null)?!0:n.IsSucceeded==!1?(n.Error&&n.Error.ErrorMessage!=null&&n.Error.ErrorMessage!=""&&n.Error.ErrorMessage!=null?alert(n.Error.ErrorMessage):alert("Unknow error."),!0):!1},t.showProgress=function(){},t.hideProgress=function(){},t.parseFloat=function(n){return(n===undefined||n===null)&&(n=0),Math.round(parseFloat(n.toString().replace(",","."))*100)/100},t.priceToString=function(n,i){var n=t.parseFloat(n),r;return n==0?"0":(r=n.toFixed(2).toString().replace(".",","),i!==!0&&r.indexOf(",00",r.length-3)!==-1)?n.toFixed(0).toString():r},t.loadJsonViewInPopup=function(n,t,i,r){QA.Beeline.Popup.show();QA.Beeline.Popup.showLoading();$.ajax({url:n,type:"POST",dataType:"json",cache:!1,data:JSON.stringify(t),contentType:"application/json",success:function(n){QA.Beeline.Popup.show(n.View);typeof i=="function"&&i()},error:function(){var n="Ошибка соединения с сервером";QA.Beeline.Popup.showError(n);typeof r=="function"&&r(n)},complete:function(){QA.Beeline.Popup.hideLoading()}})},t.enqueueJsonViewInPopup=function(n,t){$.ajax({url:n,type:"POST",dataType:"json",cache:!1,data:JSON.stringify(t),contentType:"application/json",success:function(n){QA.Beeline.Popup.enqueueShow(n.View)},error:function(n){console.error(n)}})},t}();n.Utils=t;i=function(){function t(){}return t.pushState=function(n,i,r){t.isAvailablePushState()?history.pushState(n,i,r):window.location=r},t.replaceState=function(n,i,r){t.isAvailablePushState()?history.replaceState(n,i,r):window.location=r},t.isAvailablePushState=function(){try{return"pushState"in history&&history.pushState!==null}catch(n){return!1}},t.getInternetExplorerVersion=function(){var n=-1,i=navigator.userAgent,t=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");return t.exec(i)!=null?n=parseFloat(RegExp.$1):navigator.userAgent.match(/Trident/)&&(t=new RegExp("rv:([0-9]{1,}[.0-9]{0,})"),t.exec(i)!=null&&(n=parseFloat(RegExp.$1))),n},t.isIE=function(){return t.getInternetExplorerVersion()!==-1},t.isSmartphone=function(){return navigator.userAgent.match(/(iPod|iPhone|iPad|Android|Windows Phone|iemobile|IEMobile)/)},t.isOpera=function(){return navigator.userAgent.match(/Opera|OPR\//)?!0:!1},t.isChrome=function(){return!n.Utils.isBlank(window.chrome)},t.isFirefox=function(){return isFirefox=typeof InstallTrigger!="undefined"},t.getParam=function(n,t){var f=window.location.search.substring(1),r,i,u;if(t){if(!~t.indexOf("?"))return"";f=t.split("?")[1]}for(r=f.split("&"),i=0;i<r.length;i++)if(u=r[i].split("="),u[0]==n)return u[1]},t.removeParam=function(n,t){var r;t||(t=window.location.href);var u=t.split("?")[0],f,i=[],e=t.indexOf("?")!==-1?t.split("?")[1]:"";if(e!==""){for(i=e.split("&"),r=i.length-1;r>=0;r-=1)f=i[r].split("=")[0],f===n&&i.splice(r,1);u=u+(i!=null&&i.length>0&&i[0]?"?"+i.join("&"):"")}return u},t.insertParam=function(n,t,i,r){var s,e,u,h,o,f;if(replaceDuplicates=!0,n.indexOf("#")>0?(s=n.indexOf("#"),urlhash=n.substring(n.indexOf("#"),n.length)):(urlhash="",s=n.length),sourceUrl=n.substring(0,s),e=sourceUrl.split("?"),u="",e.length>1)for(h=e[1].split("&"),o=0;o<h.length;o++)f=h[o].split("="),replaceDuplicates&&f[0]==t||(u==""?u="?":u+="&",u+=f[0]+"="+(f[1]?f[1]:""));return u==""&&(u="?"),r?u="?"+t+"="+i+(u.length>1?"&"+u.substring(1):""):(u!==""&&u!="?"&&(u+="&"),u+=t+"="+(i?i:"")),e[0]+u+urlhash},t}();n.Browser=i;r=function(){function n(){}return n.isAvailable=function(){try{return"sessionStorage"in window&&window.sessionStorage!==null}catch(n){return!1}},n.set=function(n,t){this.isAvailable()&&sessionStorage.setItem(n,t)},n.get=function(n){if(!this.isAvailable())return"";return sessionStorage.getItem(n)},n.remove=function(n){this.isAvailable()&&sessionStorage.removeItem(n)},n}();n.SessionStorage=r;u=function(){function n(){}return n.setSelectionRange=function(n,t,i){if(n.setSelectionRange)n.focus(),n.setSelectionRange(t,i);else if(n.createTextRange){var r=n.createTextRange();r.collapse(!0);r.moveEnd("character",i);r.moveStart("character",t);r.select()}},n}();n.DOM=u;n.Observer=n.Observer||function(){function n(){}return n.listeners={},n.addListener=function(t,i,r){n.listeners.hasOwnProperty(i)||(n.listeners[i]=[]);n.listeners[i].push(t[r])},n.removeListener=function(t,i,r){if(n.listeners.hasOwnProperty(i))for(var u=0,f=n.listeners[i].length;u<f;u+=1)n.listeners[i][u]===t[r]&&n.listeners[i].splice(u,1)},n.hasListener=function(t,i,r){if(n.listeners.hasOwnProperty(i))for(var u=0,f=n.listeners[i].length;u<f;u+=1)if(n.listeners[i][u]===t[r])return!0;return!1},n.triggerEvent=function(t,i){if(n.listeners.hasOwnProperty(t))for(var r=0,u=this.listeners[t].length;r<u;r+=1)jQuery.type(this.listeners[t][r])=="function"&&this.listeners[t][r](i)},n}();n.Popups=n.Popups||function(){function n(){}return n.centered=function(n){var t=n==null?$(".popup:visible").first():$("#"+n+" .popup:visible"),r=$(document).height(),u=$(window).width();$(".popup-wrap").css({width:u,height:r});var f=$(window).height(),i=$(window).width(),e=t.css("top");$(window).height()<t.height()?(t.css("top",$(window).scrollTop()+15),t.css("left",i/2-t.width()/2)):(t.css("top",$(window).scrollTop()+15),t.css("left",i/2-t.width()/2))},n.show=function(t,i,r,u){var o=t==null?$(".popup-scroll-y").first():$("#"+t+" .popup-scroll-y"),e,s;o.parent().hasClass("shpd-card")&&($("html").addClass("shpd-popups-page-scroll-toggle"),u&&(e=f(),$("html").css({paddingRight:e}),$("#"+t+".popup-wrap .popup").css({transform:"translateX(-"+Math.round(e/2)+"px)"})));$("#"+t+".popup-wrap").show();r&&typeof r=="function"?r():n.centered(t);i||(i={horizontalScroll:!1});$("#"+t+".popup-wrap .popup-close").off("click").on("click",function(){n.hide(t)});s=$("#"+t+".popup-wrap").find(".shpd-card_content.scroll-container");n.recalc(t)},n.hide=function(n){$("#"+n+".popup-wrap").hide();$("html").css({paddingRight:0});$("html").removeClass("shpd-popups-page-scroll-toggle")},n.recalc=function(t){var i=t==null?$(".popup-scroll-y:visible").first():$("#"+t+" .popup-scroll-y:visible");i.parent().hasClass("shpd-card")&&i.closest(".popup").outerHeight()>$(window).outerHeight()-27?($(".popup-content").addClass("popup-content__padbtm-none"),i.mCustomScrollbar({scrollInertia:50,setHeight:$(window).height()-222})):i.parent().hasClass("shpd-card")&&i.closest(".popup").outerHeight()<$(window).outerHeight()-27?i.mCustomScrollbar({scrollInertia:50,setHeight:"auto"}):i.mCustomScrollbar({scrollInertia:50,setHeight:"auto"});i.length>0&&i.data()!=null&&(i.data().mCS_Init!=undefined||i.data().mCS!=null)&&i.mCustomScrollbar("update");n.centered(t);$("#"+t+".popup-wrap .popup-close").off("click").on("click",function(){n.hide(t)})},n}()})(QaCommon||(QaCommon={})),function(n){n.fn.moveTo=function(t){return this.each(function(){var i=n(this).detach();n(t).append(i)})};n.fn.hasAnyClass=function(){for(var n=0;n<arguments.length;n++)if(this.hasClass(arguments[n]))return!0;return!1}}(jQuery),function(n){n.fn.format=function(){for(var n=[],r,i,t=0;t<arguments.length-0;t++)n[t]=arguments[t+0];if(n.length==0||typeof n[0]!="string")throw new Error("Invalid arguments!");return r=n[0],i=n,r.replace(/\{(\d+)\}/g,function(n,t){var r=parseInt(t,10)+1;if(r>=i.length)throw new Error("Invalid arguments!");return i[r]})}}(jQuery),function(n){typeof define=="function"&&define.amd?typeof jQuery!="undefined"?define(["jquery"],n):define([],n):typeof jQuery!="undefined"?n(jQuery):n()}(function(n,t){function a(n,t){for(var u=decodeURI(n),f=l[t||!1?"strict":"loose"].exec(u),i={attr:{},param:{},seg:{}},r=14;r--;)i.attr[h[r]]=f[r]||"";return i.param.query=o(i.attr.query),i.param.fragment=o(i.attr.fragment),i.seg.path=i.attr.path.replace(/^\/+|\/+$/g,"").split("/"),i.seg.fragment=i.attr.fragment.replace(/^\/+|\/+$/g,"").split("/"),i.attr.base=i.attr.host?(i.attr.protocol?i.attr.protocol+"://"+i.attr.host:i.attr.host)+(i.attr.port?":"+i.attr.port:""):"",i}function v(n){var t=n.tagName;return typeof t!="undefined"?s[t.toLowerCase()]:t}function e(n,t){var i,r;if(n[t].length==0)return n[t]={};i={};for(r in n[t])i[r]=n[t][r];return n[t]=i,i}function u(n,t,f,o){var h=n.shift(),s;h?(s=t[f]=t[f]||[],"]"==h?i(s)?""!=o&&s.push(o):"object"==typeof s?s[k(s).length]=o:s=t[f]=[t[f],o]:~h.indexOf("]")?(h=h.substr(0,h.length-1),!r.test(h)&&i(s)&&(s=e(t,f)),u(n,s,h,o)):(!r.test(h)&&i(s)&&(s=e(t,f)),u(n,s,h,o))):i(t[f])?t[f].push(o):t[f]="object"==typeof t[f]?o:"undefined"==typeof t[f]?o:[t[f],o]}function y(n,t,f){var e,o;if(~t.indexOf("]")){var s=t.split("["),h=s.length,c=h-1;u(s,n,"base",f)}else{if(!r.test(t)&&i(n.base)){e={};for(o in n.base)e[o]=n.base[o];n.base=e}p(n.base,t,f)}return n}function o(n){return b(String(n).split(/&|;/),function(n,t){try{t=decodeURIComponent(t.replace(/\+/g," "))}catch(e){}var u=t.indexOf("="),f=w(t),r=t.substr(0,f||u),i=t.substr(f||u,t.length),i=i.substr(i.indexOf("=")+1,i.length);return""==r&&(r=t,i=""),y(n,r,i)},{base:{}}).base}function p(n,r,u){var f=n[r];t===f?n[r]=u:i(f)?f.push(u):n[r]=[f,u]}function w(n){for(var u=n.length,r,i,t=0;t<u;++t)if(i=n[t],"]"==i&&(r=!1),"["==i&&(r=!0),"="==i&&!r)return t}function b(n,i){for(var r=0,f=n.length>>0,u=arguments[2];r<f;)r in n&&(u=i.call(t,u,n[r],r,n)),++r;return u}function i(n){return Object.prototype.toString.call(n)==="[object Array]"}function k(n){var t=[];for(prop in n)n.hasOwnProperty(prop)&&t.push(prop);return t}function f(n,i){return arguments.length===1&&n===!0&&(i=!0,n=t),i=i||!1,n=n||window.location.toString(),{data:a(n,i),set:function(n,t){return this.data.param.query[n]=t,this},attr:function(n){return n=c[n]||n,typeof n!="undefined"?this.data.attr[n]:this.data.attr},param:function(n){return typeof n!="undefined"?this.data.param.query[n]:this.data.param.query},fparam:function(n){return typeof n!="undefined"?this.data.param.fragment[n]:this.data.param.fragment},segment:function(n){return typeof n=="undefined"?this.data.seg.path:(n=n<0?this.data.seg.path.length+n:n-1,this.data.seg.path[n])},fsegment:function(n){return typeof n=="undefined"?this.data.seg.fragment:(n=n<0?this.data.seg.fragment.length+n:n-1,this.data.seg.fragment[n])}}}var s={a:"href",img:"src",form:"action",base:"href",script:"src",iframe:"src",link:"href"},h=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","fragment"],c={anchor:"fragment"},l={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},d=Object.prototype.toString,r=/^[0-9]+$/;typeof n!="undefined"?(n.fn.url=function(t){var i="";return this.length&&(i=n(this).attr(v(this[0]))||""),f(i,t)},n.url=f):window.purl=f});jQuery.fn.serializeObject=function(){var n={},t=this.serializeArray();return $.each(t,function(){var t=this.value;t=t=="on"?!0:t=="off"?!1:t;n[this.name]!==undefined?(n[this.name].push||(n[this.name]=[n[this.name]]),n[this.name].push(t||"")):n[this.name]=t||""}),n};jQuery.fn.deserializeObject=function(n){n!=null&&$.each(n,function(n,t){var i=$("[name='"+n+"']");i.length>0&&(i.attr("type")=="checkbox"?i.attr("checked",t):i.val(t))})};$.fn.serializeAnything=function(){var n={},t=$(this).find(":input").get();return $.each(t,function(){var t=this.value,i=$(this).attr("type");i!="radio"?(t=this.checked?"true":$(this).attr("type")=="checkbox"?"false":t=="on"?!0:t=="off"?!1:t,n[this.name]!==undefined?(n[this.name].push||(n[this.name]=[n[this.name]]),n[this.name].push(t||"")):n[this.name]=t||""):this.checked&&(n[this.name]=t||"")}),n};$.fn.getParameterByName=function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))};jQuery.fn.getDOMName=function(n,t){var i=jQuery(t).find("[name='"+n+"']");return i.length==1?n:(jQuery(t).find("[name*='"+n+"']").each(function(t,r){var u,f,e;return(i=jQuery(r).attr("name"),i==n)?!1:(u=i.lastIndexOf("."),u==-1&&(u=0),f=i.lastIndexOf("["),f==-1&&(f=i.length-1),f<u&&(console.error("Can't get real element name"),u=0,f=i.length-1),e=i.substring(u,f),e==n?!1:void 0)}),i)};$.fn.isOnScreen=function(){var i=$(window),t={top:i.scrollTop(),left:i.scrollLeft()},n;return t.right=t.left+i.width(),t.bottom=t.top+i.height(),n=this.offset(),n.right=n.left+this.outerWidth(),n.bottom=n.top+this.outerHeight(),!(t.right<n.left||t.left>n.right||t.bottom<n.top||t.top>n.bottom)};$.fn.GUID=function(){var n=function(){return Math.floor(Math.random()*65536).toString(16)};return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()},function(n){if(!n.support.cors&&n.ajaxTransport&&window.XDomainRequest){var t=/^https?:\/\//i,i=/^get|post$/i,r=new RegExp("^"+location.protocol,"i"),u=/text\/html/i,f=/\/json/i,e=/\/xml/i;n.ajaxTransport("* text html xml json",function(o,s){if(o.crossDomain&&o.async&&i.test(o.type)&&t.test(o.url)&&r.test(o.url)){var h=null,c=(s.dataType||"").toLowerCase();return{send:function(t,i){h=new XDomainRequest;/^\d+$/.test(s.timeout)&&(h.timeout=s.timeout);h.ontimeout=function(){i(500,"timeout")};h.onload=function(){var s="Content-Length: "+h.responseText.length+"\r\nContent-Type: "+h.contentType,r={code:200,message:"success"},o={text:h.responseText},t;try{if(c==="html"||u.test(h.contentType))o.html=h.responseText;else if(c==="json"||c!=="text"&&f.test(h.contentType))try{o.json=n.parseJSON(h.responseText)}catch(a){r.code=500;r.message="parseerror"}else if(c==="xml"||c!=="text"&&e.test(h.contentType)){t=new ActiveXObject("Microsoft.XMLDOM");t.async=!1;try{t.loadXML(h.responseText)}catch(a){t=undefined}if(!t||!t.documentElement||t.getElementsByTagName("parsererror").length){r.code=500;r.message="parseerror";throw"Invalid XML: "+h.responseText;}o.xml=t}}catch(l){throw l;}finally{i(r.code,r.message,o,s)}};h.onprogress=function(){};h.onerror=function(){i(500,"error",{text:h.responseText})};var r="";s.data&&(r=n.type(s.data)==="string"?s.data:n.param(s.data));h.open(o.type,o.url);h.send(r)},abort:function(){h&&h.abort()}}}})}}(jQuery);$(function(){$(".document-block-wrap").each(function(){var t=$(this).siblings(".filter"),n=$(this).find(".document-block");$(t).on("click","li",function(){if($(this).hasClass("active"))return!1;$(this).siblings(".active").removeClass("active");$(this).addClass("active");$(n).removeClass("active");$(n).eq($(this).index()).addClass("active")})})});String.prototype.insert=function(n,t){return n>0?this.substring(0,n)+t+this.substring(n,this.length):n>=this.length-1?this+t:t+this},function(n){n.fn.setCaret=function(n){var t=this[0],n,r,f,e,u,i;if(arguments.length==0)return t.selectionStart?(n=t.selectionStart,n>0?n:0):t.createTextRange?(t.focus(),i=document.selection.createRange(),i==null)?"0":(r=t.createTextRange(),f=r.duplicate(),r.moveToBookmark(i.getBookmark()),f.setEndPoint("EndToStart",r),f.text.length):0;e=n;u=n;arguments.length>1&&(u=arguments[1]);t.setSelectionRange?t.setSelectionRange(e,u):t.createTextRange&&(i=t.createTextRange(),i.collapse(!0),i.moveEnd("character",u),i.moveStart("character",e),i.select())}}(jQuery);String.prototype.insertAt=function(n,t){return this.substr(0,n)+t+this.substr(n)};typeof String.prototype.startsWith!="function"&&(String.prototype.startsWith=function(n){return this.indexOf(n)==0});typeof String.prototype.format!="function"&&(String.prototype.format=function(){var n=this,t;for(t in arguments)n=n.replace("{"+t+"}",arguments[t]);return n});$.fn.scrollBottom=function(n,t){$("html, body").animate({scrollTop:$(n).offset().top-($(window).height()-$(n).outerHeight()+t)},500)};typeof ko!="undefined"&&(ko.bindingHandlers.templateWithOptions={init:ko.bindingHandlers.template.init,update:function(n,t,i,r,u){var f=ko.utils.unwrapObservable(t());f.templateOptions&&(u.$data.$item=ko.utils.unwrapObservable(f.templateOptions));ko.bindingHandlers.template.update(n,t,i,r,u);delete u.$data.$item}},ko.bindingHandlers.visibleBlock={update:function(n,t){var i=ko.utils.unwrapObservable(t()),r=!(n.style.display=="none");i&&!r?n.style.display="block":!i&&r&&(n.style.display="none")}},ko.bindingHandlers.enterkey={init:function(n,t,i,r){var u=t();$(n).keypress(function(n){var t=n.which?n.which:n.keyCode;return t===13?(u.call(r),!1):!0})}},ko.bindingHandlers.marginBottom={update:function(n,t){var u=ko.utils.unwrapObservable(t()),i,r;u==!0?(i=function(){var t=$(n).find(".opened .shpd-channels-overview_fold");return t.outerHeight(!0)+20},r=function(){$(n).css("margin-bottom",i()+"px")},setTimeout(r,2)):$(n).css("margin-bottom","17px")}},ko.extenders.grouped=function(n,t){var i=n(),r=t||2;return n.groupedItems=ko.computed(function(){var u=[],t=[],n=0,f=i.length;for(u.push({isOpen:ko.observable(!1),list:t}),n;n<f;n+=1)t.push(i[n]),(n+1)%r==0&&(t=[],u.push({isOpen:ko.observable(!1),list:t}));return u},this),n},overridden=ko.bindingHandlers.html.update,ko.bindingHandlers.html.update=function(n,t){var i,r,f,u,e;if(n.nodeType===8){if(i=ko.utils.unwrapObservable(t()),ko.virtualElements.emptyNode(n),i!==null&&i!==undefined&&(typeof i!="string"&&(i=i.toString()),r=ko.utils.parseHtmlFragment(i),r))for(f=n.nextSibling,u=0,e=r.length;u<e;u++)f.parentNode.insertBefore(r[u],f)}else overridden(n,t)},ko.virtualElements.allowedBindings.html=!0,ko.bindingHandlers.masked={init:function(n,t,i){var r=i().mask||"",u=i().inputTemplate||"",f=i().separator||"";$(n).beemask({mask:r,template:u,separator:f});ko.utils.registerEventHandler(n,"keyup",function(){var i=t();i($(n).val())})},update:function(n,t){var i=ko.utils.unwrapObservable(t());$(n).val(i)}}),function(n){n.widget("ui.dragscroll",{options:{step:1,delay:10,selector:".dragscroll",autoplay:!0},_create:function(){this.el=this.element.find(this.options.selector).first();this.pushed=0;this.lastClientX=0;this.lastClientY=0;this.element.find(".mCustomScrollBox").unbind("scroll");this.el.bind("mousedown",n.proxy(this._mouseDownHandler,this));n("body").bind("mouseup",n.proxy(this._mouseUpHandler,this));this.el.bind("mousemove",n.proxy(this._mouseMoveHandler,this));n.proxy(this._scrollHandler,this)();n.fn.disableSelection=function(){return this.attr("unselectable","on").css("user-select","none").on("selectstart",!1)};this.element.find("img, a, .tariff-nav_item").on("dragstart",function(n){n.preventDefault()});this.element.find("img, a").disableSelection()},_mouseDownHandler:function(n){this.pushed=1;this.lastClientX=n.clientX;this.lastClientY=n.clientY;n.preventDefault()},_mouseUpHandler:function(){this.pushed=0},_mouseMoveHandler:function(n){this.element.css("cursor","move");this.pushed&&this.el.scrollLeft(this.el[0].scrollLeft-(-this.lastClientX+(this.lastClientX=n.clientX)))},_scrollHandler:function(){if(!this.pushed){var t=this.el[0].scrollLeft;(this.el[0].scrollLeft+=this.options.step,t!=this.el[0].scrollLeft||t==0)&&(this.scrollDelay=setTimeout(n.proxy(function(){n.proxy(this._scrollHandler,this)()},this),this.options.delay))}}})}(jQuery),function(n){n.fn.visible=function(t,i,r,u){if(!(this.length<1)){var l=this.length>1?this.eq(0):this,o=typeof u!="undefined"&&u!==null,a=o?n(u):n(window),e=o?a.position():0,v=l.get(0),h=a.outerWidth(),c=a.outerHeight(),r=r?r:"both",s=i===!0?v.offsetWidth*v.offsetHeight:!0;if(typeof v.getBoundingClientRect=="function"){var f=v.getBoundingClientRect(),k=o?f.top-e.top>=0&&f.top<c+e.top:f.top>=0&&f.top<c,d=o?f.bottom-e.top>0&&f.bottom<=c+e.top:f.bottom>0&&f.bottom<=c,g=o?f.left-e.left>=0&&f.left<h+e.left:f.left>=0&&f.left<h,nt=o?f.right-e.left>0&&f.right<h+e.left:f.right>0&&f.right<=h,tt=t?k||d:k&&d,it=t?g||nt:g&&nt;if(r==="both")return s&&tt&&it;if(r==="vertical")return s&&tt;if(r==="horizontal")return s&&it}else{var y=o?0:e,rt=y+c,p=a.scrollLeft(),ut=p+h,ft=l.position(),w=ft.top,et=w+l.height(),b=ft.left,ot=b+l.width(),st=t===!0?et:w,ht=t===!0?w:et,ct=t===!0?ot:b,lt=t===!0?b:ot;if(r==="both")return!!s&&ht<=rt&&st>=y&&lt<=ut&&ct>=p;if(r==="vertical")return!!s&&ht<=rt&&st>=y;if(r==="horizontal")return!!s&&lt<=ut&&ct>=p}}}}(jQuery);QaCommon.namespace=function(n,t,r){var u=(t||"").split("."),f=window.QA?window:document,e=r||$.noop;for(i in u)if(!(f=f[u[i]])){$.ajax({url:n,dataType:"script",async:!1,cache:!0}).done(function(t,i){if(i!="success"&&i!="notmodified"&&i!="nocontent"){console.log(n+" failed");return}console.log(n);r()}).fail(function(){console.log(n+" failed")});return}return r(),!0}