"use strict";(self.webpackChunk_brizy_builder_free=self.webpackChunk_brizy_builder_free||[]).push([["603"],{3118(e,t,r){r.r(t),r.d(t,{default:()=>s});let a="data-map-lazy-init",i="data-map-listeners",l=[],u=(e,t)=>{var r,a;let i=(e=>{if(!e)return"Embedded map";try{var t;let r=null==(t=new URL(e,window.location.origin).searchParams.get("q"))?void 0:t.trim();return r?`Map showing ${r}`:"Embedded map"}catch(e){return"Embedded map"}})(null!=(a=null!=(r=t.getAttribute("src"))?r:t.getAttribute("data-lazy-src"))?a:"");e.setAttribute("role","region"),e.setAttribute("aria-label",i),t.setAttribute("title",i),t.setAttribute("aria-label",i)},n=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){let t=e.target,r=l.findIndex(e=>e.mapWrapper===t);if(-1!==r){let{iframe:e,lazySrc:a}=l[r];try{e.addEventListener("load",()=>{(e=>{if(e.hasAttribute(i))return;let t=e.querySelector("iframe");t&&(e.addEventListener("click",()=>{t.style.pointerEvents="auto"}),e.addEventListener("mouseleave",()=>{t.style.pointerEvents="none"}),e.setAttribute(i,"true"))})(t)},{once:!0}),e.setAttribute("src",a),e.setAttribute("data-lazy-loaded","true"),e.removeAttribute("data-lazy-src"),n.unobserve(t),l.splice(r,1)}catch(e){}}}})},{rootMargin:"200px"});function s(e){let t=e.get(0);t&&t.querySelectorAll(".brz-map").forEach(e=>{let t=e.querySelector(".brz-ui-ed-map-content");if(t){let e=t.querySelector("iframe");e&&u(t,e),(e=>{if(e.hasAttribute(a))return;e.setAttribute(a,"true");let t=e.querySelector("iframe");if(!t)return;let r=t.getAttribute("src");r&&(u(e,t),t.setAttribute("data-lazy-src",r),t.removeAttribute("src"),l.push({mapWrapper:e,iframe:t,lazySrc:r}),n.observe(e))})(t)}})}}}]);