@omnic/widget-locations 1.1.48 → 1.1.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -260,4 +260,4 @@ PERFORMANCE OF THIS SOFTWARE.
260
260
  <circle cx="120" cy="120" opacity=".3" r="90" />
261
261
  <circle cx="120" cy="120" opacity=".2" r="110" />
262
262
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
263
- </svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Tt.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const u={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(u)}}function hC(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class ql{constructor(){hC(ql,google.maps.OverlayView)}}var Fi;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Fi||(Fi={}));const pC=(t,e,n)=>{n.fitBounds(e.bounds)};class gC extends ql{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new cC(r),renderer:o=new dC,onClusterClick:s=pC}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(Tt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Fi.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||Tt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>Tt.setMap(s,null)))}google.maps.event.trigger(this,Fi.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Tt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new fC(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>Tt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Fi.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),Tt.setMap(r.marker,n)})}}function vC(t){var e=M4(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new gC(K(K({},t),{map:e}));i(o)}},[e]),r}function mC(t){var e=t.children,n=t.options,r=vC(n);return r!==null?e(r):null}c.memo(mC);var zc={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Hc={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function yC(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),L=C[0],m=C[1],_=c.useState(null),E=_[0],p=_[1],b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),M(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){var N=new google.maps.InfoWindow(K({},r||{}));return w(N),V.current=document.createElement("div"),s&&m(google.maps.event.addListener(N,"closeclick",s)),a&&p(google.maps.event.addListener(N,"domready",a)),l&&M(google.maps.event.addListener(N,"content_changed",l)),u&&P(google.maps.event.addListener(N,"position_changed",u)),f&&B(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(V.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):Ye(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(N),function(){L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),T&&google.maps.event.removeListener(T),I&&google.maps.event.removeListener(I),h&&h(N),N.close()}},[]),V.current?ti.createPortal(c.Children.only(e),V.current):null}c.memo(yC);var gp=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):Ye(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(K({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:Hc,eventMap:zc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Hc,eventMap:zc,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(he(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ti.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e}(c.PureComponent),$c={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Wc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},bC={};function CC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onLoad,L=t.onUnmount,m=c.useContext(le),_=c.useState(null),E=_[0],p=_[1],b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1];return c.useEffect(function(){E!==null&&E.setMap(m)},[m]),c.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),c.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),c.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),c.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),c.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),c.useEffect(function(){E&&s&&(x!==null&&google.maps.event.removeListener(x),M(google.maps.event.addListener(E,"dblclick",s)))},[s]),c.useEffect(function(){E&&a&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(E,"dragend",a)))},[a]),c.useEffect(function(){E&&l&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(E,"dragstart",l)))},[l]),c.useEffect(function(){E&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(E,"mousedown",u)))},[u]),c.useEffect(function(){E&&f&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(E,"mousemove",f)))},[f]),c.useEffect(function(){E&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(E,"mouseout",d)))},[d]),c.useEffect(function(){E&&h&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(E,"mouseover",h)))},[h]),c.useEffect(function(){E&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(E,"mouseup",v)))},[v]),c.useEffect(function(){E&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(E,"rightclick",y)))},[y]),c.useEffect(function(){E&&g&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(E,"click",g)))},[g]),c.useEffect(function(){E&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(E,"drag",w)))},[w]),c.useEffect(function(){var ie=new google.maps.Polyline(K(K({},e||bC),{map:m}));return o&&ie.setPath(o),typeof i<"u"&&ie.setVisible(i),typeof r<"u"&&ie.setEditable(r),typeof n<"u"&&ie.setDraggable(n),s&&M(google.maps.event.addListener(ie,"dblclick",s)),a&&P(google.maps.event.addListener(ie,"dragend",a)),l&&B(google.maps.event.addListener(ie,"dragstart",l)),u&&z(google.maps.event.addListener(ie,"mousedown",u)),f&&H(google.maps.event.addListener(ie,"mousemove",f)),d&&te(google.maps.event.addListener(ie,"mouseout",d)),h&&pe(google.maps.event.addListener(ie,"mouseover",h)),v&&De(google.maps.event.addListener(ie,"mouseup",v)),y&&_e(google.maps.event.addListener(ie,"rightclick",y)),g&&Me(google.maps.event.addListener(ie,"click",g)),w&&je(google.maps.event.addListener(ie,"drag",w)),p(ie),C&&C(ie),function(){x!==null&&google.maps.event.removeListener(x),T!==null&&google.maps.event.removeListener(T),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),L&&L(ie),ie.setMap(null)}},[]),null}c.memo(CC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Wc,eventMap:$c,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Wc,eventMap:$c,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),he(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Gc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function wC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,L=t.onLoad,m=t.onUnmount,_=t.onEdit,E=c.useContext(le),p=c.useState(null),b=p[0],x=p[1],M=c.useState(null),O=M[0],T=M[1],P=c.useState(null),R=P[0],I=P[1],B=c.useState(null),V=B[0],N=B[1],z=c.useState(null),Y=z[0],G=z[1],H=c.useState(null),Q=H[0],oe=H[1],te=c.useState(null),ee=te[0],D=te[1],pe=c.useState(null),Pe=pe[0],Z=pe[1],De=c.useState(null),Ae=De[0],ue=De[1],_e=c.useState(null),Ve=_e[0],Ce=_e[1],Me=c.useState(null),Ie=Me[0],ke=Me[1],je=c.useState(null),ie=je[0],We=je[1];return c.useEffect(function(){b!==null&&b.setMap(E)},[E]),c.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),c.useEffect(function(){typeof o<"u"&&b!==null&&b.setPath(o)},[b,o]),c.useEffect(function(){typeof s<"u"&&b!==null&&b.setPaths(s)},[b,s]),c.useEffect(function(){b&&a&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),c.useEffect(function(){b&&(google.maps.event.addListener(b.getPath(),"insert_at",function(){_==null||_(b)}),google.maps.event.addListener(b.getPath(),"set_at",function(){_==null||_(b)}))},[b,_]),c.useEffect(function(){b&&l&&(R!==null&&google.maps.event.removeListener(R),I(google.maps.event.addListener(b,"dragend",l)))},[l]),c.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&f&&(Y!==null&&google.maps.event.removeListener(Y),G(google.maps.event.addListener(b,"mousedown",f)))},[f]),c.useEffect(function(){b&&d&&(Q!==null&&google.maps.event.removeListener(Q),oe(google.maps.event.addListener(b,"mousemove",d)))},[d]),c.useEffect(function(){b&&h&&(ee!==null&&google.maps.event.removeListener(ee),D(google.maps.event.addListener(b,"mouseout",h)))},[h]),c.useEffect(function(){b&&v&&(Pe!==null&&google.maps.event.removeListener(Pe),Z(google.maps.event.addListener(b,"mouseover",v)))},[v]),c.useEffect(function(){b&&y&&(Ae!==null&&google.maps.event.removeListener(Ae),ue(google.maps.event.addListener(b,"mouseup",y)))},[y]),c.useEffect(function(){b&&g&&(Ve!==null&&google.maps.event.removeListener(Ve),Ce(google.maps.event.addListener(b,"rightclick",g)))},[g]),c.useEffect(function(){b&&w&&(Ie!==null&&google.maps.event.removeListener(Ie),ke(google.maps.event.addListener(b,"click",w)))},[w]),c.useEffect(function(){b&&C&&(ie!==null&&google.maps.event.removeListener(ie),We(google.maps.event.addListener(b,"drag",C)))},[C]),c.useEffect(function(){var re=new google.maps.Polygon(K(K({},e||{}),{map:E}));return o&&re.setPath(o),s&&re.setPaths(s),typeof i<"u"&&re.setVisible(i),typeof r<"u"&&re.setEditable(r),typeof n<"u"&&re.setDraggable(n),a&&T(google.maps.event.addListener(re,"dblclick",a)),l&&I(google.maps.event.addListener(re,"dragend",l)),u&&N(google.maps.event.addListener(re,"dragstart",u)),f&&G(google.maps.event.addListener(re,"mousedown",f)),d&&oe(google.maps.event.addListener(re,"mousemove",d)),h&&D(google.maps.event.addListener(re,"mouseout",h)),v&&Z(google.maps.event.addListener(re,"mouseover",v)),y&&ue(google.maps.event.addListener(re,"mouseup",y)),g&&Ce(google.maps.event.addListener(re,"rightclick",g)),w&&ke(google.maps.event.addListener(re,"click",w)),C&&We(google.maps.event.addListener(re,"drag",C)),x(re),L&&L(re),function(){O!==null&&google.maps.event.removeListener(O),R!==null&&google.maps.event.removeListener(R),V!==null&&google.maps.event.removeListener(V),Y!==null&&google.maps.event.removeListener(Y),Q!==null&&google.maps.event.removeListener(Q),ee!==null&&google.maps.event.removeListener(ee),Pe!==null&&google.maps.event.removeListener(Pe),Ae!==null&&google.maps.event.removeListener(Ae),Ve!==null&&google.maps.event.removeListener(Ve),Ie!==null&&google.maps.event.removeListener(Ie),m&&m(re),re.setMap(null)}},[]),null}c.memo(wC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Zc,eventMap:Gc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Zc,eventMap:Gc,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),he(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var qc={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Kc={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function SC(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onBoundsChanged,L=t.onLoad,m=t.onUnmount,_=c.useContext(le),E=c.useState(null),p=E[0],b=E[1],x=c.useState(null),M=x[0],O=x[1],T=c.useState(null),P=T[0],R=T[1],I=c.useState(null),B=I[0],V=I[1],N=c.useState(null),z=N[0],Y=N[1],G=c.useState(null),H=G[0],Q=G[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),pe=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],Ce=c.useState(null),Me=Ce[0],Ie=Ce[1],ke=c.useState(null),je=ke[0],ie=ke[1],We=c.useState(null),re=We[0],tt=We[1];return c.useEffect(function(){p!==null&&p.setMap(_)},[_]),c.useEffect(function(){typeof e<"u"&&p!==null&&p.setOptions(e)},[p,e]),c.useEffect(function(){typeof r<"u"&&p!==null&&p.setDraggable(r)},[p,r]),c.useEffect(function(){typeof i<"u"&&p!==null&&p.setEditable(i)},[p,i]),c.useEffect(function(){typeof o<"u"&&p!==null&&p.setVisible(o)},[p,o]),c.useEffect(function(){typeof n<"u"&&p!==null&&p.setBounds(n)},[p,n]),c.useEffect(function(){p&&s&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(p,"dblclick",s)))},[s]),c.useEffect(function(){p&&a&&(P!==null&&google.maps.event.removeListener(P),R(google.maps.event.addListener(p,"dragend",a)))},[a]),c.useEffect(function(){p&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(p,"dragstart",l)))},[l]),c.useEffect(function(){p&&u&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(p,"mousedown",u)))},[u]),c.useEffect(function(){p&&f&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(p,"mousemove",f)))},[f]),c.useEffect(function(){p&&d&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(p,"mouseout",d)))},[d]),c.useEffect(function(){p&&h&&(pe!==null&&google.maps.event.removeListener(pe),Pe(google.maps.event.addListener(p,"mouseover",h)))},[h]),c.useEffect(function(){p&&v&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(p,"mouseup",v)))},[v]),c.useEffect(function(){p&&y&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(p,"rightclick",y)))},[y]),c.useEffect(function(){p&&g&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(p,"click",g)))},[g]),c.useEffect(function(){p&&w&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(p,"drag",w)))},[w]),c.useEffect(function(){p&&C&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(p,"bounds_changed",C)))},[C]),c.useEffect(function(){var q=new google.maps.Rectangle(K(K({},e||{}),{map:_}));return typeof o<"u"&&q.setVisible(o),typeof i<"u"&&q.setEditable(i),typeof r<"u"&&q.setDraggable(r),typeof n<"u"&&q.setBounds(n),s&&O(google.maps.event.addListener(q,"dblclick",s)),a&&R(google.maps.event.addListener(q,"dragend",a)),l&&V(google.maps.event.addListener(q,"dragstart",l)),u&&Y(google.maps.event.addListener(q,"mousedown",u)),f&&Q(google.maps.event.addListener(q,"mousemove",f)),d&&ee(google.maps.event.addListener(q,"mouseout",d)),h&&Pe(google.maps.event.addListener(q,"mouseover",h)),v&&Ae(google.maps.event.addListener(q,"mouseup",v)),y&&Ve(google.maps.event.addListener(q,"rightclick",y)),g&&Ie(google.maps.event.addListener(q,"click",g)),w&&ie(google.maps.event.addListener(q,"drag",w)),C&&tt(google.maps.event.addListener(q,"bounds_changed",C)),b(q),L&&L(q),function(){M!==null&&google.maps.event.removeListener(M),P!==null&&google.maps.event.removeListener(P),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),pe!==null&&google.maps.event.removeListener(pe),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),m&&m(q),q.setMap(null)}},[]),null}c.memo(SC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),he(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Qc={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Jc={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},LC={};function xC(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,L=t.onCenterChanged,m=t.onRadiusChanged,_=t.onLoad,E=t.onUnmount,p=c.useContext(le),b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),We=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],Ge=tt[1],ze=c.useState(null),bt=ze[0],ut=ze[1];return c.useEffect(function(){x!==null&&x.setMap(p)},[p]),c.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),c.useEffect(function(){typeof i<"u"&&x!==null&&x.setDraggable(i)},[x,i]),c.useEffect(function(){typeof o<"u"&&x!==null&&x.setEditable(o)},[x,o]),c.useEffect(function(){typeof s<"u"&&x!==null&&x.setVisible(s)},[x,s]),c.useEffect(function(){typeof r=="number"&&x!==null&&x.setRadius(r)},[x,r]),c.useEffect(function(){typeof n<"u"&&x!==null&&x.setCenter(n)},[x,n]),c.useEffect(function(){x&&a&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(x,"dblclick",a)))},[a]),c.useEffect(function(){x&&l&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(x,"dragend",l)))},[l]),c.useEffect(function(){x&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(x,"dragstart",u)))},[u]),c.useEffect(function(){x&&f&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(x,"mousedown",f)))},[f]),c.useEffect(function(){x&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(x,"mousemove",d)))},[d]),c.useEffect(function(){x&&h&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(x,"mouseout",h)))},[h]),c.useEffect(function(){x&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(x,"mouseover",v)))},[v]),c.useEffect(function(){x&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(x,"mouseup",y)))},[y]),c.useEffect(function(){x&&g&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(x,"rightclick",g)))},[g]),c.useEffect(function(){x&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(x,"click",w)))},[w]),c.useEffect(function(){x&&C&&(We!==null&&google.maps.event.removeListener(We),re(google.maps.event.addListener(x,"drag",C)))},[C]),c.useEffect(function(){x&&L&&(q!==null&&google.maps.event.removeListener(q),Ge(google.maps.event.addListener(x,"center_changed",L)))},[w]),c.useEffect(function(){x&&m&&(bt!==null&&google.maps.event.removeListener(bt),ut(google.maps.event.addListener(x,"radius_changed",m)))},[m]),c.useEffect(function(){var se=new google.maps.Circle(K(K({},e||LC),{map:p}));return typeof r=="number"&&se.setRadius(r),typeof n<"u"&&se.setCenter(n),typeof r=="number"&&se.setRadius(r),typeof s<"u"&&se.setVisible(s),typeof o<"u"&&se.setEditable(o),typeof i<"u"&&se.setDraggable(i),a&&P(google.maps.event.addListener(se,"dblclick",a)),l&&B(google.maps.event.addListener(se,"dragend",l)),u&&z(google.maps.event.addListener(se,"dragstart",u)),f&&H(google.maps.event.addListener(se,"mousedown",f)),d&&te(google.maps.event.addListener(se,"mousemove",d)),h&&pe(google.maps.event.addListener(se,"mouseout",h)),v&&De(google.maps.event.addListener(se,"mouseover",v)),y&&_e(google.maps.event.addListener(se,"mouseup",y)),g&&Me(google.maps.event.addListener(se,"rightclick",g)),w&&je(google.maps.event.addListener(se,"click",w)),C&&re(google.maps.event.addListener(se,"drag",C)),L&&Ge(google.maps.event.addListener(se,"center_changed",L)),m&&ut(google.maps.event.addListener(se,"radius_changed",m)),M(se),_&&_(se),function(){T!==null&&google.maps.event.removeListener(T),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),ke!==null&&google.maps.event.removeListener(ke),q!==null&&google.maps.event.removeListener(q),bt!==null&&google.maps.event.removeListener(bt),E&&E(se),se.setMap(null)}},[]),null}c.memo(xC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),he(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Yc={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Xc={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function EC(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,u=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,h=t.onRemoveProperty,v=t.onSetGeometry,y=t.onSetProperty,g=t.onLoad,w=t.onUnmount,C=c.useContext(le),L=c.useState(null),m=L[0],_=L[1],E=c.useState(null),p=E[0],b=E[1],x=c.useState(null),M=x[0],O=x[1],T=c.useState(null),P=T[0],R=T[1],I=c.useState(null),B=I[0],V=I[1],N=c.useState(null),z=N[0],Y=N[1],G=c.useState(null),H=G[0],Q=G[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),pe=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],Ce=c.useState(null),Me=Ce[0],Ie=Ce[1],ke=c.useState(null),je=ke[0],ie=ke[1],We=c.useState(null),re=We[0],tt=We[1];return c.useEffect(function(){m!==null&&m.setMap(C)},[C]),c.useEffect(function(){m&&r&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(m,"dblclick",r)))},[r]),c.useEffect(function(){m&&i&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(m,"mousedown",i)))},[i]),c.useEffect(function(){m&&o&&(P!==null&&google.maps.event.removeListener(P),R(google.maps.event.addListener(m,"mousemove",o)))},[o]),c.useEffect(function(){m&&s&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(m,"mouseout",s)))},[s]),c.useEffect(function(){m&&a&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(m,"mouseover",a)))},[a]),c.useEffect(function(){m&&l&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(m,"mouseup",l)))},[l]),c.useEffect(function(){m&&u&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(m,"rightclick",u)))},[u]),c.useEffect(function(){m&&n&&(pe!==null&&google.maps.event.removeListener(pe),Pe(google.maps.event.addListener(m,"click",n)))},[n]),c.useEffect(function(){m&&f&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(m,"addfeature",f)))},[f]),c.useEffect(function(){m&&d&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(m,"removefeature",d)))},[d]),c.useEffect(function(){m&&h&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(m,"removeproperty",h)))},[h]),c.useEffect(function(){m&&v&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(m,"setgeometry",v)))},[v]),c.useEffect(function(){m&&y&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(m,"setproperty",y)))},[y]),c.useEffect(function(){if(C!==null){var q=new google.maps.Data(K(K({},e||{}),{map:C}));r&&b(google.maps.event.addListener(q,"dblclick",r)),i&&O(google.maps.event.addListener(q,"mousedown",i)),o&&R(google.maps.event.addListener(q,"mousemove",o)),s&&V(google.maps.event.addListener(q,"mouseout",s)),a&&Y(google.maps.event.addListener(q,"mouseover",a)),l&&Q(google.maps.event.addListener(q,"mouseup",l)),u&&ee(google.maps.event.addListener(q,"rightclick",u)),n&&Pe(google.maps.event.addListener(q,"click",n)),f&&Ae(google.maps.event.addListener(q,"addfeature",f)),d&&Ve(google.maps.event.addListener(q,"removefeature",d)),h&&Ie(google.maps.event.addListener(q,"removeproperty",h)),v&&ie(google.maps.event.addListener(q,"setgeometry",v)),y&&tt(google.maps.event.addListener(q,"setproperty",y)),_(q),g&&g(q)}return function(){m&&(p!==null&&google.maps.event.removeListener(p),M!==null&&google.maps.event.removeListener(M),P!==null&&google.maps.event.removeListener(P),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),pe!==null&&google.maps.event.removeListener(pe),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),w&&w(m),m.setMap(null))}},[]),null}c.memo(EC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),he(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var ef={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},tf={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),he(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function vp(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function _C(t,e){return new e(t.lat,t.lng)}function MC(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function OC(t,e,n){return t instanceof e?t:n(t,e)}function PC(t,e,n){return t instanceof e?t:n(t,e)}function kC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function TC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function mp(t,e,n,r){return n!==void 0?kC(t,e,PC(n,google.maps.LatLngBounds,MC)):TC(t,e,OC(r,google.maps.LatLng,_C))}function RC(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function DC(t,e,n,r,i){var o=function(s){Ue(a,s);function a(l,u,f,d){var h=s.call(this)||this;return h.container=l,h.pane=u,h.position=f,h.bounds=d,h}return a.prototype.onAdd=function(){var l,u=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];u==null||u.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),u=K({},this.container?vp(this.container,i):{x:0,y:0}),f=mp(l,u,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],g=v[1];this.container.style[y]=g}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function nf(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function rf(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function AC(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,u=c.useContext(le),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=c.useMemo(function(){return DC(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(d),d==null||d.setMap(u),function(){s==null||s(d),d==null||d.setMap(null)}},[u,d]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Af.createPortal(l,f)}c.memo(AC);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();Ye(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=K({x:0,y:0},r.containerRef.current?vp(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=mp(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,u=l.left,f=l.top,d=l.width,h=l.height;RC(a,{left:u,top:f,width:d,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=nf(n.position),i=nf(this.props.position),o=rf(n.bounds),s=rf(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Af.createPortal(S.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=le,e})(c.PureComponent);function IC(){}var of={onDblClick:"dblclick",onClick:"click"},sf={opacity:function(t,e){t.setOpacity(e)}};function jC(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(le),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,K({},r));return l},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}c.memo(jC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:sf,eventMap:of,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:sf,eventMap:of,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:IC},e.contextType=le,e})(c.PureComponent);var af={},lf={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function NC(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(le),s=c.useState(null),a=s[0],l=s[1];return c.useEffect(function(){google.maps.visualization||Ye(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){Ye(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(function(){var u=new google.maps.visualization.HeatmapLayer(K(K({},i||{}),{data:e,map:o}));return l(u),n&&n(u),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(NC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){Ye(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Ye(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(K(K({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),he(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var uf={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},cf={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),he(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(c.PureComponent);var ff={onDirectionsChanged:"directions_changed"},df={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),he(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return S.jsx(S.Fragment,{})},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(c.PureComponent);var hf={onPlacesChanged:"places_changed"},pf={bounds:function(t,e){t.setBounds(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(Ye(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),he(this.registeredEvents))},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=le,e})(c.PureComponent);var gf={onPlaceChanged:"place_changed"},vf={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;Ye(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&he(this.registeredEvents)},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=le,e})(c.PureComponent);const BC="LocationBalloon-module__root__GtUl6q",FC="LocationBalloon-module__submit__lNcF4k",UC="LocationBalloon-module__details__--VOKk",VC="LocationBalloon-module__icon__X7DOVA",zC="LocationBalloon-module__header__5VQJDW",HC="LocationBalloon-module__titleContainer__BAO73U",$C="LocationBalloon-module__title__bX9pf8",WC="LocationBalloon-module__description__htav7b",GC="LocationBalloon-module__actions__c8dlOR",ZC="LocationBalloon-module__close__7Ujvya",Jt={root:BC,submit:FC,details:UC,icon:VC,header:zC,titleContainer:HC,title:$C,description:WC,actions:GC,close:ZC},qC={default:Od,llama:Pd},KC=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onCloseClick:s,onDetails:a,onSubmit:l})=>{var g;const{logo:u="default"}=Xe(),{isLoading:f,lmsData:d}=Ts(),h=(g=d==null?void 0:d.location)==null?void 0:g.what3words,v=!!(h!=null&&h.id),y=qC[u];return S.jsxs("div",{className:Se(Jt.root,e),children:[S.jsxs("div",{className:Jt.header,children:[S.jsxs("div",{className:Jt.titleContainer,children:[f?S.jsx(_t,{circle:!0,width:40,height:40}):S.jsx("div",{className:Jt.icon,children:S.jsx(y,{})}),f?S.jsx(_t,{width:200}):S.jsx("span",{className:Jt.title,children:o||"{{ properties.point.name }}"})]}),S.jsx("div",{className:Jt.close,children:S.jsx(ri,{position:"relative",onClick:s})})]}),S.jsxs("div",{className:Jt.description,children:[f?S.jsx(_t,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",f?S.jsx(_t,{width:300}):i||"{{ properties.point.location_name }}"]}),f?S.jsx(_t,{width:150}):v&&S.jsx(zd,{what3words:h}),S.jsxs("div",{className:Jt.actions,children:[S.jsx(Bt,{id:Jp,variant:"primary",className:Jt.submit,disabled:f,onClick:l,children:t?"{ choose }":S.jsx(tr,{keyName:"choose",ns:"common"})}),!n&&S.jsxs(Bt,{id:Bf,as:"link",variant:"primary",className:Jt.details,disabled:f,onClick:a,children:[t?"{ details }":S.jsx(tr,{keyName:"details",ns:"common"}),S.jsx($h,{})]})]})]})},QC=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffcc00"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{hue:"#ff0000"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#c2c4c4"},{visibility:"on"}]}];function JC(t="#ffcc00"){return[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{visibility:"on"},{hue:"#ff0000"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.man_made",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{lightness:"100"}]},{featureType:"landscape.natural",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.landcover",elementType:"geometry.fill",stylers:[{visibility:"on"}]},{featureType:"landscape.natural.terrain",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.natural.terrain",elementType:"geometry.fill",stylers:[{visibility:"off"},{lightness:"23"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:t}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:t},{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#cccccc"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]}]}const YC={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},yp={optimized:!0},XC=({clusterer:t,handleCloseClick:e,handleDetailsClick:n,handlePointClick:r,handleSubmitClick:i,point:o})=>{const[s,a]=c.useState(null),{hideDetails:l,iconType:u,palette:f}=Xe(),{closeSamePoints:d}=sn(),h=on(x=>x.location),v=(f==null?void 0:f.primary)||"#fc0",y=u==="omni-llama"?kt.PinLlama:kt.PinOmnic,g=s==null?void 0:s.getVisible(),w=!!o&&(h==null?void 0:h.uid)===o.uid,C=vr("screenSm"),{isIdle:L}=be(),m=Tl({isSelectedPoint:w}),_=L&&w&&m&&g,E=c.useMemo(()=>{let x;if(o.type===30)switch(u){case"omni-llama":{w?x=kt.PinLlamaSelected:x=kt.PinLlama;break}case"we-chip":{w?x=kt.PinWeChipSelected:x=kt.PinWeChip;break}default:{w?x=kt.PinOmnicSelected:x=Pr(y,v);break}}else w?x=Pr(kt.PinPvz,"--owl-color-black"):x=Pr(kt.PinPvz,"--owl-color-grey-80");return yn(x,"Icon url is not defined"),{url:Pl(x)}},[o.type,w,u,y,v]),p=c.useMemo(()=>({lat:o.location.latitude,lng:o.location.longitude}),[o.location.latitude,o.location.longitude]),b=()=>{d(),r(o)};return S.jsx(up,{noClustererRedraw:!0,icon:E,position:p,clusterer:t,options:yp,onLoad:a,onClick:b,children:_&&!C&&S.jsx(gp,{children:S.jsx(KC,{...o,hideDetails:l,className:ot.balloon,onCloseClick:e,onSubmit:()=>i(o),onDetails:()=>n(o)})})},o.uid)},e5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=sn(),{onSamePointsClusterClick:i}=Xe();return S.jsx(X4,{zoomOnClick:!1,clusterClass:ot.cluster,onClick:o=>{t();const a=o.getMarkers().map(d=>{var h,v;return{lat:(h=d.getPosition())==null?void 0:h.lat(),lng:(v=d.getPosition())==null?void 0:v.lng()}}),{lat:l,lng:u}=a[0];if(a.every(d=>d.lat===l&&d.lng===u)){const d=e.filter(({location:{latitude:h,longitude:v}})=>h===l&&v===u);r(d),i==null||i(d)}else{const d=o.getMap();if(d instanceof google.maps.Map){const h=new window.google.maps.LatLngBounds;o.getMarkers().forEach(v=>{h.extend(v.getPosition())}),d.fitBounds(h)}}},onClusteringEnd:()=>{setTimeout(()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.addEventListener("touchstart",_a,{passive:!0})},100)},onUnmount:()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.removeEventListener("touchstart",_a)},children:o=>S.jsx(S.Fragment,{children:e.map((s,a)=>S.jsx(XC,{clusterer:o,point:s,handleCloseClick:t,...n},s.uid+a))})})},t5=c.memo(e5),n5=t=>{const{locale:e}=Xe(),n=sn(cm),r=qt(Md),i=JSON.stringify([n.length,e,r==null?void 0:r.place_id]);return S.jsx(t5,{points:n,...t},i)},r5=c.memo(n5),bp=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},U.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),U.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),U.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),i5="DeliveryBalloon-module__root__Nu90iy",o5="DeliveryBalloon-module__details__eqUTaI",s5="DeliveryBalloon-module__header__JVdyxN",a5="DeliveryBalloon-module__title__-zKKCt",l5="DeliveryBalloon-module__description__no5-ki",u5="DeliveryBalloon-module__actions__C-N0H-",c5="DeliveryBalloon-module__errorVariant__e6uhZl",f5="DeliveryBalloon-module__logo__62gC5h",xn={root:i5,details:o5,header:s5,title:a5,description:l5,actions:u5,errorVariant:c5,logo:f5},d5=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const l=a==="error",u=a==="default",f=t?"{ courier_balloon.title }":S.jsx(tr,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":S.jsx(tr,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":S.jsx(tr,{keyName:"error_description",ns:"courier_balloon"});return S.jsxs("div",{className:Se(xn.root,n,xn[`${a}Variant`]),children:[S.jsxs("div",{className:xn.header,children:[S.jsx(bp,{className:xn.logo}),S.jsx("span",{className:xn.title,children:l?d:f}),r&&S.jsx(ri,{onClick:o})]}),S.jsx("div",{className:xn.description,children:l?h:e||"{{ properties.address }}"}),u&&!i&&S.jsx("div",{className:xn.actions,children:S.jsx(Bt,{id:Bf,as:"button",variant:"primary",className:xn.details,onClick:s,children:t?"{ details }":S.jsx(tr,{keyName:"details",ns:"common"})})})]})},h5="Chip-module__root__zsoSyP",p5="Chip-module__active__BlTSFB",mf={root:h5,active:p5},yf=({active:t,children:e,className:n,...r})=>S.jsx("div",{...r,className:Se(mf.root,n,{[mf.active]:t}),children:e}),g5="TextArea-module__root__8YFknR",v5={root:g5},bf=c.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=c.useRef(null);c.useImperativeHandle(s,()=>({focus:()=>{var u,f;(u=a.current)==null||u.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var u,f;(u=a.current)==null||u.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:u=>{r&&r({target:{value:u}}),a.current&&(a.current.value=u)}}),[n,r,i]);const l=wp(e,a);return S.jsx("textarea",{...o,ref:l,className:Se(v5.root,t),onBlur:n,onFocus:i,onChange:r})}),m5=({hideDeliveryTime:t,set:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(t||!!i.delivery_time)&&!!i.apartment_number},e==null||e(i),i},y5="DeliveryDetailsView-module__title__azeoUr",b5="DeliveryDetailsView-module__logo__4zZtpM",C5="DeliveryDetailsView-module__header__oDE9He",w5="DeliveryDetailsView-module__content__6P27SY",S5="DeliveryDetailsView-module__section__2M3Qip",L5="DeliveryDetailsView-module__chips__KmYgha",x5="DeliveryDetailsView-module__actions__43XZ-V",E5="DeliveryDetailsView-module__submit__58LKBw",_5="DeliveryDetailsView-module__actionsHidden__SW-67b",M5="DeliveryDetailsView-module__commentSection__GlX1A2",O5="DeliveryDetailsView-module__comment__2pGG6h",Lt={title:y5,logo:b5,header:C5,content:w5,section:S5,chips:L5,actions:x5,submit:E5,actionsHidden:_5,commentSection:M5,comment:O5},P5=c.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:u}=Xe(),{t:f}=ln(["details_modal","courier_balloon","common"]),d=c.useMemo(()=>m5({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=c.useState(!1),[y,g]=c.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),w=c.useCallback(async()=>{v(!0);try{yn(n.address,"Address is required");const b=await Fp({address:n.address,algorithm:10,service:10,language:u||Ff});if(!vd(b))return;const x=b==null?void 0:b.data.data,M={...y,address:x};return o==null||o(M),M}finally{v(!1)}},[u,n.address,o,y]);c.useImperativeHandle(s,()=>({submit:w}),[w]);const C=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},L=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=Ss(l==null?void 0:l.apartment),E=Ss(l==null?void 0:l.comment);return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(Lt.header,t==null?void 0:t.header),children:[S.jsx(ri,{onClick:i}),S.jsxs("div",{className:Lt.title,children:[S.jsx(bp,{className:Lt.logo}),S.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),S.jsxs("div",{className:Se(Lt.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("address"),":"]}),S.jsx("p",{children:n.address})]}),!a&&S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("delivery_time"),":"]}),S.jsxs("div",{className:Lt.chips,children:[S.jsx(yf,{active:y.delivery_time==="8:00-13:00",onClick:C("8:00-13:00"),children:"8:00 - 13:00"}),S.jsx(yf,{active:y.delivery_time==="14:00-22:00",onClick:C("14:00-22:00"),children:"14:00 - 22:00"})]})]}),S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("apartment_number"),":"]}),S.jsx(bf,{..._,rows:1,onChange:L})]}),S.jsxs("section",{className:Se(Lt.section,Lt.commentSection),children:[S.jsxs("span",{children:[f("comment"),":"]}),S.jsx(bf,{...E,className:Lt.comment,onChange:m})]})]}),S.jsx("div",{className:Se(Lt.actions,{[Lt.actionsHidden]:e}),children:S.jsx(Bt,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:Lt.submit,onClick:w,children:f("choose",{ns:"common"})})})]})}),Cp=c.memo(P5),k5={header:ot.deliveryDetailsViewHeader,content:ot.deliveryDetailsViewContent},T5=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Tl({isSelectedPoint:!0}),a=c.useRef(null),[l,u]=c.useState(!1),[f,d]=c.useState({...r,comment:"",delivery_time:"",apartment_number:""});c.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=c.useState(null),y=vr("screenSm"),g=c.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),w=()=>{o==null||o(!0)},C=()=>{i==null||i(null)},L=c.useMemo(()=>({url:Pl(Pr(kt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Yp)}),[]),m=async()=>{var b;try{u(!0);const x=await((b=a.current)==null?void 0:b.submit());if(!x)return;n==null||n(x),o==null||o(!1),i==null||i(null)}finally{u(!1)}},_=S.jsx(d5,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:ot.balloon,onDetails:w,onClose:C}),E=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return S.jsxs(up,{noClustererRedraw:!0,icon:L,position:g,options:yp,onLoad:v,children:[y&&S.jsxs(zh,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:C,onSubmitClick:m,children:[f.address&&S.jsx(Cp,{ref:a,hideActions:!0,classes:k5,location:r,onChange:d,onClose:C}),!f.address&&_]}),!y&&E&&S.jsx(gp,{onCloseClick:C,children:_})]})},R5=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o,palette:s}=Xe(),a=s==null?void 0:s.primary;function l(){switch(o){case"omnic":return QC;case"omnic-light":return JC(a);default:return}}const u=l(),f=c.useMemo(()=>{var h,v;return{lat:((h=i==null?void 0:i.center)==null?void 0:h[0])??ya[0],lng:((v=i==null?void 0:i.center)==null?void 0:v[1])??ya[1]}},[i==null?void 0:i.center]),d=c.useCallback(async h=>{const{latLng:v}=h;if(!v||r)return;be.getState().setDetailsOpen(!1),on.getState().setSelectedLocation(null);const y=[v.lat(),v.lng()];console.debug("[OmnicLocationsWidget::mapClick]",y);try{await qt.getState().setPlaceAndPoint(y)}catch{Ot.getState().setDeliverPoint({address:null,coords:y})}},[r]);return S.jsx(A4,{zoom:i==null?void 0:i.initialZoom,center:f,mapContainerClassName:Se(ot.root,e),options:{styles:u,...YC},onClick:d,...n,children:t})},D5=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),U.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),U.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),U.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),U.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),A5=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(ot.mapControl),n.classList.add(ot.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},I5=t=>{const e=document.createElement("div");e.classList.add(ot.mapControl),e.classList.add(ot.geolocationControl),e.innerHTML=zp.renderToString(S.jsx(D5,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{Ol(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await qt.getState().setPlaceAndPoint(o)})})},j5=({className:t})=>{const e=Vn(),n=be(Gf),r=be(Dg),i=sn(yd),o=Ot(Cl),{lmsData:s}=Ts(),{disableGeolocation:a,hideDeliveryTime:l,hideDetails:u,hideMapControls:f,onPointClick:d,skipPointInfo:h}=Xe(),v=c.useCallback(M=>{console.debug("[OmnicLocationsWidget::loadMap]",M),be.getState().setMap(M),f||(A5(M),a||I5(M))},[a,f]),y=c.useCallback(M=>{const O=s==null?void 0:s.location.what3words,T=O!=null&&O.id?O:void 0;d==null||d(M,T)},[d,s]),g=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),be.getState().setMap(null)},[]),w=c.useCallback(()=>{if(be.getState().setIdle(!0),!n)return;const M=n==null?void 0:n.getBounds();M&&(console.debug("[OmnicLocationsWidget::changeBounds]",M),sn.getState().loadNext([[M.getSouthWest().lat(),M.getNorthEast().lat()],[M.getSouthWest().lng(),M.getNorthEast().lng()]],e))},[e,n]),C=c.useCallback(async M=>{if(Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(M),!M)return;const O=[M.location.latitude,M.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",O),await qt.getState().setPlace(O)},[]),L=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),m=be.getState().setDetailsOpen,{getLMSData:_}=S4(),E=M=>{if(_(M.code),h){y(M);return}m(!1),C(M)},p=()=>{m(!1),C(null)},b=M=>{m(!0),C(M)},x=M=>{y(M),m(!1),C(null)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(ot.mapContainer,t),children:[S.jsxs(R5,{onIdle:w,onLoad:v,onUnmount:g,onTilesLoaded:L,onBoundsChanged:()=>{be.getState().setIdle(!1)},children:[o&&S.jsx(T5,{hideDeliveryTime:l,hideDetails:u,point:o,setOpenDetails:be.getState().setDetailsOpen,setDeliveryPoint:Ot.getState().setDeliverPoint,onPointClick:y}),S.jsx(r5,{handleCloseClick:p,handleDetailsClick:b,handlePointClick:E,handleSubmitClick:x})]}),(i||r)&&S.jsx(Hh,{className:ot.overlay,children:S.jsx(as,{})})]}),S.jsx(U3,{handleDetailsClick:b,handlePointClick:E}),S.jsx(p3,{handleCloseClick:p,handleSubmitClick:x})]})},N5=c.memo(j5),B5=t=>({google:N5})[t];function wp(...t){return c.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const Ss=t=>{const e=c.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},F5=()=>{throw new Error("useMediaQuery is a client-only hook")};function U5(t){const e=c.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return c.useSyncExternalStore(e,n,F5)}const V5="768px",z5="1024px",H5="1280px",$5="1536px",W5={screenSm:V5,screenMd:z5,screenLg:H5,screenXl:$5};function vr(t){return U5(`(max-width: calc(${W5[t]} - 1px))`)}const G5=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=be(Gf);c.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),be.getState().setLoaded())},[i]);const o=t[0],s=t[1];c.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),qt.getState().setPlace(a,[],"country")};if(r){l();return}Ol(async u=>{const{latitude:f,longitude:d}=u.coords,h=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",h),await qt.getState().setPlace(h,[],"country")},()=>l())},[o,s,i,e,r])},Sp=M0().use(p0()).use(o0()).init({language:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc"}),Z5=t=>{c.useEffect(()=>{t&&(Sp.changeLanguage(t),os.setLanguage(t))},[t])},q5=t=>{c.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&so(`--owl-color-${n}`,r)}}},[t])},K5=t=>{c.useEffect(()=>{t&&t!==void 0&&so("--owl-button-radius",`${t}px`)},[t])},Q5=t=>{c.useEffect(()=>{t&&t!==void 0&&so("--owl-font",t)},[t])},J5={open:!1},Y5=t=>t.open,er=bn(t=>({...J5,toggle(e){t(n=>({open:e??!n.open}))}})),X5=t=>{const e=t==="selector";c.useEffect(()=>{e&&er.getState().toggle(!0)},[e])},ew=({locale:t})=>{const[e,n]=c.useState(!1);return c.useEffect(()=>{n(!1)},[t]),c.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},tw=t=>{c.useEffect(()=>{t==="sharp"&&so("--owl-radius","0")},[t])},nw=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:o,startScreen:s}=Xe();return Q5(n),Z5(r),q5(i),K5(o),X5(s),tw(e),S.jsx(S.Fragment,{children:t})},rw=({children:t})=>{const{disableGeolocation:e,map:n}=Xe();return yn(n==null?void 0:n.center,"Map center is required"),yn(n==null?void 0:n.initialZoom,"Map initial zoom is required"),G5(n.center,n.initialZoom,{disableGeolocation:e}),S.jsx(S.Fragment,{children:t})},iw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},U.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),ow=()=>{er.getState().toggle(!0),be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null)},sw="CurrentLocation-module__root__AeQCGT",aw="CurrentLocation-module__icon__459m9q",lw="CurrentLocation-module__text__w-9v28",ha={root:sw,icon:aw,text:lw},Lp=({className:t})=>{const{t:e}=ln("current_location"),n=qt(Md),r=qt(km);return S.jsxs("div",{role:"presentation",className:Se(ha.root,t),onClick:ow,children:[S.jsx(iw,{className:ha.icon}),S.jsxs("span",{className:ha.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},uw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},U.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),cw=t=>U.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},U.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),U.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),U.createElement("path",{d:"M27.9807 0.199253L23.6569 13.4418H28.3442L28.9701 10.913H32.5644L33.1703 13.4418H37.9766L33.6354 0.199253H27.9807ZM29.6775 8.00558L30.7881 3.41028L31.879 8.00558H29.6775Z",fill:"black"}),U.createElement("path",{d:"M48.1266 6.0777L47.5404 8.54701H47.5008L46.9146 6.0777L45.3786 0.199253H38.7936V13.4418H42.9146V8.84631L42.8551 4.39405H42.9345L45.48 13.4418H49.2373L51.8222 4.39405H51.8817L51.8222 8.84631V13.4418H55.9233V0.199253H49.6626L48.1266 6.0777Z",fill:"black"}),U.createElement("path",{d:"M61.057 0.199253L56.7333 13.4418H61.4206L62.0465 10.913H65.6429L66.2489 13.4418H71.0552L66.7139 0.199253H61.057ZM62.7539 8.00558L63.8645 3.41028L64.9553 8.00558H62.7539Z",fill:"black"}),U.createElement("path",{d:"M85.656 6.77975C86.6916 6.6323 87.4541 6.28455 87.9389 5.73657C88.4238 5.18853 88.6662 4.51949 88.6662 3.72939C88.6662 2.55195 88.2562 1.67601 87.4344 1.1016C86.6145 0.513972 85.3607 0.212458 83.677 0.199253H76.0413V13.4418H84.2015C85.8301 13.4418 87.0354 13.1533 87.8177 12.5789C88.611 11.9913 89.0099 11.1132 89.0099 9.95118C89.0099 9.09505 88.7411 8.38636 88.2011 7.82518C87.6612 7.26393 86.8151 6.9228 85.656 6.80175V6.77975ZM80.5455 3.41028H82.6457C83.4545 3.41028 83.8577 3.7316 83.8577 4.37425C83.8577 5.01689 83.4545 5.33822 82.6457 5.33822H80.5455V3.41028ZM83.8797 10.1492C83.677 10.312 83.3685 10.3913 82.952 10.3913H80.5499V8.46561H82.952C83.3685 8.46561 83.6792 8.54701 83.8797 8.70549C84.0957 8.86619 84.2015 9.09945 84.2015 9.40754C84.2015 9.71567 84.0935 9.97757 83.8797 10.1492Z",fill:"black"}),U.createElement("path",{d:"M114.374 6.72035L118.616 0.199253H113.485L111.91 3.51152L110.354 0.199253H104.801L109.063 6.8414L104.638 13.4418H109.951L111.566 10.0105L113.325 13.4418H118.999L114.374 6.72035Z",fill:"black"}),U.createElement("path",{d:"M102.472 0.378544C102.053 0.125449 101.59 0 101.086 0H93.0312C92.5242 0 92.0549 0.127649 91.6252 0.378544C91.1931 0.631642 90.8517 0.972769 90.5982 1.40194C90.3448 1.8201 90.217 2.28667 90.217 2.80386V10.8369C90.217 11.3432 90.3448 11.8097 90.5982 12.2388C90.8517 12.6681 91.1931 13.0092 91.6252 13.2622C92.0549 13.5152 92.5242 13.6407 93.0312 13.6407H101.086C101.593 13.6407 102.053 13.513 102.472 13.2622C102.902 13.0092 103.245 12.6681 103.497 12.2388C103.763 11.8097 103.895 11.341 103.895 10.8369V2.80606C103.895 2.28667 103.761 1.8201 103.497 1.40414C103.243 0.974969 102.902 0.633842 102.472 0.380745V0.378544ZM100.116 9.89279H93.9611V3.75243H100.116V9.89279Z",fill:"black"}),U.createElement("path",{d:"M43.3879 27.3704C42.6166 26.8512 41.7372 26.4993 40.7478 26.3145L44.9726 21.5605H40.8226L36.1199 26.794V30.7935C37.0917 30.4415 37.9887 30.2655 38.8107 30.2655C39.5644 30.2655 40.2101 30.4085 40.7478 30.6923C41.6204 31.1455 42.0569 31.8319 42.0569 32.7559V32.8307C42.0569 33.1827 41.973 33.4269 41.8056 33.5611C41.6558 33.6953 41.3692 33.7635 40.9505 33.7635H32.8715C32.2345 33.7635 31.7983 33.6469 31.5625 33.4115C31.3444 33.1607 31.2363 32.6987 31.2363 32.0277V26.3431L27.0866 28.532V32.6569C27.0866 33.0925 27.0117 33.3873 26.8595 33.5369C26.7075 33.6887 26.4144 33.7635 25.9803 33.7635H23.7412C23.305 33.7635 23.0118 33.6887 22.8619 33.5369C22.7121 33.3851 22.6349 33.0925 22.6349 32.6569V26.8468L18.4852 29.0357V32.6591C18.4852 33.0947 18.4103 33.3895 18.2583 33.5391C18.1084 33.6909 17.8131 33.7657 17.379 33.7657H15.1664C14.73 33.7657 14.4369 33.6909 14.2871 33.5391C14.1372 33.3873 14.06 33.0947 14.06 32.6591V27.3506L9.91037 29.5395V35.9282C9.91037 37.6727 8.92967 38.5439 6.96835 38.5439C6.02952 38.5439 5.28242 38.2073 4.72931 37.5386C4.17615 36.8522 3.89848 35.9458 3.89848 34.8216C3.89848 33.6975 4.18276 32.5161 4.75355 31.4249L0.830824 32.2543C0.277676 33.2113 0 34.3091 0 35.5498C0 37.2944 0.50246 38.8033 1.50958 40.0771C2.801 41.7381 4.61911 42.5674 6.96835 42.5674C8.6454 42.5674 10.0779 42.1736 11.2701 41.3861C12.5946 40.5149 13.4497 39.2895 13.8353 37.7123C14.1372 37.7629 14.4568 37.7871 14.7917 37.7871H18.0114C19.0009 37.7365 19.8559 37.4858 20.5767 37.0326C21.3655 37.5364 22.2956 37.7871 23.3689 37.7871H26.5885C27.7125 37.7365 28.6513 37.4352 29.405 36.8808C30.3262 37.4836 31.4259 37.7871 32.6996 37.7871H41.3581C42.7157 37.7871 43.8309 37.4022 44.7036 36.63C45.7107 35.7566 46.2132 34.5334 46.2132 32.9561V32.7053C46.2132 30.3909 45.2745 28.6134 43.3967 27.3726L43.3879 27.3704Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M66.0266 39.8246C65.4051 39.8246 64.9026 40.0094 64.517 40.3789C64.1313 40.7639 63.9397 41.2677 63.9397 41.8881C63.9397 42.5084 64.1335 43.0123 64.517 43.3973C64.9026 43.7998 65.4051 44 66.0266 44C66.648 44 67.1416 43.8064 67.5097 43.4215C67.8953 43.0365 68.0869 42.5238 68.0869 41.8881C68.0869 41.2523 67.8931 40.7639 67.5097 40.3789C67.1416 40.0094 66.6458 39.8246 66.0266 39.8246Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M65.0208 32.6578C65.0208 33.0933 64.9459 33.3881 64.7938 33.5377C64.6418 33.6896 64.3487 33.7644 63.9124 33.7644H59.5733V30.6954C59.5733 29.3205 59.1788 28.2051 58.3922 27.3495C57.4864 26.3441 56.2038 25.8403 54.5444 25.8403C53.002 25.8403 51.752 26.3353 50.7956 27.3253C49.74 28.4165 49.2111 29.9079 49.2111 31.802C49.2111 33.1109 49.6143 34.2835 50.4187 35.3241C51.3751 36.5494 52.6666 37.2862 54.2932 37.5372C54.745 37.6032 55.124 37.6472 55.4259 37.6626C55.3599 37.997 55.124 38.283 54.7207 38.5182C54.3351 38.769 53.9076 38.8946 53.4382 38.8946C52.532 38.8946 51.5339 38.5754 50.4452 37.9398V41.5366C51.5691 42.2229 52.6841 42.5683 53.7908 42.5683C55.1835 42.5683 56.3979 42.1987 57.438 41.4619C58.6962 40.5731 59.3993 39.3478 59.5513 37.788H64.2936C65.6691 37.788 66.793 37.3942 67.6635 36.6044C68.6684 35.6981 69.173 34.4485 69.173 32.8558V26.3397L65.0235 28.5285V32.6534L65.0208 32.6578ZM55.4259 33.6896C55.3599 33.672 55.2674 33.6654 55.1484 33.6654C54.864 33.6147 54.6612 33.573 54.5444 33.5399C53.707 33.3221 53.2861 32.693 53.2861 31.6524C53.2861 30.3787 53.7048 29.7407 54.5444 29.7407C55.1306 29.7407 55.4237 30.0597 55.4237 30.6977V33.6918L55.4259 33.6896Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M95.419 25.837C94.0615 25.837 92.9465 26.2221 92.0734 26.9942C91.0839 27.883 90.5903 29.1149 90.5903 30.6923V32.6547C90.5903 33.0903 90.5155 33.3851 90.3633 33.5347C90.2135 33.6865 89.9182 33.7613 89.4839 33.7613H85.3124C84.8761 33.7613 84.583 33.6865 84.431 33.5347C84.2811 33.3829 84.204 33.0903 84.204 32.6547V21.5605L80.0544 23.7495V32.8571C80.0544 34.2497 80.4489 35.3892 81.2357 36.278C82.1237 37.2834 83.3556 37.7871 84.9334 37.7871H89.8587C90.8305 37.7871 91.6943 37.5782 92.4507 37.158C93.2726 37.5782 94.3282 37.7871 95.6196 37.7871C97.0608 37.7871 98.2354 37.2922 99.1411 36.3022C100.181 35.1956 100.701 33.6953 100.701 31.7989C100.701 30.1731 100.292 28.8224 99.4694 27.7489C98.513 26.4751 97.1644 25.837 95.419 25.837ZM95.3948 33.7613C94.9584 33.7613 94.7403 33.5853 94.7403 33.2333V30.5427C94.7403 30.0059 94.9673 29.7375 95.419 29.7375C96.2234 29.7375 96.6267 30.3755 96.6267 31.6493C96.6267 33.0573 96.2168 33.7635 95.3948 33.7635V33.7613Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M114.85 32.0277C114.85 32.6987 114.734 33.1607 114.498 33.4115C114.28 33.6469 113.852 33.7635 113.215 33.7635H112.31V24.8317L108.159 27.0448V33.7613H105.167L103.08 37.7871H113.392C115.036 37.7871 116.36 37.2921 117.365 36.3021C118.456 35.2462 119 33.8295 119 32.0497V21.5605L114.85 23.7737V32.0277Z",fill:"#6A4A9D"})),fw="Header-module__root__Pe4MYp",dw="Header-module__nav__wtnkmT",hw="Header-module__navItem__-Fy63Z",pw="Header-module__logo__xO2bWO",Mi={root:fw,nav:dw,navItem:hw,logo:pw},gw={llama:cw,default:uw},vw=()=>{const{hideLogo:t,logo:e="default"}=Xe();if(t)return null;const n=gw[e];return S.jsx("div",{className:Mi.logo,children:S.jsx(n,{})})},mw=({className:t})=>{const{t:e}=ln("header"),{disableDelivery:n}=Xe(),r=be(Pg),i=Ot(Cl);c.useEffect(()=>{i?be.getState().setMode("location_delivery"):be.getState().setMode("self_pickup")},[i]);const o=()=>{Ot.getState().setDeliverPoint(null),be.getState().setMode("self_pickup")},s=()=>{Ot.getState().setDeliverPoint(null),be.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return S.jsxs("div",{className:Se(Mi.root,t),children:[S.jsx(vw,{}),S.jsxs("nav",{className:Mi.nav,children:[!n&&S.jsx(Bt,{as:"link",className:Mi.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&S.jsx(Bt,{as:"link",className:Mi.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),S.jsx(Lp,{})]})]})},yw=c.memo(mw),bw={open:!1},Xr=bn(t=>({...bw,toggle(e){be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),Cw="Layout-module__root__qzPL-f",ww="Layout-module__headerHidden__JEN-d0",Sw="Layout-module__sidebarHidden__x017O3",Lw="Layout-module__sidebarOpen__IZnIjs",Uo={root:Cw,headerHidden:ww,sidebarHidden:Sw,sidebarOpen:Lw},xw=({children:t})=>{const{hideFilters:e,hideHeader:n}=Xe(),r=Xr(i=>i.open);return S.jsx("div",{className:Se(Uo.root,{[Uo.sidebarOpen]:r,[Uo.headerHidden]:n,[Uo.sidebarHidden]:e}),children:t})},Ns=()=>S.jsx(Hh,{children:S.jsx(as,{})}),Ew=({children:t})=>{const e=sn(fm);return sn(yd)&&!e?S.jsx(Ns,{}):S.jsx(S.Fragment,{children:t})};var xp={},Bs={},Ep={exports:{}},_w="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Mw=_w,Ow=Mw;function _p(){}function Mp(){}Mp.resetWarningCache=_p;var Pw=function(){function t(r,i,o,s,a,l){if(l!==Ow){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Mp,resetWarningCache:_p};return n.PropTypes=n,n};Ep.exports=Pw();var kw=Ep.exports,Fs={},ei={};Object.defineProperty(ei,"__esModule",{value:!0});ei.loadGoogleMapScript=ei.isBrowser=void 0;var Op=typeof window<"u"&&window.document;ei.isBrowser=Op;var Tw=function(e,n){if(!Op||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};ei.loadGoogleMapScript=Tw;var Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var Rw="https://maps.googleapis.com/maps/api/js";Us.GOOGLE_MAP_SCRIPT_BASE_URL=Rw;function ns(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(n){return typeof n}:ns=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ns(t)}Object.defineProperty(Fs,"__esModule",{value:!0});Fs.default=Bw;var xt=Aw(c),pa=ei,Dw=Us;function Pp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Pp=function(i){return i?n:e})(t)}function Aw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ns(t)!=="object"&&typeof t!="function")return{default:t};var n=Pp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Cf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function wf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cf(Object(n),!0).forEach(function(r){Iw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jw(t,e){if(t==null)return{};var n=Nw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Nw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Bw(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var u=l.types,f=u===void 0?["(cities)"]:u,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,g=jw(l,["types","componentRestrictions","fields","bounds"]),w=t.googleMapsScriptBaseUrl,C=w===void 0?Dw.GOOGLE_MAP_SCRIPT_BASE_URL:w,L=t.language,m=(0,xt.useRef)(null),_=(0,xt.useRef)(null),E=(0,xt.useRef)(null),p=(0,xt.useRef)(null),b=L?"&language=".concat(L):"",x="".concat(C,"?libraries=").concat(o,"&key=").concat(r).concat(b),M=(0,xt.useCallback)(function(){return(0,pa.loadGoogleMapScript)(C,x)},[C,x]);return(0,xt.useEffect)(function(){var O=wf(wf({},g),{},{fields:v,types:f,bounds:y});if(d&&(O.componentRestrictions=d),!(E.current||!m.current||!pa.isBrowser)){e&&!e.current&&(e.current=m.current);var T=function(){var R;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((R=google.maps)!==null&&R!==void 0&&R.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(m.current,O),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),m.current,E.current)}))};return r?M().then(function(){return T()}):T(),function(){return _.current?_.current.remove():void 0}}},[]),(0,xt.useEffect)(function(){var O;!(xt.default!==null&&xt.default!==void 0&&(O=xt.default.version)!==null&&O!==void 0&&O.startsWith("18"))&&pa.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,xt.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,xt.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,xt.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,xt.useEffect)(function(){E.current&&E.current.setOptions(g)},[g]),{ref:m,autocompleteRef:E}}function rs(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(n){return typeof n}:rs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rs(t)}Object.defineProperty(Bs,"__esModule",{value:!0});Bs.default=void 0;var yl=Uw(c),Je=kp(kw),Fw=kp(Fs);function kp(t){return t&&t.__esModule?t:{default:t}}function Tp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Tp=function(i){return i?n:e})(t)}function Uw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||rs(t)!=="object"&&typeof t!="function")return{default:t};var n=Tp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Ls(){return Ls=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ls.apply(this,arguments)}function Vw(t,e){if(t==null)return{};var n=zw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Rp(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,u=Vw(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,Fw.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return yl.default.createElement("input",Ls({ref:d},u))}Rp.propTypes={apiKey:Je.default.string,libraries:Je.default.arrayOf(Je.default.string),ref:Je.default.oneOfType([Je.default.func,Je.default.shape({current:Je.default.any})]),googleMapsScriptBaseUrl:Je.default.string,onPlaceSelected:Je.default.func,inputAutocompleteValue:Je.default.string,options:Je.default.shape({componentRestrictions:Je.default.object,bounds:Je.default.object,location:Je.default.object,offset:Je.default.number,origin:Je.default.object,radius:Je.default.number,sessionToken:Je.default.object,types:Je.default.arrayOf(Je.default.string)}),language:Je.default.string};var Hw=(0,yl.forwardRef)(function(t,e){return yl.default.createElement(Rp,Ls({},t,{refProp:e}))});Bs.default=Hw;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Bs),n=r(Fs);function r(i){return i&&i.__esModule?i:{default:i}}})(xp);var Dp=xp;async function $w(){return(await Qe.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/key",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function Ww(t){return np({queryKey:["wl-map-key-wl"],queryFn:()=>$w(),refetchOnWindowFocus:!1,retry:2,enabled:!t})}const Ap=c.createContext(null),Gw=({children:t})=>{const{gMapKey:e}=Xe(),{data:n,isLoading:r}=Ww(e),i=c.useMemo(()=>({mapKey:e||n||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0"}),[n,e]);return S.jsx(Ap.Provider,{value:i,children:r?S.jsx(Ns,{}):t})},Ip=()=>{const t=c.useContext(Ap);if(!t)throw new Error("useMapKeyContext must be used within a MapKeyProvider");return t},Zw="Aside-module__root__EotK2f",qw="Aside-module__open__Zwmbs5",Kw="Aside-module__overlay__slLdHF",Qw="Aside-module__container__28P4wq",Vo={root:Zw,open:qw,overlay:Kw,container:Qw},Jw=({children:t,className:e,open:n})=>S.jsxs("div",{className:Se(Vo.root,e,{[Vo.open]:n}),children:[S.jsx("div",{className:Vo.overlay}),S.jsx("div",{className:Vo.container,children:t})]}),Yw="Input-module__locationSearchRoot__svh-f9",Xw="Input-module__endAdornment__m40K5R",e6="Input-module__input__505b7i",t6="Input-module__startAdornment__D-sJ0N",n6="Input-module__locationSearchInput__2YK1MG",r6="Input-module__label__gmqtsf",i6="Input-module__inputContainer__vubIa-",_r={locationSearchRoot:Yw,endAdornment:Xw,input:e6,startAdornment:t6,locationSearchInput:n6,label:r6,inputContainer:i6},jp=c.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const u=c.useId(),f=c.useRef(null);c.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(o){o({target:{value:h}});return}if(i){i({target:{value:h}});return}f.current&&(f.current.value=h)}}),[i,o]);const d=wp(n,f);return S.jsxs("label",{htmlFor:a.id??u,className:Se(_r.locationSearchRoot,t),children:[r&&S.jsx("span",{className:_r.label,children:r}),S.jsxs("div",{className:_r.inputContainer,children:[s&&S.jsx("div",{className:_r.startAdornment,children:s}),S.jsx("input",{...a,ref:d,id:a.id??u,className:_r.locationSearchInput,onChange:o,onBlur:i}),e&&S.jsx("div",{className:_r.endAdornment,children:e})]})]})}),o6="LocationAside-module__submit__CSKcqi",s6="LocationAside-module__container__S1NejR",a6="LocationAside-module__selector__hl74ke",l6="LocationAside-module__label__0Zk8at",u6="LocationAside-module__header__N1wgyn",c6="LocationAside-module__close__VsE88z",zo={submit:o6,container:s6,selector:a6,label:l6,header:u6,close:c6},f6=c.forwardRef((t,e)=>{const{t:n}=ln(["location_aside","common"]),{mapKey:r}=Ip(),i=er(Y5),{country:o,hideCloseButtonOnLocationScreen:s,inputs:a,onCloseLocationSelector:l,onLocationSelect:u}=Xe(),f=c.useRef(null),[d,h]=c.useState("");c.useImperativeHandle(e,()=>({open:()=>er.getState().toggle(!0),close:()=>er.getState().toggle(!1)}),[]);const v=async m=>{er.getState().toggle(!1),await qt.getState().setPlace(m),u==null||u(m),m!=null&&m.formatted_address&&h(m==null?void 0:m.formatted_address)},y=()=>{er.getState().toggle(!1),l==null||l()},g=o?{componentRestrictions:{country:o}}:void 0,w=m=>{h(m.target.value)},{ref:C}=Dp.usePlacesWidget({libraries:["places"],options:g,onPlaceSelected:v,apiKey:r,inputAutocompleteValue:d}),L=Ss(a==null?void 0:a.city);return S.jsx(Jw,{open:i,children:S.jsx("div",{ref:f,className:zo.container,children:S.jsxs("div",{className:zo.selector,children:[S.jsxs("div",{className:zo.header,children:[S.jsx("div",{className:zo.label,children:n("choose_city")}),!s&&S.jsx(ri,{position:"relative",onClick:y})]}),S.jsx(jp,{...L,inputRef:C,value:d,placeholder:n("placeholder"),onChange:w})]})})})}),d6=c.memo(f6),h6=({children:t})=>{const{locale:e}=Xe(),{mapKey:n}=Ip(),{setMapKey:r}=qt();c.useEffect(()=>{r(n)},[n,r]);const{isLoaded:i}=lp({language:e,libraries:eg,googleMapsApiKey:n});return i?S.jsx(S.Fragment,{children:t}):S.jsx(Ns,{})},p6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),g6=({className:t})=>{const{t:e}=ln("location_selector"),{country:n,inputs:r,onLocationSelect:i}=Xe(),[o,s]=c.useState(""),[a,l]=c.useState(!1),u=[],f=n?{componentRestrictions:{country:n},types:u}:{types:u},d=async L=>{await qt.getState().setPlaceAndPoint(L,{ignoreSelection:!0}),i==null||i(L),s("")},{ref:h}=Dp.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=L=>{a&&be.getState().setBlurred(!!L.target.value),s(L.target.value)},y=()=>{o&&be.getState().setBlurred(!0),be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),l(!0)},g=()=>{be.getState().setBlurred(!1),l(!1)},w=L=>{L.key==="Enter"&&L.preventDefault()},C=Ss(r==null?void 0:r.address);return S.jsx(jp,{...C,inputRef:h,value:o,className:t,endAdornment:S.jsx(p6,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:g,onKeyDown:w})},v6=({className:t})=>be(Rg)?S.jsx(g6,{className:t}):null,m6=c.memo(v6),y6="DeliveryDetailsModal-module__root__qwKnjX",b6={root:y6},C6=({className:t,location:e,onClose:n,onSubmit:r})=>S.jsx("div",{className:Se(b6.root,t),children:S.jsx(Cp,{location:e,onClose:n,onSubmit:r})}),w6="LocationDetailsModal-module__root__PyRnLM",S6={root:w6},L6=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return S.jsx("div",{className:Se(S6.root,t),children:S.jsx(Hd,{location:e,onClose:n,onSubmit:i})})},x6="MapContainer-module__root__1Os6Q-",E6="MapContainer-module__mapWrapper__Cwe7qC",_6="MapContainer-module__wrapperBlurred__04NN2L",M6="MapContainer-module__locationSelector__Pr1zS-",O6="MapContainer-module__filterButton__CW3Qv7",P6="MapContainer-module__sidebarOpen__lGMVrJ",k6="MapContainer-module__filterIcon__T01XsJ",T6="MapContainer-module__details__gM8LWX",rn={root:x6,mapWrapper:E6,wrapperBlurred:_6,locationSelector:M6,filterButton:O6,sidebarOpen:P6,filterIcon:k6,details:T6},R6=()=>{const{onPointClick:t}=Xe(),e=be(wl),n=on(Ig),r=Ot(Cl),i=c.useCallback(()=>{be.getState().setDetailsOpen(!1)},[]),o=c.useCallback(s=>{t==null||t(s),be.getState().setDetailsOpen(!1),on.getState().setSelectedLocation(null),Ot.getState().setDeliverPoint(null)},[t]);return S.jsxs(S.Fragment,{children:[(r==null?void 0:r.address)&&e&&S.jsx(C6,{location:r,className:rn.details,onClose:i,onSubmit:o}),n&&e&&S.jsx(L6,{location:n,className:rn.details,onClose:i,onSubmit:o})]})},D6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},U.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),U.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),A6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},U.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),U.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),I6=()=>{const t=Xr(i=>i.open),e=Xr(i=>i.toggle),n=vr("screenSm"),r=()=>{e(!0)};return S.jsxs("div",{role:"presentation",className:Se(rn.filterButton,{[rn.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&S.jsx(Lp,{}),n?S.jsx(A6,{className:rn.filterIcon,onClick:r}):S.jsx(D6,{className:rn.filterIcon})]})},j6=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=Xe(),i=be(Tg),o=be(wl);return S.jsxs("div",{className:Se(rn.root,e),children:[!r&&!o&&S.jsx(m6,{className:rn.locationSelector}),!n&&S.jsx(I6,{}),S.jsx("div",{className:Se(rn.mapWrapper,{[rn.wrapperBlurred]:i}),children:t}),S.jsx(R6,{})]})},N6=c.memo(j6),B6="Separator-module__root__eQtZey",F6={root:B6},ga=({className:t,...e})=>S.jsx("hr",{className:Se(F6.root,t),...e}),U6="Sidebar-module__root__4j1MA3",V6="Sidebar-module__closeButton__HLXy1c",z6="Sidebar-module__open__mqQXF6",H6="Sidebar-module__header__Afp6uz",$6="Sidebar-module__typeFilter__GN46u9",W6="Sidebar-module__separator__6I4QoJ",G6="Sidebar-module__withRightPadding__2u1Ina",Z6="Sidebar-module__sheetContent__SaoncI",q6="Sidebar-module__doneButton__4aeaSD",vn={root:U6,closeButton:V6,open:z6,header:H6,typeFilter:$6,separator:W6,withRightPadding:G6,sheetContent:Z6,doneButton:q6},K6=()=>{const{t}=ln("common"),e=vr("screenSm"),n=Xr(i=>i.toggle),r=()=>{n(!1)};return S.jsxs("div",{className:vn.header,children:[e&&S.jsx("div",{role:"presentation",className:vn.doneButton,onClick:r,children:t("done")}),!e&&S.jsx(ri,{className:vn.closeButton,onClick:r})]})},Q6="Radio-module__root__7ElY2W",J6="Radio-module__label__c-sYW3",Sf={root:Q6,label:J6},Y6=({className:t,label:e,labelProps:n={},...r})=>{const i=c.useId(),{className:o,...s}=n;return S.jsxs("label",{htmlFor:i,className:Se(Sf.label,o),...s,children:[S.jsx("input",{id:i,type:"radio",className:Se(Sf.root,t),...r}),e]})},Ar=t=>S.jsx(Y6,{...t,type:"checkbox"}),X6="RadioGroup-module__root__ewZw-x",eS="RadioGroup-module__body__k8BJAs",tS="RadioGroup-module__legend__tcfV7q",va={root:X6,body:eS,legend:tS},Np=({children:t,className:e,label:n,onChange:r,value:i,...o})=>S.jsxs("div",{className:Se(va.root,e),...o,children:[n&&S.jsx("span",{className:va.legend,children:n}),S.jsx("div",{className:va.body,children:c.Children.map(t,s=>c.isValidElement(s)?c.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),nS=({className:t,onChange:e})=>{const{t:n}=ln("receive_filter"),r=Vn(Fg);return S.jsxs(Np,{value:r,label:n("title"),className:t,onChange:e,children:[S.jsx(Ar,{name:"receive",value:Gt.DressingRoom,label:n("dressing_room")}),S.jsx(Ar,{name:"receive",value:Gt.CheckOrder,label:n("check_order")}),S.jsx(Ar,{name:"receive",value:Gt.PayByCash,label:n("pay_by_cash")})]})},rS=c.memo(nS),iS=({className:t,onChange:e})=>{const{t:n}=ln("send_filter"),r=Vn(Bg);return S.jsxs(Np,{className:t,value:r,label:n("title"),onChange:e,children:[S.jsx(Ar,{name:"send",value:Zt.Return,label:n("sending_returns")}),S.jsx(Ar,{name:"send",value:Zt.Shipping,label:n("shipping")}),S.jsx(Ar,{name:"send",value:Zt.Payment,label:n("payment")})]})},oS=c.memo(iS),sS="TypeFilter-module__root__WH5EQV",aS="TypeFilter-module__button__f0mSfo",Ho={root:sS,button:aS},lS=({className:t,onChange:e,value:n})=>{const{t:r}=ln("type_filter"),i=o=>()=>e==null?void 0:e(o);return S.jsxs("div",{className:Se(Ho.root,t),children:[S.jsx(Bt,{className:Ho.button,variant:n===gn.All?"primary":"secondary",onClick:i(gn.All),children:r("all")}),S.jsx(Bt,{className:Ho.button,variant:n===gn.PostOffice?"primary":"secondary",onClick:i(gn.PostOffice),children:r("post_office")}),S.jsx(Bt,{className:Ho.button,variant:n===gn.PickPoint?"primary":"secondary",onClick:i(gn.PickPoint),children:r("pick_point")})]})},uS=({className:t,onChange:e})=>{const n=Vn(Ng);return S.jsx(lS,{value:n,className:t,onChange:e})},cS=c.memo(uS),fS=({className:t})=>{const e=vr("screenSm"),n=Xr(l=>l.open),r=c.useCallback(l=>Vn.getState().setFilter({type:l}),[]),i=c.useCallback(l=>Vn.getState().setFilter({send:l}),[]),o=c.useCallback(l=>Vn.getState().setFilter({receive:l}),[]),s=c.useCallback(()=>Xr.getState().toggle(!1),[]),a=S.jsxs(S.Fragment,{children:[S.jsx(K6,{}),S.jsxs("div",{className:vn.withRightPadding,children:[S.jsx(cS,{className:vn.typeFilter,onChange:r}),S.jsx(ga,{className:vn.separator}),S.jsx(rS,{onChange:o}),S.jsx(ga,{}),S.jsx(oS,{onChange:i}),S.jsx(ga,{})]})]});return e?S.jsx(Uh,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-Vh,onDismiss:s,children:S.jsx("div",{className:vn.sheetContent,children:a})}):S.jsx("div",{className:Se(vn.root,t,{[vn.open]:n}),children:a})},dS="App-module__map__Kf-2JS",hS="App-module__sidebar__ORIzGk",pS="App-module__header__bgP9DA",ma={map:dS,sidebar:hS,header:pS},gS=new n4,Bp=({config:t,options:e})=>{const n=_m(t),{INN:r,hideFilters:i,hideHeader:o,locale:s,map:a}=n;yn(r,"INN is required"),Mm(r,e),yn(a==null?void 0:a.provider,"Map provider is required");const l=B5(a.provider);dm();const u=ew({locale:s});return S.jsx($p,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:S.jsx(a4,{client:gS,children:S.jsx(Gw,{children:S.jsx(Uf.Provider,{value:n,children:S.jsx(rw,{children:S.jsx(nw,{children:S.jsx(P0,{tolgee:Sp,fallback:S.jsx(Ns,{}),children:u&&S.jsx(h6,{children:S.jsx(Ew,{children:S.jsxs(xw,{children:[!o&&S.jsx(yw,{className:ma.header}),!i&&S.jsx(fS,{className:ma.sidebar}),S.jsx(N6,{className:ma.map,children:S.jsx(l,{})}),S.jsx(d6,{})]})})})})})})})})})})},Fp=async t=>Vi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),Up=c.createContext(null);let Lf=!1;const vS=({children:t})=>{const[e,n]=c.useState(),[r,i]=c.useState(),o=c.useRef(null),s=c.useRef(null),a=c.useCallback(u=>{if(Lf){console.warn("Widget already launched");return}Lf=!0,n(u)},[]),l=c.useMemo(()=>({widgetOutHolderRef:o,widgetLocationsRef:s,launchWidget:a,setDynamicConfig:i}),[a]);return S.jsxs(Up.Provider,{value:l,children:[S.jsx("div",{ref:o,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:S.jsx("div",{ref:s,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:e&&S.jsx(Bp,{options:e.options,config:{...e.config,...r}})})}),t]})};function Vp(){const t=c.useContext(Up);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const mS=t=>{const{setDynamicConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Vp(),i=c.useRef(null);return c.useEffect(()=>{t&&e(t)},[t,e]),c.useEffect(()=>{const o=r.current,s=n.current,a=i.current;return s&&a&&a.appendChild(s),()=>{s&&o&&o.appendChild(s)}},[n,r]),S.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=Gt;exports.ESendFilter=Zt;exports.ETypeFilter=gn;exports.MapPlaceholder=mS;exports.Widget=Bp;exports.WidgetLocationsProvider=vS;exports.createPointsIterator=Ea;exports.fetchPointsRequest=xa;exports.fromHoursMinutesToMinutes=Ug;exports.fromMinutesToHoursMinutes=Vg;exports.getAddressFormGeocode=Oa;exports.getBoundsFromPoint=zg;exports.getCurrentPosition=Ol;exports.getNormalizedAddress=Fp;exports.getPropertyValue=md;exports.isCoordinates=Ma;exports.isDeliveryPoint=lm;exports.isHttpSuccess=vd;exports.isPlaceId=gd;exports.replaceSvgCurrentColor=Pr;exports.setWidgetCSSProperty=so;exports.stopImmediatePropagation=_a;exports.svgStringToBase64URL=Pl;exports.useWidgetLocationsContext=Vp;
263
+ </svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Tt.isAdvancedMarkerAvailable(i)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(h)}const u={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(u)}}function hC(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class ql{constructor(){hC(ql,google.maps.OverlayView)}}var Fi;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Fi||(Fi={}));const pC=(t,e,n)=>{n.fitBounds(e.bounds)};class gC extends ql{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new cC(r),renderer:o=new dC,onClusterClick:s=pC}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(Tt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Fi.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||Tt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>Tt.setMap(s,null)))}google.maps.event.trigger(this,Fi.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Tt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new fC(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>Tt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Fi.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),Tt.setMap(r.marker,n)})}}function vC(t){var e=M4(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new gC(K(K({},t),{map:e}));i(o)}},[e]),r}function mC(t){var e=t.children,n=t.options,r=vC(n);return r!==null?e(r):null}c.memo(mC);var zc={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Hc={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function yC(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,u=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,h=t.onUnmount,v=c.useContext(le),y=c.useState(null),g=y[0],w=y[1],C=c.useState(null),L=C[0],m=C[1],_=c.useState(null),E=_[0],p=_[1],b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useRef(null);return c.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){i&&g!==null&&g.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&g!==null&&g.setZIndex(o)},[o]),c.useEffect(function(){g&&s&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),p(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&l&&(x!==null&&google.maps.event.removeListener(x),M(google.maps.event.addListener(g,"content_changed",l)))},[l]),c.useEffect(function(){g&&u&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(g,"position_changed",u)))},[u]),c.useEffect(function(){g&&f&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){var N=new google.maps.InfoWindow(K({},r||{}));return w(N),V.current=document.createElement("div"),s&&m(google.maps.event.addListener(N,"closeclick",s)),a&&p(google.maps.event.addListener(N,"domready",a)),l&&M(google.maps.event.addListener(N,"content_changed",l)),u&&P(google.maps.event.addListener(N,"position_changed",u)),f&&B(google.maps.event.addListener(N,"zindex_changed",f)),N.setContent(V.current),i&&N.setPosition(i),o&&N.setZIndex(o),n?N.open(v,n):N.getPosition()?N.open(v):Ye(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(N),function(){L&&google.maps.event.removeListener(L),x&&google.maps.event.removeListener(x),E&&google.maps.event.removeListener(E),T&&google.maps.event.removeListener(T),I&&google.maps.event.removeListener(I),h&&h(N),N.close()}},[]),V.current?ti.createPortal(c.Children.only(e),V.current):null}c.memo(yC);var gp=function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):Ye(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(K({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=ce({updaterMap:Hc,eventMap:zc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Hc,eventMap:zc,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(he(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ti.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=le,e}(c.PureComponent),$c={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Wc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},bC={};function CC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onLoad,L=t.onUnmount,m=c.useContext(le),_=c.useState(null),E=_[0],p=_[1],b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1];return c.useEffect(function(){E!==null&&E.setMap(m)},[m]),c.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),c.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),c.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),c.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),c.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),c.useEffect(function(){E&&s&&(x!==null&&google.maps.event.removeListener(x),M(google.maps.event.addListener(E,"dblclick",s)))},[s]),c.useEffect(function(){E&&a&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(E,"dragend",a)))},[a]),c.useEffect(function(){E&&l&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(E,"dragstart",l)))},[l]),c.useEffect(function(){E&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(E,"mousedown",u)))},[u]),c.useEffect(function(){E&&f&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(E,"mousemove",f)))},[f]),c.useEffect(function(){E&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(E,"mouseout",d)))},[d]),c.useEffect(function(){E&&h&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(E,"mouseover",h)))},[h]),c.useEffect(function(){E&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(E,"mouseup",v)))},[v]),c.useEffect(function(){E&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(E,"rightclick",y)))},[y]),c.useEffect(function(){E&&g&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(E,"click",g)))},[g]),c.useEffect(function(){E&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(E,"drag",w)))},[w]),c.useEffect(function(){var ie=new google.maps.Polyline(K(K({},e||bC),{map:m}));return o&&ie.setPath(o),typeof i<"u"&&ie.setVisible(i),typeof r<"u"&&ie.setEditable(r),typeof n<"u"&&ie.setDraggable(n),s&&M(google.maps.event.addListener(ie,"dblclick",s)),a&&P(google.maps.event.addListener(ie,"dragend",a)),l&&B(google.maps.event.addListener(ie,"dragstart",l)),u&&z(google.maps.event.addListener(ie,"mousedown",u)),f&&H(google.maps.event.addListener(ie,"mousemove",f)),d&&te(google.maps.event.addListener(ie,"mouseout",d)),h&&pe(google.maps.event.addListener(ie,"mouseover",h)),v&&De(google.maps.event.addListener(ie,"mouseup",v)),y&&_e(google.maps.event.addListener(ie,"rightclick",y)),g&&Me(google.maps.event.addListener(ie,"click",g)),w&&je(google.maps.event.addListener(ie,"drag",w)),p(ie),C&&C(ie),function(){x!==null&&google.maps.event.removeListener(x),T!==null&&google.maps.event.removeListener(T),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),L&&L(ie),ie.setMap(null)}},[]),null}c.memo(CC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Wc,eventMap:$c,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Wc,eventMap:$c,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),he(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Gc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zc={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function wC(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,L=t.onLoad,m=t.onUnmount,_=t.onEdit,E=c.useContext(le),p=c.useState(null),b=p[0],x=p[1],M=c.useState(null),O=M[0],T=M[1],P=c.useState(null),R=P[0],I=P[1],B=c.useState(null),V=B[0],N=B[1],z=c.useState(null),Y=z[0],G=z[1],H=c.useState(null),Q=H[0],oe=H[1],te=c.useState(null),ee=te[0],D=te[1],pe=c.useState(null),Pe=pe[0],Z=pe[1],De=c.useState(null),Ae=De[0],ue=De[1],_e=c.useState(null),Ve=_e[0],Ce=_e[1],Me=c.useState(null),Ie=Me[0],ke=Me[1],je=c.useState(null),ie=je[0],We=je[1];return c.useEffect(function(){b!==null&&b.setMap(E)},[E]),c.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),c.useEffect(function(){typeof o<"u"&&b!==null&&b.setPath(o)},[b,o]),c.useEffect(function(){typeof s<"u"&&b!==null&&b.setPaths(s)},[b,s]),c.useEffect(function(){b&&a&&(O!==null&&google.maps.event.removeListener(O),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),c.useEffect(function(){b&&(google.maps.event.addListener(b.getPath(),"insert_at",function(){_==null||_(b)}),google.maps.event.addListener(b.getPath(),"set_at",function(){_==null||_(b)}))},[b,_]),c.useEffect(function(){b&&l&&(R!==null&&google.maps.event.removeListener(R),I(google.maps.event.addListener(b,"dragend",l)))},[l]),c.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&f&&(Y!==null&&google.maps.event.removeListener(Y),G(google.maps.event.addListener(b,"mousedown",f)))},[f]),c.useEffect(function(){b&&d&&(Q!==null&&google.maps.event.removeListener(Q),oe(google.maps.event.addListener(b,"mousemove",d)))},[d]),c.useEffect(function(){b&&h&&(ee!==null&&google.maps.event.removeListener(ee),D(google.maps.event.addListener(b,"mouseout",h)))},[h]),c.useEffect(function(){b&&v&&(Pe!==null&&google.maps.event.removeListener(Pe),Z(google.maps.event.addListener(b,"mouseover",v)))},[v]),c.useEffect(function(){b&&y&&(Ae!==null&&google.maps.event.removeListener(Ae),ue(google.maps.event.addListener(b,"mouseup",y)))},[y]),c.useEffect(function(){b&&g&&(Ve!==null&&google.maps.event.removeListener(Ve),Ce(google.maps.event.addListener(b,"rightclick",g)))},[g]),c.useEffect(function(){b&&w&&(Ie!==null&&google.maps.event.removeListener(Ie),ke(google.maps.event.addListener(b,"click",w)))},[w]),c.useEffect(function(){b&&C&&(ie!==null&&google.maps.event.removeListener(ie),We(google.maps.event.addListener(b,"drag",C)))},[C]),c.useEffect(function(){var re=new google.maps.Polygon(K(K({},e||{}),{map:E}));return o&&re.setPath(o),s&&re.setPaths(s),typeof i<"u"&&re.setVisible(i),typeof r<"u"&&re.setEditable(r),typeof n<"u"&&re.setDraggable(n),a&&T(google.maps.event.addListener(re,"dblclick",a)),l&&I(google.maps.event.addListener(re,"dragend",l)),u&&N(google.maps.event.addListener(re,"dragstart",u)),f&&G(google.maps.event.addListener(re,"mousedown",f)),d&&oe(google.maps.event.addListener(re,"mousemove",d)),h&&D(google.maps.event.addListener(re,"mouseout",h)),v&&Z(google.maps.event.addListener(re,"mouseover",v)),y&&ue(google.maps.event.addListener(re,"mouseup",y)),g&&Ce(google.maps.event.addListener(re,"rightclick",g)),w&&ke(google.maps.event.addListener(re,"click",w)),C&&We(google.maps.event.addListener(re,"drag",C)),x(re),L&&L(re),function(){O!==null&&google.maps.event.removeListener(O),R!==null&&google.maps.event.removeListener(R),V!==null&&google.maps.event.removeListener(V),Y!==null&&google.maps.event.removeListener(Y),Q!==null&&google.maps.event.removeListener(Q),ee!==null&&google.maps.event.removeListener(ee),Pe!==null&&google.maps.event.removeListener(Pe),Ae!==null&&google.maps.event.removeListener(Ae),Ve!==null&&google.maps.event.removeListener(Ve),Ie!==null&&google.maps.event.removeListener(Ie),m&&m(re),re.setMap(null)}},[]),null}c.memo(wC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Zc,eventMap:Gc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Zc,eventMap:Gc,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),he(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var qc={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Kc={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function SC(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,u=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,v=t.onMouseUp,y=t.onRightClick,g=t.onClick,w=t.onDrag,C=t.onBoundsChanged,L=t.onLoad,m=t.onUnmount,_=c.useContext(le),E=c.useState(null),p=E[0],b=E[1],x=c.useState(null),M=x[0],O=x[1],T=c.useState(null),P=T[0],R=T[1],I=c.useState(null),B=I[0],V=I[1],N=c.useState(null),z=N[0],Y=N[1],G=c.useState(null),H=G[0],Q=G[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),pe=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],Ce=c.useState(null),Me=Ce[0],Ie=Ce[1],ke=c.useState(null),je=ke[0],ie=ke[1],We=c.useState(null),re=We[0],tt=We[1];return c.useEffect(function(){p!==null&&p.setMap(_)},[_]),c.useEffect(function(){typeof e<"u"&&p!==null&&p.setOptions(e)},[p,e]),c.useEffect(function(){typeof r<"u"&&p!==null&&p.setDraggable(r)},[p,r]),c.useEffect(function(){typeof i<"u"&&p!==null&&p.setEditable(i)},[p,i]),c.useEffect(function(){typeof o<"u"&&p!==null&&p.setVisible(o)},[p,o]),c.useEffect(function(){typeof n<"u"&&p!==null&&p.setBounds(n)},[p,n]),c.useEffect(function(){p&&s&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(p,"dblclick",s)))},[s]),c.useEffect(function(){p&&a&&(P!==null&&google.maps.event.removeListener(P),R(google.maps.event.addListener(p,"dragend",a)))},[a]),c.useEffect(function(){p&&l&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(p,"dragstart",l)))},[l]),c.useEffect(function(){p&&u&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(p,"mousedown",u)))},[u]),c.useEffect(function(){p&&f&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(p,"mousemove",f)))},[f]),c.useEffect(function(){p&&d&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(p,"mouseout",d)))},[d]),c.useEffect(function(){p&&h&&(pe!==null&&google.maps.event.removeListener(pe),Pe(google.maps.event.addListener(p,"mouseover",h)))},[h]),c.useEffect(function(){p&&v&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(p,"mouseup",v)))},[v]),c.useEffect(function(){p&&y&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(p,"rightclick",y)))},[y]),c.useEffect(function(){p&&g&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(p,"click",g)))},[g]),c.useEffect(function(){p&&w&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(p,"drag",w)))},[w]),c.useEffect(function(){p&&C&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(p,"bounds_changed",C)))},[C]),c.useEffect(function(){var q=new google.maps.Rectangle(K(K({},e||{}),{map:_}));return typeof o<"u"&&q.setVisible(o),typeof i<"u"&&q.setEditable(i),typeof r<"u"&&q.setDraggable(r),typeof n<"u"&&q.setBounds(n),s&&O(google.maps.event.addListener(q,"dblclick",s)),a&&R(google.maps.event.addListener(q,"dragend",a)),l&&V(google.maps.event.addListener(q,"dragstart",l)),u&&Y(google.maps.event.addListener(q,"mousedown",u)),f&&Q(google.maps.event.addListener(q,"mousemove",f)),d&&ee(google.maps.event.addListener(q,"mouseout",d)),h&&Pe(google.maps.event.addListener(q,"mouseover",h)),v&&Ae(google.maps.event.addListener(q,"mouseup",v)),y&&Ve(google.maps.event.addListener(q,"rightclick",y)),g&&Ie(google.maps.event.addListener(q,"click",g)),w&&ie(google.maps.event.addListener(q,"drag",w)),C&&tt(google.maps.event.addListener(q,"bounds_changed",C)),b(q),L&&L(q),function(){M!==null&&google.maps.event.removeListener(M),P!==null&&google.maps.event.removeListener(P),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),pe!==null&&google.maps.event.removeListener(pe),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),m&&m(q),q.setMap(null)}},[]),null}c.memo(SC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Kc,eventMap:qc,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),he(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Qc={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Jc={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},LC={};function xC(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,h=t.onMouseOut,v=t.onMouseOver,y=t.onMouseUp,g=t.onRightClick,w=t.onClick,C=t.onDrag,L=t.onCenterChanged,m=t.onRadiusChanged,_=t.onLoad,E=t.onUnmount,p=c.useContext(le),b=c.useState(null),x=b[0],M=b[1],O=c.useState(null),T=O[0],P=O[1],R=c.useState(null),I=R[0],B=R[1],V=c.useState(null),N=V[0],z=V[1],Y=c.useState(null),G=Y[0],H=Y[1],Q=c.useState(null),oe=Q[0],te=Q[1],ee=c.useState(null),D=ee[0],pe=ee[1],Pe=c.useState(null),Z=Pe[0],De=Pe[1],Ae=c.useState(null),ue=Ae[0],_e=Ae[1],Ve=c.useState(null),Ce=Ve[0],Me=Ve[1],Ie=c.useState(null),ke=Ie[0],je=Ie[1],ie=c.useState(null),We=ie[0],re=ie[1],tt=c.useState(null),q=tt[0],Ge=tt[1],ze=c.useState(null),bt=ze[0],ut=ze[1];return c.useEffect(function(){x!==null&&x.setMap(p)},[p]),c.useEffect(function(){typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),c.useEffect(function(){typeof i<"u"&&x!==null&&x.setDraggable(i)},[x,i]),c.useEffect(function(){typeof o<"u"&&x!==null&&x.setEditable(o)},[x,o]),c.useEffect(function(){typeof s<"u"&&x!==null&&x.setVisible(s)},[x,s]),c.useEffect(function(){typeof r=="number"&&x!==null&&x.setRadius(r)},[x,r]),c.useEffect(function(){typeof n<"u"&&x!==null&&x.setCenter(n)},[x,n]),c.useEffect(function(){x&&a&&(T!==null&&google.maps.event.removeListener(T),P(google.maps.event.addListener(x,"dblclick",a)))},[a]),c.useEffect(function(){x&&l&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(x,"dragend",l)))},[l]),c.useEffect(function(){x&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(x,"dragstart",u)))},[u]),c.useEffect(function(){x&&f&&(G!==null&&google.maps.event.removeListener(G),H(google.maps.event.addListener(x,"mousedown",f)))},[f]),c.useEffect(function(){x&&d&&(oe!==null&&google.maps.event.removeListener(oe),te(google.maps.event.addListener(x,"mousemove",d)))},[d]),c.useEffect(function(){x&&h&&(D!==null&&google.maps.event.removeListener(D),pe(google.maps.event.addListener(x,"mouseout",h)))},[h]),c.useEffect(function(){x&&v&&(Z!==null&&google.maps.event.removeListener(Z),De(google.maps.event.addListener(x,"mouseover",v)))},[v]),c.useEffect(function(){x&&y&&(ue!==null&&google.maps.event.removeListener(ue),_e(google.maps.event.addListener(x,"mouseup",y)))},[y]),c.useEffect(function(){x&&g&&(Ce!==null&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(x,"rightclick",g)))},[g]),c.useEffect(function(){x&&w&&(ke!==null&&google.maps.event.removeListener(ke),je(google.maps.event.addListener(x,"click",w)))},[w]),c.useEffect(function(){x&&C&&(We!==null&&google.maps.event.removeListener(We),re(google.maps.event.addListener(x,"drag",C)))},[C]),c.useEffect(function(){x&&L&&(q!==null&&google.maps.event.removeListener(q),Ge(google.maps.event.addListener(x,"center_changed",L)))},[w]),c.useEffect(function(){x&&m&&(bt!==null&&google.maps.event.removeListener(bt),ut(google.maps.event.addListener(x,"radius_changed",m)))},[m]),c.useEffect(function(){var se=new google.maps.Circle(K(K({},e||LC),{map:p}));return typeof r=="number"&&se.setRadius(r),typeof n<"u"&&se.setCenter(n),typeof r=="number"&&se.setRadius(r),typeof s<"u"&&se.setVisible(s),typeof o<"u"&&se.setEditable(o),typeof i<"u"&&se.setDraggable(i),a&&P(google.maps.event.addListener(se,"dblclick",a)),l&&B(google.maps.event.addListener(se,"dragend",l)),u&&z(google.maps.event.addListener(se,"dragstart",u)),f&&H(google.maps.event.addListener(se,"mousedown",f)),d&&te(google.maps.event.addListener(se,"mousemove",d)),h&&pe(google.maps.event.addListener(se,"mouseout",h)),v&&De(google.maps.event.addListener(se,"mouseover",v)),y&&_e(google.maps.event.addListener(se,"mouseup",y)),g&&Me(google.maps.event.addListener(se,"rightclick",g)),w&&je(google.maps.event.addListener(se,"click",w)),C&&re(google.maps.event.addListener(se,"drag",C)),L&&Ge(google.maps.event.addListener(se,"center_changed",L)),m&&ut(google.maps.event.addListener(se,"radius_changed",m)),M(se),_&&_(se),function(){T!==null&&google.maps.event.removeListener(T),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),G!==null&&google.maps.event.removeListener(G),oe!==null&&google.maps.event.removeListener(oe),D!==null&&google.maps.event.removeListener(D),Z!==null&&google.maps.event.removeListener(Z),ue!==null&&google.maps.event.removeListener(ue),Ce!==null&&google.maps.event.removeListener(Ce),ke!==null&&google.maps.event.removeListener(ke),q!==null&&google.maps.event.removeListener(q),bt!==null&&google.maps.event.removeListener(bt),E&&E(se),se.setMap(null)}},[]),null}c.memo(xC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Jc,eventMap:Qc,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),he(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var Yc={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Xc={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function EC(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,u=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,h=t.onRemoveProperty,v=t.onSetGeometry,y=t.onSetProperty,g=t.onLoad,w=t.onUnmount,C=c.useContext(le),L=c.useState(null),m=L[0],_=L[1],E=c.useState(null),p=E[0],b=E[1],x=c.useState(null),M=x[0],O=x[1],T=c.useState(null),P=T[0],R=T[1],I=c.useState(null),B=I[0],V=I[1],N=c.useState(null),z=N[0],Y=N[1],G=c.useState(null),H=G[0],Q=G[1],oe=c.useState(null),te=oe[0],ee=oe[1],D=c.useState(null),pe=D[0],Pe=D[1],Z=c.useState(null),De=Z[0],Ae=Z[1],ue=c.useState(null),_e=ue[0],Ve=ue[1],Ce=c.useState(null),Me=Ce[0],Ie=Ce[1],ke=c.useState(null),je=ke[0],ie=ke[1],We=c.useState(null),re=We[0],tt=We[1];return c.useEffect(function(){m!==null&&m.setMap(C)},[C]),c.useEffect(function(){m&&r&&(p!==null&&google.maps.event.removeListener(p),b(google.maps.event.addListener(m,"dblclick",r)))},[r]),c.useEffect(function(){m&&i&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(m,"mousedown",i)))},[i]),c.useEffect(function(){m&&o&&(P!==null&&google.maps.event.removeListener(P),R(google.maps.event.addListener(m,"mousemove",o)))},[o]),c.useEffect(function(){m&&s&&(B!==null&&google.maps.event.removeListener(B),V(google.maps.event.addListener(m,"mouseout",s)))},[s]),c.useEffect(function(){m&&a&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(m,"mouseover",a)))},[a]),c.useEffect(function(){m&&l&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(m,"mouseup",l)))},[l]),c.useEffect(function(){m&&u&&(te!==null&&google.maps.event.removeListener(te),ee(google.maps.event.addListener(m,"rightclick",u)))},[u]),c.useEffect(function(){m&&n&&(pe!==null&&google.maps.event.removeListener(pe),Pe(google.maps.event.addListener(m,"click",n)))},[n]),c.useEffect(function(){m&&f&&(De!==null&&google.maps.event.removeListener(De),Ae(google.maps.event.addListener(m,"addfeature",f)))},[f]),c.useEffect(function(){m&&d&&(_e!==null&&google.maps.event.removeListener(_e),Ve(google.maps.event.addListener(m,"removefeature",d)))},[d]),c.useEffect(function(){m&&h&&(Me!==null&&google.maps.event.removeListener(Me),Ie(google.maps.event.addListener(m,"removeproperty",h)))},[h]),c.useEffect(function(){m&&v&&(je!==null&&google.maps.event.removeListener(je),ie(google.maps.event.addListener(m,"setgeometry",v)))},[v]),c.useEffect(function(){m&&y&&(re!==null&&google.maps.event.removeListener(re),tt(google.maps.event.addListener(m,"setproperty",y)))},[y]),c.useEffect(function(){if(C!==null){var q=new google.maps.Data(K(K({},e||{}),{map:C}));r&&b(google.maps.event.addListener(q,"dblclick",r)),i&&O(google.maps.event.addListener(q,"mousedown",i)),o&&R(google.maps.event.addListener(q,"mousemove",o)),s&&V(google.maps.event.addListener(q,"mouseout",s)),a&&Y(google.maps.event.addListener(q,"mouseover",a)),l&&Q(google.maps.event.addListener(q,"mouseup",l)),u&&ee(google.maps.event.addListener(q,"rightclick",u)),n&&Pe(google.maps.event.addListener(q,"click",n)),f&&Ae(google.maps.event.addListener(q,"addfeature",f)),d&&Ve(google.maps.event.addListener(q,"removefeature",d)),h&&Ie(google.maps.event.addListener(q,"removeproperty",h)),v&&ie(google.maps.event.addListener(q,"setgeometry",v)),y&&tt(google.maps.event.addListener(q,"setproperty",y)),_(q),g&&g(q)}return function(){m&&(p!==null&&google.maps.event.removeListener(p),M!==null&&google.maps.event.removeListener(M),P!==null&&google.maps.event.removeListener(P),B!==null&&google.maps.event.removeListener(B),z!==null&&google.maps.event.removeListener(z),H!==null&&google.maps.event.removeListener(H),te!==null&&google.maps.event.removeListener(te),pe!==null&&google.maps.event.removeListener(pe),De!==null&&google.maps.event.removeListener(De),_e!==null&&google.maps.event.removeListener(_e),Me!==null&&google.maps.event.removeListener(Me),je!==null&&google.maps.event.removeListener(je),re!==null&&google.maps.event.removeListener(re),w&&w(m),m.setMap(null))}},[]),null}c.memo(EC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(K(K({},this.props.options||{}),{map:this.context}));this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:Xc,eventMap:Yc,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),he(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var ef={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},tf={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:tf,eventMap:ef,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),he(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);function vp(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function _C(t,e){return new e(t.lat,t.lng)}function MC(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function OC(t,e,n){return t instanceof e?t:n(t,e)}function PC(t,e,n){return t instanceof e?t:n(t,e)}function kC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function TC(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function mp(t,e,n,r){return n!==void 0?kC(t,e,PC(n,google.maps.LatLngBounds,MC)):TC(t,e,OC(r,google.maps.LatLng,_C))}function RC(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function DC(t,e,n,r,i){var o=function(s){Ue(a,s);function a(l,u,f,d){var h=s.call(this)||this;return h.container=l,h.pane=u,h.position=f,h.bounds=d,h}return a.prototype.onAdd=function(){var l,u=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];u==null||u.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),u=K({},this.container?vp(this.container,i):{x:0,y:0}),f=mp(l,u,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],y=v[0],g=v[1];this.container.style[y]=g}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function nf(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function rf(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function AC(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,u=c.useContext(le),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=c.useMemo(function(){return DC(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(d),d==null||d.setMap(u),function(){s==null||s(d),d==null||d.setMap(null)}},[u,d]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Af.createPortal(l,f)}c.memo(AC);(function(t){Ue(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();Ye(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=K({x:0,y:0},r.containerRef.current?vp(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=mp(o,s,r.props.bounds,r.props.position),l=r.state.containerStyle,u=l.left,f=l.top,d=l.width,h=l.height;RC(a,{left:u,top:f,width:d,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=c.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=nf(n.position),i=nf(this.props.position),o=rf(n.bounds),s=rf(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Af.createPortal(S.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=le,e})(c.PureComponent);function IC(){}var of={onDblClick:"dblclick",onClick:"click"},sf={opacity:function(t,e){t.setOpacity(e)}};function jC(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(le),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,K({},r));return l},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}c.memo(jC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,K(K({},this.props.options),{map:this.context}));this.registeredEvents=ce({updaterMap:sf,eventMap:of,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:sf,eventMap:of,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:IC},e.contextType=le,e})(c.PureComponent);var af={},lf={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function NC(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(le),s=c.useState(null),a=s[0],l=s[1];return c.useEffect(function(){google.maps.visualization||Ye(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){Ye(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(function(){var u=new google.maps.visualization.HeatmapLayer(K(K({},i||{}),{data:e,map:o}));return l(u),n&&n(u),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(NC);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){Ye(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Ye(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(K(K({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:lf,eventMap:af,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),he(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);var uf={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},cf={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:cf,eventMap:uf,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),he(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(c.PureComponent);var ff={onDirectionsChanged:"directions_changed"},df={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:df,eventMap:ff,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),he(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return S.jsx(S.Fragment,{})},e.contextType=le,e})(c.PureComponent);(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){Ye(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(c.PureComponent);var hf={onPlacesChanged:"places_changed"},pf={bounds:function(t,e){t.setBounds(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(Ye(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(he(this.registeredEvents),this.registeredEvents=ce({updaterMap:pf,eventMap:hf,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),he(this.registeredEvents))},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},e.contextType=le,e})(c.PureComponent);var gf={onPlaceChanged:"place_changed"},vf={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ue(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;Ye(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){he(this.registeredEvents),this.registeredEvents=ce({updaterMap:vf,eventMap:gf,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&he(this.registeredEvents)},e.prototype.render=function(){return S.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=le,e})(c.PureComponent);const BC="LocationBalloon-module__root__GtUl6q",FC="LocationBalloon-module__submit__lNcF4k",UC="LocationBalloon-module__details__--VOKk",VC="LocationBalloon-module__icon__X7DOVA",zC="LocationBalloon-module__header__5VQJDW",HC="LocationBalloon-module__titleContainer__BAO73U",$C="LocationBalloon-module__title__bX9pf8",WC="LocationBalloon-module__description__htav7b",GC="LocationBalloon-module__actions__c8dlOR",ZC="LocationBalloon-module__close__7Ujvya",Jt={root:BC,submit:FC,details:UC,icon:VC,header:zC,titleContainer:HC,title:$C,description:WC,actions:GC,close:ZC},qC={default:Od,llama:Pd},KC=({SSR:t,className:e,hideDetails:n,location:r,location_name:i,name:o,onCloseClick:s,onDetails:a,onSubmit:l})=>{var g;const{logo:u="default"}=Xe(),{isLoading:f,lmsData:d}=Ts(),h=(g=d==null?void 0:d.location)==null?void 0:g.what3words,v=!!(h!=null&&h.id),y=qC[u];return S.jsxs("div",{className:Se(Jt.root,e),children:[S.jsxs("div",{className:Jt.header,children:[S.jsxs("div",{className:Jt.titleContainer,children:[f?S.jsx(_t,{circle:!0,width:40,height:40}):S.jsx("div",{className:Jt.icon,children:S.jsx(y,{})}),f?S.jsx(_t,{width:200}):S.jsx("span",{className:Jt.title,children:o||"{{ properties.point.name }}"})]}),S.jsx("div",{className:Jt.close,children:S.jsx(ri,{position:"relative",onClick:s})})]}),S.jsxs("div",{className:Jt.description,children:[f?S.jsx(_t,{width:300}):(r==null?void 0:r.full_address)||"{{ properties.point.location.full_address }}",f?S.jsx(_t,{width:300}):i||"{{ properties.point.location_name }}"]}),f?S.jsx(_t,{width:150}):v&&S.jsx(zd,{what3words:h}),S.jsxs("div",{className:Jt.actions,children:[S.jsx(Bt,{id:Jp,variant:"primary",className:Jt.submit,disabled:f,onClick:l,children:t?"{ choose }":S.jsx(tr,{keyName:"choose",ns:"common"})}),!n&&S.jsxs(Bt,{id:Bf,as:"link",variant:"primary",className:Jt.details,disabled:f,onClick:a,children:[t?"{ details }":S.jsx(tr,{keyName:"details",ns:"common"}),S.jsx($h,{})]})]})]})},QC=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffcc00"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{hue:"#ff0000"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#c2c4c4"},{visibility:"on"}]}];function JC(t="#ffcc00"){return[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{visibility:"on"},{hue:"#ff0000"}]},{featureType:"landscape.man_made",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.man_made",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{lightness:"100"}]},{featureType:"landscape.natural",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.landcover",elementType:"geometry.fill",stylers:[{visibility:"on"}]},{featureType:"landscape.natural.terrain",elementType:"geometry",stylers:[{lightness:"100"}]},{featureType:"landscape.natural.terrain",elementType:"geometry.fill",stylers:[{visibility:"off"},{lightness:"23"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:t}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:t},{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#cccccc"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"}]}]}const YC={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},yp={optimized:!0},XC=({clusterer:t,handleCloseClick:e,handleDetailsClick:n,handlePointClick:r,handleSubmitClick:i,point:o})=>{const[s,a]=c.useState(null),{hideDetails:l,iconType:u,palette:f}=Xe(),{closeSamePoints:d}=sn(),h=on(x=>x.location),v=(f==null?void 0:f.primary)||"#fc0",y=u==="omni-llama"?kt.PinLlama:kt.PinOmnic,g=s==null?void 0:s.getVisible(),w=!!o&&(h==null?void 0:h.uid)===o.uid,C=vr("screenSm"),{isIdle:L}=be(),m=Tl({isSelectedPoint:w}),_=L&&w&&m&&g,E=c.useMemo(()=>{let x;if(o.type===30)switch(u){case"omni-llama":{w?x=kt.PinLlamaSelected:x=kt.PinLlama;break}case"we-chip":{w?x=kt.PinWeChipSelected:x=kt.PinWeChip;break}default:{w?x=kt.PinOmnicSelected:x=Pr(y,v);break}}else w?x=Pr(kt.PinPvz,"--owl-color-black"):x=Pr(kt.PinPvz,"--owl-color-grey-80");return yn(x,"Icon url is not defined"),{url:Pl(x)}},[o.type,w,u,y,v]),p=c.useMemo(()=>({lat:o.location.latitude,lng:o.location.longitude}),[o.location.latitude,o.location.longitude]),b=()=>{d(),r(o)};return S.jsx(up,{noClustererRedraw:!0,icon:E,position:p,clusterer:t,options:yp,onLoad:a,onClick:b,children:_&&!C&&S.jsx(gp,{children:S.jsx(KC,{...o,hideDetails:l,className:ot.balloon,onCloseClick:e,onSubmit:()=>i(o),onDetails:()=>n(o)})})},o.uid)},e5=({handleCloseClick:t,points:e,...n})=>{const{setSamePoints:r}=sn(),{onSamePointsClusterClick:i}=Xe();return S.jsx(X4,{zoomOnClick:!1,clusterClass:ot.cluster,onClick:o=>{t();const a=o.getMarkers().map(d=>{var h,v;return{lat:(h=d.getPosition())==null?void 0:h.lat(),lng:(v=d.getPosition())==null?void 0:v.lng()}}),{lat:l,lng:u}=a[0];if(a.every(d=>d.lat===l&&d.lng===u)){const d=e.filter(({location:{latitude:h,longitude:v}})=>h===l&&v===u);r(d),i==null||i(d)}else{const d=o.getMap();if(d instanceof google.maps.Map){const h=new window.google.maps.LatLngBounds;o.getMarkers().forEach(v=>{h.extend(v.getPosition())}),d.fitBounds(h)}}},onClusteringEnd:()=>{setTimeout(()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.addEventListener("touchstart",_a,{passive:!0})},100)},onUnmount:()=>{const o=document.getElementsByClassName(ot.cluster);for(const s of o)s.removeEventListener("touchstart",_a)},children:o=>S.jsx(S.Fragment,{children:e.map((s,a)=>S.jsx(XC,{clusterer:o,point:s,handleCloseClick:t,...n},s.uid+a))})})},t5=c.memo(e5),n5=t=>{const{locale:e}=Xe(),n=sn(cm),r=qt(Md),i=JSON.stringify([n.length,e,r==null?void 0:r.place_id]);return S.jsx(t5,{points:n,...t},i)},r5=c.memo(n5),bp=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},U.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),U.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),U.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),i5="DeliveryBalloon-module__root__Nu90iy",o5="DeliveryBalloon-module__details__eqUTaI",s5="DeliveryBalloon-module__header__JVdyxN",a5="DeliveryBalloon-module__title__-zKKCt",l5="DeliveryBalloon-module__description__no5-ki",u5="DeliveryBalloon-module__actions__C-N0H-",c5="DeliveryBalloon-module__errorVariant__e6uhZl",f5="DeliveryBalloon-module__logo__62gC5h",xn={root:i5,details:o5,header:s5,title:a5,description:l5,actions:u5,errorVariant:c5,logo:f5},d5=({SSR:t,address:e,className:n,hasCloseButton:r,hideDetails:i,onClose:o,onDetails:s,variant:a})=>{const l=a==="error",u=a==="default",f=t?"{ courier_balloon.title }":S.jsx(tr,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":S.jsx(tr,{keyName:"error_title",ns:"courier_balloon"}),h=t?"{ courier_balloon.error_description }":S.jsx(tr,{keyName:"error_description",ns:"courier_balloon"});return S.jsxs("div",{className:Se(xn.root,n,xn[`${a}Variant`]),children:[S.jsxs("div",{className:xn.header,children:[S.jsx(bp,{className:xn.logo}),S.jsx("span",{className:xn.title,children:l?d:f}),r&&S.jsx(ri,{onClick:o})]}),S.jsx("div",{className:xn.description,children:l?h:e||"{{ properties.address }}"}),u&&!i&&S.jsx("div",{className:xn.actions,children:S.jsx(Bt,{id:Bf,as:"button",variant:"primary",className:xn.details,onClick:s,children:t?"{ details }":S.jsx(tr,{keyName:"details",ns:"common"})})})]})},h5="Chip-module__root__zsoSyP",p5="Chip-module__active__BlTSFB",mf={root:h5,active:p5},yf=({active:t,children:e,className:n,...r})=>S.jsx("div",{...r,className:Se(mf.root,n,{[mf.active]:t}),children:e}),g5="TextArea-module__root__8YFknR",v5={root:g5},bf=c.forwardRef(({className:t,inputRef:e,onBlur:n,onChange:r,onFocus:i,...o},s)=>{const a=c.useRef(null);c.useImperativeHandle(s,()=>({focus:()=>{var u,f;(u=a.current)==null||u.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var u,f;(u=a.current)==null||u.blur(),n&&n({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:u=>{r&&r({target:{value:u}}),a.current&&(a.current.value=u)}}),[n,r,i]);const l=wp(e,a);return S.jsx("textarea",{...o,ref:l,className:Se(v5.root,t),onBlur:n,onFocus:i,onChange:r})}),m5=({hideDeliveryTime:t,set:e})=>(n,r)=>{let i={...n};switch(r.type){case"SET_COMMENT":{i={...n,comment:r.payload};break}case"SET_DELIVERY_TIME":{i={...n,delivery_time:r.payload};break}case"SET_APARTMENT_NUMBER":{i={...n,apartment_number:r.payload};break}}return i.meta={...i.meta,valid:(t||!!i.delivery_time)&&!!i.apartment_number},e==null||e(i),i},y5="DeliveryDetailsView-module__title__azeoUr",b5="DeliveryDetailsView-module__logo__4zZtpM",C5="DeliveryDetailsView-module__header__oDE9He",w5="DeliveryDetailsView-module__content__6P27SY",S5="DeliveryDetailsView-module__section__2M3Qip",L5="DeliveryDetailsView-module__chips__KmYgha",x5="DeliveryDetailsView-module__actions__43XZ-V",E5="DeliveryDetailsView-module__submit__58LKBw",_5="DeliveryDetailsView-module__actionsHidden__SW-67b",M5="DeliveryDetailsView-module__commentSection__GlX1A2",O5="DeliveryDetailsView-module__comment__2pGG6h",Lt={title:y5,logo:b5,header:C5,content:w5,section:S5,chips:L5,actions:x5,submit:E5,actionsHidden:_5,commentSection:M5,comment:O5},P5=c.forwardRef(({classes:t,hideActions:e,location:n,onChange:r,onClose:i,onSubmit:o},s)=>{var p;const{hideDeliveryTime:a,inputs:l,locale:u}=Xe(),{t:f}=ln(["details_modal","courier_balloon","common"]),d=c.useMemo(()=>m5({set:r,hideDeliveryTime:a}),[a,r]),[h,v]=c.useState(!1),[y,g]=c.useReducer(d,{comment:"",delivery_time:"",apartment_number:"",...n}),w=c.useCallback(async()=>{v(!0);try{yn(n.address,"Address is required");const b=await Fp({address:n.address,algorithm:10,service:10,language:u||Ff});if(!vd(b))return;const x=b==null?void 0:b.data.data,M={...y,address:x};return o==null||o(M),M}finally{v(!1)}},[u,n.address,o,y]);c.useImperativeHandle(s,()=>({submit:w}),[w]);const C=b=>()=>{g({payload:b,type:"SET_DELIVERY_TIME"})},L=b=>{g({payload:b.target.value,type:"SET_APARTMENT_NUMBER"})},m=b=>{g({payload:b.target.value,type:"SET_COMMENT"})},_=Ss(l==null?void 0:l.apartment),E=Ss(l==null?void 0:l.comment);return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(Lt.header,t==null?void 0:t.header),children:[S.jsx(ri,{onClick:i}),S.jsxs("div",{className:Lt.title,children:[S.jsx(bp,{className:Lt.logo}),S.jsx("span",{children:f("title",{ns:"courier_balloon"})})]})]}),S.jsxs("div",{className:Se(Lt.content,t==null?void 0:t.content),children:[S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("address"),":"]}),S.jsx("p",{children:n.address})]}),!a&&S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("delivery_time"),":"]}),S.jsxs("div",{className:Lt.chips,children:[S.jsx(yf,{active:y.delivery_time==="8:00-13:00",onClick:C("8:00-13:00"),children:"8:00 - 13:00"}),S.jsx(yf,{active:y.delivery_time==="14:00-22:00",onClick:C("14:00-22:00"),children:"14:00 - 22:00"})]})]}),S.jsxs("section",{className:Lt.section,children:[S.jsxs("span",{children:[f("apartment_number"),":"]}),S.jsx(bf,{..._,rows:1,onChange:L})]}),S.jsxs("section",{className:Se(Lt.section,Lt.commentSection),children:[S.jsxs("span",{children:[f("comment"),":"]}),S.jsx(bf,{...E,className:Lt.comment,onChange:m})]})]}),S.jsx("div",{className:Se(Lt.actions,{[Lt.actionsHidden]:e}),children:S.jsx(Bt,{loading:h,disabled:!((p=y.meta)!=null&&p.valid)||h,variant:"primary",className:Lt.submit,onClick:w,children:f("choose",{ns:"common"})})})]})}),Cp=c.memo(P5),k5={header:ot.deliveryDetailsViewHeader,content:ot.deliveryDetailsViewContent},T5=({hideDeliveryTime:t,hideDetails:e,onPointClick:n,point:r,setDeliveryPoint:i,setOpenDetails:o})=>{const s=Tl({isSelectedPoint:!0}),a=c.useRef(null),[l,u]=c.useState(!1),[f,d]=c.useState({...r,comment:"",delivery_time:"",apartment_number:""});c.useEffect(()=>{d({...r,comment:"",delivery_time:"",apartment_number:""})},[r]);const[h,v]=c.useState(null),y=vr("screenSm"),g=c.useMemo(()=>({lat:f.coords[0],lng:f.coords[1]}),[f.coords]),w=()=>{o==null||o(!0)},C=()=>{i==null||i(null)},L=c.useMemo(()=>({url:Pl(Pr(kt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Yp)}),[]),m=async()=>{var b;try{u(!0);const x=await((b=a.current)==null?void 0:b.submit());if(!x)return;n==null||n(x),o==null||o(!1),i==null||i(null)}finally{u(!1)}},_=S.jsx(d5,{...f,hideDetails:e,hasCloseButton:y,variant:f.address?"default":"error",className:ot.balloon,onDetails:w,onClose:C}),E=s&&!!(h!=null&&h.getVisible()),p=t?!!f.apartment_number:!!f.apartment_number&&!!f.delivery_time;return S.jsxs(up,{noClustererRedraw:!0,icon:L,position:g,options:yp,onLoad:v,children:[y&&S.jsxs(zh,{minSnapHeight:f.address?200:void 0,submitDisabled:!p||l,submitLoading:l,hideFooter:!f.address,open:E,onDismiss:C,onSubmitClick:m,children:[f.address&&S.jsx(Cp,{ref:a,hideActions:!0,classes:k5,location:r,onChange:d,onClose:C}),!f.address&&_]}),!y&&E&&S.jsx(gp,{onCloseClick:C,children:_})]})},R5=({children:t,className:e,...n})=>{const{disableDelivery:r,map:i,mapTheme:o,palette:s}=Xe(),a=s==null?void 0:s.primary;function l(){switch(o){case"omnic":return QC;case"omnic-light":return JC(a);default:return}}const u=l(),f=c.useMemo(()=>{var h,v;return{lat:((h=i==null?void 0:i.center)==null?void 0:h[0])??ya[0],lng:((v=i==null?void 0:i.center)==null?void 0:v[1])??ya[1]}},[i==null?void 0:i.center]),d=c.useCallback(async h=>{const{latLng:v}=h;if(!v||r)return;be.getState().setDetailsOpen(!1),on.getState().setSelectedLocation(null);const y=[v.lat(),v.lng()];console.debug("[OmnicLocationsWidget::mapClick]",y);try{await qt.getState().setPlaceAndPoint(y)}catch{Ot.getState().setDeliverPoint({address:null,coords:y})}},[r]);return S.jsx(A4,{zoom:i==null?void 0:i.initialZoom,center:f,mapContainerClassName:Se(ot.root,e),options:{styles:u,...YC},onClick:d,...n,children:t})},D5=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),U.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),U.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),U.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),U.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),A5=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(ot.mapControl),n.classList.add(ot.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},I5=t=>{const e=document.createElement("div");e.classList.add(ot.mapControl),e.classList.add(ot.geolocationControl),e.innerHTML=zp.renderToString(S.jsx(D5,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{Ol(async n=>{const{latitude:r,longitude:i}=n.coords,o=[r,i];await qt.getState().setPlaceAndPoint(o)})})},j5=({className:t})=>{const e=Vn(),n=be(Gf),r=be(Dg),i=sn(yd),o=Ot(Cl),{lmsData:s}=Ts(),{disableGeolocation:a,hideDeliveryTime:l,hideDetails:u,hideMapControls:f,onPointClick:d,skipPointInfo:h}=Xe(),v=c.useCallback(M=>{console.debug("[OmnicLocationsWidget::loadMap]",M),be.getState().setMap(M),f||(A5(M),a||I5(M))},[a,f]),y=c.useCallback(M=>{const O=s==null?void 0:s.location.what3words,T=O!=null&&O.id?O:void 0;d==null||d(M,T)},[d,s]),g=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::unmountMap]"),be.getState().setMap(null)},[]),w=c.useCallback(()=>{if(be.getState().setIdle(!0),!n)return;const M=n==null?void 0:n.getBounds();M&&(console.debug("[OmnicLocationsWidget::changeBounds]",M),sn.getState().loadNext([[M.getSouthWest().lat(),M.getNorthEast().lat()],[M.getSouthWest().lng(),M.getNorthEast().lng()]],e))},[e,n]),C=c.useCallback(async M=>{if(Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(M),!M)return;const O=[M.location.latitude,M.location.longitude];console.debug("[OmnicLocationsWidget::selectPoint]",O),await qt.getState().setPlace(O)},[]),L=c.useCallback(()=>{console.debug("[OmnicLocationsWidget::tilesLoaded]")},[]),m=be.getState().setDetailsOpen,{getLMSData:_}=S4(),E=M=>{if(_(M.code),h){y(M);return}m(!1),C(M)},p=()=>{m(!1),C(null)},b=M=>{m(!0),C(M)},x=M=>{y(M),m(!1),C(null)};return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:Se(ot.mapContainer,t),children:[S.jsxs(R5,{onIdle:w,onLoad:v,onUnmount:g,onTilesLoaded:L,onBoundsChanged:()=>{be.getState().setIdle(!1)},children:[o&&S.jsx(T5,{hideDeliveryTime:l,hideDetails:u,point:o,setOpenDetails:be.getState().setDetailsOpen,setDeliveryPoint:Ot.getState().setDeliverPoint,onPointClick:y}),S.jsx(r5,{handleCloseClick:p,handleDetailsClick:b,handlePointClick:E,handleSubmitClick:x})]}),(i||r)&&S.jsx(Hh,{className:ot.overlay,children:S.jsx(as,{})})]}),S.jsx(U3,{handleDetailsClick:b,handlePointClick:E}),S.jsx(p3,{handleCloseClick:p,handleSubmitClick:x})]})},N5=c.memo(j5),B5=t=>({google:N5})[t];function wp(...t){return c.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const Ss=t=>{const e=c.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},F5=()=>{throw new Error("useMediaQuery is a client-only hook")};function U5(t){const e=c.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return c.useSyncExternalStore(e,n,F5)}const V5="768px",z5="1024px",H5="1280px",$5="1536px",W5={screenSm:V5,screenMd:z5,screenLg:H5,screenXl:$5};function vr(t){return U5(`(max-width: calc(${W5[t]} - 1px))`)}const G5=(t,e,n)=>{const{disableGeolocation:r}=n??{},i=be(Gf);c.useEffect(()=>{i&&(console.debug("[OmnicWidgetLocations::setMapLoaded]",i),be.getState().setLoaded())},[i]);const o=t[0],s=t[1];c.useEffect(()=>{if(!i)return;const a=[o,s],l=async()=>{console.debug("[OmnicWidgetLocations::setFallbackCenter]",a),qt.getState().setPlace(a,[],"country")};if(r){l();return}Ol(async u=>{const{latitude:f,longitude:d}=u.coords,h=[f,d];console.debug("[OmnicWidgetLocations::setGeoPosition]",h),await qt.getState().setPlace(h,[],"country")},()=>l())},[o,s,i,e,r])},Sp=M0().use(p0()).use(o0()).init({language:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwentkga2g4zdngbzwozdinvztezlknu4xmnlpnbrgc"}),Z5=t=>{c.useEffect(()=>{t&&(Sp.changeLanguage(t),os.setLanguage(t))},[t])},q5=t=>{c.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&so(`--owl-color-${n}`,r)}}},[t])},K5=t=>{c.useEffect(()=>{t&&t!==void 0&&so("--owl-button-radius",`${t}px`)},[t])},Q5=t=>{c.useEffect(()=>{t&&t!==void 0&&so("--owl-font",t)},[t])},J5={open:!1},Y5=t=>t.open,er=bn(t=>({...J5,toggle(e){t(n=>({open:e??!n.open}))}})),X5=t=>{const e=t==="selector";c.useEffect(()=>{e&&er.getState().toggle(!0)},[e])},ew=({locale:t})=>{const[e,n]=c.useState(!1);return c.useEffect(()=>{n(!1)},[t]),c.useEffect(()=>{e||n(!0)},[e]),console.debug("[OmnicWidgetLocations::remount]",{locale:t,mounted:e}),e},tw=t=>{c.useEffect(()=>{t==="sharp"&&so("--owl-radius","0")},[t])},nw=({children:t})=>{const{cornersVariant:e,font:n,locale:r,palette:i,radius:o,startScreen:s}=Xe();return Q5(n),Z5(r),q5(i),K5(o),X5(s),tw(e),S.jsx(S.Fragment,{children:t})},rw=({children:t})=>{const{disableGeolocation:e,map:n}=Xe();return yn(n==null?void 0:n.center,"Map center is required"),yn(n==null?void 0:n.initialZoom,"Map initial zoom is required"),G5(n.center,n.initialZoom,{disableGeolocation:e}),S.jsx(S.Fragment,{children:t})},iw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},U.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),ow=()=>{er.getState().toggle(!0),be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null)},sw="CurrentLocation-module__root__AeQCGT",aw="CurrentLocation-module__icon__459m9q",lw="CurrentLocation-module__text__w-9v28",ha={root:sw,icon:aw,text:lw},Lp=({className:t})=>{const{t:e}=ln("current_location"),n=qt(Md),r=qt(km);return S.jsxs("div",{role:"presentation",className:Se(ha.root,t),onClick:ow,children:[S.jsx(iw,{className:ha.icon}),S.jsxs("span",{className:ha.text,children:[!n&&e("choose_from_map"),n&&`${(r==null?void 0:r.long_name)??n.formatted_address}`]})]})},uw=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},U.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),cw=t=>U.createElement("svg",{width:119,height:44,viewBox:"0 0 119 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},U.createElement("path",{d:"M4.70489 0.199253H0V13.4418H10.7452V10.0105H4.70489V0.199253Z",fill:"black"}),U.createElement("path",{d:"M16.9359 0.199253H12.2287V13.4418H22.974V10.0105H16.9359V0.199253Z",fill:"black"}),U.createElement("path",{d:"M27.9807 0.199253L23.6569 13.4418H28.3442L28.9701 10.913H32.5644L33.1703 13.4418H37.9766L33.6354 0.199253H27.9807ZM29.6775 8.00558L30.7881 3.41028L31.879 8.00558H29.6775Z",fill:"black"}),U.createElement("path",{d:"M48.1266 6.0777L47.5404 8.54701H47.5008L46.9146 6.0777L45.3786 0.199253H38.7936V13.4418H42.9146V8.84631L42.8551 4.39405H42.9345L45.48 13.4418H49.2373L51.8222 4.39405H51.8817L51.8222 8.84631V13.4418H55.9233V0.199253H49.6626L48.1266 6.0777Z",fill:"black"}),U.createElement("path",{d:"M61.057 0.199253L56.7333 13.4418H61.4206L62.0465 10.913H65.6429L66.2489 13.4418H71.0552L66.7139 0.199253H61.057ZM62.7539 8.00558L63.8645 3.41028L64.9553 8.00558H62.7539Z",fill:"black"}),U.createElement("path",{d:"M85.656 6.77975C86.6916 6.6323 87.4541 6.28455 87.9389 5.73657C88.4238 5.18853 88.6662 4.51949 88.6662 3.72939C88.6662 2.55195 88.2562 1.67601 87.4344 1.1016C86.6145 0.513972 85.3607 0.212458 83.677 0.199253H76.0413V13.4418H84.2015C85.8301 13.4418 87.0354 13.1533 87.8177 12.5789C88.611 11.9913 89.0099 11.1132 89.0099 9.95118C89.0099 9.09505 88.7411 8.38636 88.2011 7.82518C87.6612 7.26393 86.8151 6.9228 85.656 6.80175V6.77975ZM80.5455 3.41028H82.6457C83.4545 3.41028 83.8577 3.7316 83.8577 4.37425C83.8577 5.01689 83.4545 5.33822 82.6457 5.33822H80.5455V3.41028ZM83.8797 10.1492C83.677 10.312 83.3685 10.3913 82.952 10.3913H80.5499V8.46561H82.952C83.3685 8.46561 83.6792 8.54701 83.8797 8.70549C84.0957 8.86619 84.2015 9.09945 84.2015 9.40754C84.2015 9.71567 84.0935 9.97757 83.8797 10.1492Z",fill:"black"}),U.createElement("path",{d:"M114.374 6.72035L118.616 0.199253H113.485L111.91 3.51152L110.354 0.199253H104.801L109.063 6.8414L104.638 13.4418H109.951L111.566 10.0105L113.325 13.4418H118.999L114.374 6.72035Z",fill:"black"}),U.createElement("path",{d:"M102.472 0.378544C102.053 0.125449 101.59 0 101.086 0H93.0312C92.5242 0 92.0549 0.127649 91.6252 0.378544C91.1931 0.631642 90.8517 0.972769 90.5982 1.40194C90.3448 1.8201 90.217 2.28667 90.217 2.80386V10.8369C90.217 11.3432 90.3448 11.8097 90.5982 12.2388C90.8517 12.6681 91.1931 13.0092 91.6252 13.2622C92.0549 13.5152 92.5242 13.6407 93.0312 13.6407H101.086C101.593 13.6407 102.053 13.513 102.472 13.2622C102.902 13.0092 103.245 12.6681 103.497 12.2388C103.763 11.8097 103.895 11.341 103.895 10.8369V2.80606C103.895 2.28667 103.761 1.8201 103.497 1.40414C103.243 0.974969 102.902 0.633842 102.472 0.380745V0.378544ZM100.116 9.89279H93.9611V3.75243H100.116V9.89279Z",fill:"black"}),U.createElement("path",{d:"M43.3879 27.3704C42.6166 26.8512 41.7372 26.4993 40.7478 26.3145L44.9726 21.5605H40.8226L36.1199 26.794V30.7935C37.0917 30.4415 37.9887 30.2655 38.8107 30.2655C39.5644 30.2655 40.2101 30.4085 40.7478 30.6923C41.6204 31.1455 42.0569 31.8319 42.0569 32.7559V32.8307C42.0569 33.1827 41.973 33.4269 41.8056 33.5611C41.6558 33.6953 41.3692 33.7635 40.9505 33.7635H32.8715C32.2345 33.7635 31.7983 33.6469 31.5625 33.4115C31.3444 33.1607 31.2363 32.6987 31.2363 32.0277V26.3431L27.0866 28.532V32.6569C27.0866 33.0925 27.0117 33.3873 26.8595 33.5369C26.7075 33.6887 26.4144 33.7635 25.9803 33.7635H23.7412C23.305 33.7635 23.0118 33.6887 22.8619 33.5369C22.7121 33.3851 22.6349 33.0925 22.6349 32.6569V26.8468L18.4852 29.0357V32.6591C18.4852 33.0947 18.4103 33.3895 18.2583 33.5391C18.1084 33.6909 17.8131 33.7657 17.379 33.7657H15.1664C14.73 33.7657 14.4369 33.6909 14.2871 33.5391C14.1372 33.3873 14.06 33.0947 14.06 32.6591V27.3506L9.91037 29.5395V35.9282C9.91037 37.6727 8.92967 38.5439 6.96835 38.5439C6.02952 38.5439 5.28242 38.2073 4.72931 37.5386C4.17615 36.8522 3.89848 35.9458 3.89848 34.8216C3.89848 33.6975 4.18276 32.5161 4.75355 31.4249L0.830824 32.2543C0.277676 33.2113 0 34.3091 0 35.5498C0 37.2944 0.50246 38.8033 1.50958 40.0771C2.801 41.7381 4.61911 42.5674 6.96835 42.5674C8.6454 42.5674 10.0779 42.1736 11.2701 41.3861C12.5946 40.5149 13.4497 39.2895 13.8353 37.7123C14.1372 37.7629 14.4568 37.7871 14.7917 37.7871H18.0114C19.0009 37.7365 19.8559 37.4858 20.5767 37.0326C21.3655 37.5364 22.2956 37.7871 23.3689 37.7871H26.5885C27.7125 37.7365 28.6513 37.4352 29.405 36.8808C30.3262 37.4836 31.4259 37.7871 32.6996 37.7871H41.3581C42.7157 37.7871 43.8309 37.4022 44.7036 36.63C45.7107 35.7566 46.2132 34.5334 46.2132 32.9561V32.7053C46.2132 30.3909 45.2745 28.6134 43.3967 27.3726L43.3879 27.3704Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M66.0266 39.8246C65.4051 39.8246 64.9026 40.0094 64.517 40.3789C64.1313 40.7639 63.9397 41.2677 63.9397 41.8881C63.9397 42.5084 64.1335 43.0123 64.517 43.3973C64.9026 43.7998 65.4051 44 66.0266 44C66.648 44 67.1416 43.8064 67.5097 43.4215C67.8953 43.0365 68.0869 42.5238 68.0869 41.8881C68.0869 41.2523 67.8931 40.7639 67.5097 40.3789C67.1416 40.0094 66.6458 39.8246 66.0266 39.8246Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M65.0208 32.6578C65.0208 33.0933 64.9459 33.3881 64.7938 33.5377C64.6418 33.6896 64.3487 33.7644 63.9124 33.7644H59.5733V30.6954C59.5733 29.3205 59.1788 28.2051 58.3922 27.3495C57.4864 26.3441 56.2038 25.8403 54.5444 25.8403C53.002 25.8403 51.752 26.3353 50.7956 27.3253C49.74 28.4165 49.2111 29.9079 49.2111 31.802C49.2111 33.1109 49.6143 34.2835 50.4187 35.3241C51.3751 36.5494 52.6666 37.2862 54.2932 37.5372C54.745 37.6032 55.124 37.6472 55.4259 37.6626C55.3599 37.997 55.124 38.283 54.7207 38.5182C54.3351 38.769 53.9076 38.8946 53.4382 38.8946C52.532 38.8946 51.5339 38.5754 50.4452 37.9398V41.5366C51.5691 42.2229 52.6841 42.5683 53.7908 42.5683C55.1835 42.5683 56.3979 42.1987 57.438 41.4619C58.6962 40.5731 59.3993 39.3478 59.5513 37.788H64.2936C65.6691 37.788 66.793 37.3942 67.6635 36.6044C68.6684 35.6981 69.173 34.4485 69.173 32.8558V26.3397L65.0235 28.5285V32.6534L65.0208 32.6578ZM55.4259 33.6896C55.3599 33.672 55.2674 33.6654 55.1484 33.6654C54.864 33.6147 54.6612 33.573 54.5444 33.5399C53.707 33.3221 53.2861 32.693 53.2861 31.6524C53.2861 30.3787 53.7048 29.7407 54.5444 29.7407C55.1306 29.7407 55.4237 30.0597 55.4237 30.6977V33.6918L55.4259 33.6896Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M95.419 25.837C94.0615 25.837 92.9465 26.2221 92.0734 26.9942C91.0839 27.883 90.5903 29.1149 90.5903 30.6923V32.6547C90.5903 33.0903 90.5155 33.3851 90.3633 33.5347C90.2135 33.6865 89.9182 33.7613 89.4839 33.7613H85.3124C84.8761 33.7613 84.583 33.6865 84.431 33.5347C84.2811 33.3829 84.204 33.0903 84.204 32.6547V21.5605L80.0544 23.7495V32.8571C80.0544 34.2497 80.4489 35.3892 81.2357 36.278C82.1237 37.2834 83.3556 37.7871 84.9334 37.7871H89.8587C90.8305 37.7871 91.6943 37.5782 92.4507 37.158C93.2726 37.5782 94.3282 37.7871 95.6196 37.7871C97.0608 37.7871 98.2354 37.2922 99.1411 36.3022C100.181 35.1956 100.701 33.6953 100.701 31.7989C100.701 30.1731 100.292 28.8224 99.4694 27.7489C98.513 26.4751 97.1644 25.837 95.419 25.837ZM95.3948 33.7613C94.9584 33.7613 94.7403 33.5853 94.7403 33.2333V30.5427C94.7403 30.0059 94.9673 29.7375 95.419 29.7375C96.2234 29.7375 96.6267 30.3755 96.6267 31.6493C96.6267 33.0573 96.2168 33.7635 95.3948 33.7635V33.7613Z",fill:"#6A4A9D"}),U.createElement("path",{d:"M114.85 32.0277C114.85 32.6987 114.734 33.1607 114.498 33.4115C114.28 33.6469 113.852 33.7635 113.215 33.7635H112.31V24.8317L108.159 27.0448V33.7613H105.167L103.08 37.7871H113.392C115.036 37.7871 116.36 37.2921 117.365 36.3021C118.456 35.2462 119 33.8295 119 32.0497V21.5605L114.85 23.7737V32.0277Z",fill:"#6A4A9D"})),fw="Header-module__root__Pe4MYp",dw="Header-module__nav__wtnkmT",hw="Header-module__navItem__-Fy63Z",pw="Header-module__logo__xO2bWO",Mi={root:fw,nav:dw,navItem:hw,logo:pw},gw={llama:cw,default:uw},vw=()=>{const{hideLogo:t,logo:e="default"}=Xe();if(t)return null;const n=gw[e];return S.jsx("div",{className:Mi.logo,children:S.jsx(n,{})})},mw=({className:t})=>{const{t:e}=ln("header"),{disableDelivery:n}=Xe(),r=be(Pg),i=Ot(Cl);c.useEffect(()=>{i?be.getState().setMode("location_delivery"):be.getState().setMode("self_pickup")},[i]);const o=()=>{Ot.getState().setDeliverPoint(null),be.getState().setMode("self_pickup")},s=()=>{Ot.getState().setDeliverPoint(null),be.getState().setMode("location_delivery")},a=r==="self_pickup",l=r==="location_delivery";return S.jsxs("div",{className:Se(Mi.root,t),children:[S.jsx(vw,{}),S.jsxs("nav",{className:Mi.nav,children:[!n&&S.jsx(Bt,{as:"link",className:Mi.navItem,variant:a?"primary":"secondary",onClick:o,children:e("self_pickup")}),!n&&S.jsx(Bt,{as:"link",className:Mi.navItem,variant:l?"primary":"secondary",onClick:s,children:e("courier_delivery")}),S.jsx(Lp,{})]})]})},yw=c.memo(mw),bw={open:!1},Xr=bn(t=>({...bw,toggle(e){be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),t(n=>({open:e??!n.open}))}})),Cw="Layout-module__root__qzPL-f",ww="Layout-module__headerHidden__JEN-d0",Sw="Layout-module__sidebarHidden__x017O3",Lw="Layout-module__sidebarOpen__IZnIjs",Uo={root:Cw,headerHidden:ww,sidebarHidden:Sw,sidebarOpen:Lw},xw=({children:t})=>{const{hideFilters:e,hideHeader:n}=Xe(),r=Xr(i=>i.open);return S.jsx("div",{className:Se(Uo.root,{[Uo.sidebarOpen]:r,[Uo.headerHidden]:n,[Uo.sidebarHidden]:e}),children:t})},Ns=()=>S.jsx(Hh,{children:S.jsx(as,{})}),Ew=({children:t})=>{const e=sn(fm);return sn(yd)&&!e?S.jsx(Ns,{}):S.jsx(S.Fragment,{children:t})};var xp={},Bs={},Ep={exports:{}},_w="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Mw=_w,Ow=Mw;function _p(){}function Mp(){}Mp.resetWarningCache=_p;var Pw=function(){function t(r,i,o,s,a,l){if(l!==Ow){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Mp,resetWarningCache:_p};return n.PropTypes=n,n};Ep.exports=Pw();var kw=Ep.exports,Fs={},ei={};Object.defineProperty(ei,"__esModule",{value:!0});ei.loadGoogleMapScript=ei.isBrowser=void 0;var Op=typeof window<"u"&&window.document;ei.isBrowser=Op;var Tw=function(e,n){if(!Op||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};ei.loadGoogleMapScript=Tw;var Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var Rw="https://maps.googleapis.com/maps/api/js";Us.GOOGLE_MAP_SCRIPT_BASE_URL=Rw;function ns(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ns=function(n){return typeof n}:ns=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ns(t)}Object.defineProperty(Fs,"__esModule",{value:!0});Fs.default=Bw;var xt=Aw(c),pa=ei,Dw=Us;function Pp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Pp=function(i){return i?n:e})(t)}function Aw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||ns(t)!=="object"&&typeof t!="function")return{default:t};var n=Pp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Cf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function wf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cf(Object(n),!0).forEach(function(r){Iw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jw(t,e){if(t==null)return{};var n=Nw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Nw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Bw(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var u=l.types,f=u===void 0?["(cities)"]:u,d=l.componentRestrictions,h=l.fields,v=h===void 0?["address_components","geometry.location","place_id","formatted_address"]:h,y=l.bounds,g=jw(l,["types","componentRestrictions","fields","bounds"]),w=t.googleMapsScriptBaseUrl,C=w===void 0?Dw.GOOGLE_MAP_SCRIPT_BASE_URL:w,L=t.language,m=(0,xt.useRef)(null),_=(0,xt.useRef)(null),E=(0,xt.useRef)(null),p=(0,xt.useRef)(null),b=L?"&language=".concat(L):"",x="".concat(C,"?libraries=").concat(o,"&key=").concat(r).concat(b),M=(0,xt.useCallback)(function(){return(0,pa.loadGoogleMapScript)(C,x)},[C,x]);return(0,xt.useEffect)(function(){var O=wf(wf({},g),{},{fields:v,types:f,bounds:y});if(d&&(O.componentRestrictions=d),!(E.current||!m.current||!pa.isBrowser)){e&&!e.current&&(e.current=m.current);var T=function(){var R;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((R=google.maps)!==null&&R!==void 0&&R.places))return console.error("Google maps places API must be loaded.");if(!m.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(m.current,O),E.current&&(_.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),m.current,E.current)}))};return r?M().then(function(){return T()}):T(),function(){return _.current?_.current.remove():void 0}}},[]),(0,xt.useEffect)(function(){var O;!(xt.default!==null&&xt.default!==void 0&&(O=xt.default.version)!==null&&O!==void 0&&O.startsWith("18"))&&pa.isBrowser&&window.MutationObserver&&m.current&&m.current instanceof HTMLInputElement&&(p.current=new MutationObserver(function(){p.current.disconnect(),m.current&&(m.current.autocomplete=a)}),p.current.observe(m.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,xt.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,xt.useEffect)(function(){E.current&&E.current.setBounds(y)},[y]),(0,xt.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,xt.useEffect)(function(){E.current&&E.current.setOptions(g)},[g]),{ref:m,autocompleteRef:E}}function rs(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(n){return typeof n}:rs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rs(t)}Object.defineProperty(Bs,"__esModule",{value:!0});Bs.default=void 0;var yl=Uw(c),Je=kp(kw),Fw=kp(Fs);function kp(t){return t&&t.__esModule?t:{default:t}}function Tp(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Tp=function(i){return i?n:e})(t)}function Uw(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||rs(t)!=="object"&&typeof t!="function")return{default:t};var n=Tp(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Ls(){return Ls=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ls.apply(this,arguments)}function Vw(t,e){if(t==null)return{};var n=zw(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Rp(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,u=Vw(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,Fw.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return yl.default.createElement("input",Ls({ref:d},u))}Rp.propTypes={apiKey:Je.default.string,libraries:Je.default.arrayOf(Je.default.string),ref:Je.default.oneOfType([Je.default.func,Je.default.shape({current:Je.default.any})]),googleMapsScriptBaseUrl:Je.default.string,onPlaceSelected:Je.default.func,inputAutocompleteValue:Je.default.string,options:Je.default.shape({componentRestrictions:Je.default.object,bounds:Je.default.object,location:Je.default.object,offset:Je.default.number,origin:Je.default.object,radius:Je.default.number,sessionToken:Je.default.object,types:Je.default.arrayOf(Je.default.string)}),language:Je.default.string};var Hw=(0,yl.forwardRef)(function(t,e){return yl.default.createElement(Rp,Ls({},t,{refProp:e}))});Bs.default=Hw;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Bs),n=r(Fs);function r(i){return i&&i.__esModule?i:{default:i}}})(xp);var Dp=xp;async function $w(){return(await Qe.request({method:"GET",baseURL:"https://api.geo-data.omnic.solutions/api/1.0/key",headers:{Authorization:"Token fa812020-3197-401a-9b39-345999046111"}})).data.data}function Ww(t){return np({queryKey:["wl-map-key-wl"],queryFn:()=>$w(),refetchOnWindowFocus:!1,retry:2,enabled:!t})}const Ap=c.createContext(null),Gw=({children:t})=>{const{gMapKey:e}=Xe(),{data:n,isFetching:r}=Ww(e),i=c.useMemo(()=>({mapKey:e||n||"AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0"}),[n,e]);return S.jsx(Ap.Provider,{value:i,children:r?S.jsx(Ns,{}):t})},Ip=()=>{const t=c.useContext(Ap);if(!t)throw new Error("useMapKeyContext must be used within a MapKeyProvider");return t},Zw="Aside-module__root__EotK2f",qw="Aside-module__open__Zwmbs5",Kw="Aside-module__overlay__slLdHF",Qw="Aside-module__container__28P4wq",Vo={root:Zw,open:qw,overlay:Kw,container:Qw},Jw=({children:t,className:e,open:n})=>S.jsxs("div",{className:Se(Vo.root,e,{[Vo.open]:n}),children:[S.jsx("div",{className:Vo.overlay}),S.jsx("div",{className:Vo.container,children:t})]}),Yw="Input-module__locationSearchRoot__svh-f9",Xw="Input-module__endAdornment__m40K5R",e6="Input-module__input__505b7i",t6="Input-module__startAdornment__D-sJ0N",n6="Input-module__locationSearchInput__2YK1MG",r6="Input-module__label__gmqtsf",i6="Input-module__inputContainer__vubIa-",_r={locationSearchRoot:Yw,endAdornment:Xw,input:e6,startAdornment:t6,locationSearchInput:n6,label:r6,inputContainer:i6},jp=c.forwardRef(({className:t,endAdornment:e,inputRef:n,label:r,onBlur:i,onChange:o,startAdornment:s,...a},l)=>{const u=c.useId(),f=c.useRef(null);c.useImperativeHandle(l,()=>({focus:()=>{var h;(h=f.current)==null||h.focus()},blur:()=>{var h;(h=f.current)==null||h.blur()},setValue:h=>{if(o){o({target:{value:h}});return}if(i){i({target:{value:h}});return}f.current&&(f.current.value=h)}}),[i,o]);const d=wp(n,f);return S.jsxs("label",{htmlFor:a.id??u,className:Se(_r.locationSearchRoot,t),children:[r&&S.jsx("span",{className:_r.label,children:r}),S.jsxs("div",{className:_r.inputContainer,children:[s&&S.jsx("div",{className:_r.startAdornment,children:s}),S.jsx("input",{...a,ref:d,id:a.id??u,className:_r.locationSearchInput,onChange:o,onBlur:i}),e&&S.jsx("div",{className:_r.endAdornment,children:e})]})]})}),o6="LocationAside-module__submit__CSKcqi",s6="LocationAside-module__container__S1NejR",a6="LocationAside-module__selector__hl74ke",l6="LocationAside-module__label__0Zk8at",u6="LocationAside-module__header__N1wgyn",c6="LocationAside-module__close__VsE88z",zo={submit:o6,container:s6,selector:a6,label:l6,header:u6,close:c6},f6=c.forwardRef((t,e)=>{const{t:n}=ln(["location_aside","common"]),{mapKey:r}=Ip(),i=er(Y5),{country:o,hideCloseButtonOnLocationScreen:s,inputs:a,onCloseLocationSelector:l,onLocationSelect:u}=Xe(),f=c.useRef(null),[d,h]=c.useState("");c.useImperativeHandle(e,()=>({open:()=>er.getState().toggle(!0),close:()=>er.getState().toggle(!1)}),[]);const v=async m=>{er.getState().toggle(!1),await qt.getState().setPlace(m),u==null||u(m),m!=null&&m.formatted_address&&h(m==null?void 0:m.formatted_address)},y=()=>{er.getState().toggle(!1),l==null||l()},g=o?{componentRestrictions:{country:o}}:void 0,w=m=>{h(m.target.value)},{ref:C}=Dp.usePlacesWidget({libraries:["places"],options:g,onPlaceSelected:v,apiKey:r,inputAutocompleteValue:d}),L=Ss(a==null?void 0:a.city);return S.jsx(Jw,{open:i,children:S.jsx("div",{ref:f,className:zo.container,children:S.jsxs("div",{className:zo.selector,children:[S.jsxs("div",{className:zo.header,children:[S.jsx("div",{className:zo.label,children:n("choose_city")}),!s&&S.jsx(ri,{position:"relative",onClick:y})]}),S.jsx(jp,{...L,inputRef:C,value:d,placeholder:n("placeholder"),onChange:w})]})})})}),d6=c.memo(f6),h6=({children:t})=>{const{locale:e}=Xe(),{mapKey:n}=Ip(),{setMapKey:r}=qt();c.useEffect(()=>{r(n)},[n,r]);const{isLoaded:i}=lp({language:e,libraries:eg,googleMapsApiKey:n});return i?S.jsx(S.Fragment,{children:t}):S.jsx(Ns,{})},p6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},U.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),g6=({className:t})=>{const{t:e}=ln("location_selector"),{country:n,inputs:r,onLocationSelect:i}=Xe(),[o,s]=c.useState(""),[a,l]=c.useState(!1),u=[],f=n?{componentRestrictions:{country:n},types:u}:{types:u},d=async L=>{await qt.getState().setPlaceAndPoint(L,{ignoreSelection:!0}),i==null||i(L),s("")},{ref:h}=Dp.usePlacesWidget({libraries:["places"],options:f,onPlaceSelected:d,inputAutocompleteValue:o}),v=L=>{a&&be.getState().setBlurred(!!L.target.value),s(L.target.value)},y=()=>{o&&be.getState().setBlurred(!0),be.getState().setDetailsOpen(!1),Ot.getState().setDeliverPoint(null),on.getState().setSelectedLocation(null),l(!0)},g=()=>{be.getState().setBlurred(!1),l(!1)},w=L=>{L.key==="Enter"&&L.preventDefault()},C=Ss(r==null?void 0:r.address);return S.jsx(jp,{...C,inputRef:h,value:o,className:t,endAdornment:S.jsx(p6,{}),placeholder:e("placeholder"),onChange:v,onFocus:y,onBlur:g,onKeyDown:w})},v6=({className:t})=>be(Rg)?S.jsx(g6,{className:t}):null,m6=c.memo(v6),y6="DeliveryDetailsModal-module__root__qwKnjX",b6={root:y6},C6=({className:t,location:e,onClose:n,onSubmit:r})=>S.jsx("div",{className:Se(b6.root,t),children:S.jsx(Cp,{location:e,onClose:n,onSubmit:r})}),w6="LocationDetailsModal-module__root__PyRnLM",S6={root:w6},L6=({className:t,location:e,onClose:n,onSubmit:r})=>{const i=()=>{r==null||r(e)};return S.jsx("div",{className:Se(S6.root,t),children:S.jsx(Hd,{location:e,onClose:n,onSubmit:i})})},x6="MapContainer-module__root__1Os6Q-",E6="MapContainer-module__mapWrapper__Cwe7qC",_6="MapContainer-module__wrapperBlurred__04NN2L",M6="MapContainer-module__locationSelector__Pr1zS-",O6="MapContainer-module__filterButton__CW3Qv7",P6="MapContainer-module__sidebarOpen__lGMVrJ",k6="MapContainer-module__filterIcon__T01XsJ",T6="MapContainer-module__details__gM8LWX",rn={root:x6,mapWrapper:E6,wrapperBlurred:_6,locationSelector:M6,filterButton:O6,sidebarOpen:P6,filterIcon:k6,details:T6},R6=()=>{const{onPointClick:t}=Xe(),e=be(wl),n=on(Ig),r=Ot(Cl),i=c.useCallback(()=>{be.getState().setDetailsOpen(!1)},[]),o=c.useCallback(s=>{t==null||t(s),be.getState().setDetailsOpen(!1),on.getState().setSelectedLocation(null),Ot.getState().setDeliverPoint(null)},[t]);return S.jsxs(S.Fragment,{children:[(r==null?void 0:r.address)&&e&&S.jsx(C6,{location:r,className:rn.details,onClose:i,onSubmit:o}),n&&e&&S.jsx(L6,{location:n,className:rn.details,onClose:i,onSubmit:o})]})},D6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},U.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),U.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),A6=t=>U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},U.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),U.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),I6=()=>{const t=Xr(i=>i.open),e=Xr(i=>i.toggle),n=vr("screenSm"),r=()=>{e(!0)};return S.jsxs("div",{role:"presentation",className:Se(rn.filterButton,{[rn.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&S.jsx(Lp,{}),n?S.jsx(A6,{className:rn.filterIcon,onClick:r}):S.jsx(D6,{className:rn.filterIcon})]})},j6=({children:t,className:e})=>{const{hideFilters:n,hideSearchInput:r}=Xe(),i=be(Tg),o=be(wl);return S.jsxs("div",{className:Se(rn.root,e),children:[!r&&!o&&S.jsx(m6,{className:rn.locationSelector}),!n&&S.jsx(I6,{}),S.jsx("div",{className:Se(rn.mapWrapper,{[rn.wrapperBlurred]:i}),children:t}),S.jsx(R6,{})]})},N6=c.memo(j6),B6="Separator-module__root__eQtZey",F6={root:B6},ga=({className:t,...e})=>S.jsx("hr",{className:Se(F6.root,t),...e}),U6="Sidebar-module__root__4j1MA3",V6="Sidebar-module__closeButton__HLXy1c",z6="Sidebar-module__open__mqQXF6",H6="Sidebar-module__header__Afp6uz",$6="Sidebar-module__typeFilter__GN46u9",W6="Sidebar-module__separator__6I4QoJ",G6="Sidebar-module__withRightPadding__2u1Ina",Z6="Sidebar-module__sheetContent__SaoncI",q6="Sidebar-module__doneButton__4aeaSD",vn={root:U6,closeButton:V6,open:z6,header:H6,typeFilter:$6,separator:W6,withRightPadding:G6,sheetContent:Z6,doneButton:q6},K6=()=>{const{t}=ln("common"),e=vr("screenSm"),n=Xr(i=>i.toggle),r=()=>{n(!1)};return S.jsxs("div",{className:vn.header,children:[e&&S.jsx("div",{role:"presentation",className:vn.doneButton,onClick:r,children:t("done")}),!e&&S.jsx(ri,{className:vn.closeButton,onClick:r})]})},Q6="Radio-module__root__7ElY2W",J6="Radio-module__label__c-sYW3",Sf={root:Q6,label:J6},Y6=({className:t,label:e,labelProps:n={},...r})=>{const i=c.useId(),{className:o,...s}=n;return S.jsxs("label",{htmlFor:i,className:Se(Sf.label,o),...s,children:[S.jsx("input",{id:i,type:"radio",className:Se(Sf.root,t),...r}),e]})},Ar=t=>S.jsx(Y6,{...t,type:"checkbox"}),X6="RadioGroup-module__root__ewZw-x",eS="RadioGroup-module__body__k8BJAs",tS="RadioGroup-module__legend__tcfV7q",va={root:X6,body:eS,legend:tS},Np=({children:t,className:e,label:n,onChange:r,value:i,...o})=>S.jsxs("div",{className:Se(va.root,e),...o,children:[n&&S.jsx("span",{className:va.legend,children:n}),S.jsx("div",{className:va.body,children:c.Children.map(t,s=>c.isValidElement(s)?c.cloneElement(s,{checked:!!(i!=null&&i[s.props.value]),onChange:a=>r==null?void 0:r({...i,[a.target.value]:a.target.checked})}):null)})]}),nS=({className:t,onChange:e})=>{const{t:n}=ln("receive_filter"),r=Vn(Fg);return S.jsxs(Np,{value:r,label:n("title"),className:t,onChange:e,children:[S.jsx(Ar,{name:"receive",value:Gt.DressingRoom,label:n("dressing_room")}),S.jsx(Ar,{name:"receive",value:Gt.CheckOrder,label:n("check_order")}),S.jsx(Ar,{name:"receive",value:Gt.PayByCash,label:n("pay_by_cash")})]})},rS=c.memo(nS),iS=({className:t,onChange:e})=>{const{t:n}=ln("send_filter"),r=Vn(Bg);return S.jsxs(Np,{className:t,value:r,label:n("title"),onChange:e,children:[S.jsx(Ar,{name:"send",value:Zt.Return,label:n("sending_returns")}),S.jsx(Ar,{name:"send",value:Zt.Shipping,label:n("shipping")}),S.jsx(Ar,{name:"send",value:Zt.Payment,label:n("payment")})]})},oS=c.memo(iS),sS="TypeFilter-module__root__WH5EQV",aS="TypeFilter-module__button__f0mSfo",Ho={root:sS,button:aS},lS=({className:t,onChange:e,value:n})=>{const{t:r}=ln("type_filter"),i=o=>()=>e==null?void 0:e(o);return S.jsxs("div",{className:Se(Ho.root,t),children:[S.jsx(Bt,{className:Ho.button,variant:n===gn.All?"primary":"secondary",onClick:i(gn.All),children:r("all")}),S.jsx(Bt,{className:Ho.button,variant:n===gn.PostOffice?"primary":"secondary",onClick:i(gn.PostOffice),children:r("post_office")}),S.jsx(Bt,{className:Ho.button,variant:n===gn.PickPoint?"primary":"secondary",onClick:i(gn.PickPoint),children:r("pick_point")})]})},uS=({className:t,onChange:e})=>{const n=Vn(Ng);return S.jsx(lS,{value:n,className:t,onChange:e})},cS=c.memo(uS),fS=({className:t})=>{const e=vr("screenSm"),n=Xr(l=>l.open),r=c.useCallback(l=>Vn.getState().setFilter({type:l}),[]),i=c.useCallback(l=>Vn.getState().setFilter({send:l}),[]),o=c.useCallback(l=>Vn.getState().setFilter({receive:l}),[]),s=c.useCallback(()=>Xr.getState().toggle(!1),[]),a=S.jsxs(S.Fragment,{children:[S.jsx(K6,{}),S.jsxs("div",{className:vn.withRightPadding,children:[S.jsx(cS,{className:vn.typeFilter,onChange:r}),S.jsx(ga,{className:vn.separator}),S.jsx(rS,{onChange:o}),S.jsx(ga,{}),S.jsx(oS,{onChange:i}),S.jsx(ga,{})]})]});return e?S.jsx(Uh,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:l})=>l-Vh,onDismiss:s,children:S.jsx("div",{className:vn.sheetContent,children:a})}):S.jsx("div",{className:Se(vn.root,t,{[vn.open]:n}),children:a})},dS="App-module__map__Kf-2JS",hS="App-module__sidebar__ORIzGk",pS="App-module__header__bgP9DA",ma={map:dS,sidebar:hS,header:pS},gS=new n4,Bp=({config:t,options:e})=>{const n=_m(t),{INN:r,hideFilters:i,hideHeader:o,locale:s,map:a}=n;yn(r,"INN is required"),Mm(r,e),yn(a==null?void 0:a.provider,"Map provider is required");const l=B5(a.provider);dm();const u=ew({locale:s});return S.jsx($p,{baseColor:"#f3f3f3",highlightColor:"#ecebeb",children:S.jsx(a4,{client:gS,children:S.jsx(Gw,{children:S.jsx(Uf.Provider,{value:n,children:S.jsx(rw,{children:S.jsx(nw,{children:S.jsx(P0,{tolgee:Sp,fallback:S.jsx(Ns,{}),children:u&&S.jsx(h6,{children:S.jsx(Ew,{children:S.jsxs(xw,{children:[!o&&S.jsx(yw,{className:ma.header}),!i&&S.jsx(fS,{className:ma.sidebar}),S.jsx(N6,{className:ma.map,children:S.jsx(l,{})}),S.jsx(d6,{})]})})})})})})})})})})},Fp=async t=>Vi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}}),Up=c.createContext(null);let Lf=!1;const vS=({children:t})=>{const[e,n]=c.useState(),[r,i]=c.useState(),o=c.useRef(null),s=c.useRef(null),a=c.useCallback(u=>{if(Lf){console.warn("Widget already launched");return}Lf=!0,n(u)},[]),l=c.useMemo(()=>({widgetOutHolderRef:o,widgetLocationsRef:s,launchWidget:a,setDynamicConfig:i}),[a]);return S.jsxs(Up.Provider,{value:l,children:[S.jsx("div",{ref:o,style:{position:"fixed",left:"-9999px",top:"-9999px"},children:S.jsx("div",{ref:s,id:"@omnic/widget-locations",style:{height:"100%",width:"100%"},children:e&&S.jsx(Bp,{options:e.options,config:{...e.config,...r}})})}),t]})};function Vp(){const t=c.useContext(Up);if(!t)throw new Error("Please use hook useWidgetLocationsContext inside WidgetLocationsProvider");return t}const mS=t=>{const{setDynamicConfig:e,widgetLocationsRef:n,widgetOutHolderRef:r}=Vp(),i=c.useRef(null);return c.useEffect(()=>{t&&e(t)},[t,e]),c.useEffect(()=>{const o=r.current,s=n.current,a=i.current;return s&&a&&a.appendChild(s),()=>{s&&o&&o.appendChild(s)}},[n,r]),S.jsx("div",{ref:i,style:{width:"100%",height:"100%"}})};exports.EReceiveFilter=Gt;exports.ESendFilter=Zt;exports.ETypeFilter=gn;exports.MapPlaceholder=mS;exports.Widget=Bp;exports.WidgetLocationsProvider=vS;exports.createPointsIterator=Ea;exports.fetchPointsRequest=xa;exports.fromHoursMinutesToMinutes=Ug;exports.fromMinutesToHoursMinutes=Vg;exports.getAddressFormGeocode=Oa;exports.getBoundsFromPoint=zg;exports.getCurrentPosition=Ol;exports.getNormalizedAddress=Fp;exports.getPropertyValue=md;exports.isCoordinates=Ma;exports.isDeliveryPoint=lm;exports.isHttpSuccess=vd;exports.isPlaceId=gd;exports.replaceSvgCurrentColor=Pr;exports.setWidgetCSSProperty=so;exports.stopImmediatePropagation=_a;exports.svgStringToBase64URL=Pl;exports.useWidgetLocationsContext=Vp;
@@ -18260,7 +18260,7 @@ function a6(t) {
18260
18260
  });
18261
18261
  }
18262
18262
  const Qp = Fs(null), l6 = ({ children: t }) => {
18263
- const { gMapKey: e } = at(), { data: n, isLoading: r } = a6(e), i = mt(
18263
+ const { gMapKey: e } = at(), { data: n, isFetching: r } = a6(e), i = mt(
18264
18264
  () => ({
18265
18265
  mapKey: e || n || "AIzaSyDsI0AO8VsUrTPoyR9fF7T31FKx1a9TLO0"
18266
18266
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnic/widget-locations",
3
- "version": "1.1.48",
3
+ "version": "1.1.49",
4
4
  "description": "Simple map widget for Omnic Delivery applications",
5
5
  "files": [
6
6
  "@types",
@@ -73,5 +73,5 @@
73
73
  "lerna": "8.1.2",
74
74
  "sass": "1.72.0"
75
75
  },
76
- "gitHead": "c32f66e944a51e177f41b55dee223f69d463a841"
76
+ "gitHead": "a6a0cd21e9453e42b5525e7d293a2b9f00fa75c2"
77
77
  }