function email_test(e){return!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,8})+$/.test(e.value)}let sliders=document.querySelectorAll("._swiper");if(sliders){for(let e=0;e0)for(let c=0;c-1||ua.indexOf("Trident/")>-1}function testWebP(e){var t=new Image;t.onload=t.onerror=function(){e(2==t.height)},t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}function ibg(){if(isIE()){let t=document.querySelectorAll("._ibg");for(var e=0;e{for(let e=0;e";for(let b=0;b"+S+""}m.innerHTML=v,v+=" 

"}}let tabs=document.querySelectorAll("._tabs");for(let L=0;L0){const H=Array.from(spollersArray).filter((function(e,t,l){return!e.dataset.spollers.split(",")[0]}));H.length>0&&initSpollers(H);const M=Array.from(spollersArray).filter((function(e,t,l){return e.dataset.spollers.split(",")[0]}));if(M.length>0){const P=[];M.forEach((e=>{const t={},l=e.dataset.spollers.split(",");t.value=l[0],t.type=l[1]?l[1].trim():"max",t.item=e,P.push(t)}));let T=P.map((function(e){return"("+e.type+"-width: "+e.value+"px),"+e.value+","+e.type}));T=T.filter((function(e,t,l){return l.indexOf(e)===t})),T.forEach((e=>{const t=e.split(","),l=t[1],o=t[2],n=window.matchMedia(t[0]),r=P.filter((function(e){if(e.value===l&&e.type===o)return!0}));n.addListener((function(){initSpollers(r,n)})),initSpollers(r,n)}))}function initSpollers(e,t=!1){e.forEach((e=>{e=t?e.item:e,t.matches||!t?(e.classList.add("_init"),initSpollerBody(e),e.addEventListener("click",setSpollerAction)):(e.classList.remove("_init"),initSpollerBody(e,!1),e.removeEventListener("click",setSpollerAction))}))}function initSpollerBody(e,t=!0){const l=e.querySelectorAll("[data-spoller]");l.length>0&&l.forEach((e=>{t?(e.removeAttribute("tabindex"),e.classList.contains("_active")||(e.nextElementSibling.hidden=!0)):(e.setAttribute("tabindex","-1"),e.nextElementSibling.hidden=!1)}))}function setSpollerAction(e){const t=e.target;if(t.hasAttribute("data-spoller")||t.closest("[data-spoller]")){const l=t.hasAttribute("data-spoller")?t:t.closest("[data-spoller]"),o=l.closest("[data-spollers]"),n=!!o.hasAttribute("data-one-spoller");o.querySelectorAll("._slide").length||(n&&!l.classList.contains("_active")&&hideSpollersBody(o),l.classList.toggle("_active"),_slideToggle(l.nextElementSibling,500)),e.preventDefault()}}function hideSpollersBody(e){const t=e.querySelector("[data-spoller]._active");t&&(t.classList.remove("_active"),_slideUp(t.nextElementSibling,500))}}let gallery=document.querySelectorAll("._gallery");function gallery_init(){for(let e=0;e-1?e.style.display="":e.style.display="none"}}function digi(e){return e.toString().replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g,"$1 ")}function digi_animate(e){if(e.length>0)for(let t=0;t0&&popup_close("",!1);let l=document.querySelector(".popup_"+e);if(l&&unlock){if(""!=t&&null!=t){document.querySelector(".popup_video").querySelector(".popup__video").innerHTML=''}document.querySelector(".menu__body._active")||body_lock_add(500),l.classList.add("_active"),history.pushState("","","#"+e)}}function popup_close(e,t=!0){if(unlock){if(e){let t=e.querySelector(".popup__video");t&&(t.innerHTML=""),e.classList.remove("_active")}else for(let e=0;e{e.classList.contains("_slide")||(e.classList.add("_slide"),e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=e.offsetHeight+"px",e.offsetHeight,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout((()=>{e.hidden=!0,e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.classList.remove("_slide")}),t))},_slideDown=(e,t=500)=>{if(!e.classList.contains("_slide")){e.classList.add("_slide"),e.hidden&&(e.hidden=!1);let l=e.offsetHeight;e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.offsetHeight,e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=l+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout((()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.classList.remove("_slide")}),t)}},_slideToggle=(e,t=500)=>e.hidden?_slideDown(e,t):_slideUp(e,t);function _wrap(e,t){e.parentNode.insertBefore(t,e),t.appendChild(e)}function _removeClasses(e,t){for(var l=0;l0){let z=document.querySelector(".wrapper");for(let V=0;V0){let j,R=Y.querySelector("._more-link"),U=Y.querySelector("._more-content"),F=U.getAttribute("data-view");function setSize(e){let t,l=0,o=0;for(let e=0;e0||j>0&&0===e)&&(R.classList.contains("_active")?setSize("start"):setSize())}"0s"===getComputedStyle(U).getPropertyValue("transition-duration")&&(U.style.cssText="transition-duration: 1ms"),R.addEventListener("click",(function(e){R.classList.contains("_active")?setSize():setSize("start"),R.classList.toggle("_active"),e.preventDefault()})),U.addEventListener("transitionend",updateSize,!1),window.addEventListener("resize",(function(e){R.classList.contains("_active")?setSize("start"):setSize()})),setSize()}}}const ratings=document.querySelectorAll(".rating");function initRatings(){let e,t;for(let e=0;e1&&(i=1);let s=e(i);t(s),i<1&&requestAnimationFrame(n)}))}function makeEaseOut(e){return function(t){return 1-e(1-t)}}function makeEaseInOut(e){return function(t){return t<.5?e(2*t)/2:(2-e(2*(1-t)))/2}}function quad(e){return Math.pow(e,2)}function circ(e){return 1-Math.sin(Math.acos(e))}ratings.length>0&&initRatings(),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}return null}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);let services=document.querySelector(".hidden");function servicesPopap(e){e.target.closest(".bottom-header__link_services")&&services.classList.add("_active"),e.target.closest(".bottom-header__body")||services.classList.remove("_active")}document.addEventListener("mouseover",servicesPopap),console.log(services.innerHTML);let forms=document.querySelectorAll("form");if(forms.length>0)for(let X=0;X0)for(let e=0;e'+l+"")}function form_remove_error(e){e.classList.remove("_error"),e.parentElement.classList.remove("_error");let t=e.parentElement.querySelector(".form__error");t&&e.parentElement.removeChild(t)}function form_clean(e){let t=e.querySelectorAll("input,textarea");for(let e=0;e0)for(let e=0;e0)for(let e=0;e'),e.parentElement.querySelector(".select").appendChild(e),select_item(e)}function select_item(e){const t=e.parentElement,l=t.querySelector(".select__item"),o=e.querySelectorAll("option"),n=e.querySelector("option:checked").text,r=e.getAttribute("data-type");l&&l.remove();let i="";i="input"==r?'
':'
'+n+"
",t.insertAdjacentHTML("beforeend",'
'+i+'
"),select_actions(e,t)}function select_actions(e,t){const l=t.querySelector(".select__item"),o=t.querySelector(".select__title"),n=t.querySelector(".select__options"),r=t.querySelectorAll(".select__option"),i=e.getAttribute("data-type"),s=t.querySelector(".select__input");function c(){let l=t.querySelectorAll(".select__option"),o=e.querySelectorAll("option"),n=[];for(let e=0;e"+n+""}function a(e){if(!e){let e=document.querySelectorAll(".select");for(let t=0;t"+u+"",e.value=n,o.style.display="none"),e.hasAttribute("multiple")&&(l="multiple"),a(l)}))}}function select_get_options(e){if(e){let t="";for(let l=0;l'+o.innerHTML+""}}return t}}function select_search(e){e.target.closest(".select ").querySelector(".select__options");let t=e.target.closest(".select ").querySelectorAll(".select__option"),l=e.target.value.toUpperCase();for(let e=0;e-1?o.style.display="":o.style.display="none"}}function selects_update_all(){let e=document.querySelectorAll("select");if(e)for(let t=0;t0&&selects_init();let inputs=document.querySelectorAll("input[data-value],textarea[data-value]");function inputs_init(e){if(e.length>0)for(let t=0;t{const o=t.toLocaleDateString();e.value=o},onSelect:function(e,t,l){input_focus_add(e.el)}}),t=l.getAttribute("data-from"),o=l.getAttribute("data-to");t&&e.setMin(new Date(t)),o&&e.setMax(new Date(o))}}}function input_placeholder_add(e){const t=e.getAttribute("data-value");""==e.value&&""!=t&&(e.value=t)}function input_focus_add(e){e.classList.add("_focus"),e.parentElement.classList.add("_focus")}function input_focus_remove(e){e.classList.remove("_focus"),e.parentElement.classList.remove("_focus")}function input_clear_mask(e,t){e.inputmask.remove(),e.value=t,input_focus_remove(e)}inputs_init(inputs);let quantityButtons=document.querySelectorAll(".quantity__button");if(quantityButtons.length>0)for(let G=0;G10?t.classList.add("_scroll"):t.classList.remove("_scroll")),scr_blocks.length>0)for(let e=0;el-window.innerHeight/1.5&&pageYOffsetl-window.innerHeight/2&&pageYOffset0)for(let t=0;tn&&(r=window.innerHeight-n/3),e>o-r&&eo-window.innerHeight&&l.querySelectorAll("._lazy").length>0&&scroll_lazy(l)}scr_fix_block.length>0&&fix_block(scr_fix_block,e);let l=document.querySelector("._custom-scroll__line");if(l){let e=window.innerHeight,t=document.querySelector(".wrapper").offsetHeight,o=pageYOffset/(t-e)*100,n=l.offsetHeight;l.style.transform="translateY("+(e-n)/100*o+"px)"}scrollDirection=e<=0?0:e}function scroll_lazy(e){}function scroll_load_item(e){if(e.classList.contains("_load-map")&&!e.classList.contains("_loaded-map")){document.getElementById("map")&&(e.classList.add("_loaded-map"),map())}}function scrParallax(e,t,l){let o=e.querySelectorAll("._prlx-item");if(o.length>0)for(let e=0;e0&&!isMobile.any()){disableScroll(),window.addEventListener("wheel",full_scroll);let Z=document.querySelectorAll("._swiper_scroll");if(Z.length>0)for(let ee=0;ee=t&&(o+=l-t),o}function full_scroll(e){let t=window.innerHeight;if(t>=scr_min_height)if(scrolling_full){let l=document.querySelector("._scr-sector._scr-sector_current"),o=offset(l).top,n=l.offsetHeight,r=l.nextElementSibling,i=l.previousElementSibling;if(40==e.keyCode||34==e.keyCode||e.deltaX>0||e.deltaY<0)n<=t?i&&full_scroll_to_sector(getPrevBlockPos(i)):(enableScroll(),currentScroll<=o&&i&&full_scroll_to_sector(getPrevBlockPos(i)));else if(38==e.keyCode||33==e.keyCode||e.deltaX<0||e.deltaY>0)if(n<=t){if(r){full_scroll_to_sector(offset(r).top)}}else if(enableScroll(),r){let e=offset(r).top;currentScroll>=e-t&&full_scroll_to_sector(e)}}else disableScroll();else enableScroll()}function full_scroll_to_sector(e){disableScroll(),scrolling_full=!1,_goto(e,800);let t=500;-1!=navigator.appVersion.indexOf("Mac")&&(t=1e3),setTimeout((function(){scrolling_full=!0}),t)}function full_scroll_pagestart(){}function full_scroll_pageend(){}let link=document.querySelectorAll("._goto-block");if(link){let le=[];for(let oe=0;oee-window.innerHeight/3&&pageYOffsetc&&(a.offsetHeightoffset(s).top-(n+15)?a.style.cssText="position:fixed;bottom:auto;top:"+n+"px;width:"+s.offsetWidth+"px;left:"+offset(s).left+"px;":r(a),t>s.offsetHeight+offset(s).top-(a.offsetHeight+(n+15))&&(s.style.cssText="position:relative;",a.style.cssText="position:absolute;bottom:0;top:auto;left:0px;width:100%")):r(a))}function r(e){e.style.cssText="position:relative;bottom:auto;top:0px;left:0px;"}}function custom_scroll(e){scr_body.style.overflow="hidden";let t=window.innerHeight,l=document.querySelector("._custom-scroll__line"),o=document.querySelector(".wrapper").offsetHeight,n=Math.min(t,Math.round(t*(t/o)));if(o>t){if(!l){let e=document.createElement("div");l=document.createElement("div"),e.setAttribute("class","_custom-scroll"),l.setAttribute("class","_custom-scroll__line"),e.appendChild(l),scr_body.appendChild(e)}l.style.height=n+"px"}}isMobile.any();let new_pos=pageYOffset;function scroll_animate(e){let t=window.innerHeight,l=document.querySelector(".wrapper").offsetHeight;pageYOffset;if(40==e.keyCode||34==e.keyCode||e.deltaX>0||e.deltaY<0?new_pos-=100:(38==e.keyCode||33==e.keyCode||e.deltaX<0||e.deltaY>0)&&(new_pos+=100),new_pos>l-t&&(new_pos=l-t),new_pos<0&&(new_pos=0),scrolling){scrolling=!1,_goto(new_pos,1e3);let e=100;-1!=navigator.appVersion.indexOf("Mac")&&(e*=2),setTimeout((function(){scrolling=!0,_goto(new_pos,1e3)}),e)}}