1define(["jquery","leaflet","leaflet.locatecontrol"],function(S,M){S.ajaxSetup({headers:{"X-CSRF-TOKEN":S('meta[name="csrf-token"]').attr("content")}});var ho=0;let go=function(){const Q=window.innerWidth<=768;function se(){try{if(typeof window<"u"&&window.isHomePage===!0||typeof document<"u"&&document.body&&document.body.classList.contains("page-home"))return!0}catch{}return!1}function yo(){try{var e=typeof window<"u"&&window.MirelaSearch&&window.MirelaSearch.ssrSearchEnvelopeOnly;if(e&&typeof e.isEnvelopeOnlyMode=="function")return e.isEnvelopeOnlyMode()}catch{}try{return!!window.__MIRELA_DISABLE_CLIENT_HOME_FILTER_PERSISTENCE}catch{return!1}}function Et(){try{var e=typeof window<"u"&&window.MirelaSearch&&window.MirelaSearch.ssrSearchEnvelopeOnly;if(e&&typeof e.getEnvelope=="function")return e.getEnvelope()}catch{}return{}}function lt(){try{return window.__mirelaHomeOffersCarouselGesture===!0}catch{return!1}}function me(e){try{if(window.MirelaSearch&&typeof window.MirelaSearch.applyUserMovedMapList=="function"){window.MirelaSearch.applyUserMovedMapList(!!e);return}}catch{}try{window.__mirelaUserMovedMap=!!e}catch{}}function ut(e){try{if(window.MirelaSearch&&typeof window.MirelaSearch.applyUserMovedMapHome=="function"){window.MirelaSearch.applyUserMovedMapHome(!!e);return}}catch{}try{window.__mirelaUserMovedMapHome=!!e}catch{}}function Qe(){try{me(!0)}catch{}try{ut(!0)}catch{}try{l.isListPage&&typeof window<"u"&&window.isHomePage!==!0&&(window.__mapManualNext=!0,window.__listBoundsMode=!0)}catch{}}let l={center:null,zoom:11,zoomSnap:1,maxZoom:20,locateZoom:16,controls:{gestureHandling:!1,zoom:!0,requireCtrlForScrollWheelZoom:!1,locate:!0,locatePosition:"topright",list:!0,autoSearch:!0,resizeMap:!1,markerHighlight:!1,markerPopup:!0},labels:{zoomInControl:"",zoomOutControl:"",locateControl:"",customListButton:"",customManualSearchButton:"",customAutoSearchButton:"",resizeMapButton:"",locateError:""},domElements:{mapContainer:".js-map-container",searchForm:".js-search-form",locationMapInput:".js-location-map",autoSearchButton:".js-map-auto",listButton:".js-map-list",manualSearchButton:".js-map-manual",messageContainer:".js-map-message",mobileOfferListContainer:"",customPopupSelector:"custom-popup",resizeMapButtonIconClass:"",mapControlButtons:".leaflet-control-button, .leaflet-control-locate, .leaflet-control-zoom"},offerTypes:[],isSearchAutoChecked:1,isSearchAutoCentered:0,resizeMapButtonValue:1,customLoadMapFunction:null,searchFormSubmitListener:!0,mobilePopupOpenCallback:null,mobilePopupCloseCallback:null,mapBoundsBuffer:20,isListPage:!1,onload:function(){}};this.MARKERS={DEFAULT:{color:"228ae6"},PIN_RED:{id:1,color:"d52927"},PIN_GRAY:{id:3,color:"ff7f27"},PROJECT:{id:5,color:"13a416"}};let a,le,I=this,X=new M.featureGroup,pe=!1,G=!1,De=!1,Ne=null,Ie=null,_e=null,xt=0,dt=!1,Pe=!1,Ce=!1,Ee,Bt,$e,U={},q,Ht=null,Ln=!1,ve=null,re=null,ue=null,ke={},At={},Ft=!1,Tt=!1,xe=!1,te=null,qe=Object.create(null),ze=Object.create(null),Ze=null,Be=null,he=null,je=null;function Ot(){try{if(!a)return!0;var e=a.getZoom(),t=a.project(a.getCenter(),e),o=Ze;if(!o||typeof o.x!="number"||typeof o.y!="number"||Be!=null&&e!==Be)return!0;var n=t.x-o.x,i=t.y-o.y,s=typeof l.mapBoundsBuffer=="number"?l.mapBoundsBuffer:20,r=s;try{Q&&document.body&&document.body.classList.contains("page-home")&&(r=Math.max(s,28))}catch{}return n*n+i*i>=r*r}catch{return!0}}function Ue(){try{var e=l.domElements.mobileOfferListContainer;return e=e&&String(e).trim()||"",e||".js-offers-list"}catch{return".js-offers-list"}}function Rt(e){try{return!e||!e.closest||!document.body||!document.body.classList.contains("page-home")?!1:!!e.closest(Ue())}catch{return!1}}function Dt(){try{var e=document.querySelector(Ue());return!!(e&&e.querySelector(".mobile-offers-carousel"))}catch{return!1}}function Nt(){try{window.__mirelaHomeOffersCarouselGesture=!0}catch{}try{te&&(clearTimeout(te),te=null)}catch{}try{!xe&&a&&a.dragging&&typeof a.dragging.enabled=="function"&&a.dragging.enabled()&&(a.dragging.disable(),xe=!0)}catch{}}function It(){try{te&&(clearTimeout(te),te=null)}catch{}te=setTimeout(function(){te=null;try{if(Object.keys(qe).length>0||Object.keys(ze).length>0)return}catch{return}try{window.__mirelaHomeOffersCarouselGesture=!1}catch{}try{xe&&a&&a.dragging&&typeof a.dragging.enable=="function"&&a.dragging.enable()}catch{}xe=!1},520)}function wo(){try{te&&(clearTimeout(te),te=null)}catch{}qe=Object.create(null),ze=Object.create(null);try{window.__mirelaHomeOffersCarouselGesture=!1}catch{}try{xe&&a&&a.dragging&&typeof a.dragging.enable=="function"&&a.dragging.enable()}catch{}xe=!1;try{window.__mirelaHomeProgrammaticPinPanUntil=0}catch{}}function _o(){try{if(window.__mirelaMobileOffersMapInfoTapNav)return;window.__mirelaMobileOffersMapInfoTapNav=!0}catch{return}var e=12,t=450,o=typeof WeakMap<"u"?new WeakMap:null,n=null,i=null,
1s=0;function r(c){return!!(!c||!c.closest||c.closest(".carousel-control")||c.closest(".map-info-close-mobile"))}function u(c){return!c||!c.closest?null:c.closest(".js-offers-list .mobile-offers-carousel .map-info-box[href]")}function f(c){if(!o)return{isDown:!1,startX:0,startY:0,lastX:0,lastY:0};var m=o.get(c);return m||(m={isDown:!1,startX:0,startY:0,lastX:0,lastY:0},o.set(c,m)),m}function p(c,m){var h=(c.getAttribute("href")||"").trim();if(!(!h||h==="#"||h.indexOf("javascript:")===0)){var d=Date.now();if(!(d-s<t)){if(s=d,m){try{m.preventDefault()}catch{}try{m.stopPropagation()}catch{}}window.location.assign(h)}}}function b(c,m,h,d,g){if(!(!c||!m||!m.isDown)&&(m.isDown=!1,n=null,i=null,!r(g&&g.target))){var w=h-m.startX,P=d-m.startY;Math.abs(w)>=e||Math.abs(P)>=e||g&&(g.metaKey||g.ctrlKey||g.shiftKey||g.altKey)||p(c,g)}}function _(c,m,h){n=c;var d=f(c);d.isDown=!0,d.startX=m,d.startY=h,d.lastX=m,d.lastY=h}document.addEventListener("touchstart",function(c){if(!r(c.target)){var m=u(c.target);if(m){var h=c.changedTouches&&c.changedTouches[0];h&&(i=h.identifier,_(m,h.clientX,h.clientY))}}},{capture:!0,passive:!0}),document.addEventListener("touchmove",function(c){if(!(!n||i==null)){var m=o?o.get(n):null;if(!(!m||!m.isDown)){var h;for(h=0;h<c.touches.length;h++)if(c.touches[h].identifier===i){m.lastX=c.touches[h].clientX,m.lastY=c.touches[h].clientY;break}}}},{capture:!0,passive:!0});function y(c){if(!(!n||i==null)){var m=n,h=o?o.get(m):null,d=null,g;for(g=0;g<c.changedTouches.length;g++)if(c.changedTouches[g].identifier===i){d=c.changedTouches[g];break}d&&b(m,h,d.clientX,d.clientY,c)}}document.addEventListener("touchend",y,{capture:!0,passive:!1}),document.addEventListener("touchcancel",y,{capture:!0,passive:!1}),document.addEventListener("click",function(c){if(c.defaultPrevented&&!r(c.target)){var m=u(c.target);m&&(c.metaKey||c.ctrlKey||c.shiftKey||c.altKey||p(m,c))}},!1)}
1function vo(){try{let i=function(f){try{if(!Rt(f.target)||!Dt())return;qe[f.pointerId]=!0,Nt()}catch{}},s=function(f){try{if(!qe[f.pointerId])return;delete qe[f.pointerId],It()}catch{}},r=function(f){try{if(!Rt(f.target)||!Dt())return;var p;for(p=0;p<f.changedTouches.length;p++)ze[f.changedTouches[p].identifier]=!0;Nt()}catch{}},u=function(f){try{var p,b=!1;for(p=0;p<f.changedTouches.length;p++){var _=f.changedTouches[p].identifier;ze[_]&&(b=!0,delete ze[_])}b&&It()}catch{}};var e=i,t=s,o=r,n=u;if(Tt)return;Tt=!0,typeof window.PointerEvent<"u"&&(document.addEventListener("pointerdown",i,!0),document.addEventListener("pointerup",s,!0),document.addEventListener("pointercancel",s,!0)),document.addEventListener("touchstart",r,{capture:!0,passive:!0}),document.addEventListener("touchend",u,{capture:!0,passive:!0}),document.addEventListener("touchcancel",u,{capture:!0,passive:!0})}catch{}}let kt=!1;const Pn=Date.now();try{const e=()=>{kt=!0};["mousedown","touchstart","keydown","click"].forEach(t=>{document.addEventListener(t,e,{passive:!0,capture:!0})})}catch{}this.create=function(e,t=!0){if(a)return;l=S.extend(!0,{},l,e);let o=t;try{if(window.mirelaGeolocation&&typeof window.mirelaGeolocation.getCurrentLocation=="function"){const n=window.mirelaGeolocation.getCurrentLocation();n&&typeof n.lat=="number"&&typeof n.long=="number"&&(l.center={lat:n.lat,lng:n.long},l.zoom=12,o=!1)}}catch{}if(bo(),Co(),o){try{$()}catch{}ae(function(n){I.fitMapBoundsSafely(n);const i=new CustomEvent("mapLoaded");document.dispatchEvent(i)})}document.addEventListener("locationDetected",function(n){I.setUserLocation(n.detail.lat,n.detail.long)});try{const n=window.__pendingLocationBounds,i=Number(window.__pendingLocationBoundsTs||0);!!(n&&Date.now()-i<3e5)&&setTimeout(function(){try{window.__mirelaExplicitLocationFit=!0,window.__forceHomeAutoFitOnce=!0,window.__mirelaAutocompleteSelection=!0}catch{}try{I.fitMapBoundsSafely({bounds:Object.assign({},n,{zoom:window.__pendingLocationBoundsZoom||n.zoom||14})})}catch{}try{setTimeout(function(){try{window.__mirelaExplicitLocationFit=!1}catch{}try{window.__mirelaAutocompleteSelection=!1}catch{}},2500)}catch{}},60)}catch{}l.onload(),setTimeout(function(){_t(1200)},100)};function ft(){try{return!!(typeof window<"u"&&window.isHomePage===!0||typeof document<"u"&&document.documentElement&&document.documentElement.classList&&document.documentElement.classList.contains("page-home")||typeof document<"u"&&document.body&&document.body.classList&&document.body.classList.contains("page-home"))}catch{return!1}}function He(){try{return!(!l||l.isListPage!==!0||ft())}catch{return!1}}function Ae(){try{if(!a||!He())return!1;if(!a.scrollWheelZoom&&window.L&&M.Map&&M.Map.ScrollWheelZoom)try{typeof a.addHandler=="function"?a.addHandler("scrollWheelZoom",M.Map.ScrollWheelZoom):a.scrollWheelZoom=new M.Map.ScrollWheelZoom(a)}catch{}if(a.scrollWheelZoom&&typeof a.scrollWheelZoom.enable=="function")return a.scrollWheelZoom.enable(),!0}catch{}return!1}function mt(){try{var e=S(l.domElements.autoSearchButton);return e.find("input").length>0&&e.find("input").prop("checked")}catch{return!1}}function So(){je=null;try{if(!a||!He()||!mt()||!q||window.__listProgrammaticMove===!0)return;$();try{me(!0)}catch{}try{Se()}catch{}var e=Number(window.__listAutoSearchSeq||0)+1;window.__listAutoSearchSeq=e;try{window.__mapManualNext=!0}catch{}try{window.__listAutoSearchPendingAutoSeq=e}catch{}var t=S(l.domElements.searchForm),o=String(t.find('[name="map"]').val()||"").trim();if(window.__listAutoSearchBusy)window.__listAutoSearchPending=!0,window.__listAutoSearchPendingMapSig=o,window.__listAutoSearchPendingAutoSeq=e;else{window.__listAutoSearchBusy=!0;try{document.dispatchEvent(new CustomEvent("listAutoSearchRequested"))}catch{}}try{window.__mirelaListWheelZoomIntentAt=0}catch{}try{window.__mirelaListWheelZoomStart=null}catch{}__userMovedMap=!1}catch{}}function qt(){try{if(!a||!He()||!mt())return;je&&(clearTimeout(je),je=null),je=setTimeout(So,100)}catch{}}function Mo(){try{if(!a||!He())return;var e=typeof a.getContainer=="function"?a.getContainer():null;if(!e||e.getAttribute("data-mirela-list-wheel-intent")==="1")return;e.setAttribute("data-mirela-list-wheel-intent","1"),e.addEventListener("wheel",function(t){try{if(!a||!He()||t.ctrlKey||t.metaKey)return;var o=typeof t.deltaY=="number"?t.deltaY:t.wheelDelta?-t.wheelDelta:t.detail||0;if(!o)return;try{Ae()}catch{}try{window.__mirelaListWheelZoomIntentAt=Date.now()}catch{}try{typeof a.getZoom=="function"&&(window.__mirelaListWheelZoomStart=a.getZoom())}catch{}qt()}catch{}},{passive:!1,capture:!0})}catch{}}function bo(){var e={zoom:11,minZoom:1,maxZoom:typeof l.maxZoom=="number"?l.maxZoom:20,zoomSnap:.5,trackResize:!1,zoomControl:!1,gestureHandling:l.controls.gestureHandling};l.controls.interactive===!1&&(e.scrollWheelZoom=!1,e.dragging=!1,e.touchZoom=!1,e.doubleClickZoom=!1,e.boxZoom=!1,e.keyboard=!1);try{ft()&&l.controls&&l.controls.interactive!==!1&&(l.controls.requireCtrlForScrollWheelZoom=!0)}catch{}try{l.isListPage===!0&&!ft()&&(e.scrollWheelZoom=!0)}catch{}try{l.controls&&l.controls.requireCtrlForScrollWheelZoom===!0&&l.controls.interactive!==!1&&(e.scrollWheelZoom=!1)}catch{}try{l.controls&&l.controls.gestureHandling===!0&&l.controls.interactive!==!1&&(e.dragging=!1)}catch{}a=M.map("map",e),cn(),l.center&&a.setView([l.center.lat,l.center.lng],l.zoom),Sn(),_n();var t=!1;try{t=typeof window<"u"&&window.isHomePage===!0||typeof document<"u"&&document.body&&document.body.classList&&document.body.classList.contains("page-home")}catch{}if((!Q||t)&&wn(),gn(),yn(),hn(),vn(),fn(),Lo(),Po(),Mo(),!Ft){Ft=!0;try{S(document).on("click.mirelaMapInfoClose",".js-offers-list .map-info-close-mobile",function(o){try{o.preventDefault()}catch{}try{o.stopPropagation()}catch{}try{a&&a.closePopup&&a.closePopup()}catch{}})}catch{}}vo(),_o(),Ae();try{He()&&document.dispatchEvent(new CustomEvent("mirelaListMapInitialized"))}catch{}}function zt(e){if(e&&typeof e=="object"&&e.outerHTML&&(e=e.outerHTML),typeof e!="string"||e.indexOf("map-info-close-mobile")!==-1)return e;var t="<span class='map-info-close-mobile' role='button' tabindex='0' aria-label='Close'>×</span>",o='<span class="map-info-close-mobile" role="button" tabindex="0" aria-label="Close">×</span>';return e.indexOf("<div class='map-info-content'>")!==-1?e.replace("<div class='map-info-content'>","<div class='map-info-content'>"+t):e.indexOf('<div class="map-info-content">')!==-1?e.replace('<div class="map-info-content">','<div class="map-info-content">'+o):e}function Lo(){try{let f=function(){if(n)return n;
1n=document.createElement("div"),n.className="ctrl-scroll-overlay",n.style.cssText=["position:absolute","inset:0","background:rgba(0,0,0,0.55)","color:#fff","display:none","align-items:center","justify-content:center","font-size:16px","line-height:1.4","text-align:center","padding:12px","z-index:9999","opacity:0","transition:opacity 120ms ease","pointer-events:none"].join(";");var _=o?"Hold <b>Ctrl</b> and scroll to zoom the map":"\u0417\u0430\u0434\u0440\u044A\u0436 <b>Ctrl</b> \u0438 \u0437\u0430\u0432\u044A\u0440\u0442\u0438 \u043A\u043E\u043B\u0435\u043B\u043E\u0442\u043E, \u0437\u0430 \u0434\u0430 \u0443\u0432\u0435\u043B\u0438\u0447\u0430\u0432\u0430\u0448/\u043D\u0430\u043C\u0430\u043B\u044F\u0432\u0430\u0448 \u043A\u0430\u0440\u0442\u0430\u0442\u0430";return n.innerHTML="<div>"+_+"</div>",e.appendChild(n),n},p=function(){var _=f();i&&(clearTimeout(i),i=null),_.style.display="flex",_.offsetHeight,_.style.opacity="1",i=setTimeout(b,1400)},b=function(){n&&(n.style.opacity="0",setTimeout(function(){n&&(n.style.display="none")},160))};var s=f,r=p,u=b;if(!a||!l.controls||l.controls.requireCtrlForScrollWheelZoom!==!0||l.controls.interactive===!1)return;var e=a.getContainer();if(!e||e.getAttribute("data-mirela-ctrl-wheel")==="1")return;if(e.setAttribute("data-mirela-ctrl-wheel","1"),!a.scrollWheelZoom&&window.L&&M.Map&&M.Map.ScrollWheelZoom)try{typeof a.addHandler=="function"?a.addHandler("scrollWheelZoom",M.Map.ScrollWheelZoom):a.scrollWheelZoom=new M.Map.ScrollWheelZoom(a)}catch{}try{a.scrollWheelZoom.disable()}catch{}var t=(document.documentElement.getAttribute("lang")||"").toLowerCase(),o=t==="en"||t&&t.indexOf("en")===0,n=null,i=null;e.addEventListener("wheel",function(_){if(_.ctrlKey||_.metaKey){try{a.scrollWheelZoom.enable()}catch{}_.preventDefault(),b()}else{try{a.scrollWheelZoom.disable()}catch{}p()}},{passive:!1}),window.addEventListener("keyup",function(_){if(_&&(_.key==="Control"||_.key==="Meta")){try{a.scrollWheelZoom.disable()}catch{}b()}})}catch{}}function Po(){try{let n=function(s){try{if(!a.dragging||typeof a.dragging.enabled!="function")return;s&&!a.dragging.enabled()?a.dragging.enable():!s&&a.dragging.enabled()&&a.dragging.disable()}catch{}},i=function(s){var r=s&&s.touches?s.touches.length:0;n(r>1)};var t=n,o=i;if(!a||!l.controls||l.controls.gestureHandling!==!0||l.controls.interactive===!1)return;var e=a.getContainer();if(!e||e.getAttribute("data-mirela-two-finger-drag")==="1")return;e.setAttribute("data-mirela-two-finger-drag","1"),n(!1),e.addEventListener("touchstart",i,{passive:!0,capture:!0}),e.addEventListener("touchmove",i,{passive:!0,capture:!0}),e.addEventListener("touchend",i,{passive:!0,capture:!0}),e.addEventListener("touchcancel",function(){n(!1)},{passive:!0,capture:!0})}catch{}}function Co(){let e=!1,t=0;function o(){try{if(!(typeof window<"u"&&window.isHomePage===!0||typeof document<"u"&&document.body&&document.body.classList&&document.body.classList.contains("page-home"))||lt())return;e=!0;try{me(!0)}catch{}try{ut(!0)}catch{}try{window.__mirelaHomeCityWideMenuPick=!1}catch{}}catch{}}try{window.addEventListener("pageshow",function(r){try{if(!l||l.isListPage!==!0||!r||r.persisted!==!0)return;e=!1;try{re&&(clearTimeout(re),re=null)}catch{}try{he&&(clearTimeout(he),he=null)}catch{}try{me(!1)}catch{}try{window.__mirelaListWheelZoomIntentAt=0}catch{}try{window.__mirelaListWheelZoomStart=null}catch{}try{window.__mapManualNext=!1}catch{}try{window.__listAutoSearchPending=!1}catch{}try{window.__listAutoSearchBusy=!1}catch{}try{q=a.project(a.getCenter(),a.getZoom())}catch{}}catch{}},!0)}catch{}try{a.on("dragstart",function(r){try{q||(q=a.project(a.getCenter(),a.getZoom()))}catch{}try{if(lt())return}catch{}e=!0;try{t=Date.now()}catch{}try{typeof window<"u"&&l&&l.isListPage&&me(!0)}catch{}try{typeof window<"u"&&window.isHomePage===!0&&(window.__mirelaHomeCityWideMenuPick=!1)}catch{}}),a.on("zoomstart",function(r){try{q||(q=a.project(a.getCenter(),a.getZoom()))}catch{}try{if(pe||l&&l.isListPage&&window.__listProgrammaticMove===!0||window.__mirelaAutocompleteSelection===!0)return}catch{}try{var u=typeof window<"u"&&window.isHomePage===!0||typeof document<"u"&&document.body&&document.body.classList&&document.body.classList.contains("page-home");if(u){if(!r||!r.originalEvent)return;o()}}catch{}try{if(l&&l.isListPage){if(!r||!r.originalEvent){var f=!1;try{f=Number(window.__mirelaListWheelZoomIntentAt||0)>0&&Date.now()-Number(window.__mirelaListWheelZoomIntentAt||0)<1200}catch{}if(!f)return}try{me(!0)}catch{}try{window.__mirelaListWheelZoomIntentAt=0}catch{}}}catch{}e=!0}),a.on("locateactivate",function(){e=!0,Qe()});try{var n=a&&typeof a.getContainer=="function"?a.getContainer():null;if(n&&n.__mirelaMapLeafletHomePinchFallback!==!0){n.__mirelaMapLeafletHomePinchFallback=!0;var i=function(r){try{if(!r||!r.touches||r.touches.length<2)return;o()}catch{}};n.addEventListener("touchstart",i,{passive:!0,capture:!0}),n.addEventListener("touchmove",i,{passive:!0,capture:!0})}}catch{}}catch{}try{if(l&&l.isListPage){var s=a.getContainer();s&&s.addEventListener("click",function(r){try{var u=r&&(r.target||r.srcElement);if(!u||!u.closest)return;var f=u.closest("a.leaflet-control-zoom-in, a.leaflet-control-zoom-out");if(!f)return;e=!0;try{me(!0)}catch{}}catch{}},!0)}}catch{}try{l&&l.isListPage&&a.on("zoomend",function(){try{var r=Number(window.__mirelaListWheelZoomIntentAt||0)>0&&Date.now()-Number(window.__mirelaListWheelZoomIntentAt||0)<1600;if(!r)return;var u=Number(window.__mirelaListWheelZoomStart),f=typeof a.getZoom=="function"?Number(a.getZoom()):NaN;if(isFinite(f)&&(!isFinite(u)||Math.abs(f-u)>=.01)){e=!0;try{me(!0)}catch{}}qt()}catch{}})}catch{}a.on("moveend",function(r){if(G===!0)return;var u=e===!0&&l.isListPage&&!mt();if(pe){pe=!1;try{typeof window<"u"&&window.isHomePage===!0&&a&&(Ze=a.project(a.getCenter(),a.getZoom()),Be=a.getZoom())}catch{}if(!u){e=!1;try{q=a.project(a.getCenter(),a.getZoom())}catch{}return}}try{if(l.isListPage&&window.__listProgrammaticMove===!0&&!u){try{q=a.project(a.getCenter(),a.getZoom())}catch{}return}}catch{}if(u){e=!1;try{eo()&&(S(l.domElements.mapContainer).addClass("is-dirty"),l.domElements.messageContainer&&S(l.domElements.messageContainer).css({display:""}))}catch{}return}const f=!q;let p=S(l.domElements.autoSearchButton);if(p.find("input").length>0&&p.find("input").prop("checked")){var b=!1;try{var _=typeof window.__mirelaHomeProgrammaticPinPanUntil=="number"?window.__mirelaHomeProgrammaticPinPanUntil:0,y=typeof window<"u"&&window.isHomePage===!0;b=y&&_>0&&Date.now()<_}catch{}if(b){try{q=a.project(a.getCenter(),a.getZoom())}catch{}try{typeof window<"u"&&window.isHomePage===!0&&a&&(Ze=a.project(a.getCenter(),a.getZoom()),Be=a.getZoom())}catch{}}else{const d=S(l.domElements.searchForm),g=d.find('[name="street_id"]').val(),w=typeof window<"u"&&window.isHomePage===!0;if(w){try{lt()?e=!1:window.__mirelaUserMovedMapHome===!0?e=!0:e=!1}catch{}try{let C=!1;try{C=typeof window<"u"&&(window.__mirelaRestoringUserMapView===!0||window.__mirelaAutocompleteSelection===!0)}catch{C=!1}if(e&&!C){let B=!0;try{if(w&&!Ot()){B=!1,e=!1;try{ut(!1)}catch{}}}catch{}if(B){We();try{window.__mirelaHomeForceStrictLocStripBeforeBrowse=!0}catch{}}}}catch{}}$();try{const C=typeof window<"u"&&window.isHomePage===!0;if(l.isListPage&&!C&&!f){var c=!1,m=!1;try{c=t>0&&Date.now()-t<2e3}catch{}try{m=Number(window.__mirelaListWheelZoomIntentAt||0)>0&&Date.now()-Number(window.__mirelaListWheelZoomIntentAt||0)<1600}catch{}if(!e&&!c&&!m||m)return;e=!1,t=0;var h=0;try{h=Number(window.__listAutoSearchSeq||0)+1,window.__listAutoSearchSeq=h}catch{}try{Se()}catch{}try{const B=String(d.find('[name="district_id"]').val()||"").trim()!==""||d.find('input[name="district_id[]"]').length>0,x=String(d.find('[name="district_group_id"]').val()||"").trim()!==""||d.find('input[name="district_group_id[]"]').length>0,E=String(d.find('[name="street_id"]').val()||"").trim()!=="";let F=!1;try{const v=new URLSearchParams(window.location.search);F=String(v.get("district_id")||"").trim()!==""||String(v.get("district_group_id")||"").trim()!==""||String(v.get("street_id")||"").trim()!==""||(v.getAll("district_id[]")||[]).length>0||(v.getAll("district_group_id[]")||[]).length>0}catch{}}catch{}try{he&&(clearTimeout(he),he=null)}catch{}he=setTimeout(function(){he=null,$();try{Se()}catch{}try{window.__mapManualNext=!0}catch{}try{window.__listAutoSearchPendingAutoSeq=h}catch{}if(!window.__listAutoSearchBusy)window.__listAutoSearchBusy=!0;else{const B=String(d.find('[name="map"]').val()||"").trim();window.__listAutoSearchPending=!0,window.__listAutoSearchPendingMapSig=B,window.__listAutoSearchPendingAutoSeq=h;return}try{document.dispatchEvent(new CustomEvent("listAutoSearchRequested"))}catch{}},120)}}catch{}g&&(!l.isListPage||typeof window<"u"&&window.isHomePage===!0)&&(d.find('[name="street_id"]').length===0&&S("<input>",{type:"hidden",name:"street_id",value:g}).appendTo(d),d.find('[name="map"]').val(""),de(""));const P=typeof window<"u"&&window.isHomePage===!0;if(!l.isListPage||P){if(P&&!e)return;if(P&&(e=!1),re){try{clearTimeout(re)}catch{}re=null}re=setTimeout(function(){try{if(typeof window<"u"&&window.isHomePage===!0&&!Ot()){re=null;return}}catch{}try{typeof window<"u"&&window.isHomePage===!0&&(window.__mirelaHomeBrowseFromAutoMove=!0)}catch{}ae(),re=null},400)}}}else eo()&&(S(l.domElements.mapContainer).addClass("is-dirty"),l.domElements.messageContainer&&S(l.domElements.messageContainer).css({display:""}));
1q||(q=a.project(a.getCenter(),a.getZoom()),l.isListPage&&(e=!1))}),l.searchFormSubmitListener===!0&&S(l.domElements.searchForm).on("submit",function(r){let u=S(l.domElements.searchForm),f=u.find("[name=ac_s]").val(),p=u.find("[name=offer_id]").val(),b=u.find("[name=type]:checked").val();b===void 0&&(b=u.find("input[name=type]").val());const _=b==null?"":String(b),y=(l.offerTypes||[]).map(c=>String(c));f&&isNaN(f)===!1||p&&isNaN(p)===!1||y.indexOf(_)==-1||(r.preventDefault(),ae(function(c){I.fitMapBoundsSafely(c)}))});try{io(a)}catch{}}function Zt(e){try{const t=new URLSearchParams(e||""),o=Array.from(new Set(Array.from(t.keys()))).sort(),n=new URLSearchParams;return o.forEach(function(i){t.getAll(i).slice().sort().forEach(function(r){n.append(i,r)})}),n.toString()}catch{return e||""}}function ae(e){try{const c=typeof window<"u"&&window.isHomePage===!0,m=typeof window<"u"&&window.__mirelaUserMovedMap===!0,h=typeof window<"u"&&(window.__manualSearchRequested===!0||window.__mapManualNext===!0);if(c&&!m&&!h&&!(G===!0))return}catch{}try{typeof window<"u"&&window.isHomePage===!0&&(window.__manualSearchRequested===!0||window.__mapManualNext===!0||window.__forceHomeAutoFitOnce===!0)&&(window.__mirelaHomeBrowseFromAutoMove=!1)}catch{}if(typeof l.customLoadMapFunction=="function"){l.customLoadMapFunction(e),ee();return}if(Pe){Ce=!0;return}Pe=!0;try{q=a.project(a.getCenter(),a.getZoom())}catch{q=null}Mt();let t,o=!1,n=null;function i(){try{o&&n&&n.find('input[name="map_manual"]').remove()}catch{}}try{const c=S(l.domElements.searchForm);n=c;const m=window.__manualSearchRequested===!0,h=typeof window<"u"&&window.isHomePage===!0,d=String(c.find('[name="type"]').val()||"").trim(),g=d==="1"||d==="2";if((m||G===!0)&&l.isListPage&&!h){if(c.find('input[name="map_manual"]').length===0?S("<input>",{type:"hidden",name:"map_manual",value:"1"}).appendTo(c):c.find('input[name="map_manual"]').val("1"),o=!0,g)try{c.find('[name="city_id"]').val(""),c.find('[name="city_id[]"]').remove()}catch{}}else c.find('input[name="map_manual"]').remove()}catch{}try{const c=S(l.domElements.searchForm),m=typeof window<"u"&&window.isHomePage===!0,h=G===!0;if(m&&h){try{We()}catch{}try{window.__mirelaHomeForceStrictLocStripBeforeBrowse=!0}catch{}}if(m){const d=String(c.find('[name="map"]').val()||"").trim();let g=!1;try{const F=String(window.__mirelaHomeListIntent||"").trim().toLowerCase();g=!!(h||F==="map"||window.__mirelaUserMovedMapHome===!0||window.__mirelaHomeManualBoundsSearchDone===!0||window.__mirelaHomeForceMapListNext===!0)}catch{g=!1}let w=!1;try{const F=window.MirelaLocationSelectionRequest||null;F&&typeof F.hasMapBoundsValue=="function"?w=F.hasMapBoundsValue(d):w=!!(d&&d.split("|").length>=4)}catch{w=!!(d&&d.split("|").length>=4)}const P=S(".js-mobile-search-form"),C=String(c.find('[name="district_id"]').val()||P.find('[name="district_id"]').val()||"").trim()!==""||String(c.find('[name="district_group_id"]').val()||P.find('[name="district_group_id"]').val()||"").trim()!==""||String(c.find('[name="street_id"]').val()||P.find('[name="street_id"]').val()||"").trim()!=="",B=String(c.find('[name="s"]').val()||P.find('[name="s"]').val()||S(".js-mobile-search-input").val()||S(".js-location-dd-input").val()||"").trim(),x=String(c.find('[name="city_id"]').val()||P.find('[name="city_id"]').val()||"").trim();let E=!1;try{const F=window.MirelaHomeLocationNavigationPolicy||null;F&&typeof F.shouldDropCityForBounds=="function"?E=g&&F.shouldDropCityForBounds({hasMapBounds:w,hasStrictLocation:C,searchTerm:B,cityId:x,defaultCityId:"3"}):E=g&&w&&!C&&!B&&(!x||x==="0"||x==="3")}catch{E=g&&w&&!C&&!B&&(!x||x==="0"||x==="3")}E&&(c.find('[name="city_id"]').val(""),c.find('[name="city_id[]"]').remove())}}catch{}try{var s=window.AdvancedSearchShared||null;s&&typeof s.syncDefaultAdvancedPanelStateToForm=="function"&&s.syncDefaultAdvancedPanelStateToForm()}catch{}try{if(typeof window<"u"&&window.isHomePage===!0&&window.__mirelaHomeForceStrictLocStripBeforeBrowse===!0){window.__mirelaHomeForceStrictLocStripBeforeBrowse=!1,We();try{$()}catch{}}}catch{}let r="";try{const c=typeof window.filterState=="object"&&window.filterState?window.filterState:null,m=window.MirelaSearch&&window.MirelaSearch.searchRequestBuilder;let h=null;if(c&&m&&typeof m.serializeSnapshotToEntries=="function"&&(h=m.serializeSnapshotToEntries(c)),Array.isArray(h)&&h.length){const d=new URLSearchParams;
1h.forEach(function(g){!g||!g.name||d.append(String(g.name),String(g.value==null?"":g.value))}),r=d.toString()}}catch{}r||(r=S(l.domElements.searchForm).serialize());try{if(l.isListPage&&window.innerWidth<768){if(window.__forceMapParamOnce&&window.__listFirstMapParam){const c=new URLSearchParams(r);c.set("map",String(window.__listFirstMapParam)),r=c.toString(),window.__forceMapParamOnce=!1}if(window.__blockMapLeafletRequestsOnce===!0){window.__blockMapLeafletRequestsOnce=!1,Pe=!1,ee();return}}}catch{}try{const m=(S(l.domElements.searchForm).find('[name="street_id"]').val()||"").trim();if(m&&r.indexOf("street_id=")===-1&&(r+=(r?"&":"")+"street_id="+encodeURIComponent(m)),m){const h=new URLSearchParams(r);try{const d=window.MirelaSearch&&window.MirelaSearch.queryUtils?window.MirelaSearch.queryUtils:null;d&&typeof d.removeLocationParams=="function"?r=d.removeLocationParams(h,{includeSearch:!1,includeCity:!1,includeDistrict:!1,includeDistrictGroup:!1,includeStreet:!1,includeMap:!0,includeMapManual:!0}).toString():h.has("map")&&(h.delete("map"),r=h.toString())}catch{h.has("map")&&(h.delete("map"),r=h.toString())}}}catch{}try{if(typeof window<"u"&&window.isHomePage===!0){const m=S(l.domElements.searchForm),h=S(".js-mobile-search-form");if(m.length&&h.length){const d=new URLSearchParams(r),g=function(L,H){const O=[];try{L.find('input[name="'+H+'[]"]').each(function(){const D=String(this&&this.value||"").trim();D&&O.push(D)})}catch{}return O.join(",")},w=function(L){const H=function(D){try{return String(L.find('[name="'+D+'"]').first().val()||"").trim()}catch{return""}};return{city_id:H("city_id")||(function(){try{return String(L.find(".js-city-id").first().val()||"").trim()}catch{return""}})(),district_id:H("district_id")||g(L,"district_id"),district_group_id:H("district_group_id")||g(L,"district_group_id"),street_id:H("street_id"),s:H("s")}},P=function(L){return L?!!(String(L.city_id||"").trim()||String(L.district_id||"").trim()||String(L.district_group_id||"").trim()||String(L.street_id||"").trim()||String(L.s||"").trim()):!1},C=function(L,H){try{d.delete(L)}catch{}try{d.delete(L+"[]")}catch{}const O=String(H||"").trim();O&&d.set(L,O)},B=w(m),x=w(h),E=P(B),F=P(x),v=E?B:x;(E||F)&&(["city_id","district_id","district_group_id","street_id","s"].forEach(function(L){C(L,v[L]||"")}),r=d.toString())}}else{const h=(S(l.domElements.searchForm).find('[name="city_id"]').val()||"").toString().trim();h&&r.indexOf("city_id=")===-1&&(r+=(r?"&":"")+"city_id="+encodeURIComponent(h))}}catch{}try{const c=typeof window<"u"&&window.isHomePage===!0,m=!!window.__mirelaIncludeStoredDescriptorsOnce;if(c&&m){const h=S(l.domElements.searchForm),d=new URLSearchParams(r),w=function(){try{if(yo())return Et()}catch{}return{}}();["sea_side","has_upkeep","yearround_use"].forEach(function(P){try{if(String(d.get(P)||"").trim())return;var C="";try{C=String(h.find('[name="'+P+'"]').val()||"").trim()}catch{}const x=String(w&&w[P]!=null?w[P]:"").trim(),E=C||x;E&&d.set(P,E)}catch{}}),r=d.toString(),window.__mirelaIncludeStoredDescriptorsOnce=!1}}catch{}const u=new URLSearchParams(r),f=u.get("map"),p=u.has("street_id");f&&!p&&(t=Yo(f),r=Xo(r,t));try{window.__lastRequestBounds=t||null}catch{}try{const c=new URLSearchParams(r);window.__lastMapParamUsed=c.get("map")||""}catch{try{window.__lastMapParamUsed=""}catch{}}try{const c=new URLSearchParams(r);let m="";try{const g=S(l.domElements.searchForm),w=(g.find(".js-search-input").val()||"").toString().trim(),P=(g.find('[name="s"]').val()||"").toString().trim(),C=(S(".js-mobile-search-input").val()||"").toString().trim();m=w||P||C||""}catch{}const h=function(g){try{const w=c.get(g);if(w&&String(w).trim()!=="")return!0;const P=c.getAll(g);if(P&&P.length)return P.some(function(C){return C&&String(C).trim()!==""})}catch{}return!1};(h("district_id")||h("district_id[]")||h("district_group_id")||h("district_group_id[]")||h("street_id"))&&m===""&&(c.delete("city_id"),c.delete("city_id[]"),r=c.toString())}catch{}const b=2500,_=Zt(r);try{let c=!1;try{typeof window<"u"&&window.__mirelaBypassMapBrowseDedupeOnce===!0&&(c=!0,window.__mirelaBypassMapBrowseDedupeOnce
1=!1)}catch{}if(!c){const m=window.__lastMapBrowseDedupeNorm,h=Number(window.__lastMapBrowseDedupeAt||0);if(_&&m&&_===m&&Date.now()-h<b){Pe=!1,ee();try{i()}catch{}Ce=!1;try{typeof window<"u"&&window.__mirelaLocationCommitNoMap===!0&&window.setTimeout(function(){try{window.__mirelaLocationCommitNoMap=!1}catch{}},900)}catch{}return}}}catch{}try{if(typeof window<"u"&&window.__mirelaLocationCommitNoMap===!0)var y=setTimeout(function(){try{window.__mirelaLocationCommitNoMap=!1}catch{}},5e3)}catch{}window.renderPinsMoveMap({payload:r,renderMap:function(c){try{typeof window<"u"&&window.__mirelaLocationCommitNoMap===!0&&window.setTimeout(function(){try{window.__mirelaLocationCommitNoMap=!1}catch{}},900)}catch{}ho++;try{window.__lastMapBrowseDedupeNorm=Zt(r),window.__lastMapBrowseDedupeAt=Date.now()}catch{}l.isListPage&&console.log("MapLeaflet received response from map-browse-offers:",c),!l.isListPage&&!c.district_polygons&&!c.point&&!c.bounds&&t&&(c.bounds=t),l.isListPage&&c.marker_data&&(c.data=c.marker_data),!l.isListPage&&c.marker_data&&(c.data=c.marker_data);try{const g=document.querySelector(l.domElements.searchForm);if(g){const w=c&&Array.isArray(c.context_district_ids)?c.context_district_ids:[];g.dataset.contextDistrictIds=w&&w.length?w.map(function(P){return String(P)}).join(","):"";try{window.FeatureVisibility&&typeof window.FeatureVisibility.manage=="function"&&window.FeatureVisibility.manage()}catch{}}}catch{}try{const g=!!l.isListPage&&!(typeof window<"u"&&window.isHomePage===!0),w=!!window.__manualSearchRequested;var m=!1;try{m=typeof window<"u"&&window.__mirelaHomeBrowseUsedCityScopeOnly===!0,m&&(window.__mirelaHomeBrowseUsedCityScopeOnly=!1)}catch{}const P=window.__lastRequestBounds,C=c?c.bounds:null,B=c&&Array.isArray(c.data)&&c.data.length>0;g&&w&&P&&C&&!function(E,F){return!E||!F?!1:!(E.sw_lat>F.ne_lat||E.ne_lat<F.sw_lat||E.sw_lng>F.ne_lng||E.ne_lng<F.sw_lng)}(P,C)&&(c.marker_data=[],c.data=[]),w&&(window.__manualSearchRequested=!1);try{if(typeof window<"u"&&window.isHomePage===!0){window.__mapManualNext=!1;var h="";try{h=String(window.__mirelaHomeListIntent||"").trim().toLowerCase()}catch{}if(w&&!m&&h!=="location")try{window.__mirelaHomeManualBoundsSearchDone=!0}catch{}}}catch{}}catch{}I.render(c,e);try{if(typeof window<"u"&&window.isHomePage===!0&&a){var d=function(){try{Ze=a.project(a.getCenter(),a.getZoom()),Be=a.getZoom()}catch{}};d();try{window.setTimeout(d,0)}catch{}}}catch{}if(Pe=!1,ee(),i(),Ce){Ce=!1;try{$()}catch{}ae()}}}).fail(function(c,m,h){console.error("MapLeaflet request failed:",{endpoint:"/map-browse-offers",status:m,error:h,xhr:c}),Pe=!1,ee();try{typeof window<"u"&&window.__mirelaHomeBrowseUsedCityScopeOnly===!0&&(window.__mirelaHomeBrowseUsedCityScopeOnly=!1)}catch{}try{typeof window<"u"&&window.isHomePage===!0&&(window.__mapManualNext=!1)}catch{}if(i(),Ce){Ce=!1;try{$()}catch{}ae()}})}function jt(e){try{if(!e||!e.length)return!1;if(String(e.find('[name="district_id"]').val()||"").trim()!=="")return!0;let t=!1;if(e.find('input[name="district_id[]"]').each(function(){String(S(this).val()||"").trim()!==""&&(t=!0)}),t||String(e.find('[name="district_group_id"]').val()||"").trim()!=="")return!0;let o=!1;if(e.find('input[name="district_group_id[]"]').each(function(){String(S(this).val()||"").trim()!==""&&(o=!0)}),o||String(e.find('[name="street_id"]').val()||"").trim()!=="")return!0}catch{}return!1}function Eo(){try{if(!a||typeof a.eachLayer!="function")return;const e=[];a.eachLayer(function(t){try{t&&t.__mirelaOfferMarker===!0&&e.push(t)}catch{}}),e.forEach(function(t){try{a.removeLayer(t)}catch{}try{X&&typeof X.removeLayer=="function"&&X.removeLayer(t)}catch{}})}catch{}}function Ut(e,t){t=t||{};try{if(!se()||!e||!Array.isArray(e.data)||e.data.length===0){if(se())try{window.__mirelaHomeBrowseFromAutoMove=!1}catch{}return}const o=S(l.domElements.autoSearchButton),n=o.find("input").length>0&&o.find("input").prop("checked");let i=!!(t.forceFit||t.ssrInitial);try{window.__forceHomeAutoFitOnce===!0&&(i=!0,window.__forceHomeAutoFitOnce=!1)}catch{}let s=!1;try{window.__suppressHomeAutoFitOnce===!0&&(s=!0,window.__suppressHomeAutoFitOnce=!1)}catch{}let r=!1;try{window.__mirelaHomeBrowseFromAutoMove===!0&&(r=!0,window.__mirelaHomeBrowseFromAutoMove=!1)}catch{}const u=typeof window<"u"&&window.__mirelaUserMovedMap===!0,f=typeof window<"u"&&window.__mirelaRestoringUserMapView===!0,p=typeof window<"u"&&window.__mirelaAutocompleteSelection===!0;let b=u&&!p||f;(t.ssrInitial||t.forceFit)&&(b=f),n&&!r&&(b=f);let _=n&&r&&!i;if(i&&se()&&(b=f,_=!1),_||s||b)return;let y=-90,c=-180,m=90,h=180;if(e.data.forEach(function(g){if(!g||!g.map)return;const w=Number(g.map.lat),P=Number(g.map.lng);isNaN(w)||isNaN(P)||(w>y&&(y=w),P>c&&(c=P),w<m&&(m=w),P<h&&(h=P))}),y<=-90||m>=90||c<=-180||h>=180)return;let d=!0;if(n&&i)try{const g=function(F){if(!F||!F.querySelector)return!1;const v=function(L){const H=F.querySelector('input[name="'+L+'"]');return H&&String(H.value||"").trim()!==""?!0:!!F.querySelector('input[name="'+L+'[]"]')};return v("district_id")||v("district_group_id")||v("street_id")},w=l.domElements.searchForm?document.querySelector(l.domElements.searchForm):null,P=document.querySelector(".js-mobile-search-form"),C=g(w)||g(P),B=M.latLng(y,c),x=M.latLng(m,h),E=B.distanceTo(x);C&&typeof E=="number"&&E>25e3&&(d=!1)}catch{}if(!d)return;try{window.__suppressNextMapAuto=!0}catch{}I.fitMapBoundsSafely({bounds:{ne_lat:y,ne_lng:c,sw_lat:m,sw_lng:h}})}catch{}}this.render=function(e,t){try{I.resetMapOfferInteractionState()}catch{}U={},Eo(),X.clearLayers();let o={};if(!e.data||!Array.isArray(e.data)){console.warn("MapLeaflet.render: No data array in response:",e),so(e),co(e),typeof t=="function"&&t(e);return}var n=Object.create(null);e.data.forEach(function(u){var f=String(u&&u.id!=null?u.id:"").trim();if(!f||n[f])return;n[f]=!0;let p=u.map.lat+","+u.map.lng;o[p]?(u.map.lat=u.map.lat+1e-4*o[p],u.map.lng=u.map.lng+1e-4*o[p],o[p]+=1):o[p]=1;let b=Bo(u);U[f]={marker:b,markerData:u},X.addLayer(b)});try{a&&X&&(typeof a.hasLayer=="function"&&a.hasLayer(X)||a.addLayer(X))}catch{}S(l.domElements.mapContainer).removeClass("is-dirty");try{q=a.project(a.getCenter(),a.getZoom())}catch{}so(e),co(e);try{e&&e.district_polygons&&(ve=e.district_polygons);const u=S(l.domElements.searchForm),f=S(".js-mobile-search-form");jt(u)||f.length&&jt(f)||(ve=null),ve&&Wt({district_polygons:ve})}catch{}if(e.canonical_url||e.seo_url){Ht=e.canonical_url||e.seo_url;try{if(typeof window<"u"){var i=String(Ht||"").trim(),s=window.MirelaSearch&&window.MirelaSearch.canonicalUtils;if(s&&typeof s.writeBrowseContractCanonicalFromServer=="function")s.writeBrowseContractCanonicalFromServer(i);
1else{var r=new URL(i,window.location.origin);window.__mirelaLastMapBrowseSeoHref=(r.pathname||"")+(r.search||"")+(r.hash||"")}}}catch{}}typeof t=="function"&&t(e);try{if(se()&&e&&Array.isArray(e.data)&&e.data.length>0)Ut(e);else if(se())try{window.__mirelaHomeBrowseFromAutoMove=!1}catch{}}catch{}try{an()}catch{}};function Wt(e){if(!e.district_polygons){console.log("No district polygons in response");return}console.log("Drawing district polygons:",e.district_polygons);for(let t in e.district_polygons){let o=e.district_polygons[t];console.log("Processing district",t,"with coordinates:",o);let n=o.map(function(s){let r=s.split(",");return[parseFloat(r[0]),parseFloat(r[1])]});console.log("Converted coordinates:",n);let i=M.polygon(n,{color:"red",fillColor:"black",weight:1.5,fillOpacity:.15});X.addLayer(i)}a.addLayer(X)}function xo(){try{if(!X||typeof X.eachLayer!="function")return;const e=[];X.eachLayer(function(t){try{t&&t instanceof M.Polygon&&e.push(t)}catch{}}),e.forEach(function(t){try{X.removeLayer(t)}catch{}})}catch{}}this.setDistrictPolygons=function(e){try{ve=e||null,xo(),ve&&Wt({district_polygons:ve})}catch{}};const Cn=540;function Bo(e){let t=M.marker([e.map.lat,e.map.lng],{icon:yt(e)});return t.__mirelaOfferMarker=!0,To(t,e),t.on("popupopen",function(o){Vt(o.target,e)}),t.on("popupclose",function(o){Gt(o.target,e)}),t}function Vt(e,t){if(!(!e||!t))try{var o=S.extend({},t,{marker:I.MARKERS.PIN_RED.id});e.setIcon(yt(o))}catch{}}function Gt(e,t){if(!(!e||!t))try{e.setIcon(yt(t))}catch{}}this.highlightMarkerById=function(e){try{var t=String(e??"").trim(),o=U[t];if(!o||!o.marker||!o.markerData)return;Vt(o.marker,o.markerData)}catch{}},this.unhighlightMarkerById=function(e){try{var t=String(e??"").trim(),o=U[t];if(!o||!o.marker||!o.markerData)return;Gt(o.marker,o.markerData)}catch{}};function Ho(e){if(!e||typeof e!="string")return"";try{var t=new DOMParser().parseFromString(e,"text/html"),o=t.querySelector("a.map-info-box[href]");if(!o)return"";var n=o.getAttribute("href");return n?String(n).trim():""}catch{return""}}function Ao(e,t){if(e){var o;try{o=new URL(e,window.location.href).href}catch{o=e}var n=t;if(n&&(n.ctrlKey||n.metaKey||n.shiftKey||n.button===1)){try{window.open(o,"_blank","noopener,noreferrer")}catch{}return}try{window.location.assign(o)}catch{window.location.href=e}}}function pt(e){try{e&&e._mirelaPopupCarouselHealthTimer&&(clearTimeout(e._mirelaPopupCarouselHealthTimer),e._mirelaPopupCarouselHealthTimer=null)}catch{}}function Fo(e,t){if(!e||!Array.isArray(t)||!t.length)return!1;try{var o=e.getBoundingClientRect();if(!o||o.width<16||o.height<16)return!0}catch{}var n=e.querySelectorAll(".map-info-slide img");if(!n||!n.length)return!0;var i=n[0];if(!i)return!0;var s="";try{s=String(i.currentSrc||i.src||i.getAttribute("src")||"").trim()}catch{}return!s||s.indexOf("/images/defaults/no-photo-medium.jpg")!==-1}function Kt(e,t,o,n){pt(e),!(!e||!t||!Array.isArray(n)||!n.length)&&(e._mirelaPopupCarouselHealthTimer=setTimeout(function(){e._mirelaPopupCarouselHealthTimer=null;try{if(!t||typeof t.isOpen!="function"||!t.isOpen())return}catch{return}try{var i=typeof t.getElement=="function"?t.getElement():null;if(!i)return;var s='.map-info-carousel[data-offer-id="'+String(o).trim().replace(/"/g,'\\"')+'"]',r=i.querySelector(s)||i.querySelector(".map-info-carousel");if(!r||!Fo(r,n))return;tt(r,n,null)}catch{}},120))}function To(e,t){if(l.controls.markerPopup===!1)return;const o=t.info,n=1,i=-6,s=e&&e.options&&e.options.icon&&e.options.icon.options?e.options.icon.options:{},r=Array.isArray(s.iconSize)?s.iconSize:[0,0],u=Array.isArray(s.iconAnchor)?s.iconAnchor:[Math.round((Number(r[0])||0)/2),Number(r[1])||0],f=Math.max(0,Number(u[1])||Number(r[1])||0),p=Math.max(0,(Number(r[1])||0)-f),b=typeof window<"u"&&window.innerWidth<992?2e3:300,_=M.popup({autoPan:!1,maxWidth:b,offset:[0,-(f+n)],className:l.domElements.customPopupSelector}).setContent(o);e.bindPopup(_);var y=!Q;try{y&&typeof window.matchMedia=="function"&&(y=window.matchMedia("(hover: hover) and (pointer: fine)").matches)}catch{}if(y){let v=function(){try{e._mirelaDeskPopHoverTimer&&(clearTimeout(e._mirelaDeskPopHoverTimer),e._mirelaDeskPopHoverTimer=null)}catch{}},L=function(){try{e._mirelaDeskPopOpenTimer&&(clearTimeout(e._mirelaDeskPopOpenTimer),e._mirelaDeskPopOpenTimer=null)}catch{}},H=function(){v(),e._mirelaDeskPopHoverTimer=setTimeout(function(){try{e.closePopup()}catch{}e._mirelaDeskPopHoverTimer=null},m)},O=function(){v()},D=function(){H()},k=function(A){A&&(M.DomEvent.on(A,"mouseenter",z),M.DomEvent.on(A,"mouseleave",Z))},K=function(A){A&&(M.DomEvent.off(A,"mouseenter",z),M.DomEvent.off(A,"mouseleave",Z))},z=function(){v(),L();try{if(typeof e.isPopupOpen=="function"&&e.isPopupOpen())return}catch{}try{var A=Array.isArray(t.photos)?t.photos:[];Jt(A)}catch{}e._mirelaDeskPopOpenTimer=setTimeout(function(){e._mirelaDeskPopOpenTimer=null;try{e.openPopup()}catch{}},c)},Z=function(){L(),H()};var d=v,g=L,w=H,P=O,C=D,B=k,x=K,E=z,F=Z;try{typeof e._openPopup=="function"&&e.off("click",e._openPopup)}catch{}e.on("click",function(A){if(!(typeof window.innerWidth!="number"||window.innerWidth<993)){var Y=Ho(t.info);if(Y){try{M.DomEvent.stopPropagation(A)}catch{}try{A&&A.originalEvent&&M.DomEvent.preventDefault(A.originalEvent)}catch{}Ao(Y,A&&A.originalEvent)}}});var c=220,m=200,h=null;e.on("add",function(){try{if(h=typeof e.getElement=="function"?e.getElement():e._icon||null,!h){requestAnimationFrame(function(){h=typeof e.getElement=="function"?e.getElement():e._icon||null,k(h)});return}k(h)}catch{}}),e.on("remove",function(){try{K(h)}catch{}h=null,v(),L()}),e.on("popupopen",function(){var A=e.getPopup&&e.getPopup().getElement?e.getPopup().getElement():null;A&&(M.DomEvent.on(A,"mouseenter",O),M.DomEvent.on(A,"mouseleave",D))}),e.on("popupclose",function(){pt(e),v(),L();var A=_&&typeof _.getElement=="function"?_.getElement():null;if(A)try{M.DomEvent.off(A,"mouseenter",O),M.DomEvent.off(A,"mouseleave",D)}catch{}})}Q&&Vo(e,t),e.on("popupopen",function(v){const L=v.popup.getElement();if(!L)return;Q&&(L.style.display="none");function H(){var T=a.getContainer();if(!T)return null;var R=T.getBoundingClientRect(),W=0,oe=0,be=0,we=0;return T.querySelectorAll(".leaflet-control-container .leaflet-control").forEach(function(J){try{if(!J||J===L||L.contains(J)||J.classList.contains("leaflet-control-attribution"))return;var V=window.getComputedStyle(J);if(!V||V.display==="none"||V.visibility==="hidden")return;var N=J.getBoundingClientRect();if(N.width<2||N.height<2||N.width>380||N.height>220||N.right<=R.left||N.left>=R.right||N.bottom<=R.top||N.top>=R.bottom)return;var ne=40,Le=R.width||1,Ye=N.width>Math.max(120,Le*.55),Je=J.classList&&J.classList.contains("leaflet-custom-control");!Ye&&!Je&&(N.left-R.left<=ne&&(W=Math.max(W,N.right-R.left)),R.right-N.right<=ne&&(oe=Math.max(oe,R.right-N.left))),N.top-R.top<=ne&&(be=Math.max(be,N.bottom-R.top)),R.bottom-N.bottom<=ne&&(we=Math.max(we,R.bottom-N.top))}catch{}}),{mapR:R,wL:R.left+W,wR:R.right-oe,wT:R.top+be,wB:R.bottom-we}}const O=()=>{if(!v.popup.isOpen())return;const T=a.latLngToContainerPoint(e.getLatLng()),R=a.getSize(),W=R.y,oe=R.x,be=L.offsetWidth||400,we=L.offsetHeight||220,J=10,V=H(),N=V&&V.mapR?V.mapR:a.getContainer().getBoundingClientRect(),ne=V?V.wL:N.left+J,Le=V?V.wR:N.right-J,Ye=V?V.wT:N.top+J,Je=V?V.wB:N.bottom-J,Pt=N.left+T.x,lo=N.top+T.y,bn=lo-f-n-Ye,uo=Je-(lo+p+i);uo>=we||uo>=bn&&T.y<W/2-5?(v.popup.options.offset=M.point(0,we+p+i),L.classList.remove("popup-down")):(v.popup.options.offset=M.point(0,-(f+n)),L.classList.add("popup-down"));let Ct=0;const fo=be/2,mo=Pt-fo,po=Pt+fo;
1if(mo<ne?(Ct=ne-mo,L.classList.add("popup-shift-right"),L.classList.remove("popup-shift-left")):po>Le?(Ct=Le-po,L.classList.add("popup-shift-left"),L.classList.remove("popup-shift-right")):(L.classList.remove("popup-shift-left"),L.classList.remove("popup-shift-right")),v.popup&&v.popup.options&&v.popup.options.offset){const ie=v.popup.options.offset;v.popup.options.offset=M.point(Ct,ie.y)}v.popup.update();try{const ie=L.getBoundingClientRect(),at=v.popup.options.offset||M.point(0,0);let ct=at.x,st=at.y;ie.left<ne&&(ct+=ne-ie.left),ie.right>Le&&(ct-=ie.right-Le),ie.top<Ye&&(st+=Ye-ie.top),ie.bottom>Je&&(st-=ie.bottom-Je),(ct!==at.x||st!==at.y)&&(v.popup.options.offset=M.point(Math.round(ct),Math.round(st)),v.popup.update())}catch{}},D=L.querySelector("img");D&&!D.complete?(D.onload=O,D.onerror=O):O();var k=0,K=0,z=null;const Z=(T,R)=>{k=T||0,K=R||0;try{L.style.translate=k+"px "+K+"px"}catch{L.style.marginLeft=k+"px",L.style.marginTop=K+"px"}},A=()=>{if(z=null,!(!v.popup||!v.popup.isOpen()||Q))try{var T=H();if(!T)return;var R=L.getBoundingClientRect(),W={left:R.left,right:R.right,top:R.top,bottom:R.bottom,w:R.width,h:R.height},oe={left:W.left-k,right:W.right-k,top:W.top-K,bottom:W.bottom-K},be=oe.left<T.wL||oe.right>T.wR||oe.top<T.wT||oe.bottom>T.wB,we=W.left<T.wL||W.right>T.wR||W.top<T.wT||W.bottom>T.wB;if(!be){(k||K)&&Z(0,0);return}if((k||K)&&!we)return;var J=T.wL+(T.wR-T.wL)/2,V=T.wT+(T.wB-T.wT)/2,N=oe.left+W.w/2,ne=oe.top+W.h/2;Z(Math.round(J-N),Math.round(V-ne))}catch{}},Y=()=>{z||(z=requestAnimationFrame(A))};try{a.on("drag",Y),a.on("dragend",Y),a.on("zoomend",Y)}catch{}e.once("popupclose",function(){pt(e);try{a.off("drag",Y)}catch{}try{a.off("dragend",Y)}catch{}try{a.off("zoomend",Y)}catch{}try{z&&cancelAnimationFrame(z)}catch{}try{Z(0,0)}catch{}});const ye=t.id,it=String(ye);if(L.querySelector('.map-info-carousel[data-loaded="true"]'))return;const Xe=L.querySelector(".map-info-image")||L,Me=Xe.querySelector(".map-info-carousel");Me&&Me.remove();const fe=Array.isArray(t.photos)?t.photos:[];ke[it]=fe;const j=document.createElement("div");j.className="map-info-carousel",j.dataset.offerId=ye;const rt=At[it];if(rt){j.innerHTML=rt,j.dataset.loaded="true",fe.length>1?(j.dataset.mapPhotos=JSON.stringify(fe),j.dataset.mapFilmstrip="1",j.style.setProperty("--carousel-count","3"),typeof window.mirelaEnsureMapInfoFilmstrip=="function"&&window.mirelaEnsureMapInfoFilmstrip(j)):j.style.setProperty("--carousel-count","1"),Qt(j),Xe.prepend(j),Kt(e,v.popup,ye,fe);return}j.style.setProperty("--carousel-count","1"),j.innerHTML="<div class='map-info-track' style='--carousel-index:0'><div class='map-info-slide active'><img src='/images/defaults/no-photo-medium.jpg' alt='' style='opacity:0.4;'></div></div>",Xe.prepend(j),tt(j,fe,null),Kt(e,v.popup,ye,fe)})}function Xt(){try{ue!=null&&ue!==""&&I.unhighlightMarkerById(ue)}catch{}ue=null}this.resetMapOfferInteractionState=function(){try{Xt()}catch{}try{ue=null}catch{}try{var e=l.domElements.mobileOfferListContainer,t=e?S(e):S();if(t.length){t.removeClass("active");try{t.find(".mobile-offers-carousel").trigger("destroy.owl.carousel")}catch{}t.empty()}}catch{}try{a&&typeof a.closePopup=="function"&&a.closePopup()}catch{}};function ht(e,t){try{var o=t&&t.relatedTarget?t.relatedTarget:null;if(!o&&e&&e.length&&(o=e.data("owl.carousel")||null),!o||typeof o.relative!="function"||typeof o.current!="function")return null;var n=o.relative(o.current());return typeof n=="number"&&!isNaN(n)?n:null}catch{return null}}function Oo(e,t){try{if(!e||!e.length)return null;var o=e.data("mirelaOfferIds"),n=e.find(".owl-item").not(".cloned");if(o&&o.length){var i=ht(e,t);if(t&&i==null&&t.item&&typeof t.item.index=="number"&&(i=t.item.index),i!=null&&i>=0&&i<o.length){var s=String(o[i]||"").trim(),r=n.eq(i);if(r.length&&s){var u=r.find(".map-info-carousel[data-offer-id]").first().attr("data-offer-id");if(u||(u=r.find(".map-info-box .map-info-carousel[data-offer-id]").first().attr("data-offer-id")),u||(u=r.find("[data-offer-id]").first().attr("data-offer-id")),u=u?String(u).trim():"",u&&u!==s)return u}if(s)return s}}var f=e.find(".owl-item.active").not(".cloned");if(f.length===1){var p=f.find(".map-info-carousel[data-offer-id]").first().attr("data-offer-id");if(p||(p=f.find("[data-offer-id]").first().attr("data-offer-id")),p=p?String(p).trim():"",p)return p;if(o&&o.length){var b=n.index(f);if(b>=0&&b<o.length){var _=String(o[b]||"").trim();if(_)return _}}}if(o&&o.length){var y=String(o[0]||"").trim();if(y)return y}var c=n.first(),m=c.find("[data-offer-id]").first().attr("data-offer-id");return m=m?String(m).trim():"",m||null}catch{return null}}function et(e){try{if(!e||!e.length)return;clearTimeout(e.data("mirelaOwlRefreshT")),e.data("mirelaOwlRefreshT",setTimeout(function(){try{e.hasClass("owl-loaded")&&e.trigger("refresh.owl.carousel")}catch{}},80))}catch{}}function Ro(e){var t=46,o=t,n=!1;try{Q&&(t=52,o=t)}catch{}var i=t,s=0;try{if(Q&&typeof document<"u"){var r=document.querySelector(Ue());r&&r.offsetHeight>0&&(i=Math.max(i,t+Math.round(r.offsetHeight*.12)))}}catch{}try{if(Q&&typeof document<"u"&&document.body&&document.body.classList.contains("page-home")){n=!0;var u=document.getElementById("map")||document.querySelector(".b-browse-map__canvas"),f=document.querySelector(".home-map-mobile-floating");if(u&&f&&f.offsetHeight>0){var p=u.getBoundingClientRect(),b=f.getBoundingClientRect();b.bottom>p.top+8&&b.top<p.bottom-4&&(s=Math.max(s,Math.round(p.bottom-b.top)+36))}if(u){var _=u.getBoundingClientRect(),y=document.querySelector(Ue());if(y&&y.querySelector(".mobile-offers-carousel")){var c=y.closest(".b-browse-map__offer")||y;if(c&&c.offsetHeight>0){var m=c.getBoundingClientRect();m.bottom>
1_.top+8&&m.top<_.bottom-4&&(s=Math.max(s,Math.round(_.bottom-m.top)+28))}}}s>0&&(i=Math.max(i,s))}}catch{}try{var h=Math.max(14,Math.floor(Math.min(e.x,e.y)*.2));t=Math.min(t,h),o=Math.min(o,Math.max(h,Math.floor(Math.min(e.x,e.y)*.42)));var d=Math.max(t,h+8);n&&(d=Math.max(d,Math.floor(Math.min(e.x,e.y)*.42))),i=Math.min(i,d)}catch{}return{left:t,right:t,top:o,bottom:i}}function Do(e){var t=e?String(e).trim():"";if(!(!t||!a)){var o=U[t];if(!(!o||!o.marker||typeof o.marker.getLatLng!="function")){var n=o.marker.getLatLng();if(n)try{var i=a.getSize();if(!i||typeof i.x!="number"||typeof i.y!="number")return;var s=Ro(i),r=M.point(s.left,s.top),u=M.point(s.right,s.bottom),f=a.project(n),p=a.getPixelBounds(),b=M.bounds(p.min.add(r),p.max.subtract(u));if(b.min.x>=b.max.x||b.min.y>=b.max.y||b.contains(f))return;var _=Math.min(Math.max(f.x,b.min.x),b.max.x),y=Math.min(Math.max(f.y,b.min.y),b.max.y),c=_-f.x,m=y-f.y,h=Math.sqrt(c*c+m*m),d=Math.min(.42,Math.max(.15,h/950));try{window.__mirelaHomeProgrammaticPinPanUntil=Date.now()+Math.round(d*1e3)+280}catch{}typeof a.panInside=="function"?a.panInside(n,{animate:!0,duration:d,easeLinearity:.25,paddingTopLeft:r,paddingBottomRight:u}):a.panTo(n,{animate:!0,duration:d,easeLinearity:.25})}catch{var g=.45;try{window.__mirelaHomeProgrammaticPinPanUntil=Date.now()+Math.round(g*1e3)+280}catch{}a.panTo(n,{animate:!0,duration:g,easeLinearity:.25})}}}}function Yt(e,t){var o=Oo(e,t);if(o=o?String(o).trim():"",!!o){var n=ue!=null?String(ue).trim():"";if(n!==o){try{n!==""&&I.unhighlightMarkerById(n)}catch{}ue=o;try{I.highlightMarkerById(o)}catch{}n!==""&&Do(o)}}}var No=24,Io=24,ko=12,qo=1,zo=3;function Jt(e){!Array.isArray(e)||!e.length||e.slice(0,3).forEach(function(t){if(t)try{var o=new Image;o.decoding="async",o.src=t}catch{}})}function Qt(e){!e||e.querySelectorAll(".map-info-slide").length<=1||(S(e).off("click.mobileCarousel"),typeof window.mirelaEnsureMapInfoFilmstrip=="function"&&window.mirelaEnsureMapInfoFilmstrip(e))}function Zo(e){try{var t=e&&e.dataset&&e.dataset.offerId?String(e.dataset.offerId).trim():"";if(!t)return;At[t]=e.innerHTML}catch{}}function tt(e,t,o){if(!Array.isArray(t)||t.length===0){e.style.setProperty("--carousel-count","1"),e.innerHTML="<div class='map-info-track' style='--carousel-index:0'><div class='map-info-slide active'><img src='/images/defaults/no-photo-medium.jpg' alt=''></div></div>",e.dataset.loaded="true",et(o);return}const n=t.length;if(e.dataset.mapPhotos=JSON.stringify(t),e.dataset.currentIndex="0",n===1)e.removeAttribute("data-map-filmstrip"),e.style.setProperty("--carousel-count","1"),e.innerHTML="<div class='map-info-track' style='--carousel-index:0'><div class='map-info-slide active'><img src='"+t[0]+`' alt='' onerror="this.onerror=null;this.src='/images/defaults/no-photo-medium.jpg';"></div></div>`;else{e.dataset.mapFilmstrip="1",e.style.setProperty("--carousel-count","3");const r=n-1,u=1,f=` onerror="this.onerror=null;this.src='/images/defaults/no-photo-medium.jpg';"`;let p="<div class='map-info-track' style='--carousel-index:1'>";p+='<div class="map-info-slide"><img src="'+t[r]+'" alt="" draggable="false"'+f+"></div>",p+='<div class="map-info-slide active"><img src="'+t[0]+'" alt="" draggable="false"'+f+"></div>",p+='<div class="map-info-slide"><img src="'+t[u]+'" alt="" draggable="false"'+f+"></div>",p+="</div>",e.innerHTML=p}if(n>1&&!e.querySelector(".carousel-control")&&e.insertAdjacentHTML("beforeend",'<a class="carousel-control prev">❮</a><a class="carousel-control next">❯</a>'),Qt(e),!e.querySelector(".photo-count")){var i=e.closest(".map-info-image"),s=i&&(i.querySelector(".icon-photo")||i.querySelector(".b-label.bl")||i.querySelector(".b-label-group-bl"));s||e.insertAdjacentHTML("beforeend",'<div class="photo-count"><i class="icon icon-images" style="font-size:14px;"></i> '+n+"</div>")}e.dataset.loaded="true",Zo(e),Jt(t),et(o)}function jo(e,t){e.style.setProperty("--carousel-count","1"),e.innerHTML="<div class='map-info-track' style='--carousel-index:0'><div class='map-info-slide active'><img src='/images/defaults/no-photo-medium.jpg' alt=''></div></div>",e.dataset.loaded="true",et(t)}function Uo(e){var t=e?String(e).trim():"";if(!t)return null;var o=U[t];return!o||!o.markerData||!Array.isArray(o.markerData.photos)?null:o.markerData.photos}function Wo(e,t){var o={},n=[];e.find(".map-info-carousel").each(function(){const i=this;if(i.dataset.loaded==="true"||i.dataset.loading==="true")return;
1const s=i.dataset.offerId?String(i.dataset.offerId).trim():"";if(s){if(Object.prototype.hasOwnProperty.call(ke,s)){tt(i,ke[s],t);return}var r=Uo(s);if(r!==null){ke[s]=r,tt(i,r,t);return}i.dataset.loading="true",o[s]||(o[s]=[],n.push(s)),o[s].push(i)}}),n.length&&n.forEach(function(i){ke[i]=[],o[i].forEach(function(s){jo(s,t)})})}function gt(e,t){if(!(!e||!e.length)){var o=ht(e,t);o===null&&(o=0);var n=e.find(".owl-item").not(".cloned");if(n.length){for(var i=Math.max(0,o-qo),s=Math.min(n.length-1,o+zo),r=S(),u=i;u<=s;u++)r=r.add(n.eq(u));Wo(r,e)}}}function $t(e){var t=e.data("mirelaOfferIds");if(!(!t||!t.length)){var o=e.data("mirelaSlidesRenderedCount");if(o!=null){var n=t.length;if(!(o>=n)&&!e.data("mirelaSlidesAppendBusy")){var i=e.data("owl.carousel");if(i){var s=ht(e,null);if((s===null||typeof s!="number"||isNaN(s))&&(s=i.relative(i.current())),!(s===null||typeof s!="number"||isNaN(s))&&!(s<o-ko)){var r=o,u=Math.min(n,o+Io);if(!(r>=u)){var f=[],p;for(p=r;p<u;p++){var b=t[p];if(b=b?String(b).trim():"",!!b){var _=U[b];if(!(!_||!_.marker)){var y=_.marker.getPopup().getContent();f.push('<div class="item">'+zt(y)+"</div>")}}}if(!f.length){e.data("mirelaSlidesRenderedCount",u);return}e.data("mirelaSlidesAppendBusy",!0);for(var c=S("<div>").html(f.join(""));c.children().length;)e.owlCarousel("add",c.children().first());e.data("mirelaSlidesRenderedCount",u),et(e),gt(e,null),setTimeout(function(){e.removeData("mirelaSlidesAppendBusy")},0)}}}}}}}function Vo(e,t){if(l.domElements.mobileOfferListContainer==="")return;function o(i){wo()}function n(i){try{if(!i||!i.length)return;var s=i.closest(".b-browse-map__offer");if(!s.length)return;var r=s[0];r.style.removeProperty("position"),r.style.removeProperty("top"),r.style.removeProperty("bottom"),r.style.removeProperty("left"),r.style.removeProperty("right"),r.style.removeProperty("z-index");var u=s.data("mirelaOriginalPlaceholder");u&&u.length&&u.replaceWith(s),s.removeClass("is-ported-to-body"),s.removeData("mirelaOriginalPlaceholder")}catch{}}e.on("popupopen",function(i){const s=S(l.domElements.mobileOfferListContainer);o(s),ue=null,s.empty(),s.find(".mobile-offers-carousel").trigger("destroy.owl.carousel");const r=Object.keys(U),u=String(t.id==null?"":t.id).trim();let f=r.indexOf(u);if(f<0){for(let d=0;d<r.length;d++)if(String(r[d]).trim()===u){f=d;break}}const p=[u];if(f>=0)for(let d=1;d<r.length;d++){const g=(f+d)%r.length,w=String(r[g]).trim();if(w===u)continue;const P=U[r[g]];!P||!P.marker||p.push(w)}const b=p.length,_=Math.min(No,b);let y='<div class="mobile-offers-carousel owl-carousel">';for(let d=0;d<_;d++){const g=p[d];let w;d===0?w=i.popup.getContent():w=U[g].marker.getPopup().getContent(),y+='<div class="item">'+zt(w)+"</div>"}y+="</div>",s.html(y);const c=s.find(".mobile-offers-carousel");c.data("mirelaOfferIds",p),c.data("mirelaSlidesRenderedCount",c.children(".item").length);const h=b<=1;h&&c.addClass("mobile-offers-carousel--single"),c.owlCarousel({items:1,slideBy:1,loop:!1,rewind:!h,nav:!h,dots:!1,lazyLoad:!1,navText:["❮","❯"],margin:0,stagePadding:h?0:Q?12:30,mouseDrag:!h,touchDrag:!h,pullDrag:!h}),c.off("changed.owl.carousel.mirelaPin translated.owl.carousel.mirelaPin initialized.owl.carousel.mirelaPin").on("changed.owl.carousel.mirelaPin initialized.owl.carousel.mirelaPin",function(d){Yt(c,d),$t(c),gt(c,d)}),setTimeout(function(){Yt(c,null),$t(c),gt(c,null)},0),typeof l.mobilePopupOpenCallback=="function"&&l.mobilePopupOpenCallback()}),e.on("popupclose",function(i){try{o(S(l.domElements.mobileOfferListContainer))}catch{}typeof l.mobilePopupCloseCallback=="function"&&l.mobilePopupCloseCallback();try{const s=S(l.domElements.mobileOfferListContainer).find(".mobile-offers-carousel");if(s.length){try{clearTimeout(s.data("mirelaOwlRefreshT"))}catch{}s.removeData("mirelaOwlRefreshT"),s.removeData("mirelaOfferIds"),s.removeData("mirelaSlidesRenderedCount"),s.removeData("mirelaSlidesAppendBusy"),s.off("changed.owl.carousel.mirelaPin translated.owl.carousel.mirelaPin initialized.owl.carousel.mirelaPin"),s.trigger("destroy.owl.carousel")}}catch{}Xt(),S(l.domElements.mobileOfferListContainer).empty(),n(S(l.domElements.mobileOfferListContainer))})}function En(e){const t=Object.keys(U),o=t.indexOf(e),n=o+1<t.length?U[t[o+1]]:U[t[0]],i=o-1>=0?U[t[o-1]]:U[t[t.length-1]];return{next:n,previous:i}}function xn(e,t){}function Go(e){for(let t in I.MARKERS)if(I.MARKERS[t].id===e)return I.MARKERS[t].color;return I.MARKERS.DEFAULT.color}function yt(e){var n="";try{n=e&&e.label!=null?String(e.label).trim():""}catch{n=""}var i=!n||n==="undefined"||n==="null"?"":n;const s=` 2 <svg xmlns="http://www.w3.org/2000/svg" width="${56.49}" height="${43.005}" viewBox="0 0 14.946 11.378"> 3 <path fill="#${Go(e.marker)}" stroke="#000" stroke-linejoin="round" stroke-width=".119" d="M2.755 2.3h9.436c.726 0 1.31.508 1.31 1.138v4.243c0 .63-.584 1.138-1.31 1.138H9.303l-1.83 2.117-1.83-2.117H2.755c-.726 0-1.31-.507-1.31-1.138V3.438c0-.63.584-1.138 1.31-1.138z"/> 4 <text x="6.332" y="292.785" fill="#fff" stroke-width=".118" font-family="sans-serif" font-size="3.175" font-weight="bold" letter-spacing="0" style="font-feature-settings:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:125%" text-anchor="middle" word-spacing="0" writing-mode="lr" transform="translate(1.106 -285.96)"> 5 <tspan>${i}</tspan> 6 </text> 7 </svg>`;return M.divIcon({html:s,className:"",iconSize:[56.49,43.005],iconAnchor:[56.49/2,43.005],popupAnchor:[0,0]})}function We(){try{if(typeof window<"u"&&window.__mirelaHomeSsrSmartFitActive===!0)return}catch{}try{if(typeof window>"u"||window.isHomePage!==!0)return}catch{return}try{var e=window.MirelaLocationFormLegacyCompat||null,t=[document.querySelector(".js-search-form"),document.querySelector(".js-mobile-search-form")].filter(
7Boolean);t.forEach(function(i){try{var s=S(i);s.find('[name="city_id"]').val(""),s.find(".js-city-id").val(""),s.find('[name="district_id"]').val(""),s.find('[name="district_group_id"]').val(""),s.find('[name="street_id"]').val(""),s.find('[name="s"]').val(""),s.find('[name="city_id[]"], [name="district_id[]"], [name="district_group_id[]"]').remove(),e&&typeof e.removeLocationArrayInputs=="function"&&e.removeLocationArrayInputs(i,{includeDistrict:!0,includeDistrictGroup:!0,includeCity:!0,includeStreet:!0})}catch{}});try{var o=window.MirelaSearch&&window.MirelaSearch.searchStateApi,n=document.querySelector(".js-search-form")||document.querySelector(".js-mobile-search-form");o&&typeof o.syncFromContext=="function"&&n&&o.syncFromContext({form:n},"MapLeaflet.clearHomeSearchLocationForViewportBrowse")}catch{}}catch{}try{window.__mobileLocationPendingSelection=null,window.__mobileLocationCanonicalState={cityId:"",districtIds:[],groupIds:[],streetId:"",label:"",ts:Date.now()}}catch{}try{window.__locationDdClearVersion=Number(window.__locationDdClearVersion||0)+1}catch{}try{window.__forceCityIdOnce=null}catch{}Se()}function de(e){try{var t=window.MirelaSearch&&window.MirelaSearch.uiSession;if(!t||typeof t.patch!="function")return;var o=String(e??"").trim();o?t.patch({map:o}):t.patch({map:""})}catch{}}function Se(){try{var e=window.MirelaSearch&&window.MirelaSearch.uiSession;if(!e||typeof e.patch!="function")return;e.patch({s:"",city_id:"",street_id:"",district_id:[],district_group_id:[]})}catch{}}function Ko(e,t){try{var o=window.MirelaSearch&&window.MirelaSearch.requestPolicy;if(o&&typeof o.runSearchAction=="function")return o.runSearchAction(t&&t.manual===!0?"map_manual":"map_auto",{form:e||document.querySelector(".js-search-form"),force:!0,explicitMap:t&&t.manual===!0,page:1,resetPaging:!0})}catch{}return!1}function $(){try{if(typeof window<"u"&&window.__mirelaHomeSsrSmartFitActive===!0)return}catch{}const e=_=>{try{const y=S(l.domElements.searchForm),c=S(".js-mobile-search-form"),m=String(y.find('[name="'+_+'"]').val()||"").trim();return m!==""?m:String(c.find('[name="'+_+'"]').val()||"").trim()}catch{return""}},t=()=>{const _=y=>e(y);return _("district_id")!==""||_("district_group_id")!==""||_("street_id")!==""};try{if(typeof window<"u"&&window.isHomePage===!0){const y=S(l.domElements.searchForm),c=e("city_id"),m=String(y.find('[name="s"]').val()||S('.js-mobile-search-form [name="s"]').first().val()||S(".js-location-dd-input").val()||"").trim(),h=e("district_id")!==""||e("district_group_id")!==""||e("street_id")!==""||c!==""&&c!=="0"&&c!=="3"||m!==""&&!/^\d+$/.test(m);if(String(typeof window<"u"&&window.__mirelaHomeListIntent||"").trim().toLowerCase()==="location"&&h){S(l.domElements.locationMapInput).val(""),y.find('[name="map"]').val(""),S('.js-mobile-search-form [name="map"]').val(""),de("");return}}}catch{}try{if(typeof window<"u"&&window.isHomePage===!0&&window.__mirelaHomeCityWideMenuPick===!0){const y=S(l.domElements.searchForm);if(!t()){S(l.domElements.locationMapInput).val(""),y.find('[name="map"]').val(""),S('.js-mobile-search-form [name="map"]').val(""),de("");return}}}catch{}try{if(typeof window<"u"&&window.isHomePage===!0&&window.__mirelaUserMovedMapHome!==!0){const y=S(l.domElements.searchForm),c=e("city_id");if(e("district_id")!==""||e("district_group_id")!==""||e("street_id")!==""||c!==""&&c!=="0"&&c!=="3"){S(l.domElements.locationMapInput).val(""),y.find('[name="map"]').val(""),S('.js-mobile-search-form [name="map"]').val(""),de("");return}}}catch{}try{if(typeof window<"u"&&window.isHomePage===!0&&window.__mirelaUserMovedMapHome===!0&&t()){const y=S(l.domElements.searchForm);S(l.domElements.locationMapInput).val(""),y.find('[name="map"]').val(""),S('.js-mobile-search-form [name="map"]').val(""),de("");return}}catch{}const o=ot(a)||a.getBounds(),n=o.getNorthEast(),i=o.getSouthWest
7(),s=Math.abs(Number(n.lat)-Number(i.lat)),r=Math.abs(Number(n.lng)-Number(i.lng));if(s<1e-6||r<1e-6)return;const u=[n.lng,n.lat,i.lng,i.lat,a.getZoom()].join("|");S(l.domElements.locationMapInput).val(u),de(u);try{var f=!1,p=!1;try{f=G===!0||window.__mapManualNext===!0||window.__manualSearchRequested===!0||window.__listBoundsMode===!0||window.__mirelaUserMovedMap===!0||window.__mirelaUserMovedMapHome===!0}catch{f=!1}try{p=!!(l.isListPage&&typeof window<"u"&&window.isHomePage!==!0&&window.__listProgrammaticMove===!0)}catch{p=!1}if(typeof window.writeMapFilterState=="function"){var b=f&&!p;window.writeMapFilterState(u,{manual:f,zoom:String(a.getZoom()),clearLocation:b});try{document.dispatchEvent(new CustomEvent("mirela:filters-state-change",{bubbles:!0,detail:{type:"map-bounds",source:"MapLeaflet",manual:f}}))}catch{}}}catch{}try{l.isListPage||S(".js-search-form [name=map]").trigger("change")}catch{}}function Xo(e,t){const o=Jo(t,l.mapBoundsBuffer),n=[o.ne_lng,o.ne_lat,o.sw_lng,o.sw_lat,o.zoom].join("|");return e.replace(/(map=)[^&]*/,`$1${encodeURIComponent(n)}`)}function Yo(e){const[t,o,n,i,s]=e.split("|").map(Number);return{ne_lng:t,ne_lat:o,sw_lng:n,sw_lat:i,zoom:s}}function Jo(e,t){if(!e)return;let{ne_lng:o,ne_lat:n,sw_lng:i,sw_lat:s,zoom:r}=e;if(r||(r=a.getZoom()),!a.options.center&&!a.options.zoom){const _=(n+s)/2,y=(o+i)/2;a.setView([_,y],r)}const u=a.latLngToContainerPoint([n,o]),f=a.latLngToContainerPoint([s,i]),p=a.containerPointToLatLng([u.x+t,u.y-t]),b=a.containerPointToLatLng([f.x-t,f.y+t]);return{ne_lng:p.lng,ne_lat:p.lat,sw_lng:b.lng,sw_lat:b.lat,zoom:r}}function eo(){if(!q)return!1;const e=a.project(a.getCenter(),a.getZoom()),t=e.x-q.x,o=e.y-q.y;return Math.sqrt(t*t+o*o)>l.mapBoundsBuffer}
7function to(e,t=80){const o=e.getNorthEast(),n=e.getSouthWest(),i=(o.lat+n.lat)/2,s=110540,r=111320*Math.cos(i*Math.PI/180),u=Math.abs(o.lat-n.lat)*s,f=Math.abs(o.lng-n.lng)*r;return Math.hypot(u,f)<t}function Qo(e,t=80){if(!to(e,t))return e;const o=e.getCenter(),n=o.lat,i=110540,s=111320*Math.cos(n*Math.PI/180),r=t/i/2,u=t/s/2,f=M.latLng(o.lat-r,o.lng-u),p=M.latLng(o.lat+r,o.lng+u);return M.latLngBounds(f,p)}function wt(){try{const e=Object.keys(U||{});if(!e.length)return null;const t=[];if(e.forEach(function(n){try{const i=U[n],s=i&&i.marker?i.marker:null;if(!s||typeof s.getLatLng!="function")return;const r=s.getLatLng();if(!r||!isFinite(r.lat)||!isFinite(r.lng))return;t.push([r.lat,r.lng])}catch{}}),t.length<1)return null;if(t.length===1){const n=t[0][0],i=t[0][1],s=.0025;return M.latLngBounds([n-s,i-s],[n+s,i+s])}const o=M.latLngBounds(t);return!o||!o.isValid||!o.isValid()?null:o}catch{return null}}function $o(){try{if(!_e||typeof _e.eachLayer!="function")return null;let e=null;return _e.eachLayer(function(t){if(e||!t||typeof t.getLatLng!="function")return;const o=t.getLatLng();o&&isFinite(o.lat)&&isFinite(o.lng)&&(e=o)}),e}catch{return null}}function en(e,t){if(!e||!isFinite(e.lat)||!isFinite(e.lng))return null;const o=Math.max(40,Number(t)||180),n=e.lat,i=110540,s=111320*Math.cos(n*Math.PI/180),r=o/i/2,u=o/Math.max(1e-6,s)/2;return M.latLngBounds([n-r,e.lng-u],[n+r,e.lng+u])}function tn(){let e=wt();const t=$o();if(t){const o=en(t,180);o&&o.isValid&&o.isValid()&&(!e||!e.isValid||!e.isValid()?e=o:(e=M.latLngBounds(e.getSouthWest
7(),e.getNorthEast()),e.extend(o.getSouthWest()),e.extend(o.getNorthEast())))}return!e||!e.isValid||!e.isValid()?null:e}function on(){try{const e=wt();if(!e||!e.isValid||!e.isValid())return;const t=e.getSouthWest(),o=e.getNorthEast();try{window.__suppressNextMapAuto=!0}catch{}const n=se();if(l.isListPage&&!n){try{window.__listForceFitOnce=!0}catch{}try{Ve(2e3)}catch{}}else if(n)try{window.__forceHomeAutoFitOnce=!0}catch{}if(I.fitMapBoundsSafely({bounds:{sw_lat:t.lat,sw_lng:t.lng,ne_lat:o.lat,ne_lng:o.lng}}),n)try{window.__forceHomeAutoFitOnce=!1}catch{}}catch{}}function nn(){try{const e=typeof window<"u"&&window.isHomePage===!0;if(!l.isListPage||e)return;on()}catch{}}function rn(){try{const e=tn();if(!e||!e.isValid||!e.isValid())return;const t=e.getSouthWest(),o=e.getNorthEast();try{window.__suppressNextMapAuto=!0}catch{}const n=se();if(l.isListPage&&!n){try{window.__listForceFitOnce=!0}catch{}try{Ve(2e3)}catch{}}else if(n)try{window.__forceHomeAutoFitOnce=!0}catch{}if(I.fitMapBoundsSafely({locateSmartFit:!0,bounds:{sw_lat:t.lat,sw_lng:t.lng,ne_lat:o.lat,ne_lng:o.lng}}),n)try{window.__forceHomeAutoFitOnce=!1}catch{}}catch{}}function an(){if(De!==!0)return;De=!1;const e=function(){try{rn()}catch{}};try{typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame(function(){window.requestAnimationFrame(e)}):setTimeout(e,0)}catch{setTimeout(e,0)}}function Ve(e){try{if(!l.isListPage||se()||typeof window>"u")return;const t=Math.max(0,Number(e)||0);window.__listProgrammaticMove=!0,window.__listProgrammaticMoveResetTimer&&clearTimeout(window.__listProgrammaticMoveResetTimer),window.__listProgrammaticMoveResetTimer=setTimeout(function(){try{window.__listProgrammaticMove=!1}catch{}try{window.__listProgrammaticMoveResetTimer=null}catch{}},t)}catch{}}function _t(e){try{typeof window<"u"&&(window.__mirelaSuppressNextResizeMoveEnd=!0)}catch{}try{Ve(e)}catch{}try{a.invalidateSize({pan:!1})}catch{try{a.invalidateSize()}catch{}}try{window.setTimeout(Ae,0)}catch{}try{window.setTimeout(function(){nt(a)},0)}catch{}}function cn(){try{if(typeof window>"u"||!a||a.__mirelaGuardedResizeHandlerInstalled===!0)return;a.__mirelaGuardedResizeHandlerInstalled=!0;var e=null;window.addEventListener("resize",function(){try{e&&clearTimeout(e)}catch{}e=setTimeout(function(){e=null,_t(1200)},120)},{passive:!0})}catch{}}function sn(){try{return!l.isListPage||se()||Q?!1:!!(document.body&&document.body.classList.contains("page-list"))}catch{return!1}}function oo(e){try{if(!sn()||!e)return null;const t=typeof e.getContainer=="function"&&e.getContainer()||document.querySelector(".page-list .b-browse-map__canvas, .page-list .js-map-container");if(!t)return null;const o=t.getBoundingClientRect(),n=14,i=8,s=4;let r=n,u=n,f=i,p=8;const b=t.closest(".js-map-container")||t.closest(".b-browse-map")||t,_=function(c){try{if(!c||typeof c.getBoundingClientRect!="function")return!1;const m=window.getComputedStyle(c);if(!m||m.display==="none"||m.visibility==="hidden"||Number(m.opacity)===0)return!1;const h=c.getBoundingClientRect();return h.width<2||h.height<2?!1:!(h.right<=o.left||h.left>=o.right||h.bottom<=o.top||h.top>=o.bottom)}catch{return!1}};f+=s;try{const c=b.querySelector(".leaflet-control-attribution");if(c&&_(c)){const m=c.getBoundingClientRect();p=Math.max(p,Math.round(o.bottom-m.top)+3)}}catch{}const y=typeof e.getSize=="function"?e.getSize():null;if(y&&typeof y.x=="number"&&typeof y.y=="number"){const c=Math.max(24,Math.floor(Math.min(y.x,y.y)*.48));if(r=Math.min(r,c),u=Math.min(u,c),f=Math.min(f,c),p=Math.min(p,c),r+u>=y.x-32||f+p>=y.y-32)return null}return{left:r,top:f,right:u,bottom:p}}catch{return null}}function ot(e){try{if(!e||typeof e.getBounds!="function")return null;const t=oo(e);if(!t)return e.getBounds();const o=typeof e.getSize=="function"?e.getSize():null;if(!o||typeof o.x!="number"||typeof o.y!="number"||o.x<40||o.y<40)return e.getBounds();const n=e.containerPointToLatLng([t.left,o.y-t.bottom]),i=e.containerPointToLatLng([o.x-t.right,t.top]),s=M.latLngBounds(n,i);return!s||!s.isValid||!s.isValid()?e.getBounds():s}catch{try{return e&&typeof e.getBounds=="function"?e.getBounds():null}catch{return null}}}function ln(e){try{const t=ot(e||a);if(!t||typeof t.getNorthEast!="function"||typeof t.getSouthWest!="function")return"";
7const o=t.getNorthEast(),n=t.getSouthWest();if(!o||!n)return"";const i=Math.abs(Number(o.lat)-Number(n.lat)),s=Math.abs(Number(o.lng)-Number(n.lng));if(i<1e-6||s<1e-6)return"";const r=(e||a)&&typeof(e||a).getZoom=="function"?(e||a).getZoom():null;return r==null||!isFinite(r)?"":[o.lng,o.lat,n.lng,n.lat,r].join("|")}catch{return""}}function vt(){try{if(typeof window<"u"&&window.__mirelaMapDebugBounds===!0)return!0;if(typeof URLSearchParams<"u"&&typeof window<"u"){const e=new URLSearchParams(window.location.search).get("debug");if(e==="1"||e==="true"||e==="yes")return!0}}catch{}return!1}function no(e){try{return e?(e.__mirelaSearchBoundsDebug||(e.__mirelaSearchBoundsDebug={}),e.__mirelaSearchBoundsDebug):null}catch{return null}}function un(e){try{const t=no(e);if(!t)return;if(t.rectangle&&e)try{e.removeLayer(t.rectangle)}catch{}if(t.fullRectangle&&e)try{e.removeLayer(t.fullRectangle)}catch{}if(t.frameEl&&t.frameEl.parentNode)try{t.frameEl.parentNode.removeChild(t.frameEl)}catch{}if(t.labelEl&&t.labelEl.parentNode)try{t.labelEl.parentNode.removeChild(t.labelEl)}catch{}t.rectangle=null,t.fullRectangle=null,t.frameEl=null,t.labelEl=null}catch{}}function nt(e){try{const t=e||a;if(!t)return;if(!vt()){un(t);return}const o=no(t);if(!o)return;const n=typeof t.getContainer=="function"&&t.getContainer()||null;if(!n)return;const i=oo(t),s=ot(t),r=typeof t.getBounds=="function"?t.getBounds():null;if(!o.frameEl){const f=document.createElement("div");f.className="mirela-map-search-bounds-debug-frame",f.setAttribute("aria-hidden","true"),f.style.cssText=["position:absolute","pointer-events:none","box-sizing:border-box","border:2px solid #e60000","box-shadow:0 0 0 1px rgba(255,255,255,0.65) inset","z-index:800"].join(";"),n.appendChild(f),o.frameEl=f}if(i?(o.frameEl.style.left=(i.left||0)+"px",o.frameEl.style.top=(i.top||0)+"px",o.frameEl.style.right=(i.right||0)+"px",o.frameEl.style.bottom=(i.bottom||0)+"px"):(o.frameEl.style.left="0",o.frameEl.style.top="0",o.frameEl.style.right="0",o.frameEl.style.bottom="0"),!o.labelEl){const f=document.createElement("div");f.className="mirela-map-search-bounds-debug-label",f.setAttribute("aria-hidden","true"),f.style.cssText=["position:absolute","pointer-events:none","z-index:801","font:11px/1.2 system-ui,sans-serif","color:#fff","background:rgba(230,0,0,0.88)","padding:2px 6px","border-radius:2px","white-space:nowrap"].join(";"),n.appendChild(f),o.labelEl=f}if(o.labelEl.textContent=i?"search viewport (inset)":"search viewport (full map)",o.labelEl.style.left=(i&&i.left||0)+4+"px",o.labelEl.style.top=(i&&i.top||0)+4+"px",s&&s.isValid&&s.isValid())o.rectangle?o.rectangle.setBounds(s):(o.rectangle=M.rectangle(s,{color:"#e60000",weight:2,fillColor:"#ff0000",fillOpacity:.06,dashArray:"7 5",interactive:!1}),o.rectangle.addTo(t));else if(o.rectangle){try{t.removeLayer(o.rectangle)}catch{}o.rectangle=null}if(!!(i&&r&&r.isValid&&r.isValid()))o.fullRectangle?o.fullRectangle.setBounds(r):(o.fullRectangle=M.rectangle(r,{color:"#1565c0",weight:1,fillOpacity:0,dashArray:"4 6",interactive:!1}),o.fullRectangle.addTo(t));else if(o.fullRectangle){try{t.removeLayer(o.fullRectangle)}catch{}o.fullRectangle=null}}catch{}}function io(e){try{const t=e||a;if(!t||t.__mirelaSearchBoundsDebugListeners===!0)return;t.__mirelaSearchBoundsDebugListeners=!0;const o=function(){try{window.requestAnimationFrame(function(){nt(t)})}catch{nt(t)}};t.on("moveend",o),t.on("zoomend",o),t.on("resize",o),o()}catch{}}function dn(e){try{if(!Q||typeof document>"u"||!document.body||!document.body.classList.contains("page-home"))return null;const t=14,o=29,n=44;let i=t+o,s=t+o,r=t+n,u=t;const f=document.getElementById("map")||e&&typeof e.getContainer=="function"&&e.getContainer()||document.querySelector(".b-browse-map__canvas");if(!f)return{paddingTopLeft:[i,r],paddingBottomRight:[s,u]};const p=f.getBoundingClientRect(),b=document.querySelector(".page-home .flat-map .leaflet-control-locate")||document.querySelector(".leaflet-control-locate");if(b){const m=b.getBoundingClientRect();m.bottom>p.top+2&&m.top<p.bottom&&(r=Math.max(r,Math.round(m.bottom-p.top)+8))}else r=Math.max(r,42);const _=document.querySelector(".home-map-mobile-floating");if(_&&_.offsetHeight>0){const m=_.getBoundingClientRect();m.bottom>
7p.top+8&&m.top<p.bottom-4&&(u=Math.max(u,Math.round(p.bottom-m.top)+10))}const y=document.querySelector(Ue());if(y&&y.querySelector(".mobile-offers-carousel")){const m=y.closest(".b-browse-map__offer")||y;if(m&&m.offsetHeight>0){const h=m.getBoundingClientRect();h.bottom>p.top+8&&h.top<p.bottom-4&&(u=Math.max(u,Math.round(p.bottom-h.top)+10))}}try{const m=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("env(safe-area-inset-left)"))||0,h=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("env(safe-area-inset-right)"))||0;i=Math.max(i,Math.round(m)+t+o),s=Math.max(s,Math.round(h)+t+o)}catch{}const c=e&&typeof e.getSize=="function"?e.getSize():null;if(c&&typeof c.x=="number"&&typeof c.y=="number"){const m=Math.max(12,Math.floor(Math.min(c.x,c.y)*.45));i=Math.min(i,m),s=Math.min(s,m),r=Math.min(r,m),u=Math.min(u,m)}return{paddingTopLeft:[i,r],paddingBottomRight:[s,u]}}catch{return null}}function Fe(e,t){const o=dn(e);if(!o)return t;const n=Object.assign({},t);return n.paddingTopLeft=o.paddingTopLeft,n.paddingBottomRight=o.paddingBottomRight,delete n.padding,n}function St(e,t,o={}){if(!t||!t.isValid||!t.isValid())return;const{padding:n=[56,56],paddingTopLeft:i=null,paddingBottomRight:s=null,minZoom:r=12,maxZoom:u=16,minSpanMeters:f=80,zoomInToBestFit:p=!1,zoomInSteps:b=0,edgeSlackPx:_=20,preferMarkerBounds:y=!1,minFillRatioX:c=0,minFillRatioY:m=0}=o;let h=t;if(y){const C=wt();C&&C.isValid&&C.isValid()&&(h=C)}const d=Qo(h,f),g=Math.min(u,typeof e.getMaxZoom=="function"?e.getMaxZoom()??20:20),w={maxZoom:g,animate:!1};if(i&&s?(w.paddingTopLeft=M.point(i[0]||0,i[1]||0),w.paddingBottomRight=M.point(s[0]||0,s[1]||0)):w.padding=n,e.fitBounds(d,w),p&&b>0)try{const C=typeof e.getSize=="function"?e.getSize():null,B=i?i[0]||0:Array.isArray(n)&&n[0]||0,x=i?i[1]||0:Array.isArray(n)&&n[1]||0,E=s?s[0]||0:B,F=s?s[1]||0:x,v=C?Math.max(1,C.x-B-E):1,L=C?Math.max(1,C.y-x-F):1,H=Math.max(1,v-_*2),O=Math.max(1,L-_*2),D=d.getNorthWest(),k=d.getSouthEast();for(let K=0;K<b;K++){const z=typeof e.getZoom=="function"?e.getZoom():null;if(z==null)break;const Z=e.project(D,z),A=e.project(k,z),Y=Math.abs(A.x-Z.x),ye=Math.abs(A.y-Z.y),it=H>0?Y/H:1,Xe=O>0?ye/O:1;if(c>0&&it>=c&&m>0&&Xe>=m)break;const Me=z+1;if(Me>g)break;const fe=e.project(D,Me),j=e.project(k,Me),rt=Math.abs(j.x-fe.x),T=Math.abs(j.y-fe.y);if(rt>H||T>O)break;e.setZoom(Me,{animate:!1})}}catch{}e.getZoom()<r&&to(t,f)&&e.setView(d.getCenter(),r,{animate:!1})}this.fitMapBoundsSafely=function(e){if(!e||!e.bounds)return;const t=e.bounds;try{["ne_lng","ne_lat","sw_lng","sw_lat","zoom"].forEach(function(i){if(t&&typeof t[i]=="string"){const s=parseFloat(t[i]);isNaN(s)||(t[i]=s)}})}catch{}try{if(!t.zoom&&!(typeof window<"u"&&window.isHomePage===!0)&&!l.isListPage){const r=(S(l.domElements.searchForm).find('[name="map"]').val()||"").toString();if(r){const u=r.split("|");if(u.length>=5){const f=parseInt(u[4],10);!isNaN(f)&&f>0&&(t.zoom=f)}}}}catch{}if(!["ne_lng","ne_lat","sw_lng","sw_lat"].some(function(i){return typeof t[i]!="number"||isNaN(t[i])}))try{pe=!0;const i=M.latLngBounds([t.sw_lat,t.sw_lng],[t.ne_lat,t.ne_lng]),s=i.getCenter(),r=typeof window<"u"&&window.__mirelaUserMovedMap===!0,u=typeof window<"u"&&window.__mirelaRestoringUserMapView===!0,f=typeof window<"u"&&window.__mirelaAutocompleteSelection===!0,p=typeof window<"u"&&window.__mirelaExplicitLocationFit===!0,b=typeof window<"u"&&window.__forceHomeAutoFitOnce===!0;let _=!1;try{l.isListPage&&window.__listForceFitOnce===!0&&(_=!0,window.__listForceFitOnce=!1)}catch{_=!1}let y=(r&&!f&&!p||u&&!f&&!p)&&!_;const c=typeof window<"u"&&window.isHomePage===!0,m=!!(e&&e.point);if(c&&b&&(y=!1),e&&e.locateSmartFit===!0&&(y=!1),e&&e.locateSmartFit===!0&&!y)try{St(a,i,Fe(a,{minZoom:12,maxZoom:15,padding:[72,72],minSpanMeters:700,zoomInToBestFit:!1,preferMarkerBounds:!1}))}catch{const d=Fe(a,{padding:[72,72]});d.paddingTopLeft&&d.paddingBottomRight?a.fitBounds(i,{paddingTopLeft:M.point(d.paddingTopLeft[0],d.paddingTopLeft[1]),paddingBottomRight:M.point(d.paddingBottomRight[0],d.paddingBottomRight[1]),maxZoom:15,animate:!1}):a.fitBounds(i,{padding:[72,72],maxZoom:15,animate:!1})}
7else if(t.zoom&&c&&m&&f&&!y)a.setView(s,t.zoom,{animate:!1});else if(t.zoom&&!l.isListPage)if(c&&!y)try{St(a,i,Fe(a,{minZoom:12,maxZoom:20,padding:[40,40],minSpanMeters:100}))}catch{const d=Fe(a,{padding:[40,40]});d.paddingTopLeft&&d.paddingBottomRight?a.fitBounds(i,{paddingTopLeft:M.point(d.paddingTopLeft[0],d.paddingTopLeft[1]),paddingBottomRight:M.point(d.paddingBottomRight[0],d.paddingBottomRight[1]),maxZoom:20,animate:!1}):a.fitBounds(i,{padding:[40,40],maxZoom:20,animate:!1})}else y||a.setView(s,t.zoom,{animate:!1});else if(!y)try{let h=l.isListPage?[70,70]:[40,40],d=16,g=100,w=0,P=20;const C=(function(){try{const x=document.querySelector(".wrapper-layout");return!!(x&&x.classList.contains("map-expanded"))}catch{return!1}})();if(l.isListPage){d=20;try{typeof window<"u"&&window.__listBoundsMode===!0&&(g=60)}catch{}try{const x=typeof a.getSize=="function"?a.getSize():null;if(x&&typeof x.x=="number"&&typeof x.y=="number"){const E=Math.round(Math.max(6,Math.min(18,x.x*.025))),F=Math.round(Math.max(6,Math.min(18,x.y*.025)));h=[E,F]}}catch{}C?(g=Math.min(g,40),h=[Math.max(4,Math.round(h[0]*.65)),Math.max(6,Math.round(h[1]*.7))],w=7,P=8):(g=Math.min(g,50),w=4,P=10)}const B=!!(l.isListPage&&(_||C));St(a,i,Fe(a,{minZoom:12,maxZoom:d,padding:h,minSpanMeters:g,zoomInToBestFit:!!l.isListPage,zoomInSteps:l.isListPage?Math.max(w,B?3:2):0,edgeSlackPx:P,preferMarkerBounds:!!l.isListPage,minFillRatioX:l.isListPage?C?.58:.46:0,minFillRatioY:l.isListPage?C?.45:.34:0}))}catch{let d=l.isListPage?[70,70]:[40,40],g=l.isListPage?20:16;if(l.isListPage)try{const P=typeof a.getSize=="function"?a.getSize():null;if(P&&typeof P.x=="number"&&typeof P.y=="number"){const C=Math.round(Math.max(8,Math.min(24,P.x*.03))),B=Math.round(Math.max(8,Math.min(24,P.y*.03)));d=[C,B]}}catch{}const w=Fe(a,{padding:d});w.paddingTopLeft&&w.paddingBottomRight?a.fitBounds(i,{paddingTopLeft:M.point(w.paddingTopLeft[0],w.paddingTopLeft[1]),paddingBottomRight:M.point(w.paddingBottomRight[0],w.paddingBottomRight[1]),maxZoom:g,animate:!1}):a.fitBounds(i,{padding:d,maxZoom:g,animate:!1})}a.once("moveend",()=>{pe=!1;try{if(typeof window<"u"&&window.__mirelaSuppressNextResizeMoveEnd===!0){window.__mirelaSuppressNextResizeMoveEnd=!1;try{q=a.project(a.getCenter(),a.getZoom())}catch{}try{typeof window<"u"&&window.isHomePage===!0&&a&&(Ze=a.project(a.getCenter(),a.getZoom()),Be=a.getZoom())}catch{}return}}catch{}let h=S(l.domElements.autoSearchButton);if(h.find("input").length>0&&h.find("input").prop("checked")){try{if(typeof window<"u"&&window.__mirelaHomeSsrSmartFitActive===!0){try{window.__suppressNextMapAuto=!1}catch{}return}}catch{}if(window.__suppressNextMapAuto===!0){try{window.__suppressNextMapAuto=!1}catch{}return}$();const g=typeof window<"u"&&window.isHomePage===!0;if(l.isListPage&&!g){var d=null;try{d=S(l.domElements.searchForm)}catch{d=null}if(!d||!d.length)return;try{const w=String(d.find('[name="s"]').val()||d.find('[name="ac_s"]').val()||"").trim(),P=String(d.find(".js-search-input").val()||d.find(".js-location-dd-input").val()||"").trim(),C=String(d.find('[name="district_id"]').val()||"").trim()!==""||String(d.find('[name="district_group_id"]').val()||"").trim()!==""||String(d.find('[name="street_id"]').val()||"").trim()!==""||String(d.find('[name="city_id"]').val()||"").trim()!==""||d.find('input[name="district_id[]"]').length>0||d.find('input[name="district_group_id[]"]').length>0||d.find('input[name="city_id[]"]').length>0;let B=!1;try{const E=new URLSearchParams(window.location.search);B=String(E.get("district_id")||"").trim()!==""||String(E.get("district_group_id")||"").trim()!==""||String(E.get("street_id")||"").trim()!==""||(E.getAll("district_id[]")||[]).length>0||(E.getAll("district_group_id[]")||[]).length>0}catch{}let x=!1;try{x=/\/(?:grad-|g-|city-of-|gorod-|stadt-|oblast-)[^/?#]+(?:\/|$)/i.test(String(window.location.pathname||""))}catch{}if(w!==""||P!==""||C||B||x)return}catch{}if(!window.__listAutoSearchBusy)window.__listAutoSearchBusy=!0;else{const w=String(d.find('[name="map"]').val()||"").trim(),P=String(window.__listActiveRequestMapSig||"").trim();if(w&&P&&w===P)return;window.__listAutoSearchPending=!0,window.__listAutoSearchPendingMapSig=w,window.__mapManualNext=!0;return}try{window.__mapManualNext=!0}catch{}try{document.dispatchEvent(new CustomEvent("listAutoSearchRequested"))}catch{}}else{try{const w=S(l.domElements.searchForm),P=(w.find('[name="street_id"]').val()||"").trim();P&&(w.find('[name="street_id"]').length===0&&S("<input>",{type:"hidden",name:"street_id",value:P}).appendTo(w),w.find('[name="map"]').val(""),de(""))}catch{}try{if(typeof window<"u"&&window.isHomePage===!0&&(typeof window<"u"&&window.__mirelaUserMovedMap===!0||typeof window<"u"&&window.__mirelaUserMovedMapHome===!0)){We();try{window.__mirelaHomeForceStrictLocStripBeforeBrowse=!0}catch{}try{$()}catch{}if(re)return}}catch{}ae()}}else try{window.__suppressNextMapAuto===!0&&(window.__suppressNextMapAuto=!1)}catch{}})}catch{try{pe=!1}catch{}return}},this.fitHomeMapToPinsFromResponse=Ut,this.removeMarkersPopup=function(){a.eachLayer(function(e){e instanceof M.Marker&&e.unbindPopup()})};function Mt(){Ee||(Ee=S("<div class='overlay-loading'><div class='preload-logo'><div class='spinner'></div></div></div>").css("pointer-events","none"),S(".b-browse-map").append(Ee))}function ee(){Ee&&(Ee.remove(),Ee=null,Ae())}function fn(){l.controls.zoom!==!1&&M.control.zoom({position:"topright",zoomInTitle:l.labels.zoomInControl,zoomOutTitle:l.labels.zoomOutControl}).addTo(a)}function mn(e){if(!a||!e)return;let t=e.latlng;if(!t&&typeof e.latitude=="number"&&typeof e.longitude=="number"&&(t=M.latLng(e.latitude,e.longitude)),!t)return;_e?_e.clearLayers():_e=M.layerGroup().addTo(a);const o=M.circleMarker(t,{className:"leaflet-control-locate-marker",color:"#fff",fillColor:"#2A93EE",fillOpacity:1,weight:3,opacity:1,radius:9});_e.addLayer(o);try{o.bringToFront()}catch{}}function Te(){Ne&&(clearTimeout(Ne),Ne=null)}function ro(){Te(),Ne=setTimeout(function(){if(Ne=null,!!G){G=!1,De=!1;try{a.off("moveend",Ge)}catch{}ee(),ge(!1)}},35e3)}function bt(){try{a.off("moveend",Ge)}catch{}a.on("moveend",Ge)}function ge(e){if(Ie)try{e?(Ie.classList.add("requesting"),Ie.classList.remove("active","following")):Ie.classList.remove("requesting","active","following")}catch{}}function pn(e){if(!e)return!1;const t=Date.now();return e.type==="click"&&t-xt<700?!0:((e.type==="touchstart"||e.type==="pointerdown")&&(xt=t),!1)}function ao(){setTimeout(function(){G===!0&&(bt(),Ge())},800)}function Oe(e){if(e)try{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}catch{}}function hn(){if(l.controls.locate===!1)return;function e(){try{return/iPad|iPhone|iPod/i.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}catch{return!1}}function t(){try{const v=String(navigator.userAgent||"");return/CriOS|FxiOS|EdgiOS|OPiOS|SamsungBrowser|Chrome|Chromium|Edg|OPR|Android/i.test(v)?!1:/iPad|iPhone|iPod/i.test(v)?/Safari/i.test(v):/Safari/i.test(v)}catch{return!1}}function o(){try{return Q||e()?!0:!!(window.matchMedia&&window.matchMedia("(pointer: coarse)").matches)}catch{return Q}}function n(){let L=l.labels&&l.labels.locateError?l.labels.locateError:typeof window<"u"&&window.__locateErrorHtml?window.__locateErrorHtml:'<h3>\u0414\u043E\u0441\u0442\u044A\u043F\u044A\u0442 \u0434\u043E \u043C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u0442\u043E \u0412\u0438 \u0435 \u0431\u043B\u043E\u043A\u0438\u0440\u0430\u043D</h3><div class="help">\u041E\u0442\u0432\u043E\u0440\u0435\u0442\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438\u0442\u0435 \u043D\u0430 \u0431\u0440\u0430\u0443\u0437\u044A\u0440\u0430 \u0441\u0438 \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u0442\u0435 \u0434\u043E\u0441\u0442\u044A\u043F \u0434\u043E \u043C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u0442\u043E, \u0437\u0430 \u0434\u0430 \u0432\u0438\u0434\u0438\u0442\u0435 \u0438\u043C\u043E\u0442\u0438\u0442\u0435 \u043E\u043A\u043E\u043B\u043E \u0432\u0430\u0441.</div>';return t()&&(L+='<div class="help">\u0412 Safari \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435\u0442\u043E \u0435 \u043E\u0442\u0434\u0435\u043B\u043D\u043E \u043E\u0442 Chrome. Safari \u2192 aA \u2192 Website Settings \u2192 Location \u2192 Allow.</div>'),L}function i(){try{if(document.getElementById("mirela-locate-dialog-styles"))return;const v=document.createElement("style");
7v.id="mirela-locate-dialog-styles",v.textContent=` 8 .mirela-locate-backdrop{ 9 position: fixed; inset: 0; 10 background: rgba(0,0,0,.45); 11 z-index: 60000; 12 display: flex; align-items: center; justify-content: center; 13 padding: 16px; 14 } 15 .mirela-locate-dialog{ 16 width: min(520px, 100%); 17 background: #fff; 18 border-radius: 12px; 19 box-shadow: 0 10px 30px rgba(0,0,0,.25); 20 padding: 16px 18px 14px; 21 position: relative; 22 color: #161e2d; 23 } 24 .mirela-locate-dialog h3{ 25 font-size: 18px; 26 margin: 0 0 8px 0; 27 font-weight: 700; 28 color: #161e2d; 29 } 30 .mirela-locate-dialog .help{ 31 font-size: 14px; 32 line-height: 1.45; 33 color: #4b5563; 34 } 35 .mirela-locate-dialog .mirela-locate-actions{ 36 display: flex; 37 justify-content: flex-end; 38 gap: 10px; 39 margin-top: 12px; 40 } 41 .mirela-locate-dialog .mirela-locate-close{ 42 position: absolute; 43 top: 8px; right: 8px; 44 width: 34px; height: 34px; 45 border: 0; 46 background: transparent; 47 border-radius: 999px; 48 cursor: pointer; 49 color: #6b7280; 50 display: inline-flex; 51 align-items: center; 52 justify-content: center; 53 font-size: 22px; 54 line-height: 1; 55 } 56 .mirela-locate-dialog .mirela-locate-close:hover{ 57 background: rgba(0,0,0,.06); 58 color: #111827; 59 } 60 .mirela-locate-dialog .mirela-locate-ok{ 61 border: 0; 62 padding: 10px 14px; 63 border-radius: 10px; 64 background: #1563df; 65 color: #fff; 66 font-weight: 700; 67 cursor: pointer; 68 } 69 .mirela-locate-dialog .mirela-locate-ok:hover{ 70 background: #0d4ba3; 71 } 72 `,document.head.appendChild(v)}catch{}}function s(v,L){try{i();const H=document.querySelector(".mirela-locate-backdrop");if(H)try{H.remove()}catch{}const O=document.createElement("div");O.className="mirela-locate-backdrop",O.setAttribute("role","dialog"),O.setAttribute("aria-modal","true");const D=document.createElement("div");D.className="mirela-locate-dialog",D.innerHTML='<button type="button" class="mirela-locate-close" aria-label="\u0417\u0430\u0442\u0432\u043E\u0440\u0438">×</button><div class="mirela-locate-content">'+(v||"")+'</div><div class="mirela-locate-actions"><button type="button" class="mirela-locate-ok">OK</button></div>',O.appendChild(D),document.body.appendChild(O);const k=function(){try{O.remove()}catch{}try{typeof L=="function"&&L()}catch{}};O.addEventListener("click",function(Z){Z.target===O&&k()});const K=D.querySelector(".mirela-locate-close"),z=D.querySelector(".mirela-locate-ok");if(K&&K.addEventListener("click",k),z){z.addEventListener("click",k);try{z.focus()}catch{}}
72document.addEventListener("keydown",function Z(A){A.key==="Escape"&&(document.removeEventListener("keydown",Z),k())});return}catch{}try{typeof L=="function"&&L()}catch{}}function r(){return"\u041D\u0435 \u0443\u0441\u043F\u044F\u0445\u043C\u0435 \u0434\u0430 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0438\u043C \u043C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u0442\u043E. GPS \u0441\u0438\u0433\u043D\u0430\u043B\u044A\u0442 \u0435 \u0441\u043B\u0430\u0431 \u0438\u043B\u0438 \u043E\u0442\u043D\u0435\u043C\u0430 \u043F\u043E\u0432\u0435\u0447\u0435 \u0432\u0440\u0435\u043C\u0435. \u041E\u043F\u0438\u0442\u0430\u0439\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E \u043D\u0430 \u043E\u0442\u043A\u0440\u0438\u0442\u043E \u0438\u043B\u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0435\u0442\u0435 \u0434\u0430\u043B\u0438 Location Services \u0441\u0430 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0438."+(e()?" \u041D\u0430 iPhone: Settings \u2192 Privacy & Security \u2192 Location Services \u2192 Safari Websites \u2192 While Using the App.":"")}function u(){return"\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u0442\u043E \u043D\u0435 \u0435 \u043D\u0430\u043B\u0438\u0447\u043D\u043E. \u0423\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E\u0442\u043E \u043D\u0435 \u0443\u0441\u043F\u044F \u0434\u0430 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0438 \u043A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442\u0438\u0442\u0435 \u0432\u0438. \u041E\u043F\u0438\u0442\u0430\u0439\u0442\u0435 \u043E\u0442\u043D\u043E\u0432\u043E \u0441\u043B\u0435\u0434 \u043D\u044F\u043A\u043E\u043B\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434\u0438."}function f(v){const L=v&&v.code||0;if(L===1)return n();if(L===3)return'<h3>\u041D\u0435 \u0443\u0441\u043F\u044F\u0445\u043C\u0435 \u0434\u0430 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0438\u043C \u043C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u0442\u043E</h3><div class="help">'+r()+"</div>";if(L===2)return'<h3>\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u0442\u043E \u043D\u0435 \u0435 \u043D\u0430\u043B\u0438\u0447\u043D\u043E</h3><div class="help">'+u()+"</div>";const H=v&&v.message?String(v.message):"";return H?'<div class="help">'+H.replace(/</g,"<")+"</div>":n()}function p(){ge(!1),G=!1,De=!1,Te()}function b(v){ee();try{if(typeof window<"u"&&window.isSecureContext===!1){s('<h3>\u0413\u0435\u043E\u043B\u043E\u043A\u0430\u0446\u0438\u044F\u0442\u0430 \u043D\u0435 \u0435 \u043D\u0430\u043B\u0438\u0447\u043D\u0430</h3><div class="help">\u0413\u0435\u043E\u043B\u043E\u043A\u0430\u0446\u0438\u044F\u0442\u0430 \u0438\u0437\u0438\u0441\u043A\u0432\u0430 HTTPS. \u041E\u0442\u0432\u043E\u0440\u0435\u0442\u0435 \u0441\u0430\u0439\u0442\u0430 \u043F\u0440\u0435\u0437 \u0437\u0430\u0449\u0438\u0442\u0435\u043D\u0430 \u0432\u0440\u044A\u0437\u043A\u0430 (https://).</div>',p);return}const L=f(v);if(typeof window.showCustomDialog=="function"){window.showCustomDialog(L,p);return}if(L){s(L,p);return}}catch{}p()}function _(){b({code:0,message:"\u0413\u0435\u043E\u043B\u043E\u043A\u0430\u0446\u0438\u044F\u0442\u0430 \u043D\u0435 \u0441\u0435 \u043F\u043E\u0434\u0434\u044A\u0440\u0436\u0430 \u043E\u0442 \u0432\u0430\u0448\u0438\u044F \u0431\u0440\u0430\u0443\u0437\u044A\u0440."})}function y(v){if(!(!v||!t()))try{v.addEventListener("click",function(){},!1),v.addEventListener("pointerdown",function(){},!1),v.addEventListener("touchstart",function(){},{passive:!0})}catch{}}function c(){return{enableHighAccuracy:!0,timeout:25e3,maximumAge:0}}function m(v){const L=v.coords.latitude,H=v.coords.longitude,O=M.latLng(L,H);a.setView(O,l.locateZoom,{animate:!0}),a.fire("locationfound",{latlng:O,latitude:L,longitude:H,accuracy:v.coords.accuracy||0,altitude:v.coords.altitude,altitudeAccuracy:v.coords.altitudeAccuracy,heading:v.coords.heading,speed:v.coords.speed,timestamp:v.timestamp})}const h=o(),d=h||t();let g=!1,w=0;if(le=M.control.locate({initialZoomLevel:l.locateZoom,position:l.controls.locatePosition,strings:{title:l.labels.locateControl}
72,clickBehavior:{inView:"setView",outOfView:"setView",inViewNotFollowing:"setView"},showCompass:!1,locateOptions:{watch:!1,maxZoom:l.locateZoom,timeout:h?25e3:1e4,enableHighAccuracy:!0,maximumAge:0},drawCircle:!1,drawMarker:!1,onLocationError:function(v){try{if(d){g||(ee(),ge(!1),G=!1,Te());return}b(v)}catch{ee(),ge(!1),G=!1,Te()}}}).addTo(a),d&&le&&le._link)try{M.DomEvent.off(le._link,"click",le._onClick,le)}catch{}function P(){try{le&&typeof le.stop=="function"&&le.stop()}catch{}try{a&&typeof a.stopLocate=="function"&&a.stopLocate()}catch{}}function C(v){if(!d)return;if(!navigator.geolocation){Oe(v),_();return}if(pn(v)){Oe(v);return}if(typeof window<"u"&&window.isSecureContext===!1){b({code:1}),Oe(v);return}const L=Date.now();if(g||L-w<800){Oe(v);return}Oe(v),P(),g=!0,w=L,G=!0,Qe(),ge(!0),Mt(),ro();try{a.fire("locateactivate")}catch{}navigator.geolocation.getCurrentPosition(function(H){g=!1,ge(!1);try{m(H),ao()}catch{G=!1,Te(),ee()}},function(H){g=!1,b(H)},c())}const B=a.getContainer();if(l.controls.locatePosition=="topright"){let v=Ke(),L=B.querySelector(".leaflet-control-locate");L&&!t()&&(l.controls.resizeMap===!0?v.appendChild(L):v.prepend(L))}const x=B.querySelector(".leaflet-control-locate");Ie=x;const E=x&&x.querySelector(".leaflet-bar-part-single"),F=l.labels&&l.labels.locateControl||"\u0412\u0430\u0448\u0435\u0442\u043E \u043C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435";y(x),y(E),E&&(E.setAttribute("aria-label",F),E.getAttribute("title")||(E.title=F),E.addEventListener("keydown",function(v){if(!(!v||v.key!=="Enter"&&v.key!==" ")){if(Oe(v),d){C(v);return}try{E.click()}catch{}}}),window.PointerEvent&&E.addEventListener("pointerdown",C,{capture:!0}),E.addEventListener("touchstart",C,{capture:!0,passive:!1}),E.addEventListener("click",C,{capture:!0})),E&&!d&&E.addEventListener("mousedown",function(v){!x||!x.classList.contains("active")||bt()}),a.on("locateactivate",function(){d||(G=!0,Qe(),ge(!0),Mt(),ro())}),a.on("locationfound",function(v){mn(v),bt(),ao()})}function Ge(){if(dt)return;dt=!0,Te();let e=S(l.domElements.autoSearchButton);const t=G===!0,o=t;let n=!1;if(t){Qe();try{if(typeof window<"u"&&window.isHomePage===!0){We(),window.__mirelaHomeForceStrictLocStripBeforeBrowse=!0;try{window.__mirelaHomeBrowseFromAutoMove=!0}catch{}}else if(l.isListPage){Se();try{var i=window.MirelaSearch&&window.MirelaSearch.listRuntime;i&&(typeof i.setListBoundsModeFlag=="function"&&i.setListBoundsModeFlag(!0),typeof i.setMapManualNextFlag=="function"&&i.setMapManualNextFlag(!0),typeof i.setListSkipFitOnceFlag=="function"&&i.setListSkipFitOnceFlag(!0),typeof i.setListForceFitOnceFlag=="function"&&i.setListForceFitOnceFlag(!1),typeof i.setFlag=="function"&&i.setFlag("__listLocationSelectionFitNext",!1,"MapLeaflet.locate"));try{window.__listForceFitOnce=!1}catch{}}catch{}}}catch{}}(o||l.controls.autoSearch===!1||e.find("input").length===0||e.find("input").length>0&&!e.find("input").prop("checked"))&&($(),n=!0,t&&(De=!0),ae(function(){S(l.domElements.mapContainer).removeClass("is-dirty")})),G=!1,a.off("moveend",Ge),ge(!1),t&&!n&&ee(),dt=!1}function Bn(e){var t=String(e??"").trim().toLowerCase();if(!t)return!1;try{for(var o=document.querySelectorAll(".js-location-dd-input, .js-mobile-search-input"),n=0;n<o.length;n++){var i=o[n];if(!(!i||!i.getAttribute)){var s=(i.getAttribute("placeholder")||i.getAttribute("data-placeholder")||i.getAttribute("aria-label")||"").trim().toLowerCase();if(s&&s===t)return!0}}var r=typeof window<"u"&&window.__mirelaSearchBarTailConfig?window.__mirelaSearchBarTailConfig:{},u=String(r.locationPlaceholder||"").trim().toLowerCase(),f=String(r.locationLabel||"").trim().toLowerCase();if(u&&u===t||f&&f===t)return!0}catch{}return!1}function Hn(){try{return typeof window<"u"&&window.__mirelaUserMovedMapHome===!0||typeof window<"u"&&window.__mirelaHomeManualBoundsSearchDone===!0||typeof window<"u"&&window.__mirelaHomeForceMapListNext===!0}catch{return!1}}function An(e,t){try{var o=window.MirelaHomeLocationNavigationPolicy||null;if(o&&typeof o.getHomeListNavigationState=="function")return o.getHomeListNavigationState(t||{})}catch{}return null}function Re(e,t){try{if(!e||!e.querySelector)return"";var o=e.querySelector('[name="'+t+'"]');return o&&o.value!=null?String(o.value).trim():""}catch{return""}}function Fn(){var e=document.querySelector(".js-search-form"),t=document.querySelector(".js-mobile-search-form");return!!(Re(e,"street_id")||Re(t,"street_id")||Re(e,"district_id")||Re(t,"district_id")||Re(e,"district_group_id")||Re(t,"district_group_id"))}function gn(){if(l.controls.list===!1)return;M.Control.Button=M.Control.extend({options:{position:"topright"},onAdd:function(t){let o=Ke(),n=M.DomUtil.create("div","leaflet-control-button b-browse-map__search-list js-map-list",o);
72return n.dataset.baseLabel=l.labels.customListButton||"",n.dataset.zeroLabel=l.labels&&l.labels.zeroOffersLabel?String(l.labels.zeroOffersLabel):"",n.innerHTML=n.dataset.baseLabel?n.dataset.baseLabel+' (<span class="total"></span>)':'(<span class="total"></span>)',M.DomEvent.disableClickPropagation(n),M.DomEvent.on(n,"click",function(){var i=!1;try{i=typeof window<"u"&&window.__mirelaHomeForceMapListNext===!0,i&&(window.__mirelaHomeForceMapListNext=!1)}catch{}try{$()}catch{}try{const y=String(window.__lastMapParamUsed||"").trim();if(!!(y&&(typeof window<"u"&&window.__mirelaUserMovedMapHome===!0||typeof window<"u"&&window.__mirelaHomeManualBoundsSearchDone===!0||typeof window<"u"&&window.__mirelaHomeForceMapListNext===!0))){const m=document.querySelector(".js-search-form"),h=m&&m.querySelector('input[name="map"]'),d=m&&m.querySelector(".js-location-map");h&&(h.value=y),d&&(d.value=y)}}catch{}typeof window.persistSearchInputReopenTargetBeforeNavigation=="function"&&window.persistSearchInputReopenTargetBeforeNavigation(document.querySelector(".js-search-form"));try{typeof window.__mirelaSyncMobileSearchToDesktop=="function"&&window.__mirelaSyncMobileSearchToDesktop()}catch{}try{const y=String(window.__lastMapParamUsed||"").trim();if(!!(y&&(typeof window<"u"&&window.__mirelaUserMovedMapHome===!0||typeof window<"u"&&window.__mirelaHomeManualBoundsSearchDone===!0||typeof window<"u"&&window.__mirelaHomeForceMapListNext===!0))){const m=document.querySelector(".js-search-form"),h=m&&m.querySelector('input[name="map"]'),d=m&&m.querySelector(".js-location-map");h&&(h.value=y),d&&(d.value=y)}}catch{}var s=typeof window<"u"&&window.isHomePage===!0||typeof document<"u"&&document.body&&document.body.classList&&document.body.classList.contains("page-home");try{if(s){if(typeof window.__mirelaNavigateHomeToListViaMapBrowse=="function"){var r=document.querySelector(".js-search-form");if(r&&window.__mirelaNavigateHomeToListViaMapBrowse(r)===!0)return}return}}catch{if(s)return}try{var u=typeof window<"u"&&window.isListPage===!0||typeof document<"u"&&document.body&&document.body.classList&&document.body.classList.contains("page-list");if(u){var f=function(y){var c=String(y||"").replace(/^\/+/,"").split("/").filter(Boolean);if(!c.length)return"";var m=String(c[0]||"").toLowerCase();return(m==="en"||m==="ru"||m==="de"||m==="bg")&&c.shift(),String(c[0]||"").toLowerCase()},p="",b=window.MirelaSearch&&window.MirelaSearch.canonicalUtils;if(b&&typeof b.readBrowseContractCanonicalRel=="function"?p=String(b.readBrowseContractCanonicalRel()||"").trim():p=String(window.__mirelaBrowseContractCanonicalRel||window.__mirelaLastMapBrowseSeoHref||"").trim(),p){var _=p.split("#")[0].split("?")[0];if(f(_)===f(window.location.pathname||"")){window.location.href=p;return}}}}catch{}}),o}}),new M.Control.Button().addTo(a)}function yn(){M.Control.Button=M.Control.extend({options:{position:"topright"},onAdd:function(t){let o=Ke(),n=M.DomUtil.create("div","leaflet-control-button b-browse-map__search-manual js-map-manual",o);n.innerHTML=l.labels.customManualSearchButton,M.DomEvent.disableClickPropagation(n),M.DomEvent.on(n,"click",function(r){const u=typeof window<"u"&&window.isHomePage===!0;try{window.__manualSearchRequested=!0}catch{}try{window.__mapManualNext=!0}catch{}var f=!1;try{f=!!(window.__pendingLocationBounds&&Date.now()-(window.__pendingLocationBoundsTs||0)<3e5)}catch{}var p=!1;try{p=typeof window<"u"&&window.__mirelaHomeCityScopedBrowseNext===!0,p&&(window.__mirelaHomeCityScopedBrowseNext=!1)}catch{}if(f){try{window.__mirelaAutocompleteSelection=!0,window.__forceHomeAutoFitOnce=!0}catch{}try{setTimeout(function(){try{window.__mirelaAutocompleteSelection=!1}catch{}},2500)}catch{}}else if(u&&p){try{window.__mirelaHomeBrowseUsedCityScopeOnly=!0}catch{}try{S(l.domElements.searchForm).find('input[name="map"], .js-location-map').val("")}catch{}de("")}else $();try{if(!u&&l.isListPage){try{var b=!!(r&&(r.isTrusted===!0||r.originalEvent&&r.originalEvent.isTrusted===!0));if(b){try{[document.querySelector(".js-search-form"),document.querySelector(".js-mobile-search-form")].filter(
72Boolean).forEach(function(d){var g=S(d);g.find('[name="city_id"]').val(""),g.find('[name="district_id"]').val(""),g.find('[name="district_group_id"]').val(""),g.find('[name="street_id"]').val(""),g.find('[name="s"]').val(""),g.find('[name="city_id[]"], [name="district_id[]"], [name="district_group_id[]"]').remove()})}catch{}try{S(".js-location-dd-input, .js-search-input, .js-mobile-search-input").val("")}catch{}Se()}}catch{}try{var _=window.MirelaSearch&&window.MirelaSearch.listRuntime;if(_&&typeof _.makeRequest=="function")_.makeRequest({reason:"mapLeaflet.manualSearchButton",requestMode:"viewport",force:!0,append:!1,resetPaging:!0,explicitMap:!0});else{try{window.__listManualSearchNext=!0}catch{}try{window.__mapManualNext=!0}catch{}if(Ko(document.querySelector(".js-search-form"),{manual:!0})===!1)try{document.dispatchEvent(new CustomEvent("listAutoSearchRequested"))}catch{}}}catch{}S(l.domElements.mapContainer).removeClass("is-dirty");return}}catch{}if(u)try{S(l.domElements.searchForm).find('input[name="map_manual"]').remove()}catch{}else try{const d=S(l.domElements.searchForm);d.find('input[name="map_manual"]').remove(),S("<input>",{type:"hidden",name:"map_manual",value:"1"}).appendTo(d)}catch{}try{var y=!1;try{y=!!(r&&(r.isTrusted===!0||r.originalEvent&&r.originalEvent.isTrusted===!0))}catch{y=!1}if(y){try{u&&(window.__mirelaHomeForceMapListNext=!0)}catch{}try{var c=window.MirelaHomeLocationNavigationPolicy||null;c&&typeof c.setHomeListIntent=="function"&&c.setHomeListIntent("map")}catch{}const d=S(l.domElements.searchForm),g=String(d.find('[name="type"]').val()||"").trim();if(g==="1"||g==="2"){try{[document.querySelector(".js-search-form"),document.querySelector(".js-mobile-search-form")].filter(Boolean).forEach(function(w){var P=S(w);P.find('[name="city_id"]').val(""),P.find('[name="district_id"]').val(""),P.find('[name="district_group_id"]').val(""),P.find('[name="street_id"]').val(""),P.find('[name="s"]').val(""),P.find('[name="city_id[]"], [name="district_id[]"], [name="district_group_id[]"]').remove()}),Se()}catch{}try{var m=window.MirelaSearch&&window.MirelaSearch.locationState;typeof window<"u"&&window.isListPage===!0&&m&&typeof m.setListSeoLocationRehydrateSuppressed=="function"&&m.setListSeoLocationRehydrateSuppressed()}catch{}try{typeof window<"u"&&(window.__locationDdClearVersion=Number(window.__locationDdClearVersion||0)+1)}catch{}try{window.__mobileLocationPendingSelection=null,window.__mobileLocationCanonicalState={cityId:"",districtIds:[],groupIds:[],streetId:"",label:"",ts:Date.now()}}catch{}try{window.__forceCityIdOnce=null}catch{}}try{const w=I.getMap?I.getMap():null,P=w&&(w.map||w);if(P&&P.getBounds){const C=P.getBounds(),B=C.getNorthEast(),x=C.getSouthWest
72(),E=[B.lng,B.lat,x.lng,x.lat,P.getZoom()].join("|");d.find('[name="map"]').val(E),de(E)}}catch{}}}catch{}let h=!1;try{h=!!(r&&(r.isTrusted===!0||r.originalEvent&&r.originalEvent.isTrusted===!0))}catch{h=!1}if(h){try{window.__suppressHomeAutoFitOnce=!0}catch{}try{window.__suppressNextFitOnce=!0}catch{}}ae(function(){S(l.domElements.mapContainer).removeClass("is-dirty")})});let s=document.getElementById("map").getBoundingClientRect();return n.style.marginRight=`${s.width/2-S(n).width()-20}px`,o}}),new M.Control.Button().addTo(a)}function wn(){if(l.controls.autoSearch===!1)return;function e(){try{return typeof window<"u"&&window.isHomePage===!0||typeof document<"u"&&document.body&&document.body.classList&&document.body.classList.contains("page-home")}catch{return!1}}let t="autoSearchButtonState"+Mn("p");function o(r){try{const u=S(l.domElements.mapContainer).first();if(!u.length)return;u.toggleClass("map-auto-on",!!r),u.toggleClass("map-auto-off",!r)}catch{}}function n(r){let u;try{this&&this.tagName&&String(this.tagName).toLowerCase()==="input"&&(u=!!this.checked)}catch{}try{u===void 0&&r&&r.target&&r.target.tagName&&String(r.target.tagName).toLowerCase()==="input"&&(u=!!r.target.checked)}catch{}u===void 0&&(u=!!S(l.domElements.autoSearchButton).find('input[type="checkbox"]').prop("checked"));try{if(r&&r.isTrusted===!1){o(!!u);return}}catch{}localStorage.setItem(t,u),o(!!u);try{e()?localStorage.setItem("homePageAutoSearch",u?"true":"false"):(l.isListPage===!0||typeof window<"u"&&window.isListPage===!0)&&localStorage.setItem("listPageAutoSearch",u?"true":"false")}catch{}try{e()&&document&&document.body&&document.body.classList&&document.body.classList.toggle("home-map-auto-on",!!u)}catch{}}function i(){try{if(e()){const f=localStorage.getItem("homePageAutoSearch");if(f!==null)return f==="true";try{if(typeof window<"u"&&window.matchMedia&&window.matchMedia("(max-width: 767.98px)").matches)return!0}catch{}return!1}if(l.isListPage===!0||typeof window<"u"&&window.isListPage===!0){try{var r=new URLSearchParams(typeof window<"u"&&window.location&&window.location.search?window.location.search:"");if(String(r.get("map_manual")||"").trim()==="1"&&String(r.get("map")||"").trim()!=="")return!0}catch{}const f=localStorage.getItem("listPageAutoSearch");return f!==null?f==="true":!!l.isSearchAutoChecked}}catch{}let u=localStorage.getItem(t);return u!==null?u==="true":l.isSearchAutoChecked}M.Control.Button=M.Control.extend({options:{position:"topright"},onAdd:function(r){let u=Ke();const f=i();let p=M.DomUtil.create("div","leaflet-control-button b-browse-map__search-auto js-map-auto",u);if(p.innerHTML='<label><input type="checkbox" '+(f?"checked":"")+" /> "+l.labels.customAutoSearchButton+"</label>",o(!!f),l.isSearchAutoCentered){let _=document.getElementById("map").getBoundingClientRect();p.style.marginRight=`${_.width/2-S(p).width()+30}px`}return M.DomEvent.disableClickPropagation(p),u}}),new M.Control.Button().addTo(a),S(l.domElements.autoSearchButton).find('input[type="checkbox"]').on("change",n);try{const r=S(l.domElements.autoSearchButton).find('input[type="checkbox"]').prop("checked");o(!!r),e()&&document&&document.body&&document.body.classList&&document.body.classList.toggle("home-map-auto-on",!!r)}catch{}}function _n(){if(l.controls.resizeMap===!1)return;M.Control.Button=M.Control.extend({options:{position:"topright"},onAdd:function(t){let o=Ke(),n=M.DomUtil.create("div","leaflet-control-button b-browse-map__resize js-map-resize",o);n.setAttribute("title",l.labels.resizeMapButton||"Resize map");const i=l.domElements.resizeMapButtonIconClass&&l.domElements.resizeMapButtonIconClass.indexOf("icon-")===0?l.domElements.resizeMapButtonIconClass:"icon-arrLeftRight";return n.innerHTML='<i class="icon '+i+'"></i>',M.DomEvent.disableClickPropagation(n),M.DomEvent.on(n,"click",function(s){M.DomEvent.stop(s);try{const r=document.querySelector(".wrapper-layout");if(!r)return;const u=r.classList.toggle("map-expanded"),f=n.querySelector(".icon");f&&(f.classList.remove("icon-arrLeftRight","icon-arrLeftRight1"),f.classList.add(u?"icon-arrLeftRight1":"icon-arrLeftRight"));try{if(!(typeof window<"u"&&window.isListPage===!0||document.querySelector(".wrap-left")&&typeof window.loadOffers=="function"))return;const b=document.querySelector('a[href="#gridLayout"]'),_=document.querySelector('a[href="#listLayout"]'),y=document.getElementById("gridLayout"),c=document.getElementById("listLayout");if(!y||!c)return;if(u){b?b.click():(y.classList.add("active","show"),c.classList.remove("active","show"));try{typeof window.__mirelaHydrateGridFromSsrTemplate=="function"&&window.__mirelaHydrateGridFromSsrTemplate()}catch{}localStorage.setItem("listPageGridView","grid")}else _?_.click():(c.classList.add("active","show"),y.classList.remove("active","show")),localStorage.setItem("listPageGridView","list")}catch{}setTimeout(function(){Ve(2e3);try{I.invalidateSize()}catch{}setTimeout(function(){Ve(2e3);try{nn()}catch{}},130)},200)}catch{}}),o}}),new M.Control.Button().addTo(a)}function vn(){M.Control.CustomLayers=M.Control.Layers.extend({options:{position:"topright"},onAdd:function(t){let o=M.DomUtil.create("div","leaflet-control-custom-layers");return M.DomUtil.create("div","b-browse-map__message js-map-message",o),o}}),new M.Control.CustomLayers().addTo(a)}function Ke(){return $e||($e=M.DomUtil.create("div","leaflet-custom-control leaflet-control"),$e)}function co(e){if(l.domElements.messageContainer){clearTimeout(Bt),S(l.domElements.messageContainer).empty(),S(l.domElements.messageContainer).css({display:""});try{const t=!!(e&&e.message&&e.message.text),o=e&&typeof e.total=="number"?e.total:null;if(!t&&o===0){const n=(l.labels&&l.labels.zeroOffersLabel?String(l.labels.zeroOffersLabel):"")||(typeof window<"u"&&window.__zeroOffersLabel?String(window.__zeroOffersLabel):"");n&&(e=Object.assign({},e,{message:{text:n,timeout:7e3}}))}}catch{}e.message?(S(l.domElements.listButton).hide(),S(l.domElements.messageContainer).html(e.message.text),S(l.domElements.messageContainer).css({display:"block"}),e.message.timeout&&(Bt=setTimeout(function(){S(l.domElements.messageContainer).css({display:""})},e.message.timeout))):S(l.domElements.listButton).css({display:""})}}function so(e){if(l.controls.list===!1)return;const t=S(l.domElements.listButton),o=e&&e.total;let n=null;if(typeof o=="number"&&isFinite(o))n=o;else if(o!=null&&String(o).trim()!==""){const i=parseInt(String(o),10);isFinite(i)&&(n=i)}t.find(".total").text(n===null||n===0?"":String(n));try{if(typeof window<"u"&&window.isHomePage===!0||typeof document<"u"&&document.body&&document.body.classList&&document.body.classList.contains("page-home")){const s=n===null?"":String(n);document.querySelectorAll(".js-home-list-cta .total").forEach(function(r){r.textContent=s})}}catch{}}this.invalidateSize=function(){_t(1200)}
72,this.myLocation=function(){if(!l.center||!l.zoom){ee();return}pe=!0,a.setView(l.center,l.zoom),$(),ae(function(e){I.fitMapBoundsSafely(e)})};let ce=null;function Lt(e){try{if(!e||!e.setAttribute)return;e.setAttribute("fetchpriority","high"),e.setAttribute("decoding","async")}catch{}}function Sn(){const e=(document.documentElement.getAttribute("lang")||"bg").toLowerCase(),t=/^en([\-_].*)?$/.test(e);if(ce){try{a.removeLayer(ce)}catch{}ce=null}t?ce=M.tileLayer("https://tiles.stadiamaps.com/tiles/osm_bright/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> © <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>',maxNativeZoom:19,maxZoom:20}).addTo(a):ce=M.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxNativeZoom:19,maxZoom:20}).addTo(a);try{if(!window.__mirelaMapVisibleDispatched){let s=function(){o||window.__mirelaMapVisibleDispatched||(o=!0,window.__mirelaMapVisibleDispatched=!0,document.dispatchEvent(new CustomEvent("mapVisible")),Ae())};var i=s,o=!1;ce.once("tileload",s);try{var n=ce._tiles||{};Object.keys(n).some(function(r){return n[r]&&n[r].loaded?(s(),!0):!1})}catch{}window.setTimeout(s,4e3)}ce.on("tileloadstart",function(s){Lt(s&&s.tile)}),ce.on("tileload",function(s){Lt(s&&s.tile)}),Object.values(ce._tiles||{}).forEach(function(s){Lt(s&&s.el)})}catch{}}function Mn(e){return new URLSearchParams(window.location.search).get(e)||""}this.getMap=function(){return a},this.getSearchBoundsMapString=function(){return ln(a)},this.getEffectiveMapBoundsForSearch=function(){return ot(a)},this.isSearchBoundsDebugEnabled=function(){return vt()},this.setSearchBoundsDebugEnabled=function(e){try{typeof window<"u"&&(window.__mirelaMapDebugBounds=!!e)}catch{}try{a&&(io(a),nt(a))}catch{}return vt()},this.ensureListScrollWheelZoom=function(){return Ae()},this.setUserLocation=function(e,t){if(a&&e&&t){let u=!1;try{typeof window<"u"&&window.sessionStorage&&(u=window.sessionStorage.getItem("__mirela_logo_reset")==="1")}catch{}let f=!1;if(!u)try{var o="";try{var n=document.querySelector('.js-search-form [name="city_id"], .js-city-id, [name="city_id"]');o=n&&n.value!=null?String(n.value).trim():""}catch{}if(o&&o!=="0"&&o!=="3"&&(f=!0),!f)try{var i=Et(),s=i&&i.city_id!=null?String(i.city_id):"";s&&s!=="0"&&s!=="3"&&(f=!0)}catch{}}catch{}const p=typeof window<"u"&&window.isHomePage===!0;let b=Math.abs(e-42.6977)<.01&&Math.abs(t-23.3219)<.01;if(p&&!u&&f&&b){console.log("Saved location exists \u2013 skipping Sofia IP fallback in setUserLocation");return}try{pe=!0}catch{}a.setView([e,t],12);try{l.center={lat:e,lng:t},l.zoom=12}catch{}try{$()}catch{}try{if(p&&kt===!1)return}catch{}try{if(p&&typeof sessionStorage<"u"){var r=parseInt(sessionStorage.getItem("__mirela_suppress_ip_map_load_until")||"",10);if(r>Date.now())return}}catch{}try{try{window.__suppressNextMapAuto=!0}catch{}ae(function(y){try{I.fitMapBoundsSafely(y)}catch{}})}catch{}const _=document.getElementById("mapLeaflet");_&&(_.dataset.userLat=e,_.dataset.userLng=t,_.dataset.userZoom=12)}}};return new go});
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.