1import{i as s}from"./hmVibj9W.js";class r{static createCategory(e){return{title:e.title,slug:e.slug,color_code:e.color_code,description:e.description,is_main_category:e.parent_slug===null,layout_id:e.layout_id,order:e.order,parent_slug:e.parent_slug,flexible_layout_id:e.flexible_layout_id,flexible_layout_slug:e.flexible_layout_slug,topical_menu_slug:e?.topical_menu_slug??null,is_active:e.is_active,is_highlighted:e.is_highlighted,is_brand:e.is_brand,ads_disabled:e.ads_disabled,meta_title:e.meta_title,meta_description:e.meta_description,meta_keywords:e.meta_keywords}}}const o=s("categories",{state:()=>({categories:{}}),getters:{GetCategoryBySlug:t=>e=>t.categories[e]||null},actions:{addCategory(t){this.categories={...this.categories,[t.slug]:t.category}},async getCategory(t){let e=this.GetCategoryBySlug(t.slug);if(e)return e;const i=await $fetch(`/api/categories/${t.slug}`);return e=r.createCategory(i),this.addCategory({slug:t.slug,category:e}),e}}});export{o as u};
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.