; /* Start:"a:4:{s:4:"full";s:85:"/bitrix/templates/dresscode/components/bitrix/news/brands/script.min.js?1707761367663";s:6:"source";s:67:"/bitrix/templates/dresscode/components/bitrix/news/brands/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ $(function(){var o=!1;$("#selectSortParams, #selectCountElements").on("change",function(){window.location.href=$(this).find(".dropDownItem.selected").data("value")});$(document).on("click",".oSmartFilter",function(e){var t=0;return 0<$(".oFilter").length&&(t=$(".oFilter").offset().top),o=o?($("#smartFilter").removeClass("opened").removeAttr("style"),!1):($("#smartFilter").addClass("opened").css({marginTop:t+24+"px",top:"24px"}),!0),e.preventDefault()}),$(document).on("click","#smartFilter, .oSmartFilter, .rangeSlider",function(e){return e.stopImmediatePropagation()}),$(document).on("click",function(e){o&&($("#smartFilter").removeClass("opened"),o=!1)})}); /* End */ ; ; /* Start:"a:4:{s:4:"full";s:95:"/bitrix/components/dresscode/cast.smart.filter/templates/.default/script.min.js?171964375216258";s:6:"source";s:75:"/bitrix/components/dresscode/cast.smart.filter/templates/.default/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ var getSmartFilterParamsCast;function JCSmartFilter(t,e,i){this.ajaxURL=t,this.form=null,this.timer=null,this.cacheKey="",this.cache=[],this.viewMode=e,i&&i.SEF_SET_FILTER_URL&&(this.bindUrlToButton("set_filter",i.SEF_SET_FILTER_URL),this.sef=!0),i&&i.SEF_DEL_FILTER_URL&&this.bindUrlToButton("del_filter",i.SEF_DEL_FILTER_URL),getSmartFilterParamsCast=i}JCSmartFilter.prototype.keyup=function(t){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(BX.delegate(function(){this.reload(t)},this),500)},JCSmartFilter.prototype.click=function(t){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(BX.delegate(function(){this.reload(t)},this),500)},JCSmartFilter.prototype.reload=function(t){if(""!==this.cacheKey)this.timer&&clearTimeout(this.timer),this.timer=setTimeout(BX.delegate(function(){this.reload(t)},this),1e3);else if(this.cacheKey="|",this.position=BX.pos(t,!0),this.form=BX.findParent(t,{tag:"form"}),this.form){var e=[{name:"ajax",value:"y"}];this.gatherInputsValues(e,BX.findChildren(this.form,{tag:new RegExp("^(input|select)$","i")},!0));for(var i=0;ithis.minPrice&&(t=this.curMinPrice-this.minPrice,this.leftPercent=100*t/this.priceDiff,this.leftSlider.style.left=this.leftPercent+"%",this.colorUnavailableActive.style.left=this.leftPercent+"%"),this.setMinFilteredValue(this.fltMinPrice),this.curMaxPrice=this.minPrice?(t=this.fltMinPrice-this.minPrice,this.fltMinPercent=100*t/this.priceDiff,this.leftPercent>this.fltMinPercent?this.colorAvailableActive.style.left=this.leftPercent+"%":this.colorAvailableActive.style.left=this.fltMinPercent+"%",this.colorAvailableInactive.style.left=this.fltMinPercent+"%"):(this.colorAvailableActive.style.left="0%",this.colorAvailableInactive.style.left="0%")},t.prototype.setMaxFilteredValue=function(t){this.fltMaxPrice=parseFloat(t),this.fltMaxPrice<=this.maxPrice?(t=this.maxPrice-this.fltMaxPrice,this.fltMaxPercent=100*t/this.priceDiff,this.rightPercent>this.fltMaxPercent?this.colorAvailableActive.style.right=this.rightPercent+"%":this.colorAvailableActive.style.right=this.fltMaxPercent+"%",this.colorAvailableInactive.style.right=this.fltMaxPercent+"%"):(this.colorAvailableActive.style.right="0%",this.colorAvailableInactive.style.right="0%")},t.prototype.getXCoord=function(t){var t=t.getBoundingClientRect(),e=document.body,i=document.documentElement,r=window.pageXOffset||i.scrollLeft||e.scrollLeft,i=i.clientLeft||e.clientLeft||0,e=t.left+r-i;return Math.round(e)},t.prototype.getPageX=function(t){t=t||window.event;var e,i,r=null;return this.isTouch&&null!=event.targetTouches[0]?r=t.targetTouches[0].pageX:null!=t.pageX?r=t.pageX:null!=t.clientX&&(e=document.documentElement,i=document.body,r=t.clientX+(e.scrollLeft||i&&i.scrollLeft||0),r-=e.clientLeft||0),r},t.prototype.recountMinPrice=function(){var t=this.priceDiff*this.leftPercent/100;(t=(this.minPrice+t).toFixed(this.precision))!=this.minPrice?this.minInput.value=t:this.minInput.value="",smartFilter.keyup(this.minInput)},t.prototype.recountMaxPrice=function(){var t=this.priceDiff*this.rightPercent/100;(t=(this.maxPrice-t).toFixed(this.precision))!=this.maxPrice?this.maxInput.value=t:this.maxInput.value="",smartFilter.keyup(this.maxInput)},t.prototype.onInputChange=function(){var t,e;this.minInput.value&&(t=(t=(t=(t=this.minInput.value)this.maxPrice?this.maxPrice:t)-this.minPrice,this.leftPercent=100*t/this.priceDiff,this.makeLeftSliderMove(!1)),this.maxInput.value&&((e=(e=this.maxInput.value)this.maxPrice&&(e=this.maxPrice),t=this.maxPrice-e,this.rightPercent=100*t/this.priceDiff,this.makeRightSliderMove(!1))},t.prototype.makeLeftSliderMove=function(t){t=!1!==t,this.leftSlider.style.left=this.leftPercent+"%",this.colorUnavailableActive.style.left=this.leftPercent+"%";var e=!1;100<=this.leftPercent+this.rightPercent&&(e=!0,this.rightPercent=100-this.leftPercent,this.rightSlider.style.right=this.rightPercent+"%",this.colorUnavailableActive.style.right=this.rightPercent+"%"),this.leftPercent>=this.fltMinPercent&&this.leftPercent<=100-this.fltMaxPercent?(this.colorAvailableActive.style.left=this.leftPercent+"%",e&&(this.colorAvailableActive.style.right=100-this.leftPercent+"%")):this.leftPercent<=this.fltMinPercent?(this.colorAvailableActive.style.left=this.fltMinPercent+"%",e&&(this.colorAvailableActive.style.right=100-this.fltMinPercent+"%")):this.leftPercent>=this.fltMaxPercent&&(this.colorAvailableActive.style.left=100-this.fltMaxPercent+"%",e)&&(this.colorAvailableActive.style.right=this.fltMaxPercent+"%"),t&&(this.recountMinPrice(),e)&&this.recountMaxPrice()},t.prototype.countNewLeft=function(t){var t=this.getPageX(t),e=this.getXCoord(this.trackerWrap),i=this.trackerWrap.offsetWidth,t=t-e;return t<0?t=0:i=this.fltMinPercent&&this.rightPercent>=this.fltMaxPercent?(this.colorAvailableActive.style.right=this.rightPercent+"%",e&&(this.colorAvailableActive.style.left=100-this.rightPercent+"%")):this.rightPercent<=this.fltMaxPercent?(this.colorAvailableActive.style.right=this.fltMaxPercent+"%",e&&(this.colorAvailableActive.style.left=100-this.fltMaxPercent+"%")):100-this.rightPercent<=this.fltMinPercent&&(this.colorAvailableActive.style.right=100-this.fltMinPercent+"%",e)&&(this.colorAvailableActive.style.left=this.fltMinPercent+"%"),t&&(this.recountMaxPrice(),e)&&this.recountMinPrice()},t.prototype.onMoveRightSlider=function(t){return this.isTouch||(this.rightSlider.ondragstart=function(){return!1}),this.isTouch?(document.ontouchmove=BX.proxy(function(t){this.rightPercent=100-100*this.countNewLeft(t)/this.trackerWrap.offsetWidth,this.makeRightSliderMove()},this),document.ontouchend=function(){document.ontouchmove=document.ontouchend=null}):(document.onmousemove=BX.proxy(function(t){this.rightPercent=100-100*this.countNewLeft(t)/this.trackerWrap.offsetWidth,this.makeRightSliderMove()},this),document.onmouseup=function(){document.onmousemove=document.onmouseup=null}),!1},t}(),JCSmartFilter.prototype.selectDropDownItem=function(t,e){$(t).parent().hasClass("disabled")||this.keyup(BX(e))};var openDropdownList=function(t){$(this).siblings(".dropdownList").toggleClass("opened")},selectItem=function(t){var e=$(this);e.parent().addClass("selected").siblings().removeClass("selected").parent().siblings(".checkedItem").html(e.html()),closeList()},closeList=function(t){$("#smartFilter .dropdownList").removeClass("opened")},showHint=function(t){$(this).find(".hintValue").toggle(),t.stopImmediatePropagation()},closeHint=function(t){$(".hintValue").hide(),t.stopPropagation()},showAllParams=function(t){var e=$(this),i=e.parents("li").siblings("li");0').submit(),t.preventDefault()}),$("#modef_send").on("click",function(t){e()}),$("#del_filter").on("click",function(t){null==getSmartFilterParamsCast.SEF_DEL_FILTER_URL&&i.append('').submit(),t.preventDefault()}),r.find(".close").on("click",function(t){$(this).parent().hide(),t.preventDefault()}),$(".propExpander").on("click",function(){$(this).toggleClass("expanded").siblings(".params").toggleClass("collapsed")}),$(".paramsBoxTitle span").on("click",function(){$(this).parents(".paramsBoxTitle").siblings(".propExpander").toggleClass("expanded").siblings(".params").toggleClass("collapsed")}),$(document).on("click","",closeHint),$(document).on("click","",closeList),$(document).on("click","#smartFilter .showALL",showAllParams),$(document).on("click","#smartFilter .hint",showHint),$(document).on("click","#smartFilter .hint .close",closeHint),$(document).on("click","#smartFilter .checkedItem",openDropdownList),$(document).on("click","#smartFilter .dropdown li:not('.disabled') .item",selectItem),$(document).on("click","#smartFilter .hint",function(t){t.stopImmediatePropagation()}),$(document).on("click",".dropdown",function(t){t.stopImmediatePropagation()})}); /* End */ ; ; /* Start:"a:4:{s:4:"full";s:91:"/bitrix/templates/dresscode/components/dresscode/slider/middle/js/init.min.js?1707761367136";s:6:"source";s:73:"/bitrix/templates/dresscode/components/dresscode/slider/middle/js/init.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ $(function(){$("#middleSlider").dwSlider({rightButton:".middleSliderBtnRight",leftButton:".middleSliderBtnLeft",delay:4e3,speed:800})}); /* End */ ;; /* /bitrix/templates/dresscode/components/bitrix/news/brands/script.min.js?1707761367663*/ ; /* /bitrix/components/dresscode/cast.smart.filter/templates/.default/script.min.js?171964375216258*/ ; /* /bitrix/templates/dresscode/components/dresscode/slider/middle/js/init.min.js?1707761367136*/