var boostPFSFilterConfig={general:{limit:boostPFSConfig.custom.products_per_page,loadProductFirst:!0,paginationTypeAdvanced:!0,paginationType:"infinite"}};function currencyFormat(num){return"\xA3"+num.toFixed(2).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")}const macroSubText='',llSubText='{{itemBadges}}
{{product.metafields.custom.calories}} kcal,
{{product.metafields.custom.carbs}}g carb,
high protein
{{product.metafields.custom.calories}}kcal, lower carb, high protein
',fodmapSubText='gluten + onion free
',medSubText='plant diverse, supports immunity* + 2 of your 5 a day
',cakeSubText='2 portions, low fodmap + gluten free. contains egg.
',porridgeSubText='7 portions, low fodmap + gluten free
',cakeTasterPackSubText='low fodmap + gluten free
';var boostPFSTemplate={saleLabelHtml:' ",vendorHtml:'{{itemVendorLabel}}
',productGridItemHtml:'{{itemImages}}{{itemQuickview}}
{{buildSubText}}
{{itemButtons}}- {{previous}}{{pageItems}}{{next}}
save up to 20% on your first 2 orders":subText=subText,console.log(data.isEliminationProgramme),data.isEliminationProgramme?subText="support your elimination journey with certified low FODMAP meals, our step-by-step guide + tools to track your symptoms.":subText=subText,subText}function aggregateProducts(productIDs){const countedProducts=productIDs.reduce(function(allProducts,productID){return productID in allProducts?allProducts[productID]++:allProducts[productID]=1,allProducts},{});return Object.entries(countedProducts).map(x=>({id:x[0],count:x[1]}))}function bundleInfo(data,variant){return data.isBundle?variant.option1=="1 Person"?", {{product.metafields.single.bundleinfo}}, ":", {{product.metafields.double.bundleinfo}}, ":", false, "}function buildIcons(data){let tags=data.tags,icons="";return tags.includes("free-gluten")&&(icons+='


new
'),' "}function buildRangeStrip(data){let tags=data.tags,range="";return data.showRangeStrip&&(tags.includes("L+L")&&!data.isBundle?range='lean + lighter
':tags.includes("diet-Low FODMAP")&&!data.isBundle?range='low fodmap friendly
':tags.includes("mediterranean")&&!data.isBundle&&(range='mediterranean
'),data.isBundle&&data.isCake&&data.isLowFODMAP&&(range='low fodmap friendly
')),range}function buildAddButton(data){var html="";let from,perWeek="";data.variants.length>1||data.isPersonalisedPlan||data.isEliminationProgramme?from="from ":from="",data.isPlan&&!data.isPersonalisedPlan&&(perWeek=" per week"),html+='',html+='
":(html+='',html+=formatMoney(data.price_min),html+=` `+formatMoney(data.price_min*.95)+"");var id="";return data.isBundle?html+='view':data.isPlan||data.isEliminationProgramme?data.isPersonalisedPlan?html+='view':data.isEliminationProgramme?html+='view':html+='view':html+=``,html+="",html}function buildAddButtonOld(data){var onePerson,twoPeople,html="";for(let i=0;i'+from,data.isPlan?(window.location.href.includes("1-3")&&(html+="\xA346.20"),data.isPersonalisedPlan?html+=" \xA341.94":html+=formatMoney(data.price_min),html+=perWeek+"
"):data.isEliminationProgramme?html+="\xA350.00',html+='',html+='
',html+='
"):(data.isEliminationProgramme?html+='',html+='
',html+="
",html+="",html+="



',html+=''+boostPFSConfig.label.quick_shop+"",html+="
"),html}function buildPrice(data,soldOut,onSale,priceVaries){var html="";return onSale?priceVaries?html+=boostPFSConfig.label.sale_from_price.replace(/{{ price }}/g,''+Utils.formatMoney(data.price_min)+""):(html+=''+Utils.formatMoney(data.compare_at_price_min)+"",html+=' '+Utils.formatMoney(data.price_min)+""):priceVaries?html+=' '+boostPFSConfig.label.from_price+' '+Utils.formatMoney(data.price_min)+"":html+=''+Utils.formatMoney(data.price_min)+"",soldOut&&(html+=""+boostPFSConfig.label.sold_out+""),html}function addProductToAjaxCart(button,productID,productsInBundle,bundleName,qty){var pqty;if(qty?pqty=qty:pqty=1,ShopifyAPI.cart.item_count<=0&&subscriptionModalOpen(),productsInBundle){const aggregatedProducts=aggregateProducts(productsInBundle);fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({items:aggregatedProducts.map(product=>({id:product.id,quantity:product.count,properties:{from:bundleName}}))})}).then(function(){ajaxCart.load(),notify("Added to basket","success")}).catch(function(error){console.log(error)})}else if(readCookie("globalSellingPlan")!="null"&&readCookie("globalSellingPlan")!=null)fetch("/cart/add.js",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:productID,quantity:pqty,properties:standardProperties,selling_plan:readCookie("globalSellingPlan")})}).then(function(){ajaxCart.load(),notify("Added to basket","success")});else{const oneTimeAdd=fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},credentials:"same-origin",body:JSON.stringify({id:productID,quantity:pqty})}).then(function(response){ajaxCart.load(),notify("Added to basket","success"),console.log("response",response.json())}).catch(function(error){console.log(error)})}const previousText=$(button).find(".addbutton").text(),previousColour=$(button).find(".addbutton").css("background-color");$(button).find(".addbutton").text("added"),setTimeout(()=>{$(button).find(".addbutton").text(previousText),$(button).find(".addbutton").css("background-color",previousColour)},1500),$({alpha:1}).animate({alpha:0},{duration:1e3,step:function(){$(button).find(".addbutton").css("background-color","rgba(243, 219, 143,"+this.alpha+")")}}),rdt("track","AddToCart"),uet_report_cart()} //# sourceMappingURL=/cdn/shop/t/104/assets/boost-pfs-filter.js.map