PageSourceSearch

https://tinkypoo.com/cdn/shop/t/15/assets/theme.js?v=36045149460383099681695057453

js tinkypoo.com collected 2026-10-07 06:52:07 UTC 174,592 bytes, 2 lines download raw bytes

1function _get(target,property,receiver){return typeof Reflect!="undefined"&&Reflect.get?_get=Reflect.get:_get=function(target2,property2,receiver2){var base=_superPropBase(target2,property2);if(base){var desc=Object.getOwnPropertyDescriptor(base,property2);return desc.get?desc.get.call(receiver2):desc.value}},_get(target,property,receiver||target)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),object!==null););return object}function _inherits(subClass,superClass){if(typeof superClass!="function"&&superClass!==null)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf||function(o2,p2){return o2.__proto__=p2,o2},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){return call&&(_typeof(call)==="object"||typeof call=="function")?call:_assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o2){return o2.__proto__||Object.getPrototypeOf(o2)},_getPrototypeOf(o)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}function _typeof(obj){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(obj2){return typeof obj2}:_typeof=function(obj2){return obj2&&typeof Symbol=="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2},_typeof(obj)}(function($){var $=jQuery=$,cc={sections:[]};theme.cartNoteMonitor={load:function($notes){$notes.on("change.themeCartNoteMonitor paste.themeCartNoteMonitor keyup.themeCartNoteMonitor",function(){theme.cartNoteMonitor.postUpdate($(this).val())})},unload:function($notes){$notes.off(".themeCartNoteMonitor")},updateThrottleTimeoutId:-1,updateThrottleInterval:500,postUpdate:function(val){clearTimeout(theme.cartNoteMonitor.updateThrottleTimeoutId),theme.cartNoteMonitor.updateThrottleTimeoutId=setTimeout(function(){$.post(theme.routes.cart_url+"/update.js",{note:val},function(data){},"json")},theme.cartNoteMonitor.updateThrottleInterval)}},theme.scriptsLoaded={},theme.loadScriptOnce=function(src,callback,beforeRun,sync){if(typeof theme.scriptsLoaded[src]=="undefined"){theme.scriptsLoaded[src]=[];var tag=document.createElement("script");
1tag.src=src,(sync||beforeRun)&&(tag.async=!1),beforeRun&&beforeRun(),typeof callback=="function"&&(theme.scriptsLoaded[src].push(callback),tag.readyState?tag.onreadystatechange=function(){if(tag.readyState=="loaded"||tag.readyState=="complete"){tag.onreadystatechange=null;for(var i=0;i<theme.scriptsLoaded[this].length;i++)theme.scriptsLoaded[this][i]();theme.scriptsLoaded[this]=!0}}.bind(src):tag.onload=function(){for(var i=0;i<theme.scriptsLoaded[this].length;i++)theme.scriptsLoaded[this][i]();theme.scriptsLoaded[this]=!0}.bind(src));var firstScriptTag=document.getElementsByTagName("script")[0];return firstScriptTag.parentNode.insertBefore(tag,firstScriptTag),!0}else if(_typeof(theme.scriptsLoaded[src])==="object"&&typeof callback=="function")theme.scriptsLoaded[src].push(callback);else return typeof callback=="function"&&callback(),!1},theme.loadStyleOnce=function(src){var srcWithoutProtocol=src.replace(/^https?:/,"");if(!document.querySelector('link[href="'+encodeURI(srcWithoutProtocol)+'"]')){var tag=document.createElement("link");tag.href=srcWithoutProtocol,tag.rel="stylesheet",tag.type="text/css";var firstTag=document.getElementsByTagName("link")[0];firstTag.parentNode.insertBefore(tag,firstTag)}},theme.Disclosure=(function(){var selectors={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.cache={},this._cacheSelectors(),this._connectOptions(),this._connectToggle(),this._onFocusOut()}return Disclosure.prototype=$.extend({},Disclosure.prototype,{_cacheSelectors:function(){this.cache={$disclosureList:this.$container.find(selectors.disclosureList),$disclosureToggle:this.$container.find(selectors.disclosureToggle),$disclosureInput:this.$container.find(selectors.disclosureInput),$disclosureOptions:this.$container.find(selectors.disclosureOptions)}},_connectToggle:function(){this.cache.$disclosureToggle.on("click",function(evt){var ariaExpanded=$(evt.currentTarget).attr("aria-expanded")==="true";$(evt.currentTarget).attr("aria-expanded",!ariaExpanded),this.cache.$disclosureList.toggleClass(classes.listVisible)}.bind(this))},_connectOptions:function(){this.cache.$disclosureOptions.on("click",function(evt){evt.preventDefault(),this._submitForm($(evt.currentTarget).data("value"))}.bind(this))},_onFocusOut:function(){this.cache.$disclosureToggle.on("focusout",function(evt){var disclosureLostFocus=this.$container.has(evt.relatedTarget).length===0;disclosureLostFocus&&this._hideList()}.bind(this)),this.cache.$disclosureList.on("focusout",function(evt){var childInFocus=$(evt.currentTarget).has(evt.relatedTarget).length>
10,isVisible=this.cache.$disclosureList.hasClass(classes.listVisible);isVisible&&!childInFocus&&this._hideList()}.bind(this)),this.$container.on("keyup",function(evt){evt.which===27&&(this._hideList(),this.cache.$disclosureToggle.focus())}.bind(this)),this.bodyOnClick=function(evt){var isOption=this.$container.has(evt.target).length>0,isVisible=this.cache.$disclosureList.hasClass(classes.listVisible);isVisible&&!isOption&&this._hideList()}.bind(this),$("body").on("click",this.bodyOnClick)},_submitForm:function(value){this.cache.$disclosureInput.val(value),this.$container.parents("form").submit()},_hideList:function(){this.cache.$disclosureList.removeClass(classes.listVisible),this.cache.$disclosureToggle.attr("aria-expanded",!1)},unload:function(){$("body").off("click",this.bodyOnClick),this.cache.$disclosureOptions.off(),this.cache.$disclosureToggle.off(),this.cache.$disclosureList.off(),this.$container.off()}}),Disclosure})(),$.fn.clickyBoxes=function(prefix){if(prefix=="destroy")$(this).off(".clickyboxes"),$(this).next(".clickyboxes").off(".clickyboxes");else return $(this).filter("select:not(.clickybox-replaced)").addClass("clickybox-replaced").each(function(){var prefix2=prefix2||$(this).attr("id"),$optCont=$('<ul class="clickyboxes"/>').attr("id","clickyboxes-"+prefix2).data("select",$(this)).insertAfter(this),$label;$(this).is("[id]")?$label=$('label[for="'+$(this).attr("id")+'"]'):$label=$(this).siblings("label"),$label.length>0&&$optCont.addClass("options-"+removeDiacritics($label.text()).toLowerCase().replace(/'/g,"").replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/-*$/,"")),$(this).find("option").each(function(){$("<li/>").appendTo($optCont).append($('<a href="#"/>').attr("data-value",$(this).val()).html($(this).html()).addClass("opt--"+removeDiacritics($(this).text()).toLowerCase().replace(/'/g,"").replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/-*$/,"")))}),$(this).hide().addClass("replaced").on("change.clickyboxes keyup.clickyboxes",function(){var val=$(this).val();$optCont.find("a").removeClass("active").filter(function(){return $(this).attr("data-value")==val}).addClass("active")}).trigger("keyup"),$optCont.on("click.clickyboxes","a",function(){if(!$(this).hasClass("active")){var $clicky=$(this).closest(".clickyboxes");$clicky.data("select").val($(this).data("value")).trigger("change"),$clicky.trigger("change")}return!1})})},(function(){function throttle(callback,threshold){var debounceTimeoutId=-1,tick=!1;return function(){clearTimeout(debounceTimeoutId),debounceTimeoutId=setTimeout(callback,threshold),tick||(callback.call(),tick=!0,setTimeout(function(){tick=!1},threshold))}}var scrollEvent=document.createEvent("Event");scrollEvent.initEvent("throttled-scroll",!0,!0),window.addEventListener("scroll",throttle(function(){window.dispatchEvent(scrollEvent)},200))})(),theme.Sections=new function(){var _=this;_._instances=[],_._deferredSectionTargets=[],_._sections=[],_._deferredLoadViewportExcess=300,_._deferredWatcherRunning=!1,_.init=function(){$(document).on("shopify:section:load",function(e){var target=_._themeSectionTargetFromShopifySectionTarget(e.target);target&&_.sectionLoad(target)}).on("shopify:section:unload",function(e){var target=_._themeSectionTargetFromShopifySectionTarget(e.target);target&&_.sectionUnload(target)}),$(window).on("throttled-scroll.themeSectionDeferredLoader debouncedresize.themeSectionDeferredLoader",_._processDeferredSections),_._deferredWatcherRunning=!0},_.register=function(type,section,options){_._sections.push({type:type,section:section,afterSectionLoadCallback:options?options.afterLoad:null,afterSectionUnloadCallback:options?options.afterUnload:null}),$('[data-section-type="'+type+'"]').each(function(){Shopify.designMode||options&&options.deferredLoad===!1||!_._deferredWatcherRunning?_.sectionLoad(this):_.sectionDeferredLoad(this,options)})},_.sectionDeferredLoad=function(target,options){_._deferredSectionTargets.push({target:target,deferredLoadViewportExcess:options&&options.deferredLoadViewportExcess?options.deferredLoadViewportExcess:_._deferredLoadViewportExcess}),_._processDeferredSections(!0)},_._processDeferredSections=function(firstRunCheck){if(_._deferredSectionTargets.length)for(var viewportTop=$(window).scrollTop(),viewportBottom=viewportTop+$(window).height(),loopStart=firstRunCheck===!0?_._deferredSectionTargets.length-1:0,i=loopStart;i<_._deferredSectionTargets.length;i++){var target=_._deferredSectionTargets[i].target,viewportExcess=_._deferredSectionTargets[i].deferredLoadViewportExcess,sectionTop=$(target).offset().top-viewportExcess,doLoad=sectionTop>viewportTop&&sectionTop<viewportBottom;if(!doLoad){var sectionBottom=sectionTop+$(target).outerHeight()+viewportExcess*2;doLoad=sectionBottom>viewportTop&&sectionBottom<viewportBottom}(doLoad||sectionTop<viewportTop&&sectionBottom>viewportBottom)&&(_.sectionLoad(target),_._deferredSectionTargets.splice(i,1),i--)}firstRunCheck!==!0&&_._deferredSectionTargets.length===0&&(_._deferredWatcherRunning=!1,$(window).off(".themeSectionDeferredLoader"))},_.sectionLoad=function(target){var target=target,sectionObj=_._sectionForTarget(target),section=!1;if(sectionObj.section?section=sectionObj.section:section=sectionObj,section!==!1){var instance={target:target,section:section,$shopifySectionContainer:$(target).closest(".shopify-section"),thisContext:{functions:section.functions,registeredEventListeners:[]}};if(instance.thisContext.registerEventListener=_._registerEventListener.bind(instance.thisContext),_._instances.push(instance),$(target).data("c
1omponents")){var components=$(target).data("components").split(",");components.forEach(function(component){$(document).trigger("cc:component:load",[component,target])})}_._callSectionWith(section,"onSectionLoad",target,instance.thisContext),_._callSectionWith(section,"afterSectionLoadCallback",target,instance.thisContext),section.onSectionSelect&&instance.$shopifySectionContainer.on("shopify:section:select",function(e){_._callSectionWith(section,"onSectionSelect",e.target,instance.thisContext)}),section.onSectionDeselect&&instance.$shopifySectionContainer.on("shopify:section:deselect",function(e){_._callSectionWith(section,"onSectionDeselect",e.target,instance.thisContext)}),section.onBlockSelect&&$(target).on("shopify:block:select",function(e){_._callSectionWith(section,"onBlockSelect",e.target,instance.thisContext)}),section.onBlockDeselect&&$(target).on("shopify:block:deselect",function(e){_._callSectionWith(section,"onBlockDeselect",e.target,instance.thisContext)})}},_.sectionUnload=function(target){for(var sectionObj=_._sectionForTarget(target),instanceIndex=-1,i=0;i<_._instances.length;i++)_._instances[i].target==target&&(instanceIndex=i);if(instanceIndex>-1){var instance=_._instances[instanceIndex];if($(target).off("shopify:block:select shopify:block:deselect"),instance.$shopifySectionContainer.off("shopify:section:select shopify:section:deselect"),_._callSectionWith(instance.section,"onSectionUnload",target,instance.thisContext),_._unloadRegisteredEventListeners(instance.thisContext.registeredEventListeners),_._callSectionWith(sectionObj,"afterSectionUnloadCallback",target,instance.thisContext),_._instances.splice(instanceIndex),$(target).data("components")){var components=$(target).data("components").split(",");components.forEach(function(component){$(document).trigger("cc:component:unload",[component,target])})}}else for(var i=0;i<_._deferredSectionTargets.length;i++)if(_._deferredSectionTargets[i].target==target){_._deferredSectionTargets[i].splice(i,1);break}},_._registerEventListener=function(element,eventType,callback){element.addEventListener(eventType,callback),this.registeredEventListeners.push({element:element,eventType:eventType,callback:callback})},_._unloadRegisteredEventListeners=function(registeredEventListeners){registeredEventListeners.forEach(function(rel){rel.element.removeEventListener(rel.eventType,rel.callback)})},_._callSectionWith=function(section,method,container,thisContext){if(typeof section[method]=="function")try{thisContext?section[method].bind(thisContext)(container):section[method](container)}catch(ex){var sectionType=container.dataset.sectionType;console.warn("Theme warning: '".concat(method,"' failed for section '").concat(sectionType,"'")),console.debug(container,ex)}},_._themeSectionTargetFromShopifySectionTarget=function(target){var $target=$("[data-section-type]:first",target);return $target.length>0?$target[0]:!1},_._sectionForTarget=function(target){for(var type=$(target).attr("data-section-type"),i=0;i<_._sections.length;i++)if(_._sections[i].type==type)return _._sections[i];return!1},_._sectionAlreadyRegistered=function(type){for(var i=0;i<_._sections.length;i++)if(_._sections[i].type==type)return!0;return!1}};var ccComponent=(function(){"use strict";function ccComponent2(name){var cssSelector=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".cc-".concat(name);_classCallCheck(this,ccComponent2);var _this=this;this.instances=[],$(document).on("cc:component:load",function(event,component,target){component===name&&$(target).find("".concat(cssSelector,":not(.cc-initialized)")).each(function(){_this.init(this)})}),$(document).on("cc:component:unload",function(event,component,target){component===name&&$(target).find(cssSelector).each(function(){_this.destroy(this)})}),$(cssSelector).each(function(){_this.init(this)})}return _createClass(ccComponent2,[{key:"init",value:function(container){$(container).addClass("cc-initialized")}},{key:"destroy",value:function(container){$(container).removeClass("cc-initialized")}},{key:"registerInstance",value:function(container,instance){this.instances.push({container:container,instance:instance})}},{key:"destroyInstance",value:function(container){this.instances=this.instances.filter(function(item){if(item.container===container)return typeof item.instance.destroy=="function"&&item.instance.destroy(),item.container!==container})}}]),ccComponent2})();theme.showQuickPopup=function(message,$origin){var $popup=$('<div class="simple-popup"/>'),offs=$origin.offset();$popup.html(message).css({left:offs.left,top:offs.top}).hide(),$("body").append($popup),$popup.css({marginTop:-$popup.outerHeight()-10,marginLeft:-($popup.outerWidth()-$origin.outerWidth())/2}),$popup.fadeIn(200).delay(3500).fadeOut(400,function(){$(this).remove()})},theme.Shopify={formatMoney:function(t,r){function e(t2,r2){return t2===void 0?r2:t2}function a(t2,r2,a2,o2){if(r2=e(r2,2),a2=e(a2,","),o2=e(o2,"."),isNaN(t2)||t2==null)return 0;t2=(t2/100).toFixed(r2);var n2=t2.split(".");return n2[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+a2)+(n2[1]?o2+n2[1]:"")}typeof t=="string"&&(t=t.replace(".",""));var o="",n=/\{\{\s*(\w+)\s*\}\}/,i=r||this.money_format;switch(i.match(n)[1]){case"amount":o=a(t,2);break;case"amount_no_decimals":o=a(t,0);break;case"amount_with_comma_separator":o=a(t,2,".",",");break;case"amount_with_space_separator":o=a(t,2," ",",");break;case"amount_with_period_and_space_separator":o=a(t,2," ",".");break;case"amount_no_decimals_with_comma_separator":o=a(t,0,".",",");break;case"amount_no_decimals_with_space_separator":o=a(t,0," ","");break;case"amount_with_apostrophe_separator":o=a(t,2,"'",".");break;case"amount_with_decimal_separator":o=a(t,2,".",".")}return i.replace(n,o)},formatImage:function(originalImageUrl,format){return originalImageUrl?originalImageUrl.replace(/^(.*)\.([^\.]*)$/g,"$1_"+format+".$2"):""},Image:{imageSize:function(t){var e=t.match(/.+_((?:pico|icon|thumb|small|compact|medium|large|grande)|\d{1,4}x\d{0,4}|x\d{1,4})[_\.@]/);return e!==null?e[1]:null},getSizedImageUrl:function(t,e){if(e==null)return t;if(e=="master")return this.removeProtocol(t);var o=t.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);
1if(o!=null){var i=t.split(o[0]),r=o[0];return this.removeProtocol(i[0]+"_"+e+r)}return null},removeProtocol:function(t){return t.replace(/http(s)?:/,"")}}};var ccPopup=(function(){"use strict";function ccPopup2($container,namespace){_classCallCheck(this,ccPopup2),this.$container=$container,this.namespace=namespace,this.cssClasses={visible:"cc-popup--visible",bodyNoScroll:"cc-popup-no-scroll",bodyNoScrollPadRight:"cc-popup-no-scroll-pad-right"}}return _createClass(ccPopup2,[{key:"open",value:function(callback){var _this2=this;if(this.$container.data("freeze-scroll")){$("body").addClass(this.cssClasses.bodyNoScroll);var scrollDiv=document.createElement("div");scrollDiv.className="popup-scrollbar-measure",document.body.appendChild(scrollDiv);var scrollbarWidth=scrollDiv.getBoundingClientRect().width-scrollDiv.clientWidth;document.body.removeChild(scrollDiv),scrollbarWidth>0&&$("body").css("padding-right",scrollbarWidth+"px").addClass(this.cssClasses.bodyNoScrollPadRight)}this.$container.addClass(this.cssClasses.visible),this.previouslyActiveElement=document.activeElement,setTimeout(function(){_this2.$container.find(".cc-popup-close")[0].focus()},500),$(window).on("keydown"+this.namespace,function(event){event.keyCode===27&&_this2.close()}),callback&&callback()}},{key:"close",value:function(callback){var _this3=this;if(this.$container.removeClass(this.cssClasses.visible),this.previouslyActiveElement&&$(this.previouslyActiveElement).focus(),$(window).off("keydown"+this.namespace),this.$container.data("freeze-scroll")){var transitionDuration=500,$innerModal=this.$container.find(".cc-popup-modal");$innerModal.length&&(transitionDuration=parseFloat(getComputedStyle($innerModal[0]).transitionDuration),transitionDuration&&transitionDuration>0&&(transitionDuration*=1e3)),setTimeout(function(){$("body").removeClass(_this3.cssClasses.bodyNoScroll).removeClass(_this3.cssClasses.bodyNoScrollPadRight).css("padding-right","0")},transitionDuration)}callback&&callback()}}]),ccPopup2})(),FacetedFiltersInstance=(function(){"use strict";function FacetedFiltersInstance2(el){_classCallCheck(this,FacetedFiltersInstance2),this.filteringEnabled=el.dataset.filtering==="true",this.sortingEnabled=el.dataset.sorting==="true",this.filtersControl=document.querySelector(".cc-filters-control"),this.filtersContainer=document.querySelector(".cc-filters-container"),this.productList=document.querySelector(".cc-product-list"),this.filteringEnabled&&(this.filters=document.querySelector(".cc-filters"),this.filtersFooter=document.querySelector(".cc-filters__footer"),this.activeFilters=document.querySelector(".cc-active-filters"),this.clearFiltersBtn=document.querySelector(".js-clear-filters")),this.sortingEnabled&&(this.sortBy=document.querySelector(".cc-filter--sort"),this.activeSortText=document.querySelector(".cc-sort-selected")),this.utils={hidden:"is-hidden",loading:"is-loading",open:"is-open",filtersOpen:"filters-open"},this.filteringEnabled&&!this.filtersFooter.classList.contains(this.utils.hidden)&&(this.filters.style.height="calc(100% - ".concat(this.filtersFooter.offsetHeight,"px)")),this.bindEvents()}return _createClass(FacetedFiltersInstance2,[{key:"bindEvents",value:function(){this.filtersControl.addEventListener("click",this.handleControlClick.bind(this)),this.filtersContainer.addEventListener("click",this.handleFiltersClick.bind(this)),this.filtersContainer.addEventListener("input",this.debounce(this.handleFilterChange.bind(this),500)),this.filteringEnabled&&(document.querySelector(".cc-price-range")&&this.filtersContainer.addEventListener("change",this.debounce(this.handleFilterChange.bind(this),500)),this.activeFilters.addEventListener("click",this.handleActiveFiltersClick.bind(this))),document.addEventListener("click",this.handleClickOutside.bind(this)),window.addEventListener("popstate",this.handleHistoryChange.bind(this))}},{key:"debounce",value:function(fn,wait){var _this4=this,timer;return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];clearTimeout(timer),timer=setTimeout(function(){return fn.apply(_this4,args)},wait)}}},{key:"handleControlClick",value:function(e){var _this5=this;e.target.matches(".cc-filters-control__btn")&&(document.body.classList.add(this.utils.filtersOpen),e.target.matches(".js-show-filters")?this.filters.classList.add(this.utils.open):(this.sortBy.open=!0,setTimeout(function(){_this5.sortBy.classList.add(_this5.utils.open)},10)))}},{key:"handleFiltersClick",value:function(e){var _this6=this,target=e.target,filter=target.closest(".cc-filter");if(target.matches(".cc-filter-clear-btn")){e.preventDefault(),this.applyFilters(new URL(e.target.href).searchParams.toString(),e);return}if(target.matches(".js-close-filters")){filter&&setTimeout(function(){filter.classList.remove(_this6.utils.open),filter.open=!1},300),this.filteringEnabled&&this.filters.classList.remove(this.utils.open),document.body.classList.remove(this.utils.filtersOpen);return}if(target.matches(".cc-filter__toggle")||target.matches(".cc-filter-back-btn")){var openFilter=document.querySelector('.cc-filter[open]:not([data-index="'.concat(filter.dataset.index,'"])'));openFilter&&this.closeFilter(openFilter,!1),filter.classList.contains(this.utils.open)?(e.preventDefault(),this.closeFilter(filter)):setTimeout(function(){filter.classList.add(_this6.utils.open)},10)}}},{key:"handleClickOutside",value:function(e){var openFilter=document.querySelector(".cc-filter.".concat(this.utils.open));if(openFilter){var filter=e.target.closest(".cc-filter");(!filter||filter!==openFilter)&&(e.preventDefault(),this.closeFilter(openFilter))}}},{key:"handleFilterChange",value:function(e){if(!(e.type==="change"&&(!e.detail||e.detail.sender!=="theme:component:price_range"))){e.type==="input"&&e.target.classList.contains("cc-price-range__input")&&e.target.dispatchEvent(new Event("change",{bubbles:!0}));var formData=new FormData(document.getElementById("filters")),searchParams=new URLSearchParams(formData);this.applyFilters(searchParams.toString(),e)}}},{key:"handleActiveFiltersClick",value:function(e){e.preventDefault(),e.target.tagName==="A"&&this.applyFilters(new URL(e.target.href).searchParams.toString(),e)}},{key:"handleHistoryChange",value:function(e){var searchParams="";e.state&&e.state.searchParams&&(searchParams=e.state.searchParams),this.applyFilters(searchParams,null,!1)}},{key:"applyFilters",value:function(searchParams,e){var _this7=this,updateUrl=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;this.productList.classList.add(this.utils.loading),fetch("".concat(window.location.pathname,"?").concat(searchParams)).then(function(response){return response.text()}).then(function(responseText){var html=responseText,fetchedHTML=new DOMParser().parseFromString(html,"text/html");_this7.updateFilters(fetchedHTML,e),_this7.productList.innerHTML=fetchedHTML.querySelector(".cc-product-list").innerHTML,document.dispatchEvent(new CustomEvent("filters-applied",{bubbles:!0})),_this7.productList.classList.remove(_this7.utils.loading)}),updateUrl&&this.updateURL(searchParams)}},{key:"updateFilters",value:function(fetchedHTML,e){var _this8=this;if(this.filtersControl.innerHTML=fetchedHTML.querySelector(".cc-filters-control").innerHTML,e&&e.target.name==="sort_by"&&(this.activeSortText.textContent=e.target.nextElementSibling.textContent),!!this.filteringEnabled){document.querySelectorAll(".cc-filter").forEach(function(filter){var index=filter.dataset.index;if(index!=="0"){var fetchedFilter=fetchedHTML.querySelector('.cc-filter[data-index="'.concat(index,'"]'));if(filter.dataset.type==="price_range")_this8.updateFilter(filter,fetchedFilter,!1),(!e||e.target.tagName!=="INPUT")&&filter.querySelectorAll("input").forEach(function(input){input.value=fetchedHTML.getElementById(input.id).value,input.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{sender:"reset"}}))});else if(e&&e.target.tagName==="INPUT"){var changedFilter=e.target.closest(".cc-filter");_this8.updateFilter(filter,fetchedFilter,filter.dataset.index!==changedFilter.dataset.index)}else _this8.updateFilter(filter,fetchedFilter,!0)}}),this.updateActiveFilters(fetchedHTML),this.clearFiltersBtn.hidden=fetchedHTML.querySelector(".js-clear-filters").hidden;var footerEl=fetchedHTML.querySelector(".cc-filters__footer"),footerHidden=footerEl.classList.contains(this.utils.hidden);this.filtersFooter.innerHTML=footerEl.innerHTML,this.filtersFooter.classList.toggle(this.utils.hidden,footerHidden),this.filters.style.height=footerHidden?null:"calc(100% - ".concat(this.filtersFooter.offsetHeight,"px)")}}},{key:"updateFilter",value:function(filter,fetchedFilter,updateAll){updateAll?filter.innerHTML=fetchedFilter.innerHTML:(filter.replaceChild(fetchedFilter.querySelector(".cc-filter__toggle"),filter.querySelector(".cc-filter__toggle")),filter.querySelector(".cc-filter__header").innerHTML=fetchedFilter.querySelector(".cc-filter__header").innerHTML)}},{key:"updateActiveFilters",value:function(fetchedHTML){var activeFilters=fetchedHTML.querySelector(".cc-active-filters");this.activeFilters.innerHTML=activeFilters.innerHTML,this.activeFilters.hidden=!this.activeFilters.querySelector(".cc-active-filter")}},{key:"updateURL",value:function(searchParams){history.pushState({searchParams:searchParams},"","".concat(window.location.pathname).concat(searchParams&&"?".concat(searchParams)))}},{key:"closeFilter",value:function(filter){var delay=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;clearTimeout(this.closeTimer),filter.classList.remove(this.utils.open),this.closeTimer=setTimeout(function(){filter.open=!1},delay?300:null)}}]),FacetedFiltersInstance2})(),FacetedFilters=(function(_ccComponent){"use strict";_inherits(FacetedFilters2,_ccComponent);var _super=_createSuper(FacetedFilters2);function FacetedFilters2(){var name=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"faceted-filters",cssSelector=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".cc-faceted-filters";return _classCallCheck(this,FacetedFilters2),_super.call(this,name,cssSelector)}return _createClass(FacetedFilters2,[{key:"init",value:function(container){_get(_getPrototypeOf(FacetedFilters2.prototype),"init",this).call(this,container),this.registerInstance(container,new FacetedFiltersInstance(container))}},{key:"destroy",value:function(container){this.destroyInstance(container),_get(_getPrototypeOf(FacetedFilters2.prototype),"destroy",this).call(this,container)}}]),FacetedFilters2})(ccComponent);new FacetedFilters,theme.MapSection=new function(){var _=this;_.config={zoom:14,styles:{default:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"administrative.land_parcel",elementType:"geometry.stroke",stylers:[{color:"#dcd2be"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#ae9e90"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#93817c"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#447530"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#fdfcf8"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#e98d
158"}]},{featureType:"road.highway.controlled_access",elementType:"geometry.stroke",stylers:[{color:"#db8555"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#806b63"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"transit.line",elementType:"labels.text.fill",stylers:[{color:"#8f7d77"}]},{featureType:"transit.line",elementType:"labels.text.stroke",stylers:[{color:"#ebe3cd"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#92998d"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#64779e"}]},{featureType:"administrative.province",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}
1]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#023e58"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#6f9ba5"}]},{featureType:"poi",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#3C7680"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#255763"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#b0d5ce"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{color:"#023e58"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"transit",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"transit.line",elementType:"geometry.fill",stylers:[{color:"#283d6a"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#3a4762"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]}},_.apiStatus=null,this.geolocate=function($map){var deferred=$.Deferred(),geocoder=new google.maps.Geocoder,address=$map.data("address-setting");return geocoder.geocode({address:address},function(results,status2){status2!==google.maps.GeocoderStatus.OK&&deferred.reject(status2),deferred.resolve(results)}),deferred},this.createMap=function(container){var $map=$(".map-section__map-container",container);return _.geolocate($map).then(function(results){var mapOptions={zoom:_.config.zoom,styles:_.config.styles[$(container).data("map-style")],center:results[0].geometry.location,scrollwheel:!1,disableDoubleClickZoom:!0,disableDefaultUI:!0,zoomControl:!0};_.map=new google.maps.Map($map[0],mapOptions),_.center=_.map.getCenter();var marker=new google.maps.Marker({map:_.map,position:_.center,clickable:!1});google.maps.event.addDomListener(window,"resize",function(){google.maps.event.trigger(_.map,"resize"),_.map.setCenter(_.center)})}.bind(this)).fail(function(){var errorMessage;switch(status){case"ZERO_RESULTS":errorMessage=theme.strings.addressNoResults;break;case"OVER_QUERY_LIMIT":errorMessage=theme.strings.addressQueryLimit;break;default:errorMessage=theme.strings.addressError;break}if(Shopify.designMode){var $mapContainer=$map.parents(".map-section");$mapContainer.addClass("page-width map-section--load-error"),$mapContainer.find(".map-section__wrapper").html('<div class="errors text-center">'+errorMessage+"</div>")}})},this.onSectionLoad=function(target){var $container=$(target);window.gm_authFailure=function(){Shopify.designMode&&($container.addClass("page-width map-section--load-error"),$container.find(".map-section__wrapper").html('<div class="errors text-center">'+theme.strings.authError+"</div>"))};var key=$container.data("api-key");typeof key!="string"||key===""||theme.loadScriptOnce("https://maps.googleapis.com/maps/api/js?key="+key,function(){_.createMap($container)})},this.onSectionUnload=function(target){typeof window.google!="undefined"&&typeof google.maps!="undefined"&&google.maps.event.clearListeners(this.map,"resize")}},cc.sections.push({name:"map",section:theme.MapSection}),theme.VideoManager=new function(){var _=this;_._permitPlayback=function(container){return!($(container).hasClass("video-container--background")&&$(window).outerWidth()<768)},_.youtubeVars={incrementor:0,apiReady:!1,videoData:{},toProcessSelector:'.video-container[data-video-type="youtube"]:not(.video--init)'},_.youtubeApiReady=function(){_.youtubeVars.apiReady=!0,_._loadYoutubeVideos()},_._loadYoutubeVideos=function(container){$(_.youtubeVars.toProcessSelector,container).length&&(_.youtubeVars.apiReady?$(_.youtubeVars.toProcessSelector,container).each(function(){if(_._permitPlayback($(this))){$(this).addClass("video--init"),_.youtubeVars.incrementor++;var containerId="theme-yt-video-"+_.youtubeVars.incrementor;$(this).data("video-container-id",containerId);var videoElement=$('<div class="video-container__video-element">').attr("id",containerId).appendTo($(".video-container__video",this)),autoplay=$(this).data("video-autoplay"),loop=$(this).data("video-loop"),player=new YT.Player(containerId,{height:"360",width:"640",videoId:$(this).data("video-id"),playerVars:{iv_load_policy:3,modestbranding:1,autoplay:0,loop:loop?1:0,playlist:$(this).data("video-id"),rel:0,showinfo:0},events:{onReady:_._onYoutubePlayerReady.bind({autoplay:autoplay,loop:loop,$container:$(this)}),onStateChange:_._onYoutubePlayerStateChange.bind({autoplay:autoplay,loop:loop,$container:$(this)})}});_.youtubeVars.videoData[containerId]={id:containerId,container:this,videoElement:videoElement,player:player}}}):theme.loadScriptOnce("https://www.youtube.com/iframe_api"))},_._onYoutubePlayerReady=function(event){event.target.setPlaybackQuality("hd1080"),this.autoplay&&(event.target.mute(),event.target.playVideo()),_._initBackgroun
1dVideo(this.$container)},_._onYoutubePlayerStateChange=function(event){if(event.data==YT.PlayerState.PLAYING&&(this.$container.addClass("video--play-started"),this.autoplay&&event.target.mute(),this.loop)){var finalSecond=event.target.getDuration()-1;if(finalSecond>2){var loopTheVideo=function loopTheVideo2(){event.target.getCurrentTime()>finalSecond&&event.target.seekTo(0),setTimeout(loopTheVideo2,250)};loopTheVideo()}}},_._unloadYoutubeVideos=function(container){for(var dataKey in _.youtubeVars.videoData){var data=_.youtubeVars.videoData[dataKey];if($(container).find(data.container).length){data.player.destroy(),delete _.youtubeVars.videoData[dataKey];return}}},_.vimeoVars={incrementor:0,apiReady:!1,videoData:{},toProcessSelector:'.video-container[data-video-type="vimeo"]:not(.video--init)'},_.vimeoApiReady=function(){_.vimeoVars.apiReady=!0,_._loadVimeoVideos()},_._loadVimeoVideos=function(container){$(_.vimeoVars.toProcessSelector,container).length&&(_.vimeoVars.apiReady?$(_.vimeoVars.toProcessSelector,container).each(function(){if(_._permitPlayback($(this))){$(this).addClass("video--init"),_.vimeoVars.incrementor++;var $this=$(this),containerId="theme-vi-video-"+_.vimeoVars.incrementor;$(this).data("video-container-id",containerId);var videoElement=$('<div class="video-container__video-element">').attr("id",containerId).appendTo($(".video-container__video",this)),autoplay=!!$(this).data("video-autoplay"),player=new Vimeo.Player(containerId,{url:$(this).data("video-url"),width:640,loop:$(this).data("video-autoplay"),autoplay:autoplay,muted:$this.hasClass("video-container--background")});player.on("playing",function(){$(this).addClass("video--play-started")}.bind(this)),player.ready().then(function(){if(autoplay&&(player.setVolume(0),player.play()),player.element&&player.element.width&&player.element.height){var ratio=parseInt(player.element.height)/parseInt(player.element.width);$this.find(".video-container__video").css("padding-bottom",ratio*100+"%")}
1_._initBackgroundVideo($this)}),_.vimeoVars.videoData[containerId]={id:containerId,container:this,videoElement:videoElement,player:player,autoPlay:autoplay}}}):window.define?theme.loadScriptOnce("https://player.vimeo.com/api/player.js",function(){_.vimeoVars.apiReady=!0,_._loadVimeoVideos(),window.define=window.tempDefine},function(){window.tempDefine=window.define,window.define=null}):theme.loadScriptOnce("https://player.vimeo.com/api/player.js",function(){_.vimeoVars.apiReady=!0,_._loadVimeoVideos()}))},_._unloadVimeoVideos=function(container){for(var dataKey in _.vimeoVars.videoData){var data=_.vimeoVars.videoData[dataKey];if($(container).find(data.container).length){data.player.unload(),delete _.vimeoVars.videoData[dataKey];return}}},_._loadThirdPartyApis=function(container){_._permitPlayback($(".video-container",container))&&(_._loadYoutubeVideos(container),_._loadVimeoVideos(container))},_.mp4Vars={incrementor:0,videoData:{},toProcessSelector:'.video-container[data-video-type="mp4"]:not(.video--init)'},_._loadMp4Videos=function(container){$(_.mp4Vars.toProcessSelector,container).length&&$(_.mp4Vars.toProcessSelector,container).addClass("video--init").each(function(){_.mp4Vars.incrementor++;var $this=$(this),containerId="theme-mp-video-"+_.mp4Vars.incrementor;$(this).data("video-container-id",containerId);var videoElement=$('<div class="video-container__video-element">').attr("id",containerId).appendTo($(".video-container__video",this)),$video=$("<video playsinline>");$(this).data("video-loop")&&$video.attr("loop","loop"),$(this).data("video-autoplay")&&($video.attr({autoplay:"autoplay",muted:"muted"}),$video[0].muted=!0,$video.one("loadeddata",function(){this.play()})),$video.on("playing",function(){$(this).addClass("video--play-started")}.bind(this)),$video.attr("src",$(this).data("video-url")).appendTo(videoElement)})},_._unloadMp4Videos=function(container){}
1,_._initBackgroundVideo=function($container){if($container.hasClass("video-container--background")&&$container.find(".video-container__video iframe").length){var assessBackgroundVideo=function(){var $container2=this,cw=$container2.width(),ch=$container2.height(),cr=cw/ch,$frame=$(".video-container__video iframe",this),vr=$frame.attr("width")/$frame.attr("height"),$pan=$(".video-container__video",this),vCrop=75;if(cr>vr){var vh=cw/vr+vCrop*2;$pan.css({marginTop:(ch-vh)/2-vCrop,marginLeft:"",height:vh+vCrop*2,width:""})}else{var vw=cw*vr+vCrop*2*vr;$pan.css({marginTop:-vCrop,marginLeft:(cw-vw)/2,height:ch+vCrop*2,width:vw})}};assessBackgroundVideo.bind($container)(),$(window).on("debouncedresize."+$container.data("video-container-id"),assessBackgroundVideo.bind($container))}},this.onSectionLoad=function(container){$(".video-container[data-video-url]:not([data-video-type])").each(function(){var url=$(this).data("video-url");url.indexOf(".mp4")>-1&&$(this).attr("data-video-type","mp4"),url.indexOf("vimeo.com")>-1&&($(this).attr("data-video-type","vimeo"),$(this).attr("data-video-id",url.split("?")[0].split("/").pop())),(url.indexOf("youtu.be")>-1||url.indexOf("youtube.com")>-1)&&($(this).attr("data-video-type","youtube"),url.indexOf("v=")>-1?$(this).attr("data-video-id",url.split("v=").pop().split("&")[0]):$(this).attr("data-video-id",url.split("?")[0].split("/").pop()))}),_._loadThirdPartyApis(container),_._loadMp4Videos(container),$(window).on("debouncedresize.video-manager-resize",function(){_._loadThirdPartyApis(container)}),$(".video-container__play",container).on("click",function(evt){evt.preventDefault();var $container=$(this).closest(".video-container");$container.addClass("video-container--playing"),$(container).trigger("cc:video:play");var id=$container.data("video-container-id");id.indexOf("theme-yt-video")===0?_.youtubeVars.videoData[id].player.playVideo():_.vimeoVars.videoData[id].player.play()}),$(".video-container__stop",container).on("click",function(evt){evt.preventDefault();var $container=$(this).closest(".video-container");$container.removeClass("video-container--playing"),$(container).trigger("cc:video:stop");var id=$container.data("video-container-id");id.indexOf("theme-yt-video")===0?_.youtubeVars.videoData[id].player.stopVideo():(_.vimeoVars.videoData[id].player.pause(),_.vimeoVars.videoData[id].player.setCurrentTime(0))})},this.onSectionUnload=function(container){$(".video-container__play, .video-container__stop",container).off("click"),$(window).off("."+$(".video-container").data("video-container-id")),$(window).off("debouncedresize.video-manager-resize"),_._unloadYoutubeVideos(container),_._unloadVimeoVideos(container),_._unloadMp4Videos(container),$(container).trigger("cc:video:stop")}},window.onYouTubeIframeAPIReady=function(){theme.VideoManager.youtubeApiReady()},cc.sections.push({name:"video",section:theme.VideoManager}),theme.Popup=new function(){var dismissedStorageKey="cc-theme-popup-dismissed";this.onSectionLoad=function(container){var _this9=this;this.namespace=theme.namespaceFromSection(container),this.$container=$(container),this.popup=new ccPopup(this.$container,this.namespace);var dismissForDays=this.$container.data("dismiss-for-days"),delaySeconds=this.$container.data("delay-seconds"),showPopup=!0,testMode=this.$container.data("test-mode"),lastDismissed=window.localStorage.getItem(dismissedStorageKey);if(lastDismissed){var dismissedDaysAgo=(new Date().getTime()-lastDismissed)/864e5;dismissedDaysAgo<dismissForDays&&(showPopup=!1)}this.$container.find(".cc-popup-form__response").length&&(showPopup=!0,delaySeconds=1,this.$container.find(".cc-popup-form__response--success").length&&this.functions.popupSetAsDismissed.call(this)),document.querySelector(".shopify-challenge__container")&&(showPopup=!1),(showPopup||testMode)&&setTimeout(function(){_this9.popup.open()},delaySeconds*1e3),this.$container.on("click"+this.namespace,".cc-popup-close, .cc-popup-background",function(){_this9.popup.close(function(){_this9.functions.popupSetAsDismissed.call(_this9)})})},this.onSectionSelect=function(){this.popup.open()},this.functions={popupSetAsDismissed:function(){window.localStorage.setItem(dismissedStorageKey,new Date().getTime())}},this.onSectionUnload=function(){this.$container.off(this.namespace)}},cc.sections.push({name:"newsletter-popup",section:theme.Popup}),theme.StoreAvailability=function(container){var loadingClass="store-availability-loading",initClass="store-availability-initialized",storageKey="cc-location";this.onSectionLoad=function(container2){var _this10=this;this.namespace=theme.namespaceFromSection(container2),this.$container=$(container2),this.productId=this.$container.data("store-availability-container"),this.sectionUrl=this.$container.data("section-url"),this.$modal;var firstRun=!0;$(window).on("cc-variant-updated".concat(this.namespace).concat(this.productId),function(e,args){args.product.id===_this10.productId&&(_this10.functions.updateContent.bind(_this10)(args.variant.id,args.product.title,firstRun,_this10.$container.data("has-only-default-variant"),typeof args.variant.available!="undefined"),firstRun=!1)}),this.$container.data("single-variant-id")&&(this.functions.updateContent.bind(this)(this.$container.data("single-variant-id"),this.$container.data("single-variant-product-title"),firstRun,this.$container.data("has-only-default-variant"),this.$container.data("single-variant-product-available")),firstRun=!1)},this.onSectionUnload=function(){$(window).off("cc-variant-updated".concat(this.namespace).concat(this.productId)),this.$container.off("click"),this.$modal&&this.$modal.off("click")},this.functions={getUserLocation:function(){return new Promise(function(resolve,reject){var storedCoords;sessionStorage[storageKey]&&(storedCoords=JSON.parse(sessionStorage[storageKey])),storedCoords?resolve(storedCoords):navigator.geolocation?navigator.geolocation.getCurrentPosition(function(position){var coords={latitude:position.coords.latitude,longitude:position.coords.longitude};fetch("/localization.json",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(coords)}),sessionStorage[storageKey]=JSON.stringify(coords),resolve(coords)},function(){resolve(!1)},{maximumAge:36e5,timeout:5e3}):resolve(!1)})},getAvailableStores:function(variantId,cb){return $.get(this.sectionUrl.replace("VARIANT_ID",variantId),cb)}
1,calculateDistance:function(coords1,coords2,unitSystem){var dtor=Math.PI/180,radius=unitSystem==="metric"?6378.14:3959,rlat1=coords1.latitude*dtor,rlong1=coords1.longitude*dtor,rlat2=coords2.latitude*dtor,rlong2=coords2.longitude*dtor,dlon=rlong1-rlong2,dlat=rlat1-rlat2,a=Math.pow(Math.sin(dlat/2),2)+Math.cos(rlat1)*Math.cos(rlat2)*Math.pow(Math.sin(dlon/2),2),c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return radius*c},updateLocationDistances:function(coords){var unitSystem=this.$modal.find("[data-unit-system]").data("unit-system"),self=this;this.$modal.find('[data-distance="false"]').each(function(){var _this11=this,thisCoords={latitude:parseFloat($(this).data("latitude")),longitude:parseFloat($(this).data("longitude"))};if(thisCoords.latitude&&thisCoords.longitude){var distance=self.functions.calculateDistance(coords,thisCoords,unitSystem).toFixed(1);$(this).html(distance),setTimeout(function(){$(_this11).closest(".store-availability-list__location__distance").addClass("-in")},0)}$(this).attr("data-distance","true")})},updateContent:function(variantId,productTitle,firstRun,isSingleDefaultVariant,isVariantAvailable){var _this12=this;this.$container.off("click","[data-store-availability-modal-open]"),this.$container.off("click"+this.namespace,".cc-popup-close, .cc-popup-background"),$(".store-availabilities-modal").remove(),firstRun?this.$container.hide():isVariantAvailable?(this.$container.addClass(loadingClass).addClass(initClass),this.$container.css("height",this.$container.outerHeight()>0?this.$container.outerHeight()+"px":"auto")):(this.$container.addClass(loadingClass).addClass(initClass),this.$container.css("height","0px")),isVariantAvailable&&this.functions.getAvailableStores.call(this,variantId,function(response){if(response.trim().length>0&&!response.includes("NO_PICKUP")){_this12.$container.html(response),_this12.$container.html(_this12.$container.children().first().html()),_this12.$container.find("[data-store-availability-modal-product-title]").html(productTitle),isSingleDefaultVariant&&_this12.$container.find(".store-availabilities-modal__variant-title").remove(),_this12.$container.find(".cc-popup").appendTo("body"),_this12.$modal=$("body").find(".store-availabilities-modal");var popup=new ccPopup(_this12.$modal,_this12.namespace);if(_this12.$container.on("click","[data-store-availability-modal-open]",function(){return popup.open(),_this12.functions.getUserLocation().then(function(coords){coords&&_this12.$modal.find('[data-distance="false"]').length&&_this12.functions.getAvailableStores.call(_this12,variantId,function(response2){_this12.$modal.find(".store-availabilities-list").html($(response2).find(".store-availabilities-list").html()),_this12.functions.updateLocationDistances.bind(_this12)(coords)})}),!1}),_this12.$modal.on("click"+_this12.namespace,".cc-popup-close, .cc-popup-background",function(){popup.close()}),firstRun)_this12.$container.slideDown(300);else{_this12.$container.removeClass(loadingClass);var newHeight=_this12.$container.find(".store-availability-container").outerHeight();_this12.$container.css("height",newHeight>0?newHeight+"px":"auto")}}})}},this.onSectionLoad(container)},cc.sections.push({name:"store-availability",section:theme.StoreAvailability});try{theme.shopifyFeatures=JSON.parse(document.documentElement.querySelector("#shopify-features").textContent)}catch(e){theme.shopifyFeatures={}}slate.a11y={pageLinkFocus:function($element){var focusClass="js-focus-hidden";$element.first().attr("tabIndex","-1").focus().addClass(focusClass).one("blur",callback);function callback(){$element.first().removeClass(focusClass).removeAttr("tabindex")}},focusHash:function(){var hash=window.location.hash;hash&&document.getElementById(hash.slice(1))&&this.pageLinkFocus($(hash))},bindInPageLinks:function(){$("a[href*=#]").on("click",function(evt){this.pageLinkFocus($(evt.currentTarget.hash))}.bind(this))},trapFocus:function(options){var eventName=options.namespace?"focusin."+options.namespace:"focusin";options.$elementToFocus||(options.$elementToFocus=options.$container),options.$container.attr("tabindex","-1"),options.$elementToFocus.focus(),$(document).on(eventName,function(evt){options.$container[0]!==evt.target&&!
1options.$container.has(evt.target).length&&options.$container.focus()})},removeTrapFocus:function(options){var eventName=options.namespace?"focusin."+options.namespace:"focusin";options.$container&&options.$container.length&&options.$container.removeAttr("tabindex"),$(document).off(eventName)}},slate.cart={cookiesEnabled:function(){var cookieEnabled=navigator.cookieEnabled;return cookieEnabled||(document.cookie="testcookie",cookieEnabled=document.cookie.indexOf("testcookie")!==-1),cookieEnabled}},slate.utils={findInstance:function(array,key,value){for(var i=0;i<array.length;i++)if(array[i][key]===value)return array[i]},removeInstance:function(array,key,value){for(var i=array.length;i--;)if(array[i][key]===value){array.splice(i,1);break}return array},compact:function(array){for(var index=-1,length=array==null?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];value&&(result[resIndex++]=value)}return result},defaultTo:function(value,defaultValue){return value==null||value!==value?defaultValue:value}},slate.rte={wrapTable:function(options){var tableWrapperClass=typeof options.tableWrapperClass=="undefined"?"":options.tableWrapperClass;options.$tables.wrap('<div class="'+tableWrapperClass+'"></div>')},wrapIframe:function(options){var iframeWrapperClass=typeof options.iframeWrapperClass=="undefined"?"":options.iframeWrapperClass;options.$iframes.each(function(){$(this).wrap('<div class="'+iframeWrapperClass+'"></div>'),this.src=this.src})}},slate.Image=(function(){function preload(images,size){typeof images=="string"&&(images=[images]);for(var i=0;i<images.length;i++){var image=images[i];this.loadImage(this.getSizedImageUrl(image,size))}}function loadImage(path){new Image().src=path}function imageSize(src){var match=src.match(/.+_((?:pico|icon|thumb|small|compact|medium|large|grande)|\d{1,4}x\d{0,4}|x\d{1,4})[_\.@]/);return match?match[1]:null}function getSizedImageUrl(src,size){if(size===null)return src;if(size==="master")return this.removeProtocol(src);var match=src.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);if(match){var prefix=src.split(match[0]),suffix=match[0];return this.removeProtocol(prefix[0]+"_"+size+suffix)}else return null}function removeProtocol(path){return path.replace(/http(s)?:/,"")}return{preload:preload,loadImage:loadImage,imageSize:imageSize,getSizedImageUrl:getSizedImageUrl,removeProtocol:removeProtocol}})(),slate.Variants=(function(){function Variants(options){this.$container=options.$container,this.product=options.product,this.singleOptionSelector=options.singleOptionSelector,this.originalSelectorId=options.originalSelectorId,this.secondaryIdSelectors=options.secondaryIdSelectors,this.enableHistoryState=options.enableHistoryState,this.currentVariant=this._getVariantFromOptions(),$(this.singleOptionSelector,this.$container).on("change",this._onSelectChange.bind(this))}return Variants.prototype=$.extend({},Variants.prototype,{_getCurrentOptions:function(){var currentOptions=$.map($(this.singleOptionSelector,this.$container),function(element){var $element=$(element),type=$element.attr("type"),currentOption={};return type==="radio"||type==="checkbox"?$element[0].checked?(currentOption.value=$element.val(),currentOption.index=$element.data("index"),currentOption):!1:(currentOption.value=$element.val(),currentOption.index=$element.data("index"),currentOption)});return currentOptions=slate.utils.compact(currentOptions),currentOptions},_getVariantFromOptions:function(){var selectedValues=this._getCurrentOptions(),variants=this.product.variants,found=!1;
1return variants.forEach(function(variant){var satisfied=!0;selectedValues.forEach(function(option){satisfied&&(satisfied=option.value===variant[option.index])}),satisfied&&(found=variant)}),found||null},_onSelectChange:function(){var variant=this._getVariantFromOptions();if(this.$container.trigger({type:"variantChange",variant:variant}),!variant){this._updateSecondarySelects(variant);return}$(window).trigger("cc-variant-updated",{variant:variant,product:this.product}),this._updateMasterSelect(variant),this._updateSecondarySelects(variant),this._updateImages(variant),this._updatePrice(variant),this.currentVariant=variant,this.enableHistoryState&&this._updateHistoryState(variant)},_updateImages:function(variant){var variantMedia=variant.featured_media||{},currentVariantMedia=this.currentVariant.featured_media||{};!variant.featured_media||variantMedia.id===currentVariantMedia.id||this.$container.trigger({type:"variantImageChange",variant:variant})},_updatePrice:function(variant){var hasChanged=!1;(variant.price!==this.currentVariant.price||variant.compare_at_price!==this.currentVariant.compare_at_price||variant.unit_price_measurement!==this.currentVariant.unit_price_measurement||variant.unit_price_measurement&&(variant.unit_price!==this.currentVariant.unit_price||variant.unit_price_measurement.reference_value!==this.currentVariant.unit_price_measurement.reference_value||variant.unit_price_measurement.reference_unit!==this.currentVariant.unit_price_measurement.reference_unit))&&(hasChanged=!0),hasChanged&&this.$container.trigger({type:"variantPriceChange",variant:variant})},_updateHistoryState:function(variant){if(!(!history.replaceState||!variant)){var newurl=window.location.protocol+"//"+window.location.host+window.location.pathname+"?variant="+variant.id;window.history.replaceState({path:newurl},"",newurl)}},_updateMasterSelect:function(variant){var select=$(this.originalSelectorId,this.$container)[0];select&&(select.value=variant.id,select.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!1})))},_updateSecondarySelects:function(variant){$(this.secondaryIdSelectors,this.$container).each(function(){this.value=variant?variant.id:null,this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!1}))})}}),Variants})(),theme.storageAvailable=function(type){try{var storage=window[type],x="__storage_test__";return storage.setItem(x,x),storage.removeItem(x),!0}catch(e){return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")&&storage.length!==0}},theme.variants={selectors:{originalSelectorId:"[data-product-select]",secondaryIdSelectors:"[data-product-secondary-select]",priceWrapper:"[data-price-wrapper]",productPrice:"[data-product-price]",addToCart:"[data-add-to-cart]",addToCartText:"[data-add-to-cart-text]",comparePrice:"[data-compare-price]",comparePriceText:"[data-compare-text]",unitPrice:".unit-price"},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},updateAddToCartState:function(evt){var variant=evt.variant;if(variant)$(theme.variants.selectors.priceWrapper,this.$container).removeClass("hide");else{$(theme.variants.selectors.addToCart,this.$container).prop("disabled",!0),$(theme.variants.selectors.addToCartText,this.$container).html(theme.strings.unavailable),$(theme.variants.selectors.priceWrapper,this.$container).addClass("hide");return}variant.available?($(theme.variants.selectors.addToCart,this.$container).prop("disabled",!1),$(theme.variants.selectors.addToCartText,this.$container).html(theme.strings.addToCart),$("form",this.$container).removeClass("variant--unavailable")):($(theme.variants.selectors.addToCart,this.$container).prop("disabled",!0),$(theme.variants.selectors.addToCartText,this.$container).html(theme.strings.soldOut),$("form",this.$container).addClass("variant--unavailable"));var $backorderContainer=$(".backorder",this.$container);if($backorderContainer.length)if(variant&&variant.available){var $option=$(theme.variants.selectors.originalSelectorId+' option[value="'+variant.id+'"]',this.$container);variant.inventory_management&&$option.data("stock")=="out"?($backorderContainer.find(".backorder__variant").html(this.productSingleObject.title+(variant.title.indexOf("Default")>=0?"":" - "+variant.title)),$backorderContainer.show()):$backorderContainer.hide()}else $backorderContainer.hide()},updateProductPrices:function(evt){var variant=evt.variant,$comparePrice=$(theme.variants.selectors.comparePrice,this.$container),$compareEls=$comparePrice.add(theme.variants.selectors.comparePriceText,this.$container),$price=$(theme.variants.selectors.productPrice,this.$container),$unitPrice=$(theme.variants.selectors.unitPrice,this.$container);if($price.html('<span class="theme-money large-title">'+theme.Shopify.formatMoney(variant.price,theme.moneyFormat)+"</span>"),variant.compare_at_price>variant.price?($price.addClass("product-price__reduced"),$comparePrice.html('<span class="product-price__compare theme-money">'+theme.Shopify.formatMoney(variant.compare_at_price,theme.moneyFormat)+"</span>"),$compareEls.removeClass("hide")):($price.removeClass("product-price__reduced"),$comparePrice.html(""),$compareEls.addClass("hide")),variant.unit_price_measurement){var $newUnitPriceArea=$('<div class="unit-price small-text">');$('<span class="unit-price__price theme-money">').html(theme.Shopify.formatMoney(variant.unit_price,theme.moneyFormat)).appendTo($newUnitPriceArea),$('<span class="unit-price__separator">').html(theme.strings.unitPriceSeparator).appendTo($newUnitPriceArea),$('<span class="unit-price__unit">').html(theme.variants.getBaseUnit(variant)).appendTo($newUnitPriceArea),$unitPrice.length?$unitPrice.replaceWith($newUnitPriceArea):$(theme.variants.selectors.priceWrapper,this.$container).append($newUnitPriceArea)}else $unitPrice.remove()}},theme.initAjaxAddToCartForm=function($form_param){$form_param.on("submit",function(evt){evt.preventDefault();var $form=$(this);$form.addClass("add-in-progress").find(":submit").attr("disabled","disabled").each(function(){var contentFunc=$(this).is("button")?"html":"val";$(this).data("previous-value",$(this)[contentFunc]())[contentFunc](theme.strings.addingToCart)}),$.post(theme.routes.cart_add_url+".js",$form.serialize(),function(itemData){var $btn=$form.find(":submit").each(function(){var $btn2=$(this),contentFunc=$(this).is("button")?"html":"val";$btn2[contentFunc](theme.strings.addedToCart),setTimeout(function(){$btn2.removeAttr("disabled")[contentFunc]($btn2.data("previous-value")),$form.removeClass("add-in-progress")},1e3)}).first();$.get(theme.routes.search_url,function(data){for(var selectors=[".page-header .header-cart",".docked-navigation-container .header-cart"],$parsed=$($.parseHTML("<div>"+data+"</div>")),i2=0;i2<selectors.length;i2++){var cartSummarySelector=selectors[i2],$newCartObj=$parsed.find(cartSummarySelector).clone(),$currCart=$(cartSummarySelector);$currCart.replaceWith($newCartObj)}}),$.colorbox.close(),theme.productData=theme.productData||{},theme.productData[itemData.product_id]||(theme.productData[itemData.product_id]=JSON.parse(document.querySelector(".ProductJson-"+itemData.product_id).innerHTML));for(var productVariant=null,i=0;i<theme.productData[itemData.product_id].variants.length;i++){var variant=theme.productData[itemData.product_id].variants[i];variant.id==itemData.variant_id&&(productVariant=variant)}
1var productPrice="";itemData.original_line_price>itemData.final_line_price?(productPrice+='<span class="cart-summary__price-reduced product-price__reduced theme-money">'+theme.Shopify.formatMoney(itemData.final_line_price,theme.moneyFormat)+"</span>",productPrice+='<span class="cart-summary__price-compare product-price__compare theme-money">'+theme.Shopify.formatMoney(itemData.original_line_price,theme.moneyFormat)+"</span>"):productPrice+='<span class="theme-money">'+theme.Shopify.formatMoney(itemData.final_line_price,theme.moneyFormat)+"</span>",itemData.unit_price&&(productPrice+='<span class="cart-summary__unit-price unit-price theme-money">'+theme.Shopify.formatMoney(itemData.unit_price,theme.moneyFormat)+theme.strings.unitPriceSeparator+itemData.unit_price_measurement.reference_unit+"</span>");var productQty="";if(itemData.quantity>1&&(productQty=' <span class="cart-summary__quantity">'+itemData.quantity+"</span>"),itemData.line_level_discount_allocations&&itemData.line_level_discount_allocations.length>0){productPrice+='<ul class="cart-discount-list small-text">';for(var i=0;i<itemData.line_level_discount_allocations.length;i++){var discount_allocation=itemData.line_level_discount_allocations[i];productPrice+=['<li class="cart-discount">','<div class="cart-discount__label">',discount_allocation.discount_application.title,"</div>",'<div class="cart-discount__amount theme-money">',theme.Shopify.formatMoney(discount_allocation.amount,theme.moneyFormat),"</div>","</li>"].join("")}productPrice+="</ul>"}var sellingPlanHTML="";itemData.selling_plan_allocation&&itemData.selling_plan_allocation.selling_plan.name&&(sellingPlanHTML=['<div class="cart-summary__selling-plan ">',itemData.selling_plan_allocation.selling_plan.name,"</div>"].join(""));var productVariantsHTML="";if(productVariant){var optionNames=theme.productData[itemData.product_id].options;productVariantsHTML='<div class="cart-summary__product__variants">';for(var i=0;i<productVariant.options.length;i++)productVariant.options[i].indexOf("Default Title")<0&&(productVariantsHTML+='<div class="cart-summary__variant">',productVariantsHTML+='<span class="cart-summary__variant-label">'+optionNames[i]+":</span> ",productVariantsHTML+='<span class="cart-summary__variant-value">'+productVariant.options[i]+"</span>",productVariantsHTML+="</div>");productVariantsHTML+="</div>"}var productImage;productVariant.featured_media?productImage=slate.Image.getSizedImageUrl(productVariant.featured_media.preview_image.src,"200x"):theme.productData[itemData.product_id].media&&theme.productData[itemData.product_id].media.length>0&&(productImage=slate.Image.getSizedImageUrl(theme.productData[itemData.product_id].media[0].preview_image.src,"200x")),$.getJSON(theme.routes.cart_url+".js",function(cartData){var $template=$(['<div class="added-notice global-border-radius added-notice--pre-reveal">','<div class="added-notice__header">','<span class="added-notice__title">',theme.strings.addedToCartPopupTitle,"</span>",'<a class="added-notice__close feather-icon" href="#" aria-label="',theme.strings.close,'">',theme.icons.close,"</a>","</div>",'<div class="cart-summary global-border-radius">','<div class="cart-summary__product">','<div class="cart-summary__product-image"><img class="global-border-radius" src="',productImage,'" role="presentation" alt=""></div>','<div class="cart-summary__product__description">','<div class="cart-summary__product-title">',theme.productData[itemData.product_id].title,productQty,"</div>",productVariantsHTML,sellingPlanHTML,'<div class="cart-summary__price">',productPrice,"</div>","</div>","</div>","</div>",'<div class="cart-summary__footer">','<div class="cart-summary__total-quantity-row">',"<span>",theme.strings.addedToCartPopupItems,"</span>","<span>",cartData.item_count,"</span>","</div>",'<div class="cart-summary__total-price-row large-text">',"<span>",theme.strings.addedToCartPopupSubtotal,"</span>",'<span class="theme-money">',theme.Shopify.formatMoney(cartData.total_price,theme.moneyFormat),"</span>","</div>",'<a href="',theme.routes.cart_url,'" class="btn btn--primary btn--small btn--fullwidth cart-summary__button">',theme.strings.addedToCartPopupGoToCart,"</a>","</div>","</div>"].join(""));$template.appendTo("body"),setTimeout(function(){$template.removeClass("added-notice--pre-reveal")},10),theme.addedToCartNoticeHideTimeoutId=setTimeout(function(){$template.find(".added-notice__close").trigger("click")},5e3)})},"json").fail(function(data){$form.removeClass("add-in-progress");var $firstBtn=$form.find(":submit").removeAttr("disabled").each(function(){var $btn=$(this),contentFunc=$btn.is("button")?"html":"val";$btn[contentFunc]($btn.data("previous-value"))}).first();typeof data!="undefined"&&data.responseJSON&&data.responseJSON.description?theme.showQuickPopup(data.responseJSON.description,$firstBtn):$form.off("submit").submit()})}),$(document).off(".ajaxAddToCart"),$(document).on("click.ajaxAddToCart",".added-notice__close",function(){var $template=$(this).closest(".added-notice").addClass("added-notice--pre-destroy");return setTimeout(function(){$template.remove()},500),!1}),$(document).on("mouseenter.ajaxAddToCart",".header-cart",function(){clearTimeout(theme.addedToCartNoticeHideTimeoutId),$(".added-notice__close").trigger("click")})},theme.unloadAjaxAddToCartForm=function($form){$form.off("submit")},$(function(){var overlapGutter=10,overlapGutterFuzzed=overlapGutter+1,GRAVITY_LEFT=0,GRAV
1ITY_CENTRE=1,GRAVITY_RIGHT=2;function oaElementToOriginalRectangle($el){var t={left:$el.offset().left-parseFloat($el.css("margin-left")),top:$el.offset().top-parseFloat($el.css("margin-top")),width:$el.outerWidth(),height:$el.outerHeight()};return t.right=t.left+t.width,t.bottom=t.top+t.height,$el.hasClass("avoid-overlaps__item--gravity-left")?t.gravity=GRAVITY_LEFT:$el.hasClass("avoid-overlaps__item--gravity-right")?t.gravity=GRAVITY_RIGHT:t.gravity=GRAVITY_CENTRE,t}function oaSetOffsetFromCentre(item){item.newRect.gravity==GRAVITY_LEFT||(item.newRect.gravity==GRAVITY_RIGHT?(item.newRect.right=item.newRect.left,item.newRect.left=item.newRect.right-item.newRect.width):(item.newRect.left=item.newRect.left-item.newRect.width/2,item.newRect.right=item.newRect.left+item.newRect.width)),item.newRect.top=item.newRect.top-item.newRect.height/2,item.newRect.bottom=item.newRect.top+item.newRect.height}function oaRectIsInsideBoundary(rect,container){return rect.left>=container.left+overlapGutter&&rect.top>=container.top+overlapGutter&&rect.right<=container.right-overlapGutter&&rect.bottom<=container.bottom-overlapGutter}function oaEnforceBoundaryConstraint(item,containerRect){item.newRect.left<containerRect.left+overlapGutter&&(item.newRect.left=containerRect.left+overlapGutterFuzzed,item.newRect.right=item.newRect.left+item.newRect.width),item.newRect.top<containerRect.top+overlapGutter&&(item.newRect.top=containerRect.top+overlapGutterFuzzed,item.newRect.bottom=item.newRect.top+item.newRect.height),item.newRect.right>containerRect.right-overlapGutter&&(item.newRect.right=containerRect.right-overlapGutterFuzzed,item.newRect.left=item.newRect.right-item.newRect.width),item.newRect.bottom>containerRect.bottom-overlapGutter&&(item.newRect.bottom=containerRect.bottom-overlapGutterFuzzed,item.newRect.top=item.newRect.bottom-item.newRect.height)}function oaRectanglesOverlap(rect1,rect2){return!(rect1.right<rect2.left||rect1.left>rect2.right||rect1.bottom<rect2.top||rect1.top>rect2.bottom)}function oaRectanglesOverlapWithGutter(rect1,rect2){return!(rect1.right+overlapGutter<rect2.left||rect1.left-overlapGutter>rect2.right||rect1.bottom+overlapGutter<rect2.top||rect1.top-overlapGutter>rect2.bottom)}function oaGetSortedVectorsToAttempt(rect1,rect2){var deltaX=rect2.left+(rect2.right-rect2.left)/2-(rect1.left+(rect1.right-rect1.left)/2),deltaY=rect2.top+(rect2.bottom-rect2.top)/2-(rect1.top+(rect1.bottom-rect1.top)/2);return Math.abs(deltaX)>Math.abs(deltaY)?deltaX>0?[1,0,2,3]:[3,0,2,1]:deltaY>0?[2,1,3,0]:[0,1,3,2]}function oaAttemptReposition(toMove,vector,movingAwayFrom,containerRect,allItems){var newRect=$.extend({},toMove.newRect);switch(vector){case 0:newRect.bottom=movingAwayFrom.newRect.top-overlapGutterFuzzed,newRect.top=newRect.bottom-newRect.height;break;case 1:newRect.left=movingAwayFrom.newRect.right+overlapGutterFuzzed,newRect.right=newRect.left+newRect.width;break;case 2:newRect.top=movingAwayFrom.newRect.bottom+overlapGutterFuzzed,newRect.bottom=newRect.top+newRect.height;break;case 3:newRect.right=movingAwayFrom.newRect.left-overlapGutterFuzzed,newRect.left=newRect.right-newRect.width;break}for(var isInsideBoundary=oaRectIsInsideBoundary(newRect,containerRect),doesOverlap=!1,i=0;i<allItems.length;i++){var item=allItems[i];item.el[0]!=toMove.el[0]&&oaRectanglesOverlap(newRect,item.newRect)&&(doesOverlap=!0)}return isInsideBoundary&&!doesOverlap?(toMove.newRect=newRect,!0):!1}theme.checkOverlaps=function(){$(".avoid-overlaps").each(function(){var $container=$(this),$mobileContainer=$(".avoid-overlaps__mobile-container",this),containerRect=null;$mobileContainer.length&&$mobileContainer.css("position")=="relative"?containerRect=oaElementToOriginalRectangle($mobileContainer):containerRect=oaElementToOriginalRectangle($container);var $candidates=$(this).find(".avoid-overlaps__item"),itemsToProcess=[],itemsThatCanBeMoved=[],itemsThatCanBeMoveALot=[];$candidates.each(function(){var item2={el:$(this),newRect:oaElementToOriginalRectangle($(this)),oldRect:oaElementToOriginalRectangle($(this)),overlaps:!1};itemsToProcess.push(item2),$(this).hasClass("overlay")||itemsThatCanBeMoveALot.push(item2),$(this).css("position")=="absolute"&&!$(this).hasClass("overlay--bottom-wide")&&!$(this).hasClass("overlay--low-wide")&&itemsThatCanBeMoved.push(item2)});for(var i=0;i<itemsThatCanBeMoved.length;i++){var candidate=itemsThatCanBeMoved[i];oaSetOffsetFromCentre(candidate),oaEnforceBoundaryConstraint(candidate,containerRect)}for(var i=0;i<itemsToProcess.length;i++)for(var candidate=itemsToProcess[i],j=0;j<itemsThatCanBeMoveALot.length;j++){var checking=itemsThatCanBeMoveALot[j];if(checking.el[0]!=candidate.el[0])for(var vectorPreference=oaGetSortedVectorsToAttempt(candidate.newRect,checking.newRect);vectorPreference.length>0&&oaRectanglesOverlapWithGutter(candidate.newRect,checking.newRect);){var moved=oaAttemptReposition(checking,vectorPreference.shift(),candidate,containerRect,itemsToProcess);checking.overlaps=!moved}}for(var j=0;j<itemsToProcess.length;j++){var item=itemsToProcess[j],deltaX=item.newRect.left-item.oldRect.left,deltaY=item.newRect.top-item.oldRect.top;item.el.css({marginLeft:deltaX!=0?deltaX:"",marginTop:deltaY!=0?deltaY:""}),item.el.toggleClass("is-overlapping",item.overlaps)}}).addClass("avoid-overlaps--processed")},theme.checkOverlaps(),$(document).on("shopify:section:load",theme.checkOverlaps),$(window).on("debouncedresize",theme.checkOverlaps)}
1),theme.assessLoadedRTEImage=function(el){var rteWidth=$(el).closest(".rte").width();if($(el)[0].naturalWidth>rteWidth){var para=$(el).parentsUntil(".rte").filter("p");para.length>0?para.addClass("expanded-width"):$(el).wrap('<p class="expanded-width"></p>')}else $(el).closest(".expanded-width").removeClass("expanded-width")},theme.assessRTEImagesOnLoad=function(container){$(".rte--expanded-images img:not(.exp-loaded)",container).each(function(){var originalImage=this,img=new Image;$(img).on("load.rteExpandedImage",function(){$(originalImage).addClass("exp-loaded"),theme.assessLoadedRTEImage(originalImage)}),img.src=this.src,(img.complete||img.readyState===4)&&($(img).off("load.rteExpandedImage"),$(originalImage).addClass("exp-loaded"),theme.assessLoadedRTEImage(originalImage))})},theme.assessRTEImagesOnLoad(),$(window).on("debouncedresize",function(){$(".rte--expanded-images img.exp-loaded").each(function(){theme.assessLoadedRTEImage(this)})}),theme.recentProductCacheExpiry=1e3*60*10,theme.recentProductHistoryCap=12,theme.recentProductsStorageKey="theme.recent_products_v3",theme.addRecentProduct=function(recentArr,index,$container,showHover,showVendor){var item=recentArr[index],_recentArr=recentArr,_showHover=showHover,_showVendor=showVendor,_$container=$container,$itemContainer=$('<div class="product-block product-block--recent-unloaded grid__item one-sixth medium--one-quarter small-down--one-whole">'),currentTimestamp=new Date().getTime();item.timestamp&&item.timestamp>currentTimestamp-theme.recentProductCacheExpiry?$itemContainer.append(theme.buildRecentProduct(item,_showHover,_showVendor)).removeClass("product-block--recent-unloaded"):$.getJSON(item.url+".js",function(data){item.title=data.title,item.image=data.media&&data.media.length?data.media[0].preview_image.src:"",item.timestamp=currentTimestamp,window.localStorage.setItem(theme.recentProductsStorageKey,JSON.stringify(_recentArr)),_$container.filter(".slick-initialized").slick("slickUnfilter"),$itemContainer.append(theme.buildRecentProduct(item,_showHover,_showVendor)).removeClass("product-block--recent-unloaded"),_$container.filter(".slick-initialized").slick("slickFilter",":not(.product-block--recent-unloaded)"),theme.initUniformHeightMonitor(_$container,".product-block__image-container",".product-block__image-container .image-one")}),$container.append($itemContainer),theme.assessRecentProductGrid($container)},theme.assessRecentProductGrid=function($container){var $items=$container.children(),toHideOnTablet=Math.max($items.length-4,0);if(toHideOnTablet>0){$items.slice(0,3).removeClass("medium--hide");for(var i=0;i<toHideOnTablet;i++)$($items[i]).addClass("medium--hide")}},theme.onRecentProductImageLoad=function(){if(theme.settings.uniformProductGridImagesEnabled){var $uhmContainer=$(this).closest(".uhm-active");$uhmContainer.length&&$uhmContainer.data("uhm-callback")()}},theme.buildRecentProduct=function(item,showHover,showVendor){var $item=$('<a class="recently-viewed-product plain-link">').attr({href:item.url,title:item.title}),$priceCont=$('<div class="product-price small-text">');if(item.priceVaries&&($('<span class="product-price__from tiny-text">').html(theme.strings.priceFrom).appendTo($priceCont),$priceCont.append(" ")),item.compareAtPrice>item.price?($('<span class="product-price__reduced theme-money">').html(theme.Shopify.formatMoney(item.price,theme.moneyFormat)).appendTo($priceCont),$priceCont.append(" "),$('<span class="product-price__compare theme-money">').html(theme.Shopify.formatMoney(item.compareAtPrice,theme.moneyFormat)).appendTo($priceCont)):$('<span class="theme-money">').html(theme.Shopify.formatMoney(item.price,theme.moneyFormat)).appendTo($priceCont),item.unitPrice){var $newUnitPriceArea=$('<div class="unit-price tiny-text">');$('<span class="unit-price__price theme-money">').html(theme.Shopify.formatMoney(item.unitPrice,theme.moneyFormat)).appendTo($newUnitPriceArea),$('<span class="unit-price__separator">').html(theme.strings.unitPriceSeparator).appendTo($newUnitPriceArea),$('<span class="unit-price__unit">').html(item.unitPriceUnit).appendTo($newUnitPriceArea),$newUnitPriceArea.appendTo($priceCont)}var $imageContWrapper=$('<div class="product-block__image-container">').appendTo($item),$imageCont=$('<div class="hover-images global-border-radius relative">').appendTo($imageContWrapper);return item.image&&$('<div class="image-one">').append($('<img role="presentation">').on("load",theme.onRecentProductImageLoad).attr({src:item.image,alt:item.title})).appendTo($imageCont),showHover&&item.image2&&($imageCont.addClass("hover-images--two"),$('<div class="image-two">').css("background-image","url("+item.image2+")").appendTo($imageCont)),item.available===!1?theme.settings.soldLabelEnabled&&$('<span class="product-label product-label--sold-out global-border-radius"></span>').html(theme.strings.soldOut).appendTo($imageCont):theme.settings.saleLabelEnabled&&item.compareAtPrice>item.price&&$('<span class="product-label product-label--on-sale global-border-radius"></span>').html(theme.strings.onSale).appendTo($imageCont),$('<div class="product-block__title small-text">').html(item.title).appendTo($item),showVendor&&$('<div class="product-block__vendor tiny-text">').html(item.vendor).appendTo($item),$item.append($priceCont),$item}
1,theme.getRecentProducts=function(){var existingValue=window.localStorage.getItem(theme.recentProductsStorageKey);if(existingValue)try{return JSON.parse(existingValue)}catch(error){}return[]},theme.addToAndReturnRecentProducts=function(data){for(var existingArr=theme.getRecentProducts(),run=!0;run;){run=!1;for(var i=0;i<existingArr.length;i++)if(existingArr[i].handle==data.handle){existingArr.splice(i,1),run=!0;break}}for(data.timestamp=new Date().getTime(),existingArr.push(data);existingArr.length>theme.recentProductHistoryCap;)existingArr.shift();return window.localStorage.setItem(theme.recentProductsStorageKey,JSON.stringify(existingArr)),existingArr},theme.loadRecentlyViewed=function($container){theme.peekCarousel.init($container,$(".grid",$container),".recentlyViewed",function(){return $(window).width()<768}),$(".grid",$container).filter(".slick-initialized").slick("slickFilter",":not(.product-block--recent-unloaded)"),theme.initUniformHeightMonitor($container,".product-block__image-container",".product-block__image-container .image-one")},theme.unloadRecentlyViewed=function($container){theme.destroyUniformHeightMonitor($container),theme.peekCarousel.destroy($container,$(".slick-initialized",$container),".recentlyViewed")},theme.ProductMedia=new function(){var _=this;_._setupShopifyXr=function(){if(!window.ShopifyXR){document.addEventListener("shopify_xr_initialized",_._setupShopifyXr.bind(this));return}window.ShopifyXR.addModels(JSON.parse($(this).html())),window.ShopifyXR.setupXRElements()},this.init=function(container,callbacks){var callbacks=callbacks||{},_container=container;$(container).on("mediaVisible",".product-media--video-loaded, .product-media--model-loaded",function(){$(window).width()>=768&&$(this).data("player").play(),$(this).hasClass("product-media--model")&&$(".view-in-space",_container).attr("data-shopify-model3d-id",$(this).data("model-id"))}),$(container).on("mediaHidden",".product-media--video-loaded, .product-media--model-loaded",function(){$(this).data("player").pause()}),callbacks.onVideoVisible&&$(container).on("mediaVisible",".product-media--video-loaded",callbacks.onVideoVisible),callbacks.onVideoHidden&&$(container).on("mediaHidden",".product-media--video-loaded",callbacks.onVideoHidden),$("model-viewer",container).each(function(){callbacks.onModelViewerPlay&&$(this).on("shopify_model_viewer_ui_toggle_play",callbacks.onModelViewerPlay),callbacks.onModelViewerPause&&$(this).on("shopify_model_viewer_ui_toggle_pause",callbacks.onModelViewerPause)}),$(container).find(".product-media--video").each(function(index){var enableLooping=$(this).data("enable-video-looping"),element=$(this).find("iframe, video")[0],$currentMedia=$(this);if(element.tagName==="VIDEO")window.Shopify.loadFeatures([{name:"video-ui",version:"1.0",onLoad:function(){var playerObj={playerType:"html5",element:element};playerObj.play=function(){this.plyr.play()}.bind(playerObj),playerObj.pause=function(){this.plyr.pause()}.bind(playerObj),playerObj.destroy=function(){this.plyr.destroy()}.bind(playerObj),playerObj.plyr=new Shopify.Plyr(element,{controls:["play","progress","mute","volume","play-large","fullscreen"],loop:{active:enableLooping},hideControlsOnPause:!0,iconUrl:"//cdn.shopify.com/shopifycloud/shopify-plyr/v1.0/shopify-plyr.svg",tooltips:{controls:!1,seek:!0}}),$(this).data("player",playerObj).addClass("product-media--video-loaded"),$(element).on("playing",function(){$(".product-media").not($currentMedia).trigger("mediaHidden"),$currentMedia.find(".plyr__controls").off(".themeMediaEventFix").on("keydown.themeMediaEventFix touchstart.themeMediaEventFix mousedown.themeMediaEventFix keydown.themeMediaEventFix",function(e){e.stopPropagation()}),callbacks.onPlyrPlay&&callbacks.onPlyrPlay(playerObj)}),$(element).on("pause ended",function(){$currentMedia.find(".plyr__controls").off(".themeMediaEventFix"),callbacks.onPlyrPause&&callbacks.onPlyrPause(playerObj)}),callbacks.onPlyrInit&&callbacks.onPlyrInit(playerObj)}.bind(this)}]),theme.loadStyleOnce("https://cdn.shopify.com/shopifycloud/shopify-plyr/v1.0/shopify-plyr.css");else if(element.tagName==="IFRAME"&&/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(element.src)){var existingYTCB=window.onYouTubeIframeAPIReady,loadYoutubeVideo=function(){var playerObj={playerType:"youtube",element:element},videoId=$(this).data("video-id");playerObj.player=new YT.Player(element,{videoId:videoId,events:{onStateChange:function(event){event.data===YT.PlayerState.ENDED&&enableLooping&&event.target.seekTo(0),event.data===YT.PlayerState.PLAYING&&($(".product-media").not($currentMedia).trigger("mediaHidden"),callbacks.onYouTubePlay&&callbacks.onYouTubePlay(playerObj)),event.data===YT.PlayerState.PAUSED&&event.data===YT.PlayerState.ENDED&&callbacks.onYouTubePause&&callbacks.onYouTubePause(playerObj)}}}),playerObj.play=function(){this.player.playVideo()}.bind(playerObj),playerObj.pause=function(){this.player.pauseVideo()}.bind(playerObj),playerObj.destroy=function(){this.player.destroy()}.bind(playerObj),$(this).data("player",playerObj).addClass("product-media--video-loaded"),callbacks.onYouTubeInit&&callbacks.onYouTubeInit(playerObj)}.bind(this);window.YT&&window.YT.Player?loadYoutubeVideo():(window.onYouTubeIframeAPIReady=function(){existingYTCB&&existingYTCB(),loadYoutubeVideo()},theme.loadScriptOnce("https://www.youtube.com/iframe_api"))}}),$(container).on("mediaVisible mediaVisibleInitial",".product-media--model:not(.product-media--model-loaded):not(.product-media--model-loading)",function(e){var element=$(this).find("model-viewer")[0],$currentMedia=$(this),autoplay=e.type!="mediaVisibleInitial";$(this).addClass("product-media--model-loading"),theme.loadStyleOnce("https://cdn.shopify.com/shopifycloud/model-viewer-ui/assets/v1.0/model-viewer-ui.css"),window.Shopify.loadFeatures([{name:"model-viewer-ui",ver
1sion:"1.0",onLoad:function(){$(this).data("player",new Shopify.ModelViewerUI(element)),$('<div class="theme-event-proxy">').on("mouseup",function(e2){e2.stopPropagation(),e2.preventDefault();var newEventTarget=$(e2.currentTarget).closest(".product-media")[0];newEventTarget.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0}))}).appendTo($(this).find(".shopify-model-viewer-ui__controls-overlay")),$(this).find("model-viewer").on("shopify_model_viewer_ui_toggle_play",function(){$(this).closest(".product-media").on("touchstart.themeModelViewerFix mousedown.themeModelViewerFix keydown.themeModelViewerFix",function(e2){e2.stopPropagation()})}).on("shopify_model_viewer_ui_toggle_pause",function(){$(this).closest(".shopify-model-viewer-ui").off(".themeMediaEventFix")}),$(this).find("model-viewer").on("shopify_model_viewer_ui_toggle_play",function(){$(".product-media").not($currentMedia).trigger("mediaHidden")}),$(this).addClass("product-media--model-loaded").removeClass("product-media--model-loading"),callbacks.onModelViewerInit&&callbacks.onModelViewerInit(element),autoplay&&$(this).trigger("mediaVisible")}.bind(this)}])}),$(".model-json",container).length&&(window.Shopify.loadFeatures([{name:"shopify-xr",version:"1.0",onLoad:_._setupShopifyXr.bind($(".model-json",container))}]),$(document).on("shopify_xr_launch",function(){$(".product-media--video-loaded").each(function(){$(this).data("player").pause()})})),setTimeout(function(){$(".product-media:first",this).filter(".product-media--model").trigger("mediaVisibleInitial")}.bind(container),50)},this.destroy=function(container){$(document).off("shopify_xr_launch"),$(container).off("mediaVisible mediaVisibleInitial mediaHidden"),$(".product-media--video-loaded, .product-media--model-loaded",container).each(function(){$(this).data("player").destroy()}),$(".product-media--video video",container).off("playing pause ended"),$("model-viewer",container).off("shopify_model_viewer_ui_toggle_play shopify_model_viewer_ui_toggle_pause")}};var PriceRangeInstance=(function(){"use strict";function PriceRangeInstance2(container){var _this13=this;_classCallCheck(this,PriceRangeInstance2),this.container=container,this.selectors={inputMin:".cc-price-range__input--min",inputMax:".cc-price-range__input--max",control:".cc-price-range__control",controlMin:".cc-price-range__control--min",controlMax:".cc-price-range__control--max",bar:".cc-price-range__bar",activeBar:".cc-price-range__bar-active"},this.controls={min:{barControl:container.querySelector(this.selectors.controlMin),input:container.querySelector(this.selectors.inputMin)},max:{barControl:container.querySelector(this.selectors.controlMax),input:container.querySelector(this.selectors.inputMax)}},this.controls.min.value=parseInt(this.controls.min.input.value===""?this.controls.min.input.placeholder:this.controls.min.input.value),this.controls.max.value=parseInt(this.controls.max.input.value===""?this.controls.max.input.placeholder:this.controls.max.input.value),this.valueMin=this.controls.min.input.min,this.valueMax=this.controls.min.input.max,this.valueRange=this.valueMax-this.valueMin,[this.controls.min,this.controls.max].forEach(function(item){item.barControl.setAttribute("aria-valuemin",_this13.valueMin),item.barControl.setAttribute("aria-valuemax",_this13.valueMax)}),this.controls.min.barControl.setAttribute("aria-valuenow",this.controls.min.value),this.controls.max.barControl.setAttribute("aria-valuenow",this.controls.max.value),this.bar=container.querySelector(this.selectors.bar),this.activeBar=container.querySelector(this.selectors.activeBar),this.inDrag=!1,this.bindEvents(),this.render()}return _createClass(PriceRangeInstance2,[{key:"getPxToValueRatio",value:function(){return this.bar.clientWidth/(this.valueMax-this.valueMin)}},{key:"getPcToValueRatio",value:function(){return 100/(this.valueMax-this.valueMin)}},{key:"setActiveControlValue",value:function(value,reset){this.activeControl===this.controls.min?(value===""&&(value=this.valueMin),value=Math.max(this.valueMin,value),value=Math.min(value,this.controls.max.value)):(value===""&&(value=this.valueMax),value=Math.min(this.valueMax,value),value=Math.max(value,this.controls.min.value)),this.activeControl.value=Math.round(value),this.activeControl.input.value!=this.activeControl.value&&(this.activeControl.value==this.activeControl.input.placeholder?this.activeControl.input.value="":this.activeControl.input.value=this.activeControl.value,reset||this.activeControl.input.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{sender:"theme:component:price_range"}}))),this.activeControl.barControl.setAttribute("aria-valuenow",this.activeControl.value)}},{key:"render",value:function(){this.drawControl(this.controls.min),this.drawControl(this.controls.max),this.drawActiveBar()}},{key:"drawControl",value:function(control){control.barControl.style.left="".concat((control.value-this.valueMin)*this.getPcToValueRatio(),"%")}},{key:"drawActiveBar",value:function(){this.activeBar.style.left="".concat((this.controls.min.value-this.valueMin)*this.getPcToValueRatio(),"%"),this.activeBar.style.right="".concat((this.valueMax-this.controls.max.value)*this.getPcToValueRatio(),"%")}},{key:"handleControlTouchStart",value:function(e){e.preventDefault(),this.startDrag(e.target,e.touches[0].clientX),this.boundControlTouchMoveEvent=this.handleControlTouchMove.bind(this),this.boundControlTouchEndEvent=this.handleControlTouchEnd.bind(this),window.addEventListener("touchmove",this.boundControlTouchMoveEvent),window.addEventListener("touchend",this.boundControlTouchEndEvent)}},{key:"handleControlTouchMove",value:function(e){this.moveDrag(e.touches[0].clientX)}},{key:"handleControlTouchEnd",value:function(e){e.preventDefault(),window.removeEventListener("touchmove",this.boundControlTouchMoveEvent),window.removeEventListener("touchend",this.boundControlTouchEndEvent),this.stopDrag(
1)}},{key:"handleControlMouseDown",value:function(e){e.preventDefault(),this.startDrag(e.target,e.clientX),this.boundControlMouseMoveEvent=this.handleControlMouseMove.bind(this),this.boundControlMouseUpEvent=this.handleControlMouseUp.bind(this),window.addEventListener("mousemove",this.boundControlMouseMoveEvent),window.addEventListener("mouseup",this.boundControlMouseUpEvent)}},{key:"handleControlMouseMove",value:function(e){this.moveDrag(e.clientX)}},{key:"handleControlMouseUp",value:function(e){e.preventDefault(),window.removeEventListener("mousemove",this.boundControlMouseMoveEvent),window.removeEventListener("mouseup",this.boundControlMouseUpEvent),this.stopDrag()}},{key:"startDrag",value:function(target,startX){this.activeControl=this.controls.min.barControl===target?this.controls.min:this.controls.max,this.dragStartX=startX,this.dragStartValue=this.activeControl.value,this.inDrag=!0}},{key:"moveDrag",value:function(moveX){if(this.inDrag){var value=this.dragStartValue+(moveX-this.dragStartX)/this.getPxToValueRatio();this.setActiveControlValue(value),this.render()}}},{key:"stopDrag",value:function(){this.inDrag=!1}},{key:"handleInputChange",value:function(e){if(e.target.tagName==="INPUT"&&(!e.detail||e.detail.sender!=="theme:component:price_range")){var reset=e.detail&&e.detail.sender==="reset";this.activeControl=this.controls.min.input===e.target?this.controls.min:this.controls.max,this.setActiveControlValue(e.target.value,reset),this.render()}}},{key:"bindEvents",value:function(){var _this14=this;[this.controls.min,this.controls.max].forEach(function(item){item.barControl.addEventListener("touchstart",_this14.handleControlTouchStart.bind(_this14)),item.barControl.addEventListener("mousedown",_this14.handleControlMouseDown.bind(_this14))}),this.container.addEventListener("change",this.handleInputChange.bind(this))}},{key:"destroy",value:function(){}}]),PriceRangeInstance2})(),PriceRange=(function(_ccComponent2){"use strict";_inherits(PriceRange2,_ccComponent2);var _super2=_createSuper(PriceRange2);function PriceRange2(){var name=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"price-range",cssSelector=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".cc-".concat(name);return _classCallCheck(this,PriceRange2),_super2.call(this,name,cssSelector)}return _createClass(PriceRange2,[{key:"init",value:function(container){_get(_getPrototypeOf(PriceRange2.prototype),"init",this).call(this,container),this.registerInstance(container,new PriceRangeInstance(container))}},{key:"destroy",value:function(container){this.destroyInstance(container),_get(_getPrototypeOf(PriceRange2.prototype),"destroy",this).call(this,container)}}]),PriceRange2})(ccComponent);new PriceRange,theme.Header=new function(){this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$nav=$(".site-nav",container),this.$navLinks=this.$nav.children(".site-nav__item:not(.site-nav__more-links)"),this.$navMoreLinksLink=$(".site-nav__more-links",this.$nav),this.$navMoreLinksContainer=$(".small-dropdown__container",this.$navMoreLinksLink),this.$navMoreLinksSubmenuContainer=$(".site-nav__more-links .more-links__dropdown-container",this.$nav),this.search={ongoingRequest:null,ongoingTimeoutId:-1,throttleMs:500,searchUrlKey:"searchUrl",resultsSelector:".search-bar__results",resultsLoadingClass:"search-bar--loading-results",resultsLoadedClass:"search-bar--has-results",loadingMessage:theme.strings.searchLoading,moreResultsMessage:theme.strings.searchMoreResults,emptyMessage:theme.strings.searchNoResults};var breakpoint=767;$(this.$container).on("click"+this.namespace,".js-search-form-open",this.functions.searchFormOpen.bind(this)),$(this.$container).on("click"+this.namespace,".js-search-form-focus",this.functions.searchFormFocus.bind(this)),$(this.$container).on("click"+this.namespace,".js-search-form-close",this.functions.searchFormClose.bind(this)),$(this.$container).on("click"+this.namespace,".js-mobile-menu-icon",this.functions.mobileMenuOpen.bind(this)),$(this.$container).on("click"+this.namespace,".js-close-mobile-menu",this.functions.mobileMenuClose.bind(this)),$(this.$container).on("focusin"+this.namespace,".search-bar",this.functions.searchFocusIn.bind(this)),$(this.$container).on("focusout"+this.namespace,".search-bar",this.functions.searchFocusOut.bind(this)),$(".search-bar.live-search",this.$container).length&&$(this.$container).on("keyup"+this.namespace+" change"+this.namespace,'.search-bar.live-search input[name="q"]',this.functions.updateSearchResults.bind(this)),this.functions.setSearchTabbing.bind(this)(),$(".focus-tint").on("click"+this.namespace,this.functions.onFocusTintClick.bind(this)),$("body").toggleClass("header-has-messages",this.$container.find(".store-messages-bar").length>0),$(".js-messages-slider",this.$container).slick({infinite:!0,autoplay:!0,slidesToShow:1,slidesToScroll:1,prevArrow:!1,nextArrow:!1}),$(".js-mobile-messages-slider",this.$container).slick({infinite:!0,autoplay:!0,slidesToShow:1,slidesToScroll:1,mobileFirst:!0,prevArrow:!1,nextArrow:!1,responsive:[{breakpoint:breakpoint,settings:"unslick"}]}),$(window).on("debouncedresize"+this.namespace,function(e){$(".js-mobile-messages-slider",this.$container).slick("resize")}),$(this.$container).on("click"+this.namespace,'.mobile-site-nav__icon, .mobile-site-nav__link[href="#"]',function(e){e.preventDefault(),$(this).siblings(".mobile-site-nav__menu").slideToggle(250),$(this).toggleClass("submenu-open")}),$(this.$container).on("click"+this.namespace,".customer-account .customer-login",this.functions.loginOpen.bind(this)),$(this.$container).on("click"+this.namespace,".customer-account .customer-register",this.functions.registerOpen.bind(this)),this.$container.hasClass("docking-header")&&(this.desktopHeaderWasDocked=!1,this.$dockedDesktopContentsContainer=$(".docked-navigation-container__inner",container),this.$dockedDesktopBaseContainer=$(".docked-navigation-container",container),this.mobileHeaderWasDocked=!1,this.$dockedMobileContentsContainer=$(".docked-mobile-navigation-container__inner",container),this.$dockedMobileBaseContainer=$(".docked-mobile-navigation-container",container),$(this.functions.dockedNavCheck.call(this)),$(window).on("scroll"+this.namespace,this.functions.dockedNavCheck.bind(this)),$(window).on("debouncedresize"+this.namespace,this.functions.dockedNavCheck.bind(this)),$('<style id="themeDockedNav
1Style">').appendTo("head"),$(this.functions.updateDockedNavHeightStyle.call(this)),$(window).on("debouncedresize"+this.namespace,this.functions.updateDockedNavHeightStyle.bind(this))),$(this.functions.menuLinkVisibilityCheck.call(this)),$(window).on("debouncedresize"+this.namespace,this.functions.menuLinkVisibilityCheck.bind(this)),$(this.$container).on("mouseenter"+this.namespace,".more-links--with-dropdown .site-nav__item",this.functions.onMoreLinksSubMenuActive.bind(this)),this.navHoverDelay=250,this.$navLastOpenDropdown=$(),$(this.$container).on("mouseenter"+this.namespace+" mouseleave"+this.namespace,".site-nav__item--has-dropdown",function(evt){var $dropdownContainer=$(evt.currentTarget);if(evt.type=="mouseenter"){clearTimeout(this.navOpenTimeoutId),clearTimeout($dropdownContainer.data("navCloseTimeoutId"));var $openSiblings=$dropdownContainer.siblings(".open");$openSiblings.not(this.$navLastOpenDropdown).removeClass("open"),this.$navLastOpenDropdown=$dropdownContainer;var timeoutDelay=$openSiblings.length==0?0:this.navHoverDelay,navOpenTimeoutId=setTimeout(function(){$dropdownContainer.addClass("open").siblings(".open").removeClass("open");var $dropdown=$dropdownContainer.children(".small-dropdown:not(.more-links-dropdown)");if($dropdown.length&&$dropdownContainer.parent().hasClass("site-nav")){var right=$dropdownContainer.offset().left+$dropdown.outerWidth(),transform="",cw=this.$container.outerWidth()-10;right>cw&&(transform="translateX("+(cw-right)+"px)"),$dropdown.css("transform",transform)}}.bind(this),timeoutDelay);this.navOpenTimeoutId=navOpenTimeoutId,$dropdownContainer.data("navOpenTimeoutId",navOpenTimeoutId)}else clearTimeout($dropdownContainer.data("navOpenTimeoutId")),$dropdownContainer.data("navCloseTimeoutId",setTimeout(function(){$dropdownContainer.removeClass("open").children(".small-dropdown:not(.more-links-dropdown)").css("transform","")},this.navHoverDelay));$dropdownContainer.children("[aria-expanded]").attr("aria-expanded",evt.type=="mouseenter")}.bind(this)),$(this.$container).on("keydown"+this.namespace,".site-nav__item--has-dropdown > .site-nav__link",this.functions.dropdownLinkKeyPress.bind(this)),$(this.$container).on("touchstart"+this.namespace+" touchend"+this.namespace+" click"+this.namespace,".site-nav__item--has-dropdown > .site-nav__link",function(evt){if(evt.type=="touchstart")$(this).data("touchstartedAt",evt.timeStamp);else if(evt.type=="touchend"){if(evt.timeStamp-$(this).data("touchstartedAt")<1e3)return $(this).data("touchOpenTriggeredAt",evt.timeStamp),$(this).parent().hasClass("open")?$(this).parent().trigger("mouseleave"):($(".site-nav__item.open").trigger("mouseleave"),$(this).parent().trigger("mouseenter")),!1}else if(evt.type=="click"&&$(this).data("touchOpenTriggeredAt")&&evt.timeStamp-$(this).data("touchOpenTriggeredAt")<1e3)return!1}),$(this.$container).on("touchstart"+this.namespace,".customer-account__parent-link",function(){$(this).closest(".customer-account").addClass("customer-account--using-touch")}),$(this.$container).on("click"+this.namespace,".customer-account__parent-link",this.functions.onAccountIconClick.bind(this)),$(".disclosure",this.$container).each(function(){$(this).data("disclosure",new theme.Disclosure($(this)))})},this.functions={onAccountIconClick:function(evt){if($(window).width()>=768){evt.preventDefault();var isOpen=$(evt.target).closest(".customer-account").toggleClass("customer-account--reveal-menu").hasClass("customer-account--reveal-menu");$(evt.target).closest(".customer-account__parent-link").attr("aria-expanded",isOpen)}},dropdownLinkKeyPress:function(evt){if(evt.which==13){if($(evt.target).closest(".site-nav__dropdown").length&&$(evt.target).closest(".more-links").length)$(evt.target).trigger("mouseenter");else{var isOpen=$(evt.target).closest(".site-nav__item--has-dropdown").toggleClass("open").hasClass("open");$(evt.target).attr("aria-expanded",isOpen)}return!1}},setSearchTabbing:function(evt){$(".search-bar",this.$container).each(function(){$(this).css("pointer-events")=="none"?$(this).find("a, input, button").attr("tabindex","-1"):$(this).find("a, input, button").removeAttr("tabindex")})},onMoreLinksSubMenuActive:function(evt){this.$navMoreLinksSubmenuContainer.empty();var $childMenu=$(evt.currentTarget).children(".site-nav__dropdown");
1if($childMenu.length){var $clone=$childMenu.clone();$clone.find(".mega-dropdown__container .one-third").removeClass("one-third").addClass("one-half"),$clone.find(".mega-dropdown__container .one-quarter").removeClass("one-quarter").addClass("one-third"),$clone.find(".site-nav__promo-container > .three-quarters").removeClass("three-quarters").addClass("two-thirds"),$clone.find(".site-nav__promo-container > .one-quarter").removeClass("one-quarter").addClass("one-third"),$clone.appendTo(this.$navMoreLinksSubmenuContainer)}var submenuHeight=this.$navMoreLinksSubmenuContainer.outerHeight()+30;this.$navMoreLinksSubmenuContainer.parent().css("min-height",submenuHeight),$(evt.currentTarget).removeClass("more-links__parent--inactive").addClass("more-links__parent--active").siblings().removeClass("more-links__parent--active").addClass("more-links__parent--inactive"),$(evt.target).attr("aria-expanded",!0),$(evt.target).parent().siblings().find("a").attr("aria-expanded",!1)},menuLinkVisibilityCheck:function(evt){var navWidth=this.$nav.width(),moreLinksWidth=this.$navMoreLinksLink.width(),spacingOffset=4,total=0;if(this.$navLinks.each(function(){total+=$(this).width()+spacingOffset}),total>navWidth){total=moreLinksWidth;var $_ref=this.$navMoreLinksContainer.empty();this.$navLinks.each(function(){total+=$(this).width()+spacingOffset,total>navWidth?($_ref.append($(this).clone().removeClass("site-nav__invisible")),$(this).addClass("site-nav__invisible").find("a").attr("tabindex","-1")):$(this).removeClass("site-nav__invisible").find("a").removeAttr("tabindex")}),this.$navMoreLinksLink.attr("role","menu"),this.$navMoreLinksContainer.find("a").removeAttr("tabindex"),this.$navMoreLinksLink.removeClass("site-nav__invisible"),this.$navMoreLinksLink.toggleClass("more-links--with-dropdown",this.$navMoreLinksLink.find(".small-dropdown:first, .mega-dropdown:first").length>0),this.$navMoreLinksLink.toggleClass("more-links--with-mega-dropdown",this.$navMoreLinksLink.find(".mega-dropdown:first").length>0),this.$navMoreLinksContainer.find(".small-dropdown").css("transform","")}else this.$navLinks.removeClass("site-nav__invisible"),this.$navMoreLinksLink.addClass("site-nav__invisible"),this.$navMoreLinksLink.removeAttr("role"),this.$navMoreLinksContainer.empty()},loginOpen:function(evt){evt.preventDefault(),theme.openPageContentInLightbox(theme.routes.account_login_url)},registerOpen:function(evt){evt.preventDefault(),theme.openPageContentInLightbox(theme.routes.account_register_url)},searchFormOpen:function(evt){evt.preventDefault(),evt.stopPropagation(),$("body").addClass("search-bar-open"),$('.search-bar:not(.mobile-menu-search):visible input[name="q"]',this.$container).focus(),this.functions.setSearchTabbing.bind(this)()},searchFormFocus:function(evt){$('.search-bar:visible input[name="q"]',this.$container).focus()},searchFormClose:function(evt){$("body").removeClass("search-bar-open search-bar-in-focus"),this.functions.setSearchTabbing.bind(this)(),evt&&evt.target&&$(evt.target).closest(".search-bar").prev("a").focus().blur()},searchFocusIn:function(evt){clearTimeout(this.searchFocusOutTimeout),$("body").addClass("search-bar-in-focus")},searchFocusOut:function(evt){this.searchFocusOutTimeout=setTimeout(function(){$("body").removeClass("search-bar-in-focus"),$(".search-bar").removeClass("search-bar--has-results")},100)},onFocusTintClick:function(evt){return this.functions.searchFormClose.bind(this)(),!1},mobileMenuOpen:function(evt){$(".header-navigation",this.$container).addClass("header-navigation--open"),$(document.body,this.$container).addClass("mobile-menu-open")},mobileMenuClose:function(evt){$(".header-navigation",this.$container).removeClass("header-navigation--open"),$(document.body,this.$container).removeClass("mobile-menu-open")},updateSearchResults:function(evt){var $form=$(evt.target).closest("form"),$bar=$form.closest(".search-bar"),searchUrl=$form.attr("action")+($form.attr("action").indexOf("?")>=0?"&":"?")+$form.serialize();if(searchUrl!=$form.data(this.search.searchUrlKey)){$form.data(this.search.searchUrlKey,searchUrl),this.functions._abortSearch.bind(this)();var term=$form.find('input[name="q"]').val();term.length<3?this.functions._searchResultsHide.bind(this)($bar):($bar.addClass(this.search.resultsLoadingClass),$bar.find(this.search.resultsSelector).html('<div class="search-result search-result--loading">'+this.search.loadingMessage+"</div>"),this.search.ongoingTimeoutId=setTimeout(this.functions._fetchResults.bind(this,$form,searchUrl,$bar),this.search.throttleMs))}},_abortSearch:function(){this.search.ongoingRequest&&this.search.ongoingRequest.abort(),clearTimeout(this.search.ongoingTimeoutId)},_fetchResults:function($searchForm,searchUrl,$bar){var ajaxUrl,ajaxData;theme.shopifyFeatures.predictiveSearch?(ajaxUrl=theme.routes.search_url+"/suggest.json",ajaxData={q:$searchForm.find('input[name="q"]').val(),resources:{type:$searchForm.find('input[name="type"]').val(),limit:6,options:{unavailable_products:"last"}}}):(ajaxUrl=$searchForm.attr("action")+"?"+$searchForm.serialize()+"&view=json",ajaxData=null),this.search.ongoingRequest=$.ajax({url:ajaxUrl,data:ajaxData,dataType:"json",success:this.functions._searchResultsSuccess.bind(this,$bar,searchUrl)}).fail(function($bar2,request){console.log("Error fetching results"),console.log(request),this.functions._searchResultsHide.bind(this,$bar2)}.bind(this,$bar)).always(function(){this.search.ongoingRequest=null}.bind(this))},_searchResultsSuccess:function($bar,searchUrl,response){$bar.addClass(this.search.resultsLoadedClass).removeClass(this.search.resultsLoadingClass);var $results=$("<div>"),showPrice=$bar.hasClass("live-search--show-price"),showVendor=$bar.hasClass("live-search--show-vendor");if(response.resources.results.products&&response.resources.results.products.length>0||response.resources.results.pages&&response.resources.results.pages.length>0||response.resources.results.articles&&response.resources.results.articles.length>0){if(response.resources.results.products)for(var i=0;i<response.resources.results.products.length;i++){var result=response.resources.results.products[i],$result=$('<a class="search-result">').attr("href",result.url),$titleAndPrice=$('<div class="search-result__title">').appendTo($result);if($('<div class="search-result__title search-result__title--product">').text(result.title).appendTo($titleAndPrice),showVendor&&$('<div class="search-result__vendor">
1').text(result.vendor).appendTo($titleAndPrice),showPrice){var $price=$('<div class="search-result__price product-price">').appendTo($titleAndPrice);parseFloat(result.price_min)!=parseFloat(result.price_max)&&$price.append($('<span class="product-price__from">').html(theme.strings.priceFrom)).append(" "),$('<span class="theme-money">').toggleClass("product-price__reduced",parseFloat(result.compare_at_price_min)>parseFloat(result.price_min)).html(theme.Shopify.formatMoney(result.price_min,theme.moneyFormat)).appendTo($price),parseFloat(result.compare_at_price_min)>parseFloat(result.price_min)&&$price.append(" ").append($('<span class="product-price__compare theme-money">').html(theme.Shopify.formatMoney(result.compare_at_price_min,theme.moneyFormat)))}var $thumb;result.image?$thumb=$('<span class="search-result__image">').append($('<img role="presentation" alt="">').attr("src",slate.Image.getSizedImageUrl(result.image,"100x100_crop_center"))):$thumb=$('<span class="search-result__image">').append($('<span class="search-result__char">').html(result.title[0])),$result.prepend($thumb).appendTo($results)}if(response.resources.results.articles)for(var i=0;i<response.resources.results.articles.length;i++){var result=response.resources.results.articles[i],$result=$('<a class="search-result">').attr("href",result.url).append($('<span class="search-result__title">').text(result.title)),$thumb;result.image?$thumb=$('<span class="search-result__image">').append($('<img role="presentation" alt="">').attr("src",slate.Image.getSizedImageUrl(result.image,"100x100_crop_center"))):$thumb=$('<span class="search-result__image">').append($('<span class="search-result__char">').html(result.title[0])),$result.prepend($thumb).appendTo($results)}if(response.resources.results.pages)for(var i=0;i<response.resources.results.pages.length;i++){var result=response.resources.results.pages[i],$result=$('<a class="search-result">').attr("href",result.url).append($('<span class="search-result__title">').text(result.title)),$thumb=$('<span class="search-result__image">').append($('<span class="search-result__char">').html(result.title[0]));$result.prepend($thumb).appendTo($results)}$('<a class="search-result search-result--more">').attr("href",searchUrl).html(this.search.moreResultsMessage).appendTo($results)}else $results.append('<div class="search-result search-result--empty">'+this.search.emptyMessage+"</div>");$bar.find(this.search.resultsSelector).html($results)},_searchResultsHide:function($bar){$bar.removeClass(this.search.resultsLoadedClass).removeClass(this.search.resultsLoadingClass).find(this.search.resultsSelector).empty()},dockedNavCheck:function(evt){var scrollTop=$(window).scrollTop(),desktopShouldDock=$(window).width()>=theme.dockedNavDesktopMinWidth&&this.$dockedDesktopBaseContainer.offset().top<scrollTop,mobileShouldDock=$(window).width()<theme.dockedNavDesktopMinWidth&&this.$dockedMobileBaseContainer.offset().top<scrollTop;desktopShouldDock?this.$dockedDesktopBaseContainer.css("height",this.$dockedDesktopContentsContainer.outerHeight()):this.desktopHeaderWasDocked&&this.$dockedDesktopBaseContainer.css("height",""),mobileShouldDock?this.$dockedMobileBaseContainer.css("height",this.$dockedMobileContentsContainer.outerHeight()):this.mobileHeaderWasDocked&&this.$dockedMobileBaseContainer.css("height",""),this.$container.toggleClass("docked-header--dock",desktopShouldDock||mobileShouldDock),desktopShouldDock!=this.desktopHeaderWasDocked&&this.functions.menuLinkVisibilityCheck.bind(this)(),this.desktopHeaderWasDocked=desktopShouldDock,this.mobileHeaderWasDocked=mobileShouldDock},updateDockedNavHeightStyle:function(){var productStickyTop=theme.dockedNavHeight()+30;$("#themeDockedNavStyle").html("@media (min-width:768px){.sticky-element{top:"+theme.dockedNavHeight()+"px;} .product-detail__detail.sticky-element{top:"+productStickyTop+"px;}}")}},this.onSectionUnload=function(){this.$container.off(this.namespace),$(".focus-tint").off(this.namespace),$(window).off(this.namespace),$(".js-messages-slider",this.$container).slick("unslick"),$(".js-mobile-messages-slider",this.$container).slick("unslick"),$("#themeDockedNav
1Style").remove(),$(".disclosure",this.$container).each(function(){$(this).data("disclosure").unload()})}},theme.Footer=new function(){this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$stickyFooter=$(".sticky-footer",container),$("body").removeClass("sticky-footer-not-visible sticky-footer-partly-visible sticky-footer-fully-visible sticky-footer-taller-than-page sticky-footer-scrolled-into"),this.$stickyFooter.length?(this.functions.stickyResize.bind(this)(),this.functions.stickyScroll.bind(this)(),$(window).on("debouncedresize"+this.namespace,this.functions.stickyResize.bind(this)),$(window).on("scroll"+this.namespace,this.functions.stickyScroll.bind(this))):(this.$footerInner=this.$container.find(".page-footer__inner "),this.functions.pushDown.call(this),$(window).on("debouncedresize"+this.namespace,this.functions.pushDown.bind(this))),$(".disclosure",this.$container).each(function(){$(this).data("disclosure",new theme.Disclosure($(this)))})},this.functions={pushDown:function(){var gap=$(window).height()-(this.$container.offset().top+this.$footerInner.outerHeight());gap>0?this.$container.css("padding-top",gap):this.$container.css("padding-top","")},stickyScroll:function(){$("body").toggleClass("sticky-footer-scrolled-into",$(window).scrollTop()>this.$container.offset().top)},stickyResize:function(){var footerHeight=this.$stickyFooter.outerHeight(),footerOffsetTop=this.$container.offset().top,partlyVisible=footerOffsetTop<$(window).height(),fullyVisible=footerOffsetTop+footerHeight<$(window).height(),tallerThanPage=footerHeight>$(window).height();$("body").toggleClass("sticky-footer-not-visible",!partlyVisible),$("body").toggleClass("sticky-footer-partly-visible",partlyVisible&&!fullyVisible),$("body").toggleClass("sticky-footer-fully-visible",fullyVisible),$("body").toggleClass("sticky-footer-taller-than-page",tallerThanPage),this.$container.css("min-height",footerHeight)}},this.onSectionUnload=function(){$(window).off(this.namespace),$(".disclosure",this.$container).each(function(){$(this).data("disclosure").unload()})}}
1,theme.Product=new function(){var selectors=$.extend({},theme.variants.selectors,{productJson:"[data-product-json]",productMediaContainer:".product-detail__images",productMedia:"[data-product-media]",productImages:"[data-product-image]",productMediaThumbnails:"[data-product-media-thumbnail]",singleOptionSelector:"[data-single-option-selector]",skuWrapper:".sku-wrapper",sku:".sku-wrapper__sku",styledSelect:".selector-wrapper select",quantitySelect:".quantity-proxy",storeAvailability:"[data-store-availability-container]"});this.onSectionLoad=function(container){if(this.$container=$(container),this.namespace=theme.namespaceFromSection(container),$(selectors.storeAvailability,container).length&&(this.storeAvailability=new theme.StoreAvailability($(selectors.storeAvailability,container)[0])),!!$(selectors.productJson,this.$container).html()){var sectionId=this.$container.attr("data-section-id");this.productSingleObject=JSON.parse($(selectors.productJson,this.$container).html());var options={$container:this.$container,enableHistoryState:this.$container.data("enable-history-state")||!1,singleOptionSelector:selectors.singleOptionSelector,originalSelectorId:selectors.originalSelectorId,secondaryIdSelectors:selectors.secondaryIdSelectors,product:this.productSingleObject};this.settings={},this.settings.imageSize="master",this.variants=new slate.Variants(options),this.$productMediaContainer=$(selectors.productMediaContainer,this.$container),this.$productMedia=$(selectors.productMedia,this.$container),this.$productImages=$(selectors.productImages,this.$container),this.$productMediaThumbnails=$(selectors.productMediaThumbnails,this.$container),this.$container.on("variantChange"+this.namespace,theme.variants.updateAddToCartState.bind(this)),this.$container.on("variantPriceChange"+this.namespace,theme.variants.updateProductPrices.bind(this)),this.$container.find(selectors.skuWrapper)&&this.$container.on("variantChange"+this.namespace,this.functions.updateSKU.bind(this)),this.$productMediaThumbnails.length?(this.$productMedia.length>1&&(this.$container.on("click"+this.namespace,selectors.productMediaThumbnails,this.functions.updatePrimaryProductMediaFromThumbnailClick.bind(this)),this.$container.on("variantImageChange"+this.namespace,this.functions.updateProductMediaSlideshowFromVariantChange.bind(this))),this.$container.on("click"+this.namespace,selectors.productImages,this.functions.openGallery.bind(this))):(this.$productMedia.length>1&&(this.$container.on("variantImageChange"+this.namespace,this.functions.updateProductMediaColumn.bind(this)),$(document).on("click"+this.namespace+" keydown"+this.namespace,function(){this.$productMedia.not(".variant-dim--fixed").removeClass("variant-dim")}.bind(this)),$(window).on("scroll"+this.namespace+" ontouchstart"+this.namespace,function(){this.$productMedia.not(".variant-dim--fixed").removeClass("variant-dim")}.bind(this)),$(window).on("scroll"+this.namespace,this.functions.notifyMediaOfVisibilityInColumn.bind(this)),this.functions.notifyMediaOfVisibilityInColumn.bind(this)()),this.$container.on("click"+this.namespace,selectors.productImages,this.functions.openGallery.bind(this))),this.mediaSlideshowActive=!1,$(window).on("debouncedresize"+this.namespace,this.functions.assessMediaSlideshow.bind(this)),this.functions.assessMediaSlideshow.bind(this)(),theme.ProductMedia.init(this.$container,{onPlyrInit:function(playerObj){var $slideshow2=$(playerObj.element).closest(".slick-initialized");$slideshow2.length&&theme.productGallerySlideshowTabFix($slideshow2.slick("getSlick").$slides,$slideshow2.slick("getSlick").currentSlide)},onYoutubeInit:function(playerObj){var $slideshow2=$(playerObj.element).closest(".slick-initialized");$slideshow2.length&&theme.productGallerySlideshowTabFix($slideshow2.slick("getSlick").$slides,$slideshow2.slick("getSlick").currentSlide)},onModelViewerInit:function(playerObj){var $slideshow2=$(playerObj.element).closest(".slick-initialized");$slideshow2.length&&theme.productGallerySlideshowTabFix($slideshow2.slick("getSlick").$slides,$slideshow2.slick("getSlick").currentSlide)}}),this.$container.find(".product-media").trigger("mediaVisibleInitial"),theme.styleVariantSelectors($(selectors.styledSelect,container),options.product),this.variants.product.variants.length>1&&$(window).trigger("cc-variant-updated",{variant:this.variants.currentVariant,product:this.productSingleObject}),theme.select2.init($(selectors.quantitySelect,container)),this.$container.on("click",".js-size-chart-open",function(e){e.preventDefault(),$("body").addClass("size-chart-is-open")}),this.$container.on("click",".js-size-chart-close",function(){$("body").removeClass("size-chart-is-open")}),theme.initAjaxAddToCartForm($("form.ajax-product-form",this.$container)),theme.asse
1ssRTEImagesOnLoad(this.$container)}},this.functions={updateSKU:function(evt){var variant=evt.variant;variant&&variant.sku?($(selectors.skuWrapper,this.$container).removeClass("sku-wrapper--empty"),$(selectors.sku,this.$container).html(variant.sku)):($(selectors.skuWrapper,this.$container).addClass("sku-wrapper--empty"),$(selectors.sku,this.$container).empty())},notifyMediaOfVisibilityInColumn:function(){var viewportTop=$(window).scrollTop(),viewportBottom=viewportTop+$(window).height();$(".product-media",this.$container).each(function(){var mediaTop=$(this).offset().top,mediaBottom=mediaTop+$(this).outerHeight();mediaTop>viewportTop&&mediaTop<viewportBottom||mediaBottom>viewportTop&&mediaBottom<viewportBottom?$(this).hasClass("product-media--on-screen")||($(this).addClass("product-media--on-screen"),$(this).is(".product-media--model:not(.product-media--model-loaded)")&&$(this).trigger("mediaVisibleInitial")):$(this).hasClass("product-media--on-screen")&&$(this).removeClass("product-media--on-screen").trigger("mediaHidden")})},_updatePrimaryProductMediaFromThumbnail:function($mediaWithId){var index=this.$productMedia.filter('[data-media-id="'+$mediaWithId.data("media-id")+'"]').closest(".slick-slide").data("slick-index");this.$productMediaContainer.slick("slickGoTo",index)},updatePrimaryProductMediaFromThumbnailClick:function(evt){evt.preventDefault(),this.functions._updatePrimaryProductMediaFromThumbnail.bind(this)($(evt.currentTarget))},updateProductMediaSlideshowFromVariantChange:function(evt){var variant=evt.variant,$found=this.$productMedia.filter(function(){return $(this).data("media-id")==variant.featured_media.id});$found.length==1&&this.functions._updatePrimaryProductMediaFromThumbnail.bind(this)($found)},updateProductMediaColumn:function(evt){var variant=evt.variant,$found=this.$productMedia.filter(function(){return $(this).data("media-id")==variant.featured_media.id});$found.length==1&&(this.$productMediaContainer.hasClass("slick-slider")?this.functions._updatePrimaryProductMediaFromThumbnail.bind(this)($found):(clearTimeout(this.variantScrollTimeoutId),this.variantScrollTimeoutId=setTimeout(function(){var desiredScrollTop=$found.offset().top-theme.dockedNavHeight(),$cont=$found.closest(".product-detail"),maxScrollTop=$cont.offset().top+$cont.height()-$cont.find(".product-detail__detail").outerHeight()-20;$("html,body").animate({scrollTop:Math.min(desiredScrollTop,maxScrollTop)},500,function(){$found.removeClass("variant-dim"),this.$productImages.not($found).addClass("variant-dim variant-dim--fixed"),setTimeout(function(){$(".variant-dim--fixed").removeClass("variant-dim--fixed")},500)}.bind(this))}.bind(this),25)))},assessMediaSlideshow:function(evt){var windowWidth=$(window).width(),count=!1;this.$productMediaContainer.children().length>1&&(count=!0);var wantSlideshow=windowWidth<768||$(".product-detail__thumbnails").length;if(wantSlideshow){if(!this.mediaSlideshowActive){var initialSlide=0,fmid=this.$productMediaContainer.data("featured-media-id");this.$productMediaContainer.data("featured-media-id",null),initialSlide=this.$productMediaContainer.find('[data-media-id="'+fmid+'"]').parent().index();var $slideshow2=this.$productMediaContainer.slick({infinite:!1,fade:!0,arrows:!1,dots:!1,adaptiveHeight:!0,prevArrow:theme.icons.slideshowPrevArrow,nextArrow:theme.icons.slideshowNextArrow,appendArrows:$(".slick-external-controls .slick-arrows",this.$container),appendDots:$(".slick-external-controls .slick-dots",this.$container),initialSlide:initialSlide,responsive:[{breakpoint:767,settings:{fade:!1,arrows:!0,dots:count}}]});$slideshow2.find(".product-media").trigger("mediaVisibleInitial"),$slideshow2.on("afterChange",function(evt2,slick,current){var $currentMedia=$(".product-media",slick.$slides[current]);$(".product-media").not($currentMedia).trigger("mediaHidden"),$currentMedia.trigger("mediaVisible");var $currentSlideLink=$("[data-product-image]",slick.$slides[current]);$('.product-detail__thumbnail[data-media-id="'+$currentSlideLink.data("media-id")+'"]').addClass("thumb-active").siblings().removeClass("thumb-active"),theme.productGallerySlideshowTabFix(slick.$slides,current),$(this).closest(".quickbuy-container").trigger("changedsize")}),theme.productGallerySlideshowTabFix($slideshow2.slick("getSlick").$slides,$slideshow2.slick("getSlick").currentSlide),this.mediaSlideshowActive=!0}}else this.mediaSlideshowActive&&(this.$productMediaContainer.slick("unslick"),this.mediaSlideshowActive=!1)},openGallery:function(evt){evt.preventDefault();var pswpElement=document.querySelectorAll(".pswp")[0],items=[];this.$productImages.each(function(index){$(this).data("image-index",index);var item={src:$(this).attr("href"),w:$(this).data("image-w"),h:$(this).data("image-h")},img=$(this).find("img")[0];typeof img.currentSrc!="undefined"&&(item.msrc=img.currentSrc),items.push(item)});var options={history:!1,captionEl:!1,shareEl:!1,fullscreenEl:!1};options.index=$(evt.target).closest("a").data("image-index"),options.getThumbBoundsFn=function(index){var thumbnail=this.$productImages[index].getElementsByTagName("img")[0],pageYScroll=window.pageYOffset||document.documentElement.scrollTop,rect=thumbnail.getBoundingClientRect();return{x:rect.left,y:rect.top+pageYScroll,w:rect.width}}.bind(this),this.imageGallery=new PhotoSwipe(pswpElement,PhotoSwipeUI_Default,items,options),this.imageGallery.init(),this.imageGallery.listen("destroy",function(){this.imageGallery=null}.bind(this));var _this=this;this.imageGallery.listen("afterChange",function(){var currentSrc=this.currItem.src,$currentThumb=_this.$productImages.filter(function(){return $(this).attr("href")==currentSrc});_this.functions._updatePrimaryProductMediaFromThumbnail.bind(_this)($currentThumb)})}},this.onSectionUnload=function(){this.$container.off(this.namespace),$(document).off(this.namespace),$(window).off(this.namespace),this.imageGallery&&this.imageGallery.close(),this.storeAvailability&&this.storeAvailability.onSectionUnload(),theme.ProductMedia.destroy(this.$container),this.$container.find(".slick-initialized").slick("unslick").off("afterChange"),this.$container.find(".clickybox-replaced").clickyBoxes("destroy"),theme.unloadAjaxAddToCartForm($("form.ajax-product-form",this.$container))}},theme.Blog=new function(){var selectors={header:".featured-blog__header, .blog-featured-image",headerImage:".featured-blog__header-image, .blog-image",slideshow:".js-content-products-slider .grid"},breakpoint=768,resizeTimer;this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$header=$(selectors.header,this.$container),this.$headerImage=$(selectors.headerImage,this.$container),$(".js-content-products-slider .grid",this.$container).each(function(index,value){theme.peekCarou
1sel.init(this.$container,$(value),this.namespace,function(){return!0},!1,{infinite:!1,slidesToShow:3,slidesToScroll:1,swipeToSlide:!0,dots:!1,prevArrow:$(value).closest(".content-products").find(".content-products-controls .prev"),nextArrow:$(value).closest(".content-products").find(".content-products-controls .next"),responsive:[{breakpoint:$(".single-column-layout",this.$container).length?768:960,settings:{slidesToShow:1}}]}),theme.initUniformHeightMonitor($(value),".product-block__image-container",".product-block__image-container .image-one")}.bind(this)),this.functions.assessSection.bind(this)(),$(window).on("debouncedresize"+this.namespace,this.functions.assessSection.bind(this))},this.functions={assessSection:function(evt){var windowWidth=$(window).width();if(windowWidth<768)this.$headerImage.css("height","");else{var headerPadding=parseInt(this.$header.css("padding-top"));this.$headerImage.css("height",$(window).height()-headerPadding*2-theme.dockedNavHeight())}}},this.onSectionUnload=function(container){this.$container.off(this.namespace),$(window).off(this.namespace),theme.destroyUniformHeightMonitor($(".js-content-products-slider .grid",this.$container)),theme.peekCarousel.destroy(this.$container,$(".js-content-products-slider .grid",this.$container),this.namespace)}},theme.Article=new function(){var selectors={slideshow:".js-content-products-slider .grid"};this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container);var rteWidth=$(".template-article .rte").width();$(selectors.slideshow,this.$container).each(function(index,value){theme.peekCarousel.init(this.$container,$(value),this.namespace,function(){return!0},!1,{infinite:!1,slidesToShow:3,slidesToScroll:1,swipeToSlide:!0,dots:!1,prevArrow:$(value).closest(".content-products").find(".content-products-controls .prev"),nextArrow:$(value).closest(".content-products").find(".content-products-controls .next"),responsive:[{breakpoint:$(".single-column-layout",this.$container).length?768:960,settings:{slidesToShow:1}}]}),theme.initUniformHeightMonitor($(value),".product-block__image-container",".product-block__image-container .image-one")}.bind(this)),theme.assessRTEImagesOnLoad(this.$container)},this.onSectionUnload=function(){this.$container.off(this.namespace),$(window).off(this.namespace),theme.destroyUniformHeightMonitor($(selectors.slideshow,this.$container)),theme.peekCarousel.destroy(this.$container,$(selectors.slideshow,this.$container),this.namespace)}},theme.Slideshow=new function(){this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$slideshow=$(".js-slideshow-section",this.$container);var count=!1;if(this.$slideshow.children().length>1)var count=!0;this.$slideshow.slick({infinite:!0,slidesToShow:1,slidesToScroll:1,dots:count,adaptiveHeight:!1,autoplay:this.$slideshow.data("autoplay"),autoplaySpeed:this.$slideshow.data("autoplayspeed"),prevArrow:$(".full-width-slideshow-controls .prev",this.$container),nextArrow:$(".full-width-slideshow-controls .next",this.$container)}),$(window).on("debouncedresize"+this.namespace,this.functions.onResize.bind(this)),theme.checkOverlaps&&theme.checkOverlaps()},this.functions={onResize:function(evt){this.$slideshow.slick("setPosition")}},this.onBlockSelect=function(block){this.$slideshow.slick("slickGoTo",$(block).data("slick-index"),!0).slick("slickPause")},this.onBlockDeselect=function(block){this.$slideshow.slick("slickPlay")},this.onSectionUnload=function(){this.$container.off(this.namespace),$(window).off(this.namespace),this.$slideshow.slick("unslick")}},theme.Banner=new function(){this.onSectionLoad=theme.Slideshow.onSectionLoad,this.onSectionUnload=theme.Slideshow.onSectionUnload,this.onBlockSelect=theme.Slideshow.onBlockSelect,this.onBlockDeselect=theme.Slideshow.onBlockDeselect,this.functions=theme.Slideshow.functions},theme.StandoutCollection=new function(){this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),theme.peekCarou
1sel.init(this.$container,$(".js-standout-collection-slider",this.$container),this.namespace,function(){return!0},!1,{infinite:!1,slidesToShow:1,slidesToScroll:1,dots:!1,prevArrow:$(".standout-collection-slider__controls .prev",this.$container),nextArrow:$(".standout-collection-slider__controls .next",this.$container)})},this.onSectionUnload=function(){this.$container.off(this.namespace),theme.peekCarousel.destroy(this.$container,$(".js-standout-collection-slider",this.$container),this.namespace)}},theme.GetTheLook=new function(){var selectors={header:".get-the-look__image-container",headerImage:".get-the-look__image-container .placeholder-svg, .get-the-look__image-container .rimage-background",slideshow:".js-get-the-look-slider",product:".get-the-look__product:first"},breakpoint=768,resizeTimer;this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$header=$(selectors.header,this.$container),this.$headerImage=$(selectors.headerImage,this.$container),this.$slideshow=$(selectors.slideshow,this.$container),this.$firstProduct=$(selectors.product,this.$container),theme.peekCarousel.init(this.$container,this.$slideshow,this.namespace,function(){return this.$firstProduct.length&&parseInt(this.$firstProduct.css("margin-right"))==0}.bind(this)),this.functions.assessSection.bind(this)(),$(window).on("debouncedresize"+this.namespace,this.functions.assessSection.bind(this))},this.functions={assessSection:function(evt){if(this.$firstProduct.length&&parseInt(this.$firstProduct.css("margin-right"))==0)this.$headerImage.css("height","");else{var headerPadding=parseInt(this.$header.css("margin-top"));this.$headerImage.css("height",$(window).height()-headerPadding*2-theme.dockedNavHeight())}}},this.onSectionUnload=function(){this.$container.off(this.namespace),$(window).off(this.namespace),theme.peekCarousel.destroy(this.$container,this.$slideshow,this.namespace)}},theme.PromotionalImages=new function(){this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),$(this.functions.assessSection.call(this)),$(window).on("debouncedresize"+this.namespace,this.functions.assessSection.bind(this))},this.functions={assessSection:function(evt){$(window).width()>=768?$(".promotional-row").each(function(){var tallest=0;$(this).find(".text_over_image .promotional-row__content").each(function(){var thisHeight=$(this).outerHeight()+60;thisHeight>tallest&&(tallest=thisHeight)}),$(this).find(".text_over_image").css("min-height",tallest)}):$(".promotional-row .text_over_image").css("min-height","")}},this.onSectionUnload=function(){this.$container.off(this.namespace),$(window).off(this.namespace)}},theme.FeaturedCollection=new function(){var selectors={slideshow:"[data-carousel-enabled]"},breakpoint=768,resizeTimer;this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$slideshow=$(selectors.slideshow,this.$container),this.$slideshow.each(function(index,value){theme.peekCarousel.init(this.$container,$(value),this.namespace,function(){return!0},!1,{infinite:!1,slidesToShow:this.$slideshow.data("slides-per-row"),slidesToScroll:1,swipeToSlide:!0,dots:!1,prevArrow:$(".featured-collection-controls .prev",this.$container),nextArrow:$(".featured-collection-controls .next",this.$container),responsive:[{breakpoint:breakpoint,settings:{slidesToShow:1,nextArrow:!1,prevArrow:!1}}]})}.bind(this)),theme.initUniformHeightMonitor(this.$container,".product-block__image-container",".product-block__image-container .image-one")},this.onSectionUnload=function(){this.$container.off(this.namespace),theme.destroyUniformHeightMonitor(this.$container),theme.peekCarousel.destroy(this.$container,this.$slideshow,this.namespace)}},theme.ListCollections=new function(){this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),theme.assessRTEImagesOnLoad(this.$container),$(".js-list-collection-slider",this.$container).each(function(index,value){theme.peekCarou
1sel.init(this.$container,$(value),this.namespace,function(){return!0},!1,{infinite:!0,slidesToShow:1,slidesToScroll:1,dots:!1,prevArrow:$(value).siblings(".standout-collection-slider__controls").children(".prev"),nextArrow:$(value).siblings(".standout-collection-slider__controls").children(".next"),responsive:[{breakpoint:768,settings:{slidesToShow:1}}]})}.bind(this))},this.onSectionUnload=function(){this.$container.off(this.namespace),theme.peekCarousel.destroy(this.$container,$(".js-list-collection-slider",this.$container),this.namespace)}},theme.CollectionTemplate=new function(){this.onSectionLoad=function(){this.productList=document.querySelector(".cc-product-list"),theme.initUniformHeightMonitor(this.productList,".product-block__image-container",".product-block__image-container .image-one")},this.onSectionUnload=function(){theme.destroyUniformHeightMonitor(this.productList)}},theme.Cart=new function(){this.onSectionLoad=function(container){if(this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$container.on("click"+this.namespace,".js-shipping-calculator-trigger",function(){var $this=$(this),$parent=$this.parents(".shipping-calculator-container");$parent.toggleClass("calculator-open"),$parent.hasClass("calculator-open")?($this.html(theme.strings.cart_shipping_calculator_hide_calculator),$parent.children(".shipping-calculator").slideDown(250)):($this.html(theme.strings.cart_shipping_calculator_title),$parent.children(".shipping-calculator").slideUp(250))}),this.$container.on("click"+this.namespace,".js-cart-notes-trigger",function(){var $this=$(this),$parent=$this.parent(".cart-notes-container");$parent.toggleClass("notes-open"),$parent.hasClass("notes-open")?($this.html(theme.strings.cart_general_hide_note),$parent.children(".cart-notes").slideDown(250)):($this.html(theme.strings.cart_general_show_note),$parent.children(".cart-notes").slideUp(250))}),theme.cartNoteMonitor.load($('.cart-notes [name="note"]',this.$container)),this.$container.data("ajax-update")){var updateCartFunction=this.functions.updateCart.bind(this);this.$container.on("keyup"+this.namespace+" change"+this.namespace,".quantity__change input",function(){if(!($(this).data("initial-value")&&$(this).data("initial-value")==$(this).val())&&!($(this).val().length==0||$(this).val()=="0")){var inputId=$(this).attr("id");updateCartFunction({line:$(this).data("line"),quantity:$(this).val()},function(){$("#"+inputId).focus()}),$(this).data("previousValue",$(this).val())}}),this.$container.on("click"+this.namespace,".quantity__minus, .quantity__plus",function(e){var $input=$(this).closest(".quantity__change").find(".quantity__number");return $(this).hasClass("quantity__minus")?$input.val(parseInt($input.val())-1).trigger("change"):$input.val(parseInt($input.val())+1).trigger("change"),!1})}this.$container.on("focusin"+this.namespace+" click"+this.namespace,"input.quantity__number",function(){$(this).select()}).on("mouseup"+this.namespace,"input.quantity__number",function(e){e.preventDefault()}),$("#terms",container).length>0&&$(document).on("click"+this.namespace,'[name="checkout"], a[href*="/checkout"]',function(){if($("#terms:checked").length==0)return alert(theme.strings.cartTermsNotChecked),!1}),this.$recentlyViewed=$(".recently-viewed",this.$container),this.$recentlyViewed.length&&(this.functions.loadRecentlyViewed.bind(this)(),theme.loadRecentlyViewed(this.$recentlyViewed))},this.functions={loadRecentlyViewed:function(evt){if(theme.storageAvailable("localStorage")){var recentDisplayCount=6,existingArr=theme.getRecentProducts();if(existingArr.length){var handlesToExcludeValue=this.$recentlyViewed.data("exclude"),handlesToExclude=[];handlesToExcludeValue.length&&(handlesToExclude=handlesToExcludeValue.split(","));for(var $recentlyViewedBucket=this.$recentlyViewed.find(".grid"),count=0,iterator=0,showVendor=this.$recentlyViewed.data("show-vendor"),showHoverImage=this.$recentlyViewed.data("show-hover-image");count<recentDisplayCount&&iterator<existingArr.length;){for(var showThis=!0,i=0;i<handlesToExclude.length;i++)if(existingArr[iterator].handle==handlesToExclude[i]){showThis=!1;break}showThis&&(count++,theme.addRecentProduct(existingArr,iterator,$recentlyViewedBucket,showHoverImage,showVendor)),iterator++}count>0&&this.$recentlyViewed.removeClass("hidden")}}},updateCart:function(params,successCallback){var _=this;_.cartXhr&&_.cartXhr.abort(),_.cartRefreshXhr&&_.cartRefreshXhr.abort(),_.cartXhr=$.ajax({type:"POST",url:theme.routes.cart_
1change_url+".js",data:params,dataType:"json",success:function(data){_.cartRefreshXhr&&_.cartRefreshXhr.abort(),_.cartRefreshXhr=$.ajax({type:"GET",url:theme.routes.cart_url+"?sections=main-cart",success:function(data2){var toReplace=[".cart-items",".subtotal-row"],$newDom=$(data2["main-cart"]);$newDom.find(".fade-in").removeClass("fade-in");for(var i=0;i<toReplace.length;i++)$('[data-section-type="cart"] '+toReplace[i]).html($newDom.find(toReplace[i]).html());successCallback()},error:function(data2){data2.statusText!="abort"&&(console.log("Error refreshing page"),console.log(data2))},complete:function(){_.cartRefreshXhr=null}})},error:function(data){console.log("Error processing update"),console.log(data)}})}},this.onSectionUnload=function(){this.$container.off(this.namespace),$(document).off(this.namespace),this.$recentlyViewed.length&&theme.unloadRecentlyViewed(this.$recentlyViewed),theme.cartNoteMonitor.unload($('.cart-notes [name="note"]',this.$container))}},theme.ImageWithText=new function(){this.onSectionLoad=function(container){this.namespace=theme.namespaceFromSection(container),this.$container=$(container),this.$imageContainer=$(".image-with-text__image",container),this.$image=$(".image-with-text__image .rimage__image",container),this.$text=$(".image-with-text__content",container);function assessImage(evt){var imageRatio=this.$image.height()/this.$image.width(),imageHeightWithoutInset=this.$imageContainer.outerWidth()*imageRatio;this.$imageContainer.toggleClass("image-with-text__image--inset",imageHeightWithoutInset<this.$text.outerHeight())}$(window).on("debouncedresize"+this.namespace,assessImage.bind(this)),$(assessImage.call(this))},this.onSectionUnload=function(){$(window).off(this.namespace)}},theme.FeaturedProduct=new function(){this.onSectionLoad=function(container){this.namespace=theme.namespaceFromSection(container),this.$container=$(container),this.$row=$(".featured-product-section",container),this.$imageOuterContainer=$(".featured-product-image",container),this.$mediaContainer=$(".featured-product-image-link, .product-media-wrapper",container),this.$media=$(".product-media",container),this.$media.length&&theme.ProductMedia.init(this.$container),$(window).on("debouncedresize"+this.namespace,this.functions.assessInset.bind(this)),$(this.functions.assessInset.call(this))},this.functions={assessInset:function(evt){var imageRatio=this.$mediaContainer.height()/this.$mediaContainer.width(),imageHeightWithoutInset=Math.round(this.$imageOuterContainer.outerWidth()*imageRatio);this.$imageOuterContainer.toggleClass("featured-product-image--inset",imageHeightWithoutInset<this.$row.height())}},this.onSectionUnload=function(){this.$media.length&&theme.ProductMedia.destroy(this.$container),$(window).off(this.namespace)}},theme.RecentlyViewed=new function(){var selectors={recentlyViewed:".recently-viewed"};this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$recentlyViewed=$(selectors.recentlyViewed,this.$container),this.$recentlyViewed.length&&(this.functions.loadRecentlyViewed.bind(this)(),theme.loadRecentlyViewed(this.$recentlyViewed))},this.functions={loadRecentlyViewed:function(evt){if(theme.storageAvailable("localStorage")){var recentDisplayCount=6,recentProductData={handle:this.$recentlyViewed.data("handle"),url:this.$recentlyViewed.data("url").split("?")[0],title:this.$recentlyViewed.data("title"),vendor:this.$recentlyViewed.data("vendor"),available:this.$recentlyViewed.data("available"),image:this.$recentlyViewed.data("image"),image2:this.$recentlyViewed.data("image2"),price:this.$recentlyViewed.data("price"),priceVaries:this.$recentlyViewed.data("price-varies"),compareAtPrice:this.$recentlyViewed.data("price-compare")};this.$recentlyViewed.data("unit-price-price")&&(recentProductData.unitPrice=this.$recentlyViewed.data("unit-price-price"),recentProductData.unitPriceUnit=this.$recentlyViewed.data("unit-price-unit"));var existingArr=theme.addToAndReturnRecentProducts(recentProductData);if(existingArr.length>1)for(var $recentlyViewedBucket=this.$recentlyViewed.removeClass("hidden").find(".grid"),showVendor=this.$recentlyViewed.data("show-vendor"),showHoverImage=this.$recentlyViewed.data("show-hover-image"),rangeStart=Math.max(0,existingArr.length-recentDisplayCount-1),rangeEnd=existingArr.length-1,i=rangeStart;i<rangeEnd;i++)theme.addRecentProduct(existingArr,i,$recentlyViewedBucket,showHoverImage,showVendor)}}},this.onSectionUnload=function(){this.$recentlyViewed.length&&theme.unloadRecentlyViewed(this.$recentlyViewed)}},theme.SearchTemplate=new function(){var selectors={productsContainer:".search-results-list"};this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$productsContainer=$(selectors.productsContainer,container),theme.initUniformHeightMonitor(this.$productsContainer,".product-block__image-container",".product-block__image-container .image-one")},this.onSectionUnload=function(){this.$container.off(this.namespace),$(window).off(this.namespace),theme.destroyUniformHeightMonitor(this.$productsContainer)}},theme.Testimonials=new function(){this.onSectionLoad=function(container){this.$container=$(container),this.namespace=theme.namespaceFromSection(container),this.$slideshow=$(".js-testimonials-section",this.$container);var breakpoint=768,count=!1;if(this.$slideshow.children().length>2)var count=!0;if(this.$slideshow.children().length>1)var mobileCount=!0;this.$slideshow.slick({infinite:!0,slidesToShow:2,slidesToScroll:1,dots:count,adaptiveHeight:!1,autoplay:this.$slideshow.data("autoplay"),autoplaySpeed:this.$slideshow.data("autoplayspeed"),arrows:!1,responsive:[{breakpoint:breakpoint,settings:{slidesToShow:1,dots:mobileCount}}]}),$(window).on("debouncedresize"+this.namespace,this.functions.onResize.bind(this))},this.functions={onResize:function(evt){this.$slideshow.slick("setPosition")}},this.onBlockSelect=function(block){this.$slideshow.slick("slickGoTo",$(block).data("slick-index"),!0).slick("slickPause")},this.onBlockDeselect=function(block){this.$slideshow.slick("slickPlay")},this.onSectionUnload=function(){this.$container.off(this.namespace),$(window).off(this.namespace),this.$slideshow.slick("unslick")}},theme.Gallery=new function(){var selectors={slideshow:".gallery--mobile-carou
1sel"},breakpoint=768,resizeTimer;this.onSectionLoad=function(container){if(this.$container=$(container),this.namespace=theme.namespaceFromSection(container),$slideshow=$(selectors.slideshow,this.$container),$slideshow.length){var assessCarouselFunction=function(){var isCarousel=$slideshow.hasClass("slick-slider"),shouldShowCarousel=$(window).width()<breakpoint;if(shouldShowCarousel||$(".lazyload--manual",$slideshow).removeClass("lazyload--manual").addClass("lazyload"),isCarousel&&!shouldShowCarousel){$slideshow.slick("unslick").off("init"),$slideshow.find("a, .gallery__item").removeAttr("tabindex").removeAttr("role");var rowLimit=$slideshow.data("grid"),$currentRow=null;$slideshow.find(".gallery__item").each(function(index){index%rowLimit===0&&($currentRow=$('<div class="gallery__row">').appendTo($slideshow)),$(this).appendTo($currentRow)})}else!isCarousel&&shouldShowCarousel&&($slideshow.find(".gallery__item").appendTo($slideshow),$slideshow.find(".gallery__row").remove(),$slideshow.on("init",function(){$(".lazyload--manual",this).removeClass("lazyload--manual").addClass("lazyload")}).slick({autoplay:!1,fade:!1,infinite:!0,useTransform:!0,dots:!0,prevArrow:$(".gallery-slideshow-controls .prev",this.$container),nextArrow:$(".gallery-slideshow-controls .next",this.$container)}))};assessCarouselFunction(),$(window).on("debouncedresize.themeSection"+this.$container,assessCarouselFunction)}},this.onSectionUnload=function(){this.$container.off(this.namespace),$(window).off(this.namespace),$(".slick-slider",this.$container).each(function(){$(this).slick("unslick").off("init")})},this.onBlockSelect=function(block){$(block).closest(".slick-slider").each(function(){$(this).slick("slickGoTo",$(this).data("slick-index")).slick("slickPause")})},this.onBlockDeselect=function(block){$(block).closest(".slick-slider").each(function(){$(this).slick("slickPlay")})}},theme._initCustomerAddressCountryDropdown=function(){new Shopify.CountryProvinceSelector("AddressCountryNew","AddressProvinceNew",{hideElement:"AddressProvinceContainerNew"}),$("#AddressCountryNew-modal").length&&new Shopify.CountryProvinceSelector("AddressCountryNew-modal","AddressProvinceNew-modal",{hideElement:"AddressProvinceContainerNew-modal"}),$(".address-country-option").each(function(){var formId=$(this).data("form-id"),countrySelector="AddressCountry_"+formId,provinceSelector="AddressProvince_"+formId,containerSelector="AddressProvinceContainer_"+formId;new Shopify.CountryProvinceSelector(countrySelector,provinceSelector,{hideElement:containerSelector})})},theme._setupCustomAddressModal=function(){var suffix="-modal";$(".lightbox-content form, .lightbox-content input[id], .lightbox-content select[id], .lightbox-content div[id]").each(function(){$(this).attr("id",$(this).attr("id")+suffix)}),$(".lightbox-content label[for]").each(function(){$(this).attr("for",$(this).attr("for")+suffix)}),$(".lightbox-content .address-country-option").each(function(){var formId=$(this).data("form-id")+suffix;$(this).attr("data-form-id",formId).data("form-id",formId)}),theme._initCustomerAddressCountryDropdown()},theme.customerAddresses=(function(){var $newAddressForm=$("#AddressNewForm");$newAddressForm.length&&(Shopify&&theme._initCustomerAddressCountryDropdown(),$(".address-new-toggle").on("click",function(){return $.colorbox({transition:"fade",html:'<div class="lightbox-content">'+$newAddressForm.html()+"</div>",onComplete:theme._setupCustomAddressModal}),!1}),$(".address-edit-toggle").on("click",function(){var formId=$(this).data("form-id");return $.colorbox({transition:"fade",html:'<div class="lightbox-content">'+$("#EditAddress_"+formId).html()+"</div>",onComplete:theme._setupCustomAddressModal}),!1}),$(".address-delete").on("click",function(){var $el=$(this),formId=$el.data("form-id"),confirmMessage=$el.data("confirm-message");confirm(confirmMessage||"Are you sure you wish to delete this address?")&&Shopify.postLink(theme.routes.account_addresses_url+"/"+formId,{parameters:{_method:"delete"}})}),$("#AddressNewForm .errors").length&&$(".address-new-toggle").click(),$(".grid .address-card .errors").length&&$(".grid .address-card .errors").first().closest(".address-card").find(".address-edit-toggle").
1click())})(),theme.customerLogin=(function(){var selectors={recoverPasswordForm:"#RecoverPassword",hideRecoverPasswordLink:"#HideRecoverPasswordLink"};$(document).on("click",selectors.recoverPasswordForm,onShowHidePasswordForm),$(document).on("click",selectors.hideRecoverPasswordLink,onShowHidePasswordForm);function onShowHidePasswordForm(evt){evt.preventDefault(),toggleRecoverPasswordForm($(this).closest(".container"))}function toggleRecoverPasswordForm(container){$("[id=RecoverPasswordForm]",container).toggleClass("hide"),$("[id=CustomerLoginForm]",container).toggleClass("hide")}if($(selectors.recoverPasswordForm).length){var checkUrlHash=function(){var hash=window.location.hash;hash==="#recover"&&toggleRecoverPasswordForm(null)},resetPasswordSuccess=function(){var $formState=$(".reset-password-success");$formState.length&&$("#ResetSuccess").removeClass("hide")};checkUrlHash(),resetPasswordSuccess()}})(),theme.initUniformHeightMonitor=function(container,paramWrapperSelector,paramInnerSelector){theme.settings.uniformProductGridImagesEnabled&&($(container).addClass("uhm-active").data("uhm-callback",function(wrapperSelector,innerSelector){var tallest=0,$items=$(wrapperSelector,this),$inners=$(innerSelector,this);$inners.each(function(){var height=$(this).height();height>tallest&&(tallest=height)}),$items.css("height",Math.ceil(tallest)+"px")}.bind(container,paramWrapperSelector,paramInnerSelector)),$(container).data("uhm-callback")(),$(window).on("debouncedresize",$(container).data("uhm-callback")))},theme.destroyUniformHeightMonitor=function(container){theme.settings.uniformProductGridImagesEnabled&&$(container).each(function(){$(window).off("debouncedresize",$(this).data("uhm-callback"))}).removeClass("uhm-active")},theme.icons={close:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',slideshowPrevArrow:'<button class="slick-prev" aria-label="'+theme.strings.previous+'"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>',slideshowNextArrow:'<button class="slick-next" aria-label="'+theme.strings.next+'"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg></button>'},theme.openPageContentInLightbox=function(url){$.get(url,function(data){var $content=$("#MainContent",$.parseHTML("<div>"+data+"</div>"));$.colorbox({transition:"fade",html:'<div class="lightbox-content">'+$content.html()+"</div>",onComplete:function(){$("#cboxContent .input-wrapper input").trigger("inputstateEmpty"),$("#cboxContent input[data-desktop-autofocus]").focus()}})})},theme.styleVariantSelectors=function($els,data,inLightbox){var $clickies=$els.filter(function(){return typeof $(this).data("listed")!="undefined"});if($clickies.each(function(){$(this).clickyBoxes();var $label=$(this).closest(".selector-wrapper").find(".variant-option-title");$label.length&&($label.data("default-content",$label.html()),$(this).siblings(".clickyboxes").on("change",function(){$label.data("default-content",$(this).find("a.active").data("value"))}).on("mouseenter","a",function(){$label.html($(this).data("value"))}).on("mouseleave","a",function(){$label.html($label.data("default-content"))}))}),$clickies.length>0)for(var optionIndex=0;optionIndex<data.options.length;optionIndex++){for(var optionValues={},variantIndex=0;variantIndex<data.variants.length;variantIndex++){var variant=data.variants[variantIndex];typeof optionValues[variant.options[optionIndex]]=="undefined"&&(optionValues[variant.options[optionIndex]]=!1),variant.available&&(optionValues[variant.options[optionIndex]]=!0)}for(var key in optionValues)optionValues[key]||$($els[optionIndex]).siblings(".clickyboxes").find("li a").filter(function(){return $(this).attr("data-value")==key}).addClass("unavailable")}$els.not($clickies).each(function(){var config={};inLightbox&&(config.dropdownParent=$("#cboxWrapper")),theme.select2.init($(this),config)}),inLightbox&&$.colorbox.resize()},theme.select2={init:function($els,config){var standardSelectOptions={minimumResultsForSearch:1/0},swatchSelectOptions={minimumResultsForSearch:1/0,templateResult:theme.select2.swatchSelect2OptionTemplate,templateSelection:theme.select2.swatchSelect2OptionTemplate};typeof config!="undefined"&&(standardSelectOptions=$.extend(standardSelectOptions,config),swatchSelectOptions=$.extend(swatchSelectOptions,config)),$els.each(function(){$(this).select2($(this).data("c
1olour-swatch")?swatchSelectOptions:standardSelectOptions)})},swatchSelect2OptionTemplate:function(state){if(state.id){var colourKey=removeDiacritics(state.id).toLowerCase().replace(/'/g,"").replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/-*$/,"");return $(['<div class="swatch-option">','<span class="swatch-option__nugget bg-',colourKey,'"></span>','<span class="swatch-option__label">',state.text,"</span>","</div>"].join(""))}else return $(['<div class="swatch-option swatch-option--all">','<span class="swatch-option__label">',state.text,"</span>","</div>"].join(""))}},theme.namespaceFromSection=function(container){return[".",$(container).data("section-type"),$(container).data("section-id")].join("")},theme.dockedNavDesktopMinWidth=768,theme.dockedNavHeight=function(){if($(window).width()>=theme.dockedNavDesktopMinWidth){if($(".docked-navigation-container").length)return $(".docked-navigation-container__inner").height()}else if($(".docked-mobile-navigation-container").length)return $(".docked-mobile-navigation-container__inner").height();return 0},theme.resizeAccent=function(){var accentHeight=0,$firstSection=$(".accent-background").next();if($firstSection.length){var $marginTop=parseInt($firstSection.css("margin-top"));$firstSection[0].id==="shopify-section-banner"&&!$firstSection.children().length&&!$firstSection.text().trim().length&&($firstSection=$firstSection.next()),$firstSection.find(".sticky-element").length?accentHeight=Math.round($firstSection.find(".sticky-element").outerHeight()/2+$marginTop):accentHeight=Math.round($firstSection.outerHeight()/2+$marginTop),$(".accent-background").css("height",accentHeight)}else accentHeight="";$(".accent-background").css("height",accentHeight)},theme.peekCarousel={init:function($container,$slideshows,globalNamespace,useCarouselCheckFn,removeClasses,slickConfig){theme.peekCarousel._checkAdvice($container);var data={$slideshows:$slideshows,useCarouselCheckFn:useCarouselCheckFn,removeClasses:removeClasses,slickConfig:_typeof(slickConfig)=="object"?slickConfig:{infinite:!1,slidesToShow:1,slidesToScroll:1,swipeToSlide:!0,dots:!1,arrows:!1}};theme.peekCarousel._assess.bind(data)(),$(window).on("debouncedresize"+globalNamespace,theme.peekCarousel._assess.bind(data)),$(".product-carousel-peek__advice",$container).on("click",function(){$(this).closest(".product-carousel-peek").find(".slick-initialized").slick("slickNext").trigger("dismissAdvice")})},destroy:function($container,$slideshows,globalNamespace){$slideshows.hasClass("slick-initialized")&&$slideshows.slick("unslick").off("swipe dismissAdvice afterChange init"),$(window).off("debouncedresize"+globalNamespace,theme.peekCarousel._assess),$(".product-carousel-peek__advice",$container).off("click")},_assess:function(){for(var i=0;i<this.$slideshows.length;i++){var $slideshow2=$(this.$slideshows[i]);this.useCarouselCheckFn()?$slideshow2.hasClass("slick-initialized")||(this.removeClasses&&$slideshow2.children().each(function(){$(this).data("peekOriginalClassName",this.className),this.className=""}),$slideshow2.children().length==0&&$slideshow2.closest(".product-carousel-peek").addClass("product-carousel-peek--empty"),$slideshow2.children().length==1&&$slideshow2.closest(".product-carousel-peek").addClass("product-carousel-peek--single"),$slideshow2.on("afterChange init",theme.peekCarousel._lazyLoadProduct),$slideshow2.slick(this.slickConfig).on("swipe dismissAdvice",theme.peekCarousel._dismissAdviceOnSlickSwipe)):$slideshow2.hasClass("slick-initialized")&&($slideshow2.slick("unslick").off("swipe dismissAdvice afterChange"),this.removeClasses&&$slideshow2.children().each(function(){this.className=$(this).data("peekOriginalClassName")}))}},_checkAdvice:function(container){$.cookie("theme.boost.dismissPeekAdvice")!="1"&&$(".product-carousel-peek",container).addClass("product-carousel-peek--show-advice")},_dismissAdvice:function(){$.cookie("theme.boost.dismissPeekAdvice","1",{expires:7,path:"/",domain:window.location.hostname}),$(".product-carousel-peek").addClass("product-carousel-peek--dismiss-advice")}
1,_dismissAdviceOnSlickSwipe:function(evt,slick){theme.peekCarousel._dismissAdvice(),$(this).off("swipe")},_lazyLoadProduct:function(evt,slick){var data=this;slick.$slides.filter("[data-lazy-product-url]").filter(function(){return $(this).hasClass("slick-active")||$(this).prev().hasClass("slick-active")}).each(function(){var $this=$(this);$.get($(this).data("lazy-product-url")+"?sections=product-block",function(response){if($this.html($(response["product-block"]).children().html()),theme.settings.uniformProductGridImagesEnabled){var $uhmContainer=$this.closest(".uhm-active");$uhmContainer.length&&$uhmContainer.data("uhm-callback")()}}),$this.removeAttr("data-lazy-product-url")})}},theme.productGallerySlideshowTabFix=function(slides,current){$(slides[current]).attr("tabindex","-1").find("[tabindex]").each(function(){$(this).attr("tabindex","0"),$(this).filter("model-viewer").attr("tabindex","-1")}),$(slides).not(slides[current]).attr("tabindex","-1").find("a, input, select, textarea, button, iframe, video, model-viewer, [tabindex]").each(function(){$(this).attr("tabindex","-1")})},$(function(){slate.a11y.pageLinkFocus($(window.location.hash)),$(".in-page-link").on("click",function(evt){slate.a11y.pageLinkFocus($(evt.currentTarget.hash))}),$(document).on("keyup.themeTabCheck",function(evt){evt.keyCode===9&&($("body").addClass("tab-used"),$(document).off("keyup.themeTabCheck"))});var tableSelectors=".rte table";slate.rte.wrapTable({$tables:$(tableSelectors),tableWrapperClass:"rte__table-wrapper"});var iframeSelectors='.rte iframe[src*="youtube.com/embed"],.rte iframe[src*="player.vimeo"]';slate.rte.wrapIframe({$iframes:$(iframeSelectors),iframeWrapperClass:"rte__video-wrapper"}),slate.cart.cookiesEnabled()&&(document.documentElement.className=document.documentElement.className.replace("supports-no-cookies","supports-cookies")),$(document).on("change focusout inputstateEmpty",".input-wrapper input, .input-wrapper textarea",function(){$(this).closest(".input-wrapper").toggleClass("is-empty",$(this).val().length==0)}),$(document).on("focusin focusout",".input-wrapper input, .input-wrapper textarea",function(evt){$(this).closest(".input-wrapper").toggleClass("in-focus",evt.type=="focusin")}),$(document).on("shopify:section:load",function(){$(".input-wrapper input, .input-wrapper textarea").trigger("inputstateEmpty")}),$(".input-wrapper input:focus, .input-wrapper textarea:focus").closest(".input-wrapper").addClass("in-focus"),$(".input-wrapper input, .input-wrapper textarea").trigger("inputstateEmpty"),$(".input-wrapper input, .input-wrapper textarea").on("animationstart",function(e){e.originalEvent.animationName=="onAutoFillStart"?$(this).closest(".input-wrapper").removeClass("is-empty"):e.originalEvent.animationName=="onAutoFillCancel"&&$(this).trigger("inputstateEmpty")}),$(window).width()>1024&&$("input[data-desktop-autofocus]").focus(),$(document).on("click assess",".tabs a",function(evt){$(this).addClass("tab--active").closest("ul").find(".tab--active").not(this).removeClass("tab--active"),$(this).closest("li").siblings().find("a").each(function(){$($(this).attr("href")).removeClass("tab-content--active")}),$($(this).attr("href")).addClass("tab-content--active"),evt.preventDefault()});function tabFunc(){$(".tabs:not(:has(.tab--active)) a:first").trigger("assess")}tabFunc(),$(document).on("shopify:section:load",tabFunc);var activeQuickBuyRequest=null,breakpoint=768;$(document).on("click",".js-contains-quickbuy .js-quickbuy-button",function(e){if($(window).width()>breakpoint){if(activeQuickBuyRequest)return!1;var $qbButton=$(this),$prod=$(this).closest(".js-contains-quickbuy"),placeholder=$prod.find(".quickbuy-placeholder-template").html(),$template=$('<div class="quickbuy">'+placeholder+"</div>"),buttonObserved=!1,buttonObserver=new MutationObserver(function(mutations){$.colorbox.resize()});return $.colorbox({closeButton:!1,preloading:!1,open:!0,speed:200,slideshow:!0,html:[$template.wrap("<div>").parent().html()].join(""),onComplete:function(){var $slideshow2=$(".quickbuy__product-media").slick({infinite:!1,slidesToScroll:1,speed:300,slidesToShow:1,swipeToSlide:!0,variableWidth:!0,prevArrow:$(".quickbuy__slider-control
1s .prev"),nextArrow:$(".quickbuy__slider-controls .next")});theme.ProductMedia.init($(".quickbuy__media-container"),{onPlyrInit:function(playerObj){theme.productGallerySlideshowTabFix($slideshow2.slick("getSlick").$slides,$slideshow2.slick("getSlick").currentSlide)},onYoutubeInit:function(playerObj){theme.productGallerySlideshowTabFix($slideshow2.slick("getSlick").$slides,$slideshow2.slick("getSlick").currentSlide)},onModelViewerInit:function(playerObj){theme.productGallerySlideshowTabFix($slideshow2.slick("getSlick").$slides,$slideshow2.slick("getSlick").currentSlide)},onVideoVisible:function(e2){$(e2.target).closest(".slick-slider").slick("slickSetOption","swipe",!1)},onVideoHidden:function(e2){$(e2.target).closest(".slick-slider").slick("slickSetOption","swipe",!0)},onPlyrPlay:function(e2){$(e2.target).closest(".slick-slider").slick("slickSetOption","swipe",!1)},onPlyrPause:function(e2){$(e2.target).closest(".slick-slider").slick("slickSetOption","swipe",!0)},onModelViewerPlay:function(e2){$(e2.target).closest(".slick-slider").slick("slickSetOption","swipe",!1).slick("slickSetOption","accessibility",!1).closest(".quickbuy__media-container").addClass("media-playing")},onModelViewerPause:function(e2){$(e2.target).closest(".slick-slider").slick("slickSetOption","swipe",!0).slick("slickSetOption","accessibility",!0).closest(".quickbuy__media-container").removeClass("media-playing")}}),$slideshow2.find(".product-media").trigger("mediaVisibleInitial"),$slideshow2.on("afterChange",function(evt,slick,current){$(".product-media--activated").removeClass("product-media--activated").trigger("mediaHidden");var $currentMedia=$(".product-media",slick.$slides[current]).addClass("product-media--activated").trigger("mediaVisible");theme.productGallerySlideshowTabFix(slick.$slides,current),$slideshow2.closest(".quickbuy__media-container").toggleClass("quickbuy__media-container--current-image",$currentMedia.hasClass("product-media--image")),$(this).closest(".quickbuy-container").trigger("changedsize")}),theme.productGallerySlideshowTabFix($slideshow2.slick("getSlick").$slides,$slideshow2.slick("getSlick").currentSlide),$.colorbox.resize();var $container=$(".quickbuy-form"),productData=JSON.parse($("[data-product-json]",$prod).html()),options={$container:$container,enableHistoryState:!1,singleOptionSelector:"[data-single-option-selector]",originalSelectorId:"[data-product-select]",secondaryIdSelectors:"[data-product-secondary-select]",product:productData,productSingleObject:productData},variants=new slate.Variants(options);$container.on("variantChange",theme.variants.updateAddToCartState.bind(options)),$container.on("variantPriceChange",theme.variants.updateProductPrices.bind(options)),$(".quickbuy__product-media .slick-slide",$container).length>1&&$container.on("variantImageChange",function(evt){var variant=evt.variant,$found=$('.quickbuy__product-media .slick-slide:not(.slick-cloned)[data-media-id="'+variant.featured_media.id+'"]',$container);$found.length&&$found.closest(".slick-slider").slick("slickGoTo",$found.data("slick-index"))}),$container.on("variantChange",$.colorbox.resize),theme.styleVariantSelectors($(".quickbuy .selector-wrapper select"),options.product,!0),theme.select2.init($(".quickbuy .quantity-proxy"),{dropdownParent:$("#cboxWrapper")}),Shopify.PaymentButton&&($(document).on("shopify:payment_button:loaded.themeQuickBuy",function(){$(document).off("shopify:payment_button:loaded.themeQuickBuy"),$.colorbox.resize(),buttonObserved=$(".quickbuy-form .shopify-payment-button")[0],buttonObserved&&buttonObserver.observe(buttonObserved,{attributes:!0,childList:!0,subtree:!0})}),Shopify.PaymentButton.init()),theme.initAjaxAddToCartForm($("form.ajax-product-form",$container));for(var recentProductData={handle:productData.handle,url:$qbButton.attr("href").split("?")[0],title:productData.title,vendor:productData.vendor,available:productData.available,image:productData.media&&productData.media.length>0?productData.media[0].preview_image.src:null,image2:productData.media&&productData.media.length>1?productData.media[1].preview_image.src:null,price:productData.price,priceVaries:productData.price_varies,compareAtPrice:productData.compare_at_price},lowestPriceVariant=productData.variants[0],i=1;i<productData.variants.length;i++)productData.variants[i].price<lowestPriceVariant.price&&(lowestPriceVariant=productData.variants[i]);lowestPriceVariant.unit_price_measurement&&(recentProductData.unitPrice=lowestPriceVariant.unit_price,recentProductData.unitPriceUnit=theme.variants.getBaseUnit(lowestPriceVariant)),theme.addToAndReturnRecentProducts(recentProductData)},onCleanup:function(){buttonObserver.disconnect(),theme.ProductMedia.destroy($(".quickbuy__media-container")),$(".quickbuy .slick-initialized").slick("unslick").off("afterChange"),$(".quickbuy-form").off("variantChange variantPriceChange variantImageChange"),$(".quickbuy-form .clickybox-replaced").clickyBoxes("destroy"),theme.initAjaxAddToCartForm($(".quickbuy form.ajax-product-form"))}}),!1}}),$(document).on("click","#colorbox .quickbuy__close .js-close-quickbuy",function(){return $.colorbox.close(),!1}),$(document).on("click",".js-close-lightbox",function(){return $.colorbox.close(),!1}),$(document).on("change",".quantity-proxy",function(){var value=$(this).val(),$input=$(this).siblings('[name="quantity"]');value=="10+"?($input.val("10").closest(".quantity-wrapper").addClass("hide-proxy"),setTimeout(function(){$input.select().focus()},10)):$input.val(value)});var $newsletterSuccess=$(".subscribe-form__response--success");$newsletterSuccess.length&&$.colorbox({transition:"fade",html:'<div class="subscribe-form-lightbox-response">'+$newsletterSuccess.html()+"</div>",onOpen:function(){$("#colorbox").css("opacity",0)},onComplete:function(){$("#colorbox").animate({opacity:1},350)}}),$(".accent-background").length&&($(function(){theme.resizeAccent()}),$(window).on("debouncedresize",theme.resizeAccent),$(document).on("shopify:section:load",function(evt){$(evt.target).prev().hasClass("accent-background")&&theme.resizeAccent()}),$(document).on("shopify:section:reorder",theme.resizeAccent))}),theme.Sections.init(),theme.Sections.register("header",theme.Header,{deferredLoad:!1}),theme.Sections.register("footer",theme.Footer),theme.Sections.register("product",theme.Product,{deferredLoad:!1}),theme.Sections.register("blog",theme.Blog),theme.Sections.register("article",theme.Article),theme.Sections.register("slideshow",theme.Slideshow),theme.Sections.register("banner",theme.Banner),theme.Sections.register("standout-collection",theme.StandoutCollection),theme.Sections.register("get-the-look",theme.GetTheLook),theme.Sections.register("promotional-images",theme.PromotionalImages),theme.Sections.register("featured-collection",theme.FeaturedCollection),theme.Sections.register("list-collections",theme.ListCollections,{deferredLoad:!1}),theme.Sections.register("collection-template",theme.CollectionTemplate,{deferredLoad:!1}),theme.Sections.register("cart",theme.Cart,{deferredLoad:!1}),theme.Sections.register("image-with-text",theme.ImageWithText),theme.Sections.register("featured-product",theme.FeaturedProduct),theme.Sections.register("recently-viewed",theme.RecentlyViewed),theme.Sections.register("testimonials",theme.Testimonials),theme.Sections.register("gallery",theme.Gallery),theme.Sections.register("video",theme.VideoManager),theme.Sections.register("background-video",theme.VideoManager),theme.Sections.register("search-template",theme.SearchTemplate,{deferredLoad:!1}),$(function($2){cc.sections.length?cc.sections.forEach(function(section){try{theme.Sections.register(section.name,section.section)}catch(err){console.error("Unable to register section ".concat(section.name,"."),err)}}):console.warn("Barry: No common sections have been registered.")})})(theme.jQuery);
2//# sourceMappingURL=/cdn/shop/t/15/assets/theme.js.map?v=36045149460383099681695057453

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.