vendor: 37,516 bytes, lines 1-16
1/*! 2 * Flickity PACKAGED v3.0.0 3 * Touch, responsive, flickable carousels 4 * 5 * Licensed GPLv3 for open source use 6 * or Flickity Commercial License for commercial use 7 * 8 * https://flickity.metafizzy.co 9 * Copyright 2015-2022 Metafizzy 10 */(function(t,e){typeof module=="object"&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)})(window,(function(t,e){let i=t.console,s=i===void 0?function(){}:function(t2){i.error(t2)};return function(i2,n,o){(o=o||e||t.jQuery)&&(n.prototype.option||(n.prototype.option=function(t2){t2&&(this.options=Object.assign(this.options||{},t2))}),o.fn[i2]=function(t2,...e2){return typeof t2=="string"?(function(t3,e3,n2){let l2,r=`$().${i2}("${e3}")`;return t3.each((function(t4,h){let a=o.data(h,i2);if(!a)return void s(`${i2} not initialized. Cannot call method ${r}`);let c=a[e3];if(!c||e3.charAt(0)=="_")return void s(`${r} is not a valid method`);let d=c.apply(a,n2);l2=l2===void 0?d:l2})),l2!==void 0?l2:t3})(this,t2,e2):(l=t2,this.each((function(t3,e3){let s2=o.data(e3,i2);s2?(s2.option(l),s2._init()):(s2=new n(e3,l),o.data(e3,i2,s2))})),this);var l})}})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e():t.EvEmitter=e()})(typeof window<"u"?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t2,e2){if(!t2||!e2)return this;let i=this._events=this._events||{},s=i[t2]=i[t2]||[];return s.includes(e2)||s.push(e2),this},e.once=function(t2,e2){if(!t2||!e2)return this;this.on(t2,e2);let i=this._onceEvents=this._onceEvents||{};return(i[t2]=i[t2]||{})[e2]=!0,this},e.off=function(t2,e2){let i=this._events&&this._events[t2];if(!i||!i.length)return this;let s=i.indexOf(e2);return s!=-1&&i.splice(s,1),this},e.emitEvent=function(t2,e2){let i=this._events&&this._events[t2];if(!i||!i.length)return this;i=i.slice(0),e2=e2||[];let s=this._onceEvents&&this._onceEvents[t2];for(let n of i)s&&s[n]&&(this.off(t2,n),delete s[n]),n.apply(this,e2);return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e():t.getSize=e()})(window,(function(){function t(t2){let e2=parseFloat(t2);return t2.indexOf("%")==-1&&!isNaN(e2)&&e2}let e=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];return e.length,function(i){if(typeof i=="string"&&(i=document.querySelector(i)),!(i&&typeof i=="object"&&i.nodeType))return;let s=getComputedStyle(i);if(s.display=="none")return(function(){let t2={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return e.forEach((e2=>{t2[e2]=0})),t2})();let n={};n.width=i.offsetWidth,n.height=i.offsetHeight;let o=n.isBorderBox=s.boxSizing=="border-box";e.forEach((t2=>{let e2=s[t2],i2=parseFloat(e2);n[t2]=isNaN(i2)?0:i2}));let l=n.paddingLeft+n.paddingRight,r=n.paddingTop+n.paddingBottom,h=n.marginLeft+n.marginRight,a=n.marginTop+n.marginBottom,c=n.borderLeftWidth+n.borderRightWidth,d=n.borderTopWidth+n.borderBottomWidth,u=t(s.width);u!==!1&&(n.width=u+(o?0:l+c));let p=t(s.height);return p!==!1&&(n.height=p+(o?0:r+d)),n.innerWidth=n.width-(l+c),n.innerHeight=n.height-(r+d),n.outerWidth=n.width+h,n.outerHeight=n.height+a,n}})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e(t):t.fizzyUIUtils=e(t)})(this,(function(t){let e={extend:function(t2,e2){return Object.assign(t2,e2)},modulo:function(t2,e2){return(t2%e2+e2)%e2},makeArray:function(t2){return Array.isArray(t2)?t2:t2==null?[]:typeof t2=="object"&&typeof t2.length=="number"?[...t2]:[t2]},removeFrom:function(t2,e2){let i2=t2.indexOf(e2);i2!=-1&&t2.splice(i2,1)},getParent:function(t2,e2){for(;t2.parentNode&&t2!=document.body;)if((t2=t2.parentNode).matches(e2))return t2},getQueryElement:function(t2){return typeof t2=="string"?document.querySelector(t2):t2},handleEvent:function(t2){let e2="on"+t2.type;this[e2]&&this[e2](t2)},filterFindElements:function(t2,i2){return(t2=e.makeArray(t2)).filter((t3=>t3 instanceof HTMLElement)).reduce(((t3,e2)=>{if(!i2)return t3.push(e2),t3;e2.matches(i2)&&t3.push(e2);let s=e2.querySelectorAll(i2);return t3=t3.concat(...s)}),[])},debounceMethod:function(t2,e2,i2){i2=i2||100;let s=t2.prototype[e2],n=e2+"Timeout";t2.prototype[e2]=function(){clearTimeout(this[n]);let t3=arguments;this[n]=setTimeout((()=>{s.apply(this,t3),delete this[n]}),i2)}},docReady:function(t2){let e2=document.readyState;e2=="complete"||e2=="interactive"?setTimeout(t2):document.addEventListener("DOMContentLoaded",t2)},toDashed:function(t2){return t2.replace(/(.)([A-Z])/g,(function(t3,e2,i2){return e2+"-"+i2})).toLowerCase()}},i=t.console;return e.htmlInit=function(s,n){e.docReady((function(){let o="data-"+e.toDashed(n),l=document.querySelectorAll(`[${o}]`),r=t.jQuery;[...l].forEach((t2=>{let e2,l2=t2.getAttribute(o);try{e2=l2&&JSON.parse(l2)}catch(e3){return void(i&&i.error(`Error parsing ${o} on ${t2.className}: ${e3}`))}let h=new s(t2,e2);r&&r.data(t2,n,h)}))}))},e})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e(t,require("ev-emitter")):t.Unidragger=e(t,t.EvEmitter)})(typeof window<"u"?window:this,(function(t,e){function i(){}let s=i.prototype=Object.create(e.prototype);s.handleEvent=function(t2){let e2="on"+t2.type;this[e2]&&this[e2](t2)};let n,o,l=!1;"ontouchstart"in t?(l=!0,n="touchstart",o=["touchmove","touchend","touchcancel"]):t.PointerEvent?(n="pointerdown",o=["pointermove","pointerup","pointercancel"]):(n="mousedown",o=["mousemove","mouseup"]),s.touchActionValue="none",s.bindHandles=function(){this._bindHandles("addEventListener",this.touchActionValue)},s.unbindHandles=function(){this._bindHandles("removeEventListener","")},s._bindHandles=function(e2,i2){this.handles.forEach((s2=>{s2[e2](n,this,{passive:l}),s2[e2]("click",this),t.PointerEvent&&(s2.style.touchAction=i2)}))},s.bindActivePointerEvents=function(){o.forEach((e2=>{t.addEventListener(e2,this)}))},s.unbindActivePointerEvents=function(){o.forEach((e2=>{t.removeEventListener(e2,this)}))},s.withPointer=function(t2,e2){e2.pointerId===this.pointerIdentifier&&this[t2](e2,e2)},s.withTouch=function(t2,e2){let i2;for(let t3 of e2.changedTouches)t3.identifier===this.pointerIdentifier&&(i2=t3);i2&&this[t2](e2,i2)},s.onmousedown=function(t2){this.pointerDown(t2,t2)},s.ontouchstart=function(t2){this.pointerDown(t2,t2.changedTouches[0])},s.onpointerdown=function(t2){this.pointerDown(t2,t2)};const r=["TEXTAREA","INPUT","SELECT","OPTION"],h=["radio","checkbox","button","submit","image","file"];return s.pointerDown=function(t2,e2){let i2=r.includes(t2.target.nodeName),s2=h.includes(t2.target.type),n2=!i2||s2;!this.isPointerDown&&!t2.button&&n2&&(this.isPointerDown=!0,this.pointerIdentifier=e2.pointerId!==void 0?e2.pointerId:e2.identifier,this.pointerDownPointer={pageX:e2.pageX,pageY:e2.pageY},this.bindActivePointerEvents(),this.emitEvent("pointerDown",[t2,e2]))},s.onmousemove=function(t2){this.pointerMove(t2,t2)},s.onpointermove=function(t2){this.withPointer("pointerMove",t2)},s.ontouchmove=function(t2){this.withTouch("pointerMove",t2)},s.pointerMove=function(t2,e2){let i2={x:e2.pageX-this.pointerDownPointer.pageX,y:e2.pageY-this.pointerDownPointer.pageY};this.emitEvent("pointerMove",[t2,e2,i2]),!this.isDragging&&this.hasDragStarted(i2)&&this.dragStart(t2,e2),this.isDragging&&this.dragMove(t2,e2,i2)},s.hasDragStarted=function(t2){return Math.abs(t2.x)>3||Math.abs(t2.y)>3},s.dragStart=function(t2,e2){this.isDragging=!0,this.isPreventingClicks=!0,this.emitEvent("dragStart",[t2,e2])},s.dragMove=function(t2,e2,i2){this.emitEvent("dragMove",[t2,e2,i2])},s.onmouseup=function(t2){this.pointerUp(t2,t2)},s.onpointerup=function(t2){this.withPointer("pointerUp",t2)},s.ontouchend=function(t2){this.withTouch("pointerUp",t2)},s.pointerUp=function(t2,e2){this.pointerDone(),this.emitEvent("pointerUp",[t2,e2]),this.isDragging?this.dragEnd(t2,e2):this.staticClick(t2,e2)},s.dragEnd=function(t2,e2){this.isDragging=!1,setTimeout((()=>delete this.isPreventingClicks)),this.emitEvent("dragEnd",[t2,e2])},s.pointerDone=function(){this.isPointerDown=!1,delete this.pointerIdentifier,this.unbindActivePointerEvents(),this.emitEvent("pointerDone")},s.onpointercancel=function(t2){this.withPointer("pointerCancel",t2)},s.ontouchcancel=function(t2){this.withTouch("pointerCancel",t2)},s.pointerCancel=function(t2,e2){this.pointerDone(),this.emitEvent("pointerCancel",[t2,e2])},s.onclick=function(t2){this.isPreventingClicks&&t2.preventDefault()},s.staticClick=function(t2,e2){let i2=t2.type==="mouseup";i2&&this.isIgnoringMouseUp||(this.emitEvent("staticClick",[t2,e2]),i2&&(this.isIgnoringMouseUp=!0,setTimeout((()=>{delete this.isIgnoringMouseUp}),400)))},i})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e(require("get-size")):(t.Flickity=t.Flickity||{},t.Flickity.Cell=e(t.getSize))})(typeof window<"u"?window:this,(function(t){const e="flickity-cell";function i(t2){this.element=t2,this.element.classList.add(e),this.x=0,this.unselect()}let s=i.prototype;return s.destroy=function(){this.unselect(),this.element.classList.remove(e),this.element.style.transform="",this.element.removeAttribute("aria-hidden")},s.getSize=function(){this.size=t(this.element)},s.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden")},s.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true")},s.remove=function(){this.element.remove()},i})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e():(t.Flickity=t.Flickity||{},t.Flickity.Slide=e())})(typeof window<"u"?window:this,(function(){function t(t2,e2,i){this.beginMargin=t2,this.endMargin=e2,this.cellAlign=i,this.cells=[],this.outerWidth=0,this.height=0}let e=t.prototype;return e.addCell=function(t2){this.cells.push(t2),this.outerWidth+=t2.size.outerWidth,this.height=Math.max(t2.size.outerHeight,this.height),this.cells.length===1&&(this.x=t2.x,this.firstMargin=t2.size[this.beginMargin])},e.updateTarget=function(){let t2=this.getLastCell(),e2=t2?t2.size[this.endMargin]:0,i=this.outerWidth-(this.firstMargin+e2);this.target=this.x+this.firstMargin+i*this.cellAlign},e.getLastCell=function(){return this.cells[this.cells.length-1]},e.select=function(){this.cells.forEach((t2=>t2.select()))},e.unselect=function(){this.cells.forEach((t2=>t2.unselect()))},e.getCellElements=function(){return this.cells.map((t2=>t2.element))},t})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e(require("fizzy-ui-utils")):(t.Flickity=t.Flickity||{},t.Flickity.animatePrototype=e(t.fizzyUIUtils))})(typeof window<"u"?window:this,(function(t){return{startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();let t2=this.x;this.integratePhysics(),this.positionSlider(),this.settle(t2),this.isAnimating&&requestAnimationFrame((()=>this.animate()))},positionSlider:function(){let e2=this.x;this.isWrapping&&(e2=t.modulo(e2,this.slideableWidth)-this.slideableWidth,this.shiftWrapCells(e2)),this.setTranslateX(e2,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t2,e2){t2+=this.cursorPosition,this.options.rightToLeft&&(t2=-t2);let i=this.getPositionValue(t2);this.slider.style.transform=e2?`translate3d(${i},0,0)`:`translateX(${i})`},dispatchScrollEvent:function(){let t2=this.slides[0];if(!t2)return;let e2=-this.x-t2.target,i=e2/this.slidesWidth;this.dispatchEvent("scroll",null,[i,e2])},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t2){return this.options.percentPosition?.01*Math.round(t2/this.size.innerWidth*1e4)+"%":Math.round(t2)+"px"},settle:function(t2){!this.isPointerDown&&Math.round(100*this.x)===Math.round(100*t2)&&this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t2){let e2=this.cursorPosition+t2;this._shiftCells(this.beforeShiftCells,e2,-1);let i=this.size.innerWidth-(t2+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},_shiftCells:function(t2,e2,i){t2.forEach((t3=>{let s=e2>0?i:0;this._wrapShiftCell(t3,s),e2-=t3.size.outerWidth}))},_unshiftCells:function(t2){t2&&t2.length&&t2.forEach((t3=>this._wrapShiftCell(t3,0)))},_wrapShiftCell:function(t2,e2){this._renderCellPosition(t2,t2.x+this.slideableWidth*e2)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t2){this.velocity+=t2},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){if(!this.isDraggable||!this.isPointerDown)return;let t2=this.dragX-this.x-this.velocity;this.applyForce(t2)},applySelectedAttraction:function(){if(this.isDraggable&&this.isPointerDown||this.isFreeScrolling||!this.slides.length)return;let t2=(-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction;this.applyForce(t2)}}})),(function(t,e){if(typeof module=="object"&&module.exports)module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./cell"),require("./slide"),require("./animate"));else{let i=t.Flickity;t.Flickity=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,i.Cell,i.Slide,i.animatePrototype)}})(typeof window<"u"?window:this,(function(t,e,i,s,n,o,l){const{getComputedStyle:r,console:h}=t;let{jQuery:a}=t,c=0,d={};function u(t2,e2){let i2=s.getQueryElement(t2);if(i2){if(this.element=i2,this.element.flickityGUID){let t3=d[this.element.flickityGUID];return t3&&t3.option(e2),t3}a&&(this.$element=a(this.element)),this.options={...this.constructor.defaults},this.option(e2),this._create()}else h&&h.error(`Bad element for Flickity: ${i2||t2}`)}u.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},u.create={};let p=u.prototype;Object.assign(p,e.prototype),p._create=function(){let{resize:e2,watchCSS:i2,rightToLeft:s2}=this.options,n2=this.guid=++c;this.element.flickityGUID=n2,d[n2]=this,this.selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.beginMargin=s2?"marginRight":"marginLeft",this.endMargin=s2?"marginLeft":"marginRight",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this._createSlider(),this.focusableElems=[this.element],(e2||i2)&&t.addEventListener("resize",this);for(let t2 in this.options.on){let e3=this.options.on[t2];this.on(t2,e3)}for(let t2 in u.create)u.create[t2].call(this);i2?this.watchCSS():this.activate()},p.option=function(t2){Object.assign(this.options,t2)},p.activate=function(){if(this.isActive)return;this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize();let t2=this._filterFindCellElements(this.element.children);this.slider.append(...t2),this.viewport.append(this.slider),this.element.append(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready")},p._createSlider=function(){let t2=document.createElement("div");t2.className="flickity-slider",this.slider=t2},p._filterFindCellElements=function(t2){return s.filterFindElements(t2,this.options.cellSelector)},p.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._updateWrapShiftCells(),this.setGallerySize()},p._makeCells=function(t2){return this._filterFindCellElements(t2).map((t3=>new n(t3)))},p.getLastCell=function(){return this.cells[this.cells.length-1]},p.getLastSlide=function(){return this.slides[this.slides.length-1]},p.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},p._positionCells=function(t2){t2=t2||0,this.maxCellHeight=t2&&this.maxCellHeight||0;let e2=0;if(t2>0){let i2=this.cells[t2-1];e2=i2.x+i2.size.outerWidth}this.cells.slice(t2).forEach((t3=>{t3.x=e2,this._renderCellPosition(t3,e2),e2+=t3.size.outerWidth,this.maxCellHeight=Math.max(t3.size.outerHeight,this.maxCellHeight)})),this.slideableWidth=e2,this.updateSlides(),this._containSlides(),this.slidesWidth=this.cells.length?this.getLastSlide().target-this.slides[0].target:0},p._renderCellPosition=function(t2,e2){let i2=e2*(this.options.rightToLeft?-1:1);this.options.percentPosition&&(i2*=this.size.innerWidth/t2.size.width);let s2=this.getPositionValue(i2);t2.element.style.transform=`translateX( ${s2} )`},p._sizeCells=function(t2){t2.forEach((t3=>t3.getSize()))},p.updateSlides=function(){if(this.slides=[],!this.cells.length)return;let{beginMargin:t2,endMargin:e2}=this,i2=new o(t2,e2,this.cellAlign);this.slides.push(i2);let s2=this._getCanCellFit();this.cells.forEach(((n2,l2)=>{if(!i2.cells.length)return void i2.addCell(n2);let r2=i2.outerWidth-i2.firstMargin+(n2.size.outerWidth-n2.size[e2]);s2(l2,r2)||(i2.updateTarget(),i2=new o(t2,e2,this.cellAlign),this.slides.push(i2)),i2.addCell(n2)})),i2.updateTarget(),this.updateSelectedSlide()},p._getCanCellFit=function(){let{groupCells:t2}=this.options;if(!t2)return()=>!1;if(typeof t2=="number"){let e3=parseInt(t2,10);return t3=>t3%e3!=0}let e2=1,i2=typeof t2=="string"&&t2.match(/^(\d+)%$/);i2&&(e2=parseInt(i2[1],10)/100);let s2=(this.size.innerWidth+1)*e2;return(t3,e3)=>e3<=s2},p._init=p.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},p.getSize=function(){this.size=i(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};let f={left:0,center:.5,right:1};p.setCellAlign=function(){let{cellAlign:t2,rightToLeft:e2}=this.options,i2=f[t2];this.cellAlign=i2!==void 0?i2:t2,e2&&(this.cellAlign=1-this.cellAlign)},p.setGallerySize=function(){if(!this.options.setGallerySize)return;let t2=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=`${t2}px`},p._updateWrapShiftCells=function(){if(this.isWrapping=this.getIsWrapping(),!this.isWrapping)return;this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);let t2=this.cursorPosition,e2=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t2,e2,-1);let i2=this.size.innerWidth-this.cursorPosition;this.afterShiftCells=this._getGapCells(i2,0,1)},p.getIsWrapping=function(){let{wrapAround:t2}=this.options;if(!t2||this.slides.length<2)return!1;if(t2!=="fill")return!0;let e2=this.slideableWidth-this.size.innerWidth;if(e2>this.size.innerWidth)return!0;for(let t3 of this.cells)if(t3.size.outerWidth>e2)return!1;return!0},p._getGapCells=function(t2,e2,i2){let s2=[];for(;t2>0;){let n2=this.cells[e2];if(!n2)break;s2.push(n2),e2+=i2,t2-=n2.size.outerWidth}return s2},p._containSlides=function(){if(!(this.options.contain&&!this.isWrapping&&this.cells.length))return;let t2=this.slideableWidth-this.getLastCell().size[this.endMargin];if(t2<this.size.innerWidth)this.slides.forEach((e2=>{e2.target=t2*this.cellAlign}));else{let e2=this.cursorPosition+this.cells[0].size[this.beginMargin],i2=t2-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach((t3=>{t3.target=Math.max(t3.target,e2),t3.target=Math.min(t3.target,i2)}))}},p.dispatchEvent=function(t2,e2,i2){let s2=e2?[e2].concat(i2):i2;if(this.emitEvent(t2,s2),a&&this.$element){let s3=t2+=this.options.namespaceJQueryEvents?".flickity":"";if(e2){let i3=new a.Event(e2);i3.type=t2,s3=i3}this.$element.trigger(s3,i2)}};const g=["dragStart","dragMove","dragEnd","pointerDown","pointerMove","pointerEnd","staticClick"];let m=p.emitEvent;p.emitEvent=function(t2,e2){if(t2==="staticClick"){let t3=this.getParentCell(e2[0].target),i3=t3&&t3.element,s3=t3&&this.cells.indexOf(t3);e2=e2.concat(i3,s3)}if(m.call(this,t2,e2),!g.includes(t2)||!a||!this.$element)return;t2+=this.options.namespaceJQueryEvents?".flickity":"";let i2=e2.shift(0),s2=new a.Event(i2);s2.type=t2,this.$element.trigger(s2,e2)},p.select=function(t2,e2,i2){if(!this.isActive||(t2=parseInt(t2,10),this._wrapSelect(t2),(this.isWrapping||e2)&&(t2=s.modulo(t2,this.slides.length)),!this.slides[t2]))return;let n2=this.selectedIndex;this.selectedIndex=t2,this.updateSelectedSlide(),i2?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t2]),t2!==n2&&this.dispatchEvent("change",null,[t2])},p._wrapSelect=function(t2){if(!this.isWrapping)return;const{selectedIndex:e2,slideableWidth:i2,slides:{length:n2}}=this;if(!this.isDragSelect){let i3=s.modulo(t2,n2),o2=Math.abs(i3-e2),l2=Math.abs(i3+n2-e2),r2=Math.abs(i3-n2-e2);l2<o2?t2+=n2:r2<o2&&(t2-=n2)}t2<0?this.x-=i2:t2>=n2&&(this.x+=i2)},p.previous=function(t2,e2){this.select(this.selectedIndex-1,t2,e2)},p.next=function(t2,e2){this.select(this.selectedIndex+1,t2,e2)},p.updateSelectedSlide=function(){let t2=this.slides[this.selectedIndex];t2&&(this.unselectSelectedSlide(),this.selectedSlide=t2,t2.select(),this.selectedCells=t2.cells,this.selectedElements=t2.getCellElements(),this.selectedCell=t2.cells[0],this.selectedElement=this.selectedElements[0])},p.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},p.selectInitialIndex=function(){let t2=this.options.initialIndex;if(this.isInitActivated)return void this.select(this.selectedIndex,!1,!0);if(t2&&typeof t2=="string"&&this.queryCell(t2))return void this.selectCell(t2,!1,!0);let e2=0;t2&&this.slides[t2]&&(e2=t2),this.select(e2,!1,!0)},p.selectCell=function(t2,e2,i2){let s2=this.queryCell(t2);if(!s2)return;let n2=this.getCellSlideIndex(s2);this.select(n2,e2,i2)},p.getCellSlideIndex=function(t2){let e2=this.slides.find((e3=>e3.cells.includes(t2)));return this.slides.indexOf(e2)},p.getCell=function(t2){for(let e2 of this.cells)if(e2.element===t2)return e2},p.getCells=function(t2){return(t2=s.makeArray(t2)).map((t3=>this.getCell(t3))).filter(Boolean)},p.getCellElements=function(){return this.cells.map((t2=>t2.element))},p.getParentCell=function(t2){let e2=this.getCell(t2);if(e2)return e2;let i2=t2.closest(".flickity-slider > *");return this.getCell(i2)},p.getAdjacentCellElements=function(t2,e2){if(!t2)return this.selectedSlide.getCellElements();e2=e2===void 0?this.selectedIndex:e2;let i2=this.slides.length;if(1+2*t2>=i2)return this.getCellElements();let n2=[];for(let o2=e2-t2;o2<=e2+t2;o2++){let t3=this.isWrapping?s.modulo(o2,i2):o2,e3=this.slides[t3];e3&&(n2=n2.concat(e3.getCellElements()))}return n2},p.queryCell=function(t2){return typeof t2=="number"?this.cells[t2]:(typeof t2=="string"&&!t2.match(/^[#.]?[\d/]/)&&(t2=this.element.querySelector(t2)),this.getCell(t2))},p.uiChange=function(){this.emitEvent("uiChange")},p.onresize=function(){this.watchCSS(),this.resize()},s.debounceMethod(u,"onresize",150),p.resize=function(){if(!this.isActive||this.isAnimating||this.isDragging)return;this.getSize(),this.isWrapping&&(this.x=s.modulo(this.x,this.slideableWidth)),this.positionCells(),this._updateWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");let t2=this.selectedElements&&this.selectedElements[0];this.selectCell(t2,!1,!0)},p.watchCSS=function(){this.options.watchCSS&&(r(this.element,":after").content.includes("flickity")?this.activate():this.deactivate())},p.onkeydown=function(t2){let{activeElement:e2}=document,i2=u.keyboardHandlers[t2.key];this.options.accessibility&&e2&&i2&&this.focusableElems.some((t3=>e2===t3))&&i2.call(this)},u.keyboardHandlers={ArrowLeft:function(){this.uiChange(),this[this.options.rightToLeft?"next":"previous"]()},ArrowRight:function(){this.uiChange(),this[this.options.rightToLeft?"previous":"next"]()}},p.focus=function(){this.element.focus({preventScroll:!0})},p.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach((t2=>t2.destroy())),this.viewport.remove(),this.element.append(...this.slider.children),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},p.destroy=function(){this.deactivate(),t.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),a&&this.$element&&a.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete d[this.guid]},Object.assign(p,l),u.data=function(t2){if(t2=s.getQueryElement(t2))return d[t2.flickityGUID]},s.htmlInit(u,"flickity");let{jQueryBridget:v}=t;return a&&v&&v("flickity",u,a),u.setJQuery=function(t2){a=t2},u.Cell=n,u.Slide=o,u})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e(t,require("./core"),require("unidragger"),require("fizzy-ui-utils")):t.Flickity=e(t,t.Flickity,t.Unidragger,t.fizzyUIUtils)})(typeof window<"u"?window:this,(function(t,e,i,s){Object.assign(e.defaults,{draggable:">1",dragThreshold:3});let n=e.prototype;function o(){return{x:t.pageXOffset,y:t.pageYOffset}}return Object.assign(n,i.prototype),n.touchActionValue="",e.create.drag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),this.on("pointerDown",this.handlePointerDown),this.on("pointerUp",this.handlePointerUp),this.on("pointerDown",this.handlePointerDone),this.on("dragStart",this.handleDragStart),this.on("dragMove",this.handleDragMove),this.on("dragEnd",this.handleDragEnd),this.on("staticClick",this.handleStaticClick)},n.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},n.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},n.updateDraggable=function(){this.options.draggable===">1"?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.element.classList.toggle("is-draggable",this.isDraggable)},n._uiChangeDrag=function(){delete this.isFreeScrolling},n.handlePointerDown=function(e2){if(!this.isDraggable)return void this.bindActivePointerEvents(e2);let i2=e2.type==="touchstart",s2=e2.pointerType==="touch",n2=e2.target.matches("input, textarea, select");i2||s2||n2||e2.preventDefault(),n2||this.focus(),document.activeElement!==this.element&&document.activeElement.blur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=o(),t.addEventListener("scroll",this),this.bindActivePointerEvents(e2)},n.hasDragStarted=function(t2){return Math.abs(t2.x)>this.options.dragThreshold},n.handlePointerUp=function(){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down")},n.handlePointerDone=function(){t.removeEventListener("scroll",this),delete this.pointerDownScroll},n.handleDragStart=function(){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),t.removeEventListener("scroll",this))},n.handleDragMove=function(t2,e2,i2){if(!this.isDraggable)return;t2.preventDefault(),this.previousDragX=this.dragX;let s2=this.options.rightToLeft?-1:1;this.isWrapping&&(i2.x%=this.slideableWidth);let n2=this.dragStartPosition+i2.x*s2;if(!this.isWrapping){let t3=Math.max(-this.slides[0].target,this.dragStartPosition);n2=n2>t3?.5*(n2+t3):n2;let e3=Math.min(-this.getLastSlide().target,this.dragStartPosition);n2=n2<e3?.5*(n2+e3):n2}this.dragX=n2,this.dragMoveTime=new Date},n.handleDragEnd=function(){if(!this.isDraggable)return;let{freeScroll:t2}=this.options;t2&&(this.isFreeScrolling=!0);let e2=this.dragEndRestingSelect();if(t2&&!this.isWrapping){let t3=this.getRestingPosition();this.isFreeScrolling=-t3>this.slides[0].target&&-t3<this.getLastSlide().target}else t2||e2!==this.selectedIndex||(e2+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.isWrapping,this.select(e2),delete this.isDragSelect},n.dragEndRestingSelect=function(){let t2=this.getRestingPosition(),e2=Math.abs(this.getSlideDistance(-t2,this.selectedIndex)),i2=this._getClosestResting(t2,e2,1),s2=this._getClosestResting(t2,e2,-1);return i2.distance<s2.distance?i2.index:s2.index},n._getClosestResting=function(t2,e2,i2){let s2=this.selectedIndex,n2=1/0,o2=this.options.contain&&!this.isWrapping?(t3,e3)=>t3<=e3:(t3,e3)=>t3<e3;for(;o2(e2,n2)&&(s2+=i2,n2=e2,(e2=this.getSlideDistance(-t2,s2))!==null);)e2=Math.abs(e2);return{distance:n2,index:s2-i2}},n.getSlideDistance=function(t2,e2){let i2=this.slides.length,n2=this.options.wrapAround&&i2>1,o2=n2?s.modulo(e2,i2):e2,l=this.slides[o2];if(!l)return null;let r=n2?this.slideableWidth*Math.floor(e2/i2):0;return t2-(l.target+r)},n.dragEndBoostSelect=function(){if(this.previousDragX===void 0||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;let t2=this.getSlideDistance(-this.dragX,this.selectedIndex),e2=this.previousDragX-this.dragX;return t2>0&&e2>0?1:t2<0&&e2<0?-1:0},n.onscroll=function(){let t2=o(),e2=this.pointerDownScroll.x-t2.x,i2=this.pointerDownScroll.y-t2.y;(Math.abs(e2)>3||Math.abs(i2)>3)&&this.pointerDone()},e})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e(require("./core")):e(t.Flickity)})(typeof window<"u"?window:this,(function(t){const e="http://www.w3.org/2000/svg";function i(t2,e2,i2){this.increment=t2,this.direction=e2,this.isPrevious=t2==="previous",this.isLeft=e2==="left",this._create(i2)}i.prototype._create=function(t2){let e2=this.element=document.createElement("button");e2.className=`flickity-button flickity-prev-next-button ${this.increment}`;let i2=this.isPrevious?"Previous":"Next";e2.setAttribute("type","button"),e2.setAttribute("aria-label",i2),this.disable();let s2=this.createSVG(i2,t2);e2.append(s2)},i.prototype.createSVG=function(t2,i2){let s2=document.createElementNS(e,"svg");s2.setAttribute("class","flickity-button-icon"),s2.setAttribute("viewBox","0 0 100 100");let n=document.createElementNS(e,"title");n.append(t2);let o=document.createElementNS(e,"path"),l=(function(t3){if(typeof t3=="string")return t3;let{x0:e2,x1:i3,x2:s3,x3:n2,y1:o2,y2:l2}=t3;return`M ${e2}, 50 11 L ${i3}, ${o2+50} 12 L ${s3}, ${l2+50} 13 L ${n2}, 50 14 L ${s3}, ${50-l2} 15 L ${i3}, ${50-o2} 16 Z`})(i2);return o.setAttribute("d",l),o.setAttribute("class","arrow"),this.isLeft||o.setAttribute("transform","translate(100, 100) rotate(180)"),s2.append(n,o),s2},i.prototype.enable=function(){this.element.removeAttribute("disabled")},i.prototype.disable=function(){this.element.setAttribute("disabled",!0)},Object.assign(t.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),t.create.prevNextButtons=function(){if(!this.options.prevNextButtons)return;let{rightToLeft:t2,arrowShape:e2}=this.options,s2=t2?"right":"left",n=t2?"left":"right";this.prevButton=new i("previous",s2,e2),this.nextButton=new i("next",n,e2),this.focusableElems.push(this.prevButton.element),this.focusableElems.push(this.nextButton.element),this.handlePrevButtonClick=()=>{this.uiChange(),this.previous()},this.handleNextButtonClick=()=>{this.uiChange(),this.next()},this.on("activate",this.activatePrevNextButtons),this.on("select",this.updatePrevNextButtons)};let s=t.prototype;return s.updatePrevNextButtons=function(){let t2=this.slides.length?this.slides.length-1:0;this.updatePrevNextButton(this.prevButton,0),this.updatePrevNextButton(this.nextButton,t2)},s.updatePrevNextButton=function(t2,e2){if(this.isWrapping&&this.slides.length>1)return void t2.enable();let i2=this.selectedIndex!==e2;t2[i2?"enable":"disable"](),!i2&&document.activeElement===t2.element&&this.focus()},s.activatePrevNextButtons=function(){this.prevButton.element.addEventListener("click",this.handlePrevButtonClick),this.nextButton.element.addEventListener("click",this.handleNextButtonClick),this.element.append(this.prevButton.element,this.nextButton.element),this.on("deactivate",this.deactivatePrevNextButtons)},s.deactivatePrevNextButtons=function(){this.prevButton.element.remove(),this.nextButton.element.remove(),this.prevButton.element.removeEventListener("click",this.handlePrevButtonClick),this.nextButton.element.removeEventListener("click",this.handleNextButtonClick),this.off("deactivate",this.deactivatePrevNextButtons)},t.PrevNextButton=i,t})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e(require("./core"),require("fizzy-ui-utils")):e(t.Flickity,t.fizzyUIUtils)})(typeof window<"u"?window:this,(function(t,e){function i(){this.holder=document.createElement("div"),this.holder.className="flickity-page-dots",this.dots=[]}i.prototype.setDots=function(t2){let e2=t2-this.dots.length;e2>0?this.addDots(e2):e2<0&&this.removeDots(-e2)},i.prototype.addDots=function(t2){let e2=new Array(t2).fill().map(((t3,e3)=>{let i2=document.createElement("button");i2.setAttribute("type","button");let s2=e3+1+this.dots.length;return i2.className="flickity-page-dot",i2.textContent=`View slide ${s2}`,i2}));this.holder.append(...e2),this.dots=this.dots.concat(e2)},i.prototype.removeDots=function(t2){this.dots.splice(this.dots.length-t2,t2).forEach((t3=>t3.remove()))},i.prototype.updateSelected=function(t2){this.selectedDot&&(this.selectedDot.classList.remove("is-selected"),this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[t2],this.selectedDot.classList.add("is-selected"),this.selectedDot.setAttribute("aria-current","step"))},t.PageDots=i,Object.assign(t.defaults,{pageDots:!0}),t.create.pageDots=function(){this.options.pageDots&&(this.pageDots=new i,this.handlePageDotsClick=this.onPageDotsClick.bind(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))};let s=t.prototype;return s.activatePageDots=function(){this.pageDots.setDots(this.slides.length),this.focusableElems.push(...this.pageDots.dots),this.pageDots.holder.addEventListener("click",this.handlePageDotsClick),this.element.append(this.pageDots.holder)},s.onPageDotsClick=function(t2){let e2=this.pageDots.dots.indexOf(t2.target);e2!==-1&&(this.uiChange(),this.select(e2))},s.updateSelectedPageDots=function(){this.pageDots.updateSelected(this.selectedIndex)},s.updatePageDots=function(){this.pageDots.dots.forEach((t2=>{e.removeFrom(this.focusableElems,t2)})),this.pageDots.setDots(this.slides.length),this.focusableElems.push(...this.pageDots.dots)},s.deactivatePageDots=function(){this.pageDots.holder.remove(),this.pageDots.holder.removeEventListener("click",this.handlePageDotsClick)},t.PageDots=i,t})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e(require("./core")):e(t.Flickity)})(typeof window<"u"?window:this,(function(t){function e(t2,e2){this.autoPlay=t2,this.onTick=e2,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}e.prototype.play=function(){this.state!=="playing"&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},e.prototype.tick=function(){if(this.state!=="playing")return;let t2=typeof this.autoPlay=="number"?this.autoPlay:3e3;this.clear(),this.timeout=setTimeout((()=>{this.onTick(),this.tick()}),t2)},e.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},e.prototype.clear=function(){clearTimeout(this.timeout)},e.prototype.pause=function(){this.state==="playing"&&(this.state="paused",this.clear())},e.prototype.unpause=function(){this.state==="paused"&&this.play()},e.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},e.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},Object.assign(t.defaults,{pauseAutoPlayOnHover:!0}),t.create.player=function(){this.player=new e(this.options.autoPlay,(()=>{this.next(!0)})),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)};let i=t.prototype;return i.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},i.playPlayer=function(){this.player.play()},i.stopPlayer=function(){this.player.stop()},i.pausePlayer=function(){this.player.pause()},i.unpausePlayer=function(){this.player.unpause()},i.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},i.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},i.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},t.Player=e,t})),(function(t,e){typeof module=="object"&&module.exports?module.exports=e(require("./core"),require("fizzy-ui-utils")):e(t.Flickity,t.fizzyUIUtils)})(typeof window<"u"?window:this,(function(t,e){let i=t.prototype;return i.insert=function(t2,e2){let i2=this._makeCells(t2);
16if(!i2||!i2.length)return;let s=this.cells.length;e2=e2===void 0?s:e2;let n=(function(t3){let e3=document.createDocumentFragment();return t3.forEach((t4=>e3.appendChild(t4.element))),e3})(i2),o=e2===s;if(o)this.slider.appendChild(n);else{let t3=this.cells[e2].element;this.slider.insertBefore(n,t3)}if(e2===0)this.cells=i2.concat(this.cells);else if(o)this.cells=this.cells.concat(i2);else{let t3=this.cells.splice(e2,s-e2);this.cells=this.cells.concat(i2).concat(t3)}this._sizeCells(i2),this.cellChange(e2),this.positionSliderAtSelected()},i.append=function(t2){this.insert(t2,this.cells.length)},i.prepend=function(t2){this.insert(t2,0)},i.remove=function(t2){let i2=this.getCells(t2);if(!i2||!i2.length)return;let s=this.cells.length-1;i2.forEach((t3=>{t3.remove();let i3=this.cells.indexOf(t3);s=Math.min(i3,s),e.removeFrom(this.cells,t3)})),this.cellChange(s),this.positionSliderAtSelected()},i.cellSizeChange=function(t2){let e2=this.getCell(t2);if(!e2)return;e2.getSize();let i2=this.cells.indexOf(e2);this.cellChange(i2)},i.cellChange=function(t2){let e2=this.selectedElement;this._positionCells(t2),this._updateWrapShiftCells(),this.setGallerySize();let i2=this.getCell(e2);i2&&(this.selectedIndex=this.getCellSlideIndex(i2)),this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex),this.emitEvent("cellChange",[t2]),this.select(this.selectedIndex)},t}));/*! 17 * Flickity asNavFor v3.0.0 18 * enable asNavFor for Flickity 19 */(function(e,t){typeof module=="object"&&module.exports?module.exports=t(require("flickity"),require("fizzy-ui-utils")):e.Flickity=t(e.Flickity,e.fizzyUIUtils)})(window,function(e,t){e.create.asNavFor=function(){this.on("activate",this.activateAsNavFor),this.on("deactivate",this.deactivateAsNavFor),this.on("destroy",this.destroyAsNavFor);let e2=this.options.asNavFor;e2&&setTimeout(()=>{this.setNavCompanion(e2)})};let n=e.prototype;return n.setNavCompanion=function(n2){n2=t.getQueryElement(n2);let i=e.data(n2);i&&i!==this&&(this.navCompanion=i,this.onNavCompanionSelect=(()=>{this.navCompanionSelect()}),i.on("select",this.onNavCompanionSelect),this.on("staticClick",this.onNavStaticClick),this.navCompanionSelect(!0))},n.navCompanionSelect=function(e2){let t2=this.navCompanion&&this.navCompanion.selectedCells;if(!t2)return;let n2=t2[0],i=this.navCompanion.cells.indexOf(n2),o=i+t2.length-1,a=Math.floor((s=i,l=o,c=this.navCompanion.cellAlign,(l-s)*c+s));var s,l,c;if(this.selectCell(a,!1,e2),this.removeNavSelectedElements(),a>=this.cells.length)return;let v=this.cells.slice(i,o+1);this.navSelectedElements=v.map(e3=>e3.element),this.changeNavSelectedClass("add")},n.changeNavSelectedClass=function(e2){this.navSelectedElements.forEach(function(t2){t2.classList[e2]("is-nav-selected")})},n.activateAsNavFor=function(){this.navCompanionSelect(!0)},n.removeNavSelectedElements=function(){this.navSelectedElements&&(this.changeNavSelectedClass("remove"),delete this.navSelectedElements)},n.onNavStaticClick=function(e2,t2,n2,i){typeof i=="number"&&this.navCompanion.selectCell(i)},n.deactivateAsNavFor=function(){this.removeNavSelectedElements()},n.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("select",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},e});/*! 20 * Flickity is-next/is-previous v3.0.0 21 */(function(e,i){typeof module=="object"&&module.exports?module.exports=i(require("flickity"),require("fizzy-ui-utils")):e.Flickity=i(e.Flickity,e.fizzyUIUtils)})(window,function(e,i){return e.create._createPrevNextCells=function(){this.on("select",this._setPrevNextCells)},e.prototype._setPrevNextCells=function(){function e2(e3,i3,t2){e3&&e3.getCellElements().forEach(function(e4){e4.classList[i3](t2)})}e2(this.previousSlide,"remove","is-previous"),e2(this.nextSlide,"remove","is-next");var i2=fizzyUIUtils.modulo(this.selectedIndex-1,this.slides.length),t=fizzyUIUtils.modulo(this.selectedIndex+1,this.slides.length);this.previousSlide=this.slides[i2],this.nextSlide=this.slides[t],e2(this.previousSlide,"add","is-previous"),e2(this.nextSlide,"add","is-next")},e}),(function(e,t){typeof module=="object"&&module.exports?module.exports=t(require("flickity"),require("fizzy-ui-utils")):t(e.Flickity,e.fizzyUIUtils)})(typeof window<"u"?window:this,function(e,n){let t=e.Slide;t.prototype.renderFadePosition=function(){}
21,t.prototype.setOpacity=function(t2){this.cells.forEach(e2=>{e2.element.style.opacity=t2})},e.create.fade=function(){this.fadeIndex=this.selectedIndex,this.prevSelectedIndex=this.selectedIndex,this.on("select",this.onSelectFade),this.on("dragEnd",this.onDragEndFade),this.on("settle",this.onSettleFade),this.on("activate",this.onActivateFade),this.on("deactivate",this.onDeactivateFade)};let i=e.prototype,s=i.updateSlides;i.updateSlides=function(){s.apply(this,arguments),this.options.fade&&this.slides.forEach((e2,t2)=>{var i2=e2.target-e2.x,s2=e2.cells[0].x;e2.cells.forEach(e3=>{var t3=e3.x-s2-i2;this._renderCellPosition(e3,t3)}),t2=t2===this.selectedIndex?1:0,e2.setOpacity(t2)})},i.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1),this.prevSelectedIndex=this.selectedIndex},i.onSettleFade=function(){delete this.didDragEnd,this.options.fade&&(this.selectedSlide.setOpacity(1),this.slides[this.fadeIndex]&&this.fadeIndex!==this.selectedIndex&&this.slides[this.fadeIndex].setOpacity(0))},i.onDragEndFade=function(){this.didDragEnd=!0},i.onActivateFade=function(){this.options.fade&&this.element.classList.add("is-fade")},i.onDeactivateFade=function(){this.options.fade&&(this.element.classList.remove("is-fade"),this.slides.forEach(e2=>{e2.setOpacity("")}))};let d=i.positionSlider;i.positionSlider=function(){this.options.fade?(this.fadeSlides(),this.dispatchScrollEvent()):d.apply(this,arguments)};let a=i.positionSliderAtSelected;i.positionSliderAtSelected=function(){this.options.fade&&this.setTranslateX(0),a.apply(this,arguments)},i.fadeSlides=function(){if(!(this.slides.length<2)){var s2=this.getFadeIndexes();let e2=this.slides[s2.a],t2=this.slides[s2.b];var d2=this.wrapDifference(e2.target,t2.target),n2=this.wrapDifference(e2.target,-this.x);n2/=d2,e2.setOpacity(1-n2),t2.setOpacity(n2);let i2=s2.a;this.isDragging&&(i2=.5<n2?s2.a:s2.b),this.fadeHideIndex!==void 0&&this.fadeHideIndex!==i2&&this.fadeHideIndex!==s2.a&&this.fadeHideIndex!==s2.b&&this.slides[this.fadeHideIndex].setOpacity(0),this.fadeHideIndex=i2}},i.getFadeIndexes=function(){return this.isDragging||this.didDragEnd?this.options.wrapAround?this.getFadeDragWrapIndexes():this.getFadeDragLimitIndexes():{a:this.fadeIndex,b:this.selectedIndex}},i.getFadeDragWrapIndexes=function(){let e2=this.slides.map(function(e3,t3){return this.getSlideDistance(-this.x,t3)}
21,this),t2=e2.map(function(e3){return Math.abs(e3)});var i2=Math.min(...t2),s2=t2.indexOf(i2),d2=e2[s2],i2=this.slides.length,d2=0<=d2?1:-1;return{a:s2,b:n.modulo(s2+d2,i2)}},i.getFadeDragLimitIndexes=function(){let t2=0;for(let e2=0;e2<this.slides.length-1;e2++){var i2=this.slides[e2];if(-this.x<i2.target)break;t2=e2}return{a:t2,b:t2+1}},i.wrapDifference=function(e2,t2){let i2=t2-e2;return this.options.wrapAround?(t2=i2+this.slideableWidth,e2=i2-this.slideableWidth,Math.abs(t2)<Math.abs(i2)&&(i2=t2),Math.abs(e2)<Math.abs(i2)&&(i2=e2),i2):i2};let h=i._updateWrapShiftCells;i._updateWrapShiftCells=function(){this.options.fade?this.isWrapping=this.getIsWrapping():h.apply(this,arguments)};let l=i.shiftWrapCells;return i.shiftWrapCells=function(){this.options.fade||l.apply(this,arguments)},e});const ON_CHANGE_DEBOUNCE_TIMER=300,PUB_SUB_EVENTS={cartUpdate:"cart-update",quantityUpdate:"quantity-update",variantChange:"variant-change",cartError:"cart-error"};let subscribers={};function subscribe(eventName,callback){return subscribers[eventName]===void 0&&(subscribers[eventName]=[]),subscribers[eventName]=[...subscribers[eventName],callback],function(){subscribers[eventName]=subscribers[eventName].filter(cb=>cb!==callback)}}function publish(eventName,data){subscribers[eventName]&&subscribers[eventName].forEach(callback=>{callback(data)})}/* 22@license 23 Be Yours by roartheme (https://roartheme.co) 24 Access unminified JS in assets/global.js 25 26 Use this event listener to run your own JS outside of this file. 27 Documentation - https://roartheme.co/blogs/beyours/javascript-events-for-developers 28 29 document.addEventListener('page:loaded', function() { 30 // Page has loaded and theme assets are ready 31 }); 32*/window.theme=window.theme||{},theme.config={mqlSmall:!1,mediaQuerySmall:"screen and (max-width: 749px)",isTouch:!!("ontouchstart"in window||window.DocumentTouch&&window.document instanceof DocumentTouch||window.navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),rtl:document.documentElement.getAttribute("dir")==="rtl"},theme.Currency=(function(){const moneyFormat="${{amount}}";function formatMoney(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));let value="";const placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||moneyFormat;function formatWithDelimiters(number,precision,thousands,decimal){if(thousands=thousands||",",decimal=decimal||".",isNaN(number)||number===null)return 0;number=(number/100).toFixed(precision);const parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break;case"amount_no_decimals_with_space_separator":value=formatWithDelimiters(cents,0," ");break;case"amount_with_apostrophe_separator":value=formatWithDelimiters(cents,2,"'");break}return formatString.replace(placeholderRegex,value)}function getBaseUnit(variant){if(variant&&!(!variant.unit_price_measurement||!variant.unit_price_measurement.reference_value))return variant.unit_price_measurement.reference_value===1?variant.unit_price_measurement.reference_unit:variant.unit_price_measurement.reference_value+variant.unit_price_measurement.reference_unit}return{formatMoney,getBaseUnit}})(),theme.initWhenVisible=function(options){const threshold=options.threshold?options.threshold:0;new IntersectionObserver((entries,observer2)=>{entries.forEach(entry=>{entry.isIntersecting&&typeof options.callback=="function"&&(options.callback(),observer2.unobserve(entry.target))})},{rootMargin:`0px 0px ${threshold}px 0px`}).observe(options.element)},(function(){const mql=window.matchMedia(theme.config.mediaQuerySmall);theme.config.mqlSmall=mql.matches,mql.onchange=e=>{e.matches?(theme.config.mqlSmall=!0,document.dispatchEvent(new CustomEvent("matchSmall"))):(theme.config.mqlSmall=!1,document.dispatchEvent(new CustomEvent("unmatchSmall")))},window.addEventListener("beforeunload",()=>{document.body.classList.add("unloading")}),window.addEventListener("DOMContentLoaded",()=>{document.body.classList.add("loaded"),document.dispatchEvent(new CustomEvent("page:loaded"))}),window.addEventListener("pageshow",event=>{event.persisted&&document.body.classList.remove("unloading")});
32function viewportHeight(){window.matchMedia("(max-width: 990px)")&&document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`),setHeaderBottomPosition()}if(window.addEventListener("resize",viewportHeight),window.addEventListener("DOMContentLoaded",viewportHeight),document.body.getAttribute("data-page-rendering")!==null){const observer=new IntersectionObserver((entries,_observer)=>{entries.forEach(entry=>{const el=entry.target;entry.intersectionRatio!=0&&(el.markedVisible||(el.attributeStyleMap&&el.attributeStyleMap.set("content-visibility","visible"),el.markedVisible=!0))})},{rootMargin:"50px 0px 100px 0px"});document.querySelectorAll(".shopify-section + .shopify-section").forEach(section=>{observer.observe(section)})}})(),(function(){var e=!1,t;document.body.addEventListener("touchstart",function(i){if(!i.target.closest(".flickity-slider"))return e=!1;e=!0,t={x:i.touches[0].pageX,y:i.touches[0].pageY}}),document.body.addEventListener("touchmove",function(i){if(e&&i.cancelable){var n={x:i.touches[0].pageX-t.x,y:i.touches[0].pageY-t.y};Math.abs(n.x)>Flickity.defaults.dragThreshold&&i.preventDefault()}},{passive:!1})})();function isStorageSupported(type){if(window.self!==window.top)return!1;const testKey="beyours:test";let storage;type==="session"&&(storage=window.sessionStorage),type==="local"&&(storage=window.localStorage);try{return storage.setItem(testKey,"1"),storage.removeItem(testKey),!0}catch{return!1}}function checkScrollbar(){const rect=document.body.getBoundingClientRect();return Math.round(rect.left+rect.right)<window.innerWidth}function setScrollbarWidth(){if(checkScrollbar()){const element=document.createElement("span");element.className="modal-scrollbar-measure",document.body.appendChild(element);const width=element.getBoundingClientRect().width-element.clientWidth;document.body.removeChild(element),document.documentElement.style.setProperty("--scrollbar-width",`${width}px`)}}function setHeaderBottomPosition(){const header=document.querySelector(".shopify-section-header");header&&document.documentElement.style.setProperty("--header-bottom-position",`${parseInt(header.getBoundingClientRect().bottom)}px`)}function getFocusableElements(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}const trapFocusHandlers={};function trapFocus(container,elementToFocus=container){var elements=getFocusableElements(container),first=elements[0],last=elements[elements.length-1];removeTrapFocus(),trapFocusHandlers.focusin=event=>{event.target!==container&&event.target!==last&&event.target!==first||document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(event){(event.code?event.code.toUpperCase():event.key.toUpperCase())==="TAB"&&(event.target===last&&!event.shiftKey&&(event.preventDefault(),first.focus()),(event.target===container||event.target===first)&&event.shiftKey&&(event.preventDefault(),last.focus()))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),elementToFocus&&elementToFocus.focus(),elementToFocus.tagName==="INPUT"&&["search","text","email","url"].includes(elementToFocus.type)&&elementToFocus.value&&elementToFocus.setSelectionRange(0,elementToFocus.value.length)}try{document.querySelector(":focus-visible")}catch{focusVisiblePolyfill()}function focusVisiblePolyfill(){const navKeys=["ARROWUP","ARROWDOWN","ARROWLEFT","ARROWRIGHT","TAB","ENTER","SPACE","ESCAPE","HOME","END","PAGEUP","PAGEDOWN"];let currentFocusedElement=null,mouseClick=null;window.addEventListener("keydown",event=>{navKeys.includes(event.code.toUpperCase())&&(mouseClick=!1)}),window.addEventListener("mousedown",event=>{mouseClick=!0}),window.addEventListener("focus",()=>{currentFocusedElement&¤tFocusedElement.classList.remove("focused"),!mouseClick&&(currentFocusedElement=document.activeElement,currentFocusedElement.classList.add("focused"))},!0)}function pauseAllMedia(){document.querySelectorAll('video-section[data-type="youtube"]:not([data-video-hero]) iframe').forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll('video-section[data-type="vimeo"]:not([data-video-hero]) iframe').forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video").forEach(video=>
32{video.closest("[data-video-hero]")||video.pause()}),document.querySelectorAll("product-model").forEach(model=>{model.modelViewerUI&&model.modelViewerUI.pause()})}function removeTrapFocus(elementToFocus=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),elementToFocus&&elementToFocus.focus()}function onKeyUpEscape(event){if((event.code?event.code.toUpperCase():event.key.toUpperCase())!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");if(!openDetailsElement)return;const summaryElement=openDetailsElement.querySelector("summary");openDetailsElement.removeAttribute("open"),summaryElement.setAttribute("aria-expanded",!1),summaryElement.focus()}function filterShopifyEvent(event,domElement,callback){let executeCallback=!1;event.type.includes("shopify:section")?domElement.hasAttribute("data-section-id")&&domElement.getAttribute("data-section-id")===event.detail.sectionId&&(executeCallback=!0):event.type.includes("shopify:block")&&event.target===domElement&&(executeCallback=!0),executeCallback&&callback(event)}function debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}function fetchConfig(type="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${type}`}}}const serializeForm=form=>{const obj={},formData=new FormData(form);for(const key of formData.keys()){const regex=/(?:^(properties\[))(.*?)(?:\]$)/;regex.test(key)?(obj.properties=obj.properties||{},obj.properties[regex.exec(key)[2]]=formData.get(key)):obj[key]=formData.get(key)}return JSON.stringify(obj)};typeof window.Shopify>"u"&&(window.Shopify={}),Shopify.bind=function(fn,scope){return function(){return fn.apply(scope,arguments)}},Shopify.setSelectorByValue=function(selector,value){for(var i=0,count=selector.options.length;i<count;i++){var option=selector.options[i];if(value==option.value||value==option.innerHTML)return selector.selectedIndex=i,i}},Shopify.addListener=function(target,eventName,callback){target.addEventListener?target.addEventListener(eventName,callback,!1):target.attachEvent("on"+eventName,callback)},Shopify.postLink=function(path,options){options=options||{};const method=options.method||"post",params=options.parameters||{},form=document.createElement("form");form.setAttribute("method",method),form.setAttribute("action",path);for(const key in params){const hiddenField=document.createElement("input");hiddenField.setAttribute("type","hidden"),hiddenField.setAttribute("name",key),hiddenField.setAttribute("value",params[key]),form.appendChild(hiddenField)}document.body.appendChild(form),form.submit(),document.body.removeChild(form)},Shopify.postLink2=function(path,options){options=options||{};const method=options.method||"post",params=options.parameters||{},form=document.createElement("form");form.setAttribute("method",method),form.setAttribute("action",path);for(const key in params)for(const index in params[key])for(const key2 in params[key][index]){const hiddenField=document.createElement("input");hiddenField.setAttribute("type","hidden"),hiddenField.setAttribute("name",`${key}[${index}][${key2}]`),hiddenField.setAttribute("value",params[key][index][key2]),form.appendChild(hiddenField)}document.body.appendChild(form),form.submit(),document.body.removeChild(form)},Shopify.CountryProvinceSelector=function(country_domid,province_domid,options){this.countryEl=document.getElementById(country_domid),this.provinceEl=document.getElementById(province_domid),this.provinceContainer=document.getElementById(options.hideElement||province_domid),Shopify.addListener(this.countryEl,"change",Shopify.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.CountryProvinceSelector.prototype={initCountry:function(){var value=this.countryEl.getAttribute("data-default");Shopify.setSelectorByValue(this.countryEl,value),this.countryHandler()},initProvince:function(){var value=this.provinceEl.getAttribute("data-default");value&&this.provinceEl.options.length>0&&Shopify.setSelectorByValue(this.provinceEl,value)},countryHandler:function(e){var opt=this.countryEl.options[this.countryEl.selectedIndex],raw=opt.getAttribute("data-provinces"),provinces=JSON.parse(raw);if(this.clearOptions(this.provinceEl),provinces&&provinces.length==0)this.provinceContainer.style.display="none";else{for(var i=0;i<provinces.length;i++){var opt=document.createElement("option");opt.value=provinces[i][0],opt.innerHTML=provinces[i][1],this.provinceEl.appendChild(opt)}this.provinceContainer.style.display=""}},clearOptions:function(selector){for(;selector.firstChild;)selector.removeChild(selector.firstChild)},setOptions:function(selector,values){for(var i=0,count=values.length;i<values.length;i++){var opt=document.createElement("option");opt.value=values[i],opt.innerHTML=values[i],selector.appendChild(opt)}}};class QuantityInput extends HTMLElement{constructor(){super(),this.init()}init(){this.input=this.querySelector("input"),this.changeEvent=ne
32w Event("change",{bubbles:!0}),this.querySelectorAll("button").forEach(button=>button.addEventListener("click",this.onButtonClick.bind(this))),this.input.addEventListener("focus",this.onInputFocus.bind(this))}onButtonClick(event){event.preventDefault();const previousValue=this.input.value;event.target.name==="plus"?this.input.stepUp():this.input.stepDown(),previousValue!==this.input.value&&this.input.dispatchEvent(this.changeEvent)}onInputFocus(){this.input.select()}}customElements.define("quantity-input",QuantityInput);class DrawerCloseButton extends HTMLElement{constructor(){super(),this.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("drawer:force-close",{bubbles:!0,cancelable:!0,composed:!0})))}}customElements.define("drawer-close-button",DrawerCloseButton);class MenuDrawer extends HTMLElement{constructor(){super(),this.classes={open:"menu-drawer--open",opening:"menu-drawer--opening",closing:"menu-drawer--closing"},this.mainDetailsToggle=this.querySelector("details"),this.addEventListener("keyup",this.onKeyUp.bind(this)),this.addEventListener("focusout",this.onFocusOut.bind(this)),this.bindEvents()}setClasses(classes){this.classes=classes}bindEvents(){this.querySelectorAll("summary").forEach(summary=>summary.addEventListener("click",this.onSummaryClick.bind(this))),this.querySelectorAll("button[data-close]").forEach(button=>button.addEventListener("click",this.onCloseButtonClick.bind(this))),this.addEventListener("drawer:force-close",event=>{event.stopPropagation(),this.closeMenuDrawer(event)})}onKeyUp(event){if((event.code?event.code.toUpperCase():event.key.toUpperCase())!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");openDetailsElement&&(openDetailsElement===this.mainDetailsToggle?this.closeMenuDrawer(event,this.mainDetailsToggle.querySelector("summary")):this.closeSubmenu(openDetailsElement))}onSummaryClick(event){const summaryElement=event.currentTarget,detailsElement=summaryElement.parentNode,isOpen=detailsElement.hasAttribute("open"),reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)");function addTrapFocus(){trapFocus(summaryElement.nextElementSibling,detailsElement.querySelector("button")),summaryElement.nextElementSibling.removeEventListener("transitionend",addTrapFocus)}detailsElement===this.mainDetailsToggle?(isOpen&&event.preventDefault(),isOpen?this.closeMenuDrawer(event,summaryElement):this.openMenuDrawer(summaryElement)):setTimeout(()=>{detailsElement.classList.add("menu-opening"),summaryElement.setAttribute("aria-expanded",!0),!reducedMotion||reducedMotion.matches?addTrapFocus():summaryElement.nextElementSibling.addEventListener("transitionend",addTrapFocus)},100)}openMenuDrawer(summaryElement=!1){setScrollbarWidth(),setHeaderBottomPosition(),summaryElement&&(summaryElement.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,summaryElement)),setTimeout(()=>{this.onBodyClickEvent=this.onBodyClickEvent||this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickEvent)}),document.body.classList.add(this.classes.opening),this.openAnimation(),setTimeout(()=>{this.mainDetailsToggle.setAttribute("open",""),setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")},10)})}closeMenuDrawer(event,elementToFocus=!1){event!==void 0&&(this.mainDetailsToggle.querySelectorAll("details").forEach(details=>{details.removeAttribute("open"),details.classList.remove("menu-opening")}),this.mainDetailsToggle.classList.remove("menu-opening"),this.mainDetailsToggle.classList.add("menu-closing"),removeTrapFocus(elementToFocus),document.body.removeEventListener("click",this.onBodyClickEvent),document.body.classList.remove(this.classes.open),document.body.classList.add(this.classes.closing),this.closeAnimation(this.mainDetailsToggle),this.dispatchEvent(new CustomEvent("close")),document.dispatchEvent(new CustomEvent("menudrawer:close")))}onFocusOut(){setTimeout(()=>{this.mainDetailsToggle.hasAttribute("open")&&!this.mainDetailsToggle.contains(document.activeElement)&&this.closeMenuDrawer()})}onCloseButtonClick(event){const target=event.currentTarget;if(target.classList.contains("noclose"))return;const detailsElement=target.closest("details");this.closeSubmenu(detailsElement)}closeSubmenu(detailsElement){detailsElement.classList.remove("menu-opening"),detailsElement.querySelector("summary").setAttribute("aria-expanded",!1),removeTrapFocus(),this.closeAnimation(detailsElement)}openAnimation(){let animationStart;const handleAnimation=time=>{animationStart===void 0&&(animationStart=time),time-animationStart<400?window.requestAnimationFrame(handleAnimation):(document.body.classList.remove(this.classes.opening),document.body.classList.add(this.classes.open))};window.requestAnimationFrame(handleAnimation)}closeAnimation(detailsElement){let animationStart;const handleAnimation=time=>{animationStart===void 0&&(animationStart=time),time-animationStart<400?window.requestAnimationFrame(handleAnimation):(detailsElement===this.mainDetailsToggle&&(document.body.classList.remove(this.classes.closing),detailsElement.classList.remove("menu-closing")),detailsElement.removeAttribute("open"),detailsElement.closest("details[open]")&&trapFocus(detail
32sElement.closest("details[open]"),detailsElement.querySelector("summary")))};window.requestAnimationFrame(handleAnimation)}onBodyClick(event){this.contains(event.target)||this.closeMenuDrawer(event)}}customElements.define("menu-drawer",MenuDrawer);class CartDrawer extends MenuDrawer{constructor(){super(),this.setClasses({open:"mini-cart--open",opening:"mini-cart--opening",closing:"mini-cart--closing"})}}customElements.define("cart-drawer",CartDrawer);class FacetDrawer extends MenuDrawer{constructor(){super(),this.dataset.desktop=="true"?this.setClasses({open:"facet-horizontal--open",opening:"facet-horizontal--opening",closing:"facet-horizontal--closing"}):this.setClasses({open:"facet-drawer--open",opening:"facet-drawer--opening",closing:"facet-drawer--closing"})}}customElements.define("facet-drawer",FacetDrawer);class HeaderDrawer extends MenuDrawer{constructor(){super(),this.setClasses({open:"menu-mobile--open",opening:"menu-mobile--opening",closing:"menu-mobile--closing"})}}customElements.define("header-drawer",HeaderDrawer);class ModalDialog extends HTMLElement{constructor(){super(),this.querySelector('[id^="ModalClose-"]').addEventListener("click",this.hide.bind(this)),this.addEventListener("keyup",event=>{(event.code?event.code.toUpperCase():event.key.toUpperCase())==="ESCAPE"&&this.hide()}),this.classList.contains("media-modal")?this.addEventListener("pointerup",event=>{event.pointerType==="mouse"&&!event.target.closest("deferred-media, product-model")&&this.hide()}):this.addEventListener("click",event=>{event.target.nodeName==="MODAL-DIALOG"&&this.hide()})}show(opener){setScrollbarWidth(),this.openedBy=opener;const popup=this.querySelector(".template-popup");document.body.classList.add("overflow-hidden"),this.setAttribute("open",""),popup&&popup.loadContent(),trapFocus(this,this.querySelector('[role="dialog"]')),window.pauseAllMedia()}hide(){document.body.classList.remove("overflow-hidden"),this.removeAttribute("open"),removeTrapFocus(this.openedBy),window.pauseAllMedia()}}customElements.define("modal-dialog",ModalDialog);class ModalOpener extends HTMLElement{constructor(){super(),this.button=this.querySelector("button"),this.button&&this.button.addEventListener("click",()=>{const modal=document.querySelector(this.getAttribute("data-modal"));modal&&modal.show(this.button)})}}customElements.define("modal-opener",ModalOpener);class DeferredMedia extends HTMLElement{constructor(){super(),this.poster=this.querySelector('[id^="Deferred-Poster-"]'),this.poster&&this.poster.addEventListener("click",this.loadContent.bind(this))}loadContent(focus=!0){if(window.pauseAllMedia(),!this.getAttribute("loaded")){const content=document.createElement("div");if(content.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),content.querySelector("video-section")){const deferredElement=this.appendChild(content);focus&&deferredElement.focus(),deferredElement.nodeName=="VIDEO"&&deferredElement.getAttribute("autoplay")&&deferredElement.play()}else{this.setAttribute("loaded",!0);const deferredElement=this.appendChild(content.querySelector("video, model-viewer, iframe"));focus&&deferredElement.focus(),deferredElement.nodeName=="VIDEO"&&deferredElement.getAttribute("autoplay")&&deferredElement.play()}}}}customElements.define("deferred-media",DeferredMedia);class SliderComponent extends HTMLElement{constructor(){super(),this.slider=this.querySelector('[id^="Slider-"]'),this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.enableSliderLooping=!1,this.currentPageElement=this.querySelector(".slider-counter--current"),this.pageTotalElement=this.querySelector(".slider-counter--total"),this.prevButton=this.querySelector('button[name="previous"]'),this.nextButton=this.querySelector('button[name="next"]'),!(!this.slider||!this.nextButton)&&theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:200})}init(){new ResizeObserver(()=>this.initPages()).observe(this.slider),this.slider.addEventListener("scroll",this.update.bind(this)),this.prevButton.addEventListener("click",this.onButtonClick.bind(this)),this.nextButton.addEventListener("click",this.onButtonClick.bind(this))}initPages(){this.sliderItemsToShow=Array.from(this.sliderItems).filter(element=>element.clientWidth>0),!(this.sliderItemsToShow.length<2)&&(this.sliderItemOffset=this.sliderItemsToShow[1].offsetLeft-this.sliderItemsToShow[0].offsetLeft,this.slidesPerPage=Math.floor(this.slider.clientWidth/this.sliderItemOffset),this.totalPages=this.sliderItemsToShow.length-this.slidesPerPage+1,this.update())}resetPages(){this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.initPages()}update(){const previousPage=this.currentPage;if(this.currentPage=Math.round(this.slider.scrollLeft/this.sliderItemOffset)+1,this.currentPageElement&&this.pageTotalElement&&(this.currentPageElement.textContent=this.currentPage,this.pageTotalElement.textContent=this.totalPages),this.currentPage!=previousPage&&this.dispatchEvent(new CustomEvent("slideChanged",{detail:{currentPage:this.currentPage,currentElement:this.sliderItemsToShow[this.currentPage-1]}})),this.currentPage===1&&this.currentPage===this.totalPages?this.classList.add("slider--no-buttons"):this.classList.remove("slider--no-buttons"),this.enableSliderLooping)return;const isFirstSlide=this.currentPage===1,isLastSlide=this.currentPage===this.sliderItemsToShow.length;isFirstSlide||this.isSlideVisible(this.sliderItemsToShow[0])?this.prevButton.setAttribute("disabled","disabled"):this.prevButton.removeAttribute("disabled"),isLastSlide||this.isSlideVisible(this.sliderItemsToShow[this.sliderItemsToShow.length-1])?this.nextButton.setAttribute("disabled","disabled"):this.nextButton.removeAttribute("disabled")}isSlideVisible(element,offset=0){const lastVisibleSlide=this.slider.clientWidth+this.slider.scrollLeft-offset;return element.offsetLeft+element.clientWidth<=lastVisibleSlide&&element.offsetLeft>=this.slider.scrollLeft}onButtonClick(event){event.preventDefault();const step=event.currentTarget.dataset.step||1;this.slideScrollPosition=event.currentTarget.name==="next"?this.slider.scrollLeft+step*this.sliderItemOffset:this.slider.scrollLeft-step*this.sliderItemOffset,this.slideScrollPosition=theme.config.rtl?this.slideScrollPosition*-1:this.slideScrollPosition,this.slider.scrollTo({left:this.slideScrollPosition})}}customElements.define("slider-component",SliderComponent);class ThumbnailSlider extends SliderComponent{constructor(){super()}init(){super.init();const variantItems=this.querySelectorAll(".thumbnail-list_item--variant:not(.is-active)");if(this.slider.dataset.mediaCount=this.sliderItems.length-variantItems.length,this.querySelector("[data-gang-option]")){const inactiveGangItems=this.querySelectorAll("[data-gang-option]:not(.gang__active)");this.slider.dataset.mediaCount=this.sliderItems.length-inactiveGangItems.length}this.slider.dataset.mediaCount<2&&this.classList.add("hidden")}}customElements.define("thumbnail-slider",ThumbnailSlider);class QuoteSlider extends SliderComponent{constructor(){super()}
32update(){super.update(),this.currentPageElement&&this.pageTotalElement&&(this.sliderItems.forEach(element=>{element.removeAttribute("aria-current")}),this.sliderItemsToShow[this.currentPage-1].setAttribute("aria-current",!0))}}customElements.define("quote-slider",QuoteSlider);class ProductGallery extends SliderComponent{constructor(){super()}init(){super.init();const gallerySliderButtons=this.querySelector(".slider-buttons");if(gallerySliderButtons&&this.querySelector("[data-gang-option]")&&(this.querySelectorAll(".product__media-item.gang__active").length<2?gallerySliderButtons.classList.add("hidden"):gallerySliderButtons.classList.remove("hidden")),this.cursor=this.querySelector(".gallery-cursor"),!this.cursor)return;const images=this.querySelectorAll(".product__modal-opener--image");images.forEach(image=>image.addEventListener("mousemove",this.onMoveHandler.bind(this))),images.forEach(image=>image.addEventListener("mouseenter",this.onEnterHandler.bind(this))),images.forEach(image=>image.addEventListener("mouseleave",this.onLeaveHandler.bind(this)))}onMoveHandler(event){this.cursor.style.left=`${event.clientX-32}px`,this.cursor.style.top=`${event.clientY-32}px`}onEnterHandler(){this.cursor.classList.add("show")}onLeaveHandler(){this.cursor.classList.remove("show")}update(){if(super.update(),this.currentPageElement&&this.pageTotalElement){const currentElement=this.sliderItemsToShow[this.currentPage-1];currentElement&&this.slider.style.setProperty("--force-image-ratio-percent",currentElement.querySelector(".media").style.getPropertyValue("--image-ratio-percent"))}}goToFirstSlide(){this.slider.scrollTo({left:0})}}customElements.define("product-gallery",ProductGallery);class VariantSelects extends HTMLElement{constructor(){super(),this.addEventListener("change",this.onVariantChange),this.addEventListener("changeFromSelect",this.changeFromSelect),this.updateOptions(),this.updateMasterId(),this.setAvailability()}changeFromSelect(){this.updateOptions(),this.updateMasterId(),this.setAvailability()}onVariantChange(event){this.updateOptions(),this.updateMasterId(),this.toggleAddButton(!0,"",!1),this.updatePickupAvailability(),this.removeErrorMessage(),this.validateGang(),this.currentVariant?(this.gangOption?this.updateGangMedia():this.updateMedia(),this.updateURL(),this.updateVariantInput(),this.renderProductInfo(),this.setAvailability(),document.dispatchEvent(new CustomEvent("variant:change",{detail:{variant:this.currentVariant}}))):(this.toggleAddButton(!0,"",!0),this.setUnavailable(),this.setAvailabilityInUnavailable()),this.handleStickyCart(event.target)}handleStickyCart(target){if(!document.getElementById(`sticky-cart-${this.dataset.section}`))return;const attribute=target.getAttribute("name");if(document.querySelectorAll(`variant-radios[data-section="${this.dataset.section}"] [name="${attribute}"], variant-selects[data-section="${this.dataset.section}"] [name="${attribute}"]`).forEach(input=>{input.tagName==="INPUT"?input.checked=input.value===target.value:input.value=target.value}),!this.currentVariant||!this.currentVariant.featured_media)return;const image=document.querySelector(".sticky-cart__content-image img");image&&(image.srcset=`${this.currentVariant.featured_media.preview_image.src}&width=70 1x, ${this.currentVariant.featured_media.preview_image.src}&width=140 2x`,image.src=`${this.currentVariant.featured_media.preview_image.src}&width=70`,image.width=70,image.height=Math.ceil(70/this.currentVariant.featured_media.preview_image.aspect_ratio))}updateOptions(){this.options=Array.from(this.querySelectorAll("select"),select=>select.value),document.querySelector("variant-radios").querySelector(`input[value="${this.options.join()}"]`).checked=!0,console.log("This",this.options.join())}updateMasterId(){this.currentVariant=this.getVariantData()?.find(variant=>!variant.options.map((option,index)=>this.options[index]===option).includes(!1))}validateGang(){const mediaItemWithGang=document.querySelector(`#shopify-section-${this.dataset.section} [data-gang-option], quick-view-drawer details[open] [data-gang-option]`);mediaItemWithGang&&(this.gangOption=mediaItemWithGang.dataset.gangOption)}updateGangMedia(){if(!this.gangOption)return;const variantInputWrapper=this.querySelector('.variant-input-wrapper[data-option-slug="'+this.gangOption+'"]');if(variantInputWrapper?this.gangIndex=variantInputWrapper.dataset.optionIndex:this.gangOption=null,!this.currentVariant)return;const mediaGallery=document.getElementById(`MediaGallery-${this.dataset.section}`),gangValue=this.getSlug(this.currentVariant[this.gangIndex]);if(this.currentGangValue!==gangValue){document.querySelectorAll(`#shopify-section-${this.dataset.section} [data-gang-connect], quick-view-drawer details[open] [data-gang-connect]`).forEach(function(media){media.classList.remove("gang__active")}),this.currentGangValue=gangValue;var gangConnect=this.gangOption+"_"+gangValue;const newMedias=document.querySelectorAll(`#shopify-section-${this.dataset.section} [data-gang-connect="${gangConnect}"], quick-view-drawer details[open] [data-gang-connect="${gangConnect}"]`);if(!newMedias.length)return;
32Array.from(newMedias).reverse().forEach(function(newMedia){newMedia.classList.add("gang__active");let parent=newMedia.parentElement;parent.firstChild!=newMedia&&(parent.prepend(newMedia),parent.classList.add("product__media-no-animate"))});const thumbnailSlider=document.getElementById(`GalleryThumbnails-${this.dataset.section}`);if(thumbnailSlider){const inactiveItems=thumbnailSlider.querySelectorAll(".thumbnail-list__item:not(.gang__active)");thumbnailSlider.slider.dataset.mediaCount=thumbnailSlider.sliderItems.length-inactiveItems.length,thumbnailSlider.slider.dataset.mediaCount<2?thumbnailSlider.classList.add("hidden"):thumbnailSlider.classList.remove("hidden"),thumbnailSlider.resetPages()}if(!mediaGallery){const productGallery=document.querySelector(`#shopify-section-${this.dataset.section} product-gallery, quick-view-drawer details[open] product-gallery`);productGallery&&(productGallery.resetPages(),productGallery.goToFirstSlide())}const gallerySliderButtons=document.querySelector(`#shopify-section-${this.dataset.section} product-gallery .slider-buttons, quick-view-drawer details[open] product-gallery .slider-buttons`);gallerySliderButtons&&(document.querySelectorAll(`#shopify-section-${this.dataset.section} product-gallery .product__media-item.gang__active, quick-view-drawer details[open] product-gallery .product__media-item.gang__active`).length<2?gallerySliderButtons.classList.add("hidden"):gallerySliderButtons.classList.remove("hidden"))}if(!this.currentVariant.featured_media){document.querySelectorAll(`#shopify-section-${this.dataset.section} product-gallery .product__media-item.gang__active.is-active, quick-view-drawer details[open] product-gallery .product__media-item.gang__active.is-active`).length||document.querySelector(`#shopify-section-${this.dataset.section} product-gallery .product__media-item.gang__active, quick-view-drawer details[open] product-gallery .product__media-item.gang__active`).classList.add("is-active");return}if(mediaGallery){const scrollIntoView=typeof this.dataset.noScroll>"u";mediaGallery.setActiveMedia(`${this.dataset.section}-${this.currentVariant.featured_media.id}`,!0,scrollIntoView)}const modalContent=document.querySelector(`#ProductModal-${this.dataset.section} .product-media-modal__content`);if(modalContent){const newMediaModal=modalContent.querySelector(`[data-media-id="${this.currentVariant.featured_media.id}"]`);modalContent.prepend(newMediaModal)}const thumbnailContent=document.querySelector(`#ProductThumbnails-${this.dataset.section}`);if(thumbnailContent){const newMediaThumbnail=thumbnailContent.querySelector(`[data-media-id="${this.currentVariant.featured_media.id}"]`);thumbnailContent.prepend(newMediaThumbnail)}}CJKDetect(someString){return someString.search("[\uAC00-\uD7A3]")>=0?"ko":someString.search("[\u3040-\u30FF]")>=0?"ja":someString.search("[\u4E00-\u9FFF]")>=0?"zh":"none"}getSlug(someString){return this.CJKDetect(someString)!="none"?someString:someString.toString().replace("\u0131","i").normalize("NFD").replace("-"," ").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 ]/g,"").replace(/\s+/g,"-")}updateMedia(){if(!this.currentVariant||!this.currentVariant.featured_media)return;const newMedia=document.querySelector(`[data-media-id="${this.dataset.section}-${this.currentVariant.featured_media.id}"]`);if(!newMedia)return;const parent=newMedia.parentElement;if(parent.firstChild==newMedia)return;parent.prepend(newMedia),parent.classList.add("product__media-no-animate");const mediaGallery=document.getElementById(`MediaGallery-${this.dataset.section}`);if(mediaGallery){const scrollIntoView=typeof this.dataset.noScroll>"u";mediaGallery.setActiveMedia(`${this.dataset.section}-${this.currentVariant.featured_media.id}`,!0,scrollIntoView)}const modalContent=document.querySelector(`#ProductModal-${this.dataset.section} .product-media-modal__content`);if(modalContent){const newMediaModal=modalContent.querySelector(`[data-media-id="${this.currentVariant.featured_media.id}"]`);modalContent.prepend(newMediaModal)}
32const thumbnailContent=document.querySelector(`#ProductThumbnails-${this.dataset.section}`);if(thumbnailContent){const newMediaThumbnail=thumbnailContent.querySelector(`[data-media-id="${this.currentVariant.featured_media.id}"]`);thumbnailContent.prepend(newMediaThumbnail)}}updateURL(){!this.currentVariant||this.dataset.updateUrl==="false"||window.history.replaceState({},"",`${this.dataset.url}?variant=${this.currentVariant.id}`)}updateVariantInput(){document.querySelectorAll(`#product-form-${this.dataset.section}, #product-form-installment-${this.dataset.section}, #product-form-${this.dataset.section}--alt`).forEach(productForm=>{const input=productForm.querySelector('input[name="id"]');input.value=this.currentVariant.id,input.dispatchEvent(new Event("change",{bubbles:!0}))})}updatePickupAvailability(){const pickUpAvailability=document.querySelector("pickup-availability");pickUpAvailability&&(this.currentVariant&&this.currentVariant.available?pickUpAvailability.fetchAvailability(this.currentVariant.id):(pickUpAvailability.removeAttribute("available"),pickUpAvailability.innerHTML=""))}removeErrorMessage(){const section=this.closest("section");if(!section)return;const productForm=section.querySelector("product-form");productForm&&productForm.handleErrorMessage()}renderProductInfo(){const sectionId=this.dataset.originalSection?this.dataset.originalSection:this.dataset.section;fetch(`${this.dataset.url}?variant=${this.currentVariant.id}§ion_id=${this.dataset.section}`).then(response=>response.text()).then(responseText=>{this.updateSKU(responseText),this.updatePrice(responseText),this.updatePriceAlt(responseText),this.updateColorName(responseText),this.updateInventoryStatus(responseText),this.currentVariant&&this.toggleAddButton(!this.currentVariant.available,window.variantStrings.soldOut),this.updateCustomLiquid(responseText),document.dispatchEvent(new CustomEvent("productInfo:loaded")),publish(PUB_SUB_EVENTS.variantChange,{data:{sectionId,variant:this.currentVariant}})}).catch(e=>{console.error(e)})}updateSKU(responseText){const id=`sku-${this.dataset.section}`,html=new DOMParser().parseFromString(responseText,"text/html"),destination=document.getElementById(id),source=html.getElementById(id);source&&destination&&(destination.innerHTML=source.innerHTML),destination&&destination.classList.remove("visibility-hidden")}updateCustomLiquid(responseText){const html=new DOMParser().parseFromString(responseText,"text/html"),destinations=document.querySelectorAll(`.custom__liquid-${this.dataset.section}`),sources=html.querySelectorAll(`.custom__liquid-${this.dataset.section}`);for(let i=0,clLength=destinations.length;i<clLength;i++)destinations[i].innerHTML=sources[i].innerHTML}updatePrice(responseText){const id=`price-${this.dataset.section}`,html=new DOMParser().parseFromString(responseText,"text/html"),destination=document.getElementById(id),source=html.getElementById(id);source&&destination&&(destination.innerHTML=source.innerHTML),destination&&destination.classList.remove("visibility-hidden")}updatePriceAlt(responseText){const id=`price-${this.dataset.section}--alt`,html=new DOMParser().parseFromString(responseText,"text/html"),destination=document.getElementById(id),source=html.getElementById(id);source&&destination&&(destination.innerHTML=source.innerHTML),destination&&destination.classList.remove("visibility-hidden")}updateColorName(responseText){const html=new DOMParser().parseFromString(responseText,"text/html");for(let index=1;index<=3;index++){const id=index>1?`color-${this.dataset.section}-${index}`:`color-${this.dataset.section}`,destination=document.getElementById(id),source=html.getElementById(id);source&&destination&&(destination.innerHTML=source.innerHTML),destination&&destination.classList.remove("visibility-hidden")}}updateInventoryStatus(responseText){const id=`inventory-${this.dataset.section}`,html=new DOMParser().parseFromString(responseText,"text/html"),destination=document.getElementById(id),source=html.getElementById(id);source&&destination&&(destination.innerHTML=source.innerHTML),destination&&destination.classList.remove("visibility-hidden")}toggleAddButton(disable=!0,text,modifyClass=!0){document.querySelectorAll(`#product-form-${this.dataset.section}, #product-form-${this.dataset.section}--alt`).forEach(productForm=>{const addButton=productForm.querySelector('[name="add"]');addButton&&(disable?(addButton.setAttribute("disabled",!0),text&&(addButton.textContent=text)):(addButton.removeAttribute("disabled"),addButton.textContent=addButton.dataset.preOrder==="true"?window.variantStrings.preOrder:window.variantStrings.addToCart))})}setUnavailable(){document.querySelectorAll(`#product-form-${this.dataset.section}, #product-form-${this.dataset.section}--alt`).forEach(productForm=>{const addButton=productForm.querySelector('[name="add"]');if(!addButton)return;addButton.textContent=window.variantStrings.unavailable;const price=document.getElementById(`price-${this.dataset.section}`);price&&price.classList.add("visibility-hidden");const priceAlt=document.getElementById(`price-${this.dataset.section}--alt`);priceAlt&&priceAlt.classList.add("visibility-hidden");const inventory=document.getElementById(`inventory-${this.dataset.section}`);inventory&&inventory.classList.add("visibility-hidden")})}getVariantData(){return this.variantData=this.variantData||JSON.parse(this.querySelector('[type="application/json"]').textContent),this.variantData}setAvailability(){if(!this.currentVariant)return;this.querySelectorAll(".variant-input-wrapper").forEach(group=>{this.disableVariantGroup(group)});const currentlySelectedValues=this.currentVariant.options.map((value,index)=>({value,index:`option${index+1}`})),initialOptions=this.createAvailableOptionsTree(this.variantData,currentlySelectedValues,this.currentVariant);for(var[option,values]of Object.entries(initialOptions))this.manageOptionState(option,values)}setAvailabilityInUnavailable(){this.querySelectorAll(".variant-input-wrapper").forEach(group=>{this.disableVariantGroup(group)});const currentlySelectedValues=this.options.map((value,index)=>({value,index:`option${index+1}`})),initialOptions=this.createAvailableOptionsTree(this.variantData,currentlySelectedValues,this.currentVariant);for(var[option,values]of Object.entries(initialOptions))this.manageOptionState(option,values)}enableVariantOption(group,obj){const value=obj.value.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g,"\\$1"),option=group.querySelector('option[value="'+value+'"]');option.disabled=!1,option.removeAttribute("data-hide-variant"),obj.soldOut&&this.hasAttribute("data-hide-oos-variants")&&option.setAttribute("data-hide-variant","")}disableVariantGroup(group){group.querySelectorAll("option").forEach(option=>{this.hasAttribute("data-hide-oos-variants")?option.setAttribute("data-hide-variant",""):option.disabled=!0})}manageOptionState(option,values){const group=this.querySelector('.variant-input-wrapper[data-option-index="'+option+'"]');
32values.forEach(obj=>{this.enableVariantOption(group,obj)})}createAvailableOptionsTree(variants,currentlySelectedValues){return variants.reduce((options,variant)=>(Object.keys(options).forEach(index=>{if(variant[index]===null)return;let entry=options[index].find(option=>option.value===variant[index]);typeof entry>"u"&&(entry={value:variant[index],soldOut:!0},options[index].push(entry));const currentOption1=currentlySelectedValues.find(({value,index:index2})=>index2==="option1"),currentOption2=currentlySelectedValues.find(({value,index:index2})=>index2==="option2");switch(index){case"option1":entry.soldOut=entry.soldOut&&variant.available?!1:entry.soldOut;break;case"option2":currentOption1&&variant.option1===currentOption1.value&&(entry.soldOut=entry.soldOut&&variant.available?!1:entry.soldOut);case"option3":currentOption1&&variant.option1===currentOption1.value&¤tOption2&&variant.option2===currentOption2.value&&(entry.soldOut=entry.soldOut&&variant.available?!1:entry.soldOut)}}),options),{option1:[],option2:[],option3:[]})}}customElements.define("variant-selects",VariantSelects);class VariantRadios extends VariantSelects{constructor(){super()}updateOptions(){const fieldsets=Array.from(this.querySelectorAll("fieldset"));this.options=fieldsets.map(fieldset=>Array.from(fieldset.querySelectorAll("input")).find(radio=>radio.checked).value);let event=new Event("changeFromSelect");document.querySelector("variant-selects").querySelector("select").value=this.options.join(),document.querySelector("variant-selects").dispatchEvent(event)}enableVariantOption(group,obj){const value=obj.value.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g,"\\$1"),input=group.querySelector('input[data-option-value="'+value+'"]');input&&(input.removeAttribute("disabled"),input.removeAttribute("data-crossout"),input.removeAttribute("data-hide-variant"),obj.soldOut&&(this.hasAttribute("data-hide-oos-variants")?input.setAttribute("data-hide-variant",""):this.hasAttribute("data-swatch-cross")&&(this.hasAttribute("data-swatch-oos-click")?input.setAttribute("data-crossout",""):input.setAttribute("disabled",""))))}disableVariantGroup(group){group.querySelectorAll("input").forEach(input=>{this.hasAttribute("data-hide-oos-variants")?input.setAttribute("data-hide-variant",""):input.setAttribute("disabled","")})}}customElements.define("variant-radios",VariantRadios);class ProductForm extends HTMLElement{constructor(){super(),this.miniCart=document.querySelector("mini-cart"),this.form=this.querySelector("form"),this.form.querySelector("[name=id]").disabled=!1,this.form.addEventListener("submit",this.onSubmitHandler.bind(this)),this.hideErrors=this.dataset.hideErrors==="true"}onSubmitHandler(evt){if(document.body.classList.contains("template-cart")||!window.shopSettings.cartDrawer)return;evt.preventDefault();const submitButton=this.querySelector('[type="submit"]');if(submitButton.classList.contains("loading"))return;this.handleErrorMessage(),submitButton.setAttribute("aria-disabled",!0),submitButton.classList.add("loading");const config=fetchConfig("javascript");config.headers["X-Requested-With"]="XMLHttpRequest",delete config.headers["Content-Type"];const formData=new FormData(this.form);this.miniCart&&formData.append("sections",this.miniCart.getSectionsToRender().map(section=>section.id)),formData.append("sections_url",window.location.pathname),config.body=formData,fetch(`${window.routes.cart_add_url}`,config).then(response=>response.json()).then(response=>{if(response.status){publish(PUB_SUB_EVENTS.cartError,{source:"product-form",productVariantId:formData.get("id"),errors:response.errors||response.description,message:response.message}),this.handleErrorMessage(response.description),this.error=!0;return}this.error||publish(PUB_SUB_EVENTS.cartUpdate,{source:"product-form",productVariantId:formData.get("id")}),this.error=!1,this.miniCart&&this.miniCart.renderContents(response)}).catch(e=>{console.error(e)}).finally(()=>{submitButton.classList.remove("loading"),submitButton.removeAttribute("aria-disabled")})}handleErrorMessage(errorMessage=!1){if(this.errorMessageWrapper=this.errorMessageWrapper||this.querySelector(".product-form__error-message-wrapper"),this.errorMessageWrapper){if(this.hideErrors)return;this.errorMessage=this.errorMessage||this.errorMessageWrapper.querySelector(".product-form__error-message"),this.errorMessageWrapper.toggleAttribute("hidden",!errorMessage),errorMessage&&(this.errorMessage.textContent=errorMessage)}else errorMessage&&alert(errorMessage)}}customElements.define("product-form",ProductForm);class ProgressBar extends HTMLElement{constructor(){super(),theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:0})}init(){setTimeout(()=>{const quantity=parseInt(this.dataset.quantity);this.style.setProperty("--progress-bar-width",`${quantity*100/30}%`)},1e3)}}customElements.define("progress-bar",ProgressBar);class FormState extends HTMLElement{constructor(){super(),this.formInputs=this.querySelectorAll("input,select,textarea"),this.form=this.querySelector("form"),this.formInputs.forEac
32h(input=>{input.addEventListener("input",this.onInputChange.bind(this)),input.addEventListener("blur",this.onInputChange.bind(this))}),this.form&&this.form.addEventListener("submit",this.onSubmitHandler.bind(this))}onInputChange(event){this.handleInputCheck(event.target)}onSubmitHandler(event){let valid=!0;if(this.formInputs.forEach(input=>{this.handleInputCheck(input)||(valid=!1)}),!valid){event.preventDefault();return}}handleInputCheck(input){return input.classList.contains("required")?input.value.length===0||input.value===input.dataset.empty?(input.classList.remove("valid"),input.classList.add("invalid"),!1):(input.classList.remove("invalid"),input.classList.add("valid"),!0):!0}}customElements.define("form-state",FormState);class ListMenuItem extends HTMLElement{constructor(){super(),this.listMenuHover=this.closest("menu-drawer").querySelector("list-menu-hover"),this.addEventListener("mouseenter",()=>{this.listMenuHover.open({title:this.dataset.title,url:this.dataset.url,image:this.dataset.image,description:this.dataset.description})})}}customElements.define("list-menu-item",ListMenuItem);class ListMenuHover extends HTMLElement{constructor(){super()}open(obj){let html="";(obj.image.length>0||obj.description.length>0)&&(html+=`<a href="${obj.url}" class="hover-collection${obj.image.length>0?"":" hover-collection--no-image"}">`,html+='<figure class="hover-collection__image"'+(obj.image.length>0?`style="background-image:url(${obj.image})"`:"")+"></figure>",html+='<div class="hover-collection__content">',html+=`<span class="hover-collection__title h4">${obj.title}</span>`,html+=obj.description.length>0?`<div class="hover-collection__description">${obj.description}</div>`:"",html+="</div>",html+="</a>"),this.innerHTML=html}close(){this.innerHTML=""}}customElements.define("list-menu-hover",ListMenuHover);class TransparentHeader extends HTMLElement{constructor(){super();const header=document.querySelector(".shopify-section-header");header.classList.add("transparent-header"),this.dataset.showSeparator=="true"&&header.classList.add("transparent-separator")}}customElements.define("transparent-header",TransparentHeader);class AddToCart extends HTMLElement{constructor(){super(),this.miniCart=document.querySelector("mini-cart"),this.addEventListener("click",this.onClickHandler.bind(this))}onClickHandler(){const variantId=this.dataset.variantId;if(variantId){if(document.body.classList.contains("template-cart")||!window.shopSettings.cartDrawer){Shopify.postLink(window.routes.cart_add_url,{parameters:{id:variantId,quantity:1}});return}this.setAttribute("disabled",!0),this.classList.add("loading");const sections=this.miniCart?this.miniCart.getSectionsToRender().map(section=>section.id):[],body=JSON.stringify({id:variantId,quantity:1,sections,sections_url:window.location.pathname});fetch(`${window.routes.cart_add_url}`,{...fetchConfig("javascript"),body}).then(response=>response.json()).then(parsedState=>{parsedState.status===422?document.dispatchEvent(new CustomEvent("ajaxProduct:error",{detail:{errorMessage:parsedState.description}})):(this.miniCart&&this.miniCart.renderContents(parsedState),document.dispatchEvent(new CustomEvent("ajaxProduct:added",{detail:{product:parsedState}})))}).catch(e=>{console.error(e)}).finally(()=>{this.classList.remove("loading"),this.removeAttribute("disabled")})}}}customElements.define("add-to-cart",AddToCart);class PriceMoney extends HTMLElement{constructor(){super(),this.shouldInit()&&this.init()}shouldInit(){return!(document.body.dataset.priceSuperscript===void 0||window.shopSettings.moneyFormat.toLowerCase().indexOf("class=")!==-1)}init(){const currencies_using_comma_decimals="ANG,ARS,BRL,BYN,BYR,CLF,CLP,COP,CRC,CZK,DKK,EUR,HRK,HUF,IDR,ISK,MZN,NOK,PLN,RON,RUB,SEK,TRY,UYU,VES,VND".split(","),symbol=window.shopSettings.moneyFormat.replace(/\{{.*}}/,"").trim(),bdi=this.querySelector("bdi"),price=bdi.textContent.replace(window.shopSettings.isoCode,"");let html=price.replace(" ",""),money_symbol_decimal=".";if(currencies_using_comma_decimals.includes(window.shopSettings.isoCode)&&(money_symbol_decimal=","),price.includes(money_symbol_decimal))if(price.lastIndexOf(symbol)+symbol.length===price.length){const price_without_symbol=price.slice(0,price.lastIndexOf(symbol)),price_without_decimal=price.slice(0,price.lastIndexOf(money_symbol_decimal)),decimal=price_without_symbol.replace(price_without_decimal,"").trim();html=html.replace(decimal,`<sup class="price__suffix">${decimal}</sup>`)}else{const price_without_decimal=price.slice(0,price.lastIndexOf(money_symbol_decimal)),decimal=price.replace(price_without_decimal,"").trim();html=html.replace(decimal,`<sup class="price__suffix">${decimal}</sup>`)}html=html.replace(symbol,`<span class="price__prefix">${symbol}</span>
32`),window.shopSettings.currencyCode&&(html=html+" "+window.shopSettings.isoCode),bdi.innerHTML=html}}customElements.define("price-money",PriceMoney);class SlideshowComponent extends HTMLElement{constructor(){super(),this.elements={small:this.querySelector(".slideshow__left"),content:this.querySelector(".slideshow__content"),large:this.querySelector(".slideshow__right")},this.settings={autorotate:this.dataset.autorotate=="true",autorotateSpeed:parseInt(this.dataset.autorotateSpeed),slidesSmall:this.elements.small.querySelectorAll(".slideshow__image"),slidesLarge:this.elements.large.querySelectorAll(".slideshow__image")},theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:600}),this.matchMedia()}init(){setTimeout(()=>{this.flickitySmall=new Flickity(this.elements.small,{accessibility:!1,rightToLeft:theme.config.rtl,prevNextButtons:!1,pageDots:!1,wrapAround:!0,draggable:!1,setGallerySize:!1,autoPlay:this.settings.autorotate?this.settings.autorotateSpeed:!1}),this.flickityContent=new Flickity(this.elements.content,{accessibility:!1,rightToLeft:theme.config.rtl,prevNextButtons:!0,pageDots:!0,wrapAround:!0,draggable:!!theme.config.mqlSmall,asNavFor:this.elements.small,adaptiveHeight:!0,arrowShape:"M29.043 19.756l-28.125 28.125c-0.605 0.606-0.918 1.406-0.918 2.031s0.305 1.599 0.916 2.209l28.125 28.125c1.221 1.221 3.199 1.221 4.418 0s1.221-3.199 0-4.418l-22.793-22.793h86.209c1.727 0 3.125-1.398 3.125-2.949 0-1.727-1.398-3.125-3.125-3.125h-86.211l22.793-22.793c1.221-1.221 1.221-3.199 0-4.418s-3.203-1.217-4.414 0.006z",on:{ready:()=>{const prevNextButtons=this.querySelectorAll(".flickity-button");prevNextButtons&&prevNextButtons.forEach(button=>{button.setAttribute("tabindex","-1")})}}}),this.flickityLarge=new Flickity(this.elements.large,{accessibility:!1,rightToLeft:theme.config.rtl,prevNextButtons:!1,pageDots:!1,wrapAround:!0,draggable:!0,setGallerySize:!1,asNavFor:this.elements.content,dragThreshold:10}),this.bindEvents()})}bindEvents(){this.flickitySmall.on("scroll",()=>{this.flickitySmall.slides.forEach((slide,i)=>{const flickity=this.flickitySmall,image=this.settings.slidesSmall[i];let x=0;image&&(i===0?x=Math.abs(flickity.x)>flickity.slidesWidth?flickity.slidesWidth+flickity.x+flickity.slides[flickity.slides.length-1].outerWidth+slide.target:slide.target+flickity.x:i===flickity.slides.length-1?x=Math.abs(flickity.x)+flickity.slides[i].outerWidth<flickity.slidesWidth?slide.target-flickity.slidesWidth+flickity.x-flickity.slides[i].outerWidth:slide.target+flickity.x:x=slide.target+flickity.x,!theme.config.isTouch&&!theme.config.rtl&&(image.style.transform="translateX("+x*(-1/2)+"px)"))})}),this.flickityLarge.on("scroll",()=>{this.flickityLarge.slides.forEach((slide,i)=>{const flickity=this.flickityLarge,image=this.settings.slidesLarge[i];let x=0;image&&(i===0?x=Math.abs(flickity.x)>flickity.slidesWidth?flickity.slidesWidth+flickity.x+flickity.slides[flickity.slides.length-1].outerWidth+slide.target:slide.target+flickity.x:i===flickity.slides.length-1?x=Math.abs(flickity.x)+flickity.slides[i].outerWidth<flickity.slidesWidth?slide.target-flickity.slidesWidth+flickity.x-flickity.slides[i].outerWidth:slide.target+flickity.x:x=slide.target+flickity.x,!theme.config.isTouch&&!theme.config.rtl&&(image.style.transform="translateX("+x*(-1/2)+"px)"))})}),this.elements.content.querySelector(".flickity-button.next").addEventListener("click",()=>{this.flickitySmall&&this.flickitySmall.next(),this.stopPlayer()}),this.elements.content.querySelector(".flickity-button.previous").addEventListener("click",()=>{this.flickitySmall&&this.flickitySmall.previous(),this.stopPlayer()}),this.elements.content.querySelectorAll(".flickity-page-dot").forEach(button=>{button.addEventListener("click",()=>{this.stopPlayer()})});let currentIndex=null,swipeDirection=null;this.flickityLarge.on("dragMove",(_event,_pointer,moveVector)=>{currentIndex=this.flickityLarge.selectedIndex,swipeDirection=this.getSwipeDirection(moveVector),this.stopPlayer()}),this.flickityLarge.on("dragEnd",()=>{this.flickityLarge.selectedIndex!==currentIndex&&(swipeDirection==="left"?this.flickitySmall.
32next():this.flickitySmall.previous())})}stopPlayer(){this.settings.autorotate&&this.flickitySmall&&this.flickitySmall.stopPlayer()}getSwipeDirection(moveVector){return moveVector.x>0?"right":"left"}matchMedia(){document.addEventListener("matchSmall",()=>{this.unload(),this.init()}),document.addEventListener("unmatchSmall",()=>{this.unload(),this.init()})}unload(){this.flickitySmall&&typeof this.flickitySmall.destroy=="function"&&this.flickitySmall.destroy(),this.flickityContent&&typeof this.flickityContent.destroy=="function"&&this.flickityContent.destroy(),this.flickityLarge&&typeof this.flickityLarge.destroy=="function"&&this.flickityLarge.destroy()}}customElements.define("slideshow-component",SlideshowComponent);class TestimonialsComponent extends HTMLElement{constructor(){super(),this.dataset.slider=="true"&&(this.settings={autorotate:this.dataset.autorotate=="true",autorotateSpeed:parseInt(this.dataset.autorotateSpeed)},this.slider=this.querySelector(".testimonial__list"),this.previews=this.querySelector(".testimonial__previews"),theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:600}),theme.initWhenVisible({element:this,callback:this.update.bind(this),threshold:0}))}init(){setTimeout(()=>{this.slider&&(this.flickity=new Flickity(this.slider,{accessibility:!1,rightToLeft:theme.config.rtl,prevNextButtons:!0,arrowShape:"M29.043 19.756l-28.125 28.125c-0.605 0.606-0.918 1.406-0.918 2.031s0.305 1.599 0.916 2.209l28.125 28.125c1.221 1.221 3.199 1.221 4.418 0s1.221-3.199 0-4.418l-22.793-22.793h86.209c1.727 0 3.125-1.398 3.125-2.949 0-1.727-1.398-3.125-3.125-3.125h-86.211l22.793-22.793c1.221-1.221 1.221-3.199 0-4.418s-3.203-1.217-4.414 0.006z",pageDots:!1,wrapAround:!0,draggable:!0,cellAlign:"center",autoPlay:this.settings.autorotate?this.settings.autorotateSpeed:!1,pauseAutoPlayOnHover:!0,asNavFor:this.previews})),this.flickityNav=new Flickity(this.previews,{accessibility:!1,rightToLeft:theme.config.rtl,prevNextButtons:!this.flickity,arrowShape:this.flickity?"":"M29.043 19.756l-28.125 28.125c-0.605 0.606-0.918 1.406-0.918 2.031s0.305 1.599 0.916 2.209l28.125 28.125c1.221 1.221 3.199 1.221 4.418 0s1.221-3.199 0-4.418l-22.793-22.793h86.209c1.727 0 3.125-1.398 3.125-2.949 0-1.727-1.398-3.125-3.125-3.125h-86.211l22.793-22.793c1.221-1.221 1.221-3.199 0-4.418s-3.203-1.217-4.414 0.006z",pageDots:!1,wrapAround:!0,selectedAttraction:.2,friction:.8,adaptiveHeight:!0}),this.flickityNav.previous(),this.settings.autorotate&&this.flickity.pausePlayer(),this.flickity&&this.flickity.on("staticClick",(_event,_pointer,_cellElement,cellIndex)=>{typeof cellIndex=="number"&&this.flickityNav.select(cellIndex)}),this.flickity&&this.flickity.on("change",index=>{this.flickityNav.select(index)})})}update(){setTimeout(()=>{this.flickity&&this.flickityNav&&(this.flickityNav.next(),this.settings.autorotate&&this.flickity.unpausePlayer())},300)}getSwipeDirection(moveVector){return moveVector.x>0?"right":"left"}}customElements.define("testimonials-component",TestimonialsComponent);class UseAnimate extends HTMLElement{constructor(){super(),theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:0})}init(){this.setAttribute("animate","")}}customElements.define("use-animate",UseAnimate);class AnimateSticky extends HTMLElement{constructor(){super()}connectedCallback(){this.onScrollHandler=this.onScroll.bind(this),window.addEventListener("scroll",this.onScrollHandler,!1),this.onScrollHandler()}disconnectedCallback(){window.removeEventListener("scroll",this.onScrollHandler)}onScroll(){(window.pageYOffset||document.documentElement.scrollTop)>this.getOffsetTop(this)?window.requestAnimationFrame(this.reveal.bind(this)):window.requestAnimationFrame(this.reset.bind(this))}reveal(){this.setAttribute("animate","")}reset(){this.removeAttribute("animate")}getOffsetTop(element){let offsetTop=0;for(;element;)offsetTop+=element.offsetTop,element=element.offsetParent;return offsetTop}}customElements.define("animate-sticky",AnimateSticky);class LookbookComponent extends HTMLElement{constructor(){super(),theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:0})}init(){const hotspots=this.querySelectorAll(".look__hotspot");
32hotspots.forEach(hotspot=>{hotspot.classList.add("is-active")}),setTimeout(()=>{hotspots.forEach(hotspot=>{hotspot.classList.remove("is-active")})},3e3)}}customElements.define("lookbook-component",LookbookComponent);class TabCollage extends HTMLElement{constructor(){super(),this.querySelectorAll(".tab-collage__heading").forEach(button=>button.addEventListener("click",this.onButtonClick.bind(this))),this.dataset.accordion===void 0&&this.querySelectorAll(".tab-collage__heading").forEach(button=>button.addEventListener("mouseover",this.onButtonClick.bind(this)))}onButtonClick(event){const target=event.target;if(target.classList.contains("is-active")){this.dataset.accordion!==void 0&&target.classList.remove("is-active");return}this.pauseAllMedia(),this.querySelectorAll("[data-block-id]").forEach(button=>{target.dataset.blockId===button.dataset.blockId?button.classList.add("is-active"):button.classList.remove("is-active")})}pauseAllMedia(){this.querySelectorAll('video-section[data-type="youtube"] iframe').forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),this.querySelectorAll('video-section[data-type="vimeo"] iframe').forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),this.querySelectorAll("video").forEach(video=>video.pause()),document.querySelectorAll("video").forEach(video=>video.pause())}}customElements.define("tab-collage",TabCollage);class CountdownTimer extends HTMLElement{constructor(){if(super(),this.parent=this.closest(".product-countdown"),this.date=new Date(Date.parse(this.dataset.date)).getTime(),isNaN(this.date)&&(this.date=new Date(this.dataset.date.replace(/-/g,"/")).getTime(),isNaN(this.date))){this.unload();return}theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:200})}init(){this.timer(),this.dataset.interval=setInterval(this.timer.bind(this),1e3)}timer(){const now=new Date,countTo=new Date(this.date),timeDifference=countTo-now;if(timeDifference<0){this.unload();return}const secondsInADay=3600*1e3*24,secondsInAHour=3600*1e3,days=Math.floor(timeDifference/secondsInADay*1),hours=Math.floor(timeDifference%secondsInADay/secondsInAHour*1),mins=Math.floor(timeDifference%secondsInADay%secondsInAHour/(60*1e3)*1),secs=Math.floor(timeDifference%secondsInADay%secondsInAHour%(60*1e3)/1e3*1);if(this.dataset.compact=="true"){const dayHTML=days>0?`<div class="countdown__item"><span>${days}${window.dateStrings.d}</span></div>`:"",otherHTML=`<div class="countdown__item"><span>${hours>9?hours:"0"+hours}:${mins>9?mins:"0"+mins}:${secs>9?secs:"0"+secs}</span></div>`;this.innerHTML=dayHTML+otherHTML}else{const dayHTML=days>0?`<div class="countdown__item"><span>${days}</span> ${days==1?window.dateStrings.day:window.dateStrings.days}</div>`:"",hourHTML=`<div class="countdown__item"><span>${hours}</span> ${hours==1?window.dateStrings.hour:window.dateStrings.hours}</div>`,minHTML=`<div class="countdown__item"><span>${mins}</span> ${mins==1?window.dateStrings.minute:window.dateStrings.minutes}</div>`,secHTML=`<div class="countdown__item"><span>${secs}</span> ${secs==1?window.dateStrings.second:window.dateStrings.seconds}</div>`;this.innerHTML=dayHTML+hourHTML+minHTML+secHTML}}unload(){this.dataset.interval&&clearInterval(this.dataset.interval),this.classList.add("hidden"),this.parent&&this.parent.classList.add("hidden")}}customElements.define("countdown-timer",CountdownTimer);class GMap extends HTMLElement{constructor(){super(),!(!this.dataset.apiKey||!this.dataset.mapAddress)&&theme.initWhenVisible({element:this,callback:this.prepMapApi.bind(this),threshold:200})}prepMapApi(){this.loadScript().then(this.initMap.bind(this))}loadScript(){return new Promise((resolve,reject)=>{const script=document.createElement("script");document.body.appendChild(script),script.onload=resolve,script.onerror=reject,script.async=!0,script.src="https://maps.googleapis.com/maps/api/js?key="+this.dataset.apiKey})}initMap(){new google.maps.Geocoder().geocode({address:this.dataset.mapAddress},(results,status)=>{if(status!==google.maps.GeocoderStatus.OK)Shopify.designMode;else{const mapOptions={zoom:parseInt(this.dataset.zoom),center:results[0].geometry.location,draggable:!0,clickableIcons:!1,scrollwheel:!1,disableDoubleClickZoom:!0,disableDefaultUI:!0},map=new google.maps.Map(this,mapOptions),center=map.getCenter();map.setCenter(center);const icon={path:"M32.7374478,5.617 C29.1154478,1.995 24.2994478,0 19.1774478,0 C14.0544478,0 9.23944778,1.995 5.61744778,5.617 C-1.08555222,12.319 -1.91855222,24.929 3.81344778,32.569 L19.1774478,54.757 L34.5184478,32.6 C40.2734478,24.929 39.4404478,12.319 32.7374478,5.617 Z M19.3544478,26 C15.4954478,26 12.3544478,22.859 12.3544478,19 C12.3544478,15.141 15.4954478,12 19.3544478,12 C23.2134478,12 26.3544478,15.141 26.3544478,19 C26.3544478,22.859 23.2134478,26 19.3544478,26 Z",fillColor:this.dataset.markerColor,fillOpacity:1,anchor:new google.maps.Point(15,55),strokeWeight:0,scale:.6};new google.maps.Marker({map,position:map.getCenter(),icon});const styledMapType=new google.maps.StyledMapType(JSON.parse(this.parentNode.querySelector("[data-gmap-style]").innerHTML));map.mapTypes.set("styled_map",styledMapType),map.setMapTypeId("styled_map"),google.maps.event.addDomListener(window,"resize",function(){google.maps.event.trigger(map,"resize"),map.setCenter(center)})}})}}customElements.define("g-map",GMap);class RelatedButtons extends HTMLElement{constructor(){super(),window.addEventListener("scroll",this.checkListener.bind(this)),this.querySelectorAll("a").forEach(button=>button.addEventListener("click",this.onButtonClick.bind(this)))}checkListener(){const element=document.querySelector(this.dataset.scrollto);window.scrollY>=element.offsetTop-element.clientHeight?this.classList.add("is-flipped"):this.classList.remove("is-flipped")}onButtonClick(event){event.preventDefault();const target=event.target;document.querySelector(target.getAttribute("href")).scrollIntoView({behavior:"smooth"})}}customElements.define("related-buttons",RelatedButtons);class ProductRecentlyViewed extends HTMLElement{constructor(){if(super(),isStorageSupported("local")){const productId=parseInt(this.dataset.productId),cookieName="beyours:recently-viewed",items=JSON.parse(window.localStorage.getItem(cookieName)||"[]");items.includes(productId)||items.unshift(productId),window.localStorage.setItem(cookieName,JSON.stringify(items.slice(0,5)))}}}customElements.define("product-recently-viewed",ProductRecentlyViewed);class RecentlyViewedProducts extends HTMLElement{constructor(){super(),theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:600})}init(){fetch(this.dataset.url+this.getQueryString()).then(response=>response.text()).then(text=>{const html=document.createElement("div");
32html.innerHTML=text;const recommendations=html.querySelector("recently-viewed-products");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML)}).catch(e=>{console.error(e)})}getQueryString(){const items=JSON.parse(window.localStorage.getItem("beyours:recently-viewed")||"[]");return this.dataset.productId&&items.includes(parseInt(this.dataset.productId))&&items.splice(items.indexOf(parseInt(this.dataset.productId)),1),items.map(item=>"id:"+item).slice(0,4).join(" OR ")}}customElements.define("recently-viewed-products",RecentlyViewedProducts);class VideoSection extends HTMLElement{constructor(){super(),this.background=this.dataset.initMode!=="template",this.loop=this.dataset.loop,this.background?theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:600}):this.init()}init(){switch(this.parentSelector=this.dataset.parent||".media-wrapper",this.parent=this.closest(this.parentSelector),this.dataset.type){case"youtube":this.initYoutubeVideo();break;case"vimeo":this.initVimeoVideo();break;case"mp4":this.initMp4Video();break}}initYoutubeVideo(){this.setAsLoading(),this.loadScript("youtube").then(this.setupYoutubePlayer.bind(this))}initVimeoVideo(){this.setAsLoading(),this.loadScript("vimeo").then(this.setupVimeoPlayer.bind(this))}initMp4Video(){const player=this.querySelector("video");if(player){const promise=player.play();typeof promise<"u"&&promise.then(function(){}).catch(function(){player.setAttribute("controls","")})}}loadScript(videoType){return new Promise((resolve,reject)=>{const script=document.createElement("script");document.body.appendChild(script),script.onload=resolve,script.onerror=reject,script.async=!0,script.src=videoType==="youtube"?"//www.youtube.com/iframe_api":"//player.vimeo.com/api/player.js"})}setAsLoading(){this.parent.setAttribute("loading",!0)}setAsLoaded(){this.parent.removeAttribute("loading"),this.parent.setAttribute("loaded",!0)}setupYoutubePlayer(){const videoId=this.dataset.videoId,playerInterval=setInterval(()=>{window.YT&&window.YT.ready(()=>{const element=document.createElement("div");this.appendChild(element),this.player=new YT.Player(element,{videoId,playerVars:{showinfo:0,controls:!this.background,fs:!this.background,rel:0,height:"100%",width:"100%",iv_load_policy:3,html5:1,loop:this.loop=="1"?1:0,playlist:videoId,playsinline:1,modestbranding:1,disablekb:1},events:{onReady:this.onYoutubeReady.bind(this),onStateChange:this.onYoutubeStateChange.bind(this)}}),clearInterval(playerInterval)})},50)}onYoutubeReady(){this.iframe=this.querySelector("iframe"),this.iframe.setAttribute("tabindex","-1"),this.background&&this.player.mute(),typeof this.player.playVideo=="function"&&this.player.playVideo(),this.setAsLoaded(),new IntersectionObserver((entries,_observer)=>{entries.forEach(entry=>{entry.isIntersecting?this.youtubePlay():this.youtubePause()})},{rootMargin:"0px 0px 50px 0px"}).observe(this.iframe)}onYoutubeStateChange(event){switch(event.data){case-1:this.attemptedToPlay&&(this.setAsLoaded(),this.closest(".banner").classList.add("video-interactable"));break;case 0:this.youtubePlay();break;case 1:this.setAsLoaded();break;case 3:this.attemptedToPlay=!0;break}}youtubePlay(){this.background&&this.player&&typeof this.player.playVideo=="function"&&this.player.playVideo()}youtubePause(){this.background&&this.player&&typeof this.player.pauseVideo=="function"&&this.player.pauseVideo()}setupVimeoPlayer(){const videoId=this.dataset.videoId,playerInterval=setInterval(()=>{window.Vimeo&&(this.player=new Vimeo.Player(this,{id:videoId,autoplay:!0,autopause:!1,background:this.background,controls:!this.background,loop:this.loop=="1",playlist:videoId,height:"100%",width:"100%"}),this.player.ready().then(this.onVimeoReady.bind(this)),clearInterval(playerInterval))},50)}onVimeoReady(){this.iframe=this.querySelector("iframe"),this.iframe.setAttribute("tabindex","-1"),this.background&&this.player.setMuted(!0),this.setAsLoaded(),new IntersectionObserver((entries,_observer)=>{entries.forEach(entry=>{entry.isIntersecting?this.vimeoPlay():this.vimeoPause()})},{rootMargin:"0px 0px 50px 0px"}).observe(this.iframe)}vimeoPlay(){this.background&&this.player&&typeof this.player.play=="function"&&this.player.play()}
32vimeoPause(){this.background&&this.player&&typeof this.player.pause=="function"&&this.player.pause()}}customElements.define("video-section",VideoSection);class BundleProduct extends HTMLElement{constructor(){super(),this.classes={souldout:"price--sold-out",onsale:"price--on-sale",nocompare:"price--no-compare"},this.addToCart=this.querySelector("add-to-cart"),this.price=this.querySelector(".price"),this.variants=this.querySelector("select"),this.variants&&this.variants.addEventListener("change",this.onSelectChange.bind(this))}onSelectChange(event){const variants=event.target,variant=variants.options[variants.selectedIndex],compare_at_price=parseInt(variant.dataset.compare_at_price||0),price=parseInt(variant.dataset.price||0),available=variant.dataset.available==="true",price_varies=variants.dataset.price_varies==="true",compare_at_price_varies=variants.dataset.compare_at_price_varies==="true";this.price.classList.remove(this.classes.souldout),this.price.classList.remove(this.classes.onsale),this.price.classList.remove(this.classes.nocompare),available===!1?this.price.classList.add(this.classes.souldout):compare_at_price>price&&available&&this.price.classList.add(this.classes.onsale),price_varies==!1&&compare_at_price_varies&&this.price.classList.add(this.classes.nocompare);const price__regular=this.querySelector(".price__regular");price__regular.querySelector(".price-item--regular").innerHTML=`<price-money><bdi>${theme.Currency.formatMoney(price,window.shopSettings.moneyFormat)}</bdi></price-money>`;const price__sale=this.querySelector(".price__sale");price__sale.querySelector(".price-item--regular").innerHTML=`<price-money><bdi>${theme.Currency.formatMoney(compare_at_price,window.shopSettings.moneyFormat)}</bdi></price-money>`,price__sale.querySelector(".price-item--sale").innerHTML=`<price-money><bdi>${theme.Currency.formatMoney(price,window.shopSettings.moneyFormat)}</bdi></price-money>`,this.addToCart&&(this.addToCart.dataset.variantId=variant.value)}}customElements.define("bundle-product",BundleProduct);class BundleProducts extends HTMLElement{constructor(){super(),this.classes={hover:"is-hover",active:"is-active"},this.miniCart=document.querySelector("mini-cart"),this.button=this.querySelector("button"),this.button&&this.button.addEventListener("click",this.onButtonClick.bind(this)),this.blocks=this.querySelectorAll("[data-block-id]"),this.blocks.forEach(block=>block.addEventListener("mouseenter",this.onEnterHandler.bind(this))),this.blocks.forEach(block=>block.addEventListener("mouseleave",this.onLeaveHandler.bind(this)))}onEnterHandler(event){this.classList.add(this.classes.hover);const target=event.target,blockId=target.dataset.blockId;this.blocks.forEach(block=>{if(target.nodeName==="BUNDLE-PRODUCT"&&block.nodeName==="BUNDLE-PRODUCT"){block.classList.add(this.classes.active);return}block.dataset.blockId===blockId&&block.classList.add(this.classes.active)})}onLeaveHandler(){this.classList.remove(this.classes.hover),this.blocks.forEach(block=>block.classList.remove(this.classes.active))}onButtonClick(event){event.preventDefault();const items={items:[...this.querySelectorAll('[name="id"]')].map((e=>e.value)).map((e=>({id:e,quantity:1})))};if(document.body.classList.contains("template-cart")||!window.shopSettings.cartDrawer){Shopify.postLink2(window.routes.cart_add_url,{parameters:{...items}});return}this.handleErrorMessage(),this.button.setAttribute("disabled",!0),this.button.classList.add("loading");const sections=this.miniCart?this.miniCart.getSectionsToRender().map(section=>section.id):[],body=JSON.stringify({...items,sections,sections_url:window.location.pathname});fetch(`${window.routes.cart_add_url}`,{...fetchConfig("javascript"),body}).then(response=>response.json()).then(response=>{if(response.status){this.handleErrorMessage(response.description);return}response.status===422?document.dispatchEvent(new CustomEvent("ajaxProduct:error",{detail:{errorMessage:response.description}})):(this.miniCart&&this.miniCart.renderContents(response),document.dispatchEvent(new CustomEvent("ajaxProduct:added",{detail:{product:response}})))}).catch(e=>{console.error(e)}).finally(()=>{this.button.classList.remove("loading"),this.button.removeAttribute("disabled")})}handleErrorMessage(errorMessage=!1){this.errorMessageWrapper=this.errorMessageWrapper||this.querySelector(".product-form__error-message-wrapper"),this.errorMessageWrapper?(this.errorMessage=this.errorMessage||this.errorMessageWrapper.querySelector(".product-form__error-message"),this.errorMessageWrapper.toggleAttribute("hidden",!errorMessage),errorMessage&&(this.errorMessage.textContent=errorMessage)):errorMessage&&alert(errorMessage)}}customElements.define("bundle-products",BundleProducts);class ShopTheLook extends HTMLElement{constructor(){super(),this.dataset.blockCount!=1&&theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:600})}init(){this.products=this.querySelector(".image-with-text__products"),this.blocks=this.querySelectorAll("lookbook-component [data-block-index]"),this.blocks.forEach(block=>block.addEventListener("mouseenter",this.onEnterHandler.bind(this))),this.initSlider()}onEnterHandler(event){if(this.flickity&&typeof this.flickity.select=="function"){const index=
32parseInt(event.target.dataset.blockIndex);this.flickity.select(index)}}onFocusHandler(index){this.blocks.forEach(block=>{block.classList.remove("focus"),parseInt(block.dataset.blockIndex)===index&&block.classList.add("focus")})}initSlider(){this.flickity=new Flickity(this.products,{accessibility:!1,rightToLeft:theme.config.rtl,prevNextButtons:!1,pageDots:!0,wrapAround:!0,fade:!0,setGallerySize:!0,on:{ready:()=>{this.onFocusHandler(0)},change:index=>{this.onFocusHandler(index)}}})}}customElements.define("shop-the-look",ShopTheLook);class SelectWrapper extends HTMLElement{constructor(){super(),theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:200}),this.select=this.querySelector("select"),this.select&&this.select.addEventListener("change",this.handleSelectChange.bind(this))}init(){const style=window.getComputedStyle(this.select),value=this.select.options[this.select.selectedIndex].text,text=document.createElement("span");text.style.fontFamily=style.fontFamily,text.style.fontSize=style.fontSize,text.style.fontWeight=style.fontWeight,text.style.visibility="hidden",text.style.position="absolute",text.innerHTML=value,document.body.appendChild(text);const width=text.clientWidth;this.style.setProperty("--width",`${width}px`),text.remove()}handleSelectChange(){this.init()}}customElements.define("select-wrapper",SelectWrapper);class ImageComparison extends HTMLElement{constructor(){super(),this.active=!1,this.button=this.querySelector("button"),this.horizontal=this.dataset.layout==="horizontal",this.bodyStyleOverflowY=document.body.style.overflowY,this.init(),theme.initWhenVisible({element:this.querySelector(".image-comparison__animate"),callback:this.animate.bind(this),threshold:0})}animate(){this.setAttribute("animate",""),this.classList.add("animating"),setTimeout(()=>{this.classList.remove("animating")},1e3)}init(){this.button.addEventListener("touchstart",this.startHandler.bind(this)),document.body.addEventListener("touchend",this.endHandler.bind(this)),document.body.addEventListener("touchmove",this.onHandler.bind(this)),this.button.addEventListener("mousedown",this.startHandler.bind(this)),document.body.addEventListener("mouseup",this.endHandler.bind(this)),document.body.addEventListener("mousemove",this.onHandler.bind(this))}startHandler(){window.innerWidth<=750&&(document.body.style.overflowY="hidden"),this.active=!0,this.classList.add("scrolling")}endHandler(){this.active=!1,this.classList.remove("scrolling"),document.body.style.overflowY=this.bodyStyleOverflowY}onHandler(e){if(!this.active)return;const event=e.touches&&e.touches[0]||e,x=this.horizontal?event.pageX-this.offsetLeft:event.pageY-this.offsetTop;this.scrollIt(x)}scrollIt(x){const distance=this.horizontal?this.clientWidth:this.clientHeight,max=distance-20,mousePercent=Math.max(20,Math.min(x,max))*100/distance;this.style.setProperty("--percent",mousePercent+"%")}}customElements.define("image-comparison",ImageComparison);class ScrollingPromotion extends HTMLElement{constructor(){super(),this.config={moveTime:parseFloat(this.dataset.speed),space:100},this.promotion=this.querySelector(".promotion"),theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:600})}init(){if(this.childElementCount===1){this.promotion.classList.add("promotion--animated");for(let index=0;index<10;index++){this.clone=this.promotion.cloneNode(!0),this.clone.setAttribute("aria-hidden",!0),this.appendChild(this.clone);const imageWrapper=this.clone.querySelector(".media-wrapper");imageWrapper&&imageWrapper.classList.remove("loading")}const animationTimeFrame=this.promotion.clientWidth/this.config.space*this.config.moveTime;this.style.setProperty("--duration",`${animationTimeFrame}s`),new IntersectionObserver((entries,_observer)=>{entries.forEach(entry=>{entry.isIntersecting?this.scrollingPlay():this.scrollingPause()})},{rootMargin:"0px 0px 50px 0px"}).observe(this)}}scrollingPlay(){this.classList.remove("scrolling-promotion--paused")}scrollingPause(){this.classList.add("scrolling-promotion--paused")}}customElements.define("scrolling-promotion",ScrollingPromotion);class AccordionTab extends HTMLElement{constructor(){super(),this.details=this.querySelector("details"),this.summary=this.querySelector("summary"),this.content=this.querySelector(".accordion__content"),this.animation=null,this.isClosing=!1,this.isExpanding=!1,theme.initWhenVisible({element:this,callback:this.init.bind(this),threshold:200})}init(){this.summary.addEventListener("click",e=>this.onClick(e))}onClick(e){e.preventDefault(),this.details.style.overflow="hidden",this.isClosing||!this.details.open?this.open():(this.isExpanding||this.details.open)&&this.shrink()}shrink(){this.isClosing=!0;const summaryStyle=window.getComputedStyle(this.summary),startHeight=`${this.details.offsetHeight}px`,endHeight=`${this.summary.offsetHeight+parseInt(summaryStyle.marginTop)}px`;this.animation&&this.animation.cancel(),this.animation=this.details.animate({height:[startHeight,endHeight]},{duration:250,easing:"ease"}),this.animation.onfinish=()=>this.onAnimationFinish(!1),this.animation.oncancel=()=>this.isClosing=!1}open(){this.details.style.height=`${this.details.offsetHeight}px`,this.details.open=!0,window.requestAnimationFrame(()=>this.expand())}expand(){this.isExpanding=!0;const summaryStyle=window.getComputedStyle(this.summary),startHeight=`${this.details.offsetHeight}px`,endHeight=`${this.summary.offsetHeight+parseInt(summaryStyle.marginTop)+this.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.details.animate({height:[startHeight,endHeight]},{duration:400,easing:"ease-out"}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>this.isExpanding=!1}onAnimationFinish(open){this.details.open=open,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.details.style.height=this.details.style.overflow=""}}customElements.define("accordion-tab",AccordionTab);class ProductRecommendations extends HTMLElement{constructor(){super()}connectedCallback(){new IntersectionObserver(this.handleIntersection.bind(this),{rootMargin:"0px 0px 600px 0px"}).observe(this)}handleIntersection(entries,observer){entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");
32html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML)}).catch(e=>{console.error(e)}))}}customElements.define("product-recommendations",ProductRecommendations);class HeaderMenuToggle extends HTMLElement{constructor(){super(),this.header=document.querySelector(".shopify-section-header"),this.addEventListener("click",this.onButtonClick.bind(this))}onButtonClick(){this.header.classList.toggle("shopify-section-header-menu-open")}}customElements.define("header-menu-toggle",HeaderMenuToggle);class UpsellProduct extends HTMLElement{constructor(){super(),this.querySelectorAll('input[type="radio"]').forEach(el=>{el.addEventListener("change",this.variationChange)})}variationChange=event=>{let price=event.target.getAttribute("data-price");this.querySelector(".price").innerHTML=price}}customElements.define("upsell-product",UpsellProduct); 33//# sourceMappingURL=/cdn/shop/t/74/assets/vendor-v4.js.map?v=78445171321414746481779272013
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.