"use strict";(self.webpackChunkgulp_template=self.webpackChunkgulp_template||[]).push([[1639,6531],{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}})},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())}},3325:function(e,t,n){n.d(t,{A:function(){return c}});var o=n(7083),i=n(2585),s=n(7234),a=n(1136);const l={modules:[s.Vx,s.s3],slidesPerView:1,breakpoints:{996:{allowTouchMove:!1,navigation:{nextEl:".slider-button-next",prevEl:".slider-button-prev"},keyboard:{enabled:!0,onlyInViewport:!1}}},on:{slideChange(e){if(e&&e.slides[e.activeIndex]){const t=e.slides[e.activeIndex].querySelector(".js-video");if(t){const e=t.closest(".video-block");t.pause(),(0,a.S)("pause",e)}}}}};function r(e,t){const n=new s.Ay(".js-gallery",l);let r=null;n.slideTo(Number(e)),r=new o.default(t),(0,i.default)(r),window.matchMedia("(min-width: 996px)").matches?n.on("click",function(e,t){t.stopPropagation(),t.target.classList.contains("swiper-slide")&&r.hide()}):n.on("touchEnd",function(e,t){t.stopPropagation(),t.target.classList.contains("swiper-slide")&&setTimeout(()=>{r.hide()},50)}),r.on("destroy",()=>{const e=n.$wrapperEl[0].querySelector(".js-video");if(e){const t=e.closest(".video-block");for(e.pause(),(0,a.S)("pause",t);n.$wrapperEl[0].children.length>1;)n.$wrapperEl[0].removeChild(n.$wrapperEl[0].lastElementChild)}else for(;n.$wrapperEl[0].firstChild;)n.$wrapperEl[0].removeChild(n.$wrapperEl[0].firstChild);n.destroy()})}function d(){const e=window.matchMedia("(min-width: 996px)").matches?"mobile":"desktop";return document.querySelectorAll(`.js-product-images-slider:not(.js-product-images-slider--${e})`)}function c(){const e=document.querySelector(".js-dialog-image");[...document.querySelectorAll(".js-image-dialog-button"),...document.querySelectorAll(".js-video-dialog-button")].forEach(t=>{t.addEventListener("click",function(t){var n,o,i;t.stopPropagation();const s=d(),a=e.querySelector(".js-gallery .dialog-media-slider__wrapper"),l=Array.from(s).map((e,t)=>(e.hasAttribute("data-slider-id")||e.setAttribute("data-slider-id",t),Array.from(e.querySelectorAll(".js-image-container:not(.swiper-slide-duplicate) .js-image-modal")))).flat(1),c=null===(o=this.closest(".js-product-images-slider"))||void 0===o||null===(n=o.dataset)||void 0===n?void 0:n.sliderId,u=this.classList.contains("js-image-container")?this:this.closest(".js-image-container"),m=function(e,t){if(e&&t){let n=0;if(0!==Number(t)){const e=d();let o=Number(t)-1;for(;o>=0;){const t=e[o],i=null==t?void 0:t.querySelectorAll(".js-image-container");i.length&&(n+=i.length),o--}}return Number(e)+n}return 0}((null===(i=u.dataset)||void 0===i?void 0:i.swiperSlideIndex)||u.dataset.slideIndex,c);l.forEach(e=>{const t=document.createElement("div"),n=document.createElement("img"),o=window.matchMedia("(min-width: 996px)").matches&&e.dataset.fullSrc?e.dataset.fullSrc:e.getAttribute("src")||e.dataset.src;t.classList.add("swiper-slide","dialog-media-slider__slide"),n.classList.add("dialog-media__img"),n.setAttribute("src",o),t.appendChild(n),a.appendChild(t)}),r(m,e)})})}(0,a.r)()},2048:function(e,t,n){n.d(t,{A:function(){return i}}),n.dn(i);var o=n(3218);function i(e,t=!0){const n=document.querySelector(".js-loader");n&&(t?n.classList.add("loader-fixed"):n.classList.remove("loader-fixed"),n.classList.toggle(e),n.classList.contains("loader-fixed")&&(n.classList.contains("show-global")?(0,o.$)():(0,o.W)()))}},6708:function(e,t,n){n.d(t,{A:function(){return i}});var o=n(2048);function i(e){const t=document.querySelector("#map .js-loader");t&&(0,o.A)("show",!1);let n=window.dataMap;function i(){let i=11;n.zoom>0&&(i=n.zoom);const s=new ymaps.Map("map",{center:[59.935315,30.268019],zoom:i,behaviors:["default","scrollZoom"],controls:["geolocationControl","fullscreenControl","zoomControl"]});if("detail"===e){ymaps.templateLayoutFactory.createClass('\n
\n \n
$[properties.iconContent]
\n
\n ');const e=e=>{let t=ymaps.templateLayoutFactory.createClass(`\n ${e.name?'
'+e.name+"
":""}\n ${e.address?'
'+e.address+"
":""}\n ${e.workingHours?'
'+e.workingHours+"
":""}\n ${e.phone?'
'+e.phone+"
":""}\n ${e.email?'
'+e.email+"
":""}\n `);return new ymaps.Placemark([e.coords[0],e.coords[1]],{hintContent:""},{iconLayout:"default#image",iconImageHref:"/local/templates/stenova/img/map-mark.png",iconImageSize:[44,44],iconImageOffset:[-22,-22],openEmptyBalloon:!0,hideIconOnBalloonOpen:!1,balloonContentLayout:t,balloonOffset:[0,-25]})};s.geoObjects.add(e(n)),setTimeout(()=>{s.container.fitToViewport(),s.setCenter(n.coords),window.innerWidth<996&&s.setZoom(12)},300)}else{const e=e=>{let t=e.coords.split([","]),n=ymaps.templateLayoutFactory.createClass(`\n ${e.name?'
'+e.name+"
":""}\n ${e.address?'
'+e.address+"
":""}\n ${e.workingHours?'
'+e.workingHours+"
":""}\n ${e.phone?'
'+e.phone+"
":""}\n ${e.email?'
'+e.email+"
":""}\n `);return new ymaps.Placemark([t[0],t[1]],{hintContent:""},{iconLayout:"default#image",iconImageHref:"/local/templates/stenova/img/map-mark.png",iconImageSize:[44,44],iconImageOffset:[-22,-22],openEmptyBalloon:!0,hideIconOnBalloonOpen:!1,balloonContentLayout:n,balloonOffset:[0,-25]})};n.map(t=>{s.geoObjects.add(e(t));let n=t.coords.split([","]);s.setCenter(n)}),setTimeout(()=>{n.length>5&&(s.setBounds(s.geoObjects.getBounds()),s.setZoom(4))},300)}t&&(0,o.A)("show",!1)}n&&("undefined"!=typeof ymaps?ymaps.ready(i):document.addEventListener("YandexMapReady",()=>{ymaps.ready(i)}))}},8342:function(e,t,n){function o(){const e=document.querySelectorAll(".js-read-more-container");if(e.length){const t=document.querySelectorAll(".js-language-radio");let n="RU";if(0!==t.length){const e=Array.from(t).find(e=>e.checked);n=e.value}e.forEach(e=>{const t=e.querySelector(".js-read-more"),o=e.querySelector(".js-read-more-block");o&&t&&t.addEventListener("click",function(){o.classList.toggle("open"),o.classList.contains("open")?(this.innerText="RU"===n?"Скрыть":"Hide",o.style.maxHeight=`${o.scrollHeight}px`):(this.innerText="RU"===n?"Читать далее":"Read more",o.style.maxHeight="310px")})})}}n.d(t,{A:function(){return o}})},6531:function(e,t,n){n.r(t),n.d(t,{default:function(){return a}}),n.dn(a);var o=n(7234);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t{window.matchMedia("(min-width: 996px)").matches?n.classList.contains(`${t}--mobile`)||new o.Ay(n,s({modules:[o.Vx,o.dK,o.dF],navigation:{nextEl:".slider-button-next",prevEl:".slider-button-prev"},on:{init(e){e.isLocked&&(e.navigation&&e.navigation.nextEl&&e.navigation.prevEl&&(e.navigation.nextEl.style.display="none",e.navigation.prevEl.style.display="none"),e.pagination&&e.pagination.el&&(e.pagination.el.style.display="none")),e.slides&&e.slides.forEach((e,t)=>{e.setAttribute("data-slide-index",t)})}}},e)):n.classList.contains(`${t}--desktop`)||new o.Ay(n,s({modules:[o.Vx,o.dK,o.dF],navigation:{nextEl:".slider-button-next",prevEl:".slider-button-prev"},on:{init(e){e.slides&&e.slides.forEach((e,t)=>{e.setAttribute("data-slide-index",t)})}}},e))})}},1136:function(e,t,n){function o(e,t){const n=t.querySelector(".js-video-play"),o=t.querySelector(".js-video-poster"),i=t.querySelector(".js-video-dimmer");"play"===e?(i.style.bacgroundColor="transparent",n.style.display="none",o.style.display="none"):(i.style.backgroundColor="rgba(0, 0, 0, 0.35)",n.style.display="flex",o.style.display="block")}function i(){const e=document.querySelectorAll(".js-video");e&&e.length&&e.forEach(e=>{const t=e.closest(".video-block");t.querySelector(".js-video-dimmer").addEventListener("click",()=>{e.paused?(o("play",t),e.play()):(o("pause",t),e.pause())})})}n.d(t,{S:function(){return o},r:function(){return i}})},5869:function(e,t,n){var o=n(6531),i=n(8342),s=n(3325),a=n(6708);window.addEventListener("DOMContentLoaded",()=>{(0,o.default)({loop:!0,slidesPerView:1,spaceBetween:10,centeredSlides:!0,pagination:{el:".swiper-pagination",type:"fraction"},breakpoints:{996:{slidesPerView:"auto",slidesOffsetBefore:310,pagination:!1}}},"js-shop-slider"),(0,o.default)({loop:!0,slidesPerView:1,spaceBetween:10,centeredSlides:!0,breakpoints:{996:{slidesPerView:"auto",slidesOffsetBefore:264}}},"js-shop-products"),(0,i.A)(),(0,s.A)(),(0,a.A)("detail")})}},function(e){e.O(0,[8096],function(){return e(e.s=5869)}),e.O()}]);