window.theme=window.theme||{},theme.Sections=function(){this.constructors={},this.instances=[],document.addEventListener("shopify:section:load",this._onSectionLoad.bind(this)),document.addEventListener("shopify:section:unload",this._onSectionUnload.bind(this)),document.addEventListener("shopify:section:select",this._onSelect.bind(this)),document.addEventListener("shopify:section:deselect",this._onDeselect.bind(this)),document.addEventListener("shopify:block:select",this._onBlockSelect.bind(this)),document.addEventListener("shopify:block:deselect",this._onBlockDeselect.bind(this))},theme.Sections.prototype=Object.assign({},theme.Sections.prototype,{_createInstance:function(container,constructor){var id=container.getAttribute("data-section-id"),type=container.getAttribute("data-section-type");if(constructor=constructor||this.constructors[type],typeof constructor!="undefined"){var instance=Object.assign(new constructor(container),{id:id,type:type,container:container});this.instances.push(instance)}},_onSectionLoad:function(evt){var container=document.querySelector('[data-section-id="'+evt.detail.sectionId+'"]');container&&this._createInstance(container)},_onSectionUnload:function(evt){this.instances=this.instances.filter(function(instance){var isEventInstance=instance.id===evt.detail.sectionId;return isEventInstance&&typeof instance.onUnload=="function"&&instance.onUnload(evt),!isEventInstance})},_onSelect:function(evt){var instance=this.instances.find(function(instance2){return instance2.id===evt.detail.sectionId});typeof instance!="undefined"&&typeof instance.onSelect=="function"&&instance.onSelect(evt)},_onDeselect:function(evt){var instance=this.instances.find(function(instance2){return instance2.id===evt.detail.sectionId});typeof instance!="undefined"&&typeof instance.onDeselect=="function"&&instance.onDeselect(evt)},_onBlockSelect:function(evt){var instance=this.instances.find(function(instance2){return instance2.id===evt.detail.sectionId});typeof instance!="undefined"&&typeof instance.onBlockSelect=="function"&&instance.onBlockSelect(evt)},_onBlockDeselect:function(evt){var instance=this.instances.find(function(instance2){return instance2.id===evt.detail.sectionId});typeof instance!="undefined"&&typeof instance.onBlockDeselect=="function"&&instance.onBlockDeselect(evt)},register:function(type,constructor){this.constructors[type]=constructor,document.querySelectorAll('[data-section-type="'+type+'"]').forEach(function(container){this._createInstance(container,constructor)}.bind(this))}}),window.slate=window.slate||{},slate.utils={getParameterByName:function(name,url){url||(url=window.location.href),name=name.replace(/[[\]]/g,"\\$&");var regex=new RegExp("[?&]"+name+"(=([^&#]*)|&|#|$)"),results=regex.exec(url);return results?results[2]?decodeURIComponent(results[2].replace(/\+/g," ")):"":null},resizeSelects:function(selects){selects.forEach(function(select){var arrowWidth=55,test=document.createElement("span");test.innerHTML=select.selectedOptions[0].label,document.querySelector(".site-footer").appendChild(test);var width=test.offsetWidth+arrowWidth;test.remove(),select.style.width=width+"px"})},keyboardKeys:{TAB:9,ENTER:13,ESCAPE:27,LEFTARROW:37,RIGHTARROW:39}},slate.rte={wrapTable:function(options){options.tables.forEach(function(table){var wrapper=document.createElement("div");wrapper.classList.add(options.tableWrapperClass),table.parentNode.insertBefore(wrapper,table),wrapper.appendChild(table)})},wrapIframe:function(options){options.iframes.forEach(function(iframe){var wrapper=document.createElement("div");wrapper.classList.add(options.iframeWrapperClass),iframe.parentNode.insertBefore(wrapper,iframe),wrapper.appendChild(iframe),iframe.src=iframe.src})}},slate.a11y={state:{firstFocusable:null,lastFocusable:null},pageLinkFocus:function(element){if(!element)return;var focusClass="js-focus-hidden";element.setAttribute("tabIndex","-1"),element.focus(),element.classList.add(focusClass),element.addEventListener("blur",callback,{once:!0});function callback(){element.classList.remove(focusClass),element.removeAttribute("tabindex")}},trapFocus:function(options){var focusableElements=Array.from(options.container.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex^="-"])')).filter(function(element){var width=element.offsetWidth,height=element.offsetHeight;return width!==0&&height!==0&&getComputedStyle(element).getPropertyValue("display")!=="none"});this.state.firstFocusable=focusableElements[0],this.state.lastFocusable=focusableElements[focusableElements.length-1],options.elementToFocus||(options.elementToFocus=options.container),options.container.setAttribute("tabindex","-1"),options.elementToFocus.focus(),this._setupHandlers(),document.addEventListener("focusin",this._onFocusInHandler),document.addEventListener("focusout",this._onFocusOutHandler)},_setupHandlers:function(){this._onFocusInHandler||(this._onFocusInHandler=this._onFocusIn.bind(this)),this._onFocusOutHandler||(this._onFocusOutHandler=this._onFocusIn.bind(this)),this._manageFocusHandler||(this._manageFocusHandler=this._manageFocus.bind(this))},_onFocusOut:function(){document.removeEventListener("keydown",this._manageFocusHandler)},_onFocusIn:function(evt){evt.target!==this.state.lastFocusable&&evt.target!==this.state.firstFocusable||document.addEventListener("keydown",this._manageFocusHandler)},_manageFocus:function(evt){evt.keyCode===slate.utils.keyboardKeys.TAB&&(evt.target===this.state.lastFocusable&&!evt.shiftKey&&(evt.preventDefault(),this.state.firstFocusable.focus()),evt.target===this.state.firstFocusable&&evt.shiftKey&&(evt.preventDefault(),this.state.lastFocusable.focus()))},removeTrapFocus:function(options){options.container&&options.container.removeAttribute("tabindex"),document.removeEventListener("focusin",this._onFocusInHandler)},accessibleLinks:function(options){var body=document.querySelector("body"),idSelectors={newWindow:"a11y-new-window-message",external:"a11y-external-message",newWindowExternal:"a11y-new-window-external-message"};(options.links===void 0||!options.links.length)&&(options.links=document.querySelectorAll("a[href]:not([aria-describedby])"));function generateHTML(customMessages){typeof customMessages!="object"&&(customMessages={});var messages=Object.assign({newWindow:"Opens in a new window.",external:"Opens external website.",newWindowExternal:"Opens external website in a new window."},customMessages),container=document.createElement("ul"),htmlMessages="";for(var message in messages)htmlMessages+="
  • "+messages[message]+"
  • ";container.setAttribute("hidden",!0),container.innerHTML=htmlMessages,body.appendChild(container)}function _externalSite(link){var hostname=window.location.hostname;return link.hostname!==hostname}options.links.forEach(function(link){var target=link.getAttribute("target"),rel=link.getAttribute("rel"),isExternal=_externalSite(link),isTargetBlank=target==="_blank";if(isExternal&&link.setAttribute("aria-describedby",idSelectors.external),isTargetBlank){if(!rel||rel.indexOf("noopener")===-1){var relValue=rel===void 0?"":rel+" ";relValue=relValue+"noopener",link.setAttribute("rel",relValue)}link.setAttribute("aria-describedby",idSelectors.newWindow)}isExternal&&isTargetBlank&&link.setAttribute("aria-describedby",idSelectors.newWindowExternal)}),generateHTML(options.messages)}},theme.Images=function(){function preload(images,size){typeof images=="string"&&(images=[images]);for(var i=0;i=500){onError(new ServerError);return}if(xhr.status===404){onError(new NotFoundError(xhr.status));return}if(typeof contentType!="string"||contentType.toLowerCase().match("application/json")===null){onError(new ContentTypeError(xhr.status));return}if(xhr.status===417){try{var invalidParameterJson=JSON.parse(xhr.responseText);onError(new InvalidParameterError(xhr.status,invalidParameterJson.message,invalidParameterJson.description))}catch(error){onError(new JsonParseError(xhr.status))}return}if(xhr.status===422){try{var expectationFailedJson=JSON.parse(xhr.responseText);onError(new ExpectationFailedError(xhr.status,expectationFailedJson.message,expectationFailedJson.description))}catch(error){onError(new JsonParseError(xhr.status))}return}if(xhr.status===429){try{var throttledJson=JSON.parse(xhr.responseText);onError(new ThrottledError(xhr.status,throttledJson.message,throttledJson.description,xhr.getResponseHeader("Retry-After")))}catch(error){onError(new JsonParseError(xhr.status))}return}if(xhr.status===200){try{var res=JSON.parse(xhr.responseText);res.query=query,onSuccess(res)}catch(error){onError(new JsonParseError(xhr.status))}return}try{var genericErrorJson=JSON.parse(xhr.responseText);onError(new GenericError(xhr.status,genericErrorJson.message,genericErrorJson.description))}catch(error){onError(new JsonParseError(xhr.status))}}},xhr.open("get",route+"?q="+encodeURIComponent(query)+"&"+queryParams),xhr.setRequestHeader("Content-Type","application/json"),xhr.send()}function Cache(config){this._store={},this._keys=[],config&&config.bucketSize?this.bucketSize=config.bucketSize:this.bucketSize=20}Cache.prototype.set=function(key,value){if(this.count()>=this.bucketSize){var deleteKey=this._keys.splice(0,1);this.delete(deleteKey)}return this._keys.push(key),this._store[key]=value,this._store},Cache.prototype.get=function(key){return this._store[key]},Cache.prototype.has=function(key){return!!this._store[key]},Cache.prototype.count=function(){return Object.keys(this._store).length},Cache.prototype.delete=function(key){var exists=!!this._store[key];return delete this._store[key],exists&&!this._store[key]};function Dispatcher(){this.events={}}Dispatcher.prototype.on=function(eventName,callback){var event=this.events[eventName];event||(event=new DispatcherEvent(eventName),this.events[eventName]=event),event.registerCallback(callback)},Dispatcher.prototype.off=function(eventName,callback){var event=this.events[eventName];event&&event.callbacks.indexOf(callback)>-1&&(event.unregisterCallback(callback),event.callbacks.length===0&&delete this.events[eventName])},Dispatcher.prototype.dispatch=function(eventName,payload){var event=this.events[eventName];event&&event.fire(payload)};function DispatcherEvent(eventName){this.eventName=eventName,this.callbacks=[]}DispatcherEvent.prototype.registerCallback=function(callback){this.callbacks.push(callback)},DispatcherEvent.prototype.unregisterCallback=function(callback){var index=this.callbacks.indexOf(callback);index>-1&&this.callbacks.splice(index,1)},DispatcherEvent.prototype.fire=function(payload){var callbacks=this.callbacks.slice(0);callbacks.forEach(function(callback){callback(payload)})};function debounce(func,wait){var timeout=null;return function(){var context=this,args=arguments;clearTimeout(timeout),timeout=setTimeout(function(){timeout=null,func.apply(context,args)},wait||0)}}function objectToQueryParams(obj,parentKey){var output="";return parentKey=parentKey||null,Object.keys(obj).forEach(function(key){var outputKey=key+"=";switch(parentKey&&(outputKey=parentKey+"["+key+"]"),trueTypeOf(obj[key])){case"object":output+=objectToQueryParams(obj[key],parentKey?outputKey:key);break;case"array":output+=outputKey+"="+obj[key].join(",")+"&";break;default:parentKey&&(outputKey+="="),output+=outputKey+encodeURIComponent(obj[key])+"&";break}}),output}function trueTypeOf(obj){return Object.prototype.toString.call(obj).slice(8,-1).toLowerCase()}var DEBOUNCE_RATE=10,requestDebounced=debounce(request,DEBOUNCE_RATE);function PredictiveSearch(params,searchUrl){if(!params)throw new TypeError("No params object was specified");this.searchUrl=searchUrl,this._retryAfter=null,this._currentQuery=null,this.dispatcher=new Dispatcher,this.cache=new Cache({bucketSize:40}),this.queryParams=objectToQueryParams(params)}PredictiveSearch.TYPES={PRODUCT:"product",PAGE:"page",ARTICLE:"article"},PredictiveSearch.FIELDS={AUTHOR:"author",BODY:"body",PRODUCT_TYPE:"product_type",TAG:"tag",TITLE:"title",VARIANTS_BARCODE:"variants.barcode",VARIANTS_SKU:"variants.sku",VARIANTS_TITLE:"variants.title",VENDOR:"vendor"},PredictiveSearch.UNAVAILABLE_PRODUCTS={SHOW:"show",HIDE:"hide",LAST:"last"},PredictiveSearch.prototype.query=function(query){try{validateQuery(query)}catch(error){this.dispatcher.dispatch("error",error);return}if(query==="")return this;this._currentQuery=normalizeQuery(query);var cacheResult=this.cache.get(this._currentQuery);return cacheResult?(this.dispatcher.dispatch("success",cacheResult),this):(requestDebounced(this.searchUrl,this.queryParams,query,function(result){this.cache.set(normalizeQuery(result.query),result),normalizeQuery(result.query)===this._currentQuery&&(this._retryAfter=null,this.dispatcher.dispatch("success",result))}.bind(this),function(error){error.retryAfter&&(this._retryAfter=error.retryAfter),this.dispatcher.dispatch("error",error)}.bind(this)),this)},PredictiveSearch.prototype.on=function(eventName,callback){return this.dispatcher.on(eventName,callback),this},PredictiveSearch.prototype.off=function(eventName,callback){return this.dispatcher.off(eventName,callback),this};function normalizeQuery(query){return typeof query!="string"?null:query.trim().replace(" ","-").toLowerCase()}return PredictiveSearch}(),this.Shopify.theme.PredictiveSearchComponent=function(PredictiveSearch){"use strict";PredictiveSearch=PredictiveSearch&&PredictiveSearch.hasOwnProperty("default")?PredictiveSearch.default:PredictiveSearch;var DEFAULT_PREDICTIVE_SEARCH_API_CONFIG={resources:{type:[PredictiveSearch.TYPES.PRODUCT],options:{unavailable_products:PredictiveSearch.UNAVAILABLE_PRODUCTS.LAST,fields:[PredictiveSearch.FIELDS.TITLE,PredictiveSearch.FIELDS.VENDOR,PredictiveSearch.FIELDS.PRODUCT_TYPE,PredictiveSearch.FIELDS.VARIANTS_TITLE]}}};function PredictiveSearchComponent(config){if(!config||!config.selectors||!config.selectors.input||!isString(config.selectors.input)||!config.selectors.result||!isString(config.selectors.result)||!config.resultTemplateFct||!isFunction(config.resultTemplateFct)||!config.numberOfResultsTemplateFct||!isFunction(config.numberOfResultsTemplateFct)||!config.loadingResultsMessageTemplateFct||!isFunction(config.loadingResultsMessageTemplateFct)){var error=new TypeError("PredictiveSearchComponent config is not valid");throw error.type="argument",error}if(this.nodes=findNodes(config.selectors),!isValidNodes(this.nodes)){console.warn("Could not find valid nodes");return}this.searchUrl=config.searchUrl||"/search",this._searchKeyword="",this.resultTemplateFct=config.resultTemplateFct,this.numberOfResultsTemplateFct=config.numberOfResultsTemplateFct,this.loadingResultsMessageTemplateFct=config.loadingResultsMessageTemplateFct,this.numberOfResults=config.numberOfResults||4,this.classes={visibleVariant:config.visibleVariant?config.visibleVariant:"predictive-search-wrapper--visible",itemSelected:config.itemSelectedClass?config.itemSelectedClass:"predictive-search-item--selected",clearButtonVisible:config.clearButtonVisibleClass?config.clearButtonVisibleClass:"predictive-search__clear-button--visible"},this.selectors={searchResult:config.searchResult?config.searchResult:"[data-search-result]"},this.callbacks=assignCallbacks(config),addInputAttributes(this.nodes.input),this._addInputEventListeners(),this._addBodyEventListener(),this._addAccessibilityAnnouncer(),this._toggleClearButtonVisibility(),this.predictiveSearch=new PredictiveSearch(config.PredictiveSearchAPIConfig?config.PredictiveSearchAPIConfig:DEFAULT_PREDICTIVE_SEARCH_API_CONFIG,this.searchUrl),this.predictiveSearch.on("success",this._handlePredictiveSearchSuccess.bind(this)),this.predictiveSearch.on("error",this._handlePredictiveSearchError.bind(this))}function findNodes(selectors2){return{input:document.querySelector(selectors2.input),reset:document.querySelector(selectors2.reset),result:document.querySelector(selectors2.result)}}function isValidNodes(nodes){return!(!nodes||!nodes.input||!nodes.result||nodes.input.tagName!=="INPUT")}function assignCallbacks(config){return{onBodyMousedown:config.onBodyMousedown,onBeforeOpen:config.onBeforeOpen,onOpen:config.onOpen,onBeforeClose:config.onBeforeClose,onClose:config.onClose,onInputFocus:config.onInputFocus,onInputKeyup:config.onInputKeyup,onInputBlur:config.onInputBlur,onInputReset:config.onInputReset,onBeforeDestroy:config.onBeforeDestroy,onDestroy:config.onDestroy}}function addInputAttributes(input){input.setAttribute("autocorrect","off"),input.setAttribute("autocomplete","off"),input.setAttribute("autocapitalize","off"),input.setAttribute("spellcheck","false")}function removeInputAttributes(input){input.removeAttribute("autocorrect","off"),input.removeAttribute("autocomplete","off"),input.removeAttribute("autocapitalize","off"),input.removeAttribute("spellcheck","false")}PredictiveSearchComponent.prototype.isResultVisible=!1,PredictiveSearchComponent.prototype.results={},PredictiveSearchComponent.prototype._latencyTimer=null,PredictiveSearchComponent.prototype._resultNodeClicked=!1,PredictiveSearchComponent.prototype._addInputEventListeners=function(){var input=this.nodes.input,reset=this.nodes.reset;input&&(this._handleInputFocus=this._handleInputFocus.bind(this),this._handleInputBlur=this._handleInputBlur.bind(this),this._handleInputKeyup=this._handleInputKeyup.bind(this),this._handleInputKeydown=this._handleInputKeydown.bind(this),input.addEventListener("focus",this._handleInputFocus),input.addEventListener("blur",this._handleInputBlur),input.addEventListener("keyup",this._handleInputKeyup),input.addEventListener("keydown",this._handleInputKeydown),reset&&(this._handleInputReset=this._handleInputReset.bind(this),reset.addEventListener("click",this._handleInputReset)))},PredictiveSearchComponent.prototype._removeInputEventListeners=function(){var input=this.nodes.input;input.removeEventListener("focus",this._handleInputFocus),input.removeEventListener("blur",this._handleInputBlur),input.removeEventListener("keyup",this._handleInputKeyup),input.removeEventListener("keydown",this._handleInputKeydown)},PredictiveSearchComponent.prototype._addBodyEventListener=function(){this._handleBodyMousedown=this._handleBodyMousedown.bind(this),document.querySelector("body").addEventListener("mousedown",this._handleBodyMousedown)},PredictiveSearchComponent.prototype._removeBodyEventListener=function(){document.querySelector("body").removeEventListener("mousedown",this._handleBodyMousedown)},PredictiveSearchComponent.prototype._removeClearButtonEventListener=function(){var reset=this.nodes.reset;reset&&reset.removeEventListener("click",this._handleInputReset)},PredictiveSearchComponent.prototype._handleBodyMousedown=function(evt){if(this.isResultVisible&&this.nodes!==null)if(evt.target.isEqualNode(this.nodes.input)||this.nodes.input.contains(evt.target)||evt.target.isEqualNode(this.nodes.result)||this.nodes.result.contains(evt.target))this._resultNodeClicked=!0;else if(isFunction(this.callbacks.onBodyMousedown)){var returnedValue=this.callbacks.onBodyMousedown(this.nodes);isBoolean(returnedValue)&&returnedValue&&this.close()}else this.close()},PredictiveSearchComponent.prototype._handleInputFocus=function(evt){if(isFunction(this.callbacks.onInputFocus)){var returnedValue=this.callbacks.onInputFocus(this.nodes);if(isBoolean(returnedValue)&&!returnedValue)return!1}return evt.target.value.length>0&&this._search(),!0},PredictiveSearchComponent.prototype._handleInputBlur=function(){return setTimeout(function(){if(isFunction(this.callbacks.onInputBlur)){var returnedValue=this.callbacks.onInputBlur(this.nodes);if(isBoolean(returnedValue)&&!returnedValue)return!1}if(document.activeElement.isEqualNode(this.nodes.reset))return!1;if(this._resultNodeClicked)return this._resultNodeClicked=!1,!1;this.close()}.bind(this)),!0},PredictiveSearchComponent.prototype._addAccessibilityAnnouncer=function(){this._accessibilityAnnouncerDiv=window.document.createElement("div"),this._accessibilityAnnouncerDiv.setAttribute("style","position: absolute !important; overflow: hidden; clip: rect(0 0 0 0); height: 1px; width: 1px; margin: -1px; padding: 0; border: 0;"),this._accessibilityAnnouncerDiv.setAttribute("data-search-announcer",""),this._accessibilityAnnouncerDiv.setAttribute("aria-live","polite"),this._accessibilityAnnouncerDiv.setAttribute("aria-atomic","true"),this.nodes.result.parentElement.appendChild(this._accessibilityAnnouncerDiv)},PredictiveSearchComponent.prototype._removeAccessibilityAnnouncer=function(){this.nodes.result.parentElement.removeChild(this._accessibilityAnnouncerDiv)},PredictiveSearchComponent.prototype._updateAccessibilityAttributesAfterSelectingElement=function(previousSelectedElement,currentSelectedElement){this.nodes.input.setAttribute("aria-activedescendant",currentSelectedElement.id),previousSelectedElement&&previousSelectedElement.removeAttribute("aria-selected"),currentSelectedElement.setAttribute("aria-selected",!0)},PredictiveSearchComponent.prototype._clearAriaActiveDescendant=function(){this.nodes.input.setAttribute("aria-activedescendant","")},PredictiveSearchComponent.prototype._announceNumberOfResultsFound=function(results){var currentAnnouncedMessage=this._accessibilityAnnouncerDiv.innerHTML,newMessage=this.numberOfResultsTemplateFct(results);currentAnnouncedMessage===newMessage&&(newMessage=newMessage+" "),this._accessibilityAnnouncerDiv.innerHTML=newMessage},PredictiveSearchComponent.prototype._announceLoadingState=function(){this._accessibilityAnnouncerDiv.innerHTML=this.loadingResultsMessageTemplateFct()},PredictiveSearchComponent.prototype._handleInputKeyup=function(evt){var UP_ARROW_KEY_CODE=38,DOWN_ARROW_KEY_CODE=40,RETURN_KEY_CODE=13,ESCAPE_KEY_CODE=27;if(isFunction(this.callbacks.onInputKeyup)){var returnedValue=this.callbacks.onInputKeyup(this.nodes);if(isBoolean(returnedValue)&&!returnedValue)return!1}if(this._toggleClearButtonVisibility(),this.isResultVisible&&this.nodes!==null){if(evt.keyCode===UP_ARROW_KEY_CODE)return this._navigateOption(evt,"UP"),!0;if(evt.keyCode===DOWN_ARROW_KEY_CODE)return this._navigateOption(evt,"DOWN"),!0;if(evt.keyCode===RETURN_KEY_CODE)return this._selectOption(),!0;evt.keyCode===ESCAPE_KEY_CODE&&this.close()}return evt.target.value.length<=0?(this.close(),this._setKeyword("")):evt.target.value.length>0&&this._search(),!0},PredictiveSearchComponent.prototype._handleInputKeydown=function(evt){var RETURN_KEY_CODE=13,UP_ARROW_KEY_CODE=38,DOWN_ARROW_KEY_CODE=40;evt.keyCode===RETURN_KEY_CODE&&this._getSelectedOption()!==null&&evt.preventDefault(),(evt.keyCode===UP_ARROW_KEY_CODE||evt.keyCode===DOWN_ARROW_KEY_CODE)&&evt.preventDefault()},PredictiveSearchComponent.prototype._handleInputReset=function(evt){if(evt.preventDefault(),isFunction(this.callbacks.onInputReset)){var returnedValue=this.callbacks.onInputReset(this.nodes);if(isBoolean(returnedValue)&&!returnedValue)return!1}return this.nodes.input.value="",this.nodes.input.focus(),this._toggleClearButtonVisibility(),this.close(),!0},PredictiveSearchComponent.prototype._navigateOption=function(evt,direction){var currentOption=this._getSelectedOption();if(currentOption)if(direction==="DOWN"){var nextOption=currentOption.nextElementSibling;nextOption&&(currentOption.classList.remove(this.classes.itemSelected),nextOption.classList.add(this.classes.itemSelected),this._updateAccessibilityAttributesAfterSelectingElement(currentOption,nextOption))}else{var previousOption=currentOption.previousElementSibling;previousOption&&(currentOption.classList.remove(this.classes.itemSelected),previousOption.classList.add(this.classes.itemSelected),this._updateAccessibilityAttributesAfterSelectingElement(currentOption,previousOption))}else{var firstOption=this.nodes.result.querySelector(this.selectors.searchResult);firstOption.classList.add(this.classes.itemSelected),this._updateAccessibilityAttributesAfterSelectingElement(null,firstOption)}},PredictiveSearchComponent.prototype._getSelectedOption=function(){return this.nodes.result.querySelector("."+this.classes.itemSelected)},PredictiveSearchComponent.prototype._selectOption=function(){var selectedOption=this._getSelectedOption();selectedOption&&selectedOption.querySelector("a, button").click()},PredictiveSearchComponent.prototype._search=function(){var newSearchKeyword=this.nodes.input.value;this._searchKeyword!==newSearchKeyword&&(clearTimeout(this._latencyTimer),this._latencyTimer=setTimeout(function(){this.results.isLoading=!0,this._announceLoadingState(),this.nodes.result.classList.add(this.classes.visibleVariant),this.nodes.result.innerHTML=this.resultTemplateFct(this.results)}.bind(this),500),this.predictiveSearch.query(newSearchKeyword),this._setKeyword(newSearchKeyword))},PredictiveSearchComponent.prototype._handlePredictiveSearchSuccess=function(json){clearTimeout(this._latencyTimer),this.results=json.resources.results,this.results.isLoading=!1,this.results.products=this.results.products.slice(0,this.numberOfResults),this.results.canLoadMore=this.numberOfResults<=this.results.products.length,this.results.searchQuery=this.nodes.input.value,this.results.products.length>0||this.results.searchQuery?(this.nodes.result.innerHTML=this.resultTemplateFct(this.results),this._announceNumberOfResultsFound(this.results),this.open()):(this.nodes.result.innerHTML="",this._closeOnNoResults())},PredictiveSearchComponent.prototype._handlePredictiveSearchError=function(){clearTimeout(this._latencyTimer),this.nodes.result.innerHTML="",this._closeOnNoResults()},PredictiveSearchComponent.prototype._closeOnNoResults=function(){this.nodes&&this.nodes.result.classList.remove(this.classes.visibleVariant),this.isResultVisible=!1},PredictiveSearchComponent.prototype._setKeyword=function(keyword){this._searchKeyword=keyword},PredictiveSearchComponent.prototype._toggleClearButtonVisibility=function(){this.nodes.reset&&(this.nodes.input.value.length>0?this.nodes.reset.classList.add(this.classes.clearButtonVisible):this.nodes.reset.classList.remove(this.classes.clearButtonVisible))},PredictiveSearchComponent.prototype.open=function(){if(!this.isResultVisible){if(isFunction(this.callbacks.onBeforeOpen)){var returnedValue=this.callbacks.onBeforeOpen(this.nodes);if(isBoolean(returnedValue)&&!returnedValue)return!1}return this.nodes.result.classList.add(this.classes.visibleVariant),this.nodes.input.setAttribute("aria-expanded",!0),this.isResultVisible=!0,isFunction(this.callbacks.onOpen)&&this.callbacks.onOpen(this.nodes)||!0}},PredictiveSearchComponent.prototype.close=function(){if(!this.isResultVisible)return!0;if(isFunction(this.callbacks.onBeforeClose)){var returnedValue=this.callbacks.onBeforeClose(this.nodes);if(isBoolean(returnedValue)&&!returnedValue)return!1}return this.nodes&&this.nodes.result.classList.remove(this.classes.visibleVariant),this.nodes.input.setAttribute("aria-expanded",!1),this._clearAriaActiveDescendant(),this._setKeyword(""),isFunction(this.callbacks.onClose)&&this.callbacks.onClose(this.nodes),this.isResultVisible=!1,this.results={},!0},PredictiveSearchComponent.prototype.destroy=function(){if(this.close(),isFunction(this.callbacks.onBeforeDestroy)){var returnedValue=this.callbacks.onBeforeDestroy(this.nodes);if(isBoolean(returnedValue)&&!returnedValue)return!1}return this.nodes.result.classList.remove(this.classes.visibleVariant),removeInputAttributes(this.nodes.input),this._removeInputEventListeners(),this._removeBodyEventListener(),this._removeAccessibilityAnnouncer(),this._removeClearButtonEventListener(),isFunction(this.callbacks.onDestroy)&&this.callbacks.onDestroy(this.nodes),!0},PredictiveSearchComponent.prototype.clearAndClose=function(){this.nodes.input.value="",this.close()};function getTypeOf(value){return Object.prototype.toString.call(value)}function isString(value){return getTypeOf(value)==="[object String]"}function isBoolean(value){return getTypeOf(value)==="[object Boolean]"}function isFunction(value){return getTypeOf(value)==="[object Function]"}return PredictiveSearchComponent}(Shopify.theme.PredictiveSearch),theme.TouchEvents=function(element,options){this.axis,this.checkEvents=[],this.eventHandlers={},this.eventModel={},this.events=[["touchstart","touchmove","touchend","touchcancel"],["pointerdown","pointermove","pointerup","pointercancel"],["mousedown","mousemove","mouseup"]],this.eventType,this.difference={},this.direction,this.start={},this.element=element,this.options=Object.assign({},{dragThreshold:10,start:function(){},move:function(){},end:function(){}},options),this.checkEvents=this._getCheckEvents(),this.eventModel=this._getEventModel(),this._setupEventHandlers()},theme.TouchEvents.prototype=Object.assign({},theme.TouchEvents.prototype,{destroy:function(){this.element.removeEventListener("dragstart",this.eventHandlers.preventDefault),this.element.removeEventListener(this.events[this.eventModel][0],this.eventHandlers.touchStart),this.eventModel||this.element.removeEventListener(this.events[2][0],this.eventHandlers.touchStart),this.element.removeEventListener("click",this.eventHandlers.preventClick)},_setupEventHandlers:function(){this.eventHandlers.preventDefault=this._preventDefault.bind(this),this.eventHandlers.preventClick=this._preventClick.bind(this),this.eventHandlers.touchStart=this._touchStart.bind(this),this.eventHandlers.touchMove=this._touchMove.bind(this),this.eventHandlers.touchEnd=this._touchEnd.bind(this),this.element.addEventListener("dragstart",this.eventHandlers.preventDefault),this.element.addEventListener(this.events[this.eventModel][0],this.eventHandlers.touchStart),this.eventModel||this.element.addEventListener(this.events[2][0],this.eventHandlers.touchStart),this.element.addEventListener("click",this.eventHandlers.preventClick)},_touchStart:function(event){this.eventType=this.eventModel,event.type==="mousedown"&&!this.eventModel&&(this.eventType=2),!this.checkEvents[this.eventType](event)&&(this.eventType&&this._preventDefault(event),document.addEventListener(this.events[this.eventType][1],this.eventHandlers.touchMove),document.addEventListener(this.events[this.eventType][2],this.eventHandlers.touchEnd),this.eventType<2&&document.addEventListener(this.events[this.eventType][3],this.eventHandlers.touchEnd),this.start={xPosition:this.eventType?event.clientX:event.touches[0].clientX,yPosition:this.eventType?event.clientY:event.touches[0].clientY,time:new Date().getTime()},Object.keys(this.difference).forEach(function(key){delete this.difference[key]}.bind(this)),this.options.start(event))},_touchMove:function(event){this.difference=this._getDifference(event),document["on"+this.events[this.eventType][1]]=function(event2){this._preventDefault(event2)}.bind(this),this.axis?this.axis==="xPosition"?this.direction=this.difference.xPosition<0?"left":"right":this.axis==="yPosition"&&(this.direction=this.difference.yPosition<0?"up":"down"):this.options.dragThreshold1||event.scale&&event.scale!==1},function(event){return!event.isPrimary||event.buttons&&event.buttons!==1||event.pointerType!=="touch"&&event.pointerType!=="pen"},function(event){return event.buttons&&event.buttons!==1}]},_getEventModel:function(){return window.navigator.pointerEnabled?1:0},_preventDefault:function(event){event.preventDefault?event.preventDefault():event.returnValue=!1},_preventClick:function(event){Math.abs(this.difference.xPosition)>this.options.dragThreshold&&this._preventDefault(event)}}),theme.Drawers=function(){function Drawer(id,position,options){var DEFAULT_OPEN_CLASS="js-drawer-open",DEFAULT_CLOSE_CLASS="js-drawer-close",defaults={selectors:{openVariant:"."+DEFAULT_OPEN_CLASS+"-"+position,close:"."+DEFAULT_CLOSE_CLASS},classes:{open:DEFAULT_OPEN_CLASS,openVariant:DEFAULT_OPEN_CLASS+"-"+position},withPredictiveSearch:!1};if(this.nodes={parents:[document.documentElement,document.body],page:document.getElementById("PageContainer")},this.eventHandlers={},this.config=Object.assign({},defaults,options),this.position=position,this.drawer=document.getElementById(id),!this.drawer)return!1;this.drawerIsOpen=!1,this.init()}return Drawer.prototype.init=function(){document.querySelector(this.config.selectors.openVariant).addEventListener("click",this.open.bind(this)),this.drawer.querySelector(this.config.selectors.close).addEventListener("click",this.close.bind(this))},Drawer.prototype.open=function(evt){var externalCall=!1;if(evt?evt.preventDefault():externalCall=!0,evt&&evt.stopPropagation&&(evt.stopPropagation(),this.activeSource=evt.currentTarget),this.drawerIsOpen&&!externalCall)return this.close();this.config.withPredictiveSearch||theme.Helpers.prepareTransition(this.drawer),this.nodes.parents.forEach(function(parent){parent.classList.add(this.config.classes.open,this.config.classes.openVariant)}.bind(this)),this.drawerIsOpen=!0,this.config.onDrawerOpen&&typeof this.config.onDrawerOpen=="function"&&(externalCall||this.config.onDrawerOpen()),this.activeSource&&this.activeSource.hasAttribute("aria-expanded")&&this.activeSource.setAttribute("aria-expanded","true");var trapFocusConfig={container:this.drawer};return this.config.elementToFocusOnOpen&&(trapFocusConfig.elementToFocus=this.config.elementToFocusOnOpen),slate.a11y.trapFocus(trapFocusConfig),this.bindEvents(),this},Drawer.prototype.close=function(){this.drawerIsOpen&&(document.activeElement.dispatchEvent(new CustomEvent("blur",{bubbles:!0,cancelable:!0})),this.config.withPredictiveSearch||theme.Helpers.prepareTransition(this.drawer),this.nodes.parents.forEach(function(parent){parent.classList.remove(this.config.classes.open,this.config.classes.openVariant)}.bind(this)),this.activeSource&&this.activeSource.hasAttribute("aria-expanded")&&this.activeSource.setAttribute("aria-expanded","false"),this.drawerIsOpen=!1,slate.a11y.removeTrapFocus({container:this.drawer}),this.unbindEvents(),this.config.onDrawerClose&&typeof this.config.onDrawerClose=="function"&&this.config.onDrawerClose())},Drawer.prototype.bindEvents=function(){this.eventHandlers.drawerKeyupHandler=function(evt){return evt.keyCode===27?(this.close(),!1):!0}.bind(this),this.eventHandlers.drawerTouchmoveHandler=function(){return!1},this.eventHandlers.drawerClickHandler=function(){return this.close(),!1}.bind(this),document.body.addEventListener("keyup",this.eventHandlers.drawerKeyupHandler),this.nodes.page.addEventListener("touchmove",this.eventHandlers.drawerTouchmoveHandler),this.nodes.page.addEventListener("click",this.eventHandlers.drawerClickHandler)},Drawer.prototype.unbindEvents=function(){this.nodes.page.removeEventListener("touchmove",this.eventHandlers.drawerTouchmoveHandler),this.nodes.page.removeEventListener("click",this.eventHandlers.drawerClickHandler),document.body.removeEventListener("keyup",this.eventHandlers.drawerKeyupHandler)},Drawer}(),theme.Helpers=function(){var touchDevice=!1,classes={preventScrolling:"prevent-scrolling"},scrollPosition=window.pageYOffset;function setTouch(){touchDevice=!0}function isTouch(){return touchDevice}function enableScrollLock(){scrollPosition=window.pageYOffset,document.body.style.top="-"+scrollPosition+"px",document.body.classList.add(classes.preventScrolling)}function disableScrollLock(){document.body.classList.remove(classes.preventScrolling),document.body.style.removeProperty("top"),window.scrollTo(0,scrollPosition)}function debounce(func,wait,immediate){var timeout;return function(){var context=this,args=arguments,later=function(){timeout=null,immediate||func.apply(context,args)},callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout(later,wait),callNow&&func.apply(context,args)}}function getScript(source,beforeEl){return new Promise(function(resolve,reject){var script=document.createElement("script"),prior=beforeEl||document.getElementsByTagName("script")[0];script.async=!0,script.defer=!0;function onloadHander(_,isAbort){(isAbort||!script.readyState||/loaded|complete/.test(script.readyState))&&(script.onload=null,script.onreadystatechange=null,script=void 0,isAbort?reject():resolve())}script.onload=onloadHander,script.onreadystatechange=onloadHander,script.src=source,prior.parentNode.insertBefore(script,prior)})}function prepareTransition(element){element.addEventListener("transitionend",function(event){event.currentTarget.classList.remove("is-transitioning")},{once:!0});var properties=["transition-duration","-moz-transition-duration","-webkit-transition-duration","-o-transition-duration"],duration=0;properties.forEach(function(property){var computedValue=getComputedStyle(element)[property];computedValue&&(computedValue.replace(/\D/g,""),duration||(duration=parseFloat(computedValue)))}),duration!==0&&(element.classList.add("is-transitioning"),element.offsetWidth)}/*! * Serialize all form data into a SearchParams string * (c) 2020 Chris Ferdinandi, MIT License, https://gomakethings.com * @param {Node} form The form to serialize * @return {String} The serialized form data */function serialize(form){var arr=[];return Array.prototype.slice.call(form.elements).forEach(function(field){if(!(!field.name||field.disabled||["file","reset","submit","button"].indexOf(field.type)>-1)){if(field.type==="select-multiple"){Array.prototype.slice.call(field.options).forEach(function(option){option.selected&&arr.push(encodeURIComponent(field.name)+"="+encodeURIComponent(option.value))});return}["checkbox","radio"].indexOf(field.type)>-1&&!field.checked||arr.push(encodeURIComponent(field.name)+"="+encodeURIComponent(field.value))}}),arr.join("&")}function cookiesEnabled(){var cookieEnabled=navigator.cookieEnabled;return cookieEnabled||(document.cookie="testcookie",cookieEnabled=document.cookie.indexOf("testcookie")!==-1),cookieEnabled}function promiseStylesheet(stylesheet){var stylesheetUrl=stylesheet||theme.stylesheet;return typeof this.stylesheetPromise=="undefined"&&(this.stylesheetPromise=new Promise(function(resolve){var link=document.querySelector('link[href="'+stylesheetUrl+'"]');link.loaded&&resolve(),link.addEventListener("load",function(){setTimeout(resolve,0)})})),this.stylesheetPromise}return{setTouch:setTouch,isTouch:isTouch,enableScrollLock:enableScrollLock,disableScrollLock:disableScrollLock,debounce:debounce,getScript:getScript,prepareTransition:prepareTransition,serialize:serialize,cookiesEnabled:cookiesEnabled,promiseStylesheet:promiseStylesheet}}(),theme.LibraryLoader=function(){var types={link:"link",script:"script"},status2={requested:"requested",loaded:"loaded"},cloudCdn="https://cdn.shopify.com/shopifycloud/",libraries={plyrShopifyStyles:{tagId:"plyr-shopify-styles",src:cloudCdn+"plyr/v2.0/shopify-plyr.css",type:types.link},modelViewerUiStyles:{tagId:"shopify-model-viewer-ui-styles",src:cloudCdn+"model-viewer-ui/assets/v1.0/model-viewer-ui.css",type:types.link}};function load(libraryName,callback){var library=libraries[libraryName];if(library&&library.status!==status2.requested){if(callback=callback||function(){},library.status===status2.loaded){callback();return}library.status=status2.requested;var tag;switch(library.type){case types.script:tag=createScriptTag(library,callback);break;case types.link:tag=createLinkTag(library,callback);break}tag.id=library.tagId,library.element=tag;var firstScriptTag=document.getElementsByTagName(library.type)[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}}function createScriptTag(library,callback){var tag=document.createElement("script");return tag.src=library.src,tag.addEventListener("load",function(){library.status=status2.loaded,callback()}),tag}function createLinkTag(library,callback){var tag=document.createElement("link");return tag.href=library.src,tag.rel="stylesheet",tag.type="text/css",tag.addEventListener("load",function(){library.status=status2.loaded,callback()}),tag}return{load:load}}(),theme.Header=function(){var selectors2={body:"body",navigation:"#AccessibleNav",siteNavHasDropdown:"[data-has-dropdowns]",siteNavChildLinks:".site-nav__child-link",siteNavActiveDropdown:".site-nav--active-dropdown",siteNavHasCenteredDropdown:".site-nav--has-centered-dropdown",siteNavCenteredDropdown:".site-nav__dropdown--centered",siteNavLinkMain:".site-nav__link--main",siteNavChildLink:".site-nav__link--last",siteNavDropdown:".site-nav__dropdown",siteHeader:".site-header"},config={activeClass:"site-nav--active-dropdown",childLinkClass:"site-nav__child-link",rightDropdownClass:"site-nav__dropdown--right",leftDropdownClass:"site-nav__dropdown--left"},cache={};function init(){cacheSelectors(),styleDropdowns(document.querySelectorAll(selectors2.siteNavHasDropdown)),positionFullWidthDropdowns(),cache.parents.forEach(function(element){element.addEventListener("click",submenuParentClickHandler)}),cache.siteNavChildLink.forEach(function(element){element.addEventListener("focusout",submenuFocusoutHandler)}),cache.topLevel.forEach(function(element){element.addEventListener("focus",hideDropdown)}),cache.subMenuLinks.forEach(function(element){element.addEventListener("click",stopImmediatePropagation)}),window.addEventListener("resize",resizeHandler)}function stopImmediatePropagation(event){event.stopImmediatePropagation()}function cacheSelectors(){var navigation=document.querySelector(selectors2.navigation);cache={nav:navigation,topLevel:document.querySelectorAll(selectors2.siteNavLinkMain),parents:navigation.querySelectorAll(selectors2.siteNavHasDropdown),subMenuLinks:document.querySelectorAll(selectors2.siteNavChildLinks),activeDropdown:document.querySelector(selectors2.siteNavActiveDropdown),siteHeader:document.querySelector(selectors2.siteHeader),siteNavChildLink:document.querySelectorAll(selectors2.siteNavChildLink)}}function showDropdown(element){element.classList.add(config.activeClass),cache.activeDropdown&&hideDropdown(),cache.activeDropdown=element,element.querySelector(selectors2.siteNavLinkMain).setAttribute("aria-expanded","true"),setTimeout(function(){window.addEventListener("keyup",keyUpHandler),document.body.addEventListener("click",hideDropdown)},250)}function hideDropdown(){cache.activeDropdown&&(cache.activeDropdown.querySelector(selectors2.siteNavLinkMain).setAttribute("aria-expanded","false"),cache.activeDropdown.classList.remove(config.activeClass),cache.activeDropdown=document.querySelector(selectors2.siteNavActiveDropdown),window.removeEventListener("keyup",keyUpHandler),document.body.removeEventListener("click",hideDropdown))}function styleDropdowns(dropdownListItems){dropdownListItems.forEach(function(item){var dropdownLi=item.querySelector(selectors2.siteNavDropdown);dropdownLi&&(isRightOfLogo(item)?(dropdownLi.classList.remove(config.leftDropdownClass),dropdownLi.classList.add(config.rightDropdownClass)):(dropdownLi.classList.remove(config.rightDropdownClass),dropdownLi.classList.add(config.leftDropdownClass)))})}function isRightOfLogo(item){var rect=item.getBoundingClientRect(),win=item.ownerDocument.defaultView,leftOffset=rect.left+win.pageXOffset,headerWidth=Math.floor(cache.siteHeader.offsetWidth)/2;return leftOffset>headerWidth}function positionFullWidthDropdowns(){document.querySelectorAll(selectors2.siteNavHasCenteredDropdown).forEach(function(el){var fullWidthDropdown=el.querySelector(selectors2.siteNavCenteredDropdown),fullWidthDropdownOffset=el.offsetTop+41;fullWidthDropdown.style.top=fullWidthDropdownOffset+"px"})}function keyUpHandler(event){event.keyCode===27&&hideDropdown()}function resizeHandler(){adjustStyleAndPosition()}function submenuParentClickHandler(event){var element=event.currentTarget;element.classList.contains(config.activeClass)?hideDropdown():showDropdown(element)}function submenuFocusoutHandler(){setTimeout(function(){document.activeElement.classList.contains(config.childLinkClass)||!cache.activeDropdown||hideDropdown()})}var adjustStyleAndPosition=theme.Helpers.debounce(function(){styleDropdowns(document.querySelectorAll(selectors2.siteNavHasDropdown)),positionFullWidthDropdowns()},50);function unload(){cache.topLevel.forEach(function(element){element.removeEventListener("focus",hideDropdown)}),cache.subMenuLinks.forEach(function(element){element.removeEventListener("click",stopImmediatePropagation)}),cache.parents.forEach(function(element){element.removeEventListener("click",submenuParentClickHandler)}),cache.siteNavChildLink.forEach(function(element){element.removeEventListener("focusout",submenuFocusoutHandler)}),window.removeEventListener("resize",resizeHandler),window.removeEventListener("keyup",keyUpHandler),document.body.removeEventListener("click",hideDropdown)}return{init:init,unload:unload}}(),theme.MobileNav=function(){var classes={mobileNavOpenIcon:"mobile-nav--open",mobileNavCloseIcon:"mobile-nav--close",navLinkWrapper:"mobile-nav__item",navLink:"mobile-nav__link",subNavLink:"mobile-nav__sublist-link",return:"mobile-nav__return-btn",subNavActive:"is-active",subNavClosing:"is-closing",navOpen:"js-menu--is-open",subNavShowing:"sub-nav--is-open",thirdNavShowing:"third-nav--is-open",subNavToggleBtn:"js-toggle-submenu"},cache={},isTransitioning,activeSubNav,activeTrigger,menuLevel=1,mediumUpQuery="(min-width: "+theme.breakpoints.medium+"px)",mql=window.matchMedia(mediumUpQuery);function init(){cacheSelectors(),cache.mobileNavToggle&&cache.mobileNavToggle.addEventListener("click",toggleMobileNav),cache.subNavToggleBtns.forEach(function(element){element.addEventListener("click",toggleSubNav)}),mql.addListener(initBreakpoints)}function initBreakpoints(){mql.matches&&cache.mobileNavContainer.classList.contains(classes.navOpen)&&closeMobileNav()}function toggleMobileNav(){var mobileNavIsOpen=cache.mobileNavToggle.classList.contains(classes.mobileNavCloseIcon);mobileNavIsOpen?closeMobileNav():openMobileNav()}function cacheSelectors(){cache={pageContainer:document.querySelector("#PageContainer"),siteHeader:document.querySelector(".site-header"),mobileNavToggle:document.querySelector(".js-mobile-nav-toggle"),mobileNavContainer:document.querySelector(".mobile-nav-wrapper"),mobileNav:document.querySelector("#MobileNav"),sectionHeader:document.querySelector("#shopify-section-header"),subNavToggleBtns:document.querySelectorAll("."+classes.subNavToggleBtn)}}function openMobileNav(){var translateHeaderHeight=cache.siteHeader.offsetHeight;theme.Helpers.prepareTransition(cache.mobileNavContainer),cache.mobileNavContainer.classList.add(classes.navOpen),cache.mobileNavContainer.style.transform="translateY("+translateHeaderHeight+"px)",cache.pageContainer.style.transform="translate3d(0, "+cache.mobileNavContainer.scrollHeight+"px, 0)",slate.a11y.trapFocus({container:cache.sectionHeader,elementToFocus:cache.mobileNavToggle}),cache.mobileNavToggle.classList.add(classes.mobileNavCloseIcon),cache.mobileNavToggle.classList.remove(classes.mobileNavOpenIcon),cache.mobileNavToggle.setAttribute("aria-expanded",!0),window.addEventListener("keyup",keyUpHandler)}function keyUpHandler(event){event.which===27&&closeMobileNav()}function closeMobileNav(){theme.Helpers.prepareTransition(cache.mobileNavContainer),cache.mobileNavContainer.classList.remove(classes.navOpen),cache.mobileNavContainer.style.transform="translateY(-100%)",cache.pageContainer.setAttribute("style",""),slate.a11y.trapFocus({container:document.querySelector("html"),elementToFocus:document.body}),cache.mobileNavContainer.addEventListener("transitionend",mobileNavRemoveTrapFocus,{once:!0}),cache.mobileNavToggle.classList.add(classes.mobileNavOpenIcon),cache.mobileNavToggle.classList.remove(classes.mobileNavCloseIcon),cache.mobileNavToggle.setAttribute("aria-expanded",!1),cache.mobileNavToggle.focus(),window.removeEventListener("keyup",keyUpHandler)}function mobileNavRemoveTrapFocus(){slate.a11y.removeTrapFocus({container:cache.mobileNav})}function toggleSubNav(event){if(!isTransitioning){var toggleBtn=event.currentTarget,isReturn=toggleBtn.classList.contains(classes.return);if(isTransitioning=!0,isReturn){var subNavToggleBtn=document.querySelectorAll("."+classes.subNavToggleBtn+"[data-level='"+(menuLevel-1)+"']");subNavToggleBtn.forEach(function(element){element.classList.remove(classes.subNavActive)}),activeTrigger&&activeTrigger.classList.remove(classes.subNavActive)}else toggleBtn.classList.add(classes.subNavActive);activeTrigger=toggleBtn,goToSubnav(toggleBtn.getAttribute("data-target"))}}function goToSubnav(target){var targetMenu=target?document.querySelector('.mobile-nav__dropdown[data-parent="'+target+'"]'):cache.mobileNav;menuLevel=targetMenu.dataset.level?Number(targetMenu.dataset.level):1,activeSubNav&&(theme.Helpers.prepareTransition(activeSubNav),activeSubNav.classList.add(classes.subNavClosing)),activeSubNav=targetMenu;var translateMenuHeight=targetMenu.offsetHeight,openNavClass=menuLevel>2?classes.thirdNavShowing:classes.subNavShowing;cache.mobileNavContainer.style.height=translateMenuHeight+"px",cache.mobileNavContainer.classList.remove(classes.thirdNavShowing),cache.mobileNavContainer.classList.add(openNavClass),target||cache.mobileNavContainer.classList.remove(classes.thirdNavShowing,classes.subNavShowing);var container=menuLevel===1?cache.sectionHeader:targetMenu;cache.mobileNavContainer.addEventListener("transitionend",trapMobileNavFocus,{once:!0});function trapMobileNavFocus(){slate.a11y.trapFocus({container:container}),cache.mobileNavContainer.removeEventListener("transitionend",trapMobileNavFocus),isTransitioning=!1}cache.pageContainer.style.transform="translateY("+translateMenuHeight+"px)",activeSubNav.classList.remove(classes.subNavClosing)}function unload(){mql.removeListener(initBreakpoints)}return{init:init,unload:unload,closeMobileNav:closeMobileNav}}(),window.Modals=function(){function Modal(id,name,options){var defaults={close:".js-modal-close",open:".js-modal-open-"+name,openClass:"modal--is-active",closeModalOnClick:!1};if(this.modal=document.getElementById(id),!this.modal)return!1;this.nodes={parents:[document.querySelector("html"),document.body]},this.config=Object.assign(defaults,options),this.modalIsOpen=!1,this.focusOnOpen=this.config.focusOnOpen?document.getElementById(this.config.focusOnOpen):this.modal,this.openElement=document.querySelector(this.config.open),this.init()}return Modal.prototype.init=function(){this.openElement.addEventListener("click",this.open.bind(this)),this.modal.querySelector(this.config.close).addEventListener("click",this.closeModal.bind(this))},Modal.prototype.open=function(evt){var self2=this,externalCall=!1;this.modalIsOpen||(evt?evt.preventDefault():externalCall=!0,evt&&evt.stopPropagation&&evt.stopPropagation(),this.modalIsOpen&&!externalCall&&this.closeModal(),this.modal.classList.add(this.config.openClass),this.nodes.parents.forEach(function(node){node.classList.add(self2.config.openClass)}),this.modalIsOpen=!0,slate.a11y.trapFocus({container:this.modal,elementToFocus:this.focusOnOpen}),this.bindEvents())},Modal.prototype.closeModal=function(){if(this.modalIsOpen){document.activeElement.blur(),this.modal.classList.remove(this.config.openClass);var self2=this;this.nodes.parents.forEach(function(node){node.classList.remove(self2.config.openClass)}),this.modalIsOpen=!1,slate.a11y.removeTrapFocus({container:this.modal}),this.openElement.focus(),this.unbindEvents()}},Modal.prototype.bindEvents=function(){this.keyupHandler=this.keyupHandler.bind(this),this.clickHandler=this.clickHandler.bind(this),document.body.addEventListener("keyup",this.keyupHandler),document.body.addEventListener("click",this.clickHandler)},Modal.prototype.unbindEvents=function(){document.body.removeEventListener("keyup",this.keyupHandler),document.body.removeEventListener("click",this.clickHandler)},Modal.prototype.keyupHandler=function(event){event.keyCode===27&&this.closeModal()},Modal.prototype.clickHandler=function(event){this.config.closeModalOnClick&&!this.modal.contains(event.target)&&this.closeModal()},Modal}(),function(){var selectors2={backButton:".return-link"},backButton=document.querySelector(selectors2.backButton);if(!document.referrer||!backButton||!window.history.length)return;backButton.addEventListener("click",function(evt){evt.preventDefault();var referrerDomain=urlDomain(document.referrer),shopDomain=urlDomain(window.location.href);return shopDomain===referrerDomain&&history.back(),!1},{once:!0});function urlDomain(url){var anchor=document.createElement("a");return anchor.ref=url,anchor.hostname}}(),theme.Slideshow=function(){var selectors2={button:"[data-slider-button]",indicator:"[data-slider-indicator]",indicators:"[data-slider-indicators]",pause:"[data-slider-pause]",slider:"[data-slider]",sliderItem:"[data-slider-item]",sliderItemLink:"[data-slider-item-link]",sliderTrack:"[data-slider-track]",sliderContainer:"[data-slider-container]"},classes={isPaused:"slideshow__pause--is-paused",indicator:"slider-indicators__item",indicatorActive:"slick-active",sliderInitialized:"slick-initialized",slideActive:"slideshow__slide--active",slideClone:"slick-cloned"},attributes={buttonNext:"data-slider-button-next"};function Slideshow(container,options){this.container=container,this.slider=this.container.querySelector(selectors2.slider),this.slider&&(this.eventHandlers={},this.lastSlide=0,this.slideIndex=0,this.sliderContainer=null,this.slides=[],this.options=Object.assign({},{autoplay:!1,canUseKeyboardArrows:!0,canUseTouchEvents:!1,slideActiveClass:classes.slideActive,slideInterval:0,slidesToShow:0,slidesToScroll:1,type:"fade"},options),this.sliderContainer=this.slider.querySelector(selectors2.sliderContainer),this.adaptHeight=this.sliderContainer.getAttribute("data-adapt-height")==="true",this.slides=Array.from(this.sliderContainer.querySelectorAll(selectors2.sliderItem)),this.lastSlide=this.slides.length-1,this.buttons=this.container.querySelectorAll(selectors2.button),this.pause=this.container.querySelector(selectors2.pause),this.indicators=this.container.querySelectorAll(selectors2.indicators),!(this.slides.length<=1)&&(this.timeout=250,this.options.autoplay&&this.startAutoplay(),this.adaptHeight&&this.setSlideshowHeight(),this.options.type==="slide"?(this.isFirstSlide=!1,this.isLastSlide=!1,this.sliderItemWidthTotal=0,this.sliderTrack=this.slider.querySelector(selectors2.sliderTrack),this.sliderItemWidthTotal=0,theme.Helpers.promiseStylesheet().then(function(){this._setupSlideType()}.bind(this))):this.setupSlider(0),this._setupEventHandlers()))}return Slideshow.prototype=Object.assign({},Slideshow.prototype,{previousSlide:function(){this._move()},nextSlide:function(){this._move("next")},setSlide:function(index){this._setPosition(Number(index))},startAutoplay:function(){this.isAutoPlaying=!0,window.clearTimeout(this.autoTimeOut),this.autoTimeOut=window.setTimeout(function(){var nextSlideIndex=this._getNextSlideIndex("next");this._setPosition(nextSlideIndex)}.bind(this),this.options.slideInterval)},stopAutoplay:function(){this.isAutoPlaying=!1,window.clearTimeout(this.autoTimeOut)},setupSlider:function(index){this.slideIndex=index,this.indicators.length&&this._setActiveIndicator(index),this._setupActiveSlide(index)},destroy:function(){this.adaptHeight&&window.removeEventListener("resize",this.eventHandlers.debounceResize),this.container.removeEventListener("focus",this.eventHandlers.focus,!0),this.slider.removeEventListener("focusin",this.eventHandlers.focusIn,!0),this.slider.removeEventListener("focusout",this.eventHandlers.focusOut,!0),this.container.removeEventListener("blur",this.eventHandlers.blur,!0),this.buttons&&this.buttons.forEach(function(button){button.removeEventListener("click",this.eventHandlers.clickButton)}.bind(this)),this.indicators.forEach(function(indicatorWrapper){indicatorWrapper.childNodes.forEach(function(indicator){indicator.firstElementChild.removeEventListener("click",this.eventHandlers.onClickIndicator),indicator.firstElementChild.removeEventListener("keydown",this.eventHandlers.onKeydownIndicator)},this)},this),this.options.type==="slide"&&(window.removeEventListener("resize",this.eventHandlers.debounceResizeSlideIn),this.touchEvents&&this.options.canUseTouchEvents&&(this.touchEvents.destroy(),this.touchEvents=null))},_setupEventHandlers:function(){this.eventHandlers.focus=this._onFocus.bind(this),this.eventHandlers.focusIn=this._onFocusIn.bind(this),this.eventHandlers.focusOut=this._onFocusOut.bind(this),this.eventHandlers.blur=this._onBlur.bind(this),this.eventHandlers.keyUp=this._onKeyUp.bind(this),this.eventHandlers.clickButton=this._onClickButton.bind(this),this.eventHandlers.onClickIndicator=this._onClickIndicator.bind(this),this.eventHandlers.onKeydownIndicator=this._onKeydownIndicator.bind(this),this.eventHandlers.onClickPause=this._onClickPause.bind(this),this.adaptHeight&&(this.eventHandlers.debounceResize=theme.Helpers.debounce(function(){this.setSlideshowHeight()}.bind(this),50),window.addEventListener("resize",this.eventHandlers.debounceResize)),this.container.addEventListener("focus",this.eventHandlers.focus,!0),this.slider.addEventListener("focusin",this.eventHandlers.focusIn,!0),this.slider.addEventListener("focusout",this.eventHandlers.focusOut,!0),this.container.addEventListener("blur",this.eventHandlers.blur,!0),this.buttons&&this.buttons.forEach(function(button){button.addEventListener("click",this.eventHandlers.clickButton)}.bind(this)),this.pause&&this.pause.addEventListener("click",this.eventHandlers.onClickPause),this.indicators.forEach(function(indicatorWrapper){indicatorWrapper.childNodes.forEach(function(indicator){indicator.firstElementChild.addEventListener("click",this.eventHandlers.onClickIndicator),indicator.firstElementChild.addEventListener("keydown",this.eventHandlers.onKeydownIndicator)},this)},this),this.options.type==="slide"&&(this.eventHandlers.debounceResizeSlideIn=theme.Helpers.debounce(function(){this.sliderItemWidthTotal=0,this._setupSlideType(!0)}.bind(this),50),window.addEventListener("resize",this.eventHandlers.debounceResizeSlideIn),this.options.canUseTouchEvents&&this.options.slidesToScroll=window.innerWidth-threshold)){event.target.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}));return}direction!=="left"&&direction!=="right"||(this.touchMovePosition=this.touchStartPosition+difference.xPosition,this.sliderTrack.style.transform="translateX("+this.touchMovePosition+"px")},_onTouchEnd:function(event,direction,difference){var nextTranslateXPosition=0;if(Object.keys(difference).length!==0){var slideDirection=direction==="left"?"next":"";direction==="left"?this._isNextTranslateXLast(this.touchStartPosition)?nextTranslateXPosition=this.touchStartPosition:nextTranslateXPosition=this.touchStartPosition-this.sliderTranslateXMove:(nextTranslateXPosition=this.touchStartPosition+this.sliderTranslateXMove,this._isNextTranslateXFirst(this.touchStartPosition)&&(nextTranslateXPosition=0)),this.slideIndex=this._getNextSlideIndex(slideDirection),this.sliderTrack.style.transition="transform 500ms ease 0s",this.sliderTrack.style.transform="translateX("+nextTranslateXPosition+"px",window.setTimeout(function(){this.sliderTrack.style.transition=""}.bind(this),500),this._verifyFirstLastSlideTranslateX(nextTranslateXPosition),this._postTransitionEnd()}},_onClickButton:function(event){if(!(event.detail>1)){var button=event.currentTarget,nextButton=button.hasAttribute(attributes.buttonNext);this.options.type==="slide"&&button.getAttribute("aria-disabled")==="true"||(this.options.autoplay&&this.isAutoPlaying&&this.stopAutoplay(),nextButton?this.nextSlide():this.previousSlide())}},_onClickIndicator:function(event){event.preventDefault(),!event.target.classList.contains(classes.indicatorActive)&&(this.options.autoplay&&this.isAutoPlaying&&this.stopAutoplay(),this.slideIndex=Number(event.target.dataset.slideNumber),this.goToSlideByIndex(this.slideIndex))},goToSlideByIndex:function(index){if(this._setPosition(index),this.options.type==="slide"&&this.sliderTrack){this.sliderTrack.style.transition="transform 500ms ease 0s";var newPosition=index*this.slides[0].offsetWidth;this.sliderTrack.style.transform="translateX(-"+newPosition+"px)",this.options.slidesToShow>1&&(this._verifyFirstLastSlideTranslateX(newPosition),this.buttons.length&&this._disableArrows(),this._setupMultipleActiveSlide(index,index+(this.options.slidesToShow-1)))}},_onKeydownIndicator:function(event){event.keyCode===slate.utils.keyboardKeys.ENTER&&(this._onClickIndicator(event),this.slider.focus())},_onClickPause:function(event){event.currentTarget.classList.contains(classes.isPaused)?(event.currentTarget.classList.remove(classes.isPaused),this.startAutoplay()):(event.currentTarget.classList.add(classes.isPaused),this.stopAutoplay())},_onFocus:function(){this.container.addEventListener("keyup",this.eventHandlers.keyUp)},_onFocusIn:function(){this.slider.hasAttribute("aria-live")||(this.options.autoplay&&this.isAutoPlaying&&this.stopAutoplay(),this.slider.setAttribute("aria-live","polite"))},_onBlur:function(){this.container.removeEventListener("keyup",this.eventHandlers.keyUp)},_onFocusOut:function(){this.slider.removeAttribute("aria-live"),setTimeout(function(){document.activeElement.closest("#"+this.slider.getAttribute("id"))||this.options.autoplay&&!this.isAutoPlaying&&!this.pause.classList.contains(classes.isPaused)&&this.startAutoplay()}.bind(this),this.timeout)},_onKeyUp:function(event){switch(event.keyCode){case slate.utils.keyboardKeys.LEFTARROW:if(!this.options.canUseKeyboardArrows||this.options.type==="slide"&&this.isFirstSlide)return;this.previousSlide();break;case slate.utils.keyboardKeys.RIGHTARROW:if(!this.options.canUseKeyboardArrows||this.options.type==="slide"&&this.isLastSlide)return;this.nextSlide();break;case slate.utils.keyboardKeys.ESCAPE:this.slider.blur();break}},_move:function(direction){if(this.options.type==="slide")this.slideIndex=this._getNextSlideIndex(direction),this._moveSlideshow(direction);else{var nextSlideIndex=this._getNextSlideIndex(direction);this._setPosition(nextSlideIndex)}},_moveSlideshow:function(direction){this.direction=direction;var valueXToMove=0,currentTranslateXPosition=this._getTranslateXPosition(),currentActiveSlidesIndex=this._getActiveSlidesIndex(),currentActiveSlidesMinIndex=Math.min.apply(Math,currentActiveSlidesIndex),currentActiveSlidesMaxIndex=Math.max.apply(Math,currentActiveSlidesIndex);this.nextMinIndex=direction==="next"?currentActiveSlidesMinIndex+this.options.slidesToShow:currentActiveSlidesMinIndex-this.options.slidesToShow,this.nextMaxIndex=direction==="next"?currentActiveSlidesMaxIndex+this.options.slidesToShow:currentActiveSlidesMinIndex-1,this.sliderTrack.style.transition="transform 500ms ease 0s",direction==="next"?(valueXToMove=currentTranslateXPosition-this.sliderTranslateXMove,this.sliderTrack.style.transform="translateX("+valueXToMove+"px)"):(valueXToMove=currentTranslateXPosition+this.sliderTranslateXMove,this.sliderTrack.style.transform="translateX("+valueXToMove+"px)"),this._verifyFirstLastSlideTranslateX(valueXToMove),this._postTransitionEnd(),this._setupMultipleActiveSlide(this.nextMinIndex,this.nextMaxIndex)},_setPosition:function(nextSlideIndex){this.slideIndex=nextSlideIndex,this.indicators.length&&this._setActiveIndicator(nextSlideIndex),this._setupActiveSlide(nextSlideIndex),this.options.autoplay&&this.isAutoPlaying&&this.startAutoplay(),this.container.dispatchEvent(new CustomEvent("slider_slide_changed",{detail:nextSlideIndex}))},_setupActiveSlide:function(index){this.slides.forEach(function(slide){slide.setAttribute("aria-hidden",!0),slide.classList.remove(this.options.slideActiveClass)},this),this.slides[index].setAttribute("aria-hidden",!1),this.slides[index].classList.add(this.options.slideActiveClass)},_setupMultipleActiveSlide:function(minIndex,maxIndex){this.slides.forEach(function(slide){var sliderIndex=Number(slide.getAttribute("data-slider-slide-index")),sliderItemLink=slide.querySelector(selectors2.sliderItemLink);slide.setAttribute("aria-hidden",!0),slide.classList.remove(this.options.slideActiveClass),sliderItemLink&&sliderItemLink.setAttribute("tabindex",-1),sliderIndex>=minIndex&&sliderIndex<=maxIndex&&(slide.setAttribute("aria-hidden",!1),slide.classList.add(this.options.slideActiveClass),sliderItemLink&&sliderItemLink.setAttribute("tabindex",0))},this)},_setActiveIndicator:function(index){this.indicators.forEach(function(indicatorWrapper){var activeIndicator=indicatorWrapper.querySelector("."+classes.indicatorActive),nextIndicator=indicatorWrapper.childNodes[index];activeIndicator&&(activeIndicator.setAttribute("aria-selected",!1),activeIndicator.classList.remove(classes.indicatorActive),activeIndicator.firstElementChild.removeAttribute("aria-current")),nextIndicator.classList.add(classes.indicatorActive),nextIndicator.setAttribute("aria-selected",!0),nextIndicator.firstElementChild.setAttribute("aria-current",!0)},this)},setSlideshowHeight:function(){var minAspectRatio=this.sliderContainer.getAttribute("data-min-aspect-ratio");this.sliderContainer.style.height=document.documentElement.offsetWidth/minAspectRatio+"px"},_getNextSlideIndex:function(direction){var counter=direction==="next"?1:-1;if(direction==="next"){if(this.slideIndex===this.lastSlide)return this.options.type==="slide"?this.lastSlide:0}else if(!this.slideIndex)return this.options.type==="slide"?0:this.lastSlide;return this.slideIndex+counter},_getActiveSlidesIndex:function(){var currentActiveSlides=this.slides.filter(function(sliderItem){if(sliderItem.classList.contains(this.options.slideActiveClass))return sliderItem},this),currentActiveSlidesIndex=currentActiveSlides.map(function(sliderItem){return Number(sliderItem.getAttribute("data-slider-slide-index"))});return currentActiveSlidesIndex},_disableArrows:function(){if(this.buttons.length!==0){var previousButton=this.buttons[0],nextButton=this.buttons[1];this.isFirstSlide?previousButton.setAttribute("aria-disabled",!0):previousButton.removeAttribute("aria-disabled"),this.isLastSlide?nextButton.setAttribute("aria-disabled",!0):nextButton.removeAttribute("aria-disabled")}},_verifyFirstLastSlideTranslateX:function(translateXValue){this._isNextTranslateXFirst(translateXValue)?this.isFirstSlide=!0:this.isFirstSlide=!1,this._isNextTranslateXLast(translateXValue)?this.isLastSlide=!0:this.isLastSlide=!1},_getTranslateXPosition:function(){return Number(this.sliderTrack.style.transform.match(/(-?[0-9]+)/g)[0])},_isNextTranslateXFirst:function(translateXValue){return translateXValue===0},_isNextTranslateXLast:function(translateXValue){var translateXValueAbsolute=Math.abs(translateXValue),nextTranslateXValue=translateXValueAbsolute+this.sliderTranslateXMove;return nextTranslateXValue>=this.sliderItemWidthTotal},_postTransitionEnd:function(){this.buttons.length&&this._disableArrows(),this.indicators.length&&this._setActiveIndicator(this.slideIndex)}}),Slideshow}(),theme.Video=function(){var autoplayCheckComplete=!1,playOnClickChecked=!1,playOnClick=!1,youtubeLoaded=!1,videos={},videoPlayers=[],videoOptions={ratio:16/9,scrollAnimationDuration:400,playerVars:{iv_load_policy:3,modestbranding:1,autoplay:0,controls:0,wmode:"opaque",branding:0,autohide:0,rel:0},events:{onReady:onPlayerReady,onStateChange:onPlayerChange}},classes={playing:"video-is-playing",paused:"video-is-paused",loading:"video-is-loading",loaded:"video-is-loaded",backgroundVideoWrapper:"video-background-wrapper",videoWithImage:"video--image_with_play",backgroundVideo:"video--background",userPaused:"is-paused",supportsAutoplay:"autoplay",supportsNoAutoplay:"no-autoplay",wrapperMinHeight:"video-section-wrapper--min-height"},selectors2={section:".video-section",videoWrapper:".video-section-wrapper",playVideoBtn:".video-control__play",closeVideoBtn:".video-control__close-wrapper",pauseVideoBtn:".video__pause",pauseVideoStop:".video__pause-stop",pauseVideoResume:".video__pause-resume",fallbackText:".icon__fallback-text"};function init(video){if(video){if(videos[video.id]={id:video.id,videoId:video.dataset.id,type:video.dataset.type,status:video.dataset.type==="image_with_play"?"closed":"background",video:video,videoWrapper:video.closest(selectors2.videoWrapper),section:video.closest(selectors2.section),controls:video.dataset.type==="background"?0:1},!youtubeLoaded){var tag=document.createElement("script");tag.src="https://www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}playOnClickCheck()}}function customPlayVideo(playerId){!playOnClickChecked&&!playOnClick||playerId&&typeof videoPlayers[playerId].playVideo=="function"&&privatePlayVideo(playerId)}function pauseVideo(playerId){videoPlayers[playerId]&&typeof videoPlayers[playerId].pauseVideo=="function"&&videoPlayers[playerId].pauseVideo()}function loadVideos(){for(var key in videos)videos.hasOwnProperty(key)&&createPlayer(key);initEvents(),youtubeLoaded=!0}function editorLoadVideo(key){youtubeLoaded&&(createPlayer(key),initEvents())}function privatePlayVideo(id,clicked){var videoData=videos[id],player=videoPlayers[id],videoWrapper=videoData.videoWrapper;if(playOnClick)setAsPlaying(videoData);else if(clicked||autoplayCheckComplete){videoWrapper.classList.remove(classes.loading),setAsPlaying(videoData),player.playVideo();return}else player.playVideo()}function setAutoplaySupport(supported){var supportClass=supported?classes.supportsAutoplay:classes.supportsNoAutoplay;document.documentElement.classList.remove(classes.supportsAutoplay,classes.supportsNoAutoplay),document.documentElement.classList.add(supportClass),supported||(playOnClick=!0),autoplayCheckComplete=!0}function playOnClickCheck(){playOnClickChecked||(isMobile()&&(playOnClick=!0),playOnClick&&setAutoplaySupport(!1),playOnClickChecked=!0)}function onPlayerReady(evt){evt.target.setPlaybackQuality("hd1080");var videoData=getVideoOptions(evt),videoTitle=evt.target.getVideoData().title;playOnClickCheck(),document.getElementById(videoData.id).setAttribute("tabindex","-1"),sizeBackgroundVideos(),setButtonLabels(videoData.videoWrapper,videoTitle),videoData.type==="background"&&(evt.target.mute(),privatePlayVideo(videoData.id)),videoData.videoWrapper.classList.add(classes.loaded)}function onPlayerChange(evt){var videoData=getVideoOptions(evt);switch(videoData.status==="background"&&!isMobile()&&!autoplayCheckComplete&&(evt.data===YT.PlayerState.PLAYING||evt.data===YT.PlayerState.BUFFERING)&&(setAutoplaySupport(!0),autoplayCheckComplete=!0,videoData.videoWrapper.classList.remove(classes.loading)),evt.data){case YT.PlayerState.ENDED:setAsFinished(videoData);break;case YT.PlayerState.PAUSED:setTimeout(function(){evt.target.getPlayerState()===YT.PlayerState.PAUSED&&setAsPaused(videoData)},200);break}}function setAsFinished(videoData){switch(videoData.type){case"background":videoPlayers[videoData.id].seekTo(0);break;case"image_with_play":closeVideo(videoData.id),toggleExpandVideo(videoData.id,!1);break}}function setAsPlaying(videoData){var videoWrapper=videoData.videoWrapper,pauseButton=videoWrapper.querySelector(selectors2.pauseVideoBtn);videoWrapper.classList.remove(classes.loading),pauseButton.classList.contains(classes.userPaused)&&pauseButton.classList.remove(classes.userPaused),videoData.status!=="background"&&(document.getElementById(videoData.id).setAttribute("tabindex","0"),videoData.type==="image_with_play"&&(videoWrapper.classList.remove(classes.paused),videoWrapper.classList.add(classes.playing)),setTimeout(function(){videoWrapper.querySelector(selectors2.closeVideoBtn).focus()},videoOptions.scrollAnimationDuration))}function setAsPaused(videoData){var videoWrapper=videoData.videoWrapper;videoData.type==="image_with_play"&&(videoData.status==="closed"?videoWrapper.classList.remove(classes.paused):videoWrapper.classList.add(classes.paused)),videoWrapper.classList.remove(classes.playing)}function closeVideo(playerId){var videoData=videos[playerId],videoWrapper=videoData.videoWrapper;switch(document.getElementById(videoData.id).setAttribute("tabindex","-1"),videoData.status="closed",videoData.type){case"image_with_play":videoPlayers[playerId].stopVideo(),setAsPaused(videoData);break;case"background":videoPlayers[playerId].mute(),setBackgroundVideo(playerId);break}videoWrapper.classList.remove(classes.paused,classes.playing)}function getVideoOptions(evt){var id=evt.target.getIframe().id;return videos[id]}function toggleExpandVideo(playerId,expand){var video=videos[playerId],elementTop=video.videoWrapper.getBoundingClientRect().top+window.pageYOffset,playButton=video.videoWrapper.querySelector(selectors2.playVideoBtn),offset=0,newHeight=0;if(isMobile()&&video.videoWrapper.parentElement.classList.toggle("page-width",!expand),expand){if(isMobile()?newHeight=window.innerWidth/videoOptions.ratio:newHeight=video.videoWrapper.offsetWidth/videoOptions.ratio,offset=(window.innerHeight-newHeight)/2,video.videoWrapper.style.height=video.videoWrapper.getBoundingClientRect().height+"px",video.videoWrapper.classList.remove(classes.wrapperMinHeight),video.videoWrapper.style.height=newHeight+"px",!(isMobile()&&Shopify.designMode)){var scrollBehavior=document.documentElement.style.scrollBehavior;document.documentElement.style.scrollBehavior="smooth",window.scrollTo({top:elementTop-offset}),document.documentElement.style.scrollBehavior=scrollBehavior}}else{isMobile()?newHeight=video.videoWrapper.dataset.mobileHeight:newHeight=video.videoWrapper.dataset.desktopHeight,video.videoWrapper.style.height=newHeight+"px",setTimeout(function(){video.videoWrapper.classList.add(classes.wrapperMinHeight)},600);var x=window.scrollX,y=window.scrollY;playButton.focus(),window.scrollTo(x,y)}}function togglePause(playerId){var pauseButton=videos[playerId].videoWrapper.querySelector(selectors2.pauseVideoBtn),paused=pauseButton.classList.contains(classes.userPaused);paused?(pauseButton.classList.remove(classes.userPaused),customPlayVideo(playerId)):(pauseButton.classList.add(classes.userPaused),pauseVideo(playerId)),pauseButton.setAttribute("aria-pressed",!paused)}function startVideoOnClick(playerId){var video=videos[playerId];switch(video.videoWrapper.classList.add(classes.loading),video.videoWrapper.style.height=video.videoWrapper.offsetHeight+"px",video.status="open",video.type){case"image_with_play":privatePlayVideo(playerId,!0);break;case"background":unsetBackgroundVideo(playerId,video),videoPlayers[playerId].unMute(),privatePlayVideo(playerId,!0);break}toggleExpandVideo(playerId,!0),document.addEventListener("keydown",handleVideoPlayerKeydown)}var handleVideoPlayerKeydown=function(evt){var playerId=document.activeElement.dataset.controls;evt.keyCode!==slate.utils.keyboardKeys.ESCAPE||!playerId||(closeVideo(playerId),toggleExpandVideo(playerId,!1))};function sizeBackgroundVideos(){var backgroundVideos=document.querySelectorAll("."+classes.backgroundVideo);backgroundVideos.forEach(function(el){sizeBackgroundVideo(el)})}function sizeBackgroundVideo(videoPlayer){if(youtubeLoaded)if(isMobile())videoPlayer.style.cssText=null;else{var videoWrapper=videoPlayer.closest(selectors2.videoWrapper),videoWidth=videoWrapper.clientWidth,playerWidth=videoPlayer.clientWidth,desktopHeight=videoWrapper.dataset.desktopHeight;if(videoWidth/videoOptions.ratiowindow.pageYOffset+window.innerHeight;if(videoWrapper.classList.contains(classes.playing)){if(!condition)return;closeVideo(key),toggleExpandVideo(key,!1)}}}},50);function initEvents(){var playVideoBtns=document.querySelectorAll(selectors2.playVideoBtn),closeVideoBtns=document.querySelectorAll(selectors2.closeVideoBtn),pauseVideoBtns=document.querySelectorAll(selectors2.pauseVideoBtn);playVideoBtns.forEach(function(btn){btn.addEventListener("click",function(evt){var playerId=evt.currentTarget.dataset.controls;startVideoOnClick(playerId)})}),closeVideoBtns.forEach(function(btn){btn.addEventListener("click",function(evt){var playerId=evt.currentTarget.dataset.controls;evt.currentTarget.blur(),closeVideo(playerId),toggleExpandVideo(playerId,!1)})}),pauseVideoBtns.forEach(function(btn){btn.addEventListener("click",function(evt){var playerId=evt.currentTarget.dataset.controls;togglePause(playerId)})}),window.addEventListener("resize",handleWindowResize),window.addEventListener("scroll",handleWindowScroll)}function createPlayer(key){var args=Object.assign(videoOptions,videos[key]);args.playerVars.controls=args.controls,videoPlayers[key]=new YT.Player(key,args)}function removeEvents(){document.removeEventListener("keydown",handleVideoPlayerKeydown),window.removeEventListener("resize",handleWindowResize),window.removeEventListener("scroll",handleWindowScroll)}function setButtonLabels(videoWrapper,title){var playButtons=videoWrapper.querySelectorAll(selectors2.playVideoBtn),closeButton=videoWrapper.querySelector(selectors2.closeVideoBtn),pauseButton=videoWrapper.querySelector(selectors2.pauseVideoBtn),closeButtonText=closeButton.querySelector(selectors2.fallbackText),pauseButtonStop=pauseButton.querySelector(selectors2.pauseVideoStop),pauseButtonStopText=pauseButtonStop.querySelector(selectors2.fallbackText),pauseButtonResume=pauseButton.querySelector(selectors2.pauseVideoResume),pauseButtonResumeText=pauseButtonResume.querySelector(selectors2.fallbackText);playButtons.forEach(function(playButton){var playButtonText=playButton.querySelector(selectors2.fallbackText);playButtonText.textContent=playButtonText.textContent.replace("[video_title]",title)}),closeButtonText.textContent=closeButtonText.textContent.replace("[video_title]",title),pauseButtonStopText.textContent=pauseButtonStopText.textContent.replace("[video_title]",title),pauseButtonResumeText.textContent=pauseButtonResumeText.textContent.replace("[video_title]",title)}return{init:init,editorLoadVideo:editorLoadVideo,loadVideos:loadVideos,playVideo:customPlayVideo,pauseVideo:pauseVideo,removeEvents:removeEvents}}(),theme.ProductVideo=function(){var videos={},hosts={shopify:"shopify",external:"external"},selectors2={productMediaWrapper:"[data-product-single-media-wrapper]"},attributes={enableVideoLooping:"enable-video-looping",videoId:"video-id"};function init(videoContainer,sectionId){if(videoContainer){var videoElement=videoContainer.querySelector("iframe, video");if(videoElement){var mediaId=videoContainer.getAttribute("data-media-id");videos[mediaId]={mediaId:mediaId,sectionId:sectionId,host:hostFromVideoElement(videoElement),container:videoContainer,element:videoElement,ready:function(){createPlayer(this)}},window.Shopify.loadFeatures([{name:"video-ui",version:"2.0",onLoad:setupVideos}]),theme.LibraryLoader.load("plyrShopifyStyles")}}}function setupVideos(errors){if(errors){fallbackToNativeVideo();return}loadVideos()}function createPlayer(video){if(!video.player){var productMediaWrapper=video.container.closest(selectors2.productMediaWrapper),enableLooping=productMediaWrapper.getAttribute("data-"+attributes.enableVideoLooping);video.player=new Shopify.Video(video.element,{loop:{active:enableLooping}});var pauseVideo=function(){video.player&&video.player.pause()};productMediaWrapper.addEventListener("mediaHidden",pauseVideo),productMediaWrapper.addEventListener("xrLaunch",pauseVideo),productMediaWrapper.addEventListener("mediaVisible",function(){theme.Helpers.isTouch()||video.player&&video.player.play()})}}function hostFromVideoElement(video){return video.tagName==="VIDEO"?hosts.shopify:hosts.external}function loadVideos(){for(var key in videos)if(videos.hasOwnProperty(key)){var video=videos[key];video.ready()}}function fallbackToNativeVideo(){for(var key in videos)if(videos.hasOwnProperty(key)){var video=videos[key];if(video.nativeVideo)continue;video.host===hosts.shopify&&(video.element.setAttribute("controls","controls"),video.nativeVideo=!0)}}function removeSectionVideos(sectionId){for(var key in videos)if(videos.hasOwnProperty(key)){var video=videos[key];video.sectionId===sectionId&&(video.player&&video.player.destroy(),delete videos[key])}}return{init:init,hosts:hosts,loadVideos:loadVideos,removeSectionVideos:removeSectionVideos}}(),theme.ProductModel=function(){var modelJsonSections={},models={},xrButtons={},selectors2={mediaGroup:"[data-product-single-media-group]",xrButton:"[data-shopify-xr]"};function init(modelViewerContainers,sectionId){modelJsonSections[sectionId]={loaded:!1},modelViewerContainers.forEach(function(modelViewerContainer,index){var mediaId=modelViewerContainer.getAttribute("data-media-id"),modelViewerElement=modelViewerContainer.querySelector("model-viewer"),modelId=modelViewerElement.getAttribute("data-model-id");if(index===0){var mediaGroup=modelViewerContainer.closest(selectors2.mediaGroup),xrButton=mediaGroup.querySelector(selectors2.xrButton);xrButtons[sectionId]={element:xrButton,defaultId:modelId}}models[mediaId]={modelId:modelId,sectionId:sectionId,container:modelViewerContainer,element:modelViewerElement}}),window.Shopify.loadFeatures([{name:"shopify-xr",version:"1.0",onLoad:setupShopifyXr},{name:"model-viewer-ui",version:"1.0",onLoad:setupModelViewerUi}]),theme.LibraryLoader.load("modelViewerUiStyles")}function setupShopifyXr(errors){if(!errors){if(!window.ShopifyXR){document.addEventListener("shopify_xr_initialized",function(){setupShopifyXr()});return}for(var sectionId in modelJsonSections)if(modelJsonSections.hasOwnProperty(sectionId)){var modelSection=modelJsonSections[sectionId];if(modelSection.loaded)continue;var modelJson=document.querySelector("#ModelJson-"+sectionId);window.ShopifyXR.addModels(JSON.parse(modelJson.innerHTML)),modelSection.loaded=!0}window.ShopifyXR.setupXRElements()}}function setupModelViewerUi(errors){if(!errors){for(var key in models)if(models.hasOwnProperty(key)){var model=models[key];model.modelViewerUi||(model.modelViewerUi=new Shopify.ModelViewerUI(model.element)),setupModelViewerListeners(model)}}}function setupModelViewerListeners(model){var xrButton=xrButtons[model.sectionId];model.container.addEventListener("mediaVisible",function(){xrButton.element.setAttribute("data-shopify-model3d-id",model.modelId),!theme.Helpers.isTouch()&&model.modelViewerUi.play()}),model.container.addEventListener("mediaHidden",function(){xrButton.element.setAttribute("data-shopify-model3d-id",xrButton.defaultId),model.modelViewerUi.pause()}),model.container.addEventListener("xrLaunch",function(){model.modelViewerUi.pause()})}function removeSectionModels(sectionId){for(var key in models)if(models.hasOwnProperty(key)){var model=models[key];model.sectionId===sectionId&&(models[key].modelViewerUi.destroy(),delete models[key])}delete modelJsonSections[sectionId]}return{init:init,removeSectionModels:removeSectionModels}}(),theme.FormStatus=function(){var selectors2={statusMessage:"[data-form-status]"};function init(){var statusMessages=document.querySelectorAll(selectors2.statusMessage);statusMessages.forEach(function(statusMessage){statusMessage.setAttribute("tabindex",-1),statusMessage.focus(),statusMessage.addEventListener("blur",function(evt){evt.target.removeAttribute("tabindex")},{once:!0})})}return{init:init}}(),theme.Hero=function(){var classes={indexSectionFlush:"index-section--flush"},selectors2={heroFixedWidthContent:".hero-fixed-width__content",heroFixedWidthImage:".hero-fixed-width__image"};function hero(el,sectionId){var hero2=document.querySelector(el),layout=hero2.getAttribute("data-layout"),parentSection=document.querySelector("#shopify-section-"+sectionId),heroContent=parentSection.querySelector(selectors2.heroFixedWidthContent),heroImage=parentSection.querySelector(selectors2.heroFixedWidthImage);if(layout!=="fixed_width")return;parentSection.classList.remove(classes.indexSectionFlush),heroFixedHeight(),window.addEventListener("resize",function(){theme.Helpers.debounce(function(){heroFixedHeight()},50)});function heroFixedHeight(){var contentHeight,imageHeight;heroContent&&(contentHeight=heroContent.offsetHeight+50),heroImage&&(imageHeight=heroImage.offsetHeight),contentHeight>imageHeight&&(heroImage.style.minHeight=contentHeight+"px")}}return hero}(),theme.SearchResultsTemplate=function(){function renderResults(products,isLoading,searchQuery){return['"].join("")}function renderHeader(products,isLoading){return products.length===0?"":['
    ','",''+(isLoading?'':"")+"","
    "].join("")}function loadingState(){return['"].join("")}function renderViewAll(searchQuery){return['"].join("")}function renderProducts(products,searchQuery){var resultsCount=products.length;return['
      ',products.map(function(product,index){return renderProduct(normalizeProduct(product),index,resultsCount)}).join(""),'
    • '+renderViewAll(searchQuery)+"
    • ","
    "].join("")}function renderProduct(product,index,resultsCount){return['
  • ','','
    ',renderProductImage(product),"
    ",'
    ','',''+product.title+"",""+(getDetailsCount()?renderProductDetails(product):""),', ',''+getNumberOfResultsString(index+1,resultsCount)+"","
    ","
    ","
  • "].join("")}function renderProductImage(product){return product.image===null?"":''+product.image.alt+''}function renderProductDetails(product){return['
    ','
    ',renderVendor(product),"
    ",'
    '+renderProductPrice(product),"
    ","
    "].join("")}function renderProductPrice(product){if(!theme.settings.predictiveSearchShowPrice)return"";var accessibilityAnnounceComma=', ',priceMarkup='
    '+renderPrice(product)+"
    ",salePriceMarkup='
    '+renderSalePrice(product)+"
    ";return accessibilityAnnounceComma+'
    '+(product.isOnSale?salePriceMarkup:priceMarkup)+"
    "}function renderSalePrice(product){return["
    ",''+theme.strings.salePrice+"","
    ","
    ",''+(product.isPriceVaries?theme.strings.fromLowestPrice.replace("[price]",product.price):product.price)+"","
    ",'
    '+renderCompareAtPrice(product)+"
    "].join("")}function renderCompareAtPrice(product){return["
    ",''+theme.strings.regularPrice+" ","
    ","
    ",''+product.compareAtPrice+"","
    "].join("")}function renderPrice(product){return["
    ",''+theme.strings.regularPrice+"","
    ","
    ",''+(product.isPriceVaries?theme.strings.fromLowestPrice.replace("[price]",product.price):product.price)+"","
    "].join("")}function renderVendor(product){return!theme.settings.predictiveSearchShowVendor||product.vendor===""?"":["
    ",''+theme.strings.vendor+"","
    ",'
    '+product.vendor+"
    "].join("")}function normalizeProduct(product){var productOrVariant=product.variants.length>0?product.variants[0]:product;return{url:productOrVariant.url,image:getProductImage(product),title:product.title,vendor:product.vendor||"",price:theme.Currency.formatMoney(product.price_min,theme.moneyFormat),compareAtPrice:theme.Currency.formatMoney(product.compare_at_price_min,theme.moneyFormat),available:product.available,isOnSale:isOnSale(product),isPriceVaries:isPriceVaries(product),isCompareVaries:isCompareVaries(product)}}function getProductImage(product){var image,featuredImage;return product.variants.length>0&&product.variants[0].image!==null?featuredImage=product.variants[0].featured_image:product.image?featuredImage=product.featured_image:image=null,image!==null&&(image={url:theme.Images.getSizedImageUrl(featuredImage.url,"100x"),alt:featuredImage.alt}),image}function isOnSale(product){return product.compare_at_price_min!==null&&parseInt(product.compare_at_price_min,10)>parseInt(product.price_min,10)}function isPriceVaries(product){return product.price_max!==product.price_min}function isCompareVaries(product){return product.compare_at_price_max!==product.compare_at_price_min}function getDetailsCount(){var detailsList=[theme.settings.predictiveSearchShowPrice,theme.settings.predictiveSearchShowVendor],detailsCount=detailsList.reduce(function(acc,detail){return acc+(detail?1:0)},0);return detailsCount}function getNumberOfResultsString(resultNumber,resultsCount){return theme.strings.number_of_results.replace("[result_number]",resultNumber).replace("[results_count]",resultsCount)}function _htmlEscape(input){return input.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}return function(data){var products=data.products||[],isLoading=data.isLoading,searchQuery=data.searchQuery||"";return isLoading&&products.length===0?loadingState():renderResults(products,isLoading,searchQuery)}}(),function(){function numberOfResultsTemplateFct(data){return data.products.length===1?theme.strings.one_result_found:theme.strings.number_of_results_found.replace("[results_count]",data.products.length)}function loadingResultsMessageTemplateFct(){return theme.strings.loading}function isPredictiveSearchSupported(){var shopifyFeatures=JSON.parse(document.getElementById("shopify-features").textContent);return shopifyFeatures.predictiveSearch}function isPredictiveSearchEnabled(){return window.theme.settings.predictiveSearchEnabled}function canInitializePredictiveSearch(){return isPredictiveSearchSupported()&&isPredictiveSearchEnabled()}function validateSearchHandler(searchEl,submitEl){submitEl.addEventListener("click",validateSearchInput.bind(this,searchEl))}function validateSearchInput(searchEl,evt){var isInputValueEmpty=searchEl.value.trim().length===0;isInputValueEmpty&&(typeof evt!="undefined"&&evt.preventDefault(),searchEl.focus())}window.theme.SearchPage=function(){var selectors2={searchReset:"[data-search-page-predictive-search-clear]",searchInput:"[data-search-page-predictive-search-input]",searchSubmit:"[data-search-page-predictive-search-submit]",searchResults:'[data-predictive-search-mount="default"]'},componentInstance;function init(config){var searchInput=document.querySelector(selectors2.searchInput),searchSubmit=document.querySelector(selectors2.searchSubmit),searchUrl=searchInput.dataset.baseUrl;componentInstance=new window.Shopify.theme.PredictiveSearchComponent({selectors:{input:selectors2.searchInput,reset:selectors2.searchReset,result:selectors2.searchResults},searchUrl:searchUrl,resultTemplateFct:window.theme.SearchResultsTemplate,numberOfResultsTemplateFct:numberOfResultsTemplateFct,loadingResultsMessageTemplateFct:loadingResultsMessageTemplateFct,onOpen:function(nodes){if(!config.isTabletAndUp){var searchInputBoundingRect=searchInput.getBoundingClientRect(),bodyHeight=document.body.offsetHeight,offset=50,resultsMaxHeight=bodyHeight-searchInputBoundingRect.bottom-offset;nodes.result.style.maxHeight=resultsMaxHeight+"px"}},onBeforeDestroy:function(nodes){nodes.result.style.maxHeight=""}}),validateSearchHandler(searchInput,searchSubmit)}function unload(){componentInstance&&(componentInstance.destroy(),componentInstance=null)}return{init:init,unload:unload}}(),window.theme.SearchHeader=function(){var selectors2={searchInput:"[data-predictive-search-drawer-input]",searchResults:'[data-predictive-search-mount="drawer"]',searchFormContainer:"[data-search-form-container]",searchSubmit:"[data-search-form-submit]"},componentInstance;function init(config){var searchInput=document.querySelector(selectors2.searchInput),searchSubmit=document.querySelector(selectors2.searchSubmit),searchUrl=searchInput.dataset.baseUrl;componentInstance=new window.Shopify.theme.PredictiveSearchComponent({selectors:{input:selectors2.searchInput,result:selectors2.searchResults},searchUrl:searchUrl,resultTemplateFct:window.theme.SearchResultsTemplate,numberOfResultsTemplateFct:numberOfResultsTemplateFct,numberOfResults:config.numberOfResults,loadingResultsMessageTemplateFct:loadingResultsMessageTemplateFct,onInputBlur:function(){return!1},onOpen:function(nodes){var searchInputBoundingRect=searchInput.getBoundingClientRect(),maxHeight=window.innerHeight-searchInputBoundingRect.bottom-(config.isTabletAndUp?20:0);nodes.result.style.top=config.isTabletAndUp?"":searchInputBoundingRect.bottom+"px",nodes.result.style.maxHeight=maxHeight+"px"},onClose:function(nodes){nodes.result.style.maxHeight=""},onBeforeDestroy:function(nodes){nodes.result.style.top=""}}),validateSearchHandler(searchInput,searchSubmit)}function unload(){componentInstance&&(componentInstance.destroy(),componentInstance=null)}function clearAndClose(){componentInstance&&componentInstance.clearAndClose()}return{init:init,unload:unload,clearAndClose:clearAndClose}}(),window.theme.Search=function(){var classes={searchTemplate:"template-search"},selectors2={siteHeader:".site-header"},mediaQueryList={mobile:window.matchMedia("(max-width: 749px)"),tabletAndUp:window.matchMedia("(min-width: 750px)")};function init(){document.querySelector(selectors2.siteHeader)&&canInitializePredictiveSearch()&&(Object.keys(mediaQueryList).forEach(function(device){mediaQueryList[device].addListener(initSearchAccordingToViewport)}),initSearchAccordingToViewport())}function initSearchAccordingToViewport(){theme.SearchDrawer.close(),theme.SearchHeader.unload(),theme.SearchPage.unload(),mediaQueryList.mobile.matches?(theme.SearchHeader.init({numberOfResults:4,isTabletAndUp:!1}),isSearchPage()&&theme.SearchPage.init({isTabletAndUp:!1})):(theme.SearchHeader.init({numberOfResults:4,isTabletAndUp:!0}),isSearchPage()&&theme.SearchPage.init({isTabletAndUp:!0}))}function isSearchPage(){return document.body.classList.contains(classes.searchTemplate)}function unload(){theme.SearchHeader.unload(),theme.SearchPage.unload()}return{init:init,unload:unload}}()}(),theme.SearchDrawer=function(){var selectors2={headerSection:"[data-header-section]",drawer:"[data-predictive-search-drawer]",drawerOpenButton:"[data-predictive-search-open-drawer]",headerSearchInput:"[data-predictive-search-drawer-input]",predictiveSearchWrapper:'[data-predictive-search-mount="drawer"]'},drawerInstance;function init(){setAccessibilityProps(),drawerInstance=new theme.Drawers("SearchDrawer","top",{onDrawerOpen:function(){setHeight(),theme.MobileNav.closeMobileNav(),lockBodyScroll()},onDrawerClose:function(){theme.SearchHeader.clearAndClose();var drawerOpenButton=document.querySelector(selectors2.drawerOpenButton);drawerOpenButton&&drawerOpenButton.focus(),unlockBodyScroll()},withPredictiveSearch:!0,elementToFocusOnOpen:document.querySelector(selectors2.headerSearchInput)})}function setAccessibilityProps(){var drawerOpenButton=document.querySelector(selectors2.drawerOpenButton);drawerOpenButton&&(drawerOpenButton.setAttribute("aria-controls","SearchDrawer"),drawerOpenButton.setAttribute("aria-expanded","false"),drawerOpenButton.setAttribute("aria-controls","dialog"))}function setHeight(){var searchDrawer=document.querySelector(selectors2.drawer),headerHeight=document.querySelector(selectors2.headerSection).offsetHeight;searchDrawer.style.height=headerHeight+"px"}function close(){drawerInstance.close()}function lockBodyScroll(){theme.Helpers.enableScrollLock()}function unlockBodyScroll(){theme.Helpers.disableScrollLock()}return{init:init,close:close}}(),theme.Disclosure=function(){var selectors2={disclosureForm:"[data-disclosure-form]",disclosureList:"[data-disclosure-list]",disclosureToggle:"[data-disclosure-toggle]",disclosureInput:"[data-disclosure-input]",disclosureOptions:"[data-disclosure-option]"},classes={listVisible:"disclosure-list--visible"};function Disclosure(disclosure){this.container=disclosure,this._cacheSelectors(),this._setupListeners()}return Disclosure.prototype=Object.assign({},Disclosure.prototype,{_cacheSelectors:function(){this.cache={disclosureForm:this.container.closest(selectors2.disclosureForm),disclosureList:this.container.querySelector(selectors2.disclosureList),disclosureToggle:this.container.querySelector(selectors2.disclosureToggle),disclosureInput:this.container.querySelector(selectors2.disclosureInput),disclosureOptions:this.container.querySelectorAll(selectors2.disclosureOptions)}},_setupListeners:function(){this.eventHandlers=this._setupEventHandlers(),this.cache.disclosureToggle.addEventListener("click",this.eventHandlers.toggleList),this.cache.disclosureOptions.forEach(function(disclosureOption){disclosureOption.addEventListener("click",this.eventHandlers.connectOptions)},this),this.container.addEventListener("keyup",this.eventHandlers.onDisclosureKeyUp),this.cache.disclosureList.addEventListener("focusout",this.eventHandlers.onDisclosureListFocusOut),this.cache.disclosureToggle.addEventListener("focusout",this.eventHandlers.onDisclosureToggleFocusOut),document.body.addEventListener("click",this.eventHandlers.onBodyClick)},_setupEventHandlers:function(){return{connectOptions:this._connectOptions.bind(this),toggleList:this._toggleList.bind(this),onBodyClick:this._onBodyClick.bind(this),onDisclosureKeyUp:this._onDisclosureKeyUp.bind(this),onDisclosureListFocusOut:this._onDisclosureListFocusOut.bind(this),onDisclosureToggleFocusOut:this._onDisclosureToggleFocusOut.bind(this)}},_connectOptions:function(event){event.preventDefault(),this._submitForm(event.currentTarget.dataset.value)},_onDisclosureToggleFocusOut:function(event){var disclosureLostFocus=this.container.contains(event.relatedTarget)===!1;disclosureLostFocus&&this._hideList()},_onDisclosureListFocusOut:function(event){var childInFocus=event.currentTarget.contains(event.relatedTarget),isVisible=this.cache.disclosureList.classList.contains(classes.listVisible);isVisible&&!childInFocus&&this._hideList()},_onDisclosureKeyUp:function(event){event.which===slate.utils.keyboardKeys.ESCAPE&&(this._hideList(),this.cache.disclosureToggle.focus())},_onBodyClick:function(event){var isOption=this.container.contains(event.target),isVisible=this.cache.disclosureList.classList.contains(classes.listVisible);isVisible&&!isOption&&this._hideList()},_submitForm:function(value){this.cache.disclosureInput.value=value,this.cache.disclosureForm.submit()},_hideList:function(){this.cache.disclosureList.classList.remove(classes.listVisible),this.cache.disclosureToggle.setAttribute("aria-expanded",!1)},_toggleList:function(){var ariaExpanded=this.cache.disclosureToggle.getAttribute("aria-expanded")==="true";this.cache.disclosureList.classList.toggle(classes.listVisible),this.cache.disclosureToggle.setAttribute("aria-expanded",!ariaExpanded)},destroy:function(){this.cache.disclosureToggle.removeEventListener("click",this.eventHandlers.toggleList),this.cache.disclosureOptions.forEach(function(disclosureOption){disclosureOption.removeEventListener("click",this.eventHandlers.connectOptions)},this),this.container.removeEventListener("keyup",this.eventHandlers.onDisclosureKeyUp),this.cache.disclosureList.removeEventListener("focusout",this.eventHandlers.onDisclosureListFocusOut),this.cache.disclosureToggle.removeEventListener("focusout",this.eventHandlers.onDisclosureToggleFocusOut),document.body.removeEventListener("click",this.eventHandlers.onBodyClick)}}),Disclosure}(),theme.Zoom=function(){var selectors2={imageZoom:"[data-image-zoom]"},classes={zoomImg:"zoomImg"},attributes={imageZoomTarget:"data-image-zoom-target"};function Zoom(container){this.container=container,this.cache={},this.url=container.dataset.zoom,this._cacheSelectors(),this.cache.sourceImage&&this._duplicateImage()}return Zoom.prototype=Object.assign({},Zoom.prototype,{_cacheSelectors:function(){this.cache={sourceImage:this.container.querySelector(selectors2.imageZoom)}},_init:function(){var targetWidth=this.cache.targetImage.width,targetHeight=this.cache.targetImage.height;this.cache.sourceImage===this.cache.targetImage?(this.sourceWidth=targetWidth,this.sourceHeight=targetHeight):(this.sourceWidth=this.cache.sourceImage.width,this.sourceHeight=this.cache.sourceImage.height),this.xRatio=(this.cache.sourceImage.width-targetWidth)/this.sourceWidth,this.yRatio=(this.cache.sourceImage.height-targetHeight)/this.sourceHeight},_start:function(e){this._init(),this._move(e)},_stop:function(){this.cache.targetImage.style.opacity=0},_setTopLeftMaxValues:function(top,left){return{left:Math.max(Math.min(left,this.sourceWidth),0),top:Math.max(Math.min(top,this.sourceHeight),0)}},_move:function(e){var left=e.pageX-(this.cache.sourceImage.getBoundingClientRect().left+window.scrollX),top=e.pageY-(this.cache.sourceImage.getBoundingClientRect().top+window.scrollY),position=this._setTopLeftMaxValues(top,left);top=position.top,left=position.left,this.cache.targetImage.style.left=-(left*-this.xRatio)+"px",this.cache.targetImage.style.top=-(top*-this.yRatio)+"px",this.cache.targetImage.style.opacity=1},_duplicateImage:function(){this._loadImage().then(function(image){this.cache.targetImage=image,image.style.width=image.width+"px",image.style.height=image.height+"px",image.style.position="absolute",image.style.maxWidth="none",image.style.maxHeight="none",image.style.opacity=0,image.style.border="none",image.style.left=0,image.style.top=0,this.container.appendChild(image),this._init(),this._start=this._start.bind(this),this._stop=this._stop.bind(this),this._move=this._move.bind(this),this.container.addEventListener("mouseenter",this._start),this.container.addEventListener("mouseleave",this._stop),this.container.addEventListener("mousemove",this._move),this.container.style.position="relative",this.container.style.overflow="hidden"}.bind(this)).catch(function(error){console.warn("Error fetching image",error)})},_loadImage:function(){return new Promise(function(resolve,reject){var image=new Image;image.setAttribute("role","presentation"),image.setAttribute(attributes.imageZoomTarget,!0),image.classList.add(classes.zoomImg),image.src=this.url,image.addEventListener("load",function(){resolve(image)}),image.addEventListener("error",function(error){reject(error)})}.bind(this))},unload:function(){var targetImage=this.container.querySelector("["+attributes.imageZoomTarget+"]");targetImage&&targetImage.remove(),this.container.removeEventListener("mouseenter",this._start),this.container.removeEventListener("mouseleave",this._stop),this.container.removeEventListener("mousemove",this._move)}}),Zoom}(),function(){var filterBys=document.querySelectorAll("[data-blog-tag-filter]");filterBys.length&&(slate.utils.resizeSelects(filterBys),filterBys.forEach(function(filterBy){filterBy.addEventListener("change",function(evt){location.href=evt.target.value})}))}(),theme.customerTemplates=function(){var selectors2={RecoverHeading:"#RecoverHeading",RecoverEmail:"#RecoverEmail",LoginHeading:"#LoginHeading"};function initEventListeners(){this.recoverHeading=document.querySelector(selectors2.RecoverHeading),this.recoverEmail=document.querySelector(selectors2.RecoverEmail),this.loginHeading=document.querySelector(selectors2.LoginHeading);var recoverPassword=document.getElementById("RecoverPassword"),hideRecoverPasswordLink=document.getElementById("HideRecoverPasswordLink");recoverPassword&&recoverPassword.addEventListener("click",function(evt){evt.preventDefault(),showRecoverPasswordForm(),this.recoverHeading.setAttribute("tabindex","-1"),this.recoverHeading.focus()}.bind(this)),hideRecoverPasswordLink&&hideRecoverPasswordLink.addEventListener("click",function(evt){evt.preventDefault(),hideRecoverPasswordForm(),this.loginHeading.setAttribute("tabindex","-1"),this.loginHeading.focus()}.bind(this)),this.recoverHeading&&this.recoverHeading.addEventListener("blur",function(evt){evt.target.removeAttribute("tabindex")}),this.loginHeading&&this.loginHeading.addEventListener("blur",function(evt){evt.target.removeAttribute("tabindex")})}function showRecoverPasswordForm(){document.getElementById("RecoverPasswordForm").classList.remove("hide"),document.getElementById("CustomerLoginForm").classList.add("hide"),this.recoverEmail.getAttribute("aria-invalid")==="true"&&this.recoverEmail.focus()}function hideRecoverPasswordForm(){document.getElementById("RecoverPasswordForm").classList.add("hide"),document.getElementById("CustomerLoginForm").classList.remove("hide")}function resetPasswordSuccess(){var formState=document.querySelector(".reset-password-success");if(formState){var resetSuccess=document.getElementById("ResetSuccess");resetSuccess.classList.remove("hide"),resetSuccess.focus()}}function customerAddressForm(){var newAddressForm=document.getElementById("AddressNewForm"),newAddressFormButton=document.getElementById("AddressNewButton");newAddressForm&&(Shopify&&new Shopify.CountryProvinceSelector("AddressCountryNew","AddressProvinceNew",{hideElement:"AddressProvinceContainerNew"}),document.querySelectorAll(".address-country-option").forEach(function(option){var formId=option.dataset.formId,countrySelector="AddressCountry_"+formId,provinceSelector="AddressProvince_"+formId,containerSelector="AddressProvinceContainer_"+formId;new Shopify.CountryProvinceSelector(countrySelector,provinceSelector,{hideElement:containerSelector})}),document.querySelectorAll(".address-new-toggle").forEach(function(button){button.addEventListener("click",function(){var isExpanded=newAddressFormButton.getAttribute("aria-expanded")==="true";newAddressForm.classList.toggle("hide"),newAddressFormButton.setAttribute("aria-expanded",!isExpanded),newAddressFormButton.focus()})}),document.querySelectorAll(".address-edit-toggle").forEach(function(button){button.addEventListener("click",function(evt){var formId=evt.target.dataset.formId,editButton=document.getElementById("EditFormButton_"+formId),editAddress=document.getElementById("EditAddress_"+formId),isExpanded=editButton.getAttribute("aria-expanded")==="true";editAddress.classList.toggle("hide"),editButton.setAttribute("aria-expanded",!isExpanded),editButton.focus()})}),document.querySelectorAll(".address-delete").forEach(function(button){button.addEventListener("click",function(evt){var target=evt.target.dataset.target,confirmMessage=evt.target.dataset.confirmMessage;confirm(confirmMessage||"Are you sure you wish to delete this address?")&&Shopify.postLink(target,{parameters:{_method:"delete"}})})}))}function checkUrlHash(){var hash=window.location.hash;hash==="#recover"&&showRecoverPasswordForm.bind(this)()}return{init:function(){initEventListeners(),checkUrlHash(),resetPasswordSuccess(),customerAddressForm()}}}(),theme.Cart=function(){var selectors2={cartCount:"[data-cart-count]",cartCountBubble:"[data-cart-count-bubble]",cartDiscount:"[data-cart-discount]",cartDiscountTitle:"[data-cart-discount-title]",cartDiscountAmount:"[data-cart-discount-amount]",cartDiscountWrapper:"[data-cart-discount-wrapper]",cartErrorMessage:"[data-cart-error-message]",cartErrorMessageWrapper:"[data-cart-error-message-wrapper]",cartItem:"[data-cart-item]",cartItemDetails:"[data-cart-item-details]",cartItemDiscount:"[data-cart-item-discount]",cartItemDiscountedPriceGroup:"[data-cart-item-discounted-price-group]",cartItemDiscountTitle:"[data-cart-item-discount-title]",cartItemDiscountAmount:"[data-cart-item-discount-amount]",cartItemDiscountList:"[data-cart-item-discount-list]",cartItemFinalPrice:"[data-cart-item-final-price]",cartItemImage:"[data-cart-item-image]",cartItemLinePrice:"[data-cart-item-line-price]",cartItemOriginalPrice:"[data-cart-item-original-price]",cartItemPrice:"[data-cart-item-price]",cartItemPriceList:"[data-cart-item-price-list]",cartItemProperty:"[data-cart-item-property]",cartItemPropertyName:"[data-cart-item-property-name]",cartItemPropertyValue:"[data-cart-item-property-value]",cartItemRegularPriceGroup:"[data-cart-item-regular-price-group]",cartItemRegularPrice:"[data-cart-item-regular-price]",cartItemTitle:"[data-cart-item-title]",cartItemOption:"[data-cart-item-option]",cartItemSellingPlanName:"[data-cart-item-selling-plan-name]",cartLineItems:"[data-cart-line-items]",cartNote:"[data-cart-notes]",cartQuantityErrorMessage:"[data-cart-quantity-error-message]",cartQuantityErrorMessageWrapper:"[data-cart-quantity-error-message-wrapper]",cartRemove:"[data-cart-remove]",cartStatus:"[data-cart-status]",cartSubtotal:"[data-cart-subtotal]",cartTableCell:"[data-cart-table-cell]",cartWrapper:"[data-cart-wrapper]",emptyPageContent:"[data-empty-page-content]",quantityInput:"[data-quantity-input]",quantityInputMobile:"[data-quantity-input-mobile]",quantityInputDesktop:"[data-quantity-input-desktop]",quantityLabelMobile:"[data-quantity-label-mobile]",quantityLabelDesktop:"[data-quantity-label-desktop]",inputQty:"[data-quantity-input]",thumbnails:".cart__image",unitPrice:"[data-unit-price]",unitPriceBaseUnit:"[data-unit-price-base-unit]",unitPriceGroup:"[data-unit-price-group]"},classes={cartNoCookies:"cart--no-cookies",cartRemovedProduct:"cart__removed-product",thumbnails:"cart__image",hide:"hide",inputError:"input--error"},attributes={cartItemIndex:"data-cart-item-index",cartItemKey:"data-cart-item-key",cartItemQuantity:"data-cart-item-quantity",cartItemTitle:"data-cart-item-title",cartItemUrl:"data-cart-item-url",quantityItem:"data-quantity-item"},mediumUpQuery="(min-width: "+theme.breakpoints.medium+"px)";function Cart(container){this.container=container,this.thumbnails=this.container.querySelectorAll(selectors2.thumbnails),this.quantityInputs=this.container.querySelectorAll(selectors2.inputQty),this.ajaxEnabled=this.container.getAttribute("data-ajax-enabled")==="true",this._handleInputQty=theme.Helpers.debounce(this._handleInputQty.bind(this),500),this.setQuantityFormControllers=this.setQuantityFormControllers.bind(this),this._onNoteChange=this._onNoteChange.bind(this),this._onRemoveItem=this._onRemoveItem.bind(this),theme.Helpers.cookiesEnabled()||this.container.classList.add(classes.cartNoCookies),this.thumbnails.forEach(function(element){element.style.cursor="pointer"}),this.container.addEventListener("click",this._handleThumbnailClick),this.container.addEventListener("change",this._handleInputQty),this.mql=window.matchMedia(mediumUpQuery),this.mql.addListener(this.setQuantityFormControllers),this.setQuantityFormControllers(),this.ajaxEnabled&&(this.container.addEventListener("click",this._onRemoveItem),this.container.addEventListener("change",this._onNoteChange),this._setupCartTemplates())}return Cart.prototype=Object.assign({},Cart.prototype,{_setupCartTemplates:function(){var cartItem=this.container.querySelector(selectors2.cartItem);cartItem&&(this.itemTemplate=this.container.querySelector(selectors2.cartItem).cloneNode(!0),this.itemDiscountTemplate=this.itemTemplate.querySelector(selectors2.cartItemDiscount).cloneNode(!0),this.cartDiscountTemplate=this.container.querySelector(selectors2.cartDiscount).cloneNode(!0),this.itemPriceListTemplate=this.itemTemplate.querySelector(selectors2.cartItemPriceList).cloneNode(!0),this.itemOptionTemplate=this.itemTemplate.querySelector(selectors2.cartItemOption).cloneNode(!0),this.itemPropertyTemplate=this.itemTemplate.querySelector(selectors2.cartItemProperty).cloneNode(!0),this.itemSellingPlanNameTemplate=this.itemTemplate.querySelector(selectors2.cartItemSellingPlanName).cloneNode(!0))},_handleInputQty:function(evt){if(evt.target.hasAttribute("data-quantity-input")){var input=evt.target,itemElement=input.closest(selectors2.cartItem),itemIndex=Number(input.getAttribute("data-quantity-item")),itemQtyInputs=this.container.querySelectorAll("[data-quantity-item='"+itemIndex+"']"),value=parseInt(input.value),isValidValue=!(value<0||isNaN(value));if(itemQtyInputs.forEach(function(element){element.value=value}),this._hideCartError(),this._hideQuantityErrorMessage(),!isValidValue){this._showQuantityErrorMessages(itemElement);return}isValidValue&&this.ajaxEnabled&&this._updateItemQuantity(itemIndex,itemElement,itemQtyInputs,value)}},_updateItemQuantity:function(itemIndex,itemElement,itemQtyInputs,value){var key=itemElement.getAttribute(attributes.cartItemKey),index=Number(itemElement.getAttribute(attributes.cartItemIndex)),request={method:"POST",headers:{"Content-Type":"application/json;"},body:JSON.stringify({line:index,quantity:value})};fetch("/cart/change.js",request).then(function(response){return response.json()}).then(function(state){if(this._setCartCountBubble(state.item_count),!state.item_count){this._emptyCart();return}var inFocus=document.activeElement;if(this._createCart(state),!value){this._showRemoveMessage(itemElement.cloneNode(!0));return}var item=this.getItem(key,state);if(this._updateLiveRegion(item),!!inFocus){var row=inFocus.closest("["+attributes.cartItemIndex+"]");if(row){var target=this.container.querySelector("["+attributes.cartItemIndex+'="'+row.getAttribute(attributes.cartItemIndex)+'"] [data-role="'+inFocus.getAttribute("data-role")+'"]');target&&target.focus()}}}.bind(this)).catch(function(){this._showCartError(null)}.bind(this))},getItem:function(key,state){return state.items.find(function(item){return item.key===key})},_liveRegionText:function(item){var liveRegionText=theme.strings.update+": [QuantityLabel]: [Quantity], [Regular] [$$] [DiscountedPrice] [$]. [PriceInformation]";liveRegionText=liveRegionText.replace("[QuantityLabel]",theme.strings.quantity).replace("[Quantity]",item.quantity);var regularLabel="",regularPrice=theme.Currency.formatMoney(item.original_line_price,theme.moneyFormat),discountLabel="",discountPrice="",discountInformation="";return item.original_line_price>item.final_line_price&&(regularLabel=theme.strings.regularTotal,discountLabel=theme.strings.discountedTotal,discountPrice=theme.Currency.formatMoney(item.final_line_price,theme.moneyFormat),discountInformation=theme.strings.priceColumn),liveRegionText=liveRegionText.replace("[Regular]",regularLabel).replace("[$$]",regularPrice).replace("[DiscountedPrice]",discountLabel).replace("[$]",discountPrice).replace("[PriceInformation]",discountInformation).trim(),liveRegionText},_updateLiveRegion:function(item){if(item){var liveRegion=this.container.querySelector(selectors2.cartStatus);liveRegion.textContent=this._liveRegionText(item),liveRegion.setAttribute("aria-hidden",!1),setTimeout(function(){liveRegion.setAttribute("aria-hidden",!0)},1e3)}},_createCart:function(state){var cartDiscountList=this._createCartDiscountList(state),cartTable=this.container.querySelector(selectors2.cartLineItems);cartTable.innerHTML="",this._createLineItemList(state).forEach(function(lineItem){cartTable.appendChild(lineItem)}),this.setQuantityFormControllers(),this.cartNotes=this.cartNotes||this.container.querySelector(selectors2.cartNote),this.cartNotes&&(this.cartNotes.value=state.note);var discountWrapper=this.container.querySelector(selectors2.cartDiscountWrapper);cartDiscountList.length===0?(discountWrapper.innerHTML="",discountWrapper.classList.add(classes.hide)):(discountWrapper.innerHTML="",cartDiscountList.forEach(function(discountItem){discountWrapper.appendChild(discountItem)}),discountWrapper.classList.remove(classes.hide)),this.container.querySelector(selectors2.cartSubtotal).innerHTML=theme.Currency.formatMoney(state.total_price,theme.moneyFormatWithCurrency)},_createCartDiscountList:function(cart){return cart.cart_level_discount_applications.map(function(discount){var discountNode=this.cartDiscountTemplate.cloneNode(!0);return discountNode.querySelector(selectors2.cartDiscountTitle).textContent=discount.title,discountNode.querySelector(selectors2.cartDiscountAmount).innerHTML=theme.Currency.formatMoney(discount.total_allocated_amount,theme.moneyFormat),discountNode}.bind(this))},_createLineItemList:function(state){return state.items.map(function(item,index){var itemNode=this.itemTemplate.cloneNode(!0),itemPriceList=this.itemPriceListTemplate.cloneNode(!0);this._setLineItemAttributes(itemNode,item,index),this._setLineItemImage(itemNode,item.featured_image);var cartItemTitle=itemNode.querySelector(selectors2.cartItemTitle);cartItemTitle.textContent=item.product_title,cartItemTitle.setAttribute("href",item.url);var selling_plan_name=item.selling_plan_allocation?item.selling_plan_allocation.selling_plan.name:null,productDetailsList=this._createProductDetailsList(item.product_has_only_default_variant,item.options_with_values,item.properties,selling_plan_name);this._setProductDetailsList(itemNode,productDetailsList),this._setItemRemove(itemNode,item.title),itemPriceList.innerHTML=this._createItemPrice(item.original_price,item.final_price).outerHTML,item.unit_price_measurement&&itemPriceList.appendChild(this._createUnitPrice(item.unit_price,item.unit_price_measurement)),this._setItemPrice(itemNode,itemPriceList);var itemDiscountList=this._createItemDiscountList(item);this._setItemDiscountList(itemNode,itemDiscountList),this._setQuantityInputs(itemNode,item,index);var itemLinePrice=this._createItemPrice(item.original_line_price,item.final_line_price);return this._setItemLinePrice(itemNode,itemLinePrice),itemNode}.bind(this))},_setLineItemAttributes:function(itemNode,item,index){itemNode.setAttribute(attributes.cartItemKey,item.key),itemNode.setAttribute(attributes.cartItemUrl,item.url),itemNode.setAttribute(attributes.cartItemTitle,item.title),itemNode.setAttribute(attributes.cartItemIndex,index+1),itemNode.setAttribute(attributes.cartItemQuantity,item.quantity)},_setLineItemImage:function(itemNode,featuredImage){var image=itemNode.querySelector(selectors2.cartItemImage),sizedImageUrl=featuredImage.url!==null?theme.Images.getSizedImageUrl(featuredImage.url,"x190"):null;sizedImageUrl?(image.setAttribute("alt",featuredImage.alt),image.setAttribute("src",sizedImageUrl),image.classList.remove(classes.hide)):image.parentNode.removeChild(image)},_setProductDetailsList:function(item,productDetailsList){var itemDetails=item.querySelector(selectors2.cartItemDetails);if(productDetailsList.length){itemDetails.classList.remove(classes.hide),itemDetails.innerHTML=productDetailsList.reduce(function(result,element){return result+element.outerHTML},"");return}itemDetails.classList.add(classes.hide),itemDetails.textContent=""},_setItemPrice:function(item,price){item.querySelector(selectors2.cartItemPrice).innerHTML=price.outerHTML},_setItemDiscountList:function(item,discountList){var itemDiscountList=item.querySelector(selectors2.cartItemDiscountList);discountList.length===0?(itemDiscountList.innerHTML="",itemDiscountList.classList.add(classes.hide)):(itemDiscountList.innerHTML=discountList.reduce(function(result,element){return result+element.outerHTML},""),itemDiscountList.classList.remove(classes.hide))},_setItemRemove:function(item,title){item.querySelector(selectors2.cartRemove).setAttribute("aria-label",theme.strings.removeLabel.replace("[product]",title))},_setQuantityInputs:function(itemNode,item,index){var mobileInput=itemNode.querySelector(selectors2.quantityInputMobile),desktopInput=itemNode.querySelector(selectors2.quantityInputDesktop);mobileInput.setAttribute("id","updates_"+item.key),desktopInput.setAttribute("id","updates_large_"+item.key),[mobileInput,desktopInput].forEach(function(element){element.setAttribute(attributes.quantityItem,index+1),element.value=item.quantity}),itemNode.querySelector(selectors2.quantityLabelMobile).setAttribute("for","updates_"+item.key),itemNode.querySelector(selectors2.quantityLabelDesktop).setAttribute("for","updates_large_"+item.key)},setQuantityFormControllers:function(){var desktopQuantityInputs=document.querySelectorAll(selectors2.quantityInputDesktop),mobileQuantityInputs=document.querySelectorAll(selectors2.quantityInputMobile);this.mql.matches?(addNameAttribute(desktopQuantityInputs),removeNameAttribute(mobileQuantityInputs)):(addNameAttribute(mobileQuantityInputs),removeNameAttribute(desktopQuantityInputs));function addNameAttribute(inputs){inputs.forEach(function(element){element.setAttribute("name","updates[]")})}function removeNameAttribute(inputs){inputs.forEach(function(element){element.removeAttribute("name")})}},_setItemLinePrice:function(item,price){item.querySelector(selectors2.cartItemLinePrice).innerHTML=price.outerHTML},_createProductDetailsList:function(product_has_only_default_variant,options,properties,selling_plan_name){var optionsPropertiesHTML=[];return product_has_only_default_variant||(optionsPropertiesHTML=optionsPropertiesHTML.concat(this._getOptionList(options))),selling_plan_name&&(optionsPropertiesHTML=optionsPropertiesHTML.concat(this._getSellingPlanName(selling_plan_name))),properties!==null&&Object.keys(properties).length!==0&&(optionsPropertiesHTML=optionsPropertiesHTML.concat(this._getPropertyList(properties))),optionsPropertiesHTML},_getOptionList:function(options){return options.map(function(option){var optionElement=this.itemOptionTemplate.cloneNode(!0);return optionElement.textContent=option.name+": "+option.value,optionElement.classList.remove(classes.hide),optionElement}.bind(this))},_getPropertyList:function(properties){var propertiesArray=properties!==null?Object.entries(properties):[],filteredPropertiesArray=propertiesArray.filter(function(property){return!(property[0].charAt(0)==="_"||property[1].length===0)});return filteredPropertiesArray.map(function(property){var propertyElement=this.itemPropertyTemplate.cloneNode(!0);return propertyElement.querySelector(selectors2.cartItemPropertyName).textContent=property[0]+": ",property[0].indexOf("/uploads/")===-1?propertyElement.querySelector(selectors2.cartItemPropertyValue).textContent=property[1]:propertyElement.querySelector(selectors2.cartItemPropertyValue).innerHTML=' '+property[1].split("/").pop()+"",propertyElement.classList.remove(classes.hide),propertyElement}.bind(this))},_getSellingPlanName:function(selling_plan_name){var sellingPlanNameElement=this.itemSellingPlanNameTemplate.cloneNode(!0);return sellingPlanNameElement.textContent=selling_plan_name,sellingPlanNameElement.classList.remove(classes.hide),sellingPlanNameElement},_createItemPrice:function(original_price,final_price){var originalPriceHTML=theme.Currency.formatMoney(original_price,theme.moneyFormat),resultHTML;return original_price!==final_price?(resultHTML=this.itemPriceListTemplate.querySelector(selectors2.cartItemDiscountedPriceGroup).cloneNode(!0),resultHTML.querySelector(selectors2.cartItemOriginalPrice).innerHTML=originalPriceHTML,resultHTML.querySelector(selectors2.cartItemFinalPrice).innerHTML=theme.Currency.formatMoney(final_price,theme.moneyFormat)):(resultHTML=this.itemPriceListTemplate.querySelector(selectors2.cartItemRegularPriceGroup).cloneNode(!0),resultHTML.querySelector(selectors2.cartItemRegularPrice).innerHTML=originalPriceHTML),resultHTML.classList.remove(classes.hide),resultHTML},_createUnitPrice:function(unitPrice,unitPriceMeasurement){var unitPriceGroup=this.itemPriceListTemplate.querySelector(selectors2.unitPriceGroup).cloneNode(!0),unitPriceBaseUnit=(unitPriceMeasurement.reference_value!==1?unitPriceMeasurement.reference_value:"")+unitPriceMeasurement.reference_unit;return unitPriceGroup.querySelector(selectors2.unitPriceBaseUnit).textContent=unitPriceBaseUnit,unitPriceGroup.querySelector(selectors2.unitPrice).innerHTML=theme.Currency.formatMoney(unitPrice,theme.moneyFormat),unitPriceGroup.classList.remove(classes.hide),unitPriceGroup},_createItemDiscountList:function(item){return item.line_level_discount_allocations.map(function(discount){var discountNode=this.itemDiscountTemplate.cloneNode(!0);return discountNode.querySelector(selectors2.cartItemDiscountTitle).textContent=discount.discount_application.title,discountNode.querySelector(selectors2.cartItemDiscountAmount).innerHTML=theme.Currency.formatMoney(discount.amount,theme.moneyFormat),discountNode}.bind(this))},_showQuantityErrorMessages:function(itemElement){itemElement.querySelectorAll(selectors2.cartQuantityErrorMessage).forEach(function(element){element.textContent=theme.strings.quantityMinimumMessage}),itemElement.querySelectorAll(selectors2.cartQuantityErrorMessageWrapper).forEach(function(element){element.classList.remove(classes.hide)}),itemElement.querySelectorAll(selectors2.inputQty).forEach(function(element){element.classList.add(classes.inputError),element.focus()})},_hideQuantityErrorMessage:function(){var errorMessages=document.querySelectorAll(selectors2.cartQuantityErrorMessageWrapper);errorMessages.forEach(function(element){element.classList.add(classes.hide),element.querySelector(selectors2.cartQuantityErrorMessage).textContent=""}),this.container.querySelectorAll(selectors2.inputQty).forEach(function(element){element.classList.remove(classes.inputError)})},_handleThumbnailClick:function(evt){evt.target.classList.contains(classes.thumbnails)&&(window.location.href=evt.target.closest(selectors2.cartItem).getAttribute("data-cart-item-url"))},_onNoteChange:function(evt){if(evt.target.hasAttribute("data-cart-notes")){var note=evt.target.value;this._hideCartError(),this._hideQuantityErrorMessage();var headers=new Headers({"Content-Type":"application/json"}),request={method:"POST",headers:headers,body:JSON.stringify({note:note})};fetch("/cart/update.js",request).catch(function(){this._showCartError(evt.target)}.bind(this))}},_showCartError:function(elementToFocus){document.querySelector(selectors2.cartErrorMessage).textContent=theme.strings.cartError,document.querySelector(selectors2.cartErrorMessageWrapper).classList.remove(classes.hide),elementToFocus&&elementToFocus.focus()},_hideCartError:function(){document.querySelector(selectors2.cartErrorMessageWrapper).classList.add(classes.hide),document.querySelector(selectors2.cartErrorMessage).textContent=""},_onRemoveItem:function(evt){if(evt.target.hasAttribute("data-cart-remove")){evt.preventDefault();var lineItem=evt.target.closest(selectors2.cartItem),index=Number(lineItem.getAttribute(attributes.cartItemIndex));this._hideCartError();var request={method:"POST",headers:{"Content-Type":"application/json;"},body:JSON.stringify({line:index,quantity:0})};fetch("/cart/change.js",request).then(function(response){return response.json()}).then(function(state){state.item_count===0?this._emptyCart():(this._createCart(state),this._showRemoveMessage(lineItem.cloneNode(!0))),this._setCartCountBubble(state.item_count)}.bind(this)).catch(function(){this._showCartError(null)}.bind(this))}},_showRemoveMessage:function(lineItem){var index=lineItem.getAttribute("data-cart-item-index"),removeMessage=this._getRemoveMessage(lineItem);index-1===0?this.container.querySelector('[data-cart-item-index="1"]').insertAdjacentHTML("beforebegin",removeMessage.outerHTML):this.container.querySelector("[data-cart-item-index='"+(index-1)+"']").insertAdjacentHTML("afterend",removeMessage.outerHTML),this.container.querySelector("[data-removed-item-row]").focus()},_getRemoveMessage:function(lineItem){var formattedMessage=this._formatRemoveMessage(lineItem),tableCell=lineItem.querySelector(selectors2.cartTableCell).cloneNode(!0);return tableCell.removeAttribute("class"),tableCell.classList.add(classes.cartRemovedProduct),tableCell.setAttribute("colspan","4"),tableCell.innerHTML=formattedMessage,lineItem.setAttribute("role","alert"),lineItem.setAttribute("tabindex","-1"),lineItem.setAttribute("data-removed-item-row",!0),lineItem.innerHTML=tableCell.outerHTML,lineItem},_formatRemoveMessage:function(lineItem){var quantity=lineItem.getAttribute("data-cart-item-quantity"),url=lineItem.getAttribute(attributes.cartItemUrl),title=lineItem.getAttribute(attributes.cartItemTitle);return theme.strings.removedItemMessage.replace("[quantity]",quantity).replace("[link]",''+title+"")},_setCartCountBubble:function(quantity){this.cartCountBubble=this.cartCountBubble||document.querySelector(selectors2.cartCountBubble),this.cartCount=this.cartCount||document.querySelector(selectors2.cartCount),quantity>0?(this.cartCountBubble.classList.remove(classes.hide),this.cartCount.textContent=quantity):(this.cartCountBubble.classList.add(classes.hide),this.cartCount.textContent="")},_emptyCart:function(){this.emptyPageContent=this.emptyPageContent||this.container.querySelector(selectors2.emptyPageContent),this.cartWrapper=this.cartWrapper||this.container.querySelector(selectors2.cartWrapper),this.emptyPageContent.classList.remove(classes.hide),this.cartWrapper.classList.add(classes.hide)}}),Cart}(),theme.Filters=function(){var settings={mediaQueryMediumUp:"(min-width: "+theme.breakpoints.medium+"px)"},selectors2={filterSelection:"#FilterTags",sortSelection:"#SortBy",selectInput:"[data-select-input]"};function Filters(container){this.filterSelect=container.querySelector(selectors2.filterSelection),this.sortSelect=container.querySelector(selectors2.sortSelection),this.selects=document.querySelectorAll(selectors2.selectInput),this.sortSelect&&(this.defaultSort=this._getDefaultSortValue()),this.selects.length&&this.selects.forEach(function(select){select.classList.remove("hidden")}),this.initBreakpoints=this._initBreakpoints.bind(this),this.mql=window.matchMedia(settings.mediaQueryMediumUp),this.mql.addListener(this.initBreakpoints),this.filterSelect&&this.filterSelect.addEventListener("change",this._onFilterChange.bind(this)),this.sortSelect&&this.sortSelect.addEventListener("change",this._onSortChange.bind(this)),theme.Helpers.promiseStylesheet().then(function(){this._initBreakpoints()}.bind(this)),this._initParams()}return Filters.prototype=Object.assign({},Filters.prototype,{_initBreakpoints:function(){this.mql.matches&&slate.utils.resizeSelects(this.selects)},_initParams:function(){if(this.queryParams={},location.search.length)for(var aKeyValue,aCouples=location.search.substr(1).split("&"),i=0;i1&&(this.queryParams[decodeURIComponent(aKeyValue[0])]=decodeURIComponent(aKeyValue[1]))},_onSortChange:function(){this.queryParams.sort_by=this._getSortValue(),this.queryParams.page&&delete this.queryParams.page,window.location.search=decodeURIComponent(new URLSearchParams(Object.entries(this.queryParams)).toString())},_onFilterChange:function(){document.location.href=this._getFilterValue()},_getFilterValue:function(){return this.filterSelect.value},_getSortValue:function(){return this.sortSelect.value||this.defaultSort},_getDefaultSortValue:function(){return this.sortSelect.dataset.defaultSortby},onUnload:function(){this.filterSelect&&this.filterSelect.removeEventListener("change",this._onFilterChange),this.sortSelect&&this.sortSelect.removeEventListener("change",this._onSortChange),this.mql.removeListener(this.initBreakpoints)}}),Filters}(),theme.HeaderSection=function(){function Header(){theme.Header.init(),theme.MobileNav.init(),theme.SearchDrawer.init(),theme.Search.init()}return Header.prototype=Object.assign({},Header.prototype,{onUnload:function(){theme.Header.unload(),theme.Search.unload(),theme.MobileNav.unload()}}),Header}(),theme.Maps=function(){var config={zoom:14},apiStatus=null,mapsToLoad=[],errors={addressNoResults:theme.strings.addressNoResults,addressQueryLimit:theme.strings.addressQueryLimit,addressError:theme.strings.addressError,authError:theme.strings.authError},selectors2={section:'[data-section-type="map"]',map:"[data-map]",mapOverlay:"[data-map-overlay]"},classes={mapError:"map-section--load-error",errorMsg:"map-section__error errors text-center"};window.gm_authFailure=function(){Shopify.designMode&&(document.querySelector(selectors2.section).classList.add(classes.mapError),document.querySelector(selectors2.map).remove(),document.querySelector(selectors2.mapOverlay).insertAdjacentHTML("afterend",'
    '+theme.strings.authError+"
    "))};function Map(container){this.map=container.querySelector(selectors2.map),this.map&&(this.key=this.map.dataset.apiKey,typeof this.key!="undefined"&&(apiStatus==="loaded"?this.createMap():(mapsToLoad.push(this),apiStatus!=="loading"&&(apiStatus="loading",typeof window.google=="undefined"&&theme.Helpers.getScript("https://maps.googleapis.com/maps/api/js?key="+this.key).then(function(){apiStatus="loaded",initAllMaps()})))))}function initAllMaps(){mapsToLoad.forEach(function(map){map.createMap()})}function geolocate(map){return new Promise(function(resolve,reject){var geocoder=new google.maps.Geocoder,address=map.dataset.addressSetting;geocoder.geocode({address:address},function(results,status2){status2!==google.maps.GeocoderStatus.OK&&reject(status2),resolve(results)})})}return Map.prototype=Object.assign({},Map.prototype,{createMap:function(){return geolocate(this.map).then(function(results){var mapOptions={zoom:config.zoom,center:results[0].geometry.location,draggable:!1,clickableIcons:!1,scrollwheel:!1,disableDoubleClickZoom:!0,disableDefaultUI:!0},map=this.map=new google.maps.Map(this.map,mapOptions),center=this.center=map.getCenter(),marker=new google.maps.Marker({map:map,position:map.getCenter()});google.maps.event.addDomListener(window,"resize",theme.Helpers.debounce(function(){google.maps.event.trigger(map,"resize"),map.setCenter(center),this.map.removeAttribute("style")}.bind(this),250))}.bind(this)).catch(function(){var errorMessage;switch(status){case"ZERO_RESULTS":errorMessage=errors.addressNoResults;break;case"OVER_QUERY_LIMIT":errorMessage=errors.addressQueryLimit;break;case"REQUEST_DENIED":errorMessage=errors.authError;break;default:errorMessage=errors.addressError;break}Shopify.designMode&&(this.map.parentNode.classList.add(classes.mapError),this.map.parentNode.innerHTML='
    '+errorMessage+"
    ")}.bind(this))},onUnload:function(){this.map&&google.maps.event.clearListeners(this.map,"resize")}}),Map}(),theme.Product=function(){function Product(container){this.container=container;var sectionId=container.getAttribute("data-section-id");this.zoomPictures=[],this.ajaxEnabled=container.getAttribute("data-ajax-enabled")==="true",this.settings={mediaQueryMediumUp:"screen and (min-width: 750px)",mediaQuerySmall:"screen and (max-width: 749px)",bpSmall:!1,enableHistoryState:container.getAttribute("data-enable-history-state")||!1,namespace:".slideshow-"+sectionId,sectionId:sectionId,sliderActive:!1,zoomEnabled:!1},this.selectors={addToCart:"[data-add-to-cart]",addToCartText:"[data-add-to-cart-text]",cartCount:"[data-cart-count]",cartCountBubble:"[data-cart-count-bubble]",cartPopup:"[data-cart-popup]",cartPopupCartQuantity:"[data-cart-popup-cart-quantity]",cartPopupClose:"[data-cart-popup-close]",cartPopupDismiss:"[data-cart-popup-dismiss]",cartPopupImage:"[data-cart-popup-image]",cartPopupImageWrapper:"[data-cart-popup-image-wrapper]",cartPopupImagePlaceholder:"[data-image-loading-animation]",cartPopupProductDetails:"[data-cart-popup-product-details]",cartPopupQuantity:"[data-cart-popup-quantity]",cartPopupQuantityLabel:"[data-cart-popup-quantity-label]",cartPopupTitle:"[data-cart-popup-title]",cartPopupWrapper:"[data-cart-popup-wrapper]",loader:"[data-loader]",loaderStatus:"[data-loader-status]",quantity:"[data-quantity-input]",SKU:".variant-sku",productStatus:"[data-product-status]",originalSelectorId:"#ProductSelect-"+sectionId,productForm:"[data-product-form]",errorMessage:"[data-error-message]",errorMessageWrapper:"[data-error-message-wrapper]",imageZoomWrapper:"[data-image-zoom-wrapper]",productMediaWrapper:"[data-product-single-media-wrapper]",productThumbImages:".product-single__thumbnail--"+sectionId,productThumbs:".product-single__thumbnails-"+sectionId,productThumbListItem:".product-single__thumbnails-item",productThumbsWrapper:".thumbnails-wrapper",saleLabel:".product-price__sale-label-"+sectionId,singleOptionSelector:".single-option-selector-"+sectionId,shopifyPaymentButton:".shopify-payment-button",productMediaTypeVideo:"[data-product-media-type-video]",productMediaTypeModel:"[data-product-media-type-model]",priceContainer:"[data-price]",regularPrice:"[data-regular-price]",salePrice:"[data-sale-price]",unitPrice:"[data-unit-price]",unitPriceBaseUnit:"[data-unit-price-base-unit]",productPolicies:"[data-product-policies]",storeAvailabilityContainer:"[data-store-availability-container]"},this.classes={cartPopupWrapperHidden:"cart-popup-wrapper--hidden",hidden:"hide",visibilityHidden:"visibility-hidden",inputError:"input--error",jsZoomEnabled:"js-zoom-enabled",productOnSale:"price--on-sale",productUnitAvailable:"price--unit-available",productUnavailable:"price--unavailable",productSoldOut:"price--sold-out",cartImage:"cart-popup-item__image",productFormErrorMessageWrapperHidden:"product-form__error-message-wrapper--hidden",activeClass:"active-thumb",variantSoldOut:"product-form--variant-sold-out"},this.eventHandlers={},this.quantityInput=container.querySelector(this.selectors.quantity),this.errorMessageWrapper=container.querySelector(this.selectors.errorMessageWrapper),this.productForm=container.querySelector(this.selectors.productForm),this.addToCart=container.querySelector(this.selectors.addToCart),this.addToCartText=this.addToCart.querySelector(this.selectors.addToCartText),this.shopifyPaymentButton=container.querySelector(this.selectors.shopifyPaymentButton),this.priceContainer=container.querySelector(this.selectors.priceContainer),this.productPolicies=container.querySelector(this.selectors.productPolicies),this.storeAvailabilityContainer=container.querySelector(this.selectors.storeAvailabilityContainer),this.storeAvailabilityContainer&&this._initStoreAvailability(),this.loader=this.addToCart.querySelector(this.selectors.loader),this.loaderStatus=container.querySelector(this.selectors.loaderStatus),this.imageZoomWrapper=container.querySelectorAll(this.selectors.imageZoomWrapper);var productJson=document.getElementById("ProductJson-"+sectionId);!productJson||!productJson.innerHTML.length||(this.productSingleObject=JSON.parse(productJson.innerHTML),this.productState={available:!0,soldOut:!1,onSale:!1,showUnitPrice:!1},this.settings.zoomEnabled=this.imageZoomWrapper.length>0?this.imageZoomWrapper[0].classList.contains(this.classes.jsZoomEnabled):!1,this.initMobileBreakpoint=this._initMobileBreakpoint.bind(this),this.initDesktopBreakpoint=this._initDesktopBreakpoint.bind(this),this.mqlSmall=window.matchMedia(this.settings.mediaQuerySmall),this.mqlSmall.addListener(this.initMobileBreakpoint),this.mqlMediumUp=window.matchMedia(this.settings.mediaQueryMediumUp),this.mqlMediumUp.addListener(this.initDesktopBreakpoint),this.initMobileBreakpoint(),this.initDesktopBreakpoint(),this._stringOverrides(),this._initVariants(),this._initMediaSwitch(),this._initAddToCart(),this._setActiveThumbnail(),this._initProductVideo(),this._initModelViewerLibraries(),this._initShopifyXrLaunch())}return Product.prototype=Object.assign({},Product.prototype,{_stringOverrides:function(){theme.productStrings=theme.productStrings||{},theme.strings=Object.assign({},theme.strings,theme.productStrings)},_initStoreAvailability:function(){this.storeAvailability=new theme.StoreAvailability(this.storeAvailabilityContainer);var storeAvailabilityModalOpenedCallback=function(event){this.cartPopupWrapper&&!this.cartPopupWrapper.classList.contains(this.classes.cartPopupWrapperHidden)&&this._hideCartPopup(event)};this.storeAvailabilityContainer.addEventListener("storeAvailabilityModalOpened",storeAvailabilityModalOpenedCallback.bind(this))},_initMobileBreakpoint:function(){this.mqlSmall.matches?(this.container.querySelectorAll(this.selectors.productThumbImages).length>4&&this._initThumbnailSlider(),this.settings.zoomEnabled&&this.imageZoomWrapper.forEach(function(element,index){this._destroyZoom(index)}.bind(this)),this.settings.bpSmall=!0):(this.settings.sliderActive&&this._destroyThumbnailSlider(),this.settings.bpSmall=!1)},_initDesktopBreakpoint:function(){this.mqlMediumUp.matches&&this.settings.zoomEnabled&&this.imageZoomWrapper.forEach(function(element,index){this._enableZoom(element,index)}.bind(this))},_initVariants:function(){var options={container:this.container,enableHistoryState:this.container.getAttribute("data-enable-history-state")||!1,singleOptionSelector:this.selectors.singleOptionSelector,originalSelectorId:this.selectors.originalSelectorId,product:this.productSingleObject};this.variants=new slate.Variants(options),this.storeAvailability&&this.variants.currentVariant.available&&this.storeAvailability.updateContent(this.variants.currentVariant.id),this.eventHandlers.updateAvailability=this._updateAvailability.bind(this),this.eventHandlers.updateMedia=this._updateMedia.bind(this),this.eventHandlers.updatePrice=this._updatePrice.bind(this),this.eventHandlers.updateSKU=this._updateSKU.bind(this),this.container.addEventListener("variantChange",this.eventHandlers.updateAvailability),this.container.addEventListener("variantImageChange",this.eventHandlers.updateMedia),this.container.addEventListener("variantPriceChange",this.eventHandlers.updatePrice),this.container.addEventListener("variantSKUChange",this.eventHandlers.updateSKU)},_initMediaSwitch:function(){if(document.querySelector(this.selectors.productThumbImages)){var self2=this,productThumbImages=document.querySelectorAll(this.selectors.productThumbImages);this.eventHandlers.handleMediaFocus=this._handleMediaFocus.bind(this),productThumbImages.forEach(function(el){el.addEventListener("click",function(evt){evt.preventDefault();var mediaId=el.getAttribute("data-thumbnail-id");self2._switchMedia(mediaId),self2._setActiveThumbnail(mediaId)}),el.addEventListener("keyup",self2.eventHandlers.handleMediaFocus)})}},_initAddToCart:function(){this.productForm.addEventListener("submit",function(evt){if(this.addToCart.getAttribute("aria-disabled")==="true"){evt.preventDefault();return}if(this.ajaxEnabled){evt.preventDefault(),this.previouslyFocusedElement=document.activeElement;var isInvalidQuantity=!!this.quantityInput&&this.quantityInput.value<=0;if(isInvalidQuantity){this._showErrorMessage(theme.strings.quantityMinimumMessage);return}if(!isInvalidQuantity&&this.ajaxEnabled){this._handleButtonLoadingState(!0),this._addItemToCart(this.productForm);return}}}.bind(this))},_initProductVideo:function(){var sectionId=this.settings.sectionId,productMediaTypeVideo=this.container.querySelectorAll(this.selectors.productMediaTypeVideo);productMediaTypeVideo.forEach(function(el){theme.ProductVideo.init(el,sectionId)})},_initModelViewerLibraries:function(){var modelViewerElements=this.container.querySelectorAll(this.selectors.productMediaTypeModel);modelViewerElements.length<1||theme.ProductModel.init(modelViewerElements,this.settings.sectionId)},_initShopifyXrLaunch:function(){this.eventHandlers.initShopifyXrLaunchHandler=this._initShopifyXrLaunchHandler.bind(this),document.addEventListener("shopify_xr_launch",this.eventHandlers.initShopifyXrLaunchHandler)},_initShopifyXrLaunchHandler:function(){var currentMedia=this.container.querySelector(this.selectors.productMediaWrapper+":not(."+self.classes.hidden+")");currentMedia.dispatchEvent(new CustomEvent("xrLaunch",{bubbles:!0,cancelable:!0}))},_addItemToCart:function(form){var self2=this;fetch("/cart/add.js",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},body:theme.Helpers.serialize(form)}).then(function(response){return response.json()}).then(function(json){if(json.status&&json.status!==200){var error=new Error(json.description);throw error.isFromServer=!0,error}self2._hideErrorMessage(),self2._setupCartPopup(json)}).catch(function(error){self2.previouslyFocusedElement.focus(),self2._showErrorMessage(error.isFromServer&&error.message.length?error.message:theme.strings.cartError),self2._handleButtonLoadingState(!1),console.log(error)})},_handleButtonLoadingState:function(isLoading){isLoading?(this.addToCart.setAttribute("aria-disabled",!0),this.addToCartText.classList.add(this.classes.hidden),this.loader.classList.remove(this.classes.hidden),this.shopifyPaymentButton&&this.shopifyPaymentButton.setAttribute("disabled",!0),this.loaderStatus.setAttribute("aria-hidden",!1)):(this.addToCart.removeAttribute("aria-disabled"),this.addToCartText.classList.remove(this.classes.hidden),this.loader.classList.add(this.classes.hidden),this.shopifyPaymentButton&&this.shopifyPaymentButton.removeAttribute("disabled"),this.loaderStatus.setAttribute("aria-hidden",!0))},_showErrorMessage:function(errorMessage){var errorMessageContainer=this.container.querySelector(this.selectors.errorMessage);errorMessageContainer.innerHTML=errorMessage,this.quantityInput&&this.quantityInput.classList.add(this.classes.inputError),this.errorMessageWrapper.classList.remove(this.classes.productFormErrorMessageWrapperHidden),this.errorMessageWrapper.setAttribute("aria-hidden",!0),this.errorMessageWrapper.removeAttribute("aria-hidden")},_hideErrorMessage:function(){this.errorMessageWrapper.classList.add(this.classes.productFormErrorMessageWrapperHidden),this.quantityInput&&this.quantityInput.classList.remove(this.classes.inputError)},_setupCartPopup:function(item){this.cartPopup=this.cartPopup||document.querySelector(this.selectors.cartPopup),this.cartPopupWrapper=this.cartPopupWrapper||document.querySelector(this.selectors.cartPopupWrapper),this.cartPopupTitle=this.cartPopupTitle||document.querySelector(this.selectors.cartPopupTitle),this.cartPopupQuantity=this.cartPopupQuantity||document.querySelector(this.selectors.cartPopupQuantity),this.cartPopupQuantityLabel=this.cartPopupQuantityLabel||document.querySelector(this.selectors.cartPopupQuantityLabel),this.cartPopupClose=this.cartPopupClose||document.querySelector(this.selectors.cartPopupClose),this.cartPopupDismiss=this.cartPopupDismiss||document.querySelector(this.selectors.cartPopupDismiss),this.cartPopupImagePlaceholder=this.cartPopupImagePlaceholder||document.querySelector(this.selectors.cartPopupImagePlaceholder),this._setupCartPopupEventListeners(),this._updateCartPopupContent(item)},_updateCartPopupContent:function(item){var self2=this,quantity=this.quantityInput?this.quantityInput.value:1,selling_plan_name=item.selling_plan_allocation?item.selling_plan_allocation.selling_plan.name:null;this.cartPopupTitle.textContent=item.product_title,this.cartPopupQuantity.textContent=quantity,this.cartPopupQuantityLabel.textContent=theme.strings.quantityLabel.replace("[count]",quantity),this._setCartPopupPlaceholder(item.featured_image.url),this._setCartPopupImage(item.featured_image.url,item.featured_image.alt),this._setCartPopupProductDetails(item.product_has_only_default_variant,item.options_with_values,item.properties,selling_plan_name),fetch("/cart.js",{credentials:"same-origin"}).then(function(response){return response.json()}).then(function(cart){self2._setCartQuantity(cart.item_count),self2._setCartCountBubble(cart.item_count),self2._showCartPopup()}).catch(function(error){console.log(error)})},_setupCartPopupEventListeners:function(){this.eventHandlers.cartPopupWrapperKeyupHandler=this._cartPopupWrapperKeyupHandler.bind(this),this.eventHandlers.hideCartPopup=this._hideCartPopup.bind(this),this.eventHandlers.onBodyClick=this._onBodyClick.bind(this),this.cartPopupWrapper.addEventListener("keyup",this.eventHandlers.cartPopupWrapperKeyupHandler),this.cartPopupClose.addEventListener("click",this.eventHandlers.hideCartPopup),this.cartPopupDismiss.addEventListener("click",this.eventHandlers.hideCartPopup),document.body.addEventListener("click",this.eventHandlers.onBodyClick)},_cartPopupWrapperKeyupHandler:function(event){event.keyCode===slate.utils.keyboardKeys.ESCAPE&&this._hideCartPopup(event)},_setCartPopupPlaceholder:function(imageUrl){if(this.cartPopupImageWrapper=this.cartPopupImageWrapper||document.querySelector(this.selectors.cartPopupImageWrapper),imageUrl===null){this.cartPopupImageWrapper.classList.add(this.classes.hidden);return}},_setCartPopupImage:function(imageUrl,imageAlt){if(imageUrl!==null){this.cartPopupImageWrapper.classList.remove(this.classes.hidden);var sizedImageUrl=theme.Images.getSizedImageUrl(imageUrl,"200x"),image=document.createElement("img");image.src=sizedImageUrl,image.alt=imageAlt,image.classList.add(this.classes.cartImage),image.setAttribute("data-cart-popup-image",""),image.onload=function(){this.cartPopupImagePlaceholder.removeAttribute("data-image-loading-animation"),this.cartPopupImageWrapper.append(image)}.bind(this)}},_setCartPopupProductDetails:function(product_has_only_default_variant,options,properties,selling_plan_name){this.cartPopupProductDetails=this.cartPopupProductDetails||document.querySelector(this.selectors.cartPopupProductDetails);var variantPropertiesHTML="";product_has_only_default_variant||(variantPropertiesHTML=variantPropertiesHTML+this._getVariantOptionList(options)),selling_plan_name&&(variantPropertiesHTML=variantPropertiesHTML+this._getSellingPlanHTML(selling_plan_name)),properties!==null&&Object.keys(properties).length!==0&&(variantPropertiesHTML=variantPropertiesHTML+this._getPropertyList(properties)),variantPropertiesHTML.length===0?(this.cartPopupProductDetails.innerHTML="",this.cartPopupProductDetails.setAttribute("hidden","")):(this.cartPopupProductDetails.innerHTML=variantPropertiesHTML,this.cartPopupProductDetails.removeAttribute("hidden"))},_getVariantOptionList:function(variantOptions){var variantOptionListHTML="";return variantOptions.forEach(function(variantOption){variantOptionListHTML=variantOptionListHTML+'
  • '+variantOption.name+": "+variantOption.value+"
  • "}),variantOptionListHTML},_getPropertyList:function(properties){var propertyListHTML="",propertiesArray=Object.entries(properties);return propertiesArray.forEach(function(property){property[0].charAt(0)!=="_"&&property[1].length!==0&&(propertyListHTML=propertyListHTML+'
  • '+property[0]+": "+property[1])}),propertyListHTML},_getSellingPlanHTML:function(selling_plan_name){var sellingPlanHTML='
  • '+selling_plan_name+"
  • ";return sellingPlanHTML},_setCartQuantity:function(quantity){this.cartPopupCartQuantity=this.cartPopupCartQuantity||document.querySelector(this.selectors.cartPopupCartQuantity);var ariaLabel;quantity===1?ariaLabel=theme.strings.oneCartCount:quantity>1&&(ariaLabel=theme.strings.otherCartCount.replace("[count]",quantity)),this.cartPopupCartQuantity.textContent=quantity,this.cartPopupCartQuantity.setAttribute("aria-label",ariaLabel)},_setCartCountBubble:function(quantity){this.cartCountBubble=this.cartCountBubble||document.querySelector(this.selectors.cartCountBubble),this.cartCount=this.cartCount||document.querySelector(this.selectors.cartCount),this.cartCountBubble.classList.remove(this.classes.hidden),this.cartCount.textContent=quantity},_showCartPopup:function(){theme.Helpers.prepareTransition(this.cartPopupWrapper),this.cartPopupWrapper.classList.remove(this.classes.cartPopupWrapperHidden),this._handleButtonLoadingState(!1),slate.a11y.trapFocus({container:this.cartPopupWrapper,elementToFocus:this.cartPopup,namespace:"cartPopupFocus"})},_hideCartPopup:function(event){var setFocus=event.detail===0;theme.Helpers.prepareTransition(this.cartPopupWrapper),this.cartPopupWrapper.classList.add(this.classes.cartPopupWrapperHidden);var cartPopupImage=document.querySelector(this.selectors.cartPopupImage);cartPopupImage&&cartPopupImage.remove(),this.cartPopupImagePlaceholder.setAttribute("data-image-loading-animation",""),slate.a11y.removeTrapFocus({container:this.cartPopupWrapper,namespace:"cartPopupFocus"}),setFocus&&this.previouslyFocusedElement.focus(),this.cartPopupWrapper.removeEventListener("keyup",this.eventHandlers.cartPopupWrapperKeyupHandler),this.cartPopupClose.removeEventListener("click",this.eventHandlers.hideCartPopup),this.cartPopupDismiss.removeEventListener("click",this.eventHandlers.hideCartPopup),document.body.removeEventListener("click",this.eventHandlers.onBodyClick)},_onBodyClick:function(event){var target=event.target;target!==this.cartPopupWrapper&&!target.closest(this.selectors.cartPopup)&&this._hideCartPopup(event)},_setActiveThumbnail:function(mediaId){if(typeof mediaId=="undefined"){var productMediaWrapper=this.container.querySelector(this.selectors.productMediaWrapper+":not(.hide)");if(!productMediaWrapper)return;mediaId=productMediaWrapper.getAttribute("data-media-id")}var thumbnailWrappers=this.container.querySelectorAll(this.selectors.productThumbListItem+":not(.slick-cloned)"),activeThumbnail;thumbnailWrappers.forEach(function(el){var current=el.querySelector(this.selectors.productThumbImages+"[data-thumbnail-id='"+mediaId+"']");current&&(activeThumbnail=current)}.bind(this));var productThumbImages=document.querySelectorAll(this.selectors.productThumbImages);productThumbImages.forEach(function(el){el.classList.remove(this.classes.activeClass),el.removeAttribute("aria-current")}.bind(this)),activeThumbnail&&(activeThumbnail.classList.add(this.classes.activeClass),activeThumbnail.setAttribute("aria-current",!0),this._adjustThumbnailSlider(activeThumbnail))},_adjustThumbnailSlider:function(activeThumbnail){var sliderItem=activeThumbnail.closest("[data-slider-item]");if(sliderItem){var slideGroupLeaderIndex=Math.floor(Number(sliderItem.getAttribute("data-slider-slide-index"))/3)*3;window.setTimeout(function(){this.slideshow&&this.slideshow.goToSlideByIndex(slideGroupLeaderIndex)}.bind(this),251)}},_switchMedia:function(mediaId){var currentMedia=this.container.querySelector(this.selectors.productMediaWrapper+":not(."+this.classes.hidden+")"),newMedia=this.container.querySelector(this.selectors.productMediaWrapper+"[data-media-id='"+mediaId+"']"),otherMedia=this.container.querySelectorAll(this.selectors.productMediaWrapper+":not([data-media-id='"+mediaId+"'])");currentMedia.dispatchEvent(new CustomEvent("mediaHidden",{bubbles:!0,cancelable:!0})),newMedia.classList.remove(this.classes.hidden),newMedia.dispatchEvent(new CustomEvent("mediaVisible",{bubbles:!0,cancelable:!0})),otherMedia.forEach(function(el){el.classList.add(this.classes.hidden)}.bind(this))},_handleMediaFocus:function(evt){if(evt.keyCode===slate.utils.keyboardKeys.ENTER){var mediaId=evt.currentTarget.getAttribute("data-thumbnail-id"),productMediaWrapper=this.container.querySelector(this.selectors.productMediaWrapper+"[data-media-id='"+mediaId+"']");productMediaWrapper.focus()}},_initThumbnailSlider:function(){setTimeout(function(){this.slideshow=new theme.Slideshow(this.container.querySelector("[data-thumbnail-slider]"),{canUseTouchEvents:!0,type:"slide",slideActiveClass:"slick-active",slidesToShow:3,slidesToScroll:3}),this.settings.sliderActive=!0}.bind(this),250)},_destroyThumbnailSlider:function(){var sliderButtons=this.container.querySelectorAll("[data-slider-button]"),sliderTrack=this.container.querySelector("[data-slider-track]"),sliderItems=sliderTrack.querySelectorAll("[data-slider-item");this.settings.sliderActive=!1,sliderTrack&&(sliderTrack.removeAttribute("style"),sliderItems.forEach(function(sliderItem){var sliderItemLink=sliderItem.querySelector("[data-slider-item-link]");sliderItem.classList.remove("slick-active"),sliderItem.removeAttribute("style"),sliderItem.removeAttribute("tabindex"),sliderItem.removeAttribute("aria-hidden"),sliderItemLink.removeAttribute("tabindex")})),sliderButtons.forEach(function(sliderButton){sliderButton.removeAttribute("aria-disabled")}),this.slideshow.destroy(),this.slideshow=null},_liveRegionText:function(variant){var liveRegionText="[Availability] [Regular] [$$] [Sale] [$]. [UnitPrice] [$$$]";if(!this.productState.available)return liveRegionText=theme.strings.unavailable,liveRegionText;var availability=this.productState.soldOut?theme.strings.soldOut+",":"";liveRegionText=liveRegionText.replace("[Availability]",availability);var regularLabel="",regularPrice=theme.Currency.formatMoney(variant.price,theme.moneyFormat),saleLabel="",salePrice="",unitLabel="",unitPrice="";return this.productState.onSale&&(regularLabel=theme.strings.regularPrice,regularPrice=theme.Currency.formatMoney(variant.compare_at_price,theme.moneyFormat)+",",saleLabel=theme.strings.sale,salePrice=theme.Currency.formatMoney(variant.price,theme.moneyFormat)),this.productState.showUnitPrice&&(unitLabel=theme.strings.unitPrice,unitPrice=theme.Currency.formatMoney(variant.unit_price,theme.moneyFormat)+" "+theme.strings.unitPriceSeparator+" "+this._getBaseUnit(variant)),liveRegionText=liveRegionText.replace("[Regular]",regularLabel).replace("[$$]",regularPrice).replace("[Sale]",saleLabel).replace("[$]",salePrice).replace("[UnitPrice]",unitLabel).replace("[$$$]",unitPrice).trim(),liveRegionText},_updateLiveRegion:function(evt){var variant=evt.detail.variant,liveRegion=this.container.querySelector(this.selectors.productStatus);liveRegion.innerHTML=this._liveRegionText(variant),liveRegion.setAttribute("aria-hidden",!1),setTimeout(function(){liveRegion.setAttribute("aria-hidden",!0)},1e3)},_enableAddToCart:function(message){this.addToCart.removeAttribute("aria-disabled"),this.addToCart.setAttribute("aria-label",message),this.addToCartText.innerHTML=message,this.productForm.classList.remove(this.classes.variantSoldOut)},_disableAddToCart:function(message){message=message||theme.strings.unavailable,this.addToCart.setAttribute("aria-disabled",!0),this.addToCart.setAttribute("aria-label",message),this.addToCartText.innerHTML=message,this.productForm.classList.add(this.classes.variantSoldOut)},_updateAddToCart:function(){if(!this.productState.available){this._disableAddToCart(theme.strings.unavailable);return}if(this.productState.soldOut){this._disableAddToCart(theme.strings.soldOut);return}this._enableAddToCart(theme.strings.addToCart)},_setProductState:function(evt){var variant=evt.detail.variant;if(!variant){this.productState.available=!1;return}this.productState.available=!0,this.productState.soldOut=!variant.available,this.productState.onSale=variant.compare_at_price>variant.price,this.productState.showUnitPrice=!!variant.unit_price},_updateAvailability:function(evt){this._hideErrorMessage(),this._setProductState(evt),this._updateStoreAvailabilityContent(evt),this._updateAddToCart(),this._updateLiveRegion(evt),this._updatePriceComponentStyles(evt)},_updateStoreAvailabilityContent:function(evt){this.storeAvailability&&(this.productState.available&&!this.productState.soldOut?this.storeAvailability.updateContent(evt.detail.variant.id):this.storeAvailability.clearContent())},_updateMedia:function(evt){var variant=evt.detail.variant,mediaId=variant.featured_media.id,sectionMediaId=this.settings.sectionId+"-"+mediaId;this._switchMedia(sectionMediaId),this._setActiveThumbnail(sectionMediaId)},_hidePriceComponent:function(){this.priceContainer.classList.add(this.classes.productUnavailable),this.priceContainer.setAttribute("aria-hidden",!0),this.productPolicies&&this.productPolicies.classList.add(this.classes.visibilityHidden)},_updatePriceComponentStyles:function(evt){var variant=evt.detail.variant,unitPriceBaseUnit=this.priceContainer.querySelector(this.selectors.unitPriceBaseUnit);if(!this.productState.available){this._hidePriceComponent();return}this.productState.soldOut?this.priceContainer.classList.add(this.classes.productSoldOut):this.priceContainer.classList.remove(this.classes.productSoldOut),this.productState.showUnitPrice?(unitPriceBaseUnit.innerHTML=this._getBaseUnit(variant),this.priceContainer.classList.add(this.classes.productUnitAvailable)):this.priceContainer.classList.remove(this.classes.productUnitAvailable),this.productState.onSale?this.priceContainer.classList.add(this.classes.productOnSale):this.priceContainer.classList.remove(this.classes.productOnSale),this.priceContainer.classList.remove(this.classes.productUnavailable),this.priceContainer.removeAttribute("aria-hidden"),this.productPolicies&&this.productPolicies.classList.remove(this.classes.visibilityHidden)},_updatePrice:function(evt){var variant=evt.detail.variant,regularPrices=this.priceContainer.querySelectorAll(this.selectors.regularPrice),salePrice=this.priceContainer.querySelector(this.selectors.salePrice),unitPrice=this.priceContainer.querySelector(this.selectors.unitPrice),formatRegularPrice=function(regularPriceElement,price){regularPriceElement.innerHTML=theme.Currency.formatMoney(price,theme.moneyFormat)};this.productState.onSale?(regularPrices.forEach(function(regularPrice){formatRegularPrice(regularPrice,variant.compare_at_price)}),salePrice.innerHTML=theme.Currency.formatMoney(variant.price,theme.moneyFormat)):regularPrices.forEach(function(regularPrice){formatRegularPrice(regularPrice,variant.price)}),this.productState.showUnitPrice&&(unitPrice.innerHTML=theme.Currency.formatMoney(variant.unit_price,theme.moneyFormat))},_getBaseUnit:function(variant){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},_updateSKU:function(evt){var variant=evt.detail.variant,sku=document.querySelector(this.selectors.SKU);sku&&(sku.innerHTML=variant.sku)},_enableZoom:function(el,index){this.zoomPictures[index]=new theme.Zoom(el)},_destroyZoom:function(index){this.zoomPictures.length!==0&&this.zoomPictures[index].unload()},onUnload:function(){this.container.removeEventListener("variantChange",this.eventHandlers.updateAvailability),this.container.removeEventListener("variantImageChange",this.eventHandlers.updateMedia),this.container.removeEventListener("variantPriceChange",this.eventHandlers.updatePrice),this.container.removeEventListener("variantSKUChange",this.eventHandlers.updateSKU),theme.ProductVideo.removeSectionVideos(this.settings.sectionId),theme.ProductModel.removeSectionModels(this.settings.sectionId),this.mqlSmall&&this.mqlSmall.removeListener(this.initMobileBreakpoint),this.mqlMediumUp&&this.mqlMediumUp.removeListener(this.initDesktopBreakpoint)}}),Product}(),theme.ProductRecommendations=function(){function ProductRecommendations(container){var baseUrl=container.dataset.baseUrl,productId=container.dataset.productId,recommendationsSectionUrl=baseUrl+"?section_id=product-recommendations&product_id="+productId+"&limit=4";window.performance.mark("debut:product:fetch_product_recommendations.start"),fetch(recommendationsSectionUrl).then(function(response){return response.text()}).then(function(productHtml){productHtml.trim()!==""&&(container.innerHTML=productHtml,container.innerHTML=container.firstElementChild.innerHTML,window.performance.mark("debut:product:fetch_product_recommendations.end"),performance.measure("debut:product:fetch_product_recommendations","debut:product:fetch_product_recommendations.start","debut:product:fetch_product_recommendations.end"))})}return ProductRecommendations}(),theme.Quotes=function(){var config={mediaQuerySmall:"screen and (max-width: 749px)",mediaQueryMediumUp:"screen and (min-width: 750px)",slideCount:0},defaults={canUseKeyboardArrows:!1,type:"slide",slidesToShow:3};function Quotes(container){this.container=container;var sectionId=container.getAttribute("data-section-id");this.slider=document.getElementById("Quotes-"+sectionId),this.sliderActive=!1,this.mobileOptions=Object.assign({},defaults,{canUseTouchEvents:!0,slidesToShow:1}),this.desktopOptions=Object.assign({},defaults,{slidesToShow:Math.min(defaults.slidesToShow,this.slider.getAttribute("data-count"))}),this.initMobileSlider=this._initMobileSlider.bind(this),this.initDesktopSlider=this._initDesktopSlider.bind(this),this.mqlSmall=window.matchMedia(config.mediaQuerySmall),this.mqlSmall.addListener(this.initMobileSlider),this.mqlMediumUp=window.matchMedia(config.mediaQueryMediumUp),this.mqlMediumUp.addListener(this.initDesktopSlider),this.initMobileSlider(),this.initDesktopSlider()}return Quotes.prototype=Object.assign({},Quotes.prototype,{onUnload:function(){this.mqlSmall.removeListener(this.initMobileSlider),this.mqlMediumUp.removeListener(this.initDesktopSlider),this.slideshow.destroy()},onBlockSelect:function(evt){var slide=document.querySelector(".quotes-slide--"+evt.detail.blockId),slideIndex=Number(slide.getAttribute("data-slider-slide-index"));this.mqlMediumUp.matches&&(slideIndex=Math.max(0,Math.min(slideIndex,this.slideshow.slides.length-3))),this.slideshow.goToSlideByIndex(slideIndex)},_initMobileSlider:function(){this.mqlSmall.matches&&this._initSlider(this.mobileOptions)},_initDesktopSlider:function(){this.mqlMediumUp.matches&&this._initSlider(this.desktopOptions)},_initSlider:function(args){this.sliderActive&&(this.slideshow.destroy(),this.sliderActive=!1),this.slideshow=new theme.Slideshow(this.container,args),this.sliderActive=!0}}),Quotes}(),theme.SlideshowSection=function(){var selectors2={sliderMobileContentIndex:"[data-slider-mobile-content-index]"};function SlideshowSection(container){var sectionId=container.dataset.sectionId;this.container=container,this.eventHandlers={},this.slideshowDom=container.querySelector("#Slideshow-"+sectionId),this.sliderMobileContentIndex=container.querySelectorAll(selectors2.sliderMobileContentIndex),this.slideshow=new theme.Slideshow(container,{autoplay:this.slideshowDom.getAttribute("data-autorotate")==="true",slideInterval:this.slideshowDom.getAttribute("data-speed")}),this._setupEventListeners()}return SlideshowSection}(),theme.SlideshowSection.prototype=Object.assign({},theme.SlideshowSection.prototype,{_setupEventListeners:function(){this.eventHandlers.onSliderSlideChanged=function(event){this._onSliderSlideChanged(event.detail)}.bind(this),this.container.addEventListener("slider_slide_changed",this.eventHandlers.onSliderSlideChanged)},_onSliderSlideChanged:function(slideIndex){var activeClass="slideshow__text-content--mobile-active";this.sliderMobileContentIndex.forEach(function(element){Number(element.getAttribute("data-slider-mobile-content-index"))===slideIndex?element.classList.add(activeClass):element.classList.remove(activeClass)})},onUnload:function(){this.slideshow.destroy()},onBlockSelect:function(evt){this.slideshow.adaptHeight&&this.slideshow.setSlideshowHeight();var slide=this.container.querySelector(".slideshow__slide--"+evt.detail.blockId),slideIndex=slide.getAttribute("data-slider-slide-index");this.slideshow.setSlide(slideIndex),this.slideshow.stopAutoplay()},onBlockDeselect:function(){this.slideshow.startAutoplay()}}),theme.StoreAvailability=function(){var selectors2={storeAvailabilityModalOpen:"[data-store-availability-modal-open]",storeAvailabilityModalProductTitle:"[data-store-availability-modal-product-title]",storeAvailabilityModalVariantTitle:"[data-store-availability-modal-variant-title]"},classes={hidden:"hide"};function StoreAvailability(container){this.container=container,this.productTitle=this.container.dataset.productTitle,this.hasOnlyDefaultVariant=this.container.dataset.hasOnlyDefaultVariant==="true"}return StoreAvailability.prototype=Object.assign({},StoreAvailability.prototype,{updateContent:function(variantId){var variantSectionUrl=this.container.dataset.baseUrl+"/variants/"+variantId+"/?section_id=store-availability",self2=this,storeAvailabilityModalOpen=self2.container.querySelector(selectors2.storeAvailabilityModalOpen);this.container.style.opacity=.5,storeAvailabilityModalOpen&&(storeAvailabilityModalOpen.disabled=!0,storeAvailabilityModalOpen.setAttribute("aria-busy",!0)),fetch(variantSectionUrl).then(function(response){return response.text()}).then(function(storeAvailabilityHTML){storeAvailabilityHTML.trim()!==""&&(self2.container.innerHTML=storeAvailabilityHTML,self2.container.innerHTML=self2.container.firstElementChild.innerHTML,self2.container.style.opacity=1,storeAvailabilityModalOpen=self2.container.querySelector(selectors2.storeAvailabilityModalOpen),storeAvailabilityModalOpen&&(storeAvailabilityModalOpen.addEventListener("click",self2._onClickModalOpen.bind(self2)),self2.modal=self2._initModal(),self2._updateProductTitle(),self2.hasOnlyDefaultVariant&&self2._hideVariantTitle()))})},clearContent:function(){this.container.innerHTML=""},_onClickModalOpen:function(){this.container.dispatchEvent(new CustomEvent("storeAvailabilityModalOpened",{bubbles:!0,cancelable:!0}))},_initModal:function(){return new window.Modals("StoreAvailabilityModal","store-availability-modal",{close:".js-modal-close-store-availability-modal",closeModalOnClick:!0,openClass:"store-availabilities-modal--active"})},_updateProductTitle:function(){var storeAvailabilityModalProductTitle=this.container.querySelector(selectors2.storeAvailabilityModalProductTitle);storeAvailabilityModalProductTitle.textContent=this.productTitle},_hideVariantTitle:function(){var storeAvailabilityModalVariantTitle=this.container.querySelector(selectors2.storeAvailabilityModalVariantTitle);storeAvailabilityModalVariantTitle.classList.add(classes.hidden)}}),StoreAvailability}(),theme.VideoSection=function(){function VideoSection(container){container.querySelectorAll(".video").forEach(function(el){theme.Video.init(el),theme.Video.editorLoadVideo(el.id)})}return VideoSection}(),theme.VideoSection.prototype=Object.assign({},theme.VideoSection.prototype,{onUnload:function(){theme.Video.removeEvents()}}),theme.heros={},theme.HeroSection=function(){function HeroSection(container){var sectionId=container.getAttribute("data-section-id"),hero="#Hero-"+sectionId;theme.heros[hero]=new theme.Hero(hero,sectionId)}return HeroSection}();var selectors={disclosureLocale:"[data-disclosure-locale]",disclosureCurrency:"[data-disclosure-currency]"};theme.FooterSection=function(){function Footer(container){this.container=container,this.cache={},this.cacheSelectors(),this.cache.localeDisclosure&&(this.localeDisclosure=new theme.Disclosure(this.cache.localeDisclosure)),this.cache.currencyDisclosure&&(this.currencyDisclosure=new theme.Disclosure(this.cache.currencyDisclosure))}return Footer.prototype=Object.assign({},Footer.prototype,{cacheSelectors:function(){this.cache={localeDisclosure:this.container.querySelector(selectors.disclosureLocale),currencyDisclosure:this.container.querySelector(selectors.disclosureCurrency)}},onUnload:function(){this.cache.localeDisclosure&&this.localeDisclosure.destroy(),this.cache.currencyDisclosure&&this.currencyDisclosure.destroy()}}),Footer}(),document.addEventListener("DOMContentLoaded",function(){var sections=new theme.Sections;sections.register("cart-template",theme.Cart),sections.register("product",theme.Product),sections.register("collection-template",theme.Filters),sections.register("product-template",theme.Product),sections.register("header-section",theme.HeaderSection),sections.register("map",theme.Maps),sections.register("slideshow-section",theme.SlideshowSection),sections.register("store-availability",theme.StoreAvailability),sections.register("video-section",theme.VideoSection),sections.register("quotes",theme.Quotes),sections.register("hero-section",theme.HeroSection),sections.register("product-recommendations",theme.ProductRecommendations),sections.register("footer-section",theme.FooterSection),theme.customerTemplates.init();var tableSelectors=".rte table,.custom__item-inner--html table";slate.rte.wrapTable({tables:document.querySelectorAll(tableSelectors),tableWrapperClass:"scrollable-wrapper"});var iframeSelectors='.rte iframe[src*="youtube.com/embed"],.rte iframe[src*="player.vimeo"],.custom__item-inner--html iframe[src*="youtube.com/embed"],.custom__item-inner--html iframe[src*="player.vimeo"]';slate.rte.wrapIframe({iframes:document.querySelectorAll(iframeSelectors),iframeWrapperClass:"video-wrapper"}),slate.a11y.pageLinkFocus(document.getElementById(window.location.hash.substr(1)));var inPageLink=document.querySelector(".in-page-link");inPageLink&&inPageLink.addEventListener("click",function(evt){slate.a11y.pageLinkFocus(document.getElementById(evt.currentTarget.hash.substr(1)))}),document.querySelectorAll('a[href="#"]').forEach(function(anchor){anchor.addEventListener("click",function(evt){evt.preventDefault()})}),slate.a11y.accessibleLinks({messages:{newWindow:theme.strings.newWindow,external:theme.strings.external,newWindowExternal:theme.strings.newWindowExternal},links:document.querySelectorAll("a[href]:not([aria-describedby]), .product-single__thumbnail")}),theme.FormStatus.init();var selectors2={image:"[data-image]",lazyloaded:".lazyloaded"};document.addEventListener("lazyloaded",function(evt){var image=evt.target;if(removeImageLoadingAnimation(image),document.body.classList.contains("template-index")){var mainContent=document.getElementById("MainContent");if(mainContent&&mainContent.children&&mainContent.children.length){var firstSection=document.getElementsByClassName("index-section")[0];if(!firstSection.contains(image))return;window.performance.mark("debut:index:first_image_visible")}}if(image.hasAttribute("data-bgset")){var innerImage=image.querySelector(selectors2.lazyloaded);if(innerImage){var alt=image.getAttribute("data-alt"),src=innerImage.hasAttribute("data-src")?innerImage.getAttribute("data-src"):image.getAttribute("data-bg");image.setAttribute("alt",alt||""),image.setAttribute("src",src||"")}}image.hasAttribute("data-image")});function onLoadHideLazysizesAnimation(){var alreadyLazyloaded=document.querySelectorAll(".lazyloaded");alreadyLazyloaded.forEach(function(image){removeImageLoadingAnimation(image)})}onLoadHideLazysizesAnimation(),document.addEventListener("touchstart",function(){theme.Helpers.setTouch()},{once:!0}),document.fonts&&document.fonts.ready.then(function(){window.performance.mark("debut:fonts_loaded")})});function onYouTubeIframeAPIReady(){theme.Video.loadVideos()}function removeImageLoadingAnimation(image){var imageWrapper=image.hasAttribute("data-image-loading-animation")?image:image.closest("[data-image-loading-animation]");imageWrapper&&imageWrapper.removeAttribute("data-image-loading-animation")}document.addEventListener("DOMContentLoaded",function(){var headerEl=document.getElementById("header"),headerOffsetTop=0;function setHeaderPosition(){headerEl.style.position=window.pageYOffset>=headerOffsetTop?"fixed":"static"}var headerAnnouncementBarEl=document.querySelector(".js-siteHeader > .announcement-bar");headerAnnouncementBarEl&&(headerOffsetTop=parseInt(getComputedStyle(headerAnnouncementBarEl).height),window.addEventListener("resize",function(){return headerOffsetTop=parseInt(getComputedStyle(headerAnnouncementBarEl).height)}),window.addEventListener("scroll",setHeaderPosition)),setHeaderPosition(),setTimeout(function(){var gdprLinkEl=document.querySelector('[href="/pages/data-protection"][target="_blank"]');gdprLinkEl&&gdprLinkEl.removeAttribute("target")},3e3);function supportsVideoType(video2,type){var formats={ogg:'video/ogg; codecs="theora"',h264:'video/mp4; codecs="avc1.42E01E"',webm:'video/webm; codecs="vp8, vorbis"',vp9:'video/webm; codecs="vp9"',hls:'application/x-mpegURL; codecs="avc1.42E01E"'};return video2.canPlayType(formats[type]||type)}for(var videos=document.getElementsByTagName("video"),i=0;i
    '}function createThumbail(id){return'Youtube Preview
    '}function createIframe(v,id){var iframe=document.createElement("iframe");console.log(v),iframe.setAttribute("src","//www.youtube.com/embed/"+id+"?autoplay=1&color=white&autohide=2&modestbranding=1&border=0&wmode=opaque&enablejsapi=1&showinfo=0&rel=0"),iframe.setAttribute("allow","autoplay"),iframe.setAttribute("frameborder","0"),iframe.setAttribute("class","youtube-iframe"),v.firstChild.replaceWith(iframe)}jQuery("#video-modal").on("hidden.bs.modal",function(e){jQuery(this).find("iframe").remove()}),jQuery("#video-modal").on("show.bs.modal",function(e){getVideos()}),getVideos()}); //# sourceMappingURL=/cdn/shop/t/9/assets/theme.js.map