"use strict";(self.webpackChunkgulp_template=self.webpackChunkgulp_template||[]).push([[1564,2820],{5577:function(e,t,n){var o=n(4144),i=n(3218),r=n(2840),s=n(8757),c=n(7083),a=n(2585);let l=!1,u=null;function d(){return l?Promise.resolve():u||(u=new Promise(((e,t)=>{const n=document.createElement("script");n.src="//cdn.diginetica.net/6884/client.js",n.async=!0,n.onload=()=>{l=!0,e()},n.onerror=()=>{u=null,t(new Error("Diginetica failed to load"))},document.body.appendChild(n)})),u)}function h(e,t,n,o,i,r,s){try{var c=e[r](s),a=c.value}catch(e){return void n(e)}c.done?t(a):Promise.resolve(a).then(o,i)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function s(e){h(r,o,i,s,c,"next",e)}function c(e){h(r,o,i,s,c,"throw",e)}s(void 0)}))}}var m=n(9743);function p(e){const t=e.closest(".js-dropdown"),n=t.querySelector(".dropdown-popup"),o=t.getBoundingClientRect().bottom+250+10,i=document.documentElement.clientHeight;t.classList.toggle("opened"),i-o<0&&t.classList.toggle("opened--top"),n.setAttribute("aria-hidden",!t.classList.contains("opened"))}function g(e){const t=e.target.closest(".js-dropdown-search");if(t){const n=t.querySelectorAll(".js-option"),o=t.querySelector(".js-option-empty");n.length&&(e.target.value.trim().length?(n.forEach((t=>{t.dataset.value.toLowerCase().includes(e.target.value.toLowerCase())?t.style.display="block":t.style.display="none"})),o&&(Array.from(n).every((e=>"none"===e.style.display))?o.classList.add("show"):o.classList.remove("show"))):(n.forEach((e=>{e.style.display="block"})),o&&o.classList.remove("show")))}}var v=n(600);function w(e){e.target.closest(".js-geoposition-popup")&&e.target.closest(".js-geoposition-popup-button")||(document.querySelectorAll(".js-geoposition-popup").forEach((e=>{e.setAttribute("aria-hidden",!0)})),(0,v.A)({ACTION:"setNotFirstLocation"}),window.removeEventListener("click",w))}var y=n(4636),b=n(2820),E=n(2785),S=n(4278);!function(){const e=document.querySelectorAll(".js-tabs-link");for(let t=0;t{const e=document.querySelectorAll(".js-product"),t=document.querySelectorAll(".js-input-base:not(.js-file-input)"),n=document.querySelector(".js-search-form"),u=document.querySelector(".js-search-form-input"),h=document.querySelector(".js-search-form-button"),L=document.querySelectorAll("img[src]"),A=S.A.checkIsMobile();window.isMobile=A;const j=document.querySelectorAll('[data-user-agent="mobile"]'),q=document.querySelectorAll('[data-user-agent="desktop"]');if(L.length&&L.forEach((e=>{e.addEventListener("load",(function(){this.classList.add("loaded")}))})),"undefined"!=typeof ym){const k=document.referrer,T=window.location.pathname;(k.includes("/login/")&&T.includes("/profile/")||k.includes("/auth/")&&T.includes("/profile/"))&&ym(25098083,"reachGoal","avtoriz")}if(n&&u&&h&&(n.addEventListener("submit",(function(){u.value.trim()||this.preventDefault()})),u.addEventListener("input",(function(){this.value.trim()?h.removeAttribute("disabled"):h.setAttribute("disabled",!0)}))),window.matchMedia("(min-width: 996px)").matches){function x(){const e=document.querySelector(".js-navigation");e&&document.querySelector("#panel")&&0!==document.querySelector("#panel").clientHeight&&(e.querySelector(".navigation__container").style.marginTop="-15px");let t=window.scrollY;const n=()=>{e&&e.classList.toggle("navigation__fixed--white")},o=()=>{t>0&&!e.classList.contains("navigation__fixed--white")&&n(),0===t&&e.classList.contains("navigation__fixed--white")&&n()};o(),document.addEventListener("scroll",(()=>{t=window.scrollY,o()}))}function P(){const e=document.querySelectorAll(".js-navigation-dropdown-item");e.length&&e.forEach((e=>{const t=e.querySelector(".js-navigation-dropdown");let n=null;function o(){n=setTimeout((()=>{t.classList.remove("active")}),100)}e.addEventListener("mouseenter",(function(){t&&(clearTimeout(n),this.removeEventListener("mouseleave",o),t.classList.add("active"),this.addEventListener("mouseleave",o))}))}))}P(),x()}else!function(){const e=document.querySelector(".js-static-scroll-menu");if(e){const t=e.querySelector(".sub-menu-item--active");t&&e.scroll({behavior:"smooth",left:t.offsetLeft})}}();new o({threshold:.1}),A&&q.forEach((e=>{e.remove()})),A||j.forEach((e=>{e.remove()})),function(){const e=document.querySelector(".js-button-up");let t=0;window.matchMedia("(min-width: 996px)").matches&&(document.addEventListener("scroll",(()=>{t=window.scrollY,t>0&&e&&!e.classList.contains("active")&&e.classList.add("active"),0===t&&e&&e.classList.contains("active")&&e.classList.remove("active")})),e&&e.addEventListener("click",(function(){window.scrollTo({top:0,behavior:"smooth"})})))}(),function(){const e=document.querySelector(".js-burger-menu"),t=document.querySelector(".js-open-burger-menu"),n=document.querySelector(".js-close-burger-menu");function o(t=!1){e.classList.toggle("open"),e.setAttribute("aria-hidden",!t),t?(0,i.$)():((0,i.W)(),window.matchMedia("(min-width: 996px)").matches&&(document.querySelector(".js-burger-menu-background").removeEventListener("click",s),window.removeEventListener("keyup",r)))}function r(e){"Escape"===e.key&&o(!1)}function s(){o(!1)}e&&t&&(t.addEventListener("click",(function(){o(!e.classList.contains("open")),window.matchMedia("(min-width: 996px)").matches&&(document.querySelector(".js-burger-menu-background").addEventListener("click",s),window.addEventListener("keyup",r))})),n.addEventListener("click",(function(){o(!1)})))}(),function(){const e=document.querySelectorAll(".js-dropdown"),t=document.querySelectorAll(".js-custom-scrollbar");e.length&&(window.addEventListener("click",(t=>{if(!t.target.closest(".js-dropdown")){const t=Array.from(e).find((e=>e.classList.contains("opened")));t&&p(t.querySelector(".js-dropdown-element"))}})),e.forEach(((t,n)=>{const o=t.querySelector(".js-dropdown-element"),i=t.querySelector(".js-option-empty");if(t.classList.contains("js-dropdown-search")){const e=t.querySelector(".js-location-input"),n=o.querySelector(".js-clear-button"),r=t.querySelectorAll(".js-option");e&&e.addEventListener("input",g),r.length&&r.forEach((t=>{t.addEventListener("click",(function(){const t=Array.from(r).find((e=>e.hasAttribute("data-selected")));t&&t.removeAttribute("data-selected"),o.classList.contains("error")&&o.classList.remove("error"),n&&n.classList.add("show"),e.value=this.dataset.value,this.setAttribute("data-selected",!0)}))})),n&&n.addEventListener("click",(function(){const e=Array.from(r).find((e=>e.hasAttribute("data-selected")));r.forEach((e=>{e.style.display="block"})),i&&i.classList.remove("show"),e&&e.removeAttribute("data-selected")}))}o.addEventListener("click",(function(){!function(e,t){t.forEach(((t,n)=>{if(e!==n){const e=t.querySelector(".dropdown-popup");t.classList.remove("opened"),t.classList.remove("opened--top"),e.setAttribute("aria-hidden",!0)}}))}(n,e),p(this)}))}))),t.forEach((e=>{new m.A(e,{autoHide:!1})}))}(),document.querySelectorAll(".js-geoposition-popup").forEach((e=>{const t=e?e.querySelectorAll(".js-geoposition-popup-close"):null;e&&t&&(e.getAttribute("aria-hidden")||window.addEventListener("click",w),t.forEach((t=>{t.addEventListener("click",(t=>{t.stopPropagation(),e.setAttribute("aria-hidden",!0),(0,v.A)({ACTION:"setNotFirstLocation"}),window.removeEventListener("click",w)}))})))})),(0,s.A)(),function(){const e=document.querySelector(".js-dialog-search"),t=document.querySelector("body.kz"),n=document.querySelectorAll(".js-dialog-search-button"),o=document.querySelectorAll(".js-dialog-search-button-spinner"),i=document.querySelectorAll(".js-dialog-search-button-icon");e&&t?n.length&&n.forEach((t=>{t.addEventListener("click",(function(){e&&(0,a.default)(new c.default(e))}))})):(n.forEach((e=>{e.addEventListener("click",f((function*(){l||(o.forEach((e=>e.classList.remove("hidden"))),i.forEach((e=>e.classList.add("hidden"))),yield d(),o.forEach((e=>e.classList.add("hidden"))),i.forEach((e=>e.classList.remove("hidden"))),"complete"!==document.readyState?window.addEventListener("load",(()=>{e.querySelector(".js-dialog-search-button-icon").dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))}),{once:!0}):e.querySelector(".js-dialog-search-button-icon").dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))})),{once:!0})})),window.addEventListener("load",(()=>{setTimeout(d)}),{once:!0}))}(),(0,b.default)(t),function(){const e=document.querySelectorAll(".js-reset-button");e.length&&e.forEach((e=>{e.addEventListener("click",(function(){const e=this.closest(".js-form-container");e&&e.querySelectorAll(".js-input-base[data-default-value]").forEach((e=>{e.value=e.dataset.defaultValue,e.dispatchEvent(new Event("input")),e.classList.contains("js-file-input")&&(0,E.t)()}))}))}))}(),function(){const e=document.querySelector("#wizart-homepage");if(e){const t=JSON.parse(e.dataset.params);if("Y"==t.switch_on_homepage){const e=new window.WFloatingButton({token:t.token,element:document.body});"Y"==t.tooltip_disable?t.tooltip_disable="true":t.tooltip_disable="false","Y"==t.glitter_disable?t.glitter_disable="true":t.glitter_disable="false","Y"==t.compact?t.compact="true":t.compact="false","Y"==t.tutorial?t.tutorial="true":t.tutorial="false",e.render({title:t.title,tooltipDisable:t.tooltip_disable,tooltipTitle:t.tooltip_title,tooltipPosition:t.tooltip_position,glitterDisable:t.glitter_disable,className:t.custom_class,borderRadius:t.border,border:t.border_css,background:t.background_color,color:t.color,width:t.width,height:t.height,fontSize:t.fontSize,image:t.image_homepage,compact:t.compact,tutorial:t.tutorial,tutorialDelay:t.tutorial_delay,onloadCallback:t.onload_callback,onCloseCallback:t.on_close_callback,iframeElementSelector:t.element_iframe_homepage,insertIframeElementPosition:t.insert_element_iframe_homepage});const n=document.querySelector(".w-floating-button.wizart-homepage"),o=document.querySelectorAll(".js-wizart-button");o.length&&n&&o.forEach((e=>{e.addEventListener("click",(()=>{n.click()}))}))}}}(),(0,y.F)(e),function(){const e=document.querySelector("body:not(.kz) .js-cookie-banner"),t=document.querySelector('html[lang="ru"] body:not(.en) .js-cookie-banner-gift-picker');if(e){const t=e.querySelectorAll(".js-cookie-banner-close");(0,r.Ri)("showCookieBanner")||(window.innerWidth>=768&&e.setAttribute("aria-hidden",!1),t.length&&t.forEach((t=>{t.addEventListener("click",(()=>{(0,r.TV)("showCookieBanner","y",{"max-age":2592e3}),e.setAttribute("aria-hidden",!0)}))})))}if(t){const e=t.querySelectorAll(".js-cookie-banner-gift-picker-close"),n=(0,r.Ri)("showCookieBannerGiftPicker");if((0,r.Ri)("timeFirstVisit")||(0,r.TV)("timeFirstVisit",new Date,{"max-age":2592e3}),e.length&&e.forEach((e=>{e.addEventListener("click",(()=>{(0,r.TV)("showCookieBannerGiftPicker","y",{"max-age":2592e3}),t.setAttribute("aria-hidden",!0)}))})),!n){let e=6e4-(new Date-new Date((0,r.Ri)("timeFirstVisit")));window.innerWidth>=768&&setTimeout((()=>{t.setAttribute("aria-hidden",!1)}),e)}}}(),document.addEventListener("click",(e=>{const t=e.target.closest("[data-gtag]");t&&t.hasAttribute("data-gtag")&&void 0!==typeof gtag&>ag("event",t.getAttribute("data-gtag"))}))}))},3218:function(e,t,n){function o(){const e=document.body,t=window.innerWidth-e.clientWidth;if(e.style.transition="margin-right 0.3s easy-in-out",e.style.marginRight=`${t}px`,e.style.overflow="hidden",!window.matchMedia("(min-width: 996px)").matches){const t=window.pageYOffset;e.style.top=-t+"px",e.style.position="fixed",e.style.width="100%"}}function i(){const e=document.body;if(e.style.transition="margin-right 0s easy-in-out",e.style.marginRight="0",e.style.overflow="unset",!window.matchMedia("(min-width: 996px)").matches){const t=Math.abs(parseInt(e.style.top||0,10));e.style.position="static",e.style.width="auto",e.style.removeProperty("top"),window.scrollTo(0,t||0)}}n.d(t,{$:function(){return o},W:function(){return i}})},8757:function(e,t,n){n.d(t,{A:function(){return u}});var o=n(7083),i=n(9743),r=n(2585),s=n(600);function c(e,t,n,o,i,r,s){try{var c=e[r](s),a=c.value}catch(e){return void n(e)}c.done?t(a):Promise.resolve(a).then(o,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function s(e){c(r,o,i,s,a,"next",e)}function a(e){c(r,o,i,s,a,"throw",e)}s(void 0)}))}}const l=e=>{const t=e||document;[].forEach.call(t.querySelectorAll(".dialog-cities__change > li"),(e=>e.addEventListener("click",(e=>{let t=new FormData;t.set("COUNTRY_ID",e.target.dataset.countryid),t.set("DISTRICT_ID",e.target.dataset.districtid),t.set("REGION_ID",e.target.dataset.regionid),t.set("CITY_ID",e.target.dataset.cityid),fetch("/local/templates/stenova/ajax/changeLocation.php",{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},body:t}).then((e=>e.json())).then((()=>{location.reload()}))}),!1)))};function u(){return d.apply(this,arguments)}function d(){return d=a((function*(){const e=document.querySelector(".js-dialog-cities"),t=null==e?void 0:e.querySelector(".js-custom-scrollbar"),n=document.querySelectorAll(".js-dialog-cities-button:not(.init)"),c=null==e?void 0:e.querySelector(".js-cities-search"),u=null==e?void 0:e.querySelector(".js-cities-list");function d(e,t,n){return h.apply(this,arguments)}function h(){return h=a((function*(e,t,n){if(!e||!t)return null;try{return yield(0,s.A)({ACTION:"getCitiesList",NUM_PAGE:e,COUNT_CITIES:t,CITY_PHRASE:n})}catch(e){return console.error("Error fetching data:",e),null}})),h.apply(this,arguments)}function f(e,t,n){return m.apply(this,arguments)}function m(){return m=a((function*(e,t,n){const o=yield d(t,20,n);if(!o)return;e.innerHTML+=o,l(e);const i=e.querySelectorAll(".js-city-name"),r=i[i.length-2];w.observe(r)})),m.apply(this,arguments)}function p(){return p=a((function*(e,t){const n=yield d(1,25,t);n?(e.innerHTML=n,l(e)):e.innerHTML='
  • По вашему запросу ничего не найдено
  • '})),p.apply(this,arguments)}function g(){return g=a((function*(e,t){e.forEach(function(){var e=a((function*(e){if(e.isIntersecting){const n=e.target;t.unobserve(n),v++,f(u,v,"")}}));return function(t){return e.apply(this,arguments)}}())})),g.apply(this,arguments)}let v=1;const w=new IntersectionObserver((function(e,t){return g.apply(this,arguments)}),{root:null,rootMargin:"0px",threshold:1});n.forEach((t=>{t.classList.add("init"),t.addEventListener("click",a((function*(){e&&(0,r.default)(new o.default(e)),yield f(u,1,"")})))})),window.matchMedia("(min-width: 996px)").matches&&t&&new i.A(t,{autoHide:!1});c&&c.addEventListener("input",((e,t)=>{let n;return function(){const o=this,i=arguments;clearTimeout(n),n=setTimeout((()=>{e.apply(o,i)}),t)}})(a((function*(){this.value.trim()?yield function(e,t){return p.apply(this,arguments)}(u,this.value.trim().toLowerCase()):yield f(u,1,"")})),300))})),d.apply(this,arguments)}},2585:function(e,t,n){n.r(t),n.d(t,{default:function(){return i}});var o=n(3218);function i(e,t=null,n=[]){const i=document.querySelector(".js-navigation");e&&(i.classList.contains("navigation__fixed--white")||i.classList.add("navigation__fixed--white"),e.on("show",(()=>{(0,o.$)(),t&&t(...n)})),e.on("hide",(()=>{(0,o.W)(),e.destroy()})),e.show())}},4636:function(e,t,n){n.d(t,{F:function(){return w}});var o=n(600);function i(e,t,n,o,i,r,s){try{var c=e[r](s),a=c.value}catch(e){return void n(e)}c.done?t(a):Promise.resolve(a).then(o,i)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var s=e.apply(t,n);function c(e){i(s,o,r,c,a,"next",e)}function a(e){i(s,o,r,c,a,"throw",e)}c(void 0)}))}}const s="active",c=document.querySelectorAll(".js-favorites-button-count"),a=document.querySelectorAll(".js-compare-button-count"),l=document.querySelectorAll(".js-basket-button-count");function u(e,t){return d.apply(this,arguments)}function d(){return d=r((function*(e,t,n=!1){var i;if((null===(i=window.APP)||void 0===i?void 0:i.FAVORITES)&&window.APP.FAVORITES.includes(Number(t))&&e.classList.add(s),!n)try{const n=yield(0,o.A)({ACTION:"add2favorites",ITEM_ID:t});if("OK"===n.STATUS){if(v(e,c,n.EVENT),g(c),"REMOVE"===n.EVENT){const e=window.APP.FAVORITES.indexOf(+t);-1!==e&&window.APP.FAVORITES.splice(e,1)}else window.APP.FAVORITES.push(+t);"REMOVE"===n.EVENT&&"/favorites/"===window.location.pathname&&(e.closest(".js-product-card").remove(),0===document.querySelectorAll(".js-product-card").length&&(document.querySelector(".js-wrap-favorites").innerHTML="",document.querySelector(".js-empty-info").classList.remove("hidden")))}}catch(e){console.log(e)}})),d.apply(this,arguments)}function h(e,t){return f.apply(this,arguments)}function f(){return f=r((function*(e,t,n=!1,i=1){var r;if((null===(r=window.APP)||void 0===r?void 0:r.BASKET)&&Object.keys(window.APP.BASKET).includes(String(t))&&(e.innerText=e.dataset.incart,e.classList.add("js-added-to-cart")),!n&&e.classList.contains("js-added-to-cart"))window.location.href="/cart/";else if(!n)try{"OK"===(yield(0,o.A)({ACTION:"add2basket",ITEM_ID:t,QUANTITY:i})).STATUS&&(l.forEach((e=>{const t=e.innerText;Number(t)>98?e.innerText="99":e.innerText=Number(t)+1})),e.innerText=e.dataset.incart,e.classList.add("js-added-to-cart"),window.APP.BASKET[t]={PRODUCT_ID:Number(t),QUANTITY:i},e.classList.contains("js-reload-page")&&location.reload())}catch(e){console.log(e)}})),f.apply(this,arguments)}function m(e,t){return p.apply(this,arguments)}function p(){return p=r((function*(e,t,n=!1){var i;if((null===(i=window.APP)||void 0===i?void 0:i.COMPARE)&&window.APP.COMPARE.includes(Number(t))&&e.classList.add(s),!n)try{const n=yield(0,o.A)({ACTION:"add2compare",ITEM_ID:t});if("OK"===n.STATUS)if(v(e,a,n.EVENT),g(a),"REMOVE"===n.EVENT){const e=window.APP.COMPARE.indexOf(+t);-1!==e&&window.APP.COMPARE.splice(e,1)}else window.APP.COMPARE.push(+t)}catch(e){console.log(e)}})),p.apply(this,arguments)}function g(e){e.forEach((e=>{const t=e.innerText.includes("+")?e.innerText.split("+")[0]:e.innerText;Number(t)<=0?e.classList.add("hidden"):e.classList.remove("hidden")}))}function v(e,t,n){e.classList.toggle(s),"REMOVE"===n?t.forEach((e=>{const t=e.innerText.includes("+")?e.innerText.split("+")[0]:e.innerText;e.innerText=Number(t)-1})):t.forEach((e=>{const t=e.innerText.includes("+")?e.innerText.split("+")[0]:e.innerText;e.innerText=Number(t)+1}))}function w(e){e.length&&window.APP&&(e.forEach((e=>{const t=e.querySelectorAll(".js-add-to-cart"),n=e.querySelectorAll(".js-add-to-cart-obrazec"),i=e.querySelectorAll(".js-add-to-cart-catalog"),s=e.querySelectorAll(".js-add-to-favorite"),c=e.querySelectorAll(".js-add-to-compare"),a=e.querySelectorAll(".js-one-click-buy"),l=Number(e.dataset.id);t.length&&t.forEach((e=>{h(e,l,!0),e.addEventListener("click",(function(){const t=this.closest(".js-actions-container"),n=null==t?void 0:t.querySelector(".js-count-picker-input"),o=n?Number(n.value):1;h(this,e.dataset.id||l,!1,o)}))})),s.length&&s.forEach((e=>{u(e,l,!0),e.addEventListener("click",(function(t){t.stopPropagation(),u(this,e.dataset.id||l)}))})),c.length&&c.forEach((e=>{m(e,l,!0),e.addEventListener("click",(function(t){t.stopPropagation(),m(this,e.dataset.id||l)}))})),n.length&&n.forEach((e=>{const t=e.dataset.id;if(h(e,t,!0),window.APP.BASKET&&window.APP.BASKET[t]){const n=e.closest(".js-actions-container"),o=null==n?void 0:n.querySelector(".js-obrazec-checkbox");o&&(o.checked=!!window.APP.BASKET[t].NO_CUT)}e.addEventListener("click",r((function*(){const n=this.closest(".js-actions-container"),i=window.matchMedia("(min-width: 996px)").matches?e.previousElementSibling.querySelector(".js-count-picker-input"):n.querySelector(".js-count-picker-input"),r=Number(i.value);yield h(this,t,!1,r);try{yield(0,o.A)({ACTION:"setDntCut",ITEM_ID:t})}catch(e){console.log(e)}})))})),i.length&&i.forEach((e=>{const t=e.dataset.id;h(e,t,!0),e.addEventListener("click",r((function*(){h(this,t)})))})),a.length&&a.forEach((e=>{e.addEventListener("click",r((function*(){const t=document.querySelector(".js-count-picker-input"),n=t?Number(t.value):1,o=e.dataset.id||l;yield h(this,o,!1,n),window.location.replace("/order/")})))}))})),g(a),g(c))}},2820:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}});var o=n(8514);function i(e,t){t&&(0===String(e.value).length||t.classList.contains("show")||t.classList.add("show"),0===String(e.value).length&&t.classList.contains("show")&&t.classList.remove("show"))}function r(e,t){const n=t.querySelectorAll(".input-base__show-icon");n.length&&n.forEach((e=>{e.classList.toggle("input-base__show-icon--hidden")})),e.type="password"===e.type?"text":"password"}function s(e){e.length&&e.forEach((e=>{const t=e.closest(".input-base"),n=t.querySelector(".js-clear-button"),s=t.querySelector(".js-show-button");"tel"===e.type&&function(){const e=document.querySelectorAll('input[type="tel"]');e.length&&e.forEach((e=>{new o.default(e,{mask:"+7(000)000-00-00",prepare:function(e,{value:t}){return"8"===e&&""===t?"":e}})}))}(),t&&(0!==String(e.value).length&&n&&!n.classList.contains("show")?n.classList.add("show"):n&&n.classList.remove("show"),e.addEventListener("focus",(function(){[n,s].forEach((e=>{i(this,e)}))})),e.addEventListener("input",(function(){"number"===e.type&&(this.value=this.value.replace(/\D/g,"")),t&&t.classList.contains("error")&&t.classList.remove("error"),t&&t.classList.contains("success")&&t.classList.remove("success"),[n,s].forEach((e=>{i(this,e)})),s&&0===String(this.value).length&&"text"===this.type&&r(this,s)})),e.addEventListener("input",(function(){t&&t.classList.contains("error")&&t.classList.remove("error"),t&&t.classList.contains("success")&&t.classList.remove("success")})),n&&n.addEventListener("click",(function(t){t.stopPropagation(),0!==String(e.value).length&&(e.value="",e.dispatchEvent(new Event("input")),this.classList.remove("show"))})),s&&s.addEventListener("click",(function(t){t.stopPropagation(),r(e,this)})))}))}},2785:function(e,t,n){function o(e,t){const n=Math.abs(e)%100,o=e%10;return n>10&&n<20?t[2]:o>1&&o<5?t[1]:1==o?t[0]:t[2]}n.d(t,{t:function(){return l},k:function(){return u}});var i=n(3016);let r=[];function s(e){const t=new DataTransfer;for(const n of e)t.items.add(n);return t.files}function c(e,t,n){const o=function(e){const t=document.createElement("template"),n=`\n
    \n \n \n \n \n
    \n \n \n
    \n
    \n `;for(let o=0;o{const r=o.querySelector(".js-file-name"),s=o.querySelector(".js-delete-file");r.innerText=function(e){return e.length>13?`${e.substring(0,6)}...${e.substring(e.length-6)}`:e}(t.files[i].name),s.addEventListener("click",(function(){a.call(this,e,t,n)}))})),e.append(...o))}function a(e,t,n){const i=e.closest(".js-file-input-container"),c=e.querySelectorAll(".js-file"),a=this.closest(".js-file");if(c.length&&a){const l=Array.from(c).findIndex((e=>a===e));-1!==l&&(r.splice(l,1),t.files=s(r),e.removeChild(a),i.classList.contains("error")&&i.classList.remove("error"),r.length?n.innerText=`${r.length} ${o(r.length,["файл","файла","файлов"])} ${o(r.length,["выбран","выбраны","выбраны"])}`:n.innerText=n.dataset.placeholder)}}function l(){const e=document.querySelectorAll(".js-file-input-container");r=[],e.length&&e.forEach((e=>{const t=e.querySelector(".js-file-input-info"),n=e.querySelector(".js-files-container");t.innerText=t.dataset.placeholder,n.innerHTML=""}))}function u(){const e=document.querySelectorAll(".js-file-input-container"),t=document.querySelector(".js-language-radio:checked")?document.querySelector(".js-language-radio:checked").value:"RU";e.length&&e.forEach((e=>{const n=e.querySelector(".js-files-container"),a=e.querySelector(".js-file-input"),l=e.querySelector(".js-file-input-info");a&&l&&a.addEventListener("change",(u=>{const d=r.length;u.target.files.length&&(u.target.hasAttribute("multiple")||(r=[],n.firstChild&&n.removeChild(n.firstChild)),r.push(...u.target.files));const h=function(e,t){const n={files:t||[],maxWeight:10},o={maxWeight:(0,i.tJ)(n),maxCount:(0,i.X5)(n)},r=document.querySelector(".js-language-radio:checked")?document.querySelector(".js-language-radio:checked").value:"RU";return o.maxWeight?!!o.maxCount||((0,i.Nh)(e,"filesMaxCount",".input-file-base",r),o.maxCount):((0,i.Nh)(e,"fileMaxWeight",".input-file-base",r),o.maxWeight)}(u.target,r);if(h?e.classList.contains("error")&&e.classList.remove("error"):(r=r.slice(0,d),u.target.value=""),r.length){const e="RU"===t?["файл","файла","файлов"]:["file","files","files"],n="RU"===t?["выбран","выбраны","выбраны"]:["selected","selected","selected"];l.innerText=`${r.length} ${o(r.length,e)} ${o(r.length,n)}`}else l.innerText=l.dataset.placeholder;c(n,a,l),u.target.files=s(r)}))}))}},600:function(e,t,n){function o(e,t,n,o,i,r,s){try{var c=e[r](s),a=c.value}catch(e){return void n(e)}c.done?t(a):Promise.resolve(a).then(o,i)}function i(e){return r.apply(this,arguments)}function r(){return e=function*(e){const t=new FormData;for(let n in e)t.append(n,e[n]);t.append("IS_AJAX_ACTION","Y");try{const e=yield fetch("/",{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},body:t});return yield e.json()}catch(e){return console.log("error",e),!1}},r=function(){var t=this,n=arguments;return new Promise((function(i,r){var s=e.apply(t,n);function c(e){o(s,i,r,c,a,"next",e)}function a(e){o(s,i,r,c,a,"throw",e)}c(void 0)}))},r.apply(this,arguments);var e}n.d(t,{A:function(){return i}})},3016:function(e,t,n){n.d(t,{LF:function(){return r},M2:function(){return a},MG:function(){return p},Nh:function(){return d},X5:function(){return u},bB:function(){return s},lZ:function(){return i},tJ:function(){return l}});const o=e=>!isNaN(Number(e.trim())),i=e=>11===String(e).replace(/[^\d]/g,"").substring(0,11).length,r=e=>new RegExp(/^(\+?\d)\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{2})[- ]?(\d{2})$/).test(e),s=e=>o(e)&&12===String(e.trim()).length,c=e=>new RegExp(/^[^@]+@[\w\-]+(\.\w+)+\w$/).test(e)||0===e.trim().length,a=e=>o(e)&&6===String(e).length,l=e=>{let t=!0;for(let n=0;n10){t=!1;break}return t},u=e=>e.files.length<=10,d=(e,t,n=".input-base",o="RU")=>{const i=e.closest(n);if(i){const e=i.querySelector(`${n}__error`);i.classList.add(m),e&&(e.innerText=f[t].text[o])}},h=e=>{const t=e.closest(".input-base-captcha")||e.closest(".input-base")||e.closest(".input-file-base")||e.closest(".js-select-wrapper"),n=document.querySelector(".js-navigation");if(t&&n){const e=t.getBoundingClientRect();document.querySelector('.dialog:not([aria-hidden="true"])')?document.querySelector('.dialog:not([aria-hidden="true"]) .dialog-wrapper').scrollTo({top:t.offsetTop-30,behavior:"smooth"}):window.scrollTo({top:e.top+window.pageYOffset-n.clientHeight-60,behavior:"smooth"})}},f={required:{text:{RU:"Поле должно быть заполнено",EN:"Field must be filled"},action:e=>0!==String(e).length},requiredFiles:{text:{RU:"Поле должно быть заполнено",EN:"Field must be filled"},action:e=>e.files&&e.files.length},phone:{text:{RU:"Номер телефона должен состоять из 11 цифр",EN:"Phone number must be 11 digits"},action:i},inn:{text:{RU:"ИНН должен состоять из 10 или 12 цифр",EN:"TIN must be 10 or 12 digits"},action:e=>o(e)&&(10===String(e.trim()).length||12===String(e.trim()).length)},innIP:{text:{RU:"ИНН должен состоять из 12 цифр",EN:"TIN must be 12 digits"},action:s},kpp:{text:{RU:"КПП должен состоять из 9 цифр",EN:"PPC must consist of 9 digits"},action:e=>o(e)&&9===String(e.trim()).length||0===String(e.trim()).length},email:{text:{RU:"Формат почты: name@domain.ru",EN:"Mail format: name@domain.ru"},action:c},onlyNumbers:{text:{RU:"Поле должно содержать только цифры",EN:"The field must contain only numbers"},action:o},cardNumber:{text:{RU:"Номер карты должен состоять из 15 цифр",EN:"Card number must be 15 digits"},action:e=>{const t=e.replace(/\s/g,"");return 15===t.length&&o(t)||0===t.length}},cost:{text:{RU:"Поле должно состоять только из цифр",EN:"The field must contain only numbers"},action:e=>{const t=e.replace(/\s/g,"");return o(t)||0===t.length}},password:{text:{RU:"Пароль должен содержать не менее 8 символов",EN:"Password must contain at least 8 characters"},action:e=>e.length>7||0===e.length},confirmPassword:{text:{RU:"Пароли должны совпадать",EN:"Passwords must match"},action:({oldPassword:e,newPassword:t})=>e===t},korCheck:{text:{RU:"Корреспондентский счет должен состоять из 11 цифр",EN:"Correspondent account must be 11 digits"},action:e=>o(e)&&11===String(e.trim()).length||0===String(e.trim()).length},payCheck:{text:{RU:"Расчетный счет должен состоять из 14 цифр",EN:"Account must be 14 digits long"},action:e=>o(e)&&14===String(e.trim()).length||0===String(e.trim()).length},bik:{text:{RU:"БИК должен состоять из 12 цифр",EN:"BIC must be 12 digits"},action:e=>o(e)&&12===String(e.trim()).length||0===String(e.trim()).length},phoneOrEmail:{text:{RU:"Не корректно заполнен email или телефон",EN:"Incorrectly filled email or phone"},action:e=>r(e)||c(e)||0===String(e.trim()).length},confirmCode:{text:{RU:"Код должен состоять из 6 цифр",EN:"Code must be 6 digits"},action:a},fileMaxWeight:{text:{RU:"Вес одного файла должен быть не более 10 Мбайт",EN:"The weight of one file should be no more than 10 MB"},action:l},filesMaxCount:{text:{RU:"Можно загрузить не более 10 файлов",EN:"You can upload a maximum of 10 files"},action:u},doNotConfirmPhone:{text:{RU:"Номер должен быть подтвержден",EN:"Number must be confirmed"},action:e=>!1},nominalMin1000:{text:{RU:"Номинал карты не может быть менее 1000",EN:"The denomination of the card cannot be less than 1000"},action:e=>e>=1e3}},m="error";function p(e){let t=!0,n=null;if(e.length){const o=document.querySelectorAll(".js-language-radio");let i="RU";if(0!==o.length){const e=Array.from(o).find((e=>e.checked));i=e.value}e.forEach((e=>{const o=e.dataset.validations.split(",");for(let n of o){let o=".input-base",s=e.classList.contains("js-file-input")?{files:e.files,maxWeight:10}:e.value;if(e.classList.contains("js-file-input")&&(o=".input-file-base"),e.classList.contains(".js-select-option")&&(o=".select-wrapper"),"confirmPassword"===n){const t=e.closest(".js-form-container");if(t){var r;const n=(null===(r=t.querySelector(".js-input-password"))||void 0===r?void 0:r.value)||null;n&&(s={oldPassword:n,newPassword:e.value})}}if(!f[n].action(s)){t&&(t=!1),d(e,n,o,i);break}}t||n||(n=e)}))}return n&&h(n),t}},2840:function(e,t,n){function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;twindow.innerWidth<475)),e},resizeIsTablet(){const e=window.innerWidth<996;return window.addEventListener("resize",(()=>window.innerWidth<996&&window.innerWidth>475)),e},checkIsMobile(){return Boolean((this.Android()||this.BlackBerry()||this.iOS()||this.Opera()||this.Windows())&&window.innerWidth<995.98)}}}},function(e){e.O(0,[8096],(function(){return e(e.s=5577)})),e.O()}]);