1var onSale=!1,soldOut=!1,priceVaries=!1,images=[],firstVariant={},boostPFSFilterConfig={general:{limit:boostPFSThemeConfig.custom.products_per_page,loadProductFirst:!0,numberFilterTree:2,filterTreeMobileStyle:"style1",showRefineBy:!0,separateRefineByFromFilter:!0,enableAjaxCart:!0,selectOptionInProductItem:!0,showAjaxCartOnAdd:!1},selector:{otpButtons:".ProductItem__ImageWrapper"}};(function(){BoostPFS.inject(this);function prepareShopifyData(data){soldOut=!data.available,onSale=data.compare_at_price_min>data.price_min,priceVaries=data.price_min!=data.price_max,images=data.images_info;var firstVariant2=data.variants[0];if(Utils.getParam("variant")!==null&&Utils.getParam("variant")!=""){var paramVariant=data.variants.filter(function(e){return e.id==Utils.getParam("variant")});typeof paramVariant[0]!="undefined"&&(firstVariant2=paramVariant[0])}else for(var i=0;i<data.variants.length;i++)if(data.variants[i].available){firstVariant2=data.variants[i];break}return data}ProductGridItem.prototype.compileTemplate=function(data,index){data||(data=this.data),index||(index=this.index);var itemHtml=boostPFSTemplate.productGridItemHtml;return data=prepareShopifyData(data),itemHtml=itemHtml.replace(/{{itemLabels}}/g,buildLabels(data)),itemHtml=itemHtml.replace(/{{mobileRow}}/g,boostPFSConfig.custom.mobile_row),itemHtml=itemHtml.replace(/{{tabletRow}}/g,boostPFSConfig.custom.tablet_row),itemHtml=itemHtml.replace(/{{desktopRow}}/g,boostPFSConfig.custom.desktop_row),itemHtml=itemHtml.replace(/{{itemImages}}/g,buildImage(data,images)),itemHtml=itemHtml.replace(/{{itemInfo}}/g,buildInfo(data,index)),(typeof Integration=="undefined"||!Integration.hascompileTemplate("reviews"))&&(itemHtml=itemHtml.replace(/{{itemReviews}}/g,"")),itemHtml=itemHtml.replace(/{{buildClassHiz}}/g,buildClassHiz()),itemHtml=itemHtml.replace(/{{buildClass}}/g,buildClass()),itemHtml=itemHtml.replace(/{{buildButtonSecond}}/g,buildButtonSecond()),itemHtml=itemHtml.replace(/{{itemUrl}}/g,Utils.buildProductItemUrl(data)),typeof Utils.compileShopifyProductVariables=="function"&&(itemHtml=Utils.compileShopifyProductVariables(data,itemHtml)),typeof Utils.compileShopifyProductMetafield=="function"&&(itemHtml=Utils.compileShopifyProductMetafield(data,itemHtml)),itemHtml};function buildClass(){return boostPFSThemeConfig.custom.filter_position=="drawer"?"lap-and-up":"desk"}function buildClassHiz(){return boostPFSThemeConfig.custom.use_horizontal?"ProductItem--horizontal":""}function buildButtonSecond(){return boostPFSThemeConfig.custom.use_horizontal?'<a href="{{itemUrl}}" class="ProductItem__ViewButton Button Button--secondary hidden-pocket">'+boostPFSThemeConfig.label.view_product+"</a>":""}function buildImage(data,images2){var htmlImg="";if(images2||(images2=[]),images2.length==0&&images2.push({src:boostPFSConfig.general.no_image_url,id:data.id,width:480,height:480}),images2.length>0){htmlImg+='<a href="{{itemUrl}}" class="ProductItem__ImageWrapper ';var use_natural_size=!1,has_alternate_image=!1;(boostPFSThemeConfig.custom.product_image_size=="natural"||boostPFSThemeConfig.custom.use_horizontal)&&(use_natural_size=!0),boostPFSThemeConfig.custom.product_show_secondary_image&&images2.length>1&&!boostPFSThemeConfig.custom.use_horizontal&&(has_alternate_image=!0),has_alternate_image&&(htmlImg+="ProductItem__ImageWrapper--withAlternateImage"),htmlImg+='">';var max_width=images2[0].width;boostPFSThemeConfig.custom.use_horizontal&&(max_width=125);var withCall=use_natural_size?"withFallback":boostPFSThemeConfig.custom.product_image_size;htmlImg+='<div class="AspectRatio AspectRatio--'+withCall+'" style="max-width: '+max_width+"px;";var aspect_ratio=images2[0].width/images2[0].height;if(use_natural_size&&(htmlImg+="padding-bottom: "+100/aspect_ratio+"%;"),htmlImg+=" --aspect-ratio: "+aspect_ratio+'">',has_alternate_image&&images2.length>1){var sizes="200,300,400,600,800,900,1000,1200",support_size=imageSize(sizes,images2[1]),thumbUrl=Utils.optimizeImage(images2[1].src,"{width}x");htmlImg+='<img class="ProductItem__Image ProductItem__Image--alternate Image--lazyLoad Image--fadeIn" data-src="'+thumbUrl+'" data-widths="['+support_size+']" data-sizes="auto" alt="'+data.title+'" data-image-id="'+images2[1].id+'">'}
1var sizes_main="200,400,600,700,800,900,1000,1200",support_size=imageSize(sizes_main,images2[0]),thumbUrl_main=images2.length>0?Utils.optimizeImage(images2[0].src,"{width}x"):boostPFSConfig.general.no_image_url;htmlImg+='<img class="ProductItem__Image Image--lazyLoad Image--fadeIn" data-src="'+thumbUrl_main+'" data-widths="['+support_size+']" data-sizes="auto" alt="'+data.title+'" data-image-id="'+images2[0].id+'">',htmlImg+='<span class="Image__Loader"></span>',htmlImg+="<noscript>",htmlImg+='<img class="ProductItem__Image ProductItem__Image--alternate" src="'+Utils.optimizeImage(images2[0].src,"600x")+'" alt="'+data.title+'">',htmlImg+='<img class="ProductItem__Image" src="'+Utils.optimizeImage(images2[0].src,"600x")+'" alt="'+data.title+'">',htmlImg+="</noscript>",htmlImg+="</div>",htmlImg+="</a>"}return htmlImg}function imageSize(sizes,image){if(image){for(var desired_sizes=sizes.split(","),supported_sizes="",k=0;k<desired_sizes.length;k++){var size=desired_sizes[k],size_as_int=size*1;if(image.width<size_as_int)break;supported_sizes=supported_sizes+size+","}return supported_sizes==""&&(supported_sizes=image.width),jQ.isNumeric(supported_sizes)||(supported_sizes=supported_sizes.split(",").join(","),supported_sizes=supported_sizes.substring(0,supported_sizes.lastIndexOf(","))),supported_sizes}else return""}function buildPrice(data){var html="",show_price_on_hover=boostPFSThemeConfig.custom.product_show_price_on_hover,classPriceHover=show_price_on_hover?"ProductItem__PriceList--showOnHover":"";return html+='<div class="ProductItem__PriceList '+classPriceHover+' Heading">',onSale?(html+='<span class="ProductItem__Price Price Price--highlight Text--subdued" data-money-convertible>'+Utils.formatMoney(data.price_min)+"</span> ",html+='<span class="ProductItem__Price Price Price--compareAt Text--subdued" data-money-convertible>'+Utils.formatMoney(data.compare_at_price_min)+"</span>"):priceVaries?html+='<span class="ProductItem__Price Price Text--subdued">'+boostPFSThemeConfig.label.from.replace(/{{min_price}}/g,Utils.formatMoney(data.price_min))+"</span>":html+='<span class="ProductItem__Price Price Text--subdued" data-money-convertible>'+Utils.formatMoney(data.price_min)+"</span>",html+="</div>",html}function buildLabels(data){var html="",product_labels="";if(boostPFSThemeConfig.custom.show_labels){product_labels="";for(var tags=data.tags,k=0;k<tags.length;k++){var tag=tags[k];if(tag.indexOf("__label")!=-1){product_labels+='<span class="ProductItem__Label Heading Text--subdued">'+tag.split("__label:")[1]+"</span>";break}}soldOut?product_labels+=' <span class="ProductItem__Label Heading Text--subdued">'+boostPFSThemeConfig.label.sold_out+"</span>":onSale&&(product_labels+='<span class="ProductItem__Label Heading Text--subdued">'+boostPFSThemeConfig.label.sale+"</span>"),product_labels!=""&&(html+='<div class="ProductItem__LabelList">',html+=product_labels,html+="</div>")}return html}function buildInfo(data,indx){var html="";if(boostPFSThemeConfig.custom.show_product_info){var infoClass=boostPFSThemeConfig.custom.use_horizontal?"":"ProductItem__Info--"+boostPFSThemeConfig.custom.product_info_alignment;html+='<div class="ProductItem__Info '+infoClass+' ">',boostPFSThemeConfig.custom.show_vendor&&(html+='<p class="ProductItem__Vendor Heading">'+data.vendor+"</p>"),html+='<h2 class="ProductItem__Title Heading">',html+='<a href="{{itemUrl}}">'+data.title+"</a>",html+="</h2>",html+="{{itemReviews}}",html+=buildPrice(data),boostPFSThemeConfig.custom.show_color_swatch&&(html+=buildSwatch(data,indx)),html+="</div>"}return html}function buildSwatch(data,indx){var itemSwatchHtml="";if(boostPFSThemeConfig.custom.show_color_swatch){var color_name=boostPFSThemeConfig.custom.section_id+"-"+data.id+"-"+indx;data.options_with_values.forEach(function(option,index){var option_name=option.name.toLowerCase();if(option_name.indexOf("color")!=-1||option_name.indexOf("colour")!=-1||option_name.indexOf("couleur")!=-1){var values="";itemSwatchHtml+='<div class="ProductItem__ColorSwatchList">';var i=0;
1data.variants.forEach(function(variant){var temp=variant.merged_options.filter(function(obj){if(obj=obj.toLowerCase(),obj.indexOf("color")!=-1||obj.indexOf("colour")!=-1||obj.indexOf("couleur")!=-1)return obj});temp=temp[0].split(":");var value=temp[1].toLowerCase();if(values.indexOf(value)==-1){values=values+","+value,values=values.split(",");var size="200,400,600,700,800,900,1000,1200",supported_sizes=imageSize(size,variant.image),color_image=Utils.optimizeImage(variant.image),name_color=Utils.slugify(value)+".png",checked=i==0?"checked=checked":"",imageInfo=null,image_aspect_ratio=1;imageInfo=data.images_info.find(function(imageOb){if(imageOb.src==variant.image)return image_aspect_ratio=imageOb.width/imageOb.height,imageOb}),imageInfo||(data.images_info.length>0?imageInfo=data.images_info[0]:imageInfo={src:boostPFSConfig.general.no_image_url,id:variant.id,width:480,height:480});var dataImg=imageInfo!=null?'" data-image-url="'+imageInfo.src+'" data-image-widths="['+supported_sizes+']" data-image-aspect-ratio="1" data-image-id="'+imageInfo.id+'"':"",color_input_id=color_name+"-"+values.length,variant_price=variant.price?variant.price:0,variant_compare_at_price=variant.compare_at_price?variant.compare_at_price:0,url_color=Utils.getFilePath(Utils.slugify(value),Globals.swatchExtension,Settings.getSettingValue("general.swatchImageVersion"));itemSwatchHtml+='<div class="ProductItem__ColorSwatchItem">',itemSwatchHtml+='<input class="ColorSwatch__Radio" type="radio" '+checked+' name="'+color_name+'" id="'+color_input_id+'" value="'+value+'" data-image-aspect-ratio="'+image_aspect_ratio+'" data-variant-price="'+variant_price+'" data-variant-compare-at-price="'+variant_compare_at_price+'" data-variant-url="'+Utils.buildProductItemUrl(data)+"?variant="+variant.id+"#Image"+imageInfo.id+'"'+dataImg+' aria-hidden="true">',itemSwatchHtml+='<label class="ColorSwatch ColorSwatch--small" for="'+color_input_id+'" style="background-color: '+value.replace(" ","").toLowerCase()+"; background-image: url("+url_color+')" title="'+value+'" data-tooltip="'+value+'"></label>',itemSwatchHtml+="</div>",i++}}),itemSwatchHtml+="</div>"}})}return itemSwatchHtml}ProductPaginationDefault.prototype.compileTemplate=function(totalProduct){totalProduct||(totalProduct=this.totalProduct);var currentPage=parseInt(Globals.queryParams.page),totalPage=Math.ceil(totalProduct/Globals.queryParams.limit);if(totalPage>1){var paginationHtml=boostPFSTemplate.paginateHtml,previousHtml=currentPage>1?boostPFSTemplate.previousActiveHtml:boostPFSTemplate.previousDisabledHtml;previousHtml=previousHtml.replace(/{{itemUrl}}/g,Utils.buildToolbarLink("page",currentPage,currentPage-1)),paginationHtml=paginationHtml.replace(/{{previous}}/g,previousHtml);var nextHtml=currentPage<totalPage?boostPFSTemplate.nextActiveHtml:boostPFSTemplate.nextDisabledHtml;nextHtml=nextHtml.replace(/{{itemUrl}}/g,Utils.buildToolbarLink("page",currentPage,currentPage+1)),paginationHtml=paginationHtml.replace(/{{next}}/g,nextHtml);for(var beforeCurrentPageArr=[],iBefore=currentPage-1;iBefore>currentPage-3&&iBefore>0;iBefore--)beforeCurrentPageArr.unshift(iBefore);currentPage-4>0&&beforeCurrentPageArr.unshift("..."),currentPage-4>=0&&beforeCurrentPageArr.unshift(1),beforeCurrentPageArr.push(currentPage);for(var afterCurrentPageArr=[],iAfter=currentPage+1;iAfter<currentPage+3&&iAfter<=totalPage;iAfter++)afterCurrentPageArr.push(iAfter);currentPage+3<totalPage&&afterCurrentPageArr.push("..."),currentPage+3<=totalPage&&afterCurrentPageArr.push(totalPage);for(var pageItemsHtml="",pageArr=beforeCurrentPageArr.concat(afterCurrentPageArr),iPage=0;iPage<pageArr.length;iPage++)pageArr[iPage]=="..."?pageItemsHtml+=boostPFSTemplate.pageItemRemainHtml:pageItemsHtml+=pageArr[iPage]==currentPage?boostPFSTemplate.pageItemSelectedHtml:boostPFSTemplate.pageItemHtml,pageItemsHtml=pageItemsHtml.replace(/{{itemTitle}}/g,pageArr[iPage]),pageItemsHtml=pageItemsHtml.replace(/{{itemUrl}}/g,Utils.buildToolbarLink("page",currentPage,pageArr[iPage]));return paginationHtml=paginationHtml.replace(/{{pageItems}}/g,pageItemsHtml),paginationHtml}return""},ProductSorting.prototype.compileTemplate=function(){var html="";if(boostPFSThemeConfig.custom.show_sorting&&boostPFSTemplate.hasOwnProperty("sortingHtml")){var sortingArr=Utils.getSortingList();if(sortingArr){var sortingItemsHtml="";for(var k in sortingArr){var classActive=Globals.queryParams.sort==k?"is-selected":"";
1sortingItemsHtml+='<button class="Popover__Value '+classActive+' Heading Link Link--primary u-h6" data-value="'+k+'">'+sortingArr[k]+"</button>"}html=boostPFSTemplate.sortingHtml.replace(/{{sortingItems}}/g,sortingItemsHtml)}}return html},ProductSorting.prototype.bindEvents=function(){var topSortingSelector=jQ(Selector.topSorting);topSortingSelector.find(".Popover__Value").click(function(e){FilterApi.setParam("sort",jQ(this).data("value")),FilterApi.setParam("page",1),FilterApi.applyFilter("sort"),jQ(".CollectionToolbar__Item--sort").trigger("click")})},ProductList.prototype.afterRender=function(data,eventType){data||(data=this.data),eventType||(eventType=this.eventType),Utils.isMobile()&&boostPFSFilterConfig.general.filterTreeMobileStyle=="style1"&&jQ("body").addClass("boost-pfs-filter-tree-open-body"),jQ(".ProductItem__Info .ProductItem__ColorSwatchList .ProductItem__ColorSwatchItem label.ColorSwatch").click(function(){jQ(this).parent().parent().find("label.ColorSwatch").removeClass("active"),jQ(this).addClass("active");var parent=jQ(this).parent(),productImage=jQ(this).parent().parent().parent().parent().find("a.ProductItem__ImageWrapper"),variantInfo=parent.find("input.ColorSwatch__Radio");productImage.find(".AspectRatio .bc-sf-product-swatch-img").remove(),productImage.find(".AspectRatio").prepend('<img class="bc-sf-product-swatch-img" src="'+variantInfo.data("image-url")+'" />'),productImage.find("img.ProductItem__Image").hide(),productImage.attr("href",variantInfo.data("variant-url"));var variantPrice="";variantInfo.data("variant-compare-at-price")>variantInfo.data("variant-price")?(variantPrice+='<span class="ProductItem__Price Price Price--highlight Text--subdued" data-money-convertible="">'+Utils.formatMoney(variantInfo.data("variant-price"))+"</span>",variantPrice+='<span class="ProductItem__Price Price Price--compareAt Text--subdued" data-money-convertible="">'+Utils.formatMoney(variantInfo.data("variant-compare-at-price"))+"</span>"):variantPrice+='<span class="ProductItem__Price Price Text--subdued" data-money-convertible>'+Utils.formatMoney(variantInfo.data("variant-price"))+"</span>",jQ(this).closest(".ProductItem__Wrapper").find(".ProductItem__PriceList").html(variantPrice)});var desktopView=jQ(".CollectionToolbar__LayoutSwitch.hidden-phone").find(".is-active").data("count");desktopView&&desktopView!=parseInt(boostPFSThemeConfig.custom.desktop_row)&&(jQ(Selector.products+" .Grid__Cell").removeClass("1/"+boostPFSThemeConfig.custom.tablet_row+"--tablet-and-up 1/"+boostPFSThemeConfig.custom.desktop_row+"--"+buildClass()),jQ(Selector.products+" .Grid__Cell").addClass("1/"+desktopView+"--tablet-and-up 1/"+desktopView+"--"+buildClass()));var mobileView=jQ(".CollectionToolbar__LayoutSwitch.hidden-tablet-and-up").find(".is-active").data("count");mobileView&&mobileView!=parseInt(boostPFSThemeConfig.custom.mobile_row)&&(jQ(Selector.products+" .Grid__Cell").removeClass("1/"+boostPFSThemeConfig.custom.mobile_row+"--phone"),jQ(Selector.products+" .Grid__Cell").addClass("1/"+mobileView+"--phone"))},FilterResult.prototype.afterRender=function(data,eventType){data||(data=this.data),eventType||(eventType=this.eventType),jQ(document).on("click",".boost-pfs-close-opt",function(){console.log(123),jQ(".boost-pfs-select-option-close").trigger("click")})},BoostOTP.inject(this),BoostOTP.AjaxCart.prototype.onSucess=function(data,$addingLabel,$errorLabel){var _this=this;this.changeButtonLabel($addingLabel,Labels.action_list.atcAddingToCartBtnLabel,Labels.action_list.atcAddedToCartBtnLabel),setTimeout(function(){_this.changeButtonLabel($addingLabel,Labels.action_list.atcAddedToCartBtnLabel,Labels.action_list.atcAvailableLabel)},700);var isOpenCart=Settings.getSettingValue("general.showAjaxCartOnAdd");document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),jQ('[data-drawer-id="sidebar-cart"]').trigger("click")},Filter.prototype.errorFilterCallback=function(){var isiOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,isSafari=/Safari/.test(navigator.userAgent),isBackButton=window.performance&&window.performance.navigation&&window.performance.navigation.type==2;if(!(isiOS&&isSafari&&isBackButton)){var self=this,url=window.location.href.split("?")[0],searchQuery=self.isSearchPage()&&self.queryParams.hasOwnProperty("q")?"&q="+self.queryParams.q:"";window.location.replace(url+"?view=bc-original"+searchQuery)}}})(); 2//# sourceMappingURL=/cdn/shop/t/112/assets/boost-pfs-filter.js.map?v=128967712132929247681682050158
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.