document.addEventListener("DOMContentLoaded",()=>{let r=()=>{var e=window.innerWidth;return 1024<=e?"desktop":768<=e?"tablet":"mobile"},o=["mobile","tablet","desktop"],a=(r,a)=>{var e=r.getAttribute("data-uicore-bl-lazy-bg");if(e){a=o.indexOf(a);try{var n=JSON.parse(e);let t;for(let e=a;e<o.length;e++)if(n[o[e]]){t=n[o[e]];break}t&&0<t.length&&t.forEach(({id:e,url:t})=>{e&&t&&r.style.setProperty("--ui-bl-bg-"+e,`url("${t}")`)})}catch(e){}}},n=new Set,l=new IntersectionObserver(e=>{let t=r();e.forEach(e=>{e.isIntersecting&&(e=e.target,a(e,t),n.add(e),l.unobserve(e))})},{rootMargin:"150px"}),e=(document.querySelectorAll("[data-uicore-bl-lazy-bg]").forEach(e=>l.observe(e)),r());window.addEventListener("resize",()=>{let t=r();t!==e&&(n.forEach(e=>{a(e,t)}),e=t)})});