const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bmj_12NV.js","assets/index-D1vJ9qYR.css"])))=>i.map(i=>d[i]);
import{_ as Q,u as S,S as Y,a as O,r as c,m as $,b as f,c as X,d as D,e as m,f as p,g as n,h as d,i as o,w as r,V as Z,j as V,o as l,F as b,k as w,l as k,n as v,p as j,q as A,s as g,t as y,v as q,x as B,y as x,T as E,z as T,A as I,B as tt,C as J,D as C,E as P,G as N,H as et,I as st,J as R,K as at,L as it,M as rt,N as M,O as F,P as H,Q as ot,R as z,U as lt,W as ut}from"./index-Bmj_12NV.js";import{P as ht}from"./ProductCard-B4PeaMUS.js";import{F as ct}from"./Footer-HZwtkbtN.js";import{a as U}from"./alternate-hreflangs-xZGRuUDd.js";import{u as nt}from"./index-Dz520mHp.js";import{u as dt}from"./vue.f36acd1f-DOct_Vl-.js";const mt={name:"Products",props:["category","subCategory","popular","latest","showLastSearch"],components:{ProductCard:ht,Footer:ct},beforeRouteEnter(t,i,a){a(e=>{console.log(i),console.log(t),i.name==="product"&&t.name==="search"&&S().$patch({lastSearch:!0});const s=t.params.locale;Y.includes(s)&&(e.$i18n.locale=s,O().$patch({locale:s})),e.$i18n.locale!==null&&t.path.startsWith("/"+e.$i18n.locale)===!1&&(e.$i18n.locale!=="en"||s)?c.push("/"+e.$i18n.locale+"/"+e.$t("routes.shop")).catch(()=>{}):t.params.category&&t.params.subCategory&&e.$i18n.locale!==null&&t.path.startsWith("/"+e.$i18n.locale)===!1&&(e.$i18n.locale!=="en"||s)?c.push("/"+e.$i18n.locale+"/"+e.$t("routes.shop")+"/"+e.$t("routes.search")+"/"+e.$t("routes.category")+"/"+e.$t("routes."+t.params.category).replace(/ /g,"-").toLowerCase()+"/"+e.$t("routes."+t.params.subCategory).replace(/ /g,"-").toLowerCase()).catch(()=>{}):t.params.category&&e.$i18n.locale!==null&&t.path.startsWith("/"+e.$i18n.locale)===!1&&(e.$i18n.locale!=="en"||s)?c.push("/"+e.$i18n.locale+"/"+e.$t("routes.shop")+"/"+e.$t("routes.search")+"/"+e.$t("routes.category")+"/"+e.$t("routes."+t.params.category).replace(/ /g,"-").toLowerCase()).catch(()=>{}):t.params.popular&&e.$i18n.locale!==null&&t.path.startsWith("/"+e.$i18n.locale)===!1&&(e.$i18n.locale!=="en"||s)?c.push("/"+e.$i18n.locale+"/"+e.$t("routes.shop")+"/"+e.$t("routes.search")+"/"+e.$t("routes.popular")+"/"+t.params.popular).catch(()=>{}):t.params.latest&&e.$i18n.locale!==null&&t.path.startsWith("/"+e.$i18n.locale)===!1&&(e.$i18n.locale!=="en"||s)?c.push("/"+e.$i18n.locale+"/"+e.$t("routes.shop")+"/"+e.$t("routes.search")+"/"+e.$t("routes.latest")+"/"+t.params.latest).catch(()=>{}):a()})},data(){return{collections:[],from:null,firstLoad:!0,isList:!1,page:1,show:!1,products:[],meta:[],categoryName:null,subCategoryName:null,popularName:null,popularDescription:null,latestName:null,latestDescription:null,currentTerm:"",searchActive:!1,breadcrumbItems:[],categories:[],brand:null,brands:[],title:"",description:"Products by category and sub-category",image:"",keywords:"products, category, sub-category, ",links:U(c,this.$i18n),tempList:!1,localesJson:{},open:[""],promos:[],showPromos:!1,showFeatured:!1}},computed:{...$(O,["locale"]),...$(S,["term","lastTerm","lastSearch"]),minFeaturedHeight(){return window.innerWidth>1920?"600px":"auto"},isNotTest(){return!0},breadcrumbs(){return this.breadcrumbItems},imagesHost(){return"https://images.helios.co.uk"},featured(){return this.collections.filter(t=>{if(t.path)return t})}},mounted(){console.log("mounted"),this.addMeta(),this.$gtag.pageview({page_path:this.$route.path}),document.getElementById("scrolling-content").scrollTop=0,this.url="https://helios.co.uk"+this.$route.path,"denes,helios".split(",").includes(this.subCategory)&&c.currentRoute.value.query&&c.currentRoute.value.query.list!=="false"?(this.isList=!0,this.tempList=!0):c.currentRoute.value.query&&c.currentRoute.value.query.list==="true"&&(this.isList=!0);let i=this.term;if((this.showLastSearch||this.from&&this.from.name==="product")&&(i=this.lastTerm),f.get("https://api.helios.co.uk/api/categories").then(a=>{this.categories=a.data.data;for(let e in this.categories){this.categories[e].slug===this.category&&(this.open=[this.categories[e].name]),this.keywords+=","+this.categories[e].name;for(let s in this.categories[e].sub_categories)this.keywords+=","+this.categories[e].sub_categories[s].name}}).catch(a=>{console.log(a)}),f.get("https://api.helios.co.uk/api/brands").then(a=>{this.brands=a.data.data}).catch(a=>{console.log(a)}),f.get("https://api.helios.co.uk/api/promos/discount-groups").then(a=>{this.promos=a.data.data,this.showPromos=!0}).catch(a=>{console.log(a)}),f.get("https://api.helios.co.uk/api/collections/featured").then(a=>{this.collections=a.data.data,this.showFeatured=!0}).catch(a=>{console.log(a)}),i&&c.currentRoute.value.name==="search")this.currentTerm=i,this.firstLoad=!1,f.get("https://api.helios.co.uk/api/products/search?term="+i+"&page=1&list="+this.isList).then(a=>{this.products=a.data.data,this.meta=a.data.meta,this.title="Products by term "+i,this.description="Products by term "+i,this.addMeta(),this.show=!0,this.calculateBreadcrumbs(),this.clearTerm(),setTimeout(function(){window.prerenderReady=!0},1e3)}).catch(a=>{console.log(a)});else if(this.category&&this.subCategory){this.locale,this.firstLoad=!1;let a=null,e=null;this.loadLocales().then(()=>{let s=JSON.parse(JSON.stringify(this.localesJson)).routes;for(let u in s)s[u]===this.category&&(a=u),s[u]===this.subCategory&&(e=u);a||(a=this.category),e||(e=this.subCategory),a&&e&&f.get("https://api.helios.co.uk/api/products/category/"+a+"/sub-category/"+e+"?page=1&list="+this.isList).then(u=>{this.products=u.data.data,this.meta=u.data.meta,this.title=u.data.meta.category.name+" - "+u.data.meta.sub_category.name,this.description="Products by "+u.data.meta.category.name+" & "+u.data.meta.sub_category.name,this.categoryName=u.data.meta.category.name,this.subCategoryName=u.data.meta.sub_category.name,this.addMeta(),this.show=!0,this.calculateBreadcrumbs(),this.clearLastSearch(),setTimeout(function(){window.prerenderReady=!0},1e3)}).catch(u=>{console.log(u),u.response&&u.response.status})})}else if(this.category){this.locale,this.firstLoad=!1;let a=null;this.loadLocales().then(()=>{let e=JSON.parse(JSON.stringify(this.localesJson)).routes;for(let s in e)e[s]===this.category&&(a=s);a||(a=this.category),a&&f.get("https://api.helios.co.uk/api/products/category/"+a+"?page=1&list="+this.isList).then(s=>{this.products=s.data.data,this.meta=s.data.meta,this.title=s.data.meta.category.name,this.description="Products by "+s.data.meta.category.name,this.categoryName=s.data.meta.category.name,this.subCategoryName=null,this.addMeta(),this.show=!0,this.calculateBreadcrumbs(),this.clearLastSearch(),setTimeout(function(){window.prerenderReady=!0},1e3)}).catch(s=>{s.response&&s.response.status})})}else if(this.popular){let a=this.popular;this.firstLoad=!1,f.get("https://api.helios.co.uk/api/populars/"+a).then(e=>{this.products=e.data.data.products,this.title=e.data.data.name,this.description=e.data.data.description,this.popularName=e.data.data.name,this.popularDescription=e.data.data.description,this.addMeta(),this.show=!0,this.calculateBreadcrumbs(),this.clearLastSearch(),setTimeout(function(){window.prerenderReady=!0},1e3)}).catch(e=>{e.response&&e.response.status})}else if(this.latest){let a=this.latest;this.firstLoad=!1,f.get("https://api.helios.co.uk/api/latests/"+a).then(e=>{this.products=e.data.data.products,this.title=e.data.data.name,this.description=e.data.data.description,this.latestName=e.data.data.name,this.latestDescription=e.data.data.description,this.show=!0,this.calculateBreadcrumbs(),this.clearLastSearch(),setTimeout(function(){window.prerenderReady=!0},1e3)}).catch(e=>{e.response&&e.response.status})}},watch:{$route:{deep:!0,handler(t,i){console.log("debug isList:"+this.isList),console.log("debug query:"+t.query.list),console.log("this.$route.name:"+this.$route.name),console.log("current term:"+this.currentTerm),this.calculateBreadcrumbs(),this.$route.name==="shop"?(this.products=[],this.firstLoad=!0,this.isList=!1):this.$route.name==="category"&&(!t.query||t.query&&t.query.list!=="true")?(this.show=!1,this.isList=!1,this.page=1):this.$route.name==="sub-category"&&(!t.query||t.query&&t.query.list!=="true")?(this.show=!1,this.isList=!1,this.page=1):this.$route.name==="products"&&(!t.query||t.query&&t.query.list!=="true")?(this.show=!1,this.isList=!1,this.page=1):this.$route.name==="popular"?this.isList=!1:this.$route.name==="latest"?this.isList=!1:this.$route.name==="search"&&(!t.query||t.query&&t.query.list!=="true")?(this.show=!1,this.isList=!1,this.page=1):(this.show=!1,this.isList=!0,this.page=0),this.url="https://helios.co.uk"+this.$route.path,this.links=U(c,this.$i18n)}},page(t){if(this.show=!1,this.products=[],document.getElementById("scrolling-content").scrollTop=0,this.currentTerm!=="")f.get("https://api.helios.co.uk/api/products/search?term="+this.currentTerm+"&page="+t+"&list="+this.isList).then(i=>{this.products=i.data.data,this.meta=i.data.meta,this.title="Products by term "+this.currentTerm,this.description="Products by term "+this.currentTerm,this.addMeta(),this.show=!0}).catch(i=>{console.log(i)});else if(this.category&&this.subCategory){this.locale;let i=null,a=null;this.loadLocales().then(()=>{let e=JSON.parse(JSON.stringify(this.localesJson)).routes;for(let s in e)e[s]===this.category?i=s:e[s]===this.subCategory&&(a=s);i||(i=this.category),a||(a=this.subCategory),i&&a&&f.get("https://api.helios.co.uk/api/products/category/"+i+"/sub-category/"+a+"?page="+t+"&list="+this.isList).then(s=>{this.products=s.data.data,this.meta=s.data.meta,this.title=s.data.meta.category.name+" - "+s.data.meta.sub_category.name,this.description="Products by "+s.data.meta.category.name+" & "+s.data.meta.sub_category.name,this.categoryName=s.data.meta.category.name,this.subCategoryName=s.data.meta.sub_category.name,this.addMeta(),this.show=!0}).catch(s=>{s.response&&s.response.status})})}else if(this.category){this.locale;let i=null;this.loadLocales().then(()=>{let a=JSON.parse(JSON.stringify(this.localesJson)).routes;for(let e in a)a[e]===this.category&&(i=e);i||(i=this.category),i&&f.get("https://api.helios.co.uk/api/products/category/"+i+"?page="+t+"&list="+this.isList).then(e=>{this.products=e.data.data,this.meta=e.data.meta,this.title=e.data.meta.category.name,this.description="Products by "+e.data.meta.category.name,this.categoryName=e.data.meta.category.name,this.subCategoryName=null,this.addMeta(),this.show=!0}).catch(e=>{e.response&&e.response.status})})}},lastSearch(t){console.log("lastSearch"),t&&(this.currentTerm=this.lastTerm,this.setTerm(this.lastTerm,"shop"))},term(t){console.log("term"),t!==""&&(this.show=!1,this.firstLoad=!1,this.currentTerm=t,this.isList=!1,window.history.replaceState(null,null,"?list=false"),this.page=1,this.calculateBreadcrumbs(),document.getElementById("scrolling-content").scrollTop=0,f.get("https://api.helios.co.uk/api/products/search?term="+t+"&page=1&list="+this.isList).then(i=>{this.products=i.data.data,this.meta=i.data.meta,this.title="Products by term "+t,this.description="Products by term "+t,this.resetNavigation(),this.addMeta(),this.show=!0,this.clearTerm()}).catch(i=>{console.log(i)}))},category(t){if(this.calculateBreadcrumbs(),t!==void 0){this.products=[],this.meta=[],this.isList&&window.history.replaceState(null,null,"?list=true"),this.show=!1,this.firstLoad=!1,this.currentTerm="",this.locale;let i=null;this.loadLocales().then(()=>{let a=JSON.parse(JSON.stringify(this.localesJson)).routes;for(let e in a)a[e]===this.category&&(i=e);i||(i=this.category),i&&f.get("https://api.helios.co.uk/api/products/category/"+i+"?page=1&list="+this.isList).then(e=>{this.products=e.data.data,this.meta=e.data.meta,this.title=e.data.meta.category.name,this.description="Products by "+e.data.meta.category.name,this.categoryName=e.data.meta.category.name,this.addMeta(),this.$gtag.pageview({page_path:this.$route.path}),this.show=!0,this.calculateBreadcrumbs(),this.clearLastSearch(),this.open=[this.categoryName],setTimeout(function(){window.prerenderReady=!0},1e3)}).catch(e=>{e.response&&e.response.status})})}else this.clearNavigation()},subCategory(t){if(this.calculateBreadcrumbs(),t!==void 0){this.products=[],this.meta=[],this.isList&&window.history.replaceState(null,null,"?list=true"),this.show=!1,this.firstLoad=!1,this.currentTerm="",this.locale;let i=null,a=null;this.loadLocales().then(()=>{let e=JSON.parse(JSON.stringify(this.localesJson)).routes;for(let s in e)e[s]===this.category?i=s:e[s]===this.subCategory&&(a=s);i||(i=this.category),a||(a=this.subCategory),i&&a&&f.get("https://api.helios.co.uk/api/products/category/"+i+"/sub-category/"+a+"?page=1&list="+this.isList).then(s=>{this.products=s.data.data,this.meta=s.data.meta,this.title=s.data.meta.category.name+" - "+s.data.meta.sub_category.name,this.description="Products by "+s.data.meta.category.name+" & "+s.data.meta.sub_category.name,this.categoryName=s.data.meta.category.name,this.subCategoryName=s.data.meta.sub_category.name,this.addMeta(),this.show=!0,this.calculateBreadcrumbs(),this.clearLastSearch(),setTimeout(function(){window.prerenderReady=!0},1e3),this.$gtag.pageview({page_path:this.$route.path})}).catch(s=>{s.response&&s.response.status})})}else if(this.category){this.show=!1,this.firstLoad=!1,this.currentTerm="",this.locale;let i=null;this.loadLocales().then(()=>{let a=JSON.parse(JSON.stringify(this.localesJson)).routes;for(let e in a)a[e]===this.category&&(i=e);i||(i=this.category),i&&f.get("https://api.helios.co.uk/api/products/category/"+i+"?page=1&list="+this.isList).then(e=>{this.products=e.data.data,this.meta=e.data.meta,this.title=e.data.meta.category.name,this.description="Products by "+e.data.meta.category.name,this.categoryName=e.data.meta.category.name,this.addMeta(),this.show=!0,this.calculateBreadcrumbs(),this.clearLastSearch(),setTimeout(function(){window.prerenderReady=!0},1e3),this.$gtag.pageview({page_path:this.$route.path})}).catch(e=>{e.response&&e.response.status})})}},brand(t){t&&(this.firstLoad=!1,c.push({name:"brand",params:{slug:t}}),this.brand="")},popular(t){if(t){this.firstLoad=!1;let i=this.popular;f.get("https://api.helios.co.uk/api/populars/"+i).then(a=>{this.products=a.data.data.products,this.title=a.data.data.name,this.description=a.data.data.description,this.popularName=a.data.data.name,this.popularDescription=a.data.data.description,this.addMeta(),this.show=!0,this.calculateBreadcrumbs(),this.clearLastSearch(),setTimeout(function(){window.prerenderReady=!0},1e3)}).catch(a=>{a.response&&a.response.status})}},latest(t){if(t){this.firstLoad=!1;let i=this.latest;f.get("https://api.helios.co.uk/api/latests/"+i).then(a=>{this.products=a.data.data.products,this.title=a.data.data.name,this.description=a.data.data.description,this.latestName=a.data.data.name,this.latestDescription=a.data.data.description,this.addMeta(),this.show=!0,this.calculateBreadcrumbs(),this.clearLastSearch(),setTimeout(function(){window.prerenderReady=!0},1e3)}).catch(a=>{a.response&&a.response.status})}}},methods:{...X(S,["clearTerm","clearLastTerm","setTerm"]),async loadLocales(){console.log("current locale: "+this.locale),this.localesJson=await D(Object.assign({"../locales/cs.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.bl),__vite__mapDeps([0,1])),"../locales/de.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.bm),__vite__mapDeps([0,1])),"../locales/en.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.bn),__vite__mapDeps([0,1])),"../locales/es.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.bo),__vite__mapDeps([0,1])),"../locales/fi.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.bp),__vite__mapDeps([0,1])),"../locales/fr.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.bq),__vite__mapDeps([0,1])),"../locales/it.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.br),__vite__mapDeps([0,1])),"../locales/ja.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.bs),__vite__mapDeps([0,1])),"../locales/nl.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.bt),__vite__mapDeps([0,1])),"../locales/ru.json":()=>m(()=>import("./index-Bmj_12NV.js").then(t=>t.bu),__vite__mapDeps([0,1]))}),"../locales/".concat(this.locale,".json"),3)},addMeta(){dt({htmlAttrs:{lang:this.locale},link:this.links}),nt({title:"Helios Homeopathy - "+this.$t("headings.Shop")+(this.title?" - "+this.title:""),description:this.description,keywords:this.keywords,ogDescription:this.description,ogTitle:this.title,ogImage:this.image,ogUrl:this.url,twitterTitle:this.title,twitterDescription:this.description,twitterImage:this.image,twitterCard:"summary_large_image"})},toggleList(){if(c.currentRoute.value.name==="category"&&c.currentRoute.value.query.list==="true")this.show=!1,this.isList=!1,this.page=1,c.push({name:"category",params:{category:this.category}});else if(c.currentRoute.value.name==="sub-category"&&c.currentRoute.value.query.list==="true")this.show=!1,this.isList=!1,this.page=1,c.push({name:"sub-category",params:{category:this.category,subCategory:this.subCategory}});else if(c.currentRoute.value.name==="products"&&c.currentRoute.value.query.list==="true")this.show=!1,this.isList=!1,this.page=1,c.push({name:"products"});else if(c.currentRoute.value.query.list!=="true"){this.show=!1,this.isList=!0,this.page=0;let t=c.currentRoute.value.path;c.push({path:t,query:{list:"true"}})}},clearLastSearch(){return this.clearLastTerm()},resetNavigation(){this.open=[""]},clearNavigation(){this.open=[""]},navigate(t,i){c.push({name:t,params:i})},navigateTo(t){console.log(t),c.push(t)},navigateToProduct(t){return"/"+this.$i18n.locale+"/"+this.$t("routes.shop")+"/"+t},navigateToCollection(t){return console.log(t),"/"+this.$i18n.locale+"/"+this.$t("routes.collections")+"/"+t},goToCollection(t){let i="/"+this.$i18n.locale+"/"+this.$t("routes.collections")+"/"+t;c.push({path:i})},navigateToCategory(t){if(this.category!==t){let i=this.categoryRoute(t);c.push({path:i})}},navigateToSubCategory(t,i){let a=this.subCategoryRoute(t,i);console.log(a),c.push({path:"/shop/search/category/animal-products/aloe-vera"})},categoryRoute(t){let i="/";return this.$i18n.locale!=="en"&&(i+=this.$i18n.locale+"/"),i+=this.$t("routes.shop")+"/"+this.$t("routes.search")+"/"+this.$t("routes.category")+"/"+this.$t("routes."+t)+"?list="+this.isList},subCategoryRoute(t,i){let a="/";this.$i18n.locale!=="en"&&(a+=this.$i18n.locale+"/");let e=this.isList;return"denes,helios".split(",").includes(i)?e=!0:this.isList&&this.tempList&&(e=!1),a+this.$t("routes.shop")+"/"+this.$t("routes.search")+"/"+this.$t("routes.category")+"/"+this.$t("routes."+t)+"/"+this.$t("routes."+i)+"?list="+e},brandRoute(t){let i="/";return this.$i18n.locale!=="en"&&(console.log("match"),i+=this.$i18n.locale+"/"),i+this.$t("routes.shop")+"/"+this.$t("routes.search")+"/"+this.$t("routes.brand")+"/"+t+"?list="+this.isList},navigateToList(){return this.$route.path+"?list=true"},navigateToPaginated(){return this.$route.path+"?list=false"},productPrice(t){if(t){if(t.discount_groups&&t.discount_groups.length>0)for(let i in t.discount_groups){let a=t.discount_groups[i];if(a.products_count===1&&a.qualifying_quantity===1)return"<span class='text-decoration-line-through'>£"+t.price+'</span> <span class="text-red">'+a.discount+"% off £"+(t.price-t.price*(a.discount/100)).toFixed(2)+"</span>"}return"£"+t.price}else{let i=[];for(let a in t.forms)for(let e in t.forms[a].sizes)i.push(t.forms[a].sizes[e].price);return i.sort(function(a,e){return a-e}),"Between £"+i[0]+" and £"+i[i.length-1]}},hasDiscountGroupText(t){if(t.price&&t.discount_groups&&t.discount_groups.length>0)for(let i in t.discount_groups){let a=t.discount_groups[i];if(a.products_count>1||a.products_count===1&&a.qualifying_quantity>1)return!0}return!1},calculateBreadcrumbs(){let t=[];if(t.push({title:this.$t("headings.Shop"),disabled:!1,exact:!0,to:{name:"shop"}}),this.currentTerm&&c.currentRoute.value.name==="search"&&t.push({title:this.$t("You searched by keyword: ")+this.currentTerm.charAt(0).toUpperCase()+this.currentTerm.slice(1),disabled:!0,exact:!0,to:{name:"search",params:{term:this.currentTerm}}}),this.category&&this.categoryName){let i=this.category,a=this.locale;a&&D(Object.assign({"../locales/cs.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.bl),__vite__mapDeps([0,1])),"../locales/de.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.bm),__vite__mapDeps([0,1])),"../locales/en.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.bn),__vite__mapDeps([0,1])),"../locales/es.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.bo),__vite__mapDeps([0,1])),"../locales/fi.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.bp),__vite__mapDeps([0,1])),"../locales/fr.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.bq),__vite__mapDeps([0,1])),"../locales/it.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.br),__vite__mapDeps([0,1])),"../locales/ja.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.bs),__vite__mapDeps([0,1])),"../locales/nl.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.bt),__vite__mapDeps([0,1])),"../locales/ru.json":()=>m(()=>import("./index-Bmj_12NV.js").then(e=>e.bu),__vite__mapDeps([0,1]))}),"../locales/".concat(a,".json"),3).then(e=>{let s=e.routes;for(let u in s)s[u].toLowerCase()===i.toLowerCase()&&(i=u,t.push({title:this.$t("categories."+this.categoryName),disabled:!1,exact:!0,to:{name:"category",params:{category:i}}}),this.subCategory&&this.subCategoryName?(t.push({title:this.$t("subCategories."+this.subCategoryName),disabled:!0,exact:!0,to:"/"}),this.breadcrumbItems=t):this.breadcrumbItems=t)})}else this.popular&&this.popularName?(t.push({title:"Popular: "+this.popularName,disabled:!0,exact:!0,to:"/"}),this.breadcrumbItems=t):this.latest&&this.latestName?(t.push({title:"New in: "+this.latestName,disabled:!0,exact:!0,to:"/"}),this.breadcrumbItems=t):this.breadcrumbItems=t},goBrand(){c.push({name:"brand",params:{slug:this.brand}})}}},pt=t=>(lt("data-v-94f9f538"),t=t(),ut(),t),gt={id:"content",class:"mt-3",style:{"margin-left":"20px","margin-right":"20px"}},ft={key:0,class:"d-flex flex-column flex-md-row justify-md-space-between"},yt={key:0},_t=pt(()=>I("h4",{class:"text-h4 mb-3"},"Featured",-1)),bt={class:"text-body-1"},Lt={key:2,class:"text-subtitle-1 mt-3"},wt={key:0,class:"text-h4 mb-6 d-none d-sm-block mt-3"},kt={key:1,class:"text-subtitle-1"},Tt={key:2,class:"text-h4 mb-6 d-none d-sm-block mt-3"},xt={key:3,class:"text-subtitle-1"},Ct={key:4,class:"text-center"},Pt={key:7,class:"text-subtitle-1 mt-3"},Nt={key:8,class:"text-center"};function Rt(t,i,a,e,s,u){const L=V("router-link"),W=V("ProductCard"),G=V("Footer");return l(),p("div",gt,[s.firstLoad&&s.promos.discount_groups&&s.promos.discount_groups.length>=3?(l(),n(T,{key:0,class:"d-none d-lg-flex"},{default:r(()=>[(l(!0),p(b,null,w(s.promos.discount_groups,(h,_)=>(l(),n(k,{cols:"12",sm:"12",md:s.promos.discount_groups.length===2?6:4},{default:r(()=>[o(E,{name:"fade"},{default:r(()=>[s.showPromos?(l(),n(v,{key:0},{default:r(()=>[o(j,{width:"100%","aspect-ratio":"16/9",class:"white--text align-end",contain:"",src:u.imagesHost+"/assets/promo-medium/"+h.path,srcset:u.imagesHost+"/assets/promo-large/"+h.path+" 2x"},{default:r(()=>[o(A,{class:"text-h6 text-xl-h5 text-white card-title-background"},{default:r(()=>[g(y(h.promo_text),1)]),_:2},1024)]),_:2},1032,["src","srcset"]),o(q,{class:"pt-4 text-body-2 text-xl-body-1"},{default:r(()=>[g(y(h.subtitle),1)]),_:2},1024),o(B,{class:"flex justify-end"},{default:r(()=>[o(x,{variant:"tonal",color:"primary",onClick:K=>u.navigate("discount",{slug:h.slug})},{default:r(()=>[g(" Explore ")]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)):d("",!0)]),_:2},1024)]),_:2},1032,["md"]))),256))]),_:1})):d("",!0),o(Z,null,{default:r(()=>[I("div",null,[u.breadcrumbs.length>0?(l(),p("div",ft,[s.firstLoad?d("",!0):(l(),n(tt,{key:0,class:"pl-2",large:"",items:u.breadcrumbs,divider:">"},null,8,["items"])),!s.isList&&s.products.length>0&&!a.popular&&!a.latest?(l(),n(L,{key:1,class:"no-underline",hreflang:t.$i18n.locale,to:u.navigateToList()},{default:r(()=>[o(x,{class:"mt-1",theme:"dark",color:"success"},{default:r(()=>[o(J,{class:"mr-2"},{default:r(()=>[g(" mdi-view-list ")]),_:1}),g(" view as list ")]),_:1})]),_:1},8,["hreflang","to"])):d("",!0),s.isList&&s.products.length>0&&!a.popular&&!a.latest?(l(),n(L,{key:2,class:"no-underline",hreflang:t.$i18n.locale,to:u.navigateToPaginated()},{default:r(()=>[o(x,{class:"mt-1",theme:"dark",color:"success"},{default:r(()=>[o(J,{class:"mr-2"},{default:r(()=>[g(" mdi-view-grid ")]),_:1}),g(" view with images ")]),_:1})]),_:1},8,["hreflang","to"])):d("",!0)])):d("",!0),o(T,null,{default:r(()=>[o(k,{sm:"6",md:"4",xl:"2",class:"d-none d-sm-flex flex-column"},{default:r(()=>[s.categories.length>0?(l(),p("div",yt,[o(C,{density:"compact",class:"text-left mt-4"},{default:r(()=>[o(P,{class:"text-uppercase text-subtitle-1"},{default:r(()=>[o(L,{class:"no-underline",hreflang:t.$i18n.locale,to:{name:"books"}},{default:r(()=>[g(y(t.$t("headings.Book finder")),1)]),_:1},8,["hreflang"])]),_:1}),o(P,{class:"text-uppercase text-subtitle-1"},{default:r(()=>[o(L,{class:"no-underline",hreflang:t.$i18n.locale,to:{name:"remedies"}},{default:r(()=>[g(y(t.$t("headings.Remedy finder")),1)]),_:1},8,["hreflang"])]),_:1})]),_:1}),o(C,{density:"compact",class:"text-left mt-0",opened:s.open,"onUpdate:opened":i[0]||(i[0]=h=>s.open=h)},{default:r(()=>[o(P,{class:"text-uppercase text-subtitle-1"},{default:r(()=>[g(y(t.$t("headings.Find by category")),1)]),_:1}),(l(!0),p(b,null,w(s.categories,h=>(l(),n(it,{key:h.id,value:h.name,"no-action":""},{activator:r(({props:_})=>[o(N,et(st(_)),{default:r(()=>[o(L,{class:"no-underline",hreflang:t.$i18n.locale,to:u.categoryRoute(h.slug)},{default:r(()=>[o(R,{class:"text-subtitle-1 font-weight-regular"},{default:r(()=>[g(y(t.$t("categories."+h.name)),1)]),_:2},1024)]),_:2},1032,["hreflang","to"])]),_:2},1040)]),default:r(()=>[(l(!0),p(b,null,w(h.sub_categories,_=>(l(),n(N,{class:at(_.slug===a.subCategory?"no-underline v-item--active v-list-item--active":"no-underline"),key:_.slug,hreflang:t.$i18n.locale},{default:r(()=>[o(L,{class:"no-underline",hreflang:t.$i18n.locale,to:u.subCategoryRoute(h.slug,_.slug)},{default:r(()=>[o(R,{class:"text-subtitle-1 font-weight-regular"},{default:r(()=>[g(y(t.$t("subCategories."+_.name)),1)]),_:2},1024)]),_:2},1032,["hreflang","to"])]),_:2},1032,["class","hreflang"]))),128))]),_:2},1032,["value"]))),128))]),_:1},8,["opened"])])):d("",!0),s.brands.length>0?(l(),n(C,{key:1,density:"compact",class:"text-left"},{default:r(()=>[o(P,{class:"text-uppercase text-subtitle-1"},{default:r(()=>[g(y(t.$t("headings.Find by brand")),1)]),_:1}),(l(!0),p(b,null,w(s.brands,h=>(l(),n(N,{class:"no-underline",key:h.id,hreflang:t.$i18n.locale},{default:r(()=>[o(L,{class:"no-underline",hreflang:t.$i18n.locale,to:u.brandRoute(h.slug)},{default:r(()=>[o(R,{class:"text-subtitle-1 font-weight-regular"},{default:r(()=>[g(y(h.name),1)]),_:2},1024)]),_:2},1032,["hreflang","to"])]),_:2},1032,["hreflang"]))),128))]),_:1})):d("",!0)]),_:1}),o(k,{sm:"6",md:"8",xl:"10"},{default:r(()=>[s.firstLoad?(l(),p(b,{key:0},[u.featured.length>0?(l(),n(T,{key:0,class:"mt-2 ma-0"},{default:r(()=>[o(k,{cols:"12",class:"pb-0"},{default:r(()=>[_t]),_:1}),(l(!0),p(b,null,w(u.featured,h=>(l(),n(k,{key:h.slug,cols:"12",xs:"12",sm:"12",md:"12",xl:"6"},{default:r(()=>[o(rt,null,{default:r(({isHovering:_,props:K})=>[o(E,{name:"fade"},{default:r(()=>[s.showFeatured?(l(),n(v,{key:0,"min-height":u.minFeaturedHeight},{default:r(()=>[o(j,{class:"white--text align-end",contain:"",src:u.imagesHost+"/assets/promo-medium/"+h.path,srcset:u.imagesHost+"/assets/promo-large/"+h.path+" 2x"},{default:r(()=>[o(A,{class:"text-xs-h6 text-md-h4 text-white card-title-background"},{default:r(()=>[g(y(h.promo_text),1)]),_:2},1024)]),_:2},1032,["src","srcset"]),o(q,{class:"pt-4 text-h6"},{default:r(()=>[g(y(h.subtitle),1)]),_:2},1024),o(M,null,{default:r(()=>[I("p",bt,y(h.summary),1)]),_:2},1024),o(B,{class:"d-flex justify-end"},{default:r(()=>[o(x,{color:"primary",variant:"tonal",onClick:St=>u.goToCollection(h.slug)},{default:r(()=>[g(" View products ")]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1032,["min-height"])):d("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})):d("",!0)],64)):(l(),n(v,{key:1,class:"text-left",flat:"",tile:""},{default:r(()=>[o(M,null,{default:r(()=>[s.isList?(l(),n(E,{key:0,name:"fade"},{default:r(()=>[s.show?s.products.length>0?(l(),n(C,{key:1,density:"compact"},{default:r(()=>[(l(!0),p(b,null,w(s.products,h=>(l(),n(N,{key:h.sku,onClick:_=>u.navigate("product",{slug:h.slug})},{default:r(()=>[o(L,{hreflang:t.$i18n.locale,to:u.navigateToProduct(h.slug)},{default:r(()=>[o(R,{class:"text-subtitle-1"},{default:r(()=>[g(y(h.name),1)]),_:2},1024),h.common_name?(l(),n(ot,{key:0,class:"text-subtitle-2"},{default:r(()=>[g(y(h.common_name),1)]),_:2},1024)):d("",!0)]),_:2},1032,["hreflang","to"])]),_:2},1032,["onClick"]))),128))]),_:1})):s.show?(l(),p("p",Lt,"Sorry, there are no results. Please try another search term.")):d("",!0):(l(),n(F,{key:0,class:"px-3 pt-3 pb-3 mt-6 d-flex justify-center"},{default:r(()=>[o(H,{size:70,width:7,indeterminate:"",color:"primary"})]),_:1}))]),_:1})):(l(),p(b,{key:1},[a.popular&&s.popularName?(l(),p("h1",wt,y(s.popularName),1)):d("",!0),a.popular&&s.popularDescription?(l(),p("p",kt,y(s.popularDescription),1)):d("",!0),a.latest&&s.latestName?(l(),p("h1",Tt,y(s.latestName),1)):d("",!0),a.latest&&s.latestDescription?(l(),p("p",xt,y(s.latestDescription),1)):d("",!0),s.meta&&s.meta.total?(l(),p("div",Ct,[s.show?(l(),n(z,{key:0,modelValue:s.page,"onUpdate:modelValue":i[1]||(i[1]=h=>s.page=h),length:Math.ceil(s.meta.total/s.meta.per_page),class:"mt-3"},null,8,["modelValue","length"])):d("",!0)])):d("",!0),s.show?s.products.length>0?(l(),n(T,{key:6,class:"mt-2"},{default:r(()=>[(l(!0),p(b,null,w(s.products,h=>(l(),n(k,{key:h.sku,cols:"12",xs:"12",sm:"12",lg:"4"},{default:r(()=>[o(W,{product:h},null,8,["product"])]),_:2},1024))),128))]),_:1})):s.show?(l(),p("p",Pt,"Sorry, there are no results. Please try another search term.")):d("",!0):(l(),n(T,{key:5,class:"mt-3"},{default:r(()=>[o(k,{cols:"12"},{default:r(()=>[o(F,{class:"px-3 pt-3 pb-3 d-flex justify-center"},{default:r(()=>[o(H,{size:70,width:7,indeterminate:"",color:"primary"})]),_:1})]),_:1})]),_:1})),s.meta&&s.meta.total?(l(),p("div",Nt,[s.show?(l(),n(z,{key:0,modelValue:s.page,"onUpdate:modelValue":i[2]||(i[2]=h=>s.page=h),length:Math.ceil(s.meta.total/s.meta.per_page),class:"mt-3"},null,8,["modelValue","length"])):d("",!0)])):d("",!0)],64))]),_:1})]),_:1}))]),_:1})]),_:1})])]),_:1}),u.isNotTest?(l(),n(G,{key:1})):d("",!0)])}const Dt=Q(mt,[["render",Rt],["__scopeId","data-v-94f9f538"]]);export{Dt as default};
//# sourceMappingURL=Products-DNfgjV1F.js.map