PageSourceSearch

https://rockporthomerentals.com/vue/js/MapFavorites.DGwscRuu.js

js rockporthomerentals.com collected 2026-10-06 03:53:36 UTC 4,247 bytes, 1 lines download raw bytes

1import{U as e,q as a}from"./helpers.BJ4JgHvV.js";import{Ct as o,D as t,L as n,X as r,d as l,f as i,ht as s,j as c,k as d,m as p,ot as u,u as m,vt as f}from"./app.BKjpsrfh.js";import{t as v}from"./ramda.COx6mBrZ.js";import{t as k}from"./usePopupZIndexFix.BF_pSMUB.js";import{t as M}from"./useBodyScrollLock.BO44TsuC.js";import{n as S,t as g}from"./MapEl.CjC4KPCS.js";import{n as y,t as b}from"./useFreezeMapOnModal.oL_w-Z4q.js";var _="map-favorites-mobile",I=n({__name:"MapFavorites",props:{coords:{default:()=>[]},units:{default:()=>[]},getUnitParams:{type:Function,default:()=>({})},anchorEl:{default:null},mobileMapOpen:{type:Boolean,default:!1}},emits:["set-map-open"],setup(o,{expose:n,emit:r}){n();const c=o,d=r,{isMobileOr:p}=m(),{browserFontSize:I}=l(),B=t((()=>p.value((e=>e<=102.4))||I.value>10)),h=s(0),z=t((()=>!B.value||c.mobileMapOpen)),E=t((()=>B.value&&c.mobileMapOpen));u(E,((e,a)=>{e!==a&&z.value&&(h.value+=1)}));const{lockBodyScroll:O,unlockBodyScroll:j}=M();u([()=>c.mobileMapOpen,E],(([e,a],[o,t])=>{const n=e&&a,r=o&&t;n&&!r?O(_):!n&&r&&j(_)}));const F=e=>S.divIcon({className:"leaflet-marker-icon leaflet-zoom-animated leaflet-interactive",html:`<i class="fa fa-solid fa-location-dot map-marker-selected" role="img" data-testid="marker-${e.id}" aria-label="Marker ${e.id}"></i>`,iconSize:[32,45],iconAnchor:[16,40]}),L=e=>{document.querySelector(".leaflet-disabled")?.classList.remove("leaflet-disabled"),e.value.getZoom()==e.value.getMaxZoom()&&document.querySelector(".leaflet-control-zoom-in")?.classList.add("leaflet-disabled"),e.value.getZoom()==e.value.getMinZoom()&&document.querySelector(".leaflet-control-zoom-out")?.classList.add("leaflet-disabled")},$=e=>c.units.find((a=>a.id===e||String(a.id)===String(e)||a.globalUuid===String(e)))||null,x=s(null);b(x,f(c,"anchorEl")),k(x,{popupSelectors:[{openSelector:".vhd__datepicker--open",containerSelector:".vhd__datepicker"},{openSelector:'[data-destination-dropdown-open="true"]',containerSelector:"#destination-dropdown-container"}]});const P={props:c,emit:d,isMobileOr:p,browserFontSize:I,isCompactLayout:B,mapRenderKey:h,mapOpen:z,fullScreen:E,lockBodyScroll:O,unlockBodyScroll:j,LOCK_ID:_,markerIcon:e=>S.divIcon({className:"leaflet-marker-icon leaflet-zoom-animated leaflet-interactive",html:`<i class="fa fa-solid fa-location-dot map-marker" role="img" data-testid="marker-${e.id}" aria-label="Marker ${e.id}"></i>`,iconSize:[34,34],iconAnchor:[16,36]}),activeMarkerIcon:F,updateZoomButtons:L,bindMapEvents:e=>{e.value.on("zoomend",(()=>L(e))),e.value.whenReady((()=>{L(e)}))},findUnitById:$,bindMarkerEvents:({marker:o,coordinate:t,markerIcon:n,mapInstance:r})=>{o.bindPopup("Loading..."),o.on("popupopen",(()=>{o.setIcon(F(t))}));let l=null;o.on("popupclose",(()=>{o.setIcon(n),l&&(l(),l=null)})),o.on("click",(async o=>{const n=o.target.getPopup();if(!n)return;n.setContent(`<div id="vue-marker-icon-${t.id}"></div>`);const s=document.getElementById(`vue-marker-icon-${t.id}`),d=$(t.id);if(!s||!d)return;await a((()=>!l),{locationUsage:"MapFavorites",timeout:50}),l=e(y,{data:d,type:"units",unitParams:c.getUnitParams(d.globalUuid)},s,(e=>{e.directive("lazy",i)}));const p=n.getLatLng(),u=n.getElement();if(!p||!u)return;const m=r.value.project(p);m.y-=u.clientHeight,r.value.panTo(r.value.unproject(m),{animate:!0})}))},fitBounds:({mapInstance:e,markerGroup:a})=>{const o=a.value.getBounds();v(o)&&o.isValid()&&e.value.fitBounds(o.pad(.1))},zIndexReductionContainer:x,MapEl:g};return Object.defineProperty(P,"__isScriptSetup",{enumerable:!1,value:!0}),P}});var B=p(I,[["render",function(e,a,t,n,l,i){return r(),c("div",{ref:"zIndexReductionContainer",class:o({[e.$style.container]:!0,[e.$style.fullScreen]:n.fullScreen})},[(r(),d(n.MapEl,{key:n.mapRenderKey,coords:t.coords,"map-open":n.mapOpen,"full-screen":n.fullScreen,"container-height":"510px","marker-icon":n.markerIcon,onSetMapOpen:a[0]||(a[0]=e=>n.emit("set-map-open",e)),onBindMapEvents:n.bindMapEvents,onBindMarkerEvents:n.bindMarkerEvents,onAfterAddMarkers:n.fitBounds},null,8,["coords","map-open","full-screen"]))],2)}],["__cssModules",{$style:{container:"MapFavorites__container--t4fo3lau",fullScreen:"MapFavorites__fullScreen--t4fo3lau"}}],["__file","MapFavorites.vue"]]);export{B as default};

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.