PageSourceSearch

https://poppybabyco.com/cdn/shop/t/14/assets/theme.js?v=145932643527110581021636607720

js poppybabyco.com collected 2026-10-03 21:35:59 UTC 39,456 bytes, 2 lines download raw bytes

1window.theme=window.theme||{},window.theme=window.theme||{},theme.Sections=function(){this.constructors={},this.instances=[],$(document).on("shopify:section:load",this._onSectionLoad.bind(this)).on("shopify:section:unload",this._onSectionUnload.bind(this)).on("shopify:section:select",this._onSelect.bind(this)).on("shopify:section:deselect",this._onDeselect.bind(this)).on("shopify:block:select",this._onBlockSelect.bind(this)).on("shopify:block:deselect",this._onBlockDeselect.bind(this))},theme.Sections.prototype=_.assignIn({},theme.Sections.prototype,{_createInstance:function(container,constructor){var $container=$(container),id=$container.attr("data-section-id"),type=$container.attr("data-section-type");if(constructor=constructor||this.constructors[type],!_.isUndefined(constructor)){var instance=_.assignIn(new constructor(container),{id:id,type:type,container:container});this.instances.push(instance)}},_onSectionLoad:function(evt){var container=$("[data-section-id]",evt.target)[0];container&&this._createInstance(container)},_onSectionUnload:function(evt){this.instances=_.filter(this.instances,function(instance){var isEventInstance=instance.id===evt.detail.sectionId;return isEventInstance&&_.isFunction(instance.onUnload)&&instance.onUnload(evt),!isEventInstance})},_onSelect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onSelect)&&instance.onSelect(evt)},_onDeselect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onDeselect)&&instance.onDeselect(evt)},_onBlockSelect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onBlockSelect)&&instance.onBlockSelect(evt)},_onBlockDeselect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onBlockDeselect)&&instance.onBlockDeselect(evt)},register:function(type,constructor){this.constructors[type]=constructor,$("[data-section-type="+type+"]").each(function(index,container){this._createInstance(container,constructor)}.bind(this))}}),typeof Shopify=="undefined"&&(Shopify={}),Shopify.formatMoney||(Shopify.formatMoney=function(cents,format){var value="",placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||this.money_format;typeof cents=="string"&&(cents=cents.replace(".",""));function defaultOption(opt,def){return typeof opt=="undefined"?def:opt}function formatWithDelimiters(number,precision,thousands,decimal){if(precision=defaultOption(precision,2),thousands=defaultOption(thousands,","),decimal=defaultOption(decimal,"."),isNaN(number)||number===null)return 0;number=(number/100).toFixed(precision);var parts=number.split("."),dollars=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),cents2=parts[1]?decimal+parts[1]:"";return dollars+cents2}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break}return formatString.replace(placeholderRegex,value)}),window.timber=window.timber||{},timber.cacheSelectors=function(){timber.cache={$window:$(window),$html:$("html"),$body:$("body"),$navigation:$("#AccessibleNav"),$navBar:$(".nav-bar"),$mobileSubNavToggle:$(".mobile-nav__toggle"),$header:$(".site-header"),$mobileMenuButton:$("#menu-opener"),$changeView:$(".change-view"),$productImage:$("#ProductPhotoImg"),$thumbImages:$("#ProductThumbs").find("a.product-single__thumbnail"),$cartSection:$("#CartSection"),cartNoCookies:"cart--no-cookies",$recoverPasswordLink:$("#RecoverPassword"),$hideRecoverPasswordLink:$("#HideRecoverPasswordLink"),$recoverPasswordForm:$("#RecoverPasswordForm"),$customerLoginForm:$("#CustomerLoginForm"),$passwordResetSuccess:$("#ResetSuccess")}},timber.init=function(){timber.cacheSelectors(),timber.drawersInit(),timber.cartInit(),timber.mobileNavToggle(),timber.productImageSwitch(),timber.collectionViews(),timber.loginForms()},timber.openDrawerMenu=function(){var $allLinks=$("button, a",timber.cache.$navBar);timber.cache.$body.addClass("opened-drawer"),timber.cache.$navBar.addClass("opened").attr("aria-hidden","false"),timber.cache.$mobileMenuButton.attr("aria-expanded","true").addClass("opened"),timber.trapFocus({$container:timber.cache.$navBar,namespace:"drawer_focus"}),$allLinks.attr("tabindex",""),timber.cache.$html.on("keyup.drawerMenu",function(evt){evt.keyCode===27&&timber.closeDrawerMenu()})},timber.closeDrawerMenu=function(){var $allLinks=$("button, a",timber.cache.$navBar);timber.cache.$body.removeClass("opened-drawer"),timber.cache.$navBar.removeClass("opened").attr("aria-hidden","true"),timber.cache.$mobileMenuButton.attr("aria-expanded","fal
1se").removeClass("opened"),timber.removeTrapFocus({$container:timber.cache.$navBar,namespace:"drawer_focus"}),$allLinks.attr("tabindex","-1"),timber.cache.$html.off("keyup.drawerMenu")},timber.drawersInit=function(){timber.LeftDrawer=new timber.Drawers("NavDrawer","left"),timber.RightDrawer=new timber.Drawers("CartDrawer","right",{onDrawerOpen:theme.settings.ajax_cart_enable})},timber.cartInit=function(){timber.cookiesEnabled()||timber.cache.$cartSection.addClass(timber.cache.cartNoCookies)},timber.cookiesEnabled=function(){var cookieEnabled=navigator.cookieEnabled;return cookieEnabled||(document.cookie="testcookie",cookieEnabled=document.cookie.indexOf("testcookie")!==-1),cookieEnabled},timber.mobileNavToggle=function(){timber.cache.$mobileSubNavToggle.on("click",function(){$(this).parent().toggleClass("mobile-nav--expanded")})},timber.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&&!options.$container.has(evt.target).length&&options.$container.focus()})},timber.removeTrapFocus=function(options){var eventName=options.namespace?"focusin."+options.namespace:"focusin";options.$container&&options.$container.length&&options.$container.removeAttr("tabindex"),$(document).off(eventName)},timber.getHash=function(){return window.location.hash},timber.updateHash=function(hash){window.location.hash="#"+hash,$("#"+hash).attr("tabindex",-1).focus()},timber.productPage=function(options){var moneyFormat=options.money_format,variant=options.variant,$productImage=$("#ProductPhotoImg"),$addToCart=$("#AddToCart"),$productPrice=$("#ProductPrice"),$comparePrice=$("#ComparePrice"),$quantityElements=$(".quantity-selector, label + .js-qty"),$addToCartText=$("#AddToCartText");if(variant){if(variant.featured_image){var newImg=variant.featured_image,el=$productImage[0];Shopify.Image.switchImage(newImg,el,timber.switchImage)}variant.available?($addToCart.removeClass("disabled").prop("disabled",!1),$addToCartText.html(theme.strings.add_to_cart),$quantityElements.show()):($addToCart.addClass("disabled").prop("disabled",!0),$addToCartText.html(theme.strings.sold_out),$quantityElements.hide()),$productPrice.html(Shopify.formatMoney(variant.price,moneyFormat)),variant.compare_at_price>variant.price?$comparePrice.html(Shopify.formatMoney(variant.compare_at_price,moneyFormat)).show():$comparePrice.hide()}else $addToCart.addClass("disabled").prop("disabled",!0),$addToCartText.html(theme.strings.unavailable),$quantityElements.hide()},timber.productImageSwitch=function(){timber.cache.$thumbImages.length&&timber.cache.$thumbImages.on("click",function(evt){evt.preventDefault();var newImage=$(this).attr("href");timber.switchImage(newImage,null,timber.cache.$productImage)})},timber.switchImage=function(src,imgObject,el){var $el=$(el);$el.attr("src",src)},timber.collectionViews=function(){timber.cache.$changeView.length&&timber.cache.$changeView.on("click",function(){var view=$(this).data("view"),url=document.URL,hasParams=url.indexOf("?")>-1;hasParams?window.location=replaceUrlParam(url,"view",view):window.location=url+"?view="+view})},timber.loginForms=function(){function showRecoverPasswordForm(){timber.cache.$recoverPasswordForm.show(),timber.cache.$customerLoginForm.hide()}function hideRecoverPasswordForm(){timber.cache.$recoverPasswordForm.hide(),timber.cache.$customerLoginForm.show()}timber.cache.$recoverPasswordLink.on("click",function(evt){evt.preventDefault(),showRecoverPasswordForm()}),timber.cache.$hideRecoverPasswordLink.on("click",function(evt){evt.preventDefault(),hideRecoverPasswordForm()}),timber.getHash()==="#recover"&&showRecoverPasswordForm()},timber.resetPasswordSuccess=function(){timber.cache.$passwordResetSuccess.show()},timber.Drawers=(function(){var Drawer=function(id,position,options){var defaults={close:".js-drawer-close",open:".js-drawer-open-"+position,openClass:"js-drawer-open",dirOpenClass:"js-drawer-open-"+position};if(this.nodes={$parent:$("body, html"),$page:$("#PageContainer"),$moved:$(".is-moved-by-drawer")},this.config=$.extend(defaults,options),this.position=position,this.$drawer=$("#"+id),!this.$drawer.length)return!1;this.drawerIsOpen=!1,this.init()};return Drawer.prototype.init=function(){$(this.config.open).on("click",$.proxy(this.open,this)),this.$drawer.find(this.config.close).on("click",$.proxy(this.close,this))},Drawer.prototype.open=function(evt){var externalCall=!1;if(evt?evt.preventDefault():externalCall=!0,evt&&evt.stopPropagation&&(evt.stopPropagation(),this.$activeSource=$(evt.currentTarget)),this.drawerIsOpen&&!externalCall)return this.close();this.nodes.$moved.addClass("is-transitioning"),this.$drawer.prepareTransition(),this.nodes.$parent.addClass(this.config.openClass+" "+this.config.dirOpenClass),this.drawerIsOpen=!0,this.trapFocus(this.$drawer,"drawer_focus"),this.config.onDrawerOpen&&typeof this.config.onDrawerOpen=="function"&&(externalCall||this.config.onDrawerOpen()),this.$activeSource&&this.$activeSource.attr("aria-expanded")&&this.$activeSource.attr("aria-expanded","true"),this.nodes.$page.on("touchmove.drawer",function(){return!1}),this.nodes.$page.on("click.drawer",$.proxy(function(){return this.close(),!1},this))},Drawer.prototype.close=function(){this.drawerIsOpen&&($(document.activeElement).trigger("blur"),this.nodes.$moved.prepareTransition({disableExisting:!0}),this.$drawer.prepareTransition({disableExisting:!0}),this.nodes.$parent.removeClass(this.config.dirOpenClass+" "+this.config.openClass),this.drawerIsOpen=!1,this.removeTrapFocus(this.$drawer,"drawer_focus"),this.nodes.$page.off(".drawer"))},Drawer.prototype.trapFocus=function($container,eventNamespace){var eventName=eventNamespace?"focusin."+eventNamespace:"focusin";$container.attr("tabindex","-1"),$container.focus(),$(document).on(eventName,function(evt){$container[0]!==evt.target&&!$container.has(evt.target).length&&$container.focus()})},Drawer.prototype.removeTrapFocus=function($container,eventNamespace){var eventName=eventNamespace?"focusin."+eventNamespace:"focusin";$container.removeAttr("tabindex"),$(document).off(eventName)},Drawer})(),$(timber.init),window.theme=window.theme||{},theme.Header=(function(){var cache={};function cacheSelectors(){cache={$html:$("html"),$body:$("body"),$wrapper:$(".wrapper"),$sidebar:$("#sidebar"),$logo:$("#logo"),$meta:$("#meta"),$announcementBar:$(".announcement-bar"),$siteHeader:$(".site-header"),$menu:$("#menu"),$nav:$(".site-nav"),$siteLogo:$(".site-header__logo"),$siteLogoLink:$(".site-header__logo-link")||null,$siteLogoLinkInverted:$(".site-header__logo-link--inverted")||null,$mobileMenu:$(".nav-bar"),$mobileMenuButton:$("#menu-opener"),$mobileCloseMenuButton:$("#menu-closer"),$pageContainer:$("#PageContainer"),$responsiveMenu:$("#meta").find(".responsive-menu"),$responsiveClose:$(".responsive-close"),$options:$("#options"),$footer:$("#footer"),$content:$("#content"),$allLinks:$("button, a",cache.$mobileMenu),$siteNavs:$(".
1site-nav"),isindexTemplate:$("body").hasClass("template-index"),menuStyle:$(".site-header").data("menu-style"),touchM:"ontouchstart"in window,iOS:/(iPad|iPhone|iPod)/g.test(navigator.userAgent),navWidth:0,logoWidth:0,navigation:{activeClass:"opened",childClass:"site-nav__link--child",active:".opened",parents:".site-nav--has-dropdown",links:".site-nav__link",dropdown:".site-nav__dropdown"}}}function init(){cacheSelectors(),cache.touchM?cache.$body.addClass("touch"):cache.$body.addClass("no-touch"),$("header").hasClass("is-dark")?(cache.$pageContainer.addClass("is-dark"),cache.$pageContainer.removeClass("is-light")):$("header").hasClass("is-light")&&(cache.$pageContainer.addClass("is-light"),cache.$pageContainer.removeClass("is-dark")),cache.$footer.removeClass("loading"),$('p[style="text-align: center;"] img, p[style="text-align: center;"] iframe').each(function(){$(this).parent().addClass("centered-media")}),$(".main-content").fitVids(),menuStyleCheck(),stickyHeader(),$(".link-list").length>0&&$(".link-list").clone().appendTo($(".nav-bar")).find("a").attr("tabindex","-1"),menuDrawerButtons(),dropDownMenus()}function fitNav(){var navWiderThanWrapper=cache.$wrapper.width()<cache.navWidth+cache.logoWidth;navWiderThanWrapper&&cache.$siteHeader.hasClass("site-header--classic")?(collapseMenu(),hideInvertedLogo()):!navWiderThanWrapper&&cache.$siteHeader.hasClass("site-header--drawer")&&cache.menuStyle!=="drawer"&&(timber.closeDrawerMenu(),expandMenu(),showInvertedLogo()),navWiderThanWrapper&&cache.$mobileMenu.css("height",$(window).height()),cache.$siteLogo.css("opacity","1"),cache.$nav.css("opacity","1")}function menuStyleCheck(){timber.cache.$window.on("load",function(){cache.logoWidth=cache.$siteLogo.width()||0,cache.$nav.children("li").each(function(){cache.navWidth+=$(this).outerWidth(!0)}),timber.cache.$navBar.attr("aria-hidden","false"),fitNav(),$(window).on("resize",$.debounce(250,fitNav))})}function collapseMenu(){cache.$mobileMenu.removeClass("animate"),cache.$announcementBar.addClass("mobile"),cache.$siteHeader.addClass("site-header--drawer mobile sticky").removeClass("site-header--classic active").find(".btn__buy a").removeClass("btn--small btn--dark").addClass("btn--regular btn--light"),timber.cache.$navBar.attr("aria-hidden","true"),cache.$allLinks.attr("tabindex","-1")}function expandMenu(){cache.$announcementBar.removeClass("mobile"),cache.$siteHeader.addClass("site-header--classic active").removeClass("site-header--drawer mobile sticky").find(".btn__buy a").addClass("btn--small btn--dark").removeClass("btn--regular btn--light"),cache.$mobileMenu.css("height","100%"),timber.cache.$navBar.attr("aria-hidden","false"),cache.$allLinks.attr("tabindex","")}function stickyHeader(){cache.menuStyle!=="drawer"&&(cache.$siteHeader.attr("aria-hidden",!0).find("a, button").attr("tabIndex",-1),$(window).on("scroll",function(){if(!(cache.$siteHeader.hasClass("mobile")||cache.$siteHeader.hasClass("site-header--drawer"))){if($(window).scrollTop()>300)startAnimateHeader();else if($(window).scrollTop()<300){stopAnimateHeader();var $menus=cache.$siteNavs.find(cache.navigation.active);closeAllMenus($menus)}}}))}function startAnimateHeader(){cache.$siteHeader.addClass("sticky"),hideInvertedLogo(),setTimeout(function(){cache.$siteHeader.addClass("active")},500)}function stopAnimateHeader(){cache.$siteHeader.removeClass("active sticky"),showInvertedLogo()}function hideInvertedLogo(){!cache.isindexTemplate||!cache.$siteLogoLinkInverted.length||(cache.$siteLogoLink.removeClass("logo--hidden"),cache.$siteLogoLinkInverted.addClass("logo--hidden"))}function showInvertedLogo(){!cache.isindexTemplate||!cache.$siteLogoLinkInverted.length||(cache.$siteLogoLink.addClass("logo--hidden"),cache.$siteLogoLinkInverted.removeClass("logo--hidden"))}function menuDrawerButtons(){cache.$mobileMenuButton.on("click",function(e){timber.openDrawerMenu(),e.preventDefault()}),cache.$mobileCloseMenuButton.on("click",function(e){timber.closeDrawerMenu(),e.preventDefault()}),setTimeout(function(){cache.$mobileMenu.addClass("animate")},500)}function dropDownMenus(){$(cache.navigation.parents).children(cache.navigation.links).on("click",function(){var $link=$(this),$parent=$link.parent(),$menus;if($parent.hasClass(cache.navigation.activeClass)){closeMenu($parent);return}$link.hasClass(cache.navigation.childClass)?$menus=$parent.siblings():$menus=cache.$siteNavs.find(cache.navigation.active),closeAllMenus($menus),openMenu($parent)})}function openMenu($menu){$menu.addClass(cache.navigation.activeClass),$menu.children(cache.navigation.links).attr("aria-expanded",!0),$menu.children(cache.navigation.dropdown).stop().slideDown(200),setTimeout(function(){timber.cache.$body.on("click.outsideMegaNav",function(e){if(!$(e.target).is(cache.navigation.links)){var $menus=cache.$siteNavs.find(cache.navigation.active);closeAllMenus($menus)}})},250)}function closeMenu($menu){$menu.removeClass(cache.navigation.activeClass),$menu.children(cache.navigation.links).attr("aria-expanded",!1),$menu.children(cache.navigation.dropdown).stop().slideUp(1
150)}function closeAllMenus($menus){$.each($menus,function(){closeMenu($(this))}),timber.cache.$body.off("click.outsideMegaNav")}function onSelect(){cache.menuStyle!=="drawer"&&(cache.navWidth=0,cache.logoWidth=cache.$siteLogo.width()||0,cache.$nav.children("li").each(function(){cache.navWidth+=$(this).outerWidth(!0)}),timber.cache.$navBar.attr("aria-hidden","false"),fitNav(),timber.cache.$window.on("resize",$.debounce(250,fitNav)))}function unload(){cache.$body.hasClass("opened-drawer")&&cache.$body.removeClass("opened-drawer")}return{init:init,unload:unload,onSelect:onSelect}})(),window.theme=window.theme||{},theme.Slideshow=function(el){this.cache={$slider:$(el),sliderArgs:{animation:"slider",animationSpeed:300,slideshow:!1,slideshowSpeed:5e3,directionNav:!0,controlNav:!0,keyboard:!0,prevText:$.themeAssets.arrow_left,nextText:$.themeAssets.arrow_right,smoothHeight:!0,before:function(slider){$(slider).find(".slide").not(".flex-active-slide").removeClass("slide-hide")},after:function(slider){$(slider).find(".slide").not(".flex-active-slide").addClass("slide-hide"),$(slider).resize()},start:function(slider){$(slider).find(".slide").not(".flex-active-slide").addClass("slide-hide"),$(slider).find(".slide").not(".clone").length===1&&$(slider).find(".flex-direction-nav").remove(),$(slider).addClass("loaded"),$("#slider").data("loaded-index")!==void 0&&$("#slider").flexslider($("#slider").data("loaded-index"))}}},this.cache.$slider.find("li").length===1&&(this.cache.sliderArgs.touch=!1),this.cache.$slider.flexslider(this.cache.sliderArgs)},window.theme=window.theme||{},theme.HeaderSection=(function(){function HeaderSection(){timber.cacheSelectors(),timber.drawersInit(),timber.cartInit(),timber.mobileNavToggle(),theme.Header.init()}return HeaderSection})(),theme.HeaderSection.prototype=_.assignIn({},theme.HeaderSection.prototype,{onUnload:function(){theme.Header.unload()},onSelect:function(){theme.Header.onSelect()}}),theme.Product=(function(){var defaults={selectors:{addToCart:"#AddToCart",productPrice:"#ProductPrice",comparePrice:"#ComparePrice",addToCartText:"#AddToCartText",quantityElements:".quantity-selector",optionSelector:"productSelect"}};function Product(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id");if(this.settings=$.extend({},defaults,{sectionId:sectionId,enableHistoryState:!0,$container:this.$container,selectors:{originalSelectorId:"productSelect-"+sectionId,productSection:"#ProductSection-"+sectionId,productLink:".product__content--link-"+sectionId,addToCart:"#AddToCart-"+sectionId,productPrice:"#ProductPrice-"+sectionId,comparePrice:"#ComparePrice-"+sectionId,addToCartText:"#AddToCartText-"+sectionId,quantityElements:"#quantity-selector-"+sectionId,slider:"#slider-"+sectionId,selectorWrapper:".selector-wrapper"+sectionId,SKU:".variant-sku",shopifyPaymentButton:".shopify-payment-button"}}),$("body").hasClass("template-index")&&(this.settings.enableHistoryState=!1),!$("#ProductJson-"+sectionId).html()){this.addQuantityButtons();return}this.productSingleObject=JSON.parse(document.getElementById("ProductJson-"+sectionId).innerHTML),this.init()}return Product.prototype=_.assignIn({},Product.prototype,{init:function(){this.stringOverrides(),this.initProductVariant(),this.initSliderImages(),this.addQuantityButtons(),theme.customSelectorArrow(this.$container),$(".pdp_image_container").slick({infinite:!1,arrows:!1,dots:!0,asNavFor:".pdp_image_slides",slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0}),$(".pdp_image_slides").slick({vertical:!0,infinite:!1,arrows:!1,dots:!1,asNavFor:".pdp_image_container",focusOnSelect:!0,slidesToShow:5,slidesToScroll:5,centerMode:!1}),$(".pdp_image_slides a").click(function(){return!1}),$(".image-popup",this.$container).TxtPopup({type:"image",gallery:{enabled:!0},mainClass:"mfp-fade"})},onUnload:function(){delete theme.slideshows[this.settings.selectors.slider]},stringOverrides:function(){theme.productStrings=theme.productStrings||{},$.extend(theme.strings,theme.productStrings)},addQuantityButtons:function(){$(this.settings.selectors.quantityElements).children("input#Quantity").length>0&&$(this.settings.selectors.quantityElements).children("input#Quantity").after('<div class="input-holder plus"><button type="button" value="" class="plus" aria-label="'+theme.strings.increase_quantity+'">'+$.themeAssets.plus+"</button></div>").before('<div class="input-holder minus"><button type="button" value="" class="minus" aria-label="'+theme.strings.reduce_quantity+'">'+$.themeAssets.minus+"</button></div>")},initProductVariant:function(){if(this.productSingleObject){var self=this;this.optionSelector=new Shopify.OptionSelectors(self.settings.selectors.originalSelectorId,{selectorClass:self.settings.selectors.optionSelectorClass,product:self.productSingleObject,onVariantSelected:self.productVariantCallback,enableHistoryState:self.settings.enableHistoryState,settings:self.settings}),this.simplifyVariantLabels(this.productSingleObject)}},simplifyVariantLabels:function(productObject){productObject.variants.length===1&&productObject.options.length===1&&productObject.options[0].toLowerCase().indexOf("title")>=0&&productObject.variants[0].title.toLowerCase().indexOf("default title")>=0&&$(this.settings.selectors.productSection+" .selector-wrapper").hide()},initSliderImages:function(){var slideshow=this.settings.selectors.slider;$("img",this.slideshow).addClass("lazypreload"),theme.slideshows[slideshow]=new theme.Slideshow(slideshow)},productVariantCallback:function(variant){if(variant){if(variant.featured_image){var $slider=$(this.settings.selectors.slider),$newImg=$slider.find('.slide[data-variant-img="'+variant.featured_image.id+'"]');$newImg.length>0&&($slider.hasClass("loaded")?$slider.flexslider($newImg.data("index")):$slider.data("loaded-index",$newImg.data("index")))}var $productLink=$(this.settings.selectors.productLink);$productLink.length&&$productLink.attr("href",updateUrlParameter($productLink.attr("href"),"variant",variant.id)),$(this.settings.selectors.productPrice).html(Shopify.formatMoney(variant.price,theme.settings.moneyFormat)),$(this.settings.selectors.SKU).html(variant.sku),variant.compare_at_price>variant.price?$(this.settings.selectors.comparePrice).html(Shopify.formatMoney(variant.compare_at_price,theme.settings.moneyFormat)).show():$(this.settings.selectors.comparePrice).hide(),variant.available?($(this.settings.selectors.addToCart).removeClass("btn--disabled").prop("disabled",!1),$(this.settings.selectors.addToCartText).text(theme.strings.add_to_cart),$(this.settings.selectors.quantityElements).removeClass("hidden"),$(this.settings.selectors.shopifyPaymentButton,this.settings.$container).show()):($(this.settings.selectors.addToCart).addClass("btn--disabled").prop("disabled",!0),$(this.settings.selectors.addToCartText).text(theme.strings.sold_out),$(this.settings.selectors.quantityElements).addClass("hidden"),$(this.settings.selectors.shopifyPaymentButton,this.settings.$container).hide())}else $(this.settings.selectors.addToCart).addClass("btn--disabled").prop("disabled",!0),$(this.settings.selectors.addToCartText).text(theme.strings.unavailable),$(this.settings.selectors.quantityElements).addClass("hidden"),$(this.settings.selectors.shopifyPaymentButton,this.settings.$container).hide();function updateUrlParameter(url,key,value){var re=new RegExp("([?&])"+key+"=.*?(&|$)","i"),separator=url.indexOf("?")===-1?"?":"&";return url.match(re)?url.replace(re,"$1"+key+"="+value+"$2"):url+separator+key+"="+value}}}),Product})(),theme.slideshows={},theme.SlideshowSection=(function(){function SlideshowSection(container){var $container=this.$container=$(container),id=$container.attr("data-section-id"),slideshow=this.slideshow="#flexslider--"+id;theme.slideshows[slideshow]=new theme.Slideshow(slideshow)}return SlideshowSection})(),theme.SlideshowSection.prototype=_.assignIn({},theme.SlideshowSection.prototype,{onUnload:function(){delete theme.slideshows[this.slideshow]},onBlockSelect:function(evt){var $slideshow=$(this.slideshow),$slide=$("#slide-"+evt.detail.blockId+":not(.clone)"),slideIndex=$slide.data("flexslider-index"),$slideImg=$slide.find("img")||$slide.find("svg");$slide.imagesLoaded($slideImg,function(){$slideshow.flexslider(slideIndex),$slideshow.resize(),$slideshow.flexslider("pause")})},onBlockDeselect:function(){var $slideshow=$(this.slideshow);$slideshow.flexslider("play")}}),window.theme=window.theme||{},theme.Kickstarter=(function(){function Kickstarter(container){this.$container=$(container),theme.crowdCampaign(this.$container)}return Kickstarter.prototype=_.assignIn({},Kickstarter.prototype,{init:function(){theme.crowdCampaign(this.$container)},onSelect:function(){theme.crowdCampaign(this.$container)}}),Kickstarter})(),window.theme=window.theme||{},theme.FAQs=(function(){function FAQs(container){var $container=this.$container=$(container);this.faqSelector=".jumpstart-accordion-"+this.sectionId,theme.accordionFAQs(this.$container),this.$blocks=$(".section",$container),this.$opened=$(".opened",$container)}return FAQs.prototype=_.assignIn({},FAQs.prototype,{init:function(){this.$opened.find(".content").slidedown(0),this.$blocks.find(".title").prepend($.themeAssets.plus+$.themeAssets.minus),this.$blocks.on("click",function(evt){var blockId=$(evt.target).attr("data-block-id");this.focusFAQ(blockId)})},focusFAQ:function(blockId,isEditorEvent){var $accordionItem=$(".section-"+blockId);$accordionItem.hasClass("opened")&&!isEditorEvent?($accordionItem.removeClass("opened"),$accordionItem.children("div").stop().slideUp(300)):($accordionItem.addClass("opened"),$accordionItem.children("div").stop().slideDown(300),this.$blocks.not($accordionItem).removeClass("opened").children("div").stop().slideUp(300))},onBlockSelect:function(evt){this.focusFAQ(evt.detail.blockId,!0)},onload:function(){theme.accordionFAQs(this.$container)}}),FAQs}
1)(),theme.Maps=(function(){var config={zoom:14},apiStatus=null,mapsToLoad=[];function Map(container){theme.$currentMapContainer=this.$container=$(container);var key=this.$container.data("api-key");if(!(typeof key!="string"||key===""))if(apiStatus==="loaded"){var self=this,$script=$('script[src*="'+key+'&"]');$script.length===0?$.getScript("https://maps.googleapis.com/maps/api/js?key="+key).then(function(){apiStatus="loaded",self.createMap()}):this.createMap()}else mapsToLoad.push(this),apiStatus!=="loading"&&(apiStatus="loading",typeof window.google=="undefined"&&$.getScript("https://maps.googleapis.com/maps/api/js?key="+key).then(function(){apiStatus="loaded",initAllMaps()}))}function initAllMaps(){$.each(mapsToLoad,function(index,instance){instance.createMap()})}function geolocate($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}return Map.prototype=_.assignIn({},Map.prototype,{createMap:function(){var $map=this.$container.find(".map-section__container");return geolocate($map).then(function(results){var mapOptions={zoom:config.zoom,styles:config.styles,center:results[0].geometry.location,draggable:!1,clickableIcons:!1,scrollwheel:!1,disableDoubleClickZoom:!0,disableDefaultUI:!0},map=this.map=new google.maps.Map($map[0],mapOptions),center=this.center=map.getCenter(),marker=new google.maps.Marker({map:map,position:center});google.maps.event.addDomListener(window,"resize",$.debounce(250,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}var $mapContainer=$map.parents(".map-section");Shopify.designMode?($mapContainer.addClass("page-width map-section--load-error"),$mapContainer.find(".map-section__content-wrapper").remove(),$mapContainer.find(".map-section__wrapper").html('<div class="errors text-center" style="width: 100%;">'+errorMessage+"</div>")):$mapContainer.removeClass("map-section--display-map")})},onUnload:function(){typeof window.google!="undefined"&&google.maps.event.clearListeners(this.map,"resize")}}),Map})();function gm_authFailure(){Shopify.designMode?(theme.$currentMapContainer.addClass("page-width map-section--load-error"),theme.$currentMapContainer.find(".map-section__content-wrapper").remove(),theme.$currentMapContainer.find(".map-section__wrapper").html('<div class="errors text-center" style="width: 100%;">'+theme.strings.authError+"</div>")):theme.$currentMapContainer.removeClass("map-section--display-map")}window.theme=window.theme||{},theme.Collection=(function(){function Collection(){theme.collectionGridMasonry()}return Collection.prototype=_.assignIn({},Collection.prototype,{init:function(){theme.collectionGridMasonry()},onSelect:function(){theme.collectionGridMasonry()}}),Collection})(),window.theme=window.theme||{},theme.Search=(function(){function Search(){theme.collectionGridMasonry()}return Search.prototype=_.assignIn({},Search.prototype,{init:function(){theme.collectionGridMasonry()},onSelect:function(){theme.collectionGridMasonry()}}),Search})(),theme.cacheSelectors=function(){theme.cache={$html:$("html"),$body:$("body"),$wrapper:$(".wrapper"),$sidebar:$("#sidebar"),$logo:$("#logo"),$meta:$("#meta"),$siteHeader:$(".site-header"),$menu:$("#menu"),$nav:$("#AccessibleNav"),$siteLogo:$(".site-header__logo"),$mobileMenu:$(".nav-bar"),$mobileMenuButton:$("#menu-opener"),$responsiveMenu:$("#meta").find(".responsive-menu"),$responsiveClose:$(".responsive-close"),$options:$("#options"),$footer:$("#footer"),$content:$("#content"),touchM:"ontouchstart"in window,iOS:/(iPad|iPhone|iPod)/g.test(navigator.userAgent),navWidth:0,logoWidth:0}},theme.customSelectorArrow=function(el){var scope=el||document;$("select",$(scope)).each(function(){$(this).wrap('<div class="jumpstart-selector"></div>'),$(this).parent().attr("style",$(this).attr("style")),$(this).parent().append('<span class="arrow">'+$.themeAssets.arrow_down+"</span>")})},theme.collectionGridMasonry=function(){typeof $.fn.packery!="undefined"&&$(".collection-list").length>0&&$(".collection-list").imagesLoaded(function(){$(".collection-list").packery({itemSelector:".product",transitionDuration:0})})},theme.parallaxBg=function(){if(!(!$(".parallax-bg").length>0||!$("#section-a").length>0)){var $prlxBg,$prlxTxt;$("#section-a").length>0?($prlxBg=$("#section-a span.prlx-bg"),$prlxTxt=$("#section-a .wrapper").addClass("prlx-txt"),$prlxBg.parent().addClass("parallax-bg")):($prlxBg=$(".prlx-bg"),$prlxTxt=$(".prlx-txt")),$(window).on("scroll",function(){!$(window).scrollTop()<$prlxBg.height()||($prlxBg.css("transform","translate3d(0px, "+$(window).scrollTop()/4
1+"px, 0px)"),$prlxTxt.css("transform","translate3d(0px, "+$(window).scrollTop()/8+"px, 0px)"))})}},theme.quantityButtons=function(){$("input#Quantity").length>0&&$(document).on("click",".plus, .minus",function(){var $qty=$(this).siblings("#Quantity"),currentVal=parseFloat($qty.val()),max=parseFloat($qty.attr("max")),min=parseFloat($qty.attr("min")),step=$qty.attr("step");(!currentVal||currentVal===""||currentVal==="NaN")&&(currentVal=0),(max===""||max==="NaN")&&(max=""),(min===""||min==="NaN")&&(min=0),(step==="any"||step===""||step===void 0||parseFloat(step)==="NaN")&&(step=1),$(this).is(".plus")?max&&(max===currentVal||currentVal>max)?$qty.val(max):$qty.val(currentVal+parseFloat(step)):min&&(min===currentVal||currentVal<min)?$qty.val(min):currentVal>0&&$qty.val(currentVal-parseFloat(step)),$qty.trigger("change")})},theme.passwordFooter=function(){if(!(!$(".template-password").length>0)){var $pageContainer=$("#PageContainer"),$passwordFooter=$("#password-footer");$(window).on("resize",function(){$(window).height()<$pageContainer.height()?$passwordFooter.removeClass("full"):$passwordFooter.addClass("full")}).trigger("resize")}},theme.infiniteBlog=function(){var $infiniteLink=$("#infinite-link"),$infiniteURL=$infiniteLink.children("a"),$blogList=$(".blog-list");$infiniteLink.length>0&&$infiniteURL.on("click",function(e){$infiniteURL.addClass("btn--disabled").text("Loading ...");var href=$(this).attr("href");$.ajax({url:href,dataType:"html",success:function(data){var $data=$(data),$posts=$data.find("a.article"),$infinite=$data.find("#infinite-link");$posts.imagesLoaded(function(){$posts.css("display","none"),$blogList.append($posts),$posts.slideDown(300),$infinite.length>0?$infiniteURL.removeClass("btn--disabled").text("More posts").prop("href",$infinite.children("a").prop("href")):$infiniteURL.text("All posts loaded")})}}),e.preventDefault()})},theme.homeGallery=function(){$(".home-gallery").length>0&&$(".home-gallery").imagesLoaded(function(){$(".home-gallery").find(".item").each(function(){var $img=$(this).find("img");$img[0].naturalWidth<=$img[0].naturalHeight?$(this).addClass("one-quarter medium-down--one-half"):$(this).addClass("one-half medium-down--one-whole")}),$(".home-gallery").find(".packery-container").packery({itemSelector:".grid__item",gutter:0,percentPosition:!0,transitionDuration:0}),$(".home-gallery").addClass("init"),$(".home-gallery").find(".packery-container").packery()})},theme.iframePopUp=function(){$(".video-overlay").magnificPopup({type:"iframe",mainClass:"mfp-fade"})},theme.accordionFAQs=function(el){var scope=el||document;$(".jumpstart-accordion",$(scope)).length>0&&$(".jumpstart-accordion",$(scope)).each(function(){var $sections=$(this).children("div"),$opened=$sections.filter(".opened");$opened.children("div").slideDown(0),$(this).children("div").children("h3").prepend($.themeAssets.plus+$.themeAssets.minus).click(function(){var $this=$(this).parent();$this.hasClass("opened")?($this.removeClass("opened"),$this.children("div").stop().slideUp(300)):($this.addClass("opened"),$this.children("div").stop().slideDown(300),$sections.not($this).removeClass("opened").children("div").stop().slideUp(300))})})},theme.crowdCampaign=function($campaignContainer){if(!(!$(".home-kickstarter").length>0)){var sectionId=$campaignContainer.data("section-id");$(".kickstarter__graphic.pie",$campaignContainer).html('<canvas id="kickstarter__pie--help--'+sectionId+'" width="110" height="110"></canvas><canvas id="kickstarter__pie--'+sectionId+'" width="110" height="110"></canvas>');var progress=0,pieI=null,pieValue=Math.min(parseInt($(".kickstarter__graphic",$campaignContainer).data("value"))/100,1),pieColor=$(".kickstarter__graphic",$campaignContainer).data("color"),pieCanvas=document.getElementById("kickstarter__pie--"+sectionId),context=pieCanvas.getContext("2d"),centerX=pieCanvas.width/2,centerY=pieCanvas.height/2,radius=45;context.lineWidth=15,context.strokeStyle=pieColor,context.lineCap="round",pieI=setInterval(function(){progress=progress+.0025,context.clearRect(0,0,pieCanvas.width,pieCanvas.height),context.beginPath(),context.arc(centerX,centerY,radius,0,2*progress*Math.PI,!1),context.stroke(),progress>=pieValue&&clearInterval(pieI)},5);var pieCanvasHelp=document.getElementById("kickstarter__pie--help--"+sectionId),contextHelp=pieCanvasHelp.getContext("2d"),centerXHelp=pieCanvasHelp.width/2,centerYHelp=pieCanvasHelp.height/2,radiusHelp=45;contextHelp.lineWidth=15,contextHelp.strokeStyle="#e9e9e9",contextHelp.lineCap="round",contextHelp.beginPath(),contextHelp.arc(centerXHelp,centerYHelp,radiusHelp,0,2*Math.PI,!1),contextHelp.stroke();var barValue=Math.min(parseInt($(".kickstarter__graphic.bar",$campaignContainer).data("value")),100);$(".kickstarter__graphic.bar",$campaignContainer).append('<div class="value"></div>'),$(".kickstarter__graphic.bar .value",$campaignContainer).css("width",barValue+"%")}},$(document).ready(function(){var sections=new theme.Sections;sections.register("header-section",theme.HeaderSection),sections.register("slideshow-section",theme.SlideshowSection),sections.register("product",theme.Product),sections.register("home-product",theme.Product),sections.register("collection-template",theme.Collection),sections.register("list-collection-template",theme.Collection),sections.register("home-kickstarter",theme.Kickstarter),sections.register("home-faq",theme.FAQs),sections.register("feature-collection",theme.Collection),sections.register("map-section",theme.Maps),sections.register("search",theme.Search)}),(function($2){$2(document).ready(function($3){"use strict";var $html=$3("html"),$body=$3("body"),$wrapper=$3(".wrapper"),$sidebar=$3("#sidebar"),$logo=$3("#logo"),$meta=$3("#meta"),$siteHeader=$3(".site-header"),$menu=$3("#menu"),$nav=$3("#AccessibleNav"),$siteLogo=$3(".
1site-header__logo"),$mobileMenu=$3(".nav-bar"),$mobileMenuButton=$3("#menu-opener"),$responsiveMenu=$meta.find(".responsive-menu"),$responsiveClose=$3(".responsive-close"),$options=$3("#options"),$footer=$3("#footer"),$content=$3("#content"),touchM="ontouchstart"in window,iOS=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),navWidth=0,logoWidth=0})})(jQuery),theme.attachMiscHandlers=function(){$(".preorder-badge").click(function(){return $(".preorder-terms-popup").addClass("visible"),$("body").addClass("modal-visible"),!1}),$(".preorder-terms-popup a.close").click(function(){return $(this).closest(".preorder-terms-popup").removeClass("visible"),$("body").removeClass("modal-visible"),!1}),$(".preorder-terms-popup").click(function(e){e.target==$(".preorder-terms-popup").get(0)&&($(".preorder-terms-popup").removeClass("visible"),$("body").removeClass("visible"))})},theme.init=function(){theme.cacheSelectors(),theme.parallaxBg(),theme.customSelectorArrow(),theme.quantityButtons(),theme.passwordFooter(),theme.infiniteBlog(),theme.homeGallery(),theme.iframePopUp(),theme.attachMiscHandlers(),theme.cache.$body.hasClass("template-index")&&$(".main-content").children(".index-sections").children(".shopify-section").length%2!==0&&$(".social-footer").addClass("even")},$(theme.init);
2//# sourceMappingURL=/cdn/shop/t/14/assets/theme.js.map?v=145932643527110581021636607720

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.