{"version":3,"file":"/scripts/module-settings.js","mappings":"+zBA4CA,IA5CoB,GAGlB,yB,4FAAA,SAMA,KAAAA,WAAa,WACX,EAAKC,eACP,EAEA,KAAAA,cAAgB,WACV,EAAKC,aACP,EAAKA,YAAYC,SAAQ,SAACC,GACpBC,OAAOC,WAAa,KAAOF,EAAKG,QAAQC,WACtCJ,EAAKG,QAAQC,WAAWC,SAAS,QACnCL,EAAKM,MAAMC,gBAAkBP,EAAKG,QAAQC,WAC1CJ,EAAKQ,UAAUC,IAAIT,EAAKG,QAAQO,gBAChCV,EAAKQ,UAAUC,IAAIT,EAAKG,QAAQQ,iBAChCX,EAAKM,MAAMM,iBAAmB,aAG9BZ,EAAKM,MAAMO,gBAAkBb,EAAKG,QAAQC,WAEnCH,OAAOC,YAAc,KAAOF,EAAKG,QAAQW,UAC9Cd,EAAKG,QAAQW,UAAUT,SAAS,QAClCL,EAAKM,MAAMC,gBAAkBP,EAAKG,QAAQW,UAC1Cd,EAAKQ,UAAUC,IAAIT,EAAKG,QAAQY,eAChCf,EAAKQ,UAAUC,IAAIT,EAAKG,QAAQa,gBAChChB,EAAKM,MAAMM,iBAAmB,aAG9BZ,EAAKM,MAAMO,gBAAkBb,EAAKG,QAAQW,UAEnCd,EAAKM,MAAMC,kBACpBP,EAAKM,MAAMW,WAAa,KAE5B,GAEJ,EArCEC,KAAKpB,YAAcqB,SAASC,iBAAiB,uCAC7CF,KAAKtB,aACLK,OAAOoB,iBAAiB,SAAUH,KAAKtB,WACzC,I","sources":["webpack://evolve-boilerplate/./src/scripts/components/module-settings.ts"],"sourcesContent":["class ModuleSettings {\n backgrounds: NodeList;\n\n constructor() {\n this.backgrounds = document.querySelectorAll('[data-bg_desktop], [data-bg_mobile]');\n this.setChanges();\n window.addEventListener('resize', this.setChanges);\n }\n\n setChanges = () => {\n this.setBackground();\n }\n\n setBackground = () => {\n if (this.backgrounds) {\n this.backgrounds.forEach((item: HTMLElement) => {\n if (window.innerWidth > 767 && item.dataset.bg_desktop) {\n if (item.dataset.bg_desktop.includes('url')) {\n item.style.backgroundImage = item.dataset.bg_desktop;\n item.classList.add(item.dataset.bg_pos_desktop);\n item.classList.add(item.dataset.bg_size_desktop);\n item.style.backgroundRepeat = 'no-repeat';\n }\n else {\n item.style.backgroundColor = item.dataset.bg_desktop\n }\n } else if (window.innerWidth <= 767 && item.dataset.bg_mobile) {\n if (item.dataset.bg_mobile.includes('url')) { // Corrected line\n item.style.backgroundImage = item.dataset.bg_mobile;\n item.classList.add(item.dataset.bg_pos_mobile);\n item.classList.add(item.dataset.bg_size_mobile);\n item.style.backgroundRepeat = 'no-repeat';\n }\n else {\n item.style.backgroundColor = item.dataset.bg_mobile\n }\n } else if (item.style.backgroundImage) {\n item.style.background = null;\n }\n });\n }\n }\n}\n\nnew ModuleSettings;"],"names":["setChanges","setBackground","backgrounds","forEach","item","window","innerWidth","dataset","bg_desktop","includes","style","backgroundImage","classList","add","bg_pos_desktop","bg_size_desktop","backgroundRepeat","backgroundColor","bg_mobile","bg_pos_mobile","bg_size_mobile","background","this","document","querySelectorAll","addEventListener"],"sourceRoot":""}