(function(){function debounce(func,wait){let timeout;return function(...args){clearTimeout(timeout),timeout=setTimeout(()=>func.apply(this,args),wait)}}function breakpoint($root){return getComputedStyle($root).getPropertyValue("--pxu-current-bp").replaceAll('"',"")}class EventHandler{constructor(){this.events=[]}register(el,event,listener){return!el||!event||!listener?null:(this.events.push({el,event,listener}),el.addEventListener(event,listener),{el,event,listener})}unregister({el,event,listener}){return!el||!event||!listener?null:(this.events=this.events.filter(e=>el!==e.el||event!==e.event||listener!==e.listener),el.removeEventListener(event,listener),{el,event,listener})}unregisterAll(){this.events.forEach(({el,event,listener})=>el.removeEventListener(event,listener)),this.events=[]}}class Carousel{DEFAULT_BREAKPOINTS=["xxs","xs"];constructor($root,options={},mobileOptions={}){this.$root=$root,this.$carousel=this.$root.querySelector("[data-pxu-carousel]"),this.breakpoints=this.$carousel.dataset.pxuCarousel&&this.$carousel.dataset.pxuCarousel.split(","),this.options=options,this.mobileOptions=mobileOptions,this.fOptions=options,this.fitContentHeight=!!this.$carousel.parentElement.classList.contains("pxu-carousel--fit-content-height"),this.cellSelector="[data-pxu-carousel-item]",this.$cells=this.$root.querySelectorAll(this.cellSelector),this.enableDynamicColors=[...this.$cells].some($cell=>$cell.dataset.pxuCarouselItemColor!==void 0),this.flickity=null,this.isAnimated=!0,this.watchWindow()}onMount(cb){if(this.currentBreakpoint=breakpoint(this.$root),this.isAnimated=this.getIsAnimated(),this.fOptions={cellSelector:this.cellSelector,draggable:!1,friction:this.isAnimated?.28:1,pageDots:this.$cells.length>1,selectedAttraction:this.isAnimated?.025:1,watchCSS:this.breakpoints.length>0,wrapAround:!0},this.fOptions=Object.assign({},this.fOptions,this.getOptions()),this.fOptions.prevNextButtons=this.$cells.length>1?this.fOptions.prevNextButtons:!1,this.flickity=new FlickityPxu(this.$carousel,this.fOptions),this.updateTabIndex(),this.fitContentHeight&&this.flickity.on("ready",()=>{this.updateSlideHeight()}),this.enableDynamicColors){const initialIndex=this.options.initialIndex||0;this.updateFlickityColor(this.$cells[initialIndex])}this.flickity.on("change",index=>{this.onChange(this.$cells[index])}),typeof cb=="function"&&cb()}onUnmount(cb){this.flickity&&(this.flickity.destroy(),this.flickity=null,typeof cb=="function"&&cb())}onChange(index){this.updateTabIndex(),this.enableDynamicColors&&this.updateFlickityColor(index),this.fitContentHeight&&this.updateSlideHeight()}watchWindow(){window.addEventListener("resize",debounce(()=>{this.currentBreakpoint!=breakpoint(this.$root)&&(this.onUnmount(),setTimeout(this.onMount.bind(this),0))},200))}isMobile(){return this.breakpoints?this.breakpoints.includes(breakpoint(this.$root)):this.DEFAULT_BREAKPOINTS.includes(breakpoint(this.$root))}getOptions(){return this.isMobile()&&Object.keys(this.mobileOptions).length>0?this.mobileOptions:this.options}updateTabIndex(){this.$cells.forEach((cell,index)=>{cell.querySelectorAll("a").forEach(link=>{link.setAttribute("tabindex",index===this.flickity.selectedIndex?"0":"-1")})})}updateFlickityColor(index){const color=index.getAttribute("data-pxu-carousel-item-color");this.$carousel.style.setProperty("--pxu-carousel-item-color",color)}updateSlideHeight(){const slides=this.$carousel.querySelectorAll(this.cellSelector);if(slides.length===0)return;let maxHeight=0;const offsetHeight=150;slides.forEach(slide=>{const content=slide.querySelector("[data-pxu-slideshow-content]");if(content){const contentHeight=this.getAbsoluteHeight(content);maxHeight=Math.max(maxHeight,contentHeight)}});const carouselHeight=this.getAbsoluteHeight(this.$carousel);maxHeight>carouselHeight&&slides.forEach(slide=>{const imageWrapper=slide.querySelector("[data-pxu-slideshow-image-wrapper]");imageWrapper&&requestAnimationFrame(()=>{imageWrapper.classList.add("pxu-slideshow__image-wrapper--fit-content-height"),imageWrapper.style.setProperty("--pxu-carousel-content-height",`${maxHeight+offsetHeight}px`),this.flickity.reloadCells(),this.flickity.resize()})})}getAbsoluteHeight(el){const styles=window.getComputedStyle(el),margin=parseFloat(styles.marginTop)+parseFloat(styles.marginBottom);return Math.ceil(el.offsetHeight+margin)}getIsAnimated(){const isDisabled=this.$root.classList.contains("pxu-section--animated-false"),isReduced=window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!isDisabled&&!isReduced}selectSlide($block){if(!this.flickity)return;const slides=this.flickity.slides;if(!slides)return;const targetSlide=slides.filter(slide=>slide.cells.filter(cell=>cell.element==$block).length>0)[0],index=slides.indexOf(targetSlide);this.flickity.select(index,!1,!0)}}class Section{static instances=[];static init($section,SectionClass){if(Section.getSectionInstance($section.id)||Section.validateSection($section)===!1)return;const section=new SectionClass($section);this.instances.push(section)}static getSectionInstance(sectionId){return Section.instances.find(({id})=>id===sectionId)}static getSectionData($section){const $dataEl=$section.querySelector("[data-component-data]");if(!$dataEl)return{};const data=$dataEl.textContent;try{return JSON.parse(data)}catch(error){throw new Error("Invalid component data found.",{cause:error})}}static loadSectionsScripts($section){const $scriptTag=document.querySelector("#sections-script"),data=Section.getSectionData($section),scriptsUrl=data.scriptsUrl;if(!scriptsUrl)return;const $newScriptTag=document.createElement("script"),sectionHandles=Section.instances.map(section=>section.data.handle);return sectionHandles.indexOf(data.handle)<0&§ionHandles.push(data.handle),$newScriptTag.id="sections-script",$newScriptTag.dataset.sections=sectionHandles.join(","),$newScriptTag.setAttribute("defer","defer"),$newScriptTag.src=scriptsUrl,document.head.appendChild($newScriptTag),$scriptTag&&$scriptTag.remove(),$newScriptTag}static validateSection($section){const data=Section.getSectionData($section);return[()=>!!$section,()=>!!$section.id,()=>!!data,()=>!!data.id,()=>!!data.handle,()=>!!data.className,()=>!!data.name,()=>!!data.version,()=>!!data.scriptsUrl,()=>typeof $section.getAttribute(`data-${data.handle}`)=="string"].filter(con=>con()?!1:(console.error(`Failed section validation: ${con}`),console.error("Section: ",$section),!0)).length<1}constructor($root){this.$root=$root,this.events=new EventHandler}loadData(){return Section.getSectionData(this.$root)}query(selector){return this.$root.querySelector(selector)}queryAll(selector){return this.$root.querySelectorAll(selector)}}class ThemeEditorManager{init(){document.addEventListener("DOMContentLoaded",()=>{const handler=this.#handleShopifyEvent.bind(this);document.addEventListener("shopify:section:load",handler),document.addEventListener("shopify:section:unload",handler),document.addEventListener("shopify:section:select",handler),document.addEventListener("shopify:section:deselect",handler),document.addEventListener("shopify:section:reorder",handler),document.addEventListener("shopify:block:select",handler),document.addEventListener("shopify:block:deselect",handler)},{once:!0})}#handleShopifyEvent(event){const{type}=event,{sectionId}=event.detail||{},$section=document.getElementById(sectionId);if(!$section)return!1;if($section.querySelector("[data-component-data]")!==null)switch(type){case"shopify:section:load":this.#onSectionLoad(event);break;case"shopify:section:unload":this.#onSectionUnload(event);break;case"shopify:section:select":this.#onSectionSelect(event);break;case"shopify:section:deselect":this.#onSectionDeselect(event);break;case"shopify:section:reorder":this.#onSectionReorder(event);break;case"shopify:block:select":this.#onBlockSelect(event);break;case"shopify:block:deselect":this.#onBlockDeselect(event);break;default:break}}#onSectionLoad(event){const sectionId=event.detail.sectionId,$section=document.getElementById(sectionId),$scriptTag=Section.loadSectionsScripts($section);if(Object.keys($section.dataset).length==0||!$scriptTag)return;const{className}=Section.getSectionData($section);let SectionClass=window.PxuThemeSections[className];SectionClass?Section.init($section,SectionClass):$scriptTag.addEventListener("load",()=>{SectionClass=window.PxuThemeSections[className],Section.init($section,SectionClass)})}#onSectionUnload(event){const sectionId=event.detail.sectionId,section=Section.getSectionInstance(sectionId);section&&(section.onUnmount(),Section.instances=Section.instances.filter(({id})=>id!=sectionId))}#onSectionSelect(event){this.#shopifyHandlerFactory("onSectionSelect",event)}#onSectionDeselect(event){this.#shopifyHandlerFactory("onSectionDeselect",event)}#onSectionReorder(event){this.#shopifyHandlerFactory("onSectionReorder",event)}#onBlockSelect(event){this.#shopifyHandlerFactory("onBlockSelect",event)}#onBlockDeselect(event){this.#shopifyHandlerFactory("onBlockDeselect",event)}#shopifyHandlerFactory(method,event){const{sectionId}=event.detail,section=Section.getSectionInstance(sectionId);section&&typeof section[method]=="function"&§ion[method](event)}}Shopify.designMode&&new ThemeEditorManager().init(),window.PxuThemeSections={Section,Carousel},window.PxuUtils={debounce,breakpoint}})();/*! * Flickity PACKAGED v2.3.0 * Touch, responsive, flickable carousels * * Licensed GPLv3 for open source use * or Flickity Commercial License for commercial use * * https://flickity.metafizzy.co * Copyright 2015-2021 Metafizzy */(function(e,i){typeof define=="function"&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(t21){return i(e,t21)}):typeof module=="object"&&module.exports?module.exports=i(e,require("jquery")):e.jQueryBridget=i(e,e.jQuery)})(window,function(e,r){"use strict";var o=Array.prototype.slice,i=e.console,u=typeof i>"u"?function(){}:function(t21){i.error(t21)};function n(h,s,c){if(c=c||r||e.jQuery,!c)return;s.prototype.option||(s.prototype.option=function(t21){c.isPlainObject(t21)&&(this.options=c.extend(!0,this.options,t21))}),c.fn[h]=function(t21){if(typeof t21=="string"){var e2=o.call(arguments,1);return i2(this,t21,e2)}return n2(this,t21),this};function i2(t21,r2,o2){var a2,l="$()."+h+'("'+r2+'")';return t21.each(function(t22,e2){var i3=c.data(e2,h);if(!i3){u(h+" not initialized. Cannot call methods, i.e. "+l);return}var n3=i3[r2];if(!n3||r2.charAt(0)=="_"){u(l+" is not a valid method");return}var s2=n3.apply(i3,o2);a2=a2===void 0?s2:a2}),a2!==void 0?a2:t21}function n2(t21,n3){t21.each(function(t22,e2){var i3=c.data(e2,h);i3?(i3.option(n3),i3._init()):(i3=new s(e2,n3),c.data(e2,h,i3))})}a(c)}function a(t21){!t21||t21&&t21.bridget||(t21.bridget=n)}return a(r||e.jQuery),n}),function(t21,e){typeof define=="function"&&define.amd?define("ev-emitter/ev-emitter",e):typeof module=="object"&&module.exports?module.exports=e():t21.EvEmitter=e()}(typeof window<"u"?window:this,function(){function t21(){}var e=t21.prototype;return e.on=function(t22,e2){if(!(!t22||!e2)){var i=this._events=this._events||{},n=i[t22]=i[t22]||[];return n.indexOf(e2)==-1&&n.push(e2),this}},e.once=function(t22,e2){if(!(!t22||!e2)){this.on(t22,e2);var i=this._onceEvents=this._onceEvents||{},n=i[t22]=i[t22]||{};return n[e2]=!0,this}},e.off=function(t22,e2){var i=this._events&&this._events[t22];if(!(!i||!i.length)){var n=i.indexOf(e2);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t22,e2){var i=this._events&&this._events[t22];if(!(!i||!i.length)){i=i.slice(0),e2=e2||[];for(var n=this._onceEvents&&this._onceEvents[t22],s=0;s"u"?e:function(t21){console.error(t21)},y=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],b=y.length;function E(){for(var t21={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e2=0;e2