"use strict";(self.webpackChunkgutenslider=self.webpackChunkgutenslider||[]).push([[123],{7513:function(e,t,s){s.d(t,{default:function(){return i}}),s.p;class i{constructor(e){return this.el=e,this.domSwiper=this.el.querySelector(".swiper"),this.swiperSettings=JSON.parse(this.domSwiper.dataset.settings),this.domSlides=this.el.querySelectorAll(".swiper-wrapper .wp-block-eedee-block-gutenslide:not(.swiper-slide-duplicate)"),this.damping=.5,this.isMouseOnLeft=!0,this.isLeftArrowVisible=!1,this.isRightArrowVisible=!1,this.leftArrow=this.el.querySelector(".eedee-gutenslider-prev"),this.rightArrow=this.el.querySelector(".eedee-gutenslider-next"),this.gsBreakpoints=[600,960],this.gsMediaQueries=[window.matchMedia(`(max-width: ${this.gsBreakpoints[0]}px)`),window.matchMedia(`(min-width: ${this.gsBreakpoints[0]+1}px) and (max-width: ${this.gsBreakpoints[1]}px)`),window.matchMedia(`(min-width: ${this.gsBreakpoints[1]+1}px)`)],this.overlayBgColor=getComputedStyle(this.el).getPropertyValue("--gutenslider-lightgallery-bg"),this.fontColor=getComputedStyle(this.el).getPropertyValue("--gutenslider-lightgallery-font"),this.lgTransition=this.el.dataset.lgTransition||"lg-slide",this.initSwiper=this.initSwiper.bind(this),this.destroy=this.destroy.bind(this),this.onLgAfterSlide=this.onLgAfterSlide.bind(this),this.onLgBeforeClose=this.onLgBeforeClose.bind(this),this.onLgBeforeOpen=this.onLgBeforeOpen.bind(this),this.addMediaQueryListeners=this.addMediaQueryListeners.bind(this),this.gsHandleBreakpoint=this.gsHandleBreakpoint.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onClick=this.onClick.bind(this),this.init(),this}init(){this.addMediaQueryListeners(),this.updateDom(),window.matchMedia&&window.matchMedia("(pointer:fine)").matches&&window.matchMedia("(hover:hover)").matches&&this.initArrowsFollowMouse(),this.gsHandleBreakpoint(),this.swiperSettings.hasLg&&this.initLg()}addMediaQueryListeners(){for(let e=0;ethis.gsHandleBreakpoint)):console.error(t)}}destroy(){return this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this}initArrowsFollowMouse(){this.swiperSettings.arrowsFollowMouse&&(this.raf(),this.el.classList.contains("is-full")?(document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseenter",this.onMouseEnter),document.addEventListener("mouseleave",this.onMouseLeave),document.addEventListener("click",this.onClick),this.mouseX=0,this.mouseY=0,this.dMouseX=0,this.dMouseY=0,document.body.style.cursor="none"):(this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("mouseleave",this.onMouseLeave),this.el.addEventListener("click",this.onClick),this.el.style.cursor="none"),this.leftArrow.style.pointerEvents="none",this.rightArrow.style.pointerEvents="none",this.leftArrow.style.transition="opacity 0.5s",this.rightArrow.style.transition="opacity 0.5s",this.leftArrow.style.top=0,this.leftArrow.style.left=0,this.rightArrow.style.top=0,this.rightArrow.style.left=0,Object.assign(this.swiperSettings,{allowTouchMove:!1}))}updateArrows(){const e=this.dMouseY-this.leftArrow.clientHeight/2+"px",t=this.dMouseX-this.leftArrow.clientWidth/2+"px",s=this.dMouseY-this.rightArrow.clientHeight/2+"px",i=this.dMouseX-this.rightArrow.clientWidth/2+"px";this.leftArrow.style.transform=`translate3d(${t},${e},0)`,this.rightArrow.style.transform=`translate3d(${i},${s},0)`}raf(){void 0!==this.dMouseX&&void 0!==this.dMouseY&&(this.dMouseX-=(this.dMouseX-this.mouseX)*this.damping,this.dMouseY-=(this.dMouseY-this.mouseY)*this.damping),this.updateArrows(),window.requestAnimationFrame(this.raf.bind(this))}gsHandleBreakpoint(){let e="";this.gsMediaQueries[0].matches?e="":this.gsMediaQueries[1].matches?e="settingsMd":this.gsMediaQueries[2].matches&&(e="settingsLg");const t=""!==e?this.swiperSettings[e]:{};Object.assign(this.swiperSettings,t),this.initSwiper()}onMouseMove(e){const t=this.el.getBoundingClientRect();this.mouseX=e.clientX-t.left,this.mouseY=e.clientY-t.top,this.mouseX>t.width/2?(this.isMouseOnLeft=!1,this.leftArrow.classList.remove("ed-active"),this.rightArrow.classList.add("ed-active")):(this.isMouseOnLeft=!0,this.leftArrow.classList.add("ed-active"),this.rightArrow.classList.remove("ed-active")),e.target.classList&&e.target.classList.contains("swiper-pagination-bullet")||"A"===e.target.tagName||"BUTTON"===e.target.tagName?(this.leftArrow.style.opacity=0,this.rightArrow.style.opacity=0):(this.leftArrow.style.opacity=1,this.rightArrow.style.opacity=1)}onClick(){this.isMouseOnLeft&&"0"!==this.leftArrow.style.opacity?this.swiperInstance&&this.swiperInstance.slidePrev():this.isMouseOnLeft||"0"===this.rightArrow.style.opacity||this.swiperInstance&&this.swiperInstance.slideNext()}onMouseEnter(e){this.mouseY=e.offsetY,this.mouseX=e.offsetX,this.dMouseX=e.offsetX,this.dMouseY=e.offsetY,this.leftArrow.style.opacity=1,this.rightArrow.style.opacity=1}onMouseLeave(){this.leftArrow.style.opacity=0,this.rightArrow.style.opacity=0}async initSwiper(){var e,t,i;this.swiperSettings.autoHeight?(this.el.classList.add("adaptive-height"),this.el.classList.remove("fixed-height")):(this.el.classList.remove("adaptive-height"),this.el.classList.add("fixed-height")),"auto"===this.swiperSettings.slidesPerView?(this.el.classList.remove("slides-number"),this.el.classList.add("slides-auto")):(this.el.classList.add("slides-number"),this.el.classList.remove("slides-auto"));const{default:a}=await Promise.all([s.e(434),s.e(394)]).then(s.bind(s,7652)),{A11y:n,History:o,HashNavigation:r}=await s.e(318).then(s.bind(s,5560));await Promise.all([s.e(434),s.e(394)]).then(s.bind(s,3911)),await s.e(850).then(s.bind(s,6252)),this.el.classList.contains("content-change")?await s.e(834).then(s.bind(s,5703)):this.el.classList.contains("content-fixed")&&await s.e(746).then(s.bind(s,4218)),(this.el.classList.contains("adaptive-height")||this.el.classList.contains("adaptive-height-md")||this.el.classList.contains("adaptive-height-sm"))&&await s.e(654).then(s.bind(s,2797)),this.el.classList.contains("slides-auto")&&await s.e(834).then(s.bind(s,8389)),null!==(e=this.swiperSettings.dividers)&&void 0!==e&&e&&await s.e(35).then(s.bind(s,2605));const l=[n,o,r];if(null!==(t=this.swiperSettings.keyboard)&&void 0!==t&&t){const{Keyboard:e}=await s.e(318).then(s.bind(s,5560));l.push(e)}if(this.el.classList.contains("arrows-lg")||this.el.classList.contains("arrows-md")||this.el.classList.contains("arrows-sm")){const{Navigation:e}=await s.e(318).then(s.bind(s,5560));await s.e(783).then(s.bind(s,9776)),await s.e(654).then(s.bind(s,5954)),l.push(e)}if(this.el.classList.contains("dots-lg")||this.el.classList.contains("dots-md")||this.el.classList.contains("dots-sm")){const{Pagination:e}=await Promise.all([s.e(318),s.e(915)]).then(s.bind(s,5560));await Promise.all([s.e(318),s.e(915)]).then(s.bind(s,1502)),await s.e(788).then(s.bind(s,9286)),l.push(e)}switch(this.el.classList.add("gs-finished-controls"),this.swiperSettings.effect){case"fade":const{EffectFade:e}=await Promise.all([s.e(318),s.e(403)]).then(s.bind(s,5560));await Promise.all([s.e(318),s.e(403)]).then(s.bind(s,4460)),l.push(e);break;case"flip":const{EffectFlip:t}=await Promise.all([s.e(318),s.e(617)]).then(s.bind(s,5560));await Promise.all([s.e(318),s.e(617)]).then(s.bind(s,6017)),l.push(t);break;case"cube":const{EffectCube:i}=await Promise.all([s.e(318),s.e(510)]).then(s.bind(s,5560));await Promise.all([s.e(318),s.e(510)]).then(s.bind(s,2807)),l.push(i);break;case"cards":const{EffectCards:a}=await Promise.all([s.e(318),s.e(610)]).then(s.bind(s,5560));await Promise.all([s.e(318),s.e(610)]).then(s.bind(s,4832)),l.push(a);break;case"coverflow":const{EffectCoverflow:n}=await s.e(318).then(s.bind(s,5560));await Promise.all([s.e(318),s.e(915)]).then(s.bind(s,7615)),l.push(n);break;case"gl":console.log("yeah GL");const{default:o}=await s.e(103).then(s.bind(s,9477));await Promise.all([s.e(318),s.e(915)]).then(s.bind(s,9132)),l.push(o)}if(null!==(i=this.swiperSettings.autoplay)&&void 0!==i&&i){const{Autoplay:e}=await s.e(318).then(s.bind(s,5560));l.push(e)}return this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.swiperInstance=new a(this.domSwiper,{...this.swiperSettings,modules:l,on:{init:()=>{this.addParallax()},transitionStart:e=>{this.addParallax(),e.slides.forEach((e=>{if(e.classList.contains("ed-bg-video")){const t=e.querySelector("video");if(!t.classList.contains("bg-video-autopause"))return;e.classList.contains("swiper-slide-visible")?t&&t.play():t&&t.pause()}}))}}}),this.el.classList.add("gs-finished-layout"),[...document.querySelectorAll(".eedee-gutenslider-nav svg, .eedee-gutenslider-nav #bg, .eedee-gutenslider-nav .bg, .eedee-gutenslider-nav #arrow, .eedee-gutenslider-nav .arrow")].forEach((e=>{e.style.transition="fill 0.3s, stroke 0.3s, background 0.3s, transform 0.5s"})),this.swiperInstance}updateDom(){const e=this.el.querySelectorAll(".wp-block-eedee-block-gutenslide");let t=0;const s=this.el.dataset.hash?this.el.dataset.hash:this.el.id;[...e].forEach((function(e,i){if((e.classList.contains("ed-bg-image")||e.classList.contains("ed-bg-video"))&&(e.dataset.lgImageIdx=t,t++,e.classList.contains("ed-bg-video"))){const t=e.querySelector(".eedee-background-div video");e.style.width=`${t.width}px`}void 0!==typeof e.dataset.hash&&""!==e.dataset.hash||(e.dataset.hash=`${s}-${i+1}`)}))}async initLg(){const{default:e}=await Promise.all([s.e(843),s.e(817)]).then(s.bind(s,9843));await Promise.all([s.e(843),s.e(817)]).then(s.bind(s,2013));const t=[],{default:i}=await s.e(768).then(s.bind(s,2523));if(await s.e(768).then(s.bind(s,2258)),t.push(i),this.swiperSettings.lgZoomEnabled){const{default:e}=await s.e(979).then(s.bind(s,2869));await s.e(979).then(s.bind(s,7368)),t.push(e)}if(this.swiperSettings.lgThumbnails){const{default:e}=await s.e(165).then(s.bind(s,1997));await s.e(165).then(s.bind(s,3967)),t.push(e)}const a=[...this.domSlides].reduce(((e,t)=>{let s;if(t.classList.contains("ed-bg-image")){const e=t.querySelector(".eedee-background-div img");s={src:e.src,thumb:e.src,alt:e.alt,srcset:e.srcset}}else{if(!t.classList.contains("ed-bg-video"))return e;{const e=t.querySelector(".eedee-background-div video"),i=e.hasAttribute("poster")&&""!==e.getAttribute("poster")?e.poster:eedeeGutenslider.pluginsUrl+"/build/images/video_player_placeholder.gif";s={size:`${e.dataset.width}-${e.dataset.height}`,video:{source:[{src:e.src,type:e.getAttribute("type"),alt:e.alt}],attributes:{controls:!0}},poster:i,thumb:i},e.hasAttribute("loop")&&(s.video.attributes.loop="")}}const i=t.querySelector("img, video");let a="";this.swiperSettings.lgTitle&&("title"===this.swiperSettings.lgTitle&&(a=void 0===i.dataset.title?"":i.dataset.title),"alt"===this.swiperSettings.lgTitle&&(a=void 0===i.dataset.alt?"":i.alt));let n="";return this.swiperSettings.lgCaption&&("caption"===this.swiperSettings.lgCaption&&(n=void 0===i.dataset.caption?"":i.dataset.caption),"description"===this.swiperSettings.lgCaption&&(n=void 0===i.dataset.description?"":i.dataset.description),"alt"===this.swiperSettings.lgCaption&&(n=void 0===i.dataset.alt?"":i.alt)),s={...s,subHtml:`

${a}

${n}

`},e.push(s),e}),[]);this.lightGallery=e(this.el,{licenseKey:"1234-4932-1281-3121",plugins:t,dynamic:!0,dynamicEl:a,mode:this.lgTransition,container:document.body,addClass:"gs-lightgallery",download:!1,hideBarsDelay:2e3,loop:Boolean(this.swiperSettings.loop),counter:Boolean(this.swiperSettings.hasLgCounter),autoplayFirstVideo:!1}),this.el.addEventListener("lgAfterSlide",this.onLgAfterSlide),this.el.addEventListener("lgBeforeOpen",this.onLgBeforeOpen),this.el.addEventListener("lgBeforeClose",this.onLgBeforeClose),[...this.el.querySelectorAll(".wp-block-eedee-block-gutenslide")].map(((e,t)=>{(e.classList.contains("ed-bg-image")||e.classList.contains("ed-bg-video"))&&null===e.querySelector(".slide-link")&&e.addEventListener("click",(()=>{const t=parseInt(e.dataset.lgImageIdx);this.lightGallery.openGallery(t||0),this.lightGallery.$backdrop.firstElement.style.backgroundColor=this.overlayBgColor?this.overlayBgColor:"#fff",this.lightGallery.$container.firstElement.style.setProperty("--gutenslider-lightgallery-font",this.fontColor)}))}))}onLgBeforeOpen(e){this.swiperSettings.autoplay&&this.swiperInstance.autoplay.stop()}onLgBeforeClose(e){this.swiperSettings.autoplay&&setTimeout((()=>{this.swiperInstance&&this.swiperInstance.autoplay.start()}),1e3)}onLgAfterSlide(e){const{index:t}=e.detail;if(void 0!==t){const e=this.el.querySelector(`[data-lg-image-idx="${t}"]`),s=e&&e.dataset.swiperSlideIndex;this.swiperSettings.loop?this.swiperInstance&&this.swiperInstance.slideToLoop(parseInt(s)):this.swiperInstance&&this.swiperInstance.slideTo(parseInt(s))}}async addParallax(){if(this.el.classList.contains("has-parallax")){const{default:e}=await s.e(199).then(s.t.bind(s,4102,23));if(void 0!==typeof e){const t=this.el.dataset.parallaxDirection||"top",s=this.el.dataset.parallaxAmount||1.3;this.el.querySelectorAll(".swiper-slide-visible .eedee-background-div img").forEach((i=>{i.classList.contains("simpleParallax")||new e(i,{scale:s,orientation:t})}))}}}}}}]);