System.register(["./rolldown-runtime-legacy-Djb2rrqm.js","./index-legacy-Bbj6l0yZ.js","./index.modern-legacy-DpYSJnkR.js","./context-BrD4AniQ-legacy-txE7vzzL.js","./constants-DOpa8YMW-legacy-TnabVEaS.js","./esm-Be30MpcN-legacy-D8iPI9WH.js","./esm-k7KI3vER-legacy-DjAkR8OT.js"],function(e,t){var o,n,i,r,l,u,a,s,d,c,f,g,m,p,h,v,y;return e("default",function({children:e}){let[t,o]=(0,p.useState)(!1),[n,i]=(0,p.useState)(!1),{mapProvider:l,mapPadding:u,locale:g,center:m,zoom:T=f.zoom,minZoom:x,maxZoom:j,pitch:P=f.pitch,bearing:b=f.bearing,cooperativeGestures:B=f.cooperativeGestures,zoomPosition:L}=s();return(0,p.useEffect)(()=>{if(!n)return;let e=document.querySelector(".gm-style-moc");e&&u&&(e.style.paddingLeft=`${u.left}px`,e.style.paddingRight=`${u.right}px`)},[n,null==u?void 0:u.left,null==u?void 0:u.right]),"google"===l.name?(0,h.jsx)(a,{apiKey:l.apiKey,language:g,onLoad:()=>{o(!0)},children:t&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y,{isMapLoaded:n}),(0,h.jsx)(r,{mapId:l.theme||d.google,defaultCenter:{lat:m.latitude,lng:m.longitude},defaultBounds:{north:c[3],south:c[1],east:c[2],west:c[0]},defaultZoom:T+1,defaultTilt:P,defaultHeading:b,gestureHandling:B?"cooperative":"greedy",streetViewControl:!1,fullscreenControl:!1,clickableIcons:!1,mapTypeControl:!1,zoomControlOptions:{position:L&&v[L]},minZoom:"number"==typeof x?x+1:void 0,maxZoom:"number"==typeof j?j+1:void 0,onTilesLoaded:()=>{i(!0)},children:e})]})}):null}),{setters:[function(e){o=e.a},function(e){n=e.St,i=e.q},function(e){r=e.o,l=e.r,u=e.s,a=e.t},function(e){s=e.n},function(e){d=e.i,c=e.r,f=e.t},function(e){g=e.n},function(e){m=e.t}],execute:function(){p=o(n(),1),h=i(),v={"top-left":l.LEFT_TOP,"top-right":l.RIGHT_TOP,"bottom-left":l.LEFT_BOTTOM,"bottom-right":l.RIGHT_BOTTOM},y=({isMapLoaded:e})=>{let t=u(),{centerPinMarkerPoints:o,markerPoints:n,locationBoundary:i,setZoom:r,mapPadding:l}=s(),[a,d]=(0,p.useState)(void 0),f=(0,p.useRef)(void 0),h=(0,p.useCallback)(()=>{if(!t)return;let e=t.getZoom();void 0!==e&&r(e+1)},[t,r]);return(0,p.useEffect)(()=>{h();let e=null==t?void 0:t.addListener("zoom_changed",h);return()=>{null==e||e.remove()}},[t,h]),(0,p.useEffect)(()=>{if(!t)return;let e=[];void 0!==i&&i.length>0?e.push(...i):void 0!==n&&n.length>0?(e.push(...n),o&&e.push(o)):void 0!==o&&e.push(o);let r=0===e.length?c:m(g(e));(!f.current||!r.every((e,t)=>{var o;return e===(null===(o=f.current)||void 0===o?void 0:o[t])}))&&(f.current=r,d(r))},[t,n,i,o]),(0,p.useEffect)(()=>{if(!t||void 0===a)return;let[e,o,n,i]=a,r=.1*(n-e)||.001,u=.1*(i-o)||.001;t.fitBounds({south:o-u,west:e-r,north:i+u,east:n+r},l)},[e,t,a,l]),null}}}});
//# sourceMappingURL=Google-D1kMMDIv-legacy-Da_Szxk-.js.map