PageSourceSearch

https://dek-art.ru/bitrix/cache/js/s1/aspro-priority2/template_c1b…6abde0f9804c59f5b25c_v1.js?1789379801430358

js dek-art.ru collected 2026-10-04 23:53:59 UTC 430,358 bytes, 7,001 lines download raw bytes

1
2; /* Start:"a:4:{s:4:"full";s:67:"/bitrix/templates/aspro-priority2/js/observer.min.js?17635572773650";s:6:"source";s:48:"/bitrix/templates/aspro-priority2/js/observer.js";s:3:"min";s:52:"/bitrix/templates/aspro-priority2/js/observer.min.js";s:3:"map";s:56:"/bitrix/templates/aspro-priority2/js/observer.min.js.map";}"*/
3"undefined"==typeof AMutationObserver&&"function"==typeof MutationObserver&&function(w,d){"use strict";var _AMutationObserver=function(_MutationObserver){function _AMutationObserver(callback){var _this;_this=_MutationObserver.call(this,(function(mutationsList,observer){_AMutationObserver.ignore||observer.paused||callback(mutationsList,observer)}))||this,_this.paused=!0,_this.id=Math.floor(Math.random()*Math.floor(1e3));try{eval("@")}catch(e){if("string"==typeof e.stack){_this.stack=e.stack.match(/[^\s]*:[\d]+:[\d]+[^\s]/g),_this.stack.splice(0,1);var script=_this.stack[0];-1!==script.indexOf("yandex.ru/metrika")?_this.id="ym":(script=script.replace(/^(.*[/])?(.*\.js)(.*)$/gi,"$2"),_this.id=script.replace(/(\.min)?\.js$/i,""))}}return _this}_inheritsLoose(_AMutationObserver,_MutationObserver);var _proto=_AMutationObserver.prototype;return _proto.observe=function observe(target,options){this.target=target,this.options=options,this.paused=!1,void 0===_AMutationObserver.observers[this.id]&&(_AMutationObserver.observers[this.id]=this),_MutationObserver.prototype.observe.call(this,target,options)},_proto.disconnect=function disconnect(){this.paused=!0,_MutationObserver.prototype.disconnect.call(this)},_proto.takeRecords=function takeRecords(){return _AMutationObserver.ignore||this.paused?[]:_MutationObserver.prototype.takeRecords.call(this)},_proto.pause=function pause(){this.paused=!0},_proto.resume=function resume(){"false"!=typeof this.options&&(this.paused=!1)},_AMutationObserver}(_wrapNativeSuper(MutationObserver));function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass}function _wrapNativeSuper(Class){var _cache="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function _wrapNativeSuper(Class){if(null===Class||!_isNativeFunction(Class))return Class;if("function"!=typeof Class)throw new TypeError("Super expression must either be null or a function");if(void 0!==_cache){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,Class)})(Class)}function _construct(Parent,args,Class){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var Constructor,instance=new(Function.bind.apply(Parent,a));return Class&&_setPrototypeOf(instance,Class.prototype),instance}).apply(null,arguments)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _isNativeFunction(fn){return-1!==Function.toString.call(fn).indexOf("[native code]")}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){return o.__proto__=p,o})(o,p)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}_AMutationObserver.ignore=!1,_AMutationObserver.observers=[],_AMutationObserver.parent=MutationObserver,_AMutationObserver.toString=function(){return"function MutationObserver() { [native code] }"},MutationObserver=_AMutationObserver}(window,document);
4/* End */
5;
6; /* Start:"a:4:{s:4:"full";s:76:"/bitrix/templates/aspro-priority2/vendor/jquery.cookie.min.js?17635572781613";s:6:"source";s:57:"/bitrix/templates/aspro-priority2/vendor/jquery.cookie.js";s:3:"min";
6s:61:"/bitrix/templates/aspro-priority2/vendor/jquery.cookie.min.js";s:3:"map";s:65:"/bitrix/templates/aspro-priority2/vendor/jquery.cookie.min.js.map";}"*/
7/*!
8 * jQuery Cookie Plugin v1.3.1
9 * https://github.com/carhartl/jquery-cookie
10 *
11 * Copyright 2013 Klaus Hartl
12 * Released under the MIT license
13 */
14!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory(jQuery)}((function($){var pluses=/\+/g;function raw(s){return s}function decoded(s){return decodeURIComponent(s.replace(pluses," "))}function converted(s){0===s.indexOf('"')&&(s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return config.json?JSON.parse(s):s}catch(er){}}var config=$.cookie=function(key,value,options){if(void 0!==value){if("number"==typeof(options=$.extend({},config.defaults,options)).expires){var days=options.expires,t=options.expires=new Date;t.setDate(t.getDate()+days)}return value=config.json?JSON.stringify(value):String(value),document.cookie=[encodeURIComponent(key),"=",config.raw?value:encodeURIComponent(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")}for(var decode=config.raw?raw:decoded,cookies=document.cookie.split("; "),result=key?void 0:{},i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split("="),name=decode(parts.shift()),cookie=decode(parts.join("="));if(key&&key===name){result=converted(cookie);break}key||(result[name]=converted(cookie))}return result};config.defaults={},$.removeCookie=function(key,options){return void 0!==$.cookie(key)&&($.cookie(key,"",$.extend(options,{expires:-1})),!0)}}));
15/* End */
16;
17; /* Start:"a:4:{s:4:"full";s:69:"/bitrix/templates/aspro-priority2/vendor/bootstrap.js?176355727827908";s:6:"source";s:53:"/bitrix/templates/aspro-priority2/vendor/bootstrap.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
18/*!
19 * Bootstrap v3.0.0
20 *
21 * Copyright 2013 Twitter, Inc
22 * Licensed under the Apache License v2.0
23 * http://www.apache.org/licenses/LICENSE-2.0
24 *
25 * Designed and built with all the love in the world @twitter by @mdo and @fat.
26 */
27
28+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed.bs.alert").remove()}var c=a(this),d=c.attr("data-target");d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));var e=a(d);b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close.bs.alert"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.one(a.support.transition.end,f).emulateTransitionEnd(150):f()};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");b.prop("type")==="radio"&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f=typeof c=="object"&&c;e||d.data("bs.button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".
28item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();if(b>this.$items.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){if(this.sliding)return;return this.slide("next")},b.prototype.prev=function(){if(this.sliding)return;return this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(e.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")}));if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(j);if(j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{this.$element.trigger(j);if(j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),typeof c=="object"&&c),g=typeof c=="string"?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),typeof c=="number"?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),c.data()),g=c.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=c.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){function e(){a(b).remove(),a(c).each(function(b){var c=f(a(this));if(!c.hasClass("open"))return;c.trigger(b=a.Event("hide.bs.dropdown"));if(b.isDefaultPrevented())return;c.removeClass("open").trigger("hidden.bs.dropdown")})}function f(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}"use strict";var b=".dropdown-backdrop",c="[data-toggle=dropdown]",d=function(b){var c=a(b).on("click.bs.dropdown",this.toggle)};d.prototype.toggle=function(b){var c=a(this);if(c.is(".disabled, :disabled"))return;var d=f(c),g=d.hasClass("open");e();if(!g){"ontouchstart"in document.documentElement&&!d.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",e),d.trigger(b=a.Event("show.bs.dropdown"));if(b.isDefaultPrevented())return;d.toggleClass("open").trigger("shown.bs.dropdown"),c.focus()}return!1},d.prototype.keydown=function(b){if(!/(38|40|27)/.test(b.keyCode))return;var d=a(this);b.preventDefault(),b.stopPropagation();if(d.is(".disabled, :disabled"))return;var e=f(d),g=e.hasClass("open");if(!g||g&&b.keyCode==27)return b.which==27&&e.find(c).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",e);if(!h.length)return;var i=h.index(h.filter(":focus"));b.keyCode==38&&i>0&&i--,b.keyCode==40&&i<h.length-1&&i++,~i||(i=0),h.eq(i).focus()};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),e=c.data("dropdown");e||c.data("dropdown",e=new d(this)),typeof b=="string"&&e[b].call(c)})},a.fn.dropdown.Constructor=d,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",c,d.prototype.toggle).on("keydown.bs.dropdown.data-api",c+", [role=menu]",d.prototype.keydown)}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d);if(this.isShown||d.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show(),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});
28d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)})},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]!==a.target&&!this.$element.has(a.target).length&&this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){a.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",a.proxy(function(a){if(a.target!==a.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!b)return;e?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),typeof c=="object"&&c);f||e.data("bs.modal",f=new b(this,g)),typeof c=="string"?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);var e=this.options.trigger.split(" ");for(var f=e.length;f--;){var g=e[f];if(g=="click")this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if(g!="manual"){var h=g=="hover"?"mouseenter":"focus",i=g=="hover"?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="in";if(!c.options.delay||!c.options.delay.show)return c.show();c.timeout=setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="out";if(!c.options.delay||!c.options.delay.hide)return c.hide();c.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d=typeof this.options.placement=="function"?this.options.placement.call(this,c[
280],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m=this.options.container=="body"?window.innerWidth:j.outerWidth(),n=this.options.container=="body"?window.innerHeight:j.outerHeight(),o=this.options.container=="body"?0:j.offset().left;d=d=="bottom"&&g.top+g.height+i-l>n?"top":d=="top"&&g.top-l-i<0?"bottom":d=="right"&&g.right+h>m?"left":d=="left"&&g.left-h<o?"right":d,c.removeClass(k).addClass(d)}var p=this.getCalculatedOffset(d,g,h,i);this.applyPlacement(p,d),this.$element.trigger("shown.bs."+this.type)}},b.prototype.applyPlacement=function(a,b){var c,d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),a.top=a.top+g,a.left=a.left+h,d.offset(a).addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;b=="top"&&j!=f&&(c=!0,a.top=a.top+f-j);if(/bottom|top/.test(b)){var k=0;a.left<0&&(k=a.left*-2,a.left=0,d.offset(a),i=d[0].offsetWidth,j=d[0].offsetHeight),this.replaceArrow(k-e+i,i,"left")}else this.replaceArrow(j-f,j,"top");c&&d.offset(a)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function e(){b.hoverState!="in"&&c.detach()}var b=this,c=this.tip(),d=a.Event("hide.bs."+this.type);this.$element.trigger(d);if(d.isDefaultPrevented())return;return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?c.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),this.$element.trigger("hidden.bs."+this.type),this},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return a=="bottom"?{top:b.top+b.height,left:b.left+b.width/2-c/2}:a=="top"?{top:b.top-d,left:b.left+b.width/2-c/2}:a=="left"?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f=typeof c=="object"&&c;e||d.data("bs.tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||(typeof b.content=="function"?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f=typeof c=="object"&&c;e||d.data("bs.popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});b.trigger(f);if(f.isDefaultPrevented())return;var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})},b.prototype.activate=function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g).emulateTransitionEnd(150):g(),e.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;typeof f!="object"&&(h=g=f),typeof g=="function"&&(g=f.top()),typeof h=="function"&&(h=f.bottom());var i=this.unpin!=null&&d+this.unpin<=e.top?!1:h!=null&&e.top+this.$element.height()>=c-h?"bottom":g!=null&&d<=g?"top":!1;if(this.affixed===i)return;this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin=i=="bottom"?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),i=="bottom"&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()})};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f=typeof c=="object"&&c;
28e||d.data("bs.affix",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in"))return;var b=a.Event("show.bs.collapse");this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])},b.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in"))return;var b=a.Event("hide.bs.collapse");this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!a.support.transition)return d.call(this);this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350)},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),typeof c=="object"&&c);e||d.data("bs.collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":c.data(),i=c.attr("data-parent"),j=i&&a(i);if(!g||!g.transitioning)j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(c).addClass("collapsed"),c[f.hasClass("in")?"addClass":"removeClass"]("collapsed");f.collapse(h)})}(window.jQuery),+function(a){function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}"use strict",b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this,d=this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,c=b-this.$scrollElement.height(),d=this.offsets,e=this.targets,f=this.activeTarget,g;if(a>=c)return f!=(g=e.last()[0])&&this.activate(g);for(g=d.length;g--;)f!=e[g]&&a>=d[g]&&(!d[g+1]||a<=d[g+1])&&this.activate(e[g])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f=typeof c=="object"&&c;e||d.data("bs.scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(a.style[c]!==undefined)return{end:b[c]}}"use strict",a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery)
29/* End */
30;
31; /* Start:"a:4:{s:4:"full";s:79:"/bitrix/templates/aspro-priority2/vendor/jquery.validate.min.js?176355727822254";s:6:"source";s:63:"/bitrix/templates/aspro-priority2/vendor/jquery.validate.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
32/*! jQuery Validation Plugin - v1.13.1 - 10/14/2014
33 * http://jqueryvalidation.org/
34 * Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
35!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(b.target).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(b.target).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.submit(function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c;return a(this[0]).is("form")?b=this.validate().form():(b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b})),b},removeAttrs:function(b){var c={},d=this;return a.each(b.split(/\s/),function(a,b){c[b]=d.attr(b),d.removeAttr(b)}),c},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,b){(9!==b.which||""!==this.elementValue(a))&&(a.name in this.submitted||a===this.lastElement)&&this.element(a)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}}
35,setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!this.is(e.ignore)&&e[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']","focusin focusout keyup",b).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",b),this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||
35!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?a("input[name='"+b.name+"']:checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a];return void 0},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customDataMessage(b,c),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\])/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.n
35ame],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
35return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),/min|max/.test(c)&&(null===g||/number|range|text/.test(g))&&(d=Number(d)),d||0===d?e[c]=d:g===c&&"range"!==g&&(e[c]=!0);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b);for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),void 0!==d&&(e[c]=d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:a.trim(b).length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){/*return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())*/ /*customized!!!*/ var check = false,re=new RegExp((typeof(VALIDATE_DATE_MASK)!=='undefined'?VALIDATE_DATE_MASK:'^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{4}$')),adata,gg,mm,aaaa,xdata;if(re.test(a)){adata=a.split('.');if(adata.length===1){adata=a.split('-');if(adata.length===1){adata=a.split(' ');
35if(adata.length===1){adata=a.split('/');if(adata.length===1){adata=a.split(':');}}}}gg=parseInt(adata[0],10);mm=parseInt(adata[1],10);aaaa=parseInt(adata[2],10);xdata=new Date(aaaa,mm-1,gg,12,0,0,0);if((xdata.getUTCFullYear()===aaaa)&&(xdata.getUTCMonth()===mm-1)&&(xdata.getUTCDate()===gg)){check = true;}else{check = false;}}else{check = false;}return this.optional(b)||check;},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}}),a.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."};var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a.extend(a.fn,{validateDelegate:function(b,c,d){return this.bind(c,function(c){var e=a(c.target);return e.is(b)?d.apply(e,arguments):void 0})}})});
36/* End */
37;
38; /* Start:"a:4:{s:4:"full";s:72:"/bitrix/templates/aspro-priority2/vendor/js/ripple.min.js?17635572781624";s:6:"source";s:53:"/bitrix/templates/aspro-priority2/vendor/js/ripple.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
39!function(m,i,h){m.ripple=function(t,e){var c=this,f=c.log=function(){c.defaults.debug&&console&&console.log&&console.log.apply(console,arguments)};c.selector=t,c.defaults={debug:!1,on:"mousedown",opacity:.4,color:"auto",multi:!1,duration:.7,rate:function(t){return t},easing:"linear"},c.defaults=m.extend({},c.defaults,e);m(i).on(c.defaults.on,c.selector,function(t){var e,i,o=m(this);if(o.addClass("has-ripple"),(i=m.extend({},c.defaults,o.data())).multi||!i.multi&&0===o.find(".ripple").length){if((e=m("<span></span>").addClass("ripple")).appendTo(o),f("Create: Ripple"),!e.height()&&!e.width()){var n=h.max(o.outerWidth(),o.outerHeight());e.css({height:n,width:n}),f("Set: Ripple size")}if(i.rate&&"function"==typeof i.rate){var a=h.round(e.width()/i.duration),l=i.rate(a),p=e.width()/l;i.duration.toFixed(2)!==p.toFixed(2)&&(f("Update: Ripple Duration",{from:i.duration,to:p}),i.duration=p)}var d="auto"==i.color?o.css("color"):i.color,r={animationDuration:i.duration.toString()+"s",animationTimingFunction:i.easing,background:d,opacity:i.opacity};f("Set: Ripple CSS",r),e.css(r)}i.multi||(f("Set: Ripple Element"),e=o.find(".ripple")),f("Destroy: Ripple Animation"),e.removeClass("ripple-animate");var s=t.pageX-o.offset().left-e.width()/2,u=t.pageY-o.offset().top-e.height()/2;i.multi&&(f("Set: Ripple animationend event"),e.one("animationend webkitAnimationEnd oanimationend MSAnimationEnd",function(){f("Note: Ripple animation ended"),f("Destroy: Ripple"),m(this).remove()})),f("Set: Ripple location"),f("Set: Ripple animation"),e.css({top:u+"px",left:s+"px"}).addClass("ripple-animate")})}}(jQuery,document,Math);
40/* End */
41;
42; /* Start:"a:4:{s:4:"full";s:74:"/bitrix/templates/aspro-priority2/js/detectmobilebrowser.js?17635572772203";s:6:"source";s:59:"/bitrix/templates/aspro-priority2/js/detectmobilebrowser.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
43/**
44 * jQuery.browser.mobile (http://detectmobilebrowser.com/)
45 *
46 * jQuery.browser.mobile will be true if the browser is a mobile device
47 *
48 **/
49(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
49sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera);
50/* End */
51;
52; /* Start:"a:4:{s:4:"full";s:72:"/bitrix/templates/aspro-priority2/js/jquery.actual.min.js?17635572771239";s:6:"source";s:57:"/bitrix/templates/aspro-priority2/js/jquery.actual.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
53/*! Copyright 2012, Ben Lin (http://dreamerslab.com/)
54 * Licensed under the MIT License (LICENSE.txt).
55 *
56 * Version: 1.0.19
57 *
58 * Requires: jQuery >= 1.2.3
59 */
60(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a);
61}else{a(jQuery);}}(function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf;a.fn.extend({actual:function(b,l){if(!this[b]){throw'$.actual => The jQuery method "'+b+'" you called does not exist';
62}var f={absolute:false,clone:false,includeMargin:false,display:"block"};var i=a.extend(f,l);var e=this.eq(0);var h,j;if(i.clone===true){h=function(){var m="position: absolute !important; top: -1000 !important; ";
63e=e.clone().attr("style",m).appendTo("body");};j=function(){e.remove();};}else{var g=[];var d="";var c;h=function(){c=e.parents().addBack().filter(":hidden");
64d+="visibility: hidden !important; display: "+i.display+" !important; ";if(i.absolute===true){d+="position: absolute !important; ";}c.each(function(){var m=a(this);
65var n=m.attr("style");g.push(n);m.attr("style",n?n+";"+d:d);});};j=function(){c.each(function(m){var o=a(this);var n=g[m];if(n===undefined){o.removeAttr("style");
66}else{o.attr("style",n);}});};}h();var k=/(outer)/.test(b)?e[b](i.includeMargin):e[b]();j();return k;}});}));
67
68/* End */
69;
70; /* Start:"a:4:{s:4:"full";s:72:"/bitrix/templates/aspro-priority2/js/jquery.plugin.min.js?17635572773356";s:6:"source";s:57:"/bitrix/templates/aspro-priority2/js/jquery.plugin.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
71/*! Simple JavaScript Inheritance
72 * By John Resig http://ejohn.org/
73 * MIT Licensed.
74 */
75!function(){"use strict";var a=!1;window.JQClass=function(){},JQClass.classes={},JQClass.extend=function b(c){function d(){!a&&this._init&&this._init.apply(this,arguments)}var e=this.prototype;a=!0;var f=new this;a=!1;for(var g in c)if("function"==typeof c[g]&&"function"==typeof e[g])f[g]=function(a,b){return function(){var c=this._super;this._super=function(b){return e[a].apply(this,b||[])};var d=b.apply(this,arguments);return this._super=c,d}}(g,c[g]);else if("object"==typeof c[g]&&"object"==typeof e[g]&&"defaultOptions"===g){var h,i=e[g],j=c[g],k={};for(h in i)k[h]=i[h];for(h in j)k[h]=j[h];f[g]=k}else f[g]=c[g];return d.prototype=f,d.prototype.constructor=d,d.extend=b,d}}(),/*! Abstract base class for collection plugins v1.0.2.
76	Written by Keith Wood (wood.keith{at}optusnet.com.au) December 2013.
77	Licensed under the MIT license (http://keith-wood.name/licence.html). */
78function($){"use strict";function camelCase(a){return a.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},deepMerge:!0,_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var a=camelCase(this.name);$[a]=this,$.fn[a]=function(b){var c=Array.prototype.slice.call(arguments,1),d=this,e=this;return this.each(function(){if("string"==typeof b){if("_"===b[0]||!$[a][b])throw"Unknown method: "+b;var f=$[a][b].apply($[a],[this].concat(c));if(f!==d&&void 0!==f)return e=f,!1}else $[a]._attach(this,b)}),e}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_attach:function(a,b){if(a=$(a),!a.hasClass(this._getMarker())){a.addClass(this._getMarker()),b=$.extend(this.deepMerge,{},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c),this._postAttach(a,c),this.option(a,b)}},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/(\\?)'/g,function(a,b){return b?"'":'"'}).replace(/([a-zA-Z0-9]+):/g,function(a,b,c){var d=data.substring(0,c).match(/"/g);return d&&d.length%2!==0?b+":":'"'+b+'":'}).replace(/\\:/g,":"),data=$.parseJSON("{"+data+"}");for(var key in data)if(data.hasOwnProperty(key)){var value=data[key];"string"==typeof value&&value.match(/^new Date\(([-0-9,\s]*)\)$/)&&(data[key]=eval(value))}return data}catch(a){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name),e=b||{};return!b||"string"==typeof b&&"undefined"==typeof c?(e=(d||{}).options,e&&b?e[b]:e):void(a.hasClass(this._getMarker())&&("string"==typeof b&&(e={},e[b]=c),this._optionsChanged(a,d,e),$.extend(d.options,e)))},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a),a.hasClass(this._getMarker())&&(this._preDestroy(a,this._getInst(a)),a.removeData(this.name).removeClass(this._getMarker()))},_preDestroy:function(a,b){}}),$.JQPlugin={createPlugin:function(a,b){"object"==typeof a&&(b=a,a="JQPlugin"),a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b),new JQClass.classes[c]}}}(jQuery);
79/* End */
80;
81; /* Start:"a:4:{s:4:"full";
81s:77:"/bitrix/templates/aspro-priority2/js/jquery.alphanumeric.min.js?1763557277942";s:6:"source";s:59:"/bitrix/templates/aspro-priority2/js/jquery.alphanumeric.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
82!function(n){n.fn.alphanumeric=function(r){var a,e,c=n(this),t="abcdefghijklmnopqrstuvwxyz",i=n.extend({ichars:"!@#$%^&*()+=[]\\';,/{}|\":<>?~`.- _",nchars:"",allow:""},r),h=i.allow.split(""),l=0;for(l;l<h.length;l++)-1!=i.ichars.indexOf(h[l])&&(h[l]="\\"+h[l]);return i.nocaps&&(i.nchars+=t.toUpperCase()),i.allcaps&&(i.nchars+=t),i.allow=h.join("|"),e=new RegExp(i.allow,"gi"),a=(i.ichars+i.nchars).replace(e,""),c.keypress(function(n){var r=String.fromCharCode(n.charCode?n.charCode:n.which);-1==a.indexOf(r)||n.ctrlKey||n.preventDefault()}),c.blur(function(){var n=c.val(),r=0;for(r;r<n.length;r++)if(-1!=a.indexOf(n[r]))return c.val(""),!1;return!1}),c},n.fn.numeric=function(r){var a="abcdefghijklmnopqrstuvwxyz",e=a.toUpperCase();return this.each(function(){n(this).alphanumeric(n.extend({nchars:a+e},r))})},n.fn.alpha=function(r){var a="1234567890";return this.each(function(){n(this).alphanumeric(n.extend({nchars:a},r))})}}(jQuery);
83/* End */
84;
85; /* Start:"a:4:{s:4:"full";s:66:"/bitrix/templates/aspro-priority2/js/jqModal.min.js?17635572773197";s:6:"source";s:47:"/bitrix/templates/aspro-priority2/js/jqModal.js";s:3:"min";s:51:"/bitrix/templates/aspro-priority2/js/jqModal.min.js";s:3:"map";s:55:"/bitrix/templates/aspro-priority2/js/jqModal.min.js.map";}"*/
86!function($){$.fn.jqm=function(options){var o=$.extend({},$.jqm.params,options);
86return this.each((function(){var e=$(this),jqm=$(this).data("jqm");jqm||(jqm={ID:I++}),e.data("jqm",$.extend(o,jqm)).addClass("jqm-init"),o.trigger&&$(this).jqmAddTrigger(o.trigger)}))},$.fn.jqmAddTrigger=function(trigger){return this.each((function(){addTrigger($(this),"jqmShow",trigger)||err("jqmAddTrigger must be called on initialized modals")}))},$.fn.jqmAddClose=function(trigger){return this.each((function(){addTrigger($(this),"jqmHide",trigger)||err("jqmAddClose must be called on initialized modals")}))},$.fn.jqmShow=function(trigger){return this.each((function(){!this._jqmShown&&show($(this),trigger)}))},$.fn.jqmHide=function(trigger){return this.each((function(){this._jqmShown&&hide($(this),trigger)}))};var err=function(msg){window.console&&window.console.error&&window.console.error(msg)},show=function(e,t){var o=e.data("jqm"),t=t||window.event,z=parseInt(e.css("z-index"));if(void 0===o.noOverlay||void 0!==o.noOverlay&&!o.noOverlay){isNaN(z)&&(window.lastJqmZindex?window.lastJqmZindex=z=window.lastJqmZindex+2:z=3e3),window.lastJqmZindex=z;var v=$("<div></div>").addClass(o.overlayClass).css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":z-1,opacity:o.overlay/100});e.css("z-index",z)}else{var v=$("");e.css("z-index",2999)}if(h={w:e,c:o,o:v,t:t},o.ajax){var target=o.target||e,url=o.ajax;target="string"==typeof target?$(target,e):$(target),"@"==url.substr(0,1)&&(url=$(t).attr(url.substring(1))),target.html(o.ajaxText).load(url,(function(){o.onLoad&&o.onLoad.call(this,h),open(h)}))}else open(h)},hide=function(e,t){var o=e.data("jqm"),t=t||window.event,h={w:e,c:o,o:e.data("jqmv"),t:t};close(h)},onShow=function(hash){return!hash.w[0]._jqmShown&&(hash.c.overlay>0&&hash.o.prependTo("#popup_iframe_wrapper"),hash.w.show(),$.jqm.focusFunc(hash.w),!0)},onHide=function(hash){return hash.w.hide()&&hash.o&&hash.o.remove(),!0},addTrigger=function(e,key,trigger){return!!e.data("jqm")&&$(trigger).each((function(){this[key]=this[key]||[],this[key].push(e)})).click((function(){var trigger=this;return $.each(this[key],(function(i,e){e[key](trigger)})),!1}))},open=function(h){var e=h.w,v=h.o,o=h.c;!1!==o.onShow(h)&&(e[0]._jqmShown=!0,o.modal?(!A[0]&&F("bind"),A.push(e)):e.jqmAddClose(v),o.closeClass&&e.jqmAddClose($("."+o.closeClass,e)),o.toTop&&v&&e.before('<span id="jqmP'+o.ID+'"></span>').insertAfter(v),e.data("jqmv",v))},close=function(h){var e=h.w,v=h.o,o=h.c;!1!==o.onHide(h)&&(e[0]._jqmShown=!1,o.modal&&(A.pop(),!A[0]&&F("unbind")),o.toTop&&v&&$("#jqmP"+o.ID).after(e).remove())},F=function(t){$(document)[t]("keypress keydown mousedown",X)},X=function(e){var modal=$(e.target).data("jqm")||$(e.target).parents(".jqm-init:first").data("jqm"),activeModal=A[A.length-1].data("jqm");return!(!modal||modal.ID!=activeModal.ID)||$.jqm.focusFunc(activeModal)},I=0,A=[];$.jqm={params:{overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:!1,target:!1,ajaxText:"",modal:!1,toTop:!1,onShow:onShow,onHide:onHide,onLoad:!1},focusFunc:function(e){return $(":input:visible:first",e).focus(),!1}}}(jQuery);
87/* End */
88;
89; /* Start:"a:4:{s:4:"full";s:73:"/bitrix/templates/aspro-priority2/js/jquery.uniform.min.js?17635572778308";s:6:"source";s:58:"/bitrix/templates/aspro-priority2/js/jquery.uniform.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
90(function(e,t){"use strict";function n(e){var t=Array.prototype.slice.call(arguments,1);return e.prop?e.prop.apply(e,t):e.attr.apply(e,t)}function s(e,t,n){var s,a;for(s in n)n.hasOwnProperty(s)&&(a=s.replace(/ |$/g,t.eventNamespace),e.bind(a,n[s]))}function a(e,t,n){s(e,n,{focus:function(){t.addClass(n.focusClass)},blur:function(){t.removeClass(n.focusClass),t.removeClass(n.activeClass)},mouseenter:function(){t.addClass(n.hoverClass)},mouseleave:function(){t.removeClass(n.hoverClass),t.removeClass(n.activeClass)},"mousedown touchbegin":function(){e.is(":disabled")||t.addClass(n.activeClass)},"mouseup touchend":function(){t.removeClass(n.activeClass)}})}function i(e,t){e.removeClass(t.hoverClass+" "+t.focusClass+" "+t.activeClass)}function r(e,t,n){n?e.addClass(t):e.removeClass(t)}function l(e,t,n){var s="checked",a=t.is(":"+s);t.prop?t.prop(s,a):a?t.attr(s,s):t.removeAttr(s),r(e,n.checkedClass,a)}function u(e,t,n){r(e,n.disabledClass,t.is(":disabled"))}function o(e,t,n){switch(n){case"after":return e.after(t),e.next();case"before":return e.before(t),e.prev();case"wrap":return e.wrap(t),e.parent()}return null}function c(t,s,a){var i,r,l;return a||(a={}),a=e.extend({bind:{},divClass:null,divWrap:"wrap",spanClass:null,spanHtml:null,spanWrap:"wrap"},a),i=e("<div />"),r=e("<span />"),s.autoHide&&t.is(":hidden")&&"none"===t.css("display")&&i.hide(),a.divClass&&i.addClass(a.divClass),s.wrapperClass&&i.addClass(s.wrapperClass),a.spanClass&&r.addClass(a.spanClass),l=n(t,"id"),s.useID&&l&&n(i,"id",s.idPrefix+"-"+l),a.spanHtml&&r.html(a.spanHtml),i=o(t,i,a.divWrap),r=o(t,r,a.spanWrap),u(i,t,s),{div:i,span:r}}function d(t,n){var s;return n.wrapperClass?(s=e("<span />").addClass(n.wrapperClass),s=o(t,s,"wrap")):null}function f(){var t,n,s,a;return a="rgb(120,2,153)",n=e('<div style="width:0;height:0;color:'+a+'">'),e("body").append(n),s=n.get(0),t=window.getComputedStyle?window.getComputedStyle(s,"").color:(s.currentStyle||s.style||{}).color,n.remove(),t.replace(/ /g,"")!==a}function p(t){return t?e("<span />").text(t).html():""}function m(){return navigator.cpuClass&&!navigator.product}function v(){return window.XMLHttpRequest!==void 0?!0:!1}function h(e){var t;return e[0].multiple?!0:(t=n(e,"size"),!t||1>=t?!1:!0)}function C(){return!1}function w(e,t){var n="none";s(e,t,{"selectstart dragstart mousedown":C}),e.css({MozUserSelect:n,msUserSelect:n,webkitUserSelect:n,userSelect:n})}function b(e,t,n){var s=e.val();""===s?s=n.fileDefaultHtml:(s=s.split(/[\/\\]+/),s=s[s.length-1]),t.text(s)}function y(e,t,n){var s,a;for(s=[],e.each(function(){var e;
vendor: 4,406 bytes, line 90
90for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s.push({el:this,name:e,old:this.style[e]}),this.style[e]=t[e])}),n();s.length;)a=s.pop(),a.el.style[a.name]=a.old}function g(e,t){var n;n=e.parents(),n.push(e[0]),n=n.not(":visible"),y(n,{visibility:"hidden",display:"block",position:"absolute"},t)}function k(e,t){return function(){e.unwrap().unwrap().unbind(t.eventNamespace)}}var H=!0,x=!1,A=[{match:function(e){return e.is("a, button, :submit, :reset, input[type='button']")},apply:function(e,t){var r,l,o,d,f;return l=t.submitDefaultHtml,e.is(":reset")&&(l=t.resetDefaultHtml),d=e.is("a, button")?function(){return e.html()||l}:function(){return p(n(e,"value"))||l},o=c(e,t,{divClass:t.buttonClass,spanHtml:d()}),r=o.div,a(e,r,t),f=!1,s(r,t,{"click touchend":function(){var t,s,a,i;f||e.is(":disabled")||(f=!0,e[0].dispatchEvent?(t=document.createEvent("MouseEvents"),t.initEvent("click",!0,!0),s=e[0].dispatchEvent(t),e.is("a")&&s&&(a=n(e,"target"),i=n(e,"href"),a&&"_self"!==a?window.open(i,a):document.location.href=i)):e.click(),f=!1)}}),w(r,t),{remove:function(){return r.after(e),r.remove(),e.unbind(t.eventNamespace),e},update:function(){i(r,t),u(r,e,t),e.detach(),o.span.html(d()).append(e)}}}},{match:function(e){return e.is(":checkbox")},apply:function(e,t){var n,r,o;return n=c(e,t,{divClass:t.checkboxClass}),r=n.div,o=n.span,a(e,r,t),s(e,t,{"click touchend":function(){l(o,e,t)}}),l(o,e,t),{remove:k(e,t),update:function(){i(r,t),o.removeClass(t.checkedClass),l(o,e,t),u(r,e,t)}}}},{match:function(e){return e.is(":file")},apply:function(t,r){function l(){b(t,p,r)}var d,f,p,v;return d=c(t,r,{divClass:r.fileClass,spanClass:r.fileButtonClass,spanHtml:r.fileButtonHtml,spanWrap:"after"}),f=d.div,v=d.span,p=e("<span />").html(r.fileDefaultHtml),p.addClass(r.filenameClass),p=o(t,p,"after"),n(t,"size")||n(t,"size",f.width()/10),a(t,f,r),l(),m()?s(t,r,{click:function(){t.trigger("change"),setTimeout(l,0)}}):s(t,r,{change:l}),w(p,r),w(v,r),{remove:function(){return p.remove(),v.remove(),t.unwrap().unbind(r.eventNamespace)},update:function(){i(f,r),b(t,p,r),u(f,t,r)}}}},{match:function(e){if(e.is("input")){var t=(" "+n(e,"type")+" ").toLowerCase(),s=" color date datetime datetime-local email month number password search tel text time url week ";return s.indexOf(t)>=0}return!1},apply:function(e,t){var s,i;return s=n(e,"type"),e.addClass(t.inputClass),i=d(e,t),a(e,e,t),t.inputAddTypeAsClass&&e.addClass(s),{remove:function(){e.removeClass(t.inputClass),t.inputAddTypeAsClass&&e.removeClass(s),i&&e.unwrap()},update:C}}},{match:function(e){return e.is(":radio")},apply:function(t,r){var o,d,f;return o=c(t,r,{divClass:r.radioClass}),d=o.div,f=o.span,a(t,d,r),s(t,r,{"click touchend":function(){e.uniform.update(e(':radio[name="'+n(t,"name")+'"]'))}}),l(f,t,r),{remove:k(t,r),update:function(){i(d,r),l(f,t,r),u(d,t,r)}}}},{match:function(e){return e.is("select")&&!h(e)?!0:!1},apply:function(t,n){var r,l,o,d;return n.selectAutoWidth&&g(t,function(){d=t.width()}),r=c(t,n,{divClass:n.selectClass,spanHtml:(t.find(":selected:first")||t.find("option:first")).html(),spanWrap:"before"}),l=r.div,o=r.span,n.selectAutoWidth?g(t,function(){y(e([o[0],l[0]]),{display:"block"},function(){var e;e=o.outerWidth()-o.width(),l.width(d+e),o.width(d)})}):l.addClass("fixedWidth"),a(t,l,n),s(t,n,{change:function(){o.html(t.find(":selected").html()),l.removeClass(n.activeClass)},"click touchend":function(){var e=t.find(":selected").html();o.html()!==e&&t.trigger("change")},keyup:function(){o.html(t.find(":selected").html())}}),w(o,n),{remove:function(){return o.remove(),t.unwrap().unbind(n.eventNamespace),t},update:function(){n.selectAutoWidth?(e.uniform.restore(t),t.uniform(n)):(i(l,n),o.html(t.find(":selected").html()),u(l,t,n))}}}},{match:function(e){return e.is("select")&&h(e)?!0:!1},apply:function(e,t){var n;return e.addClass(t.selectMultiClass),n=d(e,t),a(e,e,t),{remove:function(){e.removeClass(t.selectMultiClass),n&&e.unwrap()},update:C}}},{match:function(e){return e.is("textarea")},apply:function(e,t){var n;return e.addClass(t.textareaClass),n=d(e,t),a(e,e,t),{remove:function(){e.removeClass(t.textareaClass),n&&e.unwrap()},update:C}}}];m()&&!v()&&(H=!1),e.uniform={defaults:{activeClass:"active",autoHide:!0,buttonClass:"button",checkboxClass:"checker",checkedClass:"checked",disabledClass:"disabled",eventNamespace:".uniform",fileButtonClass:"action",fileButtonHtml:"Cho
90ose File",fileClass:"uploader",fileDefaultHtml:"No file selected",filenameClass:"filename",focusClass:"focus",hoverClass:"hover",idPrefix:"uniform",inputAddTypeAsClass:!0,inputClass:"uniform-input",radioClass:"radio",resetDefaultHtml:"Reset",resetSelector:!1,selectAutoWidth:!0,selectClass:"selector",selectMultiClass:"uniform-multiselect",submitDefaultHtml:"Submit",textareaClass:"uniform",useID:!0,wrapperClass:null},elements:[]},e.fn.uniform=function(t){var n=this;return t=e.extend({},e.uniform.defaults,t),x||(x=!0,f()&&(H=!1)),H?(t.resetSelector&&e(t.resetSelector).mouseup(function(){window.setTimeout(function(){e.uniform.update(n)},10)}),this.each(function(){var n,s,a,i=e(this);if(i.data("uniformed"))return e.uniform.update(i),void 0;for(n=0;A.length>n;n+=1)if(s=A[n],s.match(i,t))return a=s.apply(i,t),i.data("uniformed",a),e.uniform.elements.push(i.get(0)),void 0})):this},e.uniform.restore=e.fn.uniform.restore=function(n){n===t&&(n=e.uniform.elements),e(n).each(function(){var t,n,s=e(this);n=s.data("uniformed"),n&&(n.remove(),t=e.inArray(this,e.uniform.elements),t>=0&&e.uniform.elements.splice(t,1),s.removeData("uniformed"))})},e.uniform.update=e.fn.uniform.update=function(n){n===t&&(n=e.uniform.elements),e(n).each(function(){var t,n=e(this);t=n.data("uniformed"),t&&t.update(n,t.options)})}})(jQuery);
91/* End */
92;
93; /* Start:"a:4:{s:4:"full";s:76:"/bitrix/templates/aspro-priority2/js/jquery.countdown.min.js?176355727721419";s:6:"source";s:60:"/bitrix/templates/aspro-priority2/js/jquery.countdown.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
94!(function (e) {
95  var t = "countdown",
96    i = 0,
97    s = 1,
98    n = 2,
99    o = 3,
100    r = 4,
101    a = 5,
102    l = 6;
103  e.JQPlugin.createPlugin({
104    name: t,
105    defaultOptions: {
106      until: null,
107      since: null,
108      timezone: null,
109      serverSync: null,
110      format: "dHMS",
111      layout: "",
112      compact: !1,
113      padZeroes: !1,
114      significant: 0,
115      description: "",
116      expiryUrl: "",
117      expiryText: "",
118      alwaysExpire: !1,
119      onExpiry: null,
120      onTick: null,
121      tickInterval: 1,
122    },
123    regionalOptions: {
124      "": {
125        labels: ["Years", "Months", "Weeks", "Days", "Hours", "Minutes", "Seconds"],
126        labels1: ["Year", "Month", "Week", "Day", "Hour", "Minute", "Second"],
127        compactLabels: ["y", "m", "w", "d"],
128        whichLabels: null,
129        digits: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
130        timeSeparator: ":",
131        isRTL: !1,
132      },
133    },
134    _getters: ["getTimes"],
135    _rtlClass: t + "-rtl",
136    _sectionClass: t + "-section",
137    _amountClass: t + "-amount",
138    _periodClass: t + "-period",
139    _rowClass: t + "-row",
140    _holdingClass: t + "-holding",
141    _showClass: t + "-show",
142    _descrClass: t + "-descr",
143    _timerElems: [],
144    _init: function () {
145      function t(e) {
146        var a = 1e12 > e ? (n ? performance.now() + performance.timing.navigationStart : s()) : e || s();
147        a - r >= 1e3 && (i._updateElems(), (r = a)), o(t);
148      }
149      var i = this;
150      this._super(), (this._serverSyncs = []);
151      
152    //   console.log(i);
153      var s =
154          "function" == typeof Date.now
155            ? Date.now
156            : function () {
157                return new Date().getTime();
158              },
159        n = window.performance && "function" == typeof window.performance.now,
160        o =
161          window.requestAnimationFrame ||
162          window.webkitRequestAnimationFrame ||
163          window.mozRequestAnimationFrame ||
164          window.oRequestAnimationFrame ||
165          window.msRequestAnimationFrame ||
166          null,
167        r = 0;
168      !o || e.noRequestAnimationFrame
169        ? ((e.noRequestAnimationFrame = null),
170          setInterval(function () {
171            i._updateElems();
172          }, 980))
173        : ((r =
174            window.animationStartTime ||
175            window.webkitAnimationStartTime ||
176            window.mozAnimationStartTime ||
177            window.oAnimationStartTime ||
178            window.msAnimationStartTime ||
179            s()),
180          o(t));
181    },
182    UTCDate: function (e, t, i, s, n, o, r, a) {
183      "object" == typeof t &&
184        t.constructor == Date &&
185        ((a = t.getMilliseconds()),
186        (r = t.getSeconds()),
187        (o = t.getMinutes()),
188        (n = t.getHours()),
189        (s = t.getDate()),
190        (i = t.getMonth()),
191        (t = t.getFullYear()));
192      var l = new Date();
193      return (
194        l.setUTCFullYear(t),
195        l.setUTCDate(1),
196        l.setUTCMonth(i || 0),
197        l.setUTCDate(s || 1),
198        l.setUTCHours(n || 0),
199        l.setUTCMinutes((o || 0) - (Math.abs(e) < 30 ? 60 * e : e)),
200        l.setUTCSeconds(r || 0),
201        l.setUTCMilliseconds(a || 0),
202        l
203      );
204    },
205    periodsToSeconds: function (e) {
206      return 31557600 * e[0] + 2629800 * e[1] + 604800 * e[2] + 86400 * e[3] + 3600 * e[4] + 60 * e[5] + e[6];
207    },
208    resync: function () {
209      var t = this;
210      e("." + this._getMarker()).each(function () {
211        var i = e.data(this, t.name);
212        if (i.options.serverSync) {
213          for (var s = null, n = 0; n < t._serverSyncs.length; n++)
214            if (t._serverSyncs[n][0] == i.options.serverSync) {
215              s = t._serverSyncs[n];
216              break;
217            }
218          if (null == s[2]) {
219            var o = e.isFunction(i.options.serverSync) ? i.options.serverSync.apply(this, []) : null;
220            s[2] = (o ? new Date().getTime() - o.getTime() : 0) - s[1];
221          }
222          i._since && i._since.setMilliseconds(i._since.getMilliseconds() + s[2]),
223            i._until.setMilliseconds(i._until.getMilliseconds() + s[2]);
224        }
225      });
226      for (var i = 0; i < t._serverSyncs.length; i++)
227        null != t._serverSyncs[i][2] && ((t._serverSyncs[i][1] += t._serverSyncs[i][2]), delete t._serverSyncs[i][2]);
228    },
229    _instSettings: function (e, t) {
230      return { _periods: [0, 0, 0, 0, 0, 0, 0] };
231    },
232    _addElem: function (e) {
233        // console.log(e);
234      this._hasElem(e) || this._timerElems.push(e);
235      
236    },
237    _hasElem: function (t) {
238      return e.inArray(t, this._timerElems) > -1;
239    },
240    _removeElem: function (t) {
241      this._timerElems = e.map(this._timerElems, function (e) {
242        return e == t ? null : e;
243      });
244    },
245    _updateElems: function () {
246      for (var e = this._timerElems.length - 1; e >= 0; e--) this._updateCountdown(this._timerElems[e]);
247    },
248    _optionsChanged: function (t, i, s) {
249      s.layout && (s.layout = s.layout.replace(/&lt;/g, "<").replace(/&gt;/g, ">")),
250        this._resetExtraLabels(i.options, s);
251      var n = i.options.timezone != s.timezone;
252      e.extend(i.options, s), this._adjustSettings(t, i, null != s.until || null != s.since || n);
253      var o = new Date();
254      ((i._since && i._since < o) || (i._until && i._until > o)) && this._addElem(t[0]), this._updateCountdown(t, i);
255    },
256    _updateCountdown: function (t, i) {
257      if (((t = t.jquery ? t : e(t)), (i = i || this._getInst(t)), i && i.options)) {
258        if (
259          (t.html(this._generateHTML(i)).toggleClass(this._rtlClass, i.options.isRTL), e.isFunction(i.options.onT
259ick))
260        ) {
261          var s = "lap" != i._hold ? i._periods : this._calculatePeriods(i, i._show, i.options.significant, new Date());
262          (1 == i.options.tickInterval || this.periodsToSeconds(s) % i.options.tickInterval == 0) &&
263            i.options.onTick.apply(t[0], [s]);
264        }
265        var n =
266          "pause" != i._hold &&
267          (i._since ? i._now.getTime() < i._since.getTime() : i._now.getTime() >= i._until.getTime());
268        if (n && !i._expiring) {
269          if (((i._expiring = !0), this._hasElem(t[0]) || i.options.alwaysExpire)) {
270            if (
271              (this._removeElem(t[0]),
272              e.isFunction(i.options.onExpiry) && i.options.onExpiry.apply(t[0], []),
273              i.options.expiryText)
274            ) {
275              var o = i.options.layout;
276              (i.options.layout = i.options.expiryText), this._updateCountdown(t[0], i), (i.options.layout = o);
277            }
278            i.options.expiryUrl && (window.location = i.options.expiryUrl);
279          }
280          i._expiring = !1;
281        } else "pause" == i._hold && this._removeElem(t[0]);
282      }
283    },
284    _resetExtraLabels: function (e, t) {
285      for (var i in t) i.match(/[Ll]abels[02-9]|compactLabels1/) && (e[i] = t[i]);
286      for (var i in e) i.match(/[Ll]abels[02-9]|compactLabels1/) && "undefined" == typeof t[i] && (e[i] = null);
287    },
288    _adjustSettings: function (t, i, s) {
289      for (var n = null, o = 0; o < this._serverSyncs.length; o++)
290        if (this._serverSyncs[o][0] == i.options.serverSync) {
291          n = this._serverSyncs[o][1];
292          break;
293        }
294      if (null != n)
295        var r = i.options.serverSync ? n : 0,
296          a = new Date();
297      else {
298        var l = e.isFunction(i.options.serverSync) ? i.options.serverSync.apply(t[0], []) : null,
299          a = new Date(),
300          r = l ? a.getTime() - l.getTime() : 0;
301        this._serverSyncs.push([i.options.serverSync, r]);
302      }
303      var _ = i.options.timezone;
304      (_ = null == _ ? -a.getTimezoneOffset() : _),
305        (s || (!s && null == i._until && null == i._since)) &&
306          ((i._since = i.options.since),
307          null != i._since &&
308            ((i._since = this.UTCDate(_, this._determineTime(i._since, null))),
309            i._since && r && i._since.setMilliseconds(i._since.getMilliseconds() + r)),
310          (i._until = this.UTCDate(_, this._determineTime(i.options.until, a))),
311          r && i._until.setMilliseconds(i._until.getMilliseconds() + r)),
312        (i._show = this._determineShow(i));
313    },
314    _preDestroy: function (e, t) {
315      this._removeElem(e[0]), e.empty();
316    },
317    pause: function (e) {
318      this._hold(e, "pause");
319    },
320    lap: function (e) {
321      this._hold(e, "lap");
322    },
323    resume: function (e) {
324      this._hold(e, null);
325    },
326    toggle: function (t) {
327      var i = e.data(t, this.name) || {};
328      this[i._hold ? "resume" : "pause"](t);
329    },
330    toggleLap: function (t) {
331      var i = e.data(t, this.name) || {};
332      this[i._hold ? "resume" : "lap"](t);
333    },
334    _hold: function (t, i) {
335      var s = e.data(t, this.name);
336      if (s) {
337        if ("pause" == s._hold && !i) {
338          s._periods = s._savePeriods;
339          var n = s._since ? "-" : "+";
340          (s[s._since ? "_since" : "_until"] = this._determineTime(
341            n +
342              s._periods[0] +
343              "y" +
344              n +
345              s._periods[1] +
346              "o" +
347              n +
348              s._periods[2] +
349              "w" +
350              n +
351              s._periods[3] +
352              "d" +
353              n +
354              s._periods[4] +
355              "h" +
356              n +
357              s._periods[5] +
358              "m" +
359              n +
360              s._periods[6] +
361              "s"
362          )),
363            this._addElem(t);
364        }
365        (s._hold = i),
366          (s._savePeriods = "pause" == i ? s._periods : null),
367          e.data(t, this.name, s),
368          this._updateCountdown(t, s);
369      }
370    },
371    getTimes: function (t) {
372      var i = e.data(t, this.name);
373      return i
374        ? "pause" == i._hold
375          ? i._savePeriods
376          : i._hold
377          ? this._calculatePeriods(i, i._show, i.options.significant, new Date())
378          : i._periods
379        : null;
380    },
381    _determineTime: function (e, t) {
382      var i = this,
383        s = function (e) {
384          var t = new Date();
385          return t.setTime(t.getTime() + 1e3 * e), t;
386        },
387        n = function (e) {
388          e = e.toLowerCase();
389          for (
390            var t = new Date(),
391              s = t.getFullYear(),
392              n = t.getMonth(),
393              o = t.getDate(),
394              r = t.getHours(),
395              a = t.getMinutes(),
396              l = t.getSeconds(),
397              _ = /([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,
398              p = _.exec(e);
399            p;
400
401          ) {
402            switch (p[2] || "s") {
403              case "s":
404                l += parseInt(p[1], 10);
405                break;
406              case "m":
407                a += parseInt(p[1], 10);
408                break;
409              case "h":
410                r += parseInt(p[1], 10);
411                break;
412              case "d":
413                o += parseInt(p[1], 10);
414                break;
415              case "w":
416                o += 7 * parseInt(p[1], 10);
417                break;
418              case "o":
419                (n += parseInt(p[1], 10)), (o = Math.min(o, i._getDaysInMonth(s, n)));
420                break;
421              case "y":
422                (s += parseInt(p[1], 10)), (o = Math.min(o, i._getDaysInMonth(s, n)));
423            }
424            p = _.exec(e);
425          }
426          return new Date(s, n, o, r, a, l, 0);
427        },
428        o = null == e ? t : "string" == typeof e ? n(e) : "number" == typeof e ? s(e) : e;
429      return o && o.setMilliseconds(0), o;
430    },
431    _getDaysInMonth: function (e, t) {
432      return 32 - new Date(e, t, 32).getDate();
433    },
434    _normalLabels: function (e) {
435      return e;
436    },
437    _generateHTML: function (t) {
438      var _ = this;
439      t._periods = t._hold ? t._periods : this._calculatePeriods(t, t._show, t.options.significant, new Date());
440      for (var p = !1, c = 0, u = t.options.significant, d = e.extend({}, t._show), h = i; l >= h; h++)
441        (p |= "?" == t._show[h] && t._periods[h] > 0),
442          (d[h] = "?" != t._show[h] || p ? t._show[h] : null),
443          (c += d[h] ? 1 : 0),
444          (u -= t._periods[h] > 0 ? 1 : 0);
445      for (var m = [!1, !1, !1, !1, !1, !1, !1], h = l; h >= i; h--)
446        t._show[h] && (t._periods[h] ? (m[h] = !0) : ((m[h] = u > 0), u--));
447      var g = t.options.compact ? t.options.compactLabels : t.options.labels,
448        f = t.options.whichLabels || this._normalLabels,
449        w = function (e) {
450          var i = t.options["compactLabels" + f(t._periods[e])];
451          return d[e] ? _._translateDigits(t, t._periods[e]) + (i ? i[e] : g[e]) + " " : "";
452        },
453        y = t.options.padZeroes ? 2 : 1,
454        v = function (e) {
455          var i = t.options["labels" + f(t._periods[e])];
456          return (!t.options.significant && d[e]) || (t.options.significant && m[e])
457            ? '<span class="' +
458                _._sectionClass +
459                '"><span class="' +
460                _._amountClass +
461                '">' +
462                _._minDigits(t, t._periods[e], y) +
463                '</span><span class="' +
464                _._periodClass +
465                '">' +
466                (i ? i[e] : g[e]) +
467                "</span></span>"
468            : "";
469        };
470      return t.options.layout
471        ? this._buildLayout(t, d, t.options.layout, t.options.compact, t.options.significant, m)
472        : (t.options.compact
473            ? '<span class="' +
474              this._rowClass +
475              " " +
476              this._amountClass +
477              (t._hold ? " " + this._holdingClass : "") +
478              '">' +
479              w(i) +
480              w(s) +
481              w(n) +
482              w(o) +
483              (d[r] ? this._minDigits(t, t._periods[r], 2) : "") +
484              (d[a] ? (d[r] ? t.options.timeSeparator : "") + this._minDigits(t, t._periods[a], 2) : "") +
485              (d[l] ? (d[r] || d[a] ? t.options.timeSeparator : "") + this._minDigits(t, t._periods[l], 2) : "")
486            : '<span class="' +
487              this._rowClass +
488              " " +
489              this._showClass +
490              (t.options.significant || c) +
491              (t._hold ? " " + this._holdingClass : "") +
492              '">' +
493              v(i) +
494              v(s) +
495              v(n) +
496              v(o) +
497              v(r) +
498              v(a) +
499              v(l)) +
500            "</span>" +
501            (t.options.description
502              ? '<span class="' + this._rowClass + " " + this._descrClass + '">' + t.options.description + "</span>"
503              : "");
504    },
505    _buildLayout: function (t, _, p, c, u, d) {
506      for (
507        var h = t.options[c ? "compactLabels" : "labels"],
508          m = t.options.whichLabels || this._normalLabels,
509          g = function (e) {
510            return (t.options[(c ? "compactLabels" : "labels") + m(t._periods[e])] || h)[e];
511          },
512          f = function (e, i) {
513            return t.options.digits[Math.floor(e / i) % 10];
514          },
515          w = {
516            desc: t.options.description,
517            sep: t.options.timeSeparator,
518            yl: g(i),
519            yn: this._minDigits(t, t._periods[i], 1),
520            ynn: this._minDigits(t, t._periods[i], 2),
521            ynnn: this._minDigits(t, t._periods[i], 3),
522            y1: f(t._periods[i], 1),
523            y10: f(t._periods[i], 10),
524            y100: f(t._periods[i], 100),
525            y1000: f(t._periods[i], 1e3),
526            ol: g(s),
527            on: this._minDigits(t, t._periods[s], 1),
528            onn: this._minDigits(t, t._periods[s], 2),
529            onnn: this._minDigits(t, t._periods[s], 3),
530            o1: f(t._periods[s], 1),
531            o10: f(t._periods[s], 10),
532            o100: f(t._periods[s], 100),
533            o1000: f(t._periods[s], 1e3),
534            wl: g(n),
535            wn: this._minDigits(t, t._periods[n], 1),
536            wnn: this._minDigits(t, t._periods[n], 2),
537            wnnn: this._minDigits(t, t._periods[n], 3),
538            w1: f(t._periods[n], 1),
539            w10: f(t._periods[n], 10),
540            w100: f(t._periods[n], 100),
541            w1000: f(t._periods[n], 1e3),
542            dl: g(o),
543            dn: this._minDigits(t, t._periods[o], 1),
544            dnn: this._minDigits(t, t._periods[o], 2),
545            dnnn: this._minDigits(t, t._periods[o], 3),
546            d1: f(t._periods[o], 1),
547            d10: f(t._periods[o], 10),
548            d100: f(t._periods[o], 100),
549            d1000: f(t._periods[o], 1e3),
550            hl: g(r),
551            hn: this._minDigits(t, t._periods[r], 1),
552            hnn: this._minDigits(t, t._periods[r], 2),
553            hnnn: this._minDigits(t, t._periods[r], 3),
554            h1: f(t._periods[r], 1),
555            h10: f(t._periods[r], 10),
556            h100: f(t._periods[r], 100),
557            h1000: f(t._periods[r], 1e3),
558            ml: g(a),
559            mn: this._minDigits(t, t._periods[a], 1),
560            mnn: this._minDigits(t, t._periods[a], 2),
561            mnnn: this._minDigits(t, t._periods[a], 3),
562            m1: f(t._periods[a], 1),
563            m10: f(t._periods[a], 10),
564            m100: f(t._periods[a], 100),
565            m1000: f(t._periods[a], 1e3),
566            sl: g(l),
567            sn: this._minDigits(t, t._periods[l], 1),
568            snn: this._minDigits(t, t._periods[l], 2),
569            snnn: this._minDigits(t, t._periods[l], 3),
570            s1: f(t._periods[l], 1),
571            s10: f(t._periods[l], 10),
572            s100: f(t._periods[l], 100),
573            s1000: f(t._periods[l], 1e3),
574          },
575          y = p,
576          v = i;
577        l >= v;
578        v++
579      ) {
580        var D = "yowdhms".charAt(v),
581          T = new RegExp("\\{" + D + "<\\}([\\s\\S]*)\\{" + D + ">\\}", "g");
582        y = y.replace(T, (!u && _[v]) || (u && d[v]) ? "$1" : "");
583      }
584      return (
585        e.each(w, function (e, t) {
586          var i = new RegExp("\\{" + e + "\\}", "g");
587          y = y.replace(i, t);
588        }),
589        y
590      );
591    },
592    _minDigits: function (e, t, i) {
593      return (
594        (t = "" + t),
595        t.length >= i
596          ? this._translateDigits(e, t)
597          : ((t = "0000000000" + t), this._translateDigits(e, t.substr(t.length - i)))
598      );
599    },
600    _translateDigits: function (e, t) {
601      return ("" + t).replace(/[0-9]/g, function (t) {
602        return e.options.digits[t];
603      });
604    },
605    _determineShow: function (e) {
606      var t = e.options.format,
607        _ = [];
608      return (
609        (_[i] = t.match("y") ? "?" : t.match("Y") ? "!" : null),
610        (_[s] = t.match("o") ? "?" : t.match("O") ? "!" : null),
611        (_[n] = t.match("w") ? "?" : t.match("W") ? "!" : null),
612        (_[o] = t.match("d") ? "?" : t.match("D") ? "!" : null),
613        (_[r] = t.match("h") ? "?" : t.match("H") ? "!" : null),
614        (_[a] = t.match("m") ? "?" : t.match("M") ? "!" : null),
615        (_[l] = t.match("s") ? "?" : t.match("S") ? "!" : null),
616        _
617      );
618    },
619    _calculatePeriods: function (e, t, _, p) {
620      (e._now = p), e._now.setMilliseconds(0);
621      var c = new Date(e._now.getTime());
622      e._since
623        ? p.getTime() < e._since.getTime()
624          ? (e._now = p = c)
625          : (p = e._since)
626        : (c.setTime(e._until.getTime()), p.getTime() > e._until.getTime() && (e._now = p = c));
627      var u = [0, 0, 0, 0, 0, 0, 0];
628      if (t[i] || t[s]) {
629        var d = this._getDaysInMonth(p.getFullYear(), p.getMonth()),
630          h = this._getDaysInMonth(c.getFullYear(), c.getMonth()),
631          m = c.getDate() == p.getDate() || (c.getDate() >= Math.min(d, h) && p.getDate() >= Math.min(d, h)),
632          g = function (e) {
633            return 60 * (60 * e.getHours() + e.getMinutes()) + e.getSeconds();
634          },
635          f = Math.max(
636            0,
637            12 * (c.getFullYear() - p.getFullYear()) +
638              c.getMonth() -
639              p.getMonth() +
640              ((c.getDate() < p.getDate() && !m) || (m && g(c) < g(p)) ? -1 : 0)
641          );
642        (u[i] = t[i] ? Math.floor(f / 12) : 0), (u[s] = t[s] ? f - 12 * u[i] : 0), (p = new Date(p.getTime()));
643        var w = p.getDate() == d,
644          y = this._getDaysInMonth(p.getFullYear() + u[i], p.getMonth() + u[s]);
645        p.getDate() > y && p.setDate(y),
646          p.setFullYear(p.getFullYear() + u[i]),
647          p.setMonth(p.getMonth() + u[s]),
648          w && p.setDate(y);
649      }
650      var v = Math.floor((c.getTime() - p.getTime()) / 1e3),
651        D = function (e, i) {
652          (u[e] = t[e] ? Math.floor(v / i) : 0), (v -= u[e] * i);
653        };
654      if ((D(n, 604800), D(o, 86400), D(r, 3600), D(a, 60), D(l, 1), v > 0 && !e._since))
655        for (var T = [1, 12, 4.3482, 7, 24, 60, 60], M = l, S = 1, b = l; b >= i; b--)
656          t[b] && (u[M] >= S && ((u[M] = 0), (v = 1)), v > 0 && (u[b]++, (v = 0), (M = b), (S = 1))), (S *= T[b]);
657      if (_) for (var b = i; l >= b; b++) _ && u[b] ? _-- : _ || (u[b] = 0);
658      return u;
659    },
660  });
661})(jQuery);
662
663/* End */
664;
665; /* Start:"a:4:{s:4:"full";s:78:"/bitrix/templates/aspro-priority2/js/jquery.countdown-ru.min.js?17635572771487";s:6:"source";s:59:"/bitrix/templates/aspro-priority2/js/jquery.countdown-ru.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
666!function(O){O.countdown.regionalOptions.ru={labels:[BX.message("COUNTDOWN_YEAR0"),BX.message("COUNTDOWN_MONTH0"),BX.message("COUNTDOWN_WEAK0"),BX.message("COUNTDOWN_DAY0"),BX.message("COUNTDOWN_HOUR"),BX.message("COUNTDOWN_MIN"),BX.message("COUNTDOWN_SEC")],labels1:[BX.message("COUNTDOWN_YEAR1"),BX.message("COUNTDOWN_MONTH1"),BX.message("COUNTDOWN_WEAK1"),BX.message("COUNTDOWN_DAY1"),BX.message("COUNTDOWN_HOUR"),BX.message("COUNTDOWN_MIN"),BX.message("COUNTDOWN_SEC")],labels2:[BX.message("COUNTDOWN_YEAR2"),BX.message("COUNTDOWN_MONTH2"),BX.message("COUNTDOWN_WEAK2"),BX.message("COUNTDOWN_DAY2"),BX.message("COUNTDOWN_HOUR"),BX.message("COUNTDOWN_MIN"),BX.message("COUNTDOWN_SEC")],compactLabels:[BX.message("COUNTDOWN_COMPACT_YEAR0"),BX.message("COUNTDOWN_COMPACT_MONTH"),BX.message("COUNTDOWN_COMPACT_WEAK"),BX.message("COUNTDOWN_COMPACT_DAY"),BX.message("COUNTDOWN_COMPACT_HOUR"),BX.message("COUNTDOWN_COMPACT_MIN"),BX.message("COUNTDOWN_COMPACT_SEC")],compactLabels1:[BX.message("COUNTDOWN_COMPACT_YEAR1"),BX.message("COUNTDOWN_COMPACT_MONTH"),BX.message("COUNTDOWN_COMPACT_WEAK"),BX.message("COUNTDOWN_COMPACT_DAY"),BX.message("COUNTDOWN_COMPACT_HOUR"),BX.message("COUNTDOWN_COMPACT_MIN"),BX.message("COUNTDOWN_COMPACT_SEC")],whichLabels:function(O){var e=O%10,s=Math.floor(O%100/10);return 1==O?1:2<=e&&e<=4&&1!=s?2:1==e&&1!=s?1:0},digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:!1},O.countdown.setDefaults(O.countdown.regionalOptions.ru)}(jQuery);
667/* End */
668;
669; /* Start:"a:4:{s:4:"full";s:69:"/bitrix/templates/aspro-priority2/js/scrollTabs.min.js?17635572777548";s:6:"source";s:50:"/bitrix/templates/aspro-priority2/js/scrollTabs.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
670InitTabsScroll=function(){$(".arrow_scroll:not(.arrow_scroll_init)").scrollTab()},ResizeScrollTabs=function(){var r=$(".arrow_scroll_init");r.length&&r.each((function(r,t){$(t).data("scrollTabOptions").resize()}))},$(document).ready((function(){InitTabsScroll()})),$(window).on("resize",(function(){void 0!==window.scrollTabsTimeout&&clearTimeout(window.scrollTabsTimeout),window.scrollTabsTimeout=setTimeout(ResizeScrollTabs,20)})),$.fn.scrollTab=function(r){r=$.extend({translate:1,translateSpeed:2,directTranslate:150,maxTranslate:0,touch:{},arrows_css:!1,tabs_wrapper:".nav-tabs",tabs_wrapper:".tab-nav",tab_item:"> li",onResize:!1,outer_wrapper:"",width_grow:9},r);var t=$(this);if(t.hasClass("arrow_scroll_init"))return!1;t.data("plugin-options")&&(r=$.extend(r,t.data("plugin-options"))),t.each((function(t,e){!function(r,t){var e=$
670(r),a=e.find(t.tabs_wrapper);if(void 0===a||!a.length)return!1;var o=a.find(t.tab_item);if(!o.length)return!1;var n=$('<div class="arrows_wrapper"><div class="arrow arrow_left colored_theme_hover_text fill-dark-light-block"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><rect width="12" height="8" fill="#333" fill-opacity="0" /><path d="M1015.69,507.693a0.986,0.986,0,0,1-1.4,0l-4.31-4.316-4.3,4.316a0.993,0.993,0,0,1-1.4-1.408l4.99-5.009a1.026,1.026,0,0,1,1.43,0l4.99,5.009A0.993,0.993,0,0,1,1015.69,507.693Z" fill="#333" transform="translate(-1004 -501)"/></svg></div><div class="arrow arrow_right colored_theme_hover_text fill-dark-light-block"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><rect width="12" height="8" fill="#333" fill-opacity="0" /><path d="M1015.69,507.693a0.986,0.986,0,0,1-1.4,0l-4.31-4.316-4.3,4.316a0.993,0.993,0,0,1-1.4-1.408l4.99-5.009a1.026,1.026,0,0,1,1.43,0l4.99,5.009A0.993,0.993,0,0,1,1015.69,507.693Z" fill="#333" transform="translate(-1004 -501)"/></svg></div></div>').insertAfter(a),s=n.find(".arrow_left"),l=n.find(".arrow_right"),i=$.extend({},t);i.outer_wrapper&&(i.outer_wrapper_node=$(i.outer_wrapper)),i.scrollTab=e,i.wrapper=a,i.tabs=o,i.arrows={},i.arrows.wrapper=n,i.arrows.arrow_left=s,i.arrows.arrow_right=l,void 0!==i.linked_tabs&&i.linked_tabs.length&&void 0!==i.linked_tabs.data("scrollTabOptions")&&(i.linked_options=i.linked_tabs.data("scrollTabOptions"),i.linked_options.linked_options=i),t.arrows_css&&(i.arrows.arrow_left.css(t.arrows_css),i.arrows.arrow_right.css(t.arrows_css)),i.initTabs=function(){i.wrapperBounds=i.wrapper[0].getBoundingClientRect(),i.scrollBounds=i.scrollTab[0].getBoundingClientRect(),elements=$(i.tabs),elements.length&&(i.firstTabBound=Math.round(elements[0].getBoundingClientRect().left),i.lastTabBound=Math.round(elements[elements.length-1].getBoundingClientRect().right)),i.minTranslate=Math.round(i.wrapperBounds.right)<i.lastTabBound?Math.round(i.wrapperBounds.right)-i.lastTabBound-3:0,i.disabled=i.lastTabBound-Math.round(i.wrapperBounds.left)<=Math.round(i.scrollBounds.width)},i.wrapper.css({"white-space":"nowrap","min-width":"auto",overflow:"visible","z-index":"1"}),i.scrollTab.css({overflow:"hidden",position:"relative"}),i.checkArrows=function(r){void 0===r&&(r=i.translate),i.disabled?(i.arrows.arrow_left.addClass("disabled"),i.arrows.arrow_right.addClass("disabled")):r>=i.maxTranslate?(i.arrows.arrow_left.addClass("disabled"),i.arrows.arrow_right.removeClass("disabled")):r<=i.minTranslate?(i.arrows.arrow_right.addClass("disabled"),i.arrows.arrow_left.removeClass("disabled")):(i.arrows.arrow_left.removeClass("disabled"),i.arrows.arrow_right.removeClass("disabled"))},i.directScroll=function(r,t,e){void 0===t&&(t=5),clearInterval(i.timerMoveDirect);var a=i.translate+r;a>i.maxTranslate?a=i.maxTranslate:a<i.minTranslate&&(a=i.minTranslate);var o=i.translate;i.translate=a,0==t?(i.touch?i.translate=a:i.translate=r,i.wrapper.css({transform:"translateX("+i.translate+"px)"})):(void 0===e&&(e=1),i.timerMoveDirect=setInterval((function(){i.wrapper.css({transform:"translateX("+o+"px)"}),(r<0&&o<=a||r>0&&o>=a)&&(i.initTabs(),clearInterval(i.timerMoveDirect)),o<a?o+=e:o-=e}),t)),i.checkArrows(a)},i.addArrowsEvents=function(){i.arrows.arrow_right.on("mouseenter",(function(){i.arrows.arrow_left.removeClass("disabled"),i.timerMoveLeft=setInterval((function(){i.translate<i.minTranslate?(clearInterval(i.timerMoveLeft),i.arrows.arrow_right.addClass("disabled")):(i.translate-=i.translateSpeed,i.wrapper.css({transform:"translateX("+i.translate+"px)"}))}),10)})),i.arrows.arrow_right.on("mouseleave",(function(){clearInterval(i.timerMoveLeft)})),i.arrows.arrow_right.on("click",(function(){i.directScroll(-i.directTranslate),i.arrows.arrow_left.removeClass("disabled")})),i.arrows.arrow_right.on("touchend",(function(){setTimeout((function(){clearInterval(i.timerMoveLeft)}),1)})),i.arrows.arrow_left.on("mouseenter",(function(){i.arrows.arrow_right.removeClass("disabled"),i.timerMoveRight=setInterval((function(){i.translate>=i.maxTranslate?(clearInterval(i.timerMoveRight),i.arrows.arrow_left.addClass("disabled")):(i.translate+=i.translateSpeed,i.wrapper.css({transform:"translateX("+i.translate+"px)"}))}),10)})),i.arrows.arrow_left.on("mouseleave",(function(){clearInterval(i.timerMoveRight)})),i.arrows.arrow_left.on("click",(function(){i.directScroll(i.directTranslate),i.arrows.arrow_right.removeClass("disabled")})),i.arrows.arrow_left.on("touchend",(function(){setTimeout((function(){clearInterval(i.timerMoveRight)}),1)}))},i.addTabsEvents=function(){i.tabs.on("click",(function(){var r=i.scrollBounds.left,t=i.scrollBounds.right,e=this.getBoundingClientRect(),a=e.left-i.arrows.arrow_width,o=e.right+i.arrows.arrow_width;if(a<r?i.directScroll(r-a,1,2):o>t&&i.directScroll(t-o,1,2),i.activeTab=$(this),void 0!==i.linked_options){var n=$(this).index(),s=$(i.linked_options.tabs[n]),l={leftScrollBound:i.linked_options.scrollBounds.left,rightScrollBound:i.linked_options.scrollBounds.right,tabBounds:s[0].getBoundingClientRect()};l.tabBounds.left<l.leftScrollBound?i.linked_options.directScroll(l.leftScrollBound-l.tabBounds.left+i.linked_options.arrows.arrow_width+1,0):l.tabBounds.right>l.rightScrollBound&&i.linked_options.directScroll(l.rightScrollBound-l.tabBounds.right-i.linked_options.arrows.arrow_width-1,0),i.linked_options.activeTab=s}}))},i.addWrapperEvents=function(){i.wrapper.on("touchstart",(function(r){i.touch.posPrev=r.originalEvent.changedTouches[0].pageX,clearInterval(i.timerMoveRight),clearInterval(i.timerMoveLeft),clearInterval(i.timerMoveDirect)})),i.wrapper.on("touchmove",(function(r){i.touch.posCurrent=r.originalEvent.changedTouches[0].pageX-i.touch.posPrev,i.directScroll(i.touch.posCurrent,0),i.touch.posPrev=r.originalEvent.changedTouches[0].pageX}))},i.resize=function(){i.onBeforeResize&&"function"==typeof i.onBeforeResize&&i.onBeforeResize(i),i.onResize&&"function"==typeof i.onResize&&i.onResize(i),i.translate<i.minTranslate?i.directScroll(i.minTranslate-i.translate):i.translate>i.maxTranslate&&i.directScroll(i.maxTranslate-i.translate),i.initTabs(),i.checkArrows(),i.onAfterResize&&"function"==typeof i.onAfterResize&&i.onAfterResize(i)},e.data("scrollTabOptions",i),e.data("scrollTabOptions").addArrowsEvents(),e.data("scrollTabOptions").addTabsEvents(),e.data("scrollTabOptions").addWrapperEvents(),e.addClass("arrow_scroll_init").addClass("swipeignore"),void 0!==l&&l.length&&(i.arrows.arrow_width=i.arrows.arrow_right[0].getBoundingClientRect().width),e.data("scrollTabOptions").resize(),delete i;var d={action:"initScrollTab",tab:e};BX.onCustomEvent("onScrollTabInit",[d])}(e,r)}))};
671/* End */
672;
673; /* Start:"a:4:{s:4:"full";
673s:70:"/bitrix/templates/aspro-priority2/js/blocks/controls.js?17743598708256";s:6:"source";s:55:"/bitrix/templates/aspro-priority2/js/blocks/controls.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
674$(document).ready(function () {
675  // dropdown-select
676  $(document).on("click", ".dropdown-select .dropdown-select__title", function () {
677    var _this = $(this),
678      menu = _this.parent().find("> .dropdown-select__list");
679
680    if (!_this.hasClass("clicked")) {
681      _this.addClass("clicked");
682
683      _this.toggleClass("opened");
684      menu.stop().slideToggle(100, function () {
685        _this.removeClass("clicked");
686      });
687    }
688  });
689
690  // dropdown-select change item
691  $(document).on("click", ".dropdown-select__list .mixitup-item", function () {
692    var $select = $(this).closest('.dropdown-select');
693    $select.find('.dropdown-select__title span').text($(this).text());
694    $select.find('.dropdown-select__title.opened').click();
695  });
696
697  // close select
698  $("html, body").on("mousedown", function (e) {
699    if (typeof e.target.className == "string" && e.target.className.indexOf("adm") < 0) {
700      e.stopPropagation();
701
702      $(".dropdown-select .dropdown-select__title.opened").each(function(){
703        if ($(this).closest('#mobilefilter').length) return
704        var $select = $(this).closest('.dropdown-select');
705        if ($select.data('visible_by_class') && $($select.data('visible_by_class')).is(':visible')) return;
706        if(!$(e.target).closest($select).length) {
707          $(this).click();
708        }
709      });
710    }
711  });
712
713  // hint
714  $(document).on("click", ".hint__icon", function (e) {
715    e.stopImmediatePropagation();
716    var tooltipWrapp = $(this).closest(".hint");
717    if (tooltipWrapp.hasClass("active")) {
718      tooltipWrapp.removeClass("active").find(".tooltip").slideUp(200);
719    } else {
720      tooltipWrapp.addClass("active");
721      tooltipWrapp.find(".tooltip").slideDown(200);
722      tooltipWrapp.find(".tooltip_close").click(function (e) {
723        e.stopPropagation();
724        e.stopImmediatePropagation();
725        tooltipWrapp.removeClass("active").find(".tooltip").slideUp(100);
726      });
727    }
728    e.stopPropagation();
729  });
730
731  // mixitUp
732  const containerEl = document.querySelector(".mixitup-container");
733  if (containerEl) {
734    var config = {
735      selectors: {
736        target: '[data-ref="mixitup-target"]',
737      },
738      /*animation: {
739        effects: "fade scale stagger(150ms)", // Set a 'stagger' effect for the loading animation
740      },*/
741      animation: {
742        effects: "", // Set a 'stagger' effect for the loading animation
743      },
744      load: {
745        filter: "none", // Ensure all targets start from hidden (i.e. display: none;)
746      },
747      animation: {
748        duration: 350,
749      },
750      controls: {
751        scope: "local",
752      },
753      callbacks: {
754        onMixStart: function (state) {
755          // console.log(state);
756        },
757        onMixClick: function (state, event) {
758          let $item = event.target.children.length ? event.target : event.target.parentElement;
759          $($item).siblings().removeClass("color-theme head-block__item--active active");
760          $($item).addClass("color-theme head-block__item--active active");
761        },
762        onMixEnd: function () {
763          // InitLazyLoad();
764        },
765      },
766    };
767    var mixer = mixitup(containerEl, config);
768
769    containerEl.classList.add("mixitup-ready");
770
771    mixer.show().then(function () {
772      // Remove the stagger effect for any subsequent operations
773      mixer.configure({
774        animation: {
775          effects: "fade scale",
776        },
777      });
778    });
779  }
780
781  /*show password*/
782  $(".form-group:not(.eye-password-ignore) [type=password]").each(function (item) {
783    let passBlock = $(this).closest(".form-group");
784    let labelBlock = passBlock.find(".label_block");
785    if (labelBlock.length) {
786      labelBlock.addClass("eye-password");
787    } else {
788      passBlock.addClass("eye-password");
789    }
790  });
791  $(document).on("click", ".eye-password:not(.eye-password-ignore)", function (event) {
792    let input = this.querySelector("input");
793    let eyeWidth = 56;
794    if (this.clientWidth - eyeWidth < event.offsetX) {
795      if (input.type == "password") {
796        input.type = "text";
797        this.classList.add("password-show");
798      } else if (input.type == "text") {
799        input.type = "password";
800        this.classList.remove("password-show");
801      }
802      event.stopPropagation();
803    }
804  });
805  /**/
806
807    // reload captcha
808  $(document).on("click", ".refresh", function (e) {
809    var captcha = $(this).parents(".captcha-row");
810    e.preventDefault();
811    $.ajax({
812      url: arAsproOptions["SITE_DIR"] + "ajax/captcha.php",
813    }).done(function (text) {
814      captcha.find("input[name=captcha_sid],input[name=captcha_code]").val(text);
815      captcha.find("img").attr("src", "/bitrix/tools/captcha.php?captcha_sid=" + text);
816      captcha.find("input[name=captcha_word]").val("").removeClass("error");
817      captcha.find(".captcha_input").removeClass("error").find(".error").remove();
818    });
819  });
820});
821
822// gallery switch
823$(document).on("click", ".gallery-view_switch__icons:not(.active)", function () {
824  var $this = $(this);
825  var animationTime = 200;
826  var bSmall = $this.hasClass("gallery-view_switch__icons--small");
827  var $switchGallery = $this.closest(".gallery-view_switch");
828  var $bigGallery = ($this.closest(".big_gallery").length
829    ? $this.closest(".big_gallery")
830    : $this.closest(".gallery")
831  ).find(".gallery-big");
832  var $bigGalleryCounter = $switchGallery.find(".gallery-view_switch__count-wrapper--big");
833  var $smallGallery = ($this.closest(".big_gallery").length
834    ? $this.closest(".big_gallery")
835    : $this.closest(".gallery")
836  ).find(".gallery-small");
837  var $smallGalleryCounter = $switchGallery.find(".gallery-view_switch__count-wrapper--small");
838  var $toHideGallery = bSmall ? $bigGallery : $smallGallery;
839  var $toHideGalleryCounter = bSmall ? $bigGalleryCounter : $smallGalleryCounter;
840  var $toShowGallery = bSmall ? $smallGallery : $bigGallery;
841  var $toShowGalleryCounter = bSmall ? $smallGalleryCounter : $bigGalleryCounter;
842
843  $this.addClass("active");
844  $this.siblings(".active").removeClass("active");
845
846  $toHideGalleryCounter.fadeOut(animationTime, function () {
847    $toShowGalleryCounter.fadeIn(animationTime);
848  });
849
850  $toHideGallery.fadeOut(animationTime, function () {
851    $toShowGallery.fadeIn(animationTime);
852  });
853});
854
855BX.addCustomEvent("onSlideChanges", function (eventdata) {
856  if ("slider" in eventdata && eventdata.slider) {
857    const slider = eventdata.slider;
858    if (slider && slider.params) {
859      if ("type" in slider.params && slider.params.type === "detail_bottom_gallery_big") {
860
861        if (slider.pagination && slider.pagination.bullets && slider.pagination.bullets[slider.activeIndex]) {
862          slider.pagination.el.closest('.big_gallery').querySelector(".gallery-view_switch__count-wrapper--big .gallery-view_switch__count-value span").textContent = slider.activeIndex + 1;
863        }
864      }
865
866    }
867  }
868});
869
870
871/*buy opt table items*/
872function optBuyBasketAction(basketItems, itemsToNotice) {
873  const basketParams = {
874    type: "multiple",
875    ajaxPost: "Y",
876    // iblock_id: _this.data("iblock_id"),
877    action: "buy",
878    items: [],
879  };
880  if (basketItems) {
881    basketParams["items"] = basketItems;
882  }
883
884  if (basketParams["items"].length) {
885    $.ajax({
886      url: arAsproOptions["SITE_DIR"] + "include/footer/basket.php",
887      type: "POST",
888      data: basketParams,
889    }).done(function (html) {
890        $(".ajax_basket").replaceWith(html);
891
892      // show cart or notice
893      if (typeof JNoticeSurface === "undefined") {
894        if (bBasketTop) {
895          $(".header-cart").addClass("opened");
896
897          if (typeof headerCartHideTimer !== "undefined") {
898            clearTimeout(headerCartHideTimer);
899          }
900
901          headerCartHideTimer = setTimeout(function () {
902            $(".header-cart").removeClass("opened");
903          }, 2000);
904        } else if (bBasketFly) {
905          setTimeout(function () {
906            if (!$(".ajax_basket").hasClass("opened")) {
907              $(".ajax_basket").addClass("opened");
908            }
909          }, 50);
910        }
911      } else {
912        JNoticeSurface.get().onAdd2cart(itemsToNotice);
913      }
914
915      var eventdata = { action: "loadBasket" };
916      BX.onCustomEvent("onCompleteAction", [eventdata, $(html)]);
917      setBasketItemsClasses();
918    });
919  }
920}
921
922/* End */
923;
924; /* Start:"a:4:{s:4:"full";s:72:"/bitrix/templates/aspro-priority2/js/blocks/mobile.min.js?17635572774697";s:6:"source";s:53:"/bitrix/templates/aspro-priority2/js/blocks/mobile.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
925$(document).ready((function(){var e=$("#mobilefilter"),t=$("#mobilemenu");if(e.length){e.isOpen=t.hasClass("show"),e.isAppendLeft=!1,e.isWrapFilter=!1,e.isHorizontalOrCompact=$(".filter_horizontal").length||$(".bx_filter_vertical.compact").length,e.close='<i class="svg svg-close close-icons"></i>',$(document).on("click",".bx-filter-title",(function(){OpenMobileFilter()})),$(document).on("click","#mobilefilter .svg-close.close-icons",(function(){CloseMobileFilter()})),$(document).on("click",".bx_filter_select_block",(function(e){var t=$(e.target).parents(".bx_filter_select_container");if(t.length){var i=t.closest(".bx_filter_parameters_box").attr("data-property_id");$("#smartFilterDropDown"+i).length&&$("#smartFilterDropDown"+i).css({"max-width":t.width(),"z-index":"3020"})}})),$(document).on("mouseup",".bx_filter_section",(function(e){$(e.target).hasClass("bx_filter_search_button")&&CloseMobileFilter()})),$(document).on("mouseup",".bx_filter_parameters_box_title",(function(e){$("[id^='smartFilterDropDown']").hide(),$(e.target).hasClass("close-icons")&&CloseMobileFilter()})),e.parent().append('<div id="mobilefilter-overlay"></div>');var i=$("#mobilefilter-overlay");i.click((function(){e.isOpen&&CloseMobileFilter()})),mobileFilterNum=function(e,t){if(t)$(".bx_filter_search_button").text(e.data("f"));else{var i="",l=$(".bx_filter_parameters_box > span");i+=l.data("f")+" "+e+" "+declOfNumFilter(e,[l.data("fi"),l.data("fr"),l.data("frm")]),$(".bx_filter_search_button").text(i)}},declOfNumFilter=function(e,t){return cases=[2,0,1,1,1,2],t[e%100>4&&e%100<20?2:cases[e%10<5?e%10:5]]},OpenMobileFilter=function(){if(!e.isOpen){if($("body").addClass("jqm-initied wf"),$(".bx_filter_vertical .slide-block__head.filter_title").removeClass("closed"),$(".bx_filter_vertical .slide-block__head.filter_title + .slide-block__body").show(),!e.isAppendLeft){e.isWrapFilter||($(".bx_filter").wrap("<div id='wrapInlineFilter'></div>"),e.isWrapFilter=!0),$(".bx_filter").appendTo($("#mobilefilter"));var t=$("#filter-helper");t.length&&t.prependTo($("#mobilefilter .bx_filter_parameters")),e.isAppendLeft=!0}"function"==typeof checkFilterLandgings&&checkFilterLandgings(),$("#mobilefilter .bx_filter_parameters").addClass("mobile-scroll scrollbar"),$("#mobilefilter .slide-block .filter_title").addClass("ignore"),$("#mobilefilter .bx_filter_parameters .bx_filter_parameters_box_title").addClass("colored_theme_hover_bg-block"),$(".bx_filter_button_box.ajax-btns").addClass("colored_theme_bg"),$(".bx_filter_button_box.ajax-btns .filter-bnt-wrapper").removeClass("hidden"),setTimeout((function(){i.fadeIn("fast")}),100),$("body").css({overflow:"hidden",height:"100vh"}),e.addClass("show"),e.find(".bx_filter").css({display:"block"}),e.isOpen=!0,$("#mobilefilter .bx_filter_button_box.btns.ajax-btns").removeClass("hidden"),void 0===e.data("init")&&(e.scroll((function(){$(".bx_filter_section .bx_filter_select_container").each((function(){var e=$
925(this).closest(".bx_filter_parameters_box").attr("data-property_id");$("#smartFilterDropDown"+e).length&&$("#smartFilterDropDown"+e).hide()}))})),e.data("init","Y"))}},CloseMobileFilter=function(t){if(e.find(".bx_filter_parameters").removeClass("scrollbar"),$("body").removeClass("jqm-initied wf"),$("#mobilefilter .bx_filter_parameters .bx_filter_parameters_box_title").removeClass("colored_theme_hover_bg-block"),$(".slide-block .filter_title").removeClass("ignore"),$(".bx_filter_button_box.ajax-btns").removeClass("colored_theme_bg"),$(".bx_filter:not(.n-ajax) .bx_filter_button_box.ajax-btns .filter-bnt-wrapper").addClass("hidden"),e.isOpen&&(e.find(".bx_filter_parameters").scrollTop(0),$("body").css({overflow:"",height:""}),setTimeout((function(){i.fadeOut("fast")}),100),e.removeClass("show"),e.isOpen=!1),t&&e.isAppendLeft){$("#mobilefilter .bx_filter_parameters_box_title").removeClass("opened"),$("#mobilefilter .bx_filter_block.dropdown-menu-wrapper").hide(),$(".bx_filter").appendTo($("#wrapInlineFilter")).show();var l=$("#filter-helper");l.length&&l.appendTo($("#filter-helper-wrapper")),e.isAppendLeft=!1,e.removeData("init"),mobileFilterNum($("#modef_num_mobile"),!0)}},checkMobileFilter=function(){(!window.matchMedia("(max-width: 991px)").matches&&!e.isHorizontalOrCompact||!window.matchMedia("(max-width: 767px)").matches&&e.isHorizontalOrCompact)&&CloseMobileFilter(!0)}}else checkTopFilter(),$(document).on("click",".bx-filter-title",(function(){$(this).toggleClass("opened"),$(".visible_mobile_filter").length?($(".visible_mobile_filter").show(),$(".bx_filter_vertical, .bx_filter").slideToggle(333)):($(".bx_filter_vertical").closest("div[id^=bx_incl]").show(),$(".bx_filter_vertical, .bx_filter").slideToggle(333))}))}));
926/* End */
927;
928; /* Start:"a:4:{s:4:"full";s:77:"/bitrix/templates/aspro-priority2/js/blocks/selectOffer.min.js?17635572772069";s:6:"source";s:58:"/bitrix/templates/aspro-priority2/js/blocks/selectOffer.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
929"SelectOfferProp"in window||"function"==typeof window.SelectOfferProp||(SelectOfferProp=function(){var e=$
929(this),s={},a={},t=parseUrlQuery(),o="",r=e.closest(".sku-props"),p=e.closest(".js-popup-block"),n=!e.closest(".catalog-items").length;s={PARAMS:n?$(".js-sku-config:first").data("value"):e.closest(".catalog-items").find(".js-sku-config").data("value"),BASKET_PARAMS:p.find(".js-config-btns").data("btn-config"),IMG_PARAMS:p.find(".js-config-img").data("img-config"),PRICE_PARAMS:p.find(".js-popup-price").data("price-config"),ID:r.data("item-id"),OFFER_ID:r.data("offer-id"),SITE_ID:r.data("site-id"),IBLOCK_ID:r.data("iblockid"),SKU_IBLOCK_ID:r.data("offer-iblockid"),DEPTH:e.closest(".sku-props__inner").index(),VALUE:e.data("onevalue"),SHOW_GALLERY:arAsproOptions.THEME.SHOW_CATALOG_GALLERY_IN_LIST,MAX_GALLERY_ITEMS:arAsproOptions.THEME.MAX_GALLERY_ITEMS,OID:arAsproOptions.THEME.CATALOG_OID,IS_DETAIL:n?"Y":"N"},"clear_cache"in t&&"Y"==t.clear_cache&&(o+="?clear_cache=Y");let c=r.hasClass("js-selected");for($(".sku-props").removeClass("js-selected"),r.addClass("js-selected"),e.closest(".sku-props__values").find(".sku-props__value").removeClass("sku-props__value--active"),e.addClass("sku-props__value--active"),e.closest(".sku-props__item").find(".sku-props__js-size").text(e.data("title")),i=0;i<s.DEPTH+1;i++)strName="PROP_"+r.find(".sku-props__inner:eq("+i+")").data("id"),a[strName]=r.find(".sku-props__inner:eq("+i+") .sku-props__value--active").data("onevalue"),s[strName]=r.find(".sku-props__inner:eq("+i+") .sku-props__value--active").data("onevalue");s.SELECTED=JSON.stringify(a),window.obOffers&&"array"===typeofExt(obOffers)&&c?(selectedValues=a,strPropValue=s.VALUE,depth=s.DEPTH,wrapper=p,arFilter={},tmpFilter=[],UpdateSKUInfoByProps()):$.ajax({url:arAsproOptions.SITE_DIR+"ajax/js_item_detail.php"+o,type:"POST",contentType:"application/json",data:JSON.stringify(s)}).done((function(e){var s=BX.processHTML(e);BX.ajax.processScripts(s.SCRIPT)}))},$(document).on("click",".sku-props__value:not(.sku-props__value--active)",SelectOfferProp));
930/* End */
931;
932; /* Start:"a:4:{s:4:"full";s:78:"/bitrix/templates/aspro-priority2/js/blocks/tabs-history.min.js?17635572771129";s:6:"source";s:59:"/bitrix/templates/aspro-priority2/js/blocks/tabs-history.js";s:3:"min";s:63:"/bitrix/templates/aspro-priority2/js/blocks/tabs-history.min.js";s:3:"map";s:67:"/bitrix/templates/aspro-priority2/js/blocks/tabs-history.min.js.map";}"*/
933var newHash=location.hash;"onhashchange"in window&&$(window).bind("hashchange",(function(){var newHash=location.hash;if(newHash&&("scrollRestoration"in history&&(history.scrollRestoration="manual"),$('.tabs.tabs-history .nav a[href="'+newHash+'"]').length)){$('.tabs.tabs-history .nav a[href="'+newHash+'"]').trigger("click");var $block=$(newHash);if($block.length){if($block.closest(".tab-pane").length){var offset=-206;"undefined"!=typeof arAsproOptions&&(offset=window.matchMedia("(max-width:991px)").matches?"Y"!==arAsproOptions.THEME.HEADER_MOBILE_FIXED||"ALWAYS"!==arAsproOptions.THEME.HEADER_MOBILE_SHOW?-125:-187:"Y"!==arAsproOptions.THEME.TOP_MENU_FIXED?-125:-206),$block.data("offset",offset)}scrollToBlock(newHash)}else if($(".ordered-block .tabs").length){var content_offset=$(".ordered-block .tabs").offset();$("html, body").animate({scrollTop:content_offset.top-90},400)}}})),$(document).on("click",".tabs.tabs-history a[data-toggle=tab]",(function(e){var $this=$(e.target);"undefined"!=typeof history&&$this.attr("href")&&history.pushState({},"",$this.attr("href"))}));
934/* End */
935;
936; /* Start:"a:4:{s:4:"full";s:64:"/bitrix/templates/aspro-priority2/js/general.js?1774628324196614";s:6:"source";s:47:"/bitrix/templates/aspro-priority2/js/general.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
937/*allin 27.03.2026*/
938var globalPricesItems;
939
940function getPriceByRange(num, pricesArray) {
941  const sorted = pricesArray
942    .map(item => {
943      const key = Number(Object.keys(item)[0]);
944      return {
945        key,
946        value: item[key]
947      };
948    })
949    .sort((a, b) => a.key - b.key);
950
951  let result = sorted[0].value; // если число меньше минимального ключа
952
953  for (const item of sorted) {
954    if (num >= item.key) {
955      result = item.value;
956    } else {
957      break;
958    }
959  }
960
961  return result;
962}
963/*allin 27.03.2026*/ 
964
965getRandomInt = function (min, max) {
966  return Math.floor(Math.random() * (max - min)) + min;
967};
968
969ShowOverlay = function () {
970  $('<div class="jqmOverlay waiting"></div>').appendTo("body");
971};
972            
973function readyDOM(callback) {
974  if (document.readyState !== "loading") callback();
975  else document.addEventListener("DOMContentLoaded", callback);
976}
977
978if (!$(this).next().hasClass("collapsing"))
979  window.addEventListener("popstate", function (event) {
980    if (typeof startActions == "function") {
981      setTimeout(startActions, 500);
982    }
983  });
984
985function throttle(f, t) {
986  let throttled, saveThis, saveArgs;
987  const wrapper = function () {
988    if (throttled) {
989      saveThis = this;
990      saveArgs = arguments;
991      return;
992    }
993    throttled = true;
994    f.apply(this, arguments);
995    setTimeout(function () {
996      throttled = false;
997      if (saveArgs) {
998        wrapper.apply(saveThis, saveArgs);
999        saveThis = saveArgs = null;
1000      }
1001    }, t);
1002  };
1003  return wrapper;
1004}
1005
1006function debounce(f, t) {
1007  return function (args) {
1008    var previousCall = this.lastCall;
1009    this.lastCall = Date.now();
1010    if (previousCall && this.lastCall - previousCall <= t) {
1011      clearTimeout(this.lastCallTimer);
1012    }
1013    this.lastCallTimer = setTimeout(function () {
1014      f(args);
1015    }, t);
1016  };
1017}
1018
1019window.addEventListener("popstate", function (event) {
1020  if (typeof startActions == "function") {
1021    setTimeout(startActions, 500);
1022  }
1023});
1024
1025$(document).on("change", ".uploader input[type=file]", function () {
1026  if (!$(this).next().length || !$(this).next().hasClass("resetfile")) {
1027    $(
1028      '<span class="resetfile" title="' +
1029        BX.message("CLEAR_FILE") +
1030        '"><svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 1.00161L1 9M9 9L1 1" stroke="#999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></span>'
1031    ).insertAfter($(this));
1032  }
1033});
1034
1035$(document).on("click", ".uploader .resetfile", function () {
1036  var $uploader = $(this).closest(".uploader");
1037  $uploader.removeClass("error files_add");
1038  $uploader.find(".error").hide();
1039
1040  var $input = $uploader.find("input[type=file]");
1041  $input.val("");
1042  $.uniform.update($input);
1043
1044  $(this).remove();
1045});
1046
1047$(document).on("click", ".region-close", function () {
1048  $(".confirm_region").fadeOut();
1049});
1050
1051headerInit = function (targetBlock) {
1052  var header = $("header");
1053  if (header.length) {
1054    setTimeout(function () {
1055      CheckTopMenuDotted();
1056      CheckTopMenuDotted();
1057    }, 1);
1058  }
1059};
1060
1061typeofExt = function (item) {
1062  const _toString = Object.prototype.toString;
1063  return _toString.call(item).slice(8, -1).toLowerCase();
1064};
1065
1066HideOverlay = function () {
1067  $(".jqmOverlay").detach();
1068  CloseMobilePhone();
1069};
1070
1071if (!funcDefined("pauseYmObserver")) {
1072  // pause ya metrika webvisor MutationObserver callback (DOM indexer)
1073  // use before insert html with some animation
1074  pauseYmObserver = function () {
1075    if (
1076      typeof MutationObserver === "function" &&
1077      typeof MutationObserver.observers === "object" &&
1078      typeof MutationObserver.observers.ym === "object"
1079    ) {
1080      if (typeof pauseYmObserver.cnt === "undefined") {
1081        pauseYmObserver.cnt = 0;
1082      }
1083
1084      ++pauseYmObserver.cnt;
1085
1086      if (!MutationObserver.observers.ym.paused) {
1087        MutationObserver.observers.ym.pause();
1088      }
1089    }
1090  };
1091}
1092
1093if (!funcDefined("resumeYmObserver")) {
1094  // resume ya metrika webvisor MutationObserver callback
1095  // use when animation finished
1096  resumeYmObserver = function () {
1097    if (
1098      typeof MutationObserver === "function" &&
1099      typeof MutationObserver.observers === "object" &&
1100      typeof MutationObserver.observers.ym === "object"
1101    ) {
1102      if (typeof pauseYmObserver.cnt === "undefined") {
1103        pauseYmObserver.cnt = 1;
1104      }
1105
1106      pauseYmObserver.cnt -= pauseYmObserver.cnt > 0 ? 1 : 0;
1107
1108      if (!pauseYmObserver.cnt && MutationObserver.observers.ym.paused) {
1109        MutationObserver.observers.ym.resume();
1110      }
1111    }
1112  };
1113}
1114
1115if (!funcDefined("declOfNum")) {
1116  declOfNum = function (number, titles) {
1117    var cases = [2, 0, 1, 1, 1, 2];
1118    return number + " " + titles[number % 100 > 4 && number % 100 < 20 ? 2 : cases[Math.min(number % 10, 5)]];
1119  };
1120}
1121
1122if (!funcDefined("decodeHtmlEntity")) {
1123  decodeHtmlEntity = function (str) {
1124    return str.replace(/&#(\d+);/g, function (match, dec) {
1125      return String.fromCharCode(dec);
1126    });
1127  };
1128}
1129
1130if (!funcDefined("togglePropBlock")) {
1131  togglePropBlock = function (className) {
1132    var all_props_block = className.closest(".bx_filter_parameters_box_container").find(".hidden_values");
1133    if (all_props_block.length && (className.hasClass("inner_text") || className.hasClass("expand_block"))) {
1134      if (all_props_block.is(":visible")) {
1135        className.text(BX.message("FILTER_EXPAND_VALUES"));
1136        all_props_block.hide();
1137      } else {
1138        className.text(BX.message("FILTER_HIDE_VALUES"));
1139        all_props_block.show();
1140      }
1141    }
1142  };
1143}
1144
1145/*countdown start*/
1146if (!funcDefined("initCountdown")) {
1147  var initCountdown = function initCountdown() {
1148    $(".countdown:not(.countdown-inited)").each(function () {
1149      var _this = $(this);
1150
1151      if (_this.hasClass("init-if-visible") && !_this.is(":visible")) return;
1152      _this.addClass("countdown-inited");
1153
1154      var activeTo = _this.find(".countdown__active-to").text(),
1155        dateTo = new Date(activeTo.replace(/(\d+)\.(\d+)\.(\d+)/, "$3/$2/$1"));
1156
1157      var checkDate = new Date() < dateTo;
1158
1159      if (checkDate) {
1160        if (_this.hasClass("compact"))
1161          _this.find(".countdown__items").countdown(
1162            {
1163              until: dateTo,
1164              format: "dHMS",
1165              compact: true,
1166              padZeroes: true,
1167              layout:
1168                '{d<}<span class="days countdown__item">{dn}<div class="text">{dl}</div></span>{d>} <span class="hours countdown__item">{hn}<div class="text">{hl}</div></span> <span class="minutes countdown__item">{mn}<div class="text">{ml}</div></span> <span class="sec countdown__item">{sn}<div class="text">{sl}</div></span>',
1169              onExpiry: onExpiryCountdown,
1170            },
1171            $.countdown.regionalOptions["ru"]
1172          );
1173        else
1174          _this.find(".countdown__items").countdown(
1175            {
1176              until: dateTo,
1177              format: "dHMS",
1178              padZeroes: true,
1179              layout:
1180                '{d<}<span class="days countdown__item">{dnn}<div class="text">{dl}</div></span>{d>} <span class="hours countdown__item">{hnn}<div class="text">{hl}</div></span> <span class="minutes countdown__item">{mnn}<div class="text">{ml}</div></span> <span class="sec countdown__item">{snn}<div class="text">{sl}</div></span>',
1181              onExpiry: onExpiryCountdown,
1182            },
1183            $.countdown.regionalOptions["ru"]
1184          );
1185      } else {
1186        _this.hide();
1187      }
1188    });
1189  };
1190}
1191
1192if (!funcDefined("onExpiryCountdown")) {
1193  function onExpiryCountdown() {
1194    var _this = $(this);
1195    var countdownBlock = _this.parents(".countdown");
1196
1197    if (countdownBlock.length) {
1198      countdownBlock.hide();
1199    }
1200  }
1201}
1202
1203if (!funcDefined("initCountdownTime")) {
1204  var initCountdownTime = function initCountdownTime(block, time) {
1205    if (time) {
1206      var dateTo = new Date(time.replace(/(\d+)\.(\d+)\.(\d+)/, "$3/$2/$1"));
1207      block.find(".countdown__items").countdown("destroy");
1208      if (block.hasClass("compact"))
1209        block.find(".countdown__items").countdown(
1210          {
1211            until: dateTo,
1212            format: "dHM",
1213            compact: true,
1214            padZeroes: true,
1215            layout:
1216              '{d<}<span class="days countdown__item">{dn}<div class="text">{dl}</div></span>{d>} <span class="hours countdown__item">{hn}<div class="text">{hl}</div></span> <span class="minutes countdown__item">{mn}<div class="text">{ml}</div></span> <span class="sec countdown__item">{sn}<div class="text">{sl}</div></span>',
1217            onExpiry: onExpiryCountdownTime,
1218          },
1219          $.countdown.regionalOptions["ru"]
1220        );
1221      elsecountdown__items;
1222      block.find(".countdown__items").countdown(
1223        {
1224          until: dateTo,
1225          format: "dHMS",
1226          padZeroes: true,
1227          layout:
1228            '{d<}<span class="days countdown__item">{dnn}<div class="text">{dl}</div></span>{d>} <span class="hours countdown__item">{hnn}<div class="text">{hl}</div></span> <span class="minutes countdown__item">{mnn}<div class="text">{ml}</div></span> <span class="sec countdown__item">{snn}<div class="text">{sl}</div></span>',
1229          onExpiry: onExpiryCountdownTime,
1230        },
1231        $.countdown.regionalOptions["ru"]
1232      );
1233      block.find(".countdown").show();
1234    } else {
1235      block.find(".countdown").hide();
1236    }
1237  };
1238}
1239if (!funcDefined("onExpiryCountdownTime")) {
1240  function onExpiryCountdownTime() {}
1241}
1242/*countdown end*/
1243
1244$.fn.iAppear = function (callback, options) {
1245  if (typeof $.fn.iAppear.useObserver === "undefined") {
1246    $.fn.iAppear.useObserver = typeof window["IntersectionObserver"] === "function";
1247
1248    if (!$.fn.iAppear.useObserver && typeof $.fn.appear !== "function") {
1249      $.fn.iAppear.queue = [];
1250      BX.loadScript(arAsproOptions.SITE_TEMPLATE_PATH + "/vendor/js/jquery.appear.js", function () {
1251        if (typeof $.fn.iAppear.queue === "object") {
1252          $.fn.iAppear.queue.forEach(function (queueItem) {
1253            $(queueItem.items).iAppear(queueItem.callback, queueItem.options);
1254          });
1255        }
1256      });
1257
1258      return;
1259    }
1260  }
1261
1262  if ($.fn.iAppear.useObserver) {
1263    var options = $.extend(
1264      {
1265        root: null,
1266        rootMargin: "150px 0px 150px 0px",
1267        threshold: 0.0,
1268      },
1269      options
1270    );
1271
1272    $(this).each(function (i, appearBlock) {
1273      var observer = new IntersectionObserver(function (entries, observer) {
1274        entries.forEach(function (element) {
1275          if (element.intersectionRatio > 0 && !element.target.dataset.iAppeared) {
1276            element.target.dataset.iAppeared = true;
1277
1278            if (typeof callback === "function") {
1279              callback.call(element.target);
1280            }
1281          }
1282        });
1283      }, options);
1284
1285      observer.observe(appearBlock);
1286    });
1287  } else {
1288    if (typeof $.fn.appear !== "function") {
1289      if ($(this).length) {
1290        $.fn.iAppear.queue.push({
1291          items: this,
1292          callback: callback,
1293          options: options,
1294        });
1295      }
1296
1297      return;
1298    } else {
1299      if ($(this).length) {
1300        $(this).each(function (i, appearBlock) {
1301          $(appearBlock).appear(function () {
1302            if (typeof callback === "function") {
1303              callback.call(appearBlock);
1304            }
1305          }, options);
1306        });
1307      }
1308    }
1309  }
1310};
1311
1312$.fn.mCustomScrollbarDeferred = function (config) {
1313  $(this).addClass("scroll-init");
1314  $(this).data("plugin-options", config);
1315
1316  if ($(this).hasClass("destroyed")) {
1317    return;
1318  }
1319
1320  $(this).hover(
1321    function (e) {
1322      var $this = $(this);
1323      if (!$this.hasClass("mCustomScrollbar") && !$(this).hasClass("destroyed")) {
1324        $this.data(
1325          "scrollTimer",
1326          setTimeout(function () {
1327            $this.mCustomScrollbar(config);
1328            $this.off("touchstart touchmove touchend mousewheel mouseenter mouseleave");
1329          }, 200)
1330        );
1331      }
1332    },
1333    function (e) {
1334      clearTimeout($(this).data("scrollTimer"));
1335    }
1336  );
1337
1338  $(this).on("touchstart touchmove", function (e) {
1339    var $this = $(this);
1340    if (!$this.hasClass("mCustomScrollbar") && !$(this).hasClass("destroyed")) {
1341      $this.mCustomScrollbar(config);
1342    }
1343
1344    var $scrollContainer = $this.find(">.mCustomScrollBox>.mCSB_container");
1345    if ($scrollContainer.length) {
1346      var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
1347
1348      var newTouch = new Touch({
1349        identifier: 42,
1350        target: $scrollContainer[0],
1351        clientX: touch.clientX,
1352        clientY: touch.clientY,
1353        screenX: touch.screenX,
1354        screenY: touch.screenY,
1355        pageX: touch.pageX,
1356        pageY: touch.pageY,
1357        radiusX: 1,
1358        radiusY: 1,
1359      });
1360
1361      var newEvent = new TouchEvent(e.type, {
1362        cancelable: true,
1363        bubbles: false,
1364        composed: true,
1365        touches: [newTouch],
1366        targetTouches: [newTouch],
1367        changedTouches: [newTouch],
1368      });
1369
1370      $scrollContainer[0].dispatchEvent(newEvent);
1371    }
1372  });
1373
1374  $(this).on("touchend", function (e) {
1375    $(this).off("touchstart touchmove touchend mousewheel mouseenter mouseleave");
1376  });
1377
1378  if ($.event.special.mousewheel) {
1379    $(this).on("mousewheel", function (e) {
1380      var $this = $(this);
1381      if (!$this.hasClass("mCustomScrollbar") && !$(this).hasClass("destroyed")) {
1382        $this.mCustomScrollbar(config);
1383        $this.off("touchstart touchmove touchend mousewheel mouseenter mouseleave");
1384      }
1385    });
1386  }
1387};
1388
1389InitScrollBar = function (el, initOptions) {
1390  var block;
1391  if (typeof el === "undefined") {
1392    block = $(".srollbar-custom:not(.mobile-scroll):not(.scroll-init)");
1393  } else {
1394    block = el.filter(":not(.scroll-init)");
1395  }
1396  var blockParent = $(".scrollbar-parent");
1397
1398  if (
1399    (block.length || blockParent.length) &&
1400    !isMobile
1401    // (!isMobile || window.matchMedia('(min-width:992px)').matches)
1402  ) {
1403    block.addClass("scroll-init");
1404
1405    var options,
1406      defaults = {
1407        mouseWheel: {
1408          scrollAmount: 150,
1409          preventDefault: true,
1410        },
1411      };
1412    if (block.length) {
1413      var config = $.extend({}, defaults, options, block.data("plugin-options"), initOptions);
1414    } else if (blockParent.length) {
1415      var config = $.extend({}, defaults, options, blockParent.data("plugin-options"), initOptions);
1416    }
1417
1418    config.callbacks = {
1419      onScroll: function () {
1420        if ($(this).find(".mCSB_buttonLeft").hasClass("disabled"))
1421          $(this).find(".mCSB_buttonLeft").removeClass("disabled");
1422        if ($(this).find(".mCSB_buttonRight").hasClass("disabled"))
1423          $(this).find(".mCSB_buttonRight").removeClass("disabled");
1424      },
1425      onTotalScrollBack: function () {
1426        $(this).find(".mCSB_buttonLeft").addClass("disabled");
1427      },
1428      onTotalScroll: function () {
1429        $(this).find(".mCSB_buttonRight").addClass("disabled");
1430      },
1431      onInit: function () {
1432        $(this).find(".mCSB_buttonLeft").addClass("disabled");
1433      },
1434    };
1435
1436    /*if (block.length) {
1437      block.filter(":not(.scroll-deferred)").mCustomScrollbar(config);
1438      block.filter(".scroll-deferred").mCustomScrollbarDeferred(config);
1439    }
1440
1441    if (blockParent.length) {
1442      blockParent.find(".scroll-deferred").mCustomScrollbarDeferred(config);
1443    }*/
1444  }
1445};
1446
1447InitCustomScrollBar = function (el) {
1448  var block;
1449  if (typeof el === "undefined") {
1450    block = $(".scrollbar:not(.mobile-scroll):not(.scroll-init)");
1451  } else {
1452    block = el.filter(":not(.scroll-init)");
1453  }
1454
1455  if (block.length) {
1456    block.addClass("scroll-init");
1457
1458    var options,
1459      defaults = {
1460        effect: "fadeIn",
1461        effectTime: 300,
1462        threshold: 0,
1463        // threshold: 30
1464      };
1465
1466    var config = $.extend({}, defaults, options, block.data("plugin-options"));
1467
1468    // block.filter(":not(.scroll-deferred)").mCustomScrollbar(config);
1469    // block.filter(".scroll-deferred").mCustomScrollbarDeferred(config);
1470  }
1471};
1472
1473InitFancyBox = function () {
1474  if (typeof $.fn.fancybox !== "function") {
1475    return;
1476  }
1477
1478  if (!$(".fancy").length) {
1479    return;
1480  }
1481
1482  $(".fancy").fancybox({
1483    padding: [40, 40, 64, 40],
1484    openEffect: "fade",
1485    closeEffect: "fade",
1486    nextEffect: "fade",
1487    prevEffect: "fade",
1488    opacity: true,
1489    tpl: {
1490      closeBtn:
1491        '<span title="' +
1492        BX.message("FANCY_CLOSE") +
1493        '" class="fancybox-item fancybox-close inline svg"><svg class="svg svg-close" width="14" height="14" viewBox="0 0 14 14"><path data-name="Rounded Rectangle 568 copy 16" d="M1009.4,953l5.32,5.315a0.987,0.987,0,0,1,0,1.4,1,1,0,0,1-1.41,0L1008,954.4l-5.32,5.315a0.991,0.991,0,0,1-1.4-1.4L1006.6,953l-5.32-5.315a0.991,0.991,0,0,1,1.4-1.4l5.32,5.315,5.31-5.315a1,1,0,0,1,1.41,0,0.987,0.987,0,0,1,0,1.4Z" transform="translate(-1001 -946)"></path></svg></span>',
1494      next:
1495        '<a title="' +
1496        BX.message("FANCY_NEXT") +
1497        '" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
1498      prev:
1499        '<a title="' +
1500        BX.message("FANCY_PREV") +
1501        '" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',
1502    },
1503    touch: "enabled",
1504    buttons: [
1505      //"zoom",
1506      //"share",
1507      // "slideShow",
1508      //"fullScreen",
1509      //"download",
1510      //"thumbs",
1511      "close",
1512    ],
1513    backFocus: false,
1514    beforeShow: function (event) {
1515      var bCurrentSrc =
1516        typeof event.current !== "undefined" && event.current.contentType == "html" && $(event.current.src).length;
1517      var video_block = [];
1518
1519      if (bCurrentSrc) {
1520        video_block = $(event.current.src).find("source.video-content");
1521      }
1522      // else {
1523      //   video_block = $(".company-item source.video-content");
1524      // }
1525      if (video_block.length) {
1526        if (video_block.attr("src") == "#") {
1527          var video_block_wrapper = video_block.closest("video");
1528          var video_block_clone = video_block_wrapper.clone();
1529
1530          video_block_clone.find("source").attr("src", video_block_clone.find("source").data("src"));
1531          video_block.attr("src", video_block.data("src"));
1532          video_block_clone.insertAfter(video_block_wrapper);
1533          video_block_clone.siblings("video").remove();
1534        }
1535      }
1536      var video_block_frame = [];
1537      if (bCurrentSrc) {
1538        video_block_frame = $(event.current.src).find(".company-item__video-iframe");
1539      }
1540      // else {
1541      //   video_block_frame = $(".company-item .company-item__video-iframe");
1542      // }
1543      if (video_block_frame.length) {
1544        var data_src_iframe = video_block_frame.attr("data-src");
1545        video_block_frame.attr("src", data_src_iframe);
1546        video_block_frame.attr("allow", "autoplay");
1547      }
1548    },
1549    afterShow: function (event) {
1550      if ($(".fancybox-overlay").css("opacity") == 0) {
1551        setTimeout(function () {
1552          $(".fancybox-overlay").css("opacity", 1);
1553          $("html").addClass("overflow_html");
1554        }, 200);
1555      }
1556
1557      $(".fancybox-nav").css("opacity", 0);
1558      setTimeout(function () {
1559        $(".fancybox-nav").css("opacity", 1);
1560      }, 150);
1561
1562      var bCurrentSrc =
1563        typeof event.current !== "undefined" && event.current.contentType == "html" && $(event.current.src).length;
1564      var companyVideo = [];
1565      if (bCurrentSrc) {
1566        companyVideo = event.current.src[0].getElementsByClassName("company-item__video");
1567      }
1568      // else {
1569      //   companyVideo = $(".fancybox-inner .company-item__video");
1570      // }
1571      if (companyVideo.length) {
1572        setTimeout(function () {
1573          $(".fancybox-wrap video").resize();
1574          setTimeout(function () {
1575            $(".fancybox-wrap").addClass("show_video");
1576            if (companyVideo[0].currentTime === 0 || companyVideo[0].paused) {
1577              companyVideo[0].currentTime = 0;
1578              companyVideo[0].play();
1579            }
1580          }, 300);
1581        }, 150);
1582      } else if ($(".fancybox-wrap iframe").length) {
1583        $(".fancybox-inner").height("100%");
1584      }
1585    },
1586    beforeClose: function (event) {
1587      // closeModal();
1588      $(".fancybox-overlay").fadeOut();
1589      var bCurrentSrc =
1590        typeof event.current !== "undefined" && event.current.contentType == "html" && $(event.current.src).length;
1591      var companyVideo = [];
1592      if (bCurrentSrc) {
1593        companyVideo = event.current.src[0].getElementsByClassName("company-item__video");
1594      }
1595      // else {
1596      //   companyVideo = $(".fancybox-inner .company-item__video");
1597      // }
1598      if (companyVideo.length) {
1599        companyVideo[0].currentTime = 0;
1600      }
1601
1602      $("html").removeClass("overflow_html");
1603      var video_block_frame = [];
1604      if (bCurrentSrc) {
1605        video_block_frame = $(event.current.src).find(".company-item__video-iframe");
1606      }
1607      // else {
1608      //   video_block_frame = $(".company-item .company-item__video-iframe");
1609      // }
1610      if (video_block_frame.length) {
1611        video_block_frame.attr("src", "");
1612      }
1613    },
1614    onClosed: function (event) {
1615      var companyVideo = [];
1616      if (bCurrentSrc) {
1617        companyVideo = event.current.src[0].getElementsByClassName("company-item__video");
1618      }
1619      // else {
1620      //   companyVideo = $(".fancybox-wrap .company-item__video");
1621      // }
1622      if (companyVideo.length) {
1623        companyVideo[0].pause();
1624      }
1625    },
1626  });
1627};
1628
1629InitFancyBoxVideo = function () {
1630  if (typeof $.fn.fancybox !== "function") {
1631    return;
1632  }
1633
1634  if (!$(".video_link").length) {
1635    return;
1636  }
1637
1638  $(".video_link").fancybox({
1639    type: "iframe",
1640    iframe: {
1641      preload: false
1642    },
1643    maxWidth: 800,
1644    maxHeight: 600,
1645    fitToView: false,
1646    width: "70%",
1647    height: "70%",
1648    autoSize: false,
1649    closeClick: false,
1650    opacity: true,
1651    tpl: {
1652      closeBtn:
1653        '<span title="' +
1654        BX.message("FANCY_CLOSE") +
1655        '" class="fancybox-item fancybox-close inline svg"><svg class="svg svg-close" width="14" height="14" viewBox="0 0 14 14"><path data-name="Rounded Rectangle 568 copy 16" d="M1009.4,953l5.32,5.315a0.987,0.987,0,0,1,0,1.4,1,1,0,0,1-1.41,0L1008,954.4l-5.32,5.315a0.991,0.991,0,0,1-1.4-1.4L1006.6,953l-5.32-5.315a0.991,0.991,0,0,1,1.4-1.4l5.32,5.315,5.31-5.315a1,1,0,0,1,1.41,0,0.987,0.987,0,0,1,0,1.4Z" transform="translate(-1001 -946)"></path></svg></span>',
1656      next:
1657        '<a title="' +
1658        BX.message("FANCY_NEXT") +
1659        '" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
1660      prev:
1661        '<a title="' +
1662        BX.message("FANCY_PREV") +
1663        '" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',
1664    },
1665    beforeShow: function (event) {
1666      /*if(!$('.cd-modal-bg').hasClass('is-visible')){
1667				var scaleValue = retrieveScale($('.cd-modal-bg'));
1668
1669				$('.cd-modal-bg').show().addClass('is-visible').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){
1670					animateLayer($('.cd-modal-bg'), scaleValue, true);
1671				});
1672			}*/
1673    },
1674    afterShow: function () {
1675      if ($(".fancybox-overlay").css("opacity") == 0) {
1676        setTimeout(function () {
1677          $(".fancybox-overlay").css("opacity", 1);
1678          $("html").addClass("overflow_html");
1679        }, 200);
1680      }
1681
1682      $(".fancybox-nav").css("opacity", 0);
1683      setTimeout(function () {
1684        $(".fancybox-nav").css("opacity", 1);
1685      }, 150);
1686      if ($(".fancybox-wrap iframe").length) {
1687        $(".fancybox-inner").height("100%");
1688      }
1689    },
1690    beforeClose: function () {
1691      // closeModal();
1692      $(".fancybox-overlay").fadeOut();
1693      $("html").removeClass("overflow_html");
1694    },
1695  });
1696};
1697
1698/*function CheckTopMenuDotted() {
1699  var menu = $("nav.mega-menu.sliced");
1700  if (window.matchMedia("(max-width:991px)").matches) return;
1701
1702  if (menu.length) {
1703    menu.each(function () {
1704      var menuMoreItem = $(this).find(".header-menu__item--more-items");
1705      if ($(this).parents(".collapse").css("display") == "none") {
1706        return false;
1707      }
1708
1709      var headerFixedBlock = $(this).parents("#headerfixed");
1710      if (headerFixedBlock.length && !headerFixedBlock.hasClass("fixed")) {
1711        return false;
1712      }
1713
1714      var block = $(this).closest(".header-menu");
1715      var block_w = block.outerWidth();
1716      var items = $(this).find(".header-menu__wrapper > .header-menu__item");
1717      var menu_w = 0;
1718      items.each(function (i, el) {
1719        var _el = $(el);
1720        menu_w += _el.outerWidth(true);
1721      });
1722
1723      var afterHide = false;
1724      var newItemsArr = [];
1725      menuItemNewSave = "";
1726
1727      while (menu_w > block_w - 1) {
1728        menuItemOldSave = $(this)
1729          .find(".header-menu__wrapper > .header-menu__item")
1730          .not(".header-menu__item--more-items")
1731          .last();
1732
1733        if (menuItemOldSave.length) {
1734          var classes = menuItemOldSave.attr("class");
1735          var newMenuItem = $("<li />
1735").addClass(classes).attr("data-hidewidth", menu_w).html(menuItemOldSave.html());
1736          newItemsArr.push(newMenuItem);
1737
1738          menuItemOldSave.remove();
1739
1740          menuMoreItem.css({
1741            display: "flex",
1742            opacity: 1,
1743          });
1744
1745          menu_w = 0;
1746          items.each(function (i, el) {
1747            var _el = $(el);
1748            menu_w += _el.outerWidth(true);
1749          });
1750          block_w = block.outerWidth();
1751          afterHide = true;
1752        } else {
1753          break;
1754        }
1755      }
1756
1757      newItemsArr = newItemsArr.reverse();
1758      menuMoreItem.find("> .header-menu__dropdown-menu").prepend(newItemsArr);
1759
1760      if (!afterHide) {
1761        var moreItemsArr = [];
1762        do {
1763          menuItemOldSave = menuMoreItem.find("> .header-menu__dropdown-menu > li").first();
1764          if (!menuItemOldSave.length) {
1765            menuMoreItem.hide();
1766            break;
1767          } else {
1768            var hideWidth = menuItemOldSave.attr("data-hidewidth");
1769            if (hideWidth > block_w) {
1770              break;
1771            } else {
1772              menuItemOldSave.removeClass("scroll-inited");
1773              var classes = menuItemOldSave.attr("class");
1774              var moreMenuItem = $("<div />
1774").addClass(classes).html(menuItemOldSave.html());
1775
1776              menuItemOldSave.remove();
1777              $(moreMenuItem).insertBefore(menuMoreItem);
1778              if (!menuItemOldSave.length) {
1779                menuMoreItem.hide();
1780                break;
1781              }
1782            }
1783          }
1784
1785          menu_w = 0;
1786          items.each(function (i, el) {
1787            var _el = $(el);
1788            menu_w += _el.outerWidth();
1789          });
1790        } while (menu_w <= block_w);
1791      }
1792
1793      menu.closest(".header-menu").addClass("dotted-complete");
1794      var wrapper = $(this).closest(".hide-dotted");
1795      if (wrapper.length) {
1796        wrapper.addClass("dotted-complete");
1797      }
1798    });
1799  }
1800  return false;
1801};
1802*/
1803
1804CheckTopVisibleMenu = function (that) {
1805  var dropdownMenu = $(that).find(">.header-menu__dropdown-menu");
1806
1807  if (!dropdownMenu.length) {
1808    dropdownMenu = $(that).find(">.header-menu__wide-item-wrapper>.header-menu__wide-submenu");
1809  }
1810  if (!dropdownMenu.length) {
1811    dropdownMenu = $(that).find(">.header-menu__wide-submenu-item-inner>.submenu-wrapper>.header-menu__wide-submenu");
1812  }
1813
1814  if (!dropdownMenu.length) {
1815    return;
1816  }
1817
1818  // if( that !== undefined ) {
1819  // 	dropdownMenu.push($(that));
1820  // }
1821
1822  if (dropdownMenu.length) {
1823    dropdownMenu.each(function (i, el) {
1824      var dropdownMenuCurrent = $(el);
1825      dropdownMenuCurrent.find("a").css("white-space", "");
1826      dropdownMenuCurrent.css("left", "");
1827      dropdownMenuCurrent.css("right", "");
1828      dropdownMenuCurrent.removeClass("toright");
1829
1830      var dropdownMenuCurrent_left = dropdownMenuCurrent.offset().left;
1831
1832      if (typeof dropdownMenuCurrent_left != "undefined") {
1833        var menu = dropdownMenuCurrent.parents(".header__main-part");
1834        if (!menu.length) menu = dropdownMenuCurrent.closest(".header__menu-part");
1835        var menu_width = menu.outerWidth();
1836        var menu_left = menu.offset().left;
1837        var menu_right = menu_left + menu_width;
1838        var isToRight = dropdownMenuCurrent.parents(".toright").length > 0;
1839        var parentsdropdownMenuCurrents = dropdownMenuCurrent.parents(".header-menu__dropdown-menu");
1840        var isHasParentdropdownMenuCurrent = parentsdropdownMenuCurrents.length > 0;
1841        if (isHasParentdropdownMenuCurrent) {
1842          var parentdropdownMenuCurrent_width = parentsdropdownMenuCurrents.first().outerWidth()
1843            ? parentdropdownMenuCurrent_width
1844            : 240;
1845          var parentdropdownMenuCurrent_left = parentsdropdownMenuCurrents.first().offset().left;
1846          var parentdropdownMenuCurrent_right = parentdropdownMenuCurrent_width + parentdropdownMenuCurrent_left;
1847        }
1848
1849        var emptyCurrentWidth = dropdownMenuCurrent.outerWidth() == 0;
1850
1851        var dropdownMenuCurrent_width = !emptyCurrentWidth ? dropdownMenuCurrent.outerWidth() : 240;
1852
1853        if (parentdropdownMenuCurrent_right + dropdownMenuCurrent_width > menu_right) {
1854          dropdownMenuCurrent.find("a").css("white-space", "normal");
1855        }
1856
1857        var dropdownMenuCurrent_right = dropdownMenuCurrent_left + dropdownMenuCurrent_width;
1858
1859        if (dropdownMenuCurrent_right > menu_right || isToRight) {
1860          var addleft = 0;
1861          addleft = menu_right - dropdownMenuCurrent_right;
1862          if (isHasParentdropdownMenuCurrent || isToRight) {
1863            dropdownMenuCurrent.css("left", "auto");
1864            dropdownMenuCurrent.css("right", "100%");
1865            dropdownMenuCurrent.addClass("toright");
1866          } else {
1867            var dropdownMenuCurrent_curLeft = parseInt(dropdownMenuCurrent.css("left"));
1868            dropdownMenuCurrent.css("left", dropdownMenuCurrent_curLeft + addleft + "px");
1869          }
1870        }
1871        var firstMenuItem = dropdownMenuCurrent.parent().hasClass("header-menu__item--first");
1872        if (!firstMenuItem) {
1873          if (dropdownMenuCurrent_right < 240 + menu_left) {
1874            dropdownMenuCurrent.css("left", "100%");
1875            dropdownMenuCurrent.css("right", "0");
1876            dropdownMenuCurrent.removeClass("toright");
1877          }
1878          var childDropDown = dropdownMenuCurrent.find(">.dropdown");
1879          if (childDropDown.length) {
1880            childDropDown.css("left", "");
1881            childDropDown.css("right", "");
1882          }
1883          if (emptyCurrentWidth && childDropDown.length && dropdownMenuCurrent_right < 480 + menu_left) {
1884            dropdownMenuCurrent.css("left", "100%");
1885            dropdownMenuCurrent.css("right", "0");
1886            dropdownMenuCurrent.removeClass("toright");
1887            childDropDown.css("left", "100%");
1888            childDropDown.css("right", "0");
1889          }
1890        }
1891      }
1892    });
1893  }
1894};
1895
1896CheckMainBannerSliderVText = function (slider) {};
1897
1898footerInit = function (block) {
1899  if (block.hasClass("check-visible")) {
1900    const blockJsPadding = $(".js-check-padding");
1901    const blockJsHide = $(".js-check-hide");
1902
1903    if (blockJsPadding.length && blockJsHide.length && block.data("ajax-check-visible")) {
1904      const arCheckBlock = block.data("ajax-check-visible").split(",");
1905      let bHiddenBlocks = arCheckBlock.every(function (i) {
1906        return $('[data-ajax-load-block="' + i + '"]').hasClass("hidden") === true;
1907      });
1908
1909      if (bHiddenBlocks) {
1910        blockJsHide.addClass("hidden");
1911        blockJsPadding.addClass("js-padding");
1912      } else {
1913        blockJsHide.removeClass("hidden");
1914        blockJsPadding.removeClass("js-padding");
1915      }
1916    }
1917  }
1918};
1919
1920verticalAlign = function (class_name) {
1921  if (typeof class_name == "undefined") class_name = "auto_align";
1922  if ($("." + class_name).length) {
1923    maxHeight = 0;
1924    $("." + class_name).each(function () {
1925      if ($(this).height() > maxHeight) {
1926        maxHeight = $(this).height();
1927      }
1928    });
1929    $("." + class_name).each(function () {
1930      delta = Math.round((maxHeight - $(this).height()) / 2);
1931      $(this).css({ "padding-top": delta + "px", "padding-bottom": delta + "px" });
1932    });
1933  }
1934};
1935
1936getGridSize = function (counts, custom_counts) {
1937  var z = parseInt($(".body_media").css("top"));
1938  if (typeof custom_counts != "undefined") {
1939    if (window.matchMedia("(max-width: 700px)").matches) return counts[3] ? counts[3] : counts[2];
1940    else if (window.matchMedia("(max-width: 850px)").matches) return counts[2];
1941    else if (window.matchMedia("(max-width: 1100px)").matches) return counts[1];
1942    else return counts[0];
1943  } else {
1944    if (window.matchMedia("(max-width: 600px)").matches) {
1945      return counts[3] ? counts[3] : counts[2];
1946    } else return z == 2 ? counts[0] : z == 1 ? counts[1] : counts[2];
1947  }
1948};
1949
1950CheckFlexSlider = function () {
1951  $(".flexslider:not(.thmb):visible").each(function () {
1952    var slider = $(this);
1953    slider.resize();
1954    var counts = slider.data("flexslider").vars.counts,
1955      slide_counts = slider.data("flexslider").vars.slide_counts;
1956    if (typeof counts != "undefined") {
1957      var cnt = getGridSize(counts, slider.data("flexslider").vars.customGrid);
1958      var to0 =
1959        cnt != slider.data("flexslider").vars.minItems ||
1960        cnt != slider.data("flexslider").vars.maxItems ||
1961        cnt != slider.data("flexslider").vars.move;
1962      if (to0) {
1963        slider.data("flexslider").vars.minItems = cnt;
1964        slider.data("flexslider").vars.maxItems = cnt;
1965        if (typeof slide_counts != "undefined") slider.data("flexslider").vars.move = slide_counts;
1966        else slider.data("flexslider").vars.move = cnt;
1967
1968        slider.flexslider(0);
1969        slider.resize();
1970        slider.resize(); // twise!
1971      }
1972    }
1973  });
1974};
1975
1976CheckHeaderFixed = function () {
1977  var header = $("header .header__inner").first(),
1978    header_fixed = $("#headerfixed");
1979
1980  if (header_fixed.length) {
1981    if (header.length) {
1982      var isHeaderFixed = false,
1983        headerCanFix = true,
1984        headerFixedHeight = header_fixed.actual("outerHeight"),
1985        headerNormalHeight = header.actual("outerHeight"),
1986        headerDiffHeight = headerNormalHeight - headerFixedHeight,
1987        mobileBtnMenu = $(".btn.btn-responsive-nav"),
1988        headerTop = $("#panel:visible").actual("outerHeight"),
1989        topBlock = $(".TOP_HEADER").first(),
1990        $headerFixedNlo = header_fixed.find("[data-nlo]"),
1991        $eyedPanel = $("#eyed-panel"),
1992        isNloLoaded = !$headerFixedNlo.length,
1993        OnHeaderFixedScrollHandler;
1994
1995      if (headerDiffHeight <= 0) headerDiffHeight = 0;
1996      if ($eyedPanel.length) headerTop += $eyedPanel.actual("outerHeight");
1997
1998      if (topBlock.length) headerTop += topBlock.actual("outerHeight");
1999
2000      $(window).scroll(
2001        (OnHeaderFixedScrollHandler = function () {
2002          var scrollTop = $(window).scrollTop();
2003          headerCanFix = !mobileBtnMenu.is(":visible");
2004
2005          if (!isHeaderFixed) {
2006            if (headerCanFix && scrollTop > headerNormalHeight + headerTop) {
2007              if (!isNloLoaded) {
2008                if (!$headerFixedNlo.hasClass("nlo-loadings")) {
2009                  $headerFixedNlo.addClass("nlo-loadings");
2010                  setTimeout(function () {
2011                    $.ajax({
2012                      data: { nlo: $headerFixedNlo.attr("data-nlo") },
2013                      error: function () {
2014                        $headerFixedNlo.removeClass("nlo-loadings");
2015                      },
2016                      complete: function (jqXHR, textStatus) {
2017                        if (textStatus === "success" || jqXHR.status == 404) {
2018                          // stop ya metrika webvisor DOM indexer
2019                          pauseYmObserver();
2020
2021                          isNloLoaded = true;
2022                          var ob = BX.processHTML($.trim(jqXHR.responseText));
2023                          BX.ajax.processScripts(ob.SCRIPT);
2024                          $headerFixedNlo.replaceWith(ob.HTML);
2025
2026                          OnHeaderFixedScrollHandler();
2027
2028                          // resume ya metrika webvisor
2029                          // (300ms transition) + (100ms scroll handler)
2030                          setTimeout(resumeYmObserver, 400);
2031                        }
2032                      },
2033                    });
2034                  }, 300);
2035                }
2036              } else {
2037                isHeaderFixed = true;
2038                header_fixed.css("top", "-" + headerNormalHeight + "px");
2039                header_fixed.addClass("fixed");
2040
2041                header_fixed.animate({ top: "0" }, { duration: 300, complete: function () {} });
2042                CheckTopMenuDotted();
2043              }
2044            }
2045          }
2046
2047          if (isHeaderFixed || !headerCanFix) {
2048            if (!headerCanFix || scrollTop <= headerDiffHeight + headerTop) {
2049              isHeaderFixed = false;
2050              header_fixed.removeClass("fixed");
2051            }
2052          }
2053        })
2054      );
2055    }
2056  }
2057
2058  // mobile fixed
2059  var mfixed = $("body.mfixed_y.mfixed_view_scroll_top #mobileheader");
2060  if (mfixed.length) {
2061    var mheaderFixed = false,
2062      mheaderFixedHeight = mfixed.actual("outerHeight"),
2063      mheaderTop = $("#panel:visible").actual("outerHeight"),
2064      mheaderStartScroll = 0;
2065
2066    $(window).scroll(function () {
2067      if (window.matchMedia("(max-width:991px)").matches) {
2068        var scrollTop = $(window).scrollTop();
2069        if (!mheaderFixed) {
2070          if (scrollTop > mheaderTop + mheaderFixedHeight && scrollTop < mheaderStartScroll) {
2071            mfixed.addClass("fixed");
2072            mheaderFixed = true;
2073          }
2074        } else {
2075          if (scrollTop <= mheaderTop || scrollTop > mheaderStartScroll) {
2076            mfixed.removeClass("fixed");
2077            mheaderFixed = false;
2078          }
2079        }
2080
2081        mheaderStartScroll = scrollTop;
2082      } else {
2083        mfixed.removeClass("fixed");
2084      }
2085    });
2086  }
2087};
2088
2089CheckObjectsSizes = function () {
2090  $(".container iframe,.container object,.container video").each(function () {
2091    var height_attr = $(this).attr("height");
2092    var width_attr = $(this).attr("width");
2093
2094    if (height_attr && width_attr) {
2095      $(this).css("height", ($(this).outerWidth() * height_attr) / width_attr);
2096    }
2097  });
2098};
2099
2100scrollToTop = function () {
2101  if (arAsproOptions["THEME"]["SCROLLTOTOP_TYPE"] !== "NONE") {
2102    scrollToTopAnimateClassIn =
2103      arAsproOptions.THEME.SCROLLTOTOP_TYPE.indexOf("ROUND") !== -1 ? "rotateIn" : "rubberBand";
2104    scrollToTopAnimateClassOut =
2105      arAsproOptions.THEME.SCROLLTOTOP_TYPE.indexOf("ROUND") !== -1 ? "rotateOut" : "flipOutX";
2106    if (BX.browser.IsMac()) {
2107      scrollToTopAnimateClassIn = scrollToTopAnimateClassOut = "";
2108    }
2109    var _isScrolling = false;
2110    // Append Button
2111    $("body").append(
2112      $("<a />")
2113        .addClass(
2114          "scroll-to-top hide-991 " +
2115            arAsproOptions["THEME"]["SCROLLTOTOP_TYPE"] +
2116            " " +
2117            arAsproOptions["THEME"]["SCROLLTOTOP_POSITION"]
2118        )
2119        .attr({ href: "#", id: "scrollToTop" })
2120    );
2121    $scrolltotop = $("#scrollToTop");
2122
2123    if (arAsproOptions.THEME.SCROLLTOTOP_POSITION_RIGHT)
2124      $scrolltotop.css({ right: arAsproOptions.THEME.SCROLLTOTOP_POSITION_RIGHT + "px", left: "auto" });
2125
2126    $scrolltotop.click(function (e) {
2127      e.preventDefault();
2128      $("body, html").animate({ scrollTop: 0 }, 500);
2129      return false;
2130    });
2131    // Show/Hide Button on Window Scroll event.
2132    $(window).scroll(function () {
2133      if (!_isScrolling) {
2134        _isScrolling = true;
2135
2136        var bottom = 23,
2137          scrollVal = $(window).scrollTop(),
2138          windowHeight = $(window).height();
2139
2140        if (arAsproOptions.THEME.SCROLLTOTOP_POSITION_BOTTOM) {
2141          bottom = arAsproOptions.THEME.SCROLLTOTOP_POSITION_BOTTOM;
2142          $scrolltotop.css("bottom", bottom + "px");
2143        }
2144
2145        var footerOffset = 0;
2146        if ($("footer").get(0)) {
2147          footerOffset = $("footer").offset().top;
2148        }
2149        if (scrollVal > 150) {
2150          $("#scrollToTop").stop(true, true).addClass("visible");
2151          _isScrolling = false;
2152        } else {
2153          $("#scrollToTop").stop(true, true).removeClass("visible");
2154          _isScrolling = false;
2155        }
2156        CheckScrollToTop();
2157      }
2158    });
2159  }
2160};
2161
2162CheckScrollToTop = function () {
2163  if (typeof arAsproOptions === "undefined") {
2164    return;
2165  }
2166
2167  if (arAsproOptions["THEME"]["SCROLLTOTOP_TYPE"] !== "NONE" && $scrolltotop.length != undefined) {
2168    if (documentScrollTop > 150) {
2169      $scrolltotop.stop(true, true).addClass("visible").addClass("animated");
2170      if (scrollToTopAnimateClassOut) {
2171        $scrolltotop.removeClass(scrollToTopAnimateClassOut);
2172      }
2173      if (scrollToTopAnimateClassIn) {
2174        $scrolltotop.addClass(scrollToTopAnimateClassIn);
2175      }
2176    } else {
2177      $scrolltotop.stop(true, true).removeClass("visible");
2178      if (scrollToTopAnimateClassIn) {
2179        $scrolltotop.removeClass(scrollToTopAnimateClassIn);
2180      }
2181      if (scrollToTopAnimateClassOut) {
2182        $scrolltotop.addClass(scrollToTopAnimateClassOut);
2183      }
2184    }
2185  }
2186  var bottom = 23,
2187    scrollVal = $(window).scrollTop(),
2188    windowHeight = $(window).height();
2189
2190  if (arAsproOptions.THEME.SCROLLTOTOP_POSITION_BOTTOM) {
2191    bottom = arAsproOptions.THEME.SCROLLTOTOP_POSITION_BOTTOM;
2192    $scrolltotop.css("bottom", bottom + "px");
2193  }
2194
2195  if ($("footer").length) var footerOffset = $("footer").offset().top;
2196
2197  if (scrollVal + windowHeight > footerOffset) {
2198    $("#scrollToTop").css("bottom", Math.round(bottom + scrollVal + windowHeight - footerOffset));
2199  } else if (parseInt($("#scrollToTop").css("bottom")) > bottom) {
2200    $("#scrollToTop").css("bottom", Math.round(bottom));
2201  }
2202};
2203
2204var isMobile = jQuery.browser.mobile;
2205var players = {};
2206
2207if (isMobile) {
2208  document.documentElement.className += " mobile";
2209}
2210
2211var timerScroll = false,
2212  ignoreScroll = [],
2213  documentScrollTopLast = $(document).scrollTop(),
2214  startScroll = 0;
2215
2216$.fn.equalizeHeights = function (outer, classNull, minHeight, autoHeightBlock) {
2217  var maxHeight = this.map(function (i, e) {
2218    var minus_height = 0,
2219      calc_height = 0;
2220    if (classNull !== false && $(e).find(classNull).is(":visible"))
2221      minus_height = parseInt($(e).find(classNull).actual("outerHeight"));
2222    if (minus_height) minus_height += 15;
2223    $(e).css("height", "");
2224    if (autoHeightBlock !== false) {
2225      var height_tmp = $(e).find(autoHeightBlock).css("height");
2226      $(e).find(autoHeightBlock).css("height", "");
2227    }
2228    if (outer === true) {
2229      calc_height = $(e).actual("outerHeight") - minus_height;
2230    } else {
2231      calc_height = $(e).actual("height") - minus_height;
2232    }
2233
2234    if (autoHeightBlock !== false) {
2235      $(e).find(autoHeightBlock).css("height", height_tmp);
2236    }
2237    if (minHeight !== false) {
2238      if (calc_height < minHeight) {
2239        calc_height += minHeight - calc_height;
2240      }
2241      if (window.matchMedia("(max-width: 520px)").matches) {
2242        calc_height = 300;
2243      }
2244      if (window.matchMedia("(max-width: 400px)").matches) {
2245        calc_height = 200;
2246      }
2247    }
2248    return calc_height;
2249  }).get();
2250
2251  for (var i = 0, c = maxHeight.length; i < c; ++i) {
2252    if (maxHeight[i] % 2) {
2253      --maxHeight[i];
2254    }
2255  }
2256
2257  return this.height(Math.max.apply(this, maxHeight));
2258};
2259
2260$.fn.getFloatWidth = function () {
2261  var width = 0;
2262
2263  if ($(this).length) {
2264    var rect = $(this)[0].getBoundingClientRect();
2265    if (!(width = rect.width)) {
2266      width = rect.right - rect.left;
2267    }
2268  }
2269
2270  return width;
2271};
2272
2273$.fn.sliceHeight2 = function (options) {
2274  function _slice(el) {
2275    el.each(function () {
2276      $(this).css("line-height", "");
2277      $(this).css("height", "");
2278    });
2279    if (typeof options.autoslicecount == "undefined" || options.autoslicecount !== false) {
2280      var elsw =
2281          typeof options.row !== "undefined" && options.row.length
2282            ? el.first().parents(options.row).getFloatWidth()
2283            : el.first().parents(".grid-list").getFloatWidth(),
2284        elw =
2285          typeof options.item !== "undefined" && options.item.length
2286            ? $(options.item).first().getFloatWidth()
2287            : el.first().hasClass("grid-list__item")
2288            ? el.first().getFloatWidth()
2289            : el.first().parents(".grid-list__item").getFloatWidth();
2290
2291      if (!elsw) {
2292        elsw = el.first().parents(".grid-list").getFloatWidth();
2293      }
2294      if (elw && options.fixWidth) elw -= options.fixWidth;
2295
2296      if (elsw && elw) {
2297        options.slice = Math.floor(elsw / elw);
2298      }
2299    }
2300    if (typeof options.typeResize == "undefined" || options.typeResize === false) {
2301      if (options.sliceEqualLength && el.closest(".flexslider").length) options.slice = el.length;
2302      if (options.slice >= 1) {
2303        for (var i = 0; i < el.length; i += options.slice) {
2304          $(el.slice(i, i + options.slice)).equalizeHeights(
2305            options.outer,
2306            options.classNull,
2307            options.minHeight,
2308            options.autoHeightBlock
2309          );
2310        }
2311      }
2312      if (options.lineheight) {
2313        var lineheightAdd = parseInt(options.lineheight);
2314        if (isNaN(lineheightAdd)) {
2315          lineheightAdd = 0;
2316        }
2317        el.each(function () {
2318          $(this).css("line-height", $(this).actual("height") + lineheightAdd + "px");
2319        });
2320      }
2321    }
2322
2323    if (typeof options.callback == "function") options.callback(el);
2324  }
2325  var options = $.extend(
2326    {
2327      slice: null,
2328      outer: false,
2329      lineheight: false,
2330      autoslicecount: true,
2331      classNull: false,
2332      minHeight: false,
2333      row: false,
2334      item: false,
2335      typeResize: false,
2336      resize: true,
2337      typeValue: false,
2338      sliceEqualLength: false,
2339      fixWidth: 0,
2340      callback: false,
2341      autoHeightBlock: false,
2342    },
2343    options
2344  );
2345
2346  var el = $(this);
2347  ignoreResize.push(true);
2348  _slice(el);
2349  ignoreResize.pop();
2350
2351  if (options.resize !== false) {
2352    BX.addCustomEvent("onWindowResize", function (eventdata) {
2353      ignoreResize.push(true);
2354      _slice(el);
2355      ignoreResize.pop();
2356    });
2357  }
2358};
2359
2360function extendDepthObject(target, FromObj) {
2361  var to = Object.assign({}, target);
2362  for (var key in FromObj) {
2363    if (typeof FromObj[key] == "object") {
2364      to[key] = extendDepthObject(to[key], FromObj[key]);
2365    } else {
2366      to[key] = FromObj[key];
2367    }
2368  }
2369
2370  return to;
2371}
2372
2373$.fn.sliceHeight = function (options) {
2374  function _slice(el) {
2375    var arBreakpoints = Object.keys(options.breakpoint);
2376    var resizeOptionsTmp = {};
2377    if (arBreakpoints.length) {
2378      for (var key in arBreakpoints) {
2379        if (window.matchMedia(arBreakpoints[key].toString()).matches) {
2380          resizeOptionsTmp = options.breakpoint[arBreakpoints[key]];
2381        }
2382      }
2383    }
2384
2385    var resizeOptions = extendDepthObject(options, resizeOptionsTmp);
2386
2387    var blockNullClass =
2388      resizeOptions.blockNull !== undefined && resizeOptions.blockNull.class !== undefined
2389        ? resizeOptions.blockNull.class
2390        : false;
2391    var parent =
2392      typeof resizeOptions.row !== "undefined" && resizeOptions.row.length
2393        ? el.first().parents(resizeOptions.row)
2394        : el.first().parents(".items");
2395    var item = "";
2396
2397    if (typeof resizeOptions.item !== "undefined" && resizeOptions.item.length) {
2398      if (blockNullClass) {
2399        $(resizeOptions.item).each(function (i, element) {
2400          _element = $(element);
2401          if (!_element.hasClass(blockNullClass)) {
2402            item = _element;
2403          }
2404        });
2405        if (!item)
2406          // if only ignored blocks
2407          return false;
2408      } else {
2409        item = $(resizeOptions.item).first();
2410      }
2411    } else {
2412      if (el.first().hasClass("item")) {
2413        item = el.first();
2414      } else {
2415        item = el.first().parents(".item");
2416      }
2417    }
2418
2419    if (typeof resizeOptions.autoslicecount == "undefined" || resizeOptions.autoslicecount !== false) {
2420      var elsw = parent.getFloatWidth(),
2421        elw = item.getFloatWidth();
2422      if (!elsw) {
2423        elsw = el.first().parents(".row").getFloatWidth();
2424      }
2425      if (!elw) {
2426        if (typeof resizeOptions.item !== "undefined" && resizeOptions.item.length)
2427          elw = $(resizeOptions.item + ":eq(1)").getFloatWidth()
2428            ? $(resizeOptions.item + ":eq(1)").getFloatWidth()
2429            : $(resizeOptions.item + ":eq(2)").getFloatWidth();
2430        else elw = $(el[1]).getFloatWidth() ? $(el[1]).getFloatWidth() : $(el[2]).getFloatWidth();
2431      }
2432      if (elw && resizeOptions.fixWidth) elw -= resizeOptions.fixWidth;
2433
2434      elw = parseInt(elw * 100) / 100;
2435
2436      if (elsw && elw) {
2437        resizeOptions.slice = Math.floor(elsw / elw);
2438      }
2439    }
2440
2441    if (resizeOptions.customSlice) {
2442      //manual slice count
2443      var bSliceNext = false;
2444      if (resizeOptions.length) {
2445        elw =
2446          typeof resizeOptions.item !== "undefined" && resizeOptions.item.length
2447            ? $(resizeOptions.item).last().getFloatWidth()
2448            : el.last().hasClass("item")
2449            ? el.last().getFloatWidth()
2450            : el.last().parents(".item").getFloatWidth();
2451        if (elw) resizeOptions.sliceNext = Math.floor(elsw / elw);
2452
2453        bSliceNext = true;
2454      }
2455    }
2456
2457    elements = [];
2458    if (resizeOptions.classes !== undefined && resizeOptions.classes.length) {
2459      for (var i = 0; i < resizeOptions.classes.length; i++) {
2460        var items = $(resizeOptions.item).find(resizeOptions.classes[i]);
2461        elements.push(items);
2462      }
2463    }
2464    var elIndex = elements.push(el) - 1;
2465
2466    if (resizeOptions.mobile === true) {
2467      if (window.matchMedia("(max-width: 550px)").matches) {
2468        for (var block = 0; block < elements.length; block++) {
2469          var items = $(elements[block]);
2470          items.css({
2471            "line-height": "",
2472            height: "",
2473          });
2474        }
2475        return;
2476      }
2477    }
2478
2479    if (typeof resizeOptions.typeResize == "undefined" || resizeOptions.typeResize === false) {
2480      if (resizeOptions.slice) {
2481        for (var block = 0; block < elements.length; block++) {
2482          if (resizeOptions.currentRow) {
2483            var itemNumber = el.index(resizeOptions.currentItem);
2484            var rowCount = resizeOptions.slice;
2485            var rowNumber = Math.floor(itemNumber / rowCount);
2486
2487            var items = $(elements[block].slice(rowNumber * rowCount, rowNumber * rowCount + rowCount));
2488            var classNull = block == elIndex ? resizeOptions.classNull : false;
2489            items.css({
2490              "line-height": "",
2491              height: "",
2492            });
2493            items.equalizeHeights(resizeOptions.outer, classNull, resizeOptions);
2494          } else {
2495            for (var i = 0; i < elements[block].length; ) {
2496              if (resizeOptions.customSlice && resizeOptions.sliceNext && bSliceNext && i)
2497                //manual slice count
2498                resizeOptions.slice = resizeOptions.sliceNext;
2499
2500              var slice = resizeOptions.slice;
2501              var items = $(elements[block].slice(i, i + slice));
2502              if (resizeOptions.blockNull !== undefined) {
2503                if (resizeOptions.blockNull.class !== undefined) {
2504                  var counts = 0;
2505                  items.each(function (i, item) {
2506                    var _item = $(item);
2507                    if (
2508                      _item.hasClass(resizeOptions.blockNull.class) ||
2509                      _item.closest("." + resizeOptions.blockNull.class).length
2510                    ) {
2511                      counts++;
2512                    }
2513                  });
2514                }
2515              }
2516              if (counts) {
2517                slice -= (resizeOptions.blockNull.width - 1) * counts;
2518              }
2519
2520              items = $(elements[block].slice(i, i + slice));
2521              if (items) {
2522                var classNull = block == elIndex ? resizeOptions.classNull : false;
2523
2524                items.css({
2525                  "line-height": "",
2526                  height: "",
2527                });
2528                items.equalizeHeights(resizeOptions.outer, classNull, resizeOptions);
2529              }
2530              i += slice || 1;
2531            }
2532          }
2533        }
2534      }
2535      if (resizeOptions.lineheight) {
2536        var lineheightAdd = parseInt(resizeOptions.lineheight);
2537        if (isNaN(lineheightAdd)) {
2538          lineheightAdd = 0;
2539        }
2540        el.each(function () {
2541          $(this).css("line-height", $(this).actual("height") + lineheightAdd + "px");
2542        });
2543      }
2544    }
2545  }
2546  var options = $.extend(
2547    {
2548      slice: null,
2549      sliceNext: null,
2550      outer: false,
2551      lineheight: false,
2552      autoslicecount: true,
2553      classNull: false,
2554      minHeight: false,
2555      row: false,
2556      item: false,
2557      typeResize: false,
2558      typeValue: false,
2559      fixWidth: 0,
2560      resize: true,
2561      mobile: false,
2562      customSlice: false,
2563      breakpoint: {},
2564      classes: [],
2565    },
2566    options
2567  );
2568
2569  var el = $(this);
2570
2571  ignoreResize.push(true);
2572  _slice(el);
2573  ignoreResize.pop();
2574
2575  if (options.resize) {
2576    BX.addCustomEvent("onWindowResize", function (eventdata) {
2577      try {
2578        ignoreResize.push(true);
2579        _slice(el);
2580      } catch (e) {
2581      } finally {
2582        ignoreResize.pop();
2583      }
2584    });
2585  } else {
2586    if (!ignoreResize.length) {
2587      // ignoreResize.push(true);
2588      _slice(el);
2589      // ignoreResize.pop();
2590    }
2591  }
2592};
2593
2594waitingExists = function (selector, delay, callback) {
2595  if (typeof callback !== "undefined" && selector.length && delay > 0) {
2596    delay = parseInt(delay);
2597    delay = delay < 0 ? 0 : delay;
2598
2599    if (!$(selector).length) {
2600      setTimeout(function () {
2601        waitingExists(selector, delay, callback);
2602      }, delay);
2603    } else {
2604      callback();
2605    }
2606  }
2607};
2608
2609waitingNotExists = function (selectorExists, selectorNotExists, delay, callback) {
2610  if (
2611    typeof callback !== "undefined" &&
2612    selectorExists.length &&
2613    $(selectorExists).length &&
2614    selectorNotExists.length &&
2615    !$(selectorNotExists).length &&
2616    delay > 0
2617  ) {
2618    delay = parseInt(delay);
2619    delay = delay < 0 ? 0 : delay;
2620
2621    setTimeout(function () {
2622      if (selectorExists.length && !$(selectorNotExists).length) {
2623        callback();
2624      }
2625    }, delay);
2626  }
2627};
2628
2629function onLoadjqm(name, hash, _this) {
2630  if (hash.c.noOverlay === undefined || (hash.c.noOverlay !== undefined && !hash.c.noOverlay)) {
2631    $("body").addClass("jqm-initied");
2632  }
2633
2634  $("body").addClass("swipeignore");
2635
2636  if (typeof $(hash.t).data("ls") !== " undefined" && $(hash.t).data("ls")) {
2637    var ls = $(hash.t).data("ls"),
2638      ls_timeout = 0,
2639      v = "";
2640
2641    if ($(hash.t).data("ls_timeout")) ls_timeout = $(hash.t).data("ls_timeout");
2642
2643    ls_timeout = ls_timeout ? Date.now() + ls_timeout * 1000 : "";
2644
2645    if (typeof localStorage !== "undefined") {
2646      var val = localStorage.getItem(ls);
2647      try {
2648        v = JSON.parse(val);
2649      } catch (e) {
2650        v = val;
2651      }
2652      if (v != null) {
2653        localStorage.removeItem(ls);
2654      }
2655      v = {};
2656      v["VALUE"] = "Y";
2657      v["TIMESTAMP"] = ls_timeout; // default: seconds for 1 day
2658
2659      localStorage.setItem(ls, JSON.stringify(v));
2660    } else {
2661      var val = $.cookie(ls);
2662      if (!val) $.cookie(ls, "Y", { expires: ls_timeout }); // default: seconds for 1 day
2663    }
2664
2665    var dopClasses = hash.w.find(".marketing-popup").data("classes");
2666    if (dopClasses) {
2667      hash.w.addClass(dopClasses);
2668    }
2669  }
2670
2671  //update show password
2672  //show password eye
2673  if (hash.w.hasClass("auth_frame")) {
2674    hash.w.find(".form-group:not(.eye-password-ignore) [type=password]").each(function (item) {
2675      $(this).closest(".form-group").addClass("eye-password");
2676    });
2677  }
2678
2679  $.each($(hash.t).get(0).attributes, function (index, attr) {
2680    if (/^data\-autoload\-(.+)$/.test(attr.nodeName)) {
2681      var key = attr.nodeName.match(/^data\-autoload\-(.+)$/)[1];
2682      var el = $('input[name="' + key.toUpperCase() + '"]');
2683      if (!el.length) {
2684        //is form block
2685        el = $('input[data-sid="' + key.toUpperCase() + '"]');
2686      }
2687
2688      var value = $(hash.t).data("autoload-" + key);
2689      value = String(value).replace(/%99/g, "\\"); // replace symbol \
2690
2691      el.val(BX.util.htmlspecialcharsback(value)).attr("readonly", "readonly");
2692      el.closest(".form-group").addClass("input-filed");
2693      el.attr("title", el.val());
2694    }
2695  });
2696
2697  if (hash.c.noOverlay === undefined || (hash.c.noOverlay !== undefined && !hash.c.noOverlay)) {
2698    /* let diffWidth;
2699    if ((diffWidth = window.innerWidth - document.documentElement.clientWidth)) {
2700      $("body").css({ "padding-right": diffWidth + "px" });
2701    } */
2702
2703    $("body").css({ overflow: "hidden", height: "100vh" });
2704    hash.w.closest("#popup_iframe_wrapper").css({ "z-index": 3000, display: "flex" });
2705  }
2706
2707  var eventdata = { action: "loadForm" };
2708  BX.onCustomEvent("onCompleteAction", [eventdata, $(hash.t)[0]]);
2709
2710  if ($(hash.t).data("autohide")) {
2711    $(hash.w).data("autohide", $(hash.t).data("autohide"));
2712  }
2713  if (name == "order_product") {
2714    if ($(hash.t).data("product")) {
2715      $('input[name="PRODUCT"]').closest(".form-group").addClass("input-filed");
2716      $('input[name="PRODUCT"]')
2717        .val($(hash.t).data("product"))
2718        .attr("readonly", "readonly")
2719        .attr("title", $('input[name="PRODUCT"]').val());
2720    }
2721  }
2722  if (name == "question") {
2723    if ($(hash.t).data("product")) {
2724      $('input[name="NEED_PRODUCT"]').closest(".form-group").addClass("input-filed");
2725      $('input[name="NEED_PRODUCT"]')
2726        .val($(hash.t).data("product"))
2727        .attr("readonly", "readonly")
2728        .attr("title", $('input[name="NEED_PRODUCT"]').val());
2729    }
2730  }
2731
2732  //show one_click_buy block
2733  if (name === "ocb") {
2734    const parent = hash.w.find(".flexbox:not(.form-body__fields)");
2735    const item = _this.closest(".js-popup-block");
2736
2737    var data = item.find("[data-item]").data("item");
2738    if (typeof data === "undefined" || !data) {
2739      data = {};
2740    }
2741
2742    parent.addClass("flexbox--direction-row-reverse");
2743
2744    parent.find(".form.popup").addClass("flex-grow-1");
2745
2746    let goodsNode = '<div class="goods-popup">';
2747
2748    //image block
2749    let imageNode = '<div class="goods-popup__image image-list-wrapper">';
2750    //stiker
2751    if (item.find(".sticker").length) {
2752      imageNode += '<div class="sticker sticker--upper">';
2753      imageNode += item.find(".sticker").html();
2754      imageNode += "</div>";
2755    }
2756    //image
2757    imageNode += '<div class="image">';
2758    imageNode +=
2759      '<img class="img-responsive" src="' +
2760      (item.find("link[itemprop=image]").length
2761        ? item.find("link[itemprop=image]:first").attr("href")
2762        : item.find(".image-list-wrapper img:first").length
2763        ? item.find(".image-list-wrapper img:first").attr("src")
2764        : arAsproOptions.SITE_TEMPLATE_PATH + "/images/svg/noimage_product.svg") +
2765      '" />';
2766    imageNode += "</div>";
2767    imageNode += "</div>";
2768    goodsNode += imageNode;
2769
2770    //info block
2771    let infoNode = '<div class="goods-popup__info">';
2772    //link
2773    if (item.find(".js-popup-title").attr("href")) {
2774      infoNode +=
2775        '<a class="dark_link switcher-title goods-popup__info-link font_16" href="' +
2776        item.find(".js-popup-title").attr("href") +
2777        '">';
2778      infoNode += data ? data.NAME : item.find(".js-popup-title").html();
2779      infoNode += "</a>";
2780    } else {
2781      infoNode += '<div class="title-text switcher-title goods-popup__info-link font_16">';
2782      infoNode += data ? data.NAME : item.find(".js-popup-title").html();
2783      infoNode += "</div>";
2784    }
2785    //article
2786    if (item.find(".js-popup-info").length) {
2787      infoNode += '<div class="line-block line-block--gap line-block--gap-20 flexbox--wrap goods-popup__info-more">';
2788      infoNode += item.find(".js-popup-info").html();
2789      infoNode += "</div>";
2790    }
2791    infoNode += "</div>";
2792    goodsNode += infoNode;
2793
2794    //price block
2795    if (item.find(".js-popup-price .price").length) {
2796      let priceNode = '<div class="goods-popup__price">';
2797      priceNode += item.find(".js-popup-price").html();
2798      priceNode += "</div>";
2799      goodsNode += priceNode;
2800    }
2801
2802    goodsNode += "</div>";
2803
2804    $(goodsNode).appendTo(parent);
2805  }
2806
2807  if (name == "fast_view" && $(".smart-filter-filter").length) {
2808    var navButtons =
2809      '<div class="navigation-wrapper-fast-view">' +
2810      '<div class="fast-view-nav prev bg-theme-hover" data-fast-nav="prev">' +
2811      '<i class="svg left">' +
2812      '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6.969" viewBox="0 0 12 6.969"><path id="Rounded_Rectangle_702_copy_24" data-name="Rounded Rectangle 702 copy 24" class="cls-1" d="M361.691,401.707a1,1,0,0,1-1.414,0L356,397.416l-4.306,4.291a1,1,0,0,1-1.414,0,0.991,0.991,0,0,1,0-1.406l5.016-5a1.006,1.006,0,0,1,1.415,0l4.984,5A0.989,0.989,0,0,1,361.691,401.707Z" transform="translate(-350 -395.031)"/></svg>' +
2813      "</i>" +
2814      "</div>" +
2815      '<div class="fast-view-nav next bg-theme-hover" data-fast-nav="next">' +
2816      '<i class="svg right">' +
2817      '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6.969" viewBox="0 0 12 6.969"><path id="Rounded_Rectangle_702_copy_24" data-name="Rounded Rectangle 702 copy 24" class="cls-1" d="M361.691,401.707a1,1,0,0,1-1.414,0L356,397.416l-4.306,4.291a1,1,0,0,1-1.414,0,0.991,0.991,0,0,1,0-1.406l5.016-5a1.006,1.006,0,0,1,1.415,0l4.984,5A0.989,0.989,0,0,1,361.691,401.707Z" transform="translate(-350 -395.031)"/></svg>' +
2818      "</i>" +
2819      "</div>" +
2820      "</div>";
2821
2822    // hash.w.addClass("no_custom_scroll");
2823    hash.w.closest("#popup_iframe_wrapper").append(navButtons);
2824  }
2825  var needScrollbar = true;
2826
2827  if (
2828    arAsproOptions["THEME"]["REGIONALITY_SEARCH_ROW"] == "Y" &&
2829    (hash.w.hasClass("city_chooser_frame") || hash.w.hasClass("city_chooser_small_frame"))
2830  ) {
2831    hash.w.addClass("small_popup_regions");
2832    //hash.w.addClass("no_custom_scroll");
2833    hash.w.addClass("jqmWindow--overflow-visible");
2834    needScrollbar = false;
2835  }
2836  hash.w.addClass("show").css({ opacity: 1 });
2837  if (needScrollbar) hash.w.find(">div").addClass("scrollbar");
2838
2839  if (hash.w.hasClass("right_slide")) {
2840    hash.w.addClass("opened");
2841    if ($(".right-sidebar-wrapper").length) {
2842      if ($(".widget_frame iframe").length) {
2843        $(".widget_frame.right_slide").addClass("loading-state");
2844        $(".widget_frame iframe").on("load", function () {
2845          $(".widget_frame.right_slide").removeClass("loading-state");
2846        });
2847      }
2848
2849      if (hash.w.hasClass("narrow")) {
2850        if ($(".ajax_basket").length) {
2851          $(".ajax_basket").addClass("narrow");
2852        }
2853        if ($(".ajax_basket .fixed_wrapper").length) {
2854          $(".ajax_basket .fixed_wrapper").addClass("narrow");
2855        }
2856      }
2857      if (hash.w.hasClass("wide")) {
2858        if ($(".ajax_basket").length) {
2859          $(".ajax_basket").addClass("wide");
2860        }
2861      }
2862    }
2863    if ($(".ajax_basket").length) {
2864      $(".ajax_basket").css("z-index", "3000").addClass("widget_open");
2865    }
2866    if ($(hash.t).parent()) {
2867      $(hash.t).parent().addClass("active");
2868    }
2869    $(hash.t).addClass("jqm_disable");
2870
2871    if ($(hash.t).attr("data-show_slide") === "Y") {
2872      $(hash.t).parent().addClass("once_loaded");
2873    }
2874
2875    $(".ajax_basket").removeClass("opened");
2876  }
2877}
2878
2879function onHidejqm(name, hash) {
2880  if ($(hash.w).data("autohide")) {
2881    eval($(hash.w).data("autohide"));
2882  }
2883
2884  // hash.w.css('opacity', 0).hide();
2885  hash.w.animate({ opacity: 0 }, 200, function () {
2886    hash.w.removeClass("scroll-init srollbar-custom"); //.mCustomScrollbar("destroy");
2887    hash.w.hide();
2888    if (!$(".once_loaded").length) {
2889      hash.w.empty();
2890    }
2891    hash.o.remove();
2892    hash.w.removeClass("show");
2893    hash.w.removeClass("success");
2894
2895    if (!hash.w.closest("#popup_iframe_wrapper").find(".jqmOverlay").length) {
2896      $("body").css({ overflow: "", height: "" /*, "padding-right": ""*/ });
2897      hash.w.closest("#popup_iframe_wrapper").css({ "z-index": "", display: "" });
2898    }
2899
2900    if (window.matchMedia("(max-width: 991px)").matches) {
2901      $("body").removeClass("all_viewed");
2902    }
2903    if (!$(".jqmOverlay:not(.mobp)").length || $(".jqmOverlay.waiting").length) {
2904      $("body").removeClass("jqm-initied");
2905    }
2906
2907    $("body").removeClass("swipeignore");
2908    $("body").removeClass("overflow-block");
2909
2910    if (name == "fast_view") {
2911      $(".fast_view_popup").remove();
2912
2913      var navButtons = hash.w.closest("#popup_iframe_wrapper").find(".navigation-wrapper-fast-view");
2914      navButtons.remove();
2915    }
2916  });
2917
2918  if (hash.w.hasClass("right_slide")) {
2919    hash.w.removeClass("opened");
2920    if ($(".right-sidebar-wrapper").length) {
2921      $(".right-sidebar-wrapper").removeClass("opened");
2922      $(".right-sidebar-wrapper .link").removeClass("active");
2923      $(".widget_frame.right_slide").removeClass("loading-state");
2924      $(".right-sidebar-wrapper .link span").removeClass("jqm_disable");
2925    }
2926    if ($(".ajax_basket").length) {
2927      $(".ajax_basket").css("z-index", "").removeClass("widget_open").removeClass("wide").removeClass("narrow");
2928    }
2929  }
2930
2931  window.b24form = false;
2932}
2933
2934function parseUrlQuery() {
2935  var data = {};
2936  if (location.search) {
2937    var pair = location.search.substr(1).split("&");
2938    for (var i = 0; i < pair.length; i++) {
2939      var param = pair[i].split("=");
2940      data[param[0]] = param[1];
2941    }
2942  }
2943  return data;
2944}
2945
2946function scroll_block(block) {
2947  if (block.length) {
2948    var topPos = block.offset().top,
2949      headerH = $("header").outerHeight(true, true);
2950    if ($(".stores_tab").length) {
2951      $(".stores_tab").addClass("active").siblings().removeClass("active");
2952    } else {
2953      $(".prices_tab").addClass("active").siblings().removeClass("active");
2954      if ($(".prices_tab .opener").length && !$(".prices_tab .opener .opened").length) {
2955        var item = $(".prices_tab .opener").first();
2956        item.find(".opener_icon").addClass("opened");
2957        item.parents("tr").addClass("nb");
2958        item.parents("tr").next(".offer_stores").find(".stores_block_wrap").slideDown(200);
2959      }
2960    }
2961    $("html,body").animate({ scrollTop: topPos - 80 }, 150);
2962  }
2963}
2964
2965$.fn.jqmEx = function () {
2966  $(this).each(function () {
2967    var _this = $(this);
2968    var name = _this.data("name");
2969    name = typeof name === "undefined" || !name.length ? "noname" : name;
2970
2971    if (_this.attr("disabled") != "disabled" || !_this.hasClass("clicked")) {
2972      var extClass = "",
2973        paramsStr = "",
2974        trigger = "",
2975        arTriggerAttrs = {};
2976
2977      // call counter
2978      if (typeof $.fn.jqmEx.counter === "undefined") {
2979        $.fn.jqmEx.counter = 0;
2980      } else {
2981        ++$.fn.jqmEx.counter;
2982      }
2983
2984      // trigger attrs and params
2985      $.each(_this.get(0).attributes, function (index, attr) {
2986        var attrName = attr.nodeName;
2987        var attrValue = _this.attr(attrName);
2988        if (attrName !== "onclick") {
2989          trigger += "[" + attrName + '="' + attrValue + '"]';
2990          arTriggerAttrs[attrName] = attrValue;
2991        }
2992        if (/^data\-param\-(.+)$/.test(attrName)) {
2993          var key = attrName.match(/^data\-param\-(.+)$/)[1];
2994          paramsStr += key + "=" + attrValue + "&";
2995        }
2996      });
2997      var triggerAttrs = JSON.stringify(arTriggerAttrs);
2998      var encTriggerAttrs = "";
2999      // var encTriggerAttrs = encodeURIComponent(triggerAttrs);
3000      // console.log(trigger);
3001
3002      // popup url
3003      var script = arAsproOptions["SITE_DIR"] + "ajax/form.php";
3004      if (name == "auth") {
3005        script += "?" + paramsStr + "auth=Y";
3006      } else {
3007        script += "?" + paramsStr + 'data-trigger=""';
3008      }
3009
3010      // ext frame class
3011      if (_this.closest("#fast_view_item").length) {
3012        extClass = "fast_view_popup";
3013      }
3014
3015      if (_this.data("show_slide") == "Y") {
3016        extClass += " right_slide";
3017      }
3018
3019      if (_this.data("width")) {
3020        extClass += " " + _this.data("width");
3021      }
3022
3023      // use overlay?
3024      const modalParams = _this[0].dataset,
3025        bNoOverlay = modalParams && modalParams.noOverlay && modalParams.noOverlay === "Y",
3026        bShowSlide = modalParams && modalParams.show_slide && modalParams.show_slide === "Y",
3027        bShowOnce = modalParams && modalParams.once && modalParams.once === "Y";
3028
3029      const nodeFrame = `<div class="${name}_frame ${extClass} jqmWindow popup" data-popup="${$.fn.jqmEx.counter}" data-trigger="${encTriggerAttrs}"></div>`;
3030
3031      // unique frame to each trigger
3032      let frame = "";
3033      if (bShowSlide) {
3034        frame = $(nodeFrame).insertAfter(".right-sidebar-wrapper");
3035      } else if (bNoOverlay) {
3036        frame = $(nodeFrame).appendTo("body");
3037      } else {
3038        frame = $(nodeFrame).appendTo("#popup_iframe_wrapper");
3039      }
3040
3041      frame.jqm({
3042        ajax: script,
3043        trigger: trigger,
3044        noOverlay: bNoOverlay,
3045        once: bShowOnce,
3046        onLoad: function (hash) {
3047          onLoadjqm(name, hash, _this);
3048        },
3049        onHide: function (hash) {
3050          onHidejqm(name, hash, _this);
3051        },
3052      });
3053    }
3054    return;
3055  });
3056};
3057
3058InitOwlSlider = function () {
3059  $(".owl-carousel:not(.owl-loaded):not(.appear-block)").each(function () {
3060    var slider = $(this);
3061    var options;
3062    var svg =
3063      '<svg width="7" height="12" viewBox="0 0 7 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 1L1 6L6 11" stroke="#333333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';
3064    var defaults = {
3065      navText: [
3066        '<i class="owl-carousel__button owl-carousel__button--left colored_theme_bg_hover">' + svg + "</i>",
3067        '<i class="owl-carousel__button owl-carousel__button--right colored_theme_bg_hover">' + svg + "</i>",
3068      ],
3069      dotsContainer: slider.siblings(".owl-carousel__dots"),
3070    };
3071    var config = $.extend({}, defaults, options, slider.data("plugin-options"));
3072
3073    slider.siblings(".owl-carousel__dots").on("click", ".owl-carousel__dot", function () {
3074      var _this = $(this);
3075      var sliderData = slider.data("owl.carousel");
3076
3077      slider.trigger("to.owl.carousel", [_this.index(), 300]);
3078      if (sliderData.settings.autoplayHoverPause) {
3079        slider.trigger("mouseover.owl.autoplay");
3080      }
3081    });
3082
3083    if (slider.hasClass("destroyed")) {
3084      slider.owlCarousel(config);
3085      slider.removeClass("destroyed");
3086      return;
3087    }
3088
3089    slider.on("initialized.owl.carousel", function (event) {
3090      var eventdata = { slider: $(event.target), data: event };
3091
3092      BX.onCustomEvent("onSliderInitialized", [eventdata]);
3093      BX.onCustomEvent("onSlide", [eventdata]);
3094
3095      $(event.target).removeClass("loading-state");
3096      $(event.target).find(".owl-item:first").addClass("current");
3097
3098      if (typeof sliceItemBlockSlide === "function") {
3099        sliceItemBlockSlide();
3100      }
3101    });
3102
3103    // if slider was inited on animated scrolling to block, than need rescroll
3104    if ($("body.scrolling-state").length) {
3105      slider.on("initialized.owl.carousel", function (event) {
3106        setTimeout(function () {
3107          scrollToBlock.rescroll();
3108        }, 100);
3109      });
3110    }
3111
3112    slider.on("change.owl.carousel", function (event) {
3113      // var eventdata = {slider: $(event.target)};
3114      // BX.onCustomEvent('onSlide', [eventdata]);
3115    });
3116
3117    slider.owlCarousel(config);
3118
3119    slider.on("resized.owl.carousel", function (event) {
3120      if (typeof sliceItemBlockSlide === "function") {
3121        sliceItemBlockSlide({ resize: false });
3122      }
3123    });
3124
3125    slider.on("mouseover.owl.autoplay", function (event) {
3126      var slider = $(event.target).closest(".owl-carousel");
3127      var sliderData = slider.data("owl.carousel");
3128      var dots = slider.siblings(".owl-carousel__dots--autoplay");
3129      if (typeof sliderData !== "undefined") {
3130        var bNeedStopDotsAnimation =
3131          sliderData.settings.autoplay && sliderData.settings.autoplayHoverPause && dots.length;
3132        if (bNeedStopDotsAnimation) {
3133          var animationBlock = dots.find(".owl-carousel__dot .owl-carousel__dot-pie");
3134          if (animationBlock.length) {
3135            animationBlock.css("animation-play-state", "paused");
3136          }
3137        }
3138      }
3139    });
3140
3141    slider.on("mouseleave.owl.autoplay", function (event) {
3142      var slider = $(event.target).closest(".owl-carousel");
3143      var sliderData = slider.data("owl.carousel");
3144      var dots = slider.siblings(".owl-carousel__dots--autoplay");
3145      if (typeof sliderData !== "undefined") {
3146        var bNeedStopDotsAnimation =
3147          sliderData.settings.autoplay && sliderData.settings.autoplayHoverPause && dots.length;
3148        var rotating = sliderData._states.current.rotating;
3149        if (bNeedStopDotsAnimation && rotating) {
3150          var animationBlock = dots.find(".owl-carousel__dot .owl-carousel__dot-pie");
3151          if (animationBlock.length) {
3152            animationBlock.css("animation-play-state", "");
3153          }
3154        }
3155      }
3156    });
3157
3158    slider.on("stop.owl.autoplay", function (event) {
3159      var slider = $(event.target);
3160      var sliderData = slider.data("owl.carousel");
3161      var dots = slider.siblings(".owl-carousel__dots--autoplay");
3162      if (typeof sliderData !== "undefined") {
3163        var bNeedStopDotsAnimation =
3164          sliderData.settings.autoplay && sliderData.settings.autoplayHoverPause && dots.length;
3165        if (bNeedStopDotsAnimation) {
3166          var animationBlock = dots.find(".owl-carousel__dot .owl-carousel__dot-pie");
3167          if (animationBlock.length) {
3168            dots.find(".owl-carousel__dot.active").addClass("reset-animation");
3169            animationBlock.css("animation-play-state", "paused");
3170          }
3171        }
3172      }
3173    });
3174
3175    slider.on("play.owl.autoplay", function (event) {
3176      var slider = $(event.target);
3177      var sliderData = slider.data("owl.carousel");
3178      var dots = slider.siblings(".owl-carousel__dots--autoplay");
3179      if (typeof sliderData !== "undefined") {
3180        var bNeedStopDotsAnimation =
3181          sliderData.settings.autoplay && sliderData.settings.autoplayHoverPause && dots.length;
3182        dots.find(".owl-carousel__dot.reset-animation").removeClass("reset-animation");
3183        if (bNeedStopDotsAnimation && !slider.is(":hover") && !dots.is(":hover")) {
3184          var animationBlock = dots.find(".owl-carousel__dot .owl-carousel__dot-pie");
3185          if (animationBlock.length) {
3186            animationBlock.css("animation-play-state", "");
3187          }
3188        }
3189      }
3190    });
3191
3192    slider.on("touchstart.owl.core", function (event) {
3193      slider.trigger("stop.owl.autoplay");
3194    });
3195
3196    slider.siblings(".owl-carousel__dots--autoplay").on("mouseover", function (event) {
3197      var sliderData = slider.data("owl.carousel");
3198      if (sliderData.settings.autoplayHoverPause) {
3199        slider.trigger("mouseover.owl.autoplay");
3200      }
3201    });
3202
3203    slider.on("changed.owl.carousel", function (event) {
3204      var $slider = $(event.target);
3205      var sliderData = $slider.data("owl.carousel");
3206      var pluginOptions = $slider.data("pluginOptions");
3207
3208      var eventdata = { slider: $slider, data: event };
3209      BX.onCustomEvent("onSlide", [eventdata]);
3210
3211      if (pluginOptions) {
3212        // click .ajax_load_btn
3213        if ($slider.parent().find(".ajax_load_btn").length) {
3214          if (sliderData._current + 1 + sliderData.settings.items >= sliderData._items.length) {
3215            $slider.parent().find(".ajax_load_btn").trigger("click");
3216          }
3217        }
3218        if (typeofExt(pluginOptions) === "object") {
3219          if ("index" in pluginOptions) {
3220            if ($(".gallery-view_switch").length) {
3221              $(".gallery-view_switch__count-wrapper--big .gallery-view_switch__count-value").text(
3222                event.item.index + 1 + "/" + event.item.count
3223              );
3224            }
3225          }
3226
3227          if ("relatedTo" in pluginOptions) {
3228            var relatedClass = pluginOptions.relatedTo,
3229              relatedBlock = $(relatedClass);
3230
3231            if (relatedBlock.length && sliderData) {
3232              if (!sliderData.loop) {
3233                var current = event.item.index;
3234              } else {
3235                var count = event.item.count - 1;
3236                var current = Math.round(event.item.index - event.item.count / 2 - 0.5);
3237
3238                if (current < 0) current = count;
3239
3240                if (current > count) current = 0;
3241              }
3242
3243              relatedBlock.find(".owl-item").removeClass("current").eq(current).addClass("current");
3244
3245              var onscreen = relatedBlock.find(".owl-item.active").length - 1;
3246              var start = relatedBlock.find(".owl-item.active").first().index();
3247              var end = relatedBlock.find(".owl-item.active").last().index();
3248
3249              if (current > end) relatedBlock.data("owl.carousel").to(current, 100, true);
3250
3251              if (current < start) relatedBlock.data("owl.carousel").to(current - onscreen, 100, true);
3252              // $(".owl-slider-"+id).trigger('to.owl.carousel', [itemCarousel])
3253            }
3254          }
3255        }
3256      }
3257    });
3258
3259    slider.on("translated.owl.carousel", function (event) {});
3260
3261    if ("clickTo" in config) {
3262      var relatedClass = config.clickTo,
3263        magnifier = "magnifier" in config;
3264
3265      slider.on("click", ".owl-item", function (e) {
3266        e.preventDefault();
3267        var _this = $(this),
3268          number = _this.index();
3269
3270        if (magnifier) {
3271          if ($(relatedClass).closest(".product-container").find(".zoom_picture").length) {
3272            $(relatedClass)
3273              .closest(".product-container")
3274              .find(".zoom_picture")
3275              .attr("data-large", _this.find(".product-detail-gallery__item").data("big"));
3276            $(relatedClass)
3277              .closest(".product-container")
3278              .find(".zoom_picture")
3279              .attr("xoriginal", _this.find(".product-detail-gallery__item").data("big"));
3280            $(relatedClass)
3281              .closest(".product-container")
3282              .find(".zoom_picture")
3283              .attr("src", _this.find(".product-detail-gallery__item img").attr("src"));
3284          }
3285          _this.siblings("").removeClass("current");
3286          _this.addClass("current");
3287        } else {
3288          $(relatedClass).data("owl.carousel").to(number, 300, true);
3289        }
3290      });
3291    }
3292  });
3293};
3294
3295InitFlexSlider = function () {
3296  $(".flexslider:not(.thmb):not(.flexslider-init):not(.appear-block):visible").each(function () {
3297    var slider = $(this);
3298    var options;
3299    var defaults = {
3300      animationLoop: false,
3301      controlNav: false,
3302      directionNav: true,
3303      animation: "slide",
3304    };
3305    var config = $.extend({}, defaults, options, slider.data("plugin-options"));
3306    if (typeof config.counts != "undefined" && config.direction !== "vertical") {
3307      var slide_counts = "";
3308      if (typeof slider.data("plugin-options") != "undefined") {
3309        if ("slide_counts" in slider.data("plugin-options")) slide_counts = slider.data("plugin-options").slide_counts;
3310      }
3311      config.maxItems = getGridSize(config.counts);
3312      config.minItems = getGridSize(config.counts);
3313
3314      if (slide_counts) config.move = slide_counts;
3315      else config.move = getGridSize(config.counts);
3316
3317      config.itemWidth = 200;
3318    }
3319
3320    // custom direction nav
3321    if (typeof config.customDirection != "undefined") config.customDirectionNav = $(config.customDirection);
3322
3323    (config.prevText = BX.message("FANCY_PREV")), //String: Set the text for the "previous" directionNav item
3324      (config.nextText = BX.message("FANCY_NEXT")),
3325      (config.after = config.start =
3326        function (slider) {
3327          var eventdata = { slider: slider };
3328          BX.onCustomEvent("onSlide", [eventdata]);
3329        });
3330
3331    config.before = function (slider) {
3332      var eventdata = { slider: slider };
3333      BX.onCustomEvent("onSlideBefore", [eventdata]);
3334    };
3335
3336    config.end = function (slider) {
3337      var eventdata = { slider: slider };
3338      BX.onCustomEvent("onSlideEnd", [eventdata]);
3339    };
3340
3341    /*if(typeof(config.nav) == 'undefined')
3342			slider.addClass('dark-nav');*/
3343    slider.flexslider(config).addClass("flexslider-init");
3344    if (config.controlNav) slider.addClass("flexslider-control-nav");
3345    if (config.directionNav) slider.addClass("flexslider-direction-nav");
3346  });
3347};
3348
3349InitFlexSliderClass = function (class_name) {
3350  //$('.flexslider:not(.thmb):not(.flexslider-init)').each(function(){
3351
3352  var slider = $(class_name);
3353  var options;
3354  var defaults = {
3355    animationLoop: false,
3356    controlNav: false,
3357    directionNav: true,
3358    animation: "slide",
3359  };
3360  var config = $.extend({}, defaults, options, slider.data("plugin-options"));
3361
3362  var slide_counts = "";
3363  if (typeof slider.data("plugin-options") != "undefined") {
3364    if ("slide_counts" in slider.data("plugin-options")) slide_counts = slider.data("plugin-options").slide_counts;
3365  }
3366
3367  if (typeof config.counts != "undefined" && config.direction !== "vertical") {
3368    config.maxItems = getGridSize(config.counts);
3369    config.minItems = getGridSize(config.counts);
3370    config.move = getGridSize(config.counts);
3371
3372    config.itemWidth = 200;
3373  }
3374  if (slide_counts) config.move = slide_counts;
3375
3376  // custom direction nav
3377  if (typeof config.customDirection != "undefined") config.customDirectionNav = $(config.customDirection);
3378
3379  (config.prevText = BX.message("FANCY_PREV")), //String: Set the text for the "previous" directionNav item
3380    (config.nextText = BX.message("FANCY_NEXT")),
3381    (config.after = config.start =
3382      function (slider) {
3383        var eventdata = { slider: slider };
3384        BX.onCustomEvent("onSlide", [eventdata]);
3385      });
3386
3387  config.before = function (slider) {
3388    var eventdata = { slider: slider };
3389    BX.onCustomEvent("onSlideBefore", [eventdata]);
3390  };
3391
3392  config.end = function (slider) {
3393    var eventdata = { slider: slider };
3394    BX.onCustomEvent("onSlideEnd", [eventdata]);
3395  };
3396
3397  slider.flexslider(config).addClass("flexslider-init");
3398  if (config.controlNav) slider.addClass("flexslider-control-nav");
3399  if (config.directionNav) slider.addClass("flexslider-direction-nav");
3400  //});
3401};
3402
3403InitFlexSliderMin = function () {
3404  $(".bxSlider.top-small").on("mousedown", ".slides li", function () {
3405    var index = $(this).data("slide_key");
3406    $(this).siblings().removeClass("flex-active-slide");
3407    $(this).addClass("flex-active-slide");
3408    $(this)
3409      .siblings('[data-slide_key="' + index + '"]')
3410      .addClass("flex-active-slide");
3411    $(".top-bigs").data("flexslider").flexAnimate(index);
3412  });
3413};
3414
3415SliceHeightBlocks = function () {
3416  $('*[data-slice="Y"]').each(function () {
3417    var slice_els = $(this).find('*[data-slice-block="Y"]');
3418    if (slice_els.length) {
3419      var slice_params = {};
3420      if (slice_els.data("slice-params")) slice_params = slice_els.data("slice-params");
3421      slice_els.sliceHeight(slice_params);
3422    }
3423  });
3424};
3425
3426createTableCompare = function (originalTable, appendDiv, cloneTable) {
3427  try {
3428    if ($(".tarifs .head-block:visible").length) {
3429      var clone = originalTable.clone().addClass("clone");
3430      if (cloneTable.length) {
3431        cloneTable.remove();
3432        appendDiv.html("");
3433        appendDiv.html(clone);
3434      } else {
3435        appendDiv.append(clone);
3436      }
3437    }
3438  } catch (e) {
3439  } finally {
3440  }
3441};
3442
3443/*
3444InitTopestMenuGummi = function () {
3445  if (!isOnceInited) {
3446    function _init() {
3447      var arItems = $menuTopest.find(".menu-topest__item");
3448      var cntItems = arItems.length;
3449      if (cntItems) {
3450        var itemsWidth = 0;
3451        for (var i = 0; i < cntItems; ++i) {
3452          var item = arItems.eq(i);
3453          var itemWidth = item.actual("outerWidth", { includeMargin: true });
3454
3455          arItemsHideWidth[i] = (itemsWidth += itemWidth) + (i == cntItems - 1 ? 0 : moreWidth);
3456        }
3457      }
3458    }
3459
3460    function _gummi() {
3461      var rowWidth = $menuTopest.actual("innerWidth");
3462      var arItems = $menuTopest.find(".menu-topest__item");
3463      var cntItems = arItems.length;
3464      var arItemsToRemove = [];
3465
3466      if (cntItems) {
3467        var bMore = false;
3468        var moreItems = [];
3469        for (var i = cntItems - 1; i >= 0; --i) {
3470          var item = arItems.eq(i);
3471          var bInMore = item.parents(".menu-topest__more").length > 0;
3472          if (!bInMore) {
3473            if (arItemsHideWidth[i] > rowWidth + 1) {
3474              if (!bMore) {
3475                bMore = true;
3476                more.removeClass("hidden");
3477              }
3478              var clone = item.clone();
3479              clone.find(">a").addClass("dark_font");
3480              moreItems.push(clone[0]);
3481              arItemsToRemove.push(i);
3482            } else {
3483              break;
3484            }
3485          }
3486        }
3487        $(moreItems).prependTo(moreDropdown);
3488
3489        if (!bMore) {
3490          for (var i = 0; i < cntItems; ++i) {
3491            var item = arItems.eq(i);
3492            var bInMore = item.parents(".menu-topest__more li").length > 0;
3493            if (bInMore) {
3494              if (arItemsHideWidth[i] <= rowWidth) {
3495                if (i === cntItems - 1) {
3496                  bMore = false;
3497                  more.addClass("hidden");
3498                }
3499                var clone = item.clone();
3500                clone.find(">a").removeClass("dark_font");
3501                clone.insertBefore(more);
3502                item.addClass("cloned");
3503              }
3504            }
3505          }
3506        }
3507
3508        if (arItemsToRemove.length) {
3509          arItemsToRemove.map(function (elIndex) {
3510            $(arItems[elIndex]).remove();
3511          });
3512        }
3513
3514        $menuTopest.find(".menu-topest__item.cloned").remove();
3515        $menuTopest.closest(".menu-topest__wrapper").addClass("dotted-complete");
3516        var wrapper = $menuTopest.closest(".hide-dotted");
3517        if (wrapper.length) {
3518          wrapper.addClass("dotted-complete");
3519        }
3520      }
3521    }
3522
3523    var $menuTopest = $(".menu-topest");
3524    if ($menuTopest.length) {
3525      var more = $menuTopest.find(".menu-topest__more");
3526      var moreDropdown = more.find(">.dropdown");
3527      var moreWidth = more.actual("outerWidth", { includeMargin: true });
3528      var arItemsHideWidth = [];
3529
3530      ignoreResize.push(true);
3531      _init();
3532      _gummi();
3533      ignoreResize.pop();
3534
3535      BX.addCustomEvent("onWindowResize", function (eventdata) {
3536        try {
3537          ignoreResize.push(true);
3538          _gummi();
3539        } catch (e) {
3540        } finally {
3541          ignoreResize.pop();
3542        }
3543      });
3544    }
3545  }
3546};
3547*/
3548
3549CheckHeaderFixedMenu = function () {
3550  /*if (
3551    arAsproOptions["THEME"]["HEADER_FIXED"] == 2 &&
3552    $("#headerfixed .js-nav").length &&
3553    window.matchMedia("(min-width: 992px)").matches
3554  ) {
3555    $("#headerfixed .js-nav").css("width", "0");
3556    var all_width = 0,
3557      cont_width = $("#headerfixed .maxwidth-theme").actual("width"),
3558      padding_menu =
3559        $("#headerfixed .logo-row.v2 .menu-block").actual("outerWidth") -
3560        $("#headerfixed .logo-row.v2 .menu-block").actual("width");
3561    $("#headerfixed .logo-row.v2 > .inner-table-block").each(function () {
3562      if (!$(this).hasClass("menu-block")) all_width += $(this).actual("outerWidth");
3563    });
3564    $("#headerfixed .js-nav").width(cont_width - all_width - padding_menu);
3565  }*/
3566};
3567
3568/*function CheckTopMenuPadding() {
3569  if ($(".logo_and_menu-row .right-icons .wrap_icon").length && $(".logo_and_menu-row .menu-row").length) {
3570    var menuPosition = $(".menu-row .menu-only").position().left,
3571      maxWidth = $(".logo_and_menu-row .maxwidth-theme").width() - 32,
3572      leftPadding = 0,
3573      rightPadding = 0;
3574
3575    $(".logo_and_menu-row .menu-row>div")
3576      .each(function (indx) {
3577        if (!$(this).hasClass("menu-only")) {
3578          var elementPosition = $(this).position().left,
3579            elementWidth = $(this).outerWidth();
3580
3581          if (elementPosition > menuPosition) {
3582            rightPadding += elementWidth;
3583          } else {
3584            leftPadding += elementWidth;
3585          }
3586        }
3587      })
3588      .promise()
3589      .done(function () {
3590        $(".logo_and_menu-row .menu-only").css({ "padding-left": leftPadding, "padding-right": rightPadding + 1 });
3591      });
3592  }
3593};*/
3594
3595/*function CheckTopMenuOncePadding() {
3596  if ($(".menu-row.sliced .right-icons .wrap_icon").length) {
3597    var menuPosition = $(".menu-row .menu-only").position().left,
3598      maxWidth = $(".logo_and_menu-row .maxwidth-theme").width() - 32,
3599      leftPadding = 0,
3600      rightPadding = 0;
3601
3602    $(".menu-row.sliced .maxwidth-theme>div>div")
3603      .each(function (indx) {
3604        if (!$(this).hasClass("menu-only")) {
3605          var elementPosition = $(this).position().left,
3606            elementWidth = $(this).outerWidth();
3607
3608          if (elementPosition > menuPosition) {
3609            rightPadding += elementWidth;
3610          } else {
3611            leftPadding += elementWidth;
3612          }
3613        }
3614      })
3615      .promise()
3616      .done(function () {
3617        $(".menu-row.sliced .menu-only").css({ "padding-left": leftPadding, "padding-right": rightPadding + 1 });
3618      });
3619  }
3620};
3621*/
3622
3623/*
3624CheckSearchWidth = function () {
3625  if ($(".logo_and_menu-row .search_wrap").length) {
3626    var searchPosition = $(".logo_and_menu-row .search_wrap").position().left,
3627      maxWidth = $(".logo_and_menu-row .maxwidth-theme").width() - 32;
3628    width = 0;
3629
3630    $(".logo_and_menu-row .maxwidth-theme>div")
3631      .each(function () {
3632        if (!$(this).hasClass("search_wrap")) {
3633          var elementWidth = $(this).outerWidth();
3634
3635          width = width ? width - elementWidth : maxWidth - elementWidth;
3636        }
3637      })
3638      .promise()
3639      .done(function () {
3640        $(".logo_and_menu-row .search_wrap").outerWidth(width).css({ opacity: 1, visibility: "visible" });
3641      });
3642  }
3643};
3644*/
3645
3646waitCounter = function (idCounter, delay, callback) {
3647  var obCounter = window["yaCounter" + idCounter];
3648  if (typeof obCounter == "object") {
3649    if (typeof callback == "function") callback();
3650  } else {
3651    setTimeout(function () {
3652      waitCounter(idCounter, delay, callback);
3653    }, delay);
3654  }
3655};
3656
3657waitYTPlayer = function (delay, callback) {
3658  if (typeof YT !== "undefined" && YT && YT.Player) {
3659    if (typeof callback == "function") callback();
3660  } else {
3661    setTimeout(function () {
3662      waitYTPlayer(delay, callback);
3663    }, delay);
3664  }
3665};
3666
3667var scrollToTopAnimateClassIn = false;
3668var scrollToTopAnimateClassOut = false;
3669
3670var $body = {};
3671var $scrolltotop = {};
3672var isOnceInited = false;
3673
3674if (navigator.userAgent.indexOf("Edge") != -1) document.documentElement.className += " edge";
3675
3676initFull = function () {
3677  checkMobileRegion();
3678};
3679
3680var isFrameDataReceived = false;
3681if (typeof window.frameCacheVars !== "undefined") {
3682  BX.addCustomEvent(window, "onFrameDataRequestFail", function (response) {
3683    // console.log(response);
3684  });
3685
3686  BX.addCustomEvent("onFrameDataReceivedBefore", function () {
3687    // stop ya metrika webvisor DOM indexer
3688    pauseYmObserver();
3689  });
3690
3691  BX.addCustomEvent("onFrameDataReceived", function (json) {
3692    initFull();
3693
3694    // resume ya metrika webvisor
3695    // (100ms sliceHeight) + (200ms mCustomScroll) + (100ms lazyload)
3696    setTimeout(resumeYmObserver, 400);
3697
3698    isFrameDataReceived = true;
3699  });
3700} else {
3701  $(document).ready(initFull);
3702}
3703
3704scrollPreviewBlock = function () {
3705  scrollToBlock($.cookie("scroll_block"));
3706  $.cookie("scroll_block", null);
3707};
3708
3709checkMobileRegion = function () {
3710  if ($(".confirm_region").length) {
3711    if (!$(".top_mobile_region").length)
3712      $('<div class="top_mobile_region"><div class="confirm_region"></div></div>').insertBefore($(".body"));
3713    $(".top_mobile_region .confirm_region").html($(".regions .confirm_region").html());
3714  }
3715};
3716
3717$(document).on("click", ".map-items__item", function () {
3718  var _this = $(this),
3719    itemID = _this.data("id"),
3720    animationTime = 200;
3721
3722  _this.closest(".map-wrapper").find(".index-block__subtitle").addClass("hidden");
3723  _this.closest(".map-wrapper").find(".index-block__title-wrapper").addClass("hidden");
3724  _this.closest(".map-wrapper").find(".index-block__preview").addClass("hidden");
3725
3726  _this.closest(".map-container").find(" > .map-detail-items__item-svg").fadeIn(animationTime);
3727
3728  _this.closest(".map-items").fadeOut(animationTime, function () {
3729    _this.closest(".map-container").find(".map-detail-items").fadeIn(animationTime);
3730    _this
3731      .closest(".map-container")
3732      .find(".map-detail-items .map-detail-items__item[data-id=" + itemID + "]")
3733      .fadeIn(animationTime);
3734
3735    var arCoordinates = _this.data("coordinates").split(",");
3736
3737    if (typeof map === "object" && map !== null && "setCenter" in map) {
3738      if ($(".bx-google-map").length) {
3739        map.setCenter({ lat: +arCoordinates[0], lng: +arCoordinates[1] });
3740        map.setZoom(17);
3741      } else {
3742        map.setCenter([arCoordinates[0], arCoordinates[1]], 15);
3743      }
3744    }
3745  });
3746});
3747
3748$(document).on("click", ".map-detail-items__item-svg", function () {
3749  var _this = $(this).closest(".map-container").find(".map-detail-items__item:visible"),
3750    animationTime = 200;
3751
3752  _this.fadeOut(animationTime);
3753
3754  _this.closest(".map-container").find(" > .map-detail-items__item-svg").fadeOut(10);
3755
3756  _this
3757    .closest(".map-container")
3758    .find(".map-detail-items")
3759    .fadeOut(animationTime, function () {
3760      _this.closest(".map-container").find(".map-items").fadeIn(animationTime);
3761
3762      _this.closest(".map-wrapper").find(".index-block__subtitle").removeClass("hidden");
3763      _this.closest(".map-wrapper").find(".index-block__title-wrapper").removeClass("hidden");
3764      _this.closest(".map-wrapper").find(".index-block__preview").removeClass("hidden");
3765
3766      if (typeof map === "object" && map !== null) {
3767        if (typeof clusterer === "object" && clusterer !== null && "setBounds" in map && "getBounds" in clusterer) {
3768          map.setBounds(clusterer.getBounds(), {
3769            zoomMargin: 40,
3770            // checkZoomRange: true
3771          });
3772        } else if (typeof bounds === "object" && bounds !== null && "fitBounds" in map && "getCenter" in bounds) {
3773          map.fitBounds(bounds);
3774        }
3775      }
3776    });
3777});
3778
3779$(document).ready(function () {
3780  scrollToTop();
3781  // InitScrollBar();
3782  initCountdown();
3783
3784  // ripple effect for buttons
3785  $.ripple(".btn:not(.btn--no-rippple)", {
3786    debug: false, // Turn Ripple.js logging on/off
3787    on: "mouseenter", // The event to trigger a ripple effect
3788    opacity: 0.4, // The opacity of the ripple
3789    color: "auto", // Set the background color. If set to "auto", it will use the text color
3790    multi: true, // Allow multiple ripples per element
3791    duration: 0.6, // The duration of the ripple
3792    easing: "linear", // The CSS3 easing function of the ripple
3793  });
3794
3795  if (!jQuery.browser.safari) {
3796    // CheckTopMenuPadding();
3797    // CheckTopMenuOncePadding();
3798    CheckHeaderFixed();
3799    CheckTopMenuDotted();
3800    // MegaMenuFixed();
3801    // CheckSearchWidth();
3802    // InitTopestMenuGummi();
3803    isOnceInited = true;
3804    /*
3805    setTimeout(function () {
3806      $(window).resize(); // need to check resize flexslider & menu
3807    }, 350);
3808    */
3809
3810    // need to check position fixed ask block
3811    /* setTimeout(function () {
3812      $(window).scroll();
3813    }, 250);  */
3814  } else {
3815    setTimeout(function () {
3816      // need to check resize flexslider & menu
3817      // $(window).resize();
3818
3819      setTimeout(function () {
3820        // CheckTopMenuPadding();
3821        // CheckTopMenuOncePadding();
3822        CheckHeaderFixed();
3823        CheckTopMenuDotted();
3824        // MegaMenuFixed();
3825        // CheckSearchWidth();
3826        // InitTopestMenuGummi();
3827        isOnceInited = true;
3828
3829        /* setTimeout(function () {
3830          $(window).scroll();
3831        }, 50); */
3832      }, 50);
3833    }, 350);
3834  }
3835
3836  if (arAsproOptions["THEME"]["USE_DEBUG_GOALS"] === "Y") {
3837    $.cookie("_ym_debug", "1");
3838  } else {
3839    $.cookie("_ym_debug", null);
3840  }
3841
3842  //  --- Bind mobile menu  ---
3843  var $mobileMenu = $("#mobilemenu");
3844  if ($mobileMenu.length) {
3845    $mobileMenu.isOpen = $mobileMenu.hasClass("show");
3846    $mobileMenu.isLeftSide = $("body").hasClass("mmenu_leftside");
3847    $mobileMenuNlo = $mobileMenu.find("[data-nlo]");
3848
3849    $(document).on("click", ".js-burger", function () {
3850      SwipeMobileMenu();
3851      CloseMobilePhone();
3852    });
3853
3854    $(document).on("click", ".mobilemenu__close", function () {
3855      CloseMobileMenu();
3856      $(".mobilemenu__menu-item").removeClass("mobilemenu__menu-item--expanded");
3857    });
3858
3859    $(document).on("click", ".mobilemenu__menu .toggle_block", function (e) {
3860      var $this = $(this);
3861      var $item = $this.closest(".mobilemenu__menu-item");
3862
3863      if ($item.hasClass("mobilemenu__menu-item--parent")) {
3864        e.preventDefault();
3865
3866        $item.addClass("mobilemenu__menu-item--expanded");
3867        MoveMobileMenuWrapNext();
3868      }
3869    });
3870
3871    $(document).on("click", ".mobilemenu__menu .mobilemenu__menu-item--back-text", function (e) {
3872      var $this = $(this);
3873      var $item = $this.closest(".mobilemenu__menu-item");
3874
3875      MoveMobileMenuWrapPrev();
3876      setTimeout(function () {
3877        $item.closest(".mobilemenu__menu-item--expanded").removeClass("mobilemenu__menu-item--expanded");
3878      }, 400);
3879    });
3880
3881    $(document).on("click", ".mobilemenu__menu a", function (e) {
3882      var $this = $(this);
3883      var $item = $this.closest(".mobilemenu__menu-item");
3884
3885      if ($item.hasClass("mobilemenu__menu-item--back")) {
3886        e.preventDefault();
3887
3888        MoveMobileMenuWrapPrev();
3889        setTimeout(function () {
3890          $item.closest(".mobilemenu__menu-item--expanded").removeClass("mobilemenu__menu-item--expanded");
3891        }, 400);
3892      } else {
3893        var href = $this.attr("href");
3894        if (typeof href !== "undefined") {
3895          if (href.length) {
3896            window.location.href = href;
3897            //window.location.reload();
3898          } else {
3899            if ($item.hasClass("mobilemenu__menu-item--parent")) {
3900              e.preventDefault();
3901
3902              $item.addClass("mobilemenu__menu-item--expanded");
3903              MoveMobileMenuWrapNext();
3904
3905              return;
3906            } else if ($item.hasClass("mobilemenu__menu-item--title")) {
3907              e.preventDefault();
3908
3909              return;
3910            }
3911          }
3912        }
3913
3914        CloseMobileMenu();
3915      }
3916    });
3917
3918    if ($mobileMenu.isLeftSide) {
3919      $mobileMenu.parent().append('<div class="mobilemenu__overlay"></div>');
3920      var $mobileMenuOverlay = $(".mobilemenu__overlay");
3921
3922      $mobileMenuOverlay.click(function () {
3923        if ($mobileMenu.isOpen) {
3924          CloseMobileMenu();
3925        }
3926      });
3927    } else {
3928      $(document).on("click", "#mobileheader", function (e) {
3929        if (
3930          !$(e.target).closest("#mobilemenu").length &&
3931          !$(e.target).closest(".js-burger").length &&
3932          $mobileMenu.isOpen
3933        ) {
3934          CloseMobileMenu();
3935        }
3936      });
3937    }
3938
3939    OpenMobileMenu = function () {
3940      if (!$mobileMenu.isOpen /* && window.matchMedia("(max-width: 991px)").matches*/) {
3941        // hide styleswitcher
3942        if ($(".style-switcher").hasClass("active")) {
3943          $(".style-switcher .switch").trigger("click");
3944        }
3945        $(".style-switcher .switch").hide();
3946        $(".style-switcher .switch_presets").hide();
3947
3948        if ($mobileMenu.isLeftSide) {
3949          setTimeout(function () {
3950            // hide body scroll
3951            $("body").addClass("overflow-block");
3952
3953            // blur body
3954            $("#mobileheader").addClass("filter-none");
3955            $("#mobilemenu").addClass("filter-none");
3956            $("body").addClass("jqm-initied");
3957
3958            // show overlay
3959            $mobileMenuOverlay.fadeIn("fast");
3960          }, 100);
3961        } else {
3962          // hide body scroll
3963          $("body").addClass("overflow-block");
3964
3965          // set menu top = bottom of header
3966          $mobileMenu.css({
3967            top: +($("#mobileheader")[0].getBoundingClientRect().top + $("#mobileheader").height()) + "px",
3968          });
3969
3970          // change burger icon
3971          // $('#mobileheader .burger').addClass('c');
3972        }
3973
3974        // show menu
3975        $mobileMenu.addClass("show");
3976        $mobileMenu.isOpen = true;
3977
3978        var $inner = $mobileMenu.find(".mobilemenu__inner");
3979        var params = $inner.data("params");
3980        if (typeof params === "undefined") {
3981          params = {
3982            depth: 0,
3983            scroll: {},
3984            height: {},
3985          };
3986        }
3987        $inner.data("params", params);
3988
3989        if ($mobileMenuNlo.length) {
3990          if (!$mobileMenuNlo.hasClass("nlo-loadings")) {
3991            $mobileMenuNlo.addClass("nlo-loadings");
3992            setTimeout(function () {
3993              $.ajax({
3994                data: { nlo: $mobileMenuNlo.attr("data-nlo") },
3995                error: function () {
3996                  $mobileMenuNlo.removeClass("nlo-loadings");
3997                },
3998                complete: function (jqXHR, textStatus) {
3999                  if (textStatus === "success" || jqXHR.status == 404) {
4000                    var ob = BX.processHTML($.trim(jqXHR.responseText));
4001                    BX.ajax.processScripts(ob.SCRIPT);
4002                    $mobileMenuNlo.replaceWith(ob.HTML);
4003                  }
4004                },
4005              });
4006            }, 300);
4007          }
4008        }
4009      }
4010    };
4011
4012    CloseMobileMenu = function () {
4013      if ($mobileMenu.isOpen) {
4014        // hide menu
4015        $mobileMenu.removeClass("show");
4016        $mobileMenu.isOpen = false;
4017
4018        // show styleswitcher
4019        $(".style-switcher .switch").show();
4020        $(".style-switcher .switch_presets").show();
4021
4022        if ($mobileMenu.isLeftSide) {
4023          setTimeout(function () {
4024            // hide overlay
4025            $mobileMenuOverlay.fadeOut("fast");
4026
4027            // show body scroll
4028            $("body").removeClass("overflow-block");
4029
4030            // unblur body
4031            $("body").removeClass("jqm-initied");
4032            $("#mobilemenu").removeClass("filter-none");
4033            $("#mobileheader").removeClass("filter-none");
4034          }, 100);
4035        } else {
4036          // change burger icon
4037          // $('#mobileheader .burger').removeClass('c');
4038
4039          // show body scroll
4040          $("body").removeClass("overflow-block");
4041        }
4042
4043        setTimeout(function () {
4044          var $scroller = $mobileMenu.find(".mobilemenu");
4045          var $inner = $mobileMenu.find(".mobilemenu__inner");
4046          var params = $inner.data("params");
4047          params.depth = 0;
4048          $inner.data("params", params).attr("style", "");
4049          $mobileMenu.scrollTop(0);
4050          $scroller.css("height", "");
4051        }, 400);
4052      }
4053    };
4054
4055    SwipeMobileMenu = function () {
4056      if ($mobileMenu.isOpen) {
4057        CloseMobileMenu();
4058      } else {
4059        OpenMobileMenu();
4060      }
4061    };
4062
4063    CheckMobileMenu = function () {};
4064
4065    function MoveMobileMenuWrapNext() {
4066      var $scroller = $mobileMenu.find(".mobilemenu");
4067      var $inner = $mobileMenu.find(".mobilemenu__inner");
4068      if ($inner.length) {
4069        var params = $inner.data("params");
4070        var $dropdownNext = $mobileMenu
4071          .find(".mobilemenu__menu-item--expanded>.mobilemenu__menu-dropdown")
4072          .eq(params.depth);
4073        if ($dropdownNext.length) {
4074          // save scroll position
4075          params.scroll[params.depth] = parseInt($mobileMenu.scrollTop());
4076
4077          // height while move animating
4078          params.height[params.depth + 1] = Math.max(
4079            $dropdownNext.height(),
4080            !params.depth
4081              ? $inner.height()
4082              : $mobileMenu
4083                  .find(".mobilemenu__menu-item--expanded>.mobilemenu__menu-dropdown")
4084                  .eq(params.depth - 1)
4085                  .outerHeight()
4086          );
4087          $scroller.css("height", params.height[params.depth + 1] + "px");
4088
4089          // inc depth
4090          ++params.depth;
4091
4092          // translateX for move
4093          $inner.css("transform", "translateX(" + -100 * params.depth + "%)");
4094
4095          // scroll to top
4096          setTimeout(function () {
4097            $mobileMenu.animate({ scrollTop: 0 }, 200);
4098          }, 100);
4099
4100          // height on enimating end
4101          var h =
4102            $dropdownNext.height() +
4103            parseInt($dropdownNext.css("padding-top")) +
4104            parseInt($dropdownNext.css("padding-bottom"));
4105          setTimeout(function () {
4106            if (h) {
4107              $scroller.css("height", h + "px");
4108            } else {
4109              $scroller.css("height", "");
4110            }
4111          }, 200);
4112        }
4113
4114        $inner.data("params", params);
4115      }
4116    }
4117
4118    function MoveMobileMenuWrapPrev() {
4119      var $scroller = $mobileMenu.find(".mobilemenu");
4120      var $inner = $mobileMenu.find(".mobilemenu__inner");
4121      if ($inner.length) {
4122        var params = $inner.data("params");
4123        if (params.depth > 0) {
4124          var $dropdown = $mobileMenu
4125            .find(".mobilemenu__menu-item--expanded>.mobilemenu__menu-dropdown")
4126            .eq(params.depth - 1);
4127          if ($dropdown.length) {
4128            // height while move animating
4129            $scroller.css("height", params.height[params.depth] + "px");
4130
4131            // dec depth
4132            --params.depth;
4133
4134            // translateX for move
4135            $inner.css("transform", "translateX(" + -100 * params.depth + "%)");
4136
4137            // restore scroll position
4138            setTimeout(function () {
4139              $mobileMenu.animate({ scrollTop: params.scroll[params.depth] }, 200);
4140            }, 100);
4141
4142            // height on enimating end
4143            var h = !params.depth
4144              ? false
4145              : $mobileMenu
4146                  .find(".mobilemenu__menu-item--expanded>.mobilemenu__menu-dropdown")
4147                  .eq(params.depth - 1)
4148                  .outerHeight();
4149            setTimeout(function () {
4150              if (h) {
4151                $scroller.css("height", h + "px");
4152              } else {
4153                $scroller.css("height", "");
4154              }
4155            }, 200);
4156          }
4157        }
4158
4159        $inner.data("params", params);
4160      }
4161    }
4162  }
4163  //  --- END Bind mobile menu  ---
4164
4165  //  --- Bind mobile phone ---
4166  if ($("#mobilephones").length) {
4167    $(document).on("click", ".mobileheader .phones__inner .icon-block__only-icon", function (e) {
4168      e.stopPropagation();
4169      SwipeMobilePhone();
4170    });
4171
4172    $(document).on("click", ".mobilephones__menu-item a,.mobilephones__close", function (e) {
4173      e.stopPropagation();
4174      CloseMobilePhone();
4175    });
4176  }
4177
4178  SwipeMobilePhone = function () {
4179    if ($("#mobilephones.show").length) {
4180      CloseMobilePhone();
4181    } else {
4182      OpenMobilePhone();
4183    }
4184  };
4185
4186  OpenMobilePhone = function () {
4187    if (!$("#mobilephones.show").length) {
4188      CloseMobileMenu();
4189
4190      // show overlay
4191      $('<div class="jqmOverlay mobp"></div>').appendTo("body");
4192
4193      // blur body
4194      $("#mobileheader").addClass("filter-none");
4195      $("body").addClass("jqm-initied");
4196      $("body").addClass("overflow-block");
4197
4198      // toggle phones
4199      setTimeout(function () {
4200        $("#mobilephones").slideDown("fast", function () {
4201          $("#mobilephones").addClass("show");
4202        });
4203      }, 100);
4204    }
4205  };
4206
4207  CloseMobilePhone = function () {
4208    if ($("#mobilephones.show").length) {
4209      // toggle phones
4210      setTimeout(function () {
4211        $("#mobilephones").slideUp("fast", function () {
4212          $("#mobilephones").removeClass("show");
4213
4214          // unblur body
4215          $("body").removeClass("jqm-initied");
4216          $("#mobileheader").removeClass("filter-none");
4217          $("body").removeClass("overflow-block");
4218
4219          // hide overlay
4220          $(".jqmOverlay.mobp").remove();
4221        });
4222      }, 100);
4223    }
4224  };
4225
4226  checkMobilePhone = function () {
4227    if (!window.matchMedia("(max-width: 991px)").matches) {
4228      CloseMobilePhone();
4229    }
4230  };
4231  //  --- END Bind mobile phone ---
4232
4233  // change type2 menu for fixed
4234  /*
4235  if ($("#headerfixed .js-nav").length) {
4236    if (arAsproOptions["THEME"]["HEADER_FIXED"] == 2) CheckHeaderFixedMenu();
4237
4238    setTimeout(function () {
4239      $("#headerfixed .js-nav").addClass("opacity1");
4240    }, 350);
4241  }
4242  */
4243
4244  // close search block
4245  $("html, body").on("mousedown", function (e) {
4246    if (typeof e.target.className == "string" && e.target.className.indexOf("adm") < 0) {
4247      e.stopPropagation();
4248      var search_target = $(e.target).closest(".searche-result");
4249      if (
4250        !$(e.target).closest("#mobileheader").length &&
4251        !$(e.target).closest("#mobilefilter").length &&
4252        !$(e.target).closest(".popup").length &&
4253        !$(e.target).hasClass("inline-search-block") &&
4254        !$(e.target).hasClass("svg") &&
4255        !search_target.length
4256      ) {
4257        $(".inline-search-block").removeClass("show");
4258        $(".title-search-result").hide();
4259
4260        if (arAsproOptions["THEME"]["TYPE_SEARCH"] == "fixed") {
4261          $(".jqmOverlay.search").detach();
4262          $("body").removeClass("jqm-initied");
4263        }
4264
4265        $("body").removeClass("overflow-block");
4266      }
4267
4268      if (isMobile) {
4269        if (search_target.length) location.href = search_target.attr("href");
4270      }
4271
4272      if (!$(e.target).closest(".hint.active").length) {
4273        $(".hint.active .hint__icon").trigger("click");
4274      }
4275
4276      var class_name = $(e.target).attr("class");
4277      if (typeof class_name == "undefined" || class_name.indexOf("tooltip") < 0)
4278        //tooltip link
4279        $(".tooltip-link").tooltip("hide");
4280    }
4281  });
4282  $(".inline-search-block")
4283    .find("*")
4284    .on("mousedown", function (e) {
4285      e.stopPropagation();
4286    });
4287
4288  $(document).on("click", ".jqmOverlay", function () {
4289    HideOverlay();
4290  });
4291
4292  $(".filter-action").on("click", function () {
4293    $(this).toggleClass("active");
4294    $(this).find(".svg").toggleClass("white");
4295    if ($(".introtext").length) {
4296      var top_pos = $(".filters-wrap").position();
4297      $(".bx_filter").css({ top: top_pos.top + 40 });
4298    }
4299    $(".bx_filter").slideToggle();
4300  });
4301
4302  // -- scroll after apply option
4303  scrollPreviewBlock();
4304
4305  $.extend($.validator.messages, {
4306    required: BX.message("JS_REQUIRED"),
4307    email: BX.message("JS_FORMAT"),
4308    equalTo: BX.message("JS_PASSWORD_COPY"),
4309    minlength: BX.message("JS_PASSWORD_LENGTH"),
4310    remote: BX.message("JS_ERROR"),
4311  });
4312
4313  $.validator.addMethod(
4314    "regexp",
4315    function (value, element, regexp) {
4316      var re = new RegExp(regexp);
4317      return this.optional(element) || re.test(value);
4318    },
4319    BX.message("JS_FORMAT")
4320  );
4321
4322  $.validator.addMethod(
4323    "filesize",
4324    function (value, element, param) {
4325      return this.optional(element) || element.files[0].size <= param;
4326    },
4327    BX.message("JS_FILE_SIZE")
4328  );
4329
4330  $.validator.addMethod(
4331    "date",
4332    function (value, element, param) {
4333      var status = false;
4334      if (!value || value.length <= 0) {
4335        status = true;
4336      } else {
4337        var re = new RegExp("^([0-9]{2})(.)([0-9]{2})(.)([0-9]{4})$");
4338        var matches = re.exec(value);
4339        if (matches) {
4340          var composedDate = new Date(matches[5], matches[3] - 1, matches[1]);
4341          status =
4342            composedDate.getMonth() == matches[3] - 1 &&
4343            composedDate.getDate() == matches[1] &&
4344            composedDate.getFullYear() == matches[5];
4345        }
4346      }
4347      return status;
4348    },
4349    BX.message("JS_DATE")
4350  );
4351
4352  $.validator.addMethod(
4353    "datetime",
4354    function (value, element, param) {
4355      var status = false;
4356      if (!value || value.length <= 0) {
4357        status = true;
4358      } else {
4359        var re = new RegExp("^([0-9]{2})(.)([0-9]{2})(.)([0-9]{4}) ([0-9]{1,2}):([0-9]{1,2})$");
4360        var matches = re.exec(value);
4361        if (matches) {
4362          var composedDate = new Date(matches[5], matches[3] - 1, matches[1], matches[6], matches[7]);
4363          status =
4364            composedDate.getMonth() == matches[3] - 1 &&
4365            composedDate.getDate() == matches[1] &&
4366            composedDate.getFullYear() == matches[5] &&
4367            composedDate.getHours() == matches[6] &&
4368            composedDate.getMinutes() == matches[7];
4369        }
4370      }
4371      return status;
4372    },
4373    BX.message("JS_DATETIME")
4374  );
4375
4376  $.validator.addMethod(
4377    "extension",
4378    function (value, element, param) {
4379      param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
4380      return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
4381    },
4382    BX.message("JS_FILE_EXT")
4383  );
4384
4385  $.validator.addMethod(
4386    "captcha",
4387    function (value, element, params) {
4388      let $sid = $(element).closest("form").find('input[name="captcha_sid"]');
4389      if (!$sid.length) {
4390        $sid = $(element).closest("form").find('input[name="captcha_code"]');
4391      }
4392
4393      let sid = $sid.val();
4394
4395      return $.validator.methods.remote.call(this, value, element, {
4396        url: arAsproOptions["SITE_DIR"] + "ajax/check-captcha.php",
4397        type: "post",
4398        data: {
4399          captcha_word: value,
4400          captcha_sid: sid,
4401        },
4402      });
4403    },
4404    BX.message("JS_ERROR")
4405  );
4406
4407  $.validator.addMethod(
4408    "recaptcha",
4409    function (value, element, param) {
4410      if (BX.Aspro?.Captcha) {
4411        return BX.Aspro.Captcha.validate(element);
4412      }
4413
4414      return true;
4415    },
4416    BX.message("JS_RECAPTCHA_ERROR")
4417  );
4418
4419
4420
4421  $.validator.addClassRules({
4422    phone: {
4423      regexp: arAsproOptions["THEME"]["VALIDATE_PHONE_MASK"],
4424    },
4425    confirm_password: {
4426      equalTo: "input.password",
4427      minlength: 6,
4428    },
4429    password: {
4430      minlength: 6,
4431    },
4432    inputfile: {
4433      extension: arAsproOptions["THEME"]["VALIDATE_FILE_EXT"],
4434      filesize: 5000000,
4435    },
4436    datetime: {
4437      datetime: "",
4438    },
4439    captcha: {
4440      captcha: "",
4441    },
4442    recaptcha: {
4443      recaptcha: "",
4444    },
4445  });
4446
4447  $.validator.setDefaults({
4448    highlight: function (element) {
4449      $(element).parent().addClass("error");
4450    },
4451    unhighlight: function (element) {
4452      $(element).parent().removeClass("error");
4453    },
4454    errorPlacement: function(error, element) {
4455      error.insertBefore(element);
4456    },
4457    messages: {
4458      licenses_popup: {
4459        required: BX.message('JS_REQUIRED_LICENSES'),
4460      },
4461      licenses_subscribe: {
4462        required: BX.message('JS_REQUIRED_LICENSES')
4463      },
4464      public_offer_order: {
4465        required: BX.message('JS_REQUIRED_LICENSES')
4466      }
4467    }
4468  });
4469
4470  // expand/hide filter values
4471  $(document).on("click", ".expand_block", function () {
4472    togglePropBlock($(this));
4473  });
4474
4475  // popup img list
4476  $(document).on("click", ".fancy-js", function () {
4477    const parent = $(this).closest(".image-list");
4478    let arItems = [];
4479    let index = 0;
4480    parent.find("[data-big]").each(function () {
4481      let _this = $(this);
4482      let obItem = {
4483        src: _this.data("big"),
4484        opts: {
4485          caption: _this.attr("alt"),
4486        },
4487      };
4488      arItems.push(obItem);
4489    });
4490    index = parent.find(".active").index();
4491    if (arItems.length) {
4492      if (typeof $.fn.fancybox === "function") {
4493        $.fancybox.open(arItems, { loop: false }, index);
4494      }
4495    }
4496  });
4497
4498  $(".mobilemenu__menu-item--city a").on("click", function (e) {
4499    e.preventDefault();
4500    var _this = $(this);
4501    $.removeCookie("current_region");
4502
4503    if (arAsproOptions["SITE_ADDRESS"].indexOf(",") != "-1") {
4504      var arDomains = arAsproOptions["SITE_ADDRESS"].split(",");
4505      if (arDomains) {
4506        for (var i in arDomains) {
4507          var domain_name = arDomains[i].replace("\n", "");
4508          domain_name = arDomains[i].replace("'", "");
4509          $.cookie("current_region", _this.data("id"), { path: "/", domain: domain_name });
4510        }
4511      }
4512    } else $.cookie("current_region", _this.data("id"), { path: "/", domain: arAsproOptions["SITE_ADDRESS"] });
4513
4514    location.href = _this.attr("href");
4515  });
4516
4517 /*  InitOwlSlider();
4518  InitFlexSlider();
4519  InitFlexSliderMin(); */
4520
4521  InitFancyBox();
4522  InitFancyBoxVideo();
4523
4524  // for check flexslider bug in composite mode
4525  /* waitingNotExists(".detail .galery #slider", ".detail .galery #slider .flex-viewport", 1000, function () {
4526    InitOwlSlider();
4527    InitFlexSlider();
4528    setTimeout(function () {
4529      $(window).resize();
4530    }, 350);
4531  }); */
4532
4533  // change view type catalog
4534  $(".view-button").on("click", function () {
4535    $(this).siblings().removeClass("cur");
4536    $(this).addClass("cur");
4537  });
4538
4539  // -- escape close popup form
4540  $(document).on("keydown", function (e) {
4541    if (e.keyCode == 27) {
4542      if ($('.main-user-consent-request-popup:visible').length) {
4543        BX.onCustomEvent('onUserConsentHide', []);
4544        return;
4545      }
4546      if ($(".jqmWindow.show").length) $(".jqmWindow.show:last").jqmHide();
4547      if ($(".inline-search-block.fixed.show").length) {
4548        $(".inline-search-block.fixed .inline-search-hide").click();
4549        setTimeout(function () {
4550          $(".title-search-result").hide();
4551        }, 0);
4552      }
4553      if ($(".mega-fixed-menu").is(":visible")) {
4554        $(".mega-fixed-menu .mega-fixed-menu__close").click();
4555      }
4556    }
4557  });
4558
4559  $(".right_dok .link>span").on("click", function (e) {
4560    if ($(this).hasClass("jqm_disable")) {
4561      $(".jqmWindow.right_slide.opened").jqmHide();
4562      e.stopImmediatePropagation(); // need for stop jqm open standart script
4563    }
4564  });
4565
4566  $(document).on("click", '*[data-event="jqm"]', function (e) {
4567    e.preventDefault();
4568    e.stopPropagation();
4569    if (!$(this).hasClass("clicked")) {
4570      $(this).addClass("clicked");
4571      $(this).jqmEx();
4572      $(this).trigger("click");
4573    }
4574  });
4575
4576  $(".animate-load").on("click", function () {
4577    $(this).parent().addClass("loadings");
4578  });
4579
4580  BX.addCustomEvent("onCompleteAction", function (eventdata, _this) {   
4581    try {      
4582      if (eventdata.action === "loadForm") {
4583        $(_this).parent().removeClass("loadings");
4584        $(_this).removeClass("clicked");
4585      } else if (eventdata.action === "loadBasket") {
4586        var basket_js_block = $(".js-basket-block");
4587        if (basket_js_block.length) {
4588          var count = basket_js_block.find(".header-cart__count").length
4589            ? parseInt($(_this).find(".count").text())
4590            : parseInt($(_this).find(".header-cart__count").text());
4591          if (count) {
4592            basket_js_block.removeClass("header-cart__inner--empty");
4593          } else {
4594            basket_js_block.addClass("header-cart__inner--empty");
4595          }
4596        }
4597        
4598        setBasketItemsClasses();
4599      } else if (eventdata.action === "loadRSS") {
4600      } else if (eventdata.action === "jsLoadBlock") {
4601        // InitScrollBar();
4602      } else if (eventdata.action === "ajaxContentLoaded") {
4603        initCountdown();
4604        if ("type" in eventdata) {
4605          if (eventdata.type == "table_block") {
4606            $(".catalog.item-views.table .item .title").sliceHeight();
4607            $(".catalog.item-views.table .item .cont").sliceHeight();
4608            // $('.catalog.item-views.table .item .slice_price').sliceHeight();
4609            $(".catalog.item-views.table .item").sliceHeight({ classNull: ".footer-button" });
4610          } else if (eventdata.type == "table_block2") {
4611            $(".catalog.item-views.table .item .title").sliceHeight();
4612            $(".catalog.item-views.table .item .cont").sliceHeight({
4613              autoHeightBlock: ".cont_inner",
4614              classNull: ".props_wrapper",
4615            });
4616            // $('.catalog.item-views.table .item .slice_price').sliceHeight();
4617            $(".catalog.item-views.table .item").sliceHeight({
4618              classNull: ".footer-button",
4619              autoHeightBlock: ".cont_inner",
4620              callback: setHoverHeight,
4621            });
4622          }
4623        }
4624      }
4625    } catch (e) {
4626      console.error(e);
4627    }
4628  });
4629
4630  BX.addCustomEvent("onCounterGoals", function (eventdata) {
4631    if (arAsproOptions["THEME"]["YA_GOALS"] == "Y" && arAsproOptions["THEME"]["YA_COUNTER_ID"]) {
4632      var idCounter = arAsproOptions["THEME"]["YA_COUNTER_ID"];
4633      idCounter = parseInt(idCounter);
4634
4635      if (typeof eventdata != "object") eventdata = { goal: "undefined" };
4636
4637      if (typeof eventdata.goal != "string") eventdata.goal = "undefined";
4638
4639      if (idCounter) {
4640        try {
4641          waitCounter(idCounter, 50, function () {
4642            var obCounter = window["yaCounter" + idCounter];
4643            if (typeof obCounter == "object") {
4644              obCounter.reachGoal(eventdata.goal);
4645            }
4646          });
4647        } catch (e) {
4648          console.error(e);
4649        }
4650      } else {
4651        console.info("Bad counter id!", idCounter);
4652      }
4653    }
4654  });
4655
4656  /* BX.addCustomEvent(window, "onAjaxSuccess", function (e) {
4657    if (e != "OK") {
4658      InitOwlSlider();
4659      InitFlexSlider();
4660      InitFlexSliderMin();
4661    }
4662  }); */
4663
4664  // show print
4665  if (arAsproOptions["THEME"]["PRINT_BUTTON"] == "Y") {
4666    setTimeout(function () {
4667      if ($(".page-top .rss-block.top").length) {
4668        $('<div class="print-link"><i class="svg svg-print"></i></div>').insertBefore(
4669          $(".page-top .rss-block.top .shares-block")
4670        );
4671      } else if ($(".page-top .rss").length) {
4672        $('<div class="print-link"><i class="svg svg-print"></i></div>').insertAfter($(".page-top .rss"));
4673      } else if ($(".page-top h1").length)
4674        $('<div class="print-link"><i class="svg svg-print"></i></div>').insertBefore($(".page-top h1"));
4675      // else
4676      // $('footer .print-block').html('<div class="print-link"><i class="svg svg-print"><svg id="Print.svg" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewB
4676ox="0 0 16 16"><path class="cls-1" d="M1553,287h-2v3h-8v-3h-2a2,2,0,0,1-2-2v-5a2,2,0,0,1,2-2h2v-4h8v4h2a2,2,0,0,1,2,2v5A2,2,0,0,1,1553,287Zm-8,1h4v-4h-4v4Zm4-12h-4v2h4v-2Zm4,4h-12v5h2v-3h8v3h2v-5Z" transform="translate(-1539 -274)"/></svg></i></div>');
4677    }, 150);
4678  }
4679
4680  $(document).on("click", ".print-link", function () {
4681    window.print();
4682  });
4683
4684  $(".head-block .item-link").on("click", function () {
4685    var _this = $(this);
4686    _this.siblings().removeClass("active");
4687    _this.addClass("active");
4688  });
4689
4690  //alert(navigator.userAgent);
4691  $("table.table").each(function () {
4692    var _this = $(this),
4693      first_td = _this.find("thead tr th");
4694    if (!first_td.length) first_td = _this.find("thead tr td");
4695    if (first_td.length) {
4696      _this.find("tbody tr:not(.nomobile)").each(function (i) {
4697        $(this)
4698          .find("td")
4699          .each(function (i) {
4700            if (typeof first_td[i] !== "undefined")
4701              $('<div class="th-mobile">' + first_td[i].textContent + "</div>").appendTo($(this));
4702          });
4703      });
4704    }
4705  });
4706
4707  if ($("a.fancybox").length) {
4708    if (typeof $.fn.fancybox == "function") {
4709      $("a.fancybox").fancybox();
4710    }
4711  }
4712
4713  // flex pagination
4714  $(document).on("mouseenter", ".flex-viewport .item", function () {
4715    $(this).closest(".flexslider").find(".flex-control-nav").toggleClass("noz");
4716    $(this).closest(".flexslider").find(".flex-control-nav").css("z-index", "0");
4717  });
4718  $(document).on("mouseleave", ".flex-viewport .item", function () {
4719    $(this).closest(".flexslider").find(".flex-control-nav").toggleClass("noz");
4720    $(this).closest(".flexslider").find(".flex-control-nav").css("z-index", "2");
4721  });
4722
4723  // ajax more items
4724  $(document).on("click", ".ajax_load_btn", function () {
4725    var url = $(this).closest(".bottom_nav").find(".next .module-pagination__item").attr("href"),
4726      th = $(this).find(".more_text_ajax"),
4727      _this = $(this),
4728      bottom_nav = $(this).closest(".bottom_nav");
4729    if (!th.hasClass("loading")) {
4730      th.addClass("loading");
4731      var objUrl = parseUrlQuery(),
4732        add_url = "",
4733        obData = { AJAX_REQUEST: "Y", ajax_get: "Y", bitrix_include_areas: "N" };
4734
4735      //index page
4736      if ($(".body.index").length) {
4737        var class_block = th.closest(".drag-block").data("class").replace("_drag", "");
4738        class_block = class_block.replace(/\s/g, "");
4739        obData.BLOCK = class_block;
4740      }
4741      if (_this.closest(".ajax-pagination-wrapper").length) {
4742        obData.BLOCK = _this.closest(".ajax-pagination-wrapper").data("class");
4743      }
4744      if ("clear_cache" in objUrl && objUrl.clear_cache == "Y") {
4745        add_url = "&clear_cache=Y";
4746      }
4747      if ($(".banners-small.front").length) {
4748        obData.MD = $(".banners-small.front").find(".items").data("colmd");
4749        obData.SM = $(".banners-small.front").find(".items").data("colsm");
4750      }
4751
4752      //tabs block
4753      if (_this.closest(".tab-content-block").length) {
4754        var filter = th.closest(".tab-content-block").data("filter");
4755        obData.GLOBAL_FILTER = filter;
4756      }
4757      $.ajax({
4758        url: url + "" + add_url,
4759        data: BX.ajax.prepareData(obData),
4760        success: function (html) {
4761          var html = html.trim();
4762          var mobileBottomClicked = bottom_nav.hasClass("mobile_slider");
4763          var hasMobileBottomNav = $(html).find(".bottom_nav.mobile_slider");
4764          var bottomNav = hasMobileBottomNav.length ? hasMobileBottomNav : $(html).find(".bottom_nav");
4765          var bottomNavHtml = bottomNav.html();
4766          var bottomNavScrollClass = bottomNav.data("scroll-class");
4767          var hasBottomNav = $(html).find(".ajax_load_btn").length;
4768
4769          var eventdata = { action: "ajaxContentLoaded", content: html };
4770
4771          if ($(".banners-small.front").length) {
4772            $(".banners-small .items.row").append(html);
4773            $(".bottom_nav").html($(".banners-small .items.row .bottom_nav").html());
4774            $(".banners-small .items.row .bottom_nav").remove();
4775          } else if (bottom_nav.data("append") !== undefined && bottom_nav.data("parent") !== undefined) {
4776            var $slider = th.closest(bottom_nav.data("parent")).find(".owl-carousel");
4777            if ($slider.length) {
4778              var obData = BX.processHTML(html);
4779              html = obData.HTML;
4780
4781              var $slides = $("<div>" + html + "</div>").find(">*");
4782              $slides.each(function () {
4783                if (!$(this).hasClass("wrap_nav")) {
4784                  $slider.trigger("add.owl.carousel", [$(this).wrap("<div></div>").parent().html()]);
4785                }
4786              });
4787              $slider.trigger("refresh.owl.carousel");
4788
4789              setTimeout(function () {
4790                BX.ajax.processScripts(obData.SCRIPT);
4791              }, 100);
4792            } else {
4793              var target = html;
4794              if (bottom_nav.data("target") !== undefined) {
4795                target = $(html).find(bottom_nav.data("target"));
4796              }
4797              if (mobileBottomClicked || hasMobileBottomNav.length) {
4798                var mobileSliderNav = th.closest(bottom_nav.data("parent")).find(".bottom_nav.mobile_slider");
4799                if (mobileSliderNav.length) {
4800                  mobileSliderNav.before(target);
4801                } else {
4802                  bottom_nav.before(target);
4803                }
4804              } else {
4805                th.closest(bottom_nav.data("parent")).find(bottom_nav.data("append")).append(target);
4806              }
4807              th.closest(bottom_nav.data("parent"))
4808                .find(bottom_nav.data("append"))
4809                .find(".bottom_nav_wrapper")
4810                .remove();
4811
4812              if (hasBottomNav) {
4813                if (bottomNavScrollClass !== undefined) {
4814                  th.closest(bottom_nav.data("parent")).find(bottomNavScrollClass).addClass("has-bottom-nav");
4815                }
4816                th.closest(bottom_nav.data("parent")).find(bottom_nav.data("append")).addClass("has-bottom-nav");
4817              } else {
4818                if (bottomNavScrollClass !== undefined) {
4819                  th.closest(bottom_nav.data("parent")).find(bottomNavScrollClass).removeClass("has-bottom-nav");
4820                }
4821                th.closest(bottom_nav.data("parent")).find(bottom_nav.data("append")).removeClass("has-bottom-nav");
4822              }
4823            }
4824
4825            bottom_nav = th.closest(bottom_nav.data("parent")).find(".bottom_nav");
4826            bottom_nav.html(bottomNavHtml);
4827            var icon = bottom_nav.find(".svg-inline-bottom_nav-icon");
4828            icon.css("display", "");
4829
4830            eventdata.container = th.closest(bottom_nav.data("parent"));
4831          } else {
4832            $(html).insertBefore($(".blog .bottom_nav"));
4833            $(".bottom_nav").html($(".blog .bottom_nav:hidden").html());
4834            $(".blog .bottom_nav:hidden").remove();
4835          }
4836
4837          setTimeout(function () {
4838            BX.onCustomEvent("onCompleteAction", [eventdata, th[0]]);
4839            th.removeClass("loading");
4840          }, 100);
4841        },
4842      });
4843    }
4844  });
4845
4846  // bug fix in ff
4847  $("img").removeAttr("draggable");
4848
4849  // Responsive Menu Events
4850  var addActiveClass = false;
4851  $("#mainMenu li.dropdown > a > i, #mainMenu li.dropdown-submenu > a > i").on("click", function (e) {
4852    e.preventDefault();
4853    if ($(window).width() > 979) return;
4854    addActiveClass = $(this).closest("li").hasClass("resp-active");
4855    // $('#mainMenu').find('.resp-active').removeClass('resp-active');
4856    if (!addActiveClass) {
4857      $(this).closest("li").addClass("resp-active");
4858    } else {
4859      $(this).closest("li").removeClass("resp-active");
4860    }
4861  });
4862
4863  // animate increment
4864  if ($(".spincrement").length) {
4865    $(".spincrement").counterUp({
4866      delay: 80,
4867      time: 1000,
4868    });
4869  }
4870
4871  // form rating
4872  $(document).on("mouseenter", ".form .votes_block.with-text .item-rating", function () {
4873    var $this = $(this),
4874      index = $this.index(),
4875      ratingMessage = $this.data("message");
4876
4877    $(this).addClass("filed");
4878    $this.siblings().each(function () {
4879      if ($(this).index() <= index) $(this).addClass("filed");
4880      else $(this).removeClass("filed");
4881    });
4882    $this.closest(".votes_block").find(".rating_message").text(ratingMessage);
4883  });
4884
4885  $(document).on("mouseleave", ".form .votes_block.with-text", function () {
4886    var $this = $(this),
4887      index = $this.data("rating"),
4888      ratingMessage = $this.closest(".votes_block").find(".rating_message").data("message");
4889
4890    $this.find(".item-rating").each(function () {
4891      if ($(this).index() < index && index !== undefined) $(this).addClass("filed");
4892      else $(this).removeClass("filed");
4893    });
4894    $this.closest(".votes_block").find(".rating_message").text(ratingMessage);
4895  });
4896
4897  $(document).on("click", ".form .votes_block.with-text .item-rating", function () {
4898    var $this = $(this),
4899      rating = $this.closest(".votes_block").data("rating"),
4900      index = $this.index() + 1,
4901      ratingMessage = $this.data("message");
4902
4903    $this.closest(".votes_block").data("rating", index);
4904    if ($this.closest(".form-group").find("input[name=RATING]").length) {
4905      $this.closest(".form-group").find("input[name=RATING]").val(index);
4906    } else {
4907      $this.closest(".form-group").find("input[data-sid=RATING]").val(index);
4908    }
4909    $this.closest(".votes_block").find(".rating_message").data("message", ratingMessage);
4910  });
4911
4912  $(".bx_filter_input_container input[type=text]").numeric({ allow: "." });
4913
4914  $(".toggle .more_items").on("click", function () {
4915    $(this).closest(".toggle").find(".collapsed").fadeToggle();
4916    $(this).remove();
4917    if (typeof $(this).data("resize") !== "undefined" && $(this).data("resize")) $(window).resize();
4918  });
4919  $(".toggle_menu .more_items").on("click", function () {
4920    $(this).closest(".toggle_menu").find(".collapsed").addClass("clicked_exp");
4921    $(this).remove();
4922  });
4923
4924  // search sync
4925  $(document).on("keyup", ".search-input-div input", function (e) {
4926    var inputValue = $(this).val();
4927    $(".search-input-div input").val(inputValue);
4928
4929    if ($(this).closest("#headerfixed").length) {
4930      if (e.keyCode == 13) $(".search form").submit();
4931    }
4932  });
4933  $(document).on("click", ".search-button-div button", function (e) {
4934    if ($(this).closest("#headerfixed").length) $(".search form").submit();
4935  });
4936
4937  $(document).on(
4938    "click",
4939    ".header-search, .inline-search-hide, .bottom-icons-panel__content-link--search",
4940    function (e) {
4941      //if (window.matchMedia("(min-width: 600px)").matches) {
4942      CloseMobilePhone();
4943
4944      if (typeof $(this).data("type_search") != "undefined" && $(this).data("type_search") == "fixed") {
4945        $(".inline-search-block").addClass("fixed");
4946      }
4947
4948      $(".inline-search-block").toggleClass("show");
4949
4950      if (arAsproOptions["THEME"]["TYPE_SEARCH"] == "fixed") {
4951        if ($(".inline-search-block").hasClass("show")) {
4952          $('<div class="jqmOverlay search"></div>').appendTo("body");
4953          $("body").addClass("overflow-block");
4954          $("body").addClass("jqm-initied");
4955        } else {
4956          $("body").removeClass("jqm-initied");
4957          $("body").removeClass("overflow-block");
4958          $(".jqmOverlay").remove();
4959        }
4960      }
4961
4962      if ($(".inline-search-block").hasClass("show")) {
4963        setTimeout(function () {
4964          $(".inline-search-block.fixed .search-input").focus();
4965        }, 400);
4966      }
4967      // } else {
4968      //   location.href = arAsproOptions["SITE_DIR"] + "search/";
4969      // }
4970    }
4971  );
4972
4973  if ($(".styled-block .row > div.col-md-3").length) {
4974    BX.addCustomEvent("onWindowResize", function (eventdata) {
4975      try {
4976        ignoreResize.push(true);
4977        $(".styled-block .row > div.col-md-3").each(function () {
4978          $(this).css({ height: "", "line-height": "" });
4979          var z = parseInt($(".body_media").css("top"));
4980          if (z > 0) {
4981            var rowHeight = $(this).parents(".row").first().actual("outerHeight");
4982            $(this).css({ height: rowHeight + "px", "line-height": rowHeight + "px" });
4983          }
4984        });
4985      } catch (e) {
4986      } finally {
4987        ignoreResize.pop();
4988      }
4989    });
4990  }
4991
4992  if ($(".order-block").length) {
4993    BX.addCustomEvent("onWindowResize", function (eventdata) {
4994      try {
4995        ignoreResize.push(true);
4996        $(".order-block").each(function () {
4997          var cols = $(this).find(".row > div");
4998          if (cols.length) {
4999            var colFirst = cols.first();
5000            var colLast = cols.last();
5001            var colText = colFirst.find(".text");
5002            var bText = colText.length;
5003            var bOnlyText = cols.length === 1 && bText;
5004            var bPrice = colFirst.find(".price").length;
5005            var z = parseInt($(".body_media").css("top"));
5006
5007            cols.css({ height: "", "padding-top": "", "padding-bottom": "" });
5008            colText.css({ height: "", "padding-top": "", "padding-bottom": "" });
5009            if ((!bPrice && z > 0) || (bPrice && z > 1)) {
5010              var minHeight = 83;
5011
5012              if (!bOnlyText) {
5013                var colLast_height = colLast.outerHeight();
5014                colLast_height = colLast_height >= minHeight ? colLast_height : minHeight;
5015              }
5016
5017              if (bText) {
5018                var colFirst_height = colFirst.outerHeight();
5019                colFirst_height = colFirst_height >= minHeight ? colFirst_height : minHeight;
5020              }
5021
5022              var colMax_height = bText
5023                ? !bOnlyText
5024                  ? colLast_height >= colFirst_height
5025                    ? colLast_height
5026                    : colFirst_height
5027                  : colLast_height
5028                : colFirst_height;
5029
5030              if (!bOnlyText) {
5031                var textPadding = 41 + (colMax_height - colFirst.outerHeight()) / 2;
5032                colLast.find(".btns").css({
5033                  "padding-top": textPadding + "px",
5034                  "padding-bottom": textPadding + "px",
5035                  height: colMax_height + "px",
5036                });
5037              }
5038              if (bText) {
5039                colLast.css({ height: colMax_height + "px" });
5040                var textPadding = 41 + (colMax_height - colText.outerHeight()) / 2;
5041                colText.css({
5042                  "padding-top": textPadding + "px",
5043                  "padding-bottom": textPadding + "px",
5044                  height: colMax_height + "px",
5045                });
5046              }
5047            }
5048          }
5049        });
5050      } catch (e) {
5051      } finally {
5052        ignoreResize.pop();
5053      }
5054    });
5055  }
5056
5057  if ($(".equal-padding").length) {
5058    BX.addCustomEvent("onWindowResize", function (eventdata) {
5059      try {
5060        ignoreResize.push(true);
5061        $(".equal-padding").each(function () {
5062          $(this).find(".text").css({ "padding-top": "0px", "padding-bottom": "0px" });
5063          var equal_block = $(this).siblings(".equals"),
5064            height = $(this).actual("outerHeight");
5065
5066          delta = Math.round((equal_block.actual("outerHeight") - height) / 2);
5067          if (delta)
5068            $(this)
5069              .find(".text")
5070              .css({ "padding-top": delta + "px", "padding-bottom": delta + "px" });
5071        });
5072      } catch (e) {
5073      } finally {
5074        ignoreResize.pop();
5075      }
5076    });
5077  }
5078
5079  $(document).on("click", ".mega-menu .dropdown-menu", function (e) {
5080    e.stopPropagation();
5081  });
5082
5083  $(document).on("click", ".mega-menu .dropdown-toggle.more-items", function (e) {
5084    e.preventDefault();
5085  });
5086
5087  // $(".table-menu .dropdown,.table-menu .dropdown-submenu,.table-menu .dropdown-toggle").on("mouseenter", function () {
5088  //   CheckTopVisibleMenu();
5089  // });
5090
5091  $(document).on(
5092    "mouseenter",
5093    ".header-menu .header-menu__item--dropdown:not(.header-menu__item--wide), .header-menu .header-menu__item--dropdown:not(.header-menu__item--wide) .header-menu__dropdown-item.header-menu__dropdown-item--with-dropdown, .header-menu .header-menu__item--more-items, .header-menu .header-menu__item--more-items .header-menu__dropdown-item--with-dropdown, .header-menu .header-menu__item--more-items .header-menu__item--dropdown.header-menu__item--wide, .header-menu .header-menu__item--more-items .header-menu__item--dropdown.header-menu__item--wide .header-menu__dropdown-item--with-dropdown, .header-menu .header-menu__item--more-items .header-menu__item--dropdown.header-menu__item--wide .header-menu__dropdown-item--with-dropdown .header-menu__wide-submenu-item--with-dropdown",
5094    function (e) {
5095      CheckTopVisibleMenu($(e.currentTarget));
5096    }
5097  );
5098
5099  const menuBanner = {
5100    checkOwlSlider(ctx) {
5101      const bannerMenu = $(ctx).find(".side_banners .owl-carousel-hover");
5102      if (bannerMenu.length) {
5103        bannerMenu.removeClass("owl-carousel-hover").addClass("owl-carousel");
5104        setTimeout(function () {
5105          InitOwlSlider();
5106          bannerMenu.removeClass("loading-state");
5107        }, 1);
5108      }
5109    },
5110    checkSwiperSlider(ctx) {
5111      const nodeBannerMenu = ctx.querySelector('.slider-solution--init-by-condition');
5112      if (nodeBannerMenu) {
5113        nodeBannerMenu.classList.remove('slider-solution--init-by-condition');
5114        nodeBannerMenu.classList.add('slider-solution');
5115        initSwiperSlider(nodeBannerMenu);
5116      }
5117    },
5118  }
5119
5120  $(document).on(
5121    "mouseenter",
5122    ".header-menu__item--wide:not(.slider-inited), .header-menu__item--wide:not(.slider-inited) .header-menu__dropdown-menu",
5123    function () {
5124      $(this).closest('.header-menu__item--wide').addClass('slider-inited');
5125
5126      menuBanner.checkOwlSlider(this);
5127      menuBanner.checkSwiperSlider(this);
5128    }
5129  );
5130
5131  $(".mega-menu .search-item .search-icon, .menu-row #title-search .fa-close").on("click", function (e) {
5132    e.preventDefault();
5133    $(".menu-row #title-search").toggleClass("hide");
5134  });
5135
5136  $(".mega-menu ul.nav .search input").on("keyup", function (e) {
5137    var inputValue = $(this).val();
5138    $(".menu-row > .search input").val(inputValue);
5139    if (e.keyCode == 13) {
5140      $(".menu-row > .search form").submit();
5141    }
5142  });
5143
5144  $(".menu-row > .search input").on("keyup", function (e) {
5145    var inputValue = $(this).val();
5146    $(".mega-menu ul.nav .search input").val(inputValue);
5147    if (e.keyCode == 13) {
5148      $(".menu-row > .search form").submit();
5149    }
5150  });
5151
5152  $(".mega-menu ul.nav .search button").on("click", function (e) {
5153    e.preventDefault();
5154    var inputValue = $(this).parents(".search").find("input").val();
5155    $(".menu-and-search .search input").val(inputValue);
5156    $(".menu-row > .search form").submit();
5157  });
5158
5159  $(".filter .calendar").on("click", function () {
5160    var button = $(this).next();
5161    if (button.hasClass("calendar-icon")) {
5162      button.trigger("click");
5163    }
5164  });
5165
5166  // sliceheights
5167  if ($(".banners-small .item.normal-block").length) $(".banners-small .item.normal-block").sliceHeight();
5168  if ($(".teasers .item").length) $(".teasers .item").sliceHeight();
5169  if ($(".wrap-portfolio-front .row.items > div").length)
5170    $(".wrap-portfolio-front .row.items > div").sliceHeight({ row: ".row.items", item: ".item1" });
5171
5172  SliceHeightBlocks();
5173
5174  // toggle
5175  var $this = this,
5176    previewParClosedHeight = 25;
5177
5178  $("section.toggle > label").prepend($("<i />").addClass("fa fa-plus"));
5179  $("section.toggle > label").prepend($("<i />").addClass("fa fa-minus"));
5180  $("section.toggle.active > p").addClass("preview-active");
5181  $("section.toggle.active > div.toggle-content").slideDown(350, function () {});
5182
5183  $("section.toggle > label").click(function (e) {
5184    var parentSection = $(this).parent(),
5185      parentWrapper = $(this).parents("div.toogle"),
5186      previewPar = false,
5187      isAccordion = parentWrapper.hasClass("toogle-accordion");
5188
5189    if (isAccordion && typeof e.originalEvent != "undefined") {
5190      parentWrapper.find("section.toggle.active > label").trigger("click");
5191    }
5192
5193    parentSection.toggleClass("active");
5194
5195    // Preview Paragraph
5196    if (parentSection.find("> p").get(0)) {
5197      previewPar = parentSection.find("> p");
5198      var previewParCurrentHeight = previewPar.css("height");
5199      previewPar.css("height", "auto");
5200      var previewParAnimateHeight = previewPar.css("height");
5201      previewPar.css("height", previewParCurrentHeight);
5202    }
5203
5204    // Content
5205    var toggleContent = parentSection.find("> div.toggle-content");
5206
5207    if (parentSection.hasClass("active")) {
5208      $(previewPar).animate(
5209        {
5210          height: previewParAnimateHeight,
5211        },
5212        350,
5213        function () {
5214          $(this).addClass("preview-active");
5215        }
5216      );
5217      toggleContent.slideDown(350, function () {});
5218    } else {
5219      $(previewPar).animate(
5220        {
5221          height: previewParClosedHeight,
5222        },
5223        350,
5224        function () {
5225          $(this).removeClass("preview-active");
5226        }
5227      );
5228      toggleContent.slideUp(350, function () {});
5229    }
5230  });
5231
5232  // accordion
5233  $(".accordion-head").on("click", function (e) {
5234    e.preventDefault();
5235    if (!$(this).next().hasClass("collapsing")) {
5236      $(this).toggleClass("accordion-open");
5237      $(this).toggleClass("accordion-close");
5238    }
5239  });
5240
5241  // progress bar
5242  $("[data-appear-progress-animation]").iAppear(
5243    function () {
5244      var $this = $(this);
5245
5246      var delay = $this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1;
5247      if (delay > 1) $this.css("animation-delay", delay + "ms");
5248      $this.addClass($this.attr("data-appear-animation"));
5249
5250      setTimeout(function () {
5251        $this.animate(
5252          {
5253            width: $this.attr("data-appear-progress-animation"),
5254          },
5255          1500,
5256          "easeOutQuad",
5257          function () {
5258            $this.find(".progress-bar-tooltip").animate(
5259              {
5260                opacity: 1,
5261              },
5262              500,
5263              "easeOutQuad"
5264            );
5265          }
5266        );
5267      }, delay);
5268    },
5269    {
5270      rootMargin: "-50px 0px -50px 0px",
5271      accX: 0,
5272      accY: -50,
5273    }
5274  );
5275
5276  // portfolio item
5277  $(".item.animated-block").iAppear(function () {
5278    $(this).addClass($(this).data("animation")).addClass("visible");
5279  });
5280
5281  InitAppear = function() {
5282    const $nodeListAppearBlock = $(".appear-block");
5283    if ($nodeListAppearBlock.length) {
5284      $nodeListAppearBlock.iAppear(
5285        function () {
5286          const eventdata = {
5287            target: this
5288          };
5289          BX.onCustomEvent("onAppearVideoBlockShow", [eventdata]);
5290
5291          const $nodeAppearBlock = $(this);
5292          $nodeAppearBlock.removeClass("appear-block");
5293          $nodeAppearBlock.find(".appear-block").removeClass("appear-block");
5294
5295          typeof initSwiperSlider === "function" && initSwiperSlider();
5296        },
5297        {
5298          rootMargin: "150px 0px 150px 0px",
5299          accX: 0,
5300          accY: 150,
5301        }
5302      );
5303    }
5304}
5305
5306  typeof InitAppear === 'function' && InitAppear();
5307
5308  // js-load-block appear
5309  if ($(".js-load-block").length) {
5310    var objUrl = parseUrlQuery();
5311    var bClearCache = false;
5312    if ("clear_cache" in objUrl) {
5313      if (objUrl.clear_cache == "Y") {
5314        bClearCache = true;
5315      }
5316    }
5317
5318    var items = [];
5319    var bIdle = true;
5320    var insertNextBlockContent = function () {
5321      if (bIdle) {
5322        if (items.length) {
5323          bIdle = false;
5324          var item = items.pop();
5325
5326          item.content = $.trim(item.content);
5327
5328          // remove /bitrix/js/main/core/core_window.js if it was loaded already
5329          if (item.content.indexOf("/bitrix/js/main/core/core_window.") !== -1 && BX.WindowManager) {
5330            item.content = item.content.replace(
5331              /<script src="\/bitrix\/js\/main\/core\/core_window\.[^>]*><\/script>/gm,
5332              ""
5333            );
5334          }
5335
5336          // remove /bitrix/js/currency/core_currency.js if it was loaded already
5337          if (
5338            item.content.indexOf("/bitrix/js/currency/core_currency.") !== -1 &&
5339            typeof BX.Currency === "object" &&
5340            BX.Currency.defaultFormat
5341          ) {
5342            item.content = item.content.replace(
5343              /<script src="\/bitrix\/js\/currency\/core_currency\.[^>]*><\/script>/gm,
5344              ""
5345            );
5346          }
5347
5348          // remove /bitrix/js/main/pageobject/pageobject.js if it was loaded already
5349          if (item.content.indexOf("/bitrix/js/main/pageobject/pageobject.") !== -1 && BX.PageObject) {
5350            item.content = item.content.replace(
5351              /<script src="\/bitrix\/js\/main\/pageobject\/pageobject\.[^>]*><\/script>/gm,
5352              ""
5353            );
5354          }
5355
5356          // remove /bitrix/js/main/polyfill/promise/js/promise.js if it not need
5357          if (
5358            item.content.indexOf("/bitrix/js/main/polyfill/promise/js/promise.") !== -1 &&
5359            typeof window.Promise !== "undefined" &&
5360            window.Promise.toString().indexOf("[native code]") !== -1
5361          ) {
5362            item.content = item.content.replace(
5363              /<script src="\/bitrix\/js\/main\/polyfill\/promise\/js\/promise\.[^>]*><\/script>/gm,
5364              ""
5365            );
5366          }
5367
5368          var ob = BX.processHTML(item.content);
5369
5370          // stop ya metrika webvisor DOM indexer
5371          pauseYmObserver();
5372
5373          item.block.removeAttr("data-file").removeClass("loader_circle");
5374
5375          if (item.block.data("appendTo")) {
5376            item.block.find(item.block.data("appendTo"))[0].innerHTML = ob.HTML;
5377          } else {
5378            const nodeAjaxContainer = item.block.find(".ajax-container")[0];
5379            if (nodeAjaxContainer) {
5380              nodeAjaxContainer.innerHTML = ob.HTML;
5381
5382              let loadedState = parseInt(getComputedStyle(nodeAjaxContainer).getPropertyValue("--loaded"));
5383              let interval = setInterval(() => {
5384                loadedState = parseInt(getComputedStyle(nodeAjaxContainer).getPropertyValue("--loaded"));
5385                if (loadedState) {
5386                  nodeAjaxContainer.nextElementSibling?.remove();
5387                  nodeAjaxContainer.removeAttribute("hidden");
5388                  clearInterval(interval);
5389                }
5390              }, 100);
5391            } else {
5392              if (item.block.find('> div[id*="bx_incl_"]').length) {
5393                item.block.find('> div[id*="bx_incl_"]')[0].innerHTML = ob.HTML;
5394              } else {
5395                item.block[0].innerHTML = ob.HTML;
5396              }
5397            }
5398          }
5399
5400          BX.ajax.processScripts(ob.SCRIPT);
5401
5402          var eventdata = { action: "jsLoadBlock" };
5403          BX.onCustomEvent("onCompleteAction", [eventdata, item.block]);
5404
5405          // resume ya metrika webvisor
5406          // 500ms
5407          setTimeout(resumeYmObserver, 500);
5408
5409          bIdle = true;
5410          insertNextBlockContent();
5411        }
5412      }
5413    };
5414
5415    $(".js-load-block").iAppear(
5416      function () {
5417        var $this = $(this);
5418
5419        if ($this.data("file")) {
5420          var add_url = bClearCache ? "?clear_cache=Y" : "";
5421          if ($this.data("block")) {
5422            add_url += (bClearCache ? "&" : "?") + "BLOCK=" + $this.data("block");
5423          }
5424
5425          // get content
5426          $.get($this.data("file") + add_url).done(function (html) {
5427            items.push({
5428              block: $this,
5429              content: html,
5430            });
5431
5432            if (items.length == 1) {
5433              setTimeout(insertNextBlockContent, 100);
5434            }
5435          });
5436        }
5437      },
5438      {
5439        rootMargin: isMobile ? "300px 0px 300px 0px" : "150px 0px 150px 0px",
5440        accX: 0,
5441        accY: isMobile ? 300 : 150,
5442      }
5443    );
5444  }
5445
5446  $("a[rel=tooltip]").tooltip();
5447  $("span[data-toggle=tooltip]").tooltip();
5448
5449  $("select.sort").on("change", function () {
5450    location.href = $(this).val();
5451  });
5452
5453  setTimeout(function (th) {
5454    $(".catalog.group.list .item").each(function () {
5455      var th = $(this);
5456      if ((tmp = th.find(".image").outerHeight() - th.find(".text_info").outerHeight()) > 0) {
5457        th.find(".text_info .titles").height(th.find(".text_info .titles").outerHeight() + tmp);
5458      }
5459    });
5460  }, 50);
5461
5462  // ajax tabs
5463
5464  // tabs on front in mobile
5465  $(".items-link-mobile").each(function () {
5466    var _this = $(this),
5467      selectOption = _this.find("option"),
5468      selectOptionLength = selectOption.length,
5469      selectedOption = selectOption.filter(":selected"),
5470      duration = 200; //
5471
5472    _this.hide();
5473    _this.wrap('<div class="select"></div>');
5474    $("<div>", {
5475      class: "new-select",
5476      text: _this.children("option:disabled").text(),
5477    }).insertAfter(_this);
5478
5479    var selectHead = _this.next(".new-select");
5480    $("<div>", {
5481      class: "new-select__list",
5482    }).insertAfter(selectHead);
5483
5484    var selectList = selectHead.next(".new-select__list");
5485    for (var i = 1; i < selectOptionLength; i++) {
5486      $("<div>", {
5487        class: "new-select__item",
5488        html: $("<span>", {
5489          text: selectOption.eq(i).text(),
5490        }),
5491      })
5492        .attr("data-value", selectOption.eq(i).val())
5493        .appendTo(selectList);
5494    }
5495
5496    var selectItem = selectList.find(".new-select__item");
5497    var selectItemFirst = selectList.find(".new-select__item:first-child");
5498    selectList.slideUp();
5499    selectHead.on("click", function () {
5500      if (!$(this).hasClass("on")) {
5501        $(this).addClass("on");
5502        selectList.slideDown(duration);
5503
5504        selectItemCur = selectList.find(".new-select__item.active");
5505
5506        if (!selectItem.hasClass("active")) {
5507          selectItemFirst.addClass("active");
5508          selectItemCur = selectItemFirst;
5509        }
5510
5511        selectItem.on("click", function () {
5512          selectItemCur.removeClass("active");
5513          var chooseItem = $(this).data("value");
5514
5515          $("select").val(chooseItem).attr("selected", "selected");
5516          selectHead.text($(this).find("span").text());
5517          selectHead.attr("data-value", $(this).attr("data-value"));
5518          $(this).addClass("active");
5519          var _this = $(this);
5520          selectList.slideUp(150, function () {
5521            selectHead.removeClass("on");
5522
5523            var index = _this.index();
5524            var curHeadBlock = _this.closest(".head-block");
5525            var indexTab = curHeadBlock.find(".items-link .item-link.active");
5526            var indexActiveTab = indexTab.index();
5527
5528            if (indexActiveTab != index) {
5529              curHeadBlock.find(".items-link .item-link").eq(index).trigger("click");
5530            }
5531          });
5532        });
5533      } else {
5534        $(this).removeClass("on");
5535        selectList.slideUp(duration);
5536      }
5537    });
5538  });
5539
5540  // gallery in list
5541  $(document).on("mouseenter", ".section-gallery-wrapper .section-gallery-wrapper__item", function () {
5542    const _this = $(this);
5543    const index = _this.index();
5544    const nav_items = _this.closest(".image-list-wrapper").find(".section-gallery-nav .section-gallery-nav__item");
5545
5546    _this.siblings().removeClass("active");
5547    _this.addClass("active");
5548
5549    nav_items.removeClass("active");
5550    nav_items.filter(":eq(" + index + ")").addClass("active");
5551  });
5552
5553  $(document).on("click", ".section-gallery-nav .section-gallery-nav__item", function () {
5554    const _this = $(this);
5555    const index = _this.index();
5556    const items = _this.closest(".image-list-wrapper").find(".section-gallery-wrapper .section-gallery-wrapper__item");
5557
5558    _this.siblings().removeClass("active");
5559    _this.addClass("active");
5560
5561    items.removeClass("active");
5562    items.filter(":eq(" + index + ")").addClass("active");
5563  });
5564
5565  // item galery
5566  $(".thumbs .item a").on("click", function (e) {
5567    e.preventDefault();
5568    $(".thumbs .item").removeClass("current");
5569    $(this).closest(".item").toggleClass("current");
5570    $(".slides li" + $(this).attr("href"))
5571      .addClass("current")
5572      .siblings()
5573      .removeClass("current");
5574  });
5575
5576  $("header.fixed .btn-responsive-nav").on("click", function () {
5577    $("html, body").animate({ scrollTop: 0 }, 400);
5578  });
5579
5580  $("body").on("click", ".form .refresh-page", function () {
5581    location.href = location.href;
5582  });
5583
5584  $(document).on("click", ".basket.fly .opener", function () {
5585    if (window.matchMedia("(max-width: 767px)").matches) location.href = arAsproOptions["THEME"]["URL_BASKET_SECTION"];
5586    else {
5587      $(".jqmWindow.right_slide.opened").jqmHide();
5588      $(this).closest(".ajax_basket").toggleClass("opened").removeClass("widget_open").removeClass;
5589    }
5590  });
5591
5592  $(document).on("click", ".basket.fly .close_block", function () {
5593    $(".basket.fly .opener").trigger("click");
5594  });
5595
5596  // show props
5597  $(document).on("click", ".show_props", function () {
5598    $(this).prev(".props_list").stop().slideToggle(333);
5599    $(this).find(".char_title").toggleClass("opened");
5600  });
5601
5602  // animated labels
5603  $(document)
5604    .on("focus", ".fill-animate input,.fill-animate textarea", function () {
5605      $(this).addClass("input-filed");
5606    })
5607    .on("focusout", ".fill-animate input,.fill-animate textarea", function () {
5608      if ("" != $(this).val()) {
5609        $(this).addClass("input-filed");
5610      } else {
5611        $(this).removeClass("input-filed");
5612      }
5613    });
5614
5615  // accordion action
5616  $(".panel-collapse").on("hidden.bs.collapse", function () {
5617    $(this).parent().toggleClass("opened");
5618  });
5619  $(".panel-collapse").on("show.bs.collapse", function () {
5620    $(this).parent().toggleClass("opened");
5621  });
5622
5623  $(document).on("click", ".reload-page", function () {
5624    location.reload(true);
5625  });
5626
5627  // DIGITAL BASKET
5628  // - basket fly close
5629  $(document).on("click", function () {
5630    if ($(".basket.fly").length && $(".ajax_basket").hasClass("opened")) {
5631      $(".ajax_basket").removeClass("opened");
5632    }
5633  });
5634
5635  $(document).on("click", ".basket.fly", function (e) {
5636    e.stopPropagation();
5637  });
5638
5639  // - slide_right close
5640  $(document).on("click", function () {
5641    if ($(".right_slide.opened").length) {
5642      $(".jqmWindow.right_slide.opened").jqmHide();
5643    }
5644  });
5645
5646  $(document).on("click", ".right_slide.opened", function (e) {
5647    e.stopPropagation();
5648  });
5649
5650  // - COUNTER
5651  var timerBasketCounter = false;
5652
5653  // -- keyup input
5654  $(document).on("keydown", ".counter__count", function (e) {
5655    // Allow: backspace, delete, tab, escape, enter and .
5656    if (
5657      $.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
5658      // Allow: Ctrl+A, Command+A
5659      (e.keyCode === 65 && (e.ctrlKey === true || e.metaKey === true)) ||
5660      // Allow: home, end, left, right, down, up
5661      (e.keyCode >= 35 && e.keyCode <= 40)
5662    ) {
5663      // let it happen, don't do anything
5664      return;
5665    }
5666    // Ensure that it is a number and stop the keypress
5667    if ((e.shiftKey || e.keyCode < 48 || e.keyCode > 57) && (e.keyCode < 96 || e.keyCode > 105)) {
5668      e.preventDefault();
5669    }
5670  });
5671  $(document).on("keyup", ".counter__count", function (e) {
5672    var $this = $(this),
5673      counterInputValueNew = $this.val(),
5674      price = $this.closest(".buy_block").find("input[name=PRICE]").val();
5675
5676    Summ($this, counterInputValueNew, price);
5677  });
5678
5679  $("select.region").on("change", function () {
5680    var val = parseInt($(this).val());
5681    if ($("select.city").length) {
5682      if (val) {
5683        $("select.city").removeAttr("disabled");
5684        $("select.city option").hide();
5685        $("select.city option[data-parent_section=" + val + "]").show();
5686      } else $("select.city").attr("disabled", "disabled");
5687    }
5688  });
5689
5690  $("select.city, select.region").on("change", function () {
5691    var _this = $(this),
5692      val = parseInt(_this.val());
5693    if (_this.hasClass("region")) {
5694      $("select.city option:eq(0)").show();
5695      $("select.city").val(0);
5696    }
5697
5698    if ((_this.hasClass("region") && !val) || _this.hasClass("city")) {
5699      $.ajax({
5700        type: "POST",
5701        data: { ID: val },
5702      }).done(function (html) {
5703        var ob = BX.processHTML(html);
5704        $(".ajax_items")[0].innerHTML = ob.HTML;
5705        BX.ajax.processScripts(ob.SCRIPT);
5706      });
5707    }
5708  });
5709
5710  // -- blur input
5711  $(document).on("change", ".counter__count", function () {     
5712    BasketCounter($(this));
5713  });
5714
5715  // -- click minus, plus button
5716  $(document).on("click", ".counter__action", function (e) {
5717    e.stopPropagation();
5718    BasketCounter($(this));
5719  });
5720
5721  // - Add2Basket
5722  $(document).on("click", ".to_cart:not(.opt_action)", function (e) {
5723    e.stopPropagation();
5724
5725    var item = $(this).closest("[data-item]");
5726    var _this = $(this);
5727    var itemData = item.data("item");  
5728    var buyBlock = item.find(".buy_block");
5729    var buttonToCart = buyBlock.find(".to_cart");
5730    var itemQuantity = parseFloat(buttonToCart.data("quantity"));
5731    if (isNaN(itemQuantity) || itemQuantity <= 0) {
5732      itemQuantity = 1;
5733    }
5734    var countItem = $(".basket .count").length ? parseInt($(".basket .count").first().text()) : 0;
5735    $(".basket .count")
5736      .text(countItem + 1)
5737      .removeClass("empted");
5738
5739    var bBasketTop = $(".basket.top").length;
5740    var bBasketFly =
5741      typeof arAsproOptions["THEME"]["ORDER_BASKET_VIEW"] !== "undefined" && !bBasketTop && $(".basket.fly").length;
5742
5743    if (itemData && !isNaN(itemData.ID) && parseInt(itemData.ID) > 0) {
5744      if (typeof arBasketItems === "object" && typeof arBasketItems[itemData.ID] !== "object") {
5745        arBasketItems[itemData.ID] = { ID: itemData.ID, QUANTITY: itemQuantity };
5746      }
5747
5748      $.ajax({
5749        url: arAsproOptions["SITE_DIR"] + "include/footer/basket.php",
5750        type: "POST",
5751        data: { itemData: itemData, quantity: itemQuantity },
5752      }).done(function (html) {
5753        buyBlock.addClass("in");
5754
5755        var eventdata = { action: "loadForm" };
5756        BX.onCustomEvent("onCompleteAction", [eventdata, _this[0]]);
5757
5758        if (bBasketTop) {
5759          $(".ajax_basket").replaceWith(html);
5760        } else if (bBasketFly) {
5761          $(".ajax_basket").html($($.trim(html)).html());
5762        }
5763
5764        // show cart or notice
5765        if (typeof JNoticeSurface === "undefined") {
5766          if (bBasketTop) {
5767            $(".header-cart").addClass("opened");
5768
5769            if (typeof headerCartHideTimer !== "undefined") {
5770              clearTimeout(headerCartHideTimer);
5771            }
5772
5773            headerCartHideTimer = setTimeout(function () {
5774              $(".header-cart").removeClass("opened");
5775            }, 2000);
5776          } else if (bBasketFly) {
5777            setTimeout(function () {
5778              if (!$(".ajax_basket").hasClass("opened")) {
5779                $(".ajax_basket").addClass("opened");
5780              }
5781            }, 50);
5782          }
5783        } else {
5784          JNoticeSurface.get().onAdd2cart([item[0]]);
5785        }
5786
5787        var eventdata = { action: "loadBasket" };
5788        BX.onCustomEvent("onCompleteAction", [eventdata, $(html)]);
5789
5790        if (arAsproOptions["THEME"]["USE_SALE_GOALS"] != "N") {
5791          var eventdata = { goal: "goal_basket_add", params: { itemData: itemData, quantity: itemQuantity } };
5792          BX.onCustomEvent("onCounterGoals", [eventdata]);
5793        }
5794      });
5795    } else {
5796      $(this).parent().removeClass("loadings");
5797      return;
5798    }
5799  });
5800
5801  // - Remove9Basket
5802  $(document).on("click", ".remove", function (e) {
5803    e.stopPropagation();
5804
5805    var item = $(this).closest("[data-item]");
5806    var itemData = item.data("item");
5807    var bRemove = "Y";
5808    var bRemoveAll = $.trim($(this).closest("[data-remove_all]").data("remove_all")) === "Y" ? "Y" : false;
5809    var getCurUri = $.trim($("input[name=getPageUri]").val());
5810    var countItem = $(".basket .count").length
5811      ? parseInt($(".basket .count").first().text())
5812      : $(".basket.default").length
5813      ? $(".basket.default .cart__item").length
5814      : 0;
5815    var bOneItem = countItem - 1 <= 0;
5816    var scrollTop = $(".basket.fly").length
5817      ? $(".basket.fly .items_wrap").scrollTop()
5818      : $(".header-cart .basket.top").length
5819      ? $(".header-cart .basket.top .items").scrollTop()
5820      : "";
5821
5822    var bBasketTop = true &&
5823      $(".basket.top").length;
5824    var bBasketFly =
5825      typeof arAsproOptions["THEME"]["ORDER_BASKET_VIEW"] !== "undefined" && !bBasketTop && $(".basket.fly").length;
5826
5827    if (bRemoveAll) {
5828      arBasketItems = [];
5829    } else if (typeof arBasketItems === "object" && itemData && typeof arBasketItems[itemData.ID] === "object") {
5830      delete arBasketItems[itemData.ID];
5831    }
5832
5833    var _ajax = function () {
5834      $.ajax({
5835        url: arAsproOptions["SITE_DIR"] + "include/footer/basket.php",
5836        type: "POST",
5837        data: { itemData: itemData, remove: bRemove, removeAll: bRemoveAll },
5838      }).done(function (html) {
5839        if (bBasketTop) {
5840          $(".ajax_basket").replaceWith(html);
5841        } else if (bBasketFly) {
5842          $(".ajax_basket").html($($.trim(html)).html());
5843          $(".basket.fly .items_wrap").scrollTop(scrollTop);
5844        }
5845
5846        var eventdata = { action: "loadBasket" };
5847        BX.onCustomEvent("onCompleteAction", [eventdata, $(html)]);
5848
5849        if (getCurUri) {
5850          $.ajax({
5851            url: getCurUri,
5852            type: "POST",
5853          }).done(function (html) {
5854            if ($(".basket.default").length) {
5855              $(".basket.default").html(html);
5856            }
5857          });
5858        }
5859
5860        if (arAsproOptions["THEME"]["USE_SALE_GOALS"] != "N") {
5861          var eventdata = {
5862            goal: "goal_basket_remove",
5863            params: { itemData: itemData, remove: bRemove, removeAll: bRemoveAll },
5864          };
5865          BX.onCustomEvent("onCounterGoals", [eventdata]);
5866        }
5867      });
5868    };
5869
5870		const realItemID = itemData ? itemData.ID.split('_')[0] : '';
5871    if ((typeof itemData !== "undefined" && !isNaN(realItemID) && realItemID > 0) || bRemoveAll) {
5872      if (bRemoveAll) {
5873        $(".buy_block").removeClass("in");
5874        $(".basket .count").text(0).addClass("empted");
5875      } else {
5876        $(".basket .count")
5877          .text(countItem - 1)
5878          .removeClass("empted");
5879
5880        $("[data-item]").each(function () {
5881          if ($(this).data("item").ID == itemData.ID) {
5882            $(this).find(".buy_block").removeClass("in").find(".to_cart").data("quantity", 0);
5883            $(this).find(".buy_block").find(".counter__count").val(1);
5884          }
5885        });
5886      }
5887
5888      if (bOneItem || bRemoveAll) {
5889        $(".remove.all").remove();
5890
5891        $(".basket_wrap").fadeOut(200);
5892        setTimeout(function () {
5893          $(".basket .basket_empty").fadeIn(200);
5894          $(".basket.fly .wrap").addClass("empty-basket");
5895        }, 200);
5896        setTimeout(_ajax, 400);
5897      } else {
5898        item.animate({ opacity: 0 }, 200).slideUp(200, function () {
5899          _ajax();
5900        });
5901      }
5902    } else {
5903      return;
5904    }       
5905  });
5906
5907  $(document).on("click", ".print", function () {
5908    window.print();
5909  });
5910
5911  $(".choise").on("click", function () {
5912    var $this = $(this);
5913    if (typeof $this.data("block") !== "undefined") {
5914      var block = $this.attr("data-block");
5915
5916      try {
5917        var $block = BX(block) ? $("#" + block) : $(".detail-block." + block);
5918      } catch (e) {
5919        var $block = $(block);
5920      }
5921
5922      if ($block.length) {
5923        if ($block.closest(".tab-pane").length) {
5924          var offset = -206;
5925          if (typeof arAsproOptions !== "undefined") {
5926            offset = window.matchMedia("(max-width:991px)").matches
5927              ? arAsproOptions.THEME.HEADER_MOBILE_FIXED !== "Y" || arAsproOptions.THEME.HEADER_MOBILE_SHOW !== "ALWAYS"
5928                ? -187 + 62
5929                : -187
5930              : arAsproOptions.THEME.TOP_MENU_FIXED !== "Y"
5931              ? -206 + 81
5932              : -206;
5933          }
5934
5935          $block.data("offset", offset);
5936          $('.ordered-block a[href="#' + $block.closest(".tab-pane").attr("id") + '"]').click();
5937        }
5938
5939        scrollToBlock($block);
5940      }
5941    }
5942  });
5943
5944  // touch event
5945  document.addEventListener(
5946    "touchend",
5947    function (event) {
5948      if (!$(event.target).closest(".menu-item").length && !$(event.target).hasClass("menu-item")) {
5949        $(".mega-menu .dropdown-menu").css({ display: "none", opacity: 0 });
5950        $(".menu-item").removeClass("hover");
5951      }
5952      if (!$(event.target).closest(".menu.topest").length) {
5953        $(".menu.topest").css({ overflow: "hidden" });
5954        $(".menu.topest > li").removeClass("hover");
5955      }
5956      if (!$(event.target).closest(".full.has-child").length) {
5957        $(".menu_top_block.catalog_block li").removeClass("hover");
5958      }
5959      // if(!$(event.target).closest('.basket_block').length){
5960      //   $('.basket_block .link').removeClass('hover');
5961      //   $('.basket_block .basket_popup_wrapp').slideUp();
5962      // }
5963      // if(!$(event.target).closest('.catalog_item').length){
5964      //   var tabsContentUnhoverHover = $('.tab:visible').attr('data-unhover') * 1;
5965      //   $('.tab:visible').stop().animate({'height': tabsContentUnhoverHover}, 100);
5966      //   $('.tab:visible').find('.catalog_item').removeClass('hover');
5967      //   $('.tab:visible').find('.catalog_item .buttons_block').stop().fadeOut(233);
5968      //   if($('.catalog_block').length){
5969      //     $('.catalog_block').find('.catalog_item_wrapp').removeClass('hover');
5970      //     $('.catalog_block').find('.catalog_item').removeClass('hover');
5971      //   }
5972      // }
5973    },
5974    false
5975  );
5976
5977  touchMenu(".mega-menu .menu-item");
5978  touchTopMenu(".menu.topest li");
5979});
5980
5981function touchMenu(selector) {
5982  if (isMobile) {
5983    if ($(selector).length) {
5984      $(selector).each(function () {
5985        var th = $(this);
5986        th.on("touchend", function (e) {
5987          var _th = $(e.target).closest(".menu-item");
5988
5989          $(".menu.topest > li").removeClass("hover");
5990          $(".menu_top_block.catalog_block li").removeClass("hover");
5991
5992          if (_th.find(".dropdown-menu").length && !_th.hasClass("hover")) {
5993            e.preventDefault();
5994            e.stopPropagation();
5995            _th.siblings().removeClass("hover");
5996            _th.addClass("hover");
5997            $(".menu-row .dropdown-menu").css({ display: "none", opacity: 0 });
5998            if (_th.hasClass("menu-item")) {
5999              _th.closest(".dropdown-menu").css({ display: "block", opacity: 1 });
6000            }
6001            if (_th.find("> .wrap > .dropdown-menu")) {
6002              _th.find("> .wrap > .dropdown-menu").css({ display: "block", opacity: 1 });
6003            } else if (_th.find("> .dropdown-menu")) {
6004              _th.find("> .dropdown-menu").css({ display: "block", opacity: 1 });
6005            }
6006            CheckTopVisibleMenu();
6007          } else {
6008            var href = $(e.target).attr("href") ? $(e.target).attr("href") : $(e.target).closest("a").attr("href");
6009            if (href && href !== "undefined") location.href = href;
6010          }
6011        });
6012      });
6013    }
6014  } else {
6015    $(selector).off();
6016  }
6017}
6018
6019function touchTopMenu(selector) {
6020  if (isMobile) {
6021    if ($(selector).length) {
6022      $(selector).each(function () {
6023        var th = $(this);
6024        th.on("touchend", function (e) {
6025          var _th = $(e.target).closest("li");
6026
6027          $(".menu-item").removeClass("hover");
6028          $(".menu-item .dropdown-menu").css({ display: "none", opacity: 0 });
6029          $(".menu_top_block.catalog_block li").removeClass("hover");
6030
6031          if (_th.hasClass("more") && !_th.hasClass("hover")) {
6032            e.preventDefault();
6033            e.stopPropagation();
6034            _th.siblings().removeClass("hover");
6035            _th.addClass("hover");
6036            $(".menu.topest").css({ overflow: "visible" });
6037          } else {
6038            var href = $(e.target).attr("href") ? $(e.target).attr("href") : $(e.target).closest("a").attr("href");
6039            if (href && href !== "undefined") location.href = href;
6040          }
6041        });
6042      });
6043    }
6044  } else {
6045    $(selector).off();
6046  }
6047}
6048
6049scrollToBlock = function (block) {
6050  if ($(block).length) {
6051    scrollToBlock.last = block;
6052
6053    if (typeof $(block).data("toggle") !== "undefined") {
6054      $(block).click();
6055    }
6056
6057    var offset = -81 - 64;
6058    if (typeof $(block).data("offset") !== "undefined") {
6059      offset = $(block).data("offset");
6060    } else {
6061      if (typeof arAsproOptions !== "undefined") {
6062        offset = window.matchMedia("(max-width:991px)").matches
6063          ? arAsproOptions.THEME.HEADER_MOBILE_FIXED !== "Y" || arAsproOptions.THEME.HEADER_MOBILE_SHOW !== "ALWAYS"
6064            ? -43
6065            : -62 - 43
6066          : arAsproOptions.THEME.TOP_MENU_FIXED !== "Y"
6067          ? -43
6068          : -81 - 43;
6069
6070        if ($(block).hasClass("drag-block")) {
6071          offset += 43;
6072        }
6073      }
6074    }
6075
6076    offset = $(block).offset().top + offset;
6077
6078    $("body").addClass("scrolling-state");
6079    $("body, html").animate({ scrollTop: offset }, 500);
6080    setTimeout(function () {
6081      $("body").removeClass("scrolling-state");
6082    }, 500);
6083  }
6084};
6085
6086scrollToBlock.rescroll = function () {
6087  if (typeof scrollToBlock.last !== "undefined") {
6088    scrollToBlock(scrollToBlock.last);
6089  }
6090};
6091
6092// DIGITAL BASKET
6093function number_format(number, decimals, dec_point, thousands_sep) {
6094  number = (number + "").replace(/[^0-9+\-Ee.]/g, "");
6095  var n = !isFinite(+number) ? 0 : +number,
6096    prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
6097    sep = typeof thousands_sep === "undefined" ? "," : thousands_sep,
6098    dec = typeof dec_point === "undefined" ? "." : dec_point,
6099    s = "",
6100    toFixedFix = function (n, prec) {
6101      var k = Math.pow(10, prec);
6102      return "" + (Math.round(n * k) / k).toFixed(prec);
6103    };
6104
6105  // Fix for IE parseFloat(0.55).toFixed(0) = 0;
6106  s = (prec ? toFixedFix(n, prec) : "" + Math.round(n)).split(".");
6107
6108  if (s[0].length > 3) {
6109    s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
6110  }
6111
6112  if ((s[1] || "").length < prec) {
6113    s[1] = s[1] || "";
6114    s[1] += new Array(prec - s[1].length + 1).join("0");
6115  }
6116
6117  return s.join(dec);
6118}
6119
6120function setBasketItemsClasses() {
6121
6122    
6123  if (typeof arBasketItems !== "undefined" && typeof arBasketItems !== "string" && arBasketItems) {
6124    if (Object.keys(arBasketItems).length) {
6125      for (var key in arBasketItems) {
6126        $("[data-item]").each(function () {
6127          if ($(this).data("id") == key) {
6128            $(this).find(".buy_block").addClass("in"); 
6129            $(this).find(".buy_block .counter__count").val(arBasketItems[key].QUANTITY);
6130
6131            /*allin 25.03.2026*/    
6132            if (typeof globalPricesItems !== "undefined") {                
6133                if (globalPricesItems[key]) {
6134                    console.log('setPrice');
6135                    var newPrice = getPriceByRange(arBasketItems[key].QUANTITY, globalPricesItems[key]);
6136                    $(this).find(".price__new-val").html(newPrice + ' <span class="currency" itemprop="priceCurrency" content="RUB">руб</span>/штука<meta itemprop="price" content="' + newPrice + '"></span>');
6137                }
6138            }            
6139            /*allin 25.03.2026*/
6140            
6141            if ($(this).find("input[name=buy_services_" + key + "]")) {                   
6142              $(this)
6143                .find("input[name=buy_services_" + key + "]")
6144                .prop("checked", "checked");
6145            }
6146          }
6147        });
6148      }
6149    }
6150  }
6151}
6152function setCompareItemsClass() {
6153  if (typeof arAsproOptions === "object" && arAsproOptions && arAsproOptions["COMPARE_ITEMS"]) {
6154    if (arAsproOptions["COMPARE_ITEMS"].length > 0) {
6155      for (var key in arAsproOptions["COMPARE_ITEMS"]) {
6156        $(".js-item-action[data-action='compare']").each(function () {
6157          if ($(this).data("item_compare") && $(this).data("item_compare").ID == arAsproOptions["COMPARE_ITEMS"][key]) {
6158            $(this).parent().addClass("active");
6159            $(this).addClass("active");
6160            $(this).attr("title", $(this).data("title_compared"));
6161            if ($(this).find(".info-buttons__item-text").length) {
6162              $(this).find(".info-buttons__item-text").text($(this).data("title_compared"));
6163            }
6164          }
6165        });
6166      }
6167    }
6168  }
6169}
6170
6171function Summ(el, counterInputValueNew, price) {
6172  if (counterInputValueNew <= 0) {
6173    counterInputValueNew = 1;
6174  }
6175
6176  var summ = number_format(counterInputValueNew * price, 0, ".", " "),
6177    allSumm = 0;
6178
6179  el.closest(".cart")
6180    .find(".cart__item")
6181    .each(function () {
6182      var $this = $(this),
6183        price = parseFloat($this.find("input[name=PRICE]").val()),
6184        count = parseFloat($this.find(".counter__count").val());
6185
6186      if (count <= 0) {
6187        count = 1;
6188      }
6189
6190      if (!isNaN(price) && !isNaN(count)) {
6191        allSumm += count * price;
6192      }
6193    });
6194
6195  allSumm = number_format(parseFloat(allSumm), 0, ".", " ");
6196
6197  el.closest(".cart__item").find(".cart__item-summ .price_val").text(summ);
6198  el.closest(".basket").find(".foot .cart-total__value").text(allSumm);
6199}
6200
6201var timerBasketUpdate = false;
6202// - COUNTER
6203BasketCounter = function (el) {  
6204  var elClass = $.trim(el.attr("class")),
6205    bClassMinus = elClass.indexOf("counter__action--minus") > -1,
6206    bClassPlus = elClass.indexOf("counter__action--plus") > -1,
6207    bClassCount = elClass.indexOf("counter__count") > -1,
6208    getCurUri = $.trim($("input[name=getPageUri]").val()),
6209    buyBlock = el.closest(".buy_block"),
6210    buttonToCart = buyBlock.find(".to_cart"),
6211    counterWrapper = el.closest(".counter"),
6212    counterInput = counterWrapper.find(".counter__count"),
6213    counterInputValue = parseFloat($.trim(counterInput.val())),
6214    price = parseFloat(buyBlock.find("input[name=PRICE]").val()),
6215    counterInputMaxCount = Math.pow(10, parseInt(counterInput.attr("maxlength"))) - 1,
6216    bAjax = el.closest(".basket").length || counterWrapper.hasClass("js-ajax") ? true : false;
6217  var bBasket = el.closest(".basket").length;
6218
6219  // class minus button
6220  if (bClassMinus) {
6221    var counterInputValueNew = counterInputValue - 1;
6222
6223    if (counterInputValueNew <= 0) {
6224      counterInputValueNew = 1;
6225    }
6226
6227    counterInput.val(counterInputValueNew);
6228
6229    if (bAjax) {
6230      Summ(el, counterInputValueNew, price);
6231
6232      if (timerBasketUpdate) {
6233        clearTimeout(timerBasketUpdate);
6234        timerBasketUpdate = false;
6235      }
6236
6237      timerBasketUpdate = setTimeout(function () {
6238        BasketUpdate(el, counterInputValueNew, bBasket);
6239        timerBasketUpdate = false;
6240      }, 700);
6241    }
6242  }
6243  // class plus button
6244  else if (bClassPlus) {
6245    var counterInputValueNew = counterInputValue + 1;
6246
6247    if (counterInputValueNew > counterInputMaxCount) {
6248      counterInputValueNew = counterInputMaxCount;
6249    }
6250
6251    counterInput.val(counterInputValueNew);
6252
6253    if (bAjax) {
6254      Summ(el, counterInputValueNew, price);
6255
6256      if (timerBasketUpdate) {
6257        clearTimeout(timerBasketUpdate);
6258        timerBasketUpdate = false;
6259      }
6260
6261      timerBasketUpdate = setTimeout(function () {
6262        BasketUpdate(el, counterInputValueNew, bBasket);
6263        timerBasketUpdate = false;
6264      }, 700);
6265    }
6266  }
6267  // class input
6268  else if (bClassCount) {
6269    var counterInputValueNew = counterInputValue;
6270
6271    if (counterInputValueNew <= 0 || isNaN(counterInputValueNew)) {
6272      counterInputValueNew = 1;
6273    }
6274    el.val(counterInputValueNew);
6275
6276    if (bAjax) {
6277      BasketUpdate(el, counterInputValueNew, bBasket);
6278    }
6279  }
6280
6281  if (!getCurUri && !el.closest(".basket.fly").length) {            
6282    buttonToCart.data("quantity", counterInputValueNew);
6283  }
6284};
6285
6286BasketUpdate = function (el, counterInputValueNew, actualCounter) {
6287  var itemData = el.closest("[data-item]").data("item");
6288  
6289  if (typeof globalPricesItems !== "undefined") {
6290    //console.log(itemData['ID']);
6291    console.log(counterInputValueNew);
6292    console.log(globalPricesItems[itemData['ID']]);
6293
6294    //console.log(getPriceByRange(counterInputValueNew, globalPricesItems[itemData['ID']]));
6295    var newPrice = getPriceByRange(counterInputValueNew, globalPricesItems[itemData['ID']]);
6296    el.closest(".catalog-detail__buy-block").find(".price__new-val").html(newPrice + ' <span class="currency" itemprop="priceCurrency" content="RUB">руб</span>/штука<meta itemprop="price" content="' + newPrice + '"></span>');
6297  }    
6298    
6299  var itemData =
6300    typeof arBasketItems === "object" && typeof arBasketItems[itemData.ID] === "object"
6301      ? arBasketItems[itemData.ID]
6302      : itemData;
6303  var getCurUri = $.trim($("input[name=getPageUri]").val());
6304  var scrollTop = $(".basket.fly").length
6305    ? $(".basket.fly .items_wrap").scrollTop()
6306    : $(".header-cart .basket.top").length
6307    ? $(".header-cart .basket.top .items").scrollTop()
6308    : "";
6309
6310  var bBasketTop = true && $(".basket.top").length;
6311  var bBasketFly =
6312    typeof arAsproOptions["THEME"]["ORDER_BASKET_VIEW"] !== "undefined" && !bBasketTop && $(".basket.fly").length;
6313    
6314	//const realItemID = itemData ? itemData.ID.split('_')[0] : '';
6315    /*allin 27.03.2026*/
6316    const realItemID = itemData ? itemData.ID : '';
6317    /*allin 27.03.2026*/
6318    
6319  if (typeof itemData != "undefined" && !isNaN(realItemID) && realItemID > 0) {
6320    $.ajax({
6321      url: arAsproOptions["SITE_DIR"] + "include/footer/basket.php",
6322      type: "POST",
6323      data: { itemData: itemData, quantity: counterInputValueNew },
6324    }).done(function (html) {
6325      if (typeofExt(arBasketItems) === "object" || typeofExt(arBasketItems) === "array") {
6326        if (typeofExt(arBasketItems[itemData.ID]) === "object") {
6327          arBasketItems[itemData.ID]["QUANTITY"] = counterInputValueNew;
6328        }
6329      }
6330
6331      if (bBasketTop) {
6332        $(".ajax_basket").replaceWith(html);
6333      } else if (bBasketFly) {
6334        $(".ajax_basket").html($($.trim(html)).html());
6335        $(".basket.fly .items_wrap").scrollTop(scrollTop);
6336      }
6337
6338      var eventdata = { action: "loadBasket" };
6339      BX.onCustomEvent("onCompleteAction", [eventdata, $(html)]);
6340
6341      if (getCurUri) {
6342        $.ajax({
6343          url: getCurUri,
6344          type: "POST",
6345        }).done(function (html) {
6346          if ($(".basket.default").length) {
6347            $(".basket.default").html(html);
6348          }
6349        });
6350      }
6351    });
6352  } else {
6353    return;
6354  }
6355};
6356
6357CheckTabActive = function () {};
6358
6359/* parallax bg */
6360ParallaxBg = function () {
6361  if ($("*[data-type=parallax-bg]").length) {
6362    var x = $(window).scrollTop() / $(document).height();
6363    x = parseInt(-x * 280);
6364    $("*[data-type=parallax-bg]")
6365      .stop()
6366      .animate({ "background-position-y": x + "px" }, 400, "swing");
6367  }
6368};
6369
6370// Events
6371var timerScroll = false,
6372  ignoreScroll = [],
6373  documentScrollTopLast = $(document).scrollTop(),
6374  documentScrollTop = documentScrollTopLast;
6375$(window).scroll(function () {
6376  documentScrollTop = $(document).scrollTop();
6377
6378  if (!ignoreScroll.length) {
6379    if (timerScroll) {
6380      clearTimeout(timerScroll);
6381      timerScroll = false;
6382    }
6383    timerScroll = setTimeout(function () {
6384      BX.onCustomEvent("onWindowScroll", false);
6385    }, 100);
6386  }
6387
6388  documentScrollTopLast = $(document).scrollTop();
6389});
6390
6391var timerResize = false,
6392  ignoreResize = [];
6393
6394$(window).resize(function () {
6395  documentScrollTop = $(document).scrollTop();
6396
6397  CheckScrollToTop();
6398  // CheckTopMenuPadding();
6399  // CheckTopMenuOncePadding();
6400  // CheckSearchWidth();
6401
6402  if (!ignoreResize.length) {
6403    if (timerResize) {
6404      clearTimeout(timerResize);
6405      timerResize = false;
6406    }
6407    timerResize = setTimeout(function () {
6408      BX.onCustomEvent("onWindowResize", false);
6409    }, 100);
6410  }
6411
6412  /*if (
6413    typeof arAsproOptions !== "undefined" &&
6414    arAsproOptions["THEME"] &&
6415    arAsproOptions["THEME"]["COMPACT_FOOTER_MOBILE"] == "Y"
6416  ) {
6417    if (window.matchMedia("(max-width:767px)").matches) {
6418      $("footer").addClass("mobile");
6419      $(".bottom-menu .items>.wrap_compact_mobile").addClass("accordion-body collapse");
6420      $(".bottom-menu .items>.item-link").attr("data-toggle", "collapse");
6421    } else {
6422      $("footer").removeClass("mobile");
6423      $(".bottom-menu .items>.wrap_compact_mobile").removeClass("accordion-body collapse");
6424      $(".bottom-menu .items>.item-link").removeAttr("data-toggle");
6425    }
6426  }*/
6427
6428  documentScrollTopLast = $(document).scrollTop();
6429});
6430
6431BX.addCustomEvent("onWindowScroll", function (eventdata) {
6432  try {
6433    ignoreScroll.push(true);
6434    ParallaxBg();
6435
6436    if (arAsproOptions["THEME"]["TYPE_SEARCH"] != "fixed") {
6437      if (!$("header > .top-block").length) {
6438        var height_block = 0,
6439          scrollVal = $(window).scrollTop();
6440        height_block = $(".logo_and_menu-row").actual("outerHeight");
6441        if (!scrollVal) {
6442          $(".inline-search-block").css({
6443            height: height_block,
6444            "line-height": height_block - 4 + "px",
6445            top: -height_block,
6446          });
6447        }
6448      }
6449    }
6450
6451    //CheckTopMenuDotted();
6452  } catch (e) {
6453  } finally {
6454    ignoreScroll.pop();
6455  }
6456});
6457
6458BX.addCustomEvent("onWindowResize", function (eventdata) {
6459  try {
6460    ignoreResize.push(true);
6461
6462    CheckHeaderFixedMenu();
6463    CheckTopMenuDotted();
6464    CheckTopVisibleMenu();
6465    CheckFlexSlider();
6466    // CheckMainBannerSliderVText($(".banners-big .flexslider"));
6467    CheckObjectsSizes();
6468
6469    if (funcDefined("CoverPlayer")) {
6470      CoverPlayer();
6471    }
6472
6473    // verticalAlign();
6474    CheckTabActive();
6475    setTimeout(function () {
6476      createTableCompare(
6477        $(".main-block .items .title-block:not(.clone) .item"),
6478        $(".prop_title_table"),
6479        $(".main-block .prop_title_table .item.clone")
6480      );
6481    }, 100);
6482    SliceHeightBlocks();
6483
6484    if (funcDefined("checkMobileFilter")) {
6485      checkMobileFilter();
6486    }
6487
6488    if (window.matchMedia("(min-width: 992px)").matches) {
6489      // CloseMobileMenu();
6490      CloseMobilePhone();
6491    }
6492  } catch (e) {
6493  } finally {
6494    ignoreResize.pop();
6495  }
6496});
6497
6498BX.addCustomEvent("onSlide", function (eventdata) {
6499  try {
6500    ignoreResize.push(true);
6501
6502    if (eventdata) {
6503      var slider = eventdata.slider;
6504      var slideClass = ".banners-big__item";
6505      var jsDots = $(slider).siblings(".owl-carousel__dots--line");
6506      if (jsDots.length) {
6507        if (eventdata.data) {
6508          if (eventdata.data.relatedTarget) {
6509            var dotScroll = jsDots.find(".owl-carousel__dot-scroll");
6510            var dotsWidth = jsDots.width();
6511            if (dotScroll.length) {
6512              var owlOptions = eventdata.data.relatedTarget;
6513
6514              if (owlOptions) {
6515                var itemsCount = owlOptions._items.length;
6516                var itemsInRow = owlOptions.settings.items;
6517                var currentItem = owlOptions._current; // + 1;
6518
6519                //orig old
6520                //currentItem = currentItem < itemsInRow  ? itemsCount + itemsInRow - 1 : currentItem;
6521                //var offset = ((currentItem - itemsInRow) / itemsCount) * dotsWidth;
6522
6523                //new by use count clones in slider
6524                var clonesInStart = Math.ceil(itemsCount / 2);
6525                currentItem = currentItem < clonesInStart ? itemsCount + clonesInStart - 1 : currentItem;
6526                currentItem = currentItem === itemsCount + clonesInStart ? clonesInStart : currentItem;
6527                var offset = ((currentItem - clonesInStart) / itemsCount) * dotsWidth;
6528
6529                var styles = {
6530                  width: dotsWidth / itemsCount + "px",
6531                  display: "block",
6532                  left: offset,
6533                };
6534
6535                dotScroll.css(styles);
6536              }
6537            }
6538          }
6539        }
6540      }
6541      if (slider) {
6542        // add classes .curent & .shown to slide
6543        slider.find(slideClass).removeClass("current");
6544        var curSlideIndex = eventdata.data.item.index;
6545        var curSlide = slider.find(".owl-item:eq(" + curSlideIndex + ")" + " " + slideClass);
6546
6547        curSlide.addClass("current");
6548        curSlide.addClass("shown");
6549        slider.resize();
6550
6551        if (slider.closest(".blocks").length)
6552          slider.closest(".blocks").find(".flex-direction-nav li").addClass("initied");
6553
6554        if (slider.closest(".wraps").length)
6555          slider.closest(".wraps").find(".flex-direction-nav li").addClass("initied");
6556
6557        if (!slider.find(".flex-control-nav li").length && slider.hasClass("normal")) {
6558          slider.find(".flex-direction-nav li a").addClass("flex-disabled");
6559        }
6560
6561        if (slider.closest(".banners-big").length) {
6562          //nav flex color
6563          slider.find(".flex-control-nav li").removeClass();
6564
6565          // header color
6566          $("header").removeClass("light dark");
6567          if (typeof curSlide.data("color") != "undefined") {
6568            $("header").addClass(curSlide.data("color"));
6569          }
6570
6571          // logo color
6572          if (typeof window.headerLogo !== "undefined") {
6573            window.headerLogo.setColorOfBanner(curSlide[0]);
6574          }
6575        }
6576
6577        if (
6578          !slider.hasClass("flexslider-init-slice") &&
6579          slider.hasClass("nav-title") &&
6580          $(".gallery-block").closest(".tab-pane").hasClass("active")
6581        ) {
6582          slider.find(".item").sliceHeight({ lineheight: -3 });
6583          slider.addClass("flexslider-init-slice");
6584        }
6585
6586        if (slider.find(".flex-direction-nav").length) {
6587          if (slider.find(".flex-direction-nav").find("a.flex-disabled").length)
6588            slider.find(".flex-direction-nav").removeClass("opacity1").addClass("opacity0");
6589          else slider.find(".flex-direction-nav").removeClass("opacity0").addClass("opacity1");
6590        }
6591      }
6592    }
6593  } catch (e) {
6594  } finally {
6595    ignoreResize.pop();
6596  }
6597});
6598
6599BX.addCustomEvent("onSlideBefore", function (eventdata) {
6600  try {
6601    ignoreResize.push(true);
6602    if (eventdata) {
6603      var slider = eventdata.slider;
6604      if (slider) {
6605        if (slider.closest(".banners-big").length) {
6606          setTimeout(function () {
6607            var curSlide = slider.find(".banners-big__item.current");
6608
6609            //nav flex color
6610            slider.find(".flex-control-nav li").removeClass();
6611
6612            // header color
6613            $("header").removeClass("light dark");
6614            if (typeof curSlide.data("color") != "undefined") {
6615              slider.find(".flex-control-nav li").addClass(curSlide.data("color"));
6616              $("header").addClass(curSlide.data("color"));
6617            }
6618
6619            // logo color
6620            if (typeof window.headerLogo !== "undefined") {
6621              window.headerLogo.setColorOfBanner(curSlide[0]);
6622            }
6623          }, 100);
6624        } else if (slider.hasClass("top-bigs")) {
6625          setTimeout(function () {
6626            var index = slider.find(".item.flex-active-slide").data("slide_key");
6627            $(".bxSlider.top-small .slides").data("bxSlider").goToSlide(index);
6628            $(".bxSlider.top-small .slides li").removeClass("flex-active-slide");
6629            $('.bxSlider.top-small .slides li[data-slide_key="' + index + '"]').addClass("flex-active-slide");
6630          }, 100);
6631        }
6632      }
6633    }
6634  } catch (e) {
6635  } finally {
6636    ignoreResize.pop();
6637  }
6638});
6639
6640BX.addCustomEvent("onSlideEnd", function (eventdata) {
6641  try {
6642    ignoreResize.push(true);
6643    if (eventdata) {
6644      var slider = eventdata.slider;
6645    }
6646  } catch (e) {
6647  } finally {
6648    ignoreResize.pop();
6649  }
6650});
6651
6652var onCaptchaVerifyinvisible = function (response) {
6653  $(".g-recaptcha:last").each(function () {
6654    var id = $(this).attr("data-widgetid");
6655    if (typeof id !== "undefined" && response) {
6656      if (!$(this).closest("form").find(".g-recaptcha-response").val())
6657        $(this).closest("form").find(".g-recaptcha-response").val(response);
6658      if ($("iframe[src*=recaptcha]").length) {
6659        $("iframe[src*=recaptcha]").each(function () {
6660          var block = $(this).parent().parent();
6661          if (!block.hasClass("grecaptcha-badge")) block.css("width", "100%");
6662        });
6663      }
6664      if ($(this).closest("form").attr("name") == "form_comment") BX.submit(BX("form_comment"));
6665      else $(this).closest("form").submit();
6666    }
6667  });
6668};
6669
6670var onCaptchaVerifynormal = function (response) {
6671  $(".g-recaptcha").each(function () {
6672    var id = $(this).attr("data-widgetid");
6673    if (typeof id !== "undefined") {
6674      if (grecaptcha.getResponse(id) != "") {
6675        $(this).closest("form").find(".recaptcha").valid();
6676      }
6677    }
6678  });
6679};
6680
6681// on submit form
6682BX.addCustomEvent('onSubmitForm', function (eventdata) {
6683	try {
6684		if (
6685      typeof eventdata === 'object' &&
6686      eventdata &&
6687      eventdata.form
6688    ) {
6689      if (!(eventdata.form instanceof Node)) {
6690        eventdata.form = eventdata.form[0];
6691      }
6692
6693      const validateInputName  = `aspro_${arAsproOptions.SOLUTION_NAME}_form_validate`;
6694      if (!eventdata.form.querySelector(`[name="${validateInputName}"]`)) {
6695        eventdata.form.appendChild(
6696          BX.create('input', {
6697            attrs: {
6698              type: 'hidden',
6699              name: validateInputName,
6700            }
6701          })
6702        );
6703      }
6704
6705      (new Promise((resolve, reject) => {
6706        if (BX.Aspro?.Captcha) {
6707          BX.Aspro.Captcha.onSubmit(eventdata).then((result) => {
6708            resolve(result);
6709          }).catch((e) => {
6710            reject(e);
6711          });
6712
6713          return;
6714        }
6715
6716        resolve(true);
6717      })).then((result) => {
6718        if (result) {
6719          eventdata.form.submit();
6720          if (eventdata.form.closest('.form')) {
6721            eventdata.form.closest('.form').classList.add('sending');
6722          }
6723        }
6724      });
6725		}
6726	}
6727	catch (e) {
6728		console.error(e);
6729	}
6730});
6731
6732/* End */
6733;
6734; /* Start:"a:4:{s:4:"full";
6734s:61:"/bitrix/templates/aspro-priority2/js/custom.js?17764132196421";s:6:"source";s:46:"/bitrix/templates/aspro-priority2/js/custom.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
6735
6736document.addEventListener('DOMContentLoaded', function () {
6737  /* 1. Оборачиваем таблицы в responsive-контейнер */
6738  document.querySelectorAll('.tabs.price table').forEach(function (table) {
6739    if (!table.parentElement.classList.contains('table-responsive')) {
6740      const wrapper = document.createElement('div');
6741      wrapper.className = 'table-responsive';
6742      table.parentNode.insertBefore(wrapper, table);
6743      wrapper.appendChild(table);
6744    }
6745  });
6746
6747  /* 2. Добавляем подсказку для горизонтального скролла */
6748  document.querySelectorAll('.tabs.price .table-responsive').forEach(function (wrapper) {
6749    if (!wrapper.querySelector('.table-scroll-hint')) {
6750      const hint = document.createElement('div');
6751      hint.className = 'table-scroll-hint';
6752      hint.innerHTML = '<span class="table-scroll-hint__arrows">← →</span><span>свайп</span>';
6753      wrapper.appendChild(hint);
6754    }
6755  });
6756
6757  function updateScrollHints() {
6758    const isMobile = window.innerWidth <= 991;
6759
6760    document.querySelectorAll('.tabs.price .table-responsive').forEach(function (wrapper) {
6761      const table = wrapper.querySelector('table');
6762      const hint = wrapper.querySelector('.table-scroll-hint');
6763      if (!table || !hint) return;
6764
6765      const hasHorizontalScroll = table.scrollWidth > wrapper.clientWidth + 10;
6766
6767      if (isMobile && hasHorizontalScroll && wrapper.scrollLeft < 10) {
6768        hint.style.display = 'flex';
6769        hint.classList.remove('is-hidden');
6770      } else {
6771        hint.style.display = 'none';
6772        hint.classList.add('is-hidden');
6773      }
6774    });
6775  }
6776
6777  document.querySelectorAll('.tabs.price .table-responsive').forEach(function (wrapper) {
6778    wrapper.addEventListener('scroll', function () {
6779      const hint = wrapper.querySelector('.table-scroll-hint');
6780      if (!hint) return;
6781
6782      if (wrapper.scrollLeft > 10) {
6783        hint.classList.add('is-hidden');
6784        setTimeout(function () {
6785          hint.style.display = 'none';
6786        }, 250);
6787      }
6788    }, { passive: true });
6789  });
6790
6791  /* 3. Инициализация всех таб-контейнеров */
6792  document.querySelectorAll('.tabs.price').forEach(function (tabsBlock) {
6793    const tabLinks = tabsBlock.querySelectorAll(':scope > .nav.nav-tabs .nav-link');
6794    const panes = tabsBlock.querySelectorAll(':scope > .tab-content > .tab-pane');
6795
6796    if (!tabLinks.length || !panes.length) return;
6797
6798    function deactivateAll() {
6799      tabLinks.forEach(function (link) {
6800        link.classList.remove('active');
6801        link.setAttribute('aria-selected', 'false');
6802
6803        const li = link.closest('.nav-item');
6804        if (li) li.classList.remove('active');
6805      });
6806
6807      panes.forEach(function (pane) {
6808        pane.classList.remove('active');
6809      });
6810    }
6811
6812    function activateTab(link, setHash) {
6813      const targetSelector = link.getAttribute('href');
6814      if (!targetSelector || targetSelector.charAt(0) !== '#') return;
6815
6816      const targetPane = tabsBlock.querySelector(':scope > .tab-content > ' + targetSelector);
6817      if (!targetPane) return;
6818
6819      deactivateAll();
6820
6821      link.classList.add('active');
6822      link.setAttribute('aria-selected', 'true');
6823
6824      const li = link.closest('.nav-item');
6825      if (li) li.classList.add('active');
6826
6827      targetPane.classList.add('active');
6828
6829      if (setHash) {
6830        history.replaceState(null, '', targetSelector);
6831      }
6832
6833      setTimeout(updateScrollHints, 50);
6834    }
6835
6836    tabLinks.forEach(function (link) {
6837      link.addEventListener('click', function (e) {
6838        e.preventDefault();
6839        activateTab(link, false);
6840      });
6841    });
6842
6843    let currentActiveLink = tabsBlock.querySelector(':scope > .nav.nav-tabs .nav-link.active');
6844    if (!currentActiveLink) {
6845      const activeLiLink = tabsBlock.querySelector(':scope > .nav.nav-tabs .nav-item.active .nav-link');
6846      if (activeLiLink) currentActiveLink = activeLiLink;
6847    }
6848    if (!currentActiveLink) {
6849      currentActiveLink = tabLinks[0];
6850    }
6851
6852    activateTab(currentActiveLink, false);
6853  });
6854
6855  /* 4. Если в URL есть hash — пробуем открыть соответствующую вкладку */
6856  if (window.location.hash) {
6857    const hashLink = document.querySelector('.tabs.price .nav-link[href="' + window.location.hash + '"]');
6858    if (hashLink) {
6859      hashLink.click();
6860
6861      setTimeout(function () {
6862        const target = document.querySelector(window.location.hash);
6863        if (target) {
6864          target.scrollIntoView({ behavior: 'smooth', block: 'start' });
6865        }
6866      }, 100);
6867    }
6868  }
6869
6870  /* 5. Обновление при загрузке и ресайзе */
6871  updateScrollHints();
6872  window.addEventListener('resize', updateScrollHints);
6873  
6874
6875  function clearTableHover(table) {
6876    table.querySelectorAll('.hover-row, .hover-col, .hover-cell').forEach(function (cell) {
6877      cell.classList.remove('hover-row', 'hover-col', 'hover-cell');
6878    });
6879  }
6880
6881  function bindCrossHoverForTabsTables() {
6882    document.querySelectorAll('.tabs.price table').forEach(function (table) {
6883      if (table.dataset.crossReady === 'true') return;
6884      table.dataset.crossReady = 'true';
6885
6886      table.addEventListener('mouseover', function (e) {
6887        if (window.innerWidth <= 991) return;
6888
6889        const cell = e.target.closest('td, th');
6890        if (!cell || !table.contains(cell)) return;
6891
6892        const row = cell.parentElement;
6893        if (!row) return;
6894
6895        const cellsInRow = Array.from(row.children);
6896        const colIndex = cellsInRow.indexOf(cell);
6897        if (colIndex === -1) return;
6898
6899        clearTableHover(table);
6900
6901        Array.from(row.children).forEach(function (c) {
6902          c.classList.add('hover-row');
6903        });
6904
6905        table.querySelectorAll('tr').forEach(function (tr) {
6906          if (tr.children[colIndex]) {
6907            tr.children[colIndex].classList.add('hover-col');
6908          }
6909        });
6910
6911        cell.classList.add('hover-cell');
6912      });
6913
6914      table.addEventListener('mouseleave', function () {
6915        clearTableHover(table);
6916      });
6917    });
6918  }
6919
6920  bindCrossHoverForTabsTables();
6921
6922  window.addEventListener('resize', function () {
6923    document.querySelectorAll('.tabs.price table').forEach(function (table) {
6924      clearTableHover(table);
6925    });
6926  });
6927
6928  setTimeout(bindCrossHoverForTabsTables, 200);
6929
6930  
6931});
6932             
6933                
6934/* End */
6935;
6936; /* Start:"a:4:{s:4:"full";s:63:"/bitrix/templates/aspro-priority2/js/logo.min.js?17635572774068";s:6:"source";s:44:"/bitrix/templates/aspro-priority2/js/logo.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
6937if(void 0===window.JLogo){let readyFunc;window.JLogo=function(node,params){var _private={inited:!1};Object.defineProperties(this,{inited:{get:function(){return _private.inited},set:function(value){value&&(_private.inited=!0)}},node:{get:function(){return node}},img:{get:function(){return node?node.querySelector("img"):null}},svg:{get:function(){return node?node.querySelector("svg"):null}}}),this.params=function(key){if("object"==typeof params&&void 0!==key&&Object.keys(params).indexOf(key)>-1)return params[key]},this.init()},window.JLogo.prototype={get src(){return this.img?this.img.getAttribute("src"):""},set src(value){this.img&&this.img.setAttribute("src",value)},get srcDark(){return arAsproOptions.THEME.LOGO_IMAGE},get srcLight(){return arAsproOptions.THEME.LOGO_IMAGE_WHITE},get color(){if(this.img){let src=this.src;return src===this.srcDark?"dark":src===this.srcLight?"light":""}return""},set color(value){this.canChangeColor&&this.color!==value&&(this.src="light"===value?this.srcLight:this.srcDark)},get isCustomHeader(){return Boolean(this.node.closest(".header-custom"))},get isMainLogo(){return Boolean(this.node.closest("header"))},get isMenuFilledDark(){return this.img&&Boolean(this.img.closest(".bg-theme, .bg-dark"))},get isHeaderHasOffset(){return this.img&&Boolean(this.img.closest(".header--offset"))},get onBanner(){return this.isMainLogo&&Boolean(BX.hasClass(document.body,"header_opacity"))},get onTopPart(){return this.img&&Boolean(this.img.closest(".header__top-part"))},get onTransparentRow(){return this.img&&(Boolean(this.img.closest(".header .dynamic-color"))||this.onTopPart&&this.isHeaderHasOffset||Boolean(this.img.closest(".header .dynamic-color"))&&!this.isHeaderHasOffset)},get allowChangeBySlider(){return this.onBanner&&this.onTransparentRow&&!this.isCustomHeader},get canChangeColor(){return this.img&&this.srcLight&&!this.allowChangeBySlider&&!(this.onTopPart&&this.isMenuFilledDark&&!this.isHeaderHasOffset)&&!(!this.onTopPart&&this.isMenuFilledDark)},setColorOfBanner:function(banner){this.img&&banner&&void 0!==window.headerLogo&&(value=BX.data(banner,"color"),value=value||"dark",this.color!==value&&this.node.setAttribute("src","light"===value?this.srcLight:this.srcDark))},get isPreferColor(){return BX.hasClass(document.body,"theme-default")},get preferColor(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},get themeColor(){return this.isPreferColor?this.preferColor:BX.hasClass(document.body,"theme-dark")?"dark":"light"},init:function(){this.inited||(this.inited=!0,this.img&&!this.isCustomHeader&&(this.color=this.isMenuFilledDark?"light":this.getInvertedColor(this.themeColor),this.bindEvents()))},getInvertedColor:function(value){return"default"===value&&(value=this.preferColor),"light"===value?"dark":"dark"===value?"light":""},bindEvents:function(){"function"==typeof this.handlers.onChangePrefersColorScheme&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",BX.proxy(this.handlers.onChangePrefersColorScheme,this)),"function"==typeof this.handlers.onChangeThemeColor&&BX.addCustomEvent("onChangeThemeColor",BX.proxy(this.handlers.onChangeThemeColor,this))},unbindEvents:function(){},handlers:{onChangePrefersColorScheme:function(event){event||(event=window.event);
6937let newColor=event.matches?"dark":"light";this.isPreferColor&&(this.color=this.getInvertedColor(newColor)),BX.setCookie("prefers-color-scheme",newColor)},onChangeThemeColor:function(eventdata){"object"==typeof eventdata&&eventdata&&"value"in eventdata&&(this.color=this.getInvertedColor(eventdata.value))}}},("function"==typeof readyDOM?readyDOM:BX.ready)((function(){window.headerLogo=new JLogo(document.querySelector("header .logo")),window.headerfixedLogo=new JLogo(document.querySelector("#headerfixed .header .logo")),window.mobileheaderLogo=new JLogo(document.querySelector("#mobileheader .mobileheader .logo")),window.mobilemenuLogo=new JLogo(document.querySelector("#mobilemenu .mobilemenu .logo")),BX.setCookie("prefers-color-scheme",window.headerLogo.preferColor)}))}
6938/* End */
6939;
6940; /* Start:"a:4:{s:4:"full";s:64:"/bitrix/templates/aspro-priority2/js/phones.min.js?1763557277633";s:6:"source";s:46:"/bitrix/templates/aspro-priority2/js/phones.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
6941$(document).ready((function(){$(".phones__inner").hover((function(e){let rect=$(this)[0].getBoundingClientRect(),$dropdown=$(this).find(".phones__dropdown");if($dropdown.length){let dropdown_rect=$dropdown[0].getBoundingClientRect(),dropdown_top=-20,dropdown_left=-16;dropdown_rect.right>document.body.clientWidth&&$dropdown.css("left",document.body.clientWidth-dropdown_rect.right+dropdown_left+"px"),$(this).closest(".footer__phone").length&&(window.scrollY+rect.y+dropdown_top+$dropdown[0].scrollHeight<=document.body.clientHeight?$dropdown.removeClass("phones__dropdown--top"):$dropdown.addClass("phones__dropdown--top"))}}))}));
6942/* End */
6943;
6944; /* Start:"a:4:{s:4:"full";s:94:"/bitrix/templates/aspro-priority2/components/bitrix/menu/menu_new/script.min.js?17635572772205";s:6:"source";s:75:"/bitrix/templates/aspro-priority2/components/bitrix/menu/menu_new/script.js";s:3:"min";s:79:"/bitrix/templates/aspro-priority2/components/bitrix/menu/menu_new/script.min.js";s:3:"map";s:83:"/bitrix/templates/aspro-priority2/components/bitrix/menu/menu_new/script.min.js.map";}"*/
6945$(document).ready((function(){$(document).on("click",".header-menu__wide-submenu-item-inner .toggle_block",(function(e){e.preventDefault();const $menuContainer=e.target.closest(".header-menu__dropdown-menu-inner.header-menu__dropdown-menu--grids"),$parentContainer=e.target.closest(".header-menu__wide-limiter"),menuContainerCurrentWidth=$menuContainer.offsetWidth,_this=$(this),$menu=_this.closest(".header-menu__wide-submenu-item-inner").find("> .submenu-wrapper");_this.hasClass("clicked")||(_this.addClass("clicked"),$menu.slideToggle({duration:150,done:function(){_this.removeClass("clicked")},step:function(){if(menuContainerCurrentWidth!==$menuContainer.offsetWidth){const paddingRight=window.getComputedStyle($parentContainer,null).paddingRight;$parentContainer.style.paddingRight=parseInt(paddingRight)-(menuContainerCurrentWidth-$menuContainer.offsetWidth)+"px"}}}),_this.closest(".header-menu__wide-submenu-item-inner").toggleClass("opened"))})),$(document).on("click",".header-menu__wide-submenu-item--more_items",(function(e){e.stopImmediatePropagation();const $menuContainer=e.target.closest(".header-menu__dropdown-menu-inner.header-menu__dropdown-menu--grids"),$parentContainer=e.target.closest(".header-menu__wide-limiter"),menuContainerCurrentWidth=$menuContainer.offsetWidth,_this=$(this),bOpened=_this.hasClass("opened"),childSpan=_this.find("span"),childSvg=childSpan.find(".svg"),parent=_this.closest(".header-menu__wide-submenu"),collapsed=parent.find(".collapsed"),useDelimetr=parent.hasClass("header-menu__wide-submenu--delimiter"),lastSeparator=parent.find(".last-visible"),obAnimation={duration:200,step:function(){if(menuContainerCurrentWidth!==$menuContainer.offsetWidth){const paddingRight=window.getComputedStyle($parentContainer,null).paddingRight;$parentContainer.style.paddingRight=parseInt(paddingRight)-(menuContainerCurrentWidth-$menuContainer.offsetWidth)+"px"}}};collapsed.length&&(useDelimetr?(collapsed.fadeToggle(obAnimation),lastSeparator.length&&lastSeparator.fadeToggle(obAnimation)):collapsed.slideToggle(obAnimation),childSpan.text(BX.message(bOpened?"SHOW":"HIDE")).append(childSvg),_this.toggleClass("opened"))}))}));
6946/* End */
6947;
6948; /* Start:"a:4:{s:4:"full";s:89:"/bitrix/templates/aspro-priority2/components/bitrix/menu/left/script.min.js?1763557277908";s:6:"source";
6948s:71:"/bitrix/templates/aspro-priority2/components/bitrix/menu/left/script.js";s:3:"min";s:75:"/bitrix/templates/aspro-priority2/components/bitrix/menu/left/script.min.js";s:3:"map";s:79:"/bitrix/templates/aspro-priority2/components/bitrix/menu/left/script.min.js.map";}"*/
6949$(document).on("click",".slide-block .slide-block__head",(function(e){var _this=$(this),menu=_this.siblings(".slide-block__body"),bVisibleMeu=menu.is(":visible");if(!_this.hasClass("clicked")&&menu.length&&!_this.hasClass("ignore")&&!$(e.target).attr("href")){var type=_this.data("id");_this.addClass("clicked"),bVisibleMeu?($.cookie(type+"_CLOSED","Y",{path:"/"}),menu.slideUp()):($.removeCookie(type+"_CLOSED",{path:"/"}),menu.slideDown()),_this.toggleClass("closed"),_this.removeClass("clicked")}})),$(document).on("click",".side-menu .toggle_block",(function(e){var _this=$(this),menu=_this.closest(".child").find("> .submenu-wrapper"),bVisibleMeu=menu.is(":visible");_this.hasClass("clicked")||(_this.addClass("clicked"),menu.slideToggle(150,(function(){_this.removeClass("clicked")})),_this.toggleClass("closed")),_this.closest(".child").toggleClass("opened")}));
6950/* End */
6951;
6952; /* Start:"a:4:{s:4:"full";s:91:"/bitrix/templates/aspro-priority2/components/bitrix/menu/bottom/script.min.js?1763557277266";s:6:"source";s:73:"/bitrix/templates/aspro-priority2/components/bitrix/menu/bottom/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
6953$(document).on("click",".bottom-menu .items > .item-link.item-link--child",(function(t){if(window.matchMedia("(max-width:767px)").matches){var e=$(this);t.target.getAttribute("href")||(e.next(".wrap_compact_mobile").stop().slideToggle(),e.toggleClass("opened"))}}));
6954/* End */
6955;
6956; /* Start:"a:4:{s:4:"full";s:97:"/bitrix/components/aspro/marketing.popup.priority2/templates/.default/script.min.js?1763557091947";s:6:"source";s:79:"/bitrix/components/aspro/marketing.popup.priority2/templates/.default/script.js";s:3:"min";s:83:"/bitrix/components/aspro/marketing.popup.priority2/templates/.default/script.min.js";s:3:"map";s:87:"/bitrix/components/aspro/marketing.popup.priority2/templates/.default/script.min.js.map";}"*/
6957$(document).on("click",".dyn_mp_jqm_frame .popup-text-info__btn .btn",(function(){var closeBtn=$(this).closest(".dyn_mp_jqm_frame").find(".jqmClose");closeBtn.length&&closeBtn.trigger("click")})),$(document).ready((function(){if($(".dyn_mp_jqm").length){var allDelays=[];$(".dyn_mp_jqm").each((function(i,el){var jqmBlock=$(el),delay=0;if(!jqmBlock.hasClass("initied")){for(jqmBlock.addClass("initied"),jqmBlock.data("param-delay")&&(delay=1e3*jqmBlock.data("param-delay"));-1!==allDelays.indexOf(delay);)delay+=1e3;if(allDelays.push(delay),"undefined"!=typeof localStorage){var dataLS=localStorage.getItem(jqmBlock.data("ls")),ls="";try{ls=JSON.parse(dataLS)}catch(e){ls=dataLS}(!ls||ls&&ls.TIMESTAMP<Date.now()&&ls.TIMESTAMP)&&(timeoutID=setTimeout((function(){jqmBlock.click()}),delay))}else{var ls;(ls=$.cookie(jqmBlock.data("ls")))||(timeoutID=setTimeout((function(){jqmBlock.click()}),delay))}}}))}}));
6958/* End */
6959;
6960; /* Start:"a:4:{s:4:"full";s:67:"/bitrix/components/bitrix/search.title/script.min.js?17694356126573";s:6:"source";s:48:"/bitrix/components/bitrix/search.title/script.js";s:3:"min";s:52:"/bitrix/components/bitrix/search.title/script.min.js";s:3:"map";s:52:"/bitrix/components/bitrix/search.title/script.map.js";}"*/
6961function JCTitleSearch(t){var e=this;this.arParams={AJAX_PAGE:BX.util.htmlspecialcharsback(t.AJAX_PAGE),CONTAINER_ID:t.CONTAINER_ID,INPUT_ID:t.INPUT_ID,MIN_QUERY_LEN:parseInt(t.MIN_QUERY_LEN,10)};if(t.WAIT_IMAGE){this.arParams.WAIT_IMAGE=t.WAIT_IMAGE}if(this.arParams.MIN_QUERY_LEN<=0){this.arParams.MIN_QUERY_LEN=1}this.cache=[];this.cache_key=null;this.startText="";this.running=false;this.runningCall=false;this.currentRow=-1;this.RESULT=null;this.CONTAINER=null;this.INPUT=null;this.WAIT=null;this.ShowResult=function(t){if(BX.type.isString(t)){e.RESULT.innerHTML=t}e.RESULT.style.display=e.RESULT.innerHTML===""?"none":"block";var s=e.adjustResultNode();var i=null;var n=null;var l=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(l){n=BX.findChild(l,{tag:"th"},true)}if(n){var r=BX.pos(l);r.width=r.right-r.left;var a=BX.pos(n);a.width=a.right-a.left;n.style.width=a.width+"px";e.RESULT.style.width=s.width+a.width+"px";e.RESULT.style.left=s.left-a.width-1+"px";if(r.width-a.width>s.width){e.RESULT.style.width=s.width+a.width-1+"px"}r=BX.pos(l);i=BX.pos(e.RESULT);if(i.right>r.right){e.RESULT.style.width=r.right-r.left+"px"}}var o=false;if(l){o=BX.findChild(e.RESULT,{class:"title-search-fader"},true)}if(o&&n){i=BX.pos(e.RESULT);o.style.left=i.right-i.left-18+"px";o.style.width=18+"px";o.style.top=0+"px";o.style.height=i.bottom-i.top+"px";o.style.display="block"}};this.onKeyPress=function(t){var s=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(!s){return false}var i=0;var n=s.rows.length;switch(t){case 27:e.RESULT.style.display="none";e.currentRow=-1;e.UnSelectAll();return true;case 40:if(e.RESULT.style.display=="none"){e.RESULT.style.display="block"}var l=-1;for(i=0;i<n;i++){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){if(l==-1){l=i}if(e.currentRow<i){e.currentRow=i;break}else if(s.rows[i].className=="title-search-selected"){s.rows[i].className=""}}}if(i==n&&e.currentRow!=i){e.currentRow=l}s.rows[e.currentRow].className="title-search-selected";return true;case 38:if(e.RESULT.style.display=="none"){e.RESULT.style.display="block"}var r=-1;for(i=n-1;i>=0;i--){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){if(r==-1){r=i}
6961if(e.currentRow>i){e.currentRow=i;break}else if(s.rows[i].className=="title-search-selected"){s.rows[i].className=""}}}if(i<0&&e.currentRow!=i){e.currentRow=r}s.rows[e.currentRow].className="title-search-selected";return true;case 13:if(e.RESULT.style.display=="block"){for(i=0;i<n;i++){if(e.currentRow==i&&!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){var a=BX.findChild(s.rows[i],{tag:"a"},true);if(a){window.location=a.href;return true}}}}return false;default:break}return false};this.onTimeout=function(){e.onChange((function(){setTimeout(e.onTimeout,500)}))};this.onChange=function(t){if(e.running){e.runningCall=true;return}e.running=true;if(e.INPUT.value!=e.oldValue&&e.INPUT.value!=e.startText){e.oldValue=e.INPUT.value;if(e.INPUT.value.length>=e.arParams.MIN_QUERY_LEN){e.cache_key=e.arParams.INPUT_ID+"|"+e.INPUT.value;if(e.cache[e.cache_key]==null){if(e.WAIT){var s=BX.pos(e.INPUT);var i=s.bottom-s.top-2;e.WAIT.style.top=s.top+1+"px";e.WAIT.style.height=i+"px";e.WAIT.style.width=i+"px";e.WAIT.style.left=s.right-i+2+"px";e.WAIT.style.display="block"}BX.ajax.post(e.arParams.AJAX_PAGE,{ajax_call:"y",INPUT_ID:e.arParam
6961s.INPUT_ID,q:e.INPUT.value,l:e.arParams.MIN_QUERY_LEN},(function(s){e.cache[e.cache_key]=s;e.ShowResult(s);e.currentRow=-1;e.EnableMouseEvents();if(e.WAIT){e.WAIT.style.display="none"}if(!!t){t()}e.running=false;if(e.runningCall){e.runningCall=false;e.onChange()}}));return}e.ShowResult(e.cache[e.cache_key]);e.currentRow=-1;e.EnableMouseEvents()}else{e.RESULT.style.display="none";e.currentRow=-1;e.UnSelectAll()}}if(!!t){t()}e.running=false};this.onScroll=function(){if(BX.type.isElementNode(e.RESULT)&&e.RESULT.style.display!=="none"&&e.RESULT.innerHTML!==""){e.adjustResultNode()}};this.UnSelectAll=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(t){var s=t.rows.length;for(var i=0;i<s;i++){t.rows[i].className=""}}};this.EnableMouseEvents=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(t){var s=t.rows.length;for(var i=0;i<s;i++){if(!BX.findChild(t.rows[i],{class:"title-search-separator"},true)){t.rows[i].id="row_"+i;t.rows[i].onmouseover=function(t){if(e.currentRow!=this.id.substr(4)){e.UnSelectAll();this.className="title-search-selected";e.currentRow=this.id.substr(4)}};t.rows[i].onmouseout=function(t){this.className="";e.currentRow=-1}}}}};this.onFocusLost=function(t){setTimeout((function(){e.RESULT.style.display="none"}),250)};this.onFocusGain=function(){if(e.RESULT.innerHTML.length>0){e.ShowResult()}};this.onKeyDown=function(t){if(!t){t=window.event}if(e.RESULT.style.display=="block"&&e.onKeyPress(t.keyCode)){return BX.PreventDefault(t)}};this.adjustResultNode=function(){if(!(BX.type.isElementNode(e.RESULT)&&BX.type.isElementNode(e.CONTAINER))){return{top:0,right:0,bottom:0,left:0,width:0,height:0}}var t=BX.pos(e.CONTAINER);e.RESULT.style.position="absolute";e.RESULT.style.top=t.bottom+2+"px";e.RESULT.style.left=t.left+"px";e.RESULT.style.width=t.width+"px";return t};this.onContainerLayoutChange=function(){if(BX.type.isElementNode(e.RESULT)&&e.RESULT.style.display!=="none"&&e.RESULT.innerHTML!==""){e.adjustResultNode()}};this.Init=function(){this.CONTAINER=document.getElementById(this.arParams.CONTAINER_ID);BX.addCustomEvent(this.CONTAINER,"OnNodeLayoutChange",this.onContainerLayoutChange);this.RESULT=document.body.appendChild(document.createElement("DIV"));this.RESULT.className="title-search-result";this.INPUT=document.getElementById(this.arParams.INPUT_ID);this.startText=this.INPUT.value;this.oldValue=this.INPUT.value;BX.bind(this.INPUT,"focus",(function(){e.onFocusGain()}));BX.bind(this.INPUT,"blur",(function(){e.onFocusLost()}));this.INPUT.onkeydown=this.onKeyDown;if(this.arParams.WAIT_IMAGE){this.WAIT=document.body.appendChild(document.createElement("DIV"));this.WAIT.style.backgroundImage="url('"+this.arParams.WAIT_IMAGE+"')";if(!BX.browser.IsIE()){this.WAIT.style.backgroundRepeat="none"}this.WAIT.style.display="none";this.WAIT.style.position="absolute";this.WAIT.style.zIndex="1100"}BX.bind(this.INPUT,"bxchange",(function(){e.onChange()}));var t=BX.findParent(this.CONTAINER,BX.is_fixed);if(BX.type.isElementNode(t)){BX.bind(window,"scroll",BX.throttle(this.onScroll,100,this))}};BX.ready((function(){e.Init(t)}))}
6962/* End */
6963;
6964; /* Start:"a:4:{s:4:"full";s:99:"/bitrix/templates/aspro-priority2/components/bitrix/search.title/fixed/script.min.js?17635572777482";s:6:"source";s:80:"/bitrix/templates/aspro-priority2/components/bitrix/search.title/fixed/script.js";s:3:"min";s:84:"/bitrix/templates/aspro-priority2/components/bitrix/search.title/fixed/script.min.js";s:3:"map";s:88:"/bitrix/templates/aspro-priority2/components/bitrix/search.title/fixed/script.min.js.map";}"*/
6965function JCTitleSearch2(arParams){var _this=this;this.arParams={AJAX_PAGE:arParams.AJAX_PAGE,CONTAINER_ID:arParams.CONTAINER_ID,INPUT_ID:arParams.INPUT_ID,INPUT_ID_TMP:arParams.INPUT_ID_TMP,TYPE:arParams.TYPE||"normal",MIN_QUERY_LEN:parseInt(arParams.MIN_QUERY_LEN)},arParams.WAIT_IMAGE&&(this.arParams.WAIT_IMAGE=arParams.WAIT_IMAGE),arParams.MIN_QUERY_LEN<=0&&(arParams.MIN_QUERY_LEN=1),this.cache=[],this.cache_key=null,this.startText="",this.running=!1,this.needRunAgain=!1,this.currentRow=-1,this.RESULT=null,this.CONTAINER=null,this.INPUT=null,this.WAIT=null,this.ShowResult=function(result){BX.type.isString(result)&&(_this.RESULT.innerHTML=result),_this.RESULT.style.display=""!==_this.RESULT.innerHTML?"block":"none";var pos=_this.adjustResultNode(),res_pos,th,tbl=BX.findChild(_this.RESULT,{tag:"table",class:"title-search-result"},!0),fade;if(tbl&&(th=BX.findChild(tbl,{tag:"th"},!0)),th){var tbl_pos=BX.pos(tbl);tbl_pos.width=tbl_pos.right-tbl_pos.left;var th_pos=BX.pos(th);th_pos.width=th_pos.right-th_pos.left,th.style.width=th_pos.width+"px",_this.RESULT.style.width=pos.width+th_pos.width+"px",_this.RESULT.style.left=pos.left-th_pos.width-1+"px",tbl_pos.width-th_pos.width>pos.width&&(_this.RESULT.style.width=pos.width+th_pos.width-1+"px"),tbl_pos=BX.pos(tbl),(res_pos=BX.pos(_this.RESULT)).right>tbl_pos.right&&(_this.RESULT.style.width=tbl_pos.right-tbl_pos.left+"px")}tbl&&(fade=BX.findChild(_this.RESULT,{class:"title-search-fader"},!0)),fade&&th&&(res_pos=BX.pos(_this.RESULT),fade.style.left=res_pos.right-res_pos.left-18+"px",fade.style.width="18px",fade.style.top="0px",fade.style.height=res_pos.bottom-res_pos.top+"px",fade.style.display="block"),"function"==typeof InitScrollBar&&InitScrollBar()},this.onKeyPress=function(keyCode){var tbl=BX.findChild(_this.RESULT,{tag:"table",class:"title-search-result"},!0),i;if(!tbl)return!1;var cnt=tbl.rows.length;switch(keyCode){case 27:return _this.RESULT.style.display="none",_this.currentRow=-1,_this.UnSelectAll(),!0;case 40:"none"==_this.RESULT.style.display&&(_this.RESULT.style.display="block");var first=-1;for(i=0;i<cnt;i++)if(!BX.findChild(tbl.rows[i],{class:"title-search-separator"},!0)){if(-1==first&&(first=i),_this.currentRow<i){_this.currentRow=i;break}"title-search-selected"==tbl.rows[i].className&&(tbl.rows[i].className="")}return i==cnt&&_this.currentRow!=i&&(_this.currentRow=first),tbl.rows[_this.currentRow].className="title-search-selected",!0;case 38:"none"==_this.RESULT.style.display&&(_this.RESULT.style.display="block");var last=-1;for(i=cnt-1;i>=0;i--)if(!BX.findChild(tbl.rows[i],{class:"title-search-separator"},!0)){if(-1==last&&(last=i),_this.currentRow>i){_this.currentRow=i;break}"title-search-selected"==tbl.rows[i].className&&(tbl.rows[i].className="")}return i<0&&_this.currentRow!=i&&(_this.currentRow=last),tbl.rows[_this.currentRow].className="title-search-selected",!0;case 13:if("block"==_this.RESULT.style.display)for(i=0;i<cnt;i++)if(_this.currentRow==i&&!BX.findChild(tbl.rows[i],{class:"title-search-separator"},!0)){var a=BX.findChild(tbl.rows[i],{tag:"a"},!0);if(a)return window.location=a.href,!0}return!1}return!1},this.onTimeout=function(){_this.onChange((function(){setTimeout(_this.onTimeout,500)}))},this.onChange=function(callback){if(_this.running)_this.needRunAgain=!0;else{if(_this.running=!0,_this.INPUT.value!=_this.oldValue&&_this.INPUT.value!=_this.startText)if(_this.oldValue=_this.INPUT.value,_this.INPUT.value.length>=_this.arParams.MIN_QUERY_LEN){if(_this.cache_key=_this.arParams.INPUT_ID+"|"+_this.INPUT.value,null==_this.cache[_this.cache_key]){if
6965(_this.WAIT){var pos=BX.pos(_this.INPUT),height=pos.bottom-pos.top-2;_this.WAIT.style.top=pos.top+1+"px",_this.WAIT.style.height=height+"px",_this.WAIT.style.width=height+"px",_this.WAIT.style.left=pos.right-height+2+"px",_this.WAIT.style.display="block"}return void BX.ajax.post(_this.arParams.AJAX_PAGE,{ajax_call:"y",INPUT_ID:_this.arParams.INPUT_ID_TMP,q:_this.INPUT.value,l:_this.arParams.MIN_QUERY_LEN},(function(result){_this.cache[_this.cache_key]=result,_this.ShowResult(result),_this.currentRow=-1,_this.EnableMouseEvents(),_this.WAIT&&(_this.WAIT.style.display="none"),callback&&callback(),_this.running=!1,_this.needRunAgain&&(_this.needRunAgain=!1,_this.onChange(callback))}))}_this.ShowResult(_this.cache[_this.cache_key]),_this.currentRow=-1,_this.EnableMouseEvents()}else _this.RESULT.style.display="none",_this.currentRow=-1,_this.UnSelectAll();callback&&callback(),_this.running=!1}},this.UnSelectAll=function(){var tbl=BX.findChild(_this.RESULT,{tag:"table",class:"title-search-result"},!0);if(tbl)for(var cnt=tbl.rows.length,i=0;i<cnt;i++)tbl.rows[i].className=""},this.EnableMouseEvents=function(){var tbl=BX.findChild(_this.RESULT,{tag:"table",class:"title-search-result"},!0);if(tbl)for(var cnt=tbl.rows.length,i=0;i<cnt;i++)BX.findChild(tbl.rows[i],{class:"title-search-separator"},!0)||(tbl.rows[i].id="row_"+i,tbl.rows[i].onmouseover=function(e){_this.currentRow!=this.id.substr(4)&&(_this.UnSelectAll(),this.className="title-search-selected",_this.currentRow=this.id.substr(4))},tbl.rows[i].onmouseout=function(e){this.className="",_this.currentRow=-1})},this.onFocusLost=function(hide){setTimeout((function(){_this.RESULT.style.display="none"}),30)},this.onFocusGain=function(){_this.RESULT.innerHTML.length&&_this.ShowResult()},this.onKeyDown=function(e){if(e||(e=window.event),"block"==_this.RESULT.style.display&&_this.onKeyPress(e.keyCode))return BX.PreventDefault(e)},this.adjustResultNode=function(){var pos,pos_input,fixedParent=BX.findParent(_this.CONTAINER,BX.is_fixed);return fixedParent?(_this.RESULT.style.position="fixed",_this.RESULT.style.zIndex=BX.style(fixedParent,"z-index")+2,pos=BX.pos(_this.CONTAINER,!0)):(_this.RESULT.style.position="absolute",pos=BX.pos(_this.CONTAINER)),pos_input=BX.pos(_this.INPUT),pos.width=pos.right-pos.left,_this.RESULT.style.top=pos.bottom+2+"px",_this.RESULT.style.left=pos_input.left+"px",$(_this.INPUT).closest(".inline-search-block.with-close").length?_this.RESULT.style.width=pos_input.width+"px":_this.RESULT.style.width=pos.width+"px",pos},this._onContainerLayoutChange=function(){"none"!==_this.RESULT.style.display&&""!==_this.RESULT.innerHTML&&_this.adjustResultNode()},this.Init=function(){this.CONTAINER=document.getElementById(this.arParams.CONTAINER_ID),BX.addCustomEvent(this.CONTAINER,"OnNodeLayoutChange",this._onContainerLayoutChange),this.RESULT=document.body.appendChild(document.createElement("DIV")),this.RESULT.className="title-search-result "+this.arParams.INPUT_ID,this.RESULT.className+=" title-type-"+this.arParams.TYPE,this.INPUT=document.getElementById(this.arParams.INPUT_ID),this.startText=this.oldValue=this.INPUT.value,BX.bind(this.INPUT,"focus",(function(e){_this.onFocusGain()})),BX.bind(this.INPUT,"blur",(function(e){$(e.relatedTarget).closest(".searche-result").length||_this.onFocusLost()})),BX.browser.IsSafari()||BX.browser.IsIE()?this.INPUT.onkeydown=this.onKeyDown:this.INPUT.onkeypress=this.onKeyDown,this.arParams.WAIT_IMAGE&&(this.WAIT=document.body.appendChild(document.createElement("DIV")),this.WAIT.style.backgroundImage="url('"+this.arParams.WAIT_IMAGE+"')",BX.browser.IsIE()||(this.WAIT.style.backgroundRepeat="none"),this.WAIT.style.display="none",this.WAIT.style.position="absolute",this.WAIT.style.zIndex="1100"),BX.bind(this.INPUT,"bxchange",(function(e){_this.onChange()}))},BX.ready((function(){_this.Init(arParams)}))}
6966/* End */
6967;
6968; /* Start:"a:4:{s:4:"full";s:83:"/bitrix/templates/aspro-priority2/js/jquery.inputmask.bundle.min.js?176355727770933";s:6:"source";s:67:"/bitrix/templates/aspro-priority2/js/jquery.inputmask.bundle.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
6969!function(e){function t(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var i={};t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})}
6969,t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,i){"use strict";var n,a,r;"function"==typeof Symbol&&Symbol.iterator,a=[i(2)],void 0!==(r="function"==typeof(n=function(e){return e})?n.apply(t,a):n)&&(e.exports=r)},function(e,t,i){"use strict";var n,a,r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};a=[i(0),i(5),i(6)],void 0!==(r="function"==typeof(n=function(e,t,i,n){function a(t,i,o){if(!(this instanceof a))return new a(t,i,o);this.el=n,this.events={},this.maskset=n,this.refreshValue=!1,!0!==o&&(e.isPlainObject(t)?i=t:(i=i||{},t&&(i.alias=t)),this.opts=e.extend(!0,{},this.defaults,i),this.noMasksCache=i&&i.definitions!==n,this.userOptions=i||{},this.isRTL=this.opts.numericInput,r(this.opts.alias,i,this.opts))}function r(t,i,o){var s=a.prototype.aliases[t];return s?(s.alias&&r(s.alias,n,o),e.extend(!0,o,s),e.extend(!0,o,i),!0):(null===o.mask&&(o.mask=t),!1)}function s(t,i){function r(t,r,o){var s=!1;if(null!==t&&""!==t||((s=null!==o.regex)?t=(t=o.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(s=!0,t=".*")),1===t.length&&!1===o.greedy&&0!==o.repeat&&(o.placeholder=""),o.repeat>0||"*"===o.repeat||"+"===o.repeat){var l="*"===o.repeat?0:"+"===o.repeat?1:o.repeat;t=o.groupmarker[0]+t+o.groupmarker[1]+o.quantifiermarker[0]+l+","+o.repeat+o.quantifiermarker[1]}var u,c=s?"regex_"+o.regex:o.numericInput?t.split("").reverse().join(""):t;return a.prototype.masksCache[c]===n||!0===i?(u={mask:t,maskToken:a.prototype.analyseMask(t,s,o),validPositions:{},_buffer:n,buffer:n,tests:{},excludes:{},metadata:r,maskLength:n},!0!==i&&(a.prototype.masksCache[c]=u,u=e.extend(!0,{},a.prototype.masksCache[c]))):u=e.extend(!0,{},a.prototype.masksCache[c]),u}if(e.isFunction(t.mask)&&(t.mask=t.mask(t)),e.isArray(t.mask)){if(t.mask.length>1){if(null===t.keepStatic){t.keepStatic="auto";for(var o=0;o<t.mask.length;o++)if(t.mask[o].charAt(0)!==t.mask[0].charAt(0)){t.keepStatic=!0;break}}var s=t.groupmarker[0];return e.each(t.isRTL?t.mask.reverse():t.mask,function(i,a){s.length>1&&(s+=t.groupmarker[1]+t.alternatormarker+t.groupmarker[0]),a.mask===n||e.isFunction(a.mask)?s+=a:s+=a.mask}),r(s+=t.groupmarker[1],t.mask,t)}t.mask=t.mask.pop()}return t.mask&&t.mask.mask!==n&&!e.isFunction(t.mask.mask)?r(t.mask.mask,t.mask,t):r(t.mask,t.mask,t)}function l(e){var t=i.createElement("input"),n="on"+e,a=n in t;return a||(t.setAttribute(n,"return;"),a="function"==typeof t[n]),t=null,a}function u(r,s,c){function d(e,t,i){t=t||0;var a,r,o,s=[],l=0,u=v();do{!0===e&&h().validPositions[l]?(r=(o=h().validPositions[l]).match,a=o.locator.slice(),s.push(!0===i?o.input:!1===i?r.nativeDef:N(l,r))):(r=(o=P(l,a,l-1)).match,a=o.locator.slice(),(!1===c.jitMasking||l<u||"number"==typeof c.jitMasking&&isFinite(c.jitMasking)&&c.jitMasking>l)&&s.push(!1===i?r.nativeDef:N(l,r))),"auto"===c.keepStatic&&r.newBlockMarker&&null!==r.fn&&(c.keepStatic=l-1),l++}while(($===n||l<$)&&(null!==r.fn||""!==r.def)||t>l);return""===s[s.length-1]&&s.pop(),!1===i&&h().maskLength!==n||(h().maskLength=l-1),s}function h(){return s}function g(e){var t=h();t.buffer=n,!0!==e&&(t.validPositions={},t.p=0)}function v(e,t,i){var a=-1,r=-1,o=i||h().validPositions;e===n&&(e=-1);for(var s in o){var l=parseInt(s);o[l]&&(t||!0!==o[l].generatedInput)&&(l<=e&&(a=l),l>=e&&(r=l))}return-1!==a&&e-a>1||r<e?a:r}function k(t,i,a,r){var o,s=t,l=e.extend(!0,{},h().validPositions),u=!1;for(h().p=t,o=i-1;o>=s;
6969o--)h().validPositions[o]!==n&&(!0!==a&&(!h().validPositions[o].match.optionality&&function(e){var t=h().validPositions[e];if(t!==n&&null===t.match.fn){var i=h().validPositions[e-1],a=h().validPositions[e+1];return i!==n&&a!==n}return!1}(o)||!1===c.canClearPosition(h(),o,v(n,!0),r,c))||delete h().validPositions[o]);for(g(!0),o=s+1;o<=v();){for(;h().validPositions[s]!==n;)s++;if(o<s&&(o=s+1),h().validPositions[o]===n&&j(o))o++;else{var p=P(o);!1===u&&l[s]&&l[s].match.def===p.match.def?(h().validPositions[s]=e.extend(!0,{},l[s]),h().validPositions[s].input=p.input,delete h().validPositions[o],o++):A(s,p.match.def)?!1!==_(s,p.input||N(o),!0)&&(delete h().validPositions[o],o++,u=!0):j(o)||(o++,s--),s++}}if(!0!==r)for(o=v(-1,!0);h().validPositions[o]&&!0===h().validPositions[o].generatedInput;)delete h().validPositions[o--];g(!0)}function y(e,t,i){for(var a,r=S(e=e>0?e-1:0),o=r.alternation!==n?r.locator[r.alternation].toString().split(","):[],s=0;s<t.length&&(!((a=t[s]).match&&(c.greedy&&!0!==a.match.optionalQuantifier||(!1===a.match.optionality||!1===a.match.newBlockMarker)&&!0!==a.match.optionalQuantifier)&&(r.alternation===n||r.alternation!==a.alternation||a.locator[r.alternation]!==n&&D(a.locator[r.alternation].toString().split(","),o)))||!0===i&&(null!==a.match.fn||/[0-9a-bA-Z]/.test(a.match.def)));s++);return a}function b(e){var t=e.locator[e.alternation];return"string"==typeof t&&t.length>0&&(t=t.split(",")[0]),t!==n?t.toString():""}function x(e,t){for(var i=(e.alternation!=n?e.mloc[b(e)]:e.locator).join("");i.length<t;)i+="0";return i}function P(e,t,i){return h().validPositions[e]||y(e,C(e,t?t.slice():t,i))}function S(e){return h().validPositions[e]?h().validPositions[e]:C(e)[0]}function A(e,t){for(var i=!1,n=C(e),a=0;a<n.length;a++)if(n[a].match&&n[a].match.def===t){i=!0;break}return i}function C(t,i,a){function r(i,a,s,l){function u(s,l,p){function m(t,i){var n=0===e.inArray(t,i.matches);return n||e.each(i.matches,function(e,a){if(!0===a.isQuantifier&&(n=m(t,i.matches[e-1])))return!1}),n}function k(t,i,a){var r,o;if((h().tests[t]||h().validPositions[t])&&e.each(h().tests[t]||[h().validPositions[t]],function(e,t){if(t.mloc[i])return r=t,!1;var s=a!==n?a:t.alternation,l=t.locator[s]!==n?t.locator[s].toString().indexOf(i):-1;(o===n||l<o)&&-1!==l&&(r=t,o=l)}),r){var s=r.locator[r.alternation];return(r.mloc[i]||r.mloc[s]||r.locator).slice((a!==n?a:r.alternation)+1)}return a!==n?k(t,i):n}function y(e,t){function i(e){for(var t,i,n=[],a=0,r=e.length;a<r;a++)if("-"===e.charAt(a))for(i=e.charCodeAt(a+1);++t<i;)n.push(String.fromCharCode(t));else t=e.charCodeAt(a),n.push(e.charAt(a));return n.join("")}return c.regex&&null!==e.match.fn&&null!==t.match.fn?-1!==i(t.match.def.replace(/[\[\]]/g,"")).indexOf(i(e.match.def.replace(/[\[\]]/g,""))):e.match.def===t.match.nativeDef}function b(e,t){if(t===n||e.alternation===t.alternation&&-1===e.locator[e.alternation].toString().indexOf(t.locator[t.alternation])){e.mloc=e.mloc||{};var i=e.locator[e.alternation];if(i!==n){if("string"==typeof i&&(i=i.split(",")[0]),e.mloc[i]===n&&(e.mloc[i]=e.locator.slice()),t!==n){for(var a in t.mloc)"string"==typeof a&&(a=a.split(",")[0]),e.mloc[a]===n&&(e.mloc[a]=t.mloc[a]);e.locator[e.alternation]=Object.keys(e.mloc).join(",")}return!0}e.alternation=n}return!1}if(f>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+h().mask;if(f===t&&s.matches===n)return d.push({match:s,locator:l.reverse(),cd:v,mloc:{}}),!0;if(s.matches!==n){if(s.isGroup&&p!==s){if(s=u(i.matches[e.inArray(s,i.matches)+1],l))return!0}else if(s.isOptional){var x=s;if(s=r(s,a,l,p)){if(!m(o=d[d.length-1].match,x))return!0;g=!0,f=t}}else if(s.isAlternator){var P,S=s,A=[],C=d.slice(),M=l.length,E=a.length>0?a.shift():-1;if(-1===E||"string"==typeof E){var w,D=f,O=a.slice(),_=[];if("string"==typeof E)_=E.split(",");else for(w=0;w<S.matches.length;w++)_.push(w.toString());if(h().excludes[t]){for(var j=_.slice(),F=0,T=h().excludes[t].length;F<T;F++)_.splice(_.indexOf(h().excludes[t][F].toString()),1);0===_.length&&(h().excludes[t]=n,_=j)}(!0===c.keepStatic||isFinite(parseInt(c.keepStatic))&&D>=c.keepStatic)&&(_=_.slice(0,1));for(var R=0;R<_.length;R++){w=parseInt(_[R]),d=[],a=k(f,w,M)||O.slice(),S.matches[w]&&u(S.matches[w],[w].concat(l),p)&&(s=!0),P=d.slice(),f=D,d=[];for(var N=0;N<P.length;N++){var G=P[N],B=!1;G.alternation=G.alternation||M,b(G);for(var I=0;I<A.length;I++){var L=A[I];if("string"!=typeof E||G.alternation!==n&&-1!==e.inArray(G.locator[G.alternation].toString(),_)){if(G.match.nativeDef===L.match.nativeDef){B=!0,b(L,G);break}if(y(G,L)){b(G,L)&&(B=!0,A.splice(A.indexOf(L),0,G));break}if(y(L,G)){b(L,G);break}if(z=L,null===(U=G).match.fn&&null!==z.match.fn&&z.match.fn.test(U.match.def,h(),t,!1,c,!1)){b(G,L)&&(B=!0,A.splice(A.indexOf(L),0,G));break}}}B||A.push(G)}}d=C.concat(A),f=t,g=d.length>0,s=A.length>0,a=O.slice()}else s=u(S.matches[E]||i.matches[E],[E].concat(l),p);if(s)return!0}else if(s.isQuantifier&&p!==i.matches[e.inArray(s,i.matches)-1])for(var H=s,V=a.length>0?a.shift():0;V<(isNaN(H.quantifier.max)?V+1:H.quantifier.max)&&f<=t;V++){var K=i.matches[e.inArray(H,i.matches)-1];
6969if(s=u(K,[V].concat(l),K)){if((o=d[d.length-1].match).optionalQuantifier=V>H.quantifier.min-1,m(o,K)){if(V>H.quantifier.min-1){g=!0,f=t;break}return!0}return!0}}else if(s=r(s,a,l,p))return!0}else f++;var U,z}for(var p=a.length>0?a.shift():0;p<i.matches.length;p++)if(!0!==i.matches[p].isQuantifier){var m=u(i.matches[p],[p].concat(s),l);if(m&&f===t)return m;if(f>t)break}}var o,s,l,u,p=h().maskToken,f=i?a:0,m=i?i.slice():[0],d=[],g=!1,v=i?i.join(""):"";if(t>-1){if(i===n){for(var k,b=t-1;(k=h().validPositions[b]||h().tests[b])===n&&b>-1;)b--;k!==n&&b>-1&&(s=b,l=k,u=[],e.isArray(l)||(l=[l]),l.length>0&&(l[0].alternation===n?0===(u=y(s,l.slice()).locator.slice()).length&&(u=l[0].locator.slice()):e.each(l,function(e,t){if(""!==t.def)if(0===u.length)u=t.locator.slice();else for(var i=0;i<u.length;i++)t.locator[i]&&-1===u[i].toString().indexOf(t.locator[i])&&(u[i]+=","+t.locator[i])})),v=(m=u).join(""),f=b)}if(h().tests[t]&&h().tests[t][0].cd===v)return h().tests[t];for(var x=m.shift();x<p.length&&!(r(p[x],m,[x])&&f===t||f>t);x++);}return(0===d.length||g)&&d.push({match:{fn:null,optionality:!0,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:v}),i!==n&&h().tests[t]?e.extend(!0,[],d):(h().tests[t]=e.extend(!0,[],d),h().tests[t])}function M(){return h()._buffer===n&&(h()._buffer=d(!1,1),h().buffer===n&&(h().buffer=h()._buffer.slice())),h()._buffer}function E(e){return h().buffer!==n&&!0!==e||(h().buffer=d(!0,v(),!0)),h().buffer}function w(e,t,i){var a,r;if(!0===e)g(),e=0,t=i.length;else for(a=e;a<t;a++)delete h().validPositions[a];for(r=e,a=e;a<t;a++)if(g(!0),i[a]!==c.skipOptionalPartCharacter){var o=_(r,i[a],!0,!0);!1!==o&&(g(!0),r=o.caret!==n?o.caret:o.pos+1)}}function D(t,i,a){for(var r,o=c.greedy?i:i.slice(0,1),s=!1,l=a!==n?a.split(","):[],u=0;u<l.length;u++)-1!==(r=t.indexOf(l[u]))&&t.splice(r,1);for(var p=0;p<t.length;p++)if(-1!==e.inArray(t[p],o)){s=!0;break}return s}function O(t,i,a,r,o){var s,l,u,p,f,m,d,k=e.extend(!0,{},h().validPositions),y=!1,x=o!==n?o:v();if(-1===x&&o===n)l=(p=S(s=0)).alternation;else for(;x>=0;x--)if((u=h().validPositions[x])&&u.alternation!==n){if(p&&p.locator[u.alternation]!==u.locator[u.alternation])break;s=x,l=h().validPositions[s].alternation,p=u}if(l!==n){d=parseInt(s),h().excludes[d]=h().excludes[d]||[],!0!==t&&h().excludes[d].push(b(p));var P=[],A=0;for(f=d;f<v(n,!0)+1;f++)(m=h().validPositions[f])&&!0!==m.generatedInput&&/[0-9a-bA-Z]/.test(m.input)?P.push(m.input):f<t&&A++,delete h().validPositions[f];for(;h().excludes[d]&&h().excludes[d].length<10;){var C=-1*A,M=P.slice();for(h().tests[d]=n,g(!0),y=!0;M.length>0;){var E=M.shift();if(E!==c.skipOptionalPartCharacter&&!(y=_(v(n,!0)+1,E,!1,r,!0)))break}if(y&&i!==n){var w=v(t)+1;for(f=d;f<v()+1;f++)((m=h().validPositions[f])===n||null==m.match.fn)&&f<t+C&&C++;y=_((t+=C)>w?w:t,i,a,r,!0)}if(y)break;if(g(),p=S(d),h().validPositions=e.extend(!0,{},k),!h().excludes[d]){y=O(t,i,a,r,d-1);break}var D=b(p);if(-1!==h().excludes[d].indexOf(D)){y=O(t,i,a,r,d-1);break}for(h().excludes[d].push(D),f=d;f<v(n,!0)+1;f++)delete h().validPositions[f]}}return h().excludes[d]=n,y}function _(t,i,r,o,s,l){function u(e){return X?e.begin-e.end>1||e.begin-e.end==1:e.end-e.begin>1||e.end-e.begin==1}function p(i,r,s){var l=!1;return e.each(C(i),function(p,f){var d=f.match;if(E(!0),!1!==(l=null!=d.fn?d.fn.test(r,h(),i,s,c,u(t)):(r===d.def||r===c.skipOptionalPartCharacter)&&""!==d.def&&{c:N(i,d,!0)||d.def,pos:i})){var y=l.c!==n?l.c:r;y=y===c.skipOptionalPartCharacter&&null===d.fn?N(i,d,!0)||d.def:y;var b=i,x=E();if(l.remove!==n&&(e.isArray(l.remove)||(l.remove=[l.remove]),e.each(l.remove.sort(function(e,t){return t-e}),function(e,t){k(t,t+1,!0)})),l.insert!==n&&(e.isArray(l.insert)||(l.insert=[l.insert]),e.each(l.insert.sort(function(e,t){return e-t}),function(e,t){_(t.pos,t.c,!0,o)})),l.refreshFromBuffer){var P=l.refreshFromBuffer;if(w(!0===P?P:P.start,P.end,x),l.pos===n&&l.c===n)return l.pos=v(),!1;if((b=l.pos!==n?l.pos:i)!==i)return l=e.extend(l,_(b,y,!0,o)),!1}else if(!0!==l&&l.pos!==n&&l.pos!==i&&(b=l.pos,w(i,b,E().slice()),b!==i))return l=e.extend(l,_(b,y,!0)),!1;return(!0===l||l.pos!==n||l.c!==n)&&(p>0&&g(!0),m(b,e.extend({}
6969,f,{input:function(t,i,n){switch(c.casing||i.casing){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase();break;case"title":var r=h().validPositions[n-1];t=0===n||r&&r.input===String.fromCharCode(a.keyCode.SPACE)?t.toUpperCase():t.toLowerCase();break;default:if(e.isFunction(c.casing)){var o=Array.prototype.slice.call(arguments);o.push(h().validPositions),t=c.casing.apply(this,o)}}return t}(y,d,b)}),o,u(t))||(l=!1),!1)}}),l}function f(t,i,a){var r;if(t===n)for(t=i-1;t>0&&!h().validPositions[t];t--);for(var o=t;o<i;o++)if(h().validPositions[o]===n&&!j(o,!0)){var s=0==o?S(o):h().validPositions[o-1];if(s){var l,u=x(s),c=C(o).slice(),p=n,f=S(o);if(""===c[c.length-1].match.def&&c.pop(),e.each(c,function(e,t){l=x(t,u.length);var i=Math.abs(l-u);(p===n||i<p)&&null===t.match.fn&&!0!==t.match.optionality&&!0!==t.match.optionalQuantifier&&(p=i,f=t)}),(f=e.extend({},f,{input:N(o,f.match,!0)||f.match.def})).generatedInput=!0,m(o,f,!0),!0!==a){var d=h().validPositions[i].input;h().validPositions[i]=n,r=_(i,d,!0,!0)}}}return r}function m(t,i,a,r){if(r||c.insertMode&&h().validPositions[t]!==n&&a===n){var o,s=e.extend(!0,{},h().validPositions),l=v(n,!0);for(o=t;o<=l;o++)delete h().validPositions[o];h().validPositions[t]=e.extend(!0,{},i);var u,p=!0,m=h().validPositions,d=!1;for(o=u=t;o<=l;o++){var k=s[o];if(k!==n)for(var y=u;""!==S(y).match.def&&(null===k.match.fn&&m[o]&&(!0===m[o].match.optionalQuantifier||!0===m[o].match.optionality)||null!=k.match.fn);){if(y++,!1===d&&s[y]&&s[y].match.def===k.match.def)h().validPositions[y]=e.extend(!0,{},s[y]),h().validPositions[y].input=k.input,f(n,y,!0),u=y,p=!0;else if(A(y,k.match.def)){var b=_(y,k.input,!0,!0);p=!1!==b,u=b.caret||b.insert?v():y,d=!0}else if(!(p=!0===k.generatedInput)&&""===S(y).match.def)break;if(p)break}if(!p)break}if(!p)return h().validPositions=e.extend(!0,{},s),g(!0),!1}else h().validPositions[t]=e.extend(!0,{},i);return g(!0),!0}r=!0===r;var d=t;t.begin!==n&&(d=X&&!u(t)?t.end:t.begin);var y=!0,b=e.extend(!0,{},h().validPositions);if(e.isFunction(c.preValidation)&&!r&&!0!==o&&!0!==l&&(y=c.preValidation(E(),d,i,u(t),c)),!0===y){if(f(n,d,!0),u(t)&&(K(0,a.keyCode.DELETE,t,!0,!0),d=h().p),($===n||d<$)&&(y=p(d,i,r),(!r||!0===o)&&!1===y&&!0!==l)){var P=h().validPositions[d];if(!P||null!==P.match.fn||P.match.def!==i&&i!==c.skipOptionalPartCharacter){if((c.insertMode||h().validPositions[F(d)]===n)&&!j(d,!0))for(var M=d+1,D=F(d);M<=D;M++)if(!1!==(y=p(M,i,r))){y=f(d,y.pos!==n?y.pos:M)||y,d=M;break}}else y={caret:F(d)}}!1!==y||null===c.keepStatic||!1===c.keepStatic||r||!0===s||(y=O(d,i,r,o)),!0===y&&(y={pos:d})}if(e.isFunction(c.postValidation)&&!1!==y&&!r&&!0!==o&&!0!==l){var T=c.postValidation(E(!0),y,c);if(T!==n){if(T.refreshFromBuffer&&T.buffer){var R=T.refreshFromBuffer;w(!0===R?R:R.start,R.end,T.buffer)}y=!0===T?y:T}}return y&&y.pos===n&&(y.pos=d),!1!==y&&!0!==l||(g(!0),h().validPositions=e.extend(!0,{},b)),y}function j(e,t){var i=P(e).match;if(""===i.def&&(i=S(e).match),null!=i.fn)return i.fn;if(!0!==t&&e>-1){var n=C(e);return n.length>1+(""===n[n.length-1].match.def?1:0)}return!1}function F(e,t){for(var i=e+1;""!==S(i).match.def&&(!0===t&&(!0!==S(i).match.newBlockMarker||!j(i))||!0!==t&&!j(i));)i++;return i}function T(e,t){var i,n=e;if(n<=0)return 0;for(;--n>0&&(!0===t&&!0!==S(n).match.newBlockMarker||!0!==t&&!j(n)&&((i=C(n)).length<2||2===i.length&&""===i[1].match.def)););return n}function R(t,i,a,r,o){if(r&&e.isFunction(c.onBeforeWrite)){var s=c.onBeforeWrite.call(J,r,i,a,c);if(s){if(s.refreshFromBuffer){var l=s.refreshFromBuffer;w(!0===l?l:l.start,l.end,s.buffer||i),i=E(!0)}a!==n&&(a=s.caret!==n?s.caret:a)}}t!==n&&(t.inputmask._valueSet(i.join("")),a===n||r!==n&&"blur"===r.type?z(t,a,0===i.length):I(t,a),!0===o&&(te=!0,e(t).trigger("input")))}function N(t,i,a){if((i=i||S(t).match).placeholder!==n||!0===a)return e.isFunction(i.placeholder)?i.placeholder(c):i.placeholder;if(null===i.fn){if(t>-1&&h().validPositions[t]===n){var r,o=C(t),s=[];if(o.length>1+(""===o[o.length-1].match.def?1:0))for(var l=0;l<o.length;l++)if(!0!==o[l].match.optionality&&!0!==o[l].match.optionalQuantifier&&(null===o[l].match.fn||r===n||!1!==o[l].match.fn.test(r.match.def,h(),t,!0,c))&&(s.push(o[l]),null===o[l].match.fn&&(r=o[l]),s.length>1&&/[0-9a-bA-Z]/.test(s[0].match.def)))return c.placeholder.charAt(t%c.placeholder.length)}return i.def}return c.placeholder.charAt(t%c.placeholder.length)}function G(t,i,r,o,s){var l=o.slice(),u="",p=-1,f=n;if(g(),r||!0===c.autoUnmask)p=F(p);else{var m=M().slice(0,F(-1)).join(""),k=l.join("").match(new RegExp("^"+a.escapeRegex(m),"g"));k&&k.length>0&&(l.splice(0,k.length*m.length),p=F(p))}-1===p?(h().p=F(p),p=0):h().p=p,e.each(l,function(i,a){if(a!==n)if(h().validPositions[i]===n&&l[i]===N(i)&&j(i,!0)&&!1===_(i,l[i],!0,n,n,!0))h().p++;else{var o=new e.Event("_checkval");
6969o.which=a.charCodeAt(0),u+=a;var s=v(n,!0),m=S(s),g=P(s+1,m?m.locator.slice():n,s);if(y=p,b=u,-1===d(!0,0,!1).slice(y,F(y)).join("").indexOf(b)||j(y)||S(y).match.nativeDef!==b.charAt(0)&&(" "!==S(y).match.nativeDef||S(y+1).match.nativeDef!==b.charAt(0))||r||c.autoUnmask){var k=r?i:null==g.match.fn&&g.match.optionality&&s+1<h().p?s+1:h().p;(f=oe.keypressEvent.call(t,o,!0,!1,r,k))&&(p=k+1,u="")}else f=oe.keypressEvent.call(t,o,!0,!1,!0,s+1);R(n,E(),f.forwardPosition,o,!1)}var y,b}),i&&R(t,E(),f?f.forwardPosition:n,s||new e.Event("checkval"),s&&"input"===s.type)}function B(t){if(t){if(t.inputmask===n)return t.value;t.inputmask&&t.inputmask.refreshValue&&oe.setValueEvent.call(t)}var i=[],a=h().validPositions;for(var r in a)a[r].match&&null!=a[r].match.fn&&i.push(a[r].input);var o=0===i.length?"":(X?i.reverse():i).join("");if(e.isFunction(c.onUnMask)){var s=(X?E().slice().reverse():E()).join("");o=c.onUnMask.call(J,s,o,c)}return o}function I(a,r,o,s){function l(e){return!0===s||!X||"number"!=typeof e||c.greedy&&""===c.placeholder||(e=a.inputmask.__valueGet.call(a).length-e),e}var u;if(r===n)return a.setSelectionRange?(r=a.selectionStart,o=a.selectionEnd):t.getSelection?(u=t.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==a&&u.commonAncestorContainer!==a||(r=u.startOffset,o=u.endOffset):i.selection&&i.selection.createRange&&(o=(r=0-(u=i.selection.createRange()).duplicate().moveStart("character",-a.inputmask._valueGet().length))+u.text.length),{begin:l(r),end:l(o)};if(e.isArray(r)&&(o=X?r[0]:r[1],r=X?r[1]:r[0]),r.begin!==n&&(o=X?r.begin:r.end,r=X?r.end:r.begin),"number"==typeof r){r=l(r),o="number"==typeof(o=l(o))?o:r;var p=parseInt(((a.ownerDocument.defaultView||t).getComputedStyle?(a.ownerDocument.defaultView||t).getComputedStyle(a,null):a.currentStyle).fontSize)*o;if(a.scrollLeft=p>a.scrollWidth?p:0,!1===c.insertMode&&r===o&&o++,a.inputmask.caretPos={begin:r,end:o},a.setSelectionRange)a.selectionStart=r,a.selectionEnd=o;else if(t.getSelection){if(u=i.createRange(),a.firstChild===n||null===a.firstChild){var f=i.createTextNode("");a.appendChild(f)}u.setStart(a.firstChild,r<a.inputmask._valueGet().length?r:a.inputmask._valueGet().length),u.setEnd(a.firstChild,o<a.inputmask._valueGet().length?o:a.inputmask._valueGet().length),u.collapse(!0);var m=t.getSelection();m.removeAllRanges(),m.addRange(u)}else a.createTextRange&&((u=a.createTextRange()).collapse(!0),u.moveEnd("character",o),u.moveStart("character",r),u.select());z(a,{begin:r,end:o})}}function L(t){var i,a,r=E(),o=r.length,s=v(),l={},u=h().validPositions[s],c=u!==n?u.locator.slice():n;for(i=s+1;i<r.length;i++)c=(a=P(i,c,i-1)).locator.slice(),l[i]=e.extend(!0,{},a);var p=u&&u.alternation!==n?u.locator[u.alternation]:n;for(i=o-1;i>s&&((a=l[i]).match.optionality||a.match.optionalQuantifier&&a.match.newBlockMarker||p&&(p!==l[i].locator[u.alternation]&&null!=a.match.fn||null===a.match.fn&&a.locator[u.alternation]&&D(a.locator[u.alternation].toString().split(","),p.toString().split(","))&&""!==C(i)[0].def))&&r[i]===N(i,a.match);i--)o--;return t?{l:o,def:l[o]?l[o].match:n}:o}function H(e){for(var t,i=L(),a=e.length,r=h().validPositions[v()];i<a&&!j(i,!0)&&(t=r!==n?P(i,r.locator.slice(""),r):S(i))&&!0!==t.match.optionality&&(!0!==t.match.optionalQuantifier&&!0!==t.match.newBlockMarker||i+1===a&&""===(r!==n?P(i+1,r.locator.slice(""),r):S(i+1)).match.def);)i++;for(;(t=h().validPositions[i-1])&&t&&t.match.optionality&&t.input===c.skipOptionalPartCharacter;)i--;return e.splice(i),e}function V(t){if(e.isFunction(c.isComplete))return c.isComplete(t,c);if("*"===c.repeat)return n;var i=!1,a=L(!0),r=T(a.l);if(a.def===n||a.def.newBlockMarker||a.def.optionality||a.def.optionalQuantifier){i=!0;for(var o=0;o<=r;o++){var s=P(o).match;if(null!==s.fn&&h().validPositions[o]===n&&!0!==s.optionality&&!0!==s.optionalQuantifier||null===s.fn&&t[o]!==N(o,s)){i=!1;break}}}return i}function K(e,t,i,r,o){if((c.numericInput||X)&&(t===a.keyCode.BACKSPACE?t=a.keyCode.DELETE:t===a.keyCode.DELETE&&(t=a.keyCode.BACKSPACE),X)){var s=i.end;i.end=i.begin,i.begin=s}if(t===a.keyCode.BACKSPACE&&(i.end-i.begin<1||!1===c.insertMode)?(i.begin=T(i.begin),h().validPositions[i.begin]!==n&&h().validPositions[i.begin].input===c.groupSeparator&&i.begin--):t===a.keyCode.DELETE&&i.begin===i.end&&(i.end=j(i.end,!0)&&h().validPositions[i.end]&&h().validPositions[i.end].input!==c.radixPoint?i.end+1:F(i.end)+1,h().validPositions[i.begin]!==n&&h().validPositions[i.begin].input===c.groupSeparator&&i.end++),k(i.begin,i.end,!1,r),!0!==r&&null!==c.keepStatic&&!1!==c.keepStatic){var l=O(!0);l&&(i.begin=l.caret!==n?l.caret:l.pos?F(l.pos.begin?l.pos.begin:l.pos):v(-1,!0))}var u=v(i.begin,!0);if(u<i.begin||-1===i.begin)h().p=F(u);else if(!0!==r&&(h().p=i.begin,!0!==o))for(;h().p<u&&h().validPositions[h().p]===n;)h().p++}function U(n){var a=(n.ownerDocument.defaultView||t).getComputedStyle(n,null),r=i.createElement("div");r.style.width=a.width,r.style.textAlign=a.textAlign,q=i.createElement("div"),n.inputmask.colorMask=q,q.className="im-colormask",n.parentNode.insertBefore(q,n),n.parentNode.removeChild(n),q.appendChild(r),q.appendChild(n),n.style.left=r.offsetLeft+"px",e(n).on("click",function(e){return I(n,function(e){var t,r=i.createElement("span");for(var o in a)isNaN(o)&&-1!==o.indexOf("font")&&(r.style[o]=a[o]);r.style.textTransform=a.textTransform,r.style.letterSpacing=a.letterSpacing,r.style.position="absolute",r.style.height="auto",r.style.width="auto",r.style.visibility="hidden",r.style.whiteSpace="nowrap",i.body.appendChild(r);var s,l=n.inputmask._valueGet(),u=0;for(t=0,s=l.length;t<=s;t++){if(r.innerHTML+=l.charAt(t)||"_",r.offsetWidth>=e){var c=e-u,p=r.offsetWidth-e;r.innerHTML=l.charAt(t),t=(c-=r.offsetWidth/3)<p?t-1:t;break}u=r.offsetWidth}return i.body.removeChild(r),t}(e.clientX)),oe.clickEvent.call(n,[e])}),e(n).on("keydown",function(e){e.shiftKey||!1===c.insertMode||setTimeout(function(){z(n)},0)})}function z(e,t,a){function r(e){if(e===n&&(e=""),p||null!==o.fn&&s.input!==n)if(p&&(null!==o.fn&&s.input!==n||""===o.def)){p=!1;var t=u.length;u[t-1]=u[t-1]+"</span>",u.push(e)}else u.push(e);else p=!0,u.push("<span class='im-static'>"+e)}var o,s,l,u=[],p=!1,f=0;if(q!==n){var m=E();if(t===n?t=I(e):t.begin===n&&(t={begin:t,end:t}),!0!==a){var d=v();
6969do{h().validPositions[f]?(s=h().validPositions[f],o=s.match,l=s.locator.slice(),r(m[f])):(s=P(f,l,f-1),o=s.match,l=s.locator.slice(),(!1===c.jitMasking||f<d||"number"==typeof c.jitMasking&&isFinite(c.jitMasking)&&c.jitMasking>f)&&r(N(f,o))),f++}while(($===n||f<$)&&(null!==o.fn||""!==o.def)||d>f||p);p&&r(),i.activeElement===e&&(u.splice(t.begin,0,t.begin===t.end?'<mark class="im-caret" style="border-right-width: 1px;border-right-style: solid;">':'<mark class="im-caret-select">'),u.splice(t.end+1,0,"</mark>"))}var g=q.getElementsByTagName("div")[0];g.innerHTML=u.join(""),e.inputmask.positionColorMask(e,g)}}s=s||this.maskset,c=c||this.opts;var Q,W,$,q,Z,J=this,Y=this.el,X=this.isRTL,ee=!1,te=!1,ie=!1,ne=!1,ae=!1,re={on:function(t,i,r){var o=function(t){var i=this;if(i.inputmask===n&&"FORM"!==this.nodeName){var o=e.data(i,"_inputmask_opts");o?new a(o).mask(i):re.off(i)}else{if("setvalue"===t.type||"FORM"===this.nodeName||!(i.disabled||i.readOnly&&!("keydown"===t.type&&t.ctrlKey&&67===t.keyCode||!1===c.tabThrough&&t.keyCode===a.keyCode.TAB))){switch(t.type){case"input":if(!0===te)return te=!1,t.preventDefault();p&&(ae=!0);break;case"keydown":ee=!1,te=!1;break;case"keypress":if(!0===ee)return t.preventDefault();ee=!0;break;case"click":if(f||m){var s=arguments;return setTimeout(function(){r.apply(i,s)},0),!1}}var l=r.apply(i,arguments);return ae&&(ae=!1,setTimeout(function(){I(i,i.inputmask.caretPos,n,!0)})),!1===l&&(t.preventDefault(),t.stopPropagation()),l}t.preventDefault()}};t.inputmask.events[i]=t.inputmask.events[i]||[],t.inputmask.events[i].push(o),-1!==e.inArray(i,["submit","reset"])?null!==t.form&&e(t.form).on(i,o):e(t).on(i,o)},off:function(t,i){var n;t.inputmask&&t.inputmask.events&&(i?(n=[])[i]=t.inputmask.events[i]:n=t.inputmask.events,e.each(n,function(i,n){for(;n.length>0;){var a=n.pop();-1!==e.inArray(i,["submit","reset"])?null!==t.form&&e(t.form).off(i,a):e(t).off(i,a)}delete t.inputmask.events[i]}))}},oe={keydownEvent:function(t){var i=this,n=e(i),r=t.keyCode,o=I(i);if(r===a.keyCode.BACKSPACE||r===a.keyCode.DELETE||m&&r===a.keyCode.BACKSPACE_SAFARI||t.ctrlKey&&r===a.keyCode.X&&!l("cut"))t.preventDefault(),K(0,r,o),R(i,E(!0),h().p,t,i.inputmask._valueGet()!==E().join("")),i.inputmask._valueGet()===M().join("")?n.trigger("cleared"):!0===V(E())&&n.trigger("complete");else if(r===a.keyCode.END||r===a.keyCode.PAGE_DOWN){t.preventDefault();var s=F(v());c.insertMode||s!==h().maskLength||t.shiftKey||s--,I(i,t.shiftKey?o.begin:s,s,!0)}else r===a.keyCode.HOME&&!t.shiftKey||r===a.keyCode.PAGE_UP?(t.preventDefault(),I(i,0,t.shiftKey?o.begin:0,!0)):(c.undoOnEscape&&r===a.keyCode.ESCAPE||90===r&&t.ctrlKey)&&!0!==t.altKey?(G(i,!0,!1,Q.split("")),n.trigger("click")):r!==a.keyCode.INSERT||t.shiftKey||t.ctrlKey?!0===c.tabThrough&&r===a.keyCode.TAB?(!0===t.shiftKey?(null===S(o.begin).match.fn&&(o.begin=F(o.begin)),o.end=T(o.begin,!0),o.begin=T(o.end,!0)):(o.begin=F(o.begin,!0),o.end=F(o.begin,!0),o.end<h().maskLength&&o.end--),o.begin<h().maskLength&&(t.preventDefault(),I(i,o.begin,o.end))):t.shiftKey||!1===c.insertMode&&(r===a.keyCode.RIGHT?setTimeout(function(){var e=I(i);I(i,e.begin)},0):r===a.keyCode.LEFT&&setTimeout(function(){var e=I(i);I(i,X?e.begin+1:e.begin-1)},0)):(c.insertMode=!c.insertMode,I(i,c.insertMode||o.begin!==h().maskLength?o.begin:o.begin-1));c.onKeyDown.call(this,t,E(),I(i).begin,c),ie=-1!==e.inArray(r,c.ignorables)},keypressEvent:function(t,i,r,o,s){var l=this,u=e(l),p=t.which||t.charCode||t.keyCode;if(!(!0===i||t.ctrlKey&&t.altKey)&&(t.ctrlKey||t.metaKey||ie))return p===a.keyCode.ENTER&&Q!==E().join("")&&(Q=E().join(""),setTimeout(function(){u.trigger("change")},0)),!0;if(p){46===p&&!1===t.shiftKey&&""!==c.radixPoint&&(p=c.radixPoint.charCodeAt(0));var f,m=i?{begin:s,end:s}:I(l),d=String.fromCharCode(p);h().writeOutBuffer=!0;var v=_(m,d,o);if(!1!==v&&(g(!0),f=v.caret!==n?v.caret:F(v.pos.begin?v.pos.begin:v.pos),h().p=f),f=c.numericInput&&v.caret===n?T(f):f,!1!==r&&(setTimeout(function(){c.onKeyValidation.call(l,p,v,c)},0),h().writeOutBuffer&&!1!==v)){var k=E();R(l,k,f,t,!0!==i),!0!==i&&setTimeout(function(){!0===V(k)&&u.trigger("complete")},0)}if(t.preventDefault(),i)return!1!==v&&(v.forwardPosition=f),v}},pasteEvent:function(i){var n,a=this,r=i.originalEvent||i,o=e(a),s=a.inputmask._valueGet(!0),l=I(a);X&&(n=l.end,l.end=l.begin,l.begin=n);var u=s.substr(0,l.begin),p=s.substr(l.end,s.length);if(u===(X?M().reverse():M()).slice(0,l.begin).join("")&&(u=""),p===(X?M().reverse():M()).slice(l.end).join("")&&(p=""),X&&(n=u,u=p,p=n),t.clipboardData&&t.clipboardData.getData)s=u+t.clipboardData.getData("Text")+p;else{if(!r.clipboardData||!r.clipboardData.getData)return!0;s=u+r.clipboardData.getData("text/plain")+p}var f=s;if(e.isFunction(c.onBeforePaste)){if(!1===(f=c.onBeforePaste.call(J,s,c)))return i.preventDefault();f||(f=s)}return G(a,!1,!1,X?f.split("").reverse():f.toString().split("")),R(a,E(),F(v()),i,Q!==E().join("")),!0===V(E())&&o.trigger("complete"),i.preventDefault()},inputFallBackEvent:function(t){var i,n,r=this,o=r.inputmask._valueGet();if(E().join("")!==o){var s=I(r);if(n=s,"."===(i=o).charAt(n.begin-1)&&""!==c.radixPoint&&((i=i.split(""))[n.begin-1]=c.radixPoint.charAt(0),i=i.join("")),o=function(e,t,i){if(f){var n=t.replace(E().join(""),"");if(1===n.length){var a=t.split("");
6969a.splice(i.begin,0,n),t=a.join("")}}return t}(0,o=i,s),E().join("")!==o){var l=E().join(""),u=o.length>l.length?-1:0,p=o.substr(0,s.begin),m=o.substr(s.begin),d=l.substr(0,s.begin+u),h=l.substr(s.begin+u),g=s,v="",k=!1;if(p!==d){for(var y=(k=p.length>=d.length)?p.length:d.length,b=0;p.charAt(b)===d.charAt(b)&&b<y;b++);k&&(0===u&&(g.begin=b),v+=p.slice(b,g.end))}if(m!==h&&(m.length>h.length?v+=m.slice(0,1):m.length<h.length&&(g.end+=h.length-m.length,k||""===c.radixPoint||""!==m||p.charAt(g.begin+u-1)!==c.radixPoint||(g.begin--,v=c.radixPoint))),R(r,E(),{begin:g.begin+u,end:g.end+u}),v.length>0)e.each(v.split(""),function(t,i){var n=new e.Event("keypress");n.which=i.charCodeAt(0),ie=!1,oe.keypressEvent.call(r,n)});else{g.begin===g.end-1&&(g.begin=T(g.begin+1),g.begin===g.end-1?I(r,g.begin):I(r,g.begin,g.end));var x=new e.Event("keydown");x.keyCode=a.keyCode.DELETE,oe.keydownEvent.call(r,x),!1===c.insertMode&&I(r,I(r).begin-1)}t.preventDefault()}}},setValueEvent:function(t){this.inputmask.refreshValue=!1;var i=this.inputmask._valueGet(!0);e.isFunction(c.onBeforeMask)&&(i=c.onBeforeMask.call(J,i,c)||i),i=i.split(""),G(this,!0,!1,X?i.reverse():i),Q=E().join(""),(c.clearMaskOnLostFocus||c.clearIncomplete)&&this.inputmask._valueGet()===M().join("")&&this.inputmask._valueSet("")},focusEvent:function(e){var t=this,i=t.inputmask._valueGet();c.showMaskOnFocus&&(!c.showMaskOnHover||c.showMaskOnHover&&""===i)&&(t.inputmask._valueGet()!==E().join("")?R(t,E(),F(v())):!1===ne&&I(t,F(v()))),!0===c.positionCaretOnTab&&!1===ne&&oe.clickEvent.apply(t,[e,!0]),Q=E().join("")},mouseleaveEvent:function(e){if(ne=!1,c.clearMaskOnLostFocus&&i.activeElement!==this){var t=E().slice(),n=this.inputmask._valueGet();n!==this.getAttribute("placeholder")&&""!==n&&(-1===v()&&n===M().join("")?t=[]:H(t),R(this,t))}},clickEvent:function(t,a){var r=this;setTimeout(function(){if(i.activeElement===r){var t=I(r);if(a&&(X?t.end=t.begin:t.begin=t.end),t.begin===t.end)switch(c.positionCaretOnClick){case"none":break;case"select":I(r,0,E().length);break;case"radixFocus":if(function(t){if(""!==c.radixPoint){var i=h().validPositions;if(i[t]===n||i[t].input===N(t)){if(t<F(-1))return!0;var a=e.inArray(c.radixPoint,E());if(-1!==a){for(var r in i)if(a<r&&i[r].input!==N(r))return!1;return!0}}}return!1}(t.begin)){var o=E().join("").indexOf(c.radixPoint);I(r,c.numericInput?F(o):o);break}default:var s=t.begin,l=v(s,!0),u=F(l);if(s<u)I(r,j(s,!0)||j(s-1,!0)?s:F(s));
6969else{var p=h().validPositions[l],f=P(u,p?p.match.locator:n,p),m=N(u,f.match);if(""!==m&&E()[u]!==m&&!0!==f.match.optionalQuantifier&&!0!==f.match.newBlockMarker||!j(u,!0)&&f.match.def===m){var d=F(u);(s>=d||s===u)&&(u=d)}I(r,u)}}}},0)},dblclickEvent:function(e){var t=this;setTimeout(function(){I(t,0,F(v()))},0)},cutEvent:function(n){var r=e(this),o=I(this),s=n.originalEvent||n,l=t.clipboardData||s.clipboardData,u=X?E().slice(o.end,o.begin):E().slice(o.begin,o.end);l.setData("text",X?u.reverse().join(""):u.join("")),i.execCommand&&i.execCommand("copy"),K(0,a.keyCode.DELETE,o),R(this,E(),h().p,n,Q!==E().join("")),this.inputmask._valueGet()===M().join("")&&r.trigger("cleared")},blurEvent:function(t){var i=e(this);if(this.inputmask){var a=this.inputmask._valueGet(),r=E().slice();""===a&&q===n||(c.clearMaskOnLostFocus&&(-1===v()&&a===M().join("")?r=[]:H(r)),!1===V(r)&&(setTimeout(function(){i.trigger("incomplete")},0),c.clearIncomplete&&(g(),r=c.clearMaskOnLostFocus?[]:M().slice())),R(this,r,n,t)),Q!==E().join("")&&(Q=r.join(""),i.trigger("change"))}},mouseenterEvent:function(e){ne=!0,i.activeElement!==this&&c.showMaskOnHover&&this.inputmask._valueGet()!==E().join("")&&R(this,E())},submitEvent:function(e){Q!==E().join("")&&W.trigger("change"),c.clearMaskOnLostFocus&&-1===v()&&Y.inputmask._valueGet&&Y.inputmask._valueGet()===M().join("")&&Y.inputmask._valueSet(""),c.removeMaskOnSubmit&&(Y.inputmask._valueSet(Y.inputmask.unmaskedvalue(),!0),setTimeout(function(){R(Y,E())},0))},resetEvent:function(e){Y.inputmask.refreshValue=!0,setTimeout(function(){W.trigger("setvalue")},0)}};if(a.prototype.positionColorMask=function(e,t){e.style.left=t.offsetLeft+"px"},r!==n)switch(r.action){case"isComplete":return Y=r.el,V(E());case"unmaskedvalue":return Y!==n&&r.value===n||(Z=r.value,Z=(e.isFunction(c.onBeforeMask)&&c.onBeforeMask.call(J,Z,c)||Z).split(""),G(n,!1,!1,X?Z.reverse():Z),e.isFunction(c.onBeforeWrite)&&c.onBeforeWrite.call(J,n,E(),0,c)),B(Y);case"mask":!function(t){re.off(t);var a=function(t,a){var r=t.getAttribute("type"),s="INPUT"===t.tagName&&-1!==e.inArray(r,a.supportsInputType)||t.isContentEditable||"TEXTAREA"===t.tagName;if(!s)if("INPUT"===t.tagName){var l=i.createElement("input");l.setAttribute("type",r),s="text"===l.type,l=null}else s="partial";return!1!==s?function(t){function r(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==v()||!0!==a.nullable?i.activeElement===this&&a.clearMaskOnLostFocus?(X?H(E().slice()).reverse():H(E().slice())).join(""):l.call(this):"":l.call(this)}function s(t){u.call(this,t),this.inputmask&&e(this).trigger("setvalue")}var l,u,c;if(!t.inputmask.__valueGet){if(!0!==a.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===o("test".__proto__)?function(e){return e.__proto__}:function(e){return e.constructor.prototype});var p=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value"):n;p&&p.get&&p.set?(l=p.get,u=p.set,Object.defineProperty(t,"value",{get:r,set:s,configurable:!0})):"INPUT"!==t.tagName&&(l=function(){return this.textContent},u=function(e){this.textContent=e},Object.defineProperty(t,"value",{get:r,set:s,configurable:!0}))}else i.__lookupGetter__&&t.__lookupGetter__("value")&&(l=t.__lookupGetter__("value"),u=t.__lookupSetter__("value"),t.__defineGetter__("value",r),t.__defineSetter__("value",s));t.inputmask.__valueGet=l,t.inputmask.__valueSet=u}t.inputmask._valueGet=function(e){return X&&!0!==e?l.call(this.el).split("").reverse().join(""):l.call(this.el)},t.inputmask._valueSet=function(e,t){u.call(this.el,null===e||e===n?"":!0!==t&&X?e.split("").reverse().join(""):e)},l===n&&(l=function(){return this.value},u=function(e){this.value=e},function(t){if(e.valHooks&&(e.valHooks[t]===n||!0!==e.valHooks[t].inputmaskpatch)){var i=e.valHooks[t]&&e.valHooks[t].get?e.valHooks[t].get:function(e){return e.value},r=e.valHooks[t]&&e.valHooks[t].set?e.valHooks[t].set:function(e,t){return e.value=t,e};e.valHooks[t]={get:function(e){if(e.inputmask){if(e.inputmask.opts.autoUnmask)return e.inputmask.unmaskedvalue();var t=i(e);return-1!==v(n,n,e.inputmask.maskset.validPositions)||!0!==a.nullable?t:""}return i(e)},set:function(t,i){var n,a=e(t);return n=r(t,i),t.inputmask&&a.trigger("setvalue"),n},inputmaskpatch:!0}}}(t.type),c=t,re.on(c,"mouseenter",function(t){var i=e(this);this.inputmask._valueGet()!==E().join("")&&i.trigger("setvalue")}))}}(t):t.inputmask=n,s}(t,c);if(!1!==a&&(W=e(Y=t),-1===($=Y!==n?Y.maxLength:n)&&($=n),!0===c.colorMask&&U(Y),p&&("inputmode"in Y&&(Y.inputmode=c.inputmode,Y.setAttribute("inputmode",c.inputmode)),!0===c.disablePredictiveText&&("autocorrect"in Y?Y.autocorrect=!1:(!0!==c.colorMask&&U(Y),Y.type="password"))),!0===a&&(re.on(Y,"submit",oe.submitEvent),re.on(Y,"reset",oe.resetEvent),re.on(Y,"mouseenter",oe.mouseenterEvent),re.on(Y,"blur",oe.blurEvent),re.on(Y,"focus",oe.focusEvent),re.on(Y,"mouseleave",oe.mouseleaveEvent),!0!==c.colorMask&&re.on(Y,"click",oe.clickEvent),re.on(Y,"dblclick",oe.dblclickEvent),re.on(Y,"paste",oe.pasteEvent),re.on(Y,"dragdrop",oe.pasteEvent),re.on(Y,"drop",oe.pasteEvent),re.on(Y,"cut",oe.cutEvent),re.on(Y,"complete",c.oncomplete),re.on(Y,"incomplete",c.onincomplete),re.on(Y,"cleared",c.oncleared),p||!0===c.inputEventOnly?Y.removeAttribute("maxLength"):(re.on(Y,"keydown",oe.keydownEvent),re.on(Y,"keypress",oe.keypressEvent)),re.on(Y,"compositionstart",e.noop),re.on(Y,"compositionupdate",e.noop),re.on(Y,"compositionend",e.noop),re.on(Y,"keyup",e.noop),re.on(Y,"input",oe.inputFallBackEvent),re.on(Y,"beforeinput",e.noop)),re.on(Y,"setvalue",oe.setValueEvent),Q=M().join(""),""!==Y.inputmask._valueGet(!0)||!1===c.clearMaskOnLostFocus||i.activeElement===Y)){var r=e.isFunction(c.onBeforeMask)&&c.onBeforeMask.call(J,Y.
6969inputmask._valueGet(!0),c)||Y.inputmask._valueGet(!0);""!==r&&G(Y,!0,!1,X?r.split("").reverse():r.split(""));var s=E().slice();Q=s.join(""),!1===V(s)&&c.clearIncomplete&&g(),c.clearMaskOnLostFocus&&i.activeElement!==Y&&(-1===v()?s=[]:H(s)),R(Y,s),i.activeElement===Y&&I(Y,F(v()))}}(Y);break;case"format":return Z=(e.isFunction(c.onBeforeMask)&&c.onBeforeMask.call(J,r.value,c)||r.value).split(""),G(n,!0,!1,X?Z.reverse():Z),r.metadata?{value:X?E().slice().reverse().join(""):E().join(""),metadata:u.call(this,{action:"getmetadata"},s,c)}:X?E().slice().reverse().join(""):E().join("");case"isValid":r.value?(Z=r.value.split(""),G(n,!0,!0,X?Z.reverse():Z)):r.value=E().join("");for(var se=E(),le=L(),ue=se.length-1;ue>le&&!j(ue);ue--);return se.splice(le,ue+1-le),V(se)&&r.value===E().join("");case"getemptymask":return M().join("");case"remove":return Y&&Y.inputmask&&(W=e(Y),Y.inputmask._valueSet(c.autoUnmask?B(Y):Y.inputmask._valueGet(!0)),re.off(Y),Y.inputmask.colorMask&&((q=Y.inputmask.colorMask).removeChild(Y),q.parentNode.insertBefore(Y,q),q.parentNode.removeChild(q)),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Y),"value")&&Y.inputmask.__valueGet&&Object.defineProperty(Y,"value",{get:Y.inputmask.__valueGet,set:Y.inputmask.__valueSet,configurable:!0}):i.__lookupGetter__&&Y.__lookupGetter__("value")&&Y.inputmask.__valueGet&&(Y.__defineGetter__("value",Y.inputmask.__valueGet),Y.__defineSetter__("value",Y.inputmask.__valueSet)),Y.inputmask=n),Y;case"getmetadata":if(e.isArray(s.metadata)){var ce=d(!0,0,!1).join("");return e.each(s.metadata,function(e,t){if(t.mask===ce)return ce=t,!1}),ce}return s.metadata}}var c=navigator.userAgent,p=l("touchstart"),f=/iemobile/i.test(c),m=/iphone/i.test(c)&&!f;return a.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:e.noop,onincomplete:e.noop,oncleared:e.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:e.noop,onBeforeMask:null,onBeforePaste:function(t,i){return e.isFunction(i.onBeforeMask)?i.onBeforeMask.call(this,t,i):t},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:e.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:n,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password","search"],ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123,0,229],isComplete:null,canClearPosition:e.noop,preValidation:null,postValidation:null,staticDefinitionSymbol:n,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,disablePredictiveText:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-91-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zÀ-ÿ¨¸A-yµ]",definitionSymbol:"*"},"*":{validator:"[0-91-9A-Za-zÀ-ÿ¨¸A-yµ]"}},aliases:{},masksCache:{},mask:function(o){var l=this;return"string"==typeof o&&(o=i.getElementById(o)||i.querySelectorAll(o)),o=o.nodeName?[o]:o,e.each(o,function(i,o){var c=e.extend(!0,{},l.opts);if(function(i,a,o,s){if(!0===a.importDataAttributes){var l,u,c,p,f=function(e,a){null!==(a=a!==n?a:i.getAttribute(s+"-"+e))&&("string"==typeof a&&(0===e.indexOf("on")?a=t[a]:"false"===a?a=!1:"true"===a&&(a=!0)),o[e]=a)},m=i.getAttribute(s);if(m&&""!==m&&(m=m.replace(/'/g,'"'),u=JSON.parse("{"+m+"}")),u){c=n;for(p in u)if("alias"===p.toLowerCase()){c=u[p];break}}f("alias",c),o.alias&&r(o.alias,o,a);for(l in a){if(u){c=n;for(p in u)if(p.toLowerCase()===l.toLowerCase()){c=u[p];break}}f(l,c)}}return e.extend(!0,a,o),("rtl"===i.dir||a.rightAlign)&&(i.style.textAlign="right"),("rtl"===i.dir||a.numericInput)&&(i.dir="ltr",i.removeAttribute("dir"),a.isRTL=!0),Object.keys(o).length}(o,c,e.extend(!0,{},l.userOptions),l.dataAttribute)){var p=s(c,l.noMasksCache);p!==n&&(o.inputmask!==n&&(o.inputmask.opts.autoUnmask=!0,o.inputmask.remove()),o.inputmask=new a(n,n,!0),o.inputmask.opts=c,o.inputmask.noMasksCache=l.noMasksCache,o.inputmask.userOptions=e.extend(!0,{},l.userOptions),o.inputmask.isRTL=c.isRTL||c.numericInput,o.inputmask.el=o,o.inputmask.maskset=p,e.data(o,"_inputmask_opts",c),u.call(o.inputmask,{action:"mask"}))}}),o&&o[0]&&o[0].inputmask||this},option:function(t,i){return"string"==typeof t?this.opts[t]:"object"===(void 0===t?"undefined":o(t))?(e.extend(this.userOptions,t),this.el&&!0!==i&&this.mask(this.el),this):void 0},unmaskedvalue:function(e){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),u.call(this,{action:"unmaskedvalue",value:e})},remove:function(){return u.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),u.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),u.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),u.call(this,{action:"getmetadata"})},isValid:function(e){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),u.call(this,{action:"isValid",value:e})},format:function(e,t){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),u.call(this,{action:"format",value:e,metadata:t})},analyseMask:function(t,i,r){function o(e,t,i,n){this.matches=[],this.openGroup=e||!1,this.alternatorGroup=!1,this.isGroup=e||!1,this.isOptional=t||!1,this.isQuantifier=i||!1,this.isAlternator=n||!1,this.quantifier={min:1,max:1}}function s(t,o,s){s=s!==n?s:t.matches.length;var l=t.matches[s-1];if(i)0===o.indexOf("[")||k&&/\\d|\\s|\\w]/i.test(o)||"."===o?t.matches.splice(s++,0,{fn:new RegExp(o,r.casing?"i":""),optionality:t.isOptional,newBlockMarker:l===n||l.def!==o,casing:null,def:o,placeholder:n,nativeDef:o}):(k&&(o=o[o.length-1]),e.each(o.split(""),function(e,i){l=t.matches[s-1],t.matches.splice(s++,0,{fn:null,optionality:t.isOptional,newBlockMarker:l===n||l.def!==i&&null!==l.fn,casing:null,def:r.staticDefinitionSymbol||i,placeholder:r.staticDefinitionSymbol!==n?i:n,nativeDef:i})})),k=!1;else{var u=(r.definitions?r.definitions[o]:n)||a.prototype.definitions[o];u&&!k?t.matches.splice(s++,0,{fn:u.validator?"string"==typeof u.validator?new RegExp(u.validator,r.casing?"i":""):new function(){this.test=u.validator}:new RegExp("."),optionality:t.isOptional,newBlockMarker:l===n||l.def!==(u.definitionSymbol||o),casing:u.casing,def:u.definitionSymbol||o,placeholder:u.placeholder,nativeDef:o}):(t.matches.splice(s++,0,{fn:null,optionality:t.isOptional,newBlockMarker:l===n||l.def!==o&&null!==l.fn,casing:null,def:r.staticDefinitionSymbol||o,placeholder:r.staticDefinitionSymbol!==n?o:n,nativeDef:o}),k=!1)}}function l(){if(b.length>0){if(s(f=b[b.length-1],c),f.isAlternator){m=b.pop();for(var e=0;e<m.matches.length;e++)m.matches[e].isGroup=!1;b.length>0?(f=b[b.length-1]).matches.push(m):y.matches.push(m)}}else s(y,c)}var u,c,p,f,m,d,h,g=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,v=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,k=!1,y=new o,b=[],x=[];for(i&&(r.optionalmarker[0]=n,r.optionalmarker[1]=n);u=i?v.exec(t):g.exec(t);){if(c=u[0],i)switch(c.charAt(0)){case"?":c="{0,1}";break;case"+":case"*":c="{"+c+"}"}if(k)l();else switch(c.charAt(0)){case r.escapeChar:k=!0,i&&l();break;case r.optionalmarker[1]:case r.groupmarker[1]:if((p=b.pop()).openGroup=!1,p!==n)if(b.length>0){if((f=b[b.length-1]).matches.push(p),f.isAlternator){m=b.pop();for(var P=0;P<m.matches.length;P++)m.matches[P].isGroup=!1,m.matches[P].alternatorGroup=!1;b.length>0?(f=b[b.length-1]).matches.push(m):y.matches.push(m)}}else y.matches.push(p);else l();break;case r.optionalmarker[0]:b.push(new o(!1,!0));break;case r.groupmarker[0]:b.push(new o(!0));break;case r.quantifiermarker[0]:var S=new o(!1,!1,!0),A=(c=c.replace(/[{}]/g,"")).split(","),C=isNaN(A[0])?A[0]:parseInt(A[0]),M=1===A.length?C:isNaN(A[1])?A[1]:parseInt(A[1]);if("*"!==M&&"+"!==M||(C="*"===M?0:1),S.quantifier={min:C,max:M},b.length>0){var E=b[b.length-1].matches;(u=E.pop()).isGroup||((h=new o(!0)).matches.push(u),u=h),E.push(u),E.push(S)}else(u=y.matches.pop()).isGroup||(i&&null===u.fn&&"."===u.def&&(u.fn=new RegExp(u.def,r.casing?"i":"")),(h=new o(!0)).matches.push(u),u=h),y.matches.push(u),y.matches.push(S);break;case r.alternatormarker:if(b.length>0){var w=(f=b[b.length-1]).matches[f.matches.length-1];
6969d=f.openGroup&&(w.matches===n||!1===w.isGroup&&!1===w.isAlternator)?b.pop():f.matches.pop()}else d=y.matches.pop();if(d.isAlternator)b.push(d);else if(d.alternatorGroup?(m=b.pop(),d.alternatorGroup=!1):m=new o(!1,!1,!1,!0),m.matches.push(d),b.push(m),d.openGroup){d.openGroup=!1;var D=new o(!0);D.alternatorGroup=!0,b.push(D)}break;default:l()}}for(;b.length>0;)p=b.pop(),y.matches.push(p);return y.matches.length>0&&(function t(a){a&&a.matches&&e.each(a.matches,function(e,o){var l=a.matches[e+1];(l===n||l.matches===n||!1===l.isQuantifier)&&o&&o.isGroup&&(o.isGroup=!1,i||(s(o,r.groupmarker[0],0),!0!==o.openGroup&&s(o,r.groupmarker[1]))),t(o)})}(y),x.push(y)),(r.numericInput||r.isRTL)&&function e(t){t.matches=t.matches.reverse();for(var i in t.matches)if(t.matches.hasOwnProperty(i)){var a=parseInt(i);if(t.matches[i].isQuantifier&&t.matches[a+1]&&t.matches[a+1].isGroup){var o=t.matches[i];t.matches.splice(i,1),t.matches.splice(a+1,0,o)}t.matches[i].matches!==n?t.matches[i]=e(t.matches[i]):t.matches[i]=function(e){return e===r.optionalmarker[0]?e=r.optionalmarker[1]:e===r.optionalmarker[1]?e=r.optionalmarker[0]:e===r.groupmarker[0]?e=r.groupmarker[1]:e===r.groupmarker[1]&&(e=r.groupmarker[0]),e}(t.matches[i])}return t}(x[0]),x}},a.extendDefaults=function(t){e.extend(!0,a.prototype.defaults,t)},a.extendDefinitions=function(t){e.extend(!0,a.prototype.definitions,t)},a.extendAliases=function(t){e.extend(!0,a.prototype.aliases,t)},a.format=function(e,t,i){return a(t).format(e,i)},a.unmask=function(e,t){return a(t).unmaskedvalue(e)},a.isValid=function(e,t){return a(t).isValid(e)},a.remove=function(t){e.each(t,function(e,t){t.inputmask&&t.inputmask.remove()})},a.escapeRegex=function(e){return e.replace(new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim"),"\\$1")},a.keyCode={BACKSPACE:8,BACKSPACE_SAFARI:127,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,SPACE:32,TAB:9,UP:38,X:88,CONTROL:17},a})?n.apply(t,a):n)&&(e.exports=r)},function(e,t){e.exports=jQuery},function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}i(4),i(7),i(8),i(9);var a=n(i(1)),r=n(i(0)),o=n(i(2));r.default===o.default&&i(10),window.Inputmask=a.default},function(e,t,i){"use strict";var n,a,r;"function"==typeof Symbol&&Symbol.iterator,a=[i(0),i(1)],void 0!==(r="function"==typeof(n=function(e,t){function i(e){if(!e.tokenizer){var t=[];for(var i in o)-1===t.indexOf(i[0])&&t.push(i[0]);e.tokenizer="("+t.join("+|")+")+?|.",e.tokenizer=new RegExp(e.tokenizer,"g")}return e.tokenizer}function n(e,n,a){for(var r,s="";r=i(a).exec(e);)void 0===n?s+=o[r[0]]?"("+o[r[0]][0]+")":t.escapeRegex(r[0]):o[r[0]]?s+=o[r[0]][3].call(n.date):s+=r[0];return s}function a(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e}function r(e,t,n){var a,r,s,l,u,c,p,f,m={date:new Date(1,0,1)},d=e;if("string"==typeof d){for(;r=i(n).exec(t);){var h=d.slice(0,r[0].length);o.hasOwnProperty(r[0])&&(a=o[r[0]][2],s=o[r[0]][1],l=m,u=h,c=n,p=void 0,f=void 0,"year"===a?(l[a]=(f=4===(p=u).length?p:(new Date).getFullYear().toString().substr(0,4-p.length)+p,n.min&&n.min.year&&n.max&&n.max.year?(f=f.replace(/[^0-9]/g,""),f=p.charAt(0)===n.max.year.charAt(0)?p.replace(/[^0-9]/g,"0"):f+n.min.year.substr(f.length)):f=f.replace(/[^0-9]/g,"0"),f),l["raw"+a]=u):l[a]=c.min&&u.match(/[^0-9]/)?c.min[a]:u,void 0!==s&&s.call(l.date,"month"==a?parseInt(l[a])-1:l[a])),d=d.slice(h.length)}return m}}var o={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return a(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return a(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return a(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return a(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return a(Date.prototype.getHours.call(this),2)}],hhh:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["[01][0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return a(Date.prototype.getHours.call(this),2)}],HHH:["[0-9]+",Date.prototype.setHours,"hours",Date.prototype.getHours],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["[0-5][0-9]",Date.prototype.setMinutes,"minutes",function(){return a(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["[0-5][0-9]",Date.prototype.setSeconds,"seconds",function(){return a(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return a(Date.prototype.getMilliseconds.call(this),3)}],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return a(Date.prototype.getMilliseconds.call(this),2)}],t:[""],tt:[""],T:[""],TT:[""],Z:[""],o:[""],S:[""]},s={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};return t.extendAliases({datetime:{mask:function(e){return e.inputFormat=s[e.inputFormat]||e.inputFormat,e.displayFormat=s[e.displayFormat]||e.displayFormat||e.inputFormat,e.outputFormat=s[e.outputFormat]||e.outputFormat||e.inputFormat,e.placeholder=e.placeholder!==t.prototype.defaults.placeholder?e.placeholder:e.inputFormat,e.min=r(e.min,e.inputFormat,e),e.max=r(e.max,e.inputFormat,e),e.regex=n(e.inputFormat,void 0,e),null},inputFormat:"isoDateTime",displayFormat:void 0,outputFormat:void 0,min:null,max:null,i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Frid
6969ay","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},postValidation:function(e,t,i){var n,a,o,s,l,u=t,c=r(e.join(""),i.inputFormat,i);return u&&c.date.getTime()==c.date.getTime()&&(s=c,l=u,u=(u=(!isFinite(s.day)||"29"==s.day&&!isFinite(s.rawyear)||new Date(s.date.getFullYear(),isFinite(s.month)?s.month:s.date.getMonth()+1,0).getDate()>=s.day)&&l)&&(n=c.date,o=!0,(a=i).min&&a.min.date.getTime()==a.min.date.getTime()&&(o=o&&a.min.date.getTime()<=n.getTime()),a.max&&a.max.date.getTime()==a.max.date.getTime()&&(o=o&&a.max.date.getTime()>=n.getTime()),o)),u},onKeyDown:function(n,r,o,s){if(n.ctrlKey&&n.keyCode===t.keyCode.RIGHT){for(var l,u=new Date,c="";l=i(s).exec(s.inputFormat);)"d"===l[0].charAt(0)?c+=a(u.getDate(),l[0].length):"m"===l[0].charAt(0)?c+=a(u.getMonth()+1,l[0].length):"yyyy"===l[0]?c+=u.getFullYear().toString():"y"===l[0].charAt(0)&&(c+=a(u.getYear(),l[0].length));this.inputmask._valueSet(c),e(this).trigger("setvalue")}},onUnMask:function(e,t,i){return n(i.outputFormat,r(e,i.inputFormat,i),i)},insertMode:!1}}),t})?n.apply(t,a):n)&&(e.exports=r)},function(e,t,i){"use strict";var n;"function"==typeof Symbol&&Symbol.iterator,void 0!==(n=function(){return window}.call(t,i,t,e))&&(e.exports=n)},function(e,t,i){"use strict";var n;"function"==typeof Symbol&&Symbol.iterator,void 0!==(n=function(){return document}.call(t,i,t,e))&&(e.exports=n)},function(e,t,i){"use strict";var n,a,r;"function"==typeof Symbol&&Symbol.iterator,a=[i(0),i(1)],void 0!==(r="function"==typeof(n=function(e,t){return t.extendDefinitions({A:{validator:"[A-Za-zÀ-ÿ¨¸A-yµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zÀ-ÿ¨¸A-yµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}}),t.extendAliases({url:{definitions:{i:{validator:"."}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1,inputmode:"url"},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(e,t,i,n,a){return i-1>-1&&"."!==t.buffer[i-1]?(e=t.buffer[i-1]+e,e=i-2>-1&&"."!==t.buffer[i-2]?t.buffer[i-2]+e:"0"+e):e="00"+e,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(e)}}},onUnMask:function(e,t,i){return e},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(e,t){return(e=e.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",casing:"lower"},"-":{validator:"[0-9A-Za-z-]",casing:"lower"}},onUnMask:function(e,t,i){return e},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),t})?n.apply(t,a):n)&&(e.exports=r)},function(e,t,i){"use strict";var n,a,r;"function"==typeof Symbol&&Symbol.iterator,a=[i(0),i(1)],void 0!==(r="function"==typeof(n=function(e,t,i){function n(e,i){for(var n="",a=0;a<e.length;a++)t.prototype.definitions[e.charAt(a)]||i.definitions[e.charAt(a)]||i.optionalmarker.start===e.charAt(a)||i.optionalmarker.end===e.charAt(a)||i.quantifiermarker.start===e.charAt(a)||i.quantifiermarker.end===e.charAt(a)||i.groupmarker.start===e.charAt(a)||i.groupmarker.end===e.charAt(a)||i.alternatormarker===e.charAt(a)?n+="\\"+e.charAt(a):n+=e.charAt(a);return n}return t.extendAliases({numeric:{mask:function(e){if(0!==e.repeat&&isNaN(e.integerDigits)&&(e.integerDigits=e.repeat),e.repeat=0,e.groupSeparator===e.radixPoint&&e.digits&&"0"!==e.digits&&("."===e.radixPoint?e.groupSeparator=",":","===e.radixPoint?e.groupSeparator=".":e.groupSeparator="")," "===e.groupSeparator&&(e.skipOptionalPartCharacter=i),e.autoGroup=e.autoGroup&&""!==e.groupSeparator,e.autoGroup&&("string"==typeof e.groupSize&&isFinite(e.groupSize)&&(e.groupSize=parseInt(e.groupSize)),isFinite(e.integerDigits))){var t=Math.floor(e.integerDigits/e.groupSize),a=e.integerDigits%e.groupSize;e.integerDigits=parseInt(e.integerDigits)+(0===a?t-1:t),e.integerDigits<1&&(e.integerDigits="*")}e.placeholder.length>1&&(e.placeholder=e.placeholder.charAt(0)),"radixFocus"===e.positionCaretOnClick&&""===e.placeholder&&!1===e.integerOptional&&(e.positionCaretOnClick="lvp"),e.definitions[";"]=e.definitions["~"],e.definitions[";
6969"].definitionSymbol="~",!0===e.numericInput&&(e.positionCaretOnClick="radixFocus"===e.positionCaretOnClick?"lvp":e.positionCaretOnClick,e.digitsOptional=!1,isNaN(e.digits)&&(e.digits=2),e.decimalProtect=!1);var r="[+]";if(r+=n(e.prefix,e),!0===e.integerOptional?r+="~{1,"+e.integerDigits+"}":r+="~{"+e.integerDigits+"}",e.digits!==i){e.radixPointDefinitionSymbol=e.decimalProtect?":":e.radixPoint;var o=e.digits.toString().split(",");isFinite(o[0]&&o[1]&&isFinite(o[1]))?r+=e.radixPointDefinitionSymbol+";{"+e.digits+"}":(isNaN(e.digits)||parseInt(e.digits)>0)&&(e.digitsOptional?r+="["+e.radixPointDefinitionSymbol+";{1,"+e.digits+"}]":r+=e.radixPointDefinitionSymbol+";{"+e.digits+"}")}return r+=n(e.suffix,e),r+="[-]",e.greedy=!1,r},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(t,n,a,r,o){if("-"===a||a===o.negationSymbol.front)return!0===o.allowMinus&&(o.isNegative=o.isNegative===i||!o.isNegative,""===t.join("")||{caret:n,dopost:!0});if(!1===r&&a===o.radixPoint&&o.digits!==i&&(isNaN(o.digits)||parseInt(o.digits)>0)){var s=e.inArray(o.radixPoint,t);if(-1!==s)return!0===o.numericInput?n===s:{caret:s+1}}return!0},postValidation:function(n,a,r){var o=r.suffix.split(""),s=r.prefix.split("");if(a.pos===i&&a.caret!==i&&!0!==a.dopost)return a;var l=a.caret!==i?a.caret:a.pos,u=n.slice();r.numericInput&&(l=u.length-l-1,u=u.reverse());var c=u[l];if(c===r.groupSeparator&&(c=u[l+=1]),l===u.length-r.suffix.length-1&&c===r.radixPoint)return a;c!==i&&c!==r.radixPoint&&c!==r.negationSymbol.front&&c!==r.negationSymbol.back&&(u[l]="?",r.prefix.length>0&&l>=(!1===r.isNegative?1:0)&&l<r.prefix.length-1+(!1===r.isNegative?1:0)?s[l-(!1===r.isNegative?1:0)]="?":r.suffix.length>0&&l>=u.length-r.suffix.length-(!1===r.isNegative?1:0)&&(o[l-(u.length-r.suffix.length-(!1===r.isNegative?1:0))]="?")),s=s.join(""),o=o.join("");var p=u.join("").replace(s,"");if(p=(p=(p=(p=p.replace(o,"")).replace(new RegExp(t.escapeRegex(r.groupSeparator),"g"),"")).replace(new RegExp("[-"+t.escapeRegex(r.negationSymbol.front)+"]","g"),"")).replace(new RegExp(t.escapeRegex(r.negationSymbol.back)+"$"),""),isNaN(r.placeholder)&&(p=p.replace(new RegExp(t.escapeRegex(r.placeholder),"g"),"")),p.length>1&&1!==p.indexOf(r.radixPoint)&&("0"===c&&(p=p.replace(/^\?/g,"")),p=p.replace(/^0/g,"")),p.charAt(0)===r.radixPoint&&""!==r.radixPoint&&!0!==r.numericInput&&(p="0"+p),""!==p){if(p=p.split(""),(!r.digitsOptional||r.enforceDigitsOnBlur&&"blur"===a.event)&&isFinite(r.digits)){var f=e.inArray(r.radixPoint,p),m=e.inArray(r.radixPoint,u);-1===f&&(p.push(r.radixPoint),f=p.length-1);for(var d=1;d<=r.digits;d++)r.digitsOptional&&(!r.enforceDigitsOnBlur||"blur"!==a.event)||p[f+d]!==i&&p[f+d]!==r.placeholder.charAt(0)?-1!==m&&u[m+d]!==i&&(p[f+d]=p[f+d]||u[m+d]):p[f+d]=a.placeholder||r.placeholder.charAt(0)}if(!0!==r.autoGroup||""===r.groupSeparator||c===r.radixPoint&&a.pos===i&&!a.dopost)p=p.join("");else{var h=p[p.length-1]===r.radixPoint&&a.c===r.radixPoint;p=t(function(e,t){var i="";if(i+="("+t.groupSeparator+"*{"+t.groupSize+"}){*}",""!==t.radixPoint){var n=e.join("").split(t.radixPoint);n[1]&&(i+=t.radixPoint+"*{"+n[1].match(/^\d*\??\d*/)[0].length+"}")}return i}(p,r),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(p.join("")),h&&(p+=r.radixPoint),p.charAt(0)===r.groupSeparator&&p.substr(1)}}if(r.isNegative&&"blur"===a.event&&(r.isNegative="0"!==p),p=s+p,p+=o,r.isNegative&&(p=r.negationSymbol.front+p,p+=r.negationSymbol.back),p=p.split(""),c!==i)if(c!==r.radixPoint&&c!==r.negationSymbol.front&&c!==r.negationSymbol.back)(l=e.inArray("?",p))>-1?p[l]=c:l=a.caret||0;else if(c===r.radixPoint||c===r.negationSymbol.front||c===r.negationSymbol.back){var g=e.inArray(c,p);-1!==g&&(l=g)}r.numericInput&&(l=p.length-l-1,p=p.reverse());var v={caret:c===i||a.pos!==i?l+(r.numericInput?-1:1):l,buffer:p,refreshFromBuffer:a.dopost||n.join("")!==p.join("")};return v.refreshFromBuffer?v:a},onBeforeWrite:function(n,a,r,o){if(n)switch(n.type){case"keydown":return o.postValidation(a,{caret:r,dopost:!0},o);case"blur":case"checkval":var s;if((l=o).parseMinMaxOptions===i&&(null!==l.min&&(l.min=l.min.toString().replace(new RegExp(t.escapeRegex(l.groupSeparator),"g"),""),","===l.radixPoint&&(l.min=l.min.replace(l.radixPoint,".")),l.min=isFinite(l.min)?parseFloat(l.min):NaN,isNaN(l.min)&&(l.min=Number.MIN_VALUE)),null!==l.max&&(l.max=l.max.toString().replace(new RegExp(t.escapeRegex(l.groupSeparator),"g"),""),","===l.radixPoint&&(l.max=l.max.replace(l.radixPoint,".")),l.max=isFinite(l.max)?parseFloat(l.max):NaN,isNaN(l.max)&&(l.max=Number.MAX_VALUE)),l.parseMinMaxOptions="done"),null!==o.min||null!==o.max){if(s=o.onUnMask(a.join(""),i,e.extend({},o,{unmaskAsNumber:!0})),null!==o.min&&s<o.min)return o.isNegative=o.min<0,o.postValidation(o.min.toString().replace(".",o.radixPoint).split(""),{caret:r,dopost:!0,placeholder:"0"},o);if(null!==o.max&&s>o.max)return o.isNegative=o.max<0,o.postValidation(o.max.toString().replace(".",o.radixPoint).split(""),{caret:r,dopost:!0,placeholder:"0"},o)}return o.postValidation(a,{caret:r,placeholder:"0",event:"blur"},o);case"_checkval":return{caret:r}}var l},regex:{integerPart:function(e,i){return i?new RegExp("["+t.escapeRegex(e.negationSymbol.front)+"+]?"):new RegExp("["+t.escapeRegex(e.negationSymbol.front)+"+]?\\d+")},integerNPart:function(e){return new RegExp("[\\d"+t.escapeRegex(e.groupSeparator)+t.escapeRegex(e.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(e,n,a,r,o,s){var l=r?new RegExp("[0-9"+t.escapeRegex(o.groupSeparator)+"]").test(e):new RegExp("[0-9]").test(e);
6969if(!0===l){if(!0!==o.numericInput&&n.validPositions[a]!==i&&"~"===n.validPositions[a].match.def&&!s){var u=n.buffer.join(""),c=(u=(u=u.replace(new RegExp("[-"+t.escapeRegex(o.negationSymbol.front)+"]","g"),"")).replace(new RegExp(t.escapeRegex(o.negationSymbol.back)+"$"),"")).split(o.radixPoint);c.length>1&&(c[1]=c[1].replace(/0/g,o.placeholder.charAt(0))),"0"===c[0]&&(c[0]=c[0].replace(/0/g,o.placeholder.charAt(0))),u=c[0]+o.radixPoint+c[1]||"";var p=n._buffer.join("");for(u===o.radixPoint&&(u=p);null===u.match(t.escapeRegex(p)+"$");)p=p.slice(1);l=(u=(u=u.replace(p,"")).split(""))[a]===i?{pos:a,remove:a}:{pos:a}}}else r||e!==o.radixPoint||n.validPositions[a-1]!==i||(n.buffer[a]="0",l={pos:a+1});return l},cardinality:1},"+":{validator:function(e,t,i,n,a){return a.allowMinus&&("-"===e||e===a.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(e,t,i,n,a){return a.allowMinus&&e===a.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(e,i,n,a,r){var o="["+t.escapeRegex(r.radixPoint)+"]",s=new RegExp(o).test(e);return s&&i.validPositions[n]&&i.validPositions[n].match.placeholder===r.radixPoint&&(s={caret:n+1}),s},cardinality:1,placeholder:function(e){return e.radixPoint}}},onUnMask:function(e,i,n){if(""===i&&!0===n.nullable)return i;var a=e.replace(n.prefix,"");return a=(a=a.replace(n.suffix,"")).replace(new RegExp(t.escapeRegex(n.groupSeparator),"g"),""),""!==n.placeholder.charAt(0)&&(a=a.replace(new RegExp(n.placeholder.charAt(0),"g"),"0")),n.unmaskAsNumber?(""!==n.radixPoint&&-1!==a.indexOf(n.radixPoint)&&(a=a.replace(t.escapeRegex.call(this,n.radixPoint),".")),a=(a=a.replace(new RegExp("^"+t.escapeRegex(n.negationSymbol.front)),"-")).replace(new RegExp(t.escapeRegex(n.negationSymbol.back)+"$"),""),Number(a)):a},isComplete:function(e,i){var n=e.join("");if(e.slice().join("")!==n)return!1;var a=n.replace(i.prefix,"");return a=(a=a.replace(i.suffix,"")).replace(new RegExp(t.escapeRegex(i.groupSeparator)+"([0-9]{3})","g"),"$1"),","===i.radixPoint&&(a=a.replace(t.escapeRegex(i.radixPoint),".")),isFinite(a)},onBeforeMask:function(e,n){if(n.isNegative=i,e=e.toString().charAt(e.length-1)===n.radixPoint?e.toString().substr(0,e.length-1):e.toString(),""!==n.radixPoint&&isFinite(e)){var a=e.split("."),r=""!==n.groupSeparator?parseInt(n.groupSize):0;2===a.length&&(a[0].length>r||a[1].length>r||a[0].length<=r&&a[1].length<r)&&(e=e.replace(".",n.radixPoint))}var o=e.match(/,/g),s=e.match(/\./g);if(e=s&&o?s.length>o.length?(e=e.replace(/\./g,"")).replace(",",n.radixPoint):o.length>s.length?(e=e.replace(/,/g,"")).replace(".",n.radixPoint):e.indexOf(".")<e.indexOf(",")?e.replace(/\./g,""):e.replace(/,/g,""):e.replace(new RegExp(t.escapeRegex(n.groupSeparator),"g"),""),0===n.digits&&(-1!==e.indexOf(".")?e=e.substring(0,e.indexOf(".")):-1!==e.indexOf(",")&&(e=e.substring(0,e.indexOf(",")))),""!==n.radixPoint&&isFinite(n.digits)&&-1!==e.indexOf(n.radixPoint)){var l=e.split(n.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(n.digits)<l.toString().length){var u=Math.pow(10,parseInt(n.digits));e=e.replace(t.escapeRegex(n.radixPoint),"."),e=(e=Math.round(parseFloat(e)*u)/u).toString().replace(".",n.radixPoint)}}return e},canClearPosition:function(e,t,i,n,a){var r=e.validPositions[t],o=r.input!==a.radixPoint||null!==e.validPositions[t].match.fn&&!1===a.decimalProtect||r.input===a.radixPoint&&e.validPositions[t+1]&&null===e.validPositions[t+1].match.fn||isFinite(r.input)||t===i||r.input===a.groupSeparator||r.input===a.negationSymbol.front||r.input===a.negationSymbol.back;return!o||"+"!==r.match.nativeDef&&"-"!==r.match.nativeDef||(a.isNegative=!1),o},onKeyDown:function(i,n,a,r){var o=e(this);if(i.ctrlKey)switch(i.keyCode){case t.keyCode.UP:o.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(r.step)),o.trigger("setvalue");break;case t.keyCode.DOWN:o.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(r.step)),o.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),t})?n.apply(t,a):n)&&(e.exports=r)},function(e,t,i){"use strict";var n,a,r;"function"==typeof Symbol&&Symbol.iterator,a=[i(0),i(1)],void 0!==(r="function"==typeof(n=function(e,t){function i(e,t){var i=(e.mask||e).replace(/#/g,"0").replace(/\)/,"0").replace(/[+()#-]/g,""),n=(t.mask||t).replace(/#/g,"0").replace(/\)/,"0").replace(/[+()#-]/g,"");return i.localeCompare(n)}
6969var n=t.prototype.analyseMask;return t.prototype.analyseMask=function(t,i,a){var r={};return a.phoneCodes&&(a.phoneCodes&&a.phoneCodes.length>1e3&&(function e(i,n,a){n=n||"",a=a||r,""!==n&&(a[n]={});for(var o="",s=a[n]||a,l=i.length-1;l>=0;l--)s[o=(t=i[l].mask||i[l]).substr(0,1)]=s[o]||[],s[o].unshift(t.substr(1)),i.splice(l,1);for(var u in s)s[u].length>500&&e(s[u].slice(),u,s)}((t=t.substr(1,t.length-2)).split(a.groupmarker[1]+a.alternatormarker+a.groupmarker[0])),t=function t(i){var n="",r=[];for(var o in i)e.isArray(i[o])?1===i[o].length?r.push(o+i[o]):r.push(o+a.groupmarker[0]+i[o].join(a.groupmarker[1]+a.alternatormarker+a.groupmarker[0])+a.groupmarker[1]):r.push(o+t(i[o]));return 1===r.length?n+=r[0]:n+=a.groupmarker[0]+r.join(a.groupmarker[1]+a.alternatormarker+a.groupmarker[0])+a.groupmarker[1],n}(r)),t=t.replace(/9/g,"\\9")),n.call(this,t,i,a)},t.extendAliases({abstractphone:{groupmarker:["<",">"],countrycode:"",phoneCodes:[],keepStatic:"auto",mask:function(e){return e.definitions={"#":t.prototype.definitions[9]},e.phoneCodes.sort(i)},onBeforeMask:function(e,t){var i=e.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(i.indexOf(t.countrycode)>1||-1===i.indexOf(t.countrycode))&&(i="+"+t.countrycode+i),i},onUnMask:function(e,t,i){return e.replace(/[()#-]/g,"")},inputmode:"tel"}}),t})?n.apply(t,a):n)&&(e.exports=r)},function(e,t,i){"use strict";var n,a,r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};a=[i(2),i(1)],void 0!==(r="function"==typeof(n=function(e,t){return void 0===e.fn.inputmask&&(e.fn.inputmask=function(i,n){var a,r=this[0];if(void 0===n&&(n={}),"string"==typeof i)switch(i){case"unmaskedvalue":return r&&r.inputmask?r.inputmask.unmaskedvalue():e(r).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return r&&r.inputmask?r.inputmask.getemptymask():"";case"hasMaskedValue":return!(!r||!r.inputmask)&&r.inputmask.hasMaskedValue();case"isComplete":return!r||!r.inputmask||r.inputmask.isComplete();case"getmetadata":return r&&r.inputmask?r.inputmask.getmetadata():void 0;case"setvalue":e(r).val(n),r&&void 0===r.inputmask&&e(r).triggerHandler("setvalue");break;case"option":if("string"!=typeof n)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(n)});if(r&&void 0!==r.inputmask)return r.inputmask.option(n);break;default:return n.alias=i,a=new t(n),this.each(function(){a.mask(this)})}else{if("object"==(void 0===i?"undefined":o(i)))return a=new t(i),void 0===i.mask&&void 0===i.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(i);a.mask(this)}):this.each(function(){a.mask(this)});if(void 0===i)return this.each(function(){(a=new t(n)).mask(this)})}}),e.fn.inputmask})?n.apply(t,a):n)&&(e.exports=r)}]);
6970/* End */
6971;; /* /bitrix/templates/aspro-priority2/js/observer.min.js?17635572773650*/
6972; /* /bitrix/templates/aspro-priority2/vendor/jquery.cookie.min.js?17635572781613*/
6973; /* /bitrix/templates/aspro-priority2/vendor/bootstrap.js?176355727827908*/
6974; /* /bitrix/templates/aspro-priority2/vendor/jquery.validate.min.js?176355727822254*/
6975; /* /bitrix/templates/aspro-priority2/vendor/js/ripple.min.js?17635572781624*/
6976; /* /bitrix/templates/aspro-priority2/js/detectmobilebrowser.js?17635572772203*/
6977; /* /bitrix/templates/aspro-priority2/js/jquery.actual.min.js?17635572771239*/
6978; /* /bitrix/templates/aspro-priority2/js/jquery.plugin.min.js?17635572773356*/
6979; /* /bitrix/templates/aspro-priority2/js/jquery.alphanumeric.min.js?1763557277942*/
6980; /* /bitrix/templates/aspro-priority2/js/jqModal.min.js?17635572773197*/
6981; /* /bitrix/templates/aspro-priority2/js/jquery.uniform.min.js?17635572778308*/
6982; /* /bitrix/templates/aspro-priority2/js/jquery.countdown.min.js?176355727721419*/
6983; /* /bitrix/templates/aspro-priority2/js/jquery.countdown-ru.min.js?17635572771487*/
6984; /* /bitrix/templates/aspro-priority2/js/scrollTabs.min.js?17635572777548*/
6985;
6985 /* /bitrix/templates/aspro-priority2/js/blocks/controls.js?17743598708256*/
6986; /* /bitrix/templates/aspro-priority2/js/blocks/mobile.min.js?17635572774697*/
6987; /* /bitrix/templates/aspro-priority2/js/blocks/selectOffer.min.js?17635572772069*/
6988; /* /bitrix/templates/aspro-priority2/js/blocks/tabs-history.min.js?17635572771129*/
6989; /* /bitrix/templates/aspro-priority2/js/general.js?1774628324196614*/
6990; /* /bitrix/templates/aspro-priority2/js/custom.js?17764132196421*/
6991; /* /bitrix/templates/aspro-priority2/js/logo.min.js?17635572774068*/
6992; /* /bitrix/templates/aspro-priority2/js/phones.min.js?1763557277633*/
6993; /* /bitrix/templates/aspro-priority2/components/bitrix/menu/menu_new/script.min.js?17635572772205*/
6994; /* /bitrix/templates/aspro-priority2/components/bitrix/menu/left/script.min.js?1763557277908*/
6995; /* /bitrix/templates/aspro-priority2/components/bitrix/menu/bottom/script.min.js?1763557277266*/
6996; /* /bitrix/components/aspro/marketing.popup.priority2/templates/.default/script.min.js?1763557091947*/
6997; /* /bitrix/components/bitrix/search.title/script.min.js?17694356126573*/
6998; /* /bitrix/templates/aspro-priority2/components/bitrix/search.title/fixed/script.min.js?17635572777482*/
6999; /* /bitrix/templates/aspro-priority2/js/jquery.inputmask.bundle.min.js?176355727770933*/
7000
7001//# sourceMappingURL=template_c1b905befb0c6abde0f9804c59f5b25c.map.js

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.