1if(!customElements.get("slide-show")){class SlideShow extends HTMLElement{constructor(){super();const slideshow=this;let dots=slideshow.dataset.dots==="true",slideshow_slides=Array.from(slideshow.querySelectorAll(".carousel__slide")),autoplay=slideshow.dataset.autoplay=="false"?!1:parseInt(slideshow.dataset.autoplay,10),align=slideshow.dataset.align=="center"?"center":"left",fade=slideshow.dataset.fade=="true",prev_button=slideshow.querySelector(".flickity-prev"),next_button=slideshow.querySelector(".flickity-next"),custom_dots=slideshow.querySelectorAll(".flickity-custom-dots"),animations=[],rightToLeft=document.dir==="rtl",currentIndex=0,args={wrapAround:!0,cellAlign:align,pageDots:dots,contain:!0,fade,autoPlay:autoplay,rightToLeft,prevNextButtons:!1,cellSelector:".carousel__slide"};if(slideshow.classList.contains("image-with-text-slideshow__image")){let main_slideshow=slideshow.parentNode.querySelector(".image-with-text-slideshow__content");args.draggable=!1,args.asNavFor=main_slideshow}slideshow.classList.contains("image-with-text-slideshow__content")&&(args.adaptiveHeight=!0),slideshow.classList.contains("testimonials__carousel")&&(args.on={ready:function(){window.dispatchEvent(new Event("resize"))}}),slideshow.classList.contains("collection-grid__carousel")&&document.body.classList.contains("animations-true")&&typeof gsap<"u"&&(args.on={scroll:function(progress){let flkSlideWidth=slideshow.querySelectorAll(".collection-card")[0].clientWidth+25,extra_window_space=slideshow.getBoundingClientRect().left;this.slides.forEach((the_slide,j)=>{let scale_amount=1,translateX_amount=0,rotate_amount=0,zindex=10,opacity_amount=1,slide=the_slide.cells[0].element,slide_offset=slide.getBoundingClientRect().left;slide_offset-extra_window_space<0?(scale_amount=1+(slide_offset-extra_window_space)/1200,opacity_amount=1+(slide_offset-extra_window_space)/200,translateX_amount=(slide_offset-extra_window_space)*-1,rotate_amount=(slide_offset-extra_window_space)/10*-1):(scale_amount=1,opacity_amount=1,translateX_amount=0,rotate_amount=0),slide_offset+5-extra_window_space<0?zindex=5:zindex=10,slide.style.zIndex=zindex,gsap.set(slide.querySelector(".collection-card--inner"),{transform:"perspective(1000px) translateX("+translateX_amount+"px) rotateY("+rotate_amount+"deg) translateZ(0)",opacity:opacity_amount}),gsap.set(slide.querySelector(".collection-card__link"),{transform:"scale("+scale_amount+") translateZ(0)"})})}}),slideshow.classList.contains("main-slideshow")&&((slideshow.classList.contains("desktop-height-image")||slideshow.classList.contains("mobile-height-image"))&&(args.adaptiveHeight=!0),document.body.classList.contains("animations-true")&&typeof gsap<"u"&&(slideshow.prepareAnimations(slideshow,animations),args.on={ready:function(){slideshow.animateSlides(0,slideshow,animations)},change:function(index){let previousIndex=fizzyUIUtils.modulo(this.selectedIndex-1,this.slides.length);slideshow.animateReverse(previousIndex,animations),slideshow.animateSlides(index,slideshow,animations)}})),slideshow.classList.contains("products")&&(args.wrapAround=!1,args.on={ready:function(){var flickity=this;window.addEventListener("resize.center_arrows",function(){slideshow.centerArrows(flickity,prev_button,next_button)}),window.dispatchEvent(new Event("resize.center_arrows"))}});const flkty=new Flickity(slideshow,args);slideshow.dataset.initiated=!0,prev_button&&(prev_button.addEventListener("click",event=>{flkty.previous()}),prev_button.addEventListener("keyup",event=>{flkty.previous()}),next_button.addEventListener("click",event=>{flkty.next()}),next_button.addEventListener("keyup",event=>{flkty.next()})),Shopify.designMode&&slideshow.addEventListener("shopify:block:select",event=>{let index=slideshow_slides.indexOf(event.target);flkty.select(index)})}prepareAnimations(slideshow,animations){slideshow.dataset.animationsReady||(document.fonts.ready.then(function(){new SplitText(slideshow.querySelectorAll("h1, p:not(.subheading)"),{type:"lines, words",linesClass:"line-child"}),slideshow.querySelectorAll(".slideshow__slide").forEach((item,i)=>{let tl=gsap.timeline({paused:!0}),button_offset=0;if(animations[i]=tl,tl.to(item.querySelector(".slideshow__slide-content"),{duration:0,autoAlpha:1}),item.querySelector(".subheading")&&(tl.fromTo(item.querySelector(".subheading"),{opacity:0}
1,{duration:.5,opacity:.6},0),button_offset+=.5),item.querySelector("h1")){let h1_duration=.5+(item.querySelectorAll("h1 .line-child div").length-1)*.05;tl.from(item.querySelectorAll("h1 .line-child div"),{duration:h1_duration,yPercent:"100",stagger:.05},0),button_offset+=h1_duration}if(item.querySelector("p:not(.subheading)")){let p_duration=.5+(item.querySelectorAll("p:not(.subheading) .line-child div").length-1)*.02;tl.from(item.querySelectorAll("p:not(.subheading) .line-child div"),{duration:p_duration,yPercent:"100",stagger:.02},0),button_offset+=p_duration}item.querySelectorAll(".button")&&tl.fromTo(item.querySelectorAll(".button"),{opacity:0},{duration:.5,opacity:1,stagger:.05},"-=0.4"),item.dataset.timeline=tl})}),slideshow.dataset.animationsReady=!0)}animateSlides(i,slideshow,animations){let flkty=Flickity.data(slideshow),active_slide=flkty.selectedElement;document.fonts.ready.then(function(){animations[i].restart()})}animateReverse(i,animations){animations[i].reverse()}centerArrows(flickity,prev_button,next_button){let first_cell=flickity.cells[0],max_height=0,image_height=first_cell.element.querySelector(".product-featured-image").clientHeight;if(flickity.cells.forEach((item,i)=>{item.size.height>max_height&&(max_height=item.size.height)}),max_height>image_height){let difference=(max_height-image_height)/-2;prev_button&&(prev_button.style.transform="translateY("+difference+"px)"),next_button&&(next_button.style.transform="translateY("+difference+"px)")}}}customElements.define("slide-show",SlideShow)} 2//# sourceMappingURL=/cdn/shop/t/22/assets/slideshow.js.map?v=110104780531747616791769643273
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.