EBContext.data.menuCategories = { firstSorting: '', structure : {"000":{"a":"A10000000003","b":"e-shop","c":"E-shop","f":true,"j":"100","l":{}},"001":{"a":"A10000000001","b":"knihy","c":"Knihy","f":true,"j":"100","l":{}},"002":{"a":"A10000000002","b":"kurzy","c":"Kurzy","f":true,"j":"100","l":{}}} }; var noimage = ' data-srcset="/files/media/template/noimage.png" class="lazyload " loading="lazy" data-bonus="20" data-sizes="auto" '; var propertyMap = { a: 'OID', b: 'SEOID', c: 'Name', d: 'Order', e: 'UseCategory', f: 'EBCPolozky', g: 'Description', h: 'TitleSuffix', i: 'bgColor', j: 'UseEBC', k: 'Photo', l: 'Children', m: 'IconImg' }; function processNode(el, key) { el.Sorting = key; for (let p in propertyMap) { el[propertyMap[p]] = el[p] || null; delete el[p]; } let ebc = el.UseEBC; el.UseEBC = []; if (ebc[0] === "1") el.UseEBC.push("EBC"); if (ebc[1] === "1") el.UseEBC.push("EBC2"); if (ebc[2] === "1") el.UseEBC.push("EBC3"); if (!el.Photo) el.Photo = { Name: "", SrcSet: noimage }; el.Photo.DataSrcSet = el.Photo.SrcSet.replace(" srcset="," data-srcset=").replace(" src="," data-src="); if (!el.Children) { el.Children = {}; } else { for (let el2 in el.Children) { processNode(el.Children[el2], el2); } } }; var els = EBContext.data.menuCategories.structure; for (let el2 in els) { processNode(els[el2], el2); } EBContext.data.defaultLanguage = 'cz'; EBContext.data.sessionLanguage = 'cz'; EBContext.data.languageUrl = ''; EBContext.data.languages = [] EBContext.data.hrefMap = EBContext.data.hrefMap || { result_categoryseoid: '/categories/###SEOID###'.replace('###SEOID###', ''), detail_seoid: '/products/###SEOID###'.replace('###SEOID###', ''), manufacturerdetail_seoid: ''.replace('###SEOID###', ''), popup_rental_seoid: ''.replace('###SEOID###', ''), popup_upsale: '' }; EBContext.data.customersObj={}; var elc = EBContext.data.customersObj; var propertyMapC = { "a": "logo", "b": "logostr", "c": "manName", "d" : "manNameSearch", "e": "manebc", "f": "manufacturer", "g": "name", "h": "seoid", "i": "specification", "j": "supebc", "k": "supplier", "l": "www" } var noimage = ' data-srcset="/files/media/template/noimage.png" class="lazyload " loading="lazy" data-bonus="20" data-sizes="auto" '; for (let el2 in elc) { let el = elc[el2]; el.OID = el2; for (let p in propertyMapC) { el[propertyMapC[p]] = el[p] || ""; delete el[p]; } if (!el.logo) { el.logo=[null, null, null, null, null, null, null, null]; el.logostr = noimage; } let ebc = el.supebc; el.supebc = parseInt(ebc[0]); el.supebc2 = parseInt(ebc[1]); el.supebc3 = parseInt(ebc[2]); ebc = el.manebc; el.manebc = parseInt(ebc[0]); el.manebc2 = parseInt(ebc[1]); el.manebc3 = parseInt(ebc[2]); } EBContext.data.customersArr=Object.values(EBContext.data.customersObj).sort((a,b)=>(a.nameb.name?1:0)));